@maptiler/geocoding-control 2.1.0-with-autocomplete-timeout → 2.1.2
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.
- package/MapLibreBasedGeocodingControl.d.ts +35 -69
- package/leaflet-controller.js +1942 -1523
- package/leaflet-controller.js.map +1 -1
- package/leaflet-controller.umd.js +1 -22
- package/leaflet-controller.umd.js.map +1 -1
- package/leaflet.js +2798 -2385
- package/leaflet.js.map +1 -1
- package/leaflet.umd.js +1 -22
- package/leaflet.umd.js.map +1 -1
- package/maplibregl-controller.js +1918 -1498
- package/maplibregl-controller.js.map +1 -1
- package/maplibregl-controller.umd.js +1 -22
- package/maplibregl-controller.umd.js.map +1 -1
- package/maplibregl.d.ts +34 -68
- package/maplibregl.js +2892 -2478
- package/maplibregl.js.map +1 -1
- package/maplibregl.umd.js +1 -22
- package/maplibregl.umd.js.map +1 -1
- package/maptilersdk.d.ts +34 -68
- package/maptilersdk.js +2896 -2481
- package/maptilersdk.js.map +1 -1
- package/maptilersdk.umd.js +1 -22
- package/maptilersdk.umd.js.map +1 -1
- package/openlayers-controller.js +1686 -1264
- package/openlayers-controller.js.map +1 -1
- package/openlayers-controller.umd.js +1 -22
- package/openlayers-controller.umd.js.map +1 -1
- package/openlayers.js +2778 -2365
- package/openlayers.js.map +1 -1
- package/openlayers.umd.js +1 -22
- package/openlayers.umd.js.map +1 -1
- package/package.json +23 -23
- package/react.js +753 -756
- package/react.js.map +1 -1
- package/react.umd.js +1 -1
- package/react.umd.js.map +1 -1
- package/svelte/GeocodingControl.svelte +71 -58
- package/svelte/GeocodingControl.svelte.d.ts +5 -3
- package/svelte/MapLibreBasedGeocodingControl.d.ts +35 -69
- package/svelte/info.json +1 -0
- package/svelte/maplibregl.d.ts +34 -68
- package/svelte/maptilersdk.d.ts +34 -68
- package/svelte/maptilersdk.js +2 -0
- package/svelte/react.js +3 -0
- package/svelte/types.d.ts +175 -128
- package/types.d.ts +175 -128
- package/vanilla.js +847 -853
- package/vanilla.js.map +1 -1
- package/vanilla.umd.js +1 -1
- package/vanilla.umd.js.map +1 -1
package/maplibregl.umd.js
CHANGED
|
@@ -1,23 +1,2 @@
|
|
|
1
|
-
(function(I,D){typeof exports=="object"&&typeof module<"u"?D(exports,require("maplibre-gl")):typeof define=="function"&&define.amd?define(["exports","maplibre-gl"],D):(I=typeof globalThis<"u"?globalThis:I||self,D(I.maplibreglMaptilerGeocoder={},I.maplibregl))})(this,function(I,D){"use strict";var wo=Object.defineProperty;var $i=I=>{throw TypeError(I)};var Lo=(I,D,J)=>D in I?wo(I,D,{enumerable:!0,configurable:!0,writable:!0,value:J}):I[D]=J;var re=(I,D,J)=>Lo(I,typeof D!="symbol"?D+"":D,J),en=(I,D,J)=>D.has(I)||$i("Cannot "+J);var Y=(I,D,J)=>(en(I,D,"read from private field"),J?J.call(I):D.get(I)),Kt=(I,D,J)=>D.has(I)?$i("Cannot add the same private member more than once"):D instanceof WeakSet?D.add(I):D.set(I,J),Xt=(I,D,J,qe)=>(en(I,D,"write to private field"),qe?qe.call(I,J):D.set(I,J),J);function J(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 qe=J(D);function j(){}function tn(i,e){for(const t in e)i[t]=e[t];return i}function Jt(i){return i()}function $t(){return Object.create(null)}function ye(i){i.forEach(Jt)}function ei(i){return typeof i=="function"}function we(i,e){return i!=i?e==e:i!==e||i&&typeof i=="object"||typeof i=="function"}let nt;function ee(i,e){return i===e?!0:(nt||(nt=document.createElement("a")),nt.href=e,i===nt.href)}function nn(i){return Object.keys(i).length===0}function rn(i,e,t,n){if(i){const r=ti(i,e,t,n);return i[0](r)}}function ti(i,e,t,n){return i[1]&&n?tn(t.ctx.slice(),i[1](n(e))):t.ctx}function on(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=[],u=Math.max(e.dirty.length,r.length);for(let s=0;s<u;s+=1)o[s]=e.dirty[s]|r[s];return o}return e.dirty|r}return e.dirty}function sn(i,e,t,n,r,o){if(r){const u=ti(e,t,n,o);i.p(u,r)}}function ln(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 rt(i){return i??""}function z(i,e){i.appendChild(e)}function G(i,e,t){i.insertBefore(e,t||null)}function F(i){i.parentNode&&i.parentNode.removeChild(i)}function B(i){return document.createElement(i)}function ue(i){return document.createElementNS("http://www.w3.org/2000/svg",i)}function Le(i){return document.createTextNode(i)}function oe(){return Le(" ")}function un(){return Le("")}function K(i,e,t,n){return i.addEventListener(e,t,n),()=>i.removeEventListener(e,t,n)}function an(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 cn(i){return Array.from(i.childNodes)}function Qe(i,e){e=""+e,i.data!==e&&(i.data=e)}function ii(i,e){i.value=e??""}function ge(i,e,t){i.classList.toggle(e,!!t)}function fn(i,e,{bubbles:t=!1,cancelable:n=!1}={}){return new CustomEvent(i,{detail:e,bubbles:t,cancelable:n})}let Ze;function He(i){Ze=i}function ni(){if(!Ze)throw new Error("Function called outside component initialization");return Ze}function dn(i){ni().$$.on_destroy.push(i)}function ri(){const i=ni();return(e,t,{cancelable:n=!1}={})=>{const r=i.$$.callbacks[e];if(r){const o=fn(e,t,{cancelable:n});return r.slice().forEach(u=>{u.call(i,o)}),!o.defaultPrevented}return!0}}function hn(i,e){const t=i.$$.callbacks[e.type];t&&t.slice().forEach(n=>n.call(this,e))}const Ue=[],wt=[];let De=[];const oi=[],gn=Promise.resolve();let Lt=!1;function mn(){Lt||(Lt=!0,gn.then(si))}function St(i){De.push(i)}const xt=new Set;let je=0;function si(){if(je!==0)return;const i=Ze;do{try{for(;je<Ue.length;){const e=Ue[je];je++,He(e),pn(e.$$)}}catch(e){throw Ue.length=0,je=0,e}for(He(null),Ue.length=0,je=0;wt.length;)wt.pop()();for(let e=0;e<De.length;e+=1){const t=De[e];xt.has(t)||(xt.add(t),t())}De.length=0}while(Ue.length);for(;oi.length;)oi.pop()();Lt=!1,xt.clear(),He(i)}function pn(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(St)}}function yn(i){const e=[],t=[];De.forEach(n=>i.indexOf(n)===-1?e.push(n):t.push(n)),t.forEach(n=>n()),De=e}const ot=new Set;let ze;function st(){ze={r:0,c:[],p:ze}}function lt(){ze.r||ye(ze.c),ze=ze.p}function Z(i,e){i&&i.i&&(ot.delete(i),i.i(e))}function X(i,e,t,n){if(i&&i.o){if(ot.has(i))return;ot.add(i),ze.c.push(()=>{ot.delete(i),n&&(t&&i.d(1),n())}),i.o(e)}else n&&n()}function li(i){return(i==null?void 0:i.length)!==void 0?i:Array.from(i)}function vn(i,e){X(i,1,1,()=>{e.delete(i.key)})}function bn(i,e,t,n,r,o,u,s,c,l,f,a){let d=i.length,g=o.length,v=d;const E={};for(;v--;)E[i[v].key]=v;const m=[],y=new Map,b=new Map,_=[];for(v=g;v--;){const M=a(r,o,v),S=t(M);let P=u.get(S);P?_.push(()=>P.p(M,e)):(P=l(S,M),P.c()),y.set(S,m[v]=P),S in E&&b.set(S,Math.abs(v-E[S]))}const L=new Set,T=new Set;function x(M){Z(M,1),M.m(s,f),u.set(M.key,M),f=M.first,g--}for(;d&&g;){const M=m[g-1],S=i[d-1],P=M.key,w=S.key;M===S?(f=M.first,d--,g--):y.has(w)?!u.has(P)||L.has(P)?x(M):T.has(w)?d--:b.get(P)>b.get(w)?(T.add(P),x(M)):(L.add(w),d--):(c(S,u),d--)}for(;d--;){const M=i[d];y.has(M.key)||c(M,u)}for(;g;)x(m[g-1]);return ye(_),m}function Se(i){i&&i.c()}function ve(i,e,t){const{fragment:n,after_update:r}=i.$$;n&&n.m(e,t),St(()=>{const o=i.$$.on_mount.map(Jt).filter(ei);i.$$.on_destroy?i.$$.on_destroy.push(...o):ye(o),i.$$.on_mount=[]}),r.forEach(St)}function be(i,e){const t=i.$$;t.fragment!==null&&(yn(t.after_update),ye(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function _n(i,e){i.$$.dirty[0]===-1&&(Ue.push(i),mn(),i.$$.dirty.fill(0)),i.$$.dirty[e/31|0]|=1<<e%31}function xe(i,e,t,n,r,o,u=null,s=[-1]){const c=Ze;He(i);const l=i.$$={fragment:null,ctx:[],props:o,update:j,not_equal:r,bound:$t(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(c?c.$$.context:[])),callbacks:$t(),dirty:s,skip_bound:!1,root:e.target||c.$$.root};u&&u(l.root);let f=!1;if(l.ctx=t?t(i,e.props||{},(a,d,...g)=>{const v=g.length?g[0]:d;return l.ctx&&r(l.ctx[a],l.ctx[a]=v)&&(!l.skip_bound&&l.bound[a]&&l.bound[a](v),f&&_n(i,a)),d}):[],l.update(),f=!0,ye(l.before_update),l.fragment=n?n(l.ctx):!1,e.target){if(e.hydrate){const a=cn(e.target);l.fragment&&l.fragment.l(a),a.forEach(F)}else l.fragment&&l.fragment.c();e.intro&&Z(i.$$.fragment),ve(i,e.target,e.anchor),si()}He(c)}class Me{constructor(){re(this,"$$");re(this,"$$set")}$destroy(){be(this,1),this.$destroy=j}$on(e,t){if(!ei(t))return j;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&&!nn(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const En="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(En);function wn(i){let e,t;return{c(){e=ue("svg"),t=ue("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){G(n,e,r),z(e,t)},p:j,i:j,o:j,d(n){n&&F(e)}}}class ui extends Me{constructor(e){super(),xe(this,e,null,wn,we,{})}}function Ln(i){let e,t;return{c(){e=ue("svg"),t=ue("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){G(n,e,r),z(e,t)},p:j,i:j,o:j,d(n){n&&F(e)}}}class ai extends Me{constructor(e){super(),xe(this,e,null,Ln,we,{})}}function Sn(i){let e,t;return{c(){e=B("img"),ee(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){G(n,e,r)},p(n,r){r&8&&!ee(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&&F(e)}}}function xn(i){let e,t;return{c(){e=B("img"),ee(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){G(n,e,r)},p(n,r){r&8&&!ee(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&&F(e)}}}function Mn(i){let e,t;return{c(){e=B("img"),ee(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){G(n,e,r)},p(n,r){r&8&&!ee(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&&F(e)}}}function kn(i){let e,t;return{c(){e=B("img"),ee(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){G(n,e,r)},p(n,r){r&8&&!ee(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&&F(e)}}}function Cn(i){let e,t;return{c(){e=B("img"),ee(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){G(n,e,r)},p(n,r){r&8&&!ee(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&&F(e)}}}function Tn(i){let e,t;return{c(){e=B("img"),ee(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){G(n,e,r)},p(n,r){r&8&&!ee(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&&F(e)}}}function Nn(i){let e,t;return{c(){e=B("img"),ee(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){G(n,e,r)},p(n,r){r&8&&!ee(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&&F(e)}}}function Rn(i){let e,t,n,r;return{c(){e=B("img"),ee(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,u){G(o,e,u),n||(r=K(e,"error",i[14]),n=!0)},p(o,u){u&32&&!ee(e.src,t=o[5])&&p(e,"src",t),u&16&&p(e,"alt",o[4]),u&64&&p(e,"title",o[6])},d(o){o&&F(e),n=!1,r()}}}function ci(i){let e,t;return{c(){e=B("span"),t=Le(i[6]),p(e,"class","secondary svelte-z7p9pp")},m(n,r){G(n,e,r),z(e,t)},p(n,r){r&64&&Qe(t,n[6])},d(n){n&&F(e)}}}function Pn(i){let e,t,n,r,o,u,s,c,l,f=(i[8]?i[0].place_name:i[0].place_name.replace(/,.*/,""))+"",a,d,g=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],v,E,m=(i[8]?"":i[0].place_name.replace(/[^,]*,?\s*/,""))+"",y,b,_,L,T,x;function M(k,C){return C&1&&(t=null),C&1&&(n=null),C&1&&(r=null),C&1&&(o=null),k[5]?Rn:k[0].address?Nn:(t==null&&(t=!!k[0].id.startsWith("road.")),t?Tn:(n==null&&(n=!!k[0].id.startsWith("address.")),n?Cn:(r==null&&(r=!!k[0].id.startsWith("postal_code.")),r?kn:(o==null&&(o=!!k[0].id.startsWith("poi.")),o?Mn:k[8]?xn:Sn))))}let S=M(i,-1),P=S(i),w=g&&ci(i);return{c(){e=B("li"),P.c(),u=oe(),s=B("span"),c=B("span"),l=B("span"),a=Le(f),d=oe(),w&&w.c(),v=oe(),E=B("span"),y=Le(m),p(l,"class","primary svelte-z7p9pp"),p(c,"class","svelte-z7p9pp"),p(E,"class","line2 svelte-z7p9pp"),p(s,"class","texts svelte-z7p9pp"),p(e,"tabindex","-1"),p(e,"role","option"),p(e,"aria-selected",b=i[1]==="selected"),p(e,"aria-checked",_=i[1]==="picked"),p(e,"class",L=rt(i[1])+" svelte-z7p9pp")},m(k,C){G(k,e,C),P.m(e,null),z(e,u),z(e,s),z(s,c),z(c,l),z(l,a),z(c,d),w&&w.m(c,null),z(s,v),z(s,E),z(E,y),T||(x=[K(e,"mouseenter",i[13]),K(e,"focus",i[15]),K(e,"click",i[16])],T=!0)},p(k,[C]){S===(S=M(k,C))&&P?P.p(k,C):(P.d(1),P=S(k),P&&(P.c(),P.m(e,u))),C&1&&f!==(f=(k[8]?k[0].place_name:k[0].place_name.replace(/,.*/,""))+"")&&Qe(a,f),C&37&&(g=k[2]==="always"||k[2]!=="never"&&!k[0].address&&!k[0].id.startsWith("road.")&&!k[0].id.startsWith("address.")&&!k[0].id.startsWith("postal_code.")&&(!k[0].id.startsWith("poi.")||!k[5])&&!k[8]),g?w?w.p(k,C):(w=ci(k),w.c(),w.m(c,null)):w&&(w.d(1),w=null),C&1&&m!==(m=(k[8]?"":k[0].place_name.replace(/[^,]*,?\s*/,""))+"")&&Qe(y,m),C&2&&b!==(b=k[1]==="selected")&&p(e,"aria-selected",b),C&2&&_!==(_=k[1]==="picked")&&p(e,"aria-checked",_),C&2&&L!==(L=rt(k[1])+" svelte-z7p9pp")&&p(e,"class",L)},i:j,o:j,d(k){k&&F(e),P.d(),w&&w.d(),T=!1,ye(x)}}}function On(i,e,t){var T;let n,r,{feature:o}=e,{style:u="default"}=e,{showPlaceType:s}=e,{missingIconsCache:c}=e,{iconsBaseUrl:l}=e;const f=ri(),a=(T=o.properties)==null?void 0:T.categories;let d,g,v=0,E=o.place_type[0]==="reverse";function m(){g&&c.add(g),t(11,v++,v)}function y(x){hn.call(this,i,x)}const b=()=>m(),_=()=>f("select",void 0),L=x=>{document.activeElement!==x.target&&f("select",void 0)};return i.$$set=x=>{"feature"in x&&t(0,o=x.feature),"style"in x&&t(1,u=x.style),"showPlaceType"in x&&t(2,s=x.showPlaceType),"missingIconsCache"in x&&t(10,c=x.missingIconsCache),"iconsBaseUrl"in x&&t(3,l=x.iconsBaseUrl)},i.$$.update=()=>{var x,M,S,P;if(i.$$.dirty&7224)do t(12,n--,n),t(4,d=a==null?void 0:a[n]),t(5,g=d?l+d.replace(/ /g,"_")+".svg":void 0);while(n>-1&&(!g||c.has(g)));i.$$.dirty&1&&t(6,r=((M=(x=o.properties)==null?void 0:x.categories)==null?void 0:M.join(", "))??((P=(S=o.properties)==null?void 0:S.place_type_name)==null?void 0:P[0])??o.place_type[0])},t(12,n=(a==null?void 0:a.length)??0),[o,u,s,l,d,g,r,f,E,m,c,v,n,y,b,_,L]}class In extends Me{constructor(e){super(),xe(this,e,On,Pn,we,{feature:0,style:1,showPlaceType:2,missingIconsCache:10,iconsBaseUrl:3})}}function zn(i){let e;return{c(){e=B("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){G(t,e,n)},p:j,i:j,o:j,d(t){t&&F(e)}}}class An extends Me{constructor(e){super(),xe(this,e,null,zn,we,{})}}function Wn(i){let e,t,n;return{c(){e=ue("svg"),t=ue("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){G(r,e,o),z(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:j,o:j,d(r){r&&F(e)}}}function Bn(i,e,t){let{displayIn:n}=e;return i.$$set=r=>{"displayIn"in r&&t(0,n=r.displayIn)},[n]}class Un extends Me{constructor(e){super(),xe(this,e,Bn,Wn,we,{displayIn:0})}}function Dn(i){let e,t;return{c(){e=ue("svg"),t=ue("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){G(n,e,r),z(e,t)},p:j,i:j,o:j,d(n){n&&F(e)}}}class jn extends Me{constructor(e){super(),xe(this,e,null,Dn,we,{})}}function Fn(i){let e,t,n;return{c(){e=ue("svg"),t=ue("circle"),n=ue("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){G(r,e,o),z(e,t),z(e,n)},p:j,i:j,o:j,d(r){r&&F(e)}}}class Gn extends Me{constructor(e){super(),xe(this,e,null,Fn,we,{})}}function qn(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 ut(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 Ve;async function Qn(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(Ve&&r.cachedLocationExpiry&&Ve.time+r.cachedLocationExpiry>Date.now()){if(!Ve.coords)break e;return Ve.coords}let o;try{return o=await new Promise((u,s)=>{t.signal.addEventListener("abort",()=>{s(Error("aborted"))}),navigator.geolocation.getCurrentPosition(c=>{u([c.coords.longitude,c.coords.latitude].map(l=>l.toFixed(6)).join(","))},c=>{s(c)},r)}),o}catch{}finally{r.cachedLocationExpiry&&(Ve={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 Zn=/^(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,fi=/^([+-]?[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,})$/,di=/^(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,hi=/^(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,gi=/^(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,mi=/^(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 Hn(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(g=>Number(g.trim())),t=Number(e[0]),n=Number(e[1]),r=Math.abs(t),o=Math.abs(n),u=t>0?"N":"S",s=n>0?"E":"W";let c;i=="DD"&&(c=`${r}° ${u}, ${o}° ${s}`);const l=Math.floor(r),f=Math.floor(o),a=(r-l)*60,d=(o-f)*60;if(i=="DM"){let g=pi(a,3).toFixed(3).padStart(6,"0"),v=pi(d,3).toFixed(3).padStart(6,"0");g.endsWith(".000")&&v.endsWith(".000")&&(g=g.replace(/\.000$/,""),v=v.replace(/\.000$/,"")),c=`${l}° ${g}' ${u}, ${f}° ${v}' ${s}`}if(i=="DMS"){const g=Math.floor(a),v=Math.floor(d);let E=((a-g)*60).toFixed(1).padStart(4,"0"),m=((d-v)*60).toFixed(1).padStart(4,"0");const y=g.toString().padStart(2,"0"),b=v.toString().padStart(2,"0");E.endsWith(".0")&&m.endsWith(".0")&&(E=E.replace(/\.0$/,""),m=m.replace(/\.0$/,"")),c=`${l}° ${y}' ${E}" ${u}, ${f}° ${b}' ${m}" ${s}`}return c}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 Mt(i,e){e||(e=5),i=i.replace(/\s+/g," ").trim();let t=null,n=null,r="",o="",u=null,s=[],c=!1;if(Zn.test(i))throw new Error("invalid coordinate value");if(fi.test(i))if(s=fi.exec(i),c=Ye(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),u="DM";else throw new Error("invalid coordinate format");else if(di.test(i))if(s=di.exec(i),c=Ye(s),c){if(t=s[2],n=s[6],t.includes(",")&&(t=t.replace(",",".")),n.includes(",")&&(n=n.replace(",",".")),u="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(hi.test(i))if(s=hi.exec(i),c=Ye(s),c)t=Math.abs(parseInt(s[2])),s[4]&&(t+=s[4]/60,u="DM"),s[6]&&(t+=s[6].replace(",",".")/3600,u="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(gi.test(i))if(s=gi.exec(i),c=Ye(s),c)t=Math.abs(parseInt(s[2])),s[4]&&(t+=s[4]/60,u="DM"),s[6]&&(t+=s[6]/3600,u="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(mi.test(i)){if(s=mi.exec(i),c=Ye(s),s.filter(l=>l).length<=5)throw new Error("invalid coordinates format");if(c)t=Math.abs(parseInt(s[2])),s[4]&&(t+=s[4].replace(",",".")/60,u="DM"),s[6]&&(t+=s[6].replace(",",".")/3600,u="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 l=/S|SOUTH/i;l.test(r)&&t>0&&(t=-1*t),l=/W|WEST/i,l.test(o)&&n>0&&(n=-1*n);const f=s[0].trim();let a,d;const g=/[,/;\u0020]/g,v=f.match(g);if(v==null){const y=Math.floor(i.length/2);a=f.substring(0,y).trim(),d=f.substring(y).trim()}else{let y;v.length%2==1?y=Math.floor(v.length/2):y=v.length/2-1;let b=0;if(y==0)b=f.indexOf(v[0]),a=f.substring(0,b).trim(),d=f.substring(b+1).trim();else{let _=0,L=0;for(;_<=y;)b=f.indexOf(v[_],L),L=b+1,_++;a=f.substring(0,b).trim(),d=f.substring(b+1).trim()}}const E=a.split(".");if(E.length==2&&E[1]==0&&E[1].length!=2)throw new Error("invalid coordinates format");const m=d.split(".");if(m.length==2&&m[1]==0&&m[1].length!=2)throw new Error("invalid coordinates format");if(/^\d+$/.test(a)||/^\d+$/.test(d))throw new Error("degree only coordinate/s provided");return t=Number(Number(t).toFixed(e)),n=Number(Number(n).toFixed(e)),Object.freeze({verbatimCoordinates:f,verbatimLatitude:a,verbatimLongitude:d,decimalLatitude:t,decimalLongitude:n,decimalCoordinates:`${t},${n}`,originalFormat:u,closeEnough:Vn,toCoordinateFormat:Hn})}else throw new Error("coordinates pattern match failed")}function Ye(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 u=e[o],s=e[o+r],c=t.test(u)&&t.test(s),l=n.test(u)&&n.test(s),f=u==s;if(!(u==null&&s==null)){if(u==null||s==null)return!1;if(c||l||f)continue;return!1}}return!0}function yi(i,e){const t=Math.abs(i-e);return Number(t.toFixed(6))<=1e-5}function Vn(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 yi(this.decimalLatitude,Number(e[0]))&&yi(this.decimalLongitude,e[1])}else throw new Error("coords being tested must be separated by a comma")}const Yn=Object.freeze({DMS:"DMS",DM:"DM",DD:"DD"});Mt.to=Yn;const Kn=[{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"}],Xn={decimalLatitude:40.123,decimalLongitude:-74.123},Jn=[{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}],$n=[{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 er(){const i=[];return Kn.forEach(e=>{e.decimalLatitude?i.push(e):i.push({...e,...Xn})}),[...i,...Jn,...$n]}const tr=er();Mt.formats=tr.map(i=>i.verbatimCoordinates);const ir=Mt;function vi(i,e,t){const n=i.slice();return n[94]=e[t],n[96]=t,n}function bi(i){let e,t;return e=new An({}),{c(){Se(e.$$.fragment)},m(n,r){ve(e,n,r),t=!0},i(n){t||(Z(e.$$.fragment,n),t=!0)},o(n){X(e.$$.fragment,n),t=!1},d(n){be(e,n)}}}function _i(i){let e,t,n,r,o;return t=new jn({}),{c(){e=B("button"),Se(t.$$.fragment),p(e,"type","button"),p(e,"title",i[10]),p(e,"class","svelte-bz0zu3"),ge(e,"active",i[0])},m(u,s){G(u,e,s),ve(t,e,null),n=!0,r||(o=K(e,"click",i[78]),r=!0)},p(u,s){(!n||s[0]&1024)&&p(e,"title",u[10]),(!n||s[0]&1)&&ge(e,"active",u[0])},i(u){n||(Z(t.$$.fragment,u),n=!0)},o(u){X(t.$$.fragment,u),n=!1},d(u){u&&F(e),be(t),r=!1,o()}}}function nr(i){let e,t=[],n=new Map,r,o,u,s=li(i[13]);const c=l=>l[94].id+(l[94].address?","+l[94].address:"");for(let l=0;l<s.length;l+=1){let f=vi(i,s,l),a=c(f);n.set(a,t[l]=Ei(a,f))}return{c(){e=B("ul");for(let l=0;l<t.length;l+=1)t[l].c();p(e,"class","options svelte-bz0zu3"),p(e,"role","listbox")},m(l,f){G(l,e,f);for(let a=0;a<t.length;a+=1)t[a]&&t[a].m(e,null);r=!0,o||(u=[K(e,"mouseleave",i[27]),K(e,"blur",i[82]),K(e,"keydown",i[23])],o=!0)},p(l,f){f[0]&102823936&&(s=li(l[13]),st(),t=bn(t,f,c,1,l,s,n,e,vn,Ei,null,vi),lt())},i(l){if(!r){for(let f=0;f<s.length;f+=1)Z(t[f]);r=!0}},o(l){for(let f=0;f<t.length;f+=1)X(t[f]);r=!1},d(l){l&&F(e);for(let f=0;f<t.length;f+=1)t[f].d();o=!1,ye(u)}}}function rr(i){let e,t,n,r,o,u;return t=new ai({}),{c(){e=B("div"),Se(t.$$.fragment),n=oe(),r=B("div"),o=Le(i[8]),p(r,"class","svelte-bz0zu3"),p(e,"class","no-results svelte-bz0zu3")},m(s,c){G(s,e,c),ve(t,e,null),z(e,n),z(e,r),z(r,o),u=!0},p(s,c){(!u||c[0]&256)&&Qe(o,s[8])},i(s){u||(Z(t.$$.fragment,s),u=!0)},o(s){X(t.$$.fragment,s),u=!1},d(s){s&&F(e),be(t)}}}function or(i){let e="",t;return{c(){t=Le(e)},m(n,r){G(n,t,r)},p:j,i:j,o:j,d(n){n&&F(t)}}}function sr(i){let e,t,n,r,o,u,s,c,l,f,a;return t=new ai({}),c=new ui({}),{c(){e=B("div"),Se(t.$$.fragment),n=oe(),r=B("div"),o=Le(i[7]),u=oe(),s=B("button"),Se(c.$$.fragment),p(r,"class","svelte-bz0zu3"),p(s,"class","svelte-bz0zu3"),p(e,"class","error svelte-bz0zu3")},m(d,g){G(d,e,g),ve(t,e,null),z(e,n),z(e,r),z(r,o),z(e,u),z(e,s),ve(c,s,null),l=!0,f||(a=K(s,"click",i[79]),f=!0)},p(d,g){(!l||g[0]&128)&&Qe(o,d[7])},i(d){l||(Z(t.$$.fragment,d),Z(c.$$.fragment,d),l=!0)},o(d){X(t.$$.fragment,d),X(c.$$.fragment,d),l=!1},d(d){d&&F(e),be(t),be(c),f=!1,a()}}}function Ei(i,e){var s;let t,n,r;function o(){return e[80](e[96])}function u(){return e[81](e[94])}return n=new In({props:{feature:e[94],showPlaceType:e[11],style:e[15]===e[96]?"selected":((s=e[14])==null?void 0:s.id)===e[94].id?"picked":"default",missingIconsCache:e[21],iconsBaseUrl:e[12]}}),n.$on("mouseenter",o),n.$on("select",u),{key:i,first:null,c(){t=un(),Se(n.$$.fragment),this.first=t},m(c,l){G(c,t,l),ve(n,c,l),r=!0},p(c,l){var a;e=c;const f={};l[0]&8192&&(f.feature=e[94]),l[0]&2048&&(f.showPlaceType=e[11]),l[0]&57344&&(f.style=e[15]===e[96]?"selected":((a=e[14])==null?void 0:a.id)===e[94].id?"picked":"default"),l[0]&4096&&(f.iconsBaseUrl=e[12]),n.$set(f)},i(c){r||(Z(n.$$.fragment,c),r=!0)},o(c){X(n.$$.fragment,c),r=!1},d(c){c&&F(t),be(n,c)}}}function lr(i){let e,t,n,r,o,u,s,c,l,f,a,d,g,v,E,m,y,b,_,L,T,x=!1;o=new Gn({}),a=new ui({});let M=i[20]&&bi(),S=i[6]==="button"&&_i(i);const P=i[69].default,w=rn(P,i,i[68],null),k=[sr,or,rr,nr],C=[];function ne(N,A){var ce,q;return N[19]?0:!N[16]&&!N[4]?1:((ce=N[13])==null?void 0:ce.length)===0?2:(q=N[13])!=null&&q.length&&(N[16]||N[4])?3:-1}return~(m=ne(i))&&(y=C[m]=k[m](i)),{c(){e=oe(),t=B("form"),n=B("div"),r=B("button"),Se(o.$$.fragment),u=oe(),s=B("input"),c=oe(),l=B("div"),f=B("button"),Se(a.$$.fragment),d=oe(),M&&M.c(),g=oe(),S&&S.c(),v=oe(),w&&w.c(),E=oe(),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(f,"type","button"),p(f,"title",i[3]),p(f,"class","svelte-bz0zu3"),p(l,"class","clear-button-container svelte-bz0zu3"),ge(l,"displayable",i[1]!==""),p(n,"class","input-group svelte-bz0zu3"),p(t,"class",b=rt(i[2])+" svelte-bz0zu3"),ge(t,"can-collapse",i[5]&&i[1]==="")},m(N,A){G(N,e,A),G(N,t,A),z(t,n),z(n,r),ve(o,r,null),z(n,u),z(n,s),i[71](s),ii(s,i[1]),z(n,c),z(n,l),z(l,f),ve(a,f,null),z(l,d),M&&M.m(l,null),z(n,g),S&&S.m(n,null),z(n,v),w&&w.m(n,null),z(t,E),~m&&C[m].m(t,null),_=!0,L||(T=[K(r,"click",i[70]),K(s,"input",i[72]),K(s,"focus",i[73]),K(s,"blur",i[74]),K(s,"click",i[75]),K(s,"keydown",i[23]),K(s,"input",i[24]),K(s,"change",i[76]),K(f,"click",i[77]),K(t,"submit",an(i[22]))],L=!0)},p(N,A){(!_||A[0]&512)&&p(s,"placeholder",N[9]),(!_||A[0]&512)&&p(s,"aria-label",N[9]),A[0]&2&&s.value!==N[1]&&ii(s,N[1]),(!_||A[0]&8)&&p(f,"title",N[3]),N[20]?M?A[0]&1048576&&Z(M,1):(M=bi(),M.c(),Z(M,1),M.m(l,null)):M&&(st(),X(M,1,1,()=>{M=null}),lt()),(!_||A[0]&2)&&ge(l,"displayable",N[1]!==""),N[6]==="button"?S?(S.p(N,A),A[0]&64&&Z(S,1)):(S=_i(N),S.c(),Z(S,1),S.m(n,v)):S&&(st(),X(S,1,1,()=>{S=null}),lt()),w&&w.p&&(!_||A[2]&64)&&sn(w,P,N,N[68],_?on(P,N[68],A,null):ln(N[68]),null);let ce=m;m=ne(N),m===ce?~m&&C[m].p(N,A):(y&&(st(),X(C[ce],1,1,()=>{C[ce]=null}),lt()),~m?(y=C[m],y?y.p(N,A):(y=C[m]=k[m](N),y.c()),Z(y,1),y.m(t,null)):y=null),(!_||A[0]&4&&b!==(b=rt(N[2])+" svelte-bz0zu3"))&&p(t,"class",b),(!_||A[0]&38)&&ge(t,"can-collapse",N[5]&&N[1]==="")},i(N){_||(Z(x),Z(o.$$.fragment,N),Z(a.$$.fragment,N),Z(M),Z(S),Z(w,N),Z(y),_=!0)},o(N){X(x),X(o.$$.fragment,N),X(a.$$.fragment,N),X(M),X(S),X(w,N),X(y),_=!1},d(N){N&&(F(e),F(t)),be(o),i[71](null),be(a),M&&M.d(),S&&S.d(),w&&w.d(N),~m&&C[m].d(),L=!1,ye(T)}}}function ur(i,e,t){let n,r,o,{$$slots:u={},$$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:l=void 0}=e,{apiKey:f}=e,{bbox:a=void 0}=e,{clearButtonTitle:d="clear"}=e,{clearOnBlur:g=!1}=e,{clearListOnPick:v=!1}=e,{keepListOpen:E=!1}=e,{collapsed:m=!1}=e,{country:y=void 0}=e,{debounceSearch:b=200}=e,{enableReverse:_="never"}=e,{errorMessage:L="Something went wrong…"}=e,{filter:T=()=>!0}=e,{flyTo:x=!0}=e,{fuzzyMatch:M=!0}=e,{language:S=void 0}=e,{limit:P=void 0}=e,{mapController:w=void 0}=e,{minLength:k=2}=e,{noResultsMessage:C="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:ne="Search"}=e,{proximity:N=[{type:"server-geolocation"}]}=e,{reverseActive:A=_==="always"}=e,{reverseButtonTitle:ce="toggle reverse geocoding"}=e,{searchValue:q=""}=e,{pickedResultStyle:ht="full-geometry"}=e,{showPlaceType:Zi="if-needed"}=e,{showResultsWhileTyping:gt=!0}=e,{autocompleteTimeout:Wt=void 0}=e,{selectFirst:Ae=!0}=e,{flyToSelected:mt=!1}=e,{markerOnSelected:pt=!0}=e,{types:We=void 0}=e,{exhaustiveReverseGeocoding:Bt=!1}=e,{excludeTypes:yt=!1}=e,{zoom:vt=c}=e,{apiUrl:Ut="https://api.maptiler.com/geocoding"}=e,{fetchParameters:Dt={}}=e,{iconsBaseUrl:Hi="https://cdn.maptiler.com/maptiler-geocoding-control/v2.1.0-with-autocomplete-timeout/icons/"}=e,{adjustUrlQuery:jt=()=>{}}=e,{adjustUrl:Ft=()=>{}}=e;function Jr(h){fe.focus(h)}function $r(){fe.blur()}function Vi(h,Q=!0,H=!1){t(1,q=h),Q?(t(15,W=-1),Ki()):(Xi(void 0,!H,H),setTimeout(()=>{fe.focus(),fe.select()}))}function eo(){t(13,O=void 0),t(14,R=void 0),t(15,W=-1)}function to(){t(62,V=[]),t(14,R=void 0)}let O,V,R,Yi="",fe,W=-1,me,bt=[],Be,Pe,le,Ge,Gt,Ee=!1;const io=new Set,Oe=ri();function no(){return!!le}dn(()=>{w&&(w.setEventHandler(void 0),w.indicateReverse(!1),w.setSelectedMarker(-1),w.setFeatures(void 0,void 0,!1))});function Ki(h){if(t(17,Ee=!1),Pe&&(window.clearTimeout(Pe),Pe=void 0),le){window.clearTimeout(le),t(63,le=void 0),tt(q,{appendSpace:!0});return}if(W>-1&&O)t(14,R=O[W]),t(1,q=R.place_type[0]==="reverse"?R.place_name:R.place_name.replace(/,.*/,"")),t(19,me=void 0),t(62,V=void 0),t(15,W=-1);else if(q){const Q=h||!qt(q);tt(q,{exact:!0}).then(()=>{t(62,V=O),t(14,R=void 0),Q&&ro()}).catch(H=>t(19,me=H))}}function qt(h){try{return ir(h,6)}catch{return!1}}async function tt(h,{byId:Q=!1,exact:H=!1,appendSpace:de=!1}={}){var pe,Ie;t(19,me=void 0),Be==null||Be.abort();const $=new AbortController;t(20,Be=$);try{const U=qt(h),Ht=new URL(Ut+"/"+encodeURIComponent(U?U.decimalLongitude+","+U.decimalLatitude:h+(de?" ":""))+".json"),he=Ht.searchParams;if(S!==void 0&&he.set("language",Array.isArray(S)?S.join(","):S??""),We&&he.set("types",We.join(",")),yt&&he.set("excludeTypes",String(yt)),a&&he.set("bbox",a.map(Et=>Et.toFixed(6)).join(",")),y&&he.set("country",Array.isArray(y)?y.join(","):y),!Q&&!U){const Et=await Qn(w,N,$);Et&&he.set("proximity",Et),(H||!gt)&&he.set("autocomplete","false"),he.set("fuzzyMatch",String(M))}P!==void 0&&(Bt||!U||(We==null?void 0:We.length)===1)&&he.set("limit",String(P)),he.set("key",f),jt(he),Ft(Ht);const _t=Ht.toString();if(_t===Yi){Q?(v&&t(13,O=void 0),t(14,R=bt[0])):(t(13,O=bt),((pe=O[W])==null?void 0:pe.id)!==(r==null?void 0:r.id)&&t(15,W=-1));return}Yi=_t;const Vt=await fetch(_t,{signal:$.signal,...Dt});if(!Vt.ok)throw new Error(await Vt.text());const Yt=await Vt.json();Oe("response",{url:_t,featureCollection:Yt}),Q?(v&&t(13,O=void 0),t(14,R=Yt.features[0]),bt=[R]):(t(13,O=Yt.features.filter(T)),U&&O.unshift({type:"Feature",properties:{},id:"reverse_"+U.decimalLongitude+"_"+U.decimalLatitude,text:U.decimalLatitude+", "+U.decimalLongitude,place_name:U.decimalLatitude+", "+U.decimalLongitude,place_type:["reverse"],center:[U.decimalLongitude,U.decimalLatitude],bbox:[U.decimalLongitude,U.decimalLatitude,U.decimalLongitude,U.decimalLatitude],geometry:{type:"Point",coordinates:[U.decimalLongitude,U.decimalLatitude]}}),bt=O,((Ie=O[W])==null?void 0:Ie.id)!==(r==null?void 0:r.id)&&t(15,W=-1),U&&fe.focus())}catch(U){if(U&&typeof U=="object"&&"name"in U&&U.name==="AbortError")return;throw U}finally{$===Be&&t(20,Be=void 0)}}function ro(){var de;if(!(V!=null&&V.length)||!x)return;const h=[180,90,-180,-90],Q=!V.some($=>!$.matching_text);let H;for(const $ of V){const pe=it($);if(H=H===void 0?pe:pe===void 0?H:Math.max(H,pe),Q||!$.matching_text)for(const Ie of[0,1,2,3])h[Ie]=Math[Ie<2?"min":"max"](h[Ie],((de=$.bbox)==null?void 0:de[Ie])??$.center[Ie%2])}w&&V.length>0&&(R&&h[0]===h[2]&&h[1]===h[3]?w.flyTo(R.center,it(R)):w.fitBounds(ut(h),50,H))}function Qt(){!R||!w||(!R.bbox||R.bbox[0]===R.bbox[2]&&R.bbox[1]===R.bbox[3]?w.flyTo(R.center,it(R)):w.fitBounds(ut(R.bbox),50,it(R)))}function it(h){var H;if(!h.bbox||h.bbox[0]!==h.bbox[2]&&h.bbox[1]!==h.bbox[3])return;const Q=h.id.replace(/\..*/,"");return(Array.isArray((H=h.properties)==null?void 0:H.categories)?h.properties.categories.reduce((de,$)=>{const pe=vt[Q+"."+$];return de===void 0?pe:pe===void 0?de:Math.max(de,pe)},void 0):void 0)??vt[Q]}function oo(h){t(0,A=_==="always"),t(13,O=void 0),t(14,R=void 0),t(15,W=-1),Vi(h[1].toFixed(6)+", "+qn(h[0],[-180,180],!0).toFixed(6),!1,!0)}function so(h){if(!O)return;let Q=h.key==="ArrowDown"?1:h.key==="ArrowUp"?-1:0;Q&&(fe.focus(),t(17,Ee=!0),h.preventDefault(),R&&W===-1&&t(15,W=O.findIndex(H=>H.id===(R==null?void 0:R.id))),W===(R||Ae?0:-1)&&Q===-1&&t(15,W=O.length),t(15,W+=Q),W>=O.length&&t(15,W=-1),W<0&&(R||Ae)&&t(15,W=0))}function Xi(h,Q=!0,H=!1){if(t(19,me=void 0),t(14,R=void 0),t(17,Ee=!0),Pe&&(window.clearTimeout(Pe),Pe=void 0),le&&(window.clearTimeout(le),t(63,le=void 0)),!gt&&!H||q.length<k){t(13,O=void 0);return}const de=q;Pe=window.setTimeout(()=>{Pe=void 0,tt(de).catch($=>t(19,me=$))},Q?b:0),q.endsWith(" ")||t(63,le=window.setTimeout(()=>{t(63,le=void 0),tt(de,{appendSpace:!0}).catch($=>t(19,me=$))},Wt))}function Zt(h){R&&(R==null?void 0:R.id)===(h==null?void 0:h.id)?Qt():(t(14,R=h),t(1,q=h.place_name))}function Ji(h){t(15,W=h)}function lo(){(!Ae||R)&&t(15,W=-1),mt&&Qt()}const uo=()=>fe.focus();function ao(h){wt[h?"unshift":"push"](()=>{fe=h,t(18,fe)})}function co(){q=this.value,t(1,q),t(17,Ee),t(31,g),t(16,Ge)}const fo=()=>t(17,Ee=!0),ho=()=>t(17,Ee=!1),go=()=>t(17,Ee=!0),mo=()=>t(14,R=void 0),po=()=>{t(1,q=""),fe.focus()},yo=()=>t(0,A=!A),vo=()=>t(19,me=void 0),bo=h=>Ji(h),_o=h=>Zt(h),Eo=()=>{};return i.$$set=h=>{"class"in h&&t(2,l=h.class),"apiKey"in h&&t(29,f=h.apiKey),"bbox"in h&&t(30,a=h.bbox),"clearButtonTitle"in h&&t(3,d=h.clearButtonTitle),"clearOnBlur"in h&&t(31,g=h.clearOnBlur),"clearListOnPick"in h&&t(32,v=h.clearListOnPick),"keepListOpen"in h&&t(4,E=h.keepListOpen),"collapsed"in h&&t(5,m=h.collapsed),"country"in h&&t(33,y=h.country),"debounceSearch"in h&&t(34,b=h.debounceSearch),"enableReverse"in h&&t(6,_=h.enableReverse),"errorMessage"in h&&t(7,L=h.errorMessage),"filter"in h&&t(35,T=h.filter),"flyTo"in h&&t(36,x=h.flyTo),"fuzzyMatch"in h&&t(37,M=h.fuzzyMatch),"language"in h&&t(38,S=h.language),"limit"in h&&t(39,P=h.limit),"mapController"in h&&t(40,w=h.mapController),"minLength"in h&&t(41,k=h.minLength),"noResultsMessage"in h&&t(8,C=h.noResultsMessage),"placeholder"in h&&t(9,ne=h.placeholder),"proximity"in h&&t(42,N=h.proximity),"reverseActive"in h&&t(0,A=h.reverseActive),"reverseButtonTitle"in h&&t(10,ce=h.reverseButtonTitle),"searchValue"in h&&t(1,q=h.searchValue),"pickedResultStyle"in h&&t(43,ht=h.pickedResultStyle),"showPlaceType"in h&&t(11,Zi=h.showPlaceType),"showResultsWhileTyping"in h&&t(44,gt=h.showResultsWhileTyping),"autocompleteTimeout"in h&&t(45,Wt=h.autocompleteTimeout),"selectFirst"in h&&t(46,Ae=h.selectFirst),"flyToSelected"in h&&t(47,mt=h.flyToSelected),"markerOnSelected"in h&&t(48,pt=h.markerOnSelected),"types"in h&&t(49,We=h.types),"exhaustiveReverseGeocoding"in h&&t(50,Bt=h.exhaustiveReverseGeocoding),"excludeTypes"in h&&t(51,yt=h.excludeTypes),"zoom"in h&&t(52,vt=h.zoom),"apiUrl"in h&&t(53,Ut=h.apiUrl),"fetchParameters"in h&&t(54,Dt=h.fetchParameters),"iconsBaseUrl"in h&&t(12,Hi=h.iconsBaseUrl),"adjustUrlQuery"in h&&t(55,jt=h.adjustUrlQuery),"adjustUrl"in h&&t(56,Ft=h.adjustUrl),"$$scope"in h&&t(68,s=h.$$scope)},i.$$.update=()=>{if(i.$$.dirty[0]&64&&t(0,A=_==="always"),i.$$.dirty[0]&16384|i.$$.dirty[1]&4096&&ht!=="marker-only"&&R&&!R.address&&R.geometry.type==="Point"&&R.place_type[0]!=="reverse"&&tt(R.id,{byId:!0}).catch(h=>t(19,me=h)),i.$$.dirty[0]&16384|i.$$.dirty[1]&546|i.$$.dirty[2]&4&&(w&&R&&R.id!==Gt&&x&&(Qt(),v&&t(13,O=void 0),t(62,V=void 0),t(15,W=-1)),t(64,Gt=R==null?void 0:R.id)),i.$$.dirty[0]&196608|i.$$.dirty[1]&1&&setTimeout(()=>{t(16,Ge=Ee),g&&!Ge&&t(1,q="")}),i.$$.dirty[0]&8194|i.$$.dirty[1]&1024&&q.length<k&&(t(13,O=void 0),t(19,me=void 0),t(62,V=O)),i.$$.dirty[0]&8192|i.$$.dirty[1]&32768&&Ae&&O!=null&&O.length&&(no()||t(15,W=0)),i.$$.dirty[0]&57344|i.$$.dirty[1]&32768&&Ae&&O!=null&&O.length&&W==-1&&!R&&t(15,W=0),i.$$.dirty[0]&8192|i.$$.dirty[2]&1&&V!==O&&t(62,V=void 0),i.$$.dirty[0]&73729|i.$$.dirty[1]&512|i.$$.dirty[2]&1&&w&&w.setEventHandler(h=>{switch(h.type){case"mapClick":A&&oo(h.coordinates);break;case"markerClick":{const Q=O==null?void 0:O.find(H=>H.id===h.id);Q&&Zt(Q)}break;case"markerMouseEnter":V&&t(15,W=Ge?(O==null?void 0:O.findIndex(Q=>Q.id===h.id))??-1:-1);break;case"markerMouseLeave":V&&t(15,W=-1);break}}),i.$$.dirty[0]&40960&&t(65,r=O==null?void 0:O[W]),i.$$.dirty[1]&66080|i.$$.dirty[2]&8&&w&&r&&x&&mt&&w.flyTo(r.center,it(r)),i.$$.dirty[1]&4096&&t(67,n=ht==="full-geometry-including-polygon-center-marker"),i.$$.dirty[1]&131584|i.$$.dirty[2]&32&&(pt||w==null||w.setFeatures(void 0,void 0,n)),i.$$.dirty[0]&16384|i.$$.dirty[1]&131584|i.$$.dirty[2]&41&&w&&pt&&!V&&(w.setFeatures(r?[r]:void 0,R,n),w.setSelectedMarker(r?0:-1)),i.$$.dirty[0]&16384|i.$$.dirty[1]&512|i.$$.dirty[2]&33&&w&&w.setFeatures(V,R,n),i.$$.dirty[0]&32768|i.$$.dirty[1]&512|i.$$.dirty[2]&1&&V&&w&&w.setSelectedMarker(W),i.$$.dirty[2]&10&&r&&(window.clearTimeout(le),t(63,le=void 0)),i.$$.dirty[0]&2|i.$$.dirty[1]&512&&w){const h=qt(q);w.setReverseMarker(h?[h.decimalLongitude,h.decimalLatitude]:void 0)}i.$$.dirty[2]&8&&Oe("select",{feature:r}),i.$$.dirty[0]&16384&&Oe("pick",{feature:R}),i.$$.dirty[0]&73744&&t(66,o=!!(O!=null&&O.length)&&(Ge||E)),i.$$.dirty[2]&16&&Oe("optionsvisibilitychange",{optionsVisible:o}),i.$$.dirty[0]&8192&&Oe("featureslisted",{features:O}),i.$$.dirty[2]&1&&Oe("featuresmarked",{features:V}),i.$$.dirty[0]&1&&Oe("reversetoggle",{reverse:A}),i.$$.dirty[0]&2&&Oe("querychange",{query:q}),i.$$.dirty[0]&1|i.$$.dirty[1]&512&&w&&w.indicateReverse(A)},[A,q,l,d,E,m,_,L,C,ne,ce,Zi,Hi,O,R,W,Ge,Ee,fe,me,Be,io,Ki,so,Xi,Zt,Ji,lo,c,f,a,g,v,y,b,T,x,M,S,P,w,k,N,ht,gt,Wt,Ae,mt,pt,We,Bt,yt,vt,Ut,Dt,jt,Ft,Jr,$r,Vi,eo,to,V,le,Gt,r,o,n,s,u,uo,ao,co,fo,ho,go,mo,po,yo,vo,bo,_o,Eo]}let ar=class extends Me{constructor(e){super(),xe(this,e,ur,lr,we,{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,autocompleteTimeout:45,selectFirst:46,flyToSelected:47,markerOnSelected:48,types:49,exhaustiveReverseGeocoding:50,excludeTypes:51,zoom:52,apiUrl:53,fetchParameters:54,iconsBaseUrl:12,adjustUrlQuery:55,adjustUrl:56,focus:57,blur:58,setQuery:59,clearList:60,clearMap:61},null,[-1,-1,-1,-1])}get ZOOM_DEFAULTS(){return this.$$.ctx[28]}get focus(){return this.$$.ctx[57]}get blur(){return this.$$.ctx[58]}get setQuery(){return this.$$.ctx[59]}get clearList(){return this.$$.ctx[60]}get clearMap(){return this.$$.ctx[61]}};function Ke(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 kt(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 Ke({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 Ke({type:"MultiPolygon",coordinates:i},e,t)}/**
|
|
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 cr(i,e){var t={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,r,o,u;return u={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(u[Symbol.iterator]=function(){return this}),u;function s(l){return function(f){return c([l,f])}}function c(l){if(n)throw new TypeError("Generator is already executing.");for(;t;)try{if(n=1,r&&(o=l[0]&2?r.return:l[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,l[1])).done)return o;switch(r=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return t.label++,{value:l[1],done:!1};case 5:t.label++,r=l[1],l=[0];continue;case 7:l=t.ops.pop(),t.trys.pop();continue;default:if(o=t.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){t=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){t.label=l[1];break}if(l[0]===6&&t.label<o[1]){t.label=o[1],o=l;break}if(o&&t.label<o[2]){t.label=o[2],t.ops.push(l);break}o[2]&&t.ops.pop(),t.trys.pop();continue}l=e.call(i,t)}catch(f){l=[6,f],r=0}finally{n=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}var ke=function(){function i(e,t){this.next=null,this.key=e,this.data=t,this.left=null,this.right=null}return i}();function fr(i,e){return i>e?1:i<e?-1:0}function Ce(i,e,t){for(var n=new ke(null,null),r=n,o=n;;){var u=t(i,e.key);if(u<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(u>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 ke(i,e);if(t===null)return r.left=r.right=null,r;t=Ce(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 Li(i,e,t){var n=null,r=null;if(e){e=Ce(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 dr(i,e,t){return e===null?i:(i===null||(e=Ce(i.key,e,t),e.left=i),e)}function Tt(i,e,t,n,r){if(i){n(""+e+(t?"└── ":"├── ")+r(i)+`
|
|
22
|
-
`);var o=e+(t?" ":"│ ");i.left&&Tt(i.left,o,!1,n,r),i.right&&Tt(i.right,o,!0,n,r)}}var Nt=function(){function i(e){e===void 0&&(e=fr),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 ke(e,t);this._root===null&&(n.left=n.right=null,this._size++,this._root=n);var r=this._comparator,o=Ce(e,this._root,r),u=r(e,o.key);return u===0?this._root=o:(u<0?(n.left=o.left,n.right=o,o.left=null):u>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=Ce(e,t,n);var o=n(e,t.key);return o===0?(t.left===null?r=t.right:(r=Ce(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=Ce(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=Ce(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=[],u=this._comparator,s=this._root,c;o.length!==0||s;)if(s)o.push(s),s=s.left;else{if(s=o.pop(),c=u(s.key,t),c>0)break;if(u(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 gr(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&&Ot(e,t,0,r-1,o),this._root===null)this._root=Rt(e,t,0,r),this._size=r;else{var u=mr(this.toList(),hr(e,t),o);r=this._size+r,this._root=Pt({head:u},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 Tt(this._root,"",!0,function(n){return t.push(n)},e),t.join("")},i.prototype.update=function(e,t,n){var r=this._comparator,o=Li(e,this._root,r),u=o.left,s=o.right;r(e,t)<0?s=Ct(t,n,s,r):u=Ct(t,n,u,r),this._root=dr(u,s,r)},i.prototype.split=function(e){return Li(e,this._root,this._comparator)},i.prototype[Symbol.iterator]=function(){var e,t,n;return cr(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 Rt(i,e,t,n){var r=n-t;if(r>0){var o=t+Math.floor(r/2),u=i[o],s=e[o],c=new ke(u,s);return c.left=Rt(i,e,t,o),c.right=Rt(i,e,o+1,n),c}return null}function hr(i,e){for(var t=new ke(null,null),n=t,r=0;r<i.length;r++)n=n.next=new ke(i[r],e[r]);return n.next=null,t.next}function gr(i){for(var e=i,t=[],n=!1,r=new ke(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 Pt(i,e,t){var n=t-e;if(n>0){var r=e+Math.floor(n/2),o=Pt(i,e,r),u=i.head;return u.left=o,i.head=i.head.next,u.right=Pt(i,r+1,t),u}return null}function mr(i,e,t){for(var n=new ke(null,null),r=n,o=i,u=e;o!==null&&u!==null;)t(o.key,u.key)<0?(r.next=o,o=o.next):(r.next=u,u=u.next),r=r.next;return o!==null?r.next=o:u!==null&&(r.next=u),n.next}function Ot(i,e,t,n,r){if(!(t>=n)){for(var o=i[t+n>>1],u=t-1,s=n+1;;){do u++;while(r(i[u],o)<0);do s--;while(r(i[s],o)>0);if(u>=s)break;var c=i[u];i[u]=i[s],i[s]=c,c=e[u],e[u]=e[s],e[s]=c}Ot(i,e,t,s,r),Ot(i,e,s+1,n,r)}}const _e=11102230246251565e-32,te=134217729,pr=(3+8*_e)*_e;function It(i,e,t,n,r){let o,u,s,c,l=e[0],f=n[0],a=0,d=0;f>l==f>-l?(o=l,l=e[++a]):(o=f,f=n[++d]);let g=0;if(a<i&&d<t)for(f>l==f>-l?(u=l+o,s=o-(u-l),l=e[++a]):(u=f+o,s=o-(u-f),f=n[++d]),o=u,s!==0&&(r[g++]=s);a<i&&d<t;)f>l==f>-l?(u=o+l,c=u-o,s=o-(u-c)+(l-c),l=e[++a]):(u=o+f,c=u-o,s=o-(u-c)+(f-c),f=n[++d]),o=u,s!==0&&(r[g++]=s);for(;a<i;)u=o+l,c=u-o,s=o-(u-c)+(l-c),l=e[++a],o=u,s!==0&&(r[g++]=s);for(;d<t;)u=o+f,c=u-o,s=o-(u-c)+(f-c),f=n[++d],o=u,s!==0&&(r[g++]=s);return(o!==0||g===0)&&(r[g++]=o),g}function yr(i,e){let t=e[0];for(let n=1;n<i;n++)t+=e[n];return t}function Je(i){return new Float64Array(i)}const vr=(3+16*_e)*_e,br=(2+12*_e)*_e,_r=(9+64*_e)*_e*_e,Fe=Je(4),Si=Je(8),xi=Je(12),Mi=Je(16),ie=Je(4);function Er(i,e,t,n,r,o,u){let s,c,l,f,a,d,g,v,E,m,y,b,_,L,T,x,M,S;const P=i-r,w=t-r,k=e-o,C=n-o;L=P*C,d=te*P,g=d-(d-P),v=P-g,d=te*C,E=d-(d-C),m=C-E,T=v*m-(L-g*E-v*E-g*m),x=k*w,d=te*k,g=d-(d-k),v=k-g,d=te*w,E=d-(d-w),m=w-E,M=v*m-(x-g*E-v*E-g*m),y=T-M,a=T-y,Fe[0]=T-(y+a)+(a-M),b=L+y,a=b-L,_=L-(b-a)+(y-a),y=_-x,a=_-y,Fe[1]=_-(y+a)+(a-x),S=b+y,a=S-b,Fe[2]=b-(S-a)+(y-a),Fe[3]=S;let ne=yr(4,Fe),N=br*u;if(ne>=N||-ne>=N||(a=i-P,s=i-(P+a)+(a-r),a=t-w,l=t-(w+a)+(a-r),a=e-k,c=e-(k+a)+(a-o),a=n-C,f=n-(C+a)+(a-o),s===0&&c===0&&l===0&&f===0)||(N=_r*u+pr*Math.abs(ne),ne+=P*f+C*s-(k*l+w*c),ne>=N||-ne>=N))return ne;L=s*C,d=te*s,g=d-(d-s),v=s-g,d=te*C,E=d-(d-C),m=C-E,T=v*m-(L-g*E-v*E-g*m),x=c*w,d=te*c,g=d-(d-c),v=c-g,d=te*w,E=d-(d-w),m=w-E,M=v*m-(x-g*E-v*E-g*m),y=T-M,a=T-y,ie[0]=T-(y+a)+(a-M),b=L+y,a=b-L,_=L-(b-a)+(y-a),y=_-x,a=_-y,ie[1]=_-(y+a)+(a-x),S=b+y,a=S-b,ie[2]=b-(S-a)+(y-a),ie[3]=S;const A=It(4,Fe,4,ie,Si);L=P*f,d=te*P,g=d-(d-P),v=P-g,d=te*f,E=d-(d-f),m=f-E,T=v*m-(L-g*E-v*E-g*m),x=k*l,d=te*k,g=d-(d-k),v=k-g,d=te*l,E=d-(d-l),m=l-E,M=v*m-(x-g*E-v*E-g*m),y=T-M,a=T-y,ie[0]=T-(y+a)+(a-M),b=L+y,a=b-L,_=L-(b-a)+(y-a),y=_-x,a=_-y,ie[1]=_-(y+a)+(a-x),S=b+y,a=S-b,ie[2]=b-(S-a)+(y-a),ie[3]=S;const ce=It(A,Si,4,ie,xi);L=s*f,d=te*s,g=d-(d-s),v=s-g,d=te*f,E=d-(d-f),m=f-E,T=v*m-(L-g*E-v*E-g*m),x=c*l,d=te*c,g=d-(d-c),v=c-g,d=te*l,E=d-(d-l),m=l-E,M=v*m-(x-g*E-v*E-g*m),y=T-M,a=T-y,ie[0]=T-(y+a)+(a-M),b=L+y,a=b-L,_=L-(b-a)+(y-a),y=_-x,a=_-y,ie[1]=_-(y+a)+(a-x),S=b+y,a=S-b,ie[2]=b-(S-a)+(y-a),ie[3]=S;const q=It(ce,xi,4,ie,Mi);return Mi[q-1]}function wr(i,e,t,n,r,o){const u=(e-o)*(t-r),s=(i-r)*(n-o),c=u-s,l=Math.abs(u+s);return Math.abs(c)>=vr*l?c:-Er(i,e,t,n,r,o,l)}const $e=(i,e)=>i.ll.x<=e.x&&e.x<=i.ur.x&&i.ll.y<=e.y&&e.y<=i.ur.y,zt=(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 Te=Number.EPSILON;Te===void 0&&(Te=Math.pow(2,-52));const Lr=Te*Te,ki=(i,e)=>{if(-Te<i&&i<Te&&-Te<e&&e<Te)return 0;const t=i-e;return t*t<Lr*i*e?0:i<e?-1:1};class Sr{constructor(){this.reset()}reset(){this.xRounder=new Ci,this.yRounder=new Ci}round(e,t){return{x:this.xRounder.round(e),y:this.yRounder.round(t)}}}class Ci{constructor(){this.tree=new Nt,this.round(0)}round(e){const t=this.tree.add(e),n=this.tree.prev(t);if(n!==null&&ki(t.key,n.key)===0)return this.tree.remove(e),n.key;const r=this.tree.next(t);return r!==null&&ki(t.key,r.key)===0?(this.tree.remove(e),r.key):e}}const et=new Sr,at=(i,e)=>i.x*e.y-i.y*e.x,Ti=(i,e)=>i.x*e.x+i.y*e.y,Ni=(i,e,t)=>{const n=wr(i.x,i.y,e.x,e.y,t.x,t.y);return n>0?-1:n<0?1:0},ct=i=>Math.sqrt(Ti(i,i)),xr=(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 at(r,n)/ct(r)/ct(n)},Mr=(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 Ti(r,n)/ct(r)/ct(n)},Ri=(i,e,t)=>e.y===0?null:{x:i.x+e.x/e.y*(t-i.y),y:t},Pi=(i,e,t)=>e.x===0?null:{x:t,y:i.y+e.y/e.x*(t-i.x)},kr=(i,e,t,n)=>{if(e.x===0)return Pi(t,n,i.x);if(n.x===0)return Pi(i,e,t.x);if(e.y===0)return Ri(t,n,i.y);if(n.y===0)return Ri(i,e,t.y);const r=at(e,n);if(r==0)return null;const o={x:t.x-i.x,y:t.y-i.y},u=at(o,e)/r,s=at(o,n)/r,c=i.x+s*e.x,l=t.x+u*n.x,f=i.y+s*e.y,a=t.y+u*n.y,d=(c+l)/2,g=(f+a)/2;return{x:d,y:g}};class se{static compare(e,t){const n=se.comparePoints(e.point,t.point);return n!==0?n:(e.point!==t.point&&e.link(t),e.isLeft!==t.isLeft?e.isLeft?1:-1:Ne.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:xr(this.point,e.point,o.point),cosine:Mr(this.point,e.point,o.point)})};return(r,o)=>{t.has(r)||n(r),t.has(o)||n(o);const{sine:u,cosine:s}=t.get(r),{sine:c,cosine:l}=t.get(o);return u>=0&&c>=0?s<l?1:s>l?-1:0:u<0&&c<0?s<l?-1:s>l?1:0:c<u?-1:c>u?1:0}}}let Cr=0;class Ne{static compare(e,t){const n=e.leftSE.point.x,r=t.leftSE.point.x,o=e.rightSE.point.x,u=t.rightSE.point.x;if(u<n)return 1;if(o<r)return-1;const s=e.leftSE.point.y,c=t.leftSE.point.y,l=e.rightSE.point.y,f=t.rightSE.point.y;if(n<r){if(c<s&&c<l)return 1;if(c>s&&c>l)return-1;const a=e.comparePoint(t.leftSE.point);if(a<0)return 1;if(a>0)return-1;const d=t.comparePoint(e.rightSE.point);return d!==0?d:-1}if(n>r){if(s<c&&s<f)return-1;if(s>c&&s>f)return 1;const a=t.comparePoint(e.leftSE.point);if(a!==0)return a;const d=e.comparePoint(t.rightSE.point);return d<0?1:d>0?-1:1}if(s<c)return-1;if(s>c)return 1;if(o<u){const a=t.comparePoint(e.rightSE.point);if(a!==0)return a}if(o>u){const a=e.comparePoint(t.rightSE.point);if(a<0)return 1;if(a>0)return-1}if(o!==u){const a=l-s,d=o-n,g=f-c,v=u-r;if(a>d&&g<v)return 1;if(a<d&&g>v)return-1}return o>u?1:o<u||l<f?-1:l>f?1:e.id<t.id?-1:e.id>t.id?1:0}constructor(e,t,n,r){this.id=++Cr,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,u;const s=se.comparePoints(e,t);if(s<0)r=e,o=t,u=1;else if(s>0)r=t,o=e,u=-1;else throw new Error(`Tried to create degenerate segment at [${e.x}, ${e.y}]`);const c=new se(r,!0),l=new se(o,!1);return new Ne(c,l,[n],[u])}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,u=t.x+o*r.x;if(e.x===u)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=zt(t,n);if(r===null)return null;const o=this.leftSE.point,u=this.rightSE.point,s=e.leftSE.point,c=e.rightSE.point,l=$e(t,s)&&this.comparePoint(s)===0,f=$e(n,o)&&e.comparePoint(o)===0,a=$e(t,c)&&this.comparePoint(c)===0,d=$e(n,u)&&e.comparePoint(u)===0;if(f&&l)return d&&!a?u:!d&&a?c:null;if(f)return a&&o.x===c.x&&o.y===c.y?null:o;if(l)return d&&u.x===s.x&&u.y===s.y?null:s;if(d&&a)return null;if(d)return u;if(a)return c;const g=kr(o,this.vector(),s,e.vector());return g===null||!$e(r,g)?null:et.round(g.x,g.y)}split(e){const t=[],n=e.events!==void 0,r=new se(e,!0),o=new se(e,!1),u=this.rightSE;this.replaceRightSE(o),t.push(o),t.push(r);const s=new Ne(r,u,this.rings.slice(),this.windings.slice());return se.comparePoints(s.leftSE.point,s.rightSE.point)>0&&s.swapEvents(),se.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=Ne.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,u=n.rings.length;o<u;o++){const s=n.rings[o],c=n.windings[o],l=t.rings.indexOf(s);l===-1?(t.rings.push(s),t.windings.push(c)):t.windings[l]+=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 l=this.rings[s],f=this.windings[s],a=t.indexOf(l);a===-1?(t.push(l),n.push(f)):n[a]+=f}const o=[],u=[];for(let s=0,c=t.length;s<c;s++){if(n[s]===0)continue;const l=t[s],f=l.poly;if(u.indexOf(f)===-1)if(l.isExterior)o.push(f);else{u.indexOf(f)===-1&&u.push(f);const a=o.indexOf(l.poly);a!==-1&&o.splice(a,1)}}for(let s=0,c=o.length;s<c;s++){const l=o[s].multiPoly;r.indexOf(l)===-1&&r.push(l)}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(ae.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===ae.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 ${ae.type}`)}return this._isInResult}}class Oi{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=et.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 u=1,s=e.length;u<s;u++){if(typeof e[u][0]!="number"||typeof e[u][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");let c=et.round(e[u][0],e[u][1]);c.x===o.x&&c.y===o.y||(this.segments.push(Ne.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(Ne.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 Tr{constructor(e,t){if(!Array.isArray(e))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");this.exteriorRing=new Oi(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 Oi(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,u=r.length;o<u;o++)e.push(r[o])}return e}}class Ii{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 Tr(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,u=r.length;o<u;o++)e.push(r[o])}return e}}class ft{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 u=null,s=o.leftSE,c=o.rightSE;const l=[s],f=s.point,a=[];for(;u=s,s=c,l.push(s),s.point!==f;)for(;;){const d=s.getAvailableLinkedEvents();if(d.length===0){const E=l[0].point,m=l[l.length-1].point;throw new Error(`Unable to complete output ring starting at [${E.x}, ${E.y}]. Last matching segment found ends at [${m.x}, ${m.y}].`)}if(d.length===1){c=d[0].otherSE;break}let g=null;for(let E=0,m=a.length;E<m;E++)if(a[E].point===s.point){g=E;break}if(g!==null){const E=a.splice(g)[0],m=l.splice(E.index);m.unshift(m[0].otherSE),t.push(new ft(m.reverse()));continue}a.push({index:l.length,point:s.point});const v=s.getLeftmostComparator(u);c=d.sort(v)[0].otherSE;break}t.push(new ft(l))}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 l=1,f=this.events.length-1;l<f;l++){const a=this.events[l].point,d=this.events[l+1].point;Ni(a,e,d)!==0&&(t.push(a),e=a)}if(t.length===1)return null;const n=t[0],r=t[1];Ni(n,e,r)===0&&t.shift(),t.push(t[0]);const o=this.isExteriorRing()?1:-1,u=this.isExteriorRing()?0:t.length-1,s=this.isExteriorRing()?t.length:-1,c=[];for(let l=u;l!=s;l+=o)c.push([t[l].x,t[l].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 u=this.events[r];se.compare(e,u)>0&&(e=u)}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 zi{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 Nr{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 zi(o));else{const u=o.enclosingRing();u.poly||t.push(new zi(u)),u.poly.addInterior(o)}}return t}}class Rr{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ne.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,u=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;)u=this.tree.next(u),u===null?c=null:u.key.consumedBy===void 0&&(c=u.key);if(e.isLeft){let l=null;if(s){const a=s.getIntersection(t);if(a!==null&&(t.isAnEndpoint(a)||(l=a),!s.isAnEndpoint(a))){const d=this._splitSafely(s,a);for(let g=0,v=d.length;g<v;g++)n.push(d[g])}}let f=null;if(c){const a=c.getIntersection(t);if(a!==null&&(t.isAnEndpoint(a)||(f=a),!c.isAnEndpoint(a))){const d=this._splitSafely(c,a);for(let g=0,v=d.length;g<v;g++)n.push(d[g])}}if(l!==null||f!==null){let a=null;l===null?a=f:f===null?a=l:a=se.comparePoints(l,f)<=0?l:f,this.queue.remove(t.rightSE),n.push(t.rightSE);const d=t.split(a);for(let g=0,v=d.length;g<v;g++)n.push(d[g])}n.length>0?(this.tree.remove(t),n.push(e)):(this.segments.push(t),t.prev=s)}else{if(s&&c){const l=s.getIntersection(c);if(l!==null){if(!s.isAnEndpoint(l)){const f=this._splitSafely(s,l);for(let a=0,d=f.length;a<d;a++)n.push(f[a])}if(!c.isAnEndpoint(l)){const f=this._splitSafely(c,l);for(let a=0,d=f.length;a<d;a++)n.push(f[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 Ai=typeof process<"u"&&process.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE||1e6,Pr=typeof process<"u"&&process.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS||1e6;class Or{run(e,t,n){ae.type=e,et.reset();const r=[new Ii(t,!0)];for(let a=0,d=n.length;a<d;a++)r.push(new Ii(n[a],!1));if(ae.numMultiPolys=r.length,ae.type==="difference"){const a=r[0];let d=1;for(;d<r.length;)zt(r[d].bbox,a.bbox)!==null?d++:r.splice(d,1)}if(ae.type==="intersection")for(let a=0,d=r.length;a<d;a++){const g=r[a];for(let v=a+1,E=r.length;v<E;v++)if(zt(g.bbox,r[v].bbox)===null)return[]}const o=new Nt(se.compare);for(let a=0,d=r.length;a<d;a++){const g=r[a].getSweepEvents();for(let v=0,E=g.length;v<E;v++)if(o.insert(g[v]),o.size>Ai)throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big).")}const u=new Rr(o);let s=o.size,c=o.pop();for(;c;){const a=c.key;if(o.size===s){const g=a.segment;throw new Error(`Unable to pop() ${a.isLeft?"left":"right"} SweepEvent [${a.point.x}, ${a.point.y}] from segment #${g.id} [${g.leftSE.point.x}, ${g.leftSE.point.y}] -> [${g.rightSE.point.x}, ${g.rightSE.point.y}] from queue.`)}if(o.size>Ai)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big).");if(u.segments.length>Pr)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments).");const d=u.process(a);for(let g=0,v=d.length;g<v;g++){const E=d[g];E.consumedBy===void 0&&o.insert(E)}s=o.size,c=o.pop()}et.reset();const l=ft.factory(u.segments);return new Nr(l).getGeom()}}const ae=new Or;var Wi={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 ae.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 ae.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 ae.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 ae.run("difference",i,t)}};function Bi(i,e,t){if(i!==null)for(var n,r,o,u,s,c,l,f=0,a=0,d,g=i.type,v=g==="FeatureCollection",E=g==="Feature",m=v?i.features.length:1,y=0;y<m;y++){l=v?i.features[y].geometry:E?i.geometry:i,d=l?l.type==="GeometryCollection":!1,s=d?l.geometries.length:1;for(var b=0;b<s;b++){var _=0,L=0;if(u=d?l.geometries[b]:l,u!==null){c=u.coordinates;var T=u.type;switch(f=0,T){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++,T==="MultiPoint"&&_++}T==="LineString"&&_++;break;case"Polygon":case"MultiLineString":for(n=0;n<c.length;n++){for(r=0;r<c[n].length-f;r++){if(e(c[n][r],a,y,_,L)===!1)return!1;a++}T==="MultiLineString"&&_++,T==="Polygon"&&L++}T==="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-f;o++){if(e(c[n][r][o],a,y,_,L)===!1)return!1;a++}L++}_++}break;case"GeometryCollection":for(n=0;n<u.geometries.length;n++)if(Bi(u.geometries[n],e)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function At(i,e){var t,n,r,o,u,s,c,l,f,a,d=0,g=i.type==="FeatureCollection",v=i.type==="Feature",E=g?i.features.length:1;for(t=0;t<E;t++){for(s=g?i.features[t].geometry:v?i.geometry:i,l=g?i.features[t].properties:v?i.properties:{},f=g?i.features[t].bbox:v?i.bbox:void 0,a=g?i.features[t].id:v?i.id:void 0,c=s?s.type==="GeometryCollection":!1,u=c?s.geometries.length:1,r=0;r<u;r++){if(o=c?s.geometries[r]:s,o===null){if(e(null,d,l,f,a)===!1)return!1;continue}switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(e(o,d,l,f,a)===!1)return!1;break}case"GeometryCollection":{for(n=0;n<o.geometries.length;n++)if(e(o.geometries[n],d,l,f,a)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}d++}}function Ir(i,e){At(i,function(t,n,r,o,u){var s=t===null?null:t.type;switch(s){case null:case"Point":case"LineString":case"Polygon":return e(Ke(t,r,{bbox:o,id:u}),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 l=0;l<t.coordinates.length;l++){var f=t.coordinates[l],a={type:c,coordinates:f};if(e(Ke(a,r),n,l)===!1)return!1}})}function zr(i,e={}){const t=[];if(At(i,r=>{t.push(r.coordinates)}),t.length<2)throw new Error("Must have at least 2 geometries");const n=Wi.union(t[0],...t.slice(1));return n.length===0?null:n.length===1?kt(n[0],e.properties):wi(n,e.properties)}var Ui=zr;function Ar(i,e={}){if(i.bbox!=null&&e.recompute!==!0)return i.bbox;const t=[1/0,1/0,-1/0,-1/0];return Bi(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 Di=Ar;function Wr(i){const e=[];if(At(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=Wi.difference(e[0],...e.slice(1));return n.length===0?null:n.length===1?kt(n[0],t):wi(n,t)}var Br=Wr;function Ur(i){if(!i)throw new Error("geojson is required");var e=[];return Ir(i,function(t){e.push(t)}),Xe(e)}var Dr=Ur;function ji(i,e){const t=Br(Xe([kt([[[180,90],[-180,90],[-180,-90],[180,-90],[180,90]]]),i]));if(!t)return;t.properties={isMask:!0};const n=ut(Di(i)),r=(n[2]-n[0])/360/1e3,o=n[0]<-180,u=n[2]>180,s=Dr(i);if(s.features.length>1&&(o||u))for(const c of s.features){const l=ut(Di(c));if(u&&l[0]<-180+r)for(const f of c.geometry.coordinates)for(const a of f)a[0]+=360-r;if(o&&l[2]>180-r)for(const f of c.geometry.coordinates)for(const a of f)a[0]-=360-r}e(Xe([s.features.length<2?i:Ui(s)??i,t]))}const Fi={fill:{paint:{"fill-color":"#000","fill-opacity":.1},filter:["all",["==",["geometry-type"],"Polygon"],["has","isMask"]]},line:{layout:{"line-cap":"square"},paint:{"line-width":["case",["==",["geometry-type"],"Polygon"],2,3],"line-dasharray":[1,1],"line-color":"#3170fe"},filter:["!",["has","isMask"]]}},dt="mtlr-gc-full-geom",Gi="mtlr-gc-full-geom-fill",qi="mtlr-gc-full-geom-line";function Qi(i,e,t=!0,n=!0,r={},o={},u=Fi){let s;const c=[];let l,f,a;function d(){if(!i.loaded){i.once("load",d);return}const m=u?u===!0?Fi:u:void 0;if(!(m!=null&&m.fill)&&!(m!=null&&m.line))return;const y=i.getSource(dt);if(y)y.setData(a??Xe([]));else if(a)i.addSource(dt,{type:"geojson",data:a});else return;!i.getLayer(Gi)&&(m!=null&&m.fill)&&i.addLayer({...m==null?void 0:m.fill,id:Gi,type:"fill",source:dt}),!i.getLayer(qi)&&(m!=null&&m.line)&&i.addLayer({...m==null?void 0:m.line,id:qi,type:"line",source:dt})}function g(m){a=m,d()}i.on("styledata",()=>{setTimeout(()=>{a&&d()})});const v=m=>{s==null||s({type:"mapClick",coordinates:[m.lngLat.lng,m.lngLat.lat]})};function E(m=!1){if(!e)throw new Error;const y=document.createElement("div");return m&&y.classList.add("marker-interactive"),new Un({props:{displayIn:"maplibre"},target:y}),new e.Marker({element:y,offset:[1,-13]})}return{setEventHandler(m){m?(s=m,i.on("click",v)):(s=void 0,i.off("click",v))},flyTo(m,y){i.flyTo({center:m,...y?{zoom:y}:{},...r})},fitBounds(m,y,b){i.fitBounds([[m[0],m[1]],[m[2],m[3]]],{padding:y,...b?{maxZoom:b}:{},...o})},indicateReverse(m){i.getCanvasContainer().style.cursor=m?"crosshair":""},setReverseMarker(m){!e||!t||(f?m?f.setLngLat(m):(f.remove(),f=void 0):m&&(t instanceof Function?f=t(i)??void 0:(f=(typeof t=="object"?new e.Marker(t):E()).setLngLat(m).addTo(i),f.getElement().classList.add("marker-reverse"))))},setFeatures(m,y,b){for(const _ of c)_.remove();if(c.length=0,g(void 0),!!e){e:if(y){let _=!1;if(y.geometry.type==="GeometryCollection"){const L=y.geometry.geometries.filter(T=>T.type==="Polygon"||T.type==="MultiPolygon");t:if(L.length>0){const T=Ui(Xe(L.map(x=>Ke(x))));if(!T)break t;ji({...y,geometry:T.geometry},g),_=!0}else{const T=y.geometry.geometries.filter(x=>x.type==="LineString"||x.type==="MultiLineString");T.length>0&&(g({...y,geometry:{type:"GeometryCollection",geometries:T}}),_=!0)}}if(!_){if(y.geometry.type==="Polygon"||y.geometry.type==="MultiPolygon")ji(y,g);else if(y.geometry.type==="LineString"||y.geometry.type==="MultiLineString"){g(y);break e}}if(!b&&y.geometry.type!=="Point")break e;if(t instanceof Function){const L=t(i,y);L&&c.push(L)}else t&&c.push(typeof t=="object"?new e.Marker(t):E().setLngLat(y.center).addTo(i))}if(n)for(const _ of m??[]){if(_===y)continue;let L;if(n instanceof Function){if(L=n(i,_),!L)continue}else L=(typeof n=="object"?new e.Marker(n):E(!0)).setLngLat(_.center).setPopup(new e.Popup({offset:[1,-27],closeButton:!1,closeOnMove:!0,className:"maptiler-gc-popup"}).setText(_.place_type[0]==="reverse"?_.place_name:_.place_name.replace(/,.*/,""))).addTo(i);const T=L.getElement();T.addEventListener("click",x=>{x.stopPropagation(),s==null||s({type:"markerClick",id:_.id})}),T.addEventListener("mouseenter",()=>{s==null||s({type:"markerMouseEnter",id:_.id}),L.togglePopup()}),T.addEventListener("mouseleave",()=>{s==null||s({type:"markerMouseLeave",id:_.id}),L.togglePopup()}),c.push(L)}}},setSelectedMarker(m){l&&l.getElement().classList.toggle("marker-selected",!1),l=m>-1?c[m]:void 0,l==null||l.getElement().classList.toggle("marker-selected",!0)},getCenterAndZoom(){const m=i.getCenter();return[i.getZoom(),m.lng,m.lat]}}}function jr(i,e,t){var v,E;class n{constructor(y,b){re(this,"type");re(this,"target");this.type=b,this.target=y}}class r extends n{constructor(b,_){super(b,"select");re(this,"feature");Object.assign(this,_)}}class o extends n{constructor(b,_){super(b,"featureslisted");re(this,"features");this.features=_}}class u extends n{constructor(b,_){super(b,"featuresmarked");re(this,"features");this.features=_}}class s extends n{constructor(b,_){super(b,"optionsvisibilitychange");re(this,"optionsVisible");this.optionsVisible=_}}class c extends n{constructor(b,_){super(b,"pick");re(this,"feature");this.feature=_}}class l extends n{constructor(b,_){super(b,"querychange");re(this,"query");this.query=_}}class f extends n{constructor(b,_,L){super(b,"response");re(this,"url");re(this,"featureCollection");this.url=_,this.featureCollection=L}}class a extends n{constructor(b,_){super(b,"reversetoggle");re(this,"reverse");this.reverse=_}}class d extends i{constructor(b={}){super();Kt(this,v);Kt(this,E);Xt(this,E,b)}onAddInt(b){const _=document.createElement("div");_.className="mapboxgl-ctrl-geocoder mapboxgl-ctrl maplibregl-ctrl-geocoder maplibregl-ctrl mapboxgl-ctrl-group";const{marker:L,showResultMarkers:T,flyTo:x,fullGeometryStyle:M,...S}=Y(this,E),P=typeof x=="boolean"?{}:x,k={mapController:Qi(b,e,L,T,P,P,M),flyTo:x===void 0?!0:!!x,apiKey:"",...t==null?void 0:t(b,_),...S};if(!k.apiKey)throw new Error("no apiKey provided");return Xt(this,v,new ar({target:_,props:k})),Y(this,v).$on("select",C=>{this.fire(new r(this,C.detail))}),Y(this,v).$on("pick",C=>{this.fire(new c(this,C.detail.feature))}),Y(this,v).$on("featureslisted",C=>{this.fire(new o(this,C.detail.features))}),Y(this,v).$on("featuresmarked",C=>{this.fire(new u(this,C.detail.features))}),Y(this,v).$on("response",C=>{this.fire(new f(this,C.detail.url,C.detail.featureCollection))}),Y(this,v).$on("optionsvisibilitychange",C=>{this.fire(new s(this,C.detail.optionsVisible))}),Y(this,v).$on("reversetoggle",C=>{this.fire(new a(this,C.detail.reverse))}),Y(this,v).$on("querychange",C=>{this.fire(new l(this,C.detail.query))}),_}on(b,_){return super.on(b,_)}once(b,_){return super.once(b,_)}off(b,_){return super.off(b,_)}listens(b){return super.listens(b)}setOptions(b){var S;Object.assign(Y(this,E),b);const{marker:_,showResultMarkers:L,flyTo:T,fullGeometryStyle:x,...M}=Y(this,E);(S=Y(this,v))==null||S.$set(M)}setQuery(b,_=!0){var L;(L=Y(this,v))==null||L.setQuery(b,_)}clearMap(){var b;(b=Y(this,v))==null||b.clearMap()}clearList(){var b;(b=Y(this,v))==null||b.clearList()}setReverseMode(b){var _;(_=Y(this,v))==null||_.$set({reverseActive:b})}focus(b){var _;(_=Y(this,v))==null||_.focus(b)}blur(){var b;(b=Y(this,v))==null||b.blur()}onRemove(){var b;(b=Y(this,v))==null||b.$destroy()}}return v=new WeakMap,E=new WeakMap,{MapLibreBasedGeocodingControl:d,events:{SelectEvent:r,FeaturesListedEvent:o,FeaturesMarkedEvent:u,OptionsVisibilityChangeEvent:s,PickEvent:c,QueryChangeEvent:l,ResponseEvent:f,ReverseToggleEvent:a}}}const{MapLibreBasedGeocodingControl:Fr,events:Re}=jr(qe.Evented,qe);class Gr extends Fr{onAdd(e){return super.onAddInt(e)}}const qr=Re.SelectEvent,Qr=Re.FeaturesListedEvent,Zr=Re.FeaturesMarkedEvent,Hr=Re.OptionsVisibilityChangeEvent,Vr=Re.PickEvent,Yr=Re.QueryChangeEvent,Kr=Re.ResponseEvent,Xr=Re.ReverseToggleEvent;I.FeaturesListedEvent=Qr,I.FeaturesMarkedEvent=Zr,I.GeocodingControl=Gr,I.OptionsVisibilityChangeEvent=Hr,I.PickEvent=Vr,I.QueryChangeEvent=Yr,I.ResponseEvent=Kr,I.ReverseToggleEvent=Xr,I.SelectEvent=qr,I.createMapLibreGlMapController=Qi,Object.defineProperty(I,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
(function(j,$){typeof exports=="object"&&typeof module<"u"?$(exports,require("maplibre-gl")):typeof define=="function"&&define.amd?define(["exports","maplibre-gl"],$):(j=typeof globalThis<"u"?globalThis:j||self,$(j.maplibreglMaptilerGeocoder={},j.maplibregl))})(this,function(j,$){"use strict";var ks=Object.defineProperty;var dn=j=>{throw TypeError(j)};var Os=(j,$,me)=>$ in j?ks(j,$,{enumerable:!0,configurable:!0,writable:!0,value:me}):j[$]=me;var P=(j,$,me)=>Os(j,typeof $!="symbol"?$+"":$,me),gn=(j,$,me)=>$.has(j)||dn("Cannot "+me);var fe=(j,$,me)=>(gn(j,$,"read from private field"),me?me.call(j):$.get(j)),fi=(j,$,me)=>$.has(j)?dn("Cannot add the same private member more than once"):$ instanceof WeakSet?$.add(j):$.set(j,me),ci=(j,$,me,ct)=>(gn(j,$,"write to private field"),ct?ct.call(j,me):$.set(j,me),me);var rn,sn;function me(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 ct=me($);function te(){}function pn(i,e){for(const t in e)i[t]=e[t];return i}function di(i){return i()}function gi(){return Object.create(null)}function Ge(i){i.forEach(di)}function mi(i){return typeof i=="function"}function He(i,e){return i!=i?e==e:i!==e||i&&typeof i=="object"||typeof i=="function"}let Mt;function ye(i,e){return i===e?!0:(Mt||(Mt=document.createElement("a")),Mt.href=e,i===Mt.href)}function yn(i){return Object.keys(i).length===0}function vn(i,e,t,n){if(i){const r=pi(i,e,t,n);return i[0](r)}}function pi(i,e,t,n){return i[1]&&n?pn(t.ctx.slice(),i[1](n(e))):t.ctx}function bn(i,e,t,n){return i[2],e.dirty}function wn(i,e,t,n,r,u){if(r){const h=pi(e,t,n,u);i.p(h,r)}}function En(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 Ct(i){return i??""}function V(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 Ne(i){return document.createElementNS("http://www.w3.org/2000/svg",i)}function Ve(i){return document.createTextNode(i)}function we(){return Ve(" ")}function Ln(){return Ve("")}function ce(i,e,t,n){return i.addEventListener(e,t,n),()=>i.removeEventListener(e,t,n)}function _n(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 Sn(i){return Array.from(i.childNodes)}function ht(i,e){e=""+e,i.data!==e&&(i.data=e)}function yi(i,e){i.value=e??""}function Re(i,e,t){i.classList.toggle(e,!!t)}function xn(i,e,{bubbles:t=!1,cancelable:n=!1}={}){return new CustomEvent(i,{detail:e,bubbles:t,cancelable:n})}let dt;function gt(i){dt=i}function vi(){if(!dt)throw new Error("Function called outside component initialization");return dt}function Tn(i){vi().$$.on_destroy.push(i)}function bi(){const i=vi();return(e,t,{cancelable:n=!1}={})=>{const r=i.$$.callbacks[e];if(r){const u=xn(e,t,{cancelable:n});return r.slice().forEach(h=>{h.call(i,u)}),!u.defaultPrevented}return!0}}function Mn(i,e){const t=i.$$.callbacks[e.type];t&&t.slice().forEach(n=>n.call(this,e))}const ot=[],jt=[];let lt=[];const wi=[],Cn=Promise.resolve();let Zt=!1;function Nn(){Zt||(Zt=!0,Cn.then(Ei))}function Ht(i){lt.push(i)}const Vt=new Set;let ut=0;function Ei(){if(ut!==0)return;const i=dt;do{try{for(;ut<ot.length;){const e=ot[ut];ut++,gt(e),kn(e.$$)}}catch(e){throw ot.length=0,ut=0,e}for(gt(null),ot.length=0,ut=0;jt.length;)jt.pop()();for(let e=0;e<lt.length;e+=1){const t=lt[e];Vt.has(t)||(Vt.add(t),t())}lt.length=0}while(ot.length);for(;wi.length;)wi.pop()();Zt=!1,Vt.clear(),gt(i)}function kn(i){if(i.fragment!==null){i.update(),Ge(i.before_update);const e=i.dirty;i.dirty=[-1],i.fragment&&i.fragment.p(i.ctx,e),i.after_update.forEach(Ht)}}function On(i){const e=[],t=[];lt.forEach(n=>i.indexOf(n)===-1?e.push(n):t.push(n)),t.forEach(n=>n()),lt=e}const Nt=new Set;let tt;function kt(){tt={r:0,c:[],p:tt}}function Ot(){tt.r||Ge(tt.c),tt=tt.p}function le(i,e){i&&i.i&&(Nt.delete(i),i.i(e))}function ge(i,e,t,n){if(i&&i.o){if(Nt.has(i))return;Nt.add(i),tt.c.push(()=>{Nt.delete(i),n&&(t&&i.d(1),n())}),i.o(e)}else n&&n()}function Li(i){return(i==null?void 0:i.length)!==void 0?i:Array.from(i)}function Rn(i,e){ge(i,1,1,()=>{e.delete(i.key)})}function Pn(i,e,t,n,r,u,h,o,g,c,E,S){let C=i.length,R=u.length,O=C;const z={};for(;O--;)z[i[O].key]=O;const T=[],k=new Map,v=new Map,N=[];for(O=R;O--;){const A=S(r,u,O),s=t(A);let l=h.get(s);l?N.push(()=>l.p(A,e)):(l=c(s,A),l.c()),k.set(s,T[O]=l),s in z&&v.set(s,Math.abs(O-z[s]))}const D=new Set,q=new Set;function B(A){le(A,1),A.m(o,E),h.set(A.key,A),E=A.first,R--}for(;C&&R;){const A=T[R-1],s=i[C-1],l=A.key,f=s.key;A===s?(E=A.first,C--,R--):k.has(f)?!h.has(l)||D.has(l)?B(A):q.has(f)?C--:v.get(l)>v.get(f)?(q.add(l),B(A)):(D.add(f),C--):(g(s,h),C--)}for(;C--;){const A=i[C];k.has(A.key)||g(A,h)}for(;R;)B(T[R-1]);return Ge(N),T}function Ke(i){i&&i.c()}function De(i,e,t){const{fragment:n,after_update:r}=i.$$;n&&n.m(e,t),Ht(()=>{const u=i.$$.on_mount.map(di).filter(mi);i.$$.on_destroy?i.$$.on_destroy.push(...u):Ge(u),i.$$.on_mount=[]}),r.forEach(Ht)}function Ue(i,e){const t=i.$$;t.fragment!==null&&(On(t.after_update),Ge(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function An(i,e){i.$$.dirty[0]===-1&&(ot.push(i),Nn(),i.$$.dirty.fill(0)),i.$$.dirty[e/31|0]|=1<<e%31}function Ye(i,e,t,n,r,u,h=null,o=[-1]){const g=dt;gt(i);const c=i.$$={fragment:null,ctx:[],props:u,update:te,not_equal:r,bound:gi(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(g?g.$$.context:[])),callbacks:gi(),dirty:o,skip_bound:!1,root:e.target||g.$$.root};h&&h(c.root);let E=!1;if(c.ctx=t?t(i,e.props||{},(S,C,...R)=>{const O=R.length?R[0]:C;return c.ctx&&r(c.ctx[S],c.ctx[S]=O)&&(!c.skip_bound&&c.bound[S]&&c.bound[S](O),E&&An(i,S)),C}):[],c.update(),E=!0,Ge(c.before_update),c.fragment=n?n(c.ctx):!1,e.target){if(e.hydrate){const S=Sn(e.target);c.fragment&&c.fragment.l(S),S.forEach(ie)}else c.fragment&&c.fragment.c();e.intro&&le(i.$$.fragment),De(i,e.target,e.anchor),Ei()}gt(g)}class Qe{constructor(){P(this,"$$");P(this,"$$set")}$destroy(){Ue(this,1),this.$destroy=te}$on(e,t){if(!mi(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&&!yn(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const In="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(In);function Bn(i){let e,t;return{c(){e=Ne("svg"),t=Ne("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),V(e,t)},p:te,i:te,o:te,d(n){n&&ie(e)}}}class _i extends Qe{constructor(e){super(),Ye(this,e,null,Bn,He,{})}}function zn(i){let e,t;return{c(){e=Ne("svg"),t=Ne("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),V(e,t)},p:te,i:te,o:te,d(n){n&&ie(e)}}}class Si extends Qe{constructor(e){super(),Ye(this,e,null,zn,He,{})}}function Wn(i){let e,t;return{c(){e=J("img"),ye(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&&!ye(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 Gn(i){let e,t;return{c(){e=J("img"),ye(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&&!ye(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 Dn(i){let e,t;return{c(){e=J("img"),ye(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&&!ye(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 Un(i){let e,t;return{c(){e=J("img"),ye(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&&!ye(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 qn(i){let e,t;return{c(){e=J("img"),ye(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&&!ye(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 Fn(i){let e,t;return{c(){e=J("img"),ye(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&&!ye(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 jn(i){let e,t;return{c(){e=J("img"),ye(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&&!ye(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 Zn(i){let e,t,n,r;return{c(){e=J("img"),ye(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(u,h){ne(u,e,h),n||(r=ce(e,"error",i[14]),n=!0)},p(u,h){h&32&&!ye(e.src,t=u[5])&&x(e,"src",t),h&16&&x(e,"alt",u[4]),h&64&&x(e,"title",u[6])},d(u){u&&ie(e),n=!1,r()}}}function xi(i){let e,t;return{c(){e=J("span"),t=Ve(i[6]),x(e,"class","secondary svelte-z7p9pp")},m(n,r){ne(n,e,r),V(e,t)},p(n,r){r&64&&ht(t,n[6])},d(n){n&&ie(e)}}}function Hn(i){let e,t,n,r,u,h,o,g,c,E=(i[8]?i[0].place_name:i[0].place_name.replace(/,.*/,""))+"",S,C,R=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],O,z,T=(i[8]?"":i[0].place_name.replace(/[^,]*,?\s*/,""))+"",k,v,N,D,q,B;function A(m,a){return a&1&&(t=null),a&1&&(n=null),a&1&&(r=null),a&1&&(u=null),m[5]?Zn:m[0].address?jn:(t==null&&(t=!!m[0].id.startsWith("road.")),t?Fn:(n==null&&(n=!!m[0].id.startsWith("address.")),n?qn:(r==null&&(r=!!m[0].id.startsWith("postal_code.")),r?Un:(u==null&&(u=!!m[0].id.startsWith("poi.")),u?Dn:m[8]?Gn:Wn))))}let s=A(i,-1),l=s(i),f=R&&xi(i);return{c(){e=J("li"),l.c(),h=we(),o=J("span"),g=J("span"),c=J("span"),S=Ve(E),C=we(),f&&f.c(),O=we(),z=J("span"),k=Ve(T),x(c,"class","primary svelte-z7p9pp"),x(g,"class","svelte-z7p9pp"),x(z,"class","line2 svelte-z7p9pp"),x(o,"class","texts svelte-z7p9pp"),x(e,"tabindex","-1"),x(e,"role","option"),x(e,"aria-selected",v=i[1]==="selected"),x(e,"aria-checked",N=i[1]==="picked"),x(e,"class",D=Ct(i[1])+" svelte-z7p9pp")},m(m,a){ne(m,e,a),l.m(e,null),V(e,h),V(e,o),V(o,g),V(g,c),V(c,S),V(g,C),f&&f.m(g,null),V(o,O),V(o,z),V(z,k),q||(B=[ce(e,"mouseenter",i[13]),ce(e,"focus",i[15]),ce(e,"click",i[16])],q=!0)},p(m,[a]){s===(s=A(m,a))&&l?l.p(m,a):(l.d(1),l=s(m),l&&(l.c(),l.m(e,h))),a&1&&E!==(E=(m[8]?m[0].place_name:m[0].place_name.replace(/,.*/,""))+"")&&ht(S,E),a&37&&(R=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]),R?f?f.p(m,a):(f=xi(m),f.c(),f.m(g,null)):f&&(f.d(1),f=null),a&1&&T!==(T=(m[8]?"":m[0].place_name.replace(/[^,]*,?\s*/,""))+"")&&ht(k,T),a&2&&v!==(v=m[1]==="selected")&&x(e,"aria-selected",v),a&2&&N!==(N=m[1]==="picked")&&x(e,"aria-checked",N),a&2&&D!==(D=Ct(m[1])+" svelte-z7p9pp")&&x(e,"class",D)},i:te,o:te,d(m){m&&ie(e),l.d(),f&&f.d(),q=!1,Ge(B)}}}function Vn(i,e,t){var q;let n,r,{feature:u}=e,{style:h="default"}=e,{showPlaceType:o}=e,{missingIconsCache:g}=e,{iconsBaseUrl:c}=e;const E=bi(),S=(q=u.properties)==null?void 0:q.categories;let C,R,O=0,z=u.place_type[0]==="reverse";function T(){R&&g.add(R),t(11,O++,O)}function k(B){Mn.call(this,i,B)}const v=()=>T(),N=()=>E("select",void 0),D=B=>{document.activeElement!==B.target&&E("select",void 0)};return i.$$set=B=>{"feature"in B&&t(0,u=B.feature),"style"in B&&t(1,h=B.style),"showPlaceType"in B&&t(2,o=B.showPlaceType),"missingIconsCache"in B&&t(10,g=B.missingIconsCache),"iconsBaseUrl"in B&&t(3,c=B.iconsBaseUrl)},i.$$.update=()=>{var B,A,s,l;if(i.$$.dirty&7224)do t(12,n--,n),t(4,C=S==null?void 0:S[n]),t(5,R=C?c+C.replace(/ /g,"_")+".svg":void 0);while(n>-1&&(!R||g.has(R)));i.$$.dirty&1&&t(6,r=((A=(B=u.properties)==null?void 0:B.categories)==null?void 0:A.join(", "))??((l=(s=u.properties)==null?void 0:s.place_type_name)==null?void 0:l[0])??u.place_type[0])},t(12,n=(S==null?void 0:S.length)??0),[u,h,o,c,C,R,r,E,z,T,g,O,n,k,v,N,D]}class Kn extends Qe{constructor(e){super(),Ye(this,e,Vn,Hn,He,{feature:0,style:1,showPlaceType:2,missingIconsCache:10,iconsBaseUrl:3})}}function Yn(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 Qn extends Qe{constructor(e){super(),Ye(this,e,null,Yn,He,{})}}function Xn(i){let e,t,n;return{c(){e=Ne("svg"),t=Ne("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"),Re(e,"in-map",i[0]!=="list"),Re(e,"list-icon",i[0]==="list")},m(r,u){ne(r,e,u),V(e,t)},p(r,[u]){u&1&&n!==(n=r[0]==="list"?20:void 0)&&x(e,"width",n),u&1&&Re(e,"in-map",r[0]!=="list"),u&1&&Re(e,"list-icon",r[0]==="list")},i:te,o:te,d(r){r&&ie(e)}}}function Jn(i,e,t){let{displayIn:n}=e;return i.$$set=r=>{"displayIn"in r&&t(0,n=r.displayIn)},[n]}class $n extends Qe{constructor(e){super(),Ye(this,e,Jn,Xn,He,{displayIn:0})}}function er(i){let e,t;return{c(){e=Ne("svg"),t=Ne("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),V(e,t)},p:te,i:te,o:te,d(n){n&&ie(e)}}}class tr extends Qe{constructor(e){super(),Ye(this,e,null,er,He,{})}}function ir(i){let e,t,n;return{c(){e=Ne("svg"),t=Ne("circle"),n=Ne("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,u){ne(r,e,u),V(e,t),V(e,n)},p:te,i:te,o:te,d(r){r&&ie(e)}}}class nr extends Qe{constructor(e){super(),Ye(this,e,null,ir,He,{})}}function rr(i,e,t){const n=e[1],r=e[0],u=n-r;return i===n&&t?i:((i-r)%u+u)%u+r}function Rt(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 mt;async function sr(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(mt&&r.cachedLocationExpiry&&mt.time+r.cachedLocationExpiry>Date.now()){if(!mt.coords)break e;return mt.coords}let u;try{return u=await new Promise((h,o)=>{t.signal.addEventListener("abort",()=>{o(Error("aborted"))}),navigator.geolocation.getCurrentPosition(g=>{h([g.coords.longitude,g.coords.latitude].map(c=>c.toFixed(6)).join(","))},g=>{o(g)},r)}),u}catch{}finally{r.cachedLocationExpiry&&(mt={time:Date.now(),coords:u})}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 or=/^(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,Ti=/^([+-]?[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,})$/,Mi=/^(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,Ci=/^(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,Ni=/^(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,ki=/^(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 lr(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(R=>Number(R.trim())),t=Number(e[0]),n=Number(e[1]),r=Math.abs(t),u=Math.abs(n),h=t>0?"N":"S",o=n>0?"E":"W";let g;i=="DD"&&(g=`${r}° ${h}, ${u}° ${o}`);const c=Math.floor(r),E=Math.floor(u),S=(r-c)*60,C=(u-E)*60;if(i=="DM"){let R=Oi(S,3).toFixed(3).padStart(6,"0"),O=Oi(C,3).toFixed(3).padStart(6,"0");R.endsWith(".000")&&O.endsWith(".000")&&(R=R.replace(/\.000$/,""),O=O.replace(/\.000$/,"")),g=`${c}° ${R}' ${h}, ${E}° ${O}' ${o}`}if(i=="DMS"){const R=Math.floor(S),O=Math.floor(C);let z=((S-R)*60).toFixed(1).padStart(4,"0"),T=((C-O)*60).toFixed(1).padStart(4,"0");const k=R.toString().padStart(2,"0"),v=O.toString().padStart(2,"0");z.endsWith(".0")&&T.endsWith(".0")&&(z=z.replace(/\.0$/,""),T=T.replace(/\.0$/,"")),g=`${c}° ${k}' ${z}" ${h}, ${E}° ${v}' ${T}" ${o}`}return g}else throw new Error("no decimal coordinates to convert")}function Oi(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="",u="",h=null,o=[],g=!1;if(or.test(i))throw new Error("invalid coordinate value");if(Ti.test(i))if(o=Ti.exec(i),g=pt(o),g)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),h="DM";else throw new Error("invalid coordinate format");else if(Mi.test(i))if(o=Mi.exec(i),g=pt(o),g){if(t=o[2],n=o[6],t.includes(",")&&(t=t.replace(",",".")),n.includes(",")&&(n=n.replace(",",".")),h="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],u=o[5]):o[4]&&(r=o[4],u=o[8])}else throw new Error("invalid decimal coordinate format");else if(Ci.test(i))if(o=Ci.exec(i),g=pt(o),g)t=Math.abs(parseInt(o[2])),o[4]&&(t+=o[4]/60,h="DM"),o[6]&&(t+=o[6].replace(",",".")/3600,h="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],u=o[8]):o[7]&&(r=o[7],u=o[14]);else throw new Error("invalid DMS coordinates format");else if(Ni.test(i))if(o=Ni.exec(i),g=pt(o),g)t=Math.abs(parseInt(o[2])),o[4]&&(t+=o[4]/60,h="DM"),o[6]&&(t+=o[6]/3600,h="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],u=o[9]):o[8]&&(r=o[8],u=o[16]);else throw new Error("invalid DMS coordinates format");else if(ki.test(i)){if(o=ki.exec(i),g=pt(o),o.filter(c=>c).length<=5)throw new Error("invalid coordinates format");if(g)t=Math.abs(parseInt(o[2])),o[4]&&(t+=o[4].replace(",",".")/60,h="DM"),o[6]&&(t+=o[6].replace(",",".")/3600,h="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],u=o[9]):o[8]&&(r=o[8],u=o[16]);else throw new Error("invalid coordinates format")}if(g){if(Math.abs(n)>=180)throw new Error("invalid longitude value");if(Math.abs(t)>=90)throw new Error("invalid latitude value");if(r&&!u||!r&&u)throw new Error("invalid coordinates value");if(r&&r==u)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(u)&&n>0&&(n=-1*n);const E=o[0].trim();let S,C;const R=/[,/;\u0020]/g,O=E.match(R);if(O==null){const k=Math.floor(i.length/2);S=E.substring(0,k).trim(),C=E.substring(k).trim()}else{let k;O.length%2==1?k=Math.floor(O.length/2):k=O.length/2-1;let v=0;if(k==0)v=E.indexOf(O[0]),S=E.substring(0,v).trim(),C=E.substring(v+1).trim();else{let N=0,D=0;for(;N<=k;)v=E.indexOf(O[N],D),D=v+1,N++;S=E.substring(0,v).trim(),C=E.substring(v+1).trim()}}const z=S.split(".");if(z.length==2&&z[1]==0&&z[1].length!=2)throw new Error("invalid coordinates format");const T=C.split(".");if(T.length==2&&T[1]==0&&T[1].length!=2)throw new Error("invalid coordinates format");if(/^\d+$/.test(S)||/^\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:E,verbatimLatitude:S,verbatimLongitude:C,decimalLatitude:t,decimalLongitude:n,decimalCoordinates:`${t},${n}`,originalFormat:h,closeEnough:ur,toCoordinateFormat:lr})}else throw new Error("coordinates pattern match failed")}function pt(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 u=0;u<r;u++){const h=e[u],o=e[u+r],g=t.test(h)&&t.test(o),c=n.test(h)&&n.test(o),E=h==o;if(!(h==null&&o==null)){if(h==null||o==null)return!1;if(g||c||E)continue;return!1}}return!0}function Ri(i,e){const t=Math.abs(i-e);return Number(t.toFixed(6))<=1e-5}function ur(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 Ri(this.decimalLatitude,Number(e[0]))&&Ri(this.decimalLongitude,e[1])}else throw new Error("coords being tested must be separated by a comma")}const ar=Object.freeze({DMS:"DMS",DM:"DM",DD:"DD"});Kt.to=ar;const fr=[{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"}],cr={decimalLatitude:40.123,decimalLongitude:-74.123},hr=[{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}],dr=[{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 gr(){const i=[];return fr.forEach(e=>{e.decimalLatitude?i.push(e):i.push({...e,...cr})}),[...i,...hr,...dr]}const mr=gr();Kt.formats=mr.map(i=>i.verbatimCoordinates);const pr=Kt;function Pi(i,e,t){const n=i.slice();return n[97]=e[t],n[99]=t,n}function Ai(i){let e,t;return e=new Qn({}),{c(){Ke(e.$$.fragment)},m(n,r){De(e,n,r),t=!0},i(n){t||(le(e.$$.fragment,n),t=!0)},o(n){ge(e.$$.fragment,n),t=!1},d(n){Ue(e,n)}}}function Ii(i){let e,t,n,r,u;return t=new tr({}),{c(){e=J("button"),Ke(t.$$.fragment),x(e,"type","button"),x(e,"title",i[10]),x(e,"class","svelte-bz0zu3"),Re(e,"active",i[0])},m(h,o){ne(h,e,o),De(t,e,null),n=!0,r||(u=ce(e,"click",i[79]),r=!0)},p(h,o){(!n||o[0]&1024)&&x(e,"title",h[10]),(!n||o[0]&1)&&Re(e,"active",h[0])},i(h){n||(le(t.$$.fragment,h),n=!0)},o(h){ge(t.$$.fragment,h),n=!1},d(h){h&&ie(e),Ue(t),r=!1,u()}}}function yr(i){let e,t=[],n=new Map,r,u,h,o=Li(i[13]);const g=c=>c[97].id+(c[97].address?","+c[97].address:"");for(let c=0;c<o.length;c+=1){let E=Pi(i,o,c),S=g(E);n.set(S,t[c]=Bi(S,E))}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,E){ne(c,e,E);for(let S=0;S<t.length;S+=1)t[S]&&t[S].m(e,null);r=!0,u||(h=[ce(e,"mouseleave",i[27]),ce(e,"blur",i[83]),ce(e,"keydown",i[23])],u=!0)},p(c,E){E[0]&102823936&&(o=Li(c[13]),kt(),t=Pn(t,E,g,1,c,o,n,e,Rn,Bi,null,Pi),Ot())},i(c){if(!r){for(let E=0;E<o.length;E+=1)le(t[E]);r=!0}},o(c){for(let E=0;E<t.length;E+=1)ge(t[E]);r=!1},d(c){c&&ie(e);for(let E=0;E<t.length;E+=1)t[E].d();u=!1,Ge(h)}}}function vr(i){let e,t,n,r,u,h;return t=new Si({}),{c(){e=J("div"),Ke(t.$$.fragment),n=we(),r=J("div"),u=Ve(i[8]),x(r,"class","svelte-bz0zu3"),x(e,"class","no-results svelte-bz0zu3")},m(o,g){ne(o,e,g),De(t,e,null),V(e,n),V(e,r),V(r,u),h=!0},p(o,g){(!h||g[0]&256)&&ht(u,o[8])},i(o){h||(le(t.$$.fragment,o),h=!0)},o(o){ge(t.$$.fragment,o),h=!1},d(o){o&&ie(e),Ue(t)}}}function br(i){let e="",t;return{c(){t=Ve(e)},m(n,r){ne(n,t,r)},p:te,i:te,o:te,d(n){n&&ie(t)}}}function wr(i){let e,t,n,r,u,h,o,g,c,E,S;return t=new Si({}),g=new _i({}),{c(){e=J("div"),Ke(t.$$.fragment),n=we(),r=J("div"),u=Ve(i[7]),h=we(),o=J("button"),Ke(g.$$.fragment),x(r,"class","svelte-bz0zu3"),x(o,"class","svelte-bz0zu3"),x(e,"class","error svelte-bz0zu3")},m(C,R){ne(C,e,R),De(t,e,null),V(e,n),V(e,r),V(r,u),V(e,h),V(e,o),De(g,o,null),c=!0,E||(S=ce(o,"click",i[80]),E=!0)},p(C,R){(!c||R[0]&128)&&ht(u,C[7])},i(C){c||(le(t.$$.fragment,C),le(g.$$.fragment,C),c=!0)},o(C){ge(t.$$.fragment,C),ge(g.$$.fragment,C),c=!1},d(C){C&&ie(e),Ue(t),Ue(g),E=!1,S()}}}function Bi(i,e){var o;let t,n,r;function u(){return e[81](e[99])}function h(){return e[82](e[97])}return n=new Kn({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",u),n.$on("select",h),{key:i,first:null,c(){t=Ln(),Ke(n.$$.fragment),this.first=t},m(g,c){ne(g,t,c),De(n,g,c),r=!0},p(g,c){var S;e=g;const E={};c[0]&8192&&(E.feature=e[97]),c[0]&2048&&(E.showPlaceType=e[11]),c[0]&57344&&(E.style=e[15]===e[99]?"selected":((S=e[14])==null?void 0:S.id)===e[97].id?"picked":"default"),c[0]&4096&&(E.iconsBaseUrl=e[12]),n.$set(E)},i(g){r||(le(n.$$.fragment,g),r=!0)},o(g){ge(n.$$.fragment,g),r=!1},d(g){g&&ie(t),Ue(n,g)}}}function Er(i){let e,t,n,r,u,h,o,g,c,E,S,C,R,O,z,T,k,v,N,D,q,B=!1;u=new nr({}),S=new _i({});let A=i[20]&&Ai(),s=i[6]==="button"&&Ii(i);const l=i[70].default,f=vn(l,i,i[69],null),m=[wr,br,vr,yr],a=[];function b(p,d){var y,w;return p[19]?0:!p[16]&&!p[4]?1:((y=p[13])==null?void 0:y.length)===0?2:(w=p[13])!=null&&w.length&&(p[16]||p[4])?3:-1}return~(T=b(i))&&(k=a[T]=m[T](i)),{c(){e=we(),t=J("form"),n=J("div"),r=J("button"),Ke(u.$$.fragment),h=we(),o=J("input"),g=we(),c=J("div"),E=J("button"),Ke(S.$$.fragment),C=we(),A&&A.c(),R=we(),s&&s.c(),O=we(),f&&f.c(),z=we(),k&&k.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(E,"type","button"),x(E,"title",i[3]),x(E,"class","svelte-bz0zu3"),x(c,"class","clear-button-container svelte-bz0zu3"),Re(c,"displayable",i[1]!==""),x(n,"class","input-group svelte-bz0zu3"),x(t,"class",v=Ct(i[2])+" svelte-bz0zu3"),Re(t,"can-collapse",i[5]&&i[1]==="")},m(p,d){ne(p,e,d),ne(p,t,d),V(t,n),V(n,r),De(u,r,null),V(n,h),V(n,o),i[72](o),yi(o,i[1]),V(n,g),V(n,c),V(c,E),De(S,E,null),V(c,C),A&&A.m(c,null),V(n,R),s&&s.m(n,null),V(n,O),f&&f.m(n,null),V(t,z),~T&&a[T].m(t,null),N=!0,D||(q=[ce(r,"click",i[71]),ce(o,"input",i[73]),ce(o,"focus",i[74]),ce(o,"blur",i[75]),ce(o,"click",i[76]),ce(o,"keydown",i[23]),ce(o,"input",i[24]),ce(o,"change",i[77]),ce(E,"click",i[78]),ce(t,"submit",_n(i[22]))],D=!0)},p(p,d){(!N||d[0]&512)&&x(o,"placeholder",p[9]),(!N||d[0]&512)&&x(o,"aria-label",p[9]),d[0]&2&&o.value!==p[1]&&yi(o,p[1]),(!N||d[0]&8)&&x(E,"title",p[3]),p[20]?A?d[0]&1048576&&le(A,1):(A=Ai(),A.c(),le(A,1),A.m(c,null)):A&&(kt(),ge(A,1,1,()=>{A=null}),Ot()),(!N||d[0]&2)&&Re(c,"displayable",p[1]!==""),p[6]==="button"?s?(s.p(p,d),d[0]&64&&le(s,1)):(s=Ii(p),s.c(),le(s,1),s.m(n,O)):s&&(kt(),ge(s,1,1,()=>{s=null}),Ot()),f&&f.p&&(!N||d[2]&128)&&wn(f,l,p,p[69],N?bn(l,p[69],d,null):En(p[69]),null);let y=T;T=b(p),T===y?~T&&a[T].p(p,d):(k&&(kt(),ge(a[y],1,1,()=>{a[y]=null}),Ot()),~T?(k=a[T],k?k.p(p,d):(k=a[T]=m[T](p),k.c()),le(k,1),k.m(t,null)):k=null),(!N||d[0]&4&&v!==(v=Ct(p[2])+" svelte-bz0zu3"))&&x(t,"class",v),(!N||d[0]&38)&&Re(t,"can-collapse",p[5]&&p[1]==="")},i(p){N||(le(B),le(u.$$.fragment,p),le(S.$$.fragment,p),le(A),le(s),le(f,p),le(k),N=!0)},o(p){ge(B),ge(u.$$.fragment,p),ge(S.$$.fragment,p),ge(A),ge(s),ge(f,p),ge(k),N=!1},d(p){p&&(ie(e),ie(t)),Ue(u),i[72](null),Ue(S),A&&A.d(),s&&s.d(),f&&f.d(p),~T&&a[T].d(),D=!1,Ge(q)}}}function Lr(i,e,t){let n,r,u,{$$slots:h={},$$scope:o}=e;const g={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:E}=e,{bbox:S=void 0}=e,{clearButtonTitle:C="clear"}=e,{clearOnBlur:R=!1}=e,{clearListOnPick:O=!1}=e,{keepListOpen:z=!1}=e,{collapsed:T=!1}=e,{country:k=void 0}=e,{debounceSearch:v=200}=e,{enableReverse:N="never"}=e,{errorMessage:D="Something went wrong…"}=e,{filter:q=()=>!0}=e,{flyTo:B=!0}=e,{fuzzyMatch:A=!0}=e,{language:s=void 0}=e,{limit:l=void 0}=e;const f=41415112612;let{reverseGeocodingLimit:m=f}=e,{mapController:a=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:d="Search"}=e,{proximity:y=[{type:"server-geolocation"}]}=e,{reverseActive:w=N==="always"}=e,{reverseButtonTitle:L="toggle reverse geocoding"}=e,{searchValue:M=""}=e,{pickedResultStyle:I="full-geometry"}=e,{showPlaceType:W="if-needed"}=e,{showResultsWhileTyping:H=!0}=e,{selectFirst:Y=!0}=e,{flyToSelected:re=!1}=e,{markerOnSelected:Z=!0}=e,{types:K=void 0}=e;const he=[];let{reverseGeocodingTypes:je=he}=e,{exhaustiveReverseGeocoding:nt=!1}=e,{excludeTypes:rt=!1}=e;const Le=void 0;let{reverseGeocodingExcludeTypes:Ie=Le}=e,{zoom:pe=g}=e,{apiUrl:de="https://api.maptiler.com/geocoding"}=e,{fetchParameters:ee={}}=e,{iconsBaseUrl:on="https://cdn.maptiler.com/maptiler-geocoding-control/v2.1.2/icons/"}=e,{adjustUrlQuery:ii=()=>{}}=e,{adjustUrl:ni=()=>{}}=e;function ls(_){Oe.focus(_)}function us(){Oe.blur()}function ln(_,oe=!0,ue=!1){t(1,M=_),oe?(t(15,Q=-1),an()):(fn(void 0,!ue,ue),setTimeout(()=>{Oe.focus(),Oe.select()}))}function as(){t(13,F=void 0),t(14,G=void 0),t(15,Q=-1)}function fs(){t(64,ae=[]),t(14,G=void 0)}let F,ae,G,un="",Oe,Q=-1,Be,Ut=[],st,at,ft,ri,Ze=!1;const cs=new Set,$e=bi();Tn(()=>{a&&(a.setEventHandler(void 0),a.indicateReverse(!1),a.setSelectedMarker(-1),a.setFeatures(void 0,void 0,!1))});function an(_){if(t(17,Ze=!1),at&&(clearTimeout(at),at=void 0),Q>-1&&F)t(14,G=F[Q]),t(1,M=G.place_type[0]==="reverse"?G.place_name:G.place_name.replace(/,.*/,"")),t(19,Be=void 0),t(64,ae=void 0),t(15,Q=-1);else if(M){const oe=_||!si(M);oi(M,{exact:!0}).then(()=>{t(64,ae=F),t(14,G=void 0),oe&&hs()}).catch(ue=>t(19,Be=ue))}}function si(_){try{return pr(_,6)}catch{return!1}}async function oi(_,{byId:oe=!1,exact:ue=!1}={}){var Se,ze,et;t(19,Be=void 0),st==null||st.abort();const _e=new AbortController;t(20,st=_e);try{const X=si(_),_t=new URL(de+"/"+encodeURIComponent(X?X.decimalLongitude+","+X.decimalLatitude:_)+".json"),Ce=_t.searchParams;s!==void 0&&Ce.set("language",Array.isArray(s)?s.join(","):s??"");const[ai]=(a==null?void 0:a.getCenterAndZoom())??[];let We=(Se=!X||je===he?K:je)==null?void 0:Se.map(ve=>typeof ve=="string"?ve:ai===void 0||(ve[0]??0)<=ai&&ai<(ve[1]??1/0)?ve[2]:void 0).filter(ve=>ve!==void 0);We&&(We=[...new Set(We)],Ce.set("types",We.join(",")));const hn=!X||Ie===Le?rt:Ie;if(hn&&Ce.set("excludeTypes",String(hn)),S&&Ce.set("bbox",S.map(ve=>ve.toFixed(6)).join(",")),k&&Ce.set("country",Array.isArray(k)?k.join(","):k),!oe&&!X){const ve=await sr(a,y,_e);ve&&Ce.set("proximity",ve),(ue||!H)&&Ce.set("autocomplete","false"),Ce.set("fuzzyMatch",String(A))}const St=m===f?l:m;St!==void 0&&St>1&&(We==null?void 0:We.length)!==1&&console.warn("For reverse geocoding when limit > 1 then types must contain single value."),X?(St===1||St!==void 0&&(nt||(We==null?void 0:We.length)===1))&&Ce.set("limit",String(St)):l!==void 0&&Ce.set("limit",String(l)),Ce.set("key",E),ii(Ce),ni(_t);const Ns=_t.searchParams.get("types")===""&&_t.searchParams.get("excludeTypes")!=="true",qt=_t.toString();if(qt===un){oe?(O&&t(13,F=void 0),t(14,G=Ut[0])):(t(13,F=Ut),((ze=F[Q])==null?void 0:ze.id)!==(r==null?void 0:r.id)&&t(15,Q=-1));return}un=qt;let xt;if(Ns)xt={type:"FeatureCollection",features:[]};else{const ve=await fetch(qt,{signal:_e.signal,...ee});if(!ve.ok)throw new Error(await ve.text());xt=await ve.json()}$e("response",{url:qt,featureCollection:xt}),oe?(O&&t(13,F=void 0),t(14,G=xt.features[0]),Ut=[G]):(t(13,F=xt.features.filter(q)),X&&F.unshift({type:"Feature",properties:{},id:"reverse_"+X.decimalLongitude+"_"+X.decimalLatitude,text:X.decimalLatitude+", "+X.decimalLongitude,place_name:X.decimalLatitude+", "+X.decimalLongitude,place_type:["reverse"],center:[X.decimalLongitude,X.decimalLatitude],bbox:[X.decimalLongitude,X.decimalLatitude,X.decimalLongitude,X.decimalLatitude],geometry:{type:"Point",coordinates:[X.decimalLongitude,X.decimalLatitude]}}),Ut=F,((et=F[Q])==null?void 0:et.id)!==(r==null?void 0:r.id)&&t(15,Q=-1),X&&Oe.focus())}catch(X){if(X&&typeof X=="object"&&"name"in X&&X.name==="AbortError")return;throw X}finally{_e===st&&t(20,st=void 0)}}function hs(){var _e;if(!(ae!=null&&ae.length)||!B)return;const _=[180,90,-180,-90],oe=!ae.some(Se=>!Se.matching_text);let ue;for(const Se of ae){const ze=Lt(Se);if(ue=ue===void 0?ze:ze===void 0?ue:Math.max(ue,ze),oe||!Se.matching_text)for(const et of[0,1,2,3])_[et]=Math[et<2?"min":"max"](_[et],((_e=Se.bbox)==null?void 0:_e[et])??Se.center[et%2])}a&&ae.length>0&&(G&&_[0]===_[2]&&_[1]===_[3]?a.flyTo(G.center,Lt(G)):a.fitBounds(Rt(_),50,ue))}function li(){!G||!a||(!G.bbox||G.bbox[0]===G.bbox[2]&&G.bbox[1]===G.bbox[3]?a.flyTo(G.center,Lt(G)):a.fitBounds(Rt(G.bbox),50,Lt(G)))}function Lt(_){var ue;if(!_.bbox||_.bbox[0]!==_.bbox[2]&&_.bbox[1]!==_.bbox[3])return;const oe=_.id.replace(/\..*/,"");return(Array.isArray((ue=_.properties)==null?void 0:ue.categories)?_.properties.categories.reduce((_e,Se)=>{const ze=pe[oe+"."+Se];return _e===void 0?ze:ze===void 0?_e:Math.max(_e,ze)},void 0):void 0)??pe[oe]}function ds(_){t(0,w=N==="always"),t(13,F=void 0),t(14,G=void 0),t(15,Q=-1),ln(_[1].toFixed(6)+", "+rr(_[0],[-180,180],!0).toFixed(6),!1,!0)}function gs(_){if(!F)return;let oe=_.key==="ArrowDown"?1:_.key==="ArrowUp"?-1:0;oe&&(Oe.focus(),t(17,Ze=!0),_.preventDefault(),G&&Q===-1&&t(15,Q=F.findIndex(ue=>ue.id===(G==null?void 0:G.id))),Q===(G||Y?0:-1)&&oe===-1&&t(15,Q=F.length),t(15,Q+=oe),Q>=F.length&&t(15,Q=-1),Q<0&&(G||Y)&&t(15,Q=0))}function fn(_,oe=!0,ue=!1){if(t(19,Be=void 0),t(14,G=void 0),t(17,Ze=!0),H||ue){if(at&&clearTimeout(at),M.length<b)return;const _e=M;at=window.setTimeout(()=>{oi(_e).catch(Se=>t(19,Be=Se))},oe?v:0)}else t(13,F=void 0),t(19,Be=void 0)}function ui(_){G&&(G==null?void 0:G.id)===(_==null?void 0:_.id)?li():(t(14,G=_),t(1,M=_.place_name))}function cn(_){t(15,Q=_)}function ms(){(!Y||G)&&t(15,Q=-1),re&&li()}const ps=()=>Oe.focus();function ys(_){jt[_?"unshift":"push"](()=>{Oe=_,t(18,Oe)})}function vs(){M=this.value,t(1,M),t(17,Ze),t(31,R),t(16,ft)}const bs=()=>t(17,Ze=!0),ws=()=>t(17,Ze=!1),Es=()=>t(17,Ze=!0),Ls=()=>t(14,G=void 0),_s=()=>{t(1,M=""),Oe.focus()},Ss=()=>t(0,w=!w),xs=()=>t(19,Be=void 0),Ts=_=>cn(_),Ms=_=>ui(_),Cs=()=>{};return i.$$set=_=>{"class"in _&&t(2,c=_.class),"apiKey"in _&&t(29,E=_.apiKey),"bbox"in _&&t(30,S=_.bbox),"clearButtonTitle"in _&&t(3,C=_.clearButtonTitle),"clearOnBlur"in _&&t(31,R=_.clearOnBlur),"clearListOnPick"in _&&t(32,O=_.clearListOnPick),"keepListOpen"in _&&t(4,z=_.keepListOpen),"collapsed"in _&&t(5,T=_.collapsed),"country"in _&&t(33,k=_.country),"debounceSearch"in _&&t(34,v=_.debounceSearch),"enableReverse"in _&&t(6,N=_.enableReverse),"errorMessage"in _&&t(7,D=_.errorMessage),"filter"in _&&t(35,q=_.filter),"flyTo"in _&&t(36,B=_.flyTo),"fuzzyMatch"in _&&t(37,A=_.fuzzyMatch),"language"in _&&t(38,s=_.language),"limit"in _&&t(39,l=_.limit),"reverseGeocodingLimit"in _&&t(40,m=_.reverseGeocodingLimit),"mapController"in _&&t(41,a=_.mapController),"minLength"in _&&t(42,b=_.minLength),"noResultsMessage"in _&&t(8,p=_.noResultsMessage),"placeholder"in _&&t(9,d=_.placeholder),"proximity"in _&&t(43,y=_.proximity),"reverseActive"in _&&t(0,w=_.reverseActive),"reverseButtonTitle"in _&&t(10,L=_.reverseButtonTitle),"searchValue"in _&&t(1,M=_.searchValue),"pickedResultStyle"in _&&t(44,I=_.pickedResultStyle),"showPlaceType"in _&&t(11,W=_.showPlaceType),"showResultsWhileTyping"in _&&t(45,H=_.showResultsWhileTyping),"selectFirst"in _&&t(46,Y=_.selectFirst),"flyToSelected"in _&&t(47,re=_.flyToSelected),"markerOnSelected"in _&&t(48,Z=_.markerOnSelected),"types"in _&&t(49,K=_.types),"reverseGeocodingTypes"in _&&t(50,je=_.reverseGeocodingTypes),"exhaustiveReverseGeocoding"in _&&t(51,nt=_.exhaustiveReverseGeocoding),"excludeTypes"in _&&t(52,rt=_.excludeTypes),"reverseGeocodingExcludeTypes"in _&&t(53,Ie=_.reverseGeocodingExcludeTypes),"zoom"in _&&t(54,pe=_.zoom),"apiUrl"in _&&t(55,de=_.apiUrl),"fetchParameters"in _&&t(56,ee=_.fetchParameters),"iconsBaseUrl"in _&&t(12,on=_.iconsBaseUrl),"adjustUrlQuery"in _&&t(57,ii=_.adjustUrlQuery),"adjustUrl"in _&&t(58,ni=_.adjustUrl),"$$scope"in _&&t(69,o=_.$$scope)},i.$$.update=()=>{if(i.$$.dirty[0]&64&&t(0,w=N==="always"),i.$$.dirty[0]&16384|i.$$.dirty[1]&8192&&I!=="marker-only"&&G&&!G.address&&G.geometry.type==="Point"&&G.place_type[0]!=="reverse"&&oi(G.id,{byId:!0}).catch(_=>t(19,Be=_)),i.$$.dirty[0]&16384|i.$$.dirty[1]&1058|i.$$.dirty[2]&8&&(a&&G&&G.id!==ri&&B&&(li(),O&&t(13,F=void 0),t(64,ae=void 0),t(15,Q=-1)),t(65,ri=G==null?void 0:G.id)),i.$$.dirty[0]&196608|i.$$.dirty[1]&1&&setTimeout(()=>{t(16,ft=Ze),R&&!ft&&t(1,M="")}),i.$$.dirty[0]&8194|i.$$.dirty[1]&2048&&M.length<b&&(t(13,F=void 0),t(19,Be=void 0),t(64,ae=F)),i.$$.dirty[0]&57344|i.$$.dirty[1]&32768&&Y&&F!=null&&F.length&&Q==-1&&!G&&t(15,Q=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&&a&&a.setEventHandler(_=>{switch(_.type){case"mapClick":w&&ds(_.coordinates);break;case"markerClick":{const oe=F==null?void 0:F.find(ue=>ue.id===_.id);oe&&ui(oe)}break;case"markerMouseEnter":ae&&t(15,Q=ft?(F==null?void 0:F.findIndex(oe=>oe.id===_.id))??-1:-1);break;case"markerMouseLeave":ae&&t(15,Q=-1);break}}),i.$$.dirty[0]&40960&&t(66,r=F==null?void 0:F[Q]),i.$$.dirty[1]&66592|i.$$.dirty[2]&16&&a&&r&&B&&re&&a.flyTo(r.center,Lt(r)),i.$$.dirty[1]&8192&&t(68,n=I==="full-geometry-including-polygon-center-marker"),i.$$.dirty[1]&132096|i.$$.dirty[2]&64&&(Z||a==null||a.setFeatures(void 0,void 0,n)),i.$$.dirty[0]&16384|i.$$.dirty[1]&132096|i.$$.dirty[2]&84&&a&&Z&&!ae&&(a.setFeatures(r?[r]:void 0,G,n),a.setSelectedMarker(r?0:-1)),i.$$.dirty[0]&16384|i.$$.dirty[1]&1024|i.$$.dirty[2]&68&&a&&a.setFeatures(ae,G,n),i.$$.dirty[0]&32768|i.$$.dirty[1]&1024|i.$$.dirty[2]&4&&ae&&a&&a.setSelectedMarker(Q),i.$$.dirty[0]&2|i.$$.dirty[1]&1024&&a){const _=si(M);a.setReverseMarker(_?[_.decimalLongitude,_.decimalLatitude]:void 0)}i.$$.dirty[2]&16&&$e("select",{feature:r}),i.$$.dirty[0]&16384&&$e("pick",{feature:G}),i.$$.dirty[0]&73744&&t(67,u=!!(F!=null&&F.length)&&(ft||z)),i.$$.dirty[2]&32&&$e("optionsvisibilitychange",{optionsVisible:u}),i.$$.dirty[0]&8192&&$e("featureslisted",{features:F}),i.$$.dirty[2]&4&&$e("featuresmarked",{features:ae}),i.$$.dirty[0]&1&&$e("reversetoggle",{reverse:w}),i.$$.dirty[0]&2&&$e("querychange",{query:M}),i.$$.dirty[0]&1|i.$$.dirty[1]&1024&&a&&a.indicateReverse(w)},[w,M,c,C,z,T,N,D,p,d,L,W,on,F,G,Q,ft,Ze,Oe,Be,st,cs,an,gs,fn,ui,cn,ms,g,E,S,R,O,k,v,q,B,A,s,l,m,a,b,y,I,H,Y,re,Z,K,je,nt,rt,Ie,pe,de,ee,ii,ni,ls,us,ln,as,fs,ae,ri,r,u,n,o,h,ps,ys,vs,bs,ws,Es,Ls,_s,Ss,xs,Ts,Ms,Cs]}let _r=class extends Qe{constructor(e){super(),Ye(this,e,Lr,Er,He,{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 yt(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 u=0;u<r[r.length-1].length;u++)if(r[r.length-1][u]!==r[0][u])throw new Error("First and last Position are not equivalent.")}return yt({type:"Polygon",coordinates:i},e,t)}function vt(i,e={}){const t={type:"FeatureCollection"};return e.id&&(t.id=e.id),e.bbox&&(t.bbox=e.bbox),t.features=i,t}function zi(i,e,t={}){return yt({type:"MultiPolygon",coordinates:i},e,t)}var Sr=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,Qt=Math.ceil,xe=Math.floor,be="[BigNumber Error] ",Wi=be+"Number primitive has more than 15 significant digits: ",ke=1e14,U=14,Gi=9007199254740991,Xt=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],Xe=1e7,Ee=1e9;function Di(i){var e,t,n,r=v.prototype={constructor:v,toString:null,valueOf:null},u=new v(1),h=20,o=4,g=-7,c=21,E=-1e7,S=1e7,C=!1,R=1,O=0,z={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},T="0123456789abcdefghijklmnopqrstuvwxyz",k=!0;function v(s,l){var f,m,a,b,p,d,y,w,L=this;if(!(L instanceof v))return new v(s,l);if(l==null){if(s&&s._isBigNumber===!0){L.s=s.s,!s.c||s.e>S?L.c=L.e=null:s.e<E?L.c=[L.e=0]:(L.e=s.e,L.c=s.c.slice());return}if((d=typeof s=="number")&&s*0==0){if(L.s=1/s<0?(s=-s,-1):1,s===~~s){for(b=0,p=s;p>=10;p/=10,b++);b>S?L.c=L.e=null:(L.e=b,L.c=[s]);return}w=String(s)}else{if(!Sr.test(w=String(s)))return n(L,w,d);L.s=w.charCodeAt(0)==45?(w=w.slice(1),-1):1}(b=w.indexOf("."))>-1&&(w=w.replace(".","")),(p=w.search(/e/i))>0?(b<0&&(b=p),b+=+w.slice(p+1),w=w.substring(0,p)):b<0&&(b=w.length)}else{if(se(l,2,T.length,"Base"),l==10&&k)return L=new v(s),B(L,h+L.e+1,o);if(w=String(s),d=typeof s=="number"){if(s*0!=0)return n(L,w,d,l);if(L.s=1/s<0?(w=w.slice(1),-1):1,v.DEBUG&&w.replace(/^0\.0*|\./,"").length>15)throw Error(Wi+s)}else L.s=w.charCodeAt(0)===45?(w=w.slice(1),-1):1;for(f=T.slice(0,l),b=p=0,y=w.length;p<y;p++)if(f.indexOf(m=w.charAt(p))<0){if(m=="."){if(p>b){b=y;continue}}else if(!a&&(w==w.toUpperCase()&&(w=w.toLowerCase())||w==w.toLowerCase()&&(w=w.toUpperCase()))){a=!0,p=-1,b=0;continue}return n(L,String(s),d,l)}d=!1,w=t(w,l,10,L.s),(b=w.indexOf("."))>-1?w=w.replace(".",""):b=w.length}for(p=0;w.charCodeAt(p)===48;p++);for(y=w.length;w.charCodeAt(--y)===48;);if(w=w.slice(p,++y)){if(y-=p,d&&v.DEBUG&&y>15&&(s>Gi||s!==xe(s)))throw Error(Wi+L.s*s);if((b=b-p-1)>S)L.c=L.e=null;else if(b<E)L.c=[L.e=0];else{if(L.e=b,L.c=[],p=(b+1)%U,b<0&&(p+=U),p<y){for(p&&L.c.push(+w.slice(0,p)),y-=U;p<y;)L.c.push(+w.slice(p,p+=U));p=U-(w=w.slice(p)).length}else p-=y;for(;p--;w+="0");L.c.push(+w)}}else L.c=[L.e=0]}v.clone=Di,v.ROUND_UP=0,v.ROUND_DOWN=1,v.ROUND_CEIL=2,v.ROUND_FLOOR=3,v.ROUND_HALF_UP=4,v.ROUND_HALF_DOWN=5,v.ROUND_HALF_EVEN=6,v.ROUND_HALF_CEIL=7,v.ROUND_HALF_FLOOR=8,v.EUCLID=9,v.config=v.set=function(s){var l,f;if(s!=null)if(typeof s=="object"){if(s.hasOwnProperty(l="DECIMAL_PLACES")&&(f=s[l],se(f,0,Ee,l),h=f),s.hasOwnProperty(l="ROUNDING_MODE")&&(f=s[l],se(f,0,8,l),o=f),s.hasOwnProperty(l="EXPONENTIAL_AT")&&(f=s[l],f&&f.pop?(se(f[0],-1e9,0,l),se(f[1],0,Ee,l),g=f[0],c=f[1]):(se(f,-1e9,Ee,l),g=-(c=f<0?-f:f))),s.hasOwnProperty(l="RANGE"))if(f=s[l],f&&f.pop)se(f[0],-1e9,-1,l),se(f[1],1,Ee,l),E=f[0],S=f[1];else if(se(f,-1e9,Ee,l),f)E=-(S=f<0?-f:f);else throw Error(be+l+" cannot be zero: "+f);if(s.hasOwnProperty(l="CRYPTO"))if(f=s[l],f===!!f)if(f)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))C=f;else throw C=!f,Error(be+"crypto unavailable");else C=f;else throw Error(be+l+" not true or false: "+f);if(s.hasOwnProperty(l="MODULO_MODE")&&(f=s[l],se(f,0,9,l),R=f),s.hasOwnProperty(l="POW_PRECISION")&&(f=s[l],se(f,0,Ee,l),O=f),s.hasOwnProperty(l="FORMAT"))if(f=s[l],typeof f=="object")z=f;else throw Error(be+l+" not an object: "+f);if(s.hasOwnProperty(l="ALPHABET"))if(f=s[l],typeof f=="string"&&!/^.?$|[+\-.\s]|(.).*\1/.test(f))k=f.slice(0,10)=="0123456789",T=f;else throw Error(be+l+" invalid: "+f)}else throw Error(be+"Object expected: "+s);return{DECIMAL_PLACES:h,ROUNDING_MODE:o,EXPONENTIAL_AT:[g,c],RANGE:[E,S],CRYPTO:C,MODULO_MODE:R,POW_PRECISION:O,FORMAT:z,ALPHABET:T}},v.isBigNumber=function(s){if(!s||s._isBigNumber!==!0)return!1;if(!v.DEBUG)return!0;var l,f,m=s.c,a=s.e,b=s.s;e:if({}.toString.call(m)=="[object Array]"){if((b===1||b===-1)&&a>=-1e9&&a<=Ee&&a===xe(a)){if(m[0]===0){if(a===0&&m.length===1)return!0;break e}if(l=(a+1)%U,l<1&&(l+=U),String(m[0]).length==l){for(l=0;l<m.length;l++)if(f=m[l],f<0||f>=ke||f!==xe(f))break e;if(f!==0)return!0}}}else if(m===null&&a===null&&(b===null||b===1||b===-1))return!0;throw Error(be+"Invalid BigNumber: "+s)},v.maximum=v.max=function(){return D(arguments,-1)},v.minimum=v.min=function(){return D(arguments,1)},v.random=function(){var s=9007199254740992,l=Math.random()*s&2097151?function(){return xe(Math.random()*s)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(f){var m,a,b,p,d,y=0,w=[],L=new v(u);if(f==null?f=h:se(f,0,Ee),p=Qt(f/U),C)if(crypto.getRandomValues){for(m=crypto.getRandomValues(new Uint32Array(p*=2));y<p;)d=m[y]*131072+(m[y+1]>>>11),d>=9e15?(a=crypto.getRandomValues(new Uint32Array(2)),m[y]=a[0],m[y+1]=a[1]):(w.push(d%1e14),y+=2);y=p/2}else if(crypto.randomBytes){for(m=crypto.randomBytes(p*=7);y<p;)d=(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],d>=9e15?crypto.randomBytes(7).copy(m,y):(w.push(d%1e14),y+=7);y=p/7}else throw C=!1,Error(be+"crypto unavailable");if(!C)for(;y<p;)d=l(),d<9e15&&(w[y++]=d%1e14);for(p=w[--y],f%=U,p&&f&&(d=Xt[U-f],w[y]=xe(p/d)*d);w[y]===0;w.pop(),y--);if(y<0)w=[b=0];else{for(b=-1;w[0]===0;w.splice(0,1),b-=U);for(y=1,d=w[0];d>=10;d/=10,y++);y<U&&(b-=U-y)}return L.e=b,L.c=w,L}}(),v.sum=function(){for(var s=1,l=arguments,f=new v(l[0]);s<l.length;)f=f.plus(l[s++]);return f},t=function(){var s="0123456789";function l(f,m,a,b){for(var p,d=[0],y,w=0,L=f.length;w<L;){for(y=d.length;y--;d[y]*=m);for(d[0]+=b.indexOf(f.charAt(w++)),p=0;p<d.length;p++)d[p]>a-1&&(d[p+1]==null&&(d[p+1]=0),d[p+1]+=d[p]/a|0,d[p]%=a)}return d.reverse()}return function(f,m,a,b,p){var d,y,w,L,M,I,W,H,Y=f.indexOf("."),re=h,Z=o;for(Y>=0&&(L=O,O=0,f=f.replace(".",""),H=new v(m),I=H.pow(f.length-Y),O=L,H.c=l(qe(Me(I.c),I.e,"0"),10,a,s),H.e=H.c.length),W=l(f,m,a,p?(d=T,s):(d=s,T)),w=L=W.length;W[--L]==0;W.pop());if(!W[0])return d.charAt(0);if(Y<0?--w:(I.c=W,I.e=w,I.s=b,I=e(I,H,re,Z,a),W=I.c,M=I.r,w=I.e),y=w+re+1,Y=W[y],L=a/2,M=M||y<0||W[y+1]!=null,M=Z<4?(Y!=null||M)&&(Z==0||Z==(I.s<0?3:2)):Y>L||Y==L&&(Z==4||M||Z==6&&W[y-1]&1||Z==(I.s<0?8:7)),y<1||!W[0])f=M?qe(d.charAt(1),-re,d.charAt(0)):d.charAt(0);else{if(W.length=y,M)for(--a;++W[--y]>a;)W[y]=0,y||(++w,W=[1].concat(W));for(L=W.length;!W[--L];);for(Y=0,f="";Y<=L;f+=d.charAt(W[Y++]));f=qe(f,w,d.charAt(0))}return f}}(),e=function(){function s(m,a,b){var p,d,y,w,L=0,M=m.length,I=a%Xe,W=a/Xe|0;for(m=m.slice();M--;)y=m[M]%Xe,w=m[M]/Xe|0,p=W*y+w*I,d=I*y+p%Xe*Xe+L,L=(d/b|0)+(p/Xe|0)+W*w,m[M]=d%b;return L&&(m=[L].concat(m)),m}function l(m,a,b,p){var d,y;if(b!=p)y=b>p?1:-1;else for(d=y=0;d<b;d++)if(m[d]!=a[d]){y=m[d]>a[d]?1:-1;break}return y}function f(m,a,b,p){for(var d=0;b--;)m[b]-=d,d=m[b]<a[b]?1:0,m[b]=d*p+m[b]-a[b];for(;!m[0]&&m.length>1;m.splice(0,1));}return function(m,a,b,p,d){var y,w,L,M,I,W,H,Y,re,Z,K,he,je,nt,rt,Le,Ie,pe=m.s==a.s?1:-1,de=m.c,ee=a.c;if(!de||!de[0]||!ee||!ee[0])return new v(!m.s||!a.s||(de?ee&&de[0]==ee[0]:!ee)?NaN:de&&de[0]==0||!ee?pe*0:pe/0);for(Y=new v(pe),re=Y.c=[],w=m.e-a.e,pe=b+w+1,d||(d=ke,w=Te(m.e/U)-Te(a.e/U),pe=pe/U|0),L=0;ee[L]==(de[L]||0);L++);if(ee[L]>(de[L]||0)&&w--,pe<0)re.push(1),M=!0;else{for(nt=de.length,Le=ee.length,L=0,pe+=2,I=xe(d/(ee[0]+1)),I>1&&(ee=s(ee,I,d),de=s(de,I,d),Le=ee.length,nt=de.length),je=Le,Z=de.slice(0,Le),K=Z.length;K<Le;Z[K++]=0);Ie=ee.slice(),Ie=[0].concat(Ie),rt=ee[0],ee[1]>=d/2&&rt++;do{if(I=0,y=l(ee,Z,Le,K),y<0){if(he=Z[0],Le!=K&&(he=he*d+(Z[1]||0)),I=xe(he/rt),I>1)for(I>=d&&(I=d-1),W=s(ee,I,d),H=W.length,K=Z.length;l(W,Z,H,K)==1;)I--,f(W,Le<H?Ie:ee,H,d),H=W.length,y=1;else I==0&&(y=I=1),W=ee.slice(),H=W.length;if(H<K&&(W=[0].concat(W)),f(Z,W,K,d),K=Z.length,y==-1)for(;l(ee,Z,Le,K)<1;)I++,f(Z,Le<K?Ie:ee,K,d),K=Z.length}else y===0&&(I++,Z=[0]);re[L++]=I,Z[0]?Z[K++]=de[je]||0:(Z=[de[je]],K=1)}while((je++<nt||Z[0]!=null)&&pe--);M=Z[0]!=null,re[0]||re.splice(0,1)}if(d==ke){for(L=1,pe=re[0];pe>=10;pe/=10,L++);B(Y,b+(Y.e=L+w*U-1)+1,p,M)}else Y.e=w,Y.r=+M;return Y}}();function N(s,l,f,m){var a,b,p,d,y;if(f==null?f=o:se(f,0,8),!s.c)return s.toString();if(a=s.c[0],p=s.e,l==null)y=Me(s.c),y=m==1||m==2&&(p<=g||p>=c)?At(y,p):qe(y,p,"0");else if(s=B(new v(s),l,f),b=s.e,y=Me(s.c),d=y.length,m==1||m==2&&(l<=b||b<=g)){for(;d<l;y+="0",d++);y=At(y,b)}else if(l-=p,y=qe(y,b,"0"),b+1>d){if(--l>0)for(y+=".";l--;y+="0");}else if(l+=b-d,l>0)for(b+1==d&&(y+=".");l--;y+="0");return s.s<0&&a?"-"+y:y}function D(s,l){for(var f,m,a=1,b=new v(s[0]);a<s.length;a++)m=new v(s[a]),(!m.s||(f=it(b,m))===l||f===0&&b.s===l)&&(b=m);return b}function q(s,l,f){for(var m=1,a=l.length;!l[--a];l.pop());for(a=l[0];a>=10;a/=10,m++);return(f=m+f*U-1)>S?s.c=s.e=null:f<E?s.c=[s.e=0]:(s.e=f,s.c=l),s}n=function(){var s=/^(-?)0([xbo])(?=\w[\w.]*$)/i,l=/^([^.]+)\.$/,f=/^\.([^.]+)$/,m=/^-?(Infinity|NaN)$/,a=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(b,p,d,y){var w,L=d?p:p.replace(a,"");if(m.test(L))b.s=isNaN(L)?null:L<0?-1:1;else{if(!d&&(L=L.replace(s,function(M,I,W){return w=(W=W.toLowerCase())=="x"?16:W=="b"?2:8,!y||y==w?I:M}),y&&(w=y,L=L.replace(l,"$1").replace(f,"0.$1")),p!=L))return new v(L,w);if(v.DEBUG)throw Error(be+"Not a"+(y?" base "+y:"")+" number: "+p);b.s=null}b.c=b.e=null}}();function B(s,l,f,m){var a,b,p,d,y,w,L,M=s.c,I=Xt;if(M){e:{for(a=1,d=M[0];d>=10;d/=10,a++);if(b=l-a,b<0)b+=U,p=l,y=M[w=0],L=xe(y/I[a-p-1]%10);else if(w=Qt((b+1)/U),w>=M.length)if(m){for(;M.length<=w;M.push(0));y=L=0,a=1,b%=U,p=b-U+1}else break e;else{for(y=d=M[w],a=1;d>=10;d/=10,a++);b%=U,p=b-U+a,L=p<0?0:xe(y/I[a-p-1]%10)}if(m=m||l<0||M[w+1]!=null||(p<0?y:y%I[a-p-1]),m=f<4?(L||m)&&(f==0||f==(s.s<0?3:2)):L>5||L==5&&(f==4||m||f==6&&(b>0?p>0?y/I[a-p]:0:M[w-1])%10&1||f==(s.s<0?8:7)),l<1||!M[0])return M.length=0,m?(l-=s.e+1,M[0]=I[(U-l%U)%U],s.e=-l||0):M[0]=s.e=0,s;if(b==0?(M.length=w,d=1,w--):(M.length=w+1,d=I[U-b],M[w]=p>0?xe(y/I[a-p]%I[p])*d:0),m)for(;;)if(w==0){for(b=1,p=M[0];p>=10;p/=10,b++);for(p=M[0]+=d,d=1;p>=10;p/=10,d++);b!=d&&(s.e++,M[0]==ke&&(M[0]=1));break}else{if(M[w]+=d,M[w]!=ke)break;M[w--]=0,d=1}for(b=M.length;M[--b]===0;M.pop());}s.e>S?s.c=s.e=null:s.e<E&&(s.c=[s.e=0])}return s}function A(s){var l,f=s.e;return f===null?s.toString():(l=Me(s.c),l=f<=g||f>=c?At(l,f):qe(l,f,"0"),s.s<0?"-"+l:l)}return r.absoluteValue=r.abs=function(){var s=new v(this);return s.s<0&&(s.s=1),s},r.comparedTo=function(s,l){return it(this,new v(s,l))},r.decimalPlaces=r.dp=function(s,l){var f,m,a,b=this;if(s!=null)return se(s,0,Ee),l==null?l=o:se(l,0,8),B(new v(b),s+b.e+1,l);if(!(f=b.c))return null;if(m=((a=f.length-1)-Te(this.e/U))*U,a=f[a])for(;a%10==0;a/=10,m--);return m<0&&(m=0),m},r.dividedBy=r.div=function(s,l){return e(this,new v(s,l),h,o)},r.dividedToIntegerBy=r.idiv=function(s,l){return e(this,new v(s,l),0,1)},r.exponentiatedBy=r.pow=function(s,l){var f,m,a,b,p,d,y,w,L,M=this;if(s=new v(s),s.c&&!s.isInteger())throw Error(be+"Exponent not an integer: "+A(s));if(l!=null&&(l=new v(l)),d=s.e>14,!M.c||!M.c[0]||M.c[0]==1&&!M.e&&M.c.length==1||!s.c||!s.c[0])return L=new v(Math.pow(+A(M),d?s.s*(2-Pt(s)):+A(s))),l?L.mod(l):L;if(y=s.s<0,l){if(l.c?!l.c[0]:!l.s)return new v(NaN);m=!y&&M.isInteger()&&l.isInteger(),m&&(M=M.mod(l))}else{if(s.e>9&&(M.e>0||M.e<-1||(M.e==0?M.c[0]>1||d&&M.c[1]>=24e7:M.c[0]<8e13||d&&M.c[0]<=9999975e7)))return b=M.s<0&&Pt(s)?-0:0,M.e>-1&&(b=1/b),new v(y?1/b:b);O&&(b=Qt(O/U+2))}for(d?(f=new v(.5),y&&(s.s=1),w=Pt(s)):(a=Math.abs(+A(s)),w=a%2),L=new v(u);;){if(w){if(L=L.times(M),!L.c)break;b?L.c.length>b&&(L.c.length=b):m&&(L=L.mod(l))}if(a){if(a=xe(a/2),a===0)break;w=a%2}else if(s=s.times(f),B(s,s.e+1,1),s.e>14)w=Pt(s);else{if(a=+A(s),a===0)break;w=a%2}M=M.times(M),b?M.c&&M.c.length>b&&(M.c.length=b):m&&(M=M.mod(l))}return m?L:(y&&(L=u.div(L)),l?L.mod(l):b?B(L,O,o,p):L)},r.integerValue=function(s){var l=new v(this);return s==null?s=o:se(s,0,8),B(l,l.e+1,s)},r.isEqualTo=r.eq=function(s,l){return it(this,new v(s,l))===0},r.isFinite=function(){return!!this.c},r.isGreaterThan=r.gt=function(s,l){return it(this,new v(s,l))>0},r.isGreaterThanOrEqualTo=r.gte=function(s,l){return(l=it(this,new v(s,l)))===1||l===0},r.isInteger=function(){return!!this.c&&Te(this.e/U)>this.c.length-2},r.isLessThan=r.lt=function(s,l){return it(this,new v(s,l))<0},r.isLessThanOrEqualTo=r.lte=function(s,l){return(l=it(this,new v(s,l)))===-1||l===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,l){var f,m,a,b,p=this,d=p.s;if(s=new v(s,l),l=s.s,!d||!l)return new v(NaN);if(d!=l)return s.s=-l,p.plus(s);var y=p.e/U,w=s.e/U,L=p.c,M=s.c;if(!y||!w){if(!L||!M)return L?(s.s=-l,s):new v(M?p:NaN);if(!L[0]||!M[0])return M[0]?(s.s=-l,s):new v(L[0]?p:o==3?-0:0)}if(y=Te(y),w=Te(w),L=L.slice(),d=y-w){for((b=d<0)?(d=-d,a=L):(w=y,a=M),a.reverse(),l=d;l--;a.push(0));a.reverse()}else for(m=(b=(d=L.length)<(l=M.length))?d:l,d=l=0;l<m;l++)if(L[l]!=M[l]){b=L[l]<M[l];break}if(b&&(a=L,L=M,M=a,s.s=-s.s),l=(m=M.length)-(f=L.length),l>0)for(;l--;L[f++]=0);for(l=ke-1;m>d;){if(L[--m]<M[m]){for(f=m;f&&!L[--f];L[f]=l);--L[f],L[m]+=ke}L[m]-=M[m]}for(;L[0]==0;L.splice(0,1),--w);return L[0]?q(s,L,w):(s.s=o==3?-1:1,s.c=[s.e=0],s)},r.modulo=r.mod=function(s,l){var f,m,a=this;return s=new v(s,l),!a.c||!s.s||s.c&&!s.c[0]?new v(NaN):!s.c||a.c&&!a.c[0]?new v(a):(R==9?(m=s.s,s.s=1,f=e(a,s,0,3),s.s=m,f.s*=m):f=e(a,s,0,R),s=a.minus(f.times(s)),!s.c[0]&&R==1&&(s.s=a.s),s)},r.multipliedBy=r.times=function(s,l){var f,m,a,b,p,d,y,w,L,M,I,W,H,Y,re,Z=this,K=Z.c,he=(s=new v(s,l)).c;if(!K||!he||!K[0]||!he[0])return!Z.s||!s.s||K&&!K[0]&&!he||he&&!he[0]&&!K?s.c=s.e=s.s=null:(s.s*=Z.s,!K||!he?s.c=s.e=null:(s.c=[0],s.e=0)),s;for(m=Te(Z.e/U)+Te(s.e/U),s.s*=Z.s,y=K.length,M=he.length,y<M&&(H=K,K=he,he=H,a=y,y=M,M=a),a=y+M,H=[];a--;H.push(0));for(Y=ke,re=Xe,a=M;--a>=0;){for(f=0,I=he[a]%re,W=he[a]/re|0,p=y,b=a+p;b>a;)w=K[--p]%re,L=K[p]/re|0,d=W*w+L*I,w=I*w+d%re*re+H[b]+f,f=(w/Y|0)+(d/re|0)+W*L,H[b--]=w%Y;H[b]=f}return f?++m:H.splice(0,1),q(s,H,m)},r.negated=function(){var s=new v(this);return s.s=-s.s||null,s},r.plus=function(s,l){var f,m=this,a=m.s;if(s=new v(s,l),l=s.s,!a||!l)return new v(NaN);if(a!=l)return s.s=-l,m.minus(s);var b=m.e/U,p=s.e/U,d=m.c,y=s.c;if(!b||!p){if(!d||!y)return new v(a/0);if(!d[0]||!y[0])return y[0]?s:new v(d[0]?m:a*0)}if(b=Te(b),p=Te(p),d=d.slice(),a=b-p){for(a>0?(p=b,f=y):(a=-a,f=d),f.reverse();a--;f.push(0));f.reverse()}for(a=d.length,l=y.length,a-l<0&&(f=y,y=d,d=f,l=a),a=0;l;)a=(d[--l]=d[l]+y[l]+a)/ke|0,d[l]=ke===d[l]?0:d[l]%ke;return a&&(d=[a].concat(d),++p),q(s,d,p)},r.precision=r.sd=function(s,l){var f,m,a,b=this;if(s!=null&&s!==!!s)return se(s,1,Ee),l==null?l=o:se(l,0,8),B(new v(b),s,l);if(!(f=b.c))return null;if(a=f.length-1,m=a*U+1,a=f[a]){for(;a%10==0;a/=10,m--);for(a=f[0];a>=10;a/=10,m++);}return s&&b.e+1>m&&(m=b.e+1),m},r.shiftedBy=function(s){return se(s,-9007199254740991,Gi),this.times("1e"+s)},r.squareRoot=r.sqrt=function(){var s,l,f,m,a,b=this,p=b.c,d=b.s,y=b.e,w=h+4,L=new v("0.5");if(d!==1||!p||!p[0])return new v(!d||d<0&&(!p||p[0])?NaN:p?b:1/0);if(d=Math.sqrt(+A(b)),d==0||d==1/0?(l=Me(p),(l.length+y)%2==0&&(l+="0"),d=Math.sqrt(+l),y=Te((y+1)/2)-(y<0||y%2),d==1/0?l="5e"+y:(l=d.toExponential(),l=l.slice(0,l.indexOf("e")+1)+y),f=new v(l)):f=new v(d+""),f.c[0]){for(y=f.e,d=y+w,d<3&&(d=0);;)if(a=f,f=L.times(a.plus(e(b,a,w,1))),Me(a.c).slice(0,d)===(l=Me(f.c)).slice(0,d))if(f.e<y&&--d,l=l.slice(d-3,d+1),l=="9999"||!m&&l=="4999"){if(!m&&(B(a,a.e+h+2,0),a.times(a).eq(b))){f=a;break}w+=4,d+=4,m=1}else{(!+l||!+l.slice(1)&&l.charAt(0)=="5")&&(B(f,f.e+h+2,1),s=!f.times(f).eq(b));break}}return B(f,f.e+h+1,o,s)},r.toExponential=function(s,l){return s!=null&&(se(s,0,Ee),s++),N(this,s,l,1)},r.toFixed=function(s,l){return s!=null&&(se(s,0,Ee),s=s+this.e+1),N(this,s,l)},r.toFormat=function(s,l,f){var m,a=this;if(f==null)s!=null&&l&&typeof l=="object"?(f=l,l=null):s&&typeof s=="object"?(f=s,s=l=null):f=z;else if(typeof f!="object")throw Error(be+"Argument not an object: "+f);if(m=a.toFixed(s,l),a.c){var b,p=m.split("."),d=+f.groupSize,y=+f.secondaryGroupSize,w=f.groupSeparator||"",L=p[0],M=p[1],I=a.s<0,W=I?L.slice(1):L,H=W.length;if(y&&(b=d,d=y,y=b,H-=b),d>0&&H>0){for(b=H%d||d,L=W.substr(0,b);b<H;b+=d)L+=w+W.substr(b,d);y>0&&(L+=w+W.slice(b)),I&&(L="-"+L)}m=M?L+(f.decimalSeparator||"")+((y=+f.fractionGroupSize)?M.replace(new RegExp("\\d{"+y+"}\\B","g"),"$&"+(f.fractionGroupSeparator||"")):M):L}return(f.prefix||"")+m+(f.suffix||"")},r.toFraction=function(s){var l,f,m,a,b,p,d,y,w,L,M,I,W=this,H=W.c;if(s!=null&&(d=new v(s),!d.isInteger()&&(d.c||d.s!==1)||d.lt(u)))throw Error(be+"Argument "+(d.isInteger()?"out of range: ":"not an integer: ")+A(d));if(!H)return new v(W);for(l=new v(u),w=f=new v(u),m=y=new v(u),I=Me(H),b=l.e=I.length-W.e-1,l.c[0]=Xt[(p=b%U)<0?U+p:p],s=!s||d.comparedTo(l)>0?b>0?l:w:d,p=S,S=1/0,d=new v(I),y.c[0]=0;L=e(d,l,0,1),a=f.plus(L.times(m)),a.comparedTo(s)!=1;)f=m,m=a,w=y.plus(L.times(a=w)),y=a,l=d.minus(L.times(a=l)),d=a;return a=e(s.minus(f),m,0,1),y=y.plus(a.times(w)),f=f.plus(a.times(m)),y.s=w.s=W.s,b=b*2,M=e(w,m,b,o).minus(W).abs().comparedTo(e(y,f,b,o).minus(W).abs())<1?[w,m]:[y,f],S=p,M},r.toNumber=function(){return+A(this)},r.toPrecision=function(s,l){return s!=null&&se(s,1,Ee),N(this,s,l,2)},r.toString=function(s){var l,f=this,m=f.s,a=f.e;return a===null?m?(l="Infinity",m<0&&(l="-"+l)):l="NaN":(s==null?l=a<=g||a>=c?At(Me(f.c),a):qe(Me(f.c),a,"0"):s===10&&k?(f=B(new v(f),h+a+1,o),l=qe(Me(f.c),f.e,"0")):(se(s,2,T.length,"Base"),l=t(qe(Me(f.c),a,"0"),10,s,m,!0)),m<0&&f.c[0]&&(l="-"+l)),l},r.valueOf=r.toJSON=function(){return A(this)},r._isBigNumber=!0,r[Symbol.toStringTag]="BigNumber",r[Symbol.for("nodejs.util.inspect.custom")]=r.valueOf,i!=null&&v.set(i),v}function Te(i){var e=i|0;return i>0||i===e?e:e-1}function Me(i){for(var e,t,n=1,r=i.length,u=i[0]+"";n<r;){for(e=i[n++]+"",t=U-e.length;t--;e="0"+e);u+=e}for(r=u.length;u.charCodeAt(--r)===48;);return u.slice(0,r+1||1)}function it(i,e){var t,n,r=i.c,u=e.c,h=i.s,o=e.s,g=i.e,c=e.e;if(!h||!o)return null;if(t=r&&!r[0],n=u&&!u[0],t||n)return t?n?0:-o:h;if(h!=o)return h;if(t=h<0,n=g==c,!r||!u)return n?0:!r^t?1:-1;if(!n)return g>c^t?1:-1;for(o=(g=r.length)<(c=u.length)?g:c,h=0;h<o;h++)if(r[h]!=u[h])return r[h]>u[h]^t?1:-1;return g==c?0:g>c^t?1:-1}function se(i,e,t,n){if(i<e||i>t||i!==xe(i))throw Error(be+(n||"Argument")+(typeof i=="number"?i<e||i>t?" out of range: ":" not an integer: ":" not a primitive number: ")+String(i))}function Pt(i){var e=i.c.length-1;return Te(i.e/U)==e&&i.c[e]%2!=0}function At(i,e){return(i.length>1?i.charAt(0)+"."+i.slice(1):i)+(e<0?"e":"e+")+e}function qe(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 Pe=Di(),xr=class{constructor(i){P(this,"key");P(this,"left",null);P(this,"right",null);this.key=i}},bt=class extends xr{constructor(i){super(i)}},Tr=class{constructor(){P(this,"size",0);P(this,"modificationCount",0);P(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,u=null,h=e;const o=this.compare;let g;for(;;)if(g=o(h.key,i),g>0){let c=h.left;if(c==null||(g=o(c.key,i),g>0&&(h.left=c.right,c.right=h,h=c,c=h.left,c==null)))break;t==null?n=h:t.left=h,t=h,h=c}else if(g<0){let c=h.right;if(c==null||(g=o(c.key,i),g<0&&(h.right=c.left,c.left=h,h=c,c=h.right,c==null)))break;r==null?u=h:r.right=h,r=h,h=c}else break;return r!=null&&(r.right=h.left,h.left=u),t!=null&&(t.left=h.right,h.right=n),this.root!==h&&(this.root=h,this.splayCount++),g}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 u=t.right;t=this.splayMax(r),t.right=u,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)}}},It=class Tt extends Tr{constructor(t,n){super();P(this,"root",null);P(this,"compare");P(this,"validKey");P(this,rn,"[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 bt(t),n),this}addAndReturn(t){const n=this.splay(t);return n!=0&&this.addNewRoot(new bt(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 u=r.right;for(;u!=null;)r=u,u=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 u=r.left;for(;u!=null;)r=u,u=r.left;return r.key}retainAll(t){const n=new Tt(this.compare,this.validKey),r=this.modificationCount;for(const u of t){if(r!=this.modificationCount)throw"Concurrent modification during iteration.";this.validKey(u)&&this.splay(u)==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 Tt(this.compare,this.validKey);for(const r of this)t.has(r)&&n.add(r);return n}difference(t){const n=new Tt(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 Tt(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(u,h){let o,g;do{if(o=u.left,g=u.right,o!=null){const c=new bt(o.key);h.left=c,n(o,c)}if(g!=null){const c=new bt(g.key);h.right=c,u=g,h=c}}while(g!=null)}const r=new bt(t.key);return n(t,r),r}toSet(){return this.clone()}entries(){return new Cr(this.wrap())}keys(){return this[Symbol.iterator]()}values(){return this[Symbol.iterator]()}[(sn=Symbol.iterator,rn=Symbol.toStringTag,sn)](){return new Mr(this.wrap())}},Ui=class{constructor(i){P(this,"tree");P(this,"path",new Array);P(this,"modificationCount",null);P(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}},Mr=class extends Ui{getValue(i){return i.key}},Cr=class extends Ui{getValue(i){return[i.key,i.key]}},qi=i=>()=>i,Jt=i=>{const e=i?(t,n)=>n.minus(t).abs().isLessThanOrEqualTo(i):qi(!1);return(t,n)=>e(t,n)?0:t.comparedTo(n)};function Nr(i){const e=i?(t,n,r,u,h)=>t.exponentiatedBy(2).isLessThanOrEqualTo(u.minus(n).exponentiatedBy(2).plus(h.minus(r).exponentiatedBy(2)).times(i)):qi(!1);return(t,n,r)=>{const u=t.x,h=t.y,o=r.x,g=r.y,c=h.minus(g).times(n.x.minus(o)).minus(u.minus(o).times(n.y.minus(g)));return e(c,u,h,o,g)?0:c.comparedTo(0)}}var kr=i=>i,Or=i=>{if(i){const e=new It(Jt(i)),t=new It(Jt(i)),n=(u,h)=>h.addAndReturn(u),r=u=>({x:n(u.x,e),y:n(u.y,t)});return r({x:new Pe(0),y:new Pe(0)}),r}return kr},$t=i=>({set:e=>{Fe=$t(e)},reset:()=>$t(i),compare:Jt(i),snap:Or(i),orient:Nr(i)}),Fe=$t(),wt=(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),ei=(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,u=i.ur.y.isLessThan(e.ur.y)?i.ur.y:e.ur.y;return{ll:{x:t,y:r},ur:{x:n,y:u}}},Bt=(i,e)=>i.x.times(e.y).minus(i.y.times(e.x)),Fi=(i,e)=>i.x.times(e.x).plus(i.y.times(e.y)),zt=i=>Fi(i,i).sqrt(),Rr=(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 Bt(r,n).div(zt(r)).div(zt(n))},Pr=(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 Fi(r,n).div(zt(r)).div(zt(n))},ji=(i,e,t)=>e.y.isZero()?null:{x:i.x.plus(e.x.div(e.y).times(t.minus(i.y))),y:t},Zi=(i,e,t)=>e.x.isZero()?null:{x:t,y:i.y.plus(e.y.div(e.x).times(t.minus(i.x)))},Ar=(i,e,t,n)=>{if(e.x.isZero())return Zi(t,n,i.x);if(n.x.isZero())return Zi(i,e,t.x);if(e.y.isZero())return ji(t,n,i.y);if(n.y.isZero())return ji(i,e,t.y);const r=Bt(e,n);if(r.isZero())return null;const u={x:t.x.minus(i.x),y:t.y.minus(i.y)},h=Bt(u,e).div(r),o=Bt(u,n).div(r),g=i.x.plus(o.times(e.x)),c=t.x.plus(h.times(n.x)),E=i.y.plus(o.times(e.y)),S=t.y.plus(h.times(n.y)),C=g.plus(c).div(2),R=E.plus(S).div(2);return{x:C,y:R}},Ae=class mn{constructor(e,t){P(this,"point");P(this,"isLeft");P(this,"segment");P(this,"otherSE");P(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=mn.comparePoints(e.point,t.point);return n!==0?n:(e.point!==t.point&&e.link(t),e.isLeft!==t.isLeft?e.isLeft?1:-1:Gt.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 u=t[n];this.point.events.push(u),u.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 u=this.point.events[r];u.consumedBy===void 0&&n.otherSE.point.events===u.otherSE.point.events&&n.segment.consume(u.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 u=r.otherSE;t.set(r,{sine:Rr(this.point,e.point,u.point),cosine:Pr(this.point,e.point,u.point)})};return(r,u)=>{t.has(r)||n(r),t.has(u)||n(u);const{sine:h,cosine:o}=t.get(r),{sine:g,cosine:c}=t.get(u);return h.isGreaterThanOrEqualTo(0)&&g.isGreaterThanOrEqualTo(0)?o.isLessThan(c)?1:o.isGreaterThan(c)?-1:0:h.isLessThan(0)&&g.isLessThan(0)?o.isLessThan(c)?-1:o.isGreaterThan(c)?1:0:g.isLessThan(h)?-1:g.isGreaterThan(h)?1:0}}},Ir=class hi{constructor(e){P(this,"events");P(this,"poly");P(this,"_isExteriorRing");P(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 u=e[n];if(!u.isInResult()||u.ringOut)continue;let h=null,o=u.leftSE,g=u.rightSE;const c=[o],E=o.point,S=[];for(;h=o,o=g,c.push(o),o.point!==E;)for(;;){const C=o.getAvailableLinkedEvents();if(C.length===0){const z=c[0].point,T=c[c.length-1].point;throw new Error(`Unable to complete output ring starting at [${z.x}, ${z.y}]. Last matching segment found ends at [${T.x}, ${T.y}].`)}if(C.length===1){g=C[0].otherSE;break}let R=null;for(let z=0,T=S.length;z<T;z++)if(S[z].point===o.point){R=z;break}if(R!==null){const z=S.splice(R)[0],T=c.splice(z.index);T.unshift(T[0].otherSE),t.push(new hi(T.reverse()));continue}S.push({index:c.length,point:o.point});const O=o.getLeftmostComparator(h);g=C.sort(O)[0].otherSE;break}t.push(new hi(c))}return t}getGeom(){let e=this.events[0].point;const t=[e];for(let c=1,E=this.events.length-1;c<E;c++){const S=this.events[c].point,C=this.events[c+1].point;Fe.orient(S,e,C)!==0&&(t.push(S),e=S)}if(t.length===1)return null;const n=t[0],r=t[1];Fe.orient(n,e,r)===0&&t.shift(),t.push(t[0]);const u=this.isExteriorRing()?1:-1,h=this.isExteriorRing()?0:t.length-1,o=this.isExteriorRing()?t.length:-1,g=[];for(let c=h;c!=o;c+=u)g.push([t[c].x.toNumber(),t[c].y.toNumber()]);return g}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,u;let e=this.events[0];for(let h=1,o=this.events.length;h<o;h++){const g=this.events[h];Ae.compare(e,g)>0&&(e=g)}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:(u=t.ringOut)==null?void 0:u.enclosingRing();t=n.prevInResult(),n=t?t.prevInResult():null}}},Hi=class{constructor(i){P(this,"exteriorRing");P(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}},Br=class{constructor(i){P(this,"rings");P(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 u=i[n];if(!u.poly)if(u.isExteriorRing())e.push(new Hi(u));else{const h=u.enclosingRing();h!=null&&h.poly||e.push(new Hi(h)),(t=h==null?void 0:h.poly)==null||t.addInterior(u)}}return e}},zr=class{constructor(i,e=Gt.compare){P(this,"queue");P(this,"tree");P(this,"segments");this.queue=i,this.tree=new It(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 u=null;if(n){const o=n.getIntersection(e);if(o!==null&&(e.isAnEndpoint(o)||(u=o),!n.isAnEndpoint(o))){const g=this._splitSafely(n,o);for(let c=0,E=g.length;c<E;c++)t.push(g[c])}}let h=null;if(r){const o=r.getIntersection(e);if(o!==null&&(e.isAnEndpoint(o)||(h=o),!r.isAnEndpoint(o))){const g=this._splitSafely(r,o);for(let c=0,E=g.length;c<E;c++)t.push(g[c])}}if(u!==null||h!==null){let o=null;u===null?o=h:h===null?o=u:o=Ae.comparePoints(u,h)<=0?u:h,this.queue.delete(e.rightSE),t.push(e.rightSE);const g=e.split(o);for(let c=0,E=g.length;c<E;c++)t.push(g[c])}t.length>0?(this.tree.delete(e),t.push(i)):(this.segments.push(e),e.prev=n)}else{if(n&&r){const u=n.getIntersection(r);if(u!==null){if(!n.isAnEndpoint(u)){const h=this._splitSafely(n,u);for(let o=0,g=h.length;o<g;o++)t.push(h[o])}if(!r.isAnEndpoint(u)){const h=this._splitSafely(r,u);for(let o=0,g=h.length;o<g;o++)t.push(h[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}},Wr=class{constructor(){P(this,"type");P(this,"numMultiPolys")}run(i,e,t){Et.type=i;const n=[new Ki(e,!0)];for(let c=0,E=t.length;c<E;c++)n.push(new Ki(t[c],!1));if(Et.numMultiPolys=n.length,Et.type==="difference"){const c=n[0];let E=1;for(;E<n.length;)ei(n[E].bbox,c.bbox)!==null?E++:n.splice(E,1)}if(Et.type==="intersection")for(let c=0,E=n.length;c<E;c++){const S=n[c];for(let C=c+1,R=n.length;C<R;C++)if(ei(S.bbox,n[C].bbox)===null)return[]}const r=new It(Ae.compare);for(let c=0,E=n.length;c<E;c++){const S=n[c].getSweepEvents();for(let C=0,R=S.length;C<R;C++)r.add(S[C])}const u=new zr(r);let h=null;for(r.size!=0&&(h=r.first(),r.delete(h));h;){const c=u.process(h);for(let E=0,S=c.length;E<S;E++){const C=c[E];C.consumedBy===void 0&&r.add(C)}r.size!=0?(h=r.first(),r.delete(h)):h=null}Fe.reset();const o=Ir.factory(u.segments);return new Br(o).getGeom()}},Et=new Wr,Wt=Et,Gr=0,Gt=class Ft{constructor(e,t,n,r){P(this,"id");P(this,"leftSE");P(this,"rightSE");P(this,"rings");P(this,"windings");P(this,"ringOut");P(this,"consumedBy");P(this,"prev");P(this,"_prevInResult");P(this,"_beforeState");P(this,"_afterState");P(this,"_isInResult");this.id=++Gr,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,u=e.rightSE.point.x,h=t.rightSE.point.x;if(h.isLessThan(n))return 1;if(u.isLessThan(r))return-1;const o=e.leftSE.point.y,g=t.leftSE.point.y,c=e.rightSE.point.y,E=t.rightSE.point.y;if(n.isLessThan(r)){if(g.isLessThan(o)&&g.isLessThan(c))return 1;if(g.isGreaterThan(o)&&g.isGreaterThan(c))return-1;const S=e.comparePoint(t.leftSE.point);if(S<0)return 1;if(S>0)return-1;const C=t.comparePoint(e.rightSE.point);return C!==0?C:-1}if(n.isGreaterThan(r)){if(o.isLessThan(g)&&o.isLessThan(E))return-1;if(o.isGreaterThan(g)&&o.isGreaterThan(E))return 1;const S=t.comparePoint(e.leftSE.point);if(S!==0)return S;const C=e.comparePoint(t.rightSE.point);return C<0?1:C>0?-1:1}if(o.isLessThan(g))return-1;if(o.isGreaterThan(g))return 1;if(u.isLessThan(h)){const S=t.comparePoint(e.rightSE.point);if(S!==0)return S}if(u.isGreaterThan(h)){const S=e.comparePoint(t.rightSE.point);if(S<0)return 1;if(S>0)return-1}if(!u.eq(h)){const S=c.minus(o),C=u.minus(n),R=E.minus(g),O=h.minus(r);if(S.isGreaterThan(C)&&R.isLessThan(O))return 1;if(S.isLessThan(C)&&R.isGreaterThan(O))return-1}return u.isGreaterThan(h)?1:u.isLessThan(h)||c.isLessThan(E)?-1:c.isGreaterThan(E)?1:e.id<t.id?-1:e.id>t.id?1:0}static fromRing(e,t,n){let r,u,h;const o=Ae.comparePoints(e,t);if(o<0)r=e,u=t,h=1;else if(o>0)r=t,u=e,h=-1;else throw new Error(`Tried to create degenerate segment at [${e.x}, ${e.y}]`);const g=new Ae(r,!0),c=new Ae(u,!1);return new Ft(g,c,[n],[h])}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 Fe.orient(this.leftSE.point,e,this.rightSE.point)}getIntersection(e){const t=this.bbox(),n=e.bbox(),r=ei(t,n);if(r===null)return null;const u=this.leftSE.point,h=this.rightSE.point,o=e.leftSE.point,g=e.rightSE.point,c=wt(t,o)&&this.comparePoint(o)===0,E=wt(n,u)&&e.comparePoint(u)===0,S=wt(t,g)&&this.comparePoint(g)===0,C=wt(n,h)&&e.comparePoint(h)===0;if(E&&c)return C&&!S?h:!C&&S?g:null;if(E)return S&&u.x.eq(g.x)&&u.y.eq(g.y)?null:u;if(c)return C&&h.x.eq(o.x)&&h.y.eq(o.y)?null:o;if(C&&S)return null;if(C)return h;if(S)return g;const R=Ar(u,this.vector(),o,e.vector());return R===null||!wt(r,R)?null:Fe.snap(R)}split(e){const t=[],n=e.events!==void 0,r=new Ae(e,!0),u=new Ae(e,!1),h=this.rightSE;this.replaceRightSE(u),t.push(u),t.push(r);const o=new Ft(r,h,this.rings.slice(),this.windings.slice());return Ae.comparePoints(o.leftSE.point,o.rightSE.point)>0&&o.swapEvents(),Ae.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),n&&(r.checkForConsuming(),u.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=Ft.compare(t,n);if(r!==0){if(r>0){const u=t;t=n,n=u}if(t.prev===n){const u=t;t=n,n=u}for(let u=0,h=n.rings.length;u<h;u++){const o=n.rings[u],g=n.windings[u],c=t.rings.indexOf(o);c===-1?(t.rings.push(o),t.windings.push(g)):t.windings[c]+=g}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,g=this.rings.length;o<g;o++){const c=this.rings[o],E=this.windings[o],S=t.indexOf(c);S===-1?(t.push(c),n.push(E)):n[S]+=E}const u=[],h=[];for(let o=0,g=t.length;o<g;o++){if(n[o]===0)continue;const c=t[o],E=c.poly;if(h.indexOf(E)===-1)if(c.isExterior)u.push(E);else{h.indexOf(E)===-1&&h.push(E);const S=u.indexOf(c.poly);S!==-1&&u.splice(S,1)}}for(let o=0,g=u.length;o<g;o++){const c=u[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}},Vi=class{constructor(i,e,t){P(this,"poly");P(this,"isExterior");P(this,"segments");P(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=Fe.snap({x:new Pe(i[0][0]),y:new Pe(i[0][1])});this.bbox={ll:{x:n.x,y:n.y},ur:{x:n.x,y:n.y}};let r=n;for(let u=1,h=i.length;u<h;u++){if(typeof i[u][0]!="number"||typeof i[u][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");const o=Fe.snap({x:new Pe(i[u][0]),y:new Pe(i[u][1])});o.x.eq(r.x)&&o.y.eq(r.y)||(this.segments.push(Gt.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(Gt.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}},Dr=class{constructor(i,e){P(this,"multiPoly");P(this,"exteriorRing");P(this,"interiorRings");P(this,"bbox");if(!Array.isArray(i))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");this.exteriorRing=new Vi(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 Vi(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,u=n.length;r<u;r++)i.push(n[r])}return i}},Ki=class{constructor(i,e){P(this,"isSubject");P(this,"polys");P(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 Pe(Number.POSITIVE_INFINITY),y:new Pe(Number.POSITIVE_INFINITY)},ur:{x:new Pe(Number.NEGATIVE_INFINITY),y:new Pe(Number.NEGATIVE_INFINITY)}};for(let t=0,n=i.length;t<n;t++){const r=new Dr(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,u=n.length;r<u;r++)i.push(n[r])}return i}},Ur=(i,...e)=>Wt.run("union",i,e),qr=(i,...e)=>Wt.run("difference",i,e);Fe.set;function Yi(i,e,t){if(i!==null)for(var n,r,u,h,o,g,c,E=0,S=0,C,R=i.type,O=R==="FeatureCollection",z=R==="Feature",T=O?i.features.length:1,k=0;k<T;k++){c=O?i.features[k].geometry:z?i.geometry:i,C=c?c.type==="GeometryCollection":!1,o=C?c.geometries.length:1;for(var v=0;v<o;v++){var N=0,D=0;if(h=C?c.geometries[v]:c,h!==null){g=h.coordinates;var q=h.type;switch(E=0,q){case null:break;case"Point":if(e(g,S,k,N,D)===!1)return!1;S++,N++;break;case"LineString":case"MultiPoint":for(n=0;n<g.length;n++){if(e(g[n],S,k,N,D)===!1)return!1;S++,q==="MultiPoint"&&N++}q==="LineString"&&N++;break;case"Polygon":case"MultiLineString":for(n=0;n<g.length;n++){for(r=0;r<g[n].length-E;r++){if(e(g[n][r],S,k,N,D)===!1)return!1;S++}q==="MultiLineString"&&N++,q==="Polygon"&&D++}q==="Polygon"&&N++;break;case"MultiPolygon":for(n=0;n<g.length;n++){for(D=0,r=0;r<g[n].length;r++){for(u=0;u<g[n][r].length-E;u++){if(e(g[n][r][u],S,k,N,D)===!1)return!1;S++}D++}N++}break;case"GeometryCollection":for(n=0;n<h.geometries.length;n++)if(Yi(h.geometries[n],e)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function ti(i,e){var t,n,r,u,h,o,g,c,E,S,C=0,R=i.type==="FeatureCollection",O=i.type==="Feature",z=R?i.features.length:1;for(t=0;t<z;t++){for(o=R?i.features[t].geometry:O?i.geometry:i,c=R?i.features[t].properties:O?i.properties:{},E=R?i.features[t].bbox:O?i.bbox:void 0,S=R?i.features[t].id:O?i.id:void 0,g=o?o.type==="GeometryCollection":!1,h=g?o.geometries.length:1,r=0;r<h;r++){if(u=g?o.geometries[r]:o,u===null){if(e(null,C,c,E,S)===!1)return!1;continue}switch(u.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(e(u,C,c,E,S)===!1)return!1;break}case"GeometryCollection":{for(n=0;n<u.geometries.length;n++)if(e(u.geometries[n],C,c,E,S)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}C++}}function Fr(i,e){ti(i,function(t,n,r,u,h){var o=t===null?null:t.type;switch(o){case null:case"Point":case"LineString":case"Polygon":return e(yt(t,r,{bbox:u,id:h}),n,0)===!1?!1:void 0}var g;switch(o){case"MultiPoint":g="Point";break;case"MultiLineString":g="LineString";break;case"MultiPolygon":g="Polygon";break}for(var c=0;c<t.coordinates.length;c++){var E=t.coordinates[c],S={type:g,coordinates:E};if(e(yt(S,r),n,c)===!1)return!1}})}function jr(i,e={}){const t=[];if(ti(i,r=>{t.push(r.coordinates)}),t.length<2)throw new Error("Must have at least 2 geometries");const n=Ur(t[0],...t.slice(1));return n.length===0?null:n.length===1?Yt(n[0],e.properties):zi(n,e.properties)}var Qi=jr;function Zr(i,e={}){if(i.bbox!=null&&e.recompute!==!0)return i.bbox;const t=[1/0,1/0,-1/0,-1/0];return Yi(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 Xi=Zr;function Hr(i){const e=[];if(ti(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=qr(e[0],...e.slice(1));return n.length===0?null:n.length===1?Yt(n[0],t):zi(n,t)}var Vr=Hr;function Kr(i){if(!i)throw new Error("geojson is required");var e=[];return Fr(i,function(t){e.push(t)}),vt(e)}var Yr=Kr;function Ji(i,e){const t=Vr(vt([Yt([[[180,90],[-180,90],[-180,-90],[180,-90],[180,90]]]),i]));if(!t)return;t.properties={isMask:!0};const n=Rt(Xi(i)),r=(n[2]-n[0])/360/1e3,u=n[0]<-180,h=n[2]>180,o=Yr(i);if(o.features.length>1&&(u||h))for(const g of o.features){const c=Rt(Xi(g));if(h&&c[0]<-180+r)for(const E of g.geometry.coordinates)for(const S of E)S[0]+=360-r;if(u&&c[2]>180-r)for(const E of g.geometry.coordinates)for(const S of E)S[0]-=360-r}e(vt([o.features.length<2?i:Qi(o)??i,t]))}const $i={fill:{paint:{"fill-color":"#000","fill-opacity":.1},filter:["all",["==",["geometry-type"],"Polygon"],["has","isMask"]]},line:{layout:{"line-cap":"square"},paint:{"line-width":["case",["==",["geometry-type"],"Polygon"],2,3],"line-dasharray":[1,1],"line-color":"#3170fe"},filter:["!",["has","isMask"]]}},Dt="mtlr-gc-full-geom",en="mtlr-gc-full-geom-fill",tn="mtlr-gc-full-geom-line";function nn(i,e,t=!0,n=!0,r={},u={},h=$i){let o;const g=[];let c,E,S;function C(){if(!i.loaded){i.once("load",C);return}const T=h?h===!0?$i:h:void 0;if(!(T!=null&&T.fill)&&!(T!=null&&T.line))return;const k=i.getSource(Dt);if(k)k.setData(S??vt([]));else if(S)i.addSource(Dt,{type:"geojson",data:S});else return;!i.getLayer(en)&&(T!=null&&T.fill)&&i.addLayer({...T==null?void 0:T.fill,id:en,type:"fill",source:Dt}),!i.getLayer(tn)&&(T!=null&&T.line)&&i.addLayer({...T==null?void 0:T.line,id:tn,type:"line",source:Dt})}function R(T){S=T,C()}i.on("styledata",()=>{setTimeout(()=>{S&&C()})});const O=T=>{o==null||o({type:"mapClick",coordinates:[T.lngLat.lng,T.lngLat.lat]})};function z(T=!1){if(!e)throw new Error;const k=document.createElement("div");return T&&k.classList.add("marker-interactive"),new $n({props:{displayIn:"maplibre"},target:k}),new e.Marker({element:k,offset:[1,-13]})}return{setEventHandler(T){T?(o=T,i.on("click",O)):(o=void 0,i.off("click",O))},flyTo(T,k){i.flyTo({center:T,...k?{zoom:k}:{},...r})},fitBounds(T,k,v){i.fitBounds([[T[0],T[1]],[T[2],T[3]]],{padding:k,...v?{maxZoom:v}:{},...u})},indicateReverse(T){i.getCanvasContainer().style.cursor=T?"crosshair":""},setReverseMarker(T){!e||!t||(E?T?E.setLngLat(T):(E.remove(),E=void 0):T&&(t instanceof Function?E=t(i)??void 0:(E=(typeof t=="object"?new e.Marker(t):z()).setLngLat(T).addTo(i),E.getElement().classList.add("marker-reverse"))))},setFeatures(T,k,v){for(const N of g)N.remove();if(g.length=0,R(void 0),!!e){e:if(k){let N=!1;if(k.geometry.type==="GeometryCollection"){const D=k.geometry.geometries.filter(q=>q.type==="Polygon"||q.type==="MultiPolygon");t:if(D.length>0){const q=Qi(vt(D.map(B=>yt(B))));if(!q)break t;Ji({...k,geometry:q.geometry},R),N=!0}else{const q=k.geometry.geometries.filter(B=>B.type==="LineString"||B.type==="MultiLineString");q.length>0&&(R({...k,geometry:{type:"GeometryCollection",geometries:q}}),N=!0)}}if(!N){if(k.geometry.type==="Polygon"||k.geometry.type==="MultiPolygon")Ji(k,R);else if(k.geometry.type==="LineString"||k.geometry.type==="MultiLineString"){R(k);break e}}if(!v&&k.geometry.type!=="Point")break e;if(t instanceof Function){const D=t(i,k);D&&g.push(D)}else t&&g.push(typeof t=="object"?new e.Marker(t):z().setLngLat(k.center).addTo(i))}if(n)for(const N of T??[]){if(N===k)continue;let D;if(n instanceof Function){if(D=n(i,N),!D)continue}else D=(typeof n=="object"?new e.Marker(n):z(!0)).setLngLat(N.center).setPopup(new e.Popup({offset:[1,-27],closeButton:!1,closeOnMove:!0,className:"maptiler-gc-popup"}).setText(N.place_type[0]==="reverse"?N.place_name:N.place_name.replace(/,.*/,""))).addTo(i);const q=D.getElement();q.addEventListener("click",B=>{B.stopPropagation(),o==null||o({type:"markerClick",id:N.id})}),q.addEventListener("mouseenter",()=>{o==null||o({type:"markerMouseEnter",id:N.id}),D.togglePopup()}),q.addEventListener("mouseleave",()=>{o==null||o({type:"markerMouseLeave",id:N.id}),D.togglePopup()}),g.push(D)}}},setSelectedMarker(T){c&&c.getElement().classList.toggle("marker-selected",!1),c=T>-1?g[T]:void 0,c==null||c.getElement().classList.toggle("marker-selected",!0)},getCenterAndZoom(){const T=i.getCenter();return[i.getZoom(),T.lng,T.lat]}}}function Qr(i,e,t){var O,z;class n{constructor(k,v){P(this,"type");P(this,"target");this.type=v,this.target=k}}class r extends n{constructor(v,N){super(v,"select");P(this,"feature");Object.assign(this,N)}}class u extends n{constructor(v,N){super(v,"featureslisted");P(this,"features");this.features=N}}class h extends n{constructor(v,N){super(v,"featuresmarked");P(this,"features");this.features=N}}class o extends n{constructor(v,N){super(v,"optionsvisibilitychange");P(this,"optionsVisible");this.optionsVisible=N}}class g extends n{constructor(v,N){super(v,"pick");P(this,"feature");this.feature=N}}class c extends n{constructor(v,N){super(v,"querychange");P(this,"query");this.query=N}}class E extends n{constructor(v,N,D){super(v,"response");P(this,"url");P(this,"featureCollection");this.url=N,this.featureCollection=D}}class S extends n{constructor(v,N){super(v,"reversetoggle");P(this,"reverse");this.reverse=N}}class C extends i{constructor(v={}){super();fi(this,O);fi(this,z);ci(this,z,v)}onAddInt(v){const N=document.createElement("div");N.className="mapboxgl-ctrl-geocoder mapboxgl-ctrl maplibregl-ctrl-geocoder maplibregl-ctrl mapboxgl-ctrl-group";const{marker:D,showResultMarkers:q,flyTo:B,fullGeometryStyle:A,...s}=fe(this,z),l=typeof B=="boolean"?{}:B,m={mapController:nn(v,e,D,q,l,l,A),flyTo:B===void 0?!0:!!B,apiKey:"",...t==null?void 0:t(v,N),...s};if(!m.apiKey)throw new Error("no apiKey provided");return ci(this,O,new _r({target:N,props:m})),fe(this,O).$on("select",a=>{this.fire(new r(this,a.detail))}),fe(this,O).$on("pick",a=>{this.fire(new g(this,a.detail.feature))}),fe(this,O).$on("featureslisted",a=>{this.fire(new u(this,a.detail.features))}),fe(this,O).$on("featuresmarked",a=>{this.fire(new h(this,a.detail.features))}),fe(this,O).$on("response",a=>{this.fire(new E(this,a.detail.url,a.detail.featureCollection))}),fe(this,O).$on("optionsvisibilitychange",a=>{this.fire(new o(this,a.detail.optionsVisible))}),fe(this,O).$on("reversetoggle",a=>{this.fire(new S(this,a.detail.reverse))}),fe(this,O).$on("querychange",a=>{this.fire(new c(this,a.detail.query))}),N}on(v,N){return super.on(v,N)}once(v,N){return super.once(v,N)}off(v,N){return super.off(v,N)}listens(v){return super.listens(v)}setOptions(v){var s;Object.assign(fe(this,z),v);const{marker:N,showResultMarkers:D,flyTo:q,fullGeometryStyle:B,...A}=fe(this,z);(s=fe(this,O))==null||s.$set(A)}setQuery(v,N=!0){var D;(D=fe(this,O))==null||D.setQuery(v,N)}clearMap(){var v;(v=fe(this,O))==null||v.clearMap()}clearList(){var v;(v=fe(this,O))==null||v.clearList()}setReverseMode(v){var N;(N=fe(this,O))==null||N.$set({reverseActive:v})}focus(v){var N;(N=fe(this,O))==null||N.focus(v)}blur(){var v;(v=fe(this,O))==null||v.blur()}onRemove(){var v;(v=fe(this,O))==null||v.$destroy()}}return O=new WeakMap,z=new WeakMap,{MapLibreBasedGeocodingControl:C,events:{SelectEvent:r,FeaturesListedEvent:u,FeaturesMarkedEvent:h,OptionsVisibilityChangeEvent:o,PickEvent:g,QueryChangeEvent:c,ResponseEvent:E,ReverseToggleEvent:S}}}const{MapLibreBasedGeocodingControl:Xr,events:Je}=Qr(ct.Evented,ct);class Jr extends Xr{onAdd(e){return super.onAddInt(e)}}const $r=Je.SelectEvent,es=Je.FeaturesListedEvent,ts=Je.FeaturesMarkedEvent,is=Je.OptionsVisibilityChangeEvent,ns=Je.PickEvent,rs=Je.QueryChangeEvent,ss=Je.ResponseEvent,os=Je.ReverseToggleEvent;j.FeaturesListedEvent=es,j.FeaturesMarkedEvent=ts,j.GeocodingControl=Jr,j.OptionsVisibilityChangeEvent=is,j.PickEvent=ns,j.QueryChangeEvent=rs,j.ResponseEvent=ss,j.ReverseToggleEvent=os,j.SelectEvent=$r,j.createMapLibreGlMapController=nn,Object.defineProperty(j,Symbol.toStringTag,{value:"Module"})});
|
|
23
2
|
//# sourceMappingURL=maplibregl.umd.js.map
|