@arenarium/maps 1.0.213 → 1.0.214
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.js +1 -1
- package/dist/main.cjs.js +1 -1
- package/dist/main.es.js +1 -1
- package/dist/mapbox.cjs.js +1 -1
- package/dist/mapbox.es.js +26 -21
- package/dist/maplibre.cjs.js +1 -1
- package/dist/maplibre.es.js +22 -14
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(z,N){typeof exports=="object"&&typeof module<"u"?N(exports):typeof define=="function"&&define.amd?define(["exports"],N):(z=typeof globalThis<"u"?globalThis:z||self,N(z.arenarium={}))})(this,(function(z){"use strict";var Uo=Object.defineProperty;var vn=z=>{throw TypeError(z)};var $o=(z,N,I)=>N in z?Uo(z,N,{enumerable:!0,configurable:!0,writable:!0,value:I}):z[N]=I;var p=(z,N,I)=>$o(z,typeof N!="symbol"?N+"":N,I),Gr=(z,N,I)=>N.has(z)||vn("Cannot "+I);var k=(z,N,I)=>(Gr(z,N,"read from private field"),I?I.call(z):N.get(z)),D=(z,N,I)=>N.has(z)?vn("Cannot add the same private member more than once"):N instanceof WeakSet?N.add(z):N.set(z,I),U=(z,N,I,jt)=>(Gr(z,N,"write to private field"),jt?jt.call(z,I):N.set(z,I),I),Ue=(z,N,I)=>(Gr(z,N,"access private method"),I);var Tt,ot,Ne,At,Nt,Fe,st,Be,Le,lt,Lt,Pt,oe,xn,nr,Xr,fn,ge,ct,Rt,Ve;var I=Array.isArray,jt=Array.prototype.indexOf,wn=Array.from,ir=Object.defineProperty,ht=Object.getOwnPropertyDescriptor,bn=Object.prototype,kn=Array.prototype,Sn=Object.getPrototypeOf,Jr=Object.isExtensible;function zn(r){for(var e=0;e<r.length;e++)r[e]()}function Mn(){var r,e,t=new Promise((a,n)=>{r=a,e=n});return{promise:t,resolve:r,reject:e}}const J=2,or=4,Kr=8,mt=16,ve=32,Re=64,Qr=128,ee=256,It=512,G=1024,le=2048,xe=4096,$e=8192,qe=16384,sr=32768,En=65536,ea=1<<17,Cn=1<<18,yt=1<<19,Tn=1<<20,lr=1<<21,cr=1<<22,Oe=1<<23,Zt=Symbol("$state"),ur=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 An(){throw new Error("https://svelte.dev/e/await_outside_boundary")}function Nn(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Ln(r){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Pn(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Rn(r){throw new Error("https://svelte.dev/e/effect_orphan")}function On(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function jn(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function In(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Zn(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}const Dn=2,B=Symbol();function ta(r){return r===this.v}let qo=!1,ne=null;function Dt(r){ne=r}function dr(r,e=!1,t){ne={p:ne,c:null,e:null,s:r,x:null,l:null}}function pr(r){var e=ne,t=e.e;if(t!==null){e.e=null;for(var a of t)va(a)}return r!==void 0&&(e.x=r),ne=e.p,r??{}}function ra(){return!0}const Fn=new WeakMap;function Bn(r){var e=T;if(e===null)return M.f|=Oe,r;if((e.f&sr)===0){if((e.f&Qr)===0)throw!e.parent&&r instanceof Error&&aa(r),r;e.b.error(r)}else fr(r,e)}function fr(r,e){for(;e!==null;){if((e.f&Qr)!==0)try{e.b.error(r);return}catch(t){r=t}e=e.parent}throw r instanceof Error&&aa(r),r}function aa(r){const e=Fn.get(r);e&&(ir(r,"message",{value:e.message}),ir(r,"stack",{value:e.stack}))}let We=[];function Vn(){var r=We;We=[],zn(r)}function na(r){if(We.length===0){var e=We;queueMicrotask(()=>{e===We&&Vn()})}We.push(r)}function Un(){const r=T.b;return r===null&&An(),r}function $n(r){var e=J|le,t=M!==null&&(M.f&J)!==0?M:null;return T===null||t!==null&&(t.f&ee)!==0?e|=ee:T.f|=yt,{ctx:ne,deps:null,effects:null,equals:ta,f:e,fn:r,reactions:null,rv:0,v:B,wv:0,parent:t??T,ac:null}}function qn(r,e){let t=T;t===null&&Nn();var a=t.b,n=void 0,i=ua(B),o=null,s=!M;return ni(()=>{try{var l=r();o&&Promise.resolve(l).catch(()=>{})}catch(m){l=Promise.reject(m)}var c=()=>l;n=(o==null?void 0:o.then(c,c))??Promise.resolve(l),o=n;var u=$,h=a.is_pending();s&&(a.update_pending_count(1),h||u.increment());const _=(m,v=void 0)=>{o=null,h||u.activate(),v?v!==ur&&(i.f|=Oe,_r(i,v)):((i.f&Oe)!==0&&(i.f^=Oe),_r(i,m)),s&&(a.update_pending_count(-1),h||u.decrement()),sa()};if(n.then(_,m=>_(null,m||"unknown")),u)return()=>{queueMicrotask(()=>u.neuter())}}),new Promise(l=>{function c(u){function h(){u===n?l(i):c(n)}u.then(h,h)}c(n)})}function ia(r){var e=r.effects;if(e!==null){r.effects=null;for(var t=0;t<e.length;t+=1)Ie(e[t])}}function Wn(r){for(var e=r.parent;e!==null;){if((e.f&J)===0)return e;e=e.parent}return null}function hr(r){var e,t=T;be(Wn(r));try{ia(r),e=La(r)}finally{be(t)}return e}function oa(r){var e=hr(r);if(r.equals(e)||(r.v=e,r.wv=Aa()),!Ye){var t=(ke||(r.f&ee)!==0)&&r.deps!==null?xe:G;re(r,t)}}function Hn(r,e,t){const a=$n;if(e.length===0){t(r.map(a));return}var n=$,i=T,o=Yn(),s=Un();Promise.all(e.map(l=>qn(l))).then(l=>{n==null||n.activate(),o();try{t([...r.map(a),...l])}catch(c){(i.f&qe)===0&&fr(c,i)}n==null||n.deactivate(),sa()}).catch(l=>{s.error(l)})}function Yn(){var r=T,e=M,t=ne,a=$;return function(){be(r),de(e),Dt(t),a==null||a.activate()}}function sa(){be(null),de(null),Dt(null)}const mr=new Set;let $=null,la=new Set,gt=[],yr=null,gr=!1;const Jt=class Jt{constructor(){D(this,oe);p(this,"current",new Map);D(this,Tt,new Map);D(this,ot,new Set);D(this,Ne,0);D(this,At,null);D(this,Nt,!1);D(this,Fe,[]);D(this,st,[]);D(this,Be,[]);D(this,Le,[]);D(this,lt,[]);D(this,Lt,[]);D(this,Pt,[]);p(this,"skipped_effects",new Set)}process(e){var n;gt=[];for(const i of e)Ue(this,oe,xn).call(this,i);if(k(this,Fe).length===0&&k(this,Ne)===0){Ue(this,oe,Xr).call(this);var t=k(this,Be),a=k(this,Le);U(this,Be,[]),U(this,Le,[]),U(this,lt,[]),$=null,ca(t),ca(a),$===null?$=this:mr.delete(this),(n=k(this,At))==null||n.resolve()}else Ue(this,oe,nr).call(this,k(this,Be)),Ue(this,oe,nr).call(this,k(this,Le)),Ue(this,oe,nr).call(this,k(this,lt));for(const i of k(this,Fe))Ge(i);for(const i of k(this,st))Ge(i);U(this,Fe,[]),U(this,st,[])}capture(e,t){k(this,Tt).has(e)||k(this,Tt).set(e,t),this.current.set(e,e.v)}activate(){$=this}deactivate(){$=null;for(const e of la)if(la.delete(e),e(),$!==null)break}neuter(){U(this,Nt,!0)}flush(){gt.length>0?Gn():Ue(this,oe,Xr).call(this),$===this&&(k(this,Ne)===0&&mr.delete(this),this.deactivate())}increment(){U(this,Ne,k(this,Ne)+1)}decrement(){if(U(this,Ne,k(this,Ne)-1),k(this,Ne)===0){for(const e of k(this,Lt))re(e,le),vt(e);for(const e of k(this,Pt))re(e,xe),vt(e);U(this,Be,[]),U(this,Le,[]),this.flush()}else this.deactivate()}add_callback(e){k(this,ot).add(e)}settled(){return(k(this,At)??U(this,At,Mn())).promise}static ensure(){if($===null){const e=$=new Jt;mr.add($),Jt.enqueue(()=>{$===e&&e.flush()})}return $}static enqueue(e){na(e)}};Tt=new WeakMap,ot=new WeakMap,Ne=new WeakMap,At=new WeakMap,Nt=new WeakMap,Fe=new WeakMap,st=new WeakMap,Be=new WeakMap,Le=new WeakMap,lt=new WeakMap,Lt=new WeakMap,Pt=new WeakMap,oe=new WeakSet,xn=function(e){var u;e.f^=G;for(var t=e.first;t!==null;){var a=t.f,n=(a&(ve|Re))!==0,i=n&&(a&G)!==0,o=i||(a&$e)!==0||this.skipped_effects.has(t);if(!o&&t.fn!==null){if(n)t.f^=G;else if((a&or)!==0)k(this,Le).push(t);else if((a&G)===0)if((a&cr)!==0){var s=(u=t.b)!=null&&u.is_pending()?k(this,st):k(this,Fe);s.push(t)}else Ft(t)&&((t.f&mt)!==0&&k(this,lt).push(t),Ge(t));var l=t.first;if(l!==null){t=l;continue}}var c=t.parent;for(t=t.next;t===null&&c!==null;)t=c.next,c=c.parent}},nr=function(e){for(const t of e)((t.f&le)!==0?k(this,Lt):k(this,Pt)).push(t),re(t,G);e.length=0},Xr=function(){if(!k(this,Nt))for(const e of k(this,ot))e();k(this,ot).clear()};let _t=Jt;function Gn(){var r=He;gr=!0;try{var e=0;for(Ma(!0);gt.length>0;){var t=_t.ensure();if(e++>1e3){var a,n;Xn()}t.process(gt),we.clear()}}finally{gr=!1,Ma(r),yr=null}}function Xn(){try{On()}catch(r){fr(r,yr)}}let me=null;function ca(r){var e=r.length;if(e!==0){for(var t=0;t<e;){var a=r[t++];if((a.f&(qe|$e))===0&&Ft(a)&&(me=[],Ge(a),a.deps===null&&a.first===null&&a.nodes_start===null&&(a.teardown===null&&a.ac===null?Sa(a):a.fn=null),(me==null?void 0:me.length)>0)){we.clear();for(const n of me)Ge(n);me=[]}}me=null}}function vt(r){for(var e=yr=r;e.parent!==null;){e=e.parent;var t=e.f;if(gr&&e===T&&(t&mt)!==0)return;if((t&(Re|ve))!==0){if((t&G)===0)return;e.f^=G}}gt.push(e)}const we=new Map;function ua(r,e){var t={f:0,v:r,reactions:null,equals:ta,rv:0,wv:0};return t}function q(r,e){const t=ua(r);return ui(t),t}function V(r,e,t=!1){M!==null&&(!ue||(M.f&ea)!==0)&&ra()&&(M.f&(J|mt|cr|ea))!==0&&!(W!=null&&W.includes(r))&&Zn();let a=t?xt(e):e;return _r(r,a)}function _r(r,e){if(!r.equals(e)){var t=r.v;Ye?we.set(r,e):we.set(r,t),r.v=e;var a=_t.ensure();a.capture(r,t),(r.f&J)!==0&&((r.f&le)!==0&&hr(r),re(r,(r.f&ee)===0?G:xe)),r.wv=Aa(),da(r,le),T!==null&&(T.f&G)!==0&&(T.f&(ve|Re))===0&&(te===null?di([r]):te.push(r))}return e}function vr(r){V(r,r.v+1)}function da(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,s=(o&le)===0;s&&re(i,e),(o&J)!==0?da(i,xe):s&&((o&mt)!==0&&me!==null&&me.push(i),vt(i))}}function xt(r){if(typeof r!="object"||r===null||Zt in r)return r;const e=Sn(r);if(e!==bn&&e!==kn)return r;var t=new Map,a=I(r),n=q(0),i=Ze,o=s=>{if(Ze===i)return s();var l=M,c=Ze;de(null),Ta(i);var u=s();return de(l),Ta(c),u};return a&&t.set("length",q(r.length)),new Proxy(r,{defineProperty(s,l,c){(!("value"in c)||c.configurable===!1||c.enumerable===!1||c.writable===!1)&&jn();var u=t.get(l);return u===void 0?u=o(()=>{var h=q(c.value);return t.set(l,h),h}):V(u,c.value,!0),!0},deleteProperty(s,l){var c=t.get(l);if(c===void 0){if(l in s){const u=o(()=>q(B));t.set(l,u),vr(n)}}else V(c,B),vr(n);return!0},get(s,l,c){var m;if(l===Zt)return r;var u=t.get(l),h=l in s;if(u===void 0&&(!h||(m=ht(s,l))!=null&&m.writable)&&(u=o(()=>{var v=xt(h?s[l]:B),O=q(v);return O}),t.set(l,u)),u!==void 0){var _=P(u);return _===B?void 0:_}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=P(u))}else if(c===void 0){var h=t.get(l),_=h==null?void 0:h.v;if(h!==void 0&&_!==B)return{enumerable:!0,configurable:!0,value:_,writable:!0}}return c},has(s,l){var _;if(l===Zt)return!0;var c=t.get(l),u=c!==void 0&&c.v!==B||Reflect.has(s,l);if(c!==void 0||T!==null&&(!u||(_=ht(s,l))!=null&&_.writable)){c===void 0&&(c=o(()=>{var m=u?xt(s[l]):B,v=q(m);return v}),t.set(l,c));var h=P(c);if(h===B)return!1}return u},set(s,l,c,u){var F;var h=t.get(l),_=l in s;if(a&&l==="length")for(var m=c;m<h.v;m+=1){var v=t.get(m+"");v!==void 0?V(v,B):m in s&&(v=o(()=>q(B)),t.set(m+"",v))}if(h===void 0)(!_||(F=ht(s,l))!=null&&F.writable)&&(h=o(()=>q(void 0)),V(h,xt(c)),t.set(l,h));else{_=h.v!==B;var O=o(()=>xt(c));V(h,O)}var Y=Reflect.getOwnPropertyDescriptor(s,l);if(Y!=null&&Y.set&&Y.set.call(u,c),!_){if(a&&typeof l=="string"){var se=t.get("length"),L=Number(l);Number.isInteger(L)&&L>=se.v&&V(se,L+1)}vr(n)}return!0},ownKeys(s){P(n);var l=Reflect.ownKeys(s).filter(h=>{var _=t.get(h);return _===void 0||_.v!==B});for(var[c,u]of t)u.v!==B&&!(c in s)&&l.push(c);return l},setPrototypeOf(){In()}})}var pa,fa,ha,ma;function Jn(){if(pa===void 0){pa=window,fa=/Firefox/.test(navigator.userAgent);var r=Element.prototype,e=Node.prototype,t=Text.prototype;ha=ht(e,"firstChild").get,ma=ht(e,"nextSibling").get,Jr(r)&&(r.__click=void 0,r.__className=void 0,r.__attributes=null,r.__style=void 0,r.__e=void 0),Jr(t)&&(t.__t=void 0)}}function Kn(r=""){return document.createTextNode(r)}function ya(r){return ha.call(r)}function ga(r){return ma.call(r)}function xr(r,e){return ya(r)}function Qn(r,e=1,t=!1){let a=r;for(;e--;)a=ga(a);return a}function _a(r){var e=M,t=T;de(null),be(null);try{return r()}finally{de(e),be(t)}}function ei(r){T===null&&M===null&&Rn(),M!==null&&(M.f&ee)!==0&&T===null&&Pn(),Ye&&Ln()}function ti(r,e){var t=e.last;t===null?e.last=e.first=r:(t.next=r,r.prev=t,e.last=r)}function je(r,e,t,a=!0){var n=T;n!==null&&(n.f&$e)!==0&&(r|=$e);var i={ctx:ne,deps:null,nodes_start:null,nodes_end:null,f:r|le,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{Ge(i),i.f|=sr}catch(l){throw Ie(i),l}else e!==null&&vt(i);if(a){var o=i;if(t&&o.deps===null&&o.teardown===null&&o.nodes_start===null&&o.first===o.last&&(o.f&yt)===0&&(o=o.first),o!==null&&(o.parent=n,n!==null&&ti(o,n),M!==null&&(M.f&J)!==0&&(r&Re)===0)){var s=M;(s.effects??(s.effects=[])).push(o)}}return i}function ce(r){ei();var e=T.f,t=!M&&(e&ve)!==0&&(e&sr)===0;if(t){var a=ne;(a.e??(a.e=[])).push(r)}else return va(r)}function va(r){return je(or|Tn,r,!1)}function ri(r){_t.ensure();const e=je(Re|yt,r,!0);return(t={})=>new Promise(a=>{t.outro?li(e,()=>{Ie(e),a(void 0)}):(Ie(e),a(void 0))})}function ai(r){return je(or,r,!1)}function ni(r){return je(cr|yt,r,!0)}function xa(r,e=0){return je(Kr|e,r,!0)}function wa(r,e=[],t=[]){Hn(e,t,a=>{je(Kr,()=>r(...a.map(P)),!0)})}function ii(r,e=!0){return je(ve|yt,r,!0,e)}function ba(r){var e=r.teardown;if(e!==null){const t=Ye,a=M;Ea(!0),de(null);try{e.call(null)}finally{Ea(t),de(a)}}}function ka(r,e=!1){var t=r.first;for(r.first=r.last=null;t!==null;){const n=t.ac;n!==null&&_a(()=>{n.abort(ur)});var a=t.next;(t.f&Re)!==0?t.parent=null:Ie(t,e),t=a}}function oi(r){for(var e=r.first;e!==null;){var t=e.next;(e.f&ve)===0&&Ie(e),e=t}}function Ie(r,e=!0){var t=!1;(e||(r.f&Cn)!==0)&&r.nodes_start!==null&&r.nodes_end!==null&&(si(r.nodes_start,r.nodes_end),t=!0),ka(r,e&&!t),Bt(r,0),re(r,qe);var a=r.transitions;if(a!==null)for(const i of a)i.stop();ba(r);var n=r.parent;n!==null&&n.first!==null&&Sa(r),r.next=r.prev=r.teardown=r.ctx=r.deps=r.fn=r.nodes_start=r.nodes_end=r.ac=null}function si(r,e){for(;r!==null;){var t=r===e?null:ga(r);r.remove(),r=t}}function Sa(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 li(r,e){var t=[];za(r,t,!0),ci(t,()=>{Ie(r),e&&e()})}function ci(r,e){var t=r.length;if(t>0){var a=()=>--t||e();for(var n of r)n.out(a)}else e()}function za(r,e,t){if((r.f&$e)===0){if(r.f^=$e,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&En)!==0||(a.f&ve)!==0;za(a,e,i?t:!1),a=n}}}let He=!1;function Ma(r){He=r}let Ye=!1;function Ea(r){Ye=r}let M=null,ue=!1;function de(r){M=r}let T=null;function be(r){T=r}let W=null;function ui(r){M!==null&&(W===null?W=[r]:W.push(r))}let H=null,K=0,te=null;function di(r){te=r}let Ca=1,wt=0,Ze=wt;function Ta(r){Ze=r}let ke=!1;function Aa(){return++Ca}function Ft(r){var h;var e=r.f;if((e&le)!==0)return!0;if((e&xe)!==0){var t=r.deps,a=(e&ee)!==0;if(t!==null){var n,i,o=(e&It)!==0,s=a&&T!==null&&!ke,l=t.length;if((o||s)&&(T===null||(T.f&qe)===0)){var c=r,u=c.parent;for(n=0;n<l;n++)i=t[n],(o||!((h=i==null?void 0:i.reactions)!=null&&h.includes(c)))&&(i.reactions??(i.reactions=[])).push(c);o&&(c.f^=It),s&&u!==null&&(u.f&ee)===0&&(c.f^=ee)}for(n=0;n<l;n++)if(i=t[n],Ft(i)&&oa(i),i.wv>r.wv)return!0}(!a||T!==null&&!ke)&&re(r,G)}return!1}function Na(r,e,t=!0){var a=r.reactions;if(a!==null&&!(W!=null&&W.includes(r)))for(var n=0;n<a.length;n++){var i=a[n];(i.f&J)!==0?Na(i,e,!1):e===i&&(t?re(i,le):(i.f&G)!==0&&re(i,xe),vt(i))}}function La(r){var O;var e=H,t=K,a=te,n=M,i=ke,o=W,s=ne,l=ue,c=Ze,u=r.f;H=null,K=0,te=null,ke=(u&ee)!==0&&(ue||!He||M===null),M=(u&(ve|Re))===0?r:null,W=null,Dt(r.ctx),ue=!1,Ze=++wt,r.ac!==null&&(_a(()=>{r.ac.abort(ur)}),r.ac=null);try{r.f|=lr;var h=r.fn,_=h(),m=r.deps;if(H!==null){var v;if(Bt(r,K),m!==null&&K>0)for(m.length=K+H.length,v=0;v<H.length;v++)m[K+v]=H[v];else r.deps=m=H;if(!ke||(u&J)!==0&&r.reactions!==null)for(v=K;v<m.length;v++)((O=m[v]).reactions??(O.reactions=[])).push(r)}else m!==null&&K<m.length&&(Bt(r,K),m.length=K);if(ra()&&te!==null&&!ue&&m!==null&&(r.f&(J|xe|le))===0)for(v=0;v<te.length;v++)Na(te[v],r);return n!==null&&n!==r&&(wt++,te!==null&&(a===null?a=te:a.push(...te))),(r.f&Oe)!==0&&(r.f^=Oe),_}catch(Y){return Bn(Y)}finally{r.f^=lr,H=e,K=t,te=a,M=n,ke=i,W=o,Dt(s),ue=l,Ze=c}}function pi(r,e){let t=e.reactions;if(t!==null){var a=jt.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&J)!==0&&(H===null||!H.includes(e))&&(re(e,xe),(e.f&(ee|It))===0&&(e.f^=It),ia(e),Bt(e,0))}function Bt(r,e){var t=r.deps;if(t!==null)for(var a=e;a<t.length;a++)pi(r,t[a])}function Ge(r){var e=r.f;if((e&qe)===0){re(r,G);var t=T,a=He;T=r,He=!0;try{(e&mt)!==0?oi(r):ka(r),ba(r);var n=La(r);r.teardown=typeof n=="function"?n:null,r.wv=Ca;var i}finally{He=a,T=t}}}function P(r){var e=r.f,t=(e&J)!==0;if(M!==null&&!ue){var a=T!==null&&(T.f&qe)!==0;if(!a&&!(W!=null&&W.includes(r))){var n=M.deps;if((M.f&lr)!==0)r.rv<wt&&(r.rv=wt,H===null&&n!==null&&n[K]===r?K++:H===null?H=[r]:(!ke||!H.includes(r))&&H.push(r));else{(M.deps??(M.deps=[])).push(r);var i=r.reactions;i===null?r.reactions=[M]:i.includes(M)||i.push(M)}}}else if(t&&r.deps===null&&r.effects===null){var o=r,s=o.parent;s!==null&&(s.f&ee)===0&&(o.f^=ee)}if(Ye){if(we.has(r))return we.get(r);if(t){o=r;var l=o.v;return((o.f&G)===0&&o.reactions!==null||Pa(o))&&(l=hr(o)),we.set(o,l),l}}else t&&(o=r,Ft(o)&&oa(o));if((r.f&Oe)!==0)throw r.v;return r.v}function Pa(r){if(r.v===B)return!0;if(r.deps===null)return!1;for(const e of r.deps)if(we.has(e)||(e.f&J)!==0&&Pa(e))return!0;return!1}function fi(r){var e=ue;try{return ue=!0,r()}finally{ue=e}}const hi=-7169;function re(r,e){r.f=r.f&hi|e}const mi=["touchstart","touchmove"];function yi(r){return mi.includes(r)}const gi=new Set,Ra=new Set;let Oa=null;function Vt(r){var L;var e=this,t=e.ownerDocument,a=r.type,n=((L=r.composedPath)==null?void 0:L.call(r))||[],i=n[0]||r.target;Oa=r;var o=0,s=Oa===r&&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){ir(r,"currentTarget",{configurable:!0,get(){return i||t}});var u=M,h=T;de(null),be(null);try{for(var _,m=[];i!==null;){var v=i.assignedSlot||i.parentNode||i.host||null;try{var O=i["__"+a];if(O!=null&&(!i.disabled||r.target===i))if(I(O)){var[Y,...se]=O;Y.apply(i,[r,...se])}else O.call(i,r)}catch(F){_?m.push(F):_=F}if(r.cancelBubble||v===e||v===null)break;i=v}if(_){for(let F of m)queueMicrotask(()=>{throw F});throw _}}finally{r.__root=e,delete r.currentTarget,de(u),be(h)}}}function _i(r){var e=document.createElement("template");return e.innerHTML=r.replaceAll("<!>","<!---->"),e.content}function vi(r,e){var t=T;t.nodes_start===null&&(t.nodes_start=r,t.nodes_end=e)}function ja(r,e){var t=(e&Dn)!==0,a,n=!r.startsWith("<!>");return()=>{a===void 0&&(a=_i(n?r:"<!>"+r),a=ya(a));var i=t||fa?document.importNode(a,!0):a.cloneNode(!0);return vi(i,i),i}}function Ia(r,e){r!==null&&r.before(e)}function wr(r,e){return xi(r,e)}const Xe=new Map;function xi(r,{target:e,anchor:t,props:a={},events:n,context:i,intro:o=!0}){Jn();var s=new Set,l=h=>{for(var _=0;_<h.length;_++){var m=h[_];if(!s.has(m)){s.add(m);var v=yi(m);e.addEventListener(m,Vt,{passive:v});var O=Xe.get(m);O===void 0?(document.addEventListener(m,Vt,{passive:v}),Xe.set(m,1)):Xe.set(m,O+1)}}};l(wn(gi)),Ra.add(l);var c=void 0,u=ri(()=>{var h=t??e.appendChild(Kn());return ii(()=>{if(i){dr({});var _=ne;_.c=i}n&&(a.$$events=n),c=r(h,a)||{},i&&pr()}),()=>{var v;for(var _ of s){e.removeEventListener(_,Vt);var m=Xe.get(_);--m===0?(document.removeEventListener(_,Vt),Xe.delete(_)):Xe.set(_,m)}Ra.delete(l),h!==t&&((v=h.parentNode)==null||v.removeChild(h))}});return wi.set(c,u),c}let wi=new WeakMap;function Za(r){var e,t,a="";if(typeof r=="string"||typeof r=="number")a+=r;else if(typeof r=="object")if(Array.isArray(r)){var n=r.length;for(e=0;e<n;e++)r[e]&&(t=Za(r[e]))&&(a&&(a+=" "),a+=t)}else for(t in r)r[t]&&(a&&(a+=" "),a+=t);return a}function bi(){for(var r,e,t=0,a="",n=arguments.length;t<n;t++)(r=arguments[t])&&(e=Za(r))&&(a&&(a+=" "),a+=e);return a}function Da(r){return typeof r=="object"?bi(r):r??""}function ki(r,e,t){var a=r==null?"":""+r;return e&&(a=a?a+" "+e:e),a===""?null:a}function Si(r,e){return r==null?null:String(r)}function Fa(r,e,t,a,n,i){var o=r.__className;if(o!==t||o===void 0){var s=ki(t,a);s==null?r.removeAttribute("class"):r.className=s,r.__className=t}return i}function Ut(r,e,t,a){var n=r.__style;if(n!==e){var i=Si(e);i==null?r.removeAttribute("style"):r.style.cssText=i,r.__style=e}return a}const zi=()=>performance.now(),pe={tick:r=>requestAnimationFrame(r),now:()=>zi(),tasks:new Set};function Ba(){const r=pe.now();pe.tasks.forEach(e=>{e.c(r)||(pe.tasks.delete(e),e.f())}),pe.tasks.size!==0&&pe.tick(Ba)}function Mi(r){let e;return pe.tasks.size===0&&pe.tick(Ba),{promise:new Promise(t=>{pe.tasks.add(e={c:r,f:t})}),abort(){pe.tasks.delete(e)}}}function Va(r,e){return r===e||(r==null?void 0:r[Zt])===e}function Je(r={},e,t,a){return ai(()=>{var n,i;return xa(()=>{n=i,i=[],fi(()=>{r!==t(...i)&&(e(r,...i),n&&Va(t(...n),r)&&e(null,...n))})}),()=>{na(()=>{i&&Va(t(...i),r)&&e(null,...i)})}}),r}const Ei="5";typeof window<"u"&&((fn=window.__svelte??(window.__svelte={})).v??(fn.v=new Set)).add(Ei);function Ci(r){return r}function br(r){return-.5*(Math.cos(Math.PI*r)-1)}function Ti(r){const e=Math.cos(r*Math.PI*.5);return Math.abs(e)<1e-14?1:1-e}function Ai(r){return Math.sin(r*Math.PI/2)}const Ni=128,Li=0,Pi=1,Ri=2;class Oi{constructor(){p(this,"animationsStarted",!1);p(this,"animationsCount",0);p(this,"animationsLimit",Ni);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 Se=new Oi;function Ua(r){return Object.prototype.toString.call(r)==="[object Date]"}function kr(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)=>kr(r[i],n));return n=>a.map(i=>i(n))}if(t==="object"){if(!r||!e)throw new Error("Object cannot be null");if(Ua(r)&&Ua(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]=kr(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 Wr=class Wr{constructor(e,t={}){D(this,ge);D(this,ct);D(this,Rt);D(this,Ve,null);U(this,ge,q(e)),U(this,ct,q(e)),U(this,Rt,t)}static of(e,t){const a=new Wr(e(),t);return xa(()=>{a.set(e())}),a}set(e,t){var h;V(k(this,ct),e);let{delay:a=0,duration:n=400,easing:i=Ci,interpolate:o=kr}={...k(this,Rt),...t};if(n===0)return(h=k(this,Ve))==null||h.abort(),V(k(this,ge),e),Promise.resolve();const s=pe.now()+a;let l,c=!1,u=k(this,Ve);return U(this,Ve,Mi(_=>{if(_<s)return!0;if(!c){c=!0;const v=k(this,ge).v;l=o(v,e),typeof n=="function"&&(n=n(v,e)),u==null||u.abort()}const m=_-s;return m>n?(V(k(this,ge),e),!1):(V(k(this,ge),l(i(m/n))),!0)})),k(this,Ve).promise}get current(){return P(k(this,ge))}get target(){return P(k(this,ct))}set target(e){this.set(e)}};ge=new WeakMap,ct=new WeakMap,Rt=new WeakMap,Ve=new WeakMap;let Sr=Wr;class $t{constructor(e,t){p(this,"value");p(this,"motion");this.value=e,this.motion=new Sr(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 ji=ja('<div><div class="body svelte-zz3jrb"></div></div>');function Ii(r,e){dr(e,!0);let t,a;function n(){return a}let i=q(!1);function o(j){V(i,j,!0)}function s(){return P(i)}let l=q(!0),c=0,u=150;function h(j){j!=P(l)&&(V(l,j,!0),c=performance.now())}function _(){return performance.now()-c<u?v.motion.current==0:v.value==0}let m=0,v=new $t(0,{easing:br});ce(()=>{P(i)==!1&&(v.snap(),Se.clear(e.priority,e.id))}),ce(()=>{v.set(P(l)?0:m,{duration:75})}),ce(()=>{O(v.motion.current)});function O(j){t&&Se.equeue(e.layer,e.priority,e.id,()=>{t.style.scale=j.toString(),t.style.filter=`brightness(${.25+.75*j})`,a.style.opacity=j.toString()})}function Y(j){j!=m&&(m=j,v.set(j,{duration:75}))}function se(){return v.value}var L={getBody:n,setDisplayed:o,getDisplayed:s,setCollapsed:h,getCollapsed:_,setScale:Y,getScale:se},F=ji(),he=xr(F);return Je(he,j=>a=j,()=>a),Je(F,j=>t=j,()=>t),wa(()=>{Fa(F,1,Da(["pin",P(i)&&"displayed"]),"svelte-zz3jrb"),Ut(F,`width: ${e.width}px; height: ${e.height}px; border-radius: ${e.radius}px`),Ut(he,`width: ${e.width-4}px; height: ${e.height-4}px; border-radius: ${e.radius-2}px`)}),Ia(r,F),pr(L)}var bt;(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?{x:0,y:s*Math.sin(c)-o}:{x:s*Math.cos(c)-i,y:0}:n<180-l?{x:s*Math.cos(c)-i,y:0}:{x:-t,y:s*Math.sin(c)-o}:n<270?n<180+l?{x:-t,y:s*Math.sin(c)-o}:{x:s*Math.cos(c)-i,y:-a}:n<360-l?{x:s*Math.cos(c)-i,y:-a}:{x:0,y:s*Math.sin(c)-o}}r.getOffsets=e})(bt||(bt={}));var Zi=ja('<div><div class="pointer svelte-11extwn"></div> <div class="bubble svelte-11extwn"><div class="body svelte-11extwn"></div></div></div>');function $a(r,e){dr(e,!0);let t,a,n,i;const o=e.width+2*e.margin,s=e.height+2*e.margin,l=()=>i;ce(()=>{n.style.width=`${e.margin*4}px`,n.style.height=`${e.margin*4}px`});let c=q(!0);function u(A){V(c,A,!0)}function h(){return P(c)}let _=q(!0),m=0,v=300;function O(A){A!=P(_)&&(V(_,A,!0),m=performance.now())}function Y(){return performance.now()-m<v?L.motion.current==0:L.value==0}function se(){return performance.now()-m<v?L.motion.current==1:L.value==1}let L=new $t(0);ce(()=>{P(c)==!1&&(L.snap(),Se.clear(e.priority,e.id+"_scale"))}),ce(()=>{P(_)==!0&&L.value!=0&&(Se.stacked()?L.set(0,{duration:0}):L.set(0,{duration:150,easing:Ti})),P(_)==!1&&L.value!=1&&L.set(1,{duration:150,easing:Ai})}),ce(()=>{F(L.motion.current)});function F(A){!t||!a||!n||Se.equeue(P(_)?0:e.layer,e.priority,e.id+"_scale",()=>{t.style.opacity=`${A}`,a.style.scale=`${A}`,n.style.scale=`${A}`})}let he=NaN,j=q(!1),Pe=new $t(-o/2,{easing:br}),er=new $t(-s/2,{easing:br});ce(()=>{P(c)==!1&&(Pe.snap(),Pe.snap(),Se.clear(e.priority,e.id+"_angle"))}),ce(()=>{P(_)==!0&&P(j)&&(Pe.update({duration:75}),Pe.update({duration:75}))}),ce(()=>{hn(Pe.motion.current,er.motion.current)});function hn(A,rr){if(!t||!a||!n)return;const _e=A+o/2,ar=rr+s/2,pt=s<o?_e*s/o:_e,ft=s>o?ar*o/s:ar,Zo=Math.atan2(ft,pt)/Math.PI*180-45,gn=0,Do=30,Yr=Math.sqrt(pt*pt+ft*ft),Ot=Math.min(o,s)/2,Fo=Ot*Math.SQRT2,Bo=(Yr-Ot)/(Fo-Ot),_n=gn+Bo*(Do-gn),Vo=Yr<Ot?Yr/Ot:1;Se.equeue(e.layer,e.priority,e.id+"_angle",()=>{a.style.transform=`translate(${Math.round(A)}px, ${Math.round(rr)}px)`,n.style.transform=`scale(${Vo}) rotate(${Zo}deg) skew(${_n}deg, ${_n}deg)`})}function Oo(A,rr){if(P(j)==!1||rr==!0){let _e=bt.getOffsets(o,s,A);Pe.set(Math.round(_e.x),{duration:0}),er.set(Math.round(_e.y),{duration:0}),hn(Pe.value,er.value),he=A,V(j,!0)}else if(A!=he){let _e=Math.abs(A-he),ar=_e<180?_e:360-_e,pt=Math.log(ar)*75,ft=bt.getOffsets(o,s,A);Pe.set(Math.round(ft.x),{duration:pt}),er.set(Math.round(ft.y),{duration:pt}),he=A}}function jo(){return bt.getOffsets(o,s,he)}var Io={getBody:l,setDisplayed:u,getDisplayed:h,setCollapsed:O,getCollapsed:Y,getExpanded:se,setAngle:Oo,getOffsets:jo},tr=Zi(),mn=xr(tr);Je(mn,A=>n=A,()=>n);var Hr=Qn(mn,2),yn=xr(Hr);return Je(yn,A=>i=A,()=>i),Je(Hr,A=>a=A,()=>a),Je(tr,A=>t=A,()=>t),wa(()=>{Fa(tr,1,Da(["anchor",P(c)&&"displayed"]),"svelte-11extwn"),Ut(Hr,`margin: ${e.margin}px;`),Ut(yn,`width: ${e.width}px; height: ${e.height}px; border-radius: ${e.radius}px;`)}),Ia(r,tr),pr(Io)}var Ke;(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}})(Ke||(Ke={}));class qa{constructor(e,t,a,n,i){p(this,"swLat");p(this,"swLng");p(this,"neLat");p(this,"neLng");const o=a*Math.pow(2,t),s=Ke.project(e.sw.lat,e.sw.lng,o),l=Ke.project(e.ne.lat,e.ne.lng,o),c=s.x-n,u=s.y+i,h=l.x+n,_=l.y-i,m=Ke.unproject(c,u,o),v=Ke.unproject(h,_,o);this.swLat=m.lat,this.swLng=m.lng,this.neLat=v.lat,this.neLng=v.lng}contains(e,t){return this.swLat<=e&&e<=this.neLat?this.swLng<this.neLng?this.swLng<=t&&t<=this.neLng:t<=this.neLng||this.swLng<=t:!1}}var C;(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})(C||(C={}));var Wa;(function(r){r.mergeShapes=(e,t)=>({...e,...t})})(Wa||(Wa={}));const y=C.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),ze=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=C.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 ae 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 ae))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,C.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()}}ae.create=r=>new ae(r);const kt=(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,C.jsonStringifyReplacer)}`;break;case d.unrecognized_keys:t=`Unrecognized key(s) in object: ${C.joinValues(r.keys,", ")}`;break;case d.invalid_union:t="Invalid input";break;case d.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${C.joinValues(r.options)}`;break;case d.invalid_enum_value:t=`Invalid enum value. Expected ${C.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}"`:C.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,C.assertNever(r)}return{message:t}};let Di=kt;function zr(){return Di}const Mr=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 f(r,e){const t=zr(),a=Mr({issueData:e,data:r.data,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,t,t===kt?void 0:kt].filter(n=>!!n)});r.common.issues.push(a)}class Q{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 x;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 Q.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 x;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 x=Object.freeze({status:"aborted"}),St=r=>({status:"dirty",value:r}),X=r=>({status:"valid",value:r}),Ha=r=>r.status==="aborted",Ya=r=>r.status==="dirty",Qe=r=>r.status==="valid",qt=r=>typeof Promise<"u"&&r instanceof Promise;var g;(function(r){r.errToObj=e=>typeof e=="string"?{message:e}:e||{},r.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(g||(g={}));class Me{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 Ga=(r,e)=>{if(Qe(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 ae(r.common.issues);return this._error=t,this._error}}};function S(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 E{get description(){return this._def.description}_getType(e){return ze(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:ze(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Q,ctx:{common:e.parent.common,data:e.data,parsedType:ze(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(qt(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:ze(e)},n=this._parseSync({data:e,path:a.path,parent:a});return Ga(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:ze(e)};if(!this["~standard"].async)try{const i=this._parseSync({data:e,path:[],parent:t});return Qe(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=>Qe(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:ze(e)},n=this._parse({data:e,path:a.path,parent:a}),i=await(qt(n)?n:Promise.resolve(n));return Ga(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 nt({schema:this,typeName:w.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 Te.create(this,this._def)}nullable(){return it.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return fe.create(this)}promise(){return Ct.create(this,this._def)}or(e){return Ht.create([this,e],this._def)}and(e){return Yt.create(this,e,this._def)}transform(e){return new nt({...S(this._def),schema:this,typeName:w.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new Lr({...S(this._def),innerType:this,defaultValue:t,typeName:w.ZodDefault})}brand(){return new lo({typeName:w.ZodBranded,type:this,...S(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new Pr({...S(this._def),innerType:this,catchValue:t,typeName:w.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return Rr.create(this,e)}readonly(){return Or.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Fi=/^c[^\s-]{8,}$/i,Bi=/^[0-9a-z]+$/,Vi=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Ui=/^[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,$i=/^[a-z0-9_-]{21}$/i,qi=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Wi=/^[-+]?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)?)??$/,Hi=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Yi="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Er;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])$/,Xi=/^(?:(?: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])$/,Ji=/^(([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]))$/,Ki=/^(([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])$/,Qi=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,eo=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Xa="((\\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])))",to=new RegExp(`^${Xa}$`);function Ja(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 ro(r){return new RegExp(`^${Ja(r)}$`)}function ao(r){let e=`${Xa}T${Ja(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 no(r,e){return!!((e==="v4"||!e)&&Gi.test(r)||(e==="v6"||!e)&&Ji.test(r))}function io(r,e){if(!qi.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 oo(r,e){return!!((e==="v4"||!e)&&Xi.test(r)||(e==="v6"||!e)&&Ki.test(r))}class Ee extends E{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==y.string){const i=this._getOrReturnCtx(e);return f(i,{code:d.invalid_type,expected:y.string,received:i.parsedType}),x}const a=new Q;let n;for(const i of this._def.checks)if(i.kind==="min")e.data.length<i.value&&(n=this._getOrReturnCtx(e,n),f(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),f(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?f(n,{code:d.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):s&&f(n,{code:d.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),a.dirty())}else if(i.kind==="email")Hi.test(e.data)||(n=this._getOrReturnCtx(e,n),f(n,{validation:"email",code:d.invalid_string,message:i.message}),a.dirty());else if(i.kind==="emoji")Er||(Er=new RegExp(Yi,"u")),Er.test(e.data)||(n=this._getOrReturnCtx(e,n),f(n,{validation:"emoji",code:d.invalid_string,message:i.message}),a.dirty());else if(i.kind==="uuid")Ui.test(e.data)||(n=this._getOrReturnCtx(e,n),f(n,{validation:"uuid",code:d.invalid_string,message:i.message}),a.dirty());else if(i.kind==="nanoid")$i.test(e.data)||(n=this._getOrReturnCtx(e,n),f(n,{validation:"nanoid",code:d.invalid_string,message:i.message}),a.dirty());else if(i.kind==="cuid")Fi.test(e.data)||(n=this._getOrReturnCtx(e,n),f(n,{validation:"cuid",code:d.invalid_string,message:i.message}),a.dirty());else if(i.kind==="cuid2")Bi.test(e.data)||(n=this._getOrReturnCtx(e,n),f(n,{validation:"cuid2",code:d.invalid_string,message:i.message}),a.dirty());else if(i.kind==="ulid")Vi.test(e.data)||(n=this._getOrReturnCtx(e,n),f(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),f(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),f(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),f(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),f(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),f(n,{code:d.invalid_string,validation:{endsWith:i.value},message:i.message}),a.dirty()):i.kind==="datetime"?ao(i).test(e.data)||(n=this._getOrReturnCtx(e,n),f(n,{code:d.invalid_string,validation:"datetime",message:i.message}),a.dirty()):i.kind==="date"?to.test(e.data)||(n=this._getOrReturnCtx(e,n),f(n,{code:d.invalid_string,validation:"date",message:i.message}),a.dirty()):i.kind==="time"?ro(i).test(e.data)||(n=this._getOrReturnCtx(e,n),f(n,{code:d.invalid_string,validation:"time",message:i.message}),a.dirty()):i.kind==="duration"?Wi.test(e.data)||(n=this._getOrReturnCtx(e,n),f(n,{validation:"duration",code:d.invalid_string,message:i.message}),a.dirty()):i.kind==="ip"?no(e.data,i.version)||(n=this._getOrReturnCtx(e,n),f(n,{validation:"ip",code:d.invalid_string,message:i.message}),a.dirty()):i.kind==="jwt"?io(e.data,i.alg)||(n=this._getOrReturnCtx(e,n),f(n,{validation:"jwt",code:d.invalid_string,message:i.message}),a.dirty()):i.kind==="cidr"?oo(e.data,i.version)||(n=this._getOrReturnCtx(e,n),f(n,{validation:"cidr",code:d.invalid_string,message:i.message}),a.dirty()):i.kind==="base64"?Qi.test(e.data)||(n=this._getOrReturnCtx(e,n),f(n,{validation:"base64",code:d.invalid_string,message:i.message}),a.dirty()):i.kind==="base64url"?eo.test(e.data)||(n=this._getOrReturnCtx(e,n),f(n,{validation:"base64url",code:d.invalid_string,message:i.message}),a.dirty()):C.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,...g.errToObj(a)})}_addCheck(e){return new Ee({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...g.errToObj(e)})}url(e){return this._addCheck({kind:"url",...g.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...g.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...g.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...g.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...g.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...g.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...g.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...g.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...g.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...g.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...g.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...g.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,...g.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,...g.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...g.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...g.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t==null?void 0:t.position,...g.errToObj(t==null?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...g.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...g.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...g.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...g.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...g.errToObj(t)})}nonempty(e){return this.min(1,g.errToObj(e))}trim(){return new Ee({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Ee({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Ee({...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}}Ee.create=r=>new Ee({checks:[],typeName:w.ZodString,coerce:(r==null?void 0:r.coerce)??!1,...S(r)});function so(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 et extends E{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 f(i,{code:d.invalid_type,expected:y.number,received:i.parsedType}),x}let a;const n=new Q;for(const i of this._def.checks)i.kind==="int"?C.isInteger(e.data)||(a=this._getOrReturnCtx(e,a),f(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),f(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),f(a,{code:d.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty()):i.kind==="multipleOf"?so(e.data,i.value)!==0&&(a=this._getOrReturnCtx(e,a),f(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),f(a,{code:d.not_finite,message:i.message}),n.dirty()):C.assertNever(i);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,g.toString(t))}gt(e,t){return this.setLimit("min",e,!1,g.toString(t))}lte(e,t){return this.setLimit("max",e,!0,g.toString(t))}lt(e,t){return this.setLimit("max",e,!1,g.toString(t))}setLimit(e,t,a,n){return new et({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:a,message:g.toString(n)}]})}_addCheck(e){return new et({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:g.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:g.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:g.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:g.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:g.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:g.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:g.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:g.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:g.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"&&C.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)}}et.create=r=>new et({checks:[],typeName:w.ZodNumber,coerce:(r==null?void 0:r.coerce)||!1,...S(r)});class zt extends E{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 Q;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),f(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),f(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),f(a,{code:d.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):C.assertNever(i);return{status:n.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return f(t,{code:d.invalid_type,expected:y.bigint,received:t.parsedType}),x}gte(e,t){return this.setLimit("min",e,!0,g.toString(t))}gt(e,t){return this.setLimit("min",e,!1,g.toString(t))}lte(e,t){return this.setLimit("max",e,!0,g.toString(t))}lt(e,t){return this.setLimit("max",e,!1,g.toString(t))}setLimit(e,t,a,n){return new zt({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:a,message:g.toString(n)}]})}_addCheck(e){return new zt({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:g.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:g.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:g.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:g.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:g.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}}zt.create=r=>new zt({checks:[],typeName:w.ZodBigInt,coerce:(r==null?void 0:r.coerce)??!1,...S(r)});class Cr extends E{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==y.boolean){const a=this._getOrReturnCtx(e);return f(a,{code:d.invalid_type,expected:y.boolean,received:a.parsedType}),x}return X(e.data)}}Cr.create=r=>new Cr({typeName:w.ZodBoolean,coerce:(r==null?void 0:r.coerce)||!1,...S(r)});class Wt extends E{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==y.date){const i=this._getOrReturnCtx(e);return f(i,{code:d.invalid_type,expected:y.date,received:i.parsedType}),x}if(Number.isNaN(e.data.getTime())){const i=this._getOrReturnCtx(e);return f(i,{code:d.invalid_date}),x}const a=new Q;let n;for(const i of this._def.checks)i.kind==="min"?e.data.getTime()<i.value&&(n=this._getOrReturnCtx(e,n),f(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),f(n,{code:d.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),a.dirty()):C.assertNever(i);return{status:a.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Wt({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:g.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:g.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}}Wt.create=r=>new Wt({checks:[],coerce:(r==null?void 0:r.coerce)||!1,typeName:w.ZodDate,...S(r)});class Ka extends E{_parse(e){if(this._getType(e)!==y.symbol){const a=this._getOrReturnCtx(e);return f(a,{code:d.invalid_type,expected:y.symbol,received:a.parsedType}),x}return X(e.data)}}Ka.create=r=>new Ka({typeName:w.ZodSymbol,...S(r)});class Qa extends E{_parse(e){if(this._getType(e)!==y.undefined){const a=this._getOrReturnCtx(e);return f(a,{code:d.invalid_type,expected:y.undefined,received:a.parsedType}),x}return X(e.data)}}Qa.create=r=>new Qa({typeName:w.ZodUndefined,...S(r)});class en extends E{_parse(e){if(this._getType(e)!==y.null){const a=this._getOrReturnCtx(e);return f(a,{code:d.invalid_type,expected:y.null,received:a.parsedType}),x}return X(e.data)}}en.create=r=>new en({typeName:w.ZodNull,...S(r)});class Tr extends E{constructor(){super(...arguments),this._any=!0}_parse(e){return X(e.data)}}Tr.create=r=>new Tr({typeName:w.ZodAny,...S(r)});class tt extends E{constructor(){super(...arguments),this._unknown=!0}_parse(e){return X(e.data)}}tt.create=r=>new tt({typeName:w.ZodUnknown,...S(r)});class Ce extends E{_parse(e){const t=this._getOrReturnCtx(e);return f(t,{code:d.invalid_type,expected:y.never,received:t.parsedType}),x}}Ce.create=r=>new Ce({typeName:w.ZodNever,...S(r)});class Ar extends E{_parse(e){if(this._getType(e)!==y.undefined){const a=this._getOrReturnCtx(e);return f(a,{code:d.invalid_type,expected:y.void,received:a.parsedType}),x}return X(e.data)}}Ar.create=r=>new Ar({typeName:w.ZodVoid,...S(r)});class fe extends E{_parse(e){const{ctx:t,status:a}=this._processInputParams(e),n=this._def;if(t.parsedType!==y.array)return f(t,{code:d.invalid_type,expected:y.array,received:t.parsedType}),x;if(n.exactLength!==null){const o=t.data.length>n.exactLength.value,s=t.data.length<n.exactLength.value;(o||s)&&(f(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&&(f(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&&(f(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 Me(t,o,t.path,s)))).then(o=>Q.mergeArray(a,o));const i=[...t.data].map((o,s)=>n.type._parseSync(new Me(t,o,t.path,s)));return Q.mergeArray(a,i)}get element(){return this._def.type}min(e,t){return new fe({...this._def,minLength:{value:e,message:g.toString(t)}})}max(e,t){return new fe({...this._def,maxLength:{value:e,message:g.toString(t)}})}length(e,t){return new fe({...this._def,exactLength:{value:e,message:g.toString(t)}})}nonempty(e){return this.min(1,e)}}fe.create=(r,e)=>new fe({type:r,minLength:null,maxLength:null,exactLength:null,typeName:w.ZodArray,...S(e)});function rt(r){if(r instanceof Z){const e={};for(const t in r.shape){const a=r.shape[t];e[t]=Te.create(rt(a))}return new Z({...r._def,shape:()=>e})}else return r instanceof fe?new fe({...r._def,type:rt(r.element)}):r instanceof Te?Te.create(rt(r.unwrap())):r instanceof it?it.create(rt(r.unwrap())):r instanceof ye?ye.create(r.items.map(e=>rt(e))):r}class Z extends E{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=C.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 f(c,{code:d.invalid_type,expected:y.object,received:c.parsedType}),x}const{status:a,ctx:n}=this._processInputParams(e),{shape:i,keys:o}=this._getCached(),s=[];if(!(this._def.catchall instanceof Ce&&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],h=n.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Me(n,h,n.path,c)),alwaysSet:c in n.data})}if(this._def.catchall instanceof Ce){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&&(f(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 h=n.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new Me(n,h,n.path,u)),alwaysSet:u in n.data})}}return n.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const h=await u.key,_=await u.value;c.push({key:h,value:_,alwaysSet:u.alwaysSet})}return c}).then(c=>Q.mergeObjectSync(a,c)):Q.mergeObjectSync(a,l)}get shape(){return this._def.shape()}strict(e){return g.errToObj,new Z({...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:g.errToObj(e).message??n}:{message:n}}}:{}})}strip(){return new Z({...this._def,unknownKeys:"strip"})}passthrough(){return new Z({...this._def,unknownKeys:"passthrough"})}extend(e){return new Z({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new Z({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:w.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new Z({...this._def,catchall:e})}pick(e){const t={};for(const a of C.objectKeys(e))e[a]&&this.shape[a]&&(t[a]=this.shape[a]);return new Z({...this._def,shape:()=>t})}omit(e){const t={};for(const a of C.objectKeys(this.shape))e[a]||(t[a]=this.shape[a]);return new Z({...this._def,shape:()=>t})}deepPartial(){return rt(this)}partial(e){const t={};for(const a of C.objectKeys(this.shape)){const n=this.shape[a];e&&!e[a]?t[a]=n:t[a]=n.optional()}return new Z({...this._def,shape:()=>t})}required(e){const t={};for(const a of C.objectKeys(this.shape))if(e&&!e[a])t[a]=this.shape[a];else{let i=this.shape[a];for(;i instanceof Te;)i=i._def.innerType;t[a]=i}return new Z({...this._def,shape:()=>t})}keyof(){return nn(C.objectKeys(this.shape))}}Z.create=(r,e)=>new Z({shape:()=>r,unknownKeys:"strip",catchall:Ce.create(),typeName:w.ZodObject,...S(e)}),Z.strictCreate=(r,e)=>new Z({shape:()=>r,unknownKeys:"strict",catchall:Ce.create(),typeName:w.ZodObject,...S(e)}),Z.lazycreate=(r,e)=>new Z({shape:r,unknownKeys:"strip",catchall:Ce.create(),typeName:w.ZodObject,...S(e)});class Ht extends E{_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 ae(s.ctx.common.issues));return f(t,{code:d.invalid_union,unionErrors:o}),x}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 ae(l));return f(t,{code:d.invalid_union,unionErrors:s}),x}}get options(){return this._def.options}}Ht.create=(r,e)=>new Ht({options:r,typeName:w.ZodUnion,...S(e)});function Nr(r,e){const t=ze(r),a=ze(e);if(r===e)return{valid:!0,data:r};if(t===y.object&&a===y.object){const n=C.objectKeys(e),i=C.objectKeys(r).filter(s=>n.indexOf(s)!==-1),o={...r,...e};for(const s of i){const l=Nr(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=Nr(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 Yt extends E{_parse(e){const{status:t,ctx:a}=this._processInputParams(e),n=(i,o)=>{if(Ha(i)||Ha(o))return x;const s=Nr(i.value,o.value);return s.valid?((Ya(i)||Ya(o))&&t.dirty(),{status:t.value,value:s.data}):(f(a,{code:d.invalid_intersection_types}),x)};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}))}}Yt.create=(r,e,t)=>new Yt({left:r,right:e,typeName:w.ZodIntersection,...S(t)});class ye extends E{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==y.array)return f(a,{code:d.invalid_type,expected:y.array,received:a.parsedType}),x;if(a.data.length<this._def.items.length)return f(a,{code:d.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),x;!this._def.rest&&a.data.length>this._def.items.length&&(f(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 Me(a,o,a.path,s)):null}).filter(o=>!!o);return a.common.async?Promise.all(i).then(o=>Q.mergeArray(t,o)):Q.mergeArray(t,i)}get items(){return this._def.items}rest(e){return new ye({...this._def,rest:e})}}ye.create=(r,e)=>{if(!Array.isArray(r))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ye({items:r,typeName:w.ZodTuple,rest:null,...S(e)})};class tn extends E{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 f(a,{code:d.invalid_type,expected:y.map,received:a.parsedType}),x;const n=this._def.keyType,i=this._def.valueType,o=[...a.data.entries()].map(([s,l],c)=>({key:n._parse(new Me(a,s,a.path,[c,"key"])),value:i._parse(new Me(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 x;(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 x;(c.status==="dirty"||u.status==="dirty")&&t.dirty(),s.set(c.value,u.value)}return{status:t.value,value:s}}}}tn.create=(r,e,t)=>new tn({valueType:e,keyType:r,typeName:w.ZodMap,...S(t)});class Mt extends E{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==y.set)return f(a,{code:d.invalid_type,expected:y.set,received:a.parsedType}),x;const n=this._def;n.minSize!==null&&a.data.size<n.minSize.value&&(f(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&&(f(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 x;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 Me(a,l,a.path,c)));return a.common.async?Promise.all(s).then(l=>o(l)):o(s)}min(e,t){return new Mt({...this._def,minSize:{value:e,message:g.toString(t)}})}max(e,t){return new Mt({...this._def,maxSize:{value:e,message:g.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}Mt.create=(r,e)=>new Mt({valueType:r,minSize:null,maxSize:null,typeName:w.ZodSet,...S(e)});class Et extends E{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==y.function)return f(t,{code:d.invalid_type,expected:y.function,received:t.parsedType}),x;function a(s,l){return Mr({data:s,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,zr(),kt].filter(c=>!!c),issueData:{code:d.invalid_arguments,argumentsError:l}})}function n(s,l){return Mr({data:s,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,zr(),kt].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 Ct){const s=this;return X(async function(...l){const c=new ae([]),u=await s._def.args.parseAsync(l,i).catch(m=>{throw c.addIssue(a(l,m)),c}),h=await Reflect.apply(o,this,u);return await s._def.returns._def.type.parseAsync(h,i).catch(m=>{throw c.addIssue(n(h,m)),c})})}else{const s=this;return X(function(...l){const c=s._def.args.safeParse(l,i);if(!c.success)throw new ae([a(l,c.error)]);const u=Reflect.apply(o,this,c.data),h=s._def.returns.safeParse(u,i);if(!h.success)throw new ae([n(u,h.error)]);return h.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new Et({...this._def,args:ye.create(e).rest(tt.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||ye.create([]).rest(tt.create()),returns:t||tt.create(),typeName:w.ZodFunction,...S(a)})}}class rn extends E{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})}}rn.create=(r,e)=>new rn({getter:r,typeName:w.ZodLazy,...S(e)});class an extends E{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return f(t,{received:t.data,code:d.invalid_literal,expected:this._def.value}),x}return{status:"valid",value:e.data}}get value(){return this._def.value}}an.create=(r,e)=>new an({value:r,typeName:w.ZodLiteral,...S(e)});function nn(r,e){return new at({values:r,typeName:w.ZodEnum,...S(e)})}class at extends E{_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),a=this._def.values;return f(t,{expected:C.joinValues(a),received:t.parsedType,code:d.invalid_type}),x}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 f(t,{received:t.data,code:d.invalid_enum_value,options:a}),x}return X(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 at.create(e,{...this._def,...t})}exclude(e,t=this._def){return at.create(this.options.filter(a=>!e.includes(a)),{...this._def,...t})}}at.create=nn;class on extends E{_parse(e){const t=C.getValidEnumValues(this._def.values),a=this._getOrReturnCtx(e);if(a.parsedType!==y.string&&a.parsedType!==y.number){const n=C.objectValues(t);return f(a,{expected:C.joinValues(n),received:a.parsedType,code:d.invalid_type}),x}if(this._cache||(this._cache=new Set(C.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const n=C.objectValues(t);return f(a,{received:a.data,code:d.invalid_enum_value,options:n}),x}return X(e.data)}get enum(){return this._def.values}}on.create=(r,e)=>new on({values:r,typeName:w.ZodNativeEnum,...S(e)});class Ct extends E{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==y.promise&&t.common.async===!1)return f(t,{code:d.invalid_type,expected:y.promise,received:t.parsedType}),x;const a=t.parsedType===y.promise?t.data:Promise.resolve(t.data);return X(a.then(n=>this._def.type.parseAsync(n,{path:t.path,errorMap:t.common.contextualErrorMap})))}}Ct.create=(r,e)=>new Ct({type:r,typeName:w.ZodPromise,...S(e)});class nt extends E{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===w.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=>{f(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 x;const l=await this._def.schema._parseAsync({data:s,path:a.path,parent:a});return l.status==="aborted"?x:l.status==="dirty"||t.value==="dirty"?St(l.value):l});{if(t.value==="aborted")return x;const s=this._def.schema._parseSync({data:o,path:a.path,parent:a});return s.status==="aborted"?x:s.status==="dirty"||t.value==="dirty"?St(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"?x:(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"?x:(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(!Qe(o))return x;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=>Qe(o)?Promise.resolve(n.transform(o.value,i)).then(s=>({status:t.value,value:s})):x);C.assertNever(n)}}nt.create=(r,e,t)=>new nt({schema:r,typeName:w.ZodEffects,effect:e,...S(t)}),nt.createWithPreprocess=(r,e,t)=>new nt({schema:e,effect:{type:"preprocess",transform:r},typeName:w.ZodEffects,...S(t)});class Te extends E{_parse(e){return this._getType(e)===y.undefined?X(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Te.create=(r,e)=>new Te({innerType:r,typeName:w.ZodOptional,...S(e)});class it extends E{_parse(e){return this._getType(e)===y.null?X(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}it.create=(r,e)=>new it({innerType:r,typeName:w.ZodNullable,...S(e)});class Lr extends E{_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}}Lr.create=(r,e)=>new Lr({innerType:r,typeName:w.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...S(e)});class Pr extends E{_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 qt(n)?n.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new ae(a.common.issues)},input:a.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new ae(a.common.issues)},input:a.data})}}removeCatch(){return this._def.innerType}}Pr.create=(r,e)=>new Pr({innerType:r,typeName:w.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...S(e)});class sn extends E{_parse(e){if(this._getType(e)!==y.nan){const a=this._getOrReturnCtx(e);return f(a,{code:d.invalid_type,expected:y.nan,received:a.parsedType}),x}return{status:"valid",value:e.data}}}sn.create=r=>new sn({typeName:w.ZodNaN,...S(r)});class lo extends E{_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 Rr extends E{_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"?x:i.status==="dirty"?(t.dirty(),St(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"?x: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 Rr({in:e,out:t,typeName:w.ZodPipeline})}}class Or extends E{_parse(e){const t=this._def.innerType._parse(e),a=n=>(Qe(n)&&(n.value=Object.freeze(n.value)),n);return qt(t)?t.then(n=>a(n)):a(t)}unwrap(){return this._def.innerType}}Or.create=(r,e)=>new Or({innerType:r,typeName:w.ZodReadonly,...S(e)});var w;(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"})(w||(w={}));const Ae=Ee.create,b=et.create,ln=Cr.create,jr=Tr.create;tt.create,Ce.create;const Gt=Ar.create,Xt=fe.create,R=Z.create;Ht.create,Yt.create;const cn=ye.create,ie=Et.create,co=at.create,uo=Ct.create;Te.create,it.create,R({pin:R({fade:ln().optional(),maxCount:b().optional(),maxZoom:b().optional()}).optional(),animation:R({queue:R({limit:b().optional()}).optional()}).optional()});const Ir=b().min(-90).max(90),Zr=b().min(-180).max(180),po=R({sw:R({lat:Ir,lng:Zr}),ne:R({lat:Ir,lng:Zr})}),Dr=jr().refine(r=>r instanceof HTMLElement,"Must be an HTMLElement"),fo=R({mapSize:b().min(1),zoomMin:b().min(0),zoomMax:b().min(0),zoomScale:b().min(1).max(10)}),ho=R({instance:jr(),inserted:ie().returns(ln()),insert:ie().returns(Gt()),remove:ie().returns(Gt()),update:ie().args(b()).returns(Gt())}),mo=R({getParameters:ie().args().returns(fo),getContainer:ie().args().returns(Dr),getZoom:ie().args().returns(b()),getBounds:ie().args().returns(po),panBy:ie().args(b(),b()).returns(Gt()),createMarker:ie().args(Dr,Ir,Zr,b()).returns(ho)}),Fr=ie().args(Ae()).returns(uo(Dr)),yo=R({id:Ae().min(1),rank:b(),lat:b().min(-90).max(90),lng:b().min(-180).max(180),tooltip:R({style:R({width:b(),height:b(),margin:b(),radius:b()}).refine(r=>Math.min(r.width,r.height)/r.margin>=6,"Tooltip: minimum of width or height must be greater than or equal to 6 * margin"),body:Fr}),pin:R({style:R({width:b(),height:b(),radius:b()}),body:Fr}).optional(),popup:R({style:R({width:b(),height:b(),radius:b(),margin:b()}),body:Fr}).optional()}),go=Xt(yo);var De;(r=>{r.COUNT=12,r.DEGREES=[0,30,60,90,120,150,180,210,240,270,300,330],r.DEGREES_DEFAULT=270})(De||(De={}));const un=Ae().length(32),_o=cn([b(),Xt(cn([b(),b()]))]),dn=R({mapSize:b().min(1),zoomMin:b().min(0).max(24),zoomMax:b().min(0).max(24),zoomScale:b().min(1).max(10)}),vo=R({id:Ae(),rank:b(),lat:b(),lng:b(),width:b(),height:b(),margin:b()});R({key:un,parameters:dn,input:Xt(vo),token:Ae().optional()}),R({token:Ae().optional(),states:Xt(_o)});const xo=co(["info","warn","error"]);R({level:xo,key:Ae(),title:Ae(),content:jr()});const wo="1.0.212",pn="https://maps.api.arenarium.dev",bo=`${pn}/states`,ko=`${pn}/log`;class So{constructor(e,t,a){p(this,"apiKey");p(this,"apiToken");p(this,"apiDevEnvironment");p(this,"mapProvider");p(this,"markerDataArray",new Array);p(this,"markerDataMap",new Map);p(this,"markerDataUpdating",!1);p(this,"markerPinProcessor");p(this,"markerTooltipProcessor");p(this,"markerPopupProcessor");un.parse(e),mo.parse(t),this.apiKey=e,this.apiDevEnvironment=(window==null?void 0:window.location.host.startsWith("localhost"))||(window==null?void 0:window.location.host.startsWith("127.0.0.1")),this.mapProvider=t,this.markerPinProcessor=new Ur(t),this.markerTooltipProcessor=new Mo(t),this.markerPopupProcessor=new Eo(t),this.setConfiguration(a),this.log("info","Loaded")}setConfiguration(e){var t,a;Se.setLimit(((a=(t=e==null?void 0:e.animation)==null?void 0:t.queue)==null?void 0:a.limit)??8*navigator.hardwareConcurrency),this.markerPinProcessor.setConfiguration(e)}async updateMarkers(e){go.parse(e);try{await this.updateMarkerData(e),this.processMarkerDataCallback()}catch(t){throw console.error(t),this.removeMarkerData(),t instanceof Error&&this.log("error","Failed to update markers",t),t}}removeMarkers(){try{this.removeMarkerData()}catch(e){throw console.error(e),e instanceof Error&&this.log("error","Failed to remove markers",e),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);for(const a of this.markerDataArray)this.markerPopupProcessor.hide(a);throw t instanceof Error&&this.log("error","Failed to show popup",t),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);for(const a of this.markerDataArray)this.markerPopupProcessor.hide(a);throw t instanceof Error&&this.log("error","Failed to hide popup",t),t}}async updateMarkerData(e){try{let t=this.markerDataArray.map(n=>n.marker);for(let n=0;n<e.length;n++){const i=e[n];this.markerDataMap.get(i.id)||t.push(i)}const a=await this.getMarkerStates(t);try{this.markerDataUpdating=!0;for(let n=0;n<t.length;n++){const i=t[n],o=a[n],s=this.markerDataMap.get(i.id);if(s)s.update(o);else{const l=new zo(this.mapProvider,i,o);l.create(),this.markerDataMap.set(i.id,l),this.markerDataArray.push(l)}}this.markerDataArray.sort((n,i)=>n.zoom-i.zoom),this.markerPinProcessor.updateElements(this.markerDataArray.map(n=>n.pin)),this.markerTooltipProcessor.updateElements(this.markerDataArray.map(n=>n.tooltip)),this.markerPopupProcessor.updateElements(this.markerDataArray.map(n=>n.popup).filter(n=>n!=null))}finally{this.markerDataUpdating=!1}}catch(t){throw console.error(t),this.markerDataArray.forEach(a=>a.remove()),this.markerDataArray.length=0,this.markerDataMap.clear(),t instanceof Error&&this.log("error","Failed to update marker data",t),t}finally{this.markerDataUpdating=!1}}removeMarkerData(){try{this.markerDataUpdating=!0,this.markerPinProcessor.removeElements(),this.markerTooltipProcessor.removeElements(),this.markerPopupProcessor.removeElements(),this.markerDataArray.length=0,this.markerDataMap.clear()}catch(e){throw console.error(e),e instanceof Error&&this.log("error","Failed to remove marker data",e),e}finally{this.markerDataUpdating=!1}}async getMarkerStates(e){if(e.length==0)return[];if(e.length==1)return[[0,[[0,De.DEGREES.indexOf(De.DEGREES_DEFAULT)]]]];const t=this.mapProvider.getParameters();dn.parse(t);const a=e.map(s=>({id:s.id,rank:s.rank,lat:s.lat,lng:s.lng,width:s.tooltip.style.width,height:s.tooltip.style.height,margin:s.tooltip.style.margin})),n={key:this.apiKey,token:this.apiToken,parameters:t,input:a},i=await fetch(bo,{method:"POST",headers:{"Content-Type":"application/json","Cache-Control":this.apiDevEnvironment?"no-cache":""},body:JSON.stringify(n)});if(!i.ok)throw new Error("Failed to get marker states: "+i.statusText);const o=await i.json();return o.token&&(this.apiToken=o.token),o.states}processMarkerDataCallback(){if(this.markerDataArray.length!=0)try{this.processMarkerData(),window.setTimeout(this.processMarkerDataCallback.bind(this),25)}catch(e){console.error(e),e instanceof Error&&this.log("error","Failed to process marker data",e)}}processMarkerData(){if(this.markerDataUpdating)return;const e=this.mapProvider.getBounds(),t=this.mapProvider.getZoom();this.markerPopupProcessor.process(),this.markerTooltipProcessor.process(e,t),this.markerPinProcessor.process(e,t)}async log(e,t,a){if(!this.apiDevEnvironment)try{const n={key:this.apiKey,title:t,level:e,content:{version:wo,...a}};await fetch(ko,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)})}catch(n){console.error(n)}}}class zo{constructor(e,t,a){p(this,"marker");p(this,"zoom");p(this,"pin");p(this,"tooltip");p(this,"popup");this.marker=t,this.zoom=a[0],this.pin=new Vr(e,t,a),this.tooltip=new $r(e,t,a),t.popup&&(this.popup=new qr(e,t))}create(){var e;this.pin.create(),this.tooltip.create(),(e=this.popup)==null||e.create()}update(e){this.pin.update(e),this.tooltip.update(e)}remove(){var e;this.pin.remove(),this.tooltip.remove(),(e=this.popup)==null||e.remove()}}class Br{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;(e=this.marker)==null||e.remove()}}const ut=class ut extends Br{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)??ut.DEFAULT_SIZE,this.height=((o=a.pin)==null?void 0:o.style.height)??ut.DEFAULT_SIZE,this.radius=((s=a.pin)==null?void 0:s.style.radius)??ut.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=wr(Ii,{target:this.element,props:{id:this.id+"_pin",layer:Ri,priority:this.zoom*this.provider.getParameters().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)}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=>{n instanceof HTMLElement?t.appendChild(n):console.error("Failed to load pin body")}).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.setCollapsed(t)}setScale(t){if(this.component==null)throw new Error("Failed to set pin scale");this.component.setScale(t)}getScaleFromZoomDistance(t){return this.zoom<t?1:Math.max(0,1-(this.zoom-t)*.125)}getZindex(){const t=this.provider.getParameters();return Math.round((t.zoomMax-this.zoom)*t.zoomScale)}isCollapsed(){return this.component==null?!1:this.component.getCollapsed()}isBodyLoaded(){return this.bodyCallback==null||this.bodyLoaded}};p(ut,"DEFAULT_SIZE",16);let Vr=ut;const dt=class dt{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(dt.MAP_PINS_MAX_COUNT,8*navigator.hardwareConcurrency),this.pinMaxZoomDelta=((n=e==null?void 0:e.pin)==null?void 0:n.maxZoom)??dt.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.getParameters().mapSize,n=new qa(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&&(o.setCollapsed(!1),o.setScale(this.pinFade?o.getScaleFromZoomDistance(t):1),o.updateMap(!0),o.isBodyLoaded()==!1&&o.updateBody()),i++):(o.setCollapsed(!0),o.isCollapsed()&&o.updateMap(!1)):o.updateMap(!1)}};p(dt,"MAP_PINS_MAX_ZOOM",2),p(dt,"MAP_PINS_MAX_COUNT",128);let Ur=dt;const Kt=class Kt extends Br{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=De.DEGREES_DEFAULT,this.states=n[1].map(i=>[i[0],De.DEGREES[i[1]]]),this.bodyCallback=a.tooltip.body}createElement(){this.element=document.createElement("div"),this.element.classList.add("tooltip"),this.component=wr($a,{target:this.element,props:{id:this.id+"_tooltip",layer:Pi,priority:this.zoom*this.provider.getParameters().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],De.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=>{n instanceof HTMLElement?t.appendChild(n):console.error("Failed to load tooltip body")}).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(){const t=this.provider.getParameters();return Math.round((t.zoomMax-this.zoom)*t.zoomScale)+Kt.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(Kt,"Z_INDEX_OFFSET",1e6);let $r=Kt;class Mo{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.getParameters().mapSize,n=new qa(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 Qt=class Qt extends Br{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=wr($a,{target:this.element,props:{id:this.id+"_popup",layer:Li,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=>{n instanceof HTMLElement?t.appendChild(n):console.error("Failed to load popup body")}).catch(n=>console.error(n)).finally(()=>{this.bodyLoaded=!0,this.bodyLoading=!1}))}getZindex(){return Qt.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,!0)}isExpanded(){return this.component==null?!1:this.component.getExpanded()}isCollapsed(){return this.component==null?!1:this.component.getCollapsed()}isBodyLoaded(){return this.bodyLoaded}};p(Qt,"Z_INDEX_OFFSET",2e6);let qr=Qt;class Eo{constructor(e){p(this,"provider");p(this,"popupElements",new Array);p(this,"popupPositioned",new Map);this.provider=e}show(e){e.popup&&(e.pin.shown=!1,e.tooltip.shown=!1,this.popupPositioned.set(e.marker.id,!1),e.popup.setAngle(e.tooltip.angle),e.popup.shown=!0)}hide(e){e.popup&&(e.pin.shown=!0,e.tooltip.shown=!0,e.popup.shown=!1)}updateElements(e){this.popupElements=e,this.popupPositioned=new Map(e.map(t=>[t.id,!1]))}removeElements(){this.popupElements.forEach(e=>e.remove()),this.popupElements.length=0,this.popupPositioned.clear()}process(){var e,t;for(const a of this.popupElements)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.x,u=l+i.y,h=c+a.width,_=u+a.height,m=this.provider.getContainer().getBoundingClientRect(),v=c-m.left,O=m.right-h,Y=u-m.top,se=m.bottom-_,L=Math.min(a.width,a.height)/4,F=v<0?v-L:O<0?-O+L:0,he=Y<0?Y-L:se<0?-se+L:0;this.provider.panBy(F,he),this.popupPositioned.set(a.id,!0)}}else a.setCollapsed(!0),a.isCollapsed()&&a.updateMap(!1)}}class Co{constructor(e,t,a){p(this,"MapClass");p(this,"MapMarkerClass");p(this,"map");this.MapClass=e,this.MapMarkerClass=t,this.map=new this.MapClass({...a,minZoom:Math.max(a.minZoom??0,0),maxZoom:Math.min(a.maxZoom??22,24),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()}getParameters(){return{mapSize:512,zoomMin:this.map.getMinZoom()??0,zoomMax:this.map.getMaxZoom()??22,zoomScale:10}}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()}}}const To={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}}]},Ao={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}}]};class No{constructor(e,t,a){p(this,"MapClass");p(this,"MapMarkerClass");p(this,"map");this.MapClass=e,this.MapMarkerClass=t,this.map=new this.MapClass({...a,minZoom:Math.max(a.minZoom??0,0),maxZoom:Math.min(a.maxZoom??22,24),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()}getParameters(){return{mapSize:512,zoomMin:this.map.getMinZoom()??0,zoomMax:this.map.getMaxZoom()??22,zoomScale:10}}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()}}}class Lo{constructor(e,t,a,n){p(this,"MapClass");p(this,"MapMarkerClass");p(this,"map");p(this,"options");this.MapClass=e,this.MapMarkerClass=t,this.options=n,this.map=new this.MapClass(a,{...n})}getParameters(){return{mapSize:256,zoomMin:this.options.minZoom??0,zoomMax:this.options.maxZoom??24,zoomScale:10}}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}}}const Po=[{elementType:"labels.icon",stylers:[{visibility:"off"}]},{stylers:[{saturation:-100},{lightness:-10}]},{featureType:"landscape",stylers:[{lightness:30}]},{featureType:"road",elementType:"geometry",stylers:[{saturation:-100}]}],Ro=[{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}]}];z.GoogleMapDarkStyle=Ro,z.GoogleMapLightStyle=Po,z.GoogleMapsProvider=Lo,z.MapManager=So,z.MapboxProvider=No,z.MaplibreDarkStyle=To,z.MaplibreLightStyle=Ao,z.MaplibreProvider=Co,Object.defineProperty(z,Symbol.toStringTag,{value:"Module"})}));
|
|
1
|
+
(function(z,N){typeof exports=="object"&&typeof module<"u"?N(exports):typeof define=="function"&&define.amd?define(["exports"],N):(z=typeof globalThis<"u"?globalThis:z||self,N(z.arenarium={}))})(this,(function(z){"use strict";var Uo=Object.defineProperty;var vn=z=>{throw TypeError(z)};var $o=(z,N,I)=>N in z?Uo(z,N,{enumerable:!0,configurable:!0,writable:!0,value:I}):z[N]=I;var p=(z,N,I)=>$o(z,typeof N!="symbol"?N+"":N,I),Gr=(z,N,I)=>N.has(z)||vn("Cannot "+I);var k=(z,N,I)=>(Gr(z,N,"read from private field"),I?I.call(z):N.get(z)),D=(z,N,I)=>N.has(z)?vn("Cannot add the same private member more than once"):N instanceof WeakSet?N.add(z):N.set(z,I),U=(z,N,I,jt)=>(Gr(z,N,"write to private field"),jt?jt.call(z,I):N.set(z,I),I),Ue=(z,N,I)=>(Gr(z,N,"access private method"),I);var Tt,ot,Ne,At,Nt,Fe,st,Be,Le,lt,Lt,Rt,oe,xn,nr,Xr,fn,ge,ct,Pt,Ve;var I=Array.isArray,jt=Array.prototype.indexOf,wn=Array.from,ir=Object.defineProperty,ht=Object.getOwnPropertyDescriptor,bn=Object.prototype,kn=Array.prototype,Sn=Object.getPrototypeOf,Jr=Object.isExtensible;function zn(r){for(var e=0;e<r.length;e++)r[e]()}function Mn(){var r,e,t=new Promise((a,n)=>{r=a,e=n});return{promise:t,resolve:r,reject:e}}const J=2,or=4,Kr=8,mt=16,ve=32,Pe=64,Qr=128,ee=256,It=512,G=1024,le=2048,xe=4096,$e=8192,qe=16384,sr=32768,En=65536,ea=1<<17,Cn=1<<18,yt=1<<19,Tn=1<<20,lr=1<<21,cr=1<<22,Oe=1<<23,Zt=Symbol("$state"),ur=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 An(){throw new Error("https://svelte.dev/e/await_outside_boundary")}function Nn(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Ln(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 Pn(r){throw new Error("https://svelte.dev/e/effect_orphan")}function On(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function jn(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function In(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Zn(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}const Dn=2,B=Symbol();function ta(r){return r===this.v}let qo=!1,ne=null;function Dt(r){ne=r}function dr(r,e=!1,t){ne={p:ne,c:null,e:null,s:r,x:null,l:null}}function pr(r){var e=ne,t=e.e;if(t!==null){e.e=null;for(var a of t)va(a)}return r!==void 0&&(e.x=r),ne=e.p,r??{}}function ra(){return!0}const Fn=new WeakMap;function Bn(r){var e=T;if(e===null)return M.f|=Oe,r;if((e.f&sr)===0){if((e.f&Qr)===0)throw!e.parent&&r instanceof Error&&aa(r),r;e.b.error(r)}else fr(r,e)}function fr(r,e){for(;e!==null;){if((e.f&Qr)!==0)try{e.b.error(r);return}catch(t){r=t}e=e.parent}throw r instanceof Error&&aa(r),r}function aa(r){const e=Fn.get(r);e&&(ir(r,"message",{value:e.message}),ir(r,"stack",{value:e.stack}))}let We=[];function Vn(){var r=We;We=[],zn(r)}function na(r){if(We.length===0){var e=We;queueMicrotask(()=>{e===We&&Vn()})}We.push(r)}function Un(){const r=T.b;return r===null&&An(),r}function $n(r){var e=J|le,t=M!==null&&(M.f&J)!==0?M:null;return T===null||t!==null&&(t.f&ee)!==0?e|=ee:T.f|=yt,{ctx:ne,deps:null,effects:null,equals:ta,f:e,fn:r,reactions:null,rv:0,v:B,wv:0,parent:t??T,ac:null}}function qn(r,e){let t=T;t===null&&Nn();var a=t.b,n=void 0,i=ua(B),o=null,s=!M;return ni(()=>{try{var l=r();o&&Promise.resolve(l).catch(()=>{})}catch(m){l=Promise.reject(m)}var c=()=>l;n=(o==null?void 0:o.then(c,c))??Promise.resolve(l),o=n;var u=$,h=a.is_pending();s&&(a.update_pending_count(1),h||u.increment());const _=(m,v=void 0)=>{o=null,h||u.activate(),v?v!==ur&&(i.f|=Oe,_r(i,v)):((i.f&Oe)!==0&&(i.f^=Oe),_r(i,m)),s&&(a.update_pending_count(-1),h||u.decrement()),sa()};if(n.then(_,m=>_(null,m||"unknown")),u)return()=>{queueMicrotask(()=>u.neuter())}}),new Promise(l=>{function c(u){function h(){u===n?l(i):c(n)}u.then(h,h)}c(n)})}function ia(r){var e=r.effects;if(e!==null){r.effects=null;for(var t=0;t<e.length;t+=1)Ie(e[t])}}function Wn(r){for(var e=r.parent;e!==null;){if((e.f&J)===0)return e;e=e.parent}return null}function hr(r){var e,t=T;be(Wn(r));try{ia(r),e=La(r)}finally{be(t)}return e}function oa(r){var e=hr(r);if(r.equals(e)||(r.v=e,r.wv=Aa()),!Ye){var t=(ke||(r.f&ee)!==0)&&r.deps!==null?xe:G;re(r,t)}}function Hn(r,e,t){const a=$n;if(e.length===0){t(r.map(a));return}var n=$,i=T,o=Yn(),s=Un();Promise.all(e.map(l=>qn(l))).then(l=>{n==null||n.activate(),o();try{t([...r.map(a),...l])}catch(c){(i.f&qe)===0&&fr(c,i)}n==null||n.deactivate(),sa()}).catch(l=>{s.error(l)})}function Yn(){var r=T,e=M,t=ne,a=$;return function(){be(r),de(e),Dt(t),a==null||a.activate()}}function sa(){be(null),de(null),Dt(null)}const mr=new Set;let $=null,la=new Set,gt=[],yr=null,gr=!1;const Jt=class Jt{constructor(){D(this,oe);p(this,"current",new Map);D(this,Tt,new Map);D(this,ot,new Set);D(this,Ne,0);D(this,At,null);D(this,Nt,!1);D(this,Fe,[]);D(this,st,[]);D(this,Be,[]);D(this,Le,[]);D(this,lt,[]);D(this,Lt,[]);D(this,Rt,[]);p(this,"skipped_effects",new Set)}process(e){var n;gt=[];for(const i of e)Ue(this,oe,xn).call(this,i);if(k(this,Fe).length===0&&k(this,Ne)===0){Ue(this,oe,Xr).call(this);var t=k(this,Be),a=k(this,Le);U(this,Be,[]),U(this,Le,[]),U(this,lt,[]),$=null,ca(t),ca(a),$===null?$=this:mr.delete(this),(n=k(this,At))==null||n.resolve()}else Ue(this,oe,nr).call(this,k(this,Be)),Ue(this,oe,nr).call(this,k(this,Le)),Ue(this,oe,nr).call(this,k(this,lt));for(const i of k(this,Fe))Ge(i);for(const i of k(this,st))Ge(i);U(this,Fe,[]),U(this,st,[])}capture(e,t){k(this,Tt).has(e)||k(this,Tt).set(e,t),this.current.set(e,e.v)}activate(){$=this}deactivate(){$=null;for(const e of la)if(la.delete(e),e(),$!==null)break}neuter(){U(this,Nt,!0)}flush(){gt.length>0?Gn():Ue(this,oe,Xr).call(this),$===this&&(k(this,Ne)===0&&mr.delete(this),this.deactivate())}increment(){U(this,Ne,k(this,Ne)+1)}decrement(){if(U(this,Ne,k(this,Ne)-1),k(this,Ne)===0){for(const e of k(this,Lt))re(e,le),vt(e);for(const e of k(this,Rt))re(e,xe),vt(e);U(this,Be,[]),U(this,Le,[]),this.flush()}else this.deactivate()}add_callback(e){k(this,ot).add(e)}settled(){return(k(this,At)??U(this,At,Mn())).promise}static ensure(){if($===null){const e=$=new Jt;mr.add($),Jt.enqueue(()=>{$===e&&e.flush()})}return $}static enqueue(e){na(e)}};Tt=new WeakMap,ot=new WeakMap,Ne=new WeakMap,At=new WeakMap,Nt=new WeakMap,Fe=new WeakMap,st=new WeakMap,Be=new WeakMap,Le=new WeakMap,lt=new WeakMap,Lt=new WeakMap,Rt=new WeakMap,oe=new WeakSet,xn=function(e){var u;e.f^=G;for(var t=e.first;t!==null;){var a=t.f,n=(a&(ve|Pe))!==0,i=n&&(a&G)!==0,o=i||(a&$e)!==0||this.skipped_effects.has(t);if(!o&&t.fn!==null){if(n)t.f^=G;else if((a&or)!==0)k(this,Le).push(t);else if((a&G)===0)if((a&cr)!==0){var s=(u=t.b)!=null&&u.is_pending()?k(this,st):k(this,Fe);s.push(t)}else Ft(t)&&((t.f&mt)!==0&&k(this,lt).push(t),Ge(t));var l=t.first;if(l!==null){t=l;continue}}var c=t.parent;for(t=t.next;t===null&&c!==null;)t=c.next,c=c.parent}},nr=function(e){for(const t of e)((t.f&le)!==0?k(this,Lt):k(this,Rt)).push(t),re(t,G);e.length=0},Xr=function(){if(!k(this,Nt))for(const e of k(this,ot))e();k(this,ot).clear()};let _t=Jt;function Gn(){var r=He;gr=!0;try{var e=0;for(Ma(!0);gt.length>0;){var t=_t.ensure();if(e++>1e3){var a,n;Xn()}t.process(gt),we.clear()}}finally{gr=!1,Ma(r),yr=null}}function Xn(){try{On()}catch(r){fr(r,yr)}}let me=null;function ca(r){var e=r.length;if(e!==0){for(var t=0;t<e;){var a=r[t++];if((a.f&(qe|$e))===0&&Ft(a)&&(me=[],Ge(a),a.deps===null&&a.first===null&&a.nodes_start===null&&(a.teardown===null&&a.ac===null?Sa(a):a.fn=null),(me==null?void 0:me.length)>0)){we.clear();for(const n of me)Ge(n);me=[]}}me=null}}function vt(r){for(var e=yr=r;e.parent!==null;){e=e.parent;var t=e.f;if(gr&&e===T&&(t&mt)!==0)return;if((t&(Pe|ve))!==0){if((t&G)===0)return;e.f^=G}}gt.push(e)}const we=new Map;function ua(r,e){var t={f:0,v:r,reactions:null,equals:ta,rv:0,wv:0};return t}function q(r,e){const t=ua(r);return ui(t),t}function V(r,e,t=!1){M!==null&&(!ue||(M.f&ea)!==0)&&ra()&&(M.f&(J|mt|cr|ea))!==0&&!(W!=null&&W.includes(r))&&Zn();let a=t?xt(e):e;return _r(r,a)}function _r(r,e){if(!r.equals(e)){var t=r.v;Ye?we.set(r,e):we.set(r,t),r.v=e;var a=_t.ensure();a.capture(r,t),(r.f&J)!==0&&((r.f&le)!==0&&hr(r),re(r,(r.f&ee)===0?G:xe)),r.wv=Aa(),da(r,le),T!==null&&(T.f&G)!==0&&(T.f&(ve|Pe))===0&&(te===null?di([r]):te.push(r))}return e}function vr(r){V(r,r.v+1)}function da(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,s=(o&le)===0;s&&re(i,e),(o&J)!==0?da(i,xe):s&&((o&mt)!==0&&me!==null&&me.push(i),vt(i))}}function xt(r){if(typeof r!="object"||r===null||Zt in r)return r;const e=Sn(r);if(e!==bn&&e!==kn)return r;var t=new Map,a=I(r),n=q(0),i=Ze,o=s=>{if(Ze===i)return s();var l=M,c=Ze;de(null),Ta(i);var u=s();return de(l),Ta(c),u};return a&&t.set("length",q(r.length)),new Proxy(r,{defineProperty(s,l,c){(!("value"in c)||c.configurable===!1||c.enumerable===!1||c.writable===!1)&&jn();var u=t.get(l);return u===void 0?u=o(()=>{var h=q(c.value);return t.set(l,h),h}):V(u,c.value,!0),!0},deleteProperty(s,l){var c=t.get(l);if(c===void 0){if(l in s){const u=o(()=>q(B));t.set(l,u),vr(n)}}else V(c,B),vr(n);return!0},get(s,l,c){var m;if(l===Zt)return r;var u=t.get(l),h=l in s;if(u===void 0&&(!h||(m=ht(s,l))!=null&&m.writable)&&(u=o(()=>{var v=xt(h?s[l]:B),O=q(v);return O}),t.set(l,u)),u!==void 0){var _=R(u);return _===B?void 0:_}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=R(u))}else if(c===void 0){var h=t.get(l),_=h==null?void 0:h.v;if(h!==void 0&&_!==B)return{enumerable:!0,configurable:!0,value:_,writable:!0}}return c},has(s,l){var _;if(l===Zt)return!0;var c=t.get(l),u=c!==void 0&&c.v!==B||Reflect.has(s,l);if(c!==void 0||T!==null&&(!u||(_=ht(s,l))!=null&&_.writable)){c===void 0&&(c=o(()=>{var m=u?xt(s[l]):B,v=q(m);return v}),t.set(l,c));var h=R(c);if(h===B)return!1}return u},set(s,l,c,u){var F;var h=t.get(l),_=l in s;if(a&&l==="length")for(var m=c;m<h.v;m+=1){var v=t.get(m+"");v!==void 0?V(v,B):m in s&&(v=o(()=>q(B)),t.set(m+"",v))}if(h===void 0)(!_||(F=ht(s,l))!=null&&F.writable)&&(h=o(()=>q(void 0)),V(h,xt(c)),t.set(l,h));else{_=h.v!==B;var O=o(()=>xt(c));V(h,O)}var Y=Reflect.getOwnPropertyDescriptor(s,l);if(Y!=null&&Y.set&&Y.set.call(u,c),!_){if(a&&typeof l=="string"){var se=t.get("length"),L=Number(l);Number.isInteger(L)&&L>=se.v&&V(se,L+1)}vr(n)}return!0},ownKeys(s){R(n);var l=Reflect.ownKeys(s).filter(h=>{var _=t.get(h);return _===void 0||_.v!==B});for(var[c,u]of t)u.v!==B&&!(c in s)&&l.push(c);return l},setPrototypeOf(){In()}})}var pa,fa,ha,ma;function Jn(){if(pa===void 0){pa=window,fa=/Firefox/.test(navigator.userAgent);var r=Element.prototype,e=Node.prototype,t=Text.prototype;ha=ht(e,"firstChild").get,ma=ht(e,"nextSibling").get,Jr(r)&&(r.__click=void 0,r.__className=void 0,r.__attributes=null,r.__style=void 0,r.__e=void 0),Jr(t)&&(t.__t=void 0)}}function Kn(r=""){return document.createTextNode(r)}function ya(r){return ha.call(r)}function ga(r){return ma.call(r)}function xr(r,e){return ya(r)}function Qn(r,e=1,t=!1){let a=r;for(;e--;)a=ga(a);return a}function _a(r){var e=M,t=T;de(null),be(null);try{return r()}finally{de(e),be(t)}}function ei(r){T===null&&M===null&&Pn(),M!==null&&(M.f&ee)!==0&&T===null&&Rn(),Ye&&Ln()}function ti(r,e){var t=e.last;t===null?e.last=e.first=r:(t.next=r,r.prev=t,e.last=r)}function je(r,e,t,a=!0){var n=T;n!==null&&(n.f&$e)!==0&&(r|=$e);var i={ctx:ne,deps:null,nodes_start:null,nodes_end:null,f:r|le,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{Ge(i),i.f|=sr}catch(l){throw Ie(i),l}else e!==null&&vt(i);if(a){var o=i;if(t&&o.deps===null&&o.teardown===null&&o.nodes_start===null&&o.first===o.last&&(o.f&yt)===0&&(o=o.first),o!==null&&(o.parent=n,n!==null&&ti(o,n),M!==null&&(M.f&J)!==0&&(r&Pe)===0)){var s=M;(s.effects??(s.effects=[])).push(o)}}return i}function ce(r){ei();var e=T.f,t=!M&&(e&ve)!==0&&(e&sr)===0;if(t){var a=ne;(a.e??(a.e=[])).push(r)}else return va(r)}function va(r){return je(or|Tn,r,!1)}function ri(r){_t.ensure();const e=je(Pe|yt,r,!0);return(t={})=>new Promise(a=>{t.outro?li(e,()=>{Ie(e),a(void 0)}):(Ie(e),a(void 0))})}function ai(r){return je(or,r,!1)}function ni(r){return je(cr|yt,r,!0)}function xa(r,e=0){return je(Kr|e,r,!0)}function wa(r,e=[],t=[]){Hn(e,t,a=>{je(Kr,()=>r(...a.map(R)),!0)})}function ii(r,e=!0){return je(ve|yt,r,!0,e)}function ba(r){var e=r.teardown;if(e!==null){const t=Ye,a=M;Ea(!0),de(null);try{e.call(null)}finally{Ea(t),de(a)}}}function ka(r,e=!1){var t=r.first;for(r.first=r.last=null;t!==null;){const n=t.ac;n!==null&&_a(()=>{n.abort(ur)});var a=t.next;(t.f&Pe)!==0?t.parent=null:Ie(t,e),t=a}}function oi(r){for(var e=r.first;e!==null;){var t=e.next;(e.f&ve)===0&&Ie(e),e=t}}function Ie(r,e=!0){var t=!1;(e||(r.f&Cn)!==0)&&r.nodes_start!==null&&r.nodes_end!==null&&(si(r.nodes_start,r.nodes_end),t=!0),ka(r,e&&!t),Bt(r,0),re(r,qe);var a=r.transitions;if(a!==null)for(const i of a)i.stop();ba(r);var n=r.parent;n!==null&&n.first!==null&&Sa(r),r.next=r.prev=r.teardown=r.ctx=r.deps=r.fn=r.nodes_start=r.nodes_end=r.ac=null}function si(r,e){for(;r!==null;){var t=r===e?null:ga(r);r.remove(),r=t}}function Sa(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 li(r,e){var t=[];za(r,t,!0),ci(t,()=>{Ie(r),e&&e()})}function ci(r,e){var t=r.length;if(t>0){var a=()=>--t||e();for(var n of r)n.out(a)}else e()}function za(r,e,t){if((r.f&$e)===0){if(r.f^=$e,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&En)!==0||(a.f&ve)!==0;za(a,e,i?t:!1),a=n}}}let He=!1;function Ma(r){He=r}let Ye=!1;function Ea(r){Ye=r}let M=null,ue=!1;function de(r){M=r}let T=null;function be(r){T=r}let W=null;function ui(r){M!==null&&(W===null?W=[r]:W.push(r))}let H=null,K=0,te=null;function di(r){te=r}let Ca=1,wt=0,Ze=wt;function Ta(r){Ze=r}let ke=!1;function Aa(){return++Ca}function Ft(r){var h;var e=r.f;if((e&le)!==0)return!0;if((e&xe)!==0){var t=r.deps,a=(e&ee)!==0;if(t!==null){var n,i,o=(e&It)!==0,s=a&&T!==null&&!ke,l=t.length;if((o||s)&&(T===null||(T.f&qe)===0)){var c=r,u=c.parent;for(n=0;n<l;n++)i=t[n],(o||!((h=i==null?void 0:i.reactions)!=null&&h.includes(c)))&&(i.reactions??(i.reactions=[])).push(c);o&&(c.f^=It),s&&u!==null&&(u.f&ee)===0&&(c.f^=ee)}for(n=0;n<l;n++)if(i=t[n],Ft(i)&&oa(i),i.wv>r.wv)return!0}(!a||T!==null&&!ke)&&re(r,G)}return!1}function Na(r,e,t=!0){var a=r.reactions;if(a!==null&&!(W!=null&&W.includes(r)))for(var n=0;n<a.length;n++){var i=a[n];(i.f&J)!==0?Na(i,e,!1):e===i&&(t?re(i,le):(i.f&G)!==0&&re(i,xe),vt(i))}}function La(r){var O;var e=H,t=K,a=te,n=M,i=ke,o=W,s=ne,l=ue,c=Ze,u=r.f;H=null,K=0,te=null,ke=(u&ee)!==0&&(ue||!He||M===null),M=(u&(ve|Pe))===0?r:null,W=null,Dt(r.ctx),ue=!1,Ze=++wt,r.ac!==null&&(_a(()=>{r.ac.abort(ur)}),r.ac=null);try{r.f|=lr;var h=r.fn,_=h(),m=r.deps;if(H!==null){var v;if(Bt(r,K),m!==null&&K>0)for(m.length=K+H.length,v=0;v<H.length;v++)m[K+v]=H[v];else r.deps=m=H;if(!ke||(u&J)!==0&&r.reactions!==null)for(v=K;v<m.length;v++)((O=m[v]).reactions??(O.reactions=[])).push(r)}else m!==null&&K<m.length&&(Bt(r,K),m.length=K);if(ra()&&te!==null&&!ue&&m!==null&&(r.f&(J|xe|le))===0)for(v=0;v<te.length;v++)Na(te[v],r);return n!==null&&n!==r&&(wt++,te!==null&&(a===null?a=te:a.push(...te))),(r.f&Oe)!==0&&(r.f^=Oe),_}catch(Y){return Bn(Y)}finally{r.f^=lr,H=e,K=t,te=a,M=n,ke=i,W=o,Dt(s),ue=l,Ze=c}}function pi(r,e){let t=e.reactions;if(t!==null){var a=jt.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&J)!==0&&(H===null||!H.includes(e))&&(re(e,xe),(e.f&(ee|It))===0&&(e.f^=It),ia(e),Bt(e,0))}function Bt(r,e){var t=r.deps;if(t!==null)for(var a=e;a<t.length;a++)pi(r,t[a])}function Ge(r){var e=r.f;if((e&qe)===0){re(r,G);var t=T,a=He;T=r,He=!0;try{(e&mt)!==0?oi(r):ka(r),ba(r);var n=La(r);r.teardown=typeof n=="function"?n:null,r.wv=Ca;var i}finally{He=a,T=t}}}function R(r){var e=r.f,t=(e&J)!==0;if(M!==null&&!ue){var a=T!==null&&(T.f&qe)!==0;if(!a&&!(W!=null&&W.includes(r))){var n=M.deps;if((M.f&lr)!==0)r.rv<wt&&(r.rv=wt,H===null&&n!==null&&n[K]===r?K++:H===null?H=[r]:(!ke||!H.includes(r))&&H.push(r));else{(M.deps??(M.deps=[])).push(r);var i=r.reactions;i===null?r.reactions=[M]:i.includes(M)||i.push(M)}}}else if(t&&r.deps===null&&r.effects===null){var o=r,s=o.parent;s!==null&&(s.f&ee)===0&&(o.f^=ee)}if(Ye){if(we.has(r))return we.get(r);if(t){o=r;var l=o.v;return((o.f&G)===0&&o.reactions!==null||Ra(o))&&(l=hr(o)),we.set(o,l),l}}else t&&(o=r,Ft(o)&&oa(o));if((r.f&Oe)!==0)throw r.v;return r.v}function Ra(r){if(r.v===B)return!0;if(r.deps===null)return!1;for(const e of r.deps)if(we.has(e)||(e.f&J)!==0&&Ra(e))return!0;return!1}function fi(r){var e=ue;try{return ue=!0,r()}finally{ue=e}}const hi=-7169;function re(r,e){r.f=r.f&hi|e}const mi=["touchstart","touchmove"];function yi(r){return mi.includes(r)}const gi=new Set,Pa=new Set;let Oa=null;function Vt(r){var L;var e=this,t=e.ownerDocument,a=r.type,n=((L=r.composedPath)==null?void 0:L.call(r))||[],i=n[0]||r.target;Oa=r;var o=0,s=Oa===r&&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){ir(r,"currentTarget",{configurable:!0,get(){return i||t}});var u=M,h=T;de(null),be(null);try{for(var _,m=[];i!==null;){var v=i.assignedSlot||i.parentNode||i.host||null;try{var O=i["__"+a];if(O!=null&&(!i.disabled||r.target===i))if(I(O)){var[Y,...se]=O;Y.apply(i,[r,...se])}else O.call(i,r)}catch(F){_?m.push(F):_=F}if(r.cancelBubble||v===e||v===null)break;i=v}if(_){for(let F of m)queueMicrotask(()=>{throw F});throw _}}finally{r.__root=e,delete r.currentTarget,de(u),be(h)}}}function _i(r){var e=document.createElement("template");return e.innerHTML=r.replaceAll("<!>","<!---->"),e.content}function vi(r,e){var t=T;t.nodes_start===null&&(t.nodes_start=r,t.nodes_end=e)}function ja(r,e){var t=(e&Dn)!==0,a,n=!r.startsWith("<!>");return()=>{a===void 0&&(a=_i(n?r:"<!>"+r),a=ya(a));var i=t||fa?document.importNode(a,!0):a.cloneNode(!0);return vi(i,i),i}}function Ia(r,e){r!==null&&r.before(e)}function wr(r,e){return xi(r,e)}const Xe=new Map;function xi(r,{target:e,anchor:t,props:a={},events:n,context:i,intro:o=!0}){Jn();var s=new Set,l=h=>{for(var _=0;_<h.length;_++){var m=h[_];if(!s.has(m)){s.add(m);var v=yi(m);e.addEventListener(m,Vt,{passive:v});var O=Xe.get(m);O===void 0?(document.addEventListener(m,Vt,{passive:v}),Xe.set(m,1)):Xe.set(m,O+1)}}};l(wn(gi)),Pa.add(l);var c=void 0,u=ri(()=>{var h=t??e.appendChild(Kn());return ii(()=>{if(i){dr({});var _=ne;_.c=i}n&&(a.$$events=n),c=r(h,a)||{},i&&pr()}),()=>{var v;for(var _ of s){e.removeEventListener(_,Vt);var m=Xe.get(_);--m===0?(document.removeEventListener(_,Vt),Xe.delete(_)):Xe.set(_,m)}Pa.delete(l),h!==t&&((v=h.parentNode)==null||v.removeChild(h))}});return wi.set(c,u),c}let wi=new WeakMap;function Za(r){var e,t,a="";if(typeof r=="string"||typeof r=="number")a+=r;else if(typeof r=="object")if(Array.isArray(r)){var n=r.length;for(e=0;e<n;e++)r[e]&&(t=Za(r[e]))&&(a&&(a+=" "),a+=t)}else for(t in r)r[t]&&(a&&(a+=" "),a+=t);return a}function bi(){for(var r,e,t=0,a="",n=arguments.length;t<n;t++)(r=arguments[t])&&(e=Za(r))&&(a&&(a+=" "),a+=e);return a}function Da(r){return typeof r=="object"?bi(r):r??""}function ki(r,e,t){var a=r==null?"":""+r;return e&&(a=a?a+" "+e:e),a===""?null:a}function Si(r,e){return r==null?null:String(r)}function Fa(r,e,t,a,n,i){var o=r.__className;if(o!==t||o===void 0){var s=ki(t,a);s==null?r.removeAttribute("class"):r.className=s,r.__className=t}return i}function Ut(r,e,t,a){var n=r.__style;if(n!==e){var i=Si(e);i==null?r.removeAttribute("style"):r.style.cssText=i,r.__style=e}return a}const zi=()=>performance.now(),pe={tick:r=>requestAnimationFrame(r),now:()=>zi(),tasks:new Set};function Ba(){const r=pe.now();pe.tasks.forEach(e=>{e.c(r)||(pe.tasks.delete(e),e.f())}),pe.tasks.size!==0&&pe.tick(Ba)}function Mi(r){let e;return pe.tasks.size===0&&pe.tick(Ba),{promise:new Promise(t=>{pe.tasks.add(e={c:r,f:t})}),abort(){pe.tasks.delete(e)}}}function Va(r,e){return r===e||(r==null?void 0:r[Zt])===e}function Je(r={},e,t,a){return ai(()=>{var n,i;return xa(()=>{n=i,i=[],fi(()=>{r!==t(...i)&&(e(r,...i),n&&Va(t(...n),r)&&e(null,...n))})}),()=>{na(()=>{i&&Va(t(...i),r)&&e(null,...i)})}}),r}const Ei="5";typeof window<"u"&&((fn=window.__svelte??(window.__svelte={})).v??(fn.v=new Set)).add(Ei);function Ci(r){return r}function br(r){return-.5*(Math.cos(Math.PI*r)-1)}function Ti(r){const e=Math.cos(r*Math.PI*.5);return Math.abs(e)<1e-14?1:1-e}function Ai(r){return Math.sin(r*Math.PI/2)}const Ni=128,Li=0,Ri=1,Pi=2;class Oi{constructor(){p(this,"animationsStarted",!1);p(this,"animationsCount",0);p(this,"animationsLimit",Ni);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 Se=new Oi;function Ua(r){return Object.prototype.toString.call(r)==="[object Date]"}function kr(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)=>kr(r[i],n));return n=>a.map(i=>i(n))}if(t==="object"){if(!r||!e)throw new Error("Object cannot be null");if(Ua(r)&&Ua(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]=kr(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 Wr=class Wr{constructor(e,t={}){D(this,ge);D(this,ct);D(this,Pt);D(this,Ve,null);U(this,ge,q(e)),U(this,ct,q(e)),U(this,Pt,t)}static of(e,t){const a=new Wr(e(),t);return xa(()=>{a.set(e())}),a}set(e,t){var h;V(k(this,ct),e);let{delay:a=0,duration:n=400,easing:i=Ci,interpolate:o=kr}={...k(this,Pt),...t};if(n===0)return(h=k(this,Ve))==null||h.abort(),V(k(this,ge),e),Promise.resolve();const s=pe.now()+a;let l,c=!1,u=k(this,Ve);return U(this,Ve,Mi(_=>{if(_<s)return!0;if(!c){c=!0;const v=k(this,ge).v;l=o(v,e),typeof n=="function"&&(n=n(v,e)),u==null||u.abort()}const m=_-s;return m>n?(V(k(this,ge),e),!1):(V(k(this,ge),l(i(m/n))),!0)})),k(this,Ve).promise}get current(){return R(k(this,ge))}get target(){return R(k(this,ct))}set target(e){this.set(e)}};ge=new WeakMap,ct=new WeakMap,Pt=new WeakMap,Ve=new WeakMap;let Sr=Wr;class $t{constructor(e,t){p(this,"value");p(this,"motion");this.value=e,this.motion=new Sr(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 ji=ja('<div><div class="body svelte-zz3jrb"></div></div>');function Ii(r,e){dr(e,!0);let t,a;function n(){return a}let i=q(!1);function o(j){V(i,j,!0)}function s(){return R(i)}let l=q(!0),c=0,u=150;function h(j){j!=R(l)&&(V(l,j,!0),c=performance.now())}function _(){return performance.now()-c<u?v.motion.current==0:v.value==0}let m=0,v=new $t(0,{easing:br});ce(()=>{R(i)==!1&&(v.snap(),Se.clear(e.priority,e.id))}),ce(()=>{v.set(R(l)?0:m,{duration:75})}),ce(()=>{O(v.motion.current)});function O(j){t&&Se.equeue(e.layer,e.priority,e.id,()=>{t.style.scale=j.toString(),t.style.filter=`brightness(${.25+.75*j})`,a.style.opacity=j.toString()})}function Y(j){j!=m&&(m=j,v.set(j,{duration:75}))}function se(){return v.value}var L={getBody:n,setDisplayed:o,getDisplayed:s,setCollapsed:h,getCollapsed:_,setScale:Y,getScale:se},F=ji(),he=xr(F);return Je(he,j=>a=j,()=>a),Je(F,j=>t=j,()=>t),wa(()=>{Fa(F,1,Da(["pin",R(i)&&"displayed"]),"svelte-zz3jrb"),Ut(F,`width: ${e.width}px; height: ${e.height}px; border-radius: ${e.radius}px`),Ut(he,`width: ${e.width-4}px; height: ${e.height-4}px; border-radius: ${e.radius-2}px`)}),Ia(r,F),pr(L)}var bt;(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?{x:0,y:s*Math.sin(c)-o}:{x:s*Math.cos(c)-i,y:0}:n<180-l?{x:s*Math.cos(c)-i,y:0}:{x:-t,y:s*Math.sin(c)-o}:n<270?n<180+l?{x:-t,y:s*Math.sin(c)-o}:{x:s*Math.cos(c)-i,y:-a}:n<360-l?{x:s*Math.cos(c)-i,y:-a}:{x:0,y:s*Math.sin(c)-o}}r.getOffsets=e})(bt||(bt={}));var Zi=ja('<div><div class="pointer svelte-11extwn"></div> <div class="bubble svelte-11extwn"><div class="body svelte-11extwn"></div></div></div>');function $a(r,e){dr(e,!0);let t,a,n,i;const o=e.width+2*e.margin,s=e.height+2*e.margin,l=()=>i;ce(()=>{n.style.width=`${e.margin*4}px`,n.style.height=`${e.margin*4}px`});let c=q(!0);function u(A){V(c,A,!0)}function h(){return R(c)}let _=q(!0),m=0,v=300;function O(A){A!=R(_)&&(V(_,A,!0),m=performance.now())}function Y(){return performance.now()-m<v?L.motion.current==0:L.value==0}function se(){return performance.now()-m<v?L.motion.current==1:L.value==1}let L=new $t(0);ce(()=>{R(c)==!1&&(L.snap(),Se.clear(e.priority,e.id+"_scale"))}),ce(()=>{R(_)==!0&&L.value!=0&&(Se.stacked()?L.set(0,{duration:0}):L.set(0,{duration:150,easing:Ti})),R(_)==!1&&L.value!=1&&L.set(1,{duration:150,easing:Ai})}),ce(()=>{F(L.motion.current)});function F(A){!t||!a||!n||Se.equeue(R(_)?0:e.layer,e.priority,e.id+"_scale",()=>{t.style.opacity=`${A}`,a.style.scale=`${A}`,n.style.scale=`${A}`})}let he=NaN,j=q(!1),Re=new $t(-o/2,{easing:br}),er=new $t(-s/2,{easing:br});ce(()=>{R(c)==!1&&(Re.snap(),Re.snap(),Se.clear(e.priority,e.id+"_angle"))}),ce(()=>{R(_)==!0&&R(j)&&(Re.update({duration:75}),Re.update({duration:75}))}),ce(()=>{hn(Re.motion.current,er.motion.current)});function hn(A,rr){if(!t||!a||!n)return;const _e=A+o/2,ar=rr+s/2,pt=s<o?_e*s/o:_e,ft=s>o?ar*o/s:ar,Zo=Math.atan2(ft,pt)/Math.PI*180-45,gn=0,Do=30,Yr=Math.sqrt(pt*pt+ft*ft),Ot=Math.min(o,s)/2,Fo=Ot*Math.SQRT2,Bo=(Yr-Ot)/(Fo-Ot),_n=gn+Bo*(Do-gn),Vo=Yr<Ot?Yr/Ot:1;Se.equeue(e.layer,e.priority,e.id+"_angle",()=>{a.style.transform=`translate(${Math.round(A)}px, ${Math.round(rr)}px)`,n.style.transform=`scale(${Vo}) rotate(${Zo}deg) skew(${_n}deg, ${_n}deg)`})}function Oo(A,rr){if(R(j)==!1||rr==!0){let _e=bt.getOffsets(o,s,A);Re.set(Math.round(_e.x),{duration:0}),er.set(Math.round(_e.y),{duration:0}),hn(Re.value,er.value),he=A,V(j,!0)}else if(A!=he){let _e=Math.abs(A-he),ar=_e<180?_e:360-_e,pt=Math.log(ar)*75,ft=bt.getOffsets(o,s,A);Re.set(Math.round(ft.x),{duration:pt}),er.set(Math.round(ft.y),{duration:pt}),he=A}}function jo(){return bt.getOffsets(o,s,he)}var Io={getBody:l,setDisplayed:u,getDisplayed:h,setCollapsed:O,getCollapsed:Y,getExpanded:se,setAngle:Oo,getOffsets:jo},tr=Zi(),mn=xr(tr);Je(mn,A=>n=A,()=>n);var Hr=Qn(mn,2),yn=xr(Hr);return Je(yn,A=>i=A,()=>i),Je(Hr,A=>a=A,()=>a),Je(tr,A=>t=A,()=>t),wa(()=>{Fa(tr,1,Da(["anchor",R(c)&&"displayed"]),"svelte-11extwn"),Ut(Hr,`margin: ${e.margin}px;`),Ut(yn,`width: ${e.width}px; height: ${e.height}px; border-radius: ${e.radius}px;`)}),Ia(r,tr),pr(Io)}var Ke;(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}})(Ke||(Ke={}));class qa{constructor(e,t,a,n,i){p(this,"swLat");p(this,"swLng");p(this,"neLat");p(this,"neLng");const o=a*Math.pow(2,t),s=Ke.project(e.sw.lat,e.sw.lng,o),l=Ke.project(e.ne.lat,e.ne.lng,o),c=s.x-n,u=s.y+i,h=l.x+n,_=l.y-i,m=Ke.unproject(c,u,o),v=Ke.unproject(h,_,o);this.swLat=m.lat,this.swLng=m.lng,this.neLat=v.lat,this.neLng=v.lng}contains(e,t){return this.swLat<=e&&e<=this.neLat?this.swLng<this.neLng?this.swLng<=t&&t<=this.neLng:t<=this.neLng||this.swLng<=t:!1}}var C;(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})(C||(C={}));var Wa;(function(r){r.mergeShapes=(e,t)=>({...e,...t})})(Wa||(Wa={}));const y=C.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),ze=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=C.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 ae 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 ae))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,C.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()}}ae.create=r=>new ae(r);const kt=(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,C.jsonStringifyReplacer)}`;break;case d.unrecognized_keys:t=`Unrecognized key(s) in object: ${C.joinValues(r.keys,", ")}`;break;case d.invalid_union:t="Invalid input";break;case d.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${C.joinValues(r.options)}`;break;case d.invalid_enum_value:t=`Invalid enum value. Expected ${C.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}"`:C.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,C.assertNever(r)}return{message:t}};let Di=kt;function zr(){return Di}const Mr=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 f(r,e){const t=zr(),a=Mr({issueData:e,data:r.data,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,t,t===kt?void 0:kt].filter(n=>!!n)});r.common.issues.push(a)}class Q{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 x;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 Q.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 x;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 x=Object.freeze({status:"aborted"}),St=r=>({status:"dirty",value:r}),X=r=>({status:"valid",value:r}),Ha=r=>r.status==="aborted",Ya=r=>r.status==="dirty",Qe=r=>r.status==="valid",qt=r=>typeof Promise<"u"&&r instanceof Promise;var g;(function(r){r.errToObj=e=>typeof e=="string"?{message:e}:e||{},r.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(g||(g={}));class Me{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 Ga=(r,e)=>{if(Qe(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 ae(r.common.issues);return this._error=t,this._error}}};function S(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 E{get description(){return this._def.description}_getType(e){return ze(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:ze(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Q,ctx:{common:e.parent.common,data:e.data,parsedType:ze(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(qt(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:ze(e)},n=this._parseSync({data:e,path:a.path,parent:a});return Ga(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:ze(e)};if(!this["~standard"].async)try{const i=this._parseSync({data:e,path:[],parent:t});return Qe(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=>Qe(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:ze(e)},n=this._parse({data:e,path:a.path,parent:a}),i=await(qt(n)?n:Promise.resolve(n));return Ga(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 nt({schema:this,typeName:w.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 Te.create(this,this._def)}nullable(){return it.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return fe.create(this)}promise(){return Ct.create(this,this._def)}or(e){return Ht.create([this,e],this._def)}and(e){return Yt.create(this,e,this._def)}transform(e){return new nt({...S(this._def),schema:this,typeName:w.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new Lr({...S(this._def),innerType:this,defaultValue:t,typeName:w.ZodDefault})}brand(){return new lo({typeName:w.ZodBranded,type:this,...S(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new Rr({...S(this._def),innerType:this,catchValue:t,typeName:w.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return Pr.create(this,e)}readonly(){return Or.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Fi=/^c[^\s-]{8,}$/i,Bi=/^[0-9a-z]+$/,Vi=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Ui=/^[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,$i=/^[a-z0-9_-]{21}$/i,qi=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Wi=/^[-+]?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)?)??$/,Hi=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Yi="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Er;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])$/,Xi=/^(?:(?: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])$/,Ji=/^(([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]))$/,Ki=/^(([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])$/,Qi=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,eo=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Xa="((\\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])))",to=new RegExp(`^${Xa}$`);function Ja(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 ro(r){return new RegExp(`^${Ja(r)}$`)}function ao(r){let e=`${Xa}T${Ja(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 no(r,e){return!!((e==="v4"||!e)&&Gi.test(r)||(e==="v6"||!e)&&Ji.test(r))}function io(r,e){if(!qi.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 oo(r,e){return!!((e==="v4"||!e)&&Xi.test(r)||(e==="v6"||!e)&&Ki.test(r))}class Ee extends E{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==y.string){const i=this._getOrReturnCtx(e);return f(i,{code:d.invalid_type,expected:y.string,received:i.parsedType}),x}const a=new Q;let n;for(const i of this._def.checks)if(i.kind==="min")e.data.length<i.value&&(n=this._getOrReturnCtx(e,n),f(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),f(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?f(n,{code:d.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):s&&f(n,{code:d.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),a.dirty())}else if(i.kind==="email")Hi.test(e.data)||(n=this._getOrReturnCtx(e,n),f(n,{validation:"email",code:d.invalid_string,message:i.message}),a.dirty());else if(i.kind==="emoji")Er||(Er=new RegExp(Yi,"u")),Er.test(e.data)||(n=this._getOrReturnCtx(e,n),f(n,{validation:"emoji",code:d.invalid_string,message:i.message}),a.dirty());else if(i.kind==="uuid")Ui.test(e.data)||(n=this._getOrReturnCtx(e,n),f(n,{validation:"uuid",code:d.invalid_string,message:i.message}),a.dirty());else if(i.kind==="nanoid")$i.test(e.data)||(n=this._getOrReturnCtx(e,n),f(n,{validation:"nanoid",code:d.invalid_string,message:i.message}),a.dirty());else if(i.kind==="cuid")Fi.test(e.data)||(n=this._getOrReturnCtx(e,n),f(n,{validation:"cuid",code:d.invalid_string,message:i.message}),a.dirty());else if(i.kind==="cuid2")Bi.test(e.data)||(n=this._getOrReturnCtx(e,n),f(n,{validation:"cuid2",code:d.invalid_string,message:i.message}),a.dirty());else if(i.kind==="ulid")Vi.test(e.data)||(n=this._getOrReturnCtx(e,n),f(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),f(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),f(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),f(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),f(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),f(n,{code:d.invalid_string,validation:{endsWith:i.value},message:i.message}),a.dirty()):i.kind==="datetime"?ao(i).test(e.data)||(n=this._getOrReturnCtx(e,n),f(n,{code:d.invalid_string,validation:"datetime",message:i.message}),a.dirty()):i.kind==="date"?to.test(e.data)||(n=this._getOrReturnCtx(e,n),f(n,{code:d.invalid_string,validation:"date",message:i.message}),a.dirty()):i.kind==="time"?ro(i).test(e.data)||(n=this._getOrReturnCtx(e,n),f(n,{code:d.invalid_string,validation:"time",message:i.message}),a.dirty()):i.kind==="duration"?Wi.test(e.data)||(n=this._getOrReturnCtx(e,n),f(n,{validation:"duration",code:d.invalid_string,message:i.message}),a.dirty()):i.kind==="ip"?no(e.data,i.version)||(n=this._getOrReturnCtx(e,n),f(n,{validation:"ip",code:d.invalid_string,message:i.message}),a.dirty()):i.kind==="jwt"?io(e.data,i.alg)||(n=this._getOrReturnCtx(e,n),f(n,{validation:"jwt",code:d.invalid_string,message:i.message}),a.dirty()):i.kind==="cidr"?oo(e.data,i.version)||(n=this._getOrReturnCtx(e,n),f(n,{validation:"cidr",code:d.invalid_string,message:i.message}),a.dirty()):i.kind==="base64"?Qi.test(e.data)||(n=this._getOrReturnCtx(e,n),f(n,{validation:"base64",code:d.invalid_string,message:i.message}),a.dirty()):i.kind==="base64url"?eo.test(e.data)||(n=this._getOrReturnCtx(e,n),f(n,{validation:"base64url",code:d.invalid_string,message:i.message}),a.dirty()):C.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,...g.errToObj(a)})}_addCheck(e){return new Ee({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...g.errToObj(e)})}url(e){return this._addCheck({kind:"url",...g.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...g.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...g.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...g.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...g.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...g.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...g.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...g.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...g.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...g.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...g.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...g.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,...g.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,...g.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...g.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...g.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t==null?void 0:t.position,...g.errToObj(t==null?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...g.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...g.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...g.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...g.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...g.errToObj(t)})}nonempty(e){return this.min(1,g.errToObj(e))}trim(){return new Ee({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Ee({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Ee({...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}}Ee.create=r=>new Ee({checks:[],typeName:w.ZodString,coerce:(r==null?void 0:r.coerce)??!1,...S(r)});function so(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 et extends E{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 f(i,{code:d.invalid_type,expected:y.number,received:i.parsedType}),x}let a;const n=new Q;for(const i of this._def.checks)i.kind==="int"?C.isInteger(e.data)||(a=this._getOrReturnCtx(e,a),f(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),f(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),f(a,{code:d.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty()):i.kind==="multipleOf"?so(e.data,i.value)!==0&&(a=this._getOrReturnCtx(e,a),f(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),f(a,{code:d.not_finite,message:i.message}),n.dirty()):C.assertNever(i);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,g.toString(t))}gt(e,t){return this.setLimit("min",e,!1,g.toString(t))}lte(e,t){return this.setLimit("max",e,!0,g.toString(t))}lt(e,t){return this.setLimit("max",e,!1,g.toString(t))}setLimit(e,t,a,n){return new et({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:a,message:g.toString(n)}]})}_addCheck(e){return new et({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:g.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:g.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:g.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:g.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:g.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:g.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:g.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:g.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:g.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"&&C.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)}}et.create=r=>new et({checks:[],typeName:w.ZodNumber,coerce:(r==null?void 0:r.coerce)||!1,...S(r)});class zt extends E{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 Q;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),f(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),f(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),f(a,{code:d.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):C.assertNever(i);return{status:n.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return f(t,{code:d.invalid_type,expected:y.bigint,received:t.parsedType}),x}gte(e,t){return this.setLimit("min",e,!0,g.toString(t))}gt(e,t){return this.setLimit("min",e,!1,g.toString(t))}lte(e,t){return this.setLimit("max",e,!0,g.toString(t))}lt(e,t){return this.setLimit("max",e,!1,g.toString(t))}setLimit(e,t,a,n){return new zt({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:a,message:g.toString(n)}]})}_addCheck(e){return new zt({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:g.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:g.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:g.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:g.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:g.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}}zt.create=r=>new zt({checks:[],typeName:w.ZodBigInt,coerce:(r==null?void 0:r.coerce)??!1,...S(r)});class Cr extends E{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==y.boolean){const a=this._getOrReturnCtx(e);return f(a,{code:d.invalid_type,expected:y.boolean,received:a.parsedType}),x}return X(e.data)}}Cr.create=r=>new Cr({typeName:w.ZodBoolean,coerce:(r==null?void 0:r.coerce)||!1,...S(r)});class Wt extends E{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==y.date){const i=this._getOrReturnCtx(e);return f(i,{code:d.invalid_type,expected:y.date,received:i.parsedType}),x}if(Number.isNaN(e.data.getTime())){const i=this._getOrReturnCtx(e);return f(i,{code:d.invalid_date}),x}const a=new Q;let n;for(const i of this._def.checks)i.kind==="min"?e.data.getTime()<i.value&&(n=this._getOrReturnCtx(e,n),f(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),f(n,{code:d.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),a.dirty()):C.assertNever(i);return{status:a.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Wt({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:g.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:g.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}}Wt.create=r=>new Wt({checks:[],coerce:(r==null?void 0:r.coerce)||!1,typeName:w.ZodDate,...S(r)});class Ka extends E{_parse(e){if(this._getType(e)!==y.symbol){const a=this._getOrReturnCtx(e);return f(a,{code:d.invalid_type,expected:y.symbol,received:a.parsedType}),x}return X(e.data)}}Ka.create=r=>new Ka({typeName:w.ZodSymbol,...S(r)});class Qa extends E{_parse(e){if(this._getType(e)!==y.undefined){const a=this._getOrReturnCtx(e);return f(a,{code:d.invalid_type,expected:y.undefined,received:a.parsedType}),x}return X(e.data)}}Qa.create=r=>new Qa({typeName:w.ZodUndefined,...S(r)});class en extends E{_parse(e){if(this._getType(e)!==y.null){const a=this._getOrReturnCtx(e);return f(a,{code:d.invalid_type,expected:y.null,received:a.parsedType}),x}return X(e.data)}}en.create=r=>new en({typeName:w.ZodNull,...S(r)});class Tr extends E{constructor(){super(...arguments),this._any=!0}_parse(e){return X(e.data)}}Tr.create=r=>new Tr({typeName:w.ZodAny,...S(r)});class tt extends E{constructor(){super(...arguments),this._unknown=!0}_parse(e){return X(e.data)}}tt.create=r=>new tt({typeName:w.ZodUnknown,...S(r)});class Ce extends E{_parse(e){const t=this._getOrReturnCtx(e);return f(t,{code:d.invalid_type,expected:y.never,received:t.parsedType}),x}}Ce.create=r=>new Ce({typeName:w.ZodNever,...S(r)});class Ar extends E{_parse(e){if(this._getType(e)!==y.undefined){const a=this._getOrReturnCtx(e);return f(a,{code:d.invalid_type,expected:y.void,received:a.parsedType}),x}return X(e.data)}}Ar.create=r=>new Ar({typeName:w.ZodVoid,...S(r)});class fe extends E{_parse(e){const{ctx:t,status:a}=this._processInputParams(e),n=this._def;if(t.parsedType!==y.array)return f(t,{code:d.invalid_type,expected:y.array,received:t.parsedType}),x;if(n.exactLength!==null){const o=t.data.length>n.exactLength.value,s=t.data.length<n.exactLength.value;(o||s)&&(f(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&&(f(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&&(f(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 Me(t,o,t.path,s)))).then(o=>Q.mergeArray(a,o));const i=[...t.data].map((o,s)=>n.type._parseSync(new Me(t,o,t.path,s)));return Q.mergeArray(a,i)}get element(){return this._def.type}min(e,t){return new fe({...this._def,minLength:{value:e,message:g.toString(t)}})}max(e,t){return new fe({...this._def,maxLength:{value:e,message:g.toString(t)}})}length(e,t){return new fe({...this._def,exactLength:{value:e,message:g.toString(t)}})}nonempty(e){return this.min(1,e)}}fe.create=(r,e)=>new fe({type:r,minLength:null,maxLength:null,exactLength:null,typeName:w.ZodArray,...S(e)});function rt(r){if(r instanceof Z){const e={};for(const t in r.shape){const a=r.shape[t];e[t]=Te.create(rt(a))}return new Z({...r._def,shape:()=>e})}else return r instanceof fe?new fe({...r._def,type:rt(r.element)}):r instanceof Te?Te.create(rt(r.unwrap())):r instanceof it?it.create(rt(r.unwrap())):r instanceof ye?ye.create(r.items.map(e=>rt(e))):r}class Z extends E{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=C.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 f(c,{code:d.invalid_type,expected:y.object,received:c.parsedType}),x}const{status:a,ctx:n}=this._processInputParams(e),{shape:i,keys:o}=this._getCached(),s=[];if(!(this._def.catchall instanceof Ce&&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],h=n.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Me(n,h,n.path,c)),alwaysSet:c in n.data})}if(this._def.catchall instanceof Ce){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&&(f(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 h=n.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new Me(n,h,n.path,u)),alwaysSet:u in n.data})}}return n.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const h=await u.key,_=await u.value;c.push({key:h,value:_,alwaysSet:u.alwaysSet})}return c}).then(c=>Q.mergeObjectSync(a,c)):Q.mergeObjectSync(a,l)}get shape(){return this._def.shape()}strict(e){return g.errToObj,new Z({...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:g.errToObj(e).message??n}:{message:n}}}:{}})}strip(){return new Z({...this._def,unknownKeys:"strip"})}passthrough(){return new Z({...this._def,unknownKeys:"passthrough"})}extend(e){return new Z({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new Z({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:w.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new Z({...this._def,catchall:e})}pick(e){const t={};for(const a of C.objectKeys(e))e[a]&&this.shape[a]&&(t[a]=this.shape[a]);return new Z({...this._def,shape:()=>t})}omit(e){const t={};for(const a of C.objectKeys(this.shape))e[a]||(t[a]=this.shape[a]);return new Z({...this._def,shape:()=>t})}deepPartial(){return rt(this)}partial(e){const t={};for(const a of C.objectKeys(this.shape)){const n=this.shape[a];e&&!e[a]?t[a]=n:t[a]=n.optional()}return new Z({...this._def,shape:()=>t})}required(e){const t={};for(const a of C.objectKeys(this.shape))if(e&&!e[a])t[a]=this.shape[a];else{let i=this.shape[a];for(;i instanceof Te;)i=i._def.innerType;t[a]=i}return new Z({...this._def,shape:()=>t})}keyof(){return nn(C.objectKeys(this.shape))}}Z.create=(r,e)=>new Z({shape:()=>r,unknownKeys:"strip",catchall:Ce.create(),typeName:w.ZodObject,...S(e)}),Z.strictCreate=(r,e)=>new Z({shape:()=>r,unknownKeys:"strict",catchall:Ce.create(),typeName:w.ZodObject,...S(e)}),Z.lazycreate=(r,e)=>new Z({shape:r,unknownKeys:"strip",catchall:Ce.create(),typeName:w.ZodObject,...S(e)});class Ht extends E{_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 ae(s.ctx.common.issues));return f(t,{code:d.invalid_union,unionErrors:o}),x}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 ae(l));return f(t,{code:d.invalid_union,unionErrors:s}),x}}get options(){return this._def.options}}Ht.create=(r,e)=>new Ht({options:r,typeName:w.ZodUnion,...S(e)});function Nr(r,e){const t=ze(r),a=ze(e);if(r===e)return{valid:!0,data:r};if(t===y.object&&a===y.object){const n=C.objectKeys(e),i=C.objectKeys(r).filter(s=>n.indexOf(s)!==-1),o={...r,...e};for(const s of i){const l=Nr(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=Nr(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 Yt extends E{_parse(e){const{status:t,ctx:a}=this._processInputParams(e),n=(i,o)=>{if(Ha(i)||Ha(o))return x;const s=Nr(i.value,o.value);return s.valid?((Ya(i)||Ya(o))&&t.dirty(),{status:t.value,value:s.data}):(f(a,{code:d.invalid_intersection_types}),x)};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}))}}Yt.create=(r,e,t)=>new Yt({left:r,right:e,typeName:w.ZodIntersection,...S(t)});class ye extends E{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==y.array)return f(a,{code:d.invalid_type,expected:y.array,received:a.parsedType}),x;if(a.data.length<this._def.items.length)return f(a,{code:d.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),x;!this._def.rest&&a.data.length>this._def.items.length&&(f(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 Me(a,o,a.path,s)):null}).filter(o=>!!o);return a.common.async?Promise.all(i).then(o=>Q.mergeArray(t,o)):Q.mergeArray(t,i)}get items(){return this._def.items}rest(e){return new ye({...this._def,rest:e})}}ye.create=(r,e)=>{if(!Array.isArray(r))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ye({items:r,typeName:w.ZodTuple,rest:null,...S(e)})};class tn extends E{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 f(a,{code:d.invalid_type,expected:y.map,received:a.parsedType}),x;const n=this._def.keyType,i=this._def.valueType,o=[...a.data.entries()].map(([s,l],c)=>({key:n._parse(new Me(a,s,a.path,[c,"key"])),value:i._parse(new Me(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 x;(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 x;(c.status==="dirty"||u.status==="dirty")&&t.dirty(),s.set(c.value,u.value)}return{status:t.value,value:s}}}}tn.create=(r,e,t)=>new tn({valueType:e,keyType:r,typeName:w.ZodMap,...S(t)});class Mt extends E{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==y.set)return f(a,{code:d.invalid_type,expected:y.set,received:a.parsedType}),x;const n=this._def;n.minSize!==null&&a.data.size<n.minSize.value&&(f(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&&(f(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 x;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 Me(a,l,a.path,c)));return a.common.async?Promise.all(s).then(l=>o(l)):o(s)}min(e,t){return new Mt({...this._def,minSize:{value:e,message:g.toString(t)}})}max(e,t){return new Mt({...this._def,maxSize:{value:e,message:g.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}Mt.create=(r,e)=>new Mt({valueType:r,minSize:null,maxSize:null,typeName:w.ZodSet,...S(e)});class Et extends E{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==y.function)return f(t,{code:d.invalid_type,expected:y.function,received:t.parsedType}),x;function a(s,l){return Mr({data:s,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,zr(),kt].filter(c=>!!c),issueData:{code:d.invalid_arguments,argumentsError:l}})}function n(s,l){return Mr({data:s,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,zr(),kt].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 Ct){const s=this;return X(async function(...l){const c=new ae([]),u=await s._def.args.parseAsync(l,i).catch(m=>{throw c.addIssue(a(l,m)),c}),h=await Reflect.apply(o,this,u);return await s._def.returns._def.type.parseAsync(h,i).catch(m=>{throw c.addIssue(n(h,m)),c})})}else{const s=this;return X(function(...l){const c=s._def.args.safeParse(l,i);if(!c.success)throw new ae([a(l,c.error)]);const u=Reflect.apply(o,this,c.data),h=s._def.returns.safeParse(u,i);if(!h.success)throw new ae([n(u,h.error)]);return h.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new Et({...this._def,args:ye.create(e).rest(tt.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||ye.create([]).rest(tt.create()),returns:t||tt.create(),typeName:w.ZodFunction,...S(a)})}}class rn extends E{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})}}rn.create=(r,e)=>new rn({getter:r,typeName:w.ZodLazy,...S(e)});class an extends E{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return f(t,{received:t.data,code:d.invalid_literal,expected:this._def.value}),x}return{status:"valid",value:e.data}}get value(){return this._def.value}}an.create=(r,e)=>new an({value:r,typeName:w.ZodLiteral,...S(e)});function nn(r,e){return new at({values:r,typeName:w.ZodEnum,...S(e)})}class at extends E{_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),a=this._def.values;return f(t,{expected:C.joinValues(a),received:t.parsedType,code:d.invalid_type}),x}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 f(t,{received:t.data,code:d.invalid_enum_value,options:a}),x}return X(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 at.create(e,{...this._def,...t})}exclude(e,t=this._def){return at.create(this.options.filter(a=>!e.includes(a)),{...this._def,...t})}}at.create=nn;class on extends E{_parse(e){const t=C.getValidEnumValues(this._def.values),a=this._getOrReturnCtx(e);if(a.parsedType!==y.string&&a.parsedType!==y.number){const n=C.objectValues(t);return f(a,{expected:C.joinValues(n),received:a.parsedType,code:d.invalid_type}),x}if(this._cache||(this._cache=new Set(C.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const n=C.objectValues(t);return f(a,{received:a.data,code:d.invalid_enum_value,options:n}),x}return X(e.data)}get enum(){return this._def.values}}on.create=(r,e)=>new on({values:r,typeName:w.ZodNativeEnum,...S(e)});class Ct extends E{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==y.promise&&t.common.async===!1)return f(t,{code:d.invalid_type,expected:y.promise,received:t.parsedType}),x;const a=t.parsedType===y.promise?t.data:Promise.resolve(t.data);return X(a.then(n=>this._def.type.parseAsync(n,{path:t.path,errorMap:t.common.contextualErrorMap})))}}Ct.create=(r,e)=>new Ct({type:r,typeName:w.ZodPromise,...S(e)});class nt extends E{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===w.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=>{f(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 x;const l=await this._def.schema._parseAsync({data:s,path:a.path,parent:a});return l.status==="aborted"?x:l.status==="dirty"||t.value==="dirty"?St(l.value):l});{if(t.value==="aborted")return x;const s=this._def.schema._parseSync({data:o,path:a.path,parent:a});return s.status==="aborted"?x:s.status==="dirty"||t.value==="dirty"?St(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"?x:(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"?x:(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(!Qe(o))return x;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=>Qe(o)?Promise.resolve(n.transform(o.value,i)).then(s=>({status:t.value,value:s})):x);C.assertNever(n)}}nt.create=(r,e,t)=>new nt({schema:r,typeName:w.ZodEffects,effect:e,...S(t)}),nt.createWithPreprocess=(r,e,t)=>new nt({schema:e,effect:{type:"preprocess",transform:r},typeName:w.ZodEffects,...S(t)});class Te extends E{_parse(e){return this._getType(e)===y.undefined?X(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Te.create=(r,e)=>new Te({innerType:r,typeName:w.ZodOptional,...S(e)});class it extends E{_parse(e){return this._getType(e)===y.null?X(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}it.create=(r,e)=>new it({innerType:r,typeName:w.ZodNullable,...S(e)});class Lr extends E{_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}}Lr.create=(r,e)=>new Lr({innerType:r,typeName:w.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...S(e)});class Rr extends E{_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 qt(n)?n.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new ae(a.common.issues)},input:a.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new ae(a.common.issues)},input:a.data})}}removeCatch(){return this._def.innerType}}Rr.create=(r,e)=>new Rr({innerType:r,typeName:w.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...S(e)});class sn extends E{_parse(e){if(this._getType(e)!==y.nan){const a=this._getOrReturnCtx(e);return f(a,{code:d.invalid_type,expected:y.nan,received:a.parsedType}),x}return{status:"valid",value:e.data}}}sn.create=r=>new sn({typeName:w.ZodNaN,...S(r)});class lo extends E{_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 Pr extends E{_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"?x:i.status==="dirty"?(t.dirty(),St(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"?x: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 Pr({in:e,out:t,typeName:w.ZodPipeline})}}class Or extends E{_parse(e){const t=this._def.innerType._parse(e),a=n=>(Qe(n)&&(n.value=Object.freeze(n.value)),n);return qt(t)?t.then(n=>a(n)):a(t)}unwrap(){return this._def.innerType}}Or.create=(r,e)=>new Or({innerType:r,typeName:w.ZodReadonly,...S(e)});var w;(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"})(w||(w={}));const Ae=Ee.create,b=et.create,ln=Cr.create,jr=Tr.create;tt.create,Ce.create;const Gt=Ar.create,Xt=fe.create,P=Z.create;Ht.create,Yt.create;const cn=ye.create,ie=Et.create,co=at.create,uo=Ct.create;Te.create,it.create,P({pin:P({fade:ln().optional(),maxCount:b().optional(),maxZoom:b().optional()}).optional(),animation:P({queue:P({limit:b().optional()}).optional()}).optional()});const Ir=b().min(-90).max(90),Zr=b().min(-180).max(180),po=P({sw:P({lat:Ir,lng:Zr}),ne:P({lat:Ir,lng:Zr})}),Dr=jr().refine(r=>r instanceof HTMLElement,"Must be an HTMLElement"),fo=P({mapSize:b().min(1),zoomMin:b().min(0),zoomMax:b().min(0),zoomScale:b().min(1).max(10)}),ho=P({instance:jr(),inserted:ie().returns(ln()),insert:ie().returns(Gt()),remove:ie().returns(Gt()),update:ie().args(b()).returns(Gt())}),mo=P({getParameters:ie().args().returns(fo),getContainer:ie().args().returns(Dr),getZoom:ie().args().returns(b()),getBounds:ie().args().returns(po),panBy:ie().args(b(),b()).returns(Gt()),createMarker:ie().args(Dr,Ir,Zr,b()).returns(ho)}),Fr=ie().args(Ae()).returns(uo(Dr)),yo=P({id:Ae().min(1),rank:b(),lat:b().min(-90).max(90),lng:b().min(-180).max(180),tooltip:P({style:P({width:b(),height:b(),margin:b(),radius:b()}).refine(r=>Math.min(r.width,r.height)/r.margin>=6,"Tooltip: minimum of width or height must be greater than or equal to 6 * margin"),body:Fr}),pin:P({style:P({width:b(),height:b(),radius:b()}),body:Fr}).optional(),popup:P({style:P({width:b(),height:b(),radius:b(),margin:b()}),body:Fr}).optional()}),go=Xt(yo);var De;(r=>{r.COUNT=12,r.DEGREES=[0,30,60,90,120,150,180,210,240,270,300,330],r.DEGREES_DEFAULT=270})(De||(De={}));const un=Ae().length(32),_o=cn([b(),Xt(cn([b(),b()]))]),dn=P({mapSize:b().min(1),zoomMin:b().min(0).max(24),zoomMax:b().min(0).max(24),zoomScale:b().min(1).max(10)}),vo=P({id:Ae(),rank:b(),lat:b(),lng:b(),width:b(),height:b(),margin:b()});P({key:un,parameters:dn,input:Xt(vo),token:Ae().optional()}),P({token:Ae().optional(),states:Xt(_o)});const xo=co(["info","warn","error"]);P({level:xo,key:Ae(),title:Ae(),content:jr()});const wo="1.0.213",pn="https://maps.api.arenarium.dev",bo=`${pn}/states`,ko=`${pn}/log`;class So{constructor(e,t,a){p(this,"apiKey");p(this,"apiToken");p(this,"apiDevEnvironment");p(this,"mapProvider");p(this,"markerDataArray",new Array);p(this,"markerDataMap",new Map);p(this,"markerDataUpdating",!1);p(this,"markerPinProcessor");p(this,"markerTooltipProcessor");p(this,"markerPopupProcessor");un.parse(e),mo.parse(t),this.apiKey=e,this.apiDevEnvironment=(window==null?void 0:window.location.host.startsWith("localhost"))||(window==null?void 0:window.location.host.startsWith("127.0.0.1")),this.mapProvider=t,this.markerPinProcessor=new Ur(t),this.markerTooltipProcessor=new Mo(t),this.markerPopupProcessor=new Eo(t),this.setConfiguration(a),this.log("info","Loaded")}setConfiguration(e){var t,a;Se.setLimit(((a=(t=e==null?void 0:e.animation)==null?void 0:t.queue)==null?void 0:a.limit)??8*navigator.hardwareConcurrency),this.markerPinProcessor.setConfiguration(e)}async updateMarkers(e){go.parse(e);try{await this.updateMarkerData(e),this.processMarkerDataCallback()}catch(t){throw console.error(t),this.removeMarkerData(),t instanceof Error&&this.log("error","Failed to update markers",t),t}}removeMarkers(){try{this.removeMarkerData()}catch(e){throw console.error(e),e instanceof Error&&this.log("error","Failed to remove markers",e),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);for(const a of this.markerDataArray)this.markerPopupProcessor.hide(a);throw t instanceof Error&&this.log("error","Failed to show popup",t),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);for(const a of this.markerDataArray)this.markerPopupProcessor.hide(a);throw t instanceof Error&&this.log("error","Failed to hide popup",t),t}}async updateMarkerData(e){try{let t=this.markerDataArray.map(n=>n.marker);for(let n=0;n<e.length;n++){const i=e[n];this.markerDataMap.get(i.id)||t.push(i)}const a=await this.getMarkerStates(t);try{this.markerDataUpdating=!0;for(let n=0;n<t.length;n++){const i=t[n],o=a[n],s=this.markerDataMap.get(i.id);if(s)s.update(o);else{const l=new zo(this.mapProvider,i,o);l.create(),this.markerDataMap.set(i.id,l),this.markerDataArray.push(l)}}this.markerDataArray.sort((n,i)=>n.zoom-i.zoom),this.markerPinProcessor.updateElements(this.markerDataArray.map(n=>n.pin)),this.markerTooltipProcessor.updateElements(this.markerDataArray.map(n=>n.tooltip)),this.markerPopupProcessor.updateElements(this.markerDataArray.map(n=>n.popup).filter(n=>n!=null))}finally{this.markerDataUpdating=!1}}catch(t){throw console.error(t),this.markerDataArray.forEach(a=>a.remove()),this.markerDataArray.length=0,this.markerDataMap.clear(),t instanceof Error&&this.log("error","Failed to update marker data",t),t}finally{this.markerDataUpdating=!1}}removeMarkerData(){try{this.markerDataUpdating=!0,this.markerPinProcessor.removeElements(),this.markerTooltipProcessor.removeElements(),this.markerPopupProcessor.removeElements(),this.markerDataArray.length=0,this.markerDataMap.clear()}catch(e){throw console.error(e),e instanceof Error&&this.log("error","Failed to remove marker data",e),e}finally{this.markerDataUpdating=!1}}async getMarkerStates(e){if(e.length==0)return[];if(e.length==1)return[[0,[[0,De.DEGREES.indexOf(De.DEGREES_DEFAULT)]]]];const t=this.mapProvider.getParameters();dn.parse(t);const a=e.map(s=>({id:s.id,rank:s.rank,lat:s.lat,lng:s.lng,width:s.tooltip.style.width,height:s.tooltip.style.height,margin:s.tooltip.style.margin})),n={key:this.apiKey,token:this.apiToken,parameters:t,input:a},i=await fetch(bo,{method:"POST",headers:{"Content-Type":"application/json","Cache-Control":this.apiDevEnvironment?"no-cache":""},body:JSON.stringify(n)});if(!i.ok)throw new Error("Failed to get marker states: "+i.statusText);const o=await i.json();return o.token&&(this.apiToken=o.token),o.states}processMarkerDataCallback(){if(this.markerDataArray.length!=0)try{this.processMarkerData(),window.setTimeout(this.processMarkerDataCallback.bind(this),25)}catch(e){console.error(e),e instanceof Error&&this.log("error","Failed to process marker data",e)}}processMarkerData(){if(this.markerDataUpdating)return;const e=this.mapProvider.getBounds(),t=this.mapProvider.getZoom();this.markerPopupProcessor.process(),this.markerTooltipProcessor.process(e,t),this.markerPinProcessor.process(e,t)}async log(e,t,a){if(!this.apiDevEnvironment)try{const n={key:this.apiKey,title:t,level:e,content:{version:wo,...a}};await fetch(ko,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)})}catch(n){console.error(n)}}}class zo{constructor(e,t,a){p(this,"marker");p(this,"zoom");p(this,"pin");p(this,"tooltip");p(this,"popup");this.marker=t,this.zoom=a[0],this.pin=new Vr(e,t,a),this.tooltip=new $r(e,t,a),t.popup&&(this.popup=new qr(e,t))}create(){var e;this.pin.create(),this.tooltip.create(),(e=this.popup)==null||e.create()}update(e){this.pin.update(e),this.tooltip.update(e)}remove(){var e;this.pin.remove(),this.tooltip.remove(),(e=this.popup)==null||e.remove()}}class Br{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;(e=this.marker)==null||e.remove()}}const ut=class ut extends Br{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)??ut.DEFAULT_SIZE,this.height=((o=a.pin)==null?void 0:o.style.height)??ut.DEFAULT_SIZE,this.radius=((s=a.pin)==null?void 0:s.style.radius)??ut.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=wr(Ii,{target:this.element,props:{id:this.id+"_pin",layer:Pi,priority:this.zoom*this.provider.getParameters().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)}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=>{n instanceof HTMLElement?t.appendChild(n):console.error("Failed to load pin body")}).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.setCollapsed(t)}setScale(t){if(this.component==null)throw new Error("Failed to set pin scale");this.component.setScale(t)}getScaleFromZoomDistance(t){return this.zoom<t?1:Math.max(0,1-(this.zoom-t)*.125)}getZindex(){const t=this.provider.getParameters();return Math.round((t.zoomMax-this.zoom)*t.zoomScale)}isCollapsed(){return this.component==null?!1:this.component.getCollapsed()}isBodyLoaded(){return this.bodyCallback==null||this.bodyLoaded}};p(ut,"DEFAULT_SIZE",16);let Vr=ut;const dt=class dt{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(dt.MAP_PINS_MAX_COUNT,8*navigator.hardwareConcurrency),this.pinMaxZoomDelta=((n=e==null?void 0:e.pin)==null?void 0:n.maxZoom)??dt.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.getParameters().mapSize,n=new qa(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&&(o.setCollapsed(!1),o.setScale(this.pinFade?o.getScaleFromZoomDistance(t):1),o.updateMap(!0),o.isBodyLoaded()==!1&&o.updateBody()),i++):(o.setCollapsed(!0),o.isCollapsed()&&o.updateMap(!1)):o.updateMap(!1)}};p(dt,"MAP_PINS_MAX_ZOOM",2),p(dt,"MAP_PINS_MAX_COUNT",128);let Ur=dt;const Kt=class Kt extends Br{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=De.DEGREES_DEFAULT,this.states=n[1].map(i=>[i[0],De.DEGREES[i[1]]]),this.bodyCallback=a.tooltip.body}createElement(){this.element=document.createElement("div"),this.element.classList.add("tooltip"),this.component=wr($a,{target:this.element,props:{id:this.id+"_tooltip",layer:Ri,priority:this.zoom*this.provider.getParameters().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],De.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=>{n instanceof HTMLElement?t.appendChild(n):console.error("Failed to load tooltip body")}).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(){const t=this.provider.getParameters();return Math.round((t.zoomMax-this.zoom)*t.zoomScale)+Kt.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(Kt,"Z_INDEX_OFFSET",1e6);let $r=Kt;class Mo{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.getParameters().mapSize,n=new qa(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 Qt=class Qt extends Br{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=wr($a,{target:this.element,props:{id:this.id+"_popup",layer:Li,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=>{n instanceof HTMLElement?t.appendChild(n):console.error("Failed to load popup body")}).catch(n=>console.error(n)).finally(()=>{this.bodyLoaded=!0,this.bodyLoading=!1}))}getZindex(){return Qt.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,!0)}isExpanded(){return this.component==null?!1:this.component.getExpanded()}isCollapsed(){return this.component==null?!1:this.component.getCollapsed()}isBodyLoaded(){return this.bodyLoaded}};p(Qt,"Z_INDEX_OFFSET",2e6);let qr=Qt;class Eo{constructor(e){p(this,"provider");p(this,"popupElements",new Array);p(this,"popupPositioned",new Map);this.provider=e}show(e){e.popup&&(e.pin.shown=!1,e.tooltip.shown=!1,this.popupPositioned.set(e.marker.id,!1),e.popup.setAngle(e.tooltip.angle),e.popup.shown=!0)}hide(e){e.popup&&(e.pin.shown=!0,e.tooltip.shown=!0,e.popup.shown=!1)}updateElements(e){this.popupElements=e,this.popupPositioned=new Map(e.map(t=>[t.id,!1]))}removeElements(){this.popupElements.forEach(e=>e.remove()),this.popupElements.length=0,this.popupPositioned.clear()}process(){var e,t;for(const a of this.popupElements)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.x,u=l+i.y,h=c+a.width,_=u+a.height,m=this.provider.getContainer().getBoundingClientRect(),v=c-m.left,O=m.right-h,Y=u-m.top,se=m.bottom-_,L=Math.min(a.width,a.height)/4,F=v<0?v-L:O<0?-O+L:0,he=Y<0?Y-L:se<0?-se+L:0;this.provider.panBy(F,he),this.popupPositioned.set(a.id,!0)}}else a.setCollapsed(!0),a.isCollapsed()&&a.updateMap(!1)}}class Co{constructor(e,t,a){p(this,"MapClass");p(this,"MapMarkerClass");p(this,"map");this.MapClass=e,this.MapMarkerClass=t,this.map=new this.MapClass({...a,minZoom:Math.max(a.minZoom??0,0),maxZoom:Math.min(a.maxZoom??22,24),style:a.style??"https://tiles.openfreemap.org/styles/liberty",pitchWithRotate:!1,attributionControl:a.attributionControl??{compact:!1,customAttribution:"<a href='https://arenarium.dev/' target='_blank'>@arenarium/maps</a>"}}),this.map.dragRotate.disable(),this.map.keyboard.disable(),this.map.touchZoomRotate.disableRotation(),this.map.touchPitch.disable(),this.map.on("load",()=>{const n=this.map.getContainer();n!=null&&(n.style.zIndex="0");const i=document.getElementsByClassName("maplibregl-ctrl-bottom-right")[0];i!=null&&(i.style.zIndex=Number.MAX_SAFE_INTEGER.toString())})}getParameters(){return{mapSize:512,zoomMin:this.map.getMinZoom()??0,zoomMax:this.map.getMaxZoom()??22,zoomScale:10}}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()}}}const To={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}}]},Ao={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}}]};class No{constructor(e,t,a){p(this,"MapClass");p(this,"MapMarkerClass");p(this,"map");this.MapClass=e,this.MapMarkerClass=t,this.map=new this.MapClass({...a,minZoom:Math.max(a.minZoom??0,0),maxZoom:Math.min(a.maxZoom??22,24),projection:"mercator",pitchWithRotate:!1,customAttribution:a.customAttribution??"<a href='https://arenarium.dev/' target='_blank'>@arenarium/maps</a>"}),this.map.dragRotate.disable(),this.map.keyboard.disable(),this.map.touchZoomRotate.disableRotation(),this.map.touchPitch.disable(),this.map.on("load",()=>{const n=this.map.getContainer();n!=null&&(n.style.zIndex="0");const i=document.getElementsByClassName("mapboxgl-ctrl-bottom-right")[0];i!=null&&(i.style.zIndex=Number.MAX_SAFE_INTEGER.toString())})}getParameters(){return{mapSize:512,zoomMin:this.map.getMinZoom()??0,zoomMax:this.map.getMaxZoom()??22,zoomScale:10}}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()}}}class Lo{constructor(e,t,a,n){p(this,"MapClass");p(this,"MapMarkerClass");p(this,"map");p(this,"options");this.MapClass=e,this.MapMarkerClass=t,this.options=n,this.map=new this.MapClass(a,{...n})}getParameters(){return{mapSize:256,zoomMin:this.options.minZoom??0,zoomMax:this.options.maxZoom??24,zoomScale:10}}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}}}const Ro=[{elementType:"labels.icon",stylers:[{visibility:"off"}]},{stylers:[{saturation:-100},{lightness:-10}]},{featureType:"landscape",stylers:[{lightness:30}]},{featureType:"road",elementType:"geometry",stylers:[{saturation:-100}]}],Po=[{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}]}];z.GoogleMapDarkStyle=Po,z.GoogleMapLightStyle=Ro,z.GoogleMapsProvider=Lo,z.MapManager=So,z.MapboxProvider=No,z.MaplibreDarkStyle=To,z.MaplibreLightStyle=Ao,z.MaplibreProvider=Co,Object.defineProperty(z,Symbol.toStringTag,{value:"Module"})}));
|