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