(()=>{var dFe=Object.create;var n2=Object.defineProperty,pFe=Object.defineProperties,mFe=Object.getOwnPropertyDescriptor,gFe=Object.getOwnPropertyDescriptors,vFe=Object.getOwnPropertyNames,RK=Object.getOwnPropertySymbols,yFe=Object.getPrototypeOf,FK=Object.prototype.hasOwnProperty,bFe=Object.prototype.propertyIsEnumerable;var _3=(r,e,t)=>e in r?n2(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Ud=(r,e)=>{for(var t in e||(e={}))FK.call(e,t)&&_3(r,t,e[t]);if(RK)for(var t of RK(e))bFe.call(e,t)&&_3(r,t,e[t]);return r},vv=(r,e)=>pFe(r,gFe(e));var NK=(r=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(r,{get:(e,t)=>(typeof require!="undefined"?require:e)[t]}):r)(function(r){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+r+'" is not supported')});var Pe=(r,e)=>()=>(r&&(e=r(r=0)),e);var de=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),qK=(r,e)=>{for(var t in e)n2(r,t,{get:e[t],enumerable:!0})},xFe=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of vFe(e))!FK.call(r,i)&&i!==t&&n2(r,i,{get:()=>e[i],enumerable:!(n=mFe(e,i))||n.enumerable});return r};var ya=(r,e,t)=>(t=r!=null?dFe(yFe(r)):{},xFe(e||!r||!r.__esModule?n2(t,"default",{value:r,enumerable:!0}):t,r));var Ir=(r,e,t)=>(_3(r,typeof e!="symbol"?e+"":e,t),t);var z_=(r,e,t)=>new Promise((n,i)=>{var o=h=>{try{u(t.next(h))}catch(p){i(p)}},a=h=>{try{u(t.throw(h))}catch(p){i(p)}},u=h=>h.done?n(h.value):Promise.resolve(h.value).then(o,a);u((t=t.apply(r,e)).next())});var Wn=de((w3,BK)=>{"use strict";var Yk=function(r){return r&&r.Math===Math&&r};BK.exports=Yk(typeof globalThis=="object"&&globalThis)||Yk(typeof window=="object"&&window)||Yk(typeof self=="object"&&self)||Yk(typeof global=="object"&&global)||Yk(typeof w3=="object"&&w3)||function(){return this}()||Function("return this")()});var on=de((BRt,zK)=>{"use strict";zK.exports=function(r){try{return!!r()}catch{return!0}}});var Li=de((zRt,jK)=>{"use strict";var _Fe=on();jK.exports=!_Fe(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})});var j_=de((jRt,UK)=>{"use strict";var wFe=on();UK.exports=!wFe(function(){var r=function(){}.bind();return typeof r!="function"||r.hasOwnProperty("prototype")})});var yo=de((URt,HK)=>{"use strict";var SFe=j_(),i2=Function.prototype.call;HK.exports=SFe?i2.bind(i2):function(){return i2.apply(i2,arguments)}});var Zk=de($K=>{"use strict";var WK={}.propertyIsEnumerable,VK=Object.getOwnPropertyDescriptor,kFe=VK&&!WK.call({1:2},1);$K.f=kFe?function(e){var t=VK(this,e);return!!t&&t.enumerable}:WK});var Hd=de((WRt,KK)=>{"use strict";KK.exports=function(r,e){return{enumerable:!(r&1),configurable:!(r&2),writable:!(r&4),value:e}}});var fn=de((VRt,ZK)=>{"use strict";var GK=j_(),YK=Function.prototype,S3=YK.call,TFe=GK&&YK.bind.bind(S3,S3);ZK.exports=GK?TFe:function(r){return function(){return S3.apply(r,arguments)}}});var jf=de(($Rt,JK)=>{"use strict";var XK=fn(),EFe=XK({}.toString),CFe=XK("".slice);JK.exports=function(r){return CFe(EFe(r),8,-1)}});var y0=de((KRt,QK)=>{"use strict";var AFe=fn(),DFe=on(),OFe=jf(),k3=Object,IFe=AFe("".split);QK.exports=DFe(function(){return!k3("z").propertyIsEnumerable(0)})?function(r){return OFe(r)==="String"?IFe(r,""):k3(r)}:k3});var gh=de((GRt,eG)=>{"use strict";eG.exports=function(r){return r==null}});var ml=de((YRt,tG)=>{"use strict";var MFe=gh(),PFe=TypeError;tG.exports=function(r){if(MFe(r))throw new PFe("Can't call method on "+r);return r}});var Rc=de((ZRt,rG)=>{"use strict";var LFe=y0(),RFe=ml();rG.exports=function(r){return LFe(RFe(r))}});var sa=de((XRt,nG)=>{"use strict";var T3=typeof document=="object"&&document.all;nG.exports=typeof T3>"u"&&T3!==void 0?function(r){return typeof r=="function"||r===T3}:function(r){return typeof r=="function"}});var Wo=de((JRt,iG)=>{"use strict";var FFe=sa();iG.exports=function(r){return typeof r=="object"?r!==null:FFe(r)}});var Gs=de((QRt,oG)=>{"use strict";var E3=Wn(),NFe=sa(),qFe=function(r){return NFe(r)?r:void 0};oG.exports=function(r,e){return arguments.length<2?qFe(E3[r]):E3[r]&&E3[r][e]}});var Yh=de((eFt,aG)=>{"use strict";var BFe=fn();aG.exports=BFe({}.isPrototypeOf)});var ag=de((tFt,sG)=>{"use strict";sG.exports=typeof navigator<"u"&&String(navigator.userAgent)||""});var sg=de((rFt,dG)=>{"use strict";var hG=Wn(),C3=ag(),lG=hG.process,uG=hG.Deno,cG=lG&&lG.versions||uG&&uG.version,fG=cG&&cG.v8,_m,o2;fG&&(_m=fG.split("."),o2=_m[0]>0&&_m[0]<4?1:+(_m[0]+_m[1]));!o2&&C3&&(_m=C3.match(/Edge\/(\d+)/),(!_m||_m[1]>=74)&&(_m=C3.match(/Chrome\/(\d+)/),_m&&(o2=+_m[1])));dG.exports=o2});var b0=de((nFt,mG)=>{"use strict";var pG=sg(),zFe=on(),jFe=Wn(),UFe=jFe.String;mG.exports=!!Object.getOwnPropertySymbols&&!zFe(function(){var r=Symbol("symbol detection");return!UFe(r)||!(Object(r)instanceof Symbol)||!Symbol.sham&&pG&&pG<41})});var A3=de((iFt,gG)=>{"use strict";var HFe=b0();gG.exports=HFe&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var Ly=de((oFt,vG)=>{"use strict";var WFe=Gs(),VFe=sa(),$Fe=Yh(),KFe=A3(),GFe=Object;vG.exports=KFe?function(r){return typeof r=="symbol"}:function(r){var e=WFe("Symbol");return VFe(e)&&$Fe(e.prototype,GFe(r))}});var Ry=de((aFt,yG)=>{"use strict";var YFe=String;yG.exports=function(r){try{return YFe(r)}catch{return"Object"}}});var gl=de((sFt,bG)=>{"use strict";var ZFe=sa(),XFe=Ry(),JFe=TypeError;bG.exports=function(r){if(ZFe(r))return r;throw new JFe(XFe(r)+" is not a function")}});var lg=de((lFt,xG)=>{"use strict";var QFe=gl(),eNe=gh();xG.exports=function(r,e){var t=r[e];return eNe(t)?void 0:QFe(t)}});var M3=de((uFt,_G)=>{"use strict";var D3=yo(),O3=sa(),I3=Wo(),tNe=TypeError;_G.exports=function(r,e){var t,n;if(e==="string"&&O3(t=r.toString)&&!I3(n=D3(t,r))||O3(t=r.valueOf)&&!I3(n=D3(t,r))||e!=="string"&&O3(t=r.toString)&&!I3(n=D3(t,r)))return n;throw new tNe("Can't convert object to primitive value")}});var jl=de((cFt,wG)=>{"use strict";wG.exports=!1});var a2=de((fFt,kG)=>{"use strict";var SG=Wn(),rNe=Object.defineProperty;kG.exports=function(r,e){try{rNe(SG,r,{value:e,configurable:!0,writable:!0})}catch{SG[r]=e}return e}});var s2=de((hFt,EG)=>{"use strict";var nNe=Wn(),iNe=a2(),TG="__core-js_shared__",oNe=nNe[TG]||iNe(TG,{});EG.exports=oNe});var x0=de((dFt,AG)=>{"use strict";var aNe=jl(),CG=s2();(AG.exports=function(r,e){return CG[r]||(CG[r]=e!==void 0?e:{})})("versions",[]).push({version:"3.35.1",mode:aNe?"pure":"global",copyright:"\xA9 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.35.1/LICENSE",source:"https://github.com/zloirock/core-js"})});var za=de((pFt,DG)=>{"use strict";var sNe=ml(),lNe=Object;DG.exports=function(r){return lNe(sNe(r))}});var ba=de((mFt,OG)=>{"use strict";var uNe=fn(),cNe=za(),fNe=uNe({}.hasOwnProperty);OG.exports=Object.hasOwn||function(e,t){return fNe(cNe(e),t)}});var _0=de((gFt,IG)=>{"use strict";var hNe=fn(),dNe=0,pNe=Math.random(),mNe=hNe(1 .toString);IG.exports=function(r){return"Symbol("+(r===void 0?"":r)+")_"+mNe(++dNe+pNe,36)}});var Jo=de((vFt,PG)=>{"use strict";var gNe=Wn(),vNe=x0(),MG=ba(),yNe=_0(),bNe=b0(),xNe=A3(),U_=gNe.Symbol,P3=vNe("wks"),_Ne=xNe?U_.for||U_:U_&&U_.withoutSetter||yNe;PG.exports=function(r){return MG(P3,r)||(P3[r]=bNe&&MG(U_,r)?U_[r]:_Ne("Symbol."+r)),P3[r]}});var Xk=de((yFt,FG)=>{"use strict";var wNe=yo(),LG=Wo(),RG=Ly(),SNe=lg(),kNe=M3(),TNe=Jo(),ENe=TypeError,CNe=TNe("toPrimitive");FG.exports=function(r,e){if(!LG(r)||RG(r))return r;var t=SNe(r,CNe),n;if(t){if(e===void 0&&(e="default"),n=wNe(t,r,e),!LG(n)||RG(n))return n;throw new ENe("Can't convert object to primitive value")}return e===void 0&&(e="number"),kNe(r,e)}});var ug=de((bFt,NG)=>{"use strict";var ANe=Xk(),DNe=Ly();NG.exports=function(r){var e=ANe(r,"string");return DNe(e)?e:e+""}});var Jk=de((xFt,BG)=>{"use strict";var ONe=Wn(),qG=Wo(),L3=ONe.document,INe=qG(L3)&&qG(L3.createElement);BG.exports=function(r){return INe?L3.createElement(r):{}}});var R3=de((_Ft,zG)=>{"use strict";var MNe=Li(),PNe=on(),LNe=Jk();zG.exports=!MNe&&!PNe(function(){return Object.defineProperty(LNe("div"),"a",{get:function(){return 7}}).a!==7})});var Uf=de(UG=>{"use strict";var RNe=Li(),FNe=yo(),NNe=Zk(),qNe=Hd(),BNe=Rc(),zNe=ug(),jNe=ba(),UNe=R3(),jG=Object.getOwnPropertyDescriptor;UG.f=RNe?jG:function(e,t){if(e=BNe(e),t=zNe(t),UNe)try{return jG(e,t)}catch{}if(jNe(e,t))return qNe(!FNe(NNe.f,e,t),e[t])}});var F3=de((SFt,HG)=>{"use strict";var HNe=Li(),WNe=on();HG.exports=HNe&&WNe(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})});var Eo=de((kFt,WG)=>{"use strict";var VNe=Wo(),$Ne=String,KNe=TypeError;WG.exports=function(r){if(VNe(r))return r;throw new KNe($Ne(r)+" is not an object")}});var vl=de($G=>{"use strict";var GNe=Li(),YNe=R3(),ZNe=F3(),l2=Eo(),VG=ug(),XNe=TypeError,N3=Object.defineProperty,JNe=Object.getOwnPropertyDescriptor,q3="enumerable",B3="configurable",z3="writable";$G.f=GNe?ZNe?function(e,t,n){if(l2(e),t=VG(t),l2(n),typeof e=="function"&&t==="prototype"&&"value"in n&&z3 in n&&!n[z3]){var i=JNe(e,t);i&&i[z3]&&(e[t]=n.value,n={configurable:B3 in n?n[B3]:i[B3],enumerable:q3 in n?n[q3]:i[q3],writable:!1})}return N3(e,t,n)}:N3:function(e,t,n){if(l2(e),t=VG(t),l2(n),YNe)try{return N3(e,t,n)}catch{}if("get"in n||"set"in n)throw new XNe("Accessors not supported");return"value"in n&&(e[t]=n.value),e}});var Hf=de((EFt,KG)=>{"use strict";var QNe=Li(),eqe=vl(),tqe=Hd();KG.exports=QNe?function(r,e,t){return eqe.f(r,e,tqe(1,t))}:function(r,e,t){return r[e]=t,r}});var w0=de((CFt,YG)=>{"use strict";var j3=Li(),rqe=ba(),GG=Function.prototype,nqe=j3&&Object.getOwnPropertyDescriptor,U3=rqe(GG,"name"),iqe=U3&&function(){}.name==="something",oqe=U3&&(!j3||j3&&nqe(GG,"name").configurable);YG.exports={EXISTS:U3,PROPER:iqe,CONFIGURABLE:oqe}});var u2=de((AFt,ZG)=>{"use strict";var aqe=fn(),sqe=sa(),H3=s2(),lqe=aqe(Function.toString);sqe(H3.inspectSource)||(H3.inspectSource=function(r){return lqe(r)});ZG.exports=H3.inspectSource});var W3=de((DFt,JG)=>{"use strict";var uqe=Wn(),cqe=sa(),XG=uqe.WeakMap;JG.exports=cqe(XG)&&/native code/.test(String(XG))});var Qk=de((OFt,eY)=>{"use strict";var fqe=x0(),hqe=_0(),QG=fqe("keys");eY.exports=function(r){return QG[r]||(QG[r]=hqe(r))}});var H_=de((IFt,tY)=>{"use strict";tY.exports={}});var cc=de((MFt,iY)=>{"use strict";var dqe=W3(),nY=Wn(),pqe=Wo(),mqe=Hf(),V3=ba(),$3=s2(),gqe=Qk(),vqe=H_(),rY="Object already initialized",K3=nY.TypeError,yqe=nY.WeakMap,c2,eT,f2,bqe=function(r){return f2(r)?eT(r):c2(r,{})},xqe=function(r){return function(e){var t;if(!pqe(e)||(t=eT(e)).type!==r)throw new K3("Incompatible receiver, "+r+" required");return t}};dqe||$3.state?(wm=$3.state||($3.state=new yqe),wm.get=wm.get,wm.has=wm.has,wm.set=wm.set,c2=function(r,e){if(wm.has(r))throw new K3(rY);return e.facade=r,wm.set(r,e),e},eT=function(r){return wm.get(r)||{}},f2=function(r){return wm.has(r)}):(S0=gqe("state"),vqe[S0]=!0,c2=function(r,e){if(V3(r,S0))throw new K3(rY);return e.facade=r,mqe(r,S0,e),e},eT=function(r){return V3(r,S0)?r[S0]:{}},f2=function(r){return V3(r,S0)});var wm,S0;iY.exports={set:c2,get:eT,has:f2,enforce:bqe,getterFor:xqe}});var p2=de((PFt,sY)=>{"use strict";var Y3=fn(),_qe=on(),wqe=sa(),h2=ba(),G3=Li(),Sqe=w0().CONFIGURABLE,kqe=u2(),aY=cc(),Tqe=aY.enforce,Eqe=aY.get,oY=String,d2=Object.defineProperty,Cqe=Y3("".slice),Aqe=Y3("".replace),Dqe=Y3([].join),Oqe=G3&&!_qe(function(){return d2(function(){},"length",{value:8}).length!==8}),Iqe=String(String).split("String"),Mqe=sY.exports=function(r,e,t){Cqe(oY(e),0,7)==="Symbol("&&(e="["+Aqe(oY(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),t&&t.getter&&(e="get "+e),t&&t.setter&&(e="set "+e),(!h2(r,"name")||Sqe&&r.name!==e)&&(G3?d2(r,"name",{value:e,configurable:!0}):r.name=e),Oqe&&t&&h2(t,"arity")&&r.length!==t.arity&&d2(r,"length",{value:t.arity});try{t&&h2(t,"constructor")&&t.constructor?G3&&d2(r,"prototype",{writable:!1}):r.prototype&&(r.prototype=void 0)}catch{}var n=Tqe(r);return h2(n,"source")||(n.source=Dqe(Iqe,typeof e=="string"?e:"")),r};Function.prototype.toString=Mqe(function(){return wqe(this)&&Eqe(this).source||kqe(this)},"toString")});var nl=de((LFt,lY)=>{"use strict";var Pqe=sa(),Lqe=vl(),Rqe=p2(),Fqe=a2();lY.exports=function(r,e,t,n){n||(n={});var i=n.enumerable,o=n.name!==void 0?n.name:e;if(Pqe(t)&&Rqe(t,o,n),n.global)i?r[e]=t:Fqe(e,t);else{try{n.unsafe?r[e]&&(i=!0):delete r[e]}catch{}i?r[e]=t:Lqe.f(r,e,{value:t,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return r}});var Z3=de((RFt,uY)=>{"use strict";var Nqe=Math.ceil,qqe=Math.floor;uY.exports=Math.trunc||function(e){var t=+e;return(t>0?qqe:Nqe)(t)}});var gu=de((FFt,cY)=>{"use strict";var Bqe=Z3();cY.exports=function(r){var e=+r;return e!==e||e===0?0:Bqe(e)}});var cg=de((NFt,fY)=>{"use strict";var zqe=gu(),jqe=Math.max,Uqe=Math.min;fY.exports=function(r,e){var t=zqe(r);return t<0?jqe(t+e,0):Uqe(t,e)}});var Zh=de((qFt,hY)=>{"use strict";var Hqe=gu(),Wqe=Math.min;hY.exports=function(r){var e=Hqe(r);return e>0?Wqe(e,9007199254740991):0}});var us=de((BFt,dY)=>{"use strict";var Vqe=Zh();dY.exports=function(r){return Vqe(r.length)}});var W_=de((zFt,mY)=>{"use strict";var $qe=Rc(),Kqe=cg(),Gqe=us(),pY=function(r){return function(e,t,n){var i=$qe(e),o=Gqe(i),a=Kqe(n,o),u;if(r&&t!==t){for(;o>a;)if(u=i[a++],u!==u)return!0}else for(;o>a;a++)if((r||a in i)&&i[a]===t)return r||a||0;return!r&&-1}};mY.exports={includes:pY(!0),indexOf:pY(!1)}});var J3=de((jFt,vY)=>{"use strict";var Yqe=fn(),X3=ba(),Zqe=Rc(),Xqe=W_().indexOf,Jqe=H_(),gY=Yqe([].push);vY.exports=function(r,e){var t=Zqe(r),n=0,i=[],o;for(o in t)!X3(Jqe,o)&&X3(t,o)&&gY(i,o);for(;e.length>n;)X3(t,o=e[n++])&&(~Xqe(i,o)||gY(i,o));return i}});var m2=de((UFt,yY)=>{"use strict";yY.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]});var Fy=de(bY=>{"use strict";var Qqe=J3(),e3e=m2(),t3e=e3e.concat("length","prototype");bY.f=Object.getOwnPropertyNames||function(e){return Qqe(e,t3e)}});var tT=de(xY=>{"use strict";xY.f=Object.getOwnPropertySymbols});var g2=de((VFt,_Y)=>{"use strict";var r3e=Gs(),n3e=fn(),i3e=Fy(),o3e=tT(),a3e=Eo(),s3e=n3e([].concat);_Y.exports=r3e("Reflect","ownKeys")||function(e){var t=i3e.f(a3e(e)),n=o3e.f;return n?s3e(t,n(e)):t}});var V_=de(($Ft,SY)=>{"use strict";var wY=ba(),l3e=g2(),u3e=Uf(),c3e=vl();SY.exports=function(r,e,t){for(var n=l3e(e),i=c3e.f,o=u3e.f,a=0;a{"use strict";var f3e=on(),h3e=sa(),d3e=/#|\.prototype\./,rT=function(r,e){var t=m3e[p3e(r)];return t===v3e?!0:t===g3e?!1:h3e(e)?f3e(e):!!e},p3e=rT.normalize=function(r){return String(r).replace(d3e,".").toLowerCase()},m3e=rT.data={},g3e=rT.NATIVE="N",v3e=rT.POLYFILL="P";kY.exports=rT});var Ut=de((GFt,TY)=>{"use strict";var v2=Wn(),y3e=Uf().f,b3e=Hf(),x3e=nl(),_3e=a2(),w3e=V_(),S3e=$_();TY.exports=function(r,e){var t=r.target,n=r.global,i=r.stat,o,a,u,h,p,_;if(n?a=v2:i?a=v2[t]||_3e(t,{}):a=v2[t]&&v2[t].prototype,a)for(u in e){if(p=e[u],r.dontCallGetSet?(_=y3e(a,u),h=_&&_.value):h=a[u],o=S3e(n?u:t+(i?".":"#")+u,r.forced),!o&&h!==void 0){if(typeof p==typeof h)continue;w3e(p,h)}(r.sham||h&&h.sham)&&b3e(p,"sham",!0),x3e(a,u,p,r)}}});var y2=de((YFt,CY)=>{"use strict";var k3e=Jo(),T3e=k3e("toStringTag"),EY={};EY[T3e]="z";CY.exports=String(EY)==="[object z]"});var Sm=de((ZFt,AY)=>{"use strict";var E3e=y2(),C3e=sa(),b2=jf(),A3e=Jo(),D3e=A3e("toStringTag"),O3e=Object,I3e=b2(function(){return arguments}())==="Arguments",M3e=function(r,e){try{return r[e]}catch{}};AY.exports=E3e?b2:function(r){var e,t,n;return r===void 0?"Undefined":r===null?"Null":typeof(t=M3e(e=O3e(r),D3e))=="string"?t:I3e?b2(e):(n=b2(e))==="Object"&&C3e(e.callee)?"Arguments":n}});var oo=de((XFt,DY)=>{"use strict";var P3e=Sm(),L3e=String;DY.exports=function(r){if(P3e(r)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return L3e(r)}});var K_=de((JFt,OY)=>{"use strict";var R3e=J3(),F3e=m2();OY.exports=Object.keys||function(e){return R3e(e,F3e)}});var x2=de(IY=>{"use strict";var N3e=Li(),q3e=F3(),B3e=vl(),z3e=Eo(),j3e=Rc(),U3e=K_();IY.f=N3e&&!q3e?Object.defineProperties:function(e,t){z3e(e);for(var n=j3e(t),i=U3e(t),o=i.length,a=0,u;o>a;)B3e.f(e,u=i[a++],n[u]);return e}});var Q3=de((eNt,MY)=>{"use strict";var H3e=Gs();MY.exports=H3e("document","documentElement")});var Xh=de((tNt,BY)=>{"use strict";var W3e=Eo(),V3e=x2(),PY=m2(),$3e=H_(),K3e=Q3(),G3e=Jk(),Y3e=Qk(),LY=">",RY="<",tB="prototype",rB="script",NY=Y3e("IE_PROTO"),eB=function(){},qY=function(r){return RY+rB+LY+r+RY+"/"+rB+LY},FY=function(r){r.write(qY("")),r.close();var e=r.parentWindow.Object;return r=null,e},Z3e=function(){var r=G3e("iframe"),e="java"+rB+":",t;return r.style.display="none",K3e.appendChild(r),r.src=String(e),t=r.contentWindow.document,t.open(),t.write(qY("document.F=Object")),t.close(),t.F},_2,w2=function(){try{_2=new ActiveXObject("htmlfile")}catch{}w2=typeof document<"u"?document.domain&&_2?FY(_2):Z3e():FY(_2);for(var r=PY.length;r--;)delete w2[tB][PY[r]];return w2()};$3e[NY]=!0;BY.exports=Object.create||function(e,t){var n;return e!==null?(eB[tB]=W3e(e),n=new eB,eB[tB]=null,n[NY]=e):n=w2(),t===void 0?n:V3e.f(n,t)}});var Ap=de((rNt,zY)=>{"use strict";var X3e=fn();zY.exports=X3e([].slice)});var S2=de((nNt,HY)=>{"use strict";var J3e=jf(),Q3e=Rc(),jY=Fy().f,eBe=Ap(),UY=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],tBe=function(r){try{return jY(r)}catch{return eBe(UY)}};HY.exports.f=function(e){return UY&&J3e(e)==="Window"?tBe(e):jY(Q3e(e))}});var Jc=de((iNt,VY)=>{"use strict";var WY=p2(),rBe=vl();VY.exports=function(r,e,t){return t.get&&WY(t.get,e,{getter:!0}),t.set&&WY(t.set,e,{setter:!0}),rBe.f(r,e,t)}});var nB=de($Y=>{"use strict";var nBe=Jo();$Y.f=nBe});var k2=de((aNt,KY)=>{"use strict";var iBe=Wn();KY.exports=iBe});var vh=de((sNt,YY)=>{"use strict";var GY=k2(),oBe=ba(),aBe=nB(),sBe=vl().f;YY.exports=function(r){var e=GY.Symbol||(GY.Symbol={});oBe(e,r)||sBe(e,r,{value:aBe.f(r)})}});var iB=de((lNt,ZY)=>{"use strict";var lBe=yo(),uBe=Gs(),cBe=Jo(),fBe=nl();ZY.exports=function(){var r=uBe("Symbol"),e=r&&r.prototype,t=e&&e.valueOf,n=cBe("toPrimitive");e&&!e[n]&&fBe(e,n,function(i){return lBe(t,this)},{arity:1})}});var yh=de((uNt,JY)=>{"use strict";var hBe=vl().f,dBe=ba(),pBe=Jo(),XY=pBe("toStringTag");JY.exports=function(r,e,t){r&&!t&&(r=r.prototype),r&&!dBe(r,XY)&&hBe(r,XY,{configurable:!0,value:e})}});var Ny=de((cNt,QY)=>{"use strict";var mBe=jf(),gBe=fn();QY.exports=function(r){if(mBe(r)==="Function")return gBe(r)}});var Dp=de((fNt,tZ)=>{"use strict";var eZ=Ny(),vBe=gl(),yBe=j_(),bBe=eZ(eZ.bind);tZ.exports=function(r,e){return vBe(r),e===void 0?r:yBe?bBe(r,e):function(){return r.apply(e,arguments)}}});var yv=de((hNt,rZ)=>{"use strict";var xBe=jf();rZ.exports=Array.isArray||function(e){return xBe(e)==="Array"}});var k0=de((dNt,sZ)=>{"use strict";var _Be=fn(),wBe=on(),nZ=sa(),SBe=Sm(),kBe=Gs(),TBe=u2(),iZ=function(){},oZ=kBe("Reflect","construct"),oB=/^\s*(?:class|function)\b/,EBe=_Be(oB.exec),CBe=!oB.test(iZ),nT=function(e){if(!nZ(e))return!1;try{return oZ(iZ,[],e),!0}catch{return!1}},aZ=function(e){if(!nZ(e))return!1;switch(SBe(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return CBe||!!EBe(oB,TBe(e))}catch{return!0}};aZ.sham=!0;sZ.exports=!oZ||wBe(function(){var r;return nT(nT.call)||!nT(Object)||!nT(function(){r=!0})||r})?aZ:nT});var fZ=de((pNt,cZ)=>{"use strict";var lZ=yv(),ABe=k0(),DBe=Wo(),OBe=Jo(),IBe=OBe("species"),uZ=Array;cZ.exports=function(r){var e;return lZ(r)&&(e=r.constructor,ABe(e)&&(e===uZ||lZ(e.prototype))?e=void 0:DBe(e)&&(e=e[IBe],e===null&&(e=void 0))),e===void 0?uZ:e}});var G_=de((mNt,hZ)=>{"use strict";var MBe=fZ();hZ.exports=function(r,e){return new(MBe(r))(e===0?0:e)}});var Qc=de((gNt,pZ)=>{"use strict";var PBe=Dp(),LBe=fn(),RBe=y0(),FBe=za(),NBe=us(),qBe=G_(),dZ=LBe([].push),qy=function(r){var e=r===1,t=r===2,n=r===3,i=r===4,o=r===6,a=r===7,u=r===5||o;return function(h,p,_,T){for(var O=FBe(h),L=RBe(O),q=NBe(L),U=PBe(p,_),Z=0,te=T||qBe,ie=e?te(h,q):t||a?te(h,0):void 0,ue,S;q>Z;Z++)if((u||Z in L)&&(ue=L[Z],S=U(ue,Z,O),r))if(e)ie[Z]=S;else if(S)switch(r){case 3:return!0;case 5:return ue;case 6:return Z;case 2:dZ(ie,ue)}else switch(r){case 4:return!1;case 7:dZ(ie,ue)}return o?-1:n||i?i:ie}};pZ.exports={forEach:qy(0),map:qy(1),filter:qy(2),some:qy(3),every:qy(4),find:qy(5),findIndex:qy(6),filterReject:qy(7)}});var IZ=de(()=>{"use strict";var T2=Ut(),aT=Wn(),pB=yo(),BBe=fn(),zBe=jl(),Y_=Li(),Z_=b0(),jBe=on(),ef=ba(),UBe=Yh(),uB=Eo(),E2=Rc(),mB=ug(),HBe=oo(),cB=Hd(),X_=Xh(),vZ=K_(),WBe=Fy(),yZ=S2(),VBe=tT(),bZ=Uf(),xZ=vl(),$Be=x2(),_Z=Zk(),aB=nl(),KBe=Jc(),gB=x0(),GBe=Qk(),wZ=H_(),mZ=_0(),YBe=Jo(),ZBe=nB(),XBe=vh(),JBe=iB(),QBe=yh(),SZ=cc(),C2=Qc().forEach,Jh=GBe("hidden"),A2="Symbol",oT="prototype",eze=SZ.set,gZ=SZ.getterFor(A2),Op=Object[oT],T0=aT.Symbol,iT=T0&&T0[oT],tze=aT.RangeError,rze=aT.TypeError,sB=aT.QObject,kZ=bZ.f,E0=xZ.f,TZ=yZ.f,nze=_Z.f,EZ=BBe([].push),bv=gB("symbols"),sT=gB("op-symbols"),ize=gB("wks"),fB=!sB||!sB[oT]||!sB[oT].findChild,CZ=function(r,e,t){var n=kZ(Op,e);n&&delete Op[e],E0(r,e,t),n&&r!==Op&&E0(Op,e,n)},hB=Y_&&jBe(function(){return X_(E0({},"a",{get:function(){return E0(this,"a",{value:7}).a}})).a!==7})?CZ:E0,lB=function(r,e){var t=bv[r]=X_(iT);return eze(t,{type:A2,tag:r,description:e}),Y_||(t.description=e),t},D2=function(e,t,n){e===Op&&D2(sT,t,n),uB(e);var i=mB(t);return uB(n),ef(bv,i)?(n.enumerable?(ef(e,Jh)&&e[Jh][i]&&(e[Jh][i]=!1),n=X_(n,{enumerable:cB(0,!1)})):(ef(e,Jh)||E0(e,Jh,cB(1,X_(null))),e[Jh][i]=!0),hB(e,i,n)):E0(e,i,n)},vB=function(e,t){uB(e);var n=E2(t),i=vZ(n).concat(OZ(n));return C2(i,function(o){(!Y_||pB(dB,n,o))&&D2(e,o,n[o])}),e},oze=function(e,t){return t===void 0?X_(e):vB(X_(e),t)},dB=function(e){var t=mB(e),n=pB(nze,this,t);return this===Op&&ef(bv,t)&&!ef(sT,t)?!1:n||!ef(this,t)||!ef(bv,t)||ef(this,Jh)&&this[Jh][t]?n:!0},AZ=function(e,t){var n=E2(e),i=mB(t);if(!(n===Op&&ef(bv,i)&&!ef(sT,i))){var o=kZ(n,i);return o&&ef(bv,i)&&!(ef(n,Jh)&&n[Jh][i])&&(o.enumerable=!0),o}},DZ=function(e){var t=TZ(E2(e)),n=[];return C2(t,function(i){!ef(bv,i)&&!ef(wZ,i)&&EZ(n,i)}),n},OZ=function(r){var e=r===Op,t=TZ(e?sT:E2(r)),n=[];return C2(t,function(i){ef(bv,i)&&(!e||ef(Op,i))&&EZ(n,bv[i])}),n};Z_||(T0=function(){if(UBe(iT,this))throw new rze("Symbol is not a constructor");var e=!arguments.length||arguments[0]===void 0?void 0:HBe(arguments[0]),t=mZ(e),n=function(i){var o=this===void 0?aT:this;o===Op&&pB(n,sT,i),ef(o,Jh)&&ef(o[Jh],t)&&(o[Jh][t]=!1);var a=cB(1,i);try{hB(o,t,a)}catch(u){if(!(u instanceof tze))throw u;CZ(o,t,a)}};return Y_&&fB&&hB(Op,t,{configurable:!0,set:n}),lB(t,e)},iT=T0[oT],aB(iT,"toString",function(){return gZ(this).tag}),aB(T0,"withoutSetter",function(r){return lB(mZ(r),r)}),_Z.f=dB,xZ.f=D2,$Be.f=vB,bZ.f=AZ,WBe.f=yZ.f=DZ,VBe.f=OZ,ZBe.f=function(r){return lB(YBe(r),r)},Y_&&(KBe(iT,"description",{configurable:!0,get:function(){return gZ(this).description}}),zBe||aB(Op,"propertyIsEnumerable",dB,{unsafe:!0})));T2({global:!0,constructor:!0,wrap:!0,forced:!Z_,sham:!Z_},{Symbol:T0});C2(vZ(ize),function(r){XBe(r)});T2({target:A2,stat:!0,forced:!Z_},{useSetter:function(){fB=!0},useSimple:function(){fB=!1}});T2({target:"Object",stat:!0,forced:!Z_,sham:!Y_},{create:oze,defineProperty:D2,defineProperties:vB,getOwnPropertyDescriptor:AZ});T2({target:"Object",stat:!0,forced:!Z_},{getOwnPropertyNames:DZ});JBe();QBe(T0,A2);wZ[Jh]=!0});var yB=de((bNt,MZ)=>{"use strict";var aze=b0();MZ.exports=aze&&!!Symbol.for&&!!Symbol.keyFor});var LZ=de(()=>{"use strict";var sze=Ut(),lze=Gs(),uze=ba(),cze=oo(),PZ=x0(),fze=yB(),bB=PZ("string-to-symbol-registry"),hze=PZ("symbol-to-string-registry");sze({target:"Symbol",stat:!0,forced:!fze},{for:function(r){var e=cze(r);if(uze(bB,e))return bB[e];var t=lze("Symbol")(e);return bB[e]=t,hze[t]=e,t}})});var FZ=de(()=>{"use strict";var dze=Ut(),pze=ba(),mze=Ly(),gze=Ry(),vze=x0(),yze=yB(),RZ=vze("symbol-to-string-registry");dze({target:"Symbol",stat:!0,forced:!yze},{keyFor:function(e){if(!mze(e))throw new TypeError(gze(e)+" is not a symbol");if(pze(RZ,e))return RZ[e]}})});var Ip=de((kNt,zZ)=>{"use strict";var bze=j_(),BZ=Function.prototype,NZ=BZ.apply,qZ=BZ.call;zZ.exports=typeof Reflect=="object"&&Reflect.apply||(bze?qZ.bind(NZ):function(){return qZ.apply(NZ,arguments)})});var VZ=de((TNt,WZ)=>{"use strict";var xze=fn(),jZ=yv(),_ze=sa(),UZ=jf(),wze=oo(),HZ=xze([].push);WZ.exports=function(r){if(_ze(r))return r;if(!!jZ(r)){for(var e=r.length,t=[],n=0;n{"use strict";var Sze=Ut(),QZ=Gs(),eX=Ip(),kze=yo(),lT=fn(),tX=on(),$Z=sa(),KZ=Ly(),rX=Ap(),Tze=VZ(),Eze=b0(),Cze=String,By=QZ("JSON","stringify"),O2=lT(/./.exec),GZ=lT("".charAt),Aze=lT("".charCodeAt),Dze=lT("".replace),Oze=lT(1 .toString),Ize=/[\uD800-\uDFFF]/g,YZ=/^[\uD800-\uDBFF]$/,ZZ=/^[\uDC00-\uDFFF]$/,XZ=!Eze||tX(function(){var r=QZ("Symbol")("stringify detection");return By([r])!=="[null]"||By({a:r})!=="{}"||By(Object(r))!=="{}"}),JZ=tX(function(){return By("\uDF06\uD834")!=='"\\udf06\\ud834"'||By("\uDEAD")!=='"\\udead"'}),Mze=function(r,e){var t=rX(arguments),n=Tze(e);if(!(!$Z(n)&&(r===void 0||KZ(r))))return t[1]=function(i,o){if($Z(n)&&(o=kze(n,this,Cze(i),o)),!KZ(o))return o},eX(By,null,t)},Pze=function(r,e,t){var n=GZ(t,e-1),i=GZ(t,e+1);return O2(YZ,r)&&!O2(ZZ,i)||O2(ZZ,r)&&!O2(YZ,n)?"\\u"+Oze(Aze(r,0),16):r};By&&Sze({target:"JSON",stat:!0,arity:3,forced:XZ||JZ},{stringify:function(e,t,n){var i=rX(arguments),o=eX(XZ?Mze:By,null,i);return JZ&&typeof o=="string"?Dze(o,Ize,Pze):o}})});var iX=de(()=>{"use strict";var Lze=Ut(),Rze=b0(),Fze=on(),nX=tT(),Nze=za(),qze=!Rze||Fze(function(){nX.f(1)});Lze({target:"Object",stat:!0,forced:qze},{getOwnPropertySymbols:function(e){var t=nX.f;return t?t(Nze(e)):[]}})});var oX=de(()=>{"use strict";IZ();LZ();FZ();xB();iX()});var hX=de(()=>{"use strict";var Bze=Ut(),zze=Li(),jze=Wn(),I2=fn(),Uze=ba(),Hze=sa(),Wze=Yh(),Vze=oo(),$ze=Jc(),Kze=V_(),xv=jze.Symbol,C0=xv&&xv.prototype;zze&&Hze(xv)&&(!("description"in C0)||xv().description!==void 0)&&(_B={},uT=function(){var e=arguments.length<1||arguments[0]===void 0?void 0:Vze(arguments[0]),t=Wze(C0,this)?new xv(e):e===void 0?xv():xv(e);return e===""&&(_B[t]=!0),t},Kze(uT,xv),uT.prototype=C0,C0.constructor=uT,aX=String(xv("description detection"))==="Symbol(description detection)",sX=I2(C0.valueOf),lX=I2(C0.toString),uX=/^Symbol\((.*)\)[^)]+$/,cX=I2("".replace),fX=I2("".slice),$ze(C0,"description",{configurable:!0,get:function(){var e=sX(this);if(Uze(_B,e))return"";var t=lX(e),n=aX?fX(t,7,-1):cX(t,uX,"$1");return n===""?void 0:n}}),Bze({global:!0,constructor:!0,forced:!0},{Symbol:uT}));var _B,uT,aX,sX,lX,uX,cX,fX});var dX=de(()=>{"use strict";var Gze=vh();Gze("asyncIterator")});var pX=de(()=>{"use strict";var Yze=vh();Yze("hasInstance")});var mX=de(()=>{"use strict";var Zze=vh();Zze("isConcatSpreadable")});var gX=de(()=>{"use strict";var Xze=vh();Xze("iterator")});var vX=de(()=>{"use strict";var Jze=vh();Jze("match")});var yX=de(()=>{"use strict";var Qze=vh();Qze("matchAll")});var bX=de(()=>{"use strict";var e5e=vh();e5e("replace")});var xX=de(()=>{"use strict";var t5e=vh();t5e("search")});var _X=de(()=>{"use strict";var r5e=vh();r5e("species")});var wX=de(()=>{"use strict";var n5e=vh();n5e("split")});var SX=de(()=>{"use strict";var i5e=vh(),o5e=iB();i5e("toPrimitive");o5e()});var kX=de(()=>{"use strict";var a5e=Gs(),s5e=vh(),l5e=yh();s5e("toStringTag");l5e(a5e("Symbol"),"Symbol")});var TX=de(()=>{"use strict";var u5e=vh();u5e("unscopables")});var CX=de((aqt,EX)=>{"use strict";var c5e=fn(),f5e=gl();EX.exports=function(r,e,t){try{return c5e(f5e(Object.getOwnPropertyDescriptor(r,e)[t]))}catch{}}});var wB=de((sqt,AX)=>{"use strict";var h5e=Wo();AX.exports=function(r){return h5e(r)||r===null}});var SB=de((lqt,DX)=>{"use strict";var d5e=wB(),p5e=String,m5e=TypeError;DX.exports=function(r){if(d5e(r))return r;throw new m5e("Can't set "+p5e(r)+" as a prototype")}});var km=de((uqt,OX)=>{"use strict";var g5e=CX(),v5e=Eo(),y5e=SB();OX.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var r=!1,e={},t;try{t=g5e(Object.prototype,"__proto__","set"),t(e,[]),r=e instanceof Array}catch{}return function(i,o){return v5e(i),y5e(o),r?t(i,o):i.__proto__=o,i}}():void 0)});var kB=de((cqt,IX)=>{"use strict";var b5e=vl().f;IX.exports=function(r,e,t){t in r||b5e(r,t,{configurable:!0,get:function(){return e[t]},set:function(n){e[t]=n}})}});var zy=de((fqt,PX)=>{"use strict";var x5e=sa(),_5e=Wo(),MX=km();PX.exports=function(r,e,t){var n,i;return MX&&x5e(n=e.constructor)&&n!==t&&_5e(i=n.prototype)&&i!==t.prototype&&MX(r,i),r}});var J_=de((hqt,LX)=>{"use strict";var w5e=oo();LX.exports=function(r,e){return r===void 0?arguments.length<2?"":e:w5e(r)}});var TB=de((dqt,RX)=>{"use strict";var S5e=Wo(),k5e=Hf();RX.exports=function(r,e){S5e(e)&&"cause"in e&&k5e(r,"cause",e.cause)}});var M2=de((pqt,qX)=>{"use strict";var T5e=fn(),FX=Error,E5e=T5e("".replace),C5e=function(r){return String(new FX(r).stack)}("zxcasd"),NX=/\n\s*at [^:]*:[^\n]*/,A5e=NX.test(C5e);qX.exports=function(r,e){if(A5e&&typeof r=="string"&&!FX.prepareStackTrace)for(;e--;)r=E5e(r,NX,"");return r}});var EB=de((mqt,BX)=>{"use strict";var D5e=on(),O5e=Hd();BX.exports=!D5e(function(){var r=new Error("a");return"stack"in r?(Object.defineProperty(r,"stack",O5e(1,7)),r.stack!==7):!0})});var CB=de((gqt,jX)=>{"use strict";var I5e=Hf(),M5e=M2(),P5e=EB(),zX=Error.captureStackTrace;jX.exports=function(r,e,t,n){P5e&&(zX?zX(r,e):I5e(r,"stack",M5e(t,n)))}});var AB=de((vqt,GX)=>{"use strict";var UX=Gs(),L5e=ba(),HX=Hf(),R5e=Yh(),WX=km(),VX=V_(),$X=kB(),F5e=zy(),N5e=J_(),q5e=TB(),B5e=CB(),z5e=Li(),KX=jl();GX.exports=function(r,e,t,n){var i="stackTraceLimit",o=n?2:1,a=r.split("."),u=a[a.length-1],h=UX.apply(null,a);if(!!h){var p=h.prototype;if(!KX&&L5e(p,"cause")&&delete p.cause,!t)return h;var _=UX("Error"),T=e(function(O,L){var q=N5e(n?L:O,void 0),U=n?new h(O):new h;return q!==void 0&&HX(U,"message",q),B5e(U,T,U.stack,2),this&&R5e(p,this)&&F5e(U,this,T),arguments.length>o&&q5e(U,arguments[o]),U});if(T.prototype=p,u!=="Error"?WX?WX(T,_):VX(T,_,{name:!0}):z5e&&i in h&&($X(T,h,i),$X(T,h,"prepareStackTrace")),VX(T,h),!KX)try{p.name!==u&&HX(p,"name",u),p.constructor=T}catch{}return T}}});var JX=de(()=>{"use strict";var ZX=Ut(),j5e=Wn(),fg=Ip(),XX=AB(),DB="WebAssembly",YX=j5e[DB],P2=new Error("e",{cause:7}).cause!==7,A0=function(r,e){var t={};t[r]=XX(r,e,P2),ZX({global:!0,constructor:!0,arity:1,forced:P2},t)},OB=function(r,e){if(YX&&YX[r]){var t={};t[r]=XX(DB+"."+r,e,P2),ZX({target:DB,stat:!0,constructor:!0,arity:1,forced:P2},t)}};A0("Error",function(r){return function(t){return fg(r,this,arguments)}});A0("EvalError",function(r){return function(t){return fg(r,this,arguments)}});A0("RangeError",function(r){return function(t){return fg(r,this,arguments)}});A0("ReferenceError",function(r){return function(t){return fg(r,this,arguments)}});A0("SyntaxError",function(r){return function(t){return fg(r,this,arguments)}});A0("TypeError",function(r){return function(t){return fg(r,this,arguments)}});A0("URIError",function(r){return function(t){return fg(r,this,arguments)}});OB("CompileError",function(r){return function(t){return fg(r,this,arguments)}});OB("LinkError",function(r){return function(t){return fg(r,this,arguments)}});OB("RuntimeError",function(r){return function(t){return fg(r,this,arguments)}})});var IB=de((xqt,eJ)=>{"use strict";var U5e=Li(),H5e=on(),W5e=Eo(),QX=J_(),L2=Error.prototype.toString,V5e=H5e(function(){if(U5e){var r=Object.create(Object.defineProperty({},"name",{get:function(){return this===r}}));if(L2.call(r)!=="true")return!0}return L2.call({message:1,name:2})!=="2: 1"||L2.call({})!=="Error"});eJ.exports=V5e?function(){var e=W5e(this),t=QX(e.name,"Error"),n=QX(e.message);return t?n?t+": "+n:t:n}:L2});var nJ=de(()=>{"use strict";var $5e=nl(),tJ=IB(),rJ=Error.prototype;rJ.toString!==tJ&&$5e(rJ,"toString",tJ)});var R2=de((Sqt,iJ)=>{"use strict";var K5e=on();iJ.exports=!K5e(function(){function r(){}return r.prototype.constructor=null,Object.getPrototypeOf(new r)!==r.prototype})});var Wd=de((kqt,aJ)=>{"use strict";var G5e=ba(),Y5e=sa(),Z5e=za(),X5e=Qk(),J5e=R2(),oJ=X5e("IE_PROTO"),MB=Object,Q5e=MB.prototype;aJ.exports=J5e?MB.getPrototypeOf:function(r){var e=Z5e(r);if(G5e(e,oJ))return e[oJ];var t=e.constructor;return Y5e(t)&&e instanceof t?t.prototype:e instanceof MB?Q5e:null}});var Q_=de((Tqt,sJ)=>{"use strict";sJ.exports={}});var F2=de((Eqt,lJ)=>{"use strict";var e4e=Jo(),t4e=Q_(),r4e=e4e("iterator"),n4e=Array.prototype;lJ.exports=function(r){return r!==void 0&&(t4e.Array===r||n4e[r4e]===r)}});var e1=de((Cqt,cJ)=>{"use strict";var i4e=Sm(),uJ=lg(),o4e=gh(),a4e=Q_(),s4e=Jo(),l4e=s4e("iterator");cJ.exports=function(r){if(!o4e(r))return uJ(r,l4e)||uJ(r,"@@iterator")||a4e[i4e(r)]}});var cT=de((Aqt,fJ)=>{"use strict";var u4e=yo(),c4e=gl(),f4e=Eo(),h4e=Ry(),d4e=e1(),p4e=TypeError;fJ.exports=function(r,e){var t=arguments.length<2?d4e(r):e;if(c4e(t))return f4e(u4e(t,r));throw new p4e(h4e(r)+" is not iterable")}});var PB=de((Dqt,dJ)=>{"use strict";var m4e=yo(),hJ=Eo(),g4e=lg();dJ.exports=function(r,e,t){var n,i;hJ(r);try{if(n=g4e(r,"return"),!n){if(e==="throw")throw t;return t}n=m4e(n,r)}catch(o){i=!0,n=o}if(e==="throw")throw t;if(i)throw n;return hJ(n),t}});var Vd=de((Oqt,vJ)=>{"use strict";var v4e=Dp(),y4e=yo(),b4e=Eo(),x4e=Ry(),_4e=F2(),w4e=us(),pJ=Yh(),S4e=cT(),k4e=e1(),mJ=PB(),T4e=TypeError,N2=function(r,e){this.stopped=r,this.result=e},gJ=N2.prototype;vJ.exports=function(r,e,t){var n=t&&t.that,i=!!(t&&t.AS_ENTRIES),o=!!(t&&t.IS_RECORD),a=!!(t&&t.IS_ITERATOR),u=!!(t&&t.INTERRUPTED),h=v4e(e,n),p,_,T,O,L,q,U,Z=function(ie){return p&&mJ(p,"normal",ie),new N2(!0,ie)},te=function(ie){return i?(b4e(ie),u?h(ie[0],ie[1],Z):h(ie[0],ie[1])):u?h(ie,Z):h(ie)};if(o)p=r.iterator;else if(a)p=r;else{if(_=k4e(r),!_)throw new T4e(x4e(r)+" is not iterable");if(_4e(_)){for(T=0,O=w4e(r);O>T;T++)if(L=te(r[T]),L&&pJ(gJ,L))return L;return new N2(!1)}p=S4e(r,_)}for(q=o?r.next:p.next;!(U=y4e(q,p)).done;){try{L=te(U.value)}catch(ie){mJ(p,"throw",ie)}if(typeof L=="object"&&L&&pJ(gJ,L))return L}return new N2(!1)}});var bJ=de(()=>{"use strict";var E4e=Ut(),C4e=Yh(),A4e=Wd(),q2=km(),D4e=V_(),yJ=Xh(),LB=Hf(),RB=Hd(),O4e=TB(),I4e=CB(),M4e=Vd(),P4e=J_(),L4e=Jo(),R4e=L4e("toStringTag"),B2=Error,F4e=[].push,t1=function(e,t){var n=C4e(FB,this),i;q2?i=q2(new B2,n?A4e(this):FB):(i=n?this:yJ(FB),LB(i,R4e,"Error")),t!==void 0&&LB(i,"message",P4e(t)),I4e(i,t1,i.stack,1),arguments.length>2&&O4e(i,arguments[2]);var o=[];return M4e(e,F4e,{that:o}),LB(i,"errors",o),i};q2?q2(t1,B2):D4e(t1,B2,{name:!0});var FB=t1.prototype=yJ(B2.prototype,{constructor:RB(1,t1),message:RB(1,""),name:RB(1,"AggregateError")});E4e({global:!0,constructor:!0,arity:2},{AggregateError:t1})});var xJ=de(()=>{"use strict";bJ()});var kJ=de(()=>{"use strict";var N4e=Ut(),q4e=Gs(),B4e=Ip(),_J=on(),z4e=AB(),NB="AggregateError",wJ=q4e(NB),SJ=!_J(function(){return wJ([1]).errors[0]!==1})&&_J(function(){return wJ([1],NB,{cause:7}).cause!==7});N4e({global:!0,constructor:!0,arity:2,forced:SJ},{AggregateError:z4e(NB,function(r){return function(t,n){return B4e(r,this,arguments)}},SJ,!0)})});var bh=de((Nqt,TJ)=>{"use strict";var j4e=Jo(),U4e=Xh(),H4e=vl().f,qB=j4e("unscopables"),BB=Array.prototype;BB[qB]===void 0&&H4e(BB,qB,{configurable:!0,value:U4e(null)});TJ.exports=function(r){BB[qB][r]=!0}});var EJ=de(()=>{"use strict";var W4e=Ut(),V4e=za(),$4e=us(),K4e=gu(),G4e=bh();W4e({target:"Array",proto:!0},{at:function(e){var t=V4e(this),n=$4e(t),i=K4e(e),o=i>=0?i:n+i;return o<0||o>=n?void 0:t[o]}});G4e("at")});var D0=de((zqt,CJ)=>{"use strict";var Y4e=TypeError,Z4e=9007199254740991;CJ.exports=function(r){if(r>Z4e)throw Y4e("Maximum allowed index exceeded");return r}});var _v=de((jqt,AJ)=>{"use strict";var X4e=ug(),J4e=vl(),Q4e=Hd();AJ.exports=function(r,e,t){var n=X4e(e);n in r?J4e.f(r,n,Q4e(0,t)):r[n]=t}});var r1=de((Uqt,DJ)=>{"use strict";var eje=on(),tje=Jo(),rje=sg(),nje=tje("species");DJ.exports=function(r){return rje>=51||!eje(function(){var e=[],t=e.constructor={};return t[nje]=function(){return{foo:1}},e[r](Boolean).foo!==1})}});var PJ=de(()=>{"use strict";var ije=Ut(),oje=on(),aje=yv(),sje=Wo(),lje=za(),uje=us(),OJ=D0(),IJ=_v(),cje=G_(),fje=r1(),hje=Jo(),dje=sg(),MJ=hje("isConcatSpreadable"),pje=dje>=51||!oje(function(){var r=[];return r[MJ]=!1,r.concat()[0]!==r}),mje=function(r){if(!sje(r))return!1;var e=r[MJ];return e!==void 0?!!e:aje(r)},gje=!pje||!fje("concat");ije({target:"Array",proto:!0,arity:1,forced:gje},{concat:function(e){var t=lje(this),n=cje(t,0),i=0,o,a,u,h,p;for(o=-1,u=arguments.length;o{"use strict";var LJ=Ry(),vje=TypeError;RJ.exports=function(r,e){if(!delete r[e])throw new vje("Cannot delete property "+LJ(e)+" of "+LJ(r))}});var jB=de(($qt,FJ)=>{"use strict";var yje=za(),zB=cg(),bje=us(),xje=fT(),_je=Math.min;FJ.exports=[].copyWithin||function(e,t){var n=yje(this),i=bje(n),o=zB(e,i),a=zB(t,i),u=arguments.length>2?arguments[2]:void 0,h=_je((u===void 0?i:zB(u,i))-a,i-o),p=1;for(a0;)a in n?n[o]=n[a]:xje(n,o),o+=p,a+=p;return n}});var NJ=de(()=>{"use strict";var wje=Ut(),Sje=jB(),kje=bh();wje({target:"Array",proto:!0},{copyWithin:Sje});kje("copyWithin")});var hg=de((Yqt,qJ)=>{"use strict";var Tje=on();qJ.exports=function(r,e){var t=[][r];return!!t&&Tje(function(){t.call(null,e||function(){return 1},1)})}});var BJ=de(()=>{"use strict";var Eje=Ut(),Cje=Qc().every,Aje=hg(),Dje=Aje("every");Eje({target:"Array",proto:!0,forced:!Dje},{every:function(e){return Cje(this,e,arguments.length>1?arguments[1]:void 0)}})});var z2=de((Jqt,jJ)=>{"use strict";var Oje=za(),zJ=cg(),Ije=us();jJ.exports=function(e){for(var t=Oje(this),n=Ije(t),i=arguments.length,o=zJ(i>1?arguments[1]:void 0,n),a=i>2?arguments[2]:void 0,u=a===void 0?n:zJ(a,n);u>o;)t[o++]=e;return t}});var UJ=de(()=>{"use strict";var Mje=Ut(),Pje=z2(),Lje=bh();Mje({target:"Array",proto:!0},{fill:Pje});Lje("fill")});var HJ=de(()=>{"use strict";var Rje=Ut(),Fje=Qc().filter,Nje=r1(),qje=Nje("filter");Rje({target:"Array",proto:!0,forced:!qje},{filter:function(e){return Fje(this,e,arguments.length>1?arguments[1]:void 0)}})});var VJ=de(()=>{"use strict";var Bje=Ut(),zje=Qc().find,jje=bh(),UB="find",WJ=!0;UB in[]&&Array(1)[UB](function(){WJ=!1});Bje({target:"Array",proto:!0,forced:WJ},{find:function(e){return zje(this,e,arguments.length>1?arguments[1]:void 0)}});jje(UB)});var KJ=de(()=>{"use strict";var Uje=Ut(),Hje=Qc().findIndex,Wje=bh(),HB="findIndex",$J=!0;HB in[]&&Array(1)[HB](function(){$J=!1});Uje({target:"Array",proto:!0,forced:$J},{findIndex:function(e){return Hje(this,e,arguments.length>1?arguments[1]:void 0)}});Wje(HB)});var hT=de((s3t,YJ)=>{"use strict";var Vje=Dp(),$je=y0(),Kje=za(),Gje=us(),GJ=function(r){var e=r===1;return function(t,n,i){for(var o=Kje(t),a=$je(o),u=Gje(a),h=Vje(n,i),p,_;u-- >0;)if(p=a[u],_=h(p,u,o),_)switch(r){case 0:return p;case 1:return u}return e?-1:void 0}};YJ.exports={findLast:GJ(0),findLastIndex:GJ(1)}});var ZJ=de(()=>{"use strict";var Yje=Ut(),Zje=hT().findLast,Xje=bh();Yje({target:"Array",proto:!0},{findLast:function(e){return Zje(this,e,arguments.length>1?arguments[1]:void 0)}});Xje("findLast")});var XJ=de(()=>{"use strict";var Jje=Ut(),Qje=hT().findLastIndex,e6e=bh();Jje({target:"Array",proto:!0},{findLastIndex:function(e){return Qje(this,e,arguments.length>1?arguments[1]:void 0)}});e6e("findLastIndex")});var WB=de((h3t,QJ)=>{"use strict";var t6e=yv(),r6e=us(),n6e=D0(),i6e=Dp(),JJ=function(r,e,t,n,i,o,a,u){for(var h=i,p=0,_=a?i6e(a,u):!1,T,O;p0&&t6e(T)?(O=r6e(T),h=JJ(r,e,T,O,h,o-1)-1):(n6e(h+1),r[h]=T),h++),p++;return h};QJ.exports=JJ});var eQ=de(()=>{"use strict";var o6e=Ut(),a6e=WB(),s6e=za(),l6e=us(),u6e=gu(),c6e=G_();o6e({target:"Array",proto:!0},{flat:function(){var e=arguments.length?arguments[0]:void 0,t=s6e(this),n=l6e(t),i=c6e(t,0);return i.length=a6e(i,t,t,n,0,e===void 0?1:u6e(e)),i}})});var tQ=de(()=>{"use strict";var f6e=Ut(),h6e=WB(),d6e=gl(),p6e=za(),m6e=us(),g6e=G_();f6e({target:"Array",proto:!0},{flatMap:function(e){var t=p6e(this),n=m6e(t),i;return d6e(e),i=g6e(t,0),i.length=h6e(i,t,t,n,0,1,e,arguments.length>1?arguments[1]:void 0),i}})});var VB=de((v3t,rQ)=>{"use strict";var v6e=Qc().forEach,y6e=hg(),b6e=y6e("forEach");rQ.exports=b6e?[].forEach:function(e){return v6e(this,e,arguments.length>1?arguments[1]:void 0)}});var iQ=de(()=>{"use strict";var x6e=Ut(),nQ=VB();x6e({target:"Array",proto:!0,forced:[].forEach!==nQ},{forEach:nQ})});var aQ=de((x3t,oQ)=>{"use strict";var _6e=Eo(),w6e=PB();oQ.exports=function(r,e,t,n){try{return n?e(_6e(t)[0],t[1]):e(t)}catch(i){w6e(r,"throw",i)}}});var $B=de((_3t,uQ)=>{"use strict";var S6e=Dp(),k6e=yo(),T6e=za(),E6e=aQ(),C6e=F2(),A6e=k0(),D6e=us(),sQ=_v(),O6e=cT(),I6e=e1(),lQ=Array;uQ.exports=function(e){var t=T6e(e),n=A6e(this),i=arguments.length,o=i>1?arguments[1]:void 0,a=o!==void 0;a&&(o=S6e(o,i>2?arguments[2]:void 0));var u=I6e(t),h=0,p,_,T,O,L,q;if(u&&!(this===lQ&&C6e(u)))for(O=O6e(t,u),L=O.next,_=n?new this:[];!(T=k6e(L,O)).done;h++)q=a?E6e(O,o,[T.value,h],!0):T.value,sQ(_,h,q);else for(p=D6e(t),_=n?new this(p):lQ(p);p>h;h++)q=a?o(t[h],h):t[h],sQ(_,h,q);return _.length=h,_}});var dT=de((w3t,dQ)=>{"use strict";var M6e=Jo(),fQ=M6e("iterator"),hQ=!1;try{cQ=0,KB={next:function(){return{done:!!cQ++}},return:function(){hQ=!0}},KB[fQ]=function(){return this},Array.from(KB,function(){throw 2})}catch{}var cQ,KB;dQ.exports=function(r,e){try{if(!e&&!hQ)return!1}catch{return!1}var t=!1;try{var n={};n[fQ]=function(){return{next:function(){return{done:t=!0}}}},r(n)}catch{}return t}});var pQ=de(()=>{"use strict";var P6e=Ut(),L6e=$B(),R6e=dT(),F6e=!R6e(function(r){Array.from(r)});P6e({target:"Array",stat:!0,forced:F6e},{from:L6e})});var mQ=de(()=>{"use strict";var N6e=Ut(),q6e=W_().includes,B6e=on(),z6e=bh(),j6e=B6e(function(){return!Array(1).includes()});N6e({target:"Array",proto:!0,forced:j6e},{includes:function(e){return q6e(this,e,arguments.length>1?arguments[1]:void 0)}});z6e("includes")});var vQ=de(()=>{"use strict";var U6e=Ut(),H6e=Ny(),W6e=W_().indexOf,V6e=hg(),GB=H6e([].indexOf),gQ=!!GB&&1/GB([1],1,-0)<0,$6e=gQ||!V6e("indexOf");U6e({target:"Array",proto:!0,forced:$6e},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return gQ?GB(this,e,t)||0:W6e(this,e,t)}})});var yQ=de(()=>{"use strict";var K6e=Ut(),G6e=yv();K6e({target:"Array",stat:!0},{isArray:G6e})});var JB=de((I3t,_Q)=>{"use strict";var Y6e=on(),Z6e=sa(),X6e=Wo(),J6e=Xh(),bQ=Wd(),Q6e=nl(),eUe=Jo(),tUe=jl(),XB=eUe("iterator"),xQ=!1,wv,YB,ZB;[].keys&&(ZB=[].keys(),"next"in ZB?(YB=bQ(bQ(ZB)),YB!==Object.prototype&&(wv=YB)):xQ=!0);var rUe=!X6e(wv)||Y6e(function(){var r={};return wv[XB].call(r)!==r});rUe?wv={}:tUe&&(wv=J6e(wv));Z6e(wv[XB])||Q6e(wv,XB,function(){return this});_Q.exports={IteratorPrototype:wv,BUGGY_SAFARI_ITERATORS:xQ}});var j2=de((M3t,wQ)=>{"use strict";var nUe=JB().IteratorPrototype,iUe=Xh(),oUe=Hd(),aUe=yh(),sUe=Q_(),lUe=function(){return this};wQ.exports=function(r,e,t,n){var i=e+" Iterator";return r.prototype=iUe(nUe,{next:oUe(+!n,t)}),aUe(r,i,!1,!0),sUe[i]=lUe,r}});var W2=de((P3t,MQ)=>{"use strict";var uUe=Ut(),cUe=yo(),U2=jl(),OQ=w0(),fUe=sa(),hUe=j2(),SQ=Wd(),kQ=km(),dUe=yh(),pUe=Hf(),QB=nl(),mUe=Jo(),TQ=Q_(),IQ=JB(),gUe=OQ.PROPER,vUe=OQ.CONFIGURABLE,EQ=IQ.IteratorPrototype,H2=IQ.BUGGY_SAFARI_ITERATORS,pT=mUe("iterator"),CQ="keys",mT="values",AQ="entries",DQ=function(){return this};MQ.exports=function(r,e,t,n,i,o,a){hUe(t,e,n);var u=function(te){if(te===i&&O)return O;if(!H2&&te&&te in _)return _[te];switch(te){case CQ:return function(){return new t(this,te)};case mT:return function(){return new t(this,te)};case AQ:return function(){return new t(this,te)}}return function(){return new t(this)}},h=e+" Iterator",p=!1,_=r.prototype,T=_[pT]||_["@@iterator"]||i&&_[i],O=!H2&&T||u(i),L=e==="Array"&&_.entries||T,q,U,Z;if(L&&(q=SQ(L.call(new r)),q!==Object.prototype&&q.next&&(!U2&&SQ(q)!==EQ&&(kQ?kQ(q,EQ):fUe(q[pT])||QB(q,pT,DQ)),dUe(q,h,!0,!0),U2&&(TQ[h]=DQ))),gUe&&i===mT&&T&&T.name!==mT&&(!U2&&vUe?pUe(_,"name",mT):(p=!0,O=function(){return cUe(T,this)})),i)if(U={values:u(mT),keys:o?O:u(CQ),entries:u(AQ)},a)for(Z in U)(H2||p||!(Z in _))&&QB(_,Z,U[Z]);else uUe({target:e,proto:!0,forced:H2||p},U);return(!U2||a)&&_[pT]!==O&&QB(_,pT,O,{name:i}),TQ[e]=O,U}});var n1=de((L3t,PQ)=>{"use strict";PQ.exports=function(r,e){return{value:r,done:e}}});var gT=de((R3t,qQ)=>{"use strict";var yUe=Rc(),ez=bh(),LQ=Q_(),FQ=cc(),bUe=vl().f,xUe=W2(),V2=n1(),_Ue=jl(),wUe=Li(),NQ="Array Iterator",SUe=FQ.set,kUe=FQ.getterFor(NQ);qQ.exports=xUe(Array,"Array",function(r,e){SUe(this,{type:NQ,target:yUe(r),index:0,kind:e})},function(){var r=kUe(this),e=r.target,t=r.index++;if(!e||t>=e.length)return r.target=void 0,V2(void 0,!0);switch(r.kind){case"keys":return V2(t,!1);case"values":return V2(e[t],!1)}return V2([t,e[t]],!1)},"values");var RQ=LQ.Arguments=LQ.Array;ez("keys");ez("values");ez("entries");if(!_Ue&&wUe&&RQ.name!=="values")try{bUe(RQ,"name",{value:"values"})}catch{}});var BQ=de(()=>{"use strict";var TUe=Ut(),EUe=fn(),CUe=y0(),AUe=Rc(),DUe=hg(),OUe=EUe([].join),IUe=CUe!==Object,MUe=IUe||!DUe("join",",");TUe({target:"Array",proto:!0,forced:MUe},{join:function(e){return OUe(AUe(this),e===void 0?",":e)}})});var rz=de((q3t,jQ)=>{"use strict";var PUe=Ip(),LUe=Rc(),RUe=gu(),FUe=us(),NUe=hg(),qUe=Math.min,tz=[].lastIndexOf,zQ=!!tz&&1/[1].lastIndexOf(1,-0)<0,BUe=NUe("lastIndexOf"),zUe=zQ||!BUe;jQ.exports=zUe?function(e){if(zQ)return PUe(tz,this,arguments)||0;var t=LUe(this),n=FUe(t),i=n-1;for(arguments.length>1&&(i=qUe(i,RUe(arguments[1]))),i<0&&(i=n+i);i>=0;i--)if(i in t&&t[i]===e)return i||0;return-1}:tz});var HQ=de(()=>{"use strict";var jUe=Ut(),UQ=rz();jUe({target:"Array",proto:!0,forced:UQ!==[].lastIndexOf},{lastIndexOf:UQ})});var WQ=de(()=>{"use strict";var UUe=Ut(),HUe=Qc().map,WUe=r1(),VUe=WUe("map");UUe({target:"Array",proto:!0,forced:!VUe},{map:function(e){return HUe(this,e,arguments.length>1?arguments[1]:void 0)}})});var $Q=de(()=>{"use strict";var $Ue=Ut(),KUe=on(),GUe=k0(),YUe=_v(),VQ=Array,ZUe=KUe(function(){function r(){}return!(VQ.of.call(r)instanceof r)});$Ue({target:"Array",stat:!0,forced:ZUe},{of:function(){for(var e=0,t=arguments.length,n=new(GUe(this)?this:VQ)(t);t>e;)YUe(n,e,arguments[e++]);return n.length=t,n}})});var $2=de((V3t,KQ)=>{"use strict";var XUe=Li(),JUe=yv(),QUe=TypeError,eHe=Object.getOwnPropertyDescriptor,tHe=XUe&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(r){return r instanceof TypeError}}();KQ.exports=tHe?function(r,e){if(JUe(r)&&!eHe(r,"length").writable)throw new QUe("Cannot set read only .length");return r.length=e}:function(r,e){return r.length=e}});var GQ=de(()=>{"use strict";var rHe=Ut(),nHe=za(),iHe=us(),oHe=$2(),aHe=D0(),sHe=on(),lHe=sHe(function(){return[].push.call({length:4294967296},1)!==4294967297}),uHe=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(r){return r instanceof TypeError}},cHe=lHe||!uHe();rHe({target:"Array",proto:!0,arity:1,forced:cHe},{push:function(e){var t=nHe(this),n=iHe(t),i=arguments.length;aHe(n+i);for(var o=0;o{"use strict";var fHe=gl(),hHe=za(),dHe=y0(),pHe=us(),mHe=TypeError,YQ=function(r){return function(e,t,n,i){var o=hHe(e),a=dHe(o),u=pHe(o);fHe(t);var h=r?u-1:0,p=r?-1:1;if(n<2)for(;;){if(h in a){i=a[h],h+=p;break}if(h+=p,r?h<0:u<=h)throw new mHe("Reduce of empty array with no initial value")}for(;r?h>=0:u>h;h+=p)h in a&&(i=t(i,a[h],h,o));return i}};ZQ.exports={left:YQ(!1),right:YQ(!0)}});var Sv=de((Y3t,XQ)=>{"use strict";var gHe=Wn(),vHe=jf();XQ.exports=vHe(gHe.process)==="process"});var QQ=de(()=>{"use strict";var yHe=Ut(),bHe=vT().left,xHe=hg(),JQ=sg(),_He=Sv(),wHe=!_He&&JQ>79&&JQ<83,SHe=wHe||!xHe("reduce");yHe({target:"Array",proto:!0,forced:SHe},{reduce:function(e){var t=arguments.length;return bHe(this,e,t,t>1?arguments[1]:void 0)}})});var tee=de(()=>{"use strict";var kHe=Ut(),THe=vT().right,EHe=hg(),eee=sg(),CHe=Sv(),AHe=!CHe&&eee>79&&eee<83,DHe=AHe||!EHe("reduceRight");kHe({target:"Array",proto:!0,forced:DHe},{reduceRight:function(e){return THe(this,e,arguments.length,arguments.length>1?arguments[1]:void 0)}})});var nee=de(()=>{"use strict";var OHe=Ut(),IHe=fn(),MHe=yv(),PHe=IHe([].reverse),ree=[1,2];OHe({target:"Array",proto:!0,forced:String(ree)===String(ree.reverse())},{reverse:function(){return MHe(this)&&(this.length=this.length),PHe(this)}})});var aee=de(()=>{"use strict";var LHe=Ut(),iee=yv(),RHe=k0(),FHe=Wo(),oee=cg(),NHe=us(),qHe=Rc(),BHe=_v(),zHe=Jo(),jHe=r1(),UHe=Ap(),HHe=jHe("slice"),WHe=zHe("species"),nz=Array,VHe=Math.max;LHe({target:"Array",proto:!0,forced:!HHe},{slice:function(e,t){var n=qHe(this),i=NHe(n),o=oee(e,i),a=oee(t===void 0?i:t,i),u,h,p;if(iee(n)&&(u=n.constructor,RHe(u)&&(u===nz||iee(u.prototype))?u=void 0:FHe(u)&&(u=u[WHe],u===null&&(u=void 0)),u===nz||u===void 0))return UHe(n,o,a);for(h=new(u===void 0?nz:u)(VHe(a-o,0)),p=0;o{"use strict";var $He=Ut(),KHe=Qc().some,GHe=hg(),YHe=GHe("some");$He({target:"Array",proto:!0,forced:!YHe},{some:function(e){return KHe(this,e,arguments.length>1?arguments[1]:void 0)}})});var K2=de((aBt,uee)=>{"use strict";var lee=Ap(),ZHe=Math.floor,iz=function(r,e){var t=r.length;if(t<8)for(var n=1,i,o;n0;)r[o]=r[--o];o!==n++&&(r[o]=i)}else for(var a=ZHe(t/2),u=iz(lee(r,0,a),e),h=iz(lee(r,a),e),p=u.length,_=h.length,T=0,O=0;T{"use strict";var XHe=ag(),cee=XHe.match(/firefox\/(\d+)/i);fee.exports=!!cee&&+cee[1]});var az=de((lBt,hee)=>{"use strict";var JHe=ag();hee.exports=/MSIE|Trident/.test(JHe)});var G2=de((uBt,pee)=>{"use strict";var QHe=ag(),dee=QHe.match(/AppleWebKit\/(\d+)\./);pee.exports=!!dee&&+dee[1]});var See=de(()=>{"use strict";var eWe=Ut(),_ee=fn(),tWe=gl(),rWe=za(),mee=us(),nWe=fT(),gee=oo(),sz=on(),iWe=K2(),oWe=hg(),vee=oz(),aWe=az(),yee=sg(),bee=G2(),jy=[],xee=_ee(jy.sort),sWe=_ee(jy.push),lWe=sz(function(){jy.sort(void 0)}),uWe=sz(function(){jy.sort(null)}),cWe=oWe("sort"),wee=!sz(function(){if(yee)return yee<70;if(!(vee&&vee>3)){if(aWe)return!0;if(bee)return bee<603;var r="",e,t,n,i;for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(i=0;i<47;i++)jy.push({k:t+i,v:n})}for(jy.sort(function(o,a){return a.v-o.v}),i=0;igee(t)?1:-1}};eWe({target:"Array",proto:!0,forced:fWe},{sort:function(e){e!==void 0&&tWe(e);var t=rWe(this);if(wee)return e===void 0?xee(t):xee(t,e);var n=[],i=mee(t),o,a;for(a=0;a{"use strict";var dWe=Gs(),pWe=Jc(),mWe=Jo(),gWe=Li(),kee=mWe("species");Tee.exports=function(r){var e=dWe(r);gWe&&e&&!e[kee]&&pWe(e,kee,{configurable:!0,get:function(){return this}})}});var Eee=de(()=>{"use strict";var vWe=O0();vWe("Array")});var Cee=de(()=>{"use strict";var yWe=Ut(),bWe=za(),xWe=cg(),_We=gu(),wWe=us(),SWe=$2(),kWe=D0(),TWe=G_(),EWe=_v(),lz=fT(),CWe=r1(),AWe=CWe("splice"),DWe=Math.max,OWe=Math.min;yWe({target:"Array",proto:!0,forced:!AWe},{splice:function(e,t){var n=bWe(this),i=wWe(n),o=xWe(e,i),a=arguments.length,u,h,p,_,T,O;for(a===0?u=h=0:a===1?(u=0,h=i-o):(u=a-2,h=OWe(DWe(_We(t),0),i-o)),kWe(i+u-h),p=TWe(n,h),_=0;_i-h+u;_--)lz(n,_-1)}else if(u>h)for(_=i-h;_>o;_--)T=_+h-1,O=_+u-1,T in n?n[O]=n[T]:lz(n,O);for(_=0;_{"use strict";var IWe=us();Aee.exports=function(r,e){for(var t=IWe(r),n=new e(t),i=0;i{"use strict";var MWe=Ut(),PWe=uz(),LWe=Rc(),RWe=bh(),FWe=Array;MWe({target:"Array",proto:!0},{toReversed:function(){return PWe(LWe(this),FWe)}});RWe("toReversed")});var yT=de((xBt,Oee)=>{"use strict";var NWe=us();Oee.exports=function(r,e,t){for(var n=0,i=arguments.length>2?t:NWe(e),o=new r(i);i>n;)o[n]=e[n++];return o}});var Mee=de((_Bt,Iee)=>{"use strict";var qWe=Wn();Iee.exports=function(r,e){var t=qWe[r],n=t&&t.prototype;return n&&n[e]}});var Pee=de(()=>{"use strict";var BWe=Ut(),zWe=fn(),jWe=gl(),UWe=Rc(),HWe=yT(),WWe=Mee(),VWe=bh(),$We=Array,KWe=zWe(WWe("Array","sort"));BWe({target:"Array",proto:!0},{toSorted:function(e){e!==void 0&&jWe(e);var t=UWe(this),n=HWe($We,t);return KWe(n,e)}});VWe("toSorted")});var Lee=de(()=>{"use strict";var GWe=Ut(),YWe=bh(),ZWe=D0(),XWe=us(),JWe=cg(),QWe=Rc(),e9e=gu(),t9e=Array,r9e=Math.max,n9e=Math.min;GWe({target:"Array",proto:!0},{toSpliced:function(e,t){var n=QWe(this),i=XWe(n),o=JWe(e,i),a=arguments.length,u=0,h,p,_,T;for(a===0?h=p=0:a===1?(h=0,p=i-o):(h=a-2,p=n9e(r9e(e9e(t),0),i-o)),_=ZWe(i+h-p),T=t9e(_);u{"use strict";var i9e=bh();i9e("flat")});var Fee=de(()=>{"use strict";var o9e=bh();o9e("flatMap")});var Nee=de(()=>{"use strict";var a9e=Ut(),s9e=za(),l9e=us(),u9e=$2(),c9e=fT(),f9e=D0(),h9e=[].unshift(0)!==1,d9e=function(){try{Object.defineProperty([],"length",{writable:!1}).unshift()}catch(r){return r instanceof TypeError}},p9e=h9e||!d9e();a9e({target:"Array",proto:!0,arity:1,forced:p9e},{unshift:function(e){var t=s9e(this),n=l9e(t),i=arguments.length;if(i){f9e(n+i);for(var o=n;o--;){var a=o+i;o in t?t[a]=t[o]:c9e(t,a)}for(var u=0;u{"use strict";var m9e=us(),g9e=gu(),v9e=RangeError;qee.exports=function(r,e,t,n){var i=m9e(r),o=g9e(t),a=o<0?i+o:o;if(a>=i||a<0)throw new v9e("Incorrect index");for(var u=new e(i),h=0;h{"use strict";var y9e=Ut(),b9e=cz(),x9e=Rc(),_9e=Array;y9e({target:"Array",proto:!0},{with:function(r,e){return b9e(x9e(this),_9e,r,e)}})});var Y2=de((RBt,zee)=>{"use strict";zee.exports=typeof ArrayBuffer<"u"&&typeof DataView<"u"});var i1=de((FBt,jee)=>{"use strict";var w9e=nl();jee.exports=function(r,e,t){for(var n in e)w9e(r,n,e[n],t);return r}});var Tm=de((NBt,Uee)=>{"use strict";var S9e=Yh(),k9e=TypeError;Uee.exports=function(r,e){if(S9e(e,r))return r;throw new k9e("Incorrect invocation")}});var fz=de((qBt,Hee)=>{"use strict";var T9e=gu(),E9e=Zh(),C9e=RangeError;Hee.exports=function(r){if(r===void 0)return 0;var e=T9e(r),t=E9e(e);if(e!==t)throw new C9e("Wrong length or index");return t}});var Z2=de((BBt,Wee)=>{"use strict";Wee.exports=Math.sign||function(e){var t=+e;return t===0||t!==t?t:t<0?-1:1}});var Gee=de((zBt,Kee)=>{"use strict";var A9e=Z2(),D9e=Math.abs,$ee=2220446049250313e-31,Vee=1/$ee,O9e=function(r){return r+Vee-Vee};Kee.exports=function(r,e,t,n){var i=+r,o=D9e(i),a=A9e(i);if(ot||h!==h?a*(1/0):a*h}});var hz=de((jBt,Yee)=>{"use strict";var I9e=Gee(),M9e=11920928955078125e-23,P9e=34028234663852886e22,L9e=11754943508222875e-54;Yee.exports=Math.fround||function(e){return I9e(e,M9e,P9e,L9e)}});var Xee=de((UBt,Zee)=>{"use strict";var R9e=Array,F9e=Math.abs,kv=Math.pow,N9e=Math.floor,q9e=Math.log,B9e=Math.LN2,z9e=function(r,e,t){var n=R9e(t),i=t*8-e-1,o=(1<>1,u=e===23?kv(2,-24)-kv(2,-77):0,h=r<0||r===0&&1/r<0?1:0,p=0,_,T,O;for(r=F9e(r),r!==r||r===1/0?(T=r!==r?1:0,_=o):(_=N9e(q9e(r)/B9e),O=kv(2,-_),r*O<1&&(_--,O*=2),_+a>=1?r+=u/O:r+=u*kv(2,1-a),r*O>=2&&(_++,O/=2),_+a>=o?(T=0,_=o):_+a>=1?(T=(r*O-1)*kv(2,e),_+=a):(T=r*kv(2,a-1)*kv(2,e),_=0));e>=8;)n[p++]=T&255,T/=256,e-=8;for(_=_<0;)n[p++]=_&255,_/=256,i-=8;return n[--p]|=h*128,n},j9e=function(r,e){var t=r.length,n=t*8-e-1,i=(1<>1,a=n-7,u=t-1,h=r[u--],p=h&127,_;for(h>>=7;a>0;)p=p*256+r[u--],a-=8;for(_=p&(1<<-a)-1,p>>=-a,a+=e;a>0;)_=_*256+r[u--],a-=8;if(p===0)p=1-o;else{if(p===i)return _?NaN:h?-1/0:1/0;_+=kv(2,e),p-=o}return(h?-1:1)*_*kv(2,p-e)};Zee.exports={pack:z9e,unpack:j9e}});var _T=de((HBt,pte)=>{"use strict";var tI=Wn(),vz=fn(),dz=Li(),U9e=Y2(),ute=w0(),H9e=Hf(),W9e=Jc(),Jee=i1(),pz=on(),X2=Tm(),V9e=gu(),$9e=Zh(),Q2=fz(),K9e=hz(),cte=Xee(),G9e=Wd(),Qee=km(),Y9e=z2(),Z9e=Ap(),X9e=zy(),J9e=V_(),fte=yh(),yz=cc(),Q9e=ute.PROPER,ete=ute.CONFIGURABLE,a1="ArrayBuffer",rI="DataView",s1="prototype",e8e="Wrong length",hte="Wrong index",tte=yz.getterFor(a1),xT=yz.getterFor(rI),rte=yz.set,Em=tI[a1],$d=Em,o1=$d&&$d[s1],dg=tI[rI],I0=dg&&dg[s1],nte=Object.prototype,t8e=tI.Array,eI=tI.RangeError,r8e=vz(Y9e),n8e=vz([].reverse),dte=cte.pack,ite=cte.unpack,ote=function(r){return[r&255]},ate=function(r){return[r&255,r>>8&255]},ste=function(r){return[r&255,r>>8&255,r>>16&255,r>>24&255]},lte=function(r){return r[3]<<24|r[2]<<16|r[1]<<8|r[0]},i8e=function(r){return dte(K9e(r),23,4)},o8e=function(r){return dte(r,52,8)},J2=function(r,e,t){W9e(r[s1],e,{configurable:!0,get:function(){return t(this)[e]}})},Uy=function(r,e,t,n){var i=xT(r),o=Q2(t),a=!!n;if(o+e>i.byteLength)throw new eI(hte);var u=i.bytes,h=o+i.byteOffset,p=Z9e(u,h,h+e);return a?p:n8e(p)},Hy=function(r,e,t,n,i,o){var a=xT(r),u=Q2(t),h=n(+i),p=!!o;if(u+e>a.byteLength)throw new eI(hte);for(var _=a.bytes,T=u+a.byteOffset,O=0;O>24)},setUint8:function(e,t){gz(this,e,t<<24>>24)}},{unsafe:!0})):($d=function(e){X2(this,o1);var t=Q2(e);rte(this,{type:a1,bytes:r8e(t8e(t),0),byteLength:t}),dz||(this.byteLength=t,this.detached=!1)},o1=$d[s1],dg=function(e,t,n){X2(this,I0),X2(e,o1);var i=tte(e),o=i.byteLength,a=V9e(t);if(a<0||a>o)throw new eI("Wrong offset");if(n=n===void 0?o-a:$9e(n),a+n>o)throw new eI(e8e);rte(this,{type:rI,buffer:e,byteLength:n,byteOffset:a,bytes:i.bytes}),dz||(this.buffer=e,this.byteLength=n,this.byteOffset=a)},I0=dg[s1],dz&&(J2($d,"byteLength",tte),J2(dg,"buffer",xT),J2(dg,"byteLength",xT),J2(dg,"byteOffset",xT)),Jee(I0,{getInt8:function(e){return Uy(this,1,e)[0]<<24>>24},getUint8:function(e){return Uy(this,1,e)[0]},getInt16:function(e){var t=Uy(this,2,e,arguments.length>1?arguments[1]:!1);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=Uy(this,2,e,arguments.length>1?arguments[1]:!1);return t[1]<<8|t[0]},getInt32:function(e){return lte(Uy(this,4,e,arguments.length>1?arguments[1]:!1))},getUint32:function(e){return lte(Uy(this,4,e,arguments.length>1?arguments[1]:!1))>>>0},getFloat32:function(e){return ite(Uy(this,4,e,arguments.length>1?arguments[1]:!1),23)},getFloat64:function(e){return ite(Uy(this,8,e,arguments.length>1?arguments[1]:!1),52)},setInt8:function(e,t){Hy(this,1,e,ote,t)},setUint8:function(e,t){Hy(this,1,e,ote,t)},setInt16:function(e,t){Hy(this,2,e,ate,t,arguments.length>2?arguments[2]:!1)},setUint16:function(e,t){Hy(this,2,e,ate,t,arguments.length>2?arguments[2]:!1)},setInt32:function(e,t){Hy(this,4,e,ste,t,arguments.length>2?arguments[2]:!1)},setUint32:function(e,t){Hy(this,4,e,ste,t,arguments.length>2?arguments[2]:!1)},setFloat32:function(e,t){Hy(this,4,e,i8e,t,arguments.length>2?arguments[2]:!1)},setFloat64:function(e,t){Hy(this,8,e,o8e,t,arguments.length>2?arguments[2]:!1)}}));var mz,bT,gz;fte($d,a1);fte(dg,rI);pte.exports={ArrayBuffer:$d,DataView:dg}});var gte=de(()=>{"use strict";var a8e=Ut(),s8e=Wn(),l8e=_T(),u8e=O0(),bz="ArrayBuffer",mte=l8e[bz],c8e=s8e[bz];a8e({global:!0,constructor:!0,forced:c8e!==mte},{ArrayBuffer:mte});u8e(bz)});var Vo=de(($Bt,Ete)=>{"use strict";var f8e=Y2(),Sz=Li(),xh=Wn(),xte=sa(),oI=Wo(),Vy=ba(),kz=Sm(),h8e=Ry(),d8e=Hf(),xz=nl(),p8e=Jc(),m8e=Yh(),aI=Wd(),u1=km(),g8e=Jo(),v8e=_0(),_te=cc(),wte=_te.enforce,y8e=_te.get,nI=xh.Int8Array,_z=nI&&nI.prototype,vte=xh.Uint8ClampedArray,yte=vte&&vte.prototype,pg=nI&&aI(nI),Cm=_z&&aI(_z),b8e=Object.prototype,Tz=xh.TypeError,bte=g8e("toStringTag"),wz=v8e("TYPED_ARRAY_TAG"),iI="TypedArrayConstructor",Tv=f8e&&!!u1&&kz(xh.opera)!=="Opera",Ste=!1,Qh,Wy,l1,Ev={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},Ez={BigInt64Array:8,BigUint64Array:8},x8e=function(e){if(!oI(e))return!1;var t=kz(e);return t==="DataView"||Vy(Ev,t)||Vy(Ez,t)},kte=function(r){var e=aI(r);if(!!oI(e)){var t=y8e(e);return t&&Vy(t,iI)?t[iI]:kte(e)}},Tte=function(r){if(!oI(r))return!1;var e=kz(r);return Vy(Ev,e)||Vy(Ez,e)},_8e=function(r){if(Tte(r))return r;throw new Tz("Target is not a typed array")},w8e=function(r){if(xte(r)&&(!u1||m8e(pg,r)))return r;throw new Tz(h8e(r)+" is not a typed array constructor")},S8e=function(r,e,t,n){if(!!Sz){if(t)for(var i in Ev){var o=xh[i];if(o&&Vy(o.prototype,r))try{delete o.prototype[r]}catch{try{o.prototype[r]=e}catch{}}}(!Cm[r]||t)&&xz(Cm,r,t?e:Tv&&_z[r]||e,n)}},k8e=function(r,e,t){var n,i;if(!!Sz){if(u1){if(t){for(n in Ev)if(i=xh[n],i&&Vy(i,r))try{delete i[r]}catch{}}if(!pg[r]||t)try{return xz(pg,r,t?e:Tv&&pg[r]||e)}catch{}else return}for(n in Ev)i=xh[n],i&&(!i[r]||t)&&xz(i,r,e)}};for(Qh in Ev)Wy=xh[Qh],l1=Wy&&Wy.prototype,l1?wte(l1)[iI]=Wy:Tv=!1;for(Qh in Ez)Wy=xh[Qh],l1=Wy&&Wy.prototype,l1&&(wte(l1)[iI]=Wy);if((!Tv||!xte(pg)||pg===Function.prototype)&&(pg=function(){throw new Tz("Incorrect invocation")},Tv))for(Qh in Ev)xh[Qh]&&u1(xh[Qh],pg);if((!Tv||!Cm||Cm===b8e)&&(Cm=pg.prototype,Tv))for(Qh in Ev)xh[Qh]&&u1(xh[Qh].prototype,Cm);Tv&&aI(yte)!==Cm&&u1(yte,Cm);if(Sz&&!Vy(Cm,bte)){Ste=!0,p8e(Cm,bte,{configurable:!0,get:function(){return oI(this)?this[wz]:void 0}});for(Qh in Ev)xh[Qh]&&d8e(xh[Qh],wz,Qh)}Ete.exports={NATIVE_ARRAY_BUFFER_VIEWS:Tv,TYPED_ARRAY_TAG:Ste&&wz,aTypedArray:_8e,aTypedArrayConstructor:w8e,exportTypedArrayMethod:S8e,exportTypedArrayStaticMethod:k8e,getTypedArrayConstructor:kte,isView:x8e,isTypedArray:Tte,TypedArray:pg,TypedArrayPrototype:Cm}});var Ate=de(()=>{"use strict";var T8e=Ut(),Cte=Vo(),E8e=Cte.NATIVE_ARRAY_BUFFER_VIEWS;T8e({target:"ArrayBuffer",stat:!0,forced:!E8e},{isView:Cte.isView})});var sI=de((YBt,Dte)=>{"use strict";var C8e=k0(),A8e=Ry(),D8e=TypeError;Dte.exports=function(r){if(C8e(r))return r;throw new D8e(A8e(r)+" is not a constructor")}});var M0=de((ZBt,Ite)=>{"use strict";var Ote=Eo(),O8e=sI(),I8e=gh(),M8e=Jo(),P8e=M8e("species");Ite.exports=function(r,e){var t=Ote(r).constructor,n;return t===void 0||I8e(n=Ote(t)[P8e])?e:O8e(n)}});var Nte=de(()=>{"use strict";var L8e=Ut(),Az=Ny(),R8e=on(),Rte=_T(),Mte=Eo(),Pte=cg(),F8e=Zh(),N8e=M0(),Dz=Rte.ArrayBuffer,Cz=Rte.DataView,Fte=Cz.prototype,Lte=Az(Dz.prototype.slice),q8e=Az(Fte.getUint8),B8e=Az(Fte.setUint8),z8e=R8e(function(){return!new Dz(2).slice(1,void 0).byteLength});L8e({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:z8e},{slice:function(e,t){if(Lte&&t===void 0)return Lte(Mte(this),e);for(var n=Mte(this).byteLength,i=Pte(e,n),o=Pte(t===void 0?n:t,n),a=new(N8e(this,Dz))(F8e(o-i)),u=new Cz(this),h=new Cz(a),p=0;i{"use strict";var j8e=Ut(),U8e=_T(),H8e=Y2();j8e({global:!0,constructor:!0,forced:!H8e},{DataView:U8e.DataView})});var Bte=de(()=>{"use strict";qte()});var zte=de(()=>{"use strict";var W8e=Ut(),V8e=fn(),$8e=on(),K8e=$8e(function(){return new Date(16e11).getYear()!==120}),G8e=V8e(Date.prototype.getFullYear);W8e({target:"Date",proto:!0,forced:K8e},{getYear:function(){return G8e(this)-1900}})});var Ute=de(()=>{"use strict";var Y8e=Ut(),Z8e=fn(),jte=Date,X8e=Z8e(jte.prototype.getTime);Y8e({target:"Date",stat:!0},{now:function(){return X8e(new jte)}})});var Vte=de(()=>{"use strict";var J8e=Ut(),Hte=fn(),Q8e=gu(),Wte=Date.prototype,eVe=Hte(Wte.getTime),tVe=Hte(Wte.setFullYear);J8e({target:"Date",proto:!0},{setYear:function(e){eVe(this);var t=Q8e(e),n=t>=0&&t<=99?t+1900:t;return tVe(this,n)}})});var $te=de(()=>{"use strict";var rVe=Ut();rVe({target:"Date",proto:!0},{toGMTString:Date.prototype.toUTCString})});var wT=de((fzt,Kte)=>{"use strict";var nVe=gu(),iVe=oo(),oVe=ml(),aVe=RangeError;Kte.exports=function(e){var t=iVe(oVe(this)),n="",i=nVe(e);if(i<0||i===1/0)throw new aVe("Wrong number of repetitions");for(;i>0;(i>>>=1)&&(t+=t))i&1&&(n+=t);return n}});var lI=de((hzt,Xte)=>{"use strict";var Zte=fn(),sVe=Zh(),Gte=oo(),lVe=wT(),uVe=ml(),cVe=Zte(lVe),fVe=Zte("".slice),hVe=Math.ceil,Yte=function(r){return function(e,t,n){var i=Gte(uVe(e)),o=sVe(t),a=i.length,u=n===void 0?" ":Gte(n),h,p;return o<=a||u===""?i:(h=o-a,p=cVe(u,hVe(h/u.length)),p.length>h&&(p=fVe(p,0,h)),r?i+p:p+i)}};Xte.exports={start:Yte(!1),end:Yte(!0)}});var ere=de((dzt,Qte)=>{"use strict";var $y=fn(),Jte=on(),P0=lI().start,dVe=RangeError,pVe=isFinite,mVe=Math.abs,Cv=Date.prototype,Oz=Cv.toISOString,gVe=$y(Cv.getTime),vVe=$y(Cv.getUTCDate),yVe=$y(Cv.getUTCFullYear),bVe=$y(Cv.getUTCHours),xVe=$y(Cv.getUTCMilliseconds),_Ve=$y(Cv.getUTCMinutes),wVe=$y(Cv.getUTCMonth),SVe=$y(Cv.getUTCSeconds);Qte.exports=Jte(function(){return Oz.call(new Date(-5e13-1))!=="0385-07-25T07:06:39.999Z"})||!Jte(function(){Oz.call(new Date(NaN))})?function(){if(!pVe(gVe(this)))throw new dVe("Invalid time value");var e=this,t=yVe(e),n=xVe(e),i=t<0?"-":t>9999?"+":"";return i+P0(mVe(t),i?6:4,0)+"-"+P0(wVe(e)+1,2,0)+"-"+P0(vVe(e),2,0)+"T"+P0(bVe(e),2,0)+":"+P0(_Ve(e),2,0)+":"+P0(SVe(e),2,0)+"."+P0(n,3,0)+"Z"}:Oz});var rre=de(()=>{"use strict";var kVe=Ut(),tre=ere();kVe({target:"Date",proto:!0,forced:Date.prototype.toISOString!==tre},{toISOString:tre})});var nre=de(()=>{"use strict";var TVe=Ut(),EVe=on(),CVe=za(),AVe=Xk(),DVe=EVe(function(){return new Date(NaN).toJSON()!==null||Date.prototype.toJSON.call({toISOString:function(){return 1}})!==1});TVe({target:"Date",proto:!0,arity:1,forced:DVe},{toJSON:function(e){var t=CVe(this),n=AVe(t,"number");return typeof n=="number"&&!isFinite(n)?null:t.toISOString()}})});var ore=de((yzt,ire)=>{"use strict";var OVe=Eo(),IVe=M3(),MVe=TypeError;ire.exports=function(r){if(OVe(this),r==="string"||r==="default")r="string";else if(r!=="number")throw new MVe("Incorrect hint");return IVe(this,r)}});var lre=de(()=>{"use strict";var PVe=ba(),LVe=nl(),RVe=ore(),FVe=Jo(),are=FVe("toPrimitive"),sre=Date.prototype;PVe(sre,are)||LVe(sre,are,RVe)});var hre=de(()=>{"use strict";var cre=fn(),NVe=nl(),Iz=Date.prototype,ure="Invalid Date",fre="toString",qVe=cre(Iz[fre]),BVe=cre(Iz.getTime);String(new Date(NaN))!==ure&&NVe(Iz,fre,function(){var e=BVe(this);return e===e?qVe(this):ure})});var pre=de(()=>{"use strict";var zVe=Ut(),ST=fn(),jVe=oo(),UVe=ST("".charAt),HVe=ST("".charCodeAt),WVe=ST(/./.exec),VVe=ST(1 .toString),$Ve=ST("".toUpperCase),KVe=/[\w*+\-./@]/,dre=function(r,e){for(var t=VVe(r,16);t.length{"use strict";var gre=fn(),GVe=gl(),YVe=Wo(),ZVe=ba(),mre=Ap(),XVe=j_(),vre=Function,JVe=gre([].concat),QVe=gre([].join),Mz={},e7e=function(r,e,t){if(!ZVe(Mz,e)){for(var n=[],i=0;i{"use strict";var t7e=Ut(),bre=Pz();t7e({target:"Function",proto:!0,forced:Function.bind!==bre},{bind:bre})});var Sre=de(()=>{"use strict";var r7e=sa(),_re=Wo(),n7e=vl(),i7e=Yh(),o7e=Jo(),a7e=p2(),Lz=o7e("hasInstance"),wre=Function.prototype;Lz in wre||n7e.f(wre,Lz,{value:a7e(function(r){if(!r7e(this)||!_re(r))return!1;var e=this.prototype;return _re(e)?i7e(e,r):r instanceof this},Lz)})});var Cre=de(()=>{"use strict";var s7e=Li(),l7e=w0().EXISTS,kre=fn(),u7e=Jc(),Tre=Function.prototype,c7e=kre(Tre.toString),Ere=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,f7e=kre(Ere.exec),h7e="name";s7e&&!l7e&&u7e(Tre,h7e,{configurable:!0,get:function(){try{return f7e(Ere,c7e(this))[1]}catch{return""}}})});var Are=de(()=>{"use strict";var d7e=Ut(),Rz=Wn();d7e({global:!0,forced:Rz.globalThis!==Rz},{globalThis:Rz})});var Dre=de(()=>{"use strict";var p7e=Wn(),m7e=yh();m7e(p7e.JSON,"JSON",!0)});var uI=de((Fzt,Ore)=>{"use strict";var g7e=on();Ore.exports=g7e(function(){if(typeof ArrayBuffer=="function"){var r=new ArrayBuffer(8);Object.isExtensible(r)&&Object.defineProperty(r,"a",{value:8})}})});var fI=de((Nzt,Mre)=>{"use strict";var v7e=on(),y7e=Wo(),b7e=jf(),Ire=uI(),cI=Object.isExtensible,x7e=v7e(function(){cI(1)});Mre.exports=x7e||Ire?function(e){return!y7e(e)||Ire&&b7e(e)==="ArrayBuffer"?!1:cI?cI(e):!0}:cI});var L0=de((qzt,Pre)=>{"use strict";var _7e=on();Pre.exports=!_7e(function(){return Object.isExtensible(Object.preventExtensions({}))})});var Ky=de((Bzt,Fre)=>{"use strict";var w7e=Ut(),S7e=fn(),k7e=H_(),T7e=Wo(),Fz=ba(),E7e=vl().f,Lre=Fy(),C7e=S2(),Nz=fI(),A7e=_0(),D7e=L0(),Rre=!1,Av=A7e("meta"),O7e=0,qz=function(r){E7e(r,Av,{value:{objectID:"O"+O7e++,weakData:{}}})},I7e=function(r,e){if(!T7e(r))return typeof r=="symbol"?r:(typeof r=="string"?"S":"P")+r;if(!Fz(r,Av)){if(!Nz(r))return"F";if(!e)return"E";qz(r)}return r[Av].objectID},M7e=function(r,e){if(!Fz(r,Av)){if(!Nz(r))return!0;if(!e)return!1;qz(r)}return r[Av].weakData},P7e=function(r){return D7e&&Rre&&Nz(r)&&!Fz(r,Av)&&qz(r),r},L7e=function(){R7e.enable=function(){},Rre=!0;var r=Lre.f,e=S7e([].splice),t={};t[Av]=1,r(t).length&&(Lre.f=function(n){for(var i=r(n),o=0,a=i.length;o{"use strict";var F7e=Ut(),N7e=Wn(),q7e=fn(),Nre=$_(),B7e=nl(),z7e=Ky(),j7e=Vd(),U7e=Tm(),H7e=sa(),W7e=gh(),Bz=Wo(),zz=on(),V7e=dT(),$7e=yh(),K7e=zy();qre.exports=function(r,e,t){var n=r.indexOf("Map")!==-1,i=r.indexOf("Weak")!==-1,o=n?"set":"add",a=N7e[r],u=a&&a.prototype,h=a,p={},_=function(te){var ie=q7e(u[te]);B7e(u,te,te==="add"?function(S){return ie(this,S===0?0:S),this}:te==="delete"?function(ue){return i&&!Bz(ue)?!1:ie(this,ue===0?0:ue)}:te==="get"?function(S){return i&&!Bz(S)?void 0:ie(this,S===0?0:S)}:te==="has"?function(S){return i&&!Bz(S)?!1:ie(this,S===0?0:S)}:function(S,ve){return ie(this,S===0?0:S,ve),this})},T=Nre(r,!H7e(a)||!(i||u.forEach&&!zz(function(){new a().entries().next()})));if(T)h=t.getConstructor(e,r,n,o),z7e.enable();else if(Nre(r,!0)){var O=new h,L=O[o](i?{}:-0,1)!==O,q=zz(function(){O.has(1)}),U=V7e(function(te){new a(te)}),Z=!i&&zz(function(){for(var te=new a,ie=5;ie--;)te[o](ie,ie);return!te.has(-0)});U||(h=e(function(te,ie){U7e(te,u);var ue=K7e(new a,te,h);return W7e(ie)||j7e(ie,ue[o],{that:ue,AS_ENTRIES:n}),ue}),h.prototype=u,u.constructor=h),(q||Z)&&(_("delete"),_("has"),n&&_("get")),(Z||L)&&_(o),i&&u.clear&&delete u.clear}return p[r]=h,F7e({global:!0,constructor:!0,forced:h!==a},p),$7e(h,r),i||t.setStrong(h,r,n),h}});var Uz=de((jzt,Wre)=>{"use strict";var Bre=Xh(),G7e=Jc(),zre=i1(),Y7e=Dp(),Z7e=Tm(),X7e=gh(),J7e=Vd(),Q7e=W2(),hI=n1(),e$e=O0(),TT=Li(),jre=Ky().fastKey,Hre=cc(),Ure=Hre.set,jz=Hre.getterFor;Wre.exports={getConstructor:function(r,e,t,n){var i=r(function(p,_){Z7e(p,o),Ure(p,{type:e,index:Bre(null),first:void 0,last:void 0,size:0}),TT||(p.size=0),X7e(_)||J7e(_,p[n],{that:p,AS_ENTRIES:t})}),o=i.prototype,a=jz(e),u=function(p,_,T){var O=a(p),L=h(p,_),q,U;return L?L.value=T:(O.last=L={index:U=jre(_,!0),key:_,value:T,previous:q=O.last,next:void 0,removed:!1},O.first||(O.first=L),q&&(q.next=L),TT?O.size++:p.size++,U!=="F"&&(O.index[U]=L)),p},h=function(p,_){var T=a(p),O=jre(_),L;if(O!=="F")return T.index[O];for(L=T.first;L;L=L.next)if(L.key===_)return L};return zre(o,{clear:function(){for(var _=this,T=a(_),O=T.first;O;)O.removed=!0,O.previous&&(O.previous=O.previous.next=void 0),O=O.next;T.first=T.last=void 0,T.index=Bre(null),TT?T.size=0:_.size=0},delete:function(p){var _=this,T=a(_),O=h(_,p);if(O){var L=O.next,q=O.previous;delete T.index[O.index],O.removed=!0,q&&(q.next=L),L&&(L.previous=q),T.first===O&&(T.first=L),T.last===O&&(T.last=q),TT?T.size--:_.size--}return!!O},forEach:function(_){for(var T=a(this),O=Y7e(_,arguments.length>1?arguments[1]:void 0),L;L=L?L.next:T.first;)for(O(L.value,L.key,this);L&&L.removed;)L=L.previous},has:function(_){return!!h(this,_)}}),zre(o,t?{get:function(_){var T=h(this,_);return T&&T.value},set:function(_,T){return u(this,_===0?0:_,T)}}:{add:function(_){return u(this,_=_===0?0:_,_)}}),TT&&G7e(o,"size",{configurable:!0,get:function(){return a(this).size}}),i},setStrong:function(r,e,t){var n=e+" Iterator",i=jz(e),o=jz(n);Q7e(r,e,function(a,u){Ure(this,{type:n,target:a,state:i(a),kind:u,last:void 0})},function(){for(var a=o(this),u=a.kind,h=a.last;h&&h.removed;)h=h.previous;return!a.target||!(a.last=h=h?h.next:a.state.first)?(a.target=void 0,hI(void 0,!0)):hI(u==="keys"?h.key:u==="values"?h.value:[h.key,h.value],!1)},t?"entries":"values",!t,!0),e$e(e)}}});var Vre=de(()=>{"use strict";var t$e=kT(),r$e=Uz();t$e("Map",function(r){return function(){return r(this,arguments.length?arguments[0]:void 0)}},r$e)});var $re=de(()=>{"use strict";Vre()});var Hz=de(($zt,Kre)=>{"use strict";var dI=fn(),ET=Map.prototype;Kre.exports={Map,set:dI(ET.set),get:dI(ET.get),has:dI(ET.has),remove:dI(ET.delete),proto:ET}});var Gre=de(()=>{"use strict";var n$e=Ut(),i$e=fn(),o$e=gl(),a$e=ml(),s$e=Vd(),pI=Hz(),l$e=jl(),u$e=pI.Map,c$e=pI.has,f$e=pI.get,h$e=pI.set,d$e=i$e([].push);n$e({target:"Map",stat:!0,forced:l$e},{groupBy:function(e,t){a$e(e),o$e(t);var n=new u$e,i=0;return s$e(e,function(o){var a=t(o,i++);c$e(n,a)?d$e(f$e(n,a),o):h$e(n,a,[o])}),n}})});var Wz=de((Yzt,Yre)=>{"use strict";var p$e=Math.log;Yre.exports=Math.log1p||function(e){var t=+e;return t>-1e-8&&t<1e-8?t-t*t/2:p$e(1+t)}});var Xre=de(()=>{"use strict";var m$e=Ut(),g$e=Wz(),Vz=Math.acosh,v$e=Math.log,Zre=Math.sqrt,y$e=Math.LN2,b$e=!Vz||Math.floor(Vz(Number.MAX_VALUE))!==710||Vz(1/0)!==1/0;m$e({target:"Math",stat:!0,forced:b$e},{acosh:function(e){var t=+e;return t<1?NaN:t>9490626562425156e-8?v$e(t)+y$e:g$e(t-1+Zre(t-1)*Zre(t+1))}})});var ene=de(()=>{"use strict";var x$e=Ut(),Jre=Math.asinh,_$e=Math.log,w$e=Math.sqrt;function Qre(r){var e=+r;return!isFinite(e)||e===0?e:e<0?-Qre(-e):_$e(e+w$e(e*e+1))}var S$e=!(Jre&&1/Jre(0)>0);x$e({target:"Math",stat:!0,forced:S$e},{asinh:Qre})});var rne=de(()=>{"use strict";var k$e=Ut(),tne=Math.atanh,T$e=Math.log,E$e=!(tne&&1/tne(-0)<0);k$e({target:"Math",stat:!0,forced:E$e},{atanh:function(e){var t=+e;return t===0?t:T$e((1+t)/(1-t))/2}})});var nne=de(()=>{"use strict";var C$e=Ut(),A$e=Z2(),D$e=Math.abs,O$e=Math.pow;C$e({target:"Math",stat:!0},{cbrt:function(e){var t=+e;return A$e(t)*O$e(D$e(t),1/3)}})});var ine=de(()=>{"use strict";var I$e=Ut(),M$e=Math.floor,P$e=Math.log,L$e=Math.LOG2E;I$e({target:"Math",stat:!0},{clz32:function(e){var t=e>>>0;return t?31-M$e(P$e(t+.5)*L$e):32}})});var AT=de((a5t,one)=>{"use strict";var CT=Math.expm1,R$e=Math.exp;one.exports=!CT||CT(10)>22025.465794806718||CT(10)<22025.465794806718||CT(-2e-17)!==-2e-17?function(e){var t=+e;return t===0?t:t>-1e-6&&t<1e-6?t+t*t/2:R$e(t)-1}:CT});var sne=de(()=>{"use strict";var F$e=Ut(),N$e=AT(),ane=Math.cosh,q$e=Math.abs,$z=Math.E,B$e=!ane||ane(710)===1/0;F$e({target:"Math",stat:!0,forced:B$e},{cosh:function(e){var t=N$e(q$e(e)-1)+1;return(t+1/(t*$z*$z))*($z/2)}})});var une=de(()=>{"use strict";var z$e=Ut(),lne=AT();z$e({target:"Math",stat:!0,forced:lne!==Math.expm1},{expm1:lne})});var cne=de(()=>{"use strict";var j$e=Ut(),U$e=hz();j$e({target:"Math",stat:!0},{fround:U$e})});var hne=de(()=>{"use strict";var H$e=Ut(),fne=Math.hypot,W$e=Math.abs,V$e=Math.sqrt,$$e=!!fne&&fne(1/0,NaN)!==1/0;H$e({target:"Math",stat:!0,arity:2,forced:$$e},{hypot:function(e,t){for(var n=0,i=0,o=arguments.length,a=0,u,h;i0?(h=u/a,n+=h*h):n+=u;return a===1/0?1/0:a*V$e(n)}})});var pne=de(()=>{"use strict";var K$e=Ut(),G$e=on(),dne=Math.imul,Y$e=G$e(function(){return dne(4294967295,5)!==-5||dne.length!==2});K$e({target:"Math",stat:!0,forced:Y$e},{imul:function(e,t){var n=65535,i=+e,o=+t,a=n&i,u=n&o;return 0|a*u+((n&i>>>16)*u+a*(n&o>>>16)<<16>>>0)}})});var Kz=de((v5t,mne)=>{"use strict";var Z$e=Math.log,X$e=Math.LOG10E;mne.exports=Math.log10||function(e){return Z$e(e)*X$e}});var gne=de(()=>{"use strict";var J$e=Ut(),Q$e=Kz();J$e({target:"Math",stat:!0},{log10:Q$e})});var vne=de(()=>{"use strict";var eKe=Ut(),tKe=Wz();eKe({target:"Math",stat:!0},{log1p:tKe})});var yne=de(()=>{"use strict";var rKe=Ut(),nKe=Math.log,iKe=Math.LN2;rKe({target:"Math",stat:!0},{log2:function(e){return nKe(e)/iKe}})});var bne=de(()=>{"use strict";var oKe=Ut(),aKe=Z2();oKe({target:"Math",stat:!0},{sign:aKe})});var wne=de(()=>{"use strict";var sKe=Ut(),lKe=on(),xne=AT(),uKe=Math.abs,_ne=Math.exp,cKe=Math.E,fKe=lKe(function(){return Math.sinh(-2e-17)!==-2e-17});sKe({target:"Math",stat:!0,forced:fKe},{sinh:function(e){var t=+e;return uKe(t)<1?(xne(t)-xne(-t))/2:(_ne(t-1)-_ne(-t-1))*(cKe/2)}})});var Tne=de(()=>{"use strict";var hKe=Ut(),Sne=AT(),kne=Math.exp;hKe({target:"Math",stat:!0},{tanh:function(e){var t=+e,n=Sne(t),i=Sne(-t);return n===1/0?1:i===1/0?-1:(n-i)/(kne(t)+kne(-t))}})});var Ene=de(()=>{"use strict";var dKe=yh();dKe(Math,"Math",!0)});var Cne=de(()=>{"use strict";var pKe=Ut(),mKe=Z3();pKe({target:"Math",stat:!0},{trunc:mKe})});var DT=de((L5t,Ane)=>{"use strict";var gKe=fn();Ane.exports=gKe(1 .valueOf)});var OT=de((R5t,Dne)=>{"use strict";Dne.exports=` \v\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF`});var R0=de((F5t,Ine)=>{"use strict";var vKe=fn(),yKe=ml(),bKe=oo(),Yz=OT(),One=vKe("".replace),xKe=RegExp("^["+Yz+"]+"),_Ke=RegExp("(^|[^"+Yz+"])["+Yz+"]+$"),Gz=function(r){return function(e){var t=bKe(yKe(e));return r&1&&(t=One(t,xKe,"")),r&2&&(t=One(t,_Ke,"$1")),t}};Ine.exports={start:Gz(1),end:Gz(2),trim:Gz(3)}});var qne=de(()=>{"use strict";var wKe=Ut(),Zz=jl(),SKe=Li(),Lne=Wn(),Xz=k2(),Rne=fn(),kKe=$_(),Mne=ba(),TKe=zy(),EKe=Yh(),CKe=Ly(),Fne=Xk(),AKe=on(),DKe=Fy().f,OKe=Uf().f,IKe=vl().f,MKe=DT(),PKe=R0().trim,IT="Number",c1=Lne[IT],Pne=Xz[IT],Jz=c1.prototype,LKe=Lne.TypeError,RKe=Rne("".slice),mI=Rne("".charCodeAt),FKe=function(r){var e=Fne(r,"number");return typeof e=="bigint"?e:NKe(e)},NKe=function(r){var e=Fne(r,"number"),t,n,i,o,a,u,h,p;if(CKe(e))throw new LKe("Cannot convert a Symbol value to a number");if(typeof e=="string"&&e.length>2){if(e=PKe(e),t=mI(e,0),t===43||t===45){if(n=mI(e,2),n===88||n===120)return NaN}else if(t===48){switch(mI(e,1)){case 66:case 98:i=2,o=49;break;case 79:case 111:i=8,o=55;break;default:return+e}for(a=RKe(e,2),u=a.length,h=0;ho)return NaN;return parseInt(a,i)}}return+e},Qz=kKe(IT,!c1(" 0o1")||!c1("0b1")||c1("+0x1")),qKe=function(r){return EKe(Jz,r)&&AKe(function(){MKe(r)})},gI=function(e){var t=arguments.length<1?0:c1(FKe(e));return qKe(this)?TKe(Object(t),this,gI):t};gI.prototype=Jz;Qz&&!Zz&&(Jz.constructor=gI);wKe({global:!0,constructor:!0,wrap:!0,forced:Qz},{Number:gI});var Nne=function(r,e){for(var t=SKe?DKe(e):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),n=0,i;t.length>n;n++)Mne(e,i=t[n])&&!Mne(r,i)&&IKe(r,i,OKe(e,i))};Zz&&Pne&&Nne(Xz[IT],Pne);(Qz||Zz)&&Nne(Xz[IT],c1)});var Bne=de(()=>{"use strict";var BKe=Ut();BKe({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{EPSILON:Math.pow(2,-52)})});var jne=de((j5t,zne)=>{"use strict";var zKe=Wn(),jKe=zKe.isFinite;zne.exports=Number.isFinite||function(e){return typeof e=="number"&&jKe(e)}});var Une=de(()=>{"use strict";var UKe=Ut(),HKe=jne();UKe({target:"Number",stat:!0},{isFinite:HKe})});var vI=de((W5t,Hne)=>{"use strict";var WKe=Wo(),VKe=Math.floor;Hne.exports=Number.isInteger||function(e){return!WKe(e)&&isFinite(e)&&VKe(e)===e}});var Wne=de(()=>{"use strict";var $Ke=Ut(),KKe=vI();$Ke({target:"Number",stat:!0},{isInteger:KKe})});var Vne=de(()=>{"use strict";var GKe=Ut();GKe({target:"Number",stat:!0},{isNaN:function(e){return e!==e}})});var $ne=de(()=>{"use strict";var YKe=Ut(),ZKe=vI(),XKe=Math.abs;YKe({target:"Number",stat:!0},{isSafeInteger:function(e){return ZKe(e)&&XKe(e)<=9007199254740991}})});var Kne=de(()=>{"use strict";var JKe=Ut();JKe({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MAX_SAFE_INTEGER:9007199254740991})});var Gne=de(()=>{"use strict";var QKe=Ut();QKe({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MIN_SAFE_INTEGER:-9007199254740991})});var e5=de((t4t,Jne)=>{"use strict";var Xne=Wn(),eGe=on(),tGe=fn(),rGe=oo(),nGe=R0().trim,iGe=OT(),oGe=tGe("".charAt),yI=Xne.parseFloat,Yne=Xne.Symbol,Zne=Yne&&Yne.iterator,aGe=1/yI(iGe+"-0")!==-1/0||Zne&&!eGe(function(){yI(Object(Zne))});Jne.exports=aGe?function(e){var t=nGe(rGe(e)),n=yI(t);return n===0&&oGe(t,0)==="-"?-0:n}:yI});var eie=de(()=>{"use strict";var sGe=Ut(),Qne=e5();sGe({target:"Number",stat:!0,forced:Number.parseFloat!==Qne},{parseFloat:Qne})});var t5=de((i4t,aie)=>{"use strict";var iie=Wn(),lGe=on(),uGe=fn(),cGe=oo(),fGe=R0().trim,tie=OT(),MT=iie.parseInt,rie=iie.Symbol,nie=rie&&rie.iterator,oie=/^[+-]?0x/i,hGe=uGe(oie.exec),dGe=MT(tie+"08")!==8||MT(tie+"0x16")!==22||nie&&!lGe(function(){MT(Object(nie))});aie.exports=dGe?function(e,t){var n=fGe(cGe(e));return MT(n,t>>>0||(hGe(oie,n)?16:10))}:MT});var lie=de(()=>{"use strict";var pGe=Ut(),sie=t5();pGe({target:"Number",stat:!0,forced:Number.parseInt!==sie},{parseInt:sie})});var die=de(()=>{"use strict";var mGe=Ut(),n5=fn(),gGe=gu(),vGe=DT(),yGe=wT(),bGe=Kz(),r5=on(),xGe=RangeError,uie=String,_Ge=isFinite,wGe=Math.abs,SGe=Math.floor,cie=Math.pow,kGe=Math.round,mg=n5(1 .toExponential),TGe=n5(yGe),fie=n5("".slice),hie=mg(-69e-12,4)==="-6.9000e-11"&&mg(1.255,2)==="1.25e+0"&&mg(12345,3)==="1.235e+4"&&mg(25,0)==="3e+1",EGe=function(){return r5(function(){mg(1,1/0)})&&r5(function(){mg(1,-1/0)})},CGe=function(){return!r5(function(){mg(1/0,1/0),mg(NaN,1/0)})},AGe=!hie||!EGe()||!CGe();mGe({target:"Number",proto:!0,forced:AGe},{toExponential:function(e){var t=vGe(this);if(e===void 0)return mg(t);var n=gGe(e);if(!_Ge(t))return String(t);if(n<0||n>20)throw new xGe("Incorrect fraction digits");if(hie)return mg(t,n);var i="",o="",a=0,u="",h="";if(t<0&&(i="-",t=-t),t===0)a=0,o=TGe("0",n+1);else{var p=bGe(t);a=SGe(p);var _=0,T=cie(10,a-n);_=kGe(t/T),2*t>=(2*_+1)*T&&(_+=1),_>=cie(10,n+1)&&(_/=10,a+=1),o=uie(_)}return n!==0&&(o=fie(o,0,1)+"."+fie(o,1)),a===0?(u="+",h="0"):(u=a>0?"+":"-",h=uie(wGe(a))),o+="e"+u+h,i+o}})});var bie=de(()=>{"use strict";var DGe=Ut(),a5=fn(),OGe=gu(),IGe=DT(),MGe=wT(),pie=on(),PGe=RangeError,vie=String,yie=Math.floor,o5=a5(MGe),mie=a5("".slice),PT=a5(1 .toFixed),h1=function(r,e,t){return e===0?t:e%2===1?h1(r,e-1,t*r):h1(r*r,e/2,t)},LGe=function(r){for(var e=0,t=r;t>=4096;)e+=12,t/=4096;for(;t>=2;)e+=1,t/=2;return e},f1=function(r,e,t){for(var n=-1,i=t;++n<6;)i+=e*r[n],r[n]=i%1e7,i=yie(i/1e7)},i5=function(r,e){for(var t=6,n=0;--t>=0;)n+=r[t],r[t]=yie(n/e),n=n%e*1e7},gie=function(r){for(var e=6,t="";--e>=0;)if(t!==""||e===0||r[e]!==0){var n=vie(r[e]);t=t===""?n:t+o5("0",7-n.length)+n}return t},RGe=pie(function(){return PT(8e-5,3)!=="0.000"||PT(.9,0)!=="1"||PT(1.255,2)!=="1.25"||PT(0xde0b6b3a7640080,0)!=="1000000000000000128"})||!pie(function(){PT({})});DGe({target:"Number",proto:!0,forced:RGe},{toFixed:function(e){var t=IGe(this),n=OGe(e),i=[0,0,0,0,0,0],o="",a="0",u,h,p,_;if(n<0||n>20)throw new PGe("Incorrect fraction digits");if(t!==t)return"NaN";if(t<=-1e21||t>=1e21)return vie(t);if(t<0&&(o="-",t=-t),t>1e-21)if(u=LGe(t*h1(2,69,1))-69,h=u<0?t*h1(2,-u,1):t/h1(2,u,1),h*=4503599627370496,u=52-u,u>0){for(f1(i,0,h),p=n;p>=7;)f1(i,1e7,0),p-=7;for(f1(i,h1(10,p,1),0),p=u-1;p>=23;)i5(i,1<<23),p-=23;i5(i,1<0?(_=a.length,a=o+(_<=n?"0."+o5("0",n-_)+a:mie(a,0,_-n)+"."+mie(a,_-n))):a=o+a,a}})});var wie=de(()=>{"use strict";var FGe=Ut(),NGe=fn(),xie=on(),_ie=DT(),bI=NGe(1 .toPrecision),qGe=xie(function(){return bI(1,void 0)!=="1"})||!xie(function(){bI({})});FGe({target:"Number",proto:!0,forced:qGe},{toPrecision:function(e){return e===void 0?bI(_ie(this)):bI(_ie(this),e)}})});var l5=de((d4t,Tie)=>{"use strict";var Sie=Li(),BGe=fn(),zGe=yo(),jGe=on(),s5=K_(),UGe=tT(),HGe=Zk(),WGe=za(),VGe=y0(),d1=Object.assign,kie=Object.defineProperty,$Ge=BGe([].concat);Tie.exports=!d1||jGe(function(){if(Sie&&d1({b:1},d1(kie({},"a",{enumerable:!0,get:function(){kie(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var r={},e={},t=Symbol("assign detection"),n="abcdefghijklmnopqrst";return r[t]=7,n.split("").forEach(function(i){e[i]=i}),d1({},r)[t]!==7||s5(d1({},e)).join("")!==n})?function(e,t){for(var n=WGe(e),i=arguments.length,o=1,a=UGe.f,u=HGe.f;i>o;)for(var h=VGe(arguments[o++]),p=a?$Ge(s5(h),a(h)):s5(h),_=p.length,T=0,O;_>T;)O=p[T++],(!Sie||zGe(u,h,O))&&(n[O]=h[O]);return n}:d1});var Cie=de(()=>{"use strict";var KGe=Ut(),Eie=l5();KGe({target:"Object",stat:!0,arity:2,forced:Object.assign!==Eie},{assign:Eie})});var Aie=de(()=>{"use strict";var GGe=Ut(),YGe=Li(),ZGe=Xh();GGe({target:"Object",stat:!0,sham:!YGe},{create:ZGe})});var LT=de((y4t,Oie)=>{"use strict";var XGe=jl(),JGe=Wn(),QGe=on(),Die=G2();Oie.exports=XGe||!QGe(function(){if(!(Die&&Die<535)){var r=Math.random();__defineSetter__.call(null,r,function(){}),delete JGe[r]}})});var Iie=de(()=>{"use strict";var eYe=Ut(),tYe=Li(),rYe=LT(),nYe=gl(),iYe=za(),oYe=vl();tYe&&eYe({target:"Object",proto:!0,forced:rYe},{__defineGetter__:function(e,t){oYe.f(iYe(this),e,{get:nYe(t),enumerable:!0,configurable:!0})}})});var Pie=de(()=>{"use strict";var aYe=Ut(),sYe=Li(),Mie=x2().f;aYe({target:"Object",stat:!0,forced:Object.defineProperties!==Mie,sham:!sYe},{defineProperties:Mie})});var Rie=de(()=>{"use strict";var lYe=Ut(),uYe=Li(),Lie=vl().f;lYe({target:"Object",stat:!0,forced:Object.defineProperty!==Lie,sham:!uYe},{defineProperty:Lie})});var Fie=de(()=>{"use strict";var cYe=Ut(),fYe=Li(),hYe=LT(),dYe=gl(),pYe=za(),mYe=vl();fYe&&cYe({target:"Object",proto:!0,forced:hYe},{__defineSetter__:function(e,t){mYe.f(pYe(this),e,{set:dYe(t),enumerable:!0,configurable:!0})}})});var u5=de((C4t,jie)=>{"use strict";var qie=Li(),gYe=on(),Bie=fn(),vYe=Wd(),yYe=K_(),bYe=Rc(),xYe=Zk().f,zie=Bie(xYe),_Ye=Bie([].push),wYe=qie&&gYe(function(){var r=Object.create(null);return r[2]=2,!zie(r,2)}),Nie=function(r){return function(e){for(var t=bYe(e),n=yYe(t),i=wYe&&vYe(t)===null,o=n.length,a=0,u=[],h;o>a;)h=n[a++],(!qie||(i?h in t:zie(t,h)))&&_Ye(u,r?[h,t[h]]:t[h]);return u}};jie.exports={entries:Nie(!0),values:Nie(!1)}});var Uie=de(()=>{"use strict";var SYe=Ut(),kYe=u5().entries;SYe({target:"Object",stat:!0},{entries:function(e){return kYe(e)}})});var Hie=de(()=>{"use strict";var TYe=Ut(),EYe=L0(),CYe=on(),AYe=Wo(),DYe=Ky().onFreeze,c5=Object.freeze,OYe=CYe(function(){c5(1)});TYe({target:"Object",stat:!0,forced:OYe,sham:!EYe},{freeze:function(e){return c5&&AYe(e)?c5(DYe(e)):e}})});var Wie=de(()=>{"use strict";var IYe=Ut(),MYe=Vd(),PYe=_v();IYe({target:"Object",stat:!0},{fromEntries:function(e){var t={};return MYe(e,function(n,i){PYe(t,n,i)},{AS_ENTRIES:!0}),t}})});var Kie=de(()=>{"use strict";var LYe=Ut(),RYe=on(),FYe=Rc(),Vie=Uf().f,$ie=Li(),NYe=!$ie||RYe(function(){Vie(1)});LYe({target:"Object",stat:!0,forced:NYe,sham:!$ie},{getOwnPropertyDescriptor:function(e,t){return Vie(FYe(e),t)}})});var Gie=de(()=>{"use strict";var qYe=Ut(),BYe=Li(),zYe=g2(),jYe=Rc(),UYe=Uf(),HYe=_v();qYe({target:"Object",stat:!0,sham:!BYe},{getOwnPropertyDescriptors:function(e){for(var t=jYe(e),n=UYe.f,i=zYe(t),o={},a=0,u,h;i.length>a;)h=n(t,u=i[a++]),h!==void 0&&HYe(o,u,h);return o}})});var Yie=de(()=>{"use strict";var WYe=Ut(),VYe=on(),$Ye=S2().f,KYe=VYe(function(){return!Object.getOwnPropertyNames(1)});WYe({target:"Object",stat:!0,forced:KYe},{getOwnPropertyNames:$Ye})});var Xie=de(()=>{"use strict";var GYe=Ut(),YYe=on(),ZYe=za(),Zie=Wd(),XYe=R2(),JYe=YYe(function(){Zie(1)});GYe({target:"Object",stat:!0,forced:JYe,sham:!XYe},{getPrototypeOf:function(e){return Zie(ZYe(e))}})});var Jie=de(()=>{"use strict";var QYe=Ut(),eZe=Gs(),tZe=fn(),rZe=gl(),nZe=ml(),iZe=ug(),oZe=Vd(),aZe=eZe("Object","create"),sZe=tZe([].push);QYe({target:"Object",stat:!0},{groupBy:function(e,t){nZe(e),rZe(t);var n=aZe(null),i=0;return oZe(e,function(o){var a=iZe(t(o,i++));a in n?sZe(n[a],o):n[a]=[o]}),n}})});var Qie=de(()=>{"use strict";var lZe=Ut(),uZe=ba();lZe({target:"Object",stat:!0},{hasOwn:uZe})});var f5=de(($4t,eoe)=>{"use strict";eoe.exports=Object.is||function(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}});var toe=de(()=>{"use strict";var cZe=Ut(),fZe=f5();cZe({target:"Object",stat:!0},{is:fZe})});var noe=de(()=>{"use strict";var hZe=Ut(),roe=fI();hZe({target:"Object",stat:!0,forced:Object.isExtensible!==roe},{isExtensible:roe})});var ooe=de(()=>{"use strict";var dZe=Ut(),pZe=on(),mZe=Wo(),gZe=jf(),ioe=uI(),h5=Object.isFrozen,vZe=ioe||pZe(function(){h5(1)});dZe({target:"Object",stat:!0,forced:vZe},{isFrozen:function(e){return!mZe(e)||ioe&&gZe(e)==="ArrayBuffer"?!0:h5?h5(e):!1}})});var soe=de(()=>{"use strict";var yZe=Ut(),bZe=on(),xZe=Wo(),_Ze=jf(),aoe=uI(),d5=Object.isSealed,wZe=aoe||bZe(function(){d5(1)});yZe({target:"Object",stat:!0,forced:wZe},{isSealed:function(e){return!xZe(e)||aoe&&_Ze(e)==="ArrayBuffer"?!0:d5?d5(e):!1}})});var uoe=de(()=>{"use strict";var SZe=Ut(),kZe=za(),loe=K_(),TZe=on(),EZe=TZe(function(){loe(1)});SZe({target:"Object",stat:!0,forced:EZe},{keys:function(e){return loe(kZe(e))}})});var coe=de(()=>{"use strict";var CZe=Ut(),AZe=Li(),DZe=LT(),OZe=za(),IZe=ug(),MZe=Wd(),PZe=Uf().f;AZe&&CZe({target:"Object",proto:!0,forced:DZe},{__lookupGetter__:function(e){var t=OZe(this),n=IZe(e),i;do if(i=PZe(t,n))return i.get;while(t=MZe(t))}})});var foe=de(()=>{"use strict";var LZe=Ut(),RZe=Li(),FZe=LT(),NZe=za(),qZe=ug(),BZe=Wd(),zZe=Uf().f;RZe&&LZe({target:"Object",proto:!0,forced:FZe},{__lookupSetter__:function(e){var t=NZe(this),n=qZe(e),i;do if(i=zZe(t,n))return i.set;while(t=BZe(t))}})});var hoe=de(()=>{"use strict";var jZe=Ut(),UZe=Wo(),HZe=Ky().onFreeze,WZe=L0(),VZe=on(),p5=Object.preventExtensions,$Ze=VZe(function(){p5(1)});jZe({target:"Object",stat:!0,forced:$Ze,sham:!WZe},{preventExtensions:function(e){return p5&&UZe(e)?p5(HZe(e)):e}})});var voe=de(()=>{"use strict";var KZe=Li(),GZe=Jc(),YZe=Wo(),ZZe=wB(),XZe=za(),JZe=ml(),doe=Object.getPrototypeOf,poe=Object.setPrototypeOf,moe=Object.prototype,goe="__proto__";if(KZe&&doe&&poe&&!(goe in moe))try{GZe(moe,goe,{configurable:!0,get:function(){return doe(XZe(this))},set:function(e){var t=JZe(this);ZZe(e)&&YZe(t)&&poe(t,e)}})}catch{}});var yoe=de(()=>{"use strict";var QZe=Ut(),eXe=Wo(),tXe=Ky().onFreeze,rXe=L0(),nXe=on(),m5=Object.seal,iXe=nXe(function(){m5(1)});QZe({target:"Object",stat:!0,forced:iXe,sham:!rXe},{seal:function(e){return m5&&eXe(e)?m5(tXe(e)):e}})});var boe=de(()=>{"use strict";var oXe=Ut(),aXe=km();oXe({target:"Object",stat:!0},{setPrototypeOf:aXe})});var _oe=de((mjt,xoe)=>{"use strict";var sXe=y2(),lXe=Sm();xoe.exports=sXe?{}.toString:function(){return"[object "+lXe(this)+"]"}});var woe=de(()=>{"use strict";var uXe=y2(),cXe=nl(),fXe=_oe();uXe||cXe(Object.prototype,"toString",fXe,{unsafe:!0})});var Soe=de(()=>{"use strict";var hXe=Ut(),dXe=u5().values;hXe({target:"Object",stat:!0},{values:function(e){return dXe(e)}})});var Toe=de(()=>{"use strict";var pXe=Ut(),koe=e5();pXe({global:!0,forced:parseFloat!==koe},{parseFloat:koe})});var Coe=de(()=>{"use strict";var mXe=Ut(),Eoe=t5();mXe({global:!0,forced:parseInt!==Eoe},{parseInt:Eoe})});var Mp=de((kjt,Aoe)=>{"use strict";var gXe=TypeError;Aoe.exports=function(r,e){if(r{"use strict";var vXe=ag();Doe.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(vXe)});var NT=de((Ejt,qoe)=>{"use strict";var Kd=Wn(),yXe=Ip(),bXe=Dp(),Ooe=sa(),xXe=ba(),Noe=on(),Ioe=Q3(),_Xe=Ap(),Moe=Jk(),wXe=Mp(),SXe=g5(),kXe=Sv(),w5=Kd.setImmediate,S5=Kd.clearImmediate,TXe=Kd.process,v5=Kd.Dispatch,EXe=Kd.Function,Poe=Kd.MessageChannel,CXe=Kd.String,y5=0,RT={},Loe="onreadystatechange",FT,F0,b5,x5;Noe(function(){FT=Kd.location});var k5=function(r){if(xXe(RT,r)){var e=RT[r];delete RT[r],e()}},_5=function(r){return function(){k5(r)}},Roe=function(r){k5(r.data)},Foe=function(r){Kd.postMessage(CXe(r),FT.protocol+"//"+FT.host)};(!w5||!S5)&&(w5=function(e){wXe(arguments.length,1);var t=Ooe(e)?e:EXe(e),n=_Xe(arguments,1);return RT[++y5]=function(){yXe(t,void 0,n)},F0(y5),y5},S5=function(e){delete RT[e]},kXe?F0=function(r){TXe.nextTick(_5(r))}:v5&&v5.now?F0=function(r){v5.now(_5(r))}:Poe&&!SXe?(b5=new Poe,x5=b5.port2,b5.port1.onmessage=Roe,F0=bXe(x5.postMessage,x5)):Kd.addEventListener&&Ooe(Kd.postMessage)&&!Kd.importScripts&&FT&&FT.protocol!=="file:"&&!Noe(Foe)?(F0=Foe,Kd.addEventListener("message",Roe,!1)):Loe in Moe("script")?F0=function(r){Ioe.appendChild(Moe("script"))[Loe]=function(){Ioe.removeChild(this),k5(r)}}:F0=function(r){setTimeout(_5(r),0)});qoe.exports={set:w5,clear:S5}});var T5=de((Cjt,zoe)=>{"use strict";var Boe=Wn(),AXe=Li(),DXe=Object.getOwnPropertyDescriptor;zoe.exports=function(r){if(!AXe)return Boe[r];var e=DXe(Boe,r);return e&&e.value}});var E5=de((Ajt,Uoe)=>{"use strict";var joe=function(){this.head=null,this.tail=null};joe.prototype={add:function(r){var e={item:r,next:null},t=this.tail;t?t.next=e:this.head=e,this.tail=e},get:function(){var r=this.head;if(r){var e=this.head=r.next;return e===null&&(this.tail=null),r.item}}};Uoe.exports=joe});var Woe=de((Djt,Hoe)=>{"use strict";var OXe=ag();Hoe.exports=/ipad|iphone|ipod/i.test(OXe)&&typeof Pebble<"u"});var $oe=de((Ojt,Voe)=>{"use strict";var IXe=ag();Voe.exports=/web0s(?!.*chrome)/i.test(IXe)});var M5=de((Ijt,Joe)=>{"use strict";var m1=Wn(),MXe=T5(),Koe=Dp(),C5=NT().set,PXe=E5(),LXe=g5(),RXe=Woe(),FXe=$oe(),A5=Sv(),Goe=m1.MutationObserver||m1.WebKitMutationObserver,Yoe=m1.document,Zoe=m1.process,xI=m1.Promise,I5=MXe("queueMicrotask"),p1,D5,O5,_I,Xoe;I5||(qT=new PXe,BT=function(){var r,e;for(A5&&(r=Zoe.domain)&&r.exit();e=qT.get();)try{e()}catch(t){throw qT.head&&p1(),t}r&&r.enter()},!LXe&&!A5&&!FXe&&Goe&&Yoe?(D5=!0,O5=Yoe.createTextNode(""),new Goe(BT).observe(O5,{characterData:!0}),p1=function(){O5.data=D5=!D5}):!RXe&&xI&&xI.resolve?(_I=xI.resolve(void 0),_I.constructor=xI,Xoe=Koe(_I.then,_I),p1=function(){Xoe(BT)}):A5?p1=function(){Zoe.nextTick(BT)}:(C5=Koe(C5,m1),p1=function(){C5(BT)}),I5=function(r){qT.head||p1(),qT.add(r)});var qT,BT;Joe.exports=I5});var eae=de((Mjt,Qoe)=>{"use strict";Qoe.exports=function(r,e){try{arguments.length===1?console.error(r):console.error(r,e)}catch{}}});var g1=de((Pjt,tae)=>{"use strict";tae.exports=function(r){try{return{error:!1,value:r()}}catch(e){return{error:!0,value:e}}}});var N0=de((Ljt,rae)=>{"use strict";var NXe=Wn();rae.exports=NXe.Promise});var wI=de((Rjt,nae)=>{"use strict";nae.exports=typeof Deno=="object"&&Deno&&typeof Deno.version=="object"});var P5=de((Fjt,iae)=>{"use strict";var qXe=wI(),BXe=Sv();iae.exports=!qXe&&!BXe&&typeof window=="object"&&typeof document=="object"});var v1=de((Njt,sae)=>{"use strict";var zXe=Wn(),zT=N0(),jXe=sa(),UXe=$_(),HXe=u2(),WXe=Jo(),VXe=P5(),$Xe=wI(),KXe=jl(),L5=sg(),oae=zT&&zT.prototype,GXe=WXe("species"),R5=!1,aae=jXe(zXe.PromiseRejectionEvent),YXe=UXe("Promise",function(){var r=HXe(zT),e=r!==String(zT);if(!e&&L5===66||KXe&&!(oae.catch&&oae.finally))return!0;if(!L5||L5<51||!/native code/.test(r)){var t=new zT(function(o){o(1)}),n=function(o){o(function(){},function(){})},i=t.constructor={};if(i[GXe]=n,R5=t.then(function(){})instanceof n,!R5)return!0}return!e&&(VXe||$Xe)&&!aae});sae.exports={CONSTRUCTOR:YXe,REJECTION_EVENT:aae,SUBCLASSING:R5}});var Dv=de((qjt,uae)=>{"use strict";var lae=gl(),ZXe=TypeError,XXe=function(r){var e,t;this.promise=new r(function(n,i){if(e!==void 0||t!==void 0)throw new ZXe("Bad Promise constructor");e=n,t=i}),this.resolve=lae(e),this.reject=lae(t)};uae.exports.f=function(r){return new XXe(r)}});var Aae=de(()=>{"use strict";var JXe=Ut(),QXe=jl(),EI=Sv(),Gy=Wn(),_1=yo(),cae=nl(),fae=km(),eJe=yh(),tJe=O0(),rJe=gl(),TI=sa(),nJe=Wo(),iJe=Tm(),oJe=M0(),gae=NT().set,z5=M5(),aJe=eae(),sJe=g1(),lJe=E5(),vae=cc(),CI=N0(),j5=v1(),yae=Dv(),AI="Promise",bae=j5.CONSTRUCTOR,uJe=j5.REJECTION_EVENT,cJe=j5.SUBCLASSING,F5=vae.getterFor(AI),fJe=vae.set,y1=CI&&CI.prototype,q0=CI,SI=y1,xae=Gy.TypeError,N5=Gy.document,U5=Gy.process,q5=yae.f,hJe=q5,dJe=!!(N5&&N5.createEvent&&Gy.dispatchEvent),_ae="unhandledrejection",pJe="rejectionhandled",hae=0,wae=1,mJe=2,H5=1,Sae=2,kI,dae,gJe,pae,kae=function(r){var e;return nJe(r)&&TI(e=r.then)?e:!1},Tae=function(r,e){var t=e.value,n=e.state===wae,i=n?r.ok:r.fail,o=r.resolve,a=r.reject,u=r.domain,h,p,_;try{i?(n||(e.rejection===Sae&&yJe(e),e.rejection=H5),i===!0?h=t:(u&&u.enter(),h=i(t),u&&(u.exit(),_=!0)),h===r.promise?a(new xae("Promise-chain cycle")):(p=kae(h))?_1(p,h,o,a):o(h)):a(t)}catch(T){u&&!_&&u.exit(),a(T)}},Eae=function(r,e){r.notified||(r.notified=!0,z5(function(){for(var t=r.reactions,n;n=t.get();)Tae(n,r);r.notified=!1,e&&!r.rejection&&vJe(r)}))},Cae=function(r,e,t){var n,i;dJe?(n=N5.createEvent("Event"),n.promise=e,n.reason=t,n.initEvent(r,!1,!0),Gy.dispatchEvent(n)):n={promise:e,reason:t},!uJe&&(i=Gy["on"+r])?i(n):r===_ae&&aJe("Unhandled promise rejection",t)},vJe=function(r){_1(gae,Gy,function(){var e=r.facade,t=r.value,n=mae(r),i;if(n&&(i=sJe(function(){EI?U5.emit("unhandledRejection",t,e):Cae(_ae,e,t)}),r.rejection=EI||mae(r)?Sae:H5,i.error))throw i.value})},mae=function(r){return r.rejection!==H5&&!r.parent},yJe=function(r){_1(gae,Gy,function(){var e=r.facade;EI?U5.emit("rejectionHandled",e):Cae(pJe,e,r.value)})},b1=function(r,e,t){return function(n){r(e,n,t)}},x1=function(r,e,t){r.done||(r.done=!0,t&&(r=t),r.value=e,r.state=mJe,Eae(r,!0))},B5=function(r,e,t){if(!r.done){r.done=!0,t&&(r=t);try{if(r.facade===e)throw new xae("Promise can't be resolved itself");var n=kae(e);n?z5(function(){var i={done:!1};try{_1(n,e,b1(B5,i,r),b1(x1,i,r))}catch(o){x1(i,o,r)}}):(r.value=e,r.state=wae,Eae(r,!1))}catch(i){x1({done:!1},i,r)}}};if(bae&&(q0=function(e){iJe(this,SI),rJe(e),_1(kI,this);var t=F5(this);try{e(b1(B5,t),b1(x1,t))}catch(n){x1(t,n)}},SI=q0.prototype,kI=function(e){fJe(this,{type:AI,done:!1,notified:!1,parent:!1,reactions:new lJe,rejection:!1,state:hae,value:void 0})},kI.prototype=cae(SI,"then",function(e,t){var n=F5(this),i=q5(oJe(this,q0));return n.parent=!0,i.ok=TI(e)?e:!0,i.fail=TI(t)&&t,i.domain=EI?U5.domain:void 0,n.state===hae?n.reactions.add(i):z5(function(){Tae(i,n)}),i.promise}),dae=function(){var r=new kI,e=F5(r);this.promise=r,this.resolve=b1(B5,e),this.reject=b1(x1,e)},yae.f=q5=function(r){return r===q0||r===gJe?new dae(r):hJe(r)},!QXe&&TI(CI)&&y1!==Object.prototype)){pae=y1.then,cJe||cae(y1,"then",function(e,t){var n=this;return new q0(function(i,o){_1(pae,n,i,o)}).then(e,t)},{unsafe:!0});try{delete y1.constructor}catch{}fae&&fae(y1,SI)}JXe({global:!0,constructor:!0,wrap:!0,forced:bae},{Promise:q0});eJe(q0,AI,!1,!0);tJe(AI)});var jT=de((jjt,Dae)=>{"use strict";var bJe=N0(),xJe=dT(),_Je=v1().CONSTRUCTOR;Dae.exports=_Je||!xJe(function(r){bJe.all(r).then(void 0,function(){})})});var Oae=de(()=>{"use strict";var wJe=Ut(),SJe=yo(),kJe=gl(),TJe=Dv(),EJe=g1(),CJe=Vd(),AJe=jT();wJe({target:"Promise",stat:!0,forced:AJe},{all:function(e){var t=this,n=TJe.f(t),i=n.resolve,o=n.reject,a=EJe(function(){var u=kJe(t.resolve),h=[],p=0,_=1;CJe(e,function(T){var O=p++,L=!1;_++,SJe(u,t,T).then(function(q){L||(L=!0,h[O]=q,--_||i(h))},o)}),--_||i(h)});return a.error&&o(a.value),n.promise}})});var Mae=de(()=>{"use strict";var DJe=Ut(),OJe=jl(),IJe=v1().CONSTRUCTOR,V5=N0(),MJe=Gs(),PJe=sa(),LJe=nl(),Iae=V5&&V5.prototype;DJe({target:"Promise",proto:!0,forced:IJe,real:!0},{catch:function(r){return this.then(void 0,r)}});!OJe&&PJe(V5)&&(W5=MJe("Promise").prototype.catch,Iae.catch!==W5&&LJe(Iae,"catch",W5,{unsafe:!0}));var W5});var Pae=de(()=>{"use strict";var RJe=Ut(),FJe=yo(),NJe=gl(),qJe=Dv(),BJe=g1(),zJe=Vd(),jJe=jT();RJe({target:"Promise",stat:!0,forced:jJe},{race:function(e){var t=this,n=qJe.f(t),i=n.reject,o=BJe(function(){var a=NJe(t.resolve);zJe(e,function(u){FJe(a,t,u).then(n.resolve,i)})});return o.error&&i(o.value),n.promise}})});var Lae=de(()=>{"use strict";var UJe=Ut(),HJe=Dv(),WJe=v1().CONSTRUCTOR;UJe({target:"Promise",stat:!0,forced:WJe},{reject:function(e){var t=HJe.f(this),n=t.reject;return n(e),t.promise}})});var $5=de((Zjt,Rae)=>{"use strict";var VJe=Eo(),$Je=Wo(),KJe=Dv();Rae.exports=function(r,e){if(VJe(r),$Je(e)&&e.constructor===r)return e;var t=KJe.f(r),n=t.resolve;return n(e),t.promise}});var qae=de(()=>{"use strict";var GJe=Ut(),YJe=Gs(),Fae=jl(),ZJe=N0(),Nae=v1().CONSTRUCTOR,XJe=$5(),JJe=YJe("Promise"),QJe=Fae&&!Nae;GJe({target:"Promise",stat:!0,forced:Fae||Nae},{resolve:function(e){return XJe(QJe&&this===JJe?ZJe:this,e)}})});var Bae=de(()=>{"use strict";Aae();Oae();Mae();Pae();Lae();qae()});var zae=de(()=>{"use strict";var eQe=Ut(),tQe=yo(),rQe=gl(),nQe=Dv(),iQe=g1(),oQe=Vd(),aQe=jT();eQe({target:"Promise",stat:!0,forced:aQe},{allSettled:function(e){var t=this,n=nQe.f(t),i=n.resolve,o=n.reject,a=iQe(function(){var u=rQe(t.resolve),h=[],p=0,_=1;oQe(e,function(T){var O=p++,L=!1;_++,tQe(u,t,T).then(function(q){L||(L=!0,h[O]={status:"fulfilled",value:q},--_||i(h))},function(q){L||(L=!0,h[O]={status:"rejected",reason:q},--_||i(h))})}),--_||i(h)});return a.error&&o(a.value),n.promise}})});var Uae=de(()=>{"use strict";var sQe=Ut(),lQe=yo(),uQe=gl(),cQe=Gs(),fQe=Dv(),hQe=g1(),dQe=Vd(),pQe=jT(),jae="No one promise resolved";sQe({target:"Promise",stat:!0,forced:pQe},{any:function(e){var t=this,n=cQe("AggregateError"),i=fQe.f(t),o=i.resolve,a=i.reject,u=hQe(function(){var h=uQe(t.resolve),p=[],_=0,T=1,O=!1;dQe(e,function(L){var q=_++,U=!1;T++,lQe(h,t,L).then(function(Z){U||O||(O=!0,o(Z))},function(Z){U||O||(U=!0,p[q]=Z,--T||a(new n(p,jae)))})}),--T||a(new n(p,jae))});return u.error&&a(u.value),i.promise}})});var $ae=de(()=>{"use strict";var mQe=Ut(),gQe=jl(),DI=N0(),vQe=on(),Wae=Gs(),Vae=sa(),yQe=M0(),Hae=$5(),bQe=nl(),G5=DI&&DI.prototype,xQe=!!DI&&vQe(function(){G5.finally.call({then:function(){}},function(){})});mQe({target:"Promise",proto:!0,real:!0,forced:xQe},{finally:function(r){var e=yQe(this,Wae("Promise")),t=Vae(r);return this.then(t?function(n){return Hae(e,r()).then(function(){return n})}:r,t?function(n){return Hae(e,r()).then(function(){throw n})}:r)}});!gQe&&Vae(DI)&&(K5=Wae("Promise").prototype.finally,G5.finally!==K5&&bQe(G5,"finally",K5,{unsafe:!0}));var K5});var Kae=de(()=>{"use strict";var _Qe=Ut(),wQe=Dv();_Qe({target:"Promise",stat:!0},{withResolvers:function(){var e=wQe.f(this);return{promise:e.promise,resolve:e.resolve,reject:e.reject}}})});var Gae=de(()=>{"use strict";var SQe=Ut(),kQe=Ip(),TQe=gl(),EQe=Eo(),CQe=on(),AQe=!CQe(function(){Reflect.apply(function(){})});SQe({target:"Reflect",stat:!0,forced:AQe},{apply:function(e,t,n){return kQe(TQe(e),t,EQe(n))}})});var tse=de(()=>{"use strict";var DQe=Ut(),OQe=Gs(),Y5=Ip(),IQe=Pz(),Yae=sI(),MQe=Eo(),Zae=Wo(),PQe=Xh(),Jae=on(),Z5=OQe("Reflect","construct"),LQe=Object.prototype,RQe=[].push,Qae=Jae(function(){function r(){}return!(Z5(function(){},[],r)instanceof r)}),ese=!Jae(function(){Z5(function(){})}),Xae=Qae||ese;DQe({target:"Reflect",stat:!0,forced:Xae,sham:Xae},{construct:function(e,t){Yae(e),MQe(t);var n=arguments.length<3?e:Yae(arguments[2]);if(ese&&!Qae)return Z5(e,t,n);if(e===n){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var i=[null];return Y5(RQe,i,t),new(Y5(IQe,e,i))}var o=n.prototype,a=PQe(Zae(o)?o:LQe),u=Y5(e,a,t);return Zae(u)?u:a}})});var ise=de(()=>{"use strict";var FQe=Ut(),NQe=Li(),rse=Eo(),qQe=ug(),nse=vl(),BQe=on(),zQe=BQe(function(){Reflect.defineProperty(nse.f({},1,{value:1}),1,{value:2})});FQe({target:"Reflect",stat:!0,forced:zQe,sham:!NQe},{defineProperty:function(e,t,n){rse(e);var i=qQe(t);rse(n);try{return nse.f(e,i,n),!0}catch{return!1}}})});var ose=de(()=>{"use strict";var jQe=Ut(),UQe=Eo(),HQe=Uf().f;jQe({target:"Reflect",stat:!0},{deleteProperty:function(e,t){var n=HQe(UQe(e),t);return n&&!n.configurable?!1:delete e[t]}})});var X5=de((v6t,sse)=>{"use strict";var ase=ba();sse.exports=function(r){return r!==void 0&&(ase(r,"value")||ase(r,"writable"))}});var use=de(()=>{"use strict";var WQe=Ut(),VQe=yo(),$Qe=Wo(),KQe=Eo(),GQe=X5(),YQe=Uf(),ZQe=Wd();function lse(r,e){var t=arguments.length<3?r:arguments[2],n,i;if(KQe(r)===t)return r[e];if(n=YQe.f(r,e),n)return GQe(n)?n.value:n.get===void 0?void 0:VQe(n.get,t);if($Qe(i=ZQe(r)))return lse(i,e,t)}WQe({target:"Reflect",stat:!0},{get:lse})});var cse=de(()=>{"use strict";var XQe=Ut(),JQe=Li(),QQe=Eo(),eet=Uf();XQe({target:"Reflect",stat:!0,sham:!JQe},{getOwnPropertyDescriptor:function(e,t){return eet.f(QQe(e),t)}})});var fse=de(()=>{"use strict";var tet=Ut(),ret=Eo(),net=Wd(),iet=R2();tet({target:"Reflect",stat:!0,sham:!iet},{getPrototypeOf:function(e){return net(ret(e))}})});var hse=de(()=>{"use strict";var oet=Ut();oet({target:"Reflect",stat:!0},{has:function(e,t){return t in e}})});var dse=de(()=>{"use strict";var aet=Ut(),set=Eo(),uet=fI();aet({target:"Reflect",stat:!0},{isExtensible:function(e){return set(e),uet(e)}})});var pse=de(()=>{"use strict";var cet=Ut(),fet=g2();cet({target:"Reflect",stat:!0},{ownKeys:fet})});var mse=de(()=>{"use strict";var het=Ut(),det=Gs(),pet=Eo(),met=L0();het({target:"Reflect",stat:!0,sham:!met},{preventExtensions:function(e){pet(e);try{var t=det("Object","preventExtensions");return t&&t(e),!0}catch{return!1}}})});var xse=de(()=>{"use strict";var get=Ut(),vet=yo(),yet=Eo(),gse=Wo(),bet=X5(),xet=on(),J5=vl(),vse=Uf(),_et=Wd(),yse=Hd();function bse(r,e,t){var n=arguments.length<4?r:arguments[3],i=vse.f(yet(r),e),o,a,u;if(!i){if(gse(a=_et(r)))return bse(a,e,t,n);i=yse(0)}if(bet(i)){if(i.writable===!1||!gse(n))return!1;if(o=vse.f(n,e)){if(o.get||o.set||o.writable===!1)return!1;o.value=t,J5.f(n,e,o)}else J5.f(n,e,yse(0,t))}else{if(u=i.set,u===void 0)return!1;vet(u,n,t)}return!0}var wet=xet(function(){var r=function(){},e=J5.f(new r,"a",{configurable:!0});return Reflect.set(r.prototype,"a",1,e)!==!1});get({target:"Reflect",stat:!0,forced:wet},{set:bse})});var wse=de(()=>{"use strict";var ket=Ut(),Tet=Eo(),Eet=SB(),_se=km();_se&&ket({target:"Reflect",stat:!0},{setPrototypeOf:function(e,t){Tet(e),Eet(t);try{return _se(e,t),!0}catch{return!1}}})});var Sse=de(()=>{"use strict";var Cet=Ut(),Aet=Wn(),Det=yh();Cet({global:!0},{Reflect:{}});Det(Aet.Reflect,"Reflect",!0)});var UT=de((q6t,kse)=>{"use strict";var Oet=Wo(),Iet=jf(),Met=Jo(),Pet=Met("match");kse.exports=function(r){var e;return Oet(r)&&((e=r[Pet])!==void 0?!!e:Iet(r)==="RegExp")}});var OI=de((B6t,Tse)=>{"use strict";var Let=Eo();Tse.exports=function(){var r=Let(this),e="";return r.hasIndices&&(e+="d"),r.global&&(e+="g"),r.ignoreCase&&(e+="i"),r.multiline&&(e+="m"),r.dotAll&&(e+="s"),r.unicode&&(e+="u"),r.unicodeSets&&(e+="v"),r.sticky&&(e+="y"),e}});var w1=de((z6t,Cse)=>{"use strict";var Ret=yo(),Fet=ba(),Net=Yh(),qet=OI(),Ese=RegExp.prototype;Cse.exports=function(r){var e=r.flags;return e===void 0&&!("flags"in Ese)&&!Fet(r,"flags")&&Net(Ese,r)?Ret(qet,r):e}});var HT=de((j6t,Ase)=>{"use strict";var Q5=on(),Bet=Wn(),e4=Bet.RegExp,t4=Q5(function(){var r=e4("a","y");return r.lastIndex=2,r.exec("abcd")!==null}),zet=t4||Q5(function(){return!e4("a","y").sticky}),jet=t4||Q5(function(){var r=e4("^r","gy");return r.lastIndex=2,r.exec("str")!==null});Ase.exports={BROKEN_CARET:jet,MISSED_STICKY:zet,UNSUPPORTED_Y:t4}});var II=de((U6t,Dse)=>{"use strict";var Uet=on(),Het=Wn(),Wet=Het.RegExp;Dse.exports=Uet(function(){var r=Wet(".","s");return!(r.dotAll&&r.test(` `)&&r.flags==="s")})});var r4=de((H6t,Ose)=>{"use strict";var Vet=on(),$et=Wn(),Ket=$et.RegExp;Ose.exports=Vet(function(){var r=Ket("(?b)","g");return r.exec("b").groups.a!=="b"||"b".replace(r,"$c")!=="bc"})});var Bse=de(()=>{"use strict";var Get=Li(),a4=Wn(),WT=fn(),Yet=$_(),Zet=zy(),Xet=Hf(),Jet=Xh(),Qet=Fy().f,Ise=Yh(),ett=UT(),Mse=oo(),ttt=w1(),Rse=HT(),rtt=kB(),ntt=nl(),itt=on(),ott=ba(),att=cc().enforce,stt=O0(),ltt=Jo(),Fse=II(),Nse=r4(),utt=ltt("match"),Zy=a4.RegExp,S1=Zy.prototype,ctt=a4.SyntaxError,ftt=WT(S1.exec),MI=WT("".charAt),Pse=WT("".replace),Lse=WT("".indexOf),htt=WT("".slice),dtt=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,B0=/a/g,n4=/a/g,ptt=new Zy(B0)!==B0,qse=Rse.MISSED_STICKY,mtt=Rse.UNSUPPORTED_Y,gtt=Get&&(!ptt||qse||Fse||Nse||itt(function(){return n4[utt]=!1,Zy(B0)!==B0||Zy(n4)===n4||String(Zy(B0,"i"))!=="/a/i"})),vtt=function(r){for(var e=r.length,t=0,n="",i=!1,o;t<=e;t++){if(o=MI(r,t),o==="\\"){n+=o+MI(r,++t);continue}!i&&o==="."?n+="[\\s\\S]":(o==="["?i=!0:o==="]"&&(i=!1),n+=o)}return n},ytt=function(r){for(var e=r.length,t=0,n="",i=[],o=Jet(null),a=!1,u=!1,h=0,p="",_;t<=e;t++){if(_=MI(r,t),_==="\\")_+=MI(r,++t);else if(_==="]")a=!1;else if(!a)switch(!0){case _==="[":a=!0;break;case _==="(":ftt(dtt,htt(r,t+1))&&(t+=2,u=!0),n+=_,h++;continue;case(_===">"&&u):if(p===""||ott(o,p))throw new ctt("Invalid capture group name");o[p]=!0,i[i.length]=[p,h],u=!1,p="";continue}u?p+=_:n+=_}return[n,i]};if(Yet("RegExp",gtt)){for(Yy=function(e,t){var n=Ise(S1,this),i=ett(e),o=t===void 0,a=[],u=e,h,p,_,T,O,L;if(!n&&i&&o&&e.constructor===Yy)return e;if((i||Ise(S1,e))&&(e=e.source,o&&(t=ttt(u))),e=e===void 0?"":Mse(e),t=t===void 0?"":Mse(t),u=e,Fse&&"dotAll"in B0&&(p=!!t&&Lse(t,"s")>-1,p&&(t=Pse(t,/s/g,""))),h=t,qse&&"sticky"in B0&&(_=!!t&&Lse(t,"y")>-1,_&&mtt&&(t=Pse(t,/y/g,""))),Nse&&(T=ytt(e),e=T[0],a=T[1]),O=Zet(Zy(e,t),n?this:S1,Yy),(p||_||a.length)&&(L=att(O),p&&(L.dotAll=!0,L.raw=Yy(vtt(e),h)),_&&(L.sticky=!0),a.length&&(L.groups=a)),e!==u)try{Xet(O,"source",u===""?"(?:)":u)}catch{}return O},i4=Qet(Zy),o4=0;i4.length>o4;)rtt(Yy,Zy,i4[o4++]);S1.constructor=Yy,Yy.prototype=S1,ntt(a4,"RegExp",Yy,{constructor:!0})}var Yy,i4,o4;stt("RegExp")});var jse=de(()=>{"use strict";var btt=Li(),xtt=II(),_tt=jf(),wtt=Jc(),Stt=cc().get,zse=RegExp.prototype,ktt=TypeError;btt&&xtt&&wtt(zse,"dotAll",{configurable:!0,get:function(){if(this!==zse){if(_tt(this)==="RegExp")return!!Stt(this).dotAll;throw new ktt("Incompatible receiver, RegExp required")}}})});var RI=de((G6t,Hse)=>{"use strict";var k1=yo(),LI=fn(),Ttt=oo(),Ett=OI(),Ctt=HT(),Att=x0(),Dtt=Xh(),Ott=cc().get,Itt=II(),Mtt=r4(),Ptt=Att("native-string-replace",String.prototype.replace),PI=RegExp.prototype.exec,l4=PI,Ltt=LI("".charAt),Rtt=LI("".indexOf),Ftt=LI("".replace),s4=LI("".slice),u4=function(){var r=/a/,e=/b*/g;return k1(PI,r,"a"),k1(PI,e,"a"),r.lastIndex!==0||e.lastIndex!==0}(),Use=Ctt.BROKEN_CARET,c4=/()??/.exec("")[1]!==void 0,Ntt=u4||c4||Use||Itt||Mtt;Ntt&&(l4=function(e){var t=this,n=Ott(t),i=Ttt(e),o=n.raw,a,u,h,p,_,T,O;if(o)return o.lastIndex=t.lastIndex,a=k1(l4,o,i),t.lastIndex=o.lastIndex,a;var L=n.groups,q=Use&&t.sticky,U=k1(Ett,t),Z=t.source,te=0,ie=i;if(q&&(U=Ftt(U,"y",""),Rtt(U,"g")===-1&&(U+="g"),ie=s4(i,t.lastIndex),t.lastIndex>0&&(!t.multiline||t.multiline&&Ltt(i,t.lastIndex-1)!==` `)&&(Z="(?: "+Z+")",ie=" "+ie,te++),u=new RegExp("^(?:"+Z+")",U)),c4&&(u=new RegExp("^"+Z+"$(?!\\s)",U)),u4&&(h=t.lastIndex),p=k1(PI,q?u:t,ie),q?p?(p.input=s4(p.input,te),p[0]=s4(p[0],te),p.index=t.lastIndex,t.lastIndex+=p[0].length):t.lastIndex=0:u4&&p&&(t.lastIndex=t.global?p.index+p[0].length:h),c4&&p&&p.length>1&&k1(Ptt,p[0],u,function(){for(_=1;_{"use strict";var qtt=Ut(),Wse=RI();qtt({target:"RegExp",proto:!0,forced:/./.exec!==Wse},{exec:Wse})});var Kse=de(()=>{"use strict";var Btt=Wn(),ztt=Li(),jtt=Jc(),Utt=OI(),Htt=on(),Vse=Btt.RegExp,$se=Vse.prototype,Wtt=ztt&&Htt(function(){var r=!0;try{Vse(".","d")}catch{r=!1}var e={},t="",n=r?"dgimsy":"gimsy",i=function(h,p){Object.defineProperty(e,h,{get:function(){return t+=p,!0}})},o={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};r&&(o.hasIndices="d");for(var a in o)i(a,o[a]);var u=Object.getOwnPropertyDescriptor($se,"flags").get.call(e);return u!==n||t!==n});Wtt&&jtt($se,"flags",{configurable:!0,get:Utt})});var Yse=de(()=>{"use strict";var Vtt=Li(),$tt=HT().MISSED_STICKY,Ktt=jf(),Gtt=Jc(),Ytt=cc().get,Gse=RegExp.prototype,Ztt=TypeError;Vtt&&$tt&&Gtt(Gse,"sticky",{configurable:!0,get:function(){if(this!==Gse){if(Ktt(this)==="RegExp")return!!Ytt(this).sticky;throw new Ztt("Incompatible receiver, RegExp required")}}})});var Jse=de(()=>{"use strict";FI();var Xtt=Ut(),Zse=yo(),Jtt=sa(),Xse=Eo(),Qtt=oo(),ert=function(){var r=!1,e=/[ac]/;return e.exec=function(){return r=!0,/./.exec.apply(this,arguments)},e.test("abc")===!0&&r}(),trt=/./.test;Xtt({target:"RegExp",proto:!0,forced:!ert},{test:function(r){var e=Xse(this),t=Qtt(r),n=e.exec;if(!Jtt(n))return Zse(trt,e,t);var i=Zse(n,e,t);return i===null?!1:(Xse(i),!0)}})});var rle=de(()=>{"use strict";var rrt=w0().PROPER,nrt=nl(),irt=Eo(),Qse=oo(),ort=on(),art=w1(),f4="toString",ele=RegExp.prototype,tle=ele[f4],srt=ort(function(){return tle.call({source:"a",flags:"b"})!=="/a/b"}),lrt=rrt&&tle.name!==f4;(srt||lrt)&&nrt(ele,f4,function(){var e=irt(this),t=Qse(e.source),n=Qse(art(e));return"/"+t+"/"+n},{unsafe:!0})});var nle=de(()=>{"use strict";var urt=kT(),crt=Uz();urt("Set",function(r){return function(){return r(this,arguments.length?arguments[0]:void 0)}},crt)});var ile=de(()=>{"use strict";nle()});var ole=de(()=>{"use strict";var frt=Ut(),hrt=fn(),drt=ml(),prt=gu(),mrt=oo(),grt=on(),vrt=hrt("".charAt),yrt=grt(function(){return"\u{20BB7}".at(-2)!=="\uD842"});frt({target:"String",proto:!0,forced:yrt},{at:function(e){var t=mrt(drt(this)),n=t.length,i=prt(e),o=i>=0?i:n+i;return o<0||o>=n?void 0:vrt(t,o)}})});var VT=de((fUt,lle)=>{"use strict";var h4=fn(),brt=gu(),xrt=oo(),_rt=ml(),wrt=h4("".charAt),ale=h4("".charCodeAt),Srt=h4("".slice),sle=function(r){return function(e,t){var n=xrt(_rt(e)),i=brt(t),o=n.length,a,u;return i<0||i>=o?r?"":void 0:(a=ale(n,i),a<55296||a>56319||i+1===o||(u=ale(n,i+1))<56320||u>57343?r?wrt(n,i):a:r?Srt(n,i,i+2):(a-55296<<10)+(u-56320)+65536)}};lle.exports={codeAt:sle(!1),charAt:sle(!0)}});var ule=de(()=>{"use strict";var krt=Ut(),Trt=VT().codeAt;krt({target:"String",proto:!0},{codePointAt:function(e){return Trt(this,e)}})});var NI=de((pUt,cle)=>{"use strict";var Ert=UT(),Crt=TypeError;cle.exports=function(r){if(Ert(r))throw new Crt("The method doesn't accept regular expressions");return r}});var qI=de((mUt,fle)=>{"use strict";var Art=Jo(),Drt=Art("match");fle.exports=function(r){var e=/./;try{"/./"[r](e)}catch{try{return e[Drt]=!1,"/./"[r](e)}catch{}}return!1}});var ple=de(()=>{"use strict";var Ort=Ut(),Irt=Ny(),Mrt=Uf().f,Prt=Zh(),hle=oo(),Lrt=NI(),Rrt=ml(),Frt=qI(),Nrt=jl(),qrt=Irt("".slice),Brt=Math.min,dle=Frt("endsWith"),zrt=!Nrt&&!dle&&!!function(){var r=Mrt(String.prototype,"endsWith");return r&&!r.writable}();Ort({target:"String",proto:!0,forced:!zrt&&!dle},{endsWith:function(e){var t=hle(Rrt(this));Lrt(e);var n=arguments.length>1?arguments[1]:void 0,i=t.length,o=n===void 0?i:Brt(Prt(n),i),a=hle(e);return qrt(t,o-a.length,o)===a}})});var vle=de(()=>{"use strict";var jrt=Ut(),Urt=fn(),Hrt=cg(),Wrt=RangeError,mle=String.fromCharCode,gle=String.fromCodePoint,Vrt=Urt([].join),$rt=!!gle&&gle.length!==1;jrt({target:"String",stat:!0,arity:1,forced:$rt},{fromCodePoint:function(e){for(var t=[],n=arguments.length,i=0,o;n>i;){if(o=+arguments[i++],Hrt(o,1114111)!==o)throw new Wrt(o+" is not a valid code point");t[i]=o<65536?mle(o):mle(((o-=65536)>>10)+55296,o%1024+56320)}return Vrt(t,"")}})});var ble=de(()=>{"use strict";var Krt=Ut(),Grt=fn(),Yrt=NI(),Zrt=ml(),yle=oo(),Xrt=qI(),Jrt=Grt("".indexOf);Krt({target:"String",proto:!0,forced:!Xrt("includes")},{includes:function(e){return!!~Jrt(yle(Zrt(this)),yle(Yrt(e)),arguments.length>1?arguments[1]:void 0)}})});var _le=de(()=>{"use strict";var Qrt=Ut(),ent=fn(),tnt=ml(),rnt=oo(),xle=ent("".charCodeAt);Qrt({target:"String",proto:!0},{isWellFormed:function(){for(var e=rnt(tnt(this)),t=e.length,n=0;n=56320||++n>=t||(xle(e,n)&64512)!==56320))return!1}return!0}})});var d4=de(()=>{"use strict";var nnt=VT().charAt,int=oo(),Sle=cc(),ont=W2(),wle=n1(),kle="String Iterator",ant=Sle.set,snt=Sle.getterFor(kle);ont(String,"String",function(r){ant(this,{type:kle,string:int(r),index:0})},function(){var e=snt(this),t=e.string,n=e.index,i;return n>=t.length?wle(void 0,!0):(i=nnt(t,n),e.index+=i.length,wle(i,!1))})});var $T=de((EUt,Dle)=>{"use strict";FI();var Tle=yo(),Ele=nl(),lnt=RI(),Cle=on(),Ale=Jo(),unt=Hf(),cnt=Ale("species"),p4=RegExp.prototype;Dle.exports=function(r,e,t,n){var i=Ale(r),o=!Cle(function(){var p={};return p[i]=function(){return 7},""[r](p)!==7}),a=o&&!Cle(function(){var p=!1,_=/a/;return r==="split"&&(_={},_.constructor={},_.constructor[cnt]=function(){return _},_.flags="",_[i]=/./[i]),_.exec=function(){return p=!0,null},_[i](""),!p});if(!o||!a||t){var u=/./[i],h=e(i,""[r],function(p,_,T,O,L){var q=_.exec;return q===lnt||q===p4.exec?o&&!L?{done:!0,value:Tle(u,_,T,O)}:{done:!0,value:Tle(p,T,_,O)}:{done:!1}});Ele(String.prototype,r,h[0]),Ele(p4,i,h[1])}n&&unt(p4[i],"sham",!0)}});var KT=de((CUt,Ole)=>{"use strict";var fnt=VT().charAt;Ole.exports=function(r,e,t){return e+(t?fnt(r,e).length:1)}});var T1=de((AUt,Mle)=>{"use strict";var Ile=yo(),hnt=Eo(),dnt=sa(),pnt=jf(),mnt=RI(),gnt=TypeError;Mle.exports=function(r,e){var t=r.exec;if(dnt(t)){var n=Ile(t,r,e);return n!==null&&hnt(n),n}if(pnt(r)==="RegExp")return Ile(mnt,r,e);throw new gnt("RegExp#exec called on incompatible receiver")}});var Lle=de(()=>{"use strict";var vnt=yo(),ynt=$T(),bnt=Eo(),xnt=gh(),_nt=Zh(),m4=oo(),wnt=ml(),Snt=lg(),knt=KT(),Ple=T1();ynt("match",function(r,e,t){return[function(i){var o=wnt(this),a=xnt(i)?void 0:Snt(i,r);return a?vnt(a,i,o):new RegExp(i)[r](m4(o))},function(n){var i=bnt(this),o=m4(n),a=t(e,i,o);if(a.done)return a.value;if(!i.global)return Ple(i,o);var u=i.unicode;i.lastIndex=0;for(var h=[],p=0,_;(_=Ple(i,o))!==null;){var T=m4(_[0]);h[p]=T,T===""&&(i.lastIndex=knt(o,_nt(i.lastIndex),u)),p++}return p===0?null:h}]})});var Wle=de(()=>{"use strict";var Tnt=Ut(),Rle=yo(),qle=Ny(),Ent=j2(),BI=n1(),Fle=ml(),Ble=Zh(),GT=oo(),Cnt=Eo(),Ant=gh(),Dnt=jf(),Ont=UT(),zle=w1(),Int=lg(),Mnt=nl(),Pnt=on(),Lnt=Jo(),Rnt=M0(),Fnt=KT(),Nnt=T1(),jle=cc(),v4=jl(),zI=Lnt("matchAll"),Ule="RegExp String",Hle=Ule+" Iterator",qnt=jle.set,Bnt=jle.getterFor(Hle),Nle=RegExp.prototype,znt=TypeError,y4=qle("".indexOf),jI=qle("".matchAll),g4=!!jI&&!Pnt(function(){jI("a",/./)}),jnt=Ent(function(e,t,n,i){qnt(this,{type:Hle,regexp:e,string:t,global:n,unicode:i,done:!1})},Ule,function(){var e=Bnt(this);if(e.done)return BI(void 0,!0);var t=e.regexp,n=e.string,i=Nnt(t,n);return i===null?(e.done=!0,BI(void 0,!0)):e.global?(GT(i[0])===""&&(t.lastIndex=Fnt(n,Ble(t.lastIndex),e.unicode)),BI(i,!1)):(e.done=!0,BI(i,!1))}),b4=function(r){var e=Cnt(this),t=GT(r),n=Rnt(e,RegExp),i=GT(zle(e)),o,a,u;return o=new n(n===RegExp?e.source:e,i),a=!!~y4(i,"g"),u=!!~y4(i,"u"),o.lastIndex=Ble(e.lastIndex),new jnt(o,t,a,u)};Tnt({target:"String",proto:!0,forced:g4},{matchAll:function(e){var t=Fle(this),n,i,o,a;if(Ant(e)){if(g4)return jI(t,e)}else{if(Ont(e)&&(n=GT(Fle(zle(e))),!~y4(n,"g")))throw new znt("`.matchAll` does not allow non-global regexes");if(g4)return jI(t,e);if(o=Int(e,zI),o===void 0&&v4&&Dnt(e)==="RegExp"&&(o=b4),o)return Rle(o,e,t)}return i=GT(t),a=new RegExp(e,"g"),v4?Rle(b4,a,i):a[zI](i)}});v4||zI in Nle||Mnt(Nle,zI,b4)});var x4=de((PUt,Vle)=>{"use strict";var Unt=ag();Vle.exports=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(Unt)});var $le=de(()=>{"use strict";var Hnt=Ut(),Wnt=lI().end,Vnt=x4();Hnt({target:"String",proto:!0,forced:Vnt},{padEnd:function(e){return Wnt(this,e,arguments.length>1?arguments[1]:void 0)}})});var Kle=de(()=>{"use strict";var $nt=Ut(),Knt=lI().start,Gnt=x4();$nt({target:"String",proto:!0,forced:Gnt},{padStart:function(e){return Knt(this,e,arguments.length>1?arguments[1]:void 0)}})});var Xle=de(()=>{"use strict";var Ynt=Ut(),Zle=fn(),Znt=Rc(),Xnt=za(),Gle=oo(),Jnt=us(),Yle=Zle([].push),Qnt=Zle([].join);Ynt({target:"String",stat:!0},{raw:function(e){var t=Znt(Xnt(e).raw),n=Jnt(t);if(!n)return"";for(var i=arguments.length,o=[],a=0;;){if(Yle(o,Gle(t[a++])),a===n)return Qnt(o,"");a{"use strict";var eit=Ut(),tit=wT();eit({target:"String",proto:!0},{repeat:tit})});var k4=de((UUt,Qle)=>{"use strict";var S4=fn(),rit=za(),nit=Math.floor,_4=S4("".charAt),iit=S4("".replace),w4=S4("".slice),oit=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,ait=/\$([$&'`]|\d{1,2})/g;Qle.exports=function(r,e,t,n,i,o){var a=t+r.length,u=n.length,h=ait;return i!==void 0&&(i=rit(i),h=oit),iit(o,h,function(p,_){var T;switch(_4(_,0)){case"$":return"$";case"&":return r;case"`":return w4(e,0,t);case"'":return w4(e,a);case"<":T=i[w4(_,1,-1)];break;default:var O=+_;if(O===0)return p;if(O>u){var L=nit(O/10);return L===0?p:L<=u?n[L-1]===void 0?_4(_,1):n[L-1]+_4(_,1):p}T=n[O-1]}return T===void 0?"":T})}});var iue=de(()=>{"use strict";var sit=Ip(),eue=yo(),UI=fn(),lit=$T(),uit=on(),cit=Eo(),fit=sa(),hit=gh(),dit=gu(),pit=Zh(),E1=oo(),mit=ml(),git=KT(),vit=lg(),yit=k4(),bit=T1(),xit=Jo(),E4=xit("replace"),_it=Math.max,wit=Math.min,Sit=UI([].concat),T4=UI([].push),tue=UI("".indexOf),rue=UI("".slice),kit=function(r){return r===void 0?r:String(r)},Tit=function(){return"a".replace(/./,"$0")==="$0"}(),nue=function(){return/./[E4]?/./[E4]("a","$0")==="":!1}(),Eit=!uit(function(){var r=/./;return r.exec=function(){var e=[];return e.groups={a:"7"},e},"".replace(r,"$")!=="7"});lit("replace",function(r,e,t){var n=nue?"$":"$0";return[function(o,a){var u=mit(this),h=hit(o)?void 0:vit(o,E4);return h?eue(h,o,u,a):eue(e,E1(u),o,a)},function(i,o){var a=cit(this),u=E1(i);if(typeof o=="string"&&tue(o,n)===-1&&tue(o,"$<")===-1){var h=t(e,a,u,o);if(h.done)return h.value}var p=fit(o);p||(o=E1(o));var _=a.global,T;_&&(T=a.unicode,a.lastIndex=0);for(var O=[],L;L=bit(a,u),!(L===null||(T4(O,L),!_));){var q=E1(L[0]);q===""&&(a.lastIndex=git(u,pit(a.lastIndex),T))}for(var U="",Z=0,te=0;te=Z&&(U+=rue(u,Z,ue)+ve,Z=ue+ie.length)}return U+rue(u,Z)}]},!Eit||!Tit||nue)});var sue=de(()=>{"use strict";var Cit=Ut(),Ait=yo(),A4=fn(),oue=ml(),Dit=sa(),Oit=gh(),Iit=UT(),C1=oo(),Mit=lg(),Pit=w1(),Lit=k4(),Rit=Jo(),Fit=jl(),Nit=Rit("replace"),qit=TypeError,C4=A4("".indexOf),Bit=A4("".replace),aue=A4("".slice),zit=Math.max;Cit({target:"String",proto:!0},{replaceAll:function(e,t){var n=oue(this),i,o,a,u,h,p,_,T,O,L=0,q=0,U="";if(!Oit(e)){if(i=Iit(e),i&&(o=C1(oue(Pit(e))),!~C4(o,"g")))throw new qit("`.replaceAll` does not allow non-global regexes");if(a=Mit(e,Nit),a)return Ait(a,e,n,t);if(Fit&&i)return Bit(C1(n),e,t)}for(u=C1(n),h=C1(e),p=Dit(t),p||(t=C1(t)),_=h.length,T=zit(1,_),L=C4(u,h);L!==-1;)O=p?C1(t(h,L,u)):Lit(h,u,L,[],void 0,t),U+=aue(u,q,L)+O,q=L+_,L=L+T>u.length?-1:C4(u,h,L+T);return q{"use strict";var jit=yo(),Uit=$T(),Hit=Eo(),Wit=gh(),Vit=ml(),lue=f5(),uue=oo(),$it=lg(),Kit=T1();Uit("search",function(r,e,t){return[function(i){var o=Vit(this),a=Wit(i)?void 0:$it(i,r);return a?jit(a,i,o):new RegExp(i)[r](uue(o))},function(n){var i=Hit(this),o=uue(n),a=t(e,i,o);if(a.done)return a.value;var u=i.lastIndex;lue(u,0)||(i.lastIndex=0);var h=Kit(i,o);return lue(i.lastIndex,u)||(i.lastIndex=u),h===null?-1:h.index}]})});var mue=de(()=>{"use strict";var D4=yo(),pue=fn(),Git=$T(),Yit=Eo(),Zit=gh(),Xit=ml(),Jit=M0(),Qit=KT(),eot=Zh(),fue=oo(),tot=lg(),hue=T1(),rot=HT(),not=on(),A1=rot.UNSUPPORTED_Y,iot=4294967295,oot=Math.min,O4=pue([].push),I4=pue("".slice),aot=!not(function(){var r=/(?:)/,e=r.exec;r.exec=function(){return e.apply(this,arguments)};var t="ab".split(r);return t.length!==2||t[0]!=="a"||t[1]!=="b"}),due="abbc".split(/(b)*/)[1]==="c"||"test".split(/(?:)/,-1).length!==4||"ab".split(/(?:ab)*/).length!==2||".".split(/(.?)(.?)/).length!==4||".".split(/()()/).length>1||"".split(/.?/).length;Git("split",function(r,e,t){var n="0".split(void 0,0).length?function(i,o){return i===void 0&&o===0?[]:D4(e,this,i,o)}:e;return[function(o,a){var u=Xit(this),h=Zit(o)?void 0:tot(o,r);return h?D4(h,o,u,a):D4(n,fue(u),o,a)},function(i,o){var a=Yit(this),u=fue(i);if(!due){var h=t(n,a,u,o,n!==e);if(h.done)return h.value}var p=Jit(a,RegExp),_=a.unicode,T=(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.unicode?"u":"")+(A1?"g":"y"),O=new p(A1?"^(?:"+a.source+")":a,T),L=o===void 0?iot:o>>>0;if(L===0)return[];if(u.length===0)return hue(O,u)===null?[u]:[];for(var q=0,U=0,Z=[];U{"use strict";var sot=Ut(),lot=Ny(),uot=Uf().f,cot=Zh(),gue=oo(),fot=NI(),hot=ml(),dot=qI(),pot=jl(),mot=lot("".slice),got=Math.min,vue=dot("startsWith"),vot=!pot&&!vue&&!!function(){var r=uot(String.prototype,"startsWith");return r&&!r.writable}();sot({target:"String",proto:!0,forced:!vot&&!vue},{startsWith:function(e){var t=gue(hot(this));fot(e);var n=cot(got(arguments.length>1?arguments[1]:void 0,t.length)),i=gue(e);return mot(t,n,n+i.length)===i}})});var xue=de(()=>{"use strict";var yot=Ut(),bot=fn(),xot=ml(),bue=gu(),_ot=oo(),wot=bot("".slice),Sot=Math.max,kot=Math.min,Tot=!"".substr||"ab".substr(-1)!=="b";yot({target:"String",proto:!0,forced:Tot},{substr:function(e,t){var n=_ot(xot(this)),i=n.length,o=bue(e),a,u;return o===1/0&&(o=0),o<0&&(o=Sot(i+o,0)),a=t===void 0?i:bue(t),a<=0||a===1/0?"":(u=kot(o+a,i),o>=u?"":wot(n,o,u))}})});var kue=de(()=>{"use strict";var Eot=Ut(),Sue=yo(),L4=fn(),Cot=ml(),Aot=oo(),Dot=on(),Oot=Array,M4=L4("".charAt),_ue=L4("".charCodeAt),Iot=L4([].join),P4="".toWellFormed,Mot="\uFFFD",wue=P4&&Dot(function(){return Sue(P4,1)!=="1"});Eot({target:"String",proto:!0,forced:wue},{toWellFormed:function(){var e=Aot(Cot(this));if(wue)return Sue(P4,e);for(var t=e.length,n=Oot(t),i=0;i=56320||i+1>=t||(_ue(e,i+1)&64512)!==56320?n[i]=Mot:(n[i]=M4(e,i),n[++i]=M4(e,i))}return Iot(n,"")}})});var HI=de((nHt,Cue)=>{"use strict";var Pot=w0().PROPER,Lot=on(),Tue=OT(),Eue="\u200B\x85\u180E";Cue.exports=function(r){return Lot(function(){return!!Tue[r]()||Eue[r]()!==Eue||Pot&&Tue[r].name!==r})}});var Aue=de(()=>{"use strict";var Rot=Ut(),Fot=R0().trim,Not=HI();Rot({target:"String",proto:!0,forced:Not("trim")},{trim:function(){return Fot(this)}})});var R4=de((aHt,Due)=>{"use strict";var qot=R0().end,Bot=HI();Due.exports=Bot("trimEnd")?function(){return qot(this)}:"".trimEnd});var Iue=de(()=>{"use strict";var zot=Ut(),Oue=R4();zot({target:"String",proto:!0,name:"trimEnd",forced:"".trimRight!==Oue},{trimRight:Oue})});var Pue=de(()=>{"use strict";Iue();var jot=Ut(),Mue=R4();jot({target:"String",proto:!0,name:"trimEnd",forced:"".trimEnd!==Mue},{trimEnd:Mue})});var F4=de((fHt,Lue)=>{"use strict";var Uot=R0().start,Hot=HI();Lue.exports=Hot("trimStart")?function(){return Uot(this)}:"".trimStart});var Fue=de(()=>{"use strict";var Wot=Ut(),Rue=F4();Wot({target:"String",proto:!0,name:"trimStart",forced:"".trimLeft!==Rue},{trimLeft:Rue})});var que=de(()=>{"use strict";Fue();var Vot=Ut(),Nue=F4();Vot({target:"String",proto:!0,name:"trimStart",forced:"".trimStart!==Nue},{trimStart:Nue})});var ed=de((gHt,zue)=>{"use strict";var $ot=fn(),Kot=ml(),Bue=oo(),Got=/"/g,Yot=$ot("".replace);zue.exports=function(r,e,t,n){var i=Bue(Kot(r)),o="<"+e;return t!==""&&(o+=" "+t+'="'+Yot(Bue(n),Got,""")+'"'),o+">"+i+""}});var td=de((vHt,jue)=>{"use strict";var Zot=on();jue.exports=function(r){return Zot(function(){var e=""[r]('"');return e!==e.toLowerCase()||e.split('"').length>3})}});var Uue=de(()=>{"use strict";var Xot=Ut(),Jot=ed(),Qot=td();Xot({target:"String",proto:!0,forced:Qot("anchor")},{anchor:function(e){return Jot(this,"a","name",e)}})});var Hue=de(()=>{"use strict";var eat=Ut(),tat=ed(),rat=td();eat({target:"String",proto:!0,forced:rat("big")},{big:function(){return tat(this,"big","","")}})});var Wue=de(()=>{"use strict";var nat=Ut(),iat=ed(),oat=td();nat({target:"String",proto:!0,forced:oat("blink")},{blink:function(){return iat(this,"blink","","")}})});var Vue=de(()=>{"use strict";var aat=Ut(),sat=ed(),lat=td();aat({target:"String",proto:!0,forced:lat("bold")},{bold:function(){return sat(this,"b","","")}})});var $ue=de(()=>{"use strict";var uat=Ut(),cat=ed(),fat=td();uat({target:"String",proto:!0,forced:fat("fixed")},{fixed:function(){return cat(this,"tt","","")}})});var Kue=de(()=>{"use strict";var hat=Ut(),dat=ed(),pat=td();hat({target:"String",proto:!0,forced:pat("fontcolor")},{fontcolor:function(e){return dat(this,"font","color",e)}})});var Gue=de(()=>{"use strict";var mat=Ut(),gat=ed(),vat=td();mat({target:"String",proto:!0,forced:vat("fontsize")},{fontsize:function(e){return gat(this,"font","size",e)}})});var Yue=de(()=>{"use strict";var yat=Ut(),bat=ed(),xat=td();yat({target:"String",proto:!0,forced:xat("italics")},{italics:function(){return bat(this,"i","","")}})});var Zue=de(()=>{"use strict";var _at=Ut(),wat=ed(),Sat=td();_at({target:"String",proto:!0,forced:Sat("link")},{link:function(e){return wat(this,"a","href",e)}})});var Xue=de(()=>{"use strict";var kat=Ut(),Tat=ed(),Eat=td();kat({target:"String",proto:!0,forced:Eat("small")},{small:function(){return Tat(this,"small","","")}})});var Jue=de(()=>{"use strict";var Cat=Ut(),Aat=ed(),Dat=td();Cat({target:"String",proto:!0,forced:Dat("strike")},{strike:function(){return Aat(this,"strike","","")}})});var Que=de(()=>{"use strict";var Oat=Ut(),Iat=ed(),Mat=td();Oat({target:"String",proto:!0,forced:Mat("sub")},{sub:function(){return Iat(this,"sub","","")}})});var ece=de(()=>{"use strict";var Pat=Ut(),Lat=ed(),Rat=td();Pat({target:"String",proto:!0,forced:Rat("sup")},{sup:function(){return Lat(this,"sup","","")}})});var WI=de((WHt,rce)=>{"use strict";var tce=Wn(),N4=on(),Fat=dT(),Nat=Vo().NATIVE_ARRAY_BUFFER_VIEWS,qat=tce.ArrayBuffer,z0=tce.Int8Array;rce.exports=!Nat||!N4(function(){z0(1)})||!N4(function(){new z0(-1)})||!Fat(function(r){new z0,new z0(null),new z0(1.5),new z0(r)},!0)||N4(function(){return new z0(new qat(2),1,void 0).length!==1})});var ice=de((VHt,nce)=>{"use strict";var Bat=gu(),zat=RangeError;nce.exports=function(r){var e=Bat(r);if(e<0)throw new zat("The argument can't be less than 0");return e}});var q4=de(($Ht,oce)=>{"use strict";var jat=ice(),Uat=RangeError;oce.exports=function(r,e){var t=jat(r);if(t%e)throw new Uat("Wrong offset");return t}});var sce=de((KHt,ace)=>{"use strict";var Hat=Math.round;ace.exports=function(r){var e=Hat(r);return e<0?0:e>255?255:e&255}});var B4=de((GHt,lce)=>{"use strict";var Wat=Sm();lce.exports=function(r){var e=Wat(r);return e==="BigInt64Array"||e==="BigUint64Array"}});var VI=de((YHt,uce)=>{"use strict";var Vat=Xk(),$at=TypeError;uce.exports=function(r){var e=Vat(r,"number");if(typeof e=="number")throw new $at("Can't convert number to bigint");return BigInt(e)}});var z4=de((ZHt,cce)=>{"use strict";var Kat=Dp(),Gat=yo(),Yat=sI(),Zat=za(),Xat=us(),Jat=cT(),Qat=e1(),est=F2(),tst=B4(),rst=Vo().aTypedArrayConstructor,nst=VI();cce.exports=function(e){var t=Yat(this),n=Zat(e),i=arguments.length,o=i>1?arguments[1]:void 0,a=o!==void 0,u=Qat(n),h,p,_,T,O,L,q,U;if(u&&!est(u))for(q=Jat(n,u),U=q.next,n=[];!(L=Gat(U,q)).done;)n.push(L.value);for(a&&i>2&&(o=Kat(o,arguments[2])),p=Xat(n),_=new(rst(t))(p),T=tst(_),h=0;p>h;h++)O=a?o(n[h],h):n[h],_[h]=T?nst(O):+O;return _}});var gg=de((XHt,K4)=>{"use strict";var fce=Ut(),wce=Wn(),hce=yo(),ist=Li(),ost=WI(),JT=Vo(),Sce=_T(),dce=Tm(),ast=Hd(),YT=Hf(),sst=vI(),lst=Zh(),pce=fz(),j4=q4(),ust=sce(),kce=ug(),ZT=ba(),cst=Sm(),W4=Wo(),fst=Ly(),hst=Xh(),dst=Yh(),$I=km(),pst=Fy().f,mce=z4(),mst=Qc().forEach,gst=O0(),vst=Jc(),Tce=vl(),Ece=Uf(),gce=yT(),G4=cc(),yst=zy(),V4=G4.get,bst=G4.set,xst=G4.enforce,Cce=Tce.f,_st=Ece.f,U4=wce.RangeError,Ace=Sce.ArrayBuffer,wst=Ace.prototype,Sst=Sce.DataView,KI=JT.NATIVE_ARRAY_BUFFER_VIEWS,vce=JT.TYPED_ARRAY_TAG,yce=JT.TypedArray,XT=JT.TypedArrayPrototype,$4=JT.isTypedArray,GI="BYTES_PER_ELEMENT",H4="Wrong length",YI=function(r,e){vst(r,e,{configurable:!0,get:function(){return V4(this)[e]}})},bce=function(r){var e;return dst(wst,r)||(e=cst(r))==="ArrayBuffer"||e==="SharedArrayBuffer"},Dce=function(r,e){return $4(r)&&!fst(e)&&e in r&&sst(+e)&&e>=0},xce=function(e,t){return t=kce(t),Dce(e,t)?ast(2,e[t]):_st(e,t)},_ce=function(e,t,n){return t=kce(t),Dce(e,t)&&W4(n)&&ZT(n,"value")&&!ZT(n,"get")&&!ZT(n,"set")&&!n.configurable&&(!ZT(n,"writable")||n.writable)&&(!ZT(n,"enumerable")||n.enumerable)?(e[t]=n.value,e):Cce(e,t,n)};ist?(KI||(Ece.f=xce,Tce.f=_ce,YI(XT,"buffer"),YI(XT,"byteOffset"),YI(XT,"byteLength"),YI(XT,"length")),fce({target:"Object",stat:!0,forced:!KI},{getOwnPropertyDescriptor:xce,defineProperty:_ce}),K4.exports=function(r,e,t){var n=r.match(/\d+/)[0]/8,i=r+(t?"Clamped":"")+"Array",o="get"+r,a="set"+r,u=wce[i],h=u,p=h&&h.prototype,_={},T=function(U,Z){var te=V4(U);return te.view[o](Z*n+te.byteOffset,!0)},O=function(U,Z,te){var ie=V4(U);ie.view[a](Z*n+ie.byteOffset,t?ust(te):te,!0)},L=function(U,Z){Cce(U,Z,{get:function(){return T(this,Z)},set:function(te){return O(this,Z,te)},enumerable:!0})};KI?ost&&(h=e(function(U,Z,te,ie){return dce(U,p),yst(function(){return W4(Z)?bce(Z)?ie!==void 0?new u(Z,j4(te,n),ie):te!==void 0?new u(Z,j4(te,n)):new u(Z):$4(Z)?gce(h,Z):hce(mce,h,Z):new u(pce(Z))}(),U,h)}),$I&&$I(h,yce),mst(pst(u),function(U){U in h||YT(h,U,u[U])}),h.prototype=p):(h=e(function(U,Z,te,ie){dce(U,p);var ue=0,S=0,ve,le,ge;if(!W4(Z))ge=pce(Z),le=ge*n,ve=new Ace(le);else if(bce(Z)){ve=Z,S=j4(te,n);var Se=Z.byteLength;if(ie===void 0){if(Se%n)throw new U4(H4);if(le=Se-S,le<0)throw new U4(H4)}else if(le=lst(ie)*n,le+S>Se)throw new U4(H4);ge=le/n}else return $4(Z)?gce(h,Z):hce(mce,h,Z);for(bst(U,{buffer:ve,byteOffset:S,byteLength:le,length:ge,view:new Sst(ve)});ue{"use strict";var kst=gg();kst("Float32",function(r){return function(t,n,i){return r(this,t,n,i)}})});var Ice=de(()=>{"use strict";var Tst=gg();Tst("Float64",function(r){return function(t,n,i){return r(this,t,n,i)}})});var Mce=de(()=>{"use strict";var Est=gg();Est("Int8",function(r){return function(t,n,i){return r(this,t,n,i)}})});var Pce=de(()=>{"use strict";var Cst=gg();Cst("Int16",function(r){return function(t,n,i){return r(this,t,n,i)}})});var Lce=de(()=>{"use strict";var Ast=gg();Ast("Int32",function(r){return function(t,n,i){return r(this,t,n,i)}})});var Rce=de(()=>{"use strict";var Dst=gg();Dst("Uint8",function(r){return function(t,n,i){return r(this,t,n,i)}})});var Fce=de(()=>{"use strict";var Ost=gg();Ost("Uint8",function(r){return function(t,n,i){return r(this,t,n,i)}},!0)});var Nce=de(()=>{"use strict";var Ist=gg();Ist("Uint16",function(r){return function(t,n,i){return r(this,t,n,i)}})});var qce=de(()=>{"use strict";var Mst=gg();Mst("Uint32",function(r){return function(t,n,i){return r(this,t,n,i)}})});var zce=de(()=>{"use strict";var Bce=Vo(),Pst=us(),Lst=gu(),Rst=Bce.aTypedArray,Fst=Bce.exportTypedArrayMethod;Fst("at",function(e){var t=Rst(this),n=Pst(t),i=Lst(e),o=i>=0?i:n+i;return o<0||o>=n?void 0:t[o]})});var Uce=de(()=>{"use strict";var Nst=fn(),jce=Vo(),qst=jB(),Bst=Nst(qst),zst=jce.aTypedArray,jst=jce.exportTypedArrayMethod;jst("copyWithin",function(e,t){return Bst(zst(this),e,t,arguments.length>2?arguments[2]:void 0)})});var Wce=de(()=>{"use strict";var Hce=Vo(),Ust=Qc().every,Hst=Hce.aTypedArray,Wst=Hce.exportTypedArrayMethod;Wst("every",function(e){return Ust(Hst(this),e,arguments.length>1?arguments[1]:void 0)})});var $ce=de(()=>{"use strict";var Vce=Vo(),Vst=z2(),$st=VI(),Kst=Sm(),Gst=yo(),Yst=fn(),Zst=on(),Xst=Vce.aTypedArray,Jst=Vce.exportTypedArrayMethod,Qst=Yst("".slice),elt=Zst(function(){var r=0;return new Int8Array(2).fill({valueOf:function(){return r++}}),r!==1});Jst("fill",function(e){var t=arguments.length;Xst(this);var n=Qst(Kst(this),0,3)==="Big"?$st(e):+e;return Gst(Vst,this,n,t>1?arguments[1]:void 0,t>2?arguments[2]:void 0)},elt)});var QT=de((kWt,Gce)=>{"use strict";var Kce=Vo(),tlt=M0(),rlt=Kce.aTypedArrayConstructor,nlt=Kce.getTypedArrayConstructor;Gce.exports=function(r){return rlt(tlt(r,nlt(r)))}});var Zce=de((TWt,Yce)=>{"use strict";var ilt=yT(),olt=QT();Yce.exports=function(r,e){return ilt(olt(r),e)}});var Jce=de(()=>{"use strict";var Xce=Vo(),alt=Qc().filter,slt=Zce(),llt=Xce.aTypedArray,ult=Xce.exportTypedArrayMethod;ult("filter",function(e){var t=alt(llt(this),e,arguments.length>1?arguments[1]:void 0);return slt(this,t)})});var efe=de(()=>{"use strict";var Qce=Vo(),clt=Qc().find,flt=Qce.aTypedArray,hlt=Qce.exportTypedArrayMethod;hlt("find",function(e){return clt(flt(this),e,arguments.length>1?arguments[1]:void 0)})});var rfe=de(()=>{"use strict";var tfe=Vo(),dlt=Qc().findIndex,plt=tfe.aTypedArray,mlt=tfe.exportTypedArrayMethod;mlt("findIndex",function(e){return dlt(plt(this),e,arguments.length>1?arguments[1]:void 0)})});var ife=de(()=>{"use strict";var nfe=Vo(),glt=hT().findLast,vlt=nfe.aTypedArray,ylt=nfe.exportTypedArrayMethod;ylt("findLast",function(e){return glt(vlt(this),e,arguments.length>1?arguments[1]:void 0)})});var afe=de(()=>{"use strict";var ofe=Vo(),blt=hT().findLastIndex,xlt=ofe.aTypedArray,_lt=ofe.exportTypedArrayMethod;_lt("findLastIndex",function(e){return blt(xlt(this),e,arguments.length>1?arguments[1]:void 0)})});var lfe=de(()=>{"use strict";var sfe=Vo(),wlt=Qc().forEach,Slt=sfe.aTypedArray,klt=sfe.exportTypedArrayMethod;klt("forEach",function(e){wlt(Slt(this),e,arguments.length>1?arguments[1]:void 0)})});var ufe=de(()=>{"use strict";var Tlt=WI(),Elt=Vo().exportTypedArrayStaticMethod,Clt=z4();Elt("from",Clt,Tlt)});var ffe=de(()=>{"use strict";var cfe=Vo(),Alt=W_().includes,Dlt=cfe.aTypedArray,Olt=cfe.exportTypedArrayMethod;Olt("includes",function(e){return Alt(Dlt(this),e,arguments.length>1?arguments[1]:void 0)})});var dfe=de(()=>{"use strict";var hfe=Vo(),Ilt=W_().indexOf,Mlt=hfe.aTypedArray,Plt=hfe.exportTypedArrayMethod;Plt("indexOf",function(e){return Ilt(Mlt(this),e,arguments.length>1?arguments[1]:void 0)})});var yfe=de(()=>{"use strict";var Llt=Wn(),Rlt=on(),Y4=fn(),mfe=Vo(),Z4=gT(),Flt=Jo(),X4=Flt("iterator"),pfe=Llt.Uint8Array,Nlt=Y4(Z4.values),qlt=Y4(Z4.keys),Blt=Y4(Z4.entries),J4=mfe.aTypedArray,ZI=mfe.exportTypedArrayMethod,D1=pfe&&pfe.prototype,XI=!Rlt(function(){D1[X4].call([1])}),gfe=!!D1&&D1.values&&D1[X4]===D1.values&&D1.values.name==="values",vfe=function(){return Nlt(J4(this))};ZI("entries",function(){return Blt(J4(this))},XI);ZI("keys",function(){return qlt(J4(this))},XI);ZI("values",vfe,XI||!gfe,{name:"values"});ZI(X4,vfe,XI||!gfe,{name:"values"})});var xfe=de(()=>{"use strict";var bfe=Vo(),zlt=fn(),jlt=bfe.aTypedArray,Ult=bfe.exportTypedArrayMethod,Hlt=zlt([].join);Ult("join",function(e){return Hlt(jlt(this),e)})});var wfe=de(()=>{"use strict";var _fe=Vo(),Wlt=Ip(),Vlt=rz(),$lt=_fe.aTypedArray,Klt=_fe.exportTypedArrayMethod;Klt("lastIndexOf",function(e){var t=arguments.length;return Wlt(Vlt,$lt(this),t>1?[e,arguments[1]]:[e])})});var kfe=de(()=>{"use strict";var Sfe=Vo(),Glt=Qc().map,Ylt=QT(),Zlt=Sfe.aTypedArray,Xlt=Sfe.exportTypedArrayMethod;Xlt("map",function(e){return Glt(Zlt(this),e,arguments.length>1?arguments[1]:void 0,function(t,n){return new(Ylt(t))(n)})})});var Efe=de(()=>{"use strict";var Tfe=Vo(),Jlt=WI(),Qlt=Tfe.aTypedArrayConstructor,eut=Tfe.exportTypedArrayStaticMethod;eut("of",function(){for(var e=0,t=arguments.length,n=new(Qlt(this))(t);t>e;)n[e]=arguments[e++];return n},Jlt)});var Afe=de(()=>{"use strict";var Cfe=Vo(),tut=vT().left,rut=Cfe.aTypedArray,nut=Cfe.exportTypedArrayMethod;nut("reduce",function(e){var t=arguments.length;return tut(rut(this),e,t,t>1?arguments[1]:void 0)})});var Ofe=de(()=>{"use strict";var Dfe=Vo(),iut=vT().right,out=Dfe.aTypedArray,aut=Dfe.exportTypedArrayMethod;aut("reduceRight",function(e){var t=arguments.length;return iut(out(this),e,t,t>1?arguments[1]:void 0)})});var Mfe=de(()=>{"use strict";var Ife=Vo(),sut=Ife.aTypedArray,lut=Ife.exportTypedArrayMethod,uut=Math.floor;lut("reverse",function(){for(var e=this,t=sut(e).length,n=uut(t/2),i=0,o;i{"use strict";var Lfe=Wn(),Rfe=yo(),tj=Vo(),cut=us(),fut=q4(),hut=za(),Ffe=on(),dut=Lfe.RangeError,Q4=Lfe.Int8Array,Pfe=Q4&&Q4.prototype,Nfe=Pfe&&Pfe.set,put=tj.aTypedArray,mut=tj.exportTypedArrayMethod,ej=!Ffe(function(){var r=new Uint8ClampedArray(2);return Rfe(Nfe,r,{length:1,0:3},1),r[1]!==3}),gut=ej&&tj.NATIVE_ARRAY_BUFFER_VIEWS&&Ffe(function(){var r=new Q4(2);return r.set(1),r.set("2",1),r[0]!==0||r[1]!==2});mut("set",function(e){put(this);var t=fut(arguments.length>1?arguments[1]:void 0,1),n=hut(e);if(ej)return Rfe(Nfe,this,n,t);var i=this.length,o=cut(n),a=0;if(o+t>i)throw new dut("Wrong length");for(;a{"use strict";var Bfe=Vo(),vut=QT(),yut=on(),but=Ap(),xut=Bfe.aTypedArray,_ut=Bfe.exportTypedArrayMethod,wut=yut(function(){new Int8Array(1).slice()});_ut("slice",function(e,t){for(var n=but(xut(this),e,t),i=vut(this),o=0,a=n.length,u=new i(a);a>o;)u[o]=n[o++];return u},wut)});var Ufe=de(()=>{"use strict";var jfe=Vo(),Sut=Qc().some,kut=jfe.aTypedArray,Tut=jfe.exportTypedArrayMethod;Tut("some",function(e){return Sut(kut(this),e,arguments.length>1?arguments[1]:void 0)})});var Gfe=de(()=>{"use strict";var Eut=Wn(),Cut=Ny(),rj=on(),Aut=gl(),Dut=K2(),Kfe=Vo(),Hfe=oz(),Out=az(),Wfe=sg(),Vfe=G2(),Iut=Kfe.aTypedArray,Mut=Kfe.exportTypedArrayMethod,eE=Eut.Uint16Array,O1=eE&&Cut(eE.prototype.sort),Put=!!O1&&!(rj(function(){O1(new eE(2),null)})&&rj(function(){O1(new eE(2),{})})),$fe=!!O1&&!rj(function(){if(Wfe)return Wfe<74;if(Hfe)return Hfe<67;if(Out)return!0;if(Vfe)return Vfe<602;var r=new eE(516),e=Array(516),t,n;for(t=0;t<516;t++)n=t%4,r[t]=515-t,e[t]=t-2*n+3;for(O1(r,function(i,o){return(i/4|0)-(o/4|0)}),t=0;t<516;t++)if(r[t]!==e[t])return!0}),Lut=function(r){return function(e,t){return r!==void 0?+r(e,t)||0:t!==t?-1:e!==e?1:e===0&&t===0?1/e>0&&1/t<0?1:-1:e>t}};Mut("sort",function(e){return e!==void 0&&Aut(e),$fe?O1(this,e):Dut(Iut(this),Lut(e))},!$fe||Put)});var Xfe=de(()=>{"use strict";var Zfe=Vo(),Rut=Zh(),Yfe=cg(),Fut=QT(),Nut=Zfe.aTypedArray,qut=Zfe.exportTypedArrayMethod;qut("subarray",function(e,t){var n=Nut(this),i=n.length,o=Yfe(e,i),a=Fut(n);return new a(n.buffer,n.byteOffset+o*n.BYTES_PER_ELEMENT,Rut((t===void 0?i:Yfe(t,i))-o))})});var rhe=de(()=>{"use strict";var But=Wn(),zut=Ip(),ehe=Vo(),nj=on(),Jfe=Ap(),JI=But.Int8Array,Qfe=ehe.aTypedArray,jut=ehe.exportTypedArrayMethod,the=[].toLocaleString,Uut=!!JI&&nj(function(){the.call(new JI(1))}),Hut=nj(function(){return[1,2].toLocaleString()!==new JI([1,2]).toLocaleString()})||!nj(function(){JI.prototype.toLocaleString.call([1,2])});jut("toLocaleString",function(){return zut(the,Uut?Jfe(Qfe(this)):Qfe(this),Jfe(arguments))},Hut)});var nhe=de(()=>{"use strict";var Wut=uz(),ij=Vo(),Vut=ij.aTypedArray,$ut=ij.exportTypedArrayMethod,Kut=ij.getTypedArrayConstructor;$ut("toReversed",function(){return Wut(Vut(this),Kut(this))})});var ihe=de(()=>{"use strict";var QI=Vo(),Gut=fn(),Yut=gl(),Zut=yT(),Xut=QI.aTypedArray,Jut=QI.getTypedArrayConstructor,Qut=QI.exportTypedArrayMethod,ect=Gut(QI.TypedArrayPrototype.sort);Qut("toSorted",function(e){e!==void 0&&Yut(e);var t=Xut(this),n=Zut(Jut(t),t);return ect(n,e)})});var ahe=de(()=>{"use strict";var tct=Vo().exportTypedArrayMethod,rct=on(),nct=Wn(),ict=fn(),ohe=nct.Uint8Array,oct=ohe&&ohe.prototype||{},eM=[].toString,act=ict([].join);rct(function(){eM.call({})})&&(eM=function(){return act(this)});var sct=oct.toString!==eM;tct("toString",eM,sct)});var she=de(()=>{"use strict";var lct=cz(),oj=Vo(),uct=B4(),cct=gu(),fct=VI(),hct=oj.aTypedArray,dct=oj.getTypedArrayConstructor,pct=oj.exportTypedArrayMethod,mct=!!function(){try{new Int8Array(1).with(2,{valueOf:function(){throw 8}})}catch(r){return r===8}}();pct("with",function(r,e){var t=hct(this),n=cct(r),i=uct(t)?fct(e):+e;return lct(t,dct(t),n,i)},!mct)});var hhe=de(()=>{"use strict";var gct=Ut(),aj=fn(),vct=oo(),lhe=String.fromCharCode,uhe=aj("".charAt),che=aj(/./.exec),fhe=aj("".slice),yct=/^[\da-f]{2}$/i,bct=/^[\da-f]{4}$/i;gct({global:!0},{unescape:function(e){for(var t=vct(e),n="",i=t.length,o=0,a,u;o{"use strict";var xct=fn(),dhe=i1(),tM=Ky().getWeakData,_ct=Tm(),wct=Eo(),Sct=gh(),sj=Wo(),kct=Vd(),mhe=Qc(),phe=ba(),ghe=cc(),Tct=ghe.set,Ect=ghe.getterFor,Cct=mhe.find,Act=mhe.findIndex,Dct=xct([].splice),Oct=0,rM=function(r){return r.frozen||(r.frozen=new vhe)},vhe=function(){this.entries=[]},lj=function(r,e){return Cct(r.entries,function(t){return t[0]===e})};vhe.prototype={get:function(r){var e=lj(this,r);if(e)return e[1]},has:function(r){return!!lj(this,r)},set:function(r,e){var t=lj(this,r);t?t[1]=e:this.entries.push([r,e])},delete:function(r){var e=Act(this.entries,function(t){return t[0]===r});return~e&&Dct(this.entries,e,1),!!~e}};yhe.exports={getConstructor:function(r,e,t,n){var i=r(function(h,p){_ct(h,o),Tct(h,{type:e,id:Oct++,frozen:void 0}),Sct(p)||kct(p,h[n],{that:h,AS_ENTRIES:t})}),o=i.prototype,a=Ect(e),u=function(h,p,_){var T=a(h),O=tM(wct(p),!0);return O===!0?rM(T).set(p,_):O[T.id]=_,h};return dhe(o,{delete:function(h){var p=a(this);if(!sj(h))return!1;var _=tM(h);return _===!0?rM(p).delete(h):_&&phe(_,p.id)&&delete _[p.id]},has:function(p){var _=a(this);if(!sj(p))return!1;var T=tM(p);return T===!0?rM(_).has(p):T&&phe(T,_.id)}}),dhe(o,t?{get:function(p){var _=a(this);if(sj(p)){var T=tM(p);return T===!0?rM(_).get(p):T?T[_.id]:void 0}},set:function(p,_){return u(this,p,_)}}:{add:function(p){return u(this,p,!0)}}),i}}});var Ehe=de(()=>{"use strict";var Ict=L0(),bhe=Wn(),aM=fn(),xhe=i1(),Mct=Ky(),Pct=kT(),_he=uj(),nM=Wo(),iM=cc().enforce,Lct=on(),Rct=W3(),nE=Object,Fct=Array.isArray,oM=nE.isExtensible,whe=nE.isFrozen,Nct=nE.isSealed,She=nE.freeze,qct=nE.seal,Bct=!bhe.ActiveXObject&&"ActiveXObject"in bhe,tE,khe=function(r){return function(){return r(this,arguments.length?arguments[0]:void 0)}},The=Pct("WeakMap",khe,_he),I1=The.prototype,sM=aM(I1.set),zct=function(){return Ict&&Lct(function(){var r=She([]);return sM(new The,r,1),!whe(r)})};Rct&&(Bct?(tE=_he.getConstructor(khe,"WeakMap",!0),Mct.enable(),cj=aM(I1.delete),rE=aM(I1.has),fj=aM(I1.get),xhe(I1,{delete:function(r){if(nM(r)&&!oM(r)){var e=iM(this);return e.frozen||(e.frozen=new tE),cj(this,r)||e.frozen.delete(r)}return cj(this,r)},has:function(e){if(nM(e)&&!oM(e)){var t=iM(this);return t.frozen||(t.frozen=new tE),rE(this,e)||t.frozen.has(e)}return rE(this,e)},get:function(e){if(nM(e)&&!oM(e)){var t=iM(this);return t.frozen||(t.frozen=new tE),rE(this,e)?fj(this,e):t.frozen.get(e)}return fj(this,e)},set:function(e,t){if(nM(e)&&!oM(e)){var n=iM(this);n.frozen||(n.frozen=new tE),rE(this,e)?sM(this,e,t):n.frozen.set(e,t)}else sM(this,e,t);return this}})):zct()&&xhe(I1,{set:function(e,t){var n;return Fct(e)&&(whe(e)?n=She:Nct(e)&&(n=qct)),sM(this,e,t),n&&n(e),this}}));var cj,rE,fj});var Che=de(()=>{"use strict";Ehe()});var Ahe=de(()=>{"use strict";var jct=kT(),Uct=uj();jct("WeakSet",function(r){return function(){return r(this,arguments.length?arguments[0]:void 0)}},Uct)});var Dhe=de(()=>{"use strict";Ahe()});var hj=de((N9t,Lhe)=>{"use strict";var Phe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",Ohe=Phe+"+/",Ihe=Phe+"-_",Mhe=function(r){for(var e={},t=0;t<64;t++)e[r.charAt(t)]=t;return e};Lhe.exports={i2c:Ohe,c2i:Mhe(Ohe),i2cUrl:Ihe,c2iUrl:Mhe(Ihe)}});var jhe=de(()=>{"use strict";var Hct=Ut(),Wct=Wn(),Nhe=Gs(),dj=fn(),Vct=yo(),lM=on(),$ct=oo(),Kct=Mp(),Rhe=hj().c2i,qhe=/[^\d+/a-z]/i,Gct=/[\t\n\f\r ]+/g,Yct=/[=]{1,2}$/,j0=Nhe("atob"),Zct=String.fromCharCode,Xct=dj("".charAt),Fhe=dj("".replace),Jct=dj(qhe.exec),M1=!!j0&&!lM(function(){return j0("aGk=")!=="hi"}),Bhe=M1&&lM(function(){return j0(" ")!==""}),zhe=M1&&!lM(function(){j0("a")}),Qct=M1&&!lM(function(){j0()}),eft=M1&&j0.length!==1,tft=!M1||Bhe||zhe||Qct||eft;Hct({global:!0,bind:!0,enumerable:!0,forced:tft},{atob:function(e){if(Kct(arguments.length,1),M1&&!Bhe&&!zhe)return Vct(j0,Wct,e);var t=Fhe($ct(e),Gct,""),n="",i=0,o=0,a,u,h;if(t.length%4===0&&(t=Fhe(t,Yct,"")),a=t.length,a%4===1||Jct(qhe,t))throw new(Nhe("DOMException"))("The string is not correctly encoded","InvalidCharacterError");for(;i>(-2*o&6)));return n}})});var $he=de(()=>{"use strict";var rft=Ut(),nft=Wn(),Whe=Gs(),Vhe=fn(),ift=yo(),pj=on(),Uhe=oo(),oft=Mp(),aft=hj().i2c,P1=Whe("btoa"),Hhe=Vhe("".charAt),sft=Vhe("".charCodeAt),iE=!!P1&&!pj(function(){return P1("hi")!=="aGk="}),lft=iE&&!pj(function(){P1()}),uft=iE&&pj(function(){return P1(null)!=="bnVsbA=="}),cft=iE&&P1.length!==1;rft({global:!0,bind:!0,enumerable:!0,forced:!iE||lft||uft||cft},{btoa:function(e){if(oft(arguments.length,1),iE)return ift(P1,nft,Uhe(e));for(var t=Uhe(e),n="",i=0,o=aft,a,u;Hhe(t,i)||(o="=",i%1);){if(u=sft(t,i+=3/4),u>255)throw new(Whe("DOMException"))("The string contains characters outside of the Latin1 range","InvalidCharacterError");a=a<<8|u,n+=Hhe(o,63&a>>8-i%1*8)}return n}})});var mj=de((U9t,Khe)=>{"use strict";Khe.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}});var vj=de((H9t,Yhe)=>{"use strict";var fft=Jk(),gj=fft("span").classList,Ghe=gj&&gj.constructor&&gj.constructor.prototype;Yhe.exports=Ghe===Object.prototype?void 0:Ghe});var Qhe=de(()=>{"use strict";var Zhe=Wn(),Xhe=mj(),hft=vj(),yj=VB(),dft=Hf(),Jhe=function(r){if(r&&r.forEach!==yj)try{dft(r,"forEach",yj)}catch{r.forEach=yj}};for(uM in Xhe)Xhe[uM]&&Jhe(Zhe[uM]&&Zhe[uM].prototype);var uM;Jhe(hft)});var ide=de(()=>{"use strict";var ede=Wn(),rde=mj(),pft=vj(),oE=gT(),tde=Hf(),mft=yh(),gft=Jo(),bj=gft("iterator"),xj=oE.values,nde=function(r,e){if(r){if(r[bj]!==xj)try{tde(r,bj,xj)}catch{r[bj]=xj}if(mft(r,e,!0),rde[e]){for(var t in oE)if(r[t]!==oE[t])try{tde(r,t,oE[t])}catch{r[t]=oE[t]}}}};for(cM in rde)nde(ede[cM]&&ede[cM].prototype,cM);var cM;nde(pft,"DOMTokenList")});var _j=de((G9t,ode)=>{"use strict";var vft=Sv();ode.exports=function(r){try{if(vft)return Function('return require("'+r+'")')()}catch{}}});var wj=de((Y9t,ade)=>{"use strict";ade.exports={IndexSizeError:{s:"INDEX_SIZE_ERR",c:1,m:1},DOMStringSizeError:{s:"DOMSTRING_SIZE_ERR",c:2,m:0},HierarchyRequestError:{s:"HIERARCHY_REQUEST_ERR",c:3,m:1},WrongDocumentError:{s:"WRONG_DOCUMENT_ERR",c:4,m:1},InvalidCharacterError:{s:"INVALID_CHARACTER_ERR",c:5,m:1},NoDataAllowedError:{s:"NO_DATA_ALLOWED_ERR",c:6,m:0},NoModificationAllowedError:{s:"NO_MODIFICATION_ALLOWED_ERR",c:7,m:1},NotFoundError:{s:"NOT_FOUND_ERR",c:8,m:1},NotSupportedError:{s:"NOT_SUPPORTED_ERR",c:9,m:1},InUseAttributeError:{s:"INUSE_ATTRIBUTE_ERR",c:10,m:1},InvalidStateError:{s:"INVALID_STATE_ERR",c:11,m:1},SyntaxError:{s:"SYNTAX_ERR",c:12,m:1},InvalidModificationError:{s:"INVALID_MODIFICATION_ERR",c:13,m:1},NamespaceError:{s:"NAMESPACE_ERR",c:14,m:1},InvalidAccessError:{s:"INVALID_ACCESS_ERR",c:15,m:1},ValidationError:{s:"VALIDATION_ERR",c:16,m:0},TypeMismatchError:{s:"TYPE_MISMATCH_ERR",c:17,m:1},SecurityError:{s:"SECURITY_ERR",c:18,m:1},NetworkError:{s:"NETWORK_ERR",c:19,m:1},AbortError:{s:"ABORT_ERR",c:20,m:1},URLMismatchError:{s:"URL_MISMATCH_ERR",c:21,m:1},QuotaExceededError:{s:"QUOTA_EXCEEDED_ERR",c:22,m:1},TimeoutError:{s:"TIMEOUT_ERR",c:23,m:1},InvalidNodeTypeError:{s:"INVALID_NODE_TYPE_ERR",c:24,m:1},DataCloneError:{s:"DATA_CLONE_ERR",c:25,m:1}}});var vde=de(()=>{"use strict";var yft=Ut(),bft=_j(),dM=Gs(),Aj=on(),xft=Xh(),Dj=Hd(),pM=vl().f,_ft=nl(),fM=Jc(),hM=ba(),wft=Tm(),Sft=Eo(),ude=IB(),sde=J_(),L1=wj(),kft=M2(),cde=cc(),Oj=Li(),fde=jl(),R1="DOMException",Cj="DATA_CLONE_ERR",gM=dM("Error"),Ov=dM(R1)||function(){try{var r=dM("MessageChannel")||bft("worker_threads").MessageChannel;new r().port1.postMessage(new WeakMap)}catch(e){if(e.name===Cj&&e.code===25)return e.constructor}}(),Tft=Ov&&Ov.prototype,hde=gM.prototype,Eft=cde.set,Cft=cde.getterFor(R1),Aft="stack"in new gM(R1),dde=function(r){return hM(L1,r)&&L1[r].m?L1[r].c:0},Ij=function(){wft(this,sE);var e=arguments.length,t=sde(e<1?void 0:arguments[0]),n=sde(e<2?void 0:arguments[1],"Error"),i=dde(n);if(Eft(this,{type:R1,name:n,message:t,code:i}),Oj||(this.name=n,this.message=t,this.code=i),Aft){var o=new gM(t);o.name=R1,pM(this,"stack",Dj(1,kft(o.stack,1)))}},sE=Ij.prototype=xft(hde),pde=function(r){return{enumerable:!0,configurable:!0,get:r}},Sj=function(r){return pde(function(){return Cft(this)[r]})};Oj&&(fM(sE,"code",Sj("code")),fM(sE,"message",Sj("message")),fM(sE,"name",Sj("name")));pM(sE,"constructor",Dj(1,Ij));var vM=Aj(function(){return!(new Ov instanceof gM)}),mde=vM||Aj(function(){return hde.toString!==ude||String(new Ov(1,2))!=="2: 1"}),gde=vM||Aj(function(){return new Ov(1,"DataCloneError").code!==25}),Dft=vM||Ov[Cj]!==25||Tft[Cj]!==25,lde=fde?mde||gde||Dft:vM;yft({global:!0,constructor:!0,forced:lde},{DOMException:lde?Ij:Ov});var lE=dM(R1),mM=lE.prototype;mde&&(fde||Ov===lE)&&_ft(mM,"toString",ude);gde&&Oj&&Ov===lE&&fM(mM,"code",pde(function(){return dde(Sft(this).name)}));for(kj in L1)hM(L1,kj)&&(Tj=L1[kj],aE=Tj.s,Ej=Dj(6,Tj.c),hM(lE,aE)||pM(lE,aE,Ej),hM(mM,aE)||pM(mM,aE,Ej));var Tj,aE,Ej,kj});var kde=de(()=>{"use strict";var Oft=Ut(),Ift=Wn(),Bj=Gs(),Nj=Hd(),qj=vl().f,yde=ba(),Mft=Tm(),Pft=zy(),bde=J_(),Mj=wj(),Lft=M2(),Rft=Li(),wde=jl(),cE="DOMException",Sde=Bj("Error"),fE=Bj(cE),zj=function(){Mft(this,Fft);var e=arguments.length,t=bde(e<1?void 0:arguments[0]),n=bde(e<2?void 0:arguments[1],"Error"),i=new fE(t,n),o=new Sde(t);return o.name=cE,qj(i,"stack",Nj(1,Lft(o.stack,1))),Pft(i,this,zj),i},Fft=zj.prototype=fE.prototype,Nft="stack"in new Sde(cE),qft="stack"in new fE(1,2),Pj=fE&&Rft&&Object.getOwnPropertyDescriptor(Ift,cE),Bft=!!Pj&&!(Pj.writable&&Pj.configurable),xde=Nft&&!Bft&&!qft;Oft({global:!0,constructor:!0,forced:wde||xde},{DOMException:xde?zj:fE});var uE=Bj(cE),_de=uE.prototype;if(_de.constructor!==uE){wde||qj(_de,"constructor",Nj(1,uE));for(Lj in Mj)yde(Mj,Lj)&&(Rj=Mj[Lj],Fj=Rj.s,yde(uE,Fj)||qj(uE,Fj,Nj(6,Rj.c)))}var Rj,Fj,Lj});var Ede=de(()=>{"use strict";var zft=Gs(),jft=yh(),Tde="DOMException";jft(zft(Tde),Tde)});var Ade=de(()=>{"use strict";var Uft=Ut(),Hft=Wn(),Cde=NT().clear;Uft({global:!0,bind:!0,enumerable:!0,forced:Hft.clearImmediate!==Cde},{clearImmediate:Cde})});var Ode=de((i8t,Dde)=>{"use strict";Dde.exports=typeof Bun=="function"&&Bun&&typeof Bun.version=="string"});var yM=de((o8t,Mde)=>{"use strict";var Ide=Wn(),Wft=Ip(),Vft=sa(),$ft=Ode(),Kft=ag(),Gft=Ap(),Yft=Mp(),Zft=Ide.Function,Xft=/MSIE .\./.test(Kft)||$ft&&function(){var r=Ide.Bun.version.split(".");return r.length<3||r[0]==="0"&&(r[1]<3||r[1]==="3"&&r[2]==="0")}();Mde.exports=function(r,e){var t=e?2:1;return Xft?function(n,i){var o=Yft(arguments.length,1)>t,a=Vft(n)?n:Zft(n),u=o?Gft(arguments,t):[],h=o?function(){Wft(a,this,u)}:a;return e?r(h,i):r(h)}:r}});var Fde=de(()=>{"use strict";var Jft=Ut(),Rde=Wn(),Pde=NT().set,Qft=yM(),Lde=Rde.setImmediate?Qft(Pde,!1):Pde;Jft({global:!0,bind:!0,enumerable:!0,forced:Rde.setImmediate!==Lde},{setImmediate:Lde})});var Nde=de(()=>{"use strict";Ade();Fde()});var qde=de(()=>{"use strict";var eht=Ut(),tht=M5(),rht=gl(),nht=Mp();eht({global:!0,enumerable:!0,dontCallGetSet:!0},{queueMicrotask:function(e){nht(arguments.length,1),tht(rht(e))}})});var zde=de(()=>{"use strict";var iht=Ut(),Xy=Wn(),oht=Jc(),aht=Li(),sht=TypeError,lht=Object.defineProperty,Bde=Xy.self!==Xy;try{aht?(bM=Object.getOwnPropertyDescriptor(Xy,"self"),(Bde||!bM||!bM.get||!bM.enumerable)&&oht(Xy,"self",{get:function(){return Xy},set:function(e){if(this!==Xy)throw new sht("Illegal invocation");lht(Xy,"self",{value:e,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})):iht({global:!0,simple:!0,forced:Bde},{self:Xy})}catch{}var bM});var Uj=de((p8t,jde)=>{"use strict";var jj=fn(),xM=Set.prototype;jde.exports={Set,add:jj(xM.add),has:jj(xM.has),remove:jj(xM.delete),proto:xM}});var Hde=de((m8t,Ude)=>{"use strict";var uht=yo();Ude.exports=function(r,e,t){for(var n=t?r:r.iterator,i=r.next,o,a;!(o=uht(i,n)).done;)if(a=e(o.value),a!==void 0)return a}});var Yde=de((g8t,Gde)=>{"use strict";var Wde=fn(),cht=Hde(),Vde=Uj(),fht=Vde.Set,$de=Vde.proto,hht=Wde($de.forEach),Kde=Wde($de.keys),dht=Kde(new fht).next;Gde.exports=function(r,e,t){return t?cht({iterator:Kde(r),next:dht},e):hht(r,e)}});var Wj=de((v8t,Xde)=>{"use strict";var pht=Wn(),mht=on(),Hj=sg(),ght=P5(),vht=wI(),yht=Sv(),Zde=pht.structuredClone;Xde.exports=!!Zde&&!mht(function(){if(vht&&Hj>92||yht&&Hj>94||ght&&Hj>97)return!1;var r=new ArrayBuffer(8),e=Zde(r,{transfer:[r]});return r.byteLength!==0||e.byteLength!==8})});var tpe=de((y8t,epe)=>{"use strict";var Gj=Wn(),bht=_j(),xht=Wj(),_ht=Gj.structuredClone,Jde=Gj.ArrayBuffer,_M=Gj.MessageChannel,Kj=!1,Vj,Qde,wM,$j;if(xht)Kj=function(r){_ht(r,{transfer:[r]})};else if(Jde)try{_M||(Vj=bht("worker_threads"),Vj&&(_M=Vj.MessageChannel)),_M&&(Qde=new _M,wM=new Jde(2),$j=function(r){Qde.port1.postMessage(null,[r])},wM.byteLength===2&&($j(wM),wM.byteLength===0&&(Kj=$j)))}catch{}epe.exports=Kj});var hpe=de(()=>{"use strict";var wht=jl(),Sht=Ut(),yf=Wn(),dE=Gs(),mE=fn(),e6=on(),kht=_0(),N1=sa(),Tht=k0(),Eht=gh(),CM=Wo(),Cht=Ly(),Aht=Vd(),ipe=Eo(),TM=Sm(),Dht=ba(),Oht=_v(),Yj=Hf(),SM=us(),Iht=Mp(),Mht=w1(),AM=Hz(),t6=Uj(),Pht=Yde(),rpe=tpe(),Lht=EB(),r6=Wj(),hE=yf.Object,Rht=yf.Array,ope=yf.Date,ape=yf.Error,Fht=yf.TypeError,Nht=yf.PerformanceMark,U0=dE("DOMException"),Jj=AM.Map,n6=AM.has,spe=AM.get,EM=AM.set,lpe=t6.Set,upe=t6.add,qht=t6.has,Bht=dE("Object","keys"),zht=mE([].push),jht=mE((!0).valueOf),Uht=mE(1 .valueOf),Hht=mE("".valueOf),Wht=mE(ope.prototype.getTime),Qj=kht("structuredClone"),pE="DataCloneError",kM="Transferring",cpe=function(r){return!e6(function(){var e=new yf.Set([7]),t=r(e),n=r(hE(7));return t===e||!t.has(7)||!CM(n)||+n!=7})&&r},npe=function(r,e){return!e6(function(){var t=new e,n=r({a:t,b:t});return!(n&&n.a===n.b&&n.a instanceof e&&n.a.stack===t.stack)})},Vht=function(r){return!e6(function(){var e=r(new yf.AggregateError([1],Qj,{cause:3}));return e.name!=="AggregateError"||e.errors[0]!==1||e.message!==Qj||e.cause!==3})},F1=yf.structuredClone,$ht=wht||!npe(F1,ape)||!npe(F1,U0)||!Vht(F1),Kht=!F1&&cpe(function(r){return new Nht(Qj,{detail:r}).detail}),Iv=cpe(F1)||Kht,Zj=function(r){throw new U0("Uncloneable type: "+r,pE)},rd=function(r,e){throw new U0((e||"Cloning")+" of "+r+" cannot be properly polyfilled in this engine",pE)},Xj=function(r,e){return Iv||rd(e),Iv(r)},Ght=function(){var r;try{r=new yf.DataTransfer}catch{try{r=new yf.ClipboardEvent("").clipboardData}catch{}}return r&&r.items&&r.files?r:null},fpe=function(r,e,t){if(n6(e,r))return spe(e,r);var n=t||TM(r),i,o,a,u,h,p;if(n==="SharedArrayBuffer")Iv?i=Iv(r):i=r;else{var _=yf.DataView;!_&&!N1(r.slice)&&rd("ArrayBuffer");try{if(N1(r.slice)&&!r.resizable)i=r.slice(0);else for(o=r.byteLength,a=("maxByteLength"in r)?{maxByteLength:r.maxByteLength}:void 0,i=new ArrayBuffer(o,a),u=new _(r),h=new _(i),p=0;p1&&!Eht(arguments[1])?ipe(arguments[1]):void 0,n=t?t.transfer:void 0,i,o;n!==void 0&&(i=new Jj,o=Zht(n,i));var a=vf(e,i);return o&&Xht(o),a}})});var mpe=de(()=>{"use strict";var Jht=Ut(),ppe=Wn(),Qht=yM(),dpe=Qht(ppe.setInterval,!0);Jht({global:!0,bind:!0,forced:ppe.setInterval!==dpe},{setInterval:dpe})});var ype=de(()=>{"use strict";var edt=Ut(),vpe=Wn(),tdt=yM(),gpe=tdt(vpe.setTimeout,!0);edt({global:!0,bind:!0,forced:vpe.setTimeout!==gpe},{setTimeout:gpe})});var bpe=de(()=>{"use strict";mpe();ype()});var DM=de((C8t,_pe)=>{"use strict";var rdt=on(),ndt=Jo(),idt=Li(),xpe=jl(),odt=ndt("iterator");_pe.exports=!rdt(function(){var r=new URL("b?a=1&b=2&c=3","http://a"),e=r.searchParams,t=new URLSearchParams("a=1&a=2&b=3"),n="";return r.pathname="c%20d",e.forEach(function(i,o){e.delete("b"),n+=o+i}),t.delete("a",2),t.delete("b",void 0),xpe&&(!r.toJSON||!t.has("a",1)||t.has("a",2)||!t.has("a",void 0)||t.has("b"))||!e.size&&(xpe||!idt)||!e.sort||r.href!=="http://a/c%20d?a=1&c=3"||e.get("c")!=="3"||String(new URLSearchParams("?a=1"))!=="a=1"||!e[odt]||new URL("https://a@b").username!=="a"||new URLSearchParams(new URLSearchParams("a=b")).get("a")!=="b"||new URL("http://\u0442\u0435\u0441\u0442").host!=="xn--e1aybc"||new URL("http://a#\u0431").hash!=="#%D0%B1"||n!=="a1c3"||new URL("http://x",void 0).host!=="x"})});var Ope=de((A8t,Dpe)=>{"use strict";var H0=fn(),i6=2147483647,gE=36,Epe=1,s6=26,adt=38,sdt=700,ldt=72,udt=128,cdt="-",fdt=/[^\0-\u007E]/,Cpe=/[.\u3002\uFF0E\uFF61]/g,wpe="Overflow: input needs wider integers to process",o6=gE-Epe,Spe=RangeError,hdt=H0(Cpe.exec),q1=Math.floor,a6=String.fromCharCode,kpe=H0("".charCodeAt),Ape=H0([].join),Jy=H0([].push),ddt=H0("".replace),pdt=H0("".split),mdt=H0("".toLowerCase),gdt=function(r){for(var e=[],t=0,n=r.length;t=55296&&i<=56319&&t>1,r+=q1(r/e);r>o6*s6>>1;)r=q1(r/o6),n+=gE;return q1(n+(o6+1)*r/(r+adt))},ydt=function(r){var e=[];r=gdt(r);var t=r.length,n=udt,i=0,o=ldt,a,u;for(a=0;a=n&&u<_&&(_=u);var T=p+1;if(_-n>q1((i6-i)/T))throw new Spe(wpe);for(i+=(_-n)*T,n=_,a=0;ai6)throw new Spe(wpe);if(u===n){for(var O=i,L=gE;;){var q=L<=o?Epe:L>=o+s6?s6:L-o;if(O{"use strict";gT();var h6=Ut(),LM=Wn(),p6=T5(),OM=yo(),vg=fn(),vE=Li(),Hpe=DM(),Wpe=nl(),bdt=Jc(),xdt=i1(),_dt=yh(),wdt=j2(),m6=cc(),Vpe=Tm(),l6=sa(),Sdt=ba(),kdt=Dp(),Tdt=Sm(),Edt=Eo(),$pe=Wo(),_h=oo(),Cdt=Xh(),Ipe=Hd(),Mpe=cT(),Adt=e1(),IM=n1(),B1=Mp(),Ddt=Jo(),Odt=K2(),Idt=Ddt("iterator"),j1="URLSearchParams",Kpe=j1+"Iterator",Gpe=m6.set,Pp=m6.getterFor(j1),Mdt=m6.getterFor(Kpe),Ppe=p6("fetch"),PM=p6("Request"),yE=p6("Headers"),u6=PM&&PM.prototype,Lpe=yE&&yE.prototype,Pdt=LM.RegExp,Ldt=LM.TypeError,Ype=LM.decodeURIComponent,Rdt=LM.encodeURIComponent,Fdt=vg("".charAt),Rpe=vg([].join),W0=vg([].push),d6=vg("".replace),Ndt=vg([].shift),Fpe=vg([].splice),Npe=vg("".split),qdt=vg("".slice),Bdt=/\+/g,qpe=Array(4),zdt=function(r){return qpe[r-1]||(qpe[r-1]=Pdt("((?:%[\\da-f]{2}){"+r+"})","gi"))},jdt=function(r){try{return Ype(r)}catch{return r}},Bpe=function(r){var e=d6(r,Bdt," "),t=4;try{return Ype(e)}catch{for(;t;)e=d6(e,zdt(t--),jdt);return e}},Udt=/[!'()~]|%20/g,Hdt={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},Wdt=function(r){return Hdt[r]},zpe=function(r){return d6(Rdt(r),Udt,Wdt)},c6=wdt(function(e,t){Gpe(this,{type:Kpe,target:Pp(e).entries,index:0,kind:t})},j1,function(){var e=Mdt(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=void 0,IM(void 0,!0);var i=t[n];switch(e.kind){case"keys":return IM(i.key,!1);case"values":return IM(i.value,!1)}return IM([i.key,i.value],!1)},!0),Zpe=function(r){this.entries=[],this.url=null,r!==void 0&&($pe(r)?this.parseObject(r):this.parseQuery(typeof r=="string"?Fdt(r,0)==="?"?qdt(r,1):r:_h(r)))};Zpe.prototype={type:j1,bindURL:function(r){this.url=r,this.update()},parseObject:function(r){var e=this.entries,t=Adt(r),n,i,o,a,u,h,p;if(t)for(n=Mpe(r,t),i=n.next;!(o=OM(i,n)).done;){if(a=Mpe(Edt(o.value)),u=a.next,(h=OM(u,a)).done||(p=OM(u,a)).done||!OM(u,a).done)throw new Ldt("Expected sequence with length 2");W0(e,{key:_h(h.value),value:_h(p.value)})}else for(var _ in r)Sdt(r,_)&&W0(e,{key:_,value:_h(r[_])})},parseQuery:function(r){if(r)for(var e=this.entries,t=Npe(r,"&"),n=0,i,o;n0?arguments[0]:void 0,t=Gpe(this,new Zpe(e));vE||(this.size=t.entries.length)},z1=RM.prototype;xdt(z1,{append:function(e,t){var n=Pp(this);B1(arguments.length,2),W0(n.entries,{key:_h(e),value:_h(t)}),vE||this.length++,n.updateURL()},delete:function(r){for(var e=Pp(this),t=B1(arguments.length,1),n=e.entries,i=_h(r),o=t<2?void 0:arguments[1],a=o===void 0?o:_h(o),u=0;un.key?1:-1}),e.updateURL()},forEach:function(e){for(var t=Pp(this).entries,n=kdt(e,arguments.length>1?arguments[1]:void 0),i=0,o;i1?f6(arguments[1]):{})}}),l6(PM)&&(MM=function(e){return Vpe(this,u6),new PM(e,arguments.length>1?f6(arguments[1]):{})},u6.constructor=MM,MM.prototype=u6,h6({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:MM})));var jpe,Upe,f6,MM;Xpe.exports={URLSearchParams:RM,getState:Pp}});var mme=de(()=>{"use strict";d4();var Vdt=Ut(),P6=Li(),$dt=DM(),L6=Wn(),Jpe=Dp(),qp=fn(),zM=nl(),Lp=Jc(),Kdt=Tm(),O6=ba(),R6=l5(),U1=$B(),Am=Ap(),Gdt=VT().codeAt,Ydt=Ope(),Pv=oo(),Zdt=yh(),Xdt=Mp(),ume=g6(),cme=cc(),Jdt=cme.set,jM=cme.getterFor("URL"),Qdt=ume.URLSearchParams,ept=ume.getState,bE=L6.URL,I6=L6.TypeError,UM=L6.parseInt,tpt=Math.floor,Qpe=Math.pow,Np=qp("".charAt),Dm=qp(/./.exec),_E=qp([].join),rpt=qp(1 .toString),npt=qp([].pop),W1=qp([].push),v6=qp("".replace),ipt=qp([].shift),opt=qp("".split),SE=qp("".slice),HM=qp("".toLowerCase),apt=qp([].unshift),spt="Invalid authority",y6="Invalid scheme",V0="Invalid host",eme="Invalid port",fme=/[a-z]/i,lpt=/[\d+-.a-z]/i,M6=/\d/,upt=/^0x/i,cpt=/^[0-7]+$/,fpt=/^\d+$/,hme=/^[\da-f]+$/i,hpt=/[\0\t\n\r #%/:<>?@[\\\]^|]/,dpt=/[\0\t\n\r #/:<>?@[\\\]^|]/,ppt=/^[\u0000-\u0020]+/,mpt=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,gpt=/[\t\n\r]/g,Rp,vpt=function(r){var e=opt(r,"."),t,n,i,o,a,u,h;if(e.length&&e[e.length-1]===""&&e.length--,t=e.length,t>4)return r;for(n=[],i=0;i1&&Np(o,0)==="0"&&(a=Dm(upt,o)?16:8,o=SE(o,a===8?1:2)),o==="")u=0;else{if(!Dm(a===10?fpt:a===8?cpt:hme,o))return r;u=UM(o,a)}W1(n,u)}for(i=0;i=Qpe(256,5-t))return null}else if(u>255)return null;for(h=npt(n),i=0;i6))return;for(u=0;O();){if(h=null,u>0)if(O()==="."&&u<4)i++;else return;if(!Dm(M6,O()))return;for(;Dm(M6,O());){if(p=UM(O(),10),h===null)h=p;else{if(h===0)return;h=h*10+p}if(h>255)return;i++}e[t]=e[t]*256+h,u++,(u===2||u===4)&&t++}if(u!==4)return;break}else if(O()===":"){if(i++,!O())return}else if(O())return;e[t++]=o}if(n!==null)for(_=t-n,t=7;t!==0&&_>0;)T=e[t],e[t--]=e[n+_-1],e[n+--_]=T;else if(t!==8)return;return e},bpt=function(r){for(var e=null,t=1,n=null,i=0,o=0;o<8;o++)r[o]!==0?(i>t&&(e=n,t=i),n=null,i=0):(n===null&&(n=o),++i);return i>t&&(e=n,t=i),e},xE=function(r){var e,t,n,i;if(typeof r=="number"){for(e=[],t=0;t<4;t++)apt(e,r%256),r=tpt(r/256);return _E(e,".")}else if(typeof r=="object"){for(e="",n=bpt(r),t=0;t<8;t++)i&&r[t]===0||(i&&(i=!1),n===t?(e+=t?":":"::",i=!0):(e+=rpt(r[t],16),t<7&&(e+=":")));return"["+e+"]"}return r},BM={},dme=R6({},BM,{" ":1,'"':1,"<":1,">":1,"`":1}),pme=R6({},dme,{"#":1,"?":1,"{":1,"}":1}),b6=R6({},pme,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Qy=function(r,e){var t=Gdt(r,0);return t>32&&t<127&&!O6(e,r)?r:encodeURIComponent(r)},FM={ftp:21,file:null,http:80,https:443,ws:80,wss:443},wE=function(r,e){var t;return r.length===2&&Dm(fme,Np(r,0))&&((t=Np(r,1))===":"||!e&&t==="|")},tme=function(r){var e;return r.length>1&&wE(SE(r,0,2))&&(r.length===2||(e=Np(r,2))==="/"||e==="\\"||e==="?"||e==="#")},xpt=function(r){return r==="."||HM(r)==="%2e"},_pt=function(r){return r=HM(r),r===".."||r==="%2e."||r===".%2e"||r==="%2e%2e"},x6={},rme={},_6={},nme={},ime={},w6={},ome={},ame={},NM={},qM={},S6={},k6={},T6={},E6={},sme={},C6={},H1={},yg={},lme={},$0={},Mv={},F6=function(r,e,t){var n=Pv(r),i,o,a;if(e){if(o=this.parse(n),o)throw new I6(o);this.searchParams=null}else{if(t!==void 0&&(i=new F6(t,!0)),o=this.parse(n,null,i),o)throw new I6(o);a=ept(new Qdt),a.bindURL(this),this.searchParams=a}};F6.prototype={type:"URL",parse:function(r,e,t){var n=this,i=e||x6,o=0,a="",u=!1,h=!1,p=!1,_,T,O,L;for(r=Pv(r),e||(n.scheme="",n.username="",n.password="",n.host=null,n.port=null,n.path=[],n.query=null,n.fragment=null,n.cannotBeABaseURL=!1,r=v6(r,ppt,""),r=v6(r,mpt,"$1")),r=v6(r,gpt,""),_=U1(r);o<=_.length;){switch(T=_[o],i){case x6:if(T&&Dm(fme,T))a+=HM(T),i=rme;else{if(e)return y6;i=_6;continue}break;case rme:if(T&&(Dm(lpt,T)||T==="+"||T==="-"||T==="."))a+=HM(T);else if(T===":"){if(e&&(n.isSpecial()!==O6(FM,a)||a==="file"&&(n.includesCredentials()||n.port!==null)||n.scheme==="file"&&!n.host))return;if(n.scheme=a,e){n.isSpecial()&&FM[n.scheme]===n.port&&(n.port=null);return}a="",n.scheme==="file"?i=E6:n.isSpecial()&&t&&t.scheme===n.scheme?i=nme:n.isSpecial()?i=ame:_[o+1]==="/"?(i=ime,o++):(n.cannotBeABaseURL=!0,W1(n.path,""),i=lme)}else{if(e)return y6;a="",i=_6,o=0;continue}break;case _6:if(!t||t.cannotBeABaseURL&&T!=="#")return y6;if(t.cannotBeABaseURL&&T==="#"){n.scheme=t.scheme,n.path=Am(t.path),n.query=t.query,n.fragment="",n.cannotBeABaseURL=!0,i=Mv;break}i=t.scheme==="file"?E6:w6;continue;case nme:if(T==="/"&&_[o+1]==="/")i=NM,o++;else{i=w6;continue}break;case ime:if(T==="/"){i=qM;break}else{i=yg;continue}case w6:if(n.scheme=t.scheme,T===Rp)n.username=t.username,n.password=t.password,n.host=t.host,n.port=t.port,n.path=Am(t.path),n.query=t.query;else if(T==="/"||T==="\\"&&n.isSpecial())i=ome;else if(T==="?")n.username=t.username,n.password=t.password,n.host=t.host,n.port=t.port,n.path=Am(t.path),n.query="",i=$0;else if(T==="#")n.username=t.username,n.password=t.password,n.host=t.host,n.port=t.port,n.path=Am(t.path),n.query=t.query,n.fragment="",i=Mv;else{n.username=t.username,n.password=t.password,n.host=t.host,n.port=t.port,n.path=Am(t.path),n.path.length--,i=yg;continue}break;case ome:if(n.isSpecial()&&(T==="/"||T==="\\"))i=NM;else if(T==="/")i=qM;else{n.username=t.username,n.password=t.password,n.host=t.host,n.port=t.port,i=yg;continue}break;case ame:if(i=NM,T!=="/"||Np(a,o+1)!=="/")continue;o++;break;case NM:if(T!=="/"&&T!=="\\"){i=qM;continue}break;case qM:if(T==="@"){u&&(a="%40"+a),u=!0,O=U1(a);for(var q=0;q65535)return eme;n.port=n.isSpecial()&&te===FM[n.scheme]?null:te,a=""}if(e)return;i=H1;continue}else return eme;break;case E6:if(n.scheme="file",T==="/"||T==="\\")i=sme;else if(t&&t.scheme==="file")switch(T){case Rp:n.host=t.host,n.path=Am(t.path),n.query=t.query;break;case"?":n.host=t.host,n.path=Am(t.path),n.query="",i=$0;break;case"#":n.host=t.host,n.path=Am(t.path),n.query=t.query,n.fragment="",i=Mv;break;default:tme(_E(Am(_,o),""))||(n.host=t.host,n.path=Am(t.path),n.shortenPath()),i=yg;continue}else{i=yg;continue}break;case sme:if(T==="/"||T==="\\"){i=C6;break}t&&t.scheme==="file"&&!tme(_E(Am(_,o),""))&&(wE(t.path[0],!0)?W1(n.path,t.path[0]):n.host=t.host),i=yg;continue;case C6:if(T===Rp||T==="/"||T==="\\"||T==="?"||T==="#"){if(!e&&wE(a))i=yg;else if(a===""){if(n.host="",e)return;i=H1}else{if(L=n.parseHost(a),L)return L;if(n.host==="localhost"&&(n.host=""),e)return;a="",i=H1}continue}else a+=T;break;case H1:if(n.isSpecial()){if(i=yg,T!=="/"&&T!=="\\")continue}else if(!e&&T==="?")n.query="",i=$0;else if(!e&&T==="#")n.fragment="",i=Mv;else if(T!==Rp&&(i=yg,T!=="/"))continue;break;case yg:if(T===Rp||T==="/"||T==="\\"&&n.isSpecial()||!e&&(T==="?"||T==="#")){if(_pt(a)?(n.shortenPath(),T!=="/"&&!(T==="\\"&&n.isSpecial())&&W1(n.path,"")):xpt(a)?T!=="/"&&!(T==="\\"&&n.isSpecial())&&W1(n.path,""):(n.scheme==="file"&&!n.path.length&&wE(a)&&(n.host&&(n.host=""),a=Np(a,0)+":"),W1(n.path,a)),a="",n.scheme==="file"&&(T===Rp||T==="?"||T==="#"))for(;n.path.length>1&&n.path[0]==="";)ipt(n.path);T==="?"?(n.query="",i=$0):T==="#"&&(n.fragment="",i=Mv)}else a+=Qy(T,pme);break;case lme:T==="?"?(n.query="",i=$0):T==="#"?(n.fragment="",i=Mv):T!==Rp&&(n.path[0]+=Qy(T,BM));break;case $0:!e&&T==="#"?(n.fragment="",i=Mv):T!==Rp&&(T==="'"&&n.isSpecial()?n.query+="%27":T==="#"?n.query+="%23":n.query+=Qy(T,BM));break;case Mv:T!==Rp&&(n.fragment+=Qy(T,dme));break}o++}},parseHost:function(r){var e,t,n;if(Np(r,0)==="["){if(Np(r,r.length-1)!=="]"||(e=ypt(SE(r,1,-1)),!e))return V0;this.host=e}else if(this.isSpecial()){if(r=Ydt(r),Dm(hpt,r)||(e=vpt(r),e===null))return V0;this.host=e}else{if(Dm(dpt,r))return V0;for(e="",t=U1(r),n=0;n1?arguments[1]:void 0,i=Jdt(t,new F6(e,!1,n));P6||(t.href=i.serialize(),t.origin=i.getOrigin(),t.protocol=i.getProtocol(),t.username=i.getUsername(),t.password=i.getPassword(),t.host=i.getHost(),t.hostname=i.getHostname(),t.port=i.getPort(),t.pathname=i.getPathname(),t.search=i.getSearch(),t.searchParams=i.getSearchParams(),t.hash=i.getHash())},wh=V1.prototype,Fp=function(r,e){return{get:function(){return jM(this)[r]()},set:e&&function(t){return jM(this)[e](t)},configurable:!0,enumerable:!0}};P6&&(Lp(wh,"href",Fp("serialize","setHref")),Lp(wh,"origin",Fp("getOrigin")),Lp(wh,"protocol",Fp("getProtocol","setProtocol")),Lp(wh,"username",Fp("getUsername","setUsername")),Lp(wh,"password",Fp("getPassword","setPassword")),Lp(wh,"host",Fp("getHost","setHost")),Lp(wh,"hostname",Fp("getHostname","setHostname")),Lp(wh,"port",Fp("getPort","setPort")),Lp(wh,"pathname",Fp("getPathname","setPathname")),Lp(wh,"search",Fp("getSearch","setSearch")),Lp(wh,"searchParams",Fp("getSearchParams")),Lp(wh,"hash",Fp("getHash","setHash")));zM(wh,"toJSON",function(){return jM(this).serialize()},{enumerable:!0});zM(wh,"toString",function(){return jM(this).serialize()},{enumerable:!0});bE&&(A6=bE.createObjectURL,D6=bE.revokeObjectURL,A6&&zM(V1,"createObjectURL",Jpe(A6,bE)),D6&&zM(V1,"revokeObjectURL",Jpe(D6,bE)));var A6,D6;Zdt(V1,"URL");Vdt({global:!0,constructor:!0,forced:!$dt,sham:!P6},{URL:V1})});var gme=de(()=>{"use strict";mme()});var bme=de(()=>{"use strict";var wpt=Ut(),Spt=Gs(),kpt=on(),Tpt=Mp(),vme=oo(),Ept=DM(),yme=Spt("URL"),Cpt=Ept&&kpt(function(){yme.canParse()});wpt({target:"URL",stat:!0,forced:!Cpt},{canParse:function(e){var t=Tpt(arguments.length,1),n=vme(e),i=t<2||arguments[1]===void 0?void 0:vme(arguments[1]);try{return!!new yme(n,i)}catch{return!1}}})});var xme=de(()=>{"use strict";var Apt=Ut(),Dpt=yo();Apt({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return Dpt(URL.prototype.toString,this)}})});var _me=de(()=>{"use strict";g6()});var Tme=de(()=>{"use strict";var Opt=nl(),WM=fn(),wme=oo(),Ipt=Mp(),kme=URLSearchParams,VM=kme.prototype,Mpt=WM(VM.append),Sme=WM(VM.delete),Ppt=WM(VM.forEach),Lpt=WM([].push),N6=new kme("a=1&a=2&b=3");N6.delete("a",1);N6.delete("b",void 0);N6+""!="a=2"&&Opt(VM,"delete",function(r){var e=arguments.length,t=e<2?void 0:arguments[1];if(e&&t===void 0)return Sme(this,r);var n=[];Ppt(this,function(T,O){Lpt(n,{key:O,value:T})}),Ipt(e,1);for(var i=wme(r),o=wme(t),a=0,u=0,h=!1,p=n.length,_;a{"use strict";var Rpt=nl(),Cme=fn(),Fpt=oo(),Npt=Mp(),Ame=URLSearchParams,q6=Ame.prototype,qpt=Cme(q6.getAll),Bpt=Cme(q6.has),Eme=new Ame("a=1");(Eme.has("a",2)||!Eme.has("a",void 0))&&Rpt(q6,"has",function(e){var t=arguments.length,n=t<2?void 0:arguments[1];if(t&&n===void 0)return Bpt(this,e);var i=qpt(this,e);Npt(t,1);for(var o=Fpt(n),a=0;a{"use strict";var zpt=Li(),jpt=fn(),Upt=Jc(),B6=URLSearchParams.prototype,Hpt=jpt(B6.forEach);zpt&&!("size"in B6)&&Upt(B6,"size",{get:function(){var e=0;return Hpt(this,function(){e++}),e},configurable:!0,enumerable:!0})});var Mme=de(($8t,Ime)=>{"use strict";oX();hX();dX();pX();mX();gX();vX();yX();bX();xX();_X();wX();SX();kX();TX();JX();nJ();xJ();kJ();EJ();PJ();NJ();BJ();UJ();HJ();VJ();KJ();ZJ();XJ();eQ();tQ();iQ();pQ();mQ();vQ();yQ();gT();BQ();HQ();WQ();$Q();GQ();QQ();tee();nee();aee();see();See();Eee();Cee();Dee();Pee();Lee();Ree();Fee();Nee();Bee();gte();Ate();Nte();Bte();zte();Ute();Vte();$te();rre();nre();lre();hre();pre();xre();Sre();Cre();Are();xB();Dre();$re();Gre();Xre();ene();rne();nne();ine();sne();une();cne();hne();pne();gne();vne();yne();bne();wne();Tne();Ene();Cne();qne();Bne();Une();Wne();Vne();$ne();Kne();Gne();eie();lie();die();bie();wie();Cie();Aie();Iie();Pie();Rie();Fie();Uie();Hie();Wie();Kie();Gie();Yie();Xie();Jie();Qie();toe();noe();ooe();soe();uoe();coe();foe();hoe();voe();yoe();boe();woe();Soe();Toe();Coe();Bae();zae();Uae();$ae();Kae();Gae();tse();ise();ose();use();cse();fse();hse();dse();pse();mse();xse();wse();Sse();Bse();jse();FI();Kse();Yse();Jse();rle();ile();ole();ule();ple();vle();ble();_le();d4();Lle();Wle();$le();Kle();Xle();Jle();iue();sue();cue();mue();yue();xue();kue();Aue();Pue();que();Uue();Hue();Wue();Vue();$ue();Kue();Gue();Yue();Zue();Xue();Jue();Que();ece();Oce();Ice();Mce();Pce();Lce();Rce();Fce();Nce();qce();zce();Uce();Wce();$ce();Jce();efe();rfe();ife();afe();lfe();ufe();ffe();dfe();yfe();xfe();wfe();kfe();Efe();Afe();Ofe();Mfe();qfe();zfe();Ufe();Gfe();Xfe();rhe();nhe();ihe();ahe();she();hhe();Che();Dhe();jhe();$he();Qhe();ide();vde();kde();Ede();Nde();qde();zde();hpe();bpe();gme();bme();xme();_me();Tme();Dme();Ome();Ime.exports=k2()});var Pme=de((z6,j6)=>{(function(r,e){typeof z6=="object"&&typeof j6<"u"?j6.exports=e():typeof define=="function"&&define.amd?define(e):(r=typeof globalThis<"u"?globalThis:r||self,r.Chartkick=e())})(z6,function(){"use strict";function r(se){return Object.prototype.toString.call(se)==="[object Array]"}function e(se){return se instanceof Function}function t(se){return Object.prototype.toString.call(se)==="[object Object]"&&!e(se)&&se instanceof Object}function n(se,oe){var _e;for(_e in oe)_e!=="__proto__"&&(t(oe[_e])||r(oe[_e])?(t(oe[_e])&&!t(se[_e])&&(se[_e]={}),r(oe[_e])&&!r(se[_e])&&(se[_e]=[]),n(se[_e],oe[_e])):oe[_e]!==void 0&&(se[_e]=oe[_e]))}function i(se,oe){var _e={};return n(_e,se),n(_e,oe),_e}var o=/^(\d\d\d\d)(-)?(\d\d)(-)?(\d\d)$/i;function a(se){var oe,_e,Ke;for(oe=0;oe=6}function le(se){return typeof se=="number"}var ge=["bytes","KB","MB","GB","TB","PB","EB"];function Se(se,oe,_e,Ke){se=se||"",_e.prefix&&(oe<0&&(oe=oe*-1,se+="-"),se+=_e.prefix);var dt=_e.suffix||"",Kt=_e.precision,tr=_e.round;if(_e.byteScale){var Or,Ur=Ke?_e.byteScale:oe;Ur>=1152921504606847e3?(oe/=1152921504606847e3,Or=6):Ur>=0x4000000000000?(oe/=0x4000000000000,Or=5):Ur>=1099511627776?(oe/=1099511627776,Or=4):Ur>=1073741824?(oe/=1073741824,Or=3):Ur>=1048576?(oe/=1048576,Or=2):Ur>=1024?(oe/=1024,Or=1):Or=0,Kt===void 0&&tr===void 0&&(oe>=1023.5&&Or=1e3?4:3),dt=" "+ge[Or]}if(Kt!==void 0&&tr!==void 0)throw Error("Use either round or precision, not both");if(!Ke&&(Kt!==void 0&&(oe=oe.toPrecision(Kt),_e.zeros||(oe=parseFloat(oe))),tr!==void 0))if(tr<0){var fr=Math.pow(10,-1*tr);oe=parseInt((1*oe/fr).toFixed(0))*fr}else oe=oe.toFixed(tr),_e.zeros||(oe=parseFloat(oe));if(_e.thousands||_e.decimal){oe=u(oe);var An=oe.split(".");oe=An[0],_e.thousands&&(oe=oe.replace(/\B(?=(\d{3})+(?!\d))/g,_e.thousands)),An.length>1&&(oe+=(_e.decimal||".")+An[1])}return se+oe+dt}function ye(se,oe,_e){return _e in oe?oe[_e]:_e in se.options?se.options[_e]:null}function be(se){var oe,_e,Ke;for(oe=0;oe25?Ke=25:Ke<10&&(Ke=10),_e.scales.x.ticks.callback||(_e.scales.x.ticks.callback=function(dt){return dt=u(this.getLabelForValue(dt)),dt.length>Ke?dt.substring(0,Ke-2)+"...":dt})},xt=function(se,oe,_e){var Ke={prefix:se.options.prefix,suffix:se.options.suffix,thousands:se.options.thousands,decimal:se.options.decimal,precision:se.options.precision,round:se.options.round,zeros:se.options.zeros};if(se.options.bytes){var dt=se.data;_e==="pie"&&(dt=[{data:dt}]);for(var Kt=0,tr=0;trKt&&(Kt=Or.data[Ur][1]);for(var fr=1;Kt>=1024;)fr*=1024,Kt/=1024;Ke.byteScale=fr}if(_e!=="pie"){var An=oe.scales.y;_e==="bar"&&(An=oe.scales.x),Ke.byteScale&&(An.ticks.stepSize||(An.ticks.stepSize=Ke.byteScale/2),An.ticks.maxTicksLimit||(An.ticks.maxTicksLimit=4)),An.ticks.callback||(An.ticks.callback=function(sn){return Se("",sn,Ke,!0)})}if(!oe.plugins.tooltip.callbacks.label)if(_e==="scatter")oe.plugins.tooltip.callbacks.label=function(sn){var tn=sn.dataset.label||"";return tn&&(tn+=": "),tn+"("+sn.label+", "+sn.formattedValue+")"};else if(_e==="bubble")oe.plugins.tooltip.callbacks.label=function(sn){var tn=sn.dataset.label||"";tn&&(tn+=": ");var ln=sn.raw;return tn+"("+ln.x+", "+ln.y+", "+ln.v+")"};else if(_e==="pie")oe.plugins.tooltip.callbacks.label=function(sn){var tn=sn.label,ln=": ";return r(tn)?(tn=tn.slice(),tn[0]+=ln):tn+=ln,Se(tn,sn.parsed,Ke)};else{var Mn=_e==="bar"?"x":"y";oe.plugins.tooltip.callbacks.label=function(sn){if(sn.parsed[Mn]!==null){var tn=sn.dataset.label||"";return tn&&(tn+=": "),Se(tn,sn.parsed[Mn],Ke)}}}},Ft=T(i(Ue,B),N,$,V,H,G,j,Me),Ot=function(se,oe,_e){var Ke=[],dt=[],Kt=se.options.colors||re,tr=!0,Or=!0,Ur,fr=!0,An=!0,Mn=!0,sn=!0,tn=se.data,ln=0;if(_e==="bubble")for(var ti=0;tiln&&(ln=Yo.data[zs][2]);var ii,Mi,Aa,Ql,Qi,Xs=[],_o=[];if(_e==="bar"||_e==="column"||se.xtype!=="number"&&se.xtype!=="bubble"){var eo=[];for(ii=0;ii0){var Xn=(Qe(cn)?p(cn):dt[0]).getTime(),ta=(Qe(On)?p(On):dt[0]).getTime();for(ii=1;iita&&(ta=Oa)}var Ts=(ta-Xn)/(86400*1e3);if(!oe.scales.x.time.unit){var co;if(An||Ts>365*10?(oe.scales.x.time.unit="year",co=365):fr||Ts>30*10?(oe.scales.x.time.unit="month",co=30):tr||Ts>10?(oe.scales.x.time.unit="day",co=1):Mn||Ts>.5?(oe.scales.x.time.displayFormats={hour:"MMM d, h a"},oe.scales.x.time.unit="hour",co=1/24):sn&&(oe.scales.x.time.displayFormats={minute:"h:mm a"},oe.scales.x.time.unit="minute",co=1/24/60),co&&Ts>0){var Ja=se.element.offsetWidth;if(Ja>0){var Su=Math.ceil(Ts/co/(Ja/100));Or&&co===1&&(Su=Math.ceil(Su/7)*7),oe.scales.x.time.stepSize=Su}}}oe.scales.x.time.tooltipFormat||(tr?oe.scales.x.time.tooltipFormat="PP":Mn?oe.scales.x.time.tooltipFormat="MMM d, h a":sn&&(oe.scales.x.time.tooltipFormat="h:mm a"))}var ds={labels:dt,datasets:Ke};return ds},Yt=function(oe){this.name="chartjs",this.library=oe};Yt.prototype.renderLineChart=function(oe,_e){var Ke={};!oe.options.max&&be(oe.data)&&(Ke.max=1);var dt=Ft(oe,i(Ke,oe.options));xt(oe,dt,_e);var Kt=Ot(oe,dt,_e||"line");oe.xtype==="number"?(dt.scales.x.type=dt.scales.x.type||"linear",dt.scales.x.position=dt.scales.x.position||"bottom"):dt.scales.x.type=oe.xtype==="string"?"category":"time",this.drawChart(oe,"line",Kt,dt)},Yt.prototype.renderPieChart=function(oe){var _e=i({},Ue);oe.options.donut&&(_e.cutout="50%"),"legend"in oe.options&&N(_e,oe.options.legend),oe.options.title&&$(_e,oe.options.title),_e=i(_e,oe.options.library||{}),xt(oe,_e,"pie");for(var Ke=[],dt=[],Kt=0;Kt\u25CF '+Se(this.series.name+": ",this.y,Ke)+"
"})},ft=function(oe){this.name="highcharts",this.library=oe};ft.prototype.renderLineChart=function(oe,_e){_e=_e||"spline";var Ke={};_e==="areaspline"&&(Ke={plotOptions:{areaspline:{stacking:"normal"},area:{stacking:"normal"},series:{marker:{enabled:!1}}}}),oe.options.curve===!1&&(_e==="areaspline"?_e="area":_e==="spline"&&(_e="line"));var dt=ze(oe,oe.options,Ke),Kt,tr,Or;oe.xtype==="number"?dt.xAxis.type=dt.xAxis.type||"linear":dt.xAxis.type=oe.xtype==="string"?"category":"datetime",dt.chart.type||(dt.chart.type=_e),Wt(oe,dt,_e);var Ur=oe.data;for(tr=0;tr0)return!1;return!0}function _i(se){var oe=se.element,_e=document.createElement("a"),Ke=se.options.download;Ke===!0?Ke={}:typeof Ke=="string"&&(Ke={filename:Ke}),_e.download=Ke.filename||"chart.png",_e.style.position="absolute",_e.style.top="20px",_e.style.right="20px",_e.style.zIndex=1e3,_e.style.lineHeight="20px",_e.target="_blank";var dt=document.createElement("img");dt.alt="Download",dt.style.border="none",dt.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAMAAAC6V+0/AAABCFBMVEUAAADMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMywEsqxAAAAV3RSTlMAAQIDBggJCgsMDQ4PERQaHB0eISIjJCouLzE0OTo/QUJHSUpLTU5PUllhYmltcHh5foWLjI+SlaCio6atr7S1t7m6vsHHyM7R2tze5Obo7fHz9ff5+/1hlxK2AAAA30lEQVQYGUXBhVYCQQBA0TdYWAt2d3d3YWAHyur7/z9xgD16Lw0DW+XKx+1GgX+FRzM3HWQWrHl5N/oapW5RPe0PkBu+UYeICvozTWZVK23Ao04B79oJrOsJDOoxkZoQPWgX29pHpCZEk7rEvQYiNSFq1UMqvlCjJkRBS1R8hb00Vb/TajtBL7nTHE1X1vyMQF732dQhyF2o6SAwrzP06iUQzvwsArlnzcOdrgBhJyHa1QOgO9U1GsKuvjUTjavliZYQ8nNPapG6sap/3nrIdJ6bOWzmX/fy0XVpfzZP3S8OJT3g9EEiJwAAAABJRU5ErkJggg==",_e.appendChild(dt),oe.style.position="relative",se.__downloadAttached=!0,se.__enterEvent=Je(oe,"mouseover",function(Kt){var tr=Kt.relatedTarget;(!tr||tr!==this&&!Pt(this,tr))&&se.options.download&&(_e.href=se.toImage(Ke),oe.appendChild(_e))}),se.__leaveEvent=Je(oe,"mouseout",function(Kt){var tr=Kt.relatedTarget;(!tr||tr!==this&&!Pt(this,tr))&&_e.parentNode&&_e.parentNode.removeChild(_e)})}function Je(se,oe,_e){if(se.addEventListener)return se.addEventListener(oe,_e,!1),_e;var Ke=function(){return _e.call(se,window.event)};return se.attachEvent("on"+oe,Ke),Ke}function st(se,oe,_e){se.removeEventListener?se.removeEventListener(oe,_e,!1):se.detachEvent("on"+oe,_e)}function Pt(se,oe){if(se===oe)return!1;for(;oe&&oe!==se;)oe=oe.parentNode;return oe===se}var nr=[],Rr=0,qr=4;function jn(se,oe,_e){nr.push([se,oe,_e]),Br()}function Br(){if(Rr0?new Error("No charting library found for "+se):new Error("No charting libraries found - be sure to include one before your charts")}var mt=function(oe,_e,Ke){var dt;if(typeof oe=="string"&&(dt=oe,oe=document.getElementById(oe),!oe))throw new Error("No element with id "+dt);this.element=oe,this.options=i(Fe.options,Ke||{}),this.dataSource=_e,Fe.charts[oe.id]=this,Ee(this,_e,!0),this.options.refresh&&this.startRefresh()};mt.prototype.getElement=function(){return this.element},mt.prototype.getDataSource=function(){return this.dataSource},mt.prototype.getData=function(){return this.data},mt.prototype.getOptions=function(){return this.options},mt.prototype.getChartObject=function(){return this.chart},mt.prototype.getAdapter=function(){return this.adapter},mt.prototype.updateData=function(oe,_e){this.dataSource=oe,_e&&this.__updateOptions(_e),Ee(this,oe,!0)},mt.prototype.setOptions=function(oe){this.__updateOptions(oe),this.redraw()},mt.prototype.redraw=function(){Ee(this,this.rawData)},mt.prototype.refreshData=function(){if(typeof this.dataSource=="string"){var oe=this.dataSource.indexOf("?")===-1?"?":"&",_e=this.dataSource+oe+"_="+new Date().getTime();Ee(this,_e)}else typeof this.dataSource=="function"&&Ee(this,this.dataSource)},mt.prototype.startRefresh=function(){var oe=this,_e=this.options.refresh;if(_e&&typeof this.dataSource!="string"&&typeof this.dataSource!="function")throw new Error("Data source must be a URL or callback for refresh");if(!this.intervalId)if(_e)this.intervalId=setInterval(function(){oe.refreshData()},_e*1e3);else throw new Error("No refresh interval")},mt.prototype.stopRefresh=function(){this.intervalId&&(clearInterval(this.intervalId),this.intervalId=null)},mt.prototype.toImage=function(oe){if(this.adapter==="chartjs")if(oe&&oe.background&&oe.background!=="transparent"){var _e=this.chart.canvas,Ke=this.chart.ctx,dt=document.createElement("canvas"),Kt=dt.getContext("2d");return dt.width=Ke.canvas.width,dt.height=Ke.canvas.height,Kt.fillStyle=oe.background,Kt.fillRect(0,0,dt.width,dt.height),Kt.drawImage(_e,0,0),dt.toDataURL("image/png")}else return this.chart.toBase64Image();else throw new Error("Feature only available for Chart.js")},mt.prototype.destroy=function(){this.destroyed=!0,this.stopRefresh(),this.__adapterObject&&this.__adapterObject.destroy(this),this.__enterEvent&&st(this.element,"mouseover",this.__enterEvent),this.__leaveEvent&&st(this.element,"mouseout",this.__leaveEvent)},mt.prototype.__updateOptions=function(oe){var _e=oe.refresh&&oe.refresh!==this.options.refresh;this.options=i(Fe.options,oe),_e&&(this.stopRefresh(),this.startRefresh())},mt.prototype.__render=function(){this.data=this.__processData(),ot(this.__chartName(),this)},mt.prototype.__config=function(){return wn};var Be=function(se){function oe(){se.apply(this,arguments)}return se&&(oe.__proto__=se),oe.prototype=Object.create(se&&se.prototype),oe.prototype.constructor=oe,oe.prototype.__processData=function(){return qn(this)},oe.prototype.__chartName=function(){return"LineChart"},oe}(mt),Ge=function(se){function oe(){se.apply(this,arguments)}return se&&(oe.__proto__=se),oe.prototype=Object.create(se&&se.prototype),oe.prototype.constructor=oe,oe.prototype.__processData=function(){return xi(this)},oe.prototype.__chartName=function(){return"PieChart"},oe}(mt),It=function(se){function oe(){se.apply(this,arguments)}return se&&(oe.__proto__=se),oe.prototype=Object.create(se&&se.prototype),oe.prototype.constructor=oe,oe.prototype.__processData=function(){return qn(this,null,!0)},oe.prototype.__chartName=function(){return"ColumnChart"},oe}(mt),lr=function(se){function oe(){se.apply(this,arguments)}return se&&(oe.__proto__=se),oe.prototype=Object.create(se&&se.prototype),oe.prototype.constructor=oe,oe.prototype.__processData=function(){return qn(this,null,!0)},oe.prototype.__chartName=function(){return"BarChart"},oe}(mt),Ht=function(se){function oe(){se.apply(this,arguments)}return se&&(oe.__proto__=se),oe.prototype=Object.create(se&&se.prototype),oe.prototype.constructor=oe,oe.prototype.__processData=function(){return qn(this)},oe.prototype.__chartName=function(){return"AreaChart"},oe}(mt),zt=function(se){function oe(){se.apply(this,arguments)}return se&&(oe.__proto__=se),oe.prototype=Object.create(se&&se.prototype),oe.prototype.constructor=oe,oe.prototype.__processData=function(){return xi(this)},oe.prototype.__chartName=function(){return"GeoChart"},oe}(mt),hr=function(se){function oe(){se.apply(this,arguments)}return se&&(oe.__proto__=se),oe.prototype=Object.create(se&&se.prototype),oe.prototype.constructor=oe,oe.prototype.__processData=function(){return qn(this,"number")},oe.prototype.__chartName=function(){return"ScatterChart"},oe}(mt),Ae=function(se){function oe(){se.apply(this,arguments)}return se&&(oe.__proto__=se),oe.prototype=Object.create(se&&se.prototype),oe.prototype.constructor=oe,oe.prototype.__processData=function(){return qn(this,"bubble")},oe.prototype.__chartName=function(){return"BubbleChart"},oe}(mt),He=function(se){function oe(){se.apply(this,arguments)}return se&&(oe.__proto__=se),oe.prototype=Object.create(se&&se.prototype),oe.prototype.constructor=oe,oe.prototype.__processData=function(){var Ke,dt=this.rawData;for(Ke=0;KeArray.prototype.slice.call(a)),i=!1,o=[];return function(...a){o=n(a),i||(i=!0,K6.call(window,()=>{i=!1,r.apply(e,o)}))}}function Gme(r,e){let t;return function(...n){return e?(clearTimeout(t),t=setTimeout(r,e,n)):r.apply(this,n),e}}function bg(){}function xa(r){return r===null||typeof r>"u"}function Rs(r){if(Array.isArray&&Array.isArray(r))return!0;let e=Object.prototype.toString.call(r);return e.substr(0,7)==="[object"&&e.substr(-6)==="Array]"}function Qo(r){return r!==null&&Object.prototype.toString.call(r)==="[object Object]"}function Yd(r,e){return vu(r)?r:e}function ao(r,e){return typeof r>"u"?e:r}function Fs(r,e,t){if(r&&typeof r.call=="function")return r.apply(t,e)}function Za(r,e,t,n){let i,o,a;if(Rs(r))if(o=r.length,n)for(i=o-1;i>=0;i--)e.call(t,r[i],i);else for(i=0;it;)r=r[e.substr(t,n-t)],t=n+1,n=Lme(e,t);return r}function rP(r){return r.charAt(0).toUpperCase()+r.slice(1)}function Qme(r){return r.type==="mouseup"||r.type==="click"||r.type==="contextmenu"}function X6(r){let e=Math.round(r);r=J1(r,e,r/1e3)?e:r;let t=Math.pow(10,Math.floor(Zd(r))),n=r/t;return(n<=1?1:n<=2?2:n<=5?5:10)*t}function ege(r){let e=[],t=Math.sqrt(r),n;for(n=1;ni-o).pop(),e}function X1(r){return!isNaN(parseFloat(r))&&isFinite(r)}function J1(r,e,t){return Math.abs(r-e)=r}function J6(r,e,t){let n,i,o;for(n=0,i=r.length;nh&&p<_}function Fc(r,e,t){return Math.max(e,Math.min(t,r))}function rge(r){return Fc(r,-32768,32767)}function xg(r,e,t,n=1e-6){return r>=Math.min(e,t)-n&&r<=Math.max(e,t)+n}function Qpt(r){return KM(r.r)&&KM(r.g)&&KM(r.b)&&KM(r.a)}function emt(r){var e=r.length,t;return r[0]==="#"&&(e===4||e===5?t={r:255&Bp[r[1]]*17,g:255&Bp[r[2]]*17,b:255&Bp[r[3]]*17,a:e===5?Bp[r[4]]*17:255}:(e===7||e===9)&&(t={r:Bp[r[1]]<<4|Bp[r[2]],g:Bp[r[3]]<<4|Bp[r[4]],b:Bp[r[5]]<<4|Bp[r[6]],a:e===9?Bp[r[7]]<<4|Bp[r[8]]:255})),t}function tmt(r){var e=Qpt(r)?Xpt:Jpt;return r&&"#"+e(r.r)+e(r.g)+e(r.b)+(r.a<255?e(r.a):"")}function OE(r){return r+.5|0}function TE(r){return iP(OE(r*2.55),0,255)}function CE(r){return iP(OE(r*255),0,255)}function tU(r){return iP(OE(r/2.55)/100,0,1)}function qme(r){return iP(OE(r*100),0,100)}function nmt(r){let e=rmt.exec(r),t=255,n,i,o;if(!!e){if(e[7]!==n){let a=+e[7];t=255&(e[8]?TE(a):a*255)}return n=+e[1],i=+e[3],o=+e[5],n=255&(e[2]?TE(n):n),i=255&(e[4]?TE(i):i),o=255&(e[6]?TE(o):o),{r:n,g:i,b:o,a:t}}}function imt(r){return r&&(r.a<255?`rgba(${r.r}, ${r.g}, ${r.b}, ${tU(r.a)})`:`rgb(${r.r}, ${r.g}, ${r.b})`)}function nge(r,e,t){let n=e*Math.min(t,1-t),i=(o,a=(o+r/30)%12)=>t-n*Math.max(Math.min(a-3,9-a,1),-1);return[i(0),i(8),i(4)]}function amt(r,e,t){let n=(i,o=(i+r/60)%6)=>t-t*e*Math.max(Math.min(o,4-o,1),0);return[n(5),n(3),n(1)]}function smt(r,e,t){let n=nge(r,1,.5),i;for(e+t>1&&(i=1/(e+t),e*=i,t*=i),i=0;i<3;i++)n[i]*=1-e-t,n[i]+=e;return n}function rU(r){let t=r.r/255,n=r.g/255,i=r.b/255,o=Math.max(t,n,i),a=Math.min(t,n,i),u=(o+a)/2,h,p,_;return o!==a&&(_=o-a,p=u>.5?_/(2-o-a):_/(o+a),h=o===t?(n-i)/_+(n>16&255,o>>8&255,o&255]}return r}function pmt(r){GM||(GM=dmt(),GM.transparent=[0,0,0,0]);let e=GM[r.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}function YM(r,e,t){if(r){let n=rU(r);n[e]=Math.max(0,Math.min(n[e]+n[e]*t,e===0?360:1)),n=iU(n),r.r=n[0],r.g=n[1],r.b=n[2]}}function oge(r,e){return r&&Object.assign(e||{},r)}function jme(r){var e={r:0,g:0,b:0,a:255};return Array.isArray(r)?r.length>=3&&(e={r:r[0],g:r[1],b:r[2],a:255},r.length>3&&(e.a=CE(r[3]))):(e=oge(r,{r:0,g:0,b:0,a:1}),e.a=CE(e.a)),e}function mmt(r){return r.charAt(0)==="r"?nmt(r):cmt(r)}function age(r){return new G1(r)}function oU(r){return sge(r)?r:age(r)}function U6(r){return sge(r)?r:age(r).saturate(.5).darken(.1).hexString()}function EE(r,e){if(!e)return r;let t=e.split(".");for(let n=0,i=t.length;nn&&(n=o),n}function lge(r,e,t,n){n=n||{};let i=n.data=n.data||{},o=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(i=n.data={},o=n.garbageCollect=[],n.font=e),r.save(),r.font=e;let a=0,u=t.length,h,p,_,T,O;for(h=0;ht.length){for(h=0;h0&&r.stroke()}}function tb(r,e,t){return t=t||.5,!e||r&&r.x>e.left-t&&r.xe.top-t&&r.y0&&o.strokeColor!=="",h,p;for(r.save(),r.font=i.string,vmt(r,o),h=0;hao(r[a],r[e[a]]):a=>r[a]:()=>r;for(let a of i)t[a]=wmt(o(a));return t}function sU(r){return aP(r,{top:"y",right:"x",bottom:"y",left:"x"})}function Y0(r){return aP(r,["topLeft","topRight","bottomLeft","bottomRight"])}function xf(r){let e=sU(r);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function fc(r,e){r=r||{},e=e||$o.font;let t=ao(r.size,e.size);typeof t=="string"&&(t=parseInt(t,10));let n=ao(r.style,e.style);n&&!(""+n).match(xmt)&&(console.warn('Invalid font style specified: "'+n+'"'),n="");let i={family:ao(r.family,e.family),lineHeight:_mt(ao(r.lineHeight,e.lineHeight),t),size:t,style:n,weight:ao(r.weight,e.weight),string:""};return i.string=gmt(i),i}function ew(r,e,t,n){let i=!0,o,a,u;for(o=0,a=r.length;ot&&u===0?0:u+h;return{min:a(n,-Math.abs(o)),max:a(i,o)}}function Rv(r,e){return Object.assign(Object.create(r),e)}function sP(r,e,t){t=t||(a=>r[a]1;)o=i+n>>1,t(o)?i=o:n=o;return{lo:i,hi:n}}function dge(r,e,t){let n=0,i=r.length;for(;nn&&r[i-1]>t;)i--;return n>0||i{let n="_onData"+rP(t),i=r[t];Object.defineProperty(r,t,{configurable:!0,enumerable:!1,value(...o){let a=i.apply(this,o);return r._chartjs.listeners.forEach(u=>{typeof u[n]=="function"&&u[n](...o)}),a}})})}function lU(r,e){let t=r._chartjs;if(!t)return;let n=t.listeners,i=n.indexOf(e);i!==-1&&n.splice(i,1),!(n.length>0)&&(pge.forEach(o=>{delete r[o]}),delete r._chartjs)}function uU(r){let e=new Set,t,n;for(t=0,n=r.length;tr[0]){Gd(n)||(n=yge("_fallback",r));let o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:r,_rootScopes:t,_fallback:n,_getTarget:i,override:a=>lP([a,...r],e,t,n)};return new Proxy(o,{deleteProperty(a,u){return delete a[u],delete a._keys,delete r[0][u],!0},get(a,u){return gge(a,u,()=>Omt(u,e,r,a))},getOwnPropertyDescriptor(a,u){return Reflect.getOwnPropertyDescriptor(a._scopes[0],u)},getPrototypeOf(){return Reflect.getPrototypeOf(r[0])},has(a,u){return Hme(a).includes(u)},ownKeys(a){return Hme(a)},set(a,u,h){let p=a._storage||(a._storage=i());return a[u]=p[u]=h,delete a._keys,!0}})}function G0(r,e,t,n){let i={_cacheable:!1,_proxy:r,_context:e,_subProxy:t,_stack:new Set,_descriptors:cU(r,n),setContext:o=>G0(r,o,t,n),override:o=>G0(r.override(o),e,t,n)};return new Proxy(i,{deleteProperty(o,a){return delete o[a],delete r[a],!0},get(o,a,u){return gge(o,a,()=>kmt(o,a,u))},getOwnPropertyDescriptor(o,a){return o._descriptors.allKeys?Reflect.has(r,a)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(r,a)},getPrototypeOf(){return Reflect.getPrototypeOf(r)},has(o,a){return Reflect.has(r,a)},ownKeys(){return Reflect.ownKeys(r)},set(o,a,u){return r[a]=u,delete o[a],!0}})}function cU(r,e={scriptable:!0,indexable:!0}){let{_scriptable:t=e.scriptable,_indexable:n=e.indexable,_allKeys:i=e.allKeys}=r;return{allKeys:i,scriptable:t,indexable:n,isScriptable:Lv(t)?t:()=>t,isIndexable:Lv(n)?n:()=>n}}function gge(r,e,t){if(Object.prototype.hasOwnProperty.call(r,e))return r[e];let n=t();return r[e]=n,n}function kmt(r,e,t){let{_proxy:n,_context:i,_subProxy:o,_descriptors:a}=r,u=n[e];return Lv(u)&&a.isScriptable(e)&&(u=Tmt(e,u,r,t)),Rs(u)&&u.length&&(u=Emt(e,u,r,a.isIndexable)),fU(e,u)&&(u=G0(u,i,o&&o[e],a)),u}function Tmt(r,e,t,n){let{_proxy:i,_context:o,_subProxy:a,_stack:u}=t;if(u.has(r))throw new Error("Recursion detected: "+Array.from(u).join("->")+"->"+r);return u.add(r),e=e(o,a||n),u.delete(r),fU(r,e)&&(e=hU(i._scopes,i,r,e)),e}function Emt(r,e,t,n){let{_proxy:i,_context:o,_subProxy:a,_descriptors:u}=t;if(Gd(o.index)&&n(r))e=e[o.index%e.length];else if(Qo(e[0])){let h=e,p=i._scopes.filter(_=>_!==h);e=[];for(let _ of h){let T=hU(p,i,r,_);e.push(G0(T,o,a&&a[r],u))}}return e}function vge(r,e,t){return Lv(r)?r(e,t):r}function Amt(r,e,t,n,i){for(let o of e){let a=Cmt(t,o);if(a){r.add(a);let u=vge(a._fallback,t,i);if(Gd(u)&&u!==t&&u!==n)return u}else if(a===!1&&Gd(n)&&t!==n)return null}return!1}function hU(r,e,t,n){let i=e._rootScopes,o=vge(e._fallback,t,n),a=[...r,...i],u=new Set;u.add(n);let h=Ume(u,a,t,o||t,n);return h===null||Gd(o)&&o!==t&&(h=Ume(u,a,o,h,n),h===null)?!1:lP(Array.from(u),[""],i,o,()=>Dmt(e,t,n))}function Ume(r,e,t,n,i){for(;t;)t=Amt(r,e,t,n,i);return t}function Dmt(r,e,t){let n=r._getTarget();e in n||(n[e]={});let i=n[e];return Rs(i)&&Qo(t)?t:i}function Omt(r,e,t,n){let i;for(let o of e)if(i=yge(Smt(o,r),t),Gd(i))return fU(r,i)?hU(t,n,r,i):i}function yge(r,e){for(let t of e){if(!t)continue;let n=t[r];if(Gd(n))return n}}function Hme(r){let e=r._keys;return e||(e=r._keys=Imt(r._scopes)),e}function Imt(r){let e=new Set;for(let t of r)for(let n of Object.keys(t).filter(i=>!i.startsWith("_")))e.add(n);return Array.from(e)}function Pmt(r,e,t,n){let i=r.skip?e:r,o=e,a=t.skip?e:t,u=QM(o,i),h=QM(a,o),p=u/(u+h),_=h/(u+h);p=isNaN(p)?0:p,_=isNaN(_)?0:_;let T=n*p,O=n*_;return{previous:{x:o.x-T*(a.x-i.x),y:o.y-T*(a.y-i.y)},next:{x:o.x+O*(a.x-i.x),y:o.y+O*(a.y-i.y)}}}function Lmt(r,e,t){let n=r.length,i,o,a,u,h,p=Y1(r,0);for(let _=0;_!p.skip)),e.cubicInterpolationMode==="monotone")Fmt(r,i);else{let p=n?r[r.length-1]:r[0];for(o=0,a=r.length;o0?e.y:r.y}}function kge(r,e,t,n){let i={x:r.cp2x,y:r.cp2y},o={x:e.cp1x,y:e.cp1y},a=eb(r,i,t),u=eb(i,o,t),h=eb(o,e,t),p=eb(a,u,t),_=eb(u,h,t);return eb(p,_,t)}function Hmt(r,e){e=e||{};let t=r+JSON.stringify(e),n=Wme.get(t);return n||(n=new Intl.NumberFormat(r,e),Wme.set(t,n)),n}function tw(r,e,t){return Hmt(e,t).format(r)}function Z0(r,e,t){return r?Wmt(e,t):Vmt()}function vU(r,e){let t,n;(e==="ltr"||e==="rtl")&&(t=r.canvas.style,n=[t.getPropertyValue("direction"),t.getPropertyPriority("direction")],t.setProperty("direction",e,"important"),r.prevTextDirection=n)}function yU(r,e){e!==void 0&&(delete r.prevTextDirection,r.canvas.style.setProperty("direction",e[0],e[1]))}function Tge(r){return r==="angle"?{between:Q1,compare:Zpt,normalize:nd}:{between:xg,compare:(e,t)=>e-t,normalize:e=>e}}function Vme({start:r,end:e,count:t,loop:n,style:i}){return{start:r%t,end:e%t,loop:n&&(e-r+1)%t===0,style:i}}function $mt(r,e,t){let{property:n,start:i,end:o}=t,{between:a,normalize:u}=Tge(n),h=e.length,{start:p,end:_,loop:T}=r,O,L;if(T){for(p+=h,_+=h,O=0,L=h;Oh(i,ue,te)&&u(i,ue)!==0,ve=()=>u(o,te)===0||h(o,ue,te),le=()=>U||S(),ge=()=>!U||ve();for(let Se=_,ye=_;Se<=T;++Se)ie=e[Se%a],!ie.skip&&(te=p(ie[n]),te!==ue&&(U=h(te,i,o),Z===null&&le()&&(Z=u(te,i)===0?Se:ye),Z!==null&&ge()&&(q.push(Vme({start:Z,end:Se,loop:O,count:a,style:L})),Z=null),ye=Se,ue=te));return Z!==null&&q.push(Vme({start:Z,end:T,loop:O,count:a,style:L})),q}function xU(r,e){let t=[],n=r.segments;for(let i=0;ii&&r[o%e].skip;)o--;return o%=e,{start:i,end:o}}function Gmt(r,e,t,n){let i=r.length,o=[],a=e,u=r[e],h;for(h=e+1;h<=t;++h){let p=r[h%i];p.skip||p.stop?u.skip||(n=!1,o.push({start:e%i,end:(h-1)%i,loop:n}),e=a=p.stop?h:null):(a=h,u.skip&&(e=h)),u=p}return a!==null&&o.push({start:e%i,end:a%i,loop:n}),o}function Ege(r,e){let t=r.points,n=r.options.spanGaps,i=t.length;if(!i)return[];let o=!!r._loop,{start:a,end:u}=Kmt(t,i,o,n);if(n===!0)return $me(r,[{start:a,end:u,loop:o}],t,e);let h=u{K6=function(){return typeof window>"u"?function(r){return r()}:window.requestAnimationFrame}();tP=r=>r==="start"?"left":r==="end"?"right":"center",bf=(r,e,t)=>r==="start"?e:r==="end"?t:(e+t)/2,Yme=(r,e,t,n)=>r===(n?"left":"right")?t:r==="center"?(e+t)/2:e;Zme=function(){let r=0;return function(){return r++}}();vu=r=>(typeof r=="number"||r instanceof Number)&&isFinite(+r);Xme=(r,e)=>typeof r=="string"&&r.endsWith("%")?parseFloat(r)/100:r/e,Y6=(r,e)=>typeof r=="string"&&r.endsWith("%")?parseFloat(r)/100*e:+r;$pt="",Kpt=".";Gd=r=>typeof r<"u",Lv=r=>typeof r=="function",Z6=(r,e)=>{if(r.size!==e.size)return!1;for(let t of r)if(!e.has(t))return!1;return!0};il=Math.PI,ks=2*il,Gpt=ks+il,JM=Number.POSITIVE_INFINITY,Ypt=il/180,Ul=il/2,kE=il/4,Rme=il*2/3,Zd=Math.log10,Om=Math.sign;$M=r=>r===0||r===1,Fme=(r,e,t)=>-(Math.pow(2,10*(r-=1))*Math.sin((r-e)*ks/t)),Nme=(r,e,t)=>Math.pow(2,-10*r)*Math.sin((r-e)*ks/t)+1,$1={linear:r=>r,easeInQuad:r=>r*r,easeOutQuad:r=>-r*(r-2),easeInOutQuad:r=>(r/=.5)<1?.5*r*r:-.5*(--r*(r-2)-1),easeInCubic:r=>r*r*r,easeOutCubic:r=>(r-=1)*r*r+1,easeInOutCubic:r=>(r/=.5)<1?.5*r*r*r:.5*((r-=2)*r*r+2),easeInQuart:r=>r*r*r*r,easeOutQuart:r=>-((r-=1)*r*r*r-1),easeInOutQuart:r=>(r/=.5)<1?.5*r*r*r*r:-.5*((r-=2)*r*r*r-2),easeInQuint:r=>r*r*r*r*r,easeOutQuint:r=>(r-=1)*r*r*r*r+1,easeInOutQuint:r=>(r/=.5)<1?.5*r*r*r*r*r:.5*((r-=2)*r*r*r*r+2),easeInSine:r=>-Math.cos(r*Ul)+1,easeOutSine:r=>Math.sin(r*Ul),easeInOutSine:r=>-.5*(Math.cos(il*r)-1),easeInExpo:r=>r===0?0:Math.pow(2,10*(r-1)),easeOutExpo:r=>r===1?1:-Math.pow(2,-10*r)+1,easeInOutExpo:r=>$M(r)?r:r<.5?.5*Math.pow(2,10*(r*2-1)):.5*(-Math.pow(2,-10*(r*2-1))+2),easeInCirc:r=>r>=1?r:-(Math.sqrt(1-r*r)-1),easeOutCirc:r=>Math.sqrt(1-(r-=1)*r),easeInOutCirc:r=>(r/=.5)<1?-.5*(Math.sqrt(1-r*r)-1):.5*(Math.sqrt(1-(r-=2)*r)+1),easeInElastic:r=>$M(r)?r:Fme(r,.075,.3),easeOutElastic:r=>$M(r)?r:Nme(r,.075,.3),easeInOutElastic(r){return $M(r)?r:r<.5?.5*Fme(r*2,.1125,.45):.5+.5*Nme(r*2-1,.1125,.45)},easeInBack(r){return r*r*((1.70158+1)*r-1.70158)},easeOutBack(r){return(r-=1)*r*((1.70158+1)*r+1.70158)+1},easeInOutBack(r){let e=1.70158;return(r/=.5)<1?.5*(r*r*(((e*=1.525)+1)*r-e)):.5*((r-=2)*r*(((e*=1.525)+1)*r+e)+2)},easeInBounce:r=>1-$1.easeOutBounce(1-r),easeOutBounce(r){return r<1/2.75?7.5625*r*r:r<2/2.75?7.5625*(r-=1.5/2.75)*r+.75:r<2.5/2.75?7.5625*(r-=2.25/2.75)*r+.9375:7.5625*(r-=2.625/2.75)*r+.984375},easeInOutBounce:r=>r<.5?$1.easeInBounce(r*2)*.5:$1.easeOutBounce(r*2-1)*.5+.5};Bp={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},V6="0123456789ABCDEF",Xpt=r=>V6[r&15],Jpt=r=>V6[(r&240)>>4]+V6[r&15],KM=r=>(r&240)>>4===(r&15);iP=(r,e,t)=>Math.max(Math.min(r,t),e);rmt=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;omt=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;Bme={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},zme={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};G1=class{constructor(e){if(e instanceof G1)return e;let t=typeof e,n;t==="object"?n=jme(e):t==="string"&&(n=emt(e)||pmt(e)||mmt(e)),this._rgb=n,this._valid=!!n}get valid(){return this._valid}get rgb(){var e=oge(this._rgb);return e&&(e.a=tU(e.a)),e}set rgb(e){this._rgb=jme(e)}rgbString(){return this._valid?imt(this._rgb):this._rgb}hexString(){return this._valid?tmt(this._rgb):this._rgb}hslString(){return this._valid?hmt(this._rgb):this._rgb}mix(e,t){let n=this;if(e){let i=n.rgb,o=e.rgb,a,u=t===a?.5:t,h=2*u-1,p=i.a-o.a,_=((h*p===-1?h:(h+p)/(1+h*p))+1)/2;a=1-_,i.r=255&_*i.r+a*o.r+.5,i.g=255&_*i.g+a*o.g+.5,i.b=255&_*i.b+a*o.b+.5,i.a=u*i.a+(1-u)*o.a,n.rgb=i}return n}clone(){return new G1(this.rgb)}alpha(e){return this._rgb.a=CE(e),this}clearer(e){let t=this._rgb;return t.a*=1-e,this}greyscale(){let e=this._rgb,t=OE(e.r*.3+e.g*.59+e.b*.11);return e.r=e.g=e.b=t,this}opaquer(e){let t=this._rgb;return t.a*=1+e,this}negate(){let e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return YM(this._rgb,2,e),this}darken(e){return YM(this._rgb,2,-e),this}saturate(e){return YM(this._rgb,1,e),this}desaturate(e){return YM(this._rgb,1,-e),this}rotate(e){return fmt(this._rgb,e),this}};sge=r=>r instanceof CanvasGradient||r instanceof CanvasPattern;nb=Object.create(null),oP=Object.create(null);$6=class{constructor(e){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=t=>t.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,n)=>U6(n.backgroundColor),this.hoverBorderColor=(t,n)=>U6(n.borderColor),this.hoverColor=(t,n)=>U6(n.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(e)}set(e,t){return H6(this,e,t)}get(e){return EE(this,e)}describe(e,t){return H6(oP,e,t)}override(e,t){return H6(nb,e,t)}route(e,t,n,i){let o=EE(this,e),a=EE(this,n),u="_"+t;Object.defineProperties(o,{[u]:{value:o[t],writable:!0},[t]:{enumerable:!0,get(){let h=this[u],p=a[i];return Qo(h)?Object.assign({},p,h):ao(h,p)},set(h){this[u]=h}}})}},$o=new $6({_scriptable:r=>!r.startsWith("on"),_indexable:r=>r!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});bmt=new RegExp(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/),xmt=new RegExp(/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/);wmt=r=>+r||0;_g=(r,e,t)=>sP(r,t,n=>r[n][e]sP(r,t,n=>r[n][e]>=t);pge=["push","pop","shift","splice","unshift"];Smt=(r,e)=>r?r+rP(e):e,fU=(r,e)=>Qo(e)&&r!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);Cmt=(r,e)=>r===!0?e:typeof r=="string"?rb(e,r):void 0;Mmt=Number.EPSILON||1e-14,Y1=(r,e)=>er==="x"?"y":"x";cP=r=>window.getComputedStyle(r,null);Bmt=["top","right","bottom","left"];zmt=(r,e,t)=>(r>0||e>0)&&(!t||!t.shadowRoot);W6=r=>Math.round(r*10)/10;wge=function(){let r=!1;try{let e={get passive(){return r=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch{}return r}();Wme=new Map;Wmt=function(r,e){return{x(t){return r+r+e-t},setWidth(t){e=t},textAlign(t){return t==="center"?t:t==="right"?"left":"right"},xPlus(t,n){return t-n},leftForLtr(t,n){return t-n}}},Vmt=function(){return{x(r){return r},setWidth(r){},textAlign(r){return r},xPlus(r,e){return r+e},leftForLtr(r,e){return r}}}});function tgt(r,e){let t=[],n=Object.keys(e);for(let i=0;i0||!t&&o<0)return i.index}return null}function Mge(r,e){let{chart:t,_cachedMeta:n}=r,i=t._stacks||(t._stacks={}),{iScale:o,vScale:a,index:u}=n,h=o.axis,p=a.axis,_=agt(o,a,n),T=e.length,O;for(let L=0;Lt[n].axis===e).shift()}function ugt(r,e){return Rv(r,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function cgt(r,e,t){return Rv(r,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:t,index:e,mode:"default",type:"data"})}function RE(r,e){let t=r.controller.index,n=r.vScale&&r.vScale.axis;if(!!n){e=e||r._parsed;for(let i of e){let o=i._stacks;if(!o||o[n]===void 0||o[n][t]===void 0)return;delete o[n][t]}}}function hgt(r,e){if(!r._cache.$bar){let t=r.getMatchingVisibleMetas(e),n=[];for(let i=0,o=t.length;ii-o))}return r._cache.$bar}function dgt(r){let e=r.iScale,t=hgt(e,r.type),n=e._length,i,o,a,u,h=()=>{a===32767||a===-32768||(Gd(u)&&(n=Math.min(n,Math.abs(a-u)||n)),u=a)};for(i=0,o=t.length;i0?i[r-1]:null,u=rMath.abs(u)&&(h=u,p=a),e[t.axis]=p,e._custom={barStart:h,barEnd:p,start:i,end:o,min:a,max:u}}function yve(r,e,t,n){return Rs(r)?ggt(r,e,t,n):e[t.axis]=t.parse(r,n),e}function Lge(r,e,t,n){let i=r.iScale,o=r.vScale,a=i.getLabels(),u=i===o,h=[],p,_,T,O;for(p=t,_=t+n;p<_;++p)O=e[p],T={},T[i.axis]=u||i.parse(a[p],p),h.push(yve(O,T,o,p));return h}function kU(r){return r&&r.barStart!==void 0&&r.barEnd!==void 0}function vgt(r,e,t){return r!==0?Om(r):(e.isHorizontal()?1:-1)*(e.min>=t?1:-1)}function ygt(r){let e,t,n,i,o;return r.horizontal?(e=r.base>r.x,t="left",n="right"):(e=r.baseQ1(ue,u,h,!0)?1:Math.max(S,S*t,ve,ve*t),q=(ue,S,ve)=>Q1(ue,u,h,!0)?-1:Math.min(S,S*t,ve,ve*t),U=L(0,p,T),Z=L(Ul,_,O),te=q(il,p,T),ie=q(il+Ul,_,O);n=(U-te)/2,i=(Z-ie)/2,o=-(U+te)/2,a=-(Z+ie)/2}return{ratioX:n,ratioY:i,offsetX:o,offsetY:a}}function Sgt(r,e,t){let n=e.length,i=0,o=n;if(r._sorted){let{iScale:a,_parsed:u}=r,h=a.axis,{min:p,max:_,minDefined:T,maxDefined:O}=a.getUserBounds();T&&(i=Fc(Math.min(_g(u,a.axis,p).lo,t?n:_g(e,h,a.getPixelForValue(p)).lo),0,n-1)),O?o=Fc(Math.max(_g(u,a.axis,_).hi+1,t?0:_g(e,h,a.getPixelForValue(_)).hi+1),i,n)-i:o=n-i}return{start:i,count:o}}function kgt(r){let{xScale:e,yScale:t,_scaleRanges:n}=r,i={xmin:e.min,xmax:e.max,ymin:t.min,ymax:t.max};if(!n)return r._scaleRanges=i,!0;let o=n.xmin!==e.min||n.xmax!==e.max||n.ymin!==t.min||n.ymax!==t.max;return Object.assign(n,i),o}function X0(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}function zE(r,e){return"native"in r?{x:r.x,y:r.y}:pU(r,e)}function Egt(r,e){let t=r.getSortedVisibleDatasetMetas(),n,i,o;for(let a=0,u=t.length;a{p[u](i[a],n)&&o.push({element:p,datasetIndex:_,index:T}),p.inRange(i.x,i.y,n)&&(h=!0)}),t.intersect&&!h?[]:o}function FE(r,e){return r.filter(t=>t.pos===e)}function qge(r,e){return r.filter(t=>bve.indexOf(t.pos)===-1&&t.box.axis===e)}function NE(r,e){return r.sort((t,n)=>{let i=e?n:t,o=e?t:n;return i.weight===o.weight?i.index-o.index:i.weight-o.weight})}function Mgt(r){let e=[],t,n,i,o,a,u;for(t=0,n=(r||[]).length;tp.box.fullSize),!0),n=NE(FE(e,"left"),!0),i=NE(FE(e,"right")),o=NE(FE(e,"top"),!0),a=NE(FE(e,"bottom")),u=qge(e,"x"),h=qge(e,"y");return{fullSize:t,leftAndTop:n.concat(o),rightAndBottom:i.concat(h).concat(a).concat(u),chartArea:FE(e,"chartArea"),vertical:n.concat(i).concat(h),horizontal:o.concat(a).concat(u)}}function Bge(r,e,t,n){return Math.max(r[t],e[t])+Math.max(r[n],e[n])}function xve(r,e){r.top=Math.max(r.top,e.top),r.left=Math.max(r.left,e.left),r.bottom=Math.max(r.bottom,e.bottom),r.right=Math.max(r.right,e.right)}function Fgt(r,e,t,n){let{pos:i,box:o}=t,a=r.maxPadding;if(!Qo(i)){t.size&&(r[i]-=t.size);let T=n[t.stack]||{size:0,count:1};T.size=Math.max(T.size,t.horizontal?o.height:o.width),t.size=T.size/T.count,r[i]+=t.size}o.getPadding&&xve(a,o.getPadding());let u=Math.max(0,e.outerWidth-Bge(a,r,"left","right")),h=Math.max(0,e.outerHeight-Bge(a,r,"top","bottom")),p=u!==r.w,_=h!==r.h;return r.w=u,r.h=h,t.horizontal?{same:p,other:_}:{same:_,other:p}}function Ngt(r){let e=r.maxPadding;function t(n){let i=Math.max(e[n]-r[n],0);return r[n]+=i,i}r.y+=t("top"),r.x+=t("left"),t("right"),t("bottom")}function qgt(r,e){let t=e.maxPadding;function n(i){let o={left:0,top:0,right:0,bottom:0};return i.forEach(a=>{o[a]=Math.max(e[a],t[a])}),o}return n(r?["left","right"]:["top","bottom"])}function jE(r,e,t,n){let i=[],o,a,u,h,p,_;for(o=0,a=r.length,p=0;o{let a=!1;for(let u of o)a=a||xP(u.addedNodes,n),a=a&&!xP(u.removedNodes,n);a&&t()});return i.observe(document,{childList:!0,subtree:!0}),i}function Vgt(r,e,t){let n=r.canvas,i=new MutationObserver(o=>{let a=!1;for(let u of o)a=a||xP(u.removedNodes,n),a=a&&!xP(u.addedNodes,n);a&&t()});return i.observe(document,{childList:!0,subtree:!0}),i}function wve(){let r=window.devicePixelRatio;r!==Uge&&(Uge=r,VE.forEach((e,t)=>{t.currentDevicePixelRatio!==r&&e()}))}function $gt(r,e){VE.size||window.addEventListener("resize",wve),VE.set(r,e)}function Kgt(r){VE.delete(r),VE.size||window.removeEventListener("resize",wve)}function Ggt(r,e,t){let n=r.canvas,i=n&&uP(n);if(!i)return;let o=G6((u,h)=>{let p=i.clientWidth;t(u,h),p{let h=u[0],p=h.contentRect.width,_=h.contentRect.height;p===0&&_===0||o(p,_)});return a.observe(i),$gt(r,o),a}function CU(r,e,t){t&&t.disconnect(),e==="resize"&&Kgt(r)}function Ygt(r,e,t){let n=r.canvas,i=G6(o=>{r.ctx!==null&&t(Hgt(o,r))},r,o=>{let a=o[0];return[a,a.offsetX,a.offsetY]});return jgt(n,e,i),i}function Zgt(r){return!dU()||typeof OffscreenCanvas<"u"&&r instanceof OffscreenCanvas?PU:LU}function Xgt(r,e){let t=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(t)>=1&&r!==Math.floor(r)&&(t=r-Math.floor(r)),t}function Jgt(r,e){let t=r.options.ticks,n=t.maxTicksLimit||Qgt(r),i=t.major.enabled?tvt(e):[],o=i.length,a=i[0],u=i[o-1],h=[];if(o>n)return rvt(e,h,i,o/n),h;let p=evt(i,e,n);if(o>0){let _,T,O=o>1?Math.round((u-a)/(o-1)):null;for(hP(e,h,p,xa(O)?0:a-O,a),_=0,T=o-1;_i)return h}return Math.max(i,1)}function tvt(r){let e=[],t,n;for(t=0,n=r.length;ta+u)))return h}function avt(r,e){Za(r,t=>{let n=t.gc,i=n.length/2,o;if(i>e){for(o=0;o{let n=t.split("."),i=n.pop(),o=[r].concat(n).join("."),a=e[t].split("."),u=a.pop(),h=a.join(".");$o.route(o,i,h,u)})}function dvt(r){return"id"in r&&"defaults"in r}function pvt(r){let e=[],t=Object.keys(qv.plugins.items);for(let i=0;i{let h=n[u];if(!Qo(h))return console.error(`Invalid scale configuration for scale: ${u}`);if(h._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${u}`);let p=qU(u,h),_=bvt(p,i),T=t.scales||{};o[p]=o[p]||u,a[u]=Z1(Object.create(null),[{axis:p},h,T[p],T[_]])}),r.data.datasets.forEach(u=>{let h=u.type||r.type,p=u.indexAxis||NU(h,e),T=(nb[h]||{}).scales||{};Object.keys(T).forEach(O=>{let L=yvt(O,p),q=u[L+"AxisID"]||o[L]||L;a[q]=a[q]||Object.create(null),Z1(a[q],[{axis:L},n[q],T[O]])})}),Object.keys(a).forEach(u=>{let h=a[u];Z1(h,[$o.scales[h.type],$o.scale])}),a}function kve(r){let e=r.options||(r.options={});e.plugins=ao(e.plugins,{}),e.scales=_vt(r,e)}function Tve(r){return r=r||{},r.datasets=r.datasets||[],r.labels=r.labels||[],r}function wvt(r){return r=r||{},r.data=Tve(r.data),kve(r),r}function dP(r,e){let t=$ge.get(r);return t||(t=e(),$ge.set(r,t),Eve.add(t)),t}function Kge(r,e,t){let n=r.get(e);n||(n=new Map,r.set(e,n));let i=t.join(),o=n.get(i);return o||(o={resolver:lP(e,t),subPrefixes:t.filter(u=>!u.toLowerCase().includes("hover"))},n.set(i,o)),o}function kvt(r,e){let{isScriptable:t,isIndexable:n}=cU(r);for(let i of e){let o=t(i),a=n(i),u=(a||o)&&r[i];if(o&&(Lv(u)||Svt(u))||a&&Rs(u))return!0}return!1}function Gge(r,e){return r==="top"||r==="bottom"||Evt.indexOf(r)===-1&&e==="x"}function Yge(r,e){return function(t,n){return t[r]===n[r]?t[e]-n[e]:t[r]-n[r]}}function Zge(r){let e=r.chart,t=e.options.animation;e.notifyPlugins("afterRender"),Fs(t&&t.onComplete,[r],e)}function Cvt(r){let e=r.chart,t=e.options.animation;Fs(t&&t.onProgress,[r],e)}function Cve(r){return dU()&&typeof r=="string"?r=document.getElementById(r):r&&r.length&&(r=r[0]),r&&r.canvas&&(r=r.canvas),r}function Avt(r,e,t){let n=Object.keys(r);for(let i of n){let o=+i;if(o>=e){let a=r[i];delete r[i],(t>0||o>e)&&(r[o+t]=a)}}}function Dvt(r,e,t,n){return!t||r.type==="mouseout"?null:n?e:r}function Dve(r,e,t){let{startAngle:n,pixelMargin:i,x:o,y:a,outerRadius:u,innerRadius:h}=e,p=i/u;r.beginPath(),r.arc(o,a,u,n-p,t+p),h>i?(p=i/h,r.arc(o,a,h,t+p,n-p,!0)):r.arc(o,a,i,t+Ul,n-Ul),r.closePath(),r.clip()}function Ovt(r){return aP(r,["outerStart","outerEnd","innerStart","innerEnd"])}function Ivt(r,e,t,n){let i=Ovt(r.options.borderRadius),o=(t-e)/2,a=Math.min(o,n*e/2),u=h=>{let p=(t-Math.min(o,h))*n/2;return Fc(h,0,Math.min(o,p))};return{outerStart:u(i.outerStart),outerEnd:u(i.outerEnd),innerStart:Fc(i.innerStart,0,a),innerEnd:Fc(i.innerEnd,0,a)}}function rw(r,e,t,n){return{x:t+r*Math.cos(e),y:n+r*Math.sin(e)}}function zU(r,e,t,n,i){let{x:o,y:a,startAngle:u,pixelMargin:h,innerRadius:p}=e,_=Math.max(e.outerRadius+n+t-h,0),T=p>0?p+n+t+h:0,O=0,L=i-u;if(n){let V=p>0?p-n:0,H=_>0?_-n:0,X=(V+H)/2,me=X!==0?L*X/(X+n):L;O=(L-me)/2}let q=Math.max(.001,L*_-t/il)/_,U=(L-q)/2,Z=u+U+O,te=i-U-O,{outerStart:ie,outerEnd:ue,innerStart:S,innerEnd:ve}=Ivt(e,T,_,te-Z),le=_-ie,ge=_-ue,Se=Z+ie/le,ye=te-ue/ge,be=T+S,Ue=T+ve,B=Z+S/be,re=te-ve/Ue;if(r.beginPath(),r.arc(o,a,_,Se,ye),ue>0){let V=rw(ge,ye,o,a);r.arc(V.x,V.y,ue,ye,te+Ul)}let N=rw(Ue,te,o,a);if(r.lineTo(N.x,N.y),ve>0){let V=rw(Ue,re,o,a);r.arc(V.x,V.y,ve,te+Ul,re+Math.PI)}if(r.arc(o,a,T,te-ve/T,Z+S/T,!0),S>0){let V=rw(be,B,o,a);r.arc(V.x,V.y,S,B+Math.PI,Z-Ul)}let $=rw(le,Z,o,a);if(r.lineTo($.x,$.y),ie>0){let V=rw(le,Se,o,a);r.arc(V.x,V.y,ie,Z-Ul,Se)}r.closePath()}function Mvt(r,e,t,n){let{fullCircles:i,startAngle:o,circumference:a}=e,u=e.endAngle;if(i){zU(r,e,t,n,o+ks);for(let h=0;hu&&o>u;return{count:n,start:h,loop:e.loop,ilen:p(a+(p?u-S:S))%o,ue=()=>{U!==Z&&(r.lineTo(_,Z),r.lineTo(_,U),r.lineTo(_,te))};for(h&&(L=i[ie(0)],r.moveTo(L.x,L.y)),O=0;O<=u;++O){if(L=i[ie(O)],L.skip)continue;let S=L.x,ve=L.y,le=S|0;le===q?(veZ&&(Z=ve),_=(T*_+S)/++T):(ue(),r.lineTo(S,ve),q=le,T=0,U=Z=ve),te=ve}ue()}function jU(r){let e=r.options,t=e.borderDash&&e.borderDash.length;return!r._decimated&&!r._loop&&!e.tension&&e.cubicInterpolationMode!=="monotone"&&!e.stepped&&!t?qvt:Nvt}function Bvt(r){return r.stepped?Sge:r.tension||r.cubicInterpolationMode==="monotone"?kge:eb}function zvt(r,e,t,n){let i=e._path;i||(i=e._path=new Path2D,e.path(i,t,n)&&i.closePath()),Ove(r,e.options),r.stroke(i)}function jvt(r,e,t,n){let{segments:i,options:o}=e,a=jU(e);for(let u of i)Ove(r,o,u.style),r.beginPath(),a(r,e,u,{start:t,end:t+n-1})&&r.closePath(),r.stroke()}function Hvt(r,e,t,n){Uvt&&!e.options.segment?zvt(r,e,t,n):jvt(r,e,t,n)}function Jge(r,e,t,n){let i=r.options,{[t]:o}=r.getProps([t],n);return Math.abs(e-o)=t)return r.slice(e,e+t);let a=[],u=(t-2)/(o-2),h=0,p=e+t-1,_=e,T,O,L,q,U;for(a[h++]=r[_],T=0;TL&&(L=q,O=r[ie],U=ie);a[h++]=O,_=U}return a[h++]=r[p],a}function Xvt(r,e,t,n){let i=0,o=0,a,u,h,p,_,T,O,L,q,U,Z=[],te=e+t-1,ie=r[e].x,S=r[te].x-ie;for(a=e;aU&&(U=p,O=a),i=(o*i+u.x)/++o;else{let le=a-1;if(!xa(T)&&!xa(O)){let ge=Math.min(T,O),Se=Math.max(T,O);ge!==L&&ge!==le&&Z.push({...r[ge],x:i}),Se!==L&&Se!==le&&Z.push({...r[Se],x:i})}a>0&&le!==L&&Z.push(r[le]),Z.push(u),_=ve,o=0,q=U=p,T=O=L=a}}return Z}function Pve(r){if(r._decimated){let e=r._data;delete r._decimated,delete r._data,Object.defineProperty(r,"data",{value:e})}}function Qge(r){r.data.datasets.forEach(e=>{Pve(e)})}function Jvt(r,e){let t=e.length,n=0,i,{iScale:o}=r,{min:a,max:u,minDefined:h,maxDefined:p}=o.getUserBounds();return h&&(n=Fc(_g(e,o.axis,a).lo,0,t-1)),p?i=Fc(_g(e,o.axis,u).hi+1,n,t)-n:i=t-n,{start:n,count:i}}function eyt(r,e){let t=r.getDatasetMeta(e);return t&&r.isDatasetVisible(e)?t.dataset:null}function tyt(r){let e=r.options,t=e.fill,n=ao(t&&t.target,t);return n===void 0&&(n=!!e.backgroundColor),n===!1||n===null?!1:n===!0?"origin":n}function ryt(r,e,t){let n=tyt(r);if(Qo(n))return isNaN(n.value)?!1:n;let i=parseFloat(n);return vu(i)&&Math.floor(i)===i?((n[0]==="-"||n[0]==="+")&&(i=e+i),i===e||i<0||i>=t?!1:i):["origin","start","end","stack","shape"].indexOf(n)>=0&&n}function nyt(r){let{scale:e={},fill:t}=r,n=null,i;return t==="start"?n=e.bottom:t==="end"?n=e.top:Qo(t)?n=e.getPixelForValue(t.value):e.getBasePixel&&(n=e.getBasePixel()),vu(n)?(i=e.isHorizontal(),{x:i?n:null,y:i?null:n}):null}function iyt(r){let{scale:e,fill:t}=r,n=e.options,i=e.getLabels().length,o=[],a=n.reverse?e.max:e.min,u=n.reverse?e.min:e.max,h,p,_;if(t==="start"?_=a:t==="end"?_=u:Qo(t)?_=t.value:_=e.getBaseValue(),n.grid.circular)return p=e.getPointPositionForValue(0,a),new wP({x:p.x,y:p.y,radius:e.getDistanceFromCenterForValue(_)});for(h=0;hr;e--){let n=t[e];if(!isNaN(n.x)&&!isNaN(n.y))break}return e}function ayt(r,e){let{x:t=null,y:n=null}=r||{},i=e.points,o=[];return e.segments.forEach(({start:a,end:u})=>{u=Lve(a,u,i);let h=i[a],p=i[u];n!==null?(o.push({x:h.x,y:n}),o.push({x:p.x,y:n})):t!==null&&(o.push({x:t,y:h.y}),o.push({x:t,y:p.y}))}),o}function syt(r){let{scale:e,index:t,line:n}=r,i=[],o=n.segments,a=n.points,u=lyt(e,t);u.push(Rve({x:null,y:e.bottom},n));for(let h=0;h-1?r.split(` `):r}function Syt(r,e){let{element:t,datasetIndex:n,index:i}=e,o=r.getDatasetMeta(n).controller,{label:a,value:u}=o.getLabelAndValue(i);return{chart:r,label:a,parsed:o.getParsed(i),raw:r.data.datasets[n].data[i],formattedValue:u,dataset:o.getDataset(),dataIndex:i,datasetIndex:n,element:t}}function ove(r,e){let t=r.chart.ctx,{body:n,footer:i,title:o}=r,{boxWidth:a,boxHeight:u}=e,h=fc(e.bodyFont),p=fc(e.titleFont),_=fc(e.footerFont),T=o.length,O=i.length,L=n.length,q=xf(e.padding),U=q.height,Z=0,te=n.reduce((S,ve)=>S+ve.before.length+ve.lines.length+ve.after.length,0);if(te+=r.beforeBody.length+r.afterBody.length,T&&(U+=T*p.lineHeight+(T-1)*e.titleSpacing+e.titleMarginBottom),te){let S=e.displayColors?Math.max(u,h.lineHeight):h.lineHeight;U+=L*S+(te-L)*h.lineHeight+(te-1)*e.bodySpacing}O&&(U+=e.footerMarginTop+O*_.lineHeight+(O-1)*e.footerSpacing);let ie=0,ue=function(S){Z=Math.max(Z,t.measureText(S).width+ie)};return t.save(),t.font=p.string,Za(r.title,ue),t.font=h.string,Za(r.beforeBody.concat(r.afterBody),ue),ie=e.displayColors?a+2+e.boxPadding:0,Za(n,S=>{Za(S.before,ue),Za(S.lines,ue),Za(S.after,ue)}),ie=0,t.font=_.string,Za(r.footer,ue),t.restore(),Z+=q.width,{width:Z,height:U}}function kyt(r,e){let{y:t,height:n}=e;return tr.height-n/2?"bottom":"center"}function Tyt(r,e,t,n){let{x:i,width:o}=n,a=t.caretSize+t.caretPadding;if(r==="left"&&i+o+a>e.width||r==="right"&&i-o-a<0)return!0}function Eyt(r,e,t,n){let{x:i,width:o}=t,{width:a,chartArea:{left:u,right:h}}=r,p="center";return n==="center"?p=i<=(u+h)/2?"left":"right":i<=o/2?p="left":i>=a-o/2&&(p="right"),Tyt(p,r,e,t)&&(p="center"),p}function ave(r,e,t){let n=t.yAlign||e.yAlign||kyt(r,t);return{xAlign:t.xAlign||e.xAlign||Eyt(r,e,t,n),yAlign:n}}function Cyt(r,e){let{x:t,width:n}=r;return e==="right"?t-=n:e==="center"&&(t-=n/2),t}function Ayt(r,e,t){let{y:n,height:i}=r;return e==="top"?n+=t:e==="bottom"?n-=i+t:n-=i/2,n}function sve(r,e,t,n){let{caretSize:i,caretPadding:o,cornerRadius:a}=r,{xAlign:u,yAlign:h}=t,p=i+o,{topLeft:_,topRight:T,bottomLeft:O,bottomRight:L}=Y0(a),q=Cyt(e,u),U=Ayt(e,h,p);return h==="center"?u==="left"?q+=p:u==="right"&&(q-=p):u==="left"?q-=Math.max(_,O)+i:u==="right"&&(q+=Math.max(T,L)+i),{x:Fc(q,0,n.width-e.width),y:Fc(U,0,n.height-e.height)}}function mP(r,e,t){let n=xf(t.padding);return e==="center"?r.x+r.width/2:e==="right"?r.x+r.width-n.right:r.x+n.left}function lve(r){return wg([],Nv(r))}function Dyt(r,e,t){return Rv(r,{tooltip:e,tooltipItems:t,type:"tooltip"})}function uve(r,e){let t=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return t?r.override(t):r}function Pyt(r,e,t,n){let i=r.indexOf(e);if(i===-1)return Myt(r,e,t,n);let o=r.lastIndexOf(e);return i!==o?t:i}function Ryt(r,e){let t=[],{bounds:i,step:o,min:a,max:u,precision:h,count:p,maxTicks:_,maxDigits:T,includeBounds:O}=r,L=o||1,q=_-1,{min:U,max:Z}=e,te=!xa(a),ie=!xa(u),ue=!xa(p),S=(Z-U)/(T+1),ve=X6((Z-U)/q/L)*L,le,ge,Se,ye;if(ve<1e-14&&!te&&!ie)return[{value:U},{value:Z}];ye=Math.ceil(Z/ve)-Math.floor(U/ve),ye>q&&(ve=X6(ye*ve/q/L)*L),xa(h)||(le=Math.pow(10,h),ve=Math.ceil(ve*le)/le),i==="ticks"?(ge=Math.floor(U/ve)*ve,Se=Math.ceil(Z/ve)*ve):(ge=U,Se=Z),te&&ie&&o&&tge((u-a)/o,ve/1e3)?(ye=Math.round(Math.min((u-a)/ve,_)),ve=(u-a)/ye,ge=a,Se=u):ue?(ge=te?a:ge,Se=ie?u:Se,ye=p-1,ve=(Se-ge)/ye):(ye=(Se-ge)/ve,J1(ye,Math.round(ye),ve/1e3)?ye=Math.round(ye):ye=Math.ceil(ye));let be=Math.max(Q6(ve),Q6(ge));le=Math.pow(10,xa(h)?be:h),ge=Math.round(ge*le)/le,Se=Math.round(Se*le)/le;let Ue=0;for(te&&(O&&ge!==a?(t.push({value:a}),ge=0?1:h),o=Math.round(u*Math.pow(10,a)*h)/h;while(ai?{start:e-t,end:e}:{start:e,end:e+t}}function qyt(r){let e={l:r.left+r._padding.left,r:r.right-r._padding.right,t:r.top+r._padding.top,b:r.bottom-r._padding.bottom},t=Object.assign({},e),n=[],i=[],o=r._pointLabels.length,a=r.options.pointLabels,u=a.centerPointLabels?il/o:0;for(let h=0;he.r&&(u=(n.end-e.r)/o,r.r=Math.max(r.r,e.r+u)),i.starte.b&&(h=(i.end-e.b)/a,r.b=Math.max(r.b,e.b+h))}function zyt(r,e,t){let n=[],i=r._pointLabels.length,o=r.options,a=HU(o)/2,u=r.drawingArea,h=o.pointLabels.centerPointLabels?il/i:0;for(let p=0;p270||t<90)&&(r-=e),r}function Wyt(r,e){let{ctx:t,options:{pointLabels:n}}=r;for(let i=e-1;i>=0;i--){let o=n.setContext(r.getPointLabelContext(i)),a=fc(o.font),{x:u,y:h,textAlign:p,left:_,top:T,right:O,bottom:L}=r._pointLabelItems[i],{backdropColor:q}=o;if(!xa(q)){let U=xf(o.backdropPadding);t.fillStyle=q,t.fillRect(_-U.left,T-U.top,O-_+U.width,L-T+U.height)}ob(t,r._pointLabels[i],u,h+a.lineHeight/2,a,{color:o.color,textAlign:p,textBaseline:"middle"})}}function Fve(r,e,t,n){let{ctx:i}=r;if(t)i.arc(r.xCenter,r.yCenter,e,0,ks);else{let o=r.getPointPosition(0,e);i.moveTo(o.x,o.y);for(let a=1;a=id.indexOf(t);o--){let a=id[o];if(TP[a].common&&r._adapter.diff(i,n,a)>=e-1)return a}return id[t?id.indexOf(t):0]}function Yyt(r){for(let e=id.indexOf(r)+1,t=id.length;e=e?t[n]:t[i];r[o]=!0}}function Zyt(r,e,t,n){let i=r._adapter,o=+i.startOf(e[0].value,n),a=e[e.length-1].value,u,h;for(u=o;u<=a;u=+i.add(u,1,n))h=t[u],h>=0&&(e[h].major=!0);return e}function gve(r,e,t){let n=[],i={},o=e.length,a,u;for(a=0;a=r[n].pos&&e<=r[i].pos&&({lo:n,hi:i}=_g(r,"pos",e)),{pos:o,time:u}=r[n],{pos:a,time:h}=r[i]):(e>=r[n].time&&e<=r[i].time&&({lo:n,hi:i}=_g(r,"time",e)),{time:o,pos:u}=r[n],{time:a,pos:h}=r[i]);let p=a-o;return p?u+(h-u)*(e-o)/p:u}var IU,Fv,Cge,Xmt,MU,Jmt,Qmt,egt,yP,SU,Pge,fgt,jp,iw,ow,lb,J0,aw,HE,sw,lw,Tgt,WE,WU,Igt,bve,Wf,bP,PU,vP,Bgt,jge,_ve,VE,Uge,LU,Xd,Sve,kP,ivt,Hge,Bv,nw,RU,qv,FU,$ge,Eve,BE,BU,Svt,Tvt,Evt,_P,Ave,Q0,Xge,ab,uw,Uvt,Sg,cw,fw,Yvt,Qvt,wP,gyt,ive,vyt,SP,byt,$E,_yt,pP,wyt,UE,KE,Oyt,Iyt,Myt,Lyt,hw,dw,GE,YE,ex,TP,id,tx,ZE,Xyt,Nve,$U=Pe(()=>{_U();_U();IU=class{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,t,n,i){let o=t.listeners[i],a=t.duration;o.forEach(u=>u({chart:e,initial:t.initial,numSteps:a,currentStep:Math.min(n-t.start,a)}))}_refresh(){this._request||(this._running=!0,this._request=K6.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let t=0;this._charts.forEach((n,i)=>{if(!n.running||!n.items.length)return;let o=n.items,a=o.length-1,u=!1,h;for(;a>=0;--a)h=o[a],h._active?(h._total>n.duration&&(n.duration=h._total),h.tick(e),u=!0):(o[a]=o[o.length-1],o.pop());u&&(i.draw(),this._notify(i,n,e,"progress")),o.length||(n.running=!1,this._notify(i,n,e,"complete"),n.initial=!1),t+=o.length}),this._lastDate=e,t===0&&(this._running=!1)}_getAnims(e){let t=this._charts,n=t.get(e);return n||(n={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},t.set(e,n)),n}listen(e,t,n){this._getAnims(e).listeners[t].push(n)}add(e,t){!t||!t.length||this._getAnims(e).items.push(...t)}has(e){return this._getAnims(e).items.length>0}start(e){let t=this._charts.get(e);!t||(t.running=!0,t.start=Date.now(),t.duration=t.items.reduce((n,i)=>Math.max(n,i._duration),0),this._refresh())}running(e){if(!this._running)return!1;let t=this._charts.get(e);return!(!t||!t.running||!t.items.length)}stop(e){let t=this._charts.get(e);if(!t||!t.items.length)return;let n=t.items,i=n.length-1;for(;i>=0;--i)n[i].cancel();t.items=[],this._notify(e,t,Date.now(),"complete")}remove(e){return this._charts.delete(e)}},Fv=new IU,Cge="transparent",Xmt={boolean(r,e,t){return t>.5?e:r},color(r,e,t){let n=oU(r||Cge),i=n.valid&&oU(e||Cge);return i&&i.valid?i.mix(n,t).hexString():e},number(r,e,t){return r+(e-r)*t}},MU=class{constructor(e,t,n,i){let o=t[n];i=ew([e.to,i,o,e.from]);let a=ew([e.from,o,i]);this._active=!0,this._fn=e.fn||Xmt[e.type||typeof a],this._easing=$1[e.easing]||$1.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=t,this._prop=n,this._from=a,this._to=i,this._promises=void 0}active(){return this._active}update(e,t,n){if(this._active){this._notify(!1);let i=this._target[this._prop],o=n-this._start,a=this._duration-o;this._start=n,this._duration=Math.floor(Math.max(a,e.duration)),this._total+=o,this._loop=!!e.loop,this._to=ew([e.to,t,i,e.from]),this._from=ew([e.from,i,t])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){let t=e-this._start,n=this._duration,i=this._prop,o=this._from,a=this._loop,u=this._to,h;if(this._active=o!==u&&(a||t1?2-h:h,h=this._easing(Math.min(1,Math.max(0,h))),this._target[i]=this._fn(o,u,h)}wait(){let e=this._promises||(this._promises=[]);return new Promise((t,n)=>{e.push({res:t,rej:n})})}_notify(e){let t=e?"res":"rej",n=this._promises||[];for(let i=0;ir!=="onProgress"&&r!=="onComplete"&&r!=="fn"});$o.set("animations",{colors:{type:"color",properties:Qmt},numbers:{type:"number",properties:Jmt}});$o.describe("animations",{_fallback:"animation"});$o.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:r=>r|0}}}});yP=class{constructor(e,t){this._chart=e,this._properties=new Map,this.configure(t)}configure(e){if(!Qo(e))return;let t=this._properties;Object.getOwnPropertyNames(e).forEach(n=>{let i=e[n];if(!Qo(i))return;let o={};for(let a of egt)o[a]=i[a];(Rs(i.properties)&&i.properties||[n]).forEach(a=>{(a===n||!t.has(a))&&t.set(a,o)})})}_animateOptions(e,t){let n=t.options,i=rgt(e,n);if(!i)return[];let o=this._createAnimations(i,n);return n.$shared&&tgt(e.options.$animations,n).then(()=>{e.options=n},()=>{}),o}_createAnimations(e,t){let n=this._properties,i=[],o=e.$animations||(e.$animations={}),a=Object.keys(t),u=Date.now(),h;for(h=a.length-1;h>=0;--h){let p=a[h];if(p.charAt(0)==="$")continue;if(p==="options"){i.push(...this._animateOptions(e,t));continue}let _=t[p],T=o[p],O=n.get(p);if(T)if(O&&T.active()){T.update(O,_,u);continue}else T.cancel();if(!O||!O.duration){e[p]=_;continue}o[p]=T=new MU(O,e,p,_),i.push(T)}return i}update(e,t){if(this._properties.size===0){Object.assign(e,t);return}let n=this._createAnimations(e,t);if(n.length)return Fv.add(this._chart,n),!0}};SU=r=>r==="reset"||r==="none",Pge=(r,e)=>e?r:Object.assign({},r),fgt=(r,e,t)=>r&&!e.hidden&&e._stacked&&{keys:vve(t,!0),values:null},jp=class{constructor(e,t){this.chart=e,this._ctx=e.ctx,this.index=t,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.$context=void 0,this._syncList=[],this.initialize()}initialize(){let e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=Oge(e.vScale,e),this.addElements()}updateIndex(e){this.index!==e&&RE(this._cachedMeta),this.index=e}linkScales(){let e=this.chart,t=this._cachedMeta,n=this.getDataset(),i=(T,O,L,q)=>T==="x"?O:T==="r"?q:L,o=t.xAxisID=ao(n.xAxisID,wU(e,"x")),a=t.yAxisID=ao(n.yAxisID,wU(e,"y")),u=t.rAxisID=ao(n.rAxisID,wU(e,"r")),h=t.indexAxis,p=t.iAxisID=i(h,o,a,u),_=t.vAxisID=i(h,a,o,u);t.xScale=this.getScaleForId(o),t.yScale=this.getScaleForId(a),t.rScale=this.getScaleForId(u),t.iScale=this.getScaleForId(p),t.vScale=this.getScaleForId(_)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){let t=this._cachedMeta;return e===t.iScale?t.vScale:t.iScale}reset(){this._update("reset")}_destroy(){let e=this._cachedMeta;this._data&&lU(this._data,this),e._stacked&&RE(e)}_dataCheck(){let e=this.getDataset(),t=e.data||(e.data=[]),n=this._data;if(Qo(t))this._data=ogt(t);else if(n!==t){if(n){lU(n,this);let i=this._cachedMeta;RE(i),i._parsed=[]}t&&Object.isExtensible(t)&&mge(t,this),this._syncList=[],this._data=t}}addElements(){let e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){let t=this._cachedMeta,n=this.getDataset(),i=!1;this._dataCheck();let o=t._stacked;t._stacked=Oge(t.vScale,t),t.stack!==n.stack&&(i=!0,RE(t),t.stack=n.stack),this._resyncElements(e),(i||o!==t._stacked)&&Mge(this,t._parsed)}configure(){let e=this.chart.config,t=e.datasetScopeKeys(this._type),n=e.getOptionScopes(this.getDataset(),t,!0);this.options=e.createResolver(n,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,t){let{_cachedMeta:n,_data:i}=this,{iScale:o,_stacked:a}=n,u=o.axis,h=e===0&&t===i.length?!0:n._sorted,p=e>0&&n._parsed[e-1],_,T,O;if(this._parsing===!1)n._parsed=i,n._sorted=!0,O=i;else{Rs(i[e])?O=this.parseArrayData(n,i,e,t):Qo(i[e])?O=this.parseObjectData(n,i,e,t):O=this.parsePrimitiveData(n,i,e,t);let L=()=>T[u]===null||p&&T[u]U||T=0;--O)if(!q()){this.updateRangeFromParsed(p,e,L,h);break}}return p}getAllParsedValues(e){let t=this._cachedMeta._parsed,n=[],i,o,a;for(i=0,o=t.length;i=0&&ethis.getContext(n,i),U=p.resolveNamedOptions(O,L,q,T);return U.$shared&&(U.$shared=h,o[a]=Object.freeze(Pge(U,h))),U}_resolveAnimations(e,t,n){let i=this.chart,o=this._cachedDataOpts,a=`animation-${t}`,u=o[a];if(u)return u;let h;if(i.options.animation!==!1){let _=this.chart.config,T=_.datasetAnimationScopeKeys(this._type,t),O=_.getOptionScopes(this.getDataset(),T);h=_.createResolver(O,this.getContext(e,n,t))}let p=new yP(i,h&&h.animations);return h&&h._cacheable&&(o[a]=Object.freeze(p)),p}getSharedOptions(e){if(!!e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,t){return!t||SU(e)||this.chart._animationsDisabled}updateElement(e,t,n,i){SU(i)?Object.assign(e,n):this._resolveAnimations(t,i).update(e,n)}updateSharedOptions(e,t,n){e&&!SU(t)&&this._resolveAnimations(void 0,t).update(e,n)}_setStyle(e,t,n,i){e.active=i;let o=this.getStyle(t,i);this._resolveAnimations(t,n,i).update(e,{options:!i&&this.getSharedOptions(o)||o})}removeHoverStyle(e,t,n){this._setStyle(e,n,"active",!1)}setHoverStyle(e,t,n){this._setStyle(e,n,"active",!0)}_removeDatasetHoverStyle(){let e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){let e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){let t=this._data,n=this._cachedMeta.data;for(let[u,h,p]of this._syncList)this[u](h,p);this._syncList=[];let i=n.length,o=t.length,a=Math.min(o,i);a&&this.parse(0,a),o>i?this._insertElements(i,o-i,e):o{for(p.length+=t,u=p.length-1;u>=a;u--)p[u]=p[u-t]};for(h(o),u=e;u=0;--n)t=Math.max(t,e[n].size(this.resolveDataElementOptions(n))/2);return t>0&&t}getLabelAndValue(e){let t=this._cachedMeta,{xScale:n,yScale:i}=t,o=this.getParsed(e),a=n.getLabelForValue(o.x),u=i.getLabelForValue(o.y),h=o._custom;return{label:t.label,value:"("+a+", "+u+(h?", "+h:"")+")"}}update(e){let t=this._cachedMeta.data;this.updateElements(t,0,t.length,e)}updateElements(e,t,n,i){let o=i==="reset",{iScale:a,vScale:u}=this._cachedMeta,h=this.resolveDataElementOptions(t,i),p=this.getSharedOptions(h),_=this.includeOptions(i,p),T=a.axis,O=u.axis;for(let L=t;L+n[h];if(Qo(n[e])){let{key:h="value"}=this._parsing;o=p=>+rb(n[p],h)}let a,u;for(a=e,u=e+t;a0&&!isNaN(e)?ks*(Math.abs(e)/t):0}getLabelAndValue(e){let t=this._cachedMeta,n=this.chart,i=n.data.labels||[],o=tw(t._parsed[e],n.options.locale);return{label:i[e]||"",value:o}}getMaxBorderWidth(e){let t=0,n=this.chart,i,o,a,u,h;if(!e){for(i=0,o=n.data.datasets.length;ir!=="spacing",_indexable:r=>r!=="spacing"};lb.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(r){let e=r.data;if(e.labels.length&&e.datasets.length){let{labels:{pointStyle:t}}=r.legend.options;return e.labels.map((n,i)=>{let a=r.getDatasetMeta(0).controller.getStyle(i);return{text:n,fillStyle:a.backgroundColor,strokeStyle:a.borderColor,lineWidth:a.borderWidth,pointStyle:t,hidden:!r.getDataVisibility(i),index:i}})}return[]}},onClick(r,e,t){t.chart.toggleDataVisibility(e.index),t.chart.update()}},tooltip:{callbacks:{title(){return""},label(r){let e=r.label,t=": "+r.formattedValue;return Rs(e)?(e=e.slice(),e[0]+=t):e+=t,e}}}}};J0=class extends jp{initialize(){this.enableOptionSharing=!0,super.initialize()}update(e){let t=this._cachedMeta,{dataset:n,data:i=[],_dataset:o}=t,a=this.chart._animationsDisabled,{start:u,count:h}=Sgt(t,i,a);this._drawStart=u,this._drawCount=h,kgt(t)&&(u=0,h=i.length),n._chart=this.chart,n._datasetIndex=this.index,n._decimated=!!o._decimated,n.points=i;let p=this.resolveDatasetElementOptions(e);this.options.showLine||(p.borderWidth=0),p.segment=this.options.segment,this.updateElement(n,void 0,{animated:!a,options:p},e),this.updateElements(i,u,h,e)}updateElements(e,t,n,i){let o=i==="reset",{iScale:a,vScale:u,_stacked:h,_dataset:p}=this._cachedMeta,_=this.resolveDataElementOptions(t,i),T=this.getSharedOptions(_),O=this.includeOptions(i,T),L=a.axis,q=u.axis,{spanGaps:U,segment:Z}=this.options,te=X1(U)?U:Number.POSITIVE_INFINITY,ie=this.chart._animationsDisabled||o||i==="none",ue=t>0&&this.getParsed(t-1);for(let S=t;S0&&le[L]-ue[L]>te,Z&&(ge.parsed=le,ge.raw=p.data[S]),O&&(ge.options=T||this.resolveDataElementOptions(S,ve.active?"active":i)),ie||this.updateElement(ve,S,ge,i),ue=le}this.updateSharedOptions(T,i,_)}getMaxOverflow(){let e=this._cachedMeta,t=e.dataset,n=t.options&&t.options.borderWidth||0,i=e.data||[];if(!i.length)return n;let o=i[0].size(this.resolveDataElementOptions(0)),a=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(n,o,a)/2}draw(){let e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}};J0.id="line";J0.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};J0.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};aw=class extends jp{constructor(e,t){super(e,t),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(e){let t=this._cachedMeta,n=this.chart,i=n.data.labels||[],o=tw(t._parsed[e].r,n.options.locale);return{label:i[e]||"",value:o}}update(e){let t=this._cachedMeta.data;this._updateRadius(),this.updateElements(t,0,t.length,e)}_updateRadius(){let e=this.chart,t=e.chartArea,n=e.options,i=Math.min(t.right-t.left,t.bottom-t.top),o=Math.max(i/2,0),a=Math.max(n.cutoutPercentage?o/100*n.cutoutPercentage:1,0),u=(o-a)/e.getVisibleDatasetCount();this.outerRadius=o-u*this.index,this.innerRadius=this.outerRadius-u}updateElements(e,t,n,i){let o=i==="reset",a=this.chart,u=this.getDataset(),p=a.options.animation,_=this._cachedMeta.rScale,T=_.xCenter,O=_.yCenter,L=_.getIndexAngle(0)-.5*il,q=L,U,Z=360/this.countVisibleElements();for(U=0;U{!isNaN(e.data[o])&&this.chart.getDataVisibility(o)&&n++}),n}_computeAngle(e,t,n){return this.chart.getDataVisibility(e)?zp(this.resolveDataElementOptions(e,t).angle||n):0}};aw.id="polarArea";aw.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};aw.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(r){let e=r.data;if(e.labels.length&&e.datasets.length){let{labels:{pointStyle:t}}=r.legend.options;return e.labels.map((n,i)=>{let a=r.getDatasetMeta(0).controller.getStyle(i);return{text:n,fillStyle:a.backgroundColor,strokeStyle:a.borderColor,lineWidth:a.borderWidth,pointStyle:t,hidden:!r.getDataVisibility(i),index:i}})}return[]}},onClick(r,e,t){t.chart.toggleDataVisibility(e.index),t.chart.update()}},tooltip:{callbacks:{title(){return""},label(r){return r.chart.data.labels[r.dataIndex]+": "+r.formattedValue}}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};HE=class extends lb{};HE.id="pie";HE.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};sw=class extends jp{getLabelAndValue(e){let t=this._cachedMeta.vScale,n=this.getParsed(e);return{label:t.getLabels()[e],value:""+t.getLabelForValue(n[t.axis])}}update(e){let t=this._cachedMeta,n=t.dataset,i=t.data||[],o=t.iScale.getLabels();if(n.points=i,e!=="resize"){let a=this.resolveDatasetElementOptions(e);this.options.showLine||(a.borderWidth=0);let u={_loop:!0,_fullLoop:o.length===i.length,options:a};this.updateElement(n,void 0,u,e)}this.updateElements(i,0,i.length,e)}updateElements(e,t,n,i){let o=this.getDataset(),a=this._cachedMeta.rScale,u=i==="reset";for(let h=t;h{let p=a[0].index,_=h.data[p];_&&!_.skip&&u.push({element:_,datasetIndex:h.index,index:p})}),u):[]},dataset(r,e,t,n){let i=zE(e,r),o=t.axis||"xy",a=t.intersect?TU(r,i,o,n):EU(r,i,o,!1,n);if(a.length>0){let u=a[0].datasetIndex,h=r.getDatasetMeta(u).data;a=[];for(let p=0;p{typeof U.beforeLayout=="function"&&U.beforeLayout()});let _=h.reduce((U,Z)=>Z.box.options&&Z.box.options.display===!1?U:U+1,0)||1,T=Object.freeze({outerWidth:e,outerHeight:t,padding:i,availableWidth:o,availableHeight:a,vBoxMaxWidth:o/2/_,hBoxMaxHeight:a/2}),O=Object.assign({},i);xve(O,xf(n));let L=Object.assign({maxPadding:O,w:o,h:a,x:i.left,y:i.top},i),q=Lgt(h.concat(p),T);jE(u.fullSize,L,T,q),jE(h,L,T,q),jE(p,L,T,q)&&jE(h,L,T,q),Ngt(L),zge(u.leftAndTop,L,T,q),L.x+=L.w,L.y+=L.h,zge(u.rightAndBottom,L,T,q),r.chartArea={left:L.left,top:L.top,right:L.left+L.w,bottom:L.top+L.h,height:L.h,width:L.w},Za(u.chartArea,U=>{let Z=U.box;Object.assign(Z,r.chartArea),Z.update(L.w,L.h,{left:0,top:0,right:0,bottom:0})})}},bP=class{acquireContext(e,t){}releaseContext(e){return!1}addEventListener(e,t,n){}removeEventListener(e,t,n){}getDevicePixelRatio(){return 1}getMaximumSize(e,t,n,i){return t=Math.max(0,t||e.width),n=n||e.height,{width:t,height:Math.max(0,i?Math.floor(t/i):n)}}isAttached(e){return!0}updateConfig(e){}},PU=class extends bP{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}},vP="$chartjs",Bgt={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},jge=r=>r===null||r==="";_ve=wge?{passive:!0}:!1;VE=new Map,Uge=0;LU=class extends bP{acquireContext(e,t){let n=e&&e.getContext&&e.getContext("2d");return n&&n.canvas===e?(zgt(e,t),n):null}releaseContext(e){let t=e.canvas;if(!t[vP])return!1;let n=t[vP].initial;["height","width"].forEach(o=>{let a=n[o];xa(a)?t.removeAttribute(o):t.setAttribute(o,a)});let i=n.style||{};return Object.keys(i).forEach(o=>{t.style[o]=i[o]}),t.width=t.width,delete t[vP],!0}addEventListener(e,t,n){this.removeEventListener(e,t);let i=e.$proxies||(e.$proxies={}),a={attach:Wgt,detach:Vgt,resize:Ggt}[t]||Ygt;i[t]=a(e,t,n)}removeEventListener(e,t){let n=e.$proxies||(e.$proxies={}),i=n[t];if(!i)return;({attach:CU,detach:CU,resize:CU}[t]||Ugt)(e,t,i),n[t]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,t,n,i){return _ge(e,t,n,i)}isAttached(e){let t=uP(e);return!!(t&&t.isConnected)}};Xd=class{constructor(){this.x=void 0,this.y=void 0,this.active=!1,this.options=void 0,this.$animations=void 0}tooltipPosition(e){let{x:t,y:n}=this.getProps(["x","y"],e);return{x:t,y:n}}hasValue(){return X1(this.x)&&X1(this.y)}getProps(e,t){let n=this.$animations;if(!t||!n)return this;let i={};return e.forEach(o=>{i[o]=n[o]&&n[o].active()?n[o]._to:this[o]}),i}};Xd.defaults={};Xd.defaultRoutes=void 0;Sve={values(r){return Rs(r)?r:""+r},numeric(r,e,t){if(r===0)return"0";let n=this.chart.options.locale,i,o=r;if(t.length>1){let p=Math.max(Math.abs(t[0].value),Math.abs(t[t.length-1].value));(p<1e-4||p>1e15)&&(i="scientific"),o=Xgt(r,t)}let a=Zd(Math.abs(o)),u=Math.max(Math.min(-1*Math.floor(a),20),0),h={notation:i,minimumFractionDigits:u,maximumFractionDigits:u};return Object.assign(h,this.options.ticks.format),tw(r,n,h)},logarithmic(r,e,t){if(r===0)return"0";let n=r/Math.pow(10,Math.floor(Zd(r)));return n===1||n===2||n===5?Sve.numeric.call(this,r,e,t):""}};kP={formatters:Sve};$o.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(r,e)=>e.lineWidth,tickColor:(r,e)=>e.color,offset:!1,borderDash:[],borderDashOffset:0,borderWidth:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:kP.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}});$o.route("scale.ticks","color","","color");$o.route("scale.grid","color","","borderColor");$o.route("scale.grid","borderColor","","borderColor");$o.route("scale.title","color","","color");$o.describe("scale",{_fallback:!1,_scriptable:r=>!r.startsWith("before")&&!r.startsWith("after")&&r!=="callback"&&r!=="parser",_indexable:r=>r!=="borderDash"&&r!=="tickBorderDash"});$o.describe("scales",{_fallback:"scale"});$o.describe("scale.ticks",{_scriptable:r=>r!=="backdropPadding"&&r!=="callback",_indexable:r=>r!=="backdropPadding"});ivt=r=>r==="left"?"right":r==="right"?"left":r,Hge=(r,e,t)=>e==="top"||e==="left"?r[e]+t:r[e]-t;Bv=class extends Xd{constructor(e){super(),this.id=e.id,this.type=e.type,this.options=void 0,this.ctx=e.ctx,this.chart=e.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(e){this.options=e.setContext(this.getContext()),this.axis=e.axis,this._userMin=this.parse(e.min),this._userMax=this.parse(e.max),this._suggestedMin=this.parse(e.suggestedMin),this._suggestedMax=this.parse(e.suggestedMax)}parse(e,t){return e}getUserBounds(){let{_userMin:e,_userMax:t,_suggestedMin:n,_suggestedMax:i}=this;return e=Yd(e,Number.POSITIVE_INFINITY),t=Yd(t,Number.NEGATIVE_INFINITY),n=Yd(n,Number.POSITIVE_INFINITY),i=Yd(i,Number.NEGATIVE_INFINITY),{min:Yd(e,n),max:Yd(t,i),minDefined:vu(e),maxDefined:vu(t)}}getMinMax(e){let{min:t,max:n,minDefined:i,maxDefined:o}=this.getUserBounds(),a;if(i&&o)return{min:t,max:n};let u=this.getMatchingVisibleMetas();for(let h=0,p=u.length;hn?n:t,n=i&&t>n?t:n,{min:Yd(t,Yd(n,t)),max:Yd(n,Yd(t,n))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){let e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Fs(this.options.beforeUpdate,[this])}update(e,t,n){let{beginAtZero:i,grace:o,ticks:a}=this.options,u=a.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=t,this._margins=n=Object.assign({left:0,right:0,top:0,bottom:0},n),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+n.left+n.right:this.height+n.top+n.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=fge(this,o,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();let h=u=o||n<=1||!this.isHorizontal()){this.labelRotation=i;return}let _=this._getLabelSizes(),T=_.widest.width,O=_.highest.height,L=Fc(this.chart.width-T,0,this.maxWidth);u=e.offset?this.maxWidth/n:L/(n-1),T+6>u&&(u=L/(n-(e.offset?.5:1)),h=this.maxHeight-qE(e.grid)-t.padding-Vge(e.title,this.chart.options.font),p=Math.sqrt(T*T+O*O),a=nP(Math.min(Math.asin(Fc((_.highest.height+6)/u,-1,1)),Math.asin(Fc(h/p,-1,1))-Math.asin(Fc(O/p,-1,1)))),a=Math.max(i,Math.min(o,a))),this.labelRotation=a}afterCalculateLabelRotation(){Fs(this.options.afterCalculateLabelRotation,[this])}beforeFit(){Fs(this.options.beforeFit,[this])}fit(){let e={width:0,height:0},{chart:t,options:{ticks:n,title:i,grid:o}}=this,a=this._isVisible(),u=this.isHorizontal();if(a){let h=Vge(i,t.options.font);if(u?(e.width=this.maxWidth,e.height=qE(o)+h):(e.height=this.maxHeight,e.width=qE(o)+h),n.display&&this.ticks.length){let{first:p,last:_,widest:T,highest:O}=this._getLabelSizes(),L=n.padding*2,q=zp(this.labelRotation),U=Math.cos(q),Z=Math.sin(q);if(u){let te=n.mirror?0:Z*T.width+U*O.height;e.height=Math.min(this.maxHeight,e.height+te+L)}else{let te=n.mirror?0:U*T.width+Z*O.height;e.width=Math.min(this.maxWidth,e.width+te+L)}this._calculatePadding(p,_,Z,U)}}this._handleMargins(),u?(this.width=this._length=t.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=t.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,t,n,i){let{ticks:{align:o,padding:a},position:u}=this.options,h=this.labelRotation!==0,p=u!=="top"&&this.axis==="x";if(this.isHorizontal()){let _=this.getPixelForTick(0)-this.left,T=this.right-this.getPixelForTick(this.ticks.length-1),O=0,L=0;h?p?(O=i*e.width,L=n*t.height):(O=n*e.height,L=i*t.width):o==="start"?L=t.width:o==="end"?O=e.width:(O=e.width/2,L=t.width/2),this.paddingLeft=Math.max((O-_+a)*this.width/(this.width-_),0),this.paddingRight=Math.max((L-T+a)*this.width/(this.width-T),0)}else{let _=t.height/2,T=e.height/2;o==="start"?(_=0,T=e.height):o==="end"&&(_=t.height,T=0),this.paddingTop=_+a,this.paddingBottom=T+a}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){Fs(this.options.afterFit,[this])}isHorizontal(){let{axis:e,position:t}=this.options;return t==="top"||t==="bottom"||e==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let t,n;for(t=0,n=e.length;t({width:o[ge]||0,height:a[ge]||0});return{first:le(0),last:le(t-1),widest:le(S),highest:le(ve),widths:o,heights:a}}getLabelForValue(e){return e}getPixelForValue(e,t){return NaN}getValueForPixel(e){}getPixelForTick(e){let t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);let t=this._startPixel+e*this._length;return rge(this._alignToPixels?ib(this.chart,t,0):t)}getDecimalForPixel(e){let t=(e-this._startPixel)/this._length;return this._reversePixels?1-t:t}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){let{min:e,max:t}=this;return e<0&&t<0?t:e>0&&t>0?e:0}getContext(e){let t=this.ticks||[];if(e>=0&&eu*i?u/n:h/i:h*i0}_computeGridLineItems(e){let t=this.axis,n=this.chart,i=this.options,{grid:o,position:a}=i,u=o.offset,h=this.isHorizontal(),_=this.ticks.length+(u?1:0),T=qE(o),O=[],L=o.setContext(this.getContext()),q=L.drawBorder?L.borderWidth:0,U=q/2,Z=function($){return ib(n,$,q)},te,ie,ue,S,ve,le,ge,Se,ye,be,Ue,B;if(a==="top")te=Z(this.bottom),le=this.bottom-T,Se=te-U,be=Z(e.top)+U,B=e.bottom;else if(a==="bottom")te=Z(this.top),be=e.top,B=Z(e.bottom)-U,le=te+U,Se=this.top+T;else if(a==="left")te=Z(this.right),ve=this.right-T,ge=te-U,ye=Z(e.left)+U,Ue=e.right;else if(a==="right")te=Z(this.left),ye=e.left,Ue=Z(e.right)-U,ve=te+U,ge=this.left+T;else if(t==="x"){if(a==="center")te=Z((e.top+e.bottom)/2+.5);else if(Qo(a)){let $=Object.keys(a)[0],V=a[$];te=Z(this.chart.scales[$].getPixelForValue(V))}be=e.top,B=e.bottom,le=te+U,Se=le+T}else if(t==="y"){if(a==="center")te=Z((e.left+e.right)/2);else if(Qo(a)){let $=Object.keys(a)[0],V=a[$];te=Z(this.chart.scales[$].getPixelForValue(V))}ve=te-U,ge=ve-T,ye=e.left,Ue=e.right}let re=ao(i.ticks.maxTicksLimit,_),N=Math.max(1,Math.ceil(_/re));for(ie=0;ie<_;ie+=N){let $=o.setContext(this.getContext(ie)),V=$.lineWidth,H=$.color,X=o.borderDash||[],me=$.borderDashOffset,G=$.tickWidth,j=$.tickColor,Me=$.tickBorderDash||[],Ze=$.tickBorderDashOffset;ue=ovt(this,ie,u),ue!==void 0&&(S=ib(n,ue,V),h?ve=ge=ye=Ue=S:le=Se=be=B=S,O.push({tx1:ve,ty1:le,tx2:ge,ty2:Se,x1:ye,y1:be,x2:Ue,y2:B,width:V,color:H,borderDash:X,borderDashOffset:me,tickWidth:G,tickColor:j,tickBorderDash:Me,tickBorderDashOffset:Ze}))}return this._ticksLength=_,this._borderValue=te,O}_computeLabelItems(e){let t=this.axis,n=this.options,{position:i,ticks:o}=n,a=this.isHorizontal(),u=this.ticks,{align:h,crossAlign:p,padding:_,mirror:T}=o,O=qE(n.grid),L=O+_,q=T?-_:L,U=-zp(this.labelRotation),Z=[],te,ie,ue,S,ve,le,ge,Se,ye,be,Ue,B,re="middle";if(i==="top")le=this.bottom-q,ge=this._getXAxisLabelAlignment();else if(i==="bottom")le=this.top+q,ge=this._getXAxisLabelAlignment();else if(i==="left"){let $=this._getYAxisLabelAlignment(O);ge=$.textAlign,ve=$.x}else if(i==="right"){let $=this._getYAxisLabelAlignment(O);ge=$.textAlign,ve=$.x}else if(t==="x"){if(i==="center")le=(e.top+e.bottom)/2+L;else if(Qo(i)){let $=Object.keys(i)[0],V=i[$];le=this.chart.scales[$].getPixelForValue(V)+L}ge=this._getXAxisLabelAlignment()}else if(t==="y"){if(i==="center")ve=(e.left+e.right)/2-L;else if(Qo(i)){let $=Object.keys(i)[0],V=i[$];ve=this.chart.scales[$].getPixelForValue(V)}ge=this._getYAxisLabelAlignment(O).textAlign}t==="y"&&(h==="start"?re="top":h==="end"&&(re="bottom"));let N=this._getLabelSizes();for(te=0,ie=u.length;teo.value===e);return i>=0?t.setContext(this.getContext(i)).lineWidth:0}drawGrid(e){let t=this.options.grid,n=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e)),o,a,u=(h,p,_)=>{!_.width||!_.color||(n.save(),n.lineWidth=_.width,n.strokeStyle=_.color,n.setLineDash(_.borderDash||[]),n.lineDashOffset=_.borderDashOffset,n.beginPath(),n.moveTo(h.x,h.y),n.lineTo(p.x,p.y),n.stroke(),n.restore())};if(t.display)for(o=0,a=i.length;o{this.draw(i)}}]:[{z:n,draw:i=>{this.drawBackground(),this.drawGrid(i),this.drawTitle()}},{z:n+1,draw:()=>{this.drawBorder()}},{z:t,draw:i=>{this.drawLabels(i)}}]}getMatchingVisibleMetas(e){let t=this.chart.getSortedVisibleDatasetMetas(),n=this.axis+"AxisID",i=[],o,a;for(o=0,a=t.length;o{let o=n||this._getRegistryForType(i);n||o.isForType(i)||o===this.plugins&&i.id?this._exec(e,o,i):Za(i,a=>{let u=n||this._getRegistryForType(a);this._exec(e,u,a)})})}_exec(e,t,n){let i=rP(e);Fs(n["before"+i],[],n),t[e](n),Fs(n["after"+i],[],n)}_getRegistryForType(e){for(let t=0;to.filter(u=>!a.some(h=>u.plugin.id===h.plugin.id));this._notify(i(t,n),e,"stop"),this._notify(i(n,t),e,"start")}};$ge=new Map,Eve=new Set;BE=(r,e,t)=>{let n=rb(e,t);n!==void 0&&r.add(n)},BU=class{constructor(e){this._config=wvt(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=Tve(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){let e=this._config;this.clearCache(),kve(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return dP(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,t){return dP(`${e}.transition.${t}`,()=>[[`datasets.${e}.transitions.${t}`,`transitions.${t}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,t){return dP(`${e}-${t}`,()=>[[`datasets.${e}.elements.${t}`,`datasets.${e}`,`elements.${t}`,""]])}pluginScopeKeys(e){let t=e.id,n=this.type;return dP(`${n}-plugin-${t}`,()=>[[`plugins.${t}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,t){let n=this._scopeCache,i=n.get(e);return(!i||t)&&(i=new Map,n.set(e,i)),i}getOptionScopes(e,t,n){let{options:i,type:o}=this,a=this._cachedScopes(e,n),u=a.get(t);if(u)return u;let h=new Set;t.forEach(_=>{e&&(h.add(e),_.forEach(T=>BE(h,e,T))),_.forEach(T=>BE(h,i,T)),_.forEach(T=>BE(h,nb[o]||{},T)),_.forEach(T=>BE(h,$o,T)),_.forEach(T=>BE(h,oP,T))});let p=Array.from(h);return p.length===0&&p.push(Object.create(null)),Eve.has(t)&&a.set(t,p),p}chartOptionScopes(){let{options:e,type:t}=this;return[e,nb[t]||{},$o.datasets[t]||{},{type:t},$o,oP]}resolveNamedOptions(e,t,n,i=[""]){let o={$shared:!0},{resolver:a,subPrefixes:u}=Kge(this._resolverCache,e,i),h=a;if(kvt(a,t)){o.$shared=!1,n=Lv(n)?n():n;let p=this.createResolver(e,n,u);h=G0(a,n,p)}for(let p of t)o[p]=h[p];return o}createResolver(e,t,n=[""],i){let{resolver:o}=Kge(this._resolverCache,e,n);return Qo(t)?G0(o,t,void 0,i):o}};Svt=r=>Qo(r)&&Object.getOwnPropertyNames(r).reduce((e,t)=>e||Lv(r[t]),!1);Tvt="3.7.0",Evt=["top","bottom","left","right","chartArea"];_P={},Ave=r=>{let e=Cve(r);return Object.values(_P).filter(t=>t.canvas===e).pop()};Q0=class{constructor(e,t){let n=this.config=new BU(t),i=Cve(e),o=Ave(i);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas can be reused.");let a=n.createResolver(n.chartOptionScopes(),this.getContext());this.platform=new(n.platform||Zgt(i)),this.platform.updateConfig(n);let u=this.platform.acquireContext(i,a.aspectRatio),h=u&&u.canvas,p=h&&h.height,_=h&&h.width;if(this.id=Zme(),this.ctx=u,this.canvas=h,this.width=_,this.height=p,this._options=a,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new FU,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Gme(T=>this.update(T),a.resizeDelay||0),this._dataChanges=[],_P[this.id]=this,!u||!h){console.error("Failed to create chart: can't acquire context from the given item");return}Fv.listen(this,"complete",Zge),Fv.listen(this,"progress",Cvt),this._initialize(),this.attached&&this.update()}get aspectRatio(){let{options:{aspectRatio:e,maintainAspectRatio:t},width:n,height:i,_aspectRatio:o}=this;return xa(e)?t&&o?o:i?n/i:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():mU(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return aU(this.canvas,this.ctx),this}stop(){return Fv.stop(this),this}resize(e,t){Fv.running(this)?this._resizeBeforeDraw={width:e,height:t}:this._resize(e,t)}_resize(e,t){let n=this.options,i=this.canvas,o=n.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(i,e,t,o),u=n.devicePixelRatio||this.platform.getDevicePixelRatio(),h=this.width?"resize":"attach";this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,mU(this,u,!0)&&(this.notifyPlugins("resize",{size:a}),Fs(n.onResize,[this,a],this),this.attached&&this._doResize(h)&&this.render())}ensureScalesHaveIDs(){let t=this.options.scales||{};Za(t,(n,i)=>{n.id=i})}buildOrUpdateScales(){let e=this.options,t=e.scales,n=this.scales,i=Object.keys(n).reduce((a,u)=>(a[u]=!1,a),{}),o=[];t&&(o=o.concat(Object.keys(t).map(a=>{let u=t[a],h=qU(a,u),p=h==="r",_=h==="x";return{options:u,dposition:p?"chartArea":_?"bottom":"left",dtype:p?"radialLinear":_?"category":"linear"}}))),Za(o,a=>{let u=a.options,h=u.id,p=qU(h,u),_=ao(u.type,a.dtype);(u.position===void 0||Gge(u.position,p)!==Gge(a.dposition))&&(u.position=a.dposition),i[h]=!0;let T=null;if(h in n&&n[h].type===_)T=n[h];else{let O=qv.getScale(_);T=new O({id:h,type:_,ctx:this.ctx,chart:this}),n[T.id]=T}T.init(u,e)}),Za(i,(a,u)=>{a||delete n[u]}),Za(n,a=>{Wf.configure(this,a,a.options),Wf.addBox(this,a)})}_updateMetasets(){let e=this._metasets,t=this.data.datasets.length,n=e.length;if(e.sort((i,o)=>i.index-o.index),n>t){for(let i=t;it.length&&delete this._stacks,e.forEach((n,i)=>{t.filter(o=>o===n._dataset).length===0&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){let e=[],t=this.data.datasets,n,i;for(this._removeUnreferencedMetasets(),n=0,i=t.length;n{this.getDatasetMeta(t).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){let t=this.config;t.update();let n=this._options=t.createResolver(t.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!n.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;let o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let a=0;for(let p=0,_=this.data.datasets.length;p<_;p++){let{controller:T}=this.getDatasetMeta(p),O=!i&&o.indexOf(T)===-1;T.buildOrUpdateElements(O),a=Math.max(+T.getMaxOverflow(),a)}a=this._minPadding=n.layout.autoPadding?a:0,this._updateLayout(a),i||Za(o,p=>{p.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(Yge("z","_idx"));let{_active:u,_lastEvent:h}=this;h?this._eventHandler(h,!0):u.length&&this._updateHoverStyles(u,u,!0),this.render()}_updateScales(){Za(this.scales,e=>{Wf.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){let e=this.options,t=new Set(Object.keys(this._listeners)),n=new Set(e.events);(!Z6(t,n)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){let{_hiddenIndices:e}=this,t=this._getUniformDataChanges()||[];for(let{method:n,start:i,count:o}of t){let a=n==="_removeElements"?-o:o;Avt(e,i,a)}}_getUniformDataChanges(){let e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];let t=this.data.datasets.length,n=o=>new Set(e.filter(a=>a[0]===o).map((a,u)=>u+","+a.splice(1).join(","))),i=n(0);for(let o=1;oo.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Wf.update(this,this.width,this.height,e);let t=this.chartArea,n=t.width<=0||t.height<=0;this._layers=[],Za(this.boxes,i=>{n&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,o)=>{i._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})!==!1){for(let t=0,n=this.data.datasets.length;t=0;--t)this._drawDataset(e[t]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){let t=this.ctx,n=e._clip,i=!n.disabled,o=this.chartArea,a={meta:e,index:e.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",a)!==!1&&(i&&ME(t,{left:n.left===!1?0:o.left-n.left,right:n.right===!1?this.width:o.right+n.right,top:n.top===!1?0:o.top-n.top,bottom:n.bottom===!1?this.height:o.bottom+n.bottom}),e.controller.draw(),i&&PE(t),a.cancelable=!1,this.notifyPlugins("afterDatasetDraw",a))}getElementsAtEventForMode(e,t,n,i){let o=Igt.modes[t];return typeof o=="function"?o(this,e,n,i):[]}getDatasetMeta(e){let t=this.data.datasets[e],n=this._metasets,i=n.filter(o=>o&&o._dataset===t).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:t&&t.order||0,index:e,_dataset:t,_parsed:[],_sorted:!1},n.push(i)),i}getContext(){return this.$context||(this.$context=Rv(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){let t=this.data.datasets[e];if(!t)return!1;let n=this.getDatasetMeta(e);return typeof n.hidden=="boolean"?!n.hidden:!t.hidden}setDatasetVisibility(e,t){let n=this.getDatasetMeta(e);n.hidden=!t}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,t,n){let i=n?"show":"hide",o=this.getDatasetMeta(e),a=o.controller._resolveAnimations(void 0,i);Gd(t)?(o.data[t].hidden=!n,this.update()):(this.setDatasetVisibility(e,n),a.update(o,{visible:n}),this.update(u=>u.datasetIndex===e?i:void 0))}hide(e,t){this._updateVisibility(e,t,!1)}show(e,t){this._updateVisibility(e,t,!0)}_destroyDatasetMeta(e){let t=this._metasets[e];t&&t.controller&&t.controller._destroy(),delete this._metasets[e]}_stop(){let e,t;for(this.stop(),Fv.remove(this),e=0,t=this.data.datasets.length;e{t.addEventListener(this,o,a),e[o]=a},i=(o,a,u)=>{o.offsetX=a,o.offsetY=u,this._eventHandler(o)};Za(this.options.events,o=>n(o,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});let e=this._responsiveListeners,t=this.platform,n=(h,p)=>{t.addEventListener(this,h,p),e[h]=p},i=(h,p)=>{e[h]&&(t.removeEventListener(this,h,p),delete e[h])},o=(h,p)=>{this.canvas&&this.resize(h,p)},a,u=()=>{i("attach",u),this.attached=!0,this.resize(),n("resize",o),n("detach",a)};a=()=>{this.attached=!1,i("resize",o),this._stop(),this._resize(0,0),n("attach",u)},t.isAttached(this.canvas)?u():a()}unbindEvents(){Za(this._listeners,(e,t)=>{this.platform.removeEventListener(this,t,e)}),this._listeners={},Za(this._responsiveListeners,(e,t)=>{this.platform.removeEventListener(this,t,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,t,n){let i=n?"set":"remove",o,a,u,h;for(t==="dataset"&&(o=this.getDatasetMeta(e[0].datasetIndex),o.controller["_"+i+"DatasetHoverStyle"]()),u=0,h=e.length;u{let u=this.getDatasetMeta(o);if(!u)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:u.data[a],index:a}});!DE(n,t)&&(this._active=n,this._lastEvent=null,this._updateHoverStyles(n,t))}notifyPlugins(e,t,n){return this._plugins.notify(this,e,t,n)}_updateHoverStyles(e,t,n){let i=this.options.hover,o=(h,p)=>h.filter(_=>!p.some(T=>_.datasetIndex===T.datasetIndex&&_.index===T.index)),a=o(t,e),u=n?e:o(e,t);a.length&&this.updateHoverStyle(a,i.mode,!1),u.length&&i.mode&&this.updateHoverStyle(u,i.mode,!0)}_eventHandler(e,t){let n={event:e,replay:t,cancelable:!0,inChartArea:tb(e,this.chartArea,this._minPadding)},i=a=>(a.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",n,i)===!1)return;let o=this._handleEvent(e,t,n.inChartArea);return n.cancelable=!1,this.notifyPlugins("afterEvent",n,i),(o||n.changed)&&this.render(),this}_handleEvent(e,t,n){let{_active:i=[],options:o}=this,a=t,u=this._getActiveElements(e,i,n,a),h=Qme(e),p=Dvt(e,this._lastEvent,n,h);n&&(this._lastEvent=null,Fs(o.onHover,[e,u,this],this),h&&Fs(o.onClick,[e,u,this],this));let _=!DE(u,i);return(_||t)&&(this._active=u,this._updateHoverStyles(u,i,t)),this._lastEvent=p,_}_getActiveElements(e,t,n,i){if(e.type==="mouseout")return[];if(!n)return t;let o=this.options.hover;return this.getElementsAtEventForMode(e,o.mode,o,i)}},Xge=()=>Za(Q0.instances,r=>r._plugins.invalidate()),ab=!0;Object.defineProperties(Q0,{defaults:{enumerable:ab,value:$o},instances:{enumerable:ab,value:_P},overrides:{enumerable:ab,value:nb},registry:{enumerable:ab,value:qv},version:{enumerable:ab,value:Tvt},getChart:{enumerable:ab,value:Ave},register:{enumerable:ab,value:(...r)=>{qv.add(...r),Xge()}},unregister:{enumerable:ab,value:(...r)=>{qv.remove(...r),Xge()}}});uw=class extends Xd{constructor(e){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,e&&Object.assign(this,e)}inRange(e,t,n){let i=this.getProps(["x","y"],n),{angle:o,distance:a}=eU(i,{x:e,y:t}),{startAngle:u,endAngle:h,innerRadius:p,outerRadius:_,circumference:T}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],n),O=this.options.spacing/2,q=ao(T,h-u)>=ks||Q1(o,u,h),U=xg(a,p+O,_+O);return q&&U}getCenterPoint(e){let{x:t,y:n,startAngle:i,endAngle:o,innerRadius:a,outerRadius:u}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],e),{offset:h,spacing:p}=this.options,_=(i+o)/2,T=(a+u+p+h)/2;return{x:t+Math.cos(_)*T,y:n+Math.sin(_)*T}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){let{options:t,circumference:n}=this,i=(t.offset||0)/2,o=(t.spacing||0)/2;if(this.pixelMargin=t.borderAlign==="inner"?.33:0,this.fullCircles=n>ks?Math.floor(n/ks):0,n===0||this.innerRadius<0||this.outerRadius<0)return;e.save();let a=0;if(i){a=i/2;let h=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(h)*a,Math.sin(h)*a),this.circumference>=il&&(a=i)}e.fillStyle=t.backgroundColor,e.strokeStyle=t.borderColor;let u=Mvt(e,this,a,o);Lvt(e,this,a,o,u),e.restore()}};uw.id="arc";uw.defaults={borderAlign:"center",borderColor:"#fff",borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0};uw.defaultRoutes={backgroundColor:"backgroundColor"};Uvt=typeof Path2D=="function";Sg=class extends Xd{constructor(e){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,e&&Object.assign(this,e)}updateControlPoints(e,t){let n=this.options;if((n.tension||n.cubicInterpolationMode==="monotone")&&!n.stepped&&!this._pointsUpdated){let i=n.spanGaps?this._loop:this._fullLoop;xge(this._points,n,e,i,t),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=Ege(this,this.options.segment))}first(){let e=this.segments,t=this.points;return e.length&&t[e[0].start]}last(){let e=this.segments,t=this.points,n=e.length;return n&&t[e[n-1].end]}interpolate(e,t){let n=this.options,i=e[t],o=this.points,a=xU(this,{property:t,start:i,end:i});if(!a.length)return;let u=[],h=Bvt(n),p,_;for(p=0,_=a.length;p<_;++p){let{start:T,end:O}=a[p],L=o[T],q=o[O];if(L===q){u.push(L);continue}let U=Math.abs((i-L[t])/(q[t]-L[t])),Z=h(L,q,U,n.stepped);Z[t]=e[t],u.push(Z)}return u.length===1?u[0]:u}pathSegment(e,t,n){return jU(this)(e,this,t,n)}path(e,t,n){let i=this.segments,o=jU(this),a=this._loop;t=t||0,n=n||this.points.length-t;for(let u of i)a&=o(e,this,u,{start:t,end:t+n-1});return!!a}draw(e,t,n,i){let o=this.options||{};(this.points||[]).length&&o.borderWidth&&(e.save(),Hvt(e,this,n,i),e.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}};Sg.id="line";Sg.defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};Sg.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};Sg.descriptors={_scriptable:!0,_indexable:r=>r!=="borderDash"&&r!=="fill"};cw=class extends Xd{constructor(e){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,e&&Object.assign(this,e)}inRange(e,t,n){let i=this.options,{x:o,y:a}=this.getProps(["x","y"],n);return Math.pow(e-o,2)+Math.pow(t-a,2){if(!t.enabled){Qge(r);return}let n=r.width;r.data.datasets.forEach((i,o)=>{let{_data:a,indexAxis:u}=i,h=r.getDatasetMeta(o),p=a||i.data;if(ew([u,r.options.indexAxis])==="y"||h.type!=="line")return;let _=r.scales[h.xAxisID];if(_.type!=="linear"&&_.type!=="time"||r.options.parsing)return;let{start:T,count:O}=Jvt(h,p),L=t.threshold||4*n;if(O<=L){Pve(i);return}xa(a)&&(i._data=p,delete i.data,Object.defineProperty(i,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(U){this._data=U}}));let q;switch(t.algorithm){case"lttb":q=Zvt(p,T,O,n,t);break;case"min-max":q=Xvt(p,T,O,n);break;default:throw new Error(`Unsupported decimation algorithm '${t.algorithm}'`)}i._decimated=q})},destroy(r){Qge(r)}};wP=class{constructor(e){this.x=e.x,this.y=e.y,this.radius=e.radius}pathSegment(e,t,n){let{x:i,y:o,radius:a}=this;return t=t||{start:0,end:ks},e.arc(i,o,a,t.end,t.start,!0),!n.bounds}interpolate(e){let{x:t,y:n,radius:i}=this,o=e.angle;return{x:t+Math.cos(o)*i,y:n+Math.sin(o)*i,angle:o}}};gyt={id:"filler",afterDatasetsUpdate(r,e,t){let n=(r.data.datasets||[]).length,i=[],o,a,u,h;for(a=0;a=0;--a){let u=i[a].$filler;!u||(u.line.updateControlPoints(o,u.axis),n&&OU(r.ctx,u,o))}},beforeDatasetsDraw(r,e,t){if(t.drawTime!=="beforeDatasetsDraw")return;let n=r.getSortedVisibleDatasetMetas();for(let i=n.length-1;i>=0;--i){let o=n[i].$filler;o&&OU(r.ctx,o,r.chartArea)}},beforeDatasetDraw(r,e,t){let n=e.meta.$filler;!n||n.fill===!1||t.drawTime!=="beforeDatasetDraw"||OU(r.ctx,n,r.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}},ive=(r,e)=>{let{boxHeight:t=e,boxWidth:n=e}=r;return r.usePointStyle&&(t=Math.min(t,e),n=Math.min(n,e)),{boxWidth:n,boxHeight:t,itemHeight:Math.max(e,t)}},vyt=(r,e)=>r!==null&&e!==null&&r.datasetIndex===e.datasetIndex&&r.index===e.index,SP=class extends Xd{constructor(e){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,t,n){this.maxWidth=e,this.maxHeight=t,this._margins=n,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){let e=this.options.labels||{},t=Fs(e.generateLabels,[this.chart],this)||[];e.filter&&(t=t.filter(n=>e.filter(n,this.chart.data))),e.sort&&(t=t.sort((n,i)=>e.sort(n,i,this.chart.data))),this.options.reverse&&t.reverse(),this.legendItems=t}fit(){let{options:e,ctx:t}=this;if(!e.display){this.width=this.height=0;return}let n=e.labels,i=fc(n.font),o=i.size,a=this._computeTitleHeight(),{boxWidth:u,itemHeight:h}=ive(n,o),p,_;t.font=i.string,this.isHorizontal()?(p=this.maxWidth,_=this._fitRows(a,o,u,h)+10):(_=this.maxHeight,p=this._fitCols(a,o,u,h)+10),this.width=Math.min(p,e.maxWidth||this.maxWidth),this.height=Math.min(_,e.maxHeight||this.maxHeight)}_fitRows(e,t,n,i){let{ctx:o,maxWidth:a,options:{labels:{padding:u}}}=this,h=this.legendHitBoxes=[],p=this.lineWidths=[0],_=i+u,T=e;o.textAlign="left",o.textBaseline="middle";let O=-1,L=-_;return this.legendItems.forEach((q,U)=>{let Z=n+t/2+o.measureText(q.text).width;(U===0||p[p.length-1]+Z+2*u>a)&&(T+=_,p[p.length-(U>0?0:1)]=0,L+=_,O++),h[U]={left:0,top:L,row:O,width:Z,height:i},p[p.length-1]+=Z+u}),T}_fitCols(e,t,n,i){let{ctx:o,maxHeight:a,options:{labels:{padding:u}}}=this,h=this.legendHitBoxes=[],p=this.columnSizes=[],_=a-e,T=u,O=0,L=0,q=0,U=0;return this.legendItems.forEach((Z,te)=>{let ie=n+t/2+o.measureText(Z.text).width;te>0&&L+i+2*u>_&&(T+=O+u,p.push({width:O,height:L}),q+=O+u,U++,O=L=0),h[te]={left:q,top:L,col:U,width:ie,height:i},O=Math.max(O,ie),L+=i+u}),T+=O,p.push({width:O,height:L}),T}adjustHitBoxes(){if(!this.options.display)return;let e=this._computeTitleHeight(),{legendHitBoxes:t,options:{align:n,labels:{padding:i},rtl:o}}=this,a=Z0(o,this.left,this.width);if(this.isHorizontal()){let u=0,h=bf(n,this.left+i,this.right-this.lineWidths[u]);for(let p of t)u!==p.row&&(u=p.row,h=bf(n,this.left+i,this.right-this.lineWidths[u])),p.top+=this.top+e+i,p.left=a.leftForLtr(a.x(h),p.width),h+=p.width+i}else{let u=0,h=bf(n,this.top+e+i,this.bottom-this.columnSizes[u].height);for(let p of t)p.col!==u&&(u=p.col,h=bf(n,this.top+e+i,this.bottom-this.columnSizes[u].height)),p.top=h,p.left+=this.left+i,p.left=a.leftForLtr(a.x(p.left),p.width),h+=p.height+i}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){let e=this.ctx;ME(e,this),this._draw(),PE(e)}}_draw(){let{options:e,columnSizes:t,lineWidths:n,ctx:i}=this,{align:o,labels:a}=e,u=$o.color,h=Z0(e.rtl,this.left,this.width),p=fc(a.font),{color:_,padding:T}=a,O=p.size,L=O/2,q;this.drawTitle(),i.textAlign=h.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=p.string;let{boxWidth:U,boxHeight:Z,itemHeight:te}=ive(a,O),ie=function(ge,Se,ye){if(isNaN(U)||U<=0||isNaN(Z)||Z<0)return;i.save();let be=ao(ye.lineWidth,1);if(i.fillStyle=ao(ye.fillStyle,u),i.lineCap=ao(ye.lineCap,"butt"),i.lineDashOffset=ao(ye.lineDashOffset,0),i.lineJoin=ao(ye.lineJoin,"miter"),i.lineWidth=be,i.strokeStyle=ao(ye.strokeStyle,u),i.setLineDash(ao(ye.lineDash,[])),a.usePointStyle){let Ue={radius:U*Math.SQRT2/2,pointStyle:ye.pointStyle,rotation:ye.rotation,borderWidth:be},B=h.xPlus(ge,U/2),re=Se+L;IE(i,Ue,B,re)}else{let Ue=Se+Math.max((O-Z)/2,0),B=h.leftForLtr(ge,U),re=Y0(ye.borderRadius);i.beginPath(),Object.values(re).some(N=>N!==0)?LE(i,{x:B,y:Ue,w:U,h:Z,radius:re}):i.rect(B,Ue,U,Z),i.fill(),be!==0&&i.stroke()}i.restore()},ue=function(ge,Se,ye){ob(i,ye.text,ge,Se+te/2,p,{strikethrough:ye.hidden,textAlign:h.textAlign(ye.textAlign)})},S=this.isHorizontal(),ve=this._computeTitleHeight();S?q={x:bf(o,this.left+T,this.right-n[0]),y:this.top+T+ve,line:0}:q={x:this.left+T,y:bf(o,this.top+ve+T,this.bottom-t[0].height),line:0},vU(this.ctx,e.textDirection);let le=te+T;this.legendItems.forEach((ge,Se)=>{i.strokeStyle=ge.fontColor||_,i.fillStyle=ge.fontColor||_;let ye=i.measureText(ge.text).width,be=h.textAlign(ge.textAlign||(ge.textAlign=a.textAlign)),Ue=U+L+ye,B=q.x,re=q.y;h.setWidth(this.width),S?Se>0&&B+Ue+T>this.right&&(re=q.y+=le,q.line++,B=q.x=bf(o,this.left+T,this.right-n[q.line])):Se>0&&re+le>this.bottom&&(B=q.x=B+t[q.line].width+T,q.line++,re=q.y=bf(o,this.top+ve+T,this.bottom-t[q.line].height));let N=h.x(B);ie(N,re,ge),B=Yme(be,B+U+L,S?B+Ue:this.right,e.rtl),ue(h.x(B),re,ge),S?q.x+=Ue+T:q.y+=le}),yU(this.ctx,e.textDirection)}drawTitle(){let e=this.options,t=e.title,n=fc(t.font),i=xf(t.padding);if(!t.display)return;let o=Z0(e.rtl,this.left,this.width),a=this.ctx,u=t.position,h=n.size/2,p=i.top+h,_,T=this.left,O=this.width;if(this.isHorizontal())O=Math.max(...this.lineWidths),_=this.top+p,T=bf(e.align,T,this.right-O);else{let q=this.columnSizes.reduce((U,Z)=>Math.max(U,Z.height),0);_=p+bf(e.align,this.top,this.bottom-q-e.labels.padding-this._computeTitleHeight())}let L=bf(u,T,T+O);a.textAlign=o.textAlign(tP(u)),a.textBaseline="middle",a.strokeStyle=t.color,a.fillStyle=t.color,a.font=n.string,ob(a,t.text,L,_,n)}_computeTitleHeight(){let e=this.options.title,t=fc(e.font),n=xf(e.padding);return e.display?t.lineHeight+n.height:0}_getLegendItemAt(e,t){let n,i,o;if(xg(e,this.left,this.right)&&xg(t,this.top,this.bottom)){for(o=this.legendHitBoxes,n=0;nr.chart.options.color,boxWidth:40,padding:10,generateLabels(r){let e=r.data.datasets,{labels:{usePointStyle:t,pointStyle:n,textAlign:i,color:o}}=r.legend.options;return r._getSortedDatasetMetas().map(a=>{let u=a.controller.getStyle(t?0:void 0),h=xf(u.borderWidth);return{text:e[a.index].label,fillStyle:u.backgroundColor,fontColor:o,hidden:!a.visible,lineCap:u.borderCapStyle,lineDash:u.borderDash,lineDashOffset:u.borderDashOffset,lineJoin:u.borderJoinStyle,lineWidth:(h.width+h.height)/4,strokeStyle:u.borderColor,pointStyle:n||u.pointStyle,rotation:u.rotation,textAlign:i||u.textAlign,borderRadius:0,datasetIndex:a.index}},this)}},title:{color:r=>r.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:r=>!r.startsWith("on"),labels:{_scriptable:r=>!["generateLabels","filter","sort"].includes(r)}}},$E=class extends Xd{constructor(e){super(),this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,t){let n=this.options;if(this.left=0,this.top=0,!n.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=e,this.height=this.bottom=t;let i=Rs(n.text)?n.text.length:1;this._padding=xf(n.padding);let o=i*fc(n.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){let e=this.options.position;return e==="top"||e==="bottom"}_drawArgs(e){let{top:t,left:n,bottom:i,right:o,options:a}=this,u=a.align,h=0,p,_,T;return this.isHorizontal()?(_=bf(u,n,o),T=t+e,p=o-n):(a.position==="left"?(_=n+e,T=bf(u,i,t),h=il*-.5):(_=o-e,T=bf(u,t,i),h=il*.5),p=i-t),{titleX:_,titleY:T,maxWidth:p,rotation:h}}draw(){let e=this.ctx,t=this.options;if(!t.display)return;let n=fc(t.font),o=n.lineHeight/2+this._padding.top,{titleX:a,titleY:u,maxWidth:h,rotation:p}=this._drawArgs(o);ob(e,t.text,0,0,n,{color:t.color,maxWidth:h,rotation:p,textAlign:tP(t.align),textBaseline:"middle",translation:[a,u]})}};_yt={id:"title",_element:$E,start(r,e,t){xyt(r,t)},stop(r){let e=r.titleBlock;Wf.removeBox(r,e),delete r.titleBlock},beforeUpdate(r,e,t){let n=r.titleBlock;Wf.configure(r,n,t),n.options=t},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}},pP=new WeakMap,wyt={id:"subtitle",start(r,e,t){let n=new $E({ctx:r.ctx,options:t,chart:r});Wf.configure(r,n,t),Wf.addBox(r,n),pP.set(r,n)},stop(r){Wf.removeBox(r,pP.get(r)),pP.delete(r)},beforeUpdate(r,e,t){let n=pP.get(r);Wf.configure(r,n,t),n.options=t},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}},UE={average(r){if(!r.length)return!1;let e,t,n=0,i=0,o=0;for(e=0,t=r.length;e{let a={before:[],lines:[],after:[]},u=uve(n,o);wg(a.before,Nv(u.beforeLabel.call(this,o))),wg(a.lines,u.label.call(this,o)),wg(a.after,Nv(u.afterLabel.call(this,o))),i.push(a)}),i}getAfterBody(e,t){return lve(t.callbacks.afterBody.apply(this,[e]))}getFooter(e,t){let{callbacks:n}=t,i=n.beforeFooter.apply(this,[e]),o=n.footer.apply(this,[e]),a=n.afterFooter.apply(this,[e]),u=[];return u=wg(u,Nv(i)),u=wg(u,Nv(o)),u=wg(u,Nv(a)),u}_createItems(e){let t=this._active,n=this.chart.data,i=[],o=[],a=[],u=[],h,p;for(h=0,p=t.length;he.filter(_,T,O,n))),e.itemSort&&(u=u.sort((_,T)=>e.itemSort(_,T,n))),Za(u,_=>{let T=uve(e.callbacks,_);i.push(T.labelColor.call(this,_)),o.push(T.labelPointStyle.call(this,_)),a.push(T.labelTextColor.call(this,_))}),this.labelColors=i,this.labelPointStyles=o,this.labelTextColors=a,this.dataPoints=u,u}update(e,t){let n=this.options.setContext(this.getContext()),i=this._active,o,a=[];if(!i.length)this.opacity!==0&&(o={opacity:0});else{let u=UE[n.position].call(this,i,this._eventPosition);a=this._createItems(n),this.title=this.getTitle(a,n),this.beforeBody=this.getBeforeBody(a,n),this.body=this.getBody(a,n),this.afterBody=this.getAfterBody(a,n),this.footer=this.getFooter(a,n);let h=this._size=ove(this,n),p=Object.assign({},u,h),_=ave(this.chart,n,p),T=sve(n,p,_,this.chart);this.xAlign=_.xAlign,this.yAlign=_.yAlign,o={opacity:1,x:T.x,y:T.y,width:h.width,height:h.height,caretX:u.x,caretY:u.y}}this._tooltipItems=a,this.$context=void 0,o&&this._resolveAnimations().update(this,o),e&&n.external&&n.external.call(this,{chart:this.chart,tooltip:this,replay:t})}drawCaret(e,t,n,i){let o=this.getCaretPosition(e,n,i);t.lineTo(o.x1,o.y1),t.lineTo(o.x2,o.y2),t.lineTo(o.x3,o.y3)}getCaretPosition(e,t,n){let{xAlign:i,yAlign:o}=this,{caretSize:a,cornerRadius:u}=n,{topLeft:h,topRight:p,bottomLeft:_,bottomRight:T}=Y0(u),{x:O,y:L}=e,{width:q,height:U}=t,Z,te,ie,ue,S,ve;return o==="center"?(S=L+U/2,i==="left"?(Z=O,te=Z-a,ue=S+a,ve=S-a):(Z=O+q,te=Z+a,ue=S-a,ve=S+a),ie=Z):(i==="left"?te=O+Math.max(h,_)+a:i==="right"?te=O+q-Math.max(p,T)-a:te=this.caretX,o==="top"?(ue=L,S=ue-a,Z=te-a,ie=te+a):(ue=L+U,S=ue+a,Z=te+a,ie=te-a),ve=ue),{x1:Z,x2:te,x3:ie,y1:ue,y2:S,y3:ve}}drawTitle(e,t,n){let i=this.title,o=i.length,a,u,h;if(o){let p=Z0(n.rtl,this.x,this.width);for(e.x=mP(this,n.titleAlign,n),t.textAlign=p.textAlign(n.titleAlign),t.textBaseline="middle",a=fc(n.titleFont),u=n.titleSpacing,t.fillStyle=n.titleColor,t.font=a.string,h=0;hue!==0)?(e.beginPath(),e.fillStyle=o.multiKeyBackground,LE(e,{x:Z,y:U,w:p,h,radius:ie}),e.fill(),e.stroke(),e.fillStyle=a.backgroundColor,e.beginPath(),LE(e,{x:te,y:U+1,w:p-2,h:h-2,radius:ie}),e.fill()):(e.fillStyle=o.multiKeyBackground,e.fillRect(Z,U,p,h),e.strokeRect(Z,U,p,h),e.fillStyle=a.backgroundColor,e.fillRect(te,U+1,p-2,h-2))}e.fillStyle=this.labelTextColors[n]}drawBody(e,t,n){let{body:i}=this,{bodySpacing:o,bodyAlign:a,displayColors:u,boxHeight:h,boxWidth:p,boxPadding:_}=n,T=fc(n.bodyFont),O=T.lineHeight,L=0,q=Z0(n.rtl,this.x,this.width),U=function(Se){t.fillText(Se,q.x(e.x+L),e.y+O/2),e.y+=O+o},Z=q.textAlign(a),te,ie,ue,S,ve,le,ge;for(t.textAlign=a,t.textBaseline="middle",t.font=T.string,e.x=mP(this,Z,n),t.fillStyle=n.bodyColor,Za(this.beforeBody,U),L=u&&Z!=="right"?a==="center"?p/2+_:p+2+_:0,S=0,le=i.length;S0&&t.stroke()}_updateAnimationTarget(e){let t=this.chart,n=this.$animations,i=n&&n.x,o=n&&n.y;if(i||o){let a=UE[e.position].call(this,this._active,this._eventPosition);if(!a)return;let u=this._size=ove(this,e),h=Object.assign({},a,this._size),p=ave(t,e,h),_=sve(e,h,p,t);(i._to!==_.x||o._to!==_.y)&&(this.xAlign=p.xAlign,this.yAlign=p.yAlign,this.width=u.width,this.height=u.height,this.caretX=a.x,this.caretY=a.y,this._resolveAnimations().update(this,_))}}draw(e){let t=this.options.setContext(this.getContext()),n=this.opacity;if(!n)return;this._updateAnimationTarget(t);let i={width:this.width,height:this.height},o={x:this.x,y:this.y};n=Math.abs(n)<.001?0:n;let a=xf(t.padding),u=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;t.enabled&&u&&(e.save(),e.globalAlpha=n,this.drawBackground(o,e,i,t),vU(e,t.textDirection),o.y+=a.top,this.drawTitle(o,e,t),this.drawBody(o,e,t),this.drawFooter(o,e,t),yU(e,t.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,t){let n=this._active,i=e.map(({datasetIndex:u,index:h})=>{let p=this.chart.getDatasetMeta(u);if(!p)throw new Error("Cannot find a dataset at index "+u);return{datasetIndex:u,element:p.data[h],index:h}}),o=!DE(n,i),a=this._positionChanged(i,t);(o||a)&&(this._active=i,this._eventPosition=t,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,t,n=!0){if(t&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;let i=this.options,o=this._active||[],a=this._getActiveElements(e,o,t,n),u=this._positionChanged(a,e),h=t||!DE(a,o)||u;return h&&(this._active=a,(i.enabled||i.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,t))),h}_getActiveElements(e,t,n,i){let o=this.options;if(e.type==="mouseout")return[];if(!i)return t;let a=this.chart.getElementsAtEventForMode(e,o.mode,o,n);return o.reverse&&a.reverse(),a}_positionChanged(e,t){let{caretX:n,caretY:i,options:o}=this,a=UE[o.position].call(this,e,t);return a!==!1&&(n!==a.x||i!==a.y)}};KE.positioners=UE;Oyt={id:"tooltip",_element:KE,positioners:UE,afterInit(r,e,t){t&&(r.tooltip=new KE({chart:r,options:t}))},beforeUpdate(r,e,t){r.tooltip&&r.tooltip.initialize(t)},reset(r,e,t){r.tooltip&&r.tooltip.initialize(t)},afterDraw(r){let e=r.tooltip,t={tooltip:e};r.notifyPlugins("beforeTooltipDraw",t)!==!1&&(e&&e.draw(r.ctx),r.notifyPlugins("afterTooltipDraw",t))},afterEvent(r,e){if(r.tooltip){let t=e.replay;r.tooltip.handleEvent(e.event,t,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(r,e)=>e.bodyFont.size,boxWidth:(r,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:{beforeTitle:bg,title(r){if(r.length>0){let e=r[0],t=e.chart.data.labels,n=t?t.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(n>0&&e.dataIndexr!=="filter"&&r!=="itemSort"&&r!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},Iyt=Object.freeze({__proto__:null,Decimation:Qvt,Filler:gyt,Legend:byt,SubTitle:wyt,Title:_yt,Tooltip:Oyt}),Myt=(r,e,t,n)=>(typeof e=="string"?(t=r.push(e)-1,n.unshift({index:t,label:e})):isNaN(e)&&(t=null),t);Lyt=(r,e)=>r===null?null:Fc(Math.round(r),0,e),hw=class extends Bv{constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){let t=this._addedLabels;if(t.length){let n=this.getLabels();for(let{index:i,label:o}of t)n[i]===o&&n.splice(i,1);this._addedLabels=[]}super.init(e)}parse(e,t){if(xa(e))return null;let n=this.getLabels();return t=isFinite(t)&&n[t]===e?t:Pyt(n,e,ao(t,e),this._addedLabels),Lyt(t,n.length-1)}determineDataLimits(){let{minDefined:e,maxDefined:t}=this.getUserBounds(),{min:n,max:i}=this.getMinMax(!0);this.options.bounds==="ticks"&&(e||(n=0),t||(i=this.getLabels().length-1)),this.min=n,this.max=i}buildTicks(){let e=this.min,t=this.max,n=this.options.offset,i=[],o=this.getLabels();o=e===0&&t===o.length-1?o:o.slice(e,t+1),this._valueRange=Math.max(o.length-(n?0:1),1),this._startValue=this.min-(n?.5:0);for(let a=e;a<=t;a++)i.push({value:a});return i}getLabelForValue(e){let t=this.getLabels();return e>=0&&et.length-1?null:this.getPixelForValue(t[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}};hw.id="category";hw.defaults={ticks:{callback:hw.prototype.getLabelForValue}};dw=class extends Bv{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,t){return xa(e)||(typeof e=="number"||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){let{beginAtZero:e}=this.options,{minDefined:t,maxDefined:n}=this.getUserBounds(),{min:i,max:o}=this,a=h=>i=t?i:h,u=h=>o=n?o:h;if(e){let h=Om(i),p=Om(o);h<0&&p<0?u(0):h>0&&p>0&&a(0)}if(i===o){let h=1;(o>=Number.MAX_SAFE_INTEGER||i<=Number.MIN_SAFE_INTEGER)&&(h=Math.abs(o*.05)),u(o+h),e||a(i-h)}this.min=i,this.max=o}getTickLimit(){let e=this.options.ticks,{maxTicksLimit:t,stepSize:n}=e,i;return n?(i=Math.ceil(this.max/n)-Math.floor(this.min/n)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${n} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),t=t||11),t&&(i=Math.min(t,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){let e=this.options,t=e.ticks,n=this.getTickLimit();n=Math.max(2,n);let i={maxTicks:n,bounds:e.bounds,min:e.min,max:e.max,precision:t.precision,step:t.stepSize,count:t.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:t.minRotation||0,includeBounds:t.includeBounds!==!1},o=this._range||this,a=Ryt(i,o);return e.bounds==="ticks"&&J6(a,this,"value"),e.reverse?(a.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),a}configure(){let e=this.ticks,t=this.min,n=this.max;if(super.configure(),this.options.offset&&e.length){let i=(n-t)/Math.max(e.length-1,1)/2;t-=i,n+=i}this._startValue=t,this._endValue=n,this._valueRange=n-t}getLabelForValue(e){return tw(e,this.chart.options.locale,this.options.ticks.format)}},GE=class extends dw{determineDataLimits(){let{min:e,max:t}=this.getMinMax(!0);this.min=vu(e)?e:0,this.max=vu(t)?t:1,this.handleTickRangeOptions()}computeTickLimit(){let e=this.isHorizontal(),t=e?this.width:this.height,n=zp(this.options.ticks.minRotation),i=(e?Math.sin(n):Math.cos(n))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(t/Math.min(40,o.lineHeight/i))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}};GE.id="linear";GE.defaults={ticks:{callback:kP.formatters.numeric}};YE=class extends Bv{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(e,t){let n=dw.prototype.parse.apply(this,[e,t]);if(n===0){this._zero=!0;return}return vu(n)&&n>0?n:null}determineDataLimits(){let{min:e,max:t}=this.getMinMax(!0);this.min=vu(e)?Math.max(0,e):null,this.max=vu(t)?Math.max(0,t):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){let{minDefined:e,maxDefined:t}=this.getUserBounds(),n=this.min,i=this.max,o=h=>n=e?n:h,a=h=>i=t?i:h,u=(h,p)=>Math.pow(10,Math.floor(Zd(h))+p);n===i&&(n<=0?(o(1),a(10)):(o(u(n,-1)),a(u(i,1)))),n<=0&&o(u(i,-1)),i<=0&&a(u(n,1)),this._zero&&this.min!==this._suggestedMin&&n===u(this.min,0)&&o(u(n,-1)),this.min=n,this.max=i}buildTicks(){let e=this.options,t={min:this._userMin,max:this._userMax},n=Fyt(t,this);return e.bounds==="ticks"&&J6(n,this,"value"),e.reverse?(n.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),n}getLabelForValue(e){return e===void 0?"0":tw(e,this.chart.options.locale,this.options.ticks.format)}configure(){let e=this.min;super.configure(),this._startValue=Zd(e),this._valueRange=Zd(this.max)-Zd(e)}getPixelForValue(e){return(e===void 0||e===0)&&(e=this.min),e===null||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(Zd(e)-this._startValue)/this._valueRange)}getValueForPixel(e){let t=this.getDecimalForPixel(e);return Math.pow(10,this._startValue+t*this._valueRange)}};YE.id="logarithmic";YE.defaults={ticks:{callback:kP.formatters.logarithmic,major:{enabled:!0}}};ex=class extends dw{constructor(e){super(e),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){let e=this._padding=xf(HU(this.options)/2),t=this.width=this.maxWidth-e.width,n=this.height=this.maxHeight-e.height;this.xCenter=Math.floor(this.left+t/2+e.left),this.yCenter=Math.floor(this.top+n/2+e.top),this.drawingArea=Math.floor(Math.min(t,n)/2)}determineDataLimits(){let{min:e,max:t}=this.getMinMax(!1);this.min=vu(e)&&!isNaN(e)?e:0,this.max=vu(t)&&!isNaN(t)?t:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/HU(this.options))}generateTickLabels(e){dw.prototype.generateTickLabels.call(this,e),this._pointLabels=this.getLabels().map((t,n)=>{let i=Fs(this.options.pointLabels.callback,[t,n],this);return i||i===0?i:""}).filter((t,n)=>this.chart.getDataVisibility(n))}fit(){let e=this.options;e.display&&e.pointLabels.display?qyt(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(e,t,n,i){this.xCenter+=Math.floor((e-t)/2),this.yCenter+=Math.floor((n-i)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(e,t,n,i))}getIndexAngle(e){let t=ks/(this._pointLabels.length||1),n=this.options.startAngle||0;return nd(e*t+zp(n))}getDistanceFromCenterForValue(e){if(xa(e))return NaN;let t=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-e)*t:(e-this.min)*t}getValueForDistanceFromCenter(e){if(xa(e))return NaN;let t=e/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-t:this.min+t}getPointLabelContext(e){let t=this._pointLabels||[];if(e>=0&&e{if(_!==0){u=this.getDistanceFromCenterForValue(p.value);let T=i.setContext(this.getContext(_-1));Vyt(this,T,u,o)}}),n.display){for(e.save(),a=o-1;a>=0;a--){let p=n.setContext(this.getPointLabelContext(a)),{color:_,lineWidth:T}=p;!T||!_||(e.lineWidth=T,e.strokeStyle=_,e.setLineDash(p.borderDash),e.lineDashOffset=p.borderDashOffset,u=this.getDistanceFromCenterForValue(t.ticks.reverse?this.min:this.max),h=this.getPointPosition(a,u),e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(h.x,h.y),e.stroke())}e.restore()}}drawBorder(){}drawLabels(){let e=this.ctx,t=this.options,n=t.ticks;if(!n.display)return;let i=this.getIndexAngle(0),o,a;e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(i),e.textAlign="center",e.textBaseline="middle",this.ticks.forEach((u,h)=>{if(h===0&&!t.reverse)return;let p=n.setContext(this.getContext(h)),_=fc(p.font);if(o=this.getDistanceFromCenterForValue(this.ticks[h].value),p.showLabelBackdrop){e.font=_.string,a=e.measureText(u.label).width,e.fillStyle=p.backdropColor;let T=xf(p.backdropPadding);e.fillRect(-a/2-T.left,-o-_.size/2-T.top,a+T.width,_.size+T.height)}ob(e,u.label,0,-o,_,{color:p.color})}),e.restore()}drawTitle(){}};ex.id="radialLinear";ex.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:kP.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(r){return r},padding:5,centerPointLabels:!1}};ex.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"};ex.descriptors={angleLines:{_fallback:"grid"}};TP={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},id=Object.keys(TP);tx=class extends Bv{constructor(e){super(e),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(e,t){let n=e.time||(e.time={}),i=this._adapter=new WU._date(e.adapters.date);Z1(n.displayFormats,i.formats()),this._parseOpts={parser:n.parser,round:n.round,isoWeekday:n.isoWeekday},super.init(e),this._normalized=t.normalized}parse(e,t){return e===void 0?null:dve(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){let e=this.options,t=this._adapter,n=e.time.unit||"day",{min:i,max:o,minDefined:a,maxDefined:u}=this.getUserBounds();function h(p){!a&&!isNaN(p.min)&&(i=Math.min(i,p.min)),!u&&!isNaN(p.max)&&(o=Math.max(o,p.max))}(!a||!u)&&(h(this._getLabelBounds()),(e.bounds!=="ticks"||e.ticks.source!=="labels")&&h(this.getMinMax(!1))),i=vu(i)&&!isNaN(i)?i:+t.startOf(Date.now(),n),o=vu(o)&&!isNaN(o)?o:+t.endOf(Date.now(),n)+1,this.min=Math.min(i,o-1),this.max=Math.max(i+1,o)}_getLabelBounds(){let e=this.getLabelTimestamps(),t=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY;return e.length&&(t=e[0],n=e[e.length-1]),{min:t,max:n}}buildTicks(){let e=this.options,t=e.time,n=e.ticks,i=n.source==="labels"?this.getLabelTimestamps():this._generate();e.bounds==="ticks"&&i.length&&(this.min=this._userMin||i[0],this.max=this._userMax||i[i.length-1]);let o=this.min,a=this.max,u=dge(i,o,a);return this._unit=t.unit||(n.autoSkip?pve(t.minUnit,this.min,this.max,this._getLabelCapacity(o)):Gyt(this,u.length,t.minUnit,this.min,this.max)),this._majorUnit=!n.major.enabled||this._unit==="year"?void 0:Yyt(this._unit),this.initOffsets(i),e.reverse&&u.reverse(),gve(this,u,this._majorUnit)}initOffsets(e){let t=0,n=0,i,o;this.options.offset&&e.length&&(i=this.getDecimalForValue(e[0]),e.length===1?t=1-i:t=(this.getDecimalForValue(e[1])-i)/2,o=this.getDecimalForValue(e[e.length-1]),e.length===1?n=o:n=(o-this.getDecimalForValue(e[e.length-2]))/2);let a=e.length<3?.5:.25;t=Fc(t,0,a),n=Fc(n,0,a),this._offsets={start:t,end:n,factor:1/(t+1+n)}}_generate(){let e=this._adapter,t=this.min,n=this.max,i=this.options,o=i.time,a=o.unit||pve(o.minUnit,t,n,this._getLabelCapacity(t)),u=ao(o.stepSize,1),h=a==="week"?o.isoWeekday:!1,p=X1(h)||h===!0,_={},T=t,O,L;if(p&&(T=+e.startOf(T,"isoWeek",h)),T=+e.startOf(T,p?"day":a),e.diff(n,t,a)>1e5*u)throw new Error(t+" and "+n+" are too far apart with stepSize of "+u+" "+a);let q=i.ticks.source==="data"&&this.getDataTimestamps();for(O=T,L=0;OU-Z).map(U=>+U)}getLabelForValue(e){let t=this._adapter,n=this.options.time;return n.tooltipFormat?t.format(e,n.tooltipFormat):t.format(e,n.displayFormats.datetime)}_tickFormatFunction(e,t,n,i){let o=this.options,a=o.time.displayFormats,u=this._unit,h=this._majorUnit,p=u&&a[u],_=h&&a[h],T=n[t],O=h&&_&&T&&T.major,L=this._adapter.format(e,i||(O?_:p)),q=o.ticks.callback;return q?Fs(q,[L,t,n],this):L}generateTickLabels(e){let t,n,i;for(t=0,n=e.length;t0?u:1}getDataTimestamps(){let e=this._cache.data||[],t,n;if(e.length)return e;let i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(t=0,n=i.length;t=t&&p<=n&&i.push(p);if(i.length<2)return[{time:t,pos:0},{time:n,pos:1}];for(a=0,u=i.length;a{$U();Q0.register(...Nve);qve=Q0});function ei(r){if(r===null||r===!0||r===!1)return NaN;var e=Number(r);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}var Hl=Pe(()=>{});function Cr(r,e){if(e.length1?"s":"")+" required, but only "+e.length+" present")}var Qn=Pe(()=>{});function Zr(r){Cr(1,arguments);var e=Object.prototype.toString.call(r);return r instanceof Date||typeof r=="object"&&e==="[object Date]"?new Date(r.getTime()):typeof r=="number"||e==="[object Number]"?new Date(r):((typeof r=="string"||e==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule"),console.warn(new Error().stack)),new Date(NaN))}var Xi=Pe(()=>{Qn()});function pw(r,e){Cr(2,arguments);var t=Zr(r),n=ei(e);return isNaN(n)?new Date(NaN):(n&&t.setDate(t.getDate()+n),t)}var KU=Pe(()=>{Hl();Xi();Qn()});function ub(r,e){Cr(2,arguments);var t=Zr(r),n=ei(e);if(isNaN(n))return new Date(NaN);if(!n)return t;var i=t.getDate(),o=new Date(t.getTime());o.setMonth(t.getMonth()+n+1,0);var a=o.getDate();return i>=a?o:(t.setFullYear(o.getFullYear(),o.getMonth(),i),t)}var EP=Pe(()=>{Hl();Xi();Qn()});function Up(r,e){Cr(2,arguments);var t=Zr(r).getTime(),n=ei(e);return new Date(t+n)}var mw=Pe(()=>{Hl();Xi();Qn()});function CP(r,e){Cr(2,arguments);var t=ei(e);return Up(r,t*Jyt)}var Jyt,zve=Pe(()=>{Hl();mw();Qn();Jyt=36e5});function XE(r,e){Cr(1,arguments);var t=e||{},n=t.locale,i=n&&n.options&&n.options.weekStartsOn,o=i==null?0:ei(i),a=t.weekStartsOn==null?o:ei(t.weekStartsOn);if(!(a>=0&&a<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var u=Zr(r),h=u.getDay(),p=(h{Xi();Hl();Qn()});function cb(r){var e=new Date(Date.UTC(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds()));return e.setUTCFullYear(r.getFullYear()),r.getTime()-e.getTime()}var AP=Pe(()=>{});function rx(r){Cr(1,arguments);var e=Zr(r);return e.setHours(0,0,0,0),e}var GU=Pe(()=>{Xi();Qn()});function YU(r,e){Cr(2,arguments);var t=rx(r),n=rx(e),i=t.getTime()-cb(t),o=n.getTime()-cb(n);return Math.round((i-o)/Qyt)}var Qyt,Uve=Pe(()=>{AP();GU();Qn();Qyt=864e5});function DP(r,e){Cr(2,arguments);var t=ei(e);return Up(r,t*ebt)}var ebt,Hve=Pe(()=>{Hl();mw();Qn();ebt=6e4});function OP(r,e){Cr(2,arguments);var t=ei(e),n=t*3;return ub(r,n)}var Wve=Pe(()=>{Hl();EP();Qn()});function IP(r,e){Cr(2,arguments);var t=ei(e);return Up(r,t*1e3)}var Vve=Pe(()=>{Hl();mw();Qn()});function MP(r,e){Cr(2,arguments);var t=ei(e),n=t*7;return pw(r,n)}var $ve=Pe(()=>{Hl();KU();Qn()});function PP(r,e){Cr(2,arguments);var t=ei(e);return ub(r,t*12)}var Kve=Pe(()=>{Hl();EP();Qn()});function fb(r,e){Cr(2,arguments);var t=Zr(r),n=Zr(e),i=t.getTime()-n.getTime();return i<0?-1:i>0?1:i}var ZU=Pe(()=>{Xi();Qn()});var tbt,JE,QE,e7t,eC=Pe(()=>{tbt=Math.pow(10,8)*24*60*60*1e3,JE=6e4,QE=36e5,e7t=-tbt});function XU(r){return Cr(1,arguments),r instanceof Date||typeof r=="object"&&Object.prototype.toString.call(r)==="[object Date]"}var Gve=Pe(()=>{Qn()});function gw(r){if(Cr(1,arguments),!XU(r)&&typeof r!="number")return!1;var e=Zr(r);return!isNaN(Number(e))}var JU=Pe(()=>{Gve();Xi();Qn()});function QU(r,e){Cr(2,arguments);var t=Zr(r),n=Zr(e),i=t.getFullYear()-n.getFullYear(),o=t.getMonth()-n.getMonth();return i*12+o}var Yve=Pe(()=>{Xi();Qn()});function eH(r,e){Cr(2,arguments);var t=Zr(r),n=Zr(e);return t.getFullYear()-n.getFullYear()}var Zve=Pe(()=>{Xi();Qn()});function Xve(r,e){var t=r.getFullYear()-e.getFullYear()||r.getMonth()-e.getMonth()||r.getDate()-e.getDate()||r.getHours()-e.getHours()||r.getMinutes()-e.getMinutes()||r.getSeconds()-e.getSeconds()||r.getMilliseconds()-e.getMilliseconds();return t<0?-1:t>0?1:t}function vw(r,e){Cr(2,arguments);var t=Zr(r),n=Zr(e),i=Xve(t,n),o=Math.abs(YU(t,n));t.setDate(t.getDate()-i*o);var a=Number(Xve(t,n)===-i),u=i*(o-a);return u===0?0:u}var tH=Pe(()=>{Xi();Uve();Qn()});function kg(r,e){return Cr(2,arguments),Zr(r).getTime()-Zr(e).getTime()}var tC=Pe(()=>{Xi();Qn()});function Tg(r){return r?Jve[r]:Jve[rbt]}var Jve,rbt,yw=Pe(()=>{Jve={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(r){return r<0?Math.ceil(r):Math.floor(r)}},rbt="trunc"});function LP(r,e,t){Cr(2,arguments);var n=kg(r,e)/QE;return Tg(t?.roundingMethod)(n)}var Qve=Pe(()=>{eC();tC();Qn();yw()});function RP(r,e,t){Cr(2,arguments);var n=kg(r,e)/JE;return Tg(t?.roundingMethod)(n)}var eye=Pe(()=>{eC();tC();Qn();yw()});function bw(r){Cr(1,arguments);var e=Zr(r);return e.setHours(23,59,59,999),e}var rH=Pe(()=>{Xi();Qn()});function xw(r){Cr(1,arguments);var e=Zr(r),t=e.getMonth();return e.setFullYear(e.getFullYear(),t+1,0),e.setHours(23,59,59,999),e}var nH=Pe(()=>{Xi();Qn()});function iH(r){Cr(1,arguments);var e=Zr(r);return bw(e).getTime()===xw(e).getTime()}var tye=Pe(()=>{Xi();rH();nH();Qn()});function _w(r,e){Cr(2,arguments);var t=Zr(r),n=Zr(e),i=fb(t,n),o=Math.abs(QU(t,n)),a;if(o<1)a=0;else{t.getMonth()===1&&t.getDate()>27&&t.setDate(30),t.setMonth(t.getMonth()-i*o);var u=fb(t,n)===-i;iH(Zr(r))&&o===1&&fb(r,n)===1&&(u=!1),a=i*(o-Number(u))}return a===0?0:a}var oH=Pe(()=>{Xi();Yve();ZU();Qn();tye()});function FP(r,e,t){Cr(2,arguments);var n=_w(r,e)/3;return Tg(t?.roundingMethod)(n)}var rye=Pe(()=>{oH();Qn();yw()});function NP(r,e,t){Cr(2,arguments);var n=kg(r,e)/1e3;return Tg(t?.roundingMethod)(n)}var nye=Pe(()=>{tC();Qn();yw()});function qP(r,e,t){Cr(2,arguments);var n=vw(r,e)/7;return Tg(t?.roundingMethod)(n)}var iye=Pe(()=>{tH();Qn();yw()});function BP(r,e){Cr(2,arguments);var t=Zr(r),n=Zr(e),i=fb(t,n),o=Math.abs(eH(t,n));t.setFullYear(1584),n.setFullYear(1584);var a=fb(t,n)===-i,u=i*(o-Number(a));return u===0?0:u}var oye=Pe(()=>{Xi();Zve();ZU();Qn()});function zP(r){Cr(1,arguments);var e=Zr(r);return e.setSeconds(0,0),e}var aye=Pe(()=>{Xi();Qn()});function jP(r){Cr(1,arguments);var e=Zr(r),t=e.getMonth(),n=t-t%3;return e.setMonth(n,1),e.setHours(0,0,0,0),e}var sye=Pe(()=>{Xi();Qn()});function UP(r){Cr(1,arguments);var e=Zr(r);return e.setDate(1),e.setHours(0,0,0,0),e}var lye=Pe(()=>{Xi();Qn()});function HP(r){Cr(1,arguments);var e=Zr(r),t=new Date(0);return t.setFullYear(e.getFullYear(),0,1),t.setHours(0,0,0,0),t}var uye=Pe(()=>{Xi();Qn()});function WP(r){Cr(1,arguments);var e=Zr(r),t=e.getFullYear();return e.setFullYear(t+1,0,0),e.setHours(23,59,59,999),e}var cye=Pe(()=>{Xi();Qn()});function VP(r){Cr(1,arguments);var e=Zr(r);return e.setMinutes(59,59,999),e}var fye=Pe(()=>{Xi();Qn()});function $P(r,e){Cr(1,arguments);var t=e||{},n=t.locale,i=n&&n.options&&n.options.weekStartsOn,o=i==null?0:ei(i),a=t.weekStartsOn==null?o:ei(t.weekStartsOn);if(!(a>=0&&a<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var u=Zr(r),h=u.getDay(),p=(h{Xi();Hl();Qn()});function KP(r){Cr(1,arguments);var e=Zr(r);return e.setSeconds(59,999),e}var dye=Pe(()=>{Xi();Qn()});function GP(r){Cr(1,arguments);var e=Zr(r),t=e.getMonth(),n=t-t%3+3;return e.setMonth(n,0),e.setHours(23,59,59,999),e}var pye=Pe(()=>{Xi();Qn()});function YP(r){Cr(1,arguments);var e=Zr(r);return e.setMilliseconds(999),e}var mye=Pe(()=>{Xi();Qn()});var nbt,ibt,gye,vye=Pe(()=>{nbt={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},ibt=function(r,e,t){var n,i=nbt[r];return typeof i=="string"?n=i:e===1?n=i.one:n=i.other.replace("{{count}}",e.toString()),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?"in "+n:n+" ago":n},gye=ibt});function rC(r){return function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.width?String(e.width):r.defaultWidth,n=r.formats[t]||r.formats[r.defaultWidth];return n}}var yye=Pe(()=>{});var obt,abt,sbt,lbt,bye,xye=Pe(()=>{yye();obt={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},abt={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},sbt={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},lbt={date:rC({formats:obt,defaultWidth:"full"}),time:rC({formats:abt,defaultWidth:"full"}),dateTime:rC({formats:sbt,defaultWidth:"full"})},bye=lbt});var ubt,cbt,_ye,wye=Pe(()=>{ubt={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},cbt=function(r,e,t,n){return ubt[r]},_ye=cbt});function nx(r){return function(e,t){var n=t||{},i=n.context?String(n.context):"standalone",o;if(i==="formatting"&&r.formattingValues){var a=r.defaultFormattingWidth||r.defaultWidth,u=n.width?String(n.width):a;o=r.formattingValues[u]||r.formattingValues[a]}else{var h=r.defaultWidth,p=n.width?String(n.width):r.defaultWidth;o=r.values[p]||r.values[h]}var _=r.argumentCallback?r.argumentCallback(e):e;return o[_]}}var Sye=Pe(()=>{});var fbt,hbt,dbt,pbt,mbt,gbt,vbt,ybt,kye,Tye=Pe(()=>{Sye();fbt={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},hbt={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},dbt={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},pbt={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},mbt={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},gbt={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},vbt=function(r,e){var t=Number(r),n=t%100;if(n>20||n<10)switch(n%10){case 1:return t+"st";case 2:return t+"nd";case 3:return t+"rd"}return t+"th"},ybt={ordinalNumber:vbt,era:nx({values:fbt,defaultWidth:"wide"}),quarter:nx({values:hbt,defaultWidth:"wide",argumentCallback:function(r){return r-1}}),month:nx({values:dbt,defaultWidth:"wide"}),day:nx({values:pbt,defaultWidth:"wide"}),dayPeriod:nx({values:mbt,defaultWidth:"wide",formattingValues:gbt,defaultFormattingWidth:"wide"})},kye=ybt});function ix(r){return function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.width,i=n&&r.matchPatterns[n]||r.matchPatterns[r.defaultMatchWidth],o=e.match(i);if(!o)return null;var a=o[0],u=n&&r.parsePatterns[n]||r.parsePatterns[r.defaultParseWidth],h=Array.isArray(u)?xbt(u,function(T){return T.test(a)}):bbt(u,function(T){return T.test(a)}),p;p=r.valueCallback?r.valueCallback(h):h,p=t.valueCallback?t.valueCallback(p):p;var _=e.slice(a.length);return{value:p,rest:_}}}function bbt(r,e){for(var t in r)if(r.hasOwnProperty(t)&&e(r[t]))return t}function xbt(r,e){for(var t=0;t{});function aH(r){return function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.match(r.matchPattern);if(!n)return null;var i=n[0],o=e.match(r.parsePattern);if(!o)return null;var a=r.valueCallback?r.valueCallback(o[0]):o[0];a=t.valueCallback?t.valueCallback(a):a;var u=e.slice(i.length);return{value:a,rest:u}}}var Cye=Pe(()=>{});var _bt,wbt,Sbt,kbt,Tbt,Ebt,Cbt,Abt,Dbt,Obt,Ibt,Mbt,Pbt,Aye,Dye=Pe(()=>{Eye();Cye();_bt=/^(\d+)(th|st|nd|rd)?/i,wbt=/\d+/i,Sbt={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},kbt={any:[/^b/i,/^(a|c)/i]},Tbt={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Ebt={any:[/1/i,/2/i,/3/i,/4/i]},Cbt={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Abt={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Dbt={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Obt={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Ibt={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Mbt={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Pbt={ordinalNumber:aH({matchPattern:_bt,parsePattern:wbt,valueCallback:function(r){return parseInt(r,10)}}),era:ix({matchPatterns:Sbt,defaultMatchWidth:"wide",parsePatterns:kbt,defaultParseWidth:"any"}),quarter:ix({matchPatterns:Tbt,defaultMatchWidth:"wide",parsePatterns:Ebt,defaultParseWidth:"any",valueCallback:function(r){return r+1}}),month:ix({matchPatterns:Cbt,defaultMatchWidth:"wide",parsePatterns:Abt,defaultParseWidth:"any"}),day:ix({matchPatterns:Dbt,defaultMatchWidth:"wide",parsePatterns:Obt,defaultParseWidth:"any"}),dayPeriod:ix({matchPatterns:Ibt,defaultMatchWidth:"any",parsePatterns:Mbt,defaultParseWidth:"any"})},Aye=Pbt});var Lbt,ZP,sH=Pe(()=>{vye();xye();wye();Tye();Dye();Lbt={code:"en-US",formatDistance:gye,formatLong:bye,formatRelative:_ye,localize:kye,match:Aye,options:{weekStartsOn:0,firstWeekContainsDate:1}},ZP=Lbt});function nC(r,e){Cr(2,arguments);var t=ei(e);return Up(r,-t)}var lH=Pe(()=>{Hl();mw();Qn()});function uH(r){Cr(1,arguments);var e=Zr(r),t=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var n=e.getTime(),i=t-n;return Math.floor(i/Rbt)+1}var Rbt,Oye=Pe(()=>{Xi();Qn();Rbt=864e5});function Im(r){Cr(1,arguments);var e=1,t=Zr(r),n=t.getUTCDay(),i=(n{Xi();Qn()});function oC(r){Cr(1,arguments);var e=Zr(r),t=e.getUTCFullYear(),n=new Date(0);n.setUTCFullYear(t+1,0,4),n.setUTCHours(0,0,0,0);var i=Im(n),o=new Date(0);o.setUTCFullYear(t,0,4),o.setUTCHours(0,0,0,0);var a=Im(o);return e.getTime()>=i.getTime()?t+1:e.getTime()>=a.getTime()?t:t-1}var cH=Pe(()=>{Xi();Qn();iC()});function fH(r){Cr(1,arguments);var e=oC(r),t=new Date(0);t.setUTCFullYear(e,0,4),t.setUTCHours(0,0,0,0);var n=Im(t);return n}var Iye=Pe(()=>{cH();iC();Qn()});function aC(r){Cr(1,arguments);var e=Zr(r),t=Im(e).getTime()-fH(e).getTime();return Math.round(t/Fbt)+1}var Fbt,hH=Pe(()=>{Xi();iC();Iye();Qn();Fbt=6048e5});function Hp(r,e){Cr(1,arguments);var t=e||{},n=t.locale,i=n&&n.options&&n.options.weekStartsOn,o=i==null?0:ei(i),a=t.weekStartsOn==null?o:ei(t.weekStartsOn);if(!(a>=0&&a<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var u=Zr(r),h=u.getUTCDay(),p=(h{Xi();Qn();Hl()});function ox(r,e){Cr(1,arguments);var t=Zr(r),n=t.getUTCFullYear(),i=e||{},o=i.locale,a=o&&o.options&&o.options.firstWeekContainsDate,u=a==null?1:ei(a),h=i.firstWeekContainsDate==null?u:ei(i.firstWeekContainsDate);if(!(h>=1&&h<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var p=new Date(0);p.setUTCFullYear(n+1,0,h),p.setUTCHours(0,0,0,0);var _=Hp(p,e),T=new Date(0);T.setUTCFullYear(n,0,h),T.setUTCHours(0,0,0,0);var O=Hp(T,e);return t.getTime()>=_.getTime()?n+1:t.getTime()>=O.getTime()?n:n-1}var XP=Pe(()=>{Xi();Qn();sC();Hl()});function dH(r,e){Cr(1,arguments);var t=e||{},n=t.locale,i=n&&n.options&&n.options.firstWeekContainsDate,o=i==null?1:ei(i),a=t.firstWeekContainsDate==null?o:ei(t.firstWeekContainsDate),u=ox(r,e),h=new Date(0);h.setUTCFullYear(u,0,a),h.setUTCHours(0,0,0,0);var p=Hp(h,e);return p}var Mye=Pe(()=>{XP();Qn();sC();Hl()});function lC(r,e){Cr(1,arguments);var t=Zr(r),n=Hp(t,e).getTime()-dH(t,e).getTime();return Math.round(n/Nbt)+1}var Nbt,pH=Pe(()=>{Xi();sC();Mye();Qn();Nbt=6048e5});function Ea(r,e){for(var t=r<0?"-":"",n=Math.abs(r).toString();n.length{});var qbt,zv,Pye=Pe(()=>{mH();qbt={y:function(r,e){var t=r.getUTCFullYear(),n=t>0?t:1-t;return Ea(e==="yy"?n%100:n,e.length)},M:function(r,e){var t=r.getUTCMonth();return e==="M"?String(t+1):Ea(t+1,2)},d:function(r,e){return Ea(r.getUTCDate(),e.length)},a:function(r,e){var t=r.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return t.toUpperCase();case"aaa":return t;case"aaaaa":return t[0];case"aaaa":default:return t==="am"?"a.m.":"p.m."}},h:function(r,e){return Ea(r.getUTCHours()%12||12,e.length)},H:function(r,e){return Ea(r.getUTCHours(),e.length)},m:function(r,e){return Ea(r.getUTCMinutes(),e.length)},s:function(r,e){return Ea(r.getUTCSeconds(),e.length)},S:function(r,e){var t=e.length,n=r.getUTCMilliseconds(),i=Math.floor(n*Math.pow(10,t-3));return Ea(i,e.length)}},zv=qbt});function Lye(r,e){var t=r>0?"-":"+",n=Math.abs(r),i=Math.floor(n/60),o=n%60;if(o===0)return t+String(i);var a=e||"";return t+String(i)+a+Ea(o,2)}function Rye(r,e){if(r%60===0){var t=r>0?"-":"+";return t+Ea(Math.abs(r)/60,2)}return ax(r,e)}function ax(r,e){var t=e||"",n=r>0?"-":"+",i=Math.abs(r),o=Ea(Math.floor(i/60),2),a=Ea(i%60,2);return n+o+t+a}var ww,Bbt,Fye,Nye=Pe(()=>{Oye();hH();cH();pH();XP();mH();Pye();ww={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Bbt={G:function(r,e,t){var n=r.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return t.era(n,{width:"abbreviated"});case"GGGGG":return t.era(n,{width:"narrow"});case"GGGG":default:return t.era(n,{width:"wide"})}},y:function(r,e,t){if(e==="yo"){var n=r.getUTCFullYear(),i=n>0?n:1-n;return t.ordinalNumber(i,{unit:"year"})}return zv.y(r,e)},Y:function(r,e,t,n){var i=ox(r,n),o=i>0?i:1-i;if(e==="YY"){var a=o%100;return Ea(a,2)}return e==="Yo"?t.ordinalNumber(o,{unit:"year"}):Ea(o,e.length)},R:function(r,e){var t=oC(r);return Ea(t,e.length)},u:function(r,e){var t=r.getUTCFullYear();return Ea(t,e.length)},Q:function(r,e,t){var n=Math.ceil((r.getUTCMonth()+1)/3);switch(e){case"Q":return String(n);case"QQ":return Ea(n,2);case"Qo":return t.ordinalNumber(n,{unit:"quarter"});case"QQQ":return t.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return t.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return t.quarter(n,{width:"wide",context:"formatting"})}},q:function(r,e,t){var n=Math.ceil((r.getUTCMonth()+1)/3);switch(e){case"q":return String(n);case"qq":return Ea(n,2);case"qo":return t.ordinalNumber(n,{unit:"quarter"});case"qqq":return t.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return t.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return t.quarter(n,{width:"wide",context:"standalone"})}},M:function(r,e,t){var n=r.getUTCMonth();switch(e){case"M":case"MM":return zv.M(r,e);case"Mo":return t.ordinalNumber(n+1,{unit:"month"});case"MMM":return t.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return t.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return t.month(n,{width:"wide",context:"formatting"})}},L:function(r,e,t){var n=r.getUTCMonth();switch(e){case"L":return String(n+1);case"LL":return Ea(n+1,2);case"Lo":return t.ordinalNumber(n+1,{unit:"month"});case"LLL":return t.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return t.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return t.month(n,{width:"wide",context:"standalone"})}},w:function(r,e,t,n){var i=lC(r,n);return e==="wo"?t.ordinalNumber(i,{unit:"week"}):Ea(i,e.length)},I:function(r,e,t){var n=aC(r);return e==="Io"?t.ordinalNumber(n,{unit:"week"}):Ea(n,e.length)},d:function(r,e,t){return e==="do"?t.ordinalNumber(r.getUTCDate(),{unit:"date"}):zv.d(r,e)},D:function(r,e,t){var n=uH(r);return e==="Do"?t.ordinalNumber(n,{unit:"dayOfYear"}):Ea(n,e.length)},E:function(r,e,t){var n=r.getUTCDay();switch(e){case"E":case"EE":case"EEE":return t.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return t.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return t.day(n,{width:"short",context:"formatting"});case"EEEE":default:return t.day(n,{width:"wide",context:"formatting"})}},e:function(r,e,t,n){var i=r.getUTCDay(),o=(i-n.weekStartsOn+8)%7||7;switch(e){case"e":return String(o);case"ee":return Ea(o,2);case"eo":return t.ordinalNumber(o,{unit:"day"});case"eee":return t.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return t.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return t.day(i,{width:"short",context:"formatting"});case"eeee":default:return t.day(i,{width:"wide",context:"formatting"})}},c:function(r,e,t,n){var i=r.getUTCDay(),o=(i-n.weekStartsOn+8)%7||7;switch(e){case"c":return String(o);case"cc":return Ea(o,e.length);case"co":return t.ordinalNumber(o,{unit:"day"});case"ccc":return t.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return t.day(i,{width:"narrow",context:"standalone"});case"cccccc":return t.day(i,{width:"short",context:"standalone"});case"cccc":default:return t.day(i,{width:"wide",context:"standalone"})}},i:function(r,e,t){var n=r.getUTCDay(),i=n===0?7:n;switch(e){case"i":return String(i);case"ii":return Ea(i,e.length);case"io":return t.ordinalNumber(i,{unit:"day"});case"iii":return t.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return t.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return t.day(n,{width:"short",context:"formatting"});case"iiii":default:return t.day(n,{width:"wide",context:"formatting"})}},a:function(r,e,t){var n=r.getUTCHours(),i=n/12>=1?"pm":"am";switch(e){case"a":case"aa":return t.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return t.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return t.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return t.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(r,e,t){var n=r.getUTCHours(),i;switch(n===12?i=ww.noon:n===0?i=ww.midnight:i=n/12>=1?"pm":"am",e){case"b":case"bb":return t.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return t.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return t.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return t.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(r,e,t){var n=r.getUTCHours(),i;switch(n>=17?i=ww.evening:n>=12?i=ww.afternoon:n>=4?i=ww.morning:i=ww.night,e){case"B":case"BB":case"BBB":return t.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return t.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return t.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(r,e,t){if(e==="ho"){var n=r.getUTCHours()%12;return n===0&&(n=12),t.ordinalNumber(n,{unit:"hour"})}return zv.h(r,e)},H:function(r,e,t){return e==="Ho"?t.ordinalNumber(r.getUTCHours(),{unit:"hour"}):zv.H(r,e)},K:function(r,e,t){var n=r.getUTCHours()%12;return e==="Ko"?t.ordinalNumber(n,{unit:"hour"}):Ea(n,e.length)},k:function(r,e,t){var n=r.getUTCHours();return n===0&&(n=24),e==="ko"?t.ordinalNumber(n,{unit:"hour"}):Ea(n,e.length)},m:function(r,e,t){return e==="mo"?t.ordinalNumber(r.getUTCMinutes(),{unit:"minute"}):zv.m(r,e)},s:function(r,e,t){return e==="so"?t.ordinalNumber(r.getUTCSeconds(),{unit:"second"}):zv.s(r,e)},S:function(r,e){return zv.S(r,e)},X:function(r,e,t,n){var i=n._originalDate||r,o=i.getTimezoneOffset();if(o===0)return"Z";switch(e){case"X":return Rye(o);case"XXXX":case"XX":return ax(o);case"XXXXX":case"XXX":default:return ax(o,":")}},x:function(r,e,t,n){var i=n._originalDate||r,o=i.getTimezoneOffset();switch(e){case"x":return Rye(o);case"xxxx":case"xx":return ax(o);case"xxxxx":case"xxx":default:return ax(o,":")}},O:function(r,e,t,n){var i=n._originalDate||r,o=i.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+Lye(o,":");case"OOOO":default:return"GMT"+ax(o,":")}},z:function(r,e,t,n){var i=n._originalDate||r,o=i.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+Lye(o,":");case"zzzz":default:return"GMT"+ax(o,":")}},t:function(r,e,t,n){var i=n._originalDate||r,o=Math.floor(i.getTime()/1e3);return Ea(o,e.length)},T:function(r,e,t,n){var i=n._originalDate||r,o=i.getTime();return Ea(o,e.length)}};Fye=Bbt});function qye(r,e){switch(r){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}}function Bye(r,e){switch(r){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}}function zbt(r,e){var t=r.match(/(P+)(p+)?/)||[],n=t[1],i=t[2];if(!i)return qye(r,e);var o;switch(n){case"P":o=e.dateTime({width:"short"});break;case"PP":o=e.dateTime({width:"medium"});break;case"PPP":o=e.dateTime({width:"long"});break;case"PPPP":default:o=e.dateTime({width:"full"});break}return o.replace("{{date}}",qye(n,e)).replace("{{time}}",Bye(i,e))}var jbt,JP,gH=Pe(()=>{jbt={p:Bye,P:zbt},JP=jbt});function QP(r){return Ubt.indexOf(r)!==-1}function eL(r){return Hbt.indexOf(r)!==-1}function Sw(r,e,t){if(r==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(t,"`; see: https://git.io/fxCyr"));if(r==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(t,"`; see: https://git.io/fxCyr"));if(r==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(t,"`; see: https://git.io/fxCyr"));if(r==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(t,"`; see: https://git.io/fxCyr"))}var Ubt,Hbt,vH=Pe(()=>{Ubt=["D","DD"],Hbt=["YY","YYYY"]});function tL(r,e,t){Cr(2,arguments);var n=String(e),i=t||{},o=i.locale||ZP,a=o.options&&o.options.firstWeekContainsDate,u=a==null?1:ei(a),h=i.firstWeekContainsDate==null?u:ei(i.firstWeekContainsDate);if(!(h>=1&&h<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var p=o.options&&o.options.weekStartsOn,_=p==null?0:ei(p),T=i.weekStartsOn==null?_:ei(i.weekStartsOn);if(!(T>=0&&T<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!o.localize)throw new RangeError("locale must contain localize property");if(!o.formatLong)throw new RangeError("locale must contain formatLong property");var O=Zr(r);if(!gw(O))throw new RangeError("Invalid time value");var L=cb(O),q=nC(O,L),U={firstWeekContainsDate:h,weekStartsOn:T,locale:o,_originalDate:O},Z=n.match(Vbt).map(function(te){var ie=te[0];if(ie==="p"||ie==="P"){var ue=JP[ie];return ue(te,o.formatLong,U)}return te}).join("").match(Wbt).map(function(te){if(te==="''")return"'";var ie=te[0];if(ie==="'")return Ybt(te);var ue=Fye[ie];if(ue)return!i.useAdditionalWeekYearTokens&&eL(te)&&Sw(te,e,r),!i.useAdditionalDayOfYearTokens&&QP(te)&&Sw(te,e,r),ue(q,te,o.localize,U);if(ie.match(Gbt))throw new RangeError("Format string contains an unescaped latin alphabet character `"+ie+"`");return te}).join("");return Z}function Ybt(r){return r.match($bt)[1].replace(Kbt,"'")}var Wbt,Vbt,$bt,Kbt,Gbt,zye=Pe(()=>{JU();sH();lH();Xi();Nye();gH();AP();vH();Hl();Qn();Wbt=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Vbt=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,$bt=/^'([^]*?)'?$/,Kbt=/''/g,Gbt=/[a-zA-Z]/});function yH(r,e){if(r==null)throw new TypeError("assign requires that input parameter not be null or undefined");e=e||{};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t]);return r}var jye=Pe(()=>{});function uC(r,e,t){Cr(2,arguments);var n=t||{},i=n.locale,o=i&&i.options&&i.options.weekStartsOn,a=o==null?0:ei(o),u=n.weekStartsOn==null?a:ei(n.weekStartsOn);if(!(u>=0&&u<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=Zr(r),p=ei(e),_=h.getUTCDay(),T=p%7,O=(T+7)%7,L=(O{Xi();Qn();Hl()});function bH(r,e){Cr(2,arguments);var t=ei(e);t%7===0&&(t=t-7);var n=1,i=Zr(r),o=i.getUTCDay(),a=t%7,u=(a+7)%7,h=(u{Xi();Qn();Hl()});function xH(r,e){Cr(2,arguments);var t=Zr(r),n=ei(e),i=aC(t)-n;return t.setUTCDate(t.getUTCDate()-i*7),t}var Wye=Pe(()=>{Hl();Xi();hH();Qn()});function _H(r,e,t){Cr(2,arguments);var n=Zr(r),i=ei(e),o=lC(n,t)-i;return n.setUTCDate(n.getUTCDate()-o*7),n}var Vye=Pe(()=>{Hl();Xi();pH();Qn()});function Wl(r,e,t){var n=e.match(r);if(!n)return null;var i=parseInt(n[0],10);return{value:t?t(i):i,rest:e.slice(n[0].length)}}function Cg(r,e){var t=e.match(r);if(!t)return null;if(t[0]==="Z")return{value:0,rest:e.slice(1)};var n=t[1]==="+"?1:-1,i=t[2]?parseInt(t[2],10):0,o=t[3]?parseInt(t[3],10):0,a=t[5]?parseInt(t[5],10):0;return{value:n*(i*Zbt+o*Xbt+a*Jbt),rest:e.slice(t[0].length)}}function $ye(r,e){return Wl(Uu.anyDigitsSigned,r,e)}function yu(r,e,t){switch(r){case 1:return Wl(Uu.singleDigit,e,t);case 2:return Wl(Uu.twoDigits,e,t);case 3:return Wl(Uu.threeDigits,e,t);case 4:return Wl(Uu.fourDigits,e,t);default:return Wl(new RegExp("^\\d{1,"+r+"}"),e,t)}}function rL(r,e,t){switch(r){case 1:return Wl(Uu.singleDigitSigned,e,t);case 2:return Wl(Uu.twoDigitsSigned,e,t);case 3:return Wl(Uu.threeDigitsSigned,e,t);case 4:return Wl(Uu.fourDigitsSigned,e,t);default:return Wl(new RegExp("^-?\\d{1,"+r+"}"),e,t)}}function wH(r){switch(r){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function Kye(r,e){var t=e>0,n=t?e:1-e,i;if(n<=50)i=r||100;else{var o=n+50,a=Math.floor(o/100)*100,u=r>=o%100;i=r+a-(u?100:0)}return t?i:1-i}function Gye(r){return r%400===0||r%4===0&&r%100!==0}var Zbt,Xbt,Jbt,Uu,Eg,Qbt,e0t,t0t,Yye,Zye=Pe(()=>{XP();Uye();Hye();Wye();Vye();iC();sC();Zbt=36e5,Xbt=6e4,Jbt=1e3,Uu={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},Eg={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};Qbt=[31,28,31,30,31,30,31,31,30,31,30,31],e0t=[31,29,31,30,31,30,31,31,30,31,30,31];t0t={G:{priority:140,parse:function(r,e,t,n){switch(e){case"G":case"GG":case"GGG":return t.era(r,{width:"abbreviated"})||t.era(r,{width:"narrow"});case"GGGGG":return t.era(r,{width:"narrow"});case"GGGG":default:return t.era(r,{width:"wide"})||t.era(r,{width:"abbreviated"})||t.era(r,{width:"narrow"})}},set:function(r,e,t,n){return e.era=t,r.setUTCFullYear(t,0,1),r.setUTCHours(0,0,0,0),r},incompatibleTokens:["R","u","t","T"]},y:{priority:130,parse:function(r,e,t,n){var i=function(o){return{year:o,isTwoDigitYear:e==="yy"}};switch(e){case"y":return yu(4,r,i);case"yo":return t.ordinalNumber(r,{unit:"year",valueCallback:i});default:return yu(e.length,r,i)}},validate:function(r,e,t){return e.isTwoDigitYear||e.year>0},set:function(r,e,t,n){var i=r.getUTCFullYear();if(t.isTwoDigitYear){var o=Kye(t.year,i);return r.setUTCFullYear(o,0,1),r.setUTCHours(0,0,0,0),r}var a=!("era"in e)||e.era===1?t.year:1-t.year;return r.setUTCFullYear(a,0,1),r.setUTCHours(0,0,0,0),r},incompatibleTokens:["Y","R","u","w","I","i","e","c","t","T"]},Y:{priority:130,parse:function(r,e,t,n){var i=function(o){return{year:o,isTwoDigitYear:e==="YY"}};switch(e){case"Y":return yu(4,r,i);case"Yo":return t.ordinalNumber(r,{unit:"year",valueCallback:i});default:return yu(e.length,r,i)}},validate:function(r,e,t){return e.isTwoDigitYear||e.year>0},set:function(r,e,t,n){var i=ox(r,n);if(t.isTwoDigitYear){var o=Kye(t.year,i);return r.setUTCFullYear(o,0,n.firstWeekContainsDate),r.setUTCHours(0,0,0,0),Hp(r,n)}var a=!("era"in e)||e.era===1?t.year:1-t.year;return r.setUTCFullYear(a,0,n.firstWeekContainsDate),r.setUTCHours(0,0,0,0),Hp(r,n)},incompatibleTokens:["y","R","u","Q","q","M","L","I","d","D","i","t","T"]},R:{priority:130,parse:function(r,e,t,n){return rL(e==="R"?4:e.length,r)},set:function(r,e,t,n){var i=new Date(0);return i.setUTCFullYear(t,0,4),i.setUTCHours(0,0,0,0),Im(i)},incompatibleTokens:["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]},u:{priority:130,parse:function(r,e,t,n){return rL(e==="u"?4:e.length,r)},set:function(r,e,t,n){return r.setUTCFullYear(t,0,1),r.setUTCHours(0,0,0,0),r},incompatibleTokens:["G","y","Y","R","w","I","i","e","c","t","T"]},Q:{priority:120,parse:function(r,e,t,n){switch(e){case"Q":case"QQ":return yu(e.length,r);case"Qo":return t.ordinalNumber(r,{unit:"quarter"});case"QQQ":return t.quarter(r,{width:"abbreviated",context:"formatting"})||t.quarter(r,{width:"narrow",context:"formatting"});case"QQQQQ":return t.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return t.quarter(r,{width:"wide",context:"formatting"})||t.quarter(r,{width:"abbreviated",context:"formatting"})||t.quarter(r,{width:"narrow",context:"formatting"})}},validate:function(r,e,t){return e>=1&&e<=4},set:function(r,e,t,n){return r.setUTCMonth((t-1)*3,1),r.setUTCHours(0,0,0,0),r},incompatibleTokens:["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]},q:{priority:120,parse:function(r,e,t,n){switch(e){case"q":case"qq":return yu(e.length,r);case"qo":return t.ordinalNumber(r,{unit:"quarter"});case"qqq":return t.quarter(r,{width:"abbreviated",context:"standalone"})||t.quarter(r,{width:"narrow",context:"standalone"});case"qqqqq":return t.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return t.quarter(r,{width:"wide",context:"standalone"})||t.quarter(r,{width:"abbreviated",context:"standalone"})||t.quarter(r,{width:"narrow",context:"standalone"})}},validate:function(r,e,t){return e>=1&&e<=4},set:function(r,e,t,n){return r.setUTCMonth((t-1)*3,1),r.setUTCHours(0,0,0,0),r},incompatibleTokens:["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]},M:{priority:110,parse:function(r,e,t,n){var i=function(o){return o-1};switch(e){case"M":return Wl(Uu.month,r,i);case"MM":return yu(2,r,i);case"Mo":return t.ordinalNumber(r,{unit:"month",valueCallback:i});case"MMM":return t.month(r,{width:"abbreviated",context:"formatting"})||t.month(r,{width:"narrow",context:"formatting"});case"MMMMM":return t.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return t.month(r,{width:"wide",context:"formatting"})||t.month(r,{width:"abbreviated",context:"formatting"})||t.month(r,{width:"narrow",context:"formatting"})}},validate:function(r,e,t){return e>=0&&e<=11},set:function(r,e,t,n){return r.setUTCMonth(t,1),r.setUTCHours(0,0,0,0),r},incompatibleTokens:["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]},L:{priority:110,parse:function(r,e,t,n){var i=function(o){return o-1};switch(e){case"L":return Wl(Uu.month,r,i);case"LL":return yu(2,r,i);case"Lo":return t.ordinalNumber(r,{unit:"month",valueCallback:i});case"LLL":return t.month(r,{width:"abbreviated",context:"standalone"})||t.month(r,{width:"narrow",context:"standalone"});case"LLLLL":return t.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return t.month(r,{width:"wide",context:"standalone"})||t.month(r,{width:"abbreviated",context:"standalone"})||t.month(r,{width:"narrow",context:"standalone"})}},validate:function(r,e,t){return e>=0&&e<=11},set:function(r,e,t,n){return r.setUTCMonth(t,1),r.setUTCHours(0,0,0,0),r},incompatibleTokens:["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]},w:{priority:100,parse:function(r,e,t,n){switch(e){case"w":return Wl(Uu.week,r);case"wo":return t.ordinalNumber(r,{unit:"week"});default:return yu(e.length,r)}},validate:function(r,e,t){return e>=1&&e<=53},set:function(r,e,t,n){return Hp(_H(r,t,n),n)},incompatibleTokens:["y","R","u","q","Q","M","L","I","d","D","i","t","T"]},I:{priority:100,parse:function(r,e,t,n){switch(e){case"I":return Wl(Uu.week,r);case"Io":return t.ordinalNumber(r,{unit:"week"});default:return yu(e.length,r)}},validate:function(r,e,t){return e>=1&&e<=53},set:function(r,e,t,n){return Im(xH(r,t,n),n)},incompatibleTokens:["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]},d:{priority:90,subPriority:1,parse:function(r,e,t,n){switch(e){case"d":return Wl(Uu.date,r);case"do":return t.ordinalNumber(r,{unit:"date"});default:return yu(e.length,r)}},validate:function(r,e,t){var n=r.getUTCFullYear(),i=Gye(n),o=r.getUTCMonth();return i?e>=1&&e<=e0t[o]:e>=1&&e<=Qbt[o]},set:function(r,e,t,n){return r.setUTCDate(t),r.setUTCHours(0,0,0,0),r},incompatibleTokens:["Y","R","q","Q","w","I","D","i","e","c","t","T"]},D:{priority:90,subPriority:1,parse:function(r,e,t,n){switch(e){case"D":case"DD":return Wl(Uu.dayOfYear,r);case"Do":return t.ordinalNumber(r,{unit:"date"});default:return yu(e.length,r)}},validate:function(r,e,t){var n=r.getUTCFullYear(),i=Gye(n);return i?e>=1&&e<=366:e>=1&&e<=365},set:function(r,e,t,n){return r.setUTCMonth(0,t),r.setUTCHours(0,0,0,0),r},incompatibleTokens:["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]},E:{priority:90,parse:function(r,e,t,n){switch(e){case"E":case"EE":case"EEE":return t.day(r,{width:"abbreviated",context:"formatting"})||t.day(r,{width:"short",context:"formatting"})||t.day(r,{width:"narrow",context:"formatting"});case"EEEEE":return t.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return t.day(r,{width:"short",context:"formatting"})||t.day(r,{width:"narrow",context:"formatting"});case"EEEE":default:return t.day(r,{width:"wide",context:"formatting"})||t.day(r,{width:"abbreviated",context:"formatting"})||t.day(r,{width:"short",context:"formatting"})||t.day(r,{width:"narrow",context:"formatting"})}},validate:function(r,e,t){return e>=0&&e<=6},set:function(r,e,t,n){return r=uC(r,t,n),r.setUTCHours(0,0,0,0),r},incompatibleTokens:["D","i","e","c","t","T"]},e:{priority:90,parse:function(r,e,t,n){var i=function(o){var a=Math.floor((o-1)/7)*7;return(o+n.weekStartsOn+6)%7+a};switch(e){case"e":case"ee":return yu(e.length,r,i);case"eo":return t.ordinalNumber(r,{unit:"day",valueCallback:i});case"eee":return t.day(r,{width:"abbreviated",context:"formatting"})||t.day(r,{width:"short",context:"formatting"})||t.day(r,{width:"narrow",context:"formatting"});case"eeeee":return t.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return t.day(r,{width:"short",context:"formatting"})||t.day(r,{width:"narrow",context:"formatting"});case"eeee":default:return t.day(r,{width:"wide",context:"formatting"})||t.day(r,{width:"abbreviated",context:"formatting"})||t.day(r,{width:"short",context:"formatting"})||t.day(r,{width:"narrow",context:"formatting"})}},validate:function(r,e,t){return e>=0&&e<=6},set:function(r,e,t,n){return r=uC(r,t,n),r.setUTCHours(0,0,0,0),r},incompatibleTokens:["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]},c:{priority:90,parse:function(r,e,t,n){var i=function(o){var a=Math.floor((o-1)/7)*7;return(o+n.weekStartsOn+6)%7+a};switch(e){case"c":case"cc":return yu(e.length,r,i);case"co":return t.ordinalNumber(r,{unit:"day",valueCallback:i});case"ccc":return t.day(r,{width:"abbreviated",context:"standalone"})||t.day(r,{width:"short",context:"standalone"})||t.day(r,{width:"narrow",context:"standalone"});case"ccccc":return t.day(r,{width:"narrow",context:"standalone"});case"cccccc":return t.day(r,{width:"short",context:"standalone"})||t.day(r,{width:"narrow",context:"standalone"});case"cccc":default:return t.day(r,{width:"wide",context:"standalone"})||t.day(r,{width:"abbreviated",context:"standalone"})||t.day(r,{width:"short",context:"standalone"})||t.day(r,{width:"narrow",context:"standalone"})}},validate:function(r,e,t){return e>=0&&e<=6},set:function(r,e,t,n){return r=uC(r,t,n),r.setUTCHours(0,0,0,0),r},incompatibleTokens:["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]},i:{priority:90,parse:function(r,e,t,n){var i=function(o){return o===0?7:o};switch(e){case"i":case"ii":return yu(e.length,r);case"io":return t.ordinalNumber(r,{unit:"day"});case"iii":return t.day(r,{width:"abbreviated",context:"formatting",valueCallback:i})||t.day(r,{width:"short",context:"formatting",valueCallback:i})||t.day(r,{width:"narrow",context:"formatting",valueCallback:i});case"iiiii":return t.day(r,{width:"narrow",context:"formatting",valueCallback:i});case"iiiiii":return t.day(r,{width:"short",context:"formatting",valueCallback:i})||t.day(r,{width:"narrow",context:"formatting",valueCallback:i});case"iiii":default:return t.day(r,{width:"wide",context:"formatting",valueCallback:i})||t.day(r,{width:"abbreviated",context:"formatting",valueCallback:i})||t.day(r,{width:"short",context:"formatting",valueCallback:i})||t.day(r,{width:"narrow",context:"formatting",valueCallback:i})}},validate:function(r,e,t){return e>=1&&e<=7},set:function(r,e,t,n){return r=bH(r,t,n),r.setUTCHours(0,0,0,0),r},incompatibleTokens:["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]},a:{priority:80,parse:function(r,e,t,n){switch(e){case"a":case"aa":case"aaa":return t.dayPeriod(r,{width:"abbreviated",context:"formatting"})||t.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaaa":return t.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return t.dayPeriod(r,{width:"wide",context:"formatting"})||t.dayPeriod(r,{width:"abbreviated",context:"formatting"})||t.dayPeriod(r,{width:"narrow",context:"formatting"})}},set:function(r,e,t,n){return r.setUTCHours(wH(t),0,0,0),r},incompatibleTokens:["b","B","H","k","t","T"]},b:{priority:80,parse:function(r,e,t,n){switch(e){case"b":case"bb":case"bbb":return t.dayPeriod(r,{width:"abbreviated",context:"formatting"})||t.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbbb":return t.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbb":default:return t.dayPeriod(r,{width:"wide",context:"formatting"})||t.dayPeriod(r,{width:"abbreviated",context:"formatting"})||t.dayPeriod(r,{width:"narrow",context:"formatting"})}},set:function(r,e,t,n){return r.setUTCHours(wH(t),0,0,0),r},incompatibleTokens:["a","B","H","k","t","T"]},B:{priority:80,parse:function(r,e,t,n){switch(e){case"B":case"BB":case"BBB":return t.dayPeriod(r,{width:"abbreviated",context:"formatting"})||t.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBBB":return t.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBB":default:return t.dayPeriod(r,{width:"wide",context:"formatting"})||t.dayPeriod(r,{width:"abbreviated",context:"formatting"})||t.dayPeriod(r,{width:"narrow",context:"formatting"})}},set:function(r,e,t,n){return r.setUTCHours(wH(t),0,0,0),r},incompatibleTokens:["a","b","t","T"]},h:{priority:70,parse:function(r,e,t,n){switch(e){case"h":return Wl(Uu.hour12h,r);case"ho":return t.ordinalNumber(r,{unit:"hour"});default:return yu(e.length,r)}},validate:function(r,e,t){return e>=1&&e<=12},set:function(r,e,t,n){var i=r.getUTCHours()>=12;return i&&t<12?r.setUTCHours(t+12,0,0,0):!i&&t===12?r.setUTCHours(0,0,0,0):r.setUTCHours(t,0,0,0),r},incompatibleTokens:["H","K","k","t","T"]},H:{priority:70,parse:function(r,e,t,n){switch(e){case"H":return Wl(Uu.hour23h,r);case"Ho":return t.ordinalNumber(r,{unit:"hour"});default:return yu(e.length,r)}},validate:function(r,e,t){return e>=0&&e<=23},set:function(r,e,t,n){return r.setUTCHours(t,0,0,0),r},incompatibleTokens:["a","b","h","K","k","t","T"]},K:{priority:70,parse:function(r,e,t,n){switch(e){case"K":return Wl(Uu.hour11h,r);case"Ko":return t.ordinalNumber(r,{unit:"hour"});default:return yu(e.length,r)}},validate:function(r,e,t){return e>=0&&e<=11},set:function(r,e,t,n){var i=r.getUTCHours()>=12;return i&&t<12?r.setUTCHours(t+12,0,0,0):r.setUTCHours(t,0,0,0),r},incompatibleTokens:["h","H","k","t","T"]},k:{priority:70,parse:function(r,e,t,n){switch(e){case"k":return Wl(Uu.hour24h,r);case"ko":return t.ordinalNumber(r,{unit:"hour"});default:return yu(e.length,r)}},validate:function(r,e,t){return e>=1&&e<=24},set:function(r,e,t,n){var i=t<=24?t%24:t;return r.setUTCHours(i,0,0,0),r},incompatibleTokens:["a","b","h","H","K","t","T"]},m:{priority:60,parse:function(r,e,t,n){switch(e){case"m":return Wl(Uu.minute,r);case"mo":return t.ordinalNumber(r,{unit:"minute"});default:return yu(e.length,r)}},validate:function(r,e,t){return e>=0&&e<=59},set:function(r,e,t,n){return r.setUTCMinutes(t,0,0),r},incompatibleTokens:["t","T"]},s:{priority:50,parse:function(r,e,t,n){switch(e){case"s":return Wl(Uu.second,r);case"so":return t.ordinalNumber(r,{unit:"second"});default:return yu(e.length,r)}},validate:function(r,e,t){return e>=0&&e<=59},set:function(r,e,t,n){return r.setUTCSeconds(t,0),r},incompatibleTokens:["t","T"]},S:{priority:30,parse:function(r,e,t,n){var i=function(o){return Math.floor(o*Math.pow(10,-e.length+3))};return yu(e.length,r,i)},set:function(r,e,t,n){return r.setUTCMilliseconds(t),r},incompatibleTokens:["t","T"]},X:{priority:10,parse:function(r,e,t,n){switch(e){case"X":return Cg(Eg.basicOptionalMinutes,r);case"XX":return Cg(Eg.basic,r);case"XXXX":return Cg(Eg.basicOptionalSeconds,r);case"XXXXX":return Cg(Eg.extendedOptionalSeconds,r);case"XXX":default:return Cg(Eg.extended,r)}},set:function(r,e,t,n){return e.timestampIsSet?r:new Date(r.getTime()-t)},incompatibleTokens:["t","T","x"]},x:{priority:10,parse:function(r,e,t,n){switch(e){case"x":return Cg(Eg.basicOptionalMinutes,r);case"xx":return Cg(Eg.basic,r);case"xxxx":return Cg(Eg.basicOptionalSeconds,r);case"xxxxx":return Cg(Eg.extendedOptionalSeconds,r);case"xxx":default:return Cg(Eg.extended,r)}},set:function(r,e,t,n){return e.timestampIsSet?r:new Date(r.getTime()-t)},incompatibleTokens:["t","T","X"]},t:{priority:40,parse:function(r,e,t,n){return $ye(r)},set:function(r,e,t,n){return[new Date(t*1e3),{timestampIsSet:!0}]},incompatibleTokens:"*"},T:{priority:20,parse:function(r,e,t,n){return $ye(r)},set:function(r,e,t,n){return[new Date(t),{timestampIsSet:!0}]},incompatibleTokens:"*"}},Yye=t0t});function nL(r,e,t,n){Cr(3,arguments);var i=String(r),o=String(e),a=n||{},u=a.locale||ZP;if(!u.match)throw new RangeError("locale must contain match property");var h=u.options&&u.options.firstWeekContainsDate,p=h==null?1:ei(h),_=a.firstWeekContainsDate==null?p:ei(a.firstWeekContainsDate);if(!(_>=1&&_<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var T=u.options&&u.options.weekStartsOn,O=T==null?0:ei(T),L=a.weekStartsOn==null?O:ei(a.weekStartsOn);if(!(L>=0&&L<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(o==="")return i===""?Zr(t):new Date(NaN);var q={firstWeekContainsDate:_,weekStartsOn:L,locale:u},U=[{priority:r0t,subPriority:-1,set:u0t,index:0}],Z,te=o.match(i0t).map(function(H){var X=H[0];if(X==="p"||X==="P"){var me=JP[X];return me(H,u.formatLong,q)}return H}).join("").match(n0t),ie=[];for(Z=0;Z0&&s0t.test(i))return new Date(NaN);var Ue=U.map(function(H){return H.priority}).sort(function(H,X){return X-H}).filter(function(H,X,me){return me.indexOf(H)===X}).map(function(H){return U.filter(function(X){return X.priority===H}).sort(function(X,me){return me.subPriority-X.subPriority})}).map(function(H){return H[0]}),B=Zr(t);if(isNaN(B))return new Date(NaN);var re=nC(B,cb(B)),N={};for(Z=0;Z{sH();lH();Xi();jye();gH();AP();vH();Hl();Zye();Qn();r0t=10,n0t=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,i0t=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,o0t=/^'([^]*?)'?$/,a0t=/''/g,s0t=/\S/,l0t=/[a-zA-Z]/});function iL(r){Cr(1,arguments);var e=Zr(r);return e.setMinutes(0,0,0),e}var Jye=Pe(()=>{Xi();Qn()});function oL(r){Cr(1,arguments);var e=Zr(r);return e.setMilliseconds(0),e}var Qye=Pe(()=>{Xi();Qn()});function sL(r,e){Cr(1,arguments);var t=e||{},n=t.additionalDigits==null?2:ei(t.additionalDigits);if(n!==2&&n!==1&&n!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(!(typeof r=="string"||Object.prototype.toString.call(r)==="[object String]"))return new Date(NaN);var i=p0t(r),o;if(i.date){var a=m0t(i.date,n);o=g0t(a.restDateString,a.year)}if(!o||isNaN(o.getTime()))return new Date(NaN);var u=o.getTime(),h=0,p;if(i.time&&(h=v0t(i.time),isNaN(h)))return new Date(NaN);if(i.timezone){if(p=y0t(i.timezone),isNaN(p))return new Date(NaN)}else{var _=new Date(u+h),T=new Date(0);return T.setFullYear(_.getUTCFullYear(),_.getUTCMonth(),_.getUTCDate()),T.setHours(_.getUTCHours(),_.getUTCMinutes(),_.getUTCSeconds(),_.getUTCMilliseconds()),T}return new Date(u+h+p)}function p0t(r){var e={},t=r.split(aL.dateTimeDelimiter),n;if(t.length>2)return e;if(/:/.test(t[0])?n=t[0]:(e.date=t[0],n=t[1],aL.timeZoneDelimiter.test(e.date)&&(e.date=r.split(aL.timeZoneDelimiter)[0],n=r.substr(e.date.length,r.length))),n){var i=aL.timezone.exec(n);i?(e.time=n.replace(i[1],""),e.timezone=i[1]):e.time=n}return e}function m0t(r,e){var t=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),n=r.match(t);if(!n)return{year:NaN,restDateString:""};var i=n[1]?parseInt(n[1]):null,o=n[2]?parseInt(n[2]):null;return{year:o===null?i:o*100,restDateString:r.slice((n[1]||n[2]).length)}}function g0t(r,e){if(e===null)return new Date(NaN);var t=r.match(f0t);if(!t)return new Date(NaN);var n=!!t[4],i=cC(t[1]),o=cC(t[2])-1,a=cC(t[3]),u=cC(t[4]),h=cC(t[5])-1;if(n)return S0t(e,u,h)?b0t(e,u,h):new Date(NaN);var p=new Date(0);return!_0t(e,o,a)||!w0t(e,i)?new Date(NaN):(p.setUTCFullYear(e,o,Math.max(i,a)),p)}function cC(r){return r?parseInt(r):1}function v0t(r){var e=r.match(h0t);if(!e)return NaN;var t=SH(e[1]),n=SH(e[2]),i=SH(e[3]);return k0t(t,n,i)?t*QE+n*JE+i*1e3:NaN}function SH(r){return r&&parseFloat(r.replace(",","."))||0}function y0t(r){if(r==="Z")return 0;var e=r.match(d0t);if(!e)return 0;var t=e[1]==="+"?-1:1,n=parseInt(e[2]),i=e[3]&&parseInt(e[3])||0;return T0t(n,i)?t*(n*QE+i*JE):NaN}function b0t(r,e,t){var n=new Date(0);n.setUTCFullYear(r,0,4);var i=n.getUTCDay()||7,o=(e-1)*7+t+1-i;return n.setUTCDate(n.getUTCDate()+o),n}function ebe(r){return r%400===0||r%4===0&&r%100!==0}function _0t(r,e,t){return e>=0&&e<=11&&t>=1&&t<=(x0t[e]||(ebe(r)?29:28))}function w0t(r,e){return e>=1&&e<=(ebe(r)?366:365)}function S0t(r,e,t){return e>=1&&e<=53&&t>=0&&t<=6}function k0t(r,e,t){return r===24?e===0&&t===0:t>=0&&t<60&&e>=0&&e<60&&r>=0&&r<25}function T0t(r,e){return e>=0&&e<=59}var aL,f0t,h0t,d0t,x0t,tbe=Pe(()=>{eC();Qn();Hl();aL={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},f0t=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,h0t=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,d0t=/^([+-])(\d{2})(?::?(\d{2}))?$/;x0t=[31,null,31,30,31,30,31,31,30,31,30,31]});var rbe=Pe(()=>{KU();zve();mw();Hve();EP();Wve();Vve();$ve();Kve();tH();Qve();tC();eye();oH();rye();nye();iye();oye();rH();fye();dye();nH();pye();mye();hye();cye();zye();JU();Xye();tbe();GU();Jye();aye();lye();sye();Qye();jve();uye();Xi();eC()});var E0t,nbe=Pe(()=>{$U();rbe();E0t={datetime:"MMM d, yyyy, h:mm:ss aaaa",millisecond:"h:mm:ss.SSS aaaa",second:"h:mm:ss aaaa",minute:"h:mm aaaa",hour:"ha",day:"MMM d",week:"PP",month:"MMM yyyy",quarter:"qqq - yyyy",year:"yyyy"};WU._date.override({_id:"date-fns",formats:function(){return E0t},parse:function(r,e){if(r===null||typeof r>"u")return null;let t=typeof r;return t==="number"||r instanceof Date?r=Zr(r):t==="string"&&(typeof e=="string"?r=nL(r,e,new Date,this.options):r=sL(r,this.options)),gw(r)?r.getTime():null},format:function(r,e){return tL(r,e,this.options)},add:function(r,e,t){switch(t){case"millisecond":return Up(r,e);case"second":return IP(r,e);case"minute":return DP(r,e);case"hour":return CP(r,e);case"day":return pw(r,e);case"week":return MP(r,e);case"month":return ub(r,e);case"quarter":return OP(r,e);case"year":return PP(r,e);default:return r}},diff:function(r,e,t){switch(t){case"millisecond":return kg(r,e);case"second":return NP(r,e);case"minute":return RP(r,e);case"hour":return LP(r,e);case"day":return vw(r,e);case"week":return qP(r,e);case"month":return _w(r,e);case"quarter":return FP(r,e);case"year":return BP(r,e);default:return 0}},startOf:function(r,e,t){switch(e){case"second":return oL(r);case"minute":return zP(r);case"hour":return iL(r);case"day":return rx(r);case"week":return XE(r);case"isoWeek":return XE(r,{weekStartsOn:+t});case"month":return UP(r);case"quarter":return jP(r);case"year":return HP(r);default:return r}},endOf:function(r,e){switch(e){case"second":return YP(r);case"minute":return KP(r);case"hour":return VP(r);case"day":return bw(r);case"week":return $P(r);case"month":return xw(r);case"quarter":return GP(r);case"year":return WP(r);default:return r}}})});var ibe,obe=Pe(()=>{ibe=ya(Pme());Bve();nbe();ibe.default.use(qve)});var abe=Pe(()=>{(function(r,e){typeof exports=="object"&&typeof module<"u"?module.exports=e():typeof define=="function"&&define.amd?define(e):(r=typeof globalThis<"u"?globalThis:r||self,r.Mapkick=e())})(void 0,function(){"use strict";function r(q,U){U===void 0&&(U={});var Z=U.insertAt;if(!(!q||typeof document>"u")){var te=document.head||document.getElementsByTagName("head")[0],ie=document.createElement("style");ie.type="text/css",Z==="top"&&te.firstChild?te.insertBefore(ie,te.firstChild):te.appendChild(ie),ie.styleSheet?ie.styleSheet.cssText=q:ie.appendChild(document.createTextNode(q))}}var e=`.mapboxgl-map{font:12px/20px Helvetica Neue,Arial,Helvetica,sans-serif;overflow:hidden;position:relative;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mapboxgl-canvas{position:absolute;left:0;top:0}.mapboxgl-map:-webkit-full-screen{width:100%;height:100%}.mapboxgl-canary{background-color:salmon}.mapboxgl-canvas-container.mapboxgl-interactive,.mapboxgl-ctrl-group button.mapboxgl-ctrl-compass{cursor:-webkit-grab;cursor:-moz-grab;cursor:grab;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.mapboxgl-canvas-container.mapboxgl-interactive.mapboxgl-track-pointer{cursor:pointer}.mapboxgl-canvas-container.mapboxgl-interactive:active,.mapboxgl-ctrl-group button.mapboxgl-ctrl-compass:active{cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate,.mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate .mapboxgl-canvas{touch-action:pan-x pan-y}.mapboxgl-canvas-container.mapboxgl-touch-drag-pan,.mapboxgl-canvas-container.mapboxgl-touch-drag-pan .mapboxgl-canvas{touch-action:pinch-zoom}.mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate.mapboxgl-touch-drag-pan,.mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate.mapboxgl-touch-drag-pan .mapboxgl-canvas{touch-action:none}.mapboxgl-ctrl-bottom-left,.mapboxgl-ctrl-bottom-right,.mapboxgl-ctrl-top-left,.mapboxgl-ctrl-top-right{position:absolute;pointer-events:none;z-index:2}.mapboxgl-ctrl-top-left{top:0;left:0}.mapboxgl-ctrl-top-right{top:0;right:0}.mapboxgl-ctrl-bottom-left{bottom:0;left:0}.mapboxgl-ctrl-bottom-right{right:0;bottom:0}.mapboxgl-ctrl{clear:both;pointer-events:auto;transform:translate(0)}.mapboxgl-ctrl-top-left .mapboxgl-ctrl{margin:10px 0 0 10px;float:left}.mapboxgl-ctrl-top-right .mapboxgl-ctrl{margin:10px 10px 0 0;float:right}.mapboxgl-ctrl-bottom-left .mapboxgl-ctrl{margin:0 0 10px 10px;float:left}.mapboxgl-ctrl-bottom-right .mapboxgl-ctrl{margin:0 10px 10px 0;float:right}.mapboxgl-ctrl-group{border-radius:4px;background:#fff}.mapboxgl-ctrl-group:not(:empty){-moz-box-shadow:0 0 2px rgba(0,0,0,.1);-webkit-box-shadow:0 0 2px rgba(0,0,0,.1);box-shadow:0 0 0 2px rgba(0,0,0,.1)}@media (-ms-high-contrast:active){.mapboxgl-ctrl-group:not(:empty){box-shadow:0 0 0 2px ButtonText}}.mapboxgl-ctrl-group button{width:29px;height:29px;display:block;padding:0;outline:none;border:0;box-sizing:border-box;background-color:transparent;cursor:pointer}.mapboxgl-ctrl-group button+button{border-top:1px solid #ddd}.mapboxgl-ctrl button .mapboxgl-ctrl-icon{display:block;width:100%;height:100%;background-repeat:no-repeat;background-position:50%}@media (-ms-high-contrast:active){.mapboxgl-ctrl-icon{background-color:transparent}.mapboxgl-ctrl-group button+button{border-top:1px solid ButtonText}}.mapboxgl-ctrl button::-moz-focus-inner{border:0;padding:0}.mapboxgl-ctrl-attrib-button:focus,.mapboxgl-ctrl-group button:focus{box-shadow:0 0 2px 2px #0096ff}.mapboxgl-ctrl button:disabled{cursor:not-allowed}.mapboxgl-ctrl button:disabled .mapboxgl-ctrl-icon{opacity:.25}.mapboxgl-ctrl button:not(:disabled):hover{background-color:rgba(0,0,0,.05)}.mapboxgl-ctrl-group button:focus:focus-visible{box-shadow:0 0 2px 2px #0096ff}.mapboxgl-ctrl-group button:focus:not(:focus-visible){box-shadow:none}.mapboxgl-ctrl-group button:focus:first-child{border-radius:4px 4px 0 0}.mapboxgl-ctrl-group button:focus:last-child{border-radius:0 0 4px 4px}.mapboxgl-ctrl-group button:focus:only-child{border-radius:inherit}.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-out .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23333'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-9z'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-in .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23333'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5z'/%3E%3C/svg%3E")}@media (-ms-high-contrast:active){.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-out .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23fff'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-9z'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-in .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23fff'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5z'/%3E%3C/svg%3E")}}@media (-ms-high-contrast:black-on-white){.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-out .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-9z'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-in .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5z'/%3E%3C/svg%3E")}}.mapboxgl-ctrl button.mapboxgl-ctrl-fullscreen .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23333'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3h1zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16h1zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5H13zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1V7.5z'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-shrink .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1h-5.5zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1v-5.5zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1v5.5zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1h5.5z'/%3E%3C/svg%3E")}@media (-ms-high-contrast:active){.mapboxgl-ctrl button.mapboxgl-ctrl-fullscreen .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23fff'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3h1zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16h1zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5H13zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1V7.5z'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-shrink .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23fff'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1h-5.5zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1v-5.5zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1v5.5zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1h5.5z'/%3E%3C/svg%3E")}}@media (-ms-high-contrast:black-on-white){.mapboxgl-ctrl button.mapboxgl-ctrl-fullscreen .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3h1zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16h1zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5H13zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1V7.5z'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-shrink .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1h-5.5zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1v-5.5zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1v5.5zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1h5.5z'/%3E%3C/svg%3E")}}.mapboxgl-ctrl button.mapboxgl-ctrl-compass .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23333'%3E%3Cpath d='M10.5 14l4-8 4 8h-8z'/%3E%3Cpath d='M10.5 16l4 8 4-8h-8z' fill='%23ccc'/%3E%3C/svg%3E")}@media (-ms-high-contrast:active){.mapboxgl-ctrl button.mapboxgl-ctrl-compass .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23fff'%3E%3Cpath d='M10.5 14l4-8 4 8h-8z'/%3E%3Cpath d='M10.5 16l4 8 4-8h-8z' fill='%23999'/%3E%3C/svg%3E")}}@media (-ms-high-contrast:black-on-white){.mapboxgl-ctrl button.mapboxgl-ctrl-compass .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10.5 14l4-8 4 8h-8z'/%3E%3Cpath d='M10.5 16l4 8 4-8h-8z' fill='%23ccc'/%3E%3C/svg%3E")}}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23333'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate:disabled .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23aaa'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath d='M14 5l1 1-9 9-1-1 9-9z' fill='red'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-active .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%2333b5e5'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-active-error .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23e58978'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-background .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%2333b5e5'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-background-error .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23e54e33'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-waiting .mapboxgl-ctrl-icon{-webkit-animation:mapboxgl-spin 2s linear infinite;-moz-animation:mapboxgl-spin 2s infinite linear;-o-animation:mapboxgl-spin 2s infinite linear;-ms-animation:mapboxgl-spin 2s infinite linear;animation:mapboxgl-spin 2s linear infinite}@media (-ms-high-contrast:active){.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23fff'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate:disabled .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23999'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath d='M14 5l1 1-9 9-1-1 9-9z' fill='red'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-active .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%2333b5e5'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-active-error .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23e58978'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-background .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%2333b5e5'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-background-error .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23e54e33'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3C/svg%3E")}}@media (-ms-high-contrast:black-on-white){.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate:disabled .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23666'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath d='M14 5l1 1-9 9-1-1 9-9z' fill='red'/%3E%3C/svg%3E")}}@-webkit-keyframes mapboxgl-spin{0%{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(1turn)}}@-moz-keyframes mapboxgl-spin{0%{-moz-transform:rotate(0deg)}to{-moz-transform:rotate(1turn)}}@-o-keyframes mapboxgl-spin{0%{-o-transform:rotate(0deg)}to{-o-transform:rotate(1turn)}}@-ms-keyframes mapboxgl-spin{0%{-ms-transform:rotate(0deg)}to{-ms-transform:rotate(1turn)}}@keyframes mapboxgl-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}a.mapboxgl-ctrl-logo{width:88px;height:23px;margin:0 0 -4px -4px;display:block;background-repeat:no-repeat;cursor:pointer;overflow:hidden;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='88' height='23' viewBox='0 0 88 23' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' fill-rule='evenodd'%3E%3Cdefs%3E%3Cpath id='a' d='M11.5 2.25c5.105 0 9.25 4.145 9.25 9.25s-4.145 9.25-9.25 9.25-9.25-4.145-9.25-9.25 4.145-9.25 9.25-9.25zM6.997 15.983c-.051-.338-.828-5.802 2.233-8.873a4.395 4.395 0 013.13-1.28c1.27 0 2.49.51 3.39 1.42.91.9 1.42 2.12 1.42 3.39 0 1.18-.449 2.301-1.28 3.13C12.72 16.93 7 16 7 16l-.003-.017zM15.3 10.5l-2 .8-.8 2-.8-2-2-.8 2-.8.8-2 .8 2 2 .8z'/%3E%3Cpath id='b' d='M50.63 8c.13 0 .23.1.23.23V9c.7-.76 1.7-1.18 2.73-1.18 2.17 0 3.95 1.85 3.95 4.17s-1.77 4.19-3.94 4.19c-1.04 0-2.03-.43-2.74-1.18v3.77c0 .13-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V8.23c0-.12.1-.23.23-.23h1.4zm-3.86.01c.01 0 .01 0 .01-.01.13 0 .22.1.22.22v7.55c0 .12-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V15c-.7.76-1.69 1.19-2.73 1.19-2.17 0-3.94-1.87-3.94-4.19 0-2.32 1.77-4.19 3.94-4.19 1.03 0 2.02.43 2.73 1.18v-.75c0-.12.1-.23.23-.23h1.4zm26.375-.19a4.24 4.24 0 00-4.16 3.29c-.13.59-.13 1.19 0 1.77a4.233 4.233 0 004.17 3.3c2.35 0 4.26-1.87 4.26-4.19 0-2.32-1.9-4.17-4.27-4.17zM60.63 5c.13 0 .23.1.23.23v3.76c.7-.76 1.7-1.18 2.73-1.18 1.88 0 3.45 1.4 3.84 3.28.13.59.13 1.2 0 1.8-.39 1.88-1.96 3.29-3.84 3.29-1.03 0-2.02-.43-2.73-1.18v.77c0 .12-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V5.23c0-.12.1-.23.23-.23h1.4zm-34 11h-1.4c-.13 0-.23-.11-.23-.23V8.22c.01-.13.1-.22.23-.22h1.4c.13 0 .22.11.23.22v.68c.5-.68 1.3-1.09 2.16-1.1h.03c1.09 0 2.09.6 2.6 1.55.45-.95 1.4-1.55 2.44-1.56 1.62 0 2.93 1.25 2.9 2.78l.03 5.2c0 .13-.1.23-.23.23h-1.41c-.13 0-.23-.11-.23-.23v-4.59c0-.98-.74-1.71-1.62-1.71-.8 0-1.46.7-1.59 1.62l.01 4.68c0 .13-.11.23-.23.23h-1.41c-.13 0-.23-.11-.23-.23v-4.59c0-.98-.74-1.71-1.62-1.71-.85 0-1.54.79-1.6 1.8v4.5c0 .13-.1.23-.23.23zm53.615 0h-1.61c-.04 0-.08-.01-.12-.03-.09-.06-.13-.19-.06-.28l2.43-3.71-2.39-3.65a.213.213 0 01-.03-.12c0-.12.09-.21.21-.21h1.61c.13 0 .24.06.3.17l1.41 2.37 1.4-2.37a.34.34 0 01.3-.17h1.6c.04 0 .08.01.12.03.09.06.13.19.06.28l-2.37 3.65 2.43 3.7c0 .05.01.09.01.13 0 .12-.09.21-.21.21h-1.61c-.13 0-.24-.06-.3-.17l-1.44-2.42-1.44 2.42a.34.34 0 01-.3.17zm-7.12-1.49c-1.33 0-2.42-1.12-2.42-2.51 0-1.39 1.08-2.52 2.42-2.52 1.33 0 2.42 1.12 2.42 2.51 0 1.39-1.08 2.51-2.42 2.52zm-19.865 0c-1.32 0-2.39-1.11-2.42-2.48v-.07c.02-1.38 1.09-2.49 2.4-2.49 1.32 0 2.41 1.12 2.41 2.51 0 1.39-1.07 2.52-2.39 2.53zm-8.11-2.48c-.01 1.37-1.09 2.47-2.41 2.47s-2.42-1.12-2.42-2.51c0-1.39 1.08-2.52 2.4-2.52 1.33 0 2.39 1.11 2.41 2.48l.02.08zm18.12 2.47c-1.32 0-2.39-1.11-2.41-2.48v-.06c.02-1.38 1.09-2.48 2.41-2.48s2.42 1.12 2.42 2.51c0 1.39-1.09 2.51-2.42 2.51z'/%3E%3C/defs%3E%3Cmask id='c'%3E%3Crect width='100%25' height='100%25' fill='%23fff'/%3E%3Cuse xlink:href='%23a'/%3E%3Cuse xlink:href='%23b'/%3E%3C/mask%3E%3Cg opacity='.3' stroke='%23000' stroke-width='3'%3E%3Ccircle mask='url(%23c)' cx='11.5' cy='11.5' r='9.25'/%3E%3Cuse xlink:href='%23b' mask='url(%23c)'/%3E%3C/g%3E%3Cg opacity='.9' fill='%23fff'%3E%3Cuse xlink:href='%23a'/%3E%3Cuse xlink:href='%23b'/%3E%3C/g%3E%3C/svg%3E")}a.mapboxgl-ctrl-logo.mapboxgl-compact{width:23px}@media (-ms-high-contrast:active){a.mapboxgl-ctrl-logo{background-color:transparent;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='88' height='23' viewBox='0 0 88 23' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' fill-rule='evenodd'%3E%3Cdefs%3E%3Cpath id='a' d='M11.5 2.25c5.105 0 9.25 4.145 9.25 9.25s-4.145 9.25-9.25 9.25-9.25-4.145-9.25-9.25 4.145-9.25 9.25-9.25zM6.997 15.983c-.051-.338-.828-5.802 2.233-8.873a4.395 4.395 0 013.13-1.28c1.27 0 2.49.51 3.39 1.42.91.9 1.42 2.12 1.42 3.39 0 1.18-.449 2.301-1.28 3.13C12.72 16.93 7 16 7 16l-.003-.017zM15.3 10.5l-2 .8-.8 2-.8-2-2-.8 2-.8.8-2 .8 2 2 .8z'/%3E%3Cpath id='b' d='M50.63 8c.13 0 .23.1.23.23V9c.7-.76 1.7-1.18 2.73-1.18 2.17 0 3.95 1.85 3.95 4.17s-1.77 4.19-3.94 4.19c-1.04 0-2.03-.43-2.74-1.18v3.77c0 .13-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V8.23c0-.12.1-.23.23-.23h1.4zm-3.86.01c.01 0 .01 0 .01-.01.13 0 .22.1.22.22v7.55c0 .12-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V15c-.7.76-1.69 1.19-2.73 1.19-2.17 0-3.94-1.87-3.94-4.19 0-2.32 1.77-4.19 3.94-4.19 1.03 0 2.02.43 2.73 1.18v-.75c0-.12.1-.23.23-.23h1.4zm26.375-.19a4.24 4.24 0 00-4.16 3.29c-.13.59-.13 1.19 0 1.77a4.233 4.233 0 004.17 3.3c2.35 0 4.26-1.87 4.26-4.19 0-2.32-1.9-4.17-4.27-4.17zM60.63 5c.13 0 .23.1.23.23v3.76c.7-.76 1.7-1.18 2.73-1.18 1.88 0 3.45 1.4 3.84 3.28.13.59.13 1.2 0 1.8-.39 1.88-1.96 3.29-3.84 3.29-1.03 0-2.02-.43-2.73-1.18v.77c0 .12-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V5.23c0-.12.1-.23.23-.23h1.4zm-34 11h-1.4c-.13 0-.23-.11-.23-.23V8.22c.01-.13.1-.22.23-.22h1.4c.13 0 .22.11.23.22v.68c.5-.68 1.3-1.09 2.16-1.1h.03c1.09 0 2.09.6 2.6 1.55.45-.95 1.4-1.55 2.44-1.56 1.62 0 2.93 1.25 2.9 2.78l.03 5.2c0 .13-.1.23-.23.23h-1.41c-.13 0-.23-.11-.23-.23v-4.59c0-.98-.74-1.71-1.62-1.71-.8 0-1.46.7-1.59 1.62l.01 4.68c0 .13-.11.23-.23.23h-1.41c-.13 0-.23-.11-.23-.23v-4.59c0-.98-.74-1.71-1.62-1.71-.85 0-1.54.79-1.6 1.8v4.5c0 .13-.1.23-.23.23zm53.615 0h-1.61c-.04 0-.08-.01-.12-.03-.09-.06-.13-.19-.06-.28l2.43-3.71-2.39-3.65a.213.213 0 01-.03-.12c0-.12.09-.21.21-.21h1.61c.13 0 .24.06.3.17l1.41 2.37 1.4-2.37a.34.34 0 01.3-.17h1.6c.04 0 .08.01.12.03.09.06.13.19.06.28l-2.37 3.65 2.43 3.7c0 .05.01.09.01.13 0 .12-.09.21-.21.21h-1.61c-.13 0-.24-.06-.3-.17l-1.44-2.42-1.44 2.42a.34.34 0 01-.3.17zm-7.12-1.49c-1.33 0-2.42-1.12-2.42-2.51 0-1.39 1.08-2.52 2.42-2.52 1.33 0 2.42 1.12 2.42 2.51 0 1.39-1.08 2.51-2.42 2.52zm-19.865 0c-1.32 0-2.39-1.11-2.42-2.48v-.07c.02-1.38 1.09-2.49 2.4-2.49 1.32 0 2.41 1.12 2.41 2.51 0 1.39-1.07 2.52-2.39 2.53zm-8.11-2.48c-.01 1.37-1.09 2.47-2.41 2.47s-2.42-1.12-2.42-2.51c0-1.39 1.08-2.52 2.4-2.52 1.33 0 2.39 1.11 2.41 2.48l.02.08zm18.12 2.47c-1.32 0-2.39-1.11-2.41-2.48v-.06c.02-1.38 1.09-2.48 2.41-2.48s2.42 1.12 2.42 2.51c0 1.39-1.09 2.51-2.42 2.51z'/%3E%3C/defs%3E%3Cmask id='c'%3E%3Crect width='100%25' height='100%25' fill='%23fff'/%3E%3Cuse xlink:href='%23a'/%3E%3Cuse xlink:href='%23b'/%3E%3C/mask%3E%3Cg stroke='%23000' stroke-width='3'%3E%3Ccircle mask='url(%23c)' cx='11.5' cy='11.5' r='9.25'/%3E%3Cuse xlink:href='%23b' mask='url(%23c)'/%3E%3C/g%3E%3Cg fill='%23fff'%3E%3Cuse xlink:href='%23a'/%3E%3Cuse xlink:href='%23b'/%3E%3C/g%3E%3C/svg%3E")}}@media (-ms-high-contrast:black-on-white){a.mapboxgl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='88' height='23' viewBox='0 0 88 23' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' fill-rule='evenodd'%3E%3Cdefs%3E%3Cpath id='a' d='M11.5 2.25c5.105 0 9.25 4.145 9.25 9.25s-4.145 9.25-9.25 9.25-9.25-4.145-9.25-9.25 4.145-9.25 9.25-9.25zM6.997 15.983c-.051-.338-.828-5.802 2.233-8.873a4.395 4.395 0 013.13-1.28c1.27 0 2.49.51 3.39 1.42.91.9 1.42 2.12 1.42 3.39 0 1.18-.449 2.301-1.28 3.13C12.72 16.93 7 16 7 16l-.003-.017zM15.3 10.5l-2 .8-.8 2-.8-2-2-.8 2-.8.8-2 .8 2 2 .8z'/%3E%3Cpath id='b' d='M50.63 8c.13 0 .23.1.23.23V9c.7-.76 1.7-1.18 2.73-1.18 2.17 0 3.95 1.85 3.95 4.17s-1.77 4.19-3.94 4.19c-1.04 0-2.03-.43-2.74-1.18v3.77c0 .13-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V8.23c0-.12.1-.23.23-.23h1.4zm-3.86.01c.01 0 .01 0 .01-.01.13 0 .22.1.22.22v7.55c0 .12-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V15c-.7.76-1.69 1.19-2.73 1.19-2.17 0-3.94-1.87-3.94-4.19 0-2.32 1.77-4.19 3.94-4.19 1.03 0 2.02.43 2.73 1.18v-.75c0-.12.1-.23.23-.23h1.4zm26.375-.19a4.24 4.24 0 00-4.16 3.29c-.13.59-.13 1.19 0 1.77a4.233 4.233 0 004.17 3.3c2.35 0 4.26-1.87 4.26-4.19 0-2.32-1.9-4.17-4.27-4.17zM60.63 5c.13 0 .23.1.23.23v3.76c.7-.76 1.7-1.18 2.73-1.18 1.88 0 3.45 1.4 3.84 3.28.13.59.13 1.2 0 1.8-.39 1.88-1.96 3.29-3.84 3.29-1.03 0-2.02-.43-2.73-1.18v.77c0 .12-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V5.23c0-.12.1-.23.23-.23h1.4zm-34 11h-1.4c-.13 0-.23-.11-.23-.23V8.22c.01-.13.1-.22.23-.22h1.4c.13 0 .22.11.23.22v.68c.5-.68 1.3-1.09 2.16-1.1h.03c1.09 0 2.09.6 2.6 1.55.45-.95 1.4-1.55 2.44-1.56 1.62 0 2.93 1.25 2.9 2.78l.03 5.2c0 .13-.1.23-.23.23h-1.41c-.13 0-.23-.11-.23-.23v-4.59c0-.98-.74-1.71-1.62-1.71-.8 0-1.46.7-1.59 1.62l.01 4.68c0 .13-.11.23-.23.23h-1.41c-.13 0-.23-.11-.23-.23v-4.59c0-.98-.74-1.71-1.62-1.71-.85 0-1.54.79-1.6 1.8v4.5c0 .13-.1.23-.23.23zm53.615 0h-1.61c-.04 0-.08-.01-.12-.03-.09-.06-.13-.19-.06-.28l2.43-3.71-2.39-3.65a.213.213 0 01-.03-.12c0-.12.09-.21.21-.21h1.61c.13 0 .24.06.3.17l1.41 2.37 1.4-2.37a.34.34 0 01.3-.17h1.6c.04 0 .08.01.12.03.09.06.13.19.06.28l-2.37 3.65 2.43 3.7c0 .05.01.09.01.13 0 .12-.09.21-.21.21h-1.61c-.13 0-.24-.06-.3-.17l-1.44-2.42-1.44 2.42a.34.34 0 01-.3.17zm-7.12-1.49c-1.33 0-2.42-1.12-2.42-2.51 0-1.39 1.08-2.52 2.42-2.52 1.33 0 2.42 1.12 2.42 2.51 0 1.39-1.08 2.51-2.42 2.52zm-19.865 0c-1.32 0-2.39-1.11-2.42-2.48v-.07c.02-1.38 1.09-2.49 2.4-2.49 1.32 0 2.41 1.12 2.41 2.51 0 1.39-1.07 2.52-2.39 2.53zm-8.11-2.48c-.01 1.37-1.09 2.47-2.41 2.47s-2.42-1.12-2.42-2.51c0-1.39 1.08-2.52 2.4-2.52 1.33 0 2.39 1.11 2.41 2.48l.02.08zm18.12 2.47c-1.32 0-2.39-1.11-2.41-2.48v-.06c.02-1.38 1.09-2.48 2.41-2.48s2.42 1.12 2.42 2.51c0 1.39-1.09 2.51-2.42 2.51z'/%3E%3C/defs%3E%3Cmask id='c'%3E%3Crect width='100%25' height='100%25' fill='%23fff'/%3E%3Cuse xlink:href='%23a'/%3E%3Cuse xlink:href='%23b'/%3E%3C/mask%3E%3Cg stroke='%23fff' stroke-width='3' fill='%23fff'%3E%3Ccircle mask='url(%23c)' cx='11.5' cy='11.5' r='9.25'/%3E%3Cuse xlink:href='%23b' mask='url(%23c)'/%3E%3C/g%3E%3Cuse xlink:href='%23a'/%3E%3Cuse xlink:href='%23b'/%3E%3C/svg%3E")}}.mapboxgl-ctrl.mapboxgl-ctrl-attrib{padding:0 5px;background-color:hsla(0,0%,100%,.5);margin:0}@media screen{.mapboxgl-ctrl-attrib.mapboxgl-compact{min-height:20px;padding:2px 24px 2px 0;margin:10px;position:relative;background-color:#fff;border-radius:12px}.mapboxgl-ctrl-attrib.mapboxgl-compact-show{padding:2px 28px 2px 8px;visibility:visible}.mapboxgl-ctrl-bottom-left>.mapboxgl-ctrl-attrib.mapboxgl-compact-show,.mapboxgl-ctrl-top-left>.mapboxgl-ctrl-attrib.mapboxgl-compact-show{padding:2px 8px 2px 28px;border-radius:12px}.mapboxgl-ctrl-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-inner{display:none}.mapboxgl-ctrl-attrib-button{display:none;cursor:pointer;position:absolute;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='24' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill-rule='evenodd'%3E%3Cpath d='M4 10a6 6 0 1012 0 6 6 0 10-12 0m5-3a1 1 0 102 0 1 1 0 10-2 0m0 3a1 1 0 112 0v3a1 1 0 11-2 0'/%3E%3C/svg%3E");background-color:hsla(0,0%,100%,.5);width:24px;height:24px;box-sizing:border-box;border-radius:12px;outline:none;top:0;right:0;border:0}.mapboxgl-ctrl-bottom-left .mapboxgl-ctrl-attrib-button,.mapboxgl-ctrl-top-left .mapboxgl-ctrl-attrib-button{left:0}.mapboxgl-ctrl-attrib.mapboxgl-compact-show .mapboxgl-ctrl-attrib-inner,.mapboxgl-ctrl-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-button{display:block}.mapboxgl-ctrl-attrib.mapboxgl-compact-show .mapboxgl-ctrl-attrib-button{background-color:rgba(0,0,0,.05)}.mapboxgl-ctrl-bottom-right>.mapboxgl-ctrl-attrib.mapboxgl-compact:after{bottom:0;right:0}.mapboxgl-ctrl-top-right>.mapboxgl-ctrl-attrib.mapboxgl-compact:after{top:0;right:0}.mapboxgl-ctrl-top-left>.mapboxgl-ctrl-attrib.mapboxgl-compact:after{top:0;left:0}.mapboxgl-ctrl-bottom-left>.mapboxgl-ctrl-attrib.mapboxgl-compact:after{bottom:0;left:0}}@media screen and (-ms-high-contrast:active){.mapboxgl-ctrl-attrib.mapboxgl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='24' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill-rule='evenodd' fill='%23fff'%3E%3Cpath d='M4 10a6 6 0 1012 0 6 6 0 10-12 0m5-3a1 1 0 102 0 1 1 0 10-2 0m0 3a1 1 0 112 0v3a1 1 0 11-2 0'/%3E%3C/svg%3E")}}@media screen and (-ms-high-contrast:black-on-white){.mapboxgl-ctrl-attrib.mapboxgl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='24' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill-rule='evenodd'%3E%3Cpath d='M4 10a6 6 0 1012 0 6 6 0 10-12 0m5-3a1 1 0 102 0 1 1 0 10-2 0m0 3a1 1 0 112 0v3a1 1 0 11-2 0'/%3E%3C/svg%3E")}}.mapboxgl-ctrl-attrib a{color:rgba(0,0,0,.75);text-decoration:none}.mapboxgl-ctrl-attrib a:hover{color:inherit;text-decoration:underline}.mapboxgl-ctrl-attrib .mapbox-improve-map{font-weight:700;margin-left:2px}.mapboxgl-attrib-empty{display:none}.mapboxgl-ctrl-scale{background-color:hsla(0,0%,100%,.75);font-size:10px;border:2px solid #333;border-top:#333;padding:0 5px;color:#333;box-sizing:border-box}.mapboxgl-popup{position:absolute;top:0;left:0;display:-webkit-flex;display:flex;will-change:transform;pointer-events:none}.mapboxgl-popup-anchor-top,.mapboxgl-popup-anchor-top-left,.mapboxgl-popup-anchor-top-right{-webkit-flex-direction:column;flex-direction:column}.mapboxgl-popup-anchor-bottom,.mapboxgl-popup-anchor-bottom-left,.mapboxgl-popup-anchor-bottom-right{-webkit-flex-direction:column-reverse;flex-direction:column-reverse}.mapboxgl-popup-anchor-left{-webkit-flex-direction:row;flex-direction:row}.mapboxgl-popup-anchor-right{-webkit-flex-direction:row-reverse;flex-direction:row-reverse}.mapboxgl-popup-tip{width:0;height:0;border:10px solid transparent;z-index:1}.mapboxgl-popup-anchor-top .mapboxgl-popup-tip{-webkit-align-self:center;align-self:center;border-top:none;border-bottom-color:#fff}.mapboxgl-popup-anchor-top-left .mapboxgl-popup-tip{-webkit-align-self:flex-start;align-self:flex-start;border-top:none;border-left:none;border-bottom-color:#fff}.mapboxgl-popup-anchor-top-right .mapboxgl-popup-tip{-webkit-align-self:flex-end;align-self:flex-end;border-top:none;border-right:none;border-bottom-color:#fff}.mapboxgl-popup-anchor-bottom .mapboxgl-popup-tip{-webkit-align-self:center;align-self:center;border-bottom:none;border-top-color:#fff}.mapboxgl-popup-anchor-bottom-left .mapboxgl-popup-tip{-webkit-align-self:flex-start;align-self:flex-start;border-bottom:none;border-left:none;border-top-color:#fff}.mapboxgl-popup-anchor-bottom-right .mapboxgl-popup-tip{-webkit-align-self:flex-end;align-self:flex-end;border-bottom:none;border-right:none;border-top-color:#fff}.mapboxgl-popup-anchor-left .mapboxgl-popup-tip{-webkit-align-self:center;align-self:center;border-left:none;border-right-color:#fff}.mapboxgl-popup-anchor-right .mapboxgl-popup-tip{-webkit-align-self:center;align-self:center;border-right:none;border-left-color:#fff}.mapboxgl-popup-close-button{position:absolute;right:0;top:0;border:0;border-radius:0 3px 0 0;cursor:pointer;background-color:transparent}.mapboxgl-popup-close-button:hover{background-color:rgba(0,0,0,.05)}.mapboxgl-popup-content{position:relative;background:#fff;border-radius:3px;box-shadow:0 1px 2px rgba(0,0,0,.1);padding:10px 10px 15px;pointer-events:auto}.mapboxgl-popup-anchor-top-left .mapboxgl-popup-content{border-top-left-radius:0}.mapboxgl-popup-anchor-top-right .mapboxgl-popup-content{border-top-right-radius:0}.mapboxgl-popup-anchor-bottom-left .mapboxgl-popup-content{border-bottom-left-radius:0}.mapboxgl-popup-anchor-bottom-right .mapboxgl-popup-content{border-bottom-right-radius:0}.mapboxgl-popup-track-pointer{display:none}.mapboxgl-popup-track-pointer *{pointer-events:none;user-select:none}.mapboxgl-map:hover .mapboxgl-popup-track-pointer{display:flex}.mapboxgl-map:active .mapboxgl-popup-track-pointer{display:none}.mapboxgl-marker{position:absolute;top:0;left:0;will-change:transform}.mapboxgl-user-location-dot,.mapboxgl-user-location-dot:before{background-color:#1da1f2;width:15px;height:15px;border-radius:50%}.mapboxgl-user-location-dot:before{content:"";position:absolute;-webkit-animation:mapboxgl-user-location-dot-pulse 2s infinite;-moz-animation:mapboxgl-user-location-dot-pulse 2s infinite;-ms-animation:mapboxgl-user-location-dot-pulse 2s infinite;animation:mapboxgl-user-location-dot-pulse 2s infinite}.mapboxgl-user-location-dot:after{border-radius:50%;border:2px solid #fff;content:"";height:19px;left:-2px;position:absolute;top:-2px;width:19px;box-sizing:border-box;box-shadow:0 0 3px rgba(0,0,0,.35)}@-webkit-keyframes mapboxgl-user-location-dot-pulse{0%{-webkit-transform:scale(1);opacity:1}70%{-webkit-transform:scale(3);opacity:0}to{-webkit-transform:scale(1);opacity:0}}@-ms-keyframes mapboxgl-user-location-dot-pulse{0%{-ms-transform:scale(1);opacity:1}70%{-ms-transform:scale(3);opacity:0}to{-ms-transform:scale(1);opacity:0}}@keyframes mapboxgl-user-location-dot-pulse{0%{transform:scale(1);opacity:1}70%{transform:scale(3);opacity:0}to{transform:scale(1);opacity:0}}.mapboxgl-user-location-dot-stale{background-color:#aaa}.mapboxgl-user-location-dot-stale:after{display:none}.mapboxgl-user-location-accuracy-circle{background-color:rgba(29,161,242,.2);width:1px;height:1px;border-radius:100%}.mapboxgl-crosshair,.mapboxgl-crosshair .mapboxgl-interactive,.mapboxgl-crosshair .mapboxgl-interactive:active{cursor:crosshair}.mapboxgl-boxzoom{position:absolute;top:0;left:0;width:0;height:0;background:#fff;border:2px dotted #202020;opacity:.5}@media print{.mapbox-improve-map{display:none}}`;r(e);var t=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},n={},i={get exports(){return n},set exports(q){n=q}};(function(q,U){(function(Z,te){q.exports=te()})(t,function(){var Z,te,ie;function ue(S,ve){if(!Z)Z=ve;else if(!te)te=ve;else{var le="var sharedChunk = {}; ("+Z+")(sharedChunk); ("+te+")(sharedChunk);",ge={};Z(ge),ie=ve(ge),typeof window<"u"&&(ie.workerUrl=window.URL.createObjectURL(new Blob([le],{type:"text/javascript"})))}}return ue(["exports"],function(S){function ve(l,f){return l(f={exports:{}},f.exports),f.exports}var le=ge;function ge(l,f,m,C){this.cx=3*l,this.bx=3*(m-l)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*f,this.by=3*(C-f)-this.cy,this.ay=1-this.cy-this.by,this.p1x=l,this.p1y=C,this.p2x=m,this.p2y=C}ge.prototype.sampleCurveX=function(l){return((this.ax*l+this.bx)*l+this.cx)*l},ge.prototype.sampleCurveY=function(l){return((this.ay*l+this.by)*l+this.cy)*l},ge.prototype.sampleCurveDerivativeX=function(l){return(3*this.ax*l+2*this.bx)*l+this.cx},ge.prototype.solveCurveX=function(l,f){var m,C,M,R,W;for(f===void 0&&(f=1e-6),M=l,W=0;W<8;W++){if(R=this.sampleCurveX(M)-l,Math.abs(R)(C=1))return C;for(;mR?m=M:C=M,M=.5*(C-m)+m}return M},ge.prototype.solve=function(l,f){return this.sampleCurveY(this.solveCurveX(l,f))};var Se=ye;function ye(l,f){this.x=l,this.y=f}ye.prototype={clone:function(){return new ye(this.x,this.y)},add:function(l){return this.clone()._add(l)},sub:function(l){return this.clone()._sub(l)},multByPoint:function(l){return this.clone()._multByPoint(l)},divByPoint:function(l){return this.clone()._divByPoint(l)},mult:function(l){return this.clone()._mult(l)},div:function(l){return this.clone()._div(l)},rotate:function(l){return this.clone()._rotate(l)},rotateAround:function(l,f){return this.clone()._rotateAround(l,f)},matMult:function(l){return this.clone()._matMult(l)},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(l){return this.x===l.x&&this.y===l.y},dist:function(l){return Math.sqrt(this.distSqr(l))},distSqr:function(l){var f=l.x-this.x,m=l.y-this.y;return f*f+m*m},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(l){return Math.atan2(this.y-l.y,this.x-l.x)},angleWith:function(l){return this.angleWithSep(l.x,l.y)},angleWithSep:function(l,f){return Math.atan2(this.x*f-this.y*l,this.x*l+this.y*f)},_matMult:function(l){var f=l[2]*this.x+l[3]*this.y;return this.x=l[0]*this.x+l[1]*this.y,this.y=f,this},_add:function(l){return this.x+=l.x,this.y+=l.y,this},_sub:function(l){return this.x-=l.x,this.y-=l.y,this},_mult:function(l){return this.x*=l,this.y*=l,this},_div:function(l){return this.x/=l,this.y/=l,this},_multByPoint:function(l){return this.x*=l.x,this.y*=l.y,this},_divByPoint:function(l){return this.x/=l.x,this.y/=l.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var l=this.y;return this.y=this.x,this.x=-l,this},_rotate:function(l){var f=Math.cos(l),m=Math.sin(l),C=m*this.x+f*this.y;return this.x=f*this.x-m*this.y,this.y=C,this},_rotateAround:function(l,f){var m=Math.cos(l),C=Math.sin(l),M=f.y+C*(this.x-f.x)+m*(this.y-f.y);return this.x=f.x+m*(this.x-f.x)-C*(this.y-f.y),this.y=M,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},ye.convert=function(l){return l instanceof ye?l:Array.isArray(l)?new ye(l[0],l[1]):l};var be=typeof self<"u"?self:{},Ue=Math.pow(2,53)-1;function B(l,f,m,C){var M=new le(l,f,m,C);return function(R){return M.solve(R)}}var re=B(.25,.1,.25,1);function N(l,f,m){return Math.min(m,Math.max(f,l))}function $(l,f,m){var C=m-f,M=((l-f)%C+C)%C+f;return M===f?m:M}function V(l){for(var f=arguments,m=[],C=arguments.length-1;C-- >0;)m[C]=f[C+1];for(var M=0,R=m;M>f/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,l)}()}function G(l){return!!l&&/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(l)}function j(l,f){l.forEach(function(m){f[m]&&(f[m]=f[m].bind(f))})}function Me(l,f){return l.indexOf(f,l.length-f.length)!==-1}function Ze(l,f,m){var C={};for(var M in l)C[M]=f.call(m||this,l[M],M,l);return C}function Qe(l,f,m){var C={};for(var M in l)f.call(m||this,l[M],M,l)&&(C[M]=l[M]);return C}function Ct(l){return Array.isArray(l)?l.map(Ct):typeof l=="object"&&l?Ze(l,Ct):l}var xt={};function Ft(l){xt[l]||(typeof console<"u"&&console.warn(l),xt[l]=!0)}function Ot(l,f,m){return(m.y-l.y)*(f.x-l.x)>(f.y-l.y)*(m.x-l.x)}function Yt(l){for(var f=0,m=0,C=l.length,M=C-1,R=void 0,W=void 0;m@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,function(C,M,R,W){var ee=R||W;return f[M]=!ee||ee.toLowerCase(),""}),f["max-age"]){var m=parseInt(f["max-age"],10);isNaN(m)?delete f["max-age"]:f["max-age"]=m}return f}var ir=null;function At(l){if(ir==null){var f=l.navigator?l.navigator.userAgent:null;ir=!!l.safari||!(!f||!(/\b(iPad|iPhone|iPod)\b/.test(f)||f.match("Safari")&&!f.match("Chrome")))}return ir}function Et(l){try{var f=be[l];return f.setItem("_mapbox_test_",1),f.removeItem("_mapbox_test_"),!0}catch{return!1}}var rt,he,ke,ze,Wt=be.performance&&be.performance.now?be.performance.now.bind(be.performance):Date.now.bind(Date),ft=be.requestAnimationFrame||be.mozRequestAnimationFrame||be.webkitRequestAnimationFrame||be.msRequestAnimationFrame,qt=be.cancelAnimationFrame||be.mozCancelAnimationFrame||be.webkitCancelAnimationFrame||be.msCancelAnimationFrame,Bt={now:Wt,frame:function(l){var f=ft(l);return{cancel:function(){return qt(f)}}},getImageData:function(l,f){f===void 0&&(f=0);var m=be.document.createElement("canvas"),C=m.getContext("2d");if(!C)throw new Error("failed to create canvas 2d context");return m.width=l.width,m.height=l.height,C.drawImage(l,0,0,l.width,l.height),C.getImageData(-f,-f,l.width+2*f,l.height+2*f)},resolveURL:function(l){return rt||(rt=be.document.createElement("a")),rt.href=l,rt.href},hardwareConcurrency:be.navigator&&be.navigator.hardwareConcurrency||4,get devicePixelRatio(){return be.devicePixelRatio},get prefersReducedMotion(){return!!be.matchMedia&&(he==null&&(he=be.matchMedia("(prefers-reduced-motion: reduce)")),he.matches)}},vr={API_URL:"https://api.mapbox.com",get EVENTS_URL(){return this.API_URL?this.API_URL.indexOf("https://api.mapbox.cn")===0?"https://events.mapbox.cn/events/v2":this.API_URL.indexOf("https://api.mapbox.com")===0?"https://events.mapbox.com/events/v2":null:null},FEEDBACK_URL:"https://apps.mapbox.com/feedback",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null,MAX_PARALLEL_IMAGE_REQUESTS:16},_r={supported:!1,testSupport:function(l){!Dr&&ze&&(Er?et(l):ke=l)}},Dr=!1,Er=!1;function et(l){var f=l.createTexture();l.bindTexture(l.TEXTURE_2D,f);try{if(l.texImage2D(l.TEXTURE_2D,0,l.RGBA,l.RGBA,l.UNSIGNED_BYTE,ze),l.isContextLost())return;_r.supported=!0}catch{}l.deleteTexture(f),Dr=!0}be.document&&((ze=be.document.createElement("img")).onload=function(){ke&&et(ke),ke=null,Er=!0},ze.onerror=function(){Dr=!0,ke=null},ze.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");var pt="01",er=function(l,f){this._transformRequestFn=l,this._customAccessToken=f,this._createSkuToken()};function Lr(l){return l.indexOf("mapbox:")===0}er.prototype._createSkuToken=function(){var l=function(){for(var f="",m=0;m<10;m++)f+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[Math.floor(62*Math.random())];return{token:["1",pt,f].join(""),tokenExpiresAt:Date.now()+432e5}}();this._skuToken=l.token,this._skuTokenExpiresAt=l.tokenExpiresAt},er.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},er.prototype.transformRequest=function(l,f){return this._transformRequestFn&&this._transformRequestFn(l,f)||{url:l}},er.prototype.normalizeStyleURL=function(l,f){if(!Lr(l))return l;var m=Dt(l);return m.path="/styles/v1"+m.path,this._makeAPIURL(m,this._customAccessToken||f)},er.prototype.normalizeGlyphsURL=function(l,f){if(!Lr(l))return l;var m=Dt(l);return m.path="/fonts/v1"+m.path,this._makeAPIURL(m,this._customAccessToken||f)},er.prototype.normalizeSourceURL=function(l,f){if(!Lr(l))return l;var m=Dt(l);return m.path="/v4/"+m.authority+".json",m.params.push("secure"),this._makeAPIURL(m,this._customAccessToken||f)},er.prototype.normalizeSpriteURL=function(l,f,m,C){var M=Dt(l);return Lr(l)?(M.path="/styles/v1"+M.path+"/sprite"+f+m,this._makeAPIURL(M,this._customAccessToken||C)):(M.path+=""+f+m,Tt(M))},er.prototype.normalizeTileURL=function(l,f){if(this._isSkuTokenExpired()&&this._createSkuToken(),l&&!Lr(l))return l;var m=Dt(l);m.path=m.path.replace(/(\.(png|jpg)\d*)(?=$)/,(Bt.devicePixelRatio>=2||f===512?"@2x":"")+(_r.supported?".webp":"$1")),m.path=m.path.replace(/^.+\/v4\//,"/"),m.path="/v4"+m.path;var C=this._customAccessToken||function(M){for(var R=0,W=M;R=0&&l.params.splice(M,1)}if(C.path!=="/"&&(l.path=""+C.path+l.path),!vr.REQUIRE_ACCESS_TOKEN)return Tt(l);if(!(f=f||vr.ACCESS_TOKEN))throw new Error("An API access token is required to use Mapbox GL. "+m);if(f[0]==="s")throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). "+m);return l.params=l.params.filter(function(R){return R.indexOf("access_token")===-1}),l.params.push("access_token="+f),Tt(l)};var Ii=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function jr(l){return Ii.test(l)}var Zn=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;function Dt(l){var f=l.match(Zn);if(!f)throw new Error("Unable to parse URL object");return{protocol:f[1],authority:f[2],path:f[3]||"/",params:f[4]?f[4].split("&"):[]}}function Tt(l){var f=l.params.length?"?"+l.params.join("&"):"";return l.protocol+"://"+l.authority+l.path+f}function Tr(l){if(!l)return null;var f=l.split(".");if(!f||f.length!==3)return null;try{return JSON.parse(decodeURIComponent(be.atob(f[1]).split("").map(function(m){return"%"+("00"+m.charCodeAt(0).toString(16)).slice(-2)}).join("")))}catch{return null}}var an=function(l){this.type=l,this.anonId=null,this.eventData={},this.queue=[],this.pendingRequest=null};an.prototype.getStorageKey=function(l){var f,m=Tr(vr.ACCESS_TOKEN);return f=m&&m.u?be.btoa(encodeURIComponent(m.u).replace(/%([0-9A-F]{2})/g,function(C,M){return String.fromCharCode(Number("0x"+M))})):vr.ACCESS_TOKEN||"",l?"mapbox.eventData."+l+":"+f:"mapbox.eventData:"+f},an.prototype.fetchEventData=function(){var l=Et("localStorage"),f=this.getStorageKey(),m=this.getStorageKey("uuid");if(l)try{var C=be.localStorage.getItem(f);C&&(this.eventData=JSON.parse(C));var M=be.localStorage.getItem(m);M&&(this.anonId=M)}catch{Ft("Unable to read from LocalStorage")}},an.prototype.saveEventData=function(){var l=Et("localStorage"),f=this.getStorageKey(),m=this.getStorageKey("uuid");if(l)try{be.localStorage.setItem(m,this.anonId),Object.keys(this.eventData).length>=1&&be.localStorage.setItem(f,JSON.stringify(this.eventData))}catch{Ft("Unable to write to LocalStorage")}},an.prototype.processRequests=function(l){},an.prototype.postEvent=function(l,f,m,C){var M=this;if(vr.EVENTS_URL){var R=Dt(vr.EVENTS_URL);R.params.push("access_token="+(C||vr.ACCESS_TOKEN||""));var W={event:this.type,created:new Date(l).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:"1.13.3",skuId:pt,userId:this.anonId},ee=f?V(W,f):W,ce={url:Tt(R),headers:{"Content-Type":"text/plain"},body:JSON.stringify([ee])};this.pendingRequest=di(ce,function(xe){M.pendingRequest=null,m(xe),M.saveEventData(),M.processRequests(C)})}},an.prototype.queueRequest=function(l,f){this.queue.push(l),this.processRequests(f)};var $r,_n,qn=function(l){function f(){l.call(this,"map.load"),this.success={},this.skuToken=""}return l&&(f.__proto__=l),(f.prototype=Object.create(l&&l.prototype)).constructor=f,f.prototype.postMapLoadEvent=function(m,C,M,R){this.skuToken=M;var W=!(!R&&!vr.ACCESS_TOKEN),ee=Array.isArray(m)&&m.some(function(ce){return Lr(ce)||jr(ce)});vr.EVENTS_URL&&W&&ee&&this.queueRequest({id:C,timestamp:Date.now()},R)},f.prototype.processRequests=function(m){var C=this;if(!this.pendingRequest&&this.queue.length!==0){var M=this.queue.shift(),R=M.id,W=M.timestamp;R&&this.success[R]||(this.anonId||this.fetchEventData(),G(this.anonId)||(this.anonId=me()),this.postEvent(W,{skuToken:this.skuToken},function(ee){ee||R&&(C.success[R]=!0)},m))}},f}(an),xi=new(function(l){function f(m){l.call(this,"appUserTurnstile"),this._customAccessToken=m}return l&&(f.__proto__=l),(f.prototype=Object.create(l&&l.prototype)).constructor=f,f.prototype.postTurnstileEvent=function(m,C){vr.EVENTS_URL&&vr.ACCESS_TOKEN&&Array.isArray(m)&&m.some(function(M){return Lr(M)||jr(M)})&&this.queueRequest(Date.now(),C)},f.prototype.processRequests=function(m){var C=this;if(!this.pendingRequest&&this.queue.length!==0){this.anonId&&this.eventData.lastSuccess&&this.eventData.tokenU||this.fetchEventData();var M=Tr(vr.ACCESS_TOKEN),R=M?M.u:vr.ACCESS_TOKEN,W=R!==this.eventData.tokenU;G(this.anonId)||(this.anonId=me(),W=!0);var ee=this.queue.shift();if(this.eventData.lastSuccess){var ce=new Date(this.eventData.lastSuccess),xe=new Date(ee),Te=(ee-this.eventData.lastSuccess)/864e5;W=W||Te>=1||Te<-1||ce.getDate()!==xe.getDate()}else W=!0;if(!W)return this.processRequests();this.postEvent(ee,{"enabled.telemetry":!1},function(De){De||(C.eventData.lastSuccess=ee,C.eventData.tokenU=R)},m)}},f}(an)),xo=xi.postTurnstileEvent.bind(xi),_i=new qn,Je=_i.postMapLoadEvent.bind(_i),st=500,Pt=50;function nr(){be.caches&&!$r&&($r=be.caches.open("mapbox-tiles"))}function Rr(l){var f=l.indexOf("?");return f<0?l:l.slice(0,f)}var qr,jn=1/0;function Br(){return qr==null&&(qr=be.OffscreenCanvas&&new be.OffscreenCanvas(1,1).getContext("2d")&&typeof be.createImageBitmap=="function"),qr}var Bn={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};typeof Object.freeze=="function"&&Object.freeze(Bn);var Nr=function(l){function f(m,C,M){C===401&&jr(M)&&(m+=": you may have provided an invalid Mapbox access token. See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes"),l.call(this,m),this.status=C,this.url=M,this.name=this.constructor.name,this.message=m}return l&&(f.__proto__=l),(f.prototype=Object.create(l&&l.prototype)).constructor=f,f.prototype.toString=function(){return this.name+": "+this.message+" ("+this.status+"): "+this.url},f}(Error),vn=cr()?function(){return self.worker&&self.worker.referrer}:function(){return(be.location.protocol==="blob:"?be.parent:be).location.href},wn,wi,ji=function(l,f){if(!(/^file:/.test(m=l.url)||/^file:/.test(vn())&&!/^\w+:/.test(m))){if(be.fetch&&be.Request&&be.AbortController&&be.Request.prototype.hasOwnProperty("signal"))return function(C,M){var R,W=new be.AbortController,ee=new be.Request(C.url,{method:C.method||"GET",body:C.body,credentials:C.credentials,headers:C.headers,referrer:vn(),signal:W.signal}),ce=!1,xe=!1,Te=(R=ee.url).indexOf("sku=")>0&&jr(R);C.type==="json"&&ee.headers.set("Accept","application/json");var De=function($e,ut,ct){if(!xe){if($e&&$e.message!=="SecurityError"&&Ft($e),ut&&ct)return Re(ut);var _t=Date.now();be.fetch(ee).then(function(gt){if(gt.ok){var Lt=Te?gt.clone():null;return Re(gt,Lt,_t)}return M(new Nr(gt.statusText,gt.status,C.url))}).catch(function(gt){gt.code!==20&&M(new Error(gt.message))})}},Re=function($e,ut,ct){(C.type==="arrayBuffer"?$e.arrayBuffer():C.type==="json"?$e.json():$e.text()).then(function(_t){xe||(ut&&ct&&function(gt,Lt,Gt){if(nr(),$r){var Qt={status:Lt.status,statusText:Lt.statusText,headers:new be.Headers};Lt.headers.forEach(function(pr,Ar){return Qt.headers.set(Ar,pr)});var ar=kr(Lt.headers.get("Cache-Control")||"");ar["no-store"]||(ar["max-age"]&&Qt.headers.set("Expires",new Date(Gt+1e3*ar["max-age"]).toUTCString()),new Date(Qt.headers.get("Expires")).getTime()-Gt<42e4||function(pr,Ar){if(_n===void 0)try{new Response(new ReadableStream),_n=!0}catch{_n=!1}_n?Ar(pr.body):pr.blob().then(Ar)}(Lt,function(pr){var Ar=new be.Response(pr,Qt);nr(),$r&&$r.then(function(Wr){return Wr.put(Rr(gt.url),Ar)}).catch(function(Wr){return Ft(Wr.message)})}))}}(ee,ut,ct),ce=!0,M(null,_t,$e.headers.get("Cache-Control"),$e.headers.get("Expires")))}).catch(function(_t){xe||M(new Error(_t.message))})};return Te?function($e,ut){if(nr(),!$r)return ut(null);var ct=Rr($e.url);$r.then(function(_t){_t.match(ct).then(function(gt){var Lt=function(Gt){if(!Gt)return!1;var Qt=new Date(Gt.headers.get("Expires")||0),ar=kr(Gt.headers.get("Cache-Control")||"");return Qt>Date.now()&&!ar["no-cache"]}(gt);_t.delete(ct),Lt&&_t.put(ct,gt.clone()),ut(null,gt,Lt)}).catch(ut)}).catch(ut)}(ee,De):De(null,null),{cancel:function(){xe=!0,ce||W.abort()}}}(l,f);if(cr()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",l,f,void 0,!0)}var m;return function(C,M){var R=new be.XMLHttpRequest;for(var W in R.open(C.method||"GET",C.url,!0),C.type==="arrayBuffer"&&(R.responseType="arraybuffer"),C.headers)R.setRequestHeader(W,C.headers[W]);return C.type==="json"&&(R.responseType="text",R.setRequestHeader("Accept","application/json")),R.withCredentials=C.credentials==="include",R.onerror=function(){M(new Error(R.statusText))},R.onload=function(){if((R.status>=200&&R.status<300||R.status===0)&&R.response!==null){var ee=R.response;if(C.type==="json")try{ee=JSON.parse(R.response)}catch(ce){return M(ce)}M(null,ee,R.getResponseHeader("Cache-Control"),R.getResponseHeader("Expires"))}else M(new Nr(R.statusText,R.status,C.url))},R.send(C.body),{cancel:function(){return R.abort()}}}(l,f)},Ha=function(l,f){return ji(V(l,{type:"arrayBuffer"}),f)},di=function(l,f){return ji(V(l,{method:"POST"}),f)},Ee="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";wn=[],wi=0;var Ie=function(l,f){if(_r.supported&&(l.headers||(l.headers={}),l.headers.accept="image/webp,*/*"),wi>=vr.MAX_PARALLEL_IMAGE_REQUESTS){var m={requestParameters:l,callback:f,cancelled:!1,cancel:function(){this.cancelled=!0}};return wn.push(m),m}wi++;var C=!1,M=function(){if(!C)for(C=!0,wi--;wn.length&&wi0||this._oneTimeListeners&&this._oneTimeListeners[l]&&this._oneTimeListeners[l].length>0||this._eventedParent&&this._eventedParent.listens(l)},mt.prototype.setEventedParent=function(l,f){return this._eventedParent=l,this._eventedParentData=f,this};var Be={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sources:{required:!0,type:"sources"},sprite:{type:"string"},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:{}},default:"mapbox"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{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"],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:"number",default:2,minimum:0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"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:{},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-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"],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":{},within:{}}},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}},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:"number",default:335,minimum:0,maximum:359,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:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",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"}},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"}}},Ge=function(l,f,m,C){this.message=(l?l+": ":"")+m,C&&(this.identifier=C),f!=null&&f.__line__&&(this.line=f.__line__)};function It(l){var f=l.value;return f?[new Ge(l.key,f,"constants have been deprecated as of v8")]:[]}function lr(l){for(var f=arguments,m=[],C=arguments.length-1;C-- >0;)m[C]=f[C+1];for(var M=0,R=m;M":l.itemType.kind==="value"?"array":"array<"+f+">"}return l.kind}var An=[He,Fe,se,oe,_e,tr,Ke,Ur(dt),Or];function Mn(l,f){if(f.kind==="error")return null;if(l.kind==="array"){if(f.kind==="array"&&(f.N===0&&f.itemType.kind==="value"||!Mn(l.itemType,f.itemType))&&(typeof l.N!="number"||l.N===f.N))return null}else{if(l.kind===f.kind)return null;if(l.kind==="value"){for(var m=0,C=An;m255?255:ee}function M(ee){return C(ee[ee.length-1]==="%"?parseFloat(ee)/100*255:parseInt(ee))}function R(ee){return(ce=ee[ee.length-1]==="%"?parseFloat(ee)/100:parseFloat(ee))<0?0:ce>1?1:ce;var ce}function W(ee,ce,xe){return xe<0?xe+=1:xe>1&&(xe-=1),6*xe<1?ee+(ce-ee)*xe*6:2*xe<1?ce:3*xe<2?ee+(ce-ee)*(2/3-xe)*6:ee}try{f.parseCSSColor=function(ee){var ce,xe=ee.replace(/ /g,"").toLowerCase();if(xe in m)return m[xe].slice();if(xe[0]==="#")return xe.length===4?(ce=parseInt(xe.substr(1),16))>=0&&ce<=4095?[(3840&ce)>>4|(3840&ce)>>8,240&ce|(240&ce)>>4,15&ce|(15&ce)<<4,1]:null:xe.length===7&&(ce=parseInt(xe.substr(1),16))>=0&&ce<=16777215?[(16711680&ce)>>16,(65280&ce)>>8,255&ce,1]:null;var Te=xe.indexOf("("),De=xe.indexOf(")");if(Te!==-1&&De+1===xe.length){var Re=xe.substr(0,Te),$e=xe.substr(Te+1,De-(Te+1)).split(","),ut=1;switch(Re){case"rgba":if($e.length!==4)return null;ut=R($e.pop());case"rgb":return $e.length!==3?null:[M($e[0]),M($e[1]),M($e[2]),ut];case"hsla":if($e.length!==4)return null;ut=R($e.pop());case"hsl":if($e.length!==3)return null;var ct=(parseFloat($e[0])%360+360)%360/360,_t=R($e[1]),gt=R($e[2]),Lt=gt<=.5?gt*(_t+1):gt+_t-gt*_t,Gt=2*gt-Lt;return[C(255*W(Gt,Lt,ct+1/3)),C(255*W(Gt,Lt,ct)),C(255*W(Gt,Lt,ct-1/3)),ut];default:return null}}return null}}catch{}}).parseCSSColor,ti=function(l,f,m,C){C===void 0&&(C=1),this.r=l,this.g=f,this.b=m,this.a=C};ti.parse=function(l){if(l){if(l instanceof ti)return l;if(typeof l=="string"){var f=ln(l);if(f)return new ti(f[0]/255*f[3],f[1]/255*f[3],f[2]/255*f[3],f[3])}}},ti.prototype.toString=function(){var l=this.toArray(),f=l[1],m=l[2],C=l[3];return"rgba("+Math.round(l[0])+","+Math.round(f)+","+Math.round(m)+","+C+")"},ti.prototype.toArray=function(){var l=this.a;return l===0?[0,0,0,0]:[255*this.r/l,255*this.g/l,255*this.b/l,l]},ti.black=new ti(0,0,0,1),ti.white=new ti(1,1,1,1),ti.transparent=new ti(0,0,0,0),ti.red=new ti(1,0,0,1);var Yo=function(l,f,m){this.sensitivity=l?f?"variant":"case":f?"accent":"base",this.locale=m,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};Yo.prototype.compare=function(l,f){return this.collator.compare(l,f)},Yo.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var zs=function(l,f,m,C,M){this.text=l,this.image=f,this.scale=m,this.fontStack=C,this.textColor=M},ii=function(l){this.sections=l};ii.fromString=function(l){return new ii([new zs(l,null,null,null,null)])},ii.prototype.isEmpty=function(){return this.sections.length===0||!this.sections.some(function(l){return l.text.length!==0||l.image&&l.image.name.length!==0})},ii.factory=function(l){return l instanceof ii?l:ii.fromString(l)},ii.prototype.toString=function(){return this.sections.length===0?"":this.sections.map(function(l){return l.text}).join("")},ii.prototype.serialize=function(){for(var l=["format"],f=0,m=this.sections;f=0&&l<=255&&typeof f=="number"&&f>=0&&f<=255&&typeof m=="number"&&m>=0&&m<=255?C===void 0||typeof C=="number"&&C>=0&&C<=1?null:"Invalid rgba value ["+[l,f,m,C].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+(typeof C=="number"?[l,f,m,C]:[l,f,m]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}function Ql(l){if(l===null||typeof l=="string"||typeof l=="boolean"||typeof l=="number"||l instanceof ti||l instanceof Yo||l instanceof ii||l instanceof Mi)return!0;if(Array.isArray(l)){for(var f=0,m=l;f2){var ee=l[1];if(typeof ee!="string"||!(ee in No)||ee==="object")return f.error('The item type argument of "array" must be one of string, number, boolean',1);R=No[ee],C++}else R=dt;if(l.length>3){if(l[2]!==null&&(typeof l[2]!="number"||l[2]<0||l[2]!==Math.floor(l[2])))return f.error('The length argument to "array" must be a positive integer literal',2);W=l[2],C++}m=Ur(R,W)}else m=No[M];for(var ce=[];C1)&&f.push(C)}}return f.concat(this.args.map(function(M){return M.serialize()}))};var Wa=function(l){this.type=tr,this.sections=l};Wa.parse=function(l,f){if(l.length<2)return f.error("Expected at least one argument.");var m=l[1];if(!Array.isArray(m)&&typeof m=="object")return f.error("First argument must be an image or text section.");for(var C=[],M=!1,R=1;R<=l.length-1;++R){var W=l[R];if(M&&typeof W=="object"&&!Array.isArray(W)){M=!1;var ee=null;if(W["font-scale"]&&!(ee=f.parse(W["font-scale"],1,Fe)))return null;var ce=null;if(W["text-font"]&&!(ce=f.parse(W["text-font"],1,Ur(se))))return null;var xe=null;if(W["text-color"]&&!(xe=f.parse(W["text-color"],1,_e)))return null;var Te=C[C.length-1];Te.scale=ee,Te.font=ce,Te.textColor=xe}else{var De=f.parse(l[R],1,dt);if(!De)return null;var Re=De.type.kind;if(Re!=="string"&&Re!=="value"&&Re!=="null"&&Re!=="resolvedImage")return f.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");M=!0,C.push({content:De,scale:null,font:null,textColor:null})}}return new Wa(C)},Wa.prototype.evaluate=function(l){return new ii(this.sections.map(function(f){var m=f.content.evaluate(l);return Qi(m)===Or?new zs("",m,null,null,null):new zs(Xs(m),null,f.scale?f.scale.evaluate(l):null,f.font?f.font.evaluate(l).join(","):null,f.textColor?f.textColor.evaluate(l):null)}))},Wa.prototype.eachChild=function(l){for(var f=0,m=this.sections;f-1),m},Xa.prototype.eachChild=function(l){l(this.input)},Xa.prototype.outputDefined=function(){return!1},Xa.prototype.serialize=function(){return["image",this.input.serialize()]};var Vu={"to-boolean":oe,"to-color":_e,"to-number":Fe,"to-string":se},uo=function(l,f){this.type=l,this.args=f};uo.parse=function(l,f){if(l.length<2)return f.error("Expected at least one argument.");var m=l[0];if((m==="to-boolean"||m==="to-string")&&l.length!==2)return f.error("Expected one argument.");for(var C=Vu[m],M=[],R=1;R4?"Invalid rbga value "+JSON.stringify(f)+": expected an array containing either three or four numeric values.":Aa(f[0],f[1],f[2],f[3])))return new ti(f[0]/255,f[1]/255,f[2]/255,f[3])}throw new eo(m||"Could not parse color from value '"+(typeof f=="string"?f:String(JSON.stringify(f)))+"'")}if(this.type.kind==="number"){for(var W=null,ee=0,ce=this.args;ee=f[2]||l[1]<=f[1]||l[3]>=f[3])}function Vt(l,f){var m=(180+l[0])/360,C=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+l[1]*Math.PI/360)))/360,M=Math.pow(2,f.z);return[Math.round(m*M*8192),Math.round(C*M*8192)]}function Hr(l,f,m){return f[1]>l[1]!=m[1]>l[1]&&l[0]<(m[0]-f[0])*(l[1]-f[1])/(m[1]-f[1])+f[0]}function cn(l,f){for(var m,C,M,R,W,ee,ce,xe=!1,Te=0,De=f.length;Te0&&ee<0||W<0&&ee>0}function ta(l,f,m){for(var C=0,M=m;Cm[2]){var M=.5*C,R=l[0]-m[0]>M?-C:m[0]-l[0]>M?C:0;R===0&&(R=l[0]-m[2]>M?-C:m[2]-l[0]>M?C:0),l[0]+=R}Pi(f,l)}function ds(l,f,m,C){for(var M=8192*Math.pow(2,C.z),R=[8192*C.x,8192*C.y],W=[],ee=0,ce=l;ee=0)return!1;var m=!0;return l.eachChild(function(C){m&&!js(C,f)&&(m=!1)}),m}Hi.parse=function(l,f){if(l.length!==2)return f.error("'within' expression requires exactly one argument, but found "+(l.length-1)+" instead.");if(Ql(l[1])){var m=l[1];if(m.type==="FeatureCollection")for(var C=0;Cf))throw new eo("Input is not a number.");R=W-1}return 0}wo.prototype.parse=function(l,f,m,C,M){return M===void 0&&(M={}),f?this.concat(f,m,C)._parse(l,M):this._parse(l,M)},wo.prototype._parse=function(l,f){function m(xe,Te,De){return De==="assert"?new li(Te,[xe]):De==="coerce"?new uo(Te,[xe]):xe}if(l!==null&&typeof l!="string"&&typeof l!="boolean"&&typeof l!="number"||(l=["literal",l]),Array.isArray(l)){if(l.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var C=l[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;var M=this.registry[C];if(M){var R=M.parse(l,this);if(!R)return null;if(this.expectedType){var W=this.expectedType,ee=R.type;if(W.kind!=="string"&&W.kind!=="number"&&W.kind!=="boolean"&&W.kind!=="object"&&W.kind!=="array"||ee.kind!=="value")if(W.kind!=="color"&&W.kind!=="formatted"&&W.kind!=="resolvedImage"||ee.kind!=="value"&&ee.kind!=="string"){if(this.checkSubtype(W,ee))return null}else R=m(R,W,f.typeAnnotation||"coerce");else R=m(R,W,f.typeAnnotation||"assert")}if(!(R instanceof _o)&&R.type.kind!=="resolvedImage"&&function xe(Te){if(Te instanceof tu)return xe(Te.boundExpression);if(Te instanceof qo&&Te.name==="error"||Te instanceof hs||Te instanceof Hi)return!1;var De=Te instanceof uo||Te instanceof li,Re=!0;return Te.eachChild(function($e){Re=De?Re&&xe($e):Re&&$e instanceof _o}),!!Re&&eu(Te)&&js(Te,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}(R)){var ce=new Da;try{R=new _o(R.type,R.evaluate(ce))}catch(xe){return this.error(xe.message),null}}return R}return this.error('Unknown expression "'+C+'". If you wanted a literal array, use ["literal", [...]].',0)}return this.error(l===void 0?"'undefined' value invalid. Use null instead.":typeof l=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':"Expected an array, but found "+typeof l+" instead.")},wo.prototype.concat=function(l,f,m){var C=typeof l=="number"?this.path.concat(l):this.path,M=m?this.scope.concat(m):this.scope;return new wo(this.registry,C,f||null,M,this.errors)},wo.prototype.error=function(l){for(var f=arguments,m=[],C=arguments.length-1;C-- >0;)m[C]=f[C+1];var M=""+this.key+m.map(function(R){return"["+R+"]"}).join("");this.errors.push(new hr(M,l))},wo.prototype.checkSubtype=function(l,f){var m=Mn(l,f);return m&&this.error(m),m};var Js=function(l,f,m){this.type=l,this.input=f,this.labels=[],this.outputs=[];for(var C=0,M=m;C=W)return f.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',ce);var Te=f.parse(ee,xe,M);if(!Te)return null;M=M||Te.type,C.push([W,Te])}return new Js(M,m,C)},Js.prototype.evaluate=function(l){var f=this.labels,m=this.outputs;if(f.length===1)return m[0].evaluate(l);var C=this.input.evaluate(l);if(C<=f[0])return m[0].evaluate(l);var M=f.length;return C>=f[M-1]?m[M-1].evaluate(l):m[Ef(f,C)].evaluate(l)},Js.prototype.eachChild=function(l){l(this.input);for(var f=0,m=this.outputs;f0&&l.push(this.labels[f]),l.push(this.outputs[f].serialize());return l};var Qf=Object.freeze({__proto__:null,number:Zo,color:function(l,f,m){return new ti(Zo(l.r,f.r,m),Zo(l.g,f.g,m),Zo(l.b,f.b,m),Zo(l.a,f.a,m))},array:function(l,f,m){return l.map(function(C,M){return Zo(C,f[M],m)})}}),sp=6/29*3*(6/29),nm=Math.PI/180,ku=180/Math.PI;function lp(l){return l>.008856451679035631?Math.pow(l,1/3):l/sp+4/29}function Sl(l){return l>6/29?l*l*l:sp*(l-4/29)}function im(l){return 255*(l<=.0031308?12.92*l:1.055*Math.pow(l,1/2.4)-.055)}function kd(l){return(l/=255)<=.04045?l/12.92:Math.pow((l+.055)/1.055,2.4)}function cf(l){var f=kd(l.r),m=kd(l.g),C=kd(l.b),M=lp((.4124564*f+.3575761*m+.1804375*C)/.95047),R=lp((.2126729*f+.7151522*m+.072175*C)/1);return{l:116*R-16,a:500*(M-R),b:200*(R-lp((.0193339*f+.119192*m+.9503041*C)/1.08883)),alpha:l.a}}function Ph(l){var f=(l.l+16)/116,m=isNaN(l.a)?f:f+l.a/500,C=isNaN(l.b)?f:f-l.b/200;return f=1*Sl(f),m=.95047*Sl(m),C=1.08883*Sl(C),new ti(im(3.2404542*m-1.5371385*f-.4985314*C),im(-.969266*m+1.8760108*f+.041556*C),im(.0556434*m-.2040259*f+1.0572252*C),l.alpha)}function eh(l,f,m){var C=f-l;return l+m*(C>180||C<-180?C-360*Math.round(C/360):C)}var fo={forward:cf,reverse:Ph,interpolate:function(l,f,m){return{l:Zo(l.l,f.l,m),a:Zo(l.a,f.a,m),b:Zo(l.b,f.b,m),alpha:Zo(l.alpha,f.alpha,m)}}},Tu={forward:function(l){var f=cf(l),m=f.l,C=f.a,M=f.b,R=Math.atan2(M,C)*ku;return{h:R<0?R+360:R,c:Math.sqrt(C*C+M*M),l:m,alpha:l.a}},reverse:function(l){var f=l.h*nm,m=l.c;return Ph({l:l.l,a:Math.cos(f)*m,b:Math.sin(f)*m,alpha:l.alpha})},interpolate:function(l,f,m){return{h:eh(l.h,f.h,m),c:Zo(l.c,f.c,m),l:Zo(l.l,f.l,m),alpha:Zo(l.alpha,f.alpha,m)}}},th=Object.freeze({__proto__:null,lab:fo,hcl:Tu}),Ma=function(l,f,m,C,M){this.type=l,this.operator=f,this.interpolation=m,this.input=C,this.labels=[],this.outputs=[];for(var R=0,W=M;R1}))return f.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);C={name:"cubic-bezier",controlPoints:ee}}if(l.length-1<4)return f.error("Expected at least 4 arguments, but found only "+(l.length-1)+".");if((l.length-1)%2!=0)return f.error("Expected an even number of arguments.");if(!(M=f.parse(M,2,Fe)))return null;var ce=[],xe=null;m==="interpolate-hcl"||m==="interpolate-lab"?xe=_e:f.expectedType&&f.expectedType.kind!=="value"&&(xe=f.expectedType);for(var Te=0;Te=De)return f.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',$e);var ct=f.parse(Re,ut,xe);if(!ct)return null;xe=xe||ct.type,ce.push([De,ct])}return xe.kind==="number"||xe.kind==="color"||xe.kind==="array"&&xe.itemType.kind==="number"&&typeof xe.N=="number"?new Ma(xe,m,C,M,ce):f.error("Type "+fr(xe)+" is not interpolatable.")},Ma.prototype.evaluate=function(l){var f=this.labels,m=this.outputs;if(f.length===1)return m[0].evaluate(l);var C=this.input.evaluate(l);if(C<=f[0])return m[0].evaluate(l);var M=f.length;if(C>=f[M-1])return m[M-1].evaluate(l);var R=Ef(f,C),W=Ma.interpolationFactor(this.interpolation,C,f[R],f[R+1]),ee=m[R].evaluate(l),ce=m[R+1].evaluate(l);return this.operator==="interpolate"?Qf[this.type.kind.toLowerCase()](ee,ce,W):this.operator==="interpolate-hcl"?Tu.reverse(Tu.interpolate(Tu.forward(ee),Tu.forward(ce),W)):fo.reverse(fo.interpolate(fo.forward(ee),fo.forward(ce),W))},Ma.prototype.eachChild=function(l){l(this.input);for(var f=0,m=this.outputs;f=m.length)throw new eo("Array index out of bounds: "+f+" > "+(m.length-1)+".");if(f!==Math.floor(f))throw new eo("Array index must be an integer, but found "+f+" instead.");return m[f]},$u.prototype.eachChild=function(l){l(this.index),l(this.input)},$u.prototype.outputDefined=function(){return!1},$u.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var Oo=function(l,f){this.type=oe,this.needle=l,this.haystack=f};Oo.parse=function(l,f){if(l.length!==3)return f.error("Expected 2 arguments, but found "+(l.length-1)+" instead.");var m=f.parse(l[1],1,dt),C=f.parse(l[2],2,dt);return m&&C?sn(m.type,[oe,se,Fe,He,dt])?new Oo(m,C):f.error("Expected first argument to be of type boolean, string, number or null, but found "+fr(m.type)+" instead"):null},Oo.prototype.evaluate=function(l){var f=this.needle.evaluate(l),m=this.haystack.evaluate(l);if(!m)return!1;if(!tn(f,["boolean","string","number","null"]))throw new eo("Expected first argument to be of type boolean, string, number or null, but found "+fr(Qi(f))+" instead.");if(!tn(m,["string","array"]))throw new eo("Expected second argument to be of type array or string, but found "+fr(Qi(m))+" instead.");return m.indexOf(f)>=0},Oo.prototype.eachChild=function(l){l(this.needle),l(this.haystack)},Oo.prototype.outputDefined=function(){return!0},Oo.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var yc=function(l,f,m){this.type=Fe,this.needle=l,this.haystack=f,this.fromIndex=m};yc.parse=function(l,f){if(l.length<=2||l.length>=5)return f.error("Expected 3 or 4 arguments, but found "+(l.length-1)+" instead.");var m=f.parse(l[1],1,dt),C=f.parse(l[2],2,dt);if(!m||!C)return null;if(!sn(m.type,[oe,se,Fe,He,dt]))return f.error("Expected first argument to be of type boolean, string, number or null, but found "+fr(m.type)+" instead");if(l.length===4){var M=f.parse(l[3],3,Fe);return M?new yc(m,C,M):null}return new yc(m,C)},yc.prototype.evaluate=function(l){var f=this.needle.evaluate(l),m=this.haystack.evaluate(l);if(!tn(f,["boolean","string","number","null"]))throw new eo("Expected first argument to be of type boolean, string, number or null, but found "+fr(Qi(f))+" instead.");if(!tn(m,["string","array"]))throw new eo("Expected second argument to be of type array or string, but found "+fr(Qi(m))+" instead.");if(this.fromIndex){var C=this.fromIndex.evaluate(l);return m.indexOf(f,C)}return m.indexOf(f)},yc.prototype.eachChild=function(l){l(this.needle),l(this.haystack),this.fromIndex&&l(this.fromIndex)},yc.prototype.outputDefined=function(){return!1},yc.prototype.serialize=function(){if(this.fromIndex!=null&&this.fromIndex!==void 0){var l=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),l]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var ru=function(l,f,m,C,M,R){this.inputType=l,this.type=f,this.input=m,this.cases=C,this.outputs=M,this.otherwise=R};ru.parse=function(l,f){if(l.length<5)return f.error("Expected at least 4 arguments, but found only "+(l.length-1)+".");if(l.length%2!=1)return f.error("Expected an even number of arguments.");var m,C;f.expectedType&&f.expectedType.kind!=="value"&&(C=f.expectedType);for(var M={},R=[],W=2;WNumber.MAX_SAFE_INTEGER)return xe.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if(typeof Re=="number"&&Math.floor(Re)!==Re)return xe.error("Numeric branch labels must be integer values.");if(m){if(xe.checkSubtype(m,Qi(Re)))return null}else m=Qi(Re);if(M[String(Re)]!==void 0)return xe.error("Branch labels must be unique.");M[String(Re)]=R.length}var $e=f.parse(ce,W,C);if(!$e)return null;C=C||$e.type,R.push($e)}var ut=f.parse(l[1],1,dt);if(!ut)return null;var ct=f.parse(l[l.length-1],l.length-1,C);return ct?ut.type.kind!=="value"&&f.concat(1).checkSubtype(m,ut.type)?null:new ru(m,C,ut,M,R,ct):null},ru.prototype.evaluate=function(l){var f=this.input.evaluate(l);return(Qi(f)===this.inputType&&this.outputs[this.cases[f]]||this.otherwise).evaluate(l)},ru.prototype.eachChild=function(l){l(this.input),this.outputs.forEach(l),l(this.otherwise)},ru.prototype.outputDefined=function(){return this.outputs.every(function(l){return l.outputDefined()})&&this.otherwise.outputDefined()},ru.prototype.serialize=function(){for(var l=this,f=["match",this.input.serialize()],m=[],C={},M=0,R=Object.keys(this.cases).sort();M=5)return f.error("Expected 3 or 4 arguments, but found "+(l.length-1)+" instead.");var m=f.parse(l[1],1,dt),C=f.parse(l[2],2,Fe);if(!m||!C)return null;if(!sn(m.type,[Ur(dt),se,dt]))return f.error("Expected first argument to be of type array or string, but found "+fr(m.type)+" instead");if(l.length===4){var M=f.parse(l[3],3,Fe);return M?new xc(m.type,m,C,M):null}return new xc(m.type,m,C)},xc.prototype.evaluate=function(l){var f=this.input.evaluate(l),m=this.beginIndex.evaluate(l);if(!tn(f,["string","array"]))throw new eo("Expected first argument to be of type array or string, but found "+fr(Qi(f))+" instead.");if(this.endIndex){var C=this.endIndex.evaluate(l);return f.slice(m,C)}return f.slice(m)},xc.prototype.eachChild=function(l){l(this.input),l(this.beginIndex),this.endIndex&&l(this.endIndex)},xc.prototype.outputDefined=function(){return!1},xc.prototype.serialize=function(){if(this.endIndex!=null&&this.endIndex!==void 0){var l=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),l]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};var cp=$i("==",function(l,f,m){return f===m},up),Ed=$i("!=",function(l,f,m){return f!==m},function(l,f,m,C){return!up(0,f,m,C)}),fp=$i("<",function(l,f,m){return f",function(l,f,m){return f>m},function(l,f,m,C){return C.compare(f,m)>0}),_c=$i("<=",function(l,f,m){return f<=m},function(l,f,m,C){return C.compare(f,m)<=0}),Lh=$i(">=",function(l,f,m){return f>=m},function(l,f,m,C){return C.compare(f,m)>=0}),ha=function(l,f,m,C,M){this.type=se,this.number=l,this.locale=f,this.currency=m,this.minFractionDigits=C,this.maxFractionDigits=M};ha.parse=function(l,f){if(l.length!==3)return f.error("Expected two arguments.");var m=f.parse(l[1],1,Fe);if(!m)return null;var C=l[2];if(typeof C!="object"||Array.isArray(C))return f.error("NumberFormat options argument must be an object.");var M=null;if(C.locale&&!(M=f.parse(C.locale,1,se)))return null;var R=null;if(C.currency&&!(R=f.parse(C.currency,1,se)))return null;var W=null;if(C["min-fraction-digits"]&&!(W=f.parse(C["min-fraction-digits"],1,Fe)))return null;var ee=null;return C["max-fraction-digits"]&&!(ee=f.parse(C["max-fraction-digits"],1,Fe))?null:new ha(m,M,R,W,ee)},ha.prototype.evaluate=function(l){return new Intl.NumberFormat(this.locale?this.locale.evaluate(l):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(l):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(l):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(l):void 0}).format(this.number.evaluate(l))},ha.prototype.eachChild=function(l){l(this.number),this.locale&&l(this.locale),this.currency&&l(this.currency),this.minFractionDigits&&l(this.minFractionDigits),this.maxFractionDigits&&l(this.maxFractionDigits)},ha.prototype.outputDefined=function(){return!1},ha.prototype.serialize=function(){var l={};return this.locale&&(l.locale=this.locale.serialize()),this.currency&&(l.currency=this.currency.serialize()),this.minFractionDigits&&(l["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(l["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),l]};var Es=function(l){this.type=Fe,this.input=l};Es.parse=function(l,f){if(l.length!==2)return f.error("Expected 1 argument, but found "+(l.length-1)+" instead.");var m=f.parse(l[1],1);return m?m.type.kind!=="array"&&m.type.kind!=="string"&&m.type.kind!=="value"?f.error("Expected argument of type string or array, but found "+fr(m.type)+" instead."):new Es(m):null},Es.prototype.evaluate=function(l){var f=this.input.evaluate(l);if(typeof f=="string"||Array.isArray(f))return f.length;throw new eo("Expected value to be of type string or array, but found "+fr(Qi(f))+" instead.")},Es.prototype.eachChild=function(l){l(this.input)},Es.prototype.outputDefined=function(){return!1},Es.prototype.serialize=function(){var l=["length"];return this.eachChild(function(f){l.push(f.serialize())}),l};var Pa={"==":cp,"!=":Ed,">":hf,"<":fp,">=":Lh,"<=":_c,array:li,at:$u,boolean:li,case:bc,coalesce:fa,collator:hs,format:Wa,image:Xa,in:Oo,"index-of":yc,interpolate:Ma,"interpolate-hcl":Ma,"interpolate-lab":Ma,length:Es,let:Cf,literal:_o,match:ru,number:li,"number-format":ha,object:li,slice:xc,step:Js,string:li,"to-boolean":uo,"to-color":uo,"to-number":uo,"to-string":uo,var:tu,within:Hi};function wc(l,f){var m=f[0],C=f[1],M=f[2],R=f[3];m=m.evaluate(l),C=C.evaluate(l),M=M.evaluate(l);var W=R?R.evaluate(l):1,ee=Aa(m,C,M,W);if(ee)throw new eo(ee);return new ti(m/255*W,C/255*W,M/255*W,W)}function Rh(l,f){return l in f}function Ku(l,f){var m=f[l];return m===void 0?null:m}function nu(l){return{type:l}}function hp(l){return{result:"success",value:l}}function Af(l){return{result:"error",value:l}}function zc(l){return l["property-type"]==="data-driven"||l["property-type"]==="cross-faded-data-driven"}function Gu(l){return!!l.expression&&l.expression.parameters.indexOf("zoom")>-1}function kl(l){return!!l.expression&&l.expression.interpolated}function So(l){return l instanceof Number?"number":l instanceof String?"string":l instanceof Boolean?"boolean":Array.isArray(l)?"array":l===null?"null":typeof l}function Yu(l){return typeof l=="object"&&l!==null&&!Array.isArray(l)}function Sc(l){return l}function iu(l,f,m){return l!==void 0?l:f!==void 0?f:m!==void 0?m:void 0}function Fh(l,f,m,C,M){return iu(typeof m===M?C[m]:void 0,l.default,f.default)}function Zm(l,f,m){if(So(m)!=="number")return iu(l.default,f.default);var C=l.stops.length;if(C===1||m<=l.stops[0][0])return l.stops[0][1];if(m>=l.stops[C-1][0])return l.stops[C-1][1];var M=Ef(l.stops.map(function(R){return R[0]}),m);return l.stops[M][1]}function om(l,f,m){var C=l.base!==void 0?l.base:1;if(So(m)!=="number")return iu(l.default,f.default);var M=l.stops.length;if(M===1||m<=l.stops[0][0])return l.stops[0][1];if(m>=l.stops[M-1][0])return l.stops[M-1][1];var R=Ef(l.stops.map(function(De){return De[0]}),m),W=function(De,Re,$e,ut){var ct=ut-$e,_t=De-$e;return ct===0?0:Re===1?_t/ct:(Math.pow(Re,_t)-1)/(Math.pow(Re,ct)-1)}(m,C,l.stops[R][0],l.stops[R+1][0]),ee=l.stops[R][1],ce=l.stops[R+1][1],xe=Qf[f.type]||Sc;if(l.colorSpace&&l.colorSpace!=="rgb"){var Te=th[l.colorSpace];xe=function(De,Re){return Te.reverse(Te.interpolate(Te.forward(De),Te.forward(Re),W))}}return typeof ee.evaluate=="function"?{evaluate:function(){for(var De=arguments,Re=[],$e=arguments.length;$e--;)Re[$e]=De[$e];var ut=ee.evaluate.apply(void 0,Re),ct=ce.evaluate.apply(void 0,Re);if(ut!==void 0&&ct!==void 0)return xe(ut,ct,W)}}:xe(ee,ce,W)}function Df(l,f,m){return f.type==="color"?m=ti.parse(m):f.type==="formatted"?m=ii.fromString(m.toString()):f.type==="resolvedImage"?m=Mi.fromString(m.toString()):So(m)===f.type||f.type==="enum"&&f.values[m]||(m=void 0),iu(m,l.default,f.default)}qo.register(Pa,{error:[{kind:"error"},[se],function(l,f){throw new eo(f[0].evaluate(l))}],typeof:[se,[dt],function(l,f){return fr(Qi(f[0].evaluate(l)))}],"to-rgba":[Ur(Fe,4),[_e],function(l,f){return f[0].evaluate(l).toArray()}],rgb:[_e,[Fe,Fe,Fe],wc],rgba:[_e,[Fe,Fe,Fe,Fe],wc],has:{type:oe,overloads:[[[se],function(l,f){return Rh(f[0].evaluate(l),l.properties())}],[[se,Ke],function(l,f){var m=f[1];return Rh(f[0].evaluate(l),m.evaluate(l))}]]},get:{type:dt,overloads:[[[se],function(l,f){return Ku(f[0].evaluate(l),l.properties())}],[[se,Ke],function(l,f){var m=f[1];return Ku(f[0].evaluate(l),m.evaluate(l))}]]},"feature-state":[dt,[se],function(l,f){return Ku(f[0].evaluate(l),l.featureState||{})}],properties:[Ke,[],function(l){return l.properties()}],"geometry-type":[se,[],function(l){return l.geometryType()}],id:[dt,[],function(l){return l.id()}],zoom:[Fe,[],function(l){return l.globals.zoom}],"heatmap-density":[Fe,[],function(l){return l.globals.heatmapDensity||0}],"line-progress":[Fe,[],function(l){return l.globals.lineProgress||0}],accumulated:[dt,[],function(l){return l.globals.accumulated===void 0?null:l.globals.accumulated}],"+":[Fe,nu(Fe),function(l,f){for(var m=0,C=0,M=f;C":[oe,[se,dt],function(l,f){var m=f[0],C=f[1],M=l.properties()[m.value],R=C.value;return typeof M==typeof R&&M>R}],"filter-id->":[oe,[dt],function(l,f){var m=f[0],C=l.id(),M=m.value;return typeof C==typeof M&&C>M}],"filter-<=":[oe,[se,dt],function(l,f){var m=f[0],C=f[1],M=l.properties()[m.value],R=C.value;return typeof M==typeof R&&M<=R}],"filter-id-<=":[oe,[dt],function(l,f){var m=f[0],C=l.id(),M=m.value;return typeof C==typeof M&&C<=M}],"filter->=":[oe,[se,dt],function(l,f){var m=f[0],C=f[1],M=l.properties()[m.value],R=C.value;return typeof M==typeof R&&M>=R}],"filter-id->=":[oe,[dt],function(l,f){var m=f[0],C=l.id(),M=m.value;return typeof C==typeof M&&C>=M}],"filter-has":[oe,[dt],function(l,f){return f[0].value in l.properties()}],"filter-has-id":[oe,[],function(l){return l.id()!==null&&l.id()!==void 0}],"filter-type-in":[oe,[Ur(se)],function(l,f){return f[0].value.indexOf(l.geometryType())>=0}],"filter-id-in":[oe,[Ur(dt)],function(l,f){return f[0].value.indexOf(l.id())>=0}],"filter-in-small":[oe,[se,Ur(dt)],function(l,f){var m=f[0];return f[1].value.indexOf(l.properties()[m.value])>=0}],"filter-in-large":[oe,[se,Ur(dt)],function(l,f){var m=f[0],C=f[1];return function(M,R,W,ee){for(;W<=ee;){var ce=W+ee>>1;if(R[ce]===M)return!0;R[ce]>M?ee=ce-1:W=ce+1}return!1}(l.properties()[m.value],C.value,0,C.value.length-1)}],all:{type:oe,overloads:[[[oe,oe],function(l,f){var m=f[1];return f[0].evaluate(l)&&m.evaluate(l)}],[nu(oe),function(l,f){for(var m=0,C=f;m0&&typeof l[0]=="string"&&l[0]in Pa}function kc(l,f){var m=new wo(Pa,[],f?function(M){var R={color:_e,string:se,number:Fe,enum:se,boolean:oe,formatted:tr,resolvedImage:Or};return M.type==="array"?Ur(R[M.value]||dt,M.length):R[M.type]}(f):void 0),C=m.parse(l,void 0,void 0,void 0,f&&f.type==="string"?{typeAnnotation:"coerce"}:void 0);return C?hp(new Eu(C,f)):Af(m.errors)}Eu.prototype.evaluateWithoutErrorHandling=function(l,f,m,C,M,R){return this._evaluator.globals=l,this._evaluator.feature=f,this._evaluator.featureState=m,this._evaluator.canonical=C,this._evaluator.availableImages=M||null,this._evaluator.formattedSection=R,this.expression.evaluate(this._evaluator)},Eu.prototype.evaluate=function(l,f,m,C,M,R){this._evaluator.globals=l,this._evaluator.feature=f||null,this._evaluator.featureState=m||null,this._evaluator.canonical=C,this._evaluator.availableImages=M||null,this._evaluator.formattedSection=R||null;try{var W=this.expression.evaluate(this._evaluator);if(W==null||typeof W=="number"&&W!=W)return this._defaultValue;if(this._enumValues&&!(W in this._enumValues))throw new eo("Expected value to be one of "+Object.keys(this._enumValues).map(function(ee){return JSON.stringify(ee)}).join(", ")+", but found "+JSON.stringify(W)+" instead.");return W}catch(ee){return this._warningHistory[ee.message]||(this._warningHistory[ee.message]=!0,typeof console<"u"&&console.warn(ee.message)),this._defaultValue}};var df=function(l,f){this.kind=l,this._styleExpression=f,this.isStateDependent=l!=="constant"&&!Ia(f.expression)};df.prototype.evaluateWithoutErrorHandling=function(l,f,m,C,M,R){return this._styleExpression.evaluateWithoutErrorHandling(l,f,m,C,M,R)},df.prototype.evaluate=function(l,f,m,C,M,R){return this._styleExpression.evaluate(l,f,m,C,M,R)};var Of=function(l,f,m,C){this.kind=l,this.zoomStops=m,this._styleExpression=f,this.isStateDependent=l!=="camera"&&!Ia(f.expression),this.interpolationType=C};function Nh(l,f){if((l=kc(l,f)).result==="error")return l;var m=l.value.expression,C=eu(m);if(!C&&!zc(f))return Af([new hr("","data expressions not supported")]);var M=js(m,["zoom"]);if(!M&&!Gu(f))return Af([new hr("","zoom expressions not supported")]);var R=function W(ee){var ce=null;if(ee instanceof Cf)ce=W(ee.result);else if(ee instanceof fa)for(var xe=0,Te=ee.args;xeC.maximum?[new Ge(f,m,m+" is greater than the maximum value "+C.maximum)]:[]}function gr(l){var f,m,C,M=l.valueSpec,R=Ht(l.value.type),W={},ee=R!=="categorical"&&l.value.property===void 0,ce=!ee,xe=So(l.value.stops)==="array"&&So(l.value.stops[0])==="array"&&So(l.value.stops[0][0])==="object",Te=Cu({key:l.key,value:l.value,valueSpec:l.styleSpec.function,style:l.style,styleSpec:l.styleSpec,objectElementValidators:{stops:function($e){if(R==="identity")return[new Ge($e.key,$e.value,'identity function may not have a "stops" property')];var ut=[],ct=$e.value;return ut=ut.concat(ou({key:$e.key,value:ct,valueSpec:$e.valueSpec,style:$e.style,styleSpec:$e.styleSpec,arrayElementValidator:De})),So(ct)==="array"&&ct.length===0&&ut.push(new Ge($e.key,ct,"array must have at least one stop")),ut},default:function($e){return pi({key:$e.key,value:$e.value,valueSpec:M,style:$e.style,styleSpec:$e.styleSpec})}}});return R==="identity"&&ee&&Te.push(new Ge(l.key,l.value,'missing required property "property"')),R==="identity"||l.value.stops||Te.push(new Ge(l.key,l.value,'missing required property "stops"')),R==="exponential"&&l.valueSpec.expression&&!kl(l.valueSpec)&&Te.push(new Ge(l.key,l.value,"exponential functions not supported")),l.styleSpec.$version>=8&&(ce&&!zc(l.valueSpec)?Te.push(new Ge(l.key,l.value,"property functions not supported")):ee&&!Gu(l.valueSpec)&&Te.push(new Ge(l.key,l.value,"zoom functions not supported"))),R!=="categorical"&&!xe||l.value.property!==void 0||Te.push(new Ge(l.key,l.value,'"property" property is required')),Te;function De($e){var ut=[],ct=$e.value,_t=$e.key;if(So(ct)!=="array")return[new Ge(_t,ct,"array expected, "+So(ct)+" found")];if(ct.length!==2)return[new Ge(_t,ct,"array length 2 expected, length "+ct.length+" found")];if(xe){if(So(ct[0])!=="object")return[new Ge(_t,ct,"object expected, "+So(ct[0])+" found")];if(ct[0].zoom===void 0)return[new Ge(_t,ct,"object stop key must have zoom")];if(ct[0].value===void 0)return[new Ge(_t,ct,"object stop key must have value")];if(C&&C>Ht(ct[0].zoom))return[new Ge(_t,ct[0].zoom,"stop zoom values must appear in ascending order")];Ht(ct[0].zoom)!==C&&(C=Ht(ct[0].zoom),m=void 0,W={}),ut=ut.concat(Cu({key:_t+"[0]",value:ct[0],valueSpec:{zoom:{}},style:$e.style,styleSpec:$e.styleSpec,objectElementValidators:{zoom:Rt,value:Re}}))}else ut=ut.concat(Re({key:_t+"[0]",value:ct[0],valueSpec:{},style:$e.style,styleSpec:$e.styleSpec},ct));return Qs(zt(ct[1]))?ut.concat([new Ge(_t+"[1]",ct[1],"expressions are not allowed in function stops.")]):ut.concat(pi({key:_t+"[1]",value:ct[1],valueSpec:M,style:$e.style,styleSpec:$e.styleSpec}))}function Re($e,ut){var ct=So($e.value),_t=Ht($e.value),gt=$e.value!==null?$e.value:ut;if(f){if(ct!==f)return[new Ge($e.key,gt,ct+" stop domain type must match previous stop domain type "+f)]}else f=ct;if(ct!=="number"&&ct!=="string"&&ct!=="boolean")return[new Ge($e.key,gt,"stop domain value must be a number, string, or boolean")];if(ct!=="number"&&R!=="categorical"){var Lt="number expected, "+ct+" found";return zc(M)&&R===void 0&&(Lt+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Ge($e.key,gt,Lt)]}return R!=="categorical"||ct!=="number"||isFinite(_t)&&Math.floor(_t)===_t?R!=="categorical"&&ct==="number"&&m!==void 0&&_t=2&&l[1]!=="$id"&&l[1]!=="$type";case"in":return l.length>=3&&(typeof l[1]!="string"||Array.isArray(l[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return l.length!==3||Array.isArray(l[1])||Array.isArray(l[2]);case"any":case"all":for(var f=0,m=l.slice(1);ff?1:0}function Tc(l){if(!l)return!0;var f,m=l[0];return l.length<=1?m!=="any":m==="=="?If(l[1],l[2],"=="):m==="!="?jc(If(l[1],l[2],"==")):m==="<"||m===">"||m==="<="||m===">="?If(l[1],l[2],m):m==="any"?(f=l.slice(1),["any"].concat(f.map(Tc))):m==="all"?["all"].concat(l.slice(1).map(Tc)):m==="none"?["all"].concat(l.slice(1).map(Tc).map(jc)):m==="in"?Qa(l[1],l.slice(2)):m==="!in"?jc(Qa(l[1],l.slice(2))):m==="has"?Zu(l[1]):m==="!has"?jc(Zu(l[1])):m!=="within"||l}function If(l,f,m){switch(l){case"$type":return["filter-type-"+m,f];case"$id":return["filter-id-"+m,f];default:return["filter-"+m,l,f]}}function Qa(l,f){if(f.length===0)return!1;switch(l){case"$type":return["filter-type-in",["literal",f]];case"$id":return["filter-id-in",["literal",f]];default:return f.length>200&&!f.some(function(m){return typeof m!=typeof f[0]})?["filter-in-large",l,["literal",f.sort(ho)]]:["filter-in-small",l,["literal",f]]}}function Zu(l){switch(l){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",l]}}function jc(l){return["!",l]}function Xu(l){return oi(zt(l.value))?sr(lr({},l,{expressionContext:"filter",valueSpec:{value:"boolean"}})):function f(m){var C=m.value,M=m.key;if(So(C)!=="array")return[new Ge(M,C,"array expected, "+So(C)+" found")];var R,W=m.styleSpec,ee=[];if(C.length<1)return[new Ge(M,C,"filter array must have at least 1 element")];switch(ee=ee.concat(hn({key:M+"[0]",value:C[0],valueSpec:W.filter_operator,style:m.style,styleSpec:m.styleSpec})),Ht(C[0])){case"<":case"<=":case">":case">=":C.length>=2&&Ht(C[1])==="$type"&&ee.push(new Ge(M,C,'"$type" cannot be use with operator "'+C[0]+'"'));case"==":case"!=":C.length!==3&&ee.push(new Ge(M,C,'filter array for operator "'+C[0]+'" must have 3 elements'));case"in":case"!in":C.length>=2&&(R=So(C[1]))!=="string"&&ee.push(new Ge(M+"[1]",C[1],"string expected, "+R+" found"));for(var ce=2;ce=Te[$e+0]&&C>=Te[$e+1])?(W[Re]=!0,R.push(xe[Re])):W[Re]=!1}}},ko.prototype._forEachCell=function(l,f,m,C,M,R,W,ee){for(var ce=this._convertToCellCoord(l),xe=this._convertToCellCoord(f),Te=this._convertToCellCoord(m),De=this._convertToCellCoord(C),Re=ce;Re<=Te;Re++)for(var $e=xe;$e<=De;$e++){var ut=this.d*$e+Re;if((!ee||ee(this._convertFromCellCoord(Re),this._convertFromCellCoord($e),this._convertFromCellCoord(Re+1),this._convertFromCellCoord($e+1)))&&M.call(this,l,f,m,C,ut,R,W,ee))return}},ko.prototype._convertFromCellCoord=function(l){return(l-this.padding)/this.scale},ko.prototype._convertToCellCoord=function(l){return Math.max(0,Math.min(this.d-1,Math.floor(l*this.scale)+this.padding))},ko.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var l=this.cells,f=3+this.cells.length+1+1,m=0,C=0;C=0)){var Te=l[xe];ce[xe]=da[ee].shallow.indexOf(xe)>=0?Te:lu(Te,f)}l instanceof Error&&(ce.message=l.message)}if(ce.$name)throw new Error("$name property is reserved for worker serialization logic.");return ee!=="Object"&&(ce.$name=ee),ce}throw new Error("can't serialize object of type "+typeof l)}function Va(l){if(l==null||typeof l=="boolean"||typeof l=="number"||typeof l=="string"||l instanceof Boolean||l instanceof Number||l instanceof String||l instanceof Date||l instanceof RegExp||Cc(l)||Qu(l)||ArrayBuffer.isView(l)||l instanceof Pf)return l;if(Array.isArray(l))return l.map(Va);if(typeof l=="object"){var f=l.$name||"Object",m=da[f].klass;if(!m)throw new Error("can't deserialize unregistered class "+f);if(m.deserialize)return m.deserialize(l);for(var C=Object.create(m.prototype),M=0,R=Object.keys(l);M=0?ee:Va(ee)}}return C}throw new Error("can't deserialize object of type "+typeof l)}var Lf=function(){this.first=!0};Lf.prototype.update=function(l,f){var m=Math.floor(l);return this.first?(this.first=!1,this.lastIntegerZoom=m,this.lastIntegerZoomTime=0,this.lastZoom=l,this.lastFloorZoom=m,!0):(this.lastFloorZoom>m?(this.lastIntegerZoom=m+1,this.lastIntegerZoomTime=f):this.lastFloorZoom=128&&l<=255},Arabic:function(l){return l>=1536&&l<=1791},"Arabic Supplement":function(l){return l>=1872&&l<=1919},"Arabic Extended-A":function(l){return l>=2208&&l<=2303},"Hangul Jamo":function(l){return l>=4352&&l<=4607},"Unified Canadian Aboriginal Syllabics":function(l){return l>=5120&&l<=5759},Khmer:function(l){return l>=6016&&l<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(l){return l>=6320&&l<=6399},"General Punctuation":function(l){return l>=8192&&l<=8303},"Letterlike Symbols":function(l){return l>=8448&&l<=8527},"Number Forms":function(l){return l>=8528&&l<=8591},"Miscellaneous Technical":function(l){return l>=8960&&l<=9215},"Control Pictures":function(l){return l>=9216&&l<=9279},"Optical Character Recognition":function(l){return l>=9280&&l<=9311},"Enclosed Alphanumerics":function(l){return l>=9312&&l<=9471},"Geometric Shapes":function(l){return l>=9632&&l<=9727},"Miscellaneous Symbols":function(l){return l>=9728&&l<=9983},"Miscellaneous Symbols and Arrows":function(l){return l>=11008&&l<=11263},"CJK Radicals Supplement":function(l){return l>=11904&&l<=12031},"Kangxi Radicals":function(l){return l>=12032&&l<=12255},"Ideographic Description Characters":function(l){return l>=12272&&l<=12287},"CJK Symbols and Punctuation":function(l){return l>=12288&&l<=12351},Hiragana:function(l){return l>=12352&&l<=12447},Katakana:function(l){return l>=12448&&l<=12543},Bopomofo:function(l){return l>=12544&&l<=12591},"Hangul Compatibility Jamo":function(l){return l>=12592&&l<=12687},Kanbun:function(l){return l>=12688&&l<=12703},"Bopomofo Extended":function(l){return l>=12704&&l<=12735},"CJK Strokes":function(l){return l>=12736&&l<=12783},"Katakana Phonetic Extensions":function(l){return l>=12784&&l<=12799},"Enclosed CJK Letters and Months":function(l){return l>=12800&&l<=13055},"CJK Compatibility":function(l){return l>=13056&&l<=13311},"CJK Unified Ideographs Extension A":function(l){return l>=13312&&l<=19903},"Yijing Hexagram Symbols":function(l){return l>=19904&&l<=19967},"CJK Unified Ideographs":function(l){return l>=19968&&l<=40959},"Yi Syllables":function(l){return l>=40960&&l<=42127},"Yi Radicals":function(l){return l>=42128&&l<=42191},"Hangul Jamo Extended-A":function(l){return l>=43360&&l<=43391},"Hangul Syllables":function(l){return l>=44032&&l<=55215},"Hangul Jamo Extended-B":function(l){return l>=55216&&l<=55295},"Private Use Area":function(l){return l>=57344&&l<=63743},"CJK Compatibility Ideographs":function(l){return l>=63744&&l<=64255},"Arabic Presentation Forms-A":function(l){return l>=64336&&l<=65023},"Vertical Forms":function(l){return l>=65040&&l<=65055},"CJK Compatibility Forms":function(l){return l>=65072&&l<=65103},"Small Form Variants":function(l){return l>=65104&&l<=65135},"Arabic Presentation Forms-B":function(l){return l>=65136&&l<=65279},"Halfwidth and Fullwidth Forms":function(l){return l>=65280&&l<=65519}};function $a(l){for(var f=0,m=l;f=65097&&l<=65103)||wr["CJK Compatibility Ideographs"](l)||wr["CJK Compatibility"](l)||wr["CJK Radicals Supplement"](l)||wr["CJK Strokes"](l)||!(!wr["CJK Symbols and Punctuation"](l)||l>=12296&&l<=12305||l>=12308&&l<=12319||l===12336)||wr["CJK Unified Ideographs Extension A"](l)||wr["CJK Unified Ideographs"](l)||wr["Enclosed CJK Letters and Months"](l)||wr["Hangul Compatibility Jamo"](l)||wr["Hangul Jamo Extended-A"](l)||wr["Hangul Jamo Extended-B"](l)||wr["Hangul Jamo"](l)||wr["Hangul Syllables"](l)||wr.Hiragana(l)||wr["Ideographic Description Characters"](l)||wr.Kanbun(l)||wr["Kangxi Radicals"](l)||wr["Katakana Phonetic Extensions"](l)||wr.Katakana(l)&&l!==12540||!(!wr["Halfwidth and Fullwidth Forms"](l)||l===65288||l===65289||l===65293||l>=65306&&l<=65310||l===65339||l===65341||l===65343||l>=65371&&l<=65503||l===65507||l>=65512&&l<=65519)||!(!wr["Small Form Variants"](l)||l>=65112&&l<=65118||l>=65123&&l<=65126)||wr["Unified Canadian Aboriginal Syllabics"](l)||wr["Unified Canadian Aboriginal Syllabics Extended"](l)||wr["Vertical Forms"](l)||wr["Yijing Hexagram Symbols"](l)||wr["Yi Syllables"](l)||wr["Yi Radicals"](l))))}function Dc(l){return!(Ac(l)||function(f){return!!(wr["Latin-1 Supplement"](f)&&(f===167||f===169||f===174||f===177||f===188||f===189||f===190||f===215||f===247)||wr["General Punctuation"](f)&&(f===8214||f===8224||f===8225||f===8240||f===8241||f===8251||f===8252||f===8258||f===8263||f===8264||f===8265||f===8273)||wr["Letterlike Symbols"](f)||wr["Number Forms"](f)||wr["Miscellaneous Technical"](f)&&(f>=8960&&f<=8967||f>=8972&&f<=8991||f>=8996&&f<=9e3||f===9003||f>=9085&&f<=9114||f>=9150&&f<=9165||f===9167||f>=9169&&f<=9179||f>=9186&&f<=9215)||wr["Control Pictures"](f)&&f!==9251||wr["Optical Character Recognition"](f)||wr["Enclosed Alphanumerics"](f)||wr["Geometric Shapes"](f)||wr["Miscellaneous Symbols"](f)&&!(f>=9754&&f<=9759)||wr["Miscellaneous Symbols and Arrows"](f)&&(f>=11026&&f<=11055||f>=11088&&f<=11097||f>=11192&&f<=11243)||wr["CJK Symbols and Punctuation"](f)||wr.Katakana(f)||wr["Private Use Area"](f)||wr["CJK Compatibility Forms"](f)||wr["Small Form Variants"](f)||wr["Halfwidth and Fullwidth Forms"](f)||f===8734||f===8756||f===8757||f>=9984&&f<=10087||f>=10102&&f<=10131||f===65532||f===65533)}(l))}function ps(l){return l>=1424&&l<=2303||wr["Arabic Presentation Forms-A"](l)||wr["Arabic Presentation Forms-B"](l)}function wa(l,f){return!(!f&&ps(l)||l>=2304&&l<=3583||l>=3840&&l<=4255||wr.Khmer(l))}function Al(l){for(var f=0,m=l;f-1&&(ts="error"),Dl&&Dl(l)};function sl(){Ou.fire(new ot("pluginStateChange",{pluginStatus:ts,pluginURL:ms}))}var Ou=new mt,Rf=function(){return ts},el=function(){if(ts!=="deferred"||!ms)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");ts="loading",sl(),ms&&Ha({url:ms},function(l){l?nh(l):(ts="loaded",sl())})},Ds={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return ts==="loaded"||Ds.applyArabicShaping!=null},isLoading:function(){return ts==="loading"},setState:function(l){ts=l.pluginStatus,ms=l.pluginURL},isParsed:function(){return Ds.applyArabicShaping!=null&&Ds.processBidirectionalText!=null&&Ds.processStyledBidirectionalText!=null},getPluginURL:function(){return ms}},mi=function(l,f){this.zoom=l,f?(this.now=f.now,this.fadeDuration=f.fadeDuration,this.zoomHistory=f.zoomHistory,this.transition=f.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Lf,this.transition={})};mi.prototype.isSupportedScript=function(l){return function(f,m){for(var C=0,M=f;Cthis.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:f+(1-f)*m}:{fromScale:.5,toScale:1,t:1-(1-m)*f}};var Hc=function(l,f){this.property=l,this.value=f,this.expression=function(m,C){if(Yu(m))return new Cs(m,C);if(Qs(m)){var M=Nh(m,C);if(M.result==="error")throw new Error(M.value.map(function(W){return W.key+": "+W.message}).join(", "));return M.value}var R=m;return typeof m=="string"&&C.type==="color"&&(R=ti.parse(m)),{kind:"constant",evaluate:function(){return R}}}(f===void 0?l.specification.default:f,l.specification)};Hc.prototype.isDataDriven=function(){return this.expression.kind==="source"||this.expression.kind==="composite"},Hc.prototype.possiblyEvaluate=function(l,f,m){return this.property.possiblyEvaluate(this,l,f,m)};var ec=function(l){this.property=l,this.value=new Hc(l,void 0)};ec.prototype.transitioned=function(l,f){return new Bo(this.property,this.value,f,V({},l.transition,this.transition),l.now)},ec.prototype.untransitioned=function(){return new Bo(this.property,this.value,null,{},0)};var ro=function(l){this._properties=l,this._values=Object.create(l.defaultTransitionablePropertyValues)};ro.prototype.getValue=function(l){return Ct(this._values[l].value.value)},ro.prototype.setValue=function(l,f){this._values.hasOwnProperty(l)||(this._values[l]=new ec(this._values[l].property)),this._values[l].value=new Hc(this._values[l].property,f===null?void 0:Ct(f))},ro.prototype.getTransition=function(l){return Ct(this._values[l].transition)},ro.prototype.setTransition=function(l,f){this._values.hasOwnProperty(l)||(this._values[l]=new ec(this._values[l].property)),this._values[l].transition=Ct(f)||void 0},ro.prototype.serialize=function(){for(var l={},f=0,m=Object.keys(this._values);fthis.end)return this.prior=null,M;if(this.value.isDataDriven())return this.prior=null,M;if(C=1)return 1;var ce=ee*ee,xe=ce*ee;return 4*(ee<.5?xe:3*(ee-ce)+xe-.75)}(W))}return M};var Sa=function(l){this._properties=l,this._values=Object.create(l.defaultTransitioningPropertyValues)};Sa.prototype.possiblyEvaluate=function(l,f,m){for(var C=new Ra(this._properties),M=0,R=Object.keys(this._values);MR.zoomHistory.lastIntegerZoom?{from:m,to:C}:{from:M,to:C}},f.prototype.interpolate=function(m){return m},f}(Sr),Os=function(l){this.specification=l};Os.prototype.possiblyEvaluate=function(l,f,m,C){if(l.value!==void 0){if(l.expression.kind==="constant"){var M=l.expression.evaluate(f,null,{},m,C);return this._calculate(M,M,M,f)}return this._calculate(l.expression.evaluate(new mi(Math.floor(f.zoom-1),f)),l.expression.evaluate(new mi(Math.floor(f.zoom),f)),l.expression.evaluate(new mi(Math.floor(f.zoom+1),f)),f)}},Os.prototype._calculate=function(l,f,m,C){return C.zoom>C.zoomHistory.lastIntegerZoom?{from:l,to:f}:{from:m,to:f}},Os.prototype.interpolate=function(l){return l};var Iu=function(l){this.specification=l};Iu.prototype.possiblyEvaluate=function(l,f,m,C){return!!l.expression.evaluate(f,null,{},m,C)},Iu.prototype.interpolate=function(){return!1};var pa=function(l){for(var f in this.properties=l,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[],l){var m=l[f];m.specification.overridable&&this.overridableProperties.push(f);var C=this.defaultPropertyValues[f]=new Hc(m,void 0),M=this.defaultTransitionablePropertyValues[f]=new ec(m);this.defaultTransitioningPropertyValues[f]=M.untransitioned(),this.defaultPossiblyEvaluatedValues[f]=C.possiblyEvaluate({})}};Xr("DataDrivenProperty",Sr),Xr("DataConstantProperty",Fr),Xr("CrossFadedDataDrivenProperty",pp),Xr("CrossFadedProperty",Os),Xr("ColorRampProperty",Iu);var tc=function(l){function f(m,C){if(l.call(this),this.id=m.id,this.type=m.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},m.type!=="custom"&&(this.metadata=(m=m).metadata,this.minzoom=m.minzoom,this.maxzoom=m.maxzoom,m.type!=="background"&&(this.source=m.source,this.sourceLayer=m["source-layer"],this.filter=m.filter),C.layout&&(this._unevaluatedLayout=new je(C.layout)),C.paint)){for(var M in this._transitionablePaint=new ro(C.paint),m.paint)this.setPaintProperty(M,m.paint[M],{validate:!1});for(var R in m.layout)this.setLayoutProperty(R,m.layout[R],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Ra(C.paint)}}return l&&(f.__proto__=l),(f.prototype=Object.create(l&&l.prototype)).constructor=f,f.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},f.prototype.getLayoutProperty=function(m){return m==="visibility"?this.visibility:this._unevaluatedLayout.getValue(m)},f.prototype.setLayoutProperty=function(m,C,M){M===void 0&&(M={}),C!=null&&this._validate(Ju,"layers."+this.id+".layout."+m,m,C,M)||(m!=="visibility"?this._unevaluatedLayout.setValue(m,C):this.visibility=C)},f.prototype.getPaintProperty=function(m){return Me(m,"-transition")?this._transitionablePaint.getTransition(m.slice(0,-11)):this._transitionablePaint.getValue(m)},f.prototype.setPaintProperty=function(m,C,M){if(M===void 0&&(M={}),C!=null&&this._validate(Mf,"layers."+this.id+".paint."+m,m,C,M))return!1;if(Me(m,"-transition"))return this._transitionablePaint.setTransition(m.slice(0,-11),C||void 0),!1;var R=this._transitionablePaint._values[m],W=R.property.specification["property-type"]==="cross-faded-data-driven",ee=R.value.isDataDriven(),ce=R.value;this._transitionablePaint.setValue(m,C),this._handleSpecialPaintPropertyUpdate(m);var xe=this._transitionablePaint._values[m].value;return xe.isDataDriven()||ee||W||this._handleOverridablePaintPropertyUpdate(m,ce,xe)},f.prototype._handleSpecialPaintPropertyUpdate=function(m){},f.prototype._handleOverridablePaintPropertyUpdate=function(m,C,M){return!1},f.prototype.isHidden=function(m){return!!(this.minzoom&&m=this.maxzoom)||this.visibility==="none"},f.prototype.updateTransitions=function(m){this._transitioningPaint=this._transitionablePaint.transitioned(m,this._transitioningPaint)},f.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},f.prototype.recalculate=function(m,C){m.getCrossfadeParameters&&(this._crossfadeParameters=m.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(m,void 0,C)),this.paint=this._transitioningPaint.possiblyEvaluate(m,void 0,C)},f.prototype.serialize=function(){var m={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(m.layout=m.layout||{},m.layout.visibility=this.visibility),Qe(m,function(C,M){return!(C===void 0||M==="layout"&&!Object.keys(C).length||M==="paint"&&!Object.keys(C).length)})},f.prototype._validate=function(m,C,M,R,W){return W===void 0&&(W={}),(!W||W.validate!==!1)&&su(this,m.call(Uc,{key:C,layerType:this.type,objectKey:M,value:R,styleSpec:Be,style:{glyphs:!0,sprite:!0}}))},f.prototype.is3D=function(){return!1},f.prototype.isTileClipped=function(){return!1},f.prototype.hasOffscreenPass=function(){return!1},f.prototype.resize=function(){},f.prototype.isStateDependent=function(){for(var m in this.paint._values){var C=this.paint.get(m);if(C instanceof Si&&zc(C.property.specification)&&(C.value.kind==="source"||C.value.kind==="composite")&&C.value.isStateDependent)return!0}return!1},f}(mt),Cd={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},ih=function(l,f){this._structArray=l,this._pos1=f*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},Bi=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};function gs(l,f){f===void 0&&(f=1);var m=0,C=0;return{members:l.map(function(M){var R=Cd[M.type].BYTES_PER_ELEMENT,W=m=Mu(m,Math.max(f,R)),ee=M.components||1;return C=Math.max(C,R),m+=R*ee,{name:M.name,type:M.type,components:ee,offset:W}}),size:Mu(m,Math.max(C,f)),alignment:f}}function Mu(l,f){return Math.ceil(l/f)*f}Bi.serialize=function(l,f){return l._trim(),f&&(l.isTransferred=!0,f.push(l.arrayBuffer)),{length:l.length,arrayBuffer:l.arrayBuffer}},Bi.deserialize=function(l){var f=Object.create(this.prototype);return f.arrayBuffer=l.arrayBuffer,f.length=l.length,f.capacity=l.arrayBuffer.byteLength/f.bytesPerElement,f._refreshViews(),f},Bi.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},Bi.prototype.clear=function(){this.length=0},Bi.prototype.resize=function(l){this.reserve(l),this.length=l},Bi.prototype.reserve=function(l){if(l>this.capacity){this.capacity=Math.max(l,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var f=this.uint8;this._refreshViews(),f&&this.uint8.set(f)}},Bi.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};var Oc=function(l){function f(){l.apply(this,arguments)}return l&&(f.__proto__=l),(f.prototype=Object.create(l&&l.prototype)).constructor=f,f.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},f.prototype.emplaceBack=function(m,C){var M=this.length;return this.resize(M+1),this.emplace(M,m,C)},f.prototype.emplace=function(m,C,M){var R=2*m;return this.int16[R+0]=C,this.int16[R+1]=M,m},f}(Bi);Oc.prototype.bytesPerElement=4,Xr("StructArrayLayout2i4",Oc);var Ad=function(l){function f(){l.apply(this,arguments)}return l&&(f.__proto__=l),(f.prototype=Object.create(l&&l.prototype)).constructor=f,f.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},f.prototype.emplaceBack=function(m,C,M,R){var W=this.length;return this.resize(W+1),this.emplace(W,m,C,M,R)},f.prototype.emplace=function(m,C,M,R,W){var ee=4*m;return this.int16[ee+0]=C,this.int16[ee+1]=M,this.int16[ee+2]=R,this.int16[ee+3]=W,m},f}(Bi);Ad.prototype.bytesPerElement=8,Xr("StructArrayLayout4i8",Ad);var uu=function(l){function f(){l.apply(this,arguments)}return l&&(f.__proto__=l),(f.prototype=Object.create(l&&l.prototype)).constructor=f,f.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},f.prototype.emplaceBack=function(m,C,M,R,W,ee){var ce=this.length;return this.resize(ce+1),this.emplace(ce,m,C,M,R,W,ee)},f.prototype.emplace=function(m,C,M,R,W,ee,ce){var xe=6*m;return this.int16[xe+0]=C,this.int16[xe+1]=M,this.int16[xe+2]=R,this.int16[xe+3]=W,this.int16[xe+4]=ee,this.int16[xe+5]=ce,m},f}(Bi);uu.prototype.bytesPerElement=12,Xr("StructArrayLayout2i4i12",uu);var ll=function(l){function f(){l.apply(this,arguments)}return l&&(f.__proto__=l),(f.prototype=Object.create(l&&l.prototype)).constructor=f,f.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},f.prototype.emplaceBack=function(m,C,M,R,W,ee){var ce=this.length;return this.resize(ce+1),this.emplace(ce,m,C,M,R,W,ee)},f.prototype.emplace=function(m,C,M,R,W,ee,ce){var xe=4*m,Te=8*m;return this.int16[xe+0]=C,this.int16[xe+1]=M,this.uint8[Te+4]=R,this.uint8[Te+5]=W,this.uint8[Te+6]=ee,this.uint8[Te+7]=ce,m},f}(Bi);ll.prototype.bytesPerElement=8,Xr("StructArrayLayout2i4ub8",ll);var Wc=function(l){function f(){l.apply(this,arguments)}return l&&(f.__proto__=l),(f.prototype=Object.create(l&&l.prototype)).constructor=f,f.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},f.prototype.emplaceBack=function(m,C){var M=this.length;return this.resize(M+1),this.emplace(M,m,C)},f.prototype.emplace=function(m,C,M){var R=2*m;return this.float32[R+0]=C,this.float32[R+1]=M,m},f}(Bi);Wc.prototype.bytesPerElement=8,Xr("StructArrayLayout2f8",Wc);var no=function(l){function f(){l.apply(this,arguments)}return l&&(f.__proto__=l),(f.prototype=Object.create(l&&l.prototype)).constructor=f,f.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},f.prototype.emplaceBack=function(m,C,M,R,W,ee,ce,xe,Te,De){var Re=this.length;return this.resize(Re+1),this.emplace(Re,m,C,M,R,W,ee,ce,xe,Te,De)},f.prototype.emplace=function(m,C,M,R,W,ee,ce,xe,Te,De,Re){var $e=10*m;return this.uint16[$e+0]=C,this.uint16[$e+1]=M,this.uint16[$e+2]=R,this.uint16[$e+3]=W,this.uint16[$e+4]=ee,this.uint16[$e+5]=ce,this.uint16[$e+6]=xe,this.uint16[$e+7]=Te,this.uint16[$e+8]=De,this.uint16[$e+9]=Re,m},f}(Bi);no.prototype.bytesPerElement=20,Xr("StructArrayLayout10ui20",no);var Dd=function(l){function f(){l.apply(this,arguments)}return l&&(f.__proto__=l),(f.prototype=Object.create(l&&l.prototype)).constructor=f,f.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},f.prototype.emplaceBack=function(m,C,M,R,W,ee,ce,xe,Te,De,Re,$e){var ut=this.length;return this.resize(ut+1),this.emplace(ut,m,C,M,R,W,ee,ce,xe,Te,De,Re,$e)},f.prototype.emplace=function(m,C,M,R,W,ee,ce,xe,Te,De,Re,$e,ut){var ct=12*m;return this.int16[ct+0]=C,this.int16[ct+1]=M,this.int16[ct+2]=R,this.int16[ct+3]=W,this.uint16[ct+4]=ee,this.uint16[ct+5]=ce,this.uint16[ct+6]=xe,this.uint16[ct+7]=Te,this.int16[ct+8]=De,this.int16[ct+9]=Re,this.int16[ct+10]=$e,this.int16[ct+11]=ut,m},f}(Bi);Dd.prototype.bytesPerElement=24,Xr("StructArrayLayout4i4ui4i24",Dd);var pf=function(l){function f(){l.apply(this,arguments)}return l&&(f.__proto__=l),(f.prototype=Object.create(l&&l.prototype)).constructor=f,f.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},f.prototype.emplaceBack=function(m,C,M){var R=this.length;return this.resize(R+1),this.emplace(R,m,C,M)},f.prototype.emplace=function(m,C,M,R){var W=3*m;return this.float32[W+0]=C,this.float32[W+1]=M,this.float32[W+2]=R,m},f}(Bi);pf.prototype.bytesPerElement=12,Xr("StructArrayLayout3f12",pf);var cu=function(l){function f(){l.apply(this,arguments)}return l&&(f.__proto__=l),(f.prototype=Object.create(l&&l.prototype)).constructor=f,f.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},f.prototype.emplaceBack=function(m){var C=this.length;return this.resize(C+1),this.emplace(C,m)},f.prototype.emplace=function(m,C){return this.uint32[1*m+0]=C,m},f}(Bi);cu.prototype.bytesPerElement=4,Xr("StructArrayLayout1ul4",cu);var ul=function(l){function f(){l.apply(this,arguments)}return l&&(f.__proto__=l),(f.prototype=Object.create(l&&l.prototype)).constructor=f,f.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},f.prototype.emplaceBack=function(m,C,M,R,W,ee,ce,xe,Te){var De=this.length;return this.resize(De+1),this.emplace(De,m,C,M,R,W,ee,ce,xe,Te)},f.prototype.emplace=function(m,C,M,R,W,ee,ce,xe,Te,De){var Re=10*m,$e=5*m;return this.int16[Re+0]=C,this.int16[Re+1]=M,this.int16[Re+2]=R,this.int16[Re+3]=W,this.int16[Re+4]=ee,this.int16[Re+5]=ce,this.uint32[$e+3]=xe,this.uint16[Re+8]=Te,this.uint16[Re+9]=De,m},f}(Bi);ul.prototype.bytesPerElement=20,Xr("StructArrayLayout6i1ul2ui20",ul);var Ui=function(l){function f(){l.apply(this,arguments)}return l&&(f.__proto__=l),(f.prototype=Object.create(l&&l.prototype)).constructor=f,f.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},f.prototype.emplaceBack=function(m,C,M,R,W,ee){var ce=this.length;return this.resize(ce+1),this.emplace(ce,m,C,M,R,W,ee)},f.prototype.emplace=function(m,C,M,R,W,ee,ce){var xe=6*m;return this.int16[xe+0]=C,this.int16[xe+1]=M,this.int16[xe+2]=R,this.int16[xe+3]=W,this.int16[xe+4]=ee,this.int16[xe+5]=ce,m},f}(Bi);Ui.prototype.bytesPerElement=12,Xr("StructArrayLayout2i2i2i12",Ui);var ka=function(l){function f(){l.apply(this,arguments)}return l&&(f.__proto__=l),(f.prototype=Object.create(l&&l.prototype)).constructor=f,f.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},f.prototype.emplaceBack=function(m,C,M,R,W){var ee=this.length;return this.resize(ee+1),this.emplace(ee,m,C,M,R,W)},f.prototype.emplace=function(m,C,M,R,W,ee){var ce=4*m,xe=8*m;return this.float32[ce+0]=C,this.float32[ce+1]=M,this.float32[ce+2]=R,this.int16[xe+6]=W,this.int16[xe+7]=ee,m},f}(Bi);ka.prototype.bytesPerElement=16,Xr("StructArrayLayout2f1f2i16",ka);var Ka=function(l){function f(){l.apply(this,arguments)}return l&&(f.__proto__=l),(f.prototype=Object.create(l&&l.prototype)).constructor=f,f.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},f.prototype.emplaceBack=function(m,C,M,R){var W=this.length;return this.resize(W+1),this.emplace(W,m,C,M,R)},f.prototype.emplace=function(m,C,M,R,W){var ee=12*m,ce=3*m;return this.uint8[ee+0]=C,this.uint8[ee+1]=M,this.float32[ce+1]=R,this.float32[ce+2]=W,m},f}(Bi);Ka.prototype.bytesPerElement=12,Xr("StructArrayLayout2ub2f12",Ka);var ui=function(l){function f(){l.apply(this,arguments)}return l&&(f.__proto__=l),(f.prototype=Object.create(l&&l.prototype)).constructor=f,f.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},f.prototype.emplaceBack=function(m,C,M){var R=this.length;return this.resize(R+1),this.emplace(R,m,C,M)},f.prototype.emplace=function(m,C,M,R){var W=3*m;return this.uint16[W+0]=C,this.uint16[W+1]=M,this.uint16[W+2]=R,m},f}(Bi);ui.prototype.bytesPerElement=6,Xr("StructArrayLayout3ui6",ui);var zo=function(l){function f(){l.apply(this,arguments)}return l&&(f.__proto__=l),(f.prototype=Object.create(l&&l.prototype)).constructor=f,f.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},f.prototype.emplaceBack=function(m,C,M,R,W,ee,ce,xe,Te,De,Re,$e,ut,ct,_t,gt,Lt){var Gt=this.length;return this.resize(Gt+1),this.emplace(Gt,m,C,M,R,W,ee,ce,xe,Te,De,Re,$e,ut,ct,_t,gt,Lt)},f.prototype.emplace=function(m,C,M,R,W,ee,ce,xe,Te,De,Re,$e,ut,ct,_t,gt,Lt,Gt){var Qt=24*m,ar=12*m,pr=48*m;return this.int16[Qt+0]=C,this.int16[Qt+1]=M,this.uint16[Qt+2]=R,this.uint16[Qt+3]=W,this.uint32[ar+2]=ee,this.uint32[ar+3]=ce,this.uint32[ar+4]=xe,this.uint16[Qt+10]=Te,this.uint16[Qt+11]=De,this.uint16[Qt+12]=Re,this.float32[ar+7]=$e,this.float32[ar+8]=ut,this.uint8[pr+36]=ct,this.uint8[pr+37]=_t,this.uint8[pr+38]=gt,this.uint32[ar+10]=Lt,this.int16[Qt+22]=Gt,m},f}(Bi);zo.prototype.bytesPerElement=48,Xr("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",zo);var Pu=function(l){function f(){l.apply(this,arguments)}return l&&(f.__proto__=l),(f.prototype=Object.create(l&&l.prototype)).constructor=f,f.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},f.prototype.emplaceBack=function(m,C,M,R,W,ee,ce,xe,Te,De,Re,$e,ut,ct,_t,gt,Lt,Gt,Qt,ar,pr,Ar,Wr,Tn,Jr,In,nn,vi){var Hn=this.length;return this.resize(Hn+1),this.emplace(Hn,m,C,M,R,W,ee,ce,xe,Te,De,Re,$e,ut,ct,_t,gt,Lt,Gt,Qt,ar,pr,Ar,Wr,Tn,Jr,In,nn,vi)},f.prototype.emplace=function(m,C,M,R,W,ee,ce,xe,Te,De,Re,$e,ut,ct,_t,gt,Lt,Gt,Qt,ar,pr,Ar,Wr,Tn,Jr,In,nn,vi,Hn){var mn=34*m,Oi=17*m;return this.int16[mn+0]=C,this.int16[mn+1]=M,this.int16[mn+2]=R,this.int16[mn+3]=W,this.int16[mn+4]=ee,this.int16[mn+5]=ce,this.int16[mn+6]=xe,this.int16[mn+7]=Te,this.uint16[mn+8]=De,this.uint16[mn+9]=Re,this.uint16[mn+10]=$e,this.uint16[mn+11]=ut,this.uint16[mn+12]=ct,this.uint16[mn+13]=_t,this.uint16[mn+14]=gt,this.uint16[mn+15]=Lt,this.uint16[mn+16]=Gt,this.uint16[mn+17]=Qt,this.uint16[mn+18]=ar,this.uint16[mn+19]=pr,this.uint16[mn+20]=Ar,this.uint16[mn+21]=Wr,this.uint16[mn+22]=Tn,this.uint32[Oi+12]=Jr,this.float32[Oi+13]=In,this.float32[Oi+14]=nn,this.float32[Oi+15]=vi,this.float32[Oi+16]=Hn,m},f}(Bi);Pu.prototype.bytesPerElement=68,Xr("StructArrayLayout8i15ui1ul4f68",Pu);var cl=function(l){function f(){l.apply(this,arguments)}return l&&(f.__proto__=l),(f.prototype=Object.create(l&&l.prototype)).constructor=f,f.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},f.prototype.emplaceBack=function(m){var C=this.length;return this.resize(C+1),this.emplace(C,m)},f.prototype.emplace=function(m,C){return this.float32[1*m+0]=C,m},f}(Bi);cl.prototype.bytesPerElement=4,Xr("StructArrayLayout1f4",cl);var Lu=function(l){function f(){l.apply(this,arguments)}return l&&(f.__proto__=l),(f.prototype=Object.create(l&&l.prototype)).constructor=f,f.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},f.prototype.emplaceBack=function(m,C,M){var R=this.length;return this.resize(R+1),this.emplace(R,m,C,M)},f.prototype.emplace=function(m,C,M,R){var W=3*m;return this.int16[W+0]=C,this.int16[W+1]=M,this.int16[W+2]=R,m},f}(Bi);Lu.prototype.bytesPerElement=6,Xr("StructArrayLayout3i6",Lu);var oh=function(l){function f(){l.apply(this,arguments)}return l&&(f.__proto__=l),(f.prototype=Object.create(l&&l.prototype)).constructor=f,f.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},f.prototype.emplaceBack=function(m,C,M){var R=this.length;return this.resize(R+1),this.emplace(R,m,C,M)},f.prototype.emplace=function(m,C,M,R){var W=4*m;return this.uint32[2*m+0]=C,this.uint16[W+2]=M,this.uint16[W+3]=R,m},f}(Bi);oh.prototype.bytesPerElement=8,Xr("StructArrayLayout1ul2ui8",oh);var Vc=function(l){function f(){l.apply(this,arguments)}return l&&(f.__proto__=l),(f.prototype=Object.create(l&&l.prototype)).constructor=f,f.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},f.prototype.emplaceBack=function(m,C){var M=this.length;return this.resize(M+1),this.emplace(M,m,C)},f.prototype.emplace=function(m,C,M){var R=2*m;return this.uint16[R+0]=C,this.uint16[R+1]=M,m},f}(Bi);Vc.prototype.bytesPerElement=4,Xr("StructArrayLayout2ui4",Vc);var Od=function(l){function f(){l.apply(this,arguments)}return l&&(f.__proto__=l),(f.prototype=Object.create(l&&l.prototype)).constructor=f,f.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},f.prototype.emplaceBack=function(m){var C=this.length;return this.resize(C+1),this.emplace(C,m)},f.prototype.emplace=function(m,C){return this.uint16[1*m+0]=C,m},f}(Bi);Od.prototype.bytesPerElement=2,Xr("StructArrayLayout1ui2",Od);var mf=function(l){function f(){l.apply(this,arguments)}return l&&(f.__proto__=l),(f.prototype=Object.create(l&&l.prototype)).constructor=f,f.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},f.prototype.emplaceBack=function(m,C,M,R){var W=this.length;return this.resize(W+1),this.emplace(W,m,C,M,R)},f.prototype.emplace=function(m,C,M,R,W){var ee=4*m;return this.float32[ee+0]=C,this.float32[ee+1]=M,this.float32[ee+2]=R,this.float32[ee+3]=W,m},f}(Bi);mf.prototype.bytesPerElement=16,Xr("StructArrayLayout4f16",mf);var v=function(l){function f(){l.apply(this,arguments)}l&&(f.__proto__=l),(f.prototype=Object.create(l&&l.prototype)).constructor=f;var m={anchorPointX:{configurable:!0},anchorPointY:{configurable:!0},x1:{configurable:!0},y1:{configurable:!0},x2:{configurable:!0},y2:{configurable:!0},featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0},anchorPoint:{configurable:!0}};return m.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},m.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},m.x1.get=function(){return this._structArray.int16[this._pos2+2]},m.y1.get=function(){return this._structArray.int16[this._pos2+3]},m.x2.get=function(){return this._structArray.int16[this._pos2+4]},m.y2.get=function(){return this._structArray.int16[this._pos2+5]},m.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},m.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},m.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},m.anchorPoint.get=function(){return new Se(this.anchorPointX,this.anchorPointY)},Object.defineProperties(f.prototype,m),f}(ih);v.prototype.size=20;var w=function(l){function f(){l.apply(this,arguments)}return l&&(f.__proto__=l),(f.prototype=Object.create(l&&l.prototype)).constructor=f,f.prototype.get=function(m){return new v(this,m)},f}(ul);Xr("CollisionBoxArray",w);var b=function(l){function f(){l.apply(this,arguments)}l&&(f.__proto__=l),(f.prototype=Object.create(l&&l.prototype)).constructor=f;var m={anchorX:{configurable:!0},anchorY:{configurable:!0},glyphStartIndex:{configurable:!0},numGlyphs:{configurable:!0},vertexStartIndex:{configurable:!0},lineStartIndex:{configurable:!0},lineLength:{configurable:!0},segment:{configurable:!0},lowerSize:{configurable:!0},upperSize:{configurable:!0},lineOffsetX:{configurable:!0},lineOffsetY:{configurable:!0},writingMode:{configurable:!0},placedOrientation:{configurable:!0},hidden:{configurable:!0},crossTileID:{configurable:!0},associatedIconIndex:{configurable:!0}};return m.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},m.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},m.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},m.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},m.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},m.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},m.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},m.segment.get=function(){return this._structArray.uint16[this._pos2+10]},m.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},m.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},m.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},m.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},m.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},m.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},m.placedOrientation.set=function(C){this._structArray.uint8[this._pos1+37]=C},m.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},m.hidden.set=function(C){this._structArray.uint8[this._pos1+38]=C},m.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},m.crossTileID.set=function(C){this._structArray.uint32[this._pos4+10]=C},m.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(f.prototype,m),f}(ih);b.prototype.size=48;var A=function(l){function f(){l.apply(this,arguments)}return l&&(f.__proto__=l),(f.prototype=Object.create(l&&l.prototype)).constructor=f,f.prototype.get=function(m){return new b(this,m)},f}(zo);Xr("PlacedSymbolArray",A);var F=function(l){function f(){l.apply(this,arguments)}l&&(f.__proto__=l),(f.prototype=Object.create(l&&l.prototype)).constructor=f;var m={anchorX:{configurable:!0},anchorY:{configurable:!0},rightJustifiedTextSymbolIndex:{configurable:!0},centerJustifiedTextSymbolIndex:{configurable:!0},leftJustifiedTextSymbolIndex:{configurable:!0},verticalPlacedTextSymbolIndex:{configurable:!0},placedIconSymbolIndex:{configurable:!0},verticalPlacedIconSymbolIndex:{configurable:!0},key:{configurable:!0},textBoxStartIndex:{configurable:!0},textBoxEndIndex:{configurable:!0},verticalTextBoxStartIndex:{configurable:!0},verticalTextBoxEndIndex:{configurable:!0},iconBoxStartIndex:{configurable:!0},iconBoxEndIndex:{configurable:!0},verticalIconBoxStartIndex:{configurable:!0},verticalIconBoxEndIndex:{configurable:!0},featureIndex:{configurable:!0},numHorizontalGlyphVertices:{configurable:!0},numVerticalGlyphVertices:{configurable:!0},numIconVertices:{configurable:!0},numVerticalIconVertices:{configurable:!0},useRuntimeCollisionCircles:{configurable:!0},crossTileID:{configurable:!0},textBoxScale:{configurable:!0},textOffset0:{configurable:!0},textOffset1:{configurable:!0},collisionCircleDiameter:{configurable:!0}};return m.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},m.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},m.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},m.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},m.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},m.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},m.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},m.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},m.key.get=function(){return this._structArray.uint16[this._pos2+8]},m.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},m.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},m.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},m.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},m.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},m.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},m.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},m.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},m.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},m.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},m.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},m.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},m.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},m.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},m.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},m.crossTileID.set=function(C){this._structArray.uint32[this._pos4+12]=C},m.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},m.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},m.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},m.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(f.prototype,m),f}(ih);F.prototype.size=68;var K=function(l){function f(){l.apply(this,arguments)}return l&&(f.__proto__=l),(f.prototype=Object.create(l&&l.prototype)).constructor=f,f.prototype.get=function(m){return new F(this,m)},f}(Pu);Xr("SymbolInstanceArray",K);var Q=function(l){function f(){l.apply(this,arguments)}return l&&(f.__proto__=l),(f.prototype=Object.create(l&&l.prototype)).constructor=f,f.prototype.getoffsetX=function(m){return this.float32[1*m+0]},f}(cl);Xr("GlyphOffsetArray",Q);var ae=function(l){function f(){l.apply(this,arguments)}return l&&(f.__proto__=l),(f.prototype=Object.create(l&&l.prototype)).constructor=f,f.prototype.getx=function(m){return this.int16[3*m+0]},f.prototype.gety=function(m){return this.int16[3*m+1]},f.prototype.gettileUnitDistanceFromAnchor=function(m){return this.int16[3*m+2]},f}(Lu);Xr("SymbolLineVertexArray",ae);var we=function(l){function f(){l.apply(this,arguments)}l&&(f.__proto__=l),(f.prototype=Object.create(l&&l.prototype)).constructor=f;var m={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return m.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},m.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},m.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(f.prototype,m),f}(ih);we.prototype.size=8;var Oe=function(l){function f(){l.apply(this,arguments)}return l&&(f.__proto__=l),(f.prototype=Object.create(l&&l.prototype)).constructor=f,f.prototype.get=function(m){return new we(this,m)},f}(oh);Xr("FeatureIndexArray",Oe);var We=gs([{name:"a_pos",components:2,type:"Int16"}],4).members,Ve=function(l){l===void 0&&(l=[]),this.segments=l};function Xe(l,f){return 256*(l=N(Math.floor(l),0,255))+N(Math.floor(f),0,255)}Ve.prototype.prepareSegment=function(l,f,m,C){var M=this.segments[this.segments.length-1];return l>Ve.MAX_VERTEX_ARRAY_LENGTH&&Ft("Max vertices per segment is "+Ve.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+l),(!M||M.vertexLength+l>Ve.MAX_VERTEX_ARRAY_LENGTH||M.sortKey!==C)&&(M={vertexOffset:f.length,primitiveOffset:m.length,vertexLength:0,primitiveLength:0},C!==void 0&&(M.sortKey=C),this.segments.push(M)),M},Ve.prototype.get=function(){return this.segments},Ve.prototype.destroy=function(){for(var l=0,f=this.segments;l>>16)*ee&65535)<<16)&4294967295)<<15|xe>>>17))*ce+(((xe>>>16)*ce&65535)<<16)&4294967295)<<13|R>>>19))+((5*(R>>>16)&65535)<<16)&4294967295))+((58964+(W>>>16)&65535)<<16);switch(xe=0,C){case 3:xe^=(255&f.charCodeAt(Te+2))<<16;case 2:xe^=(255&f.charCodeAt(Te+1))<<8;case 1:R^=xe=(65535&(xe=(xe=(65535&(xe^=255&f.charCodeAt(Te)))*ee+(((xe>>>16)*ee&65535)<<16)&4294967295)<<15|xe>>>17))*ce+(((xe>>>16)*ce&65535)<<16)&4294967295}return R^=f.length,R=2246822507*(65535&(R^=R>>>16))+((2246822507*(R>>>16)&65535)<<16)&4294967295,R=3266489909*(65535&(R^=R>>>13))+((3266489909*(R>>>16)&65535)<<16)&4294967295,(R^=R>>>16)>>>0}}),vt=ve(function(l){l.exports=function(f,m){for(var C,M=f.length,R=m^M,W=0;M>=4;)C=1540483477*(65535&(C=255&f.charCodeAt(W)|(255&f.charCodeAt(++W))<<8|(255&f.charCodeAt(++W))<<16|(255&f.charCodeAt(++W))<<24))+((1540483477*(C>>>16)&65535)<<16),R=1540483477*(65535&R)+((1540483477*(R>>>16)&65535)<<16)^(C=1540483477*(65535&(C^=C>>>24))+((1540483477*(C>>>16)&65535)<<16)),M-=4,++W;switch(M){case 3:R^=(255&f.charCodeAt(W+2))<<16;case 2:R^=(255&f.charCodeAt(W+1))<<8;case 1:R=1540483477*(65535&(R^=255&f.charCodeAt(W)))+((1540483477*(R>>>16)&65535)<<16)}return R=1540483477*(65535&(R^=R>>>13))+((1540483477*(R>>>16)&65535)<<16),(R^=R>>>15)>>>0}}),nt=lt,bt=vt;nt.murmur3=lt,nt.murmur2=bt;var kt=function(){this.ids=[],this.positions=[],this.indexed=!1};kt.prototype.add=function(l,f,m,C){this.ids.push(rr(l)),this.positions.push(f,m,C)},kt.prototype.getPositions=function(l){for(var f=rr(l),m=0,C=this.ids.length-1;m>1;this.ids[M]>=f?C=M:m=M+1}for(var R=[];this.ids[m]===f;)R.push({index:this.positions[3*m],start:this.positions[3*m+1],end:this.positions[3*m+2]}),m++;return R},kt.serialize=function(l,f){var m=new Float64Array(l.ids),C=new Uint32Array(l.positions);return function M(R,W,ee,ce){for(;ee>1],Te=ee-1,De=ce+1;;){do Te++;while(R[Te]xe);if(Te>=De)break;Jt(R,Te,De),Jt(W,3*Te,3*De),Jt(W,3*Te+1,3*De+1),Jt(W,3*Te+2,3*De+2)}De-eeW.x+1||ceW.y+1)&&Ft("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return m}function Mo(l,f){return{type:l.type,id:l.id,properties:l.properties,geometry:f?Do(l):[]}}function ys(l,f,m,C,M){l.emplaceBack(2*f+(C+1)/2,2*m+(M+1)/2)}var rs=function(l){this.zoom=l.zoom,this.overscaling=l.overscaling,this.layers=l.layers,this.layerIds=this.layers.map(function(f){return f.id}),this.index=l.index,this.hasPattern=!1,this.layoutVertexArray=new Oc,this.indexArray=new ui,this.segments=new Ve,this.programConfigurations=new Sn(l.layers,l.zoom),this.stateDependentLayerIds=this.layers.filter(function(f){return f.isStateDependent()}).map(function(f){return f.id})};function fl(l,f){for(var m=0;m1){if(Ru(l,f))return!0;for(var C=0;C1?m:m.sub(f)._mult(M)._add(f))}function rc(l,f){for(var m,C,M,R=!1,W=0;Wf.y!=(M=m[ce]).y>f.y&&f.x<(M.x-C.x)*(f.y-C.y)/(M.y-C.y)+C.x&&(R=!R);return R}function tl(l,f){for(var m=!1,C=0,M=l.length-1;Cf.y!=W.y>f.y&&f.x<(W.x-R.x)*(f.y-R.y)/(W.y-R.y)+R.x&&(m=!m)}return m}function Id(l,f,m){var C=m[0],M=m[2];if(l.xM.x&&f.x>M.x||l.yM.y&&f.y>M.y)return!1;var R=Ot(l,f,m[0]);return R!==Ot(l,f,m[1])||R!==Ot(l,f,m[2])||R!==Ot(l,f,m[3])}function nc(l,f,m){var C=f.paint.get(l).value;return C.kind==="constant"?C.value:m.programConfigurations.get(f.id).getMaxValue(l)}function Ki(l){return Math.sqrt(l[0]*l[0]+l[1]*l[1])}function $c(l,f,m,C,M){if(!f[0]&&!f[1])return l;var R=Se.convert(f)._mult(M);m==="viewport"&&R._rotate(-C);for(var W=[],ee=0;ee=8192||Te<0||Te>=8192)){var De=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,l.sortKey),Re=De.vertexLength;ys(this.layoutVertexArray,xe,Te,-1,-1),ys(this.layoutVertexArray,xe,Te,1,-1),ys(this.layoutVertexArray,xe,Te,1,1),ys(this.layoutVertexArray,xe,Te,-1,1),this.indexArray.emplaceBack(Re,Re+1,Re+2),this.indexArray.emplaceBack(Re,Re+3,Re+2),De.vertexLength+=4,De.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,l,m,{},C)},Xr("CircleBucket",rs,{omit:["layers"]});var gf=new pa({"circle-sort-key":new Sr(Be.layout_circle["circle-sort-key"])}),ns={paint:new pa({"circle-radius":new Sr(Be.paint_circle["circle-radius"]),"circle-color":new Sr(Be.paint_circle["circle-color"]),"circle-blur":new Sr(Be.paint_circle["circle-blur"]),"circle-opacity":new Sr(Be.paint_circle["circle-opacity"]),"circle-translate":new Fr(Be.paint_circle["circle-translate"]),"circle-translate-anchor":new Fr(Be.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new Fr(Be.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new Fr(Be.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new Sr(Be.paint_circle["circle-stroke-width"]),"circle-stroke-color":new Sr(Be.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new Sr(Be.paint_circle["circle-stroke-opacity"])}),layout:gf},Ri=typeof Float32Array<"u"?Float32Array:Array;function Ol(l){return l[0]=1,l[1]=0,l[2]=0,l[3]=0,l[4]=0,l[5]=1,l[6]=0,l[7]=0,l[8]=0,l[9]=0,l[10]=1,l[11]=0,l[12]=0,l[13]=0,l[14]=0,l[15]=1,l}function Hs(l,f,m){var C=f[0],M=f[1],R=f[2],W=f[3],ee=f[4],ce=f[5],xe=f[6],Te=f[7],De=f[8],Re=f[9],$e=f[10],ut=f[11],ct=f[12],_t=f[13],gt=f[14],Lt=f[15],Gt=m[0],Qt=m[1],ar=m[2],pr=m[3];return l[0]=Gt*C+Qt*ee+ar*De+pr*ct,l[1]=Gt*M+Qt*ce+ar*Re+pr*_t,l[2]=Gt*R+Qt*xe+ar*$e+pr*gt,l[3]=Gt*W+Qt*Te+ar*ut+pr*Lt,l[4]=(Gt=m[4])*C+(Qt=m[5])*ee+(ar=m[6])*De+(pr=m[7])*ct,l[5]=Gt*M+Qt*ce+ar*Re+pr*_t,l[6]=Gt*R+Qt*xe+ar*$e+pr*gt,l[7]=Gt*W+Qt*Te+ar*ut+pr*Lt,l[8]=(Gt=m[8])*C+(Qt=m[9])*ee+(ar=m[10])*De+(pr=m[11])*ct,l[9]=Gt*M+Qt*ce+ar*Re+pr*_t,l[10]=Gt*R+Qt*xe+ar*$e+pr*gt,l[11]=Gt*W+Qt*Te+ar*ut+pr*Lt,l[12]=(Gt=m[12])*C+(Qt=m[13])*ee+(ar=m[14])*De+(pr=m[15])*ct,l[13]=Gt*M+Qt*ce+ar*Re+pr*_t,l[14]=Gt*R+Qt*xe+ar*$e+pr*gt,l[15]=Gt*W+Qt*Te+ar*ut+pr*Lt,l}Math.hypot||(Math.hypot=function(){for(var l=arguments,f=0,m=arguments.length;m--;)f+=l[m]*l[m];return Math.sqrt(f)});var Ff,mp=Hs;function ki(l,f,m){var C=f[0],M=f[1],R=f[2],W=f[3];return l[0]=m[0]*C+m[4]*M+m[8]*R+m[12]*W,l[1]=m[1]*C+m[5]*M+m[9]*R+m[13]*W,l[2]=m[2]*C+m[6]*M+m[10]*R+m[14]*W,l[3]=m[3]*C+m[7]*M+m[11]*R+m[15]*W,l}Ff=new Ri(3),Ri!=Float32Array&&(Ff[0]=0,Ff[1]=0,Ff[2]=0),function(){var l=new Ri(4);Ri!=Float32Array&&(l[0]=0,l[1]=0,l[2]=0,l[3]=0)}();var Xm=(function(){var l=new Ri(2);Ri!=Float32Array&&(l[0]=0,l[1]=0)}(),function(l){function f(m){l.call(this,m,ns)}return l&&(f.__proto__=l),(f.prototype=Object.create(l&&l.prototype)).constructor=f,f.prototype.createBucket=function(m){return new rs(m)},f.prototype.queryRadius=function(m){var C=m;return nc("circle-radius",this,C)+nc("circle-stroke-width",this,C)+Ki(this.paint.get("circle-translate"))},f.prototype.queryIntersectsFeature=function(m,C,M,R,W,ee,ce,xe){for(var Te=$c(m,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),ee.angle,ce),De=this.paint.get("circle-radius").evaluate(C,M)+this.paint.get("circle-stroke-width").evaluate(C,M),Re=this.paint.get("circle-pitch-alignment")==="map",$e=Re?Te:function(Ar,Wr){return Ar.map(function(Tn){return ic(Tn,Wr)})}(Te,xe),ut=Re?De*ce:De,ct=0,_t=R;ct<_t.length;ct+=1)for(var gt=0,Lt=_t[ct];gtl.width||M.height>l.height||m.x>l.width-M.width||m.y>l.height-M.height)throw new RangeError("out of range source coordinates for image copy");if(M.width>f.width||M.height>f.height||C.x>f.width-M.width||C.y>f.height-M.height)throw new RangeError("out of range destination coordinates for image copy");for(var W=l.data,ee=f.data,ce=0;ce80*m){C=R=l[0],M=W=l[1];for(var ut=m;utR&&(R=ee),ce>W&&(W=ce);xe=(xe=Math.max(R-C,W-M))!==0?1/xe:0}return ah(Re,$e,m,C,M,xe),$e}function lm(l,f,m,C,M){var R,W;if(M===Hh(l,f,m,C)>0)for(R=f;R=f;R-=C)W=Qm(R,l[R],l[R+1],W);return W&&jh(W,W.next)&&(Nf(W),W=W.next),W}function du(l,f){if(!l)return l;f||(f=l);var m,C=l;do if(m=!1,C.steiner||!jh(C,C.next)&&Ga(C.prev,C,C.next)!==0)C=C.next;else{if(Nf(C),(C=f=C.prev)===C.next)break;m=!0}while(m||C!==f);return f}function ah(l,f,m,C,M,R,W){if(l){!W&&R&&function(Te,De,Re,$e){var ut=Te;do ut.z===null&&(ut.z=gp(ut.x,ut.y,De,Re,$e)),ut.prevZ=ut.prev,ut.nextZ=ut.next,ut=ut.next;while(ut!==Te);ut.prevZ.nextZ=null,ut.prevZ=null,function(ct){var _t,gt,Lt,Gt,Qt,ar,pr,Ar,Wr=1;do{for(gt=ct,ct=null,Qt=null,ar=0;gt;){for(ar++,Lt=gt,pr=0,_t=0;_t0||Ar>0&≪)pr!==0&&(Ar===0||!Lt||gt.z<=Lt.z)?(Gt=gt,gt=gt.nextZ,pr--):(Gt=Lt,Lt=Lt.nextZ,Ar--),Qt?Qt.nextZ=Gt:ct=Gt,Gt.prevZ=Qt,Qt=Gt;gt=Lt}Qt.nextZ=null,Wr*=2}while(ar>1)}(ut)}(l,C,M,R);for(var ee,ce,xe=l;l.prev!==l.next;)if(ee=l.prev,ce=l.next,R?zh(l,C,M,R):Yg(l))f.push(ee.i/m),f.push(l.i/m),f.push(ce.i/m),Nf(l),l=ce.next,xe=ce.next;else if((l=ce)===xe){W?W===1?ah(l=Yc(du(l),f,m),f,m,C,M,R,2):W===2&&l0(l,f,m,C,M,R):ah(du(l),f,m,C,M,R,1);break}}}function Yg(l){var f=l.prev,m=l,C=l.next;if(Ga(f,m,C)>=0)return!1;for(var M=l.next.next;M!==l.prev;){if(uh(f.x,f.y,m.x,m.y,C.x,C.y,M.x,M.y)&&Ga(M.prev,M,M.next)>=0)return!1;M=M.next}return!0}function zh(l,f,m,C){var M=l.prev,R=l,W=l.next;if(Ga(M,R,W)>=0)return!1;for(var ee=M.x>R.x?M.x>W.x?M.x:W.x:R.x>W.x?R.x:W.x,ce=M.y>R.y?M.y>W.y?M.y:W.y:R.y>W.y?R.y:W.y,xe=gp(M.x=xe&&Re&&Re.z<=Te;){if(De!==l.prev&&De!==l.next&&uh(M.x,M.y,R.x,R.y,W.x,W.y,De.x,De.y)&&Ga(De.prev,De,De.next)>=0||(De=De.prevZ,Re!==l.prev&&Re!==l.next&&uh(M.x,M.y,R.x,R.y,W.x,W.y,Re.x,Re.y)&&Ga(Re.prev,Re,Re.next)>=0))return!1;Re=Re.nextZ}for(;De&&De.z>=xe;){if(De!==l.prev&&De!==l.next&&uh(M.x,M.y,R.x,R.y,W.x,W.y,De.x,De.y)&&Ga(De.prev,De,De.next)>=0)return!1;De=De.prevZ}for(;Re&&Re.z<=Te;){if(Re!==l.prev&&Re!==l.next&&uh(M.x,M.y,R.x,R.y,W.x,W.y,Re.x,Re.y)&&Ga(Re.prev,Re,Re.next)>=0)return!1;Re=Re.nextZ}return!0}function Yc(l,f,m){var C=l;do{var M=C.prev,R=C.next.next;!jh(M,R)&&Jm(M,C,C.next,R)&&is(M,R)&&is(R,M)&&(f.push(M.i/m),f.push(C.i/m),f.push(R.i/m),Nf(C),Nf(C.next),C=l=R),C=C.next}while(C!==l);return du(C)}function l0(l,f,m,C,M,R){var W=l;do{for(var ee=W.next.next;ee!==W.prev;){if(W.i!==ee.i&&Xg(W,ee)){var ce=qu(W,ee);return W=du(W,W.next),ce=du(ce,ce.next),ah(W,f,m,C,M,R),void ah(ce,f,m,C,M,R)}ee=ee.next}W=W.next}while(W!==l)}function sh(l,f){return l.x-f.x}function lh(l,f){if(f=function(C,M){var R,W=M,ee=C.x,ce=C.y,xe=-1/0;do{if(ce<=W.y&&ce>=W.next.y&&W.next.y!==W.y){var Te=W.x+(ce-W.y)*(W.next.x-W.x)/(W.next.y-W.y);if(Te<=ee&&Te>xe){if(xe=Te,Te===ee){if(ce===W.y)return W;if(ce===W.next.y)return W.next}R=W.x=W.x&&W.x>=$e&&ee!==W.x&&uh(ceR.x||W.x===R.x&&Zg(R,W)))&&(R=W,ct=De)),W=W.next;while(W!==Re);return R}(l,f)){var m=qu(f,l);du(f,f.next),du(m,m.next)}}function Zg(l,f){return Ga(l.prev,l,f.prev)<0&&Ga(f.next,l,l.next)<0}function gp(l,f,m,C,M){return(l=1431655765&((l=858993459&((l=252645135&((l=16711935&((l=32767*(l-m)*M)|l<<8))|l<<4))|l<<2))|l<<1))|(f=1431655765&((f=858993459&((f=252645135&((f=16711935&((f=32767*(f-C)*M)|f<<8))|f<<4))|f<<2))|f<<1))<<1}function um(l){var f=l,m=l;do(f.x=0&&(l-W)*(C-ee)-(m-W)*(f-ee)>=0&&(m-W)*(R-ee)-(M-W)*(C-ee)>=0}function Xg(l,f){return l.next.i!==f.i&&l.prev.i!==f.i&&!function(m,C){var M=m;do{if(M.i!==m.i&&M.next.i!==m.i&&M.i!==C.i&&M.next.i!==C.i&&Jm(M,M.next,m,C))return!0;M=M.next}while(M!==m);return!1}(l,f)&&(is(l,f)&&is(f,l)&&function(m,C){var M=m,R=!1,W=(m.x+C.x)/2,ee=(m.y+C.y)/2;do M.y>ee!=M.next.y>ee&&M.next.y!==M.y&&W<(M.next.x-M.x)*(ee-M.y)/(M.next.y-M.y)+M.x&&(R=!R),M=M.next;while(M!==m);return R}(l,f)&&(Ga(l.prev,l,f.prev)||Ga(l,f.prev,f))||jh(l,f)&&Ga(l.prev,l,l.next)>0&&Ga(f.prev,f,f.next)>0)}function Ga(l,f,m){return(f.y-l.y)*(m.x-f.x)-(f.x-l.x)*(m.y-f.y)}function jh(l,f){return l.x===f.x&&l.y===f.y}function Jm(l,f,m,C){var M=Uh(Ga(l,f,m)),R=Uh(Ga(l,f,C)),W=Uh(Ga(m,C,l)),ee=Uh(Ga(m,C,f));return M!==R&&W!==ee||!(M!==0||!cm(l,m,f))||!(R!==0||!cm(l,C,f))||!(W!==0||!cm(m,l,C))||!(ee!==0||!cm(m,f,C))}function cm(l,f,m){return f.x<=Math.max(l.x,m.x)&&f.x>=Math.min(l.x,m.x)&&f.y<=Math.max(l.y,m.y)&&f.y>=Math.min(l.y,m.y)}function Uh(l){return l>0?1:l<0?-1:0}function is(l,f){return Ga(l.prev,l,l.next)<0?Ga(l,f,l.next)>=0&&Ga(l,l.prev,f)>=0:Ga(l,f,l.prev)<0||Ga(l,l.next,f)<0}function qu(l,f){var m=new qf(l.i,l.x,l.y),C=new qf(f.i,f.x,f.y),M=l.next,R=f.prev;return l.next=f,f.prev=l,m.next=M,M.prev=m,C.next=m,m.prev=C,R.next=C,C.prev=R,C}function Qm(l,f,m,C){var M=new qf(l,f,m);return C?(M.next=C.next,M.prev=C,C.next.prev=M,C.next=M):(M.prev=M,M.next=M),M}function Nf(l){l.next.prev=l.prev,l.prev.next=l.next,l.prevZ&&(l.prevZ.nextZ=l.nextZ),l.nextZ&&(l.nextZ.prevZ=l.prevZ)}function qf(l,f,m){this.i=l,this.x=f,this.y=m,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function Hh(l,f,m,C){for(var M=0,R=f,W=m-C;Rce;){if(xe-ce>600){var De=xe-ce+1,Re=ee-ce+1,$e=Math.log(De),ut=.5*Math.exp(2*$e/3),ct=.5*Math.sqrt($e*ut*(De-ut)/De)*(Re-De/2<0?-1:1);R(W,ee,Math.max(ce,Math.floor(ee-Re*ut/De+ct)),Math.min(xe,Math.floor(ee+(De-Re)*ut/De+ct)),Te)}var _t=W[ee],gt=ce,Lt=xe;for(vp(W,ce,ee),Te(W[xe],_t)>0&&vp(W,ce,xe);gt0;)Lt--}Te(W[ce],_t)===0?vp(W,ce,Lt):vp(W,++Lt,xe),Lt<=ee&&(ce=Lt+1),ee<=Lt&&(xe=Lt-1)}})(l,f,m||0,C||l.length-1,M||my)}function vp(l,f,m){var C=l[f];l[f]=l[m],l[m]=C}function my(l,f){return lf?1:0}function eg(l,f){var m=l.length;if(m<=1)return[l];for(var C,M,R=[],W=0;W1)for(var ce=0;ce0&&m.holes.push(C+=l[M-1].length)}return m},Bh.default=Md;var Ic=function(l){this.zoom=l.zoom,this.overscaling=l.overscaling,this.layers=l.layers,this.layerIds=this.layers.map(function(f){return f.id}),this.index=l.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new Oc,this.indexArray=new ui,this.indexArray2=new Vc,this.programConfigurations=new Sn(l.layers,l.zoom),this.segments=new Ve,this.segments2=new Ve,this.stateDependentLayerIds=this.layers.filter(function(f){return f.isStateDependent()}).map(function(f){return f.id})};Ic.prototype.populate=function(l,f,m){this.hasPattern=ch("fill",this.layers,f);for(var C=this.layers[0].layout.get("fill-sort-key"),M=[],R=0,W=l;R>3}if(M--,C===1||C===2)R+=l.readSVarint(),W+=l.readSVarint(),C===1&&(f&&ee.push(f),f=[]),f.push(new Se(R,W));else{if(C!==7)throw new Error("unknown command "+C);f&&f.push(f[0].clone())}}return f&&ee.push(f),ee},sc.prototype.bbox=function(){var l=this._pbf;l.pos=this._geometry;for(var f=l.readVarint()+l.pos,m=1,C=0,M=0,R=0,W=1/0,ee=-1/0,ce=1/0,xe=-1/0;l.pos>3}if(C--,m===1||m===2)(M+=l.readSVarint())ee&&(ee=M),(R+=l.readSVarint())xe&&(xe=R);else if(m!==7)throw new Error("unknown command "+m)}return[W,ce,ee,xe]},sc.prototype.toGeoJSON=function(l,f,m){var C,M,R=this.extent*Math.pow(2,m),W=this.extent*l,ee=this.extent*f,ce=this.loadGeometry(),xe=sc.types[this.type];function Te($e){for(var ut=0;ut<$e.length;ut++){var ct=$e[ut];$e[ut]=[360*(ct.x+W)/R-180,360/Math.PI*Math.atan(Math.exp((180-360*(ct.y+ee)/R)*Math.PI/180))-90]}}switch(this.type){case 1:var De=[];for(C=0;C>3;M=W===1?C.readString():W===2?C.readFloat():W===3?C.readDouble():W===4?C.readVarint64():W===5?C.readVarint():W===6?C.readSVarint():W===7?C.readBoolean():null}return M}(m))}function na(l,f,m){if(l===3){var C=new ra(m,m.readVarint()+m.pos);C.length&&(f[C.name]=C)}}ev.prototype.feature=function(l){if(l<0||l>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[l];var f=this._pbf.readVarint()+this._pbf.pos;return new Vh(this._pbf,f,this.extent,this._keys,this._values)};var Ll={VectorTile:function(l,f){this.layers=l.readFields(na,{},f)},VectorTileFeature:Vh,VectorTileLayer:ra},lc=Ll.VectorTileFeature.types,Bf=Math.pow(2,13);function Rl(l,f,m,C,M,R,W,ee){l.emplaceBack(f,m,2*Math.floor(C*Bf)+W,M*Bf*2,R*Bf*2,Math.round(ee))}var Bu=function(l){this.zoom=l.zoom,this.overscaling=l.overscaling,this.layers=l.layers,this.layerIds=this.layers.map(function(f){return f.id}),this.index=l.index,this.hasPattern=!1,this.layoutVertexArray=new uu,this.indexArray=new ui,this.programConfigurations=new Sn(l.layers,l.zoom),this.segments=new Ve,this.stateDependentLayerIds=this.layers.filter(function(f){return f.isStateDependent()}).map(function(f){return f.id})};function mm(l,f){return l.x===f.x&&(l.x<0||l.x>8192)||l.y===f.y&&(l.y<0||l.y>8192)}Bu.prototype.populate=function(l,f,m){this.features=[],this.hasPattern=ch("fill-extrusion",this.layers,f);for(var C=0,M=l;C8192})||Oi.every(function(si){return si.y<0})||Oi.every(function(si){return si.y>8192})))for(var ct=0,_t=0;_t=1){var Lt=ut[_t-1];if(!mm(gt,Lt)){De.vertexLength+4>Ve.MAX_VERTEX_ARRAY_LENGTH&&(De=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var Gt=gt.sub(Lt)._perp()._unit(),Qt=Lt.dist(gt);ct+Qt>32768&&(ct=0),Rl(this.layoutVertexArray,gt.x,gt.y,Gt.x,Gt.y,0,0,ct),Rl(this.layoutVertexArray,gt.x,gt.y,Gt.x,Gt.y,0,1,ct),Rl(this.layoutVertexArray,Lt.x,Lt.y,Gt.x,Gt.y,0,0,ct+=Qt),Rl(this.layoutVertexArray,Lt.x,Lt.y,Gt.x,Gt.y,0,1,ct);var ar=De.vertexLength;this.indexArray.emplaceBack(ar,ar+2,ar+1),this.indexArray.emplaceBack(ar+1,ar+2,ar+3),De.vertexLength+=4,De.primitiveLength+=2}}}}if(De.vertexLength+ce>Ve.MAX_VERTEX_ARRAY_LENGTH&&(De=this.segments.prepareSegment(ce,this.layoutVertexArray,this.indexArray)),lc[l.type]==="Polygon"){for(var pr=[],Ar=[],Wr=De.vertexLength,Tn=0,Jr=ee;Tn=2&&l[ce-1].equals(l[ce-2]);)ce--;for(var xe=0;xe0;if(Ar&>>xe){var Tn=Te.dist($e);if(Tn>2*De){var Jr=Te.sub(Te.sub($e)._mult(De/Tn)._round());this.updateDistance($e,Jr),this.addCurrentVertex(Jr,ct,0,0,Re),$e=Jr}}var In=$e&&ut,nn=In?m:ee?"butt":C;if(In&&nn==="round"&&(arM&&(nn="bevel"),nn==="bevel"&&(ar>2&&(nn="flipbevel"),ar100)Lt=_t.mult(-1);else{var vi=ar*ct.add(_t).mag()/ct.sub(_t).mag();Lt._perp()._mult(vi*(Wr?-1:1))}this.addCurrentVertex(Te,Lt,0,0,Re),this.addCurrentVertex(Te,Lt.mult(-1),0,0,Re)}else if(nn==="bevel"||nn==="fakeround"){var Hn=-Math.sqrt(ar*ar-1),mn=Wr?Hn:0,Oi=Wr?0:Hn;if($e&&this.addCurrentVertex(Te,ct,mn,Oi,Re),nn==="fakeround")for(var si=Math.round(180*pr/Math.PI/20),Vi=1;Vi2*De){var vo=Te.add(ut.sub(Te)._mult(De/ss)._round());this.updateDistance(Te,vo),this.addCurrentVertex(vo,_t,0,0,Re),Te=vo}}}}},Ps.prototype.addCurrentVertex=function(l,f,m,C,M,R){R===void 0&&(R=!1);var W=f.y*C-f.x,ee=-f.y-f.x*C;this.addHalfVertex(l,f.x+f.y*m,f.y-f.x*m,R,!1,m,M),this.addHalfVertex(l,W,ee,R,!0,-C,M),this.distance>rn/2&&this.totalDistance===0&&(this.distance=0,this.addCurrentVertex(l,f,m,C,M,R))},Ps.prototype.addHalfVertex=function(l,f,m,C,M,R,W){var ee=.5*(this.lineClips?this.scaledDistance*(rn-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((l.x<<1)+(C?1:0),(l.y<<1)+(M?1:0),Math.round(63*f)+128,Math.round(63*m)+128,1+(R===0?0:R<0?-1:1)|(63&ee)<<2,ee>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);var ce=W.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,ce),W.primitiveLength++),M?this.e2=ce:this.e1=ce},Ps.prototype.updateScaledDistance=function(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance},Ps.prototype.updateDistance=function(l,f){this.distance+=l.dist(f),this.updateScaledDistance()},Xr("LineBucket",Ps,{omit:["layers","patternFeatures"]});var bp=new pa({"line-cap":new Fr(Be.layout_line["line-cap"]),"line-join":new Sr(Be.layout_line["line-join"]),"line-miter-limit":new Fr(Be.layout_line["line-miter-limit"]),"line-round-limit":new Fr(Be.layout_line["line-round-limit"]),"line-sort-key":new Sr(Be.layout_line["line-sort-key"])}),Mc={paint:new pa({"line-opacity":new Sr(Be.paint_line["line-opacity"]),"line-color":new Sr(Be.paint_line["line-color"]),"line-translate":new Fr(Be.paint_line["line-translate"]),"line-translate-anchor":new Fr(Be.paint_line["line-translate-anchor"]),"line-width":new Sr(Be.paint_line["line-width"]),"line-gap-width":new Sr(Be.paint_line["line-gap-width"]),"line-offset":new Sr(Be.paint_line["line-offset"]),"line-blur":new Sr(Be.paint_line["line-blur"]),"line-dasharray":new Os(Be.paint_line["line-dasharray"]),"line-pattern":new pp(Be.paint_line["line-pattern"]),"line-gradient":new Iu(Be.paint_line["line-gradient"])}),layout:bp},as=new(function(l){function f(){l.apply(this,arguments)}return l&&(f.__proto__=l),(f.prototype=Object.create(l&&l.prototype)).constructor=f,f.prototype.possiblyEvaluate=function(m,C){return C=new mi(Math.floor(C.zoom),{now:C.now,fadeDuration:C.fadeDuration,zoomHistory:C.zoomHistory,transition:C.transition}),l.prototype.possiblyEvaluate.call(this,m,C)},f.prototype.evaluate=function(m,C,M,R){return C=V({},C,{zoom:Math.floor(C.zoom)}),l.prototype.evaluate.call(this,m,C,M,R)},f}(Sr))(Mc.paint.properties["line-width"].specification);as.useIntegerZoom=!0;var xp=function(l){function f(m){l.call(this,m,Mc),this.gradientVersion=0}return l&&(f.__proto__=l),(f.prototype=Object.create(l&&l.prototype)).constructor=f,f.prototype._handleSpecialPaintPropertyUpdate=function(m){m==="line-gradient"&&(this.stepInterpolant=this._transitionablePaint._values["line-gradient"].value.expression._styleExpression.expression instanceof Js,this.gradientVersion=(this.gradientVersion+1)%Ue)},f.prototype.gradientExpression=function(){return this._transitionablePaint._values["line-gradient"].value.expression},f.prototype.recalculate=function(m,C){l.prototype.recalculate.call(this,m,C),this.paint._values["line-floorwidth"]=as.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,m)},f.prototype.createBucket=function(m){return new Ps(m)},f.prototype.queryRadius=function(m){var C=m,M=nv(nc("line-width",this,C),nc("line-gap-width",this,C)),R=nc("line-offset",this,C);return M/2+Math.abs(R)+Ki(this.paint.get("line-translate"))},f.prototype.queryIntersectsFeature=function(m,C,M,R,W,ee,ce){var xe=$c(m,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),ee.angle,ce),Te=ce/2*nv(this.paint.get("line-width").evaluate(C,M),this.paint.get("line-gap-width").evaluate(C,M)),De=this.paint.get("line-offset").evaluate(C,M);return De&&(R=function(Re,$e){for(var ut=[],ct=new Se(0,0),_t=0;_t=3){for(var gt=0;gt<_t.length;gt++)if(tl(Re,_t[gt]))return!0}if(Is(Re,_t,ut))return!0}return!1}(xe,R,Te)},f.prototype.isTileClipped=function(){return!0},f}(tc);function nv(l,f){return f>0?f+2*l:l}var Gi=gs([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),tg=gs([{name:"a_projected_pos",components:3,type:"Float32"}],4),d=(gs([{name:"a_fade_opacity",components:1,type:"Uint32"}],4),gs([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}])),y=(gs([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"}]),gs([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4)),D=gs([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function s(l,f,m){return l.sections.forEach(function(C){C.text=function(M,R,W){var ee=R.layout.get("text-transform").evaluate(W,{});return ee==="uppercase"?M=M.toLocaleUpperCase():ee==="lowercase"&&(M=M.toLocaleLowerCase()),Ds.applyArabicShaping&&(M=Ds.applyArabicShaping(M)),M}(C.text,f,m)}),l}gs([{name:"triangle",components:3,type:"Uint16"}]),gs([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"placedOrientation"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"},{type:"Int16",name:"associatedIconIndex"}]),gs([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint16",name:"useRuntimeCollisionCircles"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",components:2,name:"textOffset"},{type:"Float32",name:"collisionCircleDiameter"}]),gs([{type:"Float32",name:"offsetX"}]),gs([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);var c={"!":"\uFE15","#":"\uFF03",$:"\uFF04","%":"\uFF05","&":"\uFF06","(":"\uFE35",")":"\uFE36","*":"\uFF0A","+":"\uFF0B",",":"\uFE10","-":"\uFE32",".":"\u30FB","/":"\uFF0F",":":"\uFE13",";":"\uFE14","<":"\uFE3F","=":"\uFF1D",">":"\uFE40","?":"\uFE16","@":"\uFF20","[":"\uFE47","\\":"\uFF3C","]":"\uFE48","^":"\uFF3E",_:"\uFE33","`":"\uFF40","{":"\uFE37","|":"\u2015","}":"\uFE38","~":"\uFF5E","\xA2":"\uFFE0","\xA3":"\uFFE1","\xA5":"\uFFE5","\xA6":"\uFFE4","\xAC":"\uFFE2","\xAF":"\uFFE3","\u2013":"\uFE32","\u2014":"\uFE31","\u2018":"\uFE43","\u2019":"\uFE44","\u201C":"\uFE41","\u201D":"\uFE42","\u2026":"\uFE19","\u2027":"\u30FB","\u20A9":"\uFFE6","\u3001":"\uFE11","\u3002":"\uFE12","\u3008":"\uFE3F","\u3009":"\uFE40","\u300A":"\uFE3D","\u300B":"\uFE3E","\u300C":"\uFE41","\u300D":"\uFE42","\u300E":"\uFE43","\u300F":"\uFE44","\u3010":"\uFE3B","\u3011":"\uFE3C","\u3014":"\uFE39","\u3015":"\uFE3A","\u3016":"\uFE17","\u3017":"\uFE18","\uFF01":"\uFE15","\uFF08":"\uFE35","\uFF09":"\uFE36","\uFF0C":"\uFE10","\uFF0D":"\uFE32","\uFF0E":"\u30FB","\uFF1A":"\uFE13","\uFF1B":"\uFE14","\uFF1C":"\uFE3F","\uFF1E":"\uFE40","\uFF1F":"\uFE16","\uFF3B":"\uFE47","\uFF3D":"\uFE48","\uFF3F":"\uFE33","\uFF5B":"\uFE37","\uFF5C":"\u2015","\uFF5D":"\uFE38","\uFF5F":"\uFE35","\uFF60":"\uFE36","\uFF61":"\uFE12","\uFF62":"\uFE41","\uFF63":"\uFE42"},g=function(l,f,m,C,M){var R,W,ee=8*M-C-1,ce=(1<>1,Te=-7,De=m?M-1:0,Re=m?-1:1,$e=l[f+De];for(De+=Re,R=$e&(1<<-Te)-1,$e>>=-Te,Te+=ee;Te>0;R=256*R+l[f+De],De+=Re,Te-=8);for(W=R&(1<<-Te)-1,R>>=-Te,Te+=C;Te>0;W=256*W+l[f+De],De+=Re,Te-=8);if(R===0)R=1-xe;else{if(R===ce)return W?NaN:1/0*($e?-1:1);W+=Math.pow(2,C),R-=xe}return($e?-1:1)*W*Math.pow(2,R-C)},x=function(l,f,m,C,M,R){var W,ee,ce,xe=8*R-M-1,Te=(1<>1,Re=M===23?Math.pow(2,-24)-Math.pow(2,-77):0,$e=C?0:R-1,ut=C?1:-1,ct=f<0||f===0&&1/f<0?1:0;for(f=Math.abs(f),isNaN(f)||f===1/0?(ee=isNaN(f)?1:0,W=Te):(W=Math.floor(Math.log(f)/Math.LN2),f*(ce=Math.pow(2,-W))<1&&(W--,ce*=2),(f+=W+De>=1?Re/ce:Re*Math.pow(2,1-De))*ce>=2&&(W++,ce/=2),W+De>=Te?(ee=0,W=Te):W+De>=1?(ee=(f*ce-1)*Math.pow(2,M),W+=De):(ee=f*Math.pow(2,De-1)*Math.pow(2,M),W=0));M>=8;l[m+$e]=255&ee,$e+=ut,ee/=256,M-=8);for(W=W<0;l[m+$e]=255&W,$e+=ut,W/=256,xe-=8);l[m+$e-ut]|=128*ct},E=P;function P(l){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(l)?l:new Uint8Array(l||0),this.pos=0,this.type=0,this.length=this.buf.length}P.Varint=0,P.Fixed64=1,P.Bytes=2,P.Fixed32=5;var z=typeof TextDecoder>"u"?null:new TextDecoder("utf8");function J(l){return l.type===P.Bytes?l.readVarint()+l.pos:l.pos+1}function ne(l,f,m){return m?4294967296*f+(l>>>0):4294967296*(f>>>0)+(l>>>0)}function fe(l,f,m){var C=f<=16383?1:f<=2097151?2:f<=268435455?3:Math.floor(Math.log(f)/(7*Math.LN2));m.realloc(C);for(var M=m.pos-1;M>=l;M--)m.buf[M+C]=m.buf[M]}function Ce(l,f){for(var m=0;m>>8,l[m+2]=f>>>16,l[m+3]=f>>>24}function en(l,f){return(l[f]|l[f+1]<<8|l[f+2]<<16)+(l[f+3]<<24)}function un(l,f,m){l===1&&m.readMessage(kn,f)}function kn(l,f,m){if(l===3){var C=m.readMessage(Di,{}),M=C.width,R=C.height,W=C.left,ee=C.top,ce=C.advance;f.push({id:C.id,bitmap:new Ms({width:M+6,height:R+6},C.bitmap),metrics:{width:M,height:R,left:W,top:ee,advance:ce}})}}function Di(l,f,m){l===1?f.id=m.readVarint():l===2?f.bitmap=m.readBytes():l===3?f.width=m.readVarint():l===4?f.height=m.readVarint():l===5?f.left=m.readSVarint():l===6?f.top=m.readSVarint():l===7&&(f.advance=m.readVarint())}function po(l){for(var f=0,m=0,C=0,M=l;C=0;Re--){var $e=W[Re];if(!(De.w>$e.w||De.h>$e.h)){if(De.x=$e.x,De.y=$e.y,ce=Math.max(ce,De.y+De.h),ee=Math.max(ee,De.x+De.w),De.w===$e.w&&De.h===$e.h){var ut=W.pop();Re>3,R=this.pos;this.type=7&C,l(M,f,this),this.pos===R&&this.skip(C)}return f},readMessage:function(l,f){return this.readFields(l,f,this.readVarint()+this.pos)},readFixed32:function(){var l=ur(this.buf,this.pos);return this.pos+=4,l},readSFixed32:function(){var l=en(this.buf,this.pos);return this.pos+=4,l},readFixed64:function(){var l=ur(this.buf,this.pos)+4294967296*ur(this.buf,this.pos+4);return this.pos+=8,l},readSFixed64:function(){var l=ur(this.buf,this.pos)+4294967296*en(this.buf,this.pos+4);return this.pos+=8,l},readFloat:function(){var l=g(this.buf,this.pos,!0,23,4);return this.pos+=4,l},readDouble:function(){var l=g(this.buf,this.pos,!0,52,8);return this.pos+=8,l},readVarint:function(l){var f,m,C=this.buf;return f=127&(m=C[this.pos++]),m<128?f:(f|=(127&(m=C[this.pos++]))<<7,m<128?f:(f|=(127&(m=C[this.pos++]))<<14,m<128?f:(f|=(127&(m=C[this.pos++]))<<21,m<128?f:function(M,R,W){var ee,ce,xe=W.buf;if(ee=(112&(ce=xe[W.pos++]))>>4,ce<128||(ee|=(127&(ce=xe[W.pos++]))<<3,ce<128)||(ee|=(127&(ce=xe[W.pos++]))<<10,ce<128)||(ee|=(127&(ce=xe[W.pos++]))<<17,ce<128)||(ee|=(127&(ce=xe[W.pos++]))<<24,ce<128)||(ee|=(1&(ce=xe[W.pos++]))<<31,ce<128))return ne(M,ee,R);throw new Error("Expected varint not more than 10 bytes")}(f|=(15&(m=C[this.pos]))<<28,l,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var l=this.readVarint();return l%2==1?(l+1)/-2:l/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var l=this.readVarint()+this.pos,f=this.pos;return this.pos=l,l-f>=12&&z?function(m,C,M){return z.decode(m.subarray(C,M))}(this.buf,f,l):function(m,C,M){for(var R="",W=C;W239?4:Te>223?3:Te>191?2:1;if(W+Re>M)break;Re===1?Te<128&&(De=Te):Re===2?(192&(ee=m[W+1]))==128&&(De=(31&Te)<<6|63&ee)<=127&&(De=null):Re===3?(ce=m[W+2],(192&(ee=m[W+1]))==128&&(192&ce)==128&&((De=(15&Te)<<12|(63&ee)<<6|63&ce)<=2047||De>=55296&&De<=57343)&&(De=null)):Re===4&&(ce=m[W+2],xe=m[W+3],(192&(ee=m[W+1]))==128&&(192&ce)==128&&(192&xe)==128&&((De=(15&Te)<<18|(63&ee)<<12|(63&ce)<<6|63&xe)<=65535||De>=1114112)&&(De=null)),De===null?(De=65533,Re=1):De>65535&&(De-=65536,R+=String.fromCharCode(De>>>10&1023|55296),De=56320|1023&De),R+=String.fromCharCode(De),W+=Re}return R}(this.buf,f,l)},readBytes:function(){var l=this.readVarint()+this.pos,f=this.buf.subarray(this.pos,l);return this.pos=l,f},readPackedVarint:function(l,f){if(this.type!==P.Bytes)return l.push(this.readVarint(f));var m=J(this);for(l=l||[];this.pos127;);else if(f===P.Bytes)this.pos=this.readVarint()+this.pos;else if(f===P.Fixed32)this.pos+=4;else{if(f!==P.Fixed64)throw new Error("Unimplemented type: "+f);this.pos+=8}},writeTag:function(l,f){this.writeVarint(l<<3|f)},realloc:function(l){for(var f=this.length||16;f268435455||l<0?function(f,m){var C,M;if(f>=0?(C=f%4294967296|0,M=f/4294967296|0):(M=~(-f/4294967296),4294967295^(C=~(-f%4294967296))?C=C+1|0:(C=0,M=M+1|0)),f>=18446744073709552e3||f<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");m.realloc(10),function(R,W,ee){ee.buf[ee.pos++]=127&R|128,R>>>=7,ee.buf[ee.pos++]=127&R|128,R>>>=7,ee.buf[ee.pos++]=127&R|128,R>>>=7,ee.buf[ee.pos++]=127&R|128,ee.buf[ee.pos]=127&(R>>>=7)}(C,0,m),function(R,W){var ee=(7&R)<<4;W.buf[W.pos++]|=ee|((R>>>=3)?128:0),R&&(W.buf[W.pos++]=127&R|((R>>>=7)?128:0),R&&(W.buf[W.pos++]=127&R|((R>>>=7)?128:0),R&&(W.buf[W.pos++]=127&R|((R>>>=7)?128:0),R&&(W.buf[W.pos++]=127&R|((R>>>=7)?128:0),R&&(W.buf[W.pos++]=127&R)))))}(M,m)}(l,this):(this.realloc(4),this.buf[this.pos++]=127&l|(l>127?128:0),l<=127||(this.buf[this.pos++]=127&(l>>>=7)|(l>127?128:0),l<=127||(this.buf[this.pos++]=127&(l>>>=7)|(l>127?128:0),l<=127||(this.buf[this.pos++]=l>>>7&127))))},writeSVarint:function(l){this.writeVarint(l<0?2*-l-1:2*l)},writeBoolean:function(l){this.writeVarint(Boolean(l))},writeString:function(l){l=String(l),this.realloc(4*l.length),this.pos++;var f=this.pos;this.pos=function(C,M,R){for(var W,ee,ce=0;ce55295&&W<57344){if(!ee){W>56319||ce+1===M.length?(C[R++]=239,C[R++]=191,C[R++]=189):ee=W;continue}if(W<56320){C[R++]=239,C[R++]=191,C[R++]=189,ee=W;continue}W=ee-55296<<10|W-56320|65536,ee=null}else ee&&(C[R++]=239,C[R++]=191,C[R++]=189,ee=null);W<128?C[R++]=W:(W<2048?C[R++]=W>>6|192:(W<65536?C[R++]=W>>12|224:(C[R++]=W>>18|240,C[R++]=W>>12&63|128),C[R++]=W>>6&63|128),C[R++]=63&W|128)}return R}(this.buf,l,this.pos);var m=this.pos-f;m>=128&&fe(f,m,this),this.pos=f-1,this.writeVarint(m),this.pos+=m},writeFloat:function(l){this.realloc(4),x(this.buf,l,this.pos,!0,23,4),this.pos+=4},writeDouble:function(l){this.realloc(8),x(this.buf,l,this.pos,!0,52,8),this.pos+=8},writeBytes:function(l){var f=l.length;this.writeVarint(f),this.realloc(f);for(var m=0;m=128&&fe(m,C,this),this.pos=m-1,this.writeVarint(C),this.pos+=C},writeMessage:function(l,f,m){this.writeTag(l,P.Bytes),this.writeRawMessage(f,m)},writePackedVarint:function(l,f){f.length&&this.writeMessage(l,Ce,f)},writePackedSVarint:function(l,f){f.length&&this.writeMessage(l,Ne,f)},writePackedBoolean:function(l,f){f.length&&this.writeMessage(l,St,f)},writePackedFloat:function(l,f){f.length&&this.writeMessage(l,it,f)},writePackedDouble:function(l,f){f.length&&this.writeMessage(l,at,f)},writePackedFixed32:function(l,f){f.length&&this.writeMessage(l,jt,f)},writePackedSFixed32:function(l,f){f.length&&this.writeMessage(l,$t,f)},writePackedFixed64:function(l,f){f.length&&this.writeMessage(l,or,f)},writePackedSFixed64:function(l,f){f.length&&this.writeMessage(l,dr,f)},writeBytesField:function(l,f){this.writeTag(l,P.Bytes),this.writeBytes(f)},writeFixed32Field:function(l,f){this.writeTag(l,P.Fixed32),this.writeFixed32(f)},writeSFixed32Field:function(l,f){this.writeTag(l,P.Fixed32),this.writeSFixed32(f)},writeFixed64Field:function(l,f){this.writeTag(l,P.Fixed64),this.writeFixed64(f)},writeSFixed64Field:function(l,f){this.writeTag(l,P.Fixed64),this.writeSFixed64(f)},writeVarintField:function(l,f){this.writeTag(l,P.Varint),this.writeVarint(f)},writeSVarintField:function(l,f){this.writeTag(l,P.Varint),this.writeSVarint(f)},writeStringField:function(l,f){this.writeTag(l,P.Bytes),this.writeString(f)},writeFloatField:function(l,f){this.writeTag(l,P.Fixed32),this.writeFloat(f)},writeDoubleField:function(l,f){this.writeTag(l,P.Fixed64),this.writeDouble(f)},writeBooleanField:function(l,f){this.writeVarintField(l,Boolean(f))}};var ci=function(l,f){var m=f.pixelRatio,C=f.version,M=f.stretchX,R=f.stretchY,W=f.content;this.paddedRect=l,this.pixelRatio=m,this.stretchX=M,this.stretchY=R,this.content=W,this.version=C},mo={tl:{configurable:!0},br:{configurable:!0},tlbr:{configurable:!0},displaySize:{configurable:!0}};mo.tl.get=function(){return[this.paddedRect.x+1,this.paddedRect.y+1]},mo.br.get=function(){return[this.paddedRect.x+this.paddedRect.w-1,this.paddedRect.y+this.paddedRect.h-1]},mo.tlbr.get=function(){return this.tl.concat(this.br)},mo.displaySize.get=function(){return[(this.paddedRect.w-2)/this.pixelRatio,(this.paddedRect.h-2)/this.pixelRatio]},Object.defineProperties(ci.prototype,mo);var Yi=function(l,f){var m={},C={};this.haveRenderCallbacks=[];var M=[];this.addImages(l,m,M),this.addImages(f,C,M);var R=po(M),W=new Ws({width:R.w||1,height:R.h||1});for(var ee in l){var ce=l[ee],xe=m[ee].paddedRect;Ws.copy(ce.data,W,{x:0,y:0},{x:xe.x+1,y:xe.y+1},ce.data)}for(var Te in f){var De=f[Te],Re=C[Te].paddedRect,$e=Re.x+1,ut=Re.y+1,ct=De.data.width,_t=De.data.height;Ws.copy(De.data,W,{x:0,y:0},{x:$e,y:ut},De.data),Ws.copy(De.data,W,{x:0,y:_t-1},{x:$e,y:ut-1},{width:ct,height:1}),Ws.copy(De.data,W,{x:0,y:0},{x:$e,y:ut+_t},{width:ct,height:1}),Ws.copy(De.data,W,{x:ct-1,y:0},{x:$e-1,y:ut},{width:1,height:_t}),Ws.copy(De.data,W,{x:0,y:0},{x:$e+ct,y:ut},{width:1,height:_t})}this.image=W,this.iconPositions=m,this.patternPositions=C};Yi.prototype.addImages=function(l,f,m){for(var C in l){var M=l[C],R={x:0,y:0,w:M.data.width+2,h:M.data.height+2};m.push(R),f[C]=new ci(R,M),M.hasRenderCallback&&this.haveRenderCallbacks.push(C)}},Yi.prototype.patchUpdatedImages=function(l,f){for(var m in l.dispatchRenderCallbacks(this.haveRenderCallbacks),l.updatedImages)this.patchUpdatedImage(this.iconPositions[m],l.getImage(m),f),this.patchUpdatedImage(this.patternPositions[m],l.getImage(m),f)},Yi.prototype.patchUpdatedImage=function(l,f,m){if(l&&f&&l.version!==f.version){l.version=f.version;var C=l.tl;m.update(f.data,void 0,{x:C[0],y:C[1]})}},Xr("ImagePosition",ci),Xr("ImageAtlas",Yi);var Nn={horizontal:1,vertical:2,horizontalOnly:3},gi=function(){this.scale=1,this.fontStack="",this.imageName=null};gi.forText=function(l,f){var m=new gi;return m.scale=l||1,m.fontStack=f,m},gi.forImage=function(l){var f=new gi;return f.imageName=l,f};var Vn=function(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null};function Wi(l,f,m,C,M,R,W,ee,ce,xe,Te,De,Re,$e,ut,ct){var _t,gt=Vn.fromFeature(l,M);De===Nn.vertical&>.verticalizePunctuation();var Lt=Ds.processBidirectionalText,Gt=Ds.processStyledBidirectionalText;if(Lt&>.sections.length===1){_t=[];for(var Qt=0,ar=Lt(gt.toString(),$s(gt,xe,R,f,C,$e,ut));Qt0&&fv>Ks&&(Ks=fv)}else{var rg=si[io.fontStack],ng=rg&&rg[Ro];if(ng&&ng.rect)Sp=ng.rect,Ss=ng.metrics;else{var d0=Oi[io.fontStack],p0=d0&&d0[Ro];if(!p0)continue;Ss=p0.metrics}va=24*(Zi-io.scale)}cv?(mn.verticalizable=!0,ca.push({glyph:Ro,imageName:Kh,x:Ya,y:Kn+va,vertical:cv,scale:io.scale,fontStack:io.fontStack,sectionIndex:dh,metrics:Ss,rect:Sp}),Ya+=xy*io.scale+vo):(ca.push({glyph:Ro,imageName:Kh,x:Ya,y:Kn+va,vertical:cv,scale:io.scale,fontStack:io.fontStack,sectionIndex:dh,metrics:Ss,rect:Sp}),Ya+=Ss.advance*io.scale+vo)}ca.length!==0&&(ql=Math.max(Ya-vo,ql),fh(ca,0,ca.length-1,Fi,Ks)),Ya=0;var hv=go*Zi+Ks;zu.lineOffset=Math.max(Ks,Pc),Kn+=hv,ga=Math.max(hv,ga),++Bl}else Kn+=go,++Bl}var zl,kp=Kn- -17,wy=ma(Ba),ig=wy.horizontalAlign,Sy=wy.verticalAlign;(function(D_,O_,ky,ph,zi,Ty,Xc,Ey,I_){var Uo,M_=(O_-ky)*zi;Uo=Ty!==Xc?-Ey*ph- -17:(-ph*I_+.5)*Xc;for(var dv=0,og=D_;dv=0&&C>=l&&ia[this.text.charCodeAt(C)];C--)m--;this.text=this.text.substring(l,m),this.sectionIndex=this.sectionIndex.slice(l,m)},Vn.prototype.substring=function(l,f){var m=new Vn;return m.text=this.text.substring(l,f),m.sectionIndex=this.sectionIndex.slice(l,f),m.sections=this.sections,m},Vn.prototype.toString=function(){return this.text},Vn.prototype.getMaxScale=function(){var l=this;return this.sectionIndex.reduce(function(f,m){return Math.max(f,l.sections[m].scale)},0)},Vn.prototype.addTextSection=function(l,f){this.text+=l.text,this.sections.push(gi.forText(l.scale,l.fontStack||f));for(var m=this.sections.length-1,C=0;C=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)};var ia={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},Ei={};function Lo(l,f,m,C,M,R){if(f.imageName){var W=C[f.imageName];return W?W.displaySize[0]*f.scale*24/R+M:0}var ee=m[f.fontStack],ce=ee&&ee[l];return ce?ce.metrics.advance*f.scale+M:0}function pu(l,f,m,C){var M=Math.pow(l-f,2);return C?l=0,De=0,Re=0;Re-m/2;){if(--W<0)return!1;ee-=l[W].dist(R),R=l[W]}ee+=l[W].dist(l[W+1]),W++;for(var ce=[],xe=0;eeC;)xe-=ce.shift().angleDelta;if(xe>M)return!1;W++,ee+=Te.dist(De)}return!0}function gO(l){for(var f=0,m=0;mxe){var ut=(xe-ce)/$e,ct=Zo(De.x,Re.x,ut),_t=Zo(De.y,Re.y,ut),gt=new Fl(ct,_t,Re.angleTo(De),Te);return gt._round(),!W||mO(l,gt,ee,W,f)?gt:void 0}ce+=$e}}function Uq(l,f,m,C,M,R,W,ee,ce){var xe=Ck(C,R,W),Te=vO(C,M),De=Te*W,Re=l[0].x===0||l[0].x===ce||l[0].y===0||l[0].y===ce;return f-De=0&&Vi=0&&Ln=0&&Jr+Ar<=Wr){var go=new Fl(Vi,Ln,Oi,nn);go._round(),gt&&!mO(ut,go,Gt,gt,Lt)||In.push(go)}}Tn+=mn}return ar||In.length||Qt||(In=$e(ut,Tn/2,_t,gt,Lt,Gt,Qt,!0,pr)),In}(l,Re?f/2*ee%f:(Te/2+2*R)*W*ee%f,f,xe,m,De,Re,!1,ce)}function yO(l,f,m,C,M){for(var R=[],W=0;W=C&&De.x>=C||(Te.x>=C?Te=new Se(C,Te.y+(C-Te.x)/(De.x-Te.x)*(De.y-Te.y))._round():De.x>=C&&(De=new Se(C,Te.y+(C-Te.x)/(De.x-Te.x)*(De.y-Te.y))._round()),Te.y>=M&&De.y>=M||(Te.y>=M?Te=new Se(Te.x+(M-Te.y)/(De.y-Te.y)*(De.x-Te.x),M)._round():De.y>=M&&(De=new Se(Te.x+(M-Te.y)/(De.y-Te.y)*(De.x-Te.x),M)._round()),ce&&Te.equals(ce[ce.length-1])||R.push(ce=[Te]),ce.push(De)))))}return R}function bO(l,f,m,C){var M=[],R=l.image,W=R.pixelRatio,ee=R.paddedRect.w-2,ce=R.paddedRect.h-2,xe=l.right-l.left,Te=l.bottom-l.top,De=R.stretchX||[[0,ee]],Re=R.stretchY||[[0,ce]],$e=function(Vi,Ln){return Vi+Ln[1]-Ln[0]},ut=De.reduce($e,0),ct=Re.reduce($e,0),_t=ee-ut,gt=ce-ct,Lt=0,Gt=ut,Qt=0,ar=ct,pr=0,Ar=_t,Wr=0,Tn=gt;if(R.content&&C){var Jr=R.content;Lt=__(De,0,Jr[0]),Qt=__(Re,0,Jr[1]),Gt=__(De,Jr[0],Jr[2]),ar=__(Re,Jr[1],Jr[3]),pr=Jr[0]-Lt,Wr=Jr[1]-Qt,Ar=Jr[2]-Jr[0]-Gt,Tn=Jr[3]-Jr[1]-ar}var In=function(Vi,Ln,go,Ba){var _s=w_(Vi.stretch-Lt,Gt,xe,l.left),ss=S_(Vi.fixed-pr,Ar,Vi.stretch,ut),vo=w_(Ln.stretch-Qt,ar,Te,l.top),ws=S_(Ln.fixed-Wr,Tn,Ln.stretch,ct),dl=w_(go.stretch-Lt,Gt,xe,l.left),Ya=S_(go.fixed-pr,Ar,go.stretch,ut),Kn=w_(Ba.stretch-Qt,ar,Te,l.top),ql=S_(Ba.fixed-Wr,Tn,Ba.stretch,ct),ga=new Se(_s,vo),Fi=new Se(dl,vo),Bl=new Se(dl,Kn),fi=new Se(_s,Kn),oa=new Se(ss/W,ws/W),jo=new Se(Ya/W,ql/W),Zi=f*Math.PI/180;if(Zi){var Pc=Math.sin(Zi),zu=Math.cos(Zi),ca=[zu,-Pc,Pc,zu];ga._matMult(ca),Fi._matMult(ca),fi._matMult(ca),Bl._matMult(ca)}var Ks=Vi.stretch+Vi.fixed,ls=Ln.stretch+Ln.fixed;return{tl:ga,tr:Fi,bl:fi,br:Bl,tex:{x:R.paddedRect.x+1+Ks,y:R.paddedRect.y+1+ls,w:go.stretch+go.fixed-Ks,h:Ba.stretch+Ba.fixed-ls},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:oa,pixelOffsetBR:jo,minFontScaleX:Ar/W/xe,minFontScaleY:Tn/W/Te,isSDF:m}};if(C&&(R.stretchX||R.stretchY))for(var nn=hh(De,_t,ut),vi=hh(Re,gt,ct),Hn=0;Hn0&&($e=Math.max(10,$e),this.circleDiameter=$e)}else{var ut=R.top*W-ee,ct=R.bottom*W+ee,_t=R.left*W-ee,gt=R.right*W+ee,Lt=R.collisionPadding;if(Lt&&(_t-=Lt[0]*W,ut-=Lt[1]*W,gt+=Lt[2]*W,ct+=Lt[3]*W),xe){var Gt=new Se(_t,ut),Qt=new Se(gt,ut),ar=new Se(_t,ct),pr=new Se(gt,ct),Ar=xe*Math.PI/180;Gt._rotate(Ar),Qt._rotate(Ar),ar._rotate(Ar),pr._rotate(Ar),_t=Math.min(Gt.x,Qt.x,ar.x,pr.x),gt=Math.max(Gt.x,Qt.x,ar.x,pr.x),ut=Math.min(Gt.y,Qt.y,ar.y,pr.y),ct=Math.max(Gt.y,Qt.y,ar.y,pr.y)}l.emplaceBack(f.x,f.y,_t,ut,gt,ct,m,C,M)}this.boxEndIndex=l.length},iv=function(l,f){if(l===void 0&&(l=[]),f===void 0&&(f=Hq),this.data=l,this.length=this.data.length,this.compare=f,this.length>0)for(var m=(this.length>>1)-1;m>=0;m--)this._down(m)};function Hq(l,f){return lf?1:0}function Wq(l,f,m){f===void 0&&(f=1),m===void 0&&(m=!1);for(var C=1/0,M=1/0,R=-1/0,W=-1/0,ee=l[0],ce=0;ceR)&&(R=xe.x),(!ce||xe.y>W)&&(W=xe.y)}var Te=Math.min(R-C,W-M),De=Te/2,Re=new iv([],Vq);if(Te===0)return new Se(C,M);for(var $e=C;$ect.d||!ct.d)&&(ct=gt,m&&console.log("found best %d after %d probes",Math.round(1e4*gt.d)/1e4,_t)),gt.max-ct.d<=f||(Re.push(new vy(gt.p.x-(De=gt.h/2),gt.p.y-De,De,l)),Re.push(new vy(gt.p.x+De,gt.p.y-De,De,l)),Re.push(new vy(gt.p.x-De,gt.p.y+De,De,l)),Re.push(new vy(gt.p.x+De,gt.p.y+De,De,l)),_t+=4)}return m&&(console.log("num probes: "+_t),console.log("best distance: "+ct.d)),ct.p}function Vq(l,f){return f.max-l.max}function vy(l,f,m,C){this.p=new Se(l,f),this.h=m,this.d=function(M,R){for(var W=!1,ee=1/0,ce=0;ceM.y!=ut.y>M.y&&M.x<(ut.x-$e.x)*(M.y-$e.y)/(ut.y-$e.y)+$e.x&&(W=!W),ee=Math.min(ee,hu(M,$e,ut))}return(W?1:-1)*Math.sqrt(ee)}(this.p,C),this.max=this.d+this.h*Math.SQRT2}iv.prototype.push=function(l){this.data.push(l),this.length++,this._up(this.length-1)},iv.prototype.pop=function(){if(this.length!==0){var l=this.data[0],f=this.data.pop();return this.length--,this.length>0&&(this.data[0]=f,this._down(0)),l}},iv.prototype.peek=function(){return this.data[0]},iv.prototype._up=function(l){for(var f=this.data,m=this.compare,C=f[l];l>0;){var M=l-1>>1,R=f[M];if(m(C,R)>=0)break;f[l]=R,l=M}f[l]=C},iv.prototype._down=function(l){for(var f=this.data,m=this.compare,C=this.length>>1,M=f[l];l=0)break;f[l]=W,l=R}f[l]=M};var c0=Number.POSITIVE_INFINITY;function xO(l,f){return f[1]!==c0?function(m,C,M){var R=0,W=0;switch(C=Math.abs(C),M=Math.abs(M),m){case"top-right":case"top-left":case"top":W=M-7;break;case"bottom-right":case"bottom-left":case"bottom":W=7-M}switch(m){case"top-right":case"bottom-right":case"right":R=-C;break;case"top-left":case"bottom-left":case"left":R=C}return[R,W]}(l,f[0],f[1]):function(m,C){var M=0,R=0;C<0&&(C=0);var W=C/Math.sqrt(2);switch(m){case"top-right":case"top-left":R=W-7;break;case"bottom-right":case"bottom-left":R=7-W;break;case"bottom":R=7-C;break;case"top":R=C-7}switch(m){case"top-right":case"bottom-right":M=-W;break;case"top-left":case"bottom-left":M=W;break;case"left":M=C;break;case"right":M=-C}return[M,R]}(l,f[0])}function Ak(l){switch(l){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function _O(l,f,m,C,M,R,W,ee,ce,xe,Te,De,Re,$e,ut){var ct=function(Qt,ar,pr,Ar,Wr,Tn,Jr,In){for(var nn=Ar.layout.get("text-rotate").evaluate(Tn,{})*Math.PI/180,vi=[],Hn=0,mn=ar.positionedLines;Hn32640&&Ft(l.layerIds[0]+': Value for "text-size" is >= 255. Reduce your "text-size".'):_t.kind==="composite"&&((gt=[128*$e.compositeTextSizes[0].evaluate(W,{},ut),128*$e.compositeTextSizes[1].evaluate(W,{},ut)])[0]>32640||gt[1]>32640)&&Ft(l.layerIds[0]+': Value for "text-size" is >= 255. Reduce your "text-size".'),l.addSymbols(l.text,ct,gt,ee,R,W,xe,f,ce.lineStartIndex,ce.lineLength,Re,ut);for(var Lt=0,Gt=Te;Lt=0;W--)if(C.dist(R[W])0)&&(R.value.kind!=="constant"||R.value.value.length>0),xe=ee.value.kind!=="constant"||!!ee.value.value||Object.keys(ee.parameters).length>0,Te=M.get("symbol-sort-key");if(this.features=[],ce||xe){for(var De=f.iconDependencies,Re=f.glyphDependencies,$e=f.availableImages,ut=new mi(this.zoom),ct=0,_t=l;ct<_t.length;ct+=1){var gt=_t[ct],Lt=gt.feature,Gt=gt.id,Qt=gt.index,ar=gt.sourceLayerIndex,pr=C._featureFilter.needGeometry,Ar=Mo(Lt,pr);if(C._featureFilter.filter(ut,Ar,m)){pr||(Ar.geometry=Do(Lt));var Wr=void 0;if(ce){var Tn=C.getValueAndResolveTokens("text-field",Ar,m,$e),Jr=ii.factory(Tn);Yq(Jr)&&(this.hasRTLText=!0),(!this.hasRTLText||Rf()==="unavailable"||this.hasRTLText&&Ds.isParsed())&&(Wr=s(Jr,C,Ar))}var In=void 0;if(xe){var nn=C.getValueAndResolveTokens("icon-image",Ar,m,$e);In=nn instanceof Mi?nn:Mi.fromString(nn)}if(Wr||In){var vi=this.sortFeaturesByKey?Te.evaluate(Ar,{},m):void 0;if(this.features.push({id:Gt,text:Wr,icon:In,index:Qt,sourceLayerIndex:ar,geometry:Ar.geometry,properties:Lt.properties,type:Kq[Lt.type],sortKey:vi}),In&&(De[In.name]=!0),Wr){var Hn=R.evaluate(Ar,{},m).join(","),mn=M.get("text-rotation-alignment")==="map"&&M.get("symbol-placement")!=="point";this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(Nn.vertical)>=0;for(var Oi=0,si=Wr.sections;Oi=0;ee--)R[ee]={x:f[ee].x,y:f[ee].y,tileUnitDistanceFromAnchor:M},ee>0&&(M+=f[ee-1].dist(f[ee]));for(var ce=0;ce0},Xo.prototype.hasIconData=function(){return this.icon.segments.get().length>0},Xo.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},Xo.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},Xo.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},Xo.prototype.addIndicesForPlacedSymbol=function(l,f){for(var m=l.placedSymbolArray.get(f),C=m.vertexStartIndex+4*m.numGlyphs,M=m.vertexStartIndex;M1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(l),this.sortedAngle=l,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var m=0,C=this.symbolInstanceIndexes;m=0&&ee.indexOf(R)===W&&f.addIndicesForPlacedSymbol(f.text,R)}),M.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,M.verticalPlacedTextSymbolIndex),M.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,M.placedIconSymbolIndex),M.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,M.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},Xr("SymbolBucket",Xo,{omit:["layers","collisionBoxArray","features","compareText"]}),Xo.MAX_GLYPHS=65535,Xo.addDynamicAttributes=Dk;var Zq=new pa({"symbol-placement":new Fr(Be.layout_symbol["symbol-placement"]),"symbol-spacing":new Fr(Be.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new Fr(Be.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Sr(Be.layout_symbol["symbol-sort-key"]),"symbol-z-order":new Fr(Be.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new Fr(Be.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new Fr(Be.layout_symbol["icon-ignore-placement"]),"icon-optional":new Fr(Be.layout_symbol["icon-optional"]),"icon-rotation-alignment":new Fr(Be.layout_symbol["icon-rotation-alignment"]),"icon-size":new Sr(Be.layout_symbol["icon-size"]),"icon-text-fit":new Fr(Be.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new Fr(Be.layout_symbol["icon-text-fit-padding"]),"icon-image":new Sr(Be.layout_symbol["icon-image"]),"icon-rotate":new Sr(Be.layout_symbol["icon-rotate"]),"icon-padding":new Fr(Be.layout_symbol["icon-padding"]),"icon-keep-upright":new Fr(Be.layout_symbol["icon-keep-upright"]),"icon-offset":new Sr(Be.layout_symbol["icon-offset"]),"icon-anchor":new Sr(Be.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new Fr(Be.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new Fr(Be.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new Fr(Be.layout_symbol["text-rotation-alignment"]),"text-field":new Sr(Be.layout_symbol["text-field"]),"text-font":new Sr(Be.layout_symbol["text-font"]),"text-size":new Sr(Be.layout_symbol["text-size"]),"text-max-width":new Sr(Be.layout_symbol["text-max-width"]),"text-line-height":new Fr(Be.layout_symbol["text-line-height"]),"text-letter-spacing":new Sr(Be.layout_symbol["text-letter-spacing"]),"text-justify":new Sr(Be.layout_symbol["text-justify"]),"text-radial-offset":new Sr(Be.layout_symbol["text-radial-offset"]),"text-variable-anchor":new Fr(Be.layout_symbol["text-variable-anchor"]),"text-anchor":new Sr(Be.layout_symbol["text-anchor"]),"text-max-angle":new Fr(Be.layout_symbol["text-max-angle"]),"text-writing-mode":new Fr(Be.layout_symbol["text-writing-mode"]),"text-rotate":new Sr(Be.layout_symbol["text-rotate"]),"text-padding":new Fr(Be.layout_symbol["text-padding"]),"text-keep-upright":new Fr(Be.layout_symbol["text-keep-upright"]),"text-transform":new Sr(Be.layout_symbol["text-transform"]),"text-offset":new Sr(Be.layout_symbol["text-offset"]),"text-allow-overlap":new Fr(Be.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new Fr(Be.layout_symbol["text-ignore-placement"]),"text-optional":new Fr(Be.layout_symbol["text-optional"])}),Ok={paint:new pa({"icon-opacity":new Sr(Be.paint_symbol["icon-opacity"]),"icon-color":new Sr(Be.paint_symbol["icon-color"]),"icon-halo-color":new Sr(Be.paint_symbol["icon-halo-color"]),"icon-halo-width":new Sr(Be.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Sr(Be.paint_symbol["icon-halo-blur"]),"icon-translate":new Fr(Be.paint_symbol["icon-translate"]),"icon-translate-anchor":new Fr(Be.paint_symbol["icon-translate-anchor"]),"text-opacity":new Sr(Be.paint_symbol["text-opacity"]),"text-color":new Sr(Be.paint_symbol["text-color"],{runtimeType:_e,getOverride:function(l){return l.textColor},hasOverride:function(l){return!!l.textColor}}),"text-halo-color":new Sr(Be.paint_symbol["text-halo-color"]),"text-halo-width":new Sr(Be.paint_symbol["text-halo-width"]),"text-halo-blur":new Sr(Be.paint_symbol["text-halo-blur"]),"text-translate":new Fr(Be.paint_symbol["text-translate"]),"text-translate-anchor":new Fr(Be.paint_symbol["text-translate-anchor"])}),layout:Zq},by=function(l){this.type=l.property.overrides?l.property.overrides.runtimeType:He,this.defaultValue=l};by.prototype.evaluate=function(l){if(l.formattedSection){var f=this.defaultValue.property.overrides;if(f&&f.hasOverride(l.formattedSection))return f.getOverride(l.formattedSection)}return l.feature&&l.featureState?this.defaultValue.evaluate(l.feature,l.featureState):this.defaultValue.property.specification.default},by.prototype.eachChild=function(l){this.defaultValue.isConstant()||l(this.defaultValue.value._styleExpression.expression)},by.prototype.outputDefined=function(){return!1},by.prototype.serialize=function(){return null},Xr("FormatSectionOverride",by,{omit:["defaultValue"]});var Xq=function(l){function f(m){l.call(this,m,Ok)}return l&&(f.__proto__=l),(f.prototype=Object.create(l&&l.prototype)).constructor=f,f.prototype.recalculate=function(m,C){if(l.prototype.recalculate.call(this,m,C),this.layout.get("icon-rotation-alignment")==="auto"&&(this.layout._values["icon-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout._values["text-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-pitch-alignment")==="auto"&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")),this.layout.get("icon-pitch-alignment")==="auto"&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),this.layout.get("symbol-placement")==="point"){var M=this.layout.get("text-writing-mode");if(M){for(var R=[],W=0,ee=M;W",targetMapId:C,sourceMapId:R.mapId})}}},av.prototype.receive=function(l){var f=l.data,m=f.id;if(m&&(!f.targetMapId||this.mapId===f.targetMapId))if(f.type===""){delete this.tasks[m];var C=this.cancelCallbacks[m];delete this.cancelCallbacks[m],C&&C()}else cr()||f.mustQueue?(this.tasks[m]=f,this.taskQueue.push(m),this.invoker.trigger()):this.processTask(m,f)},av.prototype.process=function(){if(this.taskQueue.length){var l=this.taskQueue.shift(),f=this.tasks[l];delete this.tasks[l],this.taskQueue.length&&this.invoker.trigger(),f&&this.processTask(l,f)}},av.prototype.processTask=function(l,f){var m=this;if(f.type===""){var C=this.callbacks[l];delete this.callbacks[l],C&&(f.error?C(Va(f.error)):C(null,Va(f.data)))}else{var M=!1,R=At(this.globalScope)?void 0:[],W=f.hasCallback?function(Te,De){M=!0,delete m.cancelCallbacks[l],m.target.postMessage({id:l,type:"",sourceMapId:m.mapId,error:Te?lu(Te):null,data:lu(De,R)},R)}:function(Te){M=!0},ee=null,ce=Va(f.data);if(this.parent[f.type])ee=this.parent[f.type](f.sourceMapId,ce,W);else if(this.parent.getWorkerSource){var xe=f.type.split(".");ee=this.parent.getWorkerSource(f.sourceMapId,xe[0],ce.source)[xe[1]](ce,W)}else W(new Error("Could not find function "+f.type));!M&&ee&&ee.cancel&&(this.cancelCallbacks[l]=ee.cancel)}},av.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};var xs=function(l,f){l&&(f?this.setSouthWest(l).setNorthEast(f):l.length===4?this.setSouthWest([l[0],l[1]]).setNorthEast([l[2],l[3]]):this.setSouthWest(l[0]).setNorthEast(l[1]))};xs.prototype.setNorthEast=function(l){return this._ne=l instanceof qa?new qa(l.lng,l.lat):qa.convert(l),this},xs.prototype.setSouthWest=function(l){return this._sw=l instanceof qa?new qa(l.lng,l.lat):qa.convert(l),this},xs.prototype.extend=function(l){var f,m,C=this._sw,M=this._ne;if(l instanceof qa)f=l,m=l;else{if(!(l instanceof xs))return Array.isArray(l)?l.length===4||l.every(Array.isArray)?this.extend(xs.convert(l)):this.extend(qa.convert(l)):this;if(m=l._ne,!(f=l._sw)||!m)return this}return C||M?(C.lng=Math.min(f.lng,C.lng),C.lat=Math.min(f.lat,C.lat),M.lng=Math.max(m.lng,M.lng),M.lat=Math.max(m.lat,M.lat)):(this._sw=new qa(f.lng,f.lat),this._ne=new qa(m.lng,m.lat)),this},xs.prototype.getCenter=function(){return new qa((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},xs.prototype.getSouthWest=function(){return this._sw},xs.prototype.getNorthEast=function(){return this._ne},xs.prototype.getNorthWest=function(){return new qa(this.getWest(),this.getNorth())},xs.prototype.getSouthEast=function(){return new qa(this.getEast(),this.getSouth())},xs.prototype.getWest=function(){return this._sw.lng},xs.prototype.getSouth=function(){return this._sw.lat},xs.prototype.getEast=function(){return this._ne.lng},xs.prototype.getNorth=function(){return this._ne.lat},xs.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},xs.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},xs.prototype.isEmpty=function(){return!(this._sw&&this._ne)},xs.prototype.contains=function(l){var f=qa.convert(l),m=f.lng,C=f.lat,M=this._sw.lng<=m&&m<=this._ne.lng;return this._sw.lng>this._ne.lng&&(M=this._sw.lng>=m&&m>=this._ne.lng),this._sw.lat<=C&&C<=this._ne.lat&&M},xs.convert=function(l){return!l||l instanceof xs?l:new xs(l)};var qa=function(l,f){if(isNaN(l)||isNaN(f))throw new Error("Invalid LngLat object: ("+l+", "+f+")");if(this.lng=+l,this.lat=+f,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};qa.prototype.wrap=function(){return new qa($(this.lng,-180,180),this.lat)},qa.prototype.toArray=function(){return[this.lng,this.lat]},qa.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},qa.prototype.distanceTo=function(l){var f=Math.PI/180,m=this.lat*f,C=l.lat*f,M=Math.sin(m)*Math.sin(C)+Math.cos(m)*Math.cos(C)*Math.cos((l.lng-this.lng)*f);return 63710088e-1*Math.acos(Math.min(M,1))},qa.prototype.toBounds=function(l){l===void 0&&(l=0);var f=360*l/40075017,m=f/Math.cos(Math.PI/180*this.lat);return new xs(new qa(this.lng-m,this.lat-f),new qa(this.lng+m,this.lat+f))},qa.convert=function(l){if(l instanceof qa)return l;if(Array.isArray(l)&&(l.length===2||l.length===3))return new qa(Number(l[0]),Number(l[1]));if(!Array.isArray(l)&&typeof l=="object"&&l!==null)return new qa(Number("lng"in l?l.lng:l.lon),Number(l.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")};var DO=2*Math.PI*63710088e-1;function OO(l){return DO*Math.cos(l*Math.PI/180)}function IO(l){return(180+l)/360}function MO(l){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+l*Math.PI/360)))/360}function PO(l,f){return l/OO(f)}function Pk(l){return 360/Math.PI*Math.atan(Math.exp((180-360*l)*Math.PI/180))-90}var sv=function(l,f,m){m===void 0&&(m=0),this.x=+l,this.y=+f,this.z=+m};sv.fromLngLat=function(l,f){f===void 0&&(f=0);var m=qa.convert(l);return new sv(IO(m.lng),MO(m.lat),PO(f,m.lat))},sv.prototype.toLngLat=function(){return new qa(360*this.x-180,Pk(this.y))},sv.prototype.toAltitude=function(){return this.z*OO(Pk(this.y))},sv.prototype.meterInMercatorCoordinateUnits=function(){return 1/DO*(l=Pk(this.y),1/Math.cos(l*Math.PI/180));var l};var lv=function(l,f,m){this.z=l,this.x=f,this.y=m,this.key=h0(0,l,l,f,m)};lv.prototype.equals=function(l){return this.z===l.z&&this.x===l.x&&this.y===l.y},lv.prototype.url=function(l,f){var m,C,M,R,W,ee=(C=this.y,M=this.z,R=AO(256*(m=this.x),256*(C=Math.pow(2,M)-C-1),M),W=AO(256*(m+1),256*(C+1),M),R[0]+","+R[1]+","+W[0]+","+W[1]),ce=function(xe,Te,De){for(var Re,$e="",ut=xe;ut>0;ut--)$e+=(Te&(Re=1<this.canonical.z?new rl(l,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new rl(l,this.wrap,l,this.canonical.x>>f,this.canonical.y>>f)},rl.prototype.calculateScaledKey=function(l,f){var m=this.canonical.z-l;return l>this.canonical.z?h0(this.wrap*+f,l,this.canonical.z,this.canonical.x,this.canonical.y):h0(this.wrap*+f,l,l,this.canonical.x>>m,this.canonical.y>>m)},rl.prototype.isChildOf=function(l){if(l.wrap!==this.wrap)return!1;var f=this.canonical.z-l.canonical.z;return l.overscaledZ===0||l.overscaledZ>f&&l.canonical.y===this.canonical.y>>f},rl.prototype.children=function(l){if(this.overscaledZ>=l)return[new rl(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var f=this.canonical.z+1,m=2*this.canonical.x,C=2*this.canonical.y;return[new rl(f,this.wrap,f,m,C),new rl(f,this.wrap,f,m+1,C),new rl(f,this.wrap,f,m,C+1),new rl(f,this.wrap,f,m+1,C+1)]},rl.prototype.isLessThan=function(l){return this.wrapl.wrap)&&(this.overscaledZl.overscaledZ)&&(this.canonical.xl.canonical.x)&&this.canonical.y=this.dim+1||f<-1||f>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(f+1)*this.stride+(l+1)},vm.prototype._unpackMapbox=function(l,f,m){return(256*l*256+256*f+m)/10-1e4},vm.prototype._unpackTerrarium=function(l,f,m){return 256*l+f+m/256-32768},vm.prototype.getPixels=function(){return new Ws({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},vm.prototype.backfillBorder=function(l,f,m){if(this.dim!==l.dim)throw new Error("dem dimension mismatch");var C=f*this.dim,M=f*this.dim+this.dim,R=m*this.dim,W=m*this.dim+this.dim;switch(f){case-1:C=M-1;break;case 1:M=C+1}switch(m){case-1:R=W-1;break;case 1:W=R+1}for(var ee=-f*this.dim,ce=-m*this.dim,xe=R;xe=0&&Te[3]>=0&&ee.insert(W,Te[0],Te[1],Te[2],Te[3])}},wp.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new Ll.VectorTile(new E(this.rawTileData)).layers,this.sourceLayerCoder=new C_(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},wp.prototype.query=function(l,f,m,C){var M=this;this.loadVTLayers();for(var R=l.params||{},W=8192/l.tileSize/l.scale,ee=_a(R.filter),ce=l.queryGeometry,xe=l.queryPadding*W,Te=FO(ce),De=this.grid.query(Te.minX-xe,Te.minY-xe,Te.maxX+xe,Te.maxY+xe),Re=FO(l.cameraQueryGeometry),$e=this.grid3D.query(Re.minX-xe,Re.minY-xe,Re.maxX+xe,Re.maxY+xe,function(Qt,ar,pr,Ar){return function(Wr,Tn,Jr,In,nn){for(var vi=0,Hn=Wr;vi=mn.x&&nn>=mn.y)return!0}var Oi=[new Se(Tn,Jr),new Se(Tn,nn),new Se(In,nn),new Se(In,Jr)];if(Wr.length>2){for(var si=0,Vi=Oi;si=0)return!0;return!1}(R,De)){var Re=this.sourceLayerCoder.decode(m),$e=this.vtLayers[Re].feature(C);if(M.needGeometry){var ut=Mo($e,!0);if(!M.filter(new mi(this.tileID.overscaledZ),ut,this.tileID.canonical))return}else if(!M.filter(new mi(this.tileID.overscaledZ),$e))return;for(var ct=this.getId($e,Re),_t=0;_tC)M=!1;else if(f)if(this.expirationTimePt&&(l.getActor().send("enforceCacheSizeLimit",st),jn=0)},S.clamp=N,S.clearTileCache=function(l){var f=be.caches.delete("mapbox-tiles");l&&f.catch(l).then(function(){return l()})},S.clipLine=yO,S.clone=function(l){var f=new Ri(16);return f[0]=l[0],f[1]=l[1],f[2]=l[2],f[3]=l[3],f[4]=l[4],f[5]=l[5],f[6]=l[6],f[7]=l[7],f[8]=l[8],f[9]=l[9],f[10]=l[10],f[11]=l[11],f[12]=l[12],f[13]=l[13],f[14]=l[14],f[15]=l[15],f},S.clone$1=Ct,S.clone$2=function(l){var f=new Ri(3);return f[0]=l[0],f[1]=l[1],f[2]=l[2],f},S.collisionCircleLayout=D,S.config=vr,S.create=function(){var l=new Ri(16);return Ri!=Float32Array&&(l[1]=0,l[2]=0,l[3]=0,l[4]=0,l[6]=0,l[7]=0,l[8]=0,l[9]=0,l[11]=0,l[12]=0,l[13]=0,l[14]=0),l[0]=1,l[5]=1,l[10]=1,l[15]=1,l},S.create$1=function(){var l=new Ri(9);return Ri!=Float32Array&&(l[1]=0,l[2]=0,l[3]=0,l[5]=0,l[6]=0,l[7]=0),l[0]=1,l[4]=1,l[8]=1,l},S.create$2=function(){var l=new Ri(4);return Ri!=Float32Array&&(l[1]=0,l[2]=0),l[0]=1,l[3]=1,l},S.createCommonjsModule=ve,S.createExpression=kc,S.createLayout=gs,S.createStyleLayer=function(l){return l.type==="custom"?new SO(l):new t3[l.type](l)},S.cross=function(l,f,m){var C=f[0],M=f[1],R=f[2],W=m[0],ee=m[1],ce=m[2];return l[0]=M*ce-R*ee,l[1]=R*W-C*ce,l[2]=C*ee-M*W,l},S.deepEqual=function l(f,m){if(Array.isArray(f)){if(!Array.isArray(m)||f.length!==m.length)return!1;for(var C=0;C0&&(R=1/Math.sqrt(R)),l[0]=f[0]*R,l[1]=f[1]*R,l[2]=f[2]*R,l},S.number=Zo,S.offscreenCanvasSupported=Br,S.ortho=function(l,f,m,C,M,R,W){var ee=1/(f-m),ce=1/(C-M),xe=1/(R-W);return l[0]=-2*ee,l[1]=0,l[2]=0,l[3]=0,l[4]=0,l[5]=-2*ce,l[6]=0,l[7]=0,l[8]=0,l[9]=0,l[10]=2*xe,l[11]=0,l[12]=(f+m)*ee,l[13]=(M+C)*ce,l[14]=(W+R)*xe,l[15]=1,l},S.parseGlyphPBF=function(l){return new E(l).readFields(un,[])},S.pbf=E,S.performSymbolLayout=function(l,f,m,C,M,R,W){l.createArrays(),l.tilePixelRatio=8192/(512*l.overscaling),l.compareText={},l.iconsNeedLinear=!1;var ee=l.layers[0].layout,ce=l.layers[0]._unevaluatedLayout._values,xe={};if(l.textSizeData.kind==="composite"){var Te=l.textSizeData,De=Te.maxZoom;xe.compositeTextSizes=[ce["text-size"].possiblyEvaluate(new mi(Te.minZoom),W),ce["text-size"].possiblyEvaluate(new mi(De),W)]}if(l.iconSizeData.kind==="composite"){var Re=l.iconSizeData,$e=Re.maxZoom;xe.compositeIconSizes=[ce["icon-size"].possiblyEvaluate(new mi(Re.minZoom),W),ce["icon-size"].possiblyEvaluate(new mi($e),W)]}xe.layoutTextSize=ce["text-size"].possiblyEvaluate(new mi(l.zoom+1),W),xe.layoutIconSize=ce["icon-size"].possiblyEvaluate(new mi(l.zoom+1),W),xe.textMaxSize=ce["text-size"].possiblyEvaluate(new mi(18));for(var ut=24*ee.get("text-line-height"),ct=ee.get("text-rotation-alignment")==="map"&&ee.get("symbol-placement")!=="point",_t=ee.get("text-keep-upright"),gt=ee.get("text-size"),Lt=function(){var ar=Qt[Gt],pr=ee.get("text-font").evaluate(ar,{},W).join(","),Ar=gt.evaluate(ar,{},W),Wr=xe.layoutTextSize.evaluate(ar,{},W),Tn=xe.layoutIconSize.evaluate(ar,{},W),Jr={horizontal:{},vertical:void 0},In=ar.text,nn=[0,0];if(In){var vi=In.toString(),Hn=24*ee.get("text-letter-spacing").evaluate(ar,{},W),mn=function(fi){for(var oa=0,jo=fi;oa=8192||g0.y<0||g0.y>=8192||function(Ls,Nd,i3,Tp,qk,P_,L_,Ep,R_,pl,Lc,F_,Bk,zO,Ay,jO,UO,HO,zk,WO,zf,N_,jk,qd,o3){var VO,mv,Dy,Bd,Oy,Iy=Ls.addToLineVertexArray(Nd,i3),$O=0,KO=0,GO=0,Uk=0,q_=-1,Hk=-1,bm={},YO=nt(""),Wk=0,Vk=0;if(Ep._unevaluatedLayout.getValue("text-radial-offset")===void 0?(Wk=(VO=Ep.layout.get("text-offset").evaluate(zf,{},qd).map(function(Py){return 24*Py}))[0],Vk=VO[1]):(Wk=24*Ep.layout.get("text-radial-offset").evaluate(zf,{},qd),Vk=c0),Ls.allowVerticalPlacement&&Tp.vertical){var ZO=Ep.layout.get("text-rotate").evaluate(zf,{},qd)+90;Bd=new k_(R_,Nd,pl,Lc,F_,Tp.vertical,Bk,zO,Ay,ZO),L_&&(Oy=new k_(R_,Nd,pl,Lc,F_,L_,UO,HO,Ay,ZO))}if(qk){var $k=Ep.layout.get("icon-rotate").evaluate(zf,{}),XO=Ep.layout.get("icon-text-fit")!=="none",JO=bO(qk,$k,jk,XO),Kk=L_?bO(L_,$k,jk,XO):void 0;Dy=new k_(R_,Nd,pl,Lc,F_,qk,UO,HO,!1,$k),$O=4*JO.length;var QO=Ls.iconSizeData,v0=null;QO.kind==="source"?(v0=[128*Ep.layout.get("icon-size").evaluate(zf,{})])[0]>32640&&Ft(Ls.layerIds[0]+': Value for "icon-size" is >= 255. Reduce your "icon-size".'):QO.kind==="composite"&&((v0=[128*N_.compositeIconSizes[0].evaluate(zf,{},qd),128*N_.compositeIconSizes[1].evaluate(zf,{},qd)])[0]>32640||v0[1]>32640)&&Ft(Ls.layerIds[0]+': Value for "icon-size" is >= 255. Reduce your "icon-size".'),Ls.addSymbols(Ls.icon,JO,v0,WO,zk,zf,!1,Nd,Iy.lineStartIndex,Iy.lineLength,-1,qd),q_=Ls.icon.placedSymbolArray.length-1,Kk&&(KO=4*Kk.length,Ls.addSymbols(Ls.icon,Kk,v0,WO,zk,zf,Nn.vertical,Nd,Iy.lineStartIndex,Iy.lineLength,-1,qd),Hk=Ls.icon.placedSymbolArray.length-1)}for(var e2 in Tp.horizontal){var B_=Tp.horizontal[e2];if(!mv){YO=nt(B_.text);var a3=Ep.layout.get("text-rotate").evaluate(zf,{},qd);mv=new k_(R_,Nd,pl,Lc,F_,B_,Bk,zO,Ay,a3)}var t2=B_.positionedLines.length===1;if(GO+=_O(Ls,Nd,B_,P_,Ep,Ay,zf,jO,Iy,Tp.vertical?Nn.horizontal:Nn.horizontalOnly,t2?Object.keys(Tp.horizontal):[e2],bm,q_,N_,qd),t2)break}Tp.vertical&&(Uk+=_O(Ls,Nd,Tp.vertical,P_,Ep,Ay,zf,jO,Iy,Nn.vertical,["vertical"],bm,Hk,N_,qd));var s3=mv?mv.boxStartIndex:Ls.collisionBoxArray.length,l3=mv?mv.boxEndIndex:Ls.collisionBoxArray.length,u3=Bd?Bd.boxStartIndex:Ls.collisionBoxArray.length,c3=Bd?Bd.boxEndIndex:Ls.collisionBoxArray.length,f3=Dy?Dy.boxStartIndex:Ls.collisionBoxArray.length,h3=Dy?Dy.boxEndIndex:Ls.collisionBoxArray.length,d3=Oy?Oy.boxStartIndex:Ls.collisionBoxArray.length,p3=Oy?Oy.boxEndIndex:Ls.collisionBoxArray.length,Cp=-1,My=function(Py,r2){return Py&&Py.circleDiameter?Math.max(Py.circleDiameter,r2):r2};Cp=My(mv,Cp),Cp=My(Bd,Cp),Cp=My(Dy,Cp);var Gk=(Cp=My(Oy,Cp))>-1?1:0;Gk&&(Cp*=o3/24),Ls.glyphOffsetArray.length>=Xo.MAX_GLYPHS&&Ft("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),zf.sortKey!==void 0&&Ls.addToSortKeyRanges(Ls.symbolInstances.length,zf.sortKey),Ls.symbolInstances.emplaceBack(Nd.x,Nd.y,bm.right>=0?bm.right:-1,bm.center>=0?bm.center:-1,bm.left>=0?bm.left:-1,bm.vertical||-1,q_,Hk,YO,s3,l3,u3,c3,f3,h3,d3,p3,pl,GO,Uk,$O,KO,Gk,0,Bk,Wk,Vk,Cp)}(fi,g0,n3,jo,Zi,Pc,va,fi.layers[0],fi.collisionBoxArray,oa.index,oa.sourceLayerIndex,fi.index,cv,rg,p0,ls,ym,ng,hv,Sp,oa,zu,io,dh,ca)};if(zl==="line")for(var Sy=0,D_=yO(oa.geometry,0,0,8192,8192);Sy1){var I_=jq(Ey,d0,jo.vertical||Kh,Zi,24,_y);I_&&ig(Ey,I_)}}else if(oa.type==="Polygon")for(var Uo=0,M_=eg(oa.geometry,0);Uo=Ur.maxzoom||Ur.visibility!=="none"&&(be(Or,this.zoom,qe),(zt[Ur.id]=Ur.createBucket({index:Be.bucketLayerIDs.length,layers:Or,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:se,sourceID:this.source})).populate(oe,hr,this.tileID.canonical),Be.bucketLayerIDs.push(Or.map(function(tn){return tn.id})))}}}var fr=S.mapObject(hr.glyphDependencies,function(tn){return Object.keys(tn).map(Number)});Object.keys(fr).length?Ye.send("getGlyphs",{uid:this.uid,stacks:fr},function(tn,ln){Ge||(Ge=tn,It=ln,sn.call(yt))}):It={};var An=Object.keys(hr.iconDependencies);An.length?Ye.send("getImages",{icons:An,source:this.source,tileID:this.tileID,type:"icons"},function(tn,ln){Ge||(Ge=tn,lr=ln,sn.call(yt))}):lr={};var Mn=Object.keys(hr.patternDependencies);function sn(){if(Ge)return ot(Ge);if(It&&lr&&Ht){var tn=new Se(It),ln=new S.ImageAtlas(lr,Ht);for(var ti in zt){var Yo=zt[ti];Yo instanceof S.SymbolBucket?(be(Yo.layers,this.zoom,qe),S.performSymbolLayout(Yo,It,tn.positions,lr,ln.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):Yo.hasPattern&&(Yo instanceof S.LineBucket||Yo instanceof S.FillBucket||Yo instanceof S.FillExtrusionBucket)&&(be(Yo.layers,this.zoom,qe),Yo.addFeatures(hr,this.tileID.canonical,ln.patternPositions))}this.status="done",ot(null,{buckets:S.values(zt).filter(function(zs){return!zs.isEmpty()}),featureIndex:Be,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:tn.image,imageAtlas:ln,glyphMap:this.returnDependencies?It:null,iconMap:this.returnDependencies?lr:null,glyphPositions:this.returnDependencies?tn.positions:null})}}Mn.length?Ye.send("getImages",{icons:Mn,source:this.source,tileID:this.tileID,type:"patterns"},function(tn,ln){Ge||(Ge=tn,Ht=ln,sn.call(yt))}):Ht={},sn.call(this)};var B=function(Ee,Ie,qe,Ye){this.actor=Ee,this.layerIndex=Ie,this.availableImages=qe,this.loadVectorData=Ye||Ue,this.loading={},this.loaded={}};B.prototype.loadTile=function(Ee,Ie){var qe=this,Ye=Ee.uid;this.loading||(this.loading={});var ot=!!(Ee&&Ee.request&&Ee.request.collectResourceTiming)&&new S.RequestPerformance(Ee.request),yt=this.loading[Ye]=new ye(Ee);yt.abort=this.loadVectorData(Ee,function(mt,Be){if(delete qe.loading[Ye],mt||!Be)return yt.status="done",qe.loaded[Ye]=yt,Ie(mt);var Ge=Be.rawData,It={};Be.expires&&(It.expires=Be.expires),Be.cacheControl&&(It.cacheControl=Be.cacheControl);var lr={};if(ot){var Ht=ot.finish();Ht&&(lr.resourceTiming=JSON.parse(JSON.stringify(Ht)))}yt.vectorTile=Be.vectorTile,yt.parse(Be.vectorTile,qe.layerIndex,qe.availableImages,qe.actor,function(zt,hr){if(zt||!hr)return Ie(zt);Ie(null,S.extend({rawTileData:Ge.slice(0)},hr,It,lr))}),qe.loaded=qe.loaded||{},qe.loaded[Ye]=yt})},B.prototype.reloadTile=function(Ee,Ie){var qe=this,Ye=this.loaded,ot=Ee.uid,yt=this;if(Ye&&Ye[ot]){var mt=Ye[ot];mt.showCollisionBoxes=Ee.showCollisionBoxes;var Be=function(Ge,It){var lr=mt.reloadCallback;lr&&(delete mt.reloadCallback,mt.parse(mt.vectorTile,yt.layerIndex,qe.availableImages,yt.actor,lr)),Ie(Ge,It)};mt.status==="parsing"?mt.reloadCallback=Be:mt.status==="done"&&(mt.vectorTile?mt.parse(mt.vectorTile,this.layerIndex,this.availableImages,this.actor,Be):Be())}},B.prototype.abortTile=function(Ee,Ie){var qe=this.loading,Ye=Ee.uid;qe&&qe[Ye]&&qe[Ye].abort&&(qe[Ye].abort(),delete qe[Ye]),Ie()},B.prototype.removeTile=function(Ee,Ie){var qe=this.loaded,Ye=Ee.uid;qe&&qe[Ye]&&delete qe[Ye],Ie()};var re=S.window.ImageBitmap,N=function(){this.loaded={}};function $(Ee,Ie){if(Ee.length!==0){V(Ee[0],Ie);for(var qe=1;qe=Math.abs(Be)?qe-Ge+Be:Be-Ge+qe,qe=Ge}qe+Ye>=0!=!!Ie&&Ee.reverse()}N.prototype.loadTile=function(Ee,Ie){var qe=Ee.uid,Ye=Ee.encoding,ot=Ee.rawImageData,yt=re&&ot instanceof re?this.getImageData(ot):ot,mt=new S.DEMData(qe,yt,Ye);this.loaded=this.loaded||{},this.loaded[qe]=mt,Ie(null,mt)},N.prototype.getImageData=function(Ee){this.offscreenCanvas&&this.offscreenCanvasContext||(this.offscreenCanvas=new OffscreenCanvas(Ee.width,Ee.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext("2d")),this.offscreenCanvas.width=Ee.width,this.offscreenCanvas.height=Ee.height,this.offscreenCanvasContext.drawImage(Ee,0,0,Ee.width,Ee.height);var Ie=this.offscreenCanvasContext.getImageData(-1,-1,Ee.width+2,Ee.height+2);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),new S.RGBAImage({width:Ie.width,height:Ie.height},Ie.data)},N.prototype.removeTile=function(Ee){var Ie=this.loaded,qe=Ee.uid;Ie&&Ie[qe]&&delete Ie[qe]};var H=S.vectorTile.VectorTileFeature.prototype.toGeoJSON,X=function(Ee){this._feature=Ee,this.extent=S.EXTENT,this.type=Ee.type,this.properties=Ee.tags,"id"in Ee&&!isNaN(Ee.id)&&(this.id=parseInt(Ee.id,10))};X.prototype.loadGeometry=function(){if(this._feature.type===1){for(var Ee=[],Ie=0,qe=this._feature.geometry;Ie>31}function ir(Ee,Ie){for(var qe=Ee.loadGeometry(),Ye=Ee.type,ot=0,yt=0,mt=qe.length,Be=0;Be>1;(function se(oe,_e,Ke,dt,Kt,tr){for(;Kt>dt;){if(Kt-dt>600){var Or=Kt-dt+1,Ur=Ke-dt+1,fr=Math.log(Or),An=.5*Math.exp(2*fr/3),Mn=.5*Math.sqrt(fr*An*(Or-An)/Or)*(Ur-Or/2<0?-1:1);se(oe,_e,Ke,Math.max(dt,Math.floor(Ke-Ur*An/Or+Mn)),Math.min(Kt,Math.floor(Ke+(Or-Ur)*An/Or+Mn)),tr)}var sn=_e[2*Ke+tr],tn=dt,ln=Kt;for(Et(oe,_e,dt,Ke),_e[2*Kt+tr]>sn&&Et(oe,_e,dt,Kt);tnsn;)ln--}_e[2*dt+tr]===sn?Et(oe,_e,dt,ln):Et(oe,_e,++ln,Kt),ln<=Ke&&(dt=ln+1),Ke<=ln&&(Kt=ln-1)}})(lr,Ht,Fe,hr,Ae,He%2),It(lr,Ht,zt,hr,Fe-1,He+1),It(lr,Ht,zt,Fe+1,Ae,He+1)}})(mt,Be,Ye,0,mt.length-1,0)};Wt.prototype.range=function(Ee,Ie,qe,Ye){return function(ot,yt,mt,Be,Ge,It,lr){for(var Ht,zt,hr=[0,ot.length-1,0],Ae=[];hr.length;){var He=hr.pop(),Fe=hr.pop(),se=hr.pop();if(Fe-se<=lr)for(var oe=se;oe<=Fe;oe++)zt=yt[2*oe+1],(Ht=yt[2*oe])>=mt&&Ht<=Ge&&zt>=Be&&zt<=It&&Ae.push(ot[oe]);else{var _e=Math.floor((se+Fe)/2);zt=yt[2*_e+1],(Ht=yt[2*_e])>=mt&&Ht<=Ge&&zt>=Be&&zt<=It&&Ae.push(ot[_e]);var Ke=(He+1)%2;(He===0?mt<=Ht:Be<=zt)&&(hr.push(se),hr.push(_e-1),hr.push(Ke)),(He===0?Ge>=Ht:It>=zt)&&(hr.push(_e+1),hr.push(Fe),hr.push(Ke))}}return Ae}(this.ids,this.coords,Ee,Ie,qe,Ye,this.nodeSize)},Wt.prototype.within=function(Ee,Ie,qe){return function(Ye,ot,yt,mt,Be,Ge){for(var It=[0,Ye.length-1,0],lr=[],Ht=Be*Be;It.length;){var zt=It.pop(),hr=It.pop(),Ae=It.pop();if(hr-Ae<=Ge)for(var He=Ae;He<=hr;He++)he(ot[2*He],ot[2*He+1],yt,mt)<=Ht&&lr.push(Ye[He]);else{var Fe=Math.floor((Ae+hr)/2),se=ot[2*Fe],oe=ot[2*Fe+1];he(se,oe,yt,mt)<=Ht&&lr.push(Ye[Fe]);var _e=(zt+1)%2;(zt===0?yt-Be<=se:mt-Be<=oe)&&(It.push(Ae),It.push(Fe-1),It.push(_e)),(zt===0?yt+Be>=se:mt+Be>=oe)&&(It.push(Fe+1),It.push(hr),It.push(_e))}}return lr}(this.ids,this.coords,Ee,Ie,qe,this.nodeSize)};var ft={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:function(Ee){return Ee}},qt=function(Ee){this.options=pt(Object.create(ft),Ee),this.trees=new Array(this.options.maxZoom+1)};function Bt(Ee,Ie,qe,Ye,ot){return{x:Ee,y:Ie,zoom:1/0,id:qe,parentId:-1,numPoints:Ye,properties:ot}}function vr(Ee,Ie){var qe=Ee.geometry.coordinates,Ye=qe[1];return{x:Er(qe[0]),y:et(Ye),zoom:1/0,index:Ie,parentId:-1}}function _r(Ee){return{type:"Feature",id:Ee.id,properties:Dr(Ee),geometry:{type:"Point",coordinates:[(Ye=Ee.x,360*(Ye-.5)),(Ie=Ee.y,qe=(180-360*Ie)*Math.PI/180,360*Math.atan(Math.exp(qe))/Math.PI-90)]}};var Ie,qe,Ye}function Dr(Ee){var Ie=Ee.numPoints,qe=Ie>=1e4?Math.round(Ie/1e3)+"k":Ie>=1e3?Math.round(Ie/100)/10+"k":Ie;return pt(pt({},Ee.properties),{cluster:!0,cluster_id:Ee.id,point_count:Ie,point_count_abbreviated:qe})}function Er(Ee){return Ee/360+.5}function et(Ee){var Ie=Math.sin(Ee*Math.PI/180),qe=.5-.25*Math.log((1+Ie)/(1-Ie))/Math.PI;return qe<0?0:qe>1?1:qe}function pt(Ee,Ie){for(var qe in Ie)Ee[qe]=Ie[qe];return Ee}function er(Ee){return Ee.x}function Lr(Ee){return Ee.y}function Ii(Ee,Ie,qe,Ye,ot,yt){var mt=ot-qe,Be=yt-Ye;if(mt!==0||Be!==0){var Ge=((Ee-qe)*mt+(Ie-Ye)*Be)/(mt*mt+Be*Be);Ge>1?(qe=ot,Ye=yt):Ge>0&&(qe+=mt*Ge,Ye+=Be*Ge)}return(mt=Ee-qe)*mt+(Be=Ie-Ye)*Be}function jr(Ee,Ie,qe,Ye){var ot={id:Ee===void 0?null:Ee,type:Ie,geometry:qe,tags:Ye,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return function(yt){var mt=yt.geometry,Be=yt.type;if(Be==="Point"||Be==="MultiPoint"||Be==="LineString")Zn(yt,mt);else if(Be==="Polygon"||Be==="MultiLineString")for(var Ge=0;Ge0&&(mt+=Ye?(ot*It-Ge*yt)/2:Math.sqrt(Math.pow(Ge-ot,2)+Math.pow(It-yt,2))),ot=Ge,yt=It}var lr=Ie.length-3;Ie[2]=1,function Ht(zt,hr,Ae,He){for(var Fe,se=He,oe=Ae-hr>>1,_e=Ae-hr,Ke=zt[hr],dt=zt[hr+1],Kt=zt[Ae],tr=zt[Ae+1],Or=hr+3;Orse)Fe=Or,se=Ur;else if(Ur===se){var fr=Math.abs(Or-oe);fr<_e&&(Fe=Or,_e=fr)}}se>He&&(Fe-hr>3&&Ht(zt,hr,Fe,He),zt[Fe+2]=se,Ae-Fe>3&&Ht(zt,Fe,Ae,He))}(Ie,0,lr,qe),Ie[lr+2]=1,Ie.size=Math.abs(mt),Ie.start=0,Ie.end=Ie.size}function an(Ee,Ie,qe,Ye){for(var ot=0;ot1?1:qe}function qn(Ee,Ie,qe,Ye,ot,yt,mt,Be){if(Ye/=Ie,yt>=(qe/=Ie)&&mt=Ye)return null;for(var Ge=[],It=0;It=qe&&Ae=Ye)){var He=[];if(zt==="Point"||zt==="MultiPoint")xi(Ht,He,qe,Ye,ot);else if(zt==="LineString")xo(Ht,He,qe,Ye,ot,!1,Be.lineMetrics);else if(zt==="MultiLineString")Je(Ht,He,qe,Ye,ot,!1);else if(zt==="Polygon")Je(Ht,He,qe,Ye,ot,!0);else if(zt==="MultiPolygon")for(var Fe=0;Fe=qe&&mt<=Ye&&(Ie.push(Ee[yt]),Ie.push(Ee[yt+1]),Ie.push(Ee[yt+2]))}}function xo(Ee,Ie,qe,Ye,ot,yt,mt){for(var Be,Ge,It=_i(Ee),lr=ot===0?Pt:nr,Ht=Ee.start,zt=0;ztqe&&(Ge=lr(It,hr,Ae,Fe,se,qe),mt&&(It.start=Ht+Be*Ge)):oe>Ye?_e=qe&&(Ge=lr(It,hr,Ae,Fe,se,qe),Ke=!0),_e>Ye&&oe<=Ye&&(Ge=lr(It,hr,Ae,Fe,se,Ye),Ke=!0),!yt&&Ke&&(mt&&(It.end=Ht+Be*Ge),Ie.push(It),It=_i(Ee)),mt&&(Ht+=Be)}var dt=Ee.length-3;hr=Ee[dt],Ae=Ee[dt+1],He=Ee[dt+2],(oe=ot===0?hr:Ae)>=qe&&oe<=Ye&&st(It,hr,Ae,He),dt=It.length-3,yt&&dt>=3&&(It[dt]!==It[0]||It[dt+1]!==It[1])&&st(It,It[0],It[1],It[2]),It.length&&Ie.push(It)}function _i(Ee){var Ie=[];return Ie.size=Ee.size,Ie.start=Ee.start,Ie.end=Ee.end,Ie}function Je(Ee,Ie,qe,Ye,ot,yt){for(var mt=0;mtmt.maxX&&(mt.maxX=lr),Ht>mt.maxY&&(mt.maxY=Ht)}return mt}function Nr(Ee,Ie,qe,Ye){var ot=Ie.geometry,yt=Ie.type,mt=[];if(yt==="Point"||yt==="MultiPoint")for(var Be=0;Be0&&Ie.size<(ot?mt:Ye))qe.numPoints+=Ie.length/3;else{for(var Be=[],Ge=0;Gemt)&&(qe.numSimplified++,Be.push(Ie[Ge]),Be.push(Ie[Ge+1])),qe.numPoints++;ot&&function(It,lr){for(var Ht=0,zt=0,hr=It.length,Ae=hr-2;zt0===lr)for(zt=0,hr=It.length;zt
24)throw new Error("maxZoom should be in the 0-24 range");if(Ie.promoteId&&Ie.generateId)throw new Error("promoteId and generateId cannot be used together.");var Ye=function(ot,yt){var mt=[];if(ot.type==="FeatureCollection")for(var Be=0;Be=Ye;It--){var lr=+Date.now();Be=this._cluster(Be,It),this.trees[It]=new Wt(Be,er,Lr,yt,Float32Array),qe&&console.log("z%d: %d clusters in %dms",It,Be.length,+Date.now()-lr)}return qe&&console.timeEnd("total time"),this},qt.prototype.getClusters=function(Ee,Ie){var qe=((Ee[0]+180)%360+360)%360-180,Ye=Math.max(-90,Math.min(90,Ee[1])),ot=Ee[2]===180?180:((Ee[2]+180)%360+360)%360-180,yt=Math.max(-90,Math.min(90,Ee[3]));if(Ee[2]-Ee[0]>=360)qe=-180,ot=180;else if(qe>ot){var mt=this.getClusters([qe,Ye,180,yt],Ie),Be=this.getClusters([-180,Ye,ot,yt],Ie);return mt.concat(Be)}for(var Ge=this.trees[this._limitZoom(Ie)],It=[],lr=0,Ht=Ge.range(Er(qe),et(yt),Er(ot),et(Ye));lrIe&&(zt+=He.numPoints||1)}if(zt>=yt){for(var Fe=Ge.x*Ht,se=Ge.y*Ht,oe=ot&&Ht>1?this._map(Ge,!0):null,_e=(Be<<5)+(Ie+1)+this.points.length,Ke=0,dt=lr;Ke1)for(var Or=0,Ur=lr;Or>5},qt.prototype._getOriginZoom=function(Ee){return(Ee-this.points.length)%32},qt.prototype._map=function(Ee,Ie){if(Ee.numPoints)return Ie?pt({},Ee.properties):Ee.properties;var qe=this.points[Ee.index].properties,Ye=this.options.map(qe);return Ie&&Ye===qe?pt({},Ye):Ye},wn.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},wn.prototype.splitTile=function(Ee,Ie,qe,Ye,ot,yt,mt){for(var Be=[Ee,Ie,qe,Ye],Ge=this.options,It=Ge.debug;Be.length;){Ye=Be.pop(),qe=Be.pop(),Ie=Be.pop(),Ee=Be.pop();var lr=1<1&&console.time("creation"),zt=this.tiles[Ht]=Bn(Ee,Ie,qe,Ye,Ge),this.tileCoords.push({z:Ie,x:qe,y:Ye}),It)){It>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",Ie,qe,Ye,zt.numFeatures,zt.numPoints,zt.numSimplified),console.timeEnd("creation"));var hr="z"+Ie;this.stats[hr]=(this.stats[hr]||0)+1,this.total++}if(zt.source=Ee,ot){if(Ie===Ge.maxZoom||Ie===ot)continue;var Ae=1<1&&console.time("clipping");var He,Fe,se,oe,_e,Ke,dt=.5*Ge.buffer/Ge.extent,Kt=.5-dt,tr=.5+dt,Or=1+dt;He=Fe=se=oe=null,_e=qn(Ee,lr,qe-dt,qe+tr,0,zt.minX,zt.maxX,Ge),Ke=qn(Ee,lr,qe+Kt,qe+Or,0,zt.minX,zt.maxX,Ge),Ee=null,_e&&(He=qn(_e,lr,Ye-dt,Ye+tr,1,zt.minY,zt.maxY,Ge),Fe=qn(_e,lr,Ye+Kt,Ye+Or,1,zt.minY,zt.maxY,Ge),_e=null),Ke&&(se=qn(Ke,lr,Ye-dt,Ye+tr,1,zt.minY,zt.maxY,Ge),oe=qn(Ke,lr,Ye+Kt,Ye+Or,1,zt.minY,zt.maxY,Ge),Ke=null),It>1&&console.timeEnd("clipping"),Be.push(He||[],Ie+1,2*qe,2*Ye),Be.push(Fe||[],Ie+1,2*qe,2*Ye+1),Be.push(se||[],Ie+1,2*qe+1,2*Ye),Be.push(oe||[],Ie+1,2*qe+1,2*Ye+1)}}},wn.prototype.getTile=function(Ee,Ie,qe){var Ye=this.options,ot=Ye.extent,yt=Ye.debug;if(Ee<0||Ee>24)return null;var mt=1<1&&console.log("drilling down to z%d-%d-%d",Ee,Ie,qe);for(var Ge,It=Ee,lr=Ie,Ht=qe;!Ge&&It>0;)It--,lr=Math.floor(lr/2),Ht=Math.floor(Ht/2),Ge=this.tiles[wi(It,lr,Ht)];return Ge&&Ge.source?(yt>1&&console.log("found parent tile z%d-%d-%d",It,lr,Ht),yt>1&&console.time("drilling down"),this.splitTile(Ge.source,It,lr,Ht,Ee,Ie,qe),yt>1&&console.timeEnd("drilling down"),this.tiles[Be]?jn(this.tiles[Be],ot):null):null};var Ha=function(Ee){function Ie(qe,Ye,ot,yt){Ee.call(this,qe,Ye,ot,ji),yt&&(this.loadGeoJSON=yt)}return Ee&&(Ie.__proto__=Ee),(Ie.prototype=Object.create(Ee&&Ee.prototype)).constructor=Ie,Ie.prototype.loadData=function(qe,Ye){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),this._pendingCallback=Ye,this._pendingLoadDataParams=qe,this._state&&this._state!=="Idle"?this._state="NeedsLoadData":(this._state="Coalescing",this._loadData())},Ie.prototype._loadData=function(){var qe=this;if(this._pendingCallback&&this._pendingLoadDataParams){var Ye=this._pendingCallback,ot=this._pendingLoadDataParams;delete this._pendingCallback,delete this._pendingLoadDataParams;var yt=!!(ot&&ot.request&&ot.request.collectResourceTiming)&&new S.RequestPerformance(ot.request);this.loadGeoJSON(ot,function(mt,Be){if(mt||!Be)return Ye(mt);if(typeof Be!="object")return Ye(new Error("Input data given to '"+ot.source+"' is not a valid GeoJSON object."));(function zt(hr,Ae){var He,Fe=hr&&hr.type;if(Fe==="FeatureCollection")for(He=0;He"u"||typeof document>"u"?"not a browser":Array.prototype&&Array.prototype.every&&Array.prototype.filter&&Array.prototype.forEach&&Array.prototype.indexOf&&Array.prototype.lastIndexOf&&Array.prototype.map&&Array.prototype.some&&Array.prototype.reduce&&Array.prototype.reduceRight&&Array.isArray?Function.prototype&&Function.prototype.bind?Object.keys&&Object.create&&Object.getPrototypeOf&&Object.getOwnPropertyNames&&Object.isSealed&&Object.isFrozen&&Object.isExtensible&&Object.getOwnPropertyDescriptor&&Object.defineProperty&&Object.defineProperties&&Object.seal&&Object.freeze&&Object.preventExtensions?"JSON"in window&&"parse"in JSON&&"stringify"in JSON?function(){if(!("Worker"in window&&"Blob"in window&&"URL"in window))return!1;var Q,ae,we=new Blob([""],{type:"text/javascript"}),Oe=URL.createObjectURL(we);try{ae=new Worker(Oe),Q=!0}catch{Q=!1}return ae&&ae.terminate(),URL.revokeObjectURL(Oe),Q}()?"Uint8ClampedArray"in window?ArrayBuffer.isView?function(){var Q=document.createElement("canvas");Q.width=Q.height=1;var ae=Q.getContext("2d");if(!ae)return!1;var we=ae.getImageData(0,0,1,1);return we&&we.width===Q.width}()?(A[K=F&&F.failIfMajorPerformanceCaveat]===void 0&&(A[K]=function(Q){var ae=function(Oe){var We=document.createElement("canvas"),Ve=Object.create(w.webGLContextAttributes);return Ve.failIfMajorPerformanceCaveat=Oe,We.probablySupportsContext?We.probablySupportsContext("webgl",Ve)||We.probablySupportsContext("experimental-webgl",Ve):We.supportsContext?We.supportsContext("webgl",Ve)||We.supportsContext("experimental-webgl",Ve):We.getContext("webgl",Ve)||We.getContext("experimental-webgl",Ve)}(Q);if(!ae)return!1;var we=ae.createShader(ae.VERTEX_SHADER);return!(!we||ae.isContextLost())&&(ae.shaderSource(we,"void main() {}"),ae.compileShader(we),ae.getShaderParameter(we,ae.COMPILE_STATUS)===!0)}(K)),A[K]?void 0:"insufficient WebGL support"):"insufficient Canvas/getImageData support":"insufficient ArrayBuffer support":"insufficient Uint8ClampedArray support":"insufficient worker support":"insufficient JSON support":"insufficient Object support":"insufficient Function support":"insufficent Array support";var K}v.exports?v.exports=w:window&&(window.mapboxgl=window.mapboxgl||{},window.mapboxgl.supported=w,window.mapboxgl.notSupportedReason=b);var A={};w.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0}}),le={create:function(v,w,b){var A=S.window.document.createElement(v);return w!==void 0&&(A.className=w),b&&b.appendChild(A),A},createNS:function(v,w){return S.window.document.createElementNS(v,w)}},ge=S.window.document&&S.window.document.documentElement.style;function Se(v){if(!ge)return v[0];for(var w=0;w=0?0:v.button},le.remove=function(v){v.parentNode&&v.parentNode.removeChild(v)};var V=function(v){function w(){v.call(this),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new S.RGBAImage({width:1,height:1}),this.dirty=!0}return v&&(w.__proto__=v),(w.prototype=Object.create(v&&v.prototype)).constructor=w,w.prototype.isLoaded=function(){return this.loaded},w.prototype.setLoaded=function(b){if(this.loaded!==b&&(this.loaded=b,b)){for(var A=0,F=this.requestors;A=0?1.2:1))}function j(v,w,b,A,F,K,Q){for(var ae=0;ae65535)we(new Error("glyphs > 65535 not supported"));else if(Ve.ranges[ht])we(null,{stack:Oe,id:We,glyph:Xe});else{var lt=Ve.requests[ht];lt||(lt=Ve.requests[ht]=[],Ze.loadGlyphRange(Oe,ht,b.url,b.requestManager,function(vt,nt){if(nt){for(var bt in nt)b._doesCharSupportLocalGlyph(+bt)||(Ve.glyphs[+bt]=nt[+bt]);Ve.ranges[ht]=!0}for(var kt=0,Nt=lt;kt1&&(ae=v[++Q]);var Oe=Math.abs(we-ae.left),We=Math.abs(we-ae.right),Ve=Math.min(Oe,We),Xe=void 0,ht=F/b*(A+1);if(ae.isDash){var lt=A-Math.abs(ht);Xe=Math.sqrt(Ve*Ve+lt*lt)}else Xe=A-Math.sqrt(Ve*Ve+ht*ht);this.data[K+we]=Math.max(0,Math.min(255,Xe+128))}},Ft.prototype.addRegularDash=function(v){for(var w=v.length-1;w>=0;--w){var b=v[w],A=v[w+1];b.zeroLength?v.splice(w,1):A&&A.isDash===b.isDash&&(A.left=b.left,v.splice(w,1))}var F=v[0],K=v[v.length-1];F.isDash===K.isDash&&(F.left=K.left-this.width,K.right=F.right+this.width);for(var Q=this.width*this.nextRow,ae=0,we=v[ae],Oe=0;Oe1&&(we=v[++ae]);var We=Math.abs(Oe-we.left),Ve=Math.abs(Oe-we.right),Xe=Math.min(We,Ve);this.data[Q+Oe]=Math.max(0,Math.min(255,(we.isDash?Xe:-Xe)+128))}},Ft.prototype.addDash=function(v,w){var b=w?7:0,A=2*b+1;if(this.nextRow+A>this.height)return S.warnOnce("LineAtlas out of space"),null;for(var F=0,K=0;K=b&&v.x=A&&v.y0&&(Oe[new S.OverscaledTileID(b.overscaledZ,Q,A.z,K,A.y-1).key]={backfilled:!1},Oe[new S.OverscaledTileID(b.overscaledZ,b.wrap,A.z,A.x,A.y-1).key]={backfilled:!1},Oe[new S.OverscaledTileID(b.overscaledZ,we,A.z,ae,A.y-1).key]={backfilled:!1}),A.y+10&&(F.resourceTiming=b._resourceTiming,b._resourceTiming=[]),b.fire(new S.Event("data",F))}})},w.prototype.onAdd=function(b){this.map=b,this.load()},w.prototype.setData=function(b){var A=this;return this._data=b,this.fire(new S.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(F){if(F)A.fire(new S.ErrorEvent(F));else{var K={dataType:"source",sourceDataType:"content"};A._collectResourceTiming&&A._resourceTiming&&A._resourceTiming.length>0&&(K.resourceTiming=A._resourceTiming,A._resourceTiming=[]),A.fire(new S.Event("data",K))}}),this},w.prototype.getClusterExpansionZoom=function(b,A){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:b,source:this.id},A),this},w.prototype.getClusterChildren=function(b,A){return this.actor.send("geojson.getClusterChildren",{clusterId:b,source:this.id},A),this},w.prototype.getClusterLeaves=function(b,A,F,K){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:b,limit:A,offset:F},K),this},w.prototype._updateWorkerData=function(b){var A=this;this._loaded=!1;var F=S.extend({},this.workerOptions),K=this._data;typeof K=="string"?(F.request=this.map._requestManager.transformRequest(S.browser.resolveURL(K),S.ResourceType.Source),F.request.collectResourceTiming=this._collectResourceTiming):F.data=JSON.stringify(K),this.actor.send(this.type+".loadData",F,function(Q,ae){A._removed||ae&&ae.abandoned||(A._loaded=!0,ae&&ae.resourceTiming&&ae.resourceTiming[A.id]&&(A._resourceTiming=ae.resourceTiming[A.id].slice(0)),A.actor.send(A.type+".coalesce",{source:F.source},null),b(Q))})},w.prototype.loaded=function(){return this._loaded},w.prototype.loadTile=function(b,A){var F=this,K=b.actor?"reloadTile":"loadTile";b.actor=this.actor,b.request=this.actor.send(K,{type:this.type,uid:b.uid,tileID:b.tileID,zoom:b.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:S.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId},function(Q,ae){return delete b.request,b.unloadVectorData(),b.aborted?A(null):Q?A(Q):(b.loadVectorData(ae,F.map.painter,K==="reloadTile"),A(null))})},w.prototype.abortTile=function(b){b.request&&(b.request.cancel(),delete b.request),b.aborted=!0},w.prototype.unloadTile=function(b){b.unloadVectorData(),this.actor.send("removeTile",{uid:b.uid,type:this.type,source:this.id})},w.prototype.onRemove=function(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})},w.prototype.serialize=function(){return S.extend({},this._options,{type:this.type,data:this._data})},w.prototype.hasTransition=function(){return!1},w}(S.Evented),rt=S.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),he=function(v){function w(b,A,F,K){v.call(this),this.id=b,this.dispatcher=F,this.coordinates=A.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(K),this.options=A}return v&&(w.__proto__=v),(w.prototype=Object.create(v&&v.prototype)).constructor=w,w.prototype.load=function(b,A){var F=this;this._loaded=!1,this.fire(new S.Event("dataloading",{dataType:"source"})),this.url=this.options.url,S.getImage(this.map._requestManager.transformRequest(this.url,S.ResourceType.Image),function(K,Q){F._loaded=!0,K?F.fire(new S.ErrorEvent(K)):Q&&(F.image=Q,b&&(F.coordinates=b),A&&A(),F._finishLoading())})},w.prototype.loaded=function(){return this._loaded},w.prototype.updateImage=function(b){var A=this;return this.image&&b.url?(this.options.url=b.url,this.load(b.coordinates,function(){A.texture=null}),this):this},w.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new S.Event("data",{dataType:"source",sourceDataType:"metadata"})))},w.prototype.onAdd=function(b){this.map=b,this.load()},w.prototype.setCoordinates=function(b){var A=this;this.coordinates=b;var F=b.map(S.MercatorCoordinate.fromLngLat);this.tileID=function(Q){for(var ae=1/0,we=1/0,Oe=-1/0,We=-1/0,Ve=0,Xe=Q;VeA.end(0)?this.fire(new S.ErrorEvent(new S.ValidationError("sources."+this.id,null,"Playback for this video can be set only between the "+A.start(0)+" and "+A.end(0)+"-second mark."))):this.video.currentTime=b}},w.prototype.getVideo=function(){return this.video},w.prototype.onAdd=function(b){this.map||(this.map=b,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},w.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||this.video.readyState<2)){var b=this.map.painter.context,A=b.gl;for(var F in this.boundsBuffer||(this.boundsBuffer=b.createVertexBuffer(this._boundsArray,rt.members)),this.boundsSegments||(this.boundsSegments=S.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(A.LINEAR,A.CLAMP_TO_EDGE),A.texSubImage2D(A.TEXTURE_2D,0,0,0,A.RGBA,A.UNSIGNED_BYTE,this.video)):(this.texture=new S.Texture(b,this.video,A.RGBA),this.texture.bind(A.LINEAR,A.CLAMP_TO_EDGE)),this.tiles){var K=this.tiles[F];K.state!=="loaded"&&(K.state="loaded",K.texture=this.texture)}}},w.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},w.prototype.hasTransition=function(){return this.video&&!this.video.paused},w}(he),ze=function(v){function w(b,A,F,K){v.call(this,b,A,F,K),A.coordinates?Array.isArray(A.coordinates)&&A.coordinates.length===4&&!A.coordinates.some(function(Q){return!Array.isArray(Q)||Q.length!==2||Q.some(function(ae){return typeof ae!="number"})})||this.fire(new S.ErrorEvent(new S.ValidationError("sources."+b,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new S.ErrorEvent(new S.ValidationError("sources."+b,null,'missing required property "coordinates"'))),A.animate&&typeof A.animate!="boolean"&&this.fire(new S.ErrorEvent(new S.ValidationError("sources."+b,null,'optional "animate" property must be a boolean value'))),A.canvas?typeof A.canvas=="string"||A.canvas instanceof S.window.HTMLCanvasElement||this.fire(new S.ErrorEvent(new S.ValidationError("sources."+b,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new S.ErrorEvent(new S.ValidationError("sources."+b,null,'missing required property "canvas"'))),this.options=A,this.animate=A.animate===void 0||A.animate}return v&&(w.__proto__=v),(w.prototype=Object.create(v&&v.prototype)).constructor=w,w.prototype.load=function(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof S.window.HTMLCanvasElement?this.options.canvas:S.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new S.ErrorEvent(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())},w.prototype.getCanvas=function(){return this.canvas},w.prototype.onAdd=function(b){this.map=b,this.load(),this.canvas&&this.animate&&this.play()},w.prototype.onRemove=function(){this.pause()},w.prototype.prepare=function(){var b=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,b=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,b=!0),!this._hasInvalidDimensions()&&Object.keys(this.tiles).length!==0){var A=this.map.painter.context,F=A.gl;for(var K in this.boundsBuffer||(this.boundsBuffer=A.createVertexBuffer(this._boundsArray,rt.members)),this.boundsSegments||(this.boundsSegments=S.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(b||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new S.Texture(A,this.canvas,F.RGBA,{premultiply:!0}),this.tiles){var Q=this.tiles[K];Q.state!=="loaded"&&(Q.state="loaded",Q.texture=this.texture)}}},w.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},w.prototype.hasTransition=function(){return this._playing},w.prototype._hasInvalidDimensions=function(){for(var b=0,A=[this.canvas.width,this.canvas.height];bthis.max){var Q=this._getAndRemoveByKey(this.order[0]);Q&&this.onRemove(Q)}return this},vr.prototype.has=function(v){return v.wrapped().key in this.data},vr.prototype.getAndRemove=function(v){return this.has(v)?this._getAndRemoveByKey(v.wrapped().key):null},vr.prototype._getAndRemoveByKey=function(v){var w=this.data[v].shift();return w.timeout&&clearTimeout(w.timeout),this.data[v].length===0&&delete this.data[v],this.order.splice(this.order.indexOf(v),1),w.value},vr.prototype.getByKey=function(v){var w=this.data[v];return w?w[0].value:null},vr.prototype.get=function(v){return this.has(v)?this.data[v.wrapped().key][0].value:null},vr.prototype.remove=function(v,w){if(!this.has(v))return this;var b=v.wrapped().key,A=w===void 0?0:this.data[b].indexOf(w),F=this.data[b][A];return this.data[b].splice(A,1),F.timeout&&clearTimeout(F.timeout),this.data[b].length===0&&delete this.data[b],this.onRemove(F.value),this.order.splice(this.order.indexOf(b),1),this},vr.prototype.setMaxSize=function(v){for(this.max=v;this.order.length>this.max;){var w=this._getAndRemoveByKey(this.order[0]);w&&this.onRemove(w)}return this},vr.prototype.filter=function(v){var w=[];for(var b in this.data)for(var A=0,F=this.data[b];A1||(Math.abs(We)>1&&(Math.abs(We+Xe)===1?We+=Xe:Math.abs(We-Xe)===1&&(We-=Xe)),Oe.dem&&we.dem&&(we.dem.backfillBorder(Oe.dem,We,Ve),we.neighboringTiles&&we.neighboringTiles[ht]&&(we.neighboringTiles[ht].backfilled=!0)))}},w.prototype.getTile=function(b){return this.getTileByID(b.key)},w.prototype.getTileByID=function(b){return this._tiles[b]},w.prototype._retainLoadedChildren=function(b,A,F,K){for(var Q in this._tiles){var ae=this._tiles[Q];if(!(K[Q]||!ae.hasData()||ae.tileID.overscaledZ<=A||ae.tileID.overscaledZ>F)){for(var we=ae.tileID;ae&&ae.tileID.overscaledZ>A+1;){var Oe=ae.tileID.scaledTo(ae.tileID.overscaledZ-1);(ae=this._tiles[Oe.key])&&ae.hasData()&&(we=Oe)}for(var We=we;We.overscaledZ>A;)if(b[(We=We.scaledTo(We.overscaledZ-1)).key]){K[we.key]=we;break}}}},w.prototype.findLoadedParent=function(b,A){if(b.key in this._loadedParentTiles){var F=this._loadedParentTiles[b.key];return F&&F.tileID.overscaledZ>=A?F:null}for(var K=b.overscaledZ-1;K>=A;K--){var Q=b.scaledTo(K),ae=this._getLoadedTile(Q);if(ae)return ae}},w.prototype._getLoadedTile=function(b){var A=this._tiles[b.key];return A&&A.hasData()?A:this._cache.getByKey(b.wrapped().key)},w.prototype.updateCacheSize=function(b){var A=Math.ceil(b.width/this._source.tileSize)+1,F=Math.ceil(b.height/this._source.tileSize)+1,K=Math.floor(A*F*5),Q=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,K):K;this._cache.setMaxSize(Q)},w.prototype.handleWrapJump=function(b){var A=Math.round((b-(this._prevLng===void 0?b:this._prevLng))/360);if(this._prevLng=b,A){var F={};for(var K in this._tiles){var Q=this._tiles[K];Q.tileID=Q.tileID.unwrapTo(Q.tileID.wrap+A),F[Q.tileID.key]=Q}for(var ae in this._tiles=F,this._timers)clearTimeout(this._timers[ae]),delete this._timers[ae];for(var we in this._tiles)this._setTileReloadTimer(we,this._tiles[we])}},w.prototype.update=function(b){var A=this;if(this.transform=b,this._sourceLoaded&&!this._paused){var F;this.updateCacheSize(b),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used?this._source.tileID?F=b.getVisibleUnwrappedCoordinates(this._source.tileID).map(function(mr){return new S.OverscaledTileID(mr.canonical.z,mr.wrap,mr.canonical.z,mr.canonical.x,mr.canonical.y)}):(F=b.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(F=F.filter(function(mr){return A._source.hasTile(mr)}))):F=[];var K=b.coveringZoomLevel(this._source),Q=Math.max(K-w.maxOverzooming,this._source.minzoom),ae=Math.max(K+w.maxUnderzooming,this._source.minzoom),we=this._updateRetainedTiles(F,K);if(lr(this._source.type)){for(var Oe={},We={},Ve=0,Xe=Object.keys(we);Vethis._source.maxzoom){var bt=vt.children(this._source.maxzoom)[0],kt=this.getTile(bt);if(kt&&kt.hasData()){F[bt.key]=bt;continue}}else{var Nt=vt.children(this._source.maxzoom);if(F[Nt[0].key]&&F[Nt[1].key]&&F[Nt[2].key]&&F[Nt[3].key])continue}for(var rr=nt.wasRequested(),Jt=vt.overscaledZ-1;Jt>=Q;--Jt){var Zt=vt.scaledTo(Jt);if(K[Zt.key]||(K[Zt.key]=!0,!(nt=this.getTile(Zt))&&rr&&(nt=this._addTile(Zt)),nt&&(F[Zt.key]=Zt,rr=nt.wasRequested(),nt.hasData())))break}}}return F},w.prototype._updateLoadedParentTileCache=function(){for(var b in this._loadedParentTiles={},this._tiles){for(var A=[],F=void 0,K=this._tiles[b].tileID;K.overscaledZ>0;){if(K.key in this._loadedParentTiles){F=this._loadedParentTiles[K.key];break}A.push(K.key);var Q=K.scaledTo(K.overscaledZ-1);if(F=this._getLoadedTile(Q))break;K=Q}for(var ae=0,we=A;ae0||(A.hasData()&&A.state!=="reloading"?this._cache.add(A.tileID,A,A.getExpiryTimeout()):(A.aborted=!0,this._abortTile(A),this._unloadTile(A))))},w.prototype.clearTiles=function(){for(var b in this._shouldReloadOnResume=!1,this._paused=!1,this._tiles)this._removeTile(b);this._cache.reset()},w.prototype.tilesIn=function(b,A,F){var K=this,Q=[],ae=this.transform;if(!ae)return Q;for(var we=F?ae.getCameraQueryGeometry(b):b,Oe=b.map(function(Jt){return ae.pointCoordinate(Jt)}),We=we.map(function(Jt){return ae.pointCoordinate(Jt)}),Ve=this.getIds(),Xe=1/0,ht=1/0,lt=-1/0,vt=-1/0,nt=0,bt=We;nt=0&&Kr[1].y+br>=0){var Gr=Oe.map(function(pn){return mr.getTilePoint(pn)}),dn=We.map(function(pn){return mr.getTilePoint(pn)});Q.push({tile:Zt,tileID:mr,queryGeometry:Gr,cameraQueryGeometry:dn,scale:yr})}}},rr=0;rr=S.browser.now())return!0}return!1},w.prototype.setFeatureState=function(b,A,F){this._state.updateState(b=b||"_geojsonTileLayer",A,F)},w.prototype.removeFeatureState=function(b,A,F){this._state.removeFeatureState(b=b||"_geojsonTileLayer",A,F)},w.prototype.getFeatureState=function(b,A){return this._state.getState(b=b||"_geojsonTileLayer",A)},w.prototype.setDependencies=function(b,A,F){var K=this._tiles[b];K&&K.setDependencies(A,F)},w.prototype.reloadTilesForDependencies=function(b,A){for(var F in this._tiles)this._tiles[F].hasDependency(b,A)&&this._reloadTile(F,"reloading");this._cache.filter(function(K){return!K.hasDependency(b,A)})},w}(S.Evented);function It(v,w){var b=Math.abs(2*v.wrap)-+(v.wrap<0),A=Math.abs(2*w.wrap)-+(w.wrap<0);return v.overscaledZ-w.overscaledZ||A-b||w.canonical.y-v.canonical.y||w.canonical.x-v.canonical.x}function lr(v){return v==="raster"||v==="image"||v==="video"}function Ht(){return new S.window.Worker(mf.workerUrl)}Ge.maxOverzooming=10,Ge.maxUnderzooming=3;var zt="mapboxgl_preloaded_worker_pool",hr=function(){this.active={}};hr.prototype.acquire=function(v){if(!this.workers)for(this.workers=[];this.workers.length0?(A-K)/Q:0;return this.points[F].mult(1-ae).add(this.points[w].mult(ae))};var Mn=function(v,w,b){var A=this.boxCells=[],F=this.circleCells=[];this.xCellCount=Math.ceil(v/b),this.yCellCount=Math.ceil(w/b);for(var K=0;K=-w[0]&&b<=w[0]&&A>=-w[1]&&A<=w[1]}function zs(v,w,b,A,F,K,Q,ae){var we=A?v.textSizeData:v.iconSizeData,Oe=S.evaluateSizeForZoom(we,b.transform.zoom),We=[256/b.width*2+1,256/b.height*2+1],Ve=A?v.text.dynamicLayoutVertexArray:v.icon.dynamicLayoutVertexArray;Ve.clear();for(var Xe=v.lineVertexArray,ht=A?v.text.placedSymbolArray:v.icon.placedSymbolArray,lt=b.transform.width/b.transform.height,vt=!1,nt=0;ntMath.abs(b.x-w.x)*A?{useVertical:!0}:(v===S.WritingMode.vertical?w.yb.x)?{needsFlipping:!0}:null}function Aa(v,w,b,A,F,K,Q,ae,we,Oe,We,Ve,Xe,ht){var lt,vt=w/24,nt=v.lineOffsetX*vt,bt=v.lineOffsetY*vt;if(v.numGlyphs>1){var kt=v.glyphStartIndex+v.numGlyphs,Nt=v.lineStartIndex,rr=v.lineStartIndex+v.lineLength,Jt=ii(vt,ae,nt,bt,b,We,Ve,v,we,K,Xe);if(!Jt)return{notEnoughRoom:!0};var Zt=ln(Jt.first.point,Q).point,mr=ln(Jt.last.point,Q).point;if(A&&!b){var yr=Mi(v.writingMode,Zt,mr,ht);if(yr)return yr}lt=[Jt.first];for(var br=v.glyphStartIndex+1;br0?pn.point:Ql(Ve,dn,Kr,1,F),Yr=Mi(v.writingMode,Kr,Un,ht);if(Yr)return Yr}var Rn=Qi(vt*ae.getoffsetX(v.glyphStartIndex),nt,bt,b,We,Ve,v.segment,v.lineStartIndex,v.lineStartIndex+v.lineLength,we,K,Xe);if(!Rn)return{notEnoughRoom:!0};lt=[Rn]}for(var Yn=0,Pn=lt;Yn0?1:-1,lt=0;A&&(ht*=-1,lt=Math.PI),ht<0&&(lt+=Math.PI);for(var vt=ht>0?ae+Q:ae+Q+1,nt=F,bt=F,kt=0,Nt=0,rr=Math.abs(Xe),Jt=[];kt+Nt<=rr;){if((vt+=ht)=we)return null;if(bt=nt,Jt.push(nt),(nt=Ve[vt])===void 0){var Zt=new S.Point(Oe.getx(vt),Oe.gety(vt)),mr=ln(Zt,We);if(mr.signedDistanceFromCamera>0)nt=Ve[vt]=mr.point;else{var yr=vt-ht;nt=Ql(kt===0?K:new S.Point(Oe.getx(yr),Oe.gety(yr)),Zt,bt,rr-kt+1,We)}}kt+=Nt,Nt=bt.dist(nt)}var br=(rr-kt)/Nt,Kr=nt.sub(bt),Gr=Kr.mult(br)._add(bt);Gr._add(Kr._unit()._perp()._mult(b*ht));var dn=lt+Math.atan2(nt.y-bt.y,nt.x-bt.x);return Jt.push(Gr),{point:Gr,angle:dn,path:Jt}}Mn.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},Mn.prototype.insert=function(v,w,b,A,F){this._forEachCell(w,b,A,F,this._insertBoxCell,this.boxUid++),this.boxKeys.push(v),this.bboxes.push(w),this.bboxes.push(b),this.bboxes.push(A),this.bboxes.push(F)},Mn.prototype.insertCircle=function(v,w,b,A){this._forEachCell(w-A,b-A,w+A,b+A,this._insertCircleCell,this.circleUid++),this.circleKeys.push(v),this.circles.push(w),this.circles.push(b),this.circles.push(A)},Mn.prototype._insertBoxCell=function(v,w,b,A,F,K){this.boxCells[F].push(K)},Mn.prototype._insertCircleCell=function(v,w,b,A,F,K){this.circleCells[F].push(K)},Mn.prototype._query=function(v,w,b,A,F,K){if(b<0||v>this.width||A<0||w>this.height)return!F&&[];var Q=[];if(v<=0&&w<=0&&this.width<=b&&this.height<=A){if(F)return!0;for(var ae=0;ae0:Q},Mn.prototype._queryCircle=function(v,w,b,A,F){var K=v-b,Q=v+b,ae=w-b,we=w+b;if(Q<0||K>this.width||we<0||ae>this.height)return!A&&[];var Oe=[];return this._forEachCell(K,ae,Q,we,this._queryCellCircle,Oe,{hitTest:A,circle:{x:v,y:w,radius:b},seenUids:{box:{},circle:{}}},F),A?Oe.length>0:Oe},Mn.prototype.query=function(v,w,b,A,F){return this._query(v,w,b,A,!1,F)},Mn.prototype.hitTest=function(v,w,b,A,F){return this._query(v,w,b,A,!0,F)},Mn.prototype.hitTestCircle=function(v,w,b,A){return this._queryCircle(v,w,b,!0,A)},Mn.prototype._queryCell=function(v,w,b,A,F,K,Q,ae){var we=Q.seenUids,Oe=this.boxCells[F];if(Oe!==null)for(var We=this.bboxes,Ve=0,Xe=Oe;Ve=We[lt+0]&&A>=We[lt+1]&&(!ae||ae(this.boxKeys[ht]))){if(Q.hitTest)return K.push(!0),!0;K.push({key:this.boxKeys[ht],x1:We[lt],y1:We[lt+1],x2:We[lt+2],y2:We[lt+3]})}}}var vt=this.circleCells[F];if(vt!==null)for(var nt=this.circles,bt=0,kt=vt;btQ*Q+ae*ae},Mn.prototype._circleAndRectCollide=function(v,w,b,A,F,K,Q){var ae=(K-A)/2,we=Math.abs(v-(A+ae));if(we>ae+b)return!1;var Oe=(Q-F)/2,We=Math.abs(w-(F+Oe));if(We>Oe+b)return!1;if(we<=ae||We<=Oe)return!0;var Ve=we-ae,Xe=We-Oe;return Ve*Ve+Xe*Xe<=b*b};var Xs=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function _o(v,w){for(var b=0;b=1;Un--)pn.push(Gr.path[Un]);for(var Yr=1;Yr0){for(var Fn=pn[0].clone(),$n=pn[0].clone(),bn=1;bn=yr.x&&$n.x<=br.x&&Fn.y>=yr.y&&$n.y<=br.y?[pn]:$n.xbr.x||$n.ybr.y?[]:S.clipLine([pn],yr.x,yr.y,br.x,br.y)}for(var Sn=0,Fa=Pn;Sn=this.screenRightBoundary||A<100||w>this.screenBottomBoundary},No.prototype.isInsideGrid=function(v,w,b,A){return b>=0&&v=0&&w0?(this.prevPlacement&&this.prevPlacement.variableOffsets[Ve.crossTileID]&&this.prevPlacement.placements[Ve.crossTileID]&&this.prevPlacement.placements[Ve.crossTileID].text&&(vt=this.prevPlacement.variableOffsets[Ve.crossTileID].anchor),this.variableOffsets[Ve.crossTileID]={textOffset:nt,width:b,height:A,anchor:v,textBoxScale:F,prevAnchor:vt},this.markUsedJustification(Xe,v,Ve,ht),Xe.allowVerticalPlacement&&(this.markUsedOrientation(Xe,ht,Ve),this.placedOrientations[Ve.crossTileID]=ht),{shift:bt,placedGlyphBoxes:kt}):void 0},Pi.prototype.placeLayerBucketPart=function(v,w,b){var A=this,F=v.parameters,K=F.bucket,Q=F.layout,ae=F.posMatrix,we=F.textLabelPlaneMatrix,Oe=F.labelToScreenMatrix,We=F.textPixelRatio,Ve=F.holdingForFade,Xe=F.collisionBoxArray,ht=F.partiallyEvaluatedTextSize,lt=F.collisionGroup,vt=Q.get("text-optional"),nt=Q.get("icon-optional"),bt=Q.get("text-allow-overlap"),kt=Q.get("icon-allow-overlap"),Nt=Q.get("text-rotation-alignment")==="map",rr=Q.get("text-pitch-alignment")==="map",Jt=Q.get("icon-text-fit")!=="none",Zt=Q.get("symbol-z-order")==="viewport-y",mr=bt&&(kt||!K.hasIconData()||nt),yr=kt&&(bt||!K.hasTextData()||vt);!K.collisionArrays&&Xe&&K.deserializeCollisionBoxes(Xe);var br=function(Yr,Rn){if(!w[Yr.crossTileID])if(Ve)A.placements[Yr.crossTileID]=new Vu(!1,!1,!1);else{var Yn,Pn=!1,Fn=!1,$n=!0,bn=null,Sn={box:null,offscreen:null},Fa={box:null,offscreen:null},Io=null,ua=null,vs=0,Do=0,Mo=0;Rn.textFeatureIndex?vs=Rn.textFeatureIndex:Yr.useRuntimeCollisionCircles&&(vs=Yr.featureIndex),Rn.verticalTextFeatureIndex&&(Do=Rn.verticalTextFeatureIndex);var ys=Rn.textBox;if(ys){var rs=function(Ri){var Ol=S.WritingMode.horizontal;if(K.allowVerticalPlacement&&!Ri&&A.prevPlacement){var Hs=A.prevPlacement.placedOrientations[Yr.crossTileID];Hs&&(A.placedOrientations[Yr.crossTileID]=Hs,A.markUsedOrientation(K,Ol=Hs,Yr))}return Ol},fl=function(Ri,Ol){if(K.allowVerticalPlacement&&Yr.numVerticalGlyphVertices>0&&Rn.verticalTextBox)for(var Hs=0,Ff=K.writingModes;Hs0&&(bs=bs.filter(function(Ri){return Ri!==hl.anchor})).unshift(hl.anchor)}var Is=function(Ri,Ol,Hs){for(var Ff=Ri.x2-Ri.x1,mp=Ri.y2-Ri.y1,ki=Yr.textBoxScale,Xm=Jt&&!kt?Ol:null,ic={box:[],offscreen:!1},Kc=bt?2*bs.length:bs.length,Gc=0;Gc=bs.length,Yr,K,Hs,Xm);if(Il&&(ic=Il.placedGlyphBoxes)&&ic.box&&ic.box.length){Pn=!0,bn=Il.shift;break}}return ic};fl(function(){return Is(ys,Rn.iconBox,S.WritingMode.horizontal)},function(){var Ri=Rn.verticalTextBox;return K.allowVerticalPlacement&&!(Sn&&Sn.box&&Sn.box.length)&&Yr.numVerticalGlyphVertices>0&&Ri?Is(Ri,Rn.verticalIconBox,S.WritingMode.vertical):{box:null,offscreen:null}}),Sn&&(Pn=Sn.box,$n=Sn.offscreen);var Ru=rs(Sn&&Sn.box);if(!Pn&&A.prevPlacement){var Fu=A.prevPlacement.variableOffsets[Yr.crossTileID];Fu&&(A.variableOffsets[Yr.crossTileID]=Fu,A.markUsedJustification(K,Fu.anchor,Yr,Ru))}}else{var fu=function(Ri,Ol){var Hs=A.collisionIndex.placeCollisionBox(Ri,bt,We,ae,lt.predicate);return Hs&&Hs.box&&Hs.box.length&&(A.markUsedOrientation(K,Ol,Yr),A.placedOrientations[Yr.crossTileID]=Ol),Hs};fl(function(){return fu(ys,S.WritingMode.horizontal)},function(){var Ri=Rn.verticalTextBox;return K.allowVerticalPlacement&&Yr.numVerticalGlyphVertices>0&&Ri?fu(Ri,S.WritingMode.vertical):{box:null,offscreen:null}}),rs(Sn&&Sn.box&&Sn.box.length)}}if(Pn=(Yn=Sn)&&Yn.box&&Yn.box.length>0,$n=Yn&&Yn.offscreen,Yr.useRuntimeCollisionCircles){var hu=K.text.placedSymbolArray.get(Yr.centerJustifiedTextSymbolIndex),rc=S.evaluateSizeForFeature(K.textSizeData,ht,hu),tl=Q.get("text-padding");Io=A.collisionIndex.placeCollisionCircles(bt,hu,K.lineVertexArray,K.glyphOffsetArray,rc,ae,we,Oe,b,rr,lt.predicate,Yr.collisionCircleDiameter,tl),Pn=bt||Io.circles.length>0&&!Io.collisionDetected,$n=$n&&Io.offscreen}if(Rn.iconFeatureIndex&&(Mo=Rn.iconFeatureIndex),Rn.iconBox){var Id=function(Ri){var Ol=Jt&&bn?hs(Ri,bn.x,bn.y,Nt,rr,A.transform.angle):Ri;return A.collisionIndex.placeCollisionBox(Ol,kt,We,ae,lt.predicate)};Fn=Fa&&Fa.box&&Fa.box.length&&Rn.verticalIconBox?(ua=Id(Rn.verticalIconBox)).box.length>0:(ua=Id(Rn.iconBox)).box.length>0,$n=$n&&ua.offscreen}var nc=vt||Yr.numHorizontalGlyphVertices===0&&Yr.numVerticalGlyphVertices===0,Ki=nt||Yr.numIconVertices===0;if(nc||Ki?Ki?nc||(Fn=Fn&&Pn):Pn=Fn&&Pn:Fn=Pn=Fn&&Pn,Pn&&Yn&&Yn.box&&A.collisionIndex.insertCollisionBox(Yn.box,Q.get("text-ignore-placement"),K.bucketInstanceId,Fa&&Fa.box&&Do?Do:vs,lt.ID),Fn&&ua&&A.collisionIndex.insertCollisionBox(ua.box,Q.get("icon-ignore-placement"),K.bucketInstanceId,Mo,lt.ID),Io&&(Pn&&A.collisionIndex.insertCollisionCircles(Io.circles,Q.get("text-ignore-placement"),K.bucketInstanceId,vs,lt.ID),b)){var $c=K.bucketInstanceId,gf=A.collisionCircleArrays[$c];gf===void 0&&(gf=A.collisionCircleArrays[$c]=new uo);for(var ns=0;ns=0;--Gr){var dn=Kr[Gr];br(K.symbolInstances.get(dn),K.collisionArrays[dn])}else for(var pn=v.symbolInstanceStart;pn=0&&(v.text.placedSymbolArray.get(ae).crossTileID=F>=0&&ae!==F?0:b.crossTileID)}},Pi.prototype.markUsedOrientation=function(v,w,b){for(var A=w===S.WritingMode.horizontal||w===S.WritingMode.horizontalOnly?w:0,F=w===S.WritingMode.vertical?w:0,K=0,Q=[b.leftJustifiedTextSymbolIndex,b.centerJustifiedTextSymbolIndex,b.rightJustifiedTextSymbolIndex];K0,yr=A.placedOrientations[kt.crossTileID],br=yr===S.WritingMode.vertical,Kr=yr===S.WritingMode.horizontal||yr===S.WritingMode.horizontalOnly;if(Nt>0||rr>0){var Gr=Ts(Zt.text);ht(v.text,Nt,br?co:Gr),ht(v.text,rr,Kr?co:Gr);var dn=Zt.text.isHidden();[kt.rightJustifiedTextSymbolIndex,kt.centerJustifiedTextSymbolIndex,kt.leftJustifiedTextSymbolIndex].forEach(function(Sn){Sn>=0&&(v.text.placedSymbolArray.get(Sn).hidden=dn||br?1:0)}),kt.verticalPlacedTextSymbolIndex>=0&&(v.text.placedSymbolArray.get(kt.verticalPlacedTextSymbolIndex).hidden=dn||Kr?1:0);var pn=A.variableOffsets[kt.crossTileID];pn&&A.markUsedJustification(v,pn.anchor,kt,yr);var Un=A.placedOrientations[kt.crossTileID];Un&&(A.markUsedJustification(v,"left",kt,Un),A.markUsedOrientation(v,Un,kt))}if(mr){var Yr=Ts(Zt.icon),Rn=!(Ve&&kt.verticalPlacedIconSymbolIndex&&br);kt.placedIconSymbolIndex>=0&&(ht(v.icon,kt.numIconVertices,Rn?Yr:co),v.icon.placedSymbolArray.get(kt.placedIconSymbolIndex).hidden=Zt.icon.isHidden()),kt.verticalPlacedIconSymbolIndex>=0&&(ht(v.icon,kt.numVerticalIconVertices,Rn?co:Yr),v.icon.placedSymbolArray.get(kt.verticalPlacedIconSymbolIndex).hidden=Zt.icon.isHidden())}if(v.hasIconCollisionBoxData()||v.hasTextCollisionBoxData()){var Yn=v.collisionArrays[bt];if(Yn){var Pn=new S.Point(0,0);if(Yn.textBox||Yn.verticalTextBox){var Fn=!0;if(we){var $n=A.variableOffsets[Jt];$n?(Pn=qo($n.anchor,$n.width,$n.height,$n.textOffset,$n.textBoxScale),Oe&&Pn._rotate(We?A.transform.angle:-A.transform.angle)):Fn=!1}Yn.textBox&&yn(v.textCollisionBox.collisionVertexArray,Zt.text.placed,!Fn||br,Pn.x,Pn.y),Yn.verticalTextBox&&yn(v.textCollisionBox.collisionVertexArray,Zt.text.placed,!Fn||Kr,Pn.x,Pn.y)}var bn=Boolean(!Kr&&Yn.verticalIconBox);Yn.iconBox&&yn(v.iconCollisionBox.collisionVertexArray,Zt.icon.placed,bn,Ve?Pn.x:0,Ve?Pn.y:0),Yn.verticalIconBox&&yn(v.iconCollisionBox.collisionVertexArray,Zt.icon.placed,!bn,Ve?Pn.x:0,Ve?Pn.y:0)}}},vt=0;vtv},Pi.prototype.setStale=function(){this.stale=!0};var Vt=Math.pow(2,25),Hr=Math.pow(2,24),cn=Math.pow(2,17),On=Math.pow(2,16),Xn=Math.pow(2,9),ta=Math.pow(2,8),Oa=Math.pow(2,1);function Ts(v){if(v.opacity===0&&!v.placed)return 0;if(v.opacity===1&&v.placed)return 4294967295;var w=v.placed?1:0,b=Math.floor(127*v.opacity);return b*Vt+w*Hr+b*cn+w*On+b*Xn+w*ta+b*Oa+w}var co=0,Ja=function(v){this._sortAcrossTiles=v.layout.get("symbol-z-order")!=="viewport-y"&&v.layout.get("symbol-sort-key").constantOr(1)!==void 0,this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]};Ja.prototype.continuePlacement=function(v,w,b,A,F){for(var K=this._bucketParts;this._currentTileIndex2};this._currentPlacementIndex>=0;){var Q=w[v[this._currentPlacementIndex]],ae=this.placement.collisionIndex.transform.zoom;if(Q.type==="symbol"&&(!Q.minzoom||Q.minzoom<=ae)&&(!Q.maxzoom||Q.maxzoom>ae)){if(this._inProgressLayer||(this._inProgressLayer=new Ja(Q)),this._inProgressLayer.continuePlacement(b[Q.source],this.placement,this._showCollisionBoxes,Q,K))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},Su.prototype.commit=function(v){return this.placement.commit(v),this.placement};var ds=512/S.EXTENT/2,Sd=function(v,w,b){this.tileID=v,this.indexedSymbolInstances={},this.bucketInstanceId=b;for(var A=0;Av.overscaledZ)for(var ae in Q){var we=Q[ae];we.tileID.isChildOf(v)&&we.findMatches(w.symbolInstances,v,F)}else{var Oe=Q[v.scaledTo(Number(K)).key];Oe&&Oe.findMatches(w.symbolInstances,v,F)}}for(var We=0;We1?"@2x":"",Ve=S.getJSON(K.transformRequest(K.normalizeSpriteURL(F,We,".json"),S.ResourceType.SpriteJSON),function(lt,vt){Ve=null,Oe||(Oe=lt,ae=vt,ht())}),Xe=S.getImage(K.transformRequest(K.normalizeSpriteURL(F,We,".png"),S.ResourceType.SpriteImage),function(lt,vt){Xe=null,Oe||(Oe=lt,we=vt,ht())});function ht(){if(Oe)Q(Oe);else if(ae&&we){var lt=S.browser.getImageData(we),vt={};for(var nt in ae){var bt=ae[nt],kt=bt.width,Nt=bt.height,rr=bt.x,Jt=bt.y,Zt=bt.sdf,mr=bt.pixelRatio,yr=bt.stretchX,br=bt.stretchY,Kr=bt.content,Gr=new S.RGBAImage({width:kt,height:Nt});S.RGBAImage.copy(lt,Gr,{x:rr,y:Jt},{x:0,y:0},{width:kt,height:Nt}),vt[nt]={data:Gr,pixelRatio:mr,sdf:Zt,stretchX:yr,stretchY:br,content:Kr}}Q(null,vt)}}return{cancel:function(){Ve&&(Ve.cancel(),Ve=null),Xe&&(Xe.cancel(),Xe=null)}}}(b,this.map._requestManager,function(F,K){if(A._spriteRequest=null,F)A.fire(new S.ErrorEvent(F));else if(K)for(var Q in K)A.imageManager.addImage(Q,K[Q]);A.imageManager.setLoaded(!0),A._availableImages=A.imageManager.listImages(),A.dispatcher.broadcast("setImages",A._availableImages),A.fire(new S.Event("data",{dataType:"style"}))})},w.prototype._validateLayer=function(b){var A=this.sourceCaches[b.source];if(A){var F=b.sourceLayer;if(F){var K=A.getSource();(K.type==="geojson"||K.vectorLayerIds&&K.vectorLayerIds.indexOf(F)===-1)&&this.fire(new S.ErrorEvent(new Error('Source layer "'+F+'" does not exist on source "'+K.id+'" as specified by style layer "'+b.id+'"')))}}},w.prototype.loaded=function(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(var b in this.sourceCaches)if(!this.sourceCaches[b].loaded())return!1;return!!this.imageManager.isLoaded()},w.prototype._serializeLayers=function(b){for(var A=[],F=0,K=b;F0)throw new Error("Unimplemented: "+K.map(function(Q){return Q.command}).join(", ")+".");return F.forEach(function(Q){Q.command!=="setTransition"&&A[Q.command].apply(A,Q.args)}),this.stylesheet=b,!0},w.prototype.addImage=function(b,A){if(this.getImage(b))return this.fire(new S.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(b,A),this._afterImageUpdated(b)},w.prototype.updateImage=function(b,A){this.imageManager.updateImage(b,A)},w.prototype.getImage=function(b){return this.imageManager.getImage(b)},w.prototype.removeImage=function(b){if(!this.getImage(b))return this.fire(new S.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(b),this._afterImageUpdated(b)},w.prototype._afterImageUpdated=function(b){this._availableImages=this.imageManager.listImages(),this._changedImages[b]=!0,this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new S.Event("data",{dataType:"style"}))},w.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},w.prototype.addSource=function(b,A,F){var K=this;if(F===void 0&&(F={}),this._checkLoaded(),this.sourceCaches[b]!==void 0)throw new Error("There is already a source with this ID");if(!A.type)throw new Error("The type property must be defined, but only the following properties were given: "+Object.keys(A).join(", ")+".");if(!(["vector","raster","geojson","video","image"].indexOf(A.type)>=0&&this._validate(S.validateStyle.source,"sources."+b,A,null,F))){this.map&&this.map._collectResourceTiming&&(A.collectResourceTiming=!0);var Q=this.sourceCaches[b]=new Ge(b,A,this.dispatcher);Q.style=this,Q.setEventedParent(this,function(){return{isSourceLoaded:K.loaded(),source:Q.serialize(),sourceId:b}}),Q.onAdd(this.map),this._changed=!0}},w.prototype.removeSource=function(b){if(this._checkLoaded(),this.sourceCaches[b]===void 0)throw new Error("There is no source with this ID");for(var A in this._layers)if(this._layers[A].source===b)return this.fire(new S.ErrorEvent(new Error('Source "'+b+'" cannot be removed while layer "'+A+'" is using it.')));var F=this.sourceCaches[b];delete this.sourceCaches[b],delete this._updatedSources[b],F.fire(new S.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:b})),F.setEventedParent(null),F.clearTiles(),F.onRemove&&F.onRemove(this.map),this._changed=!0},w.prototype.setGeoJSONSourceData=function(b,A){this._checkLoaded(),this.sourceCaches[b].getSource().setData(A),this._changed=!0},w.prototype.getSource=function(b){return this.sourceCaches[b]&&this.sourceCaches[b].getSource()},w.prototype.addLayer=function(b,A,F){F===void 0&&(F={}),this._checkLoaded();var K=b.id;if(this.getLayer(K))this.fire(new S.ErrorEvent(new Error('Layer with id "'+K+'" already exists on this map')));else{var Q;if(b.type==="custom"){if(js(this,S.validateCustomStyleLayer(b)))return;Q=S.createStyleLayer(b)}else{if(typeof b.source=="object"&&(this.addSource(K,b.source),b=S.clone$1(b),b=S.extend(b,{source:K})),this._validate(S.validateStyle.layer,"layers."+K,b,{arrayIndex:-1},F))return;Q=S.createStyleLayer(b),this._validateLayer(Q),Q.setEventedParent(this,{layer:{id:K}}),this._serializedLayers[Q.id]=Q.serialize()}var ae=A?this._order.indexOf(A):this._order.length;if(A&&ae===-1)this.fire(new S.ErrorEvent(new Error('Layer with id "'+A+'" does not exist on this map.')));else{if(this._order.splice(ae,0,K),this._layerOrderChanged=!0,this._layers[K]=Q,this._removedLayers[K]&&Q.source&&Q.type!=="custom"){var we=this._removedLayers[K];delete this._removedLayers[K],we.type!==Q.type?this._updatedSources[Q.source]="clear":(this._updatedSources[Q.source]="reload",this.sourceCaches[Q.source].pause())}this._updateLayer(Q),Q.onAdd&&Q.onAdd(this.map)}}},w.prototype.moveLayer=function(b,A){if(this._checkLoaded(),this._changed=!0,this._layers[b]){if(b!==A){var F=this._order.indexOf(b);this._order.splice(F,1);var K=A?this._order.indexOf(A):this._order.length;A&&K===-1?this.fire(new S.ErrorEvent(new Error('Layer with id "'+A+'" does not exist on this map.'))):(this._order.splice(K,0,b),this._layerOrderChanged=!0)}}else this.fire(new S.ErrorEvent(new Error("The layer '"+b+"' does not exist in the map's style and cannot be moved.")))},w.prototype.removeLayer=function(b){this._checkLoaded();var A=this._layers[b];if(A){A.setEventedParent(null);var F=this._order.indexOf(b);this._order.splice(F,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[b]=A,delete this._layers[b],delete this._serializedLayers[b],delete this._updatedLayers[b],delete this._updatedPaintProps[b],A.onRemove&&A.onRemove(this.map)}else this.fire(new S.ErrorEvent(new Error("The layer '"+b+"' does not exist in the map's style and cannot be removed.")))},w.prototype.getLayer=function(b){return this._layers[b]},w.prototype.hasLayer=function(b){return b in this._layers},w.prototype.setLayerZoomRange=function(b,A,F){this._checkLoaded();var K=this.getLayer(b);K?K.minzoom===A&&K.maxzoom===F||(A!=null&&(K.minzoom=A),F!=null&&(K.maxzoom=F),this._updateLayer(K)):this.fire(new S.ErrorEvent(new Error("The layer '"+b+"' does not exist in the map's style and cannot have zoom extent.")))},w.prototype.setFilter=function(b,A,F){F===void 0&&(F={}),this._checkLoaded();var K=this.getLayer(b);if(K){if(!S.deepEqual(K.filter,A))return A==null?(K.filter=void 0,void this._updateLayer(K)):void(this._validate(S.validateStyle.filter,"layers."+K.id+".filter",A,null,F)||(K.filter=S.clone$1(A),this._updateLayer(K)))}else this.fire(new S.ErrorEvent(new Error("The layer '"+b+"' does not exist in the map's style and cannot be filtered.")))},w.prototype.getFilter=function(b){return S.clone$1(this.getLayer(b).filter)},w.prototype.setLayoutProperty=function(b,A,F,K){K===void 0&&(K={}),this._checkLoaded();var Q=this.getLayer(b);Q?S.deepEqual(Q.getLayoutProperty(A),F)||(Q.setLayoutProperty(A,F,K),this._updateLayer(Q)):this.fire(new S.ErrorEvent(new Error("The layer '"+b+"' does not exist in the map's style and cannot be styled.")))},w.prototype.getLayoutProperty=function(b,A){var F=this.getLayer(b);if(F)return F.getLayoutProperty(A);this.fire(new S.ErrorEvent(new Error("The layer '"+b+"' does not exist in the map's style.")))},w.prototype.setPaintProperty=function(b,A,F,K){K===void 0&&(K={}),this._checkLoaded();var Q=this.getLayer(b);Q?S.deepEqual(Q.getPaintProperty(A),F)||(Q.setPaintProperty(A,F,K)&&this._updateLayer(Q),this._changed=!0,this._updatedPaintProps[b]=!0):this.fire(new S.ErrorEvent(new Error("The layer '"+b+"' does not exist in the map's style and cannot be styled.")))},w.prototype.getPaintProperty=function(b,A){return this.getLayer(b).getPaintProperty(A)},w.prototype.setFeatureState=function(b,A){this._checkLoaded();var F=b.source,K=b.sourceLayer,Q=this.sourceCaches[F];if(Q!==void 0){var ae=Q.getSource().type;ae==="geojson"&&K?this.fire(new S.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):ae!=="vector"||K?(b.id===void 0&&this.fire(new S.ErrorEvent(new Error("The feature id parameter must be provided."))),Q.setFeatureState(K,b.id,A)):this.fire(new S.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new S.ErrorEvent(new Error("The source '"+F+"' does not exist in the map's style.")))},w.prototype.removeFeatureState=function(b,A){this._checkLoaded();var F=b.source,K=this.sourceCaches[F];if(K!==void 0){var Q=K.getSource().type,ae=Q==="vector"?b.sourceLayer:void 0;Q!=="vector"||ae?A&&typeof b.id!="string"&&typeof b.id!="number"?this.fire(new S.ErrorEvent(new Error("A feature id is required to remove its specific state property."))):K.removeFeatureState(ae,b.id,A):this.fire(new S.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new S.ErrorEvent(new Error("The source '"+F+"' does not exist in the map's style.")))},w.prototype.getFeatureState=function(b){this._checkLoaded();var A=b.source,F=b.sourceLayer,K=this.sourceCaches[A];if(K!==void 0){if(K.getSource().type!=="vector"||F)return b.id===void 0&&this.fire(new S.ErrorEvent(new Error("The feature id parameter must be provided."))),K.getFeatureState(F,b.id);this.fire(new S.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new S.ErrorEvent(new Error("The source '"+A+"' does not exist in the map's style.")))},w.prototype.getTransition=function(){return S.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},w.prototype.serialize=function(){return S.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,sources:S.mapObject(this.sourceCaches,function(b){return b.serialize()}),layers:this._serializeLayers(this._order)},function(b){return b!==void 0})},w.prototype._updateLayer=function(b){this._updatedLayers[b.id]=!0,b.source&&!this._updatedSources[b.source]&&this.sourceCaches[b.source].getSource().type!=="raster"&&(this._updatedSources[b.source]="reload",this.sourceCaches[b.source].pause()),this._changed=!0},w.prototype._flattenAndSortRenderedFeatures=function(b){for(var A=this,F=function(yr){return A._layers[yr].type==="fill-extrusion"},K={},Q=[],ae=this._order.length-1;ae>=0;ae--){var we=this._order[ae];if(F(we)){K[we]=ae;for(var Oe=0,We=b;Oe=0;vt--){var nt=this._order[vt];if(F(nt))for(var bt=Q.length-1;bt>=0;bt--){var kt=Q[bt].feature;if(K[kt.layer.id] 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}","attribute vec2 a_pos;attribute vec2 a_anchor_pos;attribute vec2 a_extrude;attribute vec2 a_placed;attribute vec2 a_shift;uniform mat4 u_matrix;uniform vec2 u_extrude_scale;uniform float u_camera_to_center_distance;varying float v_placed;varying float v_notUsed;void main() {vec4 projectedPoint=u_matrix*vec4(a_anchor_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);gl_Position=u_matrix*vec4(a_pos,0.0,1.0);gl_Position.xy+=(a_extrude+a_shift)*u_extrude_scale*gl_Position.w*collision_perspective_ratio;v_placed=a_placed.x;v_notUsed=a_placed.y;}"),cf=$i("varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;void main() {float alpha=0.5*min(v_perspective_ratio,1.0);float stroke_radius=0.9*max(v_perspective_ratio,1.0);float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);gl_FragColor=color*alpha*opacity_t;}","attribute vec2 a_pos;attribute float a_radius;attribute vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;vec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);vec4 rayEnd =u_inv_matrix*vec4(screenPos, 1.0,1.0);rayStart.xyz/=rayStart.w;rayEnd.xyz /=rayEnd.w;highp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);return mix(rayStart.xyz,rayEnd.xyz,t);}void main() {vec2 quadCenterPos=a_pos;float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;vec3 tilePos=toTilePosition(quadCenterPos);vec4 clipPos=u_matrix*vec4(tilePos,1.0);highp float camera_to_anchor_distance=clipPos.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_perspective_ratio=collision_perspective_ratio;v_collision=collision;gl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),Ph=$i("uniform highp vec4 u_color;uniform sampler2D u_overlay;varying vec2 v_uv;void main() {vec4 overlay_color=texture2D(u_overlay,v_uv);gl_FragColor=mix(u_color,overlay_color,overlay_color.a);}","attribute vec2 a_pos;varying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=u_matrix*vec4(a_pos*u_overlay_scale,0,1);}"),eh=$i(`#pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float opacity gl_FragColor=color*opacity; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,`attribute vec2 a_pos;uniform mat4 u_matrix; #pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float opacity gl_Position=u_matrix*vec4(a_pos,0,1);}`),fo=$i(`varying vec2 v_pos; #pragma mapbox: define highp vec4 outline_color #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize highp vec4 outline_color #pragma mapbox: initialize lowp float opacity float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,`attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos; #pragma mapbox: define highp vec4 outline_color #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize highp vec4 outline_color #pragma mapbox: initialize lowp float opacity gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`),Tu=$i(`uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos; #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to void main() { #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump vec4 pattern_from #pragma mapbox: initialize mediump vec4 pattern_to vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=mix(color1,color2,u_fade)*alpha*opacity; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,`uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos; #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to #pragma mapbox: define lowp float pixel_ratio_from #pragma mapbox: define lowp float pixel_ratio_to void main() { #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump vec4 pattern_from #pragma mapbox: initialize mediump vec4 pattern_to #pragma mapbox: initialize lowp float pixel_ratio_from #pragma mapbox: initialize lowp float pixel_ratio_to vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`),th=$i(`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b; #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to void main() { #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump vec4 pattern_from #pragma mapbox: initialize mediump vec4 pattern_to vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_fade)*opacity; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b; #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to #pragma mapbox: define lowp float pixel_ratio_from #pragma mapbox: define lowp float pixel_ratio_to void main() { #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump vec4 pattern_from #pragma mapbox: initialize mediump vec4 pattern_to #pragma mapbox: initialize lowp float pixel_ratio_from #pragma mapbox: initialize lowp float pixel_ratio_to vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}`),Ma=$i(`varying vec4 v_color;void main() {gl_FragColor=v_color; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,`uniform mat4 u_matrix;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec4 v_color; #pragma mapbox: define highp float base #pragma mapbox: define highp float height #pragma mapbox: define highp vec4 color void main() { #pragma mapbox: initialize highp float base #pragma mapbox: initialize highp float height #pragma mapbox: initialize highp vec4 color vec3 normal=a_normal_ed.xyz;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);gl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}`),ff=$i(`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting; #pragma mapbox: define lowp float base #pragma mapbox: define lowp float height #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to #pragma mapbox: define lowp float pixel_ratio_from #pragma mapbox: define lowp float pixel_ratio_to void main() { #pragma mapbox: initialize lowp float base #pragma mapbox: initialize lowp float height #pragma mapbox: initialize mediump vec4 pattern_from #pragma mapbox: initialize mediump vec4 pattern_to #pragma mapbox: initialize lowp float pixel_ratio_from #pragma mapbox: initialize lowp float pixel_ratio_to vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);gl_FragColor=mixedColor*v_lighting; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting; #pragma mapbox: define lowp float base #pragma mapbox: define lowp float height #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to #pragma mapbox: define lowp float pixel_ratio_from #pragma mapbox: define lowp float pixel_ratio_to void main() { #pragma mapbox: initialize lowp float base #pragma mapbox: initialize lowp float height #pragma mapbox: initialize mediump vec4 pattern_from #pragma mapbox: initialize mediump vec4 pattern_to #pragma mapbox: initialize lowp float pixel_ratio_from #pragma mapbox: initialize lowp float pixel_ratio_to vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);float z=t > 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0 ? a_pos : vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}`),fa=$i(`#ifdef GL_ES precision highp float; #endif uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/pow(2.0,exaggeration+(19.2562-u_zoom));gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,"uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}"),Cf=$i(`uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent; #define PI 3.141592653589793 void main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,"uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}"),$u=$i(`uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale; #pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);gl_FragColor=color*(alpha*opacity); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,` #define scale 0.015873016 attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_linesofar; #pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define mediump float gapwidth #pragma mapbox: define lowp float offset #pragma mapbox: define mediump float width void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump float gapwidth #pragma mapbox: initialize lowp float offset #pragma mapbox: initialize mediump float width float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}`),Oo=$i(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp vec2 v_uv; #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture2D(u_image,v_uv);gl_FragColor=color*(alpha*opacity); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,` #define scale 0.015873016 attribute vec2 a_pos_normal;attribute vec4 a_data;attribute float a_uv_x;attribute float a_split_index;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp vec2 v_uv; #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define mediump float gapwidth #pragma mapbox: define lowp float offset #pragma mapbox: define mediump float width void main() { #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump float gapwidth #pragma mapbox: initialize lowp float offset #pragma mapbox: initialize mediump float width float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}`),yc=$i(`uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width; #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to #pragma mapbox: define lowp float pixel_ratio_from #pragma mapbox: define lowp float pixel_ratio_to #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize mediump vec4 pattern_from #pragma mapbox: initialize mediump vec4 pattern_to #pragma mapbox: initialize lowp float pixel_ratio_from #pragma mapbox: initialize lowp float pixel_ratio_to #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,` #define scale 0.015873016 #define LINE_DISTANCE_SCALE 2.0 attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width; #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp float offset #pragma mapbox: define mediump float gapwidth #pragma mapbox: define mediump float width #pragma mapbox: define lowp float floorwidth #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to #pragma mapbox: define lowp float pixel_ratio_from #pragma mapbox: define lowp float pixel_ratio_to void main() { #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize lowp float offset #pragma mapbox: initialize mediump float gapwidth #pragma mapbox: initialize mediump float width #pragma mapbox: initialize lowp float floorwidth #pragma mapbox: initialize mediump vec4 pattern_from #pragma mapbox: initialize mediump vec4 pattern_to #pragma mapbox: initialize lowp float pixel_ratio_from #pragma mapbox: initialize lowp float pixel_ratio_to float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`),ru=$i(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale; #pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define mediump float width #pragma mapbox: define lowp float floorwidth void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump float width #pragma mapbox: initialize lowp float floorwidth float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture2D(u_image,v_tex_a).a;float sdfdist_b=texture2D(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);gl_FragColor=color*(alpha*opacity); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,` #define scale 0.015873016 #define LINE_DISTANCE_SCALE 2.0 attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale; #pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define mediump float gapwidth #pragma mapbox: define lowp float offset #pragma mapbox: define mediump float width #pragma mapbox: define lowp float floorwidth void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump float gapwidth #pragma mapbox: initialize lowp float offset #pragma mapbox: initialize mediump float width #pragma mapbox: initialize lowp float floorwidth float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}`),bc=$i(`uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,"uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}"),xc=$i(`uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity; #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize lowp float opacity lowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;varying vec2 v_tex;varying float v_fade_opacity; #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize lowp float opacity vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? camera_to_anchor_distance/u_camera_to_center_distance : u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0),0.0,1.0);v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;v_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));}`),Td=$i(`#define SDF_PX 8.0 uniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;varying vec2 v_data0;varying vec3 v_data1; #pragma mapbox: define highp vec4 fill_color #pragma mapbox: define highp vec4 halo_color #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp float halo_width #pragma mapbox: define lowp float halo_blur void main() { #pragma mapbox: initialize highp vec4 fill_color #pragma mapbox: initialize highp vec4 halo_color #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize lowp float halo_width #pragma mapbox: initialize lowp float halo_blur float EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;varying vec2 v_data0;varying vec3 v_data1; #pragma mapbox: define highp vec4 fill_color #pragma mapbox: define highp vec4 halo_color #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp float halo_width #pragma mapbox: define lowp float halo_blur void main() { #pragma mapbox: initialize highp vec4 fill_color #pragma mapbox: initialize highp vec4 halo_color #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize lowp float halo_width #pragma mapbox: initialize lowp float halo_blur vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? camera_to_anchor_distance/u_camera_to_center_distance : u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}`),up=$i(`#define SDF_PX 8.0 #define SDF 1.0 #define ICON 0.0 uniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;varying vec4 v_data0;varying vec4 v_data1; #pragma mapbox: define highp vec4 fill_color #pragma mapbox: define highp vec4 halo_color #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp float halo_width #pragma mapbox: define lowp float halo_blur void main() { #pragma mapbox: initialize highp vec4 fill_color #pragma mapbox: initialize highp vec4 halo_color #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize lowp float halo_width #pragma mapbox: initialize lowp float halo_blur float fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif return;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;varying vec4 v_data0;varying vec4 v_data1; #pragma mapbox: define highp vec4 fill_color #pragma mapbox: define highp vec4 halo_color #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp float halo_width #pragma mapbox: define lowp float halo_blur void main() { #pragma mapbox: initialize highp vec4 fill_color #pragma mapbox: initialize highp vec4 halo_color #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize lowp float halo_width #pragma mapbox: initialize lowp float halo_blur vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? camera_to_anchor_distance/u_camera_to_center_distance : u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}`);function $i(v,w){var b=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,A=w.match(/attribute ([\w]+) ([\w]+)/g),F=v.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),K=w.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),Q=K?K.concat(F):F,ae={};return{fragmentSource:v=v.replace(b,function(we,Oe,We,Ve,Xe){return ae[Xe]=!0,Oe==="define"?` #ifndef HAS_UNIFORM_u_`+Xe+` varying `+We+" "+Ve+" "+Xe+`; #else uniform `+We+" "+Ve+" u_"+Xe+`; #endif `:` #ifdef HAS_UNIFORM_u_`+Xe+` `+We+" "+Ve+" "+Xe+" = u_"+Xe+`; #endif `}),vertexSource:w=w.replace(b,function(we,Oe,We,Ve,Xe){var ht=Ve==="float"?"vec2":"vec4",lt=Xe.match(/color/)?"color":ht;return ae[Xe]?Oe==="define"?` #ifndef HAS_UNIFORM_u_`+Xe+` uniform lowp float u_`+Xe+`_t; attribute `+We+" "+ht+" a_"+Xe+`; varying `+We+" "+Ve+" "+Xe+`; #else uniform `+We+" "+Ve+" u_"+Xe+`; #endif `:lt==="vec4"?` #ifndef HAS_UNIFORM_u_`+Xe+` `+Xe+" = a_"+Xe+`; #else `+We+" "+Ve+" "+Xe+" = u_"+Xe+`; #endif `:` #ifndef HAS_UNIFORM_u_`+Xe+` `+Xe+" = unpack_mix_"+lt+"(a_"+Xe+", u_"+Xe+`_t); #else `+We+" "+Ve+" "+Xe+" = u_"+Xe+`; #endif `:Oe==="define"?` #ifndef HAS_UNIFORM_u_`+Xe+` uniform lowp float u_`+Xe+`_t; attribute `+We+" "+ht+" a_"+Xe+`; #else uniform `+We+" "+Ve+" u_"+Xe+`; #endif `:lt==="vec4"?` #ifndef HAS_UNIFORM_u_`+Xe+` `+We+" "+Ve+" "+Xe+" = a_"+Xe+`; #else `+We+" "+Ve+" "+Xe+" = u_"+Xe+`; #endif `:` #ifndef HAS_UNIFORM_u_`+Xe+` `+We+" "+Ve+" "+Xe+" = unpack_mix_"+lt+"(a_"+Xe+", u_"+Xe+`_t); #else `+We+" "+Ve+" "+Xe+" = u_"+Xe+`; #endif `}),staticAttributes:A,staticUniforms:Q}}var cp=Object.freeze({__proto__:null,prelude:Qf,background:sp,backgroundPattern:nm,circle:ku,clippingMask:lp,heatmap:Sl,heatmapTexture:im,collisionBox:kd,collisionCircle:cf,debug:Ph,fill:eh,fillOutline:fo,fillOutlinePattern:Tu,fillPattern:th,fillExtrusion:Ma,fillExtrusionPattern:ff,hillshadePrepare:fa,hillshade:Cf,line:$u,lineGradient:Oo,linePattern:yc,lineSDF:ru,raster:bc,symbolIcon:xc,symbolSDF:Td,symbolTextAndIcon:up}),Ed=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};function fp(v){for(var w=[],b=0;b>16,ae>>16],u_pixel_coord_lower:[65535&Q,65535&ae]}}hf.prototype.draw=function(v,w,b,A,F,K,Q,ae,we,Oe,We,Ve,Xe,ht,lt,vt){var nt,bt=v.gl;if(!this.failedToCreate){for(var kt in v.program.set(this.program),v.setDepthMode(b),v.setStencilMode(A),v.setColorMode(F),v.setCullFace(K),this.fixedUniforms)this.fixedUniforms[kt].set(Q[kt]);ht&&ht.setUniforms(v,this.binderUniforms,Ve,{zoom:Xe});for(var Nt=(nt={},nt[bt.LINES]=2,nt[bt.TRIANGLES]=3,nt[bt.LINE_STRIP]=1,nt)[w],rr=0,Jt=We.get();rr0?1-1/(1.001-Q):-Q),u_contrast_factor:(K=F.paint.get("raster-contrast"),K>0?1/(1-K):1+K),u_spin_weights:om(F.paint.get("raster-hue-rotate"))};var K,Q};function om(v){v*=Math.PI/180;var w=Math.sin(v),b=Math.cos(v);return[(2*b+1)/3,(-Math.sqrt(3)*w-b+1)/3,(Math.sqrt(3)*w-b+1)/3]}var Df,Eu=function(v,w,b,A,F,K,Q,ae,we,Oe){var We=F.transform;return{u_is_size_zoom_constant:+(v==="constant"||v==="source"),u_is_size_feature_constant:+(v==="constant"||v==="camera"),u_size_t:w?w.uSizeT:0,u_size:w?w.uSize:0,u_camera_to_center_distance:We.cameraToCenterDistance,u_pitch:We.pitch/360*2*Math.PI,u_rotate_symbol:+b,u_aspect_ratio:We.width/We.height,u_fade_change:F.options.fadeDuration?F.symbolFadeChange:1,u_matrix:K,u_label_plane_matrix:Q,u_coord_matrix:ae,u_is_text:+we,u_pitch_with_map:+A,u_texsize:Oe,u_texture:0}},Qs=function(v,w,b,A,F,K,Q,ae,we,Oe,We){var Ve=F.transform;return S.extend(Eu(v,w,b,A,F,K,Q,ae,we,Oe),{u_gamma_scale:A?Math.cos(Ve._pitch)*Ve.cameraToCenterDistance:1,u_device_pixel_ratio:S.browser.devicePixelRatio,u_is_halo:+We})},kc=function(v,w,b,A,F,K,Q,ae,we,Oe){return S.extend(Qs(v,w,b,A,F,K,Q,ae,!0,we,!0),{u_texsize_icon:Oe,u_texture_icon:1})},df=function(v,w,b){return{u_matrix:v,u_opacity:w,u_color:b}},Of=function(v,w,b,A,F,K){return S.extend(function(Q,ae,we,Oe){var We=we.imageManager.getPattern(Q.from.toString()),Ve=we.imageManager.getPattern(Q.to.toString()),Xe=we.imageManager.getPixelSize(),ht=Xe.width,lt=Xe.height,vt=Math.pow(2,Oe.tileID.overscaledZ),nt=Oe.tileSize*Math.pow(2,we.transform.tileZoom)/vt,bt=nt*(Oe.tileID.canonical.x+Oe.tileID.wrap*vt),kt=nt*Oe.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:We.tl,u_pattern_br_a:We.br,u_pattern_tl_b:Ve.tl,u_pattern_br_b:Ve.br,u_texsize:[ht,lt],u_mix:ae.t,u_pattern_size_a:We.displaySize,u_pattern_size_b:Ve.displaySize,u_scale_a:ae.fromScale,u_scale_b:ae.toScale,u_tile_units_to_pixels:1/li(Oe,1,we.transform.tileZoom),u_pixel_coord_upper:[bt>>16,kt>>16],u_pixel_coord_lower:[65535&bt,65535&kt]}}(A,K,b,F),{u_matrix:v,u_opacity:w})},Nh={fillExtrusion:function(v,w){return{u_matrix:new S.UniformMatrix4f(v,w.u_matrix),u_lightpos:new S.Uniform3f(v,w.u_lightpos),u_lightintensity:new S.Uniform1f(v,w.u_lightintensity),u_lightcolor:new S.Uniform3f(v,w.u_lightcolor),u_vertical_gradient:new S.Uniform1f(v,w.u_vertical_gradient),u_opacity:new S.Uniform1f(v,w.u_opacity)}},fillExtrusionPattern:function(v,w){return{u_matrix:new S.UniformMatrix4f(v,w.u_matrix),u_lightpos:new S.Uniform3f(v,w.u_lightpos),u_lightintensity:new S.Uniform1f(v,w.u_lightintensity),u_lightcolor:new S.Uniform3f(v,w.u_lightcolor),u_vertical_gradient:new S.Uniform1f(v,w.u_vertical_gradient),u_height_factor:new S.Uniform1f(v,w.u_height_factor),u_image:new S.Uniform1i(v,w.u_image),u_texsize:new S.Uniform2f(v,w.u_texsize),u_pixel_coord_upper:new S.Uniform2f(v,w.u_pixel_coord_upper),u_pixel_coord_lower:new S.Uniform2f(v,w.u_pixel_coord_lower),u_scale:new S.Uniform3f(v,w.u_scale),u_fade:new S.Uniform1f(v,w.u_fade),u_opacity:new S.Uniform1f(v,w.u_opacity)}},fill:function(v,w){return{u_matrix:new S.UniformMatrix4f(v,w.u_matrix)}},fillPattern:function(v,w){return{u_matrix:new S.UniformMatrix4f(v,w.u_matrix),u_image:new S.Uniform1i(v,w.u_image),u_texsize:new S.Uniform2f(v,w.u_texsize),u_pixel_coord_upper:new S.Uniform2f(v,w.u_pixel_coord_upper),u_pixel_coord_lower:new S.Uniform2f(v,w.u_pixel_coord_lower),u_scale:new S.Uniform3f(v,w.u_scale),u_fade:new S.Uniform1f(v,w.u_fade)}},fillOutline:function(v,w){return{u_matrix:new S.UniformMatrix4f(v,w.u_matrix),u_world:new S.Uniform2f(v,w.u_world)}},fillOutlinePattern:function(v,w){return{u_matrix:new S.UniformMatrix4f(v,w.u_matrix),u_world:new S.Uniform2f(v,w.u_world),u_image:new S.Uniform1i(v,w.u_image),u_texsize:new S.Uniform2f(v,w.u_texsize),u_pixel_coord_upper:new S.Uniform2f(v,w.u_pixel_coord_upper),u_pixel_coord_lower:new S.Uniform2f(v,w.u_pixel_coord_lower),u_scale:new S.Uniform3f(v,w.u_scale),u_fade:new S.Uniform1f(v,w.u_fade)}},circle:function(v,w){return{u_camera_to_center_distance:new S.Uniform1f(v,w.u_camera_to_center_distance),u_scale_with_map:new S.Uniform1i(v,w.u_scale_with_map),u_pitch_with_map:new S.Uniform1i(v,w.u_pitch_with_map),u_extrude_scale:new S.Uniform2f(v,w.u_extrude_scale),u_device_pixel_ratio:new S.Uniform1f(v,w.u_device_pixel_ratio),u_matrix:new S.UniformMatrix4f(v,w.u_matrix)}},collisionBox:function(v,w){return{u_matrix:new S.UniformMatrix4f(v,w.u_matrix),u_camera_to_center_distance:new S.Uniform1f(v,w.u_camera_to_center_distance),u_pixels_to_tile_units:new S.Uniform1f(v,w.u_pixels_to_tile_units),u_extrude_scale:new S.Uniform2f(v,w.u_extrude_scale),u_overscale_factor:new S.Uniform1f(v,w.u_overscale_factor)}},collisionCircle:function(v,w){return{u_matrix:new S.UniformMatrix4f(v,w.u_matrix),u_inv_matrix:new S.UniformMatrix4f(v,w.u_inv_matrix),u_camera_to_center_distance:new S.Uniform1f(v,w.u_camera_to_center_distance),u_viewport_size:new S.Uniform2f(v,w.u_viewport_size)}},debug:function(v,w){return{u_color:new S.UniformColor(v,w.u_color),u_matrix:new S.UniformMatrix4f(v,w.u_matrix),u_overlay:new S.Uniform1i(v,w.u_overlay),u_overlay_scale:new S.Uniform1f(v,w.u_overlay_scale)}},clippingMask:function(v,w){return{u_matrix:new S.UniformMatrix4f(v,w.u_matrix)}},heatmap:function(v,w){return{u_extrude_scale:new S.Uniform1f(v,w.u_extrude_scale),u_intensity:new S.Uniform1f(v,w.u_intensity),u_matrix:new S.UniformMatrix4f(v,w.u_matrix)}},heatmapTexture:function(v,w){return{u_matrix:new S.UniformMatrix4f(v,w.u_matrix),u_world:new S.Uniform2f(v,w.u_world),u_image:new S.Uniform1i(v,w.u_image),u_color_ramp:new S.Uniform1i(v,w.u_color_ramp),u_opacity:new S.Uniform1f(v,w.u_opacity)}},hillshade:function(v,w){return{u_matrix:new S.UniformMatrix4f(v,w.u_matrix),u_image:new S.Uniform1i(v,w.u_image),u_latrange:new S.Uniform2f(v,w.u_latrange),u_light:new S.Uniform2f(v,w.u_light),u_shadow:new S.UniformColor(v,w.u_shadow),u_highlight:new S.UniformColor(v,w.u_highlight),u_accent:new S.UniformColor(v,w.u_accent)}},hillshadePrepare:function(v,w){return{u_matrix:new S.UniformMatrix4f(v,w.u_matrix),u_image:new S.Uniform1i(v,w.u_image),u_dimension:new S.Uniform2f(v,w.u_dimension),u_zoom:new S.Uniform1f(v,w.u_zoom),u_unpack:new S.Uniform4f(v,w.u_unpack)}},line:function(v,w){return{u_matrix:new S.UniformMatrix4f(v,w.u_matrix),u_ratio:new S.Uniform1f(v,w.u_ratio),u_device_pixel_ratio:new S.Uniform1f(v,w.u_device_pixel_ratio),u_units_to_pixels:new S.Uniform2f(v,w.u_units_to_pixels)}},lineGradient:function(v,w){return{u_matrix:new S.UniformMatrix4f(v,w.u_matrix),u_ratio:new S.Uniform1f(v,w.u_ratio),u_device_pixel_ratio:new S.Uniform1f(v,w.u_device_pixel_ratio),u_units_to_pixels:new S.Uniform2f(v,w.u_units_to_pixels),u_image:new S.Uniform1i(v,w.u_image),u_image_height:new S.Uniform1f(v,w.u_image_height)}},linePattern:function(v,w){return{u_matrix:new S.UniformMatrix4f(v,w.u_matrix),u_texsize:new S.Uniform2f(v,w.u_texsize),u_ratio:new S.Uniform1f(v,w.u_ratio),u_device_pixel_ratio:new S.Uniform1f(v,w.u_device_pixel_ratio),u_image:new S.Uniform1i(v,w.u_image),u_units_to_pixels:new S.Uniform2f(v,w.u_units_to_pixels),u_scale:new S.Uniform3f(v,w.u_scale),u_fade:new S.Uniform1f(v,w.u_fade)}},lineSDF:function(v,w){return{u_matrix:new S.UniformMatrix4f(v,w.u_matrix),u_ratio:new S.Uniform1f(v,w.u_ratio),u_device_pixel_ratio:new S.Uniform1f(v,w.u_device_pixel_ratio),u_units_to_pixels:new S.Uniform2f(v,w.u_units_to_pixels),u_patternscale_a:new S.Uniform2f(v,w.u_patternscale_a),u_patternscale_b:new S.Uniform2f(v,w.u_patternscale_b),u_sdfgamma:new S.Uniform1f(v,w.u_sdfgamma),u_image:new S.Uniform1i(v,w.u_image),u_tex_y_a:new S.Uniform1f(v,w.u_tex_y_a),u_tex_y_b:new S.Uniform1f(v,w.u_tex_y_b),u_mix:new S.Uniform1f(v,w.u_mix)}},raster:function(v,w){return{u_matrix:new S.UniformMatrix4f(v,w.u_matrix),u_tl_parent:new S.Uniform2f(v,w.u_tl_parent),u_scale_parent:new S.Uniform1f(v,w.u_scale_parent),u_buffer_scale:new S.Uniform1f(v,w.u_buffer_scale),u_fade_t:new S.Uniform1f(v,w.u_fade_t),u_opacity:new S.Uniform1f(v,w.u_opacity),u_image0:new S.Uniform1i(v,w.u_image0),u_image1:new S.Uniform1i(v,w.u_image1),u_brightness_low:new S.Uniform1f(v,w.u_brightness_low),u_brightness_high:new S.Uniform1f(v,w.u_brightness_high),u_saturation_factor:new S.Uniform1f(v,w.u_saturation_factor),u_contrast_factor:new S.Uniform1f(v,w.u_contrast_factor),u_spin_weights:new S.Uniform3f(v,w.u_spin_weights)}},symbolIcon:function(v,w){return{u_is_size_zoom_constant:new S.Uniform1i(v,w.u_is_size_zoom_constant),u_is_size_feature_constant:new S.Uniform1i(v,w.u_is_size_feature_constant),u_size_t:new S.Uniform1f(v,w.u_size_t),u_size:new S.Uniform1f(v,w.u_size),u_camera_to_center_distance:new S.Uniform1f(v,w.u_camera_to_center_distance),u_pitch:new S.Uniform1f(v,w.u_pitch),u_rotate_symbol:new S.Uniform1i(v,w.u_rotate_symbol),u_aspect_ratio:new S.Uniform1f(v,w.u_aspect_ratio),u_fade_change:new S.Uniform1f(v,w.u_fade_change),u_matrix:new S.UniformMatrix4f(v,w.u_matrix),u_label_plane_matrix:new S.UniformMatrix4f(v,w.u_label_plane_matrix),u_coord_matrix:new S.UniformMatrix4f(v,w.u_coord_matrix),u_is_text:new S.Uniform1i(v,w.u_is_text),u_pitch_with_map:new S.Uniform1i(v,w.u_pitch_with_map),u_texsize:new S.Uniform2f(v,w.u_texsize),u_texture:new S.Uniform1i(v,w.u_texture)}},symbolSDF:function(v,w){return{u_is_size_zoom_constant:new S.Uniform1i(v,w.u_is_size_zoom_constant),u_is_size_feature_constant:new S.Uniform1i(v,w.u_is_size_feature_constant),u_size_t:new S.Uniform1f(v,w.u_size_t),u_size:new S.Uniform1f(v,w.u_size),u_camera_to_center_distance:new S.Uniform1f(v,w.u_camera_to_center_distance),u_pitch:new S.Uniform1f(v,w.u_pitch),u_rotate_symbol:new S.Uniform1i(v,w.u_rotate_symbol),u_aspect_ratio:new S.Uniform1f(v,w.u_aspect_ratio),u_fade_change:new S.Uniform1f(v,w.u_fade_change),u_matrix:new S.UniformMatrix4f(v,w.u_matrix),u_label_plane_matrix:new S.UniformMatrix4f(v,w.u_label_plane_matrix),u_coord_matrix:new S.UniformMatrix4f(v,w.u_coord_matrix),u_is_text:new S.Uniform1i(v,w.u_is_text),u_pitch_with_map:new S.Uniform1i(v,w.u_pitch_with_map),u_texsize:new S.Uniform2f(v,w.u_texsize),u_texture:new S.Uniform1i(v,w.u_texture),u_gamma_scale:new S.Uniform1f(v,w.u_gamma_scale),u_device_pixel_ratio:new S.Uniform1f(v,w.u_device_pixel_ratio),u_is_halo:new S.Uniform1i(v,w.u_is_halo)}},symbolTextAndIcon:function(v,w){return{u_is_size_zoom_constant:new S.Uniform1i(v,w.u_is_size_zoom_constant),u_is_size_feature_constant:new S.Uniform1i(v,w.u_is_size_feature_constant),u_size_t:new S.Uniform1f(v,w.u_size_t),u_size:new S.Uniform1f(v,w.u_size),u_camera_to_center_distance:new S.Uniform1f(v,w.u_camera_to_center_distance),u_pitch:new S.Uniform1f(v,w.u_pitch),u_rotate_symbol:new S.Uniform1i(v,w.u_rotate_symbol),u_aspect_ratio:new S.Uniform1f(v,w.u_aspect_ratio),u_fade_change:new S.Uniform1f(v,w.u_fade_change),u_matrix:new S.UniformMatrix4f(v,w.u_matrix),u_label_plane_matrix:new S.UniformMatrix4f(v,w.u_label_plane_matrix),u_coord_matrix:new S.UniformMatrix4f(v,w.u_coord_matrix),u_is_text:new S.Uniform1i(v,w.u_is_text),u_pitch_with_map:new S.Uniform1i(v,w.u_pitch_with_map),u_texsize:new S.Uniform2f(v,w.u_texsize),u_texsize_icon:new S.Uniform2f(v,w.u_texsize_icon),u_texture:new S.Uniform1i(v,w.u_texture),u_texture_icon:new S.Uniform1i(v,w.u_texture_icon),u_gamma_scale:new S.Uniform1f(v,w.u_gamma_scale),u_device_pixel_ratio:new S.Uniform1f(v,w.u_device_pixel_ratio),u_is_halo:new S.Uniform1i(v,w.u_is_halo)}},background:function(v,w){return{u_matrix:new S.UniformMatrix4f(v,w.u_matrix),u_opacity:new S.Uniform1f(v,w.u_opacity),u_color:new S.UniformColor(v,w.u_color)}},backgroundPattern:function(v,w){return{u_matrix:new S.UniformMatrix4f(v,w.u_matrix),u_opacity:new S.Uniform1f(v,w.u_opacity),u_image:new S.Uniform1i(v,w.u_image),u_pattern_tl_a:new S.Uniform2f(v,w.u_pattern_tl_a),u_pattern_br_a:new S.Uniform2f(v,w.u_pattern_br_a),u_pattern_tl_b:new S.Uniform2f(v,w.u_pattern_tl_b),u_pattern_br_b:new S.Uniform2f(v,w.u_pattern_br_b),u_texsize:new S.Uniform2f(v,w.u_texsize),u_mix:new S.Uniform1f(v,w.u_mix),u_pattern_size_a:new S.Uniform2f(v,w.u_pattern_size_a),u_pattern_size_b:new S.Uniform2f(v,w.u_pattern_size_b),u_scale_a:new S.Uniform1f(v,w.u_scale_a),u_scale_b:new S.Uniform1f(v,w.u_scale_b),u_pixel_coord_upper:new S.Uniform2f(v,w.u_pixel_coord_upper),u_pixel_coord_lower:new S.Uniform2f(v,w.u_pixel_coord_lower),u_tile_units_to_pixels:new S.Uniform1f(v,w.u_tile_units_to_pixels)}}};function Cs(v,w,b,A,F,K,Q){for(var ae=v.context,we=ae.gl,Oe=v.useProgram("collisionBox"),We=[],Ve=0,Xe=0,ht=0;ht0){var rr=S.create(),Jt=bt;S.mul(rr,nt.placementInvProjMatrix,v.transform.glCoordMatrix),S.mul(rr,rr,nt.placementViewportMatrix),We.push({circleArray:Nt,circleOffset:Xe,transform:Jt,invTransform:rr}),Xe=Ve+=Nt.length/4}kt&&Oe.draw(ae,we.LINES,Ye.disabled,ot.disabled,v.colorModeForRenderPass(),mt.disabled,nu(bt,v.transform,vt),b.id,kt.layoutVertexBuffer,kt.indexBuffer,kt.segments,null,v.transform.zoom,null,null,kt.collisionVertexBuffer)}}if(Q&&We.length){var Zt=v.useProgram("collisionCircle"),mr=new S.StructArrayLayout2f1f2i16;mr.resize(4*Ve),mr._trim();for(var yr=0,br=0,Kr=We;br=0&&(lt[nt.associatedIconIndex]={shiftedAnchor:mr,angle:yr})}else _o(nt.numGlyphs,Xe)}if(We){ht.clear();for(var Kr=v.icon.placedSymbolArray,Gr=0;Gr0){var Q=S.browser.now(),ae=(Q-v.timeAdded)/K,we=w?(Q-w.timeAdded)/K:-1,Oe=b.getSource(),We=F.coveringZoomLevel({tileSize:Oe.tileSize,roundZoom:Oe.roundZoom}),Ve=!w||Math.abs(w.tileID.overscaledZ-We)>Math.abs(v.tileID.overscaledZ-We),Xe=Ve&&v.refreshedUponExpiration?1:S.clamp(Ve?ae:1-we,0,1);return v.refreshedUponExpiration&&ae>=1&&(v.refreshedUponExpiration=!1),w?{opacity:1,mix:1-Xe}:{opacity:Xe,mix:0}}return{opacity:1,mix:0}}var If=new S.Color(1,0,0,1),Qa=new S.Color(0,1,0,1),Zu=new S.Color(0,0,1,1),jc=new S.Color(1,0,1,1),Xu=new S.Color(0,1,1,1);function au(v,w,b,A){ri(v,0,w+b/2,v.transform.width,b,A)}function Au(v,w,b,A){ri(v,w-b/2,0,b,v.transform.height,A)}function ri(v,w,b,A,F,K){var Q=v.context,ae=Q.gl;ae.enable(ae.SCISSOR_TEST),ae.scissor(w*S.browser.devicePixelRatio,b*S.browser.devicePixelRatio,A*S.browser.devicePixelRatio,F*S.browser.devicePixelRatio),Q.clear({color:K}),ae.disable(ae.SCISSOR_TEST)}function Tl(v,w,b){var A=v.context,F=A.gl,K=b.posMatrix,Q=v.useProgram("debug"),ae=Ye.disabled,we=ot.disabled,Oe=v.colorModeForRenderPass();A.activeTexture.set(F.TEXTURE0),v.emptyTexture.bind(F.LINEAR,F.CLAMP_TO_EDGE),Q.draw(A,F.LINE_STRIP,ae,we,Oe,mt.disabled,Af(K,S.Color.red),"$debug",v.debugBuffer,v.tileBorderIndexBuffer,v.debugSegments);var We=w.getTileByID(b.key).latestRawTileData,Ve=Math.floor((We&&We.byteLength||0)/1024),Xe=w.getTile(b).tileSize,ht=512/Math.min(Xe,512)*(b.overscaledZ/v.transform.zoom)*.5,lt=b.canonical.toString();b.overscaledZ!==b.canonical.z&&(lt+=" => "+b.overscaledZ),function(vt,nt){vt.initDebugOverlayCanvas();var bt=vt.debugOverlayCanvas,kt=vt.context.gl,Nt=vt.debugOverlayCanvas.getContext("2d");Nt.clearRect(0,0,bt.width,bt.height),Nt.shadowColor="white",Nt.shadowBlur=2,Nt.lineWidth=1.5,Nt.strokeStyle="white",Nt.textBaseline="top",Nt.font="bold 36px Open Sans, sans-serif",Nt.fillText(nt,5,5),Nt.strokeText(nt,5,5),vt.debugOverlayTexture.update(bt),vt.debugOverlayTexture.bind(kt.LINEAR,kt.CLAMP_TO_EDGE)}(v,lt+" "+Ve+"kb"),Q.draw(A,F.TRIANGLES,ae,we,yt.alphaBlended,mt.disabled,Af(K,S.Color.transparent,ht),"$debug",v.debugBuffer,v.quadTriangleIndexBuffer,v.debugSegments)}var es={symbol:function(v,w,b,A,F){if(v.renderPass==="translucent"){var K=ot.disabled,Q=v.colorModeForRenderPass();b.layout.get("text-variable-anchor")&&function(ae,we,Oe,We,Ve,Xe,ht){for(var lt=we.transform,vt=Ve==="map",nt=Xe==="map",bt=0,kt=ae;bt256&&this.clearStencil(),b.setColorMode(yt.disabled),b.setDepthMode(Ye.disabled);var F=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var K=0,Q=w;K256&&this.clearStencil();var v=this.nextStencilID++,w=this.context.gl;return new ot({func:w.NOTEQUAL,mask:255},v,255,w.KEEP,w.KEEP,w.REPLACE)},ai.prototype.stencilModeForClipping=function(v){var w=this.context.gl;return new ot({func:w.EQUAL,mask:255},this._tileClippingMaskIDs[v.key],0,w.KEEP,w.KEEP,w.REPLACE)},ai.prototype.stencilConfigForOverlap=function(v){var w,b=this.context.gl,A=v.sort(function(we,Oe){return Oe.overscaledZ-we.overscaledZ}),F=A[A.length-1].overscaledZ,K=A[0].overscaledZ-F+1;if(K>1){this.currentStencilSource=void 0,this.nextStencilID+K>256&&this.clearStencil();for(var Q={},ae=0;ae=0;this.currentLayer--){var Nt=this.style._layers[A[this.currentLayer]],rr=F[Nt.source],Jt=Oe[Nt.source];this._renderTileClippingMasks(Nt,Jt),this.renderLayer(this,rr,Nt,Jt)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer0?w.pop():null},ai.prototype.isPatternMissing=function(v){if(!v)return!1;if(!v.from||!v.to)return!0;var w=this.imageManager.getPattern(v.from.toString()),b=this.imageManager.getPattern(v.to.toString());return!w||!b},ai.prototype.useProgram=function(v,w){this.cache=this.cache||{};var b=""+v+(w?w.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[b]||(this.cache[b]=new hf(this.context,v,cp[v],w,Nh[v],this._showOverdrawInspector)),this.cache[b]},ai.prototype.setCustomLayerDefaults=function(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()},ai.prototype.setBaseState=function(){var v=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(v.FUNC_ADD)},ai.prototype.initDebugOverlayCanvas=function(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=S.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new S.Texture(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))},ai.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var Ec=function(v,w){this.points=v,this.planes=w};Ec.fromInvProjectionMatrix=function(v,w,b){var A=Math.pow(2,b),F=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map(function(Q){return S.transformMat4([],Q,v)}).map(function(Q){return S.scale$1([],Q,1/Q[3]/w*A)}),K=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(function(Q){var ae=S.sub([],F[Q[0]],F[Q[1]]),we=S.sub([],F[Q[2]],F[Q[1]]),Oe=S.normalize([],S.cross([],ae,we)),We=-S.dot(Oe,F[Q[1]]);return Oe.concat(We)});return new Ec(F,K)};var El=function(v,w){this.min=v,this.max=w,this.center=S.scale$2([],S.add([],this.min,this.max),.5)};El.prototype.quadrant=function(v){for(var w=[v%2==0,v<2],b=S.clone$2(this.min),A=S.clone$2(this.max),F=0;F=0;if(K===0)return 0;K!==w.length&&(b=!1)}if(b)return 2;for(var ae=0;ae<3;ae++){for(var we=Number.MAX_VALUE,Oe=-Number.MAX_VALUE,We=0;Wethis.max[ae]-this.min[ae])return 0}return 1};var Cl=function(v,w,b,A){if(v===void 0&&(v=0),w===void 0&&(w=0),b===void 0&&(b=0),A===void 0&&(A=0),isNaN(v)||v<0||isNaN(w)||w<0||isNaN(b)||b<0||isNaN(A)||A<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=v,this.bottom=w,this.left=b,this.right=A};Cl.prototype.interpolate=function(v,w,b){return w.top!=null&&v.top!=null&&(this.top=S.number(v.top,w.top,b)),w.bottom!=null&&v.bottom!=null&&(this.bottom=S.number(v.bottom,w.bottom,b)),w.left!=null&&v.left!=null&&(this.left=S.number(v.left,w.left,b)),w.right!=null&&v.right!=null&&(this.right=S.number(v.right,w.right,b)),this},Cl.prototype.getCenter=function(v,w){var b=S.clamp((this.left+v-this.right)/2,0,v),A=S.clamp((this.top+w-this.bottom)/2,0,w);return new S.Point(b,A)},Cl.prototype.equals=function(v){return this.top===v.top&&this.bottom===v.bottom&&this.left===v.left&&this.right===v.right},Cl.prototype.clone=function(){return new Cl(this.top,this.bottom,this.left,this.right)},Cl.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var pi=function(v,w,b,A,F){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=F===void 0||F,this._minZoom=v||0,this._maxZoom=w||22,this._minPitch=b??0,this._maxPitch=A??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new S.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new Cl,this._posMatrixCache={},this._alignedPosMatrixCache={}},qi={minZoom:{configurable:!0},maxZoom:{configurable:!0},minPitch:{configurable:!0},maxPitch:{configurable:!0},renderWorldCopies:{configurable:!0},worldSize:{configurable:!0},centerOffset:{configurable:!0},size:{configurable:!0},bearing:{configurable:!0},pitch:{configurable:!0},fov:{configurable:!0},zoom:{configurable:!0},center:{configurable:!0},padding:{configurable:!0},centerPoint:{configurable:!0},unmodified:{configurable:!0},point:{configurable:!0}};pi.prototype.clone=function(){var v=new pi(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return v.tileSize=this.tileSize,v.latRange=this.latRange,v.width=this.width,v.height=this.height,v._center=this._center,v.zoom=this.zoom,v.angle=this.angle,v._fov=this._fov,v._pitch=this._pitch,v._unmodified=this._unmodified,v._edgeInsets=this._edgeInsets.clone(),v._calcMatrices(),v},qi.minZoom.get=function(){return this._minZoom},qi.minZoom.set=function(v){this._minZoom!==v&&(this._minZoom=v,this.zoom=Math.max(this.zoom,v))},qi.maxZoom.get=function(){return this._maxZoom},qi.maxZoom.set=function(v){this._maxZoom!==v&&(this._maxZoom=v,this.zoom=Math.min(this.zoom,v))},qi.minPitch.get=function(){return this._minPitch},qi.minPitch.set=function(v){this._minPitch!==v&&(this._minPitch=v,this.pitch=Math.max(this.pitch,v))},qi.maxPitch.get=function(){return this._maxPitch},qi.maxPitch.set=function(v){this._maxPitch!==v&&(this._maxPitch=v,this.pitch=Math.min(this.pitch,v))},qi.renderWorldCopies.get=function(){return this._renderWorldCopies},qi.renderWorldCopies.set=function(v){v===void 0?v=!0:v===null&&(v=!1),this._renderWorldCopies=v},qi.worldSize.get=function(){return this.tileSize*this.scale},qi.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},qi.size.get=function(){return new S.Point(this.width,this.height)},qi.bearing.get=function(){return-this.angle/Math.PI*180},qi.bearing.set=function(v){var w=-S.wrap(v,-180,180)*Math.PI/180;this.angle!==w&&(this._unmodified=!1,this.angle=w,this._calcMatrices(),this.rotationMatrix=S.create$2(),S.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},qi.pitch.get=function(){return this._pitch/Math.PI*180},qi.pitch.set=function(v){var w=S.clamp(v,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==w&&(this._unmodified=!1,this._pitch=w,this._calcMatrices())},qi.fov.get=function(){return this._fov/Math.PI*180},qi.fov.set=function(v){v=Math.max(.01,Math.min(60,v)),this._fov!==v&&(this._unmodified=!1,this._fov=v/180*Math.PI,this._calcMatrices())},qi.zoom.get=function(){return this._zoom},qi.zoom.set=function(v){var w=Math.min(Math.max(v,this.minZoom),this.maxZoom);this._zoom!==w&&(this._unmodified=!1,this._zoom=w,this.scale=this.zoomScale(w),this.tileZoom=Math.floor(w),this.zoomFraction=w-this.tileZoom,this._constrain(),this._calcMatrices())},qi.center.get=function(){return this._center},qi.center.set=function(v){v.lat===this._center.lat&&v.lng===this._center.lng||(this._unmodified=!1,this._center=v,this._constrain(),this._calcMatrices())},qi.padding.get=function(){return this._edgeInsets.toJSON()},qi.padding.set=function(v){this._edgeInsets.equals(v)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,v,1),this._calcMatrices())},qi.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},pi.prototype.isPaddingEqual=function(v){return this._edgeInsets.equals(v)},pi.prototype.interpolatePadding=function(v,w,b){this._unmodified=!1,this._edgeInsets.interpolate(v,w,b),this._constrain(),this._calcMatrices()},pi.prototype.coveringZoomLevel=function(v){var w=(v.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/v.tileSize));return Math.max(0,w)},pi.prototype.getVisibleUnwrappedCoordinates=function(v){var w=[new S.UnwrappedTileID(0,v)];if(this._renderWorldCopies)for(var b=this.pointCoordinate(new S.Point(0,0)),A=this.pointCoordinate(new S.Point(this.width,0)),F=this.pointCoordinate(new S.Point(this.width,this.height)),K=this.pointCoordinate(new S.Point(0,this.height)),Q=Math.floor(Math.min(b.x,A.x,F.x,K.x)),ae=Math.floor(Math.max(b.x,A.x,F.x,K.x)),we=Q-1;we<=ae+1;we++)we!==0&&w.push(new S.UnwrappedTileID(we,v));return w},pi.prototype.coveringTiles=function(v){var w=this.coveringZoomLevel(v),b=w;if(v.minzoom!==void 0&&wv.maxzoom&&(w=v.maxzoom);var A=S.MercatorCoordinate.fromLngLat(this.center),F=Math.pow(2,w),K=[F*A.x,F*A.y,0],Q=Ec.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,w),ae=v.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(ae=w);var we=function(br){return{aabb:new El([br*F,0,0],[(br+1)*F,F,0]),zoom:0,x:0,y:0,wrap:br,fullyVisible:!1}},Oe=[],We=[],Ve=w,Xe=v.reparseOverscaled?b:w;if(this._renderWorldCopies)for(var ht=1;ht<=3;ht++)Oe.push(we(-ht)),Oe.push(we(ht));for(Oe.push(we(0));Oe.length>0;){var lt=Oe.pop(),vt=lt.x,nt=lt.y,bt=lt.fullyVisible;if(!bt){var kt=lt.aabb.intersects(Q);if(kt===0)continue;bt=kt===2}var Nt=lt.aabb.distanceX(K),rr=lt.aabb.distanceY(K),Jt=Math.max(Math.abs(Nt),Math.abs(rr));if(lt.zoom===Ve||Jt>3+(1<=ae)We.push({tileID:new S.OverscaledTileID(lt.zoom===Ve?Xe:lt.zoom,lt.wrap,lt.zoom,vt,nt),distanceSq:S.sqrLen([K[0]-.5-vt,K[1]-.5-nt])});else for(var Zt=0;Zt<4;Zt++){var mr=(vt<<1)+Zt%2,yr=(nt<<1)+(Zt>>1);Oe.push({aabb:lt.aabb.quadrant(Zt),zoom:lt.zoom+1,x:mr,y:yr,wrap:lt.wrap,fullyVisible:bt})}}return We.sort(function(br,Kr){return br.distanceSq-Kr.distanceSq}).map(function(br){return br.tileID})},pi.prototype.resize=function(v,w){this.width=v,this.height=w,this.pixelsToGLUnits=[2/v,-2/w],this._constrain(),this._calcMatrices()},qi.unmodified.get=function(){return this._unmodified},pi.prototype.zoomScale=function(v){return Math.pow(2,v)},pi.prototype.scaleZoom=function(v){return Math.log(v)/Math.LN2},pi.prototype.project=function(v){var w=S.clamp(v.lat,-this.maxValidLatitude,this.maxValidLatitude);return new S.Point(S.mercatorXfromLng(v.lng)*this.worldSize,S.mercatorYfromLat(w)*this.worldSize)},pi.prototype.unproject=function(v){return new S.MercatorCoordinate(v.x/this.worldSize,v.y/this.worldSize).toLngLat()},qi.point.get=function(){return this.project(this.center)},pi.prototype.setLocationAtPoint=function(v,w){var b=this.pointCoordinate(w),A=this.pointCoordinate(this.centerPoint),F=this.locationCoordinate(v),K=new S.MercatorCoordinate(F.x-(b.x-A.x),F.y-(b.y-A.y));this.center=this.coordinateLocation(K),this._renderWorldCopies&&(this.center=this.center.wrap())},pi.prototype.locationPoint=function(v){return this.coordinatePoint(this.locationCoordinate(v))},pi.prototype.pointLocation=function(v){return this.coordinateLocation(this.pointCoordinate(v))},pi.prototype.locationCoordinate=function(v){return S.MercatorCoordinate.fromLngLat(v)},pi.prototype.coordinateLocation=function(v){return v.toLngLat()},pi.prototype.pointCoordinate=function(v){var w=[v.x,v.y,0,1],b=[v.x,v.y,1,1];S.transformMat4(w,w,this.pixelMatrixInverse),S.transformMat4(b,b,this.pixelMatrixInverse);var A=w[3],F=b[3],K=w[1]/A,Q=b[1]/F,ae=w[2]/A,we=b[2]/F,Oe=ae===we?0:(0-ae)/(we-ae);return new S.MercatorCoordinate(S.number(w[0]/A,b[0]/F,Oe)/this.worldSize,S.number(K,Q,Oe)/this.worldSize)},pi.prototype.coordinatePoint=function(v){var w=[v.x*this.worldSize,v.y*this.worldSize,0,1];return S.transformMat4(w,w,this.pixelMatrix),new S.Point(w[0]/w[3],w[1]/w[3])},pi.prototype.getBounds=function(){return new S.LngLatBounds().extend(this.pointLocation(new S.Point(0,0))).extend(this.pointLocation(new S.Point(this.width,0))).extend(this.pointLocation(new S.Point(this.width,this.height))).extend(this.pointLocation(new S.Point(0,this.height)))},pi.prototype.getMaxBounds=function(){return this.latRange&&this.latRange.length===2&&this.lngRange&&this.lngRange.length===2?new S.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null},pi.prototype.setMaxBounds=function(v){v?(this.lngRange=[v.getWest(),v.getEast()],this.latRange=[v.getSouth(),v.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},pi.prototype.calculatePosMatrix=function(v,w){w===void 0&&(w=!1);var b=v.key,A=w?this._alignedPosMatrixCache:this._posMatrixCache;if(A[b])return A[b];var F=v.canonical,K=this.worldSize/this.zoomScale(F.z),Q=F.x+Math.pow(2,F.z)*v.wrap,ae=S.identity(new Float64Array(16));return S.translate(ae,ae,[Q*K,F.y*K,0]),S.scale(ae,ae,[K/S.EXTENT,K/S.EXTENT,1]),S.multiply(ae,w?this.alignedProjMatrix:this.projMatrix,ae),A[b]=new Float32Array(ae),A[b]},pi.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},pi.prototype._constrain=function(){if(this.center&&this.width&&this.height&&!this._constraining){this._constraining=!0;var v,w,b,A,F=-90,K=90,Q=-180,ae=180,we=this.size,Oe=this._unmodified;if(this.latRange){var We=this.latRange;F=S.mercatorYfromLat(We[1])*this.worldSize,v=(K=S.mercatorYfromLat(We[0])*this.worldSize)-FK&&(A=K-vt)}if(this.lngRange){var nt=Xe.x,bt=we.x/2;nt-btae&&(b=ae-bt)}b===void 0&&A===void 0||(this.center=this.unproject(new S.Point(b!==void 0?b:Xe.x,A!==void 0?A:Xe.y))),this._unmodified=Oe,this._constraining=!1}},pi.prototype._calcMatrices=function(){if(this.height){var v=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height;var w=Math.PI/2+this._pitch,b=this._fov*(.5+v.y/this.height),A=Math.sin(b)*this.cameraToCenterDistance/Math.sin(S.clamp(Math.PI-w-b,.01,Math.PI-.01)),F=this.point,K=F.x,Q=F.y,ae=1.01*(Math.cos(Math.PI/2-this._pitch)*A+this.cameraToCenterDistance),we=this.height/50,Oe=new Float64Array(16);S.perspective(Oe,this._fov,this.width/this.height,we,ae),Oe[8]=2*-v.x/this.width,Oe[9]=2*v.y/this.height,S.scale(Oe,Oe,[1,-1,1]),S.translate(Oe,Oe,[0,0,-this.cameraToCenterDistance]),S.rotateX(Oe,Oe,this._pitch),S.rotateZ(Oe,Oe,this.angle),S.translate(Oe,Oe,[-K,-Q,0]),this.mercatorMatrix=S.scale([],Oe,[this.worldSize,this.worldSize,this.worldSize]),S.scale(Oe,Oe,[1,1,S.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=Oe,this.invProjMatrix=S.invert([],this.projMatrix);var We=this.width%2/2,Ve=this.height%2/2,Xe=Math.cos(this.angle),ht=Math.sin(this.angle),lt=K-Math.round(K)+Xe*We+ht*Ve,vt=Q-Math.round(Q)+Xe*Ve+ht*We,nt=new Float64Array(Oe);if(S.translate(nt,nt,[lt>.5?lt-1:lt,vt>.5?vt-1:vt,0]),this.alignedProjMatrix=nt,Oe=S.create(),S.scale(Oe,Oe,[this.width/2,-this.height/2,1]),S.translate(Oe,Oe,[1,-1,0]),this.labelPlaneMatrix=Oe,Oe=S.create(),S.scale(Oe,Oe,[1,-1,1]),S.translate(Oe,Oe,[-1,-1,0]),S.scale(Oe,Oe,[2/this.width,2/this.height,1]),this.glCoordMatrix=Oe,this.pixelMatrix=S.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),!(Oe=S.invert(new Float64Array(16),this.pixelMatrix)))throw new Error("failed to invert matrix");this.pixelMatrixInverse=Oe,this._posMatrixCache={},this._alignedPosMatrixCache={}}},pi.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var v=this.pointCoordinate(new S.Point(0,0)),w=[v.x*this.worldSize,v.y*this.worldSize,0,1];return S.transformMat4(w,w,this.pixelMatrix)[3]/this.cameraToCenterDistance},pi.prototype.getCameraPoint=function(){var v=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new S.Point(0,v))},pi.prototype.getCameraQueryGeometry=function(v){var w=this.getCameraPoint();if(v.length===1)return[v[0],w];for(var b=w.x,A=w.y,F=w.x,K=w.y,Q=0,ae=v;Q=3&&!v.some(function(b){return isNaN(b)})){var w=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(v[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+v[2],+v[1]],zoom:+v[0],bearing:w,pitch:+(v[4]||0)}),!0}return!1},La.prototype._updateHashUnthrottled=function(){var v=S.window.location.href.replace(/(#.+)?$/,this.getHashString());try{S.window.history.replaceState(S.window.history.state,null,v)}catch{}};var rh={linearity:.3,easing:S.bezier(0,0,.3,1)},Du=S.extend({deceleration:2500,maxSpeed:1400},rh),Uc=S.extend({deceleration:20,maxSpeed:1400},rh),dp=S.extend({deceleration:1e3,maxSpeed:360},rh),Mf=S.extend({deceleration:1e3,maxSpeed:90},rh),Ju=function(v){this._map=v,this.clear()};function su(v,w){(!v.duration||v.duration0&&w-v[0].time>160;)v.shift()},Ju.prototype._onMoveEnd=function(v){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var w={zoom:0,bearing:0,pitch:0,pan:new S.Point(0,0),pinchAround:void 0,around:void 0},b=0,A=this._inertiaBuffer;b=this._clickTolerance||this._map.fire(new ko(v.type,this._map,v))},da.prototype.dblclick=function(v){return this._firePreventable(new ko(v.type,this._map,v))},da.prototype.mouseover=function(v){this._map.fire(new ko(v.type,this._map,v))},da.prototype.mouseout=function(v){this._map.fire(new ko(v.type,this._map,v))},da.prototype.touchstart=function(v){return this._firePreventable(new Pf(v.type,this._map,v))},da.prototype.touchmove=function(v){this._map.fire(new Pf(v.type,this._map,v))},da.prototype.touchend=function(v){this._map.fire(new Pf(v.type,this._map,v))},da.prototype.touchcancel=function(v){this._map.fire(new Pf(v.type,this._map,v))},da.prototype._firePreventable=function(v){if(this._map.fire(v),v.defaultPrevented)return{}},da.prototype.isEnabled=function(){return!0},da.prototype.isActive=function(){return!1},da.prototype.enable=function(){},da.prototype.disable=function(){};var Xr=function(v){this._map=v};Xr.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},Xr.prototype.mousemove=function(v){this._map.fire(new ko(v.type,this._map,v))},Xr.prototype.mousedown=function(){this._delayContextMenu=!0},Xr.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new ko("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},Xr.prototype.contextmenu=function(v){this._delayContextMenu?this._contextMenuEvent=v:this._map.fire(new ko(v.type,this._map,v)),this._map.listens("contextmenu")&&v.preventDefault()},Xr.prototype.isEnabled=function(){return!0},Xr.prototype.isActive=function(){return!1},Xr.prototype.enable=function(){},Xr.prototype.disable=function(){};var As=function(v,w){this._map=v,this._el=v.getCanvasContainer(),this._container=v.getContainer(),this._clickTolerance=w.clickTolerance||1};function Cc(v,w){for(var b={},A=0;Athis.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=v.timeStamp),b.length===this.numTouches&&(this.centroid=function(A){for(var F=new S.Point(0,0),K=0,Q=A;K30)&&(this.aborted=!0)}}},Qu.prototype.touchend=function(v,w,b){if((!this.centroid||v.timeStamp-this.startTime>500)&&(this.aborted=!0),b.length===0){var A=!this.aborted&&this.centroid;if(this.reset(),A)return A}};var lu=function(v){this.singleTap=new Qu(v),this.numTaps=v.numTaps,this.reset()};lu.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},lu.prototype.touchstart=function(v,w,b){this.singleTap.touchstart(v,w,b)},lu.prototype.touchmove=function(v,w,b){this.singleTap.touchmove(v,w,b)},lu.prototype.touchend=function(v,w,b){var A=this.singleTap.touchend(v,w,b);if(A){var F=v.timeStamp-this.lastTime<500,K=!this.lastTap||this.lastTap.dist(A)<30;if(F&&K||this.reset(),this.count++,this.lastTime=v.timeStamp,this.lastTap=A,this.count===this.numTaps)return this.reset(),A}};var Va=function(){this._zoomIn=new lu({numTouches:1,numTaps:2}),this._zoomOut=new lu({numTouches:2,numTaps:1}),this.reset()};Va.prototype.reset=function(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()},Va.prototype.touchstart=function(v,w,b){this._zoomIn.touchstart(v,w,b),this._zoomOut.touchstart(v,w,b)},Va.prototype.touchmove=function(v,w,b){this._zoomIn.touchmove(v,w,b),this._zoomOut.touchmove(v,w,b)},Va.prototype.touchend=function(v,w,b){var A=this,F=this._zoomIn.touchend(v,w,b),K=this._zoomOut.touchend(v,w,b);return F?(this._active=!0,v.preventDefault(),setTimeout(function(){return A.reset()},0),{cameraAnimation:function(Q){return Q.easeTo({duration:300,zoom:Q.getZoom()+1,around:Q.unproject(F)},{originalEvent:v})}}):K?(this._active=!0,v.preventDefault(),setTimeout(function(){return A.reset()},0),{cameraAnimation:function(Q){return Q.easeTo({duration:300,zoom:Q.getZoom()-1,around:Q.unproject(K)},{originalEvent:v})}}):void 0},Va.prototype.touchcancel=function(){this.reset()},Va.prototype.enable=function(){this._enabled=!0},Va.prototype.disable=function(){this._enabled=!1,this.reset()},Va.prototype.isEnabled=function(){return this._enabled},Va.prototype.isActive=function(){return this._active};var Lf={0:1,2:2},wr=function(v){this.reset(),this._clickTolerance=v.clickTolerance||1};wr.prototype.blur=function(){this.reset()},wr.prototype.reset=function(){this._active=!1,this._moved=!1,delete this._lastPoint,delete this._eventButton},wr.prototype._correctButton=function(v,w){return!1},wr.prototype._move=function(v,w){return{}},wr.prototype.mousedown=function(v,w){if(!this._lastPoint){var b=le.mouseButton(v);this._correctButton(v,b)&&(this._lastPoint=w,this._eventButton=b)}},wr.prototype.mousemoveWindow=function(v,w){var b=this._lastPoint;if(b){if(v.preventDefault(),function(A,F){var K=Lf[F];return A.buttons===void 0||(A.buttons&K)!==K}(v,this._eventButton))this.reset();else if(this._moved||!(w.dist(b)0&&(this._active=!0);var A=Cc(b,w),F=new S.Point(0,0),K=new S.Point(0,0),Q=0;for(var ae in A){var we=A[ae],Oe=this._touches[ae];Oe&&(F._add(we),K._add(we.sub(Oe)),Q++,A[ae]=we)}if(this._touches=A,!(QMath.abs(v.x)}var Ou=function(v){function w(){v.apply(this,arguments)}return v&&(w.__proto__=v),(w.prototype=Object.create(v&&v.prototype)).constructor=w,w.prototype.reset=function(){v.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},w.prototype._start=function(b){this._lastPoints=b,sl(b[0].sub(b[1]))&&(this._valid=!1)},w.prototype._move=function(b,A,F){var K=b[0].sub(this._lastPoints[0]),Q=b[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(K,Q,F.timeStamp),this._valid)return this._lastPoints=b,this._active=!0,{pitchDelta:(K.y+Q.y)/2*-.5}},w.prototype.gestureBeginsVertically=function(b,A,F){if(this._valid!==void 0)return this._valid;var K=b.mag()>=2,Q=A.mag()>=2;if(K||Q){if(!K||!Q)return this._firstMove===void 0&&(this._firstMove=F),F-this._firstMove<100&&void 0;var ae=b.y>0==A.y>0;return sl(b)&&sl(A)&&ae}},w}(wa),Rf={panStep:100,bearingStep:15,pitchStep:10},el=function(){var v=Rf;this._panStep=v.panStep,this._bearingStep=v.bearingStep,this._pitchStep=v.pitchStep,this._rotationDisabled=!1};function Ds(v){return v*(2-v)}el.prototype.blur=function(){this.reset()},el.prototype.reset=function(){this._active=!1},el.prototype.keydown=function(v){var w=this;if(!(v.altKey||v.ctrlKey||v.metaKey)){var b=0,A=0,F=0,K=0,Q=0;switch(v.keyCode){case 61:case 107:case 171:case 187:b=1;break;case 189:case 109:case 173:b=-1;break;case 37:v.shiftKey?A=-1:(v.preventDefault(),K=-1);break;case 39:v.shiftKey?A=1:(v.preventDefault(),K=1);break;case 38:v.shiftKey?F=1:(v.preventDefault(),Q=-1);break;case 40:v.shiftKey?F=-1:(v.preventDefault(),Q=1);break;default:return}return this._rotationDisabled&&(A=0,F=0),{cameraAnimation:function(ae){var we=ae.getZoom();ae.easeTo({duration:300,easeId:"keyboardHandler",easing:Ds,zoom:b?Math.round(we)+b*(v.shiftKey?2:1):we,bearing:ae.getBearing()+A*w._bearingStep,pitch:ae.getPitch()+F*w._pitchStep,offset:[-K*w._panStep,-Q*w._panStep],center:ae.getCenter()},{originalEvent:v})}}}},el.prototype.enable=function(){this._enabled=!0},el.prototype.disable=function(){this._enabled=!1,this.reset()},el.prototype.isEnabled=function(){return this._enabled},el.prototype.isActive=function(){return this._active},el.prototype.disableRotation=function(){this._rotationDisabled=!0},el.prototype.enableRotation=function(){this._rotationDisabled=!1};var mi=function(v,w){this._map=v,this._el=v.getCanvasContainer(),this._handler=w,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=1/450,S.bindAll(["_onTimeout"],this)};mi.prototype.setZoomRate=function(v){this._defaultZoomRate=v},mi.prototype.setWheelZoomRate=function(v){this._wheelZoomRate=v},mi.prototype.isEnabled=function(){return!!this._enabled},mi.prototype.isActive=function(){return!!this._active||this._finishTimeout!==void 0},mi.prototype.isZooming=function(){return!!this._zooming},mi.prototype.enable=function(v){this.isEnabled()||(this._enabled=!0,this._aroundCenter=v&&v.around==="center")},mi.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},mi.prototype.wheel=function(v){if(this.isEnabled()){var w=v.deltaMode===S.window.WheelEvent.DOM_DELTA_LINE?40*v.deltaY:v.deltaY,b=S.browser.now(),A=b-(this._lastWheelEventTime||0);this._lastWheelEventTime=b,w!==0&&w%4.000244140625==0?this._type="wheel":w!==0&&Math.abs(w)<4?this._type="trackpad":A>400?(this._type=null,this._lastValue=w,this._timeout=setTimeout(this._onTimeout,40,v)):this._type||(this._type=Math.abs(A*w)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,w+=this._lastValue)),v.shiftKey&&w&&(w/=4),this._type&&(this._lastWheelEvent=v,this._delta-=w,this._active||this._start(v)),v.preventDefault()}},mi.prototype._onTimeout=function(v){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(v)},mi.prototype._start=function(v){if(this._delta){this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);var w=le.mousePos(this._el,v);this._around=S.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(w)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},mi.prototype.renderFrame=function(){var v=this;if(this._frameId&&(this._frameId=null,this.isActive())){var w=this._map.transform;if(this._delta!==0){var b=this._type==="wheel"&&Math.abs(this._delta)>4.000244140625?this._wheelZoomRate:this._defaultZoomRate,A=2/(1+Math.exp(-Math.abs(this._delta*b)));this._delta<0&&A!==0&&(A=1/A);var F=typeof this._targetZoom=="number"?w.zoomScale(this._targetZoom):w.scale;this._targetZoom=Math.min(w.maxZoom,Math.max(w.minZoom,w.scaleZoom(F*A))),this._type==="wheel"&&(this._startZoom=w.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var K,Q=typeof this._targetZoom=="number"?this._targetZoom:w.zoom,ae=this._startZoom,we=this._easing,Oe=!1;if(this._type==="wheel"&&ae&&we){var We=Math.min((S.browser.now()-this._lastWheelEventTime)/200,1),Ve=we(We);K=S.number(ae,Q,Ve),We<1?this._frameId||(this._frameId=!0):Oe=!0}else K=Q,Oe=!0;return this._active=!0,Oe&&(this._active=!1,this._finishTimeout=setTimeout(function(){v._zooming=!1,v._handler._triggerRenderFrame(),delete v._targetZoom,delete v._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!Oe,zoomDelta:K-w.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},mi.prototype._smoothOutEasing=function(v){var w=S.ease;if(this._prevEase){var b=this._prevEase,A=(S.browser.now()-b.start)/b.duration,F=b.easing(A+.01)-b.easing(A),K=.27/Math.sqrt(F*F+1e-4)*.01,Q=Math.sqrt(.0729-K*K);w=S.bezier(K,Q,.25,1)}return this._prevEase={start:S.browser.now(),duration:v,easing:w},w},mi.prototype.blur=function(){this.reset()},mi.prototype.reset=function(){this._active=!1};var Hc=function(v,w){this._clickZoom=v,this._tapZoom=w};Hc.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},Hc.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},Hc.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},Hc.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var ec=function(){this.reset()};ec.prototype.reset=function(){this._active=!1},ec.prototype.blur=function(){this.reset()},ec.prototype.dblclick=function(v,w){return v.preventDefault(),{cameraAnimation:function(b){b.easeTo({duration:300,zoom:b.getZoom()+(v.shiftKey?-1:1),around:b.unproject(w)},{originalEvent:v})}}},ec.prototype.enable=function(){this._enabled=!0},ec.prototype.disable=function(){this._enabled=!1,this.reset()},ec.prototype.isEnabled=function(){return this._enabled},ec.prototype.isActive=function(){return this._active};var ro=function(){this._tap=new lu({numTouches:1,numTaps:1}),this.reset()};ro.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},ro.prototype.touchstart=function(v,w,b){this._swipePoint||(this._tapTime&&v.timeStamp-this._tapTime>500&&this.reset(),this._tapTime?b.length>0&&(this._swipePoint=w[0],this._swipeTouch=b[0].identifier):this._tap.touchstart(v,w,b))},ro.prototype.touchmove=function(v,w,b){if(this._tapTime){if(this._swipePoint){if(b[0].identifier!==this._swipeTouch)return;var A=w[0],F=A.y-this._swipePoint.y;return this._swipePoint=A,v.preventDefault(),this._active=!0,{zoomDelta:F/128}}}else this._tap.touchmove(v,w,b)},ro.prototype.touchend=function(v,w,b){this._tapTime?this._swipePoint&&b.length===0&&this.reset():this._tap.touchend(v,w,b)&&(this._tapTime=v.timeStamp)},ro.prototype.touchcancel=function(){this.reset()},ro.prototype.enable=function(){this._enabled=!0},ro.prototype.disable=function(){this._enabled=!1,this.reset()},ro.prototype.isEnabled=function(){return this._enabled},ro.prototype.isActive=function(){return this._active};var Bo=function(v,w,b){this._el=v,this._mousePan=w,this._touchPan=b};Bo.prototype.enable=function(v){this._inertiaOptions=v||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},Bo.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},Bo.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},Bo.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var Sa=function(v,w,b){this._pitchWithRotate=v.pitchWithRotate,this._mouseRotate=w,this._mousePitch=b};Sa.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},Sa.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},Sa.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},Sa.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var je=function(v,w,b,A){this._el=v,this._touchZoom=w,this._touchRotate=b,this._tapDragZoom=A,this._rotationDisabled=!1,this._enabled=!0};je.prototype.enable=function(v){this._touchZoom.enable(v),this._rotationDisabled||this._touchRotate.enable(v),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")},je.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},je.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},je.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},je.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},je.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var Si=function(v){return v.zoom||v.drag||v.pitch||v.rotate},Ra=function(v){function w(){v.apply(this,arguments)}return v&&(w.__proto__=v),(w.prototype=Object.create(v&&v.prototype)).constructor=w,w}(S.Event);function Fr(v){return v.panDelta&&v.panDelta.mag()||v.zoomDelta||v.bearingDelta||v.pitchDelta}var Sr=function(v,w){this._map=v,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Ju(v),this._bearingSnap=w.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(w),S.bindAll(["handleEvent","handleWindowEvent"],this);var b=this._el;this._listeners=[[b,"touchstart",{passive:!0}],[b,"touchmove",{passive:!1}],[b,"touchend",void 0],[b,"touchcancel",void 0],[b,"mousedown",void 0],[b,"mousemove",void 0],[b,"mouseup",void 0],[S.window.document,"mousemove",{capture:!0}],[S.window.document,"mouseup",void 0],[b,"mouseover",void 0],[b,"mouseout",void 0],[b,"dblclick",void 0],[b,"click",void 0],[b,"keydown",{capture:!1}],[b,"keyup",void 0],[b,"wheel",{passive:!1}],[b,"contextmenu",void 0],[S.window,"blur",void 0]];for(var A=0,F=this._listeners;AQ?Math.min(2,Zt):Math.max(.5,Zt),Gr=Math.pow(Kr,1-yr),dn=K.unproject(rr.add(Jt.mult(yr*Gr)).mult(br));K.setLocationAtPoint(K.renderWorldCopies?dn.wrap():dn,vt)}F._fireMoveEvents(A)},function(yr){F._afterEase(A,yr)},b),this},w.prototype._prepareEase=function(b,A,F){F===void 0&&(F={}),this._moving=!0,A||F.moving||this.fire(new S.Event("movestart",b)),this._zooming&&!F.zooming&&this.fire(new S.Event("zoomstart",b)),this._rotating&&!F.rotating&&this.fire(new S.Event("rotatestart",b)),this._pitching&&!F.pitching&&this.fire(new S.Event("pitchstart",b))},w.prototype._fireMoveEvents=function(b){this.fire(new S.Event("move",b)),this._zooming&&this.fire(new S.Event("zoom",b)),this._rotating&&this.fire(new S.Event("rotate",b)),this._pitching&&this.fire(new S.Event("pitch",b))},w.prototype._afterEase=function(b,A){if(!this._easeId||!A||this._easeId!==A){delete this._easeId;var F=this._zooming,K=this._rotating,Q=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,F&&this.fire(new S.Event("zoomend",b)),K&&this.fire(new S.Event("rotateend",b)),Q&&this.fire(new S.Event("pitchend",b)),this.fire(new S.Event("moveend",b))}},w.prototype.flyTo=function(b,A){var F=this;if(!b.essential&&S.browser.prefersReducedMotion){var K=S.pick(b,["center","zoom","bearing","pitch","around"]);return this.jumpTo(K,A)}this.stop(),b=S.extend({offset:[0,0],speed:1.2,curve:1.42,easing:S.ease},b);var Q=this.transform,ae=this.getZoom(),we=this.getBearing(),Oe=this.getPitch(),We=this.getPadding(),Ve="zoom"in b?S.clamp(+b.zoom,Q.minZoom,Q.maxZoom):ae,Xe="bearing"in b?this._normalizeBearing(b.bearing,we):we,ht="pitch"in b?+b.pitch:Oe,lt="padding"in b?b.padding:Q.padding,vt=Q.zoomScale(Ve-ae),nt=S.Point.convert(b.offset),bt=Q.centerPoint.add(nt),kt=Q.pointLocation(bt),Nt=S.LngLat.convert(b.center||kt);this._normalizeCenter(Nt);var rr=Q.project(kt),Jt=Q.project(Nt).sub(rr),Zt=b.curve,mr=Math.max(Q.width,Q.height),yr=mr/vt,br=Jt.mag();if("minZoom"in b){var Kr=S.clamp(Math.min(b.minZoom,ae,Ve),Q.minZoom,Q.maxZoom),Gr=mr/Q.zoomScale(Kr-ae);Zt=Math.sqrt(Gr/br*2)}var dn=Zt*Zt;function pn(bn){var Sn=(yr*yr-mr*mr+(bn?-1:1)*dn*dn*br*br)/(2*(bn?yr:mr)*dn*br);return Math.log(Math.sqrt(Sn*Sn+1)-Sn)}function Un(bn){return(Math.exp(bn)-Math.exp(-bn))/2}function Yr(bn){return(Math.exp(bn)+Math.exp(-bn))/2}var Rn=pn(0),Yn=function(bn){return Yr(Rn)/Yr(Rn+Zt*bn)},Pn=function(bn){return mr*((Yr(Rn)*(Un(Sn=Rn+Zt*bn)/Yr(Sn))-Un(Rn))/dn)/br;var Sn},Fn=(pn(1)-Rn)/Zt;if(Math.abs(br)<1e-6||!isFinite(Fn)){if(Math.abs(mr-yr)<1e-6)return this.easeTo(b,A);var $n=yrb.maxDuration&&(b.duration=0),this._zooming=!0,this._rotating=we!==Xe,this._pitching=ht!==Oe,this._padding=!Q.isPaddingEqual(lt),this._prepareEase(A,!1),this._ease(function(bn){var Sn=bn*Fn,Fa=1/Yn(Sn);Q.zoom=bn===1?Ve:ae+Q.scaleZoom(Fa),F._rotating&&(Q.bearing=S.number(we,Xe,bn)),F._pitching&&(Q.pitch=S.number(Oe,ht,bn)),F._padding&&(Q.interpolatePadding(We,lt,bn),bt=Q.centerPoint.add(nt));var Io=bn===1?Nt:Q.unproject(rr.add(Jt.mult(Pn(Sn))).mult(Fa));Q.setLocationAtPoint(Q.renderWorldCopies?Io.wrap():Io,bt),F._fireMoveEvents(A)},function(){return F._afterEase(A)},b),this},w.prototype.isEasing=function(){return!!this._easeFrameId},w.prototype.stop=function(){return this._stop()},w.prototype._stop=function(b,A){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var F=this._onEaseEnd;delete this._onEaseEnd,F.call(this,A)}if(!b){var K=this.handlers;K&&K.stop(!1)}return this},w.prototype._ease=function(b,A,F){F.animate===!1||F.duration===0?(b(1),A()):(this._easeStart=S.browser.now(),this._easeOptions=F,this._onEaseFrame=b,this._onEaseEnd=A,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},w.prototype._renderFrameCallback=function(){var b=Math.min((S.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(b)),b<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},w.prototype._normalizeBearing=function(b,A){b=S.wrap(b,-180,180);var F=Math.abs(b-A);return Math.abs(b-360-A)180?-360:F<-180?360:0}},w}(S.Evented),Os=function(v){v===void 0&&(v={}),this.options=v,S.bindAll(["_toggleAttribution","_updateEditLink","_updateData","_updateCompact"],this)};Os.prototype.getDefaultPosition=function(){return"bottom-right"},Os.prototype.onAdd=function(v){var w=this.options&&this.options.compact;return this._map=v,this._container=le.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._compactButton=le.create("button","mapboxgl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=le.create("div","mapboxgl-ctrl-attrib-inner",this._container),this._innerContainer.setAttribute("role","list"),w&&this._container.classList.add("mapboxgl-compact"),this._updateAttributions(),this._updateEditLink(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("moveend",this._updateEditLink),w===void 0&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},Os.prototype.onRemove=function(){le.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("moveend",this._updateEditLink),this._map.off("resize",this._updateCompact),this._map=void 0,this._attribHTML=void 0},Os.prototype._setElementTitle=function(v,w){var b=this._map._getUIString("AttributionControl."+w);v.title=b,v.setAttribute("aria-label",b)},Os.prototype._toggleAttribution=function(){this._container.classList.contains("mapboxgl-compact-show")?(this._container.classList.remove("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-pressed","false")):(this._container.classList.add("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-pressed","true"))},Os.prototype._updateEditLink=function(){var v=this._editLink;v||(v=this._editLink=this._container.querySelector(".mapbox-improve-map"));var w=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||S.config.ACCESS_TOKEN}];if(v){var b=w.reduce(function(A,F,K){return F.value&&(A+=F.key+"="+F.value+(K=0)return!1;return!0})).join(" | ");Q!==this._attribHTML&&(this._attribHTML=Q,v.length?(this._innerContainer.innerHTML=Q,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}},Os.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact","mapboxgl-compact-show")};var Iu=function(){S.bindAll(["_updateLogo"],this),S.bindAll(["_updateCompact"],this)};Iu.prototype.onAdd=function(v){this._map=v,this._container=le.create("div","mapboxgl-ctrl");var w=le.create("a","mapboxgl-ctrl-logo");return w.target="_blank",w.rel="noopener nofollow",w.href="https://www.mapbox.com/",w.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),w.setAttribute("rel","noopener nofollow"),this._container.appendChild(w),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},Iu.prototype.onRemove=function(){le.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},Iu.prototype.getDefaultPosition=function(){return"bottom-left"},Iu.prototype._updateLogo=function(v){v&&v.sourceDataType!=="metadata"||(this._container.style.display=this._logoRequired()?"block":"none")},Iu.prototype._logoRequired=function(){if(this._map.style){var v=this._map.style.sourceCaches;for(var w in v)if(v[w].getSource().mapbox_logo)return!0;return!1}},Iu.prototype._updateCompact=function(){var v=this._container.children;if(v.length){var w=v[0];this._map.getCanvasContainer().offsetWidth<250?w.classList.add("mapboxgl-compact"):w.classList.remove("mapboxgl-compact")}};var pa=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};pa.prototype.add=function(v){var w=++this._id;return this._queue.push({callback:v,id:w,cancelled:!1}),w},pa.prototype.remove=function(v){for(var w=this._currentlyRunning,b=0,A=w?this._queue.concat(w):this._queue;bA.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(A.minPitch!=null&&A.maxPitch!=null&&A.minPitch>A.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(A.minPitch!=null&&A.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(A.maxPitch!=null&&A.maxPitch>60)throw new Error("maxPitch must be less than or equal to 60");var K=new pi(A.minZoom,A.maxZoom,A.minPitch,A.maxPitch,A.renderWorldCopies);if(v.call(this,K,A),this._interactive=A.interactive,this._maxTileCacheSize=A.maxTileCacheSize,this._failIfMajorPerformanceCaveat=A.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=A.preserveDrawingBuffer,this._antialias=A.antialias,this._trackResize=A.trackResize,this._bearingSnap=A.bearingSnap,this._refreshExpiredTiles=A.refreshExpiredTiles,this._fadeDuration=A.fadeDuration,this._crossSourceCollisions=A.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=A.collectResourceTiming,this._renderTaskQueue=new pa,this._controls=[],this._mapId=S.uniqueId(),this._locale=S.extend({},tc,A.locale),this._clickTolerance=A.clickTolerance,this._requestManager=new S.RequestManager(A.transformRequest,A.accessToken),typeof A.container=="string"){if(this._container=S.window.document.getElementById(A.container),!this._container)throw new Error("Container '"+A.container+"' not found.")}else{if(!(A.container instanceof ih))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=A.container}if(A.maxBounds&&this.setMaxBounds(A.maxBounds),S.bindAll(["_onWindowOnline","_onWindowResize","_onMapScroll","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),this.painter===void 0)throw new Error("Failed to initialize WebGL.");this.on("move",function(){return F._update(!1)}),this.on("moveend",function(){return F._update(!1)}),this.on("zoom",function(){return F._update(!0)}),S.window!==void 0&&(S.window.addEventListener("online",this._onWindowOnline,!1),S.window.addEventListener("resize",this._onWindowResize,!1),S.window.addEventListener("orientationchange",this._onWindowResize,!1)),this.handlers=new Sr(this,A),this._hash=A.hash&&new La(typeof A.hash=="string"&&A.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:A.center,zoom:A.zoom,bearing:A.bearing,pitch:A.pitch}),A.bounds&&(this.resize(),this.fitBounds(A.bounds,S.extend({},A.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=A.localIdeographFontFamily,A.style&&this.setStyle(A.style,{localIdeographFontFamily:A.localIdeographFontFamily}),A.attributionControl&&this.addControl(new Os({customAttribution:A.customAttribution})),this.addControl(new Iu,A.logoPosition),this.on("style.load",function(){F.transform.unmodified&&F.jumpTo(F.style.stylesheet)}),this.on("data",function(Q){F._update(Q.dataType==="style"),F.fire(new S.Event(Q.dataType+"data",Q))}),this.on("dataloading",function(Q){F.fire(new S.Event(Q.dataType+"dataloading",Q))})}v&&(w.__proto__=v),(w.prototype=Object.create(v&&v.prototype)).constructor=w;var b={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return w.prototype._getMapId=function(){return this._mapId},w.prototype.addControl=function(A,F){if(F===void 0&&(F=A.getDefaultPosition?A.getDefaultPosition():"top-right"),!A||!A.onAdd)return this.fire(new S.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));var K=A.onAdd(this);this._controls.push(A);var Q=this._controlPositions[F];return F.indexOf("bottom")!==-1?Q.insertBefore(K,Q.firstChild):Q.appendChild(K),this},w.prototype.removeControl=function(A){if(!A||!A.onRemove)return this.fire(new S.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));var F=this._controls.indexOf(A);return F>-1&&this._controls.splice(F,1),A.onRemove(this),this},w.prototype.hasControl=function(A){return this._controls.indexOf(A)>-1},w.prototype.resize=function(A){var F=this._containerDimensions(),K=F[0],Q=F[1];if(K===this.transform.width&&Q===this.transform.height)return this;this._resizeCanvas(K,Q),this.transform.resize(K,Q),this.painter.resize(K,Q);var ae=!this._moving;return ae&&this.fire(new S.Event("movestart",A)).fire(new S.Event("move",A)),this.fire(new S.Event("resize",A)),ae&&this.fire(new S.Event("moveend",A)),this},w.prototype.getBounds=function(){return this.transform.getBounds()},w.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},w.prototype.setMaxBounds=function(A){return this.transform.setMaxBounds(S.LngLatBounds.convert(A)),this._update()},w.prototype.setMinZoom=function(A){if((A=A??-2)>=-2&&A<=this.transform.maxZoom)return this.transform.minZoom=A,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=A,this._update(),this.getZoom()>A&&this.setZoom(A),this;throw new Error("maxZoom must be greater than the current minZoom")},w.prototype.getMaxZoom=function(){return this.transform.maxZoom},w.prototype.setMinPitch=function(A){if((A=A??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(A>=0&&A<=this.transform.maxPitch)return this.transform.minPitch=A,this._update(),this.getPitch()60)throw new Error("maxPitch must be less than or equal to 60");if(A>=this.transform.minPitch)return this.transform.maxPitch=A,this._update(),this.getPitch()>A&&this.setPitch(A),this;throw new Error("maxPitch must be greater than the current minPitch")},w.prototype.getMaxPitch=function(){return this.transform.maxPitch},w.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},w.prototype.setRenderWorldCopies=function(A){return this.transform.renderWorldCopies=A,this._update()},w.prototype.project=function(A){return this.transform.locationPoint(S.LngLat.convert(A))},w.prototype.unproject=function(A){return this.transform.pointLocation(S.Point.convert(A))},w.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},w.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},w.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},w.prototype._createDelegatedListener=function(A,F,K){var Q,ae=this;if(A==="mouseenter"||A==="mouseover"){var we=!1;return{layer:F,listener:K,delegates:{mousemove:function(We){var Ve=ae.getLayer(F)?ae.queryRenderedFeatures(We.point,{layers:[F]}):[];Ve.length?we||(we=!0,K.call(ae,new ko(A,ae,We.originalEvent,{features:Ve}))):we=!1},mouseout:function(){we=!1}}}}if(A==="mouseleave"||A==="mouseout"){var Oe=!1;return{layer:F,listener:K,delegates:{mousemove:function(We){(ae.getLayer(F)?ae.queryRenderedFeatures(We.point,{layers:[F]}):[]).length?Oe=!0:Oe&&(Oe=!1,K.call(ae,new ko(A,ae,We.originalEvent)))},mouseout:function(We){Oe&&(Oe=!1,K.call(ae,new ko(A,ae,We.originalEvent)))}}}}return{layer:F,listener:K,delegates:(Q={},Q[A]=function(We){var Ve=ae.getLayer(F)?ae.queryRenderedFeatures(We.point,{layers:[F]}):[];Ve.length&&(We.features=Ve,K.call(ae,We),delete We.features)},Q)}},w.prototype.on=function(A,F,K){if(K===void 0)return v.prototype.on.call(this,A,F);var Q=this._createDelegatedListener(A,F,K);for(var ae in this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[A]=this._delegatedListeners[A]||[],this._delegatedListeners[A].push(Q),Q.delegates)this.on(ae,Q.delegates[ae]);return this},w.prototype.once=function(A,F,K){if(K===void 0)return v.prototype.once.call(this,A,F);var Q=this._createDelegatedListener(A,F,K);for(var ae in Q.delegates)this.once(ae,Q.delegates[ae]);return this},w.prototype.off=function(A,F,K){var Q=this;return K===void 0?v.prototype.off.call(this,A,F):(this._delegatedListeners&&this._delegatedListeners[A]&&function(ae){for(var we=ae[A],Oe=0;Oe180;){var Q=b.locationPoint(v);if(Q.x>=0&&Q.y>=0&&Q.x<=b.width&&Q.y<=b.height)break;v.lng>b.center.lng?v.lng-=360:v.lng+=360}return v}ll.prototype.down=function(v,w){this.mouseRotate.mousedown(v,w),this.mousePitch&&this.mousePitch.mousedown(v,w),le.disableDrag()},ll.prototype.move=function(v,w){var b=this.map,A=this.mouseRotate.mousemoveWindow(v,w);if(A&&A.bearingDelta&&b.setBearing(b.getBearing()+A.bearingDelta),this.mousePitch){var F=this.mousePitch.mousemoveWindow(v,w);F&&F.pitchDelta&&b.setPitch(b.getPitch()+F.pitchDelta)}},ll.prototype.off=function(){var v=this.element;le.removeEventListener(v,"mousedown",this.mousedown),le.removeEventListener(v,"touchstart",this.touchstart,{passive:!1}),le.removeEventListener(v,"touchmove",this.touchmove),le.removeEventListener(v,"touchend",this.touchend),le.removeEventListener(v,"touchcancel",this.reset),this.offTemp()},ll.prototype.offTemp=function(){le.enableDrag(),le.removeEventListener(S.window,"mousemove",this.mousemove),le.removeEventListener(S.window,"mouseup",this.mouseup)},ll.prototype.mousedown=function(v){this.down(S.extend({},v,{ctrlKey:!0,preventDefault:function(){return v.preventDefault()}}),le.mousePos(this.element,v)),le.addEventListener(S.window,"mousemove",this.mousemove),le.addEventListener(S.window,"mouseup",this.mouseup)},ll.prototype.mousemove=function(v){this.move(v,le.mousePos(this.element,v))},ll.prototype.mouseup=function(v){this.mouseRotate.mouseupWindow(v),this.mousePitch&&this.mousePitch.mouseupWindow(v),this.offTemp()},ll.prototype.touchstart=function(v){v.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=le.touchPos(this.element,v.targetTouches)[0],this.down({type:"mousedown",button:0,ctrlKey:!0,preventDefault:function(){return v.preventDefault()}},this._startPos))},ll.prototype.touchmove=function(v){v.targetTouches.length!==1?this.reset():(this._lastPos=le.touchPos(this.element,v.targetTouches)[0],this.move({preventDefault:function(){return v.preventDefault()}},this._lastPos))},ll.prototype.touchend=function(v){v.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)=A}this._isDragging&&(this._pos=b.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new S.Event("dragstart"))),this.fire(new S.Event("drag")))},w.prototype._onUp=function(){this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),this._state==="active"&&this.fire(new S.Event("dragend")),this._state="inactive"},w.prototype._addDragHandler=function(b){this._element.contains(b.originalEvent.target)&&(b.preventDefault(),this._positionDelta=b.point.sub(this._pos).add(this._offset),this._pointerdownPos=b.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},w.prototype.setDraggable=function(b){return this._draggable=!!b,this._map&&(b?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this},w.prototype.isDraggable=function(){return this._draggable},w.prototype.setRotation=function(b){return this._rotation=b||0,this._update(),this},w.prototype.getRotation=function(){return this._rotation},w.prototype.setRotationAlignment=function(b){return this._rotationAlignment=b||"auto",this._update(),this},w.prototype.getRotationAlignment=function(){return this._rotationAlignment},w.prototype.setPitchAlignment=function(b){return this._pitchAlignment=b&&b!=="auto"?b:this._rotationAlignment,this._update(),this},w.prototype.getPitchAlignment=function(){return this._pitchAlignment},w}(S.Evented),ul={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},Ui=0,ka=!1,Ka=function(v){function w(b){v.call(this),this.options=S.extend({},ul,b),S.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker"],this)}return v&&(w.__proto__=v),(w.prototype=Object.create(v&&v.prototype)).constructor=w,w.prototype.onAdd=function(b){var A;return this._map=b,this._container=le.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),A=this._setupUI,pf!==void 0?A(pf):S.window.navigator.permissions!==void 0?S.window.navigator.permissions.query({name:"geolocation"}).then(function(F){A(pf=F.state!=="denied")}):A(pf=!!S.window.navigator.geolocation),this._container},w.prototype.onRemove=function(){this._geolocationWatchID!==void 0&&(S.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),le.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,Ui=0,ka=!1},w.prototype._isOutOfMapMaxBounds=function(b){var A=this._map.getMaxBounds(),F=b.coords;return A&&(F.longitudeA.getEast()||F.latitudeA.getNorth())},w.prototype._setErrorState=function(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting")}},w.prototype._onSuccess=function(b){if(this._map){if(this._isOutOfMapMaxBounds(b))return this._setErrorState(),this.fire(new S.Event("outofmaxbounds",b)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=b,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background")}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(b),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(b),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new S.Event("geolocate",b)),this._finish()}},w.prototype._updateCamera=function(b){var A=new S.LngLat(b.coords.longitude,b.coords.latitude),F=b.coords.accuracy,K=this._map.getBearing(),Q=S.extend({bearing:K},this.options.fitBoundsOptions);this._map.fitBounds(A.toBounds(F),Q,{geolocateSource:!0})},w.prototype._updateMarker=function(b){if(b){var A=new S.LngLat(b.coords.longitude,b.coords.latitude);this._accuracyCircleMarker.setLngLat(A).addTo(this._map),this._userLocationDotMarker.setLngLat(A).addTo(this._map),this._accuracy=b.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},w.prototype._updateCircleRadius=function(){var b=this._map._container.clientHeight/2,A=this._map.unproject([0,b]),F=this._map.unproject([1,b]),K=A.distanceTo(F),Q=Math.ceil(2*this._accuracy/K);this._circleElement.style.width=Q+"px",this._circleElement.style.height=Q+"px"},w.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},w.prototype._onError=function(b){if(this._map){if(this.options.trackUserLocation)if(b.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;var A=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=A,this._geolocateButton.setAttribute("aria-label",A),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(b.code===3&&ka)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new S.Event("error",b)),this._finish()}},w.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},w.prototype._setupUI=function(b){var A=this;if(this._container.addEventListener("contextmenu",function(Q){return Q.preventDefault()}),this._geolocateButton=le.create("button","mapboxgl-ctrl-geolocate",this._container),le.create("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden",!0),this._geolocateButton.type="button",b===!1){S.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");var F=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=F,this._geolocateButton.setAttribute("aria-label",F)}else{var K=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=K,this._geolocateButton.setAttribute("aria-label",K)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=le.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new cu(this._dotElement),this._circleElement=le.create("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new cu({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",function(Q){Q.geolocateSource||A._watchState!=="ACTIVE_LOCK"||Q.originalEvent&&Q.originalEvent.type==="resize"||(A._watchState="BACKGROUND",A._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),A._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),A.fire(new S.Event("trackuserlocationend")))})},w.prototype.trigger=function(){if(!this._setup)return S.warnOnce("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new S.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Ui--,ka=!1,this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this.fire(new S.Event("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new S.Event("trackuserlocationstart"))}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"BACKGROUND":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break;case"BACKGROUND_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error")}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){var b;this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),++Ui>1?(b={maximumAge:6e5,timeout:0},ka=!0):(b=this.options.positionOptions,ka=!1),this._geolocationWatchID=S.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,b)}}else S.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},w.prototype._clearWatch=function(){S.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)},w}(S.Evented),ui={maxWidth:100,unit:"metric"},zo=function(v){this.options=S.extend({},ui,v),S.bindAll(["_onMove","setUnit"],this)};function Pu(v,w,b){var A=b&&b.maxWidth||100,F=v._container.clientHeight/2,K=v.unproject([0,F]),Q=v.unproject([A,F]),ae=K.distanceTo(Q);if(b&&b.unit==="imperial"){var we=3.2808*ae;we>5280?cl(w,A,we/5280,v._getUIString("ScaleControl.Miles")):cl(w,A,we,v._getUIString("ScaleControl.Feet"))}else b&&b.unit==="nautical"?cl(w,A,ae/1852,v._getUIString("ScaleControl.NauticalMiles")):ae>=1e3?cl(w,A,ae/1e3,v._getUIString("ScaleControl.Kilometers")):cl(w,A,ae,v._getUIString("ScaleControl.Meters"))}function cl(v,w,b,A){var F,K,Q,ae=(F=b,(K=Math.pow(10,(""+Math.floor(F)).length-1))*(Q=(Q=F/K)>=10?10:Q>=5?5:Q>=3?3:Q>=2?2:Q>=1?1:function(we){var Oe=Math.pow(10,Math.ceil(-Math.log(we)/Math.LN10));return Math.round(we*Oe)/Oe}(Q)));v.style.width=w*(ae/b)+"px",v.innerHTML=ae+" "+A}zo.prototype.getDefaultPosition=function(){return"bottom-left"},zo.prototype._onMove=function(){Pu(this._map,this._container,this.options)},zo.prototype.onAdd=function(v){return this._map=v,this._container=le.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",v.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},zo.prototype.onRemove=function(){le.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},zo.prototype.setUnit=function(v){this.options.unit=v,Pu(this._map,this._container,this.options)};var Lu=function(v){this._fullscreen=!1,v&&v.container&&(v.container instanceof S.window.HTMLElement?this._container=v.container:S.warnOnce("Full screen control 'container' must be a DOM element.")),S.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in S.window.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in S.window.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in S.window.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in S.window.document&&(this._fullscreenchange="MSFullscreenChange")};Lu.prototype.onAdd=function(v){return this._map=v,this._container||(this._container=this._map.getContainer()),this._controlContainer=le.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",S.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},Lu.prototype.onRemove=function(){le.remove(this._controlContainer),this._map=null,S.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},Lu.prototype._checkFullscreenSupport=function(){return!!(S.window.document.fullscreenEnabled||S.window.document.mozFullScreenEnabled||S.window.document.msFullscreenEnabled||S.window.document.webkitFullscreenEnabled)},Lu.prototype._setupUI=function(){var v=this._fullscreenButton=le.create("button","mapboxgl-ctrl-fullscreen",this._controlContainer);le.create("span","mapboxgl-ctrl-icon",v).setAttribute("aria-hidden",!0),v.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),S.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},Lu.prototype._updateTitle=function(){var v=this._getTitle();this._fullscreenButton.setAttribute("aria-label",v),this._fullscreenButton.title=v},Lu.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},Lu.prototype._isFullscreen=function(){return this._fullscreen},Lu.prototype._changeIcon=function(){(S.window.document.fullscreenElement||S.window.document.mozFullScreenElement||S.window.document.webkitFullscreenElement||S.window.document.msFullscreenElement)===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())},Lu.prototype._onClickFullscreen=function(){this._isFullscreen()?S.window.document.exitFullscreen?S.window.document.exitFullscreen():S.window.document.mozCancelFullScreen?S.window.document.mozCancelFullScreen():S.window.document.msExitFullscreen?S.window.document.msExitFullscreen():S.window.document.webkitCancelFullScreen&&S.window.document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()};var oh={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px"},Vc=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", "),Od=function(v){function w(b){v.call(this),this.options=S.extend(Object.create(oh),b),S.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return v&&(w.__proto__=v),(w.prototype=Object.create(v&&v.prototype)).constructor=w,w.prototype.addTo=function(b){return this._map&&this.remove(),this._map=b,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")):this._map.on("move",this._update),this.fire(new S.Event("open")),this},w.prototype.isOpen=function(){return!!this._map},w.prototype.remove=function(){return this._content&&le.remove(this._content),this._container&&(le.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),delete this._map),this.fire(new S.Event("close")),this},w.prototype.getLngLat=function(){return this._lngLat},w.prototype.setLngLat=function(b){return this._lngLat=S.LngLat.convert(b),this._pos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.remove("mapboxgl-track-pointer")),this},w.prototype.trackPointer=function(){return this._trackPointer=!0,this._pos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")),this},w.prototype.getElement=function(){return this._container},w.prototype.setText=function(b){return this.setDOMContent(S.window.document.createTextNode(b))},w.prototype.setHTML=function(b){var A,F=S.window.document.createDocumentFragment(),K=S.window.document.createElement("body");for(K.innerHTML=b;A=K.firstChild;)F.appendChild(A);return this.setDOMContent(F)},w.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},w.prototype.setMaxWidth=function(b){return this.options.maxWidth=b,this._update(),this},w.prototype.setDOMContent=function(b){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=le.create("div","mapboxgl-popup-content",this._container);return this._content.appendChild(b),this._createCloseButton(),this._update(),this._focusFirstElement(),this},w.prototype.addClassName=function(b){this._container&&this._container.classList.add(b)},w.prototype.removeClassName=function(b){this._container&&this._container.classList.remove(b)},w.prototype.setOffset=function(b){return this.options.offset=b,this._update(),this},w.prototype.toggleClassName=function(b){if(this._container)return this._container.classList.toggle(b)},w.prototype._createCloseButton=function(){this.options.closeButton&&(this._closeButton=le.create("button","mapboxgl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.setAttribute("aria-label","Close popup"),this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))},w.prototype._onMouseUp=function(b){this._update(b.point)},w.prototype._onMouseMove=function(b){this._update(b.point)},w.prototype._onDrag=function(b){this._update(b.point)},w.prototype._update=function(b){var A=this;if(this._map&&(this._lngLat||this._trackPointer)&&this._content&&(this._container||(this._container=le.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=le.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach(function(Ve){return A._container.classList.add(Ve)}),this._trackPointer&&this._container.classList.add("mapboxgl-popup-track-pointer")),this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._map.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=Wc(this._lngLat,this._pos,this._map.transform)),!this._trackPointer||b)){var F=this._pos=this._trackPointer&&b?b:this._map.project(this._lngLat),K=this.options.anchor,Q=function Ve(Xe){if(Xe){if(typeof Xe=="number"){var ht=Math.round(Math.sqrt(.5*Math.pow(Xe,2)));return{center:new S.Point(0,0),top:new S.Point(0,Xe),"top-left":new S.Point(ht,ht),"top-right":new S.Point(-ht,ht),bottom:new S.Point(0,-Xe),"bottom-left":new S.Point(ht,-ht),"bottom-right":new S.Point(-ht,-ht),left:new S.Point(Xe,0),right:new S.Point(-Xe,0)}}if(Xe instanceof S.Point||Array.isArray(Xe)){var lt=S.Point.convert(Xe);return{center:lt,top:lt,"top-left":lt,"top-right":lt,bottom:lt,"bottom-left":lt,"bottom-right":lt,left:lt,right:lt}}return{center:S.Point.convert(Xe.center||[0,0]),top:S.Point.convert(Xe.top||[0,0]),"top-left":S.Point.convert(Xe["top-left"]||[0,0]),"top-right":S.Point.convert(Xe["top-right"]||[0,0]),bottom:S.Point.convert(Xe.bottom||[0,0]),"bottom-left":S.Point.convert(Xe["bottom-left"]||[0,0]),"bottom-right":S.Point.convert(Xe["bottom-right"]||[0,0]),left:S.Point.convert(Xe.left||[0,0]),right:S.Point.convert(Xe.right||[0,0])}}return Ve(new S.Point(0,0))}(this.options.offset);if(!K){var ae,we=this._container.offsetWidth,Oe=this._container.offsetHeight;ae=F.y+Q.bottom.ythis._map.transform.height-Oe?["bottom"]:[],F.xthis._map.transform.width-we/2&&ae.push("right"),K=ae.length===0?"bottom":ae.join("-")}var We=F.add(Q[K]).round();le.setTransform(this._container,no[K]+" translate("+We.x+"px,"+We.y+"px)"),Dd(this._container,K,"popup")}},w.prototype._focusFirstElement=function(){if(this.options.focusAfterOpen&&this._container){var b=this._container.querySelector(Vc);b&&b.focus()}},w.prototype._onClose=function(){this.remove()},w}(S.Evented),mf={version:S.version,supported:ve,setRTLTextPlugin:S.setRTLTextPlugin,getRTLTextPluginStatus:S.getRTLTextPluginStatus,Map:Mu,NavigationControl:uu,GeolocateControl:Ka,AttributionControl:Os,ScaleControl:zo,FullscreenControl:Lu,Popup:Od,Marker:cu,Style:Js,LngLat:S.LngLat,LngLatBounds:S.LngLatBounds,Point:S.Point,MercatorCoordinate:S.MercatorCoordinate,Evented:S.Evented,config:S.config,prewarm:function(){Fe().acquire(zt)},clearPrewarmedResources:function(){var v=Ae;v&&(v.isPreloaded()&&v.numActive()===1?(v.release(zt),Ae=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},get accessToken(){return S.config.ACCESS_TOKEN},set accessToken(v){S.config.ACCESS_TOKEN=v},get baseApiUrl(){return S.config.API_URL},set baseApiUrl(v){S.config.API_URL=v},get workerCount(){return hr.workerCount},set workerCount(v){hr.workerCount=v},get maxParallelImageRequests(){return S.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(v){S.config.MAX_PARALLEL_IMAGE_REQUESTS=v},clearStorage:function(v){S.clearTileCache(v)},workerUrl:""};return mf}),ie})})(i);var o=n;function a(q){if(typeof q=="string"){var U=q;if(q=document.getElementById(q),!q)throw new Error("No element with id "+U)}return q}function u(q){if(!/^#([0-9a-f]{3}){1,2}$/i.test(q)&&!/^[a-z]+$/i.test(q))throw new Error("Invalid color")}function h(q,U){var Z=41,te=27,ie=2,ue=new q.Marker()._element.querySelector("svg");ue.removeAttribute("display"),ue.setAttribute("xmlns","http://www.w3.org/2000/svg"),ue.setAttribute("height",Z),ue.setAttribute("width",te),ue.setAttribute("viewBox","0 0 "+te+" "+Z),u(U),ue.querySelector("*[fill='#3FB1CE']").setAttribute("fill",U);var S=ue.querySelectorAll("circle"),ve=S[S.length-1];if(S.length==1){var le=ve.cloneNode();le.setAttribute("fill","#000000"),le.setAttribute("opacity",.25),ve.parentNode.insertBefore(le,ve)}ve.setAttribute("r",4.5);var ge=new Image(te*ie,Z*ie);return ge.src="data:image/svg+xml;utf8,"+encodeURIComponent(ue.outerHTML),ge}var p={},_=function(U,Z,te,ie){var ue=this;!L.library&&typeof window<"u"&&(L.library=window.mapboxgl||window.maplibregl||null);var S=L.library;if(!S)throw new Error("No mapping library found");var ve,le={},ge={},Se=[],ye=0;U=a(U),U.id&&(p[U.id]=this);function be(he,ke,ze){var Wt=new XMLHttpRequest;Wt.open("GET",ke,!0),Wt.setRequestHeader("Content-Type","application/json"),Wt.onload=function(){Wt.status===200?ze(JSON.parse(Wt.responseText)):$(he,Wt.statusText)},Wt.send()}function Ue(he){ve.loaded()?he():ve.on("load",he)}function B(he){return typeof he=="number"?he:new Date(he).getTime()/1e3}function re(he,ke,ze){for(var Wt=0;Wtke.len&&le[ft].shift()}}function Qe(he){for(var ke={type:"FeatureCollection",features:[]},ze=0;ze=0;Wt--){var ft=ke[Wt];if(!(ft.metadata&&ft.metadata["mapbox:featureComponent"]==="place-labels"))break;ze=ft.id}return ze}function Ft(he,ke){var ze={};if(ve.addSource(he,{type:"geojson",data:ke}),ie==="point")ve.addLayer({id:he+"-text",source:he,type:"symbol",layout:{"text-field":"{label}","text-size":11,"text-anchor":"top","text-offset":[0,1]},paint:{"text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}}),ve.addLayer({id:he,source:he,type:"symbol",layout:{"icon-image":"{icon}-15","icon-allow-overlap":!0,"icon-size":{type:"identity",property:"mapkickIconSize"},"icon-anchor":{type:"identity",property:"mapkickIconAnchor"},"icon-offset":{type:"identity",property:"mapkickIconOffset"}}});else{var Wt=xt(ve),ft=he+"-outline";ve.addLayer({id:ft,source:he,type:"line",paint:{"line-color":{type:"identity",property:"mapkickColor"},"line-opacity":.7,"line-width":1}},Wt),ve.addLayer({id:he,source:he,type:"fill",paint:{"fill-color":{type:"identity",property:"mapkickColor"},"fill-opacity":.3}},ft);for(var qt=he+"-text",Bt=Ct(ke),vr=0;vr{var kH=function(r){"use strict";var e=Object.prototype,t=e.hasOwnProperty,n=Object.defineProperty||function(H,X,me){H[X]=me.value},i,o=typeof Symbol=="function"?Symbol:{},a=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",h=o.toStringTag||"@@toStringTag";function p(H,X,me){return Object.defineProperty(H,X,{value:me,enumerable:!0,configurable:!0,writable:!0}),H[X]}try{p({},"")}catch{p=function(X,me,G){return X[me]=G}}function _(H,X,me,G){var j=X&&X.prototype instanceof te?X:te,Me=Object.create(j.prototype),Ze=new N(G||[]);return n(Me,"_invoke",{value:be(H,me,Ze)}),Me}r.wrap=_;function T(H,X,me){try{return{type:"normal",arg:H.call(X,me)}}catch(G){return{type:"throw",arg:G}}}var O="suspendedStart",L="suspendedYield",q="executing",U="completed",Z={};function te(){}function ie(){}function ue(){}var S={};p(S,a,function(){return this});var ve=Object.getPrototypeOf,le=ve&&ve(ve($([])));le&&le!==e&&t.call(le,a)&&(S=le);var ge=ue.prototype=te.prototype=Object.create(S);ie.prototype=ue,n(ge,"constructor",{value:ue,configurable:!0}),n(ue,"constructor",{value:ie,configurable:!0}),ie.displayName=p(ue,h,"GeneratorFunction");function Se(H){["next","throw","return"].forEach(function(X){p(H,X,function(me){return this._invoke(X,me)})})}r.isGeneratorFunction=function(H){var X=typeof H=="function"&&H.constructor;return X?X===ie||(X.displayName||X.name)==="GeneratorFunction":!1},r.mark=function(H){return Object.setPrototypeOf?Object.setPrototypeOf(H,ue):(H.__proto__=ue,p(H,h,"GeneratorFunction")),H.prototype=Object.create(ge),H},r.awrap=function(H){return{__await:H}};function ye(H,X){function me(Me,Ze,Qe,Ct){var xt=T(H[Me],H,Ze);if(xt.type==="throw")Ct(xt.arg);else{var Ft=xt.arg,Ot=Ft.value;return Ot&&typeof Ot=="object"&&t.call(Ot,"__await")?X.resolve(Ot.__await).then(function(Yt){me("next",Yt,Qe,Ct)},function(Yt){me("throw",Yt,Qe,Ct)}):X.resolve(Ot).then(function(Yt){Ft.value=Yt,Qe(Ft)},function(Yt){return me("throw",Yt,Qe,Ct)})}}var G;function j(Me,Ze){function Qe(){return new X(function(Ct,xt){me(Me,Ze,Ct,xt)})}return G=G?G.then(Qe,Qe):Qe()}n(this,"_invoke",{value:j})}Se(ye.prototype),p(ye.prototype,u,function(){return this}),r.AsyncIterator=ye,r.async=function(H,X,me,G,j){j===void 0&&(j=Promise);var Me=new ye(_(H,X,me,G),j);return r.isGeneratorFunction(X)?Me:Me.next().then(function(Ze){return Ze.done?Ze.value:Me.next()})};function be(H,X,me){var G=O;return function(Me,Ze){if(G===q)throw new Error("Generator is already running");if(G===U){if(Me==="throw")throw Ze;return V()}for(me.method=Me,me.arg=Ze;;){var Qe=me.delegate;if(Qe){var Ct=Ue(Qe,me);if(Ct){if(Ct===Z)continue;return Ct}}if(me.method==="next")me.sent=me._sent=me.arg;else if(me.method==="throw"){if(G===O)throw G=U,me.arg;me.dispatchException(me.arg)}else me.method==="return"&&me.abrupt("return",me.arg);G=q;var xt=T(H,X,me);if(xt.type==="normal"){if(G=me.done?U:L,xt.arg===Z)continue;return{value:xt.arg,done:me.done}}else xt.type==="throw"&&(G=U,me.method="throw",me.arg=xt.arg)}}}function Ue(H,X){var me=X.method,G=H.iterator[me];if(G===i)return X.delegate=null,me==="throw"&&H.iterator.return&&(X.method="return",X.arg=i,Ue(H,X),X.method==="throw")||me!=="return"&&(X.method="throw",X.arg=new TypeError("The iterator does not provide a '"+me+"' method")),Z;var j=T(G,H.iterator,X.arg);if(j.type==="throw")return X.method="throw",X.arg=j.arg,X.delegate=null,Z;var Me=j.arg;if(!Me)return X.method="throw",X.arg=new TypeError("iterator result is not an object"),X.delegate=null,Z;if(Me.done)X[H.resultName]=Me.value,X.next=H.nextLoc,X.method!=="return"&&(X.method="next",X.arg=i);else return Me;return X.delegate=null,Z}Se(ge),p(ge,h,"Generator"),p(ge,a,function(){return this}),p(ge,"toString",function(){return"[object Generator]"});function B(H){var X={tryLoc:H[0]};1 in H&&(X.catchLoc=H[1]),2 in H&&(X.finallyLoc=H[2],X.afterLoc=H[3]),this.tryEntries.push(X)}function re(H){var X=H.completion||{};X.type="normal",delete X.arg,H.completion=X}function N(H){this.tryEntries=[{tryLoc:"root"}],H.forEach(B,this),this.reset(!0)}r.keys=function(H){var X=Object(H),me=[];for(var G in X)me.push(G);return me.reverse(),function j(){for(;me.length;){var Me=me.pop();if(Me in X)return j.value=Me,j.done=!1,j}return j.done=!0,j}};function $(H){if(H){var X=H[a];if(X)return X.call(H);if(typeof H.next=="function")return H;if(!isNaN(H.length)){var me=-1,G=function j(){for(;++me=0;--G){var j=this.tryEntries[G],Me=j.completion;if(j.tryLoc==="root")return me("end");if(j.tryLoc<=this.prev){var Ze=t.call(j,"catchLoc"),Qe=t.call(j,"finallyLoc");if(Ze&&Qe){if(this.prev=0;--me){var G=this.tryEntries[me];if(G.tryLoc<=this.prev&&t.call(G,"finallyLoc")&&this.prev=0;--X){var me=this.tryEntries[X];if(me.finallyLoc===H)return this.complete(me.completion,me.afterLoc),re(me),Z}},catch:function(H){for(var X=this.tryEntries.length-1;X>=0;--X){var me=this.tryEntries[X];if(me.tryLoc===H){var G=me.completion;if(G.type==="throw"){var j=G.arg;re(me)}return j}}throw new Error("illegal catch attempt")},delegateYield:function(H,X,me){return this.delegate={iterator:$(H),resultName:X,nextLoc:me},this.method==="next"&&(this.arg=i),Z}},r}(typeof TH=="object"?TH.exports:{});try{regeneratorRuntime=kH}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=kH:Function("r","regeneratorRuntime = r")(kH)}});var ube=de((lL,lbe)=>{(function(r,e){typeof lL=="object"&&typeof lbe<"u"?e(lL):typeof define=="function"&&define.amd?define(["exports"],e):e(r.ActiveStorage={})})(lL,function(r){"use strict";function e(V,H){return H={exports:{}},V(H,H.exports),H.exports}var t=e(function(V,H){(function(X){V.exports=X()})(function(X){var me=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function G(At,Et){var rt=At[0],he=At[1],ke=At[2],ze=At[3];rt+=(he&ke|~he&ze)+Et[0]-680876936|0,rt=(rt<<7|rt>>>25)+he|0,ze+=(rt&he|~rt&ke)+Et[1]-389564586|0,ze=(ze<<12|ze>>>20)+rt|0,ke+=(ze&rt|~ze&he)+Et[2]+606105819|0,ke=(ke<<17|ke>>>15)+ze|0,he+=(ke&ze|~ke&rt)+Et[3]-1044525330|0,he=(he<<22|he>>>10)+ke|0,rt+=(he&ke|~he&ze)+Et[4]-176418897|0,rt=(rt<<7|rt>>>25)+he|0,ze+=(rt&he|~rt&ke)+Et[5]+1200080426|0,ze=(ze<<12|ze>>>20)+rt|0,ke+=(ze&rt|~ze&he)+Et[6]-1473231341|0,ke=(ke<<17|ke>>>15)+ze|0,he+=(ke&ze|~ke&rt)+Et[7]-45705983|0,he=(he<<22|he>>>10)+ke|0,rt+=(he&ke|~he&ze)+Et[8]+1770035416|0,rt=(rt<<7|rt>>>25)+he|0,ze+=(rt&he|~rt&ke)+Et[9]-1958414417|0,ze=(ze<<12|ze>>>20)+rt|0,ke+=(ze&rt|~ze&he)+Et[10]-42063|0,ke=(ke<<17|ke>>>15)+ze|0,he+=(ke&ze|~ke&rt)+Et[11]-1990404162|0,he=(he<<22|he>>>10)+ke|0,rt+=(he&ke|~he&ze)+Et[12]+1804603682|0,rt=(rt<<7|rt>>>25)+he|0,ze+=(rt&he|~rt&ke)+Et[13]-40341101|0,ze=(ze<<12|ze>>>20)+rt|0,ke+=(ze&rt|~ze&he)+Et[14]-1502002290|0,ke=(ke<<17|ke>>>15)+ze|0,he+=(ke&ze|~ke&rt)+Et[15]+1236535329|0,he=(he<<22|he>>>10)+ke|0,rt+=(he&ze|ke&~ze)+Et[1]-165796510|0,rt=(rt<<5|rt>>>27)+he|0,ze+=(rt&ke|he&~ke)+Et[6]-1069501632|0,ze=(ze<<9|ze>>>23)+rt|0,ke+=(ze&he|rt&~he)+Et[11]+643717713|0,ke=(ke<<14|ke>>>18)+ze|0,he+=(ke&rt|ze&~rt)+Et[0]-373897302|0,he=(he<<20|he>>>12)+ke|0,rt+=(he&ze|ke&~ze)+Et[5]-701558691|0,rt=(rt<<5|rt>>>27)+he|0,ze+=(rt&ke|he&~ke)+Et[10]+38016083|0,ze=(ze<<9|ze>>>23)+rt|0,ke+=(ze&he|rt&~he)+Et[15]-660478335|0,ke=(ke<<14|ke>>>18)+ze|0,he+=(ke&rt|ze&~rt)+Et[4]-405537848|0,he=(he<<20|he>>>12)+ke|0,rt+=(he&ze|ke&~ze)+Et[9]+568446438|0,rt=(rt<<5|rt>>>27)+he|0,ze+=(rt&ke|he&~ke)+Et[14]-1019803690|0,ze=(ze<<9|ze>>>23)+rt|0,ke+=(ze&he|rt&~he)+Et[3]-187363961|0,ke=(ke<<14|ke>>>18)+ze|0,he+=(ke&rt|ze&~rt)+Et[8]+1163531501|0,he=(he<<20|he>>>12)+ke|0,rt+=(he&ze|ke&~ze)+Et[13]-1444681467|0,rt=(rt<<5|rt>>>27)+he|0,ze+=(rt&ke|he&~ke)+Et[2]-51403784|0,ze=(ze<<9|ze>>>23)+rt|0,ke+=(ze&he|rt&~he)+Et[7]+1735328473|0,ke=(ke<<14|ke>>>18)+ze|0,he+=(ke&rt|ze&~rt)+Et[12]-1926607734|0,he=(he<<20|he>>>12)+ke|0,rt+=(he^ke^ze)+Et[5]-378558|0,rt=(rt<<4|rt>>>28)+he|0,ze+=(rt^he^ke)+Et[8]-2022574463|0,ze=(ze<<11|ze>>>21)+rt|0,ke+=(ze^rt^he)+Et[11]+1839030562|0,ke=(ke<<16|ke>>>16)+ze|0,he+=(ke^ze^rt)+Et[14]-35309556|0,he=(he<<23|he>>>9)+ke|0,rt+=(he^ke^ze)+Et[1]-1530992060|0,rt=(rt<<4|rt>>>28)+he|0,ze+=(rt^he^ke)+Et[4]+1272893353|0,ze=(ze<<11|ze>>>21)+rt|0,ke+=(ze^rt^he)+Et[7]-155497632|0,ke=(ke<<16|ke>>>16)+ze|0,he+=(ke^ze^rt)+Et[10]-1094730640|0,he=(he<<23|he>>>9)+ke|0,rt+=(he^ke^ze)+Et[13]+681279174|0,rt=(rt<<4|rt>>>28)+he|0,ze+=(rt^he^ke)+Et[0]-358537222|0,ze=(ze<<11|ze>>>21)+rt|0,ke+=(ze^rt^he)+Et[3]-722521979|0,ke=(ke<<16|ke>>>16)+ze|0,he+=(ke^ze^rt)+Et[6]+76029189|0,he=(he<<23|he>>>9)+ke|0,rt+=(he^ke^ze)+Et[9]-640364487|0,rt=(rt<<4|rt>>>28)+he|0,ze+=(rt^he^ke)+Et[12]-421815835|0,ze=(ze<<11|ze>>>21)+rt|0,ke+=(ze^rt^he)+Et[15]+530742520|0,ke=(ke<<16|ke>>>16)+ze|0,he+=(ke^ze^rt)+Et[2]-995338651|0,he=(he<<23|he>>>9)+ke|0,rt+=(ke^(he|~ze))+Et[0]-198630844|0,rt=(rt<<6|rt>>>26)+he|0,ze+=(he^(rt|~ke))+Et[7]+1126891415|0,ze=(ze<<10|ze>>>22)+rt|0,ke+=(rt^(ze|~he))+Et[14]-1416354905|0,ke=(ke<<15|ke>>>17)+ze|0,he+=(ze^(ke|~rt))+Et[5]-57434055|0,he=(he<<21|he>>>11)+ke|0,rt+=(ke^(he|~ze))+Et[12]+1700485571|0,rt=(rt<<6|rt>>>26)+he|0,ze+=(he^(rt|~ke))+Et[3]-1894986606|0,ze=(ze<<10|ze>>>22)+rt|0,ke+=(rt^(ze|~he))+Et[10]-1051523|0,ke=(ke<<15|ke>>>17)+ze|0,he+=(ze^(ke|~rt))+Et[1]-2054922799|0,he=(he<<21|he>>>11)+ke|0,rt+=(ke^(he|~ze))+Et[8]+1873313359|0,rt=(rt<<6|rt>>>26)+he|0,ze+=(he^(rt|~ke))+Et[15]-30611744|0,ze=(ze<<10|ze>>>22)+rt|0,ke+=(rt^(ze|~he))+Et[6]-1560198380|0,ke=(ke<<15|ke>>>17)+ze|0,he+=(ze^(ke|~rt))+Et[13]+1309151649|0,he=(he<<21|he>>>11)+ke|0,rt+=(ke^(he|~ze))+Et[4]-145523070|0,rt=(rt<<6|rt>>>26)+he|0,ze+=(he^(rt|~ke))+Et[11]-1120210379|0,ze=(ze<<10|ze>>>22)+rt|0,ke+=(rt^(ze|~he))+Et[2]+718787259|0,ke=(ke<<15|ke>>>17)+ze|0,he+=(ze^(ke|~rt))+Et[9]-343485551|0,he=(he<<21|he>>>11)+ke|0,At[0]=rt+At[0]|0,At[1]=he+At[1]|0,At[2]=ke+At[2]|0,At[3]=ze+At[3]|0}function j(At){var Et=[],rt;for(rt=0;rt<64;rt+=4)Et[rt>>2]=At.charCodeAt(rt)+(At.charCodeAt(rt+1)<<8)+(At.charCodeAt(rt+2)<<16)+(At.charCodeAt(rt+3)<<24);return Et}function Me(At){var Et=[],rt;for(rt=0;rt<64;rt+=4)Et[rt>>2]=At[rt]+(At[rt+1]<<8)+(At[rt+2]<<16)+(At[rt+3]<<24);return Et}function Ze(At){var Et=At.length,rt=[1732584193,-271733879,-1732584194,271733878],he,ke,ze,Wt,ft,qt;for(he=64;he<=Et;he+=64)G(rt,j(At.substring(he-64,he)));for(At=At.substring(he-64),ke=At.length,ze=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],he=0;he>2]|=At.charCodeAt(he)<<(he%4<<3);if(ze[he>>2]|=128<<(he%4<<3),he>55)for(G(rt,ze),he=0;he<16;he+=1)ze[he]=0;return Wt=Et*8,Wt=Wt.toString(16).match(/(.*?)(.{0,8})$/),ft=parseInt(Wt[2],16),qt=parseInt(Wt[1],16)||0,ze[14]=ft,ze[15]=qt,G(rt,ze),rt}function Qe(At){var Et=At.length,rt=[1732584193,-271733879,-1732584194,271733878],he,ke,ze,Wt,ft,qt;for(he=64;he<=Et;he+=64)G(rt,Me(At.subarray(he-64,he)));for(At=he-64>2]|=At[he]<<(he%4<<3);if(ze[he>>2]|=128<<(he%4<<3),he>55)for(G(rt,ze),he=0;he<16;he+=1)ze[he]=0;return Wt=Et*8,Wt=Wt.toString(16).match(/(.*?)(.{0,8})$/),ft=parseInt(Wt[2],16),qt=parseInt(Wt[1],16)||0,ze[14]=ft,ze[15]=qt,G(rt,ze),rt}function Ct(At){var Et="",rt;for(rt=0;rt<4;rt+=1)Et+=me[At>>rt*8+4&15]+me[At>>rt*8&15];return Et}function xt(At){var Et;for(Et=0;Etze?new ArrayBuffer(0):(Wt=ze-ke,ft=new ArrayBuffer(Wt),qt=new Uint8Array(ft),Bt=new Uint8Array(this,ke,Wt),qt.set(Bt),ft)}}();function Ft(At){return/[\u0080-\uFFFF]/.test(At)&&(At=unescape(encodeURIComponent(At))),At}function Ot(At,Et){var rt=At.length,he=new ArrayBuffer(rt),ke=new Uint8Array(he),ze;for(ze=0;ze>2]|=Et.charCodeAt(he)<<(he%4<<3);return this._finish(ke,rt),ze=xt(this._hash),At&&(ze=kr(ze)),this.reset(),ze},ir.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},ir.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash}},ir.prototype.setState=function(At){return this._buff=At.buff,this._length=At.length,this._hash=At.hash,this},ir.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},ir.prototype._finish=function(At,Et){var rt=Et,he,ke,ze;if(At[rt>>2]|=128<<(rt%4<<3),rt>55)for(G(this._hash,At),rt=0;rt<16;rt+=1)At[rt]=0;he=this._length*8,he=he.toString(16).match(/(.*?)(.{0,8})$/),ke=parseInt(he[2],16),ze=parseInt(he[1],16)||0,At[14]=ke,At[15]=ze,G(this._hash,At)},ir.hash=function(At,Et){return ir.hashBinary(Ft(At),Et)},ir.hashBinary=function(At,Et){var rt=Ze(At),he=xt(rt);return Et?kr(he):he},ir.ArrayBuffer=function(){this.reset()},ir.ArrayBuffer.prototype.append=function(At){var Et=cr(this._buff.buffer,At,!0),rt=Et.length,he;for(this._length+=At.byteLength,he=64;he<=rt;he+=64)G(this._hash,Me(Et.subarray(he-64,he)));return this._buff=he-64>2]|=Et[ke]<<(ke%4<<3);return this._finish(he,rt),ze=xt(this._hash),At&&(ze=kr(ze)),this.reset(),ze},ir.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},ir.ArrayBuffer.prototype.getState=function(){var At=ir.prototype.getState.call(this);return At.buff=Yt(At.buff),At},ir.ArrayBuffer.prototype.setState=function(At){return At.buff=Ot(At.buff,!0),ir.prototype.setState.call(this,At)},ir.ArrayBuffer.prototype.destroy=ir.prototype.destroy,ir.ArrayBuffer.prototype._finish=ir.prototype._finish,ir.ArrayBuffer.hash=function(At,Et){var rt=Qe(new Uint8Array(At)),he=xt(rt);return Et?kr(he):he},ir})}),n=function(V,H){if(!(V instanceof H))throw new TypeError("Cannot call a class as a function")},i=function(){function V(H,X){for(var me=0;me2&&arguments[2]!==void 0?arguments[2]:{},me=V.disabled,G=X.bubbles,j=X.cancelable,Me=X.detail,Ze=document.createEvent("Event");Ze.initEvent(H,G||!0,j||!0),Ze.detail=Me||{};try{V.disabled=!1,V.dispatchEvent(Ze)}finally{V.disabled=me}return Ze}function T(V){return Array.isArray(V)?V:Array.from?Array.from(V):[].slice.call(V)}var O=function(){function V(H,X,me){var G=this;n(this,V),this.file=H,this.attributes={filename:H.name,content_type:H.type||"application/octet-stream",byte_size:H.size,checksum:X},this.xhr=new XMLHttpRequest,this.xhr.open("POST",me,!0),this.xhr.responseType="json",this.xhr.setRequestHeader("Content-Type","application/json"),this.xhr.setRequestHeader("Accept","application/json"),this.xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");var j=u("csrf-token");j!=null&&this.xhr.setRequestHeader("X-CSRF-Token",j),this.xhr.addEventListener("load",function(Me){return G.requestDidLoad(Me)}),this.xhr.addEventListener("error",function(Me){return G.requestDidError(Me)})}return i(V,[{key:"create",value:function(X){this.callback=X,this.xhr.send(JSON.stringify({blob:this.attributes}))}},{key:"requestDidLoad",value:function(X){if(this.status>=200&&this.status<300){var me=this.response,G=me.direct_upload;delete me.direct_upload,this.attributes=me,this.directUploadData=G,this.callback(null,this.toJSON())}else this.requestDidError(X)}},{key:"requestDidError",value:function(X){this.callback('Error creating Blob for "'+this.file.name+'". Status: '+this.status)}},{key:"toJSON",value:function(){var X={};for(var me in this.attributes)X[me]=this.attributes[me];return X}},{key:"status",get:function(){return this.xhr.status}},{key:"response",get:function(){var X=this.xhr,me=X.responseType,G=X.response;return me=="json"?G:JSON.parse(G)}}]),V}(),L=function(){function V(H){var X=this;n(this,V),this.blob=H,this.file=H.file;var me=H.directUploadData,G=me.url,j=me.headers;this.xhr=new XMLHttpRequest,this.xhr.open("PUT",G,!0),this.xhr.responseType="text";for(var Me in j)this.xhr.setRequestHeader(Me,j[Me]);this.xhr.addEventListener("load",function(Ze){return X.requestDidLoad(Ze)}),this.xhr.addEventListener("error",function(Ze){return X.requestDidError(Ze)})}return i(V,[{key:"create",value:function(X){this.callback=X,this.xhr.send(this.file.slice())}},{key:"requestDidLoad",value:function(X){var me=this.xhr,G=me.status,j=me.response;G>=200&&G<300?this.callback(null,j):this.requestDidError(X)}},{key:"requestDidError",value:function(X){this.callback('Error storing "'+this.file.name+'". Status: '+this.xhr.status)}}]),V}(),q=0,U=function(){function V(H,X,me){n(this,V),this.id=++q,this.file=H,this.url=X,this.delegate=me}return i(V,[{key:"create",value:function(X){var me=this;a.create(this.file,function(G,j){if(G){X(G);return}var Me=new O(me.file,j,me.url);Z(me.delegate,"directUploadWillCreateBlobWithXHR",Me.xhr),Me.create(function(Ze){if(Ze)X(Ze);else{var Qe=new L(Me);Z(me.delegate,"directUploadWillStoreFileWithXHR",Qe.xhr),Qe.create(function(Ct){Ct?X(Ct):X(null,Me.toJSON())})}})})}}]),V}();function Z(V,H){if(V&&typeof V[H]=="function"){for(var X=arguments.length,me=Array(X>2?X-2:0),G=2;G1&&arguments[1]!==void 0?arguments[1]:{};return me.file=this.file,me.id=this.directUpload.id,_(this.input,"direct-upload:"+X,{detail:me})}},{key:"dispatchError",value:function(X){var me=this.dispatch("error",{error:X});me.defaultPrevented||alert(X)}},{key:"directUploadWillCreateBlobWithXHR",value:function(X){this.dispatch("before-blob-request",{xhr:X})}},{key:"directUploadWillStoreFileWithXHR",value:function(X){var me=this;this.dispatch("before-storage-request",{xhr:X}),X.upload.addEventListener("progress",function(G){return me.uploadRequestDidProgress(G)})}},{key:"url",get:function(){return this.input.getAttribute("data-direct-upload-url")}}]),V}(),ie="input[type=file][data-direct-upload-url]:not([disabled])",ue=function(){function V(H){n(this,V),this.form=H,this.inputs=h(H,ie).filter(function(X){return X.files.length})}return i(V,[{key:"start",value:function(X){var me=this,G=this.createDirectUploadControllers(),j=function Me(){var Ze=G.shift();Ze?Ze.start(function(Qe){Qe?(X(Qe),me.dispatch("end")):Me()}):(X(),me.dispatch("end"))};this.dispatch("start"),j()}},{key:"createDirectUploadControllers",value:function(){var X=[];return this.inputs.forEach(function(me){T(me.files).forEach(function(G){var j=new te(me,G);X.push(j)})}),X}},{key:"dispatch",value:function(X){var me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return _(this.form,"direct-uploads:"+X,{detail:me})}}]),V}(),S="data-direct-uploads-processing",ve=new WeakMap,le=!1;function ge(){le||(le=!0,document.addEventListener("click",Se,!0),document.addEventListener("submit",ye),document.addEventListener("ajax:before",be))}function Se(V){var H=V.target;(H.tagName=="INPUT"||H.tagName=="BUTTON")&&H.type=="submit"&&H.form&&ve.set(H.form,H)}function ye(V){Ue(V)}function be(V){V.target.tagName=="FORM"&&Ue(V)}function Ue(V){var H=V.target;if(H.hasAttribute(S)){V.preventDefault();return}var X=new ue(H),me=X.inputs;me.length&&(V.preventDefault(),H.setAttribute(S,""),me.forEach(re),X.start(function(G){H.removeAttribute(S),G?me.forEach(N):B(H)}))}function B(V){var H=ve.get(V)||p(V,"input[type=submit], button[type=submit]");if(H){var X=H,me=X.disabled;H.disabled=!1,H.focus(),H.click(),H.disabled=me}else H=document.createElement("input"),H.type="submit",H.style.display="none",V.appendChild(H),H.click(),V.removeChild(H);ve.delete(V)}function re(V){V.disabled=!0}function N(V){V.disabled=!1}function $(){window.ActiveStorage&&ge()}setTimeout($,1),r.start=ge,r.DirectUpload=U,Object.defineProperty(r,"__esModule",{value:!0})})});var EH=de((aZt,uL)=>{(function(r,e,t){if(!r)return;for(var n={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"ins",46:"del",91:"meta",93:"meta",224:"meta"},i={106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},o={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=",":":";",'"':"'","<":",",">":".","?":"/","|":"\\"},a={option:"alt",command:"meta",return:"enter",escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},u,h=1;h<20;++h)n[111+h]="f"+h;for(h=0;h<=9;++h)n[h+96]=h.toString();function p(le,ge,Se){if(le.addEventListener){le.addEventListener(ge,Se,!1);return}le.attachEvent("on"+ge,Se)}function _(le){if(le.type=="keypress"){var ge=String.fromCharCode(le.which);return le.shiftKey||(ge=ge.toLowerCase()),ge}return n[le.which]?n[le.which]:i[le.which]?i[le.which]:String.fromCharCode(le.which).toLowerCase()}function T(le,ge){return le.sort().join(",")===ge.sort().join(",")}function O(le){var ge=[];return le.shiftKey&&ge.push("shift"),le.altKey&&ge.push("alt"),le.ctrlKey&&ge.push("ctrl"),le.metaKey&&ge.push("meta"),ge}function L(le){if(le.preventDefault){le.preventDefault();return}le.returnValue=!1}function q(le){if(le.stopPropagation){le.stopPropagation();return}le.cancelBubble=!0}function U(le){return le=="shift"||le=="ctrl"||le=="alt"||le=="meta"}function Z(){if(!u){u={};for(var le in n)le>95&&le<112||n.hasOwnProperty(le)&&(u[n[le]]=le)}return u}function te(le,ge,Se){return Se||(Se=Z()[le]?"keydown":"keypress"),Se=="keypress"&&ge.length&&(Se="keydown"),Se}function ie(le){return le==="+"?["+"]:(le=le.replace(/\+{2}/g,"+plus"),le.split("+"))}function ue(le,ge){var Se,ye,be,Ue=[];for(Se=ie(le),be=0;be1){X(G,Ct,j,Me);return}xt=ue(G,Me),ge._callbacks[xt.key]=ge._callbacks[xt.key]||[],N(xt.key,xt.modifiers,{type:xt.action},Ze,G,Qe),ge._callbacks[xt.key][Ze?"unshift":"push"]({callback:j,modifiers:xt.modifiers,action:xt.action,seq:Ze,level:Qe,combo:G})}ge._bindMultiple=function(G,j,Me){for(var Ze=0;Ze-1||S(ge,Se.target))return!1;if("composedPath"in le&&typeof le.composedPath=="function"){var ye=le.composedPath()[0];ye!==le.target&&(ge=ye)}return ge.tagName=="INPUT"||ge.tagName=="SELECT"||ge.tagName=="TEXTAREA"||ge.isContentEditable},ve.prototype.handleKey=function(){var le=this;return le._handleKey.apply(le,arguments)},ve.addKeycodes=function(le){for(var ge in le)le.hasOwnProperty(ge)&&(n[ge]=le[ge]);u=null},ve.init=function(){var le=ve(e);for(var ge in le)ge.charAt(0)!=="_"&&(ve[ge]=function(Se){return function(){return le[Se].apply(le,arguments)}}(ge))},ve.init(),r.Mousetrap=ve,typeof uL<"u"&&uL.exports&&(uL.exports=ve),typeof define=="function"&&define.amd&&define(function(){return ve})})(typeof window<"u"?window:null,typeof window<"u"?document:null)});var vb={};qK(vb,{FetchEnctype:()=>pb,FetchMethod:()=>Jd,FetchRequest:()=>gb,FetchResponse:()=>Dw,FrameElement:()=>Wp,FrameLoadingStyle:()=>lx,FrameRenderer:()=>Mw,PageRenderer:()=>hx,PageSnapshot:()=>od,StreamActions:()=>dx,StreamElement:()=>Pw,StreamSourceElement:()=>wL,cache:()=>Obe,clearCache:()=>Rbe,connectStreamSource:()=>pC,disconnectStreamSource:()=>mC,fetch:()=>tW,fetchEnctypeFromString:()=>Ebe,fetchMethodFromString:()=>SL,isSafe:()=>kL,navigator:()=>Ibe,registerAdapter:()=>Mbe,renderStreamMessage:()=>Lbe,session:()=>yl,setConfirmMethod:()=>Nbe,setFormMode:()=>qbe,setProgressBarDelay:()=>Fbe,start:()=>rW,visit:()=>Pbe});function C0t(r){let e=r instanceof Element?r:r instanceof Node?r.parentElement:null,t=e?e.closest("input, button"):null;return t?.type=="submit"?t:null}function A0t(r){let e=C0t(r.target);e&&e.form&&mbe.set(e.form,e)}function D0t(r){switch(r.toLowerCase()){case"lazy":return lx.lazy;default:return lx.eager}}function tf(r){return new URL(r.toString(),document.baseURI)}function ux(r){let e;if(r.hash)return r.hash.slice(1);if(e=r.href.match(/#(.*)$/))return e[1]}function QH(r,e){let t=e?.getAttribute("formaction")||r.getAttribute("action")||r.action;return tf(t)}function O0t(r){return(R0t(r).match(/\.[^.]*$/)||[])[0]||""}function I0t(r){return!!O0t(r).match(/^(?:|\.(?:htm|html|xhtml|php))$/)}function M0t(r,e){let t=F0t(e);return r.href===tf(t).href||r.href.startsWith(t)}function db(r,e){return M0t(r,e)&&I0t(r)}function CH(r){let e=ux(r);return e!=null?r.href.slice(0,-(e.length+1)):r.href}function cL(r){return CH(r)}function P0t(r,e){return tf(r).href==tf(e).href}function L0t(r){return r.pathname.split("/").slice(1)}function R0t(r){return L0t(r).slice(-1)[0]}function F0t(r){return N0t(r.origin+r.pathname)}function N0t(r){return r.endsWith("/")?r:r+"/"}function fC(r){if(r.getAttribute("data-turbo-eval")=="false")return r;{let e=document.createElement("script"),t=Ow("csp-nonce");return t&&(e.nonce=t),e.textContent=r.textContent,e.async=!1,q0t(e,r),e}}function q0t(r,e){for(let{name:t,value:n}of e.attributes)r.setAttribute(t,n)}function B0t(r){let e=document.createElement("template");return e.innerHTML=r,e.content}function Vl(r,{target:e,cancelable:t,detail:n}={}){let i=new CustomEvent(r,{cancelable:t,bubbles:!0,composed:!0,detail:n});return e&&e.isConnected?e.dispatchEvent(i):document.documentElement.dispatchEvent(i),i}function Ew(){return document.visibilityState==="hidden"?vbe():gbe()}function gbe(){return new Promise(r=>requestAnimationFrame(()=>r()))}function vbe(){return new Promise(r=>setTimeout(()=>r(),0))}function z0t(){return Promise.resolve()}function ybe(r=""){return new DOMParser().parseFromString(r,"text/html")}function bbe(r,...e){let t=j0t(r,e).replace(/^\n/,"").split(` `),n=t[0].match(/^\s+/),i=n?n[0].length:0;return t.map(o=>o.slice(i)).join(` `)}function j0t(r,e){return r.reduce((t,n,i)=>{let o=e[i]==null?"":e[i];return t+n+o},"")}function mb(){return Array.from({length:36}).map((r,e)=>e==8||e==13||e==18||e==23?"-":e==14?"4":e==19?(Math.floor(Math.random()*4)+8).toString(16):Math.floor(Math.random()*15).toString(16)).join("")}function dL(r,...e){for(let t of e.map(n=>n?.getAttribute(r)))if(typeof t=="string")return t;return null}function U0t(r,...e){return e.some(t=>t&&t.hasAttribute(r))}function pL(...r){for(let e of r)e.localName=="turbo-frame"&&e.setAttribute("busy",""),e.setAttribute("aria-busy","true")}function mL(...r){for(let e of r)e.localName=="turbo-frame"&&e.removeAttribute("busy"),e.removeAttribute("aria-busy")}function H0t(r,e=2e3){return new Promise(t=>{let n=()=>{r.removeEventListener("error",n),r.removeEventListener("load",n),t()};r.addEventListener("load",n,{once:!0}),r.addEventListener("error",n,{once:!0}),setTimeout(t,e)})}function xbe(r){switch(r){case"replace":return history.replaceState;case"advance":case"restore":return history.pushState}}function W0t(r){return r=="advance"||r=="replace"||r=="restore"}function cx(...r){let e=dL("data-turbo-action",...r);return W0t(e)?e:null}function _be(r){return document.querySelector(`meta[name="${r}"]`)}function Ow(r){let e=_be(r);return e&&e.content}function V0t(r,e){let t=_be(r);return t||(t=document.createElement("meta"),t.setAttribute("name",r),document.head.appendChild(t)),t.setAttribute("content",e),t}function Cw(r,e){if(r instanceof Element)return r.closest(e)||Cw(r.assignedSlot||r.getRootNode()?.host,e)}function eW(r){let e="[inert], :disabled, [hidden], details:not([open]), dialog:not([open])";return!!r&&r.closest(e)==null&&typeof r.focus=="function"}function wbe(r){return Array.from(r.querySelectorAll("[autofocus]")).find(eW)}async function $0t(r,e){let t=e();r(),await gbe();let n=e();return[t,n]}function Sbe(r){if(r.hasAttribute("target")){for(let e of document.getElementsByName(r.target))if(e instanceof HTMLIFrameElement)return!1}return!0}function K0t(r){return Cw(r,"a[href]:not([target^=_]):not([download])")}function kbe(r){return tf(r.getAttribute("href")||"")}function G0t(r,e){let t=null;return(...n)=>{let i=()=>r.apply(this,n);clearTimeout(t),t=setTimeout(i,e)}}function tW(r,e={}){let t=new Headers(e.headers||{}),n=mb();return Tbe.add(n),t.append("X-Turbo-Request-Id",n),Y0t(r,{...e,headers:t})}function SL(r){switch(r.toLowerCase()){case"get":return Jd.get;case"post":return Jd.post;case"put":return Jd.put;case"patch":return Jd.patch;case"delete":return Jd.delete}}function Ebe(r){switch(r.toLowerCase()){case pb.multipart:return pb.multipart;case pb.plain:return pb.plain;default:return pb.urlEncoded}}function kL(r){return SL(r)==Jd.get}function cbe(r,e,t,n){let i=Array.from(t).length>0?new URLSearchParams(Cbe(t)):r.searchParams;return kL(e)?[Z0t(r,i),null]:n==pb.urlEncoded?[r,i]:[r,t]}function Cbe(r){let e=[];for(let[t,n]of r)n instanceof File||e.push([t,n]);return e}function Z0t(r,e){let t=new URLSearchParams(Cbe(e));return r.search=t.toString(),r}function X0t(r){for(let e of r.querySelectorAll("turbo-stream")){let t=document.importNode(e,!0);for(let n of t.templateElement.content.querySelectorAll("script"))n.replaceWith(fC(n));e.replaceWith(t)}return r}function ext(r,e){let t=new FormData(r),n=e?.getAttribute("name"),i=e?.getAttribute("value");return n&&t.append(n,i||""),t}function txt(r){if(r!=null){let t=(document.cookie?document.cookie.split("; "):[]).find(n=>n.startsWith(r));if(t){let n=t.split("=").slice(1).join("=");return n?decodeURIComponent(n):void 0}}}function rxt(r){return r.statusCode==200&&!r.redirected}function nxt(r,e){let t=typeof r.action=="string"?r.action:null;return e?.hasAttribute("formaction")?e.getAttribute("formaction")||"":r.getAttribute("action")||t||""}function ixt(r,e){let t=tf(r);return kL(e)&&(t.search=""),t}function oxt(r,e){let t=e?.getAttribute("formmethod")||r.getAttribute("method")||"";return SL(t.toLowerCase())||Jd.get}function axt(r,e){return Ebe(e?.getAttribute("formenctype")||r.enctype)}function Abe(r,e){return r.querySelector(`#${e}[data-turbo-permanent]`)}function Dbe(r){return r.querySelectorAll("[id][data-turbo-permanent]")}function sxt(r,e){return(e?.getAttribute("formmethod")||r.getAttribute("method"))!="dialog"}function lxt(r,e){if(e?.hasAttribute("formtarget")||r.hasAttribute("target")){let t=e?.getAttribute("formtarget")||r.target;for(let n of document.getElementsByName(t))if(n instanceof HTMLIFrameElement)return!1;return!0}else return!0}function uxt(r){let e=document.createElement("meta");return e.setAttribute("name","turbo-permanent-placeholder"),e.setAttribute("content",r.id),e}function cxt(r,e){return r=="end"||r=="start"||r=="center"||r=="nearest"?r:e}function fxt(r,e){return r=="auto"||r=="smooth"?r:e}function hxt(r){if(pxt(r))return"script";if(gxt(r))return"stylesheet"}function dxt(r){return r.getAttribute("data-turbo-track")=="reload"}function pxt(r){return r.localName=="script"}function mxt(r){return r.localName=="noscript"}function gxt(r){let e=r.localName;return e=="style"||e=="link"&&r.getAttribute("rel")=="stylesheet"}function vxt(r,e){return r.localName=="meta"&&r.getAttribute("name")==e}function yxt(r){return r.hasAttribute("nonce")&&r.setAttribute("nonce",""),r}function fbe(r){return r>=200&&r<300}function wxt(r){let e=Dbe(document.documentElement),t={};for(let n of e){let{id:i}=n;for(let o of r.querySelectorAll("turbo-stream")){let a=Abe(o.templateElement.content,i);a&&(t[i]=[n,a])}}return t}async function Sxt(r,e){let t=`turbo-stream-autofocus-${mb()}`,n=r.querySelectorAll("turbo-stream"),i=Txt(n),o=null;if(i&&(i.id?o=i.id:o=t,i.id=o),e(),await Ew(),(document.activeElement==null||document.activeElement==document.body)&&o){let u=document.getElementById(o);eW(u)&&u.focus(),u&&u.id==t&&u.removeAttribute("id")}}async function kxt(r){let[e,t]=await $0t(r,()=>document.activeElement),n=e&&e.id;if(n){let i=document.getElementById(n);eW(i)&&i!=t&&i.focus()}}function Txt(r){for(let e of r){let t=wbe(e.templateElement.content);if(t)return t}return null}function Ext(r){let e=r.detail?.fetchResponse;if(e instanceof Dw)return e}function Cxt(r){return(r.contentType??"").startsWith(Ag.contentType)}function hbe(r){Object.defineProperties(r,Dxt)}function rW(){yl.start()}function Mbe(r){yl.registerAdapter(r)}function Pbe(r,e){yl.visit(r,e)}function pC(r){yl.connectStreamSource(r)}function mC(r){yl.disconnectStreamSource(r)}function Lbe(r){yl.renderStreamMessage(r)}function Rbe(){console.warn("Please replace `Turbo.clearCache()` with `Turbo.cache.clear()`. The top-level function is deprecated and will be removed in a future version of Turbo.`"),yl.clearCache()}function Fbe(r){yl.setProgressBarDelay(r)}function Nbe(r){fx.confirmMethod=r}function qbe(r){yl.setFormMode(r)}function dbe(r){if(r!=null){let e=document.getElementById(r);if(e instanceof Wp)return e}}function pbe(r,e){if(r){let t=r.getAttribute("src");if(t!=null&&e!=null&&P0t(t,e))throw new Error(`Matching element has a source URL which references itself`);if(r.ownerDocument!==document&&(r=document.importNode(r,!0)),r instanceof Wp)return r.connectedCallback(),r.disconnectedCallback(),r}}var mbe,lx,nW,Wp,Dw,AH,Tbe,Y0t,Jd,pb,gb,DH,Ag,J0t,OH,Q0t,Tw,kw,fx,Iw,hC,gL,IH,vL,yL,bL,xL,dC,Mw,hb,hL,MH,od,PH,bxt,fL,jv,Aw,xxt,LH,RH,FH,NH,qH,BH,_xt,zH,sx,jH,UH,HH,WH,_L,Axt,hx,VH,$H,KH,GH,YH,ZH,Dxt,yl,Obe,Ibe,Oxt,XH,JH,dx,Pw,wL,TL=Pe(()=>{(function(r){if(typeof r.requestSubmit=="function")return;r.requestSubmit=function(n){n?(e(n,this),n.click()):(n=document.createElement("input"),n.type="submit",n.hidden=!0,this.appendChild(n),n.click(),this.removeChild(n))};function e(n,i){n instanceof HTMLElement||t(TypeError,"parameter 1 is not of type 'HTMLElement'"),n.type=="submit"||t(TypeError,"The specified element is not a submit button"),n.form==i||t(DOMException,"The specified element is not owned by this form element","NotFoundError")}function t(n,i,o){throw new n("Failed to execute 'requestSubmit' on 'HTMLFormElement': "+i+".",o)}})(HTMLFormElement.prototype);mbe=new WeakMap;(function(){if("submitter"in Event.prototype)return;let r=window.Event.prototype;if("SubmitEvent"in window){let e=window.SubmitEvent.prototype;if(/Apple Computer/.test(navigator.vendor)&&!("submitter"in e))r=e;else return}addEventListener("click",A0t,!0),Object.defineProperty(r,"submitter",{get(){if(this.type=="submit"&&this.target instanceof HTMLFormElement)return mbe.get(this.target)}})})();lx={eager:"eager",lazy:"lazy"},nW=class extends HTMLElement{loaded=Promise.resolve();static get observedAttributes(){return["disabled","complete","loading","src"]}constructor(){super(),this.delegate=new nW.delegateConstructor(this)}connectedCallback(){this.delegate.connect()}disconnectedCallback(){this.delegate.disconnect()}reload(){return this.delegate.sourceURLReloaded()}attributeChangedCallback(e){e=="loading"?this.delegate.loadingStyleChanged():e=="complete"?this.delegate.completeChanged():e=="src"?this.delegate.sourceURLChanged():this.delegate.disabledChanged()}get src(){return this.getAttribute("src")}set src(e){e?this.setAttribute("src",e):this.removeAttribute("src")}get refresh(){return this.getAttribute("refresh")}set refresh(e){e?this.setAttribute("refresh",e):this.removeAttribute("refresh")}get loading(){return D0t(this.getAttribute("loading")||"")}set loading(e){e?this.setAttribute("loading",e):this.removeAttribute("loading")}get disabled(){return this.hasAttribute("disabled")}set disabled(e){e?this.setAttribute("disabled",""):this.removeAttribute("disabled")}get autoscroll(){return this.hasAttribute("autoscroll")}set autoscroll(e){e?this.setAttribute("autoscroll",""):this.removeAttribute("autoscroll")}get complete(){return!this.delegate.isLoading}get isActive(){return this.ownerDocument===document&&!this.isPreview}get isPreview(){return this.ownerDocument?.documentElement?.hasAttribute("data-turbo-preview")}},Wp=nW;Ir(Wp,"delegateConstructor");Dw=class{constructor(e){this.response=e}get succeeded(){return this.response.ok}get failed(){return!this.succeeded}get clientError(){return this.statusCode>=400&&this.statusCode<=499}get serverError(){return this.statusCode>=500&&this.statusCode<=599}get redirected(){return this.response.redirected}get location(){return tf(this.response.url)}get isHTML(){return this.contentType&&this.contentType.match(/^(?:text\/([^\s;,]+\b)?html|application\/xhtml\+xml)\b/)}get statusCode(){return this.response.status}get contentType(){return this.header("Content-Type")}get responseText(){return this.response.clone().text()}get responseHTML(){return this.isHTML?this.response.clone().text():Promise.resolve(void 0)}header(e){return this.response.headers.get(e)}};AH=class extends Set{constructor(e){super(),this.maxSize=e}add(e){if(this.size>=this.maxSize){let n=this.values().next().value;this.delete(n)}super.add(e)}},Tbe=new AH(20),Y0t=window.fetch;Jd={get:"get",post:"post",put:"put",patch:"patch",delete:"delete"};pb={urlEncoded:"application/x-www-form-urlencoded",multipart:"multipart/form-data",plain:"text/plain"},gb=class{abortController=new AbortController;#e=e=>{};constructor(e,t,n,i=new URLSearchParams,o=null,a=pb.urlEncoded){let[u,h]=cbe(tf(n),t,i,a);this.delegate=e,this.url=u,this.target=o,this.fetchOptions={credentials:"same-origin",redirect:"follow",method:t,headers:{...this.defaultHeaders},body:h,signal:this.abortSignal,referrer:this.delegate.referrer?.href},this.enctype=a}get method(){return this.fetchOptions.method}set method(e){let t=this.isSafe?this.url.searchParams:this.fetchOptions.body||new FormData,n=SL(e)||Jd.get;this.url.search="";let[i,o]=cbe(this.url,n,t,this.enctype);this.url=i,this.fetchOptions.body=o,this.fetchOptions.method=n}get headers(){return this.fetchOptions.headers}set headers(e){this.fetchOptions.headers=e}get body(){return this.isSafe?this.url.searchParams:this.fetchOptions.body}set body(e){this.fetchOptions.body=e}get location(){return this.url}get params(){return this.url.searchParams}get entries(){return this.body?Array.from(this.body.entries()):[]}cancel(){this.abortController.abort()}async perform(){let{fetchOptions:e}=this;this.delegate.prepareRequest(this);let t=await this.#t(e);try{this.delegate.requestStarted(this),t.detail.fetchRequest?this.response=t.detail.fetchRequest.response:this.response=tW(this.url.href,e);let n=await this.response;return await this.receive(n)}catch(n){if(n.name!=="AbortError")throw this.#r(n)&&this.delegate.requestErrored(this,n),n}finally{this.delegate.requestFinished(this)}}async receive(e){let t=new Dw(e);return Vl("turbo:before-fetch-response",{cancelable:!0,detail:{fetchResponse:t},target:this.target}).defaultPrevented?this.delegate.requestPreventedHandlingResponse(this,t):t.succeeded?this.delegate.requestSucceededWithResponse(this,t):this.delegate.requestFailedWithResponse(this,t),t}get defaultHeaders(){return{Accept:"text/html, application/xhtml+xml"}}get isSafe(){return kL(this.method)}get abortSignal(){return this.abortController.signal}acceptResponseType(e){this.headers.Accept=[e,this.headers.Accept].join(", ")}async#t(e){let t=new Promise(i=>this.#e=i),n=Vl("turbo:before-fetch-request",{cancelable:!0,detail:{fetchOptions:e,url:this.url,resume:this.#e},target:this.target});return this.url=n.detail.url,n.defaultPrevented&&await t,n}#r(e){return!Vl("turbo:fetch-request-error",{target:this.target,cancelable:!0,detail:{request:this,error:e}}).defaultPrevented}};DH=class{started=!1;constructor(e,t){this.delegate=e,this.element=t,this.intersectionObserver=new IntersectionObserver(this.intersect)}start(){this.started||(this.started=!0,this.intersectionObserver.observe(this.element))}stop(){this.started&&(this.started=!1,this.intersectionObserver.unobserve(this.element))}intersect=e=>{e.slice(-1)[0]?.isIntersecting&&this.delegate.elementAppearedInViewport(this.element)}},Ag=class{static wrap(e){return typeof e=="string"?new this(B0t(e)):e}constructor(e){this.fragment=X0t(e)}};Ir(Ag,"contentType","text/vnd.turbo-stream.html");J0t=100,OH=class{#e=null;#t=null;get(e){if(this.#t&&this.#t.url===e&&this.#t.expire>Date.now())return this.#t.request}setLater(e,t,n){this.clear(),this.#e=setTimeout(()=>{t.perform(),this.set(e,t,n),this.#e=null},J0t)}set(e,t,n){this.#t={url:e,request:t,expire:new Date(new Date().getTime()+n)}}clear(){this.#e&&clearTimeout(this.#e),this.#t=null}},Q0t=10*1e3,Tw=new OH,kw={initialized:"initialized",requesting:"requesting",waiting:"waiting",receiving:"receiving",stopping:"stopping",stopped:"stopped"},fx=class{state=kw.initialized;static confirmMethod(e,t,n){return Promise.resolve(confirm(e))}constructor(e,t,n,i=!1){let o=oxt(t,n),a=ixt(nxt(t,n),o),u=ext(t,n),h=axt(t,n);this.delegate=e,this.formElement=t,this.submitter=n,this.fetchRequest=new gb(this,o,a,u,t,h),this.mustRedirect=i}get method(){return this.fetchRequest.method}set method(e){this.fetchRequest.method=e}get action(){return this.fetchRequest.url.toString()}set action(e){this.fetchRequest.url=tf(e)}get body(){return this.fetchRequest.body}get enctype(){return this.fetchRequest.enctype}get isSafe(){return this.fetchRequest.isSafe}get location(){return this.fetchRequest.url}async start(){let{initialized:e,requesting:t}=kw,n=dL("data-turbo-confirm",this.submitter,this.formElement);if(!(typeof n=="string"&&!await fx.confirmMethod(n,this.formElement,this.submitter))&&this.state==e)return this.state=t,this.fetchRequest.perform()}stop(){let{stopping:e,stopped:t}=kw;if(this.state!=e&&this.state!=t)return this.state=e,this.fetchRequest.cancel(),!0}prepareRequest(e){if(!e.isSafe){let t=txt(Ow("csrf-param"))||Ow("csrf-token");t&&(e.headers["X-CSRF-Token"]=t)}this.requestAcceptsTurboStreamResponse(e)&&e.acceptResponseType(Ag.contentType)}requestStarted(e){this.state=kw.waiting,this.submitter?.setAttribute("disabled",""),this.setSubmitsWith(),pL(this.formElement),Vl("turbo:submit-start",{target:this.formElement,detail:{formSubmission:this}}),this.delegate.formSubmissionStarted(this)}requestPreventedHandlingResponse(e,t){Tw.clear(),this.result={success:t.succeeded,fetchResponse:t}}requestSucceededWithResponse(e,t){if(t.clientError||t.serverError){this.delegate.formSubmissionFailedWithResponse(this,t);return}if(Tw.clear(),this.requestMustRedirect(e)&&rxt(t)){let n=new Error("Form responses must redirect to another location");this.delegate.formSubmissionErrored(this,n)}else this.state=kw.receiving,this.result={success:!0,fetchResponse:t},this.delegate.formSubmissionSucceededWithResponse(this,t)}requestFailedWithResponse(e,t){this.result={success:!1,fetchResponse:t},this.delegate.formSubmissionFailedWithResponse(this,t)}requestErrored(e,t){this.result={success:!1,error:t},this.delegate.formSubmissionErrored(this,t)}requestFinished(e){this.state=kw.stopped,this.submitter?.removeAttribute("disabled"),this.resetSubmitterText(),mL(this.formElement),Vl("turbo:submit-end",{target:this.formElement,detail:{formSubmission:this,...this.result}}),this.delegate.formSubmissionFinished(this)}setSubmitsWith(){if(!(!this.submitter||!this.submitsWith)){if(this.submitter.matches("button"))this.originalSubmitText=this.submitter.innerHTML,this.submitter.innerHTML=this.submitsWith;else if(this.submitter.matches("input")){let e=this.submitter;this.originalSubmitText=e.value,e.value=this.submitsWith}}}resetSubmitterText(){if(!(!this.submitter||!this.originalSubmitText)){if(this.submitter.matches("button"))this.submitter.innerHTML=this.originalSubmitText;else if(this.submitter.matches("input")){let e=this.submitter;e.value=this.originalSubmitText}}}requestMustRedirect(e){return!e.isSafe&&this.mustRedirect}requestAcceptsTurboStreamResponse(e){return!e.isSafe||U0t("data-turbo-stream",this.submitter,this.formElement)}get submitsWith(){return this.submitter?.getAttribute("data-turbo-submits-with")}};Iw=class{constructor(e){this.element=e}get activeElement(){return this.element.ownerDocument.activeElement}get children(){return[...this.element.children]}hasAnchor(e){return this.getElementForAnchor(e)!=null}getElementForAnchor(e){return e?this.element.querySelector(`[id='${e}'], a[name='${e}']`):null}get isConnected(){return this.element.isConnected}get firstAutofocusableElement(){return wbe(this.element)}get permanentElements(){return Dbe(this.element)}getPermanentElementById(e){return Abe(this.element,e)}getPermanentElementMapForSnapshot(e){let t={};for(let n of this.permanentElements){let{id:i}=n,o=e.getPermanentElementById(i);o&&(t[i]=[n,o])}return t}};hC=class{started=!1;constructor(e,t){this.delegate=e,this.eventTarget=t}start(){this.started||(this.eventTarget.addEventListener("submit",this.submitCaptured,!0),this.started=!0)}stop(){this.started&&(this.eventTarget.removeEventListener("submit",this.submitCaptured,!0),this.started=!1)}submitCaptured=()=>{this.eventTarget.removeEventListener("submit",this.submitBubbled,!1),this.eventTarget.addEventListener("submit",this.submitBubbled,!1)};submitBubbled=e=>{if(!e.defaultPrevented){let t=e.target instanceof HTMLFormElement?e.target:void 0,n=e.submitter||void 0;t&&sxt(t,n)&&lxt(t,n)&&this.delegate.willSubmitForm(t,n)&&(e.preventDefault(),e.stopImmediatePropagation(),this.delegate.formSubmitted(t,n))}}};gL=class{#e=e=>{};#t=e=>{};constructor(e,t){this.delegate=e,this.element=t}scrollToAnchor(e){let t=this.snapshot.getElementForAnchor(e);t?(this.scrollToElement(t),this.focusElement(t)):this.scrollToPosition({x:0,y:0})}scrollToAnchorFromLocation(e){this.scrollToAnchor(ux(e))}scrollToElement(e){e.scrollIntoView()}focusElement(e){e instanceof HTMLElement&&(e.hasAttribute("tabindex")?e.focus():(e.setAttribute("tabindex","-1"),e.focus(),e.removeAttribute("tabindex")))}scrollToPosition({x:e,y:t}){this.scrollRoot.scrollTo(e,t)}scrollToTop(){this.scrollToPosition({x:0,y:0})}get scrollRoot(){return window}async render(e){let{isPreview:t,shouldRender:n,willRender:i,newSnapshot:o}=e,a=i;if(n)try{this.renderPromise=new Promise(_=>this.#e=_),this.renderer=e,await this.prepareToRenderSnapshot(e);let u=new Promise(_=>this.#t=_),h={resume:this.#t,render:this.renderer.renderElement,renderMethod:this.renderer.renderMethod};this.delegate.allowsImmediateRender(o,h)||await u,await this.renderSnapshot(e),this.delegate.viewRenderedSnapshot(o,t,this.renderer.renderMethod),this.delegate.preloadOnLoadLinksForView(this.element),this.finishRenderingSnapshot(e)}finally{delete this.renderer,this.#e(void 0),delete this.renderPromise}else a&&this.invalidate(e.reloadReason)}invalidate(e){this.delegate.viewInvalidated(e)}async prepareToRenderSnapshot(e){this.markAsPreview(e.isPreview),await e.prepareToRender()}markAsPreview(e){e?this.element.setAttribute("data-turbo-preview",""):this.element.removeAttribute("data-turbo-preview")}markVisitDirection(e){this.element.setAttribute("data-turbo-visit-direction",e)}unmarkVisitDirection(){this.element.removeAttribute("data-turbo-visit-direction")}async renderSnapshot(e){await e.render()}finishRenderingSnapshot(e){e.finishRendering()}},IH=class extends gL{missing(){this.element.innerHTML='Content missing'}get snapshot(){return new Iw(this.element)}},vL=class{constructor(e,t){this.delegate=e,this.element=t}start(){this.element.addEventListener("click",this.clickBubbled),document.addEventListener("turbo:click",this.linkClicked),document.addEventListener("turbo:before-visit",this.willVisit)}stop(){this.element.removeEventListener("click",this.clickBubbled),document.removeEventListener("turbo:click",this.linkClicked),document.removeEventListener("turbo:before-visit",this.willVisit)}clickBubbled=e=>{this.respondsToEventTarget(e.target)?this.clickEvent=e:delete this.clickEvent};linkClicked=e=>{this.clickEvent&&this.respondsToEventTarget(e.target)&&e.target instanceof Element&&this.delegate.shouldInterceptLinkClick(e.target,e.detail.url,e.detail.originalEvent)&&(this.clickEvent.preventDefault(),e.preventDefault(),this.delegate.linkClickIntercepted(e.target,e.detail.url,e.detail.originalEvent)),delete this.clickEvent};willVisit=e=>{delete this.clickEvent};respondsToEventTarget(e){let t=e instanceof Element?e:e instanceof Node?e.parentElement:null;return t&&t.closest("turbo-frame, html")==this.element}},yL=class{started=!1;constructor(e,t){this.delegate=e,this.eventTarget=t}start(){this.started||(this.eventTarget.addEventListener("click",this.clickCaptured,!0),this.started=!0)}stop(){this.started&&(this.eventTarget.removeEventListener("click",this.clickCaptured,!0),this.started=!1)}clickCaptured=()=>{this.eventTarget.removeEventListener("click",this.clickBubbled,!1),this.eventTarget.addEventListener("click",this.clickBubbled,!1)};clickBubbled=e=>{if(e instanceof MouseEvent&&this.clickEventIsSignificant(e)){let t=e.composedPath&&e.composedPath()[0]||e.target,n=K0t(t);if(n&&Sbe(n)){let i=kbe(n);this.delegate.willFollowLinkToLocation(n,i,e)&&(e.preventDefault(),this.delegate.followedLinkToLocation(n,i))}}};clickEventIsSignificant(e){return!(e.target&&e.target.isContentEditable||e.defaultPrevented||e.which>1||e.altKey||e.ctrlKey||e.metaKey||e.shiftKey)}},bL=class{constructor(e,t){this.delegate=e,this.linkInterceptor=new yL(this,t)}start(){this.linkInterceptor.start()}stop(){this.linkInterceptor.stop()}canPrefetchRequestToLocation(e,t){return!1}prefetchAndCacheRequestToLocation(e,t){}willFollowLinkToLocation(e,t,n){return this.delegate.willSubmitFormLinkToLocation(e,t,n)&&(e.hasAttribute("data-turbo-method")||e.hasAttribute("data-turbo-stream"))}followedLinkToLocation(e,t){let n=document.createElement("form"),i="hidden";for(let[T,O]of t.searchParams)n.append(Object.assign(document.createElement("input"),{type:i,name:T,value:O}));let o=Object.assign(t,{search:""});n.setAttribute("data-turbo","true"),n.setAttribute("action",o.href),n.setAttribute("hidden","");let a=e.getAttribute("data-turbo-method");a&&n.setAttribute("method",a);let u=e.getAttribute("data-turbo-frame");u&&n.setAttribute("data-turbo-frame",u);let h=cx(e);h&&n.setAttribute("data-turbo-action",h);let p=e.getAttribute("data-turbo-confirm");p&&n.setAttribute("data-turbo-confirm",p),e.hasAttribute("data-turbo-stream")&&n.setAttribute("data-turbo-stream",""),this.delegate.submittedFormLinkToLocation(e,t,n),document.body.appendChild(n),n.addEventListener("turbo:submit-end",()=>n.remove(),{once:!0}),requestAnimationFrame(()=>n.requestSubmit())}},xL=class{static async preservingPermanentElements(e,t,n){let i=new this(e,t);i.enter(),await n(),i.leave()}constructor(e,t){this.delegate=e,this.permanentElementMap=t}enter(){for(let e in this.permanentElementMap){let[t,n]=this.permanentElementMap[e];this.delegate.enteringBardo(t,n),this.replaceNewPermanentElementWithPlaceholder(n)}}leave(){for(let e in this.permanentElementMap){let[t]=this.permanentElementMap[e];this.replaceCurrentPermanentElementWithClone(t),this.replacePlaceholderWithPermanentElement(t),this.delegate.leavingBardo(t)}}replaceNewPermanentElementWithPlaceholder(e){let t=uxt(e);e.replaceWith(t)}replaceCurrentPermanentElementWithClone(e){let t=e.cloneNode(!0);e.replaceWith(t)}replacePlaceholderWithPermanentElement(e){this.getPlaceholderById(e.id)?.replaceWith(e)}getPlaceholderById(e){return this.placeholders.find(t=>t.content==e)}get placeholders(){return[...document.querySelectorAll("meta[name=turbo-permanent-placeholder][content]")]}};dC=class{#e=null;constructor(e,t,n,i,o=!0){this.currentSnapshot=e,this.newSnapshot=t,this.isPreview=i,this.willRender=o,this.renderElement=n,this.promise=new Promise((a,u)=>this.resolvingFunctions={resolve:a,reject:u})}get shouldRender(){return!0}get reloadReason(){}prepareToRender(){}render(){}finishRendering(){this.resolvingFunctions&&(this.resolvingFunctions.resolve(),delete this.resolvingFunctions)}async preservingPermanentElements(e){await xL.preservingPermanentElements(this,this.permanentElementMap,e)}focusFirstAutofocusableElement(){let e=this.connectedSnapshot.firstAutofocusableElement;e&&e.focus()}enteringBardo(e){this.#e||e.contains(this.currentSnapshot.activeElement)&&(this.#e=this.currentSnapshot.activeElement)}leavingBardo(e){e.contains(this.#e)&&this.#e instanceof HTMLElement&&(this.#e.focus(),this.#e=null)}get connectedSnapshot(){return this.newSnapshot.isConnected?this.newSnapshot:this.currentSnapshot}get currentElement(){return this.currentSnapshot.element}get newElement(){return this.newSnapshot.element}get permanentElementMap(){return this.currentSnapshot.getPermanentElementMapForSnapshot(this.newSnapshot)}get renderMethod(){return"replace"}},Mw=class extends dC{static renderElement(e,t){let n=document.createRange();n.selectNodeContents(e),n.deleteContents();let i=t,o=i.ownerDocument?.createRange();o&&(o.selectNodeContents(i),e.appendChild(o.extractContents()))}constructor(e,t,n,i,o,a=!0){super(t,n,i,o,a),this.delegate=e}get shouldRender(){return!0}async render(){await Ew(),this.preservingPermanentElements(()=>{this.loadFrameElement()}),this.scrollFrameIntoView(),await Ew(),this.focusFirstAutofocusableElement(),await Ew(),this.activateScriptElements()}loadFrameElement(){this.delegate.willRenderFrame(this.currentElement,this.newElement),this.renderElement(this.currentElement,this.newElement)}scrollFrameIntoView(){if(this.currentElement.autoscroll||this.newElement.autoscroll){let e=this.currentElement.firstElementChild,t=cxt(this.currentElement.getAttribute("data-autoscroll-block"),"end"),n=fxt(this.currentElement.getAttribute("data-autoscroll-behavior"),"auto");if(e)return e.scrollIntoView({block:t,behavior:n}),!0}return!1}activateScriptElements(){for(let e of this.newScriptElements){let t=fC(e);e.replaceWith(t)}}get newScriptElements(){return this.currentElement.querySelectorAll("script")}};hb=class{static get defaultCSS(){return bbe` .turbo-progress-bar { position: fixed; display: block; top: 0; left: 0; height: 3px; background: #0076ff; z-index: 2147483647; transition: width ${hb.animationDuration}ms ease-out, opacity ${hb.animationDuration/2}ms ${hb.animationDuration/2}ms ease-in; transform: translate3d(0, 0, 0); } `}hiding=!1;value=0;visible=!1;constructor(){this.stylesheetElement=this.createStylesheetElement(),this.progressElement=this.createProgressElement(),this.installStylesheetElement(),this.setValue(0)}show(){this.visible||(this.visible=!0,this.installProgressElement(),this.startTrickling())}hide(){this.visible&&!this.hiding&&(this.hiding=!0,this.fadeProgressElement(()=>{this.uninstallProgressElement(),this.stopTrickling(),this.visible=!1,this.hiding=!1}))}setValue(e){this.value=e,this.refresh()}installStylesheetElement(){document.head.insertBefore(this.stylesheetElement,document.head.firstChild)}installProgressElement(){this.progressElement.style.width="0",this.progressElement.style.opacity="1",document.documentElement.insertBefore(this.progressElement,document.body),this.refresh()}fadeProgressElement(e){this.progressElement.style.opacity="0",setTimeout(e,hb.animationDuration*1.5)}uninstallProgressElement(){this.progressElement.parentNode&&document.documentElement.removeChild(this.progressElement)}startTrickling(){this.trickleInterval||(this.trickleInterval=window.setInterval(this.trickle,hb.animationDuration))}stopTrickling(){window.clearInterval(this.trickleInterval),delete this.trickleInterval}trickle=()=>{this.setValue(this.value+Math.random()/100)};refresh(){requestAnimationFrame(()=>{this.progressElement.style.width=`${10+this.value*90}%`})}createStylesheetElement(){let e=document.createElement("style");return e.type="text/css",e.textContent=hb.defaultCSS,this.cspNonce&&(e.nonce=this.cspNonce),e}createProgressElement(){let e=document.createElement("div");return e.className="turbo-progress-bar",e}get cspNonce(){return Ow("csp-nonce")}},hL=hb;Ir(hL,"animationDuration",300);MH=class extends Iw{detailsByOuterHTML=this.children.filter(e=>!mxt(e)).map(e=>yxt(e)).reduce((e,t)=>{let{outerHTML:n}=t,i=n in e?e[n]:{type:hxt(t),tracked:dxt(t),elements:[]};return{...e,[n]:{...i,elements:[...i.elements,t]}}},{});get trackedElementSignature(){return Object.keys(this.detailsByOuterHTML).filter(e=>this.detailsByOuterHTML[e].tracked).join("")}getScriptElementsNotInSnapshot(e){return this.getElementsMatchingTypeNotInSnapshot("script",e)}getStylesheetElementsNotInSnapshot(e){return this.getElementsMatchingTypeNotInSnapshot("stylesheet",e)}getElementsMatchingTypeNotInSnapshot(e,t){return Object.keys(this.detailsByOuterHTML).filter(n=>!(n in t.detailsByOuterHTML)).map(n=>this.detailsByOuterHTML[n]).filter(({type:n})=>n==e).map(({elements:[n]})=>n)}get provisionalElements(){return Object.keys(this.detailsByOuterHTML).reduce((e,t)=>{let{type:n,tracked:i,elements:o}=this.detailsByOuterHTML[t];return n==null&&!i?[...e,...o]:o.length>1?[...e,...o.slice(1)]:e},[])}getMetaValue(e){let t=this.findMetaElementByName(e);return t?t.getAttribute("content"):null}findMetaElementByName(e){return Object.keys(this.detailsByOuterHTML).reduce((t,n)=>{let{elements:[i]}=this.detailsByOuterHTML[n];return vxt(i,e)?i:t},void 0|void 0)}};od=class extends Iw{static fromHTMLString(e=""){return this.fromDocument(ybe(e))}static fromElement(e){return this.fromDocument(e.ownerDocument)}static fromDocument({documentElement:e,body:t,head:n}){return new this(e,t,new MH(n))}constructor(e,t,n){super(t),this.documentElement=e,this.headSnapshot=n}clone(){let e=this.element.cloneNode(!0),t=this.element.querySelectorAll("select"),n=e.querySelectorAll("select");for(let[i,o]of t.entries()){let a=n[i];for(let u of a.selectedOptions)u.selected=!1;for(let u of o.selectedOptions)a.options[u.index].selected=!0}for(let i of e.querySelectorAll('input[type="password"]'))i.value="";return new od(this.documentElement,e,this.headSnapshot)}get lang(){return this.documentElement.getAttribute("lang")}get headElement(){return this.headSnapshot.element}get rootLocation(){let e=this.getSetting("root")??"/";return tf(e)}get cacheControlValue(){return this.getSetting("cache-control")}get isPreviewable(){return this.cacheControlValue!="no-preview"}get isCacheable(){return this.cacheControlValue!="no-cache"}get isVisitable(){return this.getSetting("visit-control")!="reload"}get prefersViewTransitions(){return this.headSnapshot.getMetaValue("view-transition")==="same-origin"}get shouldMorphPage(){return this.getSetting("refresh-method")==="morph"}get shouldPreserveScrollPosition(){return this.getSetting("refresh-scroll")==="preserve"}getSetting(e){return this.headSnapshot.getMetaValue(`turbo-${e}`)}},PH=class{#e=!1;#t=Promise.resolve();renderChange(e,t){return e&&this.viewTransitionsAvailable&&!this.#e?(this.#e=!0,this.#t=this.#t.then(async()=>{await document.startViewTransition(t).finished})):this.#t=this.#t.then(t),this.#t}get viewTransitionsAvailable(){return document.startViewTransition}},bxt={action:"advance",historyChanged:!1,visitCachedSnapshot:()=>{},willRender:!0,updateHistory:!0,shouldCacheSnapshot:!0,acceptsStreamResponse:!1},fL={visitStart:"visitStart",requestStart:"requestStart",requestEnd:"requestEnd",visitEnd:"visitEnd"},jv={initialized:"initialized",started:"started",canceled:"canceled",failed:"failed",completed:"completed"},Aw={networkFailure:0,timeoutFailure:-1,contentTypeMismatch:-2},xxt={advance:"forward",restore:"back",replace:"none"},LH=class{identifier=mb();timingMetrics={};followedRedirect=!1;historyChanged=!1;scrolled=!1;shouldCacheSnapshot=!0;acceptsStreamResponse=!1;snapshotCached=!1;state=jv.initialized;viewTransitioner=new PH;constructor(e,t,n,i={}){this.delegate=e,this.location=t,this.restorationIdentifier=n||mb();let{action:o,historyChanged:a,referrer:u,snapshot:h,snapshotHTML:p,response:_,visitCachedSnapshot:T,willRender:O,updateHistory:L,shouldCacheSnapshot:q,acceptsStreamResponse:U,direction:Z}={...bxt,...i};this.action=o,this.historyChanged=a,this.referrer=u,this.snapshot=h,this.snapshotHTML=p,this.response=_,this.isSamePage=this.delegate.locationWithActionIsSamePage(this.location,this.action),this.isPageRefresh=this.view.isPageRefresh(this),this.visitCachedSnapshot=T,this.willRender=O,this.updateHistory=L,this.scrolled=!O,this.shouldCacheSnapshot=q,this.acceptsStreamResponse=U,this.direction=Z||xxt[o]}get adapter(){return this.delegate.adapter}get view(){return this.delegate.view}get history(){return this.delegate.history}get restorationData(){return this.history.getRestorationDataForIdentifier(this.restorationIdentifier)}get silent(){return this.isSamePage}start(){this.state==jv.initialized&&(this.recordTimingMetric(fL.visitStart),this.state=jv.started,this.adapter.visitStarted(this),this.delegate.visitStarted(this))}cancel(){this.state==jv.started&&(this.request&&this.request.cancel(),this.cancelRender(),this.state=jv.canceled)}complete(){this.state==jv.started&&(this.recordTimingMetric(fL.visitEnd),this.state=jv.completed,this.followRedirect(),this.followedRedirect||(this.adapter.visitCompleted(this),this.delegate.visitCompleted(this)))}fail(){this.state==jv.started&&(this.state=jv.failed,this.adapter.visitFailed(this),this.delegate.visitCompleted(this))}changeHistory(){if(!this.historyChanged&&this.updateHistory){let e=this.location.href===this.referrer?.href?"replace":this.action,t=xbe(e);this.history.update(t,this.location,this.restorationIdentifier),this.historyChanged=!0}}issueRequest(){this.hasPreloadedResponse()?this.simulateRequest():this.shouldIssueRequest()&&!this.request&&(this.request=new gb(this,Jd.get,this.location),this.request.perform())}simulateRequest(){this.response&&(this.startRequest(),this.recordResponse(),this.finishRequest())}startRequest(){this.recordTimingMetric(fL.requestStart),this.adapter.visitRequestStarted(this)}recordResponse(e=this.response){if(this.response=e,e){let{statusCode:t}=e;fbe(t)?this.adapter.visitRequestCompleted(this):this.adapter.visitRequestFailedWithStatusCode(this,t)}}finishRequest(){this.recordTimingMetric(fL.requestEnd),this.adapter.visitRequestFinished(this)}loadResponse(){if(this.response){let{statusCode:e,responseHTML:t}=this.response;this.render(async()=>{if(this.shouldCacheSnapshot&&this.cacheSnapshot(),this.view.renderPromise&&await this.view.renderPromise,fbe(e)&&t!=null){let n=od.fromHTMLString(t);await this.renderPageSnapshot(n,!1),this.adapter.visitRendered(this),this.complete()}else await this.view.renderError(od.fromHTMLString(t),this),this.adapter.visitRendered(this),this.fail()})}}getCachedSnapshot(){let e=this.view.getCachedSnapshotForLocation(this.location)||this.getPreloadedSnapshot();if(e&&(!ux(this.location)||e.hasAnchor(ux(this.location)))&&(this.action=="restore"||e.isPreviewable))return e}getPreloadedSnapshot(){if(this.snapshotHTML)return od.fromHTMLString(this.snapshotHTML)}hasCachedSnapshot(){return this.getCachedSnapshot()!=null}loadCachedSnapshot(){let e=this.getCachedSnapshot();if(e){let t=this.shouldIssueRequest();this.render(async()=>{this.cacheSnapshot(),this.isSamePage||this.isPageRefresh?this.adapter.visitRendered(this):(this.view.renderPromise&&await this.view.renderPromise,await this.renderPageSnapshot(e,t),this.adapter.visitRendered(this),t||this.complete())})}}followRedirect(){this.redirectedToLocation&&!this.followedRedirect&&this.response?.redirected&&(this.adapter.visitProposedToLocation(this.redirectedToLocation,{action:"replace",response:this.response,shouldCacheSnapshot:!1,willRender:!1}),this.followedRedirect=!0)}goToSamePageAnchor(){this.isSamePage&&this.render(async()=>{this.cacheSnapshot(),this.performScroll(),this.changeHistory(),this.adapter.visitRendered(this)})}prepareRequest(e){this.acceptsStreamResponse&&e.acceptResponseType(Ag.contentType)}requestStarted(){this.startRequest()}requestPreventedHandlingResponse(e,t){}async requestSucceededWithResponse(e,t){let n=await t.responseHTML,{redirected:i,statusCode:o}=t;n==null?this.recordResponse({statusCode:Aw.contentTypeMismatch,redirected:i}):(this.redirectedToLocation=t.redirected?t.location:void 0,this.recordResponse({statusCode:o,responseHTML:n,redirected:i}))}async requestFailedWithResponse(e,t){let n=await t.responseHTML,{redirected:i,statusCode:o}=t;n==null?this.recordResponse({statusCode:Aw.contentTypeMismatch,redirected:i}):this.recordResponse({statusCode:o,responseHTML:n,redirected:i})}requestErrored(e,t){this.recordResponse({statusCode:Aw.networkFailure,redirected:!1})}requestFinished(){this.finishRequest()}performScroll(){!this.scrolled&&!this.view.forceReloaded&&!this.view.shouldPreserveScrollPosition(this)&&(this.action=="restore"?this.scrollToRestoredPosition()||this.scrollToAnchor()||this.view.scrollToTop():this.scrollToAnchor()||this.view.scrollToTop(),this.isSamePage&&this.delegate.visitScrolledToSamePageLocation(this.view.lastRenderedLocation,this.location),this.scrolled=!0)}scrollToRestoredPosition(){let{scrollPosition:e}=this.restorationData;if(e)return this.view.scrollToPosition(e),!0}scrollToAnchor(){let e=ux(this.location);if(e!=null)return this.view.scrollToAnchor(e),!0}recordTimingMetric(e){this.timingMetrics[e]=new Date().getTime()}getTimingMetrics(){return{...this.timingMetrics}}getHistoryMethodForAction(e){switch(e){case"replace":return history.replaceState;case"advance":case"restore":return history.pushState}}hasPreloadedResponse(){return typeof this.response=="object"}shouldIssueRequest(){return this.isSamePage?!1:this.action=="restore"?!this.hasCachedSnapshot():this.willRender}cacheSnapshot(){this.snapshotCached||(this.view.cacheSnapshot(this.snapshot).then(e=>e&&this.visitCachedSnapshot(e)),this.snapshotCached=!0)}async render(e){this.cancelRender(),this.frame=await Ew(),await e(),delete this.frame}async renderPageSnapshot(e,t){await this.viewTransitioner.renderChange(this.view.shouldTransitionTo(e),async()=>{await this.view.renderPage(e,t,this.willRender,this),this.performScroll()})}cancelRender(){this.frame&&(cancelAnimationFrame(this.frame),delete this.frame)}};RH=class{progressBar=new hL;constructor(e){this.session=e}visitProposedToLocation(e,t){db(e,this.navigator.rootLocation)?this.navigator.startVisit(e,t?.restorationIdentifier||mb(),t):window.location.href=e.toString()}visitStarted(e){this.location=e.location,e.loadCachedSnapshot(),e.issueRequest(),e.goToSamePageAnchor()}visitRequestStarted(e){this.progressBar.setValue(0),e.hasCachedSnapshot()||e.action!="restore"?this.showVisitProgressBarAfterDelay():this.showProgressBar()}visitRequestCompleted(e){e.loadResponse()}visitRequestFailedWithStatusCode(e,t){switch(t){case Aw.networkFailure:case Aw.timeoutFailure:case Aw.contentTypeMismatch:return this.reload({reason:"request_failed",context:{statusCode:t}});default:return e.loadResponse()}}visitRequestFinished(e){}visitCompleted(e){this.progressBar.setValue(1),this.hideVisitProgressBar()}pageInvalidated(e){this.reload(e)}visitFailed(e){this.progressBar.setValue(1),this.hideVisitProgressBar()}visitRendered(e){}formSubmissionStarted(e){this.progressBar.setValue(0),this.showFormProgressBarAfterDelay()}formSubmissionFinished(e){this.progressBar.setValue(1),this.hideFormProgressBar()}showVisitProgressBarAfterDelay(){this.visitProgressBarTimeout=window.setTimeout(this.showProgressBar,this.session.progressBarDelay)}hideVisitProgressBar(){this.progressBar.hide(),this.visitProgressBarTimeout!=null&&(window.clearTimeout(this.visitProgressBarTimeout),delete this.visitProgressBarTimeout)}showFormProgressBarAfterDelay(){this.formProgressBarTimeout==null&&(this.formProgressBarTimeout=window.setTimeout(this.showProgressBar,this.session.progressBarDelay))}hideFormProgressBar(){this.progressBar.hide(),this.formProgressBarTimeout!=null&&(window.clearTimeout(this.formProgressBarTimeout),delete this.formProgressBarTimeout)}showProgressBar=()=>{this.progressBar.show()};reload(e){Vl("turbo:reload",{detail:e}),window.location.href=this.location?.toString()||window.location.href}get navigator(){return this.session.navigator}},FH=class{selector="[data-turbo-temporary]";deprecatedSelector="[data-turbo-cache=false]";started=!1;start(){this.started||(this.started=!0,addEventListener("turbo:before-cache",this.removeTemporaryElements,!1))}stop(){this.started&&(this.started=!1,removeEventListener("turbo:before-cache",this.removeTemporaryElements,!1))}removeTemporaryElements=e=>{for(let t of this.temporaryElements)t.remove()};get temporaryElements(){return[...document.querySelectorAll(this.selector),...this.temporaryElementsWithDeprecation]}get temporaryElementsWithDeprecation(){let e=document.querySelectorAll(this.deprecatedSelector);return e.length&&console.warn(`The ${this.deprecatedSelector} selector is deprecated and will be removed in a future version. Use ${this.selector} instead.`),[...e]}},NH=class{constructor(e,t){this.session=e,this.element=t,this.linkInterceptor=new vL(this,t),this.formSubmitObserver=new hC(this,t)}start(){this.linkInterceptor.start(),this.formSubmitObserver.start()}stop(){this.linkInterceptor.stop(),this.formSubmitObserver.stop()}shouldInterceptLinkClick(e,t,n){return this.#t(e)}linkClickIntercepted(e,t,n){let i=this.#r(e);i&&i.delegate.linkClickIntercepted(e,t,n)}willSubmitForm(e,t){return e.closest("turbo-frame")==null&&this.#e(e,t)&&this.#t(e,t)}formSubmitted(e,t){let n=this.#r(e,t);n&&n.delegate.formSubmitted(e,t)}#e(e,t){let n=QH(e,t),i=this.element.ownerDocument.querySelector('meta[name="turbo-root"]'),o=tf(i?.content??"/");return this.#t(e,t)&&db(n,o)}#t(e,t){if(e instanceof HTMLFormElement?this.session.submissionIsNavigatable(e,t):this.session.elementIsNavigatable(e)){let i=this.#r(e,t);return i?i!=e.closest("turbo-frame"):!1}else return!1}#r(e,t){let n=t?.getAttribute("data-turbo-frame")||e.getAttribute("data-turbo-frame");if(n&&n!="_top"){let i=this.element.querySelector(`#${n}:not([disabled])`);if(i instanceof Wp)return i}}},qH=class{location;restorationIdentifier=mb();restorationData={};started=!1;pageLoaded=!1;currentIndex=0;constructor(e){this.delegate=e}start(){this.started||(addEventListener("popstate",this.onPopState,!1),addEventListener("load",this.onPageLoad,!1),this.currentIndex=history.state?.turbo?.restorationIndex||0,this.started=!0,this.replace(new URL(window.location.href)))}stop(){this.started&&(removeEventListener("popstate",this.onPopState,!1),removeEventListener("load",this.onPageLoad,!1),this.started=!1)}push(e,t){this.update(history.pushState,e,t)}replace(e,t){this.update(history.replaceState,e,t)}update(e,t,n=mb()){e===history.pushState&&++this.currentIndex;let i={turbo:{restorationIdentifier:n,restorationIndex:this.currentIndex}};e.call(history,i,"",t.href),this.location=t,this.restorationIdentifier=n}getRestorationDataForIdentifier(e){return this.restorationData[e]||{}}updateRestorationData(e){let{restorationIdentifier:t}=this,n=this.restorationData[t];this.restorationData[t]={...n,...e}}assumeControlOfScrollRestoration(){this.previousScrollRestoration||(this.previousScrollRestoration=history.scrollRestoration??"auto",history.scrollRestoration="manual")}relinquishControlOfScrollRestoration(){this.previousScrollRestoration&&(history.scrollRestoration=this.previousScrollRestoration,delete this.previousScrollRestoration)}onPopState=e=>{if(this.shouldHandlePopState()){let{turbo:t}=e.state||{};if(t){this.location=new URL(window.location.href);let{restorationIdentifier:n,restorationIndex:i}=t;this.restorationIdentifier=n;let o=i>this.currentIndex?"forward":"back";this.delegate.historyPoppedToLocationWithRestorationIdentifierAndDirection(this.location,n,o),this.currentIndex=i}}};onPageLoad=async e=>{await z0t(),this.pageLoaded=!0};shouldHandlePopState(){return this.pageIsLoaded()}pageIsLoaded(){return this.pageLoaded||document.readyState=="complete"}},BH=class{started=!1;#e=null;constructor(e,t){this.delegate=e,this.eventTarget=t}start(){this.started||(this.eventTarget.readyState==="loading"?this.eventTarget.addEventListener("DOMContentLoaded",this.#t,{once:!0}):this.#t())}stop(){!this.started||(this.eventTarget.removeEventListener("mouseenter",this.#r,{capture:!0,passive:!0}),this.eventTarget.removeEventListener("mouseleave",this.#i,{capture:!0,passive:!0}),this.eventTarget.removeEventListener("turbo:before-fetch-request",this.#n,!0),this.started=!1)}#t=()=>{this.eventTarget.addEventListener("mouseenter",this.#r,{capture:!0,passive:!0}),this.eventTarget.addEventListener("mouseleave",this.#i,{capture:!0,passive:!0}),this.eventTarget.addEventListener("turbo:before-fetch-request",this.#n,!0),this.started=!0};#r=e=>{if(Ow("turbo-prefetch")==="false")return;let t=e.target;if(t.matches&&t.matches("a[href]:not([target^=_]):not([download])")&&this.#s(t)){let i=t,o=kbe(i);if(this.delegate.canPrefetchRequestToLocation(i,o)){this.#e=i;let a=new gb(this,Jd.get,o,new URLSearchParams,t);Tw.setLater(o.toString(),a,this.#a)}}};#i=e=>{e.target===this.#e&&this.#o()};#o=()=>{Tw.clear(),this.#e=null};#n=e=>{if(e.target.tagName!=="FORM"&&e.detail.fetchOptions.method==="get"){let t=Tw.get(e.detail.url.toString());t&&(e.detail.fetchRequest=t),Tw.clear()}};prepareRequest(e){let t=e.target;e.headers["X-Sec-Purpose"]="prefetch";let n=t.closest("turbo-frame"),i=t.getAttribute("data-turbo-frame")||n?.getAttribute("target")||n?.id;i&&i!=="_top"&&(e.headers["Turbo-Frame"]=i),t.hasAttribute("data-turbo-stream")&&e.acceptResponseType(Ag.contentType)}requestSucceededWithResponse(){}requestStarted(e){}requestErrored(e){}requestFinished(e){}requestPreventedHandlingResponse(e,t){}requestFailedWithResponse(e,t){}get#a(){return Number(Ow("turbo-prefetch-cache-time"))||Q0t}#s(e){let t=e.getAttribute("href");if(!t||t.startsWith("#")||e.getAttribute("data-turbo")==="false"||e.getAttribute("data-turbo-prefetch")==="false"||Vl("turbo:before-prefetch",{target:e,cancelable:!0}).defaultPrevented||e.origin!==document.location.origin||!["http:","https:"].includes(e.protocol)||e.pathname+e.search===document.location.pathname+document.location.search)return!1;let i=e.getAttribute("data-turbo-method");if(i&&i!=="get"||_xt(e))return!1;let o=Cw(e,"[data-turbo-prefetch]");return!(o&&o.getAttribute("data-turbo-prefetch")==="false")}},_xt=r=>!Sbe(r),zH=class{constructor(e){this.delegate=e}proposeVisit(e,t={}){this.delegate.allowsVisitingLocationWithAction(e,t.action)&&this.delegate.visitProposedToLocation(e,t)}startVisit(e,t,n={}){this.stop(),this.currentVisit=new LH(this,tf(e),t,{referrer:this.location,...n}),this.currentVisit.start()}submitForm(e,t){this.stop(),this.formSubmission=new fx(this,e,t,!0),this.formSubmission.start()}stop(){this.formSubmission&&(this.formSubmission.stop(),delete this.formSubmission),this.currentVisit&&(this.currentVisit.cancel(),delete this.currentVisit)}get adapter(){return this.delegate.adapter}get view(){return this.delegate.view}get rootLocation(){return this.view.snapshot.rootLocation}get history(){return this.delegate.history}formSubmissionStarted(e){typeof this.adapter.formSubmissionStarted=="function"&&this.adapter.formSubmissionStarted(e)}async formSubmissionSucceededWithResponse(e,t){if(e==this.formSubmission){let n=await t.responseHTML;if(n){let i=e.isSafe;i||this.view.clearSnapshotCache();let{statusCode:o,redirected:a}=t,h={action:this.#e(e,t),shouldCacheSnapshot:i,response:{statusCode:o,responseHTML:n,redirected:a}};this.proposeVisit(t.location,h)}}}async formSubmissionFailedWithResponse(e,t){let n=await t.responseHTML;if(n){let i=od.fromHTMLString(n);t.serverError?await this.view.renderError(i,this.currentVisit):await this.view.renderPage(i,!1,!0,this.currentVisit),i.shouldPreserveScrollPosition||this.view.scrollToTop(),this.view.clearSnapshotCache()}}formSubmissionErrored(e,t){console.error(t)}formSubmissionFinished(e){typeof this.adapter.formSubmissionFinished=="function"&&this.adapter.formSubmissionFinished(e)}visitStarted(e){this.delegate.visitStarted(e)}visitCompleted(e){this.delegate.visitCompleted(e)}locationWithActionIsSamePage(e,t){let n=ux(e),i=ux(this.view.lastRenderedLocation),o=t==="restore"&&typeof n>"u";return t!=="replace"&&CH(e)===CH(this.view.lastRenderedLocation)&&(o||n!=null&&n!==i)}visitScrolledToSamePageLocation(e,t){this.delegate.visitScrolledToSamePageLocation(e,t)}get location(){return this.history.location}get restorationIdentifier(){return this.history.restorationIdentifier}#e(e,t){let{submitter:n,formElement:i}=e;return cx(n,i)||this.#t(t)}#t(e){return e.redirected&&e.location.href===this.location?.href?"replace":"advance"}},sx={initial:0,loading:1,interactive:2,complete:3},jH=class{stage=sx.initial;started=!1;constructor(e){this.delegate=e}start(){this.started||(this.stage==sx.initial&&(this.stage=sx.loading),document.addEventListener("readystatechange",this.interpretReadyState,!1),addEventListener("pagehide",this.pageWillUnload,!1),this.started=!0)}stop(){this.started&&(document.removeEventListener("readystatechange",this.interpretReadyState,!1),removeEventListener("pagehide",this.pageWillUnload,!1),this.started=!1)}interpretReadyState=()=>{let{readyState:e}=this;e=="interactive"?this.pageIsInteractive():e=="complete"&&this.pageIsComplete()};pageIsInteractive(){this.stage==sx.loading&&(this.stage=sx.interactive,this.delegate.pageBecameInteractive())}pageIsComplete(){this.pageIsInteractive(),this.stage==sx.interactive&&(this.stage=sx.complete,this.delegate.pageLoaded())}pageWillUnload=()=>{this.delegate.pageWillUnload()};get readyState(){return document.readyState}},UH=class{started=!1;constructor(e){this.delegate=e}start(){this.started||(addEventListener("scroll",this.onScroll,!1),this.onScroll(),this.started=!0)}stop(){this.started&&(removeEventListener("scroll",this.onScroll,!1),this.started=!1)}onScroll=()=>{this.updatePosition({x:window.pageXOffset,y:window.pageYOffset})};updatePosition(e){this.delegate.scrollPositionChanged(e)}},HH=class{render({fragment:e}){xL.preservingPermanentElements(this,wxt(e),()=>{Sxt(e,()=>{kxt(()=>{document.documentElement.appendChild(e)})})})}enteringBardo(e,t){t.replaceWith(e.cloneNode(!0))}leavingBardo(){}};WH=class{sources=new Set;#e=!1;constructor(e){this.delegate=e}start(){this.#e||(this.#e=!0,addEventListener("turbo:before-fetch-response",this.inspectFetchResponse,!1))}stop(){this.#e&&(this.#e=!1,removeEventListener("turbo:before-fetch-response",this.inspectFetchResponse,!1))}connectStreamSource(e){this.streamSourceIsConnected(e)||(this.sources.add(e),e.addEventListener("message",this.receiveMessageEvent,!1))}disconnectStreamSource(e){this.streamSourceIsConnected(e)&&(this.sources.delete(e),e.removeEventListener("message",this.receiveMessageEvent,!1))}streamSourceIsConnected(e){return this.sources.has(e)}inspectFetchResponse=e=>{let t=Ext(e);t&&Cxt(t)&&(e.preventDefault(),this.receiveMessageResponse(t))};receiveMessageEvent=e=>{this.#e&&typeof e.data=="string"&&this.receiveMessageHTML(e.data)};async receiveMessageResponse(e){let t=await e.responseHTML;t&&this.receiveMessageHTML(t)}receiveMessageHTML(e){this.delegate.receivedMessageFromStream(Ag.wrap(e))}};_L=class extends dC{static renderElement(e,t){let{documentElement:n,body:i}=document;n.replaceChild(t,i)}async render(){this.replaceHeadAndBody(),this.activateScriptElements()}replaceHeadAndBody(){let{documentElement:e,head:t}=document;e.replaceChild(this.newHead,t),this.renderElement(this.currentElement,this.newElement)}activateScriptElements(){for(let e of this.scriptElements){let t=e.parentNode;if(t){let n=fC(e);t.replaceChild(n,e)}}}get newHead(){return this.newSnapshot.headSnapshot.element}get scriptElements(){return document.documentElement.querySelectorAll("script")}},Axt=function(){let r=new Set,e={morphStyle:"outerHTML",callbacks:{beforeNodeAdded:O,afterNodeAdded:O,beforeNodeMorphed:O,afterNodeMorphed:O,beforeNodeRemoved:O,afterNodeRemoved:O,beforeAttributeUpdated:O},head:{style:"merge",shouldPreserve:function(V){return V.getAttribute("im-preserve")==="true"},shouldReAppend:function(V){return V.getAttribute("im-re-append")==="true"},shouldRemove:O,afterHeadMorphed:O}};function t(V,H,X={}){V instanceof Document&&(V=V.documentElement),typeof H=="string"&&(H=S(H));let me=ve(H),G=q(V,me,X);return n(V,me,G)}function n(V,H,X){if(X.head.block){let me=V.querySelector("head"),G=H.querySelector("head");if(me&&G){let j=T(G,me,X);Promise.all(j).then(function(){n(V,H,Object.assign(X,{head:{block:!1,ignore:!0}}))});return}}if(X.morphStyle==="innerHTML")return a(H,V,X),V.children;if(X.morphStyle==="outerHTML"||X.morphStyle==null){let me=ge(H,V,X),G=me?.previousSibling,j=me?.nextSibling,Me=o(V,me,X);return me?le(G,Me,j):[]}else throw"Do not understand how to morph style "+X.morphStyle}function i(V,H){return H.ignoreActiveValue&&V===document.activeElement&&V!==document.body}function o(V,H,X){if(!(X.ignoreActive&&V===document.activeElement))return H==null?X.callbacks.beforeNodeRemoved(V)===!1?V:(V.remove(),X.callbacks.afterNodeRemoved(V),null):Z(V,H)?(X.callbacks.beforeNodeMorphed(V,H)===!1||(V instanceof HTMLHeadElement&&X.head.ignore||(V instanceof HTMLHeadElement&&X.head.style!=="morph"?T(H,V,X):(h(H,V,X),i(V,X)||a(H,V,X))),X.callbacks.afterNodeMorphed(V,H)),V):X.callbacks.beforeNodeRemoved(V)===!1||X.callbacks.beforeNodeAdded(H)===!1?V:(V.parentElement.replaceChild(H,V),X.callbacks.afterNodeAdded(H),X.callbacks.afterNodeRemoved(V),H)}function a(V,H,X){let me=V.firstChild,G=H.firstChild,j;for(;me;){if(j=me,me=j.nextSibling,G==null){if(X.callbacks.beforeNodeAdded(j)===!1)return;H.appendChild(j),X.callbacks.afterNodeAdded(j),B(X,j);continue}if(U(j,G,X)){o(G,j,X),G=G.nextSibling,B(X,j);continue}let Me=ie(V,H,j,G,X);if(Me){G=te(G,Me,X),o(Me,j,X),B(X,j);continue}let Ze=ue(V,H,j,G,X);if(Ze){G=te(G,Ze,X),o(Ze,j,X),B(X,j);continue}if(X.callbacks.beforeNodeAdded(j)===!1)return;H.insertBefore(j,G),X.callbacks.afterNodeAdded(j),B(X,j)}for(;G!==null;){let Me=G;G=G.nextSibling,ye(Me,X)}}function u(V,H,X,me){return V==="value"&&me.ignoreActiveValue&&H===document.activeElement?!0:me.callbacks.beforeAttributeUpdated(V,H,X)===!1}function h(V,H,X){let me=V.nodeType;if(me===1){let G=V.attributes,j=H.attributes;for(let Me of G)u(Me.name,H,"update",X)||H.getAttribute(Me.name)!==Me.value&&H.setAttribute(Me.name,Me.value);for(let Me=j.length-1;0<=Me;Me--){let Ze=j[Me];u(Ze.name,H,"remove",X)||V.hasAttribute(Ze.name)||H.removeAttribute(Ze.name)}}(me===8||me===3)&&H.nodeValue!==V.nodeValue&&(H.nodeValue=V.nodeValue),i(H,X)||_(V,H,X)}function p(V,H,X,me){if(V[X]!==H[X]){let G=u(X,H,"update",me);G||(H[X]=V[X]),V[X]?G||H.setAttribute(X,V[X]):u(X,H,"remove",me)||H.removeAttribute(X)}}function _(V,H,X){if(V instanceof HTMLInputElement&&H instanceof HTMLInputElement&&V.type!=="file"){let me=V.value,G=H.value;p(V,H,"checked",X),p(V,H,"disabled",X),V.hasAttribute("value")?me!==G&&(u("value",H,"update",X)||(H.setAttribute("value",me),H.value=me)):u("value",H,"remove",X)||(H.value="",H.removeAttribute("value"))}else if(V instanceof HTMLOptionElement)p(V,H,"selected",X);else if(V instanceof HTMLTextAreaElement&&H instanceof HTMLTextAreaElement){let me=V.value,G=H.value;if(u("value",H,"update",X))return;me!==G&&(H.value=me),H.firstChild&&H.firstChild.nodeValue!==me&&(H.firstChild.nodeValue=me)}}function T(V,H,X){let me=[],G=[],j=[],Me=[],Ze=X.head.style,Qe=new Map;for(let xt of V.children)Qe.set(xt.outerHTML,xt);for(let xt of H.children){let Ft=Qe.has(xt.outerHTML),Ot=X.head.shouldReAppend(xt),Yt=X.head.shouldPreserve(xt);Ft||Yt?Ot?G.push(xt):(Qe.delete(xt.outerHTML),j.push(xt)):Ze==="append"?Ot&&(G.push(xt),Me.push(xt)):X.head.shouldRemove(xt)!==!1&&G.push(xt)}Me.push(...Qe.values());let Ct=[];for(let xt of Me){let Ft=document.createRange().createContextualFragment(xt.outerHTML).firstChild;if(X.callbacks.beforeNodeAdded(Ft)!==!1){if(Ft.href||Ft.src){let Ot=null,Yt=new Promise(function(cr){Ot=cr});Ft.addEventListener("load",function(){Ot()}),Ct.push(Yt)}H.appendChild(Ft),X.callbacks.afterNodeAdded(Ft),me.push(Ft)}}for(let xt of G)X.callbacks.beforeNodeRemoved(xt)!==!1&&(H.removeChild(xt),X.callbacks.afterNodeRemoved(xt));return X.head.afterHeadMorphed(H,{added:me,kept:j,removed:G}),Ct}function O(){}function L(V){let H={};return Object.assign(H,e),Object.assign(H,V),H.callbacks={},Object.assign(H.callbacks,e.callbacks),Object.assign(H.callbacks,V.callbacks),H.head={},Object.assign(H.head,e.head),Object.assign(H.head,V.head),H}function q(V,H,X){return X=L(X),{target:V,newContent:H,config:X,morphStyle:X.morphStyle,ignoreActive:X.ignoreActive,ignoreActiveValue:X.ignoreActiveValue,idMap:$(V,H),deadIds:new Set,callbacks:X.callbacks,head:X.head}}function U(V,H,X){return V==null||H==null?!1:V.nodeType===H.nodeType&&V.tagName===H.tagName?V.id!==""&&V.id===H.id?!0:re(X,V,H)>0:!1}function Z(V,H){return V==null||H==null?!1:V.nodeType===H.nodeType&&V.tagName===H.tagName}function te(V,H,X){for(;V!==H;){let me=V;V=V.nextSibling,ye(me,X)}return B(X,H),H.nextSibling}function ie(V,H,X,me,G){let j=re(G,X,H),Me=null;if(j>0){let Ze=me,Qe=0;for(;Ze!=null;){if(U(X,Ze,G))return Ze;if(Qe+=re(G,Ze,V),Qe>j)return null;Ze=Ze.nextSibling}}return Me}function ue(V,H,X,me,G){let j=me,Me=X.nextSibling,Ze=0;for(;j!=null;){if(re(G,j,V)>0)return null;if(Z(X,j))return j;if(Z(Me,j)&&(Ze++,Me=Me.nextSibling,Ze>=2))return null;j=j.nextSibling}return j}function S(V){let H=new DOMParser,X=V.replace(/]*>|>)([\s\S]*?)<\/svg>/gim,"");if(X.match(/<\/html>/)||X.match(/<\/head>/)||X.match(/<\/body>/)){let me=H.parseFromString(V,"text/html");if(X.match(/<\/html>/))return me.generatedByIdiomorph=!0,me;{let G=me.firstChild;return G?(G.generatedByIdiomorph=!0,G):null}}else{let G=H.parseFromString("","text/html").body.querySelector("template").content;return G.generatedByIdiomorph=!0,G}}function ve(V){if(V==null)return document.createElement("div");if(V.generatedByIdiomorph)return V;if(V instanceof Node){let H=document.createElement("div");return H.append(V),H}else{let H=document.createElement("div");for(let X of[...V])H.append(X);return H}}function le(V,H,X){let me=[],G=[];for(;V!=null;)me.push(V),V=V.previousSibling;for(;me.length>0;){let j=me.pop();G.push(j),H.parentElement.insertBefore(j,H)}for(G.push(H);X!=null;)me.push(X),G.push(X),X=X.nextSibling;for(;me.length>0;)H.parentElement.insertBefore(me.pop(),H.nextSibling);return G}function ge(V,H,X){let me;me=V.firstChild;let G=me,j=0;for(;me;){let Me=Se(me,H,X);Me>j&&(G=me,j=Me),me=me.nextSibling}return G}function Se(V,H,X){return Z(V,H)?.5+re(X,V,H):0}function ye(V,H){B(H,V),H.callbacks.beforeNodeRemoved(V)!==!1&&(V.remove(),H.callbacks.afterNodeRemoved(V))}function be(V,H){return!V.deadIds.has(H)}function Ue(V,H,X){return(V.idMap.get(X)||r).has(H)}function B(V,H){let X=V.idMap.get(H)||r;for(let me of X)V.deadIds.add(me)}function re(V,H,X){let me=V.idMap.get(H)||r,G=0;for(let j of me)be(V,j)&&Ue(V,j,X)&&++G;return G}function N(V,H){let X=V.parentElement,me=V.querySelectorAll("[id]");for(let G of me){let j=G;for(;j!==X&&j!=null;){let Me=H.get(j);Me==null&&(Me=new Set,H.set(j,Me)),Me.add(G.id),j=j.parentElement}}}function $(V,H){let X=new Map;return N(V,X),N(H,X),X}return{morph:t,defaults:e}}(),hx=class extends dC{static renderElement(e,t){document.body&&t instanceof HTMLBodyElement?document.body.replaceWith(t):document.documentElement.appendChild(t)}get shouldRender(){return this.newSnapshot.isVisitable&&this.trackedElementsAreIdentical}get reloadReason(){if(!this.newSnapshot.isVisitable)return{reason:"turbo_visit_control_is_reload"};if(!this.trackedElementsAreIdentical)return{reason:"tracked_element_mismatch"}}async prepareToRender(){this.#e(),await this.mergeHead()}async render(){this.willRender&&await this.replaceBody()}finishRendering(){super.finishRendering(),this.isPreview||this.focusFirstAutofocusableElement()}get currentHeadSnapshot(){return this.currentSnapshot.headSnapshot}get newHeadSnapshot(){return this.newSnapshot.headSnapshot}get newElement(){return this.newSnapshot.element}#e(){let{documentElement:e}=this.currentSnapshot,{lang:t}=this.newSnapshot;t?e.setAttribute("lang",t):e.removeAttribute("lang")}async mergeHead(){let e=this.mergeProvisionalElements(),t=this.copyNewHeadStylesheetElements();this.copyNewHeadScriptElements(),await e,await t,this.willRender&&this.removeUnusedDynamicStylesheetElements()}async replaceBody(){await this.preservingPermanentElements(async()=>{this.activateNewBody(),await this.assignNewBody()})}get trackedElementsAreIdentical(){return this.currentHeadSnapshot.trackedElementSignature==this.newHeadSnapshot.trackedElementSignature}async copyNewHeadStylesheetElements(){let e=[];for(let t of this.newHeadStylesheetElements)e.push(H0t(t)),document.head.appendChild(t);await Promise.all(e)}copyNewHeadScriptElements(){for(let e of this.newHeadScriptElements)document.head.appendChild(fC(e))}removeUnusedDynamicStylesheetElements(){for(let e of this.unusedDynamicStylesheetElements)document.head.removeChild(e)}async mergeProvisionalElements(){let e=[...this.newHeadProvisionalElements];for(let t of this.currentHeadProvisionalElements)this.isCurrentElementInElementList(t,e)||document.head.removeChild(t);for(let t of e)document.head.appendChild(t)}isCurrentElementInElementList(e,t){for(let[n,i]of t.entries()){if(e.tagName=="TITLE"){if(i.tagName!="TITLE")continue;if(e.innerHTML==i.innerHTML)return t.splice(n,1),!0}if(i.isEqualNode(e))return t.splice(n,1),!0}return!1}removeCurrentHeadProvisionalElements(){for(let e of this.currentHeadProvisionalElements)document.head.removeChild(e)}copyNewHeadProvisionalElements(){for(let e of this.newHeadProvisionalElements)document.head.appendChild(e)}activateNewBody(){document.adoptNode(this.newElement),this.activateNewBodyScriptElements()}activateNewBodyScriptElements(){for(let e of this.newBodyScriptElements){let t=fC(e);e.replaceWith(t)}}async assignNewBody(){await this.renderElement(this.currentElement,this.newElement)}get unusedDynamicStylesheetElements(){return this.oldHeadStylesheetElements.filter(e=>e.getAttribute("data-turbo-track")==="dynamic")}get oldHeadStylesheetElements(){return this.currentHeadSnapshot.getStylesheetElementsNotInSnapshot(this.newHeadSnapshot)}get newHeadStylesheetElements(){return this.newHeadSnapshot.getStylesheetElementsNotInSnapshot(this.currentHeadSnapshot)}get newHeadScriptElements(){return this.newHeadSnapshot.getScriptElementsNotInSnapshot(this.currentHeadSnapshot)}get currentHeadProvisionalElements(){return this.currentHeadSnapshot.provisionalElements}get newHeadProvisionalElements(){return this.newHeadSnapshot.provisionalElements}get newBodyScriptElements(){return this.newElement.querySelectorAll("script")}},VH=class extends hx{async render(){this.willRender&&await this.#e()}get renderMethod(){return"morph"}async#e(){this.#t(this.currentElement,this.newElement),this.#s(),Vl("turbo:morph",{detail:{currentElement:this.currentElement,newElement:this.newElement}})}#t(e,t,n="outerHTML"){this.isMorphingTurboFrame=this.#l(e),Axt.morph(e,t,{ignoreActiveValue:!0,morphStyle:n,callbacks:{beforeNodeAdded:this.#r,beforeNodeMorphed:this.#i,beforeAttributeUpdated:this.#o,beforeNodeRemoved:this.#a,afterNodeMorphed:this.#n}})}#r=e=>!(e.id&&e.hasAttribute("data-turbo-permanent")&&document.getElementById(e.id));#i=(e,t)=>{if(e instanceof HTMLElement)return!e.hasAttribute("data-turbo-permanent")&&(this.isMorphingTurboFrame||!this.#l(e))?!Vl("turbo:before-morph-element",{cancelable:!0,target:e,detail:{newElement:t}}).defaultPrevented:!1};#o=(e,t,n)=>!Vl("turbo:before-morph-attribute",{cancelable:!0,target:t,detail:{attributeName:e,mutationType:n}}).defaultPrevented;#n=(e,t)=>{t instanceof HTMLElement&&Vl("turbo:morph-element",{target:e,detail:{newElement:t}})};#a=e=>this.#i(e);#s(){this.#h().forEach(e=>{this.#l(e)&&(this.#c(e),e.reload())})}#c(e){e.addEventListener("turbo:before-frame-render",t=>{t.detail.render=this.#f},{once:!0})}#f=(e,t)=>{Vl("turbo:before-frame-morph",{target:e,detail:{currentElement:e,newElement:t}}),this.#t(e,t.children,"innerHTML")};#l(e){return e.src&&e.refresh==="morph"}#h(){return Array.from(document.querySelectorAll("turbo-frame[src]")).filter(e=>!e.closest("[data-turbo-permanent]"))}},$H=class{keys=[];snapshots={};constructor(e){this.size=e}has(e){return cL(e)in this.snapshots}get(e){if(this.has(e)){let t=this.read(e);return this.touch(e),t}}put(e,t){return this.write(e,t),this.touch(e),t}clear(){this.snapshots={}}read(e){return this.snapshots[cL(e)]}write(e,t){this.snapshots[cL(e)]=t}touch(e){let t=cL(e),n=this.keys.indexOf(t);n>-1&&this.keys.splice(n,1),this.keys.unshift(t),this.trim()}trim(){for(let e of this.keys.splice(this.size))delete this.snapshots[e]}},KH=class extends gL{snapshotCache=new $H(10);lastRenderedLocation=new URL(location.href);forceReloaded=!1;shouldTransitionTo(e){return this.snapshot.prefersViewTransitions&&e.prefersViewTransitions}renderPage(e,t=!1,n=!0,i){let a=this.isPageRefresh(i)&&this.snapshot.shouldMorphPage?VH:hx,u=new a(this.snapshot,e,hx.renderElement,t,n);return u.shouldRender?i?.changeHistory():this.forceReloaded=!0,this.render(u)}renderError(e,t){t?.changeHistory();let n=new _L(this.snapshot,e,_L.renderElement,!1);return this.render(n)}clearSnapshotCache(){this.snapshotCache.clear()}async cacheSnapshot(e=this.snapshot){if(e.isCacheable){this.delegate.viewWillCacheSnapshot();let{lastRenderedLocation:t}=this;await vbe();let n=e.clone();return this.snapshotCache.put(t,n),n}}getCachedSnapshotForLocation(e){return this.snapshotCache.get(e)}isPageRefresh(e){return!e||this.lastRenderedLocation.pathname===e.location.pathname&&e.action==="replace"}shouldPreserveScrollPosition(e){return this.isPageRefresh(e)&&this.snapshot.shouldPreserveScrollPosition}get snapshot(){return od.fromElement(this.element)}},GH=class{selector="a[data-turbo-preload]";constructor(e,t){this.delegate=e,this.snapshotCache=t}start(){document.readyState==="loading"?document.addEventListener("DOMContentLoaded",this.#e):this.preloadOnLoadLinksForView(document.body)}stop(){document.removeEventListener("DOMContentLoaded",this.#e)}preloadOnLoadLinksForView(e){for(let t of e.querySelectorAll(this.selector))this.delegate.shouldPreloadLink(t)&&this.preloadURL(t)}async preloadURL(e){let t=new URL(e.href);if(this.snapshotCache.has(t))return;await new gb(this,Jd.get,t,new URLSearchParams,e).perform()}prepareRequest(e){e.headers["X-Sec-Purpose"]="prefetch"}async requestSucceededWithResponse(e,t){try{let n=await t.responseHTML,i=od.fromHTMLString(n);this.snapshotCache.put(e.url,i)}catch{}}requestStarted(e){}requestErrored(e){}requestFinished(e){}requestPreventedHandlingResponse(e,t){}requestFailedWithResponse(e,t){}#e=()=>{this.preloadOnLoadLinksForView(document.body)}},YH=class{constructor(e){this.session=e}clear(){this.session.clearCache()}resetCacheControl(){this.#e("")}exemptPageFromCache(){this.#e("no-cache")}exemptPageFromPreview(){this.#e("no-preview")}#e(e){V0t("turbo-cache-control",e)}},ZH=class{navigator=new zH(this);history=new qH(this);view=new KH(this,document.documentElement);adapter=new RH(this);pageObserver=new jH(this);cacheObserver=new FH;linkPrefetchObserver=new BH(this,document);linkClickObserver=new yL(this,window);formSubmitObserver=new hC(this,document);scrollObserver=new UH(this);streamObserver=new WH(this);formLinkClickObserver=new bL(this,document.documentElement);frameRedirector=new NH(this,document.documentElement);streamMessageRenderer=new HH;cache=new YH(this);drive=!0;enabled=!0;progressBarDelay=500;started=!1;formMode="on";#e=150;constructor(e){this.recentRequests=e,this.preloader=new GH(this,this.view.snapshotCache),this.debouncedRefresh=this.refresh,this.pageRefreshDebouncePeriod=this.pageRefreshDebouncePeriod}start(){this.started||(this.pageObserver.start(),this.cacheObserver.start(),this.linkPrefetchObserver.start(),this.formLinkClickObserver.start(),this.linkClickObserver.start(),this.formSubmitObserver.start(),this.scrollObserver.start(),this.streamObserver.start(),this.frameRedirector.start(),this.history.start(),this.preloader.start(),this.started=!0,this.enabled=!0)}disable(){this.enabled=!1}stop(){this.started&&(this.pageObserver.stop(),this.cacheObserver.stop(),this.linkPrefetchObserver.stop(),this.formLinkClickObserver.stop(),this.linkClickObserver.stop(),this.formSubmitObserver.stop(),this.scrollObserver.stop(),this.streamObserver.stop(),this.frameRedirector.stop(),this.history.stop(),this.preloader.stop(),this.started=!1)}registerAdapter(e){this.adapter=e}visit(e,t={}){let n=t.frame?document.getElementById(t.frame):null;if(n instanceof Wp){let i=t.action||cx(n);n.delegate.proposeVisitIfNavigatedWithAction(n,i),n.src=e.toString()}else this.navigator.proposeVisit(tf(e),t)}refresh(e,t){t&&this.recentRequests.has(t)||(this.cache.exemptPageFromPreview(),this.visit(e,{action:"replace"}))}connectStreamSource(e){this.streamObserver.connectStreamSource(e)}disconnectStreamSource(e){this.streamObserver.disconnectStreamSource(e)}renderStreamMessage(e){this.streamMessageRenderer.render(Ag.wrap(e))}clearCache(){this.view.clearSnapshotCache()}setProgressBarDelay(e){this.progressBarDelay=e}setFormMode(e){this.formMode=e}get location(){return this.history.location}get restorationIdentifier(){return this.history.restorationIdentifier}get pageRefreshDebouncePeriod(){return this.#e}set pageRefreshDebouncePeriod(e){this.refresh=G0t(this.debouncedRefresh.bind(this),e),this.#e=e}shouldPreloadLink(e){let t=e.hasAttribute("data-turbo-method"),n=e.hasAttribute("data-turbo-stream"),i=e.getAttribute("data-turbo-frame"),o=i=="_top"?null:document.getElementById(i)||Cw(e,"turbo-frame:not([disabled])");if(t||n||o instanceof Wp)return!1;{let a=new URL(e.href);return this.elementIsNavigatable(e)&&db(a,this.snapshot.rootLocation)}}historyPoppedToLocationWithRestorationIdentifierAndDirection(e,t,n){this.enabled?this.navigator.startVisit(e,t,{action:"restore",historyChanged:!0,direction:n}):this.adapter.pageInvalidated({reason:"turbo_disabled"})}scrollPositionChanged(e){this.history.updateRestorationData({scrollPosition:e})}willSubmitFormLinkToLocation(e,t){return this.elementIsNavigatable(e)&&db(t,this.snapshot.rootLocation)}submittedFormLinkToLocation(){}canPrefetchRequestToLocation(e,t){return this.elementIsNavigatable(e)&&db(t,this.snapshot.rootLocation)}willFollowLinkToLocation(e,t,n){return this.elementIsNavigatable(e)&&db(t,this.snapshot.rootLocation)&&this.applicationAllowsFollowingLinkToLocation(e,t,n)}followedLinkToLocation(e,t){let n=this.getActionForLink(e),i=e.hasAttribute("data-turbo-stream");this.visit(t.href,{action:n,acceptsStreamResponse:i})}allowsVisitingLocationWithAction(e,t){return this.locationWithActionIsSamePage(e,t)||this.applicationAllowsVisitingLocation(e)}visitProposedToLocation(e,t){hbe(e),this.adapter.visitProposedToLocation(e,t)}visitStarted(e){e.acceptsStreamResponse||(pL(document.documentElement),this.view.markVisitDirection(e.direction)),hbe(e.location),e.silent||this.notifyApplicationAfterVisitingLocation(e.location,e.action)}visitCompleted(e){this.view.unmarkVisitDirection(),mL(document.documentElement),this.notifyApplicationAfterPageLoad(e.getTimingMetrics())}locationWithActionIsSamePage(e,t){return this.navigator.locationWithActionIsSamePage(e,t)}visitScrolledToSamePageLocation(e,t){this.notifyApplicationAfterVisitingSamePageLocation(e,t)}willSubmitForm(e,t){let n=QH(e,t);return this.submissionIsNavigatable(e,t)&&db(tf(n),this.snapshot.rootLocation)}formSubmitted(e,t){this.navigator.submitForm(e,t)}pageBecameInteractive(){this.view.lastRenderedLocation=this.location,this.notifyApplicationAfterPageLoad()}pageLoaded(){this.history.assumeControlOfScrollRestoration()}pageWillUnload(){this.history.relinquishControlOfScrollRestoration()}receivedMessageFromStream(e){this.renderStreamMessage(e)}viewWillCacheSnapshot(){this.navigator.currentVisit?.silent||this.notifyApplicationBeforeCachingSnapshot()}allowsImmediateRender({element:e},t){let n=this.notifyApplicationBeforeRender(e,t),{defaultPrevented:i,detail:{render:o}}=n;return this.view.renderer&&o&&(this.view.renderer.renderElement=o),!i}viewRenderedSnapshot(e,t,n){this.view.lastRenderedLocation=this.history.location,this.notifyApplicationAfterRender(n)}preloadOnLoadLinksForView(e){this.preloader.preloadOnLoadLinksForView(e)}viewInvalidated(e){this.adapter.pageInvalidated(e)}frameLoaded(e){this.notifyApplicationAfterFrameLoad(e)}frameRendered(e,t){this.notifyApplicationAfterFrameRender(e,t)}applicationAllowsFollowingLinkToLocation(e,t,n){return!this.notifyApplicationAfterClickingLinkToLocation(e,t,n).defaultPrevented}applicationAllowsVisitingLocation(e){return!this.notifyApplicationBeforeVisitingLocation(e).defaultPrevented}notifyApplicationAfterClickingLinkToLocation(e,t,n){return Vl("turbo:click",{target:e,detail:{url:t.href,originalEvent:n},cancelable:!0})}notifyApplicationBeforeVisitingLocation(e){return Vl("turbo:before-visit",{detail:{url:e.href},cancelable:!0})}notifyApplicationAfterVisitingLocation(e,t){return Vl("turbo:visit",{detail:{url:e.href,action:t}})}notifyApplicationBeforeCachingSnapshot(){return Vl("turbo:before-cache")}notifyApplicationBeforeRender(e,t){return Vl("turbo:before-render",{detail:{newBody:e,...t},cancelable:!0})}notifyApplicationAfterRender(e){return Vl("turbo:render",{detail:{renderMethod:e}})}notifyApplicationAfterPageLoad(e={}){return Vl("turbo:load",{detail:{url:this.location.href,timing:e}})}notifyApplicationAfterVisitingSamePageLocation(e,t){dispatchEvent(new HashChangeEvent("hashchange",{oldURL:e.toString(),newURL:t.toString()}))}notifyApplicationAfterFrameLoad(e){return Vl("turbo:frame-load",{target:e})}notifyApplicationAfterFrameRender(e,t){return Vl("turbo:frame-render",{detail:{fetchResponse:e},target:t,cancelable:!0})}submissionIsNavigatable(e,t){if(this.formMode=="off")return!1;{let n=t?this.elementIsNavigatable(t):!0;return this.formMode=="optin"?n&&e.closest('[data-turbo="true"]')!=null:n&&this.elementIsNavigatable(e)}}elementIsNavigatable(e){let t=Cw(e,"[data-turbo]"),n=Cw(e,"turbo-frame");return this.drive||n?t?t.getAttribute("data-turbo")!="false":!0:t?t.getAttribute("data-turbo")=="true":!1}getActionForLink(e){return cx(e)||"advance"}get snapshot(){return this.view.snapshot}};Dxt={absoluteURL:{get(){return this.toString()}}},yl=new ZH(Tbe),{cache:Obe,navigator:Ibe}=yl;Oxt=Object.freeze({__proto__:null,navigator:Ibe,session:yl,cache:Obe,PageRenderer:hx,PageSnapshot:od,FrameRenderer:Mw,fetch:tW,start:rW,registerAdapter:Mbe,visit:Pbe,connectStreamSource:pC,disconnectStreamSource:mC,renderStreamMessage:Lbe,clearCache:Rbe,setProgressBarDelay:Fbe,setConfirmMethod:Nbe,setFormMode:qbe}),XH=class extends Error{},JH=class{fetchResponseLoaded=e=>Promise.resolve();#e=null;#t=()=>{};#r=!1;#i=!1;#o=new Set;action=null;constructor(e){this.element=e,this.view=new IH(this,this.element),this.appearanceObserver=new DH(this,this.element),this.formLinkClickObserver=new bL(this,this.element),this.linkInterceptor=new vL(this,this.element),this.restorationIdentifier=mb(),this.formSubmitObserver=new hC(this,this.element)}connect(){this.#r||(this.#r=!0,this.loadingStyle==lx.lazy?this.appearanceObserver.start():this.#n(),this.formLinkClickObserver.start(),this.linkInterceptor.start(),this.formSubmitObserver.start())}disconnect(){this.#r&&(this.#r=!1,this.appearanceObserver.stop(),this.formLinkClickObserver.stop(),this.linkInterceptor.stop(),this.formSubmitObserver.stop())}disabledChanged(){this.loadingStyle==lx.eager&&this.#n()}sourceURLChanged(){this.#g("src")||(this.element.isConnected&&(this.complete=!1),(this.loadingStyle==lx.eager||this.#i)&&this.#n())}sourceURLReloaded(){let{src:e}=this.element;return this.#p("complete",()=>{this.element.removeAttribute("complete")}),this.element.src=null,this.element.src=e,this.element.loaded}completeChanged(){this.#g("complete")||this.#n()}loadingStyleChanged(){this.loadingStyle==lx.lazy?this.appearanceObserver.start():(this.appearanceObserver.stop(),this.#n())}async#n(){this.enabled&&this.isActive&&!this.complete&&this.sourceURL&&(this.element.loaded=this.#s(tf(this.sourceURL)),this.appearanceObserver.stop(),await this.element.loaded,this.#i=!0)}async loadResponse(e){(e.redirected||e.succeeded&&e.isHTML)&&(this.sourceURL=e.response.url);try{let t=await e.responseHTML;if(t){let n=ybe(t);od.fromDocument(n).isVisitable?await this.#a(e,n):await this.#f(e)}}finally{this.fetchResponseLoaded=()=>Promise.resolve()}}elementAppearedInViewport(e){this.proposeVisitIfNavigatedWithAction(e,cx(e)),this.#n()}willSubmitFormLinkToLocation(e){return this.#d(e)}submittedFormLinkToLocation(e,t,n){let i=this.#u(e);i&&n.setAttribute("data-turbo-frame",i.id)}shouldInterceptLinkClick(e,t,n){return this.#d(e)}linkClickIntercepted(e,t){this.#c(e,t)}willSubmitForm(e,t){return e.closest("turbo-frame")==this.element&&this.#d(e,t)}formSubmitted(e,t){this.formSubmission&&this.formSubmission.stop(),this.formSubmission=new fx(this,e,t);let{fetchRequest:n}=this.formSubmission;this.prepareRequest(n),this.formSubmission.start()}prepareRequest(e){e.headers["Turbo-Frame"]=this.id,this.currentNavigationElement?.hasAttribute("data-turbo-stream")&&e.acceptResponseType(Ag.contentType)}requestStarted(e){pL(this.element)}requestPreventedHandlingResponse(e,t){this.#t()}async requestSucceededWithResponse(e,t){await this.loadResponse(t),this.#t()}async requestFailedWithResponse(e,t){await this.loadResponse(t),this.#t()}requestErrored(e,t){console.error(t),this.#t()}requestFinished(e){mL(this.element)}formSubmissionStarted({formElement:e}){pL(e,this.#u(e))}formSubmissionSucceededWithResponse(e,t){let n=this.#u(e.formElement,e.submitter);n.delegate.proposeVisitIfNavigatedWithAction(n,cx(e.submitter,e.formElement,n)),n.delegate.loadResponse(t),e.isSafe||yl.clearCache()}formSubmissionFailedWithResponse(e,t){this.element.delegate.loadResponse(t),yl.clearCache()}formSubmissionErrored(e,t){console.error(t)}formSubmissionFinished({formElement:e}){mL(e,this.#u(e))}allowsImmediateRender({element:e},t){let n=Vl("turbo:before-frame-render",{target:this.element,detail:{newFrame:e,...t},cancelable:!0}),{defaultPrevented:i,detail:{render:o}}=n;return this.view.renderer&&o&&(this.view.renderer.renderElement=o),!i}viewRenderedSnapshot(e,t,n){}preloadOnLoadLinksForView(e){yl.preloadOnLoadLinksForView(e)}viewInvalidated(){}willRenderFrame(e,t){this.previousFrameElement=e.cloneNode(!0)}visitCachedSnapshot=({element:e})=>{let t=e.querySelector("#"+this.element.id);t&&this.previousFrameElement&&t.replaceChildren(...this.previousFrameElement.children),delete this.previousFrameElement};async#a(e,t){let n=await this.extractForeignFrameElement(t.body);if(n){let i=new Iw(n),o=new Mw(this,this.view.snapshot,i,Mw.renderElement,!1,!1);this.view.renderPromise&&await this.view.renderPromise,this.changeHistory(),await this.view.render(o),this.complete=!0,yl.frameRendered(e,this.element),yl.frameLoaded(this.element),await this.fetchResponseLoaded(e)}else this.#l(e)&&this.#h(e)}async#s(e){let t=new gb(this,Jd.get,e,new URLSearchParams,this.element);return this.#e?.cancel(),this.#e=t,new Promise(n=>{this.#t=()=>{this.#t=()=>{},this.#e=null,n()},t.perform()})}#c(e,t,n){let i=this.#u(e,n);i.delegate.proposeVisitIfNavigatedWithAction(i,cx(n,e,i)),this.#b(e,()=>{i.src=t})}proposeVisitIfNavigatedWithAction(e,t=null){if(this.action=t,this.action){let n=od.fromElement(e).clone(),{visitCachedSnapshot:i}=e.delegate;e.delegate.fetchResponseLoaded=async o=>{if(e.src){let{statusCode:a,redirected:u}=o,h=await o.responseHTML,_={response:{statusCode:a,redirected:u,responseHTML:h},visitCachedSnapshot:i,willRender:!1,updateHistory:!1,restorationIdentifier:this.restorationIdentifier,snapshot:n};this.action&&(_.action=this.action),yl.visit(e.src,_)}}}}changeHistory(){if(this.action){let e=xbe(this.action);yl.history.update(e,tf(this.element.src||""),this.restorationIdentifier)}}async#f(e){console.warn(`The response (${e.statusCode}) from is performing a full page visit due to turbo-visit-control.`),await this.#m(e.response)}#l(e){this.element.setAttribute("complete","");let t=e.response,n=async(o,a)=>{o instanceof Response?this.#m(o):yl.visit(o,a)};return!Vl("turbo:frame-missing",{target:this.element,detail:{response:t,visit:n},cancelable:!0}).defaultPrevented}#h(e){this.view.missing(),this.#v(e)}#v(e){let t=`The response (${e.statusCode}) did not contain the expected and will be ignored. To perform a full page visit instead, set turbo-visit-control to reload.`;throw new XH(t)}async#m(e){let t=new Dw(e),n=await t.responseHTML,{location:i,redirected:o,statusCode:a}=t;return yl.visit(i,{response:{redirected:o,statusCode:a,responseHTML:n}})}#u(e,t){let n=dL("data-turbo-frame",t,e)||this.element.getAttribute("target");return dbe(n)??this.element}async extractForeignFrameElement(e){let t,n=CSS.escape(this.id);try{if(t=pbe(e.querySelector(`turbo-frame#${n}`),this.sourceURL),t)return t;if(t=pbe(e.querySelector(`turbo-frame[src][recurse~=${n}]`),this.sourceURL),t)return await t.loaded,await this.extractForeignFrameElement(t)}catch(i){return console.error(i),new Wp}return null}#y(e,t){let n=QH(e,t);return db(tf(n),this.rootLocation)}#d(e,t){let n=dL("data-turbo-frame",t,e)||this.element.getAttribute("target");if(e instanceof HTMLFormElement&&!this.#y(e,t)||!this.enabled||n=="_top")return!1;if(n){let i=dbe(n);if(i)return!i.disabled}return!(!yl.elementIsNavigatable(e)||t&&!yl.elementIsNavigatable(t))}get id(){return this.element.id}get enabled(){return!this.element.disabled}get sourceURL(){if(this.element.src)return this.element.src}set sourceURL(e){this.#p("src",()=>{this.element.src=e??null})}get loadingStyle(){return this.element.loading}get isLoading(){return this.formSubmission!==void 0||this.#t()!==void 0}get complete(){return this.element.hasAttribute("complete")}set complete(e){this.#p("complete",()=>{e?this.element.setAttribute("complete",""):this.element.removeAttribute("complete")})}get isActive(){return this.element.isActive&&this.#r}get rootLocation(){let t=this.element.ownerDocument.querySelector('meta[name="turbo-root"]')?.content??"/";return tf(t)}#g(e){return this.#o.has(e)}#p(e,t){this.#o.add(e),t(),this.#o.delete(e)}#b(e,t){this.currentNavigationElement=e,t(),delete this.currentNavigationElement}};dx={after(){this.targetElements.forEach(r=>r.parentElement?.insertBefore(this.templateContent,r.nextSibling))},append(){this.removeDuplicateTargetChildren(),this.targetElements.forEach(r=>r.append(this.templateContent))},before(){this.targetElements.forEach(r=>r.parentElement?.insertBefore(this.templateContent,r))},prepend(){this.removeDuplicateTargetChildren(),this.targetElements.forEach(r=>r.prepend(this.templateContent))},remove(){this.targetElements.forEach(r=>r.remove())},replace(){this.targetElements.forEach(r=>r.replaceWith(this.templateContent))},update(){this.targetElements.forEach(r=>{r.innerHTML="",r.append(this.templateContent)})},refresh(){yl.refresh(this.baseURI,this.requestId)}},Pw=class extends HTMLElement{static async renderElement(e){await e.performAction()}async connectedCallback(){try{await this.render()}catch(e){console.error(e)}finally{this.disconnect()}}async render(){return this.renderPromise??=(async()=>{let e=this.beforeRenderEvent;this.dispatchEvent(e)&&(await Ew(),await e.detail.render(this))})()}disconnect(){try{this.remove()}catch{}}removeDuplicateTargetChildren(){this.duplicateChildren.forEach(e=>e.remove())}get duplicateChildren(){let e=this.targetElements.flatMap(n=>[...n.children]).filter(n=>!!n.id),t=[...this.templateContent?.children||[]].filter(n=>!!n.id).map(n=>n.id);return e.filter(n=>t.includes(n.id))}get performAction(){if(this.action){let e=dx[this.action];if(e)return e;this.#e("unknown action")}this.#e("action attribute is missing")}get targetElements(){if(this.target)return this.targetElementsById;if(this.targets)return this.targetElementsByQuery;this.#e("target or targets attribute is missing")}get templateContent(){return this.templateElement.content.cloneNode(!0)}get templateElement(){if(this.firstElementChild===null){let e=this.ownerDocument.createElement("template");return this.appendChild(e),e}else if(this.firstElementChild instanceof HTMLTemplateElement)return this.firstElementChild;this.#e("first child element must be a