@maptiler/geocoding-control 2.0.0 → 2.1.0-rc1
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 +3027 -27
- package/icons/10pin.svg +4 -1
- package/icons/9pin.svg +4 -1
- package/icons/alcohol.svg +1 -1
- package/icons/alpine_hut.svg +1 -1
- package/icons/apartment.svg +4 -1
- package/icons/area.svg +1 -5
- package/icons/artwork.svg +4 -1
- package/icons/beauty.svg +14 -1
- package/icons/bicycle_repair_station.svg +18 -1
- package/icons/biergarten.svg +4 -1
- package/icons/books.svg +14 -1
- package/icons/bowl.svg +4 -1
- package/icons/bowling_alley.svg +4 -1
- package/icons/bus_station.svg +1 -1
- package/icons/camping.svg +1 -1
- package/icons/car_repair.svg +14 -1
- package/icons/car_wash.svg +19 -1
- package/icons/cave_entrance.svg +15 -1
- package/icons/chalet.svg +1 -1
- package/icons/chemist.svg +14 -1
- package/icons/church.svg +4 -1
- package/icons/community_centre.svg +20 -1
- package/icons/firestation.svg +4 -1
- package/icons/guest_house.svg +29 -8
- package/icons/hotel.svg +1 -1
- package/icons/housenumber.svg +19 -14
- package/icons/hut.svg +1 -4
- package/icons/medical_supply.svg +20 -1
- package/icons/memorial.svg +14 -1
- package/icons/motel.svg +19 -1
- package/icons/post.svg +1 -1
- package/icons/post_office.svg +1 -1
- package/icons/postal_code.svg +1 -23
- package/icons/public_bookcase.svg +14 -1
- package/icons/public_building.svg +4 -1
- package/icons/shintoist.svg +1 -1
- package/icons/street.svg +11 -14
- package/icons/vehicle_inspection.svg +18 -1
- package/icons/wilderness_hut.svg +1 -1
- package/leaflet-controller.d.ts +1 -1
- package/leaflet-controller.js +113 -110
- package/leaflet-controller.js.map +1 -1
- package/leaflet-controller.umd.js +2 -2
- package/leaflet-controller.umd.js.map +1 -1
- package/leaflet.d.ts +58 -5
- package/leaflet.js +1438 -1265
- package/leaflet.js.map +1 -1
- package/leaflet.umd.js +3 -3
- package/leaflet.umd.js.map +1 -1
- package/maplibregl-controller.d.ts +1 -1
- package/maplibregl-controller.js +483 -469
- package/maplibregl-controller.js.map +1 -1
- package/maplibregl-controller.umd.js +3 -3
- package/maplibregl-controller.umd.js.map +1 -1
- package/maplibregl.d.ts +2499 -13
- package/maplibregl.js +2435 -2139
- package/maplibregl.js.map +1 -1
- package/maplibregl.umd.js +3 -3
- package/maplibregl.umd.js.map +1 -1
- package/maptilersdk.d.ts +2499 -13
- package/maptilersdk.js +2432 -2139
- package/maptilersdk.js.map +1 -1
- package/maptilersdk.umd.js +3 -3
- package/maptilersdk.umd.js.map +1 -1
- package/openlayers-controller.d.ts +1 -1
- package/openlayers-controller.js +66 -63
- package/openlayers-controller.js.map +1 -1
- package/openlayers-controller.umd.js +2 -2
- package/openlayers-controller.umd.js.map +1 -1
- package/openlayers.d.ts +53 -1
- package/openlayers.js +2046 -1902
- package/openlayers.js.map +1 -1
- package/openlayers.umd.js +3 -3
- package/openlayers.umd.js.map +1 -1
- package/package.json +28 -28
- package/react.d.ts +31 -5
- package/react.js +1252 -1096
- package/react.js.map +1 -1
- package/react.umd.js +1 -1
- package/react.umd.js.map +1 -1
- package/style.css +1 -1
- package/svelte/FeatureItem.svelte +60 -13
- package/svelte/FeatureItem.svelte.d.ts +4 -4
- package/svelte/GeocodingControl.svelte +166 -98
- package/svelte/GeocodingControl.svelte.d.ts +36 -16
- package/svelte/MapLibreBasedGeocodingControl.d.ts +3027 -27
- package/svelte/MapLibreBasedGeocodingControl.js +154 -21
- package/svelte/leaflet-controller.d.ts +1 -1
- package/svelte/leaflet-controller.js +6 -3
- package/svelte/leaflet.d.ts +58 -5
- package/svelte/leaflet.js +52 -21
- package/svelte/maplibregl-controller.d.ts +1 -1
- package/svelte/maplibregl-controller.js +47 -38
- package/svelte/maplibregl.d.ts +2499 -13
- package/svelte/maplibregl.js +11 -3
- package/svelte/maptilersdk.d.ts +2499 -13
- package/svelte/maptilersdk.js +11 -3
- package/svelte/openlayers-controller.d.ts +1 -1
- package/svelte/openlayers-controller.js +7 -4
- package/svelte/openlayers.d.ts +53 -1
- package/svelte/openlayers.js +66 -48
- package/svelte/react.d.ts +31 -5
- package/svelte/react.js +21 -9
- package/svelte/types.d.ts +106 -35
- package/svelte/vanilla.d.ts +46 -2
- package/svelte/vanilla.js +66 -10
- package/types.d.ts +106 -35
- package/vanilla.d.ts +46 -2
- package/vanilla.js +1260 -1057
- package/vanilla.js.map +1 -1
- package/vanilla.umd.js +1 -1
- package/vanilla.umd.js.map +1 -1
- package/icons/aerodrome.12.svg +0 -1
- package/icons/bus_stop.12.svg +0 -1
- package/icons/elevator.12.svg +0 -1
- /package/icons/{helipad.16.svg → helipad.svg} +0 -0
- /package/icons/{traffic_light.13.svg → traffic_light.svg} +0 -0
package/maptilersdk.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(O,B){typeof exports=="object"&&typeof module<"u"?B(exports,require("@maptiler/sdk")):typeof define=="function"&&define.amd?define(["exports","@maptiler/sdk"],B):(O=typeof globalThis<"u"?globalThis:O||self,B(O.maptilersdkMaptilerGeocoder={},O.maptilersdk))})(this,function(O,B){"use strict";var Kr=Object.defineProperty;var Di=O=>{throw TypeError(O)};var Xr=(O,B,X)=>B in O?Kr(O,B,{enumerable:!0,configurable:!0,writable:!0,value:X}):O[B]=X;var Dt=(O,B,X)=>Xr(O,typeof B!="symbol"?B+"":B,X),Ui=(O,B,X)=>B.has(O)||Di("Cannot "+X);var le=(O,B,X)=>(Ui(O,B,"read from private field"),X?X.call(O):B.get(O)),Ut=(O,B,X)=>B.has(O)?Di("Cannot add the same private member more than once"):B instanceof WeakSet?B.add(O):B.set(O,X),ct=(O,B,X,De)=>(Ui(O,B,"write to private field"),De?De.call(O,X):B.set(O,X),X);function X(n){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const t in n)if(t!=="default"){const i=Object.getOwnPropertyDescriptor(n,t);Object.defineProperty(e,t,i.get?i:{enumerable:!0,get:()=>n[t]})}}return e.default=n,Object.freeze(e)}const De=X(B);function D(){}function zi(n,e){for(const t in e)n[t]=e[t];return n}function zt(n){return n()}function Gt(){return Object.create(null)}function ge(n){n.forEach(zt)}function jt(n){return typeof n=="function"}function pe(n,e){return n!=n?e==e:n!==e||n&&typeof n=="object"||typeof n=="function"}let Ke;function J(n,e){return n===e?!0:(Ke||(Ke=document.createElement("a")),Ke.href=e,n===Ke.href)}function Gi(n){return Object.keys(n).length===0}function ji(n,e,t,i){if(n){const r=Ft(n,e,t,i);return n[0](r)}}function Ft(n,e,t,i){return n[1]&&i?zi(t.ctx.slice(),n[1](i(e))):t.ctx}function Fi(n,e,t,i){if(n[2]&&i){const r=n[2](i(t));if(e.dirty===void 0)return r;if(typeof r=="object"){const o=[],a=Math.max(e.dirty.length,r.length);for(let s=0;s<a;s+=1)o[s]=e.dirty[s]|r[s];return o}return e.dirty|r}return e.dirty}function Zi(n,e,t,i,r,o){if(r){const a=Ft(e,t,i,o);n.p(a,r)}}function qi(n){if(n.ctx.length>32){const e=[],t=n.ctx.length/32;for(let i=0;i<t;i++)e[i]=-1;return e}return-1}function Zt(n){return n??""}function P(n,e){n.appendChild(e)}function z(n,e,t){n.insertBefore(e,t||null)}function U(n){n.parentNode&&n.parentNode.removeChild(n)}function A(n){return document.createElement(n)}function ue(n){return document.createElementNS("http://www.w3.org/2000/svg",n)}function be(n){return document.createTextNode(n)}function ie(){return be(" ")}function Qi(){return be("")}function ee(n,e,t,i){return n.addEventListener(e,t,i),()=>n.removeEventListener(e,t,i)}function Hi(n){return function(e){return e.preventDefault(),n.call(this,e)}}function v(n,e,t){t==null?n.removeAttribute(e):n.getAttribute(e)!==t&&n.setAttribute(e,t)}function Vi(n){return Array.from(n.childNodes)}function Ue(n,e){e=""+e,n.data!==e&&(n.data=e)}function qt(n,e){n.value=e??""}function oe(n,e,t){n.classList.toggle(e,!!t)}function Yi(n,e,{bubbles:t=!1,cancelable:i=!1}={}){return new CustomEvent(n,{detail:e,bubbles:t,cancelable:i})}let ze;function Ge(n){ze=n}function Qt(){if(!ze)throw new Error("Function called outside component initialization");return ze}function Ki(n){Qt().$$.on_destroy.push(n)}function Xi(){const n=Qt();return(e,t,{cancelable:i=!1}={})=>{const r=n.$$.callbacks[e];if(r){const o=Yi(e,t,{cancelable:i});return r.slice().forEach(a=>{a.call(n,o)}),!o.defaultPrevented}return!0}}function Ht(n,e){const t=n.$$.callbacks[e.type];t&&t.slice().forEach(i=>i.call(this,e))}const Pe=[],ft=[];let Re=[];const Vt=[],Ji=Promise.resolve();let dt=!1;function $i(){dt||(dt=!0,Ji.then(Yt))}function ht(n){Re.push(n)}const gt=new Set;let Ie=0;function Yt(){if(Ie!==0)return;const n=ze;do{try{for(;Ie<Pe.length;){const e=Pe[Ie];Ie++,Ge(e),en(e.$$)}}catch(e){throw Pe.length=0,Ie=0,e}for(Ge(null),Pe.length=0,Ie=0;ft.length;)ft.pop()();for(let e=0;e<Re.length;e+=1){const t=Re[e];gt.has(t)||(gt.add(t),t())}Re.length=0}while(Pe.length);for(;Vt.length;)Vt.pop()();dt=!1,gt.clear(),Ge(n)}function en(n){if(n.fragment!==null){n.update(),ge(n.before_update);const e=n.dirty;n.dirty=[-1],n.fragment&&n.fragment.p(n.ctx,e),n.after_update.forEach(ht)}}function tn(n){const e=[],t=[];Re.forEach(i=>n.indexOf(i)===-1?e.push(i):t.push(i)),t.forEach(i=>i()),Re=e}const Xe=new Set;let ke;function Je(){ke={r:0,c:[],p:ke}}function $e(){ke.r||ge(ke.c),ke=ke.p}function Q(n,e){n&&n.i&&(Xe.delete(n),n.i(e))}function K(n,e,t,i){if(n&&n.o){if(Xe.has(n))return;Xe.add(n),ke.c.push(()=>{Xe.delete(n),i&&(t&&n.d(1),i())}),n.o(e)}else i&&i()}function Kt(n){return(n==null?void 0:n.length)!==void 0?n:Array.from(n)}function nn(n,e){K(n,1,1,()=>{e.delete(n.key)})}function rn(n,e,t,i,r,o,a,s,u,l,d,c){let f=n.length,h=o.length,p=f;const b={};for(;p--;)b[n[p].key]=p;const m=[],y=new Map,w=new Map,L=[];for(p=h;p--;){const S=c(r,o,p),_=t(S);let k=a.get(_);k?L.push(()=>k.p(S,e)):(k=l(_,S),k.c()),y.set(_,m[p]=k),_ in b&&w.set(_,Math.abs(p-b[_]))}const E=new Set,C=new Set;function x(S){Q(S,1),S.m(s,d),a.set(S.key,S),d=S.first,h--}for(;f&&h;){const S=m[h-1],_=n[f-1],k=S.key,I=_.key;S===_?(d=S.first,f--,h--):y.has(I)?!a.has(k)||E.has(k)?x(S):C.has(I)?f--:w.get(k)>w.get(I)?(C.add(k),x(S)):(E.add(I),f--):(u(_,a),f--)}for(;f--;){const S=n[f];y.has(S.key)||u(S,a)}for(;h;)x(m[h-1]);return ge(L),m}function _e(n){n&&n.c()}function me(n,e,t){const{fragment:i,after_update:r}=n.$$;i&&i.m(e,t),ht(()=>{const o=n.$$.on_mount.map(zt).filter(jt);n.$$.on_destroy?n.$$.on_destroy.push(...o):ge(o),n.$$.on_mount=[]}),r.forEach(ht)}function ye(n,e){const t=n.$$;t.fragment!==null&&(tn(t.after_update),ge(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function on(n,e){n.$$.dirty[0]===-1&&(Pe.push(n),$i(),n.$$.dirty.fill(0)),n.$$.dirty[e/31|0]|=1<<e%31}function we(n,e,t,i,r,o,a=null,s=[-1]){const u=ze;Ge(n);const l=n.$$={fragment:null,ctx:[],props:o,update:D,not_equal:r,bound:Gt(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(u?u.$$.context:[])),callbacks:Gt(),dirty:s,skip_bound:!1,root:e.target||u.$$.root};a&&a(l.root);let d=!1;if(l.ctx=t?t(n,e.props||{},(c,f,...h)=>{const p=h.length?h[0]:f;return l.ctx&&r(l.ctx[c],l.ctx[c]=p)&&(!l.skip_bound&&l.bound[c]&&l.bound[c](p),d&&on(n,c)),f}):[],l.update(),d=!0,ge(l.before_update),l.fragment=i?i(l.ctx):!1,e.target){if(e.hydrate){const c=Vi(e.target);l.fragment&&l.fragment.l(c),c.forEach(U)}else l.fragment&&l.fragment.c();e.intro&&Q(n.$$.fragment),me(n,e.target,e.anchor),Yt()}Ge(u)}class Ee{constructor(){Dt(this,"$$");Dt(this,"$$set")}$destroy(){ye(this,1),this.$destroy=D}$on(e,t){if(!jt(t))return D;const i=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return i.push(t),()=>{const r=i.indexOf(t);r!==-1&&i.splice(r,1)}}$set(e){this.$$set&&!Gi(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const sn="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(sn);function ln(n){let e,t;return{c(){e=ue("svg"),t=ue("path"),v(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"),v(e,"viewBox","0 0 14 14"),v(e,"width","13"),v(e,"height","13"),v(e,"class","svelte-en2qvf")},m(i,r){z(i,e,r),P(e,t)},p:D,i:D,o:D,d(i){i&&U(e)}}}class Xt extends Ee{constructor(e){super(),we(this,e,null,ln,pe,{})}}function un(n){let e,t;return{c(){e=ue("svg"),t=ue("path"),v(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"),v(e,"viewBox","0 0 30 30"),v(e,"fill","none"),v(e,"xmlns","http://www.w3.org/2000/svg"),v(e,"class","svelte-d2loi5")},m(i,r){z(i,e,r),P(e,t)},p:D,i:D,o:D,d(i){i&&U(e)}}}class Jt extends Ee{constructor(e){super(),we(this,e,null,un,pe,{})}}function an(n){let e,t;return{c(){e=A("img"),J(e.src,t=n[3]+"area.svg")||v(e,"src",t),v(e,"alt",n[6]),v(e,"class","svelte-ltkwvy")},m(i,r){z(i,e,r)},p(i,r){r&8&&!J(e.src,t=i[3]+"area.svg")&&v(e,"src",t),r&64&&v(e,"alt",i[6])},d(i){i&&U(e)}}}function cn(n){let e,t;return{c(){e=A("img"),J(e.src,t=n[3]+"reverse.svg")||v(e,"src",t),v(e,"alt",n[6]),v(e,"class","svelte-ltkwvy")},m(i,r){z(i,e,r)},p(i,r){r&8&&!J(e.src,t=i[3]+"reverse.svg")&&v(e,"src",t),r&64&&v(e,"alt",i[6])},d(i){i&&U(e)}}}function fn(n){let e,t;return{c(){e=A("img"),J(e.src,t=n[3]+"poi.svg")||v(e,"src",t),v(e,"alt",n[6]),v(e,"class","svelte-ltkwvy")},m(i,r){z(i,e,r)},p(i,r){r&8&&!J(e.src,t=i[3]+"poi.svg")&&v(e,"src",t),r&64&&v(e,"alt",i[6])},d(i){i&&U(e)}}}function dn(n){let e,t;return{c(){e=A("img"),J(e.src,t=n[3]+"postal_code.svg")||v(e,"src",t),v(e,"alt",n[6]),v(e,"class","svelte-ltkwvy")},m(i,r){z(i,e,r)},p(i,r){r&8&&!J(e.src,t=i[3]+"postal_code.svg")&&v(e,"src",t),r&64&&v(e,"alt",i[6])},d(i){i&&U(e)}}}function hn(n){let e,t;return{c(){e=A("img"),J(e.src,t=n[3]+"street.svg")||v(e,"src",t),v(e,"alt",n[6]),v(e,"class","svelte-ltkwvy")},m(i,r){z(i,e,r)},p(i,r){r&8&&!J(e.src,t=i[3]+"street.svg")&&v(e,"src",t),r&64&&v(e,"alt",i[6])},d(i){i&&U(e)}}}function gn(n){let e,t;return{c(){e=A("img"),J(e.src,t=n[3]+"road.svg")||v(e,"src",t),v(e,"alt",n[6]),v(e,"class","svelte-ltkwvy")},m(i,r){z(i,e,r)},p(i,r){r&8&&!J(e.src,t=i[3]+"road.svg")&&v(e,"src",t),r&64&&v(e,"alt",i[6])},d(i){i&&U(e)}}}function mn(n){let e,t;return{c(){e=A("img"),J(e.src,t=n[3]+"housenumber.svg")||v(e,"src",t),v(e,"alt",n[6]),v(e,"class","svelte-ltkwvy")},m(i,r){z(i,e,r)},p(i,r){r&8&&!J(e.src,t=i[3]+"housenumber.svg")&&v(e,"src",t),r&64&&v(e,"alt",i[6])},d(i){i&&U(e)}}}function yn(n){let e,t,i,r;return{c(){e=A("img"),J(e.src,t=n[5])||v(e,"src",t),v(e,"alt",n[4]),v(e,"class","svelte-ltkwvy")},m(o,a){z(o,e,a),i||(r=ee(e,"error",n[14]),i=!0)},p(o,a){a&32&&!J(e.src,t=o[5])&&v(e,"src",t),a&16&&v(e,"alt",o[4])},d(o){o&&U(e),i=!1,r()}}}function $t(n){let e,t;return{c(){e=A("span"),t=be(n[6]),v(e,"class","secondary svelte-ltkwvy")},m(i,r){z(i,e,r),P(e,t)},p(i,r){r&64&&Ue(t,i[6])},d(i){i&&U(e)}}}function vn(n){let e,t,i,r,o,a,s,u,l,d=(n[7]?n[0].place_name:n[0].place_name.replace(/,.*/,""))+"",c,f,h=n[2]==="always"||n[2]&&!n[0].address&&!n[0].id.startsWith("road.")&&!n[0].id.startsWith("address.")&&!n[0].id.startsWith("postal_code.")&&(!n[0].id.startsWith("poi.")||!n[5])&&!n[7],p,b,m=(n[7]?"":n[0].place_name.replace(/[^,]*,?\s*/,""))+"",y,w,L;function E(_,k){return k&1&&(t=null),k&1&&(i=null),k&1&&(r=null),k&1&&(o=null),_[5]?yn:_[0].address?mn:(t==null&&(t=!!_[0].id.startsWith("road.")),t?gn:(i==null&&(i=!!_[0].id.startsWith("address.")),i?hn:(r==null&&(r=!!_[0].id.startsWith("postal_code.")),r?dn:(o==null&&(o=!!_[0].id.startsWith("poi.")),o?fn:_[7]?cn:an))))}let C=E(n,-1),x=C(n),S=h&&$t(n);return{c(){e=A("li"),x.c(),a=ie(),s=A("span"),u=A("span"),l=A("span"),c=be(d),f=ie(),S&&S.c(),p=ie(),b=A("span"),y=be(m),v(l,"class","primary svelte-ltkwvy"),v(u,"class","svelte-ltkwvy"),v(b,"class","line2 svelte-ltkwvy"),v(s,"class","texts svelte-ltkwvy"),v(e,"tabindex","0"),v(e,"data-selected",n[1]),v(e,"class","svelte-ltkwvy"),oe(e,"selected",n[1])},m(_,k){z(_,e,k),x.m(e,null),P(e,a),P(e,s),P(s,u),P(u,l),P(l,c),P(u,f),S&&S.m(u,null),P(s,p),P(s,b),P(b,y),w||(L=[ee(e,"mouseenter",n[12]),ee(e,"focus",n[13])],w=!0)},p(_,[k]){C===(C=E(_,k))&&x?x.p(_,k):(x.d(1),x=C(_),x&&(x.c(),x.m(e,a))),k&1&&d!==(d=(_[7]?_[0].place_name:_[0].place_name.replace(/,.*/,""))+"")&&Ue(c,d),k&37&&(h=_[2]==="always"||_[2]&&!_[0].address&&!_[0].id.startsWith("road.")&&!_[0].id.startsWith("address.")&&!_[0].id.startsWith("postal_code.")&&(!_[0].id.startsWith("poi.")||!_[5])&&!_[7]),h?S?S.p(_,k):(S=$t(_),S.c(),S.m(u,null)):S&&(S.d(1),S=null),k&1&&m!==(m=(_[7]?"":_[0].place_name.replace(/[^,]*,?\s*/,""))+"")&&Ue(y,m),k&2&&v(e,"data-selected",_[1]),k&2&&oe(e,"selected",_[1])},i:D,o:D,d(_){_&&U(e),x.d(),S&&S.d(),w=!1,ge(L)}}}function pn(n,e,t){var L;let i,r,{feature:o}=e,{selected:a=!1}=e,{showPlaceType:s}=e,{missingIconsCache:u}=e,{iconsBaseUrl:l}=e;const d=(L=o.properties)==null?void 0:L.categories;let c,f,h=0,p=o.place_type[0]==="reverse";function b(){f&&u.add(f),t(10,h++,h)}function m(E){Ht.call(this,n,E)}function y(E){Ht.call(this,n,E)}const w=()=>b();return n.$$set=E=>{"feature"in E&&t(0,o=E.feature),"selected"in E&&t(1,a=E.selected),"showPlaceType"in E&&t(2,s=E.showPlaceType),"missingIconsCache"in E&&t(9,u=E.missingIconsCache),"iconsBaseUrl"in E&&t(3,l=E.iconsBaseUrl)},n.$$.update=()=>{var E,C,x,S;if(n.$$.dirty&3640)do t(11,i--,i),t(4,c=d==null?void 0:d[i]),t(5,f=c?l+c.replace(/ /g,"_")+".svg":void 0);while(i>-1&&(!f||u.has(f)));n.$$.dirty&1&&t(6,r=((C=(E=o.properties)==null?void 0:E.categories)==null?void 0:C.join(", "))??((S=(x=o.properties)==null?void 0:x.place_type_name)==null?void 0:S[0])??o.place_type[0])},t(11,i=(d==null?void 0:d.length)??0),[o,a,s,l,c,f,r,p,b,u,h,i,m,y,w]}class bn extends Ee{constructor(e){super(),we(this,e,pn,vn,pe,{feature:0,selected:1,showPlaceType:2,missingIconsCache:9,iconsBaseUrl:3})}}function _n(n){let e;return{c(){e=A("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>',v(e,"class","svelte-7cmwmc")},m(t,i){z(t,e,i)},p:D,i:D,o:D,d(t){t&&U(e)}}}class wn extends Ee{constructor(e){super(),we(this,e,null,_n,pe,{})}}function En(n){let e,t,i;return{c(){e=ue("svg"),t=ue("path"),v(t,"stroke-width","4"),v(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"),v(t,"class","svelte-gzo3ar"),v(e,"width",i=n[0]==="list"?20:void 0),v(e,"viewBox","0 0 70 85"),v(e,"fill","none"),v(e,"class","svelte-gzo3ar"),oe(e,"in-map",n[0]!=="list"),oe(e,"list-icon",n[0]==="list")},m(r,o){z(r,e,o),P(e,t)},p(r,[o]){o&1&&i!==(i=r[0]==="list"?20:void 0)&&v(e,"width",i),o&1&&oe(e,"in-map",r[0]!=="list"),o&1&&oe(e,"list-icon",r[0]==="list")},i:D,o:D,d(r){r&&U(e)}}}function Ln(n,e,t){let{displayIn:i}=e;return n.$$set=r=>{"displayIn"in r&&t(0,i=r.displayIn)},[i]}class Sn extends Ee{constructor(e){super(),we(this,e,Ln,En,pe,{displayIn:0})}}function xn(n){let e,t;return{c(){e=ue("svg"),t=ue("path"),v(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"),v(e,"viewBox","0 0 60.006 21.412"),v(e,"width","14"),v(e,"height","20"),v(e,"class","svelte-en2qvf")},m(i,r){z(i,e,r),P(e,t)},p:D,i:D,o:D,d(i){i&&U(e)}}}class Mn extends Ee{constructor(e){super(),we(this,e,null,xn,pe,{})}}function Cn(n){let e,t,i;return{c(){e=ue("svg"),t=ue("circle"),i=ue("path"),v(t,"cx","4.789"),v(t,"cy","4.787"),v(t,"r","3.85"),v(t,"class","svelte-1aq105l"),v(i,"d","M12.063 12.063 7.635 7.635"),v(i,"class","svelte-1aq105l"),v(e,"xmlns","http://www.w3.org/2000/svg"),v(e,"width","13"),v(e,"height","13"),v(e,"viewBox","0 0 13 13"),v(e,"class","svelte-1aq105l")},m(r,o){z(r,e,o),P(e,t),P(e,i)},p:D,i:D,o:D,d(r){r&&U(e)}}}class kn extends Ee{constructor(e){super(),we(this,e,null,Cn,pe,{})}}function Nn(n,e,t){const i=e[1],r=e[0],o=i-r;return n===i&&t?n:((n-r)%o+o)%o+r}function et(n){const e=[...n];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 je;async function Tn(n,e,t){const i=n==null?void 0:n.getCenterAndZoom();for(const r of e??[])if(!(i&&(r.minZoom!=null&&r.minZoom>i[0]||r.maxZoom!=null&&r.maxZoom<i[0]))){if(r.type==="fixed")return r.coordinates.join(",");e:if(r.type==="client-geolocation"){if(je&&r.cachedLocationExpiry&&je.time+r.cachedLocationExpiry>Date.now()){if(!je.coords)break e;return je.coords}let o;try{return o=await new Promise((a,s)=>{t.signal.addEventListener("abort",()=>{s(Error("aborted"))}),navigator.geolocation.getCurrentPosition(u=>{a([u.coords.longitude,u.coords.latitude].map(l=>l.toFixed(6)).join(","))},u=>{s(u)},r)}),o}catch{}finally{r.cachedLocationExpiry&&(je={time:Date.now(),coords:o})}if(t.signal.aborted)return}if(r.type==="server-geolocation")return"ip";if(i&&r.type==="map-center")return i[1].toFixed(6)+","+i[2].toFixed(6)}}const Pn=/^(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,ei=/^([+-]?[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,})$/,ti=/^(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,ii=/^(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,ri=/^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([0-5]?[0-9](?:[\.,]\d{1,})?)?\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*,?((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(''|′′|’’|´´|["″”\.])?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([0-5]?[0-9](?:[\.,]\d{1,})?)?\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*,?((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(''|′′|´´|’’|["″”\.])?\s*(EAST|WEST|[EW])?$/i;function Rn(n){if(!["DMS","DM","DD"].includes(n))throw new Error("invalid format specified");if(this.decimalCoordinates&&this.decimalCoordinates.trim()){const e=this.decimalCoordinates.split(",").map(h=>Number(h.trim())),t=Number(e[0]),i=Number(e[1]),r=Math.abs(t),o=Math.abs(i),a=t>0?"N":"S",s=i>0?"E":"W";let u;n=="DD"&&(u=`${r}° ${a}, ${o}° ${s}`);const l=Math.floor(r),d=Math.floor(o),c=(r-l)*60,f=(o-d)*60;if(n=="DM"){let h=oi(c,3).toFixed(3).padStart(6,"0"),p=oi(f,3).toFixed(3).padStart(6,"0");h.endsWith(".000")&&p.endsWith(".000")&&(h=h.replace(/\.000$/,""),p=p.replace(/\.000$/,"")),u=`${l}° ${h}' ${a}, ${d}° ${p}' ${s}`}if(n=="DMS"){const h=Math.floor(c),p=Math.floor(f);let b=((c-h)*60).toFixed(1).padStart(4,"0"),m=((f-p)*60).toFixed(1).padStart(4,"0");const y=h.toString().padStart(2,"0"),w=p.toString().padStart(2,"0");b.endsWith(".0")&&m.endsWith(".0")&&(b=b.replace(/\.0$/,""),m=m.replace(/\.0$/,"")),u=`${l}° ${y}' ${b}" ${a}, ${d}° ${w}' ${m}" ${s}`}return u}else throw new Error("no decimal coordinates to convert")}function oi(n,e){const t=Math.pow(10,e);return Math.round((n+Number.EPSILON)*t)/t}function mt(n,e){e||(e=5),n=n.replace(/\s+/g," ").trim();let t=null,i=null,r="",o="",a=null,s=[],u=!1;if(Pn.test(n))throw new Error("invalid coordinate value");if(ei.test(n))if(s=ei.exec(n),u=Fe(s),u)t=Math.abs(s[1])+s[2]/60,Number(s[1])<0&&(t*=-1),i=Math.abs(s[3])+s[4]/60,Number(s[3])<0&&(i*=-1),a="DM";else throw new Error("invalid coordinate format");else if(ti.test(n))if(s=ti.exec(n),u=Fe(s),u){if(t=s[2],i=s[6],t.includes(",")&&(t=t.replace(",",".")),i.includes(",")&&(i=i.replace(",",".")),a="DD",Number(Math.round(t))==Number(t))throw new Error("integer only coordinate provided");if(Number(Math.round(i))==Number(i))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(ii.test(n))if(s=ii.exec(n),u=Fe(s),u)t=Math.abs(parseInt(s[2])),s[4]&&(t+=s[4]/60,a="DM"),s[6]&&(t+=s[6].replace(",",".")/3600,a="DMS"),parseInt(s[2])<0&&(t=-1*t),i=Math.abs(parseInt(s[9])),s[11]&&(i+=s[11]/60),s[13]&&(i+=s[13].replace(",",".")/3600),parseInt(s[9])<0&&(i=-1*i),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(ni.test(n))if(s=ni.exec(n),u=Fe(s),u)t=Math.abs(parseInt(s[2])),s[4]&&(t+=s[4]/60,a="DM"),s[6]&&(t+=s[6]/3600,a="DMS"),parseInt(s[2])<0&&(t=-1*t),i=Math.abs(parseInt(s[10])),s[12]&&(i+=s[12]/60),s[14]&&(i+=s[14]/3600),parseInt(s[10])<0&&(i=-1*i),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(ri.test(n)){if(s=ri.exec(n),u=Fe(s),s.filter(l=>l).length<=5)throw new Error("invalid coordinates format");if(u)t=Math.abs(parseInt(s[2])),s[4]&&(t+=s[4].replace(",",".")/60,a="DM"),s[6]&&(t+=s[6].replace(",",".")/3600,a="DMS"),parseInt(s[2])<0&&(t=-1*t),i=Math.abs(parseInt(s[10])),s[12]&&(i+=s[12].replace(",",".")/60),s[14]&&(i+=s[14].replace(",",".")/3600),parseInt(s[10])<0&&(i=-1*i),s[1]?(r=s[1],o=s[9]):s[8]&&(r=s[8],o=s[16]);else throw new Error("invalid coordinates format")}if(u){if(Math.abs(i)>=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(",",".")),i.toString().includes(",")&&(i=i.replace(",","."));let l=/S|SOUTH/i;l.test(r)&&t>0&&(t=-1*t),l=/W|WEST/i,l.test(o)&&i>0&&(i=-1*i);const d=s[0].trim();let c,f;const h=/[,/;\u0020]/g,p=d.match(h);if(p==null){const y=Math.floor(n.length/2);c=d.substring(0,y).trim(),f=d.substring(y).trim()}else{let y;p.length%2==1?y=Math.floor(p.length/2):y=p.length/2-1;let w=0;if(y==0)w=d.indexOf(p[0]),c=d.substring(0,w).trim(),f=d.substring(w+1).trim();else{let L=0,E=0;for(;L<=y;)w=d.indexOf(p[L],E),E=w+1,L++;c=d.substring(0,w).trim(),f=d.substring(w+1).trim()}}const b=c.split(".");if(b.length==2&&b[1]==0&&b[1].length!=2)throw new Error("invalid coordinates format");const m=f.split(".");if(m.length==2&&m[1]==0&&m[1].length!=2)throw new Error("invalid coordinates format");if(/^\d+$/.test(c)||/^\d+$/.test(f))throw new Error("degree only coordinate/s provided");return t=Number(Number(t).toFixed(e)),i=Number(Number(i).toFixed(e)),Object.freeze({verbatimCoordinates:d,verbatimLatitude:c,verbatimLongitude:f,decimalLatitude:t,decimalLongitude:i,decimalCoordinates:`${t},${i}`,originalFormat:a,closeEnough:In,toCoordinateFormat:Rn})}else throw new Error("coordinates pattern match failed")}function Fe(n){if(!isNaN(n[0]))return!1;const e=[...n];if(e.shift(),e.length%2>0)return!1;const t=/^[-+]?\d+([\.,]\d+)?$/,i=/[eastsouthnorthwest]+/i,r=e.length/2;for(let o=0;o<r;o++){const a=e[o],s=e[o+r],u=t.test(a)&&t.test(s),l=i.test(a)&&i.test(s),d=a==s;if(!(a==null&&s==null)){if(a==null||s==null)return!1;if(u||l||d)continue;return!1}}return!0}function si(n,e){const t=Math.abs(n-e);return Number(t.toFixed(6))<=1e-5}function In(n){if(!n)throw new Error("coords must be provided");if(n.includes(",")){const e=n.split(",");if(Number(e[0])==NaN||Number(e[1])==NaN)throw new Error("coords are not valid decimals");return si(this.decimalLatitude,Number(e[0]))&&si(this.decimalLongitude,e[1])}else throw new Error("coords being tested must be separated by a comma")}const On=Object.freeze({DMS:"DMS",DM:"DM",DD:"DD"});mt.to=On;const Wn=[{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"}],An={decimalLatitude:40.123,decimalLongitude:-74.123},Bn=[{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}],Dn=[{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 Un(){const n=[];return Wn.forEach(e=>{e.decimalLatitude?n.push(e):n.push({...e,...An})}),[...n,...Bn,...Dn]}const zn=Un();mt.formats=zn.map(n=>n.verbatimCoordinates);const Gn=mt;function li(n,e,t){const i=n.slice();return i[84]=e[t],i[86]=t,i}function ui(n){let e,t;return e=new wn({}),{c(){_e(e.$$.fragment)},m(i,r){me(e,i,r),t=!0},i(i){t||(Q(e.$$.fragment,i),t=!0)},o(i){K(e.$$.fragment,i),t=!1},d(i){ye(e,i)}}}function ai(n){let e,t,i,r,o;return t=new Mn({}),{c(){e=A("button"),_e(t.$$.fragment),v(e,"type","button"),v(e,"title",n[9]),v(e,"class","svelte-1uvos7g"),oe(e,"active",n[0])},m(a,s){z(a,e,s),me(t,e,null),i=!0,r||(o=ee(e,"click",n[69]),r=!0)},p(a,s){(!i||s[0]&512)&&v(e,"title",a[9]),(!i||s[0]&1)&&oe(e,"active",a[0])},i(a){i||(Q(t.$$.fragment,a),i=!0)},o(a){K(t.$$.fragment,a),i=!1},d(a){a&&U(e),ye(t),r=!1,o()}}}function jn(n){let e,t=[],i=new Map,r,o,a,s=Kt(n[14]);const u=l=>l[84].id+(l[84].address?","+l[84].address:"");for(let l=0;l<s.length;l+=1){let d=li(n,s,l),c=u(d);i.set(c,t[l]=ci(c,d))}return{c(){e=A("ul");for(let l=0;l<t.length;l+=1)t[l].c();v(e,"class","svelte-1uvos7g")},m(l,d){z(l,e,d);for(let c=0;c<t.length;c+=1)t[c]&&t[c].m(e,null);r=!0,o||(a=[ee(e,"mouseleave",n[73]),ee(e,"blur",n[74])],o=!0)},p(l,d){d[0]&17880064&&(s=Kt(l[14]),Je(),t=rn(t,d,u,1,l,s,i,e,nn,ci,null,li),$e())},i(l){if(!r){for(let d=0;d<s.length;d+=1)Q(t[d]);r=!0}},o(l){for(let d=0;d<t.length;d+=1)K(t[d]);r=!1},d(l){l&&U(e);for(let d=0;d<t.length;d+=1)t[d].d();o=!1,ge(a)}}}function Fn(n){let e,t,i,r,o,a;return t=new Jt({}),{c(){e=A("div"),_e(t.$$.fragment),i=ie(),r=A("div"),o=be(n[7]),v(r,"class","svelte-1uvos7g"),v(e,"class","no-results svelte-1uvos7g")},m(s,u){z(s,e,u),me(t,e,null),P(e,i),P(e,r),P(r,o),a=!0},p(s,u){(!a||u[0]&128)&&Ue(o,s[7])},i(s){a||(Q(t.$$.fragment,s),a=!0)},o(s){K(t.$$.fragment,s),a=!1},d(s){s&&U(e),ye(t)}}}function Zn(n){let e="",t;return{c(){t=be(e)},m(i,r){z(i,t,r)},p:D,i:D,o:D,d(i){i&&U(t)}}}function qn(n){let e,t,i,r,o,a,s,u,l,d,c;return t=new Jt({}),u=new Xt({}),{c(){e=A("div"),_e(t.$$.fragment),i=ie(),r=A("div"),o=be(n[6]),a=ie(),s=A("button"),_e(u.$$.fragment),v(r,"class","svelte-1uvos7g"),v(s,"class","svelte-1uvos7g"),v(e,"class","error svelte-1uvos7g")},m(f,h){z(f,e,h),me(t,e,null),P(e,i),P(e,r),P(r,o),P(e,a),P(e,s),me(u,s,null),l=!0,d||(c=ee(s,"click",n[70]),d=!0)},p(f,h){(!l||h[0]&64)&&Ue(o,f[6])},i(f){l||(Q(t.$$.fragment,f),Q(u.$$.fragment,f),l=!0)},o(f){K(t.$$.fragment,f),K(u.$$.fragment,f),l=!1},d(f){f&&U(e),ye(t),ye(u),d=!1,c()}}}function ci(n,e){let t,i,r;function o(){return e[71](e[86])}function a(){return e[72](e[84])}return i=new bn({props:{feature:e[84],showPlaceType:e[10],selected:e[15]===e[86],missingIconsCache:e[20],iconsBaseUrl:e[12]}}),i.$on("mouseenter",o),i.$on("focus",a),{key:n,first:null,c(){t=Qi(),_e(i.$$.fragment),this.first=t},m(s,u){z(s,t,u),me(i,s,u),r=!0},p(s,u){e=s;const l={};u[0]&16384&&(l.feature=e[84]),u[0]&1024&&(l.showPlaceType=e[10]),u[0]&49152&&(l.selected=e[15]===e[86]),u[0]&4096&&(l.iconsBaseUrl=e[12]),i.$set(l)},i(s){r||(Q(i.$$.fragment,s),r=!0)},o(s){K(i.$$.fragment,s),r=!1},d(s){s&&U(t),ye(i,s)}}}function Qn(n){let e,t,i,r,o,a,s,u,l,d,c,f,h,p,b,m,y,w,L,E,C,x=!1;o=new kn({}),c=new Xt({});let S=n[19]&&ui(),_=n[5]===!0&&ai(n);const k=n[61].default,I=ji(k,n,n[60],null),G=[qn,Zn,Fn,jn],F=[];function W(M,Z){var ne,ce;return M[18]?0:M[16]?((ne=M[14])==null?void 0:ne.length)===0?2:M[16]&&((ce=M[14])!=null&&ce.length)?3:-1:1}return~(m=W(n))&&(y=F[m]=G[m](n)),{c(){e=ie(),t=A("form"),i=A("div"),r=A("button"),_e(o.$$.fragment),a=ie(),s=A("input"),u=ie(),l=A("div"),d=A("button"),_e(c.$$.fragment),f=ie(),S&&S.c(),h=ie(),_&&_.c(),p=ie(),I&&I.c(),b=ie(),y&&y.c(),v(r,"class","search-button svelte-1uvos7g"),v(r,"type","button"),v(s,"placeholder",n[8]),v(s,"aria-label",n[8]),v(s,"class","svelte-1uvos7g"),v(d,"type","button"),v(d,"title",n[3]),v(d,"class","svelte-1uvos7g"),v(l,"class","clear-button-container svelte-1uvos7g"),oe(l,"displayable",n[1]!==""),v(i,"class","input-group svelte-1uvos7g"),v(t,"tabindex","0"),v(t,"class",w=Zt(n[2])+" svelte-1uvos7g"),oe(t,"can-collapse",n[4]&&n[1]==="")},m(M,Z){z(M,e,Z),z(M,t,Z),P(t,i),P(i,r),me(o,r,null),P(i,a),P(i,s),n[63](s),qt(s,n[1]),P(i,u),P(i,l),P(l,d),me(c,d,null),P(l,f),S&&S.m(l,null),P(i,h),_&&_.m(i,null),P(i,p),I&&I.m(i,null),P(t,b),~m&&F[m].m(t,null),L=!0,E||(C=[ee(r,"click",n[62]),ee(s,"input",n[64]),ee(s,"focus",n[65]),ee(s,"blur",n[66]),ee(s,"keydown",n[22]),ee(s,"input",n[67]),ee(d,"click",n[68]),ee(t,"submit",Hi(n[21]))],E=!0)},p(M,Z){(!L||Z[0]&256)&&v(s,"placeholder",M[8]),(!L||Z[0]&256)&&v(s,"aria-label",M[8]),Z[0]&2&&s.value!==M[1]&&qt(s,M[1]),(!L||Z[0]&8)&&v(d,"title",M[3]),M[19]?S?Z[0]&524288&&Q(S,1):(S=ui(),S.c(),Q(S,1),S.m(l,null)):S&&(Je(),K(S,1,1,()=>{S=null}),$e()),(!L||Z[0]&2)&&oe(l,"displayable",M[1]!==""),M[5]===!0?_?(_.p(M,Z),Z[0]&32&&Q(_,1)):(_=ai(M),_.c(),Q(_,1),_.m(i,p)):_&&(Je(),K(_,1,1,()=>{_=null}),$e()),I&&I.p&&(!L||Z[1]&536870912)&&Zi(I,k,M,M[60],L?Fi(k,M[60],Z,null):qi(M[60]),null);let ne=m;m=W(M),m===ne?~m&&F[m].p(M,Z):(y&&(Je(),K(F[ne],1,1,()=>{F[ne]=null}),$e()),~m?(y=F[m],y?y.p(M,Z):(y=F[m]=G[m](M),y.c()),Q(y,1),y.m(t,null)):y=null),(!L||Z[0]&4&&w!==(w=Zt(M[2])+" svelte-1uvos7g"))&&v(t,"class",w),(!L||Z[0]&22)&&oe(t,"can-collapse",M[4]&&M[1]==="")},i(M){L||(Q(x),Q(o.$$.fragment,M),Q(c.$$.fragment,M),Q(S),Q(_),Q(I,M),Q(y),L=!0)},o(M){K(x),K(o.$$.fragment,M),K(c.$$.fragment,M),K(S),K(_),K(I,M),K(y),L=!1},d(M){M&&(U(e),U(t)),ye(o),n[63](null),ye(c),S&&S.d(),_&&_.d(),I&&I.d(M),~m&&F[m].d(),E=!1,ge(C)}}}function Hn(n,e,t){let i,{$$slots:r={},$$scope:o}=e;const a={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:s=void 0}=e,{apiKey:u}=e,{bbox:l=void 0}=e,{clearButtonTitle:d="clear"}=e,{clearOnBlur:c=!1}=e,{collapsed:f=!1}=e,{country:h=void 0}=e,{debounceSearch:p=200}=e,{enableReverse:b=!1}=e,{errorMessage:m="Something went wrong…"}=e,{filter:y=()=>!0}=e,{flyTo:w=!0}=e,{fuzzyMatch:L=!0}=e,{language:E=void 0}=e,{limit:C=void 0}=e,{mapController:x=void 0}=e,{minLength:S=2}=e,{noResultsMessage:_="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:k="Search"}=e,{proximity:I=[{type:"server-geolocation"}]}=e,{reverseActive:G=b==="always"}=e,{reverseButtonTitle:F="toggle reverse geocoding"}=e,{searchValue:W=""}=e,{showFullGeometry:M=!0}=e,{showPlaceType:Z="ifNeeded"}=e,{showResultsWhileTyping:ne=!0}=e,{selectFirst:ce=!0}=e,{flyToSelected:Mt=!1}=e,{markerOnSelected:rt=!0}=e,{types:Ne=void 0}=e,{exhaustiveReverseGeocoding:Ct=!1}=e,{excludeTypes:ot=!1}=e,{zoom:We=a}=e,{maxZoom:st=void 0}=e,{apiUrl:kt="https://api.maptiler.com/geocoding"}=e,{fetchParameters:Nt={}}=e,{iconsBaseUrl:Oi="https://cdn.maptiler.com/maptiler-geocoding-control/v2.0.0/icons/"}=e,{adjustUrlQuery:Tt=()=>{}}=e;function Nr(){fe.focus()}function Tr(){fe.blur()}function Wi(g,q=!0,Y=!1){t(1,W=g),q?(t(15,j=-1),Bi()):(Ot(!Y,Y),setTimeout(()=>{fe.focus(),fe.select()}))}function Pr(){t(14,R=void 0),t(57,N=void 0),t(15,j=-1)}function Rr(){t(56,H=[]),t(57,N=void 0)}let Ae=!1,R,H,N,Ai="",fe,j=-1,de,lt=[],Te,Be,ut,Pt;const Ir=new Set,Ce=Xi();Ki(()=>{x&&(x.setEventHandler(void 0),x.indicateReverse(!1),x.setSelectedMarker(-1),x.setMarkers(void 0,void 0))});function Bi(g){if(Be&&(clearTimeout(Be),Be=void 0),j>-1&&R)t(57,N=R[j]),t(1,W=N.place_type[0]==="reverse"?N.place_name:N.place_name.replace(/,.*/,"")),t(18,de=void 0),t(56,H=void 0),t(15,j=-1);else if(W){const q=g||!Rt(W);It(W,{exact:!0}).then(()=>{t(56,H=R),t(57,N=void 0),q&&Or()}).catch(Y=>t(18,de=Y))}}function Rt(g){try{return Gn(g,6)}catch{return!1}}async function It(g,{byId:q=!1,exact:Y=!1}={}){t(18,de=void 0),Te==null||Te.abort();const re=new AbortController;t(19,Te=re);try{const T=Rt(g),V=new URLSearchParams;if(E!==void 0&&V.set("language",Array.isArray(E)?E.join(","):E??""),Ne&&V.set("types",Ne.join(",")),ot&&V.set("excludeTypes",String(ot)),l&&V.set("bbox",l.map(at=>at.toFixed(6)).join(",")),h&&V.set("country",Array.isArray(h)?h.join(","):h),!q&&!T){const at=await Tn(x,I,re);at&&V.set("proximity",at),(Y||!ne)&&V.set("autocomplete","false"),V.set("fuzzyMatch",String(L))}C!==void 0&&(Ct||!T||(Ne==null?void 0:Ne.length)===1)&&V.set("limit",String(C)),V.set("key",u),Tt(V);const he=kt+"/"+encodeURIComponent(T?T.decimalLongitude+","+T.decimalLatitude:g)+".json?"+V.toString();if(he===Ai){q?(t(14,R=void 0),t(57,N=lt[0])):t(14,R=lt);return}Ai=he;const At=await fetch(he,{signal:re.signal,...Nt});if(!At.ok)throw new Error(await At.text());const Bt=await At.json();Ce("response",{url:he,featureCollection:Bt}),q?(t(14,R=void 0),t(57,N=Bt.features[0]),lt=[N]):(t(14,R=Bt.features.filter(y)),T&&R.unshift({type:"Feature",properties:{},id:"reverse_"+T.decimalLongitude+"_"+T.decimalLatitude,text:T.decimalLatitude+", "+T.decimalLongitude,place_name:T.decimalLatitude+", "+T.decimalLongitude,place_type:["reverse"],center:[T.decimalLongitude,T.decimalLatitude],bbox:[T.decimalLongitude,T.decimalLatitude,T.decimalLongitude,T.decimalLatitude],geometry:{type:"Point",coordinates:[T.decimalLongitude,T.decimalLatitude]}}),lt=R,T&&fe.focus())}catch(T){if(T&&typeof T=="object"&&"name"in T&&T.name==="AbortError")return;throw T}finally{re===Te&&t(19,Te=void 0)}}function Or(){var re;if(!(H!=null&&H.length)||!w)return;const g=[180,90,-180,-90],q=!H.some(T=>!T.matching_text);let Y;for(const T of H){const V=Ye(T);if(Y=st??(Y===void 0?V:V===void 0?Y:Math.max(Y,V)),q||!T.matching_text)for(const he of[0,1,2,3])g[he]=Math[he<2?"min":"max"](g[he],((re=T.bbox)==null?void 0:re[he])??T.center[he%2])}x&&H.length>0&&(N&&g[0]===g[2]&&g[1]===g[3]?x.flyTo(N.center,Ye(N)):x.fitBounds(et(g),50,Y))}function Ye(g){var Y;if(!g.bbox||g.bbox[0]!==g.bbox[2]&&g.bbox[1]!==g.bbox[3])return;if(typeof We=="number")return g.id.startsWith("poi.")||g.id.startsWith("address.")?st:We;const q=g.id.replace(/\..*/,"");return(Array.isArray((Y=g.properties)==null?void 0:Y.categories)?g.properties.categories.reduce((re,T)=>{const V=We[q+"."+T];return re===void 0?V:V===void 0?re:Math.max(re,V)},void 0):void 0)??We[q]}function Wr(g){t(0,G=b==="always"),t(14,R=void 0),t(57,N=void 0),t(15,j=-1),Wi(g[1].toFixed(6)+", "+Nn(g[0],[-180,180],!0).toFixed(6),!1,!0)}function Ar(g){if(!R)return;let q=g.key==="ArrowDown"?1:g.key==="ArrowUp"?-1:0;q&&(j===(ce?0:-1)&&q===-1&&t(15,j=R.length),t(15,j+=q),j>=R.length&&t(15,j=-1),j<0&&ce&&t(15,j=0),g.preventDefault())}function Ot(g=!0,q=!1){if(t(18,de=void 0),ne||q){if(Be&&clearTimeout(Be),W.length<S)return;const Y=W;Be=window.setTimeout(()=>{It(Y).catch(re=>t(18,de=re))},g?p:0)}else t(14,R=void 0),t(18,de=void 0)}function Wt(g){t(57,N=g),t(1,W=g.place_name),t(15,j=-1)}const Br=()=>fe.focus();function Dr(g){ft[g?"unshift":"push"](()=>{fe=g,t(17,fe)})}function Ur(){W=this.value,t(1,W),t(13,Ae),t(28,c)}const zr=()=>t(13,Ae=!0),Gr=()=>t(13,Ae=!1),jr=()=>Ot(),Fr=()=>{t(1,W=""),fe.focus()},Zr=()=>t(0,G=!G),qr=()=>t(18,de=void 0),Qr=g=>t(15,j=g),Hr=g=>Wt(g),Vr=()=>{ce||t(15,j=-1)},Yr=()=>{};return n.$$set=g=>{"class"in g&&t(2,s=g.class),"apiKey"in g&&t(26,u=g.apiKey),"bbox"in g&&t(27,l=g.bbox),"clearButtonTitle"in g&&t(3,d=g.clearButtonTitle),"clearOnBlur"in g&&t(28,c=g.clearOnBlur),"collapsed"in g&&t(4,f=g.collapsed),"country"in g&&t(29,h=g.country),"debounceSearch"in g&&t(30,p=g.debounceSearch),"enableReverse"in g&&t(5,b=g.enableReverse),"errorMessage"in g&&t(6,m=g.errorMessage),"filter"in g&&t(31,y=g.filter),"flyTo"in g&&t(32,w=g.flyTo),"fuzzyMatch"in g&&t(33,L=g.fuzzyMatch),"language"in g&&t(34,E=g.language),"limit"in g&&t(35,C=g.limit),"mapController"in g&&t(36,x=g.mapController),"minLength"in g&&t(37,S=g.minLength),"noResultsMessage"in g&&t(7,_=g.noResultsMessage),"placeholder"in g&&t(8,k=g.placeholder),"proximity"in g&&t(38,I=g.proximity),"reverseActive"in g&&t(0,G=g.reverseActive),"reverseButtonTitle"in g&&t(9,F=g.reverseButtonTitle),"searchValue"in g&&t(1,W=g.searchValue),"showFullGeometry"in g&&t(39,M=g.showFullGeometry),"showPlaceType"in g&&t(10,Z=g.showPlaceType),"showResultsWhileTyping"in g&&t(40,ne=g.showResultsWhileTyping),"selectFirst"in g&&t(11,ce=g.selectFirst),"flyToSelected"in g&&t(41,Mt=g.flyToSelected),"markerOnSelected"in g&&t(42,rt=g.markerOnSelected),"types"in g&&t(43,Ne=g.types),"exhaustiveReverseGeocoding"in g&&t(44,Ct=g.exhaustiveReverseGeocoding),"excludeTypes"in g&&t(45,ot=g.excludeTypes),"zoom"in g&&t(46,We=g.zoom),"maxZoom"in g&&t(47,st=g.maxZoom),"apiUrl"in g&&t(48,kt=g.apiUrl),"fetchParameters"in g&&t(49,Nt=g.fetchParameters),"iconsBaseUrl"in g&&t(12,Oi=g.iconsBaseUrl),"adjustUrlQuery"in g&&t(50,Tt=g.adjustUrlQuery),"$$scope"in g&&t(60,o=g.$$scope)},n.$$.update=()=>{if(n.$$.dirty[0]&32&&t(0,G=b==="always"),n.$$.dirty[0]&268443648&&setTimeout(()=>{t(16,ut=Ae),c&&!Ae&&t(1,W="")}),n.$$.dirty[0]&16386|n.$$.dirty[1]&64&&W.length<S&&(t(57,N=void 0),t(14,R=void 0),t(18,de=void 0),t(56,H=R)),n.$$.dirty[1]&67109120&&M&&N&&!N.address&&N.geometry.type==="Point"&&N.place_type[0]!=="reverse"&&It(N.id,{byId:!0}).catch(g=>t(18,de=g)),n.$$.dirty[1]&201326626&&(x&&N&&N.id!==Pt&&w&&(!N.bbox||N.bbox[0]===N.bbox[2]&&N.bbox[1]===N.bbox[3]?x.flyTo(N.center,Ye(N)):x.fitBounds(et(N.bbox),50,Ye(N)),t(14,R=void 0),t(56,H=void 0),t(15,j=-1)),t(58,Pt=N==null?void 0:N.id)),n.$$.dirty[0]&18432&&ce&&R!=null&&R.length&&t(15,j=0),n.$$.dirty[0]&2&&t(15,j=-1),n.$$.dirty[0]&16384|n.$$.dirty[1]&33554432&&H!==R&&t(56,H=void 0),n.$$.dirty[0]&81921|n.$$.dirty[1]&33554464&&x&&x.setEventHandler(g=>{switch(g.type){case"mapClick":G&&Wr(g.coordinates);break;case"markerClick":{const q=R==null?void 0:R.find(Y=>Y.id===g.id);q&&Wt(q)}break;case"markerMouseEnter":H&&t(15,j=ut?(R==null?void 0:R.findIndex(q=>q.id===g.id))??-1:-1);break;case"markerMouseLeave":H&&t(15,j=-1);break}}),n.$$.dirty[0]&49152&&t(59,i=R==null?void 0:R[j]),n.$$.dirty[1]&268436514&&x&&i&&w&&Mt&&x.flyTo(i.center,Ye(i)),n.$$.dirty[1]&2080&&(rt||x==null||x.setMarkers(void 0,void 0)),n.$$.dirty[1]&301991968&&x&&rt&&!H&&(x.setMarkers(i?[i]:void 0,void 0),x.setSelectedMarker(i?0:-1)),n.$$.dirty[1]&100663328&&x&&x.setMarkers(H,N),n.$$.dirty[0]&32768|n.$$.dirty[1]&33554464&&H&&x&&x.setSelectedMarker(j),n.$$.dirty[0]&2|n.$$.dirty[1]&32&&x){const g=Rt(W);x.setReverseMarker(g?[g.decimalLongitude,g.decimalLatitude]:void 0)}n.$$.dirty[1]&268435456&&Ce("select",i),n.$$.dirty[1]&67108864&&Ce("pick",N),n.$$.dirty[0]&81920&&Ce("optionsVisibilityChange",ut&&!!R),n.$$.dirty[0]&16384&&Ce("featuresListed",R),n.$$.dirty[1]&33554432&&Ce("featuresMarked",H),n.$$.dirty[0]&1&&Ce("reverseToggle",G),n.$$.dirty[0]&2&&Ce("queryChange",W),n.$$.dirty[0]&1|n.$$.dirty[1]&32&&x&&x.indicateReverse(G)},[G,W,s,d,f,b,m,_,k,F,Z,ce,Oi,Ae,R,j,ut,fe,de,Te,Ir,Bi,Ar,Ot,Wt,a,u,l,c,h,p,y,w,L,E,C,x,S,I,M,ne,Mt,rt,Ne,Ct,ot,We,st,kt,Nt,Tt,Nr,Tr,Wi,Pr,Rr,H,N,Pt,i,o,r,Br,Dr,Ur,zr,Gr,jr,Fr,Zr,qr,Qr,Hr,Vr,Yr]}let Vn=class extends Ee{constructor(e){super(),we(this,e,Hn,Qn,pe,{ZOOM_DEFAULTS:25,class:2,apiKey:26,bbox:27,clearButtonTitle:3,clearOnBlur:28,collapsed:4,country:29,debounceSearch:30,enableReverse:5,errorMessage:6,filter:31,flyTo:32,fuzzyMatch:33,language:34,limit:35,mapController:36,minLength:37,noResultsMessage:7,placeholder:8,proximity:38,reverseActive:0,reverseButtonTitle:9,searchValue:1,showFullGeometry:39,showPlaceType:10,showResultsWhileTyping:40,selectFirst:11,flyToSelected:41,markerOnSelected:42,types:43,exhaustiveReverseGeocoding:44,excludeTypes:45,zoom:46,maxZoom:47,apiUrl:48,fetchParameters:49,iconsBaseUrl:12,adjustUrlQuery:50,focus:51,blur:52,setQuery:53,clearList:54,clearMap:55},null,[-1,-1,-1])}get ZOOM_DEFAULTS(){return this.$$.ctx[25]}get focus(){return this.$$.ctx[51]}get blur(){return this.$$.ctx[52]}get setQuery(){return this.$$.ctx[53]}get clearList(){return this.$$.ctx[54]}get clearMap(){return this.$$.ctx[55]}};function Ze(n,e,t={}){const i={type:"Feature"};return(t.id===0||t.id)&&(i.id=t.id),t.bbox&&(i.bbox=t.bbox),i.properties=e||{},i.geometry=n,i}function yt(n,e,t={}){for(const r of n){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 Ze({type:"Polygon",coordinates:n},e,t)}function qe(n,e={}){const t={type:"FeatureCollection"};return e.id&&(t.id=e.id),e.bbox&&(t.bbox=e.bbox),t.features=n,t}function fi(n,e,t={}){return Ze({type:"MultiPolygon",coordinates:n},e,t)}/**
|
|
1
|
+
(function(I,D){typeof exports=="object"&&typeof module<"u"?D(exports,require("@maptiler/sdk")):typeof define=="function"&&define.amd?define(["exports","@maptiler/sdk"],D):(I=typeof globalThis<"u"?globalThis:I||self,D(I.maptilersdkMaptilerGeocoder={},I.maptilersdk))})(this,function(I,D){"use strict";var ys=Object.defineProperty;var Ki=I=>{throw TypeError(I)};var vs=(I,D,J)=>D in I?ys(I,D,{enumerable:!0,configurable:!0,writable:!0,value:J}):I[D]=J;var ne=(I,D,J)=>vs(I,typeof D!="symbol"?D+"":D,J),Xi=(I,D,J)=>D.has(I)||Ki("Cannot "+J);var Y=(I,D,J)=>(Xi(I,D,"read from private field"),J?J.call(I):D.get(I)),Ht=(I,D,J)=>D.has(I)?Ki("Cannot add the same private member more than once"):D instanceof WeakSet?D.add(I):D.set(I,J),Vt=(I,D,J,je)=>(Xi(I,D,"write to private field"),je?je.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 je=J(D);function F(){}function Ji(i,e){for(const t in e)i[t]=e[t];return i}function Yt(i){return i()}function Kt(){return Object.create(null)}function pe(i){i.forEach(Yt)}function Xt(i){return typeof i=="function"}function Ee(i,e){return i!=i?e==e:i!==e||i&&typeof i=="object"||typeof i=="function"}let et;function $(i,e){return i===e?!0:(et||(et=document.createElement("a")),et.href=e,i===et.href)}function $i(i){return Object.keys(i).length===0}function en(i,e,t,n){if(i){const r=Jt(i,e,t,n);return i[0](r)}}function Jt(i,e,t,n){return i[1]&&n?Ji(t.ctx.slice(),i[1](n(e))):t.ctx}function tn(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 s=[],u=Math.max(e.dirty.length,r.length);for(let o=0;o<u;o+=1)s[o]=e.dirty[o]|r[o];return s}return e.dirty|r}return e.dirty}function nn(i,e,t,n,r,s){if(r){const u=Jt(e,t,n,s);i.p(u,r)}}function rn(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 tt(i){return i??""}function z(i,e){i.appendChild(e)}function G(i,e,t){i.insertBefore(e,t||null)}function j(i){i.parentNode&&i.parentNode.removeChild(i)}function U(i){return document.createElement(i)}function ue(i){return document.createElementNS("http://www.w3.org/2000/svg",i)}function we(i){return document.createTextNode(i)}function re(){return we(" ")}function sn(){return we("")}function K(i,e,t,n){return i.addEventListener(e,t,n),()=>i.removeEventListener(e,t,n)}function on(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 ln(i){return Array.from(i.childNodes)}function Ge(i,e){e=""+e,i.data!==e&&(i.data=e)}function $t(i,e){i.value=e??""}function he(i,e,t){i.classList.toggle(e,!!t)}function un(i,e,{bubbles:t=!1,cancelable:n=!1}={}){return new CustomEvent(i,{detail:e,bubbles:t,cancelable:n})}let qe;function Qe(i){qe=i}function ei(){if(!qe)throw new Error("Function called outside component initialization");return qe}function an(i){ei().$$.on_destroy.push(i)}function ti(){const i=ei();return(e,t,{cancelable:n=!1}={})=>{const r=i.$$.callbacks[e];if(r){const s=un(e,t,{cancelable:n});return r.slice().forEach(u=>{u.call(i,s)}),!s.defaultPrevented}return!0}}function cn(i,e){const t=i.$$.callbacks[e.type];t&&t.slice().forEach(n=>n.call(this,e))}const ze=[],bt=[];let Ae=[];const ii=[],fn=Promise.resolve();let _t=!1;function dn(){_t||(_t=!0,fn.then(ni))}function Et(i){Ae.push(i)}const wt=new Set;let We=0;function ni(){if(We!==0)return;const i=qe;do{try{for(;We<ze.length;){const e=ze[We];We++,Qe(e),hn(e.$$)}}catch(e){throw ze.length=0,We=0,e}for(Qe(null),ze.length=0,We=0;bt.length;)bt.pop()();for(let e=0;e<Ae.length;e+=1){const t=Ae[e];wt.has(t)||(wt.add(t),t())}Ae.length=0}while(ze.length);for(;ii.length;)ii.pop()();_t=!1,wt.clear(),Qe(i)}function hn(i){if(i.fragment!==null){i.update(),pe(i.before_update);const e=i.dirty;i.dirty=[-1],i.fragment&&i.fragment.p(i.ctx,e),i.after_update.forEach(Et)}}function gn(i){const e=[],t=[];Ae.forEach(n=>i.indexOf(n)===-1?e.push(n):t.push(n)),t.forEach(n=>n()),Ae=e}const it=new Set;let Re;function nt(){Re={r:0,c:[],p:Re}}function rt(){Re.r||pe(Re.c),Re=Re.p}function Z(i,e){i&&i.i&&(it.delete(i),i.i(e))}function X(i,e,t,n){if(i&&i.o){if(it.has(i))return;it.add(i),Re.c.push(()=>{it.delete(i),n&&(t&&i.d(1),n())}),i.o(e)}else n&&n()}function ri(i){return(i==null?void 0:i.length)!==void 0?i:Array.from(i)}function mn(i,e){X(i,1,1,()=>{e.delete(i.key)})}function pn(i,e,t,n,r,s,u,o,c,l,f,a){let d=i.length,h=s.length,v=d;const E={};for(;v--;)E[i[v].key]=v;const m=[],y=new Map,b=new Map,_=[];for(v=h;v--;){const M=a(r,s,v),S=t(M);let R=u.get(S);R?_.push(()=>R.p(M,e)):(R=l(S,M),R.c()),y.set(S,m[v]=R),S in E&&b.set(S,Math.abs(v-E[S]))}const L=new Set,N=new Set;function x(M){Z(M,1),M.m(o,f),u.set(M.key,M),f=M.first,h--}for(;d&&h;){const M=m[h-1],S=i[d-1],R=M.key,w=S.key;M===S?(f=M.first,d--,h--):y.has(w)?!u.has(R)||L.has(R)?x(M):N.has(w)?d--:b.get(R)>b.get(w)?(N.add(R),x(M)):(L.add(w),d--):(c(S,u),d--)}for(;d--;){const M=i[d];y.has(M.key)||c(M,u)}for(;h;)x(m[h-1]);return pe(_),m}function Le(i){i&&i.c()}function ye(i,e,t){const{fragment:n,after_update:r}=i.$$;n&&n.m(e,t),Et(()=>{const s=i.$$.on_mount.map(Yt).filter(Xt);i.$$.on_destroy?i.$$.on_destroy.push(...s):pe(s),i.$$.on_mount=[]}),r.forEach(Et)}function ve(i,e){const t=i.$$;t.fragment!==null&&(gn(t.after_update),pe(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function yn(i,e){i.$$.dirty[0]===-1&&(ze.push(i),dn(),i.$$.dirty.fill(0)),i.$$.dirty[e/31|0]|=1<<e%31}function Se(i,e,t,n,r,s,u=null,o=[-1]){const c=qe;Qe(i);const l=i.$$={fragment:null,ctx:[],props:s,update:F,not_equal:r,bound:Kt(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(c?c.$$.context:[])),callbacks:Kt(),dirty:o,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,...h)=>{const v=h.length?h[0]:d;return l.ctx&&r(l.ctx[a],l.ctx[a]=v)&&(!l.skip_bound&&l.bound[a]&&l.bound[a](v),f&&yn(i,a)),d}):[],l.update(),f=!0,pe(l.before_update),l.fragment=n?n(l.ctx):!1,e.target){if(e.hydrate){const a=ln(e.target);l.fragment&&l.fragment.l(a),a.forEach(j)}else l.fragment&&l.fragment.c();e.intro&&Z(i.$$.fragment),ye(i,e.target,e.anchor),ni()}Qe(c)}class xe{constructor(){ne(this,"$$");ne(this,"$$set")}$destroy(){ve(this,1),this.$destroy=F}$on(e,t){if(!Xt(t))return F;const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{const r=n.indexOf(t);r!==-1&&n.splice(r,1)}}$set(e){this.$$set&&!$i(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const vn="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(vn);function bn(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:F,i:F,o:F,d(n){n&&j(e)}}}class si extends xe{constructor(e){super(),Se(this,e,null,bn,Ee,{})}}function _n(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:F,i:F,o:F,d(n){n&&j(e)}}}class oi extends xe{constructor(e){super(),Se(this,e,null,_n,Ee,{})}}function En(i){let e,t;return{c(){e=U("img"),$(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&&!$(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&&j(e)}}}function wn(i){let e,t;return{c(){e=U("img"),$(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&&!$(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&&j(e)}}}function Ln(i){let e,t;return{c(){e=U("img"),$(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&&!$(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&&j(e)}}}function Sn(i){let e,t;return{c(){e=U("img"),$(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&&!$(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&&j(e)}}}function xn(i){let e,t;return{c(){e=U("img"),$(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&&!$(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&&j(e)}}}function Mn(i){let e,t;return{c(){e=U("img"),$(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&&!$(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&&j(e)}}}function kn(i){let e,t;return{c(){e=U("img"),$(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&&!$(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&&j(e)}}}function Cn(i){let e,t,n,r;return{c(){e=U("img"),$(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(s,u){G(s,e,u),n||(r=K(e,"error",i[14]),n=!0)},p(s,u){u&32&&!$(e.src,t=s[5])&&p(e,"src",t),u&16&&p(e,"alt",s[4]),u&64&&p(e,"title",s[6])},d(s){s&&j(e),n=!1,r()}}}function li(i){let e,t;return{c(){e=U("span"),t=we(i[6]),p(e,"class","secondary svelte-z7p9pp")},m(n,r){G(n,e,r),z(e,t)},p(n,r){r&64&&Ge(t,n[6])},d(n){n&&j(e)}}}function Nn(i){let e,t,n,r,s,u,o,c,l,f=(i[8]?i[0].place_name:i[0].place_name.replace(/,.*/,""))+"",a,d,h=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,N,x;function M(k,C){return C&1&&(t=null),C&1&&(n=null),C&1&&(r=null),C&1&&(s=null),k[5]?Cn:k[0].address?kn:(t==null&&(t=!!k[0].id.startsWith("road.")),t?Mn:(n==null&&(n=!!k[0].id.startsWith("address.")),n?xn:(r==null&&(r=!!k[0].id.startsWith("postal_code.")),r?Sn:(s==null&&(s=!!k[0].id.startsWith("poi.")),s?Ln:k[8]?wn:En))))}let S=M(i,-1),R=S(i),w=h&&li(i);return{c(){e=U("li"),R.c(),u=re(),o=U("span"),c=U("span"),l=U("span"),a=we(f),d=re(),w&&w.c(),v=re(),E=U("span"),y=we(m),p(l,"class","primary svelte-z7p9pp"),p(c,"class","svelte-z7p9pp"),p(E,"class","line2 svelte-z7p9pp"),p(o,"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=tt(i[1])+" svelte-z7p9pp")},m(k,C){G(k,e,C),R.m(e,null),z(e,u),z(e,o),z(o,c),z(c,l),z(l,a),z(c,d),w&&w.m(c,null),z(o,v),z(o,E),z(E,y),N||(x=[K(e,"mouseenter",i[13]),K(e,"focus",i[15]),K(e,"click",i[16])],N=!0)},p(k,[C]){S===(S=M(k,C))&&R?R.p(k,C):(R.d(1),R=S(k),R&&(R.c(),R.m(e,u))),C&1&&f!==(f=(k[8]?k[0].place_name:k[0].place_name.replace(/,.*/,""))+"")&&Ge(a,f),C&37&&(h=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]),h?w?w.p(k,C):(w=li(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*/,""))+"")&&Ge(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=tt(k[1])+" svelte-z7p9pp")&&p(e,"class",L)},i:F,o:F,d(k){k&&j(e),R.d(),w&&w.d(),N=!1,pe(x)}}}function Tn(i,e,t){var N;let n,r,{feature:s}=e,{style:u="default"}=e,{showPlaceType:o}=e,{missingIconsCache:c}=e,{iconsBaseUrl:l}=e;const f=ti(),a=(N=s.properties)==null?void 0:N.categories;let d,h,v=0,E=s.place_type[0]==="reverse";function m(){h&&c.add(h),t(11,v++,v)}function y(x){cn.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,s=x.feature),"style"in x&&t(1,u=x.style),"showPlaceType"in x&&t(2,o=x.showPlaceType),"missingIconsCache"in x&&t(10,c=x.missingIconsCache),"iconsBaseUrl"in x&&t(3,l=x.iconsBaseUrl)},i.$$.update=()=>{var x,M,S,R;if(i.$$.dirty&7224)do t(12,n--,n),t(4,d=a==null?void 0:a[n]),t(5,h=d?l+d.replace(/ /g,"_")+".svg":void 0);while(n>-1&&(!h||c.has(h)));i.$$.dirty&1&&t(6,r=((M=(x=s.properties)==null?void 0:x.categories)==null?void 0:M.join(", "))??((R=(S=s.properties)==null?void 0:S.place_type_name)==null?void 0:R[0])??s.place_type[0])},t(12,n=(a==null?void 0:a.length)??0),[s,u,o,l,d,h,r,f,E,m,c,v,n,y,b,_,L]}class Pn extends xe{constructor(e){super(),Se(this,e,Tn,Nn,Ee,{feature:0,style:1,showPlaceType:2,missingIconsCache:10,iconsBaseUrl:3})}}function Rn(i){let e;return{c(){e=U("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:F,i:F,o:F,d(t){t&&j(e)}}}class On extends xe{constructor(e){super(),Se(this,e,null,Rn,Ee,{})}}function In(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"),he(e,"in-map",i[0]!=="list"),he(e,"list-icon",i[0]==="list")},m(r,s){G(r,e,s),z(e,t)},p(r,[s]){s&1&&n!==(n=r[0]==="list"?20:void 0)&&p(e,"width",n),s&1&&he(e,"in-map",r[0]!=="list"),s&1&&he(e,"list-icon",r[0]==="list")},i:F,o:F,d(r){r&&j(e)}}}function zn(i,e,t){let{displayIn:n}=e;return i.$$set=r=>{"displayIn"in r&&t(0,n=r.displayIn)},[n]}class An extends xe{constructor(e){super(),Se(this,e,zn,In,Ee,{displayIn:0})}}function Wn(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:F,i:F,o:F,d(n){n&&j(e)}}}class Bn extends xe{constructor(e){super(),Se(this,e,null,Wn,Ee,{})}}function Un(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,s){G(r,e,s),z(e,t),z(e,n)},p:F,i:F,o:F,d(r){r&&j(e)}}}class Dn extends xe{constructor(e){super(),Se(this,e,null,Un,Ee,{})}}function Fn(i,e,t){const n=e[1],r=e[0],s=n-r;return i===n&&t?i:((i-r)%s+s)%s+r}function st(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 Ze;async function jn(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(Ze&&r.cachedLocationExpiry&&Ze.time+r.cachedLocationExpiry>Date.now()){if(!Ze.coords)break e;return Ze.coords}let s;try{return s=await new Promise((u,o)=>{t.signal.addEventListener("abort",()=>{o(Error("aborted"))}),navigator.geolocation.getCurrentPosition(c=>{u([c.coords.longitude,c.coords.latitude].map(l=>l.toFixed(6)).join(","))},c=>{o(c)},r)}),s}catch{}finally{r.cachedLocationExpiry&&(Ze={time:Date.now(),coords:s})}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 Gn=/^(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,ui=/^([+-]?[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,})$/,ai=/^(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,fi=/^(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,di=/^(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 qn(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(h=>Number(h.trim())),t=Number(e[0]),n=Number(e[1]),r=Math.abs(t),s=Math.abs(n),u=t>0?"N":"S",o=n>0?"E":"W";let c;i=="DD"&&(c=`${r}° ${u}, ${s}° ${o}`);const l=Math.floor(r),f=Math.floor(s),a=(r-l)*60,d=(s-f)*60;if(i=="DM"){let h=hi(a,3).toFixed(3).padStart(6,"0"),v=hi(d,3).toFixed(3).padStart(6,"0");h.endsWith(".000")&&v.endsWith(".000")&&(h=h.replace(/\.000$/,""),v=v.replace(/\.000$/,"")),c=`${l}° ${h}' ${u}, ${f}° ${v}' ${o}`}if(i=="DMS"){const h=Math.floor(a),v=Math.floor(d);let E=((a-h)*60).toFixed(1).padStart(4,"0"),m=((d-v)*60).toFixed(1).padStart(4,"0");const y=h.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}" ${o}`}return c}else throw new Error("no decimal coordinates to convert")}function hi(i,e){const t=Math.pow(10,e);return Math.round((i+Number.EPSILON)*t)/t}function Lt(i,e){e||(e=5),i=i.replace(/\s+/g," ").trim();let t=null,n=null,r="",s="",u=null,o=[],c=!1;if(Gn.test(i))throw new Error("invalid coordinate value");if(ui.test(i))if(o=ui.exec(i),c=He(o),c)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),u="DM";else throw new Error("invalid coordinate format");else if(ai.test(i))if(o=ai.exec(i),c=He(o),c){if(t=o[2],n=o[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");o[1]?(r=o[1],s=o[5]):o[4]&&(r=o[4],s=o[8])}else throw new Error("invalid decimal coordinate format");else if(ci.test(i))if(o=ci.exec(i),c=He(o),c)t=Math.abs(parseInt(o[2])),o[4]&&(t+=o[4]/60,u="DM"),o[6]&&(t+=o[6].replace(",",".")/3600,u="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],s=o[8]):o[7]&&(r=o[7],s=o[14]);else throw new Error("invalid DMS coordinates format");else if(fi.test(i))if(o=fi.exec(i),c=He(o),c)t=Math.abs(parseInt(o[2])),o[4]&&(t+=o[4]/60,u="DM"),o[6]&&(t+=o[6]/3600,u="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],s=o[9]):o[8]&&(r=o[8],s=o[16]);else throw new Error("invalid DMS coordinates format");else if(di.test(i)){if(o=di.exec(i),c=He(o),o.filter(l=>l).length<=5)throw new Error("invalid coordinates format");if(c)t=Math.abs(parseInt(o[2])),o[4]&&(t+=o[4].replace(",",".")/60,u="DM"),o[6]&&(t+=o[6].replace(",",".")/3600,u="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],s=o[9]):o[8]&&(r=o[8],s=o[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&&!s||!r&&s)throw new Error("invalid coordinates value");if(r&&r==s)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(s)&&n>0&&(n=-1*n);const f=o[0].trim();let a,d;const h=/[,/;\u0020]/g,v=f.match(h);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:Qn,toCoordinateFormat:qn})}else throw new Error("coordinates pattern match failed")}function He(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 s=0;s<r;s++){const u=e[s],o=e[s+r],c=t.test(u)&&t.test(o),l=n.test(u)&&n.test(o),f=u==o;if(!(u==null&&o==null)){if(u==null||o==null)return!1;if(c||l||f)continue;return!1}}return!0}function gi(i,e){const t=Math.abs(i-e);return Number(t.toFixed(6))<=1e-5}function Qn(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 gi(this.decimalLatitude,Number(e[0]))&&gi(this.decimalLongitude,e[1])}else throw new Error("coords being tested must be separated by a comma")}const Zn=Object.freeze({DMS:"DMS",DM:"DM",DD:"DD"});Lt.to=Zn;const Hn=[{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"}],Vn={decimalLatitude:40.123,decimalLongitude:-74.123},Yn=[{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}],Kn=[{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 Xn(){const i=[];return Hn.forEach(e=>{e.decimalLatitude?i.push(e):i.push({...e,...Vn})}),[...i,...Yn,...Kn]}const Jn=Xn();Lt.formats=Jn.map(i=>i.verbatimCoordinates);const $n=Lt;function mi(i,e,t){const n=i.slice();return n[91]=e[t],n[93]=t,n}function pi(i){let e,t;return e=new On({}),{c(){Le(e.$$.fragment)},m(n,r){ye(e,n,r),t=!0},i(n){t||(Z(e.$$.fragment,n),t=!0)},o(n){X(e.$$.fragment,n),t=!1},d(n){ve(e,n)}}}function yi(i){let e,t,n,r,s;return t=new Bn({}),{c(){e=U("button"),Le(t.$$.fragment),p(e,"type","button"),p(e,"title",i[10]),p(e,"class","svelte-bz0zu3"),he(e,"active",i[0])},m(u,o){G(u,e,o),ye(t,e,null),n=!0,r||(s=K(e,"click",i[76]),r=!0)},p(u,o){(!n||o[0]&1024)&&p(e,"title",u[10]),(!n||o[0]&1)&&he(e,"active",u[0])},i(u){n||(Z(t.$$.fragment,u),n=!0)},o(u){X(t.$$.fragment,u),n=!1},d(u){u&&j(e),ve(t),r=!1,s()}}}function er(i){let e,t=[],n=new Map,r,s,u,o=ri(i[13]);const c=l=>l[91].id+(l[91].address?","+l[91].address:"");for(let l=0;l<o.length;l+=1){let f=mi(i,o,l),a=c(f);n.set(a,t[l]=vi(a,f))}return{c(){e=U("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,s||(u=[K(e,"mouseleave",i[27]),K(e,"blur",i[80]),K(e,"keydown",i[23])],s=!0)},p(l,f){f[0]&102823936&&(o=ri(l[13]),nt(),t=pn(t,f,c,1,l,o,n,e,mn,vi,null,mi),rt())},i(l){if(!r){for(let f=0;f<o.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&&j(e);for(let f=0;f<t.length;f+=1)t[f].d();s=!1,pe(u)}}}function tr(i){let e,t,n,r,s,u;return t=new oi({}),{c(){e=U("div"),Le(t.$$.fragment),n=re(),r=U("div"),s=we(i[8]),p(r,"class","svelte-bz0zu3"),p(e,"class","no-results svelte-bz0zu3")},m(o,c){G(o,e,c),ye(t,e,null),z(e,n),z(e,r),z(r,s),u=!0},p(o,c){(!u||c[0]&256)&&Ge(s,o[8])},i(o){u||(Z(t.$$.fragment,o),u=!0)},o(o){X(t.$$.fragment,o),u=!1},d(o){o&&j(e),ve(t)}}}function ir(i){let e="",t;return{c(){t=we(e)},m(n,r){G(n,t,r)},p:F,i:F,o:F,d(n){n&&j(t)}}}function nr(i){let e,t,n,r,s,u,o,c,l,f,a;return t=new oi({}),c=new si({}),{c(){e=U("div"),Le(t.$$.fragment),n=re(),r=U("div"),s=we(i[7]),u=re(),o=U("button"),Le(c.$$.fragment),p(r,"class","svelte-bz0zu3"),p(o,"class","svelte-bz0zu3"),p(e,"class","error svelte-bz0zu3")},m(d,h){G(d,e,h),ye(t,e,null),z(e,n),z(e,r),z(r,s),z(e,u),z(e,o),ye(c,o,null),l=!0,f||(a=K(o,"click",i[77]),f=!0)},p(d,h){(!l||h[0]&128)&&Ge(s,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&&j(e),ve(t),ve(c),f=!1,a()}}}function vi(i,e){var o;let t,n,r;function s(){return e[78](e[93])}function u(){return e[79](e[91])}return n=new Pn({props:{feature:e[91],showPlaceType:e[11],style:e[15]===e[93]?"selected":((o=e[14])==null?void 0:o.id)===e[91].id?"picked":"default",missingIconsCache:e[21],iconsBaseUrl:e[12]}}),n.$on("mouseenter",s),n.$on("select",u),{key:i,first:null,c(){t=sn(),Le(n.$$.fragment),this.first=t},m(c,l){G(c,t,l),ye(n,c,l),r=!0},p(c,l){var a;e=c;const f={};l[0]&8192&&(f.feature=e[91]),l[0]&2048&&(f.showPlaceType=e[11]),l[0]&57344&&(f.style=e[15]===e[93]?"selected":((a=e[14])==null?void 0:a.id)===e[91].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&&j(t),ve(n,c)}}}function rr(i){let e,t,n,r,s,u,o,c,l,f,a,d,h,v,E,m,y,b,_,L,N,x=!1;s=new Dn({}),a=new si({});let M=i[20]&&pi(),S=i[6]==="button"&&yi(i);const R=i[67].default,w=en(R,i,i[66],null),k=[nr,ir,tr,er],C=[];function ie(T,W){var ce,Q;return T[19]?0:!T[16]&&!T[4]?1:((ce=T[13])==null?void 0:ce.length)===0?2:(Q=T[13])!=null&&Q.length&&(T[16]||T[4])?3:-1}return~(m=ie(i))&&(y=C[m]=k[m](i)),{c(){e=re(),t=U("form"),n=U("div"),r=U("button"),Le(s.$$.fragment),u=re(),o=U("input"),c=re(),l=U("div"),f=U("button"),Le(a.$$.fragment),d=re(),M&&M.c(),h=re(),S&&S.c(),v=re(),w&&w.c(),E=re(),y&&y.c(),p(r,"class","search-button svelte-bz0zu3"),p(r,"type","button"),p(o,"placeholder",i[9]),p(o,"aria-label",i[9]),p(o,"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"),he(l,"displayable",i[1]!==""),p(n,"class","input-group svelte-bz0zu3"),p(t,"class",b=tt(i[2])+" svelte-bz0zu3"),he(t,"can-collapse",i[5]&&i[1]==="")},m(T,W){G(T,e,W),G(T,t,W),z(t,n),z(n,r),ye(s,r,null),z(n,u),z(n,o),i[69](o),$t(o,i[1]),z(n,c),z(n,l),z(l,f),ye(a,f,null),z(l,d),M&&M.m(l,null),z(n,h),S&&S.m(n,null),z(n,v),w&&w.m(n,null),z(t,E),~m&&C[m].m(t,null),_=!0,L||(N=[K(r,"click",i[68]),K(o,"input",i[70]),K(o,"focus",i[71]),K(o,"blur",i[72]),K(o,"click",i[73]),K(o,"keydown",i[23]),K(o,"input",i[24]),K(o,"change",i[74]),K(f,"click",i[75]),K(t,"submit",on(i[22]))],L=!0)},p(T,W){(!_||W[0]&512)&&p(o,"placeholder",T[9]),(!_||W[0]&512)&&p(o,"aria-label",T[9]),W[0]&2&&o.value!==T[1]&&$t(o,T[1]),(!_||W[0]&8)&&p(f,"title",T[3]),T[20]?M?W[0]&1048576&&Z(M,1):(M=pi(),M.c(),Z(M,1),M.m(l,null)):M&&(nt(),X(M,1,1,()=>{M=null}),rt()),(!_||W[0]&2)&&he(l,"displayable",T[1]!==""),T[6]==="button"?S?(S.p(T,W),W[0]&64&&Z(S,1)):(S=yi(T),S.c(),Z(S,1),S.m(n,v)):S&&(nt(),X(S,1,1,()=>{S=null}),rt()),w&&w.p&&(!_||W[2]&16)&&nn(w,R,T,T[66],_?tn(R,T[66],W,null):rn(T[66]),null);let ce=m;m=ie(T),m===ce?~m&&C[m].p(T,W):(y&&(nt(),X(C[ce],1,1,()=>{C[ce]=null}),rt()),~m?(y=C[m],y?y.p(T,W):(y=C[m]=k[m](T),y.c()),Z(y,1),y.m(t,null)):y=null),(!_||W[0]&4&&b!==(b=tt(T[2])+" svelte-bz0zu3"))&&p(t,"class",b),(!_||W[0]&38)&&he(t,"can-collapse",T[5]&&T[1]==="")},i(T){_||(Z(x),Z(s.$$.fragment,T),Z(a.$$.fragment,T),Z(M),Z(S),Z(w,T),Z(y),_=!0)},o(T){X(x),X(s.$$.fragment,T),X(a.$$.fragment,T),X(M),X(S),X(w,T),X(y),_=!1},d(T){T&&(j(e),j(t)),ve(s),i[69](null),ve(a),M&&M.d(),S&&S.d(),w&&w.d(T),~m&&C[m].d(),L=!1,pe(N)}}}function sr(i,e,t){let n,r,s,{$$slots:u={},$$scope:o}=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:h=!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:N=()=>!0}=e,{flyTo:x=!0}=e,{fuzzyMatch:M=!0}=e,{language:S=void 0}=e,{limit:R=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:ie="Search"}=e,{proximity:T=[{type:"server-geolocation"}]}=e,{reverseActive:W=_==="always"}=e,{reverseButtonTitle:ce="toggle reverse geocoding"}=e,{searchValue:Q=""}=e,{pickedResultStyle:ct="full-geometry"}=e,{showPlaceType:Gi="if-needed"}=e,{showResultsWhileTyping:ft=!0}=e,{selectFirst:Ue=!0}=e,{flyToSelected:dt=!1}=e,{markerOnSelected:ht=!0}=e,{types:Oe=void 0}=e,{exhaustiveReverseGeocoding:It=!1}=e,{excludeTypes:gt=!1}=e,{zoom:mt=c}=e,{apiUrl:zt="https://api.maptiler.com/geocoding"}=e,{fetchParameters:At={}}=e,{iconsBaseUrl:qi="https://cdn.maptiler.com/maptiler-geocoding-control/v2.1.0-rc1/icons/"}=e,{adjustUrlQuery:Wt=()=>{}}=e,{adjustUrl:Bt=()=>{}}=e;function Yr(g){fe.focus(g)}function Kr(){fe.blur()}function Qi(g,q=!0,H=!1){t(1,Q=g),q?(t(15,B=-1),Hi()):(Vi(void 0,!H,H),setTimeout(()=>{fe.focus(),fe.select()}))}function Xr(){t(13,O=void 0),t(14,P=void 0),t(15,B=-1)}function Jr(){t(61,V=[]),t(14,P=void 0)}let O,V,P,Zi="",fe,B=-1,ge,pt=[],Ie,De,Fe,Ut,_e=!1;const $r=new Set,Pe=ti();an(()=>{w&&(w.setEventHandler(void 0),w.indicateReverse(!1),w.setSelectedMarker(-1),w.setFeatures(void 0,void 0,!1))});function Hi(g){if(t(17,_e=!1),De&&(clearTimeout(De),De=void 0),B>-1&&O)t(14,P=O[B]),t(1,Q=P.place_type[0]==="reverse"?P.place_name:P.place_name.replace(/,.*/,"")),t(19,ge=void 0),t(61,V=void 0),t(15,B=-1);else if(Q){const q=g||!Dt(Q);Ft(Q,{exact:!0}).then(()=>{t(61,V=O),t(14,P=void 0),q&&es()}).catch(H=>t(19,ge=H))}}function Dt(g){try{return $n(g,6)}catch{return!1}}async function Ft(g,{byId:q=!1,exact:H=!1}={}){var oe,me;t(19,ge=void 0),Ie==null||Ie.abort();const se=new AbortController;t(20,Ie=se);try{const A=Dt(g),qt=new URL(zt+"/"+encodeURIComponent(A?A.decimalLongitude+","+A.decimalLatitude:g)+".json"),de=qt.searchParams;if(S!==void 0&&de.set("language",Array.isArray(S)?S.join(","):S??""),Oe&&de.set("types",Oe.join(",")),gt&&de.set("excludeTypes",String(gt)),a&&de.set("bbox",a.map(vt=>vt.toFixed(6)).join(",")),y&&de.set("country",Array.isArray(y)?y.join(","):y),!q&&!A){const vt=await jn(w,T,se);vt&&de.set("proximity",vt),(H||!ft)&&de.set("autocomplete","false"),de.set("fuzzyMatch",String(M))}R!==void 0&&(It||!A||(Oe==null?void 0:Oe.length)===1)&&de.set("limit",String(R)),de.set("key",f),Wt(de),Bt(qt);const yt=qt.toString();if(yt===Zi){q?(v&&t(13,O=void 0),t(14,P=pt[0])):(t(13,O=pt),((oe=O[B])==null?void 0:oe.id)!==(r==null?void 0:r.id)&&t(15,B=-1));return}Zi=yt;const Qt=await fetch(yt,{signal:se.signal,...At});if(!Qt.ok)throw new Error(await Qt.text());const Zt=await Qt.json();Pe("response",{url:yt,featureCollection:Zt}),q?(v&&t(13,O=void 0),t(14,P=Zt.features[0]),pt=[P]):(t(13,O=Zt.features.filter(N)),A&&O.unshift({type:"Feature",properties:{},id:"reverse_"+A.decimalLongitude+"_"+A.decimalLatitude,text:A.decimalLatitude+", "+A.decimalLongitude,place_name:A.decimalLatitude+", "+A.decimalLongitude,place_type:["reverse"],center:[A.decimalLongitude,A.decimalLatitude],bbox:[A.decimalLongitude,A.decimalLatitude,A.decimalLongitude,A.decimalLatitude],geometry:{type:"Point",coordinates:[A.decimalLongitude,A.decimalLatitude]}}),pt=O,((me=O[B])==null?void 0:me.id)!==(r==null?void 0:r.id)&&t(15,B=-1),A&&fe.focus())}catch(A){if(A&&typeof A=="object"&&"name"in A&&A.name==="AbortError")return;throw A}finally{se===Ie&&t(20,Ie=void 0)}}function es(){var se;if(!(V!=null&&V.length)||!x)return;const g=[180,90,-180,-90],q=!V.some(oe=>!oe.matching_text);let H;for(const oe of V){const me=$e(oe);if(H=H===void 0?me:me===void 0?H:Math.max(H,me),q||!oe.matching_text)for(const A of[0,1,2,3])g[A]=Math[A<2?"min":"max"](g[A],((se=oe.bbox)==null?void 0:se[A])??oe.center[A%2])}w&&V.length>0&&(P&&g[0]===g[2]&&g[1]===g[3]?w.flyTo(P.center,$e(P)):w.fitBounds(st(g),50,H))}function jt(){!P||!w||(!P.bbox||P.bbox[0]===P.bbox[2]&&P.bbox[1]===P.bbox[3]?w.flyTo(P.center,$e(P)):w.fitBounds(st(P.bbox),50,$e(P)))}function $e(g){var H;if(!g.bbox||g.bbox[0]!==g.bbox[2]&&g.bbox[1]!==g.bbox[3])return;const q=g.id.replace(/\..*/,"");return(Array.isArray((H=g.properties)==null?void 0:H.categories)?g.properties.categories.reduce((se,oe)=>{const me=mt[q+"."+oe];return se===void 0?me:me===void 0?se:Math.max(se,me)},void 0):void 0)??mt[q]}function ts(g){t(0,W=_==="always"),t(13,O=void 0),t(14,P=void 0),t(15,B=-1),Qi(g[1].toFixed(6)+", "+Fn(g[0],[-180,180],!0).toFixed(6),!1,!0)}function is(g){if(!O)return;let q=g.key==="ArrowDown"?1:g.key==="ArrowUp"?-1:0;q&&(fe.focus(),t(17,_e=!0),g.preventDefault(),P&&B===-1&&t(15,B=O.findIndex(H=>H.id===(P==null?void 0:P.id))),B===(P||Ue?0:-1)&&q===-1&&t(15,B=O.length),t(15,B+=q),B>=O.length&&t(15,B=-1),B<0&&(P||Ue)&&t(15,B=0))}function Vi(g,q=!0,H=!1){if(t(19,ge=void 0),t(14,P=void 0),t(17,_e=!0),ft||H){if(De&&clearTimeout(De),Q.length<k)return;const se=Q;De=window.setTimeout(()=>{Ft(se).catch(oe=>t(19,ge=oe))},q?b:0)}else t(13,O=void 0),t(19,ge=void 0)}function Gt(g){P&&(P==null?void 0:P.id)===(g==null?void 0:g.id)?jt():(t(14,P=g),t(1,Q=g.place_name))}function Yi(g){t(15,B=g)}function ns(){(!Ue||P)&&t(15,B=-1),dt&&jt()}const rs=()=>fe.focus();function ss(g){bt[g?"unshift":"push"](()=>{fe=g,t(18,fe)})}function os(){Q=this.value,t(1,Q),t(17,_e),t(31,h),t(16,Fe)}const ls=()=>t(17,_e=!0),us=()=>t(17,_e=!1),as=()=>t(17,_e=!0),cs=()=>t(14,P=void 0),fs=()=>{t(1,Q=""),fe.focus()},ds=()=>t(0,W=!W),hs=()=>t(19,ge=void 0),gs=g=>Yi(g),ms=g=>Gt(g),ps=()=>{};return i.$$set=g=>{"class"in g&&t(2,l=g.class),"apiKey"in g&&t(29,f=g.apiKey),"bbox"in g&&t(30,a=g.bbox),"clearButtonTitle"in g&&t(3,d=g.clearButtonTitle),"clearOnBlur"in g&&t(31,h=g.clearOnBlur),"clearListOnPick"in g&&t(32,v=g.clearListOnPick),"keepListOpen"in g&&t(4,E=g.keepListOpen),"collapsed"in g&&t(5,m=g.collapsed),"country"in g&&t(33,y=g.country),"debounceSearch"in g&&t(34,b=g.debounceSearch),"enableReverse"in g&&t(6,_=g.enableReverse),"errorMessage"in g&&t(7,L=g.errorMessage),"filter"in g&&t(35,N=g.filter),"flyTo"in g&&t(36,x=g.flyTo),"fuzzyMatch"in g&&t(37,M=g.fuzzyMatch),"language"in g&&t(38,S=g.language),"limit"in g&&t(39,R=g.limit),"mapController"in g&&t(40,w=g.mapController),"minLength"in g&&t(41,k=g.minLength),"noResultsMessage"in g&&t(8,C=g.noResultsMessage),"placeholder"in g&&t(9,ie=g.placeholder),"proximity"in g&&t(42,T=g.proximity),"reverseActive"in g&&t(0,W=g.reverseActive),"reverseButtonTitle"in g&&t(10,ce=g.reverseButtonTitle),"searchValue"in g&&t(1,Q=g.searchValue),"pickedResultStyle"in g&&t(43,ct=g.pickedResultStyle),"showPlaceType"in g&&t(11,Gi=g.showPlaceType),"showResultsWhileTyping"in g&&t(44,ft=g.showResultsWhileTyping),"selectFirst"in g&&t(45,Ue=g.selectFirst),"flyToSelected"in g&&t(46,dt=g.flyToSelected),"markerOnSelected"in g&&t(47,ht=g.markerOnSelected),"types"in g&&t(48,Oe=g.types),"exhaustiveReverseGeocoding"in g&&t(49,It=g.exhaustiveReverseGeocoding),"excludeTypes"in g&&t(50,gt=g.excludeTypes),"zoom"in g&&t(51,mt=g.zoom),"apiUrl"in g&&t(52,zt=g.apiUrl),"fetchParameters"in g&&t(53,At=g.fetchParameters),"iconsBaseUrl"in g&&t(12,qi=g.iconsBaseUrl),"adjustUrlQuery"in g&&t(54,Wt=g.adjustUrlQuery),"adjustUrl"in g&&t(55,Bt=g.adjustUrl),"$$scope"in g&&t(66,o=g.$$scope)},i.$$.update=()=>{if(i.$$.dirty[0]&64&&t(0,W=_==="always"),i.$$.dirty[0]&16384|i.$$.dirty[1]&4096&&ct!=="marker-only"&&P&&!P.address&&P.geometry.type==="Point"&&P.place_type[0]!=="reverse"&&Ft(P.id,{byId:!0}).catch(g=>t(19,ge=g)),i.$$.dirty[0]&16384|i.$$.dirty[1]&546|i.$$.dirty[2]&1&&(w&&P&&P.id!==Ut&&x&&(jt(),v&&t(13,O=void 0),t(61,V=void 0),t(15,B=-1)),t(62,Ut=P==null?void 0:P.id)),i.$$.dirty[0]&196608|i.$$.dirty[1]&1&&setTimeout(()=>{t(16,Fe=_e),h&&!Fe&&t(1,Q="")}),i.$$.dirty[0]&8194|i.$$.dirty[1]&1024&&Q.length<k&&(t(13,O=void 0),t(19,ge=void 0),t(61,V=O)),i.$$.dirty[0]&57344|i.$$.dirty[1]&16384&&Ue&&O!=null&&O.length&&B==-1&&!P&&t(15,B=0),i.$$.dirty[0]&8192|i.$$.dirty[1]&1073741824&&V!==O&&t(61,V=void 0),i.$$.dirty[0]&73729|i.$$.dirty[1]&1073742336&&w&&w.setEventHandler(g=>{switch(g.type){case"mapClick":W&&ts(g.coordinates);break;case"markerClick":{const q=O==null?void 0:O.find(H=>H.id===g.id);q&&Gt(q)}break;case"markerMouseEnter":V&&t(15,B=Fe?(O==null?void 0:O.findIndex(q=>q.id===g.id))??-1:-1);break;case"markerMouseLeave":V&&t(15,B=-1);break}}),i.$$.dirty[0]&40960&&t(63,r=O==null?void 0:O[B]),i.$$.dirty[1]&33312|i.$$.dirty[2]&2&&w&&r&&x&&dt&&w.flyTo(r.center,$e(r)),i.$$.dirty[1]&4096&&t(65,n=ct==="full-geometry-including-polygon-center-marker"),i.$$.dirty[1]&66048|i.$$.dirty[2]&8&&(ht||w==null||w.setFeatures(void 0,void 0,n)),i.$$.dirty[0]&16384|i.$$.dirty[1]&1073807872|i.$$.dirty[2]&10&&w&&ht&&!V&&(w.setFeatures(r?[r]:void 0,P,n),w.setSelectedMarker(r?0:-1)),i.$$.dirty[0]&16384|i.$$.dirty[1]&1073742336|i.$$.dirty[2]&8&&w&&w.setFeatures(V,P,n),i.$$.dirty[0]&32768|i.$$.dirty[1]&1073742336&&V&&w&&w.setSelectedMarker(B),i.$$.dirty[0]&2|i.$$.dirty[1]&512&&w){const g=Dt(Q);w.setReverseMarker(g?[g.decimalLongitude,g.decimalLatitude]:void 0)}i.$$.dirty[2]&2&&Pe("select",{feature:r}),i.$$.dirty[0]&16384&&Pe("pick",{feature:P}),i.$$.dirty[0]&73744&&t(64,s=!!(O!=null&&O.length)&&(Fe||E)),i.$$.dirty[2]&4&&Pe("optionsvisibilitychange",{optionsVisible:s}),i.$$.dirty[0]&8192&&Pe("featureslisted",{features:O}),i.$$.dirty[1]&1073741824&&Pe("featuresmarked",{features:V}),i.$$.dirty[0]&1&&Pe("reversetoggle",{reverse:W}),i.$$.dirty[0]&2&&Pe("querychange",{query:Q}),i.$$.dirty[0]&1|i.$$.dirty[1]&512&&w&&w.indicateReverse(W)},[W,Q,l,d,E,m,_,L,C,ie,ce,Gi,qi,O,P,B,Fe,_e,fe,ge,Ie,$r,Hi,is,Vi,Gt,Yi,ns,c,f,a,h,v,y,b,N,x,M,S,R,w,k,T,ct,ft,Ue,dt,ht,Oe,It,gt,mt,zt,At,Wt,Bt,Yr,Kr,Qi,Xr,Jr,V,Ut,r,s,n,o,u,rs,ss,os,ls,us,as,cs,fs,ds,hs,gs,ms,ps]}let or=class extends xe{constructor(e){super(),Se(this,e,sr,rr,Ee,{ZOOM_DEFAULTS:28,class:2,apiKey:29,bbox:30,clearButtonTitle:3,clearOnBlur:31,clearListOnPick:32,keepListOpen:4,collapsed:5,country:33,debounceSearch:34,enableReverse:6,errorMessage:7,filter:35,flyTo:36,fuzzyMatch:37,language:38,limit:39,mapController:40,minLength:41,noResultsMessage:8,placeholder:9,proximity:42,reverseActive:0,reverseButtonTitle:10,searchValue:1,pickedResultStyle:43,showPlaceType:11,showResultsWhileTyping:44,selectFirst:45,flyToSelected:46,markerOnSelected:47,types:48,exhaustiveReverseGeocoding:49,excludeTypes:50,zoom:51,apiUrl:52,fetchParameters:53,iconsBaseUrl:12,adjustUrlQuery:54,adjustUrl:55,focus:56,blur:57,setQuery:58,clearList:59,clearMap:60},null,[-1,-1,-1,-1])}get ZOOM_DEFAULTS(){return this.$$.ctx[28]}get focus(){return this.$$.ctx[56]}get blur(){return this.$$.ctx[57]}get setQuery(){return this.$$.ctx[58]}get clearList(){return this.$$.ctx[59]}get clearMap(){return this.$$.ctx[60]}};function Ve(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 St(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 s=0;s<r[r.length-1].length;s++)if(r[r.length-1][s]!==r[0][s])throw new Error("First and last Position are not equivalent.")}return Ve({type:"Polygon",coordinates:i},e,t)}function Ye(i,e={}){const t={type:"FeatureCollection"};return e.id&&(t.id=e.id),e.bbox&&(t.bbox=e.bbox),t.features=i,t}function bi(i,e,t={}){return Ve({type:"MultiPolygon",coordinates:i},e,t)}/**
|
|
2
2
|
* splaytree v3.1.2
|
|
3
3
|
* Fast Splay tree for Node and browser
|
|
4
4
|
*
|
|
@@ -18,6 +18,6 @@
|
|
|
18
18
|
|
|
19
19
|
See the Apache Version 2.0 License for specific language governing permissions
|
|
20
20
|
and limitations under the License.
|
|
21
|
-
***************************************************************************** */function
|
|
22
|
-
`);var o=e+(t?" ":"│ ");n.left&&pt(n.left,o,!1,i,r),n.right&&pt(n.right,o,!0,i,r)}}var bt=function(){function n(e){e===void 0&&(e=Kn),this._root=null,this._size=0,this._comparator=e}return n.prototype.insert=function(e,t){return this._size++,this._root=vt(e,t,this._root,this._comparator)},n.prototype.add=function(e,t){var i=new Le(e,t);this._root===null&&(i.left=i.right=null,this._size++,this._root=i);var r=this._comparator,o=Se(e,this._root,r),a=r(e,o.key);return a===0?this._root=o:(a<0?(i.left=o.left,i.right=o,o.left=null):a>0&&(i.right=o.right,i.left=o,o.right=null),this._size++,this._root=i),this._root},n.prototype.remove=function(e){this._root=this._remove(e,this._root,this._comparator)},n.prototype._remove=function(e,t,i){var r;if(t===null)return null;t=Se(e,t,i);var o=i(e,t.key);return o===0?(t.left===null?r=t.right:(r=Se(e,t.left,i),r.right=t.right),this._size--,r):t},n.prototype.pop=function(){var e=this._root;if(e){for(;e.left;)e=e.left;return this._root=Se(e.key,this._root,this._comparator),this._root=this._remove(e.key,this._root,this._comparator),{key:e.key,data:e.data}}return null},n.prototype.findStatic=function(e){for(var t=this._root,i=this._comparator;t;){var r=i(e,t.key);if(r===0)return t;r<0?t=t.left:t=t.right}return null},n.prototype.find=function(e){return this._root&&(this._root=Se(e,this._root,this._comparator),this._comparator(e,this._root.key)!==0)?null:this._root},n.prototype.contains=function(e){for(var t=this._root,i=this._comparator;t;){var r=i(e,t.key);if(r===0)return!0;r<0?t=t.left:t=t.right}return!1},n.prototype.forEach=function(e,t){for(var i=this._root,r=[],o=!1;!o;)i!==null?(r.push(i),i=i.left):r.length!==0?(i=r.pop(),e.call(t,i),i=i.right):o=!0;return this},n.prototype.range=function(e,t,i,r){for(var o=[],a=this._comparator,s=this._root,u;o.length!==0||s;)if(s)o.push(s),s=s.left;else{if(s=o.pop(),u=a(s.key,t),u>0)break;if(a(s.key,e)>=0&&i.call(r,s))return this;s=s.right}return this},n.prototype.keys=function(){var e=[];return this.forEach(function(t){var i=t.key;return e.push(i)}),e},n.prototype.values=function(){var e=[];return this.forEach(function(t){var i=t.data;return e.push(i)}),e},n.prototype.min=function(){return this._root?this.minNode(this._root).key:null},n.prototype.max=function(){return this._root?this.maxNode(this._root).key:null},n.prototype.minNode=function(e){if(e===void 0&&(e=this._root),e)for(;e.left;)e=e.left;return e},n.prototype.maxNode=function(e){if(e===void 0&&(e=this._root),e)for(;e.right;)e=e.right;return e},n.prototype.at=function(e){for(var t=this._root,i=!1,r=0,o=[];!i;)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 i=!0;return null},n.prototype.next=function(e){var t=this._root,i=null;if(e.right){for(i=e.right;i.left;)i=i.left;return i}for(var r=this._comparator;t;){var o=r(e.key,t.key);if(o===0)break;o<0?(i=t,t=t.left):t=t.right}return i},n.prototype.prev=function(e){var t=this._root,i=null;if(e.left!==null){for(i=e.left;i.right;)i=i.right;return i}for(var r=this._comparator;t;){var o=r(e.key,t.key);if(o===0)break;o<0?t=t.left:(i=t,t=t.right)}return i},n.prototype.clear=function(){return this._root=null,this._size=0,this},n.prototype.toList=function(){return $n(this._root)},n.prototype.load=function(e,t,i){t===void 0&&(t=[]),i===void 0&&(i=!1);var r=e.length,o=this._comparator;if(i&&Et(e,t,0,r-1,o),this._root===null)this._root=_t(e,t,0,r),this._size=r;else{var a=er(this.toList(),Jn(e,t),o);r=this._size+r,this._root=wt({head:a},0,r)}return this},n.prototype.isEmpty=function(){return this._root===null},Object.defineProperty(n.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"root",{get:function(){return this._root},enumerable:!0,configurable:!0}),n.prototype.toString=function(e){e===void 0&&(e=function(i){return String(i.key)});var t=[];return pt(this._root,"",!0,function(i){return t.push(i)},e),t.join("")},n.prototype.update=function(e,t,i){var r=this._comparator,o=di(e,this._root,r),a=o.left,s=o.right;r(e,t)<0?s=vt(t,i,s,r):a=vt(t,i,a,r),this._root=Xn(a,s,r)},n.prototype.split=function(e){return di(e,this._root,this._comparator)},n.prototype[Symbol.iterator]=function(){var e,t,i;return Yn(this,function(r){switch(r.label){case 0:e=this._root,t=[],i=!1,r.label=1;case 1:return i?[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:i=!0,r.label=5;case 5:return[3,1];case 6:return[2]}})},n}();function _t(n,e,t,i){var r=i-t;if(r>0){var o=t+Math.floor(r/2),a=n[o],s=e[o],u=new Le(a,s);return u.left=_t(n,e,t,o),u.right=_t(n,e,o+1,i),u}return null}function Jn(n,e){for(var t=new Le(null,null),i=t,r=0;r<n.length;r++)i=i.next=new Le(n[r],e[r]);return i.next=null,t.next}function $n(n){for(var e=n,t=[],i=!1,r=new Le(null,null),o=r;!i;)e?(t.push(e),e=e.left):t.length>0?(e=o=o.next=t.pop(),e=e.right):i=!0;return o.next=null,r.next}function wt(n,e,t){var i=t-e;if(i>0){var r=e+Math.floor(i/2),o=wt(n,e,r),a=n.head;return a.left=o,n.head=n.head.next,a.right=wt(n,r+1,t),a}return null}function er(n,e,t){for(var i=new Le(null,null),r=i,o=n,a=e;o!==null&&a!==null;)t(o.key,a.key)<0?(r.next=o,o=o.next):(r.next=a,a=a.next),r=r.next;return o!==null?r.next=o:a!==null&&(r.next=a),i.next}function Et(n,e,t,i,r){if(!(t>=i)){for(var o=n[t+i>>1],a=t-1,s=i+1;;){do a++;while(r(n[a],o)<0);do s--;while(r(n[s],o)>0);if(a>=s)break;var u=n[a];n[a]=n[s],n[s]=u,u=e[a],e[a]=e[s],e[s]=u}Et(n,e,t,s,r),Et(n,e,s+1,i,r)}}const ve=11102230246251565e-32,$=134217729,tr=(3+8*ve)*ve;function Lt(n,e,t,i,r){let o,a,s,u,l=e[0],d=i[0],c=0,f=0;d>l==d>-l?(o=l,l=e[++c]):(o=d,d=i[++f]);let h=0;if(c<n&&f<t)for(d>l==d>-l?(a=l+o,s=o-(a-l),l=e[++c]):(a=d+o,s=o-(a-d),d=i[++f]),o=a,s!==0&&(r[h++]=s);c<n&&f<t;)d>l==d>-l?(a=o+l,u=a-o,s=o-(a-u)+(l-u),l=e[++c]):(a=o+d,u=a-o,s=o-(a-u)+(d-u),d=i[++f]),o=a,s!==0&&(r[h++]=s);for(;c<n;)a=o+l,u=a-o,s=o-(a-u)+(l-u),l=e[++c],o=a,s!==0&&(r[h++]=s);for(;f<t;)a=o+d,u=a-o,s=o-(a-u)+(d-u),d=i[++f],o=a,s!==0&&(r[h++]=s);return(o!==0||h===0)&&(r[h++]=o),h}function ir(n,e){let t=e[0];for(let i=1;i<n;i++)t+=e[i];return t}function Qe(n){return new Float64Array(n)}const nr=(3+16*ve)*ve,rr=(2+12*ve)*ve,or=(9+64*ve)*ve*ve,Oe=Qe(4),hi=Qe(8),gi=Qe(12),mi=Qe(16),te=Qe(4);function sr(n,e,t,i,r,o,a){let s,u,l,d,c,f,h,p,b,m,y,w,L,E,C,x,S,_;const k=n-r,I=t-r,G=e-o,F=i-o;E=k*F,f=$*k,h=f-(f-k),p=k-h,f=$*F,b=f-(f-F),m=F-b,C=p*m-(E-h*b-p*b-h*m),x=G*I,f=$*G,h=f-(f-G),p=G-h,f=$*I,b=f-(f-I),m=I-b,S=p*m-(x-h*b-p*b-h*m),y=C-S,c=C-y,Oe[0]=C-(y+c)+(c-S),w=E+y,c=w-E,L=E-(w-c)+(y-c),y=L-x,c=L-y,Oe[1]=L-(y+c)+(c-x),_=w+y,c=_-w,Oe[2]=w-(_-c)+(y-c),Oe[3]=_;let W=ir(4,Oe),M=rr*a;if(W>=M||-W>=M||(c=n-k,s=n-(k+c)+(c-r),c=t-I,l=t-(I+c)+(c-r),c=e-G,u=e-(G+c)+(c-o),c=i-F,d=i-(F+c)+(c-o),s===0&&u===0&&l===0&&d===0)||(M=or*a+tr*Math.abs(W),W+=k*d+F*s-(G*l+I*u),W>=M||-W>=M))return W;E=s*F,f=$*s,h=f-(f-s),p=s-h,f=$*F,b=f-(f-F),m=F-b,C=p*m-(E-h*b-p*b-h*m),x=u*I,f=$*u,h=f-(f-u),p=u-h,f=$*I,b=f-(f-I),m=I-b,S=p*m-(x-h*b-p*b-h*m),y=C-S,c=C-y,te[0]=C-(y+c)+(c-S),w=E+y,c=w-E,L=E-(w-c)+(y-c),y=L-x,c=L-y,te[1]=L-(y+c)+(c-x),_=w+y,c=_-w,te[2]=w-(_-c)+(y-c),te[3]=_;const Z=Lt(4,Oe,4,te,hi);E=k*d,f=$*k,h=f-(f-k),p=k-h,f=$*d,b=f-(f-d),m=d-b,C=p*m-(E-h*b-p*b-h*m),x=G*l,f=$*G,h=f-(f-G),p=G-h,f=$*l,b=f-(f-l),m=l-b,S=p*m-(x-h*b-p*b-h*m),y=C-S,c=C-y,te[0]=C-(y+c)+(c-S),w=E+y,c=w-E,L=E-(w-c)+(y-c),y=L-x,c=L-y,te[1]=L-(y+c)+(c-x),_=w+y,c=_-w,te[2]=w-(_-c)+(y-c),te[3]=_;const ne=Lt(Z,hi,4,te,gi);E=s*d,f=$*s,h=f-(f-s),p=s-h,f=$*d,b=f-(f-d),m=d-b,C=p*m-(E-h*b-p*b-h*m),x=u*l,f=$*u,h=f-(f-u),p=u-h,f=$*l,b=f-(f-l),m=l-b,S=p*m-(x-h*b-p*b-h*m),y=C-S,c=C-y,te[0]=C-(y+c)+(c-S),w=E+y,c=w-E,L=E-(w-c)+(y-c),y=L-x,c=L-y,te[1]=L-(y+c)+(c-x),_=w+y,c=_-w,te[2]=w-(_-c)+(y-c),te[3]=_;const ce=Lt(ne,gi,4,te,mi);return mi[ce-1]}function lr(n,e,t,i,r,o){const a=(e-o)*(t-r),s=(n-r)*(i-o),u=a-s,l=Math.abs(a+s);return Math.abs(u)>=nr*l?u:-sr(n,e,t,i,r,o,l)}const He=(n,e)=>n.ll.x<=e.x&&e.x<=n.ur.x&&n.ll.y<=e.y&&e.y<=n.ur.y,St=(n,e)=>{if(e.ur.x<n.ll.x||n.ur.x<e.ll.x||e.ur.y<n.ll.y||n.ur.y<e.ll.y)return null;const t=n.ll.x<e.ll.x?e.ll.x:n.ll.x,i=n.ur.x<e.ur.x?n.ur.x:e.ur.x,r=n.ll.y<e.ll.y?e.ll.y:n.ll.y,o=n.ur.y<e.ur.y?n.ur.y:e.ur.y;return{ll:{x:t,y:r},ur:{x:i,y:o}}};let xe=Number.EPSILON;xe===void 0&&(xe=Math.pow(2,-52));const ur=xe*xe,yi=(n,e)=>{if(-xe<n&&n<xe&&-xe<e&&e<xe)return 0;const t=n-e;return t*t<ur*n*e?0:n<e?-1:1};class ar{constructor(){this.reset()}reset(){this.xRounder=new vi,this.yRounder=new vi}round(e,t){return{x:this.xRounder.round(e),y:this.yRounder.round(t)}}}class vi{constructor(){this.tree=new bt,this.round(0)}round(e){const t=this.tree.add(e),i=this.tree.prev(t);if(i!==null&&yi(t.key,i.key)===0)return this.tree.remove(e),i.key;const r=this.tree.next(t);return r!==null&&yi(t.key,r.key)===0?(this.tree.remove(e),r.key):e}}const Ve=new ar,tt=(n,e)=>n.x*e.y-n.y*e.x,pi=(n,e)=>n.x*e.x+n.y*e.y,bi=(n,e,t)=>{const i=lr(n.x,n.y,e.x,e.y,t.x,t.y);return i>0?-1:i<0?1:0},it=n=>Math.sqrt(pi(n,n)),cr=(n,e,t)=>{const i={x:e.x-n.x,y:e.y-n.y},r={x:t.x-n.x,y:t.y-n.y};return tt(r,i)/it(r)/it(i)},fr=(n,e,t)=>{const i={x:e.x-n.x,y:e.y-n.y},r={x:t.x-n.x,y:t.y-n.y};return pi(r,i)/it(r)/it(i)},_i=(n,e,t)=>e.y===0?null:{x:n.x+e.x/e.y*(t-n.y),y:t},wi=(n,e,t)=>e.x===0?null:{x:t,y:n.y+e.y/e.x*(t-n.x)},dr=(n,e,t,i)=>{if(e.x===0)return wi(t,i,n.x);if(i.x===0)return wi(n,e,t.x);if(e.y===0)return _i(t,i,n.y);if(i.y===0)return _i(n,e,t.y);const r=tt(e,i);if(r==0)return null;const o={x:t.x-n.x,y:t.y-n.y},a=tt(o,e)/r,s=tt(o,i)/r,u=n.x+s*e.x,l=t.x+a*i.x,d=n.y+s*e.y,c=t.y+a*i.y,f=(u+l)/2,h=(d+c)/2;return{x:f,y:h}};class se{static compare(e,t){const i=se.comparePoints(e.point,t.point);return i!==0?i:(e.point!==t.point&&e.link(t),e.isLeft!==t.isLeft?e.isLeft?1:-1:Me.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 i=0,r=t.length;i<r;i++){const o=t[i];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 i=this.point.events[t];if(i.segment.consumedBy===void 0)for(let r=t+1;r<e;r++){const o=this.point.events[r];o.consumedBy===void 0&&i.otherSE.point.events===o.otherSE.point.events&&i.segment.consume(o.segment)}}}getAvailableLinkedEvents(){const e=[];for(let t=0,i=this.point.events.length;t<i;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,i=r=>{const o=r.otherSE;t.set(r,{sine:cr(this.point,e.point,o.point),cosine:fr(this.point,e.point,o.point)})};return(r,o)=>{t.has(r)||i(r),t.has(o)||i(o);const{sine:a,cosine:s}=t.get(r),{sine:u,cosine:l}=t.get(o);return a>=0&&u>=0?s<l?1:s>l?-1:0:a<0&&u<0?s<l?-1:s>l?1:0:u<a?-1:u>a?1:0}}}let hr=0;class Me{static compare(e,t){const i=e.leftSE.point.x,r=t.leftSE.point.x,o=e.rightSE.point.x,a=t.rightSE.point.x;if(a<i)return 1;if(o<r)return-1;const s=e.leftSE.point.y,u=t.leftSE.point.y,l=e.rightSE.point.y,d=t.rightSE.point.y;if(i<r){if(u<s&&u<l)return 1;if(u>s&&u>l)return-1;const c=e.comparePoint(t.leftSE.point);if(c<0)return 1;if(c>0)return-1;const f=t.comparePoint(e.rightSE.point);return f!==0?f:-1}if(i>r){if(s<u&&s<d)return-1;if(s>u&&s>d)return 1;const c=t.comparePoint(e.leftSE.point);if(c!==0)return c;const f=e.comparePoint(t.rightSE.point);return f<0?1:f>0?-1:1}if(s<u)return-1;if(s>u)return 1;if(o<a){const c=t.comparePoint(e.rightSE.point);if(c!==0)return c}if(o>a){const c=e.comparePoint(t.rightSE.point);if(c<0)return 1;if(c>0)return-1}if(o!==a){const c=l-s,f=o-i,h=d-u,p=a-r;if(c>f&&h<p)return 1;if(c<f&&h>p)return-1}return o>a?1:o<a||l<d?-1:l>d?1:e.id<t.id?-1:e.id>t.id?1:0}constructor(e,t,i,r){this.id=++hr,this.leftSE=e,e.segment=this,e.otherSE=t,this.rightSE=t,t.segment=this,t.otherSE=e,this.rings=i,this.windings=r}static fromRing(e,t,i){let r,o,a;const s=se.comparePoints(e,t);if(s<0)r=e,o=t,a=1;else if(s>0)r=t,o=e,a=-1;else throw new Error(`Tried to create degenerate segment at [${e.x}, ${e.y}]`);const u=new se(r,!0),l=new se(o,!1);return new Me(u,l,[i],[a])}replaceRightSE(e){this.rightSE=e,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}bbox(){const e=this.leftSE.point.y,t=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:e<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,i=this.rightSE.point,r=this.vector();if(t.x===i.x)return e.x===t.x?0:e.x<t.x?1:-1;const o=(e.y-t.y)/r.y,a=t.x+o*r.x;if(e.x===a)return 0;const s=(e.x-t.x)/r.x,u=t.y+s*r.y;return e.y===u?0:e.y<u?-1:1}getIntersection(e){const t=this.bbox(),i=e.bbox(),r=St(t,i);if(r===null)return null;const o=this.leftSE.point,a=this.rightSE.point,s=e.leftSE.point,u=e.rightSE.point,l=He(t,s)&&this.comparePoint(s)===0,d=He(i,o)&&e.comparePoint(o)===0,c=He(t,u)&&this.comparePoint(u)===0,f=He(i,a)&&e.comparePoint(a)===0;if(d&&l)return f&&!c?a:!f&&c?u:null;if(d)return c&&o.x===u.x&&o.y===u.y?null:o;if(l)return f&&a.x===s.x&&a.y===s.y?null:s;if(f&&c)return null;if(f)return a;if(c)return u;const h=dr(o,this.vector(),s,e.vector());return h===null||!He(r,h)?null:Ve.round(h.x,h.y)}split(e){const t=[],i=e.events!==void 0,r=new se(e,!0),o=new se(e,!1),a=this.rightSE;this.replaceRightSE(o),t.push(o),t.push(r);const s=new Me(r,a,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(),i&&(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,i=this.windings.length;t<i;t++)this.windings[t]*=-1}consume(e){let t=this,i=e;for(;t.consumedBy;)t=t.consumedBy;for(;i.consumedBy;)i=i.consumedBy;const r=Me.compare(t,i);if(r!==0){if(r>0){const o=t;t=i,i=o}if(t.prev===i){const o=t;t=i,i=o}for(let o=0,a=i.rings.length;o<a;o++){const s=i.rings[o],u=i.windings[o],l=t.rings.indexOf(s);l===-1?(t.rings.push(s),t.windings.push(u)):t.windings[l]+=u}i.rings=null,i.windings=null,i.consumedBy=t,i.leftSE.consumedBy=t.leftSE,i.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,i=this._afterState.windings,r=this._afterState.multiPolys;for(let s=0,u=this.rings.length;s<u;s++){const l=this.rings[s],d=this.windings[s],c=t.indexOf(l);c===-1?(t.push(l),i.push(d)):i[c]+=d}const o=[],a=[];for(let s=0,u=t.length;s<u;s++){if(i[s]===0)continue;const l=t[s],d=l.poly;if(a.indexOf(d)===-1)if(l.isExterior)o.push(d);else{a.indexOf(d)===-1&&a.push(d);const c=o.indexOf(l.poly);c!==-1&&o.splice(c,1)}}for(let s=0,u=o.length;s<u;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 i=e.length===0,r=t.length===0;this._isInResult=i!==r;break}case"intersection":{let i,r;e.length<t.length?(i=e.length,r=t.length):(i=t.length,r=e.length),this._isInResult=r===ae.numMultiPolys&&i<r;break}case"xor":{const i=Math.abs(e.length-t.length);this._isInResult=i%2===1;break}case"difference":{const i=r=>r.length===1&&r[0].isSubject;this._isInResult=i(e)!==i(t);break}default:throw new Error(`Unrecognized operation type found ${ae.type}`)}return this._isInResult}}class Ei{constructor(e,t,i){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=i,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=Ve.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 a=1,s=e.length;a<s;a++){if(typeof e[a][0]!="number"||typeof e[a][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");let u=Ve.round(e[a][0],e[a][1]);u.x===o.x&&u.y===o.y||(this.segments.push(Me.fromRing(o,u,this)),u.x<this.bbox.ll.x&&(this.bbox.ll.x=u.x),u.y<this.bbox.ll.y&&(this.bbox.ll.y=u.y),u.x>this.bbox.ur.x&&(this.bbox.ur.x=u.x),u.y>this.bbox.ur.y&&(this.bbox.ur.y=u.y),o=u)}(r.x!==o.x||r.y!==o.y)&&this.segments.push(Me.fromRing(o,r,this))}getSweepEvents(){const e=[];for(let t=0,i=this.segments.length;t<i;t++){const r=this.segments[t];e.push(r.leftSE),e.push(r.rightSE)}return e}}class gr{constructor(e,t){if(!Array.isArray(e))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");this.exteriorRing=new Ei(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 i=1,r=e.length;i<r;i++){const o=new Ei(e[i],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,i=this.interiorRings.length;t<i;t++){const r=this.interiorRings[t].getSweepEvents();for(let o=0,a=r.length;o<a;o++)e.push(r[o])}return e}}class Li{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 i=0,r=e.length;i<r;i++){const o=new gr(e[i],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,i=this.polys.length;t<i;t++){const r=this.polys[t].getSweepEvents();for(let o=0,a=r.length;o<a;o++)e.push(r[o])}return e}}class nt{static factory(e){const t=[];for(let i=0,r=e.length;i<r;i++){const o=e[i];if(!o.isInResult()||o.ringOut)continue;let a=null,s=o.leftSE,u=o.rightSE;const l=[s],d=s.point,c=[];for(;a=s,s=u,l.push(s),s.point!==d;)for(;;){const f=s.getAvailableLinkedEvents();if(f.length===0){const b=l[0].point,m=l[l.length-1].point;throw new Error(`Unable to complete output ring starting at [${b.x}, ${b.y}]. Last matching segment found ends at [${m.x}, ${m.y}].`)}if(f.length===1){u=f[0].otherSE;break}let h=null;for(let b=0,m=c.length;b<m;b++)if(c[b].point===s.point){h=b;break}if(h!==null){const b=c.splice(h)[0],m=l.splice(b.index);m.unshift(m[0].otherSE),t.push(new nt(m.reverse()));continue}c.push({index:l.length,point:s.point});const p=s.getLeftmostComparator(a);u=f.sort(p)[0].otherSE;break}t.push(new nt(l))}return t}constructor(e){this.events=e;for(let t=0,i=e.length;t<i;t++)e[t].segment.ringOut=this;this.poly=null}getGeom(){let e=this.events[0].point;const t=[e];for(let l=1,d=this.events.length-1;l<d;l++){const c=this.events[l].point,f=this.events[l+1].point;bi(c,e,f)!==0&&(t.push(c),e=c)}if(t.length===1)return null;const i=t[0],r=t[1];bi(i,e,r)===0&&t.shift(),t.push(t[0]);const o=this.isExteriorRing()?1:-1,a=this.isExteriorRing()?0:t.length-1,s=this.isExteriorRing()?t.length:-1,u=[];for(let l=a;l!=s;l+=o)u.push([t[l].x,t[l].y]);return u}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 a=this.events[r];se.compare(e,a)>0&&(e=a)}let t=e.segment.prevInResult(),i=t?t.prevInResult():null;for(;;){if(!t)return null;if(!i)return t.ringOut;if(i.ringOut!==t.ringOut)return i.ringOut.enclosingRing()!==t.ringOut?t.ringOut:t.ringOut.enclosingRing();t=i.prevInResult(),i=t?t.prevInResult():null}}}class Si{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,i=this.interiorRings.length;t<i;t++){const r=this.interiorRings[t].getGeom();r!==null&&e.push(r)}return e}}class mr{constructor(e){this.rings=e,this.polys=this._composePolys(e)}getGeom(){const e=[];for(let t=0,i=this.polys.length;t<i;t++){const r=this.polys[t].getGeom();r!==null&&e.push(r)}return e}_composePolys(e){const t=[];for(let i=0,r=e.length;i<r;i++){const o=e[i];if(!o.poly)if(o.isExteriorRing())t.push(new Si(o));else{const a=o.enclosingRing();a.poly||t.push(new Si(a)),a.poly.addInterior(o)}}return t}}class yr{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Me.compare;this.queue=e,this.tree=new bt(t),this.segments=[]}process(e){const t=e.segment,i=[];if(e.consumedBy)return e.isLeft?this.queue.remove(e.otherSE):this.tree.remove(t),i;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,a=r,s,u;for(;s===void 0;)o=this.tree.prev(o),o===null?s=null:o.key.consumedBy===void 0&&(s=o.key);for(;u===void 0;)a=this.tree.next(a),a===null?u=null:a.key.consumedBy===void 0&&(u=a.key);if(e.isLeft){let l=null;if(s){const c=s.getIntersection(t);if(c!==null&&(t.isAnEndpoint(c)||(l=c),!s.isAnEndpoint(c))){const f=this._splitSafely(s,c);for(let h=0,p=f.length;h<p;h++)i.push(f[h])}}let d=null;if(u){const c=u.getIntersection(t);if(c!==null&&(t.isAnEndpoint(c)||(d=c),!u.isAnEndpoint(c))){const f=this._splitSafely(u,c);for(let h=0,p=f.length;h<p;h++)i.push(f[h])}}if(l!==null||d!==null){let c=null;l===null?c=d:d===null?c=l:c=se.comparePoints(l,d)<=0?l:d,this.queue.remove(t.rightSE),i.push(t.rightSE);const f=t.split(c);for(let h=0,p=f.length;h<p;h++)i.push(f[h])}i.length>0?(this.tree.remove(t),i.push(e)):(this.segments.push(t),t.prev=s)}else{if(s&&u){const l=s.getIntersection(u);if(l!==null){if(!s.isAnEndpoint(l)){const d=this._splitSafely(s,l);for(let c=0,f=d.length;c<f;c++)i.push(d[c])}if(!u.isAnEndpoint(l)){const d=this._splitSafely(u,l);for(let c=0,f=d.length;c<f;c++)i.push(d[c])}}}this.tree.remove(t)}return i}_splitSafely(e,t){this.tree.remove(e);const i=e.rightSE;this.queue.remove(i);const r=e.split(t);return r.push(i),e.consumedBy===void 0&&this.tree.add(e),r}}const xi=typeof process<"u"&&process.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE||1e6,vr=typeof process<"u"&&process.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS||1e6;class pr{run(e,t,i){ae.type=e,Ve.reset();const r=[new Li(t,!0)];for(let c=0,f=i.length;c<f;c++)r.push(new Li(i[c],!1));if(ae.numMultiPolys=r.length,ae.type==="difference"){const c=r[0];let f=1;for(;f<r.length;)St(r[f].bbox,c.bbox)!==null?f++:r.splice(f,1)}if(ae.type==="intersection")for(let c=0,f=r.length;c<f;c++){const h=r[c];for(let p=c+1,b=r.length;p<b;p++)if(St(h.bbox,r[p].bbox)===null)return[]}const o=new bt(se.compare);for(let c=0,f=r.length;c<f;c++){const h=r[c].getSweepEvents();for(let p=0,b=h.length;p<b;p++)if(o.insert(h[p]),o.size>xi)throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big).")}const a=new yr(o);let s=o.size,u=o.pop();for(;u;){const c=u.key;if(o.size===s){const h=c.segment;throw new Error(`Unable to pop() ${c.isLeft?"left":"right"} SweepEvent [${c.point.x}, ${c.point.y}] from segment #${h.id} [${h.leftSE.point.x}, ${h.leftSE.point.y}] -> [${h.rightSE.point.x}, ${h.rightSE.point.y}] from queue.`)}if(o.size>xi)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big).");if(a.segments.length>vr)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments).");const f=a.process(c);for(let h=0,p=f.length;h<p;h++){const b=f[h];b.consumedBy===void 0&&o.insert(b)}s=o.size,u=o.pop()}Ve.reset();const l=nt.factory(a.segments);return new mr(l).getGeom()}}const ae=new pr;var Mi={union:function(n){for(var e=arguments.length,t=new Array(e>1?e-1:0),i=1;i<e;i++)t[i-1]=arguments[i];return ae.run("union",n,t)},intersection:function(n){for(var e=arguments.length,t=new Array(e>1?e-1:0),i=1;i<e;i++)t[i-1]=arguments[i];return ae.run("intersection",n,t)},xor:function(n){for(var e=arguments.length,t=new Array(e>1?e-1:0),i=1;i<e;i++)t[i-1]=arguments[i];return ae.run("xor",n,t)},difference:function(n){for(var e=arguments.length,t=new Array(e>1?e-1:0),i=1;i<e;i++)t[i-1]=arguments[i];return ae.run("difference",n,t)}};function Ci(n,e,t){if(n!==null)for(var i,r,o,a,s,u,l,d=0,c=0,f,h=n.type,p=h==="FeatureCollection",b=h==="Feature",m=p?n.features.length:1,y=0;y<m;y++){l=p?n.features[y].geometry:b?n.geometry:n,f=l?l.type==="GeometryCollection":!1,s=f?l.geometries.length:1;for(var w=0;w<s;w++){var L=0,E=0;if(a=f?l.geometries[w]:l,a!==null){u=a.coordinates;var C=a.type;switch(d=0,C){case null:break;case"Point":if(e(u,c,y,L,E)===!1)return!1;c++,L++;break;case"LineString":case"MultiPoint":for(i=0;i<u.length;i++){if(e(u[i],c,y,L,E)===!1)return!1;c++,C==="MultiPoint"&&L++}C==="LineString"&&L++;break;case"Polygon":case"MultiLineString":for(i=0;i<u.length;i++){for(r=0;r<u[i].length-d;r++){if(e(u[i][r],c,y,L,E)===!1)return!1;c++}C==="MultiLineString"&&L++,C==="Polygon"&&E++}C==="Polygon"&&L++;break;case"MultiPolygon":for(i=0;i<u.length;i++){for(E=0,r=0;r<u[i].length;r++){for(o=0;o<u[i][r].length-d;o++){if(e(u[i][r][o],c,y,L,E)===!1)return!1;c++}E++}L++}break;case"GeometryCollection":for(i=0;i<a.geometries.length;i++)if(Ci(a.geometries[i],e)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function xt(n,e){var t,i,r,o,a,s,u,l,d,c,f=0,h=n.type==="FeatureCollection",p=n.type==="Feature",b=h?n.features.length:1;for(t=0;t<b;t++){for(s=h?n.features[t].geometry:p?n.geometry:n,l=h?n.features[t].properties:p?n.properties:{},d=h?n.features[t].bbox:p?n.bbox:void 0,c=h?n.features[t].id:p?n.id:void 0,u=s?s.type==="GeometryCollection":!1,a=u?s.geometries.length:1,r=0;r<a;r++){if(o=u?s.geometries[r]:s,o===null){if(e(null,f,l,d,c)===!1)return!1;continue}switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(e(o,f,l,d,c)===!1)return!1;break}case"GeometryCollection":{for(i=0;i<o.geometries.length;i++)if(e(o.geometries[i],f,l,d,c)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}f++}}function br(n,e){xt(n,function(t,i,r,o,a){var s=t===null?null:t.type;switch(s){case null:case"Point":case"LineString":case"Polygon":return e(Ze(t,r,{bbox:o,id:a}),i,0)===!1?!1:void 0}var u;switch(s){case"MultiPoint":u="Point";break;case"MultiLineString":u="LineString";break;case"MultiPolygon":u="Polygon";break}for(var l=0;l<t.coordinates.length;l++){var d=t.coordinates[l],c={type:u,coordinates:d};if(e(Ze(c,r),i,l)===!1)return!1}})}function _r(n,e={}){const t=[];if(xt(n,r=>{t.push(r.coordinates)}),t.length<2)throw new Error("Must have at least 2 geometries");const i=Mi.union(t[0],...t.slice(1));return i.length===0?null:i.length===1?yt(i[0],e.properties):fi(i,e.properties)}var ki=_r;function wr(n,e={}){if(n.bbox!=null&&e.recompute!==!0)return n.bbox;const t=[1/0,1/0,-1/0,-1/0];return Ci(n,i=>{t[0]>i[0]&&(t[0]=i[0]),t[1]>i[1]&&(t[1]=i[1]),t[2]<i[0]&&(t[2]=i[0]),t[3]<i[1]&&(t[3]=i[1])}),t}var Ni=wr;function Er(n){const e=[];if(xt(n,r=>{e.push(r.coordinates)}),e.length<2)throw new Error("Must have at least two features");const t=n.features[0].properties||{},i=Mi.difference(e[0],...e.slice(1));return i.length===0?null:i.length===1?yt(i[0],t):fi(i,t)}var Lr=Er;function Sr(n){if(!n)throw new Error("geojson is required");var e=[];return br(n,function(t){e.push(t)}),qe(e)}var xr=Sr;function Ti(n,e){const t=Lr(qe([yt([[[180,90],[-180,90],[-180,-90],[180,-90],[180,90]]]),n]));if(!t)return;t.properties={isMask:!0};const i=et(Ni(n)),r=(i[2]-i[0])/360/1e3,o=i[0]<-180,a=i[2]>180,s=xr(n);if(s.features.length>1&&(o||a))for(const u of s.features){const l=et(Ni(u));if(a&&l[0]<-180+r)for(const d of u.geometry.coordinates)for(const c of d)c[0]+=360-r;if(o&&l[2]>180-r)for(const d of u.geometry.coordinates)for(const c of d)c[0]-=360-r}e(qe([s.features.length<2?n:ki(s)??n,t]))}const Pi=qe([]),Ri={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"]]}};function Ii(n,e,t=!0,i=!0,r={},o={},a=Ri){let s;const u=[];let l,d,c;function f(){const m=a?a===!0?Ri:a:void 0;!n.getSource("full-geom")&&(m!=null&&m.fill||m!=null&&m.line)&&n.addSource("full-geom",{type:"geojson",data:Pi}),!n.getLayer("full-geom-fill")&&(m!=null&&m.fill)&&n.addLayer({...m==null?void 0:m.fill,id:"full-geom-fill",type:"fill",source:"full-geom"}),!n.getLayer("full-geom-line")&&(m!=null&&m.line)&&n.addLayer({...m==null?void 0:m.line,id:"full-geom-line",type:"line",source:"full-geom"}),c&&b(c)}n.loaded()?f():n.once("load",()=>{f()}),n.on("styledata",()=>{f()});const h=m=>{s==null||s({type:"mapClick",coordinates:[m.lngLat.lng,m.lngLat.lat]})};function p(m=!1){if(!e)throw new Error;const y=document.createElement("div");return m&&y.classList.add("marker-interactive"),new Sn({props:{displayIn:"maplibre"},target:y}),new e.Marker({element:y,offset:[1,-13]})}function b(m){var y;c=m,m&&((y=n.getSource("full-geom"))==null||y.setData(m))}return{setEventHandler(m){m?(s=m,n.on("click",h)):(s=void 0,n.off("click",h))},flyTo(m,y){n.flyTo({center:m,...y?{zoom:y}:{},...r})},fitBounds(m,y,w){n.fitBounds([[m[0],m[1]],[m[2],m[3]]],{padding:y,...w?{maxZoom:w}:{},...o})},indicateReverse(m){n.getCanvasContainer().style.cursor=m?"crosshair":""},setReverseMarker(m){!e||!t||(d?m?d.setLngLat(m):(d.remove(),d=void 0):m&&(t instanceof Function?d=t(n)??void 0:(d=(typeof t=="object"?new e.Marker(t):p()).setLngLat(m).addTo(n),d.getElement().classList.add("marker-reverse"))))},setMarkers(m,y){for(const w of u)w.remove();if(u.length=0,b(Pi),!!e){if(y){let w=!1;if(y.geometry.type==="GeometryCollection"){const L=y.geometry.geometries.filter(E=>E.type==="Polygon"||E.type==="MultiPolygon");e:if(L.length>0){const E=ki(qe(L.map(C=>Ze(C))));if(!E)break e;Ti({...y,geometry:E.geometry},b),w=!0}else{const E=y.geometry.geometries.filter(C=>C.type==="LineString"||C.type==="MultiLineString");E.length>0&&(b({...y,geometry:{type:"GeometryCollection",geometries:E}}),w=!0)}}if(!w){if(y.geometry.type==="Polygon"||y.geometry.type==="MultiPolygon")Ti(y,b);else if(y.geometry.type==="LineString"||y.geometry.type==="MultiLineString"){b(y);return}}if(t instanceof Function){const L=t(n,y);L&&u.push(L)}else t&&u.push(typeof t=="object"?new e.Marker(t):p().setLngLat(y.center).addTo(n))}if(i)for(const w of m??[]){if(w===y)continue;let L;if(i instanceof Function){if(L=i(n,w),!L)continue}else L=(typeof i=="object"?new e.Marker(i):p(!0)).setLngLat(w.center).setPopup(new e.Popup({offset:[1,-27],closeButton:!1,closeOnMove:!0,className:"maptiler-gc-popup"}).setText(w.place_type[0]==="reverse"?w.place_name:w.place_name.replace(/,.*/,""))).addTo(n);const E=L.getElement();E.addEventListener("click",C=>{C.stopPropagation(),s==null||s({type:"markerClick",id:w.id})}),E.addEventListener("mouseenter",()=>{s==null||s({type:"markerMouseEnter",id:w.id}),L.togglePopup()}),E.addEventListener("mouseleave",()=>{s==null||s({type:"markerMouseLeave",id:w.id}),L.togglePopup()}),u.push(L)}}},setSelectedMarker(m){l&&l.getElement().classList.toggle("marker-selected",!1),l=m>-1?u[m]:void 0,l==null||l.getElement().classList.toggle("marker-selected",!0)},getCenterAndZoom(){const m=n.getCenter();return[n.getZoom(),m.lng,m.lat]}}}function Mr(n,e,t){var i,r,o;return o=class extends n{constructor(u={}){super();Ut(this,i);Ut(this,r);ct(this,r,u)}onAddInt(u){const l=document.createElement("div");l.className="mapboxgl-ctrl-geocoder mapboxgl-ctrl maplibregl-ctrl-geocoder maplibregl-ctrl mapboxgl-ctrl-group";const{marker:d,showResultMarkers:c,flyTo:f,fullGeometryStyle:h,...p}=le(this,r),b=typeof f=="boolean"?{}:f,y={mapController:Ii(u,e,d,c,b,b,h),flyTo:f===void 0?!0:!!f,apiKey:"",...t==null?void 0:t(u,l),...p};if(!y.apiKey)throw new Error("no apiKey provided");ct(this,i,new Vn({target:l,props:y}));for(const w of["select","pick","featuresListed","featuresMarked","response","optionsVisibilityChange","reverseToggle","queryChange"])le(this,i).$on(w,L=>{this.fire(w,L.detail)});return l}setOptions(u){var p;ct(this,r,u);const{marker:l,showResultMarkers:d,flyTo:c,fullGeometryStyle:f,...h}=le(this,r);(p=le(this,i))==null||p.$set(h)}setQuery(u,l=!0){var d;(d=le(this,i))==null||d.setQuery(u,l)}clearMap(){var u;(u=le(this,i))==null||u.clearMap()}clearList(){var u;(u=le(this,i))==null||u.clearList()}setReverseMode(u){var l;(l=le(this,i))==null||l.$set({reverseActive:u})}focus(){var u;(u=le(this,i))==null||u.focus()}blur(){var u;(u=le(this,i))==null||u.blur()}onRemove(){var u;(u=le(this,i))==null||u.$destroy()}},i=new WeakMap,r=new WeakMap,o}const Cr=Mr(De.Evented,De,(n,e)=>{const t={};if(!("getSdkConfig"in n&&typeof n.getSdkConfig=="function"))throw new Error("MapTiler SDK not detected");const{primaryLanguage:i,apiKey:r}=n.getSdkConfig();t.apiKey=r;const o=/^([a-z]{2})($|_|-)/.exec(i);return o&&(t.language=o[1]),e.className+=" maptiler-ctrl",t});class kr extends Cr{onAdd(e){return super.onAddInt(e)}}O.GeocodingControl=kr,O.createMapLibreGlMapController=Ii,Object.defineProperty(O,Symbol.toStringTag,{value:"Module"})});
|
|
21
|
+
***************************************************************************** */function lr(i,e){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,r,s,u;return u={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(u[Symbol.iterator]=function(){return this}),u;function o(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&&(s=l[0]&2?r.return:l[0]?r.throw||((s=r.return)&&s.call(r),0):r.next)&&!(s=s.call(r,l[1])).done)return s;switch(r=0,s&&(l=[l[0]&2,s.value]),l[0]){case 0:case 1:s=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(s=t.trys,!(s=s.length>0&&s[s.length-1])&&(l[0]===6||l[0]===2)){t=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]<s[3])){t.label=l[1];break}if(l[0]===6&&t.label<s[1]){t.label=s[1],s=l;break}if(s&&t.label<s[2]){t.label=s[2],t.ops.push(l);break}s[2]&&t.ops.pop(),t.trys.pop();continue}l=e.call(i,t)}catch(f){l=[6,f],r=0}finally{n=s=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}var Me=function(){function i(e,t){this.next=null,this.key=e,this.data=t,this.left=null,this.right=null}return i}();function ur(i,e){return i>e?1:i<e?-1:0}function ke(i,e,t){for(var n=new Me(null,null),r=n,s=n;;){var u=t(i,e.key);if(u<0){if(e.left===null)break;if(t(i,e.left.key)<0){var o=e.left;if(e.left=o.right,o.right=e,e=o,e.left===null)break}s.left=e,s=e,e=e.left}else if(u>0){if(e.right===null)break;if(t(i,e.right.key)>0){var o=e.right;if(e.right=o.left,o.left=e,e=o,e.right===null)break}r.right=e,r=e,e=e.right}else break}return r.right=e.left,s.left=e.right,e.left=n.right,e.right=n.left,e}function xt(i,e,t,n){var r=new Me(i,e);if(t===null)return r.left=r.right=null,r;t=ke(i,t,n);var s=n(i,t.key);return s<0?(r.left=t.left,r.right=t,t.left=null):s>=0&&(r.right=t.right,r.left=t,t.right=null),r}function _i(i,e,t){var n=null,r=null;if(e){e=ke(i,e,t);var s=t(e.key,i);s===0?(n=e.left,r=e.right):s<0?(r=e.right,e.right=null,n=e):(n=e.left,e.left=null,r=e)}return{left:n,right:r}}function ar(i,e,t){return e===null?i:(i===null||(e=ke(i.key,e,t),e.left=i),e)}function Mt(i,e,t,n,r){if(i){n(""+e+(t?"└── ":"├── ")+r(i)+`
|
|
22
|
+
`);var s=e+(t?" ":"│ ");i.left&&Mt(i.left,s,!1,n,r),i.right&&Mt(i.right,s,!0,n,r)}}var kt=function(){function i(e){e===void 0&&(e=ur),this._root=null,this._size=0,this._comparator=e}return i.prototype.insert=function(e,t){return this._size++,this._root=xt(e,t,this._root,this._comparator)},i.prototype.add=function(e,t){var n=new Me(e,t);this._root===null&&(n.left=n.right=null,this._size++,this._root=n);var r=this._comparator,s=ke(e,this._root,r),u=r(e,s.key);return u===0?this._root=s:(u<0?(n.left=s.left,n.right=s,s.left=null):u>0&&(n.right=s.right,n.left=s,s.right=null),this._size++,this._root=n),this._root},i.prototype.remove=function(e){this._root=this._remove(e,this._root,this._comparator)},i.prototype._remove=function(e,t,n){var r;if(t===null)return null;t=ke(e,t,n);var s=n(e,t.key);return s===0?(t.left===null?r=t.right:(r=ke(e,t.left,n),r.right=t.right),this._size--,r):t},i.prototype.pop=function(){var e=this._root;if(e){for(;e.left;)e=e.left;return this._root=ke(e.key,this._root,this._comparator),this._root=this._remove(e.key,this._root,this._comparator),{key:e.key,data:e.data}}return null},i.prototype.findStatic=function(e){for(var t=this._root,n=this._comparator;t;){var r=n(e,t.key);if(r===0)return t;r<0?t=t.left:t=t.right}return null},i.prototype.find=function(e){return this._root&&(this._root=ke(e,this._root,this._comparator),this._comparator(e,this._root.key)!==0)?null:this._root},i.prototype.contains=function(e){for(var t=this._root,n=this._comparator;t;){var r=n(e,t.key);if(r===0)return!0;r<0?t=t.left:t=t.right}return!1},i.prototype.forEach=function(e,t){for(var n=this._root,r=[],s=!1;!s;)n!==null?(r.push(n),n=n.left):r.length!==0?(n=r.pop(),e.call(t,n),n=n.right):s=!0;return this},i.prototype.range=function(e,t,n,r){for(var s=[],u=this._comparator,o=this._root,c;s.length!==0||o;)if(o)s.push(o),o=o.left;else{if(o=s.pop(),c=u(o.key,t),c>0)break;if(u(o.key,e)>=0&&n.call(r,o))return this;o=o.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,s=[];!n;)if(t)s.push(t),t=t.left;else if(s.length>0){if(t=s.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 s=r(e.key,t.key);if(s===0)break;s<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 s=r(e.key,t.key);if(s===0)break;s<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 fr(this._root)},i.prototype.load=function(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!1);var r=e.length,s=this._comparator;if(n&&Tt(e,t,0,r-1,s),this._root===null)this._root=Ct(e,t,0,r),this._size=r;else{var u=dr(this.toList(),cr(e,t),s);r=this._size+r,this._root=Nt({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 Mt(this._root,"",!0,function(n){return t.push(n)},e),t.join("")},i.prototype.update=function(e,t,n){var r=this._comparator,s=_i(e,this._root,r),u=s.left,o=s.right;r(e,t)<0?o=xt(t,n,o,r):u=xt(t,n,u,r),this._root=ar(u,o,r)},i.prototype.split=function(e){return _i(e,this._root,this._comparator)},i.prototype[Symbol.iterator]=function(){var e,t,n;return lr(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 Ct(i,e,t,n){var r=n-t;if(r>0){var s=t+Math.floor(r/2),u=i[s],o=e[s],c=new Me(u,o);return c.left=Ct(i,e,t,s),c.right=Ct(i,e,s+1,n),c}return null}function cr(i,e){for(var t=new Me(null,null),n=t,r=0;r<i.length;r++)n=n.next=new Me(i[r],e[r]);return n.next=null,t.next}function fr(i){for(var e=i,t=[],n=!1,r=new Me(null,null),s=r;!n;)e?(t.push(e),e=e.left):t.length>0?(e=s=s.next=t.pop(),e=e.right):n=!0;return s.next=null,r.next}function Nt(i,e,t){var n=t-e;if(n>0){var r=e+Math.floor(n/2),s=Nt(i,e,r),u=i.head;return u.left=s,i.head=i.head.next,u.right=Nt(i,r+1,t),u}return null}function dr(i,e,t){for(var n=new Me(null,null),r=n,s=i,u=e;s!==null&&u!==null;)t(s.key,u.key)<0?(r.next=s,s=s.next):(r.next=u,u=u.next),r=r.next;return s!==null?r.next=s:u!==null&&(r.next=u),n.next}function Tt(i,e,t,n,r){if(!(t>=n)){for(var s=i[t+n>>1],u=t-1,o=n+1;;){do u++;while(r(i[u],s)<0);do o--;while(r(i[o],s)>0);if(u>=o)break;var c=i[u];i[u]=i[o],i[o]=c,c=e[u],e[u]=e[o],e[o]=c}Tt(i,e,t,o,r),Tt(i,e,o+1,n,r)}}const be=11102230246251565e-32,ee=134217729,hr=(3+8*be)*be;function Pt(i,e,t,n,r){let s,u,o,c,l=e[0],f=n[0],a=0,d=0;f>l==f>-l?(s=l,l=e[++a]):(s=f,f=n[++d]);let h=0;if(a<i&&d<t)for(f>l==f>-l?(u=l+s,o=s-(u-l),l=e[++a]):(u=f+s,o=s-(u-f),f=n[++d]),s=u,o!==0&&(r[h++]=o);a<i&&d<t;)f>l==f>-l?(u=s+l,c=u-s,o=s-(u-c)+(l-c),l=e[++a]):(u=s+f,c=u-s,o=s-(u-c)+(f-c),f=n[++d]),s=u,o!==0&&(r[h++]=o);for(;a<i;)u=s+l,c=u-s,o=s-(u-c)+(l-c),l=e[++a],s=u,o!==0&&(r[h++]=o);for(;d<t;)u=s+f,c=u-s,o=s-(u-c)+(f-c),f=n[++d],s=u,o!==0&&(r[h++]=o);return(s!==0||h===0)&&(r[h++]=s),h}function gr(i,e){let t=e[0];for(let n=1;n<i;n++)t+=e[n];return t}function Ke(i){return new Float64Array(i)}const mr=(3+16*be)*be,pr=(2+12*be)*be,yr=(9+64*be)*be*be,Be=Ke(4),Ei=Ke(8),wi=Ke(12),Li=Ke(16),te=Ke(4);function vr(i,e,t,n,r,s,u){let o,c,l,f,a,d,h,v,E,m,y,b,_,L,N,x,M,S;const R=i-r,w=t-r,k=e-s,C=n-s;L=R*C,d=ee*R,h=d-(d-R),v=R-h,d=ee*C,E=d-(d-C),m=C-E,N=v*m-(L-h*E-v*E-h*m),x=k*w,d=ee*k,h=d-(d-k),v=k-h,d=ee*w,E=d-(d-w),m=w-E,M=v*m-(x-h*E-v*E-h*m),y=N-M,a=N-y,Be[0]=N-(y+a)+(a-M),b=L+y,a=b-L,_=L-(b-a)+(y-a),y=_-x,a=_-y,Be[1]=_-(y+a)+(a-x),S=b+y,a=S-b,Be[2]=b-(S-a)+(y-a),Be[3]=S;let ie=gr(4,Be),T=pr*u;if(ie>=T||-ie>=T||(a=i-R,o=i-(R+a)+(a-r),a=t-w,l=t-(w+a)+(a-r),a=e-k,c=e-(k+a)+(a-s),a=n-C,f=n-(C+a)+(a-s),o===0&&c===0&&l===0&&f===0)||(T=yr*u+hr*Math.abs(ie),ie+=R*f+C*o-(k*l+w*c),ie>=T||-ie>=T))return ie;L=o*C,d=ee*o,h=d-(d-o),v=o-h,d=ee*C,E=d-(d-C),m=C-E,N=v*m-(L-h*E-v*E-h*m),x=c*w,d=ee*c,h=d-(d-c),v=c-h,d=ee*w,E=d-(d-w),m=w-E,M=v*m-(x-h*E-v*E-h*m),y=N-M,a=N-y,te[0]=N-(y+a)+(a-M),b=L+y,a=b-L,_=L-(b-a)+(y-a),y=_-x,a=_-y,te[1]=_-(y+a)+(a-x),S=b+y,a=S-b,te[2]=b-(S-a)+(y-a),te[3]=S;const W=Pt(4,Be,4,te,Ei);L=R*f,d=ee*R,h=d-(d-R),v=R-h,d=ee*f,E=d-(d-f),m=f-E,N=v*m-(L-h*E-v*E-h*m),x=k*l,d=ee*k,h=d-(d-k),v=k-h,d=ee*l,E=d-(d-l),m=l-E,M=v*m-(x-h*E-v*E-h*m),y=N-M,a=N-y,te[0]=N-(y+a)+(a-M),b=L+y,a=b-L,_=L-(b-a)+(y-a),y=_-x,a=_-y,te[1]=_-(y+a)+(a-x),S=b+y,a=S-b,te[2]=b-(S-a)+(y-a),te[3]=S;const ce=Pt(W,Ei,4,te,wi);L=o*f,d=ee*o,h=d-(d-o),v=o-h,d=ee*f,E=d-(d-f),m=f-E,N=v*m-(L-h*E-v*E-h*m),x=c*l,d=ee*c,h=d-(d-c),v=c-h,d=ee*l,E=d-(d-l),m=l-E,M=v*m-(x-h*E-v*E-h*m),y=N-M,a=N-y,te[0]=N-(y+a)+(a-M),b=L+y,a=b-L,_=L-(b-a)+(y-a),y=_-x,a=_-y,te[1]=_-(y+a)+(a-x),S=b+y,a=S-b,te[2]=b-(S-a)+(y-a),te[3]=S;const Q=Pt(ce,wi,4,te,Li);return Li[Q-1]}function br(i,e,t,n,r,s){const u=(e-s)*(t-r),o=(i-r)*(n-s),c=u-o,l=Math.abs(u+o);return Math.abs(c)>=mr*l?c:-vr(i,e,t,n,r,s,l)}const Xe=(i,e)=>i.ll.x<=e.x&&e.x<=i.ur.x&&i.ll.y<=e.y&&e.y<=i.ur.y,Rt=(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,s=i.ur.y<e.ur.y?i.ur.y:e.ur.y;return{ll:{x:t,y:r},ur:{x:n,y:s}}};let Ce=Number.EPSILON;Ce===void 0&&(Ce=Math.pow(2,-52));const _r=Ce*Ce,Si=(i,e)=>{if(-Ce<i&&i<Ce&&-Ce<e&&e<Ce)return 0;const t=i-e;return t*t<_r*i*e?0:i<e?-1:1};class Er{constructor(){this.reset()}reset(){this.xRounder=new xi,this.yRounder=new xi}round(e,t){return{x:this.xRounder.round(e),y:this.yRounder.round(t)}}}class xi{constructor(){this.tree=new kt,this.round(0)}round(e){const t=this.tree.add(e),n=this.tree.prev(t);if(n!==null&&Si(t.key,n.key)===0)return this.tree.remove(e),n.key;const r=this.tree.next(t);return r!==null&&Si(t.key,r.key)===0?(this.tree.remove(e),r.key):e}}const Je=new Er,ot=(i,e)=>i.x*e.y-i.y*e.x,Mi=(i,e)=>i.x*e.x+i.y*e.y,ki=(i,e,t)=>{const n=br(i.x,i.y,e.x,e.y,t.x,t.y);return n>0?-1:n<0?1:0},lt=i=>Math.sqrt(Mi(i,i)),wr=(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 ot(r,n)/lt(r)/lt(n)},Lr=(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 Mi(r,n)/lt(r)/lt(n)},Ci=(i,e,t)=>e.y===0?null:{x:i.x+e.x/e.y*(t-i.y),y:t},Ni=(i,e,t)=>e.x===0?null:{x:t,y:i.y+e.y/e.x*(t-i.x)},Sr=(i,e,t,n)=>{if(e.x===0)return Ni(t,n,i.x);if(n.x===0)return Ni(i,e,t.x);if(e.y===0)return Ci(t,n,i.y);if(n.y===0)return Ci(i,e,t.y);const r=ot(e,n);if(r==0)return null;const s={x:t.x-i.x,y:t.y-i.y},u=ot(s,e)/r,o=ot(s,n)/r,c=i.x+o*e.x,l=t.x+u*n.x,f=i.y+o*e.y,a=t.y+u*n.y,d=(c+l)/2,h=(f+a)/2;return{x:d,y:h}};class le{static compare(e,t){const n=le.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 s=t[n];this.point.events.push(s),s.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 s=this.point.events[r];s.consumedBy===void 0&&n.otherSE.point.events===s.otherSE.point.events&&n.segment.consume(s.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 s=r.otherSE;t.set(r,{sine:wr(this.point,e.point,s.point),cosine:Lr(this.point,e.point,s.point)})};return(r,s)=>{t.has(r)||n(r),t.has(s)||n(s);const{sine:u,cosine:o}=t.get(r),{sine:c,cosine:l}=t.get(s);return u>=0&&c>=0?o<l?1:o>l?-1:0:u<0&&c<0?o<l?-1:o>l?1:0:c<u?-1:c>u?1:0}}}let xr=0;class Ne{static compare(e,t){const n=e.leftSE.point.x,r=t.leftSE.point.x,s=e.rightSE.point.x,u=t.rightSE.point.x;if(u<n)return 1;if(s<r)return-1;const o=e.leftSE.point.y,c=t.leftSE.point.y,l=e.rightSE.point.y,f=t.rightSE.point.y;if(n<r){if(c<o&&c<l)return 1;if(c>o&&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(o<c&&o<f)return-1;if(o>c&&o>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(o<c)return-1;if(o>c)return 1;if(s<u){const a=t.comparePoint(e.rightSE.point);if(a!==0)return a}if(s>u){const a=e.comparePoint(t.rightSE.point);if(a<0)return 1;if(a>0)return-1}if(s!==u){const a=l-o,d=s-n,h=f-c,v=u-r;if(a>d&&h<v)return 1;if(a<d&&h>v)return-1}return s>u?1:s<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=++xr,this.leftSE=e,e.segment=this,e.otherSE=t,this.rightSE=t,t.segment=this,t.otherSE=e,this.rings=n,this.windings=r}static fromRing(e,t,n){let r,s,u;const o=le.comparePoints(e,t);if(o<0)r=e,s=t,u=1;else if(o>0)r=t,s=e,u=-1;else throw new Error(`Tried to create degenerate segment at [${e.x}, ${e.y}]`);const c=new le(r,!0),l=new le(s,!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 s=(e.y-t.y)/r.y,u=t.x+s*r.x;if(e.x===u)return 0;const o=(e.x-t.x)/r.x,c=t.y+o*r.y;return e.y===c?0:e.y<c?-1:1}getIntersection(e){const t=this.bbox(),n=e.bbox(),r=Rt(t,n);if(r===null)return null;const s=this.leftSE.point,u=this.rightSE.point,o=e.leftSE.point,c=e.rightSE.point,l=Xe(t,o)&&this.comparePoint(o)===0,f=Xe(n,s)&&e.comparePoint(s)===0,a=Xe(t,c)&&this.comparePoint(c)===0,d=Xe(n,u)&&e.comparePoint(u)===0;if(f&&l)return d&&!a?u:!d&&a?c:null;if(f)return a&&s.x===c.x&&s.y===c.y?null:s;if(l)return d&&u.x===o.x&&u.y===o.y?null:o;if(d&&a)return null;if(d)return u;if(a)return c;const h=Sr(s,this.vector(),o,e.vector());return h===null||!Xe(r,h)?null:Je.round(h.x,h.y)}split(e){const t=[],n=e.events!==void 0,r=new le(e,!0),s=new le(e,!1),u=this.rightSE;this.replaceRightSE(s),t.push(s),t.push(r);const o=new Ne(r,u,this.rings.slice(),this.windings.slice());return le.comparePoints(o.leftSE.point,o.rightSE.point)>0&&o.swapEvents(),le.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),n&&(r.checkForConsuming(),s.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 s=t;t=n,n=s}if(t.prev===n){const s=t;t=n,n=s}for(let s=0,u=n.rings.length;s<u;s++){const o=n.rings[s],c=n.windings[s],l=t.rings.indexOf(o);l===-1?(t.rings.push(o),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 o=0,c=this.rings.length;o<c;o++){const l=this.rings[o],f=this.windings[o],a=t.indexOf(l);a===-1?(t.push(l),n.push(f)):n[a]+=f}const s=[],u=[];for(let o=0,c=t.length;o<c;o++){if(n[o]===0)continue;const l=t[o],f=l.poly;if(u.indexOf(f)===-1)if(l.isExterior)s.push(f);else{u.indexOf(f)===-1&&u.push(f);const a=s.indexOf(l.poly);a!==-1&&s.splice(a,1)}}for(let o=0,c=s.length;o<c;o++){const l=s[o].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 Ti{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=Je.round(e[0][0],e[0][1]);this.bbox={ll:{x:r.x,y:r.y},ur:{x:r.x,y:r.y}};let s=r;for(let u=1,o=e.length;u<o;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=Je.round(e[u][0],e[u][1]);c.x===s.x&&c.y===s.y||(this.segments.push(Ne.fromRing(s,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),s=c)}(r.x!==s.x||r.y!==s.y)&&this.segments.push(Ne.fromRing(s,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 Mr{constructor(e,t){if(!Array.isArray(e))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");this.exteriorRing=new Ti(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 s=new Ti(e[n],this,!1);s.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=s.bbox.ll.x),s.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=s.bbox.ll.y),s.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=s.bbox.ur.x),s.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=s.bbox.ur.y),this.interiorRings.push(s)}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 s=0,u=r.length;s<u;s++)e.push(r[s])}return e}}class Pi{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 s=new Mr(e[n],this);s.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=s.bbox.ll.x),s.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=s.bbox.ll.y),s.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=s.bbox.ur.x),s.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=s.bbox.ur.y),this.polys.push(s)}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 s=0,u=r.length;s<u;s++)e.push(r[s])}return e}}class ut{static factory(e){const t=[];for(let n=0,r=e.length;n<r;n++){const s=e[n];if(!s.isInResult()||s.ringOut)continue;let u=null,o=s.leftSE,c=s.rightSE;const l=[o],f=o.point,a=[];for(;u=o,o=c,l.push(o),o.point!==f;)for(;;){const d=o.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 h=null;for(let E=0,m=a.length;E<m;E++)if(a[E].point===o.point){h=E;break}if(h!==null){const E=a.splice(h)[0],m=l.splice(E.index);m.unshift(m[0].otherSE),t.push(new ut(m.reverse()));continue}a.push({index:l.length,point:o.point});const v=o.getLeftmostComparator(u);c=d.sort(v)[0].otherSE;break}t.push(new ut(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;ki(a,e,d)!==0&&(t.push(a),e=a)}if(t.length===1)return null;const n=t[0],r=t[1];ki(n,e,r)===0&&t.shift(),t.push(t[0]);const s=this.isExteriorRing()?1:-1,u=this.isExteriorRing()?0:t.length-1,o=this.isExteriorRing()?t.length:-1,c=[];for(let l=u;l!=o;l+=s)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,s=this.events.length;r<s;r++){const u=this.events[r];le.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 Ri{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 kr{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 s=e[n];if(!s.poly)if(s.isExteriorRing())t.push(new Ri(s));else{const u=s.enclosingRing();u.poly||t.push(new Ri(u)),u.poly.addInterior(s)}}return t}}class Cr{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ne.compare;this.queue=e,this.tree=new kt(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 s=r,u=r,o,c;for(;o===void 0;)s=this.tree.prev(s),s===null?o=null:s.key.consumedBy===void 0&&(o=s.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(o){const a=o.getIntersection(t);if(a!==null&&(t.isAnEndpoint(a)||(l=a),!o.isAnEndpoint(a))){const d=this._splitSafely(o,a);for(let h=0,v=d.length;h<v;h++)n.push(d[h])}}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 h=0,v=d.length;h<v;h++)n.push(d[h])}}if(l!==null||f!==null){let a=null;l===null?a=f:f===null?a=l:a=le.comparePoints(l,f)<=0?l:f,this.queue.remove(t.rightSE),n.push(t.rightSE);const d=t.split(a);for(let h=0,v=d.length;h<v;h++)n.push(d[h])}n.length>0?(this.tree.remove(t),n.push(e)):(this.segments.push(t),t.prev=o)}else{if(o&&c){const l=o.getIntersection(c);if(l!==null){if(!o.isAnEndpoint(l)){const f=this._splitSafely(o,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 Oi=typeof process<"u"&&process.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE||1e6,Nr=typeof process<"u"&&process.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS||1e6;class Tr{run(e,t,n){ae.type=e,Je.reset();const r=[new Pi(t,!0)];for(let a=0,d=n.length;a<d;a++)r.push(new Pi(n[a],!1));if(ae.numMultiPolys=r.length,ae.type==="difference"){const a=r[0];let d=1;for(;d<r.length;)Rt(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 h=r[a];for(let v=a+1,E=r.length;v<E;v++)if(Rt(h.bbox,r[v].bbox)===null)return[]}const s=new kt(le.compare);for(let a=0,d=r.length;a<d;a++){const h=r[a].getSweepEvents();for(let v=0,E=h.length;v<E;v++)if(s.insert(h[v]),s.size>Oi)throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big).")}const u=new Cr(s);let o=s.size,c=s.pop();for(;c;){const a=c.key;if(s.size===o){const h=a.segment;throw new Error(`Unable to pop() ${a.isLeft?"left":"right"} SweepEvent [${a.point.x}, ${a.point.y}] from segment #${h.id} [${h.leftSE.point.x}, ${h.leftSE.point.y}] -> [${h.rightSE.point.x}, ${h.rightSE.point.y}] from queue.`)}if(s.size>Oi)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big).");if(u.segments.length>Nr)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments).");const d=u.process(a);for(let h=0,v=d.length;h<v;h++){const E=d[h];E.consumedBy===void 0&&s.insert(E)}o=s.size,c=s.pop()}Je.reset();const l=ut.factory(u.segments);return new kr(l).getGeom()}}const ae=new Tr;var Ii={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 zi(i,e,t){if(i!==null)for(var n,r,s,u,o,c,l,f=0,a=0,d,h=i.type,v=h==="FeatureCollection",E=h==="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,o=d?l.geometries.length:1;for(var b=0;b<o;b++){var _=0,L=0;if(u=d?l.geometries[b]:l,u!==null){c=u.coordinates;var N=u.type;switch(f=0,N){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++,N==="MultiPoint"&&_++}N==="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++}N==="MultiLineString"&&_++,N==="Polygon"&&L++}N==="Polygon"&&_++;break;case"MultiPolygon":for(n=0;n<c.length;n++){for(L=0,r=0;r<c[n].length;r++){for(s=0;s<c[n][r].length-f;s++){if(e(c[n][r][s],a,y,_,L)===!1)return!1;a++}L++}_++}break;case"GeometryCollection":for(n=0;n<u.geometries.length;n++)if(zi(u.geometries[n],e)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function Ot(i,e){var t,n,r,s,u,o,c,l,f,a,d=0,h=i.type==="FeatureCollection",v=i.type==="Feature",E=h?i.features.length:1;for(t=0;t<E;t++){for(o=h?i.features[t].geometry:v?i.geometry:i,l=h?i.features[t].properties:v?i.properties:{},f=h?i.features[t].bbox:v?i.bbox:void 0,a=h?i.features[t].id:v?i.id:void 0,c=o?o.type==="GeometryCollection":!1,u=c?o.geometries.length:1,r=0;r<u;r++){if(s=c?o.geometries[r]:o,s===null){if(e(null,d,l,f,a)===!1)return!1;continue}switch(s.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(e(s,d,l,f,a)===!1)return!1;break}case"GeometryCollection":{for(n=0;n<s.geometries.length;n++)if(e(s.geometries[n],d,l,f,a)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}d++}}function Pr(i,e){Ot(i,function(t,n,r,s,u){var o=t===null?null:t.type;switch(o){case null:case"Point":case"LineString":case"Polygon":return e(Ve(t,r,{bbox:s,id:u}),n,0)===!1?!1:void 0}var c;switch(o){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(Ve(a,r),n,l)===!1)return!1}})}function Rr(i,e={}){const t=[];if(Ot(i,r=>{t.push(r.coordinates)}),t.length<2)throw new Error("Must have at least 2 geometries");const n=Ii.union(t[0],...t.slice(1));return n.length===0?null:n.length===1?St(n[0],e.properties):bi(n,e.properties)}var Ai=Rr;function Or(i,e={}){if(i.bbox!=null&&e.recompute!==!0)return i.bbox;const t=[1/0,1/0,-1/0,-1/0];return zi(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 Wi=Or;function Ir(i){const e=[];if(Ot(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=Ii.difference(e[0],...e.slice(1));return n.length===0?null:n.length===1?St(n[0],t):bi(n,t)}var zr=Ir;function Ar(i){if(!i)throw new Error("geojson is required");var e=[];return Pr(i,function(t){e.push(t)}),Ye(e)}var Wr=Ar;function Bi(i,e){const t=zr(Ye([St([[[180,90],[-180,90],[-180,-90],[180,-90],[180,90]]]),i]));if(!t)return;t.properties={isMask:!0};const n=st(Wi(i)),r=(n[2]-n[0])/360/1e3,s=n[0]<-180,u=n[2]>180,o=Wr(i);if(o.features.length>1&&(s||u))for(const c of o.features){const l=st(Wi(c));if(u&&l[0]<-180+r)for(const f of c.geometry.coordinates)for(const a of f)a[0]+=360-r;if(s&&l[2]>180-r)for(const f of c.geometry.coordinates)for(const a of f)a[0]-=360-r}e(Ye([o.features.length<2?i:Ai(o)??i,t]))}const Ui={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"]]}},at="mtlr-gc-full-geom",Di="mtlr-gc-full-geom-fill",Fi="mtlr-gc-full-geom-line";function ji(i,e,t=!0,n=!0,r={},s={},u=Ui){let o;const c=[];let l,f,a;function d(){if(!i.loaded){i.once("load",d);return}const m=u?u===!0?Ui:u:void 0;if(!(m!=null&&m.fill)&&!(m!=null&&m.line))return;const y=i.getSource(at);if(y)y.setData(a??Ye([]));else if(a)i.addSource(at,{type:"geojson",data:a});else return;!i.getLayer(Di)&&(m!=null&&m.fill)&&i.addLayer({...m==null?void 0:m.fill,id:Di,type:"fill",source:at}),!i.getLayer(Fi)&&(m!=null&&m.line)&&i.addLayer({...m==null?void 0:m.line,id:Fi,type:"line",source:at})}function h(m){a=m,d()}i.on("styledata",()=>{setTimeout(()=>{a&&d()})});const v=m=>{o==null||o({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 An({props:{displayIn:"maplibre"},target:y}),new e.Marker({element:y,offset:[1,-13]})}return{setEventHandler(m){m?(o=m,i.on("click",v)):(o=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}:{},...s})},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,h(void 0),!!e){e:if(y){let _=!1;if(y.geometry.type==="GeometryCollection"){const L=y.geometry.geometries.filter(N=>N.type==="Polygon"||N.type==="MultiPolygon");t:if(L.length>0){const N=Ai(Ye(L.map(x=>Ve(x))));if(!N)break t;Bi({...y,geometry:N.geometry},h),_=!0}else{const N=y.geometry.geometries.filter(x=>x.type==="LineString"||x.type==="MultiLineString");N.length>0&&(h({...y,geometry:{type:"GeometryCollection",geometries:N}}),_=!0)}}if(!_){if(y.geometry.type==="Polygon"||y.geometry.type==="MultiPolygon")Bi(y,h);else if(y.geometry.type==="LineString"||y.geometry.type==="MultiLineString"){h(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 N=L.getElement();N.addEventListener("click",x=>{x.stopPropagation(),o==null||o({type:"markerClick",id:_.id})}),N.addEventListener("mouseenter",()=>{o==null||o({type:"markerMouseEnter",id:_.id}),L.togglePopup()}),N.addEventListener("mouseleave",()=>{o==null||o({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 Br(i,e,t){var v,E;class n{constructor(y,b){ne(this,"type");ne(this,"target");this.type=b,this.target=y}}class r extends n{constructor(b,_){super(b,"select");ne(this,"feature");Object.assign(this,_)}}class s extends n{constructor(b,_){super(b,"featureslisted");ne(this,"features");this.features=_}}class u extends n{constructor(b,_){super(b,"featuresmarked");ne(this,"features");this.features=_}}class o extends n{constructor(b,_){super(b,"optionsvisibilitychange");ne(this,"optionsVisible");this.optionsVisible=_}}class c extends n{constructor(b,_){super(b,"pick");ne(this,"feature");this.feature=_}}class l extends n{constructor(b,_){super(b,"querychange");ne(this,"query");this.query=_}}class f extends n{constructor(b,_,L){super(b,"response");ne(this,"url");ne(this,"featureCollection");this.url=_,this.featureCollection=L}}class a extends n{constructor(b,_){super(b,"reversetoggle");ne(this,"reverse");this.reverse=_}}class d extends i{constructor(b={}){super();Ht(this,v);Ht(this,E);Vt(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:N,flyTo:x,fullGeometryStyle:M,...S}=Y(this,E),R=typeof x=="boolean"?{}:x,k={mapController:ji(b,e,L,N,R,R,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 Vt(this,v,new or({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 s(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 o(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:N,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:s,FeaturesMarkedEvent:u,OptionsVisibilityChangeEvent:o,PickEvent:c,QueryChangeEvent:l,ResponseEvent:f,ReverseToggleEvent:a}}}const{MapLibreBasedGeocodingControl:Ur,events:Te}=Br(je.Evented,je,(i,e)=>{const t={};if(!("getSdkConfig"in i&&typeof i.getSdkConfig=="function"))throw new Error("MapTiler SDK not detected");const{primaryLanguage:n,apiKey:r}=i.getSdkConfig();t.apiKey=r;const s=/^([a-z]{2})($|_|-)/.exec(n);return s&&(t.language=s[1]),e.className+=" maptiler-ctrl",t});class Dr extends Ur{onAdd(e){return super.onAddInt(e)}}const Fr=Te.SelectEvent,jr=Te.FeaturesListedEvent,Gr=Te.FeaturesMarkedEvent,qr=Te.OptionsVisibilityChangeEvent,Qr=Te.PickEvent,Zr=Te.QueryChangeEvent,Hr=Te.ResponseEvent,Vr=Te.ReverseToggleEvent;I.FeaturesListedEvent=jr,I.FeaturesMarkedEvent=Gr,I.GeocodingControl=Dr,I.OptionsVisibilityChangeEvent=qr,I.PickEvent=Qr,I.QueryChangeEvent=Zr,I.ResponseEvent=Hr,I.ReverseToggleEvent=Vr,I.SelectEvent=Fr,I.createMapLibreGlMapController=ji,Object.defineProperty(I,Symbol.toStringTag,{value:"Module"})});
|
|
23
23
|
//# sourceMappingURL=maptilersdk.umd.js.map
|