text: import{w as o,S as t,i as e,s as n,v as s,x as i,y as a,e as l,g as r,h as p,c,a as d,d as u,j as m,l as h,b as f,f as g,o as y,z as w,p as $,r as z,u as k,A as C,B as b}from"./client.27f5503e.js";const x=o(!1),T=o(!1);function L(o,t,e){let n,l;s(o,x,o=>e(2,n=o)),s(o,T,o=>e(3,l=o));const r=i();let p={},c="";return a(()=>{n&&r("ready"),l||(T.set(!0),function(o,t,e){let n=o.length;function s(){n=--n,n<1&&e()}t()?e():o.forEach(({type:o,url:t,options:e={async:!0,defer:!0}})=>{const n="script"===o,i=document.createElement(n?"script":"link");n?(i.src=t,i.async=e.async,i.defer=e.defer):(i.rel="stylesheet",i.href=t),i.onload=s,document.body.appendChild(i)})}([{type:"style",url:"https://unpkg.com/leaflet@1.7.1/dist/leaflet.css"},{type:"script",url:"https://unpkg.com/leaflet@1.7.1/dist/leaflet.js"}],()=>!1,()=>(p=window.L,c=p.map,x.set(!0),!0)))}),o.$$.update=()=>{4&o.$$.dirty&&n&&r("ready")},[]}class v extends t{constructor(o){super(),e(this,o,L,null,n,{})}}const{window:Z}=C;function S(o){let t,e,n,s,i,a;return n=new v({}),n.$on("ready",o[1]),{c(){t=l("div"),e=r(),p(n.$$.fragment),this.h()},l(o){t=c(o,"DIV",{class:!0,id:!0}),d(t).forEach(u),e=m(o),h(n.$$.fragment,o),this.h()},h(){f(t,"class","map svelte-1xdqv5q"),f(t,"id",o[0])},m(l,r){g(l,t,r),o[4](t),g(l,e,r),y(n,l,r),s=!0,i||(a=w(Z,"resize",o[2]),i=!0)},p(o,[e]){(!s||1&e)&&f(t,"id",o[0])},i(o){s||($(n.$$.fragment,o),s=!0)},o(o){z(n.$$.fragment,o),s=!1},d(s){s&&u(t),o[4](null),s&&u(e),k(n,s),i=!1,a()}}}function A(o,t,e){let n={},s="";const a=i();let{options:l}=t,{zoom:r=13,maxZoom:p=19,minZoom:c=1,mapID:d="map",attributionControl:u=!0,center:m=[0,0],markers:h,circles:f,recenter:g=!1,scrollWheelZoom:y=!0,tileLayer:w={url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",attribution:'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'},controls:$={zoomControl:!0,position:"topleft",scale:!1}}=l;return o.$$set=o=>{"options"in o&&e(3,l=o.options)},[d,function(){setTimeout(()=>{n=window.L,function(){s=n.map(d,{attributionControl:u,zoomControl:$.zoomControl,minZoom:c,maxZoom:p}).setView(m,r),n.tileLayer(w.url,{attribution:w.attribution}).addTo(s),y||s.scrollWheelZoom.disable();let o,t=n.control;$.zoomControl||t().remove();$.scale&&t.scale({position:$.position}).addTo(s);$.zoomControl&&$.position&&(s.removeControl(s.zoomControl),t.zoom({position:$.position}).addTo(s));let e,i=[],a=[],l={iconUrl:"https://unpkg.com/leaflet@1.7.1/dist/images/marker-icon.png",iconRetinaUrl:"https://unpkg.com/leaflet@1.7.1/dist/images/marker-icon-2x.png",shadowUrl:"https://unpkg.com/leaflet@1.7.1/dist/images/marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[1,-34],shadowSize:[41,41]};h&&h.map(t=>{i.push([t.lat,t.lng]),o=t.icon?n.icon(t.icon):n.icon(l);let e=new n.marker([t.lat,t.lng],{icon:o});t.popup&&k(e,t.popup),t.tooltip&&z(e,t.tooltip),e.addTo(s)});f&&f.map(o=>{a.push([o.lat,o.lng]);let t=new n.circle([o.lat,o.lng],{...o});o.popup&&k(t,o.popup),o.tooltip&&z(t,o.tooltip),t.addTo(s)});function z(o,t){o.bindTooltip(t.text,{...t}).addTo(s),t.isOpen&&o.openTooltip()}function k(o,t){o.bindPopup(t.text,{closeOnClick:!1,autoClose:!1,...t}).addTo(s),t.isOpen&&o.openPopup()}g&&(1==i.length?(s.panTo(n.latLng(i[0][0],i[0][1])),s.setZoom(r)):(e=new n.LatLngBounds(i),s.fitBounds(e)))}(),a("ready")},1)},function(){s&&s.invalidateSize()},l,function(o){b[o?"unshift":"push"](()=>{d=o,e(0,d)})}]}class O extends t{constructor(o){super(),e(this,o,A,S,n,{options:3})}}export{O as L};
  