@arenarium/maps 1.2.0 → 1.2.1
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/main.cjs.js +1 -1
- package/dist/main.d.ts +26 -8
- package/dist/main.es.js +1422 -1377
- package/dist/main.umd.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +4 -4
package/dist/main.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const un=!1;var fn=Array.isArray,cr=Array.prototype.indexOf,hr=Array.from,vt=Object.defineProperty,Fe=Object.getOwnPropertyDescriptor,pr=Object.prototype,dr=Array.prototype,vr=Object.getPrototypeOf,Kt=Object.isExtensible;function mr(t){for(var e=0;e<t.length;e++)t[e]()}function yr(){var t,e,n=new Promise((r,i)=>{t=r,e=i});return{promise:n,resolve:t,reject:e}}const F=2,Pt=4,cn=8,De=16,ae=32,me=64,St=128,U=256,tt=512,T=1024,V=2048,le=4096,xe=8192,Ce=16384,At=32768,hn=65536,Jt=1<<17,gr=1<<18,Te=1<<19,_r=1<<20,mt=1<<21,Dt=1<<22,pe=1<<23,Qe=Symbol("$state"),Ct=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"};function wr(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function br(t){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Er(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function kr(t){throw new Error("https://svelte.dev/e/effect_orphan")}function Mr(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function xr(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Pr(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Sr(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Ar(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const Dr=2,M=Symbol();function Cr(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function pn(t){return t===this.v}let Tr=!1,q=null;function Pe(t){q=t}function Tt(t,e=!1,n){q={p:q,c:null,e:null,s:t,x:null,l:null}}function Lt(t){var e=q,n=e.e;if(n!==null){e.e=null;for(var r of n)Pn(r)}return t!==void 0&&(e.x=t),q=e.p,t??{}}function dn(){return!0}let we=[];function Lr(){var t=we;we=[],mr(t)}function ot(t){if(we.length===0){var e=we;queueMicrotask(()=>{e===we&&Lr()})}we.push(t)}const Ir=new WeakMap;function vn(t){var e=m;if(e===null)return v.f|=pe,t;if((e.f&At)===0){if((e.f&St)===0)throw!e.parent&&t instanceof Error&&mn(t),t;e.b.error(t)}else Se(t,e)}function Se(t,e){for(;e!==null;){if((e.f&St)!==0)try{e.b.error(t);return}catch(n){t=n}e=e.parent}throw t instanceof Error&&mn(t),t}function mn(t){const e=Ir.get(t);e&&(vt(t,"message",{value:e.message}),vt(t,"stack",{value:e.stack}))}const ht=new Set;let S=null,yt=new Set,Ue=[],It=null,gt=!1;class ee{current=new Map;#e=new Map;#t=new Set;#a=0;#r=null;#c=!1;#o=[];#i=[];#n=[];#s=[];#l=[];#h=[];#f=[];skipped_effects=new Set;process(e){Ue=[];for(const i of e)this.#p(i);if(this.#o.length===0&&this.#a===0){this.#d();var n=this.#n,r=this.#s;this.#n=[],this.#s=[],this.#l=[],S=null,Qt(n),Qt(r),S===null?S=this:ht.delete(this),this.#r?.resolve()}else this.#u(this.#n),this.#u(this.#s),this.#u(this.#l);for(const i of this.#o)Me(i);for(const i of this.#i)Me(i);this.#o=[],this.#i=[]}#p(e){e.f^=T;for(var n=e.first;n!==null;){var r=n.f,i=(r&(ae|me))!==0,s=i&&(r&T)!==0,o=s||(r&xe)!==0||this.skipped_effects.has(n);if(!o&&n.fn!==null){if(i)n.f^=T;else if((r&Pt)!==0)this.#s.push(n);else if((r&T)===0)if((r&Dt)!==0){var a=n.b?.is_pending()?this.#i:this.#o;a.push(n)}else lt(n)&&((n.f&De)!==0&&this.#l.push(n),Me(n));var l=n.first;if(l!==null){n=l;continue}}var u=n.parent;for(n=n.next;n===null&&u!==null;)n=u.next,u=u.parent}}#u(e){for(const n of e)((n.f&V)!==0?this.#h:this.#f).push(n),Z(n,T);e.length=0}capture(e,n){this.#e.has(e)||this.#e.set(e,n),this.current.set(e,e.v)}activate(){S=this}deactivate(){S=null;for(const e of yt)if(yt.delete(e),e(),S!==null)break}neuter(){this.#c=!0}flush(){Ue.length>0?Or():this.#d(),S===this&&(this.#a===0&&ht.delete(this),this.deactivate())}#d(){if(!this.#c)for(const e of this.#t)e();this.#t.clear()}increment(){this.#a+=1}decrement(){if(this.#a-=1,this.#a===0){for(const e of this.#h)Z(e,V),Ze(e);for(const e of this.#f)Z(e,le),Ze(e);this.#n=[],this.#s=[],this.flush()}else this.deactivate()}add_callback(e){this.#t.add(e)}settled(){return(this.#r??=yr()).promise}static ensure(){if(S===null){const e=S=new ee;ht.add(S),ee.enqueue(()=>{S===e&&e.flush()})}return S}static enqueue(e){ot(e)}}function Or(){var t=ke;gt=!0;try{var e=0;for(en(!0);Ue.length>0;){var n=ee.ensure();if(e++>1e3){var r,i;Fr()}n.process(Ue),oe.clear()}}finally{gt=!1,en(t),It=null}}function Fr(){try{Mr()}catch(t){Se(t,It)}}let he=null;function Qt(t){var e=t.length;if(e!==0){for(var n=0;n<e;){var r=t[n++];if((r.f&(Ce|xe))===0&<(r)&&(he=[],Me(r),r.deps===null&&r.first===null&&r.nodes_start===null&&(r.teardown===null&&r.ac===null?Cn(r):r.fn=null),he?.length>0)){oe.clear();for(const i of he)Me(i);he=[]}}he=null}}function Ze(t){for(var e=It=t;e.parent!==null;){e=e.parent;var n=e.f;if(gt&&e===m&&(n&De)!==0)return;if((n&(me|ae))!==0){if((n&T)===0)return;e.f^=T}}Ue.push(e)}function Rr(t){let e=0,n=at(0),r;return()=>{Jr()&&(_(n),Rt(()=>(e===0&&(r=Nn(()=>t(()=>Re(n)))),e+=1,()=>{ot(()=>{e-=1,e===0&&(r?.(),r=void 0,Re(n))})})))}}var Nr=hn|Te|St;function jr(t,e,n){new zr(t,e,n)}class zr{parent;#e=!1;#t;#a=null;#r;#c;#o;#i=null;#n=null;#s=null;#l=null;#h=0;#f=0;#p=!1;#u=null;#d=()=>{this.#u&&nt(this.#u,this.#h)};#g=Rr(()=>(this.#u=at(this.#h),()=>{this.#u=null}));constructor(e,n,r){this.#t=e,this.#r=n,this.#c=r,this.parent=m.b,this.#e=!!this.#r.pending,this.#o=ti(()=>{m.b=this;{try{this.#i=ce(()=>r(this.#t))}catch(i){this.error(i)}this.#f>0?this.#m():this.#e=!1}},Nr)}#_(){try{this.#i=ce(()=>this.#c(this.#t))}catch(e){this.error(e)}this.#e=!1}#w(){const e=this.#r.pending;e&&(this.#n=ce(()=>e(this.#t)),ee.enqueue(()=>{this.#i=this.#v(()=>(ee.ensure(),ce(()=>this.#c(this.#t)))),this.#f>0?this.#m():($e(this.#n,()=>{this.#n=null}),this.#e=!1)}))}is_pending(){return this.#e||!!this.parent&&this.parent.is_pending()}has_pending_snippet(){return!!this.#r.pending}#v(e){var n=m,r=v,i=q;Q(this.#o),L(this.#o),Pe(this.#o.ctx);try{return e()}catch(s){return vn(s),null}finally{Q(n),L(r),Pe(i)}}#m(){const e=this.#r.pending;this.#i!==null&&(this.#l=document.createDocumentFragment(),Br(this.#i,this.#l)),this.#n===null&&(this.#n=ce(()=>e(this.#t)))}#y(e){if(!this.has_pending_snippet()){this.parent&&this.parent.#y(e);return}this.#f+=e,this.#f===0&&(this.#e=!1,this.#n&&$e(this.#n,()=>{this.#n=null}),this.#l&&(this.#t.before(this.#l),this.#l=null))}update_pending_count(e){this.#y(e),this.#h+=e,yt.add(this.#d)}get_effect_pending(){return this.#g(),_(this.#u)}error(e){var n=this.#r.onerror;let r=this.#r.failed;if(this.#p||!n&&!r)throw e;this.#i&&(J(this.#i),this.#i=null),this.#n&&(J(this.#n),this.#n=null),this.#s&&(J(this.#s),this.#s=null);var i=!1,s=!1;const o=()=>{if(i){Cr();return}i=!0,s&&Ar(),ee.ensure(),this.#h=0,this.#s!==null&&$e(this.#s,()=>{this.#s=null}),this.#e=this.has_pending_snippet(),this.#i=this.#v(()=>(this.#p=!1,ce(()=>this.#c(this.#t)))),this.#f>0?this.#m():this.#e=!1};var a=v;try{L(null),s=!0,n?.(e,o),s=!1}catch(l){Se(l,this.#o&&this.#o.parent)}finally{L(a)}r&&ot(()=>{this.#s=this.#v(()=>{this.#p=!0;try{return ce(()=>{r(this.#t,()=>e,()=>o)})}catch(l){return Se(l,this.#o.parent),null}finally{this.#p=!1}})})}}function Br(t,e){for(var n=t.nodes_start,r=t.nodes_end;n!==null;){var i=n===r?null:Ft(n);e.append(n),n=i}}function Ur(t,e,n){const r=qr;if(e.length===0){n(t.map(r));return}var i=S,s=m,o=Zr();Promise.all(e.map(a=>Hr(a))).then(a=>{i?.activate(),o();try{n([...t.map(r),...a])}catch(l){(s.f&Ce)===0&&Se(l,s)}i?.deactivate(),yn()}).catch(a=>{Se(a,s)})}function Zr(){var t=m,e=v,n=q,r=S;return function(){Q(t),L(e),Pe(n),r?.activate()}}function yn(){Q(null),L(null),Pe(null)}function qr(t){var e=F|V,n=v!==null&&(v.f&F)!==0?v:null;return m===null||n!==null&&(n.f&U)!==0?e|=U:m.f|=Te,{ctx:q,deps:null,effects:null,equals:pn,f:e,fn:t,reactions:null,rv:0,v:M,wv:0,parent:n??m,ac:null}}function Hr(t,e){let n=m;n===null&&wr();var r=n.b,i=void 0,s=at(M),o=null,a=!v;return ei(()=>{try{var l=t();o&&Promise.resolve(l).catch(()=>{})}catch(c){l=Promise.reject(c)}var u=()=>l;i=o?.then(u,u)??Promise.resolve(l),o=i;var f=S,h=r.is_pending();a&&(r.update_pending_count(1),h||f.increment());const p=(c,d=void 0)=>{o=null,h||f.activate(),d?d!==Ct&&(s.f|=pe,nt(s,d)):((s.f&pe)!==0&&(s.f^=pe),nt(s,c)),a&&(r.update_pending_count(-1),h||f.decrement()),yn()};if(i.then(p,c=>p(null,c||"unknown")),f)return()=>{queueMicrotask(()=>f.neuter())}}),new Promise(l=>{function u(f){function h(){f===i?l(s):u(i)}f.then(h,h)}u(i)})}function gn(t){var e=t.effects;if(e!==null){t.effects=null;for(var n=0;n<e.length;n+=1)J(e[n])}}function Yr(t){for(var e=t.parent;e!==null;){if((e.f&F)===0)return e;e=e.parent}return null}function Ot(t){var e,n=m;Q(Yr(t));try{gn(t),e=Fn(t)}finally{Q(n)}return e}function _n(t){var e=Ot(t);if(t.equals(e)||(t.v=e,t.wv=In()),!Le){var n=(se||(t.f&U)!==0)&&t.deps!==null?le:T;Z(t,n)}}const oe=new Map;function at(t,e){var n={f:0,v:t,reactions:null,equals:pn,rv:0,wv:0};return n}function A(t,e){const n=at(t);return si(n),n}function x(t,e,n=!1){v!==null&&(!Y||(v.f&Jt)!==0)&&dn()&&(v.f&(F|De|Dt|Jt))!==0&&!te?.includes(t)&&Sr();let r=n?Oe(e):e;return nt(t,r)}function nt(t,e){if(!t.equals(e)){var n=t.v;Le?oe.set(t,e):oe.set(t,n),t.v=e;var r=ee.ensure();r.capture(t,n),(t.f&F)!==0&&((t.f&V)!==0&&Ot(t),Z(t,(t.f&U)===0?T:le)),t.wv=In(),wn(t,V),m!==null&&(m.f&T)!==0&&(m.f&(ae|me))===0&&(N===null?oi([t]):N.push(t))}return e}function Re(t){x(t,t.v+1)}function wn(t,e){var n=t.reactions;if(n!==null)for(var r=n.length,i=0;i<r;i++){var s=n[i],o=s.f,a=(o&V)===0;a&&Z(s,e),(o&F)!==0?wn(s,le):a&&((o&De)!==0&&he!==null&&he.push(s),Ze(s))}}function Oe(t){if(typeof t!="object"||t===null||Qe in t)return t;const e=vr(t);if(e!==pr&&e!==dr)return t;var n=new Map,r=fn(t),i=A(0),s=de,o=a=>{if(de===s)return a();var l=v,u=de;L(null),nn(s);var f=a();return L(l),nn(u),f};return r&&n.set("length",A(t.length)),new Proxy(t,{defineProperty(a,l,u){(!("value"in u)||u.configurable===!1||u.enumerable===!1||u.writable===!1)&&xr();var f=n.get(l);return f===void 0?f=o(()=>{var h=A(u.value);return n.set(l,h),h}):x(f,u.value,!0),!0},deleteProperty(a,l){var u=n.get(l);if(u===void 0){if(l in a){const f=o(()=>A(M));n.set(l,f),Re(i)}}else x(u,M),Re(i);return!0},get(a,l,u){if(l===Qe)return t;var f=n.get(l),h=l in a;if(f===void 0&&(!h||Fe(a,l)?.writable)&&(f=o(()=>{var c=Oe(h?a[l]:M),d=A(c);return d}),n.set(l,f)),f!==void 0){var p=_(f);return p===M?void 0:p}return Reflect.get(a,l,u)},getOwnPropertyDescriptor(a,l){var u=Reflect.getOwnPropertyDescriptor(a,l);if(u&&"value"in u){var f=n.get(l);f&&(u.value=_(f))}else if(u===void 0){var h=n.get(l),p=h?.v;if(h!==void 0&&p!==M)return{enumerable:!0,configurable:!0,value:p,writable:!0}}return u},has(a,l){if(l===Qe)return!0;var u=n.get(l),f=u!==void 0&&u.v!==M||Reflect.has(a,l);if(u!==void 0||m!==null&&(!f||Fe(a,l)?.writable)){u===void 0&&(u=o(()=>{var p=f?Oe(a[l]):M,c=A(p);return c}),n.set(l,u));var h=_(u);if(h===M)return!1}return f},set(a,l,u,f){var h=n.get(l),p=l in a;if(r&&l==="length")for(var c=u;c<h.v;c+=1){var d=n.get(c+"");d!==void 0?x(d,M):c in a&&(d=o(()=>A(M)),n.set(c+"",d))}if(h===void 0)(!p||Fe(a,l)?.writable)&&(h=o(()=>A(void 0)),x(h,Oe(u)),n.set(l,h));else{p=h.v!==M;var k=o(()=>Oe(u));x(h,k)}var I=Reflect.getOwnPropertyDescriptor(a,l);if(I?.set&&I.set.call(f,u),!p){if(r&&typeof l=="string"){var X=n.get("length"),w=Number(l);Number.isInteger(w)&&w>=X.v&&x(X,w+1)}Re(i)}return!0},ownKeys(a){_(i);var l=Reflect.ownKeys(a).filter(h=>{var p=n.get(h);return p===void 0||p.v!==M});for(var[u,f]of n)f.v!==M&&!(u in a)&&l.push(u);return l},setPrototypeOf(){Pr()}})}var $t,bn,En,kn;function Vr(){if($t===void 0){$t=window,bn=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,n=Text.prototype;En=Fe(e,"firstChild").get,kn=Fe(e,"nextSibling").get,Kt(t)&&(t.__click=void 0,t.__className=void 0,t.__attributes=null,t.__style=void 0,t.__e=void 0),Kt(n)&&(n.__t=void 0)}}function Xr(t=""){return document.createTextNode(t)}function Mn(t){return En.call(t)}function Ft(t){return kn.call(t)}function _t(t,e){return Mn(t)}function Wr(t,e=1,n=!1){let r=t;for(;e--;)r=Ft(r);return r}function xn(t){var e=v,n=m;L(null),Q(null);try{return t()}finally{L(e),Q(n)}}function Gr(t){m===null&&v===null&&kr(),v!==null&&(v.f&U)!==0&&m===null&&Er(),Le&&br()}function Kr(t,e){var n=e.last;n===null?e.last=e.first=t:(n.next=t,t.prev=n,e.last=t)}function ue(t,e,n,r=!0){var i=m;i!==null&&(i.f&xe)!==0&&(t|=xe);var s={ctx:q,deps:null,nodes_start:null,nodes_end:null,f:t|V,first:null,fn:e,last:null,next:null,parent:i,b:i&&i.b,prev:null,teardown:null,transitions:null,wv:0,ac:null};if(n)try{Me(s),s.f|=At}catch(l){throw J(s),l}else e!==null&&Ze(s);if(r){var o=s;if(n&&o.deps===null&&o.teardown===null&&o.nodes_start===null&&o.first===o.last&&(o.f&Te)===0&&(o=o.first),o!==null&&(o.parent=i,i!==null&&Kr(o,i),v!==null&&(v.f&F)!==0&&(t&me)===0)){var a=v;(a.effects??=[]).push(o)}}return s}function Jr(){return v!==null&&!Y}function W(t){Gr();var e=m.f,n=!v&&(e&ae)!==0&&(e&At)===0;if(n){var r=q;(r.e??=[]).push(t)}else return Pn(t)}function Pn(t){return ue(Pt|_r,t,!1)}function Qr(t){ee.ensure();const e=ue(me|Te,t,!0);return(n={})=>new Promise(r=>{n.outro?$e(e,()=>{J(e),r(void 0)}):(J(e),r(void 0))})}function $r(t){return ue(Pt,t,!1)}function ei(t){return ue(Dt|Te,t,!0)}function Rt(t,e=0){return ue(cn|e,t,!0)}function Sn(t,e=[],n=[]){Ur(e,n,r=>{ue(cn,()=>t(...r.map(_)),!0)})}function ti(t,e=0){var n=ue(De|e,t,!0);return n}function ce(t,e=!0){return ue(ae|Te,t,!0,e)}function An(t){var e=t.teardown;if(e!==null){const n=Le,r=v;tn(!0),L(null);try{e.call(null)}finally{tn(n),L(r)}}}function Dn(t,e=!1){var n=t.first;for(t.first=t.last=null;n!==null;){const i=n.ac;i!==null&&xn(()=>{i.abort(Ct)});var r=n.next;(n.f&me)!==0?n.parent=null:J(n,e),n=r}}function ni(t){for(var e=t.first;e!==null;){var n=e.next;(e.f&ae)===0&&J(e),e=n}}function J(t,e=!0){var n=!1;(e||(t.f&gr)!==0)&&t.nodes_start!==null&&t.nodes_end!==null&&(ri(t.nodes_start,t.nodes_end),n=!0),Dn(t,e&&!n),rt(t,0),Z(t,Ce);var r=t.transitions;if(r!==null)for(const s of r)s.stop();An(t);var i=t.parent;i!==null&&i.first!==null&&Cn(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes_start=t.nodes_end=t.ac=null}function ri(t,e){for(;t!==null;){var n=t===e?null:Ft(t);t.remove(),t=n}}function Cn(t){var e=t.parent,n=t.prev,r=t.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),e!==null&&(e.first===t&&(e.first=r),e.last===t&&(e.last=n))}function $e(t,e){var n=[];Tn(t,n,!0),ii(n,()=>{J(t),e&&e()})}function ii(t,e){var n=t.length;if(n>0){var r=()=>--n||e();for(var i of t)i.out(r)}else e()}function Tn(t,e,n){if((t.f&xe)===0){if(t.f^=xe,t.transitions!==null)for(const o of t.transitions)(o.is_global||n)&&e.push(o);for(var r=t.first;r!==null;){var i=r.next,s=(r.f&hn)!==0||(r.f&ae)!==0;Tn(r,e,s?n:!1),r=i}}}let ke=!1;function en(t){ke=t}let Le=!1;function tn(t){Le=t}let v=null,Y=!1;function L(t){v=t}let m=null;function Q(t){m=t}let te=null;function si(t){v!==null&&(te===null?te=[t]:te.push(t))}let D=null,O=0,N=null;function oi(t){N=t}let Ln=1,qe=0,de=qe;function nn(t){de=t}let se=!1;function In(){return++Ln}function lt(t){var e=t.f;if((e&V)!==0)return!0;if((e&le)!==0){var n=t.deps,r=(e&U)!==0;if(n!==null){var i,s,o=(e&tt)!==0,a=r&&m!==null&&!se,l=n.length;if((o||a)&&(m===null||(m.f&Ce)===0)){var u=t,f=u.parent;for(i=0;i<l;i++)s=n[i],(o||!s?.reactions?.includes(u))&&(s.reactions??=[]).push(u);o&&(u.f^=tt),a&&f!==null&&(f.f&U)===0&&(u.f^=U)}for(i=0;i<l;i++)if(s=n[i],lt(s)&&_n(s),s.wv>t.wv)return!0}(!r||m!==null&&!se)&&Z(t,T)}return!1}function On(t,e,n=!0){var r=t.reactions;if(r!==null&&!te?.includes(t))for(var i=0;i<r.length;i++){var s=r[i];(s.f&F)!==0?On(s,e,!1):e===s&&(n?Z(s,V):(s.f&T)!==0&&Z(s,le),Ze(s))}}function Fn(t){var e=D,n=O,r=N,i=v,s=se,o=te,a=q,l=Y,u=de,f=t.f;D=null,O=0,N=null,se=(f&U)!==0&&(Y||!ke||v===null),v=(f&(ae|me))===0?t:null,te=null,Pe(t.ctx),Y=!1,de=++qe,t.ac!==null&&(xn(()=>{t.ac.abort(Ct)}),t.ac=null);try{t.f|=mt;var h=t.fn,p=h(),c=t.deps;if(D!==null){var d;if(rt(t,O),c!==null&&O>0)for(c.length=O+D.length,d=0;d<D.length;d++)c[O+d]=D[d];else t.deps=c=D;if(!se||(f&F)!==0&&t.reactions!==null)for(d=O;d<c.length;d++)(c[d].reactions??=[]).push(t)}else c!==null&&O<c.length&&(rt(t,O),c.length=O);if(dn()&&N!==null&&!Y&&c!==null&&(t.f&(F|le|V))===0)for(d=0;d<N.length;d++)On(N[d],t);return i!==null&&i!==t&&(qe++,N!==null&&(r===null?r=N:r.push(...N))),(t.f&pe)!==0&&(t.f^=pe),p}catch(k){return vn(k)}finally{t.f^=mt,D=e,O=n,N=r,v=i,se=s,te=o,Pe(a),Y=l,de=u}}function ai(t,e){let n=e.reactions;if(n!==null){var r=cr.call(n,t);if(r!==-1){var i=n.length-1;i===0?n=e.reactions=null:(n[r]=n[i],n.pop())}}n===null&&(e.f&F)!==0&&(D===null||!D.includes(e))&&(Z(e,le),(e.f&(U|tt))===0&&(e.f^=tt),gn(e),rt(e,0))}function rt(t,e){var n=t.deps;if(n!==null)for(var r=e;r<n.length;r++)ai(t,n[r])}function Me(t){var e=t.f;if((e&Ce)===0){Z(t,T);var n=m,r=ke;m=t,ke=!0;try{(e&De)!==0?ni(t):Dn(t),An(t);var i=Fn(t);t.teardown=typeof i=="function"?i:null,t.wv=Ln;var s;un&&Tr&&(t.f&V)!==0&&t.deps}finally{ke=r,m=n}}}function _(t){var e=t.f,n=(e&F)!==0;if(v!==null&&!Y){var r=m!==null&&(m.f&Ce)!==0;if(!r&&!te?.includes(t)){var i=v.deps;if((v.f&mt)!==0)t.rv<qe&&(t.rv=qe,D===null&&i!==null&&i[O]===t?O++:D===null?D=[t]:(!se||!D.includes(t))&&D.push(t));else{(v.deps??=[]).push(t);var s=t.reactions;s===null?t.reactions=[v]:s.includes(v)||s.push(v)}}}else if(n&&t.deps===null&&t.effects===null){var o=t,a=o.parent;a!==null&&(a.f&U)===0&&(o.f^=U)}if(Le){if(oe.has(t))return oe.get(t);if(n){o=t;var l=o.v;return((o.f&T)===0&&o.reactions!==null||Rn(o))&&(l=Ot(o)),oe.set(o,l),l}}else n&&(o=t,lt(o)&&_n(o));if((t.f&pe)!==0)throw t.v;return t.v}function Rn(t){if(t.v===M)return!0;if(t.deps===null)return!1;for(const e of t.deps)if(oe.has(e)||(e.f&F)!==0&&Rn(e))return!0;return!1}function Nn(t){var e=Y;try{return Y=!0,t()}finally{Y=e}}const li=-7169;function Z(t,e){t.f=t.f&li|e}const ui=["touchstart","touchmove"];function fi(t){return ui.includes(t)}const ci=new Set,rn=new Set;let sn=null;function Ke(t){var e=this,n=e.ownerDocument,r=t.type,i=t.composedPath?.()||[],s=i[0]||t.target;sn=t;var o=0,a=sn===t&&t.__root;if(a){var l=i.indexOf(a);if(l!==-1&&(e===document||e===window)){t.__root=e;return}var u=i.indexOf(e);if(u===-1)return;l<=u&&(o=l)}if(s=i[o]||t.target,s!==e){vt(t,"currentTarget",{configurable:!0,get(){return s||n}});var f=v,h=m;L(null),Q(null);try{for(var p,c=[];s!==null;){var d=s.assignedSlot||s.parentNode||s.host||null;try{var k=s["__"+r];if(k!=null&&(!s.disabled||t.target===s))if(fn(k)){var[I,...X]=k;I.apply(s,[t,...X])}else k.call(s,t)}catch(w){p?c.push(w):p=w}if(t.cancelBubble||d===e||d===null)break;s=d}if(p){for(let w of c)queueMicrotask(()=>{throw w});throw p}}finally{t.__root=e,delete t.currentTarget,L(f),Q(h)}}}function hi(t){var e=document.createElement("template");return e.innerHTML=t.replaceAll("<!>","<!---->"),e.content}function pi(t,e){var n=m;n.nodes_start===null&&(n.nodes_start=t,n.nodes_end=e)}function jn(t,e){var n=(e&Dr)!==0,r,i=!t.startsWith("<!>");return()=>{r===void 0&&(r=hi(i?t:"<!>"+t),r=Mn(r));var s=n||bn?document.importNode(r,!0):r.cloneNode(!0);return pi(s,s),s}}function zn(t,e){t!==null&&t.before(e)}function Nt(t,e){return di(t,e)}const _e=new Map;function di(t,{target:e,anchor:n,props:r={},events:i,context:s,intro:o=!0}){Vr();var a=new Set,l=h=>{for(var p=0;p<h.length;p++){var c=h[p];if(!a.has(c)){a.add(c);var d=fi(c);e.addEventListener(c,Ke,{passive:d});var k=_e.get(c);k===void 0?(document.addEventListener(c,Ke,{passive:d}),_e.set(c,1)):_e.set(c,k+1)}}};l(hr(ci)),rn.add(l);var u=void 0,f=Qr(()=>{var h=n??e.appendChild(Xr());return jr(h,{pending:()=>{}},p=>{if(s){Tt({});var c=q;c.c=s}i&&(r.$$events=i),u=t(p,r)||{},s&&Lt()}),()=>{for(var p of a){e.removeEventListener(p,Ke);var c=_e.get(p);--c===0?(document.removeEventListener(p,Ke),_e.delete(p)):_e.set(p,c)}rn.delete(l),h!==n&&h.parentNode?.removeChild(h)}});return vi.set(u,f),u}let vi=new WeakMap;function Bn(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(n=Bn(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function mi(){for(var t,e,n=0,r="",i=arguments.length;n<i;n++)(t=arguments[n])&&(e=Bn(t))&&(r&&(r+=" "),r+=e);return r}function Un(t){return typeof t=="object"?mi(t):t??""}function yi(t,e,n){var r=t==null?"":""+t;return e&&(r=r?r+" "+e:e),r===""?null:r}function gi(t,e){return t==null?null:String(t)}function Zn(t,e,n,r,i,s){var o=t.__className;if(o!==n||o===void 0){var a=yi(n,r);a==null?t.removeAttribute("class"):t.className=a,t.__className=n}return s}function it(t,e,n,r){var i=t.__style;if(i!==e){var s=gi(e);s==null?t.removeAttribute("style"):t.style.cssText=s,t.__style=e}return r}const _i=()=>performance.now(),G={tick:t=>requestAnimationFrame(t),now:()=>_i(),tasks:new Set};function qn(){const t=G.now();G.tasks.forEach(e=>{e.c(t)||(G.tasks.delete(e),e.f())}),G.tasks.size!==0&&G.tick(qn)}function wi(t){let e;return G.tasks.size===0&&G.tick(qn),{promise:new Promise(n=>{G.tasks.add(e={c:t,f:n})}),abort(){G.tasks.delete(e)}}}function on(t,e){return t===e||t?.[Qe]===e}function be(t={},e,n,r){return $r(()=>{var i,s;return Rt(()=>{i=s,s=[],Nn(()=>{t!==n(...s)&&(e(t,...s),i&&on(n(...i),t)&&e(null,...i))})}),()=>{ot(()=>{s&&on(n(...s),t)&&e(null,...s)})}}),t}const bi="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(bi);function Ei(t){return t}function wt(t){return-.5*(Math.cos(Math.PI*t)-1)}function ki(t){const e=Math.cos(t*Math.PI*.5);return Math.abs(e)<1e-14?1:1-e}function Mi(t){return Math.sin(t*Math.PI/2)}const xi=128,Pi=0,Si=1,Ai=2;class Di{animationsStarted=!1;animationsCount=0;animationsLimit=xi;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 n=this.layers[e];if(n==null)continue;const r=n.animations;if(r!=null)for(let i=0;i<r.length;i++){const s=r[i];if(s!=null){for(const o of s.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,n,r,i){let s=this.layers[e];s==null&&(s=this.layers[e]={animations:new Array});let o=s.animations[n];o==null&&(o=s.animations[n]=new Map);let a={id:r,priority:n,executed:!1,function:i};o.set(r,a),this.animationsStarted==!1&&(this.animationsStarted=!0,this.start())}clear(e,n){for(let r=0;r<this.layers.length;r++){let i=this.layers[r];if(i==null)continue;let s=i.animations[e];if(s==null)return;let o=s.get(n);if(o==null||o.executed==!1)return;s.delete(n)}}speed(){return Math.pow(2,2*this.animationsCount/this.animationsLimit)}stacked(){return this.animationsCount==this.animationsLimit}setLimit(e){this.animationsLimit=e}}const ie=new Di;function an(t){return Object.prototype.toString.call(t)==="[object Date]"}function bt(t,e){if(t===e||t!==t)return()=>t;const n=typeof t;if(n!==typeof e||Array.isArray(t)!==Array.isArray(e))throw new Error("Cannot interpolate values of different type");if(Array.isArray(t)){const r=e.map((i,s)=>bt(t[s],i));return i=>r.map(s=>s(i))}if(n==="object"){if(!t||!e)throw new Error("Object cannot be null");if(an(t)&&an(e)){const s=t.getTime(),a=e.getTime()-s;return l=>new Date(s+l*a)}const r=Object.keys(e),i={};return r.forEach(s=>{i[s]=bt(t[s],e[s])}),s=>{const o={};return r.forEach(a=>{o[a]=i[a](s)}),o}}if(n==="number"){const r=e-t;return i=>t+i*r}return()=>e}class jt{#e;#t;#a;#r=null;constructor(e,n={}){this.#e=A(e),this.#t=A(e),this.#a=n}static of(e,n){const r=new jt(e(),n);return Rt(()=>{r.set(e())}),r}set(e,n){x(this.#t,e);let{delay:r=0,duration:i=400,easing:s=Ei,interpolate:o=bt}={...this.#a,...n};if(i===0)return this.#r?.abort(),x(this.#e,e),Promise.resolve();const a=G.now()+r;let l,u=!1,f=this.#r;return this.#r=wi(h=>{if(h<a)return!0;if(!u){u=!0;const c=this.#e.v;l=o(c,e),typeof i=="function"&&(i=i(c,e)),f?.abort()}const p=h-a;return p>i?(x(this.#e,e),!1):(x(this.#e,l(s(p/i))),!0)}),this.#r.promise}get current(){return _(this.#e)}get target(){return _(this.#t)}set target(e){this.set(e)}}class et{value;motion;constructor(e,n){this.value=e,this.motion=new jt(e,n)}set(e,n){this.value=e,this.motion.set(e,n)}update(e){this.motion.set(this.value,e)}snap(){this.motion.set(this.value,{duration:0})}}var Ci=jn('<div><div class="body svelte-zz3jrb"></div></div>');function Ti(t,e){Tt(e,!0);let n,r;function i(){return r}let s=A(!1);function o(E){x(s,E,!0)}function a(){return _(s)}let l=A(!0),u=0,f=150;function h(E){E!=_(l)&&(x(l,E,!0),u=performance.now())}function p(){return performance.now()-u<f?d.motion.current==0:d.value==0}let c=0,d=new et(0,{easing:wt});W(()=>{_(s)==!1&&(d.snap(),ie.clear(e.priority,e.id))}),W(()=>{d.set(_(l)?0:c,{duration:75})}),W(()=>{k(d.motion.current)});function k(E){n&&ie.equeue(e.layer,e.priority,e.id,()=>{n.style.scale=E.toString(),n.style.filter=`brightness(${.25+.75*E})`,r.style.opacity=E.toString()})}function I(E){E!=c&&(c=E,d.set(E,{duration:75}))}function X(){return d.value}var w={getBody:i,setDisplayed:o,getDisplayed:a,setCollapsed:h,getCollapsed:p,setScale:I,getScale:X},fe=Ci(),ne=_t(fe);return be(ne,E=>r=E,()=>r),be(fe,E=>n=E,()=>n),Sn(()=>{Zn(fe,1,Un(["pin",_(s)&&"displayed"]),"svelte-zz3jrb"),it(fe,`width: ${e.width}px; height: ${e.height}px; border-radius: ${e.radius}px`),it(ne,`width: ${e.width-4}px; height: ${e.height-4}px; border-radius: ${e.radius-2}px`)}),zn(t,fe),Lt(w)}var Ne;(t=>{function e(n,r,i){const s=n/2,o=r/2,a=Math.sqrt(s*s+o*o),l=Math.atan(o/s)*(180/Math.PI),u=i*(Math.PI/180);return i<180?i<90?i<l?{x:0,y:a*Math.sin(u)-o}:{x:a*Math.cos(u)-s,y:0}:i<180-l?{x:a*Math.cos(u)-s,y:0}:{x:-n,y:a*Math.sin(u)-o}:i<270?i<180+l?{x:-n,y:a*Math.sin(u)-o}:{x:a*Math.cos(u)-s,y:-r}:i<360-l?{x:a*Math.cos(u)-s,y:-r}:{x:0,y:a*Math.sin(u)-o}}t.getOffsets=e})(Ne||(Ne={}));var Li=jn('<div><div class="pointer svelte-11extwn"></div> <div class="bubble svelte-11extwn"><div class="body svelte-11extwn"></div></div></div>');function Hn(t,e){Tt(e,!0);let n,r,i,s;const o=e.width+2*e.margin,a=e.height+2*e.margin,l=()=>s;W(()=>{i.style.width=`${e.margin*4}px`,i.style.height=`${e.margin*4}px`});let u=A(!0);function f(y){x(u,y,!0)}function h(){return _(u)}let p=A(!0),c=0,d=300;function k(y){y!=_(p)&&(x(p,y,!0),c=performance.now())}function I(){return performance.now()-c<d?w.motion.current==0:w.value==0}function X(){return performance.now()-c<d?w.motion.current==1:w.value==1}let w=new et(0);W(()=>{_(u)==!1&&(w.snap(),ie.clear(e.priority,e.id+"_scale"))}),W(()=>{_(p)==!0&&w.value!=0&&(ie.stacked()?w.set(0,{duration:0}):w.set(0,{duration:150,easing:ki})),_(p)==!1&&w.value!=1&&w.set(1,{duration:150,easing:Mi})}),W(()=>{fe(w.motion.current)});function fe(y){!n||!r||!i||ie.equeue(_(p)?0:e.layer,e.priority,e.id+"_scale",()=>{n.style.opacity=`${y}`,r.style.scale=`${y}`,i.style.scale=`${y}`})}let ne=NaN,E=A(!1),re=new et(-o/2,{easing:wt}),Ve=new et(-a/2,{easing:wt});W(()=>{_(u)==!1&&(re.snap(),re.snap(),ie.clear(e.priority,e.id+"_angle"))}),W(()=>{_(p)==!0&&_(E)&&(re.update({duration:75}),re.update({duration:75}))}),W(()=>{Yt(re.motion.current,Ve.motion.current)});function Yt(y,We){if(!n||!r||!i)return;const $=y+o/2,Ge=We+a/2,ye=a<o?$*a/o:$,ge=a>o?Ge*o/a:Ge,or=Math.atan2(ge,ye)/Math.PI*180-45,Wt=0,ar=30,ct=Math.sqrt(ye*ye+ge*ge),Ie=Math.min(o,a)/2,lr=Ie*Math.SQRT2,ur=(ct-Ie)/(lr-Ie),Gt=Wt+ur*(ar-Wt),fr=ct<Ie?ct/Ie:1;ie.equeue(e.layer,e.priority,e.id+"_angle",()=>{r.style.transform=`translate(${Math.round(y)}px, ${Math.round(We)}px)`,i.style.transform=`scale(${fr}) rotate(${or}deg) skew(${Gt}deg, ${Gt}deg)`})}function rr(y,We){if(_(E)==!1||We==!0){let $=Ne.getOffsets(o,a,y);re.set(Math.round($.x),{duration:0}),Ve.set(Math.round($.y),{duration:0}),Yt(re.value,Ve.value),ne=y,x(E,!0)}else if(y!=ne){let $=Math.abs(y-ne),Ge=$<180?$:360-$,ye=Math.log(Ge)*75,ge=Ne.getOffsets(o,a,y);re.set(Math.round(ge.x),{duration:ye}),Ve.set(Math.round(ge.y),{duration:ye}),ne=y}}function ir(){return Ne.getOffsets(o,a,ne)}var sr={getBody:l,setDisplayed:f,getDisplayed:h,setCollapsed:k,getCollapsed:I,getExpanded:X,setAngle:rr,getOffsets:ir},Xe=Li(),Vt=_t(Xe);be(Vt,y=>i=y,()=>i);var ft=Wr(Vt,2),Xt=_t(ft);return be(Xt,y=>s=y,()=>s),be(ft,y=>r=y,()=>r),be(Xe,y=>n=y,()=>n),Sn(()=>{Zn(Xe,1,Un(["anchor",_(u)&&"displayed"]),"svelte-11extwn"),it(ft,`margin: ${e.margin}px;`),it(Xt,`width: ${e.width}px; height: ${e.height}px; border-radius: ${e.radius}px;`)}),zn(t,Xe),Lt(sr)}var je;(t=>{async function e(r,i){const s=await fetch(r,i);if(!s.ok)throw new Error(s.statusText);return s.json()}t.get=e;async function n(r,i,s){const o=await fetch(r,{method:"POST",body:JSON.stringify(i),headers:{"Content-Type":"application/json",...s?.headers},...s});if(!o.ok)throw new Error(o.statusText);return o.json()}t.post=n})(je||(je={}));var Ee;(t=>{function e(a,l,u){return{x:r(l)*u,y:i(a)*u}}t.project=e;function n(a,l,u){return{lat:o(l/u),lng:s(a/u)}}t.unproject=n;function r(a){return(180+a)/360}function i(a){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+a*Math.PI/360)))/360}function s(a){return a*360-180}function o(a){return 360/Math.PI*Math.atan(Math.exp((180-a*360)*Math.PI/180))-90}})(Ee||(Ee={}));class Yn{swLat;swLng;neLat;neLng;constructor(e,n,r,i,s){const o=r*Math.pow(2,n),a=Ee.project(e.sw.lat,e.sw.lng,o),l=Ee.project(e.ne.lat,e.ne.lng,o),u=a.x-i,f=a.y+s,h=l.x+i,p=l.y-s,c=Ee.unproject(u,f,o),d=Ee.unproject(h,p,o);this.swLat=c.lat,this.swLng=c.lng,this.neLat=d.lat,this.neLng=d.lng}contains(e,n){return this.swLat<=e&&e<=this.neLat?this.swLng<this.neLng?this.swLng<=n&&n<=this.neLng:n<=this.neLng||this.swLng<=n:!1}}var pt;function Vn(t){return{lang:t?.lang??pt?.lang,message:t?.message,abortEarly:t?.abortEarly??pt?.abortEarly,abortPipeEarly:t?.abortPipeEarly??pt?.abortPipeEarly}}var Ii;function Oi(t){return Ii?.get(t)}var Fi;function Ri(t){return Fi?.get(t)}var Ni;function ji(t,e){return Ni?.get(t)?.get(e)}function He(t){const e=typeof t;return e==="string"?`"${t}"`:e==="number"||e==="bigint"||e==="boolean"?`${t}`:e==="object"||e==="function"?(t&&Object.getPrototypeOf(t)?.constructor?.name)??"null":e}function P(t,e,n,r,i){const s=i&&"input"in i?i.input:n.value,o=i?.expected??t.expects??null,a=i?.received??He(s),l={kind:t.kind,type:t.type,input:s,expected:o,received:a,message:`Invalid ${e}: ${o?`Expected ${o} but r`:"R"}eceived ${a}`,requirement:t.requirement,path:i?.path,issues:i?.issues,lang:r.lang,abortEarly:r.abortEarly,abortPipeEarly:r.abortPipeEarly},u=t.kind==="schema",f=i?.message??t.message??ji(t.reference,l.lang)??(u?Ri(l.lang):null)??r.message??Oi(l.lang);f!==void 0&&(l.message=typeof f=="function"?f(l):f),u&&(n.typed=!1),n.issues?n.issues.push(l):n.issues=[l]}function R(t){return{version:1,vendor:"valibot",validate(e){return t["~run"]({value:e},Vn())}}}var ut=class extends Error{constructor(t){super(t[0].message),this.name="ValiError",this.issues=t}};function j(t){return{kind:"transformation",type:"args",reference:j,async:!1,schema:t,"~run"(e,n){const r=e.value;return e.value=(...i)=>{const s=this.schema["~run"]({value:i},n);if(s.issues)throw new ut(s.issues);return r(...s.value)},e}}}function Xn(){return{kind:"transformation",type:"await",reference:Xn,async:!0,async"~run"(t){return t.value=await t.value,t}}}function Wn(t,e){return{kind:"validation",type:"check",reference:Wn,async:!1,expects:null,requirement:t,message:e,"~run"(n,r){return n.typed&&!this.requirement(n.value)&&P(this,"input",n,r),n}}}function Gn(t,e){return{kind:"validation",type:"length",reference:Gn,async:!1,expects:`${t}`,requirement:t,message:e,"~run"(n,r){return n.typed&&n.value.length!==this.requirement&&P(this,"length",n,r,{received:`${n.value.length}`}),n}}}function Ae(t,e){return{kind:"validation",type:"max_value",reference:Ae,async:!1,expects:`<=${t instanceof Date?t.toJSON():He(t)}`,requirement:t,message:e,"~run"(n,r){return n.typed&&!(n.value<=this.requirement)&&P(this,"value",n,r,{received:n.value instanceof Date?n.value.toJSON():He(n.value)}),n}}}function zt(t,e){return{kind:"validation",type:"min_length",reference:zt,async:!1,expects:`>=${t}`,requirement:t,message:e,"~run"(n,r){return n.typed&&n.value.length<this.requirement&&P(this,"length",n,r,{received:`${n.value.length}`}),n}}}function K(t,e){return{kind:"validation",type:"min_value",reference:K,async:!1,expects:`>=${t instanceof Date?t.toJSON():He(t)}`,requirement:t,message:e,"~run"(n,r){return n.typed&&!(n.value>=this.requirement)&&P(this,"value",n,r,{received:n.value instanceof Date?n.value.toJSON():He(n.value)}),n}}}function H(t){return{kind:"transformation",type:"returns",reference:H,async:!1,schema:t,"~run"(e,n){const r=e.value;return e.value=(...i)=>{const s=this.schema["~run"]({value:r(...i)},n);if(s.issues)throw new ut(s.issues);return s.value},e}}}function Kn(t){return{kind:"transformation",type:"returns",reference:Kn,async:!1,schema:t,"~run"(e,n){const r=e.value;return e.value=async(...i)=>{const s=await this.schema["~run"]({value:await r(...i)},n);if(s.issues)throw new ut(s.issues);return s.value},e}}}function zi(t,e,n){return typeof t.fallback=="function"?t.fallback(e,n):t.fallback}function Jn(t,e,n){return typeof t.default=="function"?t.default(e,n):t.default}function Qn(t,e){return{kind:"schema",type:"array",reference:Qn,expects:"Array",async:!1,item:t,message:e,get"~standard"(){return R(this)},"~run"(n,r){const i=n.value;if(Array.isArray(i)){n.typed=!0,n.value=[];for(let s=0;s<i.length;s++){const o=i[s],a=this.item["~run"]({value:o},r);if(a.issues){const l={type:"array",origin:"value",input:i,key:s,value:o};for(const u of a.issues)u.path?u.path.unshift(l):u.path=[l],n.issues?.push(u);if(n.issues||(n.issues=a.issues),r.abortEarly){n.typed=!1;break}}a.typed||(n.typed=!1),n.value.push(a.value)}}else P(this,"type",n,r);return n}}}function $n(t){return{kind:"schema",type:"boolean",reference:$n,expects:"boolean",async:!1,message:t,get"~standard"(){return R(this)},"~run"(e,n){return typeof e.value=="boolean"?e.typed=!0:P(this,"type",e,n),e}}}function er(t,e){return{kind:"schema",type:"custom",reference:er,expects:"unknown",async:!1,check:t,message:e,get"~standard"(){return R(this)},"~run"(n,r){return this.check(n.value)?n.typed=!0:P(this,"type",n,r),n}}}function z(t){return{kind:"schema",type:"function",reference:z,expects:"Function",async:!1,message:t,get"~standard"(){return R(this)},"~run"(e,n){return typeof e.value=="function"?e.typed=!0:P(this,"type",e,n),e}}}function g(t){return{kind:"schema",type:"number",reference:g,expects:"number",async:!1,message:t,get"~standard"(){return R(this)},"~run"(e,n){return typeof e.value=="number"&&!isNaN(e.value)?e.typed=!0:P(this,"type",e,n),e}}}function C(t,e){return{kind:"schema",type:"object",reference:C,expects:"Object",async:!1,entries:t,message:e,get"~standard"(){return R(this)},"~run"(n,r){const i=n.value;if(i&&typeof i=="object"){n.typed=!0,n.value={};for(const s in this.entries){const o=this.entries[s];if(s in i||(o.type==="exact_optional"||o.type==="optional"||o.type==="nullish")&&o.default!==void 0){const a=s in i?i[s]:Jn(o),l=o["~run"]({value:a},r);if(l.issues){const u={type:"object",origin:"value",input:i,key:s,value:a};for(const f of l.issues)f.path?f.path.unshift(u):f.path=[u],n.issues?.push(f);if(n.issues||(n.issues=l.issues),r.abortEarly){n.typed=!1;break}}l.typed||(n.typed=!1),n.value[s]=l.value}else if(o.fallback!==void 0)n.value[s]=zi(o);else if(o.type!=="exact_optional"&&o.type!=="optional"&&o.type!=="nullish"&&(P(this,"key",n,r,{input:void 0,expected:`"${s}"`,path:[{type:"object",origin:"key",input:i,key:s,value:i[s]}]}),r.abortEarly))break}}else P(this,"type",n,r);return n}}}function Et(t,e){return{kind:"schema",type:"optional",reference:Et,expects:`(${t.expects} | undefined)`,async:!1,wrapped:t,default:e,get"~standard"(){return R(this)},"~run"(n,r){return n.value===void 0&&(this.default!==void 0&&(n.value=Jn(this,n,r)),n.value===void 0)?(n.typed=!0,n):this.wrapped["~run"](n,r)}}}function tr(t){return{kind:"schema",type:"promise",reference:tr,expects:"Promise",async:!1,message:t,get"~standard"(){return R(this)},"~run"(e,n){return e.value instanceof Promise?e.typed=!0:P(this,"type",e,n),e}}}function Ye(t){return{kind:"schema",type:"string",reference:Ye,expects:"string",async:!1,message:t,get"~standard"(){return R(this)},"~run"(e,n){return typeof e.value=="string"?e.typed=!0:P(this,"type",e,n),e}}}function B(t,e){return{kind:"schema",type:"tuple",reference:B,expects:"Array",async:!1,items:t,message:e,get"~standard"(){return R(this)},"~run"(n,r){const i=n.value;if(Array.isArray(i)){n.typed=!0,n.value=[];for(let s=0;s<this.items.length;s++){const o=i[s],a=this.items[s]["~run"]({value:o},r);if(a.issues){const l={type:"array",origin:"value",input:i,key:s,value:o};for(const u of a.issues)u.path?u.path.unshift(l):u.path=[l],n.issues?.push(u);if(n.issues||(n.issues=a.issues),r.abortEarly){n.typed=!1;break}}a.typed||(n.typed=!1),n.value.push(a.value)}}else P(this,"type",n,r);return n}}}function ze(t){return{kind:"schema",type:"void",reference:ze,expects:"void",async:!1,message:t,get"~standard"(){return R(this)},"~run"(e,n){return e.value===void 0?e.typed=!0:P(this,"type",e,n),e}}}function Je(t,e,n){const r=t["~run"]({value:e},Vn(n));if(r.issues)throw new ut(r.issues);return r.value}function b(...t){return{...t[0],pipe:t,get"~standard"(){return R(this)},"~run"(e,n){for(const r of t)if(r.kind!=="metadata"){if(e.issues&&(r.kind==="schema"||r.kind==="transformation")){e.typed=!1;break}(!e.issues||!n.abortEarly&&!n.abortPipeEarly)&&(e=r["~run"](e,n))}return e}}}function Bi(...t){return{...t[0],pipe:t,async:!0,get"~standard"(){return R(this)},async"~run"(e,n){for(const r of t)if(r.kind!=="metadata"){if(e.issues&&(r.kind==="schema"||r.kind==="transformation")){e.typed=!1;break}(!e.issues||!n.abortEarly&&!n.abortPipeEarly)&&(e=await r["~run"](e,n))}return e}}}const kt=b(g(),K(-90),Ae(90)),Mt=b(g(),K(-180),Ae(180)),Ui=C({sw:C({lat:kt,lng:Mt}),ne:C({lat:kt,lng:Mt})}),xt=er(t=>t instanceof HTMLElement,"Must be an HTMLElement"),Zi=C({mapSize:b(g(),K(1)),zoomMin:b(g(),K(0)),zoomMax:b(g(),K(0)),zoomScale:b(g(),K(1),Ae(10))}),qi=C({inserted:b(z(),j(B([])),H($n())),insert:b(z(),j(B([])),H(ze())),remove:b(z(),j(B([])),H(ze())),update:b(z(),j(B([g()])),H(ze()))}),Hi=C({getParameters:b(z(),j(B([])),H(Zi)),getContainer:b(z(),j(B([])),H(xt)),getZoom:b(z(),j(B([])),H(g())),getBounds:b(z(),j(B([])),H(Ui)),panBy:b(z(),j(B([g(),g()])),H(ze())),createMarker:b(z(),j(B([xt,kt,Mt,g()])),H(qi))}),dt=b(z(),j(B([Ye()])),Kn(Bi(tr(),Xn(),xt))),Yi=C({id:b(Ye(),zt(1)),rank:b(g(),K(0)),lat:b(g(),K(-90),Ae(90)),lng:b(g(),K(-180),Ae(180)),tooltip:C({style:b(C({width:g(),height:g(),margin:g(),radius:g()}),Wn(t=>Math.min(t.width,t.height)/t.margin>=6,"Tooltip: minimum of width or height must be greater than or equal to 6 * margin")),body:dt}),pin:Et(C({style:C({width:g(),height:g(),radius:g()}),body:dt})),popup:Et(C({style:C({width:g(),height:g(),radius:g(),margin:g()}),body:dt}))}),Vi=Qn(Yi);var ve;(t=>{t.COUNT=12,t.DEGREES=[0,30,60,90,120,150,180,210,240,270,300,330],t.DEGREES_DEFAULT=270})(ve||(ve={}));const Xi=b(Ye(),Gn(32)),Wi=b(Ye(),zt(1)),ln="1.1.4",Bt="https://maps.api.arenarium.dev",Gi=`${Bt}/auth`,Ki=`${Bt}/states`,Ji=`${Bt}/log`;class Ut{apiKey;apiToken;apiDevEnvironment;mapProvider;markerDataArray=new Array;markerDataMap=new Map;markerDataUpdating=!1;markerPinProcessor;markerTooltipProcessor;markerPopupProcessor;constructor(e,n,r,i){Je(Xi,e),Je(Wi,n),Je(Hi,r),this.apiKey=e,this.apiToken=n,this.apiDevEnvironment=window?.location.host.startsWith("localhost")||window?.location.host.startsWith("127.0.0.1"),this.mapProvider=r,this.markerPinProcessor=new st(r),this.markerTooltipProcessor=new $i(r),this.markerPopupProcessor=new es(r),this.setConfiguration(i)}static async create(e,n,r){const i={key:e,version:ln};let o=(await je.post(Gi,i)).token;if(!o)throw new Error("Failed to get api token");return new Ut(e,o,n,r)}setConfiguration(e){ie.setLimit(e?.animation?.queue?.limit??8*navigator.hardwareConcurrency),this.markerPinProcessor.setConfiguration(e)}async updateMarkers(e){Je(Vi,e);try{await this.updateMarkerData(e),this.processMarkerDataCallback()}catch(n){throw console.error(n),this.removeMarkerData(),n instanceof Error&&this.log("error","Failed to update markers",n),n}}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 n of this.markerDataArray)n.marker.id==e?this.markerPopupProcessor.show(n):this.markerPopupProcessor.hide(n)}catch(n){console.error(n);for(const r of this.markerDataArray)this.markerPopupProcessor.hide(r);throw n instanceof Error&&this.log("error","Failed to show popup",n),n}}hidePopup(e){try{if(e){const n=this.markerDataMap.get(e);if(n==null)return;this.markerPopupProcessor.hide(n)}else for(const n of this.markerDataArray)this.markerPopupProcessor.hide(n)}catch(n){console.error(n);for(const r of this.markerDataArray)this.markerPopupProcessor.hide(r);throw n instanceof Error&&this.log("error","Failed to hide popup",n),n}}async updateMarkerData(e){try{let n=this.markerDataArray.map(i=>i.marker);for(let i=0;i<e.length;i++){const s=e[i];this.markerDataMap.get(s.id)||n.push(s)}const r=await this.getMarkerStates(n);try{this.markerDataUpdating=!0;for(let i=0;i<n.length;i++){const s=n[i],o=r[i],a=this.markerDataMap.get(s.id);if(a)a.update(o);else{const l=new Qi(this.mapProvider,s,o);l.create(),this.markerDataMap.set(s.id,l),this.markerDataArray.push(l)}}this.markerDataArray.sort((i,s)=>i.zoom-s.zoom),this.markerPinProcessor.updateElements(this.markerDataArray.map(i=>i.pin)),this.markerTooltipProcessor.updateElements(this.markerDataArray.map(i=>i.tooltip)),this.markerPopupProcessor.updateElements(this.markerDataArray.map(i=>i.popup).filter(i=>i!=null))}finally{this.markerDataUpdating=!1}}catch(n){throw console.error(n),this.markerDataArray.forEach(r=>r.remove()),this.markerDataArray.length=0,this.markerDataMap.clear(),n instanceof Error&&this.log("error","Failed to update marker data",n),n}finally{this.markerDataUpdating=!1}}removeMarkerData(){try{this.markerDataUpdating=!0,this.markerPinProcessor.removeElements(),this.markerTooltipProcessor.removeElements(),this.markerPopupProcessor.removeElements(),this.markerDataArray.length=0,this.markerDataMap.clear()}catch(e){throw console.error(e),e instanceof Error&&this.log("error","Failed to remove marker data",e),e}finally{this.markerDataUpdating=!1}}async getMarkerStates(e){if(e.length==0)return[];if(e.length==1)return[[0,[[0,ve.DEGREES.indexOf(ve.DEGREES_DEFAULT)]]]];const n=e.map(s=>({id:s.id,rank:s.rank,lat:s.lat,lng:s.lng,width:s.tooltip.style.width,height:s.tooltip.style.height,margin:s.tooltip.style.margin})),r={key:this.apiKey,token:this.apiToken,parameters:this.mapProvider.getParameters(),input:n},i=await je.post(Ki,r,{headers:{"Cache-Control":this.apiDevEnvironment?"no-cache":""}});return i.token&&(this.apiToken=i.token),i.states}processMarkerDataCallback(){if(this.mapProvider.getContainer().parentElement!=null&&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(),n=this.mapProvider.getZoom();this.markerPopupProcessor.process(),this.markerTooltipProcessor.process(e,n),this.markerPinProcessor.process(e,n)}async log(e,n,r){if(!this.apiDevEnvironment)try{const i={key:this.apiKey,title:n,level:e,content:{version:ln,...r}};await je.post(Ji,i)}catch(i){console.error(i)}}}class Qi{marker;zoom;pin;tooltip;popup;constructor(e,n,r){this.marker=n,this.zoom=r[0],this.pin=new Be(e,n,r),this.tooltip=new qt(e,n,r),n.popup&&(this.popup=new Ht(e,n))}create(){this.pin.create(),this.tooltip.create(),this.popup?.create()}update(e){this.pin.update(e),this.tooltip.update(e)}remove(){this.pin.remove(),this.tooltip.remove(),this.popup?.remove()}}class Zt{provider;id;lat;lng;shown;element;component;marker;constructor(e,n){this.provider=e,this.id=n.id,this.lat=n.lat,this.lng=n.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 n=this.marker,r=this.component;if(n==null||r==null)throw new Error("Failed to update provider marker map");e?n.inserted()==!1&&n.insert():n.inserted()==!0&&n.remove()}getZindex(){throw new Error("Get z-index not implemented")}remove(){this.marker?.remove()}}class Be extends Zt{static DEFAULT_SIZE=16;width;height;radius;zoom;bodyLoading=!1;bodyLoaded=!1;bodyCallback;constructor(e,n,r){super(e,n),this.width=n.pin?.style.width??Be.DEFAULT_SIZE,this.height=n.pin?.style.height??Be.DEFAULT_SIZE,this.radius=n.pin?.style.radius??Be.DEFAULT_SIZE,this.zoom=r[0],this.bodyCallback=n.pin?.body}createElement(){this.element=document.createElement("div"),this.element.classList.add("pin"),this.component=Nt(Ti,{target:this.element,props:{id:this.id+"_pin",layer:Ai,priority:this.zoom*this.provider.getParameters().zoomScale,width:this.width,height:this.height,radius:this.radius}})}update(e){this.zoom=e[0],this.updateZIndex()}updateMap(e){super.updateMap(e),this.component?.setDisplayed(e)}updateBody(){if(this.bodyCallback==null||this.bodyLoaded||this.bodyLoading)return;const e=this.component?.getBody();e!=null&&(this.bodyLoading=!0,this.bodyCallback(this.id).then(n=>{n instanceof HTMLElement?e.appendChild(n):console.error("Failed to load pin body")}).catch(n=>console.error(n)).finally(()=>{this.bodyLoaded=!0,this.bodyLoading=!1}))}setCollapsed(e){if(this.component==null)throw new Error("Failed to set pin collapsed");this.component.setCollapsed(e)}setScale(e){if(this.component==null)throw new Error("Failed to set pin scale");this.component.setScale(e)}getScaleFromZoomDistance(e){return this.zoom<e?1:Math.max(0,1-(this.zoom-e)*.125)}getZindex(){const e=this.provider.getParameters();return Math.round((e.zoomMax-this.zoom)*e.zoomScale)}isCollapsed(){return this.component==null?!1:this.component.getCollapsed()}isBodyLoaded(){return this.bodyCallback==null||this.bodyLoaded}}class st{static MAP_PINS_MAX_ZOOM=2;static MAP_PINS_MAX_COUNT=128;provider;pinElements=new Array;pinMaxWidth=0;pinMaxHeight=0;pinFade=!1;pinMaxCount=0;pinMaxZoomDelta=0;constructor(e){this.provider=e}setConfiguration(e){this.pinFade=e?.pin?.fade??!0,this.pinMaxCount=e?.pin?.maxCount??Math.max(st.MAP_PINS_MAX_COUNT,8*navigator.hardwareConcurrency),this.pinMaxZoomDelta=e?.pin?.maxZoom??st.MAP_PINS_MAX_ZOOM}updateElements(e){this.pinElements=e,this.pinMaxWidth=e.reduce((n,r)=>Math.max(n,r.width),0),this.pinMaxHeight=e.reduce((n,r)=>Math.max(n,r.height),0)}removeElements(){this.pinElements.forEach(e=>e.remove()),this.pinElements.length=0}process(e,n){const r=this.provider.getParameters().mapSize,i=new Yn(e,n,r,this.pinMaxWidth*2,this.pinMaxHeight*2);let s=0;for(const o of this.pinElements)i.contains(o.lat,o.lng)?o.shown&&n<o.zoom&&o.zoom<n+this.pinMaxZoomDelta?(s<this.pinMaxCount&&(o.setCollapsed(!1),o.setScale(this.pinFade?o.getScaleFromZoomDistance(n):1),o.updateMap(!0),o.isBodyLoaded()==!1&&o.updateBody()),s++):(o.setCollapsed(!0),o.isCollapsed()&&o.updateMap(!1)):o.updateMap(!1)}}class qt extends Zt{static Z_INDEX_OFFSET=1e6;width;height;margin;radius;zoom;angle;states;bodyLoading=!1;bodyLoaded=!1;bodyCallback;constructor(e,n,r){super(e,n),this.width=n.tooltip.style.width,this.height=n.tooltip.style.height,this.margin=n.tooltip.style.margin,this.radius=n.tooltip.style.radius,this.zoom=r[0],this.angle=ve.DEGREES_DEFAULT,this.states=r[1].map(i=>[i[0],ve.DEGREES[i[1]]]),this.bodyCallback=n.tooltip.body}createElement(){this.element=document.createElement("div"),this.element.classList.add("tooltip"),this.component=Nt(Hn,{target:this.element,props:{id:this.id+"_tooltip",layer:Si,priority:this.zoom*this.provider.getParameters().zoomScale,width:this.width,height:this.height,margin:this.margin,radius:this.radius}})}update(e){this.zoom=e[0],this.states=e[1].map(n=>[n[0],ve.DEGREES[n[1]]]),this.updateZIndex()}updateMap(e){super.updateMap(e),this.component?.setDisplayed(e)}updateState(e){if(this.component==null)throw new Error("Failed to update tooltip state");this.angle=this.getAngle(e),this.component.setAngle(this.angle)}updateBody(){if(this.bodyLoaded||this.bodyLoading)return;const e=this.component?.getBody();e!=null&&(this.bodyLoading=!0,this.bodyCallback(this.id).then(n=>{n instanceof HTMLElement?e.appendChild(n):console.error("Failed to load tooltip body")}).catch(n=>console.error(n)).finally(()=>{this.bodyLoaded=!0,this.bodyLoading=!1}))}getAngle(e){const n=this.states.findLast(r=>r[0]<=e);if(!n)throw new Error("Angle not found");return n[1]}getZindex(){const e=this.provider.getParameters();return Math.round((e.zoomMax-this.zoom)*e.zoomScale)+qt.Z_INDEX_OFFSET}setCollapsed(e){if(this.component==null)throw new Error("Failed to set tooltip collapsed");this.component.setCollapsed(e)}isExpanded(){return this.component==null?!1:this.component.getExpanded()}isCollapsed(){return this.component==null?!1:this.component.getCollapsed()}isBodyLoaded(){return this.bodyLoaded}}class $i{provider;tooltipElements=new Array;tooltipMaxWidth=0;tooltipMaxHeight=0;constructor(e){this.provider=e}updateElements(e){this.tooltipElements=e,this.tooltipMaxWidth=this.tooltipElements.reduce((n,r)=>Math.max(n,r.width),0),this.tooltipMaxHeight=this.tooltipElements.reduce((n,r)=>Math.max(n,r.height),0)}removeElements(){this.tooltipElements.forEach(e=>e.remove()),this.tooltipElements.length=0}process(e,n){const r=this.provider.getParameters().mapSize,i=new Yn(e,n,r,this.tooltipMaxWidth*2,this.tooltipMaxHeight*2);for(const s of this.tooltipElements)i.contains(s.lat,s.lng)?s.shown&&s.zoom<=n?(s.updateState(n),s.setCollapsed(!1),s.updateMap(!0),s.isCollapsed()==!1&&s.isBodyLoaded()==!1&&s.updateBody()):(s.setCollapsed(!0),s.isCollapsed()&&s.updateMap(!1)):s.updateMap(!1)}}class Ht extends Zt{static Z_INDEX_OFFSET=2e6;width;height;margin;radius;bodyLoading=!1;bodyLoaded=!1;bodyCallback;constructor(e,n){if(n.popup==null)throw new Error("Failed to create popup");super(e,n),this.shown=!1,this.width=n.popup.style.width,this.height=n.popup.style.height,this.margin=n.popup.style.margin,this.radius=n.popup.style.radius,this.bodyCallback=n.popup.body}createElement(){this.element=document.createElement("div"),this.element.classList.add("popup"),this.component=Nt(Hn,{target:this.element,props:{id:this.id+"_popup",layer:Pi,priority:0,width:this.width,height:this.height,margin:this.margin,radius:this.radius}})}updateMap(e){super.updateMap(e),this.component?.setDisplayed(e)}updateBody(){if(this.bodyLoaded||this.bodyLoading)return;const e=this.component?.getBody();e!=null&&(this.bodyLoading=!0,this.bodyCallback(this.id).then(n=>{n instanceof HTMLElement?e.appendChild(n):console.error("Failed to load popup body")}).catch(n=>console.error(n)).finally(()=>{this.bodyLoaded=!0,this.bodyLoading=!1}))}getZindex(){return Ht.Z_INDEX_OFFSET}setCollapsed(e){if(this.component==null)throw new Error("Failed to set popup collapsed");this.component.setCollapsed(e)}setAngle(e){if(this.component==null)throw new Error("Failed to set popup angle");this.component.setAngle(e,!0)}isExpanded(){return this.component==null?!1:this.component.getExpanded()}isCollapsed(){return this.component==null?!1:this.component.getCollapsed()}isBodyLoaded(){return this.bodyLoaded}}class es{provider;popupElements=new Array;popupPositioned=new Map;constructor(e){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(n=>[n.id,!1]))}removeElements(){this.popupElements.forEach(e=>e.remove()),this.popupElements.length=0,this.popupPositioned.clear()}process(){for(const e of this.popupElements)if(e.shown){if(e.setCollapsed(!1),e.updateMap(!0),e.isExpanded()&&e.isBodyLoaded()==!1&&e.updateBody(),e.isCollapsed()==!1&&this.popupPositioned.get(e.id)==!1){const n=e.component?.getBody();if(n==null)continue;const r=e.component?.getOffsets();if(r==null)continue;const i=n.getBoundingClientRect();if(i.x==0&&i.y==0&&i.width==0&&i.height==0)continue;const s=i.x+i.width/2,o=i.y+i.height/2,a=s+r.x,l=o+r.y,u=a+e.width,f=l+e.height,h=this.provider.getContainer().getBoundingClientRect(),p=a-h.left,c=h.right-u,d=l-h.top,k=h.bottom-f,I=Math.min(e.width,e.height)/4,X=p<0?p-I:c<0?-c+I:0,w=d<0?d-I:k<0?-k+I:0;this.provider.panBy(X,w),this.popupPositioned.set(e.id,!0)}}else e.setCollapsed(!0),e.isCollapsed()&&e.updateMap(!1)}}const nr=()=>'<img src="https://arenarium.dev/favicon.svg" alt="Arenarium Maps" style="height: 1.25em; vertical-align: middle;" />',ts=()=>`<a href="https://arenarium.dev" target="_blank" style="color: inherit;">${nr()}<span> @arenarium/maps</span></a>`;exports.MapManager=Ut;exports.getAttributionHtml=ts;exports.getImageHtml=nr;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const kr=!1;var Er=Array.isArray,xn=Array.prototype.indexOf,Pn=Array.from,Mt=Object.defineProperty,Ue=Object.getOwnPropertyDescriptor,Sn=Object.prototype,An=Array.prototype,Dn=Object.getPrototypeOf,or=Object.isExtensible;function Cn(t){for(var e=0;e<t.length;e++)t[e]()}function Tn(){var t,e,r=new Promise((n,i)=>{t=n,e=i});return{promise:r,resolve:t,reject:e}}const R=2,It=4,Mr=8,Le=16,fe=32,ge=64,Ot=128,q=256,st=512,L=1024,K=2048,ce=4096,Ae=8192,Ie=16384,Ft=32768,xr=65536,ar=1<<17,Ln=1<<18,Oe=1<<19,In=1<<20,xt=1<<21,Rt=1<<22,ve=1<<23,rt=Symbol("$state"),Nt=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"};function On(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Fn(t){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Rn(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Nn(t){throw new Error("https://svelte.dev/e/effect_orphan")}function jn(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function zn(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Bn(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Un(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Zn(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const qn=2,x=Symbol();function Hn(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function Pr(t){return t===this.v}let Yn=!1,Y=null;function De(t){Y=t}function jt(t,e=!1,r){Y={p:Y,c:null,e:null,s:t,x:null,l:null}}function zt(t){var e=Y,r=e.e;if(r!==null){e.e=null;for(var n of r)zr(n)}return t!==void 0&&(e.x=t),Y=e.p,t??{}}function Sr(){return!0}let Me=[];function Vn(){var t=Me;Me=[],Cn(t)}function ut(t){if(Me.length===0){var e=Me;queueMicrotask(()=>{e===Me&&Vn()})}Me.push(t)}const Xn=new WeakMap;function Ar(t){var e=m;if(e===null)return v.f|=ve,t;if((e.f&Ft)===0){if((e.f&Ot)===0)throw!e.parent&&t instanceof Error&&Dr(t),t;e.b.error(t)}else Ce(t,e)}function Ce(t,e){for(;e!==null;){if((e.f&Ot)!==0)try{e.b.error(t);return}catch(r){t=r}e=e.parent}throw t instanceof Error&&Dr(t),t}function Dr(t){const e=Xn.get(t);e&&(Mt(t,"message",{value:e.message}),Mt(t,"stack",{value:e.stack}))}const wt=new Set;let A=null,Pt=new Set,Xe=[],Bt=null,St=!1;class ie{current=new Map;#e=new Map;#t=new Set;#a=0;#n=null;#c=!1;#o=[];#i=[];#r=[];#s=[];#l=[];#h=[];#f=[];skipped_effects=new Set;process(e){Xe=[];for(const i of e)this.#p(i);if(this.#o.length===0&&this.#a===0){this.#d();var r=this.#r,n=this.#s;this.#r=[],this.#s=[],this.#l=[],A=null,lr(r),lr(n),A===null?A=this:wt.delete(this),this.#n?.resolve()}else this.#u(this.#r),this.#u(this.#s),this.#u(this.#l);for(const i of this.#o)Se(i);for(const i of this.#i)Se(i);this.#o=[],this.#i=[]}#p(e){e.f^=L;for(var r=e.first;r!==null;){var n=r.f,i=(n&(fe|ge))!==0,s=i&&(n&L)!==0,o=s||(n&Ae)!==0||this.skipped_effects.has(r);if(!o&&r.fn!==null){if(i)r.f^=L;else if((n&It)!==0)this.#s.push(r);else if((n&L)===0)if((n&Rt)!==0){var l=r.b?.is_pending()?this.#i:this.#o;l.push(r)}else ct(r)&&((r.f&Le)!==0&&this.#l.push(r),Se(r));var a=r.first;if(a!==null){r=a;continue}}var u=r.parent;for(r=r.next;r===null&&u!==null;)r=u.next,u=u.parent}}#u(e){for(const r of e)((r.f&K)!==0?this.#h:this.#f).push(r),H(r,L);e.length=0}capture(e,r){this.#e.has(e)||this.#e.set(e,r),this.current.set(e,e.v)}activate(){A=this}deactivate(){A=null;for(const e of Pt)if(Pt.delete(e),e(),A!==null)break}neuter(){this.#c=!0}flush(){Xe.length>0?Wn():this.#d(),A===this&&(this.#a===0&&wt.delete(this),this.deactivate())}#d(){if(!this.#c)for(const e of this.#t)e();this.#t.clear()}increment(){this.#a+=1}decrement(){if(this.#a-=1,this.#a===0){for(const e of this.#h)H(e,K),We(e);for(const e of this.#f)H(e,ce),We(e);this.#r=[],this.#s=[],this.flush()}else this.deactivate()}add_callback(e){this.#t.add(e)}settled(){return(this.#n??=Tn()).promise}static ensure(){if(A===null){const e=A=new ie;wt.add(A),ie.enqueue(()=>{A===e&&e.flush()})}return A}static enqueue(e){ut(e)}}function Wn(){var t=Pe;St=!0;try{var e=0;for(cr(!0);Xe.length>0;){var r=ie.ensure();if(e++>1e3){var n,i;Gn()}r.process(Xe),ue.clear()}}finally{St=!1,cr(t),Bt=null}}function Gn(){try{jn()}catch(t){Ce(t,Bt)}}let de=null;function lr(t){var e=t.length;if(e!==0){for(var r=0;r<e;){var n=t[r++];if((n.f&(Ie|Ae))===0&&ct(n)&&(de=[],Se(n),n.deps===null&&n.first===null&&n.nodes_start===null&&(n.teardown===null&&n.ac===null?qr(n):n.fn=null),de?.length>0)){ue.clear();for(const i of de)Se(i);de=[]}}de=null}}function We(t){for(var e=Bt=t;e.parent!==null;){e=e.parent;var r=e.f;if(St&&e===m&&(r&Le)!==0)return;if((r&(ge|fe))!==0){if((r&L)===0)return;e.f^=L}}Xe.push(e)}function Kn(t){let e=0,r=ft(0),n;return()=>{ci()&&(g(r),qt(()=>(e===0&&(n=Kr(()=>t(()=>Ze(r)))),e+=1,()=>{ut(()=>{e-=1,e===0&&(n?.(),n=void 0,Ze(r))})})))}}var Jn=xr|Oe|Ot;function Qn(t,e,r){new $n(t,e,r)}class $n{parent;#e=!1;#t;#a=null;#n;#c;#o;#i=null;#r=null;#s=null;#l=null;#h=0;#f=0;#p=!1;#u=null;#d=()=>{this.#u&&ot(this.#u,this.#h)};#g=Kn(()=>(this.#u=ft(this.#h),()=>{this.#u=null}));constructor(e,r,n){this.#t=e,this.#n=r,this.#c=n,this.parent=m.b,this.#e=!!this.#n.pending,this.#o=vi(()=>{m.b=this;{try{this.#i=pe(()=>n(this.#t))}catch(i){this.error(i)}this.#f>0?this.#m():this.#e=!1}},Jn)}#_(){try{this.#i=pe(()=>this.#c(this.#t))}catch(e){this.error(e)}this.#e=!1}#w(){const e=this.#n.pending;e&&(this.#r=pe(()=>e(this.#t)),ie.enqueue(()=>{this.#i=this.#v(()=>(ie.ensure(),pe(()=>this.#c(this.#t)))),this.#f>0?this.#m():(nt(this.#r,()=>{this.#r=null}),this.#e=!1)}))}is_pending(){return this.#e||!!this.parent&&this.parent.is_pending()}has_pending_snippet(){return!!this.#n.pending}#v(e){var r=m,n=v,i=Y;ne(this.#o),I(this.#o),De(this.#o.ctx);try{return e()}catch(s){return Ar(s),null}finally{ne(r),I(n),De(i)}}#m(){const e=this.#n.pending;this.#i!==null&&(this.#l=document.createDocumentFragment(),ei(this.#i,this.#l)),this.#r===null&&(this.#r=pe(()=>e(this.#t)))}#y(e){if(!this.has_pending_snippet()){this.parent&&this.parent.#y(e);return}this.#f+=e,this.#f===0&&(this.#e=!1,this.#r&&nt(this.#r,()=>{this.#r=null}),this.#l&&(this.#t.before(this.#l),this.#l=null))}update_pending_count(e){this.#y(e),this.#h+=e,Pt.add(this.#d)}get_effect_pending(){return this.#g(),g(this.#u)}error(e){var r=this.#n.onerror;let n=this.#n.failed;if(this.#p||!r&&!n)throw e;this.#i&&(te(this.#i),this.#i=null),this.#r&&(te(this.#r),this.#r=null),this.#s&&(te(this.#s),this.#s=null);var i=!1,s=!1;const o=()=>{if(i){Hn();return}i=!0,s&&Zn(),ie.ensure(),this.#h=0,this.#s!==null&&nt(this.#s,()=>{this.#s=null}),this.#e=this.has_pending_snippet(),this.#i=this.#v(()=>(this.#p=!1,pe(()=>this.#c(this.#t)))),this.#f>0?this.#m():this.#e=!1};var l=v;try{I(null),s=!0,r?.(e,o),s=!1}catch(a){Ce(a,this.#o&&this.#o.parent)}finally{I(l)}n&&ut(()=>{this.#s=this.#v(()=>{this.#p=!0;try{return pe(()=>{n(this.#t,()=>e,()=>o)})}catch(a){return Ce(a,this.#o.parent),null}finally{this.#p=!1}})})}}function ei(t,e){for(var r=t.nodes_start,n=t.nodes_end;r!==null;){var i=r===n?null:Zt(r);e.append(r),r=i}}function ti(t,e,r){const n=ni;if(e.length===0){r(t.map(n));return}var i=A,s=m,o=ri();Promise.all(e.map(l=>ii(l))).then(l=>{i?.activate(),o();try{r([...t.map(n),...l])}catch(a){(s.f&Ie)===0&&Ce(a,s)}i?.deactivate(),Cr()}).catch(l=>{Ce(l,s)})}function ri(){var t=m,e=v,r=Y,n=A;return function(){ne(t),I(e),De(r),n?.activate()}}function Cr(){ne(null),I(null),De(null)}function ni(t){var e=R|K,r=v!==null&&(v.f&R)!==0?v:null;return m===null||r!==null&&(r.f&q)!==0?e|=q:m.f|=Oe,{ctx:Y,deps:null,effects:null,equals:Pr,f:e,fn:t,reactions:null,rv:0,v:x,wv:0,parent:r??m,ac:null}}function ii(t,e){let r=m;r===null&&On();var n=r.b,i=void 0,s=ft(x),o=null,l=!v;return di(()=>{try{var a=t();o&&Promise.resolve(a).catch(()=>{})}catch(c){a=Promise.reject(c)}var u=()=>a;i=o?.then(u,u)??Promise.resolve(a),o=i;var f=A,p=n.is_pending();l&&(n.update_pending_count(1),p||f.increment());const h=(c,d=void 0)=>{o=null,p||f.activate(),d?d!==Nt&&(s.f|=ve,ot(s,d)):((s.f&ve)!==0&&(s.f^=ve),ot(s,c)),l&&(n.update_pending_count(-1),p||f.decrement()),Cr()};if(i.then(h,c=>h(null,c||"unknown")),f)return()=>{queueMicrotask(()=>f.neuter())}}),new Promise(a=>{function u(f){function p(){f===i?a(s):u(i)}f.then(p,p)}u(i)})}function Tr(t){var e=t.effects;if(e!==null){t.effects=null;for(var r=0;r<e.length;r+=1)te(e[r])}}function si(t){for(var e=t.parent;e!==null;){if((e.f&R)===0)return e;e=e.parent}return null}function Ut(t){var e,r=m;ne(si(t));try{Tr(t),e=Wr(t)}finally{ne(r)}return e}function Lr(t){var e=Ut(t);if(t.equals(e)||(t.v=e,t.wv=Vr()),!Fe){var r=(le||(t.f&q)!==0)&&t.deps!==null?ce:L;H(t,r)}}const ue=new Map;function ft(t,e){var r={f:0,v:t,reactions:null,equals:Pr,rv:0,wv:0};return r}function D(t,e){const r=ft(t);return _i(r),r}function P(t,e,r=!1){v!==null&&(!G||(v.f&ar)!==0)&&Sr()&&(v.f&(R|Le|Rt|ar))!==0&&!se?.includes(t)&&Un();let n=r?je(e):e;return ot(t,n)}function ot(t,e){if(!t.equals(e)){var r=t.v;Fe?ue.set(t,e):ue.set(t,r),t.v=e;var n=ie.ensure();n.capture(t,r),(t.f&R)!==0&&((t.f&K)!==0&&Ut(t),H(t,(t.f&q)===0?L:ce)),t.wv=Vr(),Ir(t,K),m!==null&&(m.f&L)!==0&&(m.f&(fe|ge))===0&&(j===null?wi([t]):j.push(t))}return e}function Ze(t){P(t,t.v+1)}function Ir(t,e){var r=t.reactions;if(r!==null)for(var n=r.length,i=0;i<n;i++){var s=r[i],o=s.f,l=(o&K)===0;l&&H(s,e),(o&R)!==0?Ir(s,ce):l&&((o&Le)!==0&&de!==null&&de.push(s),We(s))}}function je(t){if(typeof t!="object"||t===null||rt in t)return t;const e=Dn(t);if(e!==Sn&&e!==An)return t;var r=new Map,n=Er(t),i=D(0),s=me,o=l=>{if(me===s)return l();var a=v,u=me;I(null),pr(s);var f=l();return I(a),pr(u),f};return n&&r.set("length",D(t.length)),new Proxy(t,{defineProperty(l,a,u){(!("value"in u)||u.configurable===!1||u.enumerable===!1||u.writable===!1)&&zn();var f=r.get(a);return f===void 0?f=o(()=>{var p=D(u.value);return r.set(a,p),p}):P(f,u.value,!0),!0},deleteProperty(l,a){var u=r.get(a);if(u===void 0){if(a in l){const f=o(()=>D(x));r.set(a,f),Ze(i)}}else P(u,x),Ze(i);return!0},get(l,a,u){if(a===rt)return t;var f=r.get(a),p=a in l;if(f===void 0&&(!p||Ue(l,a)?.writable)&&(f=o(()=>{var c=je(p?l[a]:x),d=D(c);return d}),r.set(a,f)),f!==void 0){var h=g(f);return h===x?void 0:h}return Reflect.get(l,a,u)},getOwnPropertyDescriptor(l,a){var u=Reflect.getOwnPropertyDescriptor(l,a);if(u&&"value"in u){var f=r.get(a);f&&(u.value=g(f))}else if(u===void 0){var p=r.get(a),h=p?.v;if(p!==void 0&&h!==x)return{enumerable:!0,configurable:!0,value:h,writable:!0}}return u},has(l,a){if(a===rt)return!0;var u=r.get(a),f=u!==void 0&&u.v!==x||Reflect.has(l,a);if(u!==void 0||m!==null&&(!f||Ue(l,a)?.writable)){u===void 0&&(u=o(()=>{var h=f?je(l[a]):x,c=D(h);return c}),r.set(a,u));var p=g(u);if(p===x)return!1}return f},set(l,a,u,f){var p=r.get(a),h=a in l;if(n&&a==="length")for(var c=u;c<p.v;c+=1){var d=r.get(c+"");d!==void 0?P(d,x):c in l&&(d=o(()=>D(x)),r.set(c+"",d))}if(p===void 0)(!h||Ue(l,a)?.writable)&&(p=o(()=>D(void 0)),P(p,je(u)),r.set(a,p));else{h=p.v!==x;var w=o(()=>je(u));P(p,w)}var O=Reflect.getOwnPropertyDescriptor(l,a);if(O?.set&&O.set.call(f,u),!h){if(n&&typeof a=="string"){var J=r.get("length"),E=Number(a);Number.isInteger(E)&&E>=J.v&&P(J,E+1)}Ze(i)}return!0},ownKeys(l){g(i);var a=Reflect.ownKeys(l).filter(p=>{var h=r.get(p);return h===void 0||h.v!==x});for(var[u,f]of r)f.v!==x&&!(u in l)&&a.push(u);return a},setPrototypeOf(){Bn()}})}var ur,Or,Fr,Rr;function oi(){if(ur===void 0){ur=window,Or=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,r=Text.prototype;Fr=Ue(e,"firstChild").get,Rr=Ue(e,"nextSibling").get,or(t)&&(t.__click=void 0,t.__className=void 0,t.__attributes=null,t.__style=void 0,t.__e=void 0),or(r)&&(r.__t=void 0)}}function ai(t=""){return document.createTextNode(t)}function Nr(t){return Fr.call(t)}function Zt(t){return Rr.call(t)}function fr(t,e){return Nr(t)}function li(t,e=1,r=!1){let n=t;for(;e--;)n=Zt(n);return n}function jr(t){var e=v,r=m;I(null),ne(null);try{return t()}finally{I(e),ne(r)}}function ui(t){m===null&&v===null&&Nn(),v!==null&&(v.f&q)!==0&&m===null&&Rn(),Fe&&Fn()}function fi(t,e){var r=e.last;r===null?e.last=e.first=t:(r.next=t,t.prev=r,e.last=t)}function he(t,e,r,n=!0){var i=m;i!==null&&(i.f&Ae)!==0&&(t|=Ae);var s={ctx:Y,deps:null,nodes_start:null,nodes_end:null,f:t|K,first:null,fn:e,last:null,next:null,parent:i,b:i&&i.b,prev:null,teardown:null,transitions:null,wv:0,ac:null};if(r)try{Se(s),s.f|=Ft}catch(a){throw te(s),a}else e!==null&&We(s);if(n){var o=s;if(r&&o.deps===null&&o.teardown===null&&o.nodes_start===null&&o.first===o.last&&(o.f&Oe)===0&&(o=o.first),o!==null&&(o.parent=i,i!==null&&fi(o,i),v!==null&&(v.f&R)!==0&&(t&ge)===0)){var l=v;(l.effects??=[]).push(o)}}return s}function ci(){return v!==null&&!G}function Q(t){ui();var e=m.f,r=!v&&(e&fe)!==0&&(e&Ft)===0;if(r){var n=Y;(n.e??=[]).push(t)}else return zr(t)}function zr(t){return he(It|In,t,!1)}function hi(t){ie.ensure();const e=he(ge|Oe,t,!0);return(r={})=>new Promise(n=>{r.outro?nt(e,()=>{te(e),n(void 0)}):(te(e),n(void 0))})}function pi(t){return he(It,t,!1)}function di(t){return he(Rt|Oe,t,!0)}function qt(t,e=0){return he(Mr|e,t,!0)}function Br(t,e=[],r=[]){ti(e,r,n=>{he(Mr,()=>t(...n.map(g)),!0)})}function vi(t,e=0){var r=he(Le|e,t,!0);return r}function pe(t,e=!0){return he(fe|Oe,t,!0,e)}function Ur(t){var e=t.teardown;if(e!==null){const r=Fe,n=v;hr(!0),I(null);try{e.call(null)}finally{hr(r),I(n)}}}function Zr(t,e=!1){var r=t.first;for(t.first=t.last=null;r!==null;){const i=r.ac;i!==null&&jr(()=>{i.abort(Nt)});var n=r.next;(r.f&ge)!==0?r.parent=null:te(r,e),r=n}}function mi(t){for(var e=t.first;e!==null;){var r=e.next;(e.f&fe)===0&&te(e),e=r}}function te(t,e=!0){var r=!1;(e||(t.f&Ln)!==0)&&t.nodes_start!==null&&t.nodes_end!==null&&(yi(t.nodes_start,t.nodes_end),r=!0),Zr(t,e&&!r),at(t,0),H(t,Ie);var n=t.transitions;if(n!==null)for(const s of n)s.stop();Ur(t);var i=t.parent;i!==null&&i.first!==null&&qr(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes_start=t.nodes_end=t.ac=null}function yi(t,e){for(;t!==null;){var r=t===e?null:Zt(t);t.remove(),t=r}}function qr(t){var e=t.parent,r=t.prev,n=t.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),e!==null&&(e.first===t&&(e.first=n),e.last===t&&(e.last=r))}function nt(t,e){var r=[];Hr(t,r,!0),gi(r,()=>{te(t),e&&e()})}function gi(t,e){var r=t.length;if(r>0){var n=()=>--r||e();for(var i of t)i.out(n)}else e()}function Hr(t,e,r){if((t.f&Ae)===0){if(t.f^=Ae,t.transitions!==null)for(const o of t.transitions)(o.is_global||r)&&e.push(o);for(var n=t.first;n!==null;){var i=n.next,s=(n.f&xr)!==0||(n.f&fe)!==0;Hr(n,e,s?r:!1),n=i}}}let Pe=!1;function cr(t){Pe=t}let Fe=!1;function hr(t){Fe=t}let v=null,G=!1;function I(t){v=t}let m=null;function ne(t){m=t}let se=null;function _i(t){v!==null&&(se===null?se=[t]:se.push(t))}let C=null,F=0,j=null;function wi(t){j=t}let Yr=1,Ge=0,me=Ge;function pr(t){me=t}let le=!1;function Vr(){return++Yr}function ct(t){var e=t.f;if((e&K)!==0)return!0;if((e&ce)!==0){var r=t.deps,n=(e&q)!==0;if(r!==null){var i,s,o=(e&st)!==0,l=n&&m!==null&&!le,a=r.length;if((o||l)&&(m===null||(m.f&Ie)===0)){var u=t,f=u.parent;for(i=0;i<a;i++)s=r[i],(o||!s?.reactions?.includes(u))&&(s.reactions??=[]).push(u);o&&(u.f^=st),l&&f!==null&&(f.f&q)===0&&(u.f^=q)}for(i=0;i<a;i++)if(s=r[i],ct(s)&&Lr(s),s.wv>t.wv)return!0}(!n||m!==null&&!le)&&H(t,L)}return!1}function Xr(t,e,r=!0){var n=t.reactions;if(n!==null&&!se?.includes(t))for(var i=0;i<n.length;i++){var s=n[i];(s.f&R)!==0?Xr(s,e,!1):e===s&&(r?H(s,K):(s.f&L)!==0&&H(s,ce),We(s))}}function Wr(t){var e=C,r=F,n=j,i=v,s=le,o=se,l=Y,a=G,u=me,f=t.f;C=null,F=0,j=null,le=(f&q)!==0&&(G||!Pe||v===null),v=(f&(fe|ge))===0?t:null,se=null,De(t.ctx),G=!1,me=++Ge,t.ac!==null&&(jr(()=>{t.ac.abort(Nt)}),t.ac=null);try{t.f|=xt;var p=t.fn,h=p(),c=t.deps;if(C!==null){var d;if(at(t,F),c!==null&&F>0)for(c.length=F+C.length,d=0;d<C.length;d++)c[F+d]=C[d];else t.deps=c=C;if(!le||(f&R)!==0&&t.reactions!==null)for(d=F;d<c.length;d++)(c[d].reactions??=[]).push(t)}else c!==null&&F<c.length&&(at(t,F),c.length=F);if(Sr()&&j!==null&&!G&&c!==null&&(t.f&(R|ce|K))===0)for(d=0;d<j.length;d++)Xr(j[d],t);return i!==null&&i!==t&&(Ge++,j!==null&&(n===null?n=j:n.push(...j))),(t.f&ve)!==0&&(t.f^=ve),h}catch(w){return Ar(w)}finally{t.f^=xt,C=e,F=r,j=n,v=i,le=s,se=o,De(l),G=a,me=u}}function bi(t,e){let r=e.reactions;if(r!==null){var n=xn.call(r,t);if(n!==-1){var i=r.length-1;i===0?r=e.reactions=null:(r[n]=r[i],r.pop())}}r===null&&(e.f&R)!==0&&(C===null||!C.includes(e))&&(H(e,ce),(e.f&(q|st))===0&&(e.f^=st),Tr(e),at(e,0))}function at(t,e){var r=t.deps;if(r!==null)for(var n=e;n<r.length;n++)bi(t,r[n])}function Se(t){var e=t.f;if((e&Ie)===0){H(t,L);var r=m,n=Pe;m=t,Pe=!0;try{(e&Le)!==0?mi(t):Zr(t),Ur(t);var i=Wr(t);t.teardown=typeof i=="function"?i:null,t.wv=Yr;var s;kr&&Yn&&(t.f&K)!==0&&t.deps}finally{Pe=n,m=r}}}function g(t){var e=t.f,r=(e&R)!==0;if(v!==null&&!G){var n=m!==null&&(m.f&Ie)!==0;if(!n&&!se?.includes(t)){var i=v.deps;if((v.f&xt)!==0)t.rv<Ge&&(t.rv=Ge,C===null&&i!==null&&i[F]===t?F++:C===null?C=[t]:(!le||!C.includes(t))&&C.push(t));else{(v.deps??=[]).push(t);var s=t.reactions;s===null?t.reactions=[v]:s.includes(v)||s.push(v)}}}else if(r&&t.deps===null&&t.effects===null){var o=t,l=o.parent;l!==null&&(l.f&q)===0&&(o.f^=q)}if(Fe){if(ue.has(t))return ue.get(t);if(r){o=t;var a=o.v;return((o.f&L)===0&&o.reactions!==null||Gr(o))&&(a=Ut(o)),ue.set(o,a),a}}else r&&(o=t,ct(o)&&Lr(o));if((t.f&ve)!==0)throw t.v;return t.v}function Gr(t){if(t.v===x)return!0;if(t.deps===null)return!1;for(const e of t.deps)if(ue.has(e)||(e.f&R)!==0&&Gr(e))return!0;return!1}function Kr(t){var e=G;try{return G=!0,t()}finally{G=e}}const ki=-7169;function H(t,e){t.f=t.f&ki|e}const Ei=["touchstart","touchmove"];function Mi(t){return Ei.includes(t)}const xi=new Set,dr=new Set;let vr=null;function et(t){var e=this,r=e.ownerDocument,n=t.type,i=t.composedPath?.()||[],s=i[0]||t.target;vr=t;var o=0,l=vr===t&&t.__root;if(l){var a=i.indexOf(l);if(a!==-1&&(e===document||e===window)){t.__root=e;return}var u=i.indexOf(e);if(u===-1)return;a<=u&&(o=a)}if(s=i[o]||t.target,s!==e){Mt(t,"currentTarget",{configurable:!0,get(){return s||r}});var f=v,p=m;I(null),ne(null);try{for(var h,c=[];s!==null;){var d=s.assignedSlot||s.parentNode||s.host||null;try{var w=s["__"+n];if(w!=null&&(!s.disabled||t.target===s))if(Er(w)){var[O,...J]=w;O.apply(s,[t,...J])}else w.call(s,t)}catch(E){h?c.push(E):h=E}if(t.cancelBubble||d===e||d===null)break;s=d}if(h){for(let E of c)queueMicrotask(()=>{throw E});throw h}}finally{t.__root=e,delete t.currentTarget,I(f),ne(p)}}}function Pi(t){var e=document.createElement("template");return e.innerHTML=t.replaceAll("<!>","<!---->"),e.content}function Si(t,e){var r=m;r.nodes_start===null&&(r.nodes_start=t,r.nodes_end=e)}function Jr(t,e){var r=(e&qn)!==0,n,i=!t.startsWith("<!>");return()=>{n===void 0&&(n=Pi(i?t:"<!>"+t),n=Nr(n));var s=r||Or?document.importNode(n,!0):n.cloneNode(!0);return Si(s,s),s}}function Qr(t,e){t!==null&&t.before(e)}function Ht(t,e){return Ai(t,e)}const Ee=new Map;function Ai(t,{target:e,anchor:r,props:n={},events:i,context:s,intro:o=!0}){oi();var l=new Set,a=p=>{for(var h=0;h<p.length;h++){var c=p[h];if(!l.has(c)){l.add(c);var d=Mi(c);e.addEventListener(c,et,{passive:d});var w=Ee.get(c);w===void 0?(document.addEventListener(c,et,{passive:d}),Ee.set(c,1)):Ee.set(c,w+1)}}};a(Pn(xi)),dr.add(a);var u=void 0,f=hi(()=>{var p=r??e.appendChild(ai());return Qn(p,{pending:()=>{}},h=>{if(s){jt({});var c=Y;c.c=s}i&&(n.$$events=i),u=t(h,n)||{},s&&zt()}),()=>{for(var h of l){e.removeEventListener(h,et);var c=Ee.get(h);--c===0?(document.removeEventListener(h,et),Ee.delete(h)):Ee.set(h,c)}dr.delete(a),p!==r&&p.parentNode?.removeChild(p)}});return Di.set(u,f),u}let Di=new WeakMap;function $r(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(r=$r(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function Ci(){for(var t,e,r=0,n="",i=arguments.length;r<i;r++)(t=arguments[r])&&(e=$r(t))&&(n&&(n+=" "),n+=e);return n}function en(t){return typeof t=="object"?Ci(t):t??""}function Ti(t,e,r){var n=t==null?"":""+t;return e&&(n=n?n+" "+e:e),n===""?null:n}function mr(t,e=!1){var r=e?" !important;":";",n="";for(var i in t){var s=t[i];s!=null&&s!==""&&(n+=" "+i+": "+s+r)}return n}function Li(t,e){if(e){var r="",n,i;return Array.isArray(e)?(n=e[0],i=e[1]):n=e,n&&(r+=mr(n)),i&&(r+=mr(i,!0)),r=r.trim(),r===""?null:r}return String(t)}function tn(t,e,r,n,i,s){var o=t.__className;if(o!==r||o===void 0){var l=Ti(r,n);l==null?t.removeAttribute("class"):t.className=l,t.__className=r}return s}function bt(t,e={},r,n){for(var i in r){var s=r[i];e[i]!==s&&(r[i]==null?t.style.removeProperty(i):t.style.setProperty(i,s,n))}}function ze(t,e,r,n){var i=t.__style;if(i!==e){var s=Li(e,n);s==null?t.removeAttribute("style"):t.style.cssText=s,t.__style=e}else n&&(Array.isArray(n)?(bt(t,r?.[0],n[0]),bt(t,r?.[1],n[1],"important")):bt(t,r,n));return n}const Ii=()=>performance.now(),$={tick:t=>requestAnimationFrame(t),now:()=>Ii(),tasks:new Set};function rn(){const t=$.now();$.tasks.forEach(e=>{e.c(t)||($.tasks.delete(e),e.f())}),$.tasks.size!==0&&$.tick(rn)}function Oi(t){let e;return $.tasks.size===0&&$.tick(rn),{promise:new Promise(r=>{$.tasks.add(e={c:t,f:r})}),abort(){$.tasks.delete(e)}}}function yr(t,e){return t===e||t?.[rt]===e}function Be(t={},e,r,n){return pi(()=>{var i,s;return qt(()=>{i=s,s=[],Kr(()=>{t!==r(...s)&&(e(t,...s),i&&yr(r(...i),t)&&e(null,...i))})}),()=>{ut(()=>{s&&yr(r(...s),t)&&e(null,...s)})}}),t}const Fi="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(Fi);function Ri(t){return t}function At(t){return-.5*(Math.cos(Math.PI*t)-1)}function Ni(t){const e=Math.cos(t*Math.PI*.5);return Math.abs(e)<1e-14?1:1-e}function ji(t){return Math.sin(t*Math.PI/2)}const zi=128,Bi=0,Ui=1,Zi=2;class qi{animationsStarted=!1;animationsCount=0;animationsLimit=zi;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 r=this.layers[e];if(r==null)continue;const n=r.animations;if(n!=null)for(let i=0;i<n.length;i++){const s=n[i];if(s!=null){for(const o of s.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,r,n,i){let s=this.layers[e];s==null&&(s=this.layers[e]={animations:new Array});let o=s.animations[r];o==null&&(o=s.animations[r]=new Map);let l={id:n,priority:r,executed:!1,function:i};o.set(n,l),this.animationsStarted==!1&&(this.animationsStarted=!0,this.start())}clear(e,r){for(let n=0;n<this.layers.length;n++){let i=this.layers[n];if(i==null)continue;let s=i.animations[e];if(s==null)return;let o=s.get(r);if(o==null||o.executed==!1)return;s.delete(r)}}speed(){return Math.pow(2,2*this.animationsCount/this.animationsLimit)}stacked(){return this.animationsCount==this.animationsLimit}setLimit(e){this.animationsLimit=e}}const ae=new qi;function gr(t){return Object.prototype.toString.call(t)==="[object Date]"}function Dt(t,e){if(t===e||t!==t)return()=>t;const r=typeof t;if(r!==typeof e||Array.isArray(t)!==Array.isArray(e))throw new Error("Cannot interpolate values of different type");if(Array.isArray(t)){const n=e.map((i,s)=>Dt(t[s],i));return i=>n.map(s=>s(i))}if(r==="object"){if(!t||!e)throw new Error("Object cannot be null");if(gr(t)&&gr(e)){const s=t.getTime(),l=e.getTime()-s;return a=>new Date(s+a*l)}const n=Object.keys(e),i={};return n.forEach(s=>{i[s]=Dt(t[s],e[s])}),s=>{const o={};return n.forEach(l=>{o[l]=i[l](s)}),o}}if(r==="number"){const n=e-t;return i=>t+i*n}return()=>e}class Yt{#e;#t;#a;#n=null;constructor(e,r={}){this.#e=D(e),this.#t=D(e),this.#a=r}static of(e,r){const n=new Yt(e(),r);return qt(()=>{n.set(e())}),n}set(e,r){P(this.#t,e);let{delay:n=0,duration:i=400,easing:s=Ri,interpolate:o=Dt}={...this.#a,...r};if(i===0)return this.#n?.abort(),P(this.#e,e),Promise.resolve();const l=$.now()+n;let a,u=!1,f=this.#n;return this.#n=Oi(p=>{if(p<l)return!0;if(!u){u=!0;const c=this.#e.v;a=o(c,e),typeof i=="function"&&(i=i(c,e)),f?.abort()}const h=p-l;return h>i?(P(this.#e,e),!1):(P(this.#e,a(s(h/i))),!0)}),this.#n.promise}get current(){return g(this.#e)}get target(){return g(this.#t)}set target(e){this.set(e)}}class it{value;motion;constructor(e,r){this.value=e,this.motion=new Yt(e,r)}set(e,r){this.value=e,this.motion.set(e,r)}update(e){this.motion.set(this.value,e)}snap(){this.motion.set(this.value,{duration:0})}}var Hi=Jr("<div></div>");function Yi(t,e){jt(e,!0);let r=e.style.width,n=e.style.height,i=e.style.radius,s=e.colors?.background??"darkgreen",o=e.colors?.border??"white",l=e.colors?.shadow??"0px 2px 2px rgba(0, 0, 0, 0.5)",a;function u(){return a}let f=D(!1);function p(b){P(f,b,!0)}function h(){return g(f)}let c=D(!0),d=0,w=150;function O(b){b!=g(c)&&(P(c,b,!0),d=performance.now())}function J(){return performance.now()-d<w?V.motion.current==0:V.value==0}let E=0,V=new it(0,{easing:At});Q(()=>{g(f)==!1&&(V.snap(),ae.clear(e.priority,e.id))}),Q(()=>{V.set(g(c)?0:E,{duration:75})}),Q(()=>{Je(V.motion.current)});function Je(b){a&&ae.equeue(e.layer,e.priority,e.id,()=>{a.style.scale=b.toString(),a.style.filter=`brightness(${.25+.75*b})`})}function pt(b){b!=E&&(E=b,V.set(b,{duration:75}))}function dt(){return V.value}var vt={getBody:u,setDisplayed:p,getDisplayed:h,setCollapsed:O,getCollapsed:J,setScale:pt,getScale:dt},M=Hi();let Qe;return Be(M,b=>a=b,()=>a),Br(b=>{tn(M,1,en(["pin",g(f)&&"displayed"]),"svelte-zz3jrb"),Qe=ze(M,"",Qe,b)},[()=>({width:`${r}px`,height:`${n}px`,"border-radius":`${i}px`,"border-color":o,"background-color":s,"box-shadow":l})]),Qr(t,M),zt(vt)}var qe;(t=>{function e(r,n,i){const s=r/2,o=n/2,l=Math.sqrt(s*s+o*o),a=Math.atan(o/s)*(180/Math.PI),u=i*(Math.PI/180);return i<180?i<90?i<a?{x:0,y:l*Math.sin(u)-o}:{x:l*Math.cos(u)-s,y:0}:i<180-a?{x:l*Math.cos(u)-s,y:0}:{x:-r,y:l*Math.sin(u)-o}:i<270?i<180+a?{x:-r,y:l*Math.sin(u)-o}:{x:l*Math.cos(u)-s,y:-n}:i<360-a?{x:l*Math.cos(u)-s,y:-n}:{x:0,y:l*Math.sin(u)-o}}t.getOffsets=e})(qe||(qe={}));var Vi=Jr('<div><div class="pointer svelte-11extwn"></div> <div class="bubble svelte-11extwn"><div class="body svelte-11extwn"></div></div></div>');function nn(t,e){jt(e,!0);let r=e.style.width,n=e.style.height,i=e.style.margin,s=e.style.radius,o=e.colors?.background??"white",l=e.colors?.shadow??"0px 2px 2px rgba(0, 0, 0, 0.5)",a,u,f,p;const h=r+2*i,c=n+2*i,d=()=>p;Q(()=>{f.style.width=`${i*4}px`,f.style.height=`${i*4}px`});let w=D(!0);function O(y){P(w,y,!0)}function J(){return g(w)}let E=D(!0),V=0,Je=300;function pt(y){y!=g(E)&&(P(E,y,!0),V=performance.now())}function dt(){return performance.now()-V<Je?M.motion.current==0:M.value==0}function vt(){return performance.now()-V<Je?M.motion.current==1:M.value==1}let M=new it(0);Q(()=>{g(w)==!1&&(M.snap(),ae.clear(e.priority,e.id+"_scale"))}),Q(()=>{g(E)==!0&&M.value!=0&&(ae.stacked()?M.set(0,{duration:0}):M.set(0,{duration:150,easing:Ni})),g(E)==!1&&M.value!=1&&M.set(1,{duration:150,easing:ji})}),Q(()=>{Qe(M.motion.current)});function Qe(y){!a||!u||!f||ae.equeue(g(E)?0:e.layer,e.priority,e.id+"_scale",()=>{a.style.opacity=`${y}`,u.style.scale=`${y}`,f.style.scale=`${y}`})}let b=NaN,mt=D(!1),oe=new it(-h/2,{easing:At}),$e=new it(-c/2,{easing:At});Q(()=>{g(w)==!1&&(oe.snap(),oe.snap(),ae.clear(e.priority,e.id+"_angle"))}),Q(()=>{g(E)==!0&&g(mt)&&(oe.update({duration:75}),oe.update({duration:75}))}),Q(()=>{Qt(oe.motion.current,$e.motion.current)});function Qt(y,_e){if(!a||!u||!f)return;const X=y+h/2,we=_e+c/2,be=c<h?X*c/h:X,ke=c>h?we*h/c:we,wn=Math.atan2(ke,be)/Math.PI*180-45,ir=0,bn=30,_t=Math.sqrt(be*be+ke*ke),Ne=Math.min(h,c)/2,kn=Ne*Math.SQRT2,En=(_t-Ne)/(kn-Ne),sr=ir+En*(bn-ir),Mn=_t<Ne?_t/Ne:1;ae.equeue(e.layer,e.priority,e.id+"_angle",()=>{u.style.transform=`translate(${Math.round(y)}px, ${Math.round(_e)}px)`,f.style.transform=`scale(${Mn}) rotate(${wn}deg) skew(${sr}deg, ${sr}deg)`})}function yn(y,_e){if(g(mt)==!1||_e==!0){let X=qe.getOffsets(h,c,y);oe.set(Math.round(X.x),{duration:0}),$e.set(Math.round(X.y),{duration:0}),Qt(oe.value,$e.value),b=y,P(mt,!0)}else if(y!=b){let X=Math.abs(y-b),we=X<180?X:360-X,be=Math.log(we)*75,ke=qe.getOffsets(h,c,y);oe.set(Math.round(ke.x),{duration:be}),$e.set(Math.round(ke.y),{duration:be}),b=y}}function gn(){return qe.getOffsets(h,c,b)}var _n={getBody:d,setDisplayed:O,getDisplayed:J,setCollapsed:pt,getCollapsed:dt,getExpanded:vt,setAngle:yn,getOffsets:gn},Re=Vi();let $t;var yt=fr(Re);let er;Be(yt,y=>f=y,()=>f);var gt=li(yt,2);let tr;var rr=fr(gt);let nr;return Be(rr,y=>p=y,()=>p),Be(gt,y=>u=y,()=>u),Be(Re,y=>a=y,()=>a),Br((y,_e,X,we)=>{tn(Re,1,en(["anchor",g(w)&&"displayed"]),"svelte-11extwn"),$t=ze(Re,"",$t,y),er=ze(yt,"",er,_e),tr=ze(gt,"",tr,X),nr=ze(rr,"",nr,we)},[()=>({filter:`drop-shadow(${l})`}),()=>({"background-color":o}),()=>({margin:`${i}px;`}),()=>({width:`${r}px`,height:`${n}px`,"border-radius":`${s}px;`,"background-color":o})]),Qr(t,Re),zt(_n)}var He;(t=>{async function e(n,i){const s=await fetch(n,i);if(!s.ok)throw new Error(s.statusText);return s.json()}t.get=e;async function r(n,i,s){const o=await fetch(n,{method:"POST",body:JSON.stringify(i),headers:{"Content-Type":"application/json",...s?.headers},...s});if(!o.ok)throw new Error(o.statusText);return o.json()}t.post=r})(He||(He={}));var xe;(t=>{function e(l,a,u){return{x:n(a)*u,y:i(l)*u}}t.project=e;function r(l,a,u){return{lat:o(a/u),lng:s(l/u)}}t.unproject=r;function n(l){return(180+l)/360}function i(l){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+l*Math.PI/360)))/360}function s(l){return l*360-180}function o(l){return 360/Math.PI*Math.atan(Math.exp((180-l*360)*Math.PI/180))-90}})(xe||(xe={}));class sn{swLat;swLng;neLat;neLng;constructor(e,r,n,i,s){const o=n*Math.pow(2,r),l=xe.project(e.sw.lat,e.sw.lng,o),a=xe.project(e.ne.lat,e.ne.lng,o),u=l.x-i,f=l.y+s,p=a.x+i,h=a.y-s,c=xe.unproject(u,f,o),d=xe.unproject(p,h,o);this.swLat=c.lat,this.swLng=c.lng,this.neLat=d.lat,this.neLng=d.lng}contains(e,r){return this.swLat<=e&&e<=this.neLat?this.swLng<this.neLng?this.swLng<=r&&r<=this.neLng:r<=this.neLng||this.swLng<=r:!1}}var kt;function on(t){return{lang:t?.lang??kt?.lang,message:t?.message,abortEarly:t?.abortEarly??kt?.abortEarly,abortPipeEarly:t?.abortPipeEarly??kt?.abortPipeEarly}}var Xi;function Wi(t){return Xi?.get(t)}var Gi;function Ki(t){return Gi?.get(t)}var Ji;function Qi(t,e){return Ji?.get(t)?.get(e)}function Ke(t){const e=typeof t;return e==="string"?`"${t}"`:e==="number"||e==="bigint"||e==="boolean"?`${t}`:e==="object"||e==="function"?(t&&Object.getPrototypeOf(t)?.constructor?.name)??"null":e}function S(t,e,r,n,i){const s=i&&"input"in i?i.input:r.value,o=i?.expected??t.expects??null,l=i?.received??Ke(s),a={kind:t.kind,type:t.type,input:s,expected:o,received:l,message:`Invalid ${e}: ${o?`Expected ${o} but r`:"R"}eceived ${l}`,requirement:t.requirement,path:i?.path,issues:i?.issues,lang:n.lang,abortEarly:n.abortEarly,abortPipeEarly:n.abortPipeEarly},u=t.kind==="schema",f=i?.message??t.message??Qi(t.reference,a.lang)??(u?Ki(a.lang):null)??n.message??Wi(a.lang);f!==void 0&&(a.message=typeof f=="function"?f(a):f),u&&(r.typed=!1),r.issues?r.issues.push(a):r.issues=[a]}function N(t){return{version:1,vendor:"valibot",validate(e){return t["~run"]({value:e},on())}}}var ht=class extends Error{constructor(t){super(t[0].message),this.name="ValiError",this.issues=t}};function z(t){return{kind:"transformation",type:"args",reference:z,async:!1,schema:t,"~run"(e,r){const n=e.value;return e.value=(...i)=>{const s=this.schema["~run"]({value:i},r);if(s.issues)throw new ht(s.issues);return n(...s.value)},e}}}function an(){return{kind:"transformation",type:"await",reference:an,async:!0,async"~run"(t){return t.value=await t.value,t}}}function ln(t,e){return{kind:"validation",type:"check",reference:ln,async:!1,expects:null,requirement:t,message:e,"~run"(r,n){return r.typed&&!this.requirement(r.value)&&S(this,"input",r,n),r}}}function un(t,e){return{kind:"validation",type:"length",reference:un,async:!1,expects:`${t}`,requirement:t,message:e,"~run"(r,n){return r.typed&&r.value.length!==this.requirement&&S(this,"length",r,n,{received:`${r.value.length}`}),r}}}function Te(t,e){return{kind:"validation",type:"max_value",reference:Te,async:!1,expects:`<=${t instanceof Date?t.toJSON():Ke(t)}`,requirement:t,message:e,"~run"(r,n){return r.typed&&!(r.value<=this.requirement)&&S(this,"value",r,n,{received:r.value instanceof Date?r.value.toJSON():Ke(r.value)}),r}}}function Vt(t,e){return{kind:"validation",type:"min_length",reference:Vt,async:!1,expects:`>=${t}`,requirement:t,message:e,"~run"(r,n){return r.typed&&r.value.length<this.requirement&&S(this,"length",r,n,{received:`${r.value.length}`}),r}}}function ee(t,e){return{kind:"validation",type:"min_value",reference:ee,async:!1,expects:`>=${t instanceof Date?t.toJSON():Ke(t)}`,requirement:t,message:e,"~run"(r,n){return r.typed&&!(r.value>=this.requirement)&&S(this,"value",r,n,{received:r.value instanceof Date?r.value.toJSON():Ke(r.value)}),r}}}function W(t){return{kind:"transformation",type:"returns",reference:W,async:!1,schema:t,"~run"(e,r){const n=e.value;return e.value=(...i)=>{const s=this.schema["~run"]({value:n(...i)},r);if(s.issues)throw new ht(s.issues);return s.value},e}}}function fn(t){return{kind:"transformation",type:"returns",reference:fn,async:!1,schema:t,"~run"(e,r){const n=e.value;return e.value=async(...i)=>{const s=await this.schema["~run"]({value:await n(...i)},r);if(s.issues)throw new ht(s.issues);return s.value},e}}}function $i(t,e,r){return typeof t.fallback=="function"?t.fallback(e,r):t.fallback}function cn(t,e,r){return typeof t.default=="function"?t.default(e,r):t.default}function hn(t,e){return{kind:"schema",type:"array",reference:hn,expects:"Array",async:!1,item:t,message:e,get"~standard"(){return N(this)},"~run"(r,n){const i=r.value;if(Array.isArray(i)){r.typed=!0,r.value=[];for(let s=0;s<i.length;s++){const o=i[s],l=this.item["~run"]({value:o},n);if(l.issues){const a={type:"array",origin:"value",input:i,key:s,value:o};for(const u of l.issues)u.path?u.path.unshift(a):u.path=[a],r.issues?.push(u);if(r.issues||(r.issues=l.issues),n.abortEarly){r.typed=!1;break}}l.typed||(r.typed=!1),r.value.push(l.value)}}else S(this,"type",r,n);return r}}}function pn(t){return{kind:"schema",type:"boolean",reference:pn,expects:"boolean",async:!1,message:t,get"~standard"(){return N(this)},"~run"(e,r){return typeof e.value=="boolean"?e.typed=!0:S(this,"type",e,r),e}}}function dn(t,e){return{kind:"schema",type:"custom",reference:dn,expects:"unknown",async:!1,check:t,message:e,get"~standard"(){return N(this)},"~run"(r,n){return this.check(r.value)?r.typed=!0:S(this,"type",r,n),r}}}function B(t){return{kind:"schema",type:"function",reference:B,expects:"Function",async:!1,message:t,get"~standard"(){return N(this)},"~run"(e,r){return typeof e.value=="function"?e.typed=!0:S(this,"type",e,r),e}}}function k(t){return{kind:"schema",type:"number",reference:k,expects:"number",async:!1,message:t,get"~standard"(){return N(this)},"~run"(e,r){return typeof e.value=="number"&&!isNaN(e.value)?e.typed=!0:S(this,"type",e,r),e}}}function T(t,e){return{kind:"schema",type:"object",reference:T,expects:"Object",async:!1,entries:t,message:e,get"~standard"(){return N(this)},"~run"(r,n){const i=r.value;if(i&&typeof i=="object"){r.typed=!0,r.value={};for(const s in this.entries){const o=this.entries[s];if(s in i||(o.type==="exact_optional"||o.type==="optional"||o.type==="nullish")&&o.default!==void 0){const l=s in i?i[s]:cn(o),a=o["~run"]({value:l},n);if(a.issues){const u={type:"object",origin:"value",input:i,key:s,value:l};for(const f of a.issues)f.path?f.path.unshift(u):f.path=[u],r.issues?.push(f);if(r.issues||(r.issues=a.issues),n.abortEarly){r.typed=!1;break}}a.typed||(r.typed=!1),r.value[s]=a.value}else if(o.fallback!==void 0)r.value[s]=$i(o);else if(o.type!=="exact_optional"&&o.type!=="optional"&&o.type!=="nullish"&&(S(this,"key",r,n,{input:void 0,expected:`"${s}"`,path:[{type:"object",origin:"key",input:i,key:s,value:i[s]}]}),n.abortEarly))break}}else S(this,"type",r,n);return r}}}function U(t,e){return{kind:"schema",type:"optional",reference:U,expects:`(${t.expects} | undefined)`,async:!1,wrapped:t,default:e,get"~standard"(){return N(this)},"~run"(r,n){return r.value===void 0&&(this.default!==void 0&&(r.value=cn(this,r,n)),r.value===void 0)?(r.typed=!0,r):this.wrapped["~run"](r,n)}}}function vn(t){return{kind:"schema",type:"promise",reference:vn,expects:"Promise",async:!1,message:t,get"~standard"(){return N(this)},"~run"(e,r){return e.value instanceof Promise?e.typed=!0:S(this,"type",e,r),e}}}function re(t){return{kind:"schema",type:"string",reference:re,expects:"string",async:!1,message:t,get"~standard"(){return N(this)},"~run"(e,r){return typeof e.value=="string"?e.typed=!0:S(this,"type",e,r),e}}}function Z(t,e){return{kind:"schema",type:"tuple",reference:Z,expects:"Array",async:!1,items:t,message:e,get"~standard"(){return N(this)},"~run"(r,n){const i=r.value;if(Array.isArray(i)){r.typed=!0,r.value=[];for(let s=0;s<this.items.length;s++){const o=i[s],l=this.items[s]["~run"]({value:o},n);if(l.issues){const a={type:"array",origin:"value",input:i,key:s,value:o};for(const u of l.issues)u.path?u.path.unshift(a):u.path=[a],r.issues?.push(u);if(r.issues||(r.issues=l.issues),n.abortEarly){r.typed=!1;break}}l.typed||(r.typed=!1),r.value.push(l.value)}}else S(this,"type",r,n);return r}}}function Ye(t){return{kind:"schema",type:"void",reference:Ye,expects:"void",async:!1,message:t,get"~standard"(){return N(this)},"~run"(e,r){return e.value===void 0?e.typed=!0:S(this,"type",e,r),e}}}function tt(t,e,r){const n=t["~run"]({value:e},on(r));if(n.issues)throw new ht(n.issues);return n.value}function _(...t){return{...t[0],pipe:t,get"~standard"(){return N(this)},"~run"(e,r){for(const n of t)if(n.kind!=="metadata"){if(e.issues&&(n.kind==="schema"||n.kind==="transformation")){e.typed=!1;break}(!e.issues||!r.abortEarly&&!r.abortPipeEarly)&&(e=n["~run"](e,r))}return e}}}function es(...t){return{...t[0],pipe:t,async:!0,get"~standard"(){return N(this)},async"~run"(e,r){for(const n of t)if(n.kind!=="metadata"){if(e.issues&&(n.kind==="schema"||n.kind==="transformation")){e.typed=!1;break}(!e.issues||!r.abortEarly&&!r.abortPipeEarly)&&(e=await n["~run"](e,r))}return e}}}const Ct=_(k(),ee(-90),Te(90)),Tt=_(k(),ee(-180),Te(180)),ts=T({sw:T({lat:Ct,lng:Tt}),ne:T({lat:Ct,lng:Tt})}),Lt=dn(t=>t instanceof HTMLElement,"Must be an HTMLElement"),rs=T({mapSize:_(k(),ee(1)),zoomMin:_(k(),ee(0)),zoomMax:_(k(),ee(0)),zoomScale:_(k(),ee(1),Te(10))}),ns=T({inserted:_(B(),z(Z([])),W(pn())),insert:_(B(),z(Z([])),W(Ye())),remove:_(B(),z(Z([])),W(Ye())),update:_(B(),z(Z([k()])),W(Ye()))}),is=T({getParameters:_(B(),z(Z([])),W(rs)),getContainer:_(B(),z(Z([])),W(Lt)),getZoom:_(B(),z(Z([])),W(k())),getBounds:_(B(),z(Z([])),W(ts)),panBy:_(B(),z(Z([k(),k()])),W(Ye())),createMarker:_(B(),z(Z([Lt,Ct,Tt,k()])),W(ns))}),Et=_(B(),z(Z([re()])),fn(es(vn(),an(),Lt))),ss=T({background:U(re()),border:U(re()),shadow:U(re())}),os=T({width:k(),height:k(),radius:k()}),_r=T({background:U(re()),shadow:U(re())}),wr=_(T({width:k(),height:k(),margin:k(),radius:k()}),ln(t=>Math.min(t.width,t.height)/t.margin>=6,"Tooltip: minimum of width or height must be greater than or equal to 6 * margin")),as=T({id:_(re(),Vt(1)),rank:_(k(),ee(0)),lat:_(k(),ee(-90),Te(90)),lng:_(k(),ee(-180),Te(180)),tooltip:T({body:Et,style:wr,colors:U(_r)}),pin:U(T({body:Et,style:U(os),colors:U(ss)})),popup:U(T({body:Et,style:wr,colors:U(_r)}))}),ls=hn(as);var ye;(t=>{t.COUNT=12,t.DEGREES=[0,30,60,90,120,150,180,210,240,270,300,330],t.DEGREES_DEFAULT=270})(ye||(ye={}));const us=_(re(),un(32)),fs=_(re(),Vt(1)),br="1.2.0",Xt="https://maps.api.arenarium.dev",cs=`${Xt}/auth`,hs=`${Xt}/states`,ps=`${Xt}/log`;class Wt{apiKey;apiToken;apiDevEnvironment;mapProvider;markerDataArray=new Array;markerDataMap=new Map;markerDataUpdating=!1;markerPinProcessor;markerTooltipProcessor;markerPopupProcessor;constructor(e,r,n,i){tt(us,e),tt(fs,r),tt(is,n),this.apiKey=e,this.apiToken=r,this.apiDevEnvironment=window?.location.host.startsWith("localhost")||window?.location.host.startsWith("127.0.0.1"),this.mapProvider=n,this.markerPinProcessor=new lt(n),this.markerTooltipProcessor=new vs(n),this.markerPopupProcessor=new ms(n),this.setConfiguration(i)}static async create(e,r,n){const i={key:e,version:br};let o=(await He.post(cs,i)).token;if(!o)throw new Error("Failed to get api token");return new Wt(e,o,r,n)}setConfiguration(e){ae.setLimit(e?.animation?.queue?.limit??8*navigator.hardwareConcurrency),this.markerPinProcessor.setConfiguration(e)}async updateMarkers(e){tt(ls,e);try{await this.updateMarkerData(e),this.processMarkerDataCallback()}catch(r){throw console.error(r),this.removeMarkerData(),r instanceof Error&&this.log("error","Failed to update markers",r),r}}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 r of this.markerDataArray)r.marker.id==e?this.markerPopupProcessor.show(r):this.markerPopupProcessor.hide(r)}catch(r){console.error(r);for(const n of this.markerDataArray)this.markerPopupProcessor.hide(n);throw r instanceof Error&&this.log("error","Failed to show popup",r),r}}hidePopup(e){try{if(e){const r=this.markerDataMap.get(e);if(r==null)return;this.markerPopupProcessor.hide(r)}else for(const r of this.markerDataArray)this.markerPopupProcessor.hide(r)}catch(r){console.error(r);for(const n of this.markerDataArray)this.markerPopupProcessor.hide(n);throw r instanceof Error&&this.log("error","Failed to hide popup",r),r}}async updateMarkerData(e){try{let r=this.markerDataArray.map(i=>i.marker);for(let i=0;i<e.length;i++){const s=e[i];this.markerDataMap.get(s.id)||r.push(s)}const n=await this.getMarkerStates(r);try{this.markerDataUpdating=!0;for(let i=0;i<r.length;i++){const s=r[i],o=n[i],l=this.markerDataMap.get(s.id);if(l)l.update(o);else{const a=new ds(this.mapProvider,s,o);a.create(),this.markerDataMap.set(s.id,a),this.markerDataArray.push(a)}}this.markerDataArray.sort((i,s)=>i.zoom-s.zoom),this.markerPinProcessor.updateElements(this.markerDataArray.map(i=>i.pin)),this.markerTooltipProcessor.updateElements(this.markerDataArray.map(i=>i.tooltip)),this.markerPopupProcessor.updateElements(this.markerDataArray.map(i=>i.popup).filter(i=>i!=null))}finally{this.markerDataUpdating=!1}}catch(r){throw console.error(r),this.markerDataArray.forEach(n=>n.remove()),this.markerDataArray.length=0,this.markerDataMap.clear(),r instanceof Error&&this.log("error","Failed to update marker data",r),r}finally{this.markerDataUpdating=!1}}removeMarkerData(){try{this.markerDataUpdating=!0,this.markerPinProcessor.removeElements(),this.markerTooltipProcessor.removeElements(),this.markerPopupProcessor.removeElements(),this.markerDataArray.length=0,this.markerDataMap.clear()}catch(e){throw console.error(e),e instanceof Error&&this.log("error","Failed to remove marker data",e),e}finally{this.markerDataUpdating=!1}}async getMarkerStates(e){if(e.length==0)return[];if(e.length==1)return[[0,[[0,ye.DEGREES.indexOf(ye.DEGREES_DEFAULT)]]]];const r=e.map(s=>({id:s.id,rank:s.rank,lat:s.lat,lng:s.lng,width:s.tooltip.style.width,height:s.tooltip.style.height,margin:s.tooltip.style.margin})),n={key:this.apiKey,token:this.apiToken,parameters:this.mapProvider.getParameters(),input:r},i=await He.post(hs,n,{headers:{"Cache-Control":this.apiDevEnvironment?"no-cache":""}});return i.token&&(this.apiToken=i.token),i.states}processMarkerDataCallback(){if(this.mapProvider.getContainer().parentElement!=null&&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(),r=this.mapProvider.getZoom();this.markerPopupProcessor.process(),this.markerTooltipProcessor.process(e,r),this.markerPinProcessor.process(e,r)}async log(e,r,n){if(!this.apiDevEnvironment)try{const i={key:this.apiKey,title:r,level:e,content:{version:br,...n}};await He.post(ps,i)}catch(i){console.error(i)}}}class ds{marker;zoom;pin;tooltip;popup;constructor(e,r,n){this.marker=r,this.zoom=n[0],this.pin=new Ve(e,r,n),this.tooltip=new Kt(e,r,n),r.popup&&(this.popup=new Jt(e,r))}create(){this.pin.create(),this.tooltip.create(),this.popup?.create()}update(e){this.pin.update(e),this.tooltip.update(e)}remove(){this.pin.remove(),this.tooltip.remove(),this.popup?.remove()}}class Gt{provider;id;lat;lng;shown;element;component;marker;constructor(e,r){this.provider=e,this.id=r.id,this.lat=r.lat,this.lng=r.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 r=this.marker,n=this.component;if(r==null||n==null)throw new Error("Failed to update provider marker map");e?r.inserted()==!1&&r.insert():r.inserted()==!0&&r.remove()}getZindex(){throw new Error("Get z-index not implemented")}remove(){this.marker?.remove()}}class Ve extends Gt{static DEFAULT_SIZE=16;style;colors;zoom;bodyLoading=!1;bodyLoaded=!1;bodyCallback;constructor(e,r,n){super(e,r),this.style=r.pin?.style??{width:Ve.DEFAULT_SIZE,height:Ve.DEFAULT_SIZE,radius:Ve.DEFAULT_SIZE},this.colors=r.pin?.colors,this.zoom=n[0],this.bodyCallback=r.pin?.body}createElement(){this.element=document.createElement("div"),this.element.classList.add("pin"),this.component=Ht(Yi,{target:this.element,props:{id:this.id+"_pin",layer:Zi,priority:this.zoom*this.provider.getParameters().zoomScale,style:this.style,colors:this.colors}})}update(e){this.zoom=e[0],this.updateZIndex()}updateMap(e){super.updateMap(e),this.component?.setDisplayed(e)}updateBody(){if(this.bodyCallback==null||this.bodyLoaded||this.bodyLoading)return;const e=this.component?.getBody();e!=null&&(this.bodyLoading=!0,this.bodyCallback(this.id).then(r=>{r instanceof HTMLElement?e.appendChild(r):console.error("Failed to load pin body")}).catch(r=>console.error(r)).finally(()=>{this.bodyLoaded=!0,this.bodyLoading=!1}))}setCollapsed(e){if(this.component==null)throw new Error("Failed to set pin collapsed");this.component.setCollapsed(e)}setScale(e){if(this.component==null)throw new Error("Failed to set pin scale");this.component.setScale(e)}getScaleFromZoomDistance(e){return this.zoom<e?1:Math.max(0,1-(this.zoom-e)*.125)}getZindex(){const e=this.provider.getParameters();return Math.round((e.zoomMax-this.zoom)*e.zoomScale)}isCollapsed(){return this.component==null?!1:this.component.getCollapsed()}isBodyLoaded(){return this.bodyCallback==null||this.bodyLoaded}}class lt{static MAP_PINS_MAX_ZOOM=2;static MAP_PINS_MAX_COUNT=128;provider;pinElements=new Array;pinMaxWidth=0;pinMaxHeight=0;pinFade=!1;pinMaxCount=0;pinMaxZoomDelta=0;constructor(e){this.provider=e}setConfiguration(e){this.pinFade=e?.pin?.fade??!0,this.pinMaxCount=e?.pin?.maxCount??Math.max(lt.MAP_PINS_MAX_COUNT,8*navigator.hardwareConcurrency),this.pinMaxZoomDelta=e?.pin?.maxZoom??lt.MAP_PINS_MAX_ZOOM}updateElements(e){this.pinElements=e,this.pinMaxWidth=e.reduce((r,n)=>Math.max(r,n.style.width),0),this.pinMaxHeight=e.reduce((r,n)=>Math.max(r,n.style.height),0)}removeElements(){this.pinElements.forEach(e=>e.remove()),this.pinElements.length=0}process(e,r){const n=this.provider.getParameters().mapSize,i=new sn(e,r,n,this.pinMaxWidth*2,this.pinMaxHeight*2);let s=0;for(const o of this.pinElements)i.contains(o.lat,o.lng)?o.shown&&r<o.zoom&&o.zoom<r+this.pinMaxZoomDelta?(s<this.pinMaxCount&&(o.setCollapsed(!1),o.setScale(this.pinFade?o.getScaleFromZoomDistance(r):1),o.updateMap(!0),o.isBodyLoaded()==!1&&o.updateBody()),s++):(o.setCollapsed(!0),o.isCollapsed()&&o.updateMap(!1)):o.updateMap(!1)}}class Kt extends Gt{static Z_INDEX_OFFSET=1e6;style;colors;zoom;angle;states;bodyLoading=!1;bodyLoaded=!1;bodyCallback;constructor(e,r,n){super(e,r),this.style=r.tooltip.style,this.colors=r.tooltip.colors,this.zoom=n[0],this.angle=ye.DEGREES_DEFAULT,this.states=n[1].map(i=>[i[0],ye.DEGREES[i[1]]]),this.bodyCallback=r.tooltip.body}createElement(){this.element=document.createElement("div"),this.element.classList.add("tooltip"),this.component=Ht(nn,{target:this.element,props:{id:this.id+"_tooltip",layer:Ui,priority:this.zoom*this.provider.getParameters().zoomScale,style:this.style,colors:this.colors}})}update(e){this.zoom=e[0],this.states=e[1].map(r=>[r[0],ye.DEGREES[r[1]]]),this.updateZIndex()}updateMap(e){super.updateMap(e),this.component?.setDisplayed(e)}updateState(e){if(this.component==null)throw new Error("Failed to update tooltip state");this.angle=this.getAngle(e),this.component.setAngle(this.angle)}updateBody(){if(this.bodyLoaded||this.bodyLoading)return;const e=this.component?.getBody();e!=null&&(this.bodyLoading=!0,this.bodyCallback(this.id).then(r=>{r instanceof HTMLElement?e.appendChild(r):console.error("Failed to load tooltip body")}).catch(r=>console.error(r)).finally(()=>{this.bodyLoaded=!0,this.bodyLoading=!1}))}getAngle(e){const r=this.states.findLast(n=>n[0]<=e);if(!r)throw new Error("Angle not found");return r[1]}getZindex(){const e=this.provider.getParameters();return Math.round((e.zoomMax-this.zoom)*e.zoomScale)+Kt.Z_INDEX_OFFSET}setCollapsed(e){if(this.component==null)throw new Error("Failed to set tooltip collapsed");this.component.setCollapsed(e)}isExpanded(){return this.component==null?!1:this.component.getExpanded()}isCollapsed(){return this.component==null?!1:this.component.getCollapsed()}isBodyLoaded(){return this.bodyLoaded}}class vs{provider;tooltipElements=new Array;tooltipMaxWidth=0;tooltipMaxHeight=0;constructor(e){this.provider=e}updateElements(e){this.tooltipElements=e,this.tooltipMaxWidth=this.tooltipElements.reduce((r,n)=>Math.max(r,n.style.width),0),this.tooltipMaxHeight=this.tooltipElements.reduce((r,n)=>Math.max(r,n.style.height),0)}removeElements(){this.tooltipElements.forEach(e=>e.remove()),this.tooltipElements.length=0}process(e,r){const n=this.provider.getParameters().mapSize,i=new sn(e,r,n,this.tooltipMaxWidth*2,this.tooltipMaxHeight*2);for(const s of this.tooltipElements)i.contains(s.lat,s.lng)?s.shown&&s.zoom<=r?(s.updateState(r),s.setCollapsed(!1),s.updateMap(!0),s.isCollapsed()==!1&&s.isBodyLoaded()==!1&&s.updateBody()):(s.setCollapsed(!0),s.isCollapsed()&&s.updateMap(!1)):s.updateMap(!1)}}class Jt extends Gt{static Z_INDEX_OFFSET=2e6;style;colors;bodyLoading=!1;bodyLoaded=!1;bodyCallback;constructor(e,r){if(r.popup==null)throw new Error("Failed to create popup");super(e,r),this.shown=!1,this.style=r.popup.style,this.colors=r.popup.colors,this.bodyCallback=r.popup.body}createElement(){this.element=document.createElement("div"),this.element.classList.add("popup"),this.component=Ht(nn,{target:this.element,props:{id:this.id+"_popup",layer:Bi,priority:0,style:this.style,colors:this.colors}})}updateMap(e){super.updateMap(e),this.component?.setDisplayed(e)}updateBody(){if(this.bodyLoaded||this.bodyLoading)return;const e=this.component?.getBody();e!=null&&(this.bodyLoading=!0,this.bodyCallback(this.id).then(r=>{r instanceof HTMLElement?e.appendChild(r):console.error("Failed to load popup body")}).catch(r=>console.error(r)).finally(()=>{this.bodyLoaded=!0,this.bodyLoading=!1}))}getZindex(){return Jt.Z_INDEX_OFFSET}setCollapsed(e){if(this.component==null)throw new Error("Failed to set popup collapsed");this.component.setCollapsed(e)}setAngle(e){if(this.component==null)throw new Error("Failed to set popup angle");this.component.setAngle(e,!0)}isExpanded(){return this.component==null?!1:this.component.getExpanded()}isCollapsed(){return this.component==null?!1:this.component.getCollapsed()}isBodyLoaded(){return this.bodyLoaded}}class ms{provider;popupElements=new Array;popupPositioned=new Map;constructor(e){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(r=>[r.id,!1]))}removeElements(){this.popupElements.forEach(e=>e.remove()),this.popupElements.length=0,this.popupPositioned.clear()}process(){for(const e of this.popupElements)if(e.shown){if(e.setCollapsed(!1),e.updateMap(!0),e.isExpanded()&&e.isBodyLoaded()==!1&&e.updateBody(),e.isCollapsed()==!1&&this.popupPositioned.get(e.id)==!1){const r=e.component?.getBody();if(r==null)continue;const n=e.component?.getOffsets();if(n==null)continue;const i=r.getBoundingClientRect();if(i.x==0&&i.y==0&&i.width==0&&i.height==0)continue;const s=i.x+i.width/2,o=i.y+i.height/2,l=s+n.x,a=o+n.y,u=l+e.style.width,f=a+e.style.height,p=this.provider.getContainer().getBoundingClientRect(),h=l-p.left,c=p.right-u,d=a-p.top,w=p.bottom-f,O=Math.min(e.style.width,e.style.height)/4,J=h<0?h-O:c<0?-c+O:0,E=d<0?d-O:w<0?-w+O:0;this.provider.panBy(J,E),this.popupPositioned.set(e.id,!0)}}else e.setCollapsed(!0),e.isCollapsed()&&e.updateMap(!1)}}const mn=()=>'<img src="https://arenarium.dev/favicon.svg" alt="Arenarium Maps" style="height: 1.25em; vertical-align: middle;" />',ys=()=>`<a href="https://arenarium.dev" target="_blank" style="color: inherit;">${mn()}<span> @arenarium/maps</span></a>`;exports.MapManager=Wt;exports.getAttributionHtml=ys;exports.getImageHtml=mn;
|
package/dist/main.d.ts
CHANGED
|
@@ -66,6 +66,7 @@ declare const mapMarkerSchema: v.ObjectSchema<{
|
|
|
66
66
|
readonly lat: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, -90, undefined>, v.MaxValueAction<number, 90, undefined>]>;
|
|
67
67
|
readonly lng: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, -180, undefined>, v.MaxValueAction<number, 180, undefined>]>;
|
|
68
68
|
readonly tooltip: v.ObjectSchema<{
|
|
69
|
+
readonly body: v.SchemaWithPipe<readonly [v.FunctionSchema<undefined>, v.ArgsAction<(...args: unknown[]) => unknown, v.TupleSchema<[v.StringSchema<undefined>], undefined>>, v.ReturnsActionAsync<(args_0: string) => unknown, v.SchemaWithPipeAsync<readonly [v.PromiseSchema<undefined>, v.AwaitActionAsync<Promise<unknown>>, v.CustomSchema<HTMLElement, v.ErrorMessage<v.CustomIssue> | undefined>]>>]>;
|
|
69
70
|
readonly style: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
70
71
|
readonly width: v.NumberSchema<undefined>;
|
|
71
72
|
readonly height: v.NumberSchema<undefined>;
|
|
@@ -77,24 +78,41 @@ declare const mapMarkerSchema: v.ObjectSchema<{
|
|
|
77
78
|
margin: number;
|
|
78
79
|
radius: number;
|
|
79
80
|
}, "Tooltip: minimum of width or height must be greater than or equal to 6 * margin">]>;
|
|
80
|
-
readonly
|
|
81
|
+
readonly colors: v.OptionalSchema<v.ObjectSchema<{
|
|
82
|
+
readonly background: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
83
|
+
readonly shadow: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
84
|
+
}, undefined>, undefined>;
|
|
81
85
|
}, undefined>;
|
|
82
86
|
readonly pin: v.OptionalSchema<v.ObjectSchema<{
|
|
83
|
-
readonly
|
|
87
|
+
readonly body: v.SchemaWithPipe<readonly [v.FunctionSchema<undefined>, v.ArgsAction<(...args: unknown[]) => unknown, v.TupleSchema<[v.StringSchema<undefined>], undefined>>, v.ReturnsActionAsync<(args_0: string) => unknown, v.SchemaWithPipeAsync<readonly [v.PromiseSchema<undefined>, v.AwaitActionAsync<Promise<unknown>>, v.CustomSchema<HTMLElement, v.ErrorMessage<v.CustomIssue> | undefined>]>>]>;
|
|
88
|
+
readonly style: v.OptionalSchema<v.ObjectSchema<{
|
|
84
89
|
readonly width: v.NumberSchema<undefined>;
|
|
85
90
|
readonly height: v.NumberSchema<undefined>;
|
|
86
91
|
readonly radius: v.NumberSchema<undefined>;
|
|
87
|
-
}, undefined>;
|
|
88
|
-
readonly
|
|
92
|
+
}, undefined>, undefined>;
|
|
93
|
+
readonly colors: v.OptionalSchema<v.ObjectSchema<{
|
|
94
|
+
readonly background: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
95
|
+
readonly border: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
96
|
+
readonly shadow: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
97
|
+
}, undefined>, undefined>;
|
|
89
98
|
}, undefined>, undefined>;
|
|
90
99
|
readonly popup: v.OptionalSchema<v.ObjectSchema<{
|
|
91
|
-
readonly
|
|
100
|
+
readonly body: v.SchemaWithPipe<readonly [v.FunctionSchema<undefined>, v.ArgsAction<(...args: unknown[]) => unknown, v.TupleSchema<[v.StringSchema<undefined>], undefined>>, v.ReturnsActionAsync<(args_0: string) => unknown, v.SchemaWithPipeAsync<readonly [v.PromiseSchema<undefined>, v.AwaitActionAsync<Promise<unknown>>, v.CustomSchema<HTMLElement, v.ErrorMessage<v.CustomIssue> | undefined>]>>]>;
|
|
101
|
+
readonly style: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
92
102
|
readonly width: v.NumberSchema<undefined>;
|
|
93
103
|
readonly height: v.NumberSchema<undefined>;
|
|
94
|
-
readonly radius: v.NumberSchema<undefined>;
|
|
95
104
|
readonly margin: v.NumberSchema<undefined>;
|
|
96
|
-
|
|
97
|
-
|
|
105
|
+
readonly radius: v.NumberSchema<undefined>;
|
|
106
|
+
}, undefined>, v.CheckAction<{
|
|
107
|
+
width: number;
|
|
108
|
+
height: number;
|
|
109
|
+
margin: number;
|
|
110
|
+
radius: number;
|
|
111
|
+
}, "Tooltip: minimum of width or height must be greater than or equal to 6 * margin">]>;
|
|
112
|
+
readonly colors: v.OptionalSchema<v.ObjectSchema<{
|
|
113
|
+
readonly background: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
114
|
+
readonly shadow: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
115
|
+
}, undefined>, undefined>;
|
|
98
116
|
}, undefined>, undefined>;
|
|
99
117
|
}, undefined>;
|
|
100
118
|
|