@arenarium/maps 1.0.82 → 1.0.83

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.
Files changed (2) hide show
  1. package/dist/index.js +1 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  (function(jt,Qt){typeof exports=="object"&&typeof module<"u"?Qt(exports):typeof define=="function"&&define.amd?define(["exports"],Qt):(jt=typeof globalThis<"u"?globalThis:jt||self,Qt(jt.arenarium={}))})(this,function(jt){"use strict";var u0=Object.defineProperty;var Vg=jt=>{throw TypeError(jt)};var h0=(jt,Qt,Ai)=>Qt in jt?u0(jt,Qt,{enumerable:!0,configurable:!0,writable:!0,value:Ai}):jt[Qt]=Ai;var Ht=(jt,Qt,Ai)=>h0(jt,typeof Qt!="symbol"?Qt+"":Qt,Ai),Up=(jt,Qt,Ai)=>Qt.has(jt)||Vg("Cannot "+Ai);var Ei=(jt,Qt,Ai)=>(Up(jt,Qt,"read from private field"),Ai?Ai.call(jt):Qt.get(jt)),Aa=(jt,Qt,Ai)=>Qt.has(jt)?Vg("Cannot add the same private member more than once"):Qt instanceof WeakSet?Qt.add(jt):Qt.set(jt,Ai),au=(jt,Qt,Ai,su)=>(Up(jt,Qt,"write to private field"),su?su.call(jt,Ai):Qt.set(jt,Ai),Ai),Ug=(jt,Qt,Ai)=>(Up(jt,Qt,"access private method"),Ai);var ja,So,Hl,Fu,$g,tm,ca,Po,Wl,Ss;var Ai=Array.isArray,su=Array.prototype.indexOf,qg=Array.from,Hg=Object.defineProperty,Sl=Object.getOwnPropertyDescriptor,$p=Object.prototype,Wg=Array.prototype,Gp=Object.getPrototypeOf,qp=Object.isExtensible;function Xg(v){for(var g=0;g<v.length;g++)v[g]()}const vn=2,Hp=4,ou=8,Kh=16,za=32,go=64,lu=128,Wr=256,cu=512,on=1024,ka=2048,gs=4096,uu=8192,hu=16384,Kg=32768,Yg=65536,Jg=1<<19,Wp=1<<20,Yh=1<<21,du=Symbol("$state");function Xp(v){return v===this.v}function Qg(v){throw new Error("https://svelte.dev/e/effect_in_teardown")}function e_(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function t_(v){throw new Error("https://svelte.dev/e/effect_orphan")}function i_(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function r_(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function n_(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function a_(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}let d0=!1;const s_=2,Xr=Symbol(),o_=[];function l_(v,g=!1){return pu(v,new Map,"",o_)}function pu(v,g,b,C,k=null){if(typeof v=="object"&&v!==null){var L=g.get(v);if(L!==void 0)return L;if(v instanceof Map)return new Map(v);if(v instanceof Set)return new Set(v);if(Ai(v)){var S=Array(v.length);g.set(v,S),k!==null&&g.set(k,S);for(var o=0;o<v.length;o+=1){var he=v[o];o in v&&(S[o]=pu(he,g,b,C))}return S}if(Gp(v)===$p){S={},g.set(v,S),k!==null&&g.set(k,S);for(var pe in v)S[pe]=pu(v[pe],g,b,C);return S}if(v instanceof Date)return structuredClone(v);if(typeof v.toJSON=="function")return pu(v.toJSON(),g,b,C,v)}if(v instanceof EventTarget)return v;try{return structuredClone(v)}catch{return v}}function c_(v){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}let jr=null;function Kp(v){jr=v}function fu(v,g=!1,b){var C=jr={p:jr,c:null,d:!1,e:null,m:!1,s:v,x:null,l:null};uf(()=>{C.d=!0})}function mu(v){const g=jr;if(g!==null){v!==void 0&&(g.x=v);const S=g.e;if(S!==null){var b=fi,C=ei;g.e=null;try{for(var k=0;k<S.length;k++){var L=S[k];Ra(L.effect),Nn(L.reaction),_u(L.fn)}}finally{Ra(b),Nn(C)}}jr=g.p,g.m=!0}return v||{}}function Yp(){return!0}function _s(v){if(typeof v!="object"||v===null||du in v)return v;const g=Gp(v);if(g!==$p&&g!==Wg)return v;var b=new Map,C=Ai(v),k=Ji(0),L=ei,S=o=>{var he=ei;Nn(L);var pe=o();return Nn(he),pe};return C&&b.set("length",Ji(v.length)),new Proxy(v,{defineProperty(o,he,pe){(!("value"in pe)||pe.configurable===!1||pe.enumerable===!1||pe.writable===!1)&&r_();var Ce=b.get(he);return Ce===void 0?(Ce=S(()=>Ji(pe.value)),b.set(he,Ce)):yi(Ce,S(()=>_s(pe.value))),!0},deleteProperty(o,he){var pe=b.get(he);if(pe===void 0)he in o&&(b.set(he,S(()=>Ji(Xr))),Jh(k));else{if(C&&typeof he=="string"){var Ce=b.get("length"),Be=Number(he);Number.isInteger(Be)&&Be<Ce.v&&yi(Ce,Be)}yi(pe,Xr),Jh(k)}return!0},get(o,he,pe){var le;if(he===du)return v;var Ce=b.get(he),Be=he in o;if(Ce===void 0&&(!Be||(le=Sl(o,he))!=null&&le.writable)&&(Ce=S(()=>Ji(_s(Be?o[he]:Xr))),b.set(he,Ce)),Ce!==void 0){var Pe=st(Ce);return Pe===Xr?void 0:Pe}return Reflect.get(o,he,pe)},getOwnPropertyDescriptor(o,he){var pe=Reflect.getOwnPropertyDescriptor(o,he);if(pe&&"value"in pe){var Ce=b.get(he);Ce&&(pe.value=st(Ce))}else if(pe===void 0){var Be=b.get(he),Pe=Be==null?void 0:Be.v;if(Be!==void 0&&Pe!==Xr)return{enumerable:!0,configurable:!0,value:Pe,writable:!0}}return pe},has(o,he){var Pe;if(he===du)return!0;var pe=b.get(he),Ce=pe!==void 0&&pe.v!==Xr||Reflect.has(o,he);if(pe!==void 0||fi!==null&&(!Ce||(Pe=Sl(o,he))!=null&&Pe.writable)){pe===void 0&&(pe=S(()=>Ji(Ce?_s(o[he]):Xr)),b.set(he,pe));var Be=st(pe);if(Be===Xr)return!1}return Ce},set(o,he,pe,Ce){var vi;var Be=b.get(he),Pe=he in o;if(C&&he==="length")for(var le=pe;le<Be.v;le+=1){var Ze=b.get(le+"");Ze!==void 0?yi(Ze,Xr):le in o&&(Ze=S(()=>Ji(Xr)),b.set(le+"",Ze))}Be===void 0?(!Pe||(vi=Sl(o,he))!=null&&vi.writable)&&(Be=S(()=>Ji(void 0)),yi(Be,S(()=>_s(pe))),b.set(he,Be)):(Pe=Be.v!==Xr,yi(Be,S(()=>_s(pe))));var kt=Reflect.getOwnPropertyDescriptor(o,he);if(kt!=null&&kt.set&&kt.set.call(Ce,pe),!Pe){if(C&&typeof he=="string"){var Ut=b.get("length"),xt=Number(he);Number.isInteger(xt)&&xt>=Ut.v&&yi(Ut,xt+1)}Jh(k)}return!0},ownKeys(o){st(k);var he=Reflect.ownKeys(o).filter(Be=>{var Pe=b.get(Be);return Pe===void 0||Pe.v!==Xr});for(var[pe,Ce]of b)Ce.v!==Xr&&!(pe in o)&&he.push(pe);return he},setPrototypeOf(){n_()}})}function Jh(v,g=1){yi(v,v.v+g)}function Jp(v){var g=vn|ka,b=ei!==null&&(ei.f&vn)!==0?ei:null;return fi===null||b!==null&&(b.f&Wr)!==0?g|=Wr:fi.f|=Wp,{ctx:jr,deps:null,effects:null,equals:Xp,f:g,fn:v,reactions:null,rv:0,v:null,wv:0,parent:b??fi}}function Qp(v){const g=Jp(v);return yf(g),g}function ef(v){var g=v.effects;if(g!==null){v.effects=null;for(var b=0;b<g.length;b+=1)ys(g[b])}}function u_(v){for(var g=v.parent;g!==null;){if((g.f&vn)===0)return g;g=g.parent}return null}function tf(v){var g,b=fi;Ra(u_(v));try{ef(v),g=Tf(v)}finally{Ra(b)}return g}function rf(v){var g=tf(v),b=(Da||(v.f&Wr)!==0)&&v.deps!==null?gs:on;Zn(v,b),v.equals(g)||(v.v=g,v.wv=vf())}const Pl=new Map;function Qh(v,g){var b={f:0,v,reactions:null,equals:Xp,rv:0,wv:0};return b}function Ji(v,g){const b=Qh(v);return yf(b),b}function yi(v,g,b=!1){ei!==null&&!jn&&Yp()&&(ei.f&(vn|Kh))!==0&&!(Ir!=null&&Ir.includes(v))&&a_();let C=b?_s(g):g;return h_(v,C)}function h_(v,g){if(!v.equals(g)){var b=v.v;Il?Pl.set(v,g):Pl.set(v,b),v.v=g,(v.f&vn)!==0&&((v.f&ka)!==0&&tf(v),Zn(v,(v.f&Wr)===0?on:gs)),v.wv=vf(),nf(v,ka),fi!==null&&(fi.f&on)!==0&&(fi.f&(za|go))===0&&(cn===null?S_([v]):cn.push(v))}return g}function nf(v,g){var b=v.reactions;if(b!==null)for(var C=b.length,k=0;k<C;k++){var L=b[k],S=L.f;(S&ka)===0&&(Zn(L,g),(S&(on|Wr))!==0&&((S&vn)!==0?nf(L,gs):nd(L)))}}var ed,af,sf,of;function d_(){if(ed===void 0){ed=window,af=/Firefox/.test(navigator.userAgent);var v=Element.prototype,g=Node.prototype,b=Text.prototype;sf=Sl(g,"firstChild").get,of=Sl(g,"nextSibling").get,qp(v)&&(v.__click=void 0,v.__className=void 0,v.__attributes=null,v.__style=void 0,v.__e=void 0),qp(b)&&(b.__t=void 0)}}function p_(v=""){return document.createTextNode(v)}function lf(v){return sf.call(v)}function cf(v){return of.call(v)}function gu(v,g){return lf(v)}function f_(v,g=1,b=!1){let C=v;for(;g--;)C=cf(C);return C}function m_(v){fi===null&&ei===null&&t_(),ei!==null&&(ei.f&Wr)!==0&&fi===null&&e_(),Il&&Qg()}function g_(v,g){var b=g.last;b===null?g.last=g.first=v:(b.next=v,v.prev=b,g.last=v)}function _o(v,g,b,C=!0){var k=fi,L={ctx:jr,deps:null,nodes_start:null,nodes_end:null,f:v|ka,first:null,fn:g,last:null,next:null,parent:k,prev:null,teardown:null,transitions:null,wv:0};if(b)try{rd(L),L.f|=Kg}catch(he){throw ys(L),he}else g!==null&&nd(L);var S=b&&L.deps===null&&L.first===null&&L.nodes_start===null&&L.teardown===null&&(L.f&(Wp|lu))===0;if(!S&&C&&(k!==null&&g_(L,k),ei!==null&&(ei.f&vn)!==0)){var o=ei;(o.effects??(o.effects=[])).push(L)}return L}function uf(v){const g=_o(ou,null,!1);return Zn(g,on),g.teardown=v,g}function ln(v){m_();var g=fi!==null&&(fi.f&za)!==0&&jr!==null&&!jr.m;if(g){var b=jr;(b.e??(b.e=[])).push({fn:v,effect:fi,reaction:ei})}else{var C=_u(v);return C}}function __(v){const g=_o(go,v,!0);return(b={})=>new Promise(C=>{b.outro?w_(g,()=>{ys(g),C(void 0)}):(ys(g),C(void 0))})}function _u(v){return _o(Hp,v,!1)}function hf(v){return _o(ou,v,!0)}function td(v,g=[],b=Jp){const C=g.map(b);return y_(()=>v(...C.map(st)))}function y_(v,g=0){return _o(ou|Kh|g,v,!0)}function x_(v,g=!0){return _o(ou|za,v,!0,g)}function df(v){var g=v.teardown;if(g!==null){const b=Il,C=ei;_f(!0),Nn(null);try{g.call(null)}finally{_f(b),Nn(C)}}}function pf(v,g=!1){var b=v.first;for(v.first=v.last=null;b!==null;){var C=b.next;(b.f&go)!==0?b.parent=null:ys(b,g),b=C}}function v_(v){for(var g=v.first;g!==null;){var b=g.next;(g.f&za)===0&&ys(g),g=b}}function ys(v,g=!0){var b=!1;(g||(v.f&Jg)!==0)&&v.nodes_start!==null&&(b_(v.nodes_start,v.nodes_end),b=!0),pf(v,g&&!b),Su(v,0),Zn(v,hu);var C=v.transitions;if(C!==null)for(const L of C)L.stop();df(v);var k=v.parent;k!==null&&k.first!==null&&ff(v),v.next=v.prev=v.teardown=v.ctx=v.deps=v.fn=v.nodes_start=v.nodes_end=null}function b_(v,g){for(;v!==null;){var b=v===g?null:cf(v);v.remove(),v=b}}function ff(v){var g=v.parent,b=v.prev,C=v.next;b!==null&&(b.next=C),C!==null&&(C.prev=b),g!==null&&(g.first===v&&(g.first=C),g.last===v&&(g.last=b))}function w_(v,g){var b=[];mf(v,b,!0),T_(b,()=>{ys(v),g&&g()})}function T_(v,g){var b=v.length;if(b>0){var C=()=>--b||g();for(var k of v)k.out(C)}else g()}function mf(v,g,b){if((v.f&uu)===0){if(v.f^=uu,v.transitions!==null)for(const S of v.transitions)(S.is_global||b)&&g.push(S);for(var C=v.first;C!==null;){var k=C.next,L=(C.f&Yg)!==0||(C.f&za)!==0;mf(C,g,L?b:!1),C=k}}}let yu=[];function M_(){var v=yu;yu=[],Xg(v)}function gf(v){yu.length===0&&queueMicrotask(M_),yu.push(v)}let xu=!1,id=!1,vu=null,xs=!1,Il=!1;function _f(v){Il=v}let bu=[],p0=[],ei=null,jn=!1;function Nn(v){ei=v}let fi=null;function Ra(v){fi=v}let Ir=null;function yf(v){ei!==null&&ei.f&Yh&&(Ir===null?Ir=[v]:Ir.push(v))}let Cr=null,Kr=0,cn=null;function S_(v){cn=v}let xf=1,wu=0,Da=!1;function vf(){return++xf}function Tu(v){var Be;var g=v.f;if((g&ka)!==0)return!0;if((g&gs)!==0){var b=v.deps,C=(g&Wr)!==0;if(b!==null){var k,L,S=(g&cu)!==0,o=C&&fi!==null&&!Da,he=b.length;if(S||o){var pe=v,Ce=pe.parent;for(k=0;k<he;k++)L=b[k],(S||!((Be=L==null?void 0:L.reactions)!=null&&Be.includes(pe)))&&(L.reactions??(L.reactions=[])).push(pe);S&&(pe.f^=cu),o&&Ce!==null&&(Ce.f&Wr)===0&&(pe.f^=Wr)}for(k=0;k<he;k++)if(L=b[k],Tu(L)&&rf(L),L.wv>v.wv)return!0}(!C||fi!==null&&!Da)&&Zn(v,on)}return!1}function P_(v,g){for(var b=g;b!==null;){if((b.f&lu)!==0)try{b.fn(v);return}catch{b.f^=lu}b=b.parent}throw xu=!1,v}function bf(v){return(v.f&hu)===0&&(v.parent===null||(v.parent.f&lu)===0)}function Mu(v,g,b,C){if(xu){if(b===null&&(xu=!1),bf(g))throw v;return}if(b!==null&&(xu=!0),P_(v,g),bf(g))throw v}function wf(v,g,b=!0){var C=v.reactions;if(C!==null)for(var k=0;k<C.length;k++){var L=C[k];Ir!=null&&Ir.includes(v)||((L.f&vn)!==0?wf(L,g,!1):g===L&&(b?Zn(L,ka):(L.f&on)!==0&&Zn(L,gs),nd(L)))}}function Tf(v){var le;var g=Cr,b=Kr,C=cn,k=ei,L=Da,S=Ir,o=jr,he=jn,pe=v.f;Cr=null,Kr=0,cn=null,Da=(pe&Wr)!==0&&(jn||!xs||ei===null),ei=(pe&(za|go))===0?v:null,Ir=null,Kp(v.ctx),jn=!1,wu++,v.f|=Yh;try{var Ce=(0,v.fn)(),Be=v.deps;if(Cr!==null){var Pe;if(Su(v,Kr),Be!==null&&Kr>0)for(Be.length=Kr+Cr.length,Pe=0;Pe<Cr.length;Pe++)Be[Kr+Pe]=Cr[Pe];else v.deps=Be=Cr;if(!Da)for(Pe=Kr;Pe<Be.length;Pe++)((le=Be[Pe]).reactions??(le.reactions=[])).push(v)}else Be!==null&&Kr<Be.length&&(Su(v,Kr),Be.length=Kr);if(Yp()&&cn!==null&&!jn&&Be!==null&&(v.f&(vn|gs|ka))===0)for(Pe=0;Pe<cn.length;Pe++)wf(cn[Pe],v);return k!==null&&k!==v&&(wu++,cn!==null&&(C===null?C=cn:C.push(...cn))),Ce}finally{Cr=g,Kr=b,cn=C,ei=k,Da=L,Ir=S,Kp(o),jn=he,v.f^=Yh}}function I_(v,g){let b=g.reactions;if(b!==null){var C=su.call(b,v);if(C!==-1){var k=b.length-1;k===0?b=g.reactions=null:(b[C]=b[k],b.pop())}}b===null&&(g.f&vn)!==0&&(Cr===null||!Cr.includes(g))&&(Zn(g,gs),(g.f&(Wr|cu))===0&&(g.f^=cu),ef(g),Su(g,0))}function Su(v,g){var b=v.deps;if(b!==null)for(var C=g;C<b.length;C++)I_(v,b[C])}function rd(v){var g=v.f;if((g&hu)===0){Zn(v,on);var b=fi,C=jr,k=xs;fi=v,xs=!0;try{(g&Kh)!==0?v_(v):pf(v),df(v);var L=Tf(v);v.teardown=typeof L=="function"?L:null,v.wv=xf;var S=v.deps,o}catch(he){Mu(he,v,b,C||v.ctx)}finally{xs=k,fi=b}}}function C_(){try{i_()}catch(v){if(vu!==null)Mu(v,vu,null);else throw v}}function E_(){var v=xs;try{var g=0;for(xs=!0;bu.length>0;){g++>1e3&&C_();var b=bu,C=b.length;bu=[];for(var k=0;k<C;k++){var L=z_(b[k]);A_(L)}Pl.clear()}}finally{id=!1,xs=v,vu=null}}function A_(v){var g=v.length;if(g!==0)for(var b=0;b<g;b++){var C=v[b];if((C.f&(hu|uu))===0)try{Tu(C)&&(rd(C),C.deps===null&&C.first===null&&C.nodes_start===null&&(C.teardown===null?ff(C):C.fn=null))}catch(k){Mu(k,C,null,C.ctx)}}}function nd(v){id||(id=!0,queueMicrotask(E_));for(var g=vu=v;g.parent!==null;){g=g.parent;var b=g.f;if((b&(go|za))!==0){if((b&on)===0)return;g.f^=on}}bu.push(g)}function z_(v){for(var g=[],b=v;b!==null;){var C=b.f,k=(C&(za|go))!==0,L=k&&(C&on)!==0;if(!L&&(C&uu)===0){if((C&Hp)!==0)g.push(b);else if(k)b.f^=on;else try{Tu(b)&&rd(b)}catch(he){Mu(he,b,null,b.ctx)}var S=b.first;if(S!==null){b=S;continue}}var o=b.parent;for(b=b.next;b===null&&o!==null;)b=o.next,o=o.parent}return g}function st(v){var g=v.f,b=(g&vn)!==0;if(ei!==null&&!jn){if(!(Ir!=null&&Ir.includes(v))){var C=ei.deps;v.rv<wu&&(v.rv=wu,Cr===null&&C!==null&&C[Kr]===v?Kr++:Cr===null?Cr=[v]:(!Da||!Cr.includes(v))&&Cr.push(v))}}else if(b&&v.deps===null&&v.effects===null){var k=v,L=k.parent;L!==null&&(L.f&Wr)===0&&(k.f^=Wr)}return b&&(k=v,Tu(k)&&rf(k)),Il&&Pl.has(v)?Pl.get(v):v.v}function ad(v){var g=jn;try{return jn=!0,v()}finally{jn=g}}const k_=-7169;function Zn(v,g){v.f=v.f&k_|g}const R_=["touchstart","touchmove"];function D_(v){return R_.includes(v)}function L_(v){var g=ei,b=fi;Nn(null),Ra(null);try{return v()}finally{Nn(g),Ra(b)}}const B_=new Set,Mf=new Set;function F_(v,g,b,C={}){function k(L){if(C.capture||Cl.call(g,L),!L.cancelBubble)return L_(()=>b==null?void 0:b.call(this,L))}return v.startsWith("pointer")||v.startsWith("touch")||v==="wheel"?gf(()=>{g.addEventListener(v,k,C)}):g.addEventListener(v,k,C),k}function O_(v,g,b,C,k){var L={capture:C,passive:k},S=F_(v,g,b,L);(g===document.body||g===window||g===document)&&uf(()=>{g.removeEventListener(v,S,L)})}function Cl(v){var vi;var g=this,b=g.ownerDocument,C=v.type,k=((vi=v.composedPath)==null?void 0:vi.call(v))||[],L=k[0]||v.target,S=0,o=v.__root;if(o){var he=k.indexOf(o);if(he!==-1&&(g===document||g===window)){v.__root=g;return}var pe=k.indexOf(g);if(pe===-1)return;he<=pe&&(S=he)}if(L=k[S]||v.target,L!==g){Hg(v,"currentTarget",{configurable:!0,get(){return L||b}});var Ce=ei,Be=fi;Nn(null),Ra(null);try{for(var Pe,le=[];L!==null;){var Ze=L.assignedSlot||L.parentNode||L.host||null;try{var kt=L["__"+C];if(kt!=null&&(!L.disabled||v.target===L))if(Ai(kt)){var[Ut,...xt]=kt;Ut.apply(L,[v,...xt])}else kt.call(L,v)}catch(mi){Pe?le.push(mi):Pe=mi}if(v.cancelBubble||Ze===g||Ze===null)break;L=Ze}if(Pe){for(let mi of le)queueMicrotask(()=>{throw mi});throw Pe}}finally{v.__root=g,delete v.currentTarget,Nn(Ce),Ra(Be)}}}function j_(v){var g=document.createElement("template");return g.innerHTML=v,g.content}function N_(v,g){var b=fi;b.nodes_start===null&&(b.nodes_start=v,b.nodes_end=g)}function sd(v,g){var b=(g&s_)!==0,C,k=!v.startsWith("<!>");return()=>{C===void 0&&(C=j_(k?v:"<!>"+v),C=lf(C));var L=b||af?document.importNode(C,!0):C.cloneNode(!0);return N_(L,L),L}}function od(v,g){v!==null&&v.before(g)}function ld(v,g){return Z_(v,g)}const yo=new Map;function Z_(v,{target:g,anchor:b,props:C={},events:k,context:L,intro:S=!0}){d_();var o=new Set,he=Be=>{for(var Pe=0;Pe<Be.length;Pe++){var le=Be[Pe];if(!o.has(le)){o.add(le);var Ze=D_(le);g.addEventListener(le,Cl,{passive:Ze});var kt=yo.get(le);kt===void 0?(document.addEventListener(le,Cl,{passive:Ze}),yo.set(le,1)):yo.set(le,kt+1)}}};he(qg(B_)),Mf.add(he);var pe=void 0,Ce=__(()=>{var Be=b??g.appendChild(p_());return x_(()=>{if(L){fu({});var Pe=jr;Pe.c=L}k&&(C.$$events=k),pe=v(Be,C)||{},L&&mu()}),()=>{var Ze;for(var Pe of o){g.removeEventListener(Pe,Cl);var le=yo.get(Pe);--le===0?(document.removeEventListener(Pe,Cl),yo.delete(Pe)):yo.set(Pe,le)}Mf.delete(he),Be!==b&&((Ze=Be.parentNode)==null||Ze.removeChild(Be))}});return cd.set(pe,Ce),pe}let cd=new WeakMap;function V_(v,g){const b=cd.get(v);return b?(cd.delete(v),b(g)):Promise.resolve()}const Sf=[...`
2
- \r\f \v\uFEFF`];function U_(v,g,b){var C=v==null?"":""+v;if(b){for(var k in b)if(b[k])C=C?C+" "+k:k;else if(C.length)for(var L=k.length,S=0;(S=C.indexOf(k,S))>=0;){var o=S+L;(S===0||Sf.includes(C[S-1]))&&(o===C.length||Sf.includes(C[o]))?C=(S===0?"":C.substring(0,S))+C.substring(o+1):S=o}}return C===""?null:C}function Pf(v,g=!1){var b=g?" !important;":";",C="";for(var k in v){var L=v[k];L!=null&&L!==""&&(C+=" "+k+": "+L+b)}return C}function ud(v){return v[0]!=="-"||v[1]!=="-"?v.toLowerCase():v}function $_(v,g){if(g){var b="",C,k;if(Array.isArray(g)?(C=g[0],k=g[1]):C=g,v){v=String(v).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var L=!1,S=0,o=!1,he=[];C&&he.push(...Object.keys(C).map(ud)),k&&he.push(...Object.keys(k).map(ud));var pe=0,Ce=-1;const kt=v.length;for(var Be=0;Be<kt;Be++){var Pe=v[Be];if(o?Pe==="/"&&v[Be-1]==="*"&&(o=!1):L?L===Pe&&(L=!1):Pe==="/"&&v[Be+1]==="*"?o=!0:Pe==='"'||Pe==="'"?L=Pe:Pe==="("?S++:Pe===")"&&S--,!o&&L===!1&&S===0){if(Pe===":"&&Ce===-1)Ce=Be;else if(Pe===";"||Be===kt-1){if(Ce!==-1){var le=ud(v.substring(pe,Ce).trim());if(!he.includes(le)){Pe!==";"&&Be++;var Ze=v.substring(pe,Be).trim();b+=" "+Ze+";"}}pe=Be+1,Ce=-1}}}}return C&&(b+=Pf(C)),k&&(b+=Pf(k,!0)),b=b.trim(),b===""?null:b}return v==null?null:String(v)}function If(v,g,b,C,k,L){var S=v.__className;if(S!==b||S===void 0){var o=U_(b,C,L);o==null?v.removeAttribute("class"):v.className=o,v.__className=b}else if(L&&k!==L)for(var he in L){var pe=!!L[he];(k==null||pe!==!!k[he])&&v.classList.toggle(he,pe)}return L}function hd(v,g={},b,C){for(var k in b){var L=b[k];g[k]!==L&&(b[k]==null?v.style.removeProperty(k):v.style.setProperty(k,L,C))}}function dd(v,g,b,C){var k=v.__style;if(k!==g){var L=$_(g,C);L==null?v.removeAttribute("style"):v.style.cssText=L,v.__style=g}else C&&(Array.isArray(C)?(hd(v,b==null?void 0:b[0],C[0]),hd(v,b==null?void 0:b[1],C[1],"important")):hd(v,b,C));return C}const G_=()=>performance.now(),Vn={tick:v=>requestAnimationFrame(v),now:()=>G_(),tasks:new Set};function Cf(){const v=Vn.now();Vn.tasks.forEach(g=>{g.c(v)||(Vn.tasks.delete(g),g.f())}),Vn.tasks.size!==0&&Vn.tick(Cf)}function q_(v){let g;return Vn.tasks.size===0&&Vn.tick(Cf),{promise:new Promise(b=>{Vn.tasks.add(g={c:v,f:b})}),abort(){Vn.tasks.delete(g)}}}const Ou=class Ou{constructor(g){Aa(this,Fu);Aa(this,ja,new WeakMap);Aa(this,So);Aa(this,Hl);au(this,Hl,g)}observe(g,b){var C=Ei(this,ja).get(g)||new Set;return C.add(b),Ei(this,ja).set(g,C),Ug(this,Fu,$g).call(this).observe(g,Ei(this,Hl)),()=>{var k=Ei(this,ja).get(g);k.delete(b),k.size===0&&(Ei(this,ja).delete(g),Ei(this,So).unobserve(g))}}};ja=new WeakMap,So=new WeakMap,Hl=new WeakMap,Fu=new WeakSet,$g=function(){return Ei(this,So)??au(this,So,new ResizeObserver(g=>{for(var b of g){Ou.entries.set(b.target,b);for(var C of Ei(this,ja).get(b.target)||[])C(b)}}))},Ht(Ou,"entries",new WeakMap);let pd=Ou;var H_=new pd({box:"border-box"});function Pu(v,g,b){var C=H_.observe(v,()=>b(v[g]));_u(()=>(ad(()=>b(v[g])),C))}function Ef(v,g){return v===g||(v==null?void 0:v[du])===g}function vs(v={},g,b,C){return _u(()=>{var k,L;return hf(()=>{k=L,L=[],ad(()=>{v!==b(...L)&&(g(v,...L),k&&Ef(b(...k),v)&&g(null,...k))})}),()=>{gf(()=>{L&&Ef(b(...L),v)&&g(null,...L)})}}),v}function Af(v){jr===null&&c_(),ln(()=>{const g=ad(v);if(typeof g=="function")return g})}const W_="5";typeof window<"u"&&((tm=window.__svelte??(window.__svelte={})).v??(tm.v=new Set)).add(W_);function zf(v){return Object.prototype.toString.call(v)==="[object Date]"}function X_(v){return v}function fd(v){return-.5*(Math.cos(Math.PI*v)-1)}function md(v,g){if(v===g||v!==v)return()=>v;const b=typeof v;if(b!==typeof g||Array.isArray(v)!==Array.isArray(g))throw new Error("Cannot interpolate values of different type");if(Array.isArray(v)){const C=g.map((k,L)=>md(v[L],k));return k=>C.map(L=>L(k))}if(b==="object"){if(!v||!g)throw new Error("Object cannot be null");if(zf(v)&&zf(g)){const L=v.getTime(),o=g.getTime()-L;return he=>new Date(L+he*o)}const C=Object.keys(g),k={};return C.forEach(L=>{k[L]=md(v[L],g[L])}),L=>{const S={};return C.forEach(o=>{S[o]=k[o](L)}),S}}if(b==="number"){const C=g-v;return k=>v+k*C}return()=>g}const Md=class Md{constructor(g,b={}){Aa(this,ca,Qh(void 0));Aa(this,Po,Qh(void 0));Aa(this,Wl);Aa(this,Ss,null);Ei(this,ca).v=Ei(this,Po).v=g,au(this,Wl,b)}static of(g,b){const C=new Md(g(),b);return hf(()=>{C.set(g())}),C}set(g,b){var Be;yi(Ei(this,Po),g);let{delay:C=0,duration:k=400,easing:L=X_,interpolate:S=md}={...Ei(this,Wl),...b};if(k===0)return(Be=Ei(this,Ss))==null||Be.abort(),yi(Ei(this,ca),g),Promise.resolve();const o=Vn.now()+C;let he,pe=!1,Ce=Ei(this,Ss);return au(this,Ss,q_(Pe=>{if(Pe<o)return!0;if(!pe){pe=!0;const Ze=Ei(this,ca).v;he=S(Ze,g),typeof k=="function"&&(k=k(Ze,g)),Ce==null||Ce.abort()}const le=Pe-o;return le>k?(yi(Ei(this,ca),g),!1):(yi(Ei(this,ca),he(L(le/k))),!0)})),Ei(this,Ss).promise}get current(){return st(Ei(this,ca))}get target(){return st(Ei(this,Po))}set target(g){this.set(g)}};ca=new WeakMap,Po=new WeakMap,Wl=new WeakMap,Ss=new WeakMap;let El=Md;function kf(v,g,b){const C=b*(Math.PI/180),k=v/2,L=g/2,S=Math.sqrt(k*k+L*L),o=Math.atan(L/k)*(180/Math.PI),he=o,pe=180-o,Ce=180+o,Be=360-o;switch(!0){case(he<=b&&b<=pe):return{offsetX:S*Math.cos(C)-k,offsetY:0};case(pe<=b&&b<=Ce):return{offsetX:-v,offsetY:S*Math.sin(C)-L};case(Ce<=b&&b<=Be):return{offsetX:S*Math.cos(C)-k,offsetY:-g};default:return{offsetX:0,offsetY:S*Math.sin(C)-L}}}function K_(v,g,b){const C=kf(v,g,b),k=C.offsetX,L=C.offsetY,S=g,o=v,he=kf(S,o,b),pe=S/2+he.offsetX,Ce=o/2+he.offsetY,Pe=Math.atan2(Ce,pe)/Math.PI*180-45,le=0,Ze=30,kt=k+v/2,Ut=L+g/2,xt=Math.sqrt(kt*kt+Ut*Ut),vi=Math.min(v,g)/2,mi=Math.sqrt(v*v+g*g)/2,ti=(xt-vi)/(mi-vi),Bt=le+ti*(Ze-le);return{markerOffsetX:k,markerOffsetY:L,pinAngleDeg:Pe,pinSkewDeg:Bt}}const Rf=512,gd=0,Al=18,Df=10,Lf=2,Y_=.5,Bf=270,J_=8;var Q_=sd('<div><div class="pin svelte-jal8za"></div> <div class="marker svelte-jal8za"><div class="body svelte-jal8za"></div></div></div>');function ey(v,g){fu(g,!0);let b,C,k,L,S=Ji(0),o=Ji(0);const he=()=>L;let pe=Ji(!0);function Ce(ht){yi(pe,ht,!0)}function Be(){return st(pe)}let Pe=Ji(!0);function le(ht){yi(Pe,ht,!0)}function Ze(){return st(S)==0&&st(o)==0}function kt(){return st(Pe)==!1}let Ut=0,xt=new El(Ut,{easing:fd});ln(()=>{vi(xt.current)}),ln(()=>{st(pe)==!1&&(Ut=0,xt.set(0,{duration:0}),vi(0))}),ln(()=>{st(Pe)==!0&&Ut!=0&&(Ut=0,xt.set(0,{duration:75})),st(Pe)==!1&&Ut!=1&&(Ut=1,xt.set(1,{duration:150}))});function vi(ht){!b||!C||!k||window.requestAnimationFrame(()=>{b.style.opacity=`${ht}`,C.style.scale=`${ht}`,k.style.scale=`${ht}`})}let mi=Bf,ti=!1,Bt=new El(Bf,{easing:fd,interpolate:$t});ln(()=>{Qi(Bt.current)}),ln(()=>{st(pe)==!1&&Bt.set(mi,{duration:0})}),ln(()=>{st(Pe)==!0&&Bt.set(mi,{duration:75})});function $t(ht,ft){if(Math.abs(ft-ht)<180)return zi=>ht+zi*(ft-ht);{const zi=360-Math.abs(ft-ht),Mi=ht<ft?-1:1;return Nr=>(360+ht+Nr*zi*Mi)%360}}function Qi(ht){if(!b||!C||!k)return;const ft=K_(st(S),st(o),ht);window.requestAnimationFrame(()=>{const zi=Math.round(ft.markerOffsetX),Mi=Math.round(ft.markerOffsetY);C.style.transform=`translate(${zi}px, ${Mi}px)`;const Nr=ft.pinAngleDeg,tr=ft.pinSkewDeg;k.style.transform=`rotate(${Nr}deg) skew(${tr}deg, ${tr}deg)`;const Mn=-1-2*(zi/st(S)),ir=-1-2*(Mi/st(o));b.style.filter=`drop-shadow(0px 0px 4px rgba(0,0,0,0.5)) drop-shadow(${Mn}px ${ir}px 2px rgba(0,0,0,0.5))`})}function Gt(ht){if(st(pe)==!1&&(mi=ht,Qi(mi)),ht!=mi){let ft=Math.abs(ht-Bt.current),zi=ft<180?ft:360-ft,Mi=Math.log(zi)*75;mi=ht,Bt.set(ht,{duration:ti?Mi:0})}ti=!0}ln(()=>{st(S)&&st(o)&&(k.style.width=`${Math.min(st(S),st(o))/4}px`,k.style.height=`${Math.min(st(S),st(o))/4}px`)}),ln(()=>{st(S)&&st(o)&&Qi(mi)});const qn=()=>st(S),Hn=()=>st(o);var cr=Q_();let ur;var er=gu(cr);vs(er,ht=>k=ht,()=>k);var ri=f_(er,2);dd(ri,"",{},{padding:J_+"px"});var un=gu(ri);let $i;return vs(un,ht=>L=ht,()=>L),vs(ri,ht=>C=ht,()=>C),vs(cr,ht=>b=ht,()=>b),td(ht=>{ur=If(cr,1,"anchor svelte-jal8za",null,ur,ht),$i=dd(un,"",$i,{width:`${g.width}px`,height:`${g.height}px`})},[()=>({displayed:st(pe)})]),Pu(ri,"clientWidth",ht=>yi(S,ht)),Pu(ri,"clientHeight",ht=>yi(o,ht)),od(v,cr),mu({getBody:he,setDisplayed:Ce,getDisplayed:Be,setCollapsed:le,getCollapsed:Ze,getExpanded:kt,setAngle:Gt,getWidth:qn,getHeight:Hn})}var ty=sd('<div><div class="body svelte-d8xfg4"></div></div>');function iy(v,g){fu(g,!0);let b,C;function k(){return C}let L=Ji(!1);function S(xt){yi(L,xt,!0)}function o(){return st(L)}let he=0,pe=new El(0,{easing:fd});ln(()=>{Ce(pe.current)}),ln(()=>{st(L)==!1&&(he=0,pe.set(0,{duration:0}),Ce(0))});function Ce(xt){b&&window.requestAnimationFrame(()=>{b.style.scale=xt.toString(),b.style.filter=`brightness(${.4+.6*xt})`})}function Be(xt){xt!=he&&(he=xt,pe.set(xt,{duration:75}))}function Pe(){return pe.current==0}function le(){return he}var Ze=ty();let kt;var Ut=gu(Ze);return vs(Ut,xt=>C=xt,()=>C),vs(Ze,xt=>b=xt,()=>b),td(xt=>kt=If(Ze,1,"circle svelte-d8xfg4",null,kt,xt),[()=>({displayed:st(L)})]),od(v,Ze),mu({getBody:k,setDisplayed:S,getDisplayed:o,setScale:Be,getInvisible:Pe,getScale:le})}function ry(v){return v&&v.__esModule&&Object.prototype.hasOwnProperty.call(v,"default")?v.default:v}var Iu={exports:{}};/**
2
+ \r\f \v\uFEFF`];function U_(v,g,b){var C=v==null?"":""+v;if(b){for(var k in b)if(b[k])C=C?C+" "+k:k;else if(C.length)for(var L=k.length,S=0;(S=C.indexOf(k,S))>=0;){var o=S+L;(S===0||Sf.includes(C[S-1]))&&(o===C.length||Sf.includes(C[o]))?C=(S===0?"":C.substring(0,S))+C.substring(o+1):S=o}}return C===""?null:C}function Pf(v,g=!1){var b=g?" !important;":";",C="";for(var k in v){var L=v[k];L!=null&&L!==""&&(C+=" "+k+": "+L+b)}return C}function ud(v){return v[0]!=="-"||v[1]!=="-"?v.toLowerCase():v}function $_(v,g){if(g){var b="",C,k;if(Array.isArray(g)?(C=g[0],k=g[1]):C=g,v){v=String(v).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var L=!1,S=0,o=!1,he=[];C&&he.push(...Object.keys(C).map(ud)),k&&he.push(...Object.keys(k).map(ud));var pe=0,Ce=-1;const kt=v.length;for(var Be=0;Be<kt;Be++){var Pe=v[Be];if(o?Pe==="/"&&v[Be-1]==="*"&&(o=!1):L?L===Pe&&(L=!1):Pe==="/"&&v[Be+1]==="*"?o=!0:Pe==='"'||Pe==="'"?L=Pe:Pe==="("?S++:Pe===")"&&S--,!o&&L===!1&&S===0){if(Pe===":"&&Ce===-1)Ce=Be;else if(Pe===";"||Be===kt-1){if(Ce!==-1){var le=ud(v.substring(pe,Ce).trim());if(!he.includes(le)){Pe!==";"&&Be++;var Ze=v.substring(pe,Be).trim();b+=" "+Ze+";"}}pe=Be+1,Ce=-1}}}}return C&&(b+=Pf(C)),k&&(b+=Pf(k,!0)),b=b.trim(),b===""?null:b}return v==null?null:String(v)}function If(v,g,b,C,k,L){var S=v.__className;if(S!==b||S===void 0){var o=U_(b,C,L);o==null?v.removeAttribute("class"):v.className=o,v.__className=b}else if(L&&k!==L)for(var he in L){var pe=!!L[he];(k==null||pe!==!!k[he])&&v.classList.toggle(he,pe)}return L}function hd(v,g={},b,C){for(var k in b){var L=b[k];g[k]!==L&&(b[k]==null?v.style.removeProperty(k):v.style.setProperty(k,L,C))}}function dd(v,g,b,C){var k=v.__style;if(k!==g){var L=$_(g,C);L==null?v.removeAttribute("style"):v.style.cssText=L,v.__style=g}else C&&(Array.isArray(C)?(hd(v,b==null?void 0:b[0],C[0]),hd(v,b==null?void 0:b[1],C[1],"important")):hd(v,b,C));return C}const G_=()=>performance.now(),Vn={tick:v=>requestAnimationFrame(v),now:()=>G_(),tasks:new Set};function Cf(){const v=Vn.now();Vn.tasks.forEach(g=>{g.c(v)||(Vn.tasks.delete(g),g.f())}),Vn.tasks.size!==0&&Vn.tick(Cf)}function q_(v){let g;return Vn.tasks.size===0&&Vn.tick(Cf),{promise:new Promise(b=>{Vn.tasks.add(g={c:v,f:b})}),abort(){Vn.tasks.delete(g)}}}const Ou=class Ou{constructor(g){Aa(this,Fu);Aa(this,ja,new WeakMap);Aa(this,So);Aa(this,Hl);au(this,Hl,g)}observe(g,b){var C=Ei(this,ja).get(g)||new Set;return C.add(b),Ei(this,ja).set(g,C),Ug(this,Fu,$g).call(this).observe(g,Ei(this,Hl)),()=>{var k=Ei(this,ja).get(g);k.delete(b),k.size===0&&(Ei(this,ja).delete(g),Ei(this,So).unobserve(g))}}};ja=new WeakMap,So=new WeakMap,Hl=new WeakMap,Fu=new WeakSet,$g=function(){return Ei(this,So)??au(this,So,new ResizeObserver(g=>{for(var b of g){Ou.entries.set(b.target,b);for(var C of Ei(this,ja).get(b.target)||[])C(b)}}))},Ht(Ou,"entries",new WeakMap);let pd=Ou;var H_=new pd({box:"border-box"});function Pu(v,g,b){var C=H_.observe(v,()=>b(v[g]));_u(()=>(ad(()=>b(v[g])),C))}function Ef(v,g){return v===g||(v==null?void 0:v[du])===g}function vs(v={},g,b,C){return _u(()=>{var k,L;return hf(()=>{k=L,L=[],ad(()=>{v!==b(...L)&&(g(v,...L),k&&Ef(b(...k),v)&&g(null,...k))})}),()=>{gf(()=>{L&&Ef(b(...L),v)&&g(null,...L)})}}),v}function Af(v){jr===null&&c_(),ln(()=>{const g=ad(v);if(typeof g=="function")return g})}const W_="5";typeof window<"u"&&((tm=window.__svelte??(window.__svelte={})).v??(tm.v=new Set)).add(W_);function zf(v){return Object.prototype.toString.call(v)==="[object Date]"}function X_(v){return v}function fd(v){return-.5*(Math.cos(Math.PI*v)-1)}function md(v,g){if(v===g||v!==v)return()=>v;const b=typeof v;if(b!==typeof g||Array.isArray(v)!==Array.isArray(g))throw new Error("Cannot interpolate values of different type");if(Array.isArray(v)){const C=g.map((k,L)=>md(v[L],k));return k=>C.map(L=>L(k))}if(b==="object"){if(!v||!g)throw new Error("Object cannot be null");if(zf(v)&&zf(g)){const L=v.getTime(),o=g.getTime()-L;return he=>new Date(L+he*o)}const C=Object.keys(g),k={};return C.forEach(L=>{k[L]=md(v[L],g[L])}),L=>{const S={};return C.forEach(o=>{S[o]=k[o](L)}),S}}if(b==="number"){const C=g-v;return k=>v+k*C}return()=>g}const Md=class Md{constructor(g,b={}){Aa(this,ca,Qh(void 0));Aa(this,Po,Qh(void 0));Aa(this,Wl);Aa(this,Ss,null);Ei(this,ca).v=Ei(this,Po).v=g,au(this,Wl,b)}static of(g,b){const C=new Md(g(),b);return hf(()=>{C.set(g())}),C}set(g,b){var Be;yi(Ei(this,Po),g);let{delay:C=0,duration:k=400,easing:L=X_,interpolate:S=md}={...Ei(this,Wl),...b};if(k===0)return(Be=Ei(this,Ss))==null||Be.abort(),yi(Ei(this,ca),g),Promise.resolve();const o=Vn.now()+C;let he,pe=!1,Ce=Ei(this,Ss);return au(this,Ss,q_(Pe=>{if(Pe<o)return!0;if(!pe){pe=!0;const Ze=Ei(this,ca).v;he=S(Ze,g),typeof k=="function"&&(k=k(Ze,g)),Ce==null||Ce.abort()}const le=Pe-o;return le>k?(yi(Ei(this,ca),g),!1):(yi(Ei(this,ca),he(L(le/k))),!0)})),Ei(this,Ss).promise}get current(){return st(Ei(this,ca))}get target(){return st(Ei(this,Po))}set target(g){this.set(g)}};ca=new WeakMap,Po=new WeakMap,Wl=new WeakMap,Ss=new WeakMap;let El=Md;function kf(v,g,b){const C=b*(Math.PI/180),k=v/2,L=g/2,S=Math.sqrt(k*k+L*L),o=Math.atan(L/k)*(180/Math.PI),he=o,pe=180-o,Ce=180+o,Be=360-o;switch(!0){case(he<=b&&b<=pe):return{offsetX:S*Math.cos(C)-k,offsetY:0};case(pe<=b&&b<=Ce):return{offsetX:-v,offsetY:S*Math.sin(C)-L};case(Ce<=b&&b<=Be):return{offsetX:S*Math.cos(C)-k,offsetY:-g};default:return{offsetX:0,offsetY:S*Math.sin(C)-L}}}function K_(v,g,b){const C=kf(v,g,b),k=C.offsetX,L=C.offsetY,S=g,o=v,he=kf(S,o,b),pe=S/2+he.offsetX,Ce=o/2+he.offsetY,Pe=Math.atan2(Ce,pe)/Math.PI*180-45,le=0,Ze=30,kt=k+v/2,Ut=L+g/2,xt=Math.sqrt(kt*kt+Ut*Ut),vi=Math.min(v,g)/2,mi=Math.sqrt(v*v+g*g)/2,ti=(xt-vi)/(mi-vi),Bt=le+ti*(Ze-le);return{markerOffsetX:k,markerOffsetY:L,pinAngleDeg:Pe,pinSkewDeg:Bt}}const Rf=512,gd=0,Al=18,Df=10,Lf=2,Y_=.5,Bf=270,J_=8;var Q_=sd('<div><div class="pin svelte-jal8za"></div> <div class="marker svelte-jal8za"><div class="body svelte-jal8za"></div></div></div>');function ey(v,g){fu(g,!0);let b,C,k,L,S=Ji(0),o=Ji(0);const he=()=>L;let pe=Ji(!0);function Ce(ht){yi(pe,ht,!0)}function Be(){return st(pe)}let Pe=Ji(!0);function le(ht){yi(Pe,ht,!0)}function Ze(){return st(S)==0&&st(o)==0}function kt(){return st(Pe)==!1}let Ut=0,xt=new El(Ut,{easing:fd});ln(()=>{vi(xt.current)}),ln(()=>{st(pe)==!1&&(Ut=0,xt.set(0,{duration:0}),vi(0))}),ln(()=>{st(Pe)==!0&&Ut!=0&&(Ut=0,xt.set(0,{duration:75})),st(Pe)==!1&&Ut!=1&&(Ut=1,xt.set(1,{duration:150}))});function vi(ht){!b||!C||!k||window.requestAnimationFrame(()=>{b.style.opacity=`${ht}`,C.style.scale=`${ht}`,k.style.scale=`${ht}`})}let mi=Bf,ti=!1,Bt=new El(Bf,{easing:fd,interpolate:$t});ln(()=>{Qi(Bt.current)}),ln(()=>{st(pe)==!1&&Bt.set(mi,{duration:0})}),ln(()=>{st(Pe)==!0&&Bt.set(mi,{duration:75})});function $t(ht,ft){if(Math.abs(ft-ht)<180)return zi=>ht+zi*(ft-ht);{const zi=360-Math.abs(ft-ht),Mi=ht<ft?-1:1;return Nr=>(360+ht+Nr*zi*Mi)%360}}function Qi(ht){if(!b||!C||!k)return;const ft=K_(st(S),st(o),ht);window.requestAnimationFrame(()=>{const zi=Math.round(ft.markerOffsetX),Mi=Math.round(ft.markerOffsetY);C.style.transform=`translate(${zi}px, ${Mi}px)`;const Nr=ft.pinAngleDeg,tr=ft.pinSkewDeg;k.style.transform=`rotate(${Nr}deg) skew(${tr}deg, ${tr}deg)`;const Mn=-1-2*(zi/st(S)),ir=-1-2*(Mi/st(o));b.style.filter=`drop-shadow(0px 0px 4px rgba(0,0,0,0.5)) drop-shadow(${Mn}px ${ir}px 2px rgba(0,0,0,0.5))`})}function Gt(ht){if(st(pe)==!1&&(mi=ht,Qi(mi)),ht!=mi){let ft=Math.abs(ht-Bt.current),zi=ft<180?ft:360-ft,Mi=Math.log(zi)*75;mi=ht,Bt.set(ht,{duration:ti?Mi:0})}ti=!0}ln(()=>{st(S)&&st(o)&&(k.style.width=`${Math.min(st(S),st(o))/4}px`,k.style.height=`${Math.min(st(S),st(o))/4}px`)}),ln(()=>{st(S)&&st(o)&&Qi(mi)});const qn=()=>st(S),Hn=()=>st(o);var cr=Q_();let ur;var er=gu(cr);vs(er,ht=>k=ht,()=>k);var ri=f_(er,2);dd(ri,"",{},{padding:J_+"px"});var un=gu(ri);let $i;return vs(un,ht=>L=ht,()=>L),vs(ri,ht=>C=ht,()=>C),vs(cr,ht=>b=ht,()=>b),td(ht=>{ur=If(cr,1,"anchor svelte-jal8za",null,ur,ht),$i=dd(un,"",$i,{width:`${g.width}px`,height:`${g.height}px`})},[()=>({displayed:st(pe)})]),Pu(ri,"clientWidth",ht=>yi(S,ht)),Pu(ri,"clientHeight",ht=>yi(o,ht)),od(v,cr),mu({getBody:he,setDisplayed:Ce,getDisplayed:Be,setCollapsed:le,getCollapsed:Ze,getExpanded:kt,setAngle:Gt,getWidth:qn,getHeight:Hn})}var ty=sd('<div><div class="body svelte-d8xfg4"></div></div>');function iy(v,g){fu(g,!0);let b,C;function k(){return C}let L=Ji(!1);function S(xt){yi(L,xt,!0)}function o(){return st(L)}let he=0,pe=new El(0,{easing:fd});ln(()=>{Ce(pe.current)}),ln(()=>{st(L)==!1&&(he=0,pe.set(0,{duration:0}),Ce(0))});function Ce(xt){b&&window.requestAnimationFrame(()=>{b.style.scale=xt.toString(),b.style.filter=`brightness(${.3+.7*xt})`,C.style.opacity=xt.toString()})}function Be(xt){xt!=he&&(he=xt,pe.set(xt,{duration:75}))}function Pe(){return pe.current==0}function le(){return he}var Ze=ty();let kt;var Ut=gu(Ze);return vs(Ut,xt=>C=xt,()=>C),vs(Ze,xt=>b=xt,()=>b),td(xt=>kt=If(Ze,1,"circle svelte-d8xfg4",null,kt,xt),[()=>({displayed:st(L)})]),od(v,Ze),mu({getBody:k,setDisplayed:S,getDisplayed:o,setScale:Be,getInvisible:Pe,getScale:le})}function ry(v){return v&&v.__esModule&&Object.prototype.hasOwnProperty.call(v,"default")?v.default:v}var Iu={exports:{}};/**
3
3
  * MapLibre GL JS
4
4
  * @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v5.5.0/LICENSE.txt
5
5
  */var ny=Iu.exports,Ff;function ay(){return Ff||(Ff=1,function(v,g){(function(b,C){v.exports=C()})(ny,function(){var b={},C={};function k(S,o,he){if(C[S]=he,S==="index"){var pe="var sharedModule = {}; ("+C.shared+")(sharedModule); ("+C.worker+")(sharedModule);",Ce={};return C.shared(Ce),C.index(b,Ce),typeof window<"u"&&b.setWorkerUrl(window.URL.createObjectURL(new Blob([pe],{type:"text/javascript"}))),b}}k("shared",["exports"],function(S){function o(n,t,r,a){return new(r||(r=Promise))(function(c,d){function p(w){try{y(a.next(w))}catch(M){d(M)}}function m(w){try{y(a.throw(w))}catch(M){d(M)}}function y(w){var M;w.done?c(w.value):(M=w.value,M instanceof r?M:new r(function(I){I(M)})).then(p,m)}y((a=a.apply(n,t||[])).next())})}function he(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var pe,Ce;function Be(){if(Ce)return pe;function n(t,r){this.x=t,this.y=r}return Ce=1,pe=n,n.prototype={clone:function(){return new n(this.x,this.y)},add:function(t){return this.clone()._add(t)},sub:function(t){return this.clone()._sub(t)},multByPoint:function(t){return this.clone()._multByPoint(t)},divByPoint:function(t){return this.clone()._divByPoint(t)},mult:function(t){return this.clone()._mult(t)},div:function(t){return this.clone()._div(t)},rotate:function(t){return this.clone()._rotate(t)},rotateAround:function(t,r){return this.clone()._rotateAround(t,r)},matMult:function(t){return this.clone()._matMult(t)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(t){return this.x===t.x&&this.y===t.y},dist:function(t){return Math.sqrt(this.distSqr(t))},distSqr:function(t){var r=t.x-this.x,a=t.y-this.y;return r*r+a*a},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(t){return Math.atan2(this.y-t.y,this.x-t.x)},angleWith:function(t){return this.angleWithSep(t.x,t.y)},angleWithSep:function(t,r){return Math.atan2(this.x*r-this.y*t,this.x*t+this.y*r)},_matMult:function(t){var r=t[2]*this.x+t[3]*this.y;return this.x=t[0]*this.x+t[1]*this.y,this.y=r,this},_add:function(t){return this.x+=t.x,this.y+=t.y,this},_sub:function(t){return this.x-=t.x,this.y-=t.y,this},_mult:function(t){return this.x*=t,this.y*=t,this},_div:function(t){return this.x/=t,this.y/=t,this},_multByPoint:function(t){return this.x*=t.x,this.y*=t.y,this},_divByPoint:function(t){return this.x/=t.x,this.y/=t.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var t=this.y;return this.y=this.x,this.x=-t,this},_rotate:function(t){var r=Math.cos(t),a=Math.sin(t),c=a*this.x+r*this.y;return this.x=r*this.x-a*this.y,this.y=c,this},_rotateAround:function(t,r){var a=Math.cos(t),c=Math.sin(t),d=r.y+c*(this.x-r.x)+a*(this.y-r.y);return this.x=r.x+a*(this.x-r.x)-c*(this.y-r.y),this.y=d,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},n.convert=function(t){return t instanceof n?t:Array.isArray(t)?new n(t[0],t[1]):t},pe}typeof SuppressedError=="function"&&SuppressedError;var Pe,le,Ze=he(Be()),kt=function(){if(le)return Pe;function n(t,r,a,c){this.cx=3*t,this.bx=3*(a-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*r,this.by=3*(c-r)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=r,this.p2x=a,this.p2y=c}return le=1,Pe=n,n.prototype={sampleCurveX:function(t){return((this.ax*t+this.bx)*t+this.cx)*t},sampleCurveY:function(t){return((this.ay*t+this.by)*t+this.cy)*t},sampleCurveDerivativeX:function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},solveCurveX:function(t,r){if(r===void 0&&(r=1e-6),t<0)return 0;if(t>1)return 1;for(var a=t,c=0;c<8;c++){var d=this.sampleCurveX(a)-t;if(Math.abs(d)<r)return a;var p=this.sampleCurveDerivativeX(a);if(Math.abs(p)<1e-6)break;a-=d/p}var m=0,y=1;for(a=t,c=0;c<20&&(d=this.sampleCurveX(a),!(Math.abs(d-t)<r));c++)t>d?m=a:y=a,a=.5*(y-m)+m;return a},solve:function(t,r){return this.sampleCurveY(this.solveCurveX(t,r))}},Pe}(),Ut=he(kt);let xt,vi;function mi(){return xt==null&&(xt=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),xt}function ti(){if(vi==null&&(vi=!1,mi())){const t=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(t){for(let a=0;a<5*5;a++){const c=4*a;t.fillStyle=`rgb(${c},${c+1},${c+2})`,t.fillRect(a%5,Math.floor(a/5),1,1)}const r=t.getImageData(0,0,5,5).data;for(let a=0;a<5*5*4;a++)if(a%4!=3&&r[a]!==a){vi=!0;break}}}return vi||!1}var Bt=1e-6,$t=typeof Float32Array<"u"?Float32Array:Array;function Qi(){var n=new $t(9);return $t!=Float32Array&&(n[1]=0,n[2]=0,n[3]=0,n[5]=0,n[6]=0,n[7]=0),n[0]=1,n[4]=1,n[8]=1,n}function Gt(n){return n[0]=1,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=1,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=1,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,n}function qn(){var n=new $t(3);return $t!=Float32Array&&(n[0]=0,n[1]=0,n[2]=0),n}function Hn(n){return Math.hypot(n[0],n[1],n[2])}function cr(n,t,r){var a=new $t(3);return a[0]=n,a[1]=t,a[2]=r,a}Math.hypot||(Math.hypot=function(){for(var n=0,t=arguments.length;t--;)n+=arguments[t]*arguments[t];return Math.sqrt(n)});var ur,er=Hn;function ri(n,t,r){var a=t[0],c=t[1],d=t[2],p=t[3];return n[0]=r[0]*a+r[4]*c+r[8]*d+r[12]*p,n[1]=r[1]*a+r[5]*c+r[9]*d+r[13]*p,n[2]=r[2]*a+r[6]*c+r[10]*d+r[14]*p,n[3]=r[3]*a+r[7]*c+r[11]*d+r[15]*p,n}function un(){var n=new $t(4);return $t!=Float32Array&&(n[0]=0,n[1]=0,n[2]=0),n[3]=1,n}function $i(){var n=new $t(2);return $t!=Float32Array&&(n[0]=0,n[1]=0),n}function ht(n,t){var r=new $t(2);return r[0]=n,r[1]=t,r}qn(),ur=new $t(4),$t!=Float32Array&&(ur[0]=0,ur[1]=0,ur[2]=0,ur[3]=0),qn(),cr(1,0,0),cr(0,1,0),un(),un(),Qi(),$i();const ft=8192;function zi(n,t,r){return t*(ft/(n.tileSize*Math.pow(2,r-n.tileID.overscaledZ)))}function Mi(n,t){return(n%t+t)%t}function Nr(n,t,r){return n*(1-r)+t*r}function tr(n){if(n<=0)return 0;if(n>=1)return 1;const t=n*n,r=t*n;return 4*(n<.5?r:3*(n-t)+r-.75)}function Mn(n,t,r,a){const c=new Ut(n,t,r,a);return d=>c.solve(d)}const ir=Mn(.25,.1,.25,1);function Wt(n,t,r){return Math.min(r,Math.max(t,n))}function vr(n,t,r){const a=r-t,c=((n-t)%a+a)%a+t;return c===t?r:c}function rr(n,...t){for(const r of t)for(const a in r)n[a]=r[a];return n}let Sn=1;function hn(n,t,r){const a={};for(const c in n)a[c]=t.call(this,n[c],c,n);return a}function ua(n,t,r){const a={};for(const c in n)t.call(this,n[c],c,n)&&(a[c]=n[c]);return a}function hr(n){return Array.isArray(n)?n.map(hr):typeof n=="object"&&n?hn(n,hr):n}const dr={};function Gi(n){dr[n]||(typeof console<"u"&&console.warn(n),dr[n]=!0)}function Nt(n,t,r){return(r.y-n.y)*(t.x-n.x)>(t.y-n.y)*(r.x-n.x)}function Zr(n){return typeof WorkerGlobalScope<"u"&&n!==void 0&&n instanceof WorkerGlobalScope}let dn=null;function br(n){return typeof ImageBitmap<"u"&&n instanceof ImageBitmap}const Pn="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function In(n,t,r,a,c){return o(this,void 0,void 0,function*(){if(typeof VideoFrame>"u")throw new Error("VideoFrame not supported");const d=new VideoFrame(n,{timestamp:0});try{const p=d==null?void 0:d.format;if(!p||!p.startsWith("BGR")&&!p.startsWith("RGB"))throw new Error(`Unrecognized format ${p}`);const m=p.startsWith("BGR"),y=new Uint8ClampedArray(a*c*4);if(yield d.copyTo(y,function(w,M,I,z,D){const B=4*Math.max(1,0),j=(Math.max(0,I)-I)*z*4+B,U=4*z,X=Math.max(0,M),ne=Math.max(0,I);return{rect:{x:X,y:ne,width:Math.min(w.width,M+z)-X,height:Math.min(w.height,I+D)-ne},layout:[{offset:j,stride:U}]}}(n,t,r,a,c)),m)for(let w=0;w<y.length;w+=4){const M=y[w];y[w]=y[w+2],y[w+2]=M}return y}finally{d.close()}})}let Ie,Ye;function Ue(n,t,r,a){return n.addEventListener(t,r,a),{unsubscribe:()=>{n.removeEventListener(t,r,a)}}}function mt(n){return n*Math.PI/180}function Ft(n){return n/Math.PI*180}const Jr={touchstart:!0,touchmove:!0,touchmoveWindow:!0,touchend:!0,touchcancel:!0},gi={dblclick:!0,click:!0,mouseover:!0,mouseout:!0,mousedown:!0,mousemove:!0,mousemoveWindow:!0,mouseup:!0,mouseupWindow:!0,contextmenu:!0,wheel:!0},Ar="AbortError";function zr(){return new Error(Ar)}const Cn={MAX_PARALLEL_IMAGE_REQUESTS:16,MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:8,MAX_TILE_CACHE_ZOOM_LEVELS:5,REGISTERED_PROTOCOLS:{},WORKER_URL:""};function Wn(n){return Cn.REGISTERED_PROTOCOLS[n.substring(0,n.indexOf("://"))]}const Na="global-dispatcher";class Vr extends Error{constructor(t,r,a,c){super(`AJAXError: ${r} (${t}): ${a}`),this.status=t,this.statusText=r,this.url=a,this.body=c}}const wr=()=>Zr(self)?self.worker&&self.worker.referrer:(window.location.protocol==="blob:"?window.parent:window).location.href,pn=function(n,t){if(/:\/\//.test(n.url)&&!/^https?:|^file:/.test(n.url)){const a=Wn(n.url);if(a)return a(n,t);if(Zr(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:n,targetMapId:Na},t)}if(!(/^file:/.test(r=n.url)||/^file:/.test(wr())&&!/^\w+:/.test(r))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return function(a,c){return o(this,void 0,void 0,function*(){const d=new Request(a.url,{method:a.method||"GET",body:a.body,credentials:a.credentials,headers:a.headers,cache:a.cache,referrer:wr(),signal:c.signal});let p,m;a.type!=="json"||d.headers.has("Accept")||d.headers.set("Accept","application/json");try{p=yield fetch(d)}catch(w){throw new Vr(0,w.message,a.url,new Blob)}if(!p.ok){const w=yield p.blob();throw new Vr(p.status,p.statusText,a.url,w)}m=a.type==="arrayBuffer"||a.type==="image"?p.arrayBuffer():a.type==="json"?p.json():p.text();const y=yield m;if(c.signal.aborted)throw zr();return{data:y,cacheControl:p.headers.get("Cache-Control"),expires:p.headers.get("Expires")}})}(n,t);if(Zr(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:n,mustQueue:!0,targetMapId:Na},t)}var r;return function(a,c){return new Promise((d,p)=>{var m;const y=new XMLHttpRequest;y.open(a.method||"GET",a.url,!0),a.type!=="arrayBuffer"&&a.type!=="image"||(y.responseType="arraybuffer");for(const w in a.headers)y.setRequestHeader(w,a.headers[w]);a.type==="json"&&(y.responseType="text",!((m=a.headers)===null||m===void 0)&&m.Accept||y.setRequestHeader("Accept","application/json")),y.withCredentials=a.credentials==="include",y.onerror=()=>{p(new Error(y.statusText))},y.onload=()=>{if(!c.signal.aborted)if((y.status>=200&&y.status<300||y.status===0)&&y.response!==null){let w=y.response;if(a.type==="json")try{w=JSON.parse(y.response)}catch(M){return void p(M)}d({data:w,cacheControl:y.getResponseHeader("Cache-Control"),expires:y.getResponseHeader("Expires")})}else{const w=new Blob([y.response],{type:y.getResponseHeader("Content-Type")});p(new Vr(y.status,y.statusText,a.url,w))}},c.signal.addEventListener("abort",()=>{y.abort(),p(zr())}),y.send(a.body)})}(n,t)};function ce(n){if(!n||n.indexOf("://")<=0||n.indexOf("data:image/")===0||n.indexOf("blob:")===0)return!0;const t=new URL(n),r=window.location;return t.protocol===r.protocol&&t.host===r.host}function N(n,t,r){r[n]&&r[n].indexOf(t)!==-1||(r[n]=r[n]||[],r[n].push(t))}function Z(n,t,r){if(r&&r[n]){const a=r[n].indexOf(t);a!==-1&&r[n].splice(a,1)}}class G{constructor(t,r={}){rr(this,r),this.type=t}}class J extends G{constructor(t,r={}){super("error",rr({error:t},r))}}class ae{on(t,r){return this._listeners=this._listeners||{},N(t,r,this._listeners),{unsubscribe:()=>{this.off(t,r)}}}off(t,r){return Z(t,r,this._listeners),Z(t,r,this._oneTimeListeners),this}once(t,r){return r?(this._oneTimeListeners=this._oneTimeListeners||{},N(t,r,this._oneTimeListeners),this):new Promise(a=>this.once(t,a))}fire(t,r){typeof t=="string"&&(t=new G(t,r||{}));const a=t.type;if(this.listens(a)){t.target=this;const c=this._listeners&&this._listeners[a]?this._listeners[a].slice():[];for(const m of c)m.call(this,t);const d=this._oneTimeListeners&&this._oneTimeListeners[a]?this._oneTimeListeners[a].slice():[];for(const m of d)Z(a,m,this._oneTimeListeners),m.call(this,t);const p=this._eventedParent;p&&(rr(t,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),p.fire(t))}else t instanceof J&&console.error(t.error);return this}listens(t){return this._listeners&&this._listeners[t]&&this._listeners[t].length>0||this._oneTimeListeners&&this._oneTimeListeners[t]&&this._oneTimeListeners[t].length>0||this._eventedParent&&this._eventedParent.listens(t)}setEventedParent(t,r){return this._eventedParent=t,this._eventedParentData=r,this}}var $={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},centerAltitude:{type:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},roll:{type:"number",default:0,units:"degrees"},state:{type:"state",default:{}},light:{type:"light"},sky:{type:"sky"},projection:{type:"projection"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{},custom:{}},default:"mapbox"},redFactor:{type:"number",default:1},blueFactor:{type:"number",default:1},greenFactor:{type:"number",default:1},baseShift:{type:"number",default:0},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{required:!0,type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image",{"!":"icon-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"padding",default:[2],units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},"viewport-glyph":{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-variable-anchor-offset":{type:"variableAnchorOffsetCollection",requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field",{"!":"text-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},sky:{"sky-color":{type:"color","property-type":"data-constant",default:"#88C6FC",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-ground-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-fog-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"sky-horizon-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"atmosphere-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},projection:{type:{type:"projectionDefinition",default:"mercator","property-type":"data-constant",transition:!1,expression:{interpolated:!0,parameters:["zoom"]}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"numberArray",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-altitude":{type:"numberArray",default:45,minimum:0,maximum:90,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"colorArray",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"colorArray",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-method":{type:"enum",values:{standard:{},basic:{},combined:{},igor:{},multidirectional:{}},default:"standard",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}};const ge=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function oe(n,t){const r={};for(const a in n)a!=="ref"&&(r[a]=n[a]);return ge.forEach(a=>{a in t&&(r[a]=t[a])}),r}function de(n,t){if(Array.isArray(n)){if(!Array.isArray(t)||n.length!==t.length)return!1;for(let r=0;r<n.length;r++)if(!de(n[r],t[r]))return!1;return!0}if(typeof n=="object"&&n!==null&&t!==null){if(typeof t!="object"||Object.keys(n).length!==Object.keys(t).length)return!1;for(const r in n)if(!de(n[r],t[r]))return!1;return!0}return n===t}function _e(n,t){n.push(t)}function ue(n,t,r){_e(r,{command:"addSource",args:[n,t[n]]})}function Ae(n,t,r){_e(t,{command:"removeSource",args:[n]}),r[n]=!0}function Ne(n,t,r,a){Ae(n,r,a),ue(n,t,r)}function Ve(n,t,r){let a;for(a in n[r])if(Object.prototype.hasOwnProperty.call(n[r],a)&&a!=="data"&&!de(n[r][a],t[r][a]))return!1;for(a in t[r])if(Object.prototype.hasOwnProperty.call(t[r],a)&&a!=="data"&&!de(n[r][a],t[r][a]))return!1;return!0}function Qe(n,t,r,a,c,d){n=n||{},t=t||{};for(const p in n)Object.prototype.hasOwnProperty.call(n,p)&&(de(n[p],t[p])||r.push({command:d,args:[a,p,t[p],c]}));for(const p in t)Object.prototype.hasOwnProperty.call(t,p)&&!Object.prototype.hasOwnProperty.call(n,p)&&(de(n[p],t[p])||r.push({command:d,args:[a,p,t[p],c]}))}function dt(n){return n.id}function at(n,t){return n[t.id]=t,n}class we{constructor(t,r,a,c){this.message=(t?`${t}: `:"")+a,c&&(this.identifier=c),r!=null&&r.__line__&&(this.line=r.__line__)}}function Ot(n,...t){for(const r of t)for(const a in r)n[a]=r[a];return n}class St extends Error{constructor(t,r){super(r),this.message=r,this.key=t}}class zt{constructor(t,r=[]){this.parent=t,this.bindings={};for(const[a,c]of r)this.bindings[a]=c}concat(t){return new zt(this,t)}get(t){if(this.bindings[t])return this.bindings[t];if(this.parent)return this.parent.get(t);throw new Error(`${t} not found in scope.`)}has(t){return!!this.bindings[t]||!!this.parent&&this.parent.has(t)}}const nt={kind:"null"},Ee={kind:"number"},it={kind:"string"},pt={kind:"boolean"},ci={kind:"color"},ui={kind:"projectionDefinition"},Tr={kind:"object"},gt={kind:"value"},Za={kind:"collator"},Ps={kind:"formatted"},ha={kind:"padding"},Is={kind:"colorArray"},En={kind:"numberArray"},da={kind:"resolvedImage"},bi={kind:"variableAnchorOffsetCollection"};function kr(n,t){return{kind:"array",itemType:n,N:t}}function ii(n){if(n.kind==="array"){const t=ii(n.itemType);return typeof n.N=="number"?`array<${t}, ${n.N}>`:n.itemType.kind==="value"?"array":`array<${t}>`}return n.kind}const Cs=[nt,Ee,it,pt,ci,ui,Ps,Tr,kr(gt),ha,En,Is,da,bi];function Va(n,t){if(t.kind==="error")return null;if(n.kind==="array"){if(t.kind==="array"&&(t.N===0&&t.itemType.kind==="value"||!Va(n.itemType,t.itemType))&&(typeof n.N!="number"||n.N===t.N))return null}else{if(n.kind===t.kind)return null;if(n.kind==="value"){for(const r of Cs)if(!Va(r,t))return null}}return`Expected ${ii(n)} but found ${ii(t)} instead.`}function Xl(n,t){return t.some(r=>r.kind===n.kind)}function pa(n,t){return t.some(r=>r==="null"?n===null:r==="array"?Array.isArray(n):r==="object"?n&&!Array.isArray(n)&&typeof n=="object":r===typeof n)}function An(n,t){return n.kind==="array"&&t.kind==="array"?n.itemType.kind===t.itemType.kind&&typeof n.N=="number":n.kind===t.kind}const ju=.96422,Kl=.82521,Nu=4/29,Ua=6/29,Zu=3*Ua*Ua,Sd=Ua*Ua*Ua,Pd=Math.PI/180,Id=180/Math.PI;function Vu(n){return(n%=360)<0&&(n+=360),n}function Yl([n,t,r,a]){let c,d;const p=Jl((.2225045*(n=fa(n))+.7168786*(t=fa(t))+.0606169*(r=fa(r)))/1);n===t&&t===r?c=d=p:(c=Jl((.4360747*n+.3850649*t+.1430804*r)/ju),d=Jl((.0139322*n+.0971045*t+.7141733*r)/Kl));const m=116*p-16;return[m<0?0:m,500*(c-p),200*(p-d),a]}function fa(n){return n<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function Jl(n){return n>Sd?Math.pow(n,1/3):n/Zu+Nu}function Uu([n,t,r,a]){let c=(n+16)/116,d=isNaN(t)?c:c+t/500,p=isNaN(r)?c:c-r/200;return c=1*Ql(c),d=ju*Ql(d),p=Kl*Ql(p),[ma(3.1338561*d-1.6168667*c-.4906146*p),ma(-.9787684*d+1.9161415*c+.033454*p),ma(.0719453*d-.2289914*c+1.4052427*p),a]}function ma(n){return(n=n<=.00304?12.92*n:1.055*Math.pow(n,1/2.4)-.055)<0?0:n>1?1:n}function Ql(n){return n>Ua?n*n*n:Zu*(n-Nu)}const Cd=Object.hasOwn||function(n,t){return Object.prototype.hasOwnProperty.call(n,t)};function Es(n,t){return Cd(n,t)?n[t]:void 0}function As(n){return parseInt(n.padEnd(2,n),16)/255}function ec(n,t){return pr(t?n/100:n,0,1)}function pr(n,t,r){return Math.min(Math.max(t,n),r)}function Et(n){return!n.some(Number.isNaN)}const $a={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};function fr(n,t,r){return n+r*(t-n)}function ga(n,t,r){return n.map((a,c)=>fr(a,t[c],r))}class Pt{constructor(t,r,a,c=1,d=!0){this.r=t,this.g=r,this.b=a,this.a=c,d||(this.r*=c,this.g*=c,this.b*=c,c||this.overwriteGetter("rgb",[t,r,a,c]))}static parse(t){if(t instanceof Pt)return t;if(typeof t!="string")return;const r=function(a){if((a=a.toLowerCase().trim())==="transparent")return[0,0,0,0];const c=Es($a,a);if(c){const[p,m,y]=c;return[p/255,m/255,y/255,1]}if(a.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(a)){const p=a.length<6?1:2;let m=1;return[As(a.slice(m,m+=p)),As(a.slice(m,m+=p)),As(a.slice(m,m+=p)),As(a.slice(m,m+p)||"ff")]}if(a.startsWith("rgb")){const p=a.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(p){const[m,y,w,M,I,z,D,B,j,U,X,ne]=p,Y=[M||" ",D||" ",U].join("");if(Y===" "||Y===" /"||Y===",,"||Y===",,,"){const R=[w,z,j].join(""),V=R==="%%%"?100:R===""?255:0;if(V){const Q=[pr(+y/V,0,1),pr(+I/V,0,1),pr(+B/V,0,1),X?ec(+X,ne):1];if(Et(Q))return Q}}return}}const d=a.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(d){const[p,m,y,w,M,I,z,D,B]=d,j=[y||" ",M||" ",z].join("");if(j===" "||j===" /"||j===",,"||j===",,,"){const U=[+m,pr(+w,0,100),pr(+I,0,100),D?ec(+D,B):1];if(Et(U))return function([X,ne,Y,R]){function V(Q){const me=(Q+X/30)%12,ze=ne*Math.min(Y,1-Y);return Y-ze*Math.max(-1,Math.min(me-3,9-me,1))}return X=Vu(X),ne/=100,Y/=100,[V(0),V(8),V(4),R]}(U)}}}(t);return r?new Pt(...r,!1):void 0}get rgb(){const{r:t,g:r,b:a,a:c}=this,d=c||1/0;return this.overwriteGetter("rgb",[t/d,r/d,a/d,c])}get hcl(){return this.overwriteGetter("hcl",function(t){const[r,a,c,d]=Yl(t),p=Math.sqrt(a*a+c*c);return[Math.round(1e4*p)?Vu(Math.atan2(c,a)*Id):NaN,p,r,d]}(this.rgb))}get lab(){return this.overwriteGetter("lab",Yl(this.rgb))}overwriteGetter(t,r){return Object.defineProperty(this,t,{value:r}),r}toString(){const[t,r,a,c]=this.rgb;return`rgba(${[t,r,a].map(d=>Math.round(255*d)).join(",")},${c})`}static interpolate(t,r,a,c="rgb"){switch(c){case"rgb":{const[d,p,m,y]=ga(t.rgb,r.rgb,a);return new Pt(d,p,m,y,!1)}case"hcl":{const[d,p,m,y]=t.hcl,[w,M,I,z]=r.hcl;let D,B;if(isNaN(d)||isNaN(w))isNaN(d)?isNaN(w)?D=NaN:(D=w,m!==1&&m!==0||(B=M)):(D=d,I!==1&&I!==0||(B=p));else{let Y=w-d;w>d&&Y>180?Y-=360:w<d&&d-w>180&&(Y+=360),D=d+a*Y}const[j,U,X,ne]=function([Y,R,V,Q]){return Y=isNaN(Y)?0:Y*Pd,Uu([V,Math.cos(Y)*R,Math.sin(Y)*R,Q])}([D,B??fr(p,M,a),fr(m,I,a),fr(y,z,a)]);return new Pt(j,U,X,ne,!1)}case"lab":{const[d,p,m,y]=Uu(ga(t.lab,r.lab,a));return new Pt(d,p,m,y,!1)}}}}Pt.black=new Pt(0,0,0,1),Pt.white=new Pt(1,1,1,1),Pt.transparent=new Pt(0,0,0,0),Pt.red=new Pt(1,0,0,1);class zs{constructor(t,r,a){this.sensitivity=t?r?"variant":"case":r?"accent":"base",this.locale=a,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(t,r){return this.collator.compare(t,r)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}const ks=["bottom","center","top"];class Ga{constructor(t,r,a,c,d,p){this.text=t,this.image=r,this.scale=a,this.fontStack=c,this.textColor=d,this.verticalAlign=p}}class Mr{constructor(t){this.sections=t}static fromString(t){return new Mr([new Ga(t,null,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(t=>t.text.length!==0||t.image&&t.image.name.length!==0)}static factory(t){return t instanceof Mr?t:Mr.fromString(t)}toString(){return this.sections.length===0?"":this.sections.map(t=>t.text).join("")}}class qi{constructor(t){this.values=t.slice()}static parse(t){if(t instanceof qi)return t;if(typeof t=="number")return new qi([t,t,t,t]);if(Array.isArray(t)&&!(t.length<1||t.length>4)){for(const r of t)if(typeof r!="number")return;switch(t.length){case 1:t=[t[0],t[0],t[0],t[0]];break;case 2:t=[t[0],t[1],t[0],t[1]];break;case 3:t=[t[0],t[1],t[2],t[1]]}return new qi(t)}}toString(){return JSON.stringify(this.values)}static interpolate(t,r,a){return new qi(ga(t.values,r.values,a))}}class wi{constructor(t){this.values=t.slice()}static parse(t){if(t instanceof wi)return t;if(typeof t=="number")return new wi([t]);if(Array.isArray(t)){for(const r of t)if(typeof r!="number")return;return new wi(t)}}toString(){return JSON.stringify(this.values)}static interpolate(t,r,a){return new wi(ga(t.values,r.values,a))}}class Hi{constructor(t){this.values=t.slice()}static parse(t){if(t instanceof Hi)return t;if(typeof t=="string"){const a=Pt.parse(t);return a?new Hi([a]):void 0}if(!Array.isArray(t))return;const r=[];for(const a of t){if(typeof a!="string")return;const c=Pt.parse(a);if(!c)return;r.push(c)}return new Hi(r)}toString(){return JSON.stringify(this.values)}static interpolate(t,r,a,c="rgb"){const d=[];if(t.values.length!=r.values.length)throw new Error(`colorArray: Arrays have mismatched length (${t.values.length} vs. ${r.values.length}), cannot interpolate.`);for(let p=0;p<t.values.length;p++)d.push(Pt.interpolate(t.values[p],r.values[p],a,c));return new Hi(d)}}class Xt extends Error{constructor(t){super(t),this.name="RuntimeError"}toJSON(){return this.message}}const qa=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class mr{constructor(t){this.values=t.slice()}static parse(t){if(t instanceof mr)return t;if(Array.isArray(t)&&!(t.length<1)&&t.length%2==0){for(let r=0;r<t.length;r+=2){const a=t[r],c=t[r+1];if(typeof a!="string"||!qa.has(a)||!Array.isArray(c)||c.length!==2||typeof c[0]!="number"||typeof c[1]!="number")return}return new mr(t)}}toString(){return JSON.stringify(this.values)}static interpolate(t,r,a){const c=t.values,d=r.values;if(c.length!==d.length)throw new Xt(`Cannot interpolate values of different length. from: ${t.toString()}, to: ${r.toString()}`);const p=[];for(let m=0;m<c.length;m+=2){if(c[m]!==d[m])throw new Xt(`Cannot interpolate values containing mismatched anchors. from[${m}]: ${c[m]}, to[${m}]: ${d[m]}`);p.push(c[m]);const[y,w]=c[m+1],[M,I]=d[m+1];p.push([fr(y,M,a),fr(w,I,a)])}return new mr(p)}}class Rr{constructor(t){this.name=t.name,this.available=t.available}toString(){return this.name}static fromString(t){return t?new Rr({name:t,available:!1}):null}}class Sr{constructor(t,r,a){this.from=t,this.to=r,this.transition=a}static interpolate(t,r,a){return new Sr(t,r,a)}static parse(t){return t instanceof Sr?t:Array.isArray(t)&&t.length===3&&typeof t[0]=="string"&&typeof t[1]=="string"&&typeof t[2]=="number"?new Sr(t[0],t[1],t[2]):typeof t=="object"&&typeof t.from=="string"&&typeof t.to=="string"&&typeof t.transition=="number"?new Sr(t.from,t.to,t.transition):typeof t=="string"?new Sr(t,t,1):void 0}}function Rs(n,t,r,a){return typeof n=="number"&&n>=0&&n<=255&&typeof t=="number"&&t>=0&&t<=255&&typeof r=="number"&&r>=0&&r<=255?a===void 0||typeof a=="number"&&a>=0&&a<=1?null:`Invalid rgba value [${[n,t,r,a].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof a=="number"?[n,t,r,a]:[n,t,r]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function Zt(n){if(n===null||typeof n=="string"||typeof n=="boolean"||typeof n=="number"||n instanceof Sr||n instanceof Pt||n instanceof zs||n instanceof Mr||n instanceof qi||n instanceof wi||n instanceof Hi||n instanceof mr||n instanceof Rr)return!0;if(Array.isArray(n)){for(const t of n)if(!Zt(t))return!1;return!0}if(typeof n=="object"){for(const t in n)if(!Zt(n[t]))return!1;return!0}return!1}function hi(n){if(n===null)return nt;if(typeof n=="string")return it;if(typeof n=="boolean")return pt;if(typeof n=="number")return Ee;if(n instanceof Pt)return ci;if(n instanceof Sr)return ui;if(n instanceof zs)return Za;if(n instanceof Mr)return Ps;if(n instanceof qi)return ha;if(n instanceof wi)return En;if(n instanceof Hi)return Is;if(n instanceof mr)return bi;if(n instanceof Rr)return da;if(Array.isArray(n)){const t=n.length;let r;for(const a of n){const c=hi(a);if(r){if(r===c)continue;r=gt;break}r=c}return kr(r||gt,t)}return Tr}function It(n){const t=typeof n;return n===null?"":t==="string"||t==="number"||t==="boolean"?String(n):n instanceof Pt||n instanceof Sr||n instanceof Mr||n instanceof qi||n instanceof wi||n instanceof Hi||n instanceof mr||n instanceof Rr?n.toString():JSON.stringify(n)}class lt{constructor(t,r){this.type=t,this.value=r}static parse(t,r){if(t.length!==2)return r.error(`'literal' expression requires exactly one argument, but found ${t.length-1} instead.`);if(!Zt(t[1]))return r.error("invalid value");const a=t[1];let c=hi(a);const d=r.expectedType;return c.kind!=="array"||c.N!==0||!d||d.kind!=="array"||typeof d.N=="number"&&d.N!==0||(c=d),new lt(c,a)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}const Ha={string:it,number:Ee,boolean:pt,object:Tr};class _t{constructor(t,r){this.type=t,this.args=r}static parse(t,r){if(t.length<2)return r.error("Expected at least one argument.");let a,c=1;const d=t[0];if(d==="array"){let m,y;if(t.length>2){const w=t[1];if(typeof w!="string"||!(w in Ha)||w==="object")return r.error('The item type argument of "array" must be one of string, number, boolean',1);m=Ha[w],c++}else m=gt;if(t.length>3){if(t[2]!==null&&(typeof t[2]!="number"||t[2]<0||t[2]!==Math.floor(t[2])))return r.error('The length argument to "array" must be a positive integer literal',2);y=t[2],c++}a=kr(m,y)}else{if(!Ha[d])throw new Error(`Types doesn't contain name = ${d}`);a=Ha[d]}const p=[];for(;c<t.length;c++){const m=r.parse(t[c],c,gt);if(!m)return null;p.push(m)}return new _t(a,p)}evaluate(t){for(let r=0;r<this.args.length;r++){const a=this.args[r].evaluate(t);if(!Va(this.type,hi(a)))return a;if(r===this.args.length-1)throw new Xt(`Expected value to be of type ${ii(this.type)}, but found ${ii(hi(a))} instead.`)}throw new Error}eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every(t=>t.outputDefined())}}const Io={"to-boolean":pt,"to-color":ci,"to-number":Ee,"to-string":it};class nr{constructor(t,r){this.type=t,this.args=r}static parse(t,r){if(t.length<2)return r.error("Expected at least one argument.");const a=t[0];if(!Io[a])throw new Error(`Can't parse ${a} as it is not part of the known types`);if((a==="to-boolean"||a==="to-string")&&t.length!==2)return r.error("Expected one argument.");const c=Io[a],d=[];for(let p=1;p<t.length;p++){const m=r.parse(t[p],p,gt);if(!m)return null;d.push(m)}return new nr(c,d)}evaluate(t){switch(this.type.kind){case"boolean":return!!this.args[0].evaluate(t);case"color":{let r,a;for(const c of this.args){if(r=c.evaluate(t),a=null,r instanceof Pt)return r;if(typeof r=="string"){const d=t.parseColor(r);if(d)return d}else if(Array.isArray(r)&&(a=r.length<3||r.length>4?`Invalid rgba value ${JSON.stringify(r)}: expected an array containing either three or four numeric values.`:Rs(r[0],r[1],r[2],r[3]),!a))return new Pt(r[0]/255,r[1]/255,r[2]/255,r[3])}throw new Xt(a||`Could not parse color from value '${typeof r=="string"?r:JSON.stringify(r)}'`)}case"padding":{let r;for(const a of this.args){r=a.evaluate(t);const c=qi.parse(r);if(c)return c}throw new Xt(`Could not parse padding from value '${typeof r=="string"?r:JSON.stringify(r)}'`)}case"numberArray":{let r;for(const a of this.args){r=a.evaluate(t);const c=wi.parse(r);if(c)return c}throw new Xt(`Could not parse numberArray from value '${typeof r=="string"?r:JSON.stringify(r)}'`)}case"colorArray":{let r;for(const a of this.args){r=a.evaluate(t);const c=Hi.parse(r);if(c)return c}throw new Xt(`Could not parse colorArray from value '${typeof r=="string"?r:JSON.stringify(r)}'`)}case"variableAnchorOffsetCollection":{let r;for(const a of this.args){r=a.evaluate(t);const c=mr.parse(r);if(c)return c}throw new Xt(`Could not parse variableAnchorOffsetCollection from value '${typeof r=="string"?r:JSON.stringify(r)}'`)}case"number":{let r=null;for(const a of this.args){if(r=a.evaluate(t),r===null)return 0;const c=Number(r);if(!isNaN(c))return c}throw new Xt(`Could not convert ${JSON.stringify(r)} to number.`)}case"formatted":return Mr.fromString(It(this.args[0].evaluate(t)));case"resolvedImage":return Rr.fromString(It(this.args[0].evaluate(t)));case"projectionDefinition":return this.args[0].evaluate(t);default:return It(this.args[0].evaluate(t))}}eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every(t=>t.outputDefined())}}const tc=["Unknown","Point","LineString","Polygon"];class ic{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache=new Map,this.availableImages=null,this.canonical=null}id(){return this.feature&&"id"in this.feature?this.feature.id:null}geometryType(){return this.feature?typeof this.feature.type=="number"?tc[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}parseColor(t){let r=this._parseColorCache.get(t);return r||(r=Pt.parse(t),this._parseColorCache.set(t,r)),r}}class Ds{constructor(t,r,a=[],c,d=new zt,p=[]){this.registry=t,this.path=a,this.key=a.map(m=>`[${m}]`).join(""),this.scope=d,this.errors=p,this.expectedType=c,this._isConstant=r}parse(t,r,a,c,d={}){return r?this.concat(r,a,c)._parse(t,d):this._parse(t,d)}_parse(t,r){function a(c,d,p){return p==="assert"?new _t(d,[c]):p==="coerce"?new nr(d,[c]):c}if(t!==null&&typeof t!="string"&&typeof t!="boolean"&&typeof t!="number"||(t=["literal",t]),Array.isArray(t)){if(t.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const c=t[0];if(typeof c!="string")return this.error(`Expression name must be a string, but found ${typeof c} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const d=this.registry[c];if(d){let p=d.parse(t,this);if(!p)return null;if(this.expectedType){const m=this.expectedType,y=p.type;if(m.kind!=="string"&&m.kind!=="number"&&m.kind!=="boolean"&&m.kind!=="object"&&m.kind!=="array"||y.kind!=="value"){if(m.kind==="projectionDefinition"&&["string","array"].includes(y.kind)||["color","formatted","resolvedImage"].includes(m.kind)&&["value","string"].includes(y.kind)||["padding","numberArray"].includes(m.kind)&&["value","number","array"].includes(y.kind)||m.kind==="colorArray"&&["value","string","array"].includes(y.kind)||m.kind==="variableAnchorOffsetCollection"&&["value","array"].includes(y.kind))p=a(p,m,r.typeAnnotation||"coerce");else if(this.checkSubtype(m,y))return null}else p=a(p,m,r.typeAnnotation||"assert")}if(!(p instanceof lt)&&p.type.kind!=="resolvedImage"&&this._isConstant(p)){const m=new ic;try{p=new lt(p.type,p.evaluate(m))}catch(y){return this.error(y.message),null}}return p}return this.error(`Unknown expression "${c}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(t===void 0?"'undefined' value invalid. Use null instead.":typeof t=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof t} instead.`)}concat(t,r,a){const c=typeof t=="number"?this.path.concat(t):this.path,d=a?this.scope.concat(a):this.scope;return new Ds(this.registry,this._isConstant,c,r||null,d,this.errors)}error(t,...r){const a=`${this.key}${r.map(c=>`[${c}]`).join("")}`;this.errors.push(new St(a,t))}checkSubtype(t,r){const a=Va(t,r);return a&&this.error(a),a}}class Wa{constructor(t,r){this.type=r.type,this.bindings=[].concat(t),this.result=r}evaluate(t){return this.result.evaluate(t)}eachChild(t){for(const r of this.bindings)t(r[1]);t(this.result)}static parse(t,r){if(t.length<4)return r.error(`Expected at least 3 arguments, but found ${t.length-1} instead.`);const a=[];for(let d=1;d<t.length-1;d+=2){const p=t[d];if(typeof p!="string")return r.error(`Expected string, but found ${typeof p} instead.`,d);if(/[^a-zA-Z0-9_]/.test(p))return r.error("Variable names must contain only alphanumeric characters or '_'.",d);const m=r.parse(t[d+1],d+1);if(!m)return null;a.push([p,m])}const c=r.parse(t[t.length-1],t.length-1,r.expectedType,a);return c?new Wa(a,c):null}outputDefined(){return this.result.outputDefined()}}class Ls{constructor(t,r){this.type=r.type,this.name=t,this.boundExpression=r}static parse(t,r){if(t.length!==2||typeof t[1]!="string")return r.error("'var' expression requires exactly one string literal argument.");const a=t[1];return r.scope.has(a)?new Ls(a,r.scope.get(a)):r.error(`Unknown variable "${a}". Make sure "${a}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(t){return this.boundExpression.evaluate(t)}eachChild(){}outputDefined(){return!1}}class rc{constructor(t,r,a){this.type=t,this.index=r,this.input=a}static parse(t,r){if(t.length!==3)return r.error(`Expected 2 arguments, but found ${t.length-1} instead.`);const a=r.parse(t[1],1,Ee),c=r.parse(t[2],2,kr(r.expectedType||gt));return a&&c?new rc(c.type.itemType,a,c):null}evaluate(t){const r=this.index.evaluate(t),a=this.input.evaluate(t);if(r<0)throw new Xt(`Array index out of bounds: ${r} < 0.`);if(r>=a.length)throw new Xt(`Array index out of bounds: ${r} > ${a.length-1}.`);if(r!==Math.floor(r))throw new Xt(`Array index must be an integer, but found ${r} instead.`);return a[r]}eachChild(t){t(this.index),t(this.input)}outputDefined(){return!1}}class Co{constructor(t,r){this.type=pt,this.needle=t,this.haystack=r}static parse(t,r){if(t.length!==3)return r.error(`Expected 2 arguments, but found ${t.length-1} instead.`);const a=r.parse(t[1],1,gt),c=r.parse(t[2],2,gt);return a&&c?Xl(a.type,[pt,it,Ee,nt,gt])?new Co(a,c):r.error(`Expected first argument to be of type boolean, string, number or null, but found ${ii(a.type)} instead`):null}evaluate(t){const r=this.needle.evaluate(t),a=this.haystack.evaluate(t);if(!a)return!1;if(!pa(r,["boolean","string","number","null"]))throw new Xt(`Expected first argument to be of type boolean, string, number or null, but found ${ii(hi(r))} instead.`);if(!pa(a,["string","array"]))throw new Xt(`Expected second argument to be of type array or string, but found ${ii(hi(a))} instead.`);return a.indexOf(r)>=0}eachChild(t){t(this.needle),t(this.haystack)}outputDefined(){return!0}}class Bs{constructor(t,r,a){this.type=Ee,this.needle=t,this.haystack=r,this.fromIndex=a}static parse(t,r){if(t.length<=2||t.length>=5)return r.error(`Expected 3 or 4 arguments, but found ${t.length-1} instead.`);const a=r.parse(t[1],1,gt),c=r.parse(t[2],2,gt);if(!a||!c)return null;if(!Xl(a.type,[pt,it,Ee,nt,gt]))return r.error(`Expected first argument to be of type boolean, string, number or null, but found ${ii(a.type)} instead`);if(t.length===4){const d=r.parse(t[3],3,Ee);return d?new Bs(a,c,d):null}return new Bs(a,c)}evaluate(t){const r=this.needle.evaluate(t),a=this.haystack.evaluate(t);if(!pa(r,["boolean","string","number","null"]))throw new Xt(`Expected first argument to be of type boolean, string, number or null, but found ${ii(hi(r))} instead.`);let c;if(this.fromIndex&&(c=this.fromIndex.evaluate(t)),pa(a,["string"])){const d=a.indexOf(r,c);return d===-1?-1:[...a.slice(0,d)].length}if(pa(a,["array"]))return a.indexOf(r,c);throw new Xt(`Expected second argument to be of type array or string, but found ${ii(hi(a))} instead.`)}eachChild(t){t(this.needle),t(this.haystack),this.fromIndex&&t(this.fromIndex)}outputDefined(){return!1}}class _a{constructor(t,r,a,c,d,p){this.inputType=t,this.type=r,this.input=a,this.cases=c,this.outputs=d,this.otherwise=p}static parse(t,r){if(t.length<5)return r.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if(t.length%2!=1)return r.error("Expected an even number of arguments.");let a,c;r.expectedType&&r.expectedType.kind!=="value"&&(c=r.expectedType);const d={},p=[];for(let w=2;w<t.length-1;w+=2){let M=t[w];const I=t[w+1];Array.isArray(M)||(M=[M]);const z=r.concat(w);if(M.length===0)return z.error("Expected at least one branch label.");for(const B of M){if(typeof B!="number"&&typeof B!="string")return z.error("Branch labels must be numbers or strings.");if(typeof B=="number"&&Math.abs(B)>Number.MAX_SAFE_INTEGER)return z.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof B=="number"&&Math.floor(B)!==B)return z.error("Numeric branch labels must be integer values.");if(a){if(z.checkSubtype(a,hi(B)))return null}else a=hi(B);if(d[String(B)]!==void 0)return z.error("Branch labels must be unique.");d[String(B)]=p.length}const D=r.parse(I,w,c);if(!D)return null;c=c||D.type,p.push(D)}const m=r.parse(t[1],1,gt);if(!m)return null;const y=r.parse(t[t.length-1],t.length-1,c);return y?m.type.kind!=="value"&&r.concat(1).checkSubtype(a,m.type)?null:new _a(a,c,m,d,p,y):null}evaluate(t){const r=this.input.evaluate(t);return(hi(r)===this.inputType&&this.outputs[this.cases[r]]||this.otherwise).evaluate(t)}eachChild(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)}outputDefined(){return this.outputs.every(t=>t.outputDefined())&&this.otherwise.outputDefined()}}class Fi{constructor(t,r,a){this.type=t,this.branches=r,this.otherwise=a}static parse(t,r){if(t.length<4)return r.error(`Expected at least 3 arguments, but found only ${t.length-1}.`);if(t.length%2!=0)return r.error("Expected an odd number of arguments.");let a;r.expectedType&&r.expectedType.kind!=="value"&&(a=r.expectedType);const c=[];for(let p=1;p<t.length-1;p+=2){const m=r.parse(t[p],p,pt);if(!m)return null;const y=r.parse(t[p+1],p+1,a);if(!y)return null;c.push([m,y]),a=a||y.type}const d=r.parse(t[t.length-1],t.length-1,a);if(!d)return null;if(!a)throw new Error("Can't infer output type");return new Fi(a,c,d)}evaluate(t){for(const[r,a]of this.branches)if(r.evaluate(t))return a.evaluate(t);return this.otherwise.evaluate(t)}eachChild(t){for(const[r,a]of this.branches)t(r),t(a);t(this.otherwise)}outputDefined(){return this.branches.every(([t,r])=>r.outputDefined())&&this.otherwise.outputDefined()}}class ya{constructor(t,r,a,c){this.type=t,this.input=r,this.beginIndex=a,this.endIndex=c}static parse(t,r){if(t.length<=2||t.length>=5)return r.error(`Expected 3 or 4 arguments, but found ${t.length-1} instead.`);const a=r.parse(t[1],1,gt),c=r.parse(t[2],2,Ee);if(!a||!c)return null;if(!Xl(a.type,[kr(gt),it,gt]))return r.error(`Expected first argument to be of type array or string, but found ${ii(a.type)} instead`);if(t.length===4){const d=r.parse(t[3],3,Ee);return d?new ya(a.type,a,c,d):null}return new ya(a.type,a,c)}evaluate(t){const r=this.input.evaluate(t),a=this.beginIndex.evaluate(t);let c;if(this.endIndex&&(c=this.endIndex.evaluate(t)),pa(r,["string"]))return[...r].slice(a,c).join("");if(pa(r,["array"]))return r.slice(a,c);throw new Xt(`Expected first argument to be of type array or string, but found ${ii(hi(r))} instead.`)}eachChild(t){t(this.input),t(this.beginIndex),this.endIndex&&t(this.endIndex)}outputDefined(){return!1}}function Fs(n,t){const r=n.length-1;let a,c,d=0,p=r,m=0;for(;d<=p;)if(m=Math.floor((d+p)/2),a=n[m],c=n[m+1],a<=t){if(m===r||t<c)return m;d=m+1}else{if(!(a>t))throw new Xt("Input is not a number.");p=m-1}return 0}class Xn{constructor(t,r,a){this.type=t,this.input=r,this.labels=[],this.outputs=[];for(const[c,d]of a)this.labels.push(c),this.outputs.push(d)}static parse(t,r){if(t.length-1<4)return r.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if((t.length-1)%2!=0)return r.error("Expected an even number of arguments.");const a=r.parse(t[1],1,Ee);if(!a)return null;const c=[];let d=null;r.expectedType&&r.expectedType.kind!=="value"&&(d=r.expectedType);for(let p=1;p<t.length;p+=2){const m=p===1?-1/0:t[p],y=t[p+1],w=p,M=p+1;if(typeof m!="number")return r.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',w);if(c.length&&c[c.length-1][0]>=m)return r.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',w);const I=r.parse(y,M,d);if(!I)return null;d=d||I.type,c.push([m,I])}return new Xn(d,a,c)}evaluate(t){const r=this.labels,a=this.outputs;if(r.length===1)return a[0].evaluate(t);const c=this.input.evaluate(t);if(c<=r[0])return a[0].evaluate(t);const d=r.length;return c>=r[d-1]?a[d-1].evaluate(t):a[Fs(r,c)].evaluate(t)}eachChild(t){t(this.input);for(const r of this.outputs)t(r)}outputDefined(){return this.outputs.every(t=>t.outputDefined())}}function Oi(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Eo,Ao,$u=function(){if(Ao)return Eo;function n(t,r,a,c){this.cx=3*t,this.bx=3*(a-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*r,this.by=3*(c-r)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=r,this.p2x=a,this.p2y=c}return Ao=1,Eo=n,n.prototype={sampleCurveX:function(t){return((this.ax*t+this.bx)*t+this.cx)*t},sampleCurveY:function(t){return((this.ay*t+this.by)*t+this.cy)*t},sampleCurveDerivativeX:function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},solveCurveX:function(t,r){if(r===void 0&&(r=1e-6),t<0)return 0;if(t>1)return 1;for(var a=t,c=0;c<8;c++){var d=this.sampleCurveX(a)-t;if(Math.abs(d)<r)return a;var p=this.sampleCurveDerivativeX(a);if(Math.abs(p)<1e-6)break;a-=d/p}var m=0,y=1;for(a=t,c=0;c<20&&(d=this.sampleCurveX(a),!(Math.abs(d-t)<r));c++)t>d?m=a:y=a,a=.5*(y-m)+m;return a},solve:function(t,r){return this.sampleCurveY(this.solveCurveX(t,r))}},Eo}(),Ed=Oi($u);class ar{constructor(t,r,a,c,d){this.type=t,this.operator=r,this.interpolation=a,this.input=c,this.labels=[],this.outputs=[];for(const[p,m]of d)this.labels.push(p),this.outputs.push(m)}static interpolationFactor(t,r,a,c){let d=0;if(t.name==="exponential")d=Os(r,t.base,a,c);else if(t.name==="linear")d=Os(r,1,a,c);else if(t.name==="cubic-bezier"){const p=t.controlPoints;d=new Ed(p[0],p[1],p[2],p[3]).solve(Os(r,1,a,c))}return d}static parse(t,r){let[a,c,d,...p]=t;if(!Array.isArray(c)||c.length===0)return r.error("Expected an interpolation type expression.",1);if(c[0]==="linear")c={name:"linear"};else if(c[0]==="exponential"){const w=c[1];if(typeof w!="number")return r.error("Exponential interpolation requires a numeric base.",1,1);c={name:"exponential",base:w}}else{if(c[0]!=="cubic-bezier")return r.error(`Unknown interpolation type ${String(c[0])}`,1,0);{const w=c.slice(1);if(w.length!==4||w.some(M=>typeof M!="number"||M<0||M>1))return r.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);c={name:"cubic-bezier",controlPoints:w}}}if(t.length-1<4)return r.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if((t.length-1)%2!=0)return r.error("Expected an even number of arguments.");if(d=r.parse(d,2,Ee),!d)return null;const m=[];let y=null;a!=="interpolate-hcl"&&a!=="interpolate-lab"||r.expectedType==Is?r.expectedType&&r.expectedType.kind!=="value"&&(y=r.expectedType):y=ci;for(let w=0;w<p.length;w+=2){const M=p[w],I=p[w+1],z=w+3,D=w+4;if(typeof M!="number")return r.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',z);if(m.length&&m[m.length-1][0]>=M)return r.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',z);const B=r.parse(I,D,y);if(!B)return null;y=y||B.type,m.push([M,B])}return An(y,Ee)||An(y,ui)||An(y,ci)||An(y,ha)||An(y,En)||An(y,Is)||An(y,bi)||An(y,kr(Ee))?new ar(y,a,c,d,m):r.error(`Type ${ii(y)} is not interpolatable.`)}evaluate(t){const r=this.labels,a=this.outputs;if(r.length===1)return a[0].evaluate(t);const c=this.input.evaluate(t);if(c<=r[0])return a[0].evaluate(t);const d=r.length;if(c>=r[d-1])return a[d-1].evaluate(t);const p=Fs(r,c),m=ar.interpolationFactor(this.interpolation,c,r[p],r[p+1]),y=a[p].evaluate(t),w=a[p+1].evaluate(t);switch(this.operator){case"interpolate":switch(this.type.kind){case"number":return fr(y,w,m);case"color":return Pt.interpolate(y,w,m);case"padding":return qi.interpolate(y,w,m);case"colorArray":return Hi.interpolate(y,w,m);case"numberArray":return wi.interpolate(y,w,m);case"variableAnchorOffsetCollection":return mr.interpolate(y,w,m);case"array":return ga(y,w,m);case"projectionDefinition":return Sr.interpolate(y,w,m)}case"interpolate-hcl":switch(this.type.kind){case"color":return Pt.interpolate(y,w,m,"hcl");case"colorArray":return Hi.interpolate(y,w,m,"hcl")}case"interpolate-lab":switch(this.type.kind){case"color":return Pt.interpolate(y,w,m,"lab");case"colorArray":return Hi.interpolate(y,w,m,"lab")}}}eachChild(t){t(this.input);for(const r of this.outputs)t(r)}outputDefined(){return this.outputs.every(t=>t.outputDefined())}}function Os(n,t,r,a){const c=a-r,d=n-r;return c===0?0:t===1?d/c:(Math.pow(t,d)-1)/(Math.pow(t,c)-1)}const fn={color:Pt.interpolate,number:fr,padding:qi.interpolate,numberArray:wi.interpolate,colorArray:Hi.interpolate,variableAnchorOffsetCollection:mr.interpolate,array:ga};class xa{constructor(t,r){this.type=t,this.args=r}static parse(t,r){if(t.length<2)return r.error("Expected at least one argument.");let a=null;const c=r.expectedType;c&&c.kind!=="value"&&(a=c);const d=[];for(const m of t.slice(1)){const y=r.parse(m,1+d.length,a,void 0,{typeAnnotation:"omit"});if(!y)return null;a=a||y.type,d.push(y)}if(!a)throw new Error("No output type");const p=c&&d.some(m=>Va(c,m.type));return new xa(p?gt:a,d)}evaluate(t){let r,a=null,c=0;for(const d of this.args)if(c++,a=d.evaluate(t),a&&a instanceof Rr&&!a.available&&(r||(r=a.name),a=null,c===this.args.length&&(a=r)),a!==null)break;return a}eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every(t=>t.outputDefined())}}function js(n,t){return n==="=="||n==="!="?t.kind==="boolean"||t.kind==="string"||t.kind==="number"||t.kind==="null"||t.kind==="value":t.kind==="string"||t.kind==="number"||t.kind==="value"}function Ur(n,t,r,a){return a.compare(t,r)===0}function va(n,t,r){const a=n!=="=="&&n!=="!=";return class Gg{constructor(d,p,m){this.type=pt,this.lhs=d,this.rhs=p,this.collator=m,this.hasUntypedArgument=d.type.kind==="value"||p.type.kind==="value"}static parse(d,p){if(d.length!==3&&d.length!==4)return p.error("Expected two or three arguments.");const m=d[0];let y=p.parse(d[1],1,gt);if(!y)return null;if(!js(m,y.type))return p.concat(1).error(`"${m}" comparisons are not supported for type '${ii(y.type)}'.`);let w=p.parse(d[2],2,gt);if(!w)return null;if(!js(m,w.type))return p.concat(2).error(`"${m}" comparisons are not supported for type '${ii(w.type)}'.`);if(y.type.kind!==w.type.kind&&y.type.kind!=="value"&&w.type.kind!=="value")return p.error(`Cannot compare types '${ii(y.type)}' and '${ii(w.type)}'.`);a&&(y.type.kind==="value"&&w.type.kind!=="value"?y=new _t(w.type,[y]):y.type.kind!=="value"&&w.type.kind==="value"&&(w=new _t(y.type,[w])));let M=null;if(d.length===4){if(y.type.kind!=="string"&&w.type.kind!=="string"&&y.type.kind!=="value"&&w.type.kind!=="value")return p.error("Cannot use collator to compare non-string types.");if(M=p.parse(d[3],3,Za),!M)return null}return new Gg(y,w,M)}evaluate(d){const p=this.lhs.evaluate(d),m=this.rhs.evaluate(d);if(a&&this.hasUntypedArgument){const y=hi(p),w=hi(m);if(y.kind!==w.kind||y.kind!=="string"&&y.kind!=="number")throw new Xt(`Expected arguments for "${n}" to be (string, string) or (number, number), but found (${y.kind}, ${w.kind}) instead.`)}if(this.collator&&!a&&this.hasUntypedArgument){const y=hi(p),w=hi(m);if(y.kind!=="string"||w.kind!=="string")return t(d,p,m)}return this.collator?r(d,p,m,this.collator.evaluate(d)):t(d,p,m)}eachChild(d){d(this.lhs),d(this.rhs),this.collator&&d(this.collator)}outputDefined(){return!0}}}const zo=va("==",function(n,t,r){return t===r},Ur),Ad=va("!=",function(n,t,r){return t!==r},function(n,t,r,a){return!Ur(0,t,r,a)}),nc=va("<",function(n,t,r){return t<r},function(n,t,r,a){return a.compare(t,r)<0}),zd=va(">",function(n,t,r){return t>r},function(n,t,r,a){return a.compare(t,r)>0}),kd=va("<=",function(n,t,r){return t<=r},function(n,t,r,a){return a.compare(t,r)<=0}),Rd=va(">=",function(n,t,r){return t>=r},function(n,t,r,a){return a.compare(t,r)>=0});class ko{constructor(t,r,a){this.type=Za,this.locale=a,this.caseSensitive=t,this.diacriticSensitive=r}static parse(t,r){if(t.length!==2)return r.error("Expected one argument.");const a=t[1];if(typeof a!="object"||Array.isArray(a))return r.error("Collator options argument must be an object.");const c=r.parse(a["case-sensitive"]!==void 0&&a["case-sensitive"],1,pt);if(!c)return null;const d=r.parse(a["diacritic-sensitive"]!==void 0&&a["diacritic-sensitive"],1,pt);if(!d)return null;let p=null;return a.locale&&(p=r.parse(a.locale,1,it),!p)?null:new ko(c,d,p)}evaluate(t){return new zs(this.caseSensitive.evaluate(t),this.diacriticSensitive.evaluate(t),this.locale?this.locale.evaluate(t):null)}eachChild(t){t(this.caseSensitive),t(this.diacriticSensitive),this.locale&&t(this.locale)}outputDefined(){return!1}}class Xa{constructor(t,r,a,c,d){this.type=it,this.number=t,this.locale=r,this.currency=a,this.minFractionDigits=c,this.maxFractionDigits=d}static parse(t,r){if(t.length!==3)return r.error("Expected two arguments.");const a=r.parse(t[1],1,Ee);if(!a)return null;const c=t[2];if(typeof c!="object"||Array.isArray(c))return r.error("NumberFormat options argument must be an object.");let d=null;if(c.locale&&(d=r.parse(c.locale,1,it),!d))return null;let p=null;if(c.currency&&(p=r.parse(c.currency,1,it),!p))return null;let m=null;if(c["min-fraction-digits"]&&(m=r.parse(c["min-fraction-digits"],1,Ee),!m))return null;let y=null;return c["max-fraction-digits"]&&(y=r.parse(c["max-fraction-digits"],1,Ee),!y)?null:new Xa(a,d,p,m,y)}evaluate(t){return new Intl.NumberFormat(this.locale?this.locale.evaluate(t):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(t):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(t):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(t):void 0}).format(this.number.evaluate(t))}eachChild(t){t(this.number),this.locale&&t(this.locale),this.currency&&t(this.currency),this.minFractionDigits&&t(this.minFractionDigits),this.maxFractionDigits&&t(this.maxFractionDigits)}outputDefined(){return!1}}class Ro{constructor(t){this.type=Ps,this.sections=t}static parse(t,r){if(t.length<2)return r.error("Expected at least one argument.");const a=t[1];if(!Array.isArray(a)&&typeof a=="object")return r.error("First argument must be an image or text section.");const c=[];let d=!1;for(let p=1;p<=t.length-1;++p){const m=t[p];if(d&&typeof m=="object"&&!Array.isArray(m)){d=!1;let y=null;if(m["font-scale"]&&(y=r.parse(m["font-scale"],1,Ee),!y))return null;let w=null;if(m["text-font"]&&(w=r.parse(m["text-font"],1,kr(it)),!w))return null;let M=null;if(m["text-color"]&&(M=r.parse(m["text-color"],1,ci),!M))return null;let I=null;if(m["vertical-align"]){if(typeof m["vertical-align"]=="string"&&!ks.includes(m["vertical-align"]))return r.error(`'vertical-align' must be one of: 'bottom', 'center', 'top' but found '${m["vertical-align"]}' instead.`);if(I=r.parse(m["vertical-align"],1,it),!I)return null}const z=c[c.length-1];z.scale=y,z.font=w,z.textColor=M,z.verticalAlign=I}else{const y=r.parse(t[p],1,gt);if(!y)return null;const w=y.type.kind;if(w!=="string"&&w!=="value"&&w!=="null"&&w!=="resolvedImage")return r.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");d=!0,c.push({content:y,scale:null,font:null,textColor:null,verticalAlign:null})}}return new Ro(c)}evaluate(t){return new Mr(this.sections.map(r=>{const a=r.content.evaluate(t);return hi(a)===da?new Ga("",a,null,null,null,r.verticalAlign?r.verticalAlign.evaluate(t):null):new Ga(It(a),null,r.scale?r.scale.evaluate(t):null,r.font?r.font.evaluate(t).join(","):null,r.textColor?r.textColor.evaluate(t):null,r.verticalAlign?r.verticalAlign.evaluate(t):null)}))}eachChild(t){for(const r of this.sections)t(r.content),r.scale&&t(r.scale),r.font&&t(r.font),r.textColor&&t(r.textColor),r.verticalAlign&&t(r.verticalAlign)}outputDefined(){return!1}}class Do{constructor(t){this.type=da,this.input=t}static parse(t,r){if(t.length!==2)return r.error("Expected two arguments.");const a=r.parse(t[1],1,it);return a?new Do(a):r.error("No image name provided.")}evaluate(t){const r=this.input.evaluate(t),a=Rr.fromString(r);return a&&t.availableImages&&(a.available=t.availableImages.indexOf(r)>-1),a}eachChild(t){t(this.input)}outputDefined(){return!1}}class Lo{constructor(t){this.type=Ee,this.input=t}static parse(t,r){if(t.length!==2)return r.error(`Expected 1 argument, but found ${t.length-1} instead.`);const a=r.parse(t[1],1);return a?a.type.kind!=="array"&&a.type.kind!=="string"&&a.type.kind!=="value"?r.error(`Expected argument of type string or array, but found ${ii(a.type)} instead.`):new Lo(a):null}evaluate(t){const r=this.input.evaluate(t);if(typeof r=="string")return[...r].length;if(Array.isArray(r))return r.length;throw new Xt(`Expected value to be of type string or array, but found ${ii(hi(r))} instead.`)}eachChild(t){t(this.input)}outputDefined(){return!1}}const mn=8192;function Gu(n,t){const r=(180+n[0])/360,a=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+n[1]*Math.PI/360)))/360,c=Math.pow(2,t.z);return[Math.round(r*c*mn),Math.round(a*c*mn)]}function ac(n,t){const r=Math.pow(2,t.z);return[(c=(n[0]/mn+t.x)/r,360*c-180),(a=(n[1]/mn+t.y)/r,360/Math.PI*Math.atan(Math.exp((180-360*a)*Math.PI/180))-90)];var a,c}function Ns(n,t){n[0]=Math.min(n[0],t[0]),n[1]=Math.min(n[1],t[1]),n[2]=Math.max(n[2],t[0]),n[3]=Math.max(n[3],t[1])}function Zs(n,t){return!(n[0]<=t[0]||n[2]>=t[2]||n[1]<=t[1]||n[3]>=t[3])}function Dd(n,t,r){const a=n[0]-t[0],c=n[1]-t[1],d=n[0]-r[0],p=n[1]-r[1];return a*p-d*c==0&&a*d<=0&&c*p<=0}function Bo(n,t,r,a){return(c=[a[0]-r[0],a[1]-r[1]])[0]*(d=[t[0]-n[0],t[1]-n[1]])[1]-c[1]*d[0]!=0&&!(!Xu(n,t,r,a)||!Xu(r,a,n,t));var c,d}function qu(n,t,r){for(const a of r)for(let c=0;c<a.length-1;++c)if(Bo(n,t,a[c],a[c+1]))return!0;return!1}function ba(n,t,r=!1){let a=!1;for(const m of t)for(let y=0;y<m.length-1;y++){if(Dd(n,m[y],m[y+1]))return r;(d=m[y])[1]>(c=n)[1]!=(p=m[y+1])[1]>c[1]&&c[0]<(p[0]-d[0])*(c[1]-d[1])/(p[1]-d[1])+d[0]&&(a=!a)}var c,d,p;return a}function Hu(n,t){for(const r of t)if(ba(n,r))return!0;return!1}function Wu(n,t){for(const r of n)if(!ba(r,t))return!1;for(let r=0;r<n.length-1;++r)if(qu(n[r],n[r+1],t))return!1;return!0}function Ld(n,t){for(const r of t)if(Wu(n,r))return!0;return!1}function Xu(n,t,r,a){const c=a[0]-r[0],d=a[1]-r[1],p=(n[0]-r[0])*d-c*(n[1]-r[1]),m=(t[0]-r[0])*d-c*(t[1]-r[1]);return p>0&&m<0||p<0&&m>0}function Vs(n,t,r){const a=[];for(let c=0;c<n.length;c++){const d=[];for(let p=0;p<n[c].length;p++){const m=Gu(n[c][p],r);Ns(t,m),d.push(m)}a.push(d)}return a}function Ku(n,t,r){const a=[];for(let c=0;c<n.length;c++){const d=Vs(n[c],t,r);a.push(d)}return a}function Yu(n,t,r,a){if(n[0]<r[0]||n[0]>r[2]){const c=.5*a;let d=n[0]-r[0]>c?-a:r[0]-n[0]>c?a:0;d===0&&(d=n[0]-r[2]>c?-a:r[2]-n[0]>c?a:0),n[0]+=d}Ns(t,n)}function Ju(n,t,r,a){const c=Math.pow(2,a.z)*mn,d=[a.x*mn,a.y*mn],p=[];for(const m of n)for(const y of m){const w=[y.x+d[0],y.y+d[1]];Yu(w,t,r,c),p.push(w)}return p}function sc(n,t,r,a){const c=Math.pow(2,a.z)*mn,d=[a.x*mn,a.y*mn],p=[];for(const y of n){const w=[];for(const M of y){const I=[M.x+d[0],M.y+d[1]];Ns(t,I),w.push(I)}p.push(w)}if(t[2]-t[0]<=c/2){(m=t)[0]=m[1]=1/0,m[2]=m[3]=-1/0;for(const y of p)for(const w of y)Yu(w,t,r,c)}var m;return p}class Kn{constructor(t,r){this.type=pt,this.geojson=t,this.geometries=r}static parse(t,r){if(t.length!==2)return r.error(`'within' expression requires exactly one argument, but found ${t.length-1} instead.`);if(Zt(t[1])){const a=t[1];if(a.type==="FeatureCollection"){const c=[];for(const d of a.features){const{type:p,coordinates:m}=d.geometry;p==="Polygon"&&c.push(m),p==="MultiPolygon"&&c.push(...m)}if(c.length)return new Kn(a,{type:"MultiPolygon",coordinates:c})}else if(a.type==="Feature"){const c=a.geometry.type;if(c==="Polygon"||c==="MultiPolygon")return new Kn(a,a.geometry)}else if(a.type==="Polygon"||a.type==="MultiPolygon")return new Kn(a,a)}return r.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(t){if(t.geometry()!=null&&t.canonicalID()!=null){if(t.geometryType()==="Point")return function(r,a){const c=[1/0,1/0,-1/0,-1/0],d=[1/0,1/0,-1/0,-1/0],p=r.canonicalID();if(a.type==="Polygon"){const m=Vs(a.coordinates,d,p),y=Ju(r.geometry(),c,d,p);if(!Zs(c,d))return!1;for(const w of y)if(!ba(w,m))return!1}if(a.type==="MultiPolygon"){const m=Ku(a.coordinates,d,p),y=Ju(r.geometry(),c,d,p);if(!Zs(c,d))return!1;for(const w of y)if(!Hu(w,m))return!1}return!0}(t,this.geometries);if(t.geometryType()==="LineString")return function(r,a){const c=[1/0,1/0,-1/0,-1/0],d=[1/0,1/0,-1/0,-1/0],p=r.canonicalID();if(a.type==="Polygon"){const m=Vs(a.coordinates,d,p),y=sc(r.geometry(),c,d,p);if(!Zs(c,d))return!1;for(const w of y)if(!Wu(w,m))return!1}if(a.type==="MultiPolygon"){const m=Ku(a.coordinates,d,p),y=sc(r.geometry(),c,d,p);if(!Zs(c,d))return!1;for(const w of y)if(!Ld(w,m))return!1}return!0}(t,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let Qu=class{constructor(n=[],t=(r,a)=>r<a?-1:r>a?1:0){if(this.data=n,this.length=this.data.length,this.compare=t,this.length>0)for(let r=(this.length>>1)-1;r>=0;r--)this._down(r)}push(n){this.data.push(n),this._up(this.length++)}pop(){if(this.length===0)return;const n=this.data[0],t=this.data.pop();return--this.length>0&&(this.data[0]=t,this._down(0)),n}peek(){return this.data[0]}_up(n){const{data:t,compare:r}=this,a=t[n];for(;n>0;){const c=n-1>>1,d=t[c];if(r(a,d)>=0)break;t[n]=d,n=c}t[n]=a}_down(n){const{data:t,compare:r}=this,a=this.length>>1,c=t[n];for(;n<a;){let d=1+(n<<1);const p=d+1;if(p<this.length&&r(t[p],t[d])<0&&(d=p),r(t[d],c)>=0)break;t[n]=t[d],n=d}t[n]=c}};function eh(n,t,r=0,a=n.length-1,c=th){for(;a>r;){if(a-r>600){const y=a-r+1,w=t-r+1,M=Math.log(y),I=.5*Math.exp(2*M/3),z=.5*Math.sqrt(M*I*(y-I)/y)*(w-y/2<0?-1:1);eh(n,t,Math.max(r,Math.floor(t-w*I/y+z)),Math.min(a,Math.floor(t+(y-w)*I/y+z)),c)}const d=n[t];let p=r,m=a;for(Ka(n,r,t),c(n[a],d)>0&&Ka(n,r,a);p<m;){for(Ka(n,p,m),p++,m--;c(n[p],d)<0;)p++;for(;c(n[m],d)>0;)m--}c(n[r],d)===0?Ka(n,r,m):(m++,Ka(n,m,a)),m<=t&&(r=m+1),t<=m&&(a=m-1)}}function Ka(n,t,r){const a=n[t];n[t]=n[r],n[r]=a}function th(n,t){return n<t?-1:n>t?1:0}function Fo(n,t){if(n.length<=1)return[n];const r=[];let a,c;for(const d of n){const p=Fd(d);p!==0&&(d.area=Math.abs(p),c===void 0&&(c=p<0),c===p<0?(a&&r.push(a),a=[d]):a.push(d))}if(a&&r.push(a),t>1)for(let d=0;d<r.length;d++)r[d].length<=t||(eh(r[d],t,1,r[d].length-1,Bd),r[d]=r[d].slice(0,t));return r}function Bd(n,t){return t.area-n.area}function Fd(n){let t=0;for(let r,a,c=0,d=n.length,p=d-1;c<d;p=c++)r=n[c],a=n[p],t+=(a.x-r.x)*(r.y+a.y);return t}const oc=1/298.257223563,ih=oc*(2-oc),rh=Math.PI/180;class lc{constructor(t){const r=6378.137*rh*1e3,a=Math.cos(t*rh),c=1/(1-ih*(1-a*a)),d=Math.sqrt(c);this.kx=r*d*a,this.ky=r*d*c*(1-ih)}distance(t,r){const a=this.wrap(t[0]-r[0])*this.kx,c=(t[1]-r[1])*this.ky;return Math.sqrt(a*a+c*c)}pointOnLine(t,r){let a,c,d,p,m=1/0;for(let y=0;y<t.length-1;y++){let w=t[y][0],M=t[y][1],I=this.wrap(t[y+1][0]-w)*this.kx,z=(t[y+1][1]-M)*this.ky,D=0;I===0&&z===0||(D=(this.wrap(r[0]-w)*this.kx*I+(r[1]-M)*this.ky*z)/(I*I+z*z),D>1?(w=t[y+1][0],M=t[y+1][1]):D>0&&(w+=I/this.kx*D,M+=z/this.ky*D)),I=this.wrap(r[0]-w)*this.kx,z=(r[1]-M)*this.ky;const B=I*I+z*z;B<m&&(m=B,a=w,c=M,d=y,p=D)}return{point:[a,c],index:d,t:Math.max(0,Math.min(1,p))}}wrap(t){for(;t<-180;)t+=360;for(;t>180;)t-=360;return t}}function nh(n,t){return t[0]-n[0]}function At(n){return n[1]-n[0]+1}function zn(n,t){return n[1]>=n[0]&&n[1]<t}function cc(n,t){if(n[0]>n[1])return[null,null];const r=At(n);if(t){if(r===2)return[n,null];const c=Math.floor(r/2);return[[n[0],n[0]+c],[n[0]+c,n[1]]]}if(r===1)return[n,null];const a=Math.floor(r/2)-1;return[[n[0],n[0]+a],[n[0]+a+1,n[1]]]}function uc(n,t){if(!zn(t,n.length))return[1/0,1/0,-1/0,-1/0];const r=[1/0,1/0,-1/0,-1/0];for(let a=t[0];a<=t[1];++a)Ns(r,n[a]);return r}function hc(n){const t=[1/0,1/0,-1/0,-1/0];for(const r of n)for(const a of r)Ns(t,a);return t}function ah(n){return n[0]!==-1/0&&n[1]!==-1/0&&n[2]!==1/0&&n[3]!==1/0}function dc(n,t,r){if(!ah(n)||!ah(t))return NaN;let a=0,c=0;return n[2]<t[0]&&(a=t[0]-n[2]),n[0]>t[2]&&(a=n[0]-t[2]),n[1]>t[3]&&(c=n[1]-t[3]),n[3]<t[1]&&(c=t[1]-n[3]),r.distance([0,0],[a,c])}function wa(n,t,r){const a=r.pointOnLine(t,n);return r.distance(n,a.point)}function pc(n,t,r,a,c){const d=Math.min(wa(n,[r,a],c),wa(t,[r,a],c)),p=Math.min(wa(r,[n,t],c),wa(a,[n,t],c));return Math.min(d,p)}function Od(n,t,r,a,c){if(!zn(t,n.length)||!zn(a,r.length))return 1/0;let d=1/0;for(let p=t[0];p<t[1];++p){const m=n[p],y=n[p+1];for(let w=a[0];w<a[1];++w){const M=r[w],I=r[w+1];if(Bo(m,y,M,I))return 0;d=Math.min(d,pc(m,y,M,I,c))}}return d}function jd(n,t,r,a,c){if(!zn(t,n.length)||!zn(a,r.length))return NaN;let d=1/0;for(let p=t[0];p<=t[1];++p)for(let m=a[0];m<=a[1];++m)if(d=Math.min(d,c.distance(n[p],r[m])),d===0)return d;return d}function Nd(n,t,r){if(ba(n,t,!0))return 0;let a=1/0;for(const c of t){const d=c[0],p=c[c.length-1];if(d!==p&&(a=Math.min(a,wa(n,[p,d],r)),a===0))return a;const m=r.pointOnLine(c,n);if(a=Math.min(a,r.distance(n,m.point)),a===0)return a}return a}function Zd(n,t,r,a){if(!zn(t,n.length))return NaN;for(let d=t[0];d<=t[1];++d)if(ba(n[d],r,!0))return 0;let c=1/0;for(let d=t[0];d<t[1];++d){const p=n[d],m=n[d+1];for(const y of r)for(let w=0,M=y.length,I=M-1;w<M;I=w++){const z=y[I],D=y[w];if(Bo(p,m,z,D))return 0;c=Math.min(c,pc(p,m,z,D,a))}}return c}function sh(n,t){for(const r of n)for(const a of r)if(ba(a,t,!0))return!0;return!1}function Vd(n,t,r,a=1/0){const c=hc(n),d=hc(t);if(a!==1/0&&dc(c,d,r)>=a)return a;if(Zs(c,d)){if(sh(n,t))return 0}else if(sh(t,n))return 0;let p=1/0;for(const m of n)for(let y=0,w=m.length,M=w-1;y<w;M=y++){const I=m[M],z=m[y];for(const D of t)for(let B=0,j=D.length,U=j-1;B<j;U=B++){const X=D[U],ne=D[B];if(Bo(I,z,X,ne))return 0;p=Math.min(p,pc(I,z,X,ne,r))}}return p}function oh(n,t,r,a,c,d){if(!d)return;const p=dc(uc(a,d),c,r);p<t&&n.push([p,d,[0,0]])}function Oo(n,t,r,a,c,d,p){if(!d||!p)return;const m=dc(uc(a,d),uc(c,p),r);m<t&&n.push([m,d,p])}function jo(n,t,r,a,c=1/0){let d=Math.min(a.distance(n[0],r[0][0]),c);if(d===0)return d;const p=new Qu([[0,[0,n.length-1],[0,0]]],nh),m=hc(r);for(;p.length>0;){const y=p.pop();if(y[0]>=d)continue;const w=y[1],M=t?50:100;if(At(w)<=M){if(!zn(w,n.length))return NaN;if(t){const I=Zd(n,w,r,a);if(isNaN(I)||I===0)return I;d=Math.min(d,I)}else for(let I=w[0];I<=w[1];++I){const z=Nd(n[I],r,a);if(d=Math.min(d,z),d===0)return 0}}else{const I=cc(w,t);oh(p,d,a,n,m,I[0]),oh(p,d,a,n,m,I[1])}}return d}function No(n,t,r,a,c,d=1/0){let p=Math.min(d,c.distance(n[0],r[0]));if(p===0)return p;const m=new Qu([[0,[0,n.length-1],[0,r.length-1]]],nh);for(;m.length>0;){const y=m.pop();if(y[0]>=p)continue;const w=y[1],M=y[2],I=t?50:100,z=a?50:100;if(At(w)<=I&&At(M)<=z){if(!zn(w,n.length)&&zn(M,r.length))return NaN;let D;if(t&&a)D=Od(n,w,r,M,c),p=Math.min(p,D);else if(t&&!a){const B=n.slice(w[0],w[1]+1);for(let j=M[0];j<=M[1];++j)if(D=wa(r[j],B,c),p=Math.min(p,D),p===0)return p}else if(!t&&a){const B=r.slice(M[0],M[1]+1);for(let j=w[0];j<=w[1];++j)if(D=wa(n[j],B,c),p=Math.min(p,D),p===0)return p}else D=jd(n,w,r,M,c),p=Math.min(p,D)}else{const D=cc(w,t),B=cc(M,a);Oo(m,p,c,n,r,D[0],B[0]),Oo(m,p,c,n,r,D[0],B[1]),Oo(m,p,c,n,r,D[1],B[0]),Oo(m,p,c,n,r,D[1],B[1])}}return p}function fc(n){return n.type==="MultiPolygon"?n.coordinates.map(t=>({type:"Polygon",coordinates:t})):n.type==="MultiLineString"?n.coordinates.map(t=>({type:"LineString",coordinates:t})):n.type==="MultiPoint"?n.coordinates.map(t=>({type:"Point",coordinates:t})):[n]}class Ta{constructor(t,r){this.type=Ee,this.geojson=t,this.geometries=r}static parse(t,r){if(t.length!==2)return r.error(`'distance' expression requires exactly one argument, but found ${t.length-1} instead.`);if(Zt(t[1])){const a=t[1];if(a.type==="FeatureCollection")return new Ta(a,a.features.map(c=>fc(c.geometry)).flat());if(a.type==="Feature")return new Ta(a,fc(a.geometry));if("type"in a&&"coordinates"in a)return new Ta(a,fc(a))}return r.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(t){if(t.geometry()!=null&&t.canonicalID()!=null){if(t.geometryType()==="Point")return function(r,a){const c=r.geometry(),d=c.flat().map(y=>ac([y.x,y.y],r.canonical));if(c.length===0)return NaN;const p=new lc(d[0][1]);let m=1/0;for(const y of a){switch(y.type){case"Point":m=Math.min(m,No(d,!1,[y.coordinates],!1,p,m));break;case"LineString":m=Math.min(m,No(d,!1,y.coordinates,!0,p,m));break;case"Polygon":m=Math.min(m,jo(d,!1,y.coordinates,p,m))}if(m===0)return m}return m}(t,this.geometries);if(t.geometryType()==="LineString")return function(r,a){const c=r.geometry(),d=c.flat().map(y=>ac([y.x,y.y],r.canonical));if(c.length===0)return NaN;const p=new lc(d[0][1]);let m=1/0;for(const y of a){switch(y.type){case"Point":m=Math.min(m,No(d,!0,[y.coordinates],!1,p,m));break;case"LineString":m=Math.min(m,No(d,!0,y.coordinates,!0,p,m));break;case"Polygon":m=Math.min(m,jo(d,!0,y.coordinates,p,m))}if(m===0)return m}return m}(t,this.geometries);if(t.geometryType()==="Polygon")return function(r,a){const c=r.geometry();if(c.length===0||c[0].length===0)return NaN;const d=Fo(c,0).map(y=>y.map(w=>w.map(M=>ac([M.x,M.y],r.canonical)))),p=new lc(d[0][0][0][1]);let m=1/0;for(const y of a)for(const w of d){switch(y.type){case"Point":m=Math.min(m,jo([y.coordinates],!1,w,p,m));break;case"LineString":m=Math.min(m,jo(y.coordinates,!0,w,p,m));break;case"Polygon":m=Math.min(m,Vd(w,y.coordinates,p,m))}if(m===0)return m}return m}(t,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}class Zo{constructor(t){this.type=gt,this.key=t}static parse(t,r){if(t.length!==2)return r.error(`Expected 1 argument, but found ${t.length-1} instead.`);const a=t[1];return a==null?r.error("Global state property must be defined."):typeof a!="string"?r.error(`Global state property must be string, but found ${typeof t[1]} instead.`):new Zo(a)}evaluate(t){var r;const a=(r=t.globals)===null||r===void 0?void 0:r.globalState;return a&&Object.keys(a).length!==0?Es(a,this.key):null}eachChild(){}outputDefined(){return!1}}const Ya={"==":zo,"!=":Ad,">":zd,"<":nc,">=":Rd,"<=":kd,array:_t,at:rc,boolean:_t,case:Fi,coalesce:xa,collator:ko,format:Ro,image:Do,in:Co,"index-of":Bs,interpolate:ar,"interpolate-hcl":ar,"interpolate-lab":ar,length:Lo,let:Wa,literal:lt,match:_a,number:_t,"number-format":Xa,object:_t,slice:ya,step:Xn,string:_t,"to-boolean":nr,"to-color":nr,"to-number":nr,"to-string":nr,var:Ls,within:Kn,distance:Ta,"global-state":Zo};class $r{constructor(t,r,a,c){this.name=t,this.type=r,this._evaluate=a,this.args=c}evaluate(t){return this._evaluate(t,this.args)}eachChild(t){this.args.forEach(t)}outputDefined(){return!1}static parse(t,r){const a=t[0],c=$r.definitions[a];if(!c)return r.error(`Unknown expression "${a}". If you wanted a literal array, use ["literal", [...]].`,0);const d=Array.isArray(c)?c[0]:c.type,p=Array.isArray(c)?[[c[1],c[2]]]:c.overloads,m=p.filter(([w])=>!Array.isArray(w)||w.length===t.length-1);let y=null;for(const[w,M]of m){y=new Ds(r.registry,Vo,r.path,null,r.scope);const I=[];let z=!1;for(let D=1;D<t.length;D++){const B=t[D],j=Array.isArray(w)?w[D-1]:w.type,U=y.parse(B,1+I.length,j);if(!U){z=!0;break}I.push(U)}if(!z)if(Array.isArray(w)&&w.length!==I.length)y.error(`Expected ${w.length} arguments, but found ${I.length} instead.`);else{for(let D=0;D<I.length;D++){const B=Array.isArray(w)?w[D]:w.type,j=I[D];y.concat(D+1).checkSubtype(B,j.type)}if(y.errors.length===0)return new $r(a,d,M,I)}}if(m.length===1)r.errors.push(...y.errors);else{const w=(m.length?m:p).map(([I])=>{return z=I,Array.isArray(z)?`(${z.map(ii).join(", ")})`:`(${ii(z.type)}...)`;var z}).join(" | "),M=[];for(let I=1;I<t.length;I++){const z=r.parse(t[I],1+M.length);if(!z)return null;M.push(ii(z.type))}r.error(`Expected arguments of type ${w}, but found (${M.join(", ")}) instead.`)}return null}static register(t,r){$r.definitions=r;for(const a in r)t[a]=$r}}function lh(n,[t,r,a,c]){t=t.evaluate(n),r=r.evaluate(n),a=a.evaluate(n);const d=c?c.evaluate(n):1,p=Rs(t,r,a,d);if(p)throw new Xt(p);return new Pt(t/255,r/255,a/255,d,!1)}function ch(n,t){return n in t}function mc(n,t){const r=t[n];return r===void 0?null:r}function Ma(n){return{type:n}}function Vo(n){if(n instanceof Ls)return Vo(n.boundExpression);if(n instanceof $r&&n.name==="error"||n instanceof ko||n instanceof Kn||n instanceof Ta||n instanceof Zo)return!1;const t=n instanceof nr||n instanceof _t;let r=!0;return n.eachChild(a=>{r=t?r&&Vo(a):r&&a instanceof lt}),!!r&&Uo(n)&&$o(n,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}function Uo(n){if(n instanceof $r&&(n.name==="get"&&n.args.length===1||n.name==="feature-state"||n.name==="has"&&n.args.length===1||n.name==="properties"||n.name==="geometry-type"||n.name==="id"||/^filter-/.test(n.name))||n instanceof Kn||n instanceof Ta)return!1;let t=!0;return n.eachChild(r=>{t&&!Uo(r)&&(t=!1)}),t}function Us(n){if(n instanceof $r&&n.name==="feature-state")return!1;let t=!0;return n.eachChild(r=>{t&&!Us(r)&&(t=!1)}),t}function $o(n,t){if(n instanceof $r&&t.indexOf(n.name)>=0)return!1;let r=!0;return n.eachChild(a=>{r&&!$o(a,t)&&(r=!1)}),r}function Go(n){return{result:"success",value:n}}function Ja(n){return{result:"error",value:n}}function Qa(n){return n["property-type"]==="data-driven"||n["property-type"]==="cross-faded-data-driven"}function uh(n){return!!n.expression&&n.expression.parameters.indexOf("zoom")>-1}function qo(n){return!!n.expression&&n.expression.interpolated}function bt(n){return n instanceof Number?"number":n instanceof String?"string":n instanceof Boolean?"boolean":Array.isArray(n)?"array":n===null?"null":typeof n}function Ho(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)&&hi(n)===Tr}function Wo(n){return n}function gc(n,t){const r=n.stops&&typeof n.stops[0][0]=="object",a=r||!(r||n.property!==void 0),c=n.type||(qo(t)?"exponential":"interval"),d=function(M){switch(M.type){case"color":return Pt.parse;case"padding":return qi.parse;case"numberArray":return wi.parse;case"colorArray":return Hi.parse;default:return null}}(t);if(d&&((n=Ot({},n)).stops&&(n.stops=n.stops.map(M=>[M[0],d(M[1])])),n.default=d(n.default?n.default:t.default)),n.colorSpace&&(p=n.colorSpace)!=="rgb"&&p!=="hcl"&&p!=="lab")throw new Error(`Unknown color space: "${n.colorSpace}"`);var p;const m=function(M){switch(M){case"exponential":return hh;case"interval":return $d;case"categorical":return Ud;case"identity":return Gd;default:throw new Error(`Unknown function type "${M}"`)}}(c);let y,w;if(c==="categorical"){y=Object.create(null);for(const M of n.stops)y[M[0]]=M[1];w=typeof n.stops[0][0]}if(r){const M={},I=[];for(let B=0;B<n.stops.length;B++){const j=n.stops[B],U=j[0].zoom;M[U]===void 0&&(M[U]={zoom:U,type:n.type,property:n.property,default:n.default,stops:[]},I.push(U)),M[U].stops.push([j[0].value,j[1]])}const z=[];for(const B of I)z.push([M[B].zoom,gc(M[B],t)]);const D={name:"linear"};return{kind:"composite",interpolationType:D,interpolationFactor:ar.interpolationFactor.bind(void 0,D),zoomStops:z.map(B=>B[0]),evaluate:({zoom:B},j)=>hh({stops:z,base:n.base},t,B).evaluate(B,j)}}if(a){const M=c==="exponential"?{name:"exponential",base:n.base!==void 0?n.base:1}:null;return{kind:"camera",interpolationType:M,interpolationFactor:ar.interpolationFactor.bind(void 0,M),zoomStops:n.stops.map(I=>I[0]),evaluate:({zoom:I})=>m(n,t,I,y,w)}}return{kind:"source",evaluate(M,I){const z=I&&I.properties?I.properties[n.property]:void 0;return z===void 0?$s(n.default,t.default):m(n,t,z,y,w)}}}function $s(n,t,r){return n!==void 0?n:t!==void 0?t:r!==void 0?r:void 0}function Ud(n,t,r,a,c){return $s(typeof r===c?a[r]:void 0,n.default,t.default)}function $d(n,t,r){if(bt(r)!=="number")return $s(n.default,t.default);const a=n.stops.length;if(a===1||r<=n.stops[0][0])return n.stops[0][1];if(r>=n.stops[a-1][0])return n.stops[a-1][1];const c=Fs(n.stops.map(d=>d[0]),r);return n.stops[c][1]}function hh(n,t,r){const a=n.base!==void 0?n.base:1;if(bt(r)!=="number")return $s(n.default,t.default);const c=n.stops.length;if(c===1||r<=n.stops[0][0])return n.stops[0][1];if(r>=n.stops[c-1][0])return n.stops[c-1][1];const d=Fs(n.stops.map(M=>M[0]),r),p=function(M,I,z,D){const B=D-z,j=M-z;return B===0?0:I===1?j/B:(Math.pow(I,j)-1)/(Math.pow(I,B)-1)}(r,a,n.stops[d][0],n.stops[d+1][0]),m=n.stops[d][1],y=n.stops[d+1][1],w=fn[t.type]||Wo;return typeof m.evaluate=="function"?{evaluate(...M){const I=m.evaluate.apply(void 0,M),z=y.evaluate.apply(void 0,M);if(I!==void 0&&z!==void 0)return w(I,z,p,n.colorSpace)}}:w(m,y,p,n.colorSpace)}function Gd(n,t,r){switch(t.type){case"color":r=Pt.parse(r);break;case"formatted":r=Mr.fromString(r.toString());break;case"resolvedImage":r=Rr.fromString(r.toString());break;case"padding":r=qi.parse(r);break;case"colorArray":r=Hi.parse(r);break;case"numberArray":r=wi.parse(r);break;default:bt(r)===t.type||t.type==="enum"&&t.values[r]||(r=void 0)}return $s(r,n.default,t.default)}$r.register(Ya,{error:[{kind:"error"},[it],(n,[t])=>{throw new Xt(t.evaluate(n))}],typeof:[it,[gt],(n,[t])=>ii(hi(t.evaluate(n)))],"to-rgba":[kr(Ee,4),[ci],(n,[t])=>{const[r,a,c,d]=t.evaluate(n).rgb;return[255*r,255*a,255*c,d]}],rgb:[ci,[Ee,Ee,Ee],lh],rgba:[ci,[Ee,Ee,Ee,Ee],lh],has:{type:pt,overloads:[[[it],(n,[t])=>ch(t.evaluate(n),n.properties())],[[it,Tr],(n,[t,r])=>ch(t.evaluate(n),r.evaluate(n))]]},get:{type:gt,overloads:[[[it],(n,[t])=>mc(t.evaluate(n),n.properties())],[[it,Tr],(n,[t,r])=>mc(t.evaluate(n),r.evaluate(n))]]},"feature-state":[gt,[it],(n,[t])=>mc(t.evaluate(n),n.featureState||{})],properties:[Tr,[],n=>n.properties()],"geometry-type":[it,[],n=>n.geometryType()],id:[gt,[],n=>n.id()],zoom:[Ee,[],n=>n.globals.zoom],"heatmap-density":[Ee,[],n=>n.globals.heatmapDensity||0],"line-progress":[Ee,[],n=>n.globals.lineProgress||0],accumulated:[gt,[],n=>n.globals.accumulated===void 0?null:n.globals.accumulated],"+":[Ee,Ma(Ee),(n,t)=>{let r=0;for(const a of t)r+=a.evaluate(n);return r}],"*":[Ee,Ma(Ee),(n,t)=>{let r=1;for(const a of t)r*=a.evaluate(n);return r}],"-":{type:Ee,overloads:[[[Ee,Ee],(n,[t,r])=>t.evaluate(n)-r.evaluate(n)],[[Ee],(n,[t])=>-t.evaluate(n)]]},"/":[Ee,[Ee,Ee],(n,[t,r])=>t.evaluate(n)/r.evaluate(n)],"%":[Ee,[Ee,Ee],(n,[t,r])=>t.evaluate(n)%r.evaluate(n)],ln2:[Ee,[],()=>Math.LN2],pi:[Ee,[],()=>Math.PI],e:[Ee,[],()=>Math.E],"^":[Ee,[Ee,Ee],(n,[t,r])=>Math.pow(t.evaluate(n),r.evaluate(n))],sqrt:[Ee,[Ee],(n,[t])=>Math.sqrt(t.evaluate(n))],log10:[Ee,[Ee],(n,[t])=>Math.log(t.evaluate(n))/Math.LN10],ln:[Ee,[Ee],(n,[t])=>Math.log(t.evaluate(n))],log2:[Ee,[Ee],(n,[t])=>Math.log(t.evaluate(n))/Math.LN2],sin:[Ee,[Ee],(n,[t])=>Math.sin(t.evaluate(n))],cos:[Ee,[Ee],(n,[t])=>Math.cos(t.evaluate(n))],tan:[Ee,[Ee],(n,[t])=>Math.tan(t.evaluate(n))],asin:[Ee,[Ee],(n,[t])=>Math.asin(t.evaluate(n))],acos:[Ee,[Ee],(n,[t])=>Math.acos(t.evaluate(n))],atan:[Ee,[Ee],(n,[t])=>Math.atan(t.evaluate(n))],min:[Ee,Ma(Ee),(n,t)=>Math.min(...t.map(r=>r.evaluate(n)))],max:[Ee,Ma(Ee),(n,t)=>Math.max(...t.map(r=>r.evaluate(n)))],abs:[Ee,[Ee],(n,[t])=>Math.abs(t.evaluate(n))],round:[Ee,[Ee],(n,[t])=>{const r=t.evaluate(n);return r<0?-Math.round(-r):Math.round(r)}],floor:[Ee,[Ee],(n,[t])=>Math.floor(t.evaluate(n))],ceil:[Ee,[Ee],(n,[t])=>Math.ceil(t.evaluate(n))],"filter-==":[pt,[it,gt],(n,[t,r])=>n.properties()[t.value]===r.value],"filter-id-==":[pt,[gt],(n,[t])=>n.id()===t.value],"filter-type-==":[pt,[it],(n,[t])=>n.geometryType()===t.value],"filter-<":[pt,[it,gt],(n,[t,r])=>{const a=n.properties()[t.value],c=r.value;return typeof a==typeof c&&a<c}],"filter-id-<":[pt,[gt],(n,[t])=>{const r=n.id(),a=t.value;return typeof r==typeof a&&r<a}],"filter->":[pt,[it,gt],(n,[t,r])=>{const a=n.properties()[t.value],c=r.value;return typeof a==typeof c&&a>c}],"filter-id->":[pt,[gt],(n,[t])=>{const r=n.id(),a=t.value;return typeof r==typeof a&&r>a}],"filter-<=":[pt,[it,gt],(n,[t,r])=>{const a=n.properties()[t.value],c=r.value;return typeof a==typeof c&&a<=c}],"filter-id-<=":[pt,[gt],(n,[t])=>{const r=n.id(),a=t.value;return typeof r==typeof a&&r<=a}],"filter->=":[pt,[it,gt],(n,[t,r])=>{const a=n.properties()[t.value],c=r.value;return typeof a==typeof c&&a>=c}],"filter-id->=":[pt,[gt],(n,[t])=>{const r=n.id(),a=t.value;return typeof r==typeof a&&r>=a}],"filter-has":[pt,[gt],(n,[t])=>t.value in n.properties()],"filter-has-id":[pt,[],n=>n.id()!==null&&n.id()!==void 0],"filter-type-in":[pt,[kr(it)],(n,[t])=>t.value.indexOf(n.geometryType())>=0],"filter-id-in":[pt,[kr(gt)],(n,[t])=>t.value.indexOf(n.id())>=0],"filter-in-small":[pt,[it,kr(gt)],(n,[t,r])=>r.value.indexOf(n.properties()[t.value])>=0],"filter-in-large":[pt,[it,kr(gt)],(n,[t,r])=>function(a,c,d,p){for(;d<=p;){const m=d+p>>1;if(c[m]===a)return!0;c[m]>a?p=m-1:d=m+1}return!1}(n.properties()[t.value],r.value,0,r.value.length-1)],all:{type:pt,overloads:[[[pt,pt],(n,[t,r])=>t.evaluate(n)&&r.evaluate(n)],[Ma(pt),(n,t)=>{for(const r of t)if(!r.evaluate(n))return!1;return!0}]]},any:{type:pt,overloads:[[[pt,pt],(n,[t,r])=>t.evaluate(n)||r.evaluate(n)],[Ma(pt),(n,t)=>{for(const r of t)if(r.evaluate(n))return!0;return!1}]]},"!":[pt,[pt],(n,[t])=>!t.evaluate(n)],"is-supported-script":[pt,[it],(n,[t])=>{const r=n.globals&&n.globals.isSupportedScript;return!r||r(t.evaluate(n))}],upcase:[it,[it],(n,[t])=>t.evaluate(n).toUpperCase()],downcase:[it,[it],(n,[t])=>t.evaluate(n).toLowerCase()],concat:[it,Ma(gt),(n,t)=>t.map(r=>It(r.evaluate(n))).join("")],"resolved-locale":[it,[Za],(n,[t])=>t.evaluate(n).resolvedLocale()]});class Xo{constructor(t,r){this.expression=t,this._warningHistory={},this._evaluator=new ic,this._defaultValue=r?function(a){if(a.type==="color"&&Ho(a.default))return new Pt(0,0,0,0);switch(a.type){case"color":return Pt.parse(a.default)||null;case"padding":return qi.parse(a.default)||null;case"numberArray":return wi.parse(a.default)||null;case"colorArray":return Hi.parse(a.default)||null;case"variableAnchorOffsetCollection":return mr.parse(a.default)||null;case"projectionDefinition":return Sr.parse(a.default)||null;default:return a.default===void 0?null:a.default}}(r):null,this._enumValues=r&&r.type==="enum"?r.values:null}evaluateWithoutErrorHandling(t,r,a,c,d,p){return this._evaluator.globals=t,this._evaluator.feature=r,this._evaluator.featureState=a,this._evaluator.canonical=c,this._evaluator.availableImages=d||null,this._evaluator.formattedSection=p,this.expression.evaluate(this._evaluator)}evaluate(t,r,a,c,d,p){this._evaluator.globals=t,this._evaluator.feature=r||null,this._evaluator.featureState=a||null,this._evaluator.canonical=c,this._evaluator.availableImages=d||null,this._evaluator.formattedSection=p||null;try{const m=this.expression.evaluate(this._evaluator);if(m==null||typeof m=="number"&&m!=m)return this._defaultValue;if(this._enumValues&&!(m in this._enumValues))throw new Xt(`Expected value to be one of ${Object.keys(this._enumValues).map(y=>JSON.stringify(y)).join(", ")}, but found ${JSON.stringify(m)} instead.`);return m}catch(m){return this._warningHistory[m.message]||(this._warningHistory[m.message]=!0,typeof console<"u"&&console.warn(m.message)),this._defaultValue}}}function Gs(n){return Array.isArray(n)&&n.length>0&&typeof n[0]=="string"&&n[0]in Ya}function Ko(n,t){const r=new Ds(Ya,Vo,[],t?function(c){const d={color:ci,string:it,number:Ee,enum:it,boolean:pt,formatted:Ps,padding:ha,numberArray:En,colorArray:Is,projectionDefinition:ui,resolvedImage:da,variableAnchorOffsetCollection:bi};return c.type==="array"?kr(d[c.value]||gt,c.length):d[c.type]}(t):void 0),a=r.parse(n,void 0,void 0,void 0,t&&t.type==="string"?{typeAnnotation:"coerce"}:void 0);return a?Go(new Xo(a,t)):Ja(r.errors)}class _c{constructor(t,r){this.kind=t,this._styleExpression=r,this.isStateDependent=t!=="constant"&&!Us(r.expression)}evaluateWithoutErrorHandling(t,r,a,c,d,p){return this._styleExpression.evaluateWithoutErrorHandling(t,r,a,c,d,p)}evaluate(t,r,a,c,d,p){return this._styleExpression.evaluate(t,r,a,c,d,p)}}class Yo{constructor(t,r,a,c){this.kind=t,this.zoomStops=a,this._styleExpression=r,this.isStateDependent=t!=="camera"&&!Us(r.expression),this.interpolationType=c}evaluateWithoutErrorHandling(t,r,a,c,d,p){return this._styleExpression.evaluateWithoutErrorHandling(t,r,a,c,d,p)}evaluate(t,r,a,c,d,p){return this._styleExpression.evaluate(t,r,a,c,d,p)}interpolationFactor(t,r,a){return this.interpolationType?ar.interpolationFactor(this.interpolationType,t,r,a):0}}function yc(n,t){const r=Ko(n,t);if(r.result==="error")return r;const a=r.value.expression,c=Uo(a);if(!c&&!Qa(t))return Ja([new St("","data expressions not supported")]);const d=$o(a,["zoom"]);if(!d&&!uh(t))return Ja([new St("","zoom expressions not supported")]);const p=Hs(a);return p||d?p instanceof St?Ja([p]):p instanceof ar&&!qo(t)?Ja([new St("",'"interpolate" expressions cannot be used with this property')]):Go(p?new Yo(c?"camera":"composite",r.value,p.labels,p instanceof ar?p.interpolation:void 0):new _c(c?"constant":"source",r.value)):Ja([new St("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class qs{constructor(t,r){this._parameters=t,this._specification=r,Ot(this,gc(this._parameters,this._specification))}static deserialize(t){return new qs(t._parameters,t._specification)}static serialize(t){return{_parameters:t._parameters,_specification:t._specification}}}function Hs(n){let t=null;if(n instanceof Wa)t=Hs(n.result);else if(n instanceof xa){for(const r of n.args)if(t=Hs(r),t)break}else(n instanceof Xn||n instanceof ar)&&n.input instanceof $r&&n.input.name==="zoom"&&(t=n);return t instanceof St||n.eachChild(r=>{const a=Hs(r);a instanceof St?t=a:!t&&a?t=new St("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):t&&a&&t!==a&&(t=new St("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),t}function Ws(n){if(n===!0||n===!1)return!0;if(!Array.isArray(n)||n.length===0)return!1;switch(n[0]){case"has":return n.length>=2&&n[1]!=="$id"&&n[1]!=="$type";case"in":return n.length>=3&&(typeof n[1]!="string"||Array.isArray(n[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return n.length!==3||Array.isArray(n[1])||Array.isArray(n[2]);case"any":case"all":for(const t of n.slice(1))if(!Ws(t)&&typeof t!="boolean")return!1;return!0;default:return!0}}const xc={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Xs(n){if(n==null)return{filter:()=>!0,needGeometry:!1};Ws(n)||(n=Qo(n));const t=Ko(n,xc);if(t.result==="error")throw new Error(t.value.map(r=>`${r.key}: ${r.message}`).join(", "));return{filter:(r,a,c)=>t.value.evaluate(r,a,{},c),needGeometry:dh(n)}}function Jo(n,t){return n<t?-1:n>t?1:0}function dh(n){if(!Array.isArray(n))return!1;if(n[0]==="within"||n[0]==="distance")return!0;for(let t=1;t<n.length;t++)if(dh(n[t]))return!0;return!1}function Qo(n){if(!n)return!0;const t=n[0];return n.length<=1?t!=="any":t==="=="?vc(n[1],n[2],"=="):t==="!="?el(vc(n[1],n[2],"==")):t==="<"||t===">"||t==="<="||t===">="?vc(n[1],n[2],t):t==="any"?(r=n.slice(1),["any"].concat(r.map(Qo))):t==="all"?["all"].concat(n.slice(1).map(Qo)):t==="none"?["all"].concat(n.slice(1).map(Qo).map(el)):t==="in"?ph(n[1],n.slice(2)):t==="!in"?el(ph(n[1],n.slice(2))):t==="has"?fh(n[1]):t!=="!has"||el(fh(n[1]));var r}function vc(n,t,r){switch(n){case"$type":return[`filter-type-${r}`,t];case"$id":return[`filter-id-${r}`,t];default:return[`filter-${r}`,n,t]}}function ph(n,t){if(t.length===0)return!1;switch(n){case"$type":return["filter-type-in",["literal",t]];case"$id":return["filter-id-in",["literal",t]];default:return t.length>200&&!t.some(r=>typeof r!=typeof t[0])?["filter-in-large",n,["literal",t.sort(Jo)]]:["filter-in-small",n,["literal",t]]}}function fh(n){switch(n){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",n]}}function el(n){return["!",n]}function tl(n){const t=typeof n;if(t==="number"||t==="boolean"||t==="string"||n==null)return JSON.stringify(n);if(Array.isArray(n)){let c="[";for(const d of n)c+=`${tl(d)},`;return`${c}]`}const r=Object.keys(n).sort();let a="{";for(let c=0;c<r.length;c++)a+=`${JSON.stringify(r[c])}:${tl(n[r[c]])},`;return`${a}}`}function mh(n){let t="";for(const r of ge)t+=`/${tl(n[r])}`;return t}function Ks(n){const t=n.value;return t?[new we(n.key,t,"constants have been deprecated as of v8")]:[]}function _i(n){return n instanceof Number||n instanceof String||n instanceof Boolean?n.valueOf():n}function Yn(n){if(Array.isArray(n))return n.map(Yn);if(n instanceof Object&&!(n instanceof Number||n instanceof String||n instanceof Boolean)){const t={};for(const r in n)t[r]=Yn(n[r]);return t}return _i(n)}function Dr(n){const t=n.key,r=n.value,a=n.valueSpec||{},c=n.objectElementValidators||{},d=n.style,p=n.styleSpec,m=n.validateSpec;let y=[];const w=bt(r);if(w!=="object")return[new we(t,r,`object expected, ${w} found`)];for(const M in r){const I=M.split(".")[0],z=Es(a,I)||a["*"];let D;if(Es(c,I))D=c[I];else if(Es(a,I))D=m;else if(c["*"])D=c["*"];else{if(!a["*"]){y.push(new we(t,r[M],`unknown property "${M}"`));continue}D=m}y=y.concat(D({key:(t&&`${t}.`)+M,value:r[M],valueSpec:z,style:d,styleSpec:p,object:r,objectKey:M,validateSpec:m},r))}for(const M in a)c[M]||a[M].required&&a[M].default===void 0&&r[M]===void 0&&y.push(new we(t,r,`missing required property "${M}"`));return y}function bc(n){const t=n.value,r=n.valueSpec,a=n.style,c=n.styleSpec,d=n.key,p=n.arrayElementValidator||n.validateSpec;if(bt(t)!=="array")return[new we(d,t,`array expected, ${bt(t)} found`)];if(r.length&&t.length!==r.length)return[new we(d,t,`array length ${r.length} expected, length ${t.length} found`)];if(r["min-length"]&&t.length<r["min-length"])return[new we(d,t,`array length at least ${r["min-length"]} expected, length ${t.length} found`)];let m={type:r.value,values:r.values};c.$version<7&&(m.function=r.function),bt(r.value)==="object"&&(m=r.value);let y=[];for(let w=0;w<t.length;w++)y=y.concat(p({array:t,arrayIndex:w,value:t[w],valueSpec:m,validateSpec:n.validateSpec,style:a,styleSpec:c,key:`${d}[${w}]`}));return y}function Ys(n){const t=n.key,r=n.value,a=n.valueSpec;let c=bt(r);return c==="number"&&r!=r&&(c="NaN"),c!=="number"?[new we(t,r,`number expected, ${c} found`)]:"minimum"in a&&r<a.minimum?[new we(t,r,`${r} is less than the minimum value ${a.minimum}`)]:"maximum"in a&&r>a.maximum?[new we(t,r,`${r} is greater than the maximum value ${a.maximum}`)]:[]}function wc(n){const t=n.valueSpec,r=_i(n.value.type);let a,c,d,p={};const m=r!=="categorical"&&n.value.property===void 0,y=!m,w=bt(n.value.stops)==="array"&&bt(n.value.stops[0])==="array"&&bt(n.value.stops[0][0])==="object",M=Dr({key:n.key,value:n.value,valueSpec:n.styleSpec.function,validateSpec:n.validateSpec,style:n.style,styleSpec:n.styleSpec,objectElementValidators:{stops:function(D){if(r==="identity")return[new we(D.key,D.value,'identity function may not have a "stops" property')];let B=[];const j=D.value;return B=B.concat(bc({key:D.key,value:j,valueSpec:D.valueSpec,validateSpec:D.validateSpec,style:D.style,styleSpec:D.styleSpec,arrayElementValidator:I})),bt(j)==="array"&&j.length===0&&B.push(new we(D.key,j,"array must have at least one stop")),B},default:function(D){return D.validateSpec({key:D.key,value:D.value,valueSpec:t,validateSpec:D.validateSpec,style:D.style,styleSpec:D.styleSpec})}}});return r==="identity"&&m&&M.push(new we(n.key,n.value,'missing required property "property"')),r==="identity"||n.value.stops||M.push(new we(n.key,n.value,'missing required property "stops"')),r==="exponential"&&n.valueSpec.expression&&!qo(n.valueSpec)&&M.push(new we(n.key,n.value,"exponential functions not supported")),n.styleSpec.$version>=8&&(y&&!Qa(n.valueSpec)?M.push(new we(n.key,n.value,"property functions not supported")):m&&!uh(n.valueSpec)&&M.push(new we(n.key,n.value,"zoom functions not supported"))),r!=="categorical"&&!w||n.value.property!==void 0||M.push(new we(n.key,n.value,'"property" property is required')),M;function I(D){let B=[];const j=D.value,U=D.key;if(bt(j)!=="array")return[new we(U,j,`array expected, ${bt(j)} found`)];if(j.length!==2)return[new we(U,j,`array length 2 expected, length ${j.length} found`)];if(w){if(bt(j[0])!=="object")return[new we(U,j,`object expected, ${bt(j[0])} found`)];if(j[0].zoom===void 0)return[new we(U,j,"object stop key must have zoom")];if(j[0].value===void 0)return[new we(U,j,"object stop key must have value")];if(d&&d>_i(j[0].zoom))return[new we(U,j[0].zoom,"stop zoom values must appear in ascending order")];_i(j[0].zoom)!==d&&(d=_i(j[0].zoom),c=void 0,p={}),B=B.concat(Dr({key:`${U}[0]`,value:j[0],valueSpec:{zoom:{}},validateSpec:D.validateSpec,style:D.style,styleSpec:D.styleSpec,objectElementValidators:{zoom:Ys,value:z}}))}else B=B.concat(z({key:`${U}[0]`,value:j[0],validateSpec:D.validateSpec,style:D.style,styleSpec:D.styleSpec},j));return Gs(Yn(j[1]))?B.concat([new we(`${U}[1]`,j[1],"expressions are not allowed in function stops.")]):B.concat(D.validateSpec({key:`${U}[1]`,value:j[1],valueSpec:t,validateSpec:D.validateSpec,style:D.style,styleSpec:D.styleSpec}))}function z(D,B){const j=bt(D.value),U=_i(D.value),X=D.value!==null?D.value:B;if(a){if(j!==a)return[new we(D.key,X,`${j} stop domain type must match previous stop domain type ${a}`)]}else a=j;if(j!=="number"&&j!=="string"&&j!=="boolean")return[new we(D.key,X,"stop domain value must be a number, string, or boolean")];if(j!=="number"&&r!=="categorical"){let ne=`number expected, ${j} found`;return Qa(t)&&r===void 0&&(ne+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new we(D.key,X,ne)]}return r!=="categorical"||j!=="number"||isFinite(U)&&Math.floor(U)===U?r!=="categorical"&&j==="number"&&c!==void 0&&U<c?[new we(D.key,X,"stop domain values must appear in ascending order")]:(c=U,r==="categorical"&&U in p?[new we(D.key,X,"stop domain values must be unique")]:(p[U]=!0,[])):[new we(D.key,X,`integer expected, found ${U}`)]}}function gn(n){const t=(n.expressionContext==="property"?yc:Ko)(Yn(n.value),n.valueSpec);if(t.result==="error")return t.value.map(a=>new we(`${n.key}${a.key}`,n.value,a.message));const r=t.value.expression||t.value._styleExpression.expression;if(n.expressionContext==="property"&&n.propertyKey==="text-font"&&!r.outputDefined())return[new we(n.key,n.value,`Invalid data expression for "${n.propertyKey}". Output values must be contained as literals within the expression.`)];if(n.expressionContext==="property"&&n.propertyType==="layout"&&!Us(r))return[new we(n.key,n.value,'"feature-state" data expressions are not supported with layout properties.')];if(n.expressionContext==="filter"&&!Us(r))return[new we(n.key,n.value,'"feature-state" data expressions are not supported with filters.')];if(n.expressionContext&&n.expressionContext.indexOf("cluster")===0){if(!$o(r,["zoom","feature-state"]))return[new we(n.key,n.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(n.expressionContext==="cluster-initial"&&!Uo(r))return[new we(n.key,n.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Tc(n){const t=n.key,r=n.value,a=bt(r);return a!=="string"?[new we(t,r,`color expected, ${a} found`)]:Pt.parse(String(r))?[]:[new we(t,r,`color expected, "${r}" found`)]}function Js(n){const t=n.key,r=n.value,a=n.valueSpec,c=[];return Array.isArray(a.values)?a.values.indexOf(_i(r))===-1&&c.push(new we(t,r,`expected one of [${a.values.join(", ")}], ${JSON.stringify(r)} found`)):Object.keys(a.values).indexOf(_i(r))===-1&&c.push(new we(t,r,`expected one of [${Object.keys(a.values).join(", ")}], ${JSON.stringify(r)} found`)),c}function Mc(n){return Ws(Yn(n.value))?gn(Ot({},n,{expressionContext:"filter",valueSpec:{value:"boolean"}})):gh(n)}function gh(n){const t=n.value,r=n.key;if(bt(t)!=="array")return[new we(r,t,`array expected, ${bt(t)} found`)];const a=n.styleSpec;let c,d=[];if(t.length<1)return[new we(r,t,"filter array must have at least 1 element")];switch(d=d.concat(Js({key:`${r}[0]`,value:t[0],valueSpec:a.filter_operator,style:n.style,styleSpec:n.styleSpec})),_i(t[0])){case"<":case"<=":case">":case">=":t.length>=2&&_i(t[1])==="$type"&&d.push(new we(r,t,`"$type" cannot be use with operator "${t[0]}"`));case"==":case"!=":t.length!==3&&d.push(new we(r,t,`filter array for operator "${t[0]}" must have 3 elements`));case"in":case"!in":t.length>=2&&(c=bt(t[1]),c!=="string"&&d.push(new we(`${r}[1]`,t[1],`string expected, ${c} found`)));for(let p=2;p<t.length;p++)c=bt(t[p]),_i(t[1])==="$type"?d=d.concat(Js({key:`${r}[${p}]`,value:t[p],valueSpec:a.geometry_type,style:n.style,styleSpec:n.styleSpec})):c!=="string"&&c!=="number"&&c!=="boolean"&&d.push(new we(`${r}[${p}]`,t[p],`string, number, or boolean expected, ${c} found`));break;case"any":case"all":case"none":for(let p=1;p<t.length;p++)d=d.concat(gh({key:`${r}[${p}]`,value:t[p],style:n.style,styleSpec:n.styleSpec}));break;case"has":case"!has":c=bt(t[1]),t.length!==2?d.push(new we(r,t,`filter array for "${t[0]}" operator must have 2 elements`)):c!=="string"&&d.push(new we(`${r}[1]`,t[1],`string expected, ${c} found`))}return d}function _h(n,t){const r=n.key,a=n.validateSpec,c=n.style,d=n.styleSpec,p=n.value,m=n.objectKey,y=d[`${t}_${n.layerType}`];if(!y)return[];const w=m.match(/^(.*)-transition$/);if(t==="paint"&&w&&y[w[1]]&&y[w[1]].transition)return a({key:r,value:p,valueSpec:d.transition,style:c,styleSpec:d});const M=n.valueSpec||y[m];if(!M)return[new we(r,p,`unknown property "${m}"`)];let I;if(bt(p)==="string"&&Qa(M)&&!M.tokens&&(I=/^{([^}]+)}$/.exec(p)))return[new we(r,p,`"${m}" does not support interpolation syntax
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arenarium/maps",
3
- "version": "1.0.82",
3
+ "version": "1.0.83",
4
4
  "license": "MIT",
5
5
  "author": "arenarium.dev",
6
6
  "description": "The best way to visualize ranked data on a map.",