import{a as e}from"./rolldown-runtime-C-57s9n3.js";import{a as t,i as n,n as r,r as i,t as a}from"./leaflet-D_It5MIz.js";var o=e(t(),1),s=a(),c=e=>{if(e.getAttribute(`data-already`)===`true`)return;e.setAttribute(`data-already`,`true`),o.default.Map.addInitHook(`addHandler`,`gestureHandling`,s.GestureHandling);let t=!!e.getAttribute(`data-multiple`),a=e.getAttribute(`data-lat`),c=e.getAttribute(`data-lng`),l=e.getAttribute(`data-zoom`),u=e.getAttribute(`data-msg`),d=e.getAttribute(`data-markers`),f=e.getAttribute(`data-messages`),p=o.default.map(e,{gestureHandling:!0}).setView([a,c],l);if(delete o.default.Icon.Default.prototype._getIconUrl,o.default.Icon.Default.mergeOptions({iconUrl:n,iconRetinaUrl:i,shadowUrl:r}),o.default.tileLayer(`https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png`,{attribution:`&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors`}).addTo(p),t&&d){let e=d.split(`|`),t=f.split(`[[:split:]]`);e.forEach((e,n)=>{let r=e.split(`,`);if(r.length===2){let e=o.default.marker([r[0].trim(),r[1].trim()],{draggable:!1}).addTo(p);t[n]&&e.bindPopup(t[n])}})}else{let e=o.default.marker(p.getCenter(),{draggable:!1}).addTo(p);u&&e.bindPopup(u)}};export{c as default};