@maptiler/geocoding-control 2.1.0-rc1 → 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/leaflet-controller.js +1942 -1523
  2. package/leaflet-controller.js.map +1 -1
  3. package/leaflet-controller.umd.js +1 -22
  4. package/leaflet-controller.umd.js.map +1 -1
  5. package/leaflet.js +2800 -2368
  6. package/leaflet.js.map +1 -1
  7. package/leaflet.umd.js +1 -22
  8. package/leaflet.umd.js.map +1 -1
  9. package/maplibregl-controller.js +1918 -1498
  10. package/maplibregl-controller.js.map +1 -1
  11. package/maplibregl-controller.umd.js +1 -22
  12. package/maplibregl-controller.umd.js.map +1 -1
  13. package/maplibregl.js +2858 -2425
  14. package/maplibregl.js.map +1 -1
  15. package/maplibregl.umd.js +1 -22
  16. package/maplibregl.umd.js.map +1 -1
  17. package/maptilersdk.js +2863 -2428
  18. package/maptilersdk.js.map +1 -1
  19. package/maptilersdk.umd.js +1 -22
  20. package/maptilersdk.umd.js.map +1 -1
  21. package/openlayers-controller.js +1686 -1264
  22. package/openlayers-controller.js.map +1 -1
  23. package/openlayers-controller.umd.js +1 -22
  24. package/openlayers-controller.umd.js.map +1 -1
  25. package/openlayers.js +2785 -2353
  26. package/openlayers.js.map +1 -1
  27. package/openlayers.umd.js +1 -22
  28. package/openlayers.umd.js.map +1 -1
  29. package/package.json +19 -19
  30. package/react.js +800 -784
  31. package/react.js.map +1 -1
  32. package/react.umd.js +1 -1
  33. package/react.umd.js.map +1 -1
  34. package/{MapLibreBasedGeocodingControl.d.ts → src/MapLibreBasedGeocodingControl.d.ts} +35 -69
  35. package/{maplibregl.d.ts → src/maplibregl.d.ts} +34 -68
  36. package/{maptilersdk.d.ts → src/maptilersdk.d.ts} +34 -68
  37. package/src/types.d.ts +391 -0
  38. package/svelte/GeocodingControl.svelte +55 -14
  39. package/svelte/GeocodingControl.svelte.d.ts +5 -2
  40. package/svelte/MapLibreBasedGeocodingControl.d.ts +35 -69
  41. package/svelte/maplibregl.d.ts +34 -68
  42. package/svelte/maptilersdk.d.ts +34 -68
  43. package/svelte/maptilersdk.js +2 -0
  44. package/svelte/react.js +3 -0
  45. package/svelte/types.d.ts +175 -127
  46. package/vanilla.js +870 -857
  47. package/vanilla.js.map +1 -1
  48. package/vanilla.umd.js +1 -1
  49. package/vanilla.umd.js.map +1 -1
  50. package/types.d.ts +0 -343
  51. /package/{geo-coordinates-parser.t.d.ts → src/geo-coordinates-parser.t.d.ts} +0 -0
  52. /package/{geoUtils.d.ts → src/geoUtils.d.ts} +0 -0
  53. /package/{leaflet-controller.d.ts → src/leaflet-controller.d.ts} +0 -0
  54. /package/{leaflet.d.ts → src/leaflet.d.ts} +0 -0
  55. /package/{maplibregl-controller.d.ts → src/maplibregl-controller.d.ts} +0 -0
  56. /package/{mask.d.ts → src/mask.d.ts} +0 -0
  57. /package/{openlayers-controller.d.ts → src/openlayers-controller.d.ts} +0 -0
  58. /package/{openlayers.d.ts → src/openlayers.d.ts} +0 -0
  59. /package/{proximity.d.ts → src/proximity.d.ts} +0 -0
  60. /package/{react.d.ts → src/react.d.ts} +0 -0
  61. /package/{vanilla.d.ts → src/vanilla.d.ts} +0 -0
package/leaflet.umd.js CHANGED
@@ -1,23 +1,2 @@
1
- (function(A,U){typeof exports=="object"&&typeof module<"u"?U(exports,require("leaflet")):typeof define=="function"&&define.amd?define(["exports","leaflet"],U):(A=typeof globalThis<"u"?globalThis:A||self,U(A.leafletMaptilerGeocoder={},A.L))})(this,function(A,U){"use strict";var yo=Object.defineProperty;var nn=A=>{throw TypeError(A)};var bo=(A,U,K)=>U in A?yo(A,U,{enumerable:!0,configurable:!0,writable:!0,value:K}):A[U]=K;var Vt=(A,U,K)=>bo(A,typeof U!="symbol"?U+"":U,K),rn=(A,U,K)=>U.has(A)||nn("Cannot "+K);var le=(A,U,K)=>(rn(A,U,"read from private field"),K?K.call(A):U.get(A)),Yt=(A,U,K)=>U.has(A)?nn("Cannot add the same private member more than once"):U instanceof WeakSet?U.add(A):U.set(A,K),Xt=(A,U,K,ie)=>(rn(A,U,"write to private field"),ie?ie.call(A,K):U.set(A,K),K);var re,Oe;function K(i){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(i){for(const t in i)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(i,t);Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:()=>i[t]})}}return e.default=i,Object.freeze(e)}const ie=K(U);function F(){}function on(i,e){for(const t in e)i[t]=e[t];return i}function Kt(i){return i()}function Jt(){return Object.create(null)}function ye(i){i.forEach(Kt)}function $t(i){return typeof i=="function"}function Ee(i,e){return i!=i?e==e:i!==e||i&&typeof i=="object"||typeof i=="function"}let tt;function J(i,e){return i===e?!0:(tt||(tt=document.createElement("a")),tt.href=e,i===tt.href)}function sn(i){return Object.keys(i).length===0}function ln(i,e,t,n){if(i){const r=ei(i,e,t,n);return i[0](r)}}function ei(i,e,t,n){return i[1]&&n?on(t.ctx.slice(),i[1](n(e))):t.ctx}function un(i,e,t,n){if(i[2]&&n){const r=i[2](n(t));if(e.dirty===void 0)return r;if(typeof r=="object"){const o=[],l=Math.max(e.dirty.length,r.length);for(let s=0;s<l;s+=1)o[s]=e.dirty[s]|r[s];return o}return e.dirty|r}return e.dirty}function an(i,e,t,n,r,o){if(r){const l=ei(e,t,n,o);i.p(l,r)}}function cn(i){if(i.ctx.length>32){const e=[],t=i.ctx.length/32;for(let n=0;n<t;n++)e[n]=-1;return e}return-1}function it(i){return i??""}function I(i,e){i.appendChild(e)}function j(i,e,t){i.insertBefore(e,t||null)}function G(i){i.parentNode&&i.parentNode.removeChild(i)}function D(i){return document.createElement(i)}function ae(i){return document.createElementNS("http://www.w3.org/2000/svg",i)}function Le(i){return document.createTextNode(i)}function ne(){return Le(" ")}function fn(){return Le("")}function Y(i,e,t,n){return i.addEventListener(e,t,n),()=>i.removeEventListener(e,t,n)}function dn(i){return function(e){return e.preventDefault(),i.call(this,e)}}function p(i,e,t){t==null?i.removeAttribute(e):i.getAttribute(e)!==t&&i.setAttribute(e,t)}function hn(i){return Array.from(i.childNodes)}function je(i,e){e=""+e,i.data!==e&&(i.data=e)}function ti(i,e){i.value=e??""}function ge(i,e,t){i.classList.toggle(e,!!t)}function gn(i,e,{bubbles:t=!1,cancelable:n=!1}={}){return new CustomEvent(i,{detail:e,bubbles:t,cancelable:n})}let qe;function Ze(i){qe=i}function ii(){if(!qe)throw new Error("Function called outside component initialization");return qe}function mn(i){ii().$$.on_destroy.push(i)}function ni(){const i=ii();return(e,t,{cancelable:n=!1}={})=>{const r=i.$$.callbacks[e];if(r){const o=gn(e,t,{cancelable:n});return r.slice().forEach(l=>{l.call(i,o)}),!o.defaultPrevented}return!0}}function pn(i,e){const t=i.$$.callbacks[e.type];t&&t.slice().forEach(n=>n.call(this,e))}const Ae=[],bt=[];let We=[];const ri=[],yn=Promise.resolve();let vt=!1;function bn(){vt||(vt=!0,yn.then(oi))}function _t(i){We.push(i)}const wt=new Set;let Be=0;function oi(){if(Be!==0)return;const i=qe;do{try{for(;Be<Ae.length;){const e=Ae[Be];Be++,Ze(e),vn(e.$$)}}catch(e){throw Ae.length=0,Be=0,e}for(Ze(null),Ae.length=0,Be=0;bt.length;)bt.pop()();for(let e=0;e<We.length;e+=1){const t=We[e];wt.has(t)||(wt.add(t),t())}We.length=0}while(Ae.length);for(;ri.length;)ri.pop()();vt=!1,wt.clear(),Ze(i)}function vn(i){if(i.fragment!==null){i.update(),ye(i.before_update);const e=i.dirty;i.dirty=[-1],i.fragment&&i.fragment.p(i.ctx,e),i.after_update.forEach(_t)}}function _n(i){const e=[],t=[];We.forEach(n=>i.indexOf(n)===-1?e.push(n):t.push(n)),t.forEach(n=>n()),We=e}const nt=new Set;let Re;function rt(){Re={r:0,c:[],p:Re}}function ot(){Re.r||ye(Re.c),Re=Re.p}function Q(i,e){i&&i.i&&(nt.delete(i),i.i(e))}function X(i,e,t,n){if(i&&i.o){if(nt.has(i))return;nt.add(i),Re.c.push(()=>{nt.delete(i),n&&(t&&i.d(1),n())}),i.o(e)}else n&&n()}function si(i){return(i==null?void 0:i.length)!==void 0?i:Array.from(i)}function wn(i,e){X(i,1,1,()=>{e.delete(i.key)})}function En(i,e,t,n,r,o,l,s,c,u,h,a){let f=i.length,d=o.length,m=f;const b={};for(;m--;)b[i[m].key]=m;const v=[],y=new Map,E=new Map,_=[];for(m=d;m--;){const x=a(r,o,m),S=t(x);let T=l.get(S);T?_.push(()=>T.p(x,e)):(T=u(S,x),T.c()),y.set(S,v[m]=T),S in b&&E.set(S,Math.abs(m-b[S]))}const L=new Set,P=new Set;function N(x){Q(x,1),x.m(s,h),l.set(x.key,x),h=x.first,d--}for(;f&&d;){const x=v[d-1],S=i[f-1],T=x.key,w=S.key;x===S?(h=x.first,f--,d--):y.has(w)?!l.has(T)||L.has(T)?N(x):P.has(w)?f--:E.get(T)>E.get(w)?(P.add(T),N(x)):(L.add(w),f--):(c(S,l),f--)}for(;f--;){const x=i[f];y.has(x.key)||c(x,l)}for(;d;)N(v[d-1]);return ye(_),v}function Se(i){i&&i.c()}function be(i,e,t){const{fragment:n,after_update:r}=i.$$;n&&n.m(e,t),_t(()=>{const o=i.$$.on_mount.map(Kt).filter($t);i.$$.on_destroy?i.$$.on_destroy.push(...o):ye(o),i.$$.on_mount=[]}),r.forEach(_t)}function ve(i,e){const t=i.$$;t.fragment!==null&&(_n(t.after_update),ye(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function Ln(i,e){i.$$.dirty[0]===-1&&(Ae.push(i),bn(),i.$$.dirty.fill(0)),i.$$.dirty[e/31|0]|=1<<e%31}function xe(i,e,t,n,r,o,l=null,s=[-1]){const c=qe;Ze(i);const u=i.$$={fragment:null,ctx:[],props:o,update:F,not_equal:r,bound:Jt(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(c?c.$$.context:[])),callbacks:Jt(),dirty:s,skip_bound:!1,root:e.target||c.$$.root};l&&l(u.root);let h=!1;if(u.ctx=t?t(i,e.props||{},(a,f,...d)=>{const m=d.length?d[0]:f;return u.ctx&&r(u.ctx[a],u.ctx[a]=m)&&(!u.skip_bound&&u.bound[a]&&u.bound[a](m),h&&Ln(i,a)),f}):[],u.update(),h=!0,ye(u.before_update),u.fragment=n?n(u.ctx):!1,e.target){if(e.hydrate){const a=hn(e.target);u.fragment&&u.fragment.l(a),a.forEach(G)}else u.fragment&&u.fragment.c();e.intro&&Q(i.$$.fragment),be(i,e.target,e.anchor),oi()}Ze(c)}class Me{constructor(){Vt(this,"$$");Vt(this,"$$set")}$destroy(){ve(this,1),this.$destroy=F}$on(e,t){if(!$t(t))return F;const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{const r=n.indexOf(t);r!==-1&&n.splice(r,1)}}$set(e){this.$$set&&!sn(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const Sn="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Sn);function xn(i){let e,t;return{c(){e=ae("svg"),t=ae("path"),p(t,"d","M13.12.706a.982.982 0 0 0-1.391 0L6.907 5.517 2.087.696a.982.982 0 1 0-1.391 1.39l4.821 4.821L.696 11.73a.982.982 0 1 0 1.39 1.39l4.821-4.821 4.822 4.821a.982.982 0 1 0 1.39-1.39L8.298 6.908l4.821-4.822a.988.988 0 0 0 0-1.38Z"),p(e,"viewBox","0 0 14 14"),p(e,"width","13"),p(e,"height","13"),p(e,"class","svelte-en2qvf")},m(n,r){j(n,e,r),I(e,t)},p:F,i:F,o:F,d(n){n&&G(e)}}}class li extends Me{constructor(e){super(),xe(this,e,null,xn,Ee,{})}}function Mn(i){let e,t;return{c(){e=ae("svg"),t=ae("path"),p(t,"d","M15 0C6.705 0 0 6.705 0 15C0 23.295 6.705 30 15 30C23.295 30 30 23.295 30 15C30 6.705 23.295 0 15 0ZM22.5 20.385L20.385 22.5L15 17.115L9.615 22.5L7.5 20.385L12.885 15L7.5 9.615L9.615 7.5L15 12.885L20.385 7.5L22.5 9.615L17.115 15L22.5 20.385Z"),p(e,"viewBox","0 0 30 30"),p(e,"fill","none"),p(e,"xmlns","http://www.w3.org/2000/svg"),p(e,"class","svelte-d2loi5")},m(n,r){j(n,e,r),I(e,t)},p:F,i:F,o:F,d(n){n&&G(e)}}}class ui extends Me{constructor(e){super(),xe(this,e,null,Mn,Ee,{})}}function Cn(i){let e,t;return{c(){e=D("img"),J(e.src,t=i[3]+"area.svg")||p(e,"src",t),p(e,"alt",i[6]),p(e,"title",i[6]),p(e,"class","svelte-z7p9pp")},m(n,r){j(n,e,r)},p(n,r){r&8&&!J(e.src,t=n[3]+"area.svg")&&p(e,"src",t),r&64&&p(e,"alt",n[6]),r&64&&p(e,"title",n[6])},d(n){n&&G(e)}}}function kn(i){let e,t;return{c(){e=D("img"),J(e.src,t=i[3]+"reverse.svg")||p(e,"src",t),p(e,"alt",i[6]),p(e,"title",i[6]),p(e,"class","svelte-z7p9pp")},m(n,r){j(n,e,r)},p(n,r){r&8&&!J(e.src,t=n[3]+"reverse.svg")&&p(e,"src",t),r&64&&p(e,"alt",n[6]),r&64&&p(e,"title",n[6])},d(n){n&&G(e)}}}function Nn(i){let e,t;return{c(){e=D("img"),J(e.src,t=i[3]+"poi.svg")||p(e,"src",t),p(e,"alt",i[6]),p(e,"title",i[6]),p(e,"class","svelte-z7p9pp")},m(n,r){j(n,e,r)},p(n,r){r&8&&!J(e.src,t=n[3]+"poi.svg")&&p(e,"src",t),r&64&&p(e,"alt",n[6]),r&64&&p(e,"title",n[6])},d(n){n&&G(e)}}}function Pn(i){let e,t;return{c(){e=D("img"),J(e.src,t=i[3]+"postal_code.svg")||p(e,"src",t),p(e,"alt",i[6]),p(e,"title",i[6]),p(e,"class","svelte-z7p9pp")},m(n,r){j(n,e,r)},p(n,r){r&8&&!J(e.src,t=n[3]+"postal_code.svg")&&p(e,"src",t),r&64&&p(e,"alt",n[6]),r&64&&p(e,"title",n[6])},d(n){n&&G(e)}}}function Tn(i){let e,t;return{c(){e=D("img"),J(e.src,t=i[3]+"street.svg")||p(e,"src",t),p(e,"alt",i[6]),p(e,"title",i[6]),p(e,"class","svelte-z7p9pp")},m(n,r){j(n,e,r)},p(n,r){r&8&&!J(e.src,t=n[3]+"street.svg")&&p(e,"src",t),r&64&&p(e,"alt",n[6]),r&64&&p(e,"title",n[6])},d(n){n&&G(e)}}}function Rn(i){let e,t;return{c(){e=D("img"),J(e.src,t=i[3]+"road.svg")||p(e,"src",t),p(e,"alt",i[6]),p(e,"title",i[6]),p(e,"class","svelte-z7p9pp")},m(n,r){j(n,e,r)},p(n,r){r&8&&!J(e.src,t=n[3]+"road.svg")&&p(e,"src",t),r&64&&p(e,"alt",n[6]),r&64&&p(e,"title",n[6])},d(n){n&&G(e)}}}function On(i){let e,t;return{c(){e=D("img"),J(e.src,t=i[3]+"housenumber.svg")||p(e,"src",t),p(e,"alt",i[6]),p(e,"title",i[6]),p(e,"class","svelte-z7p9pp")},m(n,r){j(n,e,r)},p(n,r){r&8&&!J(e.src,t=n[3]+"housenumber.svg")&&p(e,"src",t),r&64&&p(e,"alt",n[6]),r&64&&p(e,"title",n[6])},d(n){n&&G(e)}}}function In(i){let e,t,n,r;return{c(){e=D("img"),J(e.src,t=i[5])||p(e,"src",t),p(e,"alt",i[4]),p(e,"title",i[6]),p(e,"class","svelte-z7p9pp")},m(o,l){j(o,e,l),n||(r=Y(e,"error",i[14]),n=!0)},p(o,l){l&32&&!J(e.src,t=o[5])&&p(e,"src",t),l&16&&p(e,"alt",o[4]),l&64&&p(e,"title",o[6])},d(o){o&&G(e),n=!1,r()}}}function ai(i){let e,t;return{c(){e=D("span"),t=Le(i[6]),p(e,"class","secondary svelte-z7p9pp")},m(n,r){j(n,e,r),I(e,t)},p(n,r){r&64&&je(t,n[6])},d(n){n&&G(e)}}}function zn(i){let e,t,n,r,o,l,s,c,u,h=(i[8]?i[0].place_name:i[0].place_name.replace(/,.*/,""))+"",a,f,d=i[2]==="always"||i[2]!=="never"&&!i[0].address&&!i[0].id.startsWith("road.")&&!i[0].id.startsWith("address.")&&!i[0].id.startsWith("postal_code.")&&(!i[0].id.startsWith("poi.")||!i[5])&&!i[8],m,b,v=(i[8]?"":i[0].place_name.replace(/[^,]*,?\s*/,""))+"",y,E,_,L,P,N;function x(M,R){return R&1&&(t=null),R&1&&(n=null),R&1&&(r=null),R&1&&(o=null),M[5]?In:M[0].address?On:(t==null&&(t=!!M[0].id.startsWith("road.")),t?Rn:(n==null&&(n=!!M[0].id.startsWith("address.")),n?Tn:(r==null&&(r=!!M[0].id.startsWith("postal_code.")),r?Pn:(o==null&&(o=!!M[0].id.startsWith("poi.")),o?Nn:M[8]?kn:Cn))))}let S=x(i,-1),T=S(i),w=d&&ai(i);return{c(){e=D("li"),T.c(),l=ne(),s=D("span"),c=D("span"),u=D("span"),a=Le(h),f=ne(),w&&w.c(),m=ne(),b=D("span"),y=Le(v),p(u,"class","primary svelte-z7p9pp"),p(c,"class","svelte-z7p9pp"),p(b,"class","line2 svelte-z7p9pp"),p(s,"class","texts svelte-z7p9pp"),p(e,"tabindex","-1"),p(e,"role","option"),p(e,"aria-selected",E=i[1]==="selected"),p(e,"aria-checked",_=i[1]==="picked"),p(e,"class",L=it(i[1])+" svelte-z7p9pp")},m(M,R){j(M,e,R),T.m(e,null),I(e,l),I(e,s),I(s,c),I(c,u),I(u,a),I(c,f),w&&w.m(c,null),I(s,m),I(s,b),I(b,y),P||(N=[Y(e,"mouseenter",i[13]),Y(e,"focus",i[15]),Y(e,"click",i[16])],P=!0)},p(M,[R]){S===(S=x(M,R))&&T?T.p(M,R):(T.d(1),T=S(M),T&&(T.c(),T.m(e,l))),R&1&&h!==(h=(M[8]?M[0].place_name:M[0].place_name.replace(/,.*/,""))+"")&&je(a,h),R&37&&(d=M[2]==="always"||M[2]!=="never"&&!M[0].address&&!M[0].id.startsWith("road.")&&!M[0].id.startsWith("address.")&&!M[0].id.startsWith("postal_code.")&&(!M[0].id.startsWith("poi.")||!M[5])&&!M[8]),d?w?w.p(M,R):(w=ai(M),w.c(),w.m(c,null)):w&&(w.d(1),w=null),R&1&&v!==(v=(M[8]?"":M[0].place_name.replace(/[^,]*,?\s*/,""))+"")&&je(y,v),R&2&&E!==(E=M[1]==="selected")&&p(e,"aria-selected",E),R&2&&_!==(_=M[1]==="picked")&&p(e,"aria-checked",_),R&2&&L!==(L=it(M[1])+" svelte-z7p9pp")&&p(e,"class",L)},i:F,o:F,d(M){M&&G(e),T.d(),w&&w.d(),P=!1,ye(N)}}}function An(i,e,t){var P;let n,r,{feature:o}=e,{style:l="default"}=e,{showPlaceType:s}=e,{missingIconsCache:c}=e,{iconsBaseUrl:u}=e;const h=ni(),a=(P=o.properties)==null?void 0:P.categories;let f,d,m=0,b=o.place_type[0]==="reverse";function v(){d&&c.add(d),t(11,m++,m)}function y(N){pn.call(this,i,N)}const E=()=>v(),_=()=>h("select",void 0),L=N=>{document.activeElement!==N.target&&h("select",void 0)};return i.$$set=N=>{"feature"in N&&t(0,o=N.feature),"style"in N&&t(1,l=N.style),"showPlaceType"in N&&t(2,s=N.showPlaceType),"missingIconsCache"in N&&t(10,c=N.missingIconsCache),"iconsBaseUrl"in N&&t(3,u=N.iconsBaseUrl)},i.$$.update=()=>{var N,x,S,T;if(i.$$.dirty&7224)do t(12,n--,n),t(4,f=a==null?void 0:a[n]),t(5,d=f?u+f.replace(/ /g,"_")+".svg":void 0);while(n>-1&&(!d||c.has(d)));i.$$.dirty&1&&t(6,r=((x=(N=o.properties)==null?void 0:N.categories)==null?void 0:x.join(", "))??((T=(S=o.properties)==null?void 0:S.place_type_name)==null?void 0:T[0])??o.place_type[0])},t(12,n=(a==null?void 0:a.length)??0),[o,l,s,u,f,d,r,h,b,v,c,m,n,y,E,_,L]}class Wn extends Me{constructor(e){super(),xe(this,e,An,zn,Ee,{feature:0,style:1,showPlaceType:2,missingIconsCache:10,iconsBaseUrl:3})}}function Bn(i){let e;return{c(){e=D("div"),e.innerHTML='<svg viewBox="0 0 18 18" width="24" height="24" class="svelte-7cmwmc"><path fill="#333" d="M4.4 4.4l.8.8c2.1-2.1 5.5-2.1 7.6 0l.8-.8c-2.5-2.5-6.7-2.5-9.2 0z"></path><path opacity=".1" d="M12.8 12.9c-2.1 2.1-5.5 2.1-7.6 0-2.1-2.1-2.1-5.5 0-7.7l-.8-.8c-2.5 2.5-2.5 6.7 0 9.2s6.6 2.5 9.2 0 2.5-6.6 0-9.2l-.8.8c2.2 2.1 2.2 5.6 0 7.7z"></path></svg>',p(e,"class","svelte-7cmwmc")},m(t,n){j(t,e,n)},p:F,i:F,o:F,d(t){t&&G(e)}}}class Dn extends Me{constructor(e){super(),xe(this,e,null,Bn,Ee,{})}}function Un(i){let e,t,n;return{c(){e=ae("svg"),t=ae("path"),p(t,"stroke-width","4"),p(t,"d","M 5,33.103579 C 5,17.607779 18.457,5 35,5 C 51.543,5 65,17.607779 65,33.103579 C 65,56.388679 40.4668,76.048179 36.6112,79.137779 C 36.3714,79.329879 36.2116,79.457979 36.1427,79.518879 C 35.8203,79.800879 35.4102,79.942779 35,79.942779 C 34.5899,79.942779 34.1797,79.800879 33.8575,79.518879 C 33.7886,79.457979 33.6289,79.330079 33.3893,79.138079 C 29.5346,76.049279 5,56.389379 5,33.103579 Z M 35.0001,49.386379 C 43.1917,49.386379 49.8323,42.646079 49.8323,34.331379 C 49.8323,26.016779 43.1917,19.276479 35.0001,19.276479 C 26.8085,19.276479 20.1679,26.016779 20.1679,34.331379 C 20.1679,42.646079 26.8085,49.386379 35.0001,49.386379 Z"),p(t,"class","svelte-gzo3ar"),p(e,"width",n=i[0]==="list"?20:void 0),p(e,"viewBox","0 0 70 85"),p(e,"fill","none"),p(e,"class","svelte-gzo3ar"),ge(e,"in-map",i[0]!=="list"),ge(e,"list-icon",i[0]==="list")},m(r,o){j(r,e,o),I(e,t)},p(r,[o]){o&1&&n!==(n=r[0]==="list"?20:void 0)&&p(e,"width",n),o&1&&ge(e,"in-map",r[0]!=="list"),o&1&&ge(e,"list-icon",r[0]==="list")},i:F,o:F,d(r){r&&G(e)}}}function Fn(i,e,t){let{displayIn:n}=e;return i.$$set=r=>{"displayIn"in r&&t(0,n=r.displayIn)},[n]}class Gn extends Me{constructor(e){super(),xe(this,e,Fn,Un,Ee,{displayIn:0})}}function jn(i){let e,t;return{c(){e=ae("svg"),t=ae("path"),p(t,"d","M30.003-26.765C13.46-26.765 0-14.158 0 1.337c0 23.286 24.535 42.952 28.39 46.04.24.192.402.316.471.376.323.282.732.424 1.142.424.41 0 .82-.142 1.142-.424.068-.06.231-.183.471-.376 3.856-3.09 28.39-22.754 28.39-46.04 0-15.495-13.46-28.102-30.003-28.102Zm1.757 12.469c4.38 0 7.858 1.052 10.431 3.158 2.595 2.105 3.89 4.913 3.89 8.422 0 2.34-.53 4.362-1.593 6.063-1.063 1.702-3.086 3.616-6.063 5.742-2.042 1.51-3.337 2.659-3.89 3.446-.532.787-.8 1.82-.8 3.096v1.914h-8.449V15.18c0-2.041.434-3.815 1.306-5.325.872-1.51 2.467-3.118 4.785-4.82 2.233-1.594 3.7-2.89 4.402-3.889a5.582 5.582 0 0 0 1.087-3.35c0-1.382-.51-2.435-1.531-3.158-1.02-.723-2.45-1.087-4.28-1.087-3.19 0-6.826 1.047-10.91 3.131l-3.472-6.986c4.742-2.659 9.77-3.992 15.087-3.992Zm-1.88 37.324c1.765 0 3.124.472 4.08 1.408.98.936 1.47 2.276 1.47 4.02 0 1.68-.49 3.007-1.47 3.985-.977.957-2.336 1.435-4.08 1.435-1.787 0-3.171-.465-4.15-1.4-.978-.958-1.47-2.298-1.47-4.02 0-1.787.48-3.14 1.436-4.054.957-.915 2.355-1.374 4.184-1.374Z"),p(e,"viewBox","0 0 60.006 21.412"),p(e,"width","14"),p(e,"height","20"),p(e,"class","svelte-en2qvf")},m(n,r){j(n,e,r),I(e,t)},p:F,i:F,o:F,d(n){n&&G(e)}}}class qn extends Me{constructor(e){super(),xe(this,e,null,jn,Ee,{})}}function Zn(i){let e,t,n;return{c(){e=ae("svg"),t=ae("circle"),n=ae("path"),p(t,"cx","4.789"),p(t,"cy","4.787"),p(t,"r","3.85"),p(t,"class","svelte-1aq105l"),p(n,"d","M12.063 12.063 7.635 7.635"),p(n,"class","svelte-1aq105l"),p(e,"xmlns","http://www.w3.org/2000/svg"),p(e,"width","13"),p(e,"height","13"),p(e,"viewBox","0 0 13 13"),p(e,"class","svelte-1aq105l")},m(r,o){j(r,e,o),I(e,t),I(e,n)},p:F,i:F,o:F,d(r){r&&G(e)}}}class Qn extends Me{constructor(e){super(),xe(this,e,null,Zn,Ee,{})}}function Hn(i,e,t){const n=e[1],r=e[0],o=n-r;return i===n&&t?i:((i-r)%o+o)%o+r}function Qe(i){const e=[...i];return e[2]<e[0]&&(Math.abs((e[0]+e[2]+360)/2)>Math.abs((e[0]-360+e[2])/2)?e[0]-=360:e[2]+=360),e}let He;async function Vn(i,e,t){const n=i==null?void 0:i.getCenterAndZoom();for(const r of e??[])if(!(n&&(r.minZoom!=null&&r.minZoom>n[0]||r.maxZoom!=null&&r.maxZoom<n[0]))){if(r.type==="fixed")return r.coordinates.join(",");e:if(r.type==="client-geolocation"){if(He&&r.cachedLocationExpiry&&He.time+r.cachedLocationExpiry>Date.now()){if(!He.coords)break e;return He.coords}let o;try{return o=await new Promise((l,s)=>{t.signal.addEventListener("abort",()=>{s(Error("aborted"))}),navigator.geolocation.getCurrentPosition(c=>{l([c.coords.longitude,c.coords.latitude].map(u=>u.toFixed(6)).join(","))},c=>{s(c)},r)}),o}catch{}finally{r.cachedLocationExpiry&&(He={time:Date.now(),coords:o})}if(t.signal.aborted)return}if(r.type==="server-geolocation")return"ip";if(n&&r.type==="map-center")return n[1].toFixed(6)+","+n[2].toFixed(6)}}const Yn=/^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([6-9][0-9])\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([6-9][0-9])\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*(EAST|WEST|[EW])?$/i,ci=/^([+-]?[0-8]?[0-9])\s+([0-5]?[0-9]\.\d{3,})[\s,]{1,}([+-]?[0-1]?[0-9]?[0-9])\s+([0-5]?[0-9]\.\d{3,})$/,fi=/^(NORTH|SOUTH|[NS])?[\s]*([+-]?[0-8]?[0-9](?:[\.,]\d{3,}))[\s]*([•º°]?)[\s]*(NORTH|SOUTH|[NS])?[\s]*[,/;]?[\s]*(EAST|WEST|[EW])?[\s]*([+-]?[0-1]?[0-9]?[0-9](?:[\.,]\d{3,}))[\s]*([•º°]?)[\s]*(EAST|WEST|[EW])?$/i,di=/^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*(\.)\s*([0-5]?[0-9])\s*(\.)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*(\.)\s*([0-5]?[0-9])\s*(\.)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(EAST|WEST|[EW])?$/i,hi=/^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*(D(?:EG)?(?:REES)?)\s*([0-5]?[0-9])\s*(M(?:IN)?(?:UTES)?)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(S(?:EC)?(?:ONDS)?)?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*(D(?:EG)?(?:REES)?)\s*([0-5]?[0-9])\s*(M(?:IN)?(?:UTES)?)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(S(?:EC)?(?:ONDS)?)\s*(EAST|WEST|[EW])?$/i,gi=/^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([0-5]?[0-9](?:[\.,]\d{1,})?)?\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*,?((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(''|′′|’’|´´|["″”\.])?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([0-5]?[0-9](?:[\.,]\d{1,})?)?\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*,?((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(''|′′|´´|’’|["″”\.])?\s*(EAST|WEST|[EW])?$/i;function Xn(i){if(!["DMS","DM","DD"].includes(i))throw new Error("invalid format specified");if(this.decimalCoordinates&&this.decimalCoordinates.trim()){const e=this.decimalCoordinates.split(",").map(d=>Number(d.trim())),t=Number(e[0]),n=Number(e[1]),r=Math.abs(t),o=Math.abs(n),l=t>0?"N":"S",s=n>0?"E":"W";let c;i=="DD"&&(c=`${r}° ${l}, ${o}° ${s}`);const u=Math.floor(r),h=Math.floor(o),a=(r-u)*60,f=(o-h)*60;if(i=="DM"){let d=mi(a,3).toFixed(3).padStart(6,"0"),m=mi(f,3).toFixed(3).padStart(6,"0");d.endsWith(".000")&&m.endsWith(".000")&&(d=d.replace(/\.000$/,""),m=m.replace(/\.000$/,"")),c=`${u}° ${d}' ${l}, ${h}° ${m}' ${s}`}if(i=="DMS"){const d=Math.floor(a),m=Math.floor(f);let b=((a-d)*60).toFixed(1).padStart(4,"0"),v=((f-m)*60).toFixed(1).padStart(4,"0");const y=d.toString().padStart(2,"0"),E=m.toString().padStart(2,"0");b.endsWith(".0")&&v.endsWith(".0")&&(b=b.replace(/\.0$/,""),v=v.replace(/\.0$/,"")),c=`${u}° ${y}' ${b}" ${l}, ${h}° ${E}' ${v}" ${s}`}return c}else throw new Error("no decimal coordinates to convert")}function mi(i,e){const t=Math.pow(10,e);return Math.round((i+Number.EPSILON)*t)/t}function Et(i,e){e||(e=5),i=i.replace(/\s+/g," ").trim();let t=null,n=null,r="",o="",l=null,s=[],c=!1;if(Yn.test(i))throw new Error("invalid coordinate value");if(ci.test(i))if(s=ci.exec(i),c=Ve(s),c)t=Math.abs(s[1])+s[2]/60,Number(s[1])<0&&(t*=-1),n=Math.abs(s[3])+s[4]/60,Number(s[3])<0&&(n*=-1),l="DM";else throw new Error("invalid coordinate format");else if(fi.test(i))if(s=fi.exec(i),c=Ve(s),c){if(t=s[2],n=s[6],t.includes(",")&&(t=t.replace(",",".")),n.includes(",")&&(n=n.replace(",",".")),l="DD",Number(Math.round(t))==Number(t))throw new Error("integer only coordinate provided");if(Number(Math.round(n))==Number(n))throw new Error("integer only coordinate provided");s[1]?(r=s[1],o=s[5]):s[4]&&(r=s[4],o=s[8])}else throw new Error("invalid decimal coordinate format");else if(di.test(i))if(s=di.exec(i),c=Ve(s),c)t=Math.abs(parseInt(s[2])),s[4]&&(t+=s[4]/60,l="DM"),s[6]&&(t+=s[6].replace(",",".")/3600,l="DMS"),parseInt(s[2])<0&&(t=-1*t),n=Math.abs(parseInt(s[9])),s[11]&&(n+=s[11]/60),s[13]&&(n+=s[13].replace(",",".")/3600),parseInt(s[9])<0&&(n=-1*n),s[1]?(r=s[1],o=s[8]):s[7]&&(r=s[7],o=s[14]);else throw new Error("invalid DMS coordinates format");else if(hi.test(i))if(s=hi.exec(i),c=Ve(s),c)t=Math.abs(parseInt(s[2])),s[4]&&(t+=s[4]/60,l="DM"),s[6]&&(t+=s[6]/3600,l="DMS"),parseInt(s[2])<0&&(t=-1*t),n=Math.abs(parseInt(s[10])),s[12]&&(n+=s[12]/60),s[14]&&(n+=s[14]/3600),parseInt(s[10])<0&&(n=-1*n),s[1]?(r=s[1],o=s[9]):s[8]&&(r=s[8],o=s[16]);else throw new Error("invalid DMS coordinates format");else if(gi.test(i)){if(s=gi.exec(i),c=Ve(s),s.filter(u=>u).length<=5)throw new Error("invalid coordinates format");if(c)t=Math.abs(parseInt(s[2])),s[4]&&(t+=s[4].replace(",",".")/60,l="DM"),s[6]&&(t+=s[6].replace(",",".")/3600,l="DMS"),parseInt(s[2])<0&&(t=-1*t),n=Math.abs(parseInt(s[10])),s[12]&&(n+=s[12].replace(",",".")/60),s[14]&&(n+=s[14].replace(",",".")/3600),parseInt(s[10])<0&&(n=-1*n),s[1]?(r=s[1],o=s[9]):s[8]&&(r=s[8],o=s[16]);else throw new Error("invalid coordinates format")}if(c){if(Math.abs(n)>=180)throw new Error("invalid longitude value");if(Math.abs(t)>=90)throw new Error("invalid latitude value");if(r&&!o||!r&&o)throw new Error("invalid coordinates value");if(r&&r==o)throw new Error("invalid coordinates format");t.toString().includes(",")&&(t=t.replace(",",".")),n.toString().includes(",")&&(n=n.replace(",","."));let u=/S|SOUTH/i;u.test(r)&&t>0&&(t=-1*t),u=/W|WEST/i,u.test(o)&&n>0&&(n=-1*n);const h=s[0].trim();let a,f;const d=/[,/;\u0020]/g,m=h.match(d);if(m==null){const y=Math.floor(i.length/2);a=h.substring(0,y).trim(),f=h.substring(y).trim()}else{let y;m.length%2==1?y=Math.floor(m.length/2):y=m.length/2-1;let E=0;if(y==0)E=h.indexOf(m[0]),a=h.substring(0,E).trim(),f=h.substring(E+1).trim();else{let _=0,L=0;for(;_<=y;)E=h.indexOf(m[_],L),L=E+1,_++;a=h.substring(0,E).trim(),f=h.substring(E+1).trim()}}const b=a.split(".");if(b.length==2&&b[1]==0&&b[1].length!=2)throw new Error("invalid coordinates format");const v=f.split(".");if(v.length==2&&v[1]==0&&v[1].length!=2)throw new Error("invalid coordinates format");if(/^\d+$/.test(a)||/^\d+$/.test(f))throw new Error("degree only coordinate/s provided");return t=Number(Number(t).toFixed(e)),n=Number(Number(n).toFixed(e)),Object.freeze({verbatimCoordinates:h,verbatimLatitude:a,verbatimLongitude:f,decimalLatitude:t,decimalLongitude:n,decimalCoordinates:`${t},${n}`,originalFormat:l,closeEnough:Kn,toCoordinateFormat:Xn})}else throw new Error("coordinates pattern match failed")}function Ve(i){if(!isNaN(i[0]))return!1;const e=[...i];if(e.shift(),e.length%2>0)return!1;const t=/^[-+]?\d+([\.,]\d+)?$/,n=/[eastsouthnorthwest]+/i,r=e.length/2;for(let o=0;o<r;o++){const l=e[o],s=e[o+r],c=t.test(l)&&t.test(s),u=n.test(l)&&n.test(s),h=l==s;if(!(l==null&&s==null)){if(l==null||s==null)return!1;if(c||u||h)continue;return!1}}return!0}function pi(i,e){const t=Math.abs(i-e);return Number(t.toFixed(6))<=1e-5}function Kn(i){if(!i)throw new Error("coords must be provided");if(i.includes(",")){const e=i.split(",");if(Number(e[0])==NaN||Number(e[1])==NaN)throw new Error("coords are not valid decimals");return pi(this.decimalLatitude,Number(e[0]))&&pi(this.decimalLongitude,e[1])}else throw new Error("coords being tested must be separated by a comma")}const Jn=Object.freeze({DMS:"DMS",DM:"DM",DD:"DD"});Et.to=Jn;const $n=[{verbatimCoordinates:"40.123, -74.123",verbatimLatitude:"40.123",verbatimLongitude:"-74.123"},{verbatimCoordinates:"40.123° N 74.123° W",verbatimLatitude:"40.123° N",verbatimLongitude:"74.123° W"},{verbatimCoordinates:"40.123° N 74.123° W",verbatimLatitude:"40.123° N",verbatimLongitude:"74.123° W"},{verbatimCoordinates:'40° 7´ 22.8" N 74° 7´ 22.8" W',verbatimLatitude:'40° 7´ 22.8" N',verbatimLongitude:'74° 7´ 22.8" W'},{verbatimCoordinates:"40° 7.38’ , -74° 7.38’",verbatimLatitude:"40° 7.38’",verbatimLongitude:"-74° 7.38’"},{verbatimCoordinates:"N40°7’22.8’’, W74°7’22.8’’",verbatimLatitude:"N40°7’22.8’’",verbatimLongitude:"W74°7’22.8’’"},{verbatimCoordinates:'40°7’22.8"N, 74°7’22.8"W',verbatimLatitude:'40°7’22.8"N',verbatimLongitude:'74°7’22.8"W'},{verbatimCoordinates:`40°7'22.8"N, 74°7'22.8"W`,verbatimLatitude:`40°7'22.8"N`,verbatimLongitude:`74°7'22.8"W`},{verbatimCoordinates:"40 7 22.8, -74 7 22.8",verbatimLatitude:"40 7 22.8",verbatimLongitude:"-74 7 22.8"},{verbatimCoordinates:"40.123 -74.123",verbatimLatitude:"40.123",verbatimLongitude:"-74.123"},{verbatimCoordinates:"40.123°,-74.123°",verbatimLatitude:"40.123°",verbatimLongitude:"-74.123°"},{verbatimCoordinates:"40.123N74.123W",verbatimLatitude:"40.123N",verbatimLongitude:"74.123W"},{verbatimCoordinates:"4007.38N7407.38W",verbatimLatitude:"4007.38N",verbatimLongitude:"7407.38W"},{verbatimCoordinates:'40°7’22.8"N, 74°7’22.8"W',verbatimLatitude:'40°7’22.8"N',verbatimLongitude:'74°7’22.8"W'},{verbatimCoordinates:"400722.8N740722.8W",verbatimLatitude:"400722.8N",verbatimLongitude:"740722.8W"},{verbatimCoordinates:"N 40 7.38 W 74 7.38",verbatimLatitude:"N 40 7.38",verbatimLongitude:"W 74 7.38"},{verbatimCoordinates:"40:7:22.8N 74:7:22.8W",verbatimLatitude:"40:7:22.8N",verbatimLongitude:"74:7:22.8W"},{verbatimCoordinates:"40:7:23N,74:7:23W",verbatimLatitude:"40:7:23N",verbatimLongitude:"74:7:23W",decimalLatitude:40.1230555555,decimalLongitude:-74.1230555555},{verbatimCoordinates:'40°7’23"N 74°7’23"W',verbatimLatitude:'40°7’23"N',verbatimLongitude:'74°7’23"W',decimalLatitude:40.1230555555,decimalLongitude:-74.12305555555555},{verbatimCoordinates:'40°7’23"S 74°7’23"E',verbatimLatitude:'40°7’23"S',verbatimLongitude:'74°7’23"E',decimalLatitude:-40.1230555555,decimalLongitude:74.12305555555555},{verbatimCoordinates:'40°7’23" -74°7’23"',verbatimLatitude:'40°7’23"',verbatimLongitude:'-74°7’23"',decimalLatitude:40.1230555555,decimalLongitude:-74.123055555},{verbatimCoordinates:'40d 7’ 23" N 74d 7’ 23" W',verbatimLatitude:'40d 7’ 23" N',verbatimLongitude:'74d 7’ 23" W',decimalLatitude:40.1230555555,decimalLongitude:-74.123055555},{verbatimCoordinates:"40.123N 74.123W",verbatimLatitude:"40.123N",verbatimLongitude:"74.123W"},{verbatimCoordinates:"40° 7.38, -74° 7.38",verbatimLatitude:"40° 7.38",verbatimLongitude:"-74° 7.38"},{verbatimCoordinates:"40° 7.38, -74° 7.38",verbatimLatitude:"40° 7.38",verbatimLongitude:"-74° 7.38"},{verbatimCoordinates:"40 7 22.8; -74 7 22.8",verbatimLatitude:"40 7 22.8",verbatimLongitude:"-74 7 22.8"}],er={decimalLatitude:40.123,decimalLongitude:-74.123},tr=[{verbatimCoordinates:`50°4'17.698"south, 14°24'2.826"east`,verbatimLatitude:`50°4'17.698"south`,verbatimLongitude:`14°24'2.826"east`,decimalLatitude:-50.07158277777778,decimalLongitude:14.400785},{verbatimCoordinates:"50d4m17.698S 14d24m2.826E",verbatimLatitude:"50d4m17.698S",verbatimLongitude:"14d24m2.826E",decimalLatitude:-50.07158277777778,decimalLongitude:14.400785},{verbatimCoordinates:"40:26:46N,79:56:55W",verbatimLatitude:"40:26:46N",verbatimLongitude:"79:56:55W",decimalLatitude:40.44611111111111,decimalLongitude:-79.9486111111111},{verbatimCoordinates:"40:26:46.302N 79:56:55.903W",verbatimLatitude:"40:26:46.302N",verbatimLongitude:"79:56:55.903W",decimalLatitude:40.446195,decimalLongitude:-79.94886194444445},{verbatimCoordinates:"40°26′47″N 79°58′36″W",verbatimLatitude:"40°26′47″N",verbatimLongitude:"79°58′36″W",decimalLatitude:40.44638888888889,decimalLongitude:-79.97666666666667},{verbatimCoordinates:"40d 26′ 47″ N 79d 58′ 36″ W",verbatimLatitude:"40d 26′ 47″ N",verbatimLongitude:"79d 58′ 36″ W",decimalLatitude:40.44638888888889,decimalLongitude:-79.97666666666667},{verbatimCoordinates:"40.446195N 79.948862W",verbatimLatitude:"40.446195N",verbatimLongitude:"79.948862W",decimalLatitude:40.446195,decimalLongitude:-79.948862},{verbatimCoordinates:"40,446195° 79,948862°",verbatimLatitude:"40,446195°",verbatimLongitude:"79,948862°",decimalLatitude:40.446195,decimalLongitude:79.948862},{verbatimCoordinates:"40° 26.7717, -79° 56.93172",verbatimLatitude:"40° 26.7717",verbatimLongitude:"-79° 56.93172",decimalLatitude:40.446195,decimalLongitude:-79.948862},{verbatimCoordinates:"40.446195, -79.948862",verbatimLatitude:"40.446195",verbatimLongitude:"-79.948862",decimalLatitude:40.446195,decimalLongitude:-79.948862},{verbatimCoordinates:"40.123256; -74.123256",verbatimLatitude:"40.123256",verbatimLongitude:"-74.123256",decimalLatitude:40.123256,decimalLongitude:-74.123256},{verbatimCoordinates:"18°24S 22°45E",verbatimLatitude:"18°24S",verbatimLongitude:"22°45E",decimalLatitude:-18.4,decimalLongitude:22.75}],ir=[{verbatimCoordinates:"10.432342S 10.6345345E",verbatimLatitude:"10.432342S",verbatimLongitude:"10.6345345E",decimalLatitude:-10.432342,decimalLongitude:10.6345345},{verbatimCoordinates:"10.00S 10.00E",verbatimLatitude:"10.00S",verbatimLongitude:"10.00E",decimalLatitude:-10,decimalLongitude:10},{verbatimCoordinates:"00.00S 01.00E",verbatimLatitude:"00.00S",verbatimLongitude:"01.00E",decimalLatitude:0,decimalLongitude:1},{verbatimCoordinates:"18.24S 22.45E",verbatimLatitude:"18.24S",verbatimLongitude:"22.45E",decimalLatitude:-18.4,decimalLongitude:22.75},{verbatimCoordinates:"27deg 15min 45.2sec S 18deg 32min 53.7sec E",verbatimLatitude:"27deg 15min 45.2sec S",verbatimLongitude:"18deg 32min 53.7sec E",decimalLatitude:-27.262555555555554,decimalLongitude:18.54825},{verbatimCoordinates:"-23.3245° S / 28.2344° E",verbatimLatitude:"-23.3245° S",verbatimLongitude:"28.2344° E",decimalLatitude:-23.3245,decimalLongitude:28.2344},{verbatimCoordinates:"40° 26.7717 -79° 56.93172",verbatimLatitude:"40° 26.7717",verbatimLongitude:"-79° 56.93172",decimalLatitude:40.446195,decimalLongitude:-79.948862},{verbatimCoordinates:"27.15.45S 18.32.53E",verbatimLatitude:"27.15.45S",verbatimLongitude:"18.32.53E",decimalLatitude:-27.2625,decimalLongitude:18.548055},{verbatimCoordinates:"-27.15.45 18.32.53",verbatimLatitude:"-27.15.45",verbatimLongitude:"18.32.53",decimalLatitude:-27.2625,decimalLongitude:18.548055},{verbatimCoordinates:"27.15.45.2S 18.32.53.4E",verbatimLatitude:"27.15.45.2S",verbatimLongitude:"18.32.53.4E",decimalLatitude:-27.262556,decimalLongitude:18.548167},{verbatimCoordinates:"27.15.45,2S 18.32.53,4E",verbatimLatitude:"27.15.45,2S",verbatimLongitude:"18.32.53,4E",decimalLatitude:-27.262556,decimalLongitude:18.548167},{verbatimCoordinates:"S23.43563 ° E22.45634 °",verbatimLatitude:"S23.43563 °",verbatimLongitude:"E22.45634 °",decimalLatitude:-23.43563,decimalLongitude:22.45634},{verbatimCoordinates:"27,71372° S 23,07771° E",verbatimLatitude:"27,71372° S",verbatimLongitude:"23,07771° E",decimalLatitude:-27.71372,decimalLongitude:23.07771},{verbatimCoordinates:"27.45.34 S 23.23.23 E",verbatimLatitude:"27.45.34 S",verbatimLongitude:"23.23.23 E",decimalLatitude:-27.759444,decimalLongitude:23.38972222},{verbatimCoordinates:"S 27.45.34 E 23.23.23",verbatimLatitude:"S 27.45.34",verbatimLongitude:"E 23.23.23",decimalLatitude:-27.759444,decimalLongitude:23.38972222},{verbatimCoordinates:"53 16.3863,4 52.8171",verbatimLatitude:"53 16.3863",verbatimLongitude:"4 52.8171",decimalLatitude:53.273105,decimalLongitude:4.88029},{verbatimCoordinates:"50 8.2914,-5 2.4447",verbatimLatitude:"50 8.2914",verbatimLongitude:"-5 2.4447",decimalLatitude:50.13819,decimalLongitude:-5.040745},{verbatimCoordinates:"N 48° 30,6410', E 18° 57,4583'",verbatimLatitude:"N 48° 30,6410'",verbatimLongitude:"E 18° 57,4583'",decimalLatitude:48.51068,decimalLongitude:18.95764},{verbatimCoordinates:"1.23456, 18.33453",verbatimLatitude:"1.23456",verbatimLongitude:"18.33453",decimalLatitude:1.23456,decimalLongitude:18.33453}];function nr(){const i=[];return $n.forEach(e=>{e.decimalLatitude?i.push(e):i.push({...e,...er})}),[...i,...tr,...ir]}const rr=nr();Et.formats=rr.map(i=>i.verbatimCoordinates);const or=Et;function yi(i,e,t){const n=i.slice();return n[91]=e[t],n[93]=t,n}function bi(i){let e,t;return e=new Dn({}),{c(){Se(e.$$.fragment)},m(n,r){be(e,n,r),t=!0},i(n){t||(Q(e.$$.fragment,n),t=!0)},o(n){X(e.$$.fragment,n),t=!1},d(n){ve(e,n)}}}function vi(i){let e,t,n,r,o;return t=new qn({}),{c(){e=D("button"),Se(t.$$.fragment),p(e,"type","button"),p(e,"title",i[10]),p(e,"class","svelte-bz0zu3"),ge(e,"active",i[0])},m(l,s){j(l,e,s),be(t,e,null),n=!0,r||(o=Y(e,"click",i[76]),r=!0)},p(l,s){(!n||s[0]&1024)&&p(e,"title",l[10]),(!n||s[0]&1)&&ge(e,"active",l[0])},i(l){n||(Q(t.$$.fragment,l),n=!0)},o(l){X(t.$$.fragment,l),n=!1},d(l){l&&G(e),ve(t),r=!1,o()}}}function sr(i){let e,t=[],n=new Map,r,o,l,s=si(i[13]);const c=u=>u[91].id+(u[91].address?","+u[91].address:"");for(let u=0;u<s.length;u+=1){let h=yi(i,s,u),a=c(h);n.set(a,t[u]=_i(a,h))}return{c(){e=D("ul");for(let u=0;u<t.length;u+=1)t[u].c();p(e,"class","options svelte-bz0zu3"),p(e,"role","listbox")},m(u,h){j(u,e,h);for(let a=0;a<t.length;a+=1)t[a]&&t[a].m(e,null);r=!0,o||(l=[Y(e,"mouseleave",i[27]),Y(e,"blur",i[80]),Y(e,"keydown",i[23])],o=!0)},p(u,h){h[0]&102823936&&(s=si(u[13]),rt(),t=En(t,h,c,1,u,s,n,e,wn,_i,null,yi),ot())},i(u){if(!r){for(let h=0;h<s.length;h+=1)Q(t[h]);r=!0}},o(u){for(let h=0;h<t.length;h+=1)X(t[h]);r=!1},d(u){u&&G(e);for(let h=0;h<t.length;h+=1)t[h].d();o=!1,ye(l)}}}function lr(i){let e,t,n,r,o,l;return t=new ui({}),{c(){e=D("div"),Se(t.$$.fragment),n=ne(),r=D("div"),o=Le(i[8]),p(r,"class","svelte-bz0zu3"),p(e,"class","no-results svelte-bz0zu3")},m(s,c){j(s,e,c),be(t,e,null),I(e,n),I(e,r),I(r,o),l=!0},p(s,c){(!l||c[0]&256)&&je(o,s[8])},i(s){l||(Q(t.$$.fragment,s),l=!0)},o(s){X(t.$$.fragment,s),l=!1},d(s){s&&G(e),ve(t)}}}function ur(i){let e="",t;return{c(){t=Le(e)},m(n,r){j(n,t,r)},p:F,i:F,o:F,d(n){n&&G(t)}}}function ar(i){let e,t,n,r,o,l,s,c,u,h,a;return t=new ui({}),c=new li({}),{c(){e=D("div"),Se(t.$$.fragment),n=ne(),r=D("div"),o=Le(i[7]),l=ne(),s=D("button"),Se(c.$$.fragment),p(r,"class","svelte-bz0zu3"),p(s,"class","svelte-bz0zu3"),p(e,"class","error svelte-bz0zu3")},m(f,d){j(f,e,d),be(t,e,null),I(e,n),I(e,r),I(r,o),I(e,l),I(e,s),be(c,s,null),u=!0,h||(a=Y(s,"click",i[77]),h=!0)},p(f,d){(!u||d[0]&128)&&je(o,f[7])},i(f){u||(Q(t.$$.fragment,f),Q(c.$$.fragment,f),u=!0)},o(f){X(t.$$.fragment,f),X(c.$$.fragment,f),u=!1},d(f){f&&G(e),ve(t),ve(c),h=!1,a()}}}function _i(i,e){var s;let t,n,r;function o(){return e[78](e[93])}function l(){return e[79](e[91])}return n=new Wn({props:{feature:e[91],showPlaceType:e[11],style:e[15]===e[93]?"selected":((s=e[14])==null?void 0:s.id)===e[91].id?"picked":"default",missingIconsCache:e[21],iconsBaseUrl:e[12]}}),n.$on("mouseenter",o),n.$on("select",l),{key:i,first:null,c(){t=fn(),Se(n.$$.fragment),this.first=t},m(c,u){j(c,t,u),be(n,c,u),r=!0},p(c,u){var a;e=c;const h={};u[0]&8192&&(h.feature=e[91]),u[0]&2048&&(h.showPlaceType=e[11]),u[0]&57344&&(h.style=e[15]===e[93]?"selected":((a=e[14])==null?void 0:a.id)===e[91].id?"picked":"default"),u[0]&4096&&(h.iconsBaseUrl=e[12]),n.$set(h)},i(c){r||(Q(n.$$.fragment,c),r=!0)},o(c){X(n.$$.fragment,c),r=!1},d(c){c&&G(t),ve(n,c)}}}function cr(i){let e,t,n,r,o,l,s,c,u,h,a,f,d,m,b,v,y,E,_,L,P,N=!1;o=new Qn({}),a=new li({});let x=i[20]&&bi(),S=i[6]==="button"&&vi(i);const T=i[67].default,w=ln(T,i,i[66],null),M=[ar,ur,lr,sr],R=[];function te(C,W){var fe,Z;return C[19]?0:!C[16]&&!C[4]?1:((fe=C[13])==null?void 0:fe.length)===0?2:(Z=C[13])!=null&&Z.length&&(C[16]||C[4])?3:-1}return~(v=te(i))&&(y=R[v]=M[v](i)),{c(){e=ne(),t=D("form"),n=D("div"),r=D("button"),Se(o.$$.fragment),l=ne(),s=D("input"),c=ne(),u=D("div"),h=D("button"),Se(a.$$.fragment),f=ne(),x&&x.c(),d=ne(),S&&S.c(),m=ne(),w&&w.c(),b=ne(),y&&y.c(),p(r,"class","search-button svelte-bz0zu3"),p(r,"type","button"),p(s,"placeholder",i[9]),p(s,"aria-label",i[9]),p(s,"class","svelte-bz0zu3"),p(h,"type","button"),p(h,"title",i[3]),p(h,"class","svelte-bz0zu3"),p(u,"class","clear-button-container svelte-bz0zu3"),ge(u,"displayable",i[1]!==""),p(n,"class","input-group svelte-bz0zu3"),p(t,"class",E=it(i[2])+" svelte-bz0zu3"),ge(t,"can-collapse",i[5]&&i[1]==="")},m(C,W){j(C,e,W),j(C,t,W),I(t,n),I(n,r),be(o,r,null),I(n,l),I(n,s),i[69](s),ti(s,i[1]),I(n,c),I(n,u),I(u,h),be(a,h,null),I(u,f),x&&x.m(u,null),I(n,d),S&&S.m(n,null),I(n,m),w&&w.m(n,null),I(t,b),~v&&R[v].m(t,null),_=!0,L||(P=[Y(r,"click",i[68]),Y(s,"input",i[70]),Y(s,"focus",i[71]),Y(s,"blur",i[72]),Y(s,"click",i[73]),Y(s,"keydown",i[23]),Y(s,"input",i[24]),Y(s,"change",i[74]),Y(h,"click",i[75]),Y(t,"submit",dn(i[22]))],L=!0)},p(C,W){(!_||W[0]&512)&&p(s,"placeholder",C[9]),(!_||W[0]&512)&&p(s,"aria-label",C[9]),W[0]&2&&s.value!==C[1]&&ti(s,C[1]),(!_||W[0]&8)&&p(h,"title",C[3]),C[20]?x?W[0]&1048576&&Q(x,1):(x=bi(),x.c(),Q(x,1),x.m(u,null)):x&&(rt(),X(x,1,1,()=>{x=null}),ot()),(!_||W[0]&2)&&ge(u,"displayable",C[1]!==""),C[6]==="button"?S?(S.p(C,W),W[0]&64&&Q(S,1)):(S=vi(C),S.c(),Q(S,1),S.m(n,m)):S&&(rt(),X(S,1,1,()=>{S=null}),ot()),w&&w.p&&(!_||W[2]&16)&&an(w,T,C,C[66],_?un(T,C[66],W,null):cn(C[66]),null);let fe=v;v=te(C),v===fe?~v&&R[v].p(C,W):(y&&(rt(),X(R[fe],1,1,()=>{R[fe]=null}),ot()),~v?(y=R[v],y?y.p(C,W):(y=R[v]=M[v](C),y.c()),Q(y,1),y.m(t,null)):y=null),(!_||W[0]&4&&E!==(E=it(C[2])+" svelte-bz0zu3"))&&p(t,"class",E),(!_||W[0]&38)&&ge(t,"can-collapse",C[5]&&C[1]==="")},i(C){_||(Q(N),Q(o.$$.fragment,C),Q(a.$$.fragment,C),Q(x),Q(S),Q(w,C),Q(y),_=!0)},o(C){X(N),X(o.$$.fragment,C),X(a.$$.fragment,C),X(x),X(S),X(w,C),X(y),_=!1},d(C){C&&(G(e),G(t)),ve(o),i[69](null),ve(a),x&&x.d(),S&&S.d(),w&&w.d(C),~v&&R[v].d(),L=!1,ye(P)}}}function fr(i,e,t){let n,r,o,{$$slots:l={},$$scope:s}=e;const c={continental_marine:4,country:4,major_landform:8,region:5,subregion:6,county:7,joint_municipality:8,joint_submunicipality:9,municipality:10,municipal_district:11,locality:12,neighbourhood:13,place:14,postal_code:14,road:16,poi:17,address:18,"poi.peak":15,"poi.shop":18,"poi.cafe":18,"poi.restaurant":18,"poi.aerodrome":13};let{class:u=void 0}=e,{apiKey:h}=e,{bbox:a=void 0}=e,{clearButtonTitle:f="clear"}=e,{clearOnBlur:d=!1}=e,{clearListOnPick:m=!1}=e,{keepListOpen:b=!1}=e,{collapsed:v=!1}=e,{country:y=void 0}=e,{debounceSearch:E=200}=e,{enableReverse:_="never"}=e,{errorMessage:L="Something went wrong…"}=e,{filter:P=()=>!0}=e,{flyTo:N=!0}=e,{fuzzyMatch:x=!0}=e,{language:S=void 0}=e,{limit:T=void 0}=e,{mapController:w=void 0}=e,{minLength:M=2}=e,{noResultsMessage:R="Oops! Looks like you're trying to predict something that's not quite right. We can't seem to find what you're looking for. Maybe try double-checking your spelling or try a different search term. Keep on typing - we'll do our best to get you where you need to go!"}=e,{placeholder:te="Search"}=e,{proximity:C=[{type:"server-geolocation"}]}=e,{reverseActive:W=_==="always"}=e,{reverseButtonTitle:fe="toggle reverse geocoding"}=e,{searchValue:Z=""}=e,{pickedResultStyle:at="full-geometry"}=e,{showPlaceType:Yi="if-needed"}=e,{showResultsWhileTyping:ct=!0}=e,{selectFirst:Ue=!0}=e,{flyToSelected:ft=!1}=e,{markerOnSelected:dt=!0}=e,{types:Ie=void 0}=e,{exhaustiveReverseGeocoding:zt=!1}=e,{excludeTypes:ht=!1}=e,{zoom:gt=c}=e,{apiUrl:At="https://api.maptiler.com/geocoding"}=e,{fetchParameters:Wt={}}=e,{iconsBaseUrl:Xi="https://cdn.maptiler.com/maptiler-geocoding-control/v2.1.0-rc1/icons/"}=e,{adjustUrlQuery:Bt=()=>{}}=e,{adjustUrl:Dt=()=>{}}=e;function Vr(g){de.focus(g)}function Yr(){de.blur()}function Ki(g,q=!0,H=!1){t(1,Z=g),q?(t(15,B=-1),$i()):(en(void 0,!H,H),setTimeout(()=>{de.focus(),de.select()}))}function Xr(){t(13,O=void 0),t(14,k=void 0),t(15,B=-1)}function Kr(){t(61,V=[]),t(14,k=void 0)}let O,V,k,Ji="",de,B=-1,me,mt=[],ze,Fe,Ge,Ut,we=!1;const Jr=new Set,Te=ni();mn(()=>{w&&(w.setEventHandler(void 0),w.indicateReverse(!1),w.setSelectedMarker(-1),w.setFeatures(void 0,void 0,!1))});function $i(g){if(t(17,we=!1),Fe&&(clearTimeout(Fe),Fe=void 0),B>-1&&O)t(14,k=O[B]),t(1,Z=k.place_type[0]==="reverse"?k.place_name:k.place_name.replace(/,.*/,"")),t(19,me=void 0),t(61,V=void 0),t(15,B=-1);else if(Z){const q=g||!Ft(Z);Gt(Z,{exact:!0}).then(()=>{t(61,V=O),t(14,k=void 0),q&&$r()}).catch(H=>t(19,me=H))}}function Ft(g){try{return or(g,6)}catch{return!1}}async function Gt(g,{byId:q=!1,exact:H=!1}={}){var se,pe;t(19,me=void 0),ze==null||ze.abort();const oe=new AbortController;t(20,ze=oe);try{const z=Ft(g),Zt=new URL(At+"/"+encodeURIComponent(z?z.decimalLongitude+","+z.decimalLatitude:g)+".json"),he=Zt.searchParams;if(S!==void 0&&he.set("language",Array.isArray(S)?S.join(","):S??""),Ie&&he.set("types",Ie.join(",")),ht&&he.set("excludeTypes",String(ht)),a&&he.set("bbox",a.map(yt=>yt.toFixed(6)).join(",")),y&&he.set("country",Array.isArray(y)?y.join(","):y),!q&&!z){const yt=await Vn(w,C,oe);yt&&he.set("proximity",yt),(H||!ct)&&he.set("autocomplete","false"),he.set("fuzzyMatch",String(x))}T!==void 0&&(zt||!z||(Ie==null?void 0:Ie.length)===1)&&he.set("limit",String(T)),he.set("key",h),Bt(he),Dt(Zt);const pt=Zt.toString();if(pt===Ji){q?(m&&t(13,O=void 0),t(14,k=mt[0])):(t(13,O=mt),((se=O[B])==null?void 0:se.id)!==(r==null?void 0:r.id)&&t(15,B=-1));return}Ji=pt;const Qt=await fetch(pt,{signal:oe.signal,...Wt});if(!Qt.ok)throw new Error(await Qt.text());const Ht=await Qt.json();Te("response",{url:pt,featureCollection:Ht}),q?(m&&t(13,O=void 0),t(14,k=Ht.features[0]),mt=[k]):(t(13,O=Ht.features.filter(P)),z&&O.unshift({type:"Feature",properties:{},id:"reverse_"+z.decimalLongitude+"_"+z.decimalLatitude,text:z.decimalLatitude+", "+z.decimalLongitude,place_name:z.decimalLatitude+", "+z.decimalLongitude,place_type:["reverse"],center:[z.decimalLongitude,z.decimalLatitude],bbox:[z.decimalLongitude,z.decimalLatitude,z.decimalLongitude,z.decimalLatitude],geometry:{type:"Point",coordinates:[z.decimalLongitude,z.decimalLatitude]}}),mt=O,((pe=O[B])==null?void 0:pe.id)!==(r==null?void 0:r.id)&&t(15,B=-1),z&&de.focus())}catch(z){if(z&&typeof z=="object"&&"name"in z&&z.name==="AbortError")return;throw z}finally{oe===ze&&t(20,ze=void 0)}}function $r(){var oe;if(!(V!=null&&V.length)||!N)return;const g=[180,90,-180,-90],q=!V.some(se=>!se.matching_text);let H;for(const se of V){const pe=et(se);if(H=H===void 0?pe:pe===void 0?H:Math.max(H,pe),q||!se.matching_text)for(const z of[0,1,2,3])g[z]=Math[z<2?"min":"max"](g[z],((oe=se.bbox)==null?void 0:oe[z])??se.center[z%2])}w&&V.length>0&&(k&&g[0]===g[2]&&g[1]===g[3]?w.flyTo(k.center,et(k)):w.fitBounds(Qe(g),50,H))}function jt(){!k||!w||(!k.bbox||k.bbox[0]===k.bbox[2]&&k.bbox[1]===k.bbox[3]?w.flyTo(k.center,et(k)):w.fitBounds(Qe(k.bbox),50,et(k)))}function et(g){var H;if(!g.bbox||g.bbox[0]!==g.bbox[2]&&g.bbox[1]!==g.bbox[3])return;const q=g.id.replace(/\..*/,"");return(Array.isArray((H=g.properties)==null?void 0:H.categories)?g.properties.categories.reduce((oe,se)=>{const pe=gt[q+"."+se];return oe===void 0?pe:pe===void 0?oe:Math.max(oe,pe)},void 0):void 0)??gt[q]}function eo(g){t(0,W=_==="always"),t(13,O=void 0),t(14,k=void 0),t(15,B=-1),Ki(g[1].toFixed(6)+", "+Hn(g[0],[-180,180],!0).toFixed(6),!1,!0)}function to(g){if(!O)return;let q=g.key==="ArrowDown"?1:g.key==="ArrowUp"?-1:0;q&&(de.focus(),t(17,we=!0),g.preventDefault(),k&&B===-1&&t(15,B=O.findIndex(H=>H.id===(k==null?void 0:k.id))),B===(k||Ue?0:-1)&&q===-1&&t(15,B=O.length),t(15,B+=q),B>=O.length&&t(15,B=-1),B<0&&(k||Ue)&&t(15,B=0))}function en(g,q=!0,H=!1){if(t(19,me=void 0),t(14,k=void 0),t(17,we=!0),ct||H){if(Fe&&clearTimeout(Fe),Z.length<M)return;const oe=Z;Fe=window.setTimeout(()=>{Gt(oe).catch(se=>t(19,me=se))},q?E:0)}else t(13,O=void 0),t(19,me=void 0)}function qt(g){k&&(k==null?void 0:k.id)===(g==null?void 0:g.id)?jt():(t(14,k=g),t(1,Z=g.place_name))}function tn(g){t(15,B=g)}function io(){(!Ue||k)&&t(15,B=-1),ft&&jt()}const no=()=>de.focus();function ro(g){bt[g?"unshift":"push"](()=>{de=g,t(18,de)})}function oo(){Z=this.value,t(1,Z),t(17,we),t(31,d),t(16,Ge)}const so=()=>t(17,we=!0),lo=()=>t(17,we=!1),uo=()=>t(17,we=!0),ao=()=>t(14,k=void 0),co=()=>{t(1,Z=""),de.focus()},fo=()=>t(0,W=!W),ho=()=>t(19,me=void 0),go=g=>tn(g),mo=g=>qt(g),po=()=>{};return i.$$set=g=>{"class"in g&&t(2,u=g.class),"apiKey"in g&&t(29,h=g.apiKey),"bbox"in g&&t(30,a=g.bbox),"clearButtonTitle"in g&&t(3,f=g.clearButtonTitle),"clearOnBlur"in g&&t(31,d=g.clearOnBlur),"clearListOnPick"in g&&t(32,m=g.clearListOnPick),"keepListOpen"in g&&t(4,b=g.keepListOpen),"collapsed"in g&&t(5,v=g.collapsed),"country"in g&&t(33,y=g.country),"debounceSearch"in g&&t(34,E=g.debounceSearch),"enableReverse"in g&&t(6,_=g.enableReverse),"errorMessage"in g&&t(7,L=g.errorMessage),"filter"in g&&t(35,P=g.filter),"flyTo"in g&&t(36,N=g.flyTo),"fuzzyMatch"in g&&t(37,x=g.fuzzyMatch),"language"in g&&t(38,S=g.language),"limit"in g&&t(39,T=g.limit),"mapController"in g&&t(40,w=g.mapController),"minLength"in g&&t(41,M=g.minLength),"noResultsMessage"in g&&t(8,R=g.noResultsMessage),"placeholder"in g&&t(9,te=g.placeholder),"proximity"in g&&t(42,C=g.proximity),"reverseActive"in g&&t(0,W=g.reverseActive),"reverseButtonTitle"in g&&t(10,fe=g.reverseButtonTitle),"searchValue"in g&&t(1,Z=g.searchValue),"pickedResultStyle"in g&&t(43,at=g.pickedResultStyle),"showPlaceType"in g&&t(11,Yi=g.showPlaceType),"showResultsWhileTyping"in g&&t(44,ct=g.showResultsWhileTyping),"selectFirst"in g&&t(45,Ue=g.selectFirst),"flyToSelected"in g&&t(46,ft=g.flyToSelected),"markerOnSelected"in g&&t(47,dt=g.markerOnSelected),"types"in g&&t(48,Ie=g.types),"exhaustiveReverseGeocoding"in g&&t(49,zt=g.exhaustiveReverseGeocoding),"excludeTypes"in g&&t(50,ht=g.excludeTypes),"zoom"in g&&t(51,gt=g.zoom),"apiUrl"in g&&t(52,At=g.apiUrl),"fetchParameters"in g&&t(53,Wt=g.fetchParameters),"iconsBaseUrl"in g&&t(12,Xi=g.iconsBaseUrl),"adjustUrlQuery"in g&&t(54,Bt=g.adjustUrlQuery),"adjustUrl"in g&&t(55,Dt=g.adjustUrl),"$$scope"in g&&t(66,s=g.$$scope)},i.$$.update=()=>{if(i.$$.dirty[0]&64&&t(0,W=_==="always"),i.$$.dirty[0]&16384|i.$$.dirty[1]&4096&&at!=="marker-only"&&k&&!k.address&&k.geometry.type==="Point"&&k.place_type[0]!=="reverse"&&Gt(k.id,{byId:!0}).catch(g=>t(19,me=g)),i.$$.dirty[0]&16384|i.$$.dirty[1]&546|i.$$.dirty[2]&1&&(w&&k&&k.id!==Ut&&N&&(jt(),m&&t(13,O=void 0),t(61,V=void 0),t(15,B=-1)),t(62,Ut=k==null?void 0:k.id)),i.$$.dirty[0]&196608|i.$$.dirty[1]&1&&setTimeout(()=>{t(16,Ge=we),d&&!Ge&&t(1,Z="")}),i.$$.dirty[0]&8194|i.$$.dirty[1]&1024&&Z.length<M&&(t(13,O=void 0),t(19,me=void 0),t(61,V=O)),i.$$.dirty[0]&57344|i.$$.dirty[1]&16384&&Ue&&O!=null&&O.length&&B==-1&&!k&&t(15,B=0),i.$$.dirty[0]&8192|i.$$.dirty[1]&1073741824&&V!==O&&t(61,V=void 0),i.$$.dirty[0]&73729|i.$$.dirty[1]&1073742336&&w&&w.setEventHandler(g=>{switch(g.type){case"mapClick":W&&eo(g.coordinates);break;case"markerClick":{const q=O==null?void 0:O.find(H=>H.id===g.id);q&&qt(q)}break;case"markerMouseEnter":V&&t(15,B=Ge?(O==null?void 0:O.findIndex(q=>q.id===g.id))??-1:-1);break;case"markerMouseLeave":V&&t(15,B=-1);break}}),i.$$.dirty[0]&40960&&t(63,r=O==null?void 0:O[B]),i.$$.dirty[1]&33312|i.$$.dirty[2]&2&&w&&r&&N&&ft&&w.flyTo(r.center,et(r)),i.$$.dirty[1]&4096&&t(65,n=at==="full-geometry-including-polygon-center-marker"),i.$$.dirty[1]&66048|i.$$.dirty[2]&8&&(dt||w==null||w.setFeatures(void 0,void 0,n)),i.$$.dirty[0]&16384|i.$$.dirty[1]&1073807872|i.$$.dirty[2]&10&&w&&dt&&!V&&(w.setFeatures(r?[r]:void 0,k,n),w.setSelectedMarker(r?0:-1)),i.$$.dirty[0]&16384|i.$$.dirty[1]&1073742336|i.$$.dirty[2]&8&&w&&w.setFeatures(V,k,n),i.$$.dirty[0]&32768|i.$$.dirty[1]&1073742336&&V&&w&&w.setSelectedMarker(B),i.$$.dirty[0]&2|i.$$.dirty[1]&512&&w){const g=Ft(Z);w.setReverseMarker(g?[g.decimalLongitude,g.decimalLatitude]:void 0)}i.$$.dirty[2]&2&&Te("select",{feature:r}),i.$$.dirty[0]&16384&&Te("pick",{feature:k}),i.$$.dirty[0]&73744&&t(64,o=!!(O!=null&&O.length)&&(Ge||b)),i.$$.dirty[2]&4&&Te("optionsvisibilitychange",{optionsVisible:o}),i.$$.dirty[0]&8192&&Te("featureslisted",{features:O}),i.$$.dirty[1]&1073741824&&Te("featuresmarked",{features:V}),i.$$.dirty[0]&1&&Te("reversetoggle",{reverse:W}),i.$$.dirty[0]&2&&Te("querychange",{query:Z}),i.$$.dirty[0]&1|i.$$.dirty[1]&512&&w&&w.indicateReverse(W)},[W,Z,u,f,b,v,_,L,R,te,fe,Yi,Xi,O,k,B,Ge,we,de,me,ze,Jr,$i,to,en,qt,tn,io,c,h,a,d,m,y,E,P,N,x,S,T,w,M,C,at,ct,Ue,ft,dt,Ie,zt,ht,gt,At,Wt,Bt,Dt,Vr,Yr,Ki,Xr,Kr,V,Ut,r,o,n,s,l,no,ro,oo,so,lo,uo,ao,co,fo,ho,go,mo,po]}let dr=class extends Me{constructor(e){super(),xe(this,e,fr,cr,Ee,{ZOOM_DEFAULTS:28,class:2,apiKey:29,bbox:30,clearButtonTitle:3,clearOnBlur:31,clearListOnPick:32,keepListOpen:4,collapsed:5,country:33,debounceSearch:34,enableReverse:6,errorMessage:7,filter:35,flyTo:36,fuzzyMatch:37,language:38,limit:39,mapController:40,minLength:41,noResultsMessage:8,placeholder:9,proximity:42,reverseActive:0,reverseButtonTitle:10,searchValue:1,pickedResultStyle:43,showPlaceType:11,showResultsWhileTyping:44,selectFirst:45,flyToSelected:46,markerOnSelected:47,types:48,exhaustiveReverseGeocoding:49,excludeTypes:50,zoom:51,apiUrl:52,fetchParameters:53,iconsBaseUrl:12,adjustUrlQuery:54,adjustUrl:55,focus:56,blur:57,setQuery:58,clearList:59,clearMap:60},null,[-1,-1,-1,-1])}get ZOOM_DEFAULTS(){return this.$$.ctx[28]}get focus(){return this.$$.ctx[56]}get blur(){return this.$$.ctx[57]}get setQuery(){return this.$$.ctx[58]}get clearList(){return this.$$.ctx[59]}get clearMap(){return this.$$.ctx[60]}};function Ye(i,e,t={}){const n={type:"Feature"};return(t.id===0||t.id)&&(n.id=t.id),t.bbox&&(n.bbox=t.bbox),n.properties=e||{},n.geometry=i,n}function Lt(i,e,t={}){for(const r of i){if(r.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(r[r.length-1].length!==r[0].length)throw new Error("First and last Position are not equivalent.");for(let o=0;o<r[r.length-1].length;o++)if(r[r.length-1][o]!==r[0][o])throw new Error("First and last Position are not equivalent.")}return Ye({type:"Polygon",coordinates:i},e,t)}function Xe(i,e={}){const t={type:"FeatureCollection"};return e.id&&(t.id=e.id),e.bbox&&(t.bbox=e.bbox),t.features=i,t}function wi(i,e,t={}){return Ye({type:"MultiPolygon",coordinates:i},e,t)}function Ei(i,e,t){if(i!==null)for(var n,r,o,l,s,c,u,h=0,a=0,f,d=i.type,m=d==="FeatureCollection",b=d==="Feature",v=m?i.features.length:1,y=0;y<v;y++){u=m?i.features[y].geometry:b?i.geometry:i,f=u?u.type==="GeometryCollection":!1,s=f?u.geometries.length:1;for(var E=0;E<s;E++){var _=0,L=0;if(l=f?u.geometries[E]:u,l!==null){c=l.coordinates;var P=l.type;switch(h=0,P){case null:break;case"Point":if(e(c,a,y,_,L)===!1)return!1;a++,_++;break;case"LineString":case"MultiPoint":for(n=0;n<c.length;n++){if(e(c[n],a,y,_,L)===!1)return!1;a++,P==="MultiPoint"&&_++}P==="LineString"&&_++;break;case"Polygon":case"MultiLineString":for(n=0;n<c.length;n++){for(r=0;r<c[n].length-h;r++){if(e(c[n][r],a,y,_,L)===!1)return!1;a++}P==="MultiLineString"&&_++,P==="Polygon"&&L++}P==="Polygon"&&_++;break;case"MultiPolygon":for(n=0;n<c.length;n++){for(L=0,r=0;r<c[n].length;r++){for(o=0;o<c[n][r].length-h;o++){if(e(c[n][r][o],a,y,_,L)===!1)return!1;a++}L++}_++}break;case"GeometryCollection":for(n=0;n<l.geometries.length;n++)if(Ei(l.geometries[n],e)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function St(i,e){var t,n,r,o,l,s,c,u,h,a,f=0,d=i.type==="FeatureCollection",m=i.type==="Feature",b=d?i.features.length:1;for(t=0;t<b;t++){for(s=d?i.features[t].geometry:m?i.geometry:i,u=d?i.features[t].properties:m?i.properties:{},h=d?i.features[t].bbox:m?i.bbox:void 0,a=d?i.features[t].id:m?i.id:void 0,c=s?s.type==="GeometryCollection":!1,l=c?s.geometries.length:1,r=0;r<l;r++){if(o=c?s.geometries[r]:s,o===null){if(e(null,f,u,h,a)===!1)return!1;continue}switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(e(o,f,u,h,a)===!1)return!1;break}case"GeometryCollection":{for(n=0;n<o.geometries.length;n++)if(e(o.geometries[n],f,u,h,a)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}f++}}function hr(i,e){St(i,function(t,n,r,o,l){var s=t===null?null:t.type;switch(s){case null:case"Point":case"LineString":case"Polygon":return e(Ye(t,r,{bbox:o,id:l}),n,0)===!1?!1:void 0}var c;switch(s){case"MultiPoint":c="Point";break;case"MultiLineString":c="LineString";break;case"MultiPolygon":c="Polygon";break}for(var u=0;u<t.coordinates.length;u++){var h=t.coordinates[u],a={type:c,coordinates:h};if(e(Ye(a,r),n,u)===!1)return!1}})}function gr(i,e={}){if(i.bbox!=null&&e.recompute!==!0)return i.bbox;const t=[1/0,1/0,-1/0,-1/0];return Ei(i,n=>{t[0]>n[0]&&(t[0]=n[0]),t[1]>n[1]&&(t[1]=n[1]),t[2]<n[0]&&(t[2]=n[0]),t[3]<n[1]&&(t[3]=n[1])}),t}var xt=gr;function mr(i){if(!i)throw new Error("geojson is required");switch(i.type){case"Feature":return Li(i);case"FeatureCollection":return pr(i);case"Point":case"LineString":case"Polygon":case"MultiPoint":case"MultiLineString":case"MultiPolygon":case"GeometryCollection":return Mt(i);default:throw new Error("unknown GeoJSON type")}}function Li(i){const e={type:"Feature"};return Object.keys(i).forEach(t=>{switch(t){case"type":case"properties":case"geometry":return;default:e[t]=i[t]}}),e.properties=Si(i.properties),i.geometry==null?e.geometry=null:e.geometry=Mt(i.geometry),e}function Si(i){const e={};return i&&Object.keys(i).forEach(t=>{const n=i[t];typeof n=="object"?n===null?e[t]=null:Array.isArray(n)?e[t]=n.map(r=>r):e[t]=Si(n):e[t]=n}),e}function pr(i){const e={type:"FeatureCollection"};return Object.keys(i).forEach(t=>{switch(t){case"type":case"features":return;default:e[t]=i[t]}}),e.features=i.features.map(t=>Li(t)),e}function Mt(i){const e={type:i.type};return i.bbox&&(e.bbox=i.bbox),i.type==="GeometryCollection"?(e.geometries=i.geometries.map(t=>Mt(t)),e):(e.coordinates=xi(i.coordinates),e)}function xi(i){const e=i;return typeof e[0]!="object"?e.slice():e.map(t=>xi(t))}var yr=mr;/**
2
- * splaytree v3.1.2
3
- * Fast Splay tree for Node and browser
4
- *
5
- * @author Alexander Milevski <info@w8r.name>
6
- * @license MIT
7
- * @preserve
8
- *//*! *****************************************************************************
9
- Copyright (c) Microsoft Corporation. All rights reserved.
10
- Licensed under the Apache License, Version 2.0 (the "License"); you may not use
11
- this file except in compliance with the License. You may obtain a copy of the
12
- License at http://www.apache.org/licenses/LICENSE-2.0
13
-
14
- THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
- KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
16
- WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
17
- MERCHANTABLITY OR NON-INFRINGEMENT.
18
-
19
- See the Apache Version 2.0 License for specific language governing permissions
20
- and limitations under the License.
21
- ***************************************************************************** */function br(i,e){var t={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,r,o,l;return l={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function s(u){return function(h){return c([u,h])}}function c(u){if(n)throw new TypeError("Generator is already executing.");for(;t;)try{if(n=1,r&&(o=u[0]&2?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[u[0]&2,o.value]),u[0]){case 0:case 1:o=u;break;case 4:return t.label++,{value:u[1],done:!1};case 5:t.label++,r=u[1],u=[0];continue;case 7:u=t.ops.pop(),t.trys.pop();continue;default:if(o=t.trys,!(o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){t=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){t.label=u[1];break}if(u[0]===6&&t.label<o[1]){t.label=o[1],o=u;break}if(o&&t.label<o[2]){t.label=o[2],t.ops.push(u);break}o[2]&&t.ops.pop(),t.trys.pop();continue}u=e.call(i,t)}catch(h){u=[6,h],r=0}finally{n=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}var Ce=function(){function i(e,t){this.next=null,this.key=e,this.data=t,this.left=null,this.right=null}return i}();function vr(i,e){return i>e?1:i<e?-1:0}function ke(i,e,t){for(var n=new Ce(null,null),r=n,o=n;;){var l=t(i,e.key);if(l<0){if(e.left===null)break;if(t(i,e.left.key)<0){var s=e.left;if(e.left=s.right,s.right=e,e=s,e.left===null)break}o.left=e,o=e,e=e.left}else if(l>0){if(e.right===null)break;if(t(i,e.right.key)>0){var s=e.right;if(e.right=s.left,s.left=e,e=s,e.right===null)break}r.right=e,r=e,e=e.right}else break}return r.right=e.left,o.left=e.right,e.left=n.right,e.right=n.left,e}function Ct(i,e,t,n){var r=new Ce(i,e);if(t===null)return r.left=r.right=null,r;t=ke(i,t,n);var o=n(i,t.key);return o<0?(r.left=t.left,r.right=t,t.left=null):o>=0&&(r.right=t.right,r.left=t,t.right=null),r}function Mi(i,e,t){var n=null,r=null;if(e){e=ke(i,e,t);var o=t(e.key,i);o===0?(n=e.left,r=e.right):o<0?(r=e.right,e.right=null,n=e):(n=e.left,e.left=null,r=e)}return{left:n,right:r}}function _r(i,e,t){return e===null?i:(i===null||(e=ke(i.key,e,t),e.left=i),e)}function kt(i,e,t,n,r){if(i){n(""+e+(t?"└── ":"├── ")+r(i)+`
22
- `);var o=e+(t?" ":"│ ");i.left&&kt(i.left,o,!1,n,r),i.right&&kt(i.right,o,!0,n,r)}}var Nt=function(){function i(e){e===void 0&&(e=vr),this._root=null,this._size=0,this._comparator=e}return i.prototype.insert=function(e,t){return this._size++,this._root=Ct(e,t,this._root,this._comparator)},i.prototype.add=function(e,t){var n=new Ce(e,t);this._root===null&&(n.left=n.right=null,this._size++,this._root=n);var r=this._comparator,o=ke(e,this._root,r),l=r(e,o.key);return l===0?this._root=o:(l<0?(n.left=o.left,n.right=o,o.left=null):l>0&&(n.right=o.right,n.left=o,o.right=null),this._size++,this._root=n),this._root},i.prototype.remove=function(e){this._root=this._remove(e,this._root,this._comparator)},i.prototype._remove=function(e,t,n){var r;if(t===null)return null;t=ke(e,t,n);var o=n(e,t.key);return o===0?(t.left===null?r=t.right:(r=ke(e,t.left,n),r.right=t.right),this._size--,r):t},i.prototype.pop=function(){var e=this._root;if(e){for(;e.left;)e=e.left;return this._root=ke(e.key,this._root,this._comparator),this._root=this._remove(e.key,this._root,this._comparator),{key:e.key,data:e.data}}return null},i.prototype.findStatic=function(e){for(var t=this._root,n=this._comparator;t;){var r=n(e,t.key);if(r===0)return t;r<0?t=t.left:t=t.right}return null},i.prototype.find=function(e){return this._root&&(this._root=ke(e,this._root,this._comparator),this._comparator(e,this._root.key)!==0)?null:this._root},i.prototype.contains=function(e){for(var t=this._root,n=this._comparator;t;){var r=n(e,t.key);if(r===0)return!0;r<0?t=t.left:t=t.right}return!1},i.prototype.forEach=function(e,t){for(var n=this._root,r=[],o=!1;!o;)n!==null?(r.push(n),n=n.left):r.length!==0?(n=r.pop(),e.call(t,n),n=n.right):o=!0;return this},i.prototype.range=function(e,t,n,r){for(var o=[],l=this._comparator,s=this._root,c;o.length!==0||s;)if(s)o.push(s),s=s.left;else{if(s=o.pop(),c=l(s.key,t),c>0)break;if(l(s.key,e)>=0&&n.call(r,s))return this;s=s.right}return this},i.prototype.keys=function(){var e=[];return this.forEach(function(t){var n=t.key;return e.push(n)}),e},i.prototype.values=function(){var e=[];return this.forEach(function(t){var n=t.data;return e.push(n)}),e},i.prototype.min=function(){return this._root?this.minNode(this._root).key:null},i.prototype.max=function(){return this._root?this.maxNode(this._root).key:null},i.prototype.minNode=function(e){if(e===void 0&&(e=this._root),e)for(;e.left;)e=e.left;return e},i.prototype.maxNode=function(e){if(e===void 0&&(e=this._root),e)for(;e.right;)e=e.right;return e},i.prototype.at=function(e){for(var t=this._root,n=!1,r=0,o=[];!n;)if(t)o.push(t),t=t.left;else if(o.length>0){if(t=o.pop(),r===e)return t;r++,t=t.right}else n=!0;return null},i.prototype.next=function(e){var t=this._root,n=null;if(e.right){for(n=e.right;n.left;)n=n.left;return n}for(var r=this._comparator;t;){var o=r(e.key,t.key);if(o===0)break;o<0?(n=t,t=t.left):t=t.right}return n},i.prototype.prev=function(e){var t=this._root,n=null;if(e.left!==null){for(n=e.left;n.right;)n=n.right;return n}for(var r=this._comparator;t;){var o=r(e.key,t.key);if(o===0)break;o<0?t=t.left:(n=t,t=t.right)}return n},i.prototype.clear=function(){return this._root=null,this._size=0,this},i.prototype.toList=function(){return Er(this._root)},i.prototype.load=function(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!1);var r=e.length,o=this._comparator;if(n&&Rt(e,t,0,r-1,o),this._root===null)this._root=Pt(e,t,0,r),this._size=r;else{var l=Lr(this.toList(),wr(e,t),o);r=this._size+r,this._root=Tt({head:l},0,r)}return this},i.prototype.isEmpty=function(){return this._root===null},Object.defineProperty(i.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"root",{get:function(){return this._root},enumerable:!0,configurable:!0}),i.prototype.toString=function(e){e===void 0&&(e=function(n){return String(n.key)});var t=[];return kt(this._root,"",!0,function(n){return t.push(n)},e),t.join("")},i.prototype.update=function(e,t,n){var r=this._comparator,o=Mi(e,this._root,r),l=o.left,s=o.right;r(e,t)<0?s=Ct(t,n,s,r):l=Ct(t,n,l,r),this._root=_r(l,s,r)},i.prototype.split=function(e){return Mi(e,this._root,this._comparator)},i.prototype[Symbol.iterator]=function(){var e,t,n;return br(this,function(r){switch(r.label){case 0:e=this._root,t=[],n=!1,r.label=1;case 1:return n?[3,6]:e===null?[3,2]:(t.push(e),e=e.left,[3,5]);case 2:return t.length===0?[3,4]:(e=t.pop(),[4,e]);case 3:return r.sent(),e=e.right,[3,5];case 4:n=!0,r.label=5;case 5:return[3,1];case 6:return[2]}})},i}();function Pt(i,e,t,n){var r=n-t;if(r>0){var o=t+Math.floor(r/2),l=i[o],s=e[o],c=new Ce(l,s);return c.left=Pt(i,e,t,o),c.right=Pt(i,e,o+1,n),c}return null}function wr(i,e){for(var t=new Ce(null,null),n=t,r=0;r<i.length;r++)n=n.next=new Ce(i[r],e[r]);return n.next=null,t.next}function Er(i){for(var e=i,t=[],n=!1,r=new Ce(null,null),o=r;!n;)e?(t.push(e),e=e.left):t.length>0?(e=o=o.next=t.pop(),e=e.right):n=!0;return o.next=null,r.next}function Tt(i,e,t){var n=t-e;if(n>0){var r=e+Math.floor(n/2),o=Tt(i,e,r),l=i.head;return l.left=o,i.head=i.head.next,l.right=Tt(i,r+1,t),l}return null}function Lr(i,e,t){for(var n=new Ce(null,null),r=n,o=i,l=e;o!==null&&l!==null;)t(o.key,l.key)<0?(r.next=o,o=o.next):(r.next=l,l=l.next),r=r.next;return o!==null?r.next=o:l!==null&&(r.next=l),n.next}function Rt(i,e,t,n,r){if(!(t>=n)){for(var o=i[t+n>>1],l=t-1,s=n+1;;){do l++;while(r(i[l],o)<0);do s--;while(r(i[s],o)>0);if(l>=s)break;var c=i[l];i[l]=i[s],i[s]=c,c=e[l],e[l]=e[s],e[s]=c}Rt(i,e,t,s,r),Rt(i,e,s+1,n,r)}}const _e=11102230246251565e-32,$=134217729,Sr=(3+8*_e)*_e;function Ot(i,e,t,n,r){let o,l,s,c,u=e[0],h=n[0],a=0,f=0;h>u==h>-u?(o=u,u=e[++a]):(o=h,h=n[++f]);let d=0;if(a<i&&f<t)for(h>u==h>-u?(l=u+o,s=o-(l-u),u=e[++a]):(l=h+o,s=o-(l-h),h=n[++f]),o=l,s!==0&&(r[d++]=s);a<i&&f<t;)h>u==h>-u?(l=o+u,c=l-o,s=o-(l-c)+(u-c),u=e[++a]):(l=o+h,c=l-o,s=o-(l-c)+(h-c),h=n[++f]),o=l,s!==0&&(r[d++]=s);for(;a<i;)l=o+u,c=l-o,s=o-(l-c)+(u-c),u=e[++a],o=l,s!==0&&(r[d++]=s);for(;f<t;)l=o+h,c=l-o,s=o-(l-c)+(h-c),h=n[++f],o=l,s!==0&&(r[d++]=s);return(o!==0||d===0)&&(r[d++]=o),d}function xr(i,e){let t=e[0];for(let n=1;n<i;n++)t+=e[n];return t}function Ke(i){return new Float64Array(i)}const Mr=(3+16*_e)*_e,Cr=(2+12*_e)*_e,kr=(9+64*_e)*_e*_e,De=Ke(4),Ci=Ke(8),ki=Ke(12),Ni=Ke(16),ee=Ke(4);function Nr(i,e,t,n,r,o,l){let s,c,u,h,a,f,d,m,b,v,y,E,_,L,P,N,x,S;const T=i-r,w=t-r,M=e-o,R=n-o;L=T*R,f=$*T,d=f-(f-T),m=T-d,f=$*R,b=f-(f-R),v=R-b,P=m*v-(L-d*b-m*b-d*v),N=M*w,f=$*M,d=f-(f-M),m=M-d,f=$*w,b=f-(f-w),v=w-b,x=m*v-(N-d*b-m*b-d*v),y=P-x,a=P-y,De[0]=P-(y+a)+(a-x),E=L+y,a=E-L,_=L-(E-a)+(y-a),y=_-N,a=_-y,De[1]=_-(y+a)+(a-N),S=E+y,a=S-E,De[2]=E-(S-a)+(y-a),De[3]=S;let te=xr(4,De),C=Cr*l;if(te>=C||-te>=C||(a=i-T,s=i-(T+a)+(a-r),a=t-w,u=t-(w+a)+(a-r),a=e-M,c=e-(M+a)+(a-o),a=n-R,h=n-(R+a)+(a-o),s===0&&c===0&&u===0&&h===0)||(C=kr*l+Sr*Math.abs(te),te+=T*h+R*s-(M*u+w*c),te>=C||-te>=C))return te;L=s*R,f=$*s,d=f-(f-s),m=s-d,f=$*R,b=f-(f-R),v=R-b,P=m*v-(L-d*b-m*b-d*v),N=c*w,f=$*c,d=f-(f-c),m=c-d,f=$*w,b=f-(f-w),v=w-b,x=m*v-(N-d*b-m*b-d*v),y=P-x,a=P-y,ee[0]=P-(y+a)+(a-x),E=L+y,a=E-L,_=L-(E-a)+(y-a),y=_-N,a=_-y,ee[1]=_-(y+a)+(a-N),S=E+y,a=S-E,ee[2]=E-(S-a)+(y-a),ee[3]=S;const W=Ot(4,De,4,ee,Ci);L=T*h,f=$*T,d=f-(f-T),m=T-d,f=$*h,b=f-(f-h),v=h-b,P=m*v-(L-d*b-m*b-d*v),N=M*u,f=$*M,d=f-(f-M),m=M-d,f=$*u,b=f-(f-u),v=u-b,x=m*v-(N-d*b-m*b-d*v),y=P-x,a=P-y,ee[0]=P-(y+a)+(a-x),E=L+y,a=E-L,_=L-(E-a)+(y-a),y=_-N,a=_-y,ee[1]=_-(y+a)+(a-N),S=E+y,a=S-E,ee[2]=E-(S-a)+(y-a),ee[3]=S;const fe=Ot(W,Ci,4,ee,ki);L=s*h,f=$*s,d=f-(f-s),m=s-d,f=$*h,b=f-(f-h),v=h-b,P=m*v-(L-d*b-m*b-d*v),N=c*u,f=$*c,d=f-(f-c),m=c-d,f=$*u,b=f-(f-u),v=u-b,x=m*v-(N-d*b-m*b-d*v),y=P-x,a=P-y,ee[0]=P-(y+a)+(a-x),E=L+y,a=E-L,_=L-(E-a)+(y-a),y=_-N,a=_-y,ee[1]=_-(y+a)+(a-N),S=E+y,a=S-E,ee[2]=E-(S-a)+(y-a),ee[3]=S;const Z=Ot(fe,ki,4,ee,Ni);return Ni[Z-1]}function Pr(i,e,t,n,r,o){const l=(e-o)*(t-r),s=(i-r)*(n-o),c=l-s,u=Math.abs(l+s);return Math.abs(c)>=Mr*u?c:-Nr(i,e,t,n,r,o,u)}const Je=(i,e)=>i.ll.x<=e.x&&e.x<=i.ur.x&&i.ll.y<=e.y&&e.y<=i.ur.y,It=(i,e)=>{if(e.ur.x<i.ll.x||i.ur.x<e.ll.x||e.ur.y<i.ll.y||i.ur.y<e.ll.y)return null;const t=i.ll.x<e.ll.x?e.ll.x:i.ll.x,n=i.ur.x<e.ur.x?i.ur.x:e.ur.x,r=i.ll.y<e.ll.y?e.ll.y:i.ll.y,o=i.ur.y<e.ur.y?i.ur.y:e.ur.y;return{ll:{x:t,y:r},ur:{x:n,y:o}}};let Ne=Number.EPSILON;Ne===void 0&&(Ne=Math.pow(2,-52));const Tr=Ne*Ne,Pi=(i,e)=>{if(-Ne<i&&i<Ne&&-Ne<e&&e<Ne)return 0;const t=i-e;return t*t<Tr*i*e?0:i<e?-1:1};class Rr{constructor(){this.reset()}reset(){this.xRounder=new Ti,this.yRounder=new Ti}round(e,t){return{x:this.xRounder.round(e),y:this.yRounder.round(t)}}}class Ti{constructor(){this.tree=new Nt,this.round(0)}round(e){const t=this.tree.add(e),n=this.tree.prev(t);if(n!==null&&Pi(t.key,n.key)===0)return this.tree.remove(e),n.key;const r=this.tree.next(t);return r!==null&&Pi(t.key,r.key)===0?(this.tree.remove(e),r.key):e}}const $e=new Rr,st=(i,e)=>i.x*e.y-i.y*e.x,Ri=(i,e)=>i.x*e.x+i.y*e.y,Oi=(i,e,t)=>{const n=Pr(i.x,i.y,e.x,e.y,t.x,t.y);return n>0?-1:n<0?1:0},lt=i=>Math.sqrt(Ri(i,i)),Or=(i,e,t)=>{const n={x:e.x-i.x,y:e.y-i.y},r={x:t.x-i.x,y:t.y-i.y};return st(r,n)/lt(r)/lt(n)},Ir=(i,e,t)=>{const n={x:e.x-i.x,y:e.y-i.y},r={x:t.x-i.x,y:t.y-i.y};return Ri(r,n)/lt(r)/lt(n)},Ii=(i,e,t)=>e.y===0?null:{x:i.x+e.x/e.y*(t-i.y),y:t},zi=(i,e,t)=>e.x===0?null:{x:t,y:i.y+e.y/e.x*(t-i.x)},zr=(i,e,t,n)=>{if(e.x===0)return zi(t,n,i.x);if(n.x===0)return zi(i,e,t.x);if(e.y===0)return Ii(t,n,i.y);if(n.y===0)return Ii(i,e,t.y);const r=st(e,n);if(r==0)return null;const o={x:t.x-i.x,y:t.y-i.y},l=st(o,e)/r,s=st(o,n)/r,c=i.x+s*e.x,u=t.x+l*n.x,h=i.y+s*e.y,a=t.y+l*n.y,f=(c+u)/2,d=(h+a)/2;return{x:f,y:d}};class ue{static compare(e,t){const n=ue.comparePoints(e.point,t.point);return n!==0?n:(e.point!==t.point&&e.link(t),e.isLeft!==t.isLeft?e.isLeft?1:-1:Pe.compare(e.segment,t.segment))}static comparePoints(e,t){return e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0}constructor(e,t){e.events===void 0?e.events=[this]:e.events.push(this),this.point=e,this.isLeft=t}link(e){if(e.point===this.point)throw new Error("Tried to link already linked events");const t=e.point.events;for(let n=0,r=t.length;n<r;n++){const o=t[n];this.point.events.push(o),o.point=this.point}this.checkForConsuming()}checkForConsuming(){const e=this.point.events.length;for(let t=0;t<e;t++){const n=this.point.events[t];if(n.segment.consumedBy===void 0)for(let r=t+1;r<e;r++){const o=this.point.events[r];o.consumedBy===void 0&&n.otherSE.point.events===o.otherSE.point.events&&n.segment.consume(o.segment)}}}getAvailableLinkedEvents(){const e=[];for(let t=0,n=this.point.events.length;t<n;t++){const r=this.point.events[t];r!==this&&!r.segment.ringOut&&r.segment.isInResult()&&e.push(r)}return e}getLeftmostComparator(e){const t=new Map,n=r=>{const o=r.otherSE;t.set(r,{sine:Or(this.point,e.point,o.point),cosine:Ir(this.point,e.point,o.point)})};return(r,o)=>{t.has(r)||n(r),t.has(o)||n(o);const{sine:l,cosine:s}=t.get(r),{sine:c,cosine:u}=t.get(o);return l>=0&&c>=0?s<u?1:s>u?-1:0:l<0&&c<0?s<u?-1:s>u?1:0:c<l?-1:c>l?1:0}}}let Ar=0;class Pe{static compare(e,t){const n=e.leftSE.point.x,r=t.leftSE.point.x,o=e.rightSE.point.x,l=t.rightSE.point.x;if(l<n)return 1;if(o<r)return-1;const s=e.leftSE.point.y,c=t.leftSE.point.y,u=e.rightSE.point.y,h=t.rightSE.point.y;if(n<r){if(c<s&&c<u)return 1;if(c>s&&c>u)return-1;const a=e.comparePoint(t.leftSE.point);if(a<0)return 1;if(a>0)return-1;const f=t.comparePoint(e.rightSE.point);return f!==0?f:-1}if(n>r){if(s<c&&s<h)return-1;if(s>c&&s>h)return 1;const a=t.comparePoint(e.leftSE.point);if(a!==0)return a;const f=e.comparePoint(t.rightSE.point);return f<0?1:f>0?-1:1}if(s<c)return-1;if(s>c)return 1;if(o<l){const a=t.comparePoint(e.rightSE.point);if(a!==0)return a}if(o>l){const a=e.comparePoint(t.rightSE.point);if(a<0)return 1;if(a>0)return-1}if(o!==l){const a=u-s,f=o-n,d=h-c,m=l-r;if(a>f&&d<m)return 1;if(a<f&&d>m)return-1}return o>l?1:o<l||u<h?-1:u>h?1:e.id<t.id?-1:e.id>t.id?1:0}constructor(e,t,n,r){this.id=++Ar,this.leftSE=e,e.segment=this,e.otherSE=t,this.rightSE=t,t.segment=this,t.otherSE=e,this.rings=n,this.windings=r}static fromRing(e,t,n){let r,o,l;const s=ue.comparePoints(e,t);if(s<0)r=e,o=t,l=1;else if(s>0)r=t,o=e,l=-1;else throw new Error(`Tried to create degenerate segment at [${e.x}, ${e.y}]`);const c=new ue(r,!0),u=new ue(o,!1);return new Pe(c,u,[n],[l])}replaceRightSE(e){this.rightSE=e,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}bbox(){const e=this.leftSE.point.y,t=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:e<t?e:t},ur:{x:this.rightSE.point.x,y:e>t?e:t}}}vector(){return{x:this.rightSE.point.x-this.leftSE.point.x,y:this.rightSE.point.y-this.leftSE.point.y}}isAnEndpoint(e){return e.x===this.leftSE.point.x&&e.y===this.leftSE.point.y||e.x===this.rightSE.point.x&&e.y===this.rightSE.point.y}comparePoint(e){if(this.isAnEndpoint(e))return 0;const t=this.leftSE.point,n=this.rightSE.point,r=this.vector();if(t.x===n.x)return e.x===t.x?0:e.x<t.x?1:-1;const o=(e.y-t.y)/r.y,l=t.x+o*r.x;if(e.x===l)return 0;const s=(e.x-t.x)/r.x,c=t.y+s*r.y;return e.y===c?0:e.y<c?-1:1}getIntersection(e){const t=this.bbox(),n=e.bbox(),r=It(t,n);if(r===null)return null;const o=this.leftSE.point,l=this.rightSE.point,s=e.leftSE.point,c=e.rightSE.point,u=Je(t,s)&&this.comparePoint(s)===0,h=Je(n,o)&&e.comparePoint(o)===0,a=Je(t,c)&&this.comparePoint(c)===0,f=Je(n,l)&&e.comparePoint(l)===0;if(h&&u)return f&&!a?l:!f&&a?c:null;if(h)return a&&o.x===c.x&&o.y===c.y?null:o;if(u)return f&&l.x===s.x&&l.y===s.y?null:s;if(f&&a)return null;if(f)return l;if(a)return c;const d=zr(o,this.vector(),s,e.vector());return d===null||!Je(r,d)?null:$e.round(d.x,d.y)}split(e){const t=[],n=e.events!==void 0,r=new ue(e,!0),o=new ue(e,!1),l=this.rightSE;this.replaceRightSE(o),t.push(o),t.push(r);const s=new Pe(r,l,this.rings.slice(),this.windings.slice());return ue.comparePoints(s.leftSE.point,s.rightSE.point)>0&&s.swapEvents(),ue.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),n&&(r.checkForConsuming(),o.checkForConsuming()),t}swapEvents(){const e=this.rightSE;this.rightSE=this.leftSE,this.leftSE=e,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(let t=0,n=this.windings.length;t<n;t++)this.windings[t]*=-1}consume(e){let t=this,n=e;for(;t.consumedBy;)t=t.consumedBy;for(;n.consumedBy;)n=n.consumedBy;const r=Pe.compare(t,n);if(r!==0){if(r>0){const o=t;t=n,n=o}if(t.prev===n){const o=t;t=n,n=o}for(let o=0,l=n.rings.length;o<l;o++){const s=n.rings[o],c=n.windings[o],u=t.rings.indexOf(s);u===-1?(t.rings.push(s),t.windings.push(c)):t.windings[u]+=c}n.rings=null,n.windings=null,n.consumedBy=t,n.leftSE.consumedBy=t.leftSE,n.rightSE.consumedBy=t.rightSE}}prevInResult(){return this._prevInResult!==void 0?this._prevInResult:(this.prev?this.prev.isInResult()?this._prevInResult=this.prev:this._prevInResult=this.prev.prevInResult():this._prevInResult=null,this._prevInResult)}beforeState(){if(this._beforeState!==void 0)return this._beforeState;if(!this.prev)this._beforeState={rings:[],windings:[],multiPolys:[]};else{const e=this.prev.consumedBy||this.prev;this._beforeState=e.afterState()}return this._beforeState}afterState(){if(this._afterState!==void 0)return this._afterState;const e=this.beforeState();this._afterState={rings:e.rings.slice(0),windings:e.windings.slice(0),multiPolys:[]};const t=this._afterState.rings,n=this._afterState.windings,r=this._afterState.multiPolys;for(let s=0,c=this.rings.length;s<c;s++){const u=this.rings[s],h=this.windings[s],a=t.indexOf(u);a===-1?(t.push(u),n.push(h)):n[a]+=h}const o=[],l=[];for(let s=0,c=t.length;s<c;s++){if(n[s]===0)continue;const u=t[s],h=u.poly;if(l.indexOf(h)===-1)if(u.isExterior)o.push(h);else{l.indexOf(h)===-1&&l.push(h);const a=o.indexOf(u.poly);a!==-1&&o.splice(a,1)}}for(let s=0,c=o.length;s<c;s++){const u=o[s].multiPoly;r.indexOf(u)===-1&&r.push(u)}return this._afterState}isInResult(){if(this.consumedBy)return!1;if(this._isInResult!==void 0)return this._isInResult;const e=this.beforeState().multiPolys,t=this.afterState().multiPolys;switch(ce.type){case"union":{const n=e.length===0,r=t.length===0;this._isInResult=n!==r;break}case"intersection":{let n,r;e.length<t.length?(n=e.length,r=t.length):(n=t.length,r=e.length),this._isInResult=r===ce.numMultiPolys&&n<r;break}case"xor":{const n=Math.abs(e.length-t.length);this._isInResult=n%2===1;break}case"difference":{const n=r=>r.length===1&&r[0].isSubject;this._isInResult=n(e)!==n(t);break}default:throw new Error(`Unrecognized operation type found ${ce.type}`)}return this._isInResult}}class Ai{constructor(e,t,n){if(!Array.isArray(e)||e.length===0)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=t,this.isExterior=n,this.segments=[],typeof e[0][0]!="number"||typeof e[0][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");const r=$e.round(e[0][0],e[0][1]);this.bbox={ll:{x:r.x,y:r.y},ur:{x:r.x,y:r.y}};let o=r;for(let l=1,s=e.length;l<s;l++){if(typeof e[l][0]!="number"||typeof e[l][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");let c=$e.round(e[l][0],e[l][1]);c.x===o.x&&c.y===o.y||(this.segments.push(Pe.fromRing(o,c,this)),c.x<this.bbox.ll.x&&(this.bbox.ll.x=c.x),c.y<this.bbox.ll.y&&(this.bbox.ll.y=c.y),c.x>this.bbox.ur.x&&(this.bbox.ur.x=c.x),c.y>this.bbox.ur.y&&(this.bbox.ur.y=c.y),o=c)}(r.x!==o.x||r.y!==o.y)&&this.segments.push(Pe.fromRing(o,r,this))}getSweepEvents(){const e=[];for(let t=0,n=this.segments.length;t<n;t++){const r=this.segments[t];e.push(r.leftSE),e.push(r.rightSE)}return e}}class Wr{constructor(e,t){if(!Array.isArray(e))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");this.exteriorRing=new Ai(e[0],this,!0),this.bbox={ll:{x:this.exteriorRing.bbox.ll.x,y:this.exteriorRing.bbox.ll.y},ur:{x:this.exteriorRing.bbox.ur.x,y:this.exteriorRing.bbox.ur.y}},this.interiorRings=[];for(let n=1,r=e.length;n<r;n++){const o=new Ai(e[n],this,!1);o.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=o.bbox.ll.x),o.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=o.bbox.ll.y),o.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=o.bbox.ur.x),o.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=o.bbox.ur.y),this.interiorRings.push(o)}this.multiPoly=t}getSweepEvents(){const e=this.exteriorRing.getSweepEvents();for(let t=0,n=this.interiorRings.length;t<n;t++){const r=this.interiorRings[t].getSweepEvents();for(let o=0,l=r.length;o<l;o++)e.push(r[o])}return e}}class Wi{constructor(e,t){if(!Array.isArray(e))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");try{typeof e[0][0][0]=="number"&&(e=[e])}catch{}this.polys=[],this.bbox={ll:{x:Number.POSITIVE_INFINITY,y:Number.POSITIVE_INFINITY},ur:{x:Number.NEGATIVE_INFINITY,y:Number.NEGATIVE_INFINITY}};for(let n=0,r=e.length;n<r;n++){const o=new Wr(e[n],this);o.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=o.bbox.ll.x),o.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=o.bbox.ll.y),o.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=o.bbox.ur.x),o.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=o.bbox.ur.y),this.polys.push(o)}this.isSubject=t}getSweepEvents(){const e=[];for(let t=0,n=this.polys.length;t<n;t++){const r=this.polys[t].getSweepEvents();for(let o=0,l=r.length;o<l;o++)e.push(r[o])}return e}}class ut{static factory(e){const t=[];for(let n=0,r=e.length;n<r;n++){const o=e[n];if(!o.isInResult()||o.ringOut)continue;let l=null,s=o.leftSE,c=o.rightSE;const u=[s],h=s.point,a=[];for(;l=s,s=c,u.push(s),s.point!==h;)for(;;){const f=s.getAvailableLinkedEvents();if(f.length===0){const b=u[0].point,v=u[u.length-1].point;throw new Error(`Unable to complete output ring starting at [${b.x}, ${b.y}]. Last matching segment found ends at [${v.x}, ${v.y}].`)}if(f.length===1){c=f[0].otherSE;break}let d=null;for(let b=0,v=a.length;b<v;b++)if(a[b].point===s.point){d=b;break}if(d!==null){const b=a.splice(d)[0],v=u.splice(b.index);v.unshift(v[0].otherSE),t.push(new ut(v.reverse()));continue}a.push({index:u.length,point:s.point});const m=s.getLeftmostComparator(l);c=f.sort(m)[0].otherSE;break}t.push(new ut(u))}return t}constructor(e){this.events=e;for(let t=0,n=e.length;t<n;t++)e[t].segment.ringOut=this;this.poly=null}getGeom(){let e=this.events[0].point;const t=[e];for(let u=1,h=this.events.length-1;u<h;u++){const a=this.events[u].point,f=this.events[u+1].point;Oi(a,e,f)!==0&&(t.push(a),e=a)}if(t.length===1)return null;const n=t[0],r=t[1];Oi(n,e,r)===0&&t.shift(),t.push(t[0]);const o=this.isExteriorRing()?1:-1,l=this.isExteriorRing()?0:t.length-1,s=this.isExteriorRing()?t.length:-1,c=[];for(let u=l;u!=s;u+=o)c.push([t[u].x,t[u].y]);return c}isExteriorRing(){if(this._isExteriorRing===void 0){const e=this.enclosingRing();this._isExteriorRing=e?!e.isExteriorRing():!0}return this._isExteriorRing}enclosingRing(){return this._enclosingRing===void 0&&(this._enclosingRing=this._calcEnclosingRing()),this._enclosingRing}_calcEnclosingRing(){let e=this.events[0];for(let r=1,o=this.events.length;r<o;r++){const l=this.events[r];ue.compare(e,l)>0&&(e=l)}let t=e.segment.prevInResult(),n=t?t.prevInResult():null;for(;;){if(!t)return null;if(!n)return t.ringOut;if(n.ringOut!==t.ringOut)return n.ringOut.enclosingRing()!==t.ringOut?t.ringOut:t.ringOut.enclosingRing();t=n.prevInResult(),n=t?t.prevInResult():null}}}class Bi{constructor(e){this.exteriorRing=e,e.poly=this,this.interiorRings=[]}addInterior(e){this.interiorRings.push(e),e.poly=this}getGeom(){const e=[this.exteriorRing.getGeom()];if(e[0]===null)return null;for(let t=0,n=this.interiorRings.length;t<n;t++){const r=this.interiorRings[t].getGeom();r!==null&&e.push(r)}return e}}class Br{constructor(e){this.rings=e,this.polys=this._composePolys(e)}getGeom(){const e=[];for(let t=0,n=this.polys.length;t<n;t++){const r=this.polys[t].getGeom();r!==null&&e.push(r)}return e}_composePolys(e){const t=[];for(let n=0,r=e.length;n<r;n++){const o=e[n];if(!o.poly)if(o.isExteriorRing())t.push(new Bi(o));else{const l=o.enclosingRing();l.poly||t.push(new Bi(l)),l.poly.addInterior(o)}}return t}}class Dr{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Pe.compare;this.queue=e,this.tree=new Nt(t),this.segments=[]}process(e){const t=e.segment,n=[];if(e.consumedBy)return e.isLeft?this.queue.remove(e.otherSE):this.tree.remove(t),n;const r=e.isLeft?this.tree.add(t):this.tree.find(t);if(!r)throw new Error(`Unable to find segment #${t.id} [${t.leftSE.point.x}, ${t.leftSE.point.y}] -> [${t.rightSE.point.x}, ${t.rightSE.point.y}] in SweepLine tree.`);let o=r,l=r,s,c;for(;s===void 0;)o=this.tree.prev(o),o===null?s=null:o.key.consumedBy===void 0&&(s=o.key);for(;c===void 0;)l=this.tree.next(l),l===null?c=null:l.key.consumedBy===void 0&&(c=l.key);if(e.isLeft){let u=null;if(s){const a=s.getIntersection(t);if(a!==null&&(t.isAnEndpoint(a)||(u=a),!s.isAnEndpoint(a))){const f=this._splitSafely(s,a);for(let d=0,m=f.length;d<m;d++)n.push(f[d])}}let h=null;if(c){const a=c.getIntersection(t);if(a!==null&&(t.isAnEndpoint(a)||(h=a),!c.isAnEndpoint(a))){const f=this._splitSafely(c,a);for(let d=0,m=f.length;d<m;d++)n.push(f[d])}}if(u!==null||h!==null){let a=null;u===null?a=h:h===null?a=u:a=ue.comparePoints(u,h)<=0?u:h,this.queue.remove(t.rightSE),n.push(t.rightSE);const f=t.split(a);for(let d=0,m=f.length;d<m;d++)n.push(f[d])}n.length>0?(this.tree.remove(t),n.push(e)):(this.segments.push(t),t.prev=s)}else{if(s&&c){const u=s.getIntersection(c);if(u!==null){if(!s.isAnEndpoint(u)){const h=this._splitSafely(s,u);for(let a=0,f=h.length;a<f;a++)n.push(h[a])}if(!c.isAnEndpoint(u)){const h=this._splitSafely(c,u);for(let a=0,f=h.length;a<f;a++)n.push(h[a])}}}this.tree.remove(t)}return n}_splitSafely(e,t){this.tree.remove(e);const n=e.rightSE;this.queue.remove(n);const r=e.split(t);return r.push(n),e.consumedBy===void 0&&this.tree.add(e),r}}const Di=typeof process<"u"&&process.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE||1e6,Ur=typeof process<"u"&&process.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS||1e6;class Fr{run(e,t,n){ce.type=e,$e.reset();const r=[new Wi(t,!0)];for(let a=0,f=n.length;a<f;a++)r.push(new Wi(n[a],!1));if(ce.numMultiPolys=r.length,ce.type==="difference"){const a=r[0];let f=1;for(;f<r.length;)It(r[f].bbox,a.bbox)!==null?f++:r.splice(f,1)}if(ce.type==="intersection")for(let a=0,f=r.length;a<f;a++){const d=r[a];for(let m=a+1,b=r.length;m<b;m++)if(It(d.bbox,r[m].bbox)===null)return[]}const o=new Nt(ue.compare);for(let a=0,f=r.length;a<f;a++){const d=r[a].getSweepEvents();for(let m=0,b=d.length;m<b;m++)if(o.insert(d[m]),o.size>Di)throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big).")}const l=new Dr(o);let s=o.size,c=o.pop();for(;c;){const a=c.key;if(o.size===s){const d=a.segment;throw new Error(`Unable to pop() ${a.isLeft?"left":"right"} SweepEvent [${a.point.x}, ${a.point.y}] from segment #${d.id} [${d.leftSE.point.x}, ${d.leftSE.point.y}] -> [${d.rightSE.point.x}, ${d.rightSE.point.y}] from queue.`)}if(o.size>Di)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big).");if(l.segments.length>Ur)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments).");const f=l.process(a);for(let d=0,m=f.length;d<m;d++){const b=f[d];b.consumedBy===void 0&&o.insert(b)}s=o.size,c=o.pop()}$e.reset();const u=ut.factory(l.segments);return new Br(u).getGeom()}}const ce=new Fr;var Ui={union:function(i){for(var e=arguments.length,t=new Array(e>1?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];return ce.run("union",i,t)},intersection:function(i){for(var e=arguments.length,t=new Array(e>1?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];return ce.run("intersection",i,t)},xor:function(i){for(var e=arguments.length,t=new Array(e>1?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];return ce.run("xor",i,t)},difference:function(i){for(var e=arguments.length,t=new Array(e>1?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];return ce.run("difference",i,t)}};function Gr(i,e={}){const t=[];if(St(i,r=>{t.push(r.coordinates)}),t.length<2)throw new Error("Must have at least 2 geometries");const n=Ui.union(t[0],...t.slice(1));return n.length===0?null:n.length===1?Lt(n[0],e.properties):wi(n,e.properties)}var Fi=Gr;function jr(i){const e=[];if(St(i,r=>{e.push(r.coordinates)}),e.length<2)throw new Error("Must have at least two features");const t=i.features[0].properties||{},n=Ui.difference(e[0],...e.slice(1));return n.length===0?null:n.length===1?Lt(n[0],t):wi(n,t)}var qr=jr;function Zr(i){if(!i)throw new Error("geojson is required");var e=[];return hr(i,function(t){e.push(t)}),Xe(e)}var Qr=Zr;function Gi(i,e){const t=qr(Xe([Lt([[[180,90],[-180,90],[-180,-90],[180,-90],[180,90]]]),i]));if(!t)return;t.properties={isMask:!0};const n=Qe(xt(i)),r=(n[2]-n[0])/360/1e3,o=n[0]<-180,l=n[2]>180,s=Qr(i);if(s.features.length>1&&(o||l))for(const c of s.features){const u=Qe(xt(c));if(l&&u[0]<-180+r)for(const h of c.geometry.coordinates)for(const a of h)a[0]+=360-r;if(o&&u[2]>180-r)for(const h of c.geometry.coordinates)for(const a of h)a[0]-=360-r}e(Xe([s.features.length<2?i:Fi(s)??i,t]))}const ji=i=>{var n,r,o;const e=(n=i==null?void 0:i.geometry)==null?void 0:n.type,t=(r=i==null?void 0:i.properties)!=null&&r.isMask?0:e==="LineString"||e==="MultiLineString"?3:2;return{color:"#3170fe",fillColor:"#000",fillOpacity:(o=i==null?void 0:i.properties)!=null&&o.isMask?.1:0,weight:t,dashArray:[t,t],lineCap:"butt"}};function qi(i,e=!0,t=!0,n={},r={},o=ji){let l;const s=[];let c,u;const h=ie.geoJSON(void 0,{style:o===!0?ji:o===!1?void 0:o??void 0,interactive:!1}).addTo(i),a=d=>{l==null||l({type:"mapClick",coordinates:[d.latlng.lng,d.latlng.lat]})};function f(d,m=!1){const b=document.createElement("div");return new Gn({props:{displayIn:"leaflet"},target:b}),new ie.Marker(d,{interactive:m,icon:new ie.DivIcon({html:b,className:"",iconAnchor:[12,26],iconSize:[25,30],tooltipAnchor:[1,-24]})})}return{setEventHandler(d){d?(l=d,i.on("click",a)):(l=void 0,i.off("click",a))},flyTo(d,m){i.flyTo([d[1],d[0]],m,{duration:2,...n})},fitBounds(d,m,b){i.flyToBounds([[d[1],d[0]],[d[3],d[2]]],{padding:[m,m],duration:2,...b?{maxZoom:b}:{},...r})},indicateReverse(d){i.getContainer().style.cursor=d?"crosshair":""},setReverseMarker(d){var b;if(!e)return;const m=d&&[d[1],d[0]];u?m?u.setLatLng(m):(u.remove(),u=void 0):m&&(e instanceof Function?u=e(i)??void 0:(u=(typeof e=="object"?new ie.Marker(m,e):f(m)).addTo(i),(b=u.getElement())==null||b.classList.add("marker-reverse")))},setFeatures(d,m,b){function v(y){h.clearLayers(),y&&h.addData(y)}for(const y of s)y.remove();s.length=0,v();e:if(m){let y=!1;if(m.geometry.type==="GeometryCollection"){const E=m.geometry.geometries.filter(_=>_.type==="Polygon"||_.type==="MultiPolygon");t:if(E.length>0){const _=Fi(Xe(E.map(L=>Ye(L))));if(!_)break t;Gi({...m,geometry:_.geometry},v),y=!0}else{const _=m.geometry.geometries.filter(L=>L.type==="LineString"||L.type==="MultiLineString");_.length>0&&(v({...m,geometry:{type:"GeometryCollection",geometries:_}}),y=!0)}}if(!y){if(m.geometry.type==="Polygon"||m.geometry.type==="MultiPolygon")Gi(m,E=>{if(!E)return;const _=[...E.features],L=Qe(xt(m)),P=L[2]-L[0];L[0]-P/4<-180&&_.push(...Zi(E,-360).features),L[2]+P/4>180&&_.push(...Zi(E,360).features),v(Xe(_))});else if(m.geometry.type==="LineString"||m.geometry.type==="MultiLineString"){v(m);break e}}if(!b&&m.geometry.type!=="Point")break e;if(e instanceof Function){const E=e(i,m);E&&s.push(E.addTo(i))}else if(e){const E=[m.center[1],m.center[0]];s.push(typeof e=="object"?new ie.Marker(E,e):f(E).addTo(i))}}if(t)for(const y of d??[]){if(y===m)continue;const E=[y.center[1],y.center[0]];let _;if(t instanceof Function){if(_=t(i,y),!_)continue}else _=(typeof t=="object"?new ie.Marker(E,t):f(E,!0)).addTo(i).bindTooltip(y.place_type[0]==="reverse"?y.place_name:y.place_name.replace(/,.*/,""),{direction:"top"});const L=_.getElement();L&&(L.addEventListener("click",P=>{P.stopPropagation(),l==null||l({type:"markerClick",id:y.id})}),L.addEventListener("mouseenter",()=>{l==null||l({type:"markerMouseEnter",id:y.id})}),L.addEventListener("mouseleave",()=>{l==null||l({type:"markerMouseLeave",id:y.id})}),L.classList.toggle("marker-fuzzy",!!y.matching_text)),s.push(_)}},setSelectedMarker(d){var m,b;c&&((m=c.getElement())==null||m.classList.toggle("marker-selected",!1)),c=d>-1?s[d]:void 0,(b=c==null?void 0:c.getElement())==null||b.classList.toggle("marker-selected",!0)},getCenterAndZoom(){const d=i.getCenter();return[i.getZoom(),d.lng,d.lat]}}}function Zi(i,e){const t=yr(i);for(const n of t.features)if(n.geometry.type=="MultiPolygon")for(const r of n.geometry.coordinates)Qi(r,e);else Qi(n.geometry.coordinates,e);return t}function Qi(i,e){for(const t of i)for(const n of t)n[0]+=e}class Hi extends ie.Control{}ie.Util.extend(Hi.prototype,ie.Evented.prototype);class Vi extends Hi{constructor(t){super(t);Yt(this,re);Yt(this,Oe);Xt(this,Oe,t)}onAdd(t){const n=document.createElement("div");n.className="leaflet-ctrl-geocoder",ie.DomEvent.disableClickPropagation(n),ie.DomEvent.disableScrollPropagation(n);const{marker:r,showResultMarkers:o,flyTo:l,fullGeometryStyle:s,position:c,...u}=le(this,Oe),h=typeof l=="boolean"?{}:l,a=qi(t,r,o,h,h,s);Xt(this,re,new dr({target:n,props:{mapController:a,flyTo:l===void 0?!0:!!l,...u}}));const f={select:void 0,pick:void 0,featureslisted:void 0,featuresmarked:void 0,response:void 0,optionsvisibilitychange:void 0,reversetoggle:void 0,querychange:void 0};for(const d in f)le(this,re).$on(d,m=>this.fire(d,m.detail));return n}setOptions(t){var c;Object.assign(le(this,Oe),t);const{marker:n,showResultMarkers:r,flyTo:o,fullGeometryStyle:l,...s}=le(this,Oe);(c=le(this,re))==null||c.$set(s)}setQuery(t,n=!0){var r;(r=le(this,re))==null||r.setQuery(t,n)}clearMap(){var t;(t=le(this,re))==null||t.clearMap()}clearList(){var t;(t=le(this,re))==null||t.clearList()}setReverseMode(t){var n;(n=le(this,re))==null||n.$set({reverseActive:t})}focus(t){var n;(n=le(this,re))==null||n.focus(t)}blur(){var t;(t=le(this,re))==null||t.blur()}onRemove(){var t;(t=le(this,re))==null||t.$destroy()}}re=new WeakMap,Oe=new WeakMap;function Hr(...i){return new Vi(...i)}window.L&&typeof window.L=="object"&&typeof window.L.control=="function"&&(window.L.control.maptilerGeocoding=Hr),A.GeocodingControl=Vi,A.createLeafletMapController=qi,Object.defineProperty(A,Symbol.toStringTag,{value:"Module"})});
1
+ (function(K,$){typeof exports=="object"&&typeof module<"u"?$(exports,require("leaflet")):typeof define=="function"&&define.amd?define(["exports","leaflet"],$):(K=typeof globalThis<"u"?globalThis:K||self,$(K.leafletMaptilerGeocoder={},K.L))})(this,function(K,$){"use strict";var Ns=Object.defineProperty;var vn=K=>{throw TypeError(K)};var Os=(K,$,ge)=>$ in K?Ns(K,$,{enumerable:!0,configurable:!0,writable:!0,value:ge}):K[$]=ge;var I=(K,$,ge)=>Os(K,typeof $!="symbol"?$+"":$,ge),wn=(K,$,ge)=>$.has(K)||vn("Cannot "+ge);var Te=(K,$,ge)=>(wn(K,$,"read from private field"),ge?ge.call(K):$.get(K)),hi=(K,$,ge)=>$.has(K)?vn("Cannot add the same private member more than once"):$ instanceof WeakSet?$.add(K):$.set(K,ge),di=(K,$,ge,be)=>(wn(K,$,"write to private field"),be?be.call(K,ge):$.set(K,ge),ge);var fn,cn,Le,rt;function ge(i){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(i){for(const t in i)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(i,t);Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:()=>i[t]})}}return e.default=i,Object.freeze(e)}const be=ge($);function te(){}function Ln(i,e){for(const t in e)i[t]=e[t];return i}function mi(i){return i()}function pi(){return Object.create(null)}function Ue(i){i.forEach(mi)}function yi(i){return typeof i=="function"}function Ke(i,e){return i!=i?e==e:i!==e||i&&typeof i=="object"||typeof i=="function"}let Nt;function pe(i,e){return i===e?!0:(Nt||(Nt=document.createElement("a")),Nt.href=e,i===Nt.href)}function _n(i){return Object.keys(i).length===0}function Sn(i,e,t,n){if(i){const r=bi(i,e,t,n);return i[0](r)}}function bi(i,e,t,n){return i[1]&&n?Ln(t.ctx.slice(),i[1](n(e))):t.ctx}function xn(i,e,t,n){return i[2],e.dirty}function Tn(i,e,t,n,r,l){if(r){const a=bi(e,t,n,l);i.p(a,r)}}function Mn(i){if(i.ctx.length>32){const e=[],t=i.ctx.length/32;for(let n=0;n<t;n++)e[n]=-1;return e}return-1}function Ot(i){return i??""}function Z(i,e){i.appendChild(e)}function ne(i,e,t){i.insertBefore(e,t||null)}function ie(i){i.parentNode&&i.parentNode.removeChild(i)}function J(i){return document.createElement(i)}function ke(i){return document.createElementNS("http://www.w3.org/2000/svg",i)}function Ye(i){return document.createTextNode(i)}function we(){return Ye(" ")}function Cn(){return Ye("")}function fe(i,e,t,n){return i.addEventListener(e,t,n),()=>i.removeEventListener(e,t,n)}function Nn(i){return function(e){return e.preventDefault(),i.call(this,e)}}function x(i,e,t){t==null?i.removeAttribute(e):i.getAttribute(e)!==t&&i.setAttribute(e,t)}function On(i){return Array.from(i.childNodes)}function dt(i,e){e=""+e,i.data!==e&&(i.data=e)}function vi(i,e){i.value=e??""}function Ae(i,e,t){i.classList.toggle(e,!!t)}function kn(i,e,{bubbles:t=!1,cancelable:n=!1}={}){return new CustomEvent(i,{detail:e,bubbles:t,cancelable:n})}let gt;function mt(i){gt=i}function wi(){if(!gt)throw new Error("Function called outside component initialization");return gt}function Rn(i){wi().$$.on_destroy.push(i)}function Ei(){const i=wi();return(e,t,{cancelable:n=!1}={})=>{const r=i.$$.callbacks[e];if(r){const l=kn(e,t,{cancelable:n});return r.slice().forEach(a=>{a.call(i,l)}),!l.defaultPrevented}return!0}}function Pn(i,e){const t=i.$$.callbacks[e.type];t&&t.slice().forEach(n=>n.call(this,e))}const ut=[],jt=[];let at=[];const Li=[],An=Promise.resolve();let Zt=!1;function In(){Zt||(Zt=!0,An.then(_i))}function Ht(i){at.push(i)}const Vt=new Set;let ft=0;function _i(){if(ft!==0)return;const i=gt;do{try{for(;ft<ut.length;){const e=ut[ft];ft++,mt(e),Bn(e.$$)}}catch(e){throw ut.length=0,ft=0,e}for(mt(null),ut.length=0,ft=0;jt.length;)jt.pop()();for(let e=0;e<at.length;e+=1){const t=at[e];Vt.has(t)||(Vt.add(t),t())}at.length=0}while(ut.length);for(;Li.length;)Li.pop()();Zt=!1,Vt.clear(),mt(i)}function Bn(i){if(i.fragment!==null){i.update(),Ue(i.before_update);const e=i.dirty;i.dirty=[-1],i.fragment&&i.fragment.p(i.ctx,e),i.after_update.forEach(Ht)}}function Gn(i){const e=[],t=[];at.forEach(n=>i.indexOf(n)===-1?e.push(n):t.push(n)),t.forEach(n=>n()),at=e}const kt=new Set;let it;function Rt(){it={r:0,c:[],p:it}}function Pt(){it.r||Ue(it.c),it=it.p}function le(i,e){i&&i.i&&(kt.delete(i),i.i(e))}function de(i,e,t,n){if(i&&i.o){if(kt.has(i))return;kt.add(i),it.c.push(()=>{kt.delete(i),n&&(t&&i.d(1),n())}),i.o(e)}else n&&n()}function Si(i){return(i==null?void 0:i.length)!==void 0?i:Array.from(i)}function zn(i,e){de(i,1,1,()=>{e.delete(i.key)})}function Wn(i,e,t,n,r,l,a,o,d,c,L,_){let C=i.length,M=l.length,N=C;const A={};for(;N--;)A[i[N].key]=N;const k=[],O=new Map,S=new Map,R=[];for(N=M;N--;){const B=_(r,l,N),s=t(B);let u=a.get(s);u?R.push(()=>u.p(B,e)):(u=c(s,B),u.c()),O.set(s,k[N]=u),s in A&&S.set(s,Math.abs(N-A[s]))}const W=new Set,H=new Set;function D(B){le(B,1),B.m(o,L),a.set(B.key,B),L=B.first,M--}for(;C&&M;){const B=k[M-1],s=i[C-1],u=B.key,f=s.key;B===s?(L=B.first,C--,M--):O.has(f)?!a.has(u)||W.has(u)?D(B):H.has(f)?C--:S.get(u)>S.get(f)?(H.add(u),D(B)):(W.add(f),C--):(d(s,a),C--)}for(;C--;){const B=i[C];O.has(B.key)||d(B,a)}for(;M;)D(k[M-1]);return Ue(R),k}function Xe(i){i&&i.c()}function Fe(i,e,t){const{fragment:n,after_update:r}=i.$$;n&&n.m(e,t),Ht(()=>{const l=i.$$.on_mount.map(mi).filter(yi);i.$$.on_destroy?i.$$.on_destroy.push(...l):Ue(l),i.$$.on_mount=[]}),r.forEach(Ht)}function qe(i,e){const t=i.$$;t.fragment!==null&&(Gn(t.after_update),Ue(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function Dn(i,e){i.$$.dirty[0]===-1&&(ut.push(i),In(),i.$$.dirty.fill(0)),i.$$.dirty[e/31|0]|=1<<e%31}function Qe(i,e,t,n,r,l,a=null,o=[-1]){const d=gt;mt(i);const c=i.$$={fragment:null,ctx:[],props:l,update:te,not_equal:r,bound:pi(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(d?d.$$.context:[])),callbacks:pi(),dirty:o,skip_bound:!1,root:e.target||d.$$.root};a&&a(c.root);let L=!1;if(c.ctx=t?t(i,e.props||{},(_,C,...M)=>{const N=M.length?M[0]:C;return c.ctx&&r(c.ctx[_],c.ctx[_]=N)&&(!c.skip_bound&&c.bound[_]&&c.bound[_](N),L&&Dn(i,_)),C}):[],c.update(),L=!0,Ue(c.before_update),c.fragment=n?n(c.ctx):!1,e.target){if(e.hydrate){const _=On(e.target);c.fragment&&c.fragment.l(_),_.forEach(ie)}else c.fragment&&c.fragment.c();e.intro&&le(i.$$.fragment),Fe(i,e.target,e.anchor),_i()}mt(d)}class Je{constructor(){I(this,"$$");I(this,"$$set")}$destroy(){qe(this,1),this.$destroy=te}$on(e,t){if(!yi(t))return te;const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{const r=n.indexOf(t);r!==-1&&n.splice(r,1)}}$set(e){this.$$set&&!_n(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const Un="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Un);function Fn(i){let e,t;return{c(){e=ke("svg"),t=ke("path"),x(t,"d","M13.12.706a.982.982 0 0 0-1.391 0L6.907 5.517 2.087.696a.982.982 0 1 0-1.391 1.39l4.821 4.821L.696 11.73a.982.982 0 1 0 1.39 1.39l4.821-4.821 4.822 4.821a.982.982 0 1 0 1.39-1.39L8.298 6.908l4.821-4.822a.988.988 0 0 0 0-1.38Z"),x(e,"viewBox","0 0 14 14"),x(e,"width","13"),x(e,"height","13"),x(e,"class","svelte-en2qvf")},m(n,r){ne(n,e,r),Z(e,t)},p:te,i:te,o:te,d(n){n&&ie(e)}}}class xi extends Je{constructor(e){super(),Qe(this,e,null,Fn,Ke,{})}}function qn(i){let e,t;return{c(){e=ke("svg"),t=ke("path"),x(t,"d","M15 0C6.705 0 0 6.705 0 15C0 23.295 6.705 30 15 30C23.295 30 30 23.295 30 15C30 6.705 23.295 0 15 0ZM22.5 20.385L20.385 22.5L15 17.115L9.615 22.5L7.5 20.385L12.885 15L7.5 9.615L9.615 7.5L15 12.885L20.385 7.5L22.5 9.615L17.115 15L22.5 20.385Z"),x(e,"viewBox","0 0 30 30"),x(e,"fill","none"),x(e,"xmlns","http://www.w3.org/2000/svg"),x(e,"class","svelte-d2loi5")},m(n,r){ne(n,e,r),Z(e,t)},p:te,i:te,o:te,d(n){n&&ie(e)}}}class Ti extends Je{constructor(e){super(),Qe(this,e,null,qn,Ke,{})}}function jn(i){let e,t;return{c(){e=J("img"),pe(e.src,t=i[3]+"area.svg")||x(e,"src",t),x(e,"alt",i[6]),x(e,"title",i[6]),x(e,"class","svelte-z7p9pp")},m(n,r){ne(n,e,r)},p(n,r){r&8&&!pe(e.src,t=n[3]+"area.svg")&&x(e,"src",t),r&64&&x(e,"alt",n[6]),r&64&&x(e,"title",n[6])},d(n){n&&ie(e)}}}function Zn(i){let e,t;return{c(){e=J("img"),pe(e.src,t=i[3]+"reverse.svg")||x(e,"src",t),x(e,"alt",i[6]),x(e,"title",i[6]),x(e,"class","svelte-z7p9pp")},m(n,r){ne(n,e,r)},p(n,r){r&8&&!pe(e.src,t=n[3]+"reverse.svg")&&x(e,"src",t),r&64&&x(e,"alt",n[6]),r&64&&x(e,"title",n[6])},d(n){n&&ie(e)}}}function Hn(i){let e,t;return{c(){e=J("img"),pe(e.src,t=i[3]+"poi.svg")||x(e,"src",t),x(e,"alt",i[6]),x(e,"title",i[6]),x(e,"class","svelte-z7p9pp")},m(n,r){ne(n,e,r)},p(n,r){r&8&&!pe(e.src,t=n[3]+"poi.svg")&&x(e,"src",t),r&64&&x(e,"alt",n[6]),r&64&&x(e,"title",n[6])},d(n){n&&ie(e)}}}function Vn(i){let e,t;return{c(){e=J("img"),pe(e.src,t=i[3]+"postal_code.svg")||x(e,"src",t),x(e,"alt",i[6]),x(e,"title",i[6]),x(e,"class","svelte-z7p9pp")},m(n,r){ne(n,e,r)},p(n,r){r&8&&!pe(e.src,t=n[3]+"postal_code.svg")&&x(e,"src",t),r&64&&x(e,"alt",n[6]),r&64&&x(e,"title",n[6])},d(n){n&&ie(e)}}}function Kn(i){let e,t;return{c(){e=J("img"),pe(e.src,t=i[3]+"street.svg")||x(e,"src",t),x(e,"alt",i[6]),x(e,"title",i[6]),x(e,"class","svelte-z7p9pp")},m(n,r){ne(n,e,r)},p(n,r){r&8&&!pe(e.src,t=n[3]+"street.svg")&&x(e,"src",t),r&64&&x(e,"alt",n[6]),r&64&&x(e,"title",n[6])},d(n){n&&ie(e)}}}function Yn(i){let e,t;return{c(){e=J("img"),pe(e.src,t=i[3]+"road.svg")||x(e,"src",t),x(e,"alt",i[6]),x(e,"title",i[6]),x(e,"class","svelte-z7p9pp")},m(n,r){ne(n,e,r)},p(n,r){r&8&&!pe(e.src,t=n[3]+"road.svg")&&x(e,"src",t),r&64&&x(e,"alt",n[6]),r&64&&x(e,"title",n[6])},d(n){n&&ie(e)}}}function Xn(i){let e,t;return{c(){e=J("img"),pe(e.src,t=i[3]+"housenumber.svg")||x(e,"src",t),x(e,"alt",i[6]),x(e,"title",i[6]),x(e,"class","svelte-z7p9pp")},m(n,r){ne(n,e,r)},p(n,r){r&8&&!pe(e.src,t=n[3]+"housenumber.svg")&&x(e,"src",t),r&64&&x(e,"alt",n[6]),r&64&&x(e,"title",n[6])},d(n){n&&ie(e)}}}function Qn(i){let e,t,n,r;return{c(){e=J("img"),pe(e.src,t=i[5])||x(e,"src",t),x(e,"alt",i[4]),x(e,"title",i[6]),x(e,"class","svelte-z7p9pp")},m(l,a){ne(l,e,a),n||(r=fe(e,"error",i[14]),n=!0)},p(l,a){a&32&&!pe(e.src,t=l[5])&&x(e,"src",t),a&16&&x(e,"alt",l[4]),a&64&&x(e,"title",l[6])},d(l){l&&ie(e),n=!1,r()}}}function Mi(i){let e,t;return{c(){e=J("span"),t=Ye(i[6]),x(e,"class","secondary svelte-z7p9pp")},m(n,r){ne(n,e,r),Z(e,t)},p(n,r){r&64&&dt(t,n[6])},d(n){n&&ie(e)}}}function Jn(i){let e,t,n,r,l,a,o,d,c,L=(i[8]?i[0].place_name:i[0].place_name.replace(/,.*/,""))+"",_,C,M=i[2]==="always"||i[2]!=="never"&&!i[0].address&&!i[0].id.startsWith("road.")&&!i[0].id.startsWith("address.")&&!i[0].id.startsWith("postal_code.")&&(!i[0].id.startsWith("poi.")||!i[5])&&!i[8],N,A,k=(i[8]?"":i[0].place_name.replace(/[^,]*,?\s*/,""))+"",O,S,R,W,H,D;function B(m,h){return h&1&&(t=null),h&1&&(n=null),h&1&&(r=null),h&1&&(l=null),m[5]?Qn:m[0].address?Xn:(t==null&&(t=!!m[0].id.startsWith("road.")),t?Yn:(n==null&&(n=!!m[0].id.startsWith("address.")),n?Kn:(r==null&&(r=!!m[0].id.startsWith("postal_code.")),r?Vn:(l==null&&(l=!!m[0].id.startsWith("poi.")),l?Hn:m[8]?Zn:jn))))}let s=B(i,-1),u=s(i),f=M&&Mi(i);return{c(){e=J("li"),u.c(),a=we(),o=J("span"),d=J("span"),c=J("span"),_=Ye(L),C=we(),f&&f.c(),N=we(),A=J("span"),O=Ye(k),x(c,"class","primary svelte-z7p9pp"),x(d,"class","svelte-z7p9pp"),x(A,"class","line2 svelte-z7p9pp"),x(o,"class","texts svelte-z7p9pp"),x(e,"tabindex","-1"),x(e,"role","option"),x(e,"aria-selected",S=i[1]==="selected"),x(e,"aria-checked",R=i[1]==="picked"),x(e,"class",W=Ot(i[1])+" svelte-z7p9pp")},m(m,h){ne(m,e,h),u.m(e,null),Z(e,a),Z(e,o),Z(o,d),Z(d,c),Z(c,_),Z(d,C),f&&f.m(d,null),Z(o,N),Z(o,A),Z(A,O),H||(D=[fe(e,"mouseenter",i[13]),fe(e,"focus",i[15]),fe(e,"click",i[16])],H=!0)},p(m,[h]){s===(s=B(m,h))&&u?u.p(m,h):(u.d(1),u=s(m),u&&(u.c(),u.m(e,a))),h&1&&L!==(L=(m[8]?m[0].place_name:m[0].place_name.replace(/,.*/,""))+"")&&dt(_,L),h&37&&(M=m[2]==="always"||m[2]!=="never"&&!m[0].address&&!m[0].id.startsWith("road.")&&!m[0].id.startsWith("address.")&&!m[0].id.startsWith("postal_code.")&&(!m[0].id.startsWith("poi.")||!m[5])&&!m[8]),M?f?f.p(m,h):(f=Mi(m),f.c(),f.m(d,null)):f&&(f.d(1),f=null),h&1&&k!==(k=(m[8]?"":m[0].place_name.replace(/[^,]*,?\s*/,""))+"")&&dt(O,k),h&2&&S!==(S=m[1]==="selected")&&x(e,"aria-selected",S),h&2&&R!==(R=m[1]==="picked")&&x(e,"aria-checked",R),h&2&&W!==(W=Ot(m[1])+" svelte-z7p9pp")&&x(e,"class",W)},i:te,o:te,d(m){m&&ie(e),u.d(),f&&f.d(),H=!1,Ue(D)}}}function $n(i,e,t){var H;let n,r,{feature:l}=e,{style:a="default"}=e,{showPlaceType:o}=e,{missingIconsCache:d}=e,{iconsBaseUrl:c}=e;const L=Ei(),_=(H=l.properties)==null?void 0:H.categories;let C,M,N=0,A=l.place_type[0]==="reverse";function k(){M&&d.add(M),t(11,N++,N)}function O(D){Pn.call(this,i,D)}const S=()=>k(),R=()=>L("select",void 0),W=D=>{document.activeElement!==D.target&&L("select",void 0)};return i.$$set=D=>{"feature"in D&&t(0,l=D.feature),"style"in D&&t(1,a=D.style),"showPlaceType"in D&&t(2,o=D.showPlaceType),"missingIconsCache"in D&&t(10,d=D.missingIconsCache),"iconsBaseUrl"in D&&t(3,c=D.iconsBaseUrl)},i.$$.update=()=>{var D,B,s,u;if(i.$$.dirty&7224)do t(12,n--,n),t(4,C=_==null?void 0:_[n]),t(5,M=C?c+C.replace(/ /g,"_")+".svg":void 0);while(n>-1&&(!M||d.has(M)));i.$$.dirty&1&&t(6,r=((B=(D=l.properties)==null?void 0:D.categories)==null?void 0:B.join(", "))??((u=(s=l.properties)==null?void 0:s.place_type_name)==null?void 0:u[0])??l.place_type[0])},t(12,n=(_==null?void 0:_.length)??0),[l,a,o,c,C,M,r,L,A,k,d,N,n,O,S,R,W]}class er extends Je{constructor(e){super(),Qe(this,e,$n,Jn,Ke,{feature:0,style:1,showPlaceType:2,missingIconsCache:10,iconsBaseUrl:3})}}function tr(i){let e;return{c(){e=J("div"),e.innerHTML='<svg viewBox="0 0 18 18" width="24" height="24" class="svelte-7cmwmc"><path fill="#333" d="M4.4 4.4l.8.8c2.1-2.1 5.5-2.1 7.6 0l.8-.8c-2.5-2.5-6.7-2.5-9.2 0z"></path><path opacity=".1" d="M12.8 12.9c-2.1 2.1-5.5 2.1-7.6 0-2.1-2.1-2.1-5.5 0-7.7l-.8-.8c-2.5 2.5-2.5 6.7 0 9.2s6.6 2.5 9.2 0 2.5-6.6 0-9.2l-.8.8c2.2 2.1 2.2 5.6 0 7.7z"></path></svg>',x(e,"class","svelte-7cmwmc")},m(t,n){ne(t,e,n)},p:te,i:te,o:te,d(t){t&&ie(e)}}}class ir extends Je{constructor(e){super(),Qe(this,e,null,tr,Ke,{})}}function nr(i){let e,t,n;return{c(){e=ke("svg"),t=ke("path"),x(t,"stroke-width","4"),x(t,"d","M 5,33.103579 C 5,17.607779 18.457,5 35,5 C 51.543,5 65,17.607779 65,33.103579 C 65,56.388679 40.4668,76.048179 36.6112,79.137779 C 36.3714,79.329879 36.2116,79.457979 36.1427,79.518879 C 35.8203,79.800879 35.4102,79.942779 35,79.942779 C 34.5899,79.942779 34.1797,79.800879 33.8575,79.518879 C 33.7886,79.457979 33.6289,79.330079 33.3893,79.138079 C 29.5346,76.049279 5,56.389379 5,33.103579 Z M 35.0001,49.386379 C 43.1917,49.386379 49.8323,42.646079 49.8323,34.331379 C 49.8323,26.016779 43.1917,19.276479 35.0001,19.276479 C 26.8085,19.276479 20.1679,26.016779 20.1679,34.331379 C 20.1679,42.646079 26.8085,49.386379 35.0001,49.386379 Z"),x(t,"class","svelte-gzo3ar"),x(e,"width",n=i[0]==="list"?20:void 0),x(e,"viewBox","0 0 70 85"),x(e,"fill","none"),x(e,"class","svelte-gzo3ar"),Ae(e,"in-map",i[0]!=="list"),Ae(e,"list-icon",i[0]==="list")},m(r,l){ne(r,e,l),Z(e,t)},p(r,[l]){l&1&&n!==(n=r[0]==="list"?20:void 0)&&x(e,"width",n),l&1&&Ae(e,"in-map",r[0]!=="list"),l&1&&Ae(e,"list-icon",r[0]==="list")},i:te,o:te,d(r){r&&ie(e)}}}function rr(i,e,t){let{displayIn:n}=e;return i.$$set=r=>{"displayIn"in r&&t(0,n=r.displayIn)},[n]}class sr extends Je{constructor(e){super(),Qe(this,e,rr,nr,Ke,{displayIn:0})}}function or(i){let e,t;return{c(){e=ke("svg"),t=ke("path"),x(t,"d","M30.003-26.765C13.46-26.765 0-14.158 0 1.337c0 23.286 24.535 42.952 28.39 46.04.24.192.402.316.471.376.323.282.732.424 1.142.424.41 0 .82-.142 1.142-.424.068-.06.231-.183.471-.376 3.856-3.09 28.39-22.754 28.39-46.04 0-15.495-13.46-28.102-30.003-28.102Zm1.757 12.469c4.38 0 7.858 1.052 10.431 3.158 2.595 2.105 3.89 4.913 3.89 8.422 0 2.34-.53 4.362-1.593 6.063-1.063 1.702-3.086 3.616-6.063 5.742-2.042 1.51-3.337 2.659-3.89 3.446-.532.787-.8 1.82-.8 3.096v1.914h-8.449V15.18c0-2.041.434-3.815 1.306-5.325.872-1.51 2.467-3.118 4.785-4.82 2.233-1.594 3.7-2.89 4.402-3.889a5.582 5.582 0 0 0 1.087-3.35c0-1.382-.51-2.435-1.531-3.158-1.02-.723-2.45-1.087-4.28-1.087-3.19 0-6.826 1.047-10.91 3.131l-3.472-6.986c4.742-2.659 9.77-3.992 15.087-3.992Zm-1.88 37.324c1.765 0 3.124.472 4.08 1.408.98.936 1.47 2.276 1.47 4.02 0 1.68-.49 3.007-1.47 3.985-.977.957-2.336 1.435-4.08 1.435-1.787 0-3.171-.465-4.15-1.4-.978-.958-1.47-2.298-1.47-4.02 0-1.787.48-3.14 1.436-4.054.957-.915 2.355-1.374 4.184-1.374Z"),x(e,"viewBox","0 0 60.006 21.412"),x(e,"width","14"),x(e,"height","20"),x(e,"class","svelte-en2qvf")},m(n,r){ne(n,e,r),Z(e,t)},p:te,i:te,o:te,d(n){n&&ie(e)}}}class lr extends Je{constructor(e){super(),Qe(this,e,null,or,Ke,{})}}function ur(i){let e,t,n;return{c(){e=ke("svg"),t=ke("circle"),n=ke("path"),x(t,"cx","4.789"),x(t,"cy","4.787"),x(t,"r","3.85"),x(t,"class","svelte-1aq105l"),x(n,"d","M12.063 12.063 7.635 7.635"),x(n,"class","svelte-1aq105l"),x(e,"xmlns","http://www.w3.org/2000/svg"),x(e,"width","13"),x(e,"height","13"),x(e,"viewBox","0 0 13 13"),x(e,"class","svelte-1aq105l")},m(r,l){ne(r,e,l),Z(e,t),Z(e,n)},p:te,i:te,o:te,d(r){r&&ie(e)}}}class ar extends Je{constructor(e){super(),Qe(this,e,null,ur,Ke,{})}}function fr(i,e,t){const n=e[1],r=e[0],l=n-r;return i===n&&t?i:((i-r)%l+l)%l+r}function pt(i){const e=[...i];return e[2]<e[0]&&(Math.abs((e[0]+e[2]+360)/2)>Math.abs((e[0]-360+e[2])/2)?e[0]-=360:e[2]+=360),e}let yt;async function cr(i,e,t){const n=i==null?void 0:i.getCenterAndZoom();for(const r of e??[])if(!(n&&(r.minZoom!=null&&r.minZoom>n[0]||r.maxZoom!=null&&r.maxZoom<n[0]))){if(r.type==="fixed")return r.coordinates.join(",");e:if(r.type==="client-geolocation"){if(yt&&r.cachedLocationExpiry&&yt.time+r.cachedLocationExpiry>Date.now()){if(!yt.coords)break e;return yt.coords}let l;try{return l=await new Promise((a,o)=>{t.signal.addEventListener("abort",()=>{o(Error("aborted"))}),navigator.geolocation.getCurrentPosition(d=>{a([d.coords.longitude,d.coords.latitude].map(c=>c.toFixed(6)).join(","))},d=>{o(d)},r)}),l}catch{}finally{r.cachedLocationExpiry&&(yt={time:Date.now(),coords:l})}if(t.signal.aborted)return}if(r.type==="server-geolocation")return"ip";if(n&&r.type==="map-center")return n[1].toFixed(6)+","+n[2].toFixed(6)}}const hr=/^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([6-9][0-9])\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([6-9][0-9])\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*(EAST|WEST|[EW])?$/i,Ci=/^([+-]?[0-8]?[0-9])\s+([0-5]?[0-9]\.\d{3,})[\s,]{1,}([+-]?[0-1]?[0-9]?[0-9])\s+([0-5]?[0-9]\.\d{3,})$/,Ni=/^(NORTH|SOUTH|[NS])?[\s]*([+-]?[0-8]?[0-9](?:[\.,]\d{3,}))[\s]*([•º°]?)[\s]*(NORTH|SOUTH|[NS])?[\s]*[,/;]?[\s]*(EAST|WEST|[EW])?[\s]*([+-]?[0-1]?[0-9]?[0-9](?:[\.,]\d{3,}))[\s]*([•º°]?)[\s]*(EAST|WEST|[EW])?$/i,Oi=/^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*(\.)\s*([0-5]?[0-9])\s*(\.)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*(\.)\s*([0-5]?[0-9])\s*(\.)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(EAST|WEST|[EW])?$/i,ki=/^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*(D(?:EG)?(?:REES)?)\s*([0-5]?[0-9])\s*(M(?:IN)?(?:UTES)?)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(S(?:EC)?(?:ONDS)?)?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*(D(?:EG)?(?:REES)?)\s*([0-5]?[0-9])\s*(M(?:IN)?(?:UTES)?)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(S(?:EC)?(?:ONDS)?)\s*(EAST|WEST|[EW])?$/i,Ri=/^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([0-5]?[0-9](?:[\.,]\d{1,})?)?\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*,?((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(''|′′|’’|´´|["″”\.])?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([0-5]?[0-9](?:[\.,]\d{1,})?)?\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*,?((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(''|′′|´´|’’|["″”\.])?\s*(EAST|WEST|[EW])?$/i;function dr(i){if(!["DMS","DM","DD"].includes(i))throw new Error("invalid format specified");if(this.decimalCoordinates&&this.decimalCoordinates.trim()){const e=this.decimalCoordinates.split(",").map(M=>Number(M.trim())),t=Number(e[0]),n=Number(e[1]),r=Math.abs(t),l=Math.abs(n),a=t>0?"N":"S",o=n>0?"E":"W";let d;i=="DD"&&(d=`${r}° ${a}, ${l}° ${o}`);const c=Math.floor(r),L=Math.floor(l),_=(r-c)*60,C=(l-L)*60;if(i=="DM"){let M=Pi(_,3).toFixed(3).padStart(6,"0"),N=Pi(C,3).toFixed(3).padStart(6,"0");M.endsWith(".000")&&N.endsWith(".000")&&(M=M.replace(/\.000$/,""),N=N.replace(/\.000$/,"")),d=`${c}° ${M}' ${a}, ${L}° ${N}' ${o}`}if(i=="DMS"){const M=Math.floor(_),N=Math.floor(C);let A=((_-M)*60).toFixed(1).padStart(4,"0"),k=((C-N)*60).toFixed(1).padStart(4,"0");const O=M.toString().padStart(2,"0"),S=N.toString().padStart(2,"0");A.endsWith(".0")&&k.endsWith(".0")&&(A=A.replace(/\.0$/,""),k=k.replace(/\.0$/,"")),d=`${c}° ${O}' ${A}" ${a}, ${L}° ${S}' ${k}" ${o}`}return d}else throw new Error("no decimal coordinates to convert")}function Pi(i,e){const t=Math.pow(10,e);return Math.round((i+Number.EPSILON)*t)/t}function Kt(i,e){e||(e=5),i=i.replace(/\s+/g," ").trim();let t=null,n=null,r="",l="",a=null,o=[],d=!1;if(hr.test(i))throw new Error("invalid coordinate value");if(Ci.test(i))if(o=Ci.exec(i),d=bt(o),d)t=Math.abs(o[1])+o[2]/60,Number(o[1])<0&&(t*=-1),n=Math.abs(o[3])+o[4]/60,Number(o[3])<0&&(n*=-1),a="DM";else throw new Error("invalid coordinate format");else if(Ni.test(i))if(o=Ni.exec(i),d=bt(o),d){if(t=o[2],n=o[6],t.includes(",")&&(t=t.replace(",",".")),n.includes(",")&&(n=n.replace(",",".")),a="DD",Number(Math.round(t))==Number(t))throw new Error("integer only coordinate provided");if(Number(Math.round(n))==Number(n))throw new Error("integer only coordinate provided");o[1]?(r=o[1],l=o[5]):o[4]&&(r=o[4],l=o[8])}else throw new Error("invalid decimal coordinate format");else if(Oi.test(i))if(o=Oi.exec(i),d=bt(o),d)t=Math.abs(parseInt(o[2])),o[4]&&(t+=o[4]/60,a="DM"),o[6]&&(t+=o[6].replace(",",".")/3600,a="DMS"),parseInt(o[2])<0&&(t=-1*t),n=Math.abs(parseInt(o[9])),o[11]&&(n+=o[11]/60),o[13]&&(n+=o[13].replace(",",".")/3600),parseInt(o[9])<0&&(n=-1*n),o[1]?(r=o[1],l=o[8]):o[7]&&(r=o[7],l=o[14]);else throw new Error("invalid DMS coordinates format");else if(ki.test(i))if(o=ki.exec(i),d=bt(o),d)t=Math.abs(parseInt(o[2])),o[4]&&(t+=o[4]/60,a="DM"),o[6]&&(t+=o[6]/3600,a="DMS"),parseInt(o[2])<0&&(t=-1*t),n=Math.abs(parseInt(o[10])),o[12]&&(n+=o[12]/60),o[14]&&(n+=o[14]/3600),parseInt(o[10])<0&&(n=-1*n),o[1]?(r=o[1],l=o[9]):o[8]&&(r=o[8],l=o[16]);else throw new Error("invalid DMS coordinates format");else if(Ri.test(i)){if(o=Ri.exec(i),d=bt(o),o.filter(c=>c).length<=5)throw new Error("invalid coordinates format");if(d)t=Math.abs(parseInt(o[2])),o[4]&&(t+=o[4].replace(",",".")/60,a="DM"),o[6]&&(t+=o[6].replace(",",".")/3600,a="DMS"),parseInt(o[2])<0&&(t=-1*t),n=Math.abs(parseInt(o[10])),o[12]&&(n+=o[12].replace(",",".")/60),o[14]&&(n+=o[14].replace(",",".")/3600),parseInt(o[10])<0&&(n=-1*n),o[1]?(r=o[1],l=o[9]):o[8]&&(r=o[8],l=o[16]);else throw new Error("invalid coordinates format")}if(d){if(Math.abs(n)>=180)throw new Error("invalid longitude value");if(Math.abs(t)>=90)throw new Error("invalid latitude value");if(r&&!l||!r&&l)throw new Error("invalid coordinates value");if(r&&r==l)throw new Error("invalid coordinates format");t.toString().includes(",")&&(t=t.replace(",",".")),n.toString().includes(",")&&(n=n.replace(",","."));let c=/S|SOUTH/i;c.test(r)&&t>0&&(t=-1*t),c=/W|WEST/i,c.test(l)&&n>0&&(n=-1*n);const L=o[0].trim();let _,C;const M=/[,/;\u0020]/g,N=L.match(M);if(N==null){const O=Math.floor(i.length/2);_=L.substring(0,O).trim(),C=L.substring(O).trim()}else{let O;N.length%2==1?O=Math.floor(N.length/2):O=N.length/2-1;let S=0;if(O==0)S=L.indexOf(N[0]),_=L.substring(0,S).trim(),C=L.substring(S+1).trim();else{let R=0,W=0;for(;R<=O;)S=L.indexOf(N[R],W),W=S+1,R++;_=L.substring(0,S).trim(),C=L.substring(S+1).trim()}}const A=_.split(".");if(A.length==2&&A[1]==0&&A[1].length!=2)throw new Error("invalid coordinates format");const k=C.split(".");if(k.length==2&&k[1]==0&&k[1].length!=2)throw new Error("invalid coordinates format");if(/^\d+$/.test(_)||/^\d+$/.test(C))throw new Error("degree only coordinate/s provided");return t=Number(Number(t).toFixed(e)),n=Number(Number(n).toFixed(e)),Object.freeze({verbatimCoordinates:L,verbatimLatitude:_,verbatimLongitude:C,decimalLatitude:t,decimalLongitude:n,decimalCoordinates:`${t},${n}`,originalFormat:a,closeEnough:gr,toCoordinateFormat:dr})}else throw new Error("coordinates pattern match failed")}function bt(i){if(!isNaN(i[0]))return!1;const e=[...i];if(e.shift(),e.length%2>0)return!1;const t=/^[-+]?\d+([\.,]\d+)?$/,n=/[eastsouthnorthwest]+/i,r=e.length/2;for(let l=0;l<r;l++){const a=e[l],o=e[l+r],d=t.test(a)&&t.test(o),c=n.test(a)&&n.test(o),L=a==o;if(!(a==null&&o==null)){if(a==null||o==null)return!1;if(d||c||L)continue;return!1}}return!0}function Ai(i,e){const t=Math.abs(i-e);return Number(t.toFixed(6))<=1e-5}function gr(i){if(!i)throw new Error("coords must be provided");if(i.includes(",")){const e=i.split(",");if(Number(e[0])==NaN||Number(e[1])==NaN)throw new Error("coords are not valid decimals");return Ai(this.decimalLatitude,Number(e[0]))&&Ai(this.decimalLongitude,e[1])}else throw new Error("coords being tested must be separated by a comma")}const mr=Object.freeze({DMS:"DMS",DM:"DM",DD:"DD"});Kt.to=mr;const pr=[{verbatimCoordinates:"40.123, -74.123",verbatimLatitude:"40.123",verbatimLongitude:"-74.123"},{verbatimCoordinates:"40.123° N 74.123° W",verbatimLatitude:"40.123° N",verbatimLongitude:"74.123° W"},{verbatimCoordinates:"40.123° N 74.123° W",verbatimLatitude:"40.123° N",verbatimLongitude:"74.123° W"},{verbatimCoordinates:'40° 7´ 22.8" N 74° 7´ 22.8" W',verbatimLatitude:'40° 7´ 22.8" N',verbatimLongitude:'74° 7´ 22.8" W'},{verbatimCoordinates:"40° 7.38’ , -74° 7.38’",verbatimLatitude:"40° 7.38’",verbatimLongitude:"-74° 7.38’"},{verbatimCoordinates:"N40°7’22.8’’, W74°7’22.8’’",verbatimLatitude:"N40°7’22.8’’",verbatimLongitude:"W74°7’22.8’’"},{verbatimCoordinates:'40°7’22.8"N, 74°7’22.8"W',verbatimLatitude:'40°7’22.8"N',verbatimLongitude:'74°7’22.8"W'},{verbatimCoordinates:`40°7'22.8"N, 74°7'22.8"W`,verbatimLatitude:`40°7'22.8"N`,verbatimLongitude:`74°7'22.8"W`},{verbatimCoordinates:"40 7 22.8, -74 7 22.8",verbatimLatitude:"40 7 22.8",verbatimLongitude:"-74 7 22.8"},{verbatimCoordinates:"40.123 -74.123",verbatimLatitude:"40.123",verbatimLongitude:"-74.123"},{verbatimCoordinates:"40.123°,-74.123°",verbatimLatitude:"40.123°",verbatimLongitude:"-74.123°"},{verbatimCoordinates:"40.123N74.123W",verbatimLatitude:"40.123N",verbatimLongitude:"74.123W"},{verbatimCoordinates:"4007.38N7407.38W",verbatimLatitude:"4007.38N",verbatimLongitude:"7407.38W"},{verbatimCoordinates:'40°7’22.8"N, 74°7’22.8"W',verbatimLatitude:'40°7’22.8"N',verbatimLongitude:'74°7’22.8"W'},{verbatimCoordinates:"400722.8N740722.8W",verbatimLatitude:"400722.8N",verbatimLongitude:"740722.8W"},{verbatimCoordinates:"N 40 7.38 W 74 7.38",verbatimLatitude:"N 40 7.38",verbatimLongitude:"W 74 7.38"},{verbatimCoordinates:"40:7:22.8N 74:7:22.8W",verbatimLatitude:"40:7:22.8N",verbatimLongitude:"74:7:22.8W"},{verbatimCoordinates:"40:7:23N,74:7:23W",verbatimLatitude:"40:7:23N",verbatimLongitude:"74:7:23W",decimalLatitude:40.1230555555,decimalLongitude:-74.1230555555},{verbatimCoordinates:'40°7’23"N 74°7’23"W',verbatimLatitude:'40°7’23"N',verbatimLongitude:'74°7’23"W',decimalLatitude:40.1230555555,decimalLongitude:-74.12305555555555},{verbatimCoordinates:'40°7’23"S 74°7’23"E',verbatimLatitude:'40°7’23"S',verbatimLongitude:'74°7’23"E',decimalLatitude:-40.1230555555,decimalLongitude:74.12305555555555},{verbatimCoordinates:'40°7’23" -74°7’23"',verbatimLatitude:'40°7’23"',verbatimLongitude:'-74°7’23"',decimalLatitude:40.1230555555,decimalLongitude:-74.123055555},{verbatimCoordinates:'40d 7’ 23" N 74d 7’ 23" W',verbatimLatitude:'40d 7’ 23" N',verbatimLongitude:'74d 7’ 23" W',decimalLatitude:40.1230555555,decimalLongitude:-74.123055555},{verbatimCoordinates:"40.123N 74.123W",verbatimLatitude:"40.123N",verbatimLongitude:"74.123W"},{verbatimCoordinates:"40° 7.38, -74° 7.38",verbatimLatitude:"40° 7.38",verbatimLongitude:"-74° 7.38"},{verbatimCoordinates:"40° 7.38, -74° 7.38",verbatimLatitude:"40° 7.38",verbatimLongitude:"-74° 7.38"},{verbatimCoordinates:"40 7 22.8; -74 7 22.8",verbatimLatitude:"40 7 22.8",verbatimLongitude:"-74 7 22.8"}],yr={decimalLatitude:40.123,decimalLongitude:-74.123},br=[{verbatimCoordinates:`50°4'17.698"south, 14°24'2.826"east`,verbatimLatitude:`50°4'17.698"south`,verbatimLongitude:`14°24'2.826"east`,decimalLatitude:-50.07158277777778,decimalLongitude:14.400785},{verbatimCoordinates:"50d4m17.698S 14d24m2.826E",verbatimLatitude:"50d4m17.698S",verbatimLongitude:"14d24m2.826E",decimalLatitude:-50.07158277777778,decimalLongitude:14.400785},{verbatimCoordinates:"40:26:46N,79:56:55W",verbatimLatitude:"40:26:46N",verbatimLongitude:"79:56:55W",decimalLatitude:40.44611111111111,decimalLongitude:-79.9486111111111},{verbatimCoordinates:"40:26:46.302N 79:56:55.903W",verbatimLatitude:"40:26:46.302N",verbatimLongitude:"79:56:55.903W",decimalLatitude:40.446195,decimalLongitude:-79.94886194444445},{verbatimCoordinates:"40°26′47″N 79°58′36″W",verbatimLatitude:"40°26′47″N",verbatimLongitude:"79°58′36″W",decimalLatitude:40.44638888888889,decimalLongitude:-79.97666666666667},{verbatimCoordinates:"40d 26′ 47″ N 79d 58′ 36″ W",verbatimLatitude:"40d 26′ 47″ N",verbatimLongitude:"79d 58′ 36″ W",decimalLatitude:40.44638888888889,decimalLongitude:-79.97666666666667},{verbatimCoordinates:"40.446195N 79.948862W",verbatimLatitude:"40.446195N",verbatimLongitude:"79.948862W",decimalLatitude:40.446195,decimalLongitude:-79.948862},{verbatimCoordinates:"40,446195° 79,948862°",verbatimLatitude:"40,446195°",verbatimLongitude:"79,948862°",decimalLatitude:40.446195,decimalLongitude:79.948862},{verbatimCoordinates:"40° 26.7717, -79° 56.93172",verbatimLatitude:"40° 26.7717",verbatimLongitude:"-79° 56.93172",decimalLatitude:40.446195,decimalLongitude:-79.948862},{verbatimCoordinates:"40.446195, -79.948862",verbatimLatitude:"40.446195",verbatimLongitude:"-79.948862",decimalLatitude:40.446195,decimalLongitude:-79.948862},{verbatimCoordinates:"40.123256; -74.123256",verbatimLatitude:"40.123256",verbatimLongitude:"-74.123256",decimalLatitude:40.123256,decimalLongitude:-74.123256},{verbatimCoordinates:"18°24S 22°45E",verbatimLatitude:"18°24S",verbatimLongitude:"22°45E",decimalLatitude:-18.4,decimalLongitude:22.75}],vr=[{verbatimCoordinates:"10.432342S 10.6345345E",verbatimLatitude:"10.432342S",verbatimLongitude:"10.6345345E",decimalLatitude:-10.432342,decimalLongitude:10.6345345},{verbatimCoordinates:"10.00S 10.00E",verbatimLatitude:"10.00S",verbatimLongitude:"10.00E",decimalLatitude:-10,decimalLongitude:10},{verbatimCoordinates:"00.00S 01.00E",verbatimLatitude:"00.00S",verbatimLongitude:"01.00E",decimalLatitude:0,decimalLongitude:1},{verbatimCoordinates:"18.24S 22.45E",verbatimLatitude:"18.24S",verbatimLongitude:"22.45E",decimalLatitude:-18.4,decimalLongitude:22.75},{verbatimCoordinates:"27deg 15min 45.2sec S 18deg 32min 53.7sec E",verbatimLatitude:"27deg 15min 45.2sec S",verbatimLongitude:"18deg 32min 53.7sec E",decimalLatitude:-27.262555555555554,decimalLongitude:18.54825},{verbatimCoordinates:"-23.3245° S / 28.2344° E",verbatimLatitude:"-23.3245° S",verbatimLongitude:"28.2344° E",decimalLatitude:-23.3245,decimalLongitude:28.2344},{verbatimCoordinates:"40° 26.7717 -79° 56.93172",verbatimLatitude:"40° 26.7717",verbatimLongitude:"-79° 56.93172",decimalLatitude:40.446195,decimalLongitude:-79.948862},{verbatimCoordinates:"27.15.45S 18.32.53E",verbatimLatitude:"27.15.45S",verbatimLongitude:"18.32.53E",decimalLatitude:-27.2625,decimalLongitude:18.548055},{verbatimCoordinates:"-27.15.45 18.32.53",verbatimLatitude:"-27.15.45",verbatimLongitude:"18.32.53",decimalLatitude:-27.2625,decimalLongitude:18.548055},{verbatimCoordinates:"27.15.45.2S 18.32.53.4E",verbatimLatitude:"27.15.45.2S",verbatimLongitude:"18.32.53.4E",decimalLatitude:-27.262556,decimalLongitude:18.548167},{verbatimCoordinates:"27.15.45,2S 18.32.53,4E",verbatimLatitude:"27.15.45,2S",verbatimLongitude:"18.32.53,4E",decimalLatitude:-27.262556,decimalLongitude:18.548167},{verbatimCoordinates:"S23.43563 ° E22.45634 °",verbatimLatitude:"S23.43563 °",verbatimLongitude:"E22.45634 °",decimalLatitude:-23.43563,decimalLongitude:22.45634},{verbatimCoordinates:"27,71372° S 23,07771° E",verbatimLatitude:"27,71372° S",verbatimLongitude:"23,07771° E",decimalLatitude:-27.71372,decimalLongitude:23.07771},{verbatimCoordinates:"27.45.34 S 23.23.23 E",verbatimLatitude:"27.45.34 S",verbatimLongitude:"23.23.23 E",decimalLatitude:-27.759444,decimalLongitude:23.38972222},{verbatimCoordinates:"S 27.45.34 E 23.23.23",verbatimLatitude:"S 27.45.34",verbatimLongitude:"E 23.23.23",decimalLatitude:-27.759444,decimalLongitude:23.38972222},{verbatimCoordinates:"53 16.3863,4 52.8171",verbatimLatitude:"53 16.3863",verbatimLongitude:"4 52.8171",decimalLatitude:53.273105,decimalLongitude:4.88029},{verbatimCoordinates:"50 8.2914,-5 2.4447",verbatimLatitude:"50 8.2914",verbatimLongitude:"-5 2.4447",decimalLatitude:50.13819,decimalLongitude:-5.040745},{verbatimCoordinates:"N 48° 30,6410', E 18° 57,4583'",verbatimLatitude:"N 48° 30,6410'",verbatimLongitude:"E 18° 57,4583'",decimalLatitude:48.51068,decimalLongitude:18.95764},{verbatimCoordinates:"1.23456, 18.33453",verbatimLatitude:"1.23456",verbatimLongitude:"18.33453",decimalLatitude:1.23456,decimalLongitude:18.33453}];function wr(){const i=[];return pr.forEach(e=>{e.decimalLatitude?i.push(e):i.push({...e,...yr})}),[...i,...br,...vr]}const Er=wr();Kt.formats=Er.map(i=>i.verbatimCoordinates);const Lr=Kt;function Ii(i,e,t){const n=i.slice();return n[97]=e[t],n[99]=t,n}function Bi(i){let e,t;return e=new ir({}),{c(){Xe(e.$$.fragment)},m(n,r){Fe(e,n,r),t=!0},i(n){t||(le(e.$$.fragment,n),t=!0)},o(n){de(e.$$.fragment,n),t=!1},d(n){qe(e,n)}}}function Gi(i){let e,t,n,r,l;return t=new lr({}),{c(){e=J("button"),Xe(t.$$.fragment),x(e,"type","button"),x(e,"title",i[10]),x(e,"class","svelte-bz0zu3"),Ae(e,"active",i[0])},m(a,o){ne(a,e,o),Fe(t,e,null),n=!0,r||(l=fe(e,"click",i[79]),r=!0)},p(a,o){(!n||o[0]&1024)&&x(e,"title",a[10]),(!n||o[0]&1)&&Ae(e,"active",a[0])},i(a){n||(le(t.$$.fragment,a),n=!0)},o(a){de(t.$$.fragment,a),n=!1},d(a){a&&ie(e),qe(t),r=!1,l()}}}function _r(i){let e,t=[],n=new Map,r,l,a,o=Si(i[13]);const d=c=>c[97].id+(c[97].address?","+c[97].address:"");for(let c=0;c<o.length;c+=1){let L=Ii(i,o,c),_=d(L);n.set(_,t[c]=zi(_,L))}return{c(){e=J("ul");for(let c=0;c<t.length;c+=1)t[c].c();x(e,"class","options svelte-bz0zu3"),x(e,"role","listbox")},m(c,L){ne(c,e,L);for(let _=0;_<t.length;_+=1)t[_]&&t[_].m(e,null);r=!0,l||(a=[fe(e,"mouseleave",i[27]),fe(e,"blur",i[83]),fe(e,"keydown",i[23])],l=!0)},p(c,L){L[0]&102823936&&(o=Si(c[13]),Rt(),t=Wn(t,L,d,1,c,o,n,e,zn,zi,null,Ii),Pt())},i(c){if(!r){for(let L=0;L<o.length;L+=1)le(t[L]);r=!0}},o(c){for(let L=0;L<t.length;L+=1)de(t[L]);r=!1},d(c){c&&ie(e);for(let L=0;L<t.length;L+=1)t[L].d();l=!1,Ue(a)}}}function Sr(i){let e,t,n,r,l,a;return t=new Ti({}),{c(){e=J("div"),Xe(t.$$.fragment),n=we(),r=J("div"),l=Ye(i[8]),x(r,"class","svelte-bz0zu3"),x(e,"class","no-results svelte-bz0zu3")},m(o,d){ne(o,e,d),Fe(t,e,null),Z(e,n),Z(e,r),Z(r,l),a=!0},p(o,d){(!a||d[0]&256)&&dt(l,o[8])},i(o){a||(le(t.$$.fragment,o),a=!0)},o(o){de(t.$$.fragment,o),a=!1},d(o){o&&ie(e),qe(t)}}}function xr(i){let e="",t;return{c(){t=Ye(e)},m(n,r){ne(n,t,r)},p:te,i:te,o:te,d(n){n&&ie(t)}}}function Tr(i){let e,t,n,r,l,a,o,d,c,L,_;return t=new Ti({}),d=new xi({}),{c(){e=J("div"),Xe(t.$$.fragment),n=we(),r=J("div"),l=Ye(i[7]),a=we(),o=J("button"),Xe(d.$$.fragment),x(r,"class","svelte-bz0zu3"),x(o,"class","svelte-bz0zu3"),x(e,"class","error svelte-bz0zu3")},m(C,M){ne(C,e,M),Fe(t,e,null),Z(e,n),Z(e,r),Z(r,l),Z(e,a),Z(e,o),Fe(d,o,null),c=!0,L||(_=fe(o,"click",i[80]),L=!0)},p(C,M){(!c||M[0]&128)&&dt(l,C[7])},i(C){c||(le(t.$$.fragment,C),le(d.$$.fragment,C),c=!0)},o(C){de(t.$$.fragment,C),de(d.$$.fragment,C),c=!1},d(C){C&&ie(e),qe(t),qe(d),L=!1,_()}}}function zi(i,e){var o;let t,n,r;function l(){return e[81](e[99])}function a(){return e[82](e[97])}return n=new er({props:{feature:e[97],showPlaceType:e[11],style:e[15]===e[99]?"selected":((o=e[14])==null?void 0:o.id)===e[97].id?"picked":"default",missingIconsCache:e[21],iconsBaseUrl:e[12]}}),n.$on("mouseenter",l),n.$on("select",a),{key:i,first:null,c(){t=Cn(),Xe(n.$$.fragment),this.first=t},m(d,c){ne(d,t,c),Fe(n,d,c),r=!0},p(d,c){var _;e=d;const L={};c[0]&8192&&(L.feature=e[97]),c[0]&2048&&(L.showPlaceType=e[11]),c[0]&57344&&(L.style=e[15]===e[99]?"selected":((_=e[14])==null?void 0:_.id)===e[97].id?"picked":"default"),c[0]&4096&&(L.iconsBaseUrl=e[12]),n.$set(L)},i(d){r||(le(n.$$.fragment,d),r=!0)},o(d){de(n.$$.fragment,d),r=!1},d(d){d&&ie(t),qe(n,d)}}}function Mr(i){let e,t,n,r,l,a,o,d,c,L,_,C,M,N,A,k,O,S,R,W,H,D=!1;l=new ar({}),_=new xi({});let B=i[20]&&Bi(),s=i[6]==="button"&&Gi(i);const u=i[70].default,f=Sn(u,i,i[69],null),m=[Tr,xr,Sr,_r],h=[];function b(p,g){var y,v;return p[19]?0:!p[16]&&!p[4]?1:((y=p[13])==null?void 0:y.length)===0?2:(v=p[13])!=null&&v.length&&(p[16]||p[4])?3:-1}return~(k=b(i))&&(O=h[k]=m[k](i)),{c(){e=we(),t=J("form"),n=J("div"),r=J("button"),Xe(l.$$.fragment),a=we(),o=J("input"),d=we(),c=J("div"),L=J("button"),Xe(_.$$.fragment),C=we(),B&&B.c(),M=we(),s&&s.c(),N=we(),f&&f.c(),A=we(),O&&O.c(),x(r,"class","search-button svelte-bz0zu3"),x(r,"type","button"),x(o,"placeholder",i[9]),x(o,"aria-label",i[9]),x(o,"class","svelte-bz0zu3"),x(L,"type","button"),x(L,"title",i[3]),x(L,"class","svelte-bz0zu3"),x(c,"class","clear-button-container svelte-bz0zu3"),Ae(c,"displayable",i[1]!==""),x(n,"class","input-group svelte-bz0zu3"),x(t,"class",S=Ot(i[2])+" svelte-bz0zu3"),Ae(t,"can-collapse",i[5]&&i[1]==="")},m(p,g){ne(p,e,g),ne(p,t,g),Z(t,n),Z(n,r),Fe(l,r,null),Z(n,a),Z(n,o),i[72](o),vi(o,i[1]),Z(n,d),Z(n,c),Z(c,L),Fe(_,L,null),Z(c,C),B&&B.m(c,null),Z(n,M),s&&s.m(n,null),Z(n,N),f&&f.m(n,null),Z(t,A),~k&&h[k].m(t,null),R=!0,W||(H=[fe(r,"click",i[71]),fe(o,"input",i[73]),fe(o,"focus",i[74]),fe(o,"blur",i[75]),fe(o,"click",i[76]),fe(o,"keydown",i[23]),fe(o,"input",i[24]),fe(o,"change",i[77]),fe(L,"click",i[78]),fe(t,"submit",Nn(i[22]))],W=!0)},p(p,g){(!R||g[0]&512)&&x(o,"placeholder",p[9]),(!R||g[0]&512)&&x(o,"aria-label",p[9]),g[0]&2&&o.value!==p[1]&&vi(o,p[1]),(!R||g[0]&8)&&x(L,"title",p[3]),p[20]?B?g[0]&1048576&&le(B,1):(B=Bi(),B.c(),le(B,1),B.m(c,null)):B&&(Rt(),de(B,1,1,()=>{B=null}),Pt()),(!R||g[0]&2)&&Ae(c,"displayable",p[1]!==""),p[6]==="button"?s?(s.p(p,g),g[0]&64&&le(s,1)):(s=Gi(p),s.c(),le(s,1),s.m(n,N)):s&&(Rt(),de(s,1,1,()=>{s=null}),Pt()),f&&f.p&&(!R||g[2]&128)&&Tn(f,u,p,p[69],R?xn(u,p[69],g,null):Mn(p[69]),null);let y=k;k=b(p),k===y?~k&&h[k].p(p,g):(O&&(Rt(),de(h[y],1,1,()=>{h[y]=null}),Pt()),~k?(O=h[k],O?O.p(p,g):(O=h[k]=m[k](p),O.c()),le(O,1),O.m(t,null)):O=null),(!R||g[0]&4&&S!==(S=Ot(p[2])+" svelte-bz0zu3"))&&x(t,"class",S),(!R||g[0]&38)&&Ae(t,"can-collapse",p[5]&&p[1]==="")},i(p){R||(le(D),le(l.$$.fragment,p),le(_.$$.fragment,p),le(B),le(s),le(f,p),le(O),R=!0)},o(p){de(D),de(l.$$.fragment,p),de(_.$$.fragment,p),de(B),de(s),de(f,p),de(O),R=!1},d(p){p&&(ie(e),ie(t)),qe(l),i[72](null),qe(_),B&&B.d(),s&&s.d(),f&&f.d(p),~k&&h[k].d(),W=!1,Ue(H)}}}function Cr(i,e,t){let n,r,l,{$$slots:a={},$$scope:o}=e;const d={continental_marine:4,country:4,major_landform:8,region:5,subregion:6,county:7,joint_municipality:8,joint_submunicipality:9,municipality:10,municipal_district:11,locality:12,neighbourhood:13,place:14,postal_code:14,road:16,poi:17,address:18,"poi.peak":15,"poi.shop":18,"poi.cafe":18,"poi.restaurant":18,"poi.aerodrome":13};let{class:c=void 0}=e,{apiKey:L}=e,{bbox:_=void 0}=e,{clearButtonTitle:C="clear"}=e,{clearOnBlur:M=!1}=e,{clearListOnPick:N=!1}=e,{keepListOpen:A=!1}=e,{collapsed:k=!1}=e,{country:O=void 0}=e,{debounceSearch:S=200}=e,{enableReverse:R="never"}=e,{errorMessage:W="Something went wrong…"}=e,{filter:H=()=>!0}=e,{flyTo:D=!0}=e,{fuzzyMatch:B=!0}=e,{language:s=void 0}=e,{limit:u=void 0}=e;const f=41415112612;let{reverseGeocodingLimit:m=f}=e,{mapController:h=void 0}=e,{minLength:b=2}=e,{noResultsMessage:p="Oops! Looks like you're trying to predict something that's not quite right. We can't seem to find what you're looking for. Maybe try double-checking your spelling or try a different search term. Keep on typing - we'll do our best to get you where you need to go!"}=e,{placeholder:g="Search"}=e,{proximity:y=[{type:"server-geolocation"}]}=e,{reverseActive:v=R==="always"}=e,{reverseButtonTitle:w="toggle reverse geocoding"}=e,{searchValue:T=""}=e,{pickedResultStyle:P="full-geometry"}=e,{showPlaceType:G="if-needed"}=e,{showResultsWhileTyping:j=!0}=e,{selectFirst:Y=!0}=e,{flyToSelected:re=!1}=e,{markerOnSelected:q=!0}=e,{types:V=void 0}=e;const ce=[];let{reverseGeocodingTypes:He=ce}=e,{exhaustiveReverseGeocoding:st=!1}=e,{excludeTypes:ot=!1}=e;const _e=void 0;let{reverseGeocodingExcludeTypes:Ge=_e}=e,{zoom:me=d}=e,{apiUrl:he="https://api.maptiler.com/geocoding"}=e,{fetchParameters:ee={}}=e,{iconsBaseUrl:hn="https://cdn.maptiler.com/maptiler-geocoding-control/v2.1.1/icons/"}=e,{adjustUrlQuery:ri=()=>{}}=e,{adjustUrl:si=()=>{}}=e;function os(E){Pe.focus(E)}function ls(){Pe.blur()}function dn(E,oe=!0,ue=!1){t(1,T=E),oe?(t(15,X=-1),mn()):(pn(void 0,!ue,ue),setTimeout(()=>{Pe.focus(),Pe.select()}))}function us(){t(13,F=void 0),t(14,z=void 0),t(15,X=-1)}function as(){t(64,ae=[]),t(14,z=void 0)}let F,ae,z,gn="",Pe,X=-1,ze,Ut=[],lt,ct,ht,oi,Ve=!1;const fs=new Set,et=Ei();Rn(()=>{h&&(h.setEventHandler(void 0),h.indicateReverse(!1),h.setSelectedMarker(-1),h.setFeatures(void 0,void 0,!1))});function mn(E){if(t(17,Ve=!1),ct&&(clearTimeout(ct),ct=void 0),X>-1&&F)t(14,z=F[X]),t(1,T=z.place_type[0]==="reverse"?z.place_name:z.place_name.replace(/,.*/,"")),t(19,ze=void 0),t(64,ae=void 0),t(15,X=-1);else if(T){const oe=E||!li(T);ui(T,{exact:!0}).then(()=>{t(64,ae=F),t(14,z=void 0),oe&&cs()}).catch(ue=>t(19,ze=ue))}}function li(E){try{return Lr(E,6)}catch{return!1}}async function ui(E,{byId:oe=!1,exact:ue=!1}={}){var xe,We,tt;t(19,ze=void 0),lt==null||lt.abort();const Se=new AbortController;t(20,lt=Se);try{const Q=li(E),xt=new URL(he+"/"+encodeURIComponent(Q?Q.decimalLongitude+","+Q.decimalLatitude:E)+".json"),Oe=xt.searchParams;s!==void 0&&Oe.set("language",Array.isArray(s)?s.join(","):s??"");const[ci]=(h==null?void 0:h.getCenterAndZoom())??[];let De=(xe=!Q||He===ce?V:He)==null?void 0:xe.map(ye=>typeof ye=="string"?ye:ci===void 0||(ye[0]??0)<=ci&&ci<(ye[1]??1/0)?ye[2]:void 0).filter(ye=>ye!==void 0);De&&(De=[...new Set(De)],Oe.set("types",De.join(",")));const bn=!Q||Ge===_e?ot:Ge;if(bn&&Oe.set("excludeTypes",String(bn)),_&&Oe.set("bbox",_.map(ye=>ye.toFixed(6)).join(",")),O&&Oe.set("country",Array.isArray(O)?O.join(","):O),!oe&&!Q){const ye=await cr(h,y,Se);ye&&Oe.set("proximity",ye),(ue||!j)&&Oe.set("autocomplete","false"),Oe.set("fuzzyMatch",String(B))}const Tt=m===f?u:m;Tt!==void 0&&Tt>1&&(De==null?void 0:De.length)!==1&&console.warn("For reverse geocoding when limit > 1 then types must contain single value."),Q?(Tt===1||Tt!==void 0&&(st||(De==null?void 0:De.length)===1))&&Oe.set("limit",String(Tt)):u!==void 0&&Oe.set("limit",String(u)),Oe.set("key",L),ri(Oe),si(xt);const Cs=xt.searchParams.get("types")===""&&xt.searchParams.get("excludeTypes")!=="true",Ft=xt.toString();if(Ft===gn){oe?(N&&t(13,F=void 0),t(14,z=Ut[0])):(t(13,F=Ut),((We=F[X])==null?void 0:We.id)!==(r==null?void 0:r.id)&&t(15,X=-1));return}gn=Ft;let Mt;if(Cs)Mt={type:"FeatureCollection",features:[]};else{const ye=await fetch(Ft,{signal:Se.signal,...ee});if(!ye.ok)throw new Error(await ye.text());Mt=await ye.json()}et("response",{url:Ft,featureCollection:Mt}),oe?(N&&t(13,F=void 0),t(14,z=Mt.features[0]),Ut=[z]):(t(13,F=Mt.features.filter(H)),Q&&F.unshift({type:"Feature",properties:{},id:"reverse_"+Q.decimalLongitude+"_"+Q.decimalLatitude,text:Q.decimalLatitude+", "+Q.decimalLongitude,place_name:Q.decimalLatitude+", "+Q.decimalLongitude,place_type:["reverse"],center:[Q.decimalLongitude,Q.decimalLatitude],bbox:[Q.decimalLongitude,Q.decimalLatitude,Q.decimalLongitude,Q.decimalLatitude],geometry:{type:"Point",coordinates:[Q.decimalLongitude,Q.decimalLatitude]}}),Ut=F,((tt=F[X])==null?void 0:tt.id)!==(r==null?void 0:r.id)&&t(15,X=-1),Q&&Pe.focus())}catch(Q){if(Q&&typeof Q=="object"&&"name"in Q&&Q.name==="AbortError")return;throw Q}finally{Se===lt&&t(20,lt=void 0)}}function cs(){var Se;if(!(ae!=null&&ae.length)||!D)return;const E=[180,90,-180,-90],oe=!ae.some(xe=>!xe.matching_text);let ue;for(const xe of ae){const We=St(xe);if(ue=ue===void 0?We:We===void 0?ue:Math.max(ue,We),oe||!xe.matching_text)for(const tt of[0,1,2,3])E[tt]=Math[tt<2?"min":"max"](E[tt],((Se=xe.bbox)==null?void 0:Se[tt])??xe.center[tt%2])}h&&ae.length>0&&(z&&E[0]===E[2]&&E[1]===E[3]?h.flyTo(z.center,St(z)):h.fitBounds(pt(E),50,ue))}function ai(){!z||!h||(!z.bbox||z.bbox[0]===z.bbox[2]&&z.bbox[1]===z.bbox[3]?h.flyTo(z.center,St(z)):h.fitBounds(pt(z.bbox),50,St(z)))}function St(E){var ue;if(!E.bbox||E.bbox[0]!==E.bbox[2]&&E.bbox[1]!==E.bbox[3])return;const oe=E.id.replace(/\..*/,"");return(Array.isArray((ue=E.properties)==null?void 0:ue.categories)?E.properties.categories.reduce((Se,xe)=>{const We=me[oe+"."+xe];return Se===void 0?We:We===void 0?Se:Math.max(Se,We)},void 0):void 0)??me[oe]}function hs(E){t(0,v=R==="always"),t(13,F=void 0),t(14,z=void 0),t(15,X=-1),dn(E[1].toFixed(6)+", "+fr(E[0],[-180,180],!0).toFixed(6),!1,!0)}function ds(E){if(!F)return;let oe=E.key==="ArrowDown"?1:E.key==="ArrowUp"?-1:0;oe&&(Pe.focus(),t(17,Ve=!0),E.preventDefault(),z&&X===-1&&t(15,X=F.findIndex(ue=>ue.id===(z==null?void 0:z.id))),X===(z||Y?0:-1)&&oe===-1&&t(15,X=F.length),t(15,X+=oe),X>=F.length&&t(15,X=-1),X<0&&(z||Y)&&t(15,X=0))}function pn(E,oe=!0,ue=!1){if(t(19,ze=void 0),t(14,z=void 0),t(17,Ve=!0),j||ue){if(ct&&clearTimeout(ct),T.length<b)return;const Se=T;ct=window.setTimeout(()=>{ui(Se).catch(xe=>t(19,ze=xe))},oe?S:0)}else t(13,F=void 0),t(19,ze=void 0)}function fi(E){z&&(z==null?void 0:z.id)===(E==null?void 0:E.id)?ai():(t(14,z=E),t(1,T=E.place_name))}function yn(E){t(15,X=E)}function gs(){(!Y||z)&&t(15,X=-1),re&&ai()}const ms=()=>Pe.focus();function ps(E){jt[E?"unshift":"push"](()=>{Pe=E,t(18,Pe)})}function ys(){T=this.value,t(1,T),t(17,Ve),t(31,M),t(16,ht)}const bs=()=>t(17,Ve=!0),vs=()=>t(17,Ve=!1),ws=()=>t(17,Ve=!0),Es=()=>t(14,z=void 0),Ls=()=>{t(1,T=""),Pe.focus()},_s=()=>t(0,v=!v),Ss=()=>t(19,ze=void 0),xs=E=>yn(E),Ts=E=>fi(E),Ms=()=>{};return i.$$set=E=>{"class"in E&&t(2,c=E.class),"apiKey"in E&&t(29,L=E.apiKey),"bbox"in E&&t(30,_=E.bbox),"clearButtonTitle"in E&&t(3,C=E.clearButtonTitle),"clearOnBlur"in E&&t(31,M=E.clearOnBlur),"clearListOnPick"in E&&t(32,N=E.clearListOnPick),"keepListOpen"in E&&t(4,A=E.keepListOpen),"collapsed"in E&&t(5,k=E.collapsed),"country"in E&&t(33,O=E.country),"debounceSearch"in E&&t(34,S=E.debounceSearch),"enableReverse"in E&&t(6,R=E.enableReverse),"errorMessage"in E&&t(7,W=E.errorMessage),"filter"in E&&t(35,H=E.filter),"flyTo"in E&&t(36,D=E.flyTo),"fuzzyMatch"in E&&t(37,B=E.fuzzyMatch),"language"in E&&t(38,s=E.language),"limit"in E&&t(39,u=E.limit),"reverseGeocodingLimit"in E&&t(40,m=E.reverseGeocodingLimit),"mapController"in E&&t(41,h=E.mapController),"minLength"in E&&t(42,b=E.minLength),"noResultsMessage"in E&&t(8,p=E.noResultsMessage),"placeholder"in E&&t(9,g=E.placeholder),"proximity"in E&&t(43,y=E.proximity),"reverseActive"in E&&t(0,v=E.reverseActive),"reverseButtonTitle"in E&&t(10,w=E.reverseButtonTitle),"searchValue"in E&&t(1,T=E.searchValue),"pickedResultStyle"in E&&t(44,P=E.pickedResultStyle),"showPlaceType"in E&&t(11,G=E.showPlaceType),"showResultsWhileTyping"in E&&t(45,j=E.showResultsWhileTyping),"selectFirst"in E&&t(46,Y=E.selectFirst),"flyToSelected"in E&&t(47,re=E.flyToSelected),"markerOnSelected"in E&&t(48,q=E.markerOnSelected),"types"in E&&t(49,V=E.types),"reverseGeocodingTypes"in E&&t(50,He=E.reverseGeocodingTypes),"exhaustiveReverseGeocoding"in E&&t(51,st=E.exhaustiveReverseGeocoding),"excludeTypes"in E&&t(52,ot=E.excludeTypes),"reverseGeocodingExcludeTypes"in E&&t(53,Ge=E.reverseGeocodingExcludeTypes),"zoom"in E&&t(54,me=E.zoom),"apiUrl"in E&&t(55,he=E.apiUrl),"fetchParameters"in E&&t(56,ee=E.fetchParameters),"iconsBaseUrl"in E&&t(12,hn=E.iconsBaseUrl),"adjustUrlQuery"in E&&t(57,ri=E.adjustUrlQuery),"adjustUrl"in E&&t(58,si=E.adjustUrl),"$$scope"in E&&t(69,o=E.$$scope)},i.$$.update=()=>{if(i.$$.dirty[0]&64&&t(0,v=R==="always"),i.$$.dirty[0]&16384|i.$$.dirty[1]&8192&&P!=="marker-only"&&z&&!z.address&&z.geometry.type==="Point"&&z.place_type[0]!=="reverse"&&ui(z.id,{byId:!0}).catch(E=>t(19,ze=E)),i.$$.dirty[0]&16384|i.$$.dirty[1]&1058|i.$$.dirty[2]&8&&(h&&z&&z.id!==oi&&D&&(ai(),N&&t(13,F=void 0),t(64,ae=void 0),t(15,X=-1)),t(65,oi=z==null?void 0:z.id)),i.$$.dirty[0]&196608|i.$$.dirty[1]&1&&setTimeout(()=>{t(16,ht=Ve),M&&!ht&&t(1,T="")}),i.$$.dirty[0]&8194|i.$$.dirty[1]&2048&&T.length<b&&(t(13,F=void 0),t(19,ze=void 0),t(64,ae=F)),i.$$.dirty[0]&57344|i.$$.dirty[1]&32768&&Y&&F!=null&&F.length&&X==-1&&!z&&t(15,X=0),i.$$.dirty[0]&8192|i.$$.dirty[2]&4&&ae!==F&&t(64,ae=void 0),i.$$.dirty[0]&73729|i.$$.dirty[1]&1024|i.$$.dirty[2]&4&&h&&h.setEventHandler(E=>{switch(E.type){case"mapClick":v&&hs(E.coordinates);break;case"markerClick":{const oe=F==null?void 0:F.find(ue=>ue.id===E.id);oe&&fi(oe)}break;case"markerMouseEnter":ae&&t(15,X=ht?(F==null?void 0:F.findIndex(oe=>oe.id===E.id))??-1:-1);break;case"markerMouseLeave":ae&&t(15,X=-1);break}}),i.$$.dirty[0]&40960&&t(66,r=F==null?void 0:F[X]),i.$$.dirty[1]&66592|i.$$.dirty[2]&16&&h&&r&&D&&re&&h.flyTo(r.center,St(r)),i.$$.dirty[1]&8192&&t(68,n=P==="full-geometry-including-polygon-center-marker"),i.$$.dirty[1]&132096|i.$$.dirty[2]&64&&(q||h==null||h.setFeatures(void 0,void 0,n)),i.$$.dirty[0]&16384|i.$$.dirty[1]&132096|i.$$.dirty[2]&84&&h&&q&&!ae&&(h.setFeatures(r?[r]:void 0,z,n),h.setSelectedMarker(r?0:-1)),i.$$.dirty[0]&16384|i.$$.dirty[1]&1024|i.$$.dirty[2]&68&&h&&h.setFeatures(ae,z,n),i.$$.dirty[0]&32768|i.$$.dirty[1]&1024|i.$$.dirty[2]&4&&ae&&h&&h.setSelectedMarker(X),i.$$.dirty[0]&2|i.$$.dirty[1]&1024&&h){const E=li(T);h.setReverseMarker(E?[E.decimalLongitude,E.decimalLatitude]:void 0)}i.$$.dirty[2]&16&&et("select",{feature:r}),i.$$.dirty[0]&16384&&et("pick",{feature:z}),i.$$.dirty[0]&73744&&t(67,l=!!(F!=null&&F.length)&&(ht||A)),i.$$.dirty[2]&32&&et("optionsvisibilitychange",{optionsVisible:l}),i.$$.dirty[0]&8192&&et("featureslisted",{features:F}),i.$$.dirty[2]&4&&et("featuresmarked",{features:ae}),i.$$.dirty[0]&1&&et("reversetoggle",{reverse:v}),i.$$.dirty[0]&2&&et("querychange",{query:T}),i.$$.dirty[0]&1|i.$$.dirty[1]&1024&&h&&h.indicateReverse(v)},[v,T,c,C,A,k,R,W,p,g,w,G,hn,F,z,X,ht,Ve,Pe,ze,lt,fs,mn,ds,pn,fi,yn,gs,d,L,_,M,N,O,S,H,D,B,s,u,m,h,b,y,P,j,Y,re,q,V,He,st,ot,Ge,me,he,ee,ri,si,os,ls,dn,us,as,ae,oi,r,l,n,o,a,ms,ps,ys,bs,vs,ws,Es,Ls,_s,Ss,xs,Ts,Ms]}let Nr=class extends Je{constructor(e){super(),Qe(this,e,Cr,Mr,Ke,{ZOOM_DEFAULTS:28,class:2,apiKey:29,bbox:30,clearButtonTitle:3,clearOnBlur:31,clearListOnPick:32,keepListOpen:4,collapsed:5,country:33,debounceSearch:34,enableReverse:6,errorMessage:7,filter:35,flyTo:36,fuzzyMatch:37,language:38,limit:39,reverseGeocodingLimit:40,mapController:41,minLength:42,noResultsMessage:8,placeholder:9,proximity:43,reverseActive:0,reverseButtonTitle:10,searchValue:1,pickedResultStyle:44,showPlaceType:11,showResultsWhileTyping:45,selectFirst:46,flyToSelected:47,markerOnSelected:48,types:49,reverseGeocodingTypes:50,exhaustiveReverseGeocoding:51,excludeTypes:52,reverseGeocodingExcludeTypes:53,zoom:54,apiUrl:55,fetchParameters:56,iconsBaseUrl:12,adjustUrlQuery:57,adjustUrl:58,focus:59,blur:60,setQuery:61,clearList:62,clearMap:63},null,[-1,-1,-1,-1])}get ZOOM_DEFAULTS(){return this.$$.ctx[28]}get focus(){return this.$$.ctx[59]}get blur(){return this.$$.ctx[60]}get setQuery(){return this.$$.ctx[61]}get clearList(){return this.$$.ctx[62]}get clearMap(){return this.$$.ctx[63]}};function vt(i,e,t={}){const n={type:"Feature"};return(t.id===0||t.id)&&(n.id=t.id),t.bbox&&(n.bbox=t.bbox),n.properties=e||{},n.geometry=i,n}function Yt(i,e,t={}){for(const r of i){if(r.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(r[r.length-1].length!==r[0].length)throw new Error("First and last Position are not equivalent.");for(let l=0;l<r[r.length-1].length;l++)if(r[r.length-1][l]!==r[0][l])throw new Error("First and last Position are not equivalent.")}return vt({type:"Polygon",coordinates:i},e,t)}function wt(i,e={}){const t={type:"FeatureCollection"};return e.id&&(t.id=e.id),e.bbox&&(t.bbox=e.bbox),t.features=i,t}function Wi(i,e,t={}){return vt({type:"MultiPolygon",coordinates:i},e,t)}function Di(i,e,t){if(i!==null)for(var n,r,l,a,o,d,c,L=0,_=0,C,M=i.type,N=M==="FeatureCollection",A=M==="Feature",k=N?i.features.length:1,O=0;O<k;O++){c=N?i.features[O].geometry:A?i.geometry:i,C=c?c.type==="GeometryCollection":!1,o=C?c.geometries.length:1;for(var S=0;S<o;S++){var R=0,W=0;if(a=C?c.geometries[S]:c,a!==null){d=a.coordinates;var H=a.type;switch(L=0,H){case null:break;case"Point":if(e(d,_,O,R,W)===!1)return!1;_++,R++;break;case"LineString":case"MultiPoint":for(n=0;n<d.length;n++){if(e(d[n],_,O,R,W)===!1)return!1;_++,H==="MultiPoint"&&R++}H==="LineString"&&R++;break;case"Polygon":case"MultiLineString":for(n=0;n<d.length;n++){for(r=0;r<d[n].length-L;r++){if(e(d[n][r],_,O,R,W)===!1)return!1;_++}H==="MultiLineString"&&R++,H==="Polygon"&&W++}H==="Polygon"&&R++;break;case"MultiPolygon":for(n=0;n<d.length;n++){for(W=0,r=0;r<d[n].length;r++){for(l=0;l<d[n][r].length-L;l++){if(e(d[n][r][l],_,O,R,W)===!1)return!1;_++}W++}R++}break;case"GeometryCollection":for(n=0;n<a.geometries.length;n++)if(Di(a.geometries[n],e)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function Xt(i,e){var t,n,r,l,a,o,d,c,L,_,C=0,M=i.type==="FeatureCollection",N=i.type==="Feature",A=M?i.features.length:1;for(t=0;t<A;t++){for(o=M?i.features[t].geometry:N?i.geometry:i,c=M?i.features[t].properties:N?i.properties:{},L=M?i.features[t].bbox:N?i.bbox:void 0,_=M?i.features[t].id:N?i.id:void 0,d=o?o.type==="GeometryCollection":!1,a=d?o.geometries.length:1,r=0;r<a;r++){if(l=d?o.geometries[r]:o,l===null){if(e(null,C,c,L,_)===!1)return!1;continue}switch(l.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(e(l,C,c,L,_)===!1)return!1;break}case"GeometryCollection":{for(n=0;n<l.geometries.length;n++)if(e(l.geometries[n],C,c,L,_)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}C++}}function Or(i,e){Xt(i,function(t,n,r,l,a){var o=t===null?null:t.type;switch(o){case null:case"Point":case"LineString":case"Polygon":return e(vt(t,r,{bbox:l,id:a}),n,0)===!1?!1:void 0}var d;switch(o){case"MultiPoint":d="Point";break;case"MultiLineString":d="LineString";break;case"MultiPolygon":d="Polygon";break}for(var c=0;c<t.coordinates.length;c++){var L=t.coordinates[c],_={type:d,coordinates:L};if(e(vt(_,r),n,c)===!1)return!1}})}function kr(i,e={}){if(i.bbox!=null&&e.recompute!==!0)return i.bbox;const t=[1/0,1/0,-1/0,-1/0];return Di(i,n=>{t[0]>n[0]&&(t[0]=n[0]),t[1]>n[1]&&(t[1]=n[1]),t[2]<n[0]&&(t[2]=n[0]),t[3]<n[1]&&(t[3]=n[1])}),t}var Qt=kr;function Rr(i){if(!i)throw new Error("geojson is required");switch(i.type){case"Feature":return Ui(i);case"FeatureCollection":return Pr(i);case"Point":case"LineString":case"Polygon":case"MultiPoint":case"MultiLineString":case"MultiPolygon":case"GeometryCollection":return Jt(i);default:throw new Error("unknown GeoJSON type")}}function Ui(i){const e={type:"Feature"};return Object.keys(i).forEach(t=>{switch(t){case"type":case"properties":case"geometry":return;default:e[t]=i[t]}}),e.properties=Fi(i.properties),i.geometry==null?e.geometry=null:e.geometry=Jt(i.geometry),e}function Fi(i){const e={};return i&&Object.keys(i).forEach(t=>{const n=i[t];typeof n=="object"?n===null?e[t]=null:Array.isArray(n)?e[t]=n.map(r=>r):e[t]=Fi(n):e[t]=n}),e}function Pr(i){const e={type:"FeatureCollection"};return Object.keys(i).forEach(t=>{switch(t){case"type":case"features":return;default:e[t]=i[t]}}),e.features=i.features.map(t=>Ui(t)),e}function Jt(i){const e={type:i.type};return i.bbox&&(e.bbox=i.bbox),i.type==="GeometryCollection"?(e.geometries=i.geometries.map(t=>Jt(t)),e):(e.coordinates=qi(i.coordinates),e)}function qi(i){const e=i;return typeof e[0]!="object"?e.slice():e.map(t=>qi(t))}var Ar=Rr,Ir=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,$t=Math.ceil,Me=Math.floor,ve="[BigNumber Error] ",ji=ve+"Number primitive has more than 15 significant digits: ",Re=1e14,U=14,Zi=9007199254740991,ei=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],$e=1e7,Ee=1e9;function Hi(i){var e,t,n,r=S.prototype={constructor:S,toString:null,valueOf:null},l=new S(1),a=20,o=4,d=-7,c=21,L=-1e7,_=1e7,C=!1,M=1,N=0,A={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},k="0123456789abcdefghijklmnopqrstuvwxyz",O=!0;function S(s,u){var f,m,h,b,p,g,y,v,w=this;if(!(w instanceof S))return new S(s,u);if(u==null){if(s&&s._isBigNumber===!0){w.s=s.s,!s.c||s.e>_?w.c=w.e=null:s.e<L?w.c=[w.e=0]:(w.e=s.e,w.c=s.c.slice());return}if((g=typeof s=="number")&&s*0==0){if(w.s=1/s<0?(s=-s,-1):1,s===~~s){for(b=0,p=s;p>=10;p/=10,b++);b>_?w.c=w.e=null:(w.e=b,w.c=[s]);return}v=String(s)}else{if(!Ir.test(v=String(s)))return n(w,v,g);w.s=v.charCodeAt(0)==45?(v=v.slice(1),-1):1}(b=v.indexOf("."))>-1&&(v=v.replace(".","")),(p=v.search(/e/i))>0?(b<0&&(b=p),b+=+v.slice(p+1),v=v.substring(0,p)):b<0&&(b=v.length)}else{if(se(u,2,k.length,"Base"),u==10&&O)return w=new S(s),D(w,a+w.e+1,o);if(v=String(s),g=typeof s=="number"){if(s*0!=0)return n(w,v,g,u);if(w.s=1/s<0?(v=v.slice(1),-1):1,S.DEBUG&&v.replace(/^0\.0*|\./,"").length>15)throw Error(ji+s)}else w.s=v.charCodeAt(0)===45?(v=v.slice(1),-1):1;for(f=k.slice(0,u),b=p=0,y=v.length;p<y;p++)if(f.indexOf(m=v.charAt(p))<0){if(m=="."){if(p>b){b=y;continue}}else if(!h&&(v==v.toUpperCase()&&(v=v.toLowerCase())||v==v.toLowerCase()&&(v=v.toUpperCase()))){h=!0,p=-1,b=0;continue}return n(w,String(s),g,u)}g=!1,v=t(v,u,10,w.s),(b=v.indexOf("."))>-1?v=v.replace(".",""):b=v.length}for(p=0;v.charCodeAt(p)===48;p++);for(y=v.length;v.charCodeAt(--y)===48;);if(v=v.slice(p,++y)){if(y-=p,g&&S.DEBUG&&y>15&&(s>Zi||s!==Me(s)))throw Error(ji+w.s*s);if((b=b-p-1)>_)w.c=w.e=null;else if(b<L)w.c=[w.e=0];else{if(w.e=b,w.c=[],p=(b+1)%U,b<0&&(p+=U),p<y){for(p&&w.c.push(+v.slice(0,p)),y-=U;p<y;)w.c.push(+v.slice(p,p+=U));p=U-(v=v.slice(p)).length}else p-=y;for(;p--;v+="0");w.c.push(+v)}}else w.c=[w.e=0]}S.clone=Hi,S.ROUND_UP=0,S.ROUND_DOWN=1,S.ROUND_CEIL=2,S.ROUND_FLOOR=3,S.ROUND_HALF_UP=4,S.ROUND_HALF_DOWN=5,S.ROUND_HALF_EVEN=6,S.ROUND_HALF_CEIL=7,S.ROUND_HALF_FLOOR=8,S.EUCLID=9,S.config=S.set=function(s){var u,f;if(s!=null)if(typeof s=="object"){if(s.hasOwnProperty(u="DECIMAL_PLACES")&&(f=s[u],se(f,0,Ee,u),a=f),s.hasOwnProperty(u="ROUNDING_MODE")&&(f=s[u],se(f,0,8,u),o=f),s.hasOwnProperty(u="EXPONENTIAL_AT")&&(f=s[u],f&&f.pop?(se(f[0],-1e9,0,u),se(f[1],0,Ee,u),d=f[0],c=f[1]):(se(f,-1e9,Ee,u),d=-(c=f<0?-f:f))),s.hasOwnProperty(u="RANGE"))if(f=s[u],f&&f.pop)se(f[0],-1e9,-1,u),se(f[1],1,Ee,u),L=f[0],_=f[1];else if(se(f,-1e9,Ee,u),f)L=-(_=f<0?-f:f);else throw Error(ve+u+" cannot be zero: "+f);if(s.hasOwnProperty(u="CRYPTO"))if(f=s[u],f===!!f)if(f)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))C=f;else throw C=!f,Error(ve+"crypto unavailable");else C=f;else throw Error(ve+u+" not true or false: "+f);if(s.hasOwnProperty(u="MODULO_MODE")&&(f=s[u],se(f,0,9,u),M=f),s.hasOwnProperty(u="POW_PRECISION")&&(f=s[u],se(f,0,Ee,u),N=f),s.hasOwnProperty(u="FORMAT"))if(f=s[u],typeof f=="object")A=f;else throw Error(ve+u+" not an object: "+f);if(s.hasOwnProperty(u="ALPHABET"))if(f=s[u],typeof f=="string"&&!/^.?$|[+\-.\s]|(.).*\1/.test(f))O=f.slice(0,10)=="0123456789",k=f;else throw Error(ve+u+" invalid: "+f)}else throw Error(ve+"Object expected: "+s);return{DECIMAL_PLACES:a,ROUNDING_MODE:o,EXPONENTIAL_AT:[d,c],RANGE:[L,_],CRYPTO:C,MODULO_MODE:M,POW_PRECISION:N,FORMAT:A,ALPHABET:k}},S.isBigNumber=function(s){if(!s||s._isBigNumber!==!0)return!1;if(!S.DEBUG)return!0;var u,f,m=s.c,h=s.e,b=s.s;e:if({}.toString.call(m)=="[object Array]"){if((b===1||b===-1)&&h>=-1e9&&h<=Ee&&h===Me(h)){if(m[0]===0){if(h===0&&m.length===1)return!0;break e}if(u=(h+1)%U,u<1&&(u+=U),String(m[0]).length==u){for(u=0;u<m.length;u++)if(f=m[u],f<0||f>=Re||f!==Me(f))break e;if(f!==0)return!0}}}else if(m===null&&h===null&&(b===null||b===1||b===-1))return!0;throw Error(ve+"Invalid BigNumber: "+s)},S.maximum=S.max=function(){return W(arguments,-1)},S.minimum=S.min=function(){return W(arguments,1)},S.random=function(){var s=9007199254740992,u=Math.random()*s&2097151?function(){return Me(Math.random()*s)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(f){var m,h,b,p,g,y=0,v=[],w=new S(l);if(f==null?f=a:se(f,0,Ee),p=$t(f/U),C)if(crypto.getRandomValues){for(m=crypto.getRandomValues(new Uint32Array(p*=2));y<p;)g=m[y]*131072+(m[y+1]>>>11),g>=9e15?(h=crypto.getRandomValues(new Uint32Array(2)),m[y]=h[0],m[y+1]=h[1]):(v.push(g%1e14),y+=2);y=p/2}else if(crypto.randomBytes){for(m=crypto.randomBytes(p*=7);y<p;)g=(m[y]&31)*281474976710656+m[y+1]*1099511627776+m[y+2]*4294967296+m[y+3]*16777216+(m[y+4]<<16)+(m[y+5]<<8)+m[y+6],g>=9e15?crypto.randomBytes(7).copy(m,y):(v.push(g%1e14),y+=7);y=p/7}else throw C=!1,Error(ve+"crypto unavailable");if(!C)for(;y<p;)g=u(),g<9e15&&(v[y++]=g%1e14);for(p=v[--y],f%=U,p&&f&&(g=ei[U-f],v[y]=Me(p/g)*g);v[y]===0;v.pop(),y--);if(y<0)v=[b=0];else{for(b=-1;v[0]===0;v.splice(0,1),b-=U);for(y=1,g=v[0];g>=10;g/=10,y++);y<U&&(b-=U-y)}return w.e=b,w.c=v,w}}(),S.sum=function(){for(var s=1,u=arguments,f=new S(u[0]);s<u.length;)f=f.plus(u[s++]);return f},t=function(){var s="0123456789";function u(f,m,h,b){for(var p,g=[0],y,v=0,w=f.length;v<w;){for(y=g.length;y--;g[y]*=m);for(g[0]+=b.indexOf(f.charAt(v++)),p=0;p<g.length;p++)g[p]>h-1&&(g[p+1]==null&&(g[p+1]=0),g[p+1]+=g[p]/h|0,g[p]%=h)}return g.reverse()}return function(f,m,h,b,p){var g,y,v,w,T,P,G,j,Y=f.indexOf("."),re=a,q=o;for(Y>=0&&(w=N,N=0,f=f.replace(".",""),j=new S(m),P=j.pow(f.length-Y),N=w,j.c=u(je(Ne(P.c),P.e,"0"),10,h,s),j.e=j.c.length),G=u(f,m,h,p?(g=k,s):(g=s,k)),v=w=G.length;G[--w]==0;G.pop());if(!G[0])return g.charAt(0);if(Y<0?--v:(P.c=G,P.e=v,P.s=b,P=e(P,j,re,q,h),G=P.c,T=P.r,v=P.e),y=v+re+1,Y=G[y],w=h/2,T=T||y<0||G[y+1]!=null,T=q<4?(Y!=null||T)&&(q==0||q==(P.s<0?3:2)):Y>w||Y==w&&(q==4||T||q==6&&G[y-1]&1||q==(P.s<0?8:7)),y<1||!G[0])f=T?je(g.charAt(1),-re,g.charAt(0)):g.charAt(0);else{if(G.length=y,T)for(--h;++G[--y]>h;)G[y]=0,y||(++v,G=[1].concat(G));for(w=G.length;!G[--w];);for(Y=0,f="";Y<=w;f+=g.charAt(G[Y++]));f=je(f,v,g.charAt(0))}return f}}(),e=function(){function s(m,h,b){var p,g,y,v,w=0,T=m.length,P=h%$e,G=h/$e|0;for(m=m.slice();T--;)y=m[T]%$e,v=m[T]/$e|0,p=G*y+v*P,g=P*y+p%$e*$e+w,w=(g/b|0)+(p/$e|0)+G*v,m[T]=g%b;return w&&(m=[w].concat(m)),m}function u(m,h,b,p){var g,y;if(b!=p)y=b>p?1:-1;else for(g=y=0;g<b;g++)if(m[g]!=h[g]){y=m[g]>h[g]?1:-1;break}return y}function f(m,h,b,p){for(var g=0;b--;)m[b]-=g,g=m[b]<h[b]?1:0,m[b]=g*p+m[b]-h[b];for(;!m[0]&&m.length>1;m.splice(0,1));}return function(m,h,b,p,g){var y,v,w,T,P,G,j,Y,re,q,V,ce,He,st,ot,_e,Ge,me=m.s==h.s?1:-1,he=m.c,ee=h.c;if(!he||!he[0]||!ee||!ee[0])return new S(!m.s||!h.s||(he?ee&&he[0]==ee[0]:!ee)?NaN:he&&he[0]==0||!ee?me*0:me/0);for(Y=new S(me),re=Y.c=[],v=m.e-h.e,me=b+v+1,g||(g=Re,v=Ce(m.e/U)-Ce(h.e/U),me=me/U|0),w=0;ee[w]==(he[w]||0);w++);if(ee[w]>(he[w]||0)&&v--,me<0)re.push(1),T=!0;else{for(st=he.length,_e=ee.length,w=0,me+=2,P=Me(g/(ee[0]+1)),P>1&&(ee=s(ee,P,g),he=s(he,P,g),_e=ee.length,st=he.length),He=_e,q=he.slice(0,_e),V=q.length;V<_e;q[V++]=0);Ge=ee.slice(),Ge=[0].concat(Ge),ot=ee[0],ee[1]>=g/2&&ot++;do{if(P=0,y=u(ee,q,_e,V),y<0){if(ce=q[0],_e!=V&&(ce=ce*g+(q[1]||0)),P=Me(ce/ot),P>1)for(P>=g&&(P=g-1),G=s(ee,P,g),j=G.length,V=q.length;u(G,q,j,V)==1;)P--,f(G,_e<j?Ge:ee,j,g),j=G.length,y=1;else P==0&&(y=P=1),G=ee.slice(),j=G.length;if(j<V&&(G=[0].concat(G)),f(q,G,V,g),V=q.length,y==-1)for(;u(ee,q,_e,V)<1;)P++,f(q,_e<V?Ge:ee,V,g),V=q.length}else y===0&&(P++,q=[0]);re[w++]=P,q[0]?q[V++]=he[He]||0:(q=[he[He]],V=1)}while((He++<st||q[0]!=null)&&me--);T=q[0]!=null,re[0]||re.splice(0,1)}if(g==Re){for(w=1,me=re[0];me>=10;me/=10,w++);D(Y,b+(Y.e=w+v*U-1)+1,p,T)}else Y.e=v,Y.r=+T;return Y}}();function R(s,u,f,m){var h,b,p,g,y;if(f==null?f=o:se(f,0,8),!s.c)return s.toString();if(h=s.c[0],p=s.e,u==null)y=Ne(s.c),y=m==1||m==2&&(p<=d||p>=c)?It(y,p):je(y,p,"0");else if(s=D(new S(s),u,f),b=s.e,y=Ne(s.c),g=y.length,m==1||m==2&&(u<=b||b<=d)){for(;g<u;y+="0",g++);y=It(y,b)}else if(u-=p,y=je(y,b,"0"),b+1>g){if(--u>0)for(y+=".";u--;y+="0");}else if(u+=b-g,u>0)for(b+1==g&&(y+=".");u--;y+="0");return s.s<0&&h?"-"+y:y}function W(s,u){for(var f,m,h=1,b=new S(s[0]);h<s.length;h++)m=new S(s[h]),(!m.s||(f=nt(b,m))===u||f===0&&b.s===u)&&(b=m);return b}function H(s,u,f){for(var m=1,h=u.length;!u[--h];u.pop());for(h=u[0];h>=10;h/=10,m++);return(f=m+f*U-1)>_?s.c=s.e=null:f<L?s.c=[s.e=0]:(s.e=f,s.c=u),s}n=function(){var s=/^(-?)0([xbo])(?=\w[\w.]*$)/i,u=/^([^.]+)\.$/,f=/^\.([^.]+)$/,m=/^-?(Infinity|NaN)$/,h=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(b,p,g,y){var v,w=g?p:p.replace(h,"");if(m.test(w))b.s=isNaN(w)?null:w<0?-1:1;else{if(!g&&(w=w.replace(s,function(T,P,G){return v=(G=G.toLowerCase())=="x"?16:G=="b"?2:8,!y||y==v?P:T}),y&&(v=y,w=w.replace(u,"$1").replace(f,"0.$1")),p!=w))return new S(w,v);if(S.DEBUG)throw Error(ve+"Not a"+(y?" base "+y:"")+" number: "+p);b.s=null}b.c=b.e=null}}();function D(s,u,f,m){var h,b,p,g,y,v,w,T=s.c,P=ei;if(T){e:{for(h=1,g=T[0];g>=10;g/=10,h++);if(b=u-h,b<0)b+=U,p=u,y=T[v=0],w=Me(y/P[h-p-1]%10);else if(v=$t((b+1)/U),v>=T.length)if(m){for(;T.length<=v;T.push(0));y=w=0,h=1,b%=U,p=b-U+1}else break e;else{for(y=g=T[v],h=1;g>=10;g/=10,h++);b%=U,p=b-U+h,w=p<0?0:Me(y/P[h-p-1]%10)}if(m=m||u<0||T[v+1]!=null||(p<0?y:y%P[h-p-1]),m=f<4?(w||m)&&(f==0||f==(s.s<0?3:2)):w>5||w==5&&(f==4||m||f==6&&(b>0?p>0?y/P[h-p]:0:T[v-1])%10&1||f==(s.s<0?8:7)),u<1||!T[0])return T.length=0,m?(u-=s.e+1,T[0]=P[(U-u%U)%U],s.e=-u||0):T[0]=s.e=0,s;if(b==0?(T.length=v,g=1,v--):(T.length=v+1,g=P[U-b],T[v]=p>0?Me(y/P[h-p]%P[p])*g:0),m)for(;;)if(v==0){for(b=1,p=T[0];p>=10;p/=10,b++);for(p=T[0]+=g,g=1;p>=10;p/=10,g++);b!=g&&(s.e++,T[0]==Re&&(T[0]=1));break}else{if(T[v]+=g,T[v]!=Re)break;T[v--]=0,g=1}for(b=T.length;T[--b]===0;T.pop());}s.e>_?s.c=s.e=null:s.e<L&&(s.c=[s.e=0])}return s}function B(s){var u,f=s.e;return f===null?s.toString():(u=Ne(s.c),u=f<=d||f>=c?It(u,f):je(u,f,"0"),s.s<0?"-"+u:u)}return r.absoluteValue=r.abs=function(){var s=new S(this);return s.s<0&&(s.s=1),s},r.comparedTo=function(s,u){return nt(this,new S(s,u))},r.decimalPlaces=r.dp=function(s,u){var f,m,h,b=this;if(s!=null)return se(s,0,Ee),u==null?u=o:se(u,0,8),D(new S(b),s+b.e+1,u);if(!(f=b.c))return null;if(m=((h=f.length-1)-Ce(this.e/U))*U,h=f[h])for(;h%10==0;h/=10,m--);return m<0&&(m=0),m},r.dividedBy=r.div=function(s,u){return e(this,new S(s,u),a,o)},r.dividedToIntegerBy=r.idiv=function(s,u){return e(this,new S(s,u),0,1)},r.exponentiatedBy=r.pow=function(s,u){var f,m,h,b,p,g,y,v,w,T=this;if(s=new S(s),s.c&&!s.isInteger())throw Error(ve+"Exponent not an integer: "+B(s));if(u!=null&&(u=new S(u)),g=s.e>14,!T.c||!T.c[0]||T.c[0]==1&&!T.e&&T.c.length==1||!s.c||!s.c[0])return w=new S(Math.pow(+B(T),g?s.s*(2-At(s)):+B(s))),u?w.mod(u):w;if(y=s.s<0,u){if(u.c?!u.c[0]:!u.s)return new S(NaN);m=!y&&T.isInteger()&&u.isInteger(),m&&(T=T.mod(u))}else{if(s.e>9&&(T.e>0||T.e<-1||(T.e==0?T.c[0]>1||g&&T.c[1]>=24e7:T.c[0]<8e13||g&&T.c[0]<=9999975e7)))return b=T.s<0&&At(s)?-0:0,T.e>-1&&(b=1/b),new S(y?1/b:b);N&&(b=$t(N/U+2))}for(g?(f=new S(.5),y&&(s.s=1),v=At(s)):(h=Math.abs(+B(s)),v=h%2),w=new S(l);;){if(v){if(w=w.times(T),!w.c)break;b?w.c.length>b&&(w.c.length=b):m&&(w=w.mod(u))}if(h){if(h=Me(h/2),h===0)break;v=h%2}else if(s=s.times(f),D(s,s.e+1,1),s.e>14)v=At(s);else{if(h=+B(s),h===0)break;v=h%2}T=T.times(T),b?T.c&&T.c.length>b&&(T.c.length=b):m&&(T=T.mod(u))}return m?w:(y&&(w=l.div(w)),u?w.mod(u):b?D(w,N,o,p):w)},r.integerValue=function(s){var u=new S(this);return s==null?s=o:se(s,0,8),D(u,u.e+1,s)},r.isEqualTo=r.eq=function(s,u){return nt(this,new S(s,u))===0},r.isFinite=function(){return!!this.c},r.isGreaterThan=r.gt=function(s,u){return nt(this,new S(s,u))>0},r.isGreaterThanOrEqualTo=r.gte=function(s,u){return(u=nt(this,new S(s,u)))===1||u===0},r.isInteger=function(){return!!this.c&&Ce(this.e/U)>this.c.length-2},r.isLessThan=r.lt=function(s,u){return nt(this,new S(s,u))<0},r.isLessThanOrEqualTo=r.lte=function(s,u){return(u=nt(this,new S(s,u)))===-1||u===0},r.isNaN=function(){return!this.s},r.isNegative=function(){return this.s<0},r.isPositive=function(){return this.s>0},r.isZero=function(){return!!this.c&&this.c[0]==0},r.minus=function(s,u){var f,m,h,b,p=this,g=p.s;if(s=new S(s,u),u=s.s,!g||!u)return new S(NaN);if(g!=u)return s.s=-u,p.plus(s);var y=p.e/U,v=s.e/U,w=p.c,T=s.c;if(!y||!v){if(!w||!T)return w?(s.s=-u,s):new S(T?p:NaN);if(!w[0]||!T[0])return T[0]?(s.s=-u,s):new S(w[0]?p:o==3?-0:0)}if(y=Ce(y),v=Ce(v),w=w.slice(),g=y-v){for((b=g<0)?(g=-g,h=w):(v=y,h=T),h.reverse(),u=g;u--;h.push(0));h.reverse()}else for(m=(b=(g=w.length)<(u=T.length))?g:u,g=u=0;u<m;u++)if(w[u]!=T[u]){b=w[u]<T[u];break}if(b&&(h=w,w=T,T=h,s.s=-s.s),u=(m=T.length)-(f=w.length),u>0)for(;u--;w[f++]=0);for(u=Re-1;m>g;){if(w[--m]<T[m]){for(f=m;f&&!w[--f];w[f]=u);--w[f],w[m]+=Re}w[m]-=T[m]}for(;w[0]==0;w.splice(0,1),--v);return w[0]?H(s,w,v):(s.s=o==3?-1:1,s.c=[s.e=0],s)},r.modulo=r.mod=function(s,u){var f,m,h=this;return s=new S(s,u),!h.c||!s.s||s.c&&!s.c[0]?new S(NaN):!s.c||h.c&&!h.c[0]?new S(h):(M==9?(m=s.s,s.s=1,f=e(h,s,0,3),s.s=m,f.s*=m):f=e(h,s,0,M),s=h.minus(f.times(s)),!s.c[0]&&M==1&&(s.s=h.s),s)},r.multipliedBy=r.times=function(s,u){var f,m,h,b,p,g,y,v,w,T,P,G,j,Y,re,q=this,V=q.c,ce=(s=new S(s,u)).c;if(!V||!ce||!V[0]||!ce[0])return!q.s||!s.s||V&&!V[0]&&!ce||ce&&!ce[0]&&!V?s.c=s.e=s.s=null:(s.s*=q.s,!V||!ce?s.c=s.e=null:(s.c=[0],s.e=0)),s;for(m=Ce(q.e/U)+Ce(s.e/U),s.s*=q.s,y=V.length,T=ce.length,y<T&&(j=V,V=ce,ce=j,h=y,y=T,T=h),h=y+T,j=[];h--;j.push(0));for(Y=Re,re=$e,h=T;--h>=0;){for(f=0,P=ce[h]%re,G=ce[h]/re|0,p=y,b=h+p;b>h;)v=V[--p]%re,w=V[p]/re|0,g=G*v+w*P,v=P*v+g%re*re+j[b]+f,f=(v/Y|0)+(g/re|0)+G*w,j[b--]=v%Y;j[b]=f}return f?++m:j.splice(0,1),H(s,j,m)},r.negated=function(){var s=new S(this);return s.s=-s.s||null,s},r.plus=function(s,u){var f,m=this,h=m.s;if(s=new S(s,u),u=s.s,!h||!u)return new S(NaN);if(h!=u)return s.s=-u,m.minus(s);var b=m.e/U,p=s.e/U,g=m.c,y=s.c;if(!b||!p){if(!g||!y)return new S(h/0);if(!g[0]||!y[0])return y[0]?s:new S(g[0]?m:h*0)}if(b=Ce(b),p=Ce(p),g=g.slice(),h=b-p){for(h>0?(p=b,f=y):(h=-h,f=g),f.reverse();h--;f.push(0));f.reverse()}for(h=g.length,u=y.length,h-u<0&&(f=y,y=g,g=f,u=h),h=0;u;)h=(g[--u]=g[u]+y[u]+h)/Re|0,g[u]=Re===g[u]?0:g[u]%Re;return h&&(g=[h].concat(g),++p),H(s,g,p)},r.precision=r.sd=function(s,u){var f,m,h,b=this;if(s!=null&&s!==!!s)return se(s,1,Ee),u==null?u=o:se(u,0,8),D(new S(b),s,u);if(!(f=b.c))return null;if(h=f.length-1,m=h*U+1,h=f[h]){for(;h%10==0;h/=10,m--);for(h=f[0];h>=10;h/=10,m++);}return s&&b.e+1>m&&(m=b.e+1),m},r.shiftedBy=function(s){return se(s,-9007199254740991,Zi),this.times("1e"+s)},r.squareRoot=r.sqrt=function(){var s,u,f,m,h,b=this,p=b.c,g=b.s,y=b.e,v=a+4,w=new S("0.5");if(g!==1||!p||!p[0])return new S(!g||g<0&&(!p||p[0])?NaN:p?b:1/0);if(g=Math.sqrt(+B(b)),g==0||g==1/0?(u=Ne(p),(u.length+y)%2==0&&(u+="0"),g=Math.sqrt(+u),y=Ce((y+1)/2)-(y<0||y%2),g==1/0?u="5e"+y:(u=g.toExponential(),u=u.slice(0,u.indexOf("e")+1)+y),f=new S(u)):f=new S(g+""),f.c[0]){for(y=f.e,g=y+v,g<3&&(g=0);;)if(h=f,f=w.times(h.plus(e(b,h,v,1))),Ne(h.c).slice(0,g)===(u=Ne(f.c)).slice(0,g))if(f.e<y&&--g,u=u.slice(g-3,g+1),u=="9999"||!m&&u=="4999"){if(!m&&(D(h,h.e+a+2,0),h.times(h).eq(b))){f=h;break}v+=4,g+=4,m=1}else{(!+u||!+u.slice(1)&&u.charAt(0)=="5")&&(D(f,f.e+a+2,1),s=!f.times(f).eq(b));break}}return D(f,f.e+a+1,o,s)},r.toExponential=function(s,u){return s!=null&&(se(s,0,Ee),s++),R(this,s,u,1)},r.toFixed=function(s,u){return s!=null&&(se(s,0,Ee),s=s+this.e+1),R(this,s,u)},r.toFormat=function(s,u,f){var m,h=this;if(f==null)s!=null&&u&&typeof u=="object"?(f=u,u=null):s&&typeof s=="object"?(f=s,s=u=null):f=A;else if(typeof f!="object")throw Error(ve+"Argument not an object: "+f);if(m=h.toFixed(s,u),h.c){var b,p=m.split("."),g=+f.groupSize,y=+f.secondaryGroupSize,v=f.groupSeparator||"",w=p[0],T=p[1],P=h.s<0,G=P?w.slice(1):w,j=G.length;if(y&&(b=g,g=y,y=b,j-=b),g>0&&j>0){for(b=j%g||g,w=G.substr(0,b);b<j;b+=g)w+=v+G.substr(b,g);y>0&&(w+=v+G.slice(b)),P&&(w="-"+w)}m=T?w+(f.decimalSeparator||"")+((y=+f.fractionGroupSize)?T.replace(new RegExp("\\d{"+y+"}\\B","g"),"$&"+(f.fractionGroupSeparator||"")):T):w}return(f.prefix||"")+m+(f.suffix||"")},r.toFraction=function(s){var u,f,m,h,b,p,g,y,v,w,T,P,G=this,j=G.c;if(s!=null&&(g=new S(s),!g.isInteger()&&(g.c||g.s!==1)||g.lt(l)))throw Error(ve+"Argument "+(g.isInteger()?"out of range: ":"not an integer: ")+B(g));if(!j)return new S(G);for(u=new S(l),v=f=new S(l),m=y=new S(l),P=Ne(j),b=u.e=P.length-G.e-1,u.c[0]=ei[(p=b%U)<0?U+p:p],s=!s||g.comparedTo(u)>0?b>0?u:v:g,p=_,_=1/0,g=new S(P),y.c[0]=0;w=e(g,u,0,1),h=f.plus(w.times(m)),h.comparedTo(s)!=1;)f=m,m=h,v=y.plus(w.times(h=v)),y=h,u=g.minus(w.times(h=u)),g=h;return h=e(s.minus(f),m,0,1),y=y.plus(h.times(v)),f=f.plus(h.times(m)),y.s=v.s=G.s,b=b*2,T=e(v,m,b,o).minus(G).abs().comparedTo(e(y,f,b,o).minus(G).abs())<1?[v,m]:[y,f],_=p,T},r.toNumber=function(){return+B(this)},r.toPrecision=function(s,u){return s!=null&&se(s,1,Ee),R(this,s,u,2)},r.toString=function(s){var u,f=this,m=f.s,h=f.e;return h===null?m?(u="Infinity",m<0&&(u="-"+u)):u="NaN":(s==null?u=h<=d||h>=c?It(Ne(f.c),h):je(Ne(f.c),h,"0"):s===10&&O?(f=D(new S(f),a+h+1,o),u=je(Ne(f.c),f.e,"0")):(se(s,2,k.length,"Base"),u=t(je(Ne(f.c),h,"0"),10,s,m,!0)),m<0&&f.c[0]&&(u="-"+u)),u},r.valueOf=r.toJSON=function(){return B(this)},r._isBigNumber=!0,r[Symbol.toStringTag]="BigNumber",r[Symbol.for("nodejs.util.inspect.custom")]=r.valueOf,i!=null&&S.set(i),S}function Ce(i){var e=i|0;return i>0||i===e?e:e-1}function Ne(i){for(var e,t,n=1,r=i.length,l=i[0]+"";n<r;){for(e=i[n++]+"",t=U-e.length;t--;e="0"+e);l+=e}for(r=l.length;l.charCodeAt(--r)===48;);return l.slice(0,r+1||1)}function nt(i,e){var t,n,r=i.c,l=e.c,a=i.s,o=e.s,d=i.e,c=e.e;if(!a||!o)return null;if(t=r&&!r[0],n=l&&!l[0],t||n)return t?n?0:-o:a;if(a!=o)return a;if(t=a<0,n=d==c,!r||!l)return n?0:!r^t?1:-1;if(!n)return d>c^t?1:-1;for(o=(d=r.length)<(c=l.length)?d:c,a=0;a<o;a++)if(r[a]!=l[a])return r[a]>l[a]^t?1:-1;return d==c?0:d>c^t?1:-1}function se(i,e,t,n){if(i<e||i>t||i!==Me(i))throw Error(ve+(n||"Argument")+(typeof i=="number"?i<e||i>t?" out of range: ":" not an integer: ":" not a primitive number: ")+String(i))}function At(i){var e=i.c.length-1;return Ce(i.e/U)==e&&i.c[e]%2!=0}function It(i,e){return(i.length>1?i.charAt(0)+"."+i.slice(1):i)+(e<0?"e":"e+")+e}function je(i,e,t){var n,r;if(e<0){for(r=t+".";++e;r+=t);i=r+i}else if(n=i.length,++e>n){for(r=t,e-=n;--e;r+=t);i+=r}else e<n&&(i=i.slice(0,e)+"."+i.slice(e));return i}var Ie=Hi(),Br=class{constructor(i){I(this,"key");I(this,"left",null);I(this,"right",null);this.key=i}},Et=class extends Br{constructor(i){super(i)}},Gr=class{constructor(){I(this,"size",0);I(this,"modificationCount",0);I(this,"splayCount",0)}splay(i){const e=this.root;if(e==null)return this.compare(i,i),-1;let t=null,n=null,r=null,l=null,a=e;const o=this.compare;let d;for(;;)if(d=o(a.key,i),d>0){let c=a.left;if(c==null||(d=o(c.key,i),d>0&&(a.left=c.right,c.right=a,a=c,c=a.left,c==null)))break;t==null?n=a:t.left=a,t=a,a=c}else if(d<0){let c=a.right;if(c==null||(d=o(c.key,i),d<0&&(a.right=c.left,c.left=a,a=c,c=a.right,c==null)))break;r==null?l=a:r.right=a,r=a,a=c}else break;return r!=null&&(r.right=a.left,a.left=l),t!=null&&(t.left=a.right,a.right=n),this.root!==a&&(this.root=a,this.splayCount++),d}splayMin(i){let e=i,t=e.left;for(;t!=null;){const n=t;e.left=n.right,n.right=e,e=n,t=e.left}return e}splayMax(i){let e=i,t=e.right;for(;t!=null;){const n=t;e.right=n.left,n.left=e,e=n,t=e.right}return e}_delete(i){if(this.root==null||this.splay(i)!=0)return null;let t=this.root;const n=t,r=t.left;if(this.size--,r==null)this.root=t.right;else{const l=t.right;t=this.splayMax(r),t.right=l,this.root=t}return this.modificationCount++,n}addNewRoot(i,e){this.size++,this.modificationCount++;const t=this.root;if(t==null){this.root=i;return}e<0?(i.left=t,i.right=t.right,t.right=null):(i.right=t,i.left=t.left,t.left=null),this.root=i}_first(){const i=this.root;return i==null?null:(this.root=this.splayMin(i),this.root)}_last(){const i=this.root;return i==null?null:(this.root=this.splayMax(i),this.root)}clear(){this.root=null,this.size=0,this.modificationCount++}has(i){return this.validKey(i)&&this.splay(i)==0}defaultCompare(){return(i,e)=>i<e?-1:i>e?1:0}wrap(){return{getRoot:()=>this.root,setRoot:i=>{this.root=i},getSize:()=>this.size,getModificationCount:()=>this.modificationCount,getSplayCount:()=>this.splayCount,setSplayCount:i=>{this.splayCount=i},splay:i=>this.splay(i),has:i=>this.has(i)}}},Bt=class Ct extends Gr{constructor(t,n){super();I(this,"root",null);I(this,"compare");I(this,"validKey");I(this,fn,"[object Set]");this.compare=t??this.defaultCompare(),this.validKey=n??(r=>r!=null&&r!=null)}delete(t){return this.validKey(t)?this._delete(t)!=null:!1}deleteAll(t){for(const n of t)this.delete(n)}forEach(t){const n=this[Symbol.iterator]();let r;for(;r=n.next(),!r.done;)t(r.value,r.value,this)}add(t){const n=this.splay(t);return n!=0&&this.addNewRoot(new Et(t),n),this}addAndReturn(t){const n=this.splay(t);return n!=0&&this.addNewRoot(new Et(t),n),this.root.key}addAll(t){for(const n of t)this.add(n)}isEmpty(){return this.root==null}isNotEmpty(){return this.root!=null}single(){if(this.size==0)throw"Bad state: No element";if(this.size>1)throw"Bad state: Too many element";return this.root.key}first(){if(this.size==0)throw"Bad state: No element";return this._first().key}last(){if(this.size==0)throw"Bad state: No element";return this._last().key}lastBefore(t){if(t==null)throw"Invalid arguments(s)";if(this.root==null)return null;if(this.splay(t)<0)return this.root.key;let r=this.root.left;if(r==null)return null;let l=r.right;for(;l!=null;)r=l,l=r.right;return r.key}firstAfter(t){if(t==null)throw"Invalid arguments(s)";if(this.root==null)return null;if(this.splay(t)>0)return this.root.key;let r=this.root.right;if(r==null)return null;let l=r.left;for(;l!=null;)r=l,l=r.left;return r.key}retainAll(t){const n=new Ct(this.compare,this.validKey),r=this.modificationCount;for(const l of t){if(r!=this.modificationCount)throw"Concurrent modification during iteration.";this.validKey(l)&&this.splay(l)==0&&n.add(this.root.key)}n.size!=this.size&&(this.root=n.root,this.size=n.size,this.modificationCount++)}lookup(t){return!this.validKey(t)||this.splay(t)!=0?null:this.root.key}intersection(t){const n=new Ct(this.compare,this.validKey);for(const r of this)t.has(r)&&n.add(r);return n}difference(t){const n=new Ct(this.compare,this.validKey);for(const r of this)t.has(r)||n.add(r);return n}union(t){const n=this.clone();return n.addAll(t),n}clone(){const t=new Ct(this.compare,this.validKey);return t.size=this.size,t.root=this.copyNode(this.root),t}copyNode(t){if(t==null)return null;function n(l,a){let o,d;do{if(o=l.left,d=l.right,o!=null){const c=new Et(o.key);a.left=c,n(o,c)}if(d!=null){const c=new Et(d.key);a.right=c,l=d,a=c}}while(d!=null)}const r=new Et(t.key);return n(t,r),r}toSet(){return this.clone()}entries(){return new Wr(this.wrap())}keys(){return this[Symbol.iterator]()}values(){return this[Symbol.iterator]()}[(cn=Symbol.iterator,fn=Symbol.toStringTag,cn)](){return new zr(this.wrap())}},Vi=class{constructor(i){I(this,"tree");I(this,"path",new Array);I(this,"modificationCount",null);I(this,"splayCount");this.tree=i,this.splayCount=i.getSplayCount()}[Symbol.iterator](){return this}next(){return this.moveNext()?{done:!1,value:this.current()}:{done:!0,value:null}}current(){if(!this.path.length)return null;const i=this.path[this.path.length-1];return this.getValue(i)}rebuildPath(i){this.path.splice(0,this.path.length),this.tree.splay(i),this.path.push(this.tree.getRoot()),this.splayCount=this.tree.getSplayCount()}findLeftMostDescendent(i){for(;i!=null;)this.path.push(i),i=i.left}moveNext(){if(this.modificationCount!=this.tree.getModificationCount()){if(this.modificationCount==null){this.modificationCount=this.tree.getModificationCount();let t=this.tree.getRoot();for(;t!=null;)this.path.push(t),t=t.left;return this.path.length>0}throw"Concurrent modification during iteration."}if(!this.path.length)return!1;this.splayCount!=this.tree.getSplayCount()&&this.rebuildPath(this.path[this.path.length-1].key);let i=this.path[this.path.length-1],e=i.right;if(e!=null){for(;e!=null;)this.path.push(e),e=e.left;return!0}for(this.path.pop();this.path.length&&this.path[this.path.length-1].right===i;)i=this.path.pop();return this.path.length>0}},zr=class extends Vi{getValue(i){return i.key}},Wr=class extends Vi{getValue(i){return[i.key,i.key]}},Ki=i=>()=>i,ti=i=>{const e=i?(t,n)=>n.minus(t).abs().isLessThanOrEqualTo(i):Ki(!1);return(t,n)=>e(t,n)?0:t.comparedTo(n)};function Dr(i){const e=i?(t,n,r,l,a)=>t.exponentiatedBy(2).isLessThanOrEqualTo(l.minus(n).exponentiatedBy(2).plus(a.minus(r).exponentiatedBy(2)).times(i)):Ki(!1);return(t,n,r)=>{const l=t.x,a=t.y,o=r.x,d=r.y,c=a.minus(d).times(n.x.minus(o)).minus(l.minus(o).times(n.y.minus(d)));return e(c,l,a,o,d)?0:c.comparedTo(0)}}var Ur=i=>i,Fr=i=>{if(i){const e=new Bt(ti(i)),t=new Bt(ti(i)),n=(l,a)=>a.addAndReturn(l),r=l=>({x:n(l.x,e),y:n(l.y,t)});return r({x:new Ie(0),y:new Ie(0)}),r}return Ur},ii=i=>({set:e=>{Ze=ii(e)},reset:()=>ii(i),compare:ti(i),snap:Fr(i),orient:Dr(i)}),Ze=ii(),Lt=(i,e)=>i.ll.x.isLessThanOrEqualTo(e.x)&&e.x.isLessThanOrEqualTo(i.ur.x)&&i.ll.y.isLessThanOrEqualTo(e.y)&&e.y.isLessThanOrEqualTo(i.ur.y),ni=(i,e)=>{if(e.ur.x.isLessThan(i.ll.x)||i.ur.x.isLessThan(e.ll.x)||e.ur.y.isLessThan(i.ll.y)||i.ur.y.isLessThan(e.ll.y))return null;const t=i.ll.x.isLessThan(e.ll.x)?e.ll.x:i.ll.x,n=i.ur.x.isLessThan(e.ur.x)?i.ur.x:e.ur.x,r=i.ll.y.isLessThan(e.ll.y)?e.ll.y:i.ll.y,l=i.ur.y.isLessThan(e.ur.y)?i.ur.y:e.ur.y;return{ll:{x:t,y:r},ur:{x:n,y:l}}},Gt=(i,e)=>i.x.times(e.y).minus(i.y.times(e.x)),Yi=(i,e)=>i.x.times(e.x).plus(i.y.times(e.y)),zt=i=>Yi(i,i).sqrt(),qr=(i,e,t)=>{const n={x:e.x.minus(i.x),y:e.y.minus(i.y)},r={x:t.x.minus(i.x),y:t.y.minus(i.y)};return Gt(r,n).div(zt(r)).div(zt(n))},jr=(i,e,t)=>{const n={x:e.x.minus(i.x),y:e.y.minus(i.y)},r={x:t.x.minus(i.x),y:t.y.minus(i.y)};return Yi(r,n).div(zt(r)).div(zt(n))},Xi=(i,e,t)=>e.y.isZero()?null:{x:i.x.plus(e.x.div(e.y).times(t.minus(i.y))),y:t},Qi=(i,e,t)=>e.x.isZero()?null:{x:t,y:i.y.plus(e.y.div(e.x).times(t.minus(i.x)))},Zr=(i,e,t,n)=>{if(e.x.isZero())return Qi(t,n,i.x);if(n.x.isZero())return Qi(i,e,t.x);if(e.y.isZero())return Xi(t,n,i.y);if(n.y.isZero())return Xi(i,e,t.y);const r=Gt(e,n);if(r.isZero())return null;const l={x:t.x.minus(i.x),y:t.y.minus(i.y)},a=Gt(l,e).div(r),o=Gt(l,n).div(r),d=i.x.plus(o.times(e.x)),c=t.x.plus(a.times(n.x)),L=i.y.plus(o.times(e.y)),_=t.y.plus(a.times(n.y)),C=d.plus(c).div(2),M=L.plus(_).div(2);return{x:C,y:M}},Be=class En{constructor(e,t){I(this,"point");I(this,"isLeft");I(this,"segment");I(this,"otherSE");I(this,"consumedBy");e.events===void 0?e.events=[this]:e.events.push(this),this.point=e,this.isLeft=t}static compare(e,t){const n=En.comparePoints(e.point,t.point);return n!==0?n:(e.point!==t.point&&e.link(t),e.isLeft!==t.isLeft?e.isLeft?1:-1:Dt.compare(e.segment,t.segment))}static comparePoints(e,t){return e.x.isLessThan(t.x)?-1:e.x.isGreaterThan(t.x)?1:e.y.isLessThan(t.y)?-1:e.y.isGreaterThan(t.y)?1:0}link(e){if(e.point===this.point)throw new Error("Tried to link already linked events");const t=e.point.events;for(let n=0,r=t.length;n<r;n++){const l=t[n];this.point.events.push(l),l.point=this.point}this.checkForConsuming()}checkForConsuming(){const e=this.point.events.length;for(let t=0;t<e;t++){const n=this.point.events[t];if(n.segment.consumedBy===void 0)for(let r=t+1;r<e;r++){const l=this.point.events[r];l.consumedBy===void 0&&n.otherSE.point.events===l.otherSE.point.events&&n.segment.consume(l.segment)}}}getAvailableLinkedEvents(){const e=[];for(let t=0,n=this.point.events.length;t<n;t++){const r=this.point.events[t];r!==this&&!r.segment.ringOut&&r.segment.isInResult()&&e.push(r)}return e}getLeftmostComparator(e){const t=new Map,n=r=>{const l=r.otherSE;t.set(r,{sine:qr(this.point,e.point,l.point),cosine:jr(this.point,e.point,l.point)})};return(r,l)=>{t.has(r)||n(r),t.has(l)||n(l);const{sine:a,cosine:o}=t.get(r),{sine:d,cosine:c}=t.get(l);return a.isGreaterThanOrEqualTo(0)&&d.isGreaterThanOrEqualTo(0)?o.isLessThan(c)?1:o.isGreaterThan(c)?-1:0:a.isLessThan(0)&&d.isLessThan(0)?o.isLessThan(c)?-1:o.isGreaterThan(c)?1:0:d.isLessThan(a)?-1:d.isGreaterThan(a)?1:0}}},Hr=class gi{constructor(e){I(this,"events");I(this,"poly");I(this,"_isExteriorRing");I(this,"_enclosingRing");this.events=e;for(let t=0,n=e.length;t<n;t++)e[t].segment.ringOut=this;this.poly=null}static factory(e){const t=[];for(let n=0,r=e.length;n<r;n++){const l=e[n];if(!l.isInResult()||l.ringOut)continue;let a=null,o=l.leftSE,d=l.rightSE;const c=[o],L=o.point,_=[];for(;a=o,o=d,c.push(o),o.point!==L;)for(;;){const C=o.getAvailableLinkedEvents();if(C.length===0){const A=c[0].point,k=c[c.length-1].point;throw new Error(`Unable to complete output ring starting at [${A.x}, ${A.y}]. Last matching segment found ends at [${k.x}, ${k.y}].`)}if(C.length===1){d=C[0].otherSE;break}let M=null;for(let A=0,k=_.length;A<k;A++)if(_[A].point===o.point){M=A;break}if(M!==null){const A=_.splice(M)[0],k=c.splice(A.index);k.unshift(k[0].otherSE),t.push(new gi(k.reverse()));continue}_.push({index:c.length,point:o.point});const N=o.getLeftmostComparator(a);d=C.sort(N)[0].otherSE;break}t.push(new gi(c))}return t}getGeom(){let e=this.events[0].point;const t=[e];for(let c=1,L=this.events.length-1;c<L;c++){const _=this.events[c].point,C=this.events[c+1].point;Ze.orient(_,e,C)!==0&&(t.push(_),e=_)}if(t.length===1)return null;const n=t[0],r=t[1];Ze.orient(n,e,r)===0&&t.shift(),t.push(t[0]);const l=this.isExteriorRing()?1:-1,a=this.isExteriorRing()?0:t.length-1,o=this.isExteriorRing()?t.length:-1,d=[];for(let c=a;c!=o;c+=l)d.push([t[c].x.toNumber(),t[c].y.toNumber()]);return d}isExteriorRing(){if(this._isExteriorRing===void 0){const e=this.enclosingRing();this._isExteriorRing=e?!e.isExteriorRing():!0}return this._isExteriorRing}enclosingRing(){return this._enclosingRing===void 0&&(this._enclosingRing=this._calcEnclosingRing()),this._enclosingRing}_calcEnclosingRing(){var r,l;let e=this.events[0];for(let a=1,o=this.events.length;a<o;a++){const d=this.events[a];Be.compare(e,d)>0&&(e=d)}let t=e.segment.prevInResult(),n=t?t.prevInResult():null;for(;;){if(!t)return null;if(!n)return t.ringOut;if(n.ringOut!==t.ringOut)return((r=n.ringOut)==null?void 0:r.enclosingRing())!==t.ringOut?t.ringOut:(l=t.ringOut)==null?void 0:l.enclosingRing();t=n.prevInResult(),n=t?t.prevInResult():null}}},Ji=class{constructor(i){I(this,"exteriorRing");I(this,"interiorRings");this.exteriorRing=i,i.poly=this,this.interiorRings=[]}addInterior(i){this.interiorRings.push(i),i.poly=this}getGeom(){const i=this.exteriorRing.getGeom();if(i===null)return null;const e=[i];for(let t=0,n=this.interiorRings.length;t<n;t++){const r=this.interiorRings[t].getGeom();r!==null&&e.push(r)}return e}},Vr=class{constructor(i){I(this,"rings");I(this,"polys");this.rings=i,this.polys=this._composePolys(i)}getGeom(){const i=[];for(let e=0,t=this.polys.length;e<t;e++){const n=this.polys[e].getGeom();n!==null&&i.push(n)}return i}_composePolys(i){var t;const e=[];for(let n=0,r=i.length;n<r;n++){const l=i[n];if(!l.poly)if(l.isExteriorRing())e.push(new Ji(l));else{const a=l.enclosingRing();a!=null&&a.poly||e.push(new Ji(a)),(t=a==null?void 0:a.poly)==null||t.addInterior(l)}}return e}},Kr=class{constructor(i,e=Dt.compare){I(this,"queue");I(this,"tree");I(this,"segments");this.queue=i,this.tree=new Bt(e),this.segments=[]}process(i){const e=i.segment,t=[];if(i.consumedBy)return i.isLeft?this.queue.delete(i.otherSE):this.tree.delete(e),t;i.isLeft&&this.tree.add(e);let n=e,r=e;do n=this.tree.lastBefore(n);while(n!=null&&n.consumedBy!=null);do r=this.tree.firstAfter(r);while(r!=null&&r.consumedBy!=null);if(i.isLeft){let l=null;if(n){const o=n.getIntersection(e);if(o!==null&&(e.isAnEndpoint(o)||(l=o),!n.isAnEndpoint(o))){const d=this._splitSafely(n,o);for(let c=0,L=d.length;c<L;c++)t.push(d[c])}}let a=null;if(r){const o=r.getIntersection(e);if(o!==null&&(e.isAnEndpoint(o)||(a=o),!r.isAnEndpoint(o))){const d=this._splitSafely(r,o);for(let c=0,L=d.length;c<L;c++)t.push(d[c])}}if(l!==null||a!==null){let o=null;l===null?o=a:a===null?o=l:o=Be.comparePoints(l,a)<=0?l:a,this.queue.delete(e.rightSE),t.push(e.rightSE);const d=e.split(o);for(let c=0,L=d.length;c<L;c++)t.push(d[c])}t.length>0?(this.tree.delete(e),t.push(i)):(this.segments.push(e),e.prev=n)}else{if(n&&r){const l=n.getIntersection(r);if(l!==null){if(!n.isAnEndpoint(l)){const a=this._splitSafely(n,l);for(let o=0,d=a.length;o<d;o++)t.push(a[o])}if(!r.isAnEndpoint(l)){const a=this._splitSafely(r,l);for(let o=0,d=a.length;o<d;o++)t.push(a[o])}}}this.tree.delete(e)}return t}_splitSafely(i,e){this.tree.delete(i);const t=i.rightSE;this.queue.delete(t);const n=i.split(e);return n.push(t),i.consumedBy===void 0&&this.tree.add(i),n}},Yr=class{constructor(){I(this,"type");I(this,"numMultiPolys")}run(i,e,t){_t.type=i;const n=[new en(e,!0)];for(let c=0,L=t.length;c<L;c++)n.push(new en(t[c],!1));if(_t.numMultiPolys=n.length,_t.type==="difference"){const c=n[0];let L=1;for(;L<n.length;)ni(n[L].bbox,c.bbox)!==null?L++:n.splice(L,1)}if(_t.type==="intersection")for(let c=0,L=n.length;c<L;c++){const _=n[c];for(let C=c+1,M=n.length;C<M;C++)if(ni(_.bbox,n[C].bbox)===null)return[]}const r=new Bt(Be.compare);for(let c=0,L=n.length;c<L;c++){const _=n[c].getSweepEvents();for(let C=0,M=_.length;C<M;C++)r.add(_[C])}const l=new Kr(r);let a=null;for(r.size!=0&&(a=r.first(),r.delete(a));a;){const c=l.process(a);for(let L=0,_=c.length;L<_;L++){const C=c[L];C.consumedBy===void 0&&r.add(C)}r.size!=0?(a=r.first(),r.delete(a)):a=null}Ze.reset();const o=Hr.factory(l.segments);return new Vr(o).getGeom()}},_t=new Yr,Wt=_t,Xr=0,Dt=class qt{constructor(e,t,n,r){I(this,"id");I(this,"leftSE");I(this,"rightSE");I(this,"rings");I(this,"windings");I(this,"ringOut");I(this,"consumedBy");I(this,"prev");I(this,"_prevInResult");I(this,"_beforeState");I(this,"_afterState");I(this,"_isInResult");this.id=++Xr,this.leftSE=e,e.segment=this,e.otherSE=t,this.rightSE=t,t.segment=this,t.otherSE=e,this.rings=n,this.windings=r}static compare(e,t){const n=e.leftSE.point.x,r=t.leftSE.point.x,l=e.rightSE.point.x,a=t.rightSE.point.x;if(a.isLessThan(n))return 1;if(l.isLessThan(r))return-1;const o=e.leftSE.point.y,d=t.leftSE.point.y,c=e.rightSE.point.y,L=t.rightSE.point.y;if(n.isLessThan(r)){if(d.isLessThan(o)&&d.isLessThan(c))return 1;if(d.isGreaterThan(o)&&d.isGreaterThan(c))return-1;const _=e.comparePoint(t.leftSE.point);if(_<0)return 1;if(_>0)return-1;const C=t.comparePoint(e.rightSE.point);return C!==0?C:-1}if(n.isGreaterThan(r)){if(o.isLessThan(d)&&o.isLessThan(L))return-1;if(o.isGreaterThan(d)&&o.isGreaterThan(L))return 1;const _=t.comparePoint(e.leftSE.point);if(_!==0)return _;const C=e.comparePoint(t.rightSE.point);return C<0?1:C>0?-1:1}if(o.isLessThan(d))return-1;if(o.isGreaterThan(d))return 1;if(l.isLessThan(a)){const _=t.comparePoint(e.rightSE.point);if(_!==0)return _}if(l.isGreaterThan(a)){const _=e.comparePoint(t.rightSE.point);if(_<0)return 1;if(_>0)return-1}if(!l.eq(a)){const _=c.minus(o),C=l.minus(n),M=L.minus(d),N=a.minus(r);if(_.isGreaterThan(C)&&M.isLessThan(N))return 1;if(_.isLessThan(C)&&M.isGreaterThan(N))return-1}return l.isGreaterThan(a)?1:l.isLessThan(a)||c.isLessThan(L)?-1:c.isGreaterThan(L)?1:e.id<t.id?-1:e.id>t.id?1:0}static fromRing(e,t,n){let r,l,a;const o=Be.comparePoints(e,t);if(o<0)r=e,l=t,a=1;else if(o>0)r=t,l=e,a=-1;else throw new Error(`Tried to create degenerate segment at [${e.x}, ${e.y}]`);const d=new Be(r,!0),c=new Be(l,!1);return new qt(d,c,[n],[a])}replaceRightSE(e){this.rightSE=e,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}bbox(){const e=this.leftSE.point.y,t=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:e.isLessThan(t)?e:t},ur:{x:this.rightSE.point.x,y:e.isGreaterThan(t)?e:t}}}vector(){return{x:this.rightSE.point.x.minus(this.leftSE.point.x),y:this.rightSE.point.y.minus(this.leftSE.point.y)}}isAnEndpoint(e){return e.x.eq(this.leftSE.point.x)&&e.y.eq(this.leftSE.point.y)||e.x.eq(this.rightSE.point.x)&&e.y.eq(this.rightSE.point.y)}comparePoint(e){return Ze.orient(this.leftSE.point,e,this.rightSE.point)}getIntersection(e){const t=this.bbox(),n=e.bbox(),r=ni(t,n);if(r===null)return null;const l=this.leftSE.point,a=this.rightSE.point,o=e.leftSE.point,d=e.rightSE.point,c=Lt(t,o)&&this.comparePoint(o)===0,L=Lt(n,l)&&e.comparePoint(l)===0,_=Lt(t,d)&&this.comparePoint(d)===0,C=Lt(n,a)&&e.comparePoint(a)===0;if(L&&c)return C&&!_?a:!C&&_?d:null;if(L)return _&&l.x.eq(d.x)&&l.y.eq(d.y)?null:l;if(c)return C&&a.x.eq(o.x)&&a.y.eq(o.y)?null:o;if(C&&_)return null;if(C)return a;if(_)return d;const M=Zr(l,this.vector(),o,e.vector());return M===null||!Lt(r,M)?null:Ze.snap(M)}split(e){const t=[],n=e.events!==void 0,r=new Be(e,!0),l=new Be(e,!1),a=this.rightSE;this.replaceRightSE(l),t.push(l),t.push(r);const o=new qt(r,a,this.rings.slice(),this.windings.slice());return Be.comparePoints(o.leftSE.point,o.rightSE.point)>0&&o.swapEvents(),Be.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),n&&(r.checkForConsuming(),l.checkForConsuming()),t}swapEvents(){const e=this.rightSE;this.rightSE=this.leftSE,this.leftSE=e,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(let t=0,n=this.windings.length;t<n;t++)this.windings[t]*=-1}consume(e){let t=this,n=e;for(;t.consumedBy;)t=t.consumedBy;for(;n.consumedBy;)n=n.consumedBy;const r=qt.compare(t,n);if(r!==0){if(r>0){const l=t;t=n,n=l}if(t.prev===n){const l=t;t=n,n=l}for(let l=0,a=n.rings.length;l<a;l++){const o=n.rings[l],d=n.windings[l],c=t.rings.indexOf(o);c===-1?(t.rings.push(o),t.windings.push(d)):t.windings[c]+=d}n.rings=null,n.windings=null,n.consumedBy=t,n.leftSE.consumedBy=t.leftSE,n.rightSE.consumedBy=t.rightSE}}prevInResult(){return this._prevInResult!==void 0?this._prevInResult:(this.prev?this.prev.isInResult()?this._prevInResult=this.prev:this._prevInResult=this.prev.prevInResult():this._prevInResult=null,this._prevInResult)}beforeState(){if(this._beforeState!==void 0)return this._beforeState;if(!this.prev)this._beforeState={rings:[],windings:[],multiPolys:[]};else{const e=this.prev.consumedBy||this.prev;this._beforeState=e.afterState()}return this._beforeState}afterState(){if(this._afterState!==void 0)return this._afterState;const e=this.beforeState();this._afterState={rings:e.rings.slice(0),windings:e.windings.slice(0),multiPolys:[]};const t=this._afterState.rings,n=this._afterState.windings,r=this._afterState.multiPolys;for(let o=0,d=this.rings.length;o<d;o++){const c=this.rings[o],L=this.windings[o],_=t.indexOf(c);_===-1?(t.push(c),n.push(L)):n[_]+=L}const l=[],a=[];for(let o=0,d=t.length;o<d;o++){if(n[o]===0)continue;const c=t[o],L=c.poly;if(a.indexOf(L)===-1)if(c.isExterior)l.push(L);else{a.indexOf(L)===-1&&a.push(L);const _=l.indexOf(c.poly);_!==-1&&l.splice(_,1)}}for(let o=0,d=l.length;o<d;o++){const c=l[o].multiPoly;r.indexOf(c)===-1&&r.push(c)}return this._afterState}isInResult(){if(this.consumedBy)return!1;if(this._isInResult!==void 0)return this._isInResult;const e=this.beforeState().multiPolys,t=this.afterState().multiPolys;switch(Wt.type){case"union":{const n=e.length===0,r=t.length===0;this._isInResult=n!==r;break}case"intersection":{let n,r;e.length<t.length?(n=e.length,r=t.length):(n=t.length,r=e.length),this._isInResult=r===Wt.numMultiPolys&&n<r;break}case"xor":{const n=Math.abs(e.length-t.length);this._isInResult=n%2===1;break}case"difference":{const n=r=>r.length===1&&r[0].isSubject;this._isInResult=n(e)!==n(t);break}}return this._isInResult}},$i=class{constructor(i,e,t){I(this,"poly");I(this,"isExterior");I(this,"segments");I(this,"bbox");if(!Array.isArray(i)||i.length===0)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=e,this.isExterior=t,this.segments=[],typeof i[0][0]!="number"||typeof i[0][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");const n=Ze.snap({x:new Ie(i[0][0]),y:new Ie(i[0][1])});this.bbox={ll:{x:n.x,y:n.y},ur:{x:n.x,y:n.y}};let r=n;for(let l=1,a=i.length;l<a;l++){if(typeof i[l][0]!="number"||typeof i[l][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");const o=Ze.snap({x:new Ie(i[l][0]),y:new Ie(i[l][1])});o.x.eq(r.x)&&o.y.eq(r.y)||(this.segments.push(Dt.fromRing(r,o,this)),o.x.isLessThan(this.bbox.ll.x)&&(this.bbox.ll.x=o.x),o.y.isLessThan(this.bbox.ll.y)&&(this.bbox.ll.y=o.y),o.x.isGreaterThan(this.bbox.ur.x)&&(this.bbox.ur.x=o.x),o.y.isGreaterThan(this.bbox.ur.y)&&(this.bbox.ur.y=o.y),r=o)}(!n.x.eq(r.x)||!n.y.eq(r.y))&&this.segments.push(Dt.fromRing(r,n,this))}getSweepEvents(){const i=[];for(let e=0,t=this.segments.length;e<t;e++){const n=this.segments[e];i.push(n.leftSE),i.push(n.rightSE)}return i}},Qr=class{constructor(i,e){I(this,"multiPoly");I(this,"exteriorRing");I(this,"interiorRings");I(this,"bbox");if(!Array.isArray(i))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");this.exteriorRing=new $i(i[0],this,!0),this.bbox={ll:{x:this.exteriorRing.bbox.ll.x,y:this.exteriorRing.bbox.ll.y},ur:{x:this.exteriorRing.bbox.ur.x,y:this.exteriorRing.bbox.ur.y}},this.interiorRings=[];for(let t=1,n=i.length;t<n;t++){const r=new $i(i[t],this,!1);r.bbox.ll.x.isLessThan(this.bbox.ll.x)&&(this.bbox.ll.x=r.bbox.ll.x),r.bbox.ll.y.isLessThan(this.bbox.ll.y)&&(this.bbox.ll.y=r.bbox.ll.y),r.bbox.ur.x.isGreaterThan(this.bbox.ur.x)&&(this.bbox.ur.x=r.bbox.ur.x),r.bbox.ur.y.isGreaterThan(this.bbox.ur.y)&&(this.bbox.ur.y=r.bbox.ur.y),this.interiorRings.push(r)}this.multiPoly=e}getSweepEvents(){const i=this.exteriorRing.getSweepEvents();for(let e=0,t=this.interiorRings.length;e<t;e++){const n=this.interiorRings[e].getSweepEvents();for(let r=0,l=n.length;r<l;r++)i.push(n[r])}return i}},en=class{constructor(i,e){I(this,"isSubject");I(this,"polys");I(this,"bbox");if(!Array.isArray(i))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");try{typeof i[0][0][0]=="number"&&(i=[i])}catch{}this.polys=[],this.bbox={ll:{x:new Ie(Number.POSITIVE_INFINITY),y:new Ie(Number.POSITIVE_INFINITY)},ur:{x:new Ie(Number.NEGATIVE_INFINITY),y:new Ie(Number.NEGATIVE_INFINITY)}};for(let t=0,n=i.length;t<n;t++){const r=new Qr(i[t],this);r.bbox.ll.x.isLessThan(this.bbox.ll.x)&&(this.bbox.ll.x=r.bbox.ll.x),r.bbox.ll.y.isLessThan(this.bbox.ll.y)&&(this.bbox.ll.y=r.bbox.ll.y),r.bbox.ur.x.isGreaterThan(this.bbox.ur.x)&&(this.bbox.ur.x=r.bbox.ur.x),r.bbox.ur.y.isGreaterThan(this.bbox.ur.y)&&(this.bbox.ur.y=r.bbox.ur.y),this.polys.push(r)}this.isSubject=e}getSweepEvents(){const i=[];for(let e=0,t=this.polys.length;e<t;e++){const n=this.polys[e].getSweepEvents();for(let r=0,l=n.length;r<l;r++)i.push(n[r])}return i}},Jr=(i,...e)=>Wt.run("union",i,e),$r=(i,...e)=>Wt.run("difference",i,e);Ze.set;function es(i,e={}){const t=[];if(Xt(i,r=>{t.push(r.coordinates)}),t.length<2)throw new Error("Must have at least 2 geometries");const n=Jr(t[0],...t.slice(1));return n.length===0?null:n.length===1?Yt(n[0],e.properties):Wi(n,e.properties)}var tn=es;function ts(i){const e=[];if(Xt(i,r=>{e.push(r.coordinates)}),e.length<2)throw new Error("Must have at least two features");const t=i.features[0].properties||{},n=$r(e[0],...e.slice(1));return n.length===0?null:n.length===1?Yt(n[0],t):Wi(n,t)}var is=ts;function ns(i){if(!i)throw new Error("geojson is required");var e=[];return Or(i,function(t){e.push(t)}),wt(e)}var rs=ns;function nn(i,e){const t=is(wt([Yt([[[180,90],[-180,90],[-180,-90],[180,-90],[180,90]]]),i]));if(!t)return;t.properties={isMask:!0};const n=pt(Qt(i)),r=(n[2]-n[0])/360/1e3,l=n[0]<-180,a=n[2]>180,o=rs(i);if(o.features.length>1&&(l||a))for(const d of o.features){const c=pt(Qt(d));if(a&&c[0]<-180+r)for(const L of d.geometry.coordinates)for(const _ of L)_[0]+=360-r;if(l&&c[2]>180-r)for(const L of d.geometry.coordinates)for(const _ of L)_[0]-=360-r}e(wt([o.features.length<2?i:tn(o)??i,t]))}const rn=i=>{var n,r,l;const e=(n=i==null?void 0:i.geometry)==null?void 0:n.type,t=(r=i==null?void 0:i.properties)!=null&&r.isMask?0:e==="LineString"||e==="MultiLineString"?3:2;return{color:"#3170fe",fillColor:"#000",fillOpacity:(l=i==null?void 0:i.properties)!=null&&l.isMask?.1:0,weight:t,dashArray:[t,t],lineCap:"butt"}};function sn(i,e=!0,t=!0,n={},r={},l=rn){let a;const o=[];let d,c;const L=be.geoJSON(void 0,{style:l===!0?rn:l===!1?void 0:l??void 0,interactive:!1}).addTo(i),_=M=>{a==null||a({type:"mapClick",coordinates:[M.latlng.lng,M.latlng.lat]})};function C(M,N=!1){const A=document.createElement("div");return new sr({props:{displayIn:"leaflet"},target:A}),new be.Marker(M,{interactive:N,icon:new be.DivIcon({html:A,className:"",iconAnchor:[12,26],iconSize:[25,30],tooltipAnchor:[1,-24]})})}return{setEventHandler(M){M?(a=M,i.on("click",_)):(a=void 0,i.off("click",_))},flyTo(M,N){i.flyTo([M[1],M[0]],N,{duration:2,...n})},fitBounds(M,N,A){i.flyToBounds([[M[1],M[0]],[M[3],M[2]]],{padding:[N,N],duration:2,...A?{maxZoom:A}:{},...r})},indicateReverse(M){i.getContainer().style.cursor=M?"crosshair":""},setReverseMarker(M){var A;if(!e)return;const N=M&&[M[1],M[0]];c?N?c.setLatLng(N):(c.remove(),c=void 0):N&&(e instanceof Function?c=e(i)??void 0:(c=(typeof e=="object"?new be.Marker(N,e):C(N)).addTo(i),(A=c.getElement())==null||A.classList.add("marker-reverse")))},setFeatures(M,N,A){function k(O){L.clearLayers(),O&&L.addData(O)}for(const O of o)O.remove();o.length=0,k();e:if(N){let O=!1;if(N.geometry.type==="GeometryCollection"){const S=N.geometry.geometries.filter(R=>R.type==="Polygon"||R.type==="MultiPolygon");t:if(S.length>0){const R=tn(wt(S.map(W=>vt(W))));if(!R)break t;nn({...N,geometry:R.geometry},k),O=!0}else{const R=N.geometry.geometries.filter(W=>W.type==="LineString"||W.type==="MultiLineString");R.length>0&&(k({...N,geometry:{type:"GeometryCollection",geometries:R}}),O=!0)}}if(!O){if(N.geometry.type==="Polygon"||N.geometry.type==="MultiPolygon")nn(N,S=>{if(!S)return;const R=[...S.features],W=pt(Qt(N)),H=W[2]-W[0];W[0]-H/4<-180&&R.push(...on(S,-360).features),W[2]+H/4>180&&R.push(...on(S,360).features),k(wt(R))});else if(N.geometry.type==="LineString"||N.geometry.type==="MultiLineString"){k(N);break e}}if(!A&&N.geometry.type!=="Point")break e;if(e instanceof Function){const S=e(i,N);S&&o.push(S.addTo(i))}else if(e){const S=[N.center[1],N.center[0]];o.push(typeof e=="object"?new be.Marker(S,e):C(S).addTo(i))}}if(t)for(const O of M??[]){if(O===N)continue;const S=[O.center[1],O.center[0]];let R;if(t instanceof Function){if(R=t(i,O),!R)continue}else R=(typeof t=="object"?new be.Marker(S,t):C(S,!0)).addTo(i).bindTooltip(O.place_type[0]==="reverse"?O.place_name:O.place_name.replace(/,.*/,""),{direction:"top"});const W=R.getElement();W&&(W.addEventListener("click",H=>{H.stopPropagation(),a==null||a({type:"markerClick",id:O.id})}),W.addEventListener("mouseenter",()=>{a==null||a({type:"markerMouseEnter",id:O.id})}),W.addEventListener("mouseleave",()=>{a==null||a({type:"markerMouseLeave",id:O.id})}),W.classList.toggle("marker-fuzzy",!!O.matching_text)),o.push(R)}},setSelectedMarker(M){var N,A;d&&((N=d.getElement())==null||N.classList.toggle("marker-selected",!1)),d=M>-1?o[M]:void 0,(A=d==null?void 0:d.getElement())==null||A.classList.toggle("marker-selected",!0)},getCenterAndZoom(){const M=i.getCenter();return[i.getZoom(),M.lng,M.lat]}}}function on(i,e){const t=Ar(i);for(const n of t.features)if(n.geometry.type=="MultiPolygon")for(const r of n.geometry.coordinates)ln(r,e);else ln(n.geometry.coordinates,e);return t}function ln(i,e){for(const t of i)for(const n of t)n[0]+=e}class un extends be.Control{}be.Util.extend(un.prototype,be.Evented.prototype);class an extends un{constructor(t){super(t);hi(this,Le);hi(this,rt);di(this,rt,t)}onAdd(t){const n=document.createElement("div");n.className="leaflet-ctrl-geocoder",be.DomEvent.disableClickPropagation(n),be.DomEvent.disableScrollPropagation(n);const{marker:r,showResultMarkers:l,flyTo:a,fullGeometryStyle:o,position:d,...c}=Te(this,rt),L=typeof a=="boolean"?{}:a,_=sn(t,r,l,L,L,o);di(this,Le,new Nr({target:n,props:{mapController:_,flyTo:a===void 0?!0:!!a,...c}}));const C={select:void 0,pick:void 0,featureslisted:void 0,featuresmarked:void 0,response:void 0,optionsvisibilitychange:void 0,reversetoggle:void 0,querychange:void 0};for(const M in C)Te(this,Le).$on(M,N=>this.fire(M,N.detail));return n}setOptions(t){var d;Object.assign(Te(this,rt),t);const{marker:n,showResultMarkers:r,flyTo:l,fullGeometryStyle:a,...o}=Te(this,rt);(d=Te(this,Le))==null||d.$set(o)}setQuery(t,n=!0){var r;(r=Te(this,Le))==null||r.setQuery(t,n)}clearMap(){var t;(t=Te(this,Le))==null||t.clearMap()}clearList(){var t;(t=Te(this,Le))==null||t.clearList()}setReverseMode(t){var n;(n=Te(this,Le))==null||n.$set({reverseActive:t})}focus(t){var n;(n=Te(this,Le))==null||n.focus(t)}blur(){var t;(t=Te(this,Le))==null||t.blur()}onRemove(){var t;(t=Te(this,Le))==null||t.$destroy()}}Le=new WeakMap,rt=new WeakMap;function ss(...i){return new an(...i)}window.L&&typeof window.L=="object"&&typeof window.L.control=="function"&&(window.L.control.maptilerGeocoding=ss),K.GeocodingControl=an,K.createLeafletMapController=sn,Object.defineProperty(K,Symbol.toStringTag,{value:"Module"})});
23
2
  //# sourceMappingURL=leaflet.umd.js.map