@arenarium/maps 1.0.161 → 1.0.163
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/dist/index.d.ts +21 -0
- package/dist/index.js +2 -2
- package/dist/mapbox.cjs.js +1 -0
- package/dist/mapbox.d.ts +251 -0
- package/dist/mapbox.es.js +55 -0
- package/package.json +7 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// Generated by dts-bundle-generator v9.5.1
|
|
2
2
|
|
|
3
|
+
import { Map as Map$1, MapOptions, Marker, MarkerOptions } from 'mapbox-gl';
|
|
3
4
|
import { z } from 'zod';
|
|
4
5
|
|
|
5
6
|
declare const mapConfigurationSchema: z.ZodObject<{
|
|
@@ -547,6 +548,26 @@ export declare class MaplibreProvider implements MapProvider {
|
|
|
547
548
|
}
|
|
548
549
|
export declare const MaplibreDarkStyle: maplibregl.StyleSpecification;
|
|
549
550
|
export declare const MaplibreLightStyle: maplibregl.StyleSpecification;
|
|
551
|
+
export interface MapboxMapClass {
|
|
552
|
+
new (options: MapOptions): Map$1;
|
|
553
|
+
}
|
|
554
|
+
export interface MapboxMarkerClass {
|
|
555
|
+
new (options: MarkerOptions): Marker;
|
|
556
|
+
}
|
|
557
|
+
export declare class MapboxProvider implements MapProvider {
|
|
558
|
+
static Parameters: MapProviderParameters;
|
|
559
|
+
parameters: MapProviderParameters;
|
|
560
|
+
private MapClass;
|
|
561
|
+
private MapMarkerClass;
|
|
562
|
+
private map;
|
|
563
|
+
constructor(mapClass: MapboxMapClass, mapMarkerClass: MapboxMarkerClass, options: MapOptions);
|
|
564
|
+
getMap(): Map$1;
|
|
565
|
+
getContainer(): HTMLElement;
|
|
566
|
+
getZoom(): number;
|
|
567
|
+
getBounds(): MapBounds;
|
|
568
|
+
panBy(x: number, y: number): void;
|
|
569
|
+
createMarker(element: HTMLElement, lat: number, lng: number): MapProviderMarker;
|
|
570
|
+
}
|
|
550
571
|
export interface GoogleMapsClass {
|
|
551
572
|
new (container: HTMLElement, options: google.maps.MapOptions): google.maps.Map;
|
|
552
573
|
}
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(function(S,T){typeof exports=="object"&&typeof module<"u"?T(exports):typeof define=="function"&&define.amd?define(["exports"],T):(S=typeof globalThis<"u"?globalThis:S||self,T(S.arenarium={}))})(this,function(S){"use strict";var Ji=Object.defineProperty;var Ua=S=>{throw TypeError(S)};var Qi=(S,T,I)=>T in S?Ji(S,T,{enumerable:!0,configurable:!0,writable:!0,value:I}):S[T]=I;var p=(S,T,I)=>Qi(S,typeof T!="symbol"?T+"":T,I),$a=(S,T,I)=>T.has(S)||Ua("Cannot "+I);var ee=(S,T,I)=>($a(S,T,"read from private field"),I?I.call(S):T.get(S)),it=(S,T,I)=>T.has(S)?Ua("Cannot add the same private member more than once"):T instanceof WeakSet?T.add(S):T.set(S,I),ot=(S,T,I,st)=>($a(S,T,"write to private field"),st?st.call(S,I):T.set(S,I),I);var Pa,ce,Ve,rt,Me;var I=Array.isArray,st=Array.prototype.indexOf,qa=Array.from,Wa=Object.defineProperty,We=Object.getOwnPropertyDescriptor,Ya=Object.prototype,Xa=Array.prototype,Ha=Object.getPrototypeOf,Er=Object.isExtensible;function Ga(r){for(var e=0;e<r.length;e++)r[e]()}const q=2,Ot=4,jt=8,Pt=16,de=32,Ce=64,It=128,W=256,lt=512,H=1024,pe=2048,xe=4096,ct=8192,Dt=16384,Mr=32768,Ja=65536,Cr=1<<17,Qa=1<<18,Tr=1<<19,Zt=1<<20,Ar=1<<21,ut=Symbol("$state"),Nr=new class extends Error{constructor(){super(...arguments);p(this,"name","StaleReactionError");p(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}};function Lr(r){return r===this.v}function Ka(r){throw new Error("https://svelte.dev/e/effect_in_teardown")}function en(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function tn(r){throw new Error("https://svelte.dev/e/effect_orphan")}function rn(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function an(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function nn(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function on(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}let Ki=!1;const Z=Symbol();let te=null;function Rr(r){te=r}function Ft(r,e=!1,t){te={p:te,c:null,e:null,s:r,x:null,l:null}}function Bt(r){var e=te,t=e.e;if(t!==null){e.e=null;for(var a of t)$r(a)}return r!==void 0&&(e.x=r),te=e.p,r??{}}function Or(){return!0}function Ye(r){if(typeof r!="object"||r===null||ut in r)return r;const e=Ha(r);if(e!==Ya&&e!==Xa)return r;var t=new Map,a=I(r),n=U(0),i=ze,o=s=>{if(ze===i)return s();var l=A,c=ze;Ae(null),Kr(i);var u=s();return Ae(l),Kr(c),u};return a&&t.set("length",U(r.length)),new Proxy(r,{defineProperty(s,l,c){(!("value"in c)||c.configurable===!1||c.enumerable===!1||c.writable===!1)&&an();var u=t.get(l);return u===void 0?u=o(()=>{var f=U(c.value);return t.set(l,f),f}):D(u,c.value,!0),!0},deleteProperty(s,l){var c=t.get(l);if(c===void 0){if(l in s){const h=o(()=>U(Z));t.set(l,h),Ut(n)}}else{if(a&&typeof l=="string"){var u=t.get("length"),f=Number(l);Number.isInteger(f)&&f<u.v&&D(u,f)}D(c,Z),Ut(n)}return!0},get(s,l,c){var g;if(l===ut)return r;var u=t.get(l),f=l in s;if(u===void 0&&(!f||(g=We(s,l))!=null&&g.writable)&&(u=o(()=>{var k=Ye(f?s[l]:Z),N=U(k);return N}),t.set(l,u)),u!==void 0){var h=j(u);return h===Z?void 0:h}return Reflect.get(s,l,c)},getOwnPropertyDescriptor(s,l){var c=Reflect.getOwnPropertyDescriptor(s,l);if(c&&"value"in c){var u=t.get(l);u&&(c.value=j(u))}else if(c===void 0){var f=t.get(l),h=f==null?void 0:f.v;if(f!==void 0&&h!==Z)return{enumerable:!0,configurable:!0,value:h,writable:!0}}return c},has(s,l){var h;if(l===ut)return!0;var c=t.get(l),u=c!==void 0&&c.v!==Z||Reflect.has(s,l);if(c!==void 0||L!==null&&(!u||(h=We(s,l))!=null&&h.writable)){c===void 0&&(c=o(()=>{var g=u?Ye(s[l]):Z,k=U(g);return k}),t.set(l,c));var f=j(c);if(f===Z)return!1}return u},set(s,l,c,u){var V;var f=t.get(l),h=l in s;if(a&&l==="length")for(var g=c;g<f.v;g+=1){var k=t.get(g+"");k!==void 0?D(k,Z):g in s&&(k=o(()=>U(Z)),t.set(g+"",k))}if(f===void 0)(!h||(V=We(s,l))!=null&&V.writable)&&(f=o(()=>U(void 0)),D(f,Ye(c)),t.set(l,f));else{h=f.v!==Z;var N=o(()=>Ye(c));D(f,N)}var R=Reflect.getOwnPropertyDescriptor(s,l);if(R!=null&&R.set&&R.set.call(u,c),!h){if(a&&typeof l=="string"){var Q=t.get("length"),M=Number(l);Number.isInteger(M)&&M>=Q.v&&D(Q,M+1)}Ut(n)}return!0},ownKeys(s){j(n);var l=Reflect.ownKeys(s).filter(f=>{var h=t.get(f);return h===void 0||h.v!==Z});for(var[c,u]of t)u.v!==Z&&!(c in s)&&l.push(c);return l},setPrototypeOf(){nn()}})}function sn(r){var e=q|pe,t=A!==null&&(A.f&q)!==0?A:null;return L===null||t!==null&&(t.f&W)!==0?e|=W:L.f|=Tr,{ctx:te,deps:null,effects:null,equals:Lr,f:e,fn:r,reactions:null,rv:0,v:Z,wv:0,parent:t??L,ac:null}}function jr(r){var e=r.effects;if(e!==null){r.effects=null;for(var t=0;t<e.length;t+=1)be(e[t])}}function ln(r){for(var e=r.parent;e!==null;){if((e.f&q)===0)return e;e=e.parent}return null}function Vt(r){var e,t=L;ht(ln(r));try{jr(r),e=ra(r)}finally{ht(t)}return e}function Pr(r){var e=Vt(r);if(r.equals(e)||(r.v=e,r.wv=ea()),!Se){var t=(fe||(r.f&W)!==0)&&r.deps!==null?xe:H;se(r,t)}}const we=new Map;function cn(r,e){var t={f:0,v:r,reactions:null,equals:Lr,rv:0,wv:0};return t}function U(r,e){const t=cn(r);return Mn(t),t}function D(r,e,t=!1){A!==null&&(!re||(A.f&Cr)!==0)&&Or()&&(A.f&(q|Pt|Cr))!==0&&!(F!=null&&F.includes(r))&&on();let a=t?Ye(e):e;return un(r,a)}function un(r,e){if(!r.equals(e)){var t=r.v;Se?we.set(r,e):we.set(r,t),r.v=e,(r.f&q)!==0&&((r.f&pe)!==0&&Vt(r),se(r,(r.f&W)===0?H:xe)),r.wv=ea(),Ir(r,pe),L!==null&&(L.f&H)!==0&&(L.f&(de|Ce))===0&&(G===null?Cn([r]):G.push(r))}return e}function Ut(r){D(r,r.v+1)}function Ir(r,e){var t=r.reactions;if(t!==null)for(var a=t.length,n=0;n<a;n++){var i=t[n],o=i.f;(o&pe)===0&&(se(i,e),(o&(H|W))!==0&&((o&q)!==0?Ir(i,xe):_t(i)))}}var Dr,Zr,Fr,Br;function dn(){if(Dr===void 0){Dr=window,Zr=/Firefox/.test(navigator.userAgent);var r=Element.prototype,e=Node.prototype,t=Text.prototype;Fr=We(e,"firstChild").get,Br=We(e,"nextSibling").get,Er(r)&&(r.__click=void 0,r.__className=void 0,r.__attributes=null,r.__style=void 0,r.__e=void 0),Er(t)&&(t.__t=void 0)}}function pn(r=""){return document.createTextNode(r)}function Vr(r){return Fr.call(r)}function Ur(r){return Br.call(r)}function $t(r,e){return Vr(r)}function fn(r,e=1,t=!1){let a=r;for(;e--;)a=Ur(a);return a}function hn(r){L===null&&A===null&&tn(),A!==null&&(A.f&W)!==0&&L===null&&en(),Se&&Ka()}function mn(r,e){var t=e.last;t===null?e.last=e.first=r:(t.next=r,r.prev=t,e.last=r)}function Te(r,e,t,a=!0){var n=L,i={ctx:te,deps:null,nodes_start:null,nodes_end:null,f:r|pe,first:null,fn:e,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,transitions:null,wv:0,ac:null};if(t)try{Wt(i),i.f|=Mr}catch(l){throw be(i),l}else e!==null&&_t(i);var o=t&&i.deps===null&&i.first===null&&i.nodes_start===null&&i.teardown===null&&(i.f&(Tr|It))===0;if(!o&&a&&(n!==null&&mn(i,n),A!==null&&(A.f&q)!==0)){var s=A;(s.effects??(s.effects=[])).push(i)}return i}function oe(r){if(hn(),!A&&L&&(L.f&de)!==0){var e=te;(e.e??(e.e=[])).push(r)}else return $r(r)}function $r(r){return Te(Ot|Ar,r,!1)}function yn(r){const e=Te(Ce,r,!0);return(t={})=>new Promise(a=>{t.outro?bn(e,()=>{be(e),a(void 0)}):(be(e),a(void 0))})}function gn(r){return Te(Ot,r,!1)}function qr(r){return Te(jt,r,!0)}function Wr(r,e=[],t=sn){const a=e.map(t);return _n(()=>r(...a.map(j)))}function _n(r,e=0){var t=Te(jt|Pt|e,r,!0);return t}function vn(r,e=!0){return Te(jt|de,r,!0,e)}function Yr(r){var e=r.teardown;if(e!==null){const t=Se,a=A;Qr(!0),Ae(null);try{e.call(null)}finally{Qr(t),Ae(a)}}}function Xr(r,e=!1){var n;var t=r.first;for(r.first=r.last=null;t!==null;){(n=t.ac)==null||n.abort(Nr);var a=t.next;(t.f&Ce)!==0?t.parent=null:be(t,e),t=a}}function xn(r){for(var e=r.first;e!==null;){var t=e.next;(e.f&de)===0&&be(e),e=t}}function be(r,e=!0){var t=!1;(e||(r.f&Qa)!==0)&&r.nodes_start!==null&&r.nodes_end!==null&&(wn(r.nodes_start,r.nodes_end),t=!0),Xr(r,e&&!t),gt(r,0),se(r,Dt);var a=r.transitions;if(a!==null)for(const i of a)i.stop();Yr(r);var n=r.parent;n!==null&&n.first!==null&&Hr(r),r.next=r.prev=r.teardown=r.ctx=r.deps=r.fn=r.nodes_start=r.nodes_end=r.ac=null}function wn(r,e){for(;r!==null;){var t=r===e?null:Ur(r);r.remove(),r=t}}function Hr(r){var e=r.parent,t=r.prev,a=r.next;t!==null&&(t.next=a),a!==null&&(a.prev=t),e!==null&&(e.first===r&&(e.first=a),e.last===r&&(e.last=t))}function bn(r,e){var t=[];Gr(r,t,!0),kn(t,()=>{be(r),e&&e()})}function kn(r,e){var t=r.length;if(t>0){var a=()=>--t||e();for(var n of r)n.out(a)}else e()}function Gr(r,e,t){if((r.f&ct)===0){if(r.f^=ct,r.transitions!==null)for(const o of r.transitions)(o.is_global||t)&&e.push(o);for(var a=r.first;a!==null;){var n=a.next,i=(a.f&Ja)!==0||(a.f&de)!==0;Gr(a,e,i?t:!1),a=n}}}let dt=[];function Sn(){var r=dt;dt=[],Ga(r)}function zn(r){dt.length===0&&queueMicrotask(Sn),dt.push(r)}function En(r){var e=L;if((e.f&Mr)===0){if((e.f&It)===0)throw r;e.fn(r)}else Jr(r,e)}function Jr(r,e){for(;e!==null;){if((e.f&It)!==0)try{e.b.error(r);return}catch{}e=e.parent}throw r}let qt=!1,pt=null,ke=!1,Se=!1;function Qr(r){Se=r}let ft=[],eo=[],A=null,re=!1;function Ae(r){A=r}let L=null;function ht(r){L=r}let F=null;function Mn(r){A!==null&&A.f&Zt&&(F===null?F=[r]:F.push(r))}let B=null,Y=0,G=null;function Cn(r){G=r}let mt=1,Xe=0,ze=Xe;function Kr(r){ze=r}let fe=!1;function ea(){return++mt}function yt(r){var f;var e=r.f;if((e&pe)!==0)return!0;if((e&xe)!==0){var t=r.deps,a=(e&W)!==0;if(t!==null){var n,i,o=(e<)!==0,s=a&&L!==null&&!fe,l=t.length;if(o||s){var c=r,u=c.parent;for(n=0;n<l;n++)i=t[n],(o||!((f=i==null?void 0:i.reactions)!=null&&f.includes(c)))&&(i.reactions??(i.reactions=[])).push(c);o&&(c.f^=lt),s&&u!==null&&(u.f&W)===0&&(c.f^=W)}for(n=0;n<l;n++)if(i=t[n],yt(i)&&Pr(i),i.wv>r.wv)return!0}(!a||L!==null&&!fe)&&se(r,H)}return!1}function ta(r,e,t=!0){var a=r.reactions;if(a!==null&&!(F!=null&&F.includes(r)))for(var n=0;n<a.length;n++){var i=a[n];(i.f&q)!==0?ta(i,e,!1):e===i&&(t?se(i,pe):(i.f&H)!==0&&se(i,xe),_t(i))}}function ra(r){var k;var e=B,t=Y,a=G,n=A,i=fe,o=F,s=te,l=re,c=ze,u=r.f;B=null,Y=0,G=null,fe=(u&W)!==0&&(re||!ke||A===null),A=(u&(de|Ce))===0?r:null,F=null,Rr(r.ctx),re=!1,ze=++Xe,r.f|=Zt,r.ac!==null&&(r.ac.abort(Nr),r.ac=null);try{var f=(0,r.fn)(),h=r.deps;if(B!==null){var g;if(gt(r,Y),h!==null&&Y>0)for(h.length=Y+B.length,g=0;g<B.length;g++)h[Y+g]=B[g];else r.deps=h=B;if(!fe||(u&q)!==0&&r.reactions!==null)for(g=Y;g<h.length;g++)((k=h[g]).reactions??(k.reactions=[])).push(r)}else h!==null&&Y<h.length&&(gt(r,Y),h.length=Y);if(Or()&&G!==null&&!re&&h!==null&&(r.f&(q|xe|pe))===0)for(g=0;g<G.length;g++)ta(G[g],r);return n!==null&&n!==r&&(Xe++,G!==null&&(a===null?a=G:a.push(...G))),f}catch(N){En(N)}finally{B=e,Y=t,G=a,A=n,fe=i,F=o,Rr(s),re=l,ze=c,r.f^=Zt}}function Tn(r,e){let t=e.reactions;if(t!==null){var a=st.call(t,r);if(a!==-1){var n=t.length-1;n===0?t=e.reactions=null:(t[a]=t[n],t.pop())}}t===null&&(e.f&q)!==0&&(B===null||!B.includes(e))&&(se(e,xe),(e.f&(W|lt))===0&&(e.f^=lt),jr(e),gt(e,0))}function gt(r,e){var t=r.deps;if(t!==null)for(var a=e;a<t.length;a++)Tn(r,t[a])}function Wt(r){var e=r.f;if((e&Dt)===0){se(r,H);var t=L,a=ke;L=r,ke=!0;try{(e&Pt)!==0?xn(r):Xr(r),Yr(r);var n=ra(r);r.teardown=typeof n=="function"?n:null,r.wv=mt;var i}finally{ke=a,L=t}}}function An(){try{rn()}catch(r){if(pt!==null)Jr(r,pt);else throw r}}function Nn(){var r=ke;try{var e=0;for(ke=!0;ft.length>0;){e++>1e3&&An();var t=ft,a=t.length;ft=[];for(var n=0;n<a;n++){var i=Rn(t[n]);Ln(i)}we.clear()}}finally{qt=!1,ke=r,pt=null}}function Ln(r){var e=r.length;if(e!==0){for(var t=0;t<e;t++){var a=r[t];if((a.f&(Dt|ct))===0&&yt(a)){var n=mt;if(Wt(a),a.deps===null&&a.first===null&&a.nodes_start===null&&(a.teardown===null?Hr(a):a.fn=null),mt>n&&(a.f&Ar)!==0)break}}for(;t<e;t+=1)_t(r[t])}}function _t(r){qt||(qt=!0,queueMicrotask(Nn));for(var e=pt=r;e.parent!==null;){e=e.parent;var t=e.f;if((t&(Ce|de))!==0){if((t&H)===0)return;e.f^=H}}ft.push(e)}function Rn(r){for(var e=[],t=r;t!==null;){var a=t.f,n=(a&(de|Ce))!==0,i=n&&(a&H)!==0;if(!i&&(a&ct)===0){(a&Ot)!==0?e.push(t):n?t.f^=H:yt(t)&&Wt(t);var o=t.first;if(o!==null){t=o;continue}}var s=t.parent;for(t=t.next;t===null&&s!==null;)t=s.next,s=s.parent}return e}function j(r){var e=r.f,t=(e&q)!==0;if(A!==null&&!re){if(!(F!=null&&F.includes(r))){var a=A.deps;r.rv<Xe&&(r.rv=Xe,B===null&&a!==null&&a[Y]===r?Y++:B===null?B=[r]:(!fe||!B.includes(r))&&B.push(r))}}else if(t&&r.deps===null&&r.effects===null){var n=r,i=n.parent;i!==null&&(i.f&W)===0&&(n.f^=W)}if(t&&!Se&&(n=r,yt(n)&&Pr(n)),Se){if(we.has(r))return we.get(r);if(t){n=r;var o=n.v;return((n.f&H)!==0||aa(n))&&(o=Vt(n)),we.set(n,o),o}}return r.v}function aa(r){if(r.v===Z)return!0;if(r.deps===null)return!1;for(const e of r.deps)if(we.has(e)||(e.f&q)!==0&&aa(e))return!0;return!1}function On(r){var e=re;try{return re=!0,r()}finally{re=e}}const jn=-7169;function se(r,e){r.f=r.f&jn|e}const Pn=["touchstart","touchmove"];function In(r){return Pn.includes(r)}const Dn=new Set,na=new Set;function vt(r){var M;var e=this,t=e.ownerDocument,a=r.type,n=((M=r.composedPath)==null?void 0:M.call(r))||[],i=n[0]||r.target,o=0,s=r.__root;if(s){var l=n.indexOf(s);if(l!==-1&&(e===document||e===window)){r.__root=e;return}var c=n.indexOf(e);if(c===-1)return;l<=c&&(o=l)}if(i=n[o]||r.target,i!==e){Wa(r,"currentTarget",{configurable:!0,get(){return i||t}});var u=A,f=L;Ae(null),ht(null);try{for(var h,g=[];i!==null;){var k=i.assignedSlot||i.parentNode||i.host||null;try{var N=i["__"+a];if(N!=null&&(!i.disabled||r.target===i))if(I(N)){var[R,...Q]=N;R.apply(i,[r,...Q])}else N.call(i,r)}catch(V){h?g.push(V):h=V}if(r.cancelBubble||k===e||k===null)break;i=k}if(h){for(let V of g)queueMicrotask(()=>{throw V});throw h}}finally{r.__root=e,delete r.currentTarget,Ae(u),ht(f)}}}function Zn(r){var e=document.createElement("template");return e.innerHTML=r.replaceAll("<!>","<!---->"),e.content}function Fn(r,e){var t=L;t.nodes_start===null&&(t.nodes_start=r,t.nodes_end=e)}function ia(r,e){var t,a=!r.startsWith("<!>");return()=>{t===void 0&&(t=Zn(a?r:"<!>"+r),t=Vr(t));var n=Zr?document.importNode(t,!0):t.cloneNode(!0);return Fn(n,n),n}}function oa(r,e){r!==null&&r.before(e)}function Yt(r,e){return Bn(r,e)}const Ne=new Map;function Bn(r,{target:e,anchor:t,props:a={},events:n,context:i,intro:o=!0}){dn();var s=new Set,l=f=>{for(var h=0;h<f.length;h++){var g=f[h];if(!s.has(g)){s.add(g);var k=In(g);e.addEventListener(g,vt,{passive:k});var N=Ne.get(g);N===void 0?(document.addEventListener(g,vt,{passive:k}),Ne.set(g,1)):Ne.set(g,N+1)}}};l(qa(Dn)),na.add(l);var c=void 0,u=yn(()=>{var f=t??e.appendChild(pn());return vn(()=>{if(i){Ft({});var h=te;h.c=i}n&&(a.$$events=n),c=r(f,a)||{},i&&Bt()}),()=>{var k;for(var h of s){e.removeEventListener(h,vt);var g=Ne.get(h);--g===0?(document.removeEventListener(h,vt),Ne.delete(h)):Ne.set(h,g)}na.delete(l),f!==t&&((k=f.parentNode)==null||k.removeChild(f))}});return Vn.set(c,u),c}let Vn=new WeakMap;const sa=[...`
|
|
2
|
-
\r\f \v\uFEFF`];function Un(r,e,t){var a=r==null?"":""+r;if(t){for(var n in t)if(t[n])a=a?a+" "+n:n;else if(a.length)for(var i=n.length,o=0;(o=a.indexOf(n,o))>=0;){var s=o+i;(o===0||sa.includes(a[o-1]))&&(s===a.length||sa.includes(a[s]))?a=(o===0?"":a.substring(0,o))+a.substring(s+1):o=s}}return a===""?null:a}function la(r,e=!1){var t=e?" !important;":";",a="";for(var n in r){var i=r[n];i!=null&&i!==""&&(a+=" "+n+": "+i+t)}return a}function Xt(r){return r[0]!=="-"||r[1]!=="-"?r.toLowerCase():r}function $n(r,e){if(e){var t="",a,n;if(Array.isArray(e)?(a=e[0],n=e[1]):a=e,r){r=String(r).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var i=!1,o=0,s=!1,l=[];a&&l.push(...Object.keys(a).map(Xt)),n&&l.push(...Object.keys(n).map(Xt));var c=0,u=-1;const N=r.length;for(var f=0;f<N;f++){var h=r[f];if(s?h==="/"&&r[f-1]==="*"&&(s=!1):i?i===h&&(i=!1):h==="/"&&r[f+1]==="*"?s=!0:h==='"'||h==="'"?i=h:h==="("?o++:h===")"&&o--,!s&&i===!1&&o===0){if(h===":"&&u===-1)u=f;else if(h===";"||f===N-1){if(u!==-1){var g=Xt(r.substring(c,u).trim());if(!l.includes(g)){h!==";"&&f++;var k=r.substring(c,f).trim();t+=" "+k+";"}}c=f+1,u=-1}}}}return a&&(t+=la(a)),n&&(t+=la(n,!0)),t=t.trim(),t===""?null:t}return r==null?null:String(r)}function ca(r,e,t,a,n,i){var o=r.__className;if(o!==t||o===void 0){var s=Un(t,a,i);s==null?r.removeAttribute("class"):r.className=s,r.__className=t}else if(i&&n!==i)for(var l in i){var c=!!i[l];(n==null||c!==!!n[l])&&r.classList.toggle(l,c)}return i}function Ht(r,e={},t,a){for(var n in t){var i=t[n];e[n]!==i&&(t[n]==null?r.style.removeProperty(n):r.style.setProperty(n,i,a))}}function xt(r,e,t,a){var n=r.__style;if(n!==e){var i=$n(e,a);i==null?r.removeAttribute("style"):r.style.cssText=i,r.__style=e}else a&&(Array.isArray(a)?(Ht(r,t==null?void 0:t[0],a[0]),Ht(r,t==null?void 0:t[1],a[1],"important")):Ht(r,t,a));return a}const qn=()=>performance.now(),ae={tick:r=>requestAnimationFrame(r),now:()=>qn(),tasks:new Set};function ua(){const r=ae.now();ae.tasks.forEach(e=>{e.c(r)||(ae.tasks.delete(e),e.f())}),ae.tasks.size!==0&&ae.tick(ua)}function Wn(r){let e;return ae.tasks.size===0&&ae.tick(ua),{promise:new Promise(t=>{ae.tasks.add(e={c:r,f:t})}),abort(){ae.tasks.delete(e)}}}function da(r,e){return r===e||(r==null?void 0:r[ut])===e}function Le(r={},e,t,a){return gn(()=>{var n,i;return qr(()=>{n=i,i=[],On(()=>{r!==t(...i)&&(e(r,...i),n&&da(t(...n),r)&&e(null,...n))})}),()=>{zn(()=>{i&&da(t(...i),r)&&e(null,...i)})}}),r}const Yn="5";typeof window<"u"&&((Pa=window.__svelte??(window.__svelte={})).v??(Pa.v=new Set)).add(Yn);function Xn(r){return r}function Gt(r){return-.5*(Math.cos(Math.PI*r)-1)}function Hn(r){const e=Math.cos(r*Math.PI*.5);return Math.abs(e)<1e-14?1:1-e}function Gn(r){return Math.sin(r*Math.PI/2)}const Jn=128,Qn=0,Kn=1,ei=2;class ti{constructor(){p(this,"animationsStarted",!1);p(this,"animationsCount",0);p(this,"animationsLimit",Jn);p(this,"layers",new Array)}start(){window.requestAnimationFrame(this.tick.bind(this))}tick(){try{this.animationsCount=0;for(let e=0;e<this.layers.length;e++){const t=this.layers[e];if(t==null)continue;const a=t.animations;if(a!=null)for(let n=0;n<a.length;n++){const i=a[n];if(i!=null){for(const o of i.values())if(!o.executed&&(o.executed=!0,o.function(),this.animationsCount++,this.animationsCount==this.animationsLimit))return}}}}catch{}finally{window.requestAnimationFrame(this.tick.bind(this))}}equeue(e,t,a,n){let i=this.layers[e];i==null&&(i=this.layers[e]={animations:new Array});let o=i.animations[t];o==null&&(o=i.animations[t]=new Map);let s={id:a,priority:t,executed:!1,function:n};o.set(a,s),this.animationsStarted==!1&&(this.animationsStarted=!0,this.start())}clear(e,t){for(let a=0;a<this.layers.length;a++){let n=this.layers[a];if(n==null)continue;let i=n.animations[e];if(i==null)return;let o=i.get(t);if(o==null||o.executed==!1)return;i.delete(t)}}speed(){return Math.pow(2,2*this.animationsCount/this.animationsLimit)}stacked(){return this.animationsCount==this.animationsLimit}setLimit(e){this.animationsLimit=e}}const he=new ti;function pa(r){return Object.prototype.toString.call(r)==="[object Date]"}function Jt(r,e){if(r===e||r!==r)return()=>r;const t=typeof r;if(t!==typeof e||Array.isArray(r)!==Array.isArray(e))throw new Error("Cannot interpolate values of different type");if(Array.isArray(r)){const a=e.map((n,i)=>Jt(r[i],n));return n=>a.map(i=>i(n))}if(t==="object"){if(!r||!e)throw new Error("Object cannot be null");if(pa(r)&&pa(e)){const i=r.getTime(),s=e.getTime()-i;return l=>new Date(i+l*s)}const a=Object.keys(e),n={};return a.forEach(i=>{n[i]=Jt(r[i],e[i])}),i=>{const o={};return a.forEach(s=>{o[s]=n[s](i)}),o}}if(t==="number"){const a=e-r;return n=>r+n*a}return()=>e}const br=class br{constructor(e,t={}){it(this,ce);it(this,Ve);it(this,rt);it(this,Me,null);ot(this,ce,U(e)),ot(this,Ve,U(e)),ot(this,rt,t)}static of(e,t){const a=new br(e(),t);return qr(()=>{a.set(e())}),a}set(e,t){var f;D(ee(this,Ve),e);let{delay:a=0,duration:n=400,easing:i=Xn,interpolate:o=Jt}={...ee(this,rt),...t};if(n===0)return(f=ee(this,Me))==null||f.abort(),D(ee(this,ce),e),Promise.resolve();const s=ae.now()+a;let l,c=!1,u=ee(this,Me);return ot(this,Me,Wn(h=>{if(h<s)return!0;if(!c){c=!0;const k=ee(this,ce).v;l=o(k,e),typeof n=="function"&&(n=n(k,e)),u==null||u.abort()}const g=h-s;return g>n?(D(ee(this,ce),e),!1):(D(ee(this,ce),l(i(g/n))),!0)})),ee(this,Me).promise}get current(){return j(ee(this,ce))}get target(){return j(ee(this,Ve))}set target(e){this.set(e)}};ce=new WeakMap,Ve=new WeakMap,rt=new WeakMap,Me=new WeakMap;let Qt=br;class wt{constructor(e,t){p(this,"value");p(this,"motion");this.value=e,this.motion=new Qt(e,t)}set(e,t){this.value=e,this.motion.set(e,t)}update(e){this.motion.set(this.value,e)}snap(){this.motion.set(this.value,{duration:0})}}var ri=ia('<div><div class="body svelte-1nfn9j8"></div></div>');function ai(r,e){Ft(e,!0);let t,a;function n(){return a}let i=U(!1);function o(M){D(i,M,!0)}function s(){return j(i)}let l=new wt(0,{easing:Gt});oe(()=>{c(l.motion.current)}),oe(()=>{j(i)==!1&&(l.snap(),he.clear(e.priority,e.id))});function c(M){t&&he.equeue(e.layer,e.priority,e.id,()=>{t.style.scale=M.toString(),t.style.filter=`brightness(${.25+.75*M})`,a.style.opacity=M.toString()})}function u(M){M!=l.value&&l.set(M,{duration:75})}function f(){return l.motion.current==0}function h(){return l.value}var g=ri();let k,N;var R=$t(g);let Q;return Le(R,M=>a=M,()=>a),Le(g,M=>t=M,()=>t),Wr((M,V,K)=>{k=ca(g,1,"pin svelte-1nfn9j8",null,k,M),N=xt(g,"",N,V),Q=xt(R,"",Q,K)},[()=>({displayed:j(i)}),()=>({width:`${e.width}px`,height:`${e.height}px`,"border-radius":`${e.radius}px`}),()=>({width:`${e.width-4}px`,height:`${e.height-4}px`,"border-radius":`${e.radius-2}px`})]),oa(r,g),Bt({getBody:n,setDisplayed:o,getDisplayed:s,setScale:u,getCollapsed:f,getScale:h})}var He;(r=>{function e(t,a,n){const i=t/2,o=a/2,s=Math.sqrt(i*i+o*o),l=Math.atan(o/i)*(180/Math.PI),c=n*(Math.PI/180);return n<180?n<90?n<l?{offsetX:0,offsetY:s*Math.sin(c)-o}:{offsetX:s*Math.cos(c)-i,offsetY:0}:n<180-l?{offsetX:s*Math.cos(c)-i,offsetY:0}:{offsetX:-t,offsetY:s*Math.sin(c)-o}:n<270?n<180+l?{offsetX:-t,offsetY:s*Math.sin(c)-o}:{offsetX:s*Math.cos(c)-i,offsetY:-a}:n<360-l?{offsetX:s*Math.cos(c)-i,offsetY:-a}:{offsetX:0,offsetY:s*Math.sin(c)-o}}r.getOffsets=e})(He||(He={}));var ni=ia('<div><div class="pointer svelte-j5igi2"></div> <div class="bubble svelte-j5igi2"><div class="body svelte-j5igi2"></div></div></div>');function fa(r,e){Ft(e,!0);let t,a,n,i;const o=e.width+2*e.margin,s=e.height+2*e.margin,l=()=>i;oe(()=>{n.style.width=`${e.margin*4}px`,n.style.height=`${e.margin*4}px`});let c=U(!0);function u(C){D(c,C,!0)}function f(){return j(c)}let h=U(!0);function g(C){D(h,C,!0)}function k(){return R.motion.current==0}function N(){return R.motion.current==1}let R=new wt(0);oe(()=>{Q(R.motion.current)}),oe(()=>{j(c)==!1&&(R.snap(),he.clear(e.priority,e.id+"_scale"))}),oe(()=>{j(h)==!0&&R.value!=0&&(he.stacked()?R.set(0,{duration:0}):R.set(0,{duration:150,easing:Hn})),j(h)==!1&&R.value!=1&&R.set(1,{duration:150,easing:Gn})});function Q(C){!t||!a||!n||he.equeue(j(h)?0:e.layer,e.priority,e.id+"_scale",()=>{t.style.opacity=`${C}`,a.style.scale=`${C}`,n.style.scale=`${C}`})}let M=NaN,V=U(!1),K=new wt(-o/2,{easing:Gt}),Nt=new wt(-s/2,{easing:Gt});oe(()=>{Ia(K.motion.current,Nt.motion.current)}),oe(()=>{j(c)==!1&&(K.snap(),K.snap(),he.clear(e.priority,e.id+"_angle"))}),oe(()=>{j(h)==!0&&j(V)&&(K.update({duration:75}),K.update({duration:75}))});function Ia(C,ue){if(!t||!a||!n)return;const Rt=C+o/2,at=ue+s/2,qe=s<o?Rt*s/o:Rt,Sr=s>o?at*o/s:at,Wi=Math.atan2(Sr,qe)/Math.PI*180-45,Ba=0,Yi=30,zr=Math.sqrt(qe*qe+Sr*Sr),nt=Math.min(o,s)/2,Xi=nt*Math.SQRT2,Hi=(zr-nt)/(Xi-nt),Va=Ba+Hi*(Yi-Ba),Gi=zr<nt?zr/nt:1;he.equeue(e.layer,e.priority,e.id+"_angle",()=>{a.style.transform=`translate(${Math.round(C)}px, ${Math.round(ue)}px)`,n.style.transform=`scale(${Gi}) rotate(${Wi}deg) skew(${Va}deg, ${Va}deg)`})}function $i(C){if(j(V)==!1){let ue=He.getOffsets(o,s,C);K.set(Math.round(ue.offsetX),{duration:0}),Nt.set(Math.round(ue.offsetY),{duration:0}),Ia(K.value,Nt.value),M=C,D(V,!0)}else if(C!=M){let ue=Math.abs(C-M),Rt=ue<180?ue:360-ue,at=Math.log(Rt)*75,qe=He.getOffsets(o,s,C);K.set(Math.round(qe.offsetX),{duration:at}),Nt.set(Math.round(qe.offsetY),{duration:at}),M=C}}function qi(){return He.getOffsets(o,s,M)}var Lt=ni();let Da;var Za=$t(Lt);Le(Za,C=>n=C,()=>n);var kr=fn(Za,2),Fa=$t(kr);return Le(Fa,C=>i=C,()=>i),Le(kr,C=>a=C,()=>a),Le(Lt,C=>t=C,()=>t),Wr(C=>{Da=ca(Lt,1,"anchor svelte-j5igi2",null,Da,C),xt(kr,`margin: ${e.margin}px;`),xt(Fa,`width: ${e.width}px; height: ${e.height}px; border-radius: ${e.radius}px;`)},[()=>({displayed:j(c)})]),oa(r,Lt),Bt({getBody:l,setDisplayed:u,getDisplayed:f,setCollapsed:g,getCollapsed:k,getExpanded:N,setAngle:$i,getOffsets:qi})}var Re;(r=>{function e(s,l,c){return{x:a(l)*c,y:n(s)*c}}r.project=e;function t(s,l,c){return{lat:o(l/c),lng:i(s/c)}}r.unproject=t;function a(s){return(180+s)/360}function n(s){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+s*Math.PI/360)))/360}function i(s){return s*360-180}function o(s){return 360/Math.PI*Math.atan(Math.exp((180-s*360)*Math.PI/180))-90}})(Re||(Re={}));class ha{constructor(e,t,a,n,i){p(this,"swLat");p(this,"swLng");p(this,"neLat");p(this,"neLng");p(this,"contains",(e,t)=>this.swLat<=e&&e<=this.neLat?this.swLng<this.neLng?this.swLng<=t&&t<=this.neLng:t<=this.neLng||this.swLng<=t:!1);const o=a*Math.pow(2,t),s=Re.project(e.sw.lat,e.sw.lng,o),l=Re.project(e.ne.lat,e.ne.lng,o),c=s.x-n,u=s.y+i,f=l.x+n,h=l.y-i,g=Re.unproject(c,u,o),k=Re.unproject(f,h,o);this.swLat=g.lat,this.swLng=g.lng,this.neLat=k.lat,this.neLng=k.lng}}var E;(function(r){r.assertEqual=n=>{};function e(n){}r.assertIs=e;function t(n){throw new Error}r.assertNever=t,r.arrayToEnum=n=>{const i={};for(const o of n)i[o]=o;return i},r.getValidEnumValues=n=>{const i=r.objectKeys(n).filter(s=>typeof n[n[s]]!="number"),o={};for(const s of i)o[s]=n[s];return r.objectValues(o)},r.objectValues=n=>r.objectKeys(n).map(function(i){return n[i]}),r.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{const i=[];for(const o in n)Object.prototype.hasOwnProperty.call(n,o)&&i.push(o);return i},r.find=(n,i)=>{for(const o of n)if(i(o))return o},r.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&Number.isFinite(n)&&Math.floor(n)===n;function a(n,i=" | "){return n.map(o=>typeof o=="string"?`'${o}'`:o).join(i)}r.joinValues=a,r.jsonStringifyReplacer=(n,i)=>typeof i=="bigint"?i.toString():i})(E||(E={}));var ma;(function(r){r.mergeShapes=(e,t)=>({...e,...t})})(ma||(ma={}));const y=E.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),me=r=>{switch(typeof r){case"undefined":return y.undefined;case"string":return y.string;case"number":return Number.isNaN(r)?y.nan:y.number;case"boolean":return y.boolean;case"function":return y.function;case"bigint":return y.bigint;case"symbol":return y.symbol;case"object":return Array.isArray(r)?y.array:r===null?y.null:r.then&&typeof r.then=="function"&&r.catch&&typeof r.catch=="function"?y.promise:typeof Map<"u"&&r instanceof Map?y.map:typeof Set<"u"&&r instanceof Set?y.set:typeof Date<"u"&&r instanceof Date?y.date:y.object;default:return y.unknown}},d=E.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class J extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=a=>{this.issues=[...this.issues,a]},this.addIssues=(a=[])=>{this.issues=[...this.issues,...a]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){const t=e||function(i){return i.message},a={_errors:[]},n=i=>{for(const o of i.issues)if(o.code==="invalid_union")o.unionErrors.map(n);else if(o.code==="invalid_return_type")n(o.returnTypeError);else if(o.code==="invalid_arguments")n(o.argumentsError);else if(o.path.length===0)a._errors.push(t(o));else{let s=a,l=0;for(;l<o.path.length;){const c=o.path[l];l===o.path.length-1?(s[c]=s[c]||{_errors:[]},s[c]._errors.push(t(o))):s[c]=s[c]||{_errors:[]},s=s[c],l++}}};return n(this),a}static assert(e){if(!(e instanceof J))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,E.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=t=>t.message){const t={},a=[];for(const n of this.issues)if(n.path.length>0){const i=n.path[0];t[i]=t[i]||[],t[i].push(e(n))}else a.push(e(n));return{formErrors:a,fieldErrors:t}}get formErrors(){return this.flatten()}}J.create=r=>new J(r);const Ge=(r,e)=>{let t;switch(r.code){case d.invalid_type:r.received===y.undefined?t="Required":t=`Expected ${r.expected}, received ${r.received}`;break;case d.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(r.expected,E.jsonStringifyReplacer)}`;break;case d.unrecognized_keys:t=`Unrecognized key(s) in object: ${E.joinValues(r.keys,", ")}`;break;case d.invalid_union:t="Invalid input";break;case d.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${E.joinValues(r.options)}`;break;case d.invalid_enum_value:t=`Invalid enum value. Expected ${E.joinValues(r.options)}, received '${r.received}'`;break;case d.invalid_arguments:t="Invalid function arguments";break;case d.invalid_return_type:t="Invalid function return type";break;case d.invalid_date:t="Invalid date";break;case d.invalid_string:typeof r.validation=="object"?"includes"in r.validation?(t=`Invalid input: must include "${r.validation.includes}"`,typeof r.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${r.validation.position}`)):"startsWith"in r.validation?t=`Invalid input: must start with "${r.validation.startsWith}"`:"endsWith"in r.validation?t=`Invalid input: must end with "${r.validation.endsWith}"`:E.assertNever(r.validation):r.validation!=="regex"?t=`Invalid ${r.validation}`:t="Invalid";break;case d.too_small:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at least":"more than"} ${r.minimum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at least":"over"} ${r.minimum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${r.minimum}`:r.type==="bigint"?t=`Number must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${r.minimum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(r.minimum))}`:t="Invalid input";break;case d.too_big:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at most":"less than"} ${r.maximum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at most":"under"} ${r.maximum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="bigint"?t=`BigInt must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly":r.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(r.maximum))}`:t="Invalid input";break;case d.custom:t="Invalid input";break;case d.invalid_intersection_types:t="Intersection results could not be merged";break;case d.not_multiple_of:t=`Number must be a multiple of ${r.multipleOf}`;break;case d.not_finite:t="Number must be finite";break;default:t=e.defaultError,E.assertNever(r)}return{message:t}};let ii=Ge;function Kt(){return ii}const er=r=>{const{data:e,path:t,errorMaps:a,issueData:n}=r,i=[...t,...n.path||[]],o={...n,path:i};if(n.message!==void 0)return{...n,path:i,message:n.message};let s="";const l=a.filter(c=>!!c).slice().reverse();for(const c of l)s=c(o,{data:e,defaultError:s}).message;return{...n,path:i,message:s}};function m(r,e){const t=Kt(),a=er({issueData:e,data:r.data,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,t,t===Ge?void 0:Ge].filter(n=>!!n)});r.common.issues.push(a)}class X{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){const a=[];for(const n of t){if(n.status==="aborted")return v;n.status==="dirty"&&e.dirty(),a.push(n.value)}return{status:e.value,value:a}}static async mergeObjectAsync(e,t){const a=[];for(const n of t){const i=await n.key,o=await n.value;a.push({key:i,value:o})}return X.mergeObjectSync(e,a)}static mergeObjectSync(e,t){const a={};for(const n of t){const{key:i,value:o}=n;if(i.status==="aborted"||o.status==="aborted")return v;i.status==="dirty"&&e.dirty(),o.status==="dirty"&&e.dirty(),i.value!=="__proto__"&&(typeof o.value<"u"||n.alwaysSet)&&(a[i.value]=o.value)}return{status:e.value,value:a}}}const v=Object.freeze({status:"aborted"}),Je=r=>({status:"dirty",value:r}),$=r=>({status:"valid",value:r}),ya=r=>r.status==="aborted",ga=r=>r.status==="dirty",Oe=r=>r.status==="valid",bt=r=>typeof Promise<"u"&&r instanceof Promise;var _;(function(r){r.errToObj=e=>typeof e=="string"?{message:e}:e||{},r.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(_||(_={}));class ye{constructor(e,t,a,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=a,this._key=n}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const _a=(r,e)=>{if(Oe(e))return{success:!0,data:e.value};if(!r.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new J(r.common.issues);return this._error=t,this._error}}};function w(r){if(!r)return{};const{errorMap:e,invalid_type_error:t,required_error:a,description:n}=r;if(e&&(t||a))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:n}:{errorMap:(o,s)=>{const{message:l}=r;return o.code==="invalid_enum_value"?{message:l??s.defaultError}:typeof s.data>"u"?{message:l??a??s.defaultError}:o.code!=="invalid_type"?{message:s.defaultError}:{message:l??t??s.defaultError}},description:n}}class z{get description(){return this._def.description}_getType(e){return me(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:me(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new X,ctx:{common:e.parent.common,data:e.data,parsedType:me(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(bt(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const a=this.safeParse(e,t);if(a.success)return a.data;throw a.error}safeParse(e,t){const a={common:{issues:[],async:(t==null?void 0:t.async)??!1,contextualErrorMap:t==null?void 0:t.errorMap},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:me(e)},n=this._parseSync({data:e,path:a.path,parent:a});return _a(a,n)}"~validate"(e){var a,n;const t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:me(e)};if(!this["~standard"].async)try{const i=this._parseSync({data:e,path:[],parent:t});return Oe(i)?{value:i.value}:{issues:t.common.issues}}catch(i){(n=(a=i==null?void 0:i.message)==null?void 0:a.toLowerCase())!=null&&n.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(i=>Oe(i)?{value:i.value}:{issues:t.common.issues})}async parseAsync(e,t){const a=await this.safeParseAsync(e,t);if(a.success)return a.data;throw a.error}async safeParseAsync(e,t){const a={common:{issues:[],contextualErrorMap:t==null?void 0:t.errorMap,async:!0},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:me(e)},n=this._parse({data:e,path:a.path,parent:a}),i=await(bt(n)?n:Promise.resolve(n));return _a(a,i)}refine(e,t){const a=n=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(n):t;return this._refinement((n,i)=>{const o=e(n),s=()=>i.addIssue({code:d.custom,...a(n)});return typeof Promise<"u"&&o instanceof Promise?o.then(l=>l?!0:(s(),!1)):o?!0:(s(),!1)})}refinement(e,t){return this._refinement((a,n)=>e(a)?!0:(n.addIssue(typeof t=="function"?t(a,n):t),!1))}_refinement(e){return new Ze({schema:this,typeName:x.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:t=>this["~validate"](t)}}optional(){return ve.create(this,this._def)}nullable(){return Fe.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ne.create(this)}promise(){return tt.create(this,this._def)}or(e){return St.create([this,e],this._def)}and(e){return zt.create(this,e,this._def)}transform(e){return new Ze({...w(this._def),schema:this,typeName:x.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new or({...w(this._def),innerType:this,defaultValue:t,typeName:x.ZodDefault})}brand(){return new Ci({typeName:x.ZodBranded,type:this,...w(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new sr({...w(this._def),innerType:this,catchValue:t,typeName:x.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return lr.create(this,e)}readonly(){return cr.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const oi=/^c[^\s-]{8,}$/i,si=/^[0-9a-z]+$/,li=/^[0-9A-HJKMNP-TV-Z]{26}$/i,ci=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,ui=/^[a-z0-9_-]{21}$/i,di=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,pi=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,fi=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,hi="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let tr;const mi=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,yi=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,gi=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,_i=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,vi=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,xi=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,va="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",wi=new RegExp(`^${va}$`);function xa(r){let e="[0-5]\\d";r.precision?e=`${e}\\.\\d{${r.precision}}`:r.precision==null&&(e=`${e}(\\.\\d+)?`);const t=r.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${t}`}function bi(r){return new RegExp(`^${xa(r)}$`)}function ki(r){let e=`${va}T${xa(r)}`;const t=[];return t.push(r.local?"Z?":"Z"),r.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function Si(r,e){return!!((e==="v4"||!e)&&mi.test(r)||(e==="v6"||!e)&&gi.test(r))}function zi(r,e){if(!di.test(r))return!1;try{const[t]=r.split(".");if(!t)return!1;const a=t.replace(/-/g,"+").replace(/_/g,"/").padEnd(t.length+(4-t.length%4)%4,"="),n=JSON.parse(atob(a));return!(typeof n!="object"||n===null||"typ"in n&&(n==null?void 0:n.typ)!=="JWT"||!n.alg||e&&n.alg!==e)}catch{return!1}}function Ei(r,e){return!!((e==="v4"||!e)&&yi.test(r)||(e==="v6"||!e)&&_i.test(r))}class ge extends z{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==y.string){const i=this._getOrReturnCtx(e);return m(i,{code:d.invalid_type,expected:y.string,received:i.parsedType}),v}const a=new X;let n;for(const i of this._def.checks)if(i.kind==="min")e.data.length<i.value&&(n=this._getOrReturnCtx(e,n),m(n,{code:d.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),a.dirty());else if(i.kind==="max")e.data.length>i.value&&(n=this._getOrReturnCtx(e,n),m(n,{code:d.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),a.dirty());else if(i.kind==="length"){const o=e.data.length>i.value,s=e.data.length<i.value;(o||s)&&(n=this._getOrReturnCtx(e,n),o?m(n,{code:d.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):s&&m(n,{code:d.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),a.dirty())}else if(i.kind==="email")fi.test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{validation:"email",code:d.invalid_string,message:i.message}),a.dirty());else if(i.kind==="emoji")tr||(tr=new RegExp(hi,"u")),tr.test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{validation:"emoji",code:d.invalid_string,message:i.message}),a.dirty());else if(i.kind==="uuid")ci.test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{validation:"uuid",code:d.invalid_string,message:i.message}),a.dirty());else if(i.kind==="nanoid")ui.test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{validation:"nanoid",code:d.invalid_string,message:i.message}),a.dirty());else if(i.kind==="cuid")oi.test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{validation:"cuid",code:d.invalid_string,message:i.message}),a.dirty());else if(i.kind==="cuid2")si.test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{validation:"cuid2",code:d.invalid_string,message:i.message}),a.dirty());else if(i.kind==="ulid")li.test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{validation:"ulid",code:d.invalid_string,message:i.message}),a.dirty());else if(i.kind==="url")try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),m(n,{validation:"url",code:d.invalid_string,message:i.message}),a.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{validation:"regex",code:d.invalid_string,message:i.message}),a.dirty())):i.kind==="trim"?e.data=e.data.trim():i.kind==="includes"?e.data.includes(i.value,i.position)||(n=this._getOrReturnCtx(e,n),m(n,{code:d.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),a.dirty()):i.kind==="toLowerCase"?e.data=e.data.toLowerCase():i.kind==="toUpperCase"?e.data=e.data.toUpperCase():i.kind==="startsWith"?e.data.startsWith(i.value)||(n=this._getOrReturnCtx(e,n),m(n,{code:d.invalid_string,validation:{startsWith:i.value},message:i.message}),a.dirty()):i.kind==="endsWith"?e.data.endsWith(i.value)||(n=this._getOrReturnCtx(e,n),m(n,{code:d.invalid_string,validation:{endsWith:i.value},message:i.message}),a.dirty()):i.kind==="datetime"?ki(i).test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{code:d.invalid_string,validation:"datetime",message:i.message}),a.dirty()):i.kind==="date"?wi.test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{code:d.invalid_string,validation:"date",message:i.message}),a.dirty()):i.kind==="time"?bi(i).test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{code:d.invalid_string,validation:"time",message:i.message}),a.dirty()):i.kind==="duration"?pi.test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{validation:"duration",code:d.invalid_string,message:i.message}),a.dirty()):i.kind==="ip"?Si(e.data,i.version)||(n=this._getOrReturnCtx(e,n),m(n,{validation:"ip",code:d.invalid_string,message:i.message}),a.dirty()):i.kind==="jwt"?zi(e.data,i.alg)||(n=this._getOrReturnCtx(e,n),m(n,{validation:"jwt",code:d.invalid_string,message:i.message}),a.dirty()):i.kind==="cidr"?Ei(e.data,i.version)||(n=this._getOrReturnCtx(e,n),m(n,{validation:"cidr",code:d.invalid_string,message:i.message}),a.dirty()):i.kind==="base64"?vi.test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{validation:"base64",code:d.invalid_string,message:i.message}),a.dirty()):i.kind==="base64url"?xi.test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{validation:"base64url",code:d.invalid_string,message:i.message}),a.dirty()):E.assertNever(i);return{status:a.value,value:e.data}}_regex(e,t,a){return this.refinement(n=>e.test(n),{validation:t,code:d.invalid_string,..._.errToObj(a)})}_addCheck(e){return new ge({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",..._.errToObj(e)})}url(e){return this._addCheck({kind:"url",..._.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",..._.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",..._.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",..._.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",..._.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",..._.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",..._.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",..._.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",..._.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",..._.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",..._.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",..._.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(e==null?void 0:e.offset)??!1,local:(e==null?void 0:e.local)??!1,..._.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,..._.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",..._.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,..._.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t==null?void 0:t.position,..._.errToObj(t==null?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,..._.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,..._.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,..._.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,..._.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,..._.errToObj(t)})}nonempty(e){return this.min(1,_.errToObj(e))}trim(){return new ge({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ge({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ge({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}ge.create=r=>new ge({checks:[],typeName:x.ZodString,coerce:(r==null?void 0:r.coerce)??!1,...w(r)});function Mi(r,e){const t=(r.toString().split(".")[1]||"").length,a=(e.toString().split(".")[1]||"").length,n=t>a?t:a,i=Number.parseInt(r.toFixed(n).replace(".","")),o=Number.parseInt(e.toFixed(n).replace(".",""));return i%o/10**n}class je extends z{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==y.number){const i=this._getOrReturnCtx(e);return m(i,{code:d.invalid_type,expected:y.number,received:i.parsedType}),v}let a;const n=new X;for(const i of this._def.checks)i.kind==="int"?E.isInteger(e.data)||(a=this._getOrReturnCtx(e,a),m(a,{code:d.invalid_type,expected:"integer",received:"float",message:i.message}),n.dirty()):i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(a=this._getOrReturnCtx(e,a),m(a,{code:d.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(a=this._getOrReturnCtx(e,a),m(a,{code:d.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty()):i.kind==="multipleOf"?Mi(e.data,i.value)!==0&&(a=this._getOrReturnCtx(e,a),m(a,{code:d.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):i.kind==="finite"?Number.isFinite(e.data)||(a=this._getOrReturnCtx(e,a),m(a,{code:d.not_finite,message:i.message}),n.dirty()):E.assertNever(i);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,_.toString(t))}gt(e,t){return this.setLimit("min",e,!1,_.toString(t))}lte(e,t){return this.setLimit("max",e,!0,_.toString(t))}lt(e,t){return this.setLimit("max",e,!1,_.toString(t))}setLimit(e,t,a,n){return new je({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:a,message:_.toString(n)}]})}_addCheck(e){return new je({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:_.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:_.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:_.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:_.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:_.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:_.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:_.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:_.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:_.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&E.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const a of this._def.checks){if(a.kind==="finite"||a.kind==="int"||a.kind==="multipleOf")return!0;a.kind==="min"?(t===null||a.value>t)&&(t=a.value):a.kind==="max"&&(e===null||a.value<e)&&(e=a.value)}return Number.isFinite(t)&&Number.isFinite(e)}}je.create=r=>new je({checks:[],typeName:x.ZodNumber,coerce:(r==null?void 0:r.coerce)||!1,...w(r)});class Qe extends z{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==y.bigint)return this._getInvalidInput(e);let a;const n=new X;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(a=this._getOrReturnCtx(e,a),m(a,{code:d.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(a=this._getOrReturnCtx(e,a),m(a,{code:d.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty()):i.kind==="multipleOf"?e.data%i.value!==BigInt(0)&&(a=this._getOrReturnCtx(e,a),m(a,{code:d.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):E.assertNever(i);return{status:n.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return m(t,{code:d.invalid_type,expected:y.bigint,received:t.parsedType}),v}gte(e,t){return this.setLimit("min",e,!0,_.toString(t))}gt(e,t){return this.setLimit("min",e,!1,_.toString(t))}lte(e,t){return this.setLimit("max",e,!0,_.toString(t))}lt(e,t){return this.setLimit("max",e,!1,_.toString(t))}setLimit(e,t,a,n){return new Qe({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:a,message:_.toString(n)}]})}_addCheck(e){return new Qe({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:_.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:_.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:_.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:_.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:_.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}Qe.create=r=>new Qe({checks:[],typeName:x.ZodBigInt,coerce:(r==null?void 0:r.coerce)??!1,...w(r)});class rr extends z{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==y.boolean){const a=this._getOrReturnCtx(e);return m(a,{code:d.invalid_type,expected:y.boolean,received:a.parsedType}),v}return $(e.data)}}rr.create=r=>new rr({typeName:x.ZodBoolean,coerce:(r==null?void 0:r.coerce)||!1,...w(r)});class kt extends z{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==y.date){const i=this._getOrReturnCtx(e);return m(i,{code:d.invalid_type,expected:y.date,received:i.parsedType}),v}if(Number.isNaN(e.data.getTime())){const i=this._getOrReturnCtx(e);return m(i,{code:d.invalid_date}),v}const a=new X;let n;for(const i of this._def.checks)i.kind==="min"?e.data.getTime()<i.value&&(n=this._getOrReturnCtx(e,n),m(n,{code:d.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),a.dirty()):i.kind==="max"?e.data.getTime()>i.value&&(n=this._getOrReturnCtx(e,n),m(n,{code:d.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),a.dirty()):E.assertNever(i);return{status:a.value,value:new Date(e.data.getTime())}}_addCheck(e){return new kt({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:_.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:_.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e!=null?new Date(e):null}}kt.create=r=>new kt({checks:[],coerce:(r==null?void 0:r.coerce)||!1,typeName:x.ZodDate,...w(r)});class wa extends z{_parse(e){if(this._getType(e)!==y.symbol){const a=this._getOrReturnCtx(e);return m(a,{code:d.invalid_type,expected:y.symbol,received:a.parsedType}),v}return $(e.data)}}wa.create=r=>new wa({typeName:x.ZodSymbol,...w(r)});class ba extends z{_parse(e){if(this._getType(e)!==y.undefined){const a=this._getOrReturnCtx(e);return m(a,{code:d.invalid_type,expected:y.undefined,received:a.parsedType}),v}return $(e.data)}}ba.create=r=>new ba({typeName:x.ZodUndefined,...w(r)});class ka extends z{_parse(e){if(this._getType(e)!==y.null){const a=this._getOrReturnCtx(e);return m(a,{code:d.invalid_type,expected:y.null,received:a.parsedType}),v}return $(e.data)}}ka.create=r=>new ka({typeName:x.ZodNull,...w(r)});class ar extends z{constructor(){super(...arguments),this._any=!0}_parse(e){return $(e.data)}}ar.create=r=>new ar({typeName:x.ZodAny,...w(r)});class Pe extends z{constructor(){super(...arguments),this._unknown=!0}_parse(e){return $(e.data)}}Pe.create=r=>new Pe({typeName:x.ZodUnknown,...w(r)});class _e extends z{_parse(e){const t=this._getOrReturnCtx(e);return m(t,{code:d.invalid_type,expected:y.never,received:t.parsedType}),v}}_e.create=r=>new _e({typeName:x.ZodNever,...w(r)});class nr extends z{_parse(e){if(this._getType(e)!==y.undefined){const a=this._getOrReturnCtx(e);return m(a,{code:d.invalid_type,expected:y.void,received:a.parsedType}),v}return $(e.data)}}nr.create=r=>new nr({typeName:x.ZodVoid,...w(r)});class ne extends z{_parse(e){const{ctx:t,status:a}=this._processInputParams(e),n=this._def;if(t.parsedType!==y.array)return m(t,{code:d.invalid_type,expected:y.array,received:t.parsedType}),v;if(n.exactLength!==null){const o=t.data.length>n.exactLength.value,s=t.data.length<n.exactLength.value;(o||s)&&(m(t,{code:o?d.too_big:d.too_small,minimum:s?n.exactLength.value:void 0,maximum:o?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),a.dirty())}if(n.minLength!==null&&t.data.length<n.minLength.value&&(m(t,{code:d.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),a.dirty()),n.maxLength!==null&&t.data.length>n.maxLength.value&&(m(t,{code:d.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),a.dirty()),t.common.async)return Promise.all([...t.data].map((o,s)=>n.type._parseAsync(new ye(t,o,t.path,s)))).then(o=>X.mergeArray(a,o));const i=[...t.data].map((o,s)=>n.type._parseSync(new ye(t,o,t.path,s)));return X.mergeArray(a,i)}get element(){return this._def.type}min(e,t){return new ne({...this._def,minLength:{value:e,message:_.toString(t)}})}max(e,t){return new ne({...this._def,maxLength:{value:e,message:_.toString(t)}})}length(e,t){return new ne({...this._def,exactLength:{value:e,message:_.toString(t)}})}nonempty(e){return this.min(1,e)}}ne.create=(r,e)=>new ne({type:r,minLength:null,maxLength:null,exactLength:null,typeName:x.ZodArray,...w(e)});function Ie(r){if(r instanceof P){const e={};for(const t in r.shape){const a=r.shape[t];e[t]=ve.create(Ie(a))}return new P({...r._def,shape:()=>e})}else return r instanceof ne?new ne({...r._def,type:Ie(r.element)}):r instanceof ve?ve.create(Ie(r.unwrap())):r instanceof Fe?Fe.create(Ie(r.unwrap())):r instanceof le?le.create(r.items.map(e=>Ie(e))):r}class P extends z{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),t=E.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==y.object){const c=this._getOrReturnCtx(e);return m(c,{code:d.invalid_type,expected:y.object,received:c.parsedType}),v}const{status:a,ctx:n}=this._processInputParams(e),{shape:i,keys:o}=this._getCached(),s=[];if(!(this._def.catchall instanceof _e&&this._def.unknownKeys==="strip"))for(const c in n.data)o.includes(c)||s.push(c);const l=[];for(const c of o){const u=i[c],f=n.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new ye(n,f,n.path,c)),alwaysSet:c in n.data})}if(this._def.catchall instanceof _e){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of s)l.push({key:{status:"valid",value:u},value:{status:"valid",value:n.data[u]}});else if(c==="strict")s.length>0&&(m(n,{code:d.unrecognized_keys,keys:s}),a.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const u of s){const f=n.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new ye(n,f,n.path,u)),alwaysSet:u in n.data})}}return n.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const f=await u.key,h=await u.value;c.push({key:f,value:h,alwaysSet:u.alwaysSet})}return c}).then(c=>X.mergeObjectSync(a,c)):X.mergeObjectSync(a,l)}get shape(){return this._def.shape()}strict(e){return _.errToObj,new P({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,a)=>{var i,o;const n=((o=(i=this._def).errorMap)==null?void 0:o.call(i,t,a).message)??a.defaultError;return t.code==="unrecognized_keys"?{message:_.errToObj(e).message??n}:{message:n}}}:{}})}strip(){return new P({...this._def,unknownKeys:"strip"})}passthrough(){return new P({...this._def,unknownKeys:"passthrough"})}extend(e){return new P({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new P({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:x.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new P({...this._def,catchall:e})}pick(e){const t={};for(const a of E.objectKeys(e))e[a]&&this.shape[a]&&(t[a]=this.shape[a]);return new P({...this._def,shape:()=>t})}omit(e){const t={};for(const a of E.objectKeys(this.shape))e[a]||(t[a]=this.shape[a]);return new P({...this._def,shape:()=>t})}deepPartial(){return Ie(this)}partial(e){const t={};for(const a of E.objectKeys(this.shape)){const n=this.shape[a];e&&!e[a]?t[a]=n:t[a]=n.optional()}return new P({...this._def,shape:()=>t})}required(e){const t={};for(const a of E.objectKeys(this.shape))if(e&&!e[a])t[a]=this.shape[a];else{let i=this.shape[a];for(;i instanceof ve;)i=i._def.innerType;t[a]=i}return new P({...this._def,shape:()=>t})}keyof(){return Ma(E.objectKeys(this.shape))}}P.create=(r,e)=>new P({shape:()=>r,unknownKeys:"strip",catchall:_e.create(),typeName:x.ZodObject,...w(e)}),P.strictCreate=(r,e)=>new P({shape:()=>r,unknownKeys:"strict",catchall:_e.create(),typeName:x.ZodObject,...w(e)}),P.lazycreate=(r,e)=>new P({shape:r,unknownKeys:"strip",catchall:_e.create(),typeName:x.ZodObject,...w(e)});class St extends z{_parse(e){const{ctx:t}=this._processInputParams(e),a=this._def.options;function n(i){for(const s of i)if(s.result.status==="valid")return s.result;for(const s of i)if(s.result.status==="dirty")return t.common.issues.push(...s.ctx.common.issues),s.result;const o=i.map(s=>new J(s.ctx.common.issues));return m(t,{code:d.invalid_union,unionErrors:o}),v}if(t.common.async)return Promise.all(a.map(async i=>{const o={...t,common:{...t.common,issues:[]},parent:null};return{result:await i._parseAsync({data:t.data,path:t.path,parent:o}),ctx:o}})).then(n);{let i;const o=[];for(const l of a){const c={...t,common:{...t.common,issues:[]},parent:null},u=l._parseSync({data:t.data,path:t.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!i&&(i={result:u,ctx:c}),c.common.issues.length&&o.push(c.common.issues)}if(i)return t.common.issues.push(...i.ctx.common.issues),i.result;const s=o.map(l=>new J(l));return m(t,{code:d.invalid_union,unionErrors:s}),v}}get options(){return this._def.options}}St.create=(r,e)=>new St({options:r,typeName:x.ZodUnion,...w(e)});function ir(r,e){const t=me(r),a=me(e);if(r===e)return{valid:!0,data:r};if(t===y.object&&a===y.object){const n=E.objectKeys(e),i=E.objectKeys(r).filter(s=>n.indexOf(s)!==-1),o={...r,...e};for(const s of i){const l=ir(r[s],e[s]);if(!l.valid)return{valid:!1};o[s]=l.data}return{valid:!0,data:o}}else if(t===y.array&&a===y.array){if(r.length!==e.length)return{valid:!1};const n=[];for(let i=0;i<r.length;i++){const o=r[i],s=e[i],l=ir(o,s);if(!l.valid)return{valid:!1};n.push(l.data)}return{valid:!0,data:n}}else return t===y.date&&a===y.date&&+r==+e?{valid:!0,data:r}:{valid:!1}}class zt extends z{_parse(e){const{status:t,ctx:a}=this._processInputParams(e),n=(i,o)=>{if(ya(i)||ya(o))return v;const s=ir(i.value,o.value);return s.valid?((ga(i)||ga(o))&&t.dirty(),{status:t.value,value:s.data}):(m(a,{code:d.invalid_intersection_types}),v)};return a.common.async?Promise.all([this._def.left._parseAsync({data:a.data,path:a.path,parent:a}),this._def.right._parseAsync({data:a.data,path:a.path,parent:a})]).then(([i,o])=>n(i,o)):n(this._def.left._parseSync({data:a.data,path:a.path,parent:a}),this._def.right._parseSync({data:a.data,path:a.path,parent:a}))}}zt.create=(r,e,t)=>new zt({left:r,right:e,typeName:x.ZodIntersection,...w(t)});class le extends z{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==y.array)return m(a,{code:d.invalid_type,expected:y.array,received:a.parsedType}),v;if(a.data.length<this._def.items.length)return m(a,{code:d.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),v;!this._def.rest&&a.data.length>this._def.items.length&&(m(a,{code:d.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const i=[...a.data].map((o,s)=>{const l=this._def.items[s]||this._def.rest;return l?l._parse(new ye(a,o,a.path,s)):null}).filter(o=>!!o);return a.common.async?Promise.all(i).then(o=>X.mergeArray(t,o)):X.mergeArray(t,i)}get items(){return this._def.items}rest(e){return new le({...this._def,rest:e})}}le.create=(r,e)=>{if(!Array.isArray(r))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new le({items:r,typeName:x.ZodTuple,rest:null,...w(e)})};class Sa extends z{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==y.map)return m(a,{code:d.invalid_type,expected:y.map,received:a.parsedType}),v;const n=this._def.keyType,i=this._def.valueType,o=[...a.data.entries()].map(([s,l],c)=>({key:n._parse(new ye(a,s,a.path,[c,"key"])),value:i._parse(new ye(a,l,a.path,[c,"value"]))}));if(a.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const l of o){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return v;(c.status==="dirty"||u.status==="dirty")&&t.dirty(),s.set(c.value,u.value)}return{status:t.value,value:s}})}else{const s=new Map;for(const l of o){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return v;(c.status==="dirty"||u.status==="dirty")&&t.dirty(),s.set(c.value,u.value)}return{status:t.value,value:s}}}}Sa.create=(r,e,t)=>new Sa({valueType:e,keyType:r,typeName:x.ZodMap,...w(t)});class Ke extends z{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==y.set)return m(a,{code:d.invalid_type,expected:y.set,received:a.parsedType}),v;const n=this._def;n.minSize!==null&&a.data.size<n.minSize.value&&(m(a,{code:d.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),t.dirty()),n.maxSize!==null&&a.data.size>n.maxSize.value&&(m(a,{code:d.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty());const i=this._def.valueType;function o(l){const c=new Set;for(const u of l){if(u.status==="aborted")return v;u.status==="dirty"&&t.dirty(),c.add(u.value)}return{status:t.value,value:c}}const s=[...a.data.values()].map((l,c)=>i._parse(new ye(a,l,a.path,c)));return a.common.async?Promise.all(s).then(l=>o(l)):o(s)}min(e,t){return new Ke({...this._def,minSize:{value:e,message:_.toString(t)}})}max(e,t){return new Ke({...this._def,maxSize:{value:e,message:_.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}Ke.create=(r,e)=>new Ke({valueType:r,minSize:null,maxSize:null,typeName:x.ZodSet,...w(e)});class et extends z{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==y.function)return m(t,{code:d.invalid_type,expected:y.function,received:t.parsedType}),v;function a(s,l){return er({data:s,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Kt(),Ge].filter(c=>!!c),issueData:{code:d.invalid_arguments,argumentsError:l}})}function n(s,l){return er({data:s,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Kt(),Ge].filter(c=>!!c),issueData:{code:d.invalid_return_type,returnTypeError:l}})}const i={errorMap:t.common.contextualErrorMap},o=t.data;if(this._def.returns instanceof tt){const s=this;return $(async function(...l){const c=new J([]),u=await s._def.args.parseAsync(l,i).catch(g=>{throw c.addIssue(a(l,g)),c}),f=await Reflect.apply(o,this,u);return await s._def.returns._def.type.parseAsync(f,i).catch(g=>{throw c.addIssue(n(f,g)),c})})}else{const s=this;return $(function(...l){const c=s._def.args.safeParse(l,i);if(!c.success)throw new J([a(l,c.error)]);const u=Reflect.apply(o,this,c.data),f=s._def.returns.safeParse(u,i);if(!f.success)throw new J([n(u,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new et({...this._def,args:le.create(e).rest(Pe.create())})}returns(e){return new et({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,a){return new et({args:e||le.create([]).rest(Pe.create()),returns:t||Pe.create(),typeName:x.ZodFunction,...w(a)})}}class za extends z{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}za.create=(r,e)=>new za({getter:r,typeName:x.ZodLazy,...w(e)});class Ea extends z{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return m(t,{received:t.data,code:d.invalid_literal,expected:this._def.value}),v}return{status:"valid",value:e.data}}get value(){return this._def.value}}Ea.create=(r,e)=>new Ea({value:r,typeName:x.ZodLiteral,...w(e)});function Ma(r,e){return new De({values:r,typeName:x.ZodEnum,...w(e)})}class De extends z{_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),a=this._def.values;return m(t,{expected:E.joinValues(a),received:t.parsedType,code:d.invalid_type}),v}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const t=this._getOrReturnCtx(e),a=this._def.values;return m(t,{received:t.data,code:d.invalid_enum_value,options:a}),v}return $(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return De.create(e,{...this._def,...t})}exclude(e,t=this._def){return De.create(this.options.filter(a=>!e.includes(a)),{...this._def,...t})}}De.create=Ma;class Ca extends z{_parse(e){const t=E.getValidEnumValues(this._def.values),a=this._getOrReturnCtx(e);if(a.parsedType!==y.string&&a.parsedType!==y.number){const n=E.objectValues(t);return m(a,{expected:E.joinValues(n),received:a.parsedType,code:d.invalid_type}),v}if(this._cache||(this._cache=new Set(E.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const n=E.objectValues(t);return m(a,{received:a.data,code:d.invalid_enum_value,options:n}),v}return $(e.data)}get enum(){return this._def.values}}Ca.create=(r,e)=>new Ca({values:r,typeName:x.ZodNativeEnum,...w(e)});class tt extends z{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==y.promise&&t.common.async===!1)return m(t,{code:d.invalid_type,expected:y.promise,received:t.parsedType}),v;const a=t.parsedType===y.promise?t.data:Promise.resolve(t.data);return $(a.then(n=>this._def.type.parseAsync(n,{path:t.path,errorMap:t.common.contextualErrorMap})))}}tt.create=(r,e)=>new tt({type:r,typeName:x.ZodPromise,...w(e)});class Ze extends z{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===x.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:a}=this._processInputParams(e),n=this._def.effect||null,i={addIssue:o=>{m(a,o),o.fatal?t.abort():t.dirty()},get path(){return a.path}};if(i.addIssue=i.addIssue.bind(i),n.type==="preprocess"){const o=n.transform(a.data,i);if(a.common.async)return Promise.resolve(o).then(async s=>{if(t.value==="aborted")return v;const l=await this._def.schema._parseAsync({data:s,path:a.path,parent:a});return l.status==="aborted"?v:l.status==="dirty"||t.value==="dirty"?Je(l.value):l});{if(t.value==="aborted")return v;const s=this._def.schema._parseSync({data:o,path:a.path,parent:a});return s.status==="aborted"?v:s.status==="dirty"||t.value==="dirty"?Je(s.value):s}}if(n.type==="refinement"){const o=s=>{const l=n.refinement(s,i);if(a.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(a.common.async===!1){const s=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});return s.status==="aborted"?v:(s.status==="dirty"&&t.dirty(),o(s.value),{status:t.value,value:s.value})}else return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(s=>s.status==="aborted"?v:(s.status==="dirty"&&t.dirty(),o(s.value).then(()=>({status:t.value,value:s.value}))))}if(n.type==="transform")if(a.common.async===!1){const o=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});if(!Oe(o))return v;const s=n.transform(o.value,i);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:s}}else return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(o=>Oe(o)?Promise.resolve(n.transform(o.value,i)).then(s=>({status:t.value,value:s})):v);E.assertNever(n)}}Ze.create=(r,e,t)=>new Ze({schema:r,typeName:x.ZodEffects,effect:e,...w(t)}),Ze.createWithPreprocess=(r,e,t)=>new Ze({schema:e,effect:{type:"preprocess",transform:r},typeName:x.ZodEffects,...w(t)});class ve extends z{_parse(e){return this._getType(e)===y.undefined?$(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}ve.create=(r,e)=>new ve({innerType:r,typeName:x.ZodOptional,...w(e)});class Fe extends z{_parse(e){return this._getType(e)===y.null?$(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Fe.create=(r,e)=>new Fe({innerType:r,typeName:x.ZodNullable,...w(e)});class or extends z{_parse(e){const{ctx:t}=this._processInputParams(e);let a=t.data;return t.parsedType===y.undefined&&(a=this._def.defaultValue()),this._def.innerType._parse({data:a,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}or.create=(r,e)=>new or({innerType:r,typeName:x.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...w(e)});class sr extends z{_parse(e){const{ctx:t}=this._processInputParams(e),a={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:a.data,path:a.path,parent:{...a}});return bt(n)?n.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new J(a.common.issues)},input:a.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new J(a.common.issues)},input:a.data})}}removeCatch(){return this._def.innerType}}sr.create=(r,e)=>new sr({innerType:r,typeName:x.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...w(e)});class Ta extends z{_parse(e){if(this._getType(e)!==y.nan){const a=this._getOrReturnCtx(e);return m(a,{code:d.invalid_type,expected:y.nan,received:a.parsedType}),v}return{status:"valid",value:e.data}}}Ta.create=r=>new Ta({typeName:x.ZodNaN,...w(r)});class Ci extends z{_parse(e){const{ctx:t}=this._processInputParams(e),a=t.data;return this._def.type._parse({data:a,path:t.path,parent:t})}unwrap(){return this._def.type}}class lr extends z{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:a.data,path:a.path,parent:a});return i.status==="aborted"?v:i.status==="dirty"?(t.dirty(),Je(i.value)):this._def.out._parseAsync({data:i.value,path:a.path,parent:a})})();{const n=this._def.in._parseSync({data:a.data,path:a.path,parent:a});return n.status==="aborted"?v:n.status==="dirty"?(t.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:a.path,parent:a})}}static create(e,t){return new lr({in:e,out:t,typeName:x.ZodPipeline})}}class cr extends z{_parse(e){const t=this._def.innerType._parse(e),a=n=>(Oe(n)&&(n.value=Object.freeze(n.value)),n);return bt(t)?t.then(n=>a(n)):a(t)}unwrap(){return this._def.innerType}}cr.create=(r,e)=>new cr({innerType:r,typeName:x.ZodReadonly,...w(e)});var x;(function(r){r.ZodString="ZodString",r.ZodNumber="ZodNumber",r.ZodNaN="ZodNaN",r.ZodBigInt="ZodBigInt",r.ZodBoolean="ZodBoolean",r.ZodDate="ZodDate",r.ZodSymbol="ZodSymbol",r.ZodUndefined="ZodUndefined",r.ZodNull="ZodNull",r.ZodAny="ZodAny",r.ZodUnknown="ZodUnknown",r.ZodNever="ZodNever",r.ZodVoid="ZodVoid",r.ZodArray="ZodArray",r.ZodObject="ZodObject",r.ZodUnion="ZodUnion",r.ZodDiscriminatedUnion="ZodDiscriminatedUnion",r.ZodIntersection="ZodIntersection",r.ZodTuple="ZodTuple",r.ZodRecord="ZodRecord",r.ZodMap="ZodMap",r.ZodSet="ZodSet",r.ZodFunction="ZodFunction",r.ZodLazy="ZodLazy",r.ZodLiteral="ZodLiteral",r.ZodEnum="ZodEnum",r.ZodEffects="ZodEffects",r.ZodNativeEnum="ZodNativeEnum",r.ZodOptional="ZodOptional",r.ZodNullable="ZodNullable",r.ZodDefault="ZodDefault",r.ZodCatch="ZodCatch",r.ZodPromise="ZodPromise",r.ZodBranded="ZodBranded",r.ZodPipeline="ZodPipeline",r.ZodReadonly="ZodReadonly"})(x||(x={}));const Be=ge.create,b=je.create,Aa=rr.create,Na=ar.create;Pe.create,_e.create;const Et=nr.create,ur=ne.create,O=P.create;St.create,zt.create;const La=le.create,ie=et.create;De.create;const Ti=tt.create;ve.create,Fe.create,O({pin:O({fade:Aa().optional(),maxCount:b().optional(),maxZoom:b().optional()}).optional(),animation:O({queue:O({limit:b().optional()}).optional()}).optional(),states:O({api:Be().optional()}).optional(),log:O({api:Be().optional()}).optional()});const dr=b().min(-90).max(90),pr=b().min(-180).max(180),Ai=O({sw:O({lat:dr,lng:pr}),ne:O({lat:dr,lng:pr})}),fr=Na().refine(r=>r instanceof HTMLElement,"Must be an HTMLElement"),Ra=O({mapSize:b(),zoomMin:b(),zoomMax:b(),zoomScale:b()}),Ni=O({instance:Na(),inserted:ie().returns(Aa()),insert:ie().returns(Et()),remove:ie().returns(Et()),update:ie().args(b()).returns(Et())}),Li=O({parameters:Ra,getContainer:ie().args().returns(fr),getZoom:ie().args().returns(b()),getBounds:ie().args().returns(Ai),panBy:ie().args(b(),b()).returns(Et()),createMarker:ie().args(fr,dr,pr,b()).returns(Ni)}),hr=ie().args(Be()).returns(Ti(fr)),Ri=O({id:Be().min(1),rank:b(),lat:b().min(-90).max(90),lng:b().min(-180).max(180),tooltip:O({style:O({width:b(),height:b(),margin:b(),radius:b()}).refine(r=>Math.min(r.width,r.height)/r.margin>=5,"Tooltip width and height must be at least 5 times the margin"),body:hr}),pin:O({style:O({width:b(),height:b(),radius:b()}),body:hr}).optional(),popup:O({style:O({width:b(),height:b(),radius:b(),margin:b()}),body:hr}).optional()}),Oi=ur(Ri);La([b(),ur(La([b(),b()]))]);const ji=O({id:Be(),rank:b(),lat:b(),lng:b(),width:b(),height:b(),margin:b()});O({key:Be(),parameters:Ra,input:ur(ji)});var Ee;(r=>{r.COUNT=12,r.DEFAULT=270,r.DEGREES=[0,30,60,90,120,150,180,210,240,270,300,330]})(Ee||(Ee={}));const Oa="https://arenarium.dev/api/public/v1/tooltip/states",Pi="https://arenarium.dev/api/public/v1/log";class Ii{constructor(e,t,a){p(this,"key");p(this,"provider");p(this,"apiStatesUrl",Oa);p(this,"apiLogUrl",Pi);p(this,"markerDataArray",new Array);p(this,"markerDataMap",new Map);p(this,"markerDataUpdating",!1);p(this,"markerPinProcessor");p(this,"markerTooltipProcessor");p(this,"markerPopupProcessor");Li.parse(t),this.key=e,this.provider=t,this.markerPinProcessor=new gr(t),this.markerTooltipProcessor=new Di(t),this.markerPopupProcessor=new Zi(t),this.configuration=a}set configuration(e){var t,a,n;this.apiStatesUrl=((t=e==null?void 0:e.states)==null?void 0:t.api)??Oa,this.markerPinProcessor.setConfiguration(e),he.setLimit(((n=(a=e==null?void 0:e.animation)==null?void 0:a.queue)==null?void 0:n.limit)??8*navigator.hardwareConcurrency)}async updateMarkers(e){await Oi.parseAsync(e);try{if(e.length>1){const t={key:this.key,parameters:this.provider.parameters,input:e.map(i=>({id:i.id,rank:i.rank,lat:i.lat,lng:i.lng,width:i.tooltip.style.width,height:i.tooltip.style.height,margin:i.tooltip.style.margin}))},a=await fetch(this.apiStatesUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!a.ok||!a.body)throw new Error("Failed to get marker states: "+a.statusText);const n=await a.json();this.updateMarkerData(e,n)}else{const t=[[0,[[0,Ee.DEGREES.indexOf(Ee.DEFAULT)]]]];this.updateMarkerData(e,t)}this.processMarkerDataCallback()}catch(t){throw console.error(t),this.log("[Error] Failed to update markers",{message:t.message,stack:t.stack}),t}}removeMarkers(){try{this.removeMarkerData()}catch(e){throw console.error(e),this.log("[Error] Failed to remove markers",{message:e.message,stack:e.stack}),e}}showPopup(e){try{for(const t of this.markerDataArray)t.marker.id==e?this.markerPopupProcessor.show(t):this.markerPopupProcessor.hide(t)}catch(t){console.error(t),this.log("[Error] Failed to show popup",{message:t.message,stack:t.stack});for(const a of this.markerDataArray)this.markerPopupProcessor.hide(a);throw t}}hidePopup(e){try{if(e){const t=this.markerDataMap.get(e);if(t==null)return;this.markerPopupProcessor.hide(t)}else for(const t of this.markerDataArray)this.markerPopupProcessor.hide(t)}catch(t){console.error(t),this.log("[Error] Failed to hide popup",{message:t.message,stack:t.stack});for(const a of this.markerDataArray)this.markerPopupProcessor.hide(a);throw t}}updateMarkerData(e,t){try{this.markerDataUpdating=!0;const a=new Map(e.map((i,o)=>[i.id,new ja(this.provider,i,t[o])])),n=Array.from(this.markerDataArray);for(const i of n)a.has(i.marker.id)==!1&&(i.remove(),this.markerDataMap.delete(i.marker.id),this.markerDataArray.splice(this.markerDataArray.indexOf(i),1));for(let i=0;i<e.length;i++){const o=e[i],s=t[i],l=this.markerDataMap.get(o.id);if(l)l.update(s);else{const c=new ja(this.provider,o,s);c.create(),this.markerDataMap.set(o.id,c),this.markerDataArray.push(c)}}this.markerDataArray.sort((i,o)=>i.zoom-o.zoom),this.markerPinProcessor.updateElements(this.markerDataArray.map(i=>i.pin)),this.markerTooltipProcessor.updateElements(this.markerDataArray.map(i=>i.tooltip))}catch(a){throw console.error(a),this.markerDataArray.forEach(n=>n.remove()),this.markerDataArray.length=0,this.markerDataMap.clear(),a}finally{this.markerDataUpdating=!1}}removeMarkerData(){try{this.markerDataUpdating=!0,this.markerPinProcessor.removeElements(),this.markerTooltipProcessor.removeElements(),this.markerPopupProcessor.clear(),this.markerDataArray.length=0,this.markerDataMap.clear()}catch(e){throw console.error(e),e}finally{this.markerDataUpdating=!1}}processMarkerDataCallback(){if(this.markerDataArray.length!=0)try{this.processMarkerData(),window.setTimeout(this.processMarkerDataCallback.bind(this),25)}catch(e){console.error(e),this.log("[Error] Failed to process markers",{message:e.message,stack:e.stack})}}processMarkerData(){if(this.markerDataUpdating)return;const e=this.provider.getBounds(),t=this.provider.getZoom();this.markerPopupProcessor.process(),this.markerTooltipProcessor.process(e,t),this.markerPinProcessor.process(e,t)}async log(e,t){try{const a={title:e,content:t};await fetch(this.apiLogUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)})}catch(a){console.error(a)}}}class ja{constructor(e,t,a){p(this,"marker");p(this,"zoom");p(this,"pin");p(this,"tooltip");this.marker=t,this.zoom=a[0],this.pin=new yr(e,t,a),this.tooltip=new _r(e,t,a)}create(){this.pin.create(),this.tooltip.create()}update(e){this.pin.update(e),this.tooltip.update(e)}remove(){this.pin.remove(),this.tooltip.remove()}}class mr{constructor(e,t){p(this,"provider");p(this,"id");p(this,"lat");p(this,"lng");p(this,"shown");p(this,"element");p(this,"component");p(this,"marker");this.provider=e,this.id=t.id,this.lat=t.lat,this.lng=t.lng,this.shown=!0}create(){this.createElement(),this.createMarker(),this.updateZIndex()}createElement(){throw new Error("Create element not implemented")}createMarker(){const e=this.element;if(!e)throw new Error("Failed to create provider marker");this.marker=this.provider.createMarker(e,this.lat,this.lng,this.getZindex())}updateZIndex(){if(this.marker==null)throw new Error("Failed to update provider marker z-index");this.marker.update(this.getZindex())}updateMap(e){const t=this.marker,a=this.component;if(t==null||a==null)throw new Error("Failed to update provider marker map");e?t.inserted()==!1&&t.insert():t.inserted()==!0&&t.remove()}getZindex(){throw new Error("Get z-index not implemented")}remove(){var e,t;(e=this.marker)==null||e.remove(),(t=this.element)==null||t.remove()}}const Ue=class Ue extends mr{constructor(t,a,n){var i,o,s,l;super(t,a);p(this,"width");p(this,"height");p(this,"radius");p(this,"zoom");p(this,"bodyLoading",!1);p(this,"bodyLoaded",!1);p(this,"bodyCallback");this.width=((i=a.pin)==null?void 0:i.style.width)??Ue.DEFAULT_SIZE,this.height=((o=a.pin)==null?void 0:o.style.height)??Ue.DEFAULT_SIZE,this.radius=((s=a.pin)==null?void 0:s.style.radius)??Ue.DEFAULT_SIZE,this.zoom=n[0],this.bodyCallback=(l=a.pin)==null?void 0:l.body}createElement(){this.element=document.createElement("div"),this.element.classList.add("pin"),this.component=Yt(ai,{target:this.element,props:{id:this.id+"_pin",layer:ei,priority:this.zoom*this.provider.parameters.zoomScale,width:this.width,height:this.height,radius:this.radius}})}update(t){this.zoom=t[0],this.updateZIndex()}updateMap(t){var a;super.updateMap(t),(a=this.component)==null||a.setDisplayed(t)}updateState(t){if(this.component==null)throw new Error("Failed to update pin state");this.component.setScale(this.getScale(t))}updateBody(){var a;if(this.bodyCallback==null||this.bodyLoaded||this.bodyLoading)return;const t=(a=this.component)==null?void 0:a.getBody();t!=null&&(this.bodyLoading=!0,this.bodyCallback(this.id).then(n=>t.appendChild(n)).catch(n=>console.error(n)).finally(()=>{this.bodyLoaded=!0,this.bodyLoading=!1}))}setCollapsed(t){if(this.component==null)throw new Error("Failed to set pin collapsed");this.component.setScale(t?0:1)}getScale(t){return this.zoom<t?1:Math.max(0,1-(this.zoom-t)*.125)}getZindex(){return Math.round((this.provider.parameters.zoomMax-this.zoom)*this.provider.parameters.zoomScale)}isCollapsed(){return this.component==null?!1:this.component.getCollapsed()}isBodyLoaded(){return this.bodyCallback==null||this.bodyLoaded}};p(Ue,"DEFAULT_SIZE",16);let yr=Ue;const $e=class $e{constructor(e){p(this,"provider");p(this,"pinElements",new Array);p(this,"pinMaxWidth",0);p(this,"pinMaxHeight",0);p(this,"pinFade",!1);p(this,"pinMaxCount",0);p(this,"pinMaxZoomDelta",0);this.provider=e}setConfiguration(e){var t,a,n;this.pinFade=((t=e==null?void 0:e.pin)==null?void 0:t.fade)??!0,this.pinMaxCount=((a=e==null?void 0:e.pin)==null?void 0:a.maxCount)??Math.max($e.MAP_PINS_MAX_COUNT,8*navigator.hardwareConcurrency),this.pinMaxZoomDelta=((n=e==null?void 0:e.pin)==null?void 0:n.maxZoom)??$e.MAP_PINS_MAX_ZOOM}updateElements(e){this.pinElements=e,this.pinMaxWidth=e.reduce((t,a)=>Math.max(t,a.width),0),this.pinMaxHeight=e.reduce((t,a)=>Math.max(t,a.height),0)}removeElements(){this.pinElements.forEach(e=>e.remove()),this.pinElements.length=0}process(e,t){const a=this.provider.parameters.mapSize,n=new ha(e,t,a,this.pinMaxWidth*2,this.pinMaxHeight*2);let i=0;for(const o of this.pinElements)n.contains(o.lat,o.lng)?o.shown&&t<=o.zoom&&o.zoom<=t+this.pinMaxZoomDelta?(i<this.pinMaxCount&&(this.pinFade==!0?o.updateState(t):o.setCollapsed(!1),o.updateMap(!0),o.isBodyLoaded()==!1&&o.updateBody()),i++):(o.setCollapsed(!0),o.isCollapsed()&&o.updateMap(!1)):o.updateMap(!1)}};p($e,"MAP_PINS_MAX_ZOOM",2),p($e,"MAP_PINS_MAX_COUNT",128);let gr=$e;const Mt=class Mt extends mr{constructor(t,a,n){super(t,a);p(this,"width");p(this,"height");p(this,"margin");p(this,"radius");p(this,"zoom");p(this,"angle");p(this,"states");p(this,"bodyLoading",!1);p(this,"bodyLoaded",!1);p(this,"bodyCallback");this.width=a.tooltip.style.width,this.height=a.tooltip.style.height,this.margin=a.tooltip.style.margin,this.radius=a.tooltip.style.radius,this.zoom=n[0],this.angle=Ee.DEFAULT,this.states=n[1].map(i=>[i[0],Ee.DEGREES[i[1]]]),this.bodyCallback=a.tooltip.body}createElement(){this.element=document.createElement("div"),this.element.classList.add("tooltip"),this.component=Yt(fa,{target:this.element,props:{id:this.id+"_tooltip",layer:Kn,priority:this.zoom*this.provider.parameters.zoomScale,width:this.width,height:this.height,margin:this.margin,radius:this.radius}})}update(t){this.zoom=t[0],this.states=t[1].map(a=>[a[0],Ee.DEGREES[a[1]]]),this.updateZIndex()}updateMap(t){var a;super.updateMap(t),(a=this.component)==null||a.setDisplayed(t)}updateState(t){if(this.component==null)throw new Error("Failed to update tooltip state");this.angle=this.getAngle(t),this.component.setAngle(this.angle)}updateBody(){var a;if(this.bodyLoaded||this.bodyLoading)return;const t=(a=this.component)==null?void 0:a.getBody();t!=null&&(this.bodyLoading=!0,this.bodyCallback(this.id).then(n=>t.appendChild(n)).catch(n=>console.error(n)).finally(()=>{this.bodyLoaded=!0,this.bodyLoading=!1}))}getAngle(t){const a=this.states.findLast(n=>n[0]<=t);if(!a)throw new Error("Angle not found");return a[1]}getZindex(){return Math.round((this.provider.parameters.zoomMax-this.zoom)*this.provider.parameters.zoomScale)+Mt.Z_INDEX_OFFSET}setCollapsed(t){if(this.component==null)throw new Error("Failed to set tooltip collapsed");this.component.setCollapsed(t)}isExpanded(){return this.component==null?!1:this.component.getExpanded()}isCollapsed(){return this.component==null?!1:this.component.getCollapsed()}isBodyLoaded(){return this.bodyLoaded}};p(Mt,"Z_INDEX_OFFSET",1e6);let _r=Mt;class Di{constructor(e){p(this,"provider");p(this,"tooltipElements",new Array);p(this,"tooltipMaxWidth",0);p(this,"tooltipMaxHeight",0);this.provider=e}updateElements(e){this.tooltipElements=e,this.tooltipMaxWidth=this.tooltipElements.reduce((t,a)=>Math.max(t,a.width),0),this.tooltipMaxHeight=this.tooltipElements.reduce((t,a)=>Math.max(t,a.height),0)}removeElements(){this.tooltipElements.forEach(e=>e.remove()),this.tooltipElements.length=0}process(e,t){const a=this.provider.parameters.mapSize,n=new ha(e,t,a,this.tooltipMaxWidth*2,this.tooltipMaxHeight*2);for(const i of this.tooltipElements)n.contains(i.lat,i.lng)?i.shown&&i.zoom<=t?(i.updateState(t),i.setCollapsed(!1),i.updateMap(!0),i.isCollapsed()==!1&&i.isBodyLoaded()==!1&&i.updateBody()):(i.setCollapsed(!0),i.isCollapsed()&&i.updateMap(!1)):i.updateMap(!1)}}const Ct=class Ct extends mr{constructor(t,a){if(a.popup==null)throw new Error("Failed to create popup");super(t,a);p(this,"width");p(this,"height");p(this,"margin");p(this,"radius");p(this,"bodyLoading",!1);p(this,"bodyLoaded",!1);p(this,"bodyCallback");this.shown=!1,this.width=a.popup.style.width,this.height=a.popup.style.height,this.margin=a.popup.style.margin,this.radius=a.popup.style.radius,this.bodyCallback=a.popup.body}createElement(){this.element=document.createElement("div"),this.element.classList.add("popup"),this.component=Yt(fa,{target:this.element,props:{id:this.id+"_popup",layer:Qn,priority:0,width:this.width,height:this.height,margin:this.margin,radius:this.radius}})}updateMap(t){var a;super.updateMap(t),(a=this.component)==null||a.setDisplayed(t)}updateBody(){var a;if(this.bodyLoaded||this.bodyLoading)return;const t=(a=this.component)==null?void 0:a.getBody();t!=null&&(this.bodyLoading=!0,this.bodyCallback(this.id).then(n=>t.appendChild(n)).catch(n=>console.error(n)).finally(()=>{this.bodyLoaded=!0,this.bodyLoading=!1}))}getZindex(){return Ct.Z_INDEX_OFFSET}setCollapsed(t){if(this.component==null)throw new Error("Failed to set popup collapsed");this.component.setCollapsed(t)}setAngle(t){if(this.component==null)throw new Error("Failed to set popup angle");this.component.setAngle(t)}isExpanded(){return this.component==null?!1:this.component.getExpanded()}isCollapsed(){return this.component==null?!1:this.component.getCollapsed()}isBodyLoaded(){return this.bodyLoaded}};p(Ct,"Z_INDEX_OFFSET",2e6);let vr=Ct;class Zi{constructor(e){p(this,"provider");p(this,"popupElements",new Map);p(this,"popupPositioned",new Map);this.provider=e}show(e){e.pin.shown=!1,e.tooltip.shown=!1;const t=new vr(this.provider,e.marker);this.popupElements.set(e.marker.id,t),this.popupPositioned.set(e.marker.id,!1),t.create(),t.setAngle(e.tooltip.angle),t.shown=!0}hide(e){e.pin.shown=!0,e.tooltip.shown=!0;const t=this.popupElements.get(e.marker.id);t!=null&&(t.shown=!1)}clear(){this.popupElements.values().forEach(e=>e.remove()),this.popupElements.clear(),this.popupPositioned.clear()}process(){var e,t;for(const a of this.popupElements.values())if(a.shown){if(a.setCollapsed(!1),a.updateMap(!0),a.isExpanded()&&a.isBodyLoaded()==!1&&a.updateBody(),a.isCollapsed()==!1&&this.popupPositioned.get(a.id)==!1){const n=(e=a.component)==null?void 0:e.getBody();if(n==null)continue;const i=(t=a.component)==null?void 0:t.getOffsets();if(i==null)continue;const o=n.getBoundingClientRect();if(o.x==0&&o.y==0&&o.width==0&&o.height==0)continue;const s=o.x+o.width/2,l=o.y+o.height/2,c=s+i.offsetX,u=l+i.offsetY,f=c+a.width,h=u+a.height,g=this.provider.getContainer().getBoundingClientRect(),k=c-g.left,N=g.right-f,R=u-g.top,Q=g.bottom-h,M=Math.min(a.width,a.height)/4,V=k<0?k-M:N<0?-N+M:0,K=R<0?R-M:Q<0?-Q+M:0;this.provider.panBy(V,K),this.popupPositioned.set(a.id,!0)}}else a.setCollapsed(!0),a.isCollapsed()&&(a.updateMap(!1),a.remove(),this.popupElements.delete(a.id),this.popupPositioned.delete(a.id))}}const Tt=class Tt{constructor(e,t,a){p(this,"parameters",Tt.Parameters);p(this,"MapClass");p(this,"MapMarkerClass");p(this,"map");this.MapClass=e,this.MapMarkerClass=t,this.map=new this.MapClass({...a,style:a.style??"https://tiles.openfreemap.org/styles/liberty",pitchWithRotate:!1,attributionControl:a.attributionControl??{compact:!1,customAttribution:"@arenarium/maps"}}),this.map.dragRotate.disable(),this.map.keyboard.disable(),this.map.touchZoomRotate.disableRotation(),this.map.touchPitch.disable()}getMap(){return this.map}getContainer(){return this.map.getContainer()}getZoom(){return this.map.getZoom()}getBounds(){const e=this.map.getBounds(),t=e.getSouthWest(),a=e.getNorthEast();return{sw:t,ne:a}}panBy(e,t){this.map.panBy([e,t])}createMarker(e,t,a){const n=new this.MapMarkerClass({element:e});return n.setLngLat([a,t]),{instance:n,inserted:()=>n._map!=null,insert:()=>n.addTo(this.map),remove:()=>n.remove(),update:i=>n.getElement().style.zIndex=i.toString()}}};p(Tt,"Parameters",{mapSize:512,zoomMin:0,zoomMax:24,zoomScale:10});let xr=Tt;const Fi={version:8,sources:{openmaptiles:{type:"vector",url:"https://tiles.openfreemap.org/planet"}},glyphs:"https://tiles.openfreemap.org/fonts/{fontstack}/{range}.pbf",layers:[{id:"background",type:"background",paint:{"background-color":"rgba(120, 120, 120, 1)"}},{id:"park",type:"fill",source:"openmaptiles","source-layer":"park",filter:["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],paint:{"fill-color":"rgba(128, 128, 128, 1)"}},{id:"water",type:"fill",source:"openmaptiles","source-layer":"water",filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["!=",["get","brunnel"],"tunnel"]],paint:{"fill-antialias":!0,"fill-color":"rgba(56, 56, 56, 1)"}},{id:"landcover_ice_shelf",type:"fill",source:"openmaptiles","source-layer":"landcover",maxzoom:8,filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["==",["get","subclass"],"ice_shelf"]],paint:{"fill-color":"rgba(128, 128, 128, 1)","fill-opacity":.7}},{id:"landcover_glacier",type:"fill",source:"openmaptiles","source-layer":"landcover",maxzoom:8,filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["==",["get","subclass"],"glacier"]],paint:{"fill-color":"rgba(153, 153, 153, 1)","fill-opacity":["interpolate",["linear"],["zoom"],0,1,8,.5]}},{id:"landuse_residential",type:"fill",source:"openmaptiles","source-layer":"landuse",maxzoom:16,filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["==",["get","class"],"residential"]],paint:{"fill-color":"rgba(104, 104, 104, 1)","fill-opacity":["interpolate",["exponential",.6],["zoom"],8,.8,9,.6]}},{id:"landcover_wood",type:"fill",source:"openmaptiles","source-layer":"landcover",minzoom:10,filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["==",["get","class"],"wood"]],paint:{"fill-color":"rgba(128, 128, 128, 1)","fill-opacity":["interpolate",["linear"],["zoom"],8,0,12,1]}},{id:"waterway",type:"line",source:"openmaptiles","source-layer":"waterway",filter:["==",["geometry-type"],"LineString"],paint:{"line-color":"rgba(56, 56, 56, 1)"}},{id:"building",type:"fill",source:"openmaptiles","source-layer":"building",minzoom:12,paint:{"fill-antialias":!0,"fill-color":"rgba(136, 136, 136, 1)","fill-outline-color":"rgba(102, 102, 102, 1)"}},{id:"tunnel_motorway_casing",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","brunnel"],"tunnel"],["==",["get","class"],"motorway"]]],layout:{"line-cap":"butt","line-join":"miter"},paint:{"line-color":"rgba(68, 68, 68, 1)","line-opacity":1,"line-width":["interpolate",["exponential",1.4],["zoom"],5.8,0,6,3,20,40]}},{id:"tunnel_motorway_inner",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","brunnel"],"tunnel"],["==",["get","class"],"motorway"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(85, 85, 85, 1)","line-width":["interpolate",["exponential",1.4],["zoom"],4,2,6,1.3,20,30]}},{id:"aeroway-taxiway",type:"line",source:"openmaptiles","source-layer":"aeroway",minzoom:12,filter:["match",["get","class"],["taxiway"],!0,!1],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(85, 85, 85, 1)","line-opacity":1,"line-width":["interpolate",["exponential",1.55],["zoom"],13,1.8,20,20]}},{id:"aeroway-runway-casing",type:"line",source:"openmaptiles","source-layer":"aeroway",minzoom:11,filter:["match",["get","class"],["runway"],!0,!1],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(85, 85, 85, 1)","line-opacity":1,"line-width":["interpolate",["exponential",1.5],["zoom"],11,6,17,55]}},{id:"aeroway-area",type:"fill",source:"openmaptiles","source-layer":"aeroway",minzoom:4,filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["match",["get","class"],["runway","taxiway"],!0,!1]],paint:{"fill-color":"rgba(128, 128, 128, 1)","fill-opacity":["interpolate",["linear"],["zoom"],13,0,14,1]}},{id:"aeroway-runway",type:"line",source:"openmaptiles","source-layer":"aeroway",minzoom:11,filter:["all",["match",["get","class"],["runway"],!0,!1],["==",["geometry-type"],"LineString"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(68, 68, 68, 1)","line-opacity":1,"line-width":["interpolate",["exponential",1.5],["zoom"],11,4,17,50]}},{id:"road_area_pier",type:"fill",source:"openmaptiles","source-layer":"transportation",filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["==",["get","class"],"pier"]],paint:{"fill-antialias":!0,"fill-color":"rgba(50, 50, 50, 1)"}},{id:"road_pier",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["==",["geometry-type"],"LineString"],["match",["get","class"],["pier"],!0,!1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(52, 52, 52, 1)","line-width":["interpolate",["exponential",1.2],["zoom"],15,1,17,4]}},{id:"highway_path",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["==",["geometry-type"],"LineString"],["==",["get","class"],"path"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(88, 88, 88, 1)","line-opacity":.9,"line-width":["interpolate",["exponential",1.2],["zoom"],13,1,20,10]}},{id:"highway_minor",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:8,filter:["all",["==",["geometry-type"],"LineString"],["match",["get","class"],["minor","service","track"],!0,!1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-opacity":.9,"line-width":["interpolate",["exponential",1.55],["zoom"],13,1.8,20,20],"line-color":"rgba(102, 102, 102, 1)"}},{id:"highway_major_casing",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:11,filter:["all",["==",["geometry-type"],"LineString"],["match",["get","class"],["primary","secondary","tertiary","trunk"],!0,!1]],layout:{"line-cap":"butt","line-join":"miter"},paint:{"line-dasharray":[12,0],"line-width":["interpolate",["exponential",1.3],["zoom"],10,3,20,23],"line-color":"rgba(85, 85, 85, 1)"}},{id:"highway_major_inner",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:11,filter:["all",["==",["geometry-type"],"LineString"],["match",["get","class"],["primary","secondary","tertiary","trunk"],!0,!1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(102, 102, 102, 1)","line-width":["interpolate",["exponential",1.3],["zoom"],10,2,20,20]}},{id:"highway_major_subtle",type:"line",source:"openmaptiles","source-layer":"transportation",maxzoom:11,filter:["all",["==",["geometry-type"],"LineString"],["match",["get","class"],["primary","secondary","tertiary","trunk"],!0,!1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-width":2,"line-color":"rgba(85, 85, 85, 1)"}},{id:"highway_motorway_casing",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["all",["match",["get","brunnel"],["bridge","tunnel"],!1,!0],["==",["get","class"],"motorway"]]],layout:{"line-cap":"butt","line-join":"miter"},paint:{"line-color":"rgba(68, 68, 68, 1)","line-dasharray":[2,0],"line-opacity":1,"line-width":["interpolate",["exponential",1.4],["zoom"],5.8,0,6,3,20,40]}},{id:"highway_motorway_inner",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["all",["match",["get","brunnel"],["bridge","tunnel"],!1,!0],["==",["get","class"],"motorway"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":["interpolate",["linear"],["zoom"],5.8,"rgba(102, 102, 102, 1)",6,"rgba(85, 85, 85, 1)"],"line-width":["interpolate",["exponential",1.4],["zoom"],4,2,6,1.3,20,30]}},{id:"highway_motorway_subtle",type:"line",source:"openmaptiles","source-layer":"transportation",maxzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["==",["get","class"],"motorway"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(102, 102, 102, 1)","line-width":["interpolate",["exponential",1.4],["zoom"],4,2,6,1.3]}},{id:"railway_transit",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:16,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","class"],"transit"],["match",["get","brunnel"],["tunnel"],!1,!0]]],layout:{"line-join":"round"},paint:{"line-color":"rgba(85, 85, 85, 1)","line-width":3}},{id:"railway_transit_dashline",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:16,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","class"],"transit"],["match",["get","brunnel"],["tunnel"],!1,!0]]],layout:{"line-join":"round"},paint:{"line-color":"rgba(68, 68, 68, 1)","line-dasharray":[3,3],"line-width":2}},{id:"railway_service",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:16,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","class"],"rail"],["has","service"]]],layout:{"line-join":"round"},paint:{"line-color":"rgba(102, 102, 102, 1)","line-width":3}},{id:"railway_service_dashline",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:16,filter:["all",["==",["geometry-type"],"LineString"],["==",["get","class"],"rail"],["has","service"]],layout:{"line-join":"round"},paint:{"line-color":"rgba(85, 85, 85, 1)","line-dasharray":[3,3],"line-width":2}},{id:"railway",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["==",["geometry-type"],"LineString"],["all",["!",["has","service"]],["==",["get","class"],"rail"]]],layout:{"line-join":"round"},paint:{"line-color":"rgba(85, 85, 85, 1)","line-width":["interpolate",["exponential",1.3],["zoom"],16,3,20,7]}},{id:"railway_dashline",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["==",["geometry-type"],"LineString"],["all",["!",["has","service"]],["==",["get","class"],"rail"]]],layout:{"line-join":"round"},paint:{"line-color":"rgba(68, 68, 68, 1)","line-dasharray":[3,3],"line-width":["interpolate",["exponential",1.3],["zoom"],16,2,20,6]}},{id:"highway_motorway_bridge_casing",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","brunnel"],"bridge"],["==",["get","class"],"motorway"]]],layout:{"line-cap":"butt","line-join":"miter"},paint:{"line-color":"rgba(68, 68, 68, 1)","line-dasharray":[2,0],"line-opacity":1,"line-width":["interpolate",["exponential",1.4],["zoom"],5.8,0,6,5,20,45]}},{id:"highway_motorway_bridge_inner",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","brunnel"],"bridge"],["==",["get","class"],"motorway"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":["interpolate",["linear"],["zoom"],5.8,"rgba(102, 102, 102, 1)",6,"rgba(85, 85, 85, 1)"],"line-width":["interpolate",["exponential",1.4],["zoom"],4,2,6,1.3,20,30]}},{id:"boundary_3",type:"line",source:"openmaptiles","source-layer":"boundary",minzoom:8,filter:["all",[">=",["get","admin_level"],3],["<=",["get","admin_level"],6],["!=",["get","maritime"],1],["!=",["get","disputed"],1],["!",["has","claimed_by"]]],paint:{"line-color":"rgba(68, 68, 68, 1)","line-dasharray":[1,1],"line-width":["interpolate",["linear"],["zoom"],7,1,11,2]}},{id:"boundary_2",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["==",["get","admin_level"],2],["!=",["get","maritime"],1],["!=",["get","disputed"],1],["!",["has","claimed_by"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(51, 51, 51, 1)","line-opacity":["interpolate",["linear"],["zoom"],0,.4,4,1],"line-width":["interpolate",["linear"],["zoom"],3,1,5,1.2,12,3]}},{id:"boundary_disputed",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["!=",["get","maritime"],1],["==",["get","disputed"],1]],paint:{"line-color":"rgba(51, 51, 51, 1)","line-dasharray":[1,2],"line-width":["interpolate",["linear"],["zoom"],3,1,5,1.2,12,3]}},{id:"waterway_line_label",type:"symbol",source:"openmaptiles","source-layer":"waterway",minzoom:10,filter:["==",["geometry-type"],"LineString"],layout:{"symbol-placement":"line","symbol-spacing":350,"text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Regular"],"text-letter-spacing":.2,"text-max-width":5,"text-size":14},paint:{"text-color":"rgba(34, 34, 34, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"water_name_point_label",type:"symbol",source:"openmaptiles","source-layer":"water_name",minzoom:0,filter:["==",["geometry-type"],"Point"],layout:{visibility:"none"}},{id:"water_name_line_label",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["==",["geometry-type"],"LineString"],layout:{visibility:"none"}},{id:"highway-name-path",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:15.5,filter:["==",["get","class"],"path"],layout:{"symbol-placement":"line","text-field":["get","name:latin"],"text-font":["Noto Sans Regular"],"text-rotation-alignment":"map","text-size":["interpolate",["linear"],["zoom"],13,12,14,13]},paint:{"text-color":"rgba(158, 158, 158, 1)","text-halo-color":"rgba(244, 244, 244, 1)","text-halo-width":.5}},{id:"highway-name-minor",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:15,filter:["all",["==",["geometry-type"],"LineString"],["match",["get","class"],["minor","service","track"],!0,!1]],layout:{"symbol-placement":"line","text-field":["get","name:latin"],"text-font":["Noto Sans Regular"],"text-rotation-alignment":"map","text-size":["interpolate",["linear"],["zoom"],13,12,14,13]},paint:{"text-color":"rgba(17, 17, 17, 1)","text-halo-width":1,"text-halo-color":"rgba(255, 255, 255, 1)"}},{id:"highway-name-major",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:12.2,filter:["match",["get","class"],["primary","secondary","tertiary","trunk"],!0,!1],layout:{"symbol-placement":"line","text-field":["get","name:latin"],"text-font":["Noto Sans Regular"],"text-rotation-alignment":"map","text-size":["interpolate",["linear"],["zoom"],13,12,14,13]},paint:{"text-color":"rgba(34, 34, 34, 1)","text-halo-width":1,"text-halo-color":"rgba(255, 255, 255, 1)"}},{id:"highway-shield-non-us",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:11,filter:["all",["<=",["get","ref_length"],6],["==",["geometry-type"],"LineString"],["match",["get","network"],["us-highway","us-interstate","us-state"],!1,!0]],layout:{"icon-rotation-alignment":"viewport","icon-size":1,"symbol-placement":["step",["zoom"],"point",11,"line"],"symbol-spacing":200,"text-field":["to-string",["get","ref"]],"text-font":["Noto Sans Regular"],"text-rotation-alignment":"viewport","text-size":10},paint:{"text-halo-color":"rgba(255, 255, 255, 1)","text-color":"rgba(255, 255, 255, 1)"}},{id:"highway-shield-us-interstate",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:11,filter:["all",["<=",["get","ref_length"],6],["==",["geometry-type"],"LineString"],["match",["get","network"],["us-interstate"],!0,!1]],layout:{"icon-rotation-alignment":"viewport","icon-size":1,"symbol-placement":["step",["zoom"],"point",7,"line",8,"line"],"symbol-spacing":200,"text-field":["to-string",["get","ref"]],"text-font":["Noto Sans Regular"],"text-rotation-alignment":"viewport","text-size":10}},{id:"road_shield_us",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:12,filter:["all",["<=",["get","ref_length"],6],["==",["geometry-type"],"LineString"],["match",["get","network"],["us-highway","us-state"],!0,!1]],layout:{"icon-rotation-alignment":"viewport","icon-size":1,"symbol-placement":["step",["zoom"],"point",11,"line"],"symbol-spacing":200,"text-field":["to-string",["get","ref"]],"text-font":["Noto Sans Regular"],"text-rotation-alignment":"viewport","text-size":10}},{id:"airport",type:"symbol",source:"openmaptiles","source-layer":"aerodrome_label",minzoom:11,filter:["all",["has","iata"]],layout:{"icon-size":1,"text-anchor":"top","text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Regular"],"text-max-width":9,"text-offset":[0,.6],"text-optional":!0,"text-padding":2,"text-size":12},paint:{"text-color":"rgba(51, 51, 51, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_other",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:8,filter:["match",["get","class"],["city","continent","country","state","town","village"],!1,!0],layout:{"text-field":["get","name:latin"],"text-font":["Noto Sans Regular"],"text-letter-spacing":.1,"text-max-width":9,"text-size":["interpolate",["linear"],["zoom"],8,9,12,10],"text-transform":"uppercase"},paint:{"text-color":"rgba(17, 17, 17, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_village",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:9,filter:["==",["get","class"],"village"],layout:{"icon-allow-overlap":!0,"icon-optional":!1,"icon-size":.2,"text-anchor":"bottom","text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Regular"],"text-max-width":8,"text-size":["interpolate",["exponential",1.2],["zoom"],7,10,11,12]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_town",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:6,filter:["==",["get","class"],"town"],layout:{"icon-allow-overlap":!0,"icon-optional":!1,"icon-size":.2,"text-anchor":"bottom","text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Regular"],"text-max-width":8,"text-size":["interpolate",["exponential",1.2],["zoom"],7,12,11,14]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_state",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:5,maxzoom:8,filter:["==",["get","class"],"state"],layout:{"text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Regular"],"text-letter-spacing":.2,"text-max-width":9,"text-size":["interpolate",["linear"],["zoom"],5,10,8,14],"text-transform":"uppercase"},paint:{"text-color":"rgba(17, 17, 17, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_city",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:3,filter:["all",["==",["get","class"],"city"],["!=",["get","capital"],2]],layout:{"icon-allow-overlap":!0,"icon-optional":!1,"icon-size":.4,"text-anchor":"bottom","text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Regular"],"text-max-width":8,"text-offset":[0,-.1],"text-size":["interpolate",["exponential",1.2],["zoom"],4,11,7,13,11,18]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_city_capital",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:3,filter:["all",["==",["get","class"],"city"],["==",["get","capital"],2]],layout:{"icon-allow-overlap":!0,"icon-optional":!1,"icon-size":.5,"text-anchor":"bottom","text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Bold"],"text-max-width":8,"text-offset":[0,-.2],"text-size":["interpolate",["exponential",1.2],["zoom"],4,12,7,14,11,20]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_country_3",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:2,maxzoom:9,filter:["all",["==",["get","class"],"country"],[">=",["get","rank"],3]],layout:{"text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Bold"],"text-max-width":6.25,"text-size":["interpolate",["linear"],["zoom"],3,9,7,17]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_country_2",type:"symbol",source:"openmaptiles","source-layer":"place",maxzoom:9,filter:["all",["==",["get","class"],"country"],["==",["get","rank"],2]],layout:{"text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Bold"],"text-max-width":6.25,"text-size":["interpolate",["linear"],["zoom"],2,9,5,17]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_country_1",type:"symbol",source:"openmaptiles","source-layer":"place",maxzoom:9,filter:["all",["==",["get","class"],"country"],["==",["get","rank"],1]],layout:{"text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Bold"],"text-max-width":6.25,"text-size":["interpolate",["linear"],["zoom"],1,9,4,17]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}}]},Bi={version:8,sources:{openmaptiles:{type:"vector",url:"https://tiles.openfreemap.org/planet"}},glyphs:"https://tiles.openfreemap.org/fonts/{fontstack}/{range}.pbf",layers:[{id:"background",type:"background",paint:{"background-color":"rgba(220, 220, 220, 1)"}},{id:"park",type:"fill",source:"openmaptiles","source-layer":"park",filter:["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],paint:{"fill-color":"rgba(228, 228, 228, 1)"}},{id:"water",type:"fill",source:"openmaptiles","source-layer":"water",filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["!=",["get","brunnel"],"tunnel"]],paint:{"fill-antialias":!0,"fill-color":"rgba(156, 156, 156, 1)"}},{id:"landcover_ice_shelf",type:"fill",source:"openmaptiles","source-layer":"landcover",maxzoom:8,filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["==",["get","subclass"],"ice_shelf"]],paint:{"fill-color":"rgba(228, 228, 228, 1)","fill-opacity":.7}},{id:"landcover_glacier",type:"fill",source:"openmaptiles","source-layer":"landcover",maxzoom:8,filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["==",["get","subclass"],"glacier"]],paint:{"fill-color":"rgba(253, 253, 253, 1)","fill-opacity":["interpolate",["linear"],["zoom"],0,1,8,.5]}},{id:"landuse_residential",type:"fill",source:"openmaptiles","source-layer":"landuse",maxzoom:16,filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["==",["get","class"],"residential"]],paint:{"fill-color":"rgba(204, 204, 204, 1)","fill-opacity":["interpolate",["exponential",.6],["zoom"],8,.8,9,.6]}},{id:"landcover_wood",type:"fill",source:"openmaptiles","source-layer":"landcover",minzoom:10,filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["==",["get","class"],"wood"]],paint:{"fill-color":"rgba(228, 228, 228, 1)","fill-opacity":["interpolate",["linear"],["zoom"],8,0,12,1]}},{id:"waterway",type:"line",source:"openmaptiles","source-layer":"waterway",filter:["==",["geometry-type"],"LineString"],paint:{"line-color":"rgba(156, 156, 156, 1)"}},{id:"building",type:"fill",source:"openmaptiles","source-layer":"building",minzoom:12,paint:{"fill-antialias":!0,"fill-color":"rgba(236, 236, 236, 1)","fill-outline-color":"rgba(202, 202, 202, 1)"}},{id:"tunnel_motorway_casing",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","brunnel"],"tunnel"],["==",["get","class"],"motorway"]]],layout:{"line-cap":"butt","line-join":"miter"},paint:{"line-color":"rgb(168, 168, 168)","line-opacity":1,"line-width":["interpolate",["exponential",1.4],["zoom"],5.8,0,6,3,20,40]}},{id:"tunnel_motorway_inner",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","brunnel"],"tunnel"],["==",["get","class"],"motorway"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgb(185, 185, 185)","line-width":["interpolate",["exponential",1.4],["zoom"],4,2,6,1.3,20,30]}},{id:"aeroway-taxiway",type:"line",source:"openmaptiles","source-layer":"aeroway",minzoom:12,filter:["match",["get","class"],["taxiway"],!0,!1],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(185, 185, 185, 1)","line-opacity":1,"line-width":["interpolate",["exponential",1.55],["zoom"],13,1.8,20,20]}},{id:"aeroway-runway-casing",type:"line",source:"openmaptiles","source-layer":"aeroway",minzoom:11,filter:["match",["get","class"],["runway"],!0,!1],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(185, 185, 185, 1)","line-opacity":1,"line-width":["interpolate",["exponential",1.5],["zoom"],11,6,17,55]}},{id:"aeroway-area",type:"fill",source:"openmaptiles","source-layer":"aeroway",minzoom:4,filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["match",["get","class"],["runway","taxiway"],!0,!1]],paint:{"fill-color":"rgba(228, 228, 228, 1)","fill-opacity":["interpolate",["linear"],["zoom"],13,0,14,1]}},{id:"aeroway-runway",type:"line",source:"openmaptiles","source-layer":"aeroway",minzoom:11,filter:["all",["match",["get","class"],["runway"],!0,!1],["==",["geometry-type"],"LineString"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(168, 168, 168, 1)","line-opacity":1,"line-width":["interpolate",["exponential",1.5],["zoom"],11,4,17,50]}},{id:"road_area_pier",type:"fill",source:"openmaptiles","source-layer":"transportation",filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["==",["get","class"],"pier"]],paint:{"fill-antialias":!0,"fill-color":"rgba(150, 150, 150, 1)"}},{id:"road_pier",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["==",["geometry-type"],"LineString"],["match",["get","class"],["pier"],!0,!1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(152, 152, 152, 1)","line-width":["interpolate",["exponential",1.2],["zoom"],15,1,17,4]}},{id:"highway_path",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["==",["geometry-type"],"LineString"],["==",["get","class"],"path"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgb(188, 188, 188)","line-opacity":.9,"line-width":["interpolate",["exponential",1.2],["zoom"],13,1,20,10]}},{id:"highway_minor",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:8,filter:["all",["==",["geometry-type"],"LineString"],["match",["get","class"],["minor","service","track"],!0,!1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(202, 202, 202, 1)","line-opacity":.9,"line-width":["interpolate",["exponential",1.55],["zoom"],13,1.8,20,20]}},{id:"highway_major_casing",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:11,filter:["all",["==",["geometry-type"],"LineString"],["match",["get","class"],["primary","secondary","tertiary","trunk"],!0,!1]],layout:{"line-cap":"butt","line-join":"miter"},paint:{"line-color":"rgb(185, 185, 185)","line-dasharray":[12,0],"line-width":["interpolate",["exponential",1.3],["zoom"],10,3,20,23]}},{id:"highway_major_inner",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:11,filter:["all",["==",["geometry-type"],"LineString"],["match",["get","class"],["primary","secondary","tertiary","trunk"],!0,!1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(202, 202, 202, 1)","line-width":["interpolate",["exponential",1.3],["zoom"],10,2,20,20]}},{id:"highway_major_subtle",type:"line",source:"openmaptiles","source-layer":"transportation",maxzoom:11,filter:["all",["==",["geometry-type"],"LineString"],["match",["get","class"],["primary","secondary","tertiary","trunk"],!0,!1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(185, 185, 185, 1)","line-width":2}},{id:"highway_motorway_casing",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["all",["match",["get","brunnel"],["bridge","tunnel"],!1,!0],["==",["get","class"],"motorway"]]],layout:{"line-cap":"butt","line-join":"miter"},paint:{"line-color":"rgb(168, 168, 168)","line-dasharray":[2,0],"line-opacity":1,"line-width":["interpolate",["exponential",1.4],["zoom"],5.8,0,6,3,20,40]}},{id:"highway_motorway_inner",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["all",["match",["get","brunnel"],["bridge","tunnel"],!1,!0],["==",["get","class"],"motorway"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":["interpolate",["linear"],["zoom"],5.8,"rgba(202, 202, 202, 1)",6,"rgba(185, 185, 185, 1)"],"line-width":["interpolate",["exponential",1.4],["zoom"],4,2,6,1.3,20,30]}},{id:"highway_motorway_subtle",type:"line",source:"openmaptiles","source-layer":"transportation",maxzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["==",["get","class"],"motorway"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(202, 202, 202, 1)","line-width":["interpolate",["exponential",1.4],["zoom"],4,2,6,1.3]}},{id:"railway_transit",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:16,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","class"],"transit"],["match",["get","brunnel"],["tunnel"],!1,!0]]],layout:{"line-join":"round"},paint:{"line-color":"rgba(185, 185, 185, 1)","line-width":3}},{id:"railway_transit_dashline",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:16,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","class"],"transit"],["match",["get","brunnel"],["tunnel"],!1,!0]]],layout:{"line-join":"round"},paint:{"line-color":"rgba(168, 168, 168, 1)","line-dasharray":[3,3],"line-width":2}},{id:"railway_service",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:16,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","class"],"rail"],["has","service"]]],layout:{"line-join":"round"},paint:{"line-color":"rgba(202, 202, 202, 1)","line-width":3}},{id:"railway_service_dashline",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:16,filter:["all",["==",["geometry-type"],"LineString"],["==",["get","class"],"rail"],["has","service"]],layout:{"line-join":"round"},paint:{"line-color":"rgba(185, 185, 185, 1)","line-dasharray":[3,3],"line-width":2}},{id:"railway",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["==",["geometry-type"],"LineString"],["all",["!",["has","service"]],["==",["get","class"],"rail"]]],layout:{"line-join":"round"},paint:{"line-color":"rgba(185, 185, 185, 1)","line-width":["interpolate",["exponential",1.3],["zoom"],16,3,20,7]}},{id:"railway_dashline",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["==",["geometry-type"],"LineString"],["all",["!",["has","service"]],["==",["get","class"],"rail"]]],layout:{"line-join":"round"},paint:{"line-color":"rgba(168, 168, 168, 1)","line-dasharray":[3,3],"line-width":["interpolate",["exponential",1.3],["zoom"],16,2,20,6]}},{id:"highway_motorway_bridge_casing",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","brunnel"],"bridge"],["==",["get","class"],"motorway"]]],layout:{"line-cap":"butt","line-join":"miter"},paint:{"line-color":"rgb(168, 168, 168)","line-dasharray":[2,0],"line-opacity":1,"line-width":["interpolate",["exponential",1.4],["zoom"],5.8,0,6,5,20,45]}},{id:"highway_motorway_bridge_inner",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","brunnel"],"bridge"],["==",["get","class"],"motorway"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":["interpolate",["linear"],["zoom"],5.8,"rgba(202, 202, 202, 1)",6,"rgba(185, 185, 185, 1)"],"line-width":["interpolate",["exponential",1.4],["zoom"],4,2,6,1.3,20,30]}},{id:"boundary_3",type:"line",source:"openmaptiles","source-layer":"boundary",minzoom:8,filter:["all",[">=",["get","admin_level"],3],["<=",["get","admin_level"],6],["!=",["get","maritime"],1],["!=",["get","disputed"],1],["!",["has","claimed_by"]]],paint:{"line-color":"rgba(168, 168, 168, 1)","line-dasharray":[1,1],"line-width":["interpolate",["linear"],["zoom"],7,1,11,2]}},{id:"boundary_2",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["==",["get","admin_level"],2],["!=",["get","maritime"],1],["!=",["get","disputed"],1],["!",["has","claimed_by"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(151, 151, 151, 1)","line-opacity":["interpolate",["linear"],["zoom"],0,.4,4,1],"line-width":["interpolate",["linear"],["zoom"],3,1,5,1.2,12,3]}},{id:"boundary_disputed",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["!=",["get","maritime"],1],["==",["get","disputed"],1]],paint:{"line-color":"rgba(151, 151, 151, 1)","line-dasharray":[1,2],"line-width":["interpolate",["linear"],["zoom"],3,1,5,1.2,12,3]}},{id:"waterway_line_label",type:"symbol",source:"openmaptiles","source-layer":"waterway",minzoom:10,filter:["==",["geometry-type"],"LineString"],layout:{"symbol-placement":"line","symbol-spacing":350,"text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Regular"],"text-letter-spacing":.2,"text-max-width":5,"text-size":14},paint:{"text-color":"rgba(34, 34, 34, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1.5}},{id:"water_name_point_label",type:"symbol",source:"openmaptiles","source-layer":"water_name",minzoom:0,filter:["==",["geometry-type"],"Point"],layout:{visibility:"none"}},{id:"water_name_line_label",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["==",["geometry-type"],"LineString"],layout:{visibility:"none"}},{id:"highway-name-path",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:15.5,filter:["==",["get","class"],"path"],layout:{"symbol-placement":"line","text-field":["get","name:latin"],"text-font":["Noto Sans Regular"],"text-rotation-alignment":"map","text-size":["interpolate",["linear"],["zoom"],13,12,14,13]},paint:{"text-color":"rgba(158, 158, 158, 1)","text-halo-color":"rgba(244, 244, 244, 1)","text-halo-width":.5}},{id:"highway-name-minor",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:15,filter:["all",["==",["geometry-type"],"LineString"],["match",["get","class"],["minor","service","track"],!0,!1]],layout:{"symbol-placement":"line","text-field":["get","name:latin"],"text-font":["Noto Sans Regular"],"text-rotation-alignment":"map","text-size":["interpolate",["linear"],["zoom"],13,12,14,13]},paint:{"text-color":"rgba(17, 17, 17, 1)","text-halo-width":1,"text-halo-color":"rgba(255, 255, 255, 1)"}},{id:"highway-name-major",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:12.2,filter:["match",["get","class"],["primary","secondary","tertiary","trunk"],!0,!1],layout:{"symbol-placement":"line","text-field":["get","name:latin"],"text-font":["Noto Sans Regular"],"text-rotation-alignment":"map","text-size":["interpolate",["linear"],["zoom"],13,12,14,13]},paint:{"text-color":"rgba(34, 34, 34, 1)","text-halo-width":1,"text-halo-color":"rgba(255, 255, 255, 1)"}},{id:"highway-shield-non-us",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:11,filter:["all",["<=",["get","ref_length"],6],["==",["geometry-type"],"LineString"],["match",["get","network"],["us-highway","us-interstate","us-state"],!1,!0]],layout:{"icon-rotation-alignment":"viewport","icon-size":1,"symbol-placement":["step",["zoom"],"point",11,"line"],"symbol-spacing":200,"text-field":["to-string",["get","ref"]],"text-font":["Noto Sans Regular"],"text-rotation-alignment":"viewport","text-size":10},paint:{"text-halo-color":"rgba(0, 0, 0, 1)","text-color":"rgba(0, 0, 0, 1)"}},{id:"highway-shield-us-interstate",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:11,filter:["all",["<=",["get","ref_length"],6],["==",["geometry-type"],"LineString"],["match",["get","network"],["us-interstate"],!0,!1]],layout:{"icon-rotation-alignment":"viewport","icon-size":1,"symbol-placement":["step",["zoom"],"point",7,"line",8,"line"],"symbol-spacing":200,"text-field":["to-string",["get","ref"]],"text-font":["Noto Sans Regular"],"text-rotation-alignment":"viewport","text-size":10}},{id:"road_shield_us",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:12,filter:["all",["<=",["get","ref_length"],6],["==",["geometry-type"],"LineString"],["match",["get","network"],["us-highway","us-state"],!0,!1]],layout:{"icon-rotation-alignment":"viewport","icon-size":1,"symbol-placement":["step",["zoom"],"point",11,"line"],"symbol-spacing":200,"text-field":["to-string",["get","ref"]],"text-font":["Noto Sans Regular"],"text-rotation-alignment":"viewport","text-size":10}},{id:"airport",type:"symbol",source:"openmaptiles","source-layer":"aerodrome_label",minzoom:11,filter:["all",["has","iata"]],layout:{"icon-size":1,"text-anchor":"top","text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Regular"],"text-max-width":9,"text-offset":[0,.6],"text-optional":!0,"text-padding":2,"text-size":12},paint:{"text-color":"rgba(51, 51, 51, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_other",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:8,filter:["match",["get","class"],["city","continent","country","state","town","village"],!1,!0],layout:{"text-field":["get","name:latin"],"text-font":["Noto Sans Regular"],"text-letter-spacing":.1,"text-max-width":9,"text-size":["interpolate",["linear"],["zoom"],8,9,12,10],"text-transform":"uppercase"},paint:{"text-color":"rgba(17, 17, 17, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_village",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:9,filter:["==",["get","class"],"village"],layout:{"icon-allow-overlap":!0,"icon-optional":!1,"icon-size":.2,"text-anchor":"bottom","text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Regular"],"text-max-width":8,"text-size":["interpolate",["exponential",1.2],["zoom"],7,10,11,12]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_town",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:6,filter:["==",["get","class"],"town"],layout:{"icon-allow-overlap":!0,"icon-optional":!1,"icon-size":.2,"text-anchor":"bottom","text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Regular"],"text-max-width":8,"text-size":["interpolate",["exponential",1.2],["zoom"],7,12,11,14]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_state",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:5,maxzoom:8,filter:["==",["get","class"],"state"],layout:{"text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Regular"],"text-letter-spacing":.2,"text-max-width":9,"text-size":["interpolate",["linear"],["zoom"],5,10,8,14],"text-transform":"uppercase"},paint:{"text-color":"rgba(17, 17, 17, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_city",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:3,filter:["all",["==",["get","class"],"city"],["!=",["get","capital"],2]],layout:{"icon-allow-overlap":!0,"icon-optional":!1,"icon-size":.4,"text-anchor":"bottom","text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Regular"],"text-max-width":8,"text-offset":[0,-.1],"text-size":["interpolate",["exponential",1.2],["zoom"],4,11,7,13,11,18]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_city_capital",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:3,filter:["all",["==",["get","class"],"city"],["==",["get","capital"],2]],layout:{"icon-allow-overlap":!0,"icon-optional":!1,"icon-size":.5,"text-anchor":"bottom","text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Bold"],"text-max-width":8,"text-offset":[0,-.2],"text-size":["interpolate",["exponential",1.2],["zoom"],4,12,7,14,11,20]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_country_3",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:2,maxzoom:9,filter:["all",["==",["get","class"],"country"],[">=",["get","rank"],3]],layout:{"text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Bold"],"text-max-width":6.25,"text-size":["interpolate",["linear"],["zoom"],3,9,7,17]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_country_2",type:"symbol",source:"openmaptiles","source-layer":"place",maxzoom:9,filter:["all",["==",["get","class"],"country"],["==",["get","rank"],2]],layout:{"text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Bold"],"text-max-width":6.25,"text-size":["interpolate",["linear"],["zoom"],2,9,5,17]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_country_1",type:"symbol",source:"openmaptiles","source-layer":"place",maxzoom:9,filter:["all",["==",["get","class"],"country"],["==",["get","rank"],1]],layout:{"text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Bold"],"text-max-width":6.25,"text-size":["interpolate",["linear"],["zoom"],1,9,4,17]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}}]},At=class At{constructor(e,t,a,n){p(this,"parameters",At.Parameters);p(this,"MapClass");p(this,"MapMarkerClass");p(this,"map");this.MapClass=e,this.MapMarkerClass=t,this.map=new this.MapClass(a,{...n})}getMap(){return this.map}getContainer(){return this.map.getDiv()}getZoom(){return this.map.getZoom()??NaN}getBounds(){const e=this.map.getBounds();if(e==null)return{sw:{lat:NaN,lng:NaN},ne:{lat:NaN,lng:NaN}};const t=e.getSouthWest(),a=e.getNorthEast();return{sw:{lat:t.lat(),lng:t.lng()},ne:{lat:a.lat(),lng:a.lng()}}}panBy(e,t){this.map.panBy(e,t)}createMarker(e,t,a,n){const i=new this.MapMarkerClass({position:{lat:t,lng:a},content:e,zIndex:n});return{instance:i,inserted:()=>i.map!=null&&i.map==this.map,insert:()=>i.map=this.map,remove:()=>i.map=void 0,update:o=>i.zIndex=o}}};p(At,"Parameters",{mapSize:256,zoomMin:0,zoomMax:22,zoomScale:10});let wr=At;const Vi=[{elementType:"labels.icon",stylers:[{visibility:"off"}]},{stylers:[{saturation:-100},{lightness:-10}]},{featureType:"landscape",stylers:[{lightness:30}]},{featureType:"road",elementType:"geometry",stylers:[{saturation:-100}]}],Ui=[{elementType:"labels.icon",stylers:[{visibility:"off"}]},{stylers:[{saturation:-100}]},{elementType:"geometry",stylers:[{lightness:-45}]},{elementType:"labels.text.fill",stylers:[{lightness:-100}]},{elementType:"labels.text.stroke",stylers:[{lightness:-15}]},{featureType:"water",elementType:"geometry",stylers:[{lightness:-50}]}];S.GoogleMapDarkStyle=Ui,S.GoogleMapLightStyle=Vi,S.GoogleMapsProvider=wr,S.MapManager=Ii,S.MaplibreDarkStyle=Fi,S.MaplibreLightStyle=Bi,S.MaplibreProvider=xr,Object.defineProperty(S,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
(function(S,T){typeof exports=="object"&&typeof module<"u"?T(exports):typeof define=="function"&&define.amd?define(["exports"],T):(S=typeof globalThis<"u"?globalThis:S||self,T(S.arenarium={}))})(this,function(S){"use strict";var Ki=Object.defineProperty;var qa=S=>{throw TypeError(S)};var es=(S,T,I)=>T in S?Ki(S,T,{enumerable:!0,configurable:!0,writable:!0,value:I}):S[T]=I;var u=(S,T,I)=>es(S,typeof T!="symbol"?T+"":T,I),Wa=(S,T,I)=>T.has(S)||qa("Cannot "+I);var ee=(S,T,I)=>(Wa(S,T,"read from private field"),I?I.call(S):T.get(S)),it=(S,T,I)=>T.has(S)?qa("Cannot add the same private member more than once"):T instanceof WeakSet?T.add(S):T.set(S,I),st=(S,T,I,ot)=>(Wa(S,T,"write to private field"),ot?ot.call(S,I):T.set(S,I),I);var Da,ce,Ve,rt,Ee;var I=Array.isArray,ot=Array.prototype.indexOf,Ya=Array.from,Xa=Object.defineProperty,We=Object.getOwnPropertyDescriptor,Ha=Object.prototype,Ga=Array.prototype,Ja=Object.getPrototypeOf,Cr=Object.isExtensible;function Qa(r){for(var e=0;e<r.length;e++)r[e]()}const q=2,jt=4,Pt=8,It=16,de=32,Ce=64,Dt=128,W=256,lt=512,H=1024,pe=2048,xe=4096,ct=8192,Zt=16384,Tr=32768,Ka=65536,Ar=1<<17,en=1<<18,Nr=1<<19,Ft=1<<20,Lr=1<<21,ut=Symbol("$state"),Rr=new class extends Error{constructor(){super(...arguments);u(this,"name","StaleReactionError");u(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}};function Or(r){return r===this.v}function tn(r){throw new Error("https://svelte.dev/e/effect_in_teardown")}function rn(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function an(r){throw new Error("https://svelte.dev/e/effect_orphan")}function nn(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function sn(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function on(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function ln(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}let ts=!1;const Z=Symbol();let te=null;function jr(r){te=r}function Bt(r,e=!1,t){te={p:te,c:null,e:null,s:r,x:null,l:null}}function Vt(r){var e=te,t=e.e;if(t!==null){e.e=null;for(var a of t)Wr(a)}return r!==void 0&&(e.x=r),te=e.p,r??{}}function Pr(){return!0}function Ye(r){if(typeof r!="object"||r===null||ut in r)return r;const e=Ja(r);if(e!==Ha&&e!==Ga)return r;var t=new Map,a=I(r),n=U(0),i=ze,s=o=>{if(ze===i)return o();var l=A,c=ze;Ae(null),ta(i);var d=o();return Ae(l),ta(c),d};return a&&t.set("length",U(r.length)),new Proxy(r,{defineProperty(o,l,c){(!("value"in c)||c.configurable===!1||c.enumerable===!1||c.writable===!1)&&sn();var d=t.get(l);return d===void 0?d=s(()=>{var f=U(c.value);return t.set(l,f),f}):D(d,c.value,!0),!0},deleteProperty(o,l){var c=t.get(l);if(c===void 0){if(l in o){const h=s(()=>U(Z));t.set(l,h),$t(n)}}else{if(a&&typeof l=="string"){var d=t.get("length"),f=Number(l);Number.isInteger(f)&&f<d.v&&D(d,f)}D(c,Z),$t(n)}return!0},get(o,l,c){var g;if(l===ut)return r;var d=t.get(l),f=l in o;if(d===void 0&&(!f||(g=We(o,l))!=null&&g.writable)&&(d=s(()=>{var k=Ye(f?o[l]:Z),N=U(k);return N}),t.set(l,d)),d!==void 0){var h=j(d);return h===Z?void 0:h}return Reflect.get(o,l,c)},getOwnPropertyDescriptor(o,l){var c=Reflect.getOwnPropertyDescriptor(o,l);if(c&&"value"in c){var d=t.get(l);d&&(c.value=j(d))}else if(c===void 0){var f=t.get(l),h=f==null?void 0:f.v;if(f!==void 0&&h!==Z)return{enumerable:!0,configurable:!0,value:h,writable:!0}}return c},has(o,l){var h;if(l===ut)return!0;var c=t.get(l),d=c!==void 0&&c.v!==Z||Reflect.has(o,l);if(c!==void 0||L!==null&&(!d||(h=We(o,l))!=null&&h.writable)){c===void 0&&(c=s(()=>{var g=d?Ye(o[l]):Z,k=U(g);return k}),t.set(l,c));var f=j(c);if(f===Z)return!1}return d},set(o,l,c,d){var V;var f=t.get(l),h=l in o;if(a&&l==="length")for(var g=c;g<f.v;g+=1){var k=t.get(g+"");k!==void 0?D(k,Z):g in o&&(k=s(()=>U(Z)),t.set(g+"",k))}if(f===void 0)(!h||(V=We(o,l))!=null&&V.writable)&&(f=s(()=>U(void 0)),D(f,Ye(c)),t.set(l,f));else{h=f.v!==Z;var N=s(()=>Ye(c));D(f,N)}var R=Reflect.getOwnPropertyDescriptor(o,l);if(R!=null&&R.set&&R.set.call(d,c),!h){if(a&&typeof l=="string"){var Q=t.get("length"),E=Number(l);Number.isInteger(E)&&E>=Q.v&&D(Q,E+1)}$t(n)}return!0},ownKeys(o){j(n);var l=Reflect.ownKeys(o).filter(f=>{var h=t.get(f);return h===void 0||h.v!==Z});for(var[c,d]of t)d.v!==Z&&!(c in o)&&l.push(c);return l},setPrototypeOf(){on()}})}function cn(r){var e=q|pe,t=A!==null&&(A.f&q)!==0?A:null;return L===null||t!==null&&(t.f&W)!==0?e|=W:L.f|=Nr,{ctx:te,deps:null,effects:null,equals:Or,f:e,fn:r,reactions:null,rv:0,v:Z,wv:0,parent:t??L,ac:null}}function Ir(r){var e=r.effects;if(e!==null){r.effects=null;for(var t=0;t<e.length;t+=1)be(e[t])}}function un(r){for(var e=r.parent;e!==null;){if((e.f&q)===0)return e;e=e.parent}return null}function Ut(r){var e,t=L;ht(un(r));try{Ir(r),e=na(r)}finally{ht(t)}return e}function Dr(r){var e=Ut(r);if(r.equals(e)||(r.v=e,r.wv=ra()),!Se){var t=(fe||(r.f&W)!==0)&&r.deps!==null?xe:H;oe(r,t)}}const we=new Map;function dn(r,e){var t={f:0,v:r,reactions:null,equals:Or,rv:0,wv:0};return t}function U(r,e){const t=dn(r);return Tn(t),t}function D(r,e,t=!1){A!==null&&(!re||(A.f&Ar)!==0)&&Pr()&&(A.f&(q|It|Ar))!==0&&!(F!=null&&F.includes(r))&&ln();let a=t?Ye(e):e;return pn(r,a)}function pn(r,e){if(!r.equals(e)){var t=r.v;Se?we.set(r,e):we.set(r,t),r.v=e,(r.f&q)!==0&&((r.f&pe)!==0&&Ut(r),oe(r,(r.f&W)===0?H:xe)),r.wv=ra(),Zr(r,pe),L!==null&&(L.f&H)!==0&&(L.f&(de|Ce))===0&&(G===null?An([r]):G.push(r))}return e}function $t(r){D(r,r.v+1)}function Zr(r,e){var t=r.reactions;if(t!==null)for(var a=t.length,n=0;n<a;n++){var i=t[n],s=i.f;(s&pe)===0&&(oe(i,e),(s&(H|W))!==0&&((s&q)!==0?Zr(i,xe):_t(i)))}}var Fr,Br,Vr,Ur;function fn(){if(Fr===void 0){Fr=window,Br=/Firefox/.test(navigator.userAgent);var r=Element.prototype,e=Node.prototype,t=Text.prototype;Vr=We(e,"firstChild").get,Ur=We(e,"nextSibling").get,Cr(r)&&(r.__click=void 0,r.__className=void 0,r.__attributes=null,r.__style=void 0,r.__e=void 0),Cr(t)&&(t.__t=void 0)}}function hn(r=""){return document.createTextNode(r)}function $r(r){return Vr.call(r)}function qr(r){return Ur.call(r)}function qt(r,e){return $r(r)}function mn(r,e=1,t=!1){let a=r;for(;e--;)a=qr(a);return a}function yn(r){L===null&&A===null&&an(),A!==null&&(A.f&W)!==0&&L===null&&rn(),Se&&tn()}function gn(r,e){var t=e.last;t===null?e.last=e.first=r:(t.next=r,r.prev=t,e.last=r)}function Te(r,e,t,a=!0){var n=L,i={ctx:te,deps:null,nodes_start:null,nodes_end:null,f:r|pe,first:null,fn:e,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,transitions:null,wv:0,ac:null};if(t)try{Yt(i),i.f|=Tr}catch(l){throw be(i),l}else e!==null&&_t(i);var s=t&&i.deps===null&&i.first===null&&i.nodes_start===null&&i.teardown===null&&(i.f&(Nr|Dt))===0;if(!s&&a&&(n!==null&&gn(i,n),A!==null&&(A.f&q)!==0)){var o=A;(o.effects??(o.effects=[])).push(i)}return i}function se(r){if(yn(),!A&&L&&(L.f&de)!==0){var e=te;(e.e??(e.e=[])).push(r)}else return Wr(r)}function Wr(r){return Te(jt|Lr,r,!1)}function _n(r){const e=Te(Ce,r,!0);return(t={})=>new Promise(a=>{t.outro?Sn(e,()=>{be(e),a(void 0)}):(be(e),a(void 0))})}function vn(r){return Te(jt,r,!1)}function Yr(r){return Te(Pt,r,!0)}function Xr(r,e=[],t=cn){const a=e.map(t);return xn(()=>r(...a.map(j)))}function xn(r,e=0){var t=Te(Pt|It|e,r,!0);return t}function wn(r,e=!0){return Te(Pt|de,r,!0,e)}function Hr(r){var e=r.teardown;if(e!==null){const t=Se,a=A;ea(!0),Ae(null);try{e.call(null)}finally{ea(t),Ae(a)}}}function Gr(r,e=!1){var n;var t=r.first;for(r.first=r.last=null;t!==null;){(n=t.ac)==null||n.abort(Rr);var a=t.next;(t.f&Ce)!==0?t.parent=null:be(t,e),t=a}}function bn(r){for(var e=r.first;e!==null;){var t=e.next;(e.f&de)===0&&be(e),e=t}}function be(r,e=!0){var t=!1;(e||(r.f&en)!==0)&&r.nodes_start!==null&&r.nodes_end!==null&&(kn(r.nodes_start,r.nodes_end),t=!0),Gr(r,e&&!t),gt(r,0),oe(r,Zt);var a=r.transitions;if(a!==null)for(const i of a)i.stop();Hr(r);var n=r.parent;n!==null&&n.first!==null&&Jr(r),r.next=r.prev=r.teardown=r.ctx=r.deps=r.fn=r.nodes_start=r.nodes_end=r.ac=null}function kn(r,e){for(;r!==null;){var t=r===e?null:qr(r);r.remove(),r=t}}function Jr(r){var e=r.parent,t=r.prev,a=r.next;t!==null&&(t.next=a),a!==null&&(a.prev=t),e!==null&&(e.first===r&&(e.first=a),e.last===r&&(e.last=t))}function Sn(r,e){var t=[];Qr(r,t,!0),zn(t,()=>{be(r),e&&e()})}function zn(r,e){var t=r.length;if(t>0){var a=()=>--t||e();for(var n of r)n.out(a)}else e()}function Qr(r,e,t){if((r.f&ct)===0){if(r.f^=ct,r.transitions!==null)for(const s of r.transitions)(s.is_global||t)&&e.push(s);for(var a=r.first;a!==null;){var n=a.next,i=(a.f&Ka)!==0||(a.f&de)!==0;Qr(a,e,i?t:!1),a=n}}}let dt=[];function Mn(){var r=dt;dt=[],Qa(r)}function En(r){dt.length===0&&queueMicrotask(Mn),dt.push(r)}function Cn(r){var e=L;if((e.f&Tr)===0){if((e.f&Dt)===0)throw r;e.fn(r)}else Kr(r,e)}function Kr(r,e){for(;e!==null;){if((e.f&Dt)!==0)try{e.b.error(r);return}catch{}e=e.parent}throw r}let Wt=!1,pt=null,ke=!1,Se=!1;function ea(r){Se=r}let ft=[],rs=[],A=null,re=!1;function Ae(r){A=r}let L=null;function ht(r){L=r}let F=null;function Tn(r){A!==null&&A.f&Ft&&(F===null?F=[r]:F.push(r))}let B=null,Y=0,G=null;function An(r){G=r}let mt=1,Xe=0,ze=Xe;function ta(r){ze=r}let fe=!1;function ra(){return++mt}function yt(r){var f;var e=r.f;if((e&pe)!==0)return!0;if((e&xe)!==0){var t=r.deps,a=(e&W)!==0;if(t!==null){var n,i,s=(e<)!==0,o=a&&L!==null&&!fe,l=t.length;if(s||o){var c=r,d=c.parent;for(n=0;n<l;n++)i=t[n],(s||!((f=i==null?void 0:i.reactions)!=null&&f.includes(c)))&&(i.reactions??(i.reactions=[])).push(c);s&&(c.f^=lt),o&&d!==null&&(d.f&W)===0&&(c.f^=W)}for(n=0;n<l;n++)if(i=t[n],yt(i)&&Dr(i),i.wv>r.wv)return!0}(!a||L!==null&&!fe)&&oe(r,H)}return!1}function aa(r,e,t=!0){var a=r.reactions;if(a!==null&&!(F!=null&&F.includes(r)))for(var n=0;n<a.length;n++){var i=a[n];(i.f&q)!==0?aa(i,e,!1):e===i&&(t?oe(i,pe):(i.f&H)!==0&&oe(i,xe),_t(i))}}function na(r){var k;var e=B,t=Y,a=G,n=A,i=fe,s=F,o=te,l=re,c=ze,d=r.f;B=null,Y=0,G=null,fe=(d&W)!==0&&(re||!ke||A===null),A=(d&(de|Ce))===0?r:null,F=null,jr(r.ctx),re=!1,ze=++Xe,r.f|=Ft,r.ac!==null&&(r.ac.abort(Rr),r.ac=null);try{var f=(0,r.fn)(),h=r.deps;if(B!==null){var g;if(gt(r,Y),h!==null&&Y>0)for(h.length=Y+B.length,g=0;g<B.length;g++)h[Y+g]=B[g];else r.deps=h=B;if(!fe||(d&q)!==0&&r.reactions!==null)for(g=Y;g<h.length;g++)((k=h[g]).reactions??(k.reactions=[])).push(r)}else h!==null&&Y<h.length&&(gt(r,Y),h.length=Y);if(Pr()&&G!==null&&!re&&h!==null&&(r.f&(q|xe|pe))===0)for(g=0;g<G.length;g++)aa(G[g],r);return n!==null&&n!==r&&(Xe++,G!==null&&(a===null?a=G:a.push(...G))),f}catch(N){Cn(N)}finally{B=e,Y=t,G=a,A=n,fe=i,F=s,jr(o),re=l,ze=c,r.f^=Ft}}function Nn(r,e){let t=e.reactions;if(t!==null){var a=ot.call(t,r);if(a!==-1){var n=t.length-1;n===0?t=e.reactions=null:(t[a]=t[n],t.pop())}}t===null&&(e.f&q)!==0&&(B===null||!B.includes(e))&&(oe(e,xe),(e.f&(W|lt))===0&&(e.f^=lt),Ir(e),gt(e,0))}function gt(r,e){var t=r.deps;if(t!==null)for(var a=e;a<t.length;a++)Nn(r,t[a])}function Yt(r){var e=r.f;if((e&Zt)===0){oe(r,H);var t=L,a=ke;L=r,ke=!0;try{(e&It)!==0?bn(r):Gr(r),Hr(r);var n=na(r);r.teardown=typeof n=="function"?n:null,r.wv=mt;var i}finally{ke=a,L=t}}}function Ln(){try{nn()}catch(r){if(pt!==null)Kr(r,pt);else throw r}}function Rn(){var r=ke;try{var e=0;for(ke=!0;ft.length>0;){e++>1e3&&Ln();var t=ft,a=t.length;ft=[];for(var n=0;n<a;n++){var i=jn(t[n]);On(i)}we.clear()}}finally{Wt=!1,ke=r,pt=null}}function On(r){var e=r.length;if(e!==0){for(var t=0;t<e;t++){var a=r[t];if((a.f&(Zt|ct))===0&&yt(a)){var n=mt;if(Yt(a),a.deps===null&&a.first===null&&a.nodes_start===null&&(a.teardown===null?Jr(a):a.fn=null),mt>n&&(a.f&Lr)!==0)break}}for(;t<e;t+=1)_t(r[t])}}function _t(r){Wt||(Wt=!0,queueMicrotask(Rn));for(var e=pt=r;e.parent!==null;){e=e.parent;var t=e.f;if((t&(Ce|de))!==0){if((t&H)===0)return;e.f^=H}}ft.push(e)}function jn(r){for(var e=[],t=r;t!==null;){var a=t.f,n=(a&(de|Ce))!==0,i=n&&(a&H)!==0;if(!i&&(a&ct)===0){(a&jt)!==0?e.push(t):n?t.f^=H:yt(t)&&Yt(t);var s=t.first;if(s!==null){t=s;continue}}var o=t.parent;for(t=t.next;t===null&&o!==null;)t=o.next,o=o.parent}return e}function j(r){var e=r.f,t=(e&q)!==0;if(A!==null&&!re){if(!(F!=null&&F.includes(r))){var a=A.deps;r.rv<Xe&&(r.rv=Xe,B===null&&a!==null&&a[Y]===r?Y++:B===null?B=[r]:(!fe||!B.includes(r))&&B.push(r))}}else if(t&&r.deps===null&&r.effects===null){var n=r,i=n.parent;i!==null&&(i.f&W)===0&&(n.f^=W)}if(t&&!Se&&(n=r,yt(n)&&Dr(n)),Se){if(we.has(r))return we.get(r);if(t){n=r;var s=n.v;return((n.f&H)!==0||ia(n))&&(s=Ut(n)),we.set(n,s),s}}return r.v}function ia(r){if(r.v===Z)return!0;if(r.deps===null)return!1;for(const e of r.deps)if(we.has(e)||(e.f&q)!==0&&ia(e))return!0;return!1}function Pn(r){var e=re;try{return re=!0,r()}finally{re=e}}const In=-7169;function oe(r,e){r.f=r.f&In|e}const Dn=["touchstart","touchmove"];function Zn(r){return Dn.includes(r)}const Fn=new Set,sa=new Set;function vt(r){var E;var e=this,t=e.ownerDocument,a=r.type,n=((E=r.composedPath)==null?void 0:E.call(r))||[],i=n[0]||r.target,s=0,o=r.__root;if(o){var l=n.indexOf(o);if(l!==-1&&(e===document||e===window)){r.__root=e;return}var c=n.indexOf(e);if(c===-1)return;l<=c&&(s=l)}if(i=n[s]||r.target,i!==e){Xa(r,"currentTarget",{configurable:!0,get(){return i||t}});var d=A,f=L;Ae(null),ht(null);try{for(var h,g=[];i!==null;){var k=i.assignedSlot||i.parentNode||i.host||null;try{var N=i["__"+a];if(N!=null&&(!i.disabled||r.target===i))if(I(N)){var[R,...Q]=N;R.apply(i,[r,...Q])}else N.call(i,r)}catch(V){h?g.push(V):h=V}if(r.cancelBubble||k===e||k===null)break;i=k}if(h){for(let V of g)queueMicrotask(()=>{throw V});throw h}}finally{r.__root=e,delete r.currentTarget,Ae(d),ht(f)}}}function Bn(r){var e=document.createElement("template");return e.innerHTML=r.replaceAll("<!>","<!---->"),e.content}function Vn(r,e){var t=L;t.nodes_start===null&&(t.nodes_start=r,t.nodes_end=e)}function oa(r,e){var t,a=!r.startsWith("<!>");return()=>{t===void 0&&(t=Bn(a?r:"<!>"+r),t=$r(t));var n=Br?document.importNode(t,!0):t.cloneNode(!0);return Vn(n,n),n}}function la(r,e){r!==null&&r.before(e)}function Xt(r,e){return Un(r,e)}const Ne=new Map;function Un(r,{target:e,anchor:t,props:a={},events:n,context:i,intro:s=!0}){fn();var o=new Set,l=f=>{for(var h=0;h<f.length;h++){var g=f[h];if(!o.has(g)){o.add(g);var k=Zn(g);e.addEventListener(g,vt,{passive:k});var N=Ne.get(g);N===void 0?(document.addEventListener(g,vt,{passive:k}),Ne.set(g,1)):Ne.set(g,N+1)}}};l(Ya(Fn)),sa.add(l);var c=void 0,d=_n(()=>{var f=t??e.appendChild(hn());return wn(()=>{if(i){Bt({});var h=te;h.c=i}n&&(a.$$events=n),c=r(f,a)||{},i&&Vt()}),()=>{var k;for(var h of o){e.removeEventListener(h,vt);var g=Ne.get(h);--g===0?(document.removeEventListener(h,vt),Ne.delete(h)):Ne.set(h,g)}sa.delete(l),f!==t&&((k=f.parentNode)==null||k.removeChild(f))}});return $n.set(c,d),c}let $n=new WeakMap;const ca=[...`
|
|
2
|
+
\r\f \v\uFEFF`];function qn(r,e,t){var a=r==null?"":""+r;if(t){for(var n in t)if(t[n])a=a?a+" "+n:n;else if(a.length)for(var i=n.length,s=0;(s=a.indexOf(n,s))>=0;){var o=s+i;(s===0||ca.includes(a[s-1]))&&(o===a.length||ca.includes(a[o]))?a=(s===0?"":a.substring(0,s))+a.substring(o+1):s=o}}return a===""?null:a}function ua(r,e=!1){var t=e?" !important;":";",a="";for(var n in r){var i=r[n];i!=null&&i!==""&&(a+=" "+n+": "+i+t)}return a}function Ht(r){return r[0]!=="-"||r[1]!=="-"?r.toLowerCase():r}function Wn(r,e){if(e){var t="",a,n;if(Array.isArray(e)?(a=e[0],n=e[1]):a=e,r){r=String(r).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var i=!1,s=0,o=!1,l=[];a&&l.push(...Object.keys(a).map(Ht)),n&&l.push(...Object.keys(n).map(Ht));var c=0,d=-1;const N=r.length;for(var f=0;f<N;f++){var h=r[f];if(o?h==="/"&&r[f-1]==="*"&&(o=!1):i?i===h&&(i=!1):h==="/"&&r[f+1]==="*"?o=!0:h==='"'||h==="'"?i=h:h==="("?s++:h===")"&&s--,!o&&i===!1&&s===0){if(h===":"&&d===-1)d=f;else if(h===";"||f===N-1){if(d!==-1){var g=Ht(r.substring(c,d).trim());if(!l.includes(g)){h!==";"&&f++;var k=r.substring(c,f).trim();t+=" "+k+";"}}c=f+1,d=-1}}}}return a&&(t+=ua(a)),n&&(t+=ua(n,!0)),t=t.trim(),t===""?null:t}return r==null?null:String(r)}function da(r,e,t,a,n,i){var s=r.__className;if(s!==t||s===void 0){var o=qn(t,a,i);o==null?r.removeAttribute("class"):r.className=o,r.__className=t}else if(i&&n!==i)for(var l in i){var c=!!i[l];(n==null||c!==!!n[l])&&r.classList.toggle(l,c)}return i}function Gt(r,e={},t,a){for(var n in t){var i=t[n];e[n]!==i&&(t[n]==null?r.style.removeProperty(n):r.style.setProperty(n,i,a))}}function xt(r,e,t,a){var n=r.__style;if(n!==e){var i=Wn(e,a);i==null?r.removeAttribute("style"):r.style.cssText=i,r.__style=e}else a&&(Array.isArray(a)?(Gt(r,t==null?void 0:t[0],a[0]),Gt(r,t==null?void 0:t[1],a[1],"important")):Gt(r,t,a));return a}const Yn=()=>performance.now(),ae={tick:r=>requestAnimationFrame(r),now:()=>Yn(),tasks:new Set};function pa(){const r=ae.now();ae.tasks.forEach(e=>{e.c(r)||(ae.tasks.delete(e),e.f())}),ae.tasks.size!==0&&ae.tick(pa)}function Xn(r){let e;return ae.tasks.size===0&&ae.tick(pa),{promise:new Promise(t=>{ae.tasks.add(e={c:r,f:t})}),abort(){ae.tasks.delete(e)}}}function fa(r,e){return r===e||(r==null?void 0:r[ut])===e}function Le(r={},e,t,a){return vn(()=>{var n,i;return Yr(()=>{n=i,i=[],Pn(()=>{r!==t(...i)&&(e(r,...i),n&&fa(t(...n),r)&&e(null,...n))})}),()=>{En(()=>{i&&fa(t(...i),r)&&e(null,...i)})}}),r}const Hn="5";typeof window<"u"&&((Da=window.__svelte??(window.__svelte={})).v??(Da.v=new Set)).add(Hn);function Gn(r){return r}function Jt(r){return-.5*(Math.cos(Math.PI*r)-1)}function Jn(r){const e=Math.cos(r*Math.PI*.5);return Math.abs(e)<1e-14?1:1-e}function Qn(r){return Math.sin(r*Math.PI/2)}const Kn=128,ei=0,ti=1,ri=2;class ai{constructor(){u(this,"animationsStarted",!1);u(this,"animationsCount",0);u(this,"animationsLimit",Kn);u(this,"layers",new Array)}start(){window.requestAnimationFrame(this.tick.bind(this))}tick(){try{this.animationsCount=0;for(let e=0;e<this.layers.length;e++){const t=this.layers[e];if(t==null)continue;const a=t.animations;if(a!=null)for(let n=0;n<a.length;n++){const i=a[n];if(i!=null){for(const s of i.values())if(!s.executed&&(s.executed=!0,s.function(),this.animationsCount++,this.animationsCount==this.animationsLimit))return}}}}catch{}finally{window.requestAnimationFrame(this.tick.bind(this))}}equeue(e,t,a,n){let i=this.layers[e];i==null&&(i=this.layers[e]={animations:new Array});let s=i.animations[t];s==null&&(s=i.animations[t]=new Map);let o={id:a,priority:t,executed:!1,function:n};s.set(a,o),this.animationsStarted==!1&&(this.animationsStarted=!0,this.start())}clear(e,t){for(let a=0;a<this.layers.length;a++){let n=this.layers[a];if(n==null)continue;let i=n.animations[e];if(i==null)return;let s=i.get(t);if(s==null||s.executed==!1)return;i.delete(t)}}speed(){return Math.pow(2,2*this.animationsCount/this.animationsLimit)}stacked(){return this.animationsCount==this.animationsLimit}setLimit(e){this.animationsLimit=e}}const he=new ai;function ha(r){return Object.prototype.toString.call(r)==="[object Date]"}function Qt(r,e){if(r===e||r!==r)return()=>r;const t=typeof r;if(t!==typeof e||Array.isArray(r)!==Array.isArray(e))throw new Error("Cannot interpolate values of different type");if(Array.isArray(r)){const a=e.map((n,i)=>Qt(r[i],n));return n=>a.map(i=>i(n))}if(t==="object"){if(!r||!e)throw new Error("Object cannot be null");if(ha(r)&&ha(e)){const i=r.getTime(),o=e.getTime()-i;return l=>new Date(i+l*o)}const a=Object.keys(e),n={};return a.forEach(i=>{n[i]=Qt(r[i],e[i])}),i=>{const s={};return a.forEach(o=>{s[o]=n[o](i)}),s}}if(t==="number"){const a=e-r;return n=>r+n*a}return()=>e}const Sr=class Sr{constructor(e,t={}){it(this,ce);it(this,Ve);it(this,rt);it(this,Ee,null);st(this,ce,U(e)),st(this,Ve,U(e)),st(this,rt,t)}static of(e,t){const a=new Sr(e(),t);return Yr(()=>{a.set(e())}),a}set(e,t){var f;D(ee(this,Ve),e);let{delay:a=0,duration:n=400,easing:i=Gn,interpolate:s=Qt}={...ee(this,rt),...t};if(n===0)return(f=ee(this,Ee))==null||f.abort(),D(ee(this,ce),e),Promise.resolve();const o=ae.now()+a;let l,c=!1,d=ee(this,Ee);return st(this,Ee,Xn(h=>{if(h<o)return!0;if(!c){c=!0;const k=ee(this,ce).v;l=s(k,e),typeof n=="function"&&(n=n(k,e)),d==null||d.abort()}const g=h-o;return g>n?(D(ee(this,ce),e),!1):(D(ee(this,ce),l(i(g/n))),!0)})),ee(this,Ee).promise}get current(){return j(ee(this,ce))}get target(){return j(ee(this,Ve))}set target(e){this.set(e)}};ce=new WeakMap,Ve=new WeakMap,rt=new WeakMap,Ee=new WeakMap;let Kt=Sr;class wt{constructor(e,t){u(this,"value");u(this,"motion");this.value=e,this.motion=new Kt(e,t)}set(e,t){this.value=e,this.motion.set(e,t)}update(e){this.motion.set(this.value,e)}snap(){this.motion.set(this.value,{duration:0})}}var ni=oa('<div><div class="body svelte-1nfn9j8"></div></div>');function ii(r,e){Bt(e,!0);let t,a;function n(){return a}let i=U(!1);function s(E){D(i,E,!0)}function o(){return j(i)}let l=new wt(0,{easing:Jt});se(()=>{c(l.motion.current)}),se(()=>{j(i)==!1&&(l.snap(),he.clear(e.priority,e.id))});function c(E){t&&he.equeue(e.layer,e.priority,e.id,()=>{t.style.scale=E.toString(),t.style.filter=`brightness(${.25+.75*E})`,a.style.opacity=E.toString()})}function d(E){E!=l.value&&l.set(E,{duration:75})}function f(){return l.motion.current==0}function h(){return l.value}var g=ni();let k,N;var R=qt(g);let Q;return Le(R,E=>a=E,()=>a),Le(g,E=>t=E,()=>t),Xr((E,V,K)=>{k=da(g,1,"pin svelte-1nfn9j8",null,k,E),N=xt(g,"",N,V),Q=xt(R,"",Q,K)},[()=>({displayed:j(i)}),()=>({width:`${e.width}px`,height:`${e.height}px`,"border-radius":`${e.radius}px`}),()=>({width:`${e.width-4}px`,height:`${e.height-4}px`,"border-radius":`${e.radius-2}px`})]),la(r,g),Vt({getBody:n,setDisplayed:s,getDisplayed:o,setScale:d,getCollapsed:f,getScale:h})}var He;(r=>{function e(t,a,n){const i=t/2,s=a/2,o=Math.sqrt(i*i+s*s),l=Math.atan(s/i)*(180/Math.PI),c=n*(Math.PI/180);return n<180?n<90?n<l?{offsetX:0,offsetY:o*Math.sin(c)-s}:{offsetX:o*Math.cos(c)-i,offsetY:0}:n<180-l?{offsetX:o*Math.cos(c)-i,offsetY:0}:{offsetX:-t,offsetY:o*Math.sin(c)-s}:n<270?n<180+l?{offsetX:-t,offsetY:o*Math.sin(c)-s}:{offsetX:o*Math.cos(c)-i,offsetY:-a}:n<360-l?{offsetX:o*Math.cos(c)-i,offsetY:-a}:{offsetX:0,offsetY:o*Math.sin(c)-s}}r.getOffsets=e})(He||(He={}));var si=oa('<div><div class="pointer svelte-j5igi2"></div> <div class="bubble svelte-j5igi2"><div class="body svelte-j5igi2"></div></div></div>');function ma(r,e){Bt(e,!0);let t,a,n,i;const s=e.width+2*e.margin,o=e.height+2*e.margin,l=()=>i;se(()=>{n.style.width=`${e.margin*4}px`,n.style.height=`${e.margin*4}px`});let c=U(!0);function d(C){D(c,C,!0)}function f(){return j(c)}let h=U(!0);function g(C){D(h,C,!0)}function k(){return R.motion.current==0}function N(){return R.motion.current==1}let R=new wt(0);se(()=>{Q(R.motion.current)}),se(()=>{j(c)==!1&&(R.snap(),he.clear(e.priority,e.id+"_scale"))}),se(()=>{j(h)==!0&&R.value!=0&&(he.stacked()?R.set(0,{duration:0}):R.set(0,{duration:150,easing:Jn})),j(h)==!1&&R.value!=1&&R.set(1,{duration:150,easing:Qn})});function Q(C){!t||!a||!n||he.equeue(j(h)?0:e.layer,e.priority,e.id+"_scale",()=>{t.style.opacity=`${C}`,a.style.scale=`${C}`,n.style.scale=`${C}`})}let E=NaN,V=U(!1),K=new wt(-s/2,{easing:Jt}),Lt=new wt(-o/2,{easing:Jt});se(()=>{Za(K.motion.current,Lt.motion.current)}),se(()=>{j(c)==!1&&(K.snap(),K.snap(),he.clear(e.priority,e.id+"_angle"))}),se(()=>{j(h)==!0&&j(V)&&(K.update({duration:75}),K.update({duration:75}))});function Za(C,ue){if(!t||!a||!n)return;const Ot=C+s/2,at=ue+o/2,qe=o<s?Ot*o/s:Ot,Mr=o>s?at*s/o:at,Xi=Math.atan2(Mr,qe)/Math.PI*180-45,Ua=0,Hi=30,Er=Math.sqrt(qe*qe+Mr*Mr),nt=Math.min(s,o)/2,Gi=nt*Math.SQRT2,Ji=(Er-nt)/(Gi-nt),$a=Ua+Ji*(Hi-Ua),Qi=Er<nt?Er/nt:1;he.equeue(e.layer,e.priority,e.id+"_angle",()=>{a.style.transform=`translate(${Math.round(C)}px, ${Math.round(ue)}px)`,n.style.transform=`scale(${Qi}) rotate(${Xi}deg) skew(${$a}deg, ${$a}deg)`})}function Wi(C){if(j(V)==!1){let ue=He.getOffsets(s,o,C);K.set(Math.round(ue.offsetX),{duration:0}),Lt.set(Math.round(ue.offsetY),{duration:0}),Za(K.value,Lt.value),E=C,D(V,!0)}else if(C!=E){let ue=Math.abs(C-E),Ot=ue<180?ue:360-ue,at=Math.log(Ot)*75,qe=He.getOffsets(s,o,C);K.set(Math.round(qe.offsetX),{duration:at}),Lt.set(Math.round(qe.offsetY),{duration:at}),E=C}}function Yi(){return He.getOffsets(s,o,E)}var Rt=si();let Fa;var Ba=qt(Rt);Le(Ba,C=>n=C,()=>n);var zr=mn(Ba,2),Va=qt(zr);return Le(Va,C=>i=C,()=>i),Le(zr,C=>a=C,()=>a),Le(Rt,C=>t=C,()=>t),Xr(C=>{Fa=da(Rt,1,"anchor svelte-j5igi2",null,Fa,C),xt(zr,`margin: ${e.margin}px;`),xt(Va,`width: ${e.width}px; height: ${e.height}px; border-radius: ${e.radius}px;`)},[()=>({displayed:j(c)})]),la(r,Rt),Vt({getBody:l,setDisplayed:d,getDisplayed:f,setCollapsed:g,getCollapsed:k,getExpanded:N,setAngle:Wi,getOffsets:Yi})}var Re;(r=>{function e(o,l,c){return{x:a(l)*c,y:n(o)*c}}r.project=e;function t(o,l,c){return{lat:s(l/c),lng:i(o/c)}}r.unproject=t;function a(o){return(180+o)/360}function n(o){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+o*Math.PI/360)))/360}function i(o){return o*360-180}function s(o){return 360/Math.PI*Math.atan(Math.exp((180-o*360)*Math.PI/180))-90}})(Re||(Re={}));class ya{constructor(e,t,a,n,i){u(this,"swLat");u(this,"swLng");u(this,"neLat");u(this,"neLng");u(this,"contains",(e,t)=>this.swLat<=e&&e<=this.neLat?this.swLng<this.neLng?this.swLng<=t&&t<=this.neLng:t<=this.neLng||this.swLng<=t:!1);const s=a*Math.pow(2,t),o=Re.project(e.sw.lat,e.sw.lng,s),l=Re.project(e.ne.lat,e.ne.lng,s),c=o.x-n,d=o.y+i,f=l.x+n,h=l.y-i,g=Re.unproject(c,d,s),k=Re.unproject(f,h,s);this.swLat=g.lat,this.swLng=g.lng,this.neLat=k.lat,this.neLng=k.lng}}var M;(function(r){r.assertEqual=n=>{};function e(n){}r.assertIs=e;function t(n){throw new Error}r.assertNever=t,r.arrayToEnum=n=>{const i={};for(const s of n)i[s]=s;return i},r.getValidEnumValues=n=>{const i=r.objectKeys(n).filter(o=>typeof n[n[o]]!="number"),s={};for(const o of i)s[o]=n[o];return r.objectValues(s)},r.objectValues=n=>r.objectKeys(n).map(function(i){return n[i]}),r.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{const i=[];for(const s in n)Object.prototype.hasOwnProperty.call(n,s)&&i.push(s);return i},r.find=(n,i)=>{for(const s of n)if(i(s))return s},r.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&Number.isFinite(n)&&Math.floor(n)===n;function a(n,i=" | "){return n.map(s=>typeof s=="string"?`'${s}'`:s).join(i)}r.joinValues=a,r.jsonStringifyReplacer=(n,i)=>typeof i=="bigint"?i.toString():i})(M||(M={}));var ga;(function(r){r.mergeShapes=(e,t)=>({...e,...t})})(ga||(ga={}));const y=M.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),me=r=>{switch(typeof r){case"undefined":return y.undefined;case"string":return y.string;case"number":return Number.isNaN(r)?y.nan:y.number;case"boolean":return y.boolean;case"function":return y.function;case"bigint":return y.bigint;case"symbol":return y.symbol;case"object":return Array.isArray(r)?y.array:r===null?y.null:r.then&&typeof r.then=="function"&&r.catch&&typeof r.catch=="function"?y.promise:typeof Map<"u"&&r instanceof Map?y.map:typeof Set<"u"&&r instanceof Set?y.set:typeof Date<"u"&&r instanceof Date?y.date:y.object;default:return y.unknown}},p=M.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class J extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=a=>{this.issues=[...this.issues,a]},this.addIssues=(a=[])=>{this.issues=[...this.issues,...a]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){const t=e||function(i){return i.message},a={_errors:[]},n=i=>{for(const s of i.issues)if(s.code==="invalid_union")s.unionErrors.map(n);else if(s.code==="invalid_return_type")n(s.returnTypeError);else if(s.code==="invalid_arguments")n(s.argumentsError);else if(s.path.length===0)a._errors.push(t(s));else{let o=a,l=0;for(;l<s.path.length;){const c=s.path[l];l===s.path.length-1?(o[c]=o[c]||{_errors:[]},o[c]._errors.push(t(s))):o[c]=o[c]||{_errors:[]},o=o[c],l++}}};return n(this),a}static assert(e){if(!(e instanceof J))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,M.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=t=>t.message){const t={},a=[];for(const n of this.issues)if(n.path.length>0){const i=n.path[0];t[i]=t[i]||[],t[i].push(e(n))}else a.push(e(n));return{formErrors:a,fieldErrors:t}}get formErrors(){return this.flatten()}}J.create=r=>new J(r);const Ge=(r,e)=>{let t;switch(r.code){case p.invalid_type:r.received===y.undefined?t="Required":t=`Expected ${r.expected}, received ${r.received}`;break;case p.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(r.expected,M.jsonStringifyReplacer)}`;break;case p.unrecognized_keys:t=`Unrecognized key(s) in object: ${M.joinValues(r.keys,", ")}`;break;case p.invalid_union:t="Invalid input";break;case p.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${M.joinValues(r.options)}`;break;case p.invalid_enum_value:t=`Invalid enum value. Expected ${M.joinValues(r.options)}, received '${r.received}'`;break;case p.invalid_arguments:t="Invalid function arguments";break;case p.invalid_return_type:t="Invalid function return type";break;case p.invalid_date:t="Invalid date";break;case p.invalid_string:typeof r.validation=="object"?"includes"in r.validation?(t=`Invalid input: must include "${r.validation.includes}"`,typeof r.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${r.validation.position}`)):"startsWith"in r.validation?t=`Invalid input: must start with "${r.validation.startsWith}"`:"endsWith"in r.validation?t=`Invalid input: must end with "${r.validation.endsWith}"`:M.assertNever(r.validation):r.validation!=="regex"?t=`Invalid ${r.validation}`:t="Invalid";break;case p.too_small:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at least":"more than"} ${r.minimum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at least":"over"} ${r.minimum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${r.minimum}`:r.type==="bigint"?t=`Number must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${r.minimum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(r.minimum))}`:t="Invalid input";break;case p.too_big:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at most":"less than"} ${r.maximum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at most":"under"} ${r.maximum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="bigint"?t=`BigInt must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly":r.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(r.maximum))}`:t="Invalid input";break;case p.custom:t="Invalid input";break;case p.invalid_intersection_types:t="Intersection results could not be merged";break;case p.not_multiple_of:t=`Number must be a multiple of ${r.multipleOf}`;break;case p.not_finite:t="Number must be finite";break;default:t=e.defaultError,M.assertNever(r)}return{message:t}};let oi=Ge;function er(){return oi}const tr=r=>{const{data:e,path:t,errorMaps:a,issueData:n}=r,i=[...t,...n.path||[]],s={...n,path:i};if(n.message!==void 0)return{...n,path:i,message:n.message};let o="";const l=a.filter(c=>!!c).slice().reverse();for(const c of l)o=c(s,{data:e,defaultError:o}).message;return{...n,path:i,message:o}};function m(r,e){const t=er(),a=tr({issueData:e,data:r.data,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,t,t===Ge?void 0:Ge].filter(n=>!!n)});r.common.issues.push(a)}class X{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){const a=[];for(const n of t){if(n.status==="aborted")return v;n.status==="dirty"&&e.dirty(),a.push(n.value)}return{status:e.value,value:a}}static async mergeObjectAsync(e,t){const a=[];for(const n of t){const i=await n.key,s=await n.value;a.push({key:i,value:s})}return X.mergeObjectSync(e,a)}static mergeObjectSync(e,t){const a={};for(const n of t){const{key:i,value:s}=n;if(i.status==="aborted"||s.status==="aborted")return v;i.status==="dirty"&&e.dirty(),s.status==="dirty"&&e.dirty(),i.value!=="__proto__"&&(typeof s.value<"u"||n.alwaysSet)&&(a[i.value]=s.value)}return{status:e.value,value:a}}}const v=Object.freeze({status:"aborted"}),Je=r=>({status:"dirty",value:r}),$=r=>({status:"valid",value:r}),_a=r=>r.status==="aborted",va=r=>r.status==="dirty",Oe=r=>r.status==="valid",bt=r=>typeof Promise<"u"&&r instanceof Promise;var _;(function(r){r.errToObj=e=>typeof e=="string"?{message:e}:e||{},r.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(_||(_={}));class ye{constructor(e,t,a,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=a,this._key=n}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const xa=(r,e)=>{if(Oe(e))return{success:!0,data:e.value};if(!r.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new J(r.common.issues);return this._error=t,this._error}}};function w(r){if(!r)return{};const{errorMap:e,invalid_type_error:t,required_error:a,description:n}=r;if(e&&(t||a))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:n}:{errorMap:(s,o)=>{const{message:l}=r;return s.code==="invalid_enum_value"?{message:l??o.defaultError}:typeof o.data>"u"?{message:l??a??o.defaultError}:s.code!=="invalid_type"?{message:o.defaultError}:{message:l??t??o.defaultError}},description:n}}class z{get description(){return this._def.description}_getType(e){return me(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:me(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new X,ctx:{common:e.parent.common,data:e.data,parsedType:me(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(bt(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const a=this.safeParse(e,t);if(a.success)return a.data;throw a.error}safeParse(e,t){const a={common:{issues:[],async:(t==null?void 0:t.async)??!1,contextualErrorMap:t==null?void 0:t.errorMap},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:me(e)},n=this._parseSync({data:e,path:a.path,parent:a});return xa(a,n)}"~validate"(e){var a,n;const t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:me(e)};if(!this["~standard"].async)try{const i=this._parseSync({data:e,path:[],parent:t});return Oe(i)?{value:i.value}:{issues:t.common.issues}}catch(i){(n=(a=i==null?void 0:i.message)==null?void 0:a.toLowerCase())!=null&&n.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(i=>Oe(i)?{value:i.value}:{issues:t.common.issues})}async parseAsync(e,t){const a=await this.safeParseAsync(e,t);if(a.success)return a.data;throw a.error}async safeParseAsync(e,t){const a={common:{issues:[],contextualErrorMap:t==null?void 0:t.errorMap,async:!0},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:me(e)},n=this._parse({data:e,path:a.path,parent:a}),i=await(bt(n)?n:Promise.resolve(n));return xa(a,i)}refine(e,t){const a=n=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(n):t;return this._refinement((n,i)=>{const s=e(n),o=()=>i.addIssue({code:p.custom,...a(n)});return typeof Promise<"u"&&s instanceof Promise?s.then(l=>l?!0:(o(),!1)):s?!0:(o(),!1)})}refinement(e,t){return this._refinement((a,n)=>e(a)?!0:(n.addIssue(typeof t=="function"?t(a,n):t),!1))}_refinement(e){return new Ze({schema:this,typeName:x.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:t=>this["~validate"](t)}}optional(){return ve.create(this,this._def)}nullable(){return Fe.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ne.create(this)}promise(){return tt.create(this,this._def)}or(e){return St.create([this,e],this._def)}and(e){return zt.create(this,e,this._def)}transform(e){return new Ze({...w(this._def),schema:this,typeName:x.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new or({...w(this._def),innerType:this,defaultValue:t,typeName:x.ZodDefault})}brand(){return new Ai({typeName:x.ZodBranded,type:this,...w(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new lr({...w(this._def),innerType:this,catchValue:t,typeName:x.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return cr.create(this,e)}readonly(){return ur.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const li=/^c[^\s-]{8,}$/i,ci=/^[0-9a-z]+$/,ui=/^[0-9A-HJKMNP-TV-Z]{26}$/i,di=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,pi=/^[a-z0-9_-]{21}$/i,fi=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,hi=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,mi=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,yi="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let rr;const gi=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,_i=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,vi=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,xi=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,wi=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,bi=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,wa="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",ki=new RegExp(`^${wa}$`);function ba(r){let e="[0-5]\\d";r.precision?e=`${e}\\.\\d{${r.precision}}`:r.precision==null&&(e=`${e}(\\.\\d+)?`);const t=r.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${t}`}function Si(r){return new RegExp(`^${ba(r)}$`)}function zi(r){let e=`${wa}T${ba(r)}`;const t=[];return t.push(r.local?"Z?":"Z"),r.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function Mi(r,e){return!!((e==="v4"||!e)&&gi.test(r)||(e==="v6"||!e)&&vi.test(r))}function Ei(r,e){if(!fi.test(r))return!1;try{const[t]=r.split(".");if(!t)return!1;const a=t.replace(/-/g,"+").replace(/_/g,"/").padEnd(t.length+(4-t.length%4)%4,"="),n=JSON.parse(atob(a));return!(typeof n!="object"||n===null||"typ"in n&&(n==null?void 0:n.typ)!=="JWT"||!n.alg||e&&n.alg!==e)}catch{return!1}}function Ci(r,e){return!!((e==="v4"||!e)&&_i.test(r)||(e==="v6"||!e)&&xi.test(r))}class ge extends z{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==y.string){const i=this._getOrReturnCtx(e);return m(i,{code:p.invalid_type,expected:y.string,received:i.parsedType}),v}const a=new X;let n;for(const i of this._def.checks)if(i.kind==="min")e.data.length<i.value&&(n=this._getOrReturnCtx(e,n),m(n,{code:p.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),a.dirty());else if(i.kind==="max")e.data.length>i.value&&(n=this._getOrReturnCtx(e,n),m(n,{code:p.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),a.dirty());else if(i.kind==="length"){const s=e.data.length>i.value,o=e.data.length<i.value;(s||o)&&(n=this._getOrReturnCtx(e,n),s?m(n,{code:p.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):o&&m(n,{code:p.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),a.dirty())}else if(i.kind==="email")mi.test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{validation:"email",code:p.invalid_string,message:i.message}),a.dirty());else if(i.kind==="emoji")rr||(rr=new RegExp(yi,"u")),rr.test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{validation:"emoji",code:p.invalid_string,message:i.message}),a.dirty());else if(i.kind==="uuid")di.test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{validation:"uuid",code:p.invalid_string,message:i.message}),a.dirty());else if(i.kind==="nanoid")pi.test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{validation:"nanoid",code:p.invalid_string,message:i.message}),a.dirty());else if(i.kind==="cuid")li.test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{validation:"cuid",code:p.invalid_string,message:i.message}),a.dirty());else if(i.kind==="cuid2")ci.test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{validation:"cuid2",code:p.invalid_string,message:i.message}),a.dirty());else if(i.kind==="ulid")ui.test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{validation:"ulid",code:p.invalid_string,message:i.message}),a.dirty());else if(i.kind==="url")try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),m(n,{validation:"url",code:p.invalid_string,message:i.message}),a.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{validation:"regex",code:p.invalid_string,message:i.message}),a.dirty())):i.kind==="trim"?e.data=e.data.trim():i.kind==="includes"?e.data.includes(i.value,i.position)||(n=this._getOrReturnCtx(e,n),m(n,{code:p.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),a.dirty()):i.kind==="toLowerCase"?e.data=e.data.toLowerCase():i.kind==="toUpperCase"?e.data=e.data.toUpperCase():i.kind==="startsWith"?e.data.startsWith(i.value)||(n=this._getOrReturnCtx(e,n),m(n,{code:p.invalid_string,validation:{startsWith:i.value},message:i.message}),a.dirty()):i.kind==="endsWith"?e.data.endsWith(i.value)||(n=this._getOrReturnCtx(e,n),m(n,{code:p.invalid_string,validation:{endsWith:i.value},message:i.message}),a.dirty()):i.kind==="datetime"?zi(i).test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{code:p.invalid_string,validation:"datetime",message:i.message}),a.dirty()):i.kind==="date"?ki.test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{code:p.invalid_string,validation:"date",message:i.message}),a.dirty()):i.kind==="time"?Si(i).test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{code:p.invalid_string,validation:"time",message:i.message}),a.dirty()):i.kind==="duration"?hi.test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{validation:"duration",code:p.invalid_string,message:i.message}),a.dirty()):i.kind==="ip"?Mi(e.data,i.version)||(n=this._getOrReturnCtx(e,n),m(n,{validation:"ip",code:p.invalid_string,message:i.message}),a.dirty()):i.kind==="jwt"?Ei(e.data,i.alg)||(n=this._getOrReturnCtx(e,n),m(n,{validation:"jwt",code:p.invalid_string,message:i.message}),a.dirty()):i.kind==="cidr"?Ci(e.data,i.version)||(n=this._getOrReturnCtx(e,n),m(n,{validation:"cidr",code:p.invalid_string,message:i.message}),a.dirty()):i.kind==="base64"?wi.test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{validation:"base64",code:p.invalid_string,message:i.message}),a.dirty()):i.kind==="base64url"?bi.test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{validation:"base64url",code:p.invalid_string,message:i.message}),a.dirty()):M.assertNever(i);return{status:a.value,value:e.data}}_regex(e,t,a){return this.refinement(n=>e.test(n),{validation:t,code:p.invalid_string,..._.errToObj(a)})}_addCheck(e){return new ge({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",..._.errToObj(e)})}url(e){return this._addCheck({kind:"url",..._.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",..._.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",..._.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",..._.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",..._.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",..._.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",..._.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",..._.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",..._.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",..._.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",..._.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",..._.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(e==null?void 0:e.offset)??!1,local:(e==null?void 0:e.local)??!1,..._.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,..._.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",..._.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,..._.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t==null?void 0:t.position,..._.errToObj(t==null?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,..._.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,..._.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,..._.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,..._.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,..._.errToObj(t)})}nonempty(e){return this.min(1,_.errToObj(e))}trim(){return new ge({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ge({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ge({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}ge.create=r=>new ge({checks:[],typeName:x.ZodString,coerce:(r==null?void 0:r.coerce)??!1,...w(r)});function Ti(r,e){const t=(r.toString().split(".")[1]||"").length,a=(e.toString().split(".")[1]||"").length,n=t>a?t:a,i=Number.parseInt(r.toFixed(n).replace(".","")),s=Number.parseInt(e.toFixed(n).replace(".",""));return i%s/10**n}class je extends z{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==y.number){const i=this._getOrReturnCtx(e);return m(i,{code:p.invalid_type,expected:y.number,received:i.parsedType}),v}let a;const n=new X;for(const i of this._def.checks)i.kind==="int"?M.isInteger(e.data)||(a=this._getOrReturnCtx(e,a),m(a,{code:p.invalid_type,expected:"integer",received:"float",message:i.message}),n.dirty()):i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(a=this._getOrReturnCtx(e,a),m(a,{code:p.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(a=this._getOrReturnCtx(e,a),m(a,{code:p.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty()):i.kind==="multipleOf"?Ti(e.data,i.value)!==0&&(a=this._getOrReturnCtx(e,a),m(a,{code:p.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):i.kind==="finite"?Number.isFinite(e.data)||(a=this._getOrReturnCtx(e,a),m(a,{code:p.not_finite,message:i.message}),n.dirty()):M.assertNever(i);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,_.toString(t))}gt(e,t){return this.setLimit("min",e,!1,_.toString(t))}lte(e,t){return this.setLimit("max",e,!0,_.toString(t))}lt(e,t){return this.setLimit("max",e,!1,_.toString(t))}setLimit(e,t,a,n){return new je({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:a,message:_.toString(n)}]})}_addCheck(e){return new je({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:_.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:_.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:_.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:_.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:_.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:_.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:_.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:_.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:_.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&M.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const a of this._def.checks){if(a.kind==="finite"||a.kind==="int"||a.kind==="multipleOf")return!0;a.kind==="min"?(t===null||a.value>t)&&(t=a.value):a.kind==="max"&&(e===null||a.value<e)&&(e=a.value)}return Number.isFinite(t)&&Number.isFinite(e)}}je.create=r=>new je({checks:[],typeName:x.ZodNumber,coerce:(r==null?void 0:r.coerce)||!1,...w(r)});class Qe extends z{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==y.bigint)return this._getInvalidInput(e);let a;const n=new X;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(a=this._getOrReturnCtx(e,a),m(a,{code:p.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(a=this._getOrReturnCtx(e,a),m(a,{code:p.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty()):i.kind==="multipleOf"?e.data%i.value!==BigInt(0)&&(a=this._getOrReturnCtx(e,a),m(a,{code:p.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):M.assertNever(i);return{status:n.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return m(t,{code:p.invalid_type,expected:y.bigint,received:t.parsedType}),v}gte(e,t){return this.setLimit("min",e,!0,_.toString(t))}gt(e,t){return this.setLimit("min",e,!1,_.toString(t))}lte(e,t){return this.setLimit("max",e,!0,_.toString(t))}lt(e,t){return this.setLimit("max",e,!1,_.toString(t))}setLimit(e,t,a,n){return new Qe({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:a,message:_.toString(n)}]})}_addCheck(e){return new Qe({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:_.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:_.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:_.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:_.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:_.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}Qe.create=r=>new Qe({checks:[],typeName:x.ZodBigInt,coerce:(r==null?void 0:r.coerce)??!1,...w(r)});class ar extends z{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==y.boolean){const a=this._getOrReturnCtx(e);return m(a,{code:p.invalid_type,expected:y.boolean,received:a.parsedType}),v}return $(e.data)}}ar.create=r=>new ar({typeName:x.ZodBoolean,coerce:(r==null?void 0:r.coerce)||!1,...w(r)});class kt extends z{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==y.date){const i=this._getOrReturnCtx(e);return m(i,{code:p.invalid_type,expected:y.date,received:i.parsedType}),v}if(Number.isNaN(e.data.getTime())){const i=this._getOrReturnCtx(e);return m(i,{code:p.invalid_date}),v}const a=new X;let n;for(const i of this._def.checks)i.kind==="min"?e.data.getTime()<i.value&&(n=this._getOrReturnCtx(e,n),m(n,{code:p.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),a.dirty()):i.kind==="max"?e.data.getTime()>i.value&&(n=this._getOrReturnCtx(e,n),m(n,{code:p.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),a.dirty()):M.assertNever(i);return{status:a.value,value:new Date(e.data.getTime())}}_addCheck(e){return new kt({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:_.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:_.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e!=null?new Date(e):null}}kt.create=r=>new kt({checks:[],coerce:(r==null?void 0:r.coerce)||!1,typeName:x.ZodDate,...w(r)});class ka extends z{_parse(e){if(this._getType(e)!==y.symbol){const a=this._getOrReturnCtx(e);return m(a,{code:p.invalid_type,expected:y.symbol,received:a.parsedType}),v}return $(e.data)}}ka.create=r=>new ka({typeName:x.ZodSymbol,...w(r)});class Sa extends z{_parse(e){if(this._getType(e)!==y.undefined){const a=this._getOrReturnCtx(e);return m(a,{code:p.invalid_type,expected:y.undefined,received:a.parsedType}),v}return $(e.data)}}Sa.create=r=>new Sa({typeName:x.ZodUndefined,...w(r)});class za extends z{_parse(e){if(this._getType(e)!==y.null){const a=this._getOrReturnCtx(e);return m(a,{code:p.invalid_type,expected:y.null,received:a.parsedType}),v}return $(e.data)}}za.create=r=>new za({typeName:x.ZodNull,...w(r)});class nr extends z{constructor(){super(...arguments),this._any=!0}_parse(e){return $(e.data)}}nr.create=r=>new nr({typeName:x.ZodAny,...w(r)});class Pe extends z{constructor(){super(...arguments),this._unknown=!0}_parse(e){return $(e.data)}}Pe.create=r=>new Pe({typeName:x.ZodUnknown,...w(r)});class _e extends z{_parse(e){const t=this._getOrReturnCtx(e);return m(t,{code:p.invalid_type,expected:y.never,received:t.parsedType}),v}}_e.create=r=>new _e({typeName:x.ZodNever,...w(r)});class ir extends z{_parse(e){if(this._getType(e)!==y.undefined){const a=this._getOrReturnCtx(e);return m(a,{code:p.invalid_type,expected:y.void,received:a.parsedType}),v}return $(e.data)}}ir.create=r=>new ir({typeName:x.ZodVoid,...w(r)});class ne extends z{_parse(e){const{ctx:t,status:a}=this._processInputParams(e),n=this._def;if(t.parsedType!==y.array)return m(t,{code:p.invalid_type,expected:y.array,received:t.parsedType}),v;if(n.exactLength!==null){const s=t.data.length>n.exactLength.value,o=t.data.length<n.exactLength.value;(s||o)&&(m(t,{code:s?p.too_big:p.too_small,minimum:o?n.exactLength.value:void 0,maximum:s?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),a.dirty())}if(n.minLength!==null&&t.data.length<n.minLength.value&&(m(t,{code:p.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),a.dirty()),n.maxLength!==null&&t.data.length>n.maxLength.value&&(m(t,{code:p.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),a.dirty()),t.common.async)return Promise.all([...t.data].map((s,o)=>n.type._parseAsync(new ye(t,s,t.path,o)))).then(s=>X.mergeArray(a,s));const i=[...t.data].map((s,o)=>n.type._parseSync(new ye(t,s,t.path,o)));return X.mergeArray(a,i)}get element(){return this._def.type}min(e,t){return new ne({...this._def,minLength:{value:e,message:_.toString(t)}})}max(e,t){return new ne({...this._def,maxLength:{value:e,message:_.toString(t)}})}length(e,t){return new ne({...this._def,exactLength:{value:e,message:_.toString(t)}})}nonempty(e){return this.min(1,e)}}ne.create=(r,e)=>new ne({type:r,minLength:null,maxLength:null,exactLength:null,typeName:x.ZodArray,...w(e)});function Ie(r){if(r instanceof P){const e={};for(const t in r.shape){const a=r.shape[t];e[t]=ve.create(Ie(a))}return new P({...r._def,shape:()=>e})}else return r instanceof ne?new ne({...r._def,type:Ie(r.element)}):r instanceof ve?ve.create(Ie(r.unwrap())):r instanceof Fe?Fe.create(Ie(r.unwrap())):r instanceof le?le.create(r.items.map(e=>Ie(e))):r}class P extends z{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),t=M.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==y.object){const c=this._getOrReturnCtx(e);return m(c,{code:p.invalid_type,expected:y.object,received:c.parsedType}),v}const{status:a,ctx:n}=this._processInputParams(e),{shape:i,keys:s}=this._getCached(),o=[];if(!(this._def.catchall instanceof _e&&this._def.unknownKeys==="strip"))for(const c in n.data)s.includes(c)||o.push(c);const l=[];for(const c of s){const d=i[c],f=n.data[c];l.push({key:{status:"valid",value:c},value:d._parse(new ye(n,f,n.path,c)),alwaysSet:c in n.data})}if(this._def.catchall instanceof _e){const c=this._def.unknownKeys;if(c==="passthrough")for(const d of o)l.push({key:{status:"valid",value:d},value:{status:"valid",value:n.data[d]}});else if(c==="strict")o.length>0&&(m(n,{code:p.unrecognized_keys,keys:o}),a.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const d of o){const f=n.data[d];l.push({key:{status:"valid",value:d},value:c._parse(new ye(n,f,n.path,d)),alwaysSet:d in n.data})}}return n.common.async?Promise.resolve().then(async()=>{const c=[];for(const d of l){const f=await d.key,h=await d.value;c.push({key:f,value:h,alwaysSet:d.alwaysSet})}return c}).then(c=>X.mergeObjectSync(a,c)):X.mergeObjectSync(a,l)}get shape(){return this._def.shape()}strict(e){return _.errToObj,new P({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,a)=>{var i,s;const n=((s=(i=this._def).errorMap)==null?void 0:s.call(i,t,a).message)??a.defaultError;return t.code==="unrecognized_keys"?{message:_.errToObj(e).message??n}:{message:n}}}:{}})}strip(){return new P({...this._def,unknownKeys:"strip"})}passthrough(){return new P({...this._def,unknownKeys:"passthrough"})}extend(e){return new P({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new P({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:x.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new P({...this._def,catchall:e})}pick(e){const t={};for(const a of M.objectKeys(e))e[a]&&this.shape[a]&&(t[a]=this.shape[a]);return new P({...this._def,shape:()=>t})}omit(e){const t={};for(const a of M.objectKeys(this.shape))e[a]||(t[a]=this.shape[a]);return new P({...this._def,shape:()=>t})}deepPartial(){return Ie(this)}partial(e){const t={};for(const a of M.objectKeys(this.shape)){const n=this.shape[a];e&&!e[a]?t[a]=n:t[a]=n.optional()}return new P({...this._def,shape:()=>t})}required(e){const t={};for(const a of M.objectKeys(this.shape))if(e&&!e[a])t[a]=this.shape[a];else{let i=this.shape[a];for(;i instanceof ve;)i=i._def.innerType;t[a]=i}return new P({...this._def,shape:()=>t})}keyof(){return Ta(M.objectKeys(this.shape))}}P.create=(r,e)=>new P({shape:()=>r,unknownKeys:"strip",catchall:_e.create(),typeName:x.ZodObject,...w(e)}),P.strictCreate=(r,e)=>new P({shape:()=>r,unknownKeys:"strict",catchall:_e.create(),typeName:x.ZodObject,...w(e)}),P.lazycreate=(r,e)=>new P({shape:r,unknownKeys:"strip",catchall:_e.create(),typeName:x.ZodObject,...w(e)});class St extends z{_parse(e){const{ctx:t}=this._processInputParams(e),a=this._def.options;function n(i){for(const o of i)if(o.result.status==="valid")return o.result;for(const o of i)if(o.result.status==="dirty")return t.common.issues.push(...o.ctx.common.issues),o.result;const s=i.map(o=>new J(o.ctx.common.issues));return m(t,{code:p.invalid_union,unionErrors:s}),v}if(t.common.async)return Promise.all(a.map(async i=>{const s={...t,common:{...t.common,issues:[]},parent:null};return{result:await i._parseAsync({data:t.data,path:t.path,parent:s}),ctx:s}})).then(n);{let i;const s=[];for(const l of a){const c={...t,common:{...t.common,issues:[]},parent:null},d=l._parseSync({data:t.data,path:t.path,parent:c});if(d.status==="valid")return d;d.status==="dirty"&&!i&&(i={result:d,ctx:c}),c.common.issues.length&&s.push(c.common.issues)}if(i)return t.common.issues.push(...i.ctx.common.issues),i.result;const o=s.map(l=>new J(l));return m(t,{code:p.invalid_union,unionErrors:o}),v}}get options(){return this._def.options}}St.create=(r,e)=>new St({options:r,typeName:x.ZodUnion,...w(e)});function sr(r,e){const t=me(r),a=me(e);if(r===e)return{valid:!0,data:r};if(t===y.object&&a===y.object){const n=M.objectKeys(e),i=M.objectKeys(r).filter(o=>n.indexOf(o)!==-1),s={...r,...e};for(const o of i){const l=sr(r[o],e[o]);if(!l.valid)return{valid:!1};s[o]=l.data}return{valid:!0,data:s}}else if(t===y.array&&a===y.array){if(r.length!==e.length)return{valid:!1};const n=[];for(let i=0;i<r.length;i++){const s=r[i],o=e[i],l=sr(s,o);if(!l.valid)return{valid:!1};n.push(l.data)}return{valid:!0,data:n}}else return t===y.date&&a===y.date&&+r==+e?{valid:!0,data:r}:{valid:!1}}class zt extends z{_parse(e){const{status:t,ctx:a}=this._processInputParams(e),n=(i,s)=>{if(_a(i)||_a(s))return v;const o=sr(i.value,s.value);return o.valid?((va(i)||va(s))&&t.dirty(),{status:t.value,value:o.data}):(m(a,{code:p.invalid_intersection_types}),v)};return a.common.async?Promise.all([this._def.left._parseAsync({data:a.data,path:a.path,parent:a}),this._def.right._parseAsync({data:a.data,path:a.path,parent:a})]).then(([i,s])=>n(i,s)):n(this._def.left._parseSync({data:a.data,path:a.path,parent:a}),this._def.right._parseSync({data:a.data,path:a.path,parent:a}))}}zt.create=(r,e,t)=>new zt({left:r,right:e,typeName:x.ZodIntersection,...w(t)});class le extends z{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==y.array)return m(a,{code:p.invalid_type,expected:y.array,received:a.parsedType}),v;if(a.data.length<this._def.items.length)return m(a,{code:p.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),v;!this._def.rest&&a.data.length>this._def.items.length&&(m(a,{code:p.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const i=[...a.data].map((s,o)=>{const l=this._def.items[o]||this._def.rest;return l?l._parse(new ye(a,s,a.path,o)):null}).filter(s=>!!s);return a.common.async?Promise.all(i).then(s=>X.mergeArray(t,s)):X.mergeArray(t,i)}get items(){return this._def.items}rest(e){return new le({...this._def,rest:e})}}le.create=(r,e)=>{if(!Array.isArray(r))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new le({items:r,typeName:x.ZodTuple,rest:null,...w(e)})};class Ma extends z{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==y.map)return m(a,{code:p.invalid_type,expected:y.map,received:a.parsedType}),v;const n=this._def.keyType,i=this._def.valueType,s=[...a.data.entries()].map(([o,l],c)=>({key:n._parse(new ye(a,o,a.path,[c,"key"])),value:i._parse(new ye(a,l,a.path,[c,"value"]))}));if(a.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const l of s){const c=await l.key,d=await l.value;if(c.status==="aborted"||d.status==="aborted")return v;(c.status==="dirty"||d.status==="dirty")&&t.dirty(),o.set(c.value,d.value)}return{status:t.value,value:o}})}else{const o=new Map;for(const l of s){const c=l.key,d=l.value;if(c.status==="aborted"||d.status==="aborted")return v;(c.status==="dirty"||d.status==="dirty")&&t.dirty(),o.set(c.value,d.value)}return{status:t.value,value:o}}}}Ma.create=(r,e,t)=>new Ma({valueType:e,keyType:r,typeName:x.ZodMap,...w(t)});class Ke extends z{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==y.set)return m(a,{code:p.invalid_type,expected:y.set,received:a.parsedType}),v;const n=this._def;n.minSize!==null&&a.data.size<n.minSize.value&&(m(a,{code:p.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),t.dirty()),n.maxSize!==null&&a.data.size>n.maxSize.value&&(m(a,{code:p.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty());const i=this._def.valueType;function s(l){const c=new Set;for(const d of l){if(d.status==="aborted")return v;d.status==="dirty"&&t.dirty(),c.add(d.value)}return{status:t.value,value:c}}const o=[...a.data.values()].map((l,c)=>i._parse(new ye(a,l,a.path,c)));return a.common.async?Promise.all(o).then(l=>s(l)):s(o)}min(e,t){return new Ke({...this._def,minSize:{value:e,message:_.toString(t)}})}max(e,t){return new Ke({...this._def,maxSize:{value:e,message:_.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}Ke.create=(r,e)=>new Ke({valueType:r,minSize:null,maxSize:null,typeName:x.ZodSet,...w(e)});class et extends z{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==y.function)return m(t,{code:p.invalid_type,expected:y.function,received:t.parsedType}),v;function a(o,l){return tr({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,er(),Ge].filter(c=>!!c),issueData:{code:p.invalid_arguments,argumentsError:l}})}function n(o,l){return tr({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,er(),Ge].filter(c=>!!c),issueData:{code:p.invalid_return_type,returnTypeError:l}})}const i={errorMap:t.common.contextualErrorMap},s=t.data;if(this._def.returns instanceof tt){const o=this;return $(async function(...l){const c=new J([]),d=await o._def.args.parseAsync(l,i).catch(g=>{throw c.addIssue(a(l,g)),c}),f=await Reflect.apply(s,this,d);return await o._def.returns._def.type.parseAsync(f,i).catch(g=>{throw c.addIssue(n(f,g)),c})})}else{const o=this;return $(function(...l){const c=o._def.args.safeParse(l,i);if(!c.success)throw new J([a(l,c.error)]);const d=Reflect.apply(s,this,c.data),f=o._def.returns.safeParse(d,i);if(!f.success)throw new J([n(d,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new et({...this._def,args:le.create(e).rest(Pe.create())})}returns(e){return new et({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,a){return new et({args:e||le.create([]).rest(Pe.create()),returns:t||Pe.create(),typeName:x.ZodFunction,...w(a)})}}class Ea extends z{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}Ea.create=(r,e)=>new Ea({getter:r,typeName:x.ZodLazy,...w(e)});class Ca extends z{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return m(t,{received:t.data,code:p.invalid_literal,expected:this._def.value}),v}return{status:"valid",value:e.data}}get value(){return this._def.value}}Ca.create=(r,e)=>new Ca({value:r,typeName:x.ZodLiteral,...w(e)});function Ta(r,e){return new De({values:r,typeName:x.ZodEnum,...w(e)})}class De extends z{_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),a=this._def.values;return m(t,{expected:M.joinValues(a),received:t.parsedType,code:p.invalid_type}),v}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const t=this._getOrReturnCtx(e),a=this._def.values;return m(t,{received:t.data,code:p.invalid_enum_value,options:a}),v}return $(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return De.create(e,{...this._def,...t})}exclude(e,t=this._def){return De.create(this.options.filter(a=>!e.includes(a)),{...this._def,...t})}}De.create=Ta;class Aa extends z{_parse(e){const t=M.getValidEnumValues(this._def.values),a=this._getOrReturnCtx(e);if(a.parsedType!==y.string&&a.parsedType!==y.number){const n=M.objectValues(t);return m(a,{expected:M.joinValues(n),received:a.parsedType,code:p.invalid_type}),v}if(this._cache||(this._cache=new Set(M.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const n=M.objectValues(t);return m(a,{received:a.data,code:p.invalid_enum_value,options:n}),v}return $(e.data)}get enum(){return this._def.values}}Aa.create=(r,e)=>new Aa({values:r,typeName:x.ZodNativeEnum,...w(e)});class tt extends z{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==y.promise&&t.common.async===!1)return m(t,{code:p.invalid_type,expected:y.promise,received:t.parsedType}),v;const a=t.parsedType===y.promise?t.data:Promise.resolve(t.data);return $(a.then(n=>this._def.type.parseAsync(n,{path:t.path,errorMap:t.common.contextualErrorMap})))}}tt.create=(r,e)=>new tt({type:r,typeName:x.ZodPromise,...w(e)});class Ze extends z{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===x.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:a}=this._processInputParams(e),n=this._def.effect||null,i={addIssue:s=>{m(a,s),s.fatal?t.abort():t.dirty()},get path(){return a.path}};if(i.addIssue=i.addIssue.bind(i),n.type==="preprocess"){const s=n.transform(a.data,i);if(a.common.async)return Promise.resolve(s).then(async o=>{if(t.value==="aborted")return v;const l=await this._def.schema._parseAsync({data:o,path:a.path,parent:a});return l.status==="aborted"?v:l.status==="dirty"||t.value==="dirty"?Je(l.value):l});{if(t.value==="aborted")return v;const o=this._def.schema._parseSync({data:s,path:a.path,parent:a});return o.status==="aborted"?v:o.status==="dirty"||t.value==="dirty"?Je(o.value):o}}if(n.type==="refinement"){const s=o=>{const l=n.refinement(o,i);if(a.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(a.common.async===!1){const o=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});return o.status==="aborted"?v:(o.status==="dirty"&&t.dirty(),s(o.value),{status:t.value,value:o.value})}else return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(o=>o.status==="aborted"?v:(o.status==="dirty"&&t.dirty(),s(o.value).then(()=>({status:t.value,value:o.value}))))}if(n.type==="transform")if(a.common.async===!1){const s=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});if(!Oe(s))return v;const o=n.transform(s.value,i);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:o}}else return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(s=>Oe(s)?Promise.resolve(n.transform(s.value,i)).then(o=>({status:t.value,value:o})):v);M.assertNever(n)}}Ze.create=(r,e,t)=>new Ze({schema:r,typeName:x.ZodEffects,effect:e,...w(t)}),Ze.createWithPreprocess=(r,e,t)=>new Ze({schema:e,effect:{type:"preprocess",transform:r},typeName:x.ZodEffects,...w(t)});class ve extends z{_parse(e){return this._getType(e)===y.undefined?$(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}ve.create=(r,e)=>new ve({innerType:r,typeName:x.ZodOptional,...w(e)});class Fe extends z{_parse(e){return this._getType(e)===y.null?$(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Fe.create=(r,e)=>new Fe({innerType:r,typeName:x.ZodNullable,...w(e)});class or extends z{_parse(e){const{ctx:t}=this._processInputParams(e);let a=t.data;return t.parsedType===y.undefined&&(a=this._def.defaultValue()),this._def.innerType._parse({data:a,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}or.create=(r,e)=>new or({innerType:r,typeName:x.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...w(e)});class lr extends z{_parse(e){const{ctx:t}=this._processInputParams(e),a={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:a.data,path:a.path,parent:{...a}});return bt(n)?n.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new J(a.common.issues)},input:a.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new J(a.common.issues)},input:a.data})}}removeCatch(){return this._def.innerType}}lr.create=(r,e)=>new lr({innerType:r,typeName:x.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...w(e)});class Na extends z{_parse(e){if(this._getType(e)!==y.nan){const a=this._getOrReturnCtx(e);return m(a,{code:p.invalid_type,expected:y.nan,received:a.parsedType}),v}return{status:"valid",value:e.data}}}Na.create=r=>new Na({typeName:x.ZodNaN,...w(r)});class Ai extends z{_parse(e){const{ctx:t}=this._processInputParams(e),a=t.data;return this._def.type._parse({data:a,path:t.path,parent:t})}unwrap(){return this._def.type}}class cr extends z{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:a.data,path:a.path,parent:a});return i.status==="aborted"?v:i.status==="dirty"?(t.dirty(),Je(i.value)):this._def.out._parseAsync({data:i.value,path:a.path,parent:a})})();{const n=this._def.in._parseSync({data:a.data,path:a.path,parent:a});return n.status==="aborted"?v:n.status==="dirty"?(t.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:a.path,parent:a})}}static create(e,t){return new cr({in:e,out:t,typeName:x.ZodPipeline})}}class ur extends z{_parse(e){const t=this._def.innerType._parse(e),a=n=>(Oe(n)&&(n.value=Object.freeze(n.value)),n);return bt(t)?t.then(n=>a(n)):a(t)}unwrap(){return this._def.innerType}}ur.create=(r,e)=>new ur({innerType:r,typeName:x.ZodReadonly,...w(e)});var x;(function(r){r.ZodString="ZodString",r.ZodNumber="ZodNumber",r.ZodNaN="ZodNaN",r.ZodBigInt="ZodBigInt",r.ZodBoolean="ZodBoolean",r.ZodDate="ZodDate",r.ZodSymbol="ZodSymbol",r.ZodUndefined="ZodUndefined",r.ZodNull="ZodNull",r.ZodAny="ZodAny",r.ZodUnknown="ZodUnknown",r.ZodNever="ZodNever",r.ZodVoid="ZodVoid",r.ZodArray="ZodArray",r.ZodObject="ZodObject",r.ZodUnion="ZodUnion",r.ZodDiscriminatedUnion="ZodDiscriminatedUnion",r.ZodIntersection="ZodIntersection",r.ZodTuple="ZodTuple",r.ZodRecord="ZodRecord",r.ZodMap="ZodMap",r.ZodSet="ZodSet",r.ZodFunction="ZodFunction",r.ZodLazy="ZodLazy",r.ZodLiteral="ZodLiteral",r.ZodEnum="ZodEnum",r.ZodEffects="ZodEffects",r.ZodNativeEnum="ZodNativeEnum",r.ZodOptional="ZodOptional",r.ZodNullable="ZodNullable",r.ZodDefault="ZodDefault",r.ZodCatch="ZodCatch",r.ZodPromise="ZodPromise",r.ZodBranded="ZodBranded",r.ZodPipeline="ZodPipeline",r.ZodReadonly="ZodReadonly"})(x||(x={}));const Be=ge.create,b=je.create,La=ar.create,Ra=nr.create;Pe.create,_e.create;const Mt=ir.create,dr=ne.create,O=P.create;St.create,zt.create;const Oa=le.create,ie=et.create;De.create;const Ni=tt.create;ve.create,Fe.create,O({pin:O({fade:La().optional(),maxCount:b().optional(),maxZoom:b().optional()}).optional(),animation:O({queue:O({limit:b().optional()}).optional()}).optional(),states:O({api:Be().optional()}).optional(),log:O({api:Be().optional()}).optional()});const pr=b().min(-90).max(90),fr=b().min(-180).max(180),Li=O({sw:O({lat:pr,lng:fr}),ne:O({lat:pr,lng:fr})}),hr=Ra().refine(r=>r instanceof HTMLElement,"Must be an HTMLElement"),ja=O({mapSize:b(),zoomMin:b(),zoomMax:b(),zoomScale:b()}),Ri=O({instance:Ra(),inserted:ie().returns(La()),insert:ie().returns(Mt()),remove:ie().returns(Mt()),update:ie().args(b()).returns(Mt())}),Oi=O({parameters:ja,getContainer:ie().args().returns(hr),getZoom:ie().args().returns(b()),getBounds:ie().args().returns(Li),panBy:ie().args(b(),b()).returns(Mt()),createMarker:ie().args(hr,pr,fr,b()).returns(Ri)}),mr=ie().args(Be()).returns(Ni(hr)),ji=O({id:Be().min(1),rank:b(),lat:b().min(-90).max(90),lng:b().min(-180).max(180),tooltip:O({style:O({width:b(),height:b(),margin:b(),radius:b()}).refine(r=>Math.min(r.width,r.height)/r.margin>=5,"Tooltip width and height must be at least 5 times the margin"),body:mr}),pin:O({style:O({width:b(),height:b(),radius:b()}),body:mr}).optional(),popup:O({style:O({width:b(),height:b(),radius:b(),margin:b()}),body:mr}).optional()}),Pi=dr(ji);Oa([b(),dr(Oa([b(),b()]))]);const Ii=O({id:Be(),rank:b(),lat:b(),lng:b(),width:b(),height:b(),margin:b()});O({key:Be(),parameters:ja,input:dr(Ii)});var Me;(r=>{r.COUNT=12,r.DEFAULT=270,r.DEGREES=[0,30,60,90,120,150,180,210,240,270,300,330]})(Me||(Me={}));const Pa="https://arenarium.dev/api/public/v1/tooltip/states",Di="https://arenarium.dev/api/public/v1/log";class Zi{constructor(e,t,a){u(this,"key");u(this,"provider");u(this,"apiStatesUrl",Pa);u(this,"apiLogUrl",Di);u(this,"markerDataArray",new Array);u(this,"markerDataMap",new Map);u(this,"markerDataUpdating",!1);u(this,"markerPinProcessor");u(this,"markerTooltipProcessor");u(this,"markerPopupProcessor");Oi.parse(t),this.key=e,this.provider=t,this.markerPinProcessor=new _r(t),this.markerTooltipProcessor=new Fi(t),this.markerPopupProcessor=new Bi(t),this.configuration=a}set configuration(e){var t,a,n;this.apiStatesUrl=((t=e==null?void 0:e.states)==null?void 0:t.api)??Pa,this.markerPinProcessor.setConfiguration(e),he.setLimit(((n=(a=e==null?void 0:e.animation)==null?void 0:a.queue)==null?void 0:n.limit)??8*navigator.hardwareConcurrency)}async updateMarkers(e){await Pi.parseAsync(e);try{if(e.length>1){const t={key:this.key,parameters:this.provider.parameters,input:e.map(i=>({id:i.id,rank:i.rank,lat:i.lat,lng:i.lng,width:i.tooltip.style.width,height:i.tooltip.style.height,margin:i.tooltip.style.margin}))},a=await fetch(this.apiStatesUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!a.ok||!a.body)throw new Error("Failed to get marker states: "+a.statusText);const n=await a.json();this.updateMarkerData(e,n)}else{const t=[[0,[[0,Me.DEGREES.indexOf(Me.DEFAULT)]]]];this.updateMarkerData(e,t)}this.processMarkerDataCallback()}catch(t){throw console.error(t),this.log("[Error] Failed to update markers",{message:t.message,stack:t.stack}),t}}removeMarkers(){try{this.removeMarkerData()}catch(e){throw console.error(e),this.log("[Error] Failed to remove markers",{message:e.message,stack:e.stack}),e}}showPopup(e){try{for(const t of this.markerDataArray)t.marker.id==e?this.markerPopupProcessor.show(t):this.markerPopupProcessor.hide(t)}catch(t){console.error(t),this.log("[Error] Failed to show popup",{message:t.message,stack:t.stack});for(const a of this.markerDataArray)this.markerPopupProcessor.hide(a);throw t}}hidePopup(e){try{if(e){const t=this.markerDataMap.get(e);if(t==null)return;this.markerPopupProcessor.hide(t)}else for(const t of this.markerDataArray)this.markerPopupProcessor.hide(t)}catch(t){console.error(t),this.log("[Error] Failed to hide popup",{message:t.message,stack:t.stack});for(const a of this.markerDataArray)this.markerPopupProcessor.hide(a);throw t}}updateMarkerData(e,t){try{this.markerDataUpdating=!0;const a=new Map(e.map((i,s)=>[i.id,new Ia(this.provider,i,t[s])])),n=Array.from(this.markerDataArray);for(const i of n)a.has(i.marker.id)==!1&&(i.remove(),this.markerDataMap.delete(i.marker.id),this.markerDataArray.splice(this.markerDataArray.indexOf(i),1));for(let i=0;i<e.length;i++){const s=e[i],o=t[i],l=this.markerDataMap.get(s.id);if(l)l.update(o);else{const c=new Ia(this.provider,s,o);c.create(),this.markerDataMap.set(s.id,c),this.markerDataArray.push(c)}}this.markerDataArray.sort((i,s)=>i.zoom-s.zoom),this.markerPinProcessor.updateElements(this.markerDataArray.map(i=>i.pin)),this.markerTooltipProcessor.updateElements(this.markerDataArray.map(i=>i.tooltip))}catch(a){throw console.error(a),this.markerDataArray.forEach(n=>n.remove()),this.markerDataArray.length=0,this.markerDataMap.clear(),a}finally{this.markerDataUpdating=!1}}removeMarkerData(){try{this.markerDataUpdating=!0,this.markerPinProcessor.removeElements(),this.markerTooltipProcessor.removeElements(),this.markerPopupProcessor.clear(),this.markerDataArray.length=0,this.markerDataMap.clear()}catch(e){throw console.error(e),e}finally{this.markerDataUpdating=!1}}processMarkerDataCallback(){if(this.markerDataArray.length!=0)try{this.processMarkerData(),window.setTimeout(this.processMarkerDataCallback.bind(this),25)}catch(e){console.error(e),this.log("[Error] Failed to process markers",{message:e.message,stack:e.stack})}}processMarkerData(){if(this.markerDataUpdating)return;const e=this.provider.getBounds(),t=this.provider.getZoom();this.markerPopupProcessor.process(),this.markerTooltipProcessor.process(e,t),this.markerPinProcessor.process(e,t)}async log(e,t){try{const a={title:e,content:t};await fetch(this.apiLogUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)})}catch(a){console.error(a)}}}class Ia{constructor(e,t,a){u(this,"marker");u(this,"zoom");u(this,"pin");u(this,"tooltip");this.marker=t,this.zoom=a[0],this.pin=new gr(e,t,a),this.tooltip=new vr(e,t,a)}create(){this.pin.create(),this.tooltip.create()}update(e){this.pin.update(e),this.tooltip.update(e)}remove(){this.pin.remove(),this.tooltip.remove()}}class yr{constructor(e,t){u(this,"provider");u(this,"id");u(this,"lat");u(this,"lng");u(this,"shown");u(this,"element");u(this,"component");u(this,"marker");this.provider=e,this.id=t.id,this.lat=t.lat,this.lng=t.lng,this.shown=!0}create(){this.createElement(),this.createMarker(),this.updateZIndex()}createElement(){throw new Error("Create element not implemented")}createMarker(){const e=this.element;if(!e)throw new Error("Failed to create provider marker");this.marker=this.provider.createMarker(e,this.lat,this.lng,this.getZindex())}updateZIndex(){if(this.marker==null)throw new Error("Failed to update provider marker z-index");this.marker.update(this.getZindex())}updateMap(e){const t=this.marker,a=this.component;if(t==null||a==null)throw new Error("Failed to update provider marker map");e?t.inserted()==!1&&t.insert():t.inserted()==!0&&t.remove()}getZindex(){throw new Error("Get z-index not implemented")}remove(){var e,t;(e=this.marker)==null||e.remove(),(t=this.element)==null||t.remove()}}const Ue=class Ue extends yr{constructor(t,a,n){var i,s,o,l;super(t,a);u(this,"width");u(this,"height");u(this,"radius");u(this,"zoom");u(this,"bodyLoading",!1);u(this,"bodyLoaded",!1);u(this,"bodyCallback");this.width=((i=a.pin)==null?void 0:i.style.width)??Ue.DEFAULT_SIZE,this.height=((s=a.pin)==null?void 0:s.style.height)??Ue.DEFAULT_SIZE,this.radius=((o=a.pin)==null?void 0:o.style.radius)??Ue.DEFAULT_SIZE,this.zoom=n[0],this.bodyCallback=(l=a.pin)==null?void 0:l.body}createElement(){this.element=document.createElement("div"),this.element.classList.add("pin"),this.component=Xt(ii,{target:this.element,props:{id:this.id+"_pin",layer:ri,priority:this.zoom*this.provider.parameters.zoomScale,width:this.width,height:this.height,radius:this.radius}})}update(t){this.zoom=t[0],this.updateZIndex()}updateMap(t){var a;super.updateMap(t),(a=this.component)==null||a.setDisplayed(t)}updateState(t){if(this.component==null)throw new Error("Failed to update pin state");this.component.setScale(this.getScale(t))}updateBody(){var a;if(this.bodyCallback==null||this.bodyLoaded||this.bodyLoading)return;const t=(a=this.component)==null?void 0:a.getBody();t!=null&&(this.bodyLoading=!0,this.bodyCallback(this.id).then(n=>t.appendChild(n)).catch(n=>console.error(n)).finally(()=>{this.bodyLoaded=!0,this.bodyLoading=!1}))}setCollapsed(t){if(this.component==null)throw new Error("Failed to set pin collapsed");this.component.setScale(t?0:1)}getScale(t){return this.zoom<t?1:Math.max(0,1-(this.zoom-t)*.125)}getZindex(){return Math.round((this.provider.parameters.zoomMax-this.zoom)*this.provider.parameters.zoomScale)}isCollapsed(){return this.component==null?!1:this.component.getCollapsed()}isBodyLoaded(){return this.bodyCallback==null||this.bodyLoaded}};u(Ue,"DEFAULT_SIZE",16);let gr=Ue;const $e=class $e{constructor(e){u(this,"provider");u(this,"pinElements",new Array);u(this,"pinMaxWidth",0);u(this,"pinMaxHeight",0);u(this,"pinFade",!1);u(this,"pinMaxCount",0);u(this,"pinMaxZoomDelta",0);this.provider=e}setConfiguration(e){var t,a,n;this.pinFade=((t=e==null?void 0:e.pin)==null?void 0:t.fade)??!0,this.pinMaxCount=((a=e==null?void 0:e.pin)==null?void 0:a.maxCount)??Math.max($e.MAP_PINS_MAX_COUNT,8*navigator.hardwareConcurrency),this.pinMaxZoomDelta=((n=e==null?void 0:e.pin)==null?void 0:n.maxZoom)??$e.MAP_PINS_MAX_ZOOM}updateElements(e){this.pinElements=e,this.pinMaxWidth=e.reduce((t,a)=>Math.max(t,a.width),0),this.pinMaxHeight=e.reduce((t,a)=>Math.max(t,a.height),0)}removeElements(){this.pinElements.forEach(e=>e.remove()),this.pinElements.length=0}process(e,t){const a=this.provider.parameters.mapSize,n=new ya(e,t,a,this.pinMaxWidth*2,this.pinMaxHeight*2);let i=0;for(const s of this.pinElements)n.contains(s.lat,s.lng)?s.shown&&t<=s.zoom&&s.zoom<=t+this.pinMaxZoomDelta?(i<this.pinMaxCount&&(this.pinFade==!0?s.updateState(t):s.setCollapsed(!1),s.updateMap(!0),s.isBodyLoaded()==!1&&s.updateBody()),i++):(s.setCollapsed(!0),s.isCollapsed()&&s.updateMap(!1)):s.updateMap(!1)}};u($e,"MAP_PINS_MAX_ZOOM",2),u($e,"MAP_PINS_MAX_COUNT",128);let _r=$e;const Et=class Et extends yr{constructor(t,a,n){super(t,a);u(this,"width");u(this,"height");u(this,"margin");u(this,"radius");u(this,"zoom");u(this,"angle");u(this,"states");u(this,"bodyLoading",!1);u(this,"bodyLoaded",!1);u(this,"bodyCallback");this.width=a.tooltip.style.width,this.height=a.tooltip.style.height,this.margin=a.tooltip.style.margin,this.radius=a.tooltip.style.radius,this.zoom=n[0],this.angle=Me.DEFAULT,this.states=n[1].map(i=>[i[0],Me.DEGREES[i[1]]]),this.bodyCallback=a.tooltip.body}createElement(){this.element=document.createElement("div"),this.element.classList.add("tooltip"),this.component=Xt(ma,{target:this.element,props:{id:this.id+"_tooltip",layer:ti,priority:this.zoom*this.provider.parameters.zoomScale,width:this.width,height:this.height,margin:this.margin,radius:this.radius}})}update(t){this.zoom=t[0],this.states=t[1].map(a=>[a[0],Me.DEGREES[a[1]]]),this.updateZIndex()}updateMap(t){var a;super.updateMap(t),(a=this.component)==null||a.setDisplayed(t)}updateState(t){if(this.component==null)throw new Error("Failed to update tooltip state");this.angle=this.getAngle(t),this.component.setAngle(this.angle)}updateBody(){var a;if(this.bodyLoaded||this.bodyLoading)return;const t=(a=this.component)==null?void 0:a.getBody();t!=null&&(this.bodyLoading=!0,this.bodyCallback(this.id).then(n=>t.appendChild(n)).catch(n=>console.error(n)).finally(()=>{this.bodyLoaded=!0,this.bodyLoading=!1}))}getAngle(t){const a=this.states.findLast(n=>n[0]<=t);if(!a)throw new Error("Angle not found");return a[1]}getZindex(){return Math.round((this.provider.parameters.zoomMax-this.zoom)*this.provider.parameters.zoomScale)+Et.Z_INDEX_OFFSET}setCollapsed(t){if(this.component==null)throw new Error("Failed to set tooltip collapsed");this.component.setCollapsed(t)}isExpanded(){return this.component==null?!1:this.component.getExpanded()}isCollapsed(){return this.component==null?!1:this.component.getCollapsed()}isBodyLoaded(){return this.bodyLoaded}};u(Et,"Z_INDEX_OFFSET",1e6);let vr=Et;class Fi{constructor(e){u(this,"provider");u(this,"tooltipElements",new Array);u(this,"tooltipMaxWidth",0);u(this,"tooltipMaxHeight",0);this.provider=e}updateElements(e){this.tooltipElements=e,this.tooltipMaxWidth=this.tooltipElements.reduce((t,a)=>Math.max(t,a.width),0),this.tooltipMaxHeight=this.tooltipElements.reduce((t,a)=>Math.max(t,a.height),0)}removeElements(){this.tooltipElements.forEach(e=>e.remove()),this.tooltipElements.length=0}process(e,t){const a=this.provider.parameters.mapSize,n=new ya(e,t,a,this.tooltipMaxWidth*2,this.tooltipMaxHeight*2);for(const i of this.tooltipElements)n.contains(i.lat,i.lng)?i.shown&&i.zoom<=t?(i.updateState(t),i.setCollapsed(!1),i.updateMap(!0),i.isCollapsed()==!1&&i.isBodyLoaded()==!1&&i.updateBody()):(i.setCollapsed(!0),i.isCollapsed()&&i.updateMap(!1)):i.updateMap(!1)}}const Ct=class Ct extends yr{constructor(t,a){if(a.popup==null)throw new Error("Failed to create popup");super(t,a);u(this,"width");u(this,"height");u(this,"margin");u(this,"radius");u(this,"bodyLoading",!1);u(this,"bodyLoaded",!1);u(this,"bodyCallback");this.shown=!1,this.width=a.popup.style.width,this.height=a.popup.style.height,this.margin=a.popup.style.margin,this.radius=a.popup.style.radius,this.bodyCallback=a.popup.body}createElement(){this.element=document.createElement("div"),this.element.classList.add("popup"),this.component=Xt(ma,{target:this.element,props:{id:this.id+"_popup",layer:ei,priority:0,width:this.width,height:this.height,margin:this.margin,radius:this.radius}})}updateMap(t){var a;super.updateMap(t),(a=this.component)==null||a.setDisplayed(t)}updateBody(){var a;if(this.bodyLoaded||this.bodyLoading)return;const t=(a=this.component)==null?void 0:a.getBody();t!=null&&(this.bodyLoading=!0,this.bodyCallback(this.id).then(n=>t.appendChild(n)).catch(n=>console.error(n)).finally(()=>{this.bodyLoaded=!0,this.bodyLoading=!1}))}getZindex(){return Ct.Z_INDEX_OFFSET}setCollapsed(t){if(this.component==null)throw new Error("Failed to set popup collapsed");this.component.setCollapsed(t)}setAngle(t){if(this.component==null)throw new Error("Failed to set popup angle");this.component.setAngle(t)}isExpanded(){return this.component==null?!1:this.component.getExpanded()}isCollapsed(){return this.component==null?!1:this.component.getCollapsed()}isBodyLoaded(){return this.bodyLoaded}};u(Ct,"Z_INDEX_OFFSET",2e6);let xr=Ct;class Bi{constructor(e){u(this,"provider");u(this,"popupElements",new Map);u(this,"popupPositioned",new Map);this.provider=e}show(e){e.pin.shown=!1,e.tooltip.shown=!1;const t=new xr(this.provider,e.marker);this.popupElements.set(e.marker.id,t),this.popupPositioned.set(e.marker.id,!1),t.create(),t.setAngle(e.tooltip.angle),t.shown=!0}hide(e){e.pin.shown=!0,e.tooltip.shown=!0;const t=this.popupElements.get(e.marker.id);t!=null&&(t.shown=!1)}clear(){this.popupElements.values().forEach(e=>e.remove()),this.popupElements.clear(),this.popupPositioned.clear()}process(){var e,t;for(const a of this.popupElements.values())if(a.shown){if(a.setCollapsed(!1),a.updateMap(!0),a.isExpanded()&&a.isBodyLoaded()==!1&&a.updateBody(),a.isCollapsed()==!1&&this.popupPositioned.get(a.id)==!1){const n=(e=a.component)==null?void 0:e.getBody();if(n==null)continue;const i=(t=a.component)==null?void 0:t.getOffsets();if(i==null)continue;const s=n.getBoundingClientRect();if(s.x==0&&s.y==0&&s.width==0&&s.height==0)continue;const o=s.x+s.width/2,l=s.y+s.height/2,c=o+i.offsetX,d=l+i.offsetY,f=c+a.width,h=d+a.height,g=this.provider.getContainer().getBoundingClientRect(),k=c-g.left,N=g.right-f,R=d-g.top,Q=g.bottom-h,E=Math.min(a.width,a.height)/4,V=k<0?k-E:N<0?-N+E:0,K=R<0?R-E:Q<0?-Q+E:0;this.provider.panBy(V,K),this.popupPositioned.set(a.id,!0)}}else a.setCollapsed(!0),a.isCollapsed()&&(a.updateMap(!1),a.remove(),this.popupElements.delete(a.id),this.popupPositioned.delete(a.id))}}const Tt=class Tt{constructor(e,t,a){u(this,"parameters",Tt.Parameters);u(this,"MapClass");u(this,"MapMarkerClass");u(this,"map");this.MapClass=e,this.MapMarkerClass=t,this.map=new this.MapClass({...a,style:a.style??"https://tiles.openfreemap.org/styles/liberty",pitchWithRotate:!1,attributionControl:a.attributionControl??{compact:!1,customAttribution:"@arenarium/maps"}}),this.map.dragRotate.disable(),this.map.keyboard.disable(),this.map.touchZoomRotate.disableRotation(),this.map.touchPitch.disable()}getMap(){return this.map}getContainer(){return this.map.getContainer()}getZoom(){return this.map.getZoom()}getBounds(){const e=this.map.getBounds(),t=e.getSouthWest(),a=e.getNorthEast();return{sw:t,ne:a}}panBy(e,t){this.map.panBy([e,t])}createMarker(e,t,a){const n=new this.MapMarkerClass({element:e});return n.setLngLat([a,t]),{instance:n,inserted:()=>n._map!=null,insert:()=>n.addTo(this.map),remove:()=>n.remove(),update:i=>n.getElement().style.zIndex=i.toString()}}};u(Tt,"Parameters",{mapSize:512,zoomMin:0,zoomMax:24,zoomScale:10});let wr=Tt;const Vi={version:8,sources:{openmaptiles:{type:"vector",url:"https://tiles.openfreemap.org/planet"}},glyphs:"https://tiles.openfreemap.org/fonts/{fontstack}/{range}.pbf",layers:[{id:"background",type:"background",paint:{"background-color":"rgba(120, 120, 120, 1)"}},{id:"park",type:"fill",source:"openmaptiles","source-layer":"park",filter:["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],paint:{"fill-color":"rgba(128, 128, 128, 1)"}},{id:"water",type:"fill",source:"openmaptiles","source-layer":"water",filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["!=",["get","brunnel"],"tunnel"]],paint:{"fill-antialias":!0,"fill-color":"rgba(56, 56, 56, 1)"}},{id:"landcover_ice_shelf",type:"fill",source:"openmaptiles","source-layer":"landcover",maxzoom:8,filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["==",["get","subclass"],"ice_shelf"]],paint:{"fill-color":"rgba(128, 128, 128, 1)","fill-opacity":.7}},{id:"landcover_glacier",type:"fill",source:"openmaptiles","source-layer":"landcover",maxzoom:8,filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["==",["get","subclass"],"glacier"]],paint:{"fill-color":"rgba(153, 153, 153, 1)","fill-opacity":["interpolate",["linear"],["zoom"],0,1,8,.5]}},{id:"landuse_residential",type:"fill",source:"openmaptiles","source-layer":"landuse",maxzoom:16,filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["==",["get","class"],"residential"]],paint:{"fill-color":"rgba(104, 104, 104, 1)","fill-opacity":["interpolate",["exponential",.6],["zoom"],8,.8,9,.6]}},{id:"landcover_wood",type:"fill",source:"openmaptiles","source-layer":"landcover",minzoom:10,filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["==",["get","class"],"wood"]],paint:{"fill-color":"rgba(128, 128, 128, 1)","fill-opacity":["interpolate",["linear"],["zoom"],8,0,12,1]}},{id:"waterway",type:"line",source:"openmaptiles","source-layer":"waterway",filter:["==",["geometry-type"],"LineString"],paint:{"line-color":"rgba(56, 56, 56, 1)"}},{id:"building",type:"fill",source:"openmaptiles","source-layer":"building",minzoom:12,paint:{"fill-antialias":!0,"fill-color":"rgba(136, 136, 136, 1)","fill-outline-color":"rgba(102, 102, 102, 1)"}},{id:"tunnel_motorway_casing",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","brunnel"],"tunnel"],["==",["get","class"],"motorway"]]],layout:{"line-cap":"butt","line-join":"miter"},paint:{"line-color":"rgba(68, 68, 68, 1)","line-opacity":1,"line-width":["interpolate",["exponential",1.4],["zoom"],5.8,0,6,3,20,40]}},{id:"tunnel_motorway_inner",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","brunnel"],"tunnel"],["==",["get","class"],"motorway"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(85, 85, 85, 1)","line-width":["interpolate",["exponential",1.4],["zoom"],4,2,6,1.3,20,30]}},{id:"aeroway-taxiway",type:"line",source:"openmaptiles","source-layer":"aeroway",minzoom:12,filter:["match",["get","class"],["taxiway"],!0,!1],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(85, 85, 85, 1)","line-opacity":1,"line-width":["interpolate",["exponential",1.55],["zoom"],13,1.8,20,20]}},{id:"aeroway-runway-casing",type:"line",source:"openmaptiles","source-layer":"aeroway",minzoom:11,filter:["match",["get","class"],["runway"],!0,!1],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(85, 85, 85, 1)","line-opacity":1,"line-width":["interpolate",["exponential",1.5],["zoom"],11,6,17,55]}},{id:"aeroway-area",type:"fill",source:"openmaptiles","source-layer":"aeroway",minzoom:4,filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["match",["get","class"],["runway","taxiway"],!0,!1]],paint:{"fill-color":"rgba(128, 128, 128, 1)","fill-opacity":["interpolate",["linear"],["zoom"],13,0,14,1]}},{id:"aeroway-runway",type:"line",source:"openmaptiles","source-layer":"aeroway",minzoom:11,filter:["all",["match",["get","class"],["runway"],!0,!1],["==",["geometry-type"],"LineString"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(68, 68, 68, 1)","line-opacity":1,"line-width":["interpolate",["exponential",1.5],["zoom"],11,4,17,50]}},{id:"road_area_pier",type:"fill",source:"openmaptiles","source-layer":"transportation",filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["==",["get","class"],"pier"]],paint:{"fill-antialias":!0,"fill-color":"rgba(50, 50, 50, 1)"}},{id:"road_pier",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["==",["geometry-type"],"LineString"],["match",["get","class"],["pier"],!0,!1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(52, 52, 52, 1)","line-width":["interpolate",["exponential",1.2],["zoom"],15,1,17,4]}},{id:"highway_path",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["==",["geometry-type"],"LineString"],["==",["get","class"],"path"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(88, 88, 88, 1)","line-opacity":.9,"line-width":["interpolate",["exponential",1.2],["zoom"],13,1,20,10]}},{id:"highway_minor",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:8,filter:["all",["==",["geometry-type"],"LineString"],["match",["get","class"],["minor","service","track"],!0,!1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-opacity":.9,"line-width":["interpolate",["exponential",1.55],["zoom"],13,1.8,20,20],"line-color":"rgba(102, 102, 102, 1)"}},{id:"highway_major_casing",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:11,filter:["all",["==",["geometry-type"],"LineString"],["match",["get","class"],["primary","secondary","tertiary","trunk"],!0,!1]],layout:{"line-cap":"butt","line-join":"miter"},paint:{"line-dasharray":[12,0],"line-width":["interpolate",["exponential",1.3],["zoom"],10,3,20,23],"line-color":"rgba(85, 85, 85, 1)"}},{id:"highway_major_inner",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:11,filter:["all",["==",["geometry-type"],"LineString"],["match",["get","class"],["primary","secondary","tertiary","trunk"],!0,!1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(102, 102, 102, 1)","line-width":["interpolate",["exponential",1.3],["zoom"],10,2,20,20]}},{id:"highway_major_subtle",type:"line",source:"openmaptiles","source-layer":"transportation",maxzoom:11,filter:["all",["==",["geometry-type"],"LineString"],["match",["get","class"],["primary","secondary","tertiary","trunk"],!0,!1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-width":2,"line-color":"rgba(85, 85, 85, 1)"}},{id:"highway_motorway_casing",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["all",["match",["get","brunnel"],["bridge","tunnel"],!1,!0],["==",["get","class"],"motorway"]]],layout:{"line-cap":"butt","line-join":"miter"},paint:{"line-color":"rgba(68, 68, 68, 1)","line-dasharray":[2,0],"line-opacity":1,"line-width":["interpolate",["exponential",1.4],["zoom"],5.8,0,6,3,20,40]}},{id:"highway_motorway_inner",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["all",["match",["get","brunnel"],["bridge","tunnel"],!1,!0],["==",["get","class"],"motorway"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":["interpolate",["linear"],["zoom"],5.8,"rgba(102, 102, 102, 1)",6,"rgba(85, 85, 85, 1)"],"line-width":["interpolate",["exponential",1.4],["zoom"],4,2,6,1.3,20,30]}},{id:"highway_motorway_subtle",type:"line",source:"openmaptiles","source-layer":"transportation",maxzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["==",["get","class"],"motorway"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(102, 102, 102, 1)","line-width":["interpolate",["exponential",1.4],["zoom"],4,2,6,1.3]}},{id:"railway_transit",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:16,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","class"],"transit"],["match",["get","brunnel"],["tunnel"],!1,!0]]],layout:{"line-join":"round"},paint:{"line-color":"rgba(85, 85, 85, 1)","line-width":3}},{id:"railway_transit_dashline",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:16,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","class"],"transit"],["match",["get","brunnel"],["tunnel"],!1,!0]]],layout:{"line-join":"round"},paint:{"line-color":"rgba(68, 68, 68, 1)","line-dasharray":[3,3],"line-width":2}},{id:"railway_service",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:16,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","class"],"rail"],["has","service"]]],layout:{"line-join":"round"},paint:{"line-color":"rgba(102, 102, 102, 1)","line-width":3}},{id:"railway_service_dashline",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:16,filter:["all",["==",["geometry-type"],"LineString"],["==",["get","class"],"rail"],["has","service"]],layout:{"line-join":"round"},paint:{"line-color":"rgba(85, 85, 85, 1)","line-dasharray":[3,3],"line-width":2}},{id:"railway",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["==",["geometry-type"],"LineString"],["all",["!",["has","service"]],["==",["get","class"],"rail"]]],layout:{"line-join":"round"},paint:{"line-color":"rgba(85, 85, 85, 1)","line-width":["interpolate",["exponential",1.3],["zoom"],16,3,20,7]}},{id:"railway_dashline",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["==",["geometry-type"],"LineString"],["all",["!",["has","service"]],["==",["get","class"],"rail"]]],layout:{"line-join":"round"},paint:{"line-color":"rgba(68, 68, 68, 1)","line-dasharray":[3,3],"line-width":["interpolate",["exponential",1.3],["zoom"],16,2,20,6]}},{id:"highway_motorway_bridge_casing",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","brunnel"],"bridge"],["==",["get","class"],"motorway"]]],layout:{"line-cap":"butt","line-join":"miter"},paint:{"line-color":"rgba(68, 68, 68, 1)","line-dasharray":[2,0],"line-opacity":1,"line-width":["interpolate",["exponential",1.4],["zoom"],5.8,0,6,5,20,45]}},{id:"highway_motorway_bridge_inner",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","brunnel"],"bridge"],["==",["get","class"],"motorway"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":["interpolate",["linear"],["zoom"],5.8,"rgba(102, 102, 102, 1)",6,"rgba(85, 85, 85, 1)"],"line-width":["interpolate",["exponential",1.4],["zoom"],4,2,6,1.3,20,30]}},{id:"boundary_3",type:"line",source:"openmaptiles","source-layer":"boundary",minzoom:8,filter:["all",[">=",["get","admin_level"],3],["<=",["get","admin_level"],6],["!=",["get","maritime"],1],["!=",["get","disputed"],1],["!",["has","claimed_by"]]],paint:{"line-color":"rgba(68, 68, 68, 1)","line-dasharray":[1,1],"line-width":["interpolate",["linear"],["zoom"],7,1,11,2]}},{id:"boundary_2",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["==",["get","admin_level"],2],["!=",["get","maritime"],1],["!=",["get","disputed"],1],["!",["has","claimed_by"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(51, 51, 51, 1)","line-opacity":["interpolate",["linear"],["zoom"],0,.4,4,1],"line-width":["interpolate",["linear"],["zoom"],3,1,5,1.2,12,3]}},{id:"boundary_disputed",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["!=",["get","maritime"],1],["==",["get","disputed"],1]],paint:{"line-color":"rgba(51, 51, 51, 1)","line-dasharray":[1,2],"line-width":["interpolate",["linear"],["zoom"],3,1,5,1.2,12,3]}},{id:"waterway_line_label",type:"symbol",source:"openmaptiles","source-layer":"waterway",minzoom:10,filter:["==",["geometry-type"],"LineString"],layout:{"symbol-placement":"line","symbol-spacing":350,"text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Regular"],"text-letter-spacing":.2,"text-max-width":5,"text-size":14},paint:{"text-color":"rgba(34, 34, 34, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"water_name_point_label",type:"symbol",source:"openmaptiles","source-layer":"water_name",minzoom:0,filter:["==",["geometry-type"],"Point"],layout:{visibility:"none"}},{id:"water_name_line_label",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["==",["geometry-type"],"LineString"],layout:{visibility:"none"}},{id:"highway-name-path",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:15.5,filter:["==",["get","class"],"path"],layout:{"symbol-placement":"line","text-field":["get","name:latin"],"text-font":["Noto Sans Regular"],"text-rotation-alignment":"map","text-size":["interpolate",["linear"],["zoom"],13,12,14,13]},paint:{"text-color":"rgba(158, 158, 158, 1)","text-halo-color":"rgba(244, 244, 244, 1)","text-halo-width":.5}},{id:"highway-name-minor",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:15,filter:["all",["==",["geometry-type"],"LineString"],["match",["get","class"],["minor","service","track"],!0,!1]],layout:{"symbol-placement":"line","text-field":["get","name:latin"],"text-font":["Noto Sans Regular"],"text-rotation-alignment":"map","text-size":["interpolate",["linear"],["zoom"],13,12,14,13]},paint:{"text-color":"rgba(17, 17, 17, 1)","text-halo-width":1,"text-halo-color":"rgba(255, 255, 255, 1)"}},{id:"highway-name-major",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:12.2,filter:["match",["get","class"],["primary","secondary","tertiary","trunk"],!0,!1],layout:{"symbol-placement":"line","text-field":["get","name:latin"],"text-font":["Noto Sans Regular"],"text-rotation-alignment":"map","text-size":["interpolate",["linear"],["zoom"],13,12,14,13]},paint:{"text-color":"rgba(34, 34, 34, 1)","text-halo-width":1,"text-halo-color":"rgba(255, 255, 255, 1)"}},{id:"highway-shield-non-us",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:11,filter:["all",["<=",["get","ref_length"],6],["==",["geometry-type"],"LineString"],["match",["get","network"],["us-highway","us-interstate","us-state"],!1,!0]],layout:{"icon-rotation-alignment":"viewport","icon-size":1,"symbol-placement":["step",["zoom"],"point",11,"line"],"symbol-spacing":200,"text-field":["to-string",["get","ref"]],"text-font":["Noto Sans Regular"],"text-rotation-alignment":"viewport","text-size":10},paint:{"text-halo-color":"rgba(255, 255, 255, 1)","text-color":"rgba(255, 255, 255, 1)"}},{id:"highway-shield-us-interstate",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:11,filter:["all",["<=",["get","ref_length"],6],["==",["geometry-type"],"LineString"],["match",["get","network"],["us-interstate"],!0,!1]],layout:{"icon-rotation-alignment":"viewport","icon-size":1,"symbol-placement":["step",["zoom"],"point",7,"line",8,"line"],"symbol-spacing":200,"text-field":["to-string",["get","ref"]],"text-font":["Noto Sans Regular"],"text-rotation-alignment":"viewport","text-size":10}},{id:"road_shield_us",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:12,filter:["all",["<=",["get","ref_length"],6],["==",["geometry-type"],"LineString"],["match",["get","network"],["us-highway","us-state"],!0,!1]],layout:{"icon-rotation-alignment":"viewport","icon-size":1,"symbol-placement":["step",["zoom"],"point",11,"line"],"symbol-spacing":200,"text-field":["to-string",["get","ref"]],"text-font":["Noto Sans Regular"],"text-rotation-alignment":"viewport","text-size":10}},{id:"airport",type:"symbol",source:"openmaptiles","source-layer":"aerodrome_label",minzoom:11,filter:["all",["has","iata"]],layout:{"icon-size":1,"text-anchor":"top","text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Regular"],"text-max-width":9,"text-offset":[0,.6],"text-optional":!0,"text-padding":2,"text-size":12},paint:{"text-color":"rgba(51, 51, 51, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_other",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:8,filter:["match",["get","class"],["city","continent","country","state","town","village"],!1,!0],layout:{"text-field":["get","name:latin"],"text-font":["Noto Sans Regular"],"text-letter-spacing":.1,"text-max-width":9,"text-size":["interpolate",["linear"],["zoom"],8,9,12,10],"text-transform":"uppercase"},paint:{"text-color":"rgba(17, 17, 17, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_village",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:9,filter:["==",["get","class"],"village"],layout:{"icon-allow-overlap":!0,"icon-optional":!1,"icon-size":.2,"text-anchor":"bottom","text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Regular"],"text-max-width":8,"text-size":["interpolate",["exponential",1.2],["zoom"],7,10,11,12]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_town",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:6,filter:["==",["get","class"],"town"],layout:{"icon-allow-overlap":!0,"icon-optional":!1,"icon-size":.2,"text-anchor":"bottom","text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Regular"],"text-max-width":8,"text-size":["interpolate",["exponential",1.2],["zoom"],7,12,11,14]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_state",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:5,maxzoom:8,filter:["==",["get","class"],"state"],layout:{"text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Regular"],"text-letter-spacing":.2,"text-max-width":9,"text-size":["interpolate",["linear"],["zoom"],5,10,8,14],"text-transform":"uppercase"},paint:{"text-color":"rgba(17, 17, 17, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_city",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:3,filter:["all",["==",["get","class"],"city"],["!=",["get","capital"],2]],layout:{"icon-allow-overlap":!0,"icon-optional":!1,"icon-size":.4,"text-anchor":"bottom","text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Regular"],"text-max-width":8,"text-offset":[0,-.1],"text-size":["interpolate",["exponential",1.2],["zoom"],4,11,7,13,11,18]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_city_capital",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:3,filter:["all",["==",["get","class"],"city"],["==",["get","capital"],2]],layout:{"icon-allow-overlap":!0,"icon-optional":!1,"icon-size":.5,"text-anchor":"bottom","text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Bold"],"text-max-width":8,"text-offset":[0,-.2],"text-size":["interpolate",["exponential",1.2],["zoom"],4,12,7,14,11,20]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_country_3",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:2,maxzoom:9,filter:["all",["==",["get","class"],"country"],[">=",["get","rank"],3]],layout:{"text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Bold"],"text-max-width":6.25,"text-size":["interpolate",["linear"],["zoom"],3,9,7,17]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_country_2",type:"symbol",source:"openmaptiles","source-layer":"place",maxzoom:9,filter:["all",["==",["get","class"],"country"],["==",["get","rank"],2]],layout:{"text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Bold"],"text-max-width":6.25,"text-size":["interpolate",["linear"],["zoom"],2,9,5,17]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_country_1",type:"symbol",source:"openmaptiles","source-layer":"place",maxzoom:9,filter:["all",["==",["get","class"],"country"],["==",["get","rank"],1]],layout:{"text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Bold"],"text-max-width":6.25,"text-size":["interpolate",["linear"],["zoom"],1,9,4,17]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}}]},Ui={version:8,sources:{openmaptiles:{type:"vector",url:"https://tiles.openfreemap.org/planet"}},glyphs:"https://tiles.openfreemap.org/fonts/{fontstack}/{range}.pbf",layers:[{id:"background",type:"background",paint:{"background-color":"rgba(220, 220, 220, 1)"}},{id:"park",type:"fill",source:"openmaptiles","source-layer":"park",filter:["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],paint:{"fill-color":"rgba(228, 228, 228, 1)"}},{id:"water",type:"fill",source:"openmaptiles","source-layer":"water",filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["!=",["get","brunnel"],"tunnel"]],paint:{"fill-antialias":!0,"fill-color":"rgba(156, 156, 156, 1)"}},{id:"landcover_ice_shelf",type:"fill",source:"openmaptiles","source-layer":"landcover",maxzoom:8,filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["==",["get","subclass"],"ice_shelf"]],paint:{"fill-color":"rgba(228, 228, 228, 1)","fill-opacity":.7}},{id:"landcover_glacier",type:"fill",source:"openmaptiles","source-layer":"landcover",maxzoom:8,filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["==",["get","subclass"],"glacier"]],paint:{"fill-color":"rgba(253, 253, 253, 1)","fill-opacity":["interpolate",["linear"],["zoom"],0,1,8,.5]}},{id:"landuse_residential",type:"fill",source:"openmaptiles","source-layer":"landuse",maxzoom:16,filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["==",["get","class"],"residential"]],paint:{"fill-color":"rgba(204, 204, 204, 1)","fill-opacity":["interpolate",["exponential",.6],["zoom"],8,.8,9,.6]}},{id:"landcover_wood",type:"fill",source:"openmaptiles","source-layer":"landcover",minzoom:10,filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["==",["get","class"],"wood"]],paint:{"fill-color":"rgba(228, 228, 228, 1)","fill-opacity":["interpolate",["linear"],["zoom"],8,0,12,1]}},{id:"waterway",type:"line",source:"openmaptiles","source-layer":"waterway",filter:["==",["geometry-type"],"LineString"],paint:{"line-color":"rgba(156, 156, 156, 1)"}},{id:"building",type:"fill",source:"openmaptiles","source-layer":"building",minzoom:12,paint:{"fill-antialias":!0,"fill-color":"rgba(236, 236, 236, 1)","fill-outline-color":"rgba(202, 202, 202, 1)"}},{id:"tunnel_motorway_casing",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","brunnel"],"tunnel"],["==",["get","class"],"motorway"]]],layout:{"line-cap":"butt","line-join":"miter"},paint:{"line-color":"rgb(168, 168, 168)","line-opacity":1,"line-width":["interpolate",["exponential",1.4],["zoom"],5.8,0,6,3,20,40]}},{id:"tunnel_motorway_inner",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","brunnel"],"tunnel"],["==",["get","class"],"motorway"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgb(185, 185, 185)","line-width":["interpolate",["exponential",1.4],["zoom"],4,2,6,1.3,20,30]}},{id:"aeroway-taxiway",type:"line",source:"openmaptiles","source-layer":"aeroway",minzoom:12,filter:["match",["get","class"],["taxiway"],!0,!1],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(185, 185, 185, 1)","line-opacity":1,"line-width":["interpolate",["exponential",1.55],["zoom"],13,1.8,20,20]}},{id:"aeroway-runway-casing",type:"line",source:"openmaptiles","source-layer":"aeroway",minzoom:11,filter:["match",["get","class"],["runway"],!0,!1],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(185, 185, 185, 1)","line-opacity":1,"line-width":["interpolate",["exponential",1.5],["zoom"],11,6,17,55]}},{id:"aeroway-area",type:"fill",source:"openmaptiles","source-layer":"aeroway",minzoom:4,filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["match",["get","class"],["runway","taxiway"],!0,!1]],paint:{"fill-color":"rgba(228, 228, 228, 1)","fill-opacity":["interpolate",["linear"],["zoom"],13,0,14,1]}},{id:"aeroway-runway",type:"line",source:"openmaptiles","source-layer":"aeroway",minzoom:11,filter:["all",["match",["get","class"],["runway"],!0,!1],["==",["geometry-type"],"LineString"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(168, 168, 168, 1)","line-opacity":1,"line-width":["interpolate",["exponential",1.5],["zoom"],11,4,17,50]}},{id:"road_area_pier",type:"fill",source:"openmaptiles","source-layer":"transportation",filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["==",["get","class"],"pier"]],paint:{"fill-antialias":!0,"fill-color":"rgba(150, 150, 150, 1)"}},{id:"road_pier",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["==",["geometry-type"],"LineString"],["match",["get","class"],["pier"],!0,!1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(152, 152, 152, 1)","line-width":["interpolate",["exponential",1.2],["zoom"],15,1,17,4]}},{id:"highway_path",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["==",["geometry-type"],"LineString"],["==",["get","class"],"path"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgb(188, 188, 188)","line-opacity":.9,"line-width":["interpolate",["exponential",1.2],["zoom"],13,1,20,10]}},{id:"highway_minor",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:8,filter:["all",["==",["geometry-type"],"LineString"],["match",["get","class"],["minor","service","track"],!0,!1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(202, 202, 202, 1)","line-opacity":.9,"line-width":["interpolate",["exponential",1.55],["zoom"],13,1.8,20,20]}},{id:"highway_major_casing",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:11,filter:["all",["==",["geometry-type"],"LineString"],["match",["get","class"],["primary","secondary","tertiary","trunk"],!0,!1]],layout:{"line-cap":"butt","line-join":"miter"},paint:{"line-color":"rgb(185, 185, 185)","line-dasharray":[12,0],"line-width":["interpolate",["exponential",1.3],["zoom"],10,3,20,23]}},{id:"highway_major_inner",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:11,filter:["all",["==",["geometry-type"],"LineString"],["match",["get","class"],["primary","secondary","tertiary","trunk"],!0,!1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(202, 202, 202, 1)","line-width":["interpolate",["exponential",1.3],["zoom"],10,2,20,20]}},{id:"highway_major_subtle",type:"line",source:"openmaptiles","source-layer":"transportation",maxzoom:11,filter:["all",["==",["geometry-type"],"LineString"],["match",["get","class"],["primary","secondary","tertiary","trunk"],!0,!1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(185, 185, 185, 1)","line-width":2}},{id:"highway_motorway_casing",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["all",["match",["get","brunnel"],["bridge","tunnel"],!1,!0],["==",["get","class"],"motorway"]]],layout:{"line-cap":"butt","line-join":"miter"},paint:{"line-color":"rgb(168, 168, 168)","line-dasharray":[2,0],"line-opacity":1,"line-width":["interpolate",["exponential",1.4],["zoom"],5.8,0,6,3,20,40]}},{id:"highway_motorway_inner",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["all",["match",["get","brunnel"],["bridge","tunnel"],!1,!0],["==",["get","class"],"motorway"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":["interpolate",["linear"],["zoom"],5.8,"rgba(202, 202, 202, 1)",6,"rgba(185, 185, 185, 1)"],"line-width":["interpolate",["exponential",1.4],["zoom"],4,2,6,1.3,20,30]}},{id:"highway_motorway_subtle",type:"line",source:"openmaptiles","source-layer":"transportation",maxzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["==",["get","class"],"motorway"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(202, 202, 202, 1)","line-width":["interpolate",["exponential",1.4],["zoom"],4,2,6,1.3]}},{id:"railway_transit",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:16,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","class"],"transit"],["match",["get","brunnel"],["tunnel"],!1,!0]]],layout:{"line-join":"round"},paint:{"line-color":"rgba(185, 185, 185, 1)","line-width":3}},{id:"railway_transit_dashline",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:16,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","class"],"transit"],["match",["get","brunnel"],["tunnel"],!1,!0]]],layout:{"line-join":"round"},paint:{"line-color":"rgba(168, 168, 168, 1)","line-dasharray":[3,3],"line-width":2}},{id:"railway_service",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:16,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","class"],"rail"],["has","service"]]],layout:{"line-join":"round"},paint:{"line-color":"rgba(202, 202, 202, 1)","line-width":3}},{id:"railway_service_dashline",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:16,filter:["all",["==",["geometry-type"],"LineString"],["==",["get","class"],"rail"],["has","service"]],layout:{"line-join":"round"},paint:{"line-color":"rgba(185, 185, 185, 1)","line-dasharray":[3,3],"line-width":2}},{id:"railway",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["==",["geometry-type"],"LineString"],["all",["!",["has","service"]],["==",["get","class"],"rail"]]],layout:{"line-join":"round"},paint:{"line-color":"rgba(185, 185, 185, 1)","line-width":["interpolate",["exponential",1.3],["zoom"],16,3,20,7]}},{id:"railway_dashline",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["==",["geometry-type"],"LineString"],["all",["!",["has","service"]],["==",["get","class"],"rail"]]],layout:{"line-join":"round"},paint:{"line-color":"rgba(168, 168, 168, 1)","line-dasharray":[3,3],"line-width":["interpolate",["exponential",1.3],["zoom"],16,2,20,6]}},{id:"highway_motorway_bridge_casing",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","brunnel"],"bridge"],["==",["get","class"],"motorway"]]],layout:{"line-cap":"butt","line-join":"miter"},paint:{"line-color":"rgb(168, 168, 168)","line-dasharray":[2,0],"line-opacity":1,"line-width":["interpolate",["exponential",1.4],["zoom"],5.8,0,6,5,20,45]}},{id:"highway_motorway_bridge_inner",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","brunnel"],"bridge"],["==",["get","class"],"motorway"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":["interpolate",["linear"],["zoom"],5.8,"rgba(202, 202, 202, 1)",6,"rgba(185, 185, 185, 1)"],"line-width":["interpolate",["exponential",1.4],["zoom"],4,2,6,1.3,20,30]}},{id:"boundary_3",type:"line",source:"openmaptiles","source-layer":"boundary",minzoom:8,filter:["all",[">=",["get","admin_level"],3],["<=",["get","admin_level"],6],["!=",["get","maritime"],1],["!=",["get","disputed"],1],["!",["has","claimed_by"]]],paint:{"line-color":"rgba(168, 168, 168, 1)","line-dasharray":[1,1],"line-width":["interpolate",["linear"],["zoom"],7,1,11,2]}},{id:"boundary_2",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["==",["get","admin_level"],2],["!=",["get","maritime"],1],["!=",["get","disputed"],1],["!",["has","claimed_by"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(151, 151, 151, 1)","line-opacity":["interpolate",["linear"],["zoom"],0,.4,4,1],"line-width":["interpolate",["linear"],["zoom"],3,1,5,1.2,12,3]}},{id:"boundary_disputed",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["!=",["get","maritime"],1],["==",["get","disputed"],1]],paint:{"line-color":"rgba(151, 151, 151, 1)","line-dasharray":[1,2],"line-width":["interpolate",["linear"],["zoom"],3,1,5,1.2,12,3]}},{id:"waterway_line_label",type:"symbol",source:"openmaptiles","source-layer":"waterway",minzoom:10,filter:["==",["geometry-type"],"LineString"],layout:{"symbol-placement":"line","symbol-spacing":350,"text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Regular"],"text-letter-spacing":.2,"text-max-width":5,"text-size":14},paint:{"text-color":"rgba(34, 34, 34, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1.5}},{id:"water_name_point_label",type:"symbol",source:"openmaptiles","source-layer":"water_name",minzoom:0,filter:["==",["geometry-type"],"Point"],layout:{visibility:"none"}},{id:"water_name_line_label",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["==",["geometry-type"],"LineString"],layout:{visibility:"none"}},{id:"highway-name-path",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:15.5,filter:["==",["get","class"],"path"],layout:{"symbol-placement":"line","text-field":["get","name:latin"],"text-font":["Noto Sans Regular"],"text-rotation-alignment":"map","text-size":["interpolate",["linear"],["zoom"],13,12,14,13]},paint:{"text-color":"rgba(158, 158, 158, 1)","text-halo-color":"rgba(244, 244, 244, 1)","text-halo-width":.5}},{id:"highway-name-minor",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:15,filter:["all",["==",["geometry-type"],"LineString"],["match",["get","class"],["minor","service","track"],!0,!1]],layout:{"symbol-placement":"line","text-field":["get","name:latin"],"text-font":["Noto Sans Regular"],"text-rotation-alignment":"map","text-size":["interpolate",["linear"],["zoom"],13,12,14,13]},paint:{"text-color":"rgba(17, 17, 17, 1)","text-halo-width":1,"text-halo-color":"rgba(255, 255, 255, 1)"}},{id:"highway-name-major",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:12.2,filter:["match",["get","class"],["primary","secondary","tertiary","trunk"],!0,!1],layout:{"symbol-placement":"line","text-field":["get","name:latin"],"text-font":["Noto Sans Regular"],"text-rotation-alignment":"map","text-size":["interpolate",["linear"],["zoom"],13,12,14,13]},paint:{"text-color":"rgba(34, 34, 34, 1)","text-halo-width":1,"text-halo-color":"rgba(255, 255, 255, 1)"}},{id:"highway-shield-non-us",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:11,filter:["all",["<=",["get","ref_length"],6],["==",["geometry-type"],"LineString"],["match",["get","network"],["us-highway","us-interstate","us-state"],!1,!0]],layout:{"icon-rotation-alignment":"viewport","icon-size":1,"symbol-placement":["step",["zoom"],"point",11,"line"],"symbol-spacing":200,"text-field":["to-string",["get","ref"]],"text-font":["Noto Sans Regular"],"text-rotation-alignment":"viewport","text-size":10},paint:{"text-halo-color":"rgba(0, 0, 0, 1)","text-color":"rgba(0, 0, 0, 1)"}},{id:"highway-shield-us-interstate",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:11,filter:["all",["<=",["get","ref_length"],6],["==",["geometry-type"],"LineString"],["match",["get","network"],["us-interstate"],!0,!1]],layout:{"icon-rotation-alignment":"viewport","icon-size":1,"symbol-placement":["step",["zoom"],"point",7,"line",8,"line"],"symbol-spacing":200,"text-field":["to-string",["get","ref"]],"text-font":["Noto Sans Regular"],"text-rotation-alignment":"viewport","text-size":10}},{id:"road_shield_us",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:12,filter:["all",["<=",["get","ref_length"],6],["==",["geometry-type"],"LineString"],["match",["get","network"],["us-highway","us-state"],!0,!1]],layout:{"icon-rotation-alignment":"viewport","icon-size":1,"symbol-placement":["step",["zoom"],"point",11,"line"],"symbol-spacing":200,"text-field":["to-string",["get","ref"]],"text-font":["Noto Sans Regular"],"text-rotation-alignment":"viewport","text-size":10}},{id:"airport",type:"symbol",source:"openmaptiles","source-layer":"aerodrome_label",minzoom:11,filter:["all",["has","iata"]],layout:{"icon-size":1,"text-anchor":"top","text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Regular"],"text-max-width":9,"text-offset":[0,.6],"text-optional":!0,"text-padding":2,"text-size":12},paint:{"text-color":"rgba(51, 51, 51, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_other",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:8,filter:["match",["get","class"],["city","continent","country","state","town","village"],!1,!0],layout:{"text-field":["get","name:latin"],"text-font":["Noto Sans Regular"],"text-letter-spacing":.1,"text-max-width":9,"text-size":["interpolate",["linear"],["zoom"],8,9,12,10],"text-transform":"uppercase"},paint:{"text-color":"rgba(17, 17, 17, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_village",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:9,filter:["==",["get","class"],"village"],layout:{"icon-allow-overlap":!0,"icon-optional":!1,"icon-size":.2,"text-anchor":"bottom","text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Regular"],"text-max-width":8,"text-size":["interpolate",["exponential",1.2],["zoom"],7,10,11,12]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_town",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:6,filter:["==",["get","class"],"town"],layout:{"icon-allow-overlap":!0,"icon-optional":!1,"icon-size":.2,"text-anchor":"bottom","text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Regular"],"text-max-width":8,"text-size":["interpolate",["exponential",1.2],["zoom"],7,12,11,14]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_state",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:5,maxzoom:8,filter:["==",["get","class"],"state"],layout:{"text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Regular"],"text-letter-spacing":.2,"text-max-width":9,"text-size":["interpolate",["linear"],["zoom"],5,10,8,14],"text-transform":"uppercase"},paint:{"text-color":"rgba(17, 17, 17, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_city",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:3,filter:["all",["==",["get","class"],"city"],["!=",["get","capital"],2]],layout:{"icon-allow-overlap":!0,"icon-optional":!1,"icon-size":.4,"text-anchor":"bottom","text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Regular"],"text-max-width":8,"text-offset":[0,-.1],"text-size":["interpolate",["exponential",1.2],["zoom"],4,11,7,13,11,18]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_city_capital",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:3,filter:["all",["==",["get","class"],"city"],["==",["get","capital"],2]],layout:{"icon-allow-overlap":!0,"icon-optional":!1,"icon-size":.5,"text-anchor":"bottom","text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Bold"],"text-max-width":8,"text-offset":[0,-.2],"text-size":["interpolate",["exponential",1.2],["zoom"],4,12,7,14,11,20]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_country_3",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:2,maxzoom:9,filter:["all",["==",["get","class"],"country"],[">=",["get","rank"],3]],layout:{"text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Bold"],"text-max-width":6.25,"text-size":["interpolate",["linear"],["zoom"],3,9,7,17]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_country_2",type:"symbol",source:"openmaptiles","source-layer":"place",maxzoom:9,filter:["all",["==",["get","class"],"country"],["==",["get","rank"],2]],layout:{"text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Bold"],"text-max-width":6.25,"text-size":["interpolate",["linear"],["zoom"],2,9,5,17]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_country_1",type:"symbol",source:"openmaptiles","source-layer":"place",maxzoom:9,filter:["all",["==",["get","class"],"country"],["==",["get","rank"],1]],layout:{"text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Bold"],"text-max-width":6.25,"text-size":["interpolate",["linear"],["zoom"],1,9,4,17]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}}]},At=class At{constructor(e,t,a){u(this,"parameters",At.Parameters);u(this,"MapClass");u(this,"MapMarkerClass");u(this,"map");this.MapClass=e,this.MapMarkerClass=t,this.map=new this.MapClass({...a,projection:"mercator",pitchWithRotate:!1,customAttribution:a.customAttribution??"@arenarium/maps"}),this.map.dragRotate.disable(),this.map.keyboard.disable(),this.map.touchZoomRotate.disableRotation(),this.map.touchPitch.disable()}getMap(){return this.map}getContainer(){return this.map.getContainer()}getZoom(){return this.map.getZoom()}getBounds(){const e=this.map.getBounds();if(!e)return{sw:{lat:0,lng:0},ne:{lat:0,lng:0}};const t=e.getSouthWest(),a=e.getNorthEast();return{sw:t,ne:a}}panBy(e,t){this.map.panBy([e,t])}createMarker(e,t,a){const n=new this.MapMarkerClass({element:e});return n.setLngLat([a,t]),{instance:n,inserted:()=>n._map!=null,insert:()=>n.addTo(this.map),remove:()=>n.remove(),update:i=>n.getElement().style.zIndex=i.toString()}}};u(At,"Parameters",{mapSize:512,zoomMin:0,zoomMax:24,zoomScale:10});let br=At;const Nt=class Nt{constructor(e,t,a,n){u(this,"parameters",Nt.Parameters);u(this,"MapClass");u(this,"MapMarkerClass");u(this,"map");this.MapClass=e,this.MapMarkerClass=t,this.map=new this.MapClass(a,{...n})}getMap(){return this.map}getContainer(){return this.map.getDiv()}getZoom(){return this.map.getZoom()??NaN}getBounds(){const e=this.map.getBounds();if(e==null)return{sw:{lat:NaN,lng:NaN},ne:{lat:NaN,lng:NaN}};const t=e.getSouthWest(),a=e.getNorthEast();return{sw:{lat:t.lat(),lng:t.lng()},ne:{lat:a.lat(),lng:a.lng()}}}panBy(e,t){this.map.panBy(e,t)}createMarker(e,t,a,n){const i=new this.MapMarkerClass({position:{lat:t,lng:a},content:e,zIndex:n});return{instance:i,inserted:()=>i.map!=null&&i.map==this.map,insert:()=>i.map=this.map,remove:()=>i.map=void 0,update:s=>i.zIndex=s}}};u(Nt,"Parameters",{mapSize:256,zoomMin:0,zoomMax:22,zoomScale:10});let kr=Nt;const $i=[{elementType:"labels.icon",stylers:[{visibility:"off"}]},{stylers:[{saturation:-100},{lightness:-10}]},{featureType:"landscape",stylers:[{lightness:30}]},{featureType:"road",elementType:"geometry",stylers:[{saturation:-100}]}],qi=[{elementType:"labels.icon",stylers:[{visibility:"off"}]},{stylers:[{saturation:-100}]},{elementType:"geometry",stylers:[{lightness:-45}]},{elementType:"labels.text.fill",stylers:[{lightness:-100}]},{elementType:"labels.text.stroke",stylers:[{lightness:-15}]},{featureType:"water",elementType:"geometry",stylers:[{lightness:-50}]}];S.GoogleMapDarkStyle=qi,S.GoogleMapLightStyle=$i,S.GoogleMapsProvider=kr,S.MapManager=Zi,S.MapboxProvider=br,S.MaplibreDarkStyle=Vi,S.MaplibreLightStyle=Ui,S.MaplibreProvider=wr,Object.defineProperty(S,Symbol.toStringTag,{value:"Module"})});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var p=Object.defineProperty;var l=(o,t,a)=>t in o?p(o,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):o[t]=a;var r=(o,t,a)=>l(o,typeof t!="symbol"?t+"":t,a);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=class n{constructor(t,a,e){r(this,"parameters",n.Parameters);r(this,"MapClass");r(this,"MapMarkerClass");r(this,"map");this.MapClass=t,this.MapMarkerClass=a,this.map=new this.MapClass({...e,projection:"mercator",pitchWithRotate:!1,customAttribution:e.customAttribution??"@arenarium/maps"}),this.map.dragRotate.disable(),this.map.keyboard.disable(),this.map.touchZoomRotate.disableRotation(),this.map.touchPitch.disable()}getMap(){return this.map}getContainer(){return this.map.getContainer()}getZoom(){return this.map.getZoom()}getBounds(){const t=this.map.getBounds();if(!t)return{sw:{lat:0,lng:0},ne:{lat:0,lng:0}};const a=t.getSouthWest(),e=t.getNorthEast();return{sw:a,ne:e}}panBy(t,a){this.map.panBy([t,a])}createMarker(t,a,e){const s=new this.MapMarkerClass({element:t});return s.setLngLat([e,a]),{instance:s,inserted:()=>s._map!=null,insert:()=>s.addTo(this.map),remove:()=>s.remove(),update:m=>s.getElement().style.zIndex=m.toString()}}};r(n,"Parameters",{mapSize:512,zoomMin:0,zoomMax:24,zoomScale:10});let i=n;exports.MapboxProvider=i;
|
package/dist/mapbox.d.ts
ADDED
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
import { Map as Map_2 } from 'mapbox-gl';
|
|
2
|
+
import { MapOptions } from 'mapbox-gl';
|
|
3
|
+
import { Marker } from 'mapbox-gl';
|
|
4
|
+
import { MarkerOptions } from 'mapbox-gl';
|
|
5
|
+
import { z } from 'zod';
|
|
6
|
+
|
|
7
|
+
declare type MapBounds = z.infer<typeof mapBoundsSchema>;
|
|
8
|
+
|
|
9
|
+
declare const mapBoundsSchema: z.ZodObject<{
|
|
10
|
+
sw: z.ZodObject<{
|
|
11
|
+
lat: z.ZodNumber;
|
|
12
|
+
lng: z.ZodNumber;
|
|
13
|
+
}, "strip", z.ZodTypeAny, {
|
|
14
|
+
lat: number;
|
|
15
|
+
lng: number;
|
|
16
|
+
}, {
|
|
17
|
+
lat: number;
|
|
18
|
+
lng: number;
|
|
19
|
+
}>;
|
|
20
|
+
ne: z.ZodObject<{
|
|
21
|
+
lat: z.ZodNumber;
|
|
22
|
+
lng: z.ZodNumber;
|
|
23
|
+
}, "strip", z.ZodTypeAny, {
|
|
24
|
+
lat: number;
|
|
25
|
+
lng: number;
|
|
26
|
+
}, {
|
|
27
|
+
lat: number;
|
|
28
|
+
lng: number;
|
|
29
|
+
}>;
|
|
30
|
+
}, "strip", z.ZodTypeAny, {
|
|
31
|
+
sw: {
|
|
32
|
+
lat: number;
|
|
33
|
+
lng: number;
|
|
34
|
+
};
|
|
35
|
+
ne: {
|
|
36
|
+
lat: number;
|
|
37
|
+
lng: number;
|
|
38
|
+
};
|
|
39
|
+
}, {
|
|
40
|
+
sw: {
|
|
41
|
+
lat: number;
|
|
42
|
+
lng: number;
|
|
43
|
+
};
|
|
44
|
+
ne: {
|
|
45
|
+
lat: number;
|
|
46
|
+
lng: number;
|
|
47
|
+
};
|
|
48
|
+
}>;
|
|
49
|
+
|
|
50
|
+
declare interface MapboxMapClass {
|
|
51
|
+
new (options: MapOptions): Map_2;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
declare interface MapboxMarkerClass {
|
|
55
|
+
new (options: MarkerOptions): Marker;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export declare class MapboxProvider implements MapProvider {
|
|
59
|
+
static Parameters: MapProviderParameters;
|
|
60
|
+
parameters: MapProviderParameters;
|
|
61
|
+
private MapClass;
|
|
62
|
+
private MapMarkerClass;
|
|
63
|
+
private map;
|
|
64
|
+
constructor(mapClass: MapboxMapClass, mapMarkerClass: MapboxMarkerClass, options: MapOptions);
|
|
65
|
+
getMap(): Map_2;
|
|
66
|
+
getContainer(): HTMLElement;
|
|
67
|
+
getZoom(): number;
|
|
68
|
+
getBounds(): MapBounds;
|
|
69
|
+
panBy(x: number, y: number): void;
|
|
70
|
+
createMarker(element: HTMLElement, lat: number, lng: number): MapProviderMarker;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
declare type MapProvider = z.infer<typeof mapProviderSchema>;
|
|
74
|
+
|
|
75
|
+
declare type MapProviderMarker = z.infer<typeof mapProviderMarkerSchema>;
|
|
76
|
+
|
|
77
|
+
declare const mapProviderMarkerSchema: z.ZodObject<{
|
|
78
|
+
instance: z.ZodAny;
|
|
79
|
+
inserted: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodBoolean>;
|
|
80
|
+
insert: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodVoid>;
|
|
81
|
+
remove: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodVoid>;
|
|
82
|
+
update: z.ZodFunction<z.ZodTuple<[z.ZodNumber], z.ZodUnknown>, z.ZodVoid>;
|
|
83
|
+
}, "strip", z.ZodTypeAny, {
|
|
84
|
+
inserted: (...args: unknown[]) => boolean;
|
|
85
|
+
insert: (...args: unknown[]) => void;
|
|
86
|
+
remove: (...args: unknown[]) => void;
|
|
87
|
+
update: (args_0: number, ...args: unknown[]) => void;
|
|
88
|
+
instance?: any;
|
|
89
|
+
}, {
|
|
90
|
+
inserted: (...args: unknown[]) => boolean;
|
|
91
|
+
insert: (...args: unknown[]) => void;
|
|
92
|
+
remove: (...args: unknown[]) => void;
|
|
93
|
+
update: (args_0: number, ...args: unknown[]) => void;
|
|
94
|
+
instance?: any;
|
|
95
|
+
}>;
|
|
96
|
+
|
|
97
|
+
declare type MapProviderParameters = z.infer<typeof mapProviderParametersSchema>;
|
|
98
|
+
|
|
99
|
+
declare const mapProviderParametersSchema: z.ZodObject<{
|
|
100
|
+
mapSize: z.ZodNumber;
|
|
101
|
+
zoomMin: z.ZodNumber;
|
|
102
|
+
zoomMax: z.ZodNumber;
|
|
103
|
+
zoomScale: z.ZodNumber;
|
|
104
|
+
}, "strip", z.ZodTypeAny, {
|
|
105
|
+
mapSize: number;
|
|
106
|
+
zoomMin: number;
|
|
107
|
+
zoomMax: number;
|
|
108
|
+
zoomScale: number;
|
|
109
|
+
}, {
|
|
110
|
+
mapSize: number;
|
|
111
|
+
zoomMin: number;
|
|
112
|
+
zoomMax: number;
|
|
113
|
+
zoomScale: number;
|
|
114
|
+
}>;
|
|
115
|
+
|
|
116
|
+
declare const mapProviderSchema: z.ZodObject<{
|
|
117
|
+
parameters: z.ZodObject<{
|
|
118
|
+
mapSize: z.ZodNumber;
|
|
119
|
+
zoomMin: z.ZodNumber;
|
|
120
|
+
zoomMax: z.ZodNumber;
|
|
121
|
+
zoomScale: z.ZodNumber;
|
|
122
|
+
}, "strip", z.ZodTypeAny, {
|
|
123
|
+
mapSize: number;
|
|
124
|
+
zoomMin: number;
|
|
125
|
+
zoomMax: number;
|
|
126
|
+
zoomScale: number;
|
|
127
|
+
}, {
|
|
128
|
+
mapSize: number;
|
|
129
|
+
zoomMin: number;
|
|
130
|
+
zoomMax: number;
|
|
131
|
+
zoomScale: number;
|
|
132
|
+
}>;
|
|
133
|
+
getContainer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodEffects<z.ZodAny, HTMLElement, any>>;
|
|
134
|
+
getZoom: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodNumber>;
|
|
135
|
+
getBounds: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodObject<{
|
|
136
|
+
sw: z.ZodObject<{
|
|
137
|
+
lat: z.ZodNumber;
|
|
138
|
+
lng: z.ZodNumber;
|
|
139
|
+
}, "strip", z.ZodTypeAny, {
|
|
140
|
+
lat: number;
|
|
141
|
+
lng: number;
|
|
142
|
+
}, {
|
|
143
|
+
lat: number;
|
|
144
|
+
lng: number;
|
|
145
|
+
}>;
|
|
146
|
+
ne: z.ZodObject<{
|
|
147
|
+
lat: z.ZodNumber;
|
|
148
|
+
lng: z.ZodNumber;
|
|
149
|
+
}, "strip", z.ZodTypeAny, {
|
|
150
|
+
lat: number;
|
|
151
|
+
lng: number;
|
|
152
|
+
}, {
|
|
153
|
+
lat: number;
|
|
154
|
+
lng: number;
|
|
155
|
+
}>;
|
|
156
|
+
}, "strip", z.ZodTypeAny, {
|
|
157
|
+
sw: {
|
|
158
|
+
lat: number;
|
|
159
|
+
lng: number;
|
|
160
|
+
};
|
|
161
|
+
ne: {
|
|
162
|
+
lat: number;
|
|
163
|
+
lng: number;
|
|
164
|
+
};
|
|
165
|
+
}, {
|
|
166
|
+
sw: {
|
|
167
|
+
lat: number;
|
|
168
|
+
lng: number;
|
|
169
|
+
};
|
|
170
|
+
ne: {
|
|
171
|
+
lat: number;
|
|
172
|
+
lng: number;
|
|
173
|
+
};
|
|
174
|
+
}>>;
|
|
175
|
+
panBy: z.ZodFunction<z.ZodTuple<[z.ZodNumber, z.ZodNumber], z.ZodUnknown>, z.ZodVoid>;
|
|
176
|
+
createMarker: z.ZodFunction<z.ZodTuple<[z.ZodEffects<z.ZodAny, HTMLElement, any>, z.ZodNumber, z.ZodNumber, z.ZodNumber], z.ZodUnknown>, z.ZodObject<{
|
|
177
|
+
instance: z.ZodAny;
|
|
178
|
+
inserted: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodBoolean>;
|
|
179
|
+
insert: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodVoid>;
|
|
180
|
+
remove: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodVoid>;
|
|
181
|
+
update: z.ZodFunction<z.ZodTuple<[z.ZodNumber], z.ZodUnknown>, z.ZodVoid>;
|
|
182
|
+
}, "strip", z.ZodTypeAny, {
|
|
183
|
+
inserted: (...args: unknown[]) => boolean;
|
|
184
|
+
insert: (...args: unknown[]) => void;
|
|
185
|
+
remove: (...args: unknown[]) => void;
|
|
186
|
+
update: (args_0: number, ...args: unknown[]) => void;
|
|
187
|
+
instance?: any;
|
|
188
|
+
}, {
|
|
189
|
+
inserted: (...args: unknown[]) => boolean;
|
|
190
|
+
insert: (...args: unknown[]) => void;
|
|
191
|
+
remove: (...args: unknown[]) => void;
|
|
192
|
+
update: (args_0: number, ...args: unknown[]) => void;
|
|
193
|
+
instance?: any;
|
|
194
|
+
}>>;
|
|
195
|
+
}, "strip", z.ZodTypeAny, {
|
|
196
|
+
parameters: {
|
|
197
|
+
mapSize: number;
|
|
198
|
+
zoomMin: number;
|
|
199
|
+
zoomMax: number;
|
|
200
|
+
zoomScale: number;
|
|
201
|
+
};
|
|
202
|
+
getContainer: (...args: unknown[]) => HTMLElement;
|
|
203
|
+
getZoom: (...args: unknown[]) => number;
|
|
204
|
+
getBounds: (...args: unknown[]) => {
|
|
205
|
+
sw: {
|
|
206
|
+
lat: number;
|
|
207
|
+
lng: number;
|
|
208
|
+
};
|
|
209
|
+
ne: {
|
|
210
|
+
lat: number;
|
|
211
|
+
lng: number;
|
|
212
|
+
};
|
|
213
|
+
};
|
|
214
|
+
panBy: (args_0: number, args_1: number, ...args: unknown[]) => void;
|
|
215
|
+
createMarker: (args_0: any, args_1: number, args_2: number, args_3: number, ...args: unknown[]) => {
|
|
216
|
+
inserted: (...args: unknown[]) => boolean;
|
|
217
|
+
insert: (...args: unknown[]) => void;
|
|
218
|
+
remove: (...args: unknown[]) => void;
|
|
219
|
+
update: (args_0: number, ...args: unknown[]) => void;
|
|
220
|
+
instance?: any;
|
|
221
|
+
};
|
|
222
|
+
}, {
|
|
223
|
+
parameters: {
|
|
224
|
+
mapSize: number;
|
|
225
|
+
zoomMin: number;
|
|
226
|
+
zoomMax: number;
|
|
227
|
+
zoomScale: number;
|
|
228
|
+
};
|
|
229
|
+
getContainer: (...args: unknown[]) => any;
|
|
230
|
+
getZoom: (...args: unknown[]) => number;
|
|
231
|
+
getBounds: (...args: unknown[]) => {
|
|
232
|
+
sw: {
|
|
233
|
+
lat: number;
|
|
234
|
+
lng: number;
|
|
235
|
+
};
|
|
236
|
+
ne: {
|
|
237
|
+
lat: number;
|
|
238
|
+
lng: number;
|
|
239
|
+
};
|
|
240
|
+
};
|
|
241
|
+
panBy: (args_0: number, args_1: number, ...args: unknown[]) => void;
|
|
242
|
+
createMarker: (args_0: HTMLElement, args_1: number, args_2: number, args_3: number, ...args: unknown[]) => {
|
|
243
|
+
inserted: (...args: unknown[]) => boolean;
|
|
244
|
+
insert: (...args: unknown[]) => void;
|
|
245
|
+
remove: (...args: unknown[]) => void;
|
|
246
|
+
update: (args_0: number, ...args: unknown[]) => void;
|
|
247
|
+
instance?: any;
|
|
248
|
+
};
|
|
249
|
+
}>;
|
|
250
|
+
|
|
251
|
+
export { }
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
var p = Object.defineProperty;
|
|
2
|
+
var h = (n, t, a) => t in n ? p(n, t, { enumerable: !0, configurable: !0, writable: !0, value: a }) : n[t] = a;
|
|
3
|
+
var r = (n, t, a) => h(n, typeof t != "symbol" ? t + "" : t, a);
|
|
4
|
+
const o = class o {
|
|
5
|
+
constructor(t, a, e) {
|
|
6
|
+
r(this, "parameters", o.Parameters);
|
|
7
|
+
r(this, "MapClass");
|
|
8
|
+
r(this, "MapMarkerClass");
|
|
9
|
+
r(this, "map");
|
|
10
|
+
this.MapClass = t, this.MapMarkerClass = a, this.map = new this.MapClass({
|
|
11
|
+
...e,
|
|
12
|
+
projection: "mercator",
|
|
13
|
+
pitchWithRotate: !1,
|
|
14
|
+
customAttribution: e.customAttribution ?? "@arenarium/maps"
|
|
15
|
+
}), this.map.dragRotate.disable(), this.map.keyboard.disable(), this.map.touchZoomRotate.disableRotation(), this.map.touchPitch.disable();
|
|
16
|
+
}
|
|
17
|
+
getMap() {
|
|
18
|
+
return this.map;
|
|
19
|
+
}
|
|
20
|
+
getContainer() {
|
|
21
|
+
return this.map.getContainer();
|
|
22
|
+
}
|
|
23
|
+
getZoom() {
|
|
24
|
+
return this.map.getZoom();
|
|
25
|
+
}
|
|
26
|
+
getBounds() {
|
|
27
|
+
const t = this.map.getBounds();
|
|
28
|
+
if (!t) return { sw: { lat: 0, lng: 0 }, ne: { lat: 0, lng: 0 } };
|
|
29
|
+
const a = t.getSouthWest(), e = t.getNorthEast();
|
|
30
|
+
return { sw: a, ne: e };
|
|
31
|
+
}
|
|
32
|
+
panBy(t, a) {
|
|
33
|
+
this.map.panBy([t, a]);
|
|
34
|
+
}
|
|
35
|
+
createMarker(t, a, e) {
|
|
36
|
+
const s = new this.MapMarkerClass({ element: t });
|
|
37
|
+
return s.setLngLat([e, a]), {
|
|
38
|
+
instance: s,
|
|
39
|
+
inserted: () => s._map != null,
|
|
40
|
+
insert: () => s.addTo(this.map),
|
|
41
|
+
remove: () => s.remove(),
|
|
42
|
+
update: (m) => s.getElement().style.zIndex = m.toString()
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
r(o, "Parameters", {
|
|
47
|
+
mapSize: 512,
|
|
48
|
+
zoomMin: 0,
|
|
49
|
+
zoomMax: 24,
|
|
50
|
+
zoomScale: 10
|
|
51
|
+
});
|
|
52
|
+
let i = o;
|
|
53
|
+
export {
|
|
54
|
+
i as MapboxProvider
|
|
55
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arenarium/maps",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.163",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "arenarium.dev",
|
|
6
6
|
"description": "The best way to visualize ranked markers on a map.",
|
|
@@ -30,6 +30,12 @@
|
|
|
30
30
|
"import": "./dist/maplibre.es.js",
|
|
31
31
|
"require": "./dist/maplibre.cjs.js"
|
|
32
32
|
},
|
|
33
|
+
"./mapbox": {
|
|
34
|
+
"types": "./dist/mapbox.d.ts",
|
|
35
|
+
"svelte": "./dist/mapbox.es.js",
|
|
36
|
+
"import": "./dist/mapbox.es.js",
|
|
37
|
+
"require": "./dist/mapbox.cjs.js"
|
|
38
|
+
},
|
|
33
39
|
"./google": {
|
|
34
40
|
"types": "./dist/google.d.ts",
|
|
35
41
|
"svelte": "./dist/google.es.js",
|