var aX=Object.create;var Wk=Object.defineProperty;var iX=Object.getOwnPropertyDescriptor;var nX=Object.getOwnPropertyNames;var oX=Object.getPrototypeOf,sX=Object.prototype.hasOwnProperty;var lX=(fe,_e)=>()=>(_e||fe((_e={exports:{}}).exports,_e),_e.exports);var uX=(fe,_e,Xe,Lt)=>{if(_e&&typeof _e=="object"||typeof _e=="function")for(let gr of nX(_e))!sX.call(fe,gr)&&gr!==Xe&&Wk(fe,gr,{get:()=>_e[gr],enumerable:!(Lt=iX(_e,gr))||Lt.enumerable});return fe};var cX=(fe,_e,Xe)=>(Xe=fe!=null?aX(oX(fe)):{},uX(_e||!fe||!fe.__esModule?Wk(Xe,"default",{value:fe,enumerable:!0}):Xe,fe));var a7=lX((r7,c2)=>{(function(fe,_e){typeof c2=="object"&&c2.exports?c2.exports=_e():fe.moduleName=_e()})(typeof self<"u"?self:r7,()=>{"use strict";var fe=(()=>{var _e=Object.create,Xe=Object.defineProperty,Lt=Object.defineProperties,gr=Object.getOwnPropertyDescriptor,Yr=Object.getOwnPropertyDescriptors,Ea=Object.getOwnPropertyNames,ei=Object.getOwnPropertySymbols,oi=Object.getPrototypeOf,Cn=Object.prototype.hasOwnProperty,xn=Object.prototype.propertyIsEnumerable,Fn=(Z,V,d)=>V in Z?Xe(Z,V,{enumerable:!0,configurable:!0,writable:!0,value:d}):Z[V]=d,To=(Z,V)=>{for(var d in V||(V={}))Cn.call(V,d)&&Fn(Z,d,V[d]);if(ei)for(var d of ei(V))xn.call(V,d)&&Fn(Z,d,V[d]);return Z},ps=(Z,V)=>Lt(Z,Yr(V)),Qs=(Z,V)=>{var d={};for(var x in Z)Cn.call(Z,x)&&V.indexOf(x)<0&&(d[x]=Z[x]);if(Z!=null&&ei)for(var x of ei(Z))V.indexOf(x)<0&&xn.call(Z,x)&&(d[x]=Z[x]);return d},Go=(Z,V)=>function(){return Z&&(V=(0,Z[Ea(Z)[0]])(Z=0)),V},He=(Z,V)=>function(){return V||(0,Z[Ea(Z)[0]])((V={exports:{}}).exports,V),V.exports},Kl=(Z,V)=>{for(var d in V)Xe(Z,d,{get:V[d],enumerable:!0})},nu=(Z,V,d,x)=>{if(V&&typeof V=="object"||typeof V=="function")for(let S of Ea(V))!Cn.call(Z,S)&&S!==d&&Xe(Z,S,{get:()=>V[S],enumerable:!(x=gr(V,S))||x.enumerable});return Z},jp=(Z,V,d)=>(d=Z!=null?_e(oi(Z)):{},nu(V||!Z||!Z.__esModule?Xe(d,"default",{value:Z,enumerable:!0}):d,Z)),zf=Z=>nu(Xe({},"__esModule",{value:!0}),Z),fp=He({"src/version.js"(Z){"use strict";Z.version="3.5.0"}}),Ff=He({"node_modules/native-promise-only/lib/npo.src.js"(Z,V){(function(x,S,E){S[x]=S[x]||E(),typeof V<"u"&&V.exports&&(V.exports=S[x])})("Promise",typeof window<"u"?window:Z,function(){"use strict";var x,S,E,e=Object.prototype.toString,t=typeof setImmediate<"u"?function(_){return setImmediate(_)}:setTimeout;try{Object.defineProperty({},"x",{}),x=function(_,w,A,M){return Object.defineProperty(_,w,{value:A,writable:!0,configurable:M!==!1})}}catch{x=function(w,A,M){return w[A]=M,w}}E=function(){var _,w,A;function M(g,b){this.fn=g,this.self=b,this.next=void 0}return{add:function(b,p){A=new M(b,p),w?w.next=A:_=A,w=A,A=void 0},drain:function(){var b=_;for(_=w=S=void 0;b;)b.fn.call(b.self),b=b.next}}}();function r(l,_){E.add(l,_),S||(S=t(E.drain))}function o(l){var _,w=typeof l;return l!=null&&(w=="object"||w=="function")&&(_=l.then),typeof _=="function"?_:!1}function a(){for(var l=0;l0&&r(a,w))}catch(A){s.call(new f(w),A)}}}function s(l){var _=this;_.triggered||(_.triggered=!0,_.def&&(_=_.def),_.msg=l,_.state=2,_.chain.length>0&&r(a,_))}function h(l,_,w,A){for(var M=0;M<_.length;M++)(function(b){l.resolve(_[b]).then(function(u){w(b,u)},A)})(M)}function f(l){this.def=l,this.triggered=!1}function v(l){this.promise=l,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function c(l){if(typeof l!="function")throw TypeError("Not a function");if(this.__NPO__!==0)throw TypeError("Not a promise");this.__NPO__=1;var _=new v(this);this.then=function(A,M){var g={success:typeof A=="function"?A:!0,failure:typeof M=="function"?M:!1};return g.promise=new this.constructor(function(p,u){if(typeof p!="function"||typeof u!="function")throw TypeError("Not a function");g.resolve=p,g.reject=u}),_.chain.push(g),_.state!==0&&r(a,_),g.promise},this.catch=function(A){return this.then(void 0,A)};try{l.call(void 0,function(A){i.call(_,A)},function(A){s.call(_,A)})}catch(w){s.call(_,w)}}var T=x({},"constructor",c,!1);return c.prototype=T,x(T,"__NPO__",0,!1),x(c,"resolve",function(_){var w=this;return _&&typeof _=="object"&&_.__NPO__===1?_:new w(function(M,g){if(typeof M!="function"||typeof g!="function")throw TypeError("Not a function");M(_)})}),x(c,"reject",function(_){return new this(function(A,M){if(typeof A!="function"||typeof M!="function")throw TypeError("Not a function");M(_)})}),x(c,"all",function(_){var w=this;return e.call(_)!="[object Array]"?w.reject(TypeError("Not an array")):_.length===0?w.resolve([]):new w(function(M,g){if(typeof M!="function"||typeof g!="function")throw TypeError("Not a function");var b=_.length,p=Array(b),u=0;h(w,_,function(m,R){p[m]=R,++u===b&&M(p)},g)})}),x(c,"race",function(_){var w=this;return e.call(_)!="[object Array]"?w.reject(TypeError("Not an array")):new w(function(M,g){if(typeof M!="function"||typeof g!="function")throw TypeError("Not a function");h(w,_,function(p,u){M(u)},g)})}),c})}}),Wn=He({"node_modules/@plotly/d3/d3.js"(Z,V){(function(){var d={version:"3.8.2"},x=[].slice,S=function(me){return x.call(me)},E=self.document;function e(me){return me&&(me.ownerDocument||me.document||me).documentElement}function t(me){return me&&(me.ownerDocument&&me.ownerDocument.defaultView||me.document&&me||me.defaultView)}if(E)try{S(E.documentElement.childNodes)[0].nodeType}catch{S=function(De){for(var et=De.length,dt=new Array(et);et--;)dt[et]=De[et];return dt}}if(Date.now||(Date.now=function(){return+new Date}),E)try{E.createElement("DIV").style.setProperty("opacity",0,"")}catch{var r=this.Element.prototype,o=r.setAttribute,a=r.setAttributeNS,n=this.CSSStyleDeclaration.prototype,i=n.setProperty;r.setAttribute=function(De,et){o.call(this,De,et+"")},r.setAttributeNS=function(De,et,dt){a.call(this,De,et,dt+"")},n.setProperty=function(De,et,dt){i.call(this,De,et+"",dt)}}d.ascending=s;function s(me,De){return meDe?1:me>=De?0:NaN}d.descending=function(me,De){return Deme?1:De>=me?0:NaN},d.min=function(me,De){var et=-1,dt=me.length,yt,Tt;if(arguments.length===1){for(;++et=Tt){yt=Tt;break}for(;++etTt&&(yt=Tt)}else{for(;++et=Tt){yt=Tt;break}for(;++etTt&&(yt=Tt)}return yt},d.max=function(me,De){var et=-1,dt=me.length,yt,Tt;if(arguments.length===1){for(;++et=Tt){yt=Tt;break}for(;++etyt&&(yt=Tt)}else{for(;++et=Tt){yt=Tt;break}for(;++etyt&&(yt=Tt)}return yt},d.extent=function(me,De){var et=-1,dt=me.length,yt,Tt,tr;if(arguments.length===1){for(;++et=Tt){yt=tr=Tt;break}for(;++etTt&&(yt=Tt),tr=Tt){yt=tr=Tt;break}for(;++etTt&&(yt=Tt),tr1)return tr/(_r-1)},d.deviation=function(){var me=d.variance.apply(this,arguments);return me&&Math.sqrt(me)};function v(me){return{left:function(De,et,dt,yt){for(arguments.length<3&&(dt=0),arguments.length<4&&(yt=De.length);dt>>1;me(De[Tt],et)<0?dt=Tt+1:yt=Tt}return dt},right:function(De,et,dt,yt){for(arguments.length<3&&(dt=0),arguments.length<4&&(yt=De.length);dt>>1;me(De[Tt],et)>0?yt=Tt:dt=Tt+1}return dt}}}var c=v(s);d.bisectLeft=c.left,d.bisect=d.bisectRight=c.right,d.bisector=function(me){return v(me.length===1?function(De,et){return s(me(De),et)}:me)},d.shuffle=function(me,De,et){(dt=arguments.length)<3&&(et=me.length,dt<2&&(De=0));for(var dt=et-De,yt,Tt;dt;)Tt=Math.random()*dt--|0,yt=me[dt+De],me[dt+De]=me[Tt+De],me[Tt+De]=yt;return me},d.permute=function(me,De){for(var et=De.length,dt=new Array(et);et--;)dt[et]=me[De[et]];return dt},d.pairs=function(me){for(var De=0,et=me.length-1,dt,yt=me[0],Tt=new Array(et<0?0:et);De=0;)for(tr=me[De],et=tr.length;--et>=0;)Tt[--yt]=tr[et];return Tt};var l=Math.abs;d.range=function(me,De,et){if(arguments.length<3&&(et=1,arguments.length<2&&(De=me,me=0)),(De-me)/et===1/0)throw new Error("infinite range");var dt=[],yt=_(l(et)),Tt=-1,tr;if(me*=yt,De*=yt,et*=yt,et<0)for(;(tr=me+et*++Tt)>De;)dt.push(tr/yt);else for(;(tr=me+et*++Tt)=De.length)return yt?yt.call(me,_r):dt?_r.sort(dt):_r;for(var Xr=-1,xa=_r.length,pa=De[Gr++],Ja,ti,Sa,za=new A,Xa;++Xr=De.length)return zt;var Gr=[],Xr=et[_r++];return zt.forEach(function(xa,pa){Gr.push({key:xa,values:tr(pa,_r)})}),Xr?Gr.sort(function(xa,pa){return Xr(xa.key,pa.key)}):Gr}return me.map=function(zt,_r){return Tt(_r,zt,0)},me.entries=function(zt){return tr(Tt(d.map,zt,0),0)},me.key=function(zt){return De.push(zt),me},me.sortKeys=function(zt){return et[De.length-1]=zt,me},me.sortValues=function(zt){return dt=zt,me},me.rollup=function(zt){return yt=zt,me},me},d.set=function(me){var De=new z;if(me)for(var et=0,dt=me.length;et=0&&(dt=me.slice(et+1),me=me.slice(0,et)),me)return arguments.length<2?this[me].on(dt):this[me].on(dt,De);if(arguments.length===2){if(De==null)for(me in this)this.hasOwnProperty(me)&&this[me].on(dt,null);return this}};function X(me){var De=[],et=new A;function dt(){for(var yt=De,Tt=-1,tr=yt.length,zt;++Tt=0&&(et=me.slice(0,De))!=="xmlns"&&(me=me.slice(De+1)),pe.hasOwnProperty(et)?{space:pe[et],local:me}:me}},ae.attr=function(me,De){if(arguments.length<2){if(typeof me=="string"){var et=this.node();return me=d.ns.qualify(me),me.local?et.getAttributeNS(me.space,me.local):et.getAttribute(me)}for(De in me)this.each(we(De,me[De]));return this}return this.each(we(me,De))};function we(me,De){me=d.ns.qualify(me);function et(){this.removeAttribute(me)}function dt(){this.removeAttributeNS(me.space,me.local)}function yt(){this.setAttribute(me,De)}function Tt(){this.setAttributeNS(me.space,me.local,De)}function tr(){var _r=De.apply(this,arguments);_r==null?this.removeAttribute(me):this.setAttribute(me,_r)}function zt(){var _r=De.apply(this,arguments);_r==null?this.removeAttributeNS(me.space,me.local):this.setAttributeNS(me.space,me.local,_r)}return De==null?me.local?dt:et:typeof De=="function"?me.local?zt:tr:me.local?Tt:yt}function Se(me){return me.trim().replace(/\s+/g," ")}ae.classed=function(me,De){if(arguments.length<2){if(typeof me=="string"){var et=this.node(),dt=(me=Re(me)).length,yt=-1;if(De=et.classList){for(;++yt=0;)(Tt=et[dt])&&(yt&&yt!==Tt.nextSibling&&yt.parentNode.insertBefore(Tt,yt),yt=Tt);return this},ae.sort=function(me){me=Ce.apply(this,arguments);for(var De=-1,et=this.length;++De=De&&(De=yt+1);!(_r=tr[De])&&++De0&&(me=me.slice(0,yt));var tr=Nt.get(me);tr&&(me=tr,Tt=Mr);function zt(){var Xr=this[dt];Xr&&(this.removeEventListener(me,Xr,Xr.$),delete this[dt])}function _r(){var Xr=Tt(De,S(arguments));zt.call(this),this.addEventListener(me,this[dt]=Xr,Xr.$=et),Xr._=De}function Gr(){var Xr=new RegExp("^__on([^.]+)"+d.requote(me)+"$"),xa;for(var pa in this)if(xa=pa.match(Xr)){var Ja=this[pa];this.removeEventListener(xa[1],Ja,Ja.$),delete this[pa]}}return yt?De?_r:zt:De?U:Gr}var Nt=d.map({mouseenter:"mouseover",mouseleave:"mouseout"});E&&Nt.forEach(function(me){"on"+me in E&&Nt.remove(me)});function Gt(me,De){return function(et){var dt=d.event;d.event=et,De[0]=this.__data__;try{me.apply(this,De)}finally{d.event=dt}}}function Mr(me,De){var et=Gt(me,De);return function(dt){var yt=this,Tt=dt.relatedTarget;(!Tt||Tt!==yt&&!(Tt.compareDocumentPosition(yt)&8))&&et.call(yt,dt)}}var mr,qr=0;function Er(me){var De=".dragsuppress-"+ ++qr,et="click"+De,dt=d.select(t(me)).on("touchmove"+De,$).on("dragstart"+De,$).on("selectstart"+De,$);if(mr==null&&(mr="onselectstart"in me?!1:O(me.style,"userSelect")),mr){var yt=e(me).style,Tt=yt[mr];yt[mr]="none"}return function(tr){if(dt.on(De,null),mr&&(yt[mr]=Tt),tr){var zt=function(){dt.on(et,null)};dt.on(et,function(){$(),zt()},!0),setTimeout(zt,0)}}}d.mouse=function(me){return _t(me,le())};var Ir=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function _t(me,De){De.changedTouches&&(De=De.changedTouches[0]);var et=me.ownerSVGElement||me;if(et.createSVGPoint){var dt=et.createSVGPoint();if(Ir<0){var yt=t(me);if(yt.scrollX||yt.scrollY){et=d.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var Tt=et[0][0].getScreenCTM();Ir=!(Tt.f||Tt.e),et.remove()}}return Ir?(dt.x=De.pageX,dt.y=De.pageY):(dt.x=De.clientX,dt.y=De.clientY),dt=dt.matrixTransform(me.getScreenCTM().inverse()),[dt.x,dt.y]}var tr=me.getBoundingClientRect();return[De.clientX-tr.left-me.clientLeft,De.clientY-tr.top-me.clientTop]}d.touch=function(me,De,et){if(arguments.length<3&&(et=De,De=le().changedTouches),De){for(var dt=0,yt=De.length,Tt;dt0?1:me<0?-1:0}function Pt(me,De,et){return(De[0]-me[0])*(et[1]-me[1])-(De[1]-me[1])*(et[0]-me[0])}function jt(me){return me>1?0:me<-1?Le:Math.acos(me)}function fr(me){return me>1?st:me<-1?-st:Math.asin(me)}function ur(me){return((me=Math.exp(me))-1/me)/2}function sr(me){return((me=Math.exp(me))+1/me)/2}function Pr(me){return((me=Math.exp(2*me))-1)/(me+1)}function Ta(me){return(me=Math.sin(me/2))*me}var Oa=Math.SQRT2,Ia=2,qa=4;d.interpolateZoom=function(me,De){var et=me[0],dt=me[1],yt=me[2],Tt=De[0],tr=De[1],zt=De[2],_r=Tt-et,Gr=tr-dt,Xr=_r*_r+Gr*Gr,xa,pa;if(Xr0&&(mn=mn.transition().duration(tr)),mn.call(ni.event)}function Kn(){za&&za.domain(Sa.range().map(function(mn){return(mn-me.x)/me.k}).map(Sa.invert)),fi&&fi.domain(Xa.range().map(function(mn){return(mn-me.y)/me.k}).map(Xa.invert))}function ro(mn){zt++||mn({type:"zoomstart"})}function Yo(mn){Kn(),mn({type:"zoom",scale:me.k,translate:[me.x,me.y]})}function oo(mn){--zt||(mn({type:"zoomend"}),et=null)}function Wo(){var mn=this,po=ti.of(mn,arguments),cs=0,vs=d.select(t(mn)).on(Gr,Su).on(Xr,Rl),Al=La(d.mouse(mn)),Hl=Er(mn);Nn.call(mn),ro(po);function Su(){cs=1,dn(d.mouse(mn),Al),Yo(po)}function Rl(){vs.on(Gr,null).on(Xr,null),Hl(cs),oo(po)}}function cl(){var mn=this,po=ti.of(mn,arguments),cs={},vs=0,Al,Hl=".zoom-"+d.event.changedTouches[0].identifier,Su="touchmove"+Hl,Rl="touchend"+Hl,_c=[],it=d.select(mn),Zt=Er(mn);oa(),ro(po),it.on(_r,null).on(pa,oa);function cr(){var ya=d.touches(mn);return Al=me.k,ya.forEach(function(Ya){Ya.identifier in cs&&(cs[Ya.identifier]=La(Ya))}),ya}function oa(){var ya=d.event.target;d.select(ya).on(Su,wa).on(Rl,va),_c.push(ya);for(var Ya=d.event.changedTouches,bi=0,yi=Ya.length;bi1){var zi=si[0],Ei=si[1],Na=zi[0]-Ei[0],ea=zi[1]-Ei[1];vs=Na*Na+ea*ea}}function wa(){var ya=d.touches(mn),Ya,bi,yi,si;Nn.call(mn);for(var gn=0,zi=ya.length;gn1?1:De,et=et<0?0:et>1?1:et,yt=et<=.5?et*(1+De):et+De-et*De,dt=2*et-yt;function Tt(zt){return zt>360?zt-=360:zt<0&&(zt+=360),zt<60?dt+(yt-dt)*zt/60:zt<180?yt:zt<240?dt+(yt-dt)*(240-zt)/60:dt}function tr(zt){return Math.round(Tt(zt)*255)}return new xt(tr(me+120),tr(me),tr(me-120))}d.hcl=Jt;function Jt(me,De,et){return this instanceof Jt?(this.h=+me,this.c=+De,void(this.l=+et)):arguments.length<2?me instanceof Jt?new Jt(me.h,me.c,me.l):me instanceof ra?Ra(me.l,me.a,me.b):Ra((me=Hr((me=d.rgb(me)).r,me.g,me.b)).l,me.a,me.b):new Jt(me,De,et)}var Fr=Jt.prototype=new wi;Fr.brighter=function(me){return new Jt(this.h,this.c,Math.min(100,this.l+ca*(arguments.length?me:1)))},Fr.darker=function(me){return new Jt(this.h,this.c,Math.max(0,this.l-ca*(arguments.length?me:1)))},Fr.rgb=function(){return ta(this.h,this.c,this.l).rgb()};function ta(me,De,et){return isNaN(me)&&(me=0),isNaN(De)&&(De=0),new ra(et,Math.cos(me*=ut)*De,Math.sin(me)*De)}d.lab=ra;function ra(me,De,et){return this instanceof ra?(this.l=+me,this.a=+De,void(this.b=+et)):arguments.length<2?me instanceof ra?new ra(me.l,me.a,me.b):me instanceof Jt?ta(me.h,me.c,me.l):Hr((me=xt(me)).r,me.g,me.b):new ra(me,De,et)}var ca=18,Ba=.95047,$a=1,Za=1.08883,ri=ra.prototype=new wi;ri.brighter=function(me){return new ra(Math.min(100,this.l+ca*(arguments.length?me:1)),this.a,this.b)},ri.darker=function(me){return new ra(Math.max(0,this.l-ca*(arguments.length?me:1)),this.a,this.b)},ri.rgb=function(){return pi(this.l,this.a,this.b)};function pi(me,De,et){var dt=(me+16)/116,yt=dt+De/500,Tt=dt-et/200;return yt=an(yt)*Ba,dt=an(dt)*$a,Tt=an(Tt)*Za,new xt(fn(3.2404542*yt-1.5371385*dt-.4985314*Tt),fn(-.969266*yt+1.8760108*dt+.041556*Tt),fn(.0556434*yt-.2040259*dt+1.0572252*Tt))}function Ra(me,De,et){return me>0?new Jt(Math.atan2(et,De)*Ut,Math.sqrt(De*De+et*et),me):new Jt(NaN,NaN,me)}function an(me){return me>.206893034?me*me*me:(me-4/29)/7.787037}function tn(me){return me>.008856?Math.pow(me,1/3):7.787037*me+4/29}function fn(me){return Math.round(255*(me<=.00304?12.92*me:1.055*Math.pow(me,1/2.4)-.055))}d.rgb=xt;function xt(me,De,et){return this instanceof xt?(this.r=~~me,this.g=~~De,void(this.b=~~et)):arguments.length<2?me instanceof xt?new xt(me.r,me.g,me.b):Rr(""+me,xt,Yt):new xt(me,De,et)}function lt(me){return new xt(me>>16,me>>8&255,me&255)}function Br(me){return lt(me)+""}var Cr=xt.prototype=new wi;Cr.brighter=function(me){me=Math.pow(.7,arguments.length?me:1);var De=this.r,et=this.g,dt=this.b,yt=30;return!De&&!et&&!dt?new xt(yt,yt,yt):(De&&De>4,dt=dt>>4|dt,yt=_r&240,yt=yt>>4|yt,Tt=_r&15,Tt=Tt<<4|Tt):me.length===7&&(dt=(_r&16711680)>>16,yt=(_r&65280)>>8,Tt=_r&255)),De(dt,yt,Tt))}function Ur(me,De,et){var dt=Math.min(me/=255,De/=255,et/=255),yt=Math.max(me,De,et),Tt=yt-dt,tr,zt,_r=(yt+dt)/2;return Tt?(zt=_r<.5?Tt/(yt+dt):Tt/(2-yt-dt),me==yt?tr=(De-et)/Tt+(De0&&_r<1?0:tr),new Kt(tr,zt,_r)}function Hr(me,De,et){me=gt(me),De=gt(De),et=gt(et);var dt=tn((.4124564*me+.3575761*De+.1804375*et)/Ba),yt=tn((.2126729*me+.7151522*De+.072175*et)/$a),Tt=tn((.0193339*me+.119192*De+.9503041*et)/Za);return ra(116*yt-16,500*(dt-yt),200*(yt-Tt))}function gt(me){return(me/=255)<=.04045?me/12.92:Math.pow((me+.055)/1.055,2.4)}function Xt(me){var De=parseFloat(me);return me.charAt(me.length-1)==="%"?Math.round(De*2.55):De}var vr=d.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});vr.forEach(function(me,De){vr.set(me,lt(De))});function Or(me){return typeof me=="function"?me:function(){return me}}d.functor=Or,d.xhr=ba(F);function ba(me){return function(De,et,dt){return arguments.length===2&&typeof et=="function"&&(dt=et,et=null),Pa(De,et,me,dt)}}function Pa(me,De,et,dt){var yt={},Tt=d.dispatch("beforesend","progress","load","error"),tr={},zt=new XMLHttpRequest,_r=null;self.XDomainRequest&&!("withCredentials"in zt)&&/^(http(s)?:)?\/\//.test(me)&&(zt=new XDomainRequest),"onload"in zt?zt.onload=zt.onerror=Gr:zt.onreadystatechange=function(){zt.readyState>3&&Gr()};function Gr(){var Xr=zt.status,xa;if(!Xr&&la(zt)||Xr>=200&&Xr<300||Xr===304){try{xa=et.call(yt,zt)}catch(pa){Tt.error.call(yt,pa);return}Tt.load.call(yt,xa)}else Tt.error.call(yt,zt)}return zt.onprogress=function(Xr){var xa=d.event;d.event=Xr;try{Tt.progress.call(yt,zt)}finally{d.event=xa}},yt.header=function(Xr,xa){return Xr=(Xr+"").toLowerCase(),arguments.length<2?tr[Xr]:(xa==null?delete tr[Xr]:tr[Xr]=xa+"",yt)},yt.mimeType=function(Xr){return arguments.length?(De=Xr==null?null:Xr+"",yt):De},yt.responseType=function(Xr){return arguments.length?(_r=Xr,yt):_r},yt.response=function(Xr){return et=Xr,yt},["get","post"].forEach(function(Xr){yt[Xr]=function(){return yt.send.apply(yt,[Xr].concat(S(arguments)))}}),yt.send=function(Xr,xa,pa){if(arguments.length===2&&typeof xa=="function"&&(pa=xa,xa=null),zt.open(Xr,me,!0),De!=null&&!("accept"in tr)&&(tr.accept=De+",*/*"),zt.setRequestHeader)for(var Ja in tr)zt.setRequestHeader(Ja,tr[Ja]);return De!=null&&zt.overrideMimeType&&zt.overrideMimeType(De),_r!=null&&(zt.responseType=_r),pa!=null&&yt.on("error",pa).on("load",function(ti){pa(null,ti)}),Tt.beforesend.call(yt,zt),zt.send(xa??null),yt},yt.abort=function(){return zt.abort(),yt},d.rebind(yt,Tt,"on"),dt==null?yt:yt.get(ma(dt))}function ma(me){return me.length===1?function(De,et){me(De==null?et:null)}:me}function la(me){var De=me.responseType;return De&&De!=="text"?me.response:me.responseText}d.dsv=function(me,De){var et=new RegExp('["'+me+` ]`),dt=me.charCodeAt(0);function yt(Gr,Xr,xa){arguments.length<3&&(xa=Xr,Xr=null);var pa=Pa(Gr,De,Xr==null?Tt:tr(Xr),xa);return pa.row=function(Ja){return arguments.length?pa.response((Xr=Ja)==null?Tt:tr(Ja)):Xr},pa}function Tt(Gr){return yt.parse(Gr.responseText)}function tr(Gr){return function(Xr){return yt.parse(Xr.responseText,Gr)}}yt.parse=function(Gr,Xr){var xa;return yt.parseRows(Gr,function(pa,Ja){if(xa)return xa(pa,Ja-1);var ti=function(Sa){for(var za={},Xa=pa.length,fi=0;fi=ti)return pa;if(fi)return fi=!1,xa;var sn=Sa;if(Gr.charCodeAt(sn)===34){for(var rn=sn;rn++24?(isFinite(De)&&(clearTimeout(Ki),Ki=setTimeout(kn,De)),ki=0):(ki=1,yn(kn))}d.timer.flush=function(){Bn(),ao()};function Bn(){for(var me=Date.now(),De=_a;De;)me>=De.t&&De.c(me-De.t)&&(De.c=null),De=De.n;return me}function ao(){for(var me,De=_a,et=1/0;De;)De.c?(De.t=0;--zt)Sa.push(yt[Gr[xa[zt]][2]]);for(zt=+Ja;zt1&&Pt(me[et[dt-2]],me[et[dt-1]],me[yt])<=0;)--dt;et[dt++]=yt}return et.slice(0,dt)}function Mn(me,De){return me[0]-De[0]||me[1]-De[1]}d.geom.polygon=function(me){return G(me,Ao),me};var Ao=d.geom.polygon.prototype=[];Ao.area=function(){for(var me=-1,De=this.length,et,dt=this[De-1],yt=0;++meJe)zt=zt.L;else if(tr=De-Hn(zt,et),tr>Je){if(!zt.R){dt=zt;break}zt=zt.R}else{Tt>-Je?(dt=zt.P,yt=zt):tr>-Je?(dt=zt,yt=zt.N):dt=yt=zt;break}var _r=Xo(me);if(io.insert(dt,_r),!(!dt&&!yt)){if(dt===yt){Lo(dt),yt=Xo(dt.site),io.insert(_r,yt),_r.edge=yt.edge=Gs(dt.site,_r.site),_n(dt),_n(yt);return}if(!yt){_r.edge=Gs(dt.site,_r.site);return}Lo(dt),Lo(yt);var Gr=dt.site,Xr=Gr.x,xa=Gr.y,pa=me.x-Xr,Ja=me.y-xa,ti=yt.site,Sa=ti.x-Xr,za=ti.y-xa,Xa=2*(pa*za-Ja*Sa),fi=pa*pa+Ja*Ja,ni=Sa*Sa+za*za,La={x:(za*fi-Ja*ni)/Xa+Xr,y:(pa*ni-Sa*fi)/Xa+xa};As(yt.edge,Gr,ti,La),_r.edge=Gs(Gr,me,null,La),yt.edge=Gs(me,ti,null,La),_n(dt),_n(yt)}}function xs(me,De){var et=me.site,dt=et.x,yt=et.y,Tt=yt-De;if(!Tt)return dt;var tr=me.P;if(!tr)return-1/0;et=tr.site;var zt=et.x,_r=et.y,Gr=_r-De;if(!Gr)return zt;var Xr=zt-dt,xa=1/Tt-1/Gr,pa=Xr/Gr;return xa?(-pa+Math.sqrt(pa*pa-2*xa*(Xr*Xr/(-2*Gr)-_r+Gr/2+yt-Tt/2)))/xa+dt:(dt+zt)/2}function Hn(me,De){var et=me.N;if(et)return xs(et,De);var dt=me.site;return dt.y===De?dt.x:1/0}function Os(me){this.site=me,this.edges=[]}Os.prototype.prepare=function(){for(var me=this.edges,De=me.length,et;De--;)et=me[De].edge,(!et.b||!et.a)&&me.splice(De,1);return me.sort(Xs),me.length};function ds(me){for(var De=me[0][0],et=me[1][0],dt=me[0][1],yt=me[1][1],Tt,tr,zt,_r,Gr=Oo,Xr=Gr.length,xa,pa,Ja,ti,Sa,za;Xr--;)if(xa=Gr[Xr],!(!xa||!xa.prepare()))for(Ja=xa.edges,ti=Ja.length,pa=0;paJe||l(_r-tr)>Je)&&(Ja.splice(pa,0,new qs(vl(xa.site,za,l(zt-De)Je?{x:De,y:l(Tt-De)Je?{x:l(tr-yt)Je?{x:et,y:l(Tt-et)Je?{x:l(tr-dt)=-Ae)){var pa=_r*_r+Gr*Gr,Ja=Xr*Xr+za*za,ti=(za*pa-Gr*Ja)/xa,Sa=(_r*Ja-Xr*pa)/xa,za=Sa+zt,Xa=gs.pop()||new il;Xa.arc=me,Xa.site=yt,Xa.x=ti+tr,Xa.y=za+Math.sqrt(ti*ti+Sa*Sa),Xa.cy=za,me.circle=Xa;for(var fi=null,ni=ns._;ni;)if(Xa.y0)){if(Sa/=Ja,Ja<0){if(Sa0){if(Sa>pa)return;Sa>xa&&(xa=Sa)}if(Sa=et-zt,!(!Ja&&Sa<0)){if(Sa/=Ja,Ja<0){if(Sa>pa)return;Sa>xa&&(xa=Sa)}else if(Ja>0){if(Sa0)){if(Sa/=ti,ti<0){if(Sa0){if(Sa>pa)return;Sa>xa&&(xa=Sa)}if(Sa=dt-_r,!(!ti&&Sa<0)){if(Sa/=ti,ti<0){if(Sa>pa)return;Sa>xa&&(xa=Sa)}else if(ti>0){if(Sa0&&(yt.a={x:zt+xa*Ja,y:_r+xa*ti}),pa<1&&(yt.b={x:zt+pa*Ja,y:_r+pa*ti}),yt}}}}}}function Rs(me){for(var De=_s,et=bo(me[0][0],me[0][1],me[1][0],me[1][1]),dt=De.length,yt;dt--;)yt=De[dt],(!pu(yt,me)||!et(yt)||l(yt.a.x-yt.b.x)=Tt)return;if(Xr>pa){if(!dt)dt={x:ti,y:tr};else if(dt.y>=zt)return;et={x:ti,y:zt}}else{if(!dt)dt={x:ti,y:zt};else if(dt.y1)if(Xr>pa){if(!dt)dt={x:(tr-Xa)/za,y:tr};else if(dt.y>=zt)return;et={x:(zt-Xa)/za,y:zt}}else{if(!dt)dt={x:(zt-Xa)/za,y:zt};else if(dt.y=Tt)return;et={x:Tt,y:za*Tt+Xa}}else{if(!dt)dt={x:Tt,y:za*Tt+Xa};else if(dt.x=Xr&&Xa.x<=pa&&Xa.y>=xa&&Xa.y<=Ja?[[Xr,Ja],[pa,Ja],[pa,xa],[Xr,xa]]:[];fi.point=_r[Sa]}),Gr}function zt(_r){return _r.map(function(Gr,Xr){return{x:Math.round(dt(Gr,Xr)/Je)*Je,y:Math.round(yt(Gr,Xr)/Je)*Je,i:Xr}})}return tr.links=function(_r){return du(zt(_r)).edges.filter(function(Gr){return Gr.l&&Gr.r}).map(function(Gr){return{source:_r[Gr.l.i],target:_r[Gr.r.i]}})},tr.triangles=function(_r){var Gr=[];return du(zt(_r)).cells.forEach(function(Xr,xa){for(var pa=Xr.site,Ja=Xr.edges.sort(Xs),ti=-1,Sa=Ja.length,za,Xa,fi=Ja[Sa-1].edge,ni=fi.l===pa?fi.r:fi.l;++tini&&(ni=Xr.x),Xr.y>La&&(La=Xr.y),Ja.push(Xr.x),ti.push(Xr.y);else for(Sa=0;Sani&&(ni=sn),rn>La&&(La=rn),Ja.push(sn),ti.push(rn)}var dn=ni-Xa,In=La-fi;dn>In?La=fi+dn:ni=Xa+In;function Kn(oo,Wo,cl,al,xl,mn,po,cs){if(!(isNaN(cl)||isNaN(al)))if(oo.leaf){var vs=oo.x,Al=oo.y;if(vs!=null)if(l(vs-cl)+l(Al-al)<.01)ro(oo,Wo,cl,al,xl,mn,po,cs);else{var Hl=oo.point;oo.x=oo.y=oo.point=null,ro(oo,Hl,vs,Al,xl,mn,po,cs),ro(oo,Wo,cl,al,xl,mn,po,cs)}else oo.x=cl,oo.y=al,oo.point=Wo}else ro(oo,Wo,cl,al,xl,mn,po,cs)}function ro(oo,Wo,cl,al,xl,mn,po,cs){var vs=(xl+po)*.5,Al=(mn+cs)*.5,Hl=cl>=vs,Su=al>=Al,Rl=Su<<1|Hl;oo.leaf=!1,oo=oo.nodes[Rl]||(oo.nodes[Rl]=lu()),Hl?xl=vs:po=vs,Su?mn=Al:cs=Al,Kn(oo,Wo,cl,al,xl,mn,po,cs)}var Yo=lu();if(Yo.add=function(oo){Kn(Yo,oo,+xa(oo,++Sa),+pa(oo,Sa),Xa,fi,ni,La)},Yo.visit=function(oo){Pl(oo,Yo,Xa,fi,ni,La)},Yo.find=function(oo){return ic(Yo,oo[0],oo[1],Xa,fi,ni,La)},Sa=-1,De==null){for(;++SaTt||pa>tr||Ja=sn,In=et>=rn,Kn=In<<1|dn,ro=Kn+4;Knet&&(Tt=De.slice(et,Tt),zt[tr]?zt[tr]+=Tt:zt[++tr]=Tt),(dt=dt[0])===(yt=yt[0])?zt[tr]?zt[tr]+=yt:zt[++tr]=yt:(zt[++tr]=null,_r.push({i:tr,x:ml(dt,yt)})),et=nc.lastIndex;return et=0&&!(dt=d.interpolators[et](me,De)););return dt}d.interpolators=[function(me,De){var et=typeof De;return(et==="string"?vr.has(De.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(De)?Ou:bs:De instanceof wi?Ou:Array.isArray(De)?qu:et==="object"&&isNaN(De)?nl:ml)(me,De)}],d.interpolateArray=qu;function qu(me,De){var et=[],dt=[],yt=me.length,Tt=De.length,tr=Math.min(me.length,De.length),zt;for(zt=0;zt=0?me.slice(0,De):me,dt=De>=0?me.slice(De+1):"in";return et=xh.get(et)||fl,dt=ss.get(dt)||F,bh(dt(et.apply(null,x.call(arguments,1))))};function bh(me){return function(De){return De<=0?0:De>=1?1:me(De)}}function ks(me){return function(De){return 1-me(1-De)}}function to(me){return function(De){return .5*(De<.5?me(2*De):2-me(2-2*De))}}function Wc(me){return me*me}function Vu(me){return me*me*me}function jl(me){if(me<=0)return 0;if(me>=1)return 1;var De=me*me,et=De*me;return 4*(me<.5?et:3*(me-De)+et-.75)}function Mf(me){return function(De){return Math.pow(De,me)}}function Ac(me){return 1-Math.cos(me*st)}function nf(me){return Math.pow(2,10*(me-1))}function $l(me){return 1-Math.sqrt(1-me*me)}function Jf(me,De){var et;return arguments.length<2&&(De=.45),arguments.length?et=De/Ue*Math.asin(1/me):(me=1,et=De/4),function(dt){return 1+me*Math.pow(2,-10*dt)*Math.sin((dt-et)*Ue/De)}}function Of(me){return me||(me=1.70158),function(De){return De*De*((me+1)*De-me)}}function of(me){return me<1/2.75?7.5625*me*me:me<2/2.75?7.5625*(me-=1.5/2.75)*me+.75:me<2.5/2.75?7.5625*(me-=2.25/2.75)*me+.9375:7.5625*(me-=2.625/2.75)*me+.984375}d.interpolateHcl=jc;function jc(me,De){me=d.hcl(me),De=d.hcl(De);var et=me.h,dt=me.c,yt=me.l,Tt=De.h-et,tr=De.c-dt,zt=De.l-yt;return isNaN(tr)&&(tr=0,dt=isNaN(dt)?De.c:dt),isNaN(Tt)?(Tt=0,et=isNaN(et)?De.h:et):Tt>180?Tt-=360:Tt<-180&&(Tt+=360),function(_r){return ta(et+Tt*_r,dt+tr*_r,yt+zt*_r)+""}}d.interpolateHsl=Bf;function Bf(me,De){me=d.hsl(me),De=d.hsl(De);var et=me.h,dt=me.s,yt=me.l,Tt=De.h-et,tr=De.s-dt,zt=De.l-yt;return isNaN(tr)&&(tr=0,dt=isNaN(dt)?De.s:dt),isNaN(Tt)?(Tt=0,et=isNaN(et)?De.h:et):Tt>180?Tt-=360:Tt<-180&&(Tt+=360),function(_r){return Yt(et+Tt*_r,dt+tr*_r,yt+zt*_r)+""}}d.interpolateLab=Nf;function Nf(me,De){me=d.lab(me),De=d.lab(De);var et=me.l,dt=me.a,yt=me.b,Tt=De.l-et,tr=De.a-dt,zt=De.b-yt;return function(_r){return pi(et+Tt*_r,dt+tr*_r,yt+zt*_r)+""}}d.interpolateRound=Gu;function Gu(me,De){return De-=me,function(et){return Math.round(me+De*et)}}d.transform=function(me){var De=E.createElementNS(d.ns.prefix.svg,"g");return(d.transform=function(et){if(et!=null){De.setAttribute("transform",et);var dt=De.transform.baseVal.consolidate()}return new Ef(dt?dt.matrix:qc)})(me)};function Ef(me){var De=[me.a,me.b],et=[me.c,me.d],dt=Xc(De),yt=oc(De,et),Tt=Xc(Ql(et,De,-yt))||0;De[0]*et[1]180?De+=360:De-me>180&&(me+=360),dt.push({i:et.push(Sc(et)+"rotate(",null,")")-2,x:ml(me,De)})):De&&et.push(Sc(et)+"rotate("+De+")")}function fh(me,De,et,dt){me!==De?dt.push({i:et.push(Sc(et)+"skewX(",null,")")-2,x:ml(me,De)}):De&&et.push(Sc(et)+"skewX("+De+")")}function Uf(me,De,et,dt){if(me[0]!==De[0]||me[1]!==De[1]){var yt=et.push(Sc(et)+"scale(",null,",",null,")");dt.push({i:yt-4,x:ml(me[0],De[0])},{i:yt-2,x:ml(me[1],De[1])})}else(De[0]!==1||De[1]!==1)&&et.push(Sc(et)+"scale("+De+")")}function Zc(me,De){var et=[],dt=[];return me=d.transform(me),De=d.transform(De),Ys(me.translate,De.translate,et,dt),kf(me.rotate,De.rotate,et,dt),fh(me.skew,De.skew,et,dt),Uf(me.scale,De.scale,et,dt),me=De=null,function(yt){for(var Tt=-1,tr=dt.length,zt;++Tt0?Tt=La:(et.c=null,et.t=NaN,et=null,De.end({type:"end",alpha:Tt=0})):La>0&&(De.start({type:"start",alpha:Tt=La}),et=Ln(me.tick)),me):Tt},me.start=function(){var La,sn=Ja.length,rn=ti.length,dn=dt[0],In=dt[1],Kn,ro;for(La=0;La=0;)Tt.push(Xr=Gr[_r]),Xr.parent=zt,Xr.depth=zt.depth+1;et&&(zt.value=0),zt.children=Gr}else et&&(zt.value=+et.call(dt,zt,zt.depth)||0),delete zt.children;return mc(yt,function(xa){var pa,Ja;me&&(pa=xa.children)&&pa.sort(me),et&&(Ja=xa.parent)&&(Ja.value+=xa.value)}),tr}return dt.sort=function(yt){return arguments.length?(me=yt,dt):me},dt.children=function(yt){return arguments.length?(De=yt,dt):De},dt.value=function(yt){return arguments.length?(et=yt,dt):et},dt.revalue=function(yt){return et&&(Ec(yt,function(Tt){Tt.children&&(Tt.value=0)}),mc(yt,function(Tt){var tr;Tt.children||(Tt.value=+et.call(dt,Tt,Tt.depth)||0),(tr=Tt.parent)&&(tr.value+=Tt.value)})),yt},dt};function Bu(me,De){return d.rebind(me,De,"sort","children","value"),me.nodes=me,me.links=Nu,me}function Ec(me,De){for(var et=[me];(me=et.pop())!=null;)if(De(me),(yt=me.children)&&(dt=yt.length))for(var dt,yt;--dt>=0;)et.push(yt[dt])}function mc(me,De){for(var et=[me],dt=[];(me=et.pop())!=null;)if(dt.push(me),(tr=me.children)&&(Tt=tr.length))for(var yt=-1,Tt,tr;++ytyt&&(yt=zt),dt.push(zt)}for(tr=0;trdt&&(et=De,dt=yt);return et}function hl(me){return me.reduce(uf,0)}function uf(me,De){return me+De[1]}d.layout.histogram=function(){var me=!0,De=Number,et=gf,dt=kc;function yt(Tt,pa){for(var zt=[],_r=Tt.map(De,this),Gr=et.call(this,_r,pa),Xr=dt.call(this,Gr,_r,pa),xa,pa=-1,Ja=_r.length,ti=Xr.length-1,Sa=me?1:1/Ja,za;++pa0)for(pa=-1;++pa=Gr[0]&&za<=Gr[1]&&(xa=zt[d.bisect(Xr,za,1,ti)-1],xa.y+=Sa,xa.push(Tt[pa]));return zt}return yt.value=function(Tt){return arguments.length?(De=Tt,yt):De},yt.range=function(Tt){return arguments.length?(et=Or(Tt),yt):et},yt.bins=function(Tt){return arguments.length?(dt=typeof Tt=="number"?function(tr){return Hu(tr,Tt)}:Or(Tt),yt):dt},yt.frequency=function(Tt){return arguments.length?(me=!!Tt,yt):me},yt};function kc(me,De){return Hu(me,Math.ceil(Math.log(De.length)/Math.LN2+1))}function Hu(me,De){for(var et=-1,dt=+me[0],yt=(me[1]-dt)/De,Tt=[];++et<=De;)Tt[et]=yt*et+dt;return Tt}function gf(me){return[d.min(me),d.max(me)]}d.layout.pack=function(){var me=d.layout.hierarchy().sort(Wu),De=0,et=[1,1],dt;function yt(Tt,tr){var zt=me.call(this,Tt,tr),_r=zt[0],Gr=et[0],Xr=et[1],xa=dt==null?Math.sqrt:typeof dt=="function"?dt:function(){return dt};if(_r.x=_r.y=0,mc(_r,function(Ja){Ja.r=+xa(Ja.value)}),mc(_r,Vf),De){var pa=De*(dt?1:Math.max(2*_r.r/Gr,2*_r.r/Xr))/2;mc(_r,function(Ja){Ja.r+=pa}),mc(_r,Vf),mc(_r,function(Ja){Ja.r-=pa})}return gc(_r,Gr/2,Xr/2,dt?1:1/Math.max(2*_r.r/Gr,2*_r.r/Xr)),zt}return yt.size=function(Tt){return arguments.length?(et=Tt,yt):et},yt.radius=function(Tt){return arguments.length?(dt=Tt==null||typeof Tt=="function"?Tt:+Tt,yt):dt},yt.padding=function(Tt){return arguments.length?(De=+Tt,yt):De},Bu(yt,me)};function Wu(me,De){return me.value-De.value}function Kc(me,De){var et=me._pack_next;me._pack_next=De,De._pack_prev=me,De._pack_next=et,et._pack_prev=De}function Lf(me,De){me._pack_next=De,De._pack_prev=me}function iu(me,De){var et=De.x-me.x,dt=De.y-me.y,yt=me.r+De.r;return .999*yt*yt>et*et+dt*dt}function Vf(me){if(!(De=me.children)||!(pa=De.length))return;var De,et=1/0,dt=-1/0,yt=1/0,Tt=-1/0,tr,zt,_r,Gr,Xr,xa,pa;function Ja(La){et=Math.min(La.x-La.r,et),dt=Math.max(La.x+La.r,dt),yt=Math.min(La.y-La.r,yt),Tt=Math.max(La.y+La.r,Tt)}if(De.forEach(Xu),tr=De[0],tr.x=-tr.r,tr.y=0,Ja(tr),pa>1&&(zt=De[1],zt.x=zt.r,zt.y=0,Ja(zt),pa>2))for(_r=De[2],ql(tr,zt,_r),Ja(_r),Kc(tr,_r),tr._pack_prev=_r,Kc(_r,zt),zt=tr._pack_next,Gr=3;Grza.x&&(za=sn),sn.depth>Xa.depth&&(Xa=sn)});var fi=De(Sa,za)/2-Sa.x,ni=et[0]/(za.x+De(za,Sa)/2+fi),La=et[1]/(Xa.depth||1);Ec(Ja,function(sn){sn.x=(sn.x+fi)*ni,sn.y=sn.depth*La})}return pa}function Tt(Xr){for(var xa={A:null,children:[Xr]},pa=[xa],Ja;(Ja=pa.pop())!=null;)for(var ti=Ja.children,Sa,za=0,Xa=ti.length;za0&&(sc(Qt(Sa,Xr,pa),Xr,sn),Xa+=sn,fi+=sn),ni+=Sa.m,Xa+=Ja.m,La+=za.m,fi+=ti.m;Sa&&!Jc(ti)&&(ti.t=Sa,ti.m+=ni-fi),Ja&&!Lc(za)&&(za.t=Ja,za.m+=Xa-La,pa=Xr)}return pa}function Gr(Xr){Xr.x*=et[0],Xr.y=Xr.depth*et[1]}return yt.separation=function(Xr){return arguments.length?(De=Xr,yt):De},yt.size=function(Xr){return arguments.length?(dt=(et=Xr)==null?Gr:null,yt):dt?null:et},yt.nodeSize=function(Xr){return arguments.length?(dt=(et=Xr)==null?null:Gr,yt):dt?et:null},Bu(yt,me)};function xu(me,De){return me.parent==De.parent?1:2}function Lc(me){var De=me.children;return De.length?De[0]:me.t}function Jc(me){var De=me.children,et;return(et=De.length)?De[et-1]:me.t}function sc(me,De,et){var dt=et/(De.i-me.i);De.c-=dt,De.s+=et,me.c+=dt,De.z+=et,De.m+=et}function Pc(me){for(var De=0,et=0,dt=me.children,yt=dt.length,Tt;--yt>=0;)Tt=dt[yt],Tt.z+=De,Tt.m+=De,De+=Tt.s+(et+=Tt.c)}function Qt(me,De,et){return me.a.parent===De.parent?me.a:et}d.layout.cluster=function(){var me=d.layout.hierarchy().sort(null).value(null),De=xu,et=[1,1],dt=!1;function yt(Tt,tr){var zt=me.call(this,Tt,tr),_r=zt[0],Gr,Xr=0;mc(_r,function(Sa){var za=Sa.children;za&&za.length?(Sa.x=aa(za),Sa.y=br(za)):(Sa.x=Gr?Xr+=De(Sa,Gr):0,Sa.y=0,Gr=Sa)});var xa=$r(_r),pa=ka(_r),Ja=xa.x-De(xa,pa)/2,ti=pa.x+De(pa,xa)/2;return mc(_r,dt?function(Sa){Sa.x=(Sa.x-_r.x)*et[0],Sa.y=(_r.y-Sa.y)*et[1]}:function(Sa){Sa.x=(Sa.x-Ja)/(ti-Ja)*et[0],Sa.y=(1-(_r.y?Sa.y/_r.y:1))*et[1]}),zt}return yt.separation=function(Tt){return arguments.length?(De=Tt,yt):De},yt.size=function(Tt){return arguments.length?(dt=(et=Tt)==null,yt):dt?null:et},yt.nodeSize=function(Tt){return arguments.length?(dt=(et=Tt)!=null,yt):dt?et:null},Bu(yt,me)};function br(me){return 1+d.max(me,function(De){return De.y})}function aa(me){return me.reduce(function(De,et){return De+et.x},0)/me.length}function $r(me){var De=me.children;return De&&De.length?$r(De[0]):me}function ka(me){var De=me.children,et;return De&&(et=De.length)?ka(De[et-1]):me}d.layout.treemap=function(){var me=d.layout.hierarchy(),De=Math.round,et=[1,1],dt=null,yt=li,Tt=!1,tr,zt="squarify",_r=.5*(1+Math.sqrt(5));function Gr(Sa,za){for(var Xa=-1,fi=Sa.length,ni,La;++Xa0;)fi.push(La=ni[In-1]),fi.area+=La.area,zt!=="squarify"||(rn=pa(fi,dn))<=sn?(ni.pop(),sn=rn):(fi.area-=fi.pop().area,Ja(fi,dn,Xa,!1),dn=Math.min(Xa.dx,Xa.dy),fi.length=fi.area=0,sn=1/0);fi.length&&(Ja(fi,dn,Xa,!0),fi.length=fi.area=0),za.forEach(Xr)}}function xa(Sa){var za=Sa.children;if(za&&za.length){var Xa=yt(Sa),fi=za.slice(),ni,La=[];for(Gr(fi,Xa.dx*Xa.dy/Sa.value),La.area=0;ni=fi.pop();)La.push(ni),La.area+=ni.area,ni.z!=null&&(Ja(La,ni.z?Xa.dx:Xa.dy,Xa,!fi.length),La.length=La.area=0);za.forEach(xa)}}function pa(Sa,za){for(var Xa=Sa.area,fi,ni=0,La=1/0,sn=-1,rn=Sa.length;++snni&&(ni=fi));return Xa*=Xa,za*=za,Xa?Math.max(za*ni*_r/Xa,Xa/(za*La*_r)):1/0}function Ja(Sa,za,Xa,fi){var ni=-1,La=Sa.length,sn=Xa.x,rn=Xa.y,dn=za?De(Sa.area/za):0,In;if(za==Xa.dx){for((fi||dn>Xa.dy)&&(dn=Xa.dy);++niXa.dx)&&(dn=Xa.dx);++ni1);return me+De*dt*Math.sqrt(-2*Math.log(Tt)/Tt)}},logNormal:function(){var me=d.random.normal.apply(d,arguments);return function(){return Math.exp(me())}},bates:function(me){var De=d.random.irwinHall(me);return function(){return De()/me}},irwinHall:function(me){return function(){for(var De=0,et=0;et2?mi:pn,Gr=dt?Cu:$f;return yt=_r(me,De,Gr,et),Tt=_r(De,me,Gr,Ul),zt}function zt(_r){return yt(_r)}return zt.invert=function(_r){return Tt(_r)},zt.domain=function(_r){return arguments.length?(me=_r.map(Number),tr()):me},zt.range=function(_r){return arguments.length?(De=_r,tr()):De},zt.rangeRound=function(_r){return zt.range(_r).interpolate(Gu)},zt.clamp=function(_r){return arguments.length?(dt=_r,tr()):dt},zt.interpolate=function(_r){return arguments.length?(et=_r,tr()):et},zt.ticks=function(_r){return co(me,_r)},zt.tickFormat=function(_r,Gr){return d3_scale_linearTickFormat(me,_r,Gr)},zt.nice=function(_r){return no(me,_r),tr()},zt.copy=function(){return Sn(me,De,et,dt)},tr()}function $n(me,De){return d.rebind(me,De,"range","rangeRound","interpolate","clamp")}function no(me,De){return Pi(me,Di(Qn(me,De)[2])),Pi(me,Di(Qn(me,De)[2])),me}function Qn(me,De){De==null&&(De=10);var et=Hi(me),dt=et[1]-et[0],yt=Math.pow(10,Math.floor(Math.log(dt/De)/Math.LN10)),Tt=De/dt*yt;return Tt<=.15?yt*=10:Tt<=.35?yt*=5:Tt<=.75&&(yt*=2),et[0]=Math.ceil(et[0]/yt)*yt,et[1]=Math.floor(et[1]/yt)*yt+yt*.5,et[2]=yt,et}function co(me,De){return d.range.apply(d,Qn(me,De))}var Tn={s:1,g:1,p:1,r:1,e:1};function un(me){return-Math.floor(Math.log(me)/Math.LN10+.01)}function go(me,De){var et=un(De[2]);return me in Tn?Math.abs(et-un(Math.max(l(De[0]),l(De[1]))))+ +(me!=="e"):et-(me==="%")*2}d.scale.log=function(){return Ko(d.scale.linear().domain([0,1]),10,!0,[1,10])};function Ko(me,De,et,dt){function yt(zt){return(et?Math.log(zt<0?0:zt):-Math.log(zt>0?0:-zt))/Math.log(De)}function Tt(zt){return et?Math.pow(De,zt):-Math.pow(De,-zt)}function tr(zt){return me(yt(zt))}return tr.invert=function(zt){return Tt(me.invert(zt))},tr.domain=function(zt){return arguments.length?(et=zt[0]>=0,me.domain((dt=zt.map(Number)).map(yt)),tr):dt},tr.base=function(zt){return arguments.length?(De=+zt,me.domain(dt.map(yt)),tr):De},tr.nice=function(){var zt=Pi(dt.map(yt),et?Math:Ms);return me.domain(zt),dt=zt.map(Tt),tr},tr.ticks=function(){var zt=Hi(dt),_r=[],Gr=zt[0],Xr=zt[1],xa=Math.floor(yt(Gr)),pa=Math.ceil(yt(Xr)),Ja=De%1?2:De;if(isFinite(pa-xa)){if(et){for(;xa0;ti--)_r.push(Tt(xa)*ti);for(xa=0;_r[xa]Xr;pa--);_r=_r.slice(xa,pa)}return _r},tr.copy=function(){return Ko(me.copy(),De,et,dt)},$n(tr,me)}var Ms={floor:function(me){return-Math.ceil(-me)},ceil:function(me){return-Math.floor(-me)}};d.scale.pow=function(){return rl(d.scale.linear(),1,[0,1])};function rl(me,De,et){var dt=Ns(De),yt=Ns(1/De);function Tt(tr){return me(dt(tr))}return Tt.invert=function(tr){return yt(me.invert(tr))},Tt.domain=function(tr){return arguments.length?(me.domain((et=tr.map(Number)).map(dt)),Tt):et},Tt.ticks=function(tr){return co(et,tr)},Tt.tickFormat=function(tr,zt){return d3_scale_linearTickFormat(et,tr,zt)},Tt.nice=function(tr){return Tt.domain(no(et,tr))},Tt.exponent=function(tr){return arguments.length?(dt=Ns(De=tr),yt=Ns(1/De),me.domain(et.map(dt)),Tt):De},Tt.copy=function(){return rl(me.copy(),De,et)},$n(Tt,me)}function Ns(me){return function(De){return De<0?-Math.pow(-De,me):Math.pow(De,me)}}d.scale.sqrt=function(){return d.scale.pow().exponent(.5)},d.scale.ordinal=function(){return el([],{t:"range",a:[[]]})};function el(me,De){var et,dt,yt;function Tt(zt){return dt[((et.get(zt)||(De.t==="range"?et.set(zt,me.push(zt)):NaN))-1)%dt.length]}function tr(zt,_r){return d.range(me.length).map(function(Gr){return zt+_r*Gr})}return Tt.domain=function(zt){if(!arguments.length)return me;me=[],et=new A;for(var _r=-1,Gr=zt.length,Xr;++_r0?et[Tt-1]:me[0],Ttpa?0:1;if(Xr=Ze)return _r(Xr,ti)+(Gr?_r(Gr,1-ti):"")+"Z";var Sa,za,Xa,fi,ni=0,La=0,sn,rn,dn,In,Kn,ro,Yo,oo,Wo=[];if((fi=(+tr.apply(this,arguments)||0)/2)&&(Xa=dt===Iu?Math.sqrt(Gr*Gr+Xr*Xr):+dt.apply(this,arguments),ti||(La*=-1),Xr&&(La=fr(Xa/Xr*Math.sin(fi))),Gr&&(ni=fr(Xa/Gr*Math.sin(fi)))),Xr){sn=Xr*Math.cos(xa+La),rn=Xr*Math.sin(xa+La),dn=Xr*Math.cos(pa-La),In=Xr*Math.sin(pa-La);var cl=Math.abs(pa-xa-2*La)<=Le?0:1;if(La&&yc(sn,rn,dn,In)===ti^cl){var al=(xa+pa)/2;sn=Xr*Math.cos(al),rn=Xr*Math.sin(al),dn=In=null}}else sn=rn=0;if(Gr){Kn=Gr*Math.cos(pa-ni),ro=Gr*Math.sin(pa-ni),Yo=Gr*Math.cos(xa+ni),oo=Gr*Math.sin(xa+ni);var xl=Math.abs(xa-pa+2*ni)<=Le?0:1;if(ni&&yc(Kn,ro,Yo,oo)===1-ti^xl){var mn=(xa+pa)/2;Kn=Gr*Math.cos(mn),ro=Gr*Math.sin(mn),Yo=oo=null}}else Kn=ro=0;if(Ja>Je&&(Sa=Math.min(Math.abs(Xr-Gr)/2,+et.apply(this,arguments)))>.001){za=Gr0?0:1}function fo(me,De,et,dt,yt){var Tt=me[0]-De[0],tr=me[1]-De[1],zt=(yt?dt:-dt)/Math.sqrt(Tt*Tt+tr*tr),_r=zt*tr,Gr=-zt*Tt,Xr=me[0]+_r,xa=me[1]+Gr,pa=De[0]+_r,Ja=De[1]+Gr,ti=(Xr+pa)/2,Sa=(xa+Ja)/2,za=pa-Xr,Xa=Ja-xa,fi=za*za+Xa*Xa,ni=et-dt,La=Xr*Ja-pa*xa,sn=(Xa<0?-1:1)*Math.sqrt(Math.max(0,ni*ni*fi-La*La)),rn=(La*Xa-za*sn)/fi,dn=(-La*za-Xa*sn)/fi,In=(La*Xa+za*sn)/fi,Kn=(-La*za+Xa*sn)/fi,ro=rn-ti,Yo=dn-Sa,oo=In-ti,Wo=Kn-Sa;return ro*ro+Yo*Yo>oo*oo+Wo*Wo&&(rn=In,dn=Kn),[[rn-_r,dn-Gr],[rn*et/ni,dn*et/ni]]}function zo(){return!0}function Dc(me){var De=xo,et=Co,dt=zo,yt=Yu,Tt=yt.key,tr=.7;function zt(_r){var Gr=[],Xr=[],xa=-1,pa=_r.length,Ja,ti=Or(De),Sa=Or(et);function za(){Gr.push("M",yt(me(Xr),tr))}for(;++xa1?me.join("L"):me+"Z"}function Fe(me){return me.join("L")+"Z"}function I(me){for(var De=0,et=me.length,dt=me[0],yt=[dt[0],",",dt[1]];++De1&&yt.push("H",dt[0]),yt.join("")}function ie(me){for(var De=0,et=me.length,dt=me[0],yt=[dt[0],",",dt[1]];++De1){zt=De[1],Tt=me[_r],_r++,dt+="C"+(yt[0]+tr[0])+","+(yt[1]+tr[1])+","+(Tt[0]-zt[0])+","+(Tt[1]-zt[1])+","+Tt[0]+","+Tt[1];for(var Gr=2;Gr9&&(Tt=et*3/Math.sqrt(Tt),tr[zt]=Tt*dt,tr[zt+1]=Tt*yt));for(zt=-1;++zt<=_r;)Tt=(me[Math.min(_r,zt+1)][0]-me[Math.max(0,zt-1)][0])/(6*(1+tr[zt]*tr[zt])),De.push([Tt||0,tr[zt]*Tt||0]);return De}function lr(me){return me.length<3?Yu(me):me[0]+wt(me,Rt(me))}d.svg.line.radial=function(){var me=Dc(yr);return me.radius=me.x,delete me.x,me.angle=me.y,delete me.y,me};function yr(me){for(var De,et=-1,dt=me.length,yt,Tt;++etLe)+",1 "+xa}function Gr(Xr,xa,pa,Ja){return"Q 0,0 "+Ja}return Tt.radius=function(Xr){return arguments.length?(et=Or(Xr),Tt):et},Tt.source=function(Xr){return arguments.length?(me=Or(Xr),Tt):me},Tt.target=function(Xr){return arguments.length?(De=Or(Xr),Tt):De},Tt.startAngle=function(Xr){return arguments.length?(dt=Or(Xr),Tt):dt},Tt.endAngle=function(Xr){return arguments.length?(yt=Or(Xr),Tt):yt},Tt};function ha(me){return me.radius}d.svg.diagonal=function(){var me=jr,De=Qr,et=Aa;function dt(yt,Tt){var tr=me.call(this,yt,Tt),zt=De.call(this,yt,Tt),_r=(tr.y+zt.y)/2,Gr=[tr,{x:tr.x,y:_r},{x:zt.x,y:_r},zt];return Gr=Gr.map(et),"M"+Gr[0]+"C"+Gr[1]+" "+Gr[2]+" "+Gr[3]}return dt.source=function(yt){return arguments.length?(me=Or(yt),dt):me},dt.target=function(yt){return arguments.length?(De=Or(yt),dt):De},dt.projection=function(yt){return arguments.length?(et=yt,dt):et},dt};function Aa(me){return[me.x,me.y]}d.svg.diagonal.radial=function(){var me=d.svg.diagonal(),De=Aa,et=me.projection;return me.projection=function(dt){return arguments.length?et(Da(De=dt)):De},me};function Da(me){return function(){var De=me.apply(this,arguments),et=De[0],dt=De[1]-st;return[et*Math.cos(dt),et*Math.sin(dt)]}}d.svg.symbol=function(){var me=Vi,De=ci;function et(dt,yt){return(on.get(me.call(this,dt,yt))||ji)(De.call(this,dt,yt))}return et.type=function(dt){return arguments.length?(me=Or(dt),et):me},et.size=function(dt){return arguments.length?(De=Or(dt),et):De},et};function ci(){return 64}function Vi(){return"circle"}function ji(me){var De=Math.sqrt(me/Le);return"M0,"+De+"A"+De+","+De+" 0 1,1 0,"+-De+"A"+De+","+De+" 0 1,1 0,"+De+"Z"}var on=d.map({circle:ji,cross:function(me){var De=Math.sqrt(me/5)/2;return"M"+-3*De+","+-De+"H"+-De+"V"+-3*De+"H"+De+"V"+-De+"H"+3*De+"V"+De+"H"+De+"V"+3*De+"H"+-De+"V"+De+"H"+-3*De+"Z"},diamond:function(me){var De=Math.sqrt(me/(2*Yn)),et=De*Yn;return"M0,"+-De+"L"+et+",0 0,"+De+" "+-et+",0Z"},square:function(me){var De=Math.sqrt(me)/2;return"M"+-De+","+-De+"L"+De+","+-De+" "+De+","+De+" "+-De+","+De+"Z"},"triangle-down":function(me){var De=Math.sqrt(me/An),et=De*An/2;return"M0,"+et+"L"+De+","+-et+" "+-De+","+-et+"Z"},"triangle-up":function(me){var De=Math.sqrt(me/An),et=De*An/2;return"M0,"+-et+"L"+De+","+et+" "+-De+","+et+"Z"}});d.svg.symbolTypes=on.keys();var An=Math.sqrt(3),Yn=Math.tan(30*ut);ae.transition=function(me){for(var De=hs||++Zo,et=$o(me),dt=[],yt,Tt,tr=ul||{time:Date.now(),ease:jl,delay:0,duration:250},zt=-1,_r=this.length;++zt<_r;){dt.push(yt=[]);for(var Gr=this[zt],Xr=-1,xa=Gr.length;++Xr0;)xa[--fi].call(me,Xa);if(za>=1)return tr.event&&tr.event.end.call(me,me.__data__,De),--Tt.count?delete Tt[dt]:delete me[et],1}tr||(zt=yt.time,_r=Ln(pa,0,zt),tr=Tt[dt]={tween:new A,time:zt,timer:_r,delay:yt.delay,duration:yt.duration,ease:yt.ease,index:De},yt=null,++Tt.count)}d.svg.axis=function(){var me=d.scale.linear(),De=eu,et=6,dt=6,yt=3,Tt=[10],tr=null,zt;function _r(Gr){Gr.each(function(){var Xr=d.select(this),xa=this.__chart__||me,pa=this.__chart__=me.copy(),Ja=tr??(pa.ticks?pa.ticks.apply(pa,Tt):pa.domain()),ti=zt??(pa.tickFormat?pa.tickFormat.apply(pa,Tt):F),Sa=Xr.selectAll(".tick").data(Ja,pa),za=Sa.enter().insert("g",".domain").attr("class","tick").style("opacity",Je),Xa=d.transition(Sa.exit()).style("opacity",Je).remove(),fi=d.transition(Sa.order()).style("opacity",1),ni=Math.max(et,0)+yt,La,sn=Qi(pa),rn=Xr.selectAll(".domain").data([0]),dn=(rn.enter().append("path").attr("class","domain"),d.transition(rn));za.append("line"),za.append("text");var In=za.select("line"),Kn=fi.select("line"),ro=Sa.select("text").text(ti),Yo=za.select("text"),oo=fi.select("text"),Wo=De==="top"||De==="left"?-1:1,cl,al,xl,mn;if(De==="bottom"||De==="top"?(La=vu,cl="x",xl="y",al="x2",mn="y2",ro.attr("dy",Wo<0?"0em":".71em").style("text-anchor","middle"),dn.attr("d","M"+sn[0]+","+Wo*dt+"V0H"+sn[1]+"V"+Wo*dt)):(La=Tl,cl="y",xl="x",al="y2",mn="x2",ro.attr("dy",".32em").style("text-anchor",Wo<0?"end":"start"),dn.attr("d","M"+Wo*dt+","+sn[0]+"H0V"+sn[1]+"H"+Wo*dt)),In.attr(mn,Wo*et),Yo.attr(xl,Wo*ni),Kn.attr(al,0).attr(mn,Wo*et),oo.attr(cl,0).attr(xl,Wo*ni),pa.rangeBand){var po=pa,cs=po.rangeBand()/2;xa=pa=function(vs){return po(vs)+cs}}else xa.rangeBand?xa=pa:Xa.call(La,pa,xa);za.call(La,xa,pa),fi.call(La,pa,pa)})}return _r.scale=function(Gr){return arguments.length?(me=Gr,_r):me},_r.orient=function(Gr){return arguments.length?(De=Gr in Ru?Gr+"":eu,_r):De},_r.ticks=function(){return arguments.length?(Tt=S(arguments),_r):Tt},_r.tickValues=function(Gr){return arguments.length?(tr=Gr,_r):tr},_r.tickFormat=function(Gr){return arguments.length?(zt=Gr,_r):zt},_r.tickSize=function(Gr){var Xr=arguments.length;return Xr?(et=+Gr,dt=+arguments[Xr-1],_r):et},_r.innerTickSize=function(Gr){return arguments.length?(et=+Gr,_r):et},_r.outerTickSize=function(Gr){return arguments.length?(dt=+Gr,_r):dt},_r.tickPadding=function(Gr){return arguments.length?(yt=+Gr,_r):yt},_r.tickSubdivide=function(){return arguments.length&&_r},_r};var eu="bottom",Ru={top:1,right:1,bottom:1,left:1};function vu(me,De,et){me.attr("transform",function(dt){var yt=De(dt);return"translate("+(isFinite(yt)?yt:et(dt))+",0)"})}function Tl(me,De,et){me.attr("transform",function(dt){var yt=De(dt);return"translate(0,"+(isFinite(yt)?yt:et(dt))+")"})}d.svg.brush=function(){var me=ce(Xr,"brushstart","brush","brushend"),De=null,et=null,dt=[0,0],yt=[0,0],Tt,tr,zt=!0,_r=!0,Gr=uc[0];function Xr(Sa){Sa.each(function(){var za=d.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",ti).on("touchstart.brush",ti),Xa=za.selectAll(".background").data([0]);Xa.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),za.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var fi=za.selectAll(".resize").data(Gr,F);fi.exit().remove(),fi.enter().append("g").attr("class",function(rn){return"resize "+rn}).style("cursor",function(rn){return cu[rn]}).append("rect").attr("x",function(rn){return/[ew]$/.test(rn)?-3:null}).attr("y",function(rn){return/^[ns]/.test(rn)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),fi.style("display",Xr.empty()?"none":null);var ni=d.transition(za),La=d.transition(Xa),sn;De&&(sn=Qi(De),La.attr("x",sn[0]).attr("width",sn[1]-sn[0]),pa(ni)),et&&(sn=Qi(et),La.attr("y",sn[0]).attr("height",sn[1]-sn[0]),Ja(ni)),xa(ni)})}Xr.event=function(Sa){Sa.each(function(){var za=me.of(this,arguments),Xa={x:dt,y:yt,i:Tt,j:tr},fi=this.__chart__||Xa;this.__chart__=Xa,hs?d.select(this).transition().each("start.brush",function(){Tt=fi.i,tr=fi.j,dt=fi.x,yt=fi.y,za({type:"brushstart"})}).tween("brush:brush",function(){var ni=qu(dt,Xa.x),La=qu(yt,Xa.y);return Tt=tr=null,function(sn){dt=Xa.x=ni(sn),yt=Xa.y=La(sn),za({type:"brush",mode:"resize"})}}).each("end.brush",function(){Tt=Xa.i,tr=Xa.j,za({type:"brush",mode:"resize"}),za({type:"brushend"})}):(za({type:"brushstart"}),za({type:"brush",mode:"resize"}),za({type:"brushend"}))})};function xa(Sa){Sa.selectAll(".resize").attr("transform",function(za){return"translate("+dt[+/e$/.test(za)]+","+yt[+/^s/.test(za)]+")"})}function pa(Sa){Sa.select(".extent").attr("x",dt[0]),Sa.selectAll(".extent,.n>rect,.s>rect").attr("width",dt[1]-dt[0])}function Ja(Sa){Sa.select(".extent").attr("y",yt[0]),Sa.selectAll(".extent,.e>rect,.w>rect").attr("height",yt[1]-yt[0])}function ti(){var Sa=this,za=d.select(d.event.target),Xa=me.of(Sa,arguments),fi=d.select(Sa),ni=za.datum(),La=!/^(n|s)$/.test(ni)&&De,sn=!/^(e|w)$/.test(ni)&&et,rn=za.classed("extent"),dn=Er(Sa),In,Kn=d.mouse(Sa),ro,Yo=d.select(t(Sa)).on("keydown.brush",cl).on("keyup.brush",al);if(d.event.changedTouches?Yo.on("touchmove.brush",xl).on("touchend.brush",po):Yo.on("mousemove.brush",xl).on("mouseup.brush",po),fi.interrupt().selectAll("*").interrupt(),rn)Kn[0]=dt[0]-Kn[0],Kn[1]=yt[0]-Kn[1];else if(ni){var oo=+/w$/.test(ni),Wo=+/^n/.test(ni);ro=[dt[1-oo]-Kn[0],yt[1-Wo]-Kn[1]],Kn[0]=dt[oo],Kn[1]=yt[Wo]}else d.event.altKey&&(In=Kn.slice());fi.style("pointer-events","none").selectAll(".resize").style("display",null),d.select("body").style("cursor",za.style("cursor")),Xa({type:"brushstart"}),xl();function cl(){d.event.keyCode==32&&(rn||(In=null,Kn[0]-=dt[1],Kn[1]-=yt[1],rn=2),$())}function al(){d.event.keyCode==32&&rn==2&&(Kn[0]+=dt[1],Kn[1]+=yt[1],rn=0,$())}function xl(){var cs=d.mouse(Sa),vs=!1;ro&&(cs[0]+=ro[0],cs[1]+=ro[1]),rn||(d.event.altKey?(In||(In=[(dt[0]+dt[1])/2,(yt[0]+yt[1])/2]),Kn[0]=dt[+(cs[0]0))return Gt;do Gt.push(Mr=new Date(+Mt)),Ce(Mt,Nt),ne(Mt);while(Mr=kt)for(;ne(kt),!Mt(kt);)kt.setTime(kt-1)},function(kt,Nt){if(kt>=kt)if(Nt<0)for(;++Nt<=0;)for(;Ce(kt,-1),!Mt(kt););else for(;--Nt>=0;)for(;Ce(kt,1),!Mt(kt););})},Ye&&(Ke.count=function(Mt,kt){return x.setTime(+Mt),S.setTime(+kt),ne(x),ne(S),Math.floor(Ye(x,S))},Ke.every=function(Mt){return Mt=Math.floor(Mt),!isFinite(Mt)||!(Mt>0)?null:Mt>1?Ke.filter(rt?function(kt){return rt(kt)%Mt===0}:function(kt){return Ke.count(0,kt)%Mt===0}):Ke}),Ke}var e=E(function(){},function(ne,Ce){ne.setTime(+ne+Ce)},function(ne,Ce){return Ce-ne});e.every=function(ne){return ne=Math.floor(ne),!isFinite(ne)||!(ne>0)?null:ne>1?E(function(Ce){Ce.setTime(Math.floor(Ce/ne)*ne)},function(Ce,Ye){Ce.setTime(+Ce+Ye*ne)},function(Ce,Ye){return(Ye-Ce)/ne}):e};var t=e.range,r=1e3,o=6e4,a=36e5,n=864e5,i=6048e5,s=E(function(ne){ne.setTime(ne-ne.getMilliseconds())},function(ne,Ce){ne.setTime(+ne+Ce*r)},function(ne,Ce){return(Ce-ne)/r},function(ne){return ne.getUTCSeconds()}),h=s.range,f=E(function(ne){ne.setTime(ne-ne.getMilliseconds()-ne.getSeconds()*r)},function(ne,Ce){ne.setTime(+ne+Ce*o)},function(ne,Ce){return(Ce-ne)/o},function(ne){return ne.getMinutes()}),v=f.range,c=E(function(ne){ne.setTime(ne-ne.getMilliseconds()-ne.getSeconds()*r-ne.getMinutes()*o)},function(ne,Ce){ne.setTime(+ne+Ce*a)},function(ne,Ce){return(Ce-ne)/a},function(ne){return ne.getHours()}),T=c.range,l=E(function(ne){ne.setHours(0,0,0,0)},function(ne,Ce){ne.setDate(ne.getDate()+Ce)},function(ne,Ce){return(Ce-ne-(Ce.getTimezoneOffset()-ne.getTimezoneOffset())*o)/n},function(ne){return ne.getDate()-1}),_=l.range;function w(ne){return E(function(Ce){Ce.setDate(Ce.getDate()-(Ce.getDay()+7-ne)%7),Ce.setHours(0,0,0,0)},function(Ce,Ye){Ce.setDate(Ce.getDate()+Ye*7)},function(Ce,Ye){return(Ye-Ce-(Ye.getTimezoneOffset()-Ce.getTimezoneOffset())*o)/i})}var A=w(0),M=w(1),g=w(2),b=w(3),p=w(4),u=w(5),y=w(6),m=A.range,R=M.range,L=g.range,z=b.range,F=p.range,N=u.range,O=y.range,P=E(function(ne){ne.setDate(1),ne.setHours(0,0,0,0)},function(ne,Ce){ne.setMonth(ne.getMonth()+Ce)},function(ne,Ce){return Ce.getMonth()-ne.getMonth()+(Ce.getFullYear()-ne.getFullYear())*12},function(ne){return ne.getMonth()}),U=P.range,B=E(function(ne){ne.setMonth(0,1),ne.setHours(0,0,0,0)},function(ne,Ce){ne.setFullYear(ne.getFullYear()+Ce)},function(ne,Ce){return Ce.getFullYear()-ne.getFullYear()},function(ne){return ne.getFullYear()});B.every=function(ne){return!isFinite(ne=Math.floor(ne))||!(ne>0)?null:E(function(Ce){Ce.setFullYear(Math.floor(Ce.getFullYear()/ne)*ne),Ce.setMonth(0,1),Ce.setHours(0,0,0,0)},function(Ce,Ye){Ce.setFullYear(Ce.getFullYear()+Ye*ne)})};var X=B.range,$=E(function(ne){ne.setUTCSeconds(0,0)},function(ne,Ce){ne.setTime(+ne+Ce*o)},function(ne,Ce){return(Ce-ne)/o},function(ne){return ne.getUTCMinutes()}),le=$.range,ce=E(function(ne){ne.setUTCMinutes(0,0,0)},function(ne,Ce){ne.setTime(+ne+Ce*a)},function(ne,Ce){return(Ce-ne)/a},function(ne){return ne.getUTCHours()}),de=ce.range,G=E(function(ne){ne.setUTCHours(0,0,0,0)},function(ne,Ce){ne.setUTCDate(ne.getUTCDate()+Ce)},function(ne,Ce){return(Ce-ne)/n},function(ne){return ne.getUTCDate()-1}),Y=G.range;function ee(ne){return E(function(Ce){Ce.setUTCDate(Ce.getUTCDate()-(Ce.getUTCDay()+7-ne)%7),Ce.setUTCHours(0,0,0,0)},function(Ce,Ye){Ce.setUTCDate(Ce.getUTCDate()+Ye*7)},function(Ce,Ye){return(Ye-Ce)/i})}var q=ee(0),se=ee(1),ae=ee(2),j=ee(3),Q=ee(4),re=ee(5),pe=ee(6),we=q.range,Se=se.range,Ie=ae.range,Re=j.range,We=Q.range,at=re.range,nt=pe.range,tt=E(function(ne){ne.setUTCDate(1),ne.setUTCHours(0,0,0,0)},function(ne,Ce){ne.setUTCMonth(ne.getUTCMonth()+Ce)},function(ne,Ce){return Ce.getUTCMonth()-ne.getUTCMonth()+(Ce.getUTCFullYear()-ne.getUTCFullYear())*12},function(ne){return ne.getUTCMonth()}),qe=tt.range,he=E(function(ne){ne.setUTCMonth(0,1),ne.setUTCHours(0,0,0,0)},function(ne,Ce){ne.setUTCFullYear(ne.getUTCFullYear()+Ce)},function(ne,Ce){return Ce.getUTCFullYear()-ne.getUTCFullYear()},function(ne){return ne.getUTCFullYear()});he.every=function(ne){return!isFinite(ne=Math.floor(ne))||!(ne>0)?null:E(function(Ce){Ce.setUTCFullYear(Math.floor(Ce.getUTCFullYear()/ne)*ne),Ce.setUTCMonth(0,1),Ce.setUTCHours(0,0,0,0)},function(Ce,Ye){Ce.setUTCFullYear(Ce.getUTCFullYear()+Ye*ne)})};var ue=he.range;d.timeDay=l,d.timeDays=_,d.timeFriday=u,d.timeFridays=N,d.timeHour=c,d.timeHours=T,d.timeInterval=E,d.timeMillisecond=e,d.timeMilliseconds=t,d.timeMinute=f,d.timeMinutes=v,d.timeMonday=M,d.timeMondays=R,d.timeMonth=P,d.timeMonths=U,d.timeSaturday=y,d.timeSaturdays=O,d.timeSecond=s,d.timeSeconds=h,d.timeSunday=A,d.timeSundays=m,d.timeThursday=p,d.timeThursdays=F,d.timeTuesday=g,d.timeTuesdays=L,d.timeWednesday=b,d.timeWednesdays=z,d.timeWeek=A,d.timeWeeks=m,d.timeYear=B,d.timeYears=X,d.utcDay=G,d.utcDays=Y,d.utcFriday=re,d.utcFridays=at,d.utcHour=ce,d.utcHours=de,d.utcMillisecond=e,d.utcMilliseconds=t,d.utcMinute=$,d.utcMinutes=le,d.utcMonday=se,d.utcMondays=Se,d.utcMonth=tt,d.utcMonths=qe,d.utcSaturday=pe,d.utcSaturdays=nt,d.utcSecond=s,d.utcSeconds=h,d.utcSunday=q,d.utcSundays=we,d.utcThursday=Q,d.utcThursdays=We,d.utcTuesday=ae,d.utcTuesdays=Ie,d.utcWednesday=j,d.utcWednesdays=Re,d.utcWeek=q,d.utcWeeks=we,d.utcYear=he,d.utcYears=ue,Object.defineProperty(d,"__esModule",{value:!0})})}}),Xv=He({"node_modules/d3-time-format/dist/d3-time-format.js"(Z,V){(function(d,x){typeof Z=="object"&&typeof V<"u"?x(Z,dd()):(d=d||self,x(d.d3=d.d3||{},d.d3))})(Z,function(d,x){"use strict";function S(Oe){if(0<=Oe.y&&Oe.y<100){var Je=new Date(-1,Oe.m,Oe.d,Oe.H,Oe.M,Oe.S,Oe.L);return Je.setFullYear(Oe.y),Je}return new Date(Oe.y,Oe.m,Oe.d,Oe.H,Oe.M,Oe.S,Oe.L)}function E(Oe){if(0<=Oe.y&&Oe.y<100){var Je=new Date(Date.UTC(-1,Oe.m,Oe.d,Oe.H,Oe.M,Oe.S,Oe.L));return Je.setUTCFullYear(Oe.y),Je}return new Date(Date.UTC(Oe.y,Oe.m,Oe.d,Oe.H,Oe.M,Oe.S,Oe.L))}function e(Oe,Je,Ae){return{y:Oe,m:Je,d:Ae,H:0,M:0,S:0,L:0}}function t(Oe){var Je=Oe.dateTime,Ae=Oe.date,Le=Oe.time,Ue=Oe.periods,Ze=Oe.days,st=Oe.shortDays,ut=Oe.months,Ut=Oe.shortMonths,Ct=h(Ue),Pt=f(Ue),jt=h(Ze),fr=f(Ze),ur=h(st),sr=f(st),Pr=h(ut),Ta=f(ut),Oa=h(Ut),Ia=f(Ut),qa={a:$a,A:Za,b:ri,B:pi,c:null,d:P,e:P,f:le,H:U,I:B,j:X,L:$,m:ce,M:de,p:Ra,q:an,Q:kt,s:Nt,S:G,u:Y,U:ee,V:q,w:se,W:ae,x:null,X:null,y:j,Y:Q,Z:re,"%":Mt},Wa={a:tn,A:fn,b:xt,B:lt,c:null,d:pe,e:pe,f:We,H:we,I:Se,j:Ie,L:Re,m:at,M:nt,p:Br,q:Cr,Q:kt,s:Nt,S:tt,u:qe,U:he,V:ue,w:ne,W:Ce,x:null,X:null,y:Ye,Y:rt,Z:Ke,"%":Mt},Ca={a:Yt,A:Jt,b:Fr,B:ta,c:ra,d:p,e:p,f:z,H:y,I:y,j:u,L,m:b,M:m,p:Dt,q:g,Q:N,s:O,S:R,u:c,U:T,V:l,w:v,W:_,x:ca,X:Ba,y:A,Y:w,Z:M,"%":F};qa.x=hi(Ae,qa),qa.X=hi(Le,qa),qa.c=hi(Je,qa),Wa.x=hi(Ae,Wa),Wa.X=hi(Le,Wa),Wa.c=hi(Je,Wa);function hi(xr,Rr){return function(Ur){var Hr=[],gt=-1,Xt=0,vr=xr.length,Or,ba,Pa;for(Ur instanceof Date||(Ur=new Date(+Ur));++gt53)return null;"w"in Hr||(Hr.w=1),"Z"in Hr?(Xt=E(e(Hr.y,0,1)),vr=Xt.getUTCDay(),Xt=vr>4||vr===0?x.utcMonday.ceil(Xt):x.utcMonday(Xt),Xt=x.utcDay.offset(Xt,(Hr.V-1)*7),Hr.y=Xt.getUTCFullYear(),Hr.m=Xt.getUTCMonth(),Hr.d=Xt.getUTCDate()+(Hr.w+6)%7):(Xt=S(e(Hr.y,0,1)),vr=Xt.getDay(),Xt=vr>4||vr===0?x.timeMonday.ceil(Xt):x.timeMonday(Xt),Xt=x.timeDay.offset(Xt,(Hr.V-1)*7),Hr.y=Xt.getFullYear(),Hr.m=Xt.getMonth(),Hr.d=Xt.getDate()+(Hr.w+6)%7)}else("W"in Hr||"U"in Hr)&&("w"in Hr||(Hr.w="u"in Hr?Hr.u%7:"W"in Hr?1:0),vr="Z"in Hr?E(e(Hr.y,0,1)).getUTCDay():S(e(Hr.y,0,1)).getDay(),Hr.m=0,Hr.d="W"in Hr?(Hr.w+6)%7+Hr.W*7-(vr+5)%7:Hr.w+Hr.U*7-(vr+6)%7);return"Z"in Hr?(Hr.H+=Hr.Z/100|0,Hr.M+=Hr.Z%100,E(Hr)):S(Hr)}}function Kt(xr,Rr,Ur,Hr){for(var gt=0,Xt=Rr.length,vr=Ur.length,Or,ba;gt=vr)return-1;if(Or=Rr.charCodeAt(gt++),Or===37){if(Or=Rr.charAt(gt++),ba=Ca[Or in r?Rr.charAt(gt++):Or],!ba||(Hr=ba(xr,Ur,Hr))<0)return-1}else if(Or!=Ur.charCodeAt(Hr++))return-1}return Hr}function Dt(xr,Rr,Ur){var Hr=Ct.exec(Rr.slice(Ur));return Hr?(xr.p=Pt[Hr[0].toLowerCase()],Ur+Hr[0].length):-1}function Yt(xr,Rr,Ur){var Hr=ur.exec(Rr.slice(Ur));return Hr?(xr.w=sr[Hr[0].toLowerCase()],Ur+Hr[0].length):-1}function Jt(xr,Rr,Ur){var Hr=jt.exec(Rr.slice(Ur));return Hr?(xr.w=fr[Hr[0].toLowerCase()],Ur+Hr[0].length):-1}function Fr(xr,Rr,Ur){var Hr=Oa.exec(Rr.slice(Ur));return Hr?(xr.m=Ia[Hr[0].toLowerCase()],Ur+Hr[0].length):-1}function ta(xr,Rr,Ur){var Hr=Pr.exec(Rr.slice(Ur));return Hr?(xr.m=Ta[Hr[0].toLowerCase()],Ur+Hr[0].length):-1}function ra(xr,Rr,Ur){return Kt(xr,Je,Rr,Ur)}function ca(xr,Rr,Ur){return Kt(xr,Ae,Rr,Ur)}function Ba(xr,Rr,Ur){return Kt(xr,Le,Rr,Ur)}function $a(xr){return st[xr.getDay()]}function Za(xr){return Ze[xr.getDay()]}function ri(xr){return Ut[xr.getMonth()]}function pi(xr){return ut[xr.getMonth()]}function Ra(xr){return Ue[+(xr.getHours()>=12)]}function an(xr){return 1+~~(xr.getMonth()/3)}function tn(xr){return st[xr.getUTCDay()]}function fn(xr){return Ze[xr.getUTCDay()]}function xt(xr){return Ut[xr.getUTCMonth()]}function lt(xr){return ut[xr.getUTCMonth()]}function Br(xr){return Ue[+(xr.getUTCHours()>=12)]}function Cr(xr){return 1+~~(xr.getUTCMonth()/3)}return{format:function(xr){var Rr=hi(xr+="",qa);return Rr.toString=function(){return xr},Rr},parse:function(xr){var Rr=wi(xr+="",!1);return Rr.toString=function(){return xr},Rr},utcFormat:function(xr){var Rr=hi(xr+="",Wa);return Rr.toString=function(){return xr},Rr},utcParse:function(xr){var Rr=wi(xr+="",!0);return Rr.toString=function(){return xr},Rr}}}var r={"-":"",_:" ",0:"0"},o=/^\s*\d+/,a=/^%/,n=/[\\^$*+?|[\]().{}]/g;function i(Oe,Je,Ae){var Le=Oe<0?"-":"",Ue=(Le?-Oe:Oe)+"",Ze=Ue.length;return Le+(Ze68?1900:2e3),Ae+Le[0].length):-1}function M(Oe,Je,Ae){var Le=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(Je.slice(Ae,Ae+6));return Le?(Oe.Z=Le[1]?0:-(Le[2]+(Le[3]||"00")),Ae+Le[0].length):-1}function g(Oe,Je,Ae){var Le=o.exec(Je.slice(Ae,Ae+1));return Le?(Oe.q=Le[0]*3-3,Ae+Le[0].length):-1}function b(Oe,Je,Ae){var Le=o.exec(Je.slice(Ae,Ae+2));return Le?(Oe.m=Le[0]-1,Ae+Le[0].length):-1}function p(Oe,Je,Ae){var Le=o.exec(Je.slice(Ae,Ae+2));return Le?(Oe.d=+Le[0],Ae+Le[0].length):-1}function u(Oe,Je,Ae){var Le=o.exec(Je.slice(Ae,Ae+3));return Le?(Oe.m=0,Oe.d=+Le[0],Ae+Le[0].length):-1}function y(Oe,Je,Ae){var Le=o.exec(Je.slice(Ae,Ae+2));return Le?(Oe.H=+Le[0],Ae+Le[0].length):-1}function m(Oe,Je,Ae){var Le=o.exec(Je.slice(Ae,Ae+2));return Le?(Oe.M=+Le[0],Ae+Le[0].length):-1}function R(Oe,Je,Ae){var Le=o.exec(Je.slice(Ae,Ae+2));return Le?(Oe.S=+Le[0],Ae+Le[0].length):-1}function L(Oe,Je,Ae){var Le=o.exec(Je.slice(Ae,Ae+3));return Le?(Oe.L=+Le[0],Ae+Le[0].length):-1}function z(Oe,Je,Ae){var Le=o.exec(Je.slice(Ae,Ae+6));return Le?(Oe.L=Math.floor(Le[0]/1e3),Ae+Le[0].length):-1}function F(Oe,Je,Ae){var Le=a.exec(Je.slice(Ae,Ae+1));return Le?Ae+Le[0].length:-1}function N(Oe,Je,Ae){var Le=o.exec(Je.slice(Ae));return Le?(Oe.Q=+Le[0],Ae+Le[0].length):-1}function O(Oe,Je,Ae){var Le=o.exec(Je.slice(Ae));return Le?(Oe.s=+Le[0],Ae+Le[0].length):-1}function P(Oe,Je){return i(Oe.getDate(),Je,2)}function U(Oe,Je){return i(Oe.getHours(),Je,2)}function B(Oe,Je){return i(Oe.getHours()%12||12,Je,2)}function X(Oe,Je){return i(1+x.timeDay.count(x.timeYear(Oe),Oe),Je,3)}function $(Oe,Je){return i(Oe.getMilliseconds(),Je,3)}function le(Oe,Je){return $(Oe,Je)+"000"}function ce(Oe,Je){return i(Oe.getMonth()+1,Je,2)}function de(Oe,Je){return i(Oe.getMinutes(),Je,2)}function G(Oe,Je){return i(Oe.getSeconds(),Je,2)}function Y(Oe){var Je=Oe.getDay();return Je===0?7:Je}function ee(Oe,Je){return i(x.timeSunday.count(x.timeYear(Oe)-1,Oe),Je,2)}function q(Oe,Je){var Ae=Oe.getDay();return Oe=Ae>=4||Ae===0?x.timeThursday(Oe):x.timeThursday.ceil(Oe),i(x.timeThursday.count(x.timeYear(Oe),Oe)+(x.timeYear(Oe).getDay()===4),Je,2)}function se(Oe){return Oe.getDay()}function ae(Oe,Je){return i(x.timeMonday.count(x.timeYear(Oe)-1,Oe),Je,2)}function j(Oe,Je){return i(Oe.getFullYear()%100,Je,2)}function Q(Oe,Je){return i(Oe.getFullYear()%1e4,Je,4)}function re(Oe){var Je=Oe.getTimezoneOffset();return(Je>0?"-":(Je*=-1,"+"))+i(Je/60|0,"0",2)+i(Je%60,"0",2)}function pe(Oe,Je){return i(Oe.getUTCDate(),Je,2)}function we(Oe,Je){return i(Oe.getUTCHours(),Je,2)}function Se(Oe,Je){return i(Oe.getUTCHours()%12||12,Je,2)}function Ie(Oe,Je){return i(1+x.utcDay.count(x.utcYear(Oe),Oe),Je,3)}function Re(Oe,Je){return i(Oe.getUTCMilliseconds(),Je,3)}function We(Oe,Je){return Re(Oe,Je)+"000"}function at(Oe,Je){return i(Oe.getUTCMonth()+1,Je,2)}function nt(Oe,Je){return i(Oe.getUTCMinutes(),Je,2)}function tt(Oe,Je){return i(Oe.getUTCSeconds(),Je,2)}function qe(Oe){var Je=Oe.getUTCDay();return Je===0?7:Je}function he(Oe,Je){return i(x.utcSunday.count(x.utcYear(Oe)-1,Oe),Je,2)}function ue(Oe,Je){var Ae=Oe.getUTCDay();return Oe=Ae>=4||Ae===0?x.utcThursday(Oe):x.utcThursday.ceil(Oe),i(x.utcThursday.count(x.utcYear(Oe),Oe)+(x.utcYear(Oe).getUTCDay()===4),Je,2)}function ne(Oe){return Oe.getUTCDay()}function Ce(Oe,Je){return i(x.utcMonday.count(x.utcYear(Oe)-1,Oe),Je,2)}function Ye(Oe,Je){return i(Oe.getUTCFullYear()%100,Je,2)}function rt(Oe,Je){return i(Oe.getUTCFullYear()%1e4,Je,4)}function Ke(){return"+0000"}function Mt(){return"%"}function kt(Oe){return+Oe}function Nt(Oe){return Math.floor(+Oe/1e3)}var Gt;Mr({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Mr(Oe){return Gt=t(Oe),d.timeFormat=Gt.format,d.timeParse=Gt.parse,d.utcFormat=Gt.utcFormat,d.utcParse=Gt.utcParse,Gt}var mr="%Y-%m-%dT%H:%M:%S.%LZ";function qr(Oe){return Oe.toISOString()}var Er=Date.prototype.toISOString?qr:d.utcFormat(mr);function Ir(Oe){var Je=new Date(Oe);return isNaN(Je)?null:Je}var _t=+new Date("2000-01-01T00:00:00.000Z")?Ir:d.utcParse(mr);d.isoFormat=Er,d.isoParse=_t,d.timeFormatDefaultLocale=Mr,d.timeFormatLocale=t,Object.defineProperty(d,"__esModule",{value:!0})})}}),YA=He({"node_modules/d3-format/dist/d3-format.js"(Z,V){(function(d,x){typeof Z=="object"&&typeof V<"u"?x(Z):(d=typeof globalThis<"u"?globalThis:d||self,x(d.d3=d.d3||{}))})(Z,function(d){"use strict";function x(b){return Math.abs(b=Math.round(b))>=1e21?b.toLocaleString("en").replace(/,/g,""):b.toString(10)}function S(b,p){if((u=(b=p?b.toExponential(p-1):b.toExponential()).indexOf("e"))<0)return null;var u,y=b.slice(0,u);return[y.length>1?y[0]+y.slice(2):y,+b.slice(u+1)]}function E(b){return b=S(Math.abs(b)),b?b[1]:NaN}function e(b,p){return function(u,y){for(var m=u.length,R=[],L=0,z=b[0],F=0;m>0&&z>0&&(F+z+1>y&&(z=Math.max(1,y-F)),R.push(u.substring(m-=z,m+z)),!((F+=z+1)>y));)z=b[L=(L+1)%b.length];return R.reverse().join(p)}}function t(b){return function(p){return p.replace(/[0-9]/g,function(u){return b[+u]})}}var r=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function o(b){if(!(p=r.exec(b)))throw new Error("invalid format: "+b);var p;return new a({fill:p[1],align:p[2],sign:p[3],symbol:p[4],zero:p[5],width:p[6],comma:p[7],precision:p[8]&&p[8].slice(1),trim:p[9],type:p[10]})}o.prototype=a.prototype;function a(b){this.fill=b.fill===void 0?" ":b.fill+"",this.align=b.align===void 0?">":b.align+"",this.sign=b.sign===void 0?"-":b.sign+"",this.symbol=b.symbol===void 0?"":b.symbol+"",this.zero=!!b.zero,this.width=b.width===void 0?void 0:+b.width,this.comma=!!b.comma,this.precision=b.precision===void 0?void 0:+b.precision,this.trim=!!b.trim,this.type=b.type===void 0?"":b.type+""}a.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function n(b){e:for(var p=b.length,u=1,y=-1,m;u0&&(y=0);break}return y>0?b.slice(0,y)+b.slice(m+1):b}var i;function s(b,p){var u=S(b,p);if(!u)return b+"";var y=u[0],m=u[1],R=m-(i=Math.max(-8,Math.min(8,Math.floor(m/3)))*3)+1,L=y.length;return R===L?y:R>L?y+new Array(R-L+1).join("0"):R>0?y.slice(0,R)+"."+y.slice(R):"0."+new Array(1-R).join("0")+S(b,Math.max(0,p+R-1))[0]}function h(b,p){var u=S(b,p);if(!u)return b+"";var y=u[0],m=u[1];return m<0?"0."+new Array(-m).join("0")+y:y.length>m+1?y.slice(0,m+1)+"."+y.slice(m+1):y+new Array(m-y.length+2).join("0")}var f={"%":function(b,p){return(b*100).toFixed(p)},b:function(b){return Math.round(b).toString(2)},c:function(b){return b+""},d:x,e:function(b,p){return b.toExponential(p)},f:function(b,p){return b.toFixed(p)},g:function(b,p){return b.toPrecision(p)},o:function(b){return Math.round(b).toString(8)},p:function(b,p){return h(b*100,p)},r:h,s,X:function(b){return Math.round(b).toString(16).toUpperCase()},x:function(b){return Math.round(b).toString(16)}};function v(b){return b}var c=Array.prototype.map,T=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function l(b){var p=b.grouping===void 0||b.thousands===void 0?v:e(c.call(b.grouping,Number),b.thousands+""),u=b.currency===void 0?"":b.currency[0]+"",y=b.currency===void 0?"":b.currency[1]+"",m=b.decimal===void 0?".":b.decimal+"",R=b.numerals===void 0?v:t(c.call(b.numerals,String)),L=b.percent===void 0?"%":b.percent+"",z=b.minus===void 0?"-":b.minus+"",F=b.nan===void 0?"NaN":b.nan+"";function N(P){P=o(P);var U=P.fill,B=P.align,X=P.sign,$=P.symbol,le=P.zero,ce=P.width,de=P.comma,G=P.precision,Y=P.trim,ee=P.type;ee==="n"?(de=!0,ee="g"):f[ee]||(G===void 0&&(G=12),Y=!0,ee="g"),(le||U==="0"&&B==="=")&&(le=!0,U="0",B="=");var q=$==="$"?u:$==="#"&&/[boxX]/.test(ee)?"0"+ee.toLowerCase():"",se=$==="$"?y:/[%p]/.test(ee)?L:"",ae=f[ee],j=/[defgprs%]/.test(ee);G=G===void 0?6:/[gprs]/.test(ee)?Math.max(1,Math.min(21,G)):Math.max(0,Math.min(20,G));function Q(re){var pe=q,we=se,Se,Ie,Re;if(ee==="c")we=ae(re)+we,re="";else{re=+re;var We=re<0||1/re<0;if(re=isNaN(re)?F:ae(Math.abs(re),G),Y&&(re=n(re)),We&&+re==0&&X!=="+"&&(We=!1),pe=(We?X==="("?X:z:X==="-"||X==="("?"":X)+pe,we=(ee==="s"?T[8+i/3]:"")+we+(We&&X==="("?")":""),j){for(Se=-1,Ie=re.length;++SeRe||Re>57){we=(Re===46?m+re.slice(Se+1):re.slice(Se))+we,re=re.slice(0,Se);break}}}de&&!le&&(re=p(re,1/0));var at=pe.length+re.length+we.length,nt=at>1)+pe+re+we+nt.slice(at);break;default:re=nt+pe+re+we;break}return R(re)}return Q.toString=function(){return P+""},Q}function O(P,U){var B=N((P=o(P),P.type="f",P)),X=Math.max(-8,Math.min(8,Math.floor(E(U)/3)))*3,$=Math.pow(10,-X),le=T[8+X/3];return function(ce){return B($*ce)+le}}return{format:N,formatPrefix:O}}var _;w({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function w(b){return _=l(b),d.format=_.format,d.formatPrefix=_.formatPrefix,_}function A(b){return Math.max(0,-E(Math.abs(b)))}function M(b,p){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(E(p)/3)))*3-E(Math.abs(b)))}function g(b,p){return b=Math.abs(b),p=Math.abs(p)-b,Math.max(0,E(p)-E(b))+1}d.FormatSpecifier=a,d.formatDefaultLocale=w,d.formatLocale=l,d.formatSpecifier=o,d.precisionFixed=A,d.precisionPrefix=M,d.precisionRound=g,Object.defineProperty(d,"__esModule",{value:!0})})}}),l7=He({"node_modules/is-string-blank/index.js"(Z,V){"use strict";V.exports=function(d){for(var x=d.length,S,E=0;E13)&&S!==32&&S!==133&&S!==160&&S!==5760&&S!==6158&&(S<8192||S>8205)&&S!==8232&&S!==8233&&S!==8239&&S!==8287&&S!==8288&&S!==12288&&S!==65279)return!1;return!0}}}),as=He({"node_modules/fast-isnumeric/index.js"(Z,V){"use strict";var d=l7();V.exports=function(x){var S=typeof x;if(S==="string"){var E=x;if(x=+x,x===0&&d(E))return!1}else if(S!=="number")return!1;return x-x<1}}}),Ws=He({"src/constants/numerical.js"(Z,V){"use strict";V.exports={BADNUM:void 0,FP_SAFE:Number.MAX_VALUE*1e-4,ONEMAXYEAR:316224e5,ONEAVGYEAR:315576e5,ONEMINYEAR:31536e6,ONEMAXQUARTER:79488e5,ONEAVGQUARTER:78894e5,ONEMINQUARTER:76896e5,ONEMAXMONTH:26784e5,ONEAVGMONTH:26298e5,ONEMINMONTH:24192e5,ONEWEEK:6048e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,ONEMILLI:1,ONEMICROSEC:.001,EPOCHJD:24405875e-1,ALMOST_EQUAL:1-1e-6,LOG_CLIP:10,MINUS_SIGN:"\u2212"}}}),KA=He({"node_modules/base64-arraybuffer/dist/base64-arraybuffer.umd.js"(Z,V){(function(d,x){typeof Z=="object"&&typeof V<"u"?x(Z):(d=typeof globalThis<"u"?globalThis:d||self,x(d["base64-arraybuffer"]={}))})(Z,function(d){"use strict";for(var x="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",S=typeof Uint8Array>"u"?[]:new Uint8Array(256),E=0;E>2],i+=x[(o[a]&3)<<4|o[a+1]>>4],i+=x[(o[a+1]&15)<<2|o[a+2]>>6],i+=x[o[a+2]&63];return n%3===2?i=i.substring(0,i.length-1)+"=":n%3===1&&(i=i.substring(0,i.length-2)+"=="),i},t=function(r){var o=r.length*.75,a=r.length,n,i=0,s,h,f,v;r[r.length-1]==="="&&(o--,r[r.length-2]==="="&&o--);var c=new ArrayBuffer(o),T=new Uint8Array(c);for(n=0;n>4,T[i++]=(h&15)<<4|f>>2,T[i++]=(f&3)<<6|v&63;return c};d.decode=t,d.encode=e,Object.defineProperty(d,"__esModule",{value:!0})})}}),Zv=He({"src/lib/is_plain_object.js"(Z,V){"use strict";V.exports=function(x){return window&&window.process&&window.process.versions?Object.prototype.toString.call(x)==="[object Object]":Object.prototype.toString.call(x)==="[object Object]"&&Object.getPrototypeOf(x).hasOwnProperty("hasOwnProperty")}}}),bp=He({"src/lib/array.js"(Z){"use strict";var V=KA().decode,d=Zv(),x=Array.isArray,S=ArrayBuffer,E=DataView;function e(s){return S.isView(s)&&!(s instanceof E)}Z.isTypedArray=e;function t(s){return x(s)||e(s)}Z.isArrayOrTypedArray=t;function r(s){return!t(s[0])}Z.isArray1D=r,Z.ensureArray=function(s,h){return x(s)||(s=[]),s.length=h,s};var o={u1c:typeof Uint8ClampedArray>"u"?void 0:Uint8ClampedArray,i1:typeof Int8Array>"u"?void 0:Int8Array,u1:typeof Uint8Array>"u"?void 0:Uint8Array,i2:typeof Int16Array>"u"?void 0:Int16Array,u2:typeof Uint16Array>"u"?void 0:Uint16Array,i4:typeof Int32Array>"u"?void 0:Int32Array,u4:typeof Uint32Array>"u"?void 0:Uint32Array,f4:typeof Float32Array>"u"?void 0:Float32Array,f8:typeof Float64Array>"u"?void 0:Float64Array};o.uint8c=o.u1c,o.uint8=o.u1,o.int8=o.i1,o.uint16=o.u2,o.int16=o.i2,o.uint32=o.u4,o.int32=o.i4,o.float32=o.f4,o.float64=o.f8;function a(s){return s.constructor===ArrayBuffer}Z.isArrayBuffer=a,Z.decodeTypedArraySpec=function(s){var h=[],f=n(s),v=f.dtype,c=o[v];if(!c)throw new Error('Error in dtype: "'+v+'"');var T=c.BYTES_PER_ELEMENT,l=f.bdata;a(l)||(l=V(l));var _=f.shape===void 0?[l.byteLength/T]:(""+f.shape).split(",");_.reverse();var w=_.length,A,M,g=+_[0],b=T*g,p=0;if(w===1)h=new c(l);else if(w===2)for(A=+_[1],M=0;M2)return c[A]=c[A]|e,_.set(w,null);if(l){for(h=A;h0)return Math.log(S)/Math.LN10;var e=Math.log(Math.min(E[0],E[1]))/Math.LN10;return d(e)||(e=Math.log(Math.max(E[0],E[1]))/Math.LN10-6),e}}}),f7=He({"src/lib/relink_private.js"(Z,V){"use strict";var d=bp().isArrayOrTypedArray,x=Zv();V.exports=function S(E,e){for(var t in e){var r=e[t],o=E[t];if(o!==r)if(t.charAt(0)==="_"||typeof r=="function"){if(t in E)continue;E[t]=r}else if(d(r)&&d(o)&&x(r[0])){if(t==="customdata"||t==="ids")continue;for(var a=Math.min(r.length,o.length),n=0;nE/2?S-Math.round(S/E)*E:S}V.exports={mod:d,modHalf:x}}}),Ch=He({"node_modules/tinycolor2/tinycolor.js"(Z,V){(function(d){var x=/^\s+/,S=/\s+$/,E=0,e=d.round,t=d.min,r=d.max,o=d.random;function a(j,Q){if(j=j||"",Q=Q||{},j instanceof a)return j;if(!(this instanceof a))return new a(j,Q);var re=n(j);this._originalInput=j,this._r=re.r,this._g=re.g,this._b=re.b,this._a=re.a,this._roundA=e(100*this._a)/100,this._format=Q.format||re.format,this._gradientType=Q.gradientType,this._r<1&&(this._r=e(this._r)),this._g<1&&(this._g=e(this._g)),this._b<1&&(this._b=e(this._b)),this._ok=re.ok,this._tc_id=E++}a.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var j=this.toRgb();return(j.r*299+j.g*587+j.b*114)/1e3},getLuminance:function(){var j=this.toRgb(),Q,re,pe,we,Se,Ie;return Q=j.r/255,re=j.g/255,pe=j.b/255,Q<=.03928?we=Q/12.92:we=d.pow((Q+.055)/1.055,2.4),re<=.03928?Se=re/12.92:Se=d.pow((re+.055)/1.055,2.4),pe<=.03928?Ie=pe/12.92:Ie=d.pow((pe+.055)/1.055,2.4),.2126*we+.7152*Se+.0722*Ie},setAlpha:function(j){return this._a=P(j),this._roundA=e(100*this._a)/100,this},toHsv:function(){var j=f(this._r,this._g,this._b);return{h:j.h*360,s:j.s,v:j.v,a:this._a}},toHsvString:function(){var j=f(this._r,this._g,this._b),Q=e(j.h*360),re=e(j.s*100),pe=e(j.v*100);return this._a==1?"hsv("+Q+", "+re+"%, "+pe+"%)":"hsva("+Q+", "+re+"%, "+pe+"%, "+this._roundA+")"},toHsl:function(){var j=s(this._r,this._g,this._b);return{h:j.h*360,s:j.s,l:j.l,a:this._a}},toHslString:function(){var j=s(this._r,this._g,this._b),Q=e(j.h*360),re=e(j.s*100),pe=e(j.l*100);return this._a==1?"hsl("+Q+", "+re+"%, "+pe+"%)":"hsla("+Q+", "+re+"%, "+pe+"%, "+this._roundA+")"},toHex:function(j){return c(this._r,this._g,this._b,j)},toHexString:function(j){return"#"+this.toHex(j)},toHex8:function(j){return T(this._r,this._g,this._b,this._a,j)},toHex8String:function(j){return"#"+this.toHex8(j)},toRgb:function(){return{r:e(this._r),g:e(this._g),b:e(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+e(this._r)+", "+e(this._g)+", "+e(this._b)+")":"rgba("+e(this._r)+", "+e(this._g)+", "+e(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:e(U(this._r,255)*100)+"%",g:e(U(this._g,255)*100)+"%",b:e(U(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+e(U(this._r,255)*100)+"%, "+e(U(this._g,255)*100)+"%, "+e(U(this._b,255)*100)+"%)":"rgba("+e(U(this._r,255)*100)+"%, "+e(U(this._g,255)*100)+"%, "+e(U(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:N[c(this._r,this._g,this._b,!0)]||!1},toFilter:function(j){var Q="#"+l(this._r,this._g,this._b,this._a),re=Q,pe=this._gradientType?"GradientType = 1, ":"";if(j){var we=a(j);re="#"+l(we._r,we._g,we._b,we._a)}return"progid:DXImageTransform.Microsoft.gradient("+pe+"startColorstr="+Q+",endColorstr="+re+")"},toString:function(j){var Q=!!j;j=j||this._format;var re=!1,pe=this._a<1&&this._a>=0,we=!Q&&pe&&(j==="hex"||j==="hex6"||j==="hex3"||j==="hex4"||j==="hex8"||j==="name");return we?j==="name"&&this._a===0?this.toName():this.toRgbString():(j==="rgb"&&(re=this.toRgbString()),j==="prgb"&&(re=this.toPercentageRgbString()),(j==="hex"||j==="hex6")&&(re=this.toHexString()),j==="hex3"&&(re=this.toHexString(!0)),j==="hex4"&&(re=this.toHex8String(!0)),j==="hex8"&&(re=this.toHex8String()),j==="name"&&(re=this.toName()),j==="hsl"&&(re=this.toHslString()),j==="hsv"&&(re=this.toHsvString()),re||this.toHexString())},clone:function(){return a(this.toString())},_applyModification:function(j,Q){var re=j.apply(null,[this].concat([].slice.call(Q)));return this._r=re._r,this._g=re._g,this._b=re._b,this.setAlpha(re._a),this},lighten:function(){return this._applyModification(M,arguments)},brighten:function(){return this._applyModification(g,arguments)},darken:function(){return this._applyModification(b,arguments)},desaturate:function(){return this._applyModification(_,arguments)},saturate:function(){return this._applyModification(w,arguments)},greyscale:function(){return this._applyModification(A,arguments)},spin:function(){return this._applyModification(p,arguments)},_applyCombination:function(j,Q){return j.apply(null,[this].concat([].slice.call(Q)))},analogous:function(){return this._applyCombination(L,arguments)},complement:function(){return this._applyCombination(u,arguments)},monochromatic:function(){return this._applyCombination(z,arguments)},splitcomplement:function(){return this._applyCombination(R,arguments)},triad:function(){return this._applyCombination(y,arguments)},tetrad:function(){return this._applyCombination(m,arguments)}},a.fromRatio=function(j,Q){if(typeof j=="object"){var re={};for(var pe in j)j.hasOwnProperty(pe)&&(pe==="a"?re[pe]=j[pe]:re[pe]=de(j[pe]));j=re}return a(j,Q)};function n(j){var Q={r:0,g:0,b:0},re=1,pe=null,we=null,Se=null,Ie=!1,Re=!1;return typeof j=="string"&&(j=se(j)),typeof j=="object"&&(q(j.r)&&q(j.g)&&q(j.b)?(Q=i(j.r,j.g,j.b),Ie=!0,Re=String(j.r).substr(-1)==="%"?"prgb":"rgb"):q(j.h)&&q(j.s)&&q(j.v)?(pe=de(j.s),we=de(j.v),Q=v(j.h,pe,we),Ie=!0,Re="hsv"):q(j.h)&&q(j.s)&&q(j.l)&&(pe=de(j.s),Se=de(j.l),Q=h(j.h,pe,Se),Ie=!0,Re="hsl"),j.hasOwnProperty("a")&&(re=j.a)),re=P(re),{ok:Ie,format:j.format||Re,r:t(255,r(Q.r,0)),g:t(255,r(Q.g,0)),b:t(255,r(Q.b,0)),a:re}}function i(j,Q,re){return{r:U(j,255)*255,g:U(Q,255)*255,b:U(re,255)*255}}function s(j,Q,re){j=U(j,255),Q=U(Q,255),re=U(re,255);var pe=r(j,Q,re),we=t(j,Q,re),Se,Ie,Re=(pe+we)/2;if(pe==we)Se=Ie=0;else{var We=pe-we;switch(Ie=Re>.5?We/(2-pe-we):We/(pe+we),pe){case j:Se=(Q-re)/We+(Q1&&(tt-=1),tt<1/6?at+(nt-at)*6*tt:tt<1/2?nt:tt<2/3?at+(nt-at)*(2/3-tt)*6:at}if(Q===0)pe=we=Se=re;else{var Re=re<.5?re*(1+Q):re+Q-re*Q,We=2*re-Re;pe=Ie(We,Re,j+1/3),we=Ie(We,Re,j),Se=Ie(We,Re,j-1/3)}return{r:pe*255,g:we*255,b:Se*255}}function f(j,Q,re){j=U(j,255),Q=U(Q,255),re=U(re,255);var pe=r(j,Q,re),we=t(j,Q,re),Se,Ie,Re=pe,We=pe-we;if(Ie=pe===0?0:We/pe,pe==we)Se=0;else{switch(pe){case j:Se=(Q-re)/We+(Q>1)+720)%360;--Q;)pe.h=(pe.h+we)%360,Se.push(a(pe));return Se}function z(j,Q){Q=Q||6;for(var re=a(j).toHsv(),pe=re.h,we=re.s,Se=re.v,Ie=[],Re=1/Q;Q--;)Ie.push(a({h:pe,s:we,v:Se})),Se=(Se+Re)%1;return Ie}a.mix=function(j,Q,re){re=re===0?0:re||50;var pe=a(j).toRgb(),we=a(Q).toRgb(),Se=re/100,Ie={r:(we.r-pe.r)*Se+pe.r,g:(we.g-pe.g)*Se+pe.g,b:(we.b-pe.b)*Se+pe.b,a:(we.a-pe.a)*Se+pe.a};return a(Ie)},a.readability=function(j,Q){var re=a(j),pe=a(Q);return(d.max(re.getLuminance(),pe.getLuminance())+.05)/(d.min(re.getLuminance(),pe.getLuminance())+.05)},a.isReadable=function(j,Q,re){var pe=a.readability(j,Q),we,Se;switch(Se=!1,we=ae(re),we.level+we.size){case"AAsmall":case"AAAlarge":Se=pe>=4.5;break;case"AAlarge":Se=pe>=3;break;case"AAAsmall":Se=pe>=7;break}return Se},a.mostReadable=function(j,Q,re){var pe=null,we=0,Se,Ie,Re,We;re=re||{},Ie=re.includeFallbackColors,Re=re.level,We=re.size;for(var at=0;atwe&&(we=Se,pe=a(Q[at]));return a.isReadable(j,pe,{level:Re,size:We})||!Ie?pe:(re.includeFallbackColors=!1,a.mostReadable(j,["#fff","#000"],re))};var F=a.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},N=a.hexNames=O(F);function O(j){var Q={};for(var re in j)j.hasOwnProperty(re)&&(Q[j[re]]=re);return Q}function P(j){return j=parseFloat(j),(isNaN(j)||j<0||j>1)&&(j=1),j}function U(j,Q){$(j)&&(j="100%");var re=le(j);return j=t(Q,r(0,parseFloat(j))),re&&(j=parseInt(j*Q,10)/100),d.abs(j-Q)<1e-6?1:j%Q/parseFloat(Q)}function B(j){return t(1,r(0,j))}function X(j){return parseInt(j,16)}function $(j){return typeof j=="string"&&j.indexOf(".")!=-1&&parseFloat(j)===1}function le(j){return typeof j=="string"&&j.indexOf("%")!=-1}function ce(j){return j.length==1?"0"+j:""+j}function de(j){return j<=1&&(j=j*100+"%"),j}function G(j){return d.round(parseFloat(j)*255).toString(16)}function Y(j){return X(j)/255}var ee=function(){var j="[-\\+]?\\d+%?",Q="[-\\+]?\\d*\\.\\d+%?",re="(?:"+Q+")|(?:"+j+")",pe="[\\s|\\(]+("+re+")[,|\\s]+("+re+")[,|\\s]+("+re+")\\s*\\)?",we="[\\s|\\(]+("+re+")[,|\\s]+("+re+")[,|\\s]+("+re+")[,|\\s]+("+re+")\\s*\\)?";return{CSS_UNIT:new RegExp(re),rgb:new RegExp("rgb"+pe),rgba:new RegExp("rgba"+we),hsl:new RegExp("hsl"+pe),hsla:new RegExp("hsla"+we),hsv:new RegExp("hsv"+pe),hsva:new RegExp("hsva"+we),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function q(j){return!!ee.CSS_UNIT.exec(j)}function se(j){j=j.replace(x,"").replace(S,"").toLowerCase();var Q=!1;if(F[j])j=F[j],Q=!0;else if(j=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var re;return(re=ee.rgb.exec(j))?{r:re[1],g:re[2],b:re[3]}:(re=ee.rgba.exec(j))?{r:re[1],g:re[2],b:re[3],a:re[4]}:(re=ee.hsl.exec(j))?{h:re[1],s:re[2],l:re[3]}:(re=ee.hsla.exec(j))?{h:re[1],s:re[2],l:re[3],a:re[4]}:(re=ee.hsv.exec(j))?{h:re[1],s:re[2],v:re[3]}:(re=ee.hsva.exec(j))?{h:re[1],s:re[2],v:re[3],a:re[4]}:(re=ee.hex8.exec(j))?{r:X(re[1]),g:X(re[2]),b:X(re[3]),a:Y(re[4]),format:Q?"name":"hex8"}:(re=ee.hex6.exec(j))?{r:X(re[1]),g:X(re[2]),b:X(re[3]),format:Q?"name":"hex"}:(re=ee.hex4.exec(j))?{r:X(re[1]+""+re[1]),g:X(re[2]+""+re[2]),b:X(re[3]+""+re[3]),a:Y(re[4]+""+re[4]),format:Q?"name":"hex8"}:(re=ee.hex3.exec(j))?{r:X(re[1]+""+re[1]),g:X(re[2]+""+re[2]),b:X(re[3]+""+re[3]),format:Q?"name":"hex"}:!1}function ae(j){var Q,re;return j=j||{level:"AA",size:"small"},Q=(j.level||"AA").toUpperCase(),re=(j.size||"small").toLowerCase(),Q!=="AA"&&Q!=="AAA"&&(Q="AA"),re!=="small"&&re!=="large"&&(re="small"),{level:Q,size:re}}typeof V<"u"&&V.exports?V.exports=a:window.tinycolor=a})(Math)}}),Qo=He({"src/lib/extend.js"(Z){"use strict";var V=Zv(),d=Array.isArray;function x(E,e){var t,r;for(t=0;t=0)))return a;if(f===3)s[f]>1&&(s[f]=1);else if(s[f]>=1)return a}var v=Math.round(s[0]*255)+", "+Math.round(s[1]*255)+", "+Math.round(s[2]*255);return h?"rgba("+v+", "+s[3]+")":"rgb("+v+")"}}}),Ym=He({"src/constants/interactions.js"(Z,V){"use strict";V.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}}}),Jy=He({"src/lib/regex.js"(Z){"use strict";Z.counter=function(V,d,x,S){var E=(d||"")+(x?"":"$"),e=S===!1?"":"^";return V==="xy"?new RegExp(e+"x([2-9]|[1-9][0-9]+)?y([2-9]|[1-9][0-9]+)?"+E):new RegExp(e+V+"([2-9]|[1-9][0-9]+)?"+E)}}}),h7=He({"src/lib/coerce.js"(Z){"use strict";var V=as(),d=Ch(),x=Qo().extendFlat,S=ru(),E=W0(),e=Jn(),t=Ym().DESELECTDIM,r=b_(),o=Jy().counter,a=Yy().modHalf,n=bp().isArrayOrTypedArray,i=bp().isTypedArraySpec,s=bp().decodeTypedArraySpec;Z.valObjectMeta={data_array:{coerceFunction:function(f,v,c){v.set(n(f)?f:i(f)?s(f):c)}},enumerated:{coerceFunction:function(f,v,c,T){T.coerceNumber&&(f=+f),T.values.indexOf(f)===-1?v.set(c):v.set(f)},validateFunction:function(f,v){v.coerceNumber&&(f=+f);for(var c=v.values,T=0;T_===!0||_===!1;l(f)||T.arrayOk&&Array.isArray(f)&&f.length>0&&f.every(l)?v.set(f):v.set(c)}},number:{coerceFunction:function(f,v,c,T){i(f)&&(f=s(f)),!V(f)||T.min!==void 0&&fT.max?v.set(c):v.set(+f)}},integer:{coerceFunction:function(f,v,c,T){if((T.extras||[]).indexOf(f)!==-1){v.set(f);return}i(f)&&(f=s(f)),f%1||!V(f)||T.min!==void 0&&fT.max?v.set(c):v.set(+f)}},string:{coerceFunction:function(f,v,c,T){if(typeof f!="string"){var l=typeof f=="number";T.strict===!0||!l?v.set(c):v.set(String(f))}else T.noBlank&&!f?v.set(c):v.set(f)}},color:{coerceFunction:function(f,v,c){i(f)&&(f=s(f)),d(f).isValid()?v.set(f):v.set(c)}},colorlist:{coerceFunction:function(f,v,c){function T(l){return d(l).isValid()}!Array.isArray(f)||!f.length?v.set(c):f.every(T)?v.set(f):v.set(c)}},colorscale:{coerceFunction:function(f,v,c){v.set(E.get(f,c))}},angle:{coerceFunction:function(f,v,c){i(f)&&(f=s(f)),f==="auto"?v.set("auto"):V(f)?v.set(a(+f,360)):v.set(c)}},subplotid:{coerceFunction:function(f,v,c,T){var l=T.regex||o(c);let _=w=>typeof w=="string"&&l.test(w);_(f)||T.arrayOk&&n(f)&&f.length>0&&f.every(_)?v.set(f):v.set(c)},validateFunction:function(f,v){var c=v.dflt;return f===c?!0:typeof f!="string"?!1:!!o(c).test(f)}},flaglist:{coerceFunction:function(f,v,c,T){if((T.extras||[]).indexOf(f)!==-1){v.set(f);return}if(typeof f!="string"){v.set(c);return}for(var l=f.split("+"),_=0;_/g),c=0;c1){var e=["LOG:"];for(E=0;E1){var t=[];for(E=0;E"),"long")}},S.warn=function(){var E;if(d.logging>0){var e=["WARN:"];for(E=0;E0){var t=[];for(E=0;E"),"stick")}},S.error=function(){var E;if(d.logging>0){var e=["ERROR:"];for(E=0;E0){var t=[];for(E=0;E"),"stick")}}}}),p2=He({"src/lib/noop.js"(Z,V){"use strict";V.exports=function(){}}}),$A=He({"src/lib/push_unique.js"(Z,V){"use strict";V.exports=function(x,S){if(S instanceof RegExp){for(var E=S.toString(),e=0;eTo({valType:"string",dflt:"",editType:E},e!==!1?{arrayOk:!0}:{}),Z.texttemplateAttrs=({editType:E="calc",arrayOk:e}={},t={})=>To({valType:"string",dflt:"",editType:E},e!==!1?{arrayOk:!0}:{}),Z.shapeTexttemplateAttrs=({editType:E="arraydraw",newshape:e}={},t={})=>({valType:"string",dflt:"",editType:E}),Z.templatefallbackAttrs=({editType:E="none"}={})=>({valType:"any",dflt:"-",editType:E})}}),v2=He({"src/components/shapes/label_texttemplate.js"(Z,V){"use strict";function d(A,M){return M?M.d2l(A):A}function x(A,M){return M?M.l2d(A):A}function S(A){return A.x0}function E(A){return A.x1}function e(A){return A.y0}function t(A){return A.y1}function r(A){return A.x0shift||0}function o(A){return A.x1shift||0}function a(A){return A.y0shift||0}function n(A){return A.y1shift||0}function i(A,M){return d(A.x1,M)+o(A)-d(A.x0,M)-r(A)}function s(A,M,g){return d(A.y1,g)+n(A)-d(A.y0,g)-a(A)}function h(A,M){return Math.abs(i(A,M))}function f(A,M,g){return Math.abs(s(A,M,g))}function v(A,M,g){return A.type!=="line"?void 0:Math.sqrt(Math.pow(i(A,M),2)+Math.pow(s(A,M,g),2))}function c(A,M){return x((d(A.x1,M)+o(A)+d(A.x0,M)+r(A))/2,M)}function T(A,M,g){return x((d(A.y1,g)+n(A)+d(A.y0,g)+a(A))/2,g)}function l(A,M,g){return A.type!=="line"?void 0:s(A,M,g)/i(A,M)}var _=["x0","x1","y0","y1","dy","height","ycenter"],w=["x0","x1","y0","y1","dx","width","xcenter"];V.exports={x0:S,x1:E,y0:e,y1:t,slope:l,dx:i,dy:s,width:h,height:f,length:v,xcenter:c,ycenter:T,simpleXVariables:_,simpleYVariables:w}}}),j7=He({"src/components/shapes/draw_newshape/attributes.js"(Z,V){"use strict";var d=pc().overrideAll,x=ru(),S=tc(),E=Gh().dash,e=Qo().extendFlat,{shapeTexttemplateAttrs:t,templatefallbackAttrs:r}=Jl(),o=v2();V.exports=d({newshape:{visible:e({},x.visible,{}),showlegend:{valType:"boolean",dflt:!1},legend:e({},x.legend,{}),legendgroup:e({},x.legendgroup,{}),legendgrouptitle:{text:e({},x.legendgrouptitle.text,{}),font:S({})},legendrank:e({},x.legendrank,{}),legendwidth:e({},x.legendwidth,{}),line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:4},dash:e({},E,{dflt:"solid"})},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd"},opacity:{valType:"number",min:0,max:1,dflt:1},layer:{valType:"enumerated",values:["below","above","between"],dflt:"above"},drawdirection:{valType:"enumerated",values:["ortho","horizontal","vertical","diagonal"],dflt:"diagonal"},name:e({},x.name,{}),label:{text:{valType:"string",dflt:""},texttemplate:t({newshape:!0},{keys:Object.keys(o)}),texttemplatefallback:r({editType:"arraydraw"}),font:S({}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"]},textangle:{valType:"angle",dflt:"auto"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},padding:{valType:"number",dflt:3,min:0}}},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)",description:"Sets the color filling the active shape' interior."},opacity:{valType:"number",min:0,max:1,dflt:.5}}},"none","from-root")}}),q7=He({"src/components/selections/draw_newselection/attributes.js"(Z,V){"use strict";var d=Gh().dash,x=Qo().extendFlat;V.exports={newselection:{mode:{valType:"enumerated",values:["immediate","gradual"],dflt:"immediate",editType:"none"},line:{color:{valType:"color",editType:"none"},width:{valType:"number",min:1,dflt:1,editType:"none"},dash:x({},d,{dflt:"dot",editType:"none"}),editType:"none"},editType:"none"},activeselection:{fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"none"},opacity:{valType:"number",min:0,max:1,dflt:.5,editType:"none"},editType:"none"}}}}),m2=He({"src/plots/pad_attributes.js"(Z,V){"use strict";V.exports=function(d){var x=d.editType;return{t:{valType:"number",dflt:0,editType:x},r:{valType:"number",dflt:0,editType:x},b:{valType:"number",dflt:0,editType:x},l:{valType:"number",dflt:0,editType:x},editType:x}}}}),$y=He({"src/plots/layout_attributes.js"(Z,V){"use strict";var d=tc(),x=A_(),S=sh(),E=j7(),e=q7(),t=m2(),r=Qo().extendFlat,o=d({editType:"calc"});o.family.dflt='"Open Sans", verdana, arial, sans-serif',o.size.dflt=12,o.color.dflt=S.defaultLine,V.exports={font:o,title:{text:{valType:"string",editType:"layoutstyle"},font:d({editType:"layoutstyle"}),subtitle:{text:{valType:"string",editType:"layoutstyle"},font:d({editType:"layoutstyle"}),editType:"layoutstyle"},xref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},yref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},x:{valType:"number",min:0,max:1,dflt:.5,editType:"layoutstyle"},y:{valType:"number",min:0,max:1,dflt:"auto",editType:"layoutstyle"},xanchor:{valType:"enumerated",dflt:"auto",values:["auto","left","center","right"],editType:"layoutstyle"},yanchor:{valType:"enumerated",dflt:"auto",values:["auto","top","middle","bottom"],editType:"layoutstyle"},pad:r(t({editType:"layoutstyle"}),{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},editType:"layoutstyle"},uniformtext:{mode:{valType:"enumerated",values:[!1,"hide","show"],dflt:!1,editType:"plot"},minsize:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"},autosize:{valType:"boolean",dflt:!1,editType:"none"},width:{valType:"number",min:10,dflt:700,editType:"plot"},height:{valType:"number",min:10,dflt:450,editType:"plot"},minreducedwidth:{valType:"number",min:2,dflt:64,editType:"plot"},minreducedheight:{valType:"number",min:2,dflt:64,editType:"plot"},margin:{l:{valType:"number",min:0,dflt:80,editType:"plot"},r:{valType:"number",min:0,dflt:80,editType:"plot"},t:{valType:"number",min:0,dflt:100,editType:"plot"},b:{valType:"number",min:0,dflt:80,editType:"plot"},pad:{valType:"number",min:0,dflt:0,editType:"plot"},autoexpand:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},computed:{valType:"any",editType:"none"},paper_bgcolor:{valType:"color",dflt:S.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:S.background,editType:"layoutstyle"},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc"},separators:{valType:"string",editType:"plot"},hidesources:{valType:"boolean",dflt:!1,editType:"plot"},showlegend:{valType:"boolean",editType:"legend"},colorway:{valType:"colorlist",dflt:S.defaults,editType:"calc"},datarevision:{valType:"any",editType:"calc"},uirevision:{valType:"any",editType:"none"},editrevision:{valType:"any",editType:"none"},selectionrevision:{valType:"any",editType:"none"},template:{valType:"any",editType:"calc"},newshape:E.newshape,activeshape:E.activeshape,newselection:e.newselection,activeselection:e.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:r({},x.transition,{editType:"none"})}}}),V7=He({"node_modules/maplibre-gl/dist/maplibre-gl.css"(){(function(){if(!document.getElementById("8431bff7cc77ea8693f8122c6e0981316b936a0a4930625e08b1512d134062bc")){var Z=document.createElement("style");Z.id="8431bff7cc77ea8693f8122c6e0981316b936a0a4930625e08b1512d134062bc",Z.textContent=`.maplibregl-map{font:12px/20px Helvetica Neue,Arial,Helvetica,sans-serif;overflow:hidden;position:relative;-webkit-tap-highlight-color:rgb(0 0 0/0)}.maplibregl-canvas{left:0;position:absolute;top:0}.maplibregl-map:fullscreen{height:100%;width:100%}.maplibregl-ctrl-group button.maplibregl-ctrl-compass{touch-action:none}.maplibregl-canvas-container.maplibregl-interactive,.maplibregl-ctrl-group button.maplibregl-ctrl-compass{cursor:grab;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-canvas-container.maplibregl-interactive.maplibregl-track-pointer{cursor:pointer}.maplibregl-canvas-container.maplibregl-interactive:active,.maplibregl-ctrl-group button.maplibregl-ctrl-compass:active{cursor:grabbing}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-canvas-container.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:pinch-zoom}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:none}.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures,.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-ctrl-bottom-left,.maplibregl-ctrl-bottom-right,.maplibregl-ctrl-top-left,.maplibregl-ctrl-top-right{pointer-events:none;position:absolute;z-index:2}.maplibregl-ctrl-top-left{left:0;top:0}.maplibregl-ctrl-top-right{right:0;top:0}.maplibregl-ctrl-bottom-left{bottom:0;left:0}.maplibregl-ctrl-bottom-right{bottom:0;right:0}.maplibregl-ctrl{clear:both;pointer-events:auto;transform:translate(0)}.maplibregl-ctrl-top-left .maplibregl-ctrl{float:left;margin:10px 0 0 10px}.maplibregl-ctrl-top-right .maplibregl-ctrl{float:right;margin:10px 10px 0 0}.maplibregl-ctrl-bottom-left .maplibregl-ctrl{float:left;margin:0 0 10px 10px}.maplibregl-ctrl-bottom-right .maplibregl-ctrl{float:right;margin:0 10px 10px 0}.maplibregl-ctrl-group{background:#fff;border-radius:4px}.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px rgba(0,0,0,.1)}@media (forced-colors:active){.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px ButtonText}}.maplibregl-ctrl-group button{background-color:transparent;border:0;box-sizing:border-box;cursor:pointer;display:block;height:29px;outline:none;padding:0;width:29px}.maplibregl-ctrl-group button+button{border-top:1px solid #ddd}.maplibregl-ctrl button .maplibregl-ctrl-icon{background-position:50%;background-repeat:no-repeat;display:block;height:100%;width:100%}@media (forced-colors:active){.maplibregl-ctrl-icon{background-color:transparent}.maplibregl-ctrl-group button+button{border-top:1px solid ButtonText}}.maplibregl-ctrl button::-moz-focus-inner{border:0;padding:0}.maplibregl-ctrl-attrib-button:focus,.maplibregl-ctrl-group button:focus{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl button:disabled{cursor:not-allowed}.maplibregl-ctrl button:disabled .maplibregl-ctrl-icon{opacity:.25}.maplibregl-ctrl button:not(:disabled):hover{background-color:rgb(0 0 0/5%)}.maplibregl-ctrl-group button:focus:focus-visible{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl-group button:focus:not(:focus-visible){box-shadow:none}.maplibregl-ctrl-group button:focus:first-child{border-radius:4px 4px 0 0}.maplibregl-ctrl-group button:focus:last-child{border-radius:0 0 4px 4px}.maplibregl-ctrl-group button:focus:only-child{border-radius:inherit}.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%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 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%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.5'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%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 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%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.5'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%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 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%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.5'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%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-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%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-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%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-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%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-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%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-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%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-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-terrain .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%23333' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-terrain-enabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%2333b5e5' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23aaa' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-waiting .maplibregl-ctrl-icon{animation:maplibregl-spin 2s linear infinite}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23999' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23666' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}}@keyframes maplibregl-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}a.maplibregl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E");background-repeat:no-repeat;cursor:pointer;display:block;height:23px;margin:0 0 -4px -4px;overflow:hidden;width:88px}a.maplibregl-ctrl-logo.maplibregl-compact{width:14px}@media (forced-colors:active){a.maplibregl-ctrl-logo{background-color:transparent;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){a.maplibregl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E")}}.maplibregl-ctrl.maplibregl-ctrl-attrib{background-color:hsla(0,0%,100%,.5);margin:0;padding:0 5px}@media screen{.maplibregl-ctrl-attrib.maplibregl-compact{background-color:#fff;border-radius:12px;box-sizing:content-box;color:#000;margin:10px;min-height:20px;padding:2px 24px 2px 0;position:relative}.maplibregl-ctrl-attrib.maplibregl-compact-show{padding:2px 28px 2px 8px;visibility:visible}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact-show,.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact-show{border-radius:12px;padding:2px 8px 2px 28px}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-inner{display:none}.maplibregl-ctrl-attrib-button{background-color:hsla(0,0%,100%,.5);background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E");border:0;border-radius:12px;box-sizing:border-box;cursor:pointer;display:none;height:24px;outline:none;position:absolute;right:0;top:0;width:24px}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;list-style:none}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button::-webkit-details-marker{display:none}.maplibregl-ctrl-bottom-left .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-top-left .maplibregl-ctrl-attrib-button{left:0}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-inner{display:block}.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-button{background-color:rgb(0 0 0/5%)}.maplibregl-ctrl-bottom-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;right:0}.maplibregl-ctrl-top-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{right:0;top:0}.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{left:0;top:0}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;left:0}}@media screen and (forced-colors:active){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='%23fff' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}@media screen and (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}.maplibregl-ctrl-attrib a{color:rgba(0,0,0,.75);text-decoration:none}.maplibregl-ctrl-attrib a:hover{color:inherit;text-decoration:underline}.maplibregl-attrib-empty{display:none}.maplibregl-ctrl-scale{background-color:hsla(0,0%,100%,.75);border:2px solid #333;border-top:#333;box-sizing:border-box;color:#333;font-size:10px;padding:0 5px}.maplibregl-popup{display:flex;left:0;pointer-events:none;position:absolute;top:0;will-change:transform}.maplibregl-popup-anchor-top,.maplibregl-popup-anchor-top-left,.maplibregl-popup-anchor-top-right{flex-direction:column}.maplibregl-popup-anchor-bottom,.maplibregl-popup-anchor-bottom-left,.maplibregl-popup-anchor-bottom-right{flex-direction:column-reverse}.maplibregl-popup-anchor-left{flex-direction:row}.maplibregl-popup-anchor-right{flex-direction:row-reverse}.maplibregl-popup-tip{border:10px solid transparent;height:0;width:0;z-index:1}.maplibregl-popup-anchor-top .maplibregl-popup-tip{align-self:center;border-bottom-color:#fff;border-top:none}.maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-start;border-bottom-color:#fff;border-left:none;border-top:none}.maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-end;border-bottom-color:#fff;border-right:none;border-top:none}.maplibregl-popup-anchor-bottom .maplibregl-popup-tip{align-self:center;border-bottom:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-start;border-bottom:none;border-left:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-end;border-bottom:none;border-right:none;border-top-color:#fff}.maplibregl-popup-anchor-left .maplibregl-popup-tip{align-self:center;border-left:none;border-right-color:#fff}.maplibregl-popup-anchor-right .maplibregl-popup-tip{align-self:center;border-left-color:#fff;border-right:none}.maplibregl-popup-close-button{background-color:transparent;border:0;border-radius:0 3px 0 0;cursor:pointer;position:absolute;right:0;top:0}.maplibregl-popup-close-button:hover{background-color:rgb(0 0 0/5%)}.maplibregl-popup-content{background:#fff;border-radius:3px;box-shadow:0 1px 2px rgba(0,0,0,.1);padding:15px 10px;pointer-events:auto;position:relative}.maplibregl-popup-anchor-top-left .maplibregl-popup-content{border-top-left-radius:0}.maplibregl-popup-anchor-top-right .maplibregl-popup-content{border-top-right-radius:0}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-content{border-bottom-left-radius:0}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-content{border-bottom-right-radius:0}.maplibregl-popup-track-pointer{display:none}.maplibregl-popup-track-pointer *{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-map:hover .maplibregl-popup-track-pointer{display:flex}.maplibregl-map:active .maplibregl-popup-track-pointer{display:none}.maplibregl-marker{left:0;position:absolute;top:0;transition:opacity .2s;will-change:transform}.maplibregl-user-location-dot,.maplibregl-user-location-dot:before{background-color:#1da1f2;border-radius:50%;height:15px;width:15px}.maplibregl-user-location-dot:before{animation:maplibregl-user-location-dot-pulse 2s infinite;content:"";position:absolute}.maplibregl-user-location-dot:after{border:2px solid #fff;border-radius:50%;box-shadow:0 0 3px rgba(0,0,0,.35);box-sizing:border-box;content:"";height:19px;left:-2px;position:absolute;top:-2px;width:19px}@keyframes maplibregl-user-location-dot-pulse{0%{opacity:1;transform:scale(1)}70%{opacity:0;transform:scale(3)}to{opacity:0;transform:scale(1)}}.maplibregl-user-location-dot-stale{background-color:#aaa}.maplibregl-user-location-dot-stale:after{display:none}.maplibregl-user-location-accuracy-circle{background-color:#1da1f233;border-radius:100%;height:1px;width:1px}.maplibregl-crosshair,.maplibregl-crosshair .maplibregl-interactive,.maplibregl-crosshair .maplibregl-interactive:active{cursor:crosshair}.maplibregl-boxzoom{background:#fff;border:2px dotted #202020;height:0;left:0;opacity:.5;position:absolute;top:0;width:0}.maplibregl-cooperative-gesture-screen{align-items:center;background:rgba(0,0,0,.4);color:#fff;display:flex;font-size:1.4em;inset:0;justify-content:center;line-height:1.2;opacity:0;padding:1rem;pointer-events:none;position:absolute;transition:opacity 1s ease 1s;z-index:99999}.maplibregl-cooperative-gesture-screen.maplibregl-show{opacity:1;transition:opacity .05s}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:none}@media (hover:none),(width <= 480px){.maplibregl-cooperative-gesture-screen .maplibregl-desktop-message{display:none}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:block}}.maplibregl-pseudo-fullscreen{height:100%!important;left:0!important;position:fixed!important;top:0!important;width:100%!important;z-index:99999}`,document.head.appendChild(Z)}})()}}),lo=He({"src/registry.js"(Z){"use strict";var V=Km(),d=p2(),x=$A(),S=Zv(),E=T_().addStyleRule,e=Qo(),t=ru(),r=$y(),o=e.extendFlat,a=e.extendDeepAll;Z.modules={},Z.allCategories={},Z.allTypes=[],Z.subplotsRegistry={},Z.componentsRegistry={},Z.layoutArrayContainers=[],Z.layoutArrayRegexes=[],Z.traceLayoutAttributes={},Z.localeRegistry={},Z.apiMethodRegistry={},Z.collectableSubplotTypes=null,Z.register=function(w){if(Z.collectableSubplotTypes=null,w)w&&!Array.isArray(w)&&(w=[w]);else throw new Error("No argument passed to Plotly.register.");for(var A=0;A=l&&F<=_?F:e}if(typeof F!="string"&&typeof F!="number")return e;F=String(F);var B=c(N),X=F.charAt(0);B&&(X==="G"||X==="g")&&(F=F.slice(1),N="");var $=B&&N.slice(0,7)==="chinese",le=F.match($?f:h);if(!le)return e;var ce=le[1],de=le[3]||"1",G=Number(le[5]||1),Y=Number(le[7]||0),ee=Number(le[9]||0),q=Number(le[11]||0);if(B){if(ce.length===2)return e;ce=Number(ce);var se;try{var ae=i.getComponentMethod("calendars","getCal")(N);if($){var j=de.charAt(de.length-1)==="i";de=parseInt(de,10),se=ae.newDate(ce,ae.toMonthIndex(ce,de,j),G)}else se=ae.newDate(ce,Number(de),G)}catch{return e}return se?(se.toJD()-n)*t+Y*r+ee*o+q*a:e}ce.length===2?ce=(Number(ce)+2e3-v)%100+v:ce=Number(ce),de-=1;var Q=new Date(Date.UTC(2e3,de,G,Y,ee));return Q.setUTCFullYear(ce),Q.getUTCMonth()!==de||Q.getUTCDate()!==G?e:Q.getTime()+q*a},l=Z.MIN_MS=Z.dateTime2ms("-9999"),_=Z.MAX_MS=Z.dateTime2ms("9999-12-31 23:59:59.9999"),Z.isDateTime=function(F,N){return Z.dateTime2ms(F,N)!==e};function w(F,N){return String(F+Math.pow(10,N)).slice(1)}var A=90*t,M=3*r,g=5*o;Z.ms2DateTime=function(F,N,O){if(typeof F!="number"||!(F>=l&&F<=_))return e;N||(N=0);var P=Math.floor(S(F+.05,1)*10),U=Math.round(F-P/10),B,X,$,le,ce,de;if(c(O)){var G=Math.floor(U/t)+n,Y=Math.floor(S(F,t));try{B=i.getComponentMethod("calendars","getCal")(O).fromJD(G).formatDate("yyyy-mm-dd")}catch{B=s("G%Y-%m-%d")(new Date(U))}if(B.charAt(0)==="-")for(;B.length<11;)B="-0"+B.slice(1);else for(;B.length<10;)B="0"+B;X=N=l+t&&F<=_-t))return e;var N=Math.floor(S(F+.05,1)*10),O=new Date(Math.round(F-N/10)),P=V("%Y-%m-%d")(O),U=O.getHours(),B=O.getMinutes(),X=O.getSeconds(),$=O.getUTCMilliseconds()*10+N;return b(P,U,B,X,$)};function b(F,N,O,P,U){if((N||O||P||U)&&(F+=" "+w(N,2)+":"+w(O,2),(P||U)&&(F+=":"+w(P,2),U))){for(var B=4;U%10===0;)B-=1,U/=10;F+="."+w(U,B)}return F}Z.cleanDate=function(F,N,O){if(F===e)return N;if(Z.isJSDate(F)||typeof F=="number"&&isFinite(F)){if(c(O))return x.error("JS Dates and milliseconds are incompatible with world calendars",F),N;if(F=Z.ms2DateTimeLocal(+F),!F&&N!==void 0)return N}else if(!Z.isDateTime(F,O))return x.error("unrecognized date",F),N;return F};var p=/%\d?f/g,u=/%h/g,y={1:"1",2:"1",3:"2",4:"2"};function m(F,N,O,P){F=F.replace(p,function(B){var X=Math.min(+B.charAt(1)||6,6),$=(N/1e3%1+2).toFixed(X).slice(2).replace(/0+$/,"")||"0";return $});var U=new Date(Math.floor(N+.05));if(F=F.replace(u,function(){return y[O("%q")(U)]}),c(P))try{F=i.getComponentMethod("calendars","worldCalFmt")(F,N,P)}catch{return"Invalid"}return O(F)(U)}var R=[59,59.9,59.99,59.999,59.9999];function L(F,N){var O=S(F+.05,t),P=w(Math.floor(O/r),2)+":"+w(S(Math.floor(O/o),60),2);if(N!=="M"){d(N)||(N=0);var U=Math.min(S(F/a,60),R[N]),B=(100+U).toFixed(N).slice(1);N>0&&(B=B.replace(/0+$/,"").replace(/[\.]$/,"")),P+=":"+B}return P}Z.formatDate=function(F,N,O,P,U,B){if(U=c(U)&&U,!N)if(O==="y")N=B.year;else if(O==="m")N=B.month;else if(O==="d")N=B.dayMonth+` `+B.year;else return L(F,O)+` `+m(B.dayMonthYear,F,P,U);return m(N,F,P,U)};var z=3*t;Z.incrementMonth=function(F,N,O){O=c(O)&&O;var P=S(F,t);if(F=Math.round(F-P),O)try{var U=Math.round(F/t)+n,B=i.getComponentMethod("calendars","getCal")(O),X=B.fromJD(U);return N%12?B.add(X,N,"m"):B.add(X,N/12,"y"),(X.toJD()-n)*t+P}catch{x.error("invalid ms "+F+" in calendar "+O)}var $=new Date(F+z);return $.setUTCMonth($.getUTCMonth()+N)+P-z},Z.findExactDates=function(F,N){for(var O=0,P=0,U=0,B=0,X,$,le=c(N)&&i.getComponentMethod("calendars","getCal")(N),ce=0;ce1?(n[h-1]-n[0])/(h-1):1,c,T;for(v>=0?T=i?e:t:T=i?o:r,a+=v*E*(i?-1:1)*(v>=0?1:-1);s90&&d.log("Long binary search..."),s-1};function e(a,n){return an}function o(a,n){return a>=n}Z.sorterAsc=function(a,n){return a-n},Z.sorterDes=function(a,n){return n-a},Z.distinctVals=function(a){var n=a.slice();n.sort(Z.sorterAsc);var i;for(i=n.length-1;i>-1&&n[i]===S;i--);for(var s=n[i]-n[0]||1,h=s/(i||1)/1e4,f=[],v,c=0;c<=i;c++){var T=n[c],l=T-v;v===void 0?(f.push(T),v=T):l>h&&(s=Math.min(s,l),f.push(T),v=T)}return{vals:f,minDiff:s}},Z.roundUp=function(a,n,i){for(var s=0,h=n.length-1,f,v=0,c=i?0:1,T=i?1:0,l=i?Math.ceil:Math.floor;s0&&(s=1),i&&s)return a.sort(n)}return s?a:a.reverse()},Z.findIndexOfMin=function(a,n){n=n||x;for(var i=1/0,s,h=0;hE.length)&&(e=E.length),V(S)||(S=!1),d(E[0])){for(r=new Array(e),t=0;tx.length-1)return x[x.length-1];var E=S%1;return E*x[Math.ceil(S)]+(1-E)*x[Math.floor(S)]}}}),W7=He({"src/lib/angles.js"(Z,V){"use strict";var d=Yy(),x=d.mod,S=d.modHalf,E=Math.PI,e=2*E;function t(T){return T/180*E}function r(T){return T/E*180}function o(T){return Math.abs(T[1]-T[0])>e-1e-14}function a(T,l){return S(l-T,e)}function n(T,l){return Math.abs(a(T,l))}function i(T,l){if(o(l))return!0;var _,w;l[0]w&&(w+=e);var A=x(T,e),M=A+e;return A>=_&&A<=w||M>=_&&M<=w}function s(T,l,_,w){if(!i(l,w))return!1;var A,M;return _[0]<_[1]?(A=_[0],M=_[1]):(A=_[1],M=_[0]),T>=A&&T<=M}function h(T,l,_,w,A,M,g){A=A||0,M=M||0;var b=o([_,w]),p,u,y,m,R;b?(p=0,u=E,y=e):_1/3&&d.x<2/3},Z.isRightAnchor=function(d){return d.xanchor==="right"||d.xanchor==="auto"&&d.x>=2/3},Z.isTopAnchor=function(d){return d.yanchor==="top"||d.yanchor==="auto"&&d.y>=2/3},Z.isMiddleAnchor=function(d){return d.yanchor==="middle"||d.yanchor==="auto"&&d.y>1/3&&d.y<2/3},Z.isBottomAnchor=function(d){return d.yanchor==="bottom"||d.yanchor==="auto"&&d.y<=1/3}}}),Z7=He({"src/lib/geometry2d.js"(Z){"use strict";var V=Yy().mod;Z.segmentsIntersect=d;function d(t,r,o,a,n,i,s,h){var f=o-t,v=n-t,c=s-n,T=a-r,l=i-r,_=h-i,w=f*_-c*T;if(w===0)return null;var A=(v*_-c*l)/w,M=(v*T-f*l)/w;return M<0||M>1||A<0||A>1?null:{x:t+f*A,y:r+T*A}}Z.segmentDistance=function(r,o,a,n,i,s,h,f){if(d(r,o,a,n,i,s,h,f))return 0;var v=a-r,c=n-o,T=h-i,l=f-s,_=v*v+c*c,w=T*T+l*l,A=Math.min(x(v,c,_,i-r,s-o),x(v,c,_,h-r,f-o),x(T,l,w,r-i,o-s),x(T,l,w,a-i,n-s));return Math.sqrt(A)};function x(t,r,o,a,n){var i=a*t+n*r;if(i<0)return a*a+n*n;if(i>o){var s=a-t,h=n-r;return s*s+h*h}else{var f=a*r-n*t;return f*f/o}}var S,E,e;Z.getTextLocation=function(r,o,a,n){if((r!==E||n!==e)&&(S={},E=r,e=n),S[a])return S[a];var i=r.getPointAtLength(V(a-n/2,o)),s=r.getPointAtLength(V(a+n/2,o)),h=Math.atan((s.y-i.y)/(s.x-i.x)),f=r.getPointAtLength(V(a,o)),v=(f.x*4+i.x+s.x)/6,c=(f.y*4+i.y+s.y)/6,T={x:v,y:c,theta:h};return S[a]=T,T},Z.clearLocationCache=function(){E=null},Z.getVisibleSegment=function(r,o,a){var n=o.left,i=o.right,s=o.top,h=o.bottom,f=0,v=r.getTotalLength(),c=v,T,l;function _(A){var M=r.getPointAtLength(A);A===0?T=M:A===v&&(l=M);var g=M.xi?M.x-i:0,b=M.yh?M.y-h:0;return Math.sqrt(g*g+b*b)}for(var w=_(f);w;){if(f+=w+a,f>c)return;w=_(f)}for(w=_(c);w;){if(c-=w+a,f>c)return;w=_(c)}return{min:f,max:c,len:c-f,total:v,isClosed:f===0&&c===v&&Math.abs(T.x-l.x)<.1&&Math.abs(T.y-l.y)<.1}},Z.findPointOnPath=function(r,o,a,n){n=n||{};for(var i=n.pathLength||r.getTotalLength(),s=n.tolerance||.001,h=n.iterationLimit||30,f=r.getPointAtLength(0)[a]>r.getPointAtLength(i)[a]?-1:1,v=0,c=0,T=i,l,_,w;v0?T=l:c=l,v++}return _}}}),y2=He({"src/lib/throttle.js"(Z){"use strict";var V={};Z.throttle=function(S,E,e){var t=V[S],r=Date.now();if(!t){for(var o in V)V[o].tst.ts+E){a();return}t.timer=setTimeout(function(){a(),t.timer=null},E)},Z.done=function(x){var S=V[x];return!S||!S.timer?Promise.resolve():new Promise(function(E){var e=S.onDone;S.onDone=function(){e&&e(),E(),S.onDone=null}})},Z.clear=function(x){if(x)d(V[x]),delete V[x];else for(var S in V)Z.clear(S)};function d(x){x&&x.timer!==null&&(clearTimeout(x.timer),x.timer=null)}}}),Y7=He({"src/lib/clear_responsive.js"(Z,V){"use strict";V.exports=function(x){x._responsiveChartHandler&&(window.removeEventListener("resize",x._responsiveChartHandler),delete x._responsiveChartHandler)}}}),K7=He({"node_modules/is-mobile/index.js"(Z,V){"use strict";V.exports=E,V.exports.isMobile=E,V.exports.default=E;var d=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,x=/CrOS/,S=/android|ipad|playbook|silk/i;function E(e){e||(e={});let t=e.ua;if(!t&&typeof navigator<"u"&&(t=navigator.userAgent),t&&t.headers&&typeof t.headers["user-agent"]=="string"&&(t=t.headers["user-agent"]),typeof t!="string")return!1;let r=d.test(t)&&!x.test(t)||!!e.tablet&&S.test(t);return!r&&e.tablet&&e.featureDetect&&navigator&&navigator.maxTouchPoints>1&&t.indexOf("Macintosh")!==-1&&t.indexOf("Safari")!==-1&&(r=!0),r}}}),J7=He({"src/lib/preserve_drawing_buffer.js"(Z,V){"use strict";var d=as(),x=K7();V.exports=function(e){var t;if(e&&e.hasOwnProperty("userAgent")?t=e.userAgent:t=S(),typeof t!="string")return!0;var r=x({ua:{headers:{"user-agent":t}},tablet:!0,featureDetect:!1});if(!r)for(var o=t.split(" "),a=1;a-1;i--){var s=o[i];if(s.slice(0,8)==="Version/"){var h=s.slice(8).split(".")[0];if(d(h)&&(h=+h),h>=13)return!0}}}return r};function S(){var E;return typeof navigator<"u"&&(E=navigator.userAgent),E&&E.headers&&typeof E.headers["user-agent"]=="string"&&(E=E.headers["user-agent"]),E}}}),$7=He({"src/lib/make_trace_groups.js"(Z,V){"use strict";var d=Wn();V.exports=function(S,E,e){var t=S.selectAll("g."+e.replace(/\s/g,".")).data(E,function(o){return o[0].trace.uid});t.exit().remove(),t.enter().append("g").attr("class",e),t.order();var r=S.classed("rangeplot")?"nodeRangePlot3":"node3";return t.each(function(o){o[0][r]=d.select(this)}),t}}}),Q7=He({"src/lib/localize.js"(Z,V){"use strict";var d=lo();V.exports=function(S,E){for(var e=S._context.locale,t=0;t<2;t++){for(var r=S._context.locales,o=0;o<2;o++){var a=(r[e]||{}).dictionary;if(a){var n=a[E];if(n)return n}r=d.localeRegistry}var i=e.split("-")[0];if(i===e)break;e=i}return E}}}),r5=He({"src/lib/filter_unique.js"(Z,V){"use strict";V.exports=function(x){for(var S={},E=[],e=0,t=0;t1?(E*x+E*S)/E:x+S,t=String(e).length;if(t>16){var r=String(S).length,o=String(x).length;if(t>=o+r){var a=parseFloat(e).toPrecision(12);a.indexOf("e+")===-1&&(e=+a)}}return e}}}),rz=He({"src/lib/clean_number.js"(Z,V){"use strict";var d=as(),x=Ws().BADNUM,S=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g;V.exports=function(e){return typeof e=="string"&&(e=e.replace(S,"")),d(e)?Number(e):x}}}),sa=He({"src/lib/index.js"(Z,V){"use strict";var d=Wn(),x=Xv().utcFormat,S=YA().format,E=as(),e=Ws(),t=e.FP_SAFE,r=-t,o=e.BADNUM,a=V.exports={};a.adjustFormat=function(j){return!j||/^\d[.]\df/.test(j)||/[.]\d%/.test(j)?j:j==="0.f"?"~f":/^\d%/.test(j)?"~%":/^\ds/.test(j)?"~s":!/^[~,.0$]/.test(j)&&/[&fps]/.test(j)?"~"+j:j};var n={};a.warnBadFormat=function(ae){var j=String(ae);n[j]||(n[j]=1,a.warn('encountered bad format: "'+j+'"'))},a.noFormat=function(ae){return String(ae)},a.numberFormat=function(ae){var j;try{j=S(a.adjustFormat(ae))}catch{return a.warnBadFormat(ae),a.noFormat}return j},a.nestedProperty=b_(),a.keyedContainer=u7(),a.relativeAttr=c7(),a.isPlainObject=Zv(),a.toLogRange=h2(),a.relinkPrivateKeys=f7();var i=bp();a.isArrayBuffer=i.isArrayBuffer,a.isTypedArray=i.isTypedArray,a.isArrayOrTypedArray=i.isArrayOrTypedArray,a.isArray1D=i.isArray1D,a.ensureArray=i.ensureArray,a.concat=i.concat,a.maxRowLength=i.maxRowLength,a.minRowLength=i.minRowLength;var s=Yy();a.mod=s.mod,a.modHalf=s.modHalf;var h=h7();a.valObjectMeta=h.valObjectMeta,a.coerce=h.coerce,a.coerce2=h.coerce2,a.coerceFont=h.coerceFont,a.coercePattern=h.coercePattern,a.coerceHoverinfo=h.coerceHoverinfo,a.coerceSelectionMarkerOpacity=h.coerceSelectionMarkerOpacity,a.validate=h.validate;var f=G7();a.dateTime2ms=f.dateTime2ms,a.isDateTime=f.isDateTime,a.ms2DateTime=f.ms2DateTime,a.ms2DateTimeLocal=f.ms2DateTimeLocal,a.cleanDate=f.cleanDate,a.isJSDate=f.isJSDate,a.formatDate=f.formatDate,a.incrementMonth=f.incrementMonth,a.dateTick0=f.dateTick0,a.dfltRange=f.dfltRange,a.findExactDates=f.findExactDates,a.MIN_MS=f.MIN_MS,a.MAX_MS=f.MAX_MS;var v=g2();a.findBin=v.findBin,a.sorterAsc=v.sorterAsc,a.sorterDes=v.sorterDes,a.distinctVals=v.distinctVals,a.roundUp=v.roundUp,a.sort=v.sort,a.findIndexOfMin=v.findIndexOfMin,a.sortObjectKeys=Jm();var c=H7();a.aggNums=c.aggNums,a.len=c.len,a.mean=c.mean,a.geometricMean=c.geometricMean,a.median=c.median,a.midRange=c.midRange,a.variance=c.variance,a.stdev=c.stdev,a.interp=c.interp;var T=d2();a.init2dArray=T.init2dArray,a.transposeRagged=T.transposeRagged,a.dot=T.dot,a.translationMatrix=T.translationMatrix,a.rotationMatrix=T.rotationMatrix,a.rotationXYMatrix=T.rotationXYMatrix,a.apply3DTransform=T.apply3DTransform,a.apply2DTransform=T.apply2DTransform,a.apply2DTransform2=T.apply2DTransform2,a.convertCssMatrix=T.convertCssMatrix,a.inverseTransformMatrix=T.inverseTransformMatrix;var l=W7();a.deg2rad=l.deg2rad,a.rad2deg=l.rad2deg,a.angleDelta=l.angleDelta,a.angleDist=l.angleDist,a.isFullCircle=l.isFullCircle,a.isAngleInsideSector=l.isAngleInsideSector,a.isPtInsideSector=l.isPtInsideSector,a.pathArc=l.pathArc,a.pathSector=l.pathSector,a.pathAnnulus=l.pathAnnulus;var _=X7();a.isLeftAnchor=_.isLeftAnchor,a.isCenterAnchor=_.isCenterAnchor,a.isRightAnchor=_.isRightAnchor,a.isTopAnchor=_.isTopAnchor,a.isMiddleAnchor=_.isMiddleAnchor,a.isBottomAnchor=_.isBottomAnchor;var w=Z7();a.segmentsIntersect=w.segmentsIntersect,a.segmentDistance=w.segmentDistance,a.getTextLocation=w.getTextLocation,a.clearLocationCache=w.clearLocationCache,a.getVisibleSegment=w.getVisibleSegment,a.findPointOnPath=w.findPointOnPath;var A=Qo();a.extendFlat=A.extendFlat,a.extendDeep=A.extendDeep,a.extendDeepAll=A.extendDeepAll,a.extendDeepNoArrays=A.extendDeepNoArrays;var M=Km();a.log=M.log,a.warn=M.warn,a.error=M.error;var g=Jy();a.counterRegex=g.counter;var b=y2();a.throttle=b.throttle,a.throttleDone=b.done,a.clearThrottle=b.clear;var p=T_();a.getGraphDiv=p.getGraphDiv,a.isPlotDiv=p.isPlotDiv,a.removeElement=p.removeElement,a.addStyleRule=p.addStyleRule,a.addRelatedStyleRule=p.addRelatedStyleRule,a.deleteRelatedStyleRule=p.deleteRelatedStyleRule,a.setStyleOnHover=p.setStyleOnHover,a.getFullTransformMatrix=p.getFullTransformMatrix,a.getElementTransformMatrix=p.getElementTransformMatrix,a.getElementAndAncestors=p.getElementAndAncestors,a.equalDomRects=p.equalDomRects,a.clearResponsive=Y7(),a.preserveDrawingBuffer=J7(),a.makeTraceGroups=$7(),a._=Q7(),a.notifier=JA(),a.filterUnique=r5(),a.filterVisible=ez(),a.pushUnique=$A(),a.increment=tz(),a.cleanNumber=rz(),a.ensureNumber=function(j){return E(j)?(j=Number(j),j>t||j=j?!1:E(ae)&&ae>=0&&ae%1===0},a.noop=p2(),a.identity=S_(),a.repeat=function(ae,j){for(var Q=new Array(j),re=0;reQ?Math.max(Q,Math.min(j,ae)):Math.max(j,Math.min(Q,ae))},a.bBoxIntersect=function(ae,j,Q){return Q=Q||0,ae.left<=j.right+Q&&j.left<=ae.right+Q&&ae.top<=j.bottom+Q&&j.top<=ae.bottom+Q},a.simpleMap=function(ae,j,Q,re,pe){for(var we=ae.length,Se=new Array(we),Ie=0;Ie=Math.pow(2,Q)?pe>10?(a.warn("randstr failed uniqueness"),Se):ae(j,Q,re,(pe||0)+1):Se},a.OptionControl=function(ae,j){ae||(ae={}),j||(j="opt");var Q={};return Q.optionList=[],Q._newoption=function(re){re[j]=ae,Q[re.name]=re,Q.optionList.push(re)},Q["_"+j]=ae,Q},a.smooth=function(ae,j){if(j=Math.round(j)||0,j<2)return ae;var Q=ae.length,re=2*Q,pe=2*j-1,we=new Array(pe),Se=new Array(Q),Ie,Re,We,at;for(Ie=0;Ie=re&&(We-=re*Math.floor(We/re)),We<0?We=-1-We:We>=Q&&(We=re-1-We),at+=ae[We]*we[Re];Se[Ie]=at}return Se},a.syncOrAsync=function(ae,j,Q){var re,pe;function we(){return a.syncOrAsync(ae,j,Q)}for(;ae.length;)if(pe=ae.splice(0,1)[0],re=pe(j),re&&re.then)return re.then(we);return Q&&Q(j)},a.stripTrailingSlash=function(ae){return ae.slice(-1)==="/"?ae.slice(0,-1):ae},a.noneOrAll=function(ae,j,Q){if(ae){var re=!1,pe=!0,we,Se;for(we=0;we0?pe:0})},a.fillArray=function(ae,j,Q,re){if(re=re||a.identity,a.isArrayOrTypedArray(ae))for(var pe=0;peL.test(window.navigator.userAgent);var z=/Firefox\/(\d+)\.\d+/;a.getFirefoxVersion=function(){var ae=z.exec(window.navigator.userAgent);if(ae&&ae.length===2){var j=parseInt(ae[1]);if(!isNaN(j))return j}return null},a.isD3Selection=function(ae){return ae instanceof d.selection},a.ensureSingle=function(ae,j,Q,re){var pe=ae.select(j+(Q?"."+Q:""));if(pe.size())return pe;var we=ae.append(j);return Q&&we.classed(Q,!0),re&&we.call(re),we},a.ensureSingleById=function(ae,j,Q,re){var pe=ae.select(j+"#"+Q);if(pe.size())return pe;var we=ae.append(j).attr("id",Q);return re&&we.call(re),we},a.objectFromPath=function(ae,j){for(var Q=ae.split("."),re,pe=re={},we=0;we1?pe+Se[1]:"";if(we&&(Se.length>1||Ie.length>4||Q))for(;re.test(Ie);)Ie=Ie.replace(re,"$1"+we+"$2");return Ie+Re},a.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var P=/^\w*$/;a.templateString=function(ae,j){var Q={};return ae.replace(a.TEMPLATE_STRING_REGEX,function(re,pe){var we;return P.test(pe)?we=j[pe]:(Q[pe]=Q[pe]||a.nestedProperty(j,pe).get,we=Q[pe](!0)),we!==void 0?we:""})};var U={max:10,count:0,name:"hovertemplate"};a.hovertemplateString=ae=>de(ps(To({},ae),{opts:U}));var B={max:10,count:0,name:"texttemplate"};a.texttemplateString=ae=>de(ps(To({},ae),{opts:B}));var X=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/;function $(ae){var j=ae.match(X);return j?{key:j[1],op:j[2],number:Number(j[3])}:{key:ae,op:null,number:null}}var le={max:10,count:0,name:"texttemplate",parseMultDiv:!0};a.texttemplateStringForShapes=ae=>de(ps(To({},ae),{opts:le}));var ce=/^[:|\|]/;function de({data:ae=[],locale:j,fallback:Q,labels:re={},opts:pe,template:we}){return we.replace(a.TEMPLATE_STRING_REGEX,(Se,Ie,Re)=>{let We=["xother","yother"].includes(Ie),at=["_xother","_yother"].includes(Ie),nt=["_xother_","_yother_"].includes(Ie),tt=["xother_","yother_"].includes(Ie),qe=We||at||tt||nt;(at||nt)&&(Ie=Ie.substring(1)),(tt||nt)&&(Ie=Ie.substring(0,Ie.length-1));let he=null,ue=null;if(pe.parseMultDiv){var ne=$(Ie);Ie=ne.key,he=ne.op,ue=ne.number}let Ce;if(qe){if(re[Ie]===void 0)return"";Ce=re[Ie]}else for(let Mt of ae)if(Mt){if(Mt.hasOwnProperty(Ie)){Ce=Mt[Ie];break}if(P.test(Ie)||(Ce=a.nestedProperty(Mt,Ie).get(!0)),Ce!==void 0)break}if(Ce===void 0){let{count:Mt,max:kt,name:Nt}=pe,Gt=Q===!1?Se:Q;return Mt=G&&Se<=Y,We=Ie>=G&&Ie<=Y;if(Re&&(re=10*re+Se-G),We&&(pe=10*pe+Ie-G),!Re||!We){if(re!==pe)return re-pe;if(Se!==Ie)return Se-Ie}}return pe-re};var ee=2e9;a.seedPseudoRandom=function(){ee=2e9},a.pseudoRandom=function(){var ae=ee;return ee=(69069*ee+1)%4294967296,Math.abs(ee-ae)<429496729?a.pseudoRandom():ee/4294967296},a.fillText=function(ae,j,Q){var re=Array.isArray(Q)?function(Se){Q.push(Se)}:function(Se){Q.text=Se},pe=a.extractOption(ae,j,"htx","hovertext");if(a.isValidTextValue(pe))return re(pe);var we=a.extractOption(ae,j,"tx","text");if(a.isValidTextValue(we))return re(we)},a.isValidTextValue=function(ae){return ae||ae===0},a.formatPercent=function(ae,j){j=j||0;for(var Q=(Math.round(100*ae*Math.pow(10,j))*Math.pow(.1,j)).toFixed(j)+"%",re=0;re1&&(We=1):We=0,a.strTranslate(pe-We*(Q+Se),we-We*(re+Ie))+a.strScale(We)+(Re?"rotate("+Re+(j?"":" "+Q+" "+re)+")":"")},a.setTransormAndDisplay=function(ae,j){ae.attr("transform",a.getTextTransform(j)),ae.style("display",j.scale?null:"none")},a.ensureUniformFontSize=function(ae,j){var Q=a.extendFlat({},j);return Q.size=Math.max(j.size,ae._fullLayout.uniformtext.minsize||0),Q},a.join2=function(ae,j,Q){var re=ae.length;return re>1?ae.slice(0,-1).join(j)+Q+ae[re-1]:ae.join(j)},a.bigFont=function(ae){return Math.round(1.2*ae)};var q=a.getFirefoxVersion(),se=q!==null&&q<86;a.getPositionFromD3Event=function(){return se?[d.event.layerX,d.event.layerY]:[d.event.offsetX,d.event.offsetY]}}}),az=He({"build/plotcss.js"(){"use strict";var Z=sa(),V={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;border:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X:focus-within .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-group a":"display:grid;place-content:center;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;border:none;background:rgba(0,0,0,0);","X .modebar-btn svg":"position:relative;","X .modebar-btn:focus-visible":"outline:1px solid #000;outline-offset:1px;border-radius:3px;","X .modebar.vertical":"display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-end;max-height:100%;","X .modebar.vertical svg":"top:-1px;","X .modebar.vertical .modebar-group":"display:block;float:none;padding-left:0px;padding-bottom:8px;","X .modebar.vertical .modebar-group .modebar-btn":"display:block;text-align:center;","X [data-title]:before,X [data-title]:after":"position:absolute;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:none;opacity:0;z-index:1001;pointer-events:none;top:110%;right:50%;","X [data-title]:hover:before,X [data-title]:hover:after":"display:block;opacity:1;","X [data-title]:before":'content:"";position:absolute;background:rgba(0,0,0,0);border:6px solid rgba(0,0,0,0);z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;',"X [data-title]:after":"content:attr(data-title);background:#69738a;color:#fff;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;","X .vertical [data-title]:before,X .vertical [data-title]:after":"top:0%;right:200%;","X .vertical [data-title]:before":"border:6px solid rgba(0,0,0,0);border-left-color:#69738a;margin-top:8px;margin-right:-30px;",Y:'font-family:"Open Sans",verdana,arial,sans-serif;position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;',"Y p":"margin:0;","Y .notifier-note":"min-width:180px;max-width:250px;border:1px solid #fff;z-index:3000;margin:0;background-color:#8c97af;background-color:rgba(140,151,175,.9);color:#fff;padding:10px;overflow-wrap:break-word;word-wrap:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;","Y .notifier-close":"color:#fff;opacity:.8;float:right;padding:0 5px;background:none;border:none;font-size:20px;font-weight:bold;line-height:20px;","Y .notifier-close:hover":"color:#444;text-decoration:none;cursor:pointer;"};for(x in V)d=x.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier"),Z.addStyleRule(d,V[x]);var d,x}}),a5=He({"node_modules/is-browser/client.js"(Z,V){V.exports=!0}}),i5=He({"node_modules/has-hover/index.js"(Z,V){"use strict";var d=a5(),x;typeof window.matchMedia=="function"?x=!window.matchMedia("(hover: none)").matches:x=d,V.exports=x}}),Z0=He({"node_modules/events/events.js"(Z,V){"use strict";var d=typeof Reflect=="object"?Reflect:null,x=d&&typeof d.apply=="function"?d.apply:function(M,g,b){return Function.prototype.apply.call(M,g,b)},S;d&&typeof d.ownKeys=="function"?S=d.ownKeys:Object.getOwnPropertySymbols?S=function(M){return Object.getOwnPropertyNames(M).concat(Object.getOwnPropertySymbols(M))}:S=function(M){return Object.getOwnPropertyNames(M)};function E(A){console&&console.warn&&console.warn(A)}var e=Number.isNaN||function(M){return M!==M};function t(){t.init.call(this)}V.exports=t,V.exports.once=l,t.EventEmitter=t,t.prototype._events=void 0,t.prototype._eventsCount=0,t.prototype._maxListeners=void 0;var r=10;function o(A){if(typeof A!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof A)}Object.defineProperty(t,"defaultMaxListeners",{enumerable:!0,get:function(){return r},set:function(A){if(typeof A!="number"||A<0||e(A))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+A+".");r=A}}),t.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},t.prototype.setMaxListeners=function(M){if(typeof M!="number"||M<0||e(M))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+M+".");return this._maxListeners=M,this};function a(A){return A._maxListeners===void 0?t.defaultMaxListeners:A._maxListeners}t.prototype.getMaxListeners=function(){return a(this)},t.prototype.emit=function(M){for(var g=[],b=1;b0&&(y=g[0]),y instanceof Error)throw y;var m=new Error("Unhandled error."+(y?" ("+y.message+")":""));throw m.context=y,m}var R=u[M];if(R===void 0)return!1;if(typeof R=="function")x(R,this,g);else for(var L=R.length,z=v(R,L),b=0;b0&&y.length>p&&!y.warned){y.warned=!0;var m=new Error("Possible EventEmitter memory leak detected. "+y.length+" "+String(M)+" listeners added. Use emitter.setMaxListeners() to increase limit");m.name="MaxListenersExceededWarning",m.emitter=A,m.type=M,m.count=y.length,E(m)}return A}t.prototype.addListener=function(M,g){return n(this,M,g,!1)},t.prototype.on=t.prototype.addListener,t.prototype.prependListener=function(M,g){return n(this,M,g,!0)};function i(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function s(A,M,g){var b={fired:!1,wrapFn:void 0,target:A,type:M,listener:g},p=i.bind(b);return p.listener=g,b.wrapFn=p,p}t.prototype.once=function(M,g){return o(g),this.on(M,s(this,M,g)),this},t.prototype.prependOnceListener=function(M,g){return o(g),this.prependListener(M,s(this,M,g)),this},t.prototype.removeListener=function(M,g){var b,p,u,y,m;if(o(g),p=this._events,p===void 0)return this;if(b=p[M],b===void 0)return this;if(b===g||b.listener===g)--this._eventsCount===0?this._events=Object.create(null):(delete p[M],p.removeListener&&this.emit("removeListener",M,b.listener||g));else if(typeof b!="function"){for(u=-1,y=b.length-1;y>=0;y--)if(b[y]===g||b[y].listener===g){m=b[y].listener,u=y;break}if(u<0)return this;u===0?b.shift():c(b,u),b.length===1&&(p[M]=b[0]),p.removeListener!==void 0&&this.emit("removeListener",M,m||g)}return this},t.prototype.off=t.prototype.removeListener,t.prototype.removeAllListeners=function(M){var g,b,p;if(b=this._events,b===void 0)return this;if(b.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):b[M]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete b[M]),this;if(arguments.length===0){var u=Object.keys(b),y;for(p=0;p=0;p--)this.removeListener(M,g[p]);return this};function h(A,M,g){var b=A._events;if(b===void 0)return[];var p=b[M];return p===void 0?[]:typeof p=="function"?g?[p.listener||p]:[p]:g?T(p):v(p,p.length)}t.prototype.listeners=function(M){return h(this,M,!0)},t.prototype.rawListeners=function(M){return h(this,M,!1)},t.listenerCount=function(A,M){return typeof A.listenerCount=="function"?A.listenerCount(M):f.call(A,M)},t.prototype.listenerCount=f;function f(A){var M=this._events;if(M!==void 0){var g=M[A];if(typeof g=="function")return 1;if(g!==void 0)return g.length}return 0}t.prototype.eventNames=function(){return this._eventsCount>0?S(this._events):[]};function v(A,M){for(var g=new Array(M),b=0;b{},{passive:!0}),S},triggerHandler:function(S,E,e){var t,r=S._ev;if(!r)return;var o=r._events[E];if(!o)return;function a(i){if(i.listener){if(r.removeListener(E,i.listener),!i.fired)return i.fired=!0,i.listener.apply(r,[e])}else return i.apply(r,[e])}o=Array.isArray(o)?o:[o];var n;for(n=0;nx.queueLength&&(e.undoQueue.queue.shift(),e.undoQueue.index--)},E.startSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!0,e.undoQueue.beginSequence=!0},E.stopSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!1,e.undoQueue.beginSequence=!1},E.undo=function(t){var r,o;if(!(t.undoQueue===void 0||isNaN(t.undoQueue.index)||t.undoQueue.index<=0)){for(t.undoQueue.index--,r=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,o=0;o=t.undoQueue.queue.length)){for(r=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,o=0;o=P.length)return!1;if(L.dimensions===2){if(F++,z.length===F)return L;var U=z[F];if(!w(U))return!1;L=P[O][U]}else L=P[O]}else L=P}}return L}function w(L){return L===Math.round(L)&&L>=0}function A(L){var z,F;z=V.modules[L]._module,F=z.basePlotModule;var N={};N.type=null;var O=o({},x),P=o({},z.attributes);Z.crawl(P,function(X,$,le,ce,de){i(O,de).set(void 0),X===void 0&&i(P,de).set(void 0)}),o(N,O),V.traceIs(L,"noOpacity")&&delete N.opacity,V.traceIs(L,"showLegend")||(delete N.showlegend,delete N.legendgroup),V.traceIs(L,"noHover")&&(delete N.hoverinfo,delete N.hoverlabel),z.selectPoints||delete N.selectedpoints,o(N,P),F.attributes&&o(N,F.attributes),N.type=L;var U={meta:z.meta||{},categories:z.categories||{},animatable:!!z.animatable,type:L,attributes:b(N)};if(z.layoutAttributes){var B={};o(B,z.layoutAttributes),U.layoutAttributes=b(B)}return z.animatable||Z.crawl(U,function(X){Z.isValObject(X)&&"anim"in X&&delete X.anim}),U}function M(){var L={},z,F;o(L,S);for(z in V.subplotsRegistry)if(F=V.subplotsRegistry[z],!!F.layoutAttributes)if(Array.isArray(F.attr))for(var N=0;N=a&&(o._input||{})._templateitemname;i&&(n=a);var s=r+"["+n+"]",h;function f(){h={},i&&(h[s]={},h[s][x]=i)}f();function v(_,w){h[_]=w}function c(_,w){i?V.nestedProperty(h[s],_).set(w):h[s+"."+_]=w}function T(){var _=h;return f(),_}function l(_,w){_&&c(_,w);var A=T();for(var M in A)V.nestedProperty(t,M).set(A[M])}return{modifyBase:v,modifyItem:c,getUpdateObj:T,applyUpdate:l}}}}),lh=He({"src/plots/cartesian/constants.js"(Z,V){"use strict";var d=Jy().counter;V.exports={idRegex:{x:d("x","( domain)?"),y:d("y","( domain)?")},attrRegex:d("[xy]axis"),xAxisMatch:d("xaxis"),yAxisMatch:d("yaxis"),AX_ID_PATTERN:/^[xyz][0-9]*( domain)?$/,AX_NAME_PATTERN:/^[xyz]axis[0-9]*$/,SUBPLOT_PATTERN:/^x([0-9]*)y([0-9]*)$/,HOUR_PATTERN:"hour",WEEKDAY_PATTERN:"day of week",MINDRAG:8,MINZOOM:20,DRAGGERSIZE:20,REDRAWDELAY:50,DFLTRANGEX:[-1,6],DFLTRANGEY:[-1,4],traceLayerClasses:["imagelayer","heatmaplayer","contourcarpetlayer","contourlayer","funnellayer","waterfalllayer","barlayer","carpetlayer","violinlayer","boxlayer","ohlclayer","scattercarpetlayer","scatterlayer"],clipOnAxisFalseQuery:[".scatterlayer",".barlayer",".funnellayer",".waterfalllayer"],layerValue2layerClass:{"above traces":"above","below traces":"below"},zindexSeparator:"z"}}}),ef=He({"src/plots/cartesian/axis_ids.js"(Z){"use strict";var V=lo(),d=lh();Z.id2name=function(E){if(!(typeof E!="string"||!E.match(d.AX_ID_PATTERN))){var e=E.split(" ")[0].slice(1);return e==="1"&&(e=""),E.charAt(0)+"axis"+e}},Z.name2id=function(E){if(E.match(d.AX_NAME_PATTERN)){var e=E.slice(5);return e==="1"&&(e=""),E.charAt(0)+e}},Z.cleanId=function(E,e,t){var r=/( domain)$/.test(E);if(!(typeof E!="string"||!E.match(d.AX_ID_PATTERN))&&!(e&&E.charAt(0)!==e)&&!(r&&!t)){var o=E.split(" ")[0].slice(1).replace(/^0+/,"");return o==="1"&&(o=""),E.charAt(0)+o+(r&&t?" domain":"")}},Z.list=function(S,E,e){var t=S._fullLayout;if(!t)return[];var r=Z.listIds(S,E),o=new Array(r.length),a;for(a=0;at?1:-1:+(S.slice(1)||1)-+(E.slice(1)||1)},Z.ref2id=function(S){return/^[xyz]/.test(S)?S.split(" ")[0]:!1};function x(S,E){if(E&&E.length){for(var e=0;e0?".":"")+i;d.isPlainObject(s)?t(s,o,h,n+1):o(h,i,s)}})}}}),bc=He({"src/plots/plots.js"(Z,V){"use strict";var d=Wn(),x=Xv().timeFormatLocale,S=YA().formatLocale,E=as(),e=KA(),t=lo(),r=e1(),o=zl(),a=sa(),n=Jn(),i=Ws().BADNUM,s=ef(),h=$m().clearOutline,f=_2(),v=A_(),c=n5(),T=Hh().getModuleCalcData,l=a.relinkPrivateKeys,_=a._,w=V.exports={};a.extendFlat(w,t),w.attributes=ru(),w.attributes.type.values=w.allTypes,w.fontAttrs=tc(),w.layoutAttributes=$y();var A=nz();w.executeAPICommand=A.executeAPICommand,w.computeAPICommandBindings=A.computeAPICommandBindings,w.manageCommandObserver=A.manageCommandObserver,w.hasSimpleAPICommandBindings=A.hasSimpleAPICommandBindings,w.redrawText=function(G){return G=a.getGraphDiv(G),new Promise(function(Y){setTimeout(function(){G._fullLayout&&(t.getComponentMethod("annotations","draw")(G),t.getComponentMethod("legend","draw")(G),t.getComponentMethod("colorbar","draw")(G),Y(w.previousPromises(G)))},300)})},w.resize=function(G){G=a.getGraphDiv(G);var Y,ee=new Promise(function(q,se){(!G||a.isHidden(G))&&se(new Error("Resize must be passed a displayed plot div element.")),G._redrawTimer&&clearTimeout(G._redrawTimer),G._resolveResize&&(Y=G._resolveResize),G._resolveResize=q,G._redrawTimer=setTimeout(function(){if(!G.layout||G.layout.width&&G.layout.height||a.isHidden(G)){q(G);return}delete G.layout.width,delete G.layout.height;var ae=G.changed;G.autoplay=!0,t.call("relayout",G,{autosize:!0}).then(function(){G.changed=ae,G._resolveResize===q&&(delete G._resolveResize,q(G))})},100)});return Y&&Y(ee),ee},w.previousPromises=function(G){if((G._promises||[]).length)return Promise.all(G._promises).then(function(){G._promises=[]})},w.addLinks=function(G){if(!(!G._context.showLink&&!G._context.showSources)){var Y=G._fullLayout,ee=a.ensureSingle(Y._paper,"text","js-plot-link-container",function(re){re.style({"font-family":'"Open Sans", Arial, sans-serif',"font-size":"12px",fill:n.defaultLine,"pointer-events":"all"}).each(function(){var pe=d.select(this);pe.append("tspan").classed("js-link-to-tool",!0),pe.append("tspan").classed("js-link-spacer",!0),pe.append("tspan").classed("js-sourcelinks",!0)})}),q=ee.node(),se={y:Y._paper.attr("height")-9};document.body.contains(q)&&q.getComputedTextLength()>=Y.width-20?(se["text-anchor"]="start",se.x=5):(se["text-anchor"]="end",se.x=Y._paper.attr("width")-7),ee.attr(se);var ae=ee.select(".js-link-to-tool"),j=ee.select(".js-link-spacer"),Q=ee.select(".js-sourcelinks");G._context.showSources&&G._context.showSources(G),G._context.showLink&&M(G,ae),j.text(ae.text()&&Q.text()?" - ":"")}};function M(G,Y){Y.text("");var ee=Y.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(G._context.linkText+" \xBB");if(G._context.sendData)ee.on("click",function(){w.sendDataToCloud(G)});else{var q=window.location.pathname.split("/"),se=window.location.search;ee.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+q[2].split(".")[0]+"/"+q[1]+se})}}w.sendDataToCloud=function(G){var Y=(window.PLOTLYENV||{}).BASE_URL||G._context.plotlyServerURL;if(Y){G.emit("plotly_beforeexport");var ee=d.select(G).append("div").attr("id","hiddenform").style("display","none"),q=ee.append("form").attr({action:Y+"/external",method:"post",target:"_blank"}),se=q.append("input").attr({type:"text",name:"data"});return se.node().value=w.graphJson(G,!1,"keepdata"),q.node().submit(),ee.remove(),G.emit("plotly_afterexport"),!1}};var g=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],b=["year","month","dayMonth","dayMonthYear"];w.supplyDefaults=function(G,Y){var ee=Y&&Y.skipUpdateCalc,q=G._fullLayout||{};if(q._skipDefaults){delete q._skipDefaults;return}var se=G._fullLayout={},ae=G.layout||{},j=G._fullData||[],Q=G._fullData=[],re=G.data||[],pe=G.calcdata||[],we=G._context||{},Se;G._transitionData||w.createTransitionData(G),se._dfltTitle={plot:_(G,"Click to enter Plot title"),subtitle:_(G,"Click to enter Plot subtitle"),x:_(G,"Click to enter X axis title"),y:_(G,"Click to enter Y axis title"),colorbar:_(G,"Click to enter Colorscale title"),annotation:_(G,"new text")},se._traceWord=_(G,"trace");var Ie=y(G,g);if(se._mapboxAccessToken=we.mapboxAccessToken,q._initialAutoSizeIsDone){var Re=q.width,We=q.height;w.supplyLayoutGlobalDefaults(ae,se,Ie),ae.width||(se.width=Re),ae.height||(se.height=We),w.sanitizeMargins(se)}else{w.supplyLayoutGlobalDefaults(ae,se,Ie);var at=!ae.width||!ae.height,nt=se.autosize,tt=we.autosizable,qe=at&&(nt||tt);qe?w.plotAutoSize(G,ae,se):at&&w.sanitizeMargins(se),!nt&&at&&(ae.width=se.width,ae.height=se.height)}se._d3locale=m(Ie,se.separators),se._extraFormat=y(G,b),se._initialAutoSizeIsDone=!0,se._dataLength=re.length,se._modules=[],se._visibleModules=[],se._basePlotModules=[];var he=se._subplots=u(),ue=se._splomAxes={x:{},y:{}},ne=se._splomSubplots={};se._splomGridDflt={},se._scatterStackOpts={},se._firstScatter={},se._alignmentOpts={},se._colorAxes={},se._requestRangeslider={},se._traceUids=p(j,re),w.supplyDataDefaults(re,Q,ae,se);var Ce=Object.keys(ue.x),Ye=Object.keys(ue.y);if(Ce.length>1&&Ye.length>1){for(t.getComponentMethod("grid","sizeDefaults")(ae,se),Se=0;Se15&&Ye.length>15&&se.shapes.length===0&&se.images.length===0,w.linkSubplots(Q,se,j,q),w.cleanPlot(Q,se,j,q);var Nt=!!(q._has&&q._has("cartesian")),Gt=!!(se._has&&se._has("cartesian")),Mr=Nt,mr=Gt;Mr&&!mr?q._bgLayer.remove():mr&&!Mr&&(se._shouldCreateBgLayer=!0),q._zoomlayer&&!G._dragging&&h({_fullLayout:q}),R(Q,se),l(se,q),t.getComponentMethod("colorscale","crossTraceDefaults")(Q,se),se._preGUI||(se._preGUI={}),se._tracePreGUI||(se._tracePreGUI={});var qr=se._tracePreGUI,Er={},Ir;for(Ir in qr)Er[Ir]="old";for(Se=0;Se0){var we=1-2*ae;j=Math.round(we*j),Q=Math.round(we*Q)}}var Se=w.layoutAttributes.width.min,Ie=w.layoutAttributes.height.min;j1,We=!ee.height&&Math.abs(q.height-Q)>1;(We||Re)&&(Re&&(q.width=j),We&&(q.height=Q)),Y._initialAutoSize||(Y._initialAutoSize={width:j,height:Q}),w.sanitizeMargins(q)},w.supplyLayoutModuleDefaults=function(G,Y,ee,q){var se=t.componentsRegistry,ae=Y._basePlotModules,j,Q,re,pe=t.subplotsRegistry.cartesian;for(j in se)re=se[j],re.includeBasePlot&&re.includeBasePlot(G,Y);ae.length||ae.push(pe),Y._has("cartesian")&&(t.getComponentMethod("grid","contentDefaults")(G,Y),pe.finalizeSubplots(G,Y));for(var we in Y._subplots)Y._subplots[we].sort(a.subplotSort);for(Q=0;Q1&&(ee.l/=nt,ee.r/=nt)}if(Ie){var tt=(ee.t+ee.b)/Ie;tt>1&&(ee.t/=tt,ee.b/=tt)}var qe=ee.xl!==void 0?ee.xl:ee.x,he=ee.xr!==void 0?ee.xr:ee.x,ue=ee.yt!==void 0?ee.yt:ee.y,ne=ee.yb!==void 0?ee.yb:ee.y;Re[Y]={l:{val:qe,size:ee.l+at},r:{val:he,size:ee.r+at},b:{val:ne,size:ee.b+at},t:{val:ue,size:ee.t+at}},We[Y]=1}if(!q._replotting)return w.doAutoMargin(G)}};function P(G){if("_redrawFromAutoMarginCount"in G._fullLayout)return!1;var Y=s.list(G,"",!0);for(var ee in Y)if(Y[ee].autoshift||Y[ee].shift)return!0;return!1}w.doAutoMargin=function(G){var Y=G._fullLayout,ee=Y.width,q=Y.height;Y._size||(Y._size={}),F(Y);var se=Y._size,ae=Y.margin,j={t:0,b:0,l:0,r:0},Q=a.extendFlat({},se),re=ae.l,pe=ae.r,we=ae.t,Se=ae.b,Ie=Y._pushmargin,Re=Y._pushmarginIds,We=Y.minreducedwidth,at=Y.minreducedheight;if(ae.autoexpand!==!1){for(var nt in Ie)Re[nt]||delete Ie[nt];var tt=G._fullLayout._reservedMargin;for(var qe in tt)for(var he in tt[qe]){var ue=tt[qe][he];j[he]=Math.max(j[he],ue)}Ie.base={l:{val:0,size:re},r:{val:1,size:pe},t:{val:1,size:we},b:{val:0,size:Se}};for(var ne in j){var Ce=0;for(var Ye in Ie)Ye!=="base"&&E(Ie[Ye][ne].size)&&(Ce=Ie[Ye][ne].size>Ce?Ie[Ye][ne].size:Ce);var rt=Math.max(0,ae[ne]-Ce);j[ne]=Math.max(0,j[ne]-rt)}for(var Ke in Ie){var Mt=Ie[Ke].l||{},kt=Ie[Ke].b||{},Nt=Mt.val,Gt=Mt.size,Mr=kt.val,mr=kt.size,qr=ee-j.r-j.l,Er=q-j.t-j.b;for(var Ir in Ie){if(E(Gt)&&Ie[Ir].r){var _t=Ie[Ir].r.val,Oe=Ie[Ir].r.size;if(_t>Nt){var Je=(Gt*_t+(Oe-qr)*Nt)/(_t-Nt),Ae=(Oe*(1-Nt)+(Gt-qr)*(1-_t))/(_t-Nt);Je+Ae>re+pe&&(re=Je,pe=Ae)}}if(E(mr)&&Ie[Ir].t){var Le=Ie[Ir].t.val,Ue=Ie[Ir].t.size;if(Le>Mr){var Ze=(mr*Le+(Ue-Er)*Mr)/(Le-Mr),st=(Ue*(1-Mr)+(mr-Er)*(1-Le))/(Le-Mr);Ze+st>Se+we&&(Se=Ze,we=st)}}}}}var ut=a.constrain(ee-ae.l-ae.r,N,We),Ut=a.constrain(q-ae.t-ae.b,O,at),Ct=Math.max(0,ee-ut),Pt=Math.max(0,q-Ut);if(Ct){var jt=(re+pe)/Ct;jt>1&&(re/=jt,pe/=jt)}if(Pt){var fr=(Se+we)/Pt;fr>1&&(Se/=fr,we/=fr)}if(se.l=Math.round(re)+j.l,se.r=Math.round(pe)+j.r,se.t=Math.round(we)+j.t,se.b=Math.round(Se)+j.b,se.p=Math.round(ae.pad),se.w=Math.round(ee)-se.l-se.r,se.h=Math.round(q)-se.t-se.b,!Y._replotting&&(w.didMarginChange(Q,se)||P(G))){"_redrawFromAutoMarginCount"in Y?Y._redrawFromAutoMarginCount++:Y._redrawFromAutoMarginCount=1;var ur=3*(1+Object.keys(Re).length);if(Y._redrawFromAutoMarginCount1)return!0}return!1},w.graphJson=function(G,Y,ee,q,se,ae){(se&&Y&&!G._fullData||se&&!Y&&!G._fullLayout)&&w.supplyDefaults(G);var j=se?G._fullData:G.data,Q=se?G._fullLayout:G.layout,re=(G._transitionData||{})._frames;function pe(Ie,Re){if(typeof Ie=="function")return Re?"_function_":null;if(a.isPlainObject(Ie)){var We={},at;return Object.keys(Ie).sort().forEach(function(he){if(["_","["].indexOf(he.charAt(0))===-1){if(typeof Ie[he]=="function"){Re&&(We[he]="_function");return}if(ee==="keepdata"){if(he.slice(-3)==="src")return}else if(ee==="keepstream"){if(at=Ie[he+"src"],typeof at=="string"&&at.indexOf(":")>0&&!a.isPlainObject(Ie.stream))return}else if(ee!=="keepall"&&(at=Ie[he+"src"],typeof at=="string"&&at.indexOf(":")>0))return;We[he]=pe(Ie[he],Re)}}),We}var nt=Array.isArray(Ie),tt=a.isTypedArray(Ie);if((nt||tt)&&Ie.dtype&&Ie.shape){var qe=Ie.bdata;return pe({dtype:Ie.dtype,shape:Ie.shape,bdata:a.isArrayBuffer(qe)?e.encode(qe):qe},Re)}return nt?Ie.map(function(he){return pe(he,Re)}):tt?a.simpleMap(Ie,a.identity):a.isJSDate(Ie)?a.ms2DateTimeLocal(+Ie):Ie}var we={data:(j||[]).map(function(Ie){var Re=pe(Ie);return Y&&delete Re.fit,Re})};if(!Y&&(we.layout=pe(Q),se)){var Se=Q._size;we.layout.computed={margin:{b:Se.b,l:Se.l,r:Se.r,t:Se.t}}}return re&&(we.frames=pe(re)),ae&&(we.config=pe(G._context,!0)),q==="object"?we:JSON.stringify(we)},w.modifyFrames=function(G,Y){var ee,q,se,ae=G._transitionData._frames,j=G._transitionData._frameHash;for(ee=0;ee0&&(G._transitioningWithDuration=!0),G._transitionData._interruptCallbacks.push(function(){q=!0}),ee.redraw&&G._transitionData._interruptCallbacks.push(function(){return t.call("redraw",G)}),G._transitionData._interruptCallbacks.push(function(){G.emit("plotly_transitioninterrupted",[])});var Ie=0,Re=0;function We(){return Ie++,function(){Re++,!q&&Re===Ie&&Q(Se)}}ee.runFn(We),setTimeout(We())})}function Q(Se){if(G._transitionData)return ae(G._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(ee.redraw)return t.call("redraw",G)}).then(function(){G._transitioning=!1,G._transitioningWithDuration=!1,G.emit("plotly_transitioned",[])}).then(Se)}function re(){if(G._transitionData)return G._transitioning=!1,se(G._transitionData._interruptCallbacks)}var pe=[w.previousPromises,re,ee.prepareFn,w.rehover,w.reselect,j],we=a.syncOrAsync(pe,G);return(!we||!we.then)&&(we=Promise.resolve()),we.then(function(){return G})}w.doCalcdata=function(G,Y){var ee=s.list(G),q=G._fullData,se=G._fullLayout,ae,j,Q,re,pe=new Array(q.length),we=(G.calcdata||[]).slice();for(G.calcdata=pe,se._numBoxes=0,se._numViolins=0,se._violinScaleGroupStats={},G._hmpixcount=0,G._hmlumcount=0,se._piecolormap={},se._sunburstcolormap={},se._treemapcolormap={},se._iciclecolormap={},se._funnelareacolormap={},Q=0;Q=0;re--)if(ne[re].enabled){ae._indexToPoints=ne[re]._indexToPoints;break}j&&j.calc&&(ue=j.calc(G,ae))}(!Array.isArray(ue)||!ue[0])&&(ue=[{x:i,y:i}]),ue[0].t||(ue[0].t={}),ue[0].trace=ae,pe[qe]=ue}}for(ce(ee,q,se),Q=0;QQ||Re>re)&&(ae.style("overflow","hidden"),Se=ae.node().getBoundingClientRect(),Ie=Se.width,Re=Se.height);var We=+O.attr("x"),at=+O.attr("y"),nt=G||O.node().getBoundingClientRect().height,tt=-nt/4;if(le[0]==="y")j.attr({transform:"rotate("+[-90,We,at]+")"+x(-Ie/2,tt-Re/2)});else if(le[0]==="l")at=tt-Re/2;else if(le[0]==="a"&&le.indexOf("atitle")!==0)We=0,at=tt;else{var qe=O.attr("text-anchor");We=We-Ie*(qe==="middle"?.5:qe==="end"?1:0),at=at+tt-Re/2}ae.attr({x:We,y:at}),U&&U.call(O,j),de(j)})})):ce(),O};var t=/(<|<|<)/g,r=/(>|>|>)/g;function o(O){return O.replace(t,"\\lt ").replace(r,"\\gt ")}var a=[["$","$"],["\\(","\\)"]];function n(O,P,U){var B=parseInt((MathJax.version||"").split(".")[0]);if(B!==2&&B!==3){d.warn("No MathJax version:",MathJax.version);return}var X,$,le,ce,de=function(){return $=d.extendDeepAll({},MathJax.Hub.config),le=MathJax.Hub.processSectionDelay,MathJax.Hub.processSectionDelay!==void 0&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:a},displayAlign:"left"})},G=function(){$=d.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=a},Y=function(){if(X=MathJax.Hub.config.menuSettings.renderer,X!=="SVG")return MathJax.Hub.setRenderer("SVG")},ee=function(){X=MathJax.config.startup.output,X!=="svg"&&(MathJax.config.startup.output="svg")},q=function(){var pe="math-output-"+d.randstr({},64);ce=V.select("body").append("div").attr({id:pe}).style({visibility:"hidden",position:"absolute","font-size":P.fontSize+"px"}).text(o(O));var we=ce.node();return B===2?MathJax.Hub.Typeset(we):MathJax.typeset([we])},se=function(){var pe=ce.select(B===2?".MathJax_SVG":".MathJax"),we=!pe.empty()&&ce.select("svg").node();if(!we)d.log("There was an error in the tex syntax.",O),U();else{var Se=we.getBoundingClientRect(),Ie;B===2?Ie=V.select("body").select("#MathJax_SVG_glyphs"):Ie=pe.select("defs"),U(pe,Ie,Se)}ce.remove()},ae=function(){if(X!=="SVG")return MathJax.Hub.setRenderer(X)},j=function(){X!=="svg"&&(MathJax.config.startup.output=X)},Q=function(){return le!==void 0&&(MathJax.Hub.processSectionDelay=le),MathJax.Hub.Config($)},re=function(){MathJax.config=$};B===2?MathJax.Hub.Queue(de,Y,q,se,ae,Q):B===3&&(G(),ee(),MathJax.startup.defaultReady(),MathJax.startup.promise.then(function(){q(),se(),j(),re()}))}var i={sup:"font-size:70%",sub:"font-size:70%",s:"text-decoration:line-through",u:"text-decoration:underline",b:"font-weight:bold",i:"font-style:italic",a:"cursor:pointer",span:"",em:"font-style:italic;font-weight:bold"},s={sub:"0.3em",sup:"-0.6em"},h={sub:"-0.21em",sup:"0.42em"},f="\u200B",v=["http:","https:","mailto:","",void 0,":"],c=Z.NEWLINES=/(\r\n?|\n)/g,T=/(<[^<>]*>)/,l=/<(\/?)([^ >]*)(\s+(.*))?>/i,_=//i;Z.BR_TAG_ALL=//gi;var w=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,A=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,M=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,g=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function b(O,P){if(!O)return null;var U=O.match(P),B=U&&(U[3]||U[4]);return B&&m(B)}var p=/(^|;)\s*color:/;Z.plainText=function(O,P){P=P||{};for(var U=P.len!==void 0&&P.len!==-1?P.len:1/0,B=P.allowedTags!==void 0?P.allowedTags:["br"],X="...",$=X.length,le=O.split(T),ce=[],de="",G=0,Y=0;Y$?ce.push(ee.slice(0,Math.max(0,j-$))+X):ce.push(ee.slice(0,j));break}de=""}}return ce.join("")};var u={mu:"\u03BC",amp:"&",lt:"<",gt:">",nbsp:"\xA0",times:"\xD7",plusmn:"\xB1",deg:"\xB0"},y=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function m(O){return O.replace(y,function(P,U){var B;return U.charAt(0)==="#"?B=R(U.charAt(1)==="x"?parseInt(U.slice(2),16):parseInt(U.slice(1),10)):B=u[U],B||P})}Z.convertEntities=m;function R(O){if(!(O>1114111)){var P=String.fromCodePoint;if(P)return P(O);var U=String.fromCharCode;return O<=65535?U(O):U((O>>10)+55232,O%1024+56320)}}function L(O,P){P=P.replace(c," ");var U=!1,B=[],X,$=-1;function le(){$++;var Re=document.createElementNS(S.svg,"tspan");V.select(Re).attr({class:"line",dy:$*E+"em"}),O.appendChild(Re),X=Re;var We=B;if(B=[{node:Re}],We.length>1)for(var at=1;at.",P);return}var We=B.pop();Re!==We.type&&d.log("Start tag <"+We.type+"> doesnt match end tag <"+Re+">. Pretending it did match.",P),X=B[B.length-1].node}var Y=_.test(P);Y?le():(X=O,B=[{node:O}]);for(var ee=P.split(T),q=0;q=0;_--,w++){var A=c[_];l[w]=[1-A[0],A[1]]}return l}function h(c,T){T=T||{};for(var l=c.domain,_=c.range,w=_.length,A=new Array(w),M=0;Mc-f?f=c-(v-c):v-c=0?_=o.colorscale.sequential:_=o.colorscale.sequentialminus,s._sync("colorscale",_)}}}}),rc=He({"src/components/colorscale/index.js"(Z,V){"use strict";var d=W0(),x=wp();V.exports={moduleType:"component",name:"colorscale",attributes:ku(),layoutAttributes:o5(),supplyLayoutDefaults:oz(),handleDefaults:_h(),crossTraceDefaults:sz(),calc:Tp(),scales:d.scales,defaultScale:d.defaultScale,getScale:d.get,isValidScale:d.isValid,hasColorscale:x.hasColorscale,extractOpts:x.extractOpts,extractScale:x.extractScale,flipScale:x.flipScale,makeColorScaleFunc:x.makeColorScaleFunc,makeColorScaleFuncFromTrace:x.makeColorScaleFuncFromTrace}}}),Fu=He({"src/traces/scatter/subtypes.js"(Z,V){"use strict";var d=sa(),x=bp().isTypedArraySpec;V.exports={hasLines:function(S){return S.visible&&S.mode&&S.mode.indexOf("lines")!==-1},hasMarkers:function(S){return S.visible&&(S.mode&&S.mode.indexOf("markers")!==-1||S.type==="splom")},hasText:function(S){return S.visible&&S.mode&&S.mode.indexOf("text")!==-1},isBubble:function(S){var E=S.marker;return d.isPlainObject(E)&&(d.isArrayOrTypedArray(E.size)||x(E.size))}}}}),r1=He({"src/traces/scatter/make_bubble_size_func.js"(Z,V){"use strict";var d=as();V.exports=function(S,E){E||(E=2);var e=S.marker,t=e.sizeref||1,r=e.sizemin||0,o=e.sizemode==="area"?function(a){return Math.sqrt(a/t)}:function(a){return a/t};return function(a){var n=o(a/E);return d(n)&&n>0?Math.max(n,r):0}}}}),$p=He({"src/components/fx/helpers.js"(Z){"use strict";var V=sa();Z.getSubplot=function(t){return t.subplot||t.xaxis+t.yaxis||t.geo},Z.isTraceInSubplots=function(t,r){if(t.type==="splom"){for(var o=t.xaxes||[],a=t.yaxes||[],n=0;n=0&&o.index2&&(r.push([a].concat(n.splice(0,2))),i="l",a=a=="m"?"l":"L");;){if(n.length==d[i])return n.unshift(a),r.push(n);if(n.length0&&(ue=100,he=he.replace("-open","")),he.indexOf("-dot")>0&&(ue+=200,he=he.replace("-dot","")),he=l.symbolNames.indexOf(he),he>=0&&(he+=ue)}return he%100>=p||he>=400?0:Math.floor(Math.max(he,0))};function y(he,ue,ne,Ce){var Ye=he%100;return l.symbolFuncs[Ye](ue,ne,Ce)+(he>=200?u:"")}var m=S("~f"),R={radial:{type:"radial"},radialreversed:{type:"radial",reversed:!0},horizontal:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0}},horizontalreversed:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0},reversed:!0},vertical:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0}},verticalreversed:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0},reversed:!0}};l.gradient=function(he,ue,ne,Ce,Ye,rt){var Ke=R[Ce];return L(he,ue,ne,Ke.type,Ye,rt,Ke.start,Ke.stop,!1,Ke.reversed)};function L(he,ue,ne,Ce,Ye,rt,Ke,Mt,kt,Nt){var Gt=Ye.length,Mr;Ce==="linear"?Mr={node:"linearGradient",attrs:{x1:Ke.x,y1:Ke.y,x2:Mt.x,y2:Mt.y,gradientUnits:kt?"userSpaceOnUse":"objectBoundingBox"},reversed:Nt}:Ce==="radial"&&(Mr={node:"radialGradient",reversed:Nt});for(var mr=new Array(Gt),qr=0;qr=0&&he.i===void 0&&(he.i=rt.i),ue.style("opacity",Ce.selectedOpacityFn?Ce.selectedOpacityFn(he):he.mo===void 0?Ke.opacity:he.mo),Ce.ms2mrc){var kt;he.ms==="various"||Ke.size==="various"?kt=3:kt=Ce.ms2mrc(he.ms),he.mrc=kt,Ce.selectedSizeFn&&(kt=he.mrc=Ce.selectedSizeFn(he));var Nt=l.symbolNumber(he.mx||Ke.symbol)||0;he.om=Nt%200>=100;var Gt=qe(he,ne),Mr=Q(he,ne);ue.attr("d",y(Nt,kt,Gt,Mr))}var mr=!1,qr,Er,Ir;if(he.so)Ir=Mt.outlierwidth,Er=Mt.outliercolor,qr=Ke.outliercolor;else{var _t=(Mt||{}).width;Ir=(he.mlw+1||_t+1||(he.trace?(he.trace.marker.line||{}).width:0)+1)-1||0,"mlc"in he?Er=he.mlcc=Ce.lineScale(he.mlc):x.isArrayOrTypedArray(Mt.color)?Er=r.defaultLine:Er=Mt.color,x.isArrayOrTypedArray(Ke.color)&&(qr=r.defaultLine,mr=!0),"mc"in he?qr=he.mcc=Ce.markerScale(he.mc):qr=Ke.color||Ke.colors||"rgba(0,0,0,0)",Ce.selectedColorFn&&(qr=Ce.selectedColorFn(he))}let Oe=he.mld||(Mt||{}).dash;if(Oe&&l.dashLine(ue,Oe,Ir),he.om)ue.call(r.stroke,qr).style({"stroke-width":(Ir||1)+"px",fill:"none"});else{ue.style("stroke-width",(he.isBlank?0:Ir)+"px");var Je=Ke.gradient,Ae=he.mgt;Ae?mr=!0:Ae=Je&&Je.type,x.isArrayOrTypedArray(Ae)&&(Ae=Ae[0],R[Ae]||(Ae=0));var Le=Ke.pattern,Ue=l.getPatternAttr,Ze=Le&&(Ue(Le.shape,he.i,"")||Ue(Le.path,he.i,""));if(Ae&&Ae!=="none"){var st=he.mgc;st?mr=!0:st=Je.color;var ut=ne.uid;mr&&(ut+="-"+he.i),l.gradient(ue,Ye,ut,Ae,[[0,st],[1,qr]],"fill")}else if(Ze){var Ut=!1,Ct=Le.fgcolor;!Ct&&rt&&rt.color&&(Ct=rt.color,Ut=!0);var Pt=Ue(Ct,he.i,rt&&rt.color||null),jt=Ue(Le.bgcolor,he.i,null),fr=Le.fgopacity,ur=Ue(Le.size,he.i,8),sr=Ue(Le.solidity,he.i,.3);Ut=Ut||he.mcc||x.isArrayOrTypedArray(Le.shape)||x.isArrayOrTypedArray(Le.path)||x.isArrayOrTypedArray(Le.bgcolor)||x.isArrayOrTypedArray(Le.fgcolor)||x.isArrayOrTypedArray(Le.size)||x.isArrayOrTypedArray(Le.solidity);var Pr=ne.uid;Ut&&(Pr+="-"+he.i),l.pattern(ue,"point",Ye,Pr,Ze,ur,sr,he.mcc,Le.fillmode,jt,Pt,fr)}else x.isArrayOrTypedArray(qr)?r.fill(ue,qr[he.i]):r.fill(ue,qr);Ir&&r.stroke(ue,Er)}},l.makePointStyleFns=function(he){var ue={},ne=he.marker;return ue.markerScale=l.tryColorscale(ne,""),ue.lineScale=l.tryColorscale(ne,"line"),t.traceIs(he,"symbols")&&(ue.ms2mrc=v.isBubble(he)?c(he):function(){return(ne.size||6)/2}),he.selectedpoints&&x.extendFlat(ue,l.makeSelectedPointStyleFns(he)),ue},l.makeSelectedPointStyleFns=function(he){var ue={},ne=he.selected||{},Ce=he.unselected||{},Ye=he.marker||{},rt=ne.marker||{},Ke=Ce.marker||{},Mt=Ye.opacity,kt=rt.opacity,Nt=Ke.opacity,Gt=kt!==void 0,Mr=Nt!==void 0;(x.isArrayOrTypedArray(Mt)||Gt||Mr)&&(ue.selectedOpacityFn=function(Le){var Ue=Le.mo===void 0?Ye.opacity:Le.mo;return Le.selected?Gt?kt:Ue:Mr?Nt:f*Ue});var mr=Ye.color,qr=rt.color,Er=Ke.color;(qr||Er)&&(ue.selectedColorFn=function(Le){var Ue=Le.mcc||mr;return Le.selected?qr||Ue:Er||Ue});var Ir=Ye.size,_t=rt.size,Oe=Ke.size,Je=_t!==void 0,Ae=Oe!==void 0;return t.traceIs(he,"symbols")&&(Je||Ae)&&(ue.selectedSizeFn=function(Le){var Ue=Le.mrc||Ir/2;return Le.selected?Je?_t/2:Ue:Ae?Oe/2:Ue}),ue},l.makeSelectedTextStyleFns=function(he){var ue={},ne=he.selected||{},Ce=he.unselected||{},Ye=he.textfont||{},rt=ne.textfont||{},Ke=Ce.textfont||{},Mt=Ye.color,kt=rt.color,Nt=Ke.color;return ue.selectedTextColorFn=function(Gt){var Mr=Gt.tc||Mt;return Gt.selected?kt||Mr:Nt||(kt?Mr:r.addOpacity(Mr,f))},ue},l.selectedPointStyle=function(he,ue){if(!(!he.size()||!ue.selectedpoints)){var ne=l.makeSelectedPointStyleFns(ue),Ce=ue.marker||{},Ye=[];ne.selectedOpacityFn&&Ye.push(function(rt,Ke){rt.style("opacity",ne.selectedOpacityFn(Ke))}),ne.selectedColorFn&&Ye.push(function(rt,Ke){r.fill(rt,ne.selectedColorFn(Ke))}),ne.selectedSizeFn&&Ye.push(function(rt,Ke){var Mt=Ke.mx||Ce.symbol||0,kt=ne.selectedSizeFn(Ke);rt.attr("d",y(l.symbolNumber(Mt),kt,qe(Ke,ue),Q(Ke,ue))),Ke.mrc2=kt}),Ye.length&&he.each(function(rt){for(var Ke=d.select(this),Mt=0;Mt0?ne:0}l.textPointStyle=function(he,ue,ne){if(he.size()){var Ce;if(ue.selectedpoints){var Ye=l.makeSelectedTextStyleFns(ue);Ce=Ye.selectedTextColorFn}var rt=ue.texttemplate,Ke=ne._fullLayout;he.each(function(Mt){var kt=d.select(this),Nt=rt?x.extractOption(Mt,ue,"txt","texttemplate"):x.extractOption(Mt,ue,"tx","text");if(!Nt&&Nt!==0){kt.remove();return}if(rt){var Gt=ue._module.formatLabels,Mr=Gt?Gt(Mt,ue,Ke):{},mr={};T(mr,ue,Mt.i),Nt=x.texttemplateString({data:[mr,Mt,ue._meta],fallback:ue.texttemplatefallback,labels:Mr,locale:Ke._d3locale,template:Nt})}var qr=Mt.tp||ue.textposition,Er=N(Mt,ue),Ir=Ce?Ce(Mt):Mt.tc||ue.textfont.color;kt.call(l.font,{family:Mt.tf||ue.textfont.family,weight:Mt.tw||ue.textfont.weight,style:Mt.ty||ue.textfont.style,variant:Mt.tv||ue.textfont.variant,textcase:Mt.tC||ue.textfont.textcase,lineposition:Mt.tE||ue.textfont.lineposition,shadow:Mt.tS||ue.textfont.shadow,size:Er,color:Ir}).text(Nt).call(n.convertToTspans,ne).call(F,qr,Er,Mt.mrc)})}},l.selectedTextStyle=function(he,ue){if(!(!he.size()||!ue.selectedpoints)){var ne=l.makeSelectedTextStyleFns(ue);he.each(function(Ce){var Ye=d.select(this),rt=ne.selectedTextColorFn(Ce),Ke=Ce.tp||ue.textposition,Mt=N(Ce,ue);r.fill(Ye,rt);var kt=t.traceIs(ue,"bar-like");F(Ye,Ke,Mt,Ce.mrc2||Ce.mrc,kt)})}};var O=.5;l.smoothopen=function(he,ue){if(he.length<3)return"M"+he.join("L");var ne="M"+he[0],Ce=[],Ye;for(Ye=1;Ye=kt||Le>=Gt&&Le<=kt)&&(Ue<=Mr&&Ue>=Nt||Ue>=Mr&&Ue<=Nt)&&(he=[Le,Ue])}return he}l.applyBackoff=G,l.makeTester=function(){var he=x.ensureSingleById(d.select("body"),"svg","js-plotly-tester",function(ne){ne.attr(i.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})}),ue=x.ensureSingle(he,"path","js-reference-point",function(ne){ne.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})});l.tester=he,l.testref=ue},l.savedBBoxes={};var Y=0,ee=1e4;l.bBox=function(he,ue,ne){ne||(ne=q(he));var Ce;if(ne){if(Ce=l.savedBBoxes[ne],Ce)return x.extendFlat({},Ce)}else if(he.childNodes.length===1){var Ye=he.childNodes[0];if(ne=q(Ye),ne){var rt=+Ye.getAttribute("x")||0,Ke=+Ye.getAttribute("y")||0,Mt=Ye.getAttribute("transform");if(!Mt){var kt=l.bBox(Ye,!1,ne);return rt&&(kt.left+=rt,kt.right+=rt),Ke&&(kt.top+=Ke,kt.bottom+=Ke),kt}if(ne+="~"+rt+"~"+Ke+"~"+Mt,Ce=l.savedBBoxes[ne],Ce)return x.extendFlat({},Ce)}}var Nt,Gt;ue?Nt=he:(Gt=l.tester.node(),Nt=he.cloneNode(!0),Gt.appendChild(Nt)),d.select(Nt).attr("transform",null).call(n.positionText,0,0);var Mr=Nt.getBoundingClientRect(),mr=l.testref.node().getBoundingClientRect();ue||Gt.removeChild(Nt);var qr={height:Mr.height,width:Mr.width,left:Mr.left-mr.left,top:Mr.top-mr.top,right:Mr.right-mr.left,bottom:Mr.bottom-mr.top};return Y>=ee&&(l.savedBBoxes={},Y=0),ne&&(l.savedBBoxes[ne]=qr),Y++,x.extendFlat({},qr)};function q(he){var ue=he.getAttribute("data-unformatted");if(ue!==null)return ue+he.getAttribute("data-math")+he.getAttribute("text-anchor")+he.getAttribute("style")}l.setClipUrl=function(he,ue,ne){he.attr("clip-path",se(ue,ne))};function se(he,ue){if(!he)return null;var ne=ue._context,Ce=ne._exportedPlot?"":ne._baseUrl||"";return Ce?"url('"+Ce+"#"+he+"')":"url(#"+he+")"}l.getTranslate=function(he){var ue=/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,ne=he.attr?"attr":"getAttribute",Ce=he[ne]("transform")||"",Ye=Ce.replace(ue,function(rt,Ke,Mt){return[Ke,Mt].join(" ")}).split(" ");return{x:+Ye[0]||0,y:+Ye[1]||0}},l.setTranslate=function(he,ue,ne){var Ce=/(\btranslate\(.*?\);?)/,Ye=he.attr?"attr":"getAttribute",rt=he.attr?"attr":"setAttribute",Ke=he[Ye]("transform")||"";return ue=ue||0,ne=ne||0,Ke=Ke.replace(Ce,"").trim(),Ke+=a(ue,ne),Ke=Ke.trim(),he[rt]("transform",Ke),Ke},l.getScale=function(he){var ue=/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,ne=he.attr?"attr":"getAttribute",Ce=he[ne]("transform")||"",Ye=Ce.replace(ue,function(rt,Ke,Mt){return[Ke,Mt].join(" ")}).split(" ");return{x:+Ye[0]||1,y:+Ye[1]||1}},l.setScale=function(he,ue,ne){var Ce=/(\bscale\(.*?\);?)/,Ye=he.attr?"attr":"getAttribute",rt=he.attr?"attr":"setAttribute",Ke=he[Ye]("transform")||"";return ue=ue||1,ne=ne||1,Ke=Ke.replace(Ce,"").trim(),Ke+="scale("+ue+","+ne+")",Ke=Ke.trim(),he[rt]("transform",Ke),Ke};var ae=/\s*sc.*/;l.setPointGroupScale=function(he,ue,ne){if(ue=ue||1,ne=ne||1,!!he){var Ce=ue===1&&ne===1?"":"scale("+ue+","+ne+")";he.each(function(){var Ye=(this.getAttribute("transform")||"").replace(ae,"");Ye+=Ce,Ye=Ye.trim(),this.setAttribute("transform",Ye)})}};var j=/translate\([^)]*\)\s*$/;l.setTextPointsScale=function(he,ue,ne){he&&he.each(function(){var Ce,Ye=d.select(this),rt=Ye.select("text");if(rt.node()){var Ke=parseFloat(rt.attr("x")||0),Mt=parseFloat(rt.attr("y")||0),kt=(Ye.attr("transform")||"").match(j);ue===1&&ne===1?Ce=[]:Ce=[a(Ke,Mt),"scale("+ue+","+ne+")",a(-Ke,-Mt)],kt&&Ce.push(kt),Ye.attr("transform",Ce.join(""))}})};function Q(he,ue){var ne;return he&&(ne=he.mf),ne===void 0&&(ne=ue.marker&&ue.marker.standoff||0),!ue._geo&&!ue._xA?-ne:ne}l.getMarkerStandoff=Q;var re=Math.atan2,pe=Math.cos,we=Math.sin;function Se(he,ue){var ne=ue[0],Ce=ue[1];return[ne*pe(he)-Ce*we(he),ne*we(he)+Ce*pe(he)]}var Ie,Re,We,at,nt,tt;function qe(he,ue){var ne=he.ma;ne===void 0&&(ne=ue.marker.angle,(!ne||x.isArrayOrTypedArray(ne))&&(ne=0));var Ce,Ye,rt=ue.marker.angleref;if(rt==="previous"||rt==="north"){if(ue._geo){var Ke=ue._geo.project(he.lonlat);Ce=Ke[0],Ye=Ke[1]}else{var Mt=ue._xA,kt=ue._yA;if(Mt&&kt)Ce=Mt.c2p(he.x),Ye=kt.c2p(he.y);else return 90}if(ue._geo){var Nt=he.lonlat[0],Gt=he.lonlat[1],Mr=ue._geo.project([Nt,Gt+1e-5]),mr=ue._geo.project([Nt+1e-5,Gt]),qr=re(mr[1]-Ye,mr[0]-Ce),Er=re(Mr[1]-Ye,Mr[0]-Ce),Ir;if(rt==="north")Ir=ne/180*Math.PI;else if(rt==="previous"){var _t=Nt/180*Math.PI,Oe=Gt/180*Math.PI,Je=Ie/180*Math.PI,Ae=Re/180*Math.PI,Le=Je-_t,Ue=pe(Ae)*we(Le),Ze=we(Ae)*pe(Oe)-pe(Ae)*we(Oe)*pe(Le);Ir=-re(Ue,Ze)-Math.PI,Ie=Nt,Re=Gt}var st=Se(qr,[pe(Ir),0]),ut=Se(Er,[we(Ir),0]);ne=re(st[1]+ut[1],st[0]+ut[0])/Math.PI*180,rt==="previous"&&!(tt===ue.uid&&he.i===nt+1)&&(ne=null)}if(rt==="previous"&&!ue._geo)if(tt===ue.uid&&he.i===nt+1&&E(Ce)&&E(Ye)){var Ut=Ce-We,Ct=Ye-at,Pt=ue.line&&ue.line.shape||"",jt=Pt.slice(Pt.length-1);jt==="h"&&(Ct=0),jt==="v"&&(Ut=0),ne+=re(Ct,Ut)/Math.PI*180+90}else ne=null}return We=Ce,at=Ye,nt=he.i,tt=ue.uid,ne}l.getMarkerAngle=qe}}),K0=He({"src/components/titles/index.js"(Z,V){"use strict";var d=Wn(),x=as(),S=bc(),E=lo(),e=sa(),t=e.strTranslate,r=es(),o=Jn(),a=ou(),n=Ym(),i=uh().OPPOSITE_SIDE,s=/ [XY][0-9]* /,h=1.6,f=1.6;function v(c,T,l){var _=c._fullLayout,w=l.propContainer,A=l.propName,M=l.placeholder,g=l.traceIndex,b=l.avoid||{},p=l.attributes,u=l.transform,y=l.containerGroup,m=1,R=w.title,L=(R&&R.text?R.text:"").trim(),z=!1,F=R&&R.font?R.font:{},N=F.family,O=F.size,P=F.color,U=F.weight,B=F.style,X=F.variant,$=F.textcase,le=F.lineposition,ce=F.shadow,de=l.subtitlePropName,G=!!de,Y=l.subtitlePlaceholder,ee=(w.title||{}).subtitle||{text:"",font:{}},q=(ee.text||"").trim(),se=!1,ae=1,j=ee.font,Q=j.family,re=j.size,pe=j.color,we=j.weight,Se=j.style,Ie=j.variant,Re=j.textcase,We=j.lineposition,at=j.shadow,nt;A==="title.text"?nt="titleText":A.indexOf("axis")!==-1?nt="axisTitleText":A.indexOf("colorbar")!==-1&&(nt="colorbarTitleText");var tt=c._context.edits[nt];function qe(mr,qr){return mr===void 0||qr===void 0?!1:mr.replace(s," % ")===qr.replace(s," % ")}L===""?m=0:qe(L,M)&&(tt||(L=""),m=.2,z=!0),G&&(q===""?ae=0:qe(q,Y)&&(tt||(q=""),ae=.2,se=!0)),l._meta?L=e.templateString(L,l._meta):_._meta&&(L=e.templateString(L,_._meta));var he=L||q||tt,ue;y||(y=e.ensureSingle(_._infolayer,"g","g-"+T),ue=_._hColorbarMoveTitle);var ne=y.selectAll("text."+T).data(he?[0]:[]);ne.enter().append("text"),ne.text(L).attr("class",T),ne.exit().remove();var Ce=null,Ye=T+"-subtitle",rt=q||tt;if(G&&(Ce=y.selectAll("text."+Ye).data(rt?[0]:[]),Ce.enter().append("text"),Ce.text(q).attr("class",Ye),Ce.exit().remove()),!he)return y;function Ke(mr,qr){e.syncOrAsync([Mt,kt],{title:mr,subtitle:qr})}function Mt(mr){var qr=mr.title,Er=mr.subtitle,Ir;!u&&ue&&(u={}),u?(Ir="",u.rotate&&(Ir+="rotate("+[u.rotate,p.x,p.y]+")"),(u.offset||ue)&&(Ir+=t(0,(u.offset||0)-(ue||0)))):Ir=null,qr.attr("transform",Ir);function _t(Ze){if(Ze){var st=d.select(Ze.node().parentNode).select("."+Ye);if(!st.empty()){var ut=Ze.node().getBBox();if(ut.height){var Ut=ut.y+ut.height+h*re;st.attr("y",Ut)}}}}if(qr.style("opacity",m*o.opacity(P)).call(r.font,{color:o.rgb(P),size:d.round(O,2),family:N,weight:U,style:B,variant:X,textcase:$,shadow:ce,lineposition:le}).attr(p).call(a.convertToTspans,c,_t),Er&&!Er.empty()){var Oe=y.select("."+T+"-math-group"),Je=qr.node().getBBox(),Ae=Oe.node()?Oe.node().getBBox():void 0,Le=Ae?Ae.y+Ae.height+h*re:Je.y+Je.height+f*re,Ue=e.extendFlat({},p,{y:Le});Er.attr("transform",Ir),Er.style("opacity",ae*o.opacity(pe)).call(r.font,{color:o.rgb(pe),size:d.round(re,2),family:Q,weight:we,style:Se,variant:Ie,textcase:Re,shadow:at,lineposition:We}).attr(Ue).call(a.convertToTspans,c)}return S.previousPromises(c)}function kt(mr){var qr=mr.title,Er=d.select(qr.node().parentNode);if(b&&b.selection&&b.side&&L){Er.attr("transform",null);var Ir=i[b.side],_t=b.side==="left"||b.side==="top"?-1:1,Oe=x(b.pad)?b.pad:2,Je=r.bBox(Er.node()),Ae={t:0,b:0,l:0,r:0},Le=c._fullLayout._reservedMargin;for(var Ue in Le)for(var Ze in Le[Ue]){var st=Le[Ue][Ze];Ae[Ze]=Math.max(Ae[Ze],st)}var ut={left:Ae.l,top:Ae.t,right:_.width-Ae.r,bottom:_.height-Ae.b},Ut=b.maxShift||_t*(ut[b.side]-Je[b.side]),Ct=0;if(Ut<0)Ct=Ut;else{var Pt=b.offsetLeft||0,jt=b.offsetTop||0;Je.left-=Pt,Je.right-=Pt,Je.top-=jt,Je.bottom-=jt,b.selection.each(function(){var ur=r.bBox(this);e.bBoxIntersect(Je,ur,Oe)&&(Ct=Math.max(Ct,_t*(ur[b.side]-Je[Ir])+Oe))}),Ct=Math.min(Ut,Ct),w._titleScoot=Math.abs(Ct)}if(Ct>0||Ut<0){var fr={left:[-Ct,0],right:[Ct,0],top:[0,-Ct],bottom:[0,Ct]}[b.side];Er.attr("transform",t(fr[0],fr[1]))}}}ne.call(Ke,Ce);function Nt(mr,qr){mr.text(qr).on("mouseover.opacity",function(){d.select(this).transition().duration(n.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){d.select(this).transition().duration(n.HIDE_PLACEHOLDER).style("opacity",0)})}if(tt&&(L?ne.on(".opacity",null):(Nt(ne,M),z=!0),ne.call(a.makeEditable,{gd:c}).on("edit",function(mr){g!==void 0?E.call("_guiRestyle",c,A,mr,g):E.call("_guiRelayout",c,A,mr)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(Ke)}).on("input",function(mr){this.text(mr||" ").call(a.positionText,p.x,p.y)}),G)){if(G&&!L){var Gt=ne.node().getBBox(),Mr=Gt.y+Gt.height+f*re;Ce.attr("y",Mr)}q?Ce.on(".opacity",null):(Nt(Ce,Y),se=!0),Ce.call(a.makeEditable,{gd:c}).on("edit",function(mr){E.call("_guiRelayout",c,"title.subtitle.text",mr)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(Ke)}).on("input",function(mr){this.text(mr||" ").call(a.positionText,Ce.attr("x"),Ce.attr("y"))})}return ne.classed("js-placeholder",z),Ce&&!Ce.empty()&&Ce.classed("js-placeholder",se),y}V.exports={draw:v,SUBTITLE_PADDING_EM:f,SUBTITLE_PADDING_MATHJAX_EM:h}}}),wv=He({"src/plots/cartesian/set_convert.js"(Z,V){"use strict";var d=Wn(),x=Xv().utcFormat,S=sa(),E=S.numberFormat,e=as(),t=S.cleanNumber,r=S.ms2DateTime,o=S.dateTime2ms,a=S.ensureNumber,n=S.isArrayOrTypedArray,i=Ws(),s=i.FP_SAFE,h=i.BADNUM,f=i.LOG_CLIP,v=i.ONEWEEK,c=i.ONEDAY,T=i.ONEHOUR,l=i.ONEMIN,_=i.ONESEC,w=ef(),A=lh(),M=A.HOUR_PATTERN,g=A.WEEKDAY_PATTERN;function b(u){return Math.pow(10,u)}function p(u){return u!=null}V.exports=function(y,m){m=m||{};var R=y._id||"x",L=R.charAt(0);function z(q,se){if(q>0)return Math.log(q)/Math.LN10;if(q<=0&&se&&y.range&&y.range.length===2){var ae=y.range[0],j=y.range[1];return .5*(ae+j-2*f*Math.abs(ae-j))}else return h}function F(q,se,ae,j){if((j||{}).msUTC&&e(q))return+q;var Q=o(q,ae||y.calendar);if(Q===h)if(e(q)){q=+q;var re=Math.floor(S.mod(q+.05,1)*10),pe=Math.round(q-re/10);Q=o(new Date(pe))+re/10}else return h;return Q}function N(q,se,ae){return r(q,se,ae||y.calendar)}function O(q){return y._categories[Math.round(q)]}function P(q){if(p(q)){if(y._categoriesMap===void 0&&(y._categoriesMap={}),y._categoriesMap[q]!==void 0)return y._categoriesMap[q];y._categories.push(typeof q=="number"?String(q):q);var se=y._categories.length-1;return y._categoriesMap[q]=se,se}return h}function U(q,se){for(var ae=new Array(se),j=0;jy.range[1]&&(ae=!ae);for(var j=ae?-1:1,Q=j*q,re=0,pe=0;peSe)re=pe+1;else{re=Q<(we+Se)/2?pe:pe+1;break}}var Ie=y._B[re]||0;return isFinite(Ie)?le(q,y._m2,Ie):0},G=function(q){var se=y._rangebreaks.length;if(!se)return ce(q,y._m,y._b);for(var ae=0,j=0;jy._rangebreaks[j].pmax&&(ae=j+1);return ce(q,y._m2,y._B[ae])}}y.c2l=y.type==="log"?z:a,y.l2c=y.type==="log"?b:a,y.l2p=de,y.p2l=G,y.c2p=y.type==="log"?function(q,se){return de(z(q,se))}:de,y.p2c=y.type==="log"?function(q){return b(G(q))}:G,["linear","-"].indexOf(y.type)!==-1?(y.d2r=y.r2d=y.d2c=y.r2c=y.d2l=y.r2l=t,y.c2d=y.c2r=y.l2d=y.l2r=a,y.d2p=y.r2p=function(q){return y.l2p(t(q))},y.p2d=y.p2r=G,y.cleanPos=a):y.type==="log"?(y.d2r=y.d2l=function(q,se){return z(t(q),se)},y.r2d=y.r2c=function(q){return b(t(q))},y.d2c=y.r2l=t,y.c2d=y.l2r=a,y.c2r=z,y.l2d=b,y.d2p=function(q,se){return y.l2p(y.d2r(q,se))},y.p2d=function(q){return b(G(q))},y.r2p=function(q){return y.l2p(t(q))},y.p2r=G,y.cleanPos=a):y.type==="date"?(y.d2r=y.r2d=S.identity,y.d2c=y.r2c=y.d2l=y.r2l=F,y.c2d=y.c2r=y.l2d=y.l2r=N,y.d2p=y.r2p=function(q,se,ae){return y.l2p(F(q,0,ae))},y.p2d=y.p2r=function(q,se,ae){return N(G(q),se,ae)},y.cleanPos=function(q){return S.cleanDate(q,h,y.calendar)}):y.type==="category"?(y.d2c=y.d2l=P,y.r2d=y.c2d=y.l2d=O,y.d2r=y.d2l_noadd=X,y.r2c=function(q){var se=$(q);return se!==void 0?se:y.fraction2r(.5)},y.l2r=y.c2r=a,y.r2l=$,y.d2p=function(q){return y.l2p(y.r2c(q))},y.p2d=function(q){return O(G(q))},y.r2p=y.d2p,y.p2r=G,y.cleanPos=function(q){return typeof q=="string"&&q!==""?q:a(q)}):y.type==="multicategory"&&(y.r2d=y.c2d=y.l2d=O,y.d2r=y.d2l_noadd=X,y.r2c=function(q){var se=X(q);return se!==void 0?se:y.fraction2r(.5)},y.r2c_just_indices=B,y.l2r=y.c2r=a,y.r2l=X,y.d2p=function(q){return y.l2p(y.r2c(q))},y.p2d=function(q){return O(G(q))},y.r2p=y.d2p,y.p2r=G,y.cleanPos=function(q){return Array.isArray(q)||typeof q=="string"&&q!==""?q:a(q)},y.setupMultiCategory=function(q){var se=y._traceIndices,ae,j,Q=y._matchGroup;if(Q&&y._categories.length===0){for(var re in Q)if(re!==R){var pe=m[w.id2name(re)];se=se.concat(pe._traceIndices)}}var we=[[0,{}],[0,{}]],Se=[];for(ae=0;aepe[1]&&(j[re?0:1]=ae),j[0]===j[1]){var we=y.l2r(se),Se=y.l2r(ae);if(se!==void 0){var Ie=we+1;ae!==void 0&&(Ie=Math.min(Ie,Se)),j[re?1:0]=Ie}if(ae!==void 0){var Re=Se+1;se!==void 0&&(Re=Math.max(Re,we)),j[re?0:1]=Re}}}},y.cleanRange=function(q,se){y._cleanRange(q,se),y.limitRange(q)},y._cleanRange=function(q,se){se||(se={}),q||(q="range");var ae=S.nestedProperty(y,q).get(),j,Q;if(y.type==="date"?Q=S.dfltRange(y.calendar):L==="y"?Q=A.DFLTRANGEY:y._name==="realaxis"?Q=[0,1]:Q=se.dfltRange||A.DFLTRANGEX,Q=Q.slice(),(y.rangemode==="tozero"||y.rangemode==="nonnegative")&&(Q[0]=0),!ae||ae.length!==2){S.nestedProperty(y,q).set(Q);return}var re=ae[0]===null,pe=ae[1]===null;for(y.type==="date"&&!y.autorange&&(ae[0]=S.cleanDate(ae[0],h,y.calendar),ae[1]=S.cleanDate(ae[1],h,y.calendar)),j=0;j<2;j++)if(y.type==="date"){if(!S.isDateTime(ae[j],y.calendar)){y[q]=Q;break}if(y.r2l(ae[0])===y.r2l(ae[1])){var we=S.constrain(y.r2l(ae[0]),S.MIN_MS+1e3,S.MAX_MS-1e3);ae[0]=y.l2r(we-1e3),ae[1]=y.l2r(we+1e3);break}}else{if(!e(ae[j]))if(!(re||pe)&&e(ae[1-j]))ae[j]=ae[1-j]*(j?10:.1);else{y[q]=Q;break}if(ae[j]<-s?ae[j]=-s:ae[j]>s&&(ae[j]=s),ae[0]===ae[1]){var Se=Math.max(1,Math.abs(ae[0]*1e-6));ae[0]-=Se,ae[1]+=Se}}},y.setScale=function(q){var se=m._size;if(y.overlaying){var ae=w.getFromId({_fullLayout:m},y.overlaying);y.domain=ae.domain}var j=q&&y._r?"_r":"range",Q=y.calendar;y.cleanRange(j);var re=y.r2l(y[j][0],Q),pe=y.r2l(y[j][1],Q),we=L==="y";if(we?(y._offset=se.t+(1-y.domain[1])*se.h,y._length=se.h*(y.domain[1]-y.domain[0]),y._m=y._length/(re-pe),y._b=-y._m*pe):(y._offset=se.l+y.domain[0]*se.w,y._length=se.w*(y.domain[1]-y.domain[0]),y._m=y._length/(pe-re),y._b=-y._m*re),y._rangebreaks=[],y._lBreaks=0,y._m2=0,y._B=[],y.rangebreaks){var Se,Ie;if(y._rangebreaks=y.locateBreaks(Math.min(re,pe),Math.max(re,pe)),y._rangebreaks.length){for(Se=0;Sepe&&(Re=!Re),Re&&y._rangebreaks.reverse();var We=Re?-1:1;for(y._m2=We*y._length/(Math.abs(pe-re)-y._lBreaks),y._B.push(-y._m2*(we?pe:re)),Se=0;SeQ&&(Q+=7,reQ&&(Q+=24,re=j&&re=j&&q=Ke.min&&(neKe.max&&(Ke.max=Ce),Ye=!1)}Ye&&pe.push({min:ne,max:Ce})}};for(ae=0;ae_*2}function i(f){return Math.max(1,(f-1)/1e3)}function s(f,v){for(var c=f.length,T=i(c),l=0,_=0,w={},A=0;Al*2}function h(f){return E(f[0])&&E(f[1])}}}),Yd=He({"src/plots/cartesian/autorange.js"(Z,V){"use strict";var d=Wn(),x=as(),S=sa(),E=Ws().FP_SAFE,e=lo(),t=es(),r=ef(),o=r.getFromId,a=r.isLinked;V.exports={applyAutorangeOptions:y,getAutoRange:n,makePadFn:s,doAutoRange:c,findExtremes:T,concatExtremes:v};function n(m,R){var L,z,F=[],N=m._fullLayout,O=s(N,R,0),P=s(N,R,1),U=v(m,R),B=U.min,X=U.max;if(B.length===0||X.length===0)return S.simpleMap(R.range,R.r2l);var $=B[0].val,le=X[0].val;for(L=1;L0&&(Se=se-O(Q)-P(re),Se>ae?Ie/Se>j&&(pe=Q,we=re,j=Ie/Se):Ie/se>j&&(pe={val:Q.val,nopad:1},we={val:re.val,nopad:1},j=Ie/se));function Re(qe,he){return Math.max(qe,P(he))}if($===le){var We=$-1,at=$+1;if(ee)if($===0)F=[0,1];else{var nt=($>0?X:B).reduce(Re,0),tt=$/(1-Math.min(.5,nt/se));F=$>0?[0,tt]:[tt,0]}else q?F=[Math.max(0,We),Math.max(1,at)]:F=[We,at]}else ee?(pe.val>=0&&(pe={val:0,nopad:1}),we.val<=0&&(we={val:0,nopad:1})):q&&(pe.val-j*O(pe)<0&&(pe={val:0,nopad:1}),we.val<=0&&(we={val:1,nopad:1})),j=(we.val-pe.val-i(R,Q.val,re.val))/(se-O(pe)-P(we)),F=[pe.val-j*O(pe),we.val+j*P(we)];return F=y(F,R),R.limitRange&&R.limitRange(),de&&F.reverse(),S.simpleMap(F,R.l2r||Number)}function i(m,R,L){var z=0;if(m.rangebreaks)for(var F=m.locateBreaks(R,L),N=0;N0?L.ppadplus:L.ppadminus)||L.ppad||0),Q=ae((m._m>0?L.ppadminus:L.ppadplus)||L.ppad||0),re=ae(L.vpadplus||L.vpad),pe=ae(L.vpadminus||L.vpad);if(!B){if(q=1/0,se=-1/0,U)for($=0;$0&&(q=le),le>se&&le-E&&(q=le),le>se&&le=Ie;$--)Se($);return{min:z,max:F,opts:L}}function l(m,R,L,z){w(m,R,L,z,M)}function _(m,R,L,z){w(m,R,L,z,g)}function w(m,R,L,z,F){for(var N=z.tozero,O=z.extrapad,P=!0,U=0;U=L&&(B.extrapad||!O)){P=!1;break}else F(R,B.val)&&B.pad<=L&&(O||!B.extrapad)&&(m.splice(U,1),U--)}if(P){var X=N&&R===0;m.push({val:R,pad:X?0:L,extrapad:X?!1:O})}}function A(m){return x(m)&&Math.abs(m)=R}function b(m,R){var L=R.autorangeoptions;return L&&L.minallowed!==void 0&&u(R,L.minallowed,L.maxallowed)?L.minallowed:L&&L.clipmin!==void 0&&u(R,L.clipmin,L.clipmax)?Math.max(m,R.d2l(L.clipmin)):m}function p(m,R){var L=R.autorangeoptions;return L&&L.maxallowed!==void 0&&u(R,L.minallowed,L.maxallowed)?L.maxallowed:L&&L.clipmax!==void 0&&u(R,L.clipmin,L.clipmax)?Math.min(m,R.d2l(L.clipmax)):m}function u(m,R,L){return R!==void 0&&L!==void 0?(R=m.d2l(R),L=m.d2l(L),R=U&&(N=U,L=U),O<=U&&(O=U,z=U)}}return L=b(L,R),z=p(z,R),[L,z]}}}),Ho=He({"src/plots/cartesian/axes.js"(Z,V){"use strict";var d=Wn(),x=as(),S=bc(),E=lo(),e=sa(),t=e.strTranslate,r=ou(),o=K0(),a=Jn(),n=es(),i=Wh(),s=l5(),h=lh(),f=Ws(),v=f.ONEMAXYEAR,c=f.ONEAVGYEAR,T=f.ONEMINYEAR,l=f.ONEMAXQUARTER,_=f.ONEAVGQUARTER,w=f.ONEMINQUARTER,A=f.ONEMAXMONTH,M=f.ONEAVGMONTH,g=f.ONEMINMONTH,b=f.ONEWEEK,p=f.ONEDAY,u=p/2,y=f.ONEHOUR,m=f.ONEMIN,R=f.ONESEC,L=f.ONEMILLI,z=f.ONEMICROSEC,F=f.MINUS_SIGN,N=f.BADNUM,O={K:"zeroline"},P={K:"gridline",L:"path"},U={K:"minor-gridline",L:"path"},B={K:"tick",L:"path"},X={K:"tick",L:"text"},$={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},le=uh(),ce=le.MID_SHIFT,de=le.CAP_SHIFT,G=le.LINE_SPACING,Y=le.OPPOSITE_SIDE,ee=3,q=V.exports={};q.setConvert=wv();var se=a1(),ae=ef(),j=ae.idSort,Q=ae.isLinked;q.id2name=ae.id2name,q.name2id=ae.name2id,q.cleanId=ae.cleanId,q.list=ae.list,q.listIds=ae.listIds,q.getFromId=ae.getFromId,q.getFromTrace=ae.getFromTrace;var re=Yd();q.getAutoRange=re.getAutoRange,q.findExtremes=re.findExtremes;var pe=1e-4;function we(xt){var lt=(xt[1]-xt[0])*pe;return[xt[0]-lt,xt[1]+lt]}q.coerceRef=function(xt,lt,Br,Cr,xr,Rr){var Ur=Cr.charAt(Cr.length-1),Hr=Br._fullLayout._subplots[Ur+"axis"],gt=Cr+"ref",Xt={};return xr||(xr=Hr[0]||(typeof Rr=="string"?Rr:Rr[0])),Rr||(Rr=xr),Hr=Hr.concat(Hr.map(function(vr){return vr+" domain"})),Xt[gt]={valType:"enumerated",values:Hr.concat(Rr?typeof Rr=="string"?[Rr]:Rr:[]),dflt:xr},e.coerce(xt,lt,Xt,gt)},q.coerceRefArray=function(xt,lt,Br,Cr,xr,Rr,Ur){let Hr=Cr.charAt(Cr.length-1);var gt=Br._fullLayout._subplots[Hr+"axis"];let Xt=Cr+"ref";var vr=xt[Xt];xr||(xr=gt[0]||(typeof Rr=="string"?Rr:Rr[0])),gt=gt.concat(gt.map(ba=>ba+" domain")),gt=gt.concat(Rr||[]),vr.length>Ur?(e.warn("Array attribute "+Xt+" has more entries than expected, truncating to "+Ur),vr=vr.slice(0,Ur)):vr.length2e-6||((Br-xt._forceTick0)/xt._minDtick%1+1.000001)%1>2e-6)&&(xt._minDtick=0))},q.saveRangeInitial=function(xt,lt){for(var Br=q.list(xt,"",!0),Cr=!1,xr=0;xrOr*.3||Xt(Cr)||Xt(xr))){var ba=Br.dtick/2;xt+=xt+baUr){var Hr=Number(Br.slice(1));Rr.exactYears>Ur&&Hr%12===0?xt=q.tickIncrement(xt,"M6","reverse")+p*1.5:Rr.exactMonths>Ur?xt=q.tickIncrement(xt,"M1","reverse")+p*15.5:xt-=u;var gt=q.tickIncrement(xt,Br);if(gt<=Cr)return gt}return xt}q.prepMinorTicks=function(xt,lt,Br){if(!lt.minor.dtick){delete xt.dtick;var Cr=lt.dtick&&x(lt._tmin),xr;if(Cr){var Rr=q.tickIncrement(lt._tmin,lt.dtick,!0);xr=[lt._tmin,Rr*.99+lt._tmin*.01]}else{var Ur=e.simpleMap(lt.range,lt.r2l);xr=[Ur[0],.8*Ur[0]+.2*Ur[1]]}if(xt.range=e.simpleMap(xr,lt.l2r),xt._isMinor=!0,q.prepTicks(xt,Br),Cr){var Hr=x(lt.dtick),gt=x(xt.dtick),Xt=Hr?lt.dtick:+lt.dtick.substring(1),vr=gt?xt.dtick:+xt.dtick.substring(1);Hr&>?nt(Xt,vr)?Xt===2*b&&vr===2*p&&(xt.dtick=b):Xt===2*b&&vr===3*p?xt.dtick=b:Xt===b&&!(lt._input.minor||{}).nticks?xt.dtick=p:tt(Xt/vr,2.5)?xt.dtick=Xt/2:xt.dtick=Xt:String(lt.dtick).charAt(0)==="M"?gt?xt.dtick="M1":nt(Xt,vr)?Xt>=12&&vr===2&&(xt.dtick="M3"):xt.dtick=lt.dtick:String(xt.dtick).charAt(0)==="L"?String(lt.dtick).charAt(0)==="L"?nt(Xt,vr)||(xt.dtick=tt(Xt/vr,2.5)?lt.dtick/2:lt.dtick):xt.dtick="D1":xt.dtick==="D2"&&+lt.dtick>1&&(xt.dtick=1)}xt.range=lt.range}lt.minor._tick0Init===void 0&&(xt.tick0=lt.tick0)};function nt(xt,lt){return Math.abs((xt/lt+.5)%1-.5)<.001}function tt(xt,lt){return Math.abs(xt/lt-1)<.001}q.prepTicks=function(xt,lt){var Br=e.simpleMap(xt.range,xt.r2l,void 0,void 0,lt);if(xt.tickmode==="auto"||!xt.dtick){var Cr=xt.nticks,xr;Cr||(xt.type==="category"||xt.type==="multicategory"?(xr=xt.tickfont?e.bigFont(xt.tickfont.size||12):15,Cr=xt._length/xr):(xr=xt._id.charAt(0)==="y"?40:80,Cr=e.constrain(xt._length/xr,4,9)+1),xt._name==="radialaxis"&&(Cr*=2)),xt.minor&&xt.minor.tickmode!=="array"||xt.tickmode==="array"&&(Cr*=100),xt._roughDTick=Math.abs(Br[1]-Br[0])/Cr,q.autoTicks(xt,xt._roughDTick),xt._minDtick>0&&xt.dtick0?(Rr=Cr-1,Ur=Cr):(Rr=Cr,Ur=Cr);var Hr=xt[Rr].value,gt=xt[Ur].value,Xt=Math.abs(gt-Hr),vr=Br||Xt,Or=0;vr>=T?Xt>=T&&Xt<=v?Or=Xt:Or=c:Br===_&&vr>=w?Xt>=w&&Xt<=l?Or=Xt:Or=_:vr>=g?Xt>=g&&Xt<=A?Or=Xt:Or=M:Br===b&&vr>=b?Or=b:vr>=p?Or=p:Br===u&&vr>=u?Or=u:Br===y&&vr>=y&&(Or=y);var ba;Or>=Xt&&(Or=Xt,ba=!0);var Pa=xr+Or;if(lt.rangebreaks&&Or>0){for(var ma=84,la=0,_a=0;_ab&&(Or=Xt)}(Or>0||Cr===0)&&(xt[Cr].periodX=xr+Or/2)}}q.calcTicks=function(lt,Br){for(var Cr=lt.type,xr=lt.calendar,Rr=lt.ticklabelstep,Ur=lt.ticklabelmode==="period",Hr=lt.range[0]>lt.range[1],gt=!lt.ticklabelindex||e.isArrayOrTypedArray(lt.ticklabelindex)?lt.ticklabelindex:[lt.ticklabelindex],Xt=e.simpleMap(lt.range,lt.r2l,void 0,void 0,Br),vr=Xt[1]=(Ki?0:1);yn--){var Ln=!yn;yn?(lt._dtickInit=lt.dtick,lt._tick0Init=lt.tick0):(lt.minor._dtickInit=lt.minor.dtick,lt.minor._tick0Init=lt.minor.tick0);var kn=yn?lt:e.extendFlat({},lt,lt.minor);if(Ln?q.prepMinorTicks(kn,lt,Br):q.prepTicks(kn,Br),kn.tickmode==="array"){yn?(_a=[],ma=Ye(lt,!Ln)):(Ai=[],la=Ye(lt,!Ln));continue}if(kn.tickmode==="sync"){_a=[],ma=Ce(lt);continue}var Bn=we(Xt),ao=Bn[0],xo=Bn[1],Co=x(kn.dtick),Fs=Cr==="log"&&!(Co||kn.dtick.charAt(0)==="L"),Mn=q.tickFirst(kn,Br);if(yn){if(lt._tmin=Mn,Mn=xo:On<=xo;On=q.tickIncrement(On,_s,vr,xr)){if(yn&&ts++,kn.rangebreaks&&!vr){if(On=ba)break}if(_a.length>Pa||On===Ao)break;Ao=On;var Oo={value:On};yn?(Fs&&On!==(On|0)&&(Oo.simpleLabel=!0),Rr>1&&ts%Rr&&(Oo.skipLabel=!0),_a.push(Oo)):(Oo.minor=!0,Ai.push(Oo))}}if(!Ai||Ai.length<2)gt=!1;else{var io=(Ai[1].value-Ai[0].value)*(Hr?-1:1);fn(io,lt.tickformat)||(gt=!1)}if(!gt)ki=_a;else{var Gn=_a.concat(Ai);Ur&&_a.length&&(Gn=Gn.slice(1)),Gn=Gn.sort(function(Gs,vl){return Gs.value-vl.value}).filter(function(Gs,vl,As){return vl===0||Gs.value!==As[vl-1].value});var eo=Gn.map(function(Gs,vl){return Gs.minor===void 0&&!Gs.skipLabel?vl:null}).filter(function(Gs){return Gs!==null});eo.forEach(function(Gs){gt.map(function(vl){var As=Gs+vl;As>=0&&As-1;Hn--){if(_a[Hn].drop){_a.splice(Hn,1);continue}_a[Hn].value=ri(_a[Hn].value,lt);var il=lt.c2p(_a[Hn].value);(Os?Xs>il-ds:Xsba||qsba&&(As.periodX=ba),qsxr&&bac)lt/=c,Cr=xr(10),xt.dtick="M"+12*mr(lt,Cr,rt);else if(Rr>M)lt/=M,xt.dtick="M"+mr(lt,1,Ke);else if(Rr>p){if(xt.dtick=mr(lt,p,xt._hasDayOfWeekBreaks?[1,2,7,14]:kt),!Br){var Ur=q.getTickFormat(xt),Hr=xt.ticklabelmode==="period";Hr&&(xt._rawTick0=xt.tick0),/%[uVW]/.test(Ur)?xt.tick0=e.dateTick0(xt.calendar,2):xt.tick0=e.dateTick0(xt.calendar,1),Hr&&(xt._dowTick0=xt.tick0)}}else Rr>y?xt.dtick=mr(lt,y,Ke):Rr>m?xt.dtick=mr(lt,m,Mt):Rr>R?xt.dtick=mr(lt,R,Mt):(Cr=xr(10),xt.dtick=mr(lt,Cr,rt))}else if(xt.type==="log"){xt.tick0=0;var gt=e.simpleMap(xt.range,xt.r2l);if(xt._isMinor&&(lt*=1.5),lt>.7)xt.dtick=Math.ceil(lt);else if(Math.abs(gt[1]-gt[0])<1){var Xt=1.5*Math.abs((gt[1]-gt[0])/lt);lt=Math.abs(Math.pow(10,gt[1])-Math.pow(10,gt[0]))/Xt,Cr=xr(10),xt.dtick="L"+mr(lt,Cr,rt)}else xt.dtick=lt>.3?"D2":"D1"}else xt.type==="category"||xt.type==="multicategory"?(xt.tick0=0,xt.dtick=Math.ceil(Math.max(lt,1))):Za(xt)?(xt.tick0=0,Cr=1,xt.dtick=mr(lt,Cr,Mr)):(xt.tick0=0,Cr=xr(10),xt.dtick=mr(lt,Cr,rt));if(xt.dtick===0&&(xt.dtick=1),!x(xt.dtick)&&typeof xt.dtick!="string"){var vr=xt.dtick;throw xt.dtick=1,"ax.dtick error: "+String(vr)}};function qr(xt){var lt=xt.dtick;if(xt._tickexponent=0,!x(lt)&&typeof lt!="string"&&(lt=1),(xt.type==="category"||xt.type==="multicategory")&&(xt._tickround=null),xt.type==="date"){var Br=xt.r2l(xt.tick0),Cr=xt.l2r(Br).replace(/(^-|i)/g,""),xr=Cr.length;if(String(lt).charAt(0)==="M")xr>10||Cr.slice(5)!=="01-01"?xt._tickround="d":xt._tickround=+lt.slice(1)%12===0?"y":"m";else if(lt>=p&&xr<=10||lt>=p*15)xt._tickround="d";else if(lt>=m&&xr<=16||lt>=y)xt._tickround="M";else if(lt>=R&&xr<=19||lt>=m)xt._tickround="S";else{var Rr=xt.l2r(Br+lt).replace(/^-/,"").length;xt._tickround=Math.max(xr,Rr)-20,xt._tickround<0&&(xt._tickround=4)}}else if(x(lt)||lt.charAt(0)==="L"){var Ur=xt.range.map(xt.r2d||Number);x(lt)||(lt=Number(lt.slice(1))),xt._tickround=2-Math.floor(Math.log(lt)/Math.LN10+.01);var Hr=Math.max(Math.abs(Ur[0]),Math.abs(Ur[1])),gt=Math.floor(Math.log(Hr)/Math.LN10+.01),Xt=xt.minexponent===void 0?3:xt.minexponent;Math.abs(gt)>Xt&&(ut(xt.exponentformat)&&xt.exponentformat!=="SI extended"&&!Ut(gt)||ut(xt.exponentformat)&&xt.exponentformat==="SI extended"&&!Ct(gt)?xt._tickexponent=3*Math.round((gt-1)/3):xt._tickexponent=gt)}else xt._tickround=null}q.tickIncrement=function(xt,lt,Br,Cr){var xr=Br?-1:1;if(x(lt))return e.increment(xt,xr*lt);var Rr=lt.charAt(0),Ur=xr*Number(lt.slice(1));if(Rr==="M")return e.incrementMonth(xt,Ur,Cr);if(Rr==="L")return Math.log(Math.pow(10,xt)+Ur)/Math.LN10;if(Rr==="D"){var Hr=lt==="D2"?Gt:Nt,gt=xt+xr*.01,Xt=e.roundUp(e.mod(gt,1),Hr,Br);return Math.floor(gt)+Math.log(d.round(Math.pow(10,Xt),1))/Math.LN10}throw"unrecognized dtick "+String(lt)},q.tickFirst=function(xt,lt){var Br=xt.r2l||Number,Cr=e.simpleMap(xt.range,Br,void 0,void 0,lt),xr=Cr[1]=0&&Ai<=xt._length?_a:null};if(Rr&&e.isArrayOrTypedArray(xt.ticktext)){var Or=e.simpleMap(xt.range,xt.r2l),ba=(Math.abs(Or[1]-Or[0])-(xt._lBreaks||0))/1e4;for(Xt=0;Xt"+Hr;else{var Xt=pi(xt),vr=xt._trueSide||xt.side;(!Xt&&vr==="top"||Xt&&vr==="bottom")&&(Ur+="
")}lt.text=Ur}function _t(xt,lt,Br,Cr,xr){var Rr=xt.dtick,Ur=lt.x,Hr=xt.tickformat,gt=typeof Rr=="string"&&Rr.charAt(0);if(xr==="never"&&(xr=""),Cr&>!=="L"&&(Rr="L3",gt="L"),Hr||gt==="L")lt.text=jt(Math.pow(10,Ur),xt,xr,Cr);else if(x(Rr)||gt==="D"&&(xt.minorloglabels==="complete"||e.mod(Ur+.01,1)<.1)){var Xt;xt.minorloglabels==="complete"&&!(e.mod(Ur+.01,1)<.1)&&(Xt=!0,lt.fontSize*=.75);var vr=Math.pow(10,Ur).toExponential(0),Or=vr.split("e"),ba=+Or[1],Pa=Math.abs(ba),ma=xt.exponentformat;ma==="power"||ut(ma)&&ma!=="SI extended"&&Ut(ba)||ut(ma)&&ma==="SI extended"&&Ct(ba)?(lt.text=Or[0],Pa>0&&(lt.text+="x10"),lt.text==="1x10"&&(lt.text="10"),ba!==0&&ba!==1&&(lt.text+=""+(ba>0?"":F)+Pa+""),lt.fontSize*=1.25):(ma==="e"||ma==="E")&&Pa>2?lt.text=Or[0]+ma+(ba>0?"+":F)+Pa:(lt.text=jt(Math.pow(10,Ur),xt,"","fakehover"),Rr==="D1"&&xt._id.charAt(0)==="y"&&(lt.dy-=lt.fontSize/6))}else if(gt==="D")lt.text=xt.minorloglabels==="none"?"":String(Math.round(Math.pow(10,e.mod(Ur,1)))),lt.fontSize*=.75;else throw"unrecognized dtick "+String(Rr);if(xt.dtick==="D1"){var la=String(lt.text).charAt(0);(la==="0"||la==="1")&&(xt._id.charAt(0)==="y"?lt.dx-=lt.fontSize/4:(lt.dy+=lt.fontSize/2,lt.dx+=(xt.range[1]>xt.range[0]?1:-1)*lt.fontSize*(Ur<0?.5:.25)))}}function Oe(xt,lt){var Br=xt._categories[Math.round(lt.x)];Br===void 0&&(Br=""),lt.text=String(Br)}function Je(xt,lt,Br){var Cr=Math.round(lt.x),xr=xt._categories[Cr]||[],Rr=xr[1]===void 0?"":String(xr[1]),Ur=xr[0]===void 0?"":String(xr[0]);Br?lt.text=Ur+" - "+Rr:(lt.text=Rr,lt.text2=Ur)}function Ae(xt,lt,Br,Cr,xr){xr==="never"?xr="":xt.showexponent==="all"&&Math.abs(lt.x/xt.dtick)<1e-6&&(xr="hide"),lt.text=jt(lt.x,xt,xr,Cr)}function Le(xt,lt,Br,Cr,xr){if(xt.thetaunit==="radians"&&!Br){var Rr=lt.x/180;if(Rr===0)lt.text="0";else{var Ur=Ue(Rr);if(Ur[1]>=100)lt.text=jt(e.deg2rad(lt.x),xt,xr,Cr);else{var Hr=lt.x<0;Ur[1]===1?Ur[0]===1?lt.text="\u03C0":lt.text=Ur[0]+"\u03C0":lt.text=["",Ur[0],"","\u2044","",Ur[1],"","\u03C0"].join(""),Hr&&(lt.text=F+lt.text)}}}else lt.text=jt(lt.x,xt,xr,Cr)}function Ue(xt){function lt(Hr,gt){return Math.abs(Hr-gt)<=1e-6}function Br(Hr,gt){return lt(gt,0)?Hr:Br(gt,Hr%gt)}function Cr(Hr){for(var gt=1;!lt(Math.round(Hr*gt)/gt,Hr);)gt*=10;return gt}var xr=Cr(xt),Rr=xt*xr,Ur=Math.abs(Br(Rr,xr));return[Math.round(Rr/Ur),Math.round(xr/Ur)]}var Ze=["f","p","n","\u03BC","m","","k","M","G","T"],st=["q","r","y","z","a",...Ze,"P","E","Z","Y","R","Q"],ut=xt=>["SI","SI extended","B"].includes(xt);function Ut(xt){return xt>14||xt<-15}function Ct(xt){return xt>32||xt<-30}function Pt(xt,lt){return ut(lt)?!!(lt==="SI extended"&&Ct(xt)||lt!=="SI extended"&&Ut(xt)):!1}function jt(xt,lt,Br,Cr){var xr=xt<0,Rr=lt._tickround,Ur=Br||lt.exponentformat||"B",Hr=lt._tickexponent,gt=q.getTickFormat(lt),Xt=lt.separatethousands;if(Cr){var vr={exponentformat:Ur,minexponent:lt.minexponent,dtick:lt.showexponent==="none"?lt.dtick:x(xt)&&Math.abs(xt)||1,range:lt.showexponent==="none"?lt.range.map(lt.r2d):[0,xt||1]};qr(vr),Rr=(Number(vr._tickround)||0)+4,Hr=vr._tickexponent,lt.hoverformat&&(gt=lt.hoverformat)}if(gt)return lt._numFormat(gt)(xt).replace(/-/g,F);var Or=Math.pow(10,-Rr)/2;if(Ur==="none"&&(Hr=0),xt=Math.abs(xt),xt"+ma+"":Ur==="B"&&Hr===9?xt+="B":ut(Ur)&&(xt+=Ur==="SI extended"?st[Hr/3+10]:Ze[Hr/3+5])}return xr?F+xt:xt}q.getTickFormat=function(xt){var lt;function Br(gt){return typeof gt!="string"?gt:Number(gt.replace("M",""))*M}function Cr(gt,Xt){var vr=["L","D"];if(typeof gt==typeof Xt){if(typeof gt=="number")return gt-Xt;var Or=vr.indexOf(gt.charAt(0)),ba=vr.indexOf(Xt.charAt(0));return Or===ba?Number(gt.replace(/(L|D)/g,""))-Number(Xt.replace(/(L|D)/g,"")):Or-ba}else return typeof gt=="number"?1:-1}function xr(gt,Xt,vr){var Or=vr||function(ma){return ma},ba=Xt[0],Pa=Xt[1];return(!ba&&typeof ba!="number"||Or(ba)<=Or(gt))&&(!Pa&&typeof Pa!="number"||Or(Pa)>=Or(gt))}function Rr(gt,Xt){var vr=Xt[0]===null,Or=Xt[1]===null,ba=Cr(gt,Xt[0])>=0,Pa=Cr(gt,Xt[1])<=0;return(vr||ba)&&(Or||Pa)}var Ur,Hr;if(xt.tickformatstops&&xt.tickformatstops.length>0)switch(xt.type){case"date":case"linear":{for(lt=0;lt=0&&xr.unshift(xr.splice(vr,1).shift())}});var Hr={false:{left:0,right:0}};return e.syncOrAsync(xr.map(function(gt){return function(){if(gt){var Xt=q.getFromId(xt,gt);Br||(Br={}),Br.axShifts=Hr,Br.overlayingShiftedAx=Ur;var vr=q.drawOne(xt,Xt,Br);return Xt._shiftPusher&&an(Xt,Xt._fullDepth||0,Hr,!0),Xt._r=Xt.range.slice(),Xt._rl=e.simpleMap(Xt._r,Xt.r2l),vr}}}))},q.drawOne=function(xt,lt,Br){Br=Br||{};var Cr=Br.axShifts||{},xr=Br.overlayingShiftedAx||[],Rr,Ur,Hr;lt.setScale();var gt=xt._fullLayout,Xt=lt._id,vr=Xt.charAt(0),Or=q.counterLetter(Xt),ba=gt._plots[lt._mainSubplot],Pa=lt.zerolinelayer==="above traces";if(!ba)return;if(lt._shiftPusher=lt.autoshift||xr.indexOf(lt._id)!==-1||xr.indexOf(lt.overlaying)!==-1,lt._shiftPusher<.anchor==="free"){var ma=lt.linewidth/2||0;lt.ticks==="inside"&&(ma+=lt.ticklen),an(lt,ma,Cr,!0),an(lt,lt.shift||0,Cr,!1)}(Br.skipTitle!==!0||lt._shift===void 0)&&(lt._shift=tn(lt,Cr));var la=ba[vr+"axislayer"],_a=lt._mainLinePosition,Ai=_a+=lt._shift,ki=lt._mainMirrorPosition,Ki=lt._vals=q.calcTicks(lt),yn=[lt.mirror,Ai,ki].join("_");for(Rr=0;Rr0?qs.bottom-vl:0,As))));var su=0,Tc=0;if(lt._shiftPusher&&(su=Math.max(As,qs.height>0?uo==="l"?vl-qs.left:qs.right-vl:0),lt.title.text!==gt._dfltTitle[vr]&&(Tc=(lt._titleStandoff||0)+(lt._titleScoot||0),uo==="l"&&(Tc+=Ca(lt))),lt._fullDepth=Math.max(su,Tc)),lt.automargin){us={x:0,y:0,r:0,l:0,t:0,b:0};var du=[0,1],Sf=typeof lt._shift=="number"?lt._shift:0;if(vr==="x"){if(uo==="b"?us[uo]=lt._depth:(us[uo]=lt._depth=Math.max(qs.width>0?vl-qs.top:0,As),du.reverse()),qs.width>0){var Uc=qs.right-(lt._offset+lt._length);Uc>0&&(us.xr=1,us.r=Uc);var Bs=lt._offset-qs.left;Bs>0&&(us.xl=0,us.l=Bs)}}else if(uo==="l"?(lt._depth=Math.max(qs.height>0?vl-qs.left:0,As),us[uo]=lt._depth-Sf):(lt._depth=Math.max(qs.height>0?qs.right-vl:0,As),us[uo]=lt._depth+Sf,du.reverse()),qs.height>0){var dc=qs.bottom-(lt._offset+lt._length);dc>0&&(us.yb=0,us.b=dc);var Hc=lt._offset-qs.top;Hc>0&&(us.yt=1,us.t=Hc)}us[Or]=lt.anchor==="free"?lt.position:lt._anchorAxis.domain[du[0]],lt.title.text!==gt._dfltTitle[vr]&&(us[uo]+=Ca(lt)+(lt.title.standoff||0)),lt.mirror&<.anchor!=="free"&&(Ss={x:0,y:0,r:0,l:0,t:0,b:0},Ss[Gs]=lt.linewidth,lt.mirror&<.mirror!==!0&&(Ss[Gs]+=As),lt.mirror===!0||lt.mirror==="ticks"?Ss[Or]=lt._anchorAxis.domain[du[1]]:(lt.mirror==="all"||lt.mirror==="allticks")&&(Ss[Or]=[lt._counterDomainMin,lt._counterDomainMax][du[1]]))}pu&&(Nl=E.getComponentMethod("rangeslider","autoMarginOpts")(xt,lt)),typeof lt.automargin=="string"&&(fr(us,lt.automargin),fr(Ss,lt.automargin)),S.autoMargin(xt,Jt(lt),us),S.autoMargin(xt,Fr(lt),Ss),S.autoMargin(xt,ta(lt),Nl)}),e.syncOrAsync(bo)}};function fr(xt,lt){if(xt){var Br=Object.keys($).reduce(function(Cr,xr){return lt.indexOf(xr)!==-1&&$[xr].forEach(function(Rr){Cr[Rr]=1}),Cr},{});Object.keys(xt).forEach(function(Cr){Br[Cr]||(Cr.length===1?xt[Cr]=0:delete xt[Cr])})}}function ur(xt,lt){var Br=[],Cr,xr=function(Rr,Ur){var Hr=Rr.xbnd[Ur];Hr!==null&&Br.push(e.extendFlat({},Rr,{x:Hr}))};if(lt.length){for(Cr=0;Crxt.range[1],Hr=xt.ticklabelposition&&xt.ticklabelposition.indexOf("inside")!==-1,gt=!Hr;if(Br){var Xt=Ur?-1:1;Br=Br*Xt}if(Cr){var vr=xt.side,Or=Hr&&(vr==="top"||vr==="left")||gt&&(vr==="bottom"||vr==="right")?1:-1;Cr=Cr*Or}return xt._id.charAt(0)==="x"?function(ba){return t(xr+xt._offset+xt.l2p(Oa(ba))+Br,Rr+Cr)}:function(ba){return t(Rr+Cr,xr+xt._offset+xt.l2p(Oa(ba))+Br)}};function Oa(xt){return xt.periodX!==void 0?xt.periodX:xt.x}function Ia(xt){var lt=xt.ticklabelposition||"",Br=xt.tickson||"",Cr=function(ma){return lt.indexOf(ma)!==-1},xr=Cr("top"),Rr=Cr("left"),Ur=Cr("right"),Hr=Cr("bottom"),gt=Cr("inside"),Xt=Br!=="boundaries"&&(Hr||Rr||xr||Ur);if(!Xt&&!gt)return[0,0];var vr=xt.side,Or=Xt?(xt.tickwidth||0)/2:0,ba=ee,Pa=xt.tickfont?xt.tickfont.size:12;return(Hr||xr)&&(Or+=Pa*de,ba+=(xt.linewidth||0)/2),(Rr||Ur)&&(Or+=(xt.linewidth||0)/2,ba+=ee),gt&&vr==="top"&&(ba-=Pa*(1-de)),(Rr||xr)&&(Or=-Or),(vr==="bottom"||vr==="right")&&(ba=-ba),[Xt?Or:0,gt?ba:0]}q.makeTickPath=function(xt,lt,Br,Cr){Cr||(Cr={});var xr=Cr.minor;if(xr&&!xt.minor)return"";var Rr=Cr.len!==void 0?Cr.len:xr?xt.minor.ticklen:xt.ticklen,Ur=xt._id.charAt(0),Hr=(xt.linewidth||1)/2;return Ur==="x"?"M0,"+(lt+Hr*Br)+"v"+Rr*Br:"M"+(lt+Hr*Br)+",0h"+Rr*Br},q.makeLabelFns=function(xt,lt,Br){var Cr=xt.ticklabelposition||"",xr=xt.tickson||"",Rr=function(Ao){return Cr.indexOf(Ao)!==-1},Ur=Rr("top"),Hr=Rr("left"),gt=Rr("right"),Xt=Rr("bottom"),vr=xr!=="boundaries"&&(Xt||Hr||Ur||gt),Or=Rr("inside"),ba=Cr==="inside"&&xt.ticks==="inside"||!Or&&xt.ticks==="outside"&&xr!=="boundaries",Pa=0,ma=0,la=ba?xt.ticklen:0;if(Or?la*=-1:vr&&(la=0),ba&&(Pa+=la,Br)){var _a=e.deg2rad(Br);Pa=la*Math.cos(_a)+1,ma=la*Math.sin(_a)}xt.showticklabels&&(ba||xt.showline)&&(Pa+=.2*xt.tickfont.size),Pa+=(xt.linewidth||1)/2*(Or?-1:1);var Ai={labelStandoff:Pa,labelShift:ma},ki,Ki,yn,Ln,kn=0,Bn=xt.side,ao=xt._id.charAt(0),xo=xt.tickangle,Co;if(ao==="x")Co=!Or&&Bn==="bottom"||Or&&Bn==="top",Ln=Co?1:-1,Or&&(Ln*=-1),ki=ma*Ln,Ki=lt+Pa*Ln,yn=Co?1:-.2,Math.abs(xo)===90&&(Or?yn+=ce:xo===-90&&Bn==="bottom"?yn=de:xo===90&&Bn==="top"?yn=ce:yn=.5,kn=ce/2*(xo/90)),Ai.xFn=function(Ao){return Ao.dx+ki+kn*Ao.fontSize},Ai.yFn=function(Ao){return Ao.dy+Ki+Ao.fontSize*yn},Ai.anchorFn=function(Ao,On){if(vr){if(Hr)return"end";if(gt)return"start"}return!x(On)||On===0||On===180?"middle":On*Ln<0!==Or?"end":"start"},Ai.heightFn=function(Ao,On,ts){return On<-60||On>60?-.5*ts:xt.side==="top"!==Or?-ts:0};else if(ao==="y"){if(Co=!Or&&Bn==="left"||Or&&Bn==="right",Ln=Co?1:-1,Or&&(Ln*=-1),ki=Pa,Ki=ma*Ln,yn=0,!Or&&Math.abs(xo)===90&&(xo===-90&&Bn==="left"||xo===90&&Bn==="right"?yn=de:yn=.5),Or){var Fs=x(xo)?+xo:0;if(Fs!==0){var Mn=e.deg2rad(Fs);kn=Math.abs(Math.sin(Mn))*de*Ln,yn=0}}Ai.xFn=function(Ao){return Ao.dx+lt-(ki+Ao.fontSize*yn)*Ln+kn*Ao.fontSize},Ai.yFn=function(Ao){return Ao.dy+Ki+Ao.fontSize*ce},Ai.anchorFn=function(Ao,On){return x(On)&&Math.abs(On)===90?"middle":Co?"end":"start"},Ai.heightFn=function(Ao,On,ts){return xt.side==="right"&&(On*=-1),On<-30?-ts:On<30?-.5*ts:0}}return Ai};function qa(xt){return[xt.text,xt.x,xt.axInfo,xt.font,xt.fontSize,xt.fontColor].join("_")}q.drawTicks=function(xt,lt,Br){Br=Br||{};var Cr=lt._id+"tick",xr=[].concat(lt.minor&<.minor.ticks?Br.vals.filter(function(Ur){return Ur.minor&&!Ur.noTick}):[]).concat(lt.ticks?Br.vals.filter(function(Ur){return!Ur.minor&&!Ur.noTick}):[]),Rr=Br.layer.selectAll("path."+Cr).data(xr,qa);Rr.exit().remove(),Rr.enter().append("path").classed(Cr,1).classed("ticks",1).classed("crisp",Br.crisp!==!1).each(function(Ur){return a.stroke(d.select(this),Ur.minor?lt.minor.tickcolor:lt.tickcolor)}).style("stroke-width",function(Ur){return n.crispRound(xt,Ur.minor?lt.minor.tickwidth:lt.tickwidth,1)+"px"}).attr("d",Br.path).style("display",null),Ra(lt,[B]),Rr.attr("transform",Br.transFn)},q.drawGrid=function(xt,lt,Br){if(Br=Br||{},lt.tickmode!=="sync"){var Cr=lt._id+"grid",xr=lt.minor&<.minor.showgrid,Rr=xr?Br.vals.filter(function(Ai){return Ai.minor}):[],Ur=lt.showgrid?Br.vals.filter(function(Ai){return!Ai.minor}):[],Hr=Br.counterAxis;if(Hr&&q.shouldShowZeroLine(xt,lt,Hr))for(var gt=lt.tickmode==="array",Xt=0;Xt=0;ma--){var la=ma?ba:Pa;if(la){var _a=la.selectAll("path."+Cr).data(ma?Ur:Rr,qa);_a.exit().remove(),_a.enter().append("path").classed(Cr,1).classed("crisp",Br.crisp!==!1),_a.attr("transform",Br.transFn).attr("d",Br.path).each(function(Ai){return a.stroke(d.select(this),Ai.minor?lt.minor.gridcolor:lt.gridcolor||"#ddd")}).style("stroke-dasharray",function(Ai){return n.dashStyle(Ai.minor?lt.minor.griddash:lt.griddash,Ai.minor?lt.minor.gridwidth:lt.gridwidth)}).style("stroke-width",function(Ai){return(Ai.minor?Or:lt._gw)+"px"}).style("display",null),typeof Br.path=="function"&&_a.attr("d",Br.path)}}Ra(lt,[P,U])}},q.drawZeroLine=function(xt,lt,Br){Br=Br||Br;var Cr=lt._id+"zl",xr=q.shouldShowZeroLine(xt,lt,Br.counterAxis),Rr=Br.layer.selectAll("path."+Cr).data(xr?[{x:0,id:lt._id}]:[]);Rr.exit().remove(),Rr.enter().append("path").classed(Cr,1).classed("zl",1).classed("crisp",Br.crisp!==!1).each(function(){Br.layer.selectAll("path").sort(function(Ur,Hr){return j(Ur.id,Hr.id)})}),Rr.attr("transform",Br.transFn).attr("d",Br.path).call(a.stroke,lt.zerolinecolor||a.defaultLine).style("stroke-width",n.crispRound(xt,lt.zerolinewidth,lt._gw||1)+"px").style("display",null),Ra(lt,[O])},q.drawLabels=function(xt,lt,Br){Br=Br||{};var Cr=xt._fullLayout,xr=lt._id,Rr=lt.zerolinelayer==="above traces",Ur=Br.cls||xr+"tick",Hr=Br.vals.filter(function(io){return io.text}),gt=Br.labelFns,Xt=Br.secondary?0:lt.tickangle,vr=(lt._prevTickAngles||{})[Ur],Or=Br.layer.selectAll("g."+Ur).data(lt.showticklabels?Hr:[],qa),ba=[];Or.enter().append("g").classed(Ur,1).append("text").attr("text-anchor","middle").each(function(io){var Gn=d.select(this),eo=xt._promises.length;Gn.call(r.positionText,gt.xFn(io),gt.yFn(io)).call(n.font,{family:io.font,size:io.fontSize,color:io.fontColor,weight:io.fontWeight,style:io.fontStyle,variant:io.fontVariant,textcase:io.fontTextcase,lineposition:io.fontLineposition,shadow:io.fontShadow}).text(io.text).call(r.convertToTspans,xt),xt._promises[eo]?ba.push(xt._promises.pop().then(function(){Pa(Gn,Xt)})):Pa(Gn,Xt)}),Ra(lt,[X]),Or.exit().remove(),Br.repositionOnUpdate&&Or.each(function(io){d.select(this).select("text").call(r.positionText,gt.xFn(io),gt.yFn(io))});function Pa(io,Gn){io.each(function(eo){var ns=d.select(this),gs=ns.select(".text-math-group"),Ls=gt.anchorFn(eo,Gn),Xo=Br.transFn.call(ns.node(),eo)+(x(Gn)&&+Gn!=0?" rotate("+Gn+","+gt.xFn(eo)+","+(gt.yFn(eo)-eo.fontSize/2)+")":""),Gi=r.lineCount(ns),Pn=G*eo.fontSize,js=gt.heightFn(eo,x(Gn)?+Gn:0,(Gi-1)*Pn);if(js&&(Xo+=t(0,js)),gs.empty()){var xs=ns.select("text");xs.attr({transform:Xo,"text-anchor":Ls}),xs.style("display",null),lt._adjustTickLabelsOverflow&<._adjustTickLabelsOverflow()}else{var Hn=n.bBox(gs.node()).width,Os=Hn*{end:-.5,start:.5}[Ls];gs.attr("transform",Xo+t(Os,0))}})}lt._adjustTickLabelsOverflow=function(){var io=lt.ticklabeloverflow;if(!(!io||io==="allow")){var Gn=io.indexOf("hide")!==-1,eo=lt._id.charAt(0)==="x",ns=0,gs=eo?xt._fullLayout.width:xt._fullLayout.height;if(io.indexOf("domain")!==-1){var Ls=e.simpleMap(lt.range,lt.r2l);ns=lt.l2p(Ls[0])+lt._offset,gs=lt.l2p(Ls[1])+lt._offset}var Xo=Math.min(ns,gs),Gi=Math.max(ns,gs),Pn=lt.side,js=1/0,xs=-1/0;Or.each(function(Xs){var il=d.select(this),_n=il.select(".text-math-group");if(_n.empty()){var Lo=n.bBox(il.node()),bo=0;eo?(Lo.right>Gi||Lo.leftGi||Lo.top+(lt.tickangle?0:Xs.fontSize/4)lt["_visibleLabelMin_"+Ls._id]?il.style("display","none"):Gi.K==="tick"&&!Xo&&il.node().style.display!=="none"&&il.style("display",null)})})})})},Pa(Or,vr+1?vr:Xt);function ma(){return ba.length&&Promise.all(ba)}var la=null;function _a(){if(Pa(Or,Xt),Hr.length&<.autotickangles&&(lt.type!=="log"||String(lt.dtick).charAt(0)!=="D")){la=lt.autotickangles[0];var io=0,Gn=[],eo,ns=1;Or.each(function(us){io=Math.max(io,us.fontSize);var Ss=lt.l2p(us.x),Nl=Yt(this),su=n.bBox(Nl.node());ns=Math.max(ns,r.lineCount(Nl)),Gn.push({top:0,bottom:10,height:10,left:Ss-su.width/2,right:Ss+su.width/2+2,width:su.width+2})});var gs=(lt.tickson==="boundaries"||lt.showdividers)&&!Br.secondary,Ls=Hr.length,Xo=Math.abs((Hr[Ls-1].x-Hr[0].x)*lt._m)/(Ls-1),Gi=gs?Xo/2:Xo,Pn=gs?lt.ticklen:io*1.25*ns,js=Math.sqrt(Math.pow(Gi,2)+Math.pow(Pn,2)),xs=Gi/js,Hn=lt.autotickangles.map(function(us){return us*Math.PI/180}),Os=Hn.find(function(us){return Math.abs(Math.cos(us))<=xs});Os===void 0&&(Os=Hn.reduce(function(us,Ss){return Math.abs(Math.cos(us))is*ts&&(Mn=ts,xo[ao]=Co[ao]=Ao[ao])}var _s=Math.abs(Mn-Fs);_s-Ln>0?(_s-=Ln,Ln*=1+Ln/_s):Ln=0,lt._id.charAt(0)!=="y"&&(Ln=-Ln),xo[Bn]=Ki.p2r(Ki.r2p(Co[Bn])+kn*Ln),Ki.autorange==="min"||Ki.autorange==="max reversed"?(xo[0]=null,Ki._rangeInitial0=void 0,Ki._rangeInitial1=void 0):(Ki.autorange==="max"||Ki.autorange==="min reversed")&&(xo[1]=null,Ki._rangeInitial0=void 0,Ki._rangeInitial1=void 0),Cr._insideTickLabelsUpdaterange[Ki._name+".range"]=xo}var Oo=e.syncOrAsync(Ai);return Oo&&Oo.then&&xt._promises.push(Oo),Oo};function Wa(xt,lt,Br){var Cr=lt._id+"divider",xr=Br.vals,Rr=Br.layer.selectAll("path."+Cr).data(xr,qa);Rr.exit().remove(),Rr.enter().insert("path",":first-child").classed(Cr,1).classed("crisp",1).call(a.stroke,lt.dividercolor).style("stroke-width",n.crispRound(xt,lt.dividerwidth,1)+"px"),Rr.attr("transform",Br.transFn).attr("d",Br.path)}q.getPxPosition=function(xt,lt){var Br=xt._fullLayout._size,Cr=lt._id.charAt(0),xr=lt.side,Rr;if(lt.anchor!=="free"?Rr=lt._anchorAxis:Cr==="x"?Rr={_offset:Br.t+(1-(lt.position||0))*Br.h,_length:0}:Cr==="y"&&(Rr={_offset:Br.l+(lt.position||0)*Br.w+lt._shift,_length:0}),xr==="top"||xr==="left")return Rr._offset;if(xr==="bottom"||xr==="right")return Rr._offset+Rr._length};function Ca(xt){var lt=xt.title.font.size,Br=(xt.title.text.match(r.BR_TAG_ALL)||[]).length;return xt.title.hasOwnProperty("standoff")?lt*(de+Br*G):Br?lt*(Br+1)*G:lt}function hi(xt,lt){var Br=xt._fullLayout,Cr=lt._id,xr=Cr.charAt(0),Rr=lt.title.font.size,Ur,Hr=(lt.title.text.match(r.BR_TAG_ALL)||[]).length;if(lt.title.hasOwnProperty("standoff"))lt.side==="bottom"||lt.side==="right"?Ur=lt._depth+lt.title.standoff+Rr*de:(lt.side==="top"||lt.side==="left")&&(Ur=lt._depth+lt.title.standoff+Rr*(ce+Hr*G));else{var gt=pi(lt);if(lt.type==="multicategory")Ur=lt._depth;else{var Xt=1.5*Rr;gt&&(Xt=.5*Rr,lt.ticks==="outside"&&(Xt+=lt.ticklen)),Ur=10+Xt+(lt.linewidth?lt.linewidth-1:0)}gt||(xr==="x"?Ur+=lt.side==="top"?Rr*(lt.showticklabels?1:0):Rr*(lt.showticklabels?1.5:.5):Ur+=lt.side==="right"?Rr*(lt.showticklabels?1:.5):Rr*(lt.showticklabels?.5:0))}var vr=q.getPxPosition(xt,lt),Or,ba,Pa;xr==="x"?(ba=lt._offset+lt._length/2,Pa=lt.side==="top"?vr-Ur:vr+Ur):(Pa=lt._offset+lt._length/2,ba=lt.side==="right"?vr+Ur:vr-Ur,Or={rotate:"-90",offset:0});var ma;if(lt.type!=="multicategory"){var la=lt._selections[lt._id+"tick"];if(ma={selection:la,side:lt.side},la&&la.node()&&la.node().parentNode){var _a=n.getTranslate(la.node().parentNode);ma.offsetLeft=_a.x,ma.offsetTop=_a.y}lt.title.hasOwnProperty("standoff")&&(ma.pad=0)}return lt._titleStandoff=Ur,o.draw(xt,Cr+"title",{propContainer:lt,propName:lt._name+".title.text",placeholder:Br._dfltTitle[xr],avoid:ma,transform:Or,attributes:{x:ba,y:Pa,"text-anchor":"middle"}})}q.shouldShowZeroLine=function(xt,lt,Br){var Cr=e.simpleMap(lt.range,lt.r2l);return Cr[0]*Cr[1]<=0&<.zeroline&&(lt.type==="linear"||lt.type==="-")&&!(lt.rangebreaks&<.maskBreaks(0)===N)&&(wi(lt,0)||!Kt(xt,lt,Br,Cr)||Dt(xt,lt))},q.clipEnds=function(xt,lt){return lt.filter(function(Br){return wi(xt,Br.x)})};function wi(xt,lt){var Br=xt.l2p(lt);return Br>1&&Br1)for(xr=1;xr=xr.min&&xt=z:/%L/.test(lt)?xt>=L:/%[SX]/.test(lt)?xt>=R:/%M/.test(lt)?xt>=m:/%[HI]/.test(lt)?xt>=y:/%p/.test(lt)?xt>=u:/%[Aadejuwx]/.test(lt)?xt>=p:/%[UVW]/.test(lt)?xt>=b:/%[Bbm]/.test(lt)?xt>=g:/%[q]/.test(lt)?xt>=w:/%[Yy]/.test(lt)?xt>=T:!0}}}),f5=He({"src/plots/cartesian/autorange_options_defaults.js"(Z,V){"use strict";V.exports=function(x,S,E){var e,t;if(E){var r=S==="reversed"||S==="min reversed"||S==="max reversed";e=E[r?1:0],t=E[r?0:1]}var o=x("autorangeoptions.minallowed",t===null?e:void 0),a=x("autorangeoptions.maxallowed",e===null?t:void 0);o===void 0&&x("autorangeoptions.clipmin"),a===void 0&&x("autorangeoptions.clipmax"),x("autorangeoptions.include")}}}),h5=He({"src/plots/cartesian/range_defaults.js"(Z,V){"use strict";var d=f5();V.exports=function(S,E,e,t){var r=E._template||{},o=E.type||r.type||"-";e("minallowed"),e("maxallowed");var a=e("range");if(!a){var n;!t.noInsiderange&&o!=="log"&&(n=e("insiderange"),n&&(n[0]===null||n[1]===null)&&(E.insiderange=!1,n=void 0),n&&(a=e("range",n)))}var i=E.getAutorangeDflt(a,t),s=e("autorange",i),h;a&&(a[0]===null&&a[1]===null||(a[0]===null||a[1]===null)&&(s==="reversed"||s===!0)||a[0]!==null&&(s==="min"||s==="max reversed")||a[1]!==null&&(s==="max"||s==="min reversed"))&&(a=void 0,delete E.range,E.autorange=!0,h=!0),h||(i=E.getAutorangeDflt(a,t),s=e("autorange",i)),s&&(d(e,s,a),(o==="linear"||o==="-")&&e("rangemode")),E.cleanRange()}}}),uz=He({"node_modules/mouse-event-offset/index.js"(Z,V){var d={left:0,top:0};V.exports=x;function x(E,e,t){e=e||E.currentTarget||E.srcElement,Array.isArray(t)||(t=[0,0]);var r=E.clientX||0,o=E.clientY||0,a=S(e);return t[0]=r-a.left,t[1]=o-a.top,t}function S(E){return E===window||E===document||E===document.body?d:E.getBoundingClientRect()}}}),b2=He({"node_modules/has-passive-events/index.js"(Z,V){"use strict";var d=a5();function x(){var S=!1;try{var E=Object.defineProperty({},"passive",{get:function(){S=!0}});window.addEventListener("test",null,E),window.removeEventListener("test",null,E)}catch{S=!1}return S}V.exports=d&&x()}}),cz=He({"src/components/dragelement/align.js"(Z,V){"use strict";V.exports=function(x,S,E,e,t){var r=(x-E)/(e-E),o=r+S/(e-E),a=(r+o)/2;return t==="left"||t==="bottom"?r:t==="center"||t==="middle"?a:t==="right"||t==="top"?o:r<2/3-a?r:o>4/3-a?o:a}}}),fz=He({"src/components/dragelement/cursor.js"(Z,V){"use strict";var d=sa(),x=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];V.exports=function(E,e,t,r){return t==="left"?E=0:t==="center"?E=1:t==="right"?E=2:E=d.constrain(Math.floor(E*3),0,2),r==="bottom"?e=0:r==="middle"?e=1:r==="top"?e=2:e=d.constrain(Math.floor(e*3),0,2),x[e][E]}}}),hz=He({"src/components/dragelement/unhover.js"(Z,V){"use strict";var d=Qy(),x=y2(),S=T_().getGraphDiv,E=w_(),e=V.exports={};e.wrapped=function(t,r,o){t=S(t),t._fullLayout&&x.clear(t._fullLayout._uid+E.HOVERID),e.raw(t,r,o)},e.raw=function(r,o){var a=r._fullLayout,n=r._hoverdata;o||(o={}),!(o.target&&!r._dragged&&d.triggerHandler(r,"plotly_beforehover",o)===!1)&&(a._hoverlayer.selectAll("g").remove(),a._hoverlayer.selectAll("line").remove(),a._hoverlayer.selectAll("circle").remove(),r._hoverdata=void 0,o.target&&n&&r.emit("plotly_unhover",{event:o,points:n}))}}}),Ap=He({"src/components/dragelement/index.js"(Z,V){"use strict";var d=uz(),x=i5(),S=b2(),E=sa().removeElement,e=lh(),t=V.exports={};t.align=cz(),t.getCursor=fz();var r=hz();t.unhover=r.wrapped,t.unhoverRaw=r.raw,t.init=function(i){var s=i.gd,h=1,f=s._context.doubleClickDelay,v=i.element,c,T,l,_,w,A,M,g;s._mouseDownTime||(s._mouseDownTime=0),v.style.pointerEvents="all",v.onmousedown=u,S?(v._ontouchstart&&v.removeEventListener("touchstart",v._ontouchstart),v._ontouchstart=u,v.addEventListener("touchstart",u,{passive:!1})):v.ontouchstart=u;function b(R,L,z){return Math.abs(R)"u"&&typeof R.clientY>"u"&&(R.clientX=c,R.clientY=T),l=new Date().getTime(),l-s._mouseDownTimef&&(h=Math.max(h-1,1)),s._dragged)i.doneFn&&i.doneFn();else{var L;A.target===M?L=A:(L={target:M,srcElement:M,toElement:M},Object.keys(A).concat(Object.keys(A.__proto__)).forEach(z=>{var F=A[z];!L[z]&&typeof F!="function"&&(L[z]=F)})),i.clickFn&&i.clickFn(h,L),g||M.dispatchEvent(new MouseEvent("click",R))}s._dragging=!1,s._dragged=!1}};function o(){var n=document.createElement("div");n.className="dragcover";var i=n.style;return i.position="fixed",i.left=0,i.right=0,i.top=0,i.bottom=0,i.zIndex=999999999,i.background="none",document.body.appendChild(n),n}t.coverSlip=o;function a(n){return d(n.changedTouches?n.changedTouches[0]:n,document.body)}}}),Kd=He({"src/lib/setcursor.js"(Z,V){"use strict";V.exports=function(x,S){(x.attr("class")||"").split(" ").forEach(function(E){E.indexOf("cursor-")===0&&x.classed(E,!1)}),S&&x.classed("cursor-"+S,!0)}}}),pz=He({"src/lib/override_cursor.js"(Z,V){"use strict";var d=Kd(),x="data-savedcursor",S="!!";V.exports=function(e,t){var r=e.attr(x);if(t){if(!r){for(var o=(e.attr("class")||"").split(" "),a=0;aY.legend.length)for(var se=Y.legend.length;se(a==="legend"?1:0));if(z===!1&&(i[a]=void 0),!(z===!1&&!f.uirevision)&&(c("uirevision",i.uirevision),z!==!1)){c("borderwidth");var F=c("orientation"),N=c("yref"),O=c("xref"),P=F==="h",U=N==="paper",B=O==="paper",X,$,le,ce="left";P?(X=0,d.getComponentMethod("rangeslider","isVisible")(n.xaxis)?U?($=1.1,le="bottom"):($=1,le="top"):U?($=-.1,le="top"):($=0,le="bottom")):($=1,le="auto",B?X=1.02:(X=1,ce="right")),x.coerce(f,v,{x:{valType:"number",editType:"legend",min:B?-2:0,max:B?3:1,dflt:X}},"x"),x.coerce(f,v,{y:{valType:"number",editType:"legend",min:U?-2:0,max:U?3:1,dflt:$}},"y"),c("traceorder",p),r.isGrouped(i[a])&&c("tracegroupgap"),c("entrywidth"),c("entrywidthmode"),c("indentation"),c("itemsizing"),c("itemwidth"),c("itemclick"),c("itemdoubleclick"),c("groupclick"),c("xanchor",ce),c("yanchor",le),c("maxheight"),c("valign"),x.noneOrAll(f,v,["x","y"]);var de=c("title.text");if(de){c("title.side",P?"left":"top");var G=x.extendFlat({},T,{size:x.bigFont(T.size)});x.coerceFont(c,"title.font",G);let Y=h>1;c("titleclick",Y?"toggle":!1),c("titledoubleclick",Y?"toggleothers":!1)}}}V.exports=function(n,i,s){var h,f=s.slice(),v=i.shapes;if(v)for(h=0;hz&&(L=z)}m[c][0]._groupMinRank=L,m[c][0]._preGroupSort=c}var F=function(X,$){return X[0]._groupMinRank-$[0]._groupMinRank||X[0]._preGroupSort-$[0]._preGroupSort},N=function(X,$){return X.trace.legendrank-$.trace.legendrank||X._preSort-$._preSort};for(m.forEach(function(X,$){X[0]._preGroupSort=$}),m.sort(F),c=0;c0)se=Y.width;else return 0;return p?q:Math.min(se,ee)};A.each(function(G){var Y=d.select(this),ee=S.ensureSingle(Y,"g","layers");ee.style("opacity",G[0].trace.opacity);var q=g.indentation,se=g.valign,ae=G[0].lineHeight,j=G[0].height;if(se==="middle"&&q===0||!ae||!j)ee.attr("transform",null);else{var Q={top:1,bottom:-1}[se],re=Q*(.5*(ae-j+3))||0,pe=g.indentation;ee.attr("transform",E(pe,re))}var we=ee.selectAll("g.legendfill").data([G]);we.enter().append("g").classed("legendfill",!0);var Se=ee.selectAll("g.legendlines").data([G]);Se.enter().append("g").classed("legendlines",!0);var Ie=ee.selectAll("g.legendsymbols").data([G]);Ie.enter().append("g").classed("legendsymbols",!0),Ie.selectAll("g.legendpoints").data([G]).enter().append("g").classed("legendpoints",!0)}).each(de).each(F).each(O).each(N).each(U).each(le).each($).each(L).each(z).each(B).each(X);function L(G){var Y=l(G),ee=Y.showFill,q=Y.showLine,se=Y.showGradientLine,ae=Y.showGradientFill,j=Y.anyFill,Q=Y.anyLine,re=G[0],pe=re.trace,we,Se,Ie=r(pe),Re=Ie.colorscale,We=Ie.reversescale,at=function(Ce){if(Ce.size())if(ee)e.fillGroupStyle(Ce,M,!0);else{var Ye="legendfill-"+pe.uid;e.gradient(Ce,M,Ye,T(We),Re,"fill")}},nt=function(Ce){if(Ce.size()){var Ye="legendline-"+pe.uid;e.lineGroupStyle(Ce),e.gradient(Ce,M,Ye,T(We),Re,"stroke")}},tt=o.hasMarkers(pe)||!j?"M5,0":Q?"M5,-2":"M5,-3",qe=d.select(this),he=qe.select(".legendfill").selectAll("path").data(ee||ae?[G]:[]);if(he.enter().append("path").classed("js-fill",!0),he.exit().remove(),he.attr("d",tt+"h"+u+"v6h-"+u+"z").call(at),q||se){var ue=R(void 0,pe.line,v,h);Se=S.minExtend(pe,{line:{width:ue}}),we=[S.minExtend(re,{trace:Se})]}var ne=qe.select(".legendlines").selectAll("path").data(q||se?[we]:[]);ne.enter().append("path").classed("js-line",!0),ne.exit().remove(),ne.attr("d",tt+(se?"l"+u+",0.0001":"h"+u)).call(q?e.lineGroupStyle:nt)}function z(G){var Y=l(G),ee=Y.anyFill,q=Y.anyLine,se=Y.showLine,ae=Y.showMarker,j=G[0],Q=j.trace,re=!ae&&!q&&!ee&&o.hasText(Q),pe,we;function Se(he,ue,ne,Ce){var Ye=S.nestedProperty(Q,he).get(),rt=S.isArrayOrTypedArray(Ye)&&ue?ue(Ye):Ye;if(p&&rt&&Ce!==void 0&&(rt=Ce),ne){if(rtne[1])return ne[1]}return rt}function Ie(he){return j._distinct&&j.index&&he[j.index]?he[j.index]:he[0]}if(ae||re||se){var Re={},We={};if(ae){Re.mc=Se("marker.color",Ie),Re.mx=Se("marker.symbol",Ie),Re.mo=Se("marker.opacity",S.mean,[.2,1]),Re.mlc=Se("marker.line.color",Ie),Re.mlw=Se("marker.line.width",S.mean,[0,5],f),Re.mld=Q._isShape?"solid":Se("marker.line.dash",Ie),We.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var at=Se("marker.size",S.mean,[2,16],s);Re.ms=at,We.marker.size=at}se&&(We.line={width:Se("line.width",Ie,[0,10],h)}),re&&(Re.tx="Aa",Re.tp=Se("textposition",Ie),Re.ts=10,Re.tc=Se("textfont.color",Ie),Re.tf=Se("textfont.family",Ie),Re.tw=Se("textfont.weight",Ie),Re.ty=Se("textfont.style",Ie),Re.tv=Se("textfont.variant",Ie),Re.tC=Se("textfont.textcase",Ie),Re.tE=Se("textfont.lineposition",Ie),Re.tS=Se("textfont.shadow",Ie)),pe=[S.minExtend(j,Re)],we=S.minExtend(Q,We),we.selectedpoints=null,we.texttemplate=null}var nt=d.select(this).select("g.legendpoints"),tt=nt.selectAll("path.scatterpts").data(ae?pe:[]);tt.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",m),tt.exit().remove(),tt.call(e.pointStyle,we,M),ae&&(pe[0].mrc=3);var qe=nt.selectAll("g.pointtext").data(re?pe:[]);qe.enter().append("g").classed("pointtext",!0).append("text").attr("transform",m),qe.exit().remove(),qe.selectAll("text").call(e.textPointStyle,we,M)}function F(G){var Y=G[0].trace,ee=Y.type==="waterfall";if(G[0]._distinct&&ee){var q=G[0].trace[G[0].dir].marker;return G[0].mc=q.color,G[0].mlw=q.line.width,G[0].mlc=q.line.color,P(G,this,"waterfall")}var se=[];Y.visible&&ee&&(se=G[0].hasTotals?[["increasing","M-6,-6V6H0Z"],["totals","M6,6H0L-6,-6H-0Z"],["decreasing","M6,6V-6H0Z"]]:[["increasing","M-6,-6V6H6Z"],["decreasing","M6,6V-6H-6Z"]]);var ae=d.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(se);ae.enter().append("path").classed("legendwaterfall",!0).attr("transform",m).style("stroke-miterlimit",1),ae.exit().remove(),ae.each(function(j){var Q=d.select(this),re=Y[j[0]].marker,pe=R(void 0,re.line,c,f);Q.attr("d",j[1]).style("stroke-width",pe+"px").call(t.fill,re.color),pe&&Q.call(t.stroke,re.line.color)})}function N(G){P(G,this)}function O(G){P(G,this,"funnel")}function P(G,Y,ee){var q=G[0].trace,se=q.marker||{},ae=se.line||{},j=se.cornerradius?"M6,3a3,3,0,0,1-3,3H-3a3,3,0,0,1-3-3V-3a3,3,0,0,1,3-3H3a3,3,0,0,1,3,3Z":"M6,6H-6V-6H6Z",Q=ee?q.visible&&q.type===ee:x.traceIs(q,"bar"),re=d.select(Y).select("g.legendpoints").selectAll("path.legend"+ee).data(Q?[G]:[]);re.enter().append("path").classed("legend"+ee,!0).attr("d",j).attr("transform",m),re.exit().remove(),re.each(function(pe){var we=d.select(this),Se=pe[0],Ie=R(Se.mlw,se.line,c,f);we.style("stroke-width",Ie+"px");var Re=Se.mcc;if(!g._inHover&&"mc"in Se){var We=r(se),at=We.mid;at===void 0&&(at=(We.max+We.min)/2),Re=e.tryColorscale(se,"")(at)}var nt=Re||Se.mc||se.color,tt=se.pattern,qe=e.getPatternAttr,he=tt&&(qe(tt.shape,0,"")||qe(tt.path,0,""));if(he){var ue=qe(tt.bgcolor,0,null),ne=qe(tt.fgcolor,0,null),Ce=tt.fgopacity,Ye=_(tt.size,8,10),rt=_(tt.solidity,.5,1),Ke="legend-"+q.uid;we.call(e.pattern,"legend",M,Ke,he,Ye,rt,Re,tt.fillmode,ue,ne,Ce)}else we.call(t.fill,nt);Ie&&t.stroke(we,Se.mlc||ae.color)})}function U(G){var Y=G[0].trace,ee=d.select(this).select("g.legendpoints").selectAll("path.legendbox").data(Y.visible&&x.traceIs(Y,"box-violin")?[G]:[]);ee.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",m),ee.exit().remove(),ee.each(function(){var q=d.select(this);if((Y.boxpoints==="all"||Y.points==="all")&&t.opacity(Y.fillcolor)===0&&t.opacity((Y.line||{}).color)===0){var se=S.minExtend(Y,{marker:{size:p?s:S.constrain(Y.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});ee.call(e.pointStyle,se,M)}else{var ae=R(void 0,Y.line,c,f);q.style("stroke-width",ae+"px").call(t.fill,Y.fillcolor),ae&&t.stroke(q,Y.line.color)}})}function B(G){var Y=G[0].trace,ee=d.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(Y.visible&&Y.type==="candlestick"?[G,G]:[]);ee.enter().append("path").classed("legendcandle",!0).attr("d",function(q,se){return se?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",m).style("stroke-miterlimit",1),ee.exit().remove(),ee.each(function(q,se){var ae=d.select(this),j=Y[se?"increasing":"decreasing"],Q=R(void 0,j.line,c,f);ae.style("stroke-width",Q+"px").call(t.fill,j.fillcolor),Q&&t.stroke(ae,j.line.color)})}function X(G){var Y=G[0].trace,ee=d.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(Y.visible&&Y.type==="ohlc"?[G,G]:[]);ee.enter().append("path").classed("legendohlc",!0).attr("d",function(q,se){return se?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",m).style("stroke-miterlimit",1),ee.exit().remove(),ee.each(function(q,se){var ae=d.select(this),j=Y[se?"increasing":"decreasing"],Q=R(void 0,j.line,c,f);ae.style("fill","none").call(e.dashLine,j.line.dash,Q),Q&&t.stroke(ae,j.line.color)})}function $(G){ce(G,this,"pie")}function le(G){ce(G,this,"funnelarea")}function ce(G,Y,ee){var q=G[0],se=q.trace,ae=ee?se.visible&&se.type===ee:x.traceIs(se,ee),j=d.select(Y).select("g.legendpoints").selectAll("path.legend"+ee).data(ae?[G]:[]);if(j.enter().append("path").classed("legend"+ee,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",m),j.exit().remove(),j.size()){var Q=se.marker||{},re=R(n(Q.line.width,q.pts),Q.line,c,f),pe="pieLike",we=S.minExtend(se,{marker:{line:{width:re}}},pe),Se=S.minExtend(q,{trace:we},pe);a(j,Se,we,M)}}function de(G){var Y=G[0].trace,ee,q=[];if(Y.visible)switch(Y.type){case"histogram2d":case"heatmap":q=[["M-15,-2V4H15V-2Z"]],ee=!0;break;case"choropleth":case"choroplethmapbox":case"choroplethmap":q=[["M-6,-6V6H6V-6Z"]],ee=!0;break;case"densitymapbox":case"densitymap":q=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],ee="radial";break;case"cone":q=[["M-6,2 A2,2 0 0,0 -6,6 V6L6,4Z"],["M-6,-6 A2,2 0 0,0 -6,-2 L6,-4Z"],["M-6,-2 A2,2 0 0,0 -6,2 L6,0Z"]],ee=!1;break;case"streamtube":q=[["M-6,2 A2,2 0 0,0 -6,6 H6 A2,2 0 0,1 6,2 Z"],["M-6,-6 A2,2 0 0,0 -6,-2 H6 A2,2 0 0,1 6,-6 Z"],["M-6,-2 A2,2 0 0,0 -6,2 H6 A2,2 0 0,1 6,-2 Z"]],ee=!1;break;case"surface":q=[["M-6,-6 A2,3 0 0,0 -6,0 H6 A2,3 0 0,1 6,-6 Z"],["M-6,1 A2,3 0 0,1 -6,6 H6 A2,3 0 0,0 6,0 Z"]],ee=!0;break;case"mesh3d":q=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],ee=!1;break;case"volume":q=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],ee=!0;break;case"isosurface":q=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],ee=!1;break}var se=d.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(q);se.enter().append("path").classed("legend3dandfriends",!0).attr("transform",m).style("stroke-miterlimit",1),se.exit().remove(),se.each(function(ae,j){var Q=d.select(this),re=r(Y),pe=re.colorscale,we=re.reversescale,Se=function(at){if(at.size()){var nt="legendfill-"+Y.uid;e.gradient(at,M,nt,T(we,ee==="radial"),pe,"fill")}},Ie;if(pe){if(!ee){var We=pe.length;Ie=j===0?pe[we?We-1:0][1]:j===1?pe[we?0:We-1][1]:pe[Math.floor((We-1)/2)][1]}}else{var Re=Y.vertexcolor||Y.facecolor||Y.color;Ie=S.isArrayOrTypedArray(Re)?Re[j]||Re[0]:Re}Q.attr("d",ae[0]),Ie?Q.call(t.fill,Ie):Q.call(Se)})}};function T(w,A){var M=A?"radial":"horizontal";return M+(w?"":"reversed")}function l(w){var A=w[0].trace,M=A.contours,g=o.hasLines(A),b=o.hasMarkers(A),p=A.visible&&A.fill&&A.fill!=="none",u=!1,y=!1;if(M){var m=M.coloring;m==="lines"?u=!0:g=m==="none"||m==="heatmap"||M.showlines,M.type==="constraint"?p=M._operation!=="=":(m==="fill"||m==="heatmap")&&(y=!0)}return{showMarker:b,showLine:g,showFill:p,showGradientLine:u,showGradientFill:y,anyLine:g||u,anyFill:p||y}}function _(w,A,M){return w&&S.isArrayOrTypedArray(w)?A:w>M?M:w}}}),y5=He({"src/components/legend/draw.js"(Z,V){"use strict";var d=Wn(),x=sa(),S=bc(),E=lo(),e=Qy(),t=Ap(),r=es(),o=Jn(),a=ou(),n=v5().handleItemClick,i=v5().handleTitleClick,s=m5(),h=uh(),f=h.LINE_SPACING,v=h.FROM_TL,c=h.FROM_BR,T=dz(),l=g5(),_=E_(),w=1,A=/^legend[0-9]*$/;V.exports=function(X,$){if($)g(X,$);else{var le=X._fullLayout,ce=le._legends,de=le._infolayer.selectAll('[class^="legend"]');de.each(function(){var q=d.select(this),se=q.attr("class"),ae=se.split(" ")[0];ae.match(A)&&ce.indexOf(ae)===-1&&q.remove()});for(var G=0;G1)}var re=le.hiddenlabels||[];if(!Y&&(!le.showlegend||!ee.length))return G.selectAll("."+ce).remove(),le._topdefs.select("#"+de).remove(),S.autoMargin(B,ce);var pe=x.ensureSingle(G,"g",ce,function(qe){Y||qe.attr("pointer-events","all")}),we=x.ensureSingleById(le._topdefs,"clipPath",de,function(qe){qe.append("rect")}),Se=x.ensureSingle(pe,"rect","bg",function(qe){qe.attr("shape-rendering","crispEdges")});Se.call(o.stroke,$.bordercolor).call(o.fill,$.bgcolor).style("stroke-width",$.borderwidth+"px");var Ie=x.ensureSingle(pe,"g","scrollbox"),Re=$.title;$._titleWidth=0,$._titleHeight=0;var We;Re.text?(We=x.ensureSingle(Ie,"text",ce+"titletext"),We.attr("text-anchor","start").call(r.font,Re.font).text(Re.text),L(We,Ie,B,$,w),!Y&&($.titleclick||$.titledoubleclick)&&R(Ie,B,$,ce)):(Ie.selectAll("."+ce+"titletext").remove(),Ie.selectAll("."+ce+"titletoggle").remove());var at=x.ensureSingle(pe,"rect","scrollbar",function(qe){qe.attr(s.scrollBarEnterAttrs).call(o.fill,s.scrollBarColor)}),nt=Ie.selectAll("g.groups").data(ee);nt.enter().append("g").attr("class","groups"),nt.exit().remove();var tt=nt.selectAll("g.traces").data(x.identity);tt.enter().append("g").attr("class","traces"),tt.exit().remove(),tt.style("opacity",function(qe){let he=qe[0],ue=he.trace;if(he.groupTitle){let ne=ue.legendgroup,Ce=(le.shapes||[]).filter(function(rt){return rt.showlegend});return B._fullData.concat(Ce).some(function(rt){return rt.legendgroup===ne&&(rt.legend||"legend")===ce&&rt.visible===!0})?1:.5}return E.traceIs(ue,"pie-like")?re.indexOf(qe[0].label)!==-1?.5:1:ue.visible==="legendonly"?.5:1}).each(function(){d.select(this).call(u,B,$)}).call(l,B,$).each(function(qe){Y||qe[0].groupTitle&&$.groupclick==="toggleitem"||d.select(this).call(m,B,ce)}),x.syncOrAsync([S.previousPromises,function(){return N(B,nt,tt,$,Ie)},function(){var qe=le._size,he=$.borderwidth,ue=$.xref==="paper",ne=$.yref==="paper";if(Re.text){let Ct=(le.shapes||[]).filter(function(jt){return jt.showlegend}),Pt=B._fullData.concat(Ct).some(function(jt){let fr=jt.legend||"legend";var ur=Array.isArray(fr)?fr.includes(ce):fr===ce;return ur&&jt.visible===!0});We.style("opacity",Pt?1:.5)}if(!Y){var Ce,Ye;ue?Ce=qe.l+qe.w*$.x-v[P($)]*$._width:Ce=le.width*$.x-v[P($)]*$._width,ne?Ye=qe.t+qe.h*(1-$.y)-v[U($)]*$._effHeight:Ye=le.height*(1-$.y)-v[U($)]*$._effHeight;var rt=O(B,ce,Ce,Ye);if(rt)return;if(le.margin.autoexpand){var Ke=Ce,Mt=Ye;Ce=ue?x.constrain(Ce,0,le.width-$._width):Ke,Ye=ne?x.constrain(Ye,0,le.height-$._effHeight):Mt,Ce!==Ke&&x.log("Constrain "+ce+".x to make legend fit inside graph"),Ye!==Mt&&x.log("Constrain "+ce+".y to make legend fit inside graph")}r.setTranslate(pe,Ce,Ye)}if(at.on(".drag",null),pe.on("wheel",null),Y||$._height<=$._maxHeight||B._context.staticPlot){var kt=$._effHeight;Y&&(kt=$._height),Se.attr({width:$._width-he,height:kt-he,x:he/2,y:he/2}),r.setTranslate(Ie,0,0),we.select("rect").attr({width:$._width-2*he,height:kt-2*he,x:he,y:he}),r.setClipUrl(Ie,de,B),r.setRect(at,0,0,0,0),delete $._scrollY}else{var Nt=Math.max(s.scrollBarMinHeight,$._effHeight*$._effHeight/$._height),Gt=$._effHeight-Nt-2*s.scrollBarMargin,Mr=$._height-$._effHeight,mr=Gt/Mr,qr=Math.min($._scrollY||0,Mr);Se.attr({width:$._width-2*he+s.scrollBarWidth+s.scrollBarMargin,height:$._effHeight-he,x:he/2,y:he/2}),we.select("rect").attr({width:$._width-2*he+s.scrollBarWidth+s.scrollBarMargin,height:$._effHeight-2*he,x:he,y:he+qr}),r.setClipUrl(Ie,de,B),Ue(qr,Nt,mr),pe.on("wheel",function(){qr=x.constrain($._scrollY+d.event.deltaY/Mr*Gt,0,Mr),Ue(qr,Nt,mr),qr!==0&&qr!==Mr&&d.event.preventDefault()});var Er,Ir,_t,Oe=function(Ct,Pt,jt){var fr=(jt-Pt)/mr+Ct;return x.constrain(fr,0,Mr)},Je=function(Ct,Pt,jt){var fr=(Pt-jt)/mr+Ct;return x.constrain(fr,0,Mr)},Ae=d.behavior.drag().on("dragstart",function(){var Ct=d.event.sourceEvent;Ct.type==="touchstart"?Er=Ct.changedTouches[0].clientY:Er=Ct.clientY,_t=qr}).on("drag",function(){var Ct=d.event.sourceEvent;Ct.buttons===2||Ct.ctrlKey||(Ct.type==="touchmove"?Ir=Ct.changedTouches[0].clientY:Ir=Ct.clientY,qr=Oe(_t,Er,Ir),Ue(qr,Nt,mr))});at.call(Ae);var Le=d.behavior.drag().on("dragstart",function(){var Ct=d.event.sourceEvent;Ct.type==="touchstart"&&(Er=Ct.changedTouches[0].clientY,_t=qr)}).on("drag",function(){var Ct=d.event.sourceEvent;Ct.type==="touchmove"&&(Ir=Ct.changedTouches[0].clientY,qr=Je(_t,Er,Ir),Ue(qr,Nt,mr))});Ie.call(Le)}function Ue(Ct,Pt,jt){$._scrollY=B._fullLayout[ce]._scrollY=Ct,r.setTranslate(Ie,0,-Ct),r.setRect(at,$._width,s.scrollBarMargin+Ct*jt,s.scrollBarWidth,Pt),we.select("rect").attr("y",he+Ct)}if(B._context.edits.legendPosition){var Ze,st,ut,Ut;pe.classed("cursor-move",!0),t.init({element:pe.node(),gd:B,prepFn:function(Ct){if(Ct.target!==at.node()){var Pt=r.getTranslate(pe);ut=Pt.x,Ut=Pt.y}},moveFn:function(Ct,Pt){if(ut!==void 0&&Ut!==void 0){var jt=ut+Ct,fr=Ut+Pt;r.setTranslate(pe,jt,fr),Ze=t.align(jt,$._width,qe.l,qe.l+qe.w,$.xanchor),st=t.align(fr+$._height,-$._height,qe.t+qe.h,qe.t,$.yanchor)}},doneFn:function(){if(Ze!==void 0&&st!==void 0){var Ct={};Ct[ce+".x"]=Ze,Ct[ce+".y"]=st,E.call("_guiRelayout",B,Ct)}},clickFn:function(Ct,Pt){var jt=G.selectAll("g.traces").filter(function(){var fr=this.getBoundingClientRect();return Pt.clientX>=fr.left&&Pt.clientX<=fr.right&&Pt.clientY>=fr.top&&Pt.clientY<=fr.bottom});jt.size()>0&&p(B,$,jt,Ct,Pt)}})}}],B)}}function b(B,X,$){var le=B[0],ce=le.width,de=X.entrywidthmode,G=le.trace.legendwidth||X.entrywidth;return de==="fraction"?X._maxWidth*G:$+(G||ce)}function p(B,X,$,le,ce){var de=B._fullLayout,G=$.data()[0][0].trace,Y=X.itemclick,ee=X.itemdoubleclick,q={event:ce,node:$.node(),curveNumber:G.index,expandedIndex:G.index,data:B.data,layout:B.layout,frames:B._transitionData._frames,config:B._context,fullData:B._fullData,fullLayout:de};G._group&&(q.group=G._group),E.traceIs(G,"pie-like")&&(q.label=$.datum()[0].label);var se=e.triggerHandler(B,"plotly_legendclick",q);if(le===1){if(se===!1)return;X._clickTimeout=setTimeout(function(){B._fullLayout&&Y&&n($,B,X,Y)},B._context.doubleClickDelay)}else if(le===2){X._clickTimeout&&clearTimeout(X._clickTimeout),B._legendMouseDownTime=0;var ae=e.triggerHandler(B,"plotly_legenddoubleclick",q);ae!==!1&&se!==!1&&ee&&n($,B,X,ee)}}function u(B,X,$){var le=_.getId($),ce=B.data()[0][0],de=ce.trace,G=E.traceIs(de,"pie-like"),Y=!$._inHover&&X._context.edits.legendText&&!G,ee=$._maxNameLength,q,se;ce.groupTitle?(q=ce.groupTitle.text,se=ce.groupTitle.font):(se=$.font,$.entries?q=ce.text:(q=G?ce.label:de.name,de._meta&&(q=x.templateString(q,de._meta))));var ae=x.ensureSingle(B,"text",le+"text");ae.attr("text-anchor","start").call(r.font,se).text(Y?y(q,ee):q);var j=$.indentation+$.itemwidth+s.itemGap*2;a.positionText(ae,j,0),Y?ae.call(a.makeEditable,{gd:X,text:q}).call(L,B,X,$).on("edit",function(Q){this.text(y(Q,ee)).call(L,B,X,$);var re=ce.trace._fullInput||{},pe={};return pe.name=Q,re._isShape?E.call("_guiRelayout",X,"shapes["+de.index+"].name",pe.name):E.call("_guiRestyle",X,pe,de.index)}):L(ae,B,X,$)}function y(B,X){var $=Math.max(4,X);if(B&&B.trim().length>=$/2)return B;B=B||"";for(var le=$-B.length;le>0;le--)B+=" ";return B}function m(B,X,$){var le=X._context.doubleClickDelay,ce,de=1,G=x.ensureSingle(B,"rect",$+"toggle",function(Y){X._context.staticPlot||Y.style("cursor","pointer").attr("pointer-events","all"),Y.call(o.fill,"rgba(0,0,0,0)")});X._context.staticPlot||(G.on("mousedown",function(){ce=new Date().getTime(),ce-X._legendMouseDownTimele&&(de=Math.max(de-1,1)),p(X,Y,B,de,d.event)}}))}function R(B,X,$,le){if(X._fullData.some(function(q){let se=q.legend||"legend";return(Array.isArray(se)?se.includes(le):se===le)&&E.traceIs(q,"pie-like")}))return;let de=X._context.doubleClickDelay;var G,Y=1;let ee=x.ensureSingle(B,"rect",le+"titletoggle",function(q){X._context.staticPlot||q.style("cursor","pointer").attr("pointer-events","all"),q.call(o.fill,"rgba(0,0,0,0)")});X._context.staticPlot||(ee.on("mousedown",function(){G=new Date().getTime(),G-X._legendMouseDownTimede&&(Y=Math.max(Y-1,1));let q={event:d.event,legendId:le,data:X.data,layout:X.layout,fullData:X._fullData,fullLayout:X._fullLayout};if(Y===1&&$.titleclick){if(e.triggerHandler(X,"plotly_legendtitleclick",q)===!1)return;$._titleClickTimeout=setTimeout(function(){X._fullLayout&&i(X,$,$.titleclick)},de)}else Y===2&&($._titleClickTimeout&&clearTimeout($._titleClickTimeout),X._legendMouseDownTime=0,e.triggerHandler(X,"plotly_legendtitledoubleclick",q)!==!1&&$.titledoubleclick&&i(X,$,$.titledoubleclick))}))}function L(B,X,$,le,ce){le._inHover&&B.attr("data-notex",!0),a.convertToTspans(B,$,function(){z(X,$,le,ce)})}function z(B,X,$,le){var ce=B.data()[0][0],de=ce&&ce.trace.showlegend;if(Array.isArray(de)&&(de=de[ce.i]!==!1),!$._inHover&&ce&&!de){B.remove();return}var G=B.select("g[class*=math-group]"),Y=G.node(),ee=_.getId($);$||($=X._fullLayout[ee]);var q=$.borderwidth,se;le===w?se=$.title.font:ce.groupTitle?se=ce.groupTitle.font:se=$.font;var ae=se.size*f,j,Q;if(Y){var re=r.bBox(Y);j=re.height,Q=re.width,le===w?r.setTranslate(G,q,q+j*.75):r.setTranslate(G,0,j*.25)}else{var pe="."+ee+(le===w?"title":"")+"text",we=B.select(pe),Se=a.lineCount(we),Ie=we.node();if(j=ae*Se,Q=Ie?r.bBox(Ie).width:0,le===w)$.title.side==="left"&&(Q+=s.itemGap*2),a.positionText(we,q+s.titlePad,q+ae);else{var Re=s.itemGap*2+$.indentation+$.itemwidth;ce.groupTitle&&(Re=s.itemGap,Q-=$.indentation+$.itemwidth),a.positionText(we,Re,-ae*((Se-1)/2-.3))}}le===w?($._titleWidth=Q,$._titleHeight=j):(ce.lineHeight=ae,ce.height=Math.max(j,16)+3,ce.width=Q)}function F(B){var X=0,$=0,le=B.title.side;return le&&(le.indexOf("left")!==-1&&(X=B._titleWidth),le.indexOf("top")!==-1&&($=B._titleHeight)),[X,$]}function N(B,X,$,le,ce){var de=B._fullLayout,G=_.getId(le);le||(le=de[G]);var Y=de._size,ee=_.isVertical(le),q=_.isGrouped(le),se=le.entrywidthmode==="fraction",ae=le.borderwidth,j=2*ae,Q=s.itemGap,re=le.indentation+le.itemwidth+Q*2,pe=2*(ae+Q),we=U(le),Se=le.y<0||le.y===0&&we==="top",Ie=le.y>1||le.y===1&&we==="bottom",Re=le.tracegroupgap,We={};let{orientation:at,yref:nt}=le,{maxheight:tt}=le,qe=Se||Ie||at!=="v"||nt!=="paper";tt||(tt=qe?.5:1);let he=qe?de.height:Y.h;le._maxHeight=Math.max(tt>1?tt:tt*he,30);var ue=0;le._width=0,le._height=0;var ne=F(le);if(ee)$.each(function(Ct){var Pt=Ct[0].height;r.setTranslate(this,ae+ne[0],ae+ne[1]+le._height+Pt/2+Q),le._height+=Pt,le._width=Math.max(le._width,Ct[0].width)}),ue=re+le._width,le._width+=Q+re+j,le._height+=pe,q&&(X.each(function(Ct,Pt){r.setTranslate(this,0,Pt*le.tracegroupgap)}),le._height+=(le._lgroupsLength-1)*le.tracegroupgap);else{var Ce=P(le),Ye=le.x<0||le.x===0&&Ce==="right",rt=le.x>1||le.x===1&&Ce==="left",Ke=Ie||Se,Mt=de.width/2;le._maxWidth=Math.max(Ye?Ke&&Ce==="left"?Y.l+Y.w:Mt:rt?Ke&&Ce==="right"?Y.r+Y.w:Mt:Y.w,2*re);var kt=0,Nt=0;$.each(function(Ct){var Pt=b(Ct,le,re);kt=Math.max(kt,Pt),Nt+=Pt}),ue=null;var Gt=0;if(q){var Mr=0,mr=0,qr=0;X.each(function(){var Ct=0,Pt=0;d.select(this).selectAll("g.traces").each(function(fr){var ur=b(fr,le,re),sr=fr[0].height;r.setTranslate(this,ne[0],ne[1]+ae+Q+sr/2+Pt),Pt+=sr,Ct=Math.max(Ct,ur),We[fr[0].trace.legendgroup]=Ct});var jt=Ct+Q;mr>0&&jt+ae+mr>le._maxWidth?(Gt=Math.max(Gt,mr),mr=0,qr+=Mr+Re,Mr=Pt):Mr=Math.max(Mr,Pt),r.setTranslate(this,mr,qr),mr+=jt}),le._width=Math.max(Gt,mr)+ae,le._height=qr+Mr+pe}else{var Er=$.size(),Ir=Nt+j+(Er-1)*Q=le._maxWidth&&(Gt=Math.max(Gt,Ae),Oe=0,Je+=_t,le._height+=_t,_t=0),r.setTranslate(this,ne[0]+ae+Oe,ne[1]+ae+Je+Pt/2+Q),Ae=Oe+jt+Q,Oe+=fr,_t=Math.max(_t,Pt)}),Ir?(le._width=Oe+j,le._height=_t+pe):(le._width=Math.max(Gt,Ae)+j,le._height+=_t+pe)}}le._width=Math.ceil(Math.max(le._width+ne[0],le._titleWidth+2*(ae+s.titlePad))),le._height=Math.ceil(Math.max(le._height+ne[1],le._titleHeight+2*(ae+s.itemGap))),le._effHeight=Math.min(le._height,le._maxHeight);var Le=B._context.edits,Ue=Le.legendText||Le.legendPosition;$.each(function(Ct){var Pt=d.select(this).select("."+G+"toggle"),jt=Ct[0].height,fr=Ct[0].trace.legendgroup,ur=b(Ct,le,re);q&&fr!==""&&(ur=We[fr]);var sr=Ue?re:ue||ur;!ee&&!se&&(sr+=Q/2),r.setRect(Pt,0,-jt/2,sr,jt)});var Ze=ce.select("."+G+"titletext");Ze.node()&&M(Ze,le,ae);var st=ce.select("."+G+"titletoggle");if(st.size()&&Ze.node()){var ut=Ze.attr("x")||0,Ut=s.titlePad;r.setRect(st,ut-Ut,ae,le._titleWidth+2*Ut,le._titleHeight+2*Ut)}}function O(B,X,$,le){var ce=B._fullLayout,de=ce[X],G=P(de),Y=U(de),ee=de.xref==="paper",q=de.yref==="paper";B._fullLayout._reservedMargin[X]={};var se=de.y<.5?"b":"t",ae=de.x<.5?"l":"r",j={r:ce.width-$,l:$+de._width,b:ce.height-le,t:le+de._effHeight};if(ee&&q)return S.autoMargin(B,X,{x:de.x,y:de.y,l:de._width*v[G],r:de._width*c[G],b:de._effHeight*c[Y],t:de._effHeight*v[Y]});ee?B._fullLayout._reservedMargin[X][se]=j[se]:q||de.orientation==="v"?B._fullLayout._reservedMargin[X][ae]=j[ae]:B._fullLayout._reservedMargin[X][se]=j[se]}function P(B){return x.isRightAnchor(B)?"right":x.isCenterAnchor(B)?"center":"left"}function U(B){return x.isBottomAnchor(B)?"bottom":x.isMiddleAnchor(B)?"middle":"top"}}}),_5=He({"src/components/fx/hover.js"(Z){"use strict";var V=Wn(),d=as(),x=Ch(),S=sa(),E=S.pushUnique,e=S.strTranslate,t=S.strRotate,r=Qy(),o=ou(),a=pz(),n=es(),i=Jn(),s=Ap(),h=Ho(),f=lh().zindexSeparator,v=lo(),c=$p(),T=w_(),l=d5(),_=y5(),w=T.YANGLE,A=Math.PI*w/180,M=1/Math.sin(A),g=Math.cos(A),b=Math.sin(A),p=T.HOVERARROWSIZE,u=T.HOVERTEXTPAD,y={box:!0,ohlc:!0,violin:!0,candlestick:!0},m={scatter:!0,scattergl:!0,splom:!0};function R(j,Q){return j.distance-Q.distance}Z.hover=function(Q,re,pe,we){Q=S.getGraphDiv(Q);var Se=re.target;S.throttle(Q._fullLayout._uid+T.HOVERID,T.HOVERMINTIME,function(){L(Q,re,pe,we,Se)})},Z.loneHover=function(Q,re){var pe=!0;Array.isArray(Q)||(pe=!1,Q=[Q]);var we=re.gd,Se=q(we),Ie=se(we),Re=Q.map(function(Ce){var Ye=Ce._x0||Ce.x0||Ce.x||0,rt=Ce._x1||Ce.x1||Ce.x||0,Ke=Ce._y0||Ce.y0||Ce.y||0,Mt=Ce._y1||Ce.y1||Ce.y||0,kt=Ce.eventData;if(kt){var Nt=Math.min(Ye,rt),Gt=Math.max(Ye,rt),Mr=Math.min(Ke,Mt),mr=Math.max(Ke,Mt),qr=Ce.trace;if(v.traceIs(qr,"gl3d")){var Er=we._fullLayout[qr.scene]._scene.container,Ir=Er.offsetLeft,_t=Er.offsetTop;Nt+=Ir,Gt+=Ir,Mr+=_t,mr+=_t}kt.bbox={x0:Nt+Ie,x1:Gt+Ie,y0:Mr+Se,y1:mr+Se},kt.xPixel=(Ye+rt)/2,kt.yPixel=(Ke+Mt)/2,re.inOut_bbox&&re.inOut_bbox.push(kt.bbox)}else kt=!1;return{color:Ce.color||i.defaultLine,x0:Ce.x0||Ce.x||0,x1:Ce.x1||Ce.x||0,y0:Ce.y0||Ce.y||0,y1:Ce.y1||Ce.y||0,xLabel:Ce.xLabel,yLabel:Ce.yLabel,zLabel:Ce.zLabel,text:Ce.text,name:Ce.name,idealAlign:Ce.idealAlign,borderColor:Ce.borderColor,fontFamily:Ce.fontFamily,fontSize:Ce.fontSize,fontColor:Ce.fontColor,fontWeight:Ce.fontWeight,fontStyle:Ce.fontStyle,fontVariant:Ce.fontVariant,nameLength:Ce.nameLength,textAlign:Ce.textAlign,trace:Ce.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:Ce.hovertemplate||!1,hovertemplateLabels:Ce.hovertemplateLabels||!1,eventData:kt}}),We=!1,at=N(Re,{gd:we,hovermode:"closest",rotateLabels:We,bgColor:re.bgColor||i.background,container:V.select(re.container),outerContainer:re.outerContainer||re.container}),nt=at.hoverLabels,tt=5,qe=0,he=0;nt.sort(function(Ce,Ye){return Ce.y0-Ye.y0}).each(function(Ce,Ye){var rt=Ce.y0-Ce.by/2;rt-ttGt[0]._length||Wa<0||Wa>Mr[0]._length)return s.unhoverRaw(j,Q)}if(Q.pointerX=qa+Gt[0]._offset,Q.pointerY=Wa+Mr[0]._offset,"xval"in Q?Ae=c.flat(Se,Q.xval):Ae=c.p2c(Gt,qa),"yval"in Q?Le=c.flat(Se,Q.yval):Le=c.p2c(Mr,Wa),!d(Ae[0])||!d(Le[0]))return S.warn("Fx.hover failed",Q,j),s.unhoverRaw(j,Q)}Re.clickanywhere&&(j._hoverXVals=Ae,j._hoverYVals=Le,j._hoverXAxes=Gt,j._hoverYAxes=Mr);var wi=1/0;function Kt(Mn,Ao){for(Ze=0;Zesr&&(Oe.splice(0,sr),wi=Oe[0].distance),tt&&_t!==0&&Oe.length===0){ur.distance=_t,ur.index=!1;var Oo=ut._module.hoverPoints(ur,jt,fr,"closest",{hoverLayer:Re._hoverlayer});if(Oo&&(Oo=Oo.filter(function(Ls){return Ls.spikeDistance<=_t})),Oo&&Oo.length){var io,Gn=Oo.filter(function(Ls){return Ls.xa.showspikes&&Ls.xa.spikesnap!=="hovered data"});if(Gn.length){var eo=Gn[0];d(eo.x0)&&d(eo.y0)&&(io=Yt(eo),(!Pr.vLinePoint||Pr.vLinePoint.spikeDistance>io.spikeDistance)&&(Pr.vLinePoint=io))}var ns=Oo.filter(function(Ls){return Ls.ya.showspikes&&Ls.ya.spikesnap!=="hovered data"});if(ns.length){var gs=ns[0];d(gs.x0)&&d(gs.y0)&&(io=Yt(gs),(!Pr.hLinePoint||Pr.hLinePoint.spikeDistance>io.spikeDistance)&&(Pr.hLinePoint=io))}}}}}Kt();function Dt(Mn,Ao,On){for(var ts=null,is=1/0,_s,Oo=0;OoMn.trace.index===tn.trace.index):Oe=[tn];var fn=Oe.length,xt=ee("x",tn,Re),lt=ee("y",tn,Re);Kt(xt,lt);var Br=[],Cr={},xr=0,Rr=function(Mn){var Ao=y[Mn.trace.type]?z(Mn):Mn.trace.index;if(!Cr[Ao])xr++,Cr[Ao]=xr,Br.push(Mn);else{var On=Cr[Ao]-1,ts=Br[On];On>0&&Math.abs(Mn.distance)fn-1;Ur--)Rr(Oe[Ur]);Oe=Br,ra()}var Hr=j._hoverdata,gt=[],Xt=q(j),vr=se(j);for(let Mn of Oe){var Or=c.makeEventData(Mn,Mn.trace,Mn.cd);if(Mn.hovertemplate!==!1){var ba=!1;Mn.cd[Mn.index]&&Mn.cd[Mn.index].ht&&(ba=Mn.cd[Mn.index].ht),Mn.hovertemplate=ba||Mn.trace.hovertemplate||!1}if(Mn.xa&&Mn.ya){var Pa=Mn.x0+Mn.xa._offset,ma=Mn.x1+Mn.xa._offset,la=Mn.y0+Mn.ya._offset,_a=Mn.y1+Mn.ya._offset,Ai=Math.min(Pa,ma),ki=Math.max(Pa,ma),Ki=Math.min(la,_a),yn=Math.max(la,_a);Or.bbox={x0:Ai+vr,x1:ki+vr,y0:Ki+Xt,y1:yn+Xt},Or.xPixel=(Pa+ma)/2,Or.yPixel=(la+_a)/2}Mn.eventData=[Or],gt.push(Or)}j._hoverdata=gt;var Ln=qe==="y"&&(Je.length>1||Oe.length>1)||qe==="closest"&&Ta&&Oe.length>1,kn=i.combine(Re.plot_bgcolor||i.background,Re.paper_bgcolor),Bn=N(Oe,{gd:j,hovermode:qe,rotateLabels:Ln,bgColor:kn,container:Re._hoverlayer,outerContainer:Re._paper.node(),commonLabelOpts:Re.hoverlabel,hoverdistance:Re.hoverdistance}),ao=Bn.hoverLabels;if(c.isUnifiedHover(qe)||(P(ao,Ln,Re,Bn.commonLabelBoundingBox),X(ao,Ln,Re._invScaleX,Re._invScaleY)),we&&we.tagName){var xo=v.getComponentMethod("annotations","hasClickToShow")(j,gt);a(V.select(we),xo?"pointer":"")}var Co=ce(j,Q,Hr);if(!we||pe||!Co&&!Re.hoveranywhere)return;Hr&&Co&&j.emit("plotly_unhover",{event:Q,points:Hr}),Fs(j._hoverdata);function Fs(Mn){j.emit("plotly_hover",{event:Q,points:Mn,xaxes:Gt,yaxes:Mr,xvals:Ae,yvals:Le})}}function z(j){return[j.trace.index,j.index,j.x0,j.y0,j.name,j.attr,j.xa?j.xa._id:"",j.ya?j.ya._id:""].join(",")}var F=/([\s\S]*)<\/extra>/;function N(j,Q){var re=Q.gd,pe=re._fullLayout,we=Q.hovermode,Se=Q.rotateLabels,Ie=Q.bgColor,Re=Q.container,We=Q.outerContainer,at=Q.commonLabelOpts||{};if(j.length===0)return[[]];var nt=Q.fontFamily||T.HOVERFONT,tt=Q.fontSize||T.HOVERFONTSIZE,qe=Q.fontWeight||pe.font.weight,he=Q.fontStyle||pe.font.style,ue=Q.fontVariant||pe.font.variant,ne=Q.fontTextcase||pe.font.textcase,Ce=Q.fontLineposition||pe.font.lineposition,Ye=Q.fontShadow||pe.font.shadow,rt=j[0],Ke=rt.xa,Mt=rt.ya,kt=we.charAt(0),Nt=kt+"Label",Gt=rt[Nt];if(Gt===void 0&&Ke.type==="multicategory")for(var Mr=0;Mrpe.width-gt&&(Xt=pe.width-gt),an.attr("d","M"+(Rr-Xt)+",0L"+(Rr-Xt+p)+","+Hr+p+"H"+gt+"v"+Hr+(u*2+xr.height)+"H"+-gt+"V"+Hr+p+"H"+(Rr-Xt-p)+"Z"),Rr=Xt,Ze.minX=Rr-gt,Ze.maxX=Rr+gt,Ke.side==="top"?(Ze.minY=Ur-(u*2+xr.height),Ze.maxY=Ur-u):(Ze.minY=Ur+u,Ze.maxY=Ur+(u*2+xr.height))}else{var vr,Or,ba;Mt.side==="right"?(vr="start",Or=1,ba="",Rr=Ke._offset+Ke._length):(vr="end",Or=-1,ba="-",Rr=Ke._offset),Ur=Mt._offset+(rt.y0+rt.y1)/2,tn.attr("text-anchor",vr),an.attr("d","M0,0L"+ba+p+","+p+"V"+(u+xr.height/2)+"h"+ba+(u*2+xr.width)+"V-"+(u+xr.height/2)+"H"+ba+p+"V-"+p+"Z"),Ze.minY=Ur-(u+xr.height/2),Ze.maxY=Ur+(u+xr.height/2),Mt.side==="right"?(Ze.minX=Rr+p,Ze.maxX=Rr+p+(u*2+xr.width)):(Ze.minX=Rr-p-(u*2+xr.width),Ze.maxX=Rr-p);var Pa=xr.height/2,ma=qr-xr.top-Pa,la="clip"+pe._uid+"commonlabel"+Mt._id,_a;if(Rran.hoverinfo!=="none");if(Ra.length===0)return[];var st=pe.hoverlabel,ut=st.font,Ut=Ra[0],Ct=((we==="x unified"?Ut.xa:Ut.ya).unifiedhovertitle||{}).text,Pt=Ct?S.hovertemplateString({data:we==="x unified"?[{xa:Ut.xa,x:Ut.xVal}]:[{ya:Ut.ya,y:Ut.yVal}],fallback:Ut.trace.hovertemplatefallback,locale:pe._d3locale,template:Ct}):Gt,jt={showlegend:!0,legend:{title:{text:Pt,font:ut},font:ut,bgcolor:st.bgcolor,bordercolor:st.bordercolor,borderwidth:1,tracegroupgap:7,traceorder:pe.legend?pe.legend.traceorder:void 0,orientation:"v"}},fr={font:ut};l(jt,fr,re._fullData);var ur=fr.legend;ur.entries=[];for(var sr=0;sr=0?Za=ra:ca+hi=0?Za=ca:Ba+hi=0?ri=Fr:ta+wi=0?ri=ta:$a+wi=0,(Ra.idealAlign==="top"||!Ki)&&yn?(ba-=ma/2,Ra.anchor="end"):Ki?(ba+=ma/2,Ra.anchor="start"):Ra.anchor="middle",Ra.crossPos=ba;else{if(Ra.pos=ba,Ki=Or+Pa/2+ki<=Er,yn=Or-Pa/2-ki>=0,(Ra.idealAlign==="left"||!Ki)&&yn)Or-=Pa/2,Ra.anchor="end";else if(Ki)Or+=Pa/2,Ra.anchor="start";else{Ra.anchor="middle";var Ln=ki/2,kn=Or+Ln-Er,Bn=Or-Ln;kn>0&&(Or-=kn),Bn<0&&(Or+=-Bn)}Ra.crossPos=Or}Ur.attr("text-anchor",Ra.anchor),gt&&Hr.attr("text-anchor",Ra.anchor),an.attr("transform",e(Or,ba)+(Se?t(w):""))}),{hoverLabels:pi,commonLabelBoundingBox:Ze}}function O(j,Q,re,pe,we,Se){var Ie,Re,We="",at="";j.nameOverride!==void 0&&(j.name=j.nameOverride),j.name&&(j.trace._meta&&(j.name=S.templateString(j.name,j.trace._meta)),We=G(j.name,j.nameLength));var nt=re.charAt(0),tt=nt==="x"?"y":"x";j.zLabel!==void 0?(j.xLabel!==void 0&&(at+="x: "+j.xLabel+"
"),j.yLabel!==void 0&&(at+="y: "+j.yLabel+"
"),j.trace.type!=="choropleth"&&j.trace.type!=="choroplethmapbox"&&j.trace.type!=="choroplethmap"&&(at+=(at?"z: ":"")+j.zLabel)):Q&&j[nt+"Label"]===we?at=j[tt+"Label"]||"":j.xLabel===void 0?j.yLabel!==void 0&&j.trace.type!=="scattercarpet"&&(at=j.yLabel):j.yLabel===void 0?at=j.xLabel:at="("+j.xLabel+", "+j.yLabel+")",(j.text||j.text===0)&&!Array.isArray(j.text)&&(at+=(at?"
":"")+j.text),j.extraText!==void 0&&(at+=(at?"
":"")+j.extraText),Se&&at===""&&!j.hovertemplate&&(We===""&&Se.remove(),at=We),(Re=(Ie=j.trace)==null?void 0:Ie.hoverlabel)!=null&&Re.split&&(j.hovertemplate="");let{hovertemplate:qe=!1}=j;if(qe){let he=j.hovertemplateLabels||j;j[nt+"Label"]!==we&&(he[nt+"other"]=he[nt+"Val"],he[nt+"otherLabel"]=he[nt+"Label"]),at=S.hovertemplateString({data:[j.eventData[0]||{},j.trace._meta],fallback:j.trace.hovertemplatefallback,labels:he,locale:pe._d3locale,template:qe}),at=at.replace(F,(ue,ne)=>(We=G(ne,j.nameLength),""))}return[at,We]}function P(j,Q,re,pe){var we=Q?"xa":"ya",Se=Q?"ya":"xa",Ie=0,Re=1,We=j.size(),at=new Array(We),nt=0,tt=pe.minX,qe=pe.maxX,he=pe.minY,ue=pe.maxY,ne=function(Ae){return Ae*re._invScaleX},Ce=function(Ae){return Ae*re._invScaleY};j.each(function(Ae){var Le=Ae[we],Ue=Ae[Se],Ze=Le._id.charAt(0)==="x",st=Le.range;nt===0&&st&&st[0]>st[1]!==Ze&&(Re=-1);var ut=0,Ut=Ze?re.width:re.height;if(re.hovermode==="x"||re.hovermode==="y"){var Ct=U(Ae,Q),Pt=Ae.anchor,jt=Pt==="end"?-1:1,fr,ur;if(Pt==="middle")fr=Ae.crossPos+(Ze?Ce(Ct.y-Ae.by/2):ne(Ae.bx/2+Ae.tx2width/2)),ur=fr+(Ze?Ce(Ae.by):ne(Ae.bx));else if(Ze)fr=Ae.crossPos+Ce(p+Ct.y)-Ce(Ae.by/2-p),ur=fr+Ce(Ae.by);else{var sr=ne(jt*p+Ct.x),Pr=sr+ne(jt*Ae.bx);fr=Ae.crossPos+Math.min(sr,Pr),ur=Ae.crossPos+Math.max(sr,Pr)}Ze?he!==void 0&&ue!==void 0&&Math.min(ur,ue)-Math.max(fr,he)>1&&(Ue.side==="left"?(ut=Ue._mainLinePosition,Ut=re.width):Ut=Ue._mainLinePosition):tt!==void 0&&qe!==void 0&&Math.min(ur,qe)-Math.max(fr,tt)>1&&(Ue.side==="top"?(ut=Ue._mainLinePosition,Ut=re.height):Ut=Ue._mainLinePosition)}at[nt++]=[{datum:Ae,traceIndex:Ae.trace.index,dp:0,pos:Ae.pos,posref:Ae.posref,size:Ae.by*(Ze?M:1)/2,pmin:ut,pmax:Ut}]}),at.sort(function(Ae,Le){return Ae[0].posref-Le[0].posref||Re*(Le[0].traceIndex-Ae[0].traceIndex)});var Ye,rt,Ke,Mt,kt,Nt,Gt;function Mr(Ae){var Le=Ae[0],Ue=Ae[Ae.length-1];if(rt=Le.pmin-Le.pos-Le.dp+Le.size,Ke=Ue.pos+Ue.dp+Ue.size-Le.pmax,rt>.01){for(kt=Ae.length-1;kt>=0;kt--)Ae[kt].dp+=rt;Ye=!1}if(!(Ke<.01)){if(rt<-.01){for(kt=Ae.length-1;kt>=0;kt--)Ae[kt].dp-=Ke;Ye=!1}if(Ye){var Ze=0;for(Mt=0;MtLe.pmax&&Ze++;for(Mt=Ae.length-1;Mt>=0&&!(Ze<=0);Mt--)Nt=Ae[Mt],Nt.pos>Le.pmax-1&&(Nt.del=!0,Ze--);for(Mt=0;Mt=0;kt--)Ae[kt].dp-=Ke;for(Mt=Ae.length-1;Mt>=0&&!(Ze<=0);Mt--)Nt=Ae[Mt],Nt.pos+Nt.dp+Nt.size>Le.pmax&&(Nt.del=!0,Ze--)}}}for(;!Ye&&Ie<=We;){for(Ie++,Ye=!0,Mt=0;Mt.01){for(kt=qr.length-1;kt>=0;kt--)qr[kt].dp+=rt;for(mr.push.apply(mr,qr),at.splice(Mt+1,1),Gt=0,kt=mr.length-1;kt>=0;kt--)Gt+=mr[kt].dp;for(Ke=Gt/mr.length,kt=mr.length-1;kt>=0;kt--)mr[kt].dp-=Ke;Ye=!1}else Mt++}at.forEach(Mr)}for(Mt=at.length-1;Mt>=0;Mt--){var _t=at[Mt];for(kt=_t.length-1;kt>=0;kt--){var Oe=_t[kt],Je=Oe.datum;Je.offset=Oe.dp,Je.del=Oe.del}}}function U(j,Q){var re=0,pe=j.offset;return Q&&(pe*=-b,re=j.offset*g),{x:re,y:pe}}function B(j){var Q={start:1,end:-1,middle:0}[j.anchor],re=Q*(p+u),pe=re+Q*(j.txwidth+u),we=j.anchor==="middle";return we&&(re-=j.tx2width/2,pe+=j.txwidth/2+u),{alignShift:Q,textShiftX:re,text2ShiftX:pe}}function X(j,Q,re,pe){var we=function(Ie){return Ie*re},Se=function(Ie){return Ie*pe};j.each(function(Ie){var Re=V.select(this);if(Ie.del)return Re.remove();var We=Re.select("text.nums"),at=Ie.anchor,nt=at==="end"?-1:1,tt=B(Ie),qe=U(Ie,Q),he=qe.x,ue=qe.y,ne=at==="middle",Ce="hoverlabel"in Ie.trace?Ie.trace.hoverlabel.showarrow:!0,Ye;ne?Ye="M-"+we(Ie.bx/2+Ie.tx2width/2)+","+Se(ue-Ie.by/2)+"h"+we(Ie.bx)+"v"+Se(Ie.by)+"h-"+we(Ie.bx)+"Z":Ce?Ye="M0,0L"+we(nt*p+he)+","+Se(p+ue)+"v"+Se(Ie.by/2-p)+"h"+we(nt*Ie.bx)+"v-"+Se(Ie.by)+"H"+we(nt*p+he)+"V"+Se(ue-p)+"Z":Ye="M"+we(nt*p+he)+","+Se(ue-Ie.by/2)+"h"+we(nt*Ie.bx)+"v"+Se(Ie.by)+"h"+we(-nt*Ie.bx)+"Z",Re.select("path").attr("d",Ye);var rt=he+tt.textShiftX,Ke=ue+Ie.ty0-Ie.by/2+u,Mt=Ie.textAlign||"auto";Mt!=="auto"&&(Mt==="left"&&at!=="start"?(We.attr("text-anchor","start"),rt=ne?-Ie.bx/2-Ie.tx2width/2+u:-Ie.bx-u):Mt==="right"&&at!=="end"&&(We.attr("text-anchor","end"),rt=ne?Ie.bx/2-Ie.tx2width/2-u:Ie.bx+u)),We.call(o.positionText,we(rt),Se(Ke)),Ie.tx2width&&(Re.select("text.name").call(o.positionText,we(tt.text2ShiftX+tt.alignShift*u+he),Se(ue+Ie.ty0-Ie.by/2+u)),Re.select("rect").call(n.setRect,we(tt.text2ShiftX+(tt.alignShift-1)*Ie.tx2width/2+he),Se(ue-Ie.by/2-1),we(Ie.tx2width),Se(Ie.by+2)))})}function $(j,Q){var re=j.index,pe=j.trace||{},we=j.cd[0],Se=j.cd[re]||{};function Ie(qe){return qe||d(qe)&&qe===0}var Re=Array.isArray(re)?function(qe,he){var ue=S.castOption(we,re,qe);return Ie(ue)?ue:S.extractOption({},pe,"",he)}:function(qe,he){return S.extractOption(Se,pe,qe,he)};function We(qe,he,ue){var ne=Re(he,ue);Ie(ne)&&(j[qe]=ne)}if(We("hoverinfo","hi","hoverinfo"),We("bgcolor","hbg","hoverlabel.bgcolor"),We("borderColor","hbc","hoverlabel.bordercolor"),We("fontFamily","htf","hoverlabel.font.family"),We("fontSize","hts","hoverlabel.font.size"),We("fontColor","htc","hoverlabel.font.color"),We("fontWeight","htw","hoverlabel.font.weight"),We("fontStyle","hty","hoverlabel.font.style"),We("fontVariant","htv","hoverlabel.font.variant"),We("nameLength","hnl","hoverlabel.namelength"),We("textAlign","hta","hoverlabel.align"),j.posref=Q==="y"||Q==="closest"&&pe.orientation==="h"?j.xa._offset+(j.x0+j.x1)/2:j.ya._offset+(j.y0+j.y1)/2,j.x0=S.constrain(j.x0,0,j.xa._length),j.x1=S.constrain(j.x1,0,j.xa._length),j.y0=S.constrain(j.y0,0,j.ya._length),j.y1=S.constrain(j.y1,0,j.ya._length),j.xLabelVal!==void 0&&(j.xLabel="xLabel"in j?j.xLabel:h.hoverLabelText(j.xa,j.xLabelVal,pe.xhoverformat),j.xVal=j.xa.c2d(j.xLabelVal)),j.yLabelVal!==void 0&&(j.yLabel="yLabel"in j?j.yLabel:h.hoverLabelText(j.ya,j.yLabelVal,pe.yhoverformat),j.yVal=j.ya.c2d(j.yLabelVal)),j.zLabelVal!==void 0&&j.zLabel===void 0&&(j.zLabel=String(j.zLabelVal)),!isNaN(j.xerr)&&!(j.xa.type==="log"&&j.xerr<=0)){var at=h.tickText(j.xa,j.xa.c2l(j.xerr),"hover").text;j.xerrneg!==void 0?j.xLabel+=" +"+at+" / -"+h.tickText(j.xa,j.xa.c2l(j.xerrneg),"hover").text:j.xLabel+=" \xB1 "+at,Q==="x"&&(j.distance+=1)}if(!isNaN(j.yerr)&&!(j.ya.type==="log"&&j.yerr<=0)){var nt=h.tickText(j.ya,j.ya.c2l(j.yerr),"hover").text;j.yerrneg!==void 0?j.yLabel+=" +"+nt+" / -"+h.tickText(j.ya,j.ya.c2l(j.yerrneg),"hover").text:j.yLabel+=" \xB1 "+nt,Q==="y"&&(j.distance+=1)}var tt=j.hoverinfo||j.trace.hoverinfo;return tt&&tt!=="all"&&(tt=Array.isArray(tt)?tt:tt.split("+"),tt.indexOf("x")===-1&&(j.xLabel=void 0),tt.indexOf("y")===-1&&(j.yLabel=void 0),tt.indexOf("z")===-1&&(j.zLabel=void 0),tt.indexOf("text")===-1&&(j.text=void 0),tt.indexOf("name")===-1&&(j.name=void 0)),j}function le(j,Q,re){var pe=re.container,we=re.fullLayout,Se=we._size,Ie=re.event,Re=!!Q.hLinePoint,We=!!Q.vLinePoint,at,nt;if(pe.selectAll(".spikeline").remove(),!!(We||Re)){var tt=i.combine(we.plot_bgcolor,we.paper_bgcolor);if(Re){var qe=Q.hLinePoint,he,ue;at=qe&&qe.xa,nt=qe&&qe.ya;var ne=nt.spikesnap;ne==="cursor"?(he=Ie.pointerX,ue=Ie.pointerY):(he=at._offset+qe.x,ue=nt._offset+qe.y);var Ce=x.readability(qe.color,tt)<1.5?i.contrast(tt):qe.color,Ye=nt.spikemode,rt=nt.spikethickness,Ke=nt.spikecolor||Ce,Mt=h.getPxPosition(j,nt),kt,Nt;if(Ye.indexOf("toaxis")!==-1||Ye.indexOf("across")!==-1){if(Ye.indexOf("toaxis")!==-1&&(kt=Mt,Nt=he),Ye.indexOf("across")!==-1){var Gt=nt._counterDomainMin,Mr=nt._counterDomainMax;nt.anchor==="free"&&(Gt=Math.min(Gt,nt.position),Mr=Math.max(Mr,nt.position)),kt=Se.l+Gt*Se.w,Nt=Se.l+Mr*Se.w}pe.insert("line",":first-child").attr({x1:kt,x2:Nt,y1:ue,y2:ue,"stroke-width":rt,stroke:Ke,"stroke-dasharray":n.dashStyle(nt.spikedash,rt)}).classed("spikeline",!0).classed("crisp",!0),pe.insert("line",":first-child").attr({x1:kt,x2:Nt,y1:ue,y2:ue,"stroke-width":rt+2,stroke:tt}).classed("spikeline",!0).classed("crisp",!0)}Ye.indexOf("marker")!==-1&&pe.insert("circle",":first-child").attr({cx:Mt+(nt.side!=="right"?rt:-rt),cy:ue,r:rt,fill:Ke}).classed("spikeline",!0)}if(We){var mr=Q.vLinePoint,qr,Er;at=mr&&mr.xa,nt=mr&&mr.ya;var Ir=at.spikesnap;Ir==="cursor"?(qr=Ie.pointerX,Er=Ie.pointerY):(qr=at._offset+mr.x,Er=nt._offset+mr.y);var _t=x.readability(mr.color,tt)<1.5?i.contrast(tt):mr.color,Oe=at.spikemode,Je=at.spikethickness,Ae=at.spikecolor||_t,Le=h.getPxPosition(j,at),Ue,Ze;if(Oe.indexOf("toaxis")!==-1||Oe.indexOf("across")!==-1){if(Oe.indexOf("toaxis")!==-1&&(Ue=Le,Ze=Er),Oe.indexOf("across")!==-1){var st=at._counterDomainMin,ut=at._counterDomainMax;at.anchor==="free"&&(st=Math.min(st,at.position),ut=Math.max(ut,at.position)),Ue=Se.t+(1-ut)*Se.h,Ze=Se.t+(1-st)*Se.h}pe.insert("line",":first-child").attr({x1:qr,x2:qr,y1:Ue,y2:Ze,"stroke-width":Je,stroke:Ae,"stroke-dasharray":n.dashStyle(at.spikedash,Je)}).classed("spikeline",!0).classed("crisp",!0),pe.insert("line",":first-child").attr({x1:qr,x2:qr,y1:Ue,y2:Ze,"stroke-width":Je+2,stroke:tt}).classed("spikeline",!0).classed("crisp",!0)}Oe.indexOf("marker")!==-1&&pe.insert("circle",":first-child").attr({cx:qr,cy:Le-(at.side!=="top"?Je:-Je),r:Je,fill:Ae}).classed("spikeline",!0)}}}function ce(j,Q,re){if(!re||re.length!==j._hoverdata.length)return!0;for(var pe=re.length-1;pe>=0;pe--){var we=re[pe],Se=j._hoverdata[pe];if(we.curveNumber!==Se.curveNumber||String(we.pointNumber)!==String(Se.pointNumber)||String(we.pointNumbers)!==String(Se.pointNumbers)||we.binNumber!==Se.binNumber)return!0}return!1}function de(j,Q){return!Q||Q.vLinePoint!==j._spikepoints.vLinePoint||Q.hLinePoint!==j._spikepoints.hLinePoint}function G(j,Q){return o.plainText(j||"",{len:Q,allowedTags:["br","sub","sup","b","i","em","s","u"]})}function Y(j,Q){for(var re=Q.charAt(0),pe=[],we=[],Se=[],Ie=0;Iej.offsetTop+j.clientTop,se=j=>j.offsetLeft+j.clientLeft;function ae(j,Q){var re=j._fullLayout,pe=Q.getBoundingClientRect(),we=pe.left,Se=pe.top,Ie=we+pe.width,Re=Se+pe.height,We=S.apply3DTransform(re._invTransform)(we,Se),at=S.apply3DTransform(re._invTransform)(Ie,Re),nt=We[0],tt=We[1],qe=at[0],he=at[1];return{x:nt,y:tt,width:qe-nt,height:he-tt,top:Math.min(tt,he),left:Math.min(nt,qe),right:Math.max(nt,qe),bottom:Math.max(tt,he)}}}}),k_=He({"src/components/fx/hoverlabel_defaults.js"(Z,V){"use strict";var d=sa(),x=Jn(),S=$p().isUnifiedHover;V.exports=function(e,t,r,o){o=o||{};var a=t.legend;function n(i){o.font[i]||(o.font[i]=a?t.legend.font[i]:t.font[i])}t&&S(t.hovermode)&&(o.font||(o.font={}),n("size"),n("family"),n("color"),n("weight"),n("style"),n("variant"),a?(o.bgcolor||(o.bgcolor=x.combine(t.legend.bgcolor,t.paper_bgcolor)),o.bordercolor||(o.bordercolor=t.legend.bordercolor)):o.bgcolor||(o.bgcolor=t.paper_bgcolor)),r("hoverlabel.bgcolor",o.bgcolor),r("hoverlabel.bordercolor",o.bordercolor),r("hoverlabel.namelength",o.namelength),r("hoverlabel.showarrow",o.showarrow),d.coerceFont(r,"hoverlabel.font",o.font),r("hoverlabel.align",o.align)}}}),mz=He({"src/components/fx/layout_global_defaults.js"(Z,V){"use strict";var d=sa(),x=k_(),S=Zm();V.exports=function(e,t){function r(o,a){return d.coerce(e,t,S,o,a)}x(e,t,r)}}}),gz=He({"src/components/fx/defaults.js"(Z,V){"use strict";var d=sa(),x=Ky(),S=k_();V.exports=function(e,t,r,o){function a(i,s){return d.coerce(e,t,x,i,s)}var n=d.extendFlat({},o.hoverlabel);t.hovertemplate&&(n.namelength=-1),S(e,t,a,n)}}}),x5=He({"src/components/fx/hovermode_defaults.js"(Z,V){"use strict";var d=sa(),x=Zm();V.exports=function(E,e){function t(r,o){return e[r]!==void 0?e[r]:d.coerce(E,e,x,r,o)}return t("clickmode"),t("hoversubplots"),t("hoveranywhere"),t("clickanywhere"),t("hovermode")}}}),yz=He({"src/components/fx/layout_defaults.js"(Z,V){"use strict";var d=sa(),x=Zm(),S=x5(),E=k_();V.exports=function(t,r){function o(v,c){return d.coerce(t,r,x,v,c)}var a=S(t,r);a&&(o("hoverdistance"),o("spikedistance"));var n=o("dragmode");n==="select"&&o("selectdirection");var i=r._has("mapbox"),s=r._has("map"),h=r._has("geo"),f=r._basePlotModules.length;r.dragmode==="zoom"&&((i||s||h)&&f===1||(i||s)&&h&&f===2)&&(r.dragmode="pan"),E(t,r,o),d.coerceFont(o,"hoverlabel.grouptitlefont",r.hoverlabel.font)}}}),_z=He({"src/components/fx/calc.js"(Z,V){"use strict";var d=sa(),x=lo();V.exports=function(e){var t=e.calcdata,r=e._fullLayout;function o(h){return function(f){return d.coerceHoverinfo({hoverinfo:f},{_module:h._module},r)}}for(var a=0;a"," plotly-logomark"," "," "," "," "," "," "," "," "," "," "," "," "," ",""].join("")}}}}),T2=He({"src/components/shapes/draw_newshape/constants.js"(Z,V){"use strict";var d=32;V.exports={CIRCLE_SIDES:d,i000:0,i090:d/4,i180:d/2,i270:d/4*3,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}}}),A2=He({"src/components/selections/helpers.js"(Z,V){"use strict";var d=sa().strTranslate;function x(t,r){switch(t.type){case"log":return t.p2d(r);case"date":return t.p2r(r,0,t.calendar);default:return t.p2r(r)}}function S(t,r){switch(t.type){case"log":return t.d2p(r);case"date":return t.r2p(r,0,t.calendar);default:return t.r2p(r)}}function E(t){var r=t._id.charAt(0)==="y"?1:0;return function(o){return x(t,o[r])}}function e(t){return d(t.xaxis._offset,t.yaxis._offset)}V.exports={p2r:x,r2p:S,axValue:E,getTransform:e}}}),r0=He({"src/components/shapes/draw_newshape/helpers.js"(Z){"use strict";var V=M_(),d=T2(),x=d.CIRCLE_SIDES,S=d.SQRT2,E=A2(),e=E.p2r,t=E.r2p,r=[0,3,4,5,6,1,2],o=[0,3,4,1,2];Z.writePaths=function(i){var s=i.length;if(!s)return"M0,0Z";for(var h="",f=0;f0&&_{let s=i.charAt(0),h=a[s].drawn!==void 0;return n+(h?1:0)},0)},Z.getDataToPixel=function(e,t,r,o,a){var n=e._fullLayout._size,i;if(t)if(a==="domain")i=function(h){return t._length*(o?1-h:h)+t._offset};else{var s=Z.shapePositionToRange(t);i=function(h){var f=E(t,r);return t._offset+t.r2p(s(h,!0))+f},t.type==="date"&&(i=Z.decodeDate(i))}else o?i=function(h){return n.t+n.h*(1-h)}:i=function(h){return n.l+n.w*h};return i},Z.getPixelToData=function(e,t,r,o){var a=e._fullLayout._size,n;if(t)if(o==="domain")n=function(s){var h=(s-t._offset)/t._length;return r?1-h:h};else{var i=Z.rangeToShapePosition(t);n=function(s){return i(t.p2r(s-t._offset))}}else r?n=function(s){return 1-(s-a.t)/a.h}:n=function(s){return(s-a.l)/a.w};return n},Z.roundPositionForSharpStrokeRendering=function(e,t){var r=Math.round(t%2)===1,o=Math.round(e);return r?o+.5:o},Z.makeShapesOptionsAndPlotinfo=function(e,t){var r=e._fullLayout.shapes[t]||{},o=e._fullLayout._plots[r.xref+r.yref],a=!!o;return a?o._hadPlotinfo=!0:(o={},r.xref&&r.xref!=="paper"&&(o.xaxis=e._fullLayout[r.xref+"axis"]),r.yref&&r.yref!=="paper"&&(o.yaxis=e._fullLayout[r.yref+"axis"])),o.xsizemode=r.xsizemode,o.ysizemode=r.ysizemode,o.xanchor=r.xanchor,o.yanchor=r.yanchor,{options:r,plotinfo:o}},Z.makeSelectionsOptionsAndPlotinfo=function(e,t){var r=e._fullLayout.selections[t]||{},o=e._fullLayout._plots[r.xref+r.yref],a=!!o;return a?o._hadPlotinfo=!0:(o={},r.xref&&(o.xaxis=e._fullLayout[r.xref+"axis"]),r.yref&&(o.yaxis=e._fullLayout[r.yref+"axis"])),{options:r,plotinfo:o}},Z.getPathString=function(e,t){let r=t.type,o=x.getRefType(t.xref),a=x.getRefType(t.yref),n=e._fullLayout._size;var i,s,h,f,v,c,T,l,_,w,A,M;function g(z,F,N,O){var P;if(z)if(F==="domain")O?P=function(U){return z._offset+z._length*(1-U)}:P=function(U){return z._offset+z._length*U};else{let U=Z.shapePositionToRange(z);P=function(B){return z._offset+z.r2p(U(B,!0))},N==="path"&&z.type==="date"&&(P=Z.decodeDate(P))}else O?P=function(U){return n.t+n.h*(1-U)}:P=function(U){return n.l+n.w*U};return P}if(o==="array"?(T=[],i=t.xref.map(function(z){return x.getFromId(e,z)}),T=t.xref.map(function(z,F){return g(i[F],x.getRefType(z),r,!1)})):(i=x.getFromId(e,t.xref),T=g(i,o,r,!1)),a==="array"?(l=[],s=t.yref.map(function(z){return x.getFromId(e,z)}),l=t.yref.map(function(z,F){return g(s[F],x.getRefType(z),r,!0)})):(s=x.getFromId(e,t.yref),l=g(s,a,r,!0)),r==="path")return S(t,T,l);if(o==="array")h=E(i[0],t.x0shift),f=E(i[1],t.x1shift),_=T[0](t.x0)+h,w=T[1](t.x1)+f;else if(h=E(i,t.x0shift),f=E(i,t.x1shift),t.xsizemode==="pixel"){let z=T(t.xanchor);_=z+t.x0+h,w=z+t.x1+f}else _=T(t.x0)+h,w=T(t.x1)+f;if(a==="array")v=E(s[0],t.y0shift),c=E(s[1],t.y1shift),A=l[0](t.y0)+v,M=l[1](t.y1)+c;else if(v=E(s,t.y0shift),c=E(s,t.y1shift),t.ysizemode==="pixel"){let z=l(t.yanchor);A=z-t.y0+v,M=z-t.y1+c}else A=l(t.y0)+v,M=l(t.y1)+c;if(r==="line")return"M"+_+","+A+"L"+w+","+M;if(r==="rect")return"M"+_+","+A+"H"+w+"V"+M+"H"+_+"Z";var b=(_+w)/2,p=(A+M)/2,u=Math.abs(b-_),y=Math.abs(p-A),m="A"+u+","+y,R=b+u+","+p,L=b+","+(p-y);return"M"+R+m+" 0 1,1 "+L+m+" 0 0,1 "+R+"Z"};function S(e,t,r){let o=e.path,a=e.xsizemode,n=e.ysizemode,i=e.xanchor,s=e.yanchor,h=Array.isArray(e.xref),f=Array.isArray(e.yref);var v=0,c=0;return o.replace(V.segmentRE,function(T){var l=0,_=T.charAt(0),w=V.paramIsX[_],A=V.paramIsY[_],M=V.numParams[_];let g=w.drawn!==void 0,b=A.drawn!==void 0,p=h?t[v]:t,u=f?r[c]:r;var y=T.slice(1).replace(V.paramRE,function(m){return w[l]?a==="pixel"?m=p(i)+Number(m):m=p(m):A[l]&&(n==="pixel"?m=u(s)-Number(m):m=u(m)),l++,l>M&&(m="X"),m});return l>M&&(y=y.replace(/[\s,]*X.*/,""),d.log("Ignoring extra params in segment "+T)),g&&v++,b&&c++,_+y})}function E(e,t){t=t||0;var r=0;return t&&e&&(e.type==="category"||e.type==="multicategory")&&(r=(e.r2p(1)-e.r2p(0))*t),r}}}),w5=He({"src/components/shapes/display_labels.js"(Z,V){"use strict";var d=sa(),x=Ho(),S=ou(),E=es(),e=r0().readPaths,t=a0(),r=t.getPathString,o=v2(),a=uh().FROM_TL;V.exports=function(h,f,v,c){if(c.selectAll(".shape-label").remove(),!!(v.label.text||v.label.texttemplate)){var T;if(v.label.texttemplate){var l={};if(v.type!=="path"){var _=x.getFromId(h,v.xref),w=x.getFromId(h,v.yref);let j=Array.isArray(v.xref),Q=Array.isArray(v.yref);for(var A in o){var M=typeof o[A]=="function",g=!j||o.simpleXVariables.includes(A),b=!Q||o.simpleYVariables.includes(A);if(M&&g&&b){var p=o[A](v,_,w);p!==void 0&&(l[A]=p)}}}T=d.texttemplateStringForShapes({data:[l],fallback:v.label.texttemplatefallback,locale:h._fullLayout._d3locale,template:v.label.texttemplate})}else T=v.label.text;var u={"data-index":f},y=v.label.font,m={"data-notex":1},R=c.append("g").attr(u).classed("shape-label",!0),L=R.append("text").attr(m).classed("shape-label-text",!0).text(T),z,F,N,O;if(v.path){var P=r(h,v),U=e(P,h);z=1/0,N=1/0,F=-1/0,O=-1/0;for(var B=0;B=s?c=h-v:c=v-h,-180/Math.PI*Math.atan2(c,T)}function i(s,h,f,v,c,T,l){var _=c.label.textposition,w=c.label.textangle,A=c.label.padding,M=c.type,g=Math.PI/180*T,b=Math.sin(g),p=Math.cos(g),u=c.label.xanchor,y=c.label.yanchor,m,R,L,z;if(M==="line"){_==="start"?(m=s,R=h):_==="end"?(m=f,R=v):(m=(s+f)/2,R=(h+v)/2),u==="auto"&&(_==="start"?w==="auto"?f>s?u="left":fs?u="right":fs?u="right":fs?u="left":f1&&!(tt.length===2&&tt[1][0]==="Z")&&(G===0&&(tt[0][0]="M"),m[de]=tt,N(),O())}}function pe(tt,qe){if(tt===2){de=+qe.srcElement.getAttribute("data-i"),G=+qe.srcElement.getAttribute("data-j");var he=m[de];!T(he)&&!l(he)&&re()}}function we(tt){le=[];for(var qe=0;qeE.getFromId(m,le)).filter(Boolean);if(!B.length)return U?[z.t,z.t+z.h]:[z.l,z.l+z.w];let X=B.map(function(le){return le._offset}),$=B.map(function(le){return le._offset+le._length});return[Math.min(...X),Math.max(...$)]}let N=F(R,!1),O=F(L,!0);return{x:N[0],y:O[0],width:N[1]-N[0],height:O[1]-O[0]}}function g(m,R,L,z,F,N){var O=10,P=10,U=L.xsizemode==="pixel",B=L.ysizemode==="pixel",X=L.type==="line",$=L.type==="path",le=N.modifyItem,ce,de,G,Y,ee,q,se,ae,j,Q,re,pe,we,Se,Ie,Re=d.select(R.node().parentNode),We=E.getFromId(m,L.xref),at=E.getRefType(L.xref),nt=E.getFromId(m,L.yref),tt=E.getRefType(L.yref),qe=L.x0shift,he=L.x1shift,ue=L.y0shift,ne=L.y1shift,Ce=function(Ue,Ze){var st=v.getDataToPixel(m,We,Ze,!1,at);return st(Ue)},Ye=function(Ue,Ze){var st=v.getDataToPixel(m,nt,Ze,!0,tt);return st(Ue)},rt=v.getPixelToData(m,We,!1,at),Ke=v.getPixelToData(m,nt,!0,tt),Mt=Gt(),kt={element:Mt.node(),gd:m,prepFn:qr,doneFn:Er,clickFn:Ir},Nt;s.init(kt),Mt.node().onmousemove=mr;function Gt(){return X?Mr():R}function Mr(){var Ue=10,Ze=Math.max(L.line.width,Ue),st=F.append("g").attr("data-index",z).attr("drag-helper",!0);st.append("path").attr("d",R.attr("d")).style({cursor:"move","stroke-width":Ze,"stroke-opacity":"0"});var ut={"fill-opacity":"0"},Ut=Math.max(Ze/2,Ue);return st.append("circle").attr({"data-line-point":"start-point",cx:U?Ce(L.xanchor)+L.x0:Ce(L.x0,qe),cy:B?Ye(L.yanchor)-L.y0:Ye(L.y0,ue),r:Ut}).style(ut).classed("cursor-grab",!0),st.append("circle").attr({"data-line-point":"end-point",cx:U?Ce(L.xanchor)+L.x1:Ce(L.x1,he),cy:B?Ye(L.yanchor)-L.y1:Ye(L.y1,ne),r:Ut}).style(ut).classed("cursor-grab",!0),st}function mr(Ue){if(l(m)){Nt=null;return}if(X)Ue.target.tagName==="path"?Nt="move":Nt=Ue.target.attributes["data-line-point"].value==="start-point"?"resize-over-start-point":"resize-over-end-point";else{var Ze=kt.element.getBoundingClientRect(),st=Ze.right-Ze.left,ut=Ze.bottom-Ze.top,Ut=Ue.clientX-Ze.left,Ct=Ue.clientY-Ze.top,Pt=!$&&st>O&&ut>P&&!Ue.shiftKey?s.getCursor(Ut/st,1-Ct/ut):"move";h(R,Pt),Nt=Pt.split("-")[0]}}function qr(Ue){l(m)||(U&&(ee=Ce(L.xanchor)),B&&(q=Ye(L.yanchor)),L.type==="path"?Ie=L.path:(ce=U?L.x0:Ce(L.x0),de=B?L.y0:Ye(L.y0),G=U?L.x1:Ce(L.x1),Y=B?L.y1:Ye(L.y1)),ceY?(se=de,re="y0",ae=Y,pe="y1"):(se=Y,re="y1",ae=de,pe="y0"),mr(Ue),Je(F,L),Le(R,L,m),kt.moveFn=Nt==="move"?_t:Oe,kt.altKey=Ue.altKey)}function Er(){l(m)||(h(R),Ae(F),A(R,m,L),x.call("_guiRelayout",m,N.getUpdateObj()))}function Ir(){l(m)||Ae(F)}function _t(Ue,Ze){if(L.type==="path"){var st=function(Ct){return Ct},ut=st,Ut=st;U?le("xanchor",L.xanchor=rt(ee+Ue)):(ut=function(Pt){return rt(Ce(Pt)+Ue)},We&&We.type==="date"&&(ut=v.encodeDate(ut))),B?le("yanchor",L.yanchor=Ke(q+Ze)):(Ut=function(Pt){return Ke(Ye(Pt)+Ze)},nt&&nt.type==="date"&&(Ut=v.encodeDate(Ut))),le("path",L.path=b(Ie,ut,Ut))}else U?le("xanchor",L.xanchor=rt(ee+Ue)):(le("x0",L.x0=rt(ce+Ue)),le("x1",L.x1=rt(G+Ue))),B?le("yanchor",L.yanchor=Ke(q+Ze)):(le("y0",L.y0=Ke(de+Ze)),le("y1",L.y1=Ke(Y+Ze)));R.attr("d",c(m,L)),Je(F,L),r(m,z,L,Re)}function Oe(Ue,Ze){if($){var st=function(hi){return hi},ut=st,Ut=st;U?le("xanchor",L.xanchor=rt(ee+Ue)):(ut=function(wi){return rt(Ce(wi)+Ue)},We&&We.type==="date"&&(ut=v.encodeDate(ut))),B?le("yanchor",L.yanchor=Ke(q+Ze)):(Ut=function(wi){return Ke(Ye(wi)+Ze)},nt&&nt.type==="date"&&(Ut=v.encodeDate(Ut))),le("path",L.path=b(Ie,ut,Ut))}else if(X){if(Nt==="resize-over-start-point"){var Ct=ce+Ue,Pt=B?de-Ze:de+Ze;le("x0",L.x0=U?Ct:rt(Ct)),le("y0",L.y0=B?Pt:Ke(Pt))}else if(Nt==="resize-over-end-point"){var jt=G+Ue,fr=B?Y-Ze:Y+Ze;le("x1",L.x1=U?jt:rt(jt)),le("y1",L.y1=B?fr:Ke(fr))}}else{var ur=function(hi){return Nt.indexOf(hi)!==-1},sr=ur("n"),Pr=ur("s"),Ta=ur("w"),Oa=ur("e"),Ia=sr?se+Ze:se,qa=Pr?ae+Ze:ae,Wa=Ta?j+Ue:j,Ca=Oa?Q+Ue:Q;B&&(sr&&(Ia=se-Ze),Pr&&(qa=ae-Ze)),(!B&&qa-Ia>P||B&&Ia-qa>P)&&(le(re,L[re]=B?Ia:Ke(Ia)),le(pe,L[pe]=B?qa:Ke(qa))),Ca-Wa>O&&(le(we,L[we]=U?Wa:rt(Wa)),le(Se,L[Se]=U?Ca:rt(Ca)))}R.attr("d",c(m,L)),Je(F,L),r(m,z,L,Re)}function Je(Ue,Ze){(U||B)&&st();function st(){var ut=Ze.type!=="path",Ut=Ue.selectAll(".visual-cue").data([0]),Ct=1;Ut.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":Ct}).classed("visual-cue",!0);var Pt=Ce(U?Ze.xanchor:S.midRange(ut?[Ze.x0,Ze.x1]:v.extractPathCoords(Ze.path,f.paramIsX))),jt=Ye(B?Ze.yanchor:S.midRange(ut?[Ze.y0,Ze.y1]:v.extractPathCoords(Ze.path,f.paramIsY)));if(Pt=v.roundPositionForSharpStrokeRendering(Pt,Ct),jt=v.roundPositionForSharpStrokeRendering(jt,Ct),U&&B){var fr="M"+(Pt-1-Ct)+","+(jt-1-Ct)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";Ut.attr("d",fr)}else if(U){var ur="M"+(Pt-1-Ct)+","+(jt-9-Ct)+"v18 h2 v-18 Z";Ut.attr("d",ur)}else{var sr="M"+(Pt-9-Ct)+","+(jt-1-Ct)+"h18 v2 h-18 Z";Ut.attr("d",sr)}}}function Ae(Ue){Ue.selectAll(".visual-cue").remove()}function Le(Ue,Ze,st){var ut=Ze.xref,Ut=Ze.yref,Ct=E.getFromId(st,ut),Pt=E.getFromId(st,Ut),jt="";ut!=="paper"&&!Ct.autorange&&(jt+=ut),Ut!=="paper"&&!Pt.autorange&&(jt+=Ut),n.setClipUrl(Ue,jt?"clip"+st._fullLayout._uid+jt:null,st)}}function b(m,R,L){return m.replace(f.segmentRE,function(z){var F=0,N=z.charAt(0),O=f.paramIsX[N],P=f.paramIsY[N],U=f.numParams[N],B=z.slice(1).replace(f.paramRE,function(X){return F>=U||(O[F]?X=R(X):P[F]&&(X=L(X)),F++),X});return N+B})}function p(m,R){if(_(m)){var L=R.node(),z=+L.getAttribute("data-index");if(z>=0){if(z===m._fullLayout._activeShapeIndex){u(m);return}m._fullLayout._activeShapeIndex=z,m._fullLayout._deactivateShape=u,T(m)}}}function u(m){if(_(m)){var R=m._fullLayout._activeShapeIndex;R>=0&&(o(m),delete m._fullLayout._activeShapeIndex,T(m))}}function y(m){if(_(m)){o(m);var R=m._fullLayout._activeShapeIndex,L=(m.layout||{}).shapes||[];if(R1?(ce=["toggleHover"],de=["resetViews"]):u?(le=["zoomInGeo","zoomOutGeo"],ce=["hoverClosestGeo"],de=["resetGeo"]):p?(ce=["hoverClosest3d"],de=["resetCameraDefault3d","resetCameraLastSave3d"]):L?(le=["zoomInMapbox","zoomOutMapbox"],ce=["toggleHover"],de=["resetViewMapbox"]):z?(le=["zoomInMap","zoomOutMap"],ce=["toggleHover"],de=["resetViewMap"]):y?ce=["hoverClosestPie"]:O?(ce=["hoverClosestCartesian","hoverCompareCartesian"],de=["resetViewSankey"]):ce=["toggleHover"],b&&ce.push("toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"),(s(T)||U)&&(ce=[]),b&&!P&&(le=["zoomIn2d","zoomOut2d","autoScale2d"],de[0]!=="resetViews"&&(de=["resetScale2d"])),p?G=["zoom3d","pan3d","orbitRotation","tableRotation"]:b&&!P||R?G=["zoom2d","pan2d"]:L||z||u?G=["pan2d"]:F&&(G=["zoom2d"]),i(T)&&G.push("select2d","lasso2d");var Y=[],ee=function(j){Y.indexOf(j)===-1&&ce.indexOf(j)!==-1&&Y.push(j)};if(Array.isArray(M)){for(var q=[],se=0;sew?T.slice(w):l.slice(_))+A}function h(v,c){for(var T=c._size,l=T.h/T.w,_={},w=Object.keys(v),A=0;At*R&&!N)){for(w=0;wG&&rece&&(ce=re);var we=(ce-le)/(2*de);u/=we,le=g.l2r(le),ce=g.l2r(ce),g.range=g._input.range=B=O[1]||X[1]<=O[0])&&$[0]P[0])return!0}return!1}function A(O){var P=O._fullLayout,U=P._size,B=U.p,X=n.list(O,"",!0),$,le,ce,de,G,Y;if(P._paperdiv.style({width:O._context.responsive&&P.autosize&&!O._context._hasZeroWidth&&!O.layout.width?"100%":P.width+"px",height:O._context.responsive&&P.autosize&&!O._context._hasZeroHeight&&!O.layout.height?"100%":P.height+"px"}).selectAll(".main-svg").call(r.setSize,P.width,P.height),O._context.setBackground(O,P.paper_bgcolor),Z.drawMainTitle(O),a.manage(O),!P._has("cartesian"))return x.previousPromises(O);function ee(Ae,Le,Ue){var Ze=Ae._lw/2;if(Ae._id.charAt(0)==="x"){if(Le){if(Ue==="top")return Le._offset-B-Ze}else return U.t+U.h*(1-(Ae.position||0))+Ze%1;return Le._offset+Le._length+B+Ze}if(Le){if(Ue==="right")return Le._offset+Le._length+B+Ze}else return U.l+U.w*(Ae.position||0)+Ze%1;return Le._offset-B-Ze}for($=0;$0){m(O,$,G,de),ce.attr({x:le,y:$,"text-anchor":B,dy:z(P.yanchor)}).call(E.positionText,le,$);var Y=(P.text.match(E.BR_TAG_ALL)||[]).length;if(Y){var ee=i.LINE_SPACING*Y+i.MID_SHIFT;P.y===0&&(ee=-ee),ce.selectAll(".line").each(function(){var Q=+this.getAttribute("dy").slice(0,-2)-ee+"em";this.setAttribute("dy",Q)})}var q=V.select(O).selectAll(".gtitle-subtitle");if(q.node()){var se=ce.node().getBBox(),ae=se.y+se.height,j=ae+o.SUBTITLE_PADDING_EM*P.subtitle.font.size;q.attr({x:le,y:j,"text-anchor":B,dy:z(P.yanchor)}).call(E.positionText,le,j)}}}};function p(O,P,U,B,X){var $=P.yref==="paper"?O._fullLayout._size.h:O._fullLayout.height,le=S.isTopAnchor(P)?B:B-X,ce=U==="b"?$-le:le;return S.isTopAnchor(P)&&U==="t"||S.isBottomAnchor(P)&&U==="b"?!1:ce.5?"t":"b",le=O._fullLayout.margin[$],ce=0;return P.yref==="paper"?ce=U+P.pad.t+P.pad.b:P.yref==="container"&&(ce=u($,B,X,O._fullLayout.height,U)+P.pad.t+P.pad.b),ce>le?ce:0}function m(O,P,U,B){var X="title.automargin",$=O._fullLayout.title,le=$.y>.5?"t":"b",ce={x:$.x,y:$.y,t:0,b:0},de={};$.yref==="paper"&&p(O,$,le,P,B)?ce[le]=U:$.yref==="container"&&(de[le]=U,O._fullLayout._reservedMargin[X]=de),x.allowAutoMargin(O,X),x.autoMargin(O,X,ce)}function R(O,P){var U=O.title,B=O._size,X=0;switch(P===c?X=U.pad.l:P===l&&(X=-U.pad.r),U.xref){case"paper":return B.l+B.w*U.x+X;case"container":default:return O.width*U.x+X}}function L(O,P){var U=O.title,B=O._size,X=0;if(P==="0em"||!P?X=-U.pad.b:P===i.CAP_SHIFT+"em"&&(X=U.pad.t),U.y==="auto")return B.t/2;switch(U.yref){case"paper":return B.t+B.h-B.h*U.y+X;case"container":default:return O.height-O.height*U.y+X}}function z(O){return O==="top"?i.CAP_SHIFT+.3+"em":O==="bottom"?"-0.3em":i.MID_SHIFT+"em"}function F(O){var P=O.title,U=T;return S.isRightAnchor(P)?U=l:S.isLeftAnchor(P)&&(U=c),U}function N(O){var P=O.title,U="0em";return S.isTopAnchor(P)?U=i.CAP_SHIFT+"em":S.isMiddleAnchor(P)&&(U=i.MID_SHIFT+"em"),U}Z.doTraceStyle=function(O){var P=O.calcdata,U=[],B;for(B=0;B=0;F--){var N=M.append("path").attr(b).style("opacity",F?.1:p).call(E.stroke,y).call(E.fill,u).call(e.dashLine,F?"solid":R,F?4+m:m);if(s(N,c,_),L){var O=t(c.layout,"selections",_);N.style({cursor:"move"});var P={element:N.node(),plotinfo:w,gd:c,editHelpers:O,isActiveSelection:!0},U=d(g,c);x(U,N,P)}else N.style("pointer-events",F?"all":"none");z[F]=N}var B=z[0],X=z[1];X.node().addEventListener("click",function(){return h(c,B)})}}function s(c,T,l){var _=l.xref+l.yref;e.setClipUrl(c,"clip"+T._fullLayout._uid+_,T)}function h(c,T){if(n(c)){var l=T.node(),_=+l.getAttribute("data-index");if(_>=0){if(_===c._fullLayout._activeSelectionIndex){v(c);return}c._fullLayout._activeSelectionIndex=_,c._fullLayout._deactivateSelection=v,a(c)}}}function f(c){if(n(c)){var T=c._fullLayout.selections.length-1;c._fullLayout._activeSelectionIndex=T,c._fullLayout._deactivateSelection=v,a(c)}}function v(c){if(n(c)){var T=c._fullLayout._activeSelectionIndex;T>=0&&(S(c),delete c._fullLayout._activeSelectionIndex,a(c))}}}}),Az=He({"node_modules/polybooljs/lib/build-log.js"(Z,V){function d(){var x,S=0,E=!1;function e(t,r){return x.list.push({type:t,data:r?JSON.parse(JSON.stringify(r)):void 0}),x}return x={list:[],segmentId:function(){return S++},checkIntersection:function(t,r){return e("check",{seg1:t,seg2:r})},segmentChop:function(t,r){return e("div_seg",{seg:t,pt:r}),e("chop",{seg:t,pt:r})},statusRemove:function(t){return e("pop_seg",{seg:t})},segmentUpdate:function(t){return e("seg_update",{seg:t})},segmentNew:function(t,r){return e("new_seg",{seg:t,primary:r})},segmentRemove:function(t){return e("rem_seg",{seg:t})},tempStatus:function(t,r,o){return e("temp_status",{seg:t,above:r,below:o})},rewind:function(t){return e("rewind",{seg:t})},status:function(t,r,o){return e("status",{seg:t,above:r,below:o})},vert:function(t){return t===E?x:(E=t,e("vert",{x:t}))},log:function(t){return typeof t!="string"&&(t=JSON.stringify(t,!1," ")),e("log",{txt:t})},reset:function(){return e("reset")},selected:function(t){return e("selected",{segs:t})},chainStart:function(t){return e("chain_start",{seg:t})},chainRemoveHead:function(t,r){return e("chain_rem_head",{index:t,pt:r})},chainRemoveTail:function(t,r){return e("chain_rem_tail",{index:t,pt:r})},chainNew:function(t,r){return e("chain_new",{pt1:t,pt2:r})},chainMatch:function(t){return e("chain_match",{index:t})},chainClose:function(t){return e("chain_close",{index:t})},chainAddHead:function(t,r){return e("chain_add_head",{index:t,pt:r})},chainAddTail:function(t,r){return e("chain_add_tail",{index:t,pt:r})},chainConnect:function(t,r){return e("chain_con",{index1:t,index2:r})},chainReverse:function(t){return e("chain_rev",{index:t})},chainJoin:function(t,r){return e("chain_join",{index1:t,index2:r})},done:function(){return e("done")}},x}V.exports=d}}),Sz=He({"node_modules/polybooljs/lib/epsilon.js"(Z,V){function d(x){typeof x!="number"&&(x=1e-10);var S={epsilon:function(E){return typeof E=="number"&&(x=E),x},pointAboveOrOnLine:function(E,e,t){var r=e[0],o=e[1],a=t[0],n=t[1],i=E[0],s=E[1];return(a-r)*(s-o)-(n-o)*(i-r)>=-x},pointBetween:function(E,e,t){var r=E[1]-e[1],o=t[0]-e[0],a=E[0]-e[0],n=t[1]-e[1],i=a*o+r*n;if(i-x)},pointsSameX:function(E,e){return Math.abs(E[0]-e[0])x!=a-r>x&&(o-s)*(r-h)/(a-h)+s-t>x&&(n=!n),o=s,a=h}return n}};return S}V.exports=d}}),Mz=He({"node_modules/polybooljs/lib/linked-list.js"(Z,V){var d={create:function(){var x={root:{root:!0,next:null},exists:function(S){return!(S===null||S===x.root)},isEmpty:function(){return x.root.next===null},getHead:function(){return x.root.next},insertBefore:function(S,E){for(var e=x.root,t=x.root.next;t!==null;){if(E(t)){S.prev=t.prev,S.next=t,t.prev.next=S,t.prev=S;return}e=t,t=t.next}e.next=S,S.prev=e,S.next=null},findTransition:function(S){for(var E=x.root,e=x.root.next;e!==null&&!S(e);)E=e,e=e.next;return{before:E===x.root?null:E,after:e,insert:function(t){return t.prev=E,t.next=e,E.next=t,e!==null&&(e.prev=t),t}}}};return x},node:function(x){return x.prev=null,x.next=null,x.remove=function(){x.prev.next=x.next,x.next&&(x.next.prev=x.prev),x.prev=null,x.next=null},x}};V.exports=d}}),Ez=He({"node_modules/polybooljs/lib/intersecter.js"(Z,V){var d=Mz();function x(S,E,e){function t(T,l){return{id:e?e.segmentId():-1,start:T,end:l,myFill:{above:null,below:null},otherFill:null}}function r(T,l,_){return{id:e?e.segmentId():-1,start:T,end:l,myFill:{above:_.myFill.above,below:_.myFill.below},otherFill:null}}var o=d.create();function a(T,l,_,w,A,M){var g=E.pointsCompare(l,A);return g!==0?g:E.pointsSame(_,M)?0:T!==w?T?1:-1:E.pointAboveOrOnLine(_,w?A:M,w?M:A)?1:-1}function n(T,l){o.insertBefore(T,function(_){var w=a(T.isStart,T.pt,l,_.isStart,_.pt,_.other.pt);return w<0})}function i(T,l){var _=d.node({isStart:!0,pt:T.start,seg:T,primary:l,other:null,status:null});return n(_,T.end),_}function s(T,l,_){var w=d.node({isStart:!1,pt:l.end,seg:l,primary:_,other:T,status:null});T.other=w,n(w,T.pt)}function h(T,l){var _=i(T,l);return s(_,T,l),_}function f(T,l){e&&e.segmentChop(T.seg,l),T.other.remove(),T.seg.end=l,T.other.pt=l,n(T.other,T.pt)}function v(T,l){var _=r(l,T.seg.end,T.seg);return f(T,l),h(_,T.primary)}function c(T,l){var _=d.create();function w(O,P){var U=O.seg.start,B=O.seg.end,X=P.seg.start,$=P.seg.end;return E.pointsCollinear(U,X,$)?E.pointsCollinear(B,X,$)||E.pointAboveOrOnLine(B,X,$)?1:-1:E.pointAboveOrOnLine(U,X,$)?1:-1}function A(O){return _.findTransition(function(P){var U=w(O,P.ev);return U>0})}function M(O,P){var U=O.seg,B=P.seg,X=U.start,$=U.end,le=B.start,ce=B.end;e&&e.checkIntersection(U,B);var de=E.linesIntersect(X,$,le,ce);if(de===!1){if(!E.pointsCollinear(X,$,le)||E.pointsSame(X,ce)||E.pointsSame($,le))return!1;var G=E.pointsSame(X,le),Y=E.pointsSame($,ce);if(G&&Y)return P;var ee=!G&&E.pointBetween(X,le,ce),q=!Y&&E.pointBetween($,le,ce);if(G)return q?v(P,$):v(O,ce),P;ee&&(Y||(q?v(P,$):v(O,ce)),v(P,X))}else de.alongA===0&&(de.alongB===-1?v(O,le):de.alongB===0?v(O,de.pt):de.alongB===1&&v(O,ce)),de.alongB===0&&(de.alongA===-1?v(P,X):de.alongA===0?v(P,de.pt):de.alongA===1&&v(P,$));return!1}for(var g=[];!o.isEmpty();){var b=o.getHead();if(e&&e.vert(b.pt[0]),b.isStart){let O=function(){if(y){var P=M(b,y);if(P)return P}return m?M(b,m):!1};var p=O;e&&e.segmentNew(b.seg,b.primary);var u=A(b),y=u.before?u.before.ev:null,m=u.after?u.after.ev:null;e&&e.tempStatus(b.seg,y?y.seg:!1,m?m.seg:!1);var R=O();if(R){if(S){var L;b.seg.myFill.below===null?L=!0:L=b.seg.myFill.above!==b.seg.myFill.below,L&&(R.seg.myFill.above=!R.seg.myFill.above)}else R.seg.otherFill=b.seg.myFill;e&&e.segmentUpdate(R.seg),b.other.remove(),b.remove()}if(o.getHead()!==b){e&&e.rewind(b.seg);continue}if(S){var L;b.seg.myFill.below===null?L=!0:L=b.seg.myFill.above!==b.seg.myFill.below,m?b.seg.myFill.below=m.seg.myFill.above:b.seg.myFill.below=T,L?b.seg.myFill.above=!b.seg.myFill.below:b.seg.myFill.above=b.seg.myFill.below}else if(b.seg.otherFill===null){var z;m?b.primary===m.primary?z=m.seg.otherFill.above:z=m.seg.myFill.above:z=b.primary?l:T,b.seg.otherFill={above:z,below:z}}e&&e.status(b.seg,y?y.seg:!1,m?m.seg:!1),b.other.status=u.insert(d.node({ev:b}))}else{var F=b.status;if(F===null)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(_.exists(F.prev)&&_.exists(F.next)&&M(F.prev.ev,F.next.ev),e&&e.statusRemove(F.ev.seg),F.remove(),!b.primary){var N=b.seg.myFill;b.seg.myFill=b.seg.otherFill,b.seg.otherFill=N}g.push(b.seg)}o.getHead().remove()}return e&&e.done(),g}return S?{addRegion:function(T){for(var l,_=T[T.length-1],w=0;wr!=v>r&&t<(f-s)*(r-h)/(v-h)+s;c&&(o=!o)}return o}}}),I_=He({"src/lib/polygon.js"(Z,V){"use strict";var d=d2().dot,x=Ws().BADNUM,S=V.exports={};S.tester=function(e){var t=e.slice(),r=t[0][0],o=r,a=t[0][1],n=a,i;for((t[t.length-1][0]!==t[0][0]||t[t.length-1][1]!==t[0][1])&&t.push(t[0]),i=1;io||A===x||An||_&&h(l))}function v(l,_){var w=l[0],A=l[1];if(w===x||wo||A===x||An)return!1;var M=t.length,g=t[0][0],b=t[0][1],p=0,u,y,m,R,L;for(u=1;uMath.max(y,g)||A>Math.max(m,b)))if(Ai||Math.abs(d(v,h))>o)return!0;return!1},S.filter=function(e,t){var r=[e[0]],o=0,a=0;function n(s){e.push(s);var h=r.length,f=o;r.splice(a+1);for(var v=f+1;v1){var i=e.pop();n(i)}return{addPt:n,raw:e,filtered:r}}}}),Rz=He({"src/components/selections/constants.js"(Z,V){"use strict";V.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}}}),Dz=He({"src/components/selections/select.js"(Z,V){"use strict";var d=Pz(),x=Iz(),S=lo(),E=es().dashStyle,e=Jn(),t=rf(),r=$p().makeEventData,o=Jd(),a=o.freeMode,n=o.rectMode,i=o.drawMode,s=o.openMode,h=o.selectMode,f=a0(),v=L_(),c=M2(),T=$m().clearOutline,l=r0(),_=l.handleEllipse,w=l.readPaths,A=S2().newShapes,M=b5(),g=k5().activateLastSelection,b=sa(),p=b.sorterAsc,u=I_(),y=y2(),m=ef().getFromId,R=C_(),L=P_().redrawReglTraces,z=Rz(),F=z.MINSELECT,N=u.filter,O=u.tester,P=A2(),U=P.p2r,B=P.axValue,X=P.getTransform;function $(Oe){return Oe.subplot!==void 0}function le(Oe,Je,Ae,Le,Ue){var Ze=!$(Le),st=a(Ue),ut=n(Ue),Ut=s(Ue),Ct=i(Ue),Pt=h(Ue),jt=Ue==="drawline",fr=Ue==="drawcircle",ur=jt||fr,sr=Le.gd,Pr=sr._fullLayout,Ta=Pt&&Pr.newselection.mode==="immediate"&&Ze,Oa=Pr._zoomlayer,Ia=Le.element.getBoundingClientRect(),qa=Le.plotinfo,Wa=X(qa),Ca=Je-Ia.left,hi=Ae-Ia.top;Pr._calcInverseTransform(sr);var wi=b.apply3DTransform(Pr._invTransform)(Ca,hi);Ca=wi[0],hi=wi[1];var Kt=Pr._invScaleX,Dt=Pr._invScaleY,Yt=Ca,Jt=hi,Fr="M"+Ca+","+hi,ta=Le.xaxes[0],ra=Le.yaxes[0],ca=ta._length,Ba=ra._length,$a=Oe.altKey&&!(i(Ue)&&Ut),Za,ri,pi,Ra,an,tn,fn;q(Oe,sr,Le),st&&(Za=N([[Ca,hi]],z.BENDPX));var xt=Oa.selectAll("path.select-outline-"+qa.id).data([1]),lt=Ct?Pr.newshape:Pr.newselection;Ct&&(Le.hasText=lt.label.text||lt.label.texttemplate);var Br=Ct&&!Ut?lt.fillcolor:"rgba(0,0,0,0)",Cr=lt.line.color||(Ze?e.contrast(sr._fullLayout.plot_bgcolor):"#7f7f7f");xt.enter().append("path").attr("class","select-outline select-outline-"+qa.id).style({opacity:Ct?lt.opacity/2:1,"stroke-dasharray":E(lt.line.dash,lt.line.width),"stroke-width":lt.line.width+"px","shape-rendering":"crispEdges"}).call(e.stroke,Cr).call(e.fill,Br).attr("fill-rule","evenodd").classed("cursor-move",!!Ct).attr("transform",Wa).attr("d",Fr+"Z");var xr=Oa.append("path").attr("class","zoombox-corners").style({fill:e.background,stroke:e.defaultLine,"stroke-width":1}).attr("transform",Wa).attr("d","M0,0Z");if(Ct&&Le.hasText){var Rr=Oa.select(".label-temp");Rr.empty()&&(Rr=Oa.append("g").classed("label-temp",!0).classed("select-outline",!0).style({opacity:.8}))}var Ur=Pr._uid+z.SELECTID,Hr=[],gt=re(sr,Le.xaxes,Le.yaxes,Le.subplot);Ta&&!Oe.shiftKey&&(Le._clearSubplotSelections=function(){if(Ze){var vr=ta._id,Or=ra._id;rt(sr,vr,Or,gt);for(var ba=(sr.layout||{}).selections||[],Pa=[],ma=!1,la=0;la=0){sr._fullLayout._deactivateShape(sr);return}if(!Ct){var ba=Pr.clickmode;y.done(Ur).then(function(){if(y.clear(Ur),vr===2){for(xt.remove(),an=0;an-1&&ce(Or,sr,Le.xaxes,Le.yaxes,Le.subplot,Le,xt),ba==="event"&&Ir(sr,void 0);t.click(sr,Or,qa.id)}).catch(b.error)}},Le.doneFn=function(){xr.remove(),y.done(Ur).then(function(){y.clear(Ur),!Ta&&Ra&&Le.selectionDefs&&(Ra.subtract=$a,Le.selectionDefs.push(Ra),Le.mergedPolygons.length=0,[].push.apply(Le.mergedPolygons,pi)),(Ta||Ct)&&j(Le,Ta),Le.doneFnCompleted&&Le.doneFnCompleted(Hr),Pt&&Ir(sr,fn)}).catch(b.error)}}function ce(Oe,Je,Ae,Le,Ue,Ze,st){var ut=Je._hoverdata,Ut=Je._fullLayout,Ct=Ut.clickmode,Pt=Ct.indexOf("event")>-1,jt=[],fr,ur,sr,Pr,Ta,Oa,Ia,qa,Wa,Ca;if(we(ut)){q(Oe,Je,Ze),fr=re(Je,Ae,Le,Ue);var hi=Se(ut,fr),wi=hi.pointNumbers.length>0;if(wi?Re(fr,hi):We(fr)&&(Ia=Ie(hi))){for(st&&st.remove(),Ca=0;Ca=0}function ae(Oe){return Oe._fullLayout._activeSelectionIndex>=0}function j(Oe,Je){var Ae=Oe.dragmode,Le=Oe.plotinfo,Ue=Oe.gd;se(Ue)&&Ue._fullLayout._deactivateShape(Ue),ae(Ue)&&Ue._fullLayout._deactivateSelection(Ue);var Ze=Ue._fullLayout,st=Ze._zoomlayer,ut=i(Ae),Ut=h(Ae);if(ut||Ut){var Ct=st.selectAll(".select-outline-"+Le.id);if(Ct&&Ue._fullLayout._outlining){var Pt;ut&&(Pt=A(Ct,Oe)),Pt&&S.call("_guiRelayout",Ue,{shapes:Pt});var jt;Ut&&!$(Oe)&&(jt=M(Ct,Oe)),jt&&(Ue._fullLayout._noEmitSelectedAtStart=!0,S.call("_guiRelayout",Ue,{selections:jt}).then(function(){Je&&g(Ue)})),Ue._fullLayout._outlining=!1}}Le.selection={},Le.selection.selectionDefs=Oe.selectionDefs=[],Le.selection.mergedPolygons=Oe.mergedPolygons=[]}function Q(Oe){return Oe._id}function re(Oe,Je,Ae,Le){if(!Oe.calcdata)return[];var Ue=[],Ze=Je.map(Q),st=Ae.map(Q),ut,Ut,Ct;for(Ct=0;Ct0,Ze=Ue?Le[0]:Ae;return Je.selectedpoints?Je.selectedpoints.indexOf(Ze)>-1:!1}function Re(Oe,Je){var Ae=[],Le,Ue,Ze,st;for(st=0;st0&&Ae.push(Le);if(Ae.length===1&&(Ze=Ae[0]===Je.searchInfo,Ze&&(Ue=Je.searchInfo.cd[0].trace,Ue.selectedpoints.length===Je.pointNumbers.length))){for(st=0;st1||(Je+=Le.selectedpoints.length,Je>1)))return!1;return Je===1}function at(Oe,Je,Ae){var Le;for(Le=0;Le-1&&Je;if(!st&&Je){var vr=Mt(Oe,!0);if(vr.length){var Or=vr[0].xref,ba=vr[0].yref;if(Or&&ba){var Pa=Gt(vr),ma=mr([m(Oe,Or,"x"),m(Oe,ba,"y")]);ma(Hr,Pa)}}Oe._fullLayout._noEmitSelectedAtStart?Oe._fullLayout._noEmitSelectedAtStart=!1:Xt&&Ir(Oe,Hr),fr._reselect=!1}if(!st&&fr._deselect){var la=fr._deselect;ut=la.xref,Ut=la.yref,Ye(ut,Ut,Pt)||rt(Oe,ut,Ut,Le),Xt&&(Hr.points.length?Ir(Oe,Hr):_t(Oe)),fr._deselect=!1}return{eventData:Hr,selectionTesters:Ae}}function Ce(Oe){var Je=Oe.calcdata;if(Je)for(var Ae=0;Ae=0){Br._fullLayout._deactivateShape(Br);return}var Cr=Br._fullLayout.clickmode;if(Y(Br),xt===2&&!he&&ri(),qe)Cr.indexOf("select")>-1&&p(lt,Br,rt,Ke,we.id,Pt),Cr.indexOf("event")>-1&&i.click(Br,lt,we.id);else if(xt===1&&he){var xr=at?ne:ue,Rr=at==="s"||nt==="w"?0:1,Ur=xr._name+".range["+Rr+"]",Hr=P(xr,Rr),gt="left",Xt="middle";if(xr.fixedrange)return;at?(Xt=at==="n"?"top":"bottom",xr.side==="right"&&(gt="right")):nt==="e"&&(gt="right"),Br._context.showAxisRangeEntryBoxes&&d.select(Ct).call(o.makeEditable,{gd:Br,immediate:!0,background:Br._fullLayout.paper_bgcolor,text:String(Hr),fill:xr.tickfont?xr.tickfont.color:"#444",horizontalAlign:gt,verticalAlign:Xt}).on("edit",function(vr){var Or=xr.d2r(vr);Or!==void 0&&t.call("_guiRelayout",Br,Ur,Or)})}}f.init(Pt);var ur,sr,Pr,Ta,Oa,Ia,qa,Wa,Ca,hi;function wi(xt,lt,Br){var Cr=Ct.getBoundingClientRect();ur=lt-Cr.left,sr=Br-Cr.top,pe._fullLayout._calcInverseTransform(pe);var xr=x.apply3DTransform(pe._fullLayout._invTransform)(ur,sr);ur=xr[0],sr=xr[1],Pr={l:ur,r:ur,w:0,t:sr,b:sr,h:0},Ta=pe._hmpixcount?pe._hmlumcount/pe._hmpixcount:E(pe._fullLayout.plot_bgcolor).getLuminance(),Oa="M0,0H"+Nt+"V"+Gt+"H0V0",Ia=!1,qa="xy",hi=!1,Wa=le(tt,Ta,Mt,kt,Oa),Ca=ce(tt,Mt,kt)}function Kt(xt,lt){if(pe._transitioningWithDuration)return!1;var Br=Math.max(0,Math.min(Nt,Ze*xt+ur)),Cr=Math.max(0,Math.min(Gt,st*lt+sr)),xr=Math.abs(Br-ur),Rr=Math.abs(Cr-sr);Pr.l=Math.min(ur,Br),Pr.r=Math.max(ur,Br),Pr.t=Math.min(sr,Cr),Pr.b=Math.max(sr,Cr);function Ur(){qa="",Pr.r=Pr.l,Pr.t=Pr.b,Ca.attr("d","M0,0Z")}if(Mr.isSubplotConstrained)xr>R||Rr>R?(qa="xy",xr/Nt>Rr/Gt?(Rr=xr*Gt/Nt,sr>Cr?Pr.t=sr-Rr:Pr.b=sr+Rr):(xr=Rr*Nt/Gt,ur>Br?Pr.l=ur-xr:Pr.r=ur+xr),Ca.attr("d",ae(Pr))):Ur();else if(mr.isSubplotConstrained)if(xr>R||Rr>R){qa="xy";var Hr=Math.min(Pr.l/Nt,(Gt-Pr.b)/Gt),gt=Math.max(Pr.r/Nt,(Gt-Pr.t)/Gt);Pr.l=Hr*Nt,Pr.r=gt*Nt,Pr.b=(1-Hr)*Gt,Pr.t=(1-gt)*Gt,Ca.attr("d",ae(Pr))}else Ur();else!Er||Rr0){var vr;if(mr.isSubplotConstrained||!qr&&Er.length===1){for(vr=0;vr1&&(Ur.maxallowed!==void 0&&_t===(Ur.range[0]1&&(Hr.maxallowed!==void 0&&Oe===(Hr.range[0]=0?Math.min(pe,.9):1/(1/Math.max(pe,-.3)+3.222))}function $(pe,we,Se){return pe?pe==="nsew"?Se?"":we==="pan"?"move":"crosshair":pe.toLowerCase()+"-resize":"pointer"}function le(pe,we,Se,Ie,Re){return pe.append("path").attr("class","zoombox").style({fill:we>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",r(Se,Ie)).attr("d",Re+"Z")}function ce(pe,we,Se){return pe.append("path").attr("class","zoombox-corners").style({fill:a.background,stroke:a.defaultLine,"stroke-width":1,opacity:0}).attr("transform",r(we,Se)).attr("d","M0,0Z")}function de(pe,we,Se,Ie,Re,We){pe.attr("d",Ie+"M"+Se.l+","+Se.t+"v"+Se.h+"h"+Se.w+"v-"+Se.h+"h-"+Se.w+"Z"),G(pe,we,Re,We)}function G(pe,we,Se,Ie){Se||(pe.transition().style("fill",Ie>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),we.transition().style("opacity",1).duration(200))}function Y(pe){d.select(pe).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function ee(pe){L&&pe.data&&pe._context.showTips&&(x.notifier(x._(pe,"Double-click to zoom back out"),"long",pe),L=!1)}function q(pe,we){return"M"+(pe.l-.5)+","+(we-R-.5)+"h-3v"+(2*R+1)+"h3ZM"+(pe.r+.5)+","+(we-R-.5)+"h3v"+(2*R+1)+"h-3Z"}function se(pe,we){return"M"+(we-R-.5)+","+(pe.t-.5)+"v-3h"+(2*R+1)+"v3ZM"+(we-R-.5)+","+(pe.b+.5)+"v3h"+(2*R+1)+"v-3Z"}function ae(pe){var we=Math.floor(Math.min(pe.b-pe.t,pe.r-pe.l,R)/2);return"M"+(pe.l-3.5)+","+(pe.t-.5+we)+"h3v"+-we+"h"+we+"v-3h-"+(we+3)+"ZM"+(pe.r+3.5)+","+(pe.t-.5+we)+"h-3v"+-we+"h"+-we+"v-3h"+(we+3)+"ZM"+(pe.r+3.5)+","+(pe.b+.5-we)+"h-3v"+we+"h"+-we+"v3h"+(we+3)+"ZM"+(pe.l-3.5)+","+(pe.b+.5-we)+"h3v"+we+"h"+we+"v3h-"+(we+3)+"Z"}function j(pe,we,Se,Ie,Re){for(var We=!1,at={},nt={},tt,qe,he,ue,ne=(Re||{}).xaHash,Ce=(Re||{}).yaHash,Ye=0;Ye1&&x.warn("Full array edits are incompatible with other edits",h);var w=n[""][""];if(t(w))a.set(null);else if(Array.isArray(w))a.set(w);else return x.warn("Unrecognized full array edit value",h,w),!0;return T?!1:(f(l,_),v(o),!0)}var A=Object.keys(n).map(Number).sort(S),M=a.get(),g=M||[],b=s(_,h).get(),p=[],u=-1,y=g.length,m,R,L,z,F,N,O,P;for(m=0;mg.length-(O?0:1)){x.warn("index out of range",h,L);continue}if(N!==void 0)F.length>1&&x.warn("Insertion & removal are incompatible with edits to the same index.",h,L),t(N)?p.push(L):O?(N==="add"&&(N={}),g.splice(L,0,N),b&&b.splice(L,0,{})):x.warn("Unrecognized full object edit value",h,L,N),u===-1&&(u=L);else for(R=0;R=0;m--)g.splice(p[m],1),b&&b.splice(p[m],1);if(g.length?M||a.set(g):a.set(null),T)return!1;if(f(l,_),c!==d){var U;if(u===-1)U=A;else{for(y=Math.max(g.length,y),U=[],m=0;m=u));m++)U.push(L);for(m=u;m0&&x.log("Clearing previous rejected promises from queue."),l._promises=[]},Z.cleanLayout=function(l){var _,w;l||(l={}),l.xaxis1&&(l.xaxis||(l.xaxis=l.xaxis1),delete l.xaxis1),l.yaxis1&&(l.yaxis||(l.yaxis=l.yaxis1),delete l.yaxis1),l.scene1&&(l.scene||(l.scene=l.scene1),delete l.scene1);var A=(S.subplotsRegistry.cartesian||{}).attrRegex,M=(S.subplotsRegistry.polar||{}).attrRegex,g=(S.subplotsRegistry.ternary||{}).attrRegex,b=(S.subplotsRegistry.gl3d||{}).attrRegex,p=Object.keys(l);for(_=0;_3?(O.x=1.02,O.xanchor="left"):O.x<-2&&(O.x=-.02,O.xanchor="right"),O.y>3?(O.y=1.02,O.yanchor="bottom"):O.y<-2&&(O.y=-.02,O.yanchor="top")),l.dragmode==="rotate"&&(l.dragmode="orbit"),e.clean(l),l.template&&l.template.layout&&Z.cleanLayout(l.template.layout),l};function n(l,_,w=!1){var A=l[_],M=_.charAt(0);w&&Array.isArray(A)||A&&A!=="paper"&&(l[_]=t(A,M,!0))}Z.cleanData=function(l){for(var _=0;_0)return l.slice(0,_)}Z.hasParent=function(l,_){for(var w=c(_);w;){if(w in l)return!0;w=c(w)}return!1},Z.clearAxisTypes=function(l,_,w){for(var A=0;A<_.length;A++)for(var M=l._fullData[A],g=0;g<3;g++){var b=r(l,M,a[g]);if(b&&b.type!=="log"){var p=b._name,u=b._id.slice(1);if(u.slice(0,5)==="scene"){if(w[u]!==void 0)continue;p=u+"."+p}var y=p+".type";w[p]===void 0&&w[y]===void 0&&x.nestedProperty(l.layout,y).set(null)}}};var T=(l,_)=>{let w=(...A)=>A.every(M=>x.isPlainObject(M))||A.every(M=>Array.isArray(M));if([l,_].every(A=>Array.isArray(A))){if(l.length!==_.length)return!1;for(let A=0;Ax.isPlainObject(A))){if(Object.keys(l).length!==Object.keys(_).length)return!1;for(let A in l){if(A.startsWith("_"))continue;let M=l[A],g=_[A];if(M!==g&&!(w(M,g)?T(M,g):!1))return!1}return!0}return!1};Z.collectionsAreEqual=T}}),k2=He({"src/plot_api/plot_api.js"(Z){"use strict";var V=Wn(),d=as(),x=i5(),S=sa(),E=S.nestedProperty,e=Qy(),t=iz(),r=lo(),o=e1(),a=bc(),n=Ho(),i=h5(),s=Wh(),h=es(),f=Jn(),v=I5().initInteractions,c=vd(),T=Af().clearOutline,l=X0().dfltConfig,_=Bz(),w=Nz(),A=P_(),M=pc(),g=lh().AX_NAME_PATTERN,b=0,p=5;function u(Ae,Le,Ue,Ze){var st;if(Ae=S.getGraphDiv(Ae),e.init(Ae),S.isPlainObject(Le)){var ut=Le;Le=ut.data,Ue=ut.layout,Ze=ut.config,st=ut.frames}var Ut=e.triggerHandler(Ae,"plotly_beforeplot",[Le,Ue,Ze]);if(Ut===!1)return Promise.reject();!Le&&!Ue&&!S.isPlotDiv(Ae)&&S.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.",Ae);function Ct(){if(st)return Z.addFrames(Ae,st)}z(Ae,Ze),Ue||(Ue={}),V.select(Ae).classed("js-plotly-plot",!0),h.makeTester(),Array.isArray(Ae._promises)||(Ae._promises=[]);var Pt=(Ae.data||[]).length===0&&Array.isArray(Le);Array.isArray(Le)&&(w.cleanData(Le),Pt?Ae.data=Le:Ae.data.push.apply(Ae.data,Le),Ae.empty=!1),(!Ae.layout||Pt)&&(Ae.layout=w.cleanLayout(Ue)),a.supplyDefaults(Ae);var jt=Ae._fullLayout,fr=jt._has("cartesian");jt._replotting=!0,(Pt||jt._shouldCreateBgLayer)&&(Je(Ae),jt._shouldCreateBgLayer&&delete jt._shouldCreateBgLayer),h.initGradients(Ae),h.initPatterns(Ae),Pt&&n.saveShowSpikeInitial(Ae);var ur=!Ae.calcdata||Ae.calcdata.length!==(Ae._fullData||[]).length;ur&&a.doCalcdata(Ae);for(var sr=0;sr=Ae.data.length||st<-Ae.data.length)throw new Error(Ue+" must be valid indices for gd.data.");if(Le.indexOf(st,Ze+1)>-1||st>=0&&Le.indexOf(-Ae.data.length+st)>-1||st<0&&Le.indexOf(Ae.data.length+st)>-1)throw new Error("each index in "+Ue+" must be unique.")}}function U(Ae,Le,Ue){if(!Array.isArray(Ae.data))throw new Error("gd.data must be an array.");if(typeof Le>"u")throw new Error("currentIndices is a required argument.");if(Array.isArray(Le)||(Le=[Le]),P(Ae,Le,"currentIndices"),typeof Ue<"u"&&!Array.isArray(Ue)&&(Ue=[Ue]),typeof Ue<"u"&&P(Ae,Ue,"newIndices"),typeof Ue<"u"&&Le.length!==Ue.length)throw new Error("current and new indices must be of equal length.")}function B(Ae,Le,Ue){var Ze,st;if(!Array.isArray(Ae.data))throw new Error("gd.data must be an array.");if(typeof Le>"u")throw new Error("traces must be defined.");for(Array.isArray(Le)||(Le=[Le]),Ze=0;Ze"u")throw new Error("indices must be an integer or array of integers");P(Ae,Ue,"indices");for(var ut in Le){if(!Array.isArray(Le[ut])||Le[ut].length!==Ue.length)throw new Error("attribute "+ut+" must be an array of length equal to indices array length");if(st&&(!(ut in Ze)||!Array.isArray(Ze[ut])||Ze[ut].length!==Le[ut].length))throw new Error("when maxPoints is set as a key:value object it must contain a 1:1 correspondence with the keys and number of traces in the update object")}}function $(Ae,Le,Ue,Ze){var st=S.isPlainObject(Ze),ut=[],Ut,Ct,Pt,jt,fr;Array.isArray(Ue)||(Ue=[Ue]),Ue=O(Ue,Ae.data.length-1);for(var ur in Le)for(var sr=0;sr=0&&fr=0&&fr"u")return jt=Z.redraw(Ae),t.add(Ae,st,Ut,ut,Ct),jt;Array.isArray(Ue)||(Ue=[Ue]);try{U(Ae,Ze,Ue)}catch(fr){throw Ae.data.splice(Ae.data.length-Le.length,Le.length),fr}return t.startSequence(Ae),t.add(Ae,st,Ut,ut,Ct),jt=Z.moveTraces(Ae,Ze,Ue),t.stopSequence(Ae),jt}function ee(Ae,Le){Ae=S.getGraphDiv(Ae);var Ue=[],Ze=Z.addTraces,st=ee,ut=[Ae,Ue,Le],Ut=[Ae,Le],Ct,Pt;if(typeof Le>"u")throw new Error("indices must be an integer or array of integers.");for(Array.isArray(Le)||(Le=[Le]),P(Ae,Le,"indices"),Le=O(Le,Ae.data.length-1),Le.sort(S.sorterDes),Ct=0;Ct"u")for(Ue=[],jt=0;jt0&&typeof Yt.parts[ta]!="string";)ta--;var ra=Yt.parts[ta],ca=Yt.parts[ta-1]+"."+ra,Ba=Yt.parts.slice(0,ta).join("."),$a=E(Ae.layout,Ba).get(),Za=E(Ze,Ba).get(),ri=Yt.get();if(Jt!==void 0){qa[Dt]=Jt,Wa[Dt]=ra==="reverse"?Jt:ae(ri);var pi=o.getLayoutValObject(Ze,Yt.parts);if(pi&&pi.impliedEdits&&Jt!==null)for(var Ra in pi.impliedEdits)Ca(S.relativeAttr(Dt,Ra),pi.impliedEdits[Ra]);if(["width","height"].indexOf(Dt)!==-1)if(Jt){Ca("autosize",null);var an=Dt==="height"?"width":"height";Ca(an,Ze[an])}else Ze[Dt]=Ae._initialAutoSize[Dt];else if(Dt==="autosize")Ca("width",Jt?null:Ze.width),Ca("height",Jt?null:Ze.height);else if(ca.match(Re))Kt(ca),E(Ze,Ba+"._inputRange").set(null);else if(ca.match(We)){Kt(ca),E(Ze,Ba+"._inputRange").set(null);var tn=E(Ze,Ba).get();tn._inputDomain&&(tn._input.domain=tn._inputDomain.slice())}else ca.match(at)&&E(Ze,Ba+"._inputDomain").set(null);if(ra==="type"){wi=$a;var fn=Za.type==="linear"&&Jt==="log",xt=Za.type==="log"&&Jt==="linear";if(fn||xt){if(!wi||!wi.range)Ca(Ba+".autorange",!0);else if(Za.autorange)fn&&(wi.range=wi.range[1]>wi.range[0]?[1,2]:[2,1]);else{var lt=wi.range[0],Br=wi.range[1];fn?(lt<=0&&Br<=0&&Ca(Ba+".autorange",!0),lt<=0?lt=Br/1e6:Br<=0&&(Br=lt/1e6),Ca(Ba+".range[0]",Math.log(lt)/Math.LN10),Ca(Ba+".range[1]",Math.log(Br)/Math.LN10)):(Ca(Ba+".range[0]",Math.pow(10,lt)),Ca(Ba+".range[1]",Math.pow(10,Br)))}Array.isArray(Ze._subplots.polar)&&Ze._subplots.polar.length&&Ze[Yt.parts[0]]&&Yt.parts[1]==="radialaxis"&&delete Ze[Yt.parts[0]]._subplot.viewInitial["radialaxis.range"],r.getComponentMethod("annotations","convertCoords")(Ae,Za,Jt,Ca),r.getComponentMethod("images","convertCoords")(Ae,Za,Jt,Ca)}else Ca(Ba+".autorange",!0),Ca(Ba+".range",null);E(Ze,Ba+"._inputRange").set(null)}else if(ra.match(g)){var Cr=E(Ze,Dt).get(),xr=(Jt||{}).type;(!xr||xr==="-")&&(xr="linear"),r.getComponentMethod("annotations","convertCoords")(Ae,Cr,xr,Ca),r.getComponentMethod("images","convertCoords")(Ae,Cr,xr,Ca)}var Rr=_.containerArrayMatch(Dt);if(Rr){fr=Rr.array,ur=Rr.index;var Ur=Rr.property,Hr=pi||{editType:"calc"};ur!==""&&Ur===""&&(_.isAddVal(Jt)?Wa[Dt]=null:_.isRemoveVal(Jt)?Wa[Dt]=(E(Ue,fr).get()||[])[ur]:S.warn("unrecognized full object value",Le)),M.update(Ia,Hr),jt[fr]||(jt[fr]={});var gt=jt[fr][ur];gt||(gt=jt[fr][ur]={}),gt[Ur]=Jt,delete Le[Dt]}else ra==="reverse"?($a.range?$a.range.reverse():(Ca(Ba+".autorange",!0),$a.range=[1,0]),Za.autorange?Ia.calc=!0:Ia.plot=!0):(Dt==="dragmode"&&(Jt===!1&&ri!==!1||Jt!==!1&&ri===!1)||Ze._has("scatter-like")&&Ze._has("regl")&&Dt==="dragmode"&&(Jt==="lasso"||Jt==="select")&&!(ri==="lasso"||ri==="select")?Ia.plot=!0:pi?M.update(Ia,pi):Ia.calc=!0,Yt.set(Jt))}}for(fr in jt){var Xt=_.applyContainerArrayChanges(Ae,ut(Ue,fr),jt[fr],Ia,ut);Xt||(Ia.plot=!0)}for(var vr in hi){wi=n.getFromId(Ae,vr);var Or=wi&&wi._constraintGroup;if(Or){Ia.calc=!0;for(var ba in Or)hi[ba]||(n.getFromId(Ae,ba)._constraintShrinkable=!0)}}(tt(Ae)||Le.height||Le.width)&&(Ia.plot=!0);var Pa=Ze.shapes;for(ur=0;ur1;)if(Ze.pop(),Ue=E(Le,Ze.join(".")+".uirevision").get(),Ue!==void 0)return Ue;return Le.uirevision}function rt(Ae,Le){for(var Ue=0;Ue[Ba,Ae._ev.listeners(Ba)]);ut=Z.newPlot(Ae,Le,Ue,Ze).then(()=>{for(let[Ba,$a]of ca)$a.forEach(Za=>Ae.on(Ba,Za));return Z.react(Ae,Le,Ue,Ze)})}else{Ae.data=Le||[],w.cleanData(Ae.data),Ae.layout=Ue||{},w.cleanLayout(Ae.layout),kt(Ae.data,Ae.layout,Ct,Pt),a.supplyDefaults(Ae,{skipUpdateCalc:!0});var ur=Ae._fullData,sr=Ae._fullLayout,Pr=sr.datarevision===void 0,Ta=sr.transition,Oa=Mr(Ae,Pt,sr,Pr,Ta),Ia=Oa.newDataRevision,qa=Gt(Ae,Ct,ur,Pr,Ta,Ia);if(tt(Ae)&&(Oa.layoutReplot=!0),qa.calc||Oa.calc){Ae.calcdata=void 0;for(var Wa=Object.getOwnPropertyNames(sr),Ca=0;Ca(fr||Ae.emit("plotly_react",{config:Ze,data:Le,layout:Ue}),Ae))}function Gt(Ae,Le,Ue,Ze,st,ut){var Ut=Le.length===Ue.length;if(!st&&!Ut)return{fullReplot:!0,calc:!0};var Ct=M.traceFlags();Ct.arrays={},Ct.nChanges=0,Ct.nChangesAnim=0;var Pt,jt;function fr(Pr){var Ta=o.getTraceValObject(jt,Pr);return!jt._module.animatable&&Ta.anim&&(Ta.anim=!1),Ta}var ur={getValObject:fr,flags:Ct,immutable:Ze,transition:st,newDataRevision:ut,gd:Ae},sr={};for(Pt=0;Pt=st.length?st[0]:st[jt]:st}function Ct(jt){return Array.isArray(ut)?jt>=ut.length?ut[0]:ut[jt]:ut}function Pt(jt,fr){var ur=0;return function(){if(jt&&++ur===fr)return jt()}}return new Promise(function(jt,fr){function ur(){if(Ze._frameQueue.length!==0){for(;Ze._frameQueue.length;){var ra=Ze._frameQueue.pop();ra.onInterrupt&&ra.onInterrupt()}Ae.emit("plotly_animationinterrupted",[])}}function sr(ra){if(ra.length!==0){for(var ca=0;caZe._timeToNext&&Ta()};ra()}var Ia=0;function qa(ra){return Array.isArray(st)?Ia>=st.length?ra.transitionOpts=st[Ia]:ra.transitionOpts=st[0]:ra.transitionOpts=st,Ia++,ra}var Wa,Ca,hi=[],wi=Le==null,Kt=Array.isArray(Le),Dt=!wi&&!Kt&&S.isPlainObject(Le);if(Dt)hi.push({type:"object",data:qa(S.extendFlat({},Le))});else if(wi||["string","number"].indexOf(typeof Le)!==-1)for(Wa=0;Wa0&&FrFr)&&ta.push(Ca);hi=ta}}hi.length>0?sr(hi):(Ae.emit("plotly_animated"),jt())})}function Er(Ae,Le,Ue){if(Ae=S.getGraphDiv(Ae),Le==null)return Promise.resolve();if(!S.isPlotDiv(Ae))throw new Error("This element is not a Plotly plot: "+Ae+". It's likely that you've failed to create a plot before adding frames. For more details, see https://plotly.com/javascript/animations/");var Ze,st,ut,Ut,Ct=Ae._transitionData._frames,Pt=Ae._transitionData._frameHash;if(!Array.isArray(Le))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+Le);var jt=Ct.length+Le.length*2,fr=[],ur={};for(Ze=Le.length-1;Ze>=0;Ze--)if(S.isPlainObject(Le[Ze])){var sr=Le[Ze].name,Pr=(Pt[sr]||ur[sr]||{}).name,Ta=Le[Ze].name,Oa=Pt[Pr]||ur[Pr];Pr&&Ta&&typeof Ta=="number"&&Oa&&bYt.index?-1:Dt.index=0;Ze--){if(st=fr[Ze].frame,typeof st.name=="number"&&S.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!st.name)for(;Pt[st.name="frame "+Ae._transitionData._counter++];);if(Pt[st.name]){for(ut=0;ut=0;Ue--)Ze=Le[Ue],ut.push({type:"delete",index:Ze}),Ut.unshift({type:"insert",index:Ze,value:st[Ze]});var Ct=a.modifyFrames,Pt=a.modifyFrames,jt=[Ae,Ut],fr=[Ae,ut];return t&&t.add(Ae,Ct,jt,Pt,fr),a.modifyFrames(Ae,ut)}function _t(Ae){Ae=S.getGraphDiv(Ae);var Le=Ae._fullLayout||{},Ue=Ae._fullData||[];return a.cleanPlot([],{},Ue,Le),a.purge(Ae),e.purge(Ae),Le._container&&Le._container.remove(),delete Ae._context,Ae}function Oe(Ae){var Le=Ae._fullLayout,Ue=Ae.getBoundingClientRect();if(!S.equalDomRects(Ue,Le._lastBBox)){var Ze=Le._invTransform=S.inverseTransformMatrix(S.getFullTransformMatrix(Ae));Le._invScaleX=Math.sqrt(Ze[0][0]*Ze[0][0]+Ze[0][1]*Ze[0][1]+Ze[0][2]*Ze[0][2]),Le._invScaleY=Math.sqrt(Ze[1][0]*Ze[1][0]+Ze[1][1]*Ze[1][1]+Ze[1][2]*Ze[1][2]),Le._lastBBox=Ue}}function Je(Ae){var Le=V.select(Ae),Ue=Ae._fullLayout;if(Ue._calcInverseTransform=Oe,Ue._calcInverseTransform(Ae),Ue._container=Le.selectAll(".plot-container").data([0]),Ue._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0).style({width:"100%",height:"100%"}),Ue._paperdiv=Ue._container.selectAll(".svg-container").data([0]),Ue._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),Ue._glcontainer=Ue._paperdiv.selectAll(".gl-container").data([{}]),Ue._glcontainer.enter().append("div").classed("gl-container",!0),Ue._paperdiv.selectAll(".main-svg").remove(),Ue._paperdiv.select(".modebar-container").remove(),Ue._paper=Ue._paperdiv.insert("svg",":first-child").classed("main-svg",!0),Ue._toppaper=Ue._paperdiv.append("svg").classed("main-svg",!0),Ue._modebardiv=Ue._paperdiv.append("div"),delete Ue._modeBar,Ue._hoverpaper=Ue._paperdiv.append("svg").classed("main-svg",!0),!Ue._uid){var Ze={};V.selectAll("defs").each(function(){this.id&&(Ze[this.id.split("-")[1]]=1)}),Ue._uid=S.randstr(Ze)}Ue._paperdiv.selectAll(".main-svg").attr(c.svgAttrs),Ue._defs=Ue._paper.append("defs").attr("id","defs-"+Ue._uid),Ue._clips=Ue._defs.append("g").classed("clips",!0),Ue._topdefs=Ue._toppaper.append("defs").attr("id","topdefs-"+Ue._uid),Ue._topclips=Ue._topdefs.append("g").classed("clips",!0),Ue._bgLayer=Ue._paper.append("g").classed("bglayer",!0),Ue._draggers=Ue._paper.append("g").classed("draglayer",!0);var st=Ue._paper.append("g").classed("layer-below",!0);Ue._imageLowerLayer=st.append("g").classed("imagelayer",!0),Ue._shapeLowerLayer=st.append("g").classed("shapelayer",!0),Ue._cartesianlayer=Ue._paper.append("g").classed("cartesianlayer",!0),Ue._polarlayer=Ue._paper.append("g").classed("polarlayer",!0),Ue._smithlayer=Ue._paper.append("g").classed("smithlayer",!0),Ue._ternarylayer=Ue._paper.append("g").classed("ternarylayer",!0),Ue._geolayer=Ue._paper.append("g").classed("geolayer",!0),Ue._funnelarealayer=Ue._paper.append("g").classed("funnelarealayer",!0),Ue._pielayer=Ue._paper.append("g").classed("pielayer",!0),Ue._iciclelayer=Ue._paper.append("g").classed("iciclelayer",!0),Ue._treemaplayer=Ue._paper.append("g").classed("treemaplayer",!0),Ue._sunburstlayer=Ue._paper.append("g").classed("sunburstlayer",!0),Ue._indicatorlayer=Ue._toppaper.append("g").classed("indicatorlayer",!0),Ue._glimages=Ue._paper.append("g").classed("glimages",!0);var ut=Ue._toppaper.append("g").classed("layer-above",!0);Ue._imageUpperLayer=ut.append("g").classed("imagelayer",!0),Ue._shapeUpperLayer=ut.append("g").classed("shapelayer",!0),Ue._selectionLayer=Ue._toppaper.append("g").classed("selectionlayer",!0),Ue._infolayer=Ue._toppaper.append("g").classed("infolayer",!0),Ue._menulayer=Ue._toppaper.append("g").classed("menulayer",!0),Ue._zoomlayer=Ue._toppaper.append("g").classed("zoomlayer",!0),Ue._hoverlayer=Ue._hoverpaper.append("g").classed("hoverlayer",!0),Ue._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),Ae.emit("plotly_framework")}Z.animate=qr,Z.addFrames=Er,Z.deleteFrames=Ir,Z.addTraces=Y,Z.deleteTraces=ee,Z.extendTraces=de,Z.moveTraces=q,Z.prependTraces=G,Z.newPlot=N,Z._doPlot=u,Z.purge=_t,Z.react=Nt,Z.redraw=F,Z.relayout=we,Z.restyle=se,Z.setPlotConfig=m,Z.update=qe,Z._guiRelayout=he(we),Z._guiRestyle=he(se),Z._guiUpdate=he(qe),Z._storeDirectGUIEdit=re}}),Yv=He({"src/snapshot/helpers.js"(Z){"use strict";var V=lo();Z.getDelay=function(S){return S._has&&(S._has("gl3d")||S._has("mapbox")||S._has("map"))?500:0},Z.getRedrawFunc=function(S){return function(){V.getComponentMethod("colorbar","draw")(S)}},Z.encodeSVG=function(S){return"data:image/svg+xml,"+encodeURIComponent(S)},Z.encodeJSON=function(S){return"data:application/json,"+encodeURIComponent(S)};var d=window.URL||window.webkitURL;Z.createObjectURL=function(S){return d.createObjectURL(S)},Z.revokeObjectURL=function(S){return d.revokeObjectURL(S)},Z.createBlob=function(S,E){if(E==="svg")return new window.Blob([S],{type:"image/svg+xml;charset=utf-8"});if(E==="full-json")return new window.Blob([S],{type:"application/json;charset=utf-8"});var e=x(window.atob(S));return new window.Blob([e],{type:"image/"+E})},Z.octetStream=function(S){document.location.href="data:application/octet-stream"+S};function x(S){for(var E=S.length,e=new ArrayBuffer(E),t=new Uint8Array(e),r=0;r")!==-1?"":s.html(f).text()});return s.remove(),h}function n(i){return i.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")}V.exports=function(s,h,f){var v=s._fullLayout,c=v._paper,T=v._toppaper,l=v.width,_=v.height,w;c.insert("rect",":first-child").call(S.setRect,0,0,l,_).call(E.fill,v.paper_bgcolor);var A=v._basePlotModules||[];for(w=0;w1&&M.push(s("object","layout"))),x.supplyDefaults(g);for(var u=g._fullData,y=b.length,m=0;mR.length&&A.push(s("unused",M,y.concat(R.length)));var P=R.length,U=Array.isArray(O);U&&(P=Math.min(P,O.length));var B,X,$,le,ce;if(L.dimensions===2)for(X=0;XR[X].length&&A.push(s("unused",M,y.concat(X,R[X].length)));var de=R[X].length;for(B=0;B<(U?Math.min(de,O[X].length):de);B++)$=U?O[X][B]:O,le=m[X][B],ce=R[X][B],d.validate(le,$)?ce!==le&&ce!==+le&&A.push(s("dynamic",M,y.concat(X,B),le,ce)):A.push(s("value",M,y.concat(X,B),le))}else A.push(s("array",M,y.concat(X),m[X]));else for(X=0;XF?A.push({code:"unused",traceType:m,templateCount:z,dataCount:F}):F>z&&A.push({code:"reused",traceType:m,templateCount:z,dataCount:F})}}function N(O,P){for(var U in O)if(U.charAt(0)!=="_"){var B=O[U],X=s(O,U,P);d(B)?(Array.isArray(O)&&B._template===!1&&B.templateitemname&&A.push({code:"missing",path:X,templateitemname:B.templateitemname}),N(B,X)):Array.isArray(B)&&h(B)&&N(B,X)}}if(N({data:g,layout:M},""),A.length)return A.map(f)};function h(v){for(var c=0;c=0;f--){var v=e[f];if(v.type==="scatter"&&v.xaxis===s.xaxis&&v.yaxis===s.yaxis){v.opacity=void 0;break}}}}}}}),Wz=He({"src/traces/scatter/layout_defaults.js"(Z,V){"use strict";var d=sa(),x=_2();V.exports=function(S,E){function e(r,o){return d.coerce(S,E,x,r,o)}var t=E.barmode==="group";E.scattermode==="group"&&e("scattergap",t?E.bargap:.2)}}}),tv=He({"src/plots/cartesian/align_period.js"(Z,V){"use strict";var d=as(),x=sa(),S=x.dateTime2ms,E=x.incrementMonth,e=Ws(),t=e.ONEAVGMONTH;V.exports=function(o,a,n,i){if(a.type!=="date")return{vals:i};var s=o[n+"periodalignment"];if(!s)return{vals:i};var h=o[n+"period"],f;if(d(h)){if(h=+h,h<=0)return{vals:i}}else if(typeof h=="string"&&h.charAt(0)==="M"){var v=+h.substring(1);if(v>0&&Math.round(v)===v)f=v;else return{vals:i}}for(var c=a.calendar,T=s==="start",l=s==="end",_=o[n+"period0"],w=S(_,c)||0,A=[],M=[],g=[],b=i.length,p=0;pu;)R=E(R,-f,c);for(;R<=u;)R=E(R,f,c);m=E(R,-f,c)}else{for(y=Math.round((u-w)/h),R=w+y*h;R>u;)R-=h;for(;R<=u;)R+=h;m=R-h}A[p]=T?m:l?R:(m+R)/2,M[p]=m,g[p]=R}return{vals:A,starts:M,ends:g}}}}),Fd=He({"src/traces/scatter/colorscale_calc.js"(Z,V){"use strict";var d=wp().hasColorscale,x=Tp(),S=Fu();V.exports=function(e,t){S.hasLines(t)&&d(t,"line")&&x(e,t,{vals:t.line.color,containerStr:"line",cLetter:"c"}),S.hasMarkers(t)&&(d(t,"marker")&&x(e,t,{vals:t.marker.color,containerStr:"marker",cLetter:"c"}),d(t,"marker.line")&&x(e,t,{vals:t.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}}}),Av=He({"src/traces/scatter/arrays_to_calcdata.js"(Z,V){"use strict";var d=sa();V.exports=function(S,E){for(var e=0;eN&&m[P].gap;)P--;for(B=m[P].s,O=m.length-1;O>P;O--)m[O].s=B;for(;Nle+X||!d($))}for(var de=0;deP(B))):P(F.text);let U=F.outsidetextfont.size*a*O+o;return{ppadplus:N.some(B=>B.s<0)?U:0,ppadminus:N.some(B=>B.s>=0)?U:0}}return{ppadplus:void 0,ppadminus:void 0}}function R(F,N,O,P){for(var U=z(P),B=0;Bz[c]&&c0?e:t)/(c._m*_*(c._m>0?e:t)))),jt*=1e3}if(fr===S){if(l&&(fr=c.c2p(Pt.y,!0)),fr===S)return!1;fr*=1e3}return[jt,fr]}function Q(Ct,Pt,jt,fr){var ur=jt-Ct,sr=fr-Pt,Pr=.5-Ct,Ta=.5-Pt,Oa=ur*ur+sr*sr,Ia=ur*Pr+sr*Ta;if(Ia>0&&Ia1||Math.abs(Pr.y-jt[0][1])>1)&&(Pr=[Pr.x,Pr.y],fr&&Se(Pr,Ct)We||Ct[1]nt)return[a(Ct[0],Re,We),a(Ct[1],at,nt)]}function Mt(Ct,Pt){if(Ct[0]===Pt[0]&&(Ct[0]===Re||Ct[0]===We)||Ct[1]===Pt[1]&&(Ct[1]===at||Ct[1]===nt))return!0}function kt(Ct,Pt){var jt=[],fr=Ke(Ct),ur=Ke(Pt);return fr&&ur&&Mt(fr,ur)||(fr&&jt.push(fr),ur&&jt.push(ur)),jt}function Nt(Ct,Pt,jt){return function(fr,ur){var sr=Ke(fr),Pr=Ke(ur),Ta=[];if(sr&&Pr&&Mt(sr,Pr))return Ta;sr&&Ta.push(sr),Pr&&Ta.push(Pr);var Oa=2*r.constrain((fr[Ct]+ur[Ct])/2,Pt,jt)-((sr||fr)[Ct]+(Pr||ur)[Ct]);if(Oa){var Ia;sr&&Pr?Ia=Oa>0==sr[Ct]>Pr[Ct]?sr:Pr:Ia=sr||Pr,Ia[Ct]+=Oa}return Ta}}var Gt;p==="linear"||p==="spline"?Gt=rt:p==="hv"||p==="vh"?Gt=kt:p==="hvh"?Gt=Nt(0,Re,We):p==="vhv"&&(Gt=Nt(1,at,nt));function Mr(Ct,Pt){var jt=Pt[0]-Ct[0],fr=(Pt[1]-Ct[1])/jt,ur=(Ct[1]*Pt[0]-Pt[1]*Ct[0])/jt;return ur>0?[fr>0?Re:We,nt]:[fr>0?We:Re,at]}function mr(Ct){var Pt=Ct[0],jt=Ct[1],fr=Pt===z[F-1][0],ur=jt===z[F-1][1];if(!(fr&&ur))if(F>1){var sr=Pt===z[F-2][0],Pr=jt===z[F-2][1];fr&&(Pt===Re||Pt===We)&&sr?Pr?F--:z[F-1]=Ct:ur&&(jt===at||jt===nt)&&Pr?sr?F--:z[F-1]=Ct:z[F++]=Ct}else z[F++]=Ct}function qr(Ct){z[F-1][0]!==Ct[0]&&z[F-1][1]!==Ct[1]&&mr([ue,ne]),mr(Ct),Ce=null,ue=ne=0}var Er=r.isArrayOrTypedArray(M);function Ir(Ct){if(Ct&&A&&(Ct.i=N,Ct.d=s,Ct.trace=f,Ct.marker=Er?M[Ct.i]:M,Ct.backoff=A),re=Ct[0]/_,pe=Ct[1]/w,qe=Ct[0]We?We:0,he=Ct[1]nt?nt:0,qe||he){if(!F)z[F++]=[qe||Ct[0],he||Ct[1]];else if(Ce){var Pt=Gt(Ce,Ct);Pt.length>1&&(qr(Pt[0]),z[F++]=Pt[1])}else Ye=Gt(z[F-1],Ct)[0],z[F++]=Ye;var jt=z[F-1];qe&&he&&(jt[0]!==qe||jt[1]!==he)?(Ce&&(ue!==qe&&ne!==he?mr(ue&&ne?Mr(Ce,Ct):[ue||qe,ne||he]):ue&&ne&&mr([ue,ne])),mr([qe,he])):ue-qe&&ne-he&&mr([qe||ue,he||ne]),Ce=Ct,ue=qe,ne=he}else Ce&&qr(Gt(Ce,Ct)[0]),z[F++]=Ct}for(N=0;Nwe(X,_t))break;P=X,ee=ce[0]*le[0]+ce[1]*le[1],ee>G?(G=ee,U=X,$=!1):ee=s.length||!X)break;Ir(X),O=X}}Ce&&mr([ue||Ce[0],ne||Ce[1]]),m.push(z.slice(0,F))}var Oe=p.slice(p.length-1);if(A&&Oe!=="h"&&Oe!=="v"){for(var Je=!1,Ae=-1,Le=[],Ue=0;Ue=0?n=v:(n=v=f,f++),n0,p=a(v,c,T);if(A=l.selectAll("g.trace").data(p,function(y){return y[0].trace.uid}),A.enter().append("g").attr("class",function(y){return"trace scatter trace"+y[0].trace.uid}).style("stroke-miterlimit",2),A.order(),i(v,A,c),b){w&&(M=w());var u=d.transition().duration(_.duration).ease(_.easing).each("end",function(){M&&M()}).each("interrupt",function(){M&&M()});u.each(function(){l.selectAll("g.trace").each(function(y,m){s(v,m,c,y,p,this,_)})})}else A.each(function(y,m){s(v,m,c,y,p,this,_)});g&&A.exit().remove(),l.selectAll("path:not([d])").remove()};function i(f,v,c){v.each(function(T){var l=E(d.select(this),"g","fills");t.setClipUrl(l,c.layerClipId,f);var _=T[0].trace;_._ownFill=null,_._nextFill=null;var w=[];_._ownfill&&w.push("_ownFill"),_._nexttrace&&w.push("_nextFill");var A=l.selectAll("g").data(w,e);A.enter().append("g"),A.exit().remove(),A.order().each(function(M){_[M]=E(d.select(this),"path","js-fill")})})}function s(f,v,c,T,l,_,w){var A=f._context.staticPlot,M;h(f,v,c,T,l);var g=!!w&&w.duration>0;function b(mr){return g?mr.transition():mr}var p=c.xaxis,u=c.yaxis,y=T[0].trace,m=y.line,R=d.select(_),L=E(R,"g","errorbars"),z=E(R,"g","lines"),F=E(R,"g","points"),N=E(R,"g","text");if(x.getComponentMethod("errorbars","plot")(f,L,c,w),y.visible!==!0)return;b(R).style("opacity",y.opacity);var O,P,U=y.fill.charAt(y.fill.length-1);U!=="x"&&U!=="y"&&(U="");var B,X;U==="y"?(B=1,X=u.c2p(0,!0)):U==="x"&&(B=0,X=p.c2p(0,!0)),T[0][c.isRangePlot?"nodeRangePlot3":"node3"]=R;var $="",le=[],ce=y._prevtrace,de=null,G=null;ce&&($=ce._prevRevpath||"",P=ce._nextFill,le=ce._ownPolygons,de=ce._fillsegments,G=ce._fillElement);var Y,ee,q="",se="",ae,j,Q,re,pe,we,Se=[];y._polygons=[];var Ie=[],Re=[],We=S.noop;if(O=y._ownFill,r.hasLines(y)||y.fill!=="none"){P&&P.datum(T),["hv","vh","hvh","vhv"].indexOf(m.shape)!==-1?(ae=t.steps(m.shape),j=t.steps(m.shape.split("").reverse().join(""))):m.shape==="spline"?ae=j=function(mr){var qr=mr[mr.length-1];return mr.length>1&&mr[0][0]===qr[0]&&mr[0][1]===qr[1]?t.smoothclosed(mr.slice(1),m.smoothing):t.smoothopen(mr,m.smoothing)}:ae=j=function(mr){return"M"+mr.join("L")},Q=function(mr){return j(mr.reverse())},Re=o(T,{xaxis:p,yaxis:u,trace:y,connectGaps:y.connectgaps,baseTolerance:Math.max(m.width||1,3)/4,shape:m.shape,backoff:m.backoff,simplify:m.simplify,fill:y.fill}),Ie=new Array(Re.length);var at=0;for(M=0;M=A[0]&&R.x<=A[1]&&R.y>=M[0]&&R.y<=M[1]}),u=Math.ceil(p.length/b),y=0;l.forEach(function(R,L){var z=R[0].trace;r.hasMarkers(z)&&z.marker.maxdisplayed>0&&L=Math.min(ce,de)&&c<=Math.max(ce,de)?0:1/0}var G=Math.max(3,le.mrc||0),Y=1-1/G,ee=Math.abs(f.c2p(le.x)-c);return ee=Math.min(ce,de)&&T<=Math.max(ce,de)?0:1/0}var G=Math.max(3,le.mrc||0),Y=1-1/G,ee=Math.abs(v.c2p(le.y)-T);return eese!=Ie>=se&&(pe=Q[j-1][0],we=Q[j][0],Ie-Se&&(re=pe+(we-pe)*(se-Se)/(Ie-Se),G=Math.min(G,re),Y=Math.max(Y,re)));return G=Math.max(G,0),Y=Math.min(Y,f._length),{x0:G,x1:Y,y0:se,y1:se}}if(_.indexOf("fills")!==-1&&h._fillElement){var B=P(h._fillElement)&&!P(h._fillExclusionElement);if(B){var X=U(h._polygons);X===null&&(X={x0:l[0],x1:l[0],y0:l[1],y1:l[1]});var $=e.defaultLine;return e.opacity(h.fillcolor)?$=h.fillcolor:e.opacity((h.line||{}).color)&&($=h.line.color),d.extendFlat(o,{distance:o.maxHoverDistance,x0:X.x0,x1:X.x1,y0:X.y0,y1:X.y1,color:$,hovertemplate:!1}),delete o.index,h.text&&!d.isArrayOrTypedArray(h.text)?o.text=String(h.text):o.text=h.name,[o]}}}}}),c1=He({"src/traces/scatter/select.js"(Z,V){"use strict";var d=Fu();V.exports=function(S,E){var e=S.cd,t=S.xaxis,r=S.yaxis,o=[],a=e[0].trace,n,i,s,h,f=!d.hasMarkers(a)&&!d.hasText(a);if(f)return[];if(E===!1)for(n=0;n0&&(i["_"+a+"axes"]||{})[o])return i;if((i[a+"axis"]||a)===o){if(t(i,a))return i;if((i[a]||[]).length||i[a+"0"])return i}}}function e(r){return{v:"x",h:"y"}[r.orientation||"v"]}function t(r,o){var a=e(r),n=d(r,"box-violin"),i=d(r._fullInput||{},"candlestick");return n&&!i&&o===a&&r[a]===void 0&&r[a+"0"]===void 0}}}),I2=He({"src/plots/cartesian/category_order_defaults.js"(Z,V){"use strict";var d=bp().isTypedArraySpec;function x(S,E){var e=E.dataAttr||S._id.charAt(0),t={},r,o,a;if(E.axData)r=E.axData;else for(r=[],o=0;o0||d(o),n;a&&(n="array");var i=t("categoryorder",n),s;i==="array"&&(s=t("categoryarray")),!a&&i==="array"&&(i=e.categoryorder="trace"),i==="trace"?e._initialCategories=[]:i==="array"?e._initialCategories=s.slice():(s=x(e,r).sort(),i==="category ascending"?e._initialCategories=s:i==="category descending"&&(e._initialCategories=s.reverse()))}}}}),z_=He({"src/plots/cartesian/line_grid_defaults.js"(Z,V){"use strict";var d=Ch().mix,x=sh(),S=sa();V.exports=function(e,t,r,o){o=o||{};var a=o.dfltColor;function n(m,R){return S.coerce2(e,t,o.attributes,m,R)}var i=n("linecolor",a),s=n("linewidth"),h=r("showline",o.showLine||!!i||!!s);h||(delete t.linecolor,delete t.linewidth);var f=d(a,o.bgColor,o.blend||x.lightFraction).toRgbString(),v=n("gridcolor",f),c=n("gridwidth"),T=n("griddash"),l=r("showgrid",o.showGrid||!!v||!!c||!!T);if(l||(delete t.gridcolor,delete t.gridwidth,delete t.griddash),o.hasMinor){var _=d(t.gridcolor,o.bgColor,67).toRgbString(),w=n("minor.gridcolor",_),A=n("minor.gridwidth",t.gridwidth||1),M=n("minor.griddash",t.griddash||"solid"),g=r("minor.showgrid",!!w||!!A||!!M);g||(delete t.minor.gridcolor,delete t.minor.gridwidth,delete t.minor.griddash)}if(!o.noZeroLine){var b=n("zerolinelayer"),p=n("zerolinecolor",a),u=n("zerolinewidth"),y=r("zeroline",o.showGrid||!!p||!!u);y||(delete t.zerolinelayer,delete t.zerolinecolor,delete t.zerolinewidth)}}}}),F_=He({"src/plots/cartesian/axis_defaults.js"(Z,V){"use strict";var d=as(),x=lo(),S=sa(),E=zl(),e=hp(),t=Wh(),r=Y0(),o=t1(),a=Qm(),n=e0(),i=I2(),s=z_(),h=h5(),f=wv(),v=lh().WEEKDAY_PATTERN,c=lh().HOUR_PATTERN;V.exports=function(A,M,g,b,p){var u=b.letter,y=b.font||{},m=b.splomStash||{},R=g("visible",!b.visibleDflt),L=M._template||{},z=M.type||L.type||"-",F;if(z==="date"){var N=x.getComponentMethod("calendars","handleDefaults");N(A,M,"calendar",b.calendar),b.noTicklabelmode||(F=g("ticklabelmode"))}!b.noTicklabelindex&&(z==="date"||z==="linear")&&g("ticklabelindex");var O="";(!b.noTicklabelposition||z==="multicategory")&&(O=S.coerce(A,M,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:F==="period"?["outside","inside"]:u==="x"?["outside","inside","outside left","inside left","outside right","inside right"]:["outside","inside","outside top","inside top","outside bottom","inside bottom"]}},"ticklabelposition")),b.noTicklabeloverflow||g("ticklabeloverflow",O.indexOf("inside")!==-1?"hide past domain":z==="category"||z==="multicategory"?"allow":"hide past div"),f(M,p),h(A,M,g,b),i(A,M,g,b),b.noHover||(z!=="category"&&g("hoverformat"),b.noUnifiedhovertitle||g("unifiedhovertitle.text"));var P=g("color"),U=P!==t.color.dflt?P:y.color,B=m.label||p._dfltTitle[u];if(n(A,M,g,z,b),!R)return M;g("title.text",B),S.coerceFont(g,"title.font",y,{overrideDflt:{size:S.bigFont(y.size),color:U}}),r(A,M,g,z);var X=b.hasMinor;if(X&&(E.newContainer(M,"minor"),r(A,M,g,z,{isMinor:!0})),a(A,M,g,z,b),o(A,M,g,b),X){var $=b.isMinor;b.isMinor=!0,o(A,M,g,b),b.isMinor=$}s(A,M,g,{dfltColor:P,bgColor:b.bgColor,showGrid:b.showGrid,hasMinor:X,attributes:t}),X&&!M.minor.ticks&&!M.minor.showgrid&&delete M.minor,(M.showline||M.ticks)&&g("mirror");var le=z==="multicategory";if(!b.noTickson&&(z==="category"||le)&&(M.ticks||M.showgrid)&&(le?(g("tickson","boundaries"),delete M.ticklabelposition):g("tickson")),le){var ce=g("showdividers");ce&&(g("dividercolor"),g("dividerwidth"))}if(z==="date")if(e(A,M,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:T}),!M.rangebreaks.length)delete M.rangebreaks;else{for(var de=0;de=2){var u="",y,m;if(p.length===2){for(y=0;y<2;y++)if(m=_(p[y]),m){u=v;break}}var R=g("pattern",u);if(R===v)for(y=0;y<2;y++)m=_(p[y]),m&&(A.bounds[y]=p[y]=m-1);if(R)for(y=0;y<2;y++)switch(m=p[y],R){case v:if(!d(m)){A.enabled=!1;return}if(m=+m,m!==Math.floor(m)||m<0||m>=7){A.enabled=!1;return}A.bounds[y]=p[y]=m;break;case c:if(!d(m)){A.enabled=!1;return}if(m=+m,m<0||m>24){A.enabled=!1;return}A.bounds[y]=p[y]=m;break}if(M.autorange===!1){var L=M.range;if(L[0]L[1]){A.enabled=!1;return}}else if(p[0]>L[0]&&p[1]g[1]-1/4096&&(e.domain=f),x.noneOrAll(E.domain,e.domain,f),e.tickmode==="sync"&&(e.tickmode="auto")}return t("layer"),e}}}),Kz=He({"src/plots/cartesian/layout_defaults.js"(Z,V){"use strict";var d=sa(),x=Jn(),S=$p().isUnifiedHover,E=x5(),e=zl(),t=$y(),r=Wh(),o=B5(),a=F_(),n=J0(),i=R2(),s=ef(),h=s.id2name,f=s.name2id,v=lh().AX_ID_PATTERN,c=lo(),T=c.traceIs,l=c.getComponentMethod;function _(w,A,M){Array.isArray(w[A])?w[A].push(M):w[A]=[M]}V.exports=function(A,M,g){var b=M.autotypenumbers,p={},u={},y={},m={},R={},L={},z={},F={},N={},O={},P,U;for(P=0;P rect").call(E.setTranslate,0,0).call(E.setScale,1,1),M.plot.call(E.setTranslate,g._offset,b._offset).call(E.setScale,1,1);var p=M.plot.selectAll(".scatterlayer .trace");p.selectAll(".point").call(E.setPointGroupScale,1,1),p.selectAll(".textpoint").call(E.setTextPointsScale,1,1),p.call(E.hideOutsideRangePoints,M)}function h(M,g){var b=M.plotinfo,p=b.xaxis,u=b.yaxis,y=p._length,m=u._length,R=!!M.xr1,L=!!M.yr1,z=[];if(R){var F=S.simpleMap(M.xr0,p.r2l),N=S.simpleMap(M.xr1,p.r2l),O=F[1]-F[0],P=N[1]-N[0];z[0]=(F[0]*(1-g)+g*N[0]-F[0])/(F[1]-F[0])*y,z[2]=y*(1-g+g*P/O),p.range[0]=p.l2r(F[0]*(1-g)+g*N[0]),p.range[1]=p.l2r(F[1]*(1-g)+g*N[1])}else z[0]=0,z[2]=y;if(L){var U=S.simpleMap(M.yr0,u.r2l),B=S.simpleMap(M.yr1,u.r2l),X=U[1]-U[0],$=B[1]-B[0];z[1]=(U[1]*(1-g)+g*B[1]-U[1])/(U[0]-U[1])*m,z[3]=m*(1-g+g*$/X),u.range[0]=p.l2r(U[0]*(1-g)+g*B[0]),u.range[1]=u.l2r(U[1]*(1-g)+g*B[1])}else z[1]=0,z[3]=m;e.drawOne(r,p,{skipTitle:!0}),e.drawOne(r,u,{skipTitle:!0}),e.redrawComponents(r,[p._id,u._id]);var le=R?y/z[2]:1,ce=L?m/z[3]:1,de=R?z[0]:0,G=L?z[1]:0,Y=R?z[0]/z[2]*y:0,ee=L?z[1]/z[3]*m:0,q=p._offset-Y,se=u._offset-ee;b.clipRect.call(E.setTranslate,de,G).call(E.setScale,1/le,1/ce),b.plot.call(E.setTranslate,q,se).call(E.setScale,le,ce),E.setPointGroupScale(b.zoomScalePts,1/le,1/ce),E.setTextPointsScale(b.zoomScaleTxt,1/le,1/ce)}var f;n&&(f=n());function v(){for(var M={},g=0;ga.duration?(v(),_=window.cancelAnimationFrame(A)):_=window.requestAnimationFrame(A)}return T=Date.now(),_=window.requestAnimationFrame(A),Promise.resolve()}}}),Kf=He({"src/plots/cartesian/index.js"(Z){"use strict";var V=Wn(),d=lo(),x=sa(),S=bc(),E=es(),e=Hh().getModuleCalcData,t=ef(),r=lh(),o=vd(),a=x.ensureSingle;function n(T,l,_){return x.ensureSingle(T,l,_,function(w){w.datum(_)})}var i=r.zindexSeparator;Z.name="cartesian",Z.attr=["xaxis","yaxis"],Z.idRoot=["x","y"],Z.idRegex=r.idRegex,Z.attrRegex=r.attrRegex,Z.attributes=Yz(),Z.layoutAttributes=Wh(),Z.supplyLayoutDefaults=Kz(),Z.transitionAxes=Jz(),Z.finalizeSubplots=function(T,l){var _=l._subplots,w=_.xaxis,A=_.yaxis,M=_.cartesian,g=M,b={},p={},u,y,m;for(u=0;u0){var L=R.id;if(L.indexOf(i)!==-1)continue;L+=i+(u+1),R=x.extendFlat({},R,{id:L,plot:A._cartesianlayer.selectAll(".subplot").select("."+L)})}for(var z=[],F,N=0;N1&&(X+=i+B),U.push(b+X),g=0;g1,m=l.mainplotinfo;if(!l.mainplot||y)if(u)l.xlines=a(w,"path","xlines-above"),l.ylines=a(w,"path","ylines-above"),l.xaxislayer=a(w,"g","xaxislayer-above"),l.yaxislayer=a(w,"g","yaxislayer-above");else{if(!g){var R=a(w,"g","layer-subplot");l.shapelayer=a(R,"g","shapelayer"),l.imagelayer=a(R,"g","imagelayer"),m&&y?(l.minorGridlayer=m.minorGridlayer,l.gridlayer=m.gridlayer,l.zerolinelayer=m.zerolinelayer):(l.minorGridlayer=a(w,"g","minor-gridlayer"),l.gridlayer=a(w,"g","gridlayer"),l.zerolinelayer=a(w,"g","zerolinelayer"));var L=a(w,"g","layer-between");l.shapelayerBetween=a(L,"g","shapelayer"),l.imagelayerBetween=a(L,"g","imagelayer"),a(w,"path","xlines-below"),a(w,"path","ylines-below"),l.overlinesBelow=a(w,"g","overlines-below"),a(w,"g","xaxislayer-below"),a(w,"g","yaxislayer-below"),l.overaxesBelow=a(w,"g","overaxes-below")}l.overplot=a(w,"g","overplot"),l.plot=a(l.overplot,"g",A),m&&y?l.zerolinelayerAbove=m.zerolinelayerAbove:l.zerolinelayerAbove=a(w,"g","zerolinelayer-above"),g||(l.xlines=a(w,"path","xlines-above"),l.ylines=a(w,"path","ylines-above"),l.overlinesAbove=a(w,"g","overlines-above"),a(w,"g","xaxislayer-above"),a(w,"g","yaxislayer-above"),l.overaxesAbove=a(w,"g","overaxes-above"),l.xlines=w.select(".xlines-"+b),l.ylines=w.select(".ylines-"+p),l.xaxislayer=w.select(".xaxislayer-"+b),l.yaxislayer=w.select(".yaxislayer-"+p))}else{var z=m.plotgroup,F=A+"-x",N=A+"-y";l.minorGridlayer=m.minorGridlayer,l.gridlayer=m.gridlayer,l.zerolinelayer=m.zerolinelayer,l.zerolinelayerAbove=m.zerolinelayerAbove,a(m.overlinesBelow,"path",F),a(m.overlinesBelow,"path",N),a(m.overaxesBelow,"g",F),a(m.overaxesBelow,"g",N),l.plot=a(m.overplot,"g",A),a(m.overlinesAbove,"path",F),a(m.overlinesAbove,"path",N),a(m.overaxesAbove,"g",F),a(m.overaxesAbove,"g",N),l.xlines=z.select(".overlines-"+b).select("."+F),l.ylines=z.select(".overlines-"+p).select("."+N),l.xaxislayer=z.select(".overaxes-"+b).select("."+F),l.yaxislayer=z.select(".overaxes-"+p).select("."+N)}g||(u||(n(l.minorGridlayer,"g",l.xaxis._id),n(l.minorGridlayer,"g",l.yaxis._id),l.minorGridlayer.selectAll("g").map(function(O){return O[0]}).sort(t.idSort),n(l.gridlayer,"g",l.xaxis._id),n(l.gridlayer,"g",l.yaxis._id),l.gridlayer.selectAll("g").map(function(O){return O[0]}).sort(t.idSort)),l.xlines.style("fill","none").classed("crisp",!0),l.ylines.style("fill","none").classed("crisp",!0))}function v(T,l){if(T){var _={};T.each(function(p){var u=p[0],y=V.select(this);y.remove(),c(u,l),_[u]=!0});for(var w in l._plots)for(var A=l._plots[w],M=A.overlays||[],g=0;g=0,l=n.indexOf("end")>=0,_=h.backoff*v+i.standoff,w=f.backoff*c+i.startstandoff,A,M,g,b;if(s.nodeName==="line"){A={x:+a.attr("x1"),y:+a.attr("y1")},M={x:+a.attr("x2"),y:+a.attr("y2")};var p=A.x-M.x,u=A.y-M.y;if(g=Math.atan2(u,p),b=g+Math.PI,_&&w&&_+w>Math.sqrt(p*p+u*u)){X();return}if(_){if(_*_>p*p+u*u){X();return}var y=_*Math.cos(g),m=_*Math.sin(g);M.x+=y,M.y+=m,a.attr({x2:M.x,y2:M.y})}if(w){if(w*w>p*p+u*u){X();return}var R=w*Math.cos(g),L=w*Math.sin(g);A.x-=R,A.y-=L,a.attr({x1:A.x,y1:A.y})}}else if(s.nodeName==="path"){var z=s.getTotalLength(),F="";if(z<_+w){X();return}var N=s.getPointAtLength(0),O=s.getPointAtLength(.1);g=Math.atan2(N.y-O.y,N.x-O.x),A=s.getPointAtLength(Math.min(w,z)),F="0px,"+w+"px,";var P=s.getPointAtLength(z),U=s.getPointAtLength(z-.1);b=Math.atan2(P.y-U.y,P.x-U.x),M=s.getPointAtLength(Math.max(0,z-_));var B=F?w+_:_;F+=z-B+"px,"+z+"px",a.style("stroke-dasharray",F)}function X(){a.style("stroke-dasharray","0px,100px")}function $(le,ce,de,G){le.path&&(le.noRotate&&(de=0),d.select(s.parentNode).append("path").attr({class:a.attr("class"),d:le.path,transform:r(ce.x,ce.y)+t(de*180/Math.PI)+e(G)}).style({fill:x.rgb(i.arrowcolor),"stroke-width":0}))}T&&$(f,A,g,c),l&&$(h,M,b,v)}}}),D2=He({"src/components/annotations/draw.js"(Z,V){"use strict";var d=Wn(),x=lo(),S=bc(),E=sa(),e=E.strTranslate,t=Ho(),r=Jn(),o=es(),a=rf(),n=ou(),i=Kd(),s=Ap(),h=zl().arrayEditor,f=Qz();V.exports={draw:v,drawOne:c,drawRaw:l};function v(_){var w=_._fullLayout;w._infolayer.selectAll(".annotation").remove();for(var A=0;A2/3?Ca="right":Ca="center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[Ca]}for(var Ye=!1,rt=["x","y"],Ke=0;Ke1)&&(Nt===kt?(ut=Gt.r2fraction(w["a"+Mt]),(ut<0||ut>1)&&(Ye=!0)):Ye=!0),Je=Gt._offset+Gt.r2p(w[Mt]),Ue=.5}else{var Ut=st==="domain";Mt==="x"?(Le=w[Mt],Je=Ut?Gt._offset+Gt._length*Le:Je=u.l+u.w*Le):(Le=1-w[Mt],Je=Ut?Gt._offset+Gt._length*Le:Je=u.t+u.h*Le),Ue=w.showarrow?.5:Le}if(w.showarrow){Oe.head=Je;var Ct=w["a"+Mt];if(Ze=mr*Ce(.5,w.xanchor)-qr*Ce(.5,w.yanchor),Nt===kt){var Pt=t.getRefType(Nt);Pt==="domain"?(Mt==="y"&&(Ct=1-Ct),Oe.tail=Gt._offset+Gt._length*Ct):Pt==="paper"?Mt==="y"?(Ct=1-Ct,Oe.tail=u.t+u.h*Ct):Oe.tail=u.l+u.w*Ct:Oe.tail=Gt._offset+Gt.r2p(Ct),Ae=Ze}else Oe.tail=Je+Ct,Ae=Ze+Ct;Oe.text=Oe.tail+Ze;var jt=p[Mt==="x"?"width":"height"];if(kt==="paper"&&(Oe.head=E.constrain(Oe.head,1,jt-1)),Nt==="pixel"){var fr=-Math.max(Oe.tail-3,Oe.text),ur=Math.min(Oe.tail+3,Oe.text)-jt;fr>0?(Oe.tail+=fr,Oe.text+=fr):ur>0&&(Oe.tail-=ur,Oe.text-=ur)}Oe.tail+=_t,Oe.head+=_t}else Ze=Er*Ce(Ue,Ir),Ae=Ze,Oe.text=Je+Ze;Oe.text+=_t,Ze+=_t,Ae+=_t,w["_"+Mt+"padplus"]=Er/2+Ae,w["_"+Mt+"padminus"]=Er/2-Ae,w["_"+Mt+"size"]=Er,w["_"+Mt+"shift"]=Ze}if(Ye){de.remove();return}var sr=0,Pr=0;if(w.align!=="left"&&(sr=(qe-nt)*(w.align==="center"?.5:1)),w.valign!=="top"&&(Pr=(he-tt)*(w.valign==="middle"?.5:1)),We)Re.select("svg").attr({x:ee+sr-1,y:ee+Pr}).call(o.setClipUrl,se?O:null,_);else{var Ta=ee+Pr-at.top,Oa=ee+sr-at.left;re.call(n.positionText,Oa,Ta).call(o.setClipUrl,se?O:null,_)}ae.select("rect").call(o.setRect,ee,ee,qe,he),q.call(o.setRect,G/2,G/2,ue-G,ne-G),de.call(o.setTranslate,Math.round(P.x.text-ue/2),Math.round(P.y.text-ne/2)),X.attr({transform:"rotate("+U+","+P.x.text+","+P.y.text+")"});var Ia=function(Wa,Ca){B.selectAll(".annotation-arrow-g").remove();var hi=P.x.head,wi=P.y.head,Kt=P.x.tail+Wa,Dt=P.y.tail+Ca,Yt=P.x.text+Wa,Jt=P.y.text+Ca,Fr=E.rotationXYMatrix(U,Yt,Jt),ta=E.apply2DTransform(Fr),ra=E.apply2DTransform2(Fr),ca=+q.attr("width"),Ba=+q.attr("height"),$a=Yt-.5*ca,Za=$a+ca,ri=Jt-.5*Ba,pi=ri+Ba,Ra=[[$a,ri,$a,pi],[$a,pi,Za,pi],[Za,pi,Za,ri],[Za,ri,$a,ri]].map(ra);if(!Ra.reduce(function(gt,Xt){return gt^!!E.segmentsIntersect(hi,wi,hi+1e6,wi+1e6,Xt[0],Xt[1],Xt[2],Xt[3])},!1)){Ra.forEach(function(gt){var Xt=E.segmentsIntersect(Kt,Dt,hi,wi,gt[0],gt[1],gt[2],gt[3]);Xt&&(Kt=Xt.x,Dt=Xt.y)});var an=w.arrowwidth,tn=w.arrowcolor,fn=w.arrowside,xt=B.append("g").style({opacity:r.opacity(tn)}).classed("annotation-arrow-g",!0),lt=xt.append("path").attr("d","M"+Kt+","+Dt+"L"+hi+","+wi).style("stroke-width",an+"px").call(r.stroke,r.rgb(tn));if(f(lt,fn,w),y.annotationPosition&<.node().parentNode&&!M){var Br=hi,Cr=wi;if(w.standoff){var xr=Math.sqrt(Math.pow(hi-Kt,2)+Math.pow(wi-Dt,2));Br+=w.standoff*(Kt-hi)/xr,Cr+=w.standoff*(Dt-wi)/xr}var Rr=xt.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(Kt-Br)+","+(Dt-Cr),transform:e(Br,Cr)}).style("stroke-width",an+6+"px").call(r.stroke,"rgba(0,0,0,0)").call(r.fill,"rgba(0,0,0,0)"),Ur,Hr;s.init({element:Rr.node(),gd:_,prepFn:function(){var gt=o.getTranslate(de);Ur=gt.x,Hr=gt.y,g&&g.autorange&&z(g._name+".autorange",!0),b&&b.autorange&&z(b._name+".autorange",!0)},moveFn:function(gt,Xt){var vr=ta(Ur,Hr),Or=vr[0]+gt,ba=vr[1]+Xt;de.call(o.setTranslate,Or,ba),F("x",T(g,gt,"x",u,w)),F("y",T(b,Xt,"y",u,w)),w.axref===w.xref&&F("ax",T(g,gt,"ax",u,w)),w.ayref===w.yref&&F("ay",T(b,Xt,"ay",u,w)),xt.attr("transform",e(gt,Xt)),X.attr({transform:"rotate("+U+","+Or+","+ba+")"})},doneFn:function(){x.call("_guiRelayout",_,N());var gt=document.querySelector(".js-notes-box-panel");gt&>.redraw(gt.selectedObj)}})}}};if(w.showarrow&&Ia(0,0),$){var qa;s.init({element:de.node(),gd:_,prepFn:function(){qa=X.attr("transform")},moveFn:function(Wa,Ca){var hi="pointer";if(w.showarrow)w.axref===w.xref?F("ax",T(g,Wa,"ax",u,w)):F("ax",w.ax+Wa),w.ayref===w.yref?F("ay",T(b,Ca,"ay",u.w,w)):F("ay",w.ay+Ca),Ia(Wa,Ca);else{if(M)return;var wi,Kt;if(g)wi=T(g,Wa,"x",u,w);else{var Dt=w._xsize/u.w,Yt=w.x+(w._xshift-w.xshift)/u.w-Dt/2;wi=s.align(Yt+Wa/u.w,Dt,0,1,w.xanchor)}if(b)Kt=T(b,Ca,"y",u,w);else{var Jt=w._ysize/u.h,Fr=w.y-(w._yshift+w.yshift)/u.h-Jt/2;Kt=s.align(Fr-Ca/u.h,Jt,0,1,w.yanchor)}F("x",wi),F("y",Kt),(!g||!b)&&(hi=s.getCursor(g?.5:wi,b?.5:Kt,w.xanchor,w.yanchor))}X.attr({transform:e(Wa,Ca)+qa}),i(de,hi)},clickFn:function(Wa,Ca){w.captureevents&&_.emit("plotly_clickannotation",ce(Ca))},doneFn:function(){i(de),x.call("_guiRelayout",_,N());var Wa=document.querySelector(".js-notes-box-panel");Wa&&Wa.redraw(Wa.selectedObj)}})}}y.annotationText?re.call(n.makeEditable,{delegate:de,gd:_}).call(pe).on("edit",function(Se){w.text=Se,this.call(pe),F("text",Se),g&&g.autorange&&z(g._name+".autorange",!0),b&&b.autorange&&z(b._name+".autorange",!0),x.call("_guiRelayout",_,N())}):re.call(pe)}}}),e9=He({"src/components/annotations/click.js"(Z,V){"use strict";var d=sa(),x=lo(),S=zl().arrayEditor;V.exports={hasClickToShow:E,onClick:e};function E(o,a){var n=t(o,a);return n.on.length>0||n.explicitOff.length>0}function e(o,a){var n=t(o,a),i=n.on,s=n.off.concat(n.explicitOff),h={},f=o._fullLayout.annotations,v,c;if(i.length||s.length){for(v=0;v1){i=!0;break}}i?e.fullLayout._infolayer.select(".annotation-"+e.id+'[data-index="'+a+'"]').remove():(n._pdata=x(e.glplot.cameraParams,[t.xaxis.r2l(n.x)*r[0],t.yaxis.r2l(n.y)*r[1],t.zaxis.r2l(n.z)*r[2]]),d(e.graphDiv,n,a,e.id,n._xa,n._ya))}}}}),l9=He({"src/components/annotations3d/index.js"(Z,V){"use strict";var d=lo(),x=sa();V.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:z2()}}},layoutAttributes:z2(),handleDefaults:n9(),includeBasePlot:S,convert:o9(),draw:s9()};function S(E,e){var t=d.subplotsRegistry.gl3d;if(t)for(var r=t.attrRegex,o=Object.keys(E),a=0;a{var m=y+"anchor",R=y==="x"?_:w,L={_fullLayout:n},z,F,N,O;let P=y+"ref",U=o[P];if(Array.isArray(U)&&U.length>0){let B=e.countDefiningCoords(c,f,y);O=x.coerceRefArray(o,a,L,y,void 0,"paper",B),a["_"+y+"refArray"]=!0}else O=x.coerceRef(o,a,L,y,void 0,"paper");if(Array.isArray(O))O.forEach(function(B){x.getRefType(B)==="range"&&(z=x.getFromId(L,B),z&&z._shapeIndices.indexOf(a._index)===-1&&z._shapeIndices.push(a._index))}),T&&[0,1].forEach(function(B){let X=O[B];x.getRefType(X)==="range"?(z=x.getFromId(L,X),F=e.shapePositionToRange(z),N=e.rangeToShapePosition(z),(z.type==="category"||z.type==="multicategory")&&i(y+B+"shift")):F=N=d.identity;let le=y+B,ce=o[le];if(o[le]=F(o[le],!0),R==="pixel"?i(le,M[B]):x.coercePosition(a,L,i,X,le,A[B]),a[le]=N(a[le]),o[le]=ce,B===0&&R==="pixel"){let de=o[m];o[m]=F(o[m],!0),x.coercePosition(a,L,i,X,m,.25),a[m]=N(a[m]),o[m]=de}});else{if(x.getRefType(O)==="range"?(z=x.getFromId(L,O),z._shapeIndices.push(a._index),N=e.rangeToShapePosition(z),F=e.shapePositionToRange(z),T&&(z.type==="category"||z.type==="multicategory")&&(i(y+"0shift"),i(y+"1shift"))):F=N=d.identity,T){let X=y+"0",$=y+"1",le=o[X],ce=o[$];o[X]=F(o[X],!0),o[$]=F(o[$],!0),R==="pixel"?(i(X,M[0]),i($,M[1])):(x.coercePosition(a,L,i,O,X,A[0]),x.coercePosition(a,L,i,O,$,A[1])),a[X]=N(a[X]),a[$]=N(a[$]),o[X]=le,o[$]=ce}if(R==="pixel"){let X=o[m];o[m]=F(o[m],!0),x.coercePosition(a,L,i,O,m,.25),a[m]=N(a[m]),o[m]=X}}}),T&&d.noneOrAll(o,a,["x0","x1","y0","y1"]);var g=c==="line",b,p;if(T&&(b=i("label.texttemplate"),i("label.texttemplatefallback")),b||(p=i("label.text")),p||b){i("label.textangle");var u=i("label.textposition",g?"middle":"middle center");i("label.xanchor"),i("label.yanchor",t(g,u)),i("label.padding"),d.coerceFont(i,"label.font",n.font)}}}}),c9=He({"src/components/shapes/draw_newshape/defaults.js"(Z,V){"use strict";var d=Jn(),x=sa();function S(E,e){return E?"bottom":e.indexOf("top")!==-1?"top":e.indexOf("bottom")!==-1?"bottom":"middle"}V.exports=function(e,t,r){r("newshape.visible"),r("newshape.name"),r("newshape.showlegend"),r("newshape.legend"),r("newshape.legendwidth"),r("newshape.legendgroup"),r("newshape.legendgrouptitle.text"),x.coerceFont(r,"newshape.legendgrouptitle.font"),r("newshape.legendrank"),r("newshape.drawdirection"),r("newshape.layer"),r("newshape.fillcolor"),r("newshape.fillrule"),r("newshape.opacity");var o=r("newshape.line.width");if(o){var a=(e||{}).plot_bgcolor||"#FFF";r("newshape.line.color",d.contrast(a)),r("newshape.line.dash")}var n=e.dragmode==="drawline",i=r("newshape.label.text"),s=r("newshape.label.texttemplate");if(r("newshape.label.texttemplatefallback"),i||s){r("newshape.label.textangle");var h=r("newshape.label.textposition",n?"middle":"middle center");r("newshape.label.xanchor"),r("newshape.label.yanchor",S(n,h)),r("newshape.label.padding"),x.coerceFont(r,"newshape.label.font",t.font)}r("activeshape.fillcolor"),r("activeshape.opacity")}}}),f9=He({"src/components/shapes/calc_autorange.js"(Z,V){"use strict";var d=sa(),x=Ho(),S=L_(),E=a0();V.exports=function(i){var s=i._fullLayout,h=d.filterVisible(s.shapes);if(!(!h.length||!i._fullData.length))for(var f=0;f{c=x.getFromId(i,A),v._extremes[c._id]=x.findExtremes(c,M,t(v))})}else v.xref!=="paper"&&l!=="domain"&&(c=x.getFromId(i,v.xref),T=a(c,v,S.paramIsX),T&&(v._extremes[c._id]=x.findExtremes(c,T,t(v))));if(_==="array"){let w=e(i,v,"y");Object.entries(w).forEach(([A,M])=>{c=x.getFromId(i,A),v._extremes[c._id]=x.findExtremes(c,M,r(v))})}else v.yref!=="paper"&&_!=="domain"&&(c=x.getFromId(i,v.yref),T=a(c,v,S.paramIsY),T&&(v._extremes[c._id]=x.findExtremes(c,T,r(v))))}};function e(n,i,s){let h=i[s+"ref"],f=s==="x"?S.paramIsX:S.paramIsY;function v(A,M){A==="paper"||x.getRefType(A)==="domain"||(c[A]||(c[A]=[]),c[A].push(M))}let c={};if(i.type==="path"&&i.path){let A=i.path.match(S.segmentRE)||[];for(var T=0,l=0;lb&&(v(h[T],p[b]),T++)}}else v(h[0],i[s+"0"]),v(h[1],i[s+"1"]);let _={};for(let A in c){let M=x.getFromId(n,A);if(M){var w=M.type==="category"||M.type==="multicategory"?M.r2c:M.d2c;M.type==="date"&&(w=E.decodeDate(w)),_[M._id]=c[A].map(w)}}return _}function t(n){return o(n.line.width,n.xsizemode,n.x0,n.x1,n.path,!1)}function r(n){return o(n.line.width,n.ysizemode,n.y0,n.y1,n.path,!0)}function o(n,i,s,h,f,v){var c=n/2,T=v;if(i==="pixel"){var l=f?E.extractPathCoords(f,v?S.paramIsY:S.paramIsX):[s,h],_=d.aggNums(Math.max,null,l),w=d.aggNums(Math.min,null,l),A=w<0?Math.abs(w)+c:c,M=_>0?_+c:c;return{ppad:c,ppadplus:T?A:M,ppadminus:T?M:A}}else return{ppad:c}}function a(n,i,s){var h=n._id.charAt(0)==="x"?"x":"y",f=n.type==="category"||n.type==="multicategory",v,c,T=0,l=0,_=f?n.r2c:n.d2c,w=i[h+"sizemode"]==="scaled";if(w?(v=i[h+"0"],c=i[h+"1"],f&&(T=i[h+"0shift"],l=i[h+"1shift"])):(v=i[h+"anchor"],c=i[h+"anchor"]),v!==void 0)return[_(v)+T,_(c)+l];if(i.path){var A=1/0,M=-1/0,g=i.path.match(S.segmentRE),b,p,u,y,m;for(n.type==="date"&&(_=E.decodeDate(_)),b=0;bM&&(M=m)));if(M>=A)return[A,M]}}}}),h9=He({"src/components/shapes/index.js"(Z,V){"use strict";var d=E2();V.exports={moduleType:"component",name:"shapes",layoutAttributes:j5(),supplyLayoutDefaults:u9(),supplyDrawNewShapeDefaults:c9(),includeBasePlot:D_()("shapes"),calcAutorange:f9(),draw:d.draw,drawOne:d.drawOne}}}),q5=He({"src/components/images/attributes.js"(Z,V){"use strict";var d=lh(),x=zl().templatedArray,S=R_();V.exports=x("image",{visible:{valType:"boolean",dflt:!0,editType:"arraydraw"},source:{valType:"string",editType:"arraydraw"},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"arraydraw"},sizex:{valType:"number",dflt:0,editType:"arraydraw"},sizey:{valType:"number",dflt:0,editType:"arraydraw"},sizing:{valType:"enumerated",values:["fill","contain","stretch"],dflt:"contain",editType:"arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},x:{valType:"any",dflt:0,editType:"arraydraw"},y:{valType:"any",dflt:0,editType:"arraydraw"},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left",editType:"arraydraw"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],dflt:"top",editType:"arraydraw"},xref:{valType:"enumerated",values:["paper",d.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",d.idRegex.y.toString()],dflt:"paper",editType:"arraydraw"},editType:"arraydraw"})}}),p9=He({"src/components/images/defaults.js"(Z,V){"use strict";var d=sa(),x=Ho(),S=hp(),E=q5(),e="images";V.exports=function(o,a){var n={name:e,handleItemDefaults:t};S(o,a,n)};function t(r,o,a){function n(_,w){return d.coerce(r,o,E,_,w)}var i=n("source"),s=n("visible",!!i);if(!s)return o;n("layer"),n("xanchor"),n("yanchor"),n("sizex"),n("sizey"),n("sizing"),n("opacity");for(var h={_fullLayout:a},f=["x","y"],v=0;v<2;v++){var c=f[v],T=x.coerceRef(r,o,h,c,"paper",void 0);if(T!=="paper"){var l=x.getFromId(h,T);l._imgIndices.push(o._index)}x.coercePosition(o,h,n,T,c,0)}return o}}}),d9=He({"src/components/images/draw.js"(Z,V){"use strict";var d=Wn(),x=es(),S=Ho(),E=ef(),e=vd();V.exports=function(r){var o=r._fullLayout,a=[],n={},i=[],s,h;for(h=0;h0);f&&(s("active"),s("direction"),s("type"),s("showactive"),s("x"),s("y"),d.noneOrAll(a,n,["x","y"]),s("xanchor"),s("yanchor"),s("pad.t"),s("pad.r"),s("pad.b"),s("pad.l"),d.coerceFont(s,"font",i.font),s("bgcolor",i.paper_bgcolor),s("bordercolor"),s("borderwidth"))}function o(a,n){function i(h,f){return d.coerce(a,n,t,h,f)}var s=i("visible",a.method==="skip"||Array.isArray(a.args));s&&(i("method"),i("args"),i("args2"),i("label"),i("execute"))}}}),y9=He({"src/components/updatemenus/scrollbox.js"(Z,V){"use strict";V.exports=e;var d=Wn(),x=Jn(),S=es(),E=sa();function e(t,r,o){this.gd=t,this.container=r,this.id=o,this.position=null,this.translateX=null,this.translateY=null,this.hbar=null,this.vbar=null,this.bg=this.container.selectAll("rect.scrollbox-bg").data([0]),this.bg.exit().on(".drag",null).on("wheel",null).remove(),this.bg.enter().append("rect").classed("scrollbox-bg",!0).style("pointer-events","all").attr({opacity:0,x:0,y:0,width:0,height:0})}e.barWidth=2,e.barLength=20,e.barRadius=2,e.barPad=1,e.barColor="#808BA4",e.prototype.enable=function(r,o,a){var n=this.gd._fullLayout,i=n.width,s=n.height;this.position=r;var h=this.position.l,f=this.position.w,v=this.position.t,c=this.position.h,T=this.position.direction,l=T==="down",_=T==="left",w=T==="right",A=T==="up",M=f,g=c,b,p,u,y;!l&&!_&&!w&&!A&&(this.position.direction="down",l=!0);var m=l||A;m?(b=h,p=b+M,l?(u=v,y=Math.min(u+g,s),g=y-u):(y=v+g,u=Math.max(y-g,0),g=y-u)):(u=v,y=u+g,_?(p=h+M,b=Math.max(p-M,0),M=p-b):(b=h,p=Math.min(b+M,i),M=p-b)),this._box={l:b,t:u,w:M,h:g};var R=f>M,L=e.barLength+2*e.barPad,z=e.barWidth+2*e.barPad,F=h,N=v+c;N+z>s&&(N=s-z);var O=this.container.selectAll("rect.scrollbar-horizontal").data(R?[0]:[]);O.exit().on(".drag",null).remove(),O.enter().append("rect").classed("scrollbar-horizontal",!0).call(x.fill,e.barColor),R?(this.hbar=O.attr({rx:e.barRadius,ry:e.barRadius,x:F,y:N,width:L,height:z}),this._hbarXMin=F+L/2,this._hbarTranslateMax=M-L):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var P=c>g,U=e.barWidth+2*e.barPad,B=e.barLength+2*e.barPad,X=h+f,$=v;X+U>i&&(X=i-U);var le=this.container.selectAll("rect.scrollbar-vertical").data(P?[0]:[]);le.exit().on(".drag",null).remove(),le.enter().append("rect").classed("scrollbar-vertical",!0).call(x.fill,e.barColor),P?(this.vbar=le.attr({rx:e.barRadius,ry:e.barRadius,x:X,y:$,width:U,height:B}),this._vbarYMin=$+B/2,this._vbarTranslateMax=g-B):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var ce=this.id,de=b-.5,G=P?p+U+.5:p+.5,Y=u-.5,ee=R?y+z+.5:y+.5,q=n._topdefs.selectAll("#"+ce).data(R||P?[0]:[]);if(q.exit().remove(),q.enter().append("clipPath").attr("id",ce).append("rect"),R||P?(this._clipRect=q.select("rect").attr({x:Math.floor(de),y:Math.floor(Y),width:Math.ceil(G)-Math.floor(de),height:Math.ceil(ee)-Math.floor(Y)}),this.container.call(S.setClipUrl,ce,this.gd),this.bg.attr({x:h,y:v,width:f,height:c})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(S.setClipUrl,null),delete this._clipRect),R||P){var se=d.behavior.drag().on("dragstart",function(){d.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(se);var ae=d.behavior.drag().on("dragstart",function(){d.event.sourceEvent.preventDefault(),d.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));R&&this.hbar.on(".drag",null).call(ae),P&&this.vbar.on(".drag",null).call(ae)}this.setTranslate(o,a)},e.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(S.setClipUrl,null),delete this._clipRect),this.hbar&&(this.hbar.on(".drag",null),this.hbar.remove(),delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax),this.vbar&&(this.vbar.on(".drag",null),this.vbar.remove(),delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax)},e.prototype._onBoxDrag=function(){var r=this.translateX,o=this.translateY;this.hbar&&(r-=d.event.dx),this.vbar&&(o-=d.event.dy),this.setTranslate(r,o)},e.prototype._onBoxWheel=function(){var r=this.translateX,o=this.translateY;this.hbar&&(r+=d.event.deltaY),this.vbar&&(o+=d.event.deltaY),this.setTranslate(r,o)},e.prototype._onBarDrag=function(){var r=this.translateX,o=this.translateY;if(this.hbar){var a=r+this._hbarXMin,n=a+this._hbarTranslateMax,i=E.constrain(d.event.x,a,n),s=(i-a)/(n-a),h=this.position.w-this._box.w;r=s*h}if(this.vbar){var f=o+this._vbarYMin,v=f+this._vbarTranslateMax,c=E.constrain(d.event.y,f,v),T=(c-f)/(v-f),l=this.position.h-this._box.h;o=T*l}this.setTranslate(r,o)},e.prototype.setTranslate=function(r,o){var a=this.position.w-this._box.w,n=this.position.h-this._box.h;if(r=E.constrain(r||0,0,a),o=E.constrain(o||0,0,n),this.translateX=r,this.translateY=o,this.container.call(S.setTranslate,this._box.l-this.position.l-r,this._box.t-this.position.t-o),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+r-.5),y:Math.floor(this.position.t+o-.5)}),this.hbar){var i=r/a;this.hbar.call(S.setTranslate,r+i*this._hbarTranslateMax,o)}if(this.vbar){var s=o/n;this.vbar.call(S.setTranslate,r,o+s*this._vbarTranslateMax)}}}}),_9=He({"src/components/updatemenus/draw.js"(Z,V){"use strict";var d=Wn(),x=bc(),S=Jn(),E=es(),e=sa(),t=ou(),r=zl().arrayEditor,o=uh().LINE_SPACING,a=F2(),n=y9();V.exports=function(L){var z=L._fullLayout,F=e.filterVisible(z[a.name]);function N(ce){x.autoMargin(L,u(ce))}var O=z._menulayer.selectAll("g."+a.containerClassName).data(F.length>0?[0]:[]);if(O.enter().append("g").classed(a.containerClassName,!0).style("cursor","pointer"),O.exit().each(function(){d.select(this).selectAll("g."+a.headerGroupClassName).each(N)}).remove(),F.length!==0){var P=O.selectAll("g."+a.headerGroupClassName).data(F,i);P.enter().append("g").classed(a.headerGroupClassName,!0);for(var U=e.ensureSingle(O,"g",a.dropdownButtonGroupClassName,function(ce){ce.style("pointer-events","all")}),B=0;B0?[0]:[]);X.enter().append("g").classed(a.containerClassName,!0).style("cursor",P?null:"ew-resize");function $(G){G._commandObserver&&(G._commandObserver.remove(),delete G._commandObserver),x.autoMargin(O,f(G))}if(X.exit().each(function(){d.select(this).selectAll("g."+a.groupClassName).each($)}).remove(),B.length!==0){var le=X.selectAll("g."+a.groupClassName).data(B,c);le.enter().append("g").classed(a.groupClassName,!0),le.exit().each($).remove();for(var ce=0;ce0&&(le=le.transition().duration(O.transition.duration).ease(O.transition.easing)),le.attr("transform",t($-a.gripWidth*.5,O._dims.currentValueTotalHeight))}}function R(N,O){var P=N._dims;return P.inputAreaStart+a.stepInset+(P.inputAreaLength-2*a.stepInset)*Math.min(1,Math.max(0,O))}function L(N,O){var P=N._dims;return Math.min(1,Math.max(0,(O-a.stepInset-P.inputAreaStart)/(P.inputAreaLength-2*a.stepInset-2*P.inputAreaStart)))}function z(N,O,P){var U=P._dims,B=e.ensureSingle(N,"rect",a.railTouchRectClass,function(X){X.call(p,O,N,P).style("pointer-events","all")});B.attr({width:U.inputAreaLength,height:Math.max(U.inputAreaWidth,a.tickOffset+P.ticklen+U.labelHeight)}).call(S.fill,P.bgcolor).attr("opacity",0),E.setTranslate(B,0,U.currentValueTotalHeight)}function F(N,O){var P=O._dims,U=P.inputAreaLength-a.railInset*2,B=e.ensureSingle(N,"rect",a.railRectClass);B.attr({width:U,height:a.railWidth,rx:a.railRadius,ry:a.railRadius,"shape-rendering":"crispEdges"}).call(S.stroke,O.bordercolor).call(S.fill,O.bgcolor).style("stroke-width",O.borderwidth+"px"),E.setTranslate(B,a.railInset,(P.inputAreaWidth-a.railWidth)*.5+P.currentValueTotalHeight)}}}),T9=He({"src/components/sliders/index.js"(Z,V){"use strict";var d=O_();V.exports={moduleType:"component",name:d.name,layoutAttributes:G5(),supplyLayoutDefaults:b9(),draw:w9()}}}),O2=He({"src/components/rangeslider/attributes.js"(Z,V){"use strict";var d=sh();V.exports={bgcolor:{valType:"color",dflt:d.background,editType:"plot"},bordercolor:{valType:"color",dflt:d.defaultLine,editType:"plot"},borderwidth:{valType:"integer",dflt:0,min:0,editType:"plot"},autorange:{valType:"boolean",dflt:!0,editType:"calc",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},range:{valType:"info_array",items:[{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}}],editType:"calc",impliedEdits:{autorange:!1}},thickness:{valType:"number",dflt:.15,min:0,max:1,editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc"}}}),H5=He({"src/components/rangeslider/oppaxis_attributes.js"(Z,V){"use strict";V.exports={_isSubplotObj:!0,rangemode:{valType:"enumerated",values:["auto","fixed","match"],dflt:"match",editType:"calc"},range:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},editType:"calc"}}}),B2=He({"src/components/rangeslider/constants.js"(Z,V){"use strict";V.exports={name:"rangeslider",containerClassName:"rangeslider-container",bgClassName:"rangeslider-bg",rangePlotClassName:"rangeslider-rangeplot",maskMinClassName:"rangeslider-mask-min",maskMaxClassName:"rangeslider-mask-max",slideBoxClassName:"rangeslider-slidebox",grabberMinClassName:"rangeslider-grabber-min",grabAreaMinClassName:"rangeslider-grabarea-min",handleMinClassName:"rangeslider-handle-min",grabberMaxClassName:"rangeslider-grabber-max",grabAreaMaxClassName:"rangeslider-grabarea-max",handleMaxClassName:"rangeslider-handle-max",maskMinOppAxisClassName:"rangeslider-mask-min-opp-axis",maskMaxOppAxisClassName:"rangeslider-mask-max-opp-axis",maskColor:"rgba(0,0,0,0.4)",maskOppAxisColor:"rgba(0,0,0,0.2)",slideBoxFill:"transparent",slideBoxCursor:"ew-resize",grabAreaFill:"transparent",grabAreaCursor:"col-resize",grabAreaWidth:10,handleWidth:4,handleRadius:1,handleStrokeWidth:1,extraPad:15}}}),A9=He({"src/components/rangeslider/helpers.js"(Z){"use strict";var V=ef(),d=ou(),x=B2(),S=uh().LINE_SPACING,E=x.name;function e(t){var r=t&&t[E];return r&&r.visible}Z.isVisible=e,Z.makeData=function(t){for(var r=V.list({_fullLayout:t},"x",!0),o=t.margin,a=[],n=0;n=nt.max)We=pe[at+1];else if(Re=nt.pmax)We=pe[at+1];else if(Re0?p.touches[0].clientX:0}function v(p,u,y,m){if(u._context.staticPlot)return;var R=p.select("rect."+h.slideBoxClassName).node(),L=p.select("rect."+h.grabAreaMinClassName).node(),z=p.select("rect."+h.grabAreaMaxClassName).node();function F(){var N=d.event,O=N.target,P=f(N),U=P-p.node().getBoundingClientRect().left,B=m.d2p(y._rl[0]),X=m.d2p(y._rl[1]),$=i.coverSlip();this.addEventListener("touchmove",le),this.addEventListener("touchend",ce),$.addEventListener("mousemove",le),$.addEventListener("mouseup",ce);function le(de){var G=f(de),Y=+G-P,ee,q,se;switch(O){case R:if(se="ew-resize",B+Y>y._length||X+Y<0)return;ee=B+Y,q=X+Y;break;case L:if(se="col-resize",B+Y>y._length)return;ee=B+Y,q=X;break;case z:if(se="col-resize",X+Y<0)return;ee=B,q=X+Y;break;default:se="ew-resize",ee=U,q=U+Y;break}if(q0);if(_){var w=o(i,s,h);T("x",w[0]),T("y",w[1]),d.noneOrAll(n,i,["x","y"]),T("xanchor"),T("yanchor"),d.coerceFont(T,"font",s.font);var A=T("bgcolor");T("activecolor",x.contrast(A,t.lightAmount,t.darkAmount)),T("bordercolor"),T("borderwidth")}};function r(a,n,i,s){var h=s.calendar;function f(T,l){return d.coerce(a,n,e.buttons,T,l)}var v=f("visible");if(v){var c=f("step");c!=="all"&&(h&&h!=="gregorian"&&(c==="month"||c==="year")?n.stepmode="backward":f("stepmode"),f("count")),f("label")}}function o(a,n,i){for(var s=i.filter(function(c){return n[c].anchor===a._id}),h=0,f=0;f1)){delete h.grid;return}if(!T&&!l&&!_){var y=b("pattern")==="independent";y&&(T=!0)}g._hasSubplotGrid=T;var m=b("roworder"),R=m==="top to bottom",L=T?.2:.1,z=T?.3:.1,F,N;w&&h._splomGridDflt&&(F=h._splomGridDflt.xside,N=h._splomGridDflt.yside),g._domains={x:a("x",b,L,F,u),y:a("y",b,z,N,p,R)}}function a(s,h,f,v,c,T){var l=h(s+"gap",f),_=h("domain."+s);h(s+"side",v);for(var w=new Array(c),A=_[0],M=(_[1]-A)/(c-l),g=M*(1-l),b=0;b0,v=r._context.staticPlot;o.each(function(c){var T=c[0].trace,l=T.error_x||{},_=T.error_y||{},w;T.ids&&(w=function(b){return b.id});var A=E.hasMarkers(T)&&T.marker.maxdisplayed>0;!_.visible&&!l.visible&&(c=[]);var M=d.select(this).selectAll("g.errorbar").data(c,w);if(M.exit().remove(),!!c.length){l.visible||M.selectAll("path.xerror").remove(),_.visible||M.selectAll("path.yerror").remove(),M.style("opacity",1);var g=M.enter().append("g").classed("errorbar",!0);f&&g.style("opacity",0).transition().duration(n.duration).style("opacity",1),S.setClipUrl(M,a.layerClipId,r),M.each(function(b){var p=d.select(this),u=e(b,s,h);if(!(A&&!b.vis)){var y,m=p.select("path.yerror");if(_.visible&&x(u.x)&&x(u.yh)&&x(u.ys)){var R=_.width;y="M"+(u.x-R)+","+u.yh+"h"+2*R+"m-"+R+",0V"+u.ys,u.noYS||(y+="m-"+R+",0h"+2*R),i=!m.size(),i?m=p.append("path").style("vector-effect",v?"none":"non-scaling-stroke").classed("yerror",!0):f&&(m=m.transition().duration(n.duration).ease(n.easing)),m.attr("d",y)}else m.remove();var L=p.select("path.xerror");if(l.visible&&x(u.y)&&x(u.xh)&&x(u.xs)){var z=(l.copy_ystyle?_:l).width;y="M"+u.xh+","+(u.y-z)+"v"+2*z+"m0,-"+z+"H"+u.xs,u.noXS||(y+="m0,-"+z+"v"+2*z),i=!L.size(),i?L=p.append("path").style("vector-effect",v?"none":"non-scaling-stroke").classed("xerror",!0):f&&(L=L.transition().duration(n.duration).ease(n.easing)),L.attr("d",y)}else L.remove()}})}})};function e(t,r,o){var a={x:r.c2p(t.x),y:o.c2p(t.y)};return t.yh!==void 0&&(a.yh=o.c2p(t.yh),a.ys=o.c2p(t.ys),x(a.ys)||(a.noYS=!0,a.ys=o.c2p(t.ys,!0))),t.xh!==void 0&&(a.xh=r.c2p(t.xh),a.xs=r.c2p(t.xs),x(a.xs)||(a.noXS=!0,a.xs=r.c2p(t.xs,!0))),a}}}),F9=He({"src/components/errorbars/style.js"(Z,V){"use strict";var d=Wn(),x=Jn();V.exports=function(E){E.each(function(e){var t=e[0].trace,r=t.error_y||{},o=t.error_x||{},a=d.select(this);a.selectAll("path.yerror").style("stroke-width",r.thickness+"px").call(x.stroke,r.color),o.copy_ystyle&&(o=r),a.selectAll("path.xerror").style("stroke-width",o.thickness+"px").call(x.stroke,o.color)})}}}),O9=He({"src/components/errorbars/index.js"(Z,V){"use strict";var d=sa(),x=pc().overrideAll,S=Z5(),E={error_x:d.extendFlat({},S),error_y:d.extendFlat({},S)};delete E.error_x.copy_zstyle,delete E.error_y.copy_zstyle,delete E.error_y.copy_ystyle;var e={error_x:d.extendFlat({},S),error_y:d.extendFlat({},S),error_z:d.extendFlat({},S)};delete e.error_x.copy_ystyle,delete e.error_y.copy_ystyle,delete e.error_z.copy_ystyle,delete e.error_z.copy_zstyle,V.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:E,bar:E,histogram:E,scatter3d:x(e,"calc","nested"),scattergl:x(E,"calc","nested")}},supplyDefaults:R9(),calc:D9(),makeComputeError:Y5(),plot:z9(),style:F9(),hoverInfo:t};function t(r,o,a){(o.error_y||{}).visible&&(a.yerr=r.yh-r.y,o.error_y.symmetric||(a.yerrneg=r.y-r.ys)),(o.error_x||{}).visible&&(a.xerr=r.xh-r.x,o.error_x.symmetric||(a.xerrneg=r.x-r.xs))}}}),B9=He({"src/components/colorbar/constants.js"(Z,V){"use strict";V.exports={cn:{colorbar:"colorbar",cbbg:"cbbg",cbfill:"cbfill",cbfills:"cbfills",cbline:"cbline",cblines:"cblines",cbaxis:"cbaxis",cbtitleunshift:"cbtitleunshift",cbtitle:"cbtitle",cboutline:"cboutline",crisp:"crisp",jsPlaceholder:"js-placeholder"}}}}),N9=He({"src/components/colorbar/draw.js"(Z,V){"use strict";var d=Wn(),x=Ch(),S=bc(),E=lo(),e=Ho(),t=Ap(),r=sa(),o=r.strTranslate,a=Qo().extendFlat,n=Kd(),i=es(),s=Jn(),h=K0(),f=ou(),v=wp().flipScale,c=F_(),T=R2(),l=Wh(),_=uh(),w=_.LINE_SPACING,A=_.FROM_TL,M=_.FROM_BR,g=B9().cn;function b(L){var z=L._fullLayout,F=z._infolayer.selectAll("g."+g.colorbar).data(p(L),function(N){return N._id});F.enter().append("g").attr("class",function(N){return N._id}).classed(g.colorbar,!0),F.each(function(N){var O=d.select(this);r.ensureSingle(O,"rect",g.cbbg),r.ensureSingle(O,"g",g.cbfills),r.ensureSingle(O,"g",g.cblines),r.ensureSingle(O,"g",g.cbaxis,function(U){U.classed(g.crisp,!0)}),r.ensureSingle(O,"g",g.cbtitleunshift,function(U){U.append("g").classed(g.cbtitle,!0)}),r.ensureSingle(O,"rect",g.cboutline);var P=u(O,N,L);P&&P.then&&(L._promises||[]).push(P),L._context.edits.colorbarPosition&&y(O,N,L)}),F.exit().each(function(N){S.autoMargin(L,N._id)}).remove(),F.order()}function p(L){var z=L._fullLayout,F=L.calcdata,N=[],O,P,U,B;function X(j){return a(j,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function $(){typeof B.calc=="function"?B.calc(L,U,O):(O._fillgradient=P.reversescale?v(P.colorscale):P.colorscale,O._zrange=[P[B.min],P[B.max]])}for(var le=0;le1){var Oe=Math.pow(10,Math.floor(Math.log(_t)/Math.LN10));Er*=Oe*r.roundUp(_t/Oe,[2,5,10]),(Math.abs(at.start)/at.size+1e-6)%1<2e-6&&(mr.tick0=0)}mr.dtick=Er}mr.domain=N?[Gt+Y/Q.h,Gt+Ce-Y/Q.h]:[Gt+G/Q.w,Gt+Ce-G/Q.w],mr.setScale(),L.attr("transform",o(Math.round(Q.l),Math.round(Q.t)));var Je=L.select("."+g.cbtitleunshift).attr("transform",o(-Math.round(Q.l),-Math.round(Q.t))),Ae=mr.ticklabelposition,Le=mr.title.font.size,Ue=L.select("."+g.cbaxis),Ze,st=0,ut=0;function Ut(ur,sr){var Pr={propContainer:mr,propName:z._propPrefix+"title.text",traceIndex:z._traceIndex,_meta:z._meta,placeholder:j._dfltTitle.colorbar,containerGroup:L.select("."+g.cbtitle)},Ta=ur.charAt(0)==="h"?ur.slice(1):"h"+ur;L.selectAll("."+Ta+",."+Ta+"-math-group").remove(),h.draw(F,ur,a(Pr,sr||{}))}function Ct(){if(N&&qr||!N&&!qr){var ur,sr;Se==="top"&&(ur=G+Q.l+Ye*ee,sr=Y+Q.t+rt*(1-Gt-Ce)+3+Le*.75),Se==="bottom"&&(ur=G+Q.l+Ye*ee,sr=Y+Q.t+rt*(1-Gt)-3-Le*.25),Se==="right"&&(sr=Y+Q.t+rt*q+3+Le*.75,ur=G+Q.l+Ye*Gt),Ut(mr._id+"title",{attributes:{x:ur,y:sr,"text-anchor":N?"start":"middle"}})}}function Pt(){if(N&&!qr||!N&&qr){var ur=mr.position||0,sr=mr._offset+mr._length/2,Pr,Ta;if(Se==="right")Ta=sr,Pr=Q.l+Ye*ur+10+Le*(mr.showticklabels?1:.5);else if(Pr=sr,Se==="bottom"&&(Ta=Q.t+rt*ur+10+(Ae.indexOf("inside")===-1?mr.tickfont.size:0)+(mr.ticks!=="inside"&&z.ticklen||0)),Se==="top"){var Oa=we.text.split("
").length;Ta=Q.t+rt*ur+10-he-w*Le*Oa}Ut((N?"h":"v")+mr._id+"title",{avoid:{selection:d.select(F).selectAll("g."+mr._id+"tick"),side:Se,offsetTop:N?0:Q.t,offsetLeft:N?Q.l:0,maxShift:N?j.width:j.height},attributes:{x:Pr,y:Ta,"text-anchor":"middle"},transform:{rotate:N?-90:0,offset:0}})}}function jt(){if(!N&&!qr||N&&qr){var ur=L.select("."+g.cbtitle),sr=ur.select("text"),Pr=[-X/2,X/2],Ta=ur.select(".h"+mr._id+"title-math-group").node(),Oa=15.6;sr.node()&&(Oa=parseInt(sr.node().style.fontSize,10)*w);var Ia;if(Ta?(Ia=i.bBox(Ta),ut=Ia.width,st=Ia.height,st>Oa&&(Pr[1]-=(st-Oa)/2)):sr.node()&&!sr.classed(g.jsPlaceholder)&&(Ia=i.bBox(sr.node()),ut=Ia.width,st=Ia.height),N){if(st){if(st+=5,Se==="top")mr.domain[1]-=st/Q.h,Pr[1]*=-1;else{mr.domain[0]+=st/Q.h;var qa=f.lineCount(sr);Pr[1]+=(1-qa)*Oa}ur.attr("transform",o(Pr[0],Pr[1])),mr.setScale()}}else ut&&(Se==="right"&&(mr.domain[0]+=(ut+Le/2)/Q.w),ur.attr("transform",o(Pr[0],Pr[1])),mr.setScale())}L.selectAll("."+g.cbfills+",."+g.cblines).attr("transform",N?o(0,Math.round(Q.h*(1-mr.domain[1]))):o(Math.round(Q.w*mr.domain[0]),0)),Ue.attr("transform",N?o(0,Math.round(-Q.t)):o(Math.round(-Q.l),0));var Wa=L.select("."+g.cbfills).selectAll("rect."+g.cbfill).attr("style","").data(tt);Wa.enter().append("rect").classed(g.cbfill,!0).attr("style",""),Wa.exit().remove();var Ca=Ie.map(mr.c2p).map(Math.round).sort(function(Yt,Jt){return Yt-Jt});Wa.each(function(Yt,Jt){var Fr=[Jt===0?Ie[0]:(tt[Jt]+tt[Jt-1])/2,Jt===tt.length-1?Ie[1]:(tt[Jt]+tt[Jt+1])/2].map(mr.c2p).map(Math.round);N&&(Fr[1]=r.constrain(Fr[1]+(Fr[1]>Fr[0])?1:-1,Ca[0],Ca[1]));var ta=d.select(this).attr(N?"x":"y",Ke).attr(N?"y":"x",d.min(Fr)).attr(N?"width":"height",Math.max(he,2)).attr(N?"height":"width",Math.max(d.max(Fr)-d.min(Fr),2));if(z._fillgradient)i.gradient(ta,F,z._id,N?"vertical":"horizontalreversed",z._fillgradient,"fill");else{var ra=We(Yt).replace("e-","");ta.attr("fill",x(ra).toHexString())}});var hi=L.select("."+g.cblines).selectAll("path."+g.cbline).data(pe.color&&pe.width?qe:[]);hi.enter().append("path").classed(g.cbline,!0),hi.exit().remove(),hi.each(function(Yt){var Jt=Ke,Fr=Math.round(mr.c2p(Yt))+pe.width/2%1;d.select(this).attr("d","M"+(N?Jt+","+Fr:Fr+","+Jt)+(N?"h":"v")+he).call(i.lineGroupStyle,pe.width,Re(Yt),pe.dash)}),Ue.selectAll("g."+mr._id+"tick,path").remove();var wi=Ke+he+(X||0)/2-(z.ticks==="outside"?1:0),Kt=e.calcTicks(mr),Dt=e.getTickSigns(mr)[2];return e.drawTicks(F,mr,{vals:mr.ticks==="inside"?e.clipEnds(mr,Kt):Kt,layer:Ue,path:e.makeTickPath(mr,wi,Dt),transFn:e.makeTransTickFn(mr)}),e.drawLabels(F,mr,{vals:Kt,layer:Ue,transFn:e.makeTransTickLabelFn(mr),labelFns:e.makeLabelFns(mr,wi)})}function fr(){var ur,sr=he+X/2;Ae.indexOf("inside")===-1&&(ur=i.bBox(Ue.node()),sr+=N?ur.width:ur.height),Ze=Je.select("text");var Pr=0,Ta=N&&Se==="top",Oa=!N&&Se==="right",Ia=0;if(Ze.node()&&!Ze.classed(g.jsPlaceholder)){var qa,Wa=Je.select(".h"+mr._id+"title-math-group").node();Wa&&(N&&qr||!N&&!qr)?(ur=i.bBox(Wa),Pr=ur.width,qa=ur.height):(ur=i.bBox(Je.node()),Pr=ur.right-Q.l-(N?Ke:Mr),qa=ur.bottom-Q.t-(N?Mr:Ke),!N&&Se==="top"&&(sr+=ur.height,Ia=ur.height)),Oa&&(Ze.attr("transform",o(Pr/2+Le/2,0)),Pr*=2),sr=Math.max(sr,N?Pr:qa)}var Ca=(N?G:Y)*2+sr+$+X/2,hi=0;!N&&we.text&&de==="bottom"&&q<=0&&(hi=Ca/2,Ca+=hi,Ia+=hi),j._hColorbarMoveTitle=hi,j._hColorbarMoveCBTitle=Ia;var wi=$+X,Kt=(N?Ke:Mr)-wi/2-(N?G:0),Dt=(N?Mr:Ke)-(N?ne:Y+Ia-hi);L.select("."+g.cbbg).attr("x",Kt).attr("y",Dt).attr(N?"width":"height",Math.max(Ca-hi,2)).attr(N?"height":"width",Math.max(ne+wi,2)).call(s.fill,le).call(s.stroke,z.bordercolor).style("stroke-width",$);var Yt=Oa?Math.max(Pr-10,0):0;L.selectAll("."+g.cboutline).attr("x",(N?Ke:Mr+G)+Yt).attr("y",(N?Mr+Y-ne:Ke)+(Ta?st:0)).attr(N?"width":"height",Math.max(he,2)).attr(N?"height":"width",Math.max(ne-(N?2*Y+st:2*G+Yt),2)).call(s.stroke,z.outlinecolor).style({fill:"none","stroke-width":X});var Jt=N?Mt*Ca:0,Fr=N?0:(1-kt)*Ca-Ia;if(Jt=ae?Q.l-Jt:-Jt,Fr=se?Q.t-Fr:-Fr,L.attr("transform",o(Jt,Fr)),!N&&($||x(le).getAlpha()&&!x.equals(j.paper_bgcolor,le))){var ta=Ue.selectAll("text"),ra=ta[0].length,ca=L.select("."+g.cbbg).node(),Ba=i.bBox(ca),$a=i.getTranslate(L),Za=2;ta.each(function(Cr,xr){var Rr=0,Ur=ra-1;if(xr===Rr||xr===Ur){var Hr=i.bBox(this),gt=i.getTranslate(this),Xt;if(xr===Ur){var vr=Hr.right+gt.x,Or=Ba.right+$a.x+Mr-$-Za+ee;Xt=Or-vr,Xt>0&&(Xt=0)}else if(xr===Rr){var ba=Hr.left+gt.x,Pa=Ba.left+$a.x+Mr+$+Za;Xt=Pa-ba,Xt<0&&(Xt=0)}Xt&&(ra<3?this.setAttribute("transform","translate("+Xt+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var ri={},pi=A[ce],Ra=M[ce],an=A[de],tn=M[de],fn=Ca-he;N?(P==="pixels"?(ri.y=q,ri.t=ne*an,ri.b=ne*tn):(ri.t=ri.b=0,ri.yt=q+O*an,ri.yb=q-O*tn),B==="pixels"?(ri.x=ee,ri.l=Ca*pi,ri.r=Ca*Ra):(ri.l=fn*pi,ri.r=fn*Ra,ri.xl=ee-U*pi,ri.xr=ee+U*Ra)):(P==="pixels"?(ri.x=ee,ri.l=ne*pi,ri.r=ne*Ra):(ri.l=ri.r=0,ri.xl=ee+O*pi,ri.xr=ee-O*Ra),B==="pixels"?(ri.y=1-q,ri.t=Ca*an,ri.b=Ca*tn):(ri.t=fn*an,ri.b=fn*tn,ri.yt=q-U*an,ri.yb=q+U*tn));var xt=z.y<.5?"b":"t",lt=z.x<.5?"l":"r";F._fullLayout._reservedMargin[z._id]={};var Br={r:j.width-Kt-Jt,l:Kt+ri.r,b:j.height-Dt-Fr,t:Dt+ri.b};ae&&se?S.autoMargin(F,z._id,ri):ae?F._fullLayout._reservedMargin[z._id][xt]=Br[xt]:se||N?F._fullLayout._reservedMargin[z._id][lt]=Br[lt]:F._fullLayout._reservedMargin[z._id][xt]=Br[xt]}return r.syncOrAsync([S.previousPromises,Ct,jt,Pt,S.previousPromises,fr],F)}function y(L,z,F){var N=z.orientation==="v",O=F._fullLayout,P=O._size,U,B,X;t.init({element:L.node(),gd:F,prepFn:function(){U=L.attr("transform"),n(L)},moveFn:function($,le){L.attr("transform",U+o($,le)),B=t.align((N?z._uFrac:z._vFrac)+$/P.w,N?z._thickFrac:z._lenFrac,0,1,z.xanchor),X=t.align((N?z._vFrac:1-z._uFrac)-le/P.h,N?z._lenFrac:z._thickFrac,0,1,z.yanchor);var ce=t.getCursor(B,X,z.xanchor,z.yanchor);n(L,ce)},doneFn:function(){if(n(L),B!==void 0&&X!==void 0){var $={};$[z._propPrefix+"x"]=B,$[z._propPrefix+"y"]=X,z._traceIndex!==void 0?E.call("_guiRestyle",F,$,z._traceIndex):E.call("_guiRelayout",F,$)}}})}function m(L,z,F){var N=z._levels,O=[],P=[],U,B,X=N.end+N.size/100,$=N.size,le=1.001*F[0]-.001*F[1],ce=1.001*F[1]-.001*F[0];for(B=0;B<1e5&&(U=N.start+B*$,!($>0?U>=X:U<=X));B++)U>le&&U0?U>=X:U<=X));B++)U>F[0]&&U-1}V.exports=function(o,a){var n,i=o.data,s=o.layout,h=E([],i),f=E({},s,e(a.tileClass)),v=o._context||{};if(a.width&&(f.width=a.width),a.height&&(f.height=a.height),a.tileClass==="thumbnail"||a.tileClass==="themes__thumb"){f.annotations=[];var c=Object.keys(f);for(n=0;n=0)return v}else if(typeof v=="string"&&(v=v.trim(),v.slice(-1)==="%"&&d(v.slice(0,-1))&&(v=+v.slice(0,-1),v>=0)))return v+"%"}function f(v,c,T,l,_,w){w=w||{};var A=w.moduleHasSelected!==!1,M=w.moduleHasUnselected!==!1,g=w.moduleHasConstrain!==!1,b=w.moduleHasCliponaxis!==!1,p=w.moduleHasTextangle!==!1,u=w.moduleHasInsideanchor!==!1,y=!!w.hasPathbar,m=Array.isArray(_)||_==="auto",R=m||_==="inside",L=m||_==="outside";if(R||L){var z=n(l,"textfont",T.font),F=x.extendFlat({},z),N=v.textfont&&v.textfont.color,O=!N;if(O&&delete F.color,n(l,"insidetextfont",F),y){var P=x.extendFlat({},z);O&&delete P.color,n(l,"pathbar.textfont",P)}L&&n(l,"outsidetextfont",z),A&&l("selected.textfont.color"),M&&l("unselected.textfont.color"),g&&l("constraintext"),b&&l("cliponaxis"),p&&l("textangle"),l("texttemplate"),l("texttemplatefallback")}R&&u&&l("insidetextanchor")}V.exports={supplyDefaults:i,crossTraceDefaults:s,handleText:f,validateCornerradius:h}}}),J5=He({"src/traces/bar/layout_defaults.js"(Z,V){"use strict";var d=lo(),x=Ho(),S=sa(),E=U2(),e=gd().validateCornerradius;V.exports=function(t,r,o){function a(A,M){return S.coerce(t,r,E,A,M)}for(var n=!1,i=!1,s=!1,h={},f=a("barmode"),v=f==="group",c=0;c0&&!h[l]&&(s=!0),h[l]=!0),T.visible&&T.type==="histogram"){var _=x.getFromId({_fullLayout:r},T[T.orientation==="v"?"xaxis":"yaxis"]);_.type!=="category"&&(i=!0)}}if(!n){delete r.barmode;return}f!=="overlay"&&a("barnorm"),a("bargap",i&&!s?0:.2),a("bargroupgap");var w=a("barcornerradius");r.barcornerradius=e(w)}}}),B_=He({"src/traces/bar/arrays_to_calcdata.js"(Z,V){"use strict";var d=sa();V.exports=function(S,E){for(var e=0;er;if(!o)return E}return e!==void 0?e:S.dflt},Z.coerceColor=function(S,E,e){return d(E).isValid()?E:e!==void 0?e:S.dflt},Z.coerceEnumerated=function(S,E,e){return S.coerceNumber&&(E=+E),S.values.indexOf(E)!==-1?E:e!==void 0?e:S.dflt},Z.getValue=function(S,E){var e;return x(S)?E1||y.bargap===0&&y.bargroupgap===0&&!m[0].trace.marker.line.width)&&d.select(this).attr("shape-rendering","crispEdges")}),p.selectAll("g.points").each(function(m){var R=d.select(this),L=m[0].trace;h(R,L,b)}),e.getComponentMethod("errorbars","style")(p)}function h(b,p,u){S.pointStyle(b.selectAll("path"),p,u),f(b,p,u)}function f(b,p,u){b.selectAll("text").each(function(y){var m=d.select(this),R=E.ensureUniformFontSize(u,l(m,y,p,u));S.font(m,R)})}function v(b,p,u){var y=p[0].trace;y.selectedpoints?c(u,y,b):(h(u,y,b),e.getComponentMethod("errorbars","style")(u))}function c(b,p,u){S.selectedPointStyle(b.selectAll("path"),p),T(b.selectAll("text"),p,u)}function T(b,p,u){b.each(function(y){var m=d.select(this),R;if(y.selected){R=E.ensureUniformFontSize(u,l(m,y,p,u));var L=p.selected.textfont&&p.selected.textfont.color;L&&(R.color=L),S.font(m,R)}else S.selectedTextStyle(m,p)})}function l(b,p,u,y){var m=y._fullLayout.font,R=u.textfont;if(b.classed("bartext-inside")){var L=g(p,u);R=w(u,p.i,m,L)}else b.classed("bartext-outside")&&(R=A(u,p.i,m));return R}function _(b,p,u){return M(o,b.textfont,p,u)}function w(b,p,u,y){var m=_(b,p,u),R=b._input.textfont===void 0||b._input.textfont.color===void 0||Array.isArray(b.textfont.color)&&b.textfont.color[p]===void 0;return R&&(m={color:x.contrast(y),family:m.family,size:m.size,weight:m.weight,style:m.style,variant:m.variant,textcase:m.textcase,lineposition:m.lineposition,shadow:m.shadow}),M(a,b.insidetextfont,p,m)}function A(b,p,u){var y=_(b,p,u);return M(n,b.outsidetextfont,p,y)}function M(b,p,u,y){p=p||{};var m=i.getValue(p.family,u),R=i.getValue(p.size,u),L=i.getValue(p.color,u),z=i.getValue(p.weight,u),F=i.getValue(p.style,u),N=i.getValue(p.variant,u),O=i.getValue(p.textcase,u),P=i.getValue(p.lineposition,u),U=i.getValue(p.shadow,u);return{family:i.coerceString(b.family,m,y.family),size:i.coerceNumber(b.size,R,y.size),color:i.coerceColor(b.color,L,y.color),weight:i.coerceString(b.weight,z,y.weight),style:i.coerceString(b.style,F,y.style),variant:i.coerceString(b.variant,N,y.variant),textcase:i.coerceString(b.variant,O,y.textcase),lineposition:i.coerceString(b.variant,P,y.lineposition),shadow:i.coerceString(b.variant,U,y.shadow)}}function g(b,p){return p.type==="waterfall"?p[b.dir].marker.color:b.mcc||b.mc||p.marker.color}V.exports={style:s,styleTextPoints:f,styleOnSelect:v,getInsideTextFont:w,getOutsideTextFont:A,getBarColor:g,resizeText:t}}}),tg=He({"src/traces/bar/plot.js"(Z,V){"use strict";var d=Wn(),x=as(),S=sa(),E=ou(),e=Jn(),t=es(),r=lo(),o=Ho().tickText,a=Sp(),n=a.recordMinTextSize,i=a.clearMinTextSize,s=Nd(),h=q2(),f=i0(),v=Sv(),c=v.text,T=v.textposition,l=$p().appendArrayPointValue,_=f.TEXTPAD;function w($){return $.id}function A($){if($.ids)return w}function M($){return($>0)-($<0)}function g($,le){return $0}function y($,le,ce,de,G,Y){var ee=le.xaxis,q=le.yaxis,se=$._fullLayout,ae=$._context.staticPlot;G||(G={mode:se.barmode,norm:se.barmode,gap:se.bargap,groupgap:se.bargroupgap},i("bar",se));var j=S.makeTraceGroups(de,ce,"trace bars").each(function(Q){var re=d.select(this),pe=Q[0].trace,we=Q[0].t,Se=pe.type==="waterfall",Ie=pe.type==="funnel",Re=pe.type==="histogram",We=pe.type==="bar",at=We||Ie,nt=0;Se&&pe.connector.visible&&pe.connector.mode==="between"&&(nt=pe.connector.line.width/2);var tt=pe.orientation==="h",qe=u(G),he=S.ensureSingle(re,"g","points"),ue=A(pe),ne=he.selectAll("g.point").data(S.identity,ue);ne.enter().append("g").classed("point",!0),ne.exit().remove(),ne.each(function(Ye,rt){var Ke=d.select(this),Mt=b(Ye,ee,q,tt),kt=Mt[0][0],Nt=Mt[0][1],Gt=Mt[1][0],Mr=Mt[1][1],mr=(tt?Nt-kt:Mr-Gt)===0;mr&&at&&h.getLineWidth(pe,Ye)&&(mr=!1),mr||(mr=!x(kt)||!x(Nt)||!x(Gt)||!x(Mr)),Ye.isBlank=mr,mr&&(tt?Nt=kt:Mr=Gt),nt&&!mr&&(tt?(kt-=g(kt,Nt)*nt,Nt+=g(kt,Nt)*nt):(Gt-=g(Gt,Mr)*nt,Mr+=g(Gt,Mr)*nt));var qr,Er;if(pe.type==="waterfall"){if(!mr){var Ir=pe[Ye.dir].marker;qr=Ir.line.width,Er=Ir.color}}else qr=h.getLineWidth(pe,Ye),Er=Ye.mc||pe.marker.color;function _t(wi){var Kt=d.round(qr/2%1,2);return G.gap===0&&G.groupgap===0?d.round(Math.round(wi)-Kt,2):wi}function Oe(wi,Kt,Dt){return Dt&&wi===Kt?wi:Math.abs(wi-Kt)>=2?_t(wi):wi>Kt?Math.ceil(wi):Math.floor(wi)}var Je=e.opacity(Er),Ae=Je<1||qr>.01?_t:Oe;$._context.staticPlot||(kt=Ae(kt,Nt,tt),Nt=Ae(Nt,kt,tt),Gt=Ae(Gt,Mr,!tt),Mr=Ae(Mr,Gt,!tt));var Le=tt?ee.c2p:q.c2p,Ue;Ye.s0>0?Ue=Ye._sMax:Ye.s0<0?Ue=Ye._sMin:Ue=Ye.s1>0?Ye._sMax:Ye._sMin;function Ze(wi,Kt){if(!wi)return 0;var Dt=Math.abs(tt?Mr-Gt:Nt-kt),Yt=Math.abs(tt?Nt-kt:Mr-Gt),Jt=Ae(Math.abs(Le(Ue,!0)-Le(0,!0))),Fr=Ye.hasB?Math.min(Dt/2,Yt/2):Math.min(Dt/2,Jt),ta;if(Kt==="%"){var ra=Math.min(50,wi);ta=Dt*(ra/100)}else ta=wi;return Ae(Math.max(Math.min(ta,Fr),0))}var st=We||Re?Ze(we.cornerradiusvalue,we.cornerradiusform):0,ut,Ut,Ct="M"+kt+","+Gt+"V"+Mr+"H"+Nt+"V"+Gt+"Z",Pt=0;if(st&&Ye.s){var jt=M(Ye.s0)===0||M(Ye.s)===M(Ye.s0)?Ye.s1:Ye.s0;if(Pt=Ae(Ye.hasB?0:Math.abs(Le(Ue,!0)-Le(jt,!0))),Pt0?Math.sqrt(Pt*(2*st-Pt)):0,Oa=fr>0?Math.max:Math.min;ut="M"+kt+","+Gt+"V"+(Mr-Pr*ur)+"H"+Oa(Nt-(st-Pt)*fr,kt)+"A "+st+","+st+" 0 0 "+sr+" "+Nt+","+(Mr-st*ur-Ta)+"V"+(Gt+st*ur+Ta)+"A "+st+","+st+" 0 0 "+sr+" "+Oa(Nt-(st-Pt)*fr,kt)+","+(Gt+Pr*ur)+"Z"}else if(Ye.hasB)ut="M"+(kt+st*fr)+","+Gt+"A "+st+","+st+" 0 0 "+sr+" "+kt+","+(Gt+st*ur)+"V"+(Mr-st*ur)+"A "+st+","+st+" 0 0 "+sr+" "+(kt+st*fr)+","+Mr+"H"+(Nt-st*fr)+"A "+st+","+st+" 0 0 "+sr+" "+Nt+","+(Mr-st*ur)+"V"+(Gt+st*ur)+"A "+st+","+st+" 0 0 "+sr+" "+(Nt-st*fr)+","+Gt+"Z";else{Ut=Math.abs(Mr-Gt)+Pt;var Ia=Ut0?Math.sqrt(Pt*(2*st-Pt)):0,Wa=ur>0?Math.max:Math.min;ut="M"+(kt+Ia*fr)+","+Gt+"V"+Wa(Mr-(st-Pt)*ur,Gt)+"A "+st+","+st+" 0 0 "+sr+" "+(kt+st*fr-qa)+","+Mr+"H"+(Nt-st*fr+qa)+"A "+st+","+st+" 0 0 "+sr+" "+(Nt-Ia*fr)+","+Wa(Mr-(st-Pt)*ur,Gt)+"V"+Gt+"Z"}}else ut=Ct}else ut=Ct;var Ca=p(S.ensureSingle(Ke,"path"),se,G,Y);if(Ca.style("vector-effect",ae?"none":"non-scaling-stroke").attr("d",isNaN((Nt-kt)*(Mr-Gt))||mr&&$._context.staticPlot?"M0,0Z":ut).call(t.setClipUrl,le.layerClipId,$),!se.uniformtext.mode&&qe){var hi=t.makePointStyleFns(pe);t.singlePointStyle(Ye,Ca,pe,hi,$)}m($,le,Ke,Q,rt,kt,Nt,Gt,Mr,st,Pt,G,Y),le.layerClipId&&t.hideOutsideRangePoint(Ye,Ke.select("text"),ee,q,pe.xcalendar,pe.ycalendar)});var Ce=pe.cliponaxis===!1;t.setClipUrl(re,Ce?null:le.layerClipId,$)});r.getComponentMethod("errorbars","plot")($,j,le,G)}function m($,le,ce,de,G,Y,ee,q,se,ae,j,Q,re){var pe=le.xaxis,we=le.yaxis,Se=$._fullLayout,Ie;function Re(Ut,Ct,Pt){var jt=S.ensureSingle(Ut,"text").text(Ct).attr({class:"bartext bartext-"+Ie,"text-anchor":"middle","data-notex":1}).call(t.font,Pt).call(E.convertToTspans,$);return jt}var We=de[0].trace,at=We.orientation==="h",nt=P(Se,de,G,pe,we);Ie=U(We,G);var tt=Q.mode==="stack"||Q.mode==="relative",qe=de[G],he=!tt||qe._outmost,ue=qe.hasB,ne=ae&&ae-j>_;if(!nt||Ie==="none"||(qe.isBlank||Y===ee||q===se)&&(Ie==="auto"||Ie==="inside")){ce.select("text").remove();return}var Ce=Se.font,Ye=s.getBarColor(de[G],We),rt=s.getInsideTextFont(We,G,Ce,Ye),Ke=s.getOutsideTextFont(We,G,Ce),Mt=We.insidetextanchor||"end",kt=ce.datum();at?pe.type==="log"&&kt.s0<=0&&(pe.range[0]0&&_t>0,Ae;ne?ue?Ae=R(Mr-2*ae,mr,Ir,_t,at)||R(Mr,mr-2*ae,Ir,_t,at):at?Ae=R(Mr-(ae-j),mr,Ir,_t,at)||R(Mr,mr-2*(ae-j),Ir,_t,at):Ae=R(Mr,mr-(ae-j),Ir,_t,at)||R(Mr-2*(ae-j),mr,Ir,_t,at):Ae=R(Mr,mr,Ir,_t,at),Je&&Ae?Ie="inside":(Ie="outside",qr.remove(),qr=null)}else Ie="inside";if(!qr){Oe=S.ensureUniformFontSize($,Ie==="outside"?Ke:rt),qr=Re(ce,nt,Oe);var Le=qr.attr("transform");if(qr.attr("transform",""),Er=t.bBox(qr.node()),Ir=Er.width,_t=Er.height,qr.attr("transform",Le),Ir<=0||_t<=0){qr.remove();return}}var Ue=We.textangle,Ze,st;Ie==="outside"?(st=We.constraintext==="both"||We.constraintext==="outside",Ze=O(Y,ee,q,se,Er,{isHorizontal:at,constrained:st,angle:Ue})):(st=We.constraintext==="both"||We.constraintext==="inside",Ze=F(Y,ee,q,se,Er,{isHorizontal:at,constrained:st,angle:Ue,anchor:Mt,hasB:ue,r:ae,overhead:j})),Ze.fontSize=Oe.size,n(We.type==="histogram"?"bar":We.type,Ze,Se),qe.transform=Ze;var ut=p(qr,Se,Q,re);S.setTransormAndDisplay(ut,Ze)}function R($,le,ce,de,G){if($<0||le<0)return!1;var Y=ce<=$&&de<=le,ee=ce<=le&&de<=$,q=G?$>=ce*(le/de):le>=de*($/ce);return Y||ee||q}function L($){return $==="auto"?0:$}function z($,le){var ce=Math.PI/180*le,de=Math.abs(Math.sin(ce)),G=Math.abs(Math.cos(ce));return{x:$.width*G+$.height*de,y:$.width*de+$.height*G}}function F($,le,ce,de,G,Y){var ee=!!Y.isHorizontal,q=!!Y.constrained,se=Y.angle||0,ae=Y.anchor,j=ae==="end",Q=ae==="start",re=Y.leftToRight||0,pe=(re+1)/2,we=1-pe,Se=Y.hasB,Ie=Y.r,Re=Y.overhead,We=G.width,at=G.height,nt=Math.abs(le-$),tt=Math.abs(de-ce),qe=nt>2*_&&tt>2*_?_:0;nt-=2*qe,tt-=2*qe;var he=L(se);se==="auto"&&!(We<=nt&&at<=tt)&&(We>nt||at>tt)&&(!(We>tt||at>nt)||We_){var Ye=N($,le,ce,de,ue,Ie,Re,ee,Se);ne=Ye.scale,Ce=Ye.pad}else ne=1,q&&(ne=Math.min(1,nt/ue.x,tt/ue.y)),Ce=0;var rt=G.left*we+G.right*pe,Ke=(G.top+G.bottom)/2,Mt=($+_)*we+(le-_)*pe,kt=(ce+de)/2,Nt=0,Gt=0;if(Q||j){var Mr=(ee?ue.x:ue.y)/2;Ie&&(j||Se)&&(qe+=Ce);var mr=ee?g($,le):g(ce,de);ee?Q?(Mt=$+mr*qe,Nt=-mr*Mr):(Mt=le-mr*qe,Nt=mr*Mr):Q?(kt=ce+mr*qe,Gt=-mr*Mr):(kt=de-mr*qe,Gt=mr*Mr)}return{textX:rt,textY:Ke,targetX:Mt,targetY:kt,anchorX:Nt,anchorY:Gt,scale:ne,rotate:he}}function N($,le,ce,de,G,Y,ee,q,se){var ae=Math.max(0,Math.abs(le-$)-2*_),j=Math.max(0,Math.abs(de-ce)-2*_),Q=Y-_,re=ee?Q-Math.sqrt(Q*Q-(Q-ee)*(Q-ee)):Q,pe=se?Q*2:q?Q-ee:2*re,we=se?Q*2:q?2*re:Q-ee,Se,Ie,Re,We,at;return G.y/G.x>=j/(ae-pe)?We=j/G.y:G.y/G.x<=(j-we)/ae?We=ae/G.x:!se&&q?(Se=G.x*G.x+G.y*G.y/4,Ie=-2*G.x*(ae-Q)-G.y*(j/2-Q),Re=(ae-Q)*(ae-Q)+(j/2-Q)*(j/2-Q)-Q*Q,We=(-Ie+Math.sqrt(Ie*Ie-4*Se*Re))/(2*Se)):se?(Se=(G.x*G.x+G.y*G.y)/4,Ie=-G.x*(ae/2-Q)-G.y*(j/2-Q),Re=(ae/2-Q)*(ae/2-Q)+(j/2-Q)*(j/2-Q)-Q*Q,We=(-Ie+Math.sqrt(Ie*Ie-4*Se*Re))/(2*Se)):(Se=G.x*G.x/4+G.y*G.y,Ie=-G.x*(ae/2-Q)-2*G.y*(j-Q),Re=(ae/2-Q)*(ae/2-Q)+(j-Q)*(j-Q)-Q*Q,We=(-Ie+Math.sqrt(Ie*Ie-4*Se*Re))/(2*Se)),We=Math.min(1,We),q?at=Math.max(0,Q-Math.sqrt(Math.max(0,Q*Q-(Q-(j-G.y*We)/2)*(Q-(j-G.y*We)/2)))-ee):at=Math.max(0,Q-Math.sqrt(Math.max(0,Q*Q-(Q-(ae-G.x*We)/2)*(Q-(ae-G.x*We)/2)))-ee),{scale:We,pad:at}}function O($,le,ce,de,G,Y){var ee=!!Y.isHorizontal,q=!!Y.constrained,se=Y.angle||0,ae=G.width,j=G.height,Q=Math.abs(le-$),re=Math.abs(de-ce),pe;ee?pe=re>2*_?_:0:pe=Q>2*_?_:0;var we=1;q&&(we=ee?Math.min(1,re/j):Math.min(1,Q/ae));var Se=L(se),Ie=z(G,Se),Re=(ee?Ie.x:Ie.y)/2,We=(G.left+G.right)/2,at=(G.top+G.bottom)/2,nt=($+le)/2,tt=(ce+de)/2,qe=0,he=0,ue=ee?g(le,$):g(ce,de);return ee?(nt=le-ue*pe,qe=ue*Re):(tt=de+ue*pe,he=-ue*Re),{textX:We,textY:at,targetX:nt,targetY:tt,anchorX:qe,anchorY:he,scale:we,rotate:Se}}function P($,le,ce,de,G){var Y=le[0].trace,ee=Y.texttemplate,q;return ee?q=B($,le,ce,de,G):Y.textinfo?q=X(le,ce,de,G):q=h.getValue(Y.text,ce),h.coerceString(c,q)}function U($,le){var ce=h.getValue($.textposition,le);return h.coerceEnumerated(T,ce)}function B($,le,ce,de,G){var Y=le[0].trace,ee=S.castOption(Y,ce,"texttemplate");if(!ee)return"";var q=Y.type==="histogram",se=Y.type==="waterfall",ae=Y.type==="funnel",j=Y.orientation==="h",Q,re,pe,we;j?(Q="y",re=G,pe="x",we=de):(Q="x",re=de,pe="y",we=G);function Se(qe){return o(re,re.c2l(qe),!0).text}function Ie(qe){return o(we,we.c2l(qe),!0).text}var Re=le[ce],We={};We.label=Re.p,We.labelLabel=We[Q+"Label"]=Se(Re.p);var at=S.castOption(Y,Re.i,"text");(at===0||at)&&(We.text=at),We.value=Re.s,We.valueLabel=We[pe+"Label"]=Ie(Re.s);var nt={};l(nt,Y,Re.i),(q||nt.x===void 0)&&(nt.x=j?We.value:We.label),(q||nt.y===void 0)&&(nt.y=j?We.label:We.value),(q||nt.xLabel===void 0)&&(nt.xLabel=j?We.valueLabel:We.labelLabel),(q||nt.yLabel===void 0)&&(nt.yLabel=j?We.labelLabel:We.valueLabel),se&&(We.delta=+Re.rawS||Re.s,We.deltaLabel=Ie(We.delta),We.final=Re.v,We.finalLabel=Ie(We.final),We.initial=We.final-We.delta,We.initialLabel=Ie(We.initial)),ae&&(We.value=Re.s,We.valueLabel=Ie(We.value),We.percentInitial=Re.begR,We.percentInitialLabel=S.formatPercent(Re.begR),We.percentPrevious=Re.difR,We.percentPreviousLabel=S.formatPercent(Re.difR),We.percentTotal=Re.sumR,We.percenTotalLabel=S.formatPercent(Re.sumR));var tt=S.castOption(Y,Re.i,"customdata");return tt&&(We.customdata=tt),S.texttemplateString({data:[nt,We,Y._meta],fallback:Y.texttemplatefallback,labels:We,locale:$._d3locale,template:ee})}function X($,le,ce,de){var G=$[0].trace,Y=G.orientation==="h",ee=G.type==="waterfall",q=G.type==="funnel";function se(tt){var qe=Y?de:ce;return o(qe,tt,!0).text}function ae(tt){var qe=Y?ce:de;return o(qe,+tt,!0).text}var j=G.textinfo,Q=$[le],re=j.split("+"),pe=[],we,Se=function(tt){return re.indexOf(tt)!==-1};if(Se("label")&&pe.push(se($[le].p)),Se("text")&&(we=S.castOption(G,Q.i,"text"),(we===0||we)&&pe.push(we)),ee){var Ie=+Q.rawS||Q.s,Re=Q.v,We=Re-Ie;Se("initial")&&pe.push(ae(We)),Se("delta")&&pe.push(ae(Ie)),Se("final")&&pe.push(ae(Re))}if(q){Se("value")&&pe.push(ae(Q.s));var at=0;Se("percent initial")&&at++,Se("percent previous")&&at++,Se("percent total")&&at++;var nt=at>1;Se("percent initial")&&(we=S.formatPercent(Q.begR),nt&&(we+=" of initial"),pe.push(we)),Se("percent previous")&&(we=S.formatPercent(Q.difR),nt&&(we+=" of previous"),pe.push(we)),Se("percent total")&&(we=S.formatPercent(Q.sumR),nt&&(we+=" of total"),pe.push(we))}return pe.join("
")}V.exports={plot:y,toMoveInsideBar:F}}}),f1=He({"src/traces/bar/hover.js"(Z,V){"use strict";var d=rf(),x=lo(),S=Jn(),E=sa().fillText,e=q2().getLineWidth,t=Ho().hoverLabelText,r=Ws().BADNUM;function o(i,s,h,f,v){var c=a(i,s,h,f,v);if(c){var T=c.cd,l=T[0].trace,_=T[c.index];return c.color=n(l,_),x.getComponentMethod("errorbars","hoverInfo")(_,l,c),[c]}}function a(i,s,h,f,v){var c=i.cd,T=c[0].trace,l=c[0].t,_=f==="closest",w=T.type==="waterfall",A=i.maxHoverDistance,M=i.maxSpikeDistance,g,b,p,u,y,m,R;T.orientation==="h"?(g=h,b=s,p="y",u="x",y=de,m=$):(g=s,b=h,p="x",u="y",m=de,y=$);var L=T[p+"period"],z=_||L;function F(we){return O(we,-1)}function N(we){return O(we,1)}function O(we,Se){var Ie=we.w;return we[p]+Se*Ie/2}function P(we){return we[p+"End"]-we[p+"Start"]}var U=_?F:L?function(we){return we.p-P(we)/2}:function(we){return Math.min(F(we),we.p-l.bardelta/2)},B=_?N:L?function(we){return we.p+P(we)/2}:function(we){return Math.max(N(we),we.p+l.bardelta/2)};function X(we,Se,Ie){return v.finiteRange&&(Ie=0),d.inbox(we-g,Se-g,Ie+Math.min(1,Math.abs(Se-we)/R)-1)}function $(we){return X(U(we),B(we),A)}function le(we){return X(F(we),N(we),M)}function ce(we){var Se=we[u];if(w){var Ie=Math.abs(we.rawS)||0;b>0?Se+=Ie:b<0&&(Se-=Ie)}return Se}function de(we){var Se=b,Ie=we.b,Re=ce(we);return d.inbox(Ie-Se,Re-Se,A+(Re-Se)/(Re-Ie)-1)}function G(we){var Se=b,Ie=we.b,Re=ce(we);return d.inbox(Ie-Se,Re-Se,M+(Re-Se)/(Re-Ie)-1)}var Y=i[p+"a"],ee=i[u+"a"];R=Math.abs(Y.r2c(Y.range[1])-Y.r2c(Y.range[0]));function q(we){return(y(we)+m(we))/2}var se=d.getDistanceFunction(f,y,m,q);if(d.getClosest(c,se,i),i.index!==!1&&c[i.index].p!==r){z||(U=function(we){return Math.min(F(we),we.p-l.bargroupwidth/2)},B=function(we){return Math.max(N(we),we.p+l.bargroupwidth/2)});var ae=i.index,j=c[ae],Q=T.base?j.b+j.s:j.s;i[u+"0"]=i[u+"1"]=ee.c2p(j[u],!0),i[u+"LabelVal"]=Q;var re=l.extents[l.extents.round(j.p)];i[p+"0"]=Y.c2p(_?U(j):re[0],!0),i[p+"1"]=Y.c2p(_?B(j):re[1],!0);var pe=j.orig_p!==void 0;return i[p+"LabelVal"]=pe?j.orig_p:j.p,i.labelLabel=t(Y,i[p+"LabelVal"],T[p+"hoverformat"]),i.valueLabel=t(ee,i[u+"LabelVal"],T[u+"hoverformat"]),i.baseLabel=t(ee,j.b,T[u+"hoverformat"]),i.spikeDistance=(G(j)+le(j))/2,i[p+"Spike"]=Y.c2p(j.p,!0),E(j,T,i),i.hovertemplate=T.hovertemplate,i}}function n(i,s){var h=s.mcc||i.marker.color,f=s.mlcc||i.marker.line.color,v=e(i,s);if(S.opacity(h))return h;if(S.opacity(f)&&v)return f}V.exports={hoverPoints:o,hoverOnBars:a,getTraceColor:n}}}),Y9=He({"src/traces/bar/event_data.js"(Z,V){"use strict";V.exports=function(x,S,E){return x.x="xVal"in S?S.xVal:S.x,x.y="yVal"in S?S.yVal:S.y,S.xa&&(x.xaxis=S.xa),S.ya&&(x.yaxis=S.ya),E.orientation==="h"?(x.label=x.y,x.value=x.x):(x.label=x.x,x.value=x.y),x}}}),h1=He({"src/traces/bar/select.js"(Z,V){"use strict";V.exports=function(S,E){var e=S.cd,t=S.xaxis,r=S.yaxis,o=e[0].trace,a=o.type==="funnel",n=o.orientation==="h",i=[],s;if(E===!1)for(s=0;s0?(L="v",p>0?z=Math.min(y,u):z=Math.min(u)):p>0?(L="h",z=Math.min(y)):z=0;if(!z){h.visible=!1;return}h._length=z;var U=f("orientation",L);h._hasPreCompStats?U==="v"&&p===0?(f("x0",0),f("dx",1)):U==="h"&&b===0&&(f("y0",0),f("dy",1)):U==="v"&&p===0?f("x0"):U==="h"&&b===0&&f("y0");var B=x.getComponentMethod("calendars","handleTraceDefaults");B(s,h,["x","y"],v)}function n(s,h,f,v){var c=v.prefix,T=d.coerce2(s,h,r,"marker.outliercolor"),l=f("marker.line.outliercolor"),_="outliers";h._hasPreCompStats?_="all":(T||l)&&(_="suspectedoutliers");var w=f(c+"points",_);w?(f("jitter",w==="all"?.3:0),f("pointpos",w==="all"?-1.5:0),f("marker.symbol"),f("marker.opacity"),f("marker.size"),f("marker.angle"),f("marker.color",h.line.color),f("marker.line.color"),f("marker.line.width"),w==="suspectedoutliers"&&(f("marker.line.outliercolor",h.marker.color),f("marker.line.outlierwidth")),f("selected.marker.color"),f("unselected.marker.color"),f("selected.marker.size"),f("unselected.marker.size"),f("text"),f("hovertext")):delete h.marker;var A=f("hoveron");(A==="all"||A.indexOf("points")!==-1)&&(f("hovertemplate"),f("hovertemplatefallback")),d.coerceSelectionMarkerOpacity(h,f)}function i(s,h){var f,v;function c(w){return d.coerce(v._input,v,r,w)}for(var T=0;Tce.uf};if(M._hasPreCompStats){var ae=M[z],j=function(mr){return L.d2c((M[mr]||[])[m])},Q=1/0,re=-1/0;for(m=0;m=ce.q1&&ce.q3>=ce.med){var we=j("lowerfence");ce.lf=we!==e&&we<=ce.q1?we:v(ce,G,Y);var Se=j("upperfence");ce.uf=Se!==e&&Se>=ce.q3?Se:c(ce,G,Y);var Ie=j("mean");ce.mean=Ie!==e?Ie:Y?E.mean(G,Y):(ce.q1+ce.q3)/2;var Re=j("sd");ce.sd=Ie!==e&&Re>=0?Re:Y?E.stdev(G,Y,ce.mean):ce.q3-ce.q1,ce.lo=T(ce),ce.uo=l(ce);var We=j("notchspan");We=We!==e&&We>0?We:_(ce,Y),ce.ln=ce.med-We,ce.un=ce.med+We;var at=ce.lf,nt=ce.uf;M.boxpoints&&G.length&&(at=Math.min(at,G[0]),nt=Math.max(nt,G[Y-1])),M.notched&&(at=Math.min(at,ce.ln),nt=Math.max(nt,ce.un)),ce.min=at,ce.max=nt}else{E.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+ce.q1,"median = "+ce.med,"q3 = "+ce.q3].join(` `));var tt;ce.med!==e?tt=ce.med:ce.q1!==e?ce.q3!==e?tt=(ce.q1+ce.q3)/2:tt=ce.q1:ce.q3!==e?tt=ce.q3:tt=0,ce.med=tt,ce.q1=ce.q3=tt,ce.lf=ce.uf=tt,ce.mean=ce.sd=tt,ce.ln=ce.un=tt,ce.min=ce.max=tt}Q=Math.min(Q,ce.min),re=Math.max(re,ce.max),ce.pts2=de.filter(se),u.push(ce)}}M._extremes[L._id]=x.findExtremes(L,[Q,re],{padded:!0})}else{var qe=L.makeCalcdata(M,z),he=o($,le),ue=$.length,ne=a(ue);for(m=0;m=0&&Ce0){if(ce={},ce.pos=ce[N]=$[m],de=ce.pts=ne[m].sort(h),G=ce[z]=de.map(f),Y=G.length,ce.min=G[0],ce.max=G[Y-1],ce.mean=E.mean(G,Y),ce.sd=E.stdev(G,Y,ce.mean)*M.sdmultiple,ce.med=E.interp(G,.5),Y%2&&(Mt||kt)){var Nt,Gt;Mt?(Nt=G.slice(0,Y/2),Gt=G.slice(Y/2+1)):kt&&(Nt=G.slice(0,Y/2+1),Gt=G.slice(Y/2)),ce.q1=E.interp(Nt,.5),ce.q3=E.interp(Gt,.5)}else ce.q1=E.interp(G,.25),ce.q3=E.interp(G,.75);ce.lf=v(ce,G,Y),ce.uf=c(ce,G,Y),ce.lo=T(ce),ce.uo=l(ce);var Mr=_(ce,Y);ce.ln=ce.med-Mr,ce.un=ce.med+Mr,Ye=Math.min(Ye,ce.ln),rt=Math.max(rt,ce.un),ce.pts2=de.filter(se),u.push(ce)}M.notched&&E.isTypedArray(qe)&&(qe=Array.from(qe)),M._extremes[L._id]=x.findExtremes(L,M.notched?qe.concat([Ye,rt]):qe,{padded:!0})}return s(u,M),u.length>0?(u[0].t={num:g[y],dPos:le,posLetter:N,valLetter:z,labels:{med:t(A,"median:"),min:t(A,"min:"),q1:t(A,"q1:"),q3:t(A,"q3:"),max:t(A,"max:"),mean:M.boxmean==="sd"||M.sizemode==="sd"?t(A,"mean \xB1 \u03C3:").replace("\u03C3",M.sdmultiple===1?"\u03C3":M.sdmultiple+"\u03C3"):t(A,"mean:"),lf:t(A,"lower fence:"),uf:t(A,"upper fence:")}},g[y]++,u):[{t:{empty:!0}}]};function r(w,A,M,g){var b=A in w,p=A+"0"in w,u="d"+A in w;if(b||p&&u){var y=M.makeCalcdata(w,A),m=S(w,M,A,y).vals;return[m,y]}var R;p?R=w[A+"0"]:"name"in w&&(M.type==="category"||d(w.name)&&["linear","log"].indexOf(M.type)!==-1||E.isDateTime(w.name)&&M.type==="date")?R=w.name:R=g;for(var L=M.type==="multicategory"?M.r2c_just_indices(R):M.d2c(R,0,w[A+"calendar"]),z=w._length,F=new Array(z),N=0;N1,p=1-s[r+"gap"],u=1-s[r+"groupgap"];for(v=0;v0;if(L==="positive"?(ce=z*(R?1:.5),Y=G,de=Y=N):L==="negative"?(ce=Y=N,de=z*(R?1:.5),ee=G):(ce=de=z,Y=ee=G),re){var pe=y.pointpos,we=y.jitter,Se=y.marker.size/2,Ie=0;pe+we>=0&&(Ie=G*(pe+we),Ie>ce?(Q=!0,ae=Se,q=Ie):Ie>Y&&(ae=Se,q=ce)),Ie<=ce&&(q=ce);var Re=0;pe-we<=0&&(Re=-G*(pe-we),Re>de?(Q=!0,j=Se,se=Re):Re>ee&&(j=Se,se=de)),Re<=de&&(se=de)}else q=ce,se=de;var We=new Array(T.length);for(c=0;cM.lo&&(U.so=!0)}return b});A.enter().append("path").classed("point",!0),A.exit().remove(),A.call(S.translatePoints,f,v)}function a(n,i,s,h){var f=i.val,v=i.pos,c=!!v.rangebreaks,T=h.bPos,l=h.bPosPxOffset||0,_=s.boxmean||(s.meanline||{}).visible,w,A;Array.isArray(h.bdPos)?(w=h.bdPos[0],A=h.bdPos[1]):(w=h.bdPos,A=h.bdPos);var M=n.selectAll("path.mean").data(s.type==="box"&&s.boxmean||s.type==="violin"&&s.box.visible&&s.meanline.visible?x.identity:[]);M.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),M.exit().remove(),M.each(function(g){var b=v.c2l(g.pos+T,!0),p=v.l2p(b-w)+l,u=v.l2p(b+A)+l,y=c?(p+u)/2:v.l2p(b)+l,m=f.c2p(g.mean,!0),R=f.c2p(g.mean-g.sd,!0),L=f.c2p(g.mean+g.sd,!0);s.orientation==="h"?d.select(this).attr("d","M"+m+","+p+"V"+u+(_==="sd"?"m0,0L"+R+","+y+"L"+m+","+p+"L"+L+","+y+"Z":"")):d.select(this).attr("d","M"+p+","+m+"H"+u+(_==="sd"?"m0,0L"+y+","+R+"L"+p+","+m+"L"+y+","+L+"Z":""))})}V.exports={plot:t,plotBoxAndWhiskers:r,plotPoints:o,plotBoxMean:a}}}),W2=He({"src/traces/box/style.js"(Z,V){"use strict";var d=Wn(),x=Jn(),S=es();function E(t,r,o){var a=o||d.select(t).selectAll("g.trace.boxes");a.style("opacity",function(n){return n[0].trace.opacity}),a.each(function(n){var i=d.select(this),s=n[0].trace,h=s.line.width;function f(T,l,_,w){T.style("stroke-width",l+"px").call(x.stroke,_).call(x.fill,w)}var v=i.selectAll("path.box");if(s.type==="candlestick")v.each(function(T){if(!T.empty){var l=d.select(this),_=s[T.dir];f(l,_.line.width,_.line.color,_.fillcolor),l.style("opacity",s.selectedpoints&&!T.selected?.3:1)}});else{f(v,h,s.line.color,s.fillcolor),i.selectAll("path.mean").style({"stroke-width":h,"stroke-dasharray":2*h+"px,"+h+"px"}).call(x.stroke,s.line.color);var c=i.selectAll("path.point");S.pointStyle(c,s,t)}})}function e(t,r,o){var a=r[0].trace,n=o.selectAll("path.point");a.selectedpoints?S.selectedPointStyle(n,a):S.pointStyle(n,a,t)}V.exports={style:E,styleOnSelect:e}}}),Q5=He({"src/traces/box/hover.js"(Z,V){"use strict";var d=Ho(),x=sa(),S=rf(),E=Jn(),e=x.fillText;function t(a,n,i,s){var h=a.cd,f=h[0].trace,v=f.hoveron,c=[],T;return v.indexOf("boxes")!==-1&&(c=c.concat(r(a,n,i,s))),v.indexOf("points")!==-1&&(T=o(a,n,i)),s==="closest"?T?[T]:c:(T&&c.push(T),c)}function r(a,n,i,s){var h=a.cd,f=a.xa,v=a.ya,c=h[0].trace,T=h[0].t,l=c.type==="violin",_,w,A,M,g,b,p,u,y,m,R,L=T.bdPos,z,F,N=T.wHover,O=function(Re){return A.c2l(Re.pos)+T.bPos-A.c2l(b)};l&&c.side!=="both"?(c.side==="positive"&&(y=function(Re){var We=O(Re);return S.inbox(We,We+N,m)},z=L,F=0),c.side==="negative"&&(y=function(Re){var We=O(Re);return S.inbox(We-N,We,m)},z=0,F=L)):(y=function(Re){var We=O(Re);return S.inbox(We-N,We+N,m)},z=F=L);var P;l?P=function(Re){return S.inbox(Re.span[0]-g,Re.span[1]-g,m)}:P=function(Re){return S.inbox(Re.min-g,Re.max-g,m)},c.orientation==="h"?(g=n,b=i,p=P,u=y,_="y",A=v,w="x",M=f):(g=i,b=n,p=y,u=P,_="x",A=f,w="y",M=v);var U=Math.min(1,L/Math.abs(A.r2c(A.range[1])-A.r2c(A.range[0])));m=a.maxHoverDistance-U,R=a.maxSpikeDistance-U;function B(Re){return(p(Re)+u(Re))/2}var X=S.getDistanceFunction(s,p,u,B);if(S.getClosest(h,X,a),a.index===!1)return[];var $=h[a.index],le=c.line.color,ce=(c.marker||{}).color;E.opacity(le)&&c.line.width?a.color=le:E.opacity(ce)&&c.boxpoints?a.color=ce:a.color=c.fillcolor,a[_+"0"]=A.c2p($.pos+T.bPos-F,!0),a[_+"1"]=A.c2p($.pos+T.bPos+z,!0),a[_+"LabelVal"]=$.orig_p!==void 0?$.orig_p:$.pos;var de=_+"Spike";a.spikeDistance=B($)*R/m,a[de]=A.c2p($.pos,!0);var G=c.boxmean||c.sizemode==="sd"||(c.meanline||{}).visible,Y=c.boxpoints||c.points,ee=Y&&G?["max","uf","q3","med","mean","q1","lf","min"]:Y&&!G?["max","uf","q3","med","q1","lf","min"]:!Y&&G?["max","q3","med","mean","q1","min"]:["max","q3","med","q1","min"],q=M.range[1]0&&(o=!0);for(var s=0;st){var r=t-E[x];return E[x]=t,r}}else return E[x]=t,t;return 0},max:function(x,S,E,e){var t=e[S];if(d(t))if(t=Number(t),d(E[x])){if(E[x]p&&pE){var m=u===x?1:6,R=u===x?"M12":"M1";return function(L,z){var F=T.c2d(L,x,l),N=F.indexOf("-",m);N>0&&(F=F.slice(0,N));var O=T.d2c(F,0,l);if(Or?h>E?h>x*1.1?x:h>S*1.1?S:E:h>e?e:h>t?t:r:Math.pow(10,Math.floor(Math.log(h)/Math.LN10))}function i(h,f,v,c,T,l){if(c&&h>E){var _=s(f,T,l),w=s(v,T,l),A=h===x?0:1;return _[A]!==w[A]}return Math.floor(v/h)-Math.floor(f/h)>.1}function s(h,f,v){var c=f.c2d(h,x,v).split("-");return c[0]===""&&(c.unshift(),c[0]="-"+c[0]),c}}}),oS=He({"src/traces/histogram/calc.js"(Z,V){"use strict";var d=as(),x=sa(),S=lo(),E=Ho(),{hasColorscale:e}=wp(),t=Tp(),r=B_(),o=rS(),a=aS(),n=iS(),i=nS();function s(T,l){var _=[],w=[],A=l.orientation==="h",M=E.getFromId(T,A?l.yaxis:l.xaxis),g=A?"y":"x",b={x:"y",y:"x"}[g],p=l[g+"calendar"],u=l.cumulative,y,m=h(T,l,M,g),R=m[0],L=m[1],z=typeof R.size=="string",F=[],N=z?F:R,O=[],P=[],U=[],B=0,X=l.histnorm,$=l.histfunc,le=X.indexOf("density")!==-1,ce,de,G;u.enabled&&le&&(X=X.replace(/ ?density$/,""),le=!1);var Y=$==="max"||$==="min",ee=Y?null:0,q=o.count,se=a[X],ae=!1,j=function(Ce){return M.r2c(Ce,0,p)},Q;for(x.isArrayOrTypedArray(l[b])&&$!=="count"&&(Q=l[b],ae=$==="avg",q=o[$]),y=j(R.start),de=j(R.end)+(y-E.tickIncrement(y,R.size,!1,p))/1e6;y=0&&G=he;y--)if(w[y]){ue=y;break}for(y=he;y<=ue;y++)if(d(_[y])&&d(w[y])){var ne={p:_[y],s:w[y],b:0};u.enabled||(ne.pts=U[y],Se?ne.ph0=ne.ph1=U[y].length?L[U[y][0]]:_[y]:(l._computePh=!0,ne.ph0=nt(F[y]),ne.ph1=nt(F[y+1],!0))),qe.push(ne)}return qe.length===1&&(qe[0].width1=E.tickIncrement(qe[0].p,R.size,!1,p)-qe[0].p),e(l,"marker")&&t(T,l,{vals:l.marker.color,containerStr:"marker",cLetter:"c"}),e(l,"marker.line")&&t(T,l,{vals:l.marker.line.color,containerStr:"marker.line",cLetter:"c"}),r(qe,l),x.isArrayOrTypedArray(l.selectedpoints)&&x.tagSelected(qe,l,We),qe}function h(T,l,_,w,A){var M=w+"bins",g=T._fullLayout,b=l["_"+w+"bingroup"],p=g._histogramBinOpts[b],u=g.barmode==="overlay",y,m,R,L,z,F,N,O=function(at){return _.r2c(at,0,L)},P=function(at){return _.c2r(at,0,L)},U=_.type==="date"?function(at){return at||at===0?x.cleanDate(at,null,L):null}:function(at){return d(at)?Number(at):null};function B(at,nt,tt){nt[at+"Found"]?(nt[at]=U(nt[at]),nt[at]===null&&(nt[at]=tt[at])):(F[at]=nt[at]=tt[at],x.nestedProperty(m[0],M+"."+at).set(tt[at]))}if(l["_"+w+"autoBinFinished"])delete l["_"+w+"autoBinFinished"];else{m=p.traces;var X=[],$=!0,le=!1,ce=!1;for(y=0;y"u"){if(A)return[G,z,!0];G=f(T,l,_,w,M)}N=R.cumulative||{},N.enabled&&N.currentbin!=="include"&&(N.direction==="decreasing"?G.start=P(E.tickIncrement(O(G.start),G.size,!0,L)):G.end=P(E.tickIncrement(O(G.end),G.size,!1,L))),p.size=G.size,p.sizeFound||(F.size=G.size,x.nestedProperty(m[0],M+".size").set(G.size)),B("start",p,G),B("end",p,G)}z=l["_"+w+"pos0"],delete l["_"+w+"pos0"];var ee=l._input[M]||{},q=x.extendFlat({},p),se=p.start,ae=_.r2l(ee.start),j=ae!==void 0;if((p.startFound||j)&&ae!==_.r2l(se)){var Q=j?ae:x.aggNums(Math.min,null,z),re={type:_.type==="category"||_.type==="multicategory"?"linear":_.type,r2l:_.r2l,dtick:p.size,tick0:se,calendar:L,range:[Q,E.tickIncrement(Q,p.size,!1,L)].map(_.l2r)},pe=E.tickFirst(re);pe>_.r2l(Q)&&(pe=E.tickIncrement(pe,p.size,!0,L)),q.start=_.l2r(pe),j||x.nestedProperty(l,M+".start").set(q.start)}var we=p.end,Se=_.r2l(ee.end),Ie=Se!==void 0;if((p.endFound||Ie)&&Se!==_.r2l(we)){var Re=Ie?Se:x.aggNums(Math.max,null,z);q.end=_.l2r(Re),Ie||x.nestedProperty(l,M+".start").set(q.end)}var We="autobin"+w;return l._input[We]===!1&&(l._input[M]=x.extendFlat({},l[M]||{}),delete l._input[We],delete l[We]),[q,z]}function f(T,l,_,w,A){var M=T._fullLayout,g=v(T,l),b=!1,p=1/0,u=[l],y,m,R;for(y=0;y=0;w--)b(w);else if(l==="increasing"){for(w=1;w=0;w--)T[w]+=T[w+1];_==="exclude"&&(T.push(0),T.shift())}}V.exports={calc:s,calcAllAutoBins:h}}}),rF=He({"src/traces/histogram2d/calc.js"(Z,V){"use strict";var d=sa(),x=Ho(),S=rS(),E=aS(),e=iS(),t=nS(),r=oS().calcAllAutoBins;V.exports=function(s,h){var f=x.getFromId(s,h.xaxis),v=x.getFromId(s,h.yaxis),c=h.xcalendar,T=h.ycalendar,l=function(Oe){return f.r2c(Oe,0,c)},_=function(Oe){return v.r2c(Oe,0,T)},w=function(Oe){return f.c2r(Oe,0,c)},A=function(Oe){return v.c2r(Oe,0,T)},M,g,b,p,u=r(s,h,f,"x"),y=u[0],m=u[1],R=r(s,h,v,"y"),L=R[0],z=R[1],F=h._length;m.length>F&&m.splice(F,m.length-F),z.length>F&&z.splice(F,z.length-F);var N=[],O=[],P=[],U=typeof y.size=="string",B=typeof L.size=="string",X=[],$=[],le=U?X:y,ce=B?$:L,de=0,G=[],Y=[],ee=h.histnorm,q=h.histfunc,se=ee.indexOf("density")!==-1,ae=q==="max"||q==="min",j=ae?null:0,Q=S.count,re=E[ee],pe=!1,we=[],Se=[],Ie="z"in h?h.z:"marker"in h&&Array.isArray(h.marker.color)?h.marker.color:"";Ie&&q!=="count"&&(pe=q==="avg",Q=S[q]);var Re=y.size,We=l(y.start),at=l(y.end)+(We-x.tickIncrement(We,Re,!1,c))/1e6;for(M=We;M=0&&b=0&&px;n++)a=e(r,o,E(a));return a>x&&d.log("interp2d didn't converge quickly",a),r};function e(t,r,o){var a=0,n,i,s,h,f,v,c,T,l,_,w,A,M;for(h=0;hA&&(a=Math.max(a,Math.abs(t[i][s]-w)/(M-A))))}return a}}}),J2=He({"src/traces/heatmap/find_empties.js"(Z,V){"use strict";var d=sa().maxRowLength;V.exports=function(S){var E=[],e={},t=[],r=S[0],o=[],a=[0,0,0],n=d(S),i,s,h,f,v,c,T,l;for(s=0;s=0;v--)f=t[v],s=f[0],h=f[1],c=((e[[s-1,h]]||a)[2]+(e[[s+1,h]]||a)[2]+(e[[s,h-1]]||a)[2]+(e[[s,h+1]]||a)[2])/20,c&&(T[f]=[s,h,c],t.splice(v,1),l=!0);if(!l)throw"findEmpties iterated with no new neighbors";for(f in T)e[f]=T[f],E.push(T[f])}return E.sort(function(_,w){return w[2]-_[2]})}}}),sS=He({"src/traces/heatmap/make_bound_array.js"(Z,V){"use strict";var d=lo(),x=sa().isArrayOrTypedArray;V.exports=function(E,e,t,r,o,a){var n=[],i=d.traceIs(E,"contour"),s=d.traceIs(E,"histogram"),h,f,v,c=x(e)&&e.length>1;if(c&&!s&&a.type!=="category"){var T=e.length;if(T<=o){if(i)n=Array.from(e).slice(0,o);else if(o===1)a.type==="log"?n=[.5*e[0],2*e[0]]:n=[e[0]-.5,e[0]+.5];else if(a.type==="log"){for(n=[Math.pow(e[0],1.5)/Math.pow(e[1],.5)],v=1;v1){var ee=(Y[Y.length-1]-Y[0])/(Y.length-1),q=Math.abs(ee/100);for(F=0;Fq)return!1}return!0}T._islinear=!1,l.type==="log"||_.type==="log"?M==="fast"&&P("log axis found"):U(g)?U(y)?T._islinear=!0:M==="fast"&&P("y scale is not linear"):M==="fast"&&P("x scale is not linear");var B=x.maxRowLength(z),X=T.xtype==="scaled"?"":g,$=i(T,X,b,p,B,l),le=T.ytype==="scaled"?"":y,ce=i(T,le,m,R,z.length,_);T._extremes[l._id]=S.findExtremes(l,$),T._extremes[_._id]=S.findExtremes(_,ce);var de={x:$,y:ce,z,text:T._text||T.text,hovertext:T._hovertext||T.hovertext};if(T.xperiodalignment&&u&&(de.orig_x=u),T.yperiodalignment&&L&&(de.orig_y=L),X&&X.length===$.length-1&&(de.xCenter=X),le&&le.length===ce.length-1&&(de.yCenter=le),A&&(de.xRanges=N.xRanges,de.yRanges=N.yRanges,de.pts=N.pts),w||t(c,T,{vals:z,cLetter:"z"}),w&&T.contours&&T.contours.coloring==="heatmap"){var G={type:T.type==="contour"?"heatmap":"histogram2d",xcalendar:T.xcalendar,ycalendar:T.ycalendar};de.xfill=i(G,X,b,p,B,l),de.yfill=i(G,le,m,R,z.length,_)}return[de]};function h(v){for(var c=[],T=v.length,l=0;l0;)se=y.c2p(U[re]),re--;for(se0;)Q=m.c2p(B[re]),re--;Q=y._length||se<=0||j>=m._length||Q<=0;if(at){var nt=L.selectAll("image").data([]);nt.exit().remove(),_(L);return}var tt,qe;Se==="fast"?(tt=G,qe=de):(tt=Re,qe=We);var he=document.createElement("canvas");he.width=tt,he.height=qe;var ue=he.getContext("2d",{willReadFrequently:!0}),ne=i(F,{noNumericCheck:!0,returnArray:!0}),Ce,Ye;Se==="fast"?(Ce=Y?function(_a){return G-1-_a}:t.identity,Ye=ee?function(_a){return de-1-_a}:t.identity):(Ce=function(_a){return t.constrain(Math.round(y.c2p(U[_a])-q),0,Re)},Ye=function(_a){return t.constrain(Math.round(m.c2p(B[_a])-j),0,We)});var rt=Ye(0),Ke=[rt,rt],Mt=Y?0:1,kt=ee?0:1,Nt=0,Gt=0,Mr=0,mr=0,qr,Er,Ir,_t,Oe;function Je(_a,Ai){if(_a!==void 0){var ki=ne(_a);return ki[0]=Math.round(ki[0]),ki[1]=Math.round(ki[1]),ki[2]=Math.round(ki[2]),Nt+=Ai,Gt+=ki[0]*Ai,Mr+=ki[1]*Ai,mr+=ki[2]*Ai,ki}return[0,0,0,0]}function Ae(_a,Ai,ki,Ki){var yn=_a[ki.bin0];if(yn===void 0)return Je(void 0,1);var Ln=_a[ki.bin1],kn=Ai[ki.bin0],Bn=Ai[ki.bin1],ao=Ln-yn||0,xo=kn-yn||0,Co;return Ln===void 0?Bn===void 0?Co=0:kn===void 0?Co=2*(Bn-yn):Co=(2*Bn-kn-yn)*2/3:Bn===void 0?kn===void 0?Co=0:Co=(2*yn-Ln-kn)*2/3:kn===void 0?Co=(2*Bn-Ln-yn)*2/3:Co=Bn+yn-Ln-kn,Je(yn+ki.frac*ao+Ki.frac*(xo+ki.frac*Co))}if(Se!=="default"){var Le=0,Ue;try{Ue=new Uint8Array(tt*qe*4)}catch{Ue=new Array(tt*qe*4)}if(Se==="smooth"){var Ze=X||U,st=$||B,ut=new Array(Ze.length),Ut=new Array(st.length),Ct=new Array(Re),Pt=X?A:w,jt=$?A:w,fr,ur,sr;for(re=0;re$a||$a>m._length))for(pe=ta;peri||ri>y._length)){var pi=o({x:Za,y:Ba},F,g._fullLayout);pi.x=Za,pi.y=Ba;var Ra=z.z[re][pe];Ra===void 0?(pi.z="",pi.zLabel=""):(pi.z=Ra,pi.zLabel=e.tickText(Kt,Ra,"hover").text);var an=z.text&&z.text[re]&&z.text[re][pe];(an===void 0||an===!1)&&(an=""),pi.text=an;var tn=t.texttemplateString({data:[pi,F._meta],fallback:F.texttemplatefallback,labels:pi,locale:g._fullLayout._d3locale,template:hi});if(tn){var fn=tn.split("
"),xt=fn.length,lt=0;for(we=0;we=_[0].length||R<0||R>_.length)return}else{if(d.inbox(o-T[0],o-T[T.length-1],0)>0||d.inbox(a-l[0],a-l[l.length-1],0)>0)return;if(s){var L;for(b=[2*T[0]-T[1]],L=1;L=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}}}),V_=He({"src/traces/contour/attributes.js"(Z,V){"use strict";var d=p1(),x=af(),S=tf(),E=S.axisHoverFormat,e=S.descriptionOnlyNumbers,t=ku(),r=Gh().dash,o=tc(),a=Qo().extendFlat,n=o3(),i=n.COMPARISON_OPS2,s=n.INTERVAL_OPS,h=x.line;V.exports=a({z:d.z,x:d.x,x0:d.x0,dx:d.dx,y:d.y,y0:d.y0,dy:d.dy,xperiod:d.xperiod,yperiod:d.yperiod,xperiod0:x.xperiod0,yperiod0:x.yperiod0,xperiodalignment:d.xperiodalignment,yperiodalignment:d.yperiodalignment,text:d.text,hovertext:d.hovertext,transpose:d.transpose,xtype:d.xtype,ytype:d.ytype,xhoverformat:E("x"),yhoverformat:E("y"),zhoverformat:E("z",1),hovertemplate:d.hovertemplate,hovertemplatefallback:d.hovertemplatefallback,texttemplate:a({},d.texttemplate,{}),texttemplatefallback:d.texttemplatefallback,textfont:a({},d.textfont,{}),hoverongaps:d.hoverongaps,connectgaps:a({},d.connectgaps,{}),fillcolor:{valType:"color",editType:"calc"},autocontour:{valType:"boolean",dflt:!0,editType:"calc",impliedEdits:{"contours.start":void 0,"contours.end":void 0,"contours.size":void 0}},ncontours:{valType:"integer",dflt:15,min:1,editType:"calc"},contours:{type:{valType:"enumerated",values:["levels","constraint"],dflt:"levels",editType:"calc"},start:{valType:"number",dflt:null,editType:"plot",impliedEdits:{"^autocontour":!1}},end:{valType:"number",dflt:null,editType:"plot",impliedEdits:{"^autocontour":!1}},size:{valType:"number",dflt:null,min:0,editType:"plot",impliedEdits:{"^autocontour":!1}},coloring:{valType:"enumerated",values:["fill","heatmap","lines","none"],dflt:"fill",editType:"calc"},showlines:{valType:"boolean",dflt:!0,editType:"plot"},showlabels:{valType:"boolean",dflt:!1,editType:"plot"},labelfont:o({editType:"plot",colorEditType:"style"}),labelformat:{valType:"string",dflt:"",editType:"plot",description:e("contour label")},operation:{valType:"enumerated",values:[].concat(i).concat(s),dflt:"=",editType:"calc"},value:{valType:"any",dflt:0,editType:"calc"},editType:"calc",impliedEdits:{autocontour:!1}},line:{color:a({},h.color,{editType:"style+colorbars"}),width:{valType:"number",min:0,editType:"style+colorbars"},dash:r,smoothing:a({},h.smoothing,{}),editType:"plot"},zorder:x.zorder},t("",{cLetter:"z",autoColorDflt:!1,editTypeOverride:"calc"}))}}),hS=He({"src/traces/histogram2dcontour/attributes.js"(Z,V){"use strict";var d=n3(),x=V_(),S=ku(),E=tf().axisHoverFormat,e=Qo().extendFlat;V.exports=e({x:d.x,y:d.y,z:d.z,marker:d.marker,histnorm:d.histnorm,histfunc:d.histfunc,nbinsx:d.nbinsx,xbins:d.xbins,nbinsy:d.nbinsy,ybins:d.ybins,autobinx:d.autobinx,autobiny:d.autobiny,bingroup:d.bingroup,xbingroup:d.xbingroup,ybingroup:d.ybingroup,autocontour:x.autocontour,ncontours:x.ncontours,contours:x.contours,line:{color:x.line.color,width:e({},x.line.width,{dflt:.5}),dash:x.line.dash,smoothing:x.line.smoothing,editType:"plot"},xhoverformat:E("x"),yhoverformat:E("y"),zhoverformat:E("z",1),hovertemplate:d.hovertemplate,hovertemplatefallback:d.hovertemplatefallback,texttemplate:x.texttemplate,texttemplatefallback:x.texttemplatefallback,textfont:x.textfont},S("",{cLetter:"z",editTypeOverride:"calc"}))}}),s3=He({"src/traces/contour/contours_defaults.js"(Z,V){"use strict";V.exports=function(x,S,E,e){var t=e("contours.start"),r=e("contours.end"),o=t===!1||r===!1,a=E("contours.size"),n;o?n=S.autocontour=!0:n=E("autocontour",!1),(n||!a)&&E("ncontours")}}}),pS=He({"src/traces/contour/label_defaults.js"(Z,V){"use strict";var d=sa();V.exports=function(S,E,e,t){t||(t={});var r=S("contours.showlabels");if(r){var o=E.font;d.coerceFont(S,"contours.labelfont",o,{overrideDflt:{color:e}}),S("contours.labelformat")}t.hasHover!==!1&&S("zhoverformat")}}}),l3=He({"src/traces/contour/style_defaults.js"(Z,V){"use strict";var d=_h(),x=pS();V.exports=function(E,e,t,r,o){var a=t("contours.coloring"),n,i="";a==="fill"&&(n=t("contours.showlines")),n!==!1&&(a!=="lines"&&(i=t("line.color","#000")),t("line.width",.5),t("line.dash")),a!=="none"&&(E.showlegend!==!0&&(e.showlegend=!1),e._dfltShowLegend=!1,d(E,e,r,t,{prefix:"",cLetter:"z"})),t("line.smoothing"),x(t,r,i,o)}}}),dF=He({"src/traces/histogram2dcontour/defaults.js"(Z,V){"use strict";var d=sa(),x=fS(),S=s3(),E=l3(),e=q_(),t=hS();V.exports=function(o,a,n,i){function s(f,v){return d.coerce(o,a,t,f,v)}function h(f){return d.coerce2(o,a,t,f)}x(o,a,s,i),a.visible!==!1&&(S(o,a,s,h),E(o,a,s,i),s("xhoverformat"),s("yhoverformat"),s("hovertemplate"),s("hovertemplatefallback"),a.contours&&a.contours.coloring==="heatmap"&&e(s,i))}}}),dS=He({"src/traces/contour/set_contours.js"(Z,V){"use strict";var d=Ho(),x=sa();V.exports=function(e,t){var r=e.contours;if(e.autocontour){var o=e.zmin,a=e.zmax;(e.zauto||o===void 0)&&(o=x.aggNums(Math.min,null,t)),(e.zauto||a===void 0)&&(a=x.aggNums(Math.max,null,t));var n=S(o,a,e.ncontours);r.size=n.dtick,r.start=d.tickFirst(n),n.range.reverse(),r.end=d.tickFirst(n),r.start===o&&(r.start+=r.size),r.end===a&&(r.end-=r.size),r.start>r.end&&(r.start=r.end=(r.start+r.end)/2),e._input.contours||(e._input.contours={}),x.extendFlat(e._input.contours,{start:r.start,end:r.end,size:r.size}),e._input.autocontour=!0}else if(r.type!=="constraint"){var i=r.start,s=r.end,h=e._input.contours;if(i>s&&(r.start=h.start=s,s=r.end=h.end=i,i=r.start),!(r.size>0)){var f;i===s?f=1:f=S(i,s,e.ncontours).dtick,h.size=r.size=f}}};function S(E,e,t){var r={type:"linear",range:[E,e]};return d.autoTicks(r,(e-E)/(t||15)),r}}}),G_=He({"src/traces/contour/end_plus.js"(Z,V){"use strict";V.exports=function(x){return x.end+x.size/1e6}}}),vS=He({"src/traces/contour/calc.js"(Z,V){"use strict";var d=rc(),x=$2(),S=dS(),E=G_();V.exports=function(t,r){var o=x(t,r),a=o[0].z;S(r,a);var n=r.contours,i=d.extractOpts(r),s;if(n.coloring==="heatmap"&&i.auto&&r.autocontour===!1){var h=n.start,f=E(n),v=n.size||1,c=Math.floor((f-h)/v)+1;isFinite(v)||(v=1,c=1);var T=h-v/2,l=T+c*v;s=[T,l]}else s=a;return d.calc(t,r,{vals:s,cLetter:"z"}),o}}}),H_=He({"src/traces/contour/constants.js"(Z,V){"use strict";V.exports={BOTTOMSTART:[1,9,13,104,713],TOPSTART:[4,6,7,104,713],LEFTSTART:[8,12,14,208,1114],RIGHTSTART:[2,3,11,208,1114],NEWDELTA:[null,[-1,0],[0,-1],[-1,0],[1,0],null,[0,-1],[-1,0],[0,1],[0,1],null,[0,1],[1,0],[1,0],[0,-1]],CHOOSESADDLE:{104:[4,1],208:[2,8],713:[7,13],1114:[11,14]},SADDLEREMAINDER:{1:4,2:8,4:1,7:13,8:2,11:14,13:7,14:11},LABELDISTANCE:2,LABELINCREASE:10,LABELMIN:3,LABELMAX:10,LABELOPTIMIZER:{EDGECOST:1,ANGLECOST:1,NEIGHBORCOST:5,SAMELEVELFACTOR:10,SAMELEVELDISTANCE:5,MAXCOST:100,INITIALSEARCHPOINTS:10,ITERATIONS:5}}}}),mS=He({"src/traces/contour/make_crossings.js"(Z,V){"use strict";var d=H_();V.exports=function(E){var e=E[0].z,t=e.length,r=e[0].length,o=t===2||r===2,a,n,i,s,h,f,v,c,T;for(n=0;nS?0:1)+(E[0][1]>S?0:2)+(E[1][1]>S?0:4)+(E[1][0]>S?0:8);if(e===5||e===10){var t=(E[0][0]+E[0][1]+E[1][0]+E[1][1])/4;return S>t?e===5?713:1114:e===5?104:208}return e===15?0:e}}}),gS=He({"src/traces/contour/find_all_paths.js"(Z,V){"use strict";var d=sa(),x=H_();V.exports=function(a,n,i){var s,h,f,v,c;for(n=n||.01,i=i||.01,f=0;f20?(f=x.CHOOSESADDLE[f][(v[0]||v[1])<0?0:1],o.crossings[h]=x.SADDLEREMAINDER[f]):delete o.crossings[h],v=x.NEWDELTA[f],!v){d.log("Found bad marching index:",f,a,o.level);break}c.push(r(o,a,v)),a[0]+=v[0],a[1]+=v[1],h=a.join(","),S(c[c.length-1],c[c.length-2],i,s)&&c.pop();var M=v[0]&&(a[0]<0||a[0]>l-2)||v[1]&&(a[1]<0||a[1]>T-2),g=a[0]===_[0]&&a[1]===_[1]&&v[0]===w[0]&&v[1]===w[1];if(g||n&&M)break;f=o.crossings[h]}A===1e4&&d.log("Infinite loop in contour?");var b=S(c[0],c[c.length-1],i,s),p=0,u=.2*o.smoothing,y=[],m=0,R,L,z,F,N,O,P,U,B,X,$;for(A=1;A=m;A--)if(R=y[A],R=m&&R+y[L]U&&B--,o.edgepaths[B]=$.concat(c,X));break}G||(o.edgepaths[U]=c.concat(X))}for(U=0;U20&&a?o===208||o===1114?i=n[0]===0?1:-1:s=n[1]===0?1:-1:x.BOTTOMSTART.indexOf(o)!==-1?s=1:x.LEFTSTART.indexOf(o)!==-1?i=1:x.TOPSTART.indexOf(o)!==-1?s=-1:i=-1,[i,s]}function r(o,a,n){var i=a[0]+Math.max(n[0],0),s=a[1]+Math.max(n[1],0),h=o.z[s][i],f=o.xaxis,v=o.yaxis;if(n[1]){var c=(o.level-h)/(o.z[s][i+1]-h),T=(c!==1?(1-c)*f.c2l(o.x[i]):0)+(c!==0?c*f.c2l(o.x[i+1]):0);return[f.c2p(f.l2c(T),!0),v.c2p(o.y[s],!0),i+c,s]}else{var l=(o.level-h)/(o.z[s+1][i]-h),_=(l!==1?(1-l)*v.c2l(o.y[s]):0)+(l!==0?l*v.c2l(o.y[s+1]):0);return[f.c2p(o.x[i],!0),v.c2p(v.l2c(_),!0),i,s+l]}}}}),vF=He({"src/traces/contour/constraint_mapping.js"(Z,V){"use strict";var d=o3(),x=as();V.exports={"[]":E("[]"),"][":E("]["),">":e(">"),"<":e("<"),"=":e("=")};function S(t,r){var o=Array.isArray(r),a;function n(i){return x(i)?+i:null}return d.COMPARISON_OPS2.indexOf(t)!==-1?a=n(o?r[0]:r):d.INTERVAL_OPS.indexOf(t)!==-1?a=o?[n(r[0]),n(r[1])]:[n(r),n(r)]:d.SET_OPS.indexOf(t)!==-1&&(a=o?r.map(n):[n(r)]),a}function E(t){return function(r){r=S(t,r);var o=Math.min(r[0],r[1]),a=Math.max(r[0],r[1]);return{start:o,end:a,size:a-o}}}function e(t){return function(r){return r=S(t,r),{start:r,end:1/0,size:1/0}}}}}),yS=He({"src/traces/contour/empty_pathinfo.js"(Z,V){"use strict";var d=sa(),x=vF(),S=G_();V.exports=function(e,t,r){for(var o=e.type==="constraint"?x[e._operation](e.value):e,a=o.size,n=[],i=S(o),s=r.trace._carpetTrace,h=s?{xaxis:s.aaxis,yaxis:s.baxis,x:r.a,y:r.b}:{xaxis:t.xaxis,yaxis:t.yaxis,x:r.x,y:r.y},f=o.start;f1e3){d.warn("Too many contours, clipping at 1000",e);break}return n}}}),_S=He({"src/traces/contour/convert_to_constraints.js"(Z,V){"use strict";var d=sa();V.exports=function(S,E){var e,t,r,o=function(i){return i.reverse()},a=function(i){return i};switch(E){case"=":case"<":return S;case">":for(S.length!==1&&d.warn("Contour data invalid for the specified inequality operation."),t=S[0],e=0;er.level||r.starts.length&&t===r.level)}break;case"constraint":if(S.prefixBoundary=!1,S.edgepaths.length)return;var o=S.x.length,a=S.y.length,n=-1/0,i=1/0;for(e=0;e":s>n&&(S.prefixBoundary=!0);break;case"<":(sn||S.starts.length&&f===i)&&(S.prefixBoundary=!0);break;case"][":h=Math.min(s[0],s[1]),f=Math.max(s[0],s[1]),hn&&(S.prefixBoundary=!0);break}break}}}}),u3=He({"src/traces/contour/plot.js"(Z){"use strict";var V=Wn(),d=sa(),x=es(),S=rc(),E=ou(),e=Ho(),t=wv(),r=e3(),o=mS(),a=gS(),n=yS(),i=_S(),s=xS(),h=H_(),f=h.LABELOPTIMIZER;Z.plot=function(g,b,p,u){var y=b.xaxis,m=b.yaxis;d.makeTraceGroups(u,p,"contour").each(function(R){var L=V.select(this),z=R[0],F=z.trace,N=z.x,O=z.y,P=F.contours,U=n(P,b,z),B=d.ensureSingle(L,"g","heatmapcoloring"),X=[];P.coloring==="heatmap"&&(X=[R]),r(g,b,X,B),o(U),a(U);var $=y.c2p(N[0],!0),le=y.c2p(N[N.length-1],!0),ce=m.c2p(O[0],!0),de=m.c2p(O[O.length-1],!0),G=[[$,de],[le,de],[le,ce],[$,ce]],Y=U;P.type==="constraint"&&(Y=i(U,P._operation)),v(L,G,P),c(L,Y,G,P),l(L,U,g,z,P),w(L,b,g,z,G)})};function v(M,g,b){var p=d.ensureSingle(M,"g","contourbg"),u=p.selectAll("path").data(b.coloring==="fill"?[0]:[]);u.enter().append("path"),u.exit().remove(),u.attr("d","M"+g.join("L")+"Z").style("stroke","none")}function c(M,g,b,p){var u=p.coloring==="fill"||p.type==="constraint"&&p._operation!=="=",y="M"+b.join("L")+"Z";u&&s(g,p);var m=d.ensureSingle(M,"g","contourfill"),R=m.selectAll("path").data(u?g:[]);R.enter().append("path"),R.exit().remove(),R.each(function(L){var z=(L.prefixBoundary?y:"")+T(L,b);z?V.select(this).attr("d",z).style("stroke","none"):V.select(this).remove()})}function T(M,g){var b="",p=0,u=M.edgepaths.map(function($,le){return le}),y=!0,m,R,L,z,F,N;function O($){return Math.abs($[1]-g[0][1])<.01}function P($){return Math.abs($[1]-g[2][1])<.01}function U($){return Math.abs($[0]-g[0][0])<.01}function B($){return Math.abs($[0]-g[2][0])<.01}for(;u.length;){for(N=x.smoothopen(M.edgepaths[p],M.smoothing),b+=y?N:N.replace(/^M/,"L"),u.splice(u.indexOf(p),1),m=M.edgepaths[p][M.edgepaths[p].length-1],z=-1,L=0;L<4;L++){if(!m){d.log("Missing end?",p,M);break}for(O(m)&&!B(m)?R=g[1]:U(m)?R=g[0]:P(m)?R=g[3]:B(m)&&(R=g[2]),F=0;F=0&&(R=X,z=F):Math.abs(m[1]-R[1])<.01?Math.abs(m[1]-X[1])<.01&&(X[0]-m[0])*(R[0]-X[0])>=0&&(R=X,z=F):d.log("endpt to newendpt is not vert. or horz.",m,R,X)}if(m=R,z>=0)break;b+="L"+R}if(z===M.edgepaths.length){d.log("unclosed perimeter path");break}p=z,y=u.indexOf(p)===-1,y&&(p=u[0],b+="Z")}for(p=0;pf.MAXCOST*2)break;O&&(R/=2),m=z-R/2,L=m+R*1.5}if(N<=f.MAXCOST)return F};function _(M,g,b,p){var u=g.width/2,y=g.height/2,m=M.x,R=M.y,L=M.theta,z=Math.cos(L)*u,F=Math.sin(L)*u,N=(m>p.center?p.right-m:m-p.left)/(z+Math.abs(Math.sin(L)*y)),O=(R>p.middle?p.bottom-R:R-p.top)/(Math.abs(F)+Math.cos(L)*y);if(N<1||O<1)return 1/0;var P=f.EDGECOST*(1/(N-1)+1/(O-1));P+=f.ANGLECOST*L*L;for(var U=m-z,B=R-F,X=m+z,$=R+F,le=0;le=w)&&(r<=_&&(r=_),o>=w&&(o=w),n=Math.floor((o-r)/a)+1,i=0),l=0;l_&&(v.unshift(_),c.unshift(c[0])),v[v.length-1]2?s.value=s.value.slice(2):s.length===0?s.value=[0,1]:s.length<2?(h=parseFloat(s.value[0]),s.value=[h,h+1]):s.value=[parseFloat(s.value[0]),parseFloat(s.value[1])]:d(s.value)&&(h=parseFloat(s.value),s.value=[h,h+1])):(i("contours.value",0),d(s.value)||(r(s.value)?s.value=parseFloat(s.value[0]):s.value=0))}}}),yF=He({"src/traces/contour/defaults.js"(Z,V){"use strict";var d=sa(),x=X2(),S=Qd(),E=TS(),e=s3(),t=l3(),r=q_(),o=V_();V.exports=function(n,i,s,h){function f(l,_){return d.coerce(n,i,o,l,_)}function v(l){return d.coerce2(n,i,o,l)}var c=x(n,i,f,h);if(!c){i.visible=!1;return}S(n,i,h,f),f("xhoverformat"),f("yhoverformat"),f("text"),f("hovertext"),f("hoverongaps"),f("hovertemplate"),f("hovertemplatefallback");var T=f("contours.type")==="constraint";f("connectgaps",d.isArray1D(i.z)),T?E(n,i,f,h,s):(e(n,i,f,v),t(n,i,f,h)),i.contours&&i.contours.coloring==="heatmap"&&r(f,h),f("zorder")}}}),_F=He({"src/traces/contour/index.js"(Z,V){"use strict";V.exports={attributes:V_(),supplyDefaults:yF(),calc:vS(),plot:u3().plot,style:c3(),colorbar:f3(),hoverPoints:wS(),moduleType:"trace",name:"contour",basePlotModule:Kf(),categories:["cartesian","svg","2dMap","contour","showLegend"],meta:{}}}}),xF=He({"lib/contour.js"(Z,V){"use strict";V.exports=_F()}}),AS=He({"src/traces/scatterternary/attributes.js"(Z,V){"use strict";var{hovertemplateAttrs:d,texttemplateAttrs:x,templatefallbackAttrs:S}=Jl(),E=$d(),e=af(),t=ru(),r=ku(),o=Gh().dash,a=Qo().extendFlat,n=e.marker,i=e.line,s=n.line;V.exports={a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},c:{valType:"data_array",editType:"calc"},sum:{valType:"number",dflt:0,min:0,editType:"calc"},mode:a({},e.mode,{dflt:"markers"}),text:a({},e.text,{}),texttemplate:x({editType:"plot"},{keys:["a","b","c","text"]}),texttemplatefallback:S({editType:"plot"}),hovertext:a({},e.hovertext,{}),line:{color:i.color,width:i.width,dash:o,backoff:i.backoff,shape:a({},i.shape,{values:["linear","spline"]}),smoothing:i.smoothing,editType:"calc"},connectgaps:e.connectgaps,cliponaxis:e.cliponaxis,fill:a({},e.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:E(),marker:a({symbol:n.symbol,opacity:n.opacity,angle:n.angle,angleref:n.angleref,standoff:n.standoff,maxdisplayed:n.maxdisplayed,size:n.size,sizeref:n.sizeref,sizemin:n.sizemin,sizemode:n.sizemode,line:a({width:s.width,dash:s.dash,editType:"calc"},r("marker.line")),gradient:n.gradient,editType:"calc"},r("marker")),textfont:e.textfont,textposition:e.textposition,selected:e.selected,unselected:e.unselected,hoverinfo:a({},t.hoverinfo,{flags:["a","b","c","text","name"]}),hoveron:e.hoveron,hovertemplate:d(),hovertemplatefallback:S()}}}),bF=He({"src/traces/scatterternary/defaults.js"(Z,V){"use strict";var d=sa(),x=Tv(),S=Fu(),E=md(),e=Dd(),t=o1(),r=zd(),o=ev(),a=AS();V.exports=function(i,s,h,f){function v(M,g){return d.coerce(i,s,a,M,g)}var c=v("a"),T=v("b"),l=v("c"),_;if(c?(_=c.length,T?(_=Math.min(_,T.length),l&&(_=Math.min(_,l.length))):l?_=Math.min(_,l.length):_=0):T&&l&&(_=Math.min(T.length,l.length)),!_){s.visible=!1;return}s._length=_,v("sum"),v("text"),v("hovertext"),s.hoveron!=="fills"&&(v("hovertemplate"),v("hovertemplatefallback"));var w=_"),o.hovertemplate=f.hovertemplate,r}}}),MF=He({"src/traces/scatterternary/event_data.js"(Z,V){"use strict";V.exports=function(x,S,E,e,t){if(S.xa&&(x.xaxis=S.xa),S.ya&&(x.yaxis=S.ya),e[t]){var r=e[t];x.a=r.a,x.b=r.b,x.c=r.c}else x.a=S.a,x.b=S.b,x.c=S.c;return x}}}),EF=He({"src/plots/ternary/ternary.js"(Z,V){"use strict";var d=Wn(),x=Ch(),S=lo(),E=sa(),e=E.strTranslate,t=E._,r=Jn(),o=es(),a=wv(),n=Qo().extendFlat,i=bc(),s=Ho(),h=Ap(),f=rf(),v=Jd(),c=v.freeMode,T=v.rectMode,l=K0(),_=Af().prepSelect,w=Af().selectOnClick,A=Af().clearOutline,M=Af().clearSelectionsCache,g=lh();function b(P,U){this.id=P.id,this.graphDiv=P.graphDiv,this.init(U),this.makeFramework(U),this.updateFx(U),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}V.exports=b;var p=b.prototype;p.init=function(P){this.container=P._ternarylayer,this.defs=P._defs,this.layoutId=P._uid,this.traceHash={},this.layers={}},p.plot=function(P,U){var B=this,X=U[B.id],$=U._size;B._hasClipOnAxisFalse=!1;for(var le=0;leu*Y?(pe=Y,re=pe*u):(re=G,pe=re/u),we=ce*re/G,Se=de*pe/Y,j=U.l+U.w*$-re/2,Q=U.t+U.h*(1-le)-pe/2,B.x0=j,B.y0=Q,B.w=re,B.h=pe,B.sum=ee,B.xaxis={type:"linear",range:[q+2*ae-ee,ee-q-2*se],domain:[$-we/2,$+we/2],_id:"x"},a(B.xaxis,B.graphDiv._fullLayout),B.xaxis.setScale(),B.xaxis.isPtWithinRange=function(Ce){return Ce.a>=B.aaxis.range[0]&&Ce.a<=B.aaxis.range[1]&&Ce.b>=B.baxis.range[1]&&Ce.b<=B.baxis.range[0]&&Ce.c>=B.caxis.range[1]&&Ce.c<=B.caxis.range[0]},B.yaxis={type:"linear",range:[q,ee-se-ae],domain:[le-Se/2,le+Se/2],_id:"y"},a(B.yaxis,B.graphDiv._fullLayout),B.yaxis.setScale(),B.yaxis.isPtWithinRange=function(){return!0};var Ie=B.yaxis.domain[0],Re=B.aaxis=n({},P.aaxis,{range:[q,ee-se-ae],side:"left",tickangle:(+P.aaxis.tickangle||0)-30,domain:[Ie,Ie+Se*u],anchor:"free",position:0,_id:"y",_length:re});a(Re,B.graphDiv._fullLayout),Re.setScale();var We=B.baxis=n({},P.baxis,{range:[ee-q-ae,se],side:"bottom",domain:B.xaxis.domain,anchor:"free",position:0,_id:"x",_length:re});a(We,B.graphDiv._fullLayout),We.setScale();var at=B.caxis=n({},P.caxis,{range:[ee-q-se,ae],side:"right",tickangle:(+P.caxis.tickangle||0)+30,domain:[Ie,Ie+Se*u],anchor:"free",position:0,_id:"y",_length:re});a(at,B.graphDiv._fullLayout),at.setScale();var nt="M"+j+","+(Q+pe)+"h"+re+"l-"+re/2+",-"+pe+"Z";B.clipDef.select("path").attr("d",nt),B.layers.plotbg.select("path").attr("d",nt);var tt="M0,"+pe+"h"+re+"l-"+re/2+",-"+pe+"Z";B.clipDefRelative.select("path").attr("d",tt);var qe=e(j,Q);B.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",qe),B.clipDefRelative.select("path").attr("transform",null);var he=e(j-We._offset,Q+pe);B.layers.baxis.attr("transform",he),B.layers.bgrid.attr("transform",he);var ue=e(j+re/2,Q)+"rotate(30)"+e(0,-Re._offset);B.layers.aaxis.attr("transform",ue),B.layers.agrid.attr("transform",ue);var ne=e(j+re/2,Q)+"rotate(-30)"+e(0,-at._offset);B.layers.caxis.attr("transform",ne),B.layers.cgrid.attr("transform",ne),B.drawAxes(!0),B.layers.aline.select("path").attr("d",Re.showline?"M"+j+","+(Q+pe)+"l"+re/2+",-"+pe:"M0,0").call(r.stroke,Re.linecolor||"#000").style("stroke-width",(Re.linewidth||0)+"px"),B.layers.bline.select("path").attr("d",We.showline?"M"+j+","+(Q+pe)+"h"+re:"M0,0").call(r.stroke,We.linecolor||"#000").style("stroke-width",(We.linewidth||0)+"px"),B.layers.cline.select("path").attr("d",at.showline?"M"+(j+re/2)+","+Q+"l"+re/2+","+pe:"M0,0").call(r.stroke,at.linecolor||"#000").style("stroke-width",(at.linewidth||0)+"px"),B.graphDiv._context.staticPlot||B.initInteractions(),o.setClipUrl(B.layers.frontplot,B._hasClipOnAxisFalse?null:B.clipId,B.graphDiv)},p.drawAxes=function(P){var U=this,B=U.graphDiv,X=U.id.slice(7)+"title",$=U.layers,le=U.aaxis,ce=U.baxis,de=U.caxis;if(U.drawAx(le),U.drawAx(ce),U.drawAx(de),P){var G=Math.max(le.showticklabels?le.tickfont.size/2:0,(de.showticklabels?de.tickfont.size*.75:0)+(de.ticks==="outside"?de.ticklen*.87:0)),Y=(ce.showticklabels?ce.tickfont.size:0)+(ce.ticks==="outside"?ce.ticklen:0)+3;$["a-title"]=l.draw(B,"a"+X,{propContainer:le,propName:U.id+".aaxis.title.text",placeholder:t(B,"Click to enter Component A title"),attributes:{x:U.x0+U.w/2,y:U.y0-le.title.font.size/3-G,"text-anchor":"middle"}}),$["b-title"]=l.draw(B,"b"+X,{propContainer:ce,propName:U.id+".baxis.title.text",placeholder:t(B,"Click to enter Component B title"),attributes:{x:U.x0-Y,y:U.y0+U.h+ce.title.font.size*.83+Y,"text-anchor":"middle"}}),$["c-title"]=l.draw(B,"c"+X,{propContainer:de,propName:U.id+".caxis.title.text",placeholder:t(B,"Click to enter Component C title"),attributes:{x:U.x0+U.w+Y,y:U.y0+U.h+de.title.font.size*.83+Y,"text-anchor":"middle"}})}},p.drawAx=function(P){var U=this,B=U.graphDiv,X=P._name,$=X.charAt(0),le=P._id,ce=U.layers[X],de=30,G=$+"tickLayout",Y=y(P);U[G]!==Y&&(ce.selectAll("."+le+"tick").remove(),U[G]=Y),P.setScale();var ee=s.calcTicks(P),q=s.clipEnds(P,ee),se=s.makeTransTickFn(P),ae=s.getTickSigns(P)[2],j=E.deg2rad(de),Q=ae*(P.linewidth||1)/2,re=ae*P.ticklen,pe=U.w,we=U.h,Se=$==="b"?"M0,"+Q+"l"+Math.sin(j)*re+","+Math.cos(j)*re:"M"+Q+",0l"+Math.cos(j)*re+","+-Math.sin(j)*re,Ie={a:"M0,0l"+we+",-"+pe/2,b:"M0,0l-"+pe/2+",-"+we,c:"M0,0l-"+we+","+pe/2}[$];s.drawTicks(B,P,{vals:P.ticks==="inside"?q:ee,layer:ce,path:Se,transFn:se,crisp:!1}),s.drawGrid(B,P,{vals:q,layer:U.layers[$+"grid"],path:Ie,transFn:se,crisp:!1}),s.drawLabels(B,P,{vals:ee,layer:ce,transFn:se,labelFns:s.makeLabelFns(P,0,de)})};function y(P){return P.ticks+String(P.ticklen)+String(P.showticklabels)}var m=g.MINZOOM/2+.87,R="m-0.87,.5h"+m+"v3h-"+(m+5.2)+"l"+(m/2+2.6)+",-"+(m*.87+4.5)+"l2.6,1.5l-"+m/2+","+m*.87+"Z",L="m0.87,.5h-"+m+"v3h"+(m+5.2)+"l-"+(m/2+2.6)+",-"+(m*.87+4.5)+"l-2.6,1.5l"+m/2+","+m*.87+"Z",z="m0,1l"+m/2+","+m*.87+"l2.6,-1.5l-"+(m/2+2.6)+",-"+(m*.87+4.5)+"l-"+(m/2+2.6)+","+(m*.87+4.5)+"l2.6,1.5l"+m/2+",-"+m*.87+"Z",F="m0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2Z",N=!0;p.clearOutline=function(){M(this.dragOptions),A(this.dragOptions.gd)},p.initInteractions=function(){var P=this,U=P.layers.plotbg.select("path").node(),B=P.graphDiv,X=B._fullLayout._zoomlayer,$,le;this.dragOptions={element:U,gd:B,plotinfo:{id:P.id,domain:B._fullLayout[P.id].domain,xaxis:P.xaxis,yaxis:P.yaxis},subplot:P.id,prepFn:function(he,ue,ne){P.dragOptions.xaxes=[P.xaxis],P.dragOptions.yaxes=[P.yaxis],$=B._fullLayout._invScaleX,le=B._fullLayout._invScaleY;var Ce=P.dragOptions.dragmode=B._fullLayout.dragmode;c(Ce)?P.dragOptions.minDrag=1:P.dragOptions.minDrag=void 0,Ce==="zoom"?(P.dragOptions.moveFn=We,P.dragOptions.clickFn=pe,P.dragOptions.doneFn=at,we(he,ue,ne)):Ce==="pan"?(P.dragOptions.moveFn=tt,P.dragOptions.clickFn=pe,P.dragOptions.doneFn=qe,nt(),P.clearOutline(B)):(T(Ce)||c(Ce))&&_(he,ue,ne,P.dragOptions,Ce)}};var ce,de,G,Y,ee,q,se,ae,j,Q;function re(he){var ue={};return ue[P.id+".aaxis.min"]=he.a,ue[P.id+".baxis.min"]=he.b,ue[P.id+".caxis.min"]=he.c,ue}function pe(he,ue){var ne=B._fullLayout.clickmode;O(B),he===2&&(B.emit("plotly_doubleclick",null),S.call("_guiRelayout",B,re({a:0,b:0,c:0}))),ne.indexOf("select")>-1&&he===1&&w(ue,B,[P.xaxis],[P.yaxis],P.id,P.dragOptions),ne.indexOf("event")>-1&&f.click(B,ue,P.id)}function we(he,ue,ne){var Ce=U.getBoundingClientRect();ce=ue-Ce.left,de=ne-Ce.top,B._fullLayout._calcInverseTransform(B);var Ye=B._fullLayout._invTransform,rt=E.apply3DTransform(Ye)(ce,de);ce=rt[0],de=rt[1],G={a:P.aaxis.range[0],b:P.baxis.range[1],c:P.caxis.range[1]},ee=G,Y=P.aaxis.range[1]-G.a,q=x(P.graphDiv._fullLayout[P.id].bgcolor).getLuminance(),se="M0,"+P.h+"L"+P.w/2+", 0L"+P.w+","+P.h+"Z",ae=!1,j=X.append("path").attr("class","zoombox").attr("transform",e(P.x0,P.y0)).style({fill:q>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",se),Q=X.append("path").attr("class","zoombox-corners").attr("transform",e(P.x0,P.y0)).style({fill:r.background,stroke:r.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),P.clearOutline(B)}function Se(he,ue){return 1-ue/P.h}function Ie(he,ue){return 1-(he+(P.h-ue)/Math.sqrt(3))/P.w}function Re(he,ue){return(he-(P.h-ue)/Math.sqrt(3))/P.w}function We(he,ue){var ne=ce+he*$,Ce=de+ue*le,Ye=Math.max(0,Math.min(1,Se(ce,de),Se(ne,Ce))),rt=Math.max(0,Math.min(1,Ie(ce,de),Ie(ne,Ce))),Ke=Math.max(0,Math.min(1,Re(ce,de),Re(ne,Ce))),Mt=(Ye/2+Ke)*P.w,kt=(1-Ye/2-rt)*P.w,Nt=(Mt+kt)/2,Gt=kt-Mt,Mr=(1-Ye)*P.h,mr=Mr-Gt/u;Gt.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),Q.transition().style("opacity",1).duration(200),ae=!0),B.emit("plotly_relayouting",re(ee))}function at(){O(B),ee!==G&&(S.call("_guiRelayout",B,re(ee)),N&&B.data&&B._context.showTips&&(E.notifier(t(B,"Double-click to zoom back out"),"long",B),N=!1))}function nt(){G={a:P.aaxis.range[0],b:P.baxis.range[1],c:P.caxis.range[1]},ee=G}function tt(he,ue){var ne=he/P.xaxis._m,Ce=ue/P.yaxis._m;ee={a:G.a-Ce,b:G.b+(ne+Ce)/2,c:G.c-(ne-Ce)/2};var Ye=[ee.a,ee.b,ee.c].sort(E.sorterAsc),rt={a:Ye.indexOf(ee.a),b:Ye.indexOf(ee.b),c:Ye.indexOf(ee.c)};Ye[0]<0&&(Ye[1]+Ye[0]/2<0?(Ye[2]+=Ye[0]+Ye[1],Ye[0]=Ye[1]=0):(Ye[2]+=Ye[0]/2,Ye[1]+=Ye[0]/2,Ye[0]=0),ee={a:Ye[rt.a],b:Ye[rt.b],c:Ye[rt.c]},ue=(G.a-ee.a)*P.yaxis._m,he=(G.c-ee.c-G.b+ee.b)*P.xaxis._m);var Ke=e(P.x0+he,P.y0+ue);P.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",Ke);var Mt=e(-he,-ue);P.clipDefRelative.select("path").attr("transform",Mt),P.aaxis.range=[ee.a,P.sum-ee.b-ee.c],P.baxis.range=[P.sum-ee.a-ee.c,ee.b],P.caxis.range=[P.sum-ee.a-ee.b,ee.c],P.drawAxes(!1),P._hasClipOnAxisFalse&&P.plotContainer.select(".scatterlayer").selectAll(".trace").call(o.hideOutsideRangePoints,P),B.emit("plotly_relayouting",re(ee))}function qe(){S.call("_guiRelayout",B,re(ee))}U.onmousemove=function(he){f.hover(B,he,P.id),B._fullLayout._lasthover=U,B._fullLayout._hoversubplot=P.id},U.onmouseout=function(he){B._dragging||h.unhover(B,he)},h.init(this.dragOptions)};function O(P){d.select(P).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}}}),SS=He({"src/plots/ternary/layout_attributes.js"(Z,V){"use strict";var d=sh(),x=wc().attributes,S=Wh(),E=pc().overrideAll,e=Qo().extendFlat,t={title:{text:S.title.text,font:S.title.font},color:S.color,tickmode:S.minor.tickmode,nticks:e({},S.nticks,{dflt:6,min:1}),tick0:S.tick0,dtick:S.dtick,tickvals:S.tickvals,ticktext:S.ticktext,ticks:S.ticks,ticklen:S.ticklen,tickwidth:S.tickwidth,tickcolor:S.tickcolor,ticklabelstep:S.ticklabelstep,showticklabels:S.showticklabels,labelalias:S.labelalias,showtickprefix:S.showtickprefix,tickprefix:S.tickprefix,showticksuffix:S.showticksuffix,ticksuffix:S.ticksuffix,showexponent:S.showexponent,exponentformat:S.exponentformat,minexponent:S.minexponent,separatethousands:S.separatethousands,tickfont:S.tickfont,tickangle:S.tickangle,tickformat:S.tickformat,tickformatstops:S.tickformatstops,hoverformat:S.hoverformat,showline:e({},S.showline,{dflt:!0}),linecolor:S.linecolor,linewidth:S.linewidth,showgrid:e({},S.showgrid,{dflt:!0}),gridcolor:S.gridcolor,gridwidth:S.gridwidth,griddash:S.griddash,layer:S.layer,min:{valType:"number",dflt:0,min:0}},r=V.exports=E({domain:x({name:"ternary"}),bgcolor:{valType:"color",dflt:d.background},sum:{valType:"number",dflt:1,min:0},aaxis:t,baxis:t,caxis:t},"plot","from-root");r.uirevision={valType:"any",editType:"none"},r.aaxis.uirevision=r.baxis.uirevision=r.caxis.uirevision={valType:"any",editType:"none"}}}),o0=He({"src/plots/subplot_defaults.js"(Z,V){"use strict";var d=sa(),x=zl(),S=wc().defaults;V.exports=function(e,t,r,o){var a=o.type,n=o.attributes,i=o.handleDefaults,s=o.partition||"x",h=t._subplots[a],f=h.length,v=f&&h[0].replace(/\d+$/,""),c,T;function l(M,g){return d.coerce(c,T,n,M,g)}for(var _=0;_=_&&(b.min=0,p.min=0,u.min=0,f.aaxis&&delete f.aaxis.min,f.baxis&&delete f.baxis.min,f.caxis&&delete f.caxis.min)}function h(f,v,c,T){var l=n[v._name];function _(y,m){return S.coerce(f,v,l,y,m)}_("uirevision",T.uirevision),v.type="linear";var w=_("color"),A=w!==l.color.dflt?w:c.font.color,M=v._name,g=M.charAt(0).toUpperCase(),b="Component "+g,p=_("title.text",b);v._hovertitle=p===b?p:g,S.coerceFont(_,"title.font",c.font,{overrideDflt:{size:S.bigFont(c.font.size),color:A}}),_("min"),o(f,v,_,"linear"),t(f,v,_,"linear"),e(f,v,_,"linear",{noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0}),r(f,v,_,{outerTicks:!0});var u=_("showticklabels");u&&(S.coerceFont(_,"tickfont",c.font,{overrideDflt:{color:A}}),_("tickangle"),_("tickformat")),a(f,v,_,{dfltColor:w,bgColor:c.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:l}),_("hoverformat"),_("layer")}}}),CF=He({"src/plots/ternary/index.js"(Z){"use strict";var V=EF(),d=Hh().getSubplotCalcData,x=sa().counterRegex,S="ternary";Z.name=S;var E=Z.attr="subplot";Z.idRoot=S,Z.idRegex=Z.attrRegex=x(S);var e=Z.attributes={};e[E]={valType:"subplotid",dflt:"ternary",editType:"calc"},Z.layoutAttributes=SS(),Z.supplyLayoutDefaults=kF(),Z.plot=function(r){for(var o=r._fullLayout,a=r.calcdata,n=o._subplots[S],i=0;i0){var M=r.xa,g=r.ya,b,p,u,y,m;f.orientation==="h"?(m=o,b="y",u=g,p="x",y=M):(m=a,b="x",u=M,p="y",y=g);var R=h[r.index];if(m>=R.span[0]&&m<=R.span[1]){var L=x.extendFlat({},r),z=y.c2p(m,!0),F=e.getKdeValue(R,f,m),N=e.getPositionOnKdePath(R,f,z),O=u._offset,P=u._length;L[b+"0"]=N[0],L[b+"1"]=N[1],L[p+"0"]=L[p+"1"]=z,L[p+"Label"]=p+": "+S.hoverLabelText(y,m,f[p+"hoverformat"])+", "+h[0].t.labels.kde+" "+F.toFixed(3);for(var U=0,B=0;B path").each(function(c){if(!c.isBlank){var T=v.marker;d.select(this).call(S.fill,c.mc||T.color).call(S.stroke,c.mlc||T.line.color).call(x.dashLine,T.line.dash,c.mlw||T.line.width).style("opacity",v.selectedpoints&&!c.selected?E:1)}}),r(f,v,a),f.selectAll(".regions").each(function(){d.select(this).selectAll("path").style("stroke-width",0).call(S.fill,v.connector.fillcolor)}),f.selectAll(".lines").each(function(){var c=v.connector.line;x.lineGroupStyle(d.select(this).selectAll("path"),c.width,c.color,c.dash)})})}V.exports={style:o}}}),ZF=He({"src/traces/funnel/hover.js"(Z,V){"use strict";var d=Jn().opacity,x=f1().hoverOnBars,S=sa().formatPercent;V.exports=function(t,r,o,a,n){var i=x(t,r,o,a,n);if(i){var s=i.cd,h=s[0].trace,f=h.orientation==="h",v=i.index,c=s[v],T=f?"x":"y";i[T+"LabelVal"]=c.s,i.percentInitial=c.begR,i.percentInitialLabel=S(c.begR,1),i.percentPrevious=c.difR,i.percentPreviousLabel=S(c.difR,1),i.percentTotal=c.sumR,i.percentTotalLabel=S(c.sumR,1);var l=c.hi||h.hoverinfo,_=[];if(l&&l!=="none"&&l!=="skip"){var w=l==="all",A=l.split("+"),M=function(g){return w||A.indexOf(g)!==-1};M("percent initial")&&_.push(i.percentInitialLabel+" of initial"),M("percent previous")&&_.push(i.percentPreviousLabel+" of previous"),M("percent total")&&_.push(i.percentTotalLabel+" of total")}return i.extraText=_.join("
"),i.color=E(h,c),[i]}};function E(e,t){var r=e.marker,o=t.mc||r.color,a=t.mlc||r.line.color,n=t.mlw||r.line.width;if(d(o))return o;if(d(a)&&n)return a}}}),YF=He({"src/traces/funnel/event_data.js"(Z,V){"use strict";V.exports=function(x,S){return x.x="xVal"in S?S.xVal:S.x,x.y="yVal"in S?S.yVal:S.y,"percentInitial"in S&&(x.percentInitial=S.percentInitial),"percentPrevious"in S&&(x.percentPrevious=S.percentPrevious),"percentTotal"in S&&(x.percentTotal=S.percentTotal),S.xa&&(x.xaxis=S.xa),S.ya&&(x.yaxis=S.ya),x}}}),KF=He({"src/traces/funnel/index.js"(Z,V){"use strict";V.exports={attributes:kS(),layoutAttributes:CS(),supplyDefaults:LS().supplyDefaults,crossTraceDefaults:LS().crossTraceDefaults,supplyLayoutDefaults:qF(),calc:GF(),crossTraceCalc:HF(),plot:WF(),style:XF().style,hoverPoints:ZF(),eventData:YF(),selectPoints:h1(),moduleType:"trace",name:"funnel",basePlotModule:Kf(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}}}),JF=He({"lib/funnel.js"(Z,V){"use strict";V.exports=KF()}}),$F=He({"src/traces/waterfall/constants.js"(Z,V){"use strict";V.exports={eventDataKeys:["initial","delta","final"]}}}),PS=He({"src/traces/waterfall/attributes.js"(Z,V){"use strict";var d=Sv(),x=af().line,S=ru(),E=tf().axisHoverFormat,{hovertemplateAttrs:e,texttemplateAttrs:t,templatefallbackAttrs:r}=Jl(),o=$F(),a=Qo().extendFlat,n=Jn();function i(s){return{marker:{color:a({},d.marker.color,{arrayOk:!1,editType:"style"}),line:{color:a({},d.marker.line.color,{arrayOk:!1,editType:"style"}),width:a({},d.marker.line.width,{arrayOk:!1,editType:"style"}),editType:"style"},editType:"style"},editType:"style"}}V.exports={measure:{valType:"data_array",dflt:[],editType:"calc"},base:{valType:"number",dflt:null,arrayOk:!1,editType:"calc"},x:d.x,x0:d.x0,dx:d.dx,y:d.y,y0:d.y0,dy:d.dy,xperiod:d.xperiod,yperiod:d.yperiod,xperiod0:d.xperiod0,yperiod0:d.yperiod0,xperiodalignment:d.xperiodalignment,yperiodalignment:d.yperiodalignment,xhoverformat:E("x"),yhoverformat:E("y"),hovertext:d.hovertext,hovertemplate:e({},{keys:o.eventDataKeys}),hovertemplatefallback:r(),hoverinfo:a({},S.hoverinfo,{flags:["name","x","y","text","initial","delta","final"]}),textinfo:{valType:"flaglist",flags:["label","text","initial","delta","final"],extras:["none"],editType:"plot",arrayOk:!1},texttemplate:t({editType:"plot"},{keys:o.eventDataKeys.concat(["label"])}),texttemplatefallback:r({editType:"plot"}),text:d.text,textposition:d.textposition,insidetextanchor:d.insidetextanchor,textangle:d.textangle,textfont:d.textfont,insidetextfont:d.insidetextfont,outsidetextfont:d.outsidetextfont,constraintext:d.constraintext,cliponaxis:d.cliponaxis,orientation:d.orientation,offset:d.offset,width:d.width,increasing:i("increasing"),decreasing:i("decreasing"),totals:i("intermediate sums and total"),connector:{line:{color:a({},x.color,{dflt:n.defaultLine}),width:a({},x.width,{editType:"plot"}),dash:x.dash,editType:"plot"},mode:{valType:"enumerated",values:["spanning","between"],dflt:"between",editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:d.offsetgroup,alignmentgroup:d.alignmentgroup,zorder:d.zorder}}}),IS=He({"src/traces/waterfall/layout_attributes.js"(Z,V){"use strict";V.exports={waterfallmode:{valType:"enumerated",values:["group","overlay"],dflt:"group",editType:"calc"},waterfallgap:{valType:"number",min:0,max:1,editType:"calc"},waterfallgroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"}}}}),d1=He({"src/constants/delta.js"(Z,V){"use strict";V.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"\u25B2"},DECREASING:{COLOR:"#FF4136",SYMBOL:"\u25BC"}}}}),RS=He({"src/traces/waterfall/defaults.js"(Z,V){"use strict";var d=sa(),x=Q0(),S=gd().handleText,E=n1(),e=Qd(),t=PS(),r=Jn(),o=d1(),a=o.INCREASING.COLOR,n=o.DECREASING.COLOR,i="#4499FF";function s(v,c,T){v(c+".marker.color",T),v(c+".marker.line.color",r.defaultLine),v(c+".marker.line.width")}function h(v,c,T,l){function _(b,p){return d.coerce(v,c,t,b,p)}var w=E(v,c,l,_);if(!w){c.visible=!1;return}e(v,c,l,_),_("xhoverformat"),_("yhoverformat"),_("measure"),_("orientation",c.x&&!c.y?"h":"v"),_("base"),_("offset"),_("width"),_("text"),_("hovertext"),_("hovertemplate"),_("hovertemplatefallback");var A=_("textposition");S(v,c,l,_,A,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),c.textposition!=="none"&&(_("texttemplate"),_("texttemplatefallback"),c.texttemplate||_("textinfo")),s(_,"increasing",a),s(_,"decreasing",n),s(_,"totals",i);var M=_("connector.visible");if(M){_("connector.mode");var g=_("connector.line.width");g&&(_("connector.line.color"),_("connector.line.dash"))}_("zorder")}function f(v,c){var T,l;function _(A){return d.coerce(l._input,l,t,A)}if(c.waterfallmode==="group")for(var w=0;w0&&(_?m+="M"+u[0]+","+y[1]+"V"+y[0]:m+="M"+u[1]+","+y[0]+"H"+u[0]),w!=="between"&&(g.isSum||b path").each(function(c){if(!c.isBlank){var T=v[c.dir].marker;d.select(this).call(S.fill,T.color).call(S.stroke,T.line.color).call(x.dashLine,T.line.dash,T.line.width).style("opacity",v.selectedpoints&&!c.selected?E:1)}}),r(f,v,a),f.selectAll(".lines").each(function(){var c=v.connector.line;x.lineGroupStyle(d.select(this).selectAll("path"),c.width,c.color,c.dash)})})}V.exports={style:o}}}),iO=He({"src/traces/waterfall/hover.js"(Z,V){"use strict";var d=Ho().hoverLabelText,x=Jn().opacity,S=f1().hoverOnBars,E=d1(),e={increasing:E.INCREASING.SYMBOL,decreasing:E.DECREASING.SYMBOL};V.exports=function(o,a,n,i,s){var h=S(o,a,n,i,s);if(!h)return;var f=h.cd,v=f[0].trace,c=v.orientation==="h",T=c?"x":"y",l=c?o.xa:o.ya;function _(R){return d(l,R,v[T+"hoverformat"])}var w=h.index,A=f[w],M=A.isSum?A.b+A.s:A.rawS;h.initial=A.b+A.s-M,h.delta=M,h.final=h.initial+h.delta;var g=_(Math.abs(h.delta));h.deltaLabel=M<0?"("+g+")":g,h.finalLabel=_(h.final),h.initialLabel=_(h.initial);var b=A.hi||v.hoverinfo,p=[];if(b&&b!=="none"&&b!=="skip"){var u=b==="all",y=b.split("+"),m=function(R){return u||y.indexOf(R)!==-1};A.isSum||(m("final")&&(c?!m("x"):!m("y"))&&p.push(h.finalLabel),m("delta")&&(M<0?p.push(h.deltaLabel+" "+e.decreasing):p.push(h.deltaLabel+" "+e.increasing)),m("initial")&&p.push("Initial: "+h.initialLabel))}return p.length&&(h.extraText=p.join("
")),h.color=t(v,A),[h]};function t(r,o){var a=r[o.dir].marker,n=a.color,i=a.line.color,s=a.line.width;if(x(n))return n;if(x(i)&&s)return i}}}),nO=He({"src/traces/waterfall/event_data.js"(Z,V){"use strict";V.exports=function(x,S){return x.x="xVal"in S?S.xVal:S.x,x.y="yVal"in S?S.yVal:S.y,"initial"in S&&(x.initial=S.initial),"delta"in S&&(x.delta=S.delta),"final"in S&&(x.final=S.final),S.xa&&(x.xaxis=S.xa),S.ya&&(x.yaxis=S.ya),x}}}),oO=He({"src/traces/waterfall/index.js"(Z,V){"use strict";V.exports={attributes:PS(),layoutAttributes:IS(),supplyDefaults:RS().supplyDefaults,crossTraceDefaults:RS().crossTraceDefaults,supplyLayoutDefaults:QF(),calc:eO(),crossTraceCalc:tO(),plot:rO(),style:aO().style,hoverPoints:iO(),eventData:nO(),selectPoints:h1(),moduleType:"trace",name:"waterfall",basePlotModule:Kf(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}}}),sO=He({"lib/waterfall.js"(Z,V){"use strict";V.exports=oO()}}),v1=He({"src/traces/image/constants.js"(Z,V){"use strict";V.exports={colormodel:{rgb:{min:[0,0,0],max:[255,255,255],fmt:function(d){return d.slice(0,3)},suffix:["","",""]},rgba:{min:[0,0,0,0],max:[255,255,255,1],fmt:function(d){return d.slice(0,4)},suffix:["","","",""]},rgba256:{colormodel:"rgba",zminDflt:[0,0,0,0],zmaxDflt:[255,255,255,255],min:[0,0,0,0],max:[255,255,255,1],fmt:function(d){return d.slice(0,4)},suffix:["","","",""]},hsl:{min:[0,0,0],max:[360,100,100],fmt:function(d){var x=d.slice(0,3);return x[1]=x[1]+"%",x[2]=x[2]+"%",x},suffix:["\xB0","%","%"]},hsla:{min:[0,0,0,0],max:[360,100,100,1],fmt:function(d){var x=d.slice(0,4);return x[1]=x[1]+"%",x[2]=x[2]+"%",x},suffix:["\xB0","%","%",""]}}}}}),DS=He({"src/traces/image/attributes.js"(Z,V){"use strict";var d=ru(),x=af().zorder,{hovertemplateAttrs:S,templatefallbackAttrs:E}=Jl(),e=Qo().extendFlat,t=v1().colormodel,r=["rgb","rgba","rgba256","hsl","hsla"],o=[],a=[];for(i=0;i0)throw new Error("Invalid string. Length must be a multiple of 4");var v=h.indexOf("=");v===-1&&(v=f);var c=v===f?0:4-v%4;return[v,c]}function r(h){var f=t(h),v=f[0],c=f[1];return(v+c)*3/4-c}function o(h,f,v){return(f+v)*3/4-v}function a(h){var f,v=t(h),c=v[0],T=v[1],l=new x(o(h,c,T)),_=0,w=T>0?c-4:c,A;for(A=0;A>16&255,l[_++]=f>>8&255,l[_++]=f&255;return T===2&&(f=d[h.charCodeAt(A)]<<2|d[h.charCodeAt(A+1)]>>4,l[_++]=f&255),T===1&&(f=d[h.charCodeAt(A)]<<10|d[h.charCodeAt(A+1)]<<4|d[h.charCodeAt(A+2)]>>2,l[_++]=f>>8&255,l[_++]=f&255),l}function n(h){return V[h>>18&63]+V[h>>12&63]+V[h>>6&63]+V[h&63]}function i(h,f,v){for(var c,T=[],l=f;lw?w:_+l));return c===1?(f=h[v-1],T.push(V[f>>2]+V[f<<4&63]+"==")):c===2&&(f=(h[v-2]<<8)+h[v-1],T.push(V[f>>10]+V[f>>4&63]+V[f<<2&63]+"=")),T.join("")}}}),cO=He({"node_modules/ieee754/index.js"(Z){Z.read=function(V,d,x,S,E){var e,t,r=E*8-S-1,o=(1<>1,n=-7,i=x?E-1:0,s=x?-1:1,h=V[d+i];for(i+=s,e=h&(1<<-n)-1,h>>=-n,n+=r;n>0;e=e*256+V[d+i],i+=s,n-=8);for(t=e&(1<<-n)-1,e>>=-n,n+=S;n>0;t=t*256+V[d+i],i+=s,n-=8);if(e===0)e=1-a;else{if(e===o)return t?NaN:(h?-1:1)*(1/0);t=t+Math.pow(2,S),e=e-a}return(h?-1:1)*t*Math.pow(2,e-S)},Z.write=function(V,d,x,S,E,e){var t,r,o,a=e*8-E-1,n=(1<>1,s=E===23?Math.pow(2,-24)-Math.pow(2,-77):0,h=S?0:e-1,f=S?1:-1,v=d<0||d===0&&1/d<0?1:0;for(d=Math.abs(d),isNaN(d)||d===1/0?(r=isNaN(d)?1:0,t=n):(t=Math.floor(Math.log(d)/Math.LN2),d*(o=Math.pow(2,-t))<1&&(t--,o*=2),t+i>=1?d+=s/o:d+=s*Math.pow(2,1-i),d*o>=2&&(t++,o/=2),t+i>=n?(r=0,t=n):t+i>=1?(r=(d*o-1)*Math.pow(2,E),t=t+i):(r=d*Math.pow(2,i-1)*Math.pow(2,E),t=0));E>=8;V[x+h]=r&255,h+=f,r/=256,E-=8);for(t=t<0;V[x+h]=t&255,h+=f,t/=256,a-=8);V[x+h-f]|=v*128}}}),rg=He({"node_modules/buffer/index.js"(Z){"use strict";var V=uO(),d=cO(),x=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Z.Buffer=t,Z.SlowBuffer=T,Z.INSPECT_MAX_BYTES=50;var S=2147483647;Z.kMaxLength=S,t.TYPED_ARRAY_SUPPORT=E(),!t.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function E(){try{let he=new Uint8Array(1),ue={foo:function(){return 42}};return Object.setPrototypeOf(ue,Uint8Array.prototype),Object.setPrototypeOf(he,ue),he.foo()===42}catch{return!1}}Object.defineProperty(t.prototype,"parent",{enumerable:!0,get:function(){if(t.isBuffer(this))return this.buffer}}),Object.defineProperty(t.prototype,"offset",{enumerable:!0,get:function(){if(t.isBuffer(this))return this.byteOffset}});function e(he){if(he>S)throw new RangeError('The value "'+he+'" is invalid for option "size"');let ue=new Uint8Array(he);return Object.setPrototypeOf(ue,t.prototype),ue}function t(he,ue,ne){if(typeof he=="number"){if(typeof ue=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return n(he)}return r(he,ue,ne)}t.poolSize=8192;function r(he,ue,ne){if(typeof he=="string")return i(he,ue);if(ArrayBuffer.isView(he))return h(he);if(he==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof he);if(We(he,ArrayBuffer)||he&&We(he.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(We(he,SharedArrayBuffer)||he&&We(he.buffer,SharedArrayBuffer)))return f(he,ue,ne);if(typeof he=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let Ce=he.valueOf&&he.valueOf();if(Ce!=null&&Ce!==he)return t.from(Ce,ue,ne);let Ye=v(he);if(Ye)return Ye;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof he[Symbol.toPrimitive]=="function")return t.from(he[Symbol.toPrimitive]("string"),ue,ne);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof he)}t.from=function(he,ue,ne){return r(he,ue,ne)},Object.setPrototypeOf(t.prototype,Uint8Array.prototype),Object.setPrototypeOf(t,Uint8Array);function o(he){if(typeof he!="number")throw new TypeError('"size" argument must be of type number');if(he<0)throw new RangeError('The value "'+he+'" is invalid for option "size"')}function a(he,ue,ne){return o(he),he<=0?e(he):ue!==void 0?typeof ne=="string"?e(he).fill(ue,ne):e(he).fill(ue):e(he)}t.alloc=function(he,ue,ne){return a(he,ue,ne)};function n(he){return o(he),e(he<0?0:c(he)|0)}t.allocUnsafe=function(he){return n(he)},t.allocUnsafeSlow=function(he){return n(he)};function i(he,ue){if((typeof ue!="string"||ue==="")&&(ue="utf8"),!t.isEncoding(ue))throw new TypeError("Unknown encoding: "+ue);let ne=l(he,ue)|0,Ce=e(ne),Ye=Ce.write(he,ue);return Ye!==ne&&(Ce=Ce.slice(0,Ye)),Ce}function s(he){let ue=he.length<0?0:c(he.length)|0,ne=e(ue);for(let Ce=0;Ce=S)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+S.toString(16)+" bytes");return he|0}function T(he){return+he!=he&&(he=0),t.alloc(+he)}t.isBuffer=function(ue){return ue!=null&&ue._isBuffer===!0&&ue!==t.prototype},t.compare=function(ue,ne){if(We(ue,Uint8Array)&&(ue=t.from(ue,ue.offset,ue.byteLength)),We(ne,Uint8Array)&&(ne=t.from(ne,ne.offset,ne.byteLength)),!t.isBuffer(ue)||!t.isBuffer(ne))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(ue===ne)return 0;let Ce=ue.length,Ye=ne.length;for(let rt=0,Ke=Math.min(Ce,Ye);rtYe.length?(t.isBuffer(Ke)||(Ke=t.from(Ke)),Ke.copy(Ye,rt)):Uint8Array.prototype.set.call(Ye,Ke,rt);else if(t.isBuffer(Ke))Ke.copy(Ye,rt);else throw new TypeError('"list" argument must be an Array of Buffers');rt+=Ke.length}return Ye};function l(he,ue){if(t.isBuffer(he))return he.length;if(ArrayBuffer.isView(he)||We(he,ArrayBuffer))return he.byteLength;if(typeof he!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof he);let ne=he.length,Ce=arguments.length>2&&arguments[2]===!0;if(!Ce&&ne===0)return 0;let Ye=!1;for(;;)switch(ue){case"ascii":case"latin1":case"binary":return ne;case"utf8":case"utf-8":return pe(he).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ne*2;case"hex":return ne>>>1;case"base64":return Ie(he).length;default:if(Ye)return Ce?-1:pe(he).length;ue=(""+ue).toLowerCase(),Ye=!0}}t.byteLength=l;function _(he,ue,ne){let Ce=!1;if((ue===void 0||ue<0)&&(ue=0),ue>this.length||((ne===void 0||ne>this.length)&&(ne=this.length),ne<=0)||(ne>>>=0,ue>>>=0,ne<=ue))return"";for(he||(he="utf8");;)switch(he){case"hex":return O(this,ue,ne);case"utf8":case"utf-8":return R(this,ue,ne);case"ascii":return F(this,ue,ne);case"latin1":case"binary":return N(this,ue,ne);case"base64":return m(this,ue,ne);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,ue,ne);default:if(Ce)throw new TypeError("Unknown encoding: "+he);he=(he+"").toLowerCase(),Ce=!0}}t.prototype._isBuffer=!0;function w(he,ue,ne){let Ce=he[ue];he[ue]=he[ne],he[ne]=Ce}t.prototype.swap16=function(){let ue=this.length;if(ue%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let ne=0;nene&&(ue+=" ... "),""},x&&(t.prototype[x]=t.prototype.inspect),t.prototype.compare=function(ue,ne,Ce,Ye,rt){if(We(ue,Uint8Array)&&(ue=t.from(ue,ue.offset,ue.byteLength)),!t.isBuffer(ue))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof ue);if(ne===void 0&&(ne=0),Ce===void 0&&(Ce=ue?ue.length:0),Ye===void 0&&(Ye=0),rt===void 0&&(rt=this.length),ne<0||Ce>ue.length||Ye<0||rt>this.length)throw new RangeError("out of range index");if(Ye>=rt&&ne>=Ce)return 0;if(Ye>=rt)return-1;if(ne>=Ce)return 1;if(ne>>>=0,Ce>>>=0,Ye>>>=0,rt>>>=0,this===ue)return 0;let Ke=rt-Ye,Mt=Ce-ne,kt=Math.min(Ke,Mt),Nt=this.slice(Ye,rt),Gt=ue.slice(ne,Ce);for(let Mr=0;Mr2147483647?ne=2147483647:ne<-2147483648&&(ne=-2147483648),ne=+ne,at(ne)&&(ne=Ye?0:he.length-1),ne<0&&(ne=he.length+ne),ne>=he.length){if(Ye)return-1;ne=he.length-1}else if(ne<0)if(Ye)ne=0;else return-1;if(typeof ue=="string"&&(ue=t.from(ue,Ce)),t.isBuffer(ue))return ue.length===0?-1:M(he,ue,ne,Ce,Ye);if(typeof ue=="number")return ue=ue&255,typeof Uint8Array.prototype.indexOf=="function"?Ye?Uint8Array.prototype.indexOf.call(he,ue,ne):Uint8Array.prototype.lastIndexOf.call(he,ue,ne):M(he,[ue],ne,Ce,Ye);throw new TypeError("val must be string, number or Buffer")}function M(he,ue,ne,Ce,Ye){let rt=1,Ke=he.length,Mt=ue.length;if(Ce!==void 0&&(Ce=String(Ce).toLowerCase(),Ce==="ucs2"||Ce==="ucs-2"||Ce==="utf16le"||Ce==="utf-16le")){if(he.length<2||ue.length<2)return-1;rt=2,Ke/=2,Mt/=2,ne/=2}function kt(Gt,Mr){return rt===1?Gt[Mr]:Gt.readUInt16BE(Mr*rt)}let Nt;if(Ye){let Gt=-1;for(Nt=ne;NtKe&&(ne=Ke-Mt),Nt=ne;Nt>=0;Nt--){let Gt=!0;for(let Mr=0;MrYe&&(Ce=Ye)):Ce=Ye;let rt=ue.length;Ce>rt/2&&(Ce=rt/2);let Ke;for(Ke=0;Ke>>0,isFinite(Ce)?(Ce=Ce>>>0,Ye===void 0&&(Ye="utf8")):(Ye=Ce,Ce=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let rt=this.length-ne;if((Ce===void 0||Ce>rt)&&(Ce=rt),ue.length>0&&(Ce<0||ne<0)||ne>this.length)throw new RangeError("Attempt to write outside buffer bounds");Ye||(Ye="utf8");let Ke=!1;for(;;)switch(Ye){case"hex":return g(this,ue,ne,Ce);case"utf8":case"utf-8":return b(this,ue,ne,Ce);case"ascii":case"latin1":case"binary":return p(this,ue,ne,Ce);case"base64":return u(this,ue,ne,Ce);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return y(this,ue,ne,Ce);default:if(Ke)throw new TypeError("Unknown encoding: "+Ye);Ye=(""+Ye).toLowerCase(),Ke=!0}},t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function m(he,ue,ne){return ue===0&&ne===he.length?V.fromByteArray(he):V.fromByteArray(he.slice(ue,ne))}function R(he,ue,ne){ne=Math.min(he.length,ne);let Ce=[],Ye=ue;for(;Ye239?4:rt>223?3:rt>191?2:1;if(Ye+Mt<=ne){let kt,Nt,Gt,Mr;switch(Mt){case 1:rt<128&&(Ke=rt);break;case 2:kt=he[Ye+1],(kt&192)===128&&(Mr=(rt&31)<<6|kt&63,Mr>127&&(Ke=Mr));break;case 3:kt=he[Ye+1],Nt=he[Ye+2],(kt&192)===128&&(Nt&192)===128&&(Mr=(rt&15)<<12|(kt&63)<<6|Nt&63,Mr>2047&&(Mr<55296||Mr>57343)&&(Ke=Mr));break;case 4:kt=he[Ye+1],Nt=he[Ye+2],Gt=he[Ye+3],(kt&192)===128&&(Nt&192)===128&&(Gt&192)===128&&(Mr=(rt&15)<<18|(kt&63)<<12|(Nt&63)<<6|Gt&63,Mr>65535&&Mr<1114112&&(Ke=Mr))}}Ke===null?(Ke=65533,Mt=1):Ke>65535&&(Ke-=65536,Ce.push(Ke>>>10&1023|55296),Ke=56320|Ke&1023),Ce.push(Ke),Ye+=Mt}return z(Ce)}var L=4096;function z(he){let ue=he.length;if(ue<=L)return String.fromCharCode.apply(String,he);let ne="",Ce=0;for(;CeCe)&&(ne=Ce);let Ye="";for(let rt=ue;rtCe&&(ue=Ce),ne<0?(ne+=Ce,ne<0&&(ne=0)):ne>Ce&&(ne=Ce),nene)throw new RangeError("Trying to access beyond buffer length")}t.prototype.readUintLE=t.prototype.readUIntLE=function(ue,ne,Ce){ue=ue>>>0,ne=ne>>>0,Ce||U(ue,ne,this.length);let Ye=this[ue],rt=1,Ke=0;for(;++Ke>>0,ne=ne>>>0,Ce||U(ue,ne,this.length);let Ye=this[ue+--ne],rt=1;for(;ne>0&&(rt*=256);)Ye+=this[ue+--ne]*rt;return Ye},t.prototype.readUint8=t.prototype.readUInt8=function(ue,ne){return ue=ue>>>0,ne||U(ue,1,this.length),this[ue]},t.prototype.readUint16LE=t.prototype.readUInt16LE=function(ue,ne){return ue=ue>>>0,ne||U(ue,2,this.length),this[ue]|this[ue+1]<<8},t.prototype.readUint16BE=t.prototype.readUInt16BE=function(ue,ne){return ue=ue>>>0,ne||U(ue,2,this.length),this[ue]<<8|this[ue+1]},t.prototype.readUint32LE=t.prototype.readUInt32LE=function(ue,ne){return ue=ue>>>0,ne||U(ue,4,this.length),(this[ue]|this[ue+1]<<8|this[ue+2]<<16)+this[ue+3]*16777216},t.prototype.readUint32BE=t.prototype.readUInt32BE=function(ue,ne){return ue=ue>>>0,ne||U(ue,4,this.length),this[ue]*16777216+(this[ue+1]<<16|this[ue+2]<<8|this[ue+3])},t.prototype.readBigUInt64LE=tt(function(ue){ue=ue>>>0,ae(ue,"offset");let ne=this[ue],Ce=this[ue+7];(ne===void 0||Ce===void 0)&&j(ue,this.length-8);let Ye=ne+this[++ue]*2**8+this[++ue]*2**16+this[++ue]*2**24,rt=this[++ue]+this[++ue]*2**8+this[++ue]*2**16+Ce*2**24;return BigInt(Ye)+(BigInt(rt)<>>0,ae(ue,"offset");let ne=this[ue],Ce=this[ue+7];(ne===void 0||Ce===void 0)&&j(ue,this.length-8);let Ye=ne*2**24+this[++ue]*2**16+this[++ue]*2**8+this[++ue],rt=this[++ue]*2**24+this[++ue]*2**16+this[++ue]*2**8+Ce;return(BigInt(Ye)<>>0,ne=ne>>>0,Ce||U(ue,ne,this.length);let Ye=this[ue],rt=1,Ke=0;for(;++Ke=rt&&(Ye-=Math.pow(2,8*ne)),Ye},t.prototype.readIntBE=function(ue,ne,Ce){ue=ue>>>0,ne=ne>>>0,Ce||U(ue,ne,this.length);let Ye=ne,rt=1,Ke=this[ue+--Ye];for(;Ye>0&&(rt*=256);)Ke+=this[ue+--Ye]*rt;return rt*=128,Ke>=rt&&(Ke-=Math.pow(2,8*ne)),Ke},t.prototype.readInt8=function(ue,ne){return ue=ue>>>0,ne||U(ue,1,this.length),this[ue]&128?(255-this[ue]+1)*-1:this[ue]},t.prototype.readInt16LE=function(ue,ne){ue=ue>>>0,ne||U(ue,2,this.length);let Ce=this[ue]|this[ue+1]<<8;return Ce&32768?Ce|4294901760:Ce},t.prototype.readInt16BE=function(ue,ne){ue=ue>>>0,ne||U(ue,2,this.length);let Ce=this[ue+1]|this[ue]<<8;return Ce&32768?Ce|4294901760:Ce},t.prototype.readInt32LE=function(ue,ne){return ue=ue>>>0,ne||U(ue,4,this.length),this[ue]|this[ue+1]<<8|this[ue+2]<<16|this[ue+3]<<24},t.prototype.readInt32BE=function(ue,ne){return ue=ue>>>0,ne||U(ue,4,this.length),this[ue]<<24|this[ue+1]<<16|this[ue+2]<<8|this[ue+3]},t.prototype.readBigInt64LE=tt(function(ue){ue=ue>>>0,ae(ue,"offset");let ne=this[ue],Ce=this[ue+7];(ne===void 0||Ce===void 0)&&j(ue,this.length-8);let Ye=this[ue+4]+this[ue+5]*2**8+this[ue+6]*2**16+(Ce<<24);return(BigInt(Ye)<>>0,ae(ue,"offset");let ne=this[ue],Ce=this[ue+7];(ne===void 0||Ce===void 0)&&j(ue,this.length-8);let Ye=(ne<<24)+this[++ue]*2**16+this[++ue]*2**8+this[++ue];return(BigInt(Ye)<>>0,ne||U(ue,4,this.length),d.read(this,ue,!0,23,4)},t.prototype.readFloatBE=function(ue,ne){return ue=ue>>>0,ne||U(ue,4,this.length),d.read(this,ue,!1,23,4)},t.prototype.readDoubleLE=function(ue,ne){return ue=ue>>>0,ne||U(ue,8,this.length),d.read(this,ue,!0,52,8)},t.prototype.readDoubleBE=function(ue,ne){return ue=ue>>>0,ne||U(ue,8,this.length),d.read(this,ue,!1,52,8)};function B(he,ue,ne,Ce,Ye,rt){if(!t.isBuffer(he))throw new TypeError('"buffer" argument must be a Buffer instance');if(ue>Ye||uehe.length)throw new RangeError("Index out of range")}t.prototype.writeUintLE=t.prototype.writeUIntLE=function(ue,ne,Ce,Ye){if(ue=+ue,ne=ne>>>0,Ce=Ce>>>0,!Ye){let Mt=Math.pow(2,8*Ce)-1;B(this,ue,ne,Ce,Mt,0)}let rt=1,Ke=0;for(this[ne]=ue&255;++Ke>>0,Ce=Ce>>>0,!Ye){let Mt=Math.pow(2,8*Ce)-1;B(this,ue,ne,Ce,Mt,0)}let rt=Ce-1,Ke=1;for(this[ne+rt]=ue&255;--rt>=0&&(Ke*=256);)this[ne+rt]=ue/Ke&255;return ne+Ce},t.prototype.writeUint8=t.prototype.writeUInt8=function(ue,ne,Ce){return ue=+ue,ne=ne>>>0,Ce||B(this,ue,ne,1,255,0),this[ne]=ue&255,ne+1},t.prototype.writeUint16LE=t.prototype.writeUInt16LE=function(ue,ne,Ce){return ue=+ue,ne=ne>>>0,Ce||B(this,ue,ne,2,65535,0),this[ne]=ue&255,this[ne+1]=ue>>>8,ne+2},t.prototype.writeUint16BE=t.prototype.writeUInt16BE=function(ue,ne,Ce){return ue=+ue,ne=ne>>>0,Ce||B(this,ue,ne,2,65535,0),this[ne]=ue>>>8,this[ne+1]=ue&255,ne+2},t.prototype.writeUint32LE=t.prototype.writeUInt32LE=function(ue,ne,Ce){return ue=+ue,ne=ne>>>0,Ce||B(this,ue,ne,4,4294967295,0),this[ne+3]=ue>>>24,this[ne+2]=ue>>>16,this[ne+1]=ue>>>8,this[ne]=ue&255,ne+4},t.prototype.writeUint32BE=t.prototype.writeUInt32BE=function(ue,ne,Ce){return ue=+ue,ne=ne>>>0,Ce||B(this,ue,ne,4,4294967295,0),this[ne]=ue>>>24,this[ne+1]=ue>>>16,this[ne+2]=ue>>>8,this[ne+3]=ue&255,ne+4};function X(he,ue,ne,Ce,Ye){se(ue,Ce,Ye,he,ne,7);let rt=Number(ue&BigInt(4294967295));he[ne++]=rt,rt=rt>>8,he[ne++]=rt,rt=rt>>8,he[ne++]=rt,rt=rt>>8,he[ne++]=rt;let Ke=Number(ue>>BigInt(32)&BigInt(4294967295));return he[ne++]=Ke,Ke=Ke>>8,he[ne++]=Ke,Ke=Ke>>8,he[ne++]=Ke,Ke=Ke>>8,he[ne++]=Ke,ne}function $(he,ue,ne,Ce,Ye){se(ue,Ce,Ye,he,ne,7);let rt=Number(ue&BigInt(4294967295));he[ne+7]=rt,rt=rt>>8,he[ne+6]=rt,rt=rt>>8,he[ne+5]=rt,rt=rt>>8,he[ne+4]=rt;let Ke=Number(ue>>BigInt(32)&BigInt(4294967295));return he[ne+3]=Ke,Ke=Ke>>8,he[ne+2]=Ke,Ke=Ke>>8,he[ne+1]=Ke,Ke=Ke>>8,he[ne]=Ke,ne+8}t.prototype.writeBigUInt64LE=tt(function(ue,ne=0){return X(this,ue,ne,BigInt(0),BigInt("0xffffffffffffffff"))}),t.prototype.writeBigUInt64BE=tt(function(ue,ne=0){return $(this,ue,ne,BigInt(0),BigInt("0xffffffffffffffff"))}),t.prototype.writeIntLE=function(ue,ne,Ce,Ye){if(ue=+ue,ne=ne>>>0,!Ye){let kt=Math.pow(2,8*Ce-1);B(this,ue,ne,Ce,kt-1,-kt)}let rt=0,Ke=1,Mt=0;for(this[ne]=ue&255;++rt>0)-Mt&255;return ne+Ce},t.prototype.writeIntBE=function(ue,ne,Ce,Ye){if(ue=+ue,ne=ne>>>0,!Ye){let kt=Math.pow(2,8*Ce-1);B(this,ue,ne,Ce,kt-1,-kt)}let rt=Ce-1,Ke=1,Mt=0;for(this[ne+rt]=ue&255;--rt>=0&&(Ke*=256);)ue<0&&Mt===0&&this[ne+rt+1]!==0&&(Mt=1),this[ne+rt]=(ue/Ke>>0)-Mt&255;return ne+Ce},t.prototype.writeInt8=function(ue,ne,Ce){return ue=+ue,ne=ne>>>0,Ce||B(this,ue,ne,1,127,-128),ue<0&&(ue=255+ue+1),this[ne]=ue&255,ne+1},t.prototype.writeInt16LE=function(ue,ne,Ce){return ue=+ue,ne=ne>>>0,Ce||B(this,ue,ne,2,32767,-32768),this[ne]=ue&255,this[ne+1]=ue>>>8,ne+2},t.prototype.writeInt16BE=function(ue,ne,Ce){return ue=+ue,ne=ne>>>0,Ce||B(this,ue,ne,2,32767,-32768),this[ne]=ue>>>8,this[ne+1]=ue&255,ne+2},t.prototype.writeInt32LE=function(ue,ne,Ce){return ue=+ue,ne=ne>>>0,Ce||B(this,ue,ne,4,2147483647,-2147483648),this[ne]=ue&255,this[ne+1]=ue>>>8,this[ne+2]=ue>>>16,this[ne+3]=ue>>>24,ne+4},t.prototype.writeInt32BE=function(ue,ne,Ce){return ue=+ue,ne=ne>>>0,Ce||B(this,ue,ne,4,2147483647,-2147483648),ue<0&&(ue=4294967295+ue+1),this[ne]=ue>>>24,this[ne+1]=ue>>>16,this[ne+2]=ue>>>8,this[ne+3]=ue&255,ne+4},t.prototype.writeBigInt64LE=tt(function(ue,ne=0){return X(this,ue,ne,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),t.prototype.writeBigInt64BE=tt(function(ue,ne=0){return $(this,ue,ne,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function le(he,ue,ne,Ce,Ye,rt){if(ne+Ce>he.length)throw new RangeError("Index out of range");if(ne<0)throw new RangeError("Index out of range")}function ce(he,ue,ne,Ce,Ye){return ue=+ue,ne=ne>>>0,Ye||le(he,ue,ne,4,34028234663852886e22,-34028234663852886e22),d.write(he,ue,ne,Ce,23,4),ne+4}t.prototype.writeFloatLE=function(ue,ne,Ce){return ce(this,ue,ne,!0,Ce)},t.prototype.writeFloatBE=function(ue,ne,Ce){return ce(this,ue,ne,!1,Ce)};function de(he,ue,ne,Ce,Ye){return ue=+ue,ne=ne>>>0,Ye||le(he,ue,ne,8,17976931348623157e292,-17976931348623157e292),d.write(he,ue,ne,Ce,52,8),ne+8}t.prototype.writeDoubleLE=function(ue,ne,Ce){return de(this,ue,ne,!0,Ce)},t.prototype.writeDoubleBE=function(ue,ne,Ce){return de(this,ue,ne,!1,Ce)},t.prototype.copy=function(ue,ne,Ce,Ye){if(!t.isBuffer(ue))throw new TypeError("argument should be a Buffer");if(Ce||(Ce=0),!Ye&&Ye!==0&&(Ye=this.length),ne>=ue.length&&(ne=ue.length),ne||(ne=0),Ye>0&&Ye=this.length)throw new RangeError("Index out of range");if(Ye<0)throw new RangeError("sourceEnd out of bounds");Ye>this.length&&(Ye=this.length),ue.length-ne>>0,Ce=Ce===void 0?this.length:Ce>>>0,ue||(ue=0);let rt;if(typeof ue=="number")for(rt=ne;rt2**32?Ye=ee(String(ne)):typeof ne=="bigint"&&(Ye=String(ne),(ne>BigInt(2)**BigInt(32)||ne<-(BigInt(2)**BigInt(32)))&&(Ye=ee(Ye)),Ye+="n"),Ce+=` It must be ${ue}. Received ${Ye}`,Ce},RangeError);function ee(he){let ue="",ne=he.length,Ce=he[0]==="-"?1:0;for(;ne>=Ce+4;ne-=3)ue=`_${he.slice(ne-3,ne)}${ue}`;return`${he.slice(0,ne)}${ue}`}function q(he,ue,ne){ae(ue,"offset"),(he[ue]===void 0||he[ue+ne]===void 0)&&j(ue,he.length-(ne+1))}function se(he,ue,ne,Ce,Ye,rt){if(he>ne||he3?ue===0||ue===BigInt(0)?Mt=`>= 0${Ke} and < 2${Ke} ** ${(rt+1)*8}${Ke}`:Mt=`>= -(2${Ke} ** ${(rt+1)*8-1}${Ke}) and < 2 ** ${(rt+1)*8-1}${Ke}`:Mt=`>= ${ue}${Ke} and <= ${ne}${Ke}`,new G.ERR_OUT_OF_RANGE("value",Mt,he)}q(Ce,Ye,rt)}function ae(he,ue){if(typeof he!="number")throw new G.ERR_INVALID_ARG_TYPE(ue,"number",he)}function j(he,ue,ne){throw Math.floor(he)!==he?(ae(he,ne),new G.ERR_OUT_OF_RANGE(ne||"offset","an integer",he)):ue<0?new G.ERR_BUFFER_OUT_OF_BOUNDS:new G.ERR_OUT_OF_RANGE(ne||"offset",`>= ${ne?1:0} and <= ${ue}`,he)}var Q=/[^+/0-9A-Za-z-_]/g;function re(he){if(he=he.split("=")[0],he=he.trim().replace(Q,""),he.length<2)return"";for(;he.length%4!==0;)he=he+"=";return he}function pe(he,ue){ue=ue||1/0;let ne,Ce=he.length,Ye=null,rt=[];for(let Ke=0;Ke55295&&ne<57344){if(!Ye){if(ne>56319){(ue-=3)>-1&&rt.push(239,191,189);continue}else if(Ke+1===Ce){(ue-=3)>-1&&rt.push(239,191,189);continue}Ye=ne;continue}if(ne<56320){(ue-=3)>-1&&rt.push(239,191,189),Ye=ne;continue}ne=(Ye-55296<<10|ne-56320)+65536}else Ye&&(ue-=3)>-1&&rt.push(239,191,189);if(Ye=null,ne<128){if((ue-=1)<0)break;rt.push(ne)}else if(ne<2048){if((ue-=2)<0)break;rt.push(ne>>6|192,ne&63|128)}else if(ne<65536){if((ue-=3)<0)break;rt.push(ne>>12|224,ne>>6&63|128,ne&63|128)}else if(ne<1114112){if((ue-=4)<0)break;rt.push(ne>>18|240,ne>>12&63|128,ne>>6&63|128,ne&63|128)}else throw new Error("Invalid code point")}return rt}function we(he){let ue=[];for(let ne=0;ne>8,Ye=ne%256,rt.push(Ye),rt.push(Ce);return rt}function Ie(he){return V.toByteArray(re(he))}function Re(he,ue,ne,Ce){let Ye;for(Ye=0;Ye=ue.length||Ye>=he.length);++Ye)ue[Ye+ne]=he[Ye];return Ye}function We(he,ue){return he instanceof ue||he!=null&&he.constructor!=null&&he.constructor.name!=null&&he.constructor.name===ue.name}function at(he){return he!==he}var nt=function(){let he="0123456789abcdef",ue=new Array(256);for(let ne=0;ne<16;++ne){let Ce=ne*16;for(let Ye=0;Ye<16;++Ye)ue[Ce+Ye]=he[ne]+he[Ye]}return ue}();function tt(he){return typeof BigInt>"u"?qe:he}function qe(){throw new Error("BigInt not supported")}}}),p3=He({"node_modules/has-symbols/shams.js"(Z,V){"use strict";V.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var x={},S=Symbol("test"),E=Object(S);if(typeof S=="string"||Object.prototype.toString.call(S)!=="[object Symbol]"||Object.prototype.toString.call(E)!=="[object Symbol]")return!1;var e=42;x[S]=e;for(var t in x)return!1;if(typeof Object.keys=="function"&&Object.keys(x).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(x).length!==0)return!1;var r=Object.getOwnPropertySymbols(x);if(r.length!==1||r[0]!==S||!Object.prototype.propertyIsEnumerable.call(x,S))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(x,S);if(o.value!==e||o.enumerable!==!0)return!1}return!0}}}),W_=He({"node_modules/has-tostringtag/shams.js"(Z,V){"use strict";var d=p3();V.exports=function(){return d()&&!!Symbol.toStringTag}}}),FS=He({"node_modules/es-object-atoms/index.js"(Z,V){"use strict";V.exports=Object}}),fO=He({"node_modules/es-errors/index.js"(Z,V){"use strict";V.exports=Error}}),hO=He({"node_modules/es-errors/eval.js"(Z,V){"use strict";V.exports=EvalError}}),pO=He({"node_modules/es-errors/range.js"(Z,V){"use strict";V.exports=RangeError}}),dO=He({"node_modules/es-errors/ref.js"(Z,V){"use strict";V.exports=ReferenceError}}),OS=He({"node_modules/es-errors/syntax.js"(Z,V){"use strict";V.exports=SyntaxError}}),m1=He({"node_modules/es-errors/type.js"(Z,V){"use strict";V.exports=TypeError}}),vO=He({"node_modules/es-errors/uri.js"(Z,V){"use strict";V.exports=URIError}}),mO=He({"node_modules/math-intrinsics/abs.js"(Z,V){"use strict";V.exports=Math.abs}}),gO=He({"node_modules/math-intrinsics/floor.js"(Z,V){"use strict";V.exports=Math.floor}}),yO=He({"node_modules/math-intrinsics/max.js"(Z,V){"use strict";V.exports=Math.max}}),_O=He({"node_modules/math-intrinsics/min.js"(Z,V){"use strict";V.exports=Math.min}}),xO=He({"node_modules/math-intrinsics/pow.js"(Z,V){"use strict";V.exports=Math.pow}}),bO=He({"node_modules/math-intrinsics/round.js"(Z,V){"use strict";V.exports=Math.round}}),wO=He({"node_modules/math-intrinsics/isNaN.js"(Z,V){"use strict";V.exports=Number.isNaN||function(x){return x!==x}}}),TO=He({"node_modules/math-intrinsics/sign.js"(Z,V){"use strict";var d=wO();V.exports=function(S){return d(S)||S===0?S:S<0?-1:1}}}),AO=He({"node_modules/gopd/gOPD.js"(Z,V){"use strict";V.exports=Object.getOwnPropertyDescriptor}}),ag=He({"node_modules/gopd/index.js"(Z,V){"use strict";var d=AO();if(d)try{d([],"length")}catch{d=null}V.exports=d}}),X_=He({"node_modules/es-define-property/index.js"(Z,V){"use strict";var d=Object.defineProperty||!1;if(d)try{d({},"a",{value:1})}catch{d=!1}V.exports=d}}),SO=He({"node_modules/has-symbols/index.js"(Z,V){"use strict";var d=typeof Symbol<"u"&&Symbol,x=p3();V.exports=function(){return typeof d!="function"||typeof Symbol!="function"||typeof d("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:x()}}}),BS=He({"node_modules/get-proto/Reflect.getPrototypeOf.js"(Z,V){"use strict";V.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null}}),NS=He({"node_modules/get-proto/Object.getPrototypeOf.js"(Z,V){"use strict";var d=FS();V.exports=d.getPrototypeOf||null}}),MO=He({"node_modules/function-bind/implementation.js"(Z,V){"use strict";var d="Function.prototype.bind called on incompatible ",x=Object.prototype.toString,S=Math.max,E="[object Function]",e=function(a,n){for(var i=[],s=0;s"u"||!b?d:b(Uint8Array),z={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?d:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?d:ArrayBuffer,"%ArrayIteratorPrototype%":g&&b?b([][Symbol.iterator]()):d,"%AsyncFromSyncIteratorPrototype%":d,"%AsyncFunction%":R,"%AsyncGenerator%":R,"%AsyncGeneratorFunction%":R,"%AsyncIteratorPrototype%":R,"%Atomics%":typeof Atomics>"u"?d:Atomics,"%BigInt%":typeof BigInt>"u"?d:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?d:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?d:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?d:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":S,"%eval%":eval,"%EvalError%":E,"%Float16Array%":typeof Float16Array>"u"?d:Float16Array,"%Float32Array%":typeof Float32Array>"u"?d:Float32Array,"%Float64Array%":typeof Float64Array>"u"?d:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?d:FinalizationRegistry,"%Function%":T,"%GeneratorFunction%":R,"%Int8Array%":typeof Int8Array>"u"?d:Int8Array,"%Int16Array%":typeof Int16Array>"u"?d:Int16Array,"%Int32Array%":typeof Int32Array>"u"?d:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":g&&b?b(b([][Symbol.iterator]())):d,"%JSON%":typeof JSON=="object"?JSON:d,"%Map%":typeof Map>"u"?d:Map,"%MapIteratorPrototype%":typeof Map>"u"||!g||!b?d:b(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":x,"%Object.getOwnPropertyDescriptor%":_,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?d:Promise,"%Proxy%":typeof Proxy>"u"?d:Proxy,"%RangeError%":e,"%ReferenceError%":t,"%Reflect%":typeof Reflect>"u"?d:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?d:Set,"%SetIteratorPrototype%":typeof Set>"u"||!g||!b?d:b(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?d:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":g&&b?b(""[Symbol.iterator]()):d,"%Symbol%":g?Symbol:d,"%SyntaxError%":r,"%ThrowTypeError%":M,"%TypedArray%":L,"%TypeError%":o,"%Uint8Array%":typeof Uint8Array>"u"?d:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?d:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?d:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?d:Uint32Array,"%URIError%":a,"%WeakMap%":typeof WeakMap>"u"?d:WeakMap,"%WeakRef%":typeof WeakRef>"u"?d:WeakRef,"%WeakSet%":typeof WeakSet>"u"?d:WeakSet,"%Function.prototype.call%":m,"%Function.prototype.apply%":y,"%Object.defineProperty%":w,"%Object.getPrototypeOf%":p,"%Math.abs%":n,"%Math.floor%":i,"%Math.max%":s,"%Math.min%":h,"%Math.pow%":f,"%Math.round%":v,"%Math.sign%":c,"%Reflect.getPrototypeOf%":u};if(b)try{null.error}catch(q){F=b(b(q)),z["%Error.prototype%"]=F}var F,N=function q(se){var ae;if(se==="%AsyncFunction%")ae=l("async function () {}");else if(se==="%GeneratorFunction%")ae=l("function* () {}");else if(se==="%AsyncGeneratorFunction%")ae=l("async function* () {}");else if(se==="%AsyncGenerator%"){var j=q("%AsyncGeneratorFunction%");j&&(ae=j.prototype)}else if(se==="%AsyncIteratorPrototype%"){var Q=q("%AsyncGenerator%");Q&&b&&(ae=b(Q.prototype))}return z[se]=ae,ae},O={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},P=g1(),U=IO(),B=P.call(m,Array.prototype.concat),X=P.call(y,Array.prototype.splice),$=P.call(m,String.prototype.replace),le=P.call(m,String.prototype.slice),ce=P.call(m,RegExp.prototype.exec),de=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,G=/\\(\\)?/g,Y=function(se){var ae=le(se,0,1),j=le(se,-1);if(ae==="%"&&j!=="%")throw new r("invalid intrinsic syntax, expected closing `%`");if(j==="%"&&ae!=="%")throw new r("invalid intrinsic syntax, expected opening `%`");var Q=[];return $(se,de,function(re,pe,we,Se){Q[Q.length]=we?$(Se,G,"$1"):pe||re}),Q},ee=function(se,ae){var j=se,Q;if(U(O,j)&&(Q=O[j],j="%"+Q[0]+"%"),U(z,j)){var re=z[j];if(re===R&&(re=N(j)),typeof re>"u"&&!ae)throw new o("intrinsic "+se+" exists, but is not available. Please file an issue!");return{alias:Q,name:j,value:re}}throw new r("intrinsic "+se+" does not exist!")};V.exports=function(se,ae){if(typeof se!="string"||se.length===0)throw new o("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof ae!="boolean")throw new o('"allowMissing" argument must be a boolean');if(ce(/^%?[^%]*%?$/,se)===null)throw new r("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var j=Y(se),Q=j.length>0?j[0]:"",re=ee("%"+Q+"%",ae),pe=re.name,we=re.value,Se=!1,Ie=re.alias;Ie&&(Q=Ie[0],X(j,B([0,1],Ie)));for(var Re=1,We=!0;Re=j.length){var qe=_(we,at);We=!!qe,We&&"get"in qe&&!("originalValue"in qe.get)?we=qe.get:we=we[at]}else We=U(we,at),we=we[at];We&&!Se&&(z[pe]=we)}}return we}}}),RO=He({"node_modules/define-data-property/index.js"(Z,V){"use strict";var d=X_(),x=OS(),S=m1(),E=ag();V.exports=function(t,r,o){if(!t||typeof t!="object"&&typeof t!="function")throw new S("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new S("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new S("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new S("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new S("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new S("`loose`, if provided, must be a boolean");var a=arguments.length>3?arguments[3]:null,n=arguments.length>4?arguments[4]:null,i=arguments.length>5?arguments[5]:null,s=arguments.length>6?arguments[6]:!1,h=!!E&&E(t,r);if(d)d(t,r,{configurable:i===null&&h?h.configurable:!i,enumerable:a===null&&h?h.enumerable:!a,value:o,writable:n===null&&h?h.writable:!n});else if(s||!a&&!n&&!i)t[r]=o;else throw new x("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}}}),jS=He({"node_modules/has-property-descriptors/index.js"(Z,V){"use strict";var d=X_(),x=function(){return!!d};x.hasArrayLengthDefineBug=function(){if(!d)return null;try{return d([],"length",{value:1}).length!==1}catch{return!0}},V.exports=x}}),DO=He({"node_modules/set-function-length/index.js"(Z,V){"use strict";var d=v3(),x=RO(),S=jS()(),E=ag(),e=m1(),t=d("%Math.floor%");V.exports=function(o,a){if(typeof o!="function")throw new e("`fn` is not a function");if(typeof a!="number"||a<0||a>4294967295||t(a)!==a)throw new e("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],i=!0,s=!0;if("length"in o&&E){var h=E(o,"length");h&&!h.configurable&&(i=!1),h&&!h.writable&&(s=!1)}return(i||s||!n)&&(S?x(o,"length",a,!0,!0):x(o,"length",a)),o}}}),Z_=He({"node_modules/call-bind/index.js"(Z,V){"use strict";var d=g1(),x=v3(),S=DO(),E=m1(),e=x("%Function.prototype.apply%"),t=x("%Function.prototype.call%"),r=x("%Reflect.apply%",!0)||d.call(t,e),o=X_(),a=x("%Math.max%");V.exports=function(s){if(typeof s!="function")throw new E("a function is required");var h=r(d,t,arguments);return S(h,1+a(0,s.length-(arguments.length-1)),!0)};var n=function(){return r(d,e,arguments)};o?o(V.exports,"apply",{value:n}):V.exports.apply=n}}),y1=He({"node_modules/call-bind/callBound.js"(Z,V){"use strict";var d=v3(),x=Z_(),S=x(d("String.prototype.indexOf"));V.exports=function(e,t){var r=d(e,!!t);return typeof r=="function"&&S(e,".prototype.")>-1?x(r):r}}}),zO=He({"node_modules/is-arguments/index.js"(Z,V){"use strict";var d=W_()(),x=y1(),S=x("Object.prototype.toString"),E=function(o){return d&&o&&typeof o=="object"&&Symbol.toStringTag in o?!1:S(o)==="[object Arguments]"},e=function(o){return E(o)?!0:o!==null&&typeof o=="object"&&typeof o.length=="number"&&o.length>=0&&S(o)!=="[object Array]"&&S(o.callee)==="[object Function]"},t=function(){return E(arguments)}();E.isLegacyArguments=e,V.exports=t?E:e}}),FO=He({"node_modules/is-generator-function/index.js"(Z,V){"use strict";var d=Object.prototype.toString,x=Function.prototype.toString,S=/^\s*(?:function)?\*/,E=W_()(),e=Object.getPrototypeOf,t=function(){if(!E)return!1;try{return Function("return function*() {}")()}catch{}},r;V.exports=function(a){if(typeof a!="function")return!1;if(S.test(x.call(a)))return!0;if(!E){var n=d.call(a);return n==="[object GeneratorFunction]"}if(!e)return!1;if(typeof r>"u"){var i=t();r=i?e(i):!1}return e(a)===r}}}),OO=He({"node_modules/is-callable/index.js"(Z,V){"use strict";var d=Function.prototype.toString,x=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,S,E;if(typeof x=="function"&&typeof Object.defineProperty=="function")try{S=Object.defineProperty({},"length",{get:function(){throw E}}),E={},x(function(){throw 42},null,S)}catch(_){_!==E&&(x=null)}else x=null;var e=/^\s*class\b/,t=function(w){try{var A=d.call(w);return e.test(A)}catch{return!1}},r=function(w){try{return t(w)?!1:(d.call(w),!0)}catch{return!1}},o=Object.prototype.toString,a="[object Object]",n="[object Function]",i="[object GeneratorFunction]",s="[object HTMLAllCollection]",h="[object HTML document.all class]",f="[object HTMLCollection]",v=typeof Symbol=="function"&&!!Symbol.toStringTag,c=!(0 in[,]),T=function(){return!1};typeof document=="object"&&(l=document.all,o.call(l)===o.call(document.all)&&(T=function(w){if((c||!w)&&(typeof w>"u"||typeof w=="object"))try{var A=o.call(w);return(A===s||A===h||A===f||A===a)&&w("")==null}catch{}return!1}));var l;V.exports=x?function(w){if(T(w))return!0;if(!w||typeof w!="function"&&typeof w!="object")return!1;try{x(w,null,S)}catch(A){if(A!==E)return!1}return!t(w)&&r(w)}:function(w){if(T(w))return!0;if(!w||typeof w!="function"&&typeof w!="object")return!1;if(v)return r(w);if(t(w))return!1;var A=o.call(w);return A!==n&&A!==i&&!/^\[object HTML/.test(A)?!1:r(w)}}}),qS=He({"node_modules/for-each/index.js"(Z,V){"use strict";var d=OO(),x=Object.prototype.toString,S=Object.prototype.hasOwnProperty,E=function(a,n,i){for(var s=0,h=a.length;s=3&&(s=i),x.call(a)==="[object Array]"?E(a,n,s):typeof a=="string"?e(a,n,s):t(a,n,s)};V.exports=r}}),VS=He({"node_modules/available-typed-arrays/index.js"(Z,V){"use strict";var d=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],x=typeof globalThis>"u"?window:globalThis;V.exports=function(){for(var E=[],e=0;e"u"?window:globalThis,a=x(),n=E("String.prototype.slice"),i=Object.getPrototypeOf,s=E("Array.prototype.indexOf",!0)||function(T,l){for(var _=0;_-1?l:l!=="Object"?!1:v(T)}return e?f(T):null}}}),NO=He({"node_modules/is-typed-array/index.js"(Z,V){"use strict";var d=qS(),x=VS(),S=y1(),E=S("Object.prototype.toString"),e=W_()(),t=ag(),r=typeof globalThis>"u"?window:globalThis,o=x(),a=S("Array.prototype.indexOf",!0)||function(v,c){for(var T=0;T-1}return t?h(v):!1}}}),GS=He({"node_modules/util/support/types.js"(Z){"use strict";var V=zO(),d=FO(),x=BO(),S=NO();function E(Se){return Se.call.bind(Se)}var e=typeof BigInt<"u",t=typeof Symbol<"u",r=E(Object.prototype.toString),o=E(Number.prototype.valueOf),a=E(String.prototype.valueOf),n=E(Boolean.prototype.valueOf);e&&(i=E(BigInt.prototype.valueOf));var i;t&&(s=E(Symbol.prototype.valueOf));var s;function h(Se,Ie){if(typeof Se!="object")return!1;try{return Ie(Se),!0}catch{return!1}}Z.isArgumentsObject=V,Z.isGeneratorFunction=d,Z.isTypedArray=S;function f(Se){return typeof Promise<"u"&&Se instanceof Promise||Se!==null&&typeof Se=="object"&&typeof Se.then=="function"&&typeof Se.catch=="function"}Z.isPromise=f;function v(Se){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(Se):S(Se)||X(Se)}Z.isArrayBufferView=v;function c(Se){return x(Se)==="Uint8Array"}Z.isUint8Array=c;function T(Se){return x(Se)==="Uint8ClampedArray"}Z.isUint8ClampedArray=T;function l(Se){return x(Se)==="Uint16Array"}Z.isUint16Array=l;function _(Se){return x(Se)==="Uint32Array"}Z.isUint32Array=_;function w(Se){return x(Se)==="Int8Array"}Z.isInt8Array=w;function A(Se){return x(Se)==="Int16Array"}Z.isInt16Array=A;function M(Se){return x(Se)==="Int32Array"}Z.isInt32Array=M;function g(Se){return x(Se)==="Float32Array"}Z.isFloat32Array=g;function b(Se){return x(Se)==="Float64Array"}Z.isFloat64Array=b;function p(Se){return x(Se)==="BigInt64Array"}Z.isBigInt64Array=p;function u(Se){return x(Se)==="BigUint64Array"}Z.isBigUint64Array=u;function y(Se){return r(Se)==="[object Map]"}y.working=typeof Map<"u"&&y(new Map);function m(Se){return typeof Map>"u"?!1:y.working?y(Se):Se instanceof Map}Z.isMap=m;function R(Se){return r(Se)==="[object Set]"}R.working=typeof Set<"u"&&R(new Set);function L(Se){return typeof Set>"u"?!1:R.working?R(Se):Se instanceof Set}Z.isSet=L;function z(Se){return r(Se)==="[object WeakMap]"}z.working=typeof WeakMap<"u"&&z(new WeakMap);function F(Se){return typeof WeakMap>"u"?!1:z.working?z(Se):Se instanceof WeakMap}Z.isWeakMap=F;function N(Se){return r(Se)==="[object WeakSet]"}N.working=typeof WeakSet<"u"&&N(new WeakSet);function O(Se){return N(Se)}Z.isWeakSet=O;function P(Se){return r(Se)==="[object ArrayBuffer]"}P.working=typeof ArrayBuffer<"u"&&P(new ArrayBuffer);function U(Se){return typeof ArrayBuffer>"u"?!1:P.working?P(Se):Se instanceof ArrayBuffer}Z.isArrayBuffer=U;function B(Se){return r(Se)==="[object DataView]"}B.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&B(new DataView(new ArrayBuffer(1),0,1));function X(Se){return typeof DataView>"u"?!1:B.working?B(Se):Se instanceof DataView}Z.isDataView=X;var $=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function le(Se){return r(Se)==="[object SharedArrayBuffer]"}function ce(Se){return typeof $>"u"?!1:(typeof le.working>"u"&&(le.working=le(new $)),le.working?le(Se):Se instanceof $)}Z.isSharedArrayBuffer=ce;function de(Se){return r(Se)==="[object AsyncFunction]"}Z.isAsyncFunction=de;function G(Se){return r(Se)==="[object Map Iterator]"}Z.isMapIterator=G;function Y(Se){return r(Se)==="[object Set Iterator]"}Z.isSetIterator=Y;function ee(Se){return r(Se)==="[object Generator]"}Z.isGeneratorObject=ee;function q(Se){return r(Se)==="[object WebAssembly.Module]"}Z.isWebAssemblyCompiledModule=q;function se(Se){return h(Se,o)}Z.isNumberObject=se;function ae(Se){return h(Se,a)}Z.isStringObject=ae;function j(Se){return h(Se,n)}Z.isBooleanObject=j;function Q(Se){return e&&h(Se,i)}Z.isBigIntObject=Q;function re(Se){return t&&h(Se,s)}Z.isSymbolObject=re;function pe(Se){return se(Se)||ae(Se)||j(Se)||Q(Se)||re(Se)}Z.isBoxedPrimitive=pe;function we(Se){return typeof Uint8Array<"u"&&(U(Se)||ce(Se))}Z.isAnyArrayBuffer=we,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(Se){Object.defineProperty(Z,Se,{enumerable:!1,value:function(){throw new Error(Se+" is not supported in userland")}})})}}),HS=He({"node_modules/util/support/isBufferBrowser.js"(Z,V){V.exports=function(x){return x&&typeof x=="object"&&typeof x.copy=="function"&&typeof x.fill=="function"&&typeof x.readUInt8=="function"}}}),WS=He({"(disabled):node_modules/util/util.js"(Z){var V=Object.getOwnPropertyDescriptors||function(X){for(var $=Object.keys(X),le={},ce=0;ce<$.length;ce++)le[$[ce]]=Object.getOwnPropertyDescriptor(X,$[ce]);return le},d=/%[sdj%]/g;Z.format=function(B){if(!w(B)){for(var X=[],$=0;$=ce)return Y;switch(Y){case"%s":return String(le[$++]);case"%d":return Number(le[$++]);case"%j":try{return JSON.stringify(le[$++])}catch{return"[Circular]"}default:return Y}}),G=le[$];$"u")return function(){return Z.deprecate(B,X).apply(this,arguments)};var $=!1;function le(){if(!$){if(process.throwDeprecation)throw new Error(X);process.traceDeprecation?console.trace(X):console.error(X),$=!0}return B.apply(this,arguments)}return le};var x={},S=/^$/;E="false",E=E.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),S=new RegExp("^"+E+"$","i");var E;Z.debuglog=function(B){if(B=B.toUpperCase(),!x[B])if(S.test(B)){var X=process.pid;x[B]=function(){var $=Z.format.apply(Z,arguments);console.error("%s %d: %s",B,X,$)}}else x[B]=function(){};return x[B]};function e(B,X){var $={seen:[],stylize:r};return arguments.length>=3&&($.depth=arguments[2]),arguments.length>=4&&($.colors=arguments[3]),c(X)?$.showHidden=X:X&&Z._extend($,X),M($.showHidden)&&($.showHidden=!1),M($.depth)&&($.depth=2),M($.colors)&&($.colors=!1),M($.customInspect)&&($.customInspect=!0),$.colors&&($.stylize=t),a($,B,$.depth)}Z.inspect=e,e.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},e.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function t(B,X){var $=e.styles[X];return $?"\x1B["+e.colors[$][0]+"m"+B+"\x1B["+e.colors[$][1]+"m":B}function r(B,X){return B}function o(B){var X={};return B.forEach(function($,le){X[$]=!0}),X}function a(B,X,$){if(B.customInspect&&X&&y(X.inspect)&&X.inspect!==Z.inspect&&!(X.constructor&&X.constructor.prototype===X)){var le=X.inspect($,B);return w(le)||(le=a(B,le,$)),le}var ce=n(B,X);if(ce)return ce;var de=Object.keys(X),G=o(de);if(B.showHidden&&(de=Object.getOwnPropertyNames(X)),u(X)&&(de.indexOf("message")>=0||de.indexOf("description")>=0))return i(X);if(de.length===0){if(y(X)){var Y=X.name?": "+X.name:"";return B.stylize("[Function"+Y+"]","special")}if(g(X))return B.stylize(RegExp.prototype.toString.call(X),"regexp");if(p(X))return B.stylize(Date.prototype.toString.call(X),"date");if(u(X))return i(X)}var ee="",q=!1,se=["{","}"];if(v(X)&&(q=!0,se=["[","]"]),y(X)){var ae=X.name?": "+X.name:"";ee=" [Function"+ae+"]"}if(g(X)&&(ee=" "+RegExp.prototype.toString.call(X)),p(X)&&(ee=" "+Date.prototype.toUTCString.call(X)),u(X)&&(ee=" "+i(X)),de.length===0&&(!q||X.length==0))return se[0]+ee+se[1];if($<0)return g(X)?B.stylize(RegExp.prototype.toString.call(X),"regexp"):B.stylize("[Object]","special");B.seen.push(X);var j;return q?j=s(B,X,$,G,de):j=de.map(function(Q){return h(B,X,$,G,Q,q)}),B.seen.pop(),f(j,ee,se)}function n(B,X){if(M(X))return B.stylize("undefined","undefined");if(w(X)){var $="'"+JSON.stringify(X).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return B.stylize($,"string")}if(_(X))return B.stylize(""+X,"number");if(c(X))return B.stylize(""+X,"boolean");if(T(X))return B.stylize("null","null")}function i(B){return"["+Error.prototype.toString.call(B)+"]"}function s(B,X,$,le,ce){for(var de=[],G=0,Y=X.length;G-1&&(de?Y=Y.split(` `).map(function(q){return" "+q}).join(` `).slice(2):Y=` `+Y.split(` `).map(function(q){return" "+q}).join(` `))):Y=B.stylize("[Circular]","special")),M(G)){if(de&&ce.match(/^\d+$/))return Y;G=JSON.stringify(""+ce),G.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(G=G.slice(1,-1),G=B.stylize(G,"name")):(G=G.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),G=B.stylize(G,"string"))}return G+": "+Y}function f(B,X,$){var le=0,ce=B.reduce(function(de,G){return le++,G.indexOf(` `)>=0&&le++,de+G.replace(/\u001b\[\d\d?m/g,"").length+1},0);return ce>60?$[0]+(X===""?"":X+` `)+" "+B.join(`, `)+" "+$[1]:$[0]+X+" "+B.join(", ")+" "+$[1]}Z.types=GS();function v(B){return Array.isArray(B)}Z.isArray=v;function c(B){return typeof B=="boolean"}Z.isBoolean=c;function T(B){return B===null}Z.isNull=T;function l(B){return B==null}Z.isNullOrUndefined=l;function _(B){return typeof B=="number"}Z.isNumber=_;function w(B){return typeof B=="string"}Z.isString=w;function A(B){return typeof B=="symbol"}Z.isSymbol=A;function M(B){return B===void 0}Z.isUndefined=M;function g(B){return b(B)&&R(B)==="[object RegExp]"}Z.isRegExp=g,Z.types.isRegExp=g;function b(B){return typeof B=="object"&&B!==null}Z.isObject=b;function p(B){return b(B)&&R(B)==="[object Date]"}Z.isDate=p,Z.types.isDate=p;function u(B){return b(B)&&(R(B)==="[object Error]"||B instanceof Error)}Z.isError=u,Z.types.isNativeError=u;function y(B){return typeof B=="function"}Z.isFunction=y;function m(B){return B===null||typeof B=="boolean"||typeof B=="number"||typeof B=="string"||typeof B=="symbol"||typeof B>"u"}Z.isPrimitive=m,Z.isBuffer=HS();function R(B){return Object.prototype.toString.call(B)}function L(B){return B<10?"0"+B.toString(10):B.toString(10)}var z=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function F(){var B=new Date,X=[L(B.getHours()),L(B.getMinutes()),L(B.getSeconds())].join(":");return[B.getDate(),z[B.getMonth()],X].join(" ")}Z.log=function(){console.log("%s - %s",F(),Z.format.apply(Z,arguments))},Z.inherits=Kv(),Z._extend=function(B,X){if(!X||!b(X))return B;for(var $=Object.keys(X),le=$.length;le--;)B[$[le]]=X[$[le]];return B};function N(B,X){return Object.prototype.hasOwnProperty.call(B,X)}var O=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;Z.promisify=function(X){if(typeof X!="function")throw new TypeError('The "original" argument must be of type Function');if(O&&X[O]){var $=X[O];if(typeof $!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty($,O,{value:$,enumerable:!1,writable:!1,configurable:!0}),$}function $(){for(var le,ce,de=new Promise(function(ee,q){le=ee,ce=q}),G=[],Y=0;Y0?this.tail.next=c:this.head=c,this.tail=c,++this.length}},{key:"unshift",value:function(v){var c={data:v,next:this.head};this.length===0&&(this.tail=c),this.head=c,++this.length}},{key:"shift",value:function(){if(this.length!==0){var v=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,v}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(v){if(this.length===0)return"";for(var c=this.head,T=""+c.data;c=c.next;)T+=v+c.data;return T}},{key:"concat",value:function(v){if(this.length===0)return o.alloc(0);for(var c=o.allocUnsafe(v>>>0),T=this.head,l=0;T;)s(T.data,c,l),l+=T.data.length,T=T.next;return c}},{key:"consume",value:function(v,c){var T;return v_.length?_.length:v;if(w===_.length?l+=_:l+=_.slice(0,v),v-=w,v===0){w===_.length?(++T,c.next?this.head=c.next:this.head=this.tail=null):(this.head=c,c.data=_.slice(w));break}++T}return this.length-=T,l}},{key:"_getBuffer",value:function(v){var c=o.allocUnsafe(v),T=this.head,l=1;for(T.data.copy(c),v-=T.data.length;T=T.next;){var _=T.data,w=v>_.length?_.length:v;if(_.copy(c,c.length-v,0,w),v-=w,v===0){w===_.length?(++l,T.next?this.head=T.next:this.head=this.tail=null):(this.head=T,T.data=_.slice(w));break}++l}return this.length-=l,c}},{key:i,value:function(v,c){return n(this,x({},c,{depth:0,customInspect:!1}))}}]),h}()}}),XS=He({"node_modules/stream-browserify/node_modules/readable-stream/lib/internal/streams/destroy.js"(Z,V){"use strict";function d(r,o){var a=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?(o?o(r):r&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(e,this,r)):process.nextTick(e,this,r)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(r||null,function(s){!o&&s?a._writableState?a._writableState.errorEmitted?process.nextTick(S,a):(a._writableState.errorEmitted=!0,process.nextTick(x,a,s)):process.nextTick(x,a,s):o?(process.nextTick(S,a),o(s)):process.nextTick(S,a)}),this)}function x(r,o){e(r,o),S(r)}function S(r){r._writableState&&!r._writableState.emitClose||r._readableState&&!r._readableState.emitClose||r.emit("close")}function E(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function e(r,o){r.emit("error",o)}function t(r,o){var a=r._readableState,n=r._writableState;a&&a.autoDestroy||n&&n.autoDestroy?r.destroy(o):r.emit("error",o)}V.exports={destroy:d,undestroy:E,errorOrDestroy:t}}}),ig=He({"node_modules/stream-browserify/node_modules/readable-stream/errors-browser.js"(Z,V){"use strict";function d(o,a){o.prototype=Object.create(a.prototype),o.prototype.constructor=o,o.__proto__=a}var x={};function S(o,a,n){n||(n=Error);function i(h,f,v){return typeof a=="string"?a:a(h,f,v)}var s=function(h){d(f,h);function f(v,c,T){return h.call(this,i(v,c,T))||this}return f}(n);s.prototype.name=n.name,s.prototype.code=o,x[o]=s}function E(o,a){if(Array.isArray(o)){var n=o.length;return o=o.map(function(i){return String(i)}),n>2?"one of ".concat(a," ").concat(o.slice(0,n-1).join(", "),", or ")+o[n-1]:n===2?"one of ".concat(a," ").concat(o[0]," or ").concat(o[1]):"of ".concat(a," ").concat(o[0])}else return"of ".concat(a," ").concat(String(o))}function e(o,a,n){return o.substr(!n||n<0?0:+n,a.length)===a}function t(o,a,n){return(n===void 0||n>o.length)&&(n=o.length),o.substring(n-a.length,n)===a}function r(o,a,n){return typeof n!="number"&&(n=0),n+a.length>o.length?!1:o.indexOf(a,n)!==-1}S("ERR_INVALID_OPT_VALUE",function(o,a){return'The value "'+a+'" is invalid for option "'+o+'"'},TypeError),S("ERR_INVALID_ARG_TYPE",function(o,a,n){var i;typeof a=="string"&&e(a,"not ")?(i="must not be",a=a.replace(/^not /,"")):i="must be";var s;if(t(o," argument"))s="The ".concat(o," ").concat(i," ").concat(E(a,"type"));else{var h=r(o,".")?"property":"argument";s='The "'.concat(o,'" ').concat(h," ").concat(i," ").concat(E(a,"type"))}return s+=". Received type ".concat(typeof n),s},TypeError),S("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),S("ERR_METHOD_NOT_IMPLEMENTED",function(o){return"The "+o+" method is not implemented"}),S("ERR_STREAM_PREMATURE_CLOSE","Premature close"),S("ERR_STREAM_DESTROYED",function(o){return"Cannot call "+o+" after a stream was destroyed"}),S("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),S("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),S("ERR_STREAM_WRITE_AFTER_END","write after end"),S("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),S("ERR_UNKNOWN_ENCODING",function(o){return"Unknown encoding: "+o},TypeError),S("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),V.exports.codes=x}}),ZS=He({"node_modules/stream-browserify/node_modules/readable-stream/lib/internal/streams/state.js"(Z,V){"use strict";var d=ig().codes.ERR_INVALID_OPT_VALUE;function x(E,e,t){return E.highWaterMark!=null?E.highWaterMark:e?E[t]:null}function S(E,e,t,r){var o=x(e,r,t);if(o!=null){if(!(isFinite(o)&&Math.floor(o)===o)||o<0){var a=r?t:"highWaterMark";throw new d(a,o)}return Math.floor(o)}return E.objectMode?16:16*1024}V.exports={getHighWaterMark:S}}}),jO=He({"node_modules/util-deprecate/browser.js"(Z,V){V.exports=d;function d(S,E){if(x("noDeprecation"))return S;var e=!1;function t(){if(!e){if(x("throwDeprecation"))throw new Error(E);x("traceDeprecation")?console.trace(E):console.warn(E),e=!0}return S.apply(this,arguments)}return t}function x(S){try{if(!window.localStorage)return!1}catch{return!1}var E=window.localStorage[S];return E==null?!1:String(E).toLowerCase()==="true"}}}),YS=He({"node_modules/stream-browserify/node_modules/readable-stream/lib/_stream_writable.js"(Z,V){"use strict";V.exports=p;function d(G){var Y=this;this.next=null,this.entry=null,this.finish=function(){de(Y,G)}}var x;p.WritableState=g;var S={deprecate:jO()},E=zS(),e=rg().Buffer,t=window.Uint8Array||function(){};function r(G){return e.from(G)}function o(G){return e.isBuffer(G)||G instanceof t}var a=XS(),n=ZS(),i=n.getHighWaterMark,s=ig().codes,h=s.ERR_INVALID_ARG_TYPE,f=s.ERR_METHOD_NOT_IMPLEMENTED,v=s.ERR_MULTIPLE_CALLBACK,c=s.ERR_STREAM_CANNOT_PIPE,T=s.ERR_STREAM_DESTROYED,l=s.ERR_STREAM_NULL_VALUES,_=s.ERR_STREAM_WRITE_AFTER_END,w=s.ERR_UNKNOWN_ENCODING,A=a.errorOrDestroy;Kv()(p,E);function M(){}function g(G,Y,ee){x=x||ng(),G=G||{},typeof ee!="boolean"&&(ee=Y instanceof x),this.objectMode=!!G.objectMode,ee&&(this.objectMode=this.objectMode||!!G.writableObjectMode),this.highWaterMark=i(this,G,"writableHighWaterMark",ee),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var q=G.decodeStrings===!1;this.decodeStrings=!q,this.defaultEncoding=G.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(se){N(Y,se)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=G.emitClose!==!1,this.autoDestroy=!!G.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new d(this)}g.prototype.getBuffer=function(){for(var Y=this.bufferedRequest,ee=[];Y;)ee.push(Y),Y=Y.next;return ee},function(){try{Object.defineProperty(g.prototype,"buffer",{get:S.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var b;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(b=Function.prototype[Symbol.hasInstance],Object.defineProperty(p,Symbol.hasInstance,{value:function(Y){return b.call(this,Y)?!0:this!==p?!1:Y&&Y._writableState instanceof g}})):b=function(Y){return Y instanceof this};function p(G){x=x||ng();var Y=this instanceof x;if(!Y&&!b.call(p,this))return new p(G);this._writableState=new g(G,this,Y),this.writable=!0,G&&(typeof G.write=="function"&&(this._write=G.write),typeof G.writev=="function"&&(this._writev=G.writev),typeof G.destroy=="function"&&(this._destroy=G.destroy),typeof G.final=="function"&&(this._final=G.final)),E.call(this)}p.prototype.pipe=function(){A(this,new c)};function u(G,Y){var ee=new _;A(G,ee),process.nextTick(Y,ee)}function y(G,Y,ee,q){var se;return ee===null?se=new l:typeof ee!="string"&&!Y.objectMode&&(se=new h("chunk",["string","Buffer"],ee)),se?(A(G,se),process.nextTick(q,se),!1):!0}p.prototype.write=function(G,Y,ee){var q=this._writableState,se=!1,ae=!q.objectMode&&o(G);return ae&&!e.isBuffer(G)&&(G=r(G)),typeof Y=="function"&&(ee=Y,Y=null),ae?Y="buffer":Y||(Y=q.defaultEncoding),typeof ee!="function"&&(ee=M),q.ending?u(this,ee):(ae||y(this,q,G,ee))&&(q.pendingcb++,se=R(this,q,ae,G,Y,ee)),se},p.prototype.cork=function(){this._writableState.corked++},p.prototype.uncork=function(){var G=this._writableState;G.corked&&(G.corked--,!G.writing&&!G.corked&&!G.bufferProcessing&&G.bufferedRequest&&U(this,G))},p.prototype.setDefaultEncoding=function(Y){if(typeof Y=="string"&&(Y=Y.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((Y+"").toLowerCase())>-1))throw new w(Y);return this._writableState.defaultEncoding=Y,this},Object.defineProperty(p.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function m(G,Y,ee){return!G.objectMode&&G.decodeStrings!==!1&&typeof Y=="string"&&(Y=e.from(Y,ee)),Y}Object.defineProperty(p.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function R(G,Y,ee,q,se,ae){if(!ee){var j=m(Y,q,se);q!==j&&(ee=!0,se="buffer",q=j)}var Q=Y.objectMode?1:q.length;Y.length+=Q;var re=Y.length>5===6?2:T>>4===14?3:T>>3===30?4:T>>6===2?-1:-2}function t(T,l,_){var w=l.length-1;if(w<_)return 0;var A=e(l[w]);return A>=0?(A>0&&(T.lastNeed=A-1),A):--w<_||A===-2?0:(A=e(l[w]),A>=0?(A>0&&(T.lastNeed=A-2),A):--w<_||A===-2?0:(A=e(l[w]),A>=0?(A>0&&(A===2?A=0:T.lastNeed=A-3),A):0))}function r(T,l,_){if((l[0]&192)!==128)return T.lastNeed=0,"\uFFFD";if(T.lastNeed>1&&l.length>1){if((l[1]&192)!==128)return T.lastNeed=1,"\uFFFD";if(T.lastNeed>2&&l.length>2&&(l[2]&192)!==128)return T.lastNeed=2,"\uFFFD"}}function o(T){var l=this.lastTotal-this.lastNeed,_=r(this,T,l);if(_!==void 0)return _;if(this.lastNeed<=T.length)return T.copy(this.lastChar,l,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);T.copy(this.lastChar,l,0,T.length),this.lastNeed-=T.length}function a(T,l){var _=t(this,T,l);if(!this.lastNeed)return T.toString("utf8",l);this.lastTotal=_;var w=T.length-(_-this.lastNeed);return T.copy(this.lastChar,0,w),T.toString("utf8",l,w)}function n(T){var l=T&&T.length?this.write(T):"";return this.lastNeed?l+"\uFFFD":l}function i(T,l){if((T.length-l)%2===0){var _=T.toString("utf16le",l);if(_){var w=_.charCodeAt(_.length-1);if(w>=55296&&w<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=T[T.length-2],this.lastChar[1]=T[T.length-1],_.slice(0,-1)}return _}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=T[T.length-1],T.toString("utf16le",l,T.length-1)}function s(T){var l=T&&T.length?this.write(T):"";if(this.lastNeed){var _=this.lastTotal-this.lastNeed;return l+this.lastChar.toString("utf16le",0,_)}return l}function h(T,l){var _=(T.length-l)%3;return _===0?T.toString("base64",l):(this.lastNeed=3-_,this.lastTotal=3,_===1?this.lastChar[0]=T[T.length-1]:(this.lastChar[0]=T[T.length-2],this.lastChar[1]=T[T.length-1]),T.toString("base64",l,T.length-_))}function f(T){var l=T&&T.length?this.write(T):"";return this.lastNeed?l+this.lastChar.toString("base64",0,3-this.lastNeed):l}function v(T){return T.toString(this.encoding)}function c(T){return T&&T.length?this.write(T):""}}}),m3=He({"node_modules/stream-browserify/node_modules/readable-stream/lib/internal/streams/end-of-stream.js"(Z,V){"use strict";var d=ig().codes.ERR_STREAM_PREMATURE_CLOSE;function x(t){var r=!1;return function(){if(!r){r=!0;for(var o=arguments.length,a=new Array(o),n=0;n0)if(typeof Q!="string"&&!Se.objectMode&&Object.getPrototypeOf(Q)!==e.prototype&&(Q=r(Q)),pe)Se.endEmitted?g(j,new _):R(j,Se,Q,!0);else if(Se.ended)g(j,new T);else{if(Se.destroyed)return!1;Se.reading=!1,Se.decoder&&!re?(Q=Se.decoder.write(Q),Se.objectMode||Q.length!==0?R(j,Se,Q,!1):B(j,Se)):R(j,Se,Q,!1)}else pe||(Se.reading=!1,B(j,Se))}return!Se.ended&&(Se.length=z?j=z:(j--,j|=j>>>1,j|=j>>>2,j|=j>>>4,j|=j>>>8,j|=j>>>16,j++),j}function N(j,Q){return j<=0||Q.length===0&&Q.ended?0:Q.objectMode?1:j!==j?Q.flowing&&Q.length?Q.buffer.head.data.length:Q.length:(j>Q.highWaterMark&&(Q.highWaterMark=F(j)),j<=Q.length?j:Q.ended?Q.length:(Q.needReadable=!0,0))}y.prototype.read=function(j){n("read",j),j=parseInt(j,10);var Q=this._readableState,re=j;if(j!==0&&(Q.emittedReadable=!1),j===0&&Q.needReadable&&((Q.highWaterMark!==0?Q.length>=Q.highWaterMark:Q.length>0)||Q.ended))return n("read: emitReadable",Q.length,Q.ended),Q.length===0&&Q.ended?q(this):P(this),null;if(j=N(j,Q),j===0&&Q.ended)return Q.length===0&&q(this),null;var pe=Q.needReadable;n("need readable",pe),(Q.length===0||Q.length-j0?we=ee(j,Q):we=null,we===null?(Q.needReadable=Q.length<=Q.highWaterMark,j=0):(Q.length-=j,Q.awaitDrain=0),Q.length===0&&(Q.ended||(Q.needReadable=!0),re!==j&&Q.ended&&q(this)),we!==null&&this.emit("data",we),we};function O(j,Q){if(n("onEofChunk"),!Q.ended){if(Q.decoder){var re=Q.decoder.end();re&&re.length&&(Q.buffer.push(re),Q.length+=Q.objectMode?1:re.length)}Q.ended=!0,Q.sync?P(j):(Q.needReadable=!1,Q.emittedReadable||(Q.emittedReadable=!0,U(j)))}}function P(j){var Q=j._readableState;n("emitReadable",Q.needReadable,Q.emittedReadable),Q.needReadable=!1,Q.emittedReadable||(n("emitReadable",Q.flowing),Q.emittedReadable=!0,process.nextTick(U,j))}function U(j){var Q=j._readableState;n("emitReadable_",Q.destroyed,Q.length,Q.ended),!Q.destroyed&&(Q.length||Q.ended)&&(j.emit("readable"),Q.emittedReadable=!1),Q.needReadable=!Q.flowing&&!Q.ended&&Q.length<=Q.highWaterMark,Y(j)}function B(j,Q){Q.readingMore||(Q.readingMore=!0,process.nextTick(X,j,Q))}function X(j,Q){for(;!Q.reading&&!Q.ended&&(Q.length1&&ae(pe.pipes,j)!==-1)&&!at&&(n("false write response, pause",pe.awaitDrain),pe.awaitDrain++),re.pause())}function qe(Ce){n("onerror",Ce),ne(),j.removeListener("error",qe),S(j,"error")===0&&g(j,Ce)}p(j,"error",qe);function he(){j.removeListener("finish",ue),ne()}j.once("close",he);function ue(){n("onfinish"),j.removeListener("close",he),ne()}j.once("finish",ue);function ne(){n("unpipe"),re.unpipe(j)}return j.emit("pipe",re),pe.flowing||(n("pipe resume"),re.resume()),j};function $(j){return function(){var re=j._readableState;n("pipeOnDrain",re.awaitDrain),re.awaitDrain&&re.awaitDrain--,re.awaitDrain===0&&S(j,"data")&&(re.flowing=!0,Y(j))}}y.prototype.unpipe=function(j){var Q=this._readableState,re={hasUnpiped:!1};if(Q.pipesCount===0)return this;if(Q.pipesCount===1)return j&&j!==Q.pipes?this:(j||(j=Q.pipes),Q.pipes=null,Q.pipesCount=0,Q.flowing=!1,j&&j.emit("unpipe",this,re),this);if(!j){var pe=Q.pipes,we=Q.pipesCount;Q.pipes=null,Q.pipesCount=0,Q.flowing=!1;for(var Se=0;Se0,pe.flowing!==!1&&this.resume()):j==="readable"&&!pe.endEmitted&&!pe.readableListening&&(pe.readableListening=pe.needReadable=!0,pe.flowing=!1,pe.emittedReadable=!1,n("on readable",pe.length,pe.reading),pe.length?P(this):pe.reading||process.nextTick(ce,this)),re},y.prototype.addListener=y.prototype.on,y.prototype.removeListener=function(j,Q){var re=E.prototype.removeListener.call(this,j,Q);return j==="readable"&&process.nextTick(le,this),re},y.prototype.removeAllListeners=function(j){var Q=E.prototype.removeAllListeners.apply(this,arguments);return(j==="readable"||j===void 0)&&process.nextTick(le,this),Q};function le(j){var Q=j._readableState;Q.readableListening=j.listenerCount("readable")>0,Q.resumeScheduled&&!Q.paused?Q.flowing=!0:j.listenerCount("data")>0&&j.resume()}function ce(j){n("readable nexttick read 0"),j.read(0)}y.prototype.resume=function(){var j=this._readableState;return j.flowing||(n("resume"),j.flowing=!j.readableListening,de(this,j)),j.paused=!1,this};function de(j,Q){Q.resumeScheduled||(Q.resumeScheduled=!0,process.nextTick(G,j,Q))}function G(j,Q){n("resume",Q.reading),Q.reading||j.read(0),Q.resumeScheduled=!1,j.emit("resume"),Y(j),Q.flowing&&!Q.reading&&j.read(0)}y.prototype.pause=function(){return n("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(n("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function Y(j){var Q=j._readableState;for(n("flow",Q.flowing);Q.flowing&&j.read()!==null;);}y.prototype.wrap=function(j){var Q=this,re=this._readableState,pe=!1;j.on("end",function(){if(n("wrapped end"),re.decoder&&!re.ended){var Ie=re.decoder.end();Ie&&Ie.length&&Q.push(Ie)}Q.push(null)}),j.on("data",function(Ie){if(n("wrapped data"),re.decoder&&(Ie=re.decoder.write(Ie)),!(re.objectMode&&Ie==null)&&!(!re.objectMode&&(!Ie||!Ie.length))){var Re=Q.push(Ie);Re||(pe=!0,j.pause())}});for(var we in j)this[we]===void 0&&typeof j[we]=="function"&&(this[we]=function(Re){return function(){return j[Re].apply(j,arguments)}}(we));for(var Se=0;Se=Q.length?(Q.decoder?re=Q.buffer.join(""):Q.buffer.length===1?re=Q.buffer.first():re=Q.buffer.concat(Q.length),Q.buffer.clear()):re=Q.buffer.consume(j,Q.decoder),re}function q(j){var Q=j._readableState;n("endReadable",Q.endEmitted),Q.endEmitted||(Q.ended=!0,process.nextTick(se,Q,j))}function se(j,Q){if(n("endReadableNT",j.endEmitted,j.length),!j.endEmitted&&j.length===0&&(j.endEmitted=!0,Q.readable=!1,Q.emit("end"),j.autoDestroy)){var re=Q._writableState;(!re||re.autoDestroy&&re.finished)&&Q.destroy()}}typeof Symbol=="function"&&(y.from=function(j,Q){return M===void 0&&(M=GO()),M(y,j,Q)});function ae(j,Q){for(var re=0,pe=j.length;re0;return o(_,A,M,function(g){T||(T=g),g&&l.forEach(a),!A&&(l.forEach(a),c(T))})});return f.reduce(n)}V.exports=s}}),XO=He({"node_modules/stream-browserify/index.js"(Z,V){V.exports=S;var d=Z0().EventEmitter,x=Kv();x(S,d),S.Readable=JS(),S.Writable=YS(),S.Duplex=ng(),S.Transform=$S(),S.PassThrough=HO(),S.finished=m3(),S.pipeline=WO(),S.Stream=S;function S(){d.call(this)}S.prototype.pipe=function(E,e){var t=this;function r(f){E.writable&&E.write(f)===!1&&t.pause&&t.pause()}t.on("data",r);function o(){t.readable&&t.resume&&t.resume()}E.on("drain",o),!E._isStdio&&(!e||e.end!==!1)&&(t.on("end",n),t.on("close",i));var a=!1;function n(){a||(a=!0,E.end())}function i(){a||(a=!0,typeof E.destroy=="function"&&E.destroy())}function s(f){if(h(),d.listenerCount(this,"error")===0)throw f}t.on("error",s),E.on("error",s);function h(){t.removeListener("data",r),E.removeListener("drain",o),t.removeListener("end",n),t.removeListener("close",i),t.removeListener("error",s),E.removeListener("error",s),t.removeListener("end",h),t.removeListener("close",h),E.removeListener("close",h)}return t.on("end",h),t.on("close",h),E.on("close",h),E.emit("pipe",t),E}}}),_1=He({"node_modules/util/util.js"(Z){var V=Object.getOwnPropertyDescriptors||function(X){for(var $=Object.keys(X),le={},ce=0;ce<$.length;ce++)le[$[ce]]=Object.getOwnPropertyDescriptor(X,$[ce]);return le},d=/%[sdj%]/g;Z.format=function(B){if(!w(B)){for(var X=[],$=0;$=ce)return Y;switch(Y){case"%s":return String(le[$++]);case"%d":return Number(le[$++]);case"%j":try{return JSON.stringify(le[$++])}catch{return"[Circular]"}default:return Y}}),G=le[$];$"u")return function(){return Z.deprecate(B,X).apply(this,arguments)};var $=!1;function le(){if(!$){if(process.throwDeprecation)throw new Error(X);process.traceDeprecation?console.trace(X):console.error(X),$=!0}return B.apply(this,arguments)}return le};var x={},S=/^$/;E="false",E=E.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),S=new RegExp("^"+E+"$","i");var E;Z.debuglog=function(B){if(B=B.toUpperCase(),!x[B])if(S.test(B)){var X=process.pid;x[B]=function(){var $=Z.format.apply(Z,arguments);console.error("%s %d: %s",B,X,$)}}else x[B]=function(){};return x[B]};function e(B,X){var $={seen:[],stylize:r};return arguments.length>=3&&($.depth=arguments[2]),arguments.length>=4&&($.colors=arguments[3]),c(X)?$.showHidden=X:X&&Z._extend($,X),M($.showHidden)&&($.showHidden=!1),M($.depth)&&($.depth=2),M($.colors)&&($.colors=!1),M($.customInspect)&&($.customInspect=!0),$.colors&&($.stylize=t),a($,B,$.depth)}Z.inspect=e,e.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},e.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function t(B,X){var $=e.styles[X];return $?"\x1B["+e.colors[$][0]+"m"+B+"\x1B["+e.colors[$][1]+"m":B}function r(B,X){return B}function o(B){var X={};return B.forEach(function($,le){X[$]=!0}),X}function a(B,X,$){if(B.customInspect&&X&&y(X.inspect)&&X.inspect!==Z.inspect&&!(X.constructor&&X.constructor.prototype===X)){var le=X.inspect($,B);return w(le)||(le=a(B,le,$)),le}var ce=n(B,X);if(ce)return ce;var de=Object.keys(X),G=o(de);if(B.showHidden&&(de=Object.getOwnPropertyNames(X)),u(X)&&(de.indexOf("message")>=0||de.indexOf("description")>=0))return i(X);if(de.length===0){if(y(X)){var Y=X.name?": "+X.name:"";return B.stylize("[Function"+Y+"]","special")}if(g(X))return B.stylize(RegExp.prototype.toString.call(X),"regexp");if(p(X))return B.stylize(Date.prototype.toString.call(X),"date");if(u(X))return i(X)}var ee="",q=!1,se=["{","}"];if(v(X)&&(q=!0,se=["[","]"]),y(X)){var ae=X.name?": "+X.name:"";ee=" [Function"+ae+"]"}if(g(X)&&(ee=" "+RegExp.prototype.toString.call(X)),p(X)&&(ee=" "+Date.prototype.toUTCString.call(X)),u(X)&&(ee=" "+i(X)),de.length===0&&(!q||X.length==0))return se[0]+ee+se[1];if($<0)return g(X)?B.stylize(RegExp.prototype.toString.call(X),"regexp"):B.stylize("[Object]","special");B.seen.push(X);var j;return q?j=s(B,X,$,G,de):j=de.map(function(Q){return h(B,X,$,G,Q,q)}),B.seen.pop(),f(j,ee,se)}function n(B,X){if(M(X))return B.stylize("undefined","undefined");if(w(X)){var $="'"+JSON.stringify(X).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return B.stylize($,"string")}if(_(X))return B.stylize(""+X,"number");if(c(X))return B.stylize(""+X,"boolean");if(T(X))return B.stylize("null","null")}function i(B){return"["+Error.prototype.toString.call(B)+"]"}function s(B,X,$,le,ce){for(var de=[],G=0,Y=X.length;G-1&&(de?Y=Y.split(` `).map(function(q){return" "+q}).join(` `).slice(2):Y=` `+Y.split(` `).map(function(q){return" "+q}).join(` `))):Y=B.stylize("[Circular]","special")),M(G)){if(de&&ce.match(/^\d+$/))return Y;G=JSON.stringify(""+ce),G.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(G=G.slice(1,-1),G=B.stylize(G,"name")):(G=G.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),G=B.stylize(G,"string"))}return G+": "+Y}function f(B,X,$){var le=0,ce=B.reduce(function(de,G){return le++,G.indexOf(` `)>=0&&le++,de+G.replace(/\u001b\[\d\d?m/g,"").length+1},0);return ce>60?$[0]+(X===""?"":X+` `)+" "+B.join(`, `)+" "+$[1]:$[0]+X+" "+B.join(", ")+" "+$[1]}Z.types=GS();function v(B){return Array.isArray(B)}Z.isArray=v;function c(B){return typeof B=="boolean"}Z.isBoolean=c;function T(B){return B===null}Z.isNull=T;function l(B){return B==null}Z.isNullOrUndefined=l;function _(B){return typeof B=="number"}Z.isNumber=_;function w(B){return typeof B=="string"}Z.isString=w;function A(B){return typeof B=="symbol"}Z.isSymbol=A;function M(B){return B===void 0}Z.isUndefined=M;function g(B){return b(B)&&R(B)==="[object RegExp]"}Z.isRegExp=g,Z.types.isRegExp=g;function b(B){return typeof B=="object"&&B!==null}Z.isObject=b;function p(B){return b(B)&&R(B)==="[object Date]"}Z.isDate=p,Z.types.isDate=p;function u(B){return b(B)&&(R(B)==="[object Error]"||B instanceof Error)}Z.isError=u,Z.types.isNativeError=u;function y(B){return typeof B=="function"}Z.isFunction=y;function m(B){return B===null||typeof B=="boolean"||typeof B=="number"||typeof B=="string"||typeof B=="symbol"||typeof B>"u"}Z.isPrimitive=m,Z.isBuffer=HS();function R(B){return Object.prototype.toString.call(B)}function L(B){return B<10?"0"+B.toString(10):B.toString(10)}var z=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function F(){var B=new Date,X=[L(B.getHours()),L(B.getMinutes()),L(B.getSeconds())].join(":");return[B.getDate(),z[B.getMonth()],X].join(" ")}Z.log=function(){console.log("%s - %s",F(),Z.format.apply(Z,arguments))},Z.inherits=Kv(),Z._extend=function(B,X){if(!X||!b(X))return B;for(var $=Object.keys(X),le=$.length;le--;)B[$[le]]=X[$[le]];return B};function N(B,X){return Object.prototype.hasOwnProperty.call(B,X)}var O=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;Z.promisify=function(X){if(typeof X!="function")throw new TypeError('The "original" argument must be of type Function');if(O&&X[O]){var $=X[O];if(typeof $!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty($,O,{value:$,enumerable:!1,writable:!1,configurable:!0}),$}function $(){for(var le,ce,de=new Promise(function(ee,q){le=ee,ce=q}),G=[],Y=0;Y"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function h(M){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(b){return b.__proto__||Object.getPrototypeOf(b)},h(M)}var f={},v,c;function T(M,g,b){b||(b=Error);function p(y,m,R){return typeof g=="string"?g:g(y,m,R)}var u=function(y){r(R,y);var m=a(R);function R(L,z,F){var N;return t(this,R),N=m.call(this,p(L,z,F)),N.code=M,N}return S(R)}(b);f[M]=u}function l(M,g){if(Array.isArray(M)){var b=M.length;return M=M.map(function(p){return String(p)}),b>2?"one of ".concat(g," ").concat(M.slice(0,b-1).join(", "),", or ")+M[b-1]:b===2?"one of ".concat(g," ").concat(M[0]," or ").concat(M[1]):"of ".concat(g," ").concat(M[0])}else return"of ".concat(g," ").concat(String(M))}function _(M,g,b){return M.substr(!b||b<0?0:+b,g.length)===g}function w(M,g,b){return(b===void 0||b>M.length)&&(b=M.length),M.substring(b-g.length,b)===g}function A(M,g,b){return typeof b!="number"&&(b=0),b+g.length>M.length?!1:M.indexOf(g,b)!==-1}T("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),T("ERR_INVALID_ARG_TYPE",function(M,g,b){v===void 0&&(v=K_()),v(typeof M=="string","'name' must be a string");var p;typeof g=="string"&&_(g,"not ")?(p="must not be",g=g.replace(/^not /,"")):p="must be";var u;if(w(M," argument"))u="The ".concat(M," ").concat(p," ").concat(l(g,"type"));else{var y=A(M,".")?"property":"argument";u='The "'.concat(M,'" ').concat(y," ").concat(p," ").concat(l(g,"type"))}return u+=". Received type ".concat(d(b)),u},TypeError),T("ERR_INVALID_ARG_VALUE",function(M,g){var b=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";c===void 0&&(c=_1());var p=c.inspect(g);return p.length>128&&(p="".concat(p.slice(0,128),"...")),"The argument '".concat(M,"' ").concat(b,". Received ").concat(p)},TypeError,RangeError),T("ERR_INVALID_RETURN_VALUE",function(M,g,b){var p;return b&&b.constructor&&b.constructor.name?p="instance of ".concat(b.constructor.name):p="type ".concat(d(b)),"Expected ".concat(M,' to be returned from the "').concat(g,'"')+" function but got ".concat(p,".")},TypeError),T("ERR_MISSING_ARGS",function(){for(var M=arguments.length,g=new Array(M),b=0;b0,"At least one arg needs to be specified");var p="The ",u=g.length;switch(g=g.map(function(y){return'"'.concat(y,'"')}),u){case 1:p+="".concat(g[0]," argument");break;case 2:p+="".concat(g[0]," and ").concat(g[1]," arguments");break;default:p+=g.slice(0,u-1).join(", "),p+=", and ".concat(g[u-1]," arguments");break}return"".concat(p," must be specified")},TypeError),V.exports.codes=f}}),ZO=He({"node_modules/assert/build/internal/assert/assertion_error.js"(Z,V){"use strict";function d(U,B){var X=Object.keys(U);if(Object.getOwnPropertySymbols){var $=Object.getOwnPropertySymbols(U);B&&($=$.filter(function(le){return Object.getOwnPropertyDescriptor(U,le).enumerable})),X.push.apply(X,$)}return X}function x(U){for(var B=1;B"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function c(U){return Function.toString.call(U).indexOf("[native code]")!==-1}function T(U,B){return T=Object.setPrototypeOf?Object.setPrototypeOf.bind():function($,le){return $.__proto__=le,$},T(U,B)}function l(U){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(X){return X.__proto__||Object.getPrototypeOf(X)},l(U)}function _(U){"@babel/helpers - typeof";return _=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(B){return typeof B}:function(B){return B&&typeof Symbol=="function"&&B.constructor===Symbol&&B!==Symbol.prototype?"symbol":typeof B},_(U)}var w=_1(),A=w.inspect,M=QS(),g=M.codes.ERR_INVALID_ARG_TYPE;function b(U,B,X){return(X===void 0||X>U.length)&&(X=U.length),U.substring(X-B.length,X)===B}function p(U,B){if(B=Math.floor(B),U.length==0||B==0)return"";var X=U.length*B;for(B=Math.floor(Math.log(B)/Math.log(2));B;)U+=U,B--;return U+=U.substring(0,X-U.length),U}var u="",y="",m="",R="",L={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"},z=10;function F(U){var B=Object.keys(U),X=Object.create(Object.getPrototypeOf(U));return B.forEach(function($){X[$]=U[$]}),Object.defineProperty(X,"message",{value:U.message}),X}function N(U){return A(U,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function O(U,B,X){var $="",le="",ce=0,de="",G=!1,Y=N(U),ee=Y.split(` `),q=N(B).split(` `),se=0,ae="";if(X==="strictEqual"&&_(U)==="object"&&_(B)==="object"&&U!==null&&B!==null&&(X="strictEqualObject"),ee.length===1&&q.length===1&&ee[0]!==q[0]){var j=ee[0].length+q[0].length;if(j<=z){if((_(U)!=="object"||U===null)&&(_(B)!=="object"||B===null)&&(U!==0||B!==0))return"".concat(L[X],` `)+"".concat(ee[0]," !== ").concat(q[0],` `)}else if(X!=="strictEqualObject"){var Q=process.stderr&&process.stderr.isTTY?process.stderr.columns:80;if(j2&&(ae=` `.concat(p(" ",se),"^"),se=0)}}}for(var re=ee[ee.length-1],pe=q[q.length-1];re===pe&&(se++<2?de=` `.concat(re).concat(de):$=re,ee.pop(),q.pop(),!(ee.length===0||q.length===0));)re=ee[ee.length-1],pe=q[q.length-1];var we=Math.max(ee.length,q.length);if(we===0){var Se=Y.split(` `);if(Se.length>30)for(Se[26]="".concat(u,"...").concat(R);Se.length>27;)Se.pop();return"".concat(L.notIdentical,` `).concat(Se.join(` `),` `)}se>3&&(de=` `.concat(u,"...").concat(R).concat(de),G=!0),$!==""&&(de=` `.concat($).concat(de),$="");var Ie=0,Re=L[X]+` `.concat(y,"+ actual").concat(R," ").concat(m,"- expected").concat(R),We=" ".concat(u,"...").concat(R," Lines skipped");for(se=0;se1&&se>2&&(at>4?(le+=` `.concat(u,"...").concat(R),G=!0):at>3&&(le+=` `.concat(q[se-2]),Ie++),le+=` `.concat(q[se-1]),Ie++),ce=se,$+=` `.concat(m,"-").concat(R," ").concat(q[se]),Ie++;else if(q.length1&&se>2&&(at>4?(le+=` `.concat(u,"...").concat(R),G=!0):at>3&&(le+=` `.concat(ee[se-2]),Ie++),le+=` `.concat(ee[se-1]),Ie++),ce=se,le+=` `.concat(y,"+").concat(R," ").concat(ee[se]),Ie++;else{var nt=q[se],tt=ee[se],qe=tt!==nt&&(!b(tt,",")||tt.slice(0,-1)!==nt);qe&&b(nt,",")&&nt.slice(0,-1)===tt&&(qe=!1,tt+=","),qe?(at>1&&se>2&&(at>4?(le+=` `.concat(u,"...").concat(R),G=!0):at>3&&(le+=` `.concat(ee[se-2]),Ie++),le+=` `.concat(ee[se-1]),Ie++),ce=se,le+=` `.concat(y,"+").concat(R," ").concat(tt),$+=` `.concat(m,"-").concat(R," ").concat(nt),Ie+=2):(le+=$,$="",(at===1||se===0)&&(le+=` `.concat(tt),Ie++))}if(Ie>20&&se30)for(j[26]="".concat(u,"...").concat(R);j.length>27;)j.pop();j.length===1?ce=X.call(this,"".concat(ae," ").concat(j[0])):ce=X.call(this,"".concat(ae,` `).concat(j.join(` `),` `))}else{var Q=N(ee),re="",pe=L[G];G==="notDeepEqual"||G==="notEqual"?(Q="".concat(L[G],` `).concat(Q),Q.length>1024&&(Q="".concat(Q.slice(0,1021),"..."))):(re="".concat(N(q)),Q.length>512&&(Q="".concat(Q.slice(0,509),"...")),re.length>512&&(re="".concat(re.slice(0,509),"...")),G==="deepEqual"||G==="equal"?Q="".concat(pe,` `).concat(Q,` should equal `):re=" ".concat(G," ").concat(re)),ce=X.call(this,"".concat(Q).concat(re))}return Error.stackTraceLimit=se,ce.generatedMessage=!de,Object.defineProperty(s(ce),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),ce.code="ERR_ASSERTION",ce.actual=ee,ce.expected=q,ce.operator=G,Error.captureStackTrace&&Error.captureStackTrace(s(ce),Y),ce.stack,ce.name="AssertionError",i(ce)}return t($,[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:B,value:function(ce,de){return A(this,x(x({},de),{},{customInspect:!1,depth:0}))}}]),$}(h(Error),A.custom);V.exports=P}}),eM=He({"node_modules/object-keys/isArguments.js"(Z,V){"use strict";var d=Object.prototype.toString;V.exports=function(S){var E=d.call(S),e=E==="[object Arguments]";return e||(e=E!=="[object Array]"&&S!==null&&typeof S=="object"&&typeof S.length=="number"&&S.length>=0&&d.call(S.callee)==="[object Function]"),e}}}),YO=He({"node_modules/object-keys/implementation.js"(Z,V){"use strict";var d;Object.keys||(x=Object.prototype.hasOwnProperty,S=Object.prototype.toString,E=eM(),e=Object.prototype.propertyIsEnumerable,t=!e.call({toString:null},"toString"),r=e.call(function(){},"prototype"),o=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],a=function(h){var f=h.constructor;return f&&f.prototype===h},n={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},i=function(){if(typeof window>"u")return!1;for(var h in window)try{if(!n["$"+h]&&x.call(window,h)&&window[h]!==null&&typeof window[h]=="object")try{a(window[h])}catch{return!0}}catch{return!0}return!1}(),s=function(h){if(typeof window>"u"||!i)return a(h);try{return a(h)}catch{return!1}},d=function(f){var v=f!==null&&typeof f=="object",c=S.call(f)==="[object Function]",T=E(f),l=v&&S.call(f)==="[object String]",_=[];if(!v&&!c&&!T)throw new TypeError("Object.keys called on a non-object");var w=r&&c;if(l&&f.length>0&&!x.call(f,0))for(var A=0;A0)for(var M=0;M2?arguments[2]:{},f=d(s);x&&(f=E.call(f,Object.getOwnPropertySymbols(s)));for(var v=0;vhe.length)&&(ue=he.length);for(var ne=0,Ce=new Array(ue);ne10)return!0;for(var ue=0;ue57)return!0}return he.length===10&&he>=Math.pow(2,32)}function P(he){return Object.keys(he).filter(O).concat(s(he).filter(Object.prototype.propertyIsEnumerable.bind(he)))}function U(he,ue){if(he===ue)return 0;for(var ne=he.length,Ce=ue.length,Ye=0,rt=Math.min(ne,Ce);Ye1?q-1:0),ae=1;ae1?q-1:0),ae=1;ae1?q-1:0),ae=1;ae1?q-1:0),ae=1;ae0)return t(n);if(s==="number"&&isNaN(n)===!1)return i.long?o(n):r(n);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(n))};function t(n){if(n=String(n),!(n.length>100)){var i=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(n);if(i){var s=parseFloat(i[1]),h=(i[2]||"ms").toLowerCase();switch(h){case"years":case"year":case"yrs":case"yr":case"y":return s*e;case"days":case"day":case"d":return s*E;case"hours":case"hour":case"hrs":case"hr":case"h":return s*S;case"minutes":case"minute":case"mins":case"min":case"m":return s*x;case"seconds":case"second":case"secs":case"sec":case"s":return s*d;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}function r(n){return n>=E?Math.round(n/E)+"d":n>=S?Math.round(n/S)+"h":n>=x?Math.round(n/x)+"m":n>=d?Math.round(n/d)+"s":n+"ms"}function o(n){return a(n,E,"day")||a(n,S,"hour")||a(n,x,"minute")||a(n,d,"second")||n+" ms"}function a(n,i,s){if(!(n=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}Z.formatters.j=function(r){try{return JSON.stringify(r)}catch(o){return"[UnexpectedJSONParseError]: "+o.message}};function x(r){var o=this.useColors;if(r[0]=(o?"%c":"")+this.namespace+(o?" %c":" ")+r[0]+(o?"%c ":" ")+"+"+Z.humanize(this.diff),!!o){var a="color: "+this.color;r.splice(1,0,a,"color: inherit");var n=0,i=0;r[0].replace(/%[a-zA-Z%]/g,function(s){s!=="%%"&&(n++,s==="%c"&&(i=n))}),r.splice(i,0,a)}}function S(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function E(r){try{r==null?Z.storage.removeItem("debug"):Z.storage.debug=r}catch{}}function e(){var r;try{r=Z.storage.debug}catch{}return!r&&typeof process<"u"&&"env"in process&&(r=process.env.DEBUG),r}Z.enable(e());function t(){try{return window.localStorage}catch{}}}}),oB=He({"node_modules/stream-parser/index.js"(Z,V){var d=K_(),x=nB()("stream-parser");V.exports=r;var S=-1,E=0,e=1,t=2;function r(l){var _=l&&typeof l._transform=="function",w=l&&typeof l._write=="function";if(!_&&!w)throw new Error("must pass a Writable or Transform stream in");x("extending Parser into stream"),l._bytes=a,l._skipBytes=n,_&&(l._passthrough=i),_?l._transform=h:l._write=s}function o(l){x("initializing parser stream"),l._parserBytesLeft=0,l._parserBuffers=[],l._parserBuffered=0,l._parserState=S,l._parserCallback=null,typeof l.push=="function"&&(l._parserOutput=l.push.bind(l)),l._parserInit=!0}function a(l,_){d(!this._parserCallback,'there is already a "callback" set!'),d(isFinite(l)&&l>0,'can only buffer a finite number of bytes > 0, got "'+l+'"'),this._parserInit||o(this),x("buffering %o bytes",l),this._parserBytesLeft=l,this._parserCallback=_,this._parserState=E}function n(l,_){d(!this._parserCallback,'there is already a "callback" set!'),d(l>0,'can only skip > 0 bytes, got "'+l+'"'),this._parserInit||o(this),x("skipping %o bytes",l),this._parserBytesLeft=l,this._parserCallback=_,this._parserState=e}function i(l,_){d(!this._parserCallback,'There is already a "callback" set!'),d(l>0,'can only pass through > 0 bytes, got "'+l+'"'),this._parserInit||o(this),x("passing through %o bytes",l),this._parserBytesLeft=l,this._parserCallback=_,this._parserState=t}function s(l,_,w){this._parserInit||o(this),x("write(%o bytes)",l.length),typeof _=="function"&&(w=_),c(this,l,null,w)}function h(l,_,w){this._parserInit||o(this),x("transform(%o bytes)",l.length),typeof _!="function"&&(_=this._parserOutput),c(this,l,_,w)}function f(l,_,w,A){return l._parserBytesLeft<=0?A(new Error("got data but not currently parsing anything")):_.length<=l._parserBytesLeft?function(){return v(l,_,w,A)}:function(){var M=_.slice(0,l._parserBytesLeft);return v(l,M,w,function(g){if(g)return A(g);if(_.length>M.length)return function(){return f(l,_.slice(M.length),w,A)}})}}function v(l,_,w,A){if(l._parserBytesLeft-=_.length,x("%o bytes left for stream piece",l._parserBytesLeft),l._parserState===E?(l._parserBuffers.push(_),l._parserBuffered+=_.length):l._parserState===t&&w(_),l._parserBytesLeft===0){var M=l._parserCallback;if(M&&l._parserState===E&&l._parserBuffers.length>1&&(_=Buffer.concat(l._parserBuffers,l._parserBuffered)),l._parserState!==E&&(_=null),l._parserCallback=null,l._parserBuffered=0,l._parserState=S,l._parserBuffers.splice(0),M){var g=[];_&&g.push(_),w&&g.push(w);var b=M.length>g.length;b&&g.push(T(A));var p=M.apply(l,g);if(!b||A===p)return A}}else return A}var c=T(f);function T(l){return function(){for(var _=l.apply(this,arguments);typeof _=="function";)_=_();return _}}}}),ac=He({"node_modules/probe-image-size/lib/common.js"(Z){"use strict";var V=XO().Transform,d=oB();function x(){V.call(this,{readableObjectMode:!0})}x.prototype=Object.create(V.prototype),x.prototype.constructor=x,d(x.prototype),Z.ParserStream=x,Z.sliceEq=function(E,e,t){for(var r=e,o=0;o>4&15,f=i[4]&15,v=i[5]>>4&15,c=d(i,6),T=8,l=0;lc.width||v.width===c.width&&v.height>c.height?v:c}),h=i.reduce(function(v,c){return v.height>c.height||v.height===c.height&&v.width>c.width?v:c}),f;return s.width>h.height||s.width===h.height&&s.height>h.width?f=s:f=h,f}V.exports.readSizeFromMeta=function(i){var s={sizes:[],transforms:[],item_inf:{},item_loc:{}};if(a(i,s),!!s.sizes.length){var h=n(s.sizes),f=1;s.transforms.forEach(function(c){var T={1:6,2:5,3:8,4:7,5:4,6:3,7:2,8:1},l={1:4,2:3,3:2,4:1,5:6,6:5,7:8,8:7};if(c.type==="imir"&&(c.value===0?f=l[f]:(f=l[f],f=T[f],f=T[f])),c.type==="irot")for(var _=0;_0&&!this.aborted;){var t=this.ifds_to_read.shift();t.offset&&this.scan_ifd(t.id,t.offset,E)}},S.prototype.read_uint16=function(E){var e=this.input;if(E+2>e.length)throw d("unexpected EOF","EBADDATA");return this.big_endian?e[E]*256+e[E+1]:e[E]+e[E+1]*256},S.prototype.read_uint32=function(E){var e=this.input;if(E+4>e.length)throw d("unexpected EOF","EBADDATA");return this.big_endian?e[E]*16777216+e[E+1]*65536+e[E+2]*256+e[E+3]:e[E]+e[E+1]*256+e[E+2]*65536+e[E+3]*16777216},S.prototype.is_subifd_link=function(E,e){return E===0&&e===34665||E===0&&e===34853||E===34665&&e===40965},S.prototype.exif_format_length=function(E){switch(E){case 1:case 2:case 6:case 7:return 1;case 3:case 8:return 2;case 4:case 9:case 11:return 4;case 5:case 10:case 12:return 8;default:return 0}},S.prototype.exif_format_read=function(E,e){var t;switch(E){case 1:case 2:return t=this.input[e],t;case 6:return t=this.input[e],t|(t&128)*33554430;case 3:return t=this.read_uint16(e),t;case 8:return t=this.read_uint16(e),t|(t&32768)*131070;case 4:return t=this.read_uint32(e),t;case 9:return t=this.read_uint32(e),t|0;case 5:case 10:case 11:case 12:return null;case 7:return null;default:return null}},S.prototype.scan_ifd=function(E,e,t){var r=this.read_uint16(e);e+=2;for(var o=0;othis.input.length)throw d("unexpected EOF","EBADDATA");for(var c=[],T=f,l=0;l0&&(this.ifds_to_read.push({id:a,offset:c[0]}),v=!0);var w={is_big_endian:this.big_endian,ifd:E,tag:a,format:n,count:i,entry_offset:e+this.start,data_length:h,data_offset:f+this.start,value:c,is_subifd_link:v};if(t(w)===!1){this.aborted=!0;return}e+=12}E===0&&this.ifds_to_read.push({id:1,offset:this.read_uint32(e)})},V.exports.ExifParser=S,V.exports.get_orientation=function(E){var e=0;try{return new S(E,0,E.length).each(function(t){if(t.ifd===0&&t.tag===274&&Array.isArray(t.value))return e=t.value[0],!1}),e}catch{return-1}}}}),lB=He({"node_modules/probe-image-size/lib/parse_sync/avif.js"(Z,V){"use strict";var d=ac().str2arr,x=ac().sliceEq,S=ac().readUInt32BE,E=sB(),e=y3(),t=d("ftyp");V.exports=function(r){if(x(r,4,t)){var o=E.unbox(r,0);if(o){var a=E.getMimeType(o.data);if(a){for(var n,i=o.end;;){var s=E.unbox(r,i);if(!s)break;if(i=s.end,s.boxtype==="mdat")return;if(s.boxtype==="meta"){n=s.data;break}}if(n){var h=E.readSizeFromMeta(n);if(h){var f={width:h.width,height:h.height,type:a.type,mime:a.mime,wUnits:"px",hUnits:"px"};if(h.variants.length>1&&(f.variants=h.variants),h.orientation&&(f.orientation=h.orientation),h.exif_location&&h.exif_location.offset+h.exif_location.length<=r.length){var v=S(r,h.exif_location.offset),c=r.slice(h.exif_location.offset+v+4,h.exif_location.offset+h.exif_location.length),T=e.get_orientation(c);T>0&&(f.orientation=T)}return f}}}}}}}}),uB=He({"node_modules/probe-image-size/lib/parse_sync/bmp.js"(Z,V){"use strict";var d=ac().str2arr,x=ac().sliceEq,S=ac().readUInt16LE,E=d("BM");V.exports=function(e){if(!(e.length<26)&&x(e,0,E))return{width:S(e,18),height:S(e,22),type:"bmp",mime:"image/bmp",wUnits:"px",hUnits:"px"}}}}),cB=He({"node_modules/probe-image-size/lib/parse_sync/gif.js"(Z,V){"use strict";var d=ac().str2arr,x=ac().sliceEq,S=ac().readUInt16LE,E=d("GIF87a"),e=d("GIF89a");V.exports=function(t){if(!(t.length<10)&&!(!x(t,0,E)&&!x(t,0,e)))return{width:S(t,6),height:S(t,8),type:"gif",mime:"image/gif",wUnits:"px",hUnits:"px"}}}}),fB=He({"node_modules/probe-image-size/lib/parse_sync/ico.js"(Z,V){"use strict";var d=ac().readUInt16LE,x=0,S=1,E=16;V.exports=function(e){var t=d(e,0),r=d(e,2),o=d(e,4);if(!(t!==x||r!==S||!o)){for(var a=[],n={width:0,height:0},i=0;in.width||h>n.height)&&(n=f)}return{width:n.width,height:n.height,variants:a,type:"ico",mime:"image/x-icon",wUnits:"px",hUnits:"px"}}}}}),hB=He({"node_modules/probe-image-size/lib/parse_sync/jpeg.js"(Z,V){"use strict";var d=ac().readUInt16BE,x=ac().str2arr,S=ac().sliceEq,E=y3(),e=x("Exif\0\0");V.exports=function(t){if(!(t.length<2)&&!(t[0]!==255||t[1]!==216||t[2]!==255))for(var r=2;;){for(;;){if(t.length-r<2)return;if(t[r++]===255)break}for(var o=t[r++],a;o===255;)o=t[r++];if(208<=o&&o<=217||o===1)a=0;else if(192<=o&&o<=254){if(t.length-r<2)return;a=d(t,r)-2,r+=2}else return;if(o===217||o===218)return;var n;if(o===225&&a>=10&&S(t,r,e)&&(n=E.get_orientation(t.slice(r+6,r+a))),a>=5&&192<=o&&o<=207&&o!==196&&o!==200&&o!==204){if(t.length-r0&&(i.orientation=n),i}r+=a}}}}),pB=He({"node_modules/probe-image-size/lib/parse_sync/png.js"(Z,V){"use strict";var d=ac().str2arr,x=ac().sliceEq,S=ac().readUInt32BE,E=d(`\x89PNG\r  `),e=d("IHDR");V.exports=function(t){if(!(t.length<24)&&x(t,0,E)&&x(t,12,e))return{width:S(t,16),height:S(t,20),type:"png",mime:"image/png",wUnits:"px",hUnits:"px"}}}}),dB=He({"node_modules/probe-image-size/lib/parse_sync/psd.js"(Z,V){"use strict";var d=ac().str2arr,x=ac().sliceEq,S=ac().readUInt32BE,E=d("8BPS\0");V.exports=function(e){if(!(e.length<22)&&x(e,0,E))return{width:S(e,18),height:S(e,14),type:"psd",mime:"image/vnd.adobe.photoshop",wUnits:"px",hUnits:"px"}}}}),vB=He({"node_modules/probe-image-size/lib/parse_sync/svg.js"(Z,V){"use strict";function d(s){return s===32||s===9||s===13||s===10}function x(s){return typeof s=="number"&&isFinite(s)&&s>0}function S(s){var h=0,f=s.length;for(s[0]===239&&s[1]===187&&s[2]===191&&(h=3);h]*>/,e=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,t=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,r=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,o=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,a=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function n(s){var h=s.match(t),f=s.match(r),v=s.match(o);return{width:h&&(h[1]||h[2]),height:f&&(f[1]||f[2]),viewbox:v&&(v[1]||v[2])}}function i(s){return a.test(s)?s.match(a)[0]:"px"}V.exports=function(s){if(S(s)){for(var h="",f=0;f>14&16383)+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}}function n(i,s){return{width:(i[s+6]<<16|i[s+5]<<8|i[s+4])+1,height:(i[s+9]<i.length)){for(;s+8=10?h=h||o(i,s+8):c==="VP8L"&&T>=9?h=h||a(i,s+8):c==="VP8X"&&T>=10?h=h||n(i,s+8):c==="EXIF"&&(f=e.get_orientation(i.slice(s+8,s+8+T)),s=1/0),s+=8+T}if(h)return f>0&&(h.orientation=f),h}}}}}),yB=He({"node_modules/probe-image-size/lib/parsers_sync.js"(Z,V){"use strict";V.exports={avif:lB(),bmp:uB(),gif:cB(),ico:fB(),jpeg:hB(),png:pB(),psd:dB(),svg:vB(),tiff:mB(),webp:gB()}}}),_B=He({"node_modules/probe-image-size/sync.js"(Z,V){"use strict";var d=yB();function x(S){for(var E=Object.keys(d),e=0;e0;)R=h.c2p(M+N*u),N--;for(N=0;z===void 0&&N0;)F=f.c2p(g+N*y),N--;if(RG[0];if(Y||ee){var q=m+P/2,se=z+U/2;ce+="transform:"+S(q+"px",se+"px")+"scale("+(Y?-1:1)+","+(ee?-1:1)+")"+S(-q+"px",-se+"px")+";"}}le.attr("style",ce);var ae=new Promise(function(j){if(_._hasZ)j();else if(_._hasSource)if(_._canvas&&_._canvas.el.width===b&&_._canvas.el.height===p&&_._canvas.source===_.source)j();else{var Q=document.createElement("canvas");Q.width=b,Q.height=p;var re=Q.getContext("2d",{willReadFrequently:!0});_._image=_._image||new Image;var pe=_._image;pe.onload=function(){re.drawImage(pe,0,0),_._canvas={el:Q,source:_.source},j()},pe.setAttribute("src",_.source)}}).then(function(){var j,Q;if(_._hasZ)Q=$(function(we,Se){var Ie=A[Se][we];return x.isTypedArray(Ie)&&(Ie=Array.from(Ie)),Ie}),j=Q.toDataURL("image/png");else if(_._hasSource)if(w)j=_.source;else{var re=_._canvas.el.getContext("2d",{willReadFrequently:!0}),pe=re.getImageData(0,0,b,p).data;Q=$(function(we,Se){var Ie=4*(Se*b+we);return[pe[Ie],pe[Ie+1],pe[Ie+2],pe[Ie+3]]}),j=Q.toDataURL("image/png")}le.attr({"xlink:href":j,height:U,width:P,x:m,y:z})});a._promises.push(ae)})}}}),TB=He({"src/traces/image/style.js"(Z,V){"use strict";var d=Wn();V.exports=function(S){d.select(S).selectAll(".im image").style("opacity",function(E){return E[0].trace.opacity})}}}),AB=He({"src/traces/image/hover.js"(Z,V){"use strict";var d=rf(),x=sa(),S=x.isArrayOrTypedArray,E=v1();V.exports=function(t,r,o){var a=t.cd[0],n=a.trace,i=t.xa,s=t.ya;if(!(d.inbox(r-a.x0,r-(a.x0+a.w*n.dx),0)>0||d.inbox(o-a.y0,o-(a.y0+a.h*n.dy),0)>0)){var h=Math.floor((r-a.x0)/n.dx),f=Math.floor(Math.abs(o-a.y0)/n.dy),v;if(n._hasZ?v=a.z[f][h]:n._hasSource&&(v=n._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(h,f,1,1).data),!!v){var c=a.hi||n.hoverinfo,T;if(c){var l=c.split("+");l.indexOf("all")!==-1&&(l=["color"]),l.indexOf("color")!==-1&&(T=!0)}var _=E.colormodel[n.colormodel],w=_.colormodel||n.colormodel,A=w.length,M=n._scaler(v),g=_.suffix,b=[];(n.hovertemplate||T)&&(b.push("["+[M[0]+g[0],M[1]+g[1],M[2]+g[2]].join(", ")),A===4&&b.push(", "+M[3]+g[3]),b.push("]"),b=b.join(""),t.extraText=w.toUpperCase()+": "+b);var p;S(n.hovertext)&&S(n.hovertext[f])?p=n.hovertext[f][h]:S(n.text)&&S(n.text[f])&&(p=n.text[f][h]);var u=s.c2p(a.y0+(f+.5)*n.dy),y=a.x0+(h+.5)*n.dx,m=a.y0+(f+.5)*n.dy,R="["+v.slice(0,n.colormodel.length).join(", ")+"]";return[x.extendFlat(t,{index:[f,h],x0:i.c2p(a.x0+h*n.dx),x1:i.c2p(a.x0+(h+1)*n.dx),y0:u,y1:u,color:M,xVal:y,xLabelVal:y,yVal:m,yLabelVal:m,zLabelVal:R,text:p,hovertemplateLabels:{zLabel:R,colorLabel:b,"color[0]Label":M[0]+g[0],"color[1]Label":M[1]+g[1],"color[2]Label":M[2]+g[2],"color[3]Label":M[3]+g[3]}})]}}}}}),SB=He({"src/traces/image/event_data.js"(Z,V){"use strict";V.exports=function(x,S){return"xVal"in S&&(x.x=S.xVal),"yVal"in S&&(x.y=S.yVal),S.xa&&(x.xaxis=S.xa),S.ya&&(x.yaxis=S.ya),x.color=S.color,x.colormodel=S.trace.colormodel,x.z||(x.z=S.color),x}}}),MB=He({"src/traces/image/index.js"(Z,V){"use strict";V.exports={attributes:DS(),supplyDefaults:lO(),calc:bB(),plot:wB(),style:TB(),hoverPoints:AB(),eventData:SB(),moduleType:"trace",name:"image",basePlotModule:Kf(),categories:["cartesian","svg","2dMap","noSortingByValue"],animatable:!1,meta:{}}}}),EB=He({"lib/image.js"(Z,V){"use strict";V.exports=MB()}}),og=He({"src/traces/pie/attributes.js"(Z,V){"use strict";var d=ru(),x=wc().attributes,S=tc(),E=sh(),{hovertemplateAttrs:e,texttemplateAttrs:t,templatefallbackAttrs:r}=Jl(),o=Qo().extendFlat,a=Gh().pattern,n=S({editType:"plot",arrayOk:!0,colorEditType:"plot"});V.exports={labels:{valType:"data_array",editType:"calc"},label0:{valType:"number",dflt:0,editType:"calc"},dlabel:{valType:"number",dflt:1,editType:"calc"},values:{valType:"data_array",editType:"calc"},marker:{colors:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:E.defaultLine,arrayOk:!0,editType:"style"},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style"},editType:"calc"},pattern:a,editType:"calc"},text:{valType:"data_array",editType:"plot"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style"},scalegroup:{valType:"string",dflt:"",editType:"calc"},textinfo:{valType:"flaglist",flags:["label","text","value","percent"],extras:["none"],editType:"calc"},hoverinfo:o({},d.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:e({},{keys:["label","color","value","percent","text"]}),hovertemplatefallback:r(),texttemplate:t({editType:"plot"},{keys:["label","color","value","percent","text"]}),texttemplatefallback:r({editType:"plot"}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:o({},n,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:o({},n,{}),outsidetextfont:o({},n,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},showlegend:o({},d.showlegend,{arrayOk:!0}),legend:o({},d.legend,{arrayOk:!0}),title:{text:{valType:"string",dflt:"",editType:"plot"},font:o({},n,{}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot"},editType:"plot"},domain:x({name:"pie",trace:!0,editType:"calc"}),hole:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},sort:{valType:"boolean",dflt:!0,editType:"calc"},direction:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"counterclockwise",editType:"calc"},rotation:{valType:"angle",dflt:0,editType:"calc"},pull:{valType:"number",min:0,max:1,dflt:0,arrayOk:!0,editType:"calc"}}}}),sg=He({"src/traces/pie/defaults.js"(Z,V){"use strict";var d=as(),x=sa(),S=og(),E=wc().defaults,e=gd().handleText,t=sa().coercePattern;function r(n,i){var s=x.isArrayOrTypedArray(n),h=x.isArrayOrTypedArray(i),f=Math.min(s?n.length:1/0,h?i.length:1/0);if(isFinite(f)||(f=0),f&&h){for(var v,c=0;c0){v=!0;break}}v||(f=0)}return{hasLabels:s,hasValues:h,len:f}}function o(n,i,s,h,f){var v=h("marker.line.width");v&&h("marker.line.color",f?void 0:s.paper_bgcolor);var c=h("marker.colors");t(h,"marker.pattern",c),n.marker&&!i.marker.pattern.fgcolor&&(i.marker.pattern.fgcolor=n.marker.colors),i.marker.pattern.bgcolor||(i.marker.pattern.bgcolor=s.paper_bgcolor)}function a(n,i,s,h){function f(m,R){return x.coerce(n,i,S,m,R)}var v=f("labels"),c=f("values"),T=r(v,c),l=T.len;if(i._hasLabels=T.hasLabels,i._hasValues=T.hasValues,!i._hasLabels&&i._hasValues&&(f("label0"),f("dlabel")),!l){i.visible=!1;return}i._length=l,o(n,i,h,f,!0),f("scalegroup");var _=f("text"),w=f("texttemplate");f("texttemplatefallback");var A;if(w||(A=f("textinfo",x.isArrayOrTypedArray(_)?"text+percent":"percent")),f("hovertext"),f("hovertemplate"),f("hovertemplatefallback"),w||A&&A!=="none"){var M=f("textposition");e(n,i,h,f,M,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1});var g=Array.isArray(M)||M==="auto",b=g||M==="outside";b&&f("automargin"),(M==="inside"||M==="auto"||Array.isArray(M))&&f("insidetextorientation")}else A==="none"&&f("textposition","none");E(i,h,f);var p=f("hole"),u=f("title.text");if(u){var y=f("title.position",p?"middle center":"top center");!p&&y==="middle center"&&(i.title.position="top center"),x.coerceFont(f,"title.font",h.font)}f("sort"),f("direction"),f("rotation"),f("pull")}V.exports={handleLabelsAndValues:r,handleMarkerDefaults:o,supplyDefaults:a}}}),_3=He({"src/traces/pie/layout_attributes.js"(Z,V){"use strict";V.exports={hiddenlabels:{valType:"data_array",editType:"calc"},piecolorway:{valType:"colorlist",editType:"calc"},extendpiecolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),kB=He({"src/traces/pie/layout_defaults.js"(Z,V){"use strict";var d=sa(),x=_3();V.exports=function(E,e){function t(r,o){return d.coerce(E,e,x,r,o)}t("hiddenlabels"),t("piecolorway",e.colorway),t("extendpiecolors")}}}),x1=He({"src/traces/pie/calc.js"(Z,V){"use strict";var d=as(),x=Ch(),S=Jn(),E={};function e(a,n){var i=[],s=a._fullLayout,h=s.hiddenlabels||[],f=n.labels,v=n.marker.colors||[],c=n.values,T=n._length,l=n._hasValues&&T,_,w;if(n.dlabel)for(f=new Array(T),_=0;_=0});var R=n.type==="funnelarea"?b:n.sort;return R&&i.sort(function(L,z){return z.v-L.v}),i[0]&&(i[0].vTotal=g),i}function t(a){return function(i,s){return!i||(i=x(i),!i.isValid())?!1:(i=S.addOpacity(i,i.getAlpha()),a[s]||(a[s]=i),i)}}function r(a,n){var i=(n||{}).type;i||(i="pie");var s=a._fullLayout,h=a.calcdata,f=s[i+"colorway"],v=s["_"+i+"colormap"];s["extend"+i+"colors"]&&(f=o(f,E));for(var c=0,T=0;T0&&(Ye+=kt*ne.pxmid[0],rt+=kt*ne.pxmid[1])}ne.cxFinal=Ye,ne.cyFinal=rt;function Nt(_t,Oe,Je,Ae){var Le=Ae*(Oe[0]-_t[0]),Ue=Ae*(Oe[1]-_t[1]);return"a"+Ae*pe.r+","+Ae*pe.r+" 0 "+ne.largeArc+(Je?" 1 ":" 0 ")+Le+","+Ue}var Gt=we.hole;if(ne.v===pe.vTotal){var Mr="M"+(Ye+ne.px0[0])+","+(rt+ne.px0[1])+Nt(ne.px0,ne.pxmid,!0,1)+Nt(ne.pxmid,ne.px0,!0,1)+"Z";Gt?Mt.attr("d","M"+(Ye+Gt*ne.px0[0])+","+(rt+Gt*ne.px0[1])+Nt(ne.px0,ne.pxmid,!1,Gt)+Nt(ne.pxmid,ne.px0,!1,Gt)+"Z"+Mr):Mt.attr("d",Mr)}else{var mr=Nt(ne.px0,ne.px1,!0,1);if(Gt){var qr=1-Gt;Mt.attr("d","M"+(Ye+Gt*ne.px1[0])+","+(rt+Gt*ne.px1[1])+Nt(ne.px1,ne.px0,!1,Gt)+"l"+qr*ne.px0[0]+","+qr*ne.px0[1]+mr+"Z")}else Mt.attr("d","M"+Ye+","+rt+"l"+ne.px0[0]+","+ne.px0[1]+mr+"Z")}de(Y,ne,pe);var Er=f.castOption(we.textposition,ne.pts),Ir=Ke.selectAll("g.slicetext").data(ne.text&&Er!=="none"?[0]:[]);Ir.enter().append("g").classed("slicetext",!0),Ir.exit().remove(),Ir.each(function(){var _t=t.ensureSingle(d.select(this),"text","",function(ut){ut.attr("data-notex",1)}),Oe=t.ensureUniformFontSize(Y,Er==="outside"?w(we,ne,se.font):A(we,ne,se.font));_t.text(ne.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(e.font,Oe).call(a.convertToTspans,Y);var Je=e.bBox(_t.node()),Ae;if(Er==="outside")Ae=z(Je,ne);else if(Ae=g(Je,ne,pe),Er==="auto"&&Ae.scale<1){var Le=t.ensureUniformFontSize(Y,we.outsidetextfont);_t.call(e.font,Le),Je=e.bBox(_t.node()),Ae=z(Je,ne)}var Ue=Ae.textPosAngle,Ze=Ue===void 0?ne.pxmid:ce(pe.r,Ue);if(Ae.targetX=Ye+Ze[0]*Ae.rCenter+(Ae.x||0),Ae.targetY=rt+Ze[1]*Ae.rCenter+(Ae.y||0),G(Ae,Je),Ae.outside){var st=Ae.targetY;ne.yLabelMin=st-Je.height/2,ne.yLabelMid=st,ne.yLabelMax=st+Je.height/2,ne.labelExtraX=0,ne.labelExtraY=0,Re=!0}Ae.fontSize=Oe.size,i(we.type,Ae,se),Q[Ce].transform=Ae,t.setTransormAndDisplay(_t,Ae)})});var We=d.select(this).selectAll("g.titletext").data(we.title.text?[0]:[]);if(We.enter().append("g").classed("titletext",!0),We.exit().remove(),We.each(function(){var ne=t.ensureSingle(d.select(this),"text","",function(rt){rt.attr("data-notex",1)}),Ce=we.title.text;we._meta&&(Ce=t.templateString(Ce,we._meta)),ne.text(Ce).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(e.font,we.title.font).call(a.convertToTspans,Y);var Ye;we.title.position==="middle center"?Ye=F(pe):Ye=N(pe,ae),ne.attr("transform",o(Ye.x,Ye.y)+r(Math.min(1,Ye.scale))+o(Ye.tx,Ye.ty))}),Re&&B(Ie,we),l(Se,we),Re&&we.automargin){var at=e.bBox(re.node()),nt=we.domain,tt=ae.w*(nt.x[1]-nt.x[0]),qe=ae.h*(nt.y[1]-nt.y[0]),he=(.5*tt-pe.r)/ae.w,ue=(.5*qe-pe.r)/ae.h;x.autoMargin(Y,"pie."+we.uid+".automargin",{xl:nt.x[0]-he,xr:nt.x[1]+he,yb:nt.y[0]-ue,yt:nt.y[1]+ue,l:Math.max(pe.cx-pe.r-at.left,0),r:Math.max(at.right-(pe.cx+pe.r),0),b:Math.max(at.bottom-(pe.cy+pe.r),0),t:Math.max(pe.cy-pe.r-at.top,0),pad:5})}})});setTimeout(function(){j.selectAll("tspan").each(function(){var Q=d.select(this);Q.attr("dy")&&Q.attr("dy",Q.attr("dy"))})},0)}function l(Y,ee){Y.each(function(q){var se=d.select(this);if(!q.labelExtraX&&!q.labelExtraY){se.select("path.textline").remove();return}var ae=se.select("g.slicetext text");q.transform.targetX+=q.labelExtraX,q.transform.targetY+=q.labelExtraY,t.setTransormAndDisplay(ae,q.transform);var j=q.cxFinal+q.pxmid[0],Q=q.cyFinal+q.pxmid[1],re="M"+j+","+Q,pe=(q.yLabelMax-q.yLabelMin)*(q.pxmid[0]<0?-1:1)/4;if(q.labelExtraX){var we=q.labelExtraX*q.pxmid[1]/q.pxmid[0],Se=q.yLabelMid+q.labelExtraY-(q.cyFinal+q.pxmid[1]);Math.abs(we)>Math.abs(Se)?re+="l"+Se*q.pxmid[0]/q.pxmid[1]+","+Se+"H"+(j+q.labelExtraX+pe):re+="l"+q.labelExtraX+","+we+"v"+(Se-we)+"h"+pe}else re+="V"+(q.yLabelMid+q.labelExtraY)+"h"+pe;t.ensureSingle(se,"path","textline").call(E.stroke,ee.outsidetextfont.color).attr({"stroke-width":Math.min(2,ee.outsidetextfont.size/8),d:re,fill:"none"})})}function _(Y,ee,q){var se=q[0],ae=se.cx,j=se.cy,Q=se.trace,re=Q.type==="funnelarea";"_hasHoverLabel"in Q||(Q._hasHoverLabel=!1),"_hasHoverEvent"in Q||(Q._hasHoverEvent=!1),Y.on("mouseover",function(pe){var we=ee._fullLayout,Se=ee._fullData[Q.index];if(!(ee._dragging||we.hovermode===!1)){var Ie=Se.hoverinfo;if(Array.isArray(Ie)&&(Ie=S.castHoverinfo({hoverinfo:[f.castOption(Ie,pe.pts)],_module:Q._module},we,0)),Ie==="all"&&(Ie="label+text+value+percent+name"),Se.hovertemplate||Ie!=="none"&&Ie!=="skip"&&Ie){var Re=pe.rInscribed||0,We=ae+pe.pxmid[0]*(1-Re),at=j+pe.pxmid[1]*(1-Re),nt=we.separators,tt=[];if(Ie&&Ie.indexOf("label")!==-1&&tt.push(pe.label),pe.text=f.castOption(Se.hovertext||Se.text,pe.pts),Ie&&Ie.indexOf("text")!==-1){var qe=pe.text;t.isValidTextValue(qe)&&tt.push(qe)}pe.value=pe.v,pe.valueLabel=f.formatPieValue(pe.v,nt),Ie&&Ie.indexOf("value")!==-1&&tt.push(pe.valueLabel),pe.percent=pe.v/se.vTotal,pe.percentLabel=f.formatPiePercent(pe.percent,nt),Ie&&Ie.indexOf("percent")!==-1&&tt.push(pe.percentLabel);var he=Se.hoverlabel,ue=he.font,ne=[];S.loneHover({trace:Q,x0:We-Re*se.r,x1:We+Re*se.r,y:at,_x0:re?ae+pe.TL[0]:We-Re*se.r,_x1:re?ae+pe.TR[0]:We+Re*se.r,_y0:re?j+pe.TL[1]:at-Re*se.r,_y1:re?j+pe.BL[1]:at+Re*se.r,text:tt.join("
"),name:Se.hovertemplate||Ie.indexOf("name")!==-1?Se.name:void 0,idealAlign:pe.pxmid[0]<0?"left":"right",color:f.castOption(he.bgcolor,pe.pts)||pe.color,borderColor:f.castOption(he.bordercolor,pe.pts),fontFamily:f.castOption(ue.family,pe.pts),fontSize:f.castOption(ue.size,pe.pts),fontColor:f.castOption(ue.color,pe.pts),nameLength:f.castOption(he.namelength,pe.pts),textAlign:f.castOption(he.align,pe.pts),hovertemplate:f.castOption(Se.hovertemplate,pe.pts),hovertemplateLabels:pe,eventData:[v(pe,Se)]},{container:we._hoverlayer.node(),outerContainer:we._paper.node(),gd:ee,inOut_bbox:ne}),pe.bbox=ne[0],Q._hasHoverLabel=!0}Q._hasHoverEvent=!0,ee.emit("plotly_hover",{points:[v(pe,Se)],event:d.event})}}),Y.on("mouseout",function(pe){var we=ee._fullLayout,Se=ee._fullData[Q.index],Ie=d.select(this).datum();Q._hasHoverEvent&&(pe.originalEvent=d.event,ee.emit("plotly_unhover",{points:[v(Ie,Se)],event:d.event}),Q._hasHoverEvent=!1),Q._hasHoverLabel&&(S.loneUnhover(we._hoverlayer.node()),Q._hasHoverLabel=!1)}),Y.on("click",function(pe){var we=ee._fullLayout,Se=ee._fullData[Q.index];ee._dragging||we.hovermode===!1||(ee._hoverdata=[v(pe,Se)],S.click(ee,d.event))})}function w(Y,ee,q){var se=f.castOption(Y.outsidetextfont.color,ee.pts)||f.castOption(Y.textfont.color,ee.pts)||q.color,ae=f.castOption(Y.outsidetextfont.family,ee.pts)||f.castOption(Y.textfont.family,ee.pts)||q.family,j=f.castOption(Y.outsidetextfont.size,ee.pts)||f.castOption(Y.textfont.size,ee.pts)||q.size,Q=f.castOption(Y.outsidetextfont.weight,ee.pts)||f.castOption(Y.textfont.weight,ee.pts)||q.weight,re=f.castOption(Y.outsidetextfont.style,ee.pts)||f.castOption(Y.textfont.style,ee.pts)||q.style,pe=f.castOption(Y.outsidetextfont.variant,ee.pts)||f.castOption(Y.textfont.variant,ee.pts)||q.variant,we=f.castOption(Y.outsidetextfont.textcase,ee.pts)||f.castOption(Y.textfont.textcase,ee.pts)||q.textcase,Se=f.castOption(Y.outsidetextfont.lineposition,ee.pts)||f.castOption(Y.textfont.lineposition,ee.pts)||q.lineposition,Ie=f.castOption(Y.outsidetextfont.shadow,ee.pts)||f.castOption(Y.textfont.shadow,ee.pts)||q.shadow;return{color:se,family:ae,size:j,weight:Q,style:re,variant:pe,textcase:we,lineposition:Se,shadow:Ie}}function A(Y,ee,q){var se=f.castOption(Y.insidetextfont.color,ee.pts);!se&&Y._input.textfont&&(se=f.castOption(Y._input.textfont.color,ee.pts));var ae=f.castOption(Y.insidetextfont.family,ee.pts)||f.castOption(Y.textfont.family,ee.pts)||q.family,j=f.castOption(Y.insidetextfont.size,ee.pts)||f.castOption(Y.textfont.size,ee.pts)||q.size,Q=f.castOption(Y.insidetextfont.weight,ee.pts)||f.castOption(Y.textfont.weight,ee.pts)||q.weight,re=f.castOption(Y.insidetextfont.style,ee.pts)||f.castOption(Y.textfont.style,ee.pts)||q.style,pe=f.castOption(Y.insidetextfont.variant,ee.pts)||f.castOption(Y.textfont.variant,ee.pts)||q.variant,we=f.castOption(Y.insidetextfont.textcase,ee.pts)||f.castOption(Y.textfont.textcase,ee.pts)||q.textcase,Se=f.castOption(Y.insidetextfont.lineposition,ee.pts)||f.castOption(Y.textfont.lineposition,ee.pts)||q.lineposition,Ie=f.castOption(Y.insidetextfont.shadow,ee.pts)||f.castOption(Y.textfont.shadow,ee.pts)||q.shadow;return{color:se||E.contrast(ee.color),family:ae,size:j,weight:Q,style:re,variant:pe,textcase:we,lineposition:Se,shadow:Ie}}function M(Y,ee){for(var q,se,ae=0;ae=-4;he-=2)qe(Math.PI*he,"tan");for(he=4;he>=-4;he-=2)qe(Math.PI*(he+1),"tan")}if(Ie||We){for(he=4;he>=-4;he-=2)qe(Math.PI*(he+1.5),"rad");for(he=4;he>=-4;he-=2)qe(Math.PI*(he+.5),"rad")}}if(re||at||Ie){var ue=Math.sqrt(Y.width*Y.width+Y.height*Y.height);if(tt={scale:ae*se*2/ue,rCenter:1-ae,rotate:0},tt.textPosAngle=(ee.startangle+ee.stopangle)/2,tt.scale>=1)return tt;nt.push(tt)}(at||We)&&(tt=p(Y,se,Q,pe,we),tt.textPosAngle=(ee.startangle+ee.stopangle)/2,nt.push(tt)),(at||Re)&&(tt=u(Y,se,Q,pe,we),tt.textPosAngle=(ee.startangle+ee.stopangle)/2,nt.push(tt));for(var ne=0,Ce=0,Ye=0;Ye=1)break}return nt[ne]}function b(Y,ee){var q=Y.startangle,se=Y.stopangle;return q>ee&&ee>se||q0?1:-1)/2,y:j/(1+q*q/(se*se)),outside:!0}}function F(Y){var ee=Math.sqrt(Y.titleBox.width*Y.titleBox.width+Y.titleBox.height*Y.titleBox.height);return{x:Y.cx,y:Y.cy,scale:Y.trace.hole*Y.r*2/ee,tx:0,ty:-Y.titleBox.height/2+Y.trace.title.font.size}}function N(Y,ee){var q=1,se=1,ae,j=Y.trace,Q={x:Y.cx,y:Y.cy},re={tx:0,ty:0};re.ty+=j.title.font.size,ae=U(j),j.title.position.indexOf("top")!==-1?(Q.y-=(1+ae)*Y.r,re.ty-=Y.titleBox.height):j.title.position.indexOf("bottom")!==-1&&(Q.y+=(1+ae)*Y.r);var pe=O(Y.r,Y.trace.aspectratio),we=ee.w*(j.domain.x[1]-j.domain.x[0])/2;return j.title.position.indexOf("left")!==-1?(we=we+pe,Q.x-=(1+ae)*pe,re.tx+=Y.titleBox.width/2):j.title.position.indexOf("center")!==-1?we*=2:j.title.position.indexOf("right")!==-1&&(we=we+pe,Q.x+=(1+ae)*pe,re.tx-=Y.titleBox.width/2),q=we/Y.titleBox.width,se=P(Y,ee)/Y.titleBox.height,{x:Q.x,y:Q.y,scale:Math.min(q,se),tx:re.tx,ty:re.ty}}function O(Y,ee){return Y/(ee===void 0?1:ee)}function P(Y,ee){var q=Y.trace,se=ee.h*(q.domain.y[1]-q.domain.y[0]);return Math.min(Y.titleBox.height,se/2)}function U(Y){var ee=Y.pull;if(!ee)return 0;var q;if(t.isArrayOrTypedArray(ee))for(ee=0,q=0;qee&&(ee=Y.pull[q]);return ee}function B(Y,ee){var q,se,ae,j,Q,re,pe,we,Se,Ie,Re,We,at;function nt(ue,ne){return ue.pxmid[1]-ne.pxmid[1]}function tt(ue,ne){return ne.pxmid[1]-ue.pxmid[1]}function qe(ue,ne){ne||(ne={});var Ce=ne.labelExtraY+(se?ne.yLabelMax:ne.yLabelMin),Ye=se?ue.yLabelMin:ue.yLabelMax,rt=se?ue.yLabelMax:ue.yLabelMin,Ke=ue.cyFinal+Q(ue.px0[1],ue.px1[1]),Mt=Ce-Ye,kt,Nt,Gt,Mr,mr,qr;if(Mt*pe>0&&(ue.labelExtraY=Mt),!!t.isArrayOrTypedArray(ee.pull))for(Nt=0;Nt=(f.castOption(ee.pull,Gt.pts)||0))&&((ue.pxmid[1]-Gt.pxmid[1])*pe>0?(Mr=Gt.cyFinal+Q(Gt.px0[1],Gt.px1[1]),Mt=Mr-Ye-ue.labelExtraY,Mt*pe>0&&(ue.labelExtraY+=Mt)):(rt+ue.labelExtraY-Ke)*pe>0&&(kt=3*re*Math.abs(Nt-Ie.indexOf(ue)),mr=Gt.cxFinal+j(Gt.px0[0],Gt.px1[0]),qr=mr+kt-(ue.cxFinal+ue.pxmid[0])-ue.labelExtraX,qr*re>0&&(ue.labelExtraX+=qr)))}for(se=0;se<2;se++)for(ae=se?nt:tt,Q=se?Math.max:Math.min,pe=se?1:-1,q=0;q<2;q++){for(j=q?Math.max:Math.min,re=q?1:-1,we=Y[se][q],we.sort(ae),Se=Y[1-se][q],Ie=Se.concat(we),We=[],Re=0;Re1?(we=q.r,Se=we/ae.aspectratio):(Se=q.r,we=Se*ae.aspectratio),we*=(1+ae.baseratio)/2,pe=we*Se}Q=Math.min(Q,pe/q.vTotal)}for(se=0;seee.vTotal/2?1:0,we.halfangle=Math.PI*Math.min(we.v/ee.vTotal,.5),we.ring=1-se.hole,we.rInscribed=L(we,ee))}function ce(Y,ee){return[Y*Math.sin(ee),-Y*Math.cos(ee)]}function de(Y,ee,q){var se=Y._fullLayout,ae=q.trace,j=ae.texttemplate,Q=ae.textinfo;if(!j&&Q&&Q!=="none"){var re=Q.split("+"),pe=function(ne){return re.indexOf(ne)!==-1},we=pe("label"),Se=pe("text"),Ie=pe("value"),Re=pe("percent"),We=se.separators,at;if(at=we?[ee.label]:[],Se){var nt=f.getFirstFilled(ae.text,ee.pts);c(nt)&&at.push(nt)}Ie&&at.push(f.formatPieValue(ee.v,We)),Re&&at.push(f.formatPiePercent(ee.v/q.vTotal,We)),ee.text=at.join("
")}function tt(ne){return{label:ne.label,value:ne.v,valueLabel:f.formatPieValue(ne.v,se.separators),percent:ne.v/q.vTotal,percentLabel:f.formatPiePercent(ne.v/q.vTotal,se.separators),color:ne.color,text:ne.text,customdata:t.castOption(ae,ne.i,"customdata")}}if(j){var qe=t.castOption(ae,ee.i,"texttemplate");if(!qe)ee.text="";else{var he=tt(ee),ue=f.getFirstFilled(ae.text,ee.pts);(c(ue)||ue==="")&&(he.text=ue),ee.text=t.texttemplateString({data:[he,ae._meta],fallback:ae.texttemplatefallback,labels:he,locale:Y._fullLayout._d3locale,template:qe})}}}function G(Y,ee){var q=Y.rotate*Math.PI/180,se=Math.cos(q),ae=Math.sin(q),j=(ee.left+ee.right)/2,Q=(ee.top+ee.bottom)/2;Y.textX=j*se-Q*ae,Y.textY=j*ae+Q*se,Y.noCenter=!0}V.exports={plot:T,formatSliceLabel:de,transformInsideText:g,determineInsideTextFont:A,positionTitleOutside:N,prerenderTitles:M,layoutAreas:X,attachFxHandlers:_,computeTransform:G}}}),LB=He({"src/traces/pie/style.js"(Z,V){"use strict";var d=Wn(),x=i1(),S=Sp().resizeText;V.exports=function(e){var t=e._fullLayout._pielayer.selectAll(".trace");S(e,t,"pie"),t.each(function(r){var o=r[0],a=o.trace,n=d.select(this);n.style({opacity:a.opacity}),n.selectAll("path.surface").each(function(i){d.select(this).call(x,i,a,e)})})}}}),PB=He({"src/traces/pie/base_plot.js"(Z){"use strict";var V=bc();Z.name="pie",Z.plot=function(d,x,S,E){V.plotBasePlot(Z.name,d,x,S,E)},Z.clean=function(d,x,S,E){V.cleanBasePlot(Z.name,d,x,S,E)}}}),IB=He({"src/traces/pie/index.js"(Z,V){"use strict";V.exports={attributes:og(),supplyDefaults:sg().supplyDefaults,supplyLayoutDefaults:kB(),layoutAttributes:_3(),calc:x1().calc,crossTraceCalc:x1().crossTraceCalc,plot:x3().plot,style:LB(),styleOne:i1(),moduleType:"trace",name:"pie",basePlotModule:PB(),categories:["pie-like","pie","showLegend"],meta:{}}}}),RB=He({"lib/pie.js"(Z,V){"use strict";V.exports=IB()}}),DB=He({"src/traces/sunburst/base_plot.js"(Z){"use strict";var V=bc();Z.name="sunburst",Z.plot=function(d,x,S,E){V.plotBasePlot(Z.name,d,x,S,E)},Z.clean=function(d,x,S,E){V.cleanBasePlot(Z.name,d,x,S,E)}}}),nM=He({"src/traces/sunburst/constants.js"(Z,V){"use strict";V.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"linear",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"]}}}),J_=He({"src/traces/sunburst/attributes.js"(Z,V){"use strict";var d=ru(),{hovertemplateAttrs:x,texttemplateAttrs:S,templatefallbackAttrs:E}=Jl(),e=ku(),t=wc().attributes,r=og(),o=nM(),a=Qo().extendFlat,n=Gh().pattern;V.exports={labels:{valType:"data_array",editType:"calc"},parents:{valType:"data_array",editType:"calc"},values:{valType:"data_array",editType:"calc"},branchvalues:{valType:"enumerated",values:["remainder","total"],dflt:"remainder",editType:"calc"},count:{valType:"flaglist",flags:["branches","leaves"],dflt:"leaves",editType:"calc"},level:{valType:"any",editType:"plot",anim:!0},maxdepth:{valType:"integer",editType:"plot",dflt:-1},marker:a({colors:{valType:"data_array",editType:"calc"},line:{color:a({},r.marker.line.color,{dflt:null}),width:a({},r.marker.line.width,{dflt:1}),editType:"calc"},pattern:n,editType:"calc"},e("marker",{colorAttr:"colors",anim:!1})),leaf:{opacity:{valType:"number",editType:"style",min:0,max:1},editType:"plot"},text:r.text,textinfo:{valType:"flaglist",flags:["label","text","value","current path","percent root","percent entry","percent parent"],extras:["none"],editType:"plot"},texttemplate:S({editType:"plot"},{keys:o.eventDataKeys.concat(["label","value"])}),texttemplatefallback:E({editType:"plot"}),hovertext:r.hovertext,hoverinfo:a({},d.hoverinfo,{flags:["label","text","value","name","current path","percent root","percent entry","percent parent"],dflt:"label+text+value+name"}),hovertemplate:x({},{keys:o.eventDataKeys}),hovertemplatefallback:E(),textfont:r.textfont,insidetextorientation:r.insidetextorientation,insidetextfont:r.insidetextfont,outsidetextfont:a({},r.outsidetextfont,{}),rotation:{valType:"angle",dflt:0,editType:"plot"},sort:r.sort,root:{color:{valType:"color",editType:"calc",dflt:"rgba(0,0,0,0)"},editType:"calc"},domain:t({name:"sunburst",trace:!0,editType:"calc"})}}}),oM=He({"src/traces/sunburst/layout_attributes.js"(Z,V){"use strict";V.exports={sunburstcolorway:{valType:"colorlist",editType:"calc"},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),zB=He({"src/traces/sunburst/defaults.js"(Z,V){"use strict";var d=sa(),x=J_(),S=wc().defaults,E=gd().handleText,e=sg().handleMarkerDefaults,t=rc(),r=t.hasColorscale,o=t.handleDefaults;V.exports=function(n,i,s,h){function f(A,M){return d.coerce(n,i,x,A,M)}var v=f("labels"),c=f("parents");if(!v||!v.length||!c||!c.length){i.visible=!1;return}var T=f("values");T&&T.length?f("branchvalues"):f("count"),f("level"),f("maxdepth"),e(n,i,h,f);var l=i._hasColorscale=r(n,"marker","colors")||(n.marker||{}).coloraxis;l&&o(n,i,h,f,{prefix:"marker.",cLetter:"c"}),f("leaf.opacity",l?1:.7);var _=f("text");f("texttemplate"),f("texttemplatefallback"),i.texttemplate||f("textinfo",d.isArrayOrTypedArray(_)?"text+label":"label"),f("hovertext"),f("hovertemplate"),f("hovertemplatefallback");var w="auto";E(n,i,h,f,w,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),f("insidetextorientation"),f("sort"),f("rotation"),f("root.color"),S(i,h,f),i._length=null}}}),FB=He({"src/traces/sunburst/layout_defaults.js"(Z,V){"use strict";var d=sa(),x=oM();V.exports=function(E,e){function t(r,o){return d.coerce(E,e,x,r,o)}t("sunburstcolorway",e.colorway),t("extendsunburstcolors")}}}),$_=He({"node_modules/d3-hierarchy/dist/d3-hierarchy.js"(Z,V){(function(d,x){typeof Z=="object"&&typeof V<"u"?x(Z):(d=d||self,x(d.d3=d.d3||{}))})(Z,function(d){"use strict";function x(Ae,Le){return Ae.parent===Le.parent?1:2}function S(Ae){return Ae.reduce(E,0)/Ae.length}function E(Ae,Le){return Ae+Le.x}function e(Ae){return 1+Ae.reduce(t,0)}function t(Ae,Le){return Math.max(Ae,Le.y)}function r(Ae){for(var Le;Le=Ae.children;)Ae=Le[0];return Ae}function o(Ae){for(var Le;Le=Ae.children;)Ae=Le[Le.length-1];return Ae}function a(){var Ae=x,Le=1,Ue=1,Ze=!1;function st(ut){var Ut,Ct=0;ut.eachAfter(function(sr){var Pr=sr.children;Pr?(sr.x=S(Pr),sr.y=e(Pr)):(sr.x=Ut?Ct+=Ae(sr,Ut):0,sr.y=0,Ut=sr)});var Pt=r(ut),jt=o(ut),fr=Pt.x-Ae(Pt,jt)/2,ur=jt.x+Ae(jt,Pt)/2;return ut.eachAfter(Ze?function(sr){sr.x=(sr.x-ut.x)*Le,sr.y=(ut.y-sr.y)*Ue}:function(sr){sr.x=(sr.x-fr)/(ur-fr)*Le,sr.y=(1-(ut.y?sr.y/ut.y:1))*Ue})}return st.separation=function(ut){return arguments.length?(Ae=ut,st):Ae},st.size=function(ut){return arguments.length?(Ze=!1,Le=+ut[0],Ue=+ut[1],st):Ze?null:[Le,Ue]},st.nodeSize=function(ut){return arguments.length?(Ze=!0,Le=+ut[0],Ue=+ut[1],st):Ze?[Le,Ue]:null},st}function n(Ae){var Le=0,Ue=Ae.children,Ze=Ue&&Ue.length;if(!Ze)Le=1;else for(;--Ze>=0;)Le+=Ue[Ze].value;Ae.value=Le}function i(){return this.eachAfter(n)}function s(Ae){var Le=this,Ue,Ze=[Le],st,ut,Ut;do for(Ue=Ze.reverse(),Ze=[];Le=Ue.pop();)if(Ae(Le),st=Le.children,st)for(ut=0,Ut=st.length;ut=0;--st)Ue.push(Ze[st]);return this}function f(Ae){for(var Le=this,Ue=[Le],Ze=[],st,ut,Ut;Le=Ue.pop();)if(Ze.push(Le),st=Le.children,st)for(ut=0,Ut=st.length;ut=0;)Ue+=Ze[st].value;Le.value=Ue})}function c(Ae){return this.eachBefore(function(Le){Le.children&&Le.children.sort(Ae)})}function T(Ae){for(var Le=this,Ue=l(Le,Ae),Ze=[Le];Le!==Ue;)Le=Le.parent,Ze.push(Le);for(var st=Ze.length;Ae!==Ue;)Ze.splice(st,0,Ae),Ae=Ae.parent;return Ze}function l(Ae,Le){if(Ae===Le)return Ae;var Ue=Ae.ancestors(),Ze=Le.ancestors(),st=null;for(Ae=Ue.pop(),Le=Ze.pop();Ae===Le;)st=Ae,Ae=Ue.pop(),Le=Ze.pop();return st}function _(){for(var Ae=this,Le=[Ae];Ae=Ae.parent;)Le.push(Ae);return Le}function w(){var Ae=[];return this.each(function(Le){Ae.push(Le)}),Ae}function A(){var Ae=[];return this.eachBefore(function(Le){Le.children||Ae.push(Le)}),Ae}function M(){var Ae=this,Le=[];return Ae.each(function(Ue){Ue!==Ae&&Le.push({source:Ue.parent,target:Ue})}),Le}function g(Ae,Le){var Ue=new m(Ae),Ze=+Ae.value&&(Ue.value=Ae.value),st,ut=[Ue],Ut,Ct,Pt,jt;for(Le==null&&(Le=p);st=ut.pop();)if(Ze&&(st.value=+st.data.value),(Ct=Le(st.data))&&(jt=Ct.length))for(st.children=new Array(jt),Pt=jt-1;Pt>=0;--Pt)ut.push(Ut=st.children[Pt]=new m(Ct[Pt])),Ut.parent=st,Ut.depth=st.depth+1;return Ue.eachBefore(y)}function b(){return g(this).eachBefore(u)}function p(Ae){return Ae.children}function u(Ae){Ae.data=Ae.data.data}function y(Ae){var Le=0;do Ae.height=Le;while((Ae=Ae.parent)&&Ae.height<++Le)}function m(Ae){this.data=Ae,this.depth=this.height=0,this.parent=null}m.prototype=g.prototype={constructor:m,count:i,each:s,eachAfter:f,eachBefore:h,sum:v,sort:c,path:T,ancestors:_,descendants:w,leaves:A,links:M,copy:b};var R=Array.prototype.slice;function L(Ae){for(var Le=Ae.length,Ue,Ze;Le;)Ze=Math.random()*Le--|0,Ue=Ae[Le],Ae[Le]=Ae[Ze],Ae[Ze]=Ue;return Ae}function z(Ae){for(var Le=0,Ue=(Ae=L(R.call(Ae))).length,Ze=[],st,ut;Le0&&Ue*Ue>Ze*Ze+st*st}function P(Ae,Le){for(var Ue=0;UePt?(st=(jt+Pt-ut)/(2*jt),Ct=Math.sqrt(Math.max(0,Pt/jt-st*st)),Ue.x=Ae.x-st*Ze-Ct*Ut,Ue.y=Ae.y-st*Ut+Ct*Ze):(st=(jt+ut-Pt)/(2*jt),Ct=Math.sqrt(Math.max(0,ut/jt-st*st)),Ue.x=Le.x+st*Ze-Ct*Ut,Ue.y=Le.y+st*Ut+Ct*Ze)):(Ue.x=Le.x+Ue.r,Ue.y=Le.y)}function ce(Ae,Le){var Ue=Ae.r+Le.r-1e-6,Ze=Le.x-Ae.x,st=Le.y-Ae.y;return Ue>0&&Ue*Ue>Ze*Ze+st*st}function de(Ae){var Le=Ae._,Ue=Ae.next._,Ze=Le.r+Ue.r,st=(Le.x*Ue.r+Ue.x*Le.r)/Ze,ut=(Le.y*Ue.r+Ue.y*Le.r)/Ze;return st*st+ut*ut}function G(Ae){this._=Ae,this.next=null,this.previous=null}function Y(Ae){if(!(st=Ae.length))return 0;var Le,Ue,Ze,st,ut,Ut,Ct,Pt,jt,fr,ur;if(Le=Ae[0],Le.x=0,Le.y=0,!(st>1))return Le.r;if(Ue=Ae[1],Le.x=-Ue.r,Ue.x=Le.r,Ue.y=0,!(st>2))return Le.r+Ue.r;le(Ue,Le,Ze=Ae[2]),Le=new G(Le),Ue=new G(Ue),Ze=new G(Ze),Le.next=Ze.previous=Ue,Ue.next=Le.previous=Ze,Ze.next=Ue.previous=Le;e:for(Ct=3;Ct0)throw new Error("cycle");return Ct}return Ue.id=function(Ze){return arguments.length?(Ae=se(Ze),Ue):Ae},Ue.parentId=function(Ze){return arguments.length?(Le=se(Ze),Ue):Le},Ue}function ne(Ae,Le){return Ae.parent===Le.parent?1:2}function Ce(Ae){var Le=Ae.children;return Le?Le[0]:Ae.t}function Ye(Ae){var Le=Ae.children;return Le?Le[Le.length-1]:Ae.t}function rt(Ae,Le,Ue){var Ze=Ue/(Le.i-Ae.i);Le.c-=Ze,Le.s+=Ue,Ae.c+=Ze,Le.z+=Ue,Le.m+=Ue}function Ke(Ae){for(var Le=0,Ue=0,Ze=Ae.children,st=Ze.length,ut;--st>=0;)ut=Ze[st],ut.z+=Le,ut.m+=Le,Le+=ut.s+(Ue+=ut.c)}function Mt(Ae,Le,Ue){return Ae.a.parent===Le.parent?Ae.a:Ue}function kt(Ae,Le){this._=Ae,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=Le}kt.prototype=Object.create(m.prototype);function Nt(Ae){for(var Le=new kt(Ae,0),Ue,Ze=[Le],st,ut,Ut,Ct;Ue=Ze.pop();)if(ut=Ue._.children)for(Ue.children=new Array(Ct=ut.length),Ut=Ct-1;Ut>=0;--Ut)Ze.push(st=Ue.children[Ut]=new kt(ut[Ut],Ut)),st.parent=Ue;return(Le.parent=new kt(null,0)).children=[Le],Le}function Gt(){var Ae=ne,Le=1,Ue=1,Ze=null;function st(jt){var fr=Nt(jt);if(fr.eachAfter(ut),fr.parent.m=-fr.z,fr.eachBefore(Ut),Ze)jt.eachBefore(Pt);else{var ur=jt,sr=jt,Pr=jt;jt.eachBefore(function(Wa){Wa.xsr.x&&(sr=Wa),Wa.depth>Pr.depth&&(Pr=Wa)});var Ta=ur===sr?1:Ae(ur,sr)/2,Oa=Ta-ur.x,Ia=Le/(sr.x+Ta+Oa),qa=Ue/(Pr.depth||1);jt.eachBefore(function(Wa){Wa.x=(Wa.x+Oa)*Ia,Wa.y=Wa.depth*qa})}return jt}function ut(jt){var fr=jt.children,ur=jt.parent.children,sr=jt.i?ur[jt.i-1]:null;if(fr){Ke(jt);var Pr=(fr[0].z+fr[fr.length-1].z)/2;sr?(jt.z=sr.z+Ae(jt._,sr._),jt.m=jt.z-Pr):jt.z=Pr}else sr&&(jt.z=sr.z+Ae(jt._,sr._));jt.parent.A=Ct(jt,sr,jt.parent.A||ur[0])}function Ut(jt){jt._.x=jt.z+jt.parent.m,jt.m+=jt.parent.m}function Ct(jt,fr,ur){if(fr){for(var sr=jt,Pr=jt,Ta=fr,Oa=sr.parent.children[0],Ia=sr.m,qa=Pr.m,Wa=Ta.m,Ca=Oa.m,hi;Ta=Ye(Ta),sr=Ce(sr),Ta&&sr;)Oa=Ce(Oa),Pr=Ye(Pr),Pr.a=jt,hi=Ta.z+Wa-sr.z-Ia+Ae(Ta._,sr._),hi>0&&(rt(Mt(Ta,jt,ur),jt,hi),Ia+=hi,qa+=hi),Wa+=Ta.m,Ia+=sr.m,Ca+=Oa.m,qa+=Pr.m;Ta&&!Ye(Pr)&&(Pr.t=Ta,Pr.m+=Wa-qa),sr&&!Ce(Oa)&&(Oa.t=sr,Oa.m+=Ia-Ca,ur=jt)}return ur}function Pt(jt){jt.x*=Le,jt.y=jt.depth*Ue}return st.separation=function(jt){return arguments.length?(Ae=jt,st):Ae},st.size=function(jt){return arguments.length?(Ze=!1,Le=+jt[0],Ue=+jt[1],st):Ze?null:[Le,Ue]},st.nodeSize=function(jt){return arguments.length?(Ze=!0,Le=+jt[0],Ue=+jt[1],st):Ze?[Le,Ue]:null},st}function Mr(Ae,Le,Ue,Ze,st){for(var ut=Ae.children,Ut,Ct=-1,Pt=ut.length,jt=Ae.value&&(st-Ue)/Ae.value;++CtWa&&(Wa=jt),Kt=Ia*Ia*wi,Ca=Math.max(Wa/Kt,Kt/qa),Ca>hi){Ia-=jt;break}hi=Ca}Ut.push(Pt={value:Ia,dice:Pr1?Ze:1)},Ue}(mr);function Ir(){var Ae=Er,Le=!1,Ue=1,Ze=1,st=[0],ut=ae,Ut=ae,Ct=ae,Pt=ae,jt=ae;function fr(sr){return sr.x0=sr.y0=0,sr.x1=Ue,sr.y1=Ze,sr.eachBefore(ur),st=[0],Le&&sr.eachBefore(Ie),sr}function ur(sr){var Pr=st[sr.depth],Ta=sr.x0+Pr,Oa=sr.y0+Pr,Ia=sr.x1-Pr,qa=sr.y1-Pr;Ia=sr-1){var Wa=ut[ur];Wa.x0=Ta,Wa.y0=Oa,Wa.x1=Ia,Wa.y1=qa;return}for(var Ca=jt[ur],hi=Pr/2+Ca,wi=ur+1,Kt=sr-1;wi>>1;jt[Dt]qa-Oa){var Fr=(Ta*Jt+Ia*Yt)/Pr;fr(ur,wi,Yt,Ta,Oa,Fr,qa),fr(wi,sr,Jt,Fr,Oa,Ia,qa)}else{var ta=(Oa*Jt+qa*Yt)/Pr;fr(ur,wi,Yt,Ta,Oa,Ia,ta),fr(wi,sr,Jt,Ta,ta,Ia,qa)}}}function Oe(Ae,Le,Ue,Ze,st){(Ae.depth&1?Mr:Re)(Ae,Le,Ue,Ze,st)}var Je=function Ae(Le){function Ue(Ze,st,ut,Ut,Ct){if((Pt=Ze._squarify)&&Pt.ratio===Le)for(var Pt,jt,fr,ur,sr=-1,Pr,Ta=Pt.length,Oa=Ze.value;++sr1?Ze:1)},Ue}(mr);d.cluster=a,d.hierarchy=g,d.pack=re,d.packEnclose=z,d.packSiblings=ee,d.partition=We,d.stratify=ue,d.tree=Gt,d.treemap=Ir,d.treemapBinary=_t,d.treemapDice=Re,d.treemapResquarify=Je,d.treemapSlice=Mr,d.treemapSliceDice=Oe,d.treemapSquarify=Er,Object.defineProperty(d,"__esModule",{value:!0})})}}),Q_=He({"src/traces/sunburst/calc.js"(Z){"use strict";var V=$_(),d=as(),x=sa(),S=rc().makeColorScaleFuncFromTrace,E=x1().makePullColorFn,e=x1().generateExtendedColors,t=rc().calc,r=Ws().ALMOST_EQUAL,o={},a={},n={};Z.calc=function(s,h){var f=s._fullLayout,v=h.ids,c=x.isArrayOrTypedArray(v),T=h.labels,l=h.parents,_=h.values,w=x.isArrayOrTypedArray(_),A=[],M={},g={},b=function(ee,q){M[ee]?M[ee].push(q):M[ee]=[q],g[q]=1},p=function(ee){return ee||typeof ee=="number"},u=function(ee){return!w||d(_[ee])&&_[ee]>=0},y,m,R;c?(y=Math.min(v.length,l.length),m=function(ee){return p(v[ee])&&u(ee)},R=function(ee){return String(v[ee])}):(y=Math.min(T.length,l.length),m=function(ee){return p(T[ee])&&u(ee)},R=function(ee){return String(T[ee])}),w&&(y=Math.min(y,_.length));for(var L=0;L1){for(var U=x.randstr(),B=0;B>8&15|V>>4&240,V>>4&15|V&240,(V&15)<<4|V&15,1):d===8?ex(V>>24&255,V>>16&255,V>>8&255,(V&255)/255):d===4?ex(V>>12&15|V>>8&240,V>>8&15|V>>4&240,V>>4&15|V&240,((V&15)<<4|V&15)/255):null):(V=mM.exec(Z))?new Xh(V[1],V[2],V[3],1):(V=gM.exec(Z))?new Xh(V[1]*255/100,V[2]*255/100,V[3]*255/100,1):(V=yM.exec(Z))?ex(V[1],V[2],V[3],V[4]):(V=_M.exec(Z))?ex(V[1]*255/100,V[2]*255/100,V[3]*255/100,V[4]):(V=xM.exec(Z))?hM(V[1],V[2]/100,V[3]/100,1):(V=bM.exec(Z))?hM(V[1],V[2]/100,V[3]/100,V[4]):S3.hasOwnProperty(Z)?uM(S3[Z]):Z==="transparent"?new Xh(NaN,NaN,NaN,0):null}function uM(Z){return new Xh(Z>>16&255,Z>>8&255,Z&255,1)}function ex(Z,V,d,x){return x<=0&&(Z=V=d=NaN),new Xh(Z,V,d,x)}function w3(Z){return Z instanceof Jv||(Z=w1(Z)),Z?(Z=Z.rgb(),new Xh(Z.r,Z.g,Z.b,Z.opacity)):new Xh}function tx(Z,V,d,x){return arguments.length===1?w3(Z):new Xh(Z,V,d,x??1)}function Xh(Z,V,d,x){this.r=+Z,this.g=+V,this.b=+d,this.opacity=+x}function cM(){return`#${l0(this.r)}${l0(this.g)}${l0(this.b)}`}function NB(){return`#${l0(this.r)}${l0(this.g)}${l0(this.b)}${l0((isNaN(this.opacity)?1:this.opacity)*255)}`}function fM(){let Z=rx(this.opacity);return`${Z===1?"rgb(":"rgba("}${s0(this.r)}, ${s0(this.g)}, ${s0(this.b)}${Z===1?")":`, ${Z})`}`}function rx(Z){return isNaN(Z)?1:Math.max(0,Math.min(1,Z))}function s0(Z){return Math.max(0,Math.min(255,Math.round(Z)||0))}function l0(Z){return Z=s0(Z),(Z<16?"0":"")+Z.toString(16)}function hM(Z,V,d,x){return x<=0?Z=V=d=NaN:d<=0||d>=1?Z=V=NaN:V<=0&&(Z=NaN),new Ud(Z,V,d,x)}function pM(Z){if(Z instanceof Ud)return new Ud(Z.h,Z.s,Z.l,Z.opacity);if(Z instanceof Jv||(Z=w1(Z)),!Z)return new Ud;if(Z instanceof Ud)return Z;Z=Z.rgb();var V=Z.r/255,d=Z.g/255,x=Z.b/255,S=Math.min(V,d,x),E=Math.max(V,d,x),e=NaN,t=E-S,r=(E+S)/2;return t?(V===E?e=(d-x)/t+(d0&&r<1?0:e,new Ud(e,t,r,Z.opacity)}function T3(Z,V,d,x){return arguments.length===1?pM(Z):new Ud(Z,V,d,x??1)}function Ud(Z,V,d,x){this.h=+Z,this.s=+V,this.l=+d,this.opacity=+x}function dM(Z){return Z=(Z||0)%360,Z<0?Z+360:Z}function ax(Z){return Math.max(0,Math.min(1,Z||0))}function A3(Z,V,d){return(Z<60?V+(d-V)*Z/60:Z<180?d:Z<240?V+(d-V)*(240-Z)/60:V)*255}var $v,u0,c0,ug,jd,vM,mM,gM,yM,_M,xM,bM,S3,M3=Go({"node_modules/d3-color/src/color.js"(){b3(),$v=.7,u0=1/$v,c0="\\s*([+-]?\\d+)\\s*",ug="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",jd="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",vM=/^#([0-9a-f]{3,8})$/,mM=new RegExp(`^rgb\\(${c0},${c0},${c0}\\)$`),gM=new RegExp(`^rgb\\(${jd},${jd},${jd}\\)$`),yM=new RegExp(`^rgba\\(${c0},${c0},${c0},${ug}\\)$`),_M=new RegExp(`^rgba\\(${jd},${jd},${jd},${ug}\\)$`),xM=new RegExp(`^hsl\\(${ug},${jd},${jd}\\)$`),bM=new RegExp(`^hsla\\(${ug},${jd},${jd},${ug}\\)$`),S3={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},lg(Jv,w1,{copy(Z){return Object.assign(new this.constructor,this,Z)},displayable(){return this.rgb().displayable()},hex:sM,formatHex:sM,formatHex8:OB,formatHsl:BB,formatRgb:lM,toString:lM}),lg(Xh,tx,b1(Jv,{brighter(Z){return Z=Z==null?u0:Math.pow(u0,Z),new Xh(this.r*Z,this.g*Z,this.b*Z,this.opacity)},darker(Z){return Z=Z==null?$v:Math.pow($v,Z),new Xh(this.r*Z,this.g*Z,this.b*Z,this.opacity)},rgb(){return this},clamp(){return new Xh(s0(this.r),s0(this.g),s0(this.b),rx(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:cM,formatHex:cM,formatHex8:NB,formatRgb:fM,toString:fM})),lg(Ud,T3,b1(Jv,{brighter(Z){return Z=Z==null?u0:Math.pow(u0,Z),new Ud(this.h,this.s,this.l*Z,this.opacity)},darker(Z){return Z=Z==null?$v:Math.pow($v,Z),new Ud(this.h,this.s,this.l*Z,this.opacity)},rgb(){var Z=this.h%360+(this.h<0)*360,V=isNaN(Z)||isNaN(this.s)?0:this.s,d=this.l,x=d+(d<.5?d:1-d)*V,S=2*d-x;return new Xh(A3(Z>=240?Z-240:Z+120,S,x),A3(Z,S,x),A3(Z<120?Z+240:Z-120,S,x),this.opacity)},clamp(){return new Ud(dM(this.h),ax(this.s),ax(this.l),rx(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let Z=rx(this.opacity);return`${Z===1?"hsl(":"hsla("}${dM(this.h)}, ${ax(this.s)*100}%, ${ax(this.l)*100}%${Z===1?")":`, ${Z})`}`}}))}}),E3,k3,wM=Go({"node_modules/d3-color/src/math.js"(){E3=Math.PI/180,k3=180/Math.PI}});function TM(Z){if(Z instanceof rv)return new rv(Z.l,Z.a,Z.b,Z.opacity);if(Z instanceof Mv)return AM(Z);Z instanceof Xh||(Z=w3(Z));var V=R3(Z.r),d=R3(Z.g),x=R3(Z.b),S=L3((.2225045*V+.7168786*d+.0606169*x)/F3),E,e;return V===d&&d===x?E=e=S:(E=L3((.4360747*V+.3850649*d+.1430804*x)/z3),e=L3((.0139322*V+.0971045*d+.7141733*x)/O3)),new rv(116*S-16,500*(E-S),200*(S-e),Z.opacity)}function C3(Z,V,d,x){return arguments.length===1?TM(Z):new rv(Z,V,d,x??1)}function rv(Z,V,d,x){this.l=+Z,this.a=+V,this.b=+d,this.opacity=+x}function L3(Z){return Z>SM?Math.pow(Z,.3333333333333333):Z/N3+B3}function P3(Z){return Z>f0?Z*Z*Z:N3*(Z-B3)}function I3(Z){return 255*(Z<=.0031308?12.92*Z:1.055*Math.pow(Z,.4166666666666667)-.055)}function R3(Z){return(Z/=255)<=.04045?Z/12.92:Math.pow((Z+.055)/1.055,2.4)}function UB(Z){if(Z instanceof Mv)return new Mv(Z.h,Z.c,Z.l,Z.opacity);if(Z instanceof rv||(Z=TM(Z)),Z.a===0&&Z.b===0)return new Mv(NaN,0=1?(d=1,V-1):Math.floor(d*V),S=Z[x],E=Z[x+1],e=x>0?Z[x-1]:2*S-E,t=x()=>Z}});function PM(Z,V){return function(d){return Z+d*V}}function GB(Z,V,d){return Z=Math.pow(Z,d),V=Math.pow(V,d)-Z,d=1/d,function(x){return Math.pow(Z+x*V,d)}}function ox(Z,V){var d=V-Z;return d?PM(Z,d>180||d<-180?d-360*Math.round(d/360):d):S1(isNaN(Z)?V:Z)}function HB(Z){return(Z=+Z)==1?Zh:function(V,d){return d-V?GB(V,d,Z):S1(isNaN(V)?d:V)}}function Zh(Z,V){var d=V-Z;return d?PM(Z,d):S1(isNaN(Z)?V:Z)}var hg=Go({"node_modules/d3-interpolate/src/color.js"(){LM()}});function IM(Z){return function(V){var d=V.length,x=new Array(d),S=new Array(d),E=new Array(d),e,t;for(e=0;ed&&(E=V.slice(d,E),t[e]?t[e]+=E:t[++e]=E),(x=x[0])===(S=S[0])?t[e]?t[e]+=S:t[++e]=S:(t[++e]=null,r.push({i:e,x:av(x,S)})),d=cx.lastIndex;return d180?a+=360:a-o>180&&(o+=360),i.push({i:n.push(S(n)+"rotate(",null,x)-2,x:av(o,a)})):a&&n.push(S(n)+"rotate("+a+x)}function t(o,a,n,i){o!==a?i.push({i:n.push(S(n)+"skewX(",null,x)-2,x:av(o,a)}):a&&n.push(S(n)+"skewX("+a+x)}function r(o,a,n,i,s,h){if(o!==n||a!==i){var f=s.push(S(s)+"scale(",null,",",null,")");h.push({i:f-4,x:av(o,n)},{i:f-2,x:av(a,i)})}else(n!==1||i!==1)&&s.push(S(s)+"scale("+n+","+i+")")}return function(o,a){var n=[],i=[];return o=Z(o),a=Z(a),E(o.translateX,o.translateY,a.translateX,a.translateY,n,i),e(o.rotate,a.rotate,n,i),t(o.skewX,a.skewX,n,i),r(o.scaleX,o.scaleY,a.scaleX,a.scaleY,n,i),o=a=null,function(s){for(var h=-1,f=i.length,v;++hfx,interpolateArray:()=>WB,interpolateBasis:()=>EM,interpolateBasisClosed:()=>kM,interpolateCubehelix:()=>nE,interpolateCubehelixLong:()=>oE,interpolateDate:()=>NM,interpolateDiscrete:()=>YB,interpolateHcl:()=>rE,interpolateHclLong:()=>aE,interpolateHsl:()=>QM,interpolateHslLong:()=>eE,interpolateHue:()=>JB,interpolateLab:()=>cN,interpolateNumber:()=>av,interpolateNumberArray:()=>W3,interpolateObject:()=>jM,interpolateRgb:()=>sx,interpolateRgbBasis:()=>RM,interpolateRgbBasisClosed:()=>DM,interpolateRound:()=>QB,interpolateString:()=>VM,interpolateTransformCss:()=>XM,interpolateTransformSvg:()=>ZM,interpolateZoom:()=>JM,piecewise:()=>dN,quantize:()=>mN});var pg=Go({"node_modules/d3-interpolate/src/index.js"(){hx(),BM(),H3(),CM(),UM(),KB(),$B(),lx(),X3(),qM(),eN(),GM(),nN(),lN(),zM(),uN(),fN(),hN(),pN(),vN(),gN()}}),Y3=He({"src/traces/sunburst/fill_one.js"(Z,V){"use strict";var d=es(),x=Jn();V.exports=function(E,e,t,r,o){var a=e.data.data,n=a.i,i=o||a.color;if(n>=0){e.i=a.i;var s=t.marker;s.pattern?(!s.colors||!s.pattern.shape)&&(s.color=i,e.color=i):(s.color=i,e.color=i),d.pointStyle(E,t,r,e)}else x.fill(E,i)}}}),sE=He({"src/traces/sunburst/style.js"(Z,V){"use strict";var d=Wn(),x=Jn(),S=sa(),E=Sp().resizeText,e=Y3();function t(o){var a=o._fullLayout._sunburstlayer.selectAll(".trace");E(o,a,"sunburst"),a.each(function(n){var i=d.select(this),s=n[0],h=s.trace;i.style("opacity",h.opacity),i.selectAll("path.surface").each(function(f){d.select(this).call(r,f,h,o)})})}function r(o,a,n,i){var s=a.data.data,h=!a.children,f=s.i,v=S.castOption(n,f,"marker.line.color")||x.defaultLine,c=S.castOption(n,f,"marker.line.width")||0;o.call(e,a,n,i).style("stroke-width",c).call(x.stroke,v).style("opacity",h?n.leaf.opacity:null)}V.exports={style:t,styleOne:r}}}),Qv=He({"src/traces/sunburst/helpers.js"(Z){"use strict";var V=sa(),d=Jn(),x=Kd(),S=t0();Z.findEntryWithLevel=function(r,o){var a;return o&&r.eachAfter(function(n){if(Z.getPtId(n)===o)return a=n.copy()}),a||r},Z.findEntryWithChild=function(r,o){var a;return r.eachAfter(function(n){for(var i=n.children||[],s=0;s0)},Z.getMaxDepth=function(r){return r.maxdepth>=0?r.maxdepth:1/0},Z.isHeader=function(r,o){return!(Z.isLeaf(r)||r.depth===o._maxDepth-1)};function t(r){return r.data.data.pid}Z.getParent=function(r,o){return Z.findEntryWithLevel(r,t(o))},Z.listPath=function(r,o){var a=r.parent;if(!a)return[];var n=o?[a.data[o]]:[a];return Z.listPath(a,o).concat(n)},Z.getPath=function(r){return Z.listPath(r,"label").join("/")+"/"},Z.formatValue=S.formatPieValue,Z.formatPercent=function(r,o){var a=V.formatPercent(r,0);return a==="0%"&&(a=S.formatPiePercent(r,o)),a}}}),vx=He({"src/traces/sunburst/fx.js"(Z,V){"use strict";var d=Wn(),x=lo(),S=$p().appendArrayPointValue,E=rf(),e=sa(),t=Qy(),r=Qv(),o=t0(),a=o.formatPieValue;V.exports=function(s,h,f,v,c){var T=v[0],l=T.trace,_=T.hierarchy,w=l.type==="sunburst",A=l.type==="treemap"||l.type==="icicle";"_hasHoverLabel"in l||(l._hasHoverLabel=!1),"_hasHoverEvent"in l||(l._hasHoverEvent=!1);var M=function(p){var u=f._fullLayout;if(!(f._dragging||u.hovermode===!1)){var y=f._fullData[l.index],m=p.data.data,R=m.i,L=r.isHierarchyRoot(p),z=r.getParent(_,p),F=r.getValue(p),N=function(Q){return e.castOption(y,R,Q)},O=N("hovertemplate"),P=E.castHoverinfo(y,u,R),U=u.separators,B;if(O||P&&P!=="none"&&P!=="skip"){var X,$;w&&(X=T.cx+p.pxmid[0]*(1-p.rInscribed),$=T.cy+p.pxmid[1]*(1-p.rInscribed)),A&&(X=p._hoverX,$=p._hoverY);var le={},ce=[],de=[],G=function(Q){return ce.indexOf(Q)!==-1};P&&(ce=P==="all"?y._module.attributes.hoverinfo.flags:P.split("+")),le.label=m.label,G("label")&&le.label&&de.push(le.label),m.hasOwnProperty("v")&&(le.value=m.v,le.valueLabel=a(le.value,U),G("value")&&de.push(le.valueLabel)),le.currentPath=p.currentPath=r.getPath(p.data),G("current path")&&!L&&de.push(le.currentPath);var Y,ee=[],q=function(){ee.indexOf(Y)===-1&&(de.push(Y),ee.push(Y))};le.percentParent=p.percentParent=F/r.getValue(z),le.parent=p.parentString=r.getPtLabel(z),G("percent parent")&&(Y=r.formatPercent(le.percentParent,U)+" of "+le.parent,q()),le.percentEntry=p.percentEntry=F/r.getValue(h),le.entry=p.entry=r.getPtLabel(h),G("percent entry")&&!L&&!p.onPathbar&&(Y=r.formatPercent(le.percentEntry,U)+" of "+le.entry,q()),le.percentRoot=p.percentRoot=F/r.getValue(_),le.root=p.root=r.getPtLabel(_),G("percent root")&&!L&&(Y=r.formatPercent(le.percentRoot,U)+" of "+le.root,q()),le.text=N("hovertext")||N("text"),G("text")&&(Y=le.text,e.isValidTextValue(Y)&&de.push(Y)),B=[n(p,y,c.eventDataKeys)];var se={trace:y,y:$,_x0:p._x0,_x1:p._x1,_y0:p._y0,_y1:p._y1,text:de.join("
"),name:O||G("name")?y.name:void 0,color:N("hoverlabel.bgcolor")||m.color,borderColor:N("hoverlabel.bordercolor"),fontFamily:N("hoverlabel.font.family"),fontSize:N("hoverlabel.font.size"),fontColor:N("hoverlabel.font.color"),fontWeight:N("hoverlabel.font.weight"),fontStyle:N("hoverlabel.font.style"),fontVariant:N("hoverlabel.font.variant"),nameLength:N("hoverlabel.namelength"),textAlign:N("hoverlabel.align"),hovertemplate:O,hovertemplateLabels:le,eventData:B};w&&(se.x0=X-p.rInscribed*p.rpx1,se.x1=X+p.rInscribed*p.rpx1,se.idealAlign=p.pxmid[0]<0?"left":"right"),A&&(se.x=X,se.idealAlign=X<0?"left":"right");var ae=[];E.loneHover(se,{container:u._hoverlayer.node(),outerContainer:u._paper.node(),gd:f,inOut_bbox:ae}),B[0].bbox=ae[0],l._hasHoverLabel=!0}if(A){var j=s.select("path.surface");c.styleOne(j,p,y,f,{hovered:!0})}l._hasHoverEvent=!0,f.emit("plotly_hover",{points:B||[n(p,y,c.eventDataKeys)],event:d.event})}},g=function(p){var u=f._fullLayout,y=f._fullData[l.index],m=d.select(this).datum();if(l._hasHoverEvent&&(p.originalEvent=d.event,f.emit("plotly_unhover",{points:[n(m,y,c.eventDataKeys)],event:d.event}),l._hasHoverEvent=!1),l._hasHoverLabel&&(E.loneUnhover(u._hoverlayer.node()),l._hasHoverLabel=!1),A){var R=s.select("path.surface");c.styleOne(R,m,y,f,{hovered:!1})}},b=function(p){var u=f._fullLayout,y=f._fullData[l.index],m=w&&(r.isHierarchyRoot(p)||r.isLeaf(p)),R=r.getPtId(p),L=r.isEntry(p)?r.findEntryWithChild(_,R):r.findEntryWithLevel(_,R),z=r.getPtId(L),F={points:[n(p,y,c.eventDataKeys)],event:d.event};m||(F.nextLevel=z);var N=t.triggerHandler(f,"plotly_"+l.type+"click",F);if(N!==!1&&u.hovermode&&(f._hoverdata=[n(p,y,c.eventDataKeys)],E.click(f,d.event)),!m&&N!==!1&&!f._dragging&&!f._transitioning){x.call("_storeDirectGUIEdit",y,u._tracePreGUI[y.uid],{level:y.level});var O={data:[{level:z}],traces:[l.index]},P={frame:{redraw:!1,duration:c.transitionTime},transition:{duration:c.transitionTime,easing:c.transitionEasing},mode:"immediate",fromcurrent:!0};E.loneUnhover(u._hoverlayer.node()),x.call("animate",f,O,P)}};s.on("mouseover",M),s.on("mouseout",g),s.on("click",b)};function n(i,s,h){for(var f=i.data.data,v={curveNumber:s.index,pointNumber:f.i,data:s._input,fullData:s},c=0;crt.x1?2*Math.PI:0)+Q;Ke=ne.rpx1We?2*Math.PI:0)+Q;Ye={x0:Ke,x1:Ke}}else Ye={rpx0:ce,rpx1:ce},E.extendFlat(Ye,ue(ne));else Ye={rpx0:0,rpx1:0};else Ye={x0:Q,x1:Q};return x(Ye,rt)}function he(ne){var Ce=ee[T.getPtId(ne)],Ye,rt=ne.transform;if(Ce)Ye=Ce;else if(Ye={rpx1:ne.rpx1,transform:{textPosAngle:rt.textPosAngle,scale:0,rotate:rt.rotate,rCenter:rt.rCenter,x:rt.x,y:rt.y}},Y)if(ne.parent)if(We){var Ke=ne.x1>We?2*Math.PI:0;Ye.x0=Ye.x1=Ke}else E.extendFlat(Ye,ue(ne));else Ye.x0=Ye.x1=Q;else Ye.x0=Ye.x1=Q;var Mt=x(Ye.transform.textPosAngle,ne.transform.textPosAngle),kt=x(Ye.rpx1,ne.rpx1),Nt=x(Ye.x0,ne.x0),Gt=x(Ye.x1,ne.x1),Mr=x(Ye.transform.scale,rt.scale),mr=x(Ye.transform.rotate,rt.rotate),qr=rt.rCenter===0?3:Ye.transform.rCenter===0?1/3:1,Er=x(Ye.transform.rCenter,rt.rCenter),Ir=function(_t){return Er(Math.pow(_t,qr))};return function(_t){var Oe=kt(_t),Je=Nt(_t),Ae=Gt(_t),Le=Ir(_t),Ue=we(Oe,(Je+Ae)/2),Ze=Mt(_t),st={pxmid:Ue,rpx1:Oe,transform:{textPosAngle:Ze,rCenter:Le,x:rt.x,y:rt.y}};return r(N.type,rt,m),{transform:{targetX:Ie(st),targetY:Re(st),scale:Mr(_t),rotate:mr(_t),rCenter:Le}}}}function ue(ne){var Ce=ne.parent,Ye=ee[T.getPtId(Ce)],rt={};if(Ye){var Ke=Ce.children,Mt=Ke.indexOf(ne),kt=Ke.length,Nt=x(Ye.x0,Ye.x1);rt.x0=Nt(Mt/kt),rt.x1=Nt(Mt/kt)}else rt.x0=rt.x1=0;return rt}}function _(g){return d.partition().size([2*Math.PI,g.height+1])(g)}Z.formatSliceLabel=function(g,b,p,u,y){var m=p.texttemplate,R=p.textinfo;if(!m&&(!R||R==="none"))return"";var L=y.separators,z=u[0],F=g.data.data,N=z.hierarchy,O=T.isHierarchyRoot(g),P=T.getParent(N,g),U=T.getValue(g);if(!m){var B=R.split("+"),X=function(ae){return B.indexOf(ae)!==-1},$=[],le;if(X("label")&&F.label&&$.push(F.label),F.hasOwnProperty("v")&&X("value")&&$.push(T.formatValue(F.v,L)),!O){X("current path")&&$.push(T.getPath(g.data));var ce=0;X("percent parent")&&ce++,X("percent entry")&&ce++,X("percent root")&&ce++;var de=ce>1;if(ce){var G,Y=function(ae){le=T.formatPercent(G,L),de&&(le+=" of "+ae),$.push(le)};X("percent parent")&&!O&&(G=U/T.getValue(P),Y("parent")),X("percent entry")&&(G=U/T.getValue(b),Y("entry")),X("percent root")&&(G=U/T.getValue(N),Y("root"))}}return X("text")&&(le=E.castOption(p,F.i,"text"),E.isValidTextValue(le)&&$.push(le)),$.join("
")}var ee=E.castOption(p,F.i,"texttemplate");if(!ee)return"";var q={};F.label&&(q.label=F.label),F.hasOwnProperty("v")&&(q.value=F.v,q.valueLabel=T.formatValue(F.v,L)),q.currentPath=T.getPath(g.data),O||(q.percentParent=U/T.getValue(P),q.percentParentLabel=T.formatPercent(q.percentParent,L),q.parent=T.getPtLabel(P)),q.percentEntry=U/T.getValue(b),q.percentEntryLabel=T.formatPercent(q.percentEntry,L),q.entry=T.getPtLabel(b),q.percentRoot=U/T.getValue(N),q.percentRootLabel=T.formatPercent(q.percentRoot,L),q.root=T.getPtLabel(N),F.hasOwnProperty("color")&&(q.color=F.color);var se=E.castOption(p,F.i,"text");return(E.isValidTextValue(se)||se==="")&&(q.text=se),q.customdata=E.castOption(p,F.i,"customdata"),E.texttemplateString({data:[q,p._meta],fallback:p.texttemplatefallback,labels:q,locale:y._d3locale,template:ee})};function w(g){return g.rpx0===0&&E.isFullCircle([g.x0,g.x1])?1:Math.max(0,Math.min(1/(1+1/Math.sin(g.halfangle)),g.ring/2))}function A(g){return M(g.rpx1,g.transform.textPosAngle)}function M(g,b){return[g*Math.sin(b),-g*Math.cos(b)]}}}),yN=He({"src/traces/sunburst/index.js"(Z,V){"use strict";V.exports={moduleType:"trace",name:"sunburst",basePlotModule:DB(),categories:[],animatable:!0,attributes:J_(),layoutAttributes:oM(),supplyDefaults:zB(),supplyLayoutDefaults:FB(),calc:Q_().calc,crossTraceCalc:Q_().crossTraceCalc,plot:K3().plot,style:sE().style,colorbar:pp(),meta:{}}}}),_N=He({"lib/sunburst.js"(Z,V){"use strict";V.exports=yN()}}),xN=He({"src/traces/treemap/base_plot.js"(Z){"use strict";var V=bc();Z.name="treemap",Z.plot=function(d,x,S,E){V.plotBasePlot(Z.name,d,x,S,E)},Z.clean=function(d,x,S,E){V.cleanBasePlot(Z.name,d,x,S,E)}}}),dg=He({"src/traces/treemap/constants.js"(Z,V){"use strict";V.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1}}}),J3=He({"src/traces/treemap/attributes.js"(Z,V){"use strict";var{hovertemplateAttrs:d,texttemplateAttrs:x,templatefallbackAttrs:S}=Jl(),E=ku(),e=wc().attributes,t=og(),r=J_(),o=dg(),a=Qo().extendFlat,n=Gh().pattern;V.exports={labels:r.labels,parents:r.parents,values:r.values,branchvalues:r.branchvalues,count:r.count,level:r.level,maxdepth:r.maxdepth,tiling:{packing:{valType:"enumerated",values:["squarify","binary","dice","slice","slice-dice","dice-slice"],dflt:"squarify",editType:"plot"},squarifyratio:{valType:"number",min:1,dflt:1,editType:"plot"},flip:{valType:"flaglist",flags:["x","y"],dflt:"",editType:"plot"},pad:{valType:"number",min:0,dflt:3,editType:"plot"},editType:"calc"},marker:a({pad:{t:{valType:"number",min:0,editType:"plot"},l:{valType:"number",min:0,editType:"plot"},r:{valType:"number",min:0,editType:"plot"},b:{valType:"number",min:0,editType:"plot"},editType:"calc"},colors:r.marker.colors,pattern:n,depthfade:{valType:"enumerated",values:[!0,!1,"reversed"],editType:"style"},line:r.marker.line,cornerradius:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},E("marker",{colorAttr:"colors",anim:!1})),pathbar:{visible:{valType:"boolean",dflt:!0,editType:"plot"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},edgeshape:{valType:"enumerated",values:[">","<","|","/","\\"],dflt:">",editType:"plot"},thickness:{valType:"number",min:12,editType:"plot"},textfont:a({},t.textfont,{}),editType:"calc"},text:t.text,textinfo:r.textinfo,texttemplate:x({editType:"plot"},{keys:o.eventDataKeys.concat(["label","value"])}),texttemplatefallback:S({editType:"plot"}),hovertext:t.hovertext,hoverinfo:r.hoverinfo,hovertemplate:d({},{keys:o.eventDataKeys}),hovertemplatefallback:S(),textfont:t.textfont,insidetextfont:t.insidetextfont,outsidetextfont:a({},t.outsidetextfont,{}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"top left",editType:"plot"},sort:t.sort,root:r.root,domain:e({name:"treemap",trace:!0,editType:"calc"})}}}),lE=He({"src/traces/treemap/layout_attributes.js"(Z,V){"use strict";V.exports={treemapcolorway:{valType:"colorlist",editType:"calc"},extendtreemapcolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),bN=He({"src/traces/treemap/defaults.js"(Z,V){"use strict";var d=sa(),x=J3(),S=Jn(),E=wc().defaults,e=gd().handleText,t=i0().TEXTPAD,r=sg().handleMarkerDefaults,o=rc(),a=o.hasColorscale,n=o.handleDefaults;V.exports=function(s,h,f,v){function c(y,m){return d.coerce(s,h,x,y,m)}var T=c("labels"),l=c("parents");if(!T||!T.length||!l||!l.length){h.visible=!1;return}var _=c("values");_&&_.length?c("branchvalues"):c("count"),c("level"),c("maxdepth");var w=c("tiling.packing");w==="squarify"&&c("tiling.squarifyratio"),c("tiling.flip"),c("tiling.pad");var A=c("text");c("texttemplate"),c("texttemplatefallback"),h.texttemplate||c("textinfo",d.isArrayOrTypedArray(A)?"text+label":"label"),c("hovertext"),c("hovertemplate"),c("hovertemplatefallback");var M=c("pathbar.visible"),g="auto";e(s,h,v,c,g,{hasPathbar:M,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),c("textposition");var b=h.textposition.indexOf("bottom")!==-1;r(s,h,v,c);var p=h._hasColorscale=a(s,"marker","colors")||(s.marker||{}).coloraxis;p?n(s,h,v,c,{prefix:"marker.",cLetter:"c"}):c("marker.depthfade",!(h.marker.colors||[]).length);var u=h.textfont.size*2;c("marker.pad.t",b?u/4:u),c("marker.pad.l",u/4),c("marker.pad.r",u/4),c("marker.pad.b",b?u:u/4),c("marker.cornerradius"),h._hovered={marker:{line:{width:2,color:S.contrast(v.paper_bgcolor)}}},M&&(c("pathbar.thickness",h.pathbar.textfont.size+2*t),c("pathbar.side"),c("pathbar.edgeshape")),c("sort"),c("root.color"),E(h,v,c),h._length=null}}}),wN=He({"src/traces/treemap/layout_defaults.js"(Z,V){"use strict";var d=sa(),x=lE();V.exports=function(E,e){function t(r,o){return d.coerce(E,e,x,r,o)}t("treemapcolorway",e.colorway),t("extendtreemapcolors")}}}),uE=He({"src/traces/treemap/calc.js"(Z){"use strict";var V=Q_();Z.calc=function(d,x){return V.calc(d,x)},Z.crossTraceCalc=function(d){return V._runCrossTraceCalc("treemap",d)}}}),cE=He({"src/traces/treemap/flip_tree.js"(Z,V){"use strict";V.exports=function d(x,S,E){var e;E.swapXY&&(e=x.x0,x.x0=x.y0,x.y0=e,e=x.x1,x.x1=x.y1,x.y1=e),E.flipX&&(e=x.x0,x.x0=S[0]-x.x1,x.x1=S[0]-e),E.flipY&&(e=x.y0,x.y0=S[1]-x.y1,x.y1=S[1]-e);var t=x.children;if(t)for(var r=0;r0)for(var u=0;u").join(" ")||"";var de=x.ensureSingle(le,"g","slicetext"),G=x.ensureSingle(de,"text","",function(ee){ee.attr("data-notex",1)}),Y=x.ensureUniformFontSize(s,o.determineTextFont(N,$,z.font,{onPathbar:!0}));G.text($._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(S.font,Y).call(E.convertToTspans,s),$.textBB=S.bBox(G.node()),$.transform=g($,{fontSize:Y.size,onPathbar:!0}),$.transform.fontSize=Y.size,p?G.transition().attrTween("transform",function(ee){var q=m(ee,n,R,[l,_]);return function(se){return b(q(se))}}):G.attr("transform",b($))})}}}),AN=He({"src/traces/treemap/plot_one.js"(Z,V){"use strict";var d=Wn(),x=(pg(),zf(p0)).interpolate,S=Qv(),E=sa(),e=i0().TEXTPAD,t=tg(),r=t.toMoveInsideBar,o=Sp(),a=o.recordMinTextSize,n=dg(),i=TN();function s(h){return S.isHierarchyRoot(h)?"":S.getPtId(h)}V.exports=function(f,v,c,T,l){var _=f._fullLayout,w=v[0],A=w.trace,M=A.type,g=M==="icicle",b=w.hierarchy,p=S.findEntryWithLevel(b,A.level),u=d.select(c),y=u.selectAll("g.pathbar"),m=u.selectAll("g.slice");if(!p){y.remove(),m.remove();return}var R=S.isHierarchyRoot(p),L=!_.uniformtext.mode&&S.hasTransition(T),z=S.getMaxDepth(A),F=function(Er){return Er.data.depth-p.data.depth-1?U+$:-(X+$):0,ce={x0:B,x1:B,y0:le,y1:le+X},de=function(Er,Ir,_t){var Oe=A.tiling.pad,Je=function(Ze){return Ze-Oe<=Ir.x0},Ae=function(Ze){return Ze+Oe>=Ir.x1},Le=function(Ze){return Ze-Oe<=Ir.y0},Ue=function(Ze){return Ze+Oe>=Ir.y1};return Er.x0===Ir.x0&&Er.x1===Ir.x1&&Er.y0===Ir.y0&&Er.y1===Ir.y1?{x0:Er.x0,x1:Er.x1,y0:Er.y0,y1:Er.y1}:{x0:Je(Er.x0-Oe)?0:Ae(Er.x0-Oe)?_t[0]:Er.x0,x1:Je(Er.x1+Oe)?0:Ae(Er.x1+Oe)?_t[0]:Er.x1,y0:Le(Er.y0-Oe)?0:Ue(Er.y0-Oe)?_t[1]:Er.y0,y1:Le(Er.y1+Oe)?0:Ue(Er.y1+Oe)?_t[1]:Er.y1}},G=null,Y={},ee={},q=null,se=function(Er,Ir){return Ir?Y[s(Er)]:ee[s(Er)]},ae=function(Er,Ir,_t,Oe){if(Ir)return Y[s(b)]||ce;var Je=ee[A.level]||_t;return F(Er)?de(Er,Je,Oe):{}};w.hasMultipleRoots&&R&&z++,A._maxDepth=z,A._backgroundColor=_.paper_bgcolor,A._entryDepth=p.data.depth,A._atRootLevel=R;var j=-P/2+N.l+N.w*(O.x[1]+O.x[0])/2,Q=-U/2+N.t+N.h*(1-(O.y[1]+O.y[0])/2),re=function(Er){return j+Er},pe=function(Er){return Q+Er},we=pe(0),Se=re(0),Ie=function(Er){return Se+Er},Re=function(Er){return we+Er};function We(Er,Ir){return Er+","+Ir}var at=Ie(0),nt=function(Er){Er.x=Math.max(at,Er.x)},tt=A.pathbar.edgeshape,qe=function(Er){var Ir=Ie(Math.max(Math.min(Er.x0,Er.x0),0)),_t=Ie(Math.min(Math.max(Er.x1,Er.x1),B)),Oe=Re(Er.y0),Je=Re(Er.y1),Ae=X/2,Le={},Ue={};Le.x=Ir,Ue.x=_t,Le.y=Ue.y=(Oe+Je)/2;var Ze={x:Ir,y:Oe},st={x:_t,y:Oe},ut={x:_t,y:Je},Ut={x:Ir,y:Je};return tt===">"?(Ze.x-=Ae,st.x-=Ae,ut.x-=Ae,Ut.x-=Ae):tt==="/"?(ut.x-=Ae,Ut.x-=Ae,Le.x-=Ae/2,Ue.x-=Ae/2):tt==="\\"?(Ze.x-=Ae,st.x-=Ae,Le.x-=Ae/2,Ue.x-=Ae/2):tt==="<"&&(Le.x-=Ae,Ue.x-=Ae),nt(Ze),nt(Ut),nt(Le),nt(st),nt(ut),nt(Ue),"M"+We(Ze.x,Ze.y)+"L"+We(st.x,st.y)+"L"+We(Ue.x,Ue.y)+"L"+We(ut.x,ut.y)+"L"+We(Ut.x,Ut.y)+"L"+We(Le.x,Le.y)+"Z"},he=A[g?"tiling":"marker"].pad,ue=function(Er){return A.textposition.indexOf(Er)!==-1},ne=ue("top"),Ce=ue("left"),Ye=ue("right"),rt=ue("bottom"),Ke=function(Er){var Ir=re(Er.x0),_t=re(Er.x1),Oe=pe(Er.y0),Je=pe(Er.y1),Ae=_t-Ir,Le=Je-Oe;if(!Ae||!Le)return"";var Ue=A.marker.cornerradius||0,Ze=Math.min(Ue,Ae/2,Le/2);Ze&&Er.data&&Er.data.data&&Er.data.data.label&&(ne&&(Ze=Math.min(Ze,he.t)),Ce&&(Ze=Math.min(Ze,he.l)),Ye&&(Ze=Math.min(Ze,he.r)),rt&&(Ze=Math.min(Ze,he.b)));var st=function(ut,Ut){return Ze?"a"+We(Ze,Ze)+" 0 0 1 "+We(ut,Ut):""};return"M"+We(Ir,Oe+Ze)+st(Ze,-Ze)+"L"+We(_t-Ze,Oe)+st(Ze,Ze)+"L"+We(_t,Je-Ze)+st(-Ze,Ze)+"L"+We(Ir+Ze,Je)+st(-Ze,-Ze)+"Z"},Mt=function(Er,Ir){var _t=Er.x0,Oe=Er.x1,Je=Er.y0,Ae=Er.y1,Le=Er.textBB,Ue=ne||Ir.isHeader&&!rt,Ze=Ue?"start":rt?"end":"middle",st=ue("right"),ut=ue("left")||Ir.onPathbar,Ut=ut?-1:st?1:0;if(Ir.isHeader){if(_t+=(g?he:he.l)-e,Oe-=(g?he:he.r)-e,_t>=Oe){var Ct=(_t+Oe)/2;_t=Ct,Oe=Ct}var Pt;rt?(Pt=Ae-(g?he:he.b),Je-1,flipY:O.tiling.flip.indexOf("y")>-1,pad:{inner:O.tiling.pad,top:O.marker.pad.t,left:O.marker.pad.l,right:O.marker.pad.r,bottom:O.marker.pad.b}}),le=$.descendants(),ce=1/0,de=-1/0;le.forEach(function(se){var ae=se.depth;ae>=O._maxDepth?(se.x0=se.x1=(se.x0+se.x1)/2,se.y0=se.y1=(se.y0+se.y1)/2):(ce=Math.min(ce,ae),de=Math.max(de,ae))}),c=c.data(le,o.getPtId),O._maxVisibleLayers=isFinite(de)?de-ce+1:0,c.enter().append("g").classed("slice",!0),u(c,i,L,[l,_],M),c.order();var G=null;if(p&&R){var Y=o.getPtId(R);c.each(function(se){G===null&&o.getPtId(se)===Y&&(G={x0:se.x0,x1:se.x1,y0:se.y0,y1:se.y1})})}var ee=function(){return G||{x0:0,x1:l,y0:0,y1:_}},q=c;return p&&(q=q.transition().each("end",function(){var se=d.select(this);o.setSliceCursor(se,h,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),q.each(function(se){var ae=o.isHeader(se,O);se._x0=w(se.x0),se._x1=w(se.x1),se._y0=A(se.y0),se._y1=A(se.y1),se._hoverX=w(se.x1-O.marker.pad.r),se._hoverY=A(B?se.y1-O.marker.pad.b/2:se.y0+O.marker.pad.t/2);var j=d.select(this),Q=x.ensureSingle(j,"path","surface",function(Re){Re.style("pointer-events",z?"none":"all")});p?Q.transition().attrTween("d",function(Re){var We=y(Re,i,ee(),[l,_]);return function(at){return M(We(at))}}):Q.attr("d",M),j.call(a,v,h,f,{styleOne:t,eventDataKeys:r.eventDataKeys,transitionTime:r.CLICK_TRANSITION_TIME,transitionEasing:r.CLICK_TRANSITION_EASING}).call(o.setSliceCursor,h,{isTransitioning:h._transitioning}),Q.call(t,se,O,h,{hovered:!1}),se.x0===se.x1||se.y0===se.y1?se._text="":ae?se._text=X?"":o.getPtLabel(se)||"":se._text=n(se,v,O,f,F)||"";var re=x.ensureSingle(j,"g","slicetext"),pe=x.ensureSingle(re,"text","",function(Re){Re.attr("data-notex",1)}),we=x.ensureUniformFontSize(h,o.determineTextFont(O,se,F.font)),Se=se._text||" ",Ie=ae&&Se.indexOf("
")===-1;pe.text(Se).classed("slicetext",!0).attr("text-anchor",U?"end":P||Ie?"start":"middle").call(S.font,we).call(E.convertToTspans,h),se.textBB=S.bBox(pe.node()),se.transform=g(se,{fontSize:we.size,isHeader:ae}),se.transform.fontSize=we.size,p?pe.transition().attrTween("transform",function(Re){var We=m(Re,i,ee(),[l,_]);return function(at){return b(We(at))}}):pe.attr("transform",b(se))}),G}}}),MN=He({"src/traces/treemap/plot.js"(Z,V){"use strict";var d=hE(),x=SN();V.exports=function(E,e,t,r){return d(E,e,t,r,{type:"treemap",drawDescendants:x})}}}),EN=He({"src/traces/treemap/index.js"(Z,V){"use strict";V.exports={moduleType:"trace",name:"treemap",basePlotModule:xN(),categories:[],animatable:!0,attributes:J3(),layoutAttributes:lE(),supplyDefaults:bN(),supplyLayoutDefaults:wN(),calc:uE().calc,crossTraceCalc:uE().crossTraceCalc,plot:MN(),style:$3().style,colorbar:pp(),meta:{}}}}),kN=He({"lib/treemap.js"(Z,V){"use strict";V.exports=EN()}}),CN=He({"src/traces/icicle/base_plot.js"(Z){"use strict";var V=bc();Z.name="icicle",Z.plot=function(d,x,S,E){V.plotBasePlot(Z.name,d,x,S,E)},Z.clean=function(d,x,S,E){V.cleanBasePlot(Z.name,d,x,S,E)}}}),pE=He({"src/traces/icicle/attributes.js"(Z,V){"use strict";var{hovertemplateAttrs:d,texttemplateAttrs:x,templatefallbackAttrs:S}=Jl(),E=ku(),e=wc().attributes,t=og(),r=J_(),o=J3(),a=dg(),n=Qo().extendFlat,i=Gh().pattern;V.exports={labels:r.labels,parents:r.parents,values:r.values,branchvalues:r.branchvalues,count:r.count,level:r.level,maxdepth:r.maxdepth,tiling:{orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"plot"},flip:o.tiling.flip,pad:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},marker:n({colors:r.marker.colors,line:r.marker.line,pattern:i,editType:"calc"},E("marker",{colorAttr:"colors",anim:!1})),leaf:r.leaf,pathbar:o.pathbar,text:t.text,textinfo:r.textinfo,texttemplate:x({editType:"plot"},{keys:a.eventDataKeys.concat(["label","value"])}),texttemplatefallback:S({editType:"plot"}),hovertext:t.hovertext,hoverinfo:r.hoverinfo,hovertemplate:d({},{keys:a.eventDataKeys}),hovertemplatefallback:S(),textfont:t.textfont,insidetextfont:t.insidetextfont,outsidetextfont:o.outsidetextfont,textposition:o.textposition,sort:t.sort,root:r.root,domain:e({name:"icicle",trace:!0,editType:"calc"})}}}),dE=He({"src/traces/icicle/layout_attributes.js"(Z,V){"use strict";V.exports={iciclecolorway:{valType:"colorlist",editType:"calc"},extendiciclecolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),LN=He({"src/traces/icicle/defaults.js"(Z,V){"use strict";var d=sa(),x=pE(),S=Jn(),E=wc().defaults,e=gd().handleText,t=i0().TEXTPAD,r=sg().handleMarkerDefaults,o=rc(),a=o.hasColorscale,n=o.handleDefaults;V.exports=function(s,h,f,v){function c(b,p){return d.coerce(s,h,x,b,p)}var T=c("labels"),l=c("parents");if(!T||!T.length||!l||!l.length){h.visible=!1;return}var _=c("values");_&&_.length?c("branchvalues"):c("count"),c("level"),c("maxdepth"),c("tiling.orientation"),c("tiling.flip"),c("tiling.pad");var w=c("text");c("texttemplate"),c("texttemplatefallback"),h.texttemplate||c("textinfo",d.isArrayOrTypedArray(w)?"text+label":"label"),c("hovertext"),c("hovertemplate"),c("hovertemplatefallback");var A=c("pathbar.visible"),M="auto";e(s,h,v,c,M,{hasPathbar:A,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),c("textposition"),r(s,h,v,c);var g=h._hasColorscale=a(s,"marker","colors")||(s.marker||{}).coloraxis;g&&n(s,h,v,c,{prefix:"marker.",cLetter:"c"}),c("leaf.opacity",g?1:.7),h._hovered={marker:{line:{width:2,color:S.contrast(v.paper_bgcolor)}}},A&&(c("pathbar.thickness",h.pathbar.textfont.size+2*t),c("pathbar.side"),c("pathbar.edgeshape")),c("sort"),c("root.color"),E(h,v,c),h._length=null}}}),PN=He({"src/traces/icicle/layout_defaults.js"(Z,V){"use strict";var d=sa(),x=dE();V.exports=function(E,e){function t(r,o){return d.coerce(E,e,x,r,o)}t("iciclecolorway",e.colorway),t("extendiciclecolors")}}}),vE=He({"src/traces/icicle/calc.js"(Z){"use strict";var V=Q_();Z.calc=function(d,x){return V.calc(d,x)},Z.crossTraceCalc=function(d){return V._runCrossTraceCalc("icicle",d)}}}),IN=He({"src/traces/icicle/partition.js"(Z,V){"use strict";var d=$_(),x=cE();V.exports=function(E,e,t){var r=t.flipX,o=t.flipY,a=t.orientation==="h",n=t.maxDepth,i=e[0],s=e[1];n&&(i=(E.height+1)*e[0]/Math.min(E.height+1,n),s=(E.height+1)*e[1]/Math.min(E.height+1,n));var h=d.partition().padding(t.pad.inner).size(a?[e[1],i]:[e[0],s])(E);return(a||r||o)&&x(h,e,{swapXY:a,flipX:r,flipY:o}),h}}}),mE=He({"src/traces/icicle/style.js"(Z,V){"use strict";var d=Wn(),x=Jn(),S=sa(),E=Sp().resizeText,e=Y3();function t(o){var a=o._fullLayout._iciclelayer.selectAll(".trace");E(o,a,"icicle"),a.each(function(n){var i=d.select(this),s=n[0],h=s.trace;i.style("opacity",h.opacity),i.selectAll("path.surface").each(function(f){d.select(this).call(r,f,h,o)})})}function r(o,a,n,i){var s=a.data.data,h=!a.children,f=s.i,v=S.castOption(n,f,"marker.line.color")||x.defaultLine,c=S.castOption(n,f,"marker.line.width")||0;o.call(e,a,n,i).style("stroke-width",c).call(x.stroke,v).style("opacity",h?n.leaf.opacity:null)}V.exports={style:t,styleOne:r}}}),RN=He({"src/traces/icicle/draw_descendants.js"(Z,V){"use strict";var d=Wn(),x=sa(),S=es(),E=ou(),e=IN(),t=mE().styleOne,r=dg(),o=Qv(),a=vx(),n=K3().formatSliceLabel,i=!1;V.exports=function(h,f,v,c,T){var l=T.width,_=T.height,w=T.viewX,A=T.viewY,M=T.pathSlice,g=T.toMoveInsideSlice,b=T.strTransform,p=T.hasTransition,u=T.handleSlicesExit,y=T.makeUpdateSliceInterpolator,m=T.makeUpdateTextInterpolator,R=T.prevEntry,L={},z=h._context.staticPlot,F=h._fullLayout,N=f[0],O=N.trace,P=O.textposition.indexOf("left")!==-1,U=O.textposition.indexOf("right")!==-1,B=O.textposition.indexOf("bottom")!==-1,X=e(v,[l,_],{flipX:O.tiling.flip.indexOf("x")>-1,flipY:O.tiling.flip.indexOf("y")>-1,orientation:O.tiling.orientation,pad:{inner:O.tiling.pad},maxDepth:O._maxDepth}),$=X.descendants(),le=1/0,ce=-1/0;$.forEach(function(q){var se=q.depth;se>=O._maxDepth?(q.x0=q.x1=(q.x0+q.x1)/2,q.y0=q.y1=(q.y0+q.y1)/2):(le=Math.min(le,se),ce=Math.max(ce,se))}),c=c.data($,o.getPtId),O._maxVisibleLayers=isFinite(ce)?ce-le+1:0,c.enter().append("g").classed("slice",!0),u(c,i,L,[l,_],M),c.order();var de=null;if(p&&R){var G=o.getPtId(R);c.each(function(q){de===null&&o.getPtId(q)===G&&(de={x0:q.x0,x1:q.x1,y0:q.y0,y1:q.y1})})}var Y=function(){return de||{x0:0,x1:l,y0:0,y1:_}},ee=c;return p&&(ee=ee.transition().each("end",function(){var q=d.select(this);o.setSliceCursor(q,h,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),ee.each(function(q){q._x0=w(q.x0),q._x1=w(q.x1),q._y0=A(q.y0),q._y1=A(q.y1),q._hoverX=w(q.x1-O.tiling.pad),q._hoverY=A(B?q.y1-O.tiling.pad/2:q.y0+O.tiling.pad/2);var se=d.select(this),ae=x.ensureSingle(se,"path","surface",function(pe){pe.style("pointer-events",z?"none":"all")});p?ae.transition().attrTween("d",function(pe){var we=y(pe,i,Y(),[l,_],{orientation:O.tiling.orientation,flipX:O.tiling.flip.indexOf("x")>-1,flipY:O.tiling.flip.indexOf("y")>-1});return function(Se){return M(we(Se))}}):ae.attr("d",M),se.call(a,v,h,f,{styleOne:t,eventDataKeys:r.eventDataKeys,transitionTime:r.CLICK_TRANSITION_TIME,transitionEasing:r.CLICK_TRANSITION_EASING}).call(o.setSliceCursor,h,{isTransitioning:h._transitioning}),ae.call(t,q,O,h,{hovered:!1}),q.x0===q.x1||q.y0===q.y1?q._text="":q._text=n(q,v,O,f,F)||"";var j=x.ensureSingle(se,"g","slicetext"),Q=x.ensureSingle(j,"text","",function(pe){pe.attr("data-notex",1)}),re=x.ensureUniformFontSize(h,o.determineTextFont(O,q,F.font));Q.text(q._text||" ").classed("slicetext",!0).attr("text-anchor",U?"end":P?"start":"middle").call(S.font,re).call(E.convertToTspans,h),q.textBB=S.bBox(Q.node()),q.transform=g(q,{fontSize:re.size}),q.transform.fontSize=re.size,p?Q.transition().attrTween("transform",function(pe){var we=m(pe,i,Y(),[l,_]);return function(Se){return b(we(Se))}}):Q.attr("transform",b(q))}),de}}}),DN=He({"src/traces/icicle/plot.js"(Z,V){"use strict";var d=hE(),x=RN();V.exports=function(E,e,t,r){return d(E,e,t,r,{type:"icicle",drawDescendants:x})}}}),zN=He({"src/traces/icicle/index.js"(Z,V){"use strict";V.exports={moduleType:"trace",name:"icicle",basePlotModule:CN(),categories:[],animatable:!0,attributes:pE(),layoutAttributes:dE(),supplyDefaults:LN(),supplyLayoutDefaults:PN(),calc:vE().calc,crossTraceCalc:vE().crossTraceCalc,plot:DN(),style:mE().style,colorbar:pp(),meta:{}}}}),FN=He({"lib/icicle.js"(Z,V){"use strict";V.exports=zN()}}),ON=He({"src/traces/funnelarea/base_plot.js"(Z){"use strict";var V=bc();Z.name="funnelarea",Z.plot=function(d,x,S,E){V.plotBasePlot(Z.name,d,x,S,E)},Z.clean=function(d,x,S,E){V.cleanBasePlot(Z.name,d,x,S,E)}}}),gE=He({"src/traces/funnelarea/attributes.js"(Z,V){"use strict";var d=og(),x=ru(),S=wc().attributes,{hovertemplateAttrs:E,texttemplateAttrs:e,templatefallbackAttrs:t}=Jl(),r=Qo().extendFlat;V.exports={labels:d.labels,label0:d.label0,dlabel:d.dlabel,values:d.values,marker:{colors:d.marker.colors,line:{color:r({},d.marker.line.color,{dflt:null}),width:r({},d.marker.line.width,{dflt:1}),editType:"calc"},pattern:d.marker.pattern,editType:"calc"},text:d.text,hovertext:d.hovertext,scalegroup:r({},d.scalegroup,{}),textinfo:r({},d.textinfo,{flags:["label","text","value","percent"]}),texttemplate:e({editType:"plot"},{keys:["label","color","value","text","percent"]}),texttemplatefallback:t({editType:"plot"}),hoverinfo:r({},x.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:E({},{keys:["label","color","value","text","percent"]}),hovertemplatefallback:t(),textposition:r({},d.textposition,{values:["inside","none"],dflt:"inside"}),textfont:d.textfont,insidetextfont:d.insidetextfont,title:{text:d.title.text,font:d.title.font,position:r({},d.title.position,{values:["top left","top center","top right"],dflt:"top center"}),editType:"plot"},domain:S({name:"funnelarea",trace:!0,editType:"calc"}),aspectratio:{valType:"number",min:0,dflt:1,editType:"plot"},baseratio:{valType:"number",min:0,max:1,dflt:.333,editType:"plot"}}}}),yE=He({"src/traces/funnelarea/layout_attributes.js"(Z,V){"use strict";var d=_3().hiddenlabels;V.exports={hiddenlabels:d,funnelareacolorway:{valType:"colorlist",editType:"calc"},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),BN=He({"src/traces/funnelarea/defaults.js"(Z,V){"use strict";var d=sa(),x=gE(),S=wc().defaults,E=gd().handleText,e=sg().handleLabelsAndValues,t=sg().handleMarkerDefaults;V.exports=function(o,a,n,i){function s(M,g){return d.coerce(o,a,x,M,g)}var h=s("labels"),f=s("values"),v=e(h,f),c=v.len;if(a._hasLabels=v.hasLabels,a._hasValues=v.hasValues,!a._hasLabels&&a._hasValues&&(s("label0"),s("dlabel")),!c){a.visible=!1;return}a._length=c,t(o,a,i,s),s("scalegroup");var T=s("text"),l=s("texttemplate");s("texttemplatefallback");var _;if(l||(_=s("textinfo",Array.isArray(T)?"text+percent":"percent")),s("hovertext"),s("hovertemplate"),s("hovertemplatefallback"),l||_&&_!=="none"){var w=s("textposition");E(o,a,i,s,w,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}else _==="none"&&s("textposition","none");S(a,i,s);var A=s("title.text");A&&(s("title.position"),d.coerceFont(s,"title.font",i.font)),s("aspectratio"),s("baseratio")}}}),NN=He({"src/traces/funnelarea/layout_defaults.js"(Z,V){"use strict";var d=sa(),x=yE();V.exports=function(E,e){function t(r,o){return d.coerce(E,e,x,r,o)}t("hiddenlabels"),t("funnelareacolorway",e.colorway),t("extendfunnelareacolors")}}}),_E=He({"src/traces/funnelarea/calc.js"(Z,V){"use strict";var d=x1();function x(E,e){return d.calc(E,e)}function S(E){d.crossTraceCalc(E,{type:"funnelarea"})}V.exports={calc:x,crossTraceCalc:S}}}),UN=He({"src/traces/funnelarea/plot.js"(Z,V){"use strict";var d=Wn(),x=es(),S=sa(),E=S.strScale,e=S.strTranslate,t=ou(),r=tg(),o=r.toMoveInsideBar,a=Sp(),n=a.recordMinTextSize,i=a.clearMinTextSize,s=t0(),h=x3(),f=h.attachFxHandlers,v=h.determineInsideTextFont,c=h.layoutAreas,T=h.prerenderTitles,l=h.positionTitleOutside,_=h.formatSliceLabel;V.exports=function(b,p){var u=b._context.staticPlot,y=b._fullLayout;i("funnelarea",y),T(p,b),c(p,y._size),S.makeTraceGroups(y._funnelarealayer,p,"trace").each(function(m){var R=d.select(this),L=m[0],z=L.trace;M(m),R.each(function(){var F=d.select(this).selectAll("g.slice").data(m);F.enter().append("g").classed("slice",!0),F.exit().remove(),F.each(function(O,P){if(O.hidden){d.select(this).selectAll("path,g").remove();return}O.pointNumber=O.i,O.curveNumber=z.index;var U=L.cx,B=L.cy,X=d.select(this),$=X.selectAll("path.surface").data([O]);$.enter().append("path").classed("surface",!0).style({"pointer-events":u?"none":"all"}),X.call(f,b,m);var le="M"+(U+O.TR[0])+","+(B+O.TR[1])+w(O.TR,O.BR)+w(O.BR,O.BL)+w(O.BL,O.TL)+"Z";$.attr("d",le),_(b,O,L);var ce=s.castOption(z.textposition,O.pts),de=X.selectAll("g.slicetext").data(O.text&&ce!=="none"?[0]:[]);de.enter().append("g").classed("slicetext",!0),de.exit().remove(),de.each(function(){var G=S.ensureSingle(d.select(this),"text","",function(re){re.attr("data-notex",1)}),Y=S.ensureUniformFontSize(b,v(z,O,y.font));G.text(O.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(x.font,Y).call(t.convertToTspans,b);var ee=x.bBox(G.node()),q,se,ae,j=Math.min(O.BL[1],O.BR[1])+B,Q=Math.max(O.TL[1],O.TR[1])+B;se=Math.max(O.TL[0],O.BL[0])+U,ae=Math.min(O.TR[0],O.BR[0])+U,q=o(se,ae,j,Q,ee,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"}),q.fontSize=Y.size,n(z.type,q,y),m[P].transform=q,S.setTransormAndDisplay(G,q)})});var N=d.select(this).selectAll("g.titletext").data(z.title.text?[0]:[]);N.enter().append("g").classed("titletext",!0),N.exit().remove(),N.each(function(){var O=S.ensureSingle(d.select(this),"text","",function(B){B.attr("data-notex",1)}),P=z.title.text;z._meta&&(P=S.templateString(P,z._meta)),O.text(P).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(x.font,z.title.font).call(t.convertToTspans,b);var U=l(L,y._size);O.attr("transform",e(U.x,U.y)+E(Math.min(1,U.scale))+e(U.tx,U.ty))})})})};function w(g,b){var p=b[0]-g[0],u=b[1]-g[1];return"l"+p+","+u}function A(g,b){return[.5*(g[0]+b[0]),.5*(g[1]+b[1])]}function M(g){if(!g.length)return;var b=g[0],p=b.trace,u=p.aspectratio,y=p.baseratio;y>.999&&(y=.999);var m=Math.pow(y,2),R=b.vTotal,L=R*m/(1-m),z=R,F=L/R;function N(){var pe=Math.sqrt(F);return{x:pe,y:-pe}}function O(){var pe=N();return[pe.x,pe.y]}var P,U=[];U.push(O());var B,X;for(B=g.length-1;B>-1;B--)if(X=g[B],!X.hidden){var $=X.v/z;F+=$,U.push(O())}var le=1/0,ce=-1/0;for(B=0;B-1;B--)if(X=g[B],!X.hidden){j+=1;var Q=U[j][0],re=U[j][1];X.TL=[-Q,re],X.TR=[Q,re],X.BL=se,X.BR=ae,X.pxmid=A(X.TR,X.BR),se=X.TL,ae=X.TR}}}}),jN=He({"src/traces/funnelarea/style.js"(Z,V){"use strict";var d=Wn(),x=i1(),S=Sp().resizeText;V.exports=function(e){var t=e._fullLayout._funnelarealayer.selectAll(".trace");S(e,t,"funnelarea"),t.each(function(r){var o=r[0],a=o.trace,n=d.select(this);n.style({opacity:a.opacity}),n.selectAll("path.surface").each(function(i){d.select(this).call(x,i,a,e)})})}}}),qN=He({"src/traces/funnelarea/index.js"(Z,V){"use strict";V.exports={moduleType:"trace",name:"funnelarea",basePlotModule:ON(),categories:["pie-like","funnelarea","showLegend"],attributes:gE(),layoutAttributes:yE(),supplyDefaults:BN(),supplyLayoutDefaults:NN(),calc:_E().calc,crossTraceCalc:_E().crossTraceCalc,plot:UN(),style:jN(),styleOne:i1(),meta:{}}}}),VN=He({"lib/funnelarea.js"(Z,V){"use strict";V.exports=qN()}}),Yh=He({"stackgl_modules/index.js"(Z,V){(function(){var d={1964:function(e,t,r){e.exports={alpha_shape:r(3502),convex_hull:r(7352),delaunay_triangulate:r(7642),gl_cone3d:r(6405),gl_error3d:r(9165),gl_line3d:r(5714),gl_mesh3d:r(7201),gl_plot3d:r(4100),gl_scatter3d:r(8418),gl_streamtube3d:r(7815),gl_surface3d:r(9499),ndarray:r(9618),ndarray_linear_interpolate:r(4317)}},4793:function(e,t,r){"use strict";var o;function a(qe){"@babel/helpers - typeof";return a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(he){return typeof he}:function(he){return he&&typeof Symbol=="function"&&he.constructor===Symbol&&he!==Symbol.prototype?"symbol":typeof he},a(qe)}var n=r(7507),i=r(3778),s=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;t.hp=c,o=y,t.IS=50;var h=2147483647;o=h,c.TYPED_ARRAY_SUPPORT=f(),!c.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function f(){try{var qe=new Uint8Array(1),he={foo:function(){return 42}};return Object.setPrototypeOf(he,Uint8Array.prototype),Object.setPrototypeOf(qe,he),qe.foo()===42}catch{return!1}}Object.defineProperty(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}});function v(qe){if(qe>h)throw new RangeError('The value "'+qe+'" is invalid for option "size"');var he=new Uint8Array(qe);return Object.setPrototypeOf(he,c.prototype),he}function c(qe,he,ue){if(typeof qe=="number"){if(typeof he=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return w(qe)}return T(qe,he,ue)}c.poolSize=8192;function T(qe,he,ue){if(typeof qe=="string")return A(qe,he);if(ArrayBuffer.isView(qe))return g(qe);if(qe==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+a(qe));if(at(qe,ArrayBuffer)||qe&&at(qe.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(at(qe,SharedArrayBuffer)||qe&&at(qe.buffer,SharedArrayBuffer)))return b(qe,he,ue);if(typeof qe=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var ne=qe.valueOf&&qe.valueOf();if(ne!=null&&ne!==qe)return c.from(ne,he,ue);var Ce=p(qe);if(Ce)return Ce;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof qe[Symbol.toPrimitive]=="function")return c.from(qe[Symbol.toPrimitive]("string"),he,ue);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+a(qe))}c.from=function(qe,he,ue){return T(qe,he,ue)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,Uint8Array);function l(qe){if(typeof qe!="number")throw new TypeError('"size" argument must be of type number');if(qe<0)throw new RangeError('The value "'+qe+'" is invalid for option "size"')}function _(qe,he,ue){return l(qe),qe<=0?v(qe):he!==void 0?typeof ue=="string"?v(qe).fill(he,ue):v(qe).fill(he):v(qe)}c.alloc=function(qe,he,ue){return _(qe,he,ue)};function w(qe){return l(qe),v(qe<0?0:u(qe)|0)}c.allocUnsafe=function(qe){return w(qe)},c.allocUnsafeSlow=function(qe){return w(qe)};function A(qe,he){if((typeof he!="string"||he==="")&&(he="utf8"),!c.isEncoding(he))throw new TypeError("Unknown encoding: "+he);var ue=m(qe,he)|0,ne=v(ue),Ce=ne.write(qe,he);return Ce!==ue&&(ne=ne.slice(0,Ce)),ne}function M(qe){for(var he=qe.length<0?0:u(qe.length)|0,ue=v(he),ne=0;ne=h)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+h.toString(16)+" bytes");return qe|0}function y(qe){return+qe!=qe&&(qe=0),c.alloc(+qe)}c.isBuffer=function(he){return he!=null&&he._isBuffer===!0&&he!==c.prototype},c.compare=function(he,ue){if(at(he,Uint8Array)&&(he=c.from(he,he.offset,he.byteLength)),at(ue,Uint8Array)&&(ue=c.from(ue,ue.offset,ue.byteLength)),!c.isBuffer(he)||!c.isBuffer(ue))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(he===ue)return 0;for(var ne=he.length,Ce=ue.length,Ye=0,rt=Math.min(ne,Ce);YeCe.length?c.from(rt).copy(Ce,Ye):Uint8Array.prototype.set.call(Ce,rt,Ye);else if(c.isBuffer(rt))rt.copy(Ce,Ye);else throw new TypeError('"list" argument must be an Array of Buffers');Ye+=rt.length}return Ce};function m(qe,he){if(c.isBuffer(qe))return qe.length;if(ArrayBuffer.isView(qe)||at(qe,ArrayBuffer))return qe.byteLength;if(typeof qe!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+a(qe));var ue=qe.length,ne=arguments.length>2&&arguments[2]===!0;if(!ne&&ue===0)return 0;for(var Ce=!1;;)switch(he){case"ascii":case"latin1":case"binary":return ue;case"utf8":case"utf-8":return we(qe).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ue*2;case"hex":return ue>>>1;case"base64":return Re(qe).length;default:if(Ce)return ne?-1:we(qe).length;he=(""+he).toLowerCase(),Ce=!0}}c.byteLength=m;function R(qe,he,ue){var ne=!1;if((he===void 0||he<0)&&(he=0),he>this.length||((ue===void 0||ue>this.length)&&(ue=this.length),ue<=0)||(ue>>>=0,he>>>=0,ue<=he))return"";for(qe||(qe="utf8");;)switch(qe){case"hex":return Y(this,he,ue);case"utf8":case"utf-8":return $(this,he,ue);case"ascii":return de(this,he,ue);case"latin1":case"binary":return G(this,he,ue);case"base64":return X(this,he,ue);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ee(this,he,ue);default:if(ne)throw new TypeError("Unknown encoding: "+qe);qe=(qe+"").toLowerCase(),ne=!0}}c.prototype._isBuffer=!0;function L(qe,he,ue){var ne=qe[he];qe[he]=qe[ue],qe[ue]=ne}c.prototype.swap16=function(){var he=this.length;if(he%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var ue=0;ueue&&(he+=" ... "),""},s&&(c.prototype[s]=c.prototype.inspect),c.prototype.compare=function(he,ue,ne,Ce,Ye){if(at(he,Uint8Array)&&(he=c.from(he,he.offset,he.byteLength)),!c.isBuffer(he))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+a(he));if(ue===void 0&&(ue=0),ne===void 0&&(ne=he?he.length:0),Ce===void 0&&(Ce=0),Ye===void 0&&(Ye=this.length),ue<0||ne>he.length||Ce<0||Ye>this.length)throw new RangeError("out of range index");if(Ce>=Ye&&ue>=ne)return 0;if(Ce>=Ye)return-1;if(ue>=ne)return 1;if(ue>>>=0,ne>>>=0,Ce>>>=0,Ye>>>=0,this===he)return 0;for(var rt=Ye-Ce,Ke=ne-ue,Mt=Math.min(rt,Ke),kt=this.slice(Ce,Ye),Nt=he.slice(ue,ne),Gt=0;Gt2147483647?ue=2147483647:ue<-2147483648&&(ue=-2147483648),ue=+ue,nt(ue)&&(ue=Ce?0:qe.length-1),ue<0&&(ue=qe.length+ue),ue>=qe.length){if(Ce)return-1;ue=qe.length-1}else if(ue<0)if(Ce)ue=0;else return-1;if(typeof he=="string"&&(he=c.from(he,ne)),c.isBuffer(he))return he.length===0?-1:F(qe,he,ue,ne,Ce);if(typeof he=="number")return he=he&255,typeof Uint8Array.prototype.indexOf=="function"?Ce?Uint8Array.prototype.indexOf.call(qe,he,ue):Uint8Array.prototype.lastIndexOf.call(qe,he,ue):F(qe,[he],ue,ne,Ce);throw new TypeError("val must be string, number or Buffer")}function F(qe,he,ue,ne,Ce){var Ye=1,rt=qe.length,Ke=he.length;if(ne!==void 0&&(ne=String(ne).toLowerCase(),ne==="ucs2"||ne==="ucs-2"||ne==="utf16le"||ne==="utf-16le")){if(qe.length<2||he.length<2)return-1;Ye=2,rt/=2,Ke/=2,ue/=2}function Mt(mr,qr){return Ye===1?mr[qr]:mr.readUInt16BE(qr*Ye)}var kt;if(Ce){var Nt=-1;for(kt=ue;ktrt&&(ue=rt-Ke),kt=ue;kt>=0;kt--){for(var Gt=!0,Mr=0;MrCe&&(ne=Ce)):ne=Ce;var Ye=he.length;ne>Ye/2&&(ne=Ye/2);for(var rt=0;rt>>0,isFinite(ne)?(ne=ne>>>0,Ce===void 0&&(Ce="utf8")):(Ce=ne,ne=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var Ye=this.length-ue;if((ne===void 0||ne>Ye)&&(ne=Ye),he.length>0&&(ne<0||ue<0)||ue>this.length)throw new RangeError("Attempt to write outside buffer bounds");Ce||(Ce="utf8");for(var rt=!1;;)switch(Ce){case"hex":return N(this,he,ue,ne);case"utf8":case"utf-8":return O(this,he,ue,ne);case"ascii":case"latin1":case"binary":return P(this,he,ue,ne);case"base64":return U(this,he,ue,ne);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,he,ue,ne);default:if(rt)throw new TypeError("Unknown encoding: "+Ce);Ce=(""+Ce).toLowerCase(),rt=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function X(qe,he,ue){return he===0&&ue===qe.length?n.fromByteArray(qe):n.fromByteArray(qe.slice(he,ue))}function $(qe,he,ue){ue=Math.min(qe.length,ue);for(var ne=[],Ce=he;Ce239?4:Ye>223?3:Ye>191?2:1;if(Ce+Ke<=ue){var Mt,kt,Nt,Gt;switch(Ke){case 1:Ye<128&&(rt=Ye);break;case 2:Mt=qe[Ce+1],(Mt&192)===128&&(Gt=(Ye&31)<<6|Mt&63,Gt>127&&(rt=Gt));break;case 3:Mt=qe[Ce+1],kt=qe[Ce+2],(Mt&192)===128&&(kt&192)===128&&(Gt=(Ye&15)<<12|(Mt&63)<<6|kt&63,Gt>2047&&(Gt<55296||Gt>57343)&&(rt=Gt));break;case 4:Mt=qe[Ce+1],kt=qe[Ce+2],Nt=qe[Ce+3],(Mt&192)===128&&(kt&192)===128&&(Nt&192)===128&&(Gt=(Ye&15)<<18|(Mt&63)<<12|(kt&63)<<6|Nt&63,Gt>65535&&Gt<1114112&&(rt=Gt))}}rt===null?(rt=65533,Ke=1):rt>65535&&(rt-=65536,ne.push(rt>>>10&1023|55296),rt=56320|rt&1023),ne.push(rt),Ce+=Ke}return ce(ne)}var le=4096;function ce(qe){var he=qe.length;if(he<=le)return String.fromCharCode.apply(String,qe);for(var ue="",ne=0;nene)&&(ue=ne);for(var Ce="",Ye=he;Yene&&(he=ne),ue<0?(ue+=ne,ue<0&&(ue=0)):ue>ne&&(ue=ne),ueue)throw new RangeError("Trying to access beyond buffer length")}c.prototype.readUintLE=c.prototype.readUIntLE=function(he,ue,ne){he=he>>>0,ue=ue>>>0,ne||q(he,ue,this.length);for(var Ce=this[he],Ye=1,rt=0;++rt>>0,ue=ue>>>0,ne||q(he,ue,this.length);for(var Ce=this[he+--ue],Ye=1;ue>0&&(Ye*=256);)Ce+=this[he+--ue]*Ye;return Ce},c.prototype.readUint8=c.prototype.readUInt8=function(he,ue){return he=he>>>0,ue||q(he,1,this.length),this[he]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(he,ue){return he=he>>>0,ue||q(he,2,this.length),this[he]|this[he+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(he,ue){return he=he>>>0,ue||q(he,2,this.length),this[he]<<8|this[he+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(he,ue){return he=he>>>0,ue||q(he,4,this.length),(this[he]|this[he+1]<<8|this[he+2]<<16)+this[he+3]*16777216},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(he,ue){return he=he>>>0,ue||q(he,4,this.length),this[he]*16777216+(this[he+1]<<16|this[he+2]<<8|this[he+3])},c.prototype.readIntLE=function(he,ue,ne){he=he>>>0,ue=ue>>>0,ne||q(he,ue,this.length);for(var Ce=this[he],Ye=1,rt=0;++rt=Ye&&(Ce-=Math.pow(2,8*ue)),Ce},c.prototype.readIntBE=function(he,ue,ne){he=he>>>0,ue=ue>>>0,ne||q(he,ue,this.length);for(var Ce=ue,Ye=1,rt=this[he+--Ce];Ce>0&&(Ye*=256);)rt+=this[he+--Ce]*Ye;return Ye*=128,rt>=Ye&&(rt-=Math.pow(2,8*ue)),rt},c.prototype.readInt8=function(he,ue){return he=he>>>0,ue||q(he,1,this.length),this[he]&128?(255-this[he]+1)*-1:this[he]},c.prototype.readInt16LE=function(he,ue){he=he>>>0,ue||q(he,2,this.length);var ne=this[he]|this[he+1]<<8;return ne&32768?ne|4294901760:ne},c.prototype.readInt16BE=function(he,ue){he=he>>>0,ue||q(he,2,this.length);var ne=this[he+1]|this[he]<<8;return ne&32768?ne|4294901760:ne},c.prototype.readInt32LE=function(he,ue){return he=he>>>0,ue||q(he,4,this.length),this[he]|this[he+1]<<8|this[he+2]<<16|this[he+3]<<24},c.prototype.readInt32BE=function(he,ue){return he=he>>>0,ue||q(he,4,this.length),this[he]<<24|this[he+1]<<16|this[he+2]<<8|this[he+3]},c.prototype.readFloatLE=function(he,ue){return he=he>>>0,ue||q(he,4,this.length),i.read(this,he,!0,23,4)},c.prototype.readFloatBE=function(he,ue){return he=he>>>0,ue||q(he,4,this.length),i.read(this,he,!1,23,4)},c.prototype.readDoubleLE=function(he,ue){return he=he>>>0,ue||q(he,8,this.length),i.read(this,he,!0,52,8)},c.prototype.readDoubleBE=function(he,ue){return he=he>>>0,ue||q(he,8,this.length),i.read(this,he,!1,52,8)};function se(qe,he,ue,ne,Ce,Ye){if(!c.isBuffer(qe))throw new TypeError('"buffer" argument must be a Buffer instance');if(he>Ce||heqe.length)throw new RangeError("Index out of range")}c.prototype.writeUintLE=c.prototype.writeUIntLE=function(he,ue,ne,Ce){if(he=+he,ue=ue>>>0,ne=ne>>>0,!Ce){var Ye=Math.pow(2,8*ne)-1;se(this,he,ue,ne,Ye,0)}var rt=1,Ke=0;for(this[ue]=he&255;++Ke>>0,ne=ne>>>0,!Ce){var Ye=Math.pow(2,8*ne)-1;se(this,he,ue,ne,Ye,0)}var rt=ne-1,Ke=1;for(this[ue+rt]=he&255;--rt>=0&&(Ke*=256);)this[ue+rt]=he/Ke&255;return ue+ne},c.prototype.writeUint8=c.prototype.writeUInt8=function(he,ue,ne){return he=+he,ue=ue>>>0,ne||se(this,he,ue,1,255,0),this[ue]=he&255,ue+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(he,ue,ne){return he=+he,ue=ue>>>0,ne||se(this,he,ue,2,65535,0),this[ue]=he&255,this[ue+1]=he>>>8,ue+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(he,ue,ne){return he=+he,ue=ue>>>0,ne||se(this,he,ue,2,65535,0),this[ue]=he>>>8,this[ue+1]=he&255,ue+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(he,ue,ne){return he=+he,ue=ue>>>0,ne||se(this,he,ue,4,4294967295,0),this[ue+3]=he>>>24,this[ue+2]=he>>>16,this[ue+1]=he>>>8,this[ue]=he&255,ue+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(he,ue,ne){return he=+he,ue=ue>>>0,ne||se(this,he,ue,4,4294967295,0),this[ue]=he>>>24,this[ue+1]=he>>>16,this[ue+2]=he>>>8,this[ue+3]=he&255,ue+4},c.prototype.writeIntLE=function(he,ue,ne,Ce){if(he=+he,ue=ue>>>0,!Ce){var Ye=Math.pow(2,8*ne-1);se(this,he,ue,ne,Ye-1,-Ye)}var rt=0,Ke=1,Mt=0;for(this[ue]=he&255;++rt>0)-Mt&255;return ue+ne},c.prototype.writeIntBE=function(he,ue,ne,Ce){if(he=+he,ue=ue>>>0,!Ce){var Ye=Math.pow(2,8*ne-1);se(this,he,ue,ne,Ye-1,-Ye)}var rt=ne-1,Ke=1,Mt=0;for(this[ue+rt]=he&255;--rt>=0&&(Ke*=256);)he<0&&Mt===0&&this[ue+rt+1]!==0&&(Mt=1),this[ue+rt]=(he/Ke>>0)-Mt&255;return ue+ne},c.prototype.writeInt8=function(he,ue,ne){return he=+he,ue=ue>>>0,ne||se(this,he,ue,1,127,-128),he<0&&(he=255+he+1),this[ue]=he&255,ue+1},c.prototype.writeInt16LE=function(he,ue,ne){return he=+he,ue=ue>>>0,ne||se(this,he,ue,2,32767,-32768),this[ue]=he&255,this[ue+1]=he>>>8,ue+2},c.prototype.writeInt16BE=function(he,ue,ne){return he=+he,ue=ue>>>0,ne||se(this,he,ue,2,32767,-32768),this[ue]=he>>>8,this[ue+1]=he&255,ue+2},c.prototype.writeInt32LE=function(he,ue,ne){return he=+he,ue=ue>>>0,ne||se(this,he,ue,4,2147483647,-2147483648),this[ue]=he&255,this[ue+1]=he>>>8,this[ue+2]=he>>>16,this[ue+3]=he>>>24,ue+4},c.prototype.writeInt32BE=function(he,ue,ne){return he=+he,ue=ue>>>0,ne||se(this,he,ue,4,2147483647,-2147483648),he<0&&(he=4294967295+he+1),this[ue]=he>>>24,this[ue+1]=he>>>16,this[ue+2]=he>>>8,this[ue+3]=he&255,ue+4};function ae(qe,he,ue,ne,Ce,Ye){if(ue+ne>qe.length)throw new RangeError("Index out of range");if(ue<0)throw new RangeError("Index out of range")}function j(qe,he,ue,ne,Ce){return he=+he,ue=ue>>>0,Ce||ae(qe,he,ue,4,34028234663852886e22,-34028234663852886e22),i.write(qe,he,ue,ne,23,4),ue+4}c.prototype.writeFloatLE=function(he,ue,ne){return j(this,he,ue,!0,ne)},c.prototype.writeFloatBE=function(he,ue,ne){return j(this,he,ue,!1,ne)};function Q(qe,he,ue,ne,Ce){return he=+he,ue=ue>>>0,Ce||ae(qe,he,ue,8,17976931348623157e292,-17976931348623157e292),i.write(qe,he,ue,ne,52,8),ue+8}c.prototype.writeDoubleLE=function(he,ue,ne){return Q(this,he,ue,!0,ne)},c.prototype.writeDoubleBE=function(he,ue,ne){return Q(this,he,ue,!1,ne)},c.prototype.copy=function(he,ue,ne,Ce){if(!c.isBuffer(he))throw new TypeError("argument should be a Buffer");if(ne||(ne=0),!Ce&&Ce!==0&&(Ce=this.length),ue>=he.length&&(ue=he.length),ue||(ue=0),Ce>0&&Ce=this.length)throw new RangeError("Index out of range");if(Ce<0)throw new RangeError("sourceEnd out of bounds");Ce>this.length&&(Ce=this.length),he.length-ue>>0,ne=ne===void 0?this.length:ne>>>0,he||(he=0);var rt;if(typeof he=="number")for(rt=ue;rt55295&&ue<57344){if(!Ce){if(ue>56319){(he-=3)>-1&&Ye.push(239,191,189);continue}else if(rt+1===ne){(he-=3)>-1&&Ye.push(239,191,189);continue}Ce=ue;continue}if(ue<56320){(he-=3)>-1&&Ye.push(239,191,189),Ce=ue;continue}ue=(Ce-55296<<10|ue-56320)+65536}else Ce&&(he-=3)>-1&&Ye.push(239,191,189);if(Ce=null,ue<128){if((he-=1)<0)break;Ye.push(ue)}else if(ue<2048){if((he-=2)<0)break;Ye.push(ue>>6|192,ue&63|128)}else if(ue<65536){if((he-=3)<0)break;Ye.push(ue>>12|224,ue>>6&63|128,ue&63|128)}else if(ue<1114112){if((he-=4)<0)break;Ye.push(ue>>18|240,ue>>12&63|128,ue>>6&63|128,ue&63|128)}else throw new Error("Invalid code point")}return Ye}function Se(qe){for(var he=[],ue=0;ue>8,Ce=ue%256,Ye.push(Ce),Ye.push(ne);return Ye}function Re(qe){return n.toByteArray(pe(qe))}function We(qe,he,ue,ne){for(var Ce=0;Ce=he.length||Ce>=qe.length);++Ce)he[Ce+ue]=qe[Ce];return Ce}function at(qe,he){return qe instanceof he||qe!=null&&qe.constructor!=null&&qe.constructor.name!=null&&qe.constructor.name===he.name}function nt(qe){return qe!==qe}var tt=function(){for(var qe="0123456789abcdef",he=new Array(256),ue=0;ue<16;++ue)for(var ne=ue*16,Ce=0;Ce<16;++Ce)he[ne+Ce]=qe[ue]+qe[Ce];return he}()},9216:function(e){"use strict";e.exports=a,e.exports.isMobile=a,e.exports.default=a;var t=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,r=/CrOS/,o=/android|ipad|playbook|silk/i;function a(n){n||(n={});var i=n.ua;if(!i&&typeof navigator<"u"&&(i=navigator.userAgent),i&&i.headers&&typeof i.headers["user-agent"]=="string"&&(i=i.headers["user-agent"]),typeof i!="string")return!1;var s=t.test(i)&&!r.test(i)||!!n.tablet&&o.test(i);return!s&&n.tablet&&n.featureDetect&&navigator&&navigator.maxTouchPoints>1&&i.indexOf("Macintosh")!==-1&&i.indexOf("Safari")!==-1&&(s=!0),s}},6296:function(e,t,r){"use strict";e.exports=h;var o=r(7261),a=r(9977),n=r(1811);function i(f,v){this._controllerNames=Object.keys(f),this._controllerList=this._controllerNames.map(function(c){return f[c]}),this._mode=v,this._active=f[v],this._active||(this._mode="turntable",this._active=f.turntable),this.modes=this._controllerNames,this.computedMatrix=this._active.computedMatrix,this.computedEye=this._active.computedEye,this.computedUp=this._active.computedUp,this.computedCenter=this._active.computedCenter,this.computedRadius=this._active.computedRadius}var s=i.prototype;s.flush=function(f){for(var v=this._controllerList,c=0;c"u"?r(1538):WeakMap,a=r(2762),n=r(8116),i=new o;function s(h){var f=i.get(h),v=f&&(f._triangleBuffer.handle||f._triangleBuffer.buffer);if(!v||!h.isBuffer(v)){var c=a(h,new Float32Array([-1,-1,-1,4,4,-1]));f=n(h,[{buffer:c,type:h.FLOAT,size:2}]),f._triangleBuffer=c,i.set(h,f)}f.bind(),h.drawArrays(h.TRIANGLES,0,3),f.unbind()}e.exports=s},1085:function(e,t,r){var o=r(1371);e.exports=a;function a(n,i,s){i=typeof i=="number"?i:1,s=s||": ";var h=n.split(/\r?\n/),f=String(h.length+i-1).length;return h.map(function(v,c){var T=c+i,l=String(T).length,_=o(T,f-l);return _+s+v}).join(` `)}},3952:function(e,t,r){"use strict";e.exports=n;var o=r(3250);function a(i,s){for(var h=new Array(s+1),f=0;f0)throw new Error("Invalid string. Length must be a multiple of 4");var M=w.indexOf("=");M===-1&&(M=A);var g=M===A?0:4-M%4;return[M,g]}function f(w){var A=h(w),M=A[0],g=A[1];return(M+g)*3/4-g}function v(w,A,M){return(A+M)*3/4-M}function c(w){var A,M=h(w),g=M[0],b=M[1],p=new a(v(w,g,b)),u=0,y=b>0?g-4:g,m;for(m=0;m>16&255,p[u++]=A>>8&255,p[u++]=A&255;return b===2&&(A=o[w.charCodeAt(m)]<<2|o[w.charCodeAt(m+1)]>>4,p[u++]=A&255),b===1&&(A=o[w.charCodeAt(m)]<<10|o[w.charCodeAt(m+1)]<<4|o[w.charCodeAt(m+2)]>>2,p[u++]=A>>8&255,p[u++]=A&255),p}function T(w){return r[w>>18&63]+r[w>>12&63]+r[w>>6&63]+r[w&63]}function l(w,A,M){for(var g,b=[],p=A;py?y:u+p));return g===1?(A=w[M-1],b.push(r[A>>2]+r[A<<4&63]+"==")):g===2&&(A=(w[M-2]<<8)+w[M-1],b.push(r[A>>10]+r[A>>4&63]+r[A<<2&63]+"=")),b.join("")}},3865:function(e,t,r){"use strict";var o=r(869);e.exports=a;function a(n,i){return o(n[0].mul(i[1]).add(i[0].mul(n[1])),n[1].mul(i[1]))}},1318:function(e){"use strict";e.exports=t;function t(r,o){return r[0].mul(o[1]).cmp(o[0].mul(r[1]))}},8697:function(e,t,r){"use strict";var o=r(869);e.exports=a;function a(n,i){return o(n[0].mul(i[1]),n[1].mul(i[0]))}},7842:function(e,t,r){"use strict";var o=r(6330),a=r(1533),n=r(2651),i=r(6768),s=r(869),h=r(8697);e.exports=f;function f(v,c){if(o(v))return c?h(v,f(c)):[v[0].clone(),v[1].clone()];var T=0,l,_;if(a(v))l=v.clone();else if(typeof v=="string")l=i(v);else{if(v===0)return[n(0),n(1)];if(v===Math.floor(v))l=n(v);else{for(;v!==Math.floor(v);)v=v*Math.pow(2,256),T-=256;l=n(v)}}if(o(c))l.mul(c[1]),_=c[0].clone();else if(a(c))_=c.clone();else if(typeof c=="string")_=i(c);else if(!c)_=n(1);else if(c===Math.floor(c))_=n(c);else{for(;c!==Math.floor(c);)c=c*Math.pow(2,256),T+=256;_=n(c)}return T>0?l=l.ushln(T):T<0&&(_=_.ushln(-T)),s(l,_)}},6330:function(e,t,r){"use strict";var o=r(1533);e.exports=a;function a(n){return Array.isArray(n)&&n.length===2&&o(n[0])&&o(n[1])}},5716:function(e,t,r){"use strict";var o=r(6859);e.exports=a;function a(n){return n.cmp(new o(0))}},1369:function(e,t,r){"use strict";var o=r(5716);e.exports=a;function a(n){var i=n.length,s=n.words,h=0;if(i===1)h=s[0];else if(i===2)h=s[0]+s[1]*67108864;else for(var f=0;f20?52:h+32}},1533:function(e,t,r){"use strict";var o=r(6859);e.exports=a;function a(n){return n&&typeof n=="object"&&!!n.words}},2651:function(e,t,r){"use strict";var o=r(6859),a=r(2361);e.exports=n;function n(i){var s=a.exponent(i);return s<52?new o(i):new o(i*Math.pow(2,52-s)).ushln(s-52)}},869:function(e,t,r){"use strict";var o=r(2651),a=r(5716);e.exports=n;function n(i,s){var h=a(i),f=a(s);if(h===0)return[o(0),o(1)];if(f===0)return[o(0),o(0)];f<0&&(i=i.neg(),s=s.neg());var v=i.gcd(s);return v.cmpn(1)?[i.div(v),s.div(v)]:[i,s]}},6768:function(e,t,r){"use strict";var o=r(6859);e.exports=a;function a(n){return new o(n)}},6504:function(e,t,r){"use strict";var o=r(869);e.exports=a;function a(n,i){return o(n[0].mul(i[0]),n[1].mul(i[1]))}},7721:function(e,t,r){"use strict";var o=r(5716);e.exports=a;function a(n){return o(n[0])*o(n[1])}},5572:function(e,t,r){"use strict";var o=r(869);e.exports=a;function a(n,i){return o(n[0].mul(i[1]).sub(n[1].mul(i[0])),n[1].mul(i[1]))}},946:function(e,t,r){"use strict";var o=r(1369),a=r(4025);e.exports=n;function n(i){var s=i[0],h=i[1];if(s.cmpn(0)===0)return 0;var f=s.abs().divmod(h.abs()),v=f.div,c=o(v),T=f.mod,l=s.negative!==h.negative?-1:1;if(T.cmpn(0)===0)return l*c;if(c){var _=a(c)+4,w=o(T.ushln(_).divRound(h));return l*(c+w*Math.pow(2,-_))}else{var A=h.bitLength()-T.bitLength()+53,w=o(T.ushln(A).divRound(h));return A<1023?l*w*Math.pow(2,-A):(w*=Math.pow(2,-1023),l*w*Math.pow(2,1023-A))}}},2478:function(e){"use strict";function t(s,h,f,v,c){for(var T=c+1;v<=c;){var l=v+c>>>1,_=s[l],w=f!==void 0?f(_,h):_-h;w>=0?(T=l,c=l-1):v=l+1}return T}function r(s,h,f,v,c){for(var T=c+1;v<=c;){var l=v+c>>>1,_=s[l],w=f!==void 0?f(_,h):_-h;w>0?(T=l,c=l-1):v=l+1}return T}function o(s,h,f,v,c){for(var T=v-1;v<=c;){var l=v+c>>>1,_=s[l],w=f!==void 0?f(_,h):_-h;w<0?(T=l,v=l+1):c=l-1}return T}function a(s,h,f,v,c){for(var T=v-1;v<=c;){var l=v+c>>>1,_=s[l],w=f!==void 0?f(_,h):_-h;w<=0?(T=l,v=l+1):c=l-1}return T}function n(s,h,f,v,c){for(;v<=c;){var T=v+c>>>1,l=s[T],_=f!==void 0?f(l,h):l-h;if(_===0)return T;_<=0?v=T+1:c=T-1}return-1}function i(s,h,f,v,c,T){return typeof f=="function"?T(s,h,f,v===void 0?0:v|0,c===void 0?s.length-1:c|0):T(s,h,void 0,f===void 0?0:f|0,v===void 0?s.length-1:v|0)}e.exports={ge:function(s,h,f,v,c){return i(s,h,f,v,c,t)},gt:function(s,h,f,v,c){return i(s,h,f,v,c,r)},lt:function(s,h,f,v,c){return i(s,h,f,v,c,o)},le:function(s,h,f,v,c){return i(s,h,f,v,c,a)},eq:function(s,h,f,v,c){return i(s,h,f,v,c,n)}}},8828:function(e,t){"use strict";"use restrict";var r=32;t.INT_BITS=r,t.INT_MAX=2147483647,t.INT_MIN=-1<0)-(n<0)},t.abs=function(n){var i=n>>r-1;return(n^i)-i},t.min=function(n,i){return i^(n^i)&-(n65535)<<4,n>>>=i,s=(n>255)<<3,n>>>=s,i|=s,s=(n>15)<<2,n>>>=s,i|=s,s=(n>3)<<1,n>>>=s,i|=s,i|n>>1},t.log10=function(n){return n>=1e9?9:n>=1e8?8:n>=1e7?7:n>=1e6?6:n>=1e5?5:n>=1e4?4:n>=1e3?3:n>=100?2:n>=10?1:0},t.popCount=function(n){return n=n-(n>>>1&1431655765),n=(n&858993459)+(n>>>2&858993459),(n+(n>>>4)&252645135)*16843009>>>24};function o(n){var i=32;return n&=-n,n&&i--,n&65535&&(i-=16),n&16711935&&(i-=8),n&252645135&&(i-=4),n&858993459&&(i-=2),n&1431655765&&(i-=1),i}t.countTrailingZeros=o,t.nextPow2=function(n){return n+=n===0,--n,n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n+1},t.prevPow2=function(n){return n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n-(n>>>1)},t.parity=function(n){return n^=n>>>16,n^=n>>>8,n^=n>>>4,n&=15,27030>>>n&1};var a=new Array(256);(function(n){for(var i=0;i<256;++i){var s=i,h=i,f=7;for(s>>>=1;s;s>>>=1)h<<=1,h|=s&1,--f;n[i]=h<>>8&255]<<16|a[n>>>16&255]<<8|a[n>>>24&255]},t.interleave2=function(n,i){return n&=65535,n=(n|n<<8)&16711935,n=(n|n<<4)&252645135,n=(n|n<<2)&858993459,n=(n|n<<1)&1431655765,i&=65535,i=(i|i<<8)&16711935,i=(i|i<<4)&252645135,i=(i|i<<2)&858993459,i=(i|i<<1)&1431655765,n|i<<1},t.deinterleave2=function(n,i){return n=n>>>i&1431655765,n=(n|n>>>1)&858993459,n=(n|n>>>2)&252645135,n=(n|n>>>4)&16711935,n=(n|n>>>16)&65535,n<<16>>16},t.interleave3=function(n,i,s){return n&=1023,n=(n|n<<16)&4278190335,n=(n|n<<8)&251719695,n=(n|n<<4)&3272356035,n=(n|n<<2)&1227133513,i&=1023,i=(i|i<<16)&4278190335,i=(i|i<<8)&251719695,i=(i|i<<4)&3272356035,i=(i|i<<2)&1227133513,n|=i<<1,s&=1023,s=(s|s<<16)&4278190335,s=(s|s<<8)&251719695,s=(s|s<<4)&3272356035,s=(s|s<<2)&1227133513,n|s<<2},t.deinterleave3=function(n,i){return n=n>>>i&1227133513,n=(n|n>>>2)&3272356035,n=(n|n>>>4)&251719695,n=(n|n>>>8)&4278190335,n=(n|n>>>16)&1023,n<<22>>22},t.nextCombination=function(n){var i=n|n-1;return i+1|(~i&-~i)-1>>>o(n)+1}},6859:function(e,t,r){e=r.nmd(e),function(o,a){"use strict";function n(O,P){if(!O)throw new Error(P||"Assertion failed")}function i(O,P){O.super_=P;var U=function(){};U.prototype=P.prototype,O.prototype=new U,O.prototype.constructor=O}function s(O,P,U){if(s.isBN(O))return O;this.negative=0,this.words=null,this.length=0,this.red=null,O!==null&&((P==="le"||P==="be")&&(U=P,P=10),this._init(O||0,P||10,U||"be"))}typeof o=="object"?o.exports=s:a.BN=s,s.BN=s,s.wordSize=26;var h;try{typeof window<"u"&&typeof window.Buffer<"u"?h=window.Buffer:h=r(7790).Buffer}catch{}s.isBN=function(P){return P instanceof s?!0:P!==null&&typeof P=="object"&&P.constructor.wordSize===s.wordSize&&Array.isArray(P.words)},s.max=function(P,U){return P.cmp(U)>0?P:U},s.min=function(P,U){return P.cmp(U)<0?P:U},s.prototype._init=function(P,U,B){if(typeof P=="number")return this._initNumber(P,U,B);if(typeof P=="object")return this._initArray(P,U,B);U==="hex"&&(U=16),n(U===(U|0)&&U>=2&&U<=36),P=P.toString().replace(/\s+/g,"");var X=0;P[0]==="-"&&(X++,this.negative=1),X=0;X-=3)le=P[X]|P[X-1]<<8|P[X-2]<<16,this.words[$]|=le<>>26-ce&67108863,ce+=24,ce>=26&&(ce-=26,$++);else if(B==="le")for(X=0,$=0;X>>26-ce&67108863,ce+=24,ce>=26&&(ce-=26,$++);return this.strip()};function f(O,P){var U=O.charCodeAt(P);return U>=65&&U<=70?U-55:U>=97&&U<=102?U-87:U-48&15}function v(O,P,U){var B=f(O,U);return U-1>=P&&(B|=f(O,U-1)<<4),B}s.prototype._parseHex=function(P,U,B){this.length=Math.ceil((P.length-U)/6),this.words=new Array(this.length);for(var X=0;X=U;X-=2)ce=v(P,U,X)<<$,this.words[le]|=ce&67108863,$>=18?($-=18,le+=1,this.words[le]|=ce>>>26):$+=8;else{var de=P.length-U;for(X=de%2===0?U+1:U;X=18?($-=18,le+=1,this.words[le]|=ce>>>26):$+=8}this.strip()};function c(O,P,U,B){for(var X=0,$=Math.min(O.length,U),le=P;le<$;le++){var ce=O.charCodeAt(le)-48;X*=B,ce>=49?X+=ce-49+10:ce>=17?X+=ce-17+10:X+=ce}return X}s.prototype._parseBase=function(P,U,B){this.words=[0],this.length=1;for(var X=0,$=1;$<=67108863;$*=U)X++;X--,$=$/U|0;for(var le=P.length-B,ce=le%X,de=Math.min(le,le-ce)+B,G=0,Y=B;Y1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},s.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},s.prototype.inspect=function(){return(this.red?""};var T=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],l=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],_=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];s.prototype.toString=function(P,U){P=P||10,U=U|0||1;var B;if(P===16||P==="hex"){B="";for(var X=0,$=0,le=0;le>>24-X&16777215,X+=2,X>=26&&(X-=26,le--),$!==0||le!==this.length-1?B=T[6-de.length]+de+B:B=de+B}for($!==0&&(B=$.toString(16)+B);B.length%U!==0;)B="0"+B;return this.negative!==0&&(B="-"+B),B}if(P===(P|0)&&P>=2&&P<=36){var G=l[P],Y=_[P];B="";var ee=this.clone();for(ee.negative=0;!ee.isZero();){var q=ee.modn(Y).toString(P);ee=ee.idivn(Y),ee.isZero()?B=q+B:B=T[G-q.length]+q+B}for(this.isZero()&&(B="0"+B);B.length%U!==0;)B="0"+B;return this.negative!==0&&(B="-"+B),B}n(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var P=this.words[0];return this.length===2?P+=this.words[1]*67108864:this.length===3&&this.words[2]===1?P+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-P:P},s.prototype.toJSON=function(){return this.toString(16)},s.prototype.toBuffer=function(P,U){return n(typeof h<"u"),this.toArrayLike(h,P,U)},s.prototype.toArray=function(P,U){return this.toArrayLike(Array,P,U)},s.prototype.toArrayLike=function(P,U,B){var X=this.byteLength(),$=B||Math.max(1,X);n(X<=$,"byte array longer than desired length"),n($>0,"Requested array length <= 0"),this.strip();var le=U==="le",ce=new P($),de,G,Y=this.clone();if(le){for(G=0;!Y.isZero();G++)de=Y.andln(255),Y.iushrn(8),ce[G]=de;for(;G<$;G++)ce[G]=0}else{for(G=0;G<$-X;G++)ce[G]=0;for(G=0;!Y.isZero();G++)de=Y.andln(255),Y.iushrn(8),ce[$-G-1]=de}return ce},Math.clz32?s.prototype._countBits=function(P){return 32-Math.clz32(P)}:s.prototype._countBits=function(P){var U=P,B=0;return U>=4096&&(B+=13,U>>>=13),U>=64&&(B+=7,U>>>=7),U>=8&&(B+=4,U>>>=4),U>=2&&(B+=2,U>>>=2),B+U},s.prototype._zeroBits=function(P){if(P===0)return 26;var U=P,B=0;return U&8191||(B+=13,U>>>=13),U&127||(B+=7,U>>>=7),U&15||(B+=4,U>>>=4),U&3||(B+=2,U>>>=2),U&1||B++,B},s.prototype.bitLength=function(){var P=this.words[this.length-1],U=this._countBits(P);return(this.length-1)*26+U};function w(O){for(var P=new Array(O.bitLength()),U=0;U>>X}return P}s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var P=0,U=0;UP.length?this.clone().ior(P):P.clone().ior(this)},s.prototype.uor=function(P){return this.length>P.length?this.clone().iuor(P):P.clone().iuor(this)},s.prototype.iuand=function(P){var U;this.length>P.length?U=P:U=this;for(var B=0;BP.length?this.clone().iand(P):P.clone().iand(this)},s.prototype.uand=function(P){return this.length>P.length?this.clone().iuand(P):P.clone().iuand(this)},s.prototype.iuxor=function(P){var U,B;this.length>P.length?(U=this,B=P):(U=P,B=this);for(var X=0;XP.length?this.clone().ixor(P):P.clone().ixor(this)},s.prototype.uxor=function(P){return this.length>P.length?this.clone().iuxor(P):P.clone().iuxor(this)},s.prototype.inotn=function(P){n(typeof P=="number"&&P>=0);var U=Math.ceil(P/26)|0,B=P%26;this._expand(U),B>0&&U--;for(var X=0;X0&&(this.words[X]=~this.words[X]&67108863>>26-B),this.strip()},s.prototype.notn=function(P){return this.clone().inotn(P)},s.prototype.setn=function(P,U){n(typeof P=="number"&&P>=0);var B=P/26|0,X=P%26;return this._expand(B+1),U?this.words[B]=this.words[B]|1<P.length?(B=this,X=P):(B=P,X=this);for(var $=0,le=0;le>>26;for(;$!==0&&le>>26;if(this.length=B.length,$!==0)this.words[this.length]=$,this.length++;else if(B!==this)for(;leP.length?this.clone().iadd(P):P.clone().iadd(this)},s.prototype.isub=function(P){if(P.negative!==0){P.negative=0;var U=this.iadd(P);return P.negative=1,U._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(P),this.negative=1,this._normSign();var B=this.cmp(P);if(B===0)return this.negative=0,this.length=1,this.words[0]=0,this;var X,$;B>0?(X=this,$=P):(X=P,$=this);for(var le=0,ce=0;ce<$.length;ce++)U=(X.words[ce]|0)-($.words[ce]|0)+le,le=U>>26,this.words[ce]=U&67108863;for(;le!==0&&ce>26,this.words[ce]=U&67108863;if(le===0&&ce>>26,ee=de&67108863,q=Math.min(G,P.length-1),se=Math.max(0,G-O.length+1);se<=q;se++){var ae=G-se|0;X=O.words[ae]|0,$=P.words[se]|0,le=X*$+ee,Y+=le/67108864|0,ee=le&67108863}U.words[G]=ee|0,de=Y|0}return de!==0?U.words[G]=de|0:U.length--,U.strip()}var M=function(P,U,B){var X=P.words,$=U.words,le=B.words,ce=0,de,G,Y,ee=X[0]|0,q=ee&8191,se=ee>>>13,ae=X[1]|0,j=ae&8191,Q=ae>>>13,re=X[2]|0,pe=re&8191,we=re>>>13,Se=X[3]|0,Ie=Se&8191,Re=Se>>>13,We=X[4]|0,at=We&8191,nt=We>>>13,tt=X[5]|0,qe=tt&8191,he=tt>>>13,ue=X[6]|0,ne=ue&8191,Ce=ue>>>13,Ye=X[7]|0,rt=Ye&8191,Ke=Ye>>>13,Mt=X[8]|0,kt=Mt&8191,Nt=Mt>>>13,Gt=X[9]|0,Mr=Gt&8191,mr=Gt>>>13,qr=$[0]|0,Er=qr&8191,Ir=qr>>>13,_t=$[1]|0,Oe=_t&8191,Je=_t>>>13,Ae=$[2]|0,Le=Ae&8191,Ue=Ae>>>13,Ze=$[3]|0,st=Ze&8191,ut=Ze>>>13,Ut=$[4]|0,Ct=Ut&8191,Pt=Ut>>>13,jt=$[5]|0,fr=jt&8191,ur=jt>>>13,sr=$[6]|0,Pr=sr&8191,Ta=sr>>>13,Oa=$[7]|0,Ia=Oa&8191,qa=Oa>>>13,Wa=$[8]|0,Ca=Wa&8191,hi=Wa>>>13,wi=$[9]|0,Kt=wi&8191,Dt=wi>>>13;B.negative=P.negative^U.negative,B.length=19,de=Math.imul(q,Er),G=Math.imul(q,Ir),G=G+Math.imul(se,Er)|0,Y=Math.imul(se,Ir);var Yt=(ce+de|0)+((G&8191)<<13)|0;ce=(Y+(G>>>13)|0)+(Yt>>>26)|0,Yt&=67108863,de=Math.imul(j,Er),G=Math.imul(j,Ir),G=G+Math.imul(Q,Er)|0,Y=Math.imul(Q,Ir),de=de+Math.imul(q,Oe)|0,G=G+Math.imul(q,Je)|0,G=G+Math.imul(se,Oe)|0,Y=Y+Math.imul(se,Je)|0;var Jt=(ce+de|0)+((G&8191)<<13)|0;ce=(Y+(G>>>13)|0)+(Jt>>>26)|0,Jt&=67108863,de=Math.imul(pe,Er),G=Math.imul(pe,Ir),G=G+Math.imul(we,Er)|0,Y=Math.imul(we,Ir),de=de+Math.imul(j,Oe)|0,G=G+Math.imul(j,Je)|0,G=G+Math.imul(Q,Oe)|0,Y=Y+Math.imul(Q,Je)|0,de=de+Math.imul(q,Le)|0,G=G+Math.imul(q,Ue)|0,G=G+Math.imul(se,Le)|0,Y=Y+Math.imul(se,Ue)|0;var Fr=(ce+de|0)+((G&8191)<<13)|0;ce=(Y+(G>>>13)|0)+(Fr>>>26)|0,Fr&=67108863,de=Math.imul(Ie,Er),G=Math.imul(Ie,Ir),G=G+Math.imul(Re,Er)|0,Y=Math.imul(Re,Ir),de=de+Math.imul(pe,Oe)|0,G=G+Math.imul(pe,Je)|0,G=G+Math.imul(we,Oe)|0,Y=Y+Math.imul(we,Je)|0,de=de+Math.imul(j,Le)|0,G=G+Math.imul(j,Ue)|0,G=G+Math.imul(Q,Le)|0,Y=Y+Math.imul(Q,Ue)|0,de=de+Math.imul(q,st)|0,G=G+Math.imul(q,ut)|0,G=G+Math.imul(se,st)|0,Y=Y+Math.imul(se,ut)|0;var ta=(ce+de|0)+((G&8191)<<13)|0;ce=(Y+(G>>>13)|0)+(ta>>>26)|0,ta&=67108863,de=Math.imul(at,Er),G=Math.imul(at,Ir),G=G+Math.imul(nt,Er)|0,Y=Math.imul(nt,Ir),de=de+Math.imul(Ie,Oe)|0,G=G+Math.imul(Ie,Je)|0,G=G+Math.imul(Re,Oe)|0,Y=Y+Math.imul(Re,Je)|0,de=de+Math.imul(pe,Le)|0,G=G+Math.imul(pe,Ue)|0,G=G+Math.imul(we,Le)|0,Y=Y+Math.imul(we,Ue)|0,de=de+Math.imul(j,st)|0,G=G+Math.imul(j,ut)|0,G=G+Math.imul(Q,st)|0,Y=Y+Math.imul(Q,ut)|0,de=de+Math.imul(q,Ct)|0,G=G+Math.imul(q,Pt)|0,G=G+Math.imul(se,Ct)|0,Y=Y+Math.imul(se,Pt)|0;var ra=(ce+de|0)+((G&8191)<<13)|0;ce=(Y+(G>>>13)|0)+(ra>>>26)|0,ra&=67108863,de=Math.imul(qe,Er),G=Math.imul(qe,Ir),G=G+Math.imul(he,Er)|0,Y=Math.imul(he,Ir),de=de+Math.imul(at,Oe)|0,G=G+Math.imul(at,Je)|0,G=G+Math.imul(nt,Oe)|0,Y=Y+Math.imul(nt,Je)|0,de=de+Math.imul(Ie,Le)|0,G=G+Math.imul(Ie,Ue)|0,G=G+Math.imul(Re,Le)|0,Y=Y+Math.imul(Re,Ue)|0,de=de+Math.imul(pe,st)|0,G=G+Math.imul(pe,ut)|0,G=G+Math.imul(we,st)|0,Y=Y+Math.imul(we,ut)|0,de=de+Math.imul(j,Ct)|0,G=G+Math.imul(j,Pt)|0,G=G+Math.imul(Q,Ct)|0,Y=Y+Math.imul(Q,Pt)|0,de=de+Math.imul(q,fr)|0,G=G+Math.imul(q,ur)|0,G=G+Math.imul(se,fr)|0,Y=Y+Math.imul(se,ur)|0;var ca=(ce+de|0)+((G&8191)<<13)|0;ce=(Y+(G>>>13)|0)+(ca>>>26)|0,ca&=67108863,de=Math.imul(ne,Er),G=Math.imul(ne,Ir),G=G+Math.imul(Ce,Er)|0,Y=Math.imul(Ce,Ir),de=de+Math.imul(qe,Oe)|0,G=G+Math.imul(qe,Je)|0,G=G+Math.imul(he,Oe)|0,Y=Y+Math.imul(he,Je)|0,de=de+Math.imul(at,Le)|0,G=G+Math.imul(at,Ue)|0,G=G+Math.imul(nt,Le)|0,Y=Y+Math.imul(nt,Ue)|0,de=de+Math.imul(Ie,st)|0,G=G+Math.imul(Ie,ut)|0,G=G+Math.imul(Re,st)|0,Y=Y+Math.imul(Re,ut)|0,de=de+Math.imul(pe,Ct)|0,G=G+Math.imul(pe,Pt)|0,G=G+Math.imul(we,Ct)|0,Y=Y+Math.imul(we,Pt)|0,de=de+Math.imul(j,fr)|0,G=G+Math.imul(j,ur)|0,G=G+Math.imul(Q,fr)|0,Y=Y+Math.imul(Q,ur)|0,de=de+Math.imul(q,Pr)|0,G=G+Math.imul(q,Ta)|0,G=G+Math.imul(se,Pr)|0,Y=Y+Math.imul(se,Ta)|0;var Ba=(ce+de|0)+((G&8191)<<13)|0;ce=(Y+(G>>>13)|0)+(Ba>>>26)|0,Ba&=67108863,de=Math.imul(rt,Er),G=Math.imul(rt,Ir),G=G+Math.imul(Ke,Er)|0,Y=Math.imul(Ke,Ir),de=de+Math.imul(ne,Oe)|0,G=G+Math.imul(ne,Je)|0,G=G+Math.imul(Ce,Oe)|0,Y=Y+Math.imul(Ce,Je)|0,de=de+Math.imul(qe,Le)|0,G=G+Math.imul(qe,Ue)|0,G=G+Math.imul(he,Le)|0,Y=Y+Math.imul(he,Ue)|0,de=de+Math.imul(at,st)|0,G=G+Math.imul(at,ut)|0,G=G+Math.imul(nt,st)|0,Y=Y+Math.imul(nt,ut)|0,de=de+Math.imul(Ie,Ct)|0,G=G+Math.imul(Ie,Pt)|0,G=G+Math.imul(Re,Ct)|0,Y=Y+Math.imul(Re,Pt)|0,de=de+Math.imul(pe,fr)|0,G=G+Math.imul(pe,ur)|0,G=G+Math.imul(we,fr)|0,Y=Y+Math.imul(we,ur)|0,de=de+Math.imul(j,Pr)|0,G=G+Math.imul(j,Ta)|0,G=G+Math.imul(Q,Pr)|0,Y=Y+Math.imul(Q,Ta)|0,de=de+Math.imul(q,Ia)|0,G=G+Math.imul(q,qa)|0,G=G+Math.imul(se,Ia)|0,Y=Y+Math.imul(se,qa)|0;var $a=(ce+de|0)+((G&8191)<<13)|0;ce=(Y+(G>>>13)|0)+($a>>>26)|0,$a&=67108863,de=Math.imul(kt,Er),G=Math.imul(kt,Ir),G=G+Math.imul(Nt,Er)|0,Y=Math.imul(Nt,Ir),de=de+Math.imul(rt,Oe)|0,G=G+Math.imul(rt,Je)|0,G=G+Math.imul(Ke,Oe)|0,Y=Y+Math.imul(Ke,Je)|0,de=de+Math.imul(ne,Le)|0,G=G+Math.imul(ne,Ue)|0,G=G+Math.imul(Ce,Le)|0,Y=Y+Math.imul(Ce,Ue)|0,de=de+Math.imul(qe,st)|0,G=G+Math.imul(qe,ut)|0,G=G+Math.imul(he,st)|0,Y=Y+Math.imul(he,ut)|0,de=de+Math.imul(at,Ct)|0,G=G+Math.imul(at,Pt)|0,G=G+Math.imul(nt,Ct)|0,Y=Y+Math.imul(nt,Pt)|0,de=de+Math.imul(Ie,fr)|0,G=G+Math.imul(Ie,ur)|0,G=G+Math.imul(Re,fr)|0,Y=Y+Math.imul(Re,ur)|0,de=de+Math.imul(pe,Pr)|0,G=G+Math.imul(pe,Ta)|0,G=G+Math.imul(we,Pr)|0,Y=Y+Math.imul(we,Ta)|0,de=de+Math.imul(j,Ia)|0,G=G+Math.imul(j,qa)|0,G=G+Math.imul(Q,Ia)|0,Y=Y+Math.imul(Q,qa)|0,de=de+Math.imul(q,Ca)|0,G=G+Math.imul(q,hi)|0,G=G+Math.imul(se,Ca)|0,Y=Y+Math.imul(se,hi)|0;var Za=(ce+de|0)+((G&8191)<<13)|0;ce=(Y+(G>>>13)|0)+(Za>>>26)|0,Za&=67108863,de=Math.imul(Mr,Er),G=Math.imul(Mr,Ir),G=G+Math.imul(mr,Er)|0,Y=Math.imul(mr,Ir),de=de+Math.imul(kt,Oe)|0,G=G+Math.imul(kt,Je)|0,G=G+Math.imul(Nt,Oe)|0,Y=Y+Math.imul(Nt,Je)|0,de=de+Math.imul(rt,Le)|0,G=G+Math.imul(rt,Ue)|0,G=G+Math.imul(Ke,Le)|0,Y=Y+Math.imul(Ke,Ue)|0,de=de+Math.imul(ne,st)|0,G=G+Math.imul(ne,ut)|0,G=G+Math.imul(Ce,st)|0,Y=Y+Math.imul(Ce,ut)|0,de=de+Math.imul(qe,Ct)|0,G=G+Math.imul(qe,Pt)|0,G=G+Math.imul(he,Ct)|0,Y=Y+Math.imul(he,Pt)|0,de=de+Math.imul(at,fr)|0,G=G+Math.imul(at,ur)|0,G=G+Math.imul(nt,fr)|0,Y=Y+Math.imul(nt,ur)|0,de=de+Math.imul(Ie,Pr)|0,G=G+Math.imul(Ie,Ta)|0,G=G+Math.imul(Re,Pr)|0,Y=Y+Math.imul(Re,Ta)|0,de=de+Math.imul(pe,Ia)|0,G=G+Math.imul(pe,qa)|0,G=G+Math.imul(we,Ia)|0,Y=Y+Math.imul(we,qa)|0,de=de+Math.imul(j,Ca)|0,G=G+Math.imul(j,hi)|0,G=G+Math.imul(Q,Ca)|0,Y=Y+Math.imul(Q,hi)|0,de=de+Math.imul(q,Kt)|0,G=G+Math.imul(q,Dt)|0,G=G+Math.imul(se,Kt)|0,Y=Y+Math.imul(se,Dt)|0;var ri=(ce+de|0)+((G&8191)<<13)|0;ce=(Y+(G>>>13)|0)+(ri>>>26)|0,ri&=67108863,de=Math.imul(Mr,Oe),G=Math.imul(Mr,Je),G=G+Math.imul(mr,Oe)|0,Y=Math.imul(mr,Je),de=de+Math.imul(kt,Le)|0,G=G+Math.imul(kt,Ue)|0,G=G+Math.imul(Nt,Le)|0,Y=Y+Math.imul(Nt,Ue)|0,de=de+Math.imul(rt,st)|0,G=G+Math.imul(rt,ut)|0,G=G+Math.imul(Ke,st)|0,Y=Y+Math.imul(Ke,ut)|0,de=de+Math.imul(ne,Ct)|0,G=G+Math.imul(ne,Pt)|0,G=G+Math.imul(Ce,Ct)|0,Y=Y+Math.imul(Ce,Pt)|0,de=de+Math.imul(qe,fr)|0,G=G+Math.imul(qe,ur)|0,G=G+Math.imul(he,fr)|0,Y=Y+Math.imul(he,ur)|0,de=de+Math.imul(at,Pr)|0,G=G+Math.imul(at,Ta)|0,G=G+Math.imul(nt,Pr)|0,Y=Y+Math.imul(nt,Ta)|0,de=de+Math.imul(Ie,Ia)|0,G=G+Math.imul(Ie,qa)|0,G=G+Math.imul(Re,Ia)|0,Y=Y+Math.imul(Re,qa)|0,de=de+Math.imul(pe,Ca)|0,G=G+Math.imul(pe,hi)|0,G=G+Math.imul(we,Ca)|0,Y=Y+Math.imul(we,hi)|0,de=de+Math.imul(j,Kt)|0,G=G+Math.imul(j,Dt)|0,G=G+Math.imul(Q,Kt)|0,Y=Y+Math.imul(Q,Dt)|0;var pi=(ce+de|0)+((G&8191)<<13)|0;ce=(Y+(G>>>13)|0)+(pi>>>26)|0,pi&=67108863,de=Math.imul(Mr,Le),G=Math.imul(Mr,Ue),G=G+Math.imul(mr,Le)|0,Y=Math.imul(mr,Ue),de=de+Math.imul(kt,st)|0,G=G+Math.imul(kt,ut)|0,G=G+Math.imul(Nt,st)|0,Y=Y+Math.imul(Nt,ut)|0,de=de+Math.imul(rt,Ct)|0,G=G+Math.imul(rt,Pt)|0,G=G+Math.imul(Ke,Ct)|0,Y=Y+Math.imul(Ke,Pt)|0,de=de+Math.imul(ne,fr)|0,G=G+Math.imul(ne,ur)|0,G=G+Math.imul(Ce,fr)|0,Y=Y+Math.imul(Ce,ur)|0,de=de+Math.imul(qe,Pr)|0,G=G+Math.imul(qe,Ta)|0,G=G+Math.imul(he,Pr)|0,Y=Y+Math.imul(he,Ta)|0,de=de+Math.imul(at,Ia)|0,G=G+Math.imul(at,qa)|0,G=G+Math.imul(nt,Ia)|0,Y=Y+Math.imul(nt,qa)|0,de=de+Math.imul(Ie,Ca)|0,G=G+Math.imul(Ie,hi)|0,G=G+Math.imul(Re,Ca)|0,Y=Y+Math.imul(Re,hi)|0,de=de+Math.imul(pe,Kt)|0,G=G+Math.imul(pe,Dt)|0,G=G+Math.imul(we,Kt)|0,Y=Y+Math.imul(we,Dt)|0;var Ra=(ce+de|0)+((G&8191)<<13)|0;ce=(Y+(G>>>13)|0)+(Ra>>>26)|0,Ra&=67108863,de=Math.imul(Mr,st),G=Math.imul(Mr,ut),G=G+Math.imul(mr,st)|0,Y=Math.imul(mr,ut),de=de+Math.imul(kt,Ct)|0,G=G+Math.imul(kt,Pt)|0,G=G+Math.imul(Nt,Ct)|0,Y=Y+Math.imul(Nt,Pt)|0,de=de+Math.imul(rt,fr)|0,G=G+Math.imul(rt,ur)|0,G=G+Math.imul(Ke,fr)|0,Y=Y+Math.imul(Ke,ur)|0,de=de+Math.imul(ne,Pr)|0,G=G+Math.imul(ne,Ta)|0,G=G+Math.imul(Ce,Pr)|0,Y=Y+Math.imul(Ce,Ta)|0,de=de+Math.imul(qe,Ia)|0,G=G+Math.imul(qe,qa)|0,G=G+Math.imul(he,Ia)|0,Y=Y+Math.imul(he,qa)|0,de=de+Math.imul(at,Ca)|0,G=G+Math.imul(at,hi)|0,G=G+Math.imul(nt,Ca)|0,Y=Y+Math.imul(nt,hi)|0,de=de+Math.imul(Ie,Kt)|0,G=G+Math.imul(Ie,Dt)|0,G=G+Math.imul(Re,Kt)|0,Y=Y+Math.imul(Re,Dt)|0;var an=(ce+de|0)+((G&8191)<<13)|0;ce=(Y+(G>>>13)|0)+(an>>>26)|0,an&=67108863,de=Math.imul(Mr,Ct),G=Math.imul(Mr,Pt),G=G+Math.imul(mr,Ct)|0,Y=Math.imul(mr,Pt),de=de+Math.imul(kt,fr)|0,G=G+Math.imul(kt,ur)|0,G=G+Math.imul(Nt,fr)|0,Y=Y+Math.imul(Nt,ur)|0,de=de+Math.imul(rt,Pr)|0,G=G+Math.imul(rt,Ta)|0,G=G+Math.imul(Ke,Pr)|0,Y=Y+Math.imul(Ke,Ta)|0,de=de+Math.imul(ne,Ia)|0,G=G+Math.imul(ne,qa)|0,G=G+Math.imul(Ce,Ia)|0,Y=Y+Math.imul(Ce,qa)|0,de=de+Math.imul(qe,Ca)|0,G=G+Math.imul(qe,hi)|0,G=G+Math.imul(he,Ca)|0,Y=Y+Math.imul(he,hi)|0,de=de+Math.imul(at,Kt)|0,G=G+Math.imul(at,Dt)|0,G=G+Math.imul(nt,Kt)|0,Y=Y+Math.imul(nt,Dt)|0;var tn=(ce+de|0)+((G&8191)<<13)|0;ce=(Y+(G>>>13)|0)+(tn>>>26)|0,tn&=67108863,de=Math.imul(Mr,fr),G=Math.imul(Mr,ur),G=G+Math.imul(mr,fr)|0,Y=Math.imul(mr,ur),de=de+Math.imul(kt,Pr)|0,G=G+Math.imul(kt,Ta)|0,G=G+Math.imul(Nt,Pr)|0,Y=Y+Math.imul(Nt,Ta)|0,de=de+Math.imul(rt,Ia)|0,G=G+Math.imul(rt,qa)|0,G=G+Math.imul(Ke,Ia)|0,Y=Y+Math.imul(Ke,qa)|0,de=de+Math.imul(ne,Ca)|0,G=G+Math.imul(ne,hi)|0,G=G+Math.imul(Ce,Ca)|0,Y=Y+Math.imul(Ce,hi)|0,de=de+Math.imul(qe,Kt)|0,G=G+Math.imul(qe,Dt)|0,G=G+Math.imul(he,Kt)|0,Y=Y+Math.imul(he,Dt)|0;var fn=(ce+de|0)+((G&8191)<<13)|0;ce=(Y+(G>>>13)|0)+(fn>>>26)|0,fn&=67108863,de=Math.imul(Mr,Pr),G=Math.imul(Mr,Ta),G=G+Math.imul(mr,Pr)|0,Y=Math.imul(mr,Ta),de=de+Math.imul(kt,Ia)|0,G=G+Math.imul(kt,qa)|0,G=G+Math.imul(Nt,Ia)|0,Y=Y+Math.imul(Nt,qa)|0,de=de+Math.imul(rt,Ca)|0,G=G+Math.imul(rt,hi)|0,G=G+Math.imul(Ke,Ca)|0,Y=Y+Math.imul(Ke,hi)|0,de=de+Math.imul(ne,Kt)|0,G=G+Math.imul(ne,Dt)|0,G=G+Math.imul(Ce,Kt)|0,Y=Y+Math.imul(Ce,Dt)|0;var xt=(ce+de|0)+((G&8191)<<13)|0;ce=(Y+(G>>>13)|0)+(xt>>>26)|0,xt&=67108863,de=Math.imul(Mr,Ia),G=Math.imul(Mr,qa),G=G+Math.imul(mr,Ia)|0,Y=Math.imul(mr,qa),de=de+Math.imul(kt,Ca)|0,G=G+Math.imul(kt,hi)|0,G=G+Math.imul(Nt,Ca)|0,Y=Y+Math.imul(Nt,hi)|0,de=de+Math.imul(rt,Kt)|0,G=G+Math.imul(rt,Dt)|0,G=G+Math.imul(Ke,Kt)|0,Y=Y+Math.imul(Ke,Dt)|0;var lt=(ce+de|0)+((G&8191)<<13)|0;ce=(Y+(G>>>13)|0)+(lt>>>26)|0,lt&=67108863,de=Math.imul(Mr,Ca),G=Math.imul(Mr,hi),G=G+Math.imul(mr,Ca)|0,Y=Math.imul(mr,hi),de=de+Math.imul(kt,Kt)|0,G=G+Math.imul(kt,Dt)|0,G=G+Math.imul(Nt,Kt)|0,Y=Y+Math.imul(Nt,Dt)|0;var Br=(ce+de|0)+((G&8191)<<13)|0;ce=(Y+(G>>>13)|0)+(Br>>>26)|0,Br&=67108863,de=Math.imul(Mr,Kt),G=Math.imul(Mr,Dt),G=G+Math.imul(mr,Kt)|0,Y=Math.imul(mr,Dt);var Cr=(ce+de|0)+((G&8191)<<13)|0;return ce=(Y+(G>>>13)|0)+(Cr>>>26)|0,Cr&=67108863,le[0]=Yt,le[1]=Jt,le[2]=Fr,le[3]=ta,le[4]=ra,le[5]=ca,le[6]=Ba,le[7]=$a,le[8]=Za,le[9]=ri,le[10]=pi,le[11]=Ra,le[12]=an,le[13]=tn,le[14]=fn,le[15]=xt,le[16]=lt,le[17]=Br,le[18]=Cr,ce!==0&&(le[19]=ce,B.length++),B};Math.imul||(M=A);function g(O,P,U){U.negative=P.negative^O.negative,U.length=O.length+P.length;for(var B=0,X=0,$=0;$>>26)|0,X+=le>>>26,le&=67108863}U.words[$]=ce,B=le,le=X}return B!==0?U.words[$]=B:U.length--,U.strip()}function b(O,P,U){var B=new p;return B.mulp(O,P,U)}s.prototype.mulTo=function(P,U){var B,X=this.length+P.length;return this.length===10&&P.length===10?B=M(this,P,U):X<63?B=A(this,P,U):X<1024?B=g(this,P,U):B=b(this,P,U),B};function p(O,P){this.x=O,this.y=P}p.prototype.makeRBT=function(P){for(var U=new Array(P),B=s.prototype._countBits(P)-1,X=0;X>=1;return X},p.prototype.permute=function(P,U,B,X,$,le){for(var ce=0;ce>>1)$++;return 1<<$+1+X},p.prototype.conjugate=function(P,U,B){if(!(B<=1))for(var X=0;X>>13,B[2*le+1]=$&8191,$=$>>>13;for(le=2*U;le>=26,U+=X/67108864|0,U+=$>>>26,this.words[B]=$&67108863}return U!==0&&(this.words[B]=U,this.length++),this.length=P===0?1:this.length,this},s.prototype.muln=function(P){return this.clone().imuln(P)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(P){var U=w(P);if(U.length===0)return new s(1);for(var B=this,X=0;X=0);var U=P%26,B=(P-U)/26,X=67108863>>>26-U<<26-U,$;if(U!==0){var le=0;for($=0;$>>26-U}le&&(this.words[$]=le,this.length++)}if(B!==0){for($=this.length-1;$>=0;$--)this.words[$+B]=this.words[$];for($=0;$=0);var X;U?X=(U-U%26)/26:X=0;var $=P%26,le=Math.min((P-$)/26,this.length),ce=67108863^67108863>>>$<<$,de=B;if(X-=le,X=Math.max(0,X),de){for(var G=0;Gle)for(this.length-=le,G=0;G=0&&(Y!==0||G>=X);G--){var ee=this.words[G]|0;this.words[G]=Y<<26-$|ee>>>$,Y=ee&ce}return de&&Y!==0&&(de.words[de.length++]=Y),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},s.prototype.ishrn=function(P,U,B){return n(this.negative===0),this.iushrn(P,U,B)},s.prototype.shln=function(P){return this.clone().ishln(P)},s.prototype.ushln=function(P){return this.clone().iushln(P)},s.prototype.shrn=function(P){return this.clone().ishrn(P)},s.prototype.ushrn=function(P){return this.clone().iushrn(P)},s.prototype.testn=function(P){n(typeof P=="number"&&P>=0);var U=P%26,B=(P-U)/26,X=1<=0);var U=P%26,B=(P-U)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=B)return this;if(U!==0&&B++,this.length=Math.min(B,this.length),U!==0){var X=67108863^67108863>>>U<=67108864;U++)this.words[U]-=67108864,U===this.length-1?this.words[U+1]=1:this.words[U+1]++;return this.length=Math.max(this.length,U+1),this},s.prototype.isubn=function(P){if(n(typeof P=="number"),n(P<67108864),P<0)return this.iaddn(-P);if(this.negative!==0)return this.negative=0,this.iaddn(P),this.negative=1,this;if(this.words[0]-=P,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var U=0;U>26)-(de/67108864|0),this.words[$+B]=le&67108863}for(;$>26,this.words[$+B]=le&67108863;if(ce===0)return this.strip();for(n(ce===-1),ce=0,$=0;$>26,this.words[$]=le&67108863;return this.negative=1,this.strip()},s.prototype._wordDiv=function(P,U){var B=this.length-P.length,X=this.clone(),$=P,le=$.words[$.length-1]|0,ce=this._countBits(le);B=26-ce,B!==0&&($=$.ushln(B),X.iushln(B),le=$.words[$.length-1]|0);var de=X.length-$.length,G;if(U!=="mod"){G=new s(null),G.length=de+1,G.words=new Array(G.length);for(var Y=0;Y=0;q--){var se=(X.words[$.length+q]|0)*67108864+(X.words[$.length+q-1]|0);for(se=Math.min(se/le|0,67108863),X._ishlnsubmul($,se,q);X.negative!==0;)se--,X.negative=0,X._ishlnsubmul($,1,q),X.isZero()||(X.negative^=1);G&&(G.words[q]=se)}return G&&G.strip(),X.strip(),U!=="div"&&B!==0&&X.iushrn(B),{div:G||null,mod:X}},s.prototype.divmod=function(P,U,B){if(n(!P.isZero()),this.isZero())return{div:new s(0),mod:new s(0)};var X,$,le;return this.negative!==0&&P.negative===0?(le=this.neg().divmod(P,U),U!=="mod"&&(X=le.div.neg()),U!=="div"&&($=le.mod.neg(),B&&$.negative!==0&&$.iadd(P)),{div:X,mod:$}):this.negative===0&&P.negative!==0?(le=this.divmod(P.neg(),U),U!=="mod"&&(X=le.div.neg()),{div:X,mod:le.mod}):this.negative&P.negative?(le=this.neg().divmod(P.neg(),U),U!=="div"&&($=le.mod.neg(),B&&$.negative!==0&&$.isub(P)),{div:le.div,mod:$}):P.length>this.length||this.cmp(P)<0?{div:new s(0),mod:this}:P.length===1?U==="div"?{div:this.divn(P.words[0]),mod:null}:U==="mod"?{div:null,mod:new s(this.modn(P.words[0]))}:{div:this.divn(P.words[0]),mod:new s(this.modn(P.words[0]))}:this._wordDiv(P,U)},s.prototype.div=function(P){return this.divmod(P,"div",!1).div},s.prototype.mod=function(P){return this.divmod(P,"mod",!1).mod},s.prototype.umod=function(P){return this.divmod(P,"mod",!0).mod},s.prototype.divRound=function(P){var U=this.divmod(P);if(U.mod.isZero())return U.div;var B=U.div.negative!==0?U.mod.isub(P):U.mod,X=P.ushrn(1),$=P.andln(1),le=B.cmp(X);return le<0||$===1&&le===0?U.div:U.div.negative!==0?U.div.isubn(1):U.div.iaddn(1)},s.prototype.modn=function(P){n(P<=67108863);for(var U=(1<<26)%P,B=0,X=this.length-1;X>=0;X--)B=(U*B+(this.words[X]|0))%P;return B},s.prototype.idivn=function(P){n(P<=67108863);for(var U=0,B=this.length-1;B>=0;B--){var X=(this.words[B]|0)+U*67108864;this.words[B]=X/P|0,U=X%P}return this.strip()},s.prototype.divn=function(P){return this.clone().idivn(P)},s.prototype.egcd=function(P){n(P.negative===0),n(!P.isZero());var U=this,B=P.clone();U.negative!==0?U=U.umod(P):U=U.clone();for(var X=new s(1),$=new s(0),le=new s(0),ce=new s(1),de=0;U.isEven()&&B.isEven();)U.iushrn(1),B.iushrn(1),++de;for(var G=B.clone(),Y=U.clone();!U.isZero();){for(var ee=0,q=1;!(U.words[0]&q)&&ee<26;++ee,q<<=1);if(ee>0)for(U.iushrn(ee);ee-- >0;)(X.isOdd()||$.isOdd())&&(X.iadd(G),$.isub(Y)),X.iushrn(1),$.iushrn(1);for(var se=0,ae=1;!(B.words[0]&ae)&&se<26;++se,ae<<=1);if(se>0)for(B.iushrn(se);se-- >0;)(le.isOdd()||ce.isOdd())&&(le.iadd(G),ce.isub(Y)),le.iushrn(1),ce.iushrn(1);U.cmp(B)>=0?(U.isub(B),X.isub(le),$.isub(ce)):(B.isub(U),le.isub(X),ce.isub($))}return{a:le,b:ce,gcd:B.iushln(de)}},s.prototype._invmp=function(P){n(P.negative===0),n(!P.isZero());var U=this,B=P.clone();U.negative!==0?U=U.umod(P):U=U.clone();for(var X=new s(1),$=new s(0),le=B.clone();U.cmpn(1)>0&&B.cmpn(1)>0;){for(var ce=0,de=1;!(U.words[0]&de)&&ce<26;++ce,de<<=1);if(ce>0)for(U.iushrn(ce);ce-- >0;)X.isOdd()&&X.iadd(le),X.iushrn(1);for(var G=0,Y=1;!(B.words[0]&Y)&&G<26;++G,Y<<=1);if(G>0)for(B.iushrn(G);G-- >0;)$.isOdd()&&$.iadd(le),$.iushrn(1);U.cmp(B)>=0?(U.isub(B),X.isub($)):(B.isub(U),$.isub(X))}var ee;return U.cmpn(1)===0?ee=X:ee=$,ee.cmpn(0)<0&&ee.iadd(P),ee},s.prototype.gcd=function(P){if(this.isZero())return P.abs();if(P.isZero())return this.abs();var U=this.clone(),B=P.clone();U.negative=0,B.negative=0;for(var X=0;U.isEven()&&B.isEven();X++)U.iushrn(1),B.iushrn(1);do{for(;U.isEven();)U.iushrn(1);for(;B.isEven();)B.iushrn(1);var $=U.cmp(B);if($<0){var le=U;U=B,B=le}else if($===0||B.cmpn(1)===0)break;U.isub(B)}while(!0);return B.iushln(X)},s.prototype.invm=function(P){return this.egcd(P).a.umod(P)},s.prototype.isEven=function(){return(this.words[0]&1)===0},s.prototype.isOdd=function(){return(this.words[0]&1)===1},s.prototype.andln=function(P){return this.words[0]&P},s.prototype.bincn=function(P){n(typeof P=="number");var U=P%26,B=(P-U)/26,X=1<>>26,ce&=67108863,this.words[le]=ce}return $!==0&&(this.words[le]=$,this.length++),this},s.prototype.isZero=function(){return this.length===1&&this.words[0]===0},s.prototype.cmpn=function(P){var U=P<0;if(this.negative!==0&&!U)return-1;if(this.negative===0&&U)return 1;this.strip();var B;if(this.length>1)B=1;else{U&&(P=-P),n(P<=67108863,"Number is too big");var X=this.words[0]|0;B=X===P?0:XP.length)return 1;if(this.length=0;B--){var X=this.words[B]|0,$=P.words[B]|0;if(X!==$){X<$?U=-1:X>$&&(U=1);break}}return U},s.prototype.gtn=function(P){return this.cmpn(P)===1},s.prototype.gt=function(P){return this.cmp(P)===1},s.prototype.gten=function(P){return this.cmpn(P)>=0},s.prototype.gte=function(P){return this.cmp(P)>=0},s.prototype.ltn=function(P){return this.cmpn(P)===-1},s.prototype.lt=function(P){return this.cmp(P)===-1},s.prototype.lten=function(P){return this.cmpn(P)<=0},s.prototype.lte=function(P){return this.cmp(P)<=0},s.prototype.eqn=function(P){return this.cmpn(P)===0},s.prototype.eq=function(P){return this.cmp(P)===0},s.red=function(P){return new F(P)},s.prototype.toRed=function(P){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),P.convertTo(this)._forceRed(P)},s.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(P){return this.red=P,this},s.prototype.forceRed=function(P){return n(!this.red,"Already a number in reduction context"),this._forceRed(P)},s.prototype.redAdd=function(P){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,P)},s.prototype.redIAdd=function(P){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,P)},s.prototype.redSub=function(P){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,P)},s.prototype.redISub=function(P){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,P)},s.prototype.redShl=function(P){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,P)},s.prototype.redMul=function(P){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,P),this.red.mul(this,P)},s.prototype.redIMul=function(P){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,P),this.red.imul(this,P)},s.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(P){return n(this.red&&!P.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,P)};var u={k256:null,p224:null,p192:null,p25519:null};function y(O,P){this.name=O,this.p=new s(P,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}y.prototype._tmp=function(){var P=new s(null);return P.words=new Array(Math.ceil(this.n/13)),P},y.prototype.ireduce=function(P){var U=P,B;do this.split(U,this.tmp),U=this.imulK(U),U=U.iadd(this.tmp),B=U.bitLength();while(B>this.n);var X=B0?U.isub(this.p):U.strip!==void 0?U.strip():U._strip(),U},y.prototype.split=function(P,U){P.iushrn(this.n,0,U)},y.prototype.imulK=function(P){return P.imul(this.k)};function m(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(m,y),m.prototype.split=function(P,U){for(var B=4194303,X=Math.min(P.length,9),$=0;$>>22,le=ce}le>>>=22,P.words[$-10]=le,le===0&&P.length>10?P.length-=10:P.length-=9},m.prototype.imulK=function(P){P.words[P.length]=0,P.words[P.length+1]=0,P.length+=2;for(var U=0,B=0;B>>=26,P.words[B]=$,U=X}return U!==0&&(P.words[P.length++]=U),P},s._prime=function(P){if(u[P])return u[P];var U;if(P==="k256")U=new m;else if(P==="p224")U=new R;else if(P==="p192")U=new L;else if(P==="p25519")U=new z;else throw new Error("Unknown prime "+P);return u[P]=U,U};function F(O){if(typeof O=="string"){var P=s._prime(O);this.m=P.p,this.prime=P}else n(O.gtn(1),"modulus must be greater than 1"),this.m=O,this.prime=null}F.prototype._verify1=function(P){n(P.negative===0,"red works only with positives"),n(P.red,"red works only with red numbers")},F.prototype._verify2=function(P,U){n((P.negative|U.negative)===0,"red works only with positives"),n(P.red&&P.red===U.red,"red works only with red numbers")},F.prototype.imod=function(P){return this.prime?this.prime.ireduce(P)._forceRed(this):P.umod(this.m)._forceRed(this)},F.prototype.neg=function(P){return P.isZero()?P.clone():this.m.sub(P)._forceRed(this)},F.prototype.add=function(P,U){this._verify2(P,U);var B=P.add(U);return B.cmp(this.m)>=0&&B.isub(this.m),B._forceRed(this)},F.prototype.iadd=function(P,U){this._verify2(P,U);var B=P.iadd(U);return B.cmp(this.m)>=0&&B.isub(this.m),B},F.prototype.sub=function(P,U){this._verify2(P,U);var B=P.sub(U);return B.cmpn(0)<0&&B.iadd(this.m),B._forceRed(this)},F.prototype.isub=function(P,U){this._verify2(P,U);var B=P.isub(U);return B.cmpn(0)<0&&B.iadd(this.m),B},F.prototype.shl=function(P,U){return this._verify1(P),this.imod(P.ushln(U))},F.prototype.imul=function(P,U){return this._verify2(P,U),this.imod(P.imul(U))},F.prototype.mul=function(P,U){return this._verify2(P,U),this.imod(P.mul(U))},F.prototype.isqr=function(P){return this.imul(P,P.clone())},F.prototype.sqr=function(P){return this.mul(P,P)},F.prototype.sqrt=function(P){if(P.isZero())return P.clone();var U=this.m.andln(3);if(n(U%2===1),U===3){var B=this.m.add(new s(1)).iushrn(2);return this.pow(P,B)}for(var X=this.m.subn(1),$=0;!X.isZero()&&X.andln(1)===0;)$++,X.iushrn(1);n(!X.isZero());var le=new s(1).toRed(this),ce=le.redNeg(),de=this.m.subn(1).iushrn(1),G=this.m.bitLength();for(G=new s(2*G*G).toRed(this);this.pow(G,de).cmp(ce)!==0;)G.redIAdd(ce);for(var Y=this.pow(G,X),ee=this.pow(P,X.addn(1).iushrn(1)),q=this.pow(P,X),se=$;q.cmp(le)!==0;){for(var ae=q,j=0;ae.cmp(le)!==0;j++)ae=ae.redSqr();n(j=0;$--){for(var Y=U.words[$],ee=G-1;ee>=0;ee--){var q=Y>>ee&1;if(le!==X[0]&&(le=this.sqr(le)),q===0&&ce===0){de=0;continue}ce<<=1,ce|=q,de++,!(de!==B&&($!==0||ee!==0))&&(le=this.mul(le,X[ce]),de=0,ce=0)}G=26}return le},F.prototype.convertTo=function(P){var U=P.umod(this.m);return U===P?U.clone():U},F.prototype.convertFrom=function(P){var U=P.clone();return U.red=null,U},s.mont=function(P){return new N(P)};function N(O){F.call(this,O),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new s(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}i(N,F),N.prototype.convertTo=function(P){return this.imod(P.ushln(this.shift))},N.prototype.convertFrom=function(P){var U=this.imod(P.mul(this.rinv));return U.red=null,U},N.prototype.imul=function(P,U){if(P.isZero()||U.isZero())return P.words[0]=0,P.length=1,P;var B=P.imul(U),X=B.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),$=B.isub(X).iushrn(this.shift),le=$;return $.cmp(this.m)>=0?le=$.isub(this.m):$.cmpn(0)<0&&(le=$.iadd(this.m)),le._forceRed(this)},N.prototype.mul=function(P,U){if(P.isZero()||U.isZero())return new s(0)._forceRed(this);var B=P.mul(U),X=B.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),$=B.isub(X).iushrn(this.shift),le=$;return $.cmp(this.m)>=0?le=$.isub(this.m):$.cmpn(0)<0&&(le=$.iadd(this.m)),le._forceRed(this)},N.prototype.invm=function(P){var U=this.imod(P._invmp(this.m).mul(this.r2));return U._forceRed(this)}}(e,this)},6204:function(e){"use strict";e.exports=t;function t(r){var o,a,n,i=r.length,s=0;for(o=0;o>>1;if(!(p<=0)){var u,y=o.mallocDouble(2*p*g),m=o.mallocInt32(g);if(g=s(_,p,y,m),g>0){if(p===1&&M)a.init(g),u=a.sweepComplete(p,A,0,g,y,m,0,g,y,m);else{var R=o.mallocDouble(2*p*b),L=o.mallocInt32(b);b=s(w,p,R,L),b>0&&(a.init(g+b),p===1?u=a.sweepBipartite(p,A,0,g,y,m,0,b,R,L):u=n(p,A,M,g,y,m,b,R,L),o.free(R),o.free(L))}o.free(y),o.free(m)}return u}}}var f;function v(_,w){f.push([_,w])}function c(_){return f=[],h(_,_,v,!0),f}function T(_,w){return f=[],h(_,w,v,!1),f}function l(_,w,A){switch(arguments.length){case 1:return c(_);case 2:return typeof w=="function"?h(_,_,w,!0):T(_,w);case 3:return h(_,w,A,!1);default:throw new Error("box-intersect: Invalid arguments")}}},2455:function(e,t){"use strict";function r(){function n(h,f,v,c,T,l,_,w,A,M,g){for(var b=2*h,p=c,u=b*c;pA-w?n(h,f,v,c,T,l,_,w,A,M,g):i(h,f,v,c,T,l,_,w,A,M,g)}return s}function o(){function n(v,c,T,l,_,w,A,M,g,b,p){for(var u=2*v,y=l,m=u*l;y<_;++y,m+=u){var R=w[c+m],L=w[c+m+v],z=A[y];e:for(var F=M,N=u*M;Fb-g?l?n(v,c,T,_,w,A,M,g,b,p,u):i(v,c,T,_,w,A,M,g,b,p,u):l?s(v,c,T,_,w,A,M,g,b,p,u):h(v,c,T,_,w,A,M,g,b,p,u)}return f}function a(n){return n?r():o()}t.partial=a(!1),t.full=a(!0)},7150:function(e,t,r){"use strict";e.exports=O;var o=r(1888),a=r(8828),n=r(2455),i=n.partial,s=n.full,h=r(855),f=r(3545),v=r(8105),c=128,T=1<<22,l=1<<22,_=v("!(lo>=p0)&&!(p1>=hi)"),w=v("lo===p0"),A=v("lo0;){Y-=1;var se=Y*p,ae=m[se],j=m[se+1],Q=m[se+2],re=m[se+3],pe=m[se+4],we=m[se+5],Se=Y*u,Ie=R[Se],Re=R[Se+1],We=we&1,at=!!(we&16),nt=$,tt=le,qe=de,he=G;if(We&&(nt=de,tt=G,qe=$,he=le),!(we&2&&(Q=A(P,ae,j,Q,nt,tt,Re),j>=Q))&&!(we&4&&(j=M(P,ae,j,Q,nt,tt,Ie),j>=Q))){var ue=Q-j,ne=pe-re;if(at){if(P*ue*(ue+ne)v&&T[b+f]>M;--g,b-=_){for(var p=b,u=b+_,y=0;y<_;++y,++p,++u){var m=T[p];T[p]=T[u],T[u]=m}var R=l[g];l[g]=l[g-1],l[g-1]=R}}function s(h,f,v,c,T,l){if(c<=v+1)return v;for(var _=v,w=c,A=c+v>>>1,M=2*h,g=A,b=T[M*A+f];_=R?(g=m,b=R):y>=z?(g=u,b=y):(g=L,b=z):R>=z?(g=m,b=R):z>=y?(g=u,b=y):(g=L,b=z);for(var O=M*(w-1),P=M*g,F=0;F=p0)&&!(p1>=hi)":f};function r(v){return t[v]}function o(v,c,T,l,_,w,A){for(var M=2*v,g=M*T,b=g,p=T,u=c,y=v+c,m=T;l>m;++m,g+=M){var R=_[g+u];if(R===A)if(p===m)p+=1,b+=M;else{for(var L=0;M>L;++L){var z=_[g+L];_[g+L]=_[b],_[b++]=z}var F=w[m];w[m]=w[p],w[p++]=F}}return p}function a(v,c,T,l,_,w,A){for(var M=2*v,g=M*T,b=g,p=T,u=c,y=v+c,m=T;l>m;++m,g+=M){var R=_[g+u];if(RL;++L){var z=_[g+L];_[g+L]=_[b],_[b++]=z}var F=w[m];w[m]=w[p],w[p++]=F}}return p}function n(v,c,T,l,_,w,A){for(var M=2*v,g=M*T,b=g,p=T,u=c,y=v+c,m=T;l>m;++m,g+=M){var R=_[g+y];if(R<=A)if(p===m)p+=1,b+=M;else{for(var L=0;M>L;++L){var z=_[g+L];_[g+L]=_[b],_[b++]=z}var F=w[m];w[m]=w[p],w[p++]=F}}return p}function i(v,c,T,l,_,w,A){for(var M=2*v,g=M*T,b=g,p=T,u=c,y=v+c,m=T;l>m;++m,g+=M){var R=_[g+y];if(R<=A)if(p===m)p+=1,b+=M;else{for(var L=0;M>L;++L){var z=_[g+L];_[g+L]=_[b],_[b++]=z}var F=w[m];w[m]=w[p],w[p++]=F}}return p}function s(v,c,T,l,_,w,A){for(var M=2*v,g=M*T,b=g,p=T,u=c,y=v+c,m=T;l>m;++m,g+=M){var R=_[g+u],L=_[g+y];if(R<=A&&A<=L)if(p===m)p+=1,b+=M;else{for(var z=0;M>z;++z){var F=_[g+z];_[g+z]=_[b],_[b++]=F}var N=w[m];w[m]=w[p],w[p++]=N}}return p}function h(v,c,T,l,_,w,A){for(var M=2*v,g=M*T,b=g,p=T,u=c,y=v+c,m=T;l>m;++m,g+=M){var R=_[g+u],L=_[g+y];if(Rz;++z){var F=_[g+z];_[g+z]=_[b],_[b++]=F}var N=w[m];w[m]=w[p],w[p++]=N}}return p}function f(v,c,T,l,_,w,A,M){for(var g=2*v,b=g*T,p=b,u=T,y=c,m=v+c,R=T;l>R;++R,b+=g){var L=_[b+y],z=_[b+m];if(!(L>=A)&&!(M>=z))if(u===R)u+=1,p+=g;else{for(var F=0;g>F;++F){var N=_[b+F];_[b+F]=_[p],_[p++]=N}var O=w[R];w[R]=w[u],w[u++]=O}}return u}},4192:function(e){"use strict";e.exports=r;var t=32;function r(c,T){T<=4*t?o(0,T-1,c):v(0,T-1,c)}function o(c,T,l){for(var _=2*(c+1),w=c+1;w<=T;++w){for(var A=l[_++],M=l[_++],g=w,b=_-2;g-- >c;){var p=l[b-2],u=l[b-1];if(pl[T+1]:!0}function f(c,T,l,_){c*=2;var w=_[c];return w>1,g=M-_,b=M+_,p=w,u=g,y=M,m=b,R=A,L=c+1,z=T-1,F=0;h(p,u,l)&&(F=p,p=u,u=F),h(m,R,l)&&(F=m,m=R,R=F),h(p,y,l)&&(F=p,p=y,y=F),h(u,y,l)&&(F=u,u=y,y=F),h(p,m,l)&&(F=p,p=m,m=F),h(y,m,l)&&(F=y,y=m,m=F),h(u,R,l)&&(F=u,u=R,R=F),h(u,y,l)&&(F=u,u=y,y=F),h(m,R,l)&&(F=m,m=R,R=F);for(var N=l[2*u],O=l[2*u+1],P=l[2*m],U=l[2*m+1],B=2*p,X=2*y,$=2*R,le=2*w,ce=2*M,de=2*A,G=0;G<2;++G){var Y=l[B+G],ee=l[X+G],q=l[$+G];l[le+G]=Y,l[ce+G]=ee,l[de+G]=q}n(g,c,l),n(b,T,l);for(var se=L;se<=z;++se)if(f(se,N,O,l))se!==L&&a(se,L,l),++L;else if(!f(se,P,U,l))for(;;)if(f(z,P,U,l)){f(z,N,O,l)?(i(se,L,z,l),++L,--z):(a(se,z,l),--z);break}else{if(--z>>1;n(_,ee);for(var q=0,se=0,ce=0;ce=i)ae=ae-i|0,A(v,c,se--,ae);else if(ae>=0)A(h,f,q--,ae);else if(ae<=-i){ae=-ae-i|0;for(var j=0;j>>1;n(_,ee);for(var q=0,se=0,ae=0,ce=0;ce>1===_[2*ce+3]>>1&&(Q=2,ce+=1),j<0){for(var re=-(j>>1)-1,pe=0;pe>1)-1;Q===0?A(h,f,q--,re):Q===1?A(v,c,se--,re):Q===2&&A(T,l,ae--,re)}}}function p(y,m,R,L,z,F,N,O,P,U,B,X){var $=0,le=2*y,ce=m,de=m+y,G=1,Y=1;L?Y=i:G=i;for(var ee=z;ee>>1;n(_,j);for(var Q=0,ee=0;ee=i?(pe=!L,q-=i):(pe=!!L,q-=1),pe)M(h,f,Q++,q);else{var we=X[q],Se=le*q,Ie=B[Se+m+1],Re=B[Se+m+1+y];e:for(var We=0;We>>1;n(_,q);for(var se=0,de=0;de=i)h[se++]=G-i;else{G-=1;var j=B[G],Q=$*G,re=U[Q+m+1],pe=U[Q+m+1+y];e:for(var we=0;we=0;--we)if(h[we]===G){for(var We=we+1;We0;){for(var w=f.pop(),T=f.pop(),A=-1,M=-1,l=c[T],b=1;b=0||(h.flip(T,w),n(s,h,f,A,T,M),n(s,h,f,T,M,A),n(s,h,f,M,w,A),n(s,h,f,w,A,M))}}},5023:function(e,t,r){"use strict";var o=r(2478);e.exports=f;function a(v,c,T,l,_,w,A){this.cells=v,this.neighbor=c,this.flags=l,this.constraint=T,this.active=_,this.next=w,this.boundary=A}var n=a.prototype;function i(v,c){return v[0]-c[0]||v[1]-c[1]||v[2]-c[2]}n.locate=function(){var v=[0,0,0];return function(c,T,l){var _=c,w=T,A=l;return T0||A.length>0;){for(;w.length>0;){var u=w.pop();if(M[u]!==-_){M[u]=_;for(var y=g[u],m=0;m<3;++m){var R=p[3*u+m];R>=0&&M[R]===0&&(b[3*u+m]?A.push(R):(w.push(R),M[R]=_))}}}var L=A;A=w,w=L,A.length=0,_=-_}var z=h(g,M,c);return T?z.concat(l.boundary):z}},8902:function(e,t,r){"use strict";var o=r(2478),a=r(3250)[3],n=0,i=1,s=2;e.exports=A;function h(M,g,b,p,u){this.a=M,this.b=g,this.idx=b,this.lowerIds=p,this.upperIds=u}function f(M,g,b,p){this.a=M,this.b=g,this.type=b,this.idx=p}function v(M,g){var b=M.a[0]-g.a[0]||M.a[1]-g.a[1]||M.type-g.type;return b||M.type!==n&&(b=a(M.a,M.b,g.b),b)?b:M.idx-g.idx}function c(M,g){return a(M.a,M.b,g)}function T(M,g,b,p,u){for(var y=o.lt(g,p,c),m=o.gt(g,p,c),R=y;R1&&a(b[z[N-2]],b[z[N-1]],p)>0;)M.push([z[N-1],z[N-2],u]),N-=1;z.length=N,z.push(u);for(var F=L.upperIds,N=F.length;N>1&&a(b[F[N-2]],b[F[N-1]],p)<0;)M.push([F[N-2],F[N-1],u]),N-=1;F.length=N,F.push(u)}}function l(M,g){var b;return M.a[0]L[0]&&u.push(new f(L,R,s,y),new f(R,L,i,y))}u.sort(v);for(var z=u[0].a[0]-(1+Math.abs(u[0].a[0]))*Math.pow(2,-52),F=[new h([z,1],[z,0],-1,[],[],[],[])],N=[],y=0,O=u.length;y=0}}(),n.removeTriangle=function(h,f,v){var c=this.stars;i(c[h],f,v),i(c[f],v,h),i(c[v],h,f)},n.addTriangle=function(h,f,v){var c=this.stars;c[h].push(f,v),c[f].push(v,h),c[v].push(h,f)},n.opposite=function(h,f){for(var v=this.stars[f],c=1,T=v.length;c=0;--P){var Y=N[P];U=Y[0];var ee=z[U],q=ee[0],se=ee[1],ae=L[q],j=L[se];if((ae[0]-j[0]||ae[1]-j[1])<0){var Q=q;q=se,se=Q}ee[0]=q;var re=ee[1]=Y[1],pe;for(O&&(pe=ee[2]);P>0&&N[P-1][0]===U;){var Y=N[--P],we=Y[1];O?z.push([re,we,pe]):z.push([re,we]),re=we}O?z.push([re,se,pe]):z.push([re,se])}return B}function g(L,z,F){for(var N=z.length,O=new o(N),P=[],U=0;Uz[2]?1:0)}function u(L,z,F){if(L.length!==0){if(z)for(var N=0;N0||U.length>0}function R(L,z,F){var N;if(F){N=z;for(var O=new Array(z.length),P=0;PM+1)throw new Error(w+" map requires nshades to be at least size "+_.length);Array.isArray(f.alpha)?f.alpha.length!==2?g=[1,1]:g=f.alpha.slice():typeof f.alpha=="number"?g=[f.alpha,f.alpha]:g=[1,1],v=_.map(function(R){return Math.round(R.index*M)}),g[0]=Math.min(Math.max(g[0],0),1),g[1]=Math.min(Math.max(g[1],0),1);var p=_.map(function(R,L){var z=_[L].index,F=_[L].rgb.slice();return F.length===4&&F[3]>=0&&F[3]<=1||(F[3]=g[0]+(g[1]-g[0])*z),F}),u=[];for(b=0;b=0}function f(v,c,T,l){var _=o(c,T,l);if(_===0){var w=a(o(v,c,T)),A=a(o(v,c,l));if(w===A){if(w===0){var M=h(v,c,T),g=h(v,c,l);return M===g?0:M?1:-1}return 0}else{if(A===0)return w>0||h(v,c,l)?-1:1;if(w===0)return A>0||h(v,c,T)?1:-1}return a(A-w)}var b=o(v,c,T);if(b>0)return _>0&&o(v,c,l)>0?1:-1;if(b<0)return _>0||o(v,c,l)>0?1:-1;var p=o(v,c,l);return p>0||h(v,c,T)?1:-1}},8572:function(e){"use strict";e.exports=function(r){return r<0?-1:r>0?1:0}},8507:function(e){e.exports=o;var t=Math.min;function r(a,n){return a-n}function o(a,n){var i=a.length,s=a.length-n.length;if(s)return s;switch(i){case 0:return 0;case 1:return a[0]-n[0];case 2:return a[0]+a[1]-n[0]-n[1]||t(a[0],a[1])-t(n[0],n[1]);case 3:var h=a[0]+a[1],f=n[0]+n[1];if(s=h+a[2]-(f+n[2]),s)return s;var v=t(a[0],a[1]),c=t(n[0],n[1]);return t(v,a[2])-t(c,n[2])||t(v+a[2],h)-t(c+n[2],f);case 4:var T=a[0],l=a[1],_=a[2],w=a[3],A=n[0],M=n[1],g=n[2],b=n[3];return T+l+_+w-(A+M+g+b)||t(T,l,_,w)-t(A,M,g,b,A)||t(T+l,T+_,T+w,l+_,l+w,_+w)-t(A+M,A+g,A+b,M+g,M+b,g+b)||t(T+l+_,T+l+w,T+_+w,l+_+w)-t(A+M+g,A+M+b,A+g+b,M+g+b);default:for(var p=a.slice().sort(r),u=n.slice().sort(r),y=0;yr[a][0]&&(a=n);return oa?[[a],[o]]:[[o]]}},4750:function(e,t,r){"use strict";e.exports=a;var o=r(3090);function a(n){var i=o(n),s=i.length;if(s<=2)return[];for(var h=new Array(s),f=i[s-1],v=0;v=f[A]&&(w+=1);l[_]=w}}return h}function s(h,f){try{return o(h,!0)}catch{var v=a(h);if(v.length<=f)return[];var c=n(h,v),T=o(c,!0);return i(T,v)}}},4769:function(e){"use strict";function t(o,a,n,i,s,h){var f=6*s*s-6*s,v=3*s*s-4*s+1,c=-6*s*s+6*s,T=3*s*s-2*s;if(o.length){h||(h=new Array(o.length));for(var l=o.length-1;l>=0;--l)h[l]=f*o[l]+v*a[l]+c*n[l]+T*i[l];return h}return f*o+v*a+c*n[l]+T*i}function r(o,a,n,i,s,h){var f=s-1,v=s*s,c=f*f,T=(1+2*s)*c,l=s*c,_=v*(3-2*s),w=v*f;if(o.length){h||(h=new Array(o.length));for(var A=o.length-1;A>=0;--A)h[A]=T*o[A]+l*a[A]+_*n[A]+w*i[A];return h}return T*o+l*a+_*n+w*i}e.exports=r,e.exports.derivative=t},7642:function(e,t,r){"use strict";var o=r(8954),a=r(1682);e.exports=h;function n(f,v){this.point=f,this.index=v}function i(f,v){for(var c=f.point,T=v.point,l=c.length,_=0;_=2)return!1;F[O]=P}return!0}):z=z.filter(function(F){for(var N=0;N<=T;++N){var O=y[F[N]];if(O<0)return!1;F[N]=O}return!0}),T&1)for(var w=0;w>>31},e.exports.exponent=function(_){var w=e.exports.hi(_);return(w<<1>>>21)-1023},e.exports.fraction=function(_){var w=e.exports.lo(_),A=e.exports.hi(_),M=A&(1<<20)-1;return A&2146435072&&(M+=1048576),[w,M]},e.exports.denormalized=function(_){var w=e.exports.hi(_);return!(w&2146435072)}},1338:function(e){"use strict";function t(a,n,i){var s=a[i]|0;if(s<=0)return[];var h=new Array(s),f;if(i===a.length-1)for(f=0;f"u"&&(n=0),typeof a){case"number":if(a>0)return r(a|0,n);break;case"object":if(typeof a.length=="number")return t(a,n,0);break}return[]}e.exports=o},3134:function(e,t,r){"use strict";e.exports=a;var o=r(1682);function a(n,i){var s=n.length;if(typeof i!="number"){i=0;for(var h=0;h=T-1)for(var b=w.length-1,u=v-c[T-1],p=0;p=T-1)for(var g=w.length-1,b=v-c[T-1],p=0;p=0;--T)if(v[--c])return!1;return!0},s.jump=function(v){var c=this.lastT(),T=this.dimension;if(!(v0;--p)l.push(n(M[p-1],g[p-1],arguments[p])),_.push(0)}},s.push=function(v){var c=this.lastT(),T=this.dimension;if(!(v1e-6?1/A:0;this._time.push(v);for(var u=T;u>0;--u){var y=n(g[u-1],b[u-1],arguments[u]);l.push(y),_.push((y-l[w++])*p)}}},s.set=function(v){var c=this.dimension;if(!(v0;--M)T.push(n(w[M-1],A[M-1],arguments[M])),l.push(0)}},s.move=function(v){var c=this.lastT(),T=this.dimension;if(!(v<=c||arguments.length!==T+1)){var l=this._state,_=this._velocity,w=l.length-this.dimension,A=this.bounds,M=A[0],g=A[1],b=v-c,p=b>1e-6?1/b:0;this._time.push(v);for(var u=T;u>0;--u){var y=arguments[u];l.push(n(M[u-1],g[u-1],l[w++]+y)),_.push(y*p)}}},s.idle=function(v){var c=this.lastT();if(!(v=0;--p)l.push(n(M[p],g[p],l[w]+b*_[w])),_.push(0),w+=1}};function h(v){for(var c=new Array(v),T=0;T=0;--L){var u=y[L];m[L]<=0?y[L]=new o(u._color,u.key,u.value,y[L+1],u.right,u._count+1):y[L]=new o(u._color,u.key,u.value,u.left,y[L+1],u._count+1)}for(var L=y.length-1;L>1;--L){var z=y[L-1],u=y[L];if(z._color===r||u._color===r)break;var F=y[L-2];if(F.left===z)if(z.left===u){var N=F.right;if(N&&N._color===t)z._color=r,F.right=n(r,N),F._color=t,L-=1;else{if(F._color=t,F.left=z.right,z._color=r,z.right=F,y[L-2]=z,y[L-1]=u,i(F),i(z),L>=3){var O=y[L-3];O.left===F?O.left=z:O.right=z}break}}else{var N=F.right;if(N&&N._color===t)z._color=r,F.right=n(r,N),F._color=t,L-=1;else{if(z.right=u.left,F._color=t,F.left=u.right,u._color=r,u.left=z,u.right=F,y[L-2]=u,y[L-1]=z,i(F),i(z),i(u),L>=3){var O=y[L-3];O.left===F?O.left=u:O.right=u}break}}else if(z.right===u){var N=F.left;if(N&&N._color===t)z._color=r,F.left=n(r,N),F._color=t,L-=1;else{if(F._color=t,F.right=z.left,z._color=r,z.left=F,y[L-2]=z,y[L-1]=u,i(F),i(z),L>=3){var O=y[L-3];O.right===F?O.right=z:O.left=z}break}}else{var N=F.left;if(N&&N._color===t)z._color=r,F.left=n(r,N),F._color=t,L-=1;else{if(z.left=u.right,F._color=t,F.right=u.left,u._color=r,u.right=z,u.left=F,y[L-2]=u,y[L-1]=z,i(F),i(z),i(u),L>=3){var O=y[L-3];O.right===F?O.right=u:O.left=u}break}}}return y[0]._color=r,new s(p,y[0])};function f(g,b){if(b.left){var p=f(g,b.left);if(p)return p}var p=g(b.key,b.value);if(p)return p;if(b.right)return f(g,b.right)}function v(g,b,p,u){var y=b(g,u.key);if(y<=0){if(u.left){var m=v(g,b,p,u.left);if(m)return m}var m=p(u.key,u.value);if(m)return m}if(u.right)return v(g,b,p,u.right)}function c(g,b,p,u,y){var m=p(g,y.key),R=p(b,y.key),L;if(m<=0&&(y.left&&(L=c(g,b,p,u,y.left),L)||R>0&&(L=u(y.key,y.value),L)))return L;if(R>0&&y.right)return c(g,b,p,u,y.right)}h.forEach=function(b,p,u){if(this.root)switch(arguments.length){case 1:return f(b,this.root);case 2:return v(p,this._compare,b,this.root);case 3:return this._compare(p,u)>=0?void 0:c(p,u,this._compare,b,this.root)}},Object.defineProperty(h,"begin",{get:function(){for(var g=[],b=this.root;b;)g.push(b),b=b.left;return new T(this,g)}}),Object.defineProperty(h,"end",{get:function(){for(var g=[],b=this.root;b;)g.push(b),b=b.right;return new T(this,g)}}),h.at=function(g){if(g<0)return new T(this,[]);for(var b=this.root,p=[];;){if(p.push(b),b.left){if(g=b.right._count)break;b=b.right}else break}return new T(this,[])},h.ge=function(g){for(var b=this._compare,p=this.root,u=[],y=0;p;){var m=b(g,p.key);u.push(p),m<=0&&(y=u.length),m<=0?p=p.left:p=p.right}return u.length=y,new T(this,u)},h.gt=function(g){for(var b=this._compare,p=this.root,u=[],y=0;p;){var m=b(g,p.key);u.push(p),m<0&&(y=u.length),m<0?p=p.left:p=p.right}return u.length=y,new T(this,u)},h.lt=function(g){for(var b=this._compare,p=this.root,u=[],y=0;p;){var m=b(g,p.key);u.push(p),m>0&&(y=u.length),m<=0?p=p.left:p=p.right}return u.length=y,new T(this,u)},h.le=function(g){for(var b=this._compare,p=this.root,u=[],y=0;p;){var m=b(g,p.key);u.push(p),m>=0&&(y=u.length),m<0?p=p.left:p=p.right}return u.length=y,new T(this,u)},h.find=function(g){for(var b=this._compare,p=this.root,u=[];p;){var y=b(g,p.key);if(u.push(p),y===0)return new T(this,u);y<=0?p=p.left:p=p.right}return new T(this,[])},h.remove=function(g){var b=this.find(g);return b?b.remove():this},h.get=function(g){for(var b=this._compare,p=this.root;p;){var u=b(g,p.key);if(u===0)return p.value;u<=0?p=p.left:p=p.right}};function T(g,b){this.tree=g,this._stack=b}var l=T.prototype;Object.defineProperty(l,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(l,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),l.clone=function(){return new T(this.tree,this._stack.slice())};function _(g,b){g.key=b.key,g.value=b.value,g.left=b.left,g.right=b.right,g._color=b._color,g._count=b._count}function w(g){for(var b,p,u,y,m=g.length-1;m>=0;--m){if(b=g[m],m===0){b._color=r;return}if(p=g[m-1],p.left===b){if(u=p.right,u.right&&u.right._color===t){if(u=p.right=a(u),y=u.right=a(u.right),p.right=u.left,u.left=p,u.right=y,u._color=p._color,b._color=r,p._color=r,y._color=r,i(p),i(u),m>1){var R=g[m-2];R.left===p?R.left=u:R.right=u}g[m-1]=u;return}else if(u.left&&u.left._color===t){if(u=p.right=a(u),y=u.left=a(u.left),p.right=y.left,u.left=y.right,y.left=p,y.right=u,y._color=p._color,p._color=r,u._color=r,b._color=r,i(p),i(u),i(y),m>1){var R=g[m-2];R.left===p?R.left=y:R.right=y}g[m-1]=y;return}if(u._color===r)if(p._color===t){p._color=r,p.right=n(t,u);return}else{p.right=n(t,u);continue}else{if(u=a(u),p.right=u.left,u.left=p,u._color=p._color,p._color=t,i(p),i(u),m>1){var R=g[m-2];R.left===p?R.left=u:R.right=u}g[m-1]=u,g[m]=p,m+11){var R=g[m-2];R.right===p?R.right=u:R.left=u}g[m-1]=u;return}else if(u.right&&u.right._color===t){if(u=p.left=a(u),y=u.right=a(u.right),p.left=y.right,u.right=y.left,y.right=p,y.left=u,y._color=p._color,p._color=r,u._color=r,b._color=r,i(p),i(u),i(y),m>1){var R=g[m-2];R.right===p?R.right=y:R.left=y}g[m-1]=y;return}if(u._color===r)if(p._color===t){p._color=r,p.left=n(t,u);return}else{p.left=n(t,u);continue}else{if(u=a(u),p.left=u.right,u.right=p,u._color=p._color,p._color=t,i(p),i(u),m>1){var R=g[m-2];R.right===p?R.right=u:R.left=u}g[m-1]=u,g[m]=p,m+1=0;--u){var p=g[u];p.left===g[u+1]?b[u]=new o(p._color,p.key,p.value,b[u+1],p.right,p._count):b[u]=new o(p._color,p.key,p.value,p.left,b[u+1],p._count)}if(p=b[b.length-1],p.left&&p.right){var y=b.length;for(p=p.left;p.right;)b.push(p),p=p.right;var m=b[y-1];b.push(new o(p._color,m.key,m.value,p.left,p.right,p._count)),b[y-1].key=p.key,b[y-1].value=p.value;for(var u=b.length-2;u>=y;--u)p=b[u],b[u]=new o(p._color,p.key,p.value,p.left,b[u+1],p._count);b[y-1].left=b[y]}if(p=b[b.length-1],p._color===t){var R=b[b.length-2];R.left===p?R.left=null:R.right===p&&(R.right=null),b.pop();for(var u=0;u0)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(l,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(l,"index",{get:function(){var g=0,b=this._stack;if(b.length===0){var p=this.tree.root;return p?p._count:0}else b[b.length-1].left&&(g=b[b.length-1].left._count);for(var u=b.length-2;u>=0;--u)b[u+1]===b[u].right&&(++g,b[u].left&&(g+=b[u].left._count));return g},enumerable:!0}),l.next=function(){var g=this._stack;if(g.length!==0){var b=g[g.length-1];if(b.right)for(b=b.right;b;)g.push(b),b=b.left;else for(g.pop();g.length>0&&g[g.length-1].right===b;)b=g[g.length-1],g.pop()}},Object.defineProperty(l,"hasNext",{get:function(){var g=this._stack;if(g.length===0)return!1;if(g[g.length-1].right)return!0;for(var b=g.length-1;b>0;--b)if(g[b-1].left===g[b])return!0;return!1}}),l.update=function(g){var b=this._stack;if(b.length===0)throw new Error("Can't update empty node!");var p=new Array(b.length),u=b[b.length-1];p[p.length-1]=new o(u._color,u.key,g,u.left,u.right,u._count);for(var y=b.length-2;y>=0;--y)u=b[y],u.left===b[y+1]?p[y]=new o(u._color,u.key,u.value,p[y+1],u.right,u._count):p[y]=new o(u._color,u.key,u.value,u.left,p[y+1],u._count);return new s(this.tree._compare,p[0])},l.prev=function(){var g=this._stack;if(g.length!==0){var b=g[g.length-1];if(b.left)for(b=b.left;b;)g.push(b),b=b.right;else for(g.pop();g.length>0&&g[g.length-1].left===b;)b=g[g.length-1],g.pop()}},Object.defineProperty(l,"hasPrev",{get:function(){var g=this._stack;if(g.length===0)return!1;if(g[g.length-1].left)return!0;for(var b=g.length-1;b>0;--b)if(g[b-1].right===g[b])return!0;return!1}});function A(g,b){return gb?1:0}function M(g){return new s(g||A,null)}},3837:function(e,t,r){"use strict";e.exports=L;var o=r(4935),a=r(501),n=r(5304),i=r(6429),s=r(6444),h=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),f=ArrayBuffer,v=DataView;function c(z){return f.isView(z)&&!(z instanceof v)}function T(z){return Array.isArray(z)||c(z)}function l(z,F){return z[0]=F[0],z[1]=F[1],z[2]=F[2],z}function _(z){this.gl=z,this.pixelRatio=1,this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.autoTicks=!0,this.tickSpacing=[1,1,1],this.tickEnable=[!0,!0,!0],this.tickFont=["sans-serif","sans-serif","sans-serif"],this.tickFontStyle=["normal","normal","normal"],this.tickFontWeight=["normal","normal","normal"],this.tickFontVariant=["normal","normal","normal"],this.tickSize=[12,12,12],this.tickAngle=[0,0,0],this.tickAlign=["auto","auto","auto"],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[10,10,10],this.lastCubeProps={cubeEdges:[0,0,0],axis:[0,0,0]},this.labels=["x","y","z"],this.labelEnable=[!0,!0,!0],this.labelFont=["sans-serif","sans-serif","sans-serif"],this.labelFontStyle=["normal","normal","normal"],this.labelFontWeight=["normal","normal","normal"],this.labelFontVariant=["normal","normal","normal"],this.labelSize=[20,20,20],this.labelAngle=[0,0,0],this.labelAlign=["auto","auto","auto"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[10,10,10],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[0,0,0],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!1,!1,!1],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._firstInit=!0,this._text=null,this._lines=null,this._background=n(z)}var w=_.prototype;w.update=function(z){z=z||{};function F(q,se,ae){if(ae in z){var j=z[ae],Q=this[ae],re;(q?T(j)&&T(j[0]):T(j))?this[ae]=re=[se(j[0]),se(j[1]),se(j[2])]:this[ae]=re=[se(j),se(j),se(j)];for(var pe=0;pe<3;++pe)if(re[pe]!==Q[pe])return!0}return!1}var N=F.bind(this,!1,Number),O=F.bind(this,!1,Boolean),P=F.bind(this,!1,String),U=F.bind(this,!0,function(q){if(T(q)){if(q.length===3)return[+q[0],+q[1],+q[2],1];if(q.length===4)return[+q[0],+q[1],+q[2],+q[3]]}return[0,0,0,1]}),B,X=!1,$=!1;if("bounds"in z)for(var le=z.bounds,ce=0;ce<2;++ce)for(var de=0;de<3;++de)le[ce][de]!==this.bounds[ce][de]&&($=!0),this.bounds[ce][de]=le[ce][de];if("ticks"in z){B=z.ticks,X=!0,this.autoTicks=!1;for(var ce=0;ce<3;++ce)this.tickSpacing[ce]=0}else N("tickSpacing")&&(this.autoTicks=!0,$=!0);if(this._firstInit&&("ticks"in z||"tickSpacing"in z||(this.autoTicks=!0),$=!0,X=!0,this._firstInit=!1),$&&this.autoTicks&&(B=s.create(this.bounds,this.tickSpacing),X=!0),X){for(var ce=0;ce<3;++ce)B[ce].sort(function(se,ae){return se.x-ae.x});s.equal(B,this.ticks)?X=!1:this.ticks=B}O("tickEnable"),P("tickFont")&&(X=!0),P("tickFontStyle")&&(X=!0),P("tickFontWeight")&&(X=!0),P("tickFontVariant")&&(X=!0),N("tickSize"),N("tickAngle"),N("tickPad"),U("tickColor");var G=P("labels");P("labelFont")&&(G=!0),P("labelFontStyle")&&(G=!0),P("labelFontWeight")&&(G=!0),P("labelFontVariant")&&(G=!0),O("labelEnable"),N("labelSize"),N("labelPad"),U("labelColor"),O("lineEnable"),O("lineMirror"),N("lineWidth"),U("lineColor"),O("lineTickEnable"),O("lineTickMirror"),N("lineTickLength"),N("lineTickWidth"),U("lineTickColor"),O("gridEnable"),N("gridWidth"),U("gridColor"),O("zeroEnable"),U("zeroLineColor"),N("zeroLineWidth"),O("backgroundEnable"),U("backgroundColor");var Y=[{family:this.labelFont[0],style:this.labelFontStyle[0],weight:this.labelFontWeight[0],variant:this.labelFontVariant[0]},{family:this.labelFont[1],style:this.labelFontStyle[1],weight:this.labelFontWeight[1],variant:this.labelFontVariant[1]},{family:this.labelFont[2],style:this.labelFontStyle[2],weight:this.labelFontWeight[2],variant:this.labelFontVariant[2]}],ee=[{family:this.tickFont[0],style:this.tickFontStyle[0],weight:this.tickFontWeight[0],variant:this.tickFontVariant[0]},{family:this.tickFont[1],style:this.tickFontStyle[1],weight:this.tickFontWeight[1],variant:this.tickFontVariant[1]},{family:this.tickFont[2],style:this.tickFontStyle[2],weight:this.tickFontWeight[2],variant:this.tickFontVariant[2]}];this._text?this._text&&(G||X)&&this._text.update(this.bounds,this.labels,Y,this.ticks,ee):this._text=o(this.gl,this.bounds,this.labels,Y,this.ticks,ee),this._lines&&X&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=a(this.gl,this.bounds,this.ticks))};function A(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}var M=[new A,new A,new A];function g(z,F,N,O,P){for(var U=z.primalOffset,B=z.primalMinor,X=z.mirrorOffset,$=z.mirrorMinor,le=O[F],ce=0;ce<3;++ce)if(F!==ce){var de=U,G=X,Y=B,ee=$;le&1<0?(Y[ce]=-1,ee[ce]=0):(Y[ce]=0,ee[ce]=1)}}var b=[0,0,0],p={model:h,view:h,projection:h,_ortho:!1};w.isOpaque=function(){return!0},w.isTransparent=function(){return!1},w.drawTransparent=function(z){};var u=0,y=[0,0,0],m=[0,0,0],R=[0,0,0];w.draw=function(z){z=z||p;for(var ae=this.gl,F=z.model||h,N=z.view||h,O=z.projection||h,P=this.bounds,U=z._ortho||!1,B=i(F,N,O,P,U),X=B.cubeEdges,$=B.axis,le=N[12],ce=N[13],de=N[14],G=N[15],Y=U?2:1,ee=Y*this.pixelRatio*(O[3]*le+O[7]*ce+O[11]*de+O[15]*G)/ae.drawingBufferHeight,q=0;q<3;++q)this.lastCubeProps.cubeEdges[q]=X[q],this.lastCubeProps.axis[q]=$[q];for(var se=M,q=0;q<3;++q)g(M[q],q,this.bounds,X,$);for(var ae=this.gl,j=b,q=0;q<3;++q)this.backgroundEnable[q]?j[q]=$[q]:j[q]=0;this._background.draw(F,N,O,P,j,this.backgroundColor),this._lines.bind(F,N,O,this);for(var q=0;q<3;++q){var Q=[0,0,0];$[q]>0?Q[q]=P[1][q]:Q[q]=P[0][q];for(var re=0;re<2;++re){var pe=(q+1+re)%3,we=(q+1+(re^1))%3;this.gridEnable[pe]&&this._lines.drawGrid(pe,we,this.bounds,Q,this.gridColor[pe],this.gridWidth[pe]*this.pixelRatio)}for(var re=0;re<2;++re){var pe=(q+1+re)%3,we=(q+1+(re^1))%3;this.zeroEnable[we]&&Math.min(P[0][we],P[1][we])<=0&&Math.max(P[0][we],P[1][we])>=0&&this._lines.drawZero(pe,we,this.bounds,Q,this.zeroLineColor[we],this.zeroLineWidth[we]*this.pixelRatio)}}for(var q=0;q<3;++q){this.lineEnable[q]&&this._lines.drawAxisLine(q,this.bounds,se[q].primalOffset,this.lineColor[q],this.lineWidth[q]*this.pixelRatio),this.lineMirror[q]&&this._lines.drawAxisLine(q,this.bounds,se[q].mirrorOffset,this.lineColor[q],this.lineWidth[q]*this.pixelRatio);for(var Se=l(y,se[q].primalMinor),Ie=l(m,se[q].mirrorMinor),Re=this.lineTickLength,re=0;re<3;++re){var We=ee/F[5*re];Se[re]*=Re[re]*We,Ie[re]*=Re[re]*We}this.lineTickEnable[q]&&this._lines.drawAxisTicks(q,se[q].primalOffset,Se,this.lineTickColor[q],this.lineTickWidth[q]*this.pixelRatio),this.lineTickMirror[q]&&this._lines.drawAxisTicks(q,se[q].mirrorOffset,Ie,this.lineTickColor[q],this.lineTickWidth[q]*this.pixelRatio)}this._lines.unbind(),this._text.bind(F,N,O,this.pixelRatio);var at,nt=.5,tt,qe;function he(Ke){qe=[0,0,0],qe[Ke]=1}function ue(Ke,Mt,kt){var Nt=(Ke+1)%3,Gt=(Ke+2)%3,Mr=Mt[Nt],mr=Mt[Gt],qr=kt[Nt],Er=kt[Gt];if(Mr>0&&Er>0){he(Nt);return}else if(Mr>0&&Er<0){he(Nt);return}else if(Mr<0&&Er>0){he(Nt);return}else if(Mr<0&&Er<0){he(Nt);return}else if(mr>0&&qr>0){he(Gt);return}else if(mr>0&&qr<0){he(Gt);return}else if(mr<0&&qr>0){he(Gt);return}else if(mr<0&&qr<0){he(Gt);return}}for(var q=0;q<3;++q){for(var ne=se[q].primalMinor,Ce=se[q].mirrorMinor,Ye=l(R,se[q].primalOffset),re=0;re<3;++re)this.lineTickEnable[q]&&(Ye[re]+=ee*ne[re]*Math.max(this.lineTickLength[re],0)/F[5*re]);var rt=[0,0,0];if(rt[q]=1,this.tickEnable[q]){this.tickAngle[q]===-3600?(this.tickAngle[q]=0,this.tickAlign[q]="auto"):this.tickAlign[q]=-1,tt=1,at=[this.tickAlign[q],nt,tt],at[0]==="auto"?at[0]=u:at[0]=parseInt(""+at[0]),qe=[0,0,0],ue(q,ne,Ce);for(var re=0;re<3;++re)Ye[re]+=ee*ne[re]*this.tickPad[re]/F[5*re];this._text.drawTicks(q,this.tickSize[q],this.tickAngle[q],Ye,this.tickColor[q],rt,qe,at)}if(this.labelEnable[q]){tt=0,qe=[0,0,0],this.labels[q].length>4&&(he(q),tt=1),at=[this.labelAlign[q],nt,tt],at[0]==="auto"?at[0]=u:at[0]=parseInt(""+at[0]);for(var re=0;re<3;++re)Ye[re]+=ee*ne[re]*this.labelPad[re]/F[5*re];Ye[q]+=.5*(P[0][q]+P[1][q]),this._text.drawLabel(q,this.labelSize[q],this.labelAngle[q],Ye,this.labelColor[q],[0,0,0],qe,at)}}this._text.unbind()},w.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null};function L(z,F){var N=new _(z);return N.update(F),N}},5304:function(e,t,r){"use strict";e.exports=h;var o=r(2762),a=r(8116),n=r(1879).bg;function i(f,v,c,T){this.gl=f,this.buffer=v,this.vao=c,this.shader=T}var s=i.prototype;s.draw=function(f,v,c,T,l,_){for(var w=!1,A=0;A<3;++A)w=w||l[A];if(w){var M=this.gl;M.enable(M.POLYGON_OFFSET_FILL),M.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:f,view:v,projection:c,bounds:T,enable:l,colors:_},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),M.disable(M.POLYGON_OFFSET_FILL)}},s.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()};function h(f){for(var v=[],c=[],T=0,l=0;l<3;++l)for(var _=(l+1)%3,w=(l+2)%3,A=[0,0,0],M=[0,0,0],g=-1;g<=1;g+=2){c.push(T,T+2,T+1,T+1,T+2,T+3),A[l]=g,M[l]=g;for(var b=-1;b<=1;b+=2){A[_]=b;for(var p=-1;p<=1;p+=2)A[w]=p,v.push(A[0],A[1],A[2],M[0],M[1],M[2]),T+=1}var u=_;_=w,w=u}var y=o(f,new Float32Array(v)),m=o(f,new Uint16Array(c),f.ELEMENT_ARRAY_BUFFER),R=a(f,[{buffer:y,type:f.FLOAT,size:3,offset:0,stride:24},{buffer:y,type:f.FLOAT,size:3,offset:12,stride:24}],m),L=n(f);return L.attributes.position.location=0,L.attributes.normal.location=1,new i(f,y,R,L)}},6429:function(e,t,r){"use strict";e.exports=g;var o=r(8828),a=r(6760),n=r(5202),i=r(3250),s=new Array(16),h=new Array(8),f=new Array(8),v=new Array(3),c=[0,0,0];(function(){for(var b=0;b<8;++b)h[b]=[1,1,1,1],f[b]=[1,1,1]})();function T(b,p,u){for(var y=0;y<4;++y){b[y]=u[12+y];for(var m=0;m<3;++m)b[y]+=p[m]*u[4*m+y]}}var l=[[0,0,1,0,0],[0,0,-1,1,0],[0,-1,0,1,0],[0,1,0,1,0],[-1,0,0,1,0],[1,0,0,1,0]];function _(b){for(var p=0;p$&&(N|=1<$){N|=1<f[L][1])&&(se=L);for(var ae=-1,L=0;L<3;++L){var j=se^1<f[Q][0]&&(Q=j)}}var re=w;re[0]=re[1]=re[2]=0,re[o.log2(ae^se)]=se&ae,re[o.log2(se^Q)]=se&Q;var pe=Q^7;pe===N||pe===q?(pe=ae^7,re[o.log2(Q^pe)]=pe&Q):re[o.log2(ae^pe)]=pe&ae;for(var we=A,Se=N,U=0;U<3;++U)Se&1< HALF_PI) && (b <= ONE_AND_HALF_PI)) ? b - PI : b; } float look_horizontal_or_vertical(float a, float ratio) { // ratio controls the ratio between being horizontal to (vertical + horizontal) // if ratio is set to 0.5 then it is 50%, 50%. // when using a higher ratio e.g. 0.75 the result would // likely be more horizontal than vertical. float b = positive_angle(a); return (b < ( ratio) * HALF_PI) ? 0.0 : (b < (2.0 - ratio) * HALF_PI) ? -HALF_PI : (b < (2.0 + ratio) * HALF_PI) ? 0.0 : (b < (4.0 - ratio) * HALF_PI) ? HALF_PI : 0.0; } float roundTo(float a, float b) { return float(b * floor((a + 0.5 * b) / b)); } float look_round_n_directions(float a, int n) { float b = positive_angle(a); float div = TWO_PI / float(n); float c = roundTo(b, div); return look_upwards(c); } float applyAlignOption(float rawAngle, float delta) { return (option > 2) ? look_round_n_directions(rawAngle + delta, option) : // option 3-n: round to n directions (option == 2) ? look_horizontal_or_vertical(rawAngle + delta, hv_ratio) : // horizontal or vertical (option == 1) ? rawAngle + delta : // use free angle, and flip to align with one direction of the axis (option == 0) ? look_upwards(rawAngle) : // use free angle, and stay upwards (option ==-1) ? 0.0 : // useful for backward compatibility, all texts remains horizontal rawAngle; // otherwise return back raw input angle } bool isAxisTitle = (axis.x == 0.0) && (axis.y == 0.0) && (axis.z == 0.0); void main() { //Compute world offset float axisDistance = position.z; vec3 dataPosition = axisDistance * axis + offset; float beta = angle; // i.e. user defined attributes for each tick float axisAngle; float clipAngle; float flip; if (enableAlign) { axisAngle = (isAxisTitle) ? HALF_PI : computeViewAngle(dataPosition, dataPosition + axis); clipAngle = computeViewAngle(dataPosition, dataPosition + alignDir); axisAngle += (sin(axisAngle) < 0.0) ? PI : 0.0; clipAngle += (sin(clipAngle) < 0.0) ? PI : 0.0; flip = (dot(vec2(cos(axisAngle), sin(axisAngle)), vec2(sin(clipAngle),-cos(clipAngle))) > 0.0) ? 1.0 : 0.0; beta += applyAlignOption(clipAngle, flip * PI); } //Compute plane offset vec2 planeCoord = position.xy * pixelScale; mat2 planeXform = scale * mat2( cos(beta), sin(beta), -sin(beta), cos(beta) ); vec2 viewOffset = 2.0 * planeXform * planeCoord / resolution; //Compute clip position vec3 clipPosition = project(dataPosition); //Apply text offset in clip coordinates clipPosition += vec3(viewOffset, 0.0); //Done gl_Position = vec4(clipPosition, 1.0); } `]),h=o([`precision highp float; #define GLSLIFY 1 uniform vec4 color; void main() { gl_FragColor = color; }`]);t.Q=function(c){return a(c,s,h,null,[{name:"position",type:"vec3"}])};var f=o([`precision highp float; #define GLSLIFY 1 attribute vec3 position; attribute vec3 normal; uniform mat4 model, view, projection; uniform vec3 enable; uniform vec3 bounds[2]; varying vec3 colorChannel; void main() { vec3 signAxis = sign(bounds[1] - bounds[0]); vec3 realNormal = signAxis * normal; if(dot(realNormal, enable) > 0.0) { vec3 minRange = min(bounds[0], bounds[1]); vec3 maxRange = max(bounds[0], bounds[1]); vec3 nPosition = mix(minRange, maxRange, 0.5 * (position + 1.0)); gl_Position = projection * (view * (model * vec4(nPosition, 1.0))); } else { gl_Position = vec4(0,0,0,0); } colorChannel = abs(realNormal); } `]),v=o([`precision highp float; #define GLSLIFY 1 uniform vec4 colors[3]; varying vec3 colorChannel; void main() { gl_FragColor = colorChannel.x * colors[0] + colorChannel.y * colors[1] + colorChannel.z * colors[2]; }`]);t.bg=function(c){return a(c,f,v,null,[{name:"position",type:"vec3"},{name:"normal",type:"vec3"}])}},4935:function(e,t,r){"use strict";e.exports=_;var o=r(2762),a=r(8116),n=r(4359),i=r(1879).Q,s=window||process.global||{},h=s.__TEXT_CACHE||{};s.__TEXT_CACHE={};var f=3;function v(w,A,M,g){this.gl=w,this.shader=A,this.buffer=M,this.vao=g,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}var c=v.prototype,T=[0,0];c.bind=function(w,A,M,g){this.vao.bind(),this.shader.bind();var b=this.shader.uniforms;b.model=w,b.view=A,b.projection=M,b.pixelScale=g,T[0]=this.gl.drawingBufferWidth,T[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=T},c.unbind=function(){this.vao.unbind()},c.update=function(w,A,M,g,b){var p=[];function u(U,B,X,$,le,ce){var de=[X.style,X.weight,X.variant,X.family].join("_"),G=h[de];G||(G=h[de]={});var Y=G[B];Y||(Y=G[B]=l(B,{triangles:!0,font:X.family,fontStyle:X.style,fontWeight:X.weight,fontVariant:X.variant,textAlign:"center",textBaseline:"middle",lineSpacing:le,styletags:ce}));for(var ee=($||12)/12,q=Y.positions,se=Y.cells,ae=0,j=se.length;ae=0;--re){var pe=q[Q[re]];p.push(ee*pe[0],-ee*pe[1],U)}}for(var y=[0,0,0],m=[0,0,0],R=[0,0,0],L=[0,0,0],z=1.25,F={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},N=0;N<3;++N){R[N]=p.length/f|0,u(.5*(w[0][N]+w[1][N]),A[N],M[N],12,z,F),L[N]=(p.length/f|0)-R[N],y[N]=p.length/f|0;for(var O=0;O=0&&(f=s.length-h-1);var v=Math.pow(10,f),c=Math.round(n*i*v),T=c+"";if(T.indexOf("e")>=0)return T;var l=c/v,_=c%v;c<0?(l=-Math.ceil(l)|0,_=-_|0):(l=Math.floor(l)|0,_=_|0);var w=""+l;if(c<0&&(w="-"+w),f){for(var A=""+_;A.length=n[0][h];--c)f.push({x:c*i[h],text:r(i[h],c)});s.push(f)}return s}function a(n,i){for(var s=0;s<3;++s){if(n[s].length!==i[s].length)return!1;for(var h=0;hw)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return l.bufferSubData(_,g,M),w}function v(l,_){for(var w=o.malloc(l.length,_),A=l.length,M=0;M=0;--A){if(_[A]!==w)return!1;w*=l[A]}return!0}h.update=function(l,_){if(typeof _!="number"&&(_=-1),this.bind(),typeof l=="object"&&typeof l.shape<"u"){var w=l.dtype;if(i.indexOf(w)<0&&(w="float32"),this.type===this.gl.ELEMENT_ARRAY_BUFFER){var A=gl.getExtension("OES_element_index_uint");A&&w!=="uint16"?w="uint32":w="uint16"}if(w===l.dtype&&c(l.shape,l.stride))l.offset===0&&l.data.length===l.shape[0]?this.length=f(this.gl,this.type,this.length,this.usage,l.data,_):this.length=f(this.gl,this.type,this.length,this.usage,l.data.subarray(l.offset,l.shape[0]),_);else{var M=o.malloc(l.size,w),g=n(M,l.shape);a.assign(g,l),_<0?this.length=f(this.gl,this.type,this.length,this.usage,M,_):this.length=f(this.gl,this.type,this.length,this.usage,M.subarray(0,l.size),_),o.free(M)}}else if(Array.isArray(l)){var b;this.type===this.gl.ELEMENT_ARRAY_BUFFER?b=v(l,"uint16"):b=v(l,"float32"),_<0?this.length=f(this.gl,this.type,this.length,this.usage,b,_):this.length=f(this.gl,this.type,this.length,this.usage,b.subarray(0,l.length),_),o.free(b)}else if(typeof l=="object"&&typeof l.length=="number")this.length=f(this.gl,this.type,this.length,this.usage,l,_);else if(typeof l=="number"||l===void 0){if(_>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");l=l|0,l<=0&&(l=1),this.gl.bufferData(this.type,l|0,this.usage),this.length=l}else throw new Error("gl-buffer: Invalid data type")};function T(l,_,w,A){if(w=w||l.ARRAY_BUFFER,A=A||l.DYNAMIC_DRAW,w!==l.ARRAY_BUFFER&&w!==l.ELEMENT_ARRAY_BUFFER)throw new Error("gl-buffer: Invalid type for webgl buffer, must be either gl.ARRAY_BUFFER or gl.ELEMENT_ARRAY_BUFFER");if(A!==l.DYNAMIC_DRAW&&A!==l.STATIC_DRAW&&A!==l.STREAM_DRAW)throw new Error("gl-buffer: Invalid usage for buffer, must be either gl.DYNAMIC_DRAW, gl.STATIC_DRAW or gl.STREAM_DRAW");var M=l.createBuffer(),g=new s(l,w,M,0,A);return g.update(_),g}e.exports=T},6405:function(e,t,r){"use strict";var o=r(2931);e.exports=function(n,i){var s=n.positions,h=n.vectors,f={positions:[],vertexIntensity:[],vertexIntensityBounds:n.vertexIntensityBounds,vectors:[],cells:[],coneOffset:n.coneOffset,colormap:n.colormap};if(n.positions.length===0)return i&&(i[0]=[0,0,0],i[1]=[0,0,0]),f;for(var v=0,c=1/0,T=-1/0,l=1/0,_=-1/0,w=1/0,A=-1/0,M=null,g=null,b=[],p=1/0,u=!1,y=n.coneSizemode==="raw",m=0;mv&&(v=o.length(L)),m&&!y){var z=2*o.distance(M,R)/(o.length(g)+o.length(L));z?(p=Math.min(p,z),u=!1):u=!0}u||(M=R,g=L),b.push(L)}var F=[c,l,w],N=[T,_,A];i&&(i[0]=F,i[1]=N),v===0&&(v=1);var O=1/v;isFinite(p)||(p=1),f.vectorScale=p;var P=n.coneSize||(y?1:.5);n.absoluteConeSize&&(P=n.absoluteConeSize*O),f.coneScale=P;for(var m=0,U=0;m=1},l.isTransparent=function(){return this.opacity<1},l.pickSlots=1,l.setPickBase=function(b){this.pickId=b};function _(b){for(var p=v({colormap:b,nshades:256,format:"rgba"}),u=new Uint8Array(256*4),y=0;y<256;++y){for(var m=p[y],R=0;R<3;++R)u[4*y+R]=m[R];u[4*y+3]=m[3]*255}return f(u,[256,256,4],[4,0,1])}function w(b){for(var p=b.length,u=new Array(p),y=0;y0){var U=this.triShader;U.bind(),U.uniforms=z,this.triangleVAO.bind(),p.drawArrays(p.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}},l.drawPick=function(b){b=b||{};for(var p=this.gl,u=b.model||c,y=b.view||c,m=b.projection||c,R=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],L=0;L<3;++L)R[0][L]=Math.max(R[0][L],this.clipBounds[0][L]),R[1][L]=Math.min(R[1][L],this.clipBounds[1][L]);this._model=[].slice.call(u),this._view=[].slice.call(y),this._projection=[].slice.call(m),this._resolution=[p.drawingBufferWidth,p.drawingBufferHeight];var z={model:u,view:y,projection:m,clipBounds:R,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},F=this.pickShader;F.bind(),F.uniforms=z,this.triangleCount>0&&(this.triangleVAO.bind(),p.drawArrays(p.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind())},l.pick=function(b){if(!b||b.id!==this.pickId)return null;var p=b.value[0]+256*b.value[1]+65536*b.value[2],u=this.cells[p],y=this.positions[u[1]].slice(0,3),m={position:y,dataCoordinate:y,index:Math.floor(u[1]/48)};return this.traceType==="cone"?m.index=Math.floor(u[1]/48):this.traceType==="streamtube"&&(m.intensity=this.intensity[u[1]],m.velocity=this.vectors[u[1]].slice(0,3),m.divergence=this.vectors[u[1]][3],m.index=p),m},l.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.pickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleVectors.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleIds.dispose()};function A(b,p){var u=o(b,p.meshShader.vertex,p.meshShader.fragment,null,p.meshShader.attributes);return u.attributes.position.location=0,u.attributes.color.location=2,u.attributes.uv.location=3,u.attributes.vector.location=4,u}function M(b,p){var u=o(b,p.pickShader.vertex,p.pickShader.fragment,null,p.pickShader.attributes);return u.attributes.position.location=0,u.attributes.id.location=1,u.attributes.vector.location=4,u}function g(b,p,u){var y=u.shaders;arguments.length===1&&(p=b,b=p.gl);var m=A(b,y),R=M(b,y),L=i(b,f(new Uint8Array([255,255,255,255]),[1,1,4]));L.generateMipmap(),L.minFilter=b.LINEAR_MIPMAP_LINEAR,L.magFilter=b.LINEAR;var z=a(b),F=a(b),N=a(b),O=a(b),P=a(b),U=n(b,[{buffer:z,type:b.FLOAT,size:4},{buffer:P,type:b.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:N,type:b.FLOAT,size:4},{buffer:O,type:b.FLOAT,size:2},{buffer:F,type:b.FLOAT,size:4}]),B=new T(b,L,m,R,z,F,P,N,O,U,u.traceType||"cone");return B.update(p),B}e.exports=g},614:function(e,t,r){var o=r(3236),a=o([`precision highp float; precision highp float; #define GLSLIFY 1 vec3 getOrthogonalVector(vec3 v) { // Return up-vector for only-z vector. // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0). // From the above if-statement we have ||a|| > 0 U ||b|| > 0. // Assign z = 0, x = -b, y = a: // a*-b + b*a + c*0 = -ba + ba + 0 = 0 if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) { return normalize(vec3(-v.y, v.x, 0.0)); } else { return normalize(vec3(0.0, v.z, -v.y)); } } // Calculate the cone vertex and normal at the given index. // // The returned vertex is for a cone with its top at origin and height of 1.0, // pointing in the direction of the vector attribute. // // Each cone is made up of a top vertex, a center base vertex and base perimeter vertices. // These vertices are used to make up the triangles of the cone by the following: // segment + 0 top vertex // segment + 1 perimeter vertex a+1 // segment + 2 perimeter vertex a // segment + 3 center base vertex // segment + 4 perimeter vertex a // segment + 5 perimeter vertex a+1 // Where segment is the number of the radial segment * 6 and a is the angle at that radial segment. // To go from index to segment, floor(index / 6) // To go from segment to angle, 2*pi * (segment/segmentCount) // To go from index to segment index, index - (segment*6) // vec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) { const float segmentCount = 8.0; float index = rawIndex - floor(rawIndex / (segmentCount * 6.0)) * (segmentCount * 6.0); float segment = floor(0.001 + index/6.0); float segmentIndex = index - (segment*6.0); normal = -normalize(d); if (segmentIndex > 2.99 && segmentIndex < 3.01) { return mix(vec3(0.0), -d, coneOffset); } float nextAngle = ( (segmentIndex > 0.99 && segmentIndex < 1.01) || (segmentIndex > 4.99 && segmentIndex < 5.01) ) ? 1.0 : 0.0; float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount); vec3 v1 = mix(d, vec3(0.0), coneOffset); vec3 v2 = v1 - d; vec3 u = getOrthogonalVector(d); vec3 v = normalize(cross(u, d)); vec3 x = u * cos(angle) * length(d)*0.25; vec3 y = v * sin(angle) * length(d)*0.25; vec3 v3 = v2 + x + y; if (segmentIndex < 3.0) { vec3 tx = u * sin(angle); vec3 ty = v * -cos(angle); vec3 tangent = tx + ty; normal = normalize(cross(v3 - v1, tangent)); } if (segmentIndex == 0.0) { return mix(d, vec3(0.0), coneOffset); } return v3; } attribute vec3 vector; attribute vec4 color, position; attribute vec2 uv; uniform float vectorScale, coneScale, coneOffset; uniform mat4 model, view, projection, inverseModel; uniform vec3 eyePosition, lightPosition; varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position; varying vec4 f_color; varying vec2 f_uv; void main() { // Scale the vector magnitude to stay constant with // model & view changes. vec3 normal; vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector), position.w, coneOffset, normal); vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0); //Lighting geometry parameters vec4 cameraCoordinate = view * conePosition; cameraCoordinate.xyz /= cameraCoordinate.w; f_lightDirection = lightPosition - cameraCoordinate.xyz; f_eyeDirection = eyePosition - cameraCoordinate.xyz; f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz); // vec4 m_position = model * vec4(conePosition, 1.0); vec4 t_position = view * conePosition; gl_Position = projection * t_position; f_color = color; f_data = conePosition.xyz; f_position = position.xyz; f_uv = uv; } `]),n=o([`#extension GL_OES_standard_derivatives : enable precision highp float; #define GLSLIFY 1 float beckmannDistribution(float x, float roughness) { float NdotH = max(x, 0.0001); float cos2Alpha = NdotH * NdotH; float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha; float roughness2 = roughness * roughness; float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha; return exp(tan2Alpha / roughness2) / denom; } float cookTorranceSpecular( vec3 lightDirection, vec3 viewDirection, vec3 surfaceNormal, float roughness, float fresnel) { float VdotN = max(dot(viewDirection, surfaceNormal), 0.0); float LdotN = max(dot(lightDirection, surfaceNormal), 0.0); //Half angle vector vec3 H = normalize(lightDirection + viewDirection); //Geometric term float NdotH = max(dot(surfaceNormal, H), 0.0); float VdotH = max(dot(viewDirection, H), 0.000001); float LdotH = max(dot(lightDirection, H), 0.000001); float G1 = (2.0 * NdotH * VdotN) / VdotH; float G2 = (2.0 * NdotH * LdotN) / LdotH; float G = min(1.0, min(G1, G2)); //Distribution term float D = beckmannDistribution(NdotH, roughness); //Fresnel term float F = pow(1.0 - VdotN, fresnel); //Multiply terms and done return G * F * D / max(3.14159265 * VdotN, 0.000001); } bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec3 clipBounds[2]; uniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity; uniform sampler2D texture; varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position; varying vec4 f_color; varying vec2 f_uv; void main() { if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; vec3 N = normalize(f_normal); vec3 L = normalize(f_lightDirection); vec3 V = normalize(f_eyeDirection); if(gl_FrontFacing) { N = -N; } float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel))); float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0); vec4 surfaceColor = f_color * texture2D(texture, f_uv); vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0); gl_FragColor = litColor * opacity; } `]),i=o([`precision highp float; precision highp float; #define GLSLIFY 1 vec3 getOrthogonalVector(vec3 v) { // Return up-vector for only-z vector. // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0). // From the above if-statement we have ||a|| > 0 U ||b|| > 0. // Assign z = 0, x = -b, y = a: // a*-b + b*a + c*0 = -ba + ba + 0 = 0 if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) { return normalize(vec3(-v.y, v.x, 0.0)); } else { return normalize(vec3(0.0, v.z, -v.y)); } } // Calculate the cone vertex and normal at the given index. // // The returned vertex is for a cone with its top at origin and height of 1.0, // pointing in the direction of the vector attribute. // // Each cone is made up of a top vertex, a center base vertex and base perimeter vertices. // These vertices are used to make up the triangles of the cone by the following: // segment + 0 top vertex // segment + 1 perimeter vertex a+1 // segment + 2 perimeter vertex a // segment + 3 center base vertex // segment + 4 perimeter vertex a // segment + 5 perimeter vertex a+1 // Where segment is the number of the radial segment * 6 and a is the angle at that radial segment. // To go from index to segment, floor(index / 6) // To go from segment to angle, 2*pi * (segment/segmentCount) // To go from index to segment index, index - (segment*6) // vec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) { const float segmentCount = 8.0; float index = rawIndex - floor(rawIndex / (segmentCount * 6.0)) * (segmentCount * 6.0); float segment = floor(0.001 + index/6.0); float segmentIndex = index - (segment*6.0); normal = -normalize(d); if (segmentIndex > 2.99 && segmentIndex < 3.01) { return mix(vec3(0.0), -d, coneOffset); } float nextAngle = ( (segmentIndex > 0.99 && segmentIndex < 1.01) || (segmentIndex > 4.99 && segmentIndex < 5.01) ) ? 1.0 : 0.0; float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount); vec3 v1 = mix(d, vec3(0.0), coneOffset); vec3 v2 = v1 - d; vec3 u = getOrthogonalVector(d); vec3 v = normalize(cross(u, d)); vec3 x = u * cos(angle) * length(d)*0.25; vec3 y = v * sin(angle) * length(d)*0.25; vec3 v3 = v2 + x + y; if (segmentIndex < 3.0) { vec3 tx = u * sin(angle); vec3 ty = v * -cos(angle); vec3 tangent = tx + ty; normal = normalize(cross(v3 - v1, tangent)); } if (segmentIndex == 0.0) { return mix(d, vec3(0.0), coneOffset); } return v3; } attribute vec4 vector; attribute vec4 position; attribute vec4 id; uniform mat4 model, view, projection; uniform float vectorScale, coneScale, coneOffset; varying vec3 f_position; varying vec4 f_id; void main() { vec3 normal; vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector.xyz), position.w, coneOffset, normal); vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0); gl_Position = projection * (view * conePosition); f_id = id; f_position = position.xyz; } `]),s=o([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec3 clipBounds[2]; uniform float pickId; varying vec3 f_position; varying vec4 f_id; void main() { if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; gl_FragColor = vec4(pickId, f_id.xyz); }`]);t.meshShader={vertex:a,fragment:n,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},t.pickShader={vertex:i,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}},737:function(e){e.exports={0:"NONE",1:"ONE",2:"LINE_LOOP",3:"LINE_STRIP",4:"TRIANGLES",5:"TRIANGLE_STRIP",6:"TRIANGLE_FAN",256:"DEPTH_BUFFER_BIT",512:"NEVER",513:"LESS",514:"EQUAL",515:"LEQUAL",516:"GREATER",517:"NOTEQUAL",518:"GEQUAL",519:"ALWAYS",768:"SRC_COLOR",769:"ONE_MINUS_SRC_COLOR",770:"SRC_ALPHA",771:"ONE_MINUS_SRC_ALPHA",772:"DST_ALPHA",773:"ONE_MINUS_DST_ALPHA",774:"DST_COLOR",775:"ONE_MINUS_DST_COLOR",776:"SRC_ALPHA_SATURATE",1024:"STENCIL_BUFFER_BIT",1028:"FRONT",1029:"BACK",1032:"FRONT_AND_BACK",1280:"INVALID_ENUM",1281:"INVALID_VALUE",1282:"INVALID_OPERATION",1285:"OUT_OF_MEMORY",1286:"INVALID_FRAMEBUFFER_OPERATION",2304:"CW",2305:"CCW",2849:"LINE_WIDTH",2884:"CULL_FACE",2885:"CULL_FACE_MODE",2886:"FRONT_FACE",2928:"DEPTH_RANGE",2929:"DEPTH_TEST",2930:"DEPTH_WRITEMASK",2931:"DEPTH_CLEAR_VALUE",2932:"DEPTH_FUNC",2960:"STENCIL_TEST",2961:"STENCIL_CLEAR_VALUE",2962:"STENCIL_FUNC",2963:"STENCIL_VALUE_MASK",2964:"STENCIL_FAIL",2965:"STENCIL_PASS_DEPTH_FAIL",2966:"STENCIL_PASS_DEPTH_PASS",2967:"STENCIL_REF",2968:"STENCIL_WRITEMASK",2978:"VIEWPORT",3024:"DITHER",3042:"BLEND",3088:"SCISSOR_BOX",3089:"SCISSOR_TEST",3106:"COLOR_CLEAR_VALUE",3107:"COLOR_WRITEMASK",3317:"UNPACK_ALIGNMENT",3333:"PACK_ALIGNMENT",3379:"MAX_TEXTURE_SIZE",3386:"MAX_VIEWPORT_DIMS",3408:"SUBPIXEL_BITS",3410:"RED_BITS",3411:"GREEN_BITS",3412:"BLUE_BITS",3413:"ALPHA_BITS",3414:"DEPTH_BITS",3415:"STENCIL_BITS",3553:"TEXTURE_2D",4352:"DONT_CARE",4353:"FASTEST",4354:"NICEST",5120:"BYTE",5121:"UNSIGNED_BYTE",5122:"SHORT",5123:"UNSIGNED_SHORT",5124:"INT",5125:"UNSIGNED_INT",5126:"FLOAT",5386:"INVERT",5890:"TEXTURE",6401:"STENCIL_INDEX",6402:"DEPTH_COMPONENT",6406:"ALPHA",6407:"RGB",6408:"RGBA",6409:"LUMINANCE",6410:"LUMINANCE_ALPHA",7680:"KEEP",7681:"REPLACE",7682:"INCR",7683:"DECR",7936:"VENDOR",7937:"RENDERER",7938:"VERSION",9728:"NEAREST",9729:"LINEAR",9984:"NEAREST_MIPMAP_NEAREST",9985:"LINEAR_MIPMAP_NEAREST",9986:"NEAREST_MIPMAP_LINEAR",9987:"LINEAR_MIPMAP_LINEAR",10240:"TEXTURE_MAG_FILTER",10241:"TEXTURE_MIN_FILTER",10242:"TEXTURE_WRAP_S",10243:"TEXTURE_WRAP_T",10497:"REPEAT",10752:"POLYGON_OFFSET_UNITS",16384:"COLOR_BUFFER_BIT",32769:"CONSTANT_COLOR",32770:"ONE_MINUS_CONSTANT_COLOR",32771:"CONSTANT_ALPHA",32772:"ONE_MINUS_CONSTANT_ALPHA",32773:"BLEND_COLOR",32774:"FUNC_ADD",32777:"BLEND_EQUATION_RGB",32778:"FUNC_SUBTRACT",32779:"FUNC_REVERSE_SUBTRACT",32819:"UNSIGNED_SHORT_4_4_4_4",32820:"UNSIGNED_SHORT_5_5_5_1",32823:"POLYGON_OFFSET_FILL",32824:"POLYGON_OFFSET_FACTOR",32854:"RGBA4",32855:"RGB5_A1",32873:"TEXTURE_BINDING_2D",32926:"SAMPLE_ALPHA_TO_COVERAGE",32928:"SAMPLE_COVERAGE",32936:"SAMPLE_BUFFERS",32937:"SAMPLES",32938:"SAMPLE_COVERAGE_VALUE",32939:"SAMPLE_COVERAGE_INVERT",32968:"BLEND_DST_RGB",32969:"BLEND_SRC_RGB",32970:"BLEND_DST_ALPHA",32971:"BLEND_SRC_ALPHA",33071:"CLAMP_TO_EDGE",33170:"GENERATE_MIPMAP_HINT",33189:"DEPTH_COMPONENT16",33306:"DEPTH_STENCIL_ATTACHMENT",33635:"UNSIGNED_SHORT_5_6_5",33648:"MIRRORED_REPEAT",33901:"ALIASED_POINT_SIZE_RANGE",33902:"ALIASED_LINE_WIDTH_RANGE",33984:"TEXTURE0",33985:"TEXTURE1",33986:"TEXTURE2",33987:"TEXTURE3",33988:"TEXTURE4",33989:"TEXTURE5",33990:"TEXTURE6",33991:"TEXTURE7",33992:"TEXTURE8",33993:"TEXTURE9",33994:"TEXTURE10",33995:"TEXTURE11",33996:"TEXTURE12",33997:"TEXTURE13",33998:"TEXTURE14",33999:"TEXTURE15",34e3:"TEXTURE16",34001:"TEXTURE17",34002:"TEXTURE18",34003:"TEXTURE19",34004:"TEXTURE20",34005:"TEXTURE21",34006:"TEXTURE22",34007:"TEXTURE23",34008:"TEXTURE24",34009:"TEXTURE25",34010:"TEXTURE26",34011:"TEXTURE27",34012:"TEXTURE28",34013:"TEXTURE29",34014:"TEXTURE30",34015:"TEXTURE31",34016:"ACTIVE_TEXTURE",34024:"MAX_RENDERBUFFER_SIZE",34041:"DEPTH_STENCIL",34055:"INCR_WRAP",34056:"DECR_WRAP",34067:"TEXTURE_CUBE_MAP",34068:"TEXTURE_BINDING_CUBE_MAP",34069:"TEXTURE_CUBE_MAP_POSITIVE_X",34070:"TEXTURE_CUBE_MAP_NEGATIVE_X",34071:"TEXTURE_CUBE_MAP_POSITIVE_Y",34072:"TEXTURE_CUBE_MAP_NEGATIVE_Y",34073:"TEXTURE_CUBE_MAP_POSITIVE_Z",34074:"TEXTURE_CUBE_MAP_NEGATIVE_Z",34076:"MAX_CUBE_MAP_TEXTURE_SIZE",34338:"VERTEX_ATTRIB_ARRAY_ENABLED",34339:"VERTEX_ATTRIB_ARRAY_SIZE",34340:"VERTEX_ATTRIB_ARRAY_STRIDE",34341:"VERTEX_ATTRIB_ARRAY_TYPE",34342:"CURRENT_VERTEX_ATTRIB",34373:"VERTEX_ATTRIB_ARRAY_POINTER",34466:"NUM_COMPRESSED_TEXTURE_FORMATS",34467:"COMPRESSED_TEXTURE_FORMATS",34660:"BUFFER_SIZE",34661:"BUFFER_USAGE",34816:"STENCIL_BACK_FUNC",34817:"STENCIL_BACK_FAIL",34818:"STENCIL_BACK_PASS_DEPTH_FAIL",34819:"STENCIL_BACK_PASS_DEPTH_PASS",34877:"BLEND_EQUATION_ALPHA",34921:"MAX_VERTEX_ATTRIBS",34922:"VERTEX_ATTRIB_ARRAY_NORMALIZED",34930:"MAX_TEXTURE_IMAGE_UNITS",34962:"ARRAY_BUFFER",34963:"ELEMENT_ARRAY_BUFFER",34964:"ARRAY_BUFFER_BINDING",34965:"ELEMENT_ARRAY_BUFFER_BINDING",34975:"VERTEX_ATTRIB_ARRAY_BUFFER_BINDING",35040:"STREAM_DRAW",35044:"STATIC_DRAW",35048:"DYNAMIC_DRAW",35632:"FRAGMENT_SHADER",35633:"VERTEX_SHADER",35660:"MAX_VERTEX_TEXTURE_IMAGE_UNITS",35661:"MAX_COMBINED_TEXTURE_IMAGE_UNITS",35663:"SHADER_TYPE",35664:"FLOAT_VEC2",35665:"FLOAT_VEC3",35666:"FLOAT_VEC4",35667:"INT_VEC2",35668:"INT_VEC3",35669:"INT_VEC4",35670:"BOOL",35671:"BOOL_VEC2",35672:"BOOL_VEC3",35673:"BOOL_VEC4",35674:"FLOAT_MAT2",35675:"FLOAT_MAT3",35676:"FLOAT_MAT4",35678:"SAMPLER_2D",35680:"SAMPLER_CUBE",35712:"DELETE_STATUS",35713:"COMPILE_STATUS",35714:"LINK_STATUS",35715:"VALIDATE_STATUS",35716:"INFO_LOG_LENGTH",35717:"ATTACHED_SHADERS",35718:"ACTIVE_UNIFORMS",35719:"ACTIVE_UNIFORM_MAX_LENGTH",35720:"SHADER_SOURCE_LENGTH",35721:"ACTIVE_ATTRIBUTES",35722:"ACTIVE_ATTRIBUTE_MAX_LENGTH",35724:"SHADING_LANGUAGE_VERSION",35725:"CURRENT_PROGRAM",36003:"STENCIL_BACK_REF",36004:"STENCIL_BACK_VALUE_MASK",36005:"STENCIL_BACK_WRITEMASK",36006:"FRAMEBUFFER_BINDING",36007:"RENDERBUFFER_BINDING",36048:"FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE",36049:"FRAMEBUFFER_ATTACHMENT_OBJECT_NAME",36050:"FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL",36051:"FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE",36053:"FRAMEBUFFER_COMPLETE",36054:"FRAMEBUFFER_INCOMPLETE_ATTACHMENT",36055:"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT",36057:"FRAMEBUFFER_INCOMPLETE_DIMENSIONS",36061:"FRAMEBUFFER_UNSUPPORTED",36064:"COLOR_ATTACHMENT0",36096:"DEPTH_ATTACHMENT",36128:"STENCIL_ATTACHMENT",36160:"FRAMEBUFFER",36161:"RENDERBUFFER",36162:"RENDERBUFFER_WIDTH",36163:"RENDERBUFFER_HEIGHT",36164:"RENDERBUFFER_INTERNAL_FORMAT",36168:"STENCIL_INDEX8",36176:"RENDERBUFFER_RED_SIZE",36177:"RENDERBUFFER_GREEN_SIZE",36178:"RENDERBUFFER_BLUE_SIZE",36179:"RENDERBUFFER_ALPHA_SIZE",36180:"RENDERBUFFER_DEPTH_SIZE",36181:"RENDERBUFFER_STENCIL_SIZE",36194:"RGB565",36336:"LOW_FLOAT",36337:"MEDIUM_FLOAT",36338:"HIGH_FLOAT",36339:"LOW_INT",36340:"MEDIUM_INT",36341:"HIGH_INT",36346:"SHADER_COMPILER",36347:"MAX_VERTEX_UNIFORM_VECTORS",36348:"MAX_VARYING_VECTORS",36349:"MAX_FRAGMENT_UNIFORM_VECTORS",37440:"UNPACK_FLIP_Y_WEBGL",37441:"UNPACK_PREMULTIPLY_ALPHA_WEBGL",37442:"CONTEXT_LOST_WEBGL",37443:"UNPACK_COLORSPACE_CONVERSION_WEBGL",37444:"BROWSER_DEFAULT_WEBGL"}},5171:function(e,t,r){var o=r(737);e.exports=function(n){return o[n]}},9165:function(e,t,r){"use strict";e.exports=T;var o=r(2762),a=r(8116),n=r(3436),i=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function s(l,_,w,A){this.gl=l,this.shader=A,this.buffer=_,this.vao=w,this.pixelRatio=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lineWidth=[1,1,1],this.capSize=[10,10,10],this.lineCount=[0,0,0],this.lineOffset=[0,0,0],this.opacity=1,this.hasAlpha=!1}var h=s.prototype;h.isOpaque=function(){return!this.hasAlpha},h.isTransparent=function(){return this.hasAlpha},h.drawTransparent=h.draw=function(l){var _=this.gl,w=this.shader.uniforms;this.shader.bind();var A=w.view=l.view||i,M=w.projection=l.projection||i;w.model=l.model||i,w.clipBounds=this.clipBounds,w.opacity=this.opacity;var g=A[12],b=A[13],p=A[14],u=A[15],y=l._ortho||!1,m=y?2:1,R=m*this.pixelRatio*(M[3]*g+M[7]*b+M[11]*p+M[15]*u)/_.drawingBufferHeight;this.vao.bind();for(var L=0;L<3;++L)_.lineWidth(this.lineWidth[L]*this.pixelRatio),w.capSize=this.capSize[L]*R,this.lineCount[L]&&_.drawArrays(_.LINES,this.lineOffset[L],this.lineCount[L]);this.vao.unbind()};function f(l,_){for(var w=0;w<3;++w)l[0][w]=Math.min(l[0][w],_[w]),l[1][w]=Math.max(l[1][w],_[w])}var v=function(){for(var l=new Array(3),_=0;_<3;++_){for(var w=[],A=1;A<=2;++A)for(var M=-1;M<=1;M+=2){var g=(A+_)%3,b=[0,0,0];b[g]=M,w.push(b)}l[_]=w}return l}();function c(l,_,w,A){for(var M=v[A],g=0;g0){var z=y.slice();z[p]+=R[1][p],M.push(y[0],y[1],y[2],L[0],L[1],L[2],L[3],0,0,0,z[0],z[1],z[2],L[0],L[1],L[2],L[3],0,0,0),f(this.bounds,z),b+=2+c(M,z,L,p)}}}this.lineCount[p]=b-this.lineOffset[p]}this.buffer.update(M)}},h.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()};function T(l){var _=l.gl,w=o(_),A=a(_,[{buffer:w,type:_.FLOAT,size:3,offset:0,stride:40},{buffer:w,type:_.FLOAT,size:4,offset:12,stride:40},{buffer:w,type:_.FLOAT,size:3,offset:28,stride:40}]),M=n(_);M.attributes.position.location=0,M.attributes.color.location=1,M.attributes.offset.location=2;var g=new s(_,w,A,M);return g.update(l),g}},3436:function(e,t,r){"use strict";var o=r(3236),a=r(9405),n=o([`precision highp float; #define GLSLIFY 1 attribute vec3 position, offset; attribute vec4 color; uniform mat4 model, view, projection; uniform float capSize; varying vec4 fragColor; varying vec3 fragPosition; void main() { vec4 worldPosition = model * vec4(position, 1.0); worldPosition = (worldPosition / worldPosition.w) + vec4(capSize * offset, 0.0); gl_Position = projection * (view * worldPosition); fragColor = color; fragPosition = position; }`]),i=o([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec3 clipBounds[2]; uniform float opacity; varying vec3 fragPosition; varying vec4 fragColor; void main() { if ( outOfRange(clipBounds[0], clipBounds[1], fragPosition) || fragColor.a * opacity == 0. ) discard; gl_FragColor = opacity * fragColor; }`]);e.exports=function(s){return a(s,n,i,null,[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"offset",type:"vec3"}])}},2260:function(e,t,r){"use strict";var o=r(7766);e.exports=b;var a=null,n,i,s,h;function f(p){var u=p.getParameter(p.FRAMEBUFFER_BINDING),y=p.getParameter(p.RENDERBUFFER_BINDING),m=p.getParameter(p.TEXTURE_BINDING_2D);return[u,y,m]}function v(p,u){p.bindFramebuffer(p.FRAMEBUFFER,u[0]),p.bindRenderbuffer(p.RENDERBUFFER,u[1]),p.bindTexture(p.TEXTURE_2D,u[2])}function c(p,u){var y=p.getParameter(u.MAX_COLOR_ATTACHMENTS_WEBGL);a=new Array(y+1);for(var m=0;m<=y;++m){for(var R=new Array(y),L=0;L1&&F.drawBuffersWEBGL(a[z]);var B=y.getExtension("WEBGL_depth_texture");B?N?p.depth=l(y,R,L,B.UNSIGNED_INT_24_8_WEBGL,y.DEPTH_STENCIL,y.DEPTH_STENCIL_ATTACHMENT):O&&(p.depth=l(y,R,L,y.UNSIGNED_SHORT,y.DEPTH_COMPONENT,y.DEPTH_ATTACHMENT)):O&&N?p._depth_rb=_(y,R,L,y.DEPTH_STENCIL,y.DEPTH_STENCIL_ATTACHMENT):O?p._depth_rb=_(y,R,L,y.DEPTH_COMPONENT16,y.DEPTH_ATTACHMENT):N&&(p._depth_rb=_(y,R,L,y.STENCIL_INDEX,y.STENCIL_ATTACHMENT));var X=y.checkFramebufferStatus(y.FRAMEBUFFER);if(X!==y.FRAMEBUFFER_COMPLETE){p._destroyed=!0,y.bindFramebuffer(y.FRAMEBUFFER,null),y.deleteFramebuffer(p.handle),p.handle=null,p.depth&&(p.depth.dispose(),p.depth=null),p._depth_rb&&(y.deleteRenderbuffer(p._depth_rb),p._depth_rb=null);for(var U=0;UR||y<0||y>R)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");p._shape[0]=u,p._shape[1]=y;for(var L=f(m),z=0;zL||y<0||y>L)throw new Error("gl-fbo: Parameters are too large for FBO");m=m||{};var z=1;if("color"in m){if(z=Math.max(m.color|0,0),z<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(z>1)if(R){if(z>p.getParameter(R.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+z+" draw buffers")}else throw new Error("gl-fbo: Multiple draw buffer extension not supported")}var F=p.UNSIGNED_BYTE,N=p.getExtension("OES_texture_float");if(m.float&&z>0){if(!N)throw new Error("gl-fbo: Context does not support floating point textures");F=p.FLOAT}else m.preferFloat&&z>0&&N&&(F=p.FLOAT);var O=!0;"depth"in m&&(O=!!m.depth);var P=!1;return"stencil"in m&&(P=!!m.stencil),new A(p,u,y,F,z,O,P,R)}},2992:function(e,t,r){var o=r(3387).sprintf,a=r(5171),n=r(1848),i=r(1085);e.exports=s;function s(h,f,v){"use strict";var c=n(f)||"of unknown name (see npm glsl-shader-name)",T="unknown type";v!==void 0&&(T=v===a.FRAGMENT_SHADER?"fragment":"vertex");for(var l=o(`Error compiling %s shader %s: `,T,c),_=o("%s%s",l,h),w=h.split(` `),A={},M=0;M max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec3 clipBounds[2]; uniform sampler2D dashTexture; uniform float dashScale; uniform float opacity; varying vec3 worldPosition; varying float pixelArcLength; varying vec4 fragColor; void main() { if ( outOfRange(clipBounds[0], clipBounds[1], worldPosition) || fragColor.a * opacity == 0. ) discard; float dashWeight = texture2D(dashTexture, vec2(dashScale * pixelArcLength, 0)).r; if(dashWeight < 0.5) { discard; } gl_FragColor = fragColor * opacity; } `]),s=o([`precision highp float; #define GLSLIFY 1 #define FLOAT_MAX 1.70141184e38 #define FLOAT_MIN 1.17549435e-38 // https://github.com/mikolalysenko/glsl-read-float/blob/master/index.glsl vec4 packFloat(float v) { float av = abs(v); //Handle special cases if(av < FLOAT_MIN) { return vec4(0.0, 0.0, 0.0, 0.0); } else if(v > FLOAT_MAX) { return vec4(127.0, 128.0, 0.0, 0.0) / 255.0; } else if(v < -FLOAT_MAX) { return vec4(255.0, 128.0, 0.0, 0.0) / 255.0; } vec4 c = vec4(0,0,0,0); //Compute exponent and mantissa float e = floor(log2(av)); float m = av * pow(2.0, -e) - 1.0; //Unpack mantissa c[1] = floor(128.0 * m); m -= c[1] / 128.0; c[2] = floor(32768.0 * m); m -= c[2] / 32768.0; c[3] = floor(8388608.0 * m); //Unpack exponent float ebias = e + 127.0; c[0] = floor(ebias / 2.0); ebias -= c[0] * 2.0; c[1] += floor(ebias) * 128.0; //Unpack sign bit c[0] += 128.0 * step(0.0, -v); //Scale back to range return c / 255.0; } bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform float pickId; uniform vec3 clipBounds[2]; varying vec3 worldPosition; varying float pixelArcLength; varying vec4 fragColor; void main() { if (outOfRange(clipBounds[0], clipBounds[1], worldPosition)) discard; gl_FragColor = vec4(pickId/255.0, packFloat(pixelArcLength).xyz); }`]),h=[{name:"position",type:"vec3"},{name:"nextPosition",type:"vec3"},{name:"arcLength",type:"float"},{name:"lineWidth",type:"float"},{name:"color",type:"vec4"}];t.createShader=function(f){return a(f,n,i,null,h)},t.createPickShader=function(f){return a(f,n,s,null,h)}},5714:function(e,t,r){"use strict";e.exports=p;var o=r(2762),a=r(8116),n=r(7766),i=new Uint8Array(4),s=new Float32Array(i.buffer);function h(u,y,m,R){return i[0]=R,i[1]=m,i[2]=y,i[3]=u,s[0]}var f=r(2478),v=r(9618),c=r(7319),T=c.createShader,l=c.createPickShader,_=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function w(u,y){for(var m=0,R=0;R<3;++R){var L=u[R]-y[R];m+=L*L}return Math.sqrt(m)}function A(u){for(var y=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],m=0;m<3;++m)y[0][m]=Math.max(u[0][m],y[0][m]),y[1][m]=Math.min(u[1][m],y[1][m]);return y}function M(u,y,m,R){this.arcLength=u,this.position=y,this.index=m,this.dataCoordinate=R}function g(u,y,m,R,L,z){this.gl=u,this.shader=y,this.pickShader=m,this.buffer=R,this.vao=L,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.points=[],this.arcLength=[],this.vertexCount=0,this.bounds=[[0,0,0],[0,0,0]],this.pickId=0,this.lineWidth=1,this.texture=z,this.dashScale=1,this.opacity=1,this.hasAlpha=!1,this.dirty=!0,this.pixelRatio=1}var b=g.prototype;b.isTransparent=function(){return this.hasAlpha},b.isOpaque=function(){return!this.hasAlpha},b.pickSlots=1,b.setPickBase=function(u){this.pickId=u},b.drawTransparent=b.draw=function(u){if(this.vertexCount){var y=this.gl,m=this.shader,R=this.vao;m.bind(),m.uniforms={model:u.model||_,view:u.view||_,projection:u.projection||_,clipBounds:A(this.clipBounds),dashTexture:this.texture.bind(),dashScale:this.dashScale/this.arcLength[this.arcLength.length-1],opacity:this.opacity,screenShape:[y.drawingBufferWidth,y.drawingBufferHeight],pixelRatio:this.pixelRatio},R.bind(),R.draw(y.TRIANGLE_STRIP,this.vertexCount),R.unbind()}},b.drawPick=function(u){if(this.vertexCount){var y=this.gl,m=this.pickShader,R=this.vao;m.bind(),m.uniforms={model:u.model||_,view:u.view||_,projection:u.projection||_,pickId:this.pickId,clipBounds:A(this.clipBounds),screenShape:[y.drawingBufferWidth,y.drawingBufferHeight],pixelRatio:this.pixelRatio},R.bind(),R.draw(y.TRIANGLE_STRIP,this.vertexCount),R.unbind()}},b.update=function(u){var y,m;this.dirty=!0;var R=!!u.connectGaps;"dashScale"in u&&(this.dashScale=u.dashScale),this.hasAlpha=!1,"opacity"in u&&(this.opacity=+u.opacity,this.opacity<1&&(this.hasAlpha=!0));var L=[],z=[],F=[],N=0,O=0,P=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],U=u.position||u.positions;if(U){var B=u.color||u.colors||[0,0,0,1],X=u.lineWidth||1,$=!1;e:for(y=1;y0){for(var de=0;de<24;++de)L.push(L[L.length-12]);O+=2,$=!0}continue e}P[0][m]=Math.min(P[0][m],le[m],ce[m]),P[1][m]=Math.max(P[1][m],le[m],ce[m])}var G,Y;Array.isArray(B[0])?(G=B.length>y-1?B[y-1]:B.length>0?B[B.length-1]:[0,0,0,1],Y=B.length>y?B[y]:B.length>0?B[B.length-1]:[0,0,0,1]):G=Y=B,G.length===3&&(G=[G[0],G[1],G[2],1]),Y.length===3&&(Y=[Y[0],Y[1],Y[2],1]),!this.hasAlpha&&G[3]<1&&(this.hasAlpha=!0);var ee;Array.isArray(X)?ee=X.length>y-1?X[y-1]:X.length>0?X[X.length-1]:[0,0,0,1]:ee=X;var q=N;if(N+=w(le,ce),$){for(m=0;m<2;++m)L.push(le[0],le[1],le[2],ce[0],ce[1],ce[2],q,ee,G[0],G[1],G[2],G[3]);O+=2,$=!1}L.push(le[0],le[1],le[2],ce[0],ce[1],ce[2],q,ee,G[0],G[1],G[2],G[3],le[0],le[1],le[2],ce[0],ce[1],ce[2],q,-ee,G[0],G[1],G[2],G[3],ce[0],ce[1],ce[2],le[0],le[1],le[2],N,-ee,Y[0],Y[1],Y[2],Y[3],ce[0],ce[1],ce[2],le[0],le[1],le[2],N,ee,Y[0],Y[1],Y[2],Y[3]),O+=4}}if(this.buffer.update(L),z.push(N),F.push(U[U.length-1].slice()),this.bounds=P,this.vertexCount=O,this.points=F,this.arcLength=z,"dashes"in u){var se=u.dashes,ae=se.slice();for(ae.unshift(0),y=1;y1.0001)return null;m+=y[M]}return Math.abs(m-1)>.001?null:[g,h(v,y),y]}},840:function(e,t,r){var o=r(3236),a=o([`precision highp float; #define GLSLIFY 1 attribute vec3 position, normal; attribute vec4 color; attribute vec2 uv; uniform mat4 model , view , projection , inverseModel; uniform vec3 eyePosition , lightPosition; varying vec3 f_normal , f_lightDirection , f_eyeDirection , f_data; varying vec4 f_color; varying vec2 f_uv; vec4 project(vec3 p) { return projection * (view * (model * vec4(p, 1.0))); } void main() { gl_Position = project(position); //Lighting geometry parameters vec4 cameraCoordinate = view * vec4(position , 1.0); cameraCoordinate.xyz /= cameraCoordinate.w; f_lightDirection = lightPosition - cameraCoordinate.xyz; f_eyeDirection = eyePosition - cameraCoordinate.xyz; f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz); f_color = color; f_data = position; f_uv = uv; } `]),n=o([`#extension GL_OES_standard_derivatives : enable precision highp float; #define GLSLIFY 1 float beckmannDistribution(float x, float roughness) { float NdotH = max(x, 0.0001); float cos2Alpha = NdotH * NdotH; float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha; float roughness2 = roughness * roughness; float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha; return exp(tan2Alpha / roughness2) / denom; } float cookTorranceSpecular( vec3 lightDirection, vec3 viewDirection, vec3 surfaceNormal, float roughness, float fresnel) { float VdotN = max(dot(viewDirection, surfaceNormal), 0.0); float LdotN = max(dot(lightDirection, surfaceNormal), 0.0); //Half angle vector vec3 H = normalize(lightDirection + viewDirection); //Geometric term float NdotH = max(dot(surfaceNormal, H), 0.0); float VdotH = max(dot(viewDirection, H), 0.000001); float LdotH = max(dot(lightDirection, H), 0.000001); float G1 = (2.0 * NdotH * VdotN) / VdotH; float G2 = (2.0 * NdotH * LdotN) / LdotH; float G = min(1.0, min(G1, G2)); //Distribution term float D = beckmannDistribution(NdotH, roughness); //Fresnel term float F = pow(1.0 - VdotN, fresnel); //Multiply terms and done return G * F * D / max(3.14159265 * VdotN, 0.000001); } //#pragma glslify: beckmann = require(glsl-specular-beckmann) // used in gl-surface3d bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec3 clipBounds[2]; uniform float roughness , fresnel , kambient , kdiffuse , kspecular; uniform sampler2D texture; varying vec3 f_normal , f_lightDirection , f_eyeDirection , f_data; varying vec4 f_color; varying vec2 f_uv; void main() { if (f_color.a == 0.0 || outOfRange(clipBounds[0], clipBounds[1], f_data) ) discard; vec3 N = normalize(f_normal); vec3 L = normalize(f_lightDirection); vec3 V = normalize(f_eyeDirection); if(gl_FrontFacing) { N = -N; } float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel))); //float specular = max(0.0, beckmann(L, V, N, roughness)); // used in gl-surface3d float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0); vec4 surfaceColor = vec4(f_color.rgb, 1.0) * texture2D(texture, f_uv); vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0); gl_FragColor = litColor * f_color.a; } `]),i=o([`precision highp float; #define GLSLIFY 1 attribute vec3 position; attribute vec4 color; attribute vec2 uv; uniform mat4 model, view, projection; varying vec4 f_color; varying vec3 f_data; varying vec2 f_uv; void main() { gl_Position = projection * (view * (model * vec4(position, 1.0))); f_color = color; f_data = position; f_uv = uv; }`]),s=o([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec3 clipBounds[2]; uniform sampler2D texture; uniform float opacity; varying vec4 f_color; varying vec3 f_data; varying vec2 f_uv; void main() { if (outOfRange(clipBounds[0], clipBounds[1], f_data)) discard; gl_FragColor = f_color * texture2D(texture, f_uv) * opacity; }`]),h=o([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } attribute vec3 position; attribute vec4 color; attribute vec2 uv; attribute float pointSize; uniform mat4 model, view, projection; uniform vec3 clipBounds[2]; varying vec4 f_color; varying vec2 f_uv; void main() { if (outOfRange(clipBounds[0], clipBounds[1], position)) { gl_Position = vec4(0.0, 0.0 ,0.0 ,0.0); } else { gl_Position = projection * (view * (model * vec4(position, 1.0))); } gl_PointSize = pointSize; f_color = color; f_uv = uv; }`]),f=o([`precision highp float; #define GLSLIFY 1 uniform sampler2D texture; uniform float opacity; varying vec4 f_color; varying vec2 f_uv; void main() { vec2 pointR = gl_PointCoord.xy - vec2(0.5, 0.5); if(dot(pointR, pointR) > 0.25) { discard; } gl_FragColor = f_color * texture2D(texture, f_uv) * opacity; }`]),v=o([`precision highp float; #define GLSLIFY 1 attribute vec3 position; attribute vec4 id; uniform mat4 model, view, projection; varying vec3 f_position; varying vec4 f_id; void main() { gl_Position = projection * (view * (model * vec4(position, 1.0))); f_id = id; f_position = position; }`]),c=o([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec3 clipBounds[2]; uniform float pickId; varying vec3 f_position; varying vec4 f_id; void main() { if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; gl_FragColor = vec4(pickId, f_id.xyz); }`]),T=o([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } attribute vec3 position; attribute float pointSize; attribute vec4 id; uniform mat4 model, view, projection; uniform vec3 clipBounds[2]; varying vec3 f_position; varying vec4 f_id; void main() { if (outOfRange(clipBounds[0], clipBounds[1], position)) { gl_Position = vec4(0.0, 0.0, 0.0, 0.0); } else { gl_Position = projection * (view * (model * vec4(position, 1.0))); gl_PointSize = pointSize; } f_id = id; f_position = position; }`]),l=o([`precision highp float; #define GLSLIFY 1 attribute vec3 position; uniform mat4 model, view, projection; void main() { gl_Position = projection * (view * (model * vec4(position, 1.0))); }`]),_=o([`precision highp float; #define GLSLIFY 1 uniform vec3 contourColor; void main() { gl_FragColor = vec4(contourColor, 1.0); } `]);t.meshShader={vertex:a,fragment:n,attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},t.wireShader={vertex:i,fragment:s,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},t.pointShader={vertex:h,fragment:f,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},t.pickShader={vertex:v,fragment:c,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},t.pointPickShader={vertex:T,fragment:c,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},t.contourShader={vertex:l,fragment:_,attributes:[{name:"position",type:"vec3"}]}},7201:function(e,t,r){"use strict";var o=1e-6,a=1e-6,n=r(9405),i=r(2762),s=r(8116),h=r(7766),f=r(8406),v=r(6760),c=r(7608),T=r(9618),l=r(6729),_=r(7765),w=r(1888),A=r(840),M=r(7626),g=A.meshShader,b=A.wireShader,p=A.pointShader,u=A.pickShader,y=A.pointPickShader,m=A.contourShader,R=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function L(de,G,Y,ee,q,se,ae,j,Q,re,pe,we,Se,Ie,Re,We,at,nt,tt,qe,he,ue,ne,Ce,Ye,rt,Ke){this.gl=de,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=G,this.dirty=!0,this.triShader=Y,this.lineShader=ee,this.pointShader=q,this.pickShader=se,this.pointPickShader=ae,this.contourShader=j,this.trianglePositions=Q,this.triangleColors=pe,this.triangleNormals=Se,this.triangleUVs=we,this.triangleIds=re,this.triangleVAO=Ie,this.triangleCount=0,this.lineWidth=1,this.edgePositions=Re,this.edgeColors=at,this.edgeUVs=nt,this.edgeIds=We,this.edgeVAO=tt,this.edgeCount=0,this.pointPositions=qe,this.pointColors=ue,this.pointUVs=ne,this.pointSizes=Ce,this.pointIds=he,this.pointVAO=Ye,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=rt,this.contourVAO=Ke,this.contourCount=0,this.contourColor=[0,0,0],this.contourEnable=!0,this.pickVertex=!0,this.pickId=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lightPosition=[1e5,1e5,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.opacity=1,this.hasAlpha=!1,this.opacityscale=!1,this._model=R,this._view=R,this._projection=R,this._resolution=[1,1]}var z=L.prototype;z.isOpaque=function(){return!this.hasAlpha},z.isTransparent=function(){return this.hasAlpha},z.pickSlots=1,z.setPickBase=function(de){this.pickId=de};function F(de,G){if(!G||!G.length)return 1;for(var Y=0;Yde&&Y>0){var ee=(G[Y][0]-de)/(G[Y][0]-G[Y-1][0]);return G[Y][1]*(1-ee)+ee*G[Y-1][1]}}return 1}function N(de,G){for(var Y=l({colormap:de,nshades:256,format:"rgba"}),ee=new Uint8Array(256*4),q=0;q<256;++q){for(var se=Y[q],ae=0;ae<3;++ae)ee[4*q+ae]=se[ae];G?ee[4*q+3]=255*F(q/255,G):ee[4*q+3]=255*se[3]}return T(ee,[256,256,4],[4,0,1])}function O(de){for(var G=de.length,Y=new Array(G),ee=0;ee0){var Se=this.triShader;Se.bind(),Se.uniforms=j,this.triangleVAO.bind(),G.drawArrays(G.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}if(this.edgeCount>0&&this.lineWidth>0){var Se=this.lineShader;Se.bind(),Se.uniforms=j,this.edgeVAO.bind(),G.lineWidth(this.lineWidth*this.pixelRatio),G.drawArrays(G.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()}if(this.pointCount>0){var Se=this.pointShader;Se.bind(),Se.uniforms=j,this.pointVAO.bind(),G.drawArrays(G.POINTS,0,this.pointCount),this.pointVAO.unbind()}if(this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0){var Se=this.contourShader;Se.bind(),Se.uniforms=j,this.contourVAO.bind(),G.drawArrays(G.LINES,0,this.contourCount),this.contourVAO.unbind()}},z.drawPick=function(de){de=de||{};for(var G=this.gl,Y=de.model||R,ee=de.view||R,q=de.projection||R,se=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],ae=0;ae<3;++ae)se[0][ae]=Math.max(se[0][ae],this.clipBounds[0][ae]),se[1][ae]=Math.min(se[1][ae],this.clipBounds[1][ae]);this._model=[].slice.call(Y),this._view=[].slice.call(ee),this._projection=[].slice.call(q),this._resolution=[G.drawingBufferWidth,G.drawingBufferHeight];var j={model:Y,view:ee,projection:q,clipBounds:se,pickId:this.pickId/255},Q=this.pickShader;if(Q.bind(),Q.uniforms=j,this.triangleCount>0&&(this.triangleVAO.bind(),G.drawArrays(G.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),G.lineWidth(this.lineWidth*this.pixelRatio),G.drawArrays(G.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()),this.pointCount>0){var Q=this.pointPickShader;Q.bind(),Q.uniforms=j,this.pointVAO.bind(),G.drawArrays(G.POINTS,0,this.pointCount),this.pointVAO.unbind()}},z.pick=function(de){if(!de||de.id!==this.pickId)return null;for(var G=de.value[0]+256*de.value[1]+65536*de.value[2],Y=this.cells[G],ee=this.positions,q=new Array(Y.length),se=0;seMath.abs(u))l.rotate(R,0,0,-p*y*Math.PI*g.rotateSpeed/window.innerWidth);else if(!g._ortho){var L=-g.zoomSpeed*m*u/window.innerHeight*(R-l.lastT())/20;l.pan(R,0,0,w*(Math.exp(L)-1))}}},!0)},g.enableMouseListeners(),g}},799:function(e,t,r){var o=r(3236),a=r(9405),n=o([`precision mediump float; #define GLSLIFY 1 attribute vec2 position; varying vec2 uv; void main() { uv = position; gl_Position = vec4(position, 0, 1); }`]),i=o([`precision mediump float; #define GLSLIFY 1 uniform sampler2D accumBuffer; varying vec2 uv; void main() { vec4 accum = texture2D(accumBuffer, 0.5 * (uv + 1.0)); gl_FragColor = min(vec4(1,1,1,1), accum); }`]);e.exports=function(s){return a(s,n,i,null,[{name:"position",type:"vec2"}])}},4100:function(e,t,r){"use strict";var o=r(4437),a=r(3837),n=r(5445),i=r(4449),s=r(3589),h=r(2260),f=r(7169),v=r(351),c=r(4772),T=r(4040),l=r(799),_=r(9216)({tablet:!0,featureDetect:!0});e.exports={createScene:b,createCamera:o};function w(){this.mouse=[-1,-1],this.screen=null,this.distance=1/0,this.index=null,this.dataCoordinate=null,this.dataPosition=null,this.object=null,this.data=null}function A(u,y){var m=null;try{m=u.getContext("webgl",y),m||(m=u.getContext("experimental-webgl",y))}catch{return null}return m}function M(u){var y=Math.round(Math.log(Math.abs(u))/Math.log(10));if(y<0){var m=Math.round(Math.pow(10,-y));return Math.ceil(u*m)/m}else if(y>0){var m=Math.round(Math.pow(10,y));return Math.ceil(u/m)*m}return Math.ceil(u)}function g(u){return typeof u=="boolean"?u:!0}function b(u){u=u||{},u.camera=u.camera||{};var y=u.canvas;if(!y)if(y=document.createElement("canvas"),u.container){var m=u.container;m.appendChild(y)}else document.body.appendChild(y);var R=u.gl;if(R||(u.glOptions&&(_=!!u.glOptions.preserveDrawingBuffer),R=A(y,u.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:_})),!R)throw new Error("webgl not supported");var L=u.bounds||[[-10,-10,-10],[10,10,10]],z=new w,F=h(R,R.drawingBufferWidth,R.drawingBufferHeight,{preferFloat:!_}),N=l(R),O=u.cameraObject&&u.cameraObject._ortho===!0||u.camera.projection&&u.camera.projection.type==="orthographic"||!1,P={eye:u.camera.eye||[2,0,0],center:u.camera.center||[0,0,0],up:u.camera.up||[0,1,0],zoomMin:u.camera.zoomMax||.1,zoomMax:u.camera.zoomMin||100,mode:u.camera.mode||"turntable",_ortho:O},U=u.axes||{},B=a(R,U);B.enable=!U.disable;var X=u.spikes||{},$=i(R,X),le=[],ce=[],de=[],G=[],Y=!0,ae=!0,ee=new Array(16),q=new Array(16),se={view:null,projection:ee,model:q,_ortho:!1},ae=!0,j=[R.drawingBufferWidth,R.drawingBufferHeight],Q=u.cameraObject||o(y,P),re={gl:R,contextLost:!1,pixelRatio:u.pixelRatio||1,canvas:y,selection:z,camera:Q,axes:B,axesPixels:null,spikes:$,bounds:L,objects:le,shape:j,aspect:u.aspectRatio||[1,1,1],pickRadius:u.pickRadius||10,zNear:u.zNear||.01,zFar:u.zFar||1e3,fovy:u.fovy||Math.PI/4,clearColor:u.clearColor||[0,0,0,0],autoResize:g(u.autoResize),autoBounds:g(u.autoBounds),autoScale:!!u.autoScale,autoCenter:g(u.autoCenter),clipToBounds:g(u.clipToBounds),snapToData:!!u.snapToData,onselect:u.onselect||null,onrender:u.onrender||null,onclick:u.onclick||null,cameraParams:se,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(qe){this.aspect[0]=qe.x,this.aspect[1]=qe.y,this.aspect[2]=qe.z,ae=!0},setBounds:function(qe,he){this.bounds[0][qe]=he.min,this.bounds[1][qe]=he.max},setClearColor:function(qe){this.clearColor=qe},clearRGBA:function(){this.gl.clearColor(this.clearColor[0],this.clearColor[1],this.clearColor[2],this.clearColor[3]),this.gl.clear(this.gl.COLOR_BUFFER_BIT|this.gl.DEPTH_BUFFER_BIT)}},pe=[R.drawingBufferWidth/re.pixelRatio|0,R.drawingBufferHeight/re.pixelRatio|0];function we(){if(!re._stopped&&re.autoResize){var qe=y.parentNode,he=1,ue=1;qe&&qe!==document.body?(he=qe.clientWidth,ue=qe.clientHeight):(he=window.innerWidth,ue=window.innerHeight);var ne=Math.ceil(he*re.pixelRatio)|0,Ce=Math.ceil(ue*re.pixelRatio)|0;if(ne!==y.width||Ce!==y.height){y.width=ne,y.height=Ce;var Ye=y.style;Ye.position=Ye.position||"absolute",Ye.left="0px",Ye.top="0px",Ye.width=he+"px",Ye.height=ue+"px",Y=!0}}}re.autoResize&&we(),window.addEventListener("resize",we);function Se(){for(var qe=le.length,he=G.length,ue=0;ue0&&de[he-1]===0;)de.pop(),G.pop().dispose()}re.update=function(qe){re._stopped||(qe=qe||{},Y=!0,ae=!0)},re.add=function(qe){re._stopped||(qe.axes=B,le.push(qe),ce.push(-1),Y=!0,ae=!0,Se())},re.remove=function(qe){if(!re._stopped){var he=le.indexOf(qe);he<0||(le.splice(he,1),ce.pop(),Y=!0,ae=!0,Se())}},re.dispose=function(){if(!re._stopped&&(re._stopped=!0,window.removeEventListener("resize",we),y.removeEventListener("webglcontextlost",Ie),re.mouseListener.enabled=!1,!re.contextLost)){B.dispose(),$.dispose();for(var qe=0;qez.distance)continue;for(var kt=0;kt1e-6?(_=Math.acos(w),A=Math.sin(_),M=Math.sin((1-n)*_)/A,g=Math.sin(n*_)/A):(M=1-n,g=n),r[0]=M*i+g*v,r[1]=M*s+g*c,r[2]=M*h+g*T,r[3]=M*f+g*l,r}},5964:function(e){"use strict";e.exports=function(t){return!t&&t!==0?"":t.toString()}},9366:function(e,t,r){"use strict";var o=r(4359);e.exports=n;var a={};function n(i,s,h){var f=[s.style,s.weight,s.variant,s.family].join("_"),v=a[f];if(v||(v=a[f]={}),i in v)return v[i];var c={textAlign:"center",textBaseline:"middle",lineHeight:1,font:s.family,fontStyle:s.style,fontWeight:s.weight,fontVariant:s.variant,lineSpacing:1.25,styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0}};c.triangles=!0;var T=o(i,c);c.triangles=!1;var l=o(i,c),_,w;if(h&&h!==1){for(_=0;_ max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } attribute vec3 position; attribute vec4 color; attribute vec2 glyph; attribute vec4 id; uniform vec4 highlightId; uniform float highlightScale; uniform mat4 model, view, projection; uniform vec3 clipBounds[2]; varying vec4 interpColor; varying vec4 pickId; varying vec3 dataCoordinate; void main() { if (outOfRange(clipBounds[0], clipBounds[1], position)) { gl_Position = vec4(0,0,0,0); } else { float scale = 1.0; if(distance(highlightId, id) < 0.0001) { scale = highlightScale; } vec4 worldPosition = model * vec4(position, 1); vec4 viewPosition = view * worldPosition; viewPosition = viewPosition / viewPosition.w; vec4 clipPosition = projection * (viewPosition + scale * vec4(glyph.x, -glyph.y, 0, 0)); gl_Position = clipPosition; interpColor = color; pickId = id; dataCoordinate = position; } }`]),i=a([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } attribute vec3 position; attribute vec4 color; attribute vec2 glyph; attribute vec4 id; uniform mat4 model, view, projection; uniform vec2 screenSize; uniform vec3 clipBounds[2]; uniform float highlightScale, pixelRatio; uniform vec4 highlightId; varying vec4 interpColor; varying vec4 pickId; varying vec3 dataCoordinate; void main() { if (outOfRange(clipBounds[0], clipBounds[1], position)) { gl_Position = vec4(0,0,0,0); } else { float scale = pixelRatio; if(distance(highlightId.bgr, id.bgr) < 0.001) { scale *= highlightScale; } vec4 worldPosition = model * vec4(position, 1.0); vec4 viewPosition = view * worldPosition; vec4 clipPosition = projection * viewPosition; clipPosition /= clipPosition.w; gl_Position = clipPosition + vec4(screenSize * scale * vec2(glyph.x, -glyph.y), 0.0, 0.0); interpColor = color; pickId = id; dataCoordinate = position; } }`]),s=a([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } attribute vec3 position; attribute vec4 color; attribute vec2 glyph; attribute vec4 id; uniform float highlightScale; uniform vec4 highlightId; uniform vec3 axes[2]; uniform mat4 model, view, projection; uniform vec2 screenSize; uniform vec3 clipBounds[2]; uniform float scale, pixelRatio; varying vec4 interpColor; varying vec4 pickId; varying vec3 dataCoordinate; void main() { if (outOfRange(clipBounds[0], clipBounds[1], position)) { gl_Position = vec4(0,0,0,0); } else { float lscale = pixelRatio * scale; if(distance(highlightId, id) < 0.0001) { lscale *= highlightScale; } vec4 clipCenter = projection * (view * (model * vec4(position, 1))); vec3 dataPosition = position + 0.5*lscale*(axes[0] * glyph.x + axes[1] * glyph.y) * clipCenter.w * screenSize.y; vec4 clipPosition = projection * (view * (model * vec4(dataPosition, 1))); gl_Position = clipPosition; interpColor = color; pickId = id; dataCoordinate = dataPosition; } } `]),h=a([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec3 fragClipBounds[2]; uniform float opacity; varying vec4 interpColor; varying vec3 dataCoordinate; void main() { if ( outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate) || interpColor.a * opacity == 0. ) discard; gl_FragColor = interpColor * opacity; } `]),f=a([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec3 fragClipBounds[2]; uniform float pickGroup; varying vec4 pickId; varying vec3 dataCoordinate; void main() { if (outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate)) discard; gl_FragColor = vec4(pickGroup, pickId.bgr); }`]),v=[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"glyph",type:"vec2"},{name:"id",type:"vec4"}],c={vertex:n,fragment:h,attributes:v},T={vertex:i,fragment:h,attributes:v},l={vertex:s,fragment:h,attributes:v},_={vertex:n,fragment:f,attributes:v},w={vertex:i,fragment:f,attributes:v},A={vertex:s,fragment:f,attributes:v};function M(g,b){var p=o(g,b),u=p.attributes;return u.position.location=0,u.color.location=1,u.glyph.location=2,u.id.location=3,p}t.createPerspective=function(g){return M(g,c)},t.createOrtho=function(g){return M(g,T)},t.createProject=function(g){return M(g,l)},t.createPickPerspective=function(g){return M(g,_)},t.createPickOrtho=function(g){return M(g,w)},t.createPickProject=function(g){return M(g,A)}},8418:function(e,t,r){"use strict";var o=r(5219),a=r(2762),n=r(8116),i=r(1888),s=r(6760),h=r(1283),f=r(9366),v=r(5964),c=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],T=ArrayBuffer,l=DataView;function _(q){return T.isView(q)&&!(q instanceof l)}function w(q){return Array.isArray(q)||_(q)}e.exports=ee;function A(q,se){var ae=q[0],j=q[1],Q=q[2],re=q[3];return q[0]=se[0]*ae+se[4]*j+se[8]*Q+se[12]*re,q[1]=se[1]*ae+se[5]*j+se[9]*Q+se[13]*re,q[2]=se[2]*ae+se[6]*j+se[10]*Q+se[14]*re,q[3]=se[3]*ae+se[7]*j+se[11]*Q+se[15]*re,q}function M(q,se,ae,j){return A(j,j,ae),A(j,j,se),A(j,j,q)}function g(q,se){this.index=q,this.dataCoordinate=this.position=se}function b(q){return q===!0||q>1?1:q}function p(q,se,ae,j,Q,re,pe,we,Se,Ie,Re,We){this.gl=q,this.pixelRatio=1,this.shader=se,this.orthoShader=ae,this.projectShader=j,this.pointBuffer=Q,this.colorBuffer=re,this.glyphBuffer=pe,this.idBuffer=we,this.vao=Se,this.vertexCount=0,this.lineVertexCount=0,this.opacity=1,this.hasAlpha=!1,this.lineWidth=0,this.projectScale=[.6666666666666666,.6666666666666666,.6666666666666666],this.projectOpacity=[1,1,1],this.projectHasAlpha=!1,this.pickId=0,this.pickPerspectiveShader=Ie,this.pickOrthoShader=Re,this.pickProjectShader=We,this.points=[],this._selectResult=new g(0,[0,0,0]),this.useOrtho=!0,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.axesProject=[!0,!0,!0],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.highlightId=[1,1,1,1],this.highlightScale=2,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.dirty=!0}var u=p.prototype;u.pickSlots=1,u.setPickBase=function(q){this.pickId=q},u.isTransparent=function(){if(this.hasAlpha)return!0;for(var q=0;q<3;++q)if(this.axesProject[q]&&this.projectHasAlpha)return!0;return!1},u.isOpaque=function(){if(!this.hasAlpha)return!0;for(var q=0;q<3;++q)if(this.axesProject[q]&&!this.projectHasAlpha)return!0;return!1};var y=[0,0],m=[0,0,0],R=[0,0,0],L=[0,0,0,1],z=[0,0,0,1],F=c.slice(),N=[0,0,0],O=[[0,0,0],[0,0,0]];function P(q){return q[0]=q[1]=q[2]=0,q}function U(q,se){return q[0]=se[0],q[1]=se[1],q[2]=se[2],q[3]=1,q}function B(q,se,ae,j){return q[0]=se[0],q[1]=se[1],q[2]=se[2],q[ae]=j,q}function X(q){for(var se=O,ae=0;ae<2;++ae)for(var j=0;j<3;++j)se[ae][j]=Math.max(Math.min(q[ae][j],1e8),-1e8);return se}function $(q,se,ae,j){var Q=se.axesProject,re=se.gl,pe=q.uniforms,we=ae.model||c,Se=ae.view||c,Ie=ae.projection||c,Re=se.axesBounds,We=X(se.clipBounds),at;se.axes&&se.axes.lastCubeProps?at=se.axes.lastCubeProps.axis:at=[1,1,1],y[0]=2/re.drawingBufferWidth,y[1]=2/re.drawingBufferHeight,q.bind(),pe.view=Se,pe.projection=Ie,pe.screenSize=y,pe.highlightId=se.highlightId,pe.highlightScale=se.highlightScale,pe.clipBounds=We,pe.pickGroup=se.pickId/255,pe.pixelRatio=j;for(var nt=0;nt<3;++nt)if(Q[nt]){pe.scale=se.projectScale[nt],pe.opacity=se.projectOpacity[nt];for(var tt=F,qe=0;qe<16;++qe)tt[qe]=0;for(var qe=0;qe<4;++qe)tt[5*qe]=1;tt[5*nt]=0,at[nt]<0?tt[12+nt]=Re[0][nt]:tt[12+nt]=Re[1][nt],s(tt,we,tt),pe.model=tt;var he=(nt+1)%3,ue=(nt+2)%3,ne=P(m),Ce=P(R);ne[he]=1,Ce[ue]=1;var Ye=M(Ie,Se,we,U(L,ne)),rt=M(Ie,Se,we,U(z,Ce));if(Math.abs(Ye[1])>Math.abs(rt[1])){var Ke=Ye;Ye=rt,rt=Ke,Ke=ne,ne=Ce,Ce=Ke;var Mt=he;he=ue,ue=Mt}Ye[0]<0&&(ne[he]=-1),rt[1]>0&&(Ce[ue]=-1);for(var kt=0,Nt=0,qe=0;qe<4;++qe)kt+=Math.pow(we[4*he+qe],2),Nt+=Math.pow(we[4*ue+qe],2);ne[he]/=Math.sqrt(kt),Ce[ue]/=Math.sqrt(Nt),pe.axes[0]=ne,pe.axes[1]=Ce,pe.fragClipBounds[0]=B(N,We[0],nt,-1e8),pe.fragClipBounds[1]=B(N,We[1],nt,1e8),se.vao.bind(),se.vao.draw(re.TRIANGLES,se.vertexCount),se.lineWidth>0&&(re.lineWidth(se.lineWidth*j),se.vao.draw(re.LINES,se.lineVertexCount,se.vertexCount)),se.vao.unbind()}}var le=[-1e8,-1e8,-1e8],ce=[1e8,1e8,1e8],de=[le,ce];function G(q,se,ae,j,Q,re,pe){var we=ae.gl;if((re===ae.projectHasAlpha||pe)&&$(se,ae,j,Q),re===ae.hasAlpha||pe){q.bind();var Se=q.uniforms;Se.model=j.model||c,Se.view=j.view||c,Se.projection=j.projection||c,y[0]=2/we.drawingBufferWidth,y[1]=2/we.drawingBufferHeight,Se.screenSize=y,Se.highlightId=ae.highlightId,Se.highlightScale=ae.highlightScale,Se.fragClipBounds=de,Se.clipBounds=ae.axes.bounds,Se.opacity=ae.opacity,Se.pickGroup=ae.pickId/255,Se.pixelRatio=Q,ae.vao.bind(),ae.vao.draw(we.TRIANGLES,ae.vertexCount),ae.lineWidth>0&&(we.lineWidth(ae.lineWidth*Q),ae.vao.draw(we.LINES,ae.lineVertexCount,ae.vertexCount)),ae.vao.unbind()}}u.draw=function(q){var se=this.useOrtho?this.orthoShader:this.shader;G(se,this.projectShader,this,q,this.pixelRatio,!1,!1)},u.drawTransparent=function(q){var se=this.useOrtho?this.orthoShader:this.shader;G(se,this.projectShader,this,q,this.pixelRatio,!0,!1)},u.drawPick=function(q){var se=this.useOrtho?this.pickOrthoShader:this.pickPerspectiveShader;G(se,this.pickProjectShader,this,q,1,!0,!0)},u.pick=function(q){if(!q||q.id!==this.pickId)return null;var se=q.value[2]+(q.value[1]<<8)+(q.value[0]<<16);if(se>=this.pointCount||se<0)return null;var ae=this.points[se],j=this._selectResult;j.index=se;for(var Q=0;Q<3;++Q)j.position[Q]=j.dataCoordinate[Q]=ae[Q];return j},u.highlight=function(q){if(!q)this.highlightId=[1,1,1,1];else{var se=q.index,ae=se&255,j=se>>8&255,Q=se>>16&255;this.highlightId=[ae/255,j/255,Q/255,0]}};function Y(q,se,ae,j){var Q;w(q)?se0){var Ir=0,_t=ue,Oe=[0,0,0,1],Je=[0,0,0,1],Ae=w(at)&&w(at[0]),Le=w(qe)&&w(qe[0]);e:for(var j=0;j0?1-Nt[0][0]:Pt<0?1+Nt[1][0]:1,jt*=jt>0?1-Nt[0][1]:jt<0?1+Nt[1][1]:1;for(var fr=[Pt,jt],Oa=Mt.cells||[],Ia=Mt.positions||[],rt=0;rtthis.buffer.length){a.free(this.buffer);for(var w=this.buffer=a.mallocUint8(i(_*l*4)),A=0;A<_*l*4;++A)w[A]=255}return T}}}),v.begin=function(){var T=this.gl,l=this.shape;T&&(this.fbo.bind(),T.clearColor(1,1,1,1),T.clear(T.COLOR_BUFFER_BIT|T.DEPTH_BUFFER_BIT))},v.end=function(){var T=this.gl;T&&(T.bindFramebuffer(T.FRAMEBUFFER,null),this._readTimeout||clearTimeout(this._readTimeout),this._readTimeout=setTimeout(this._readCallback,1))},v.query=function(T,l,_){if(!this.gl)return null;var w=this.fbo.shape.slice();T=T|0,l=l|0,typeof _!="number"&&(_=1);var A=Math.min(Math.max(T-_,0),w[0])|0,M=Math.min(Math.max(T+_,0),w[0])|0,g=Math.min(Math.max(l-_,0),w[1])|0,b=Math.min(Math.max(l+_,0),w[1])|0;if(M<=A||b<=g)return null;var p=[M-A,b-g],u=n(this.buffer,[p[0],p[1],4],[4,w[0]*4,1],4*(A+w[0]*g)),y=s(u.hi(p[0],p[1],1),_,_),m=y[0],R=y[1];if(m<0||Math.pow(this.radius,2)w)for(l=w;l<_;l++)this.gl.enableVertexAttribArray(l);else if(w>_)for(l=_;l=0){for(var O=N.type.charAt(N.type.length-1)|0,P=new Array(O),U=0;U=0;)B+=1;z[F]=B}var X=new Array(w.length);function $(){g.program=i.program(b,g._vref,g._fref,L,z);for(var le=0;le=0){var u=b.charCodeAt(b.length-1)-48;if(u<2||u>4)throw new o("","Invalid data type for attribute "+g+": "+b);s(v,c,p[0],l,u,_,g)}else if(b.indexOf("mat")>=0){var u=b.charCodeAt(b.length-1)-48;if(u<2||u>4)throw new o("","Invalid data type for attribute "+g+": "+b);h(v,c,p,l,u,_,g)}else throw new o("","Unknown data type for attribute "+g+": "+b);break}}return _}},3327:function(e,t,r){"use strict";var o=r(216),a=r(8866);e.exports=s;function n(h){return function(){return h}}function i(h,f){for(var v=new Array(h),c=0;c4)throw new a("","Invalid data type");switch(B.charAt(0)){case"b":case"i":h["uniform"+X+"iv"](c[z],F);break;case"v":h["uniform"+X+"fv"](c[z],F);break;default:throw new a("","Unrecognized data type for vector "+name+": "+B)}}else if(B.indexOf("mat")===0&&B.length===4){if(X=B.charCodeAt(B.length-1)-48,X<2||X>4)throw new a("","Invalid uniform dimension type for matrix "+name+": "+B);h["uniformMatrix"+X+"fv"](c[z],!1,F);break}else throw new a("","Unknown uniform data type for "+name+": "+B)}}}}}function _(b,p){if(typeof p!="object")return[[b,p]];var u=[];for(var y in p){var m=p[y],R=b;parseInt(y)+""===y?R+="["+y+"]":R+="."+y,typeof m=="object"?u.push.apply(u,_(R,m)):u.push([R,m])}return u}function w(b){switch(b){case"bool":return!1;case"int":case"sampler2D":case"samplerCube":return 0;case"float":return 0;default:var p=b.indexOf("vec");if(0<=p&&p<=1&&b.length===4+p){var u=b.charCodeAt(b.length-1)-48;if(u<2||u>4)throw new a("","Invalid data type");return b.charAt(0)==="b"?i(u,!1):i(u,0)}else if(b.indexOf("mat")===0&&b.length===4){var u=b.charCodeAt(b.length-1)-48;if(u<2||u>4)throw new a("","Invalid uniform dimension type for matrix "+name+": "+b);return i(u*u,0)}else throw new a("","Unknown uniform data type for "+name+": "+b)}}function A(b,p,u){if(typeof u=="object"){var y=M(u);Object.defineProperty(b,p,{get:n(y),set:l(u),enumerable:!0,configurable:!1})}else c[u]?Object.defineProperty(b,p,{get:T(u),set:l(u),enumerable:!0,configurable:!1}):b[p]=w(v[u].type)}function M(b){var p;if(Array.isArray(b)){p=new Array(b.length);for(var u=0;u1){v[0]in h||(h[v[0]]=[]),h=h[v[0]];for(var c=1;c1)for(var _=0;_"u"?r(606):WeakMap,i=new n,s=0;function h(A,M,g,b,p,u,y){this.id=A,this.src=M,this.type=g,this.shader=b,this.count=u,this.programs=[],this.cache=y}h.prototype.dispose=function(){if(--this.count===0){for(var A=this.cache,M=A.gl,g=this.programs,b=0,p=g.length;b 0 U ||b|| > 0. // Assign z = 0, x = -b, y = a: // a*-b + b*a + c*0 = -ba + ba + 0 = 0 if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) { return normalize(vec3(-v.y, v.x, 0.0)); } else { return normalize(vec3(0.0, v.z, -v.y)); } } // Calculate the tube vertex and normal at the given index. // // The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d. // // Each tube segment is made up of a ring of vertices. // These vertices are used to make up the triangles of the tube by connecting them together in the vertex array. // The indexes of tube segments run from 0 to 8. // vec3 getTubePosition(vec3 d, float index, out vec3 normal) { float segmentCount = 8.0; float angle = 2.0 * 3.14159 * (index / segmentCount); vec3 u = getOrthogonalVector(d); vec3 v = normalize(cross(u, d)); vec3 x = u * cos(angle) * length(d); vec3 y = v * sin(angle) * length(d); vec3 v3 = x + y; normal = normalize(v3); return v3; } attribute vec4 vector; attribute vec4 color, position; attribute vec2 uv; uniform float vectorScale, tubeScale; uniform mat4 model, view, projection, inverseModel; uniform vec3 eyePosition, lightPosition; varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position; varying vec4 f_color; varying vec2 f_uv; void main() { // Scale the vector magnitude to stay constant with // model & view changes. vec3 normal; vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal); vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0); //Lighting geometry parameters vec4 cameraCoordinate = view * tubePosition; cameraCoordinate.xyz /= cameraCoordinate.w; f_lightDirection = lightPosition - cameraCoordinate.xyz; f_eyeDirection = eyePosition - cameraCoordinate.xyz; f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz); // vec4 m_position = model * vec4(tubePosition, 1.0); vec4 t_position = view * tubePosition; gl_Position = projection * t_position; f_color = color; f_data = tubePosition.xyz; f_position = position.xyz; f_uv = uv; } `]),n=o([`#extension GL_OES_standard_derivatives : enable precision highp float; #define GLSLIFY 1 float beckmannDistribution(float x, float roughness) { float NdotH = max(x, 0.0001); float cos2Alpha = NdotH * NdotH; float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha; float roughness2 = roughness * roughness; float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha; return exp(tan2Alpha / roughness2) / denom; } float cookTorranceSpecular( vec3 lightDirection, vec3 viewDirection, vec3 surfaceNormal, float roughness, float fresnel) { float VdotN = max(dot(viewDirection, surfaceNormal), 0.0); float LdotN = max(dot(lightDirection, surfaceNormal), 0.0); //Half angle vector vec3 H = normalize(lightDirection + viewDirection); //Geometric term float NdotH = max(dot(surfaceNormal, H), 0.0); float VdotH = max(dot(viewDirection, H), 0.000001); float LdotH = max(dot(lightDirection, H), 0.000001); float G1 = (2.0 * NdotH * VdotN) / VdotH; float G2 = (2.0 * NdotH * LdotN) / LdotH; float G = min(1.0, min(G1, G2)); //Distribution term float D = beckmannDistribution(NdotH, roughness); //Fresnel term float F = pow(1.0 - VdotN, fresnel); //Multiply terms and done return G * F * D / max(3.14159265 * VdotN, 0.000001); } bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec3 clipBounds[2]; uniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity; uniform sampler2D texture; varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position; varying vec4 f_color; varying vec2 f_uv; void main() { if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; vec3 N = normalize(f_normal); vec3 L = normalize(f_lightDirection); vec3 V = normalize(f_eyeDirection); if(gl_FrontFacing) { N = -N; } float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel))); float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0); vec4 surfaceColor = f_color * texture2D(texture, f_uv); vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0); gl_FragColor = litColor * opacity; } `]),i=o([`precision highp float; precision highp float; #define GLSLIFY 1 vec3 getOrthogonalVector(vec3 v) { // Return up-vector for only-z vector. // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0). // From the above if-statement we have ||a|| > 0 U ||b|| > 0. // Assign z = 0, x = -b, y = a: // a*-b + b*a + c*0 = -ba + ba + 0 = 0 if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) { return normalize(vec3(-v.y, v.x, 0.0)); } else { return normalize(vec3(0.0, v.z, -v.y)); } } // Calculate the tube vertex and normal at the given index. // // The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d. // // Each tube segment is made up of a ring of vertices. // These vertices are used to make up the triangles of the tube by connecting them together in the vertex array. // The indexes of tube segments run from 0 to 8. // vec3 getTubePosition(vec3 d, float index, out vec3 normal) { float segmentCount = 8.0; float angle = 2.0 * 3.14159 * (index / segmentCount); vec3 u = getOrthogonalVector(d); vec3 v = normalize(cross(u, d)); vec3 x = u * cos(angle) * length(d); vec3 y = v * sin(angle) * length(d); vec3 v3 = x + y; normal = normalize(v3); return v3; } attribute vec4 vector; attribute vec4 position; attribute vec4 id; uniform mat4 model, view, projection; uniform float tubeScale; varying vec3 f_position; varying vec4 f_id; void main() { vec3 normal; vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal); vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0); gl_Position = projection * (view * tubePosition); f_id = id; f_position = position.xyz; } `]),s=o([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec3 clipBounds[2]; uniform float pickId; varying vec3 f_position; varying vec4 f_id; void main() { if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; gl_FragColor = vec4(pickId, f_id.xyz); }`]);t.meshShader={vertex:a,fragment:n,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec4"}]},t.pickShader={vertex:i,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec4"}]}},7815:function(e,t,r){"use strict";var o=r(2931),a=r(9970),n=["xyz","xzy","yxz","yzx","zxy","zyx"],i=function(A,M,g,b){for(var p=A.points,u=A.velocities,y=A.divergences,m=[],R=[],L=[],z=[],F=[],N=[],O=0,P=0,U=a.create(),B=a.create(),X=8,$=0;$0)for(var G=0;GM)return b-1}return b},f=function(A,M,g){return Ag?g:A},v=function(A,M,g){var b=M.vectors,p=M.meshgrid,u=A[0],y=A[1],m=A[2],R=p[0].length,L=p[1].length,z=p[2].length,F=h(p[0],u),N=h(p[1],y),O=h(p[2],m),P=F+1,U=N+1,B=O+1;if(F=f(F,0,R-1),P=f(P,0,R-1),N=f(N,0,L-1),U=f(U,0,L-1),O=f(O,0,z-1),B=f(B,0,z-1),F<0||N<0||O<0||P>R-1||U>L-1||B>z-1)return o.create();var X=p[0][F],$=p[0][P],le=p[1][N],ce=p[1][U],de=p[2][O],G=p[2][B],Y=(u-X)/($-X),ee=(y-le)/(ce-le),q=(m-de)/(G-de);isFinite(Y)||(Y=.5),isFinite(ee)||(ee=.5),isFinite(q)||(q=.5);var se,ae,j,Q,re,pe;switch(g.reversedX&&(F=R-1-F,P=R-1-P),g.reversedY&&(N=L-1-N,U=L-1-U),g.reversedZ&&(O=z-1-O,B=z-1-B),g.filled){case 5:re=O,pe=B,j=N*z,Q=U*z,se=F*z*L,ae=P*z*L;break;case 4:re=O,pe=B,se=F*z,ae=P*z,j=N*z*R,Q=U*z*R;break;case 3:j=N,Q=U,re=O*L,pe=B*L,se=F*L*z,ae=P*L*z;break;case 2:j=N,Q=U,se=F*L,ae=P*L,re=O*L*R,pe=B*L*R;break;case 1:se=F,ae=P,re=O*R,pe=B*R,j=N*R*z,Q=U*R*z;break;default:se=F,ae=P,j=N*R,Q=U*R,re=O*R*L,pe=B*R*L;break}var we=b[se+j+re],Se=b[se+j+pe],Ie=b[se+Q+re],Re=b[se+Q+pe],We=b[ae+j+re],at=b[ae+j+pe],nt=b[ae+Q+re],tt=b[ae+Q+pe],qe=o.create(),he=o.create(),ue=o.create(),ne=o.create();o.lerp(qe,we,We,Y),o.lerp(he,Se,at,Y),o.lerp(ue,Ie,nt,Y),o.lerp(ne,Re,tt,Y);var Ce=o.create(),Ye=o.create();o.lerp(Ce,qe,ue,ee),o.lerp(Ye,he,ne,ee);var rt=o.create();return o.lerp(rt,Ce,Ye,q),rt},c=function(A,M){var g=M[0],b=M[1],p=M[2];return A[0]=g<0?-g:g,A[1]=b<0?-b:b,A[2]=p<0?-p:p,A},T=function(A){var M=1/0;A.sort(function(u,y){return u-y});for(var g=A.length,b=1;bP||ttU||qeB)},$=o.distance(M[0],M[1]),le=10*$/b,ce=le*le,de=1,G=0,Y=g.length;Y>1&&(de=l(g));for(var ee=0;eeG&&(G=we),re.push(we),z.push({points:se,velocities:ae,divergences:re});for(var Se=0;Sece&&o.scale(Ie,Ie,le/Math.sqrt(Re)),o.add(Ie,Ie,q),j=R(Ie),o.squaredDistance(Q,Ie)-ce>-1e-4*ce){se.push(Ie),Q=Ie,ae.push(j);var pe=L(Ie,j),we=o.length(pe);isFinite(we)&&we>G&&(G=we),re.push(we)}q=Ie}}var We=s(z,A.colormap,G,de);return u?We.tubeScale=u:(G===0&&(G=1),We.tubeScale=p*.5*de/G),We};var _=r(6740),w=r(6405).createMesh;e.exports.createTubeMesh=function(A,M){return w(A,M,{shaders:_,traceType:"streamtube"})}},990:function(e,t,r){var o=r(9405),a=r(3236),n=a([`precision highp float; #define GLSLIFY 1 attribute vec4 uv; attribute vec3 f; attribute vec3 normal; uniform vec3 objectOffset; uniform mat4 model, view, projection, inverseModel; uniform vec3 lightPosition, eyePosition; uniform sampler2D colormap; varying float value, kill; varying vec3 worldCoordinate; varying vec2 planeCoordinate; varying vec3 lightDirection, eyeDirection, surfaceNormal; varying vec4 vColor; void main() { vec3 localCoordinate = vec3(uv.zw, f.x); worldCoordinate = objectOffset + localCoordinate; mat4 objectOffsetTranslation = mat4(1.0) + mat4(vec4(0), vec4(0), vec4(0), vec4(objectOffset, 0)); vec4 worldPosition = (model * objectOffsetTranslation) * vec4(localCoordinate, 1.0); vec4 clipPosition = projection * (view * worldPosition); gl_Position = clipPosition; kill = f.y; value = f.z; planeCoordinate = uv.xy; vColor = texture2D(colormap, vec2(value, value)); //Lighting geometry parameters vec4 cameraCoordinate = view * worldPosition; cameraCoordinate.xyz /= cameraCoordinate.w; lightDirection = lightPosition - cameraCoordinate.xyz; eyeDirection = eyePosition - cameraCoordinate.xyz; surfaceNormal = normalize((vec4(normal,0) * inverseModel).xyz); } `]),i=a([`precision highp float; #define GLSLIFY 1 float beckmannDistribution(float x, float roughness) { float NdotH = max(x, 0.0001); float cos2Alpha = NdotH * NdotH; float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha; float roughness2 = roughness * roughness; float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha; return exp(tan2Alpha / roughness2) / denom; } float beckmannSpecular( vec3 lightDirection, vec3 viewDirection, vec3 surfaceNormal, float roughness) { return beckmannDistribution(dot(surfaceNormal, normalize(lightDirection + viewDirection)), roughness); } bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec3 lowerBound, upperBound; uniform float contourTint; uniform vec4 contourColor; uniform sampler2D colormap; uniform vec3 clipBounds[2]; uniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity; uniform float vertexColor; varying float value, kill; varying vec3 worldCoordinate; varying vec3 lightDirection, eyeDirection, surfaceNormal; varying vec4 vColor; void main() { if ( kill > 0.0 || vColor.a == 0.0 || outOfRange(clipBounds[0], clipBounds[1], worldCoordinate) ) discard; vec3 N = normalize(surfaceNormal); vec3 V = normalize(eyeDirection); vec3 L = normalize(lightDirection); if(gl_FrontFacing) { N = -N; } float specular = max(beckmannSpecular(L, V, N, roughness), 0.); float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0); //decide how to interpolate color \u2014 in vertex or in fragment vec4 surfaceColor = step(vertexColor, .5) * texture2D(colormap, vec2(value, value)) + step(.5, vertexColor) * vColor; vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0); gl_FragColor = mix(litColor, contourColor, contourTint) * opacity; } `]),s=a([`precision highp float; #define GLSLIFY 1 attribute vec4 uv; attribute float f; uniform vec3 objectOffset; uniform mat3 permutation; uniform mat4 model, view, projection; uniform float height, zOffset; uniform sampler2D colormap; varying float value, kill; varying vec3 worldCoordinate; varying vec2 planeCoordinate; varying vec3 lightDirection, eyeDirection, surfaceNormal; varying vec4 vColor; void main() { vec3 dataCoordinate = permutation * vec3(uv.xy, height); worldCoordinate = objectOffset + dataCoordinate; mat4 objectOffsetTranslation = mat4(1.0) + mat4(vec4(0), vec4(0), vec4(0), vec4(objectOffset, 0)); vec4 worldPosition = (model * objectOffsetTranslation) * vec4(dataCoordinate, 1.0); vec4 clipPosition = projection * (view * worldPosition); clipPosition.z += zOffset; gl_Position = clipPosition; value = f + objectOffset.z; kill = -1.0; planeCoordinate = uv.zw; vColor = texture2D(colormap, vec2(value, value)); //Don't do lighting for contours surfaceNormal = vec3(1,0,0); eyeDirection = vec3(0,1,0); lightDirection = vec3(0,0,1); } `]),h=a([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec2 shape; uniform vec3 clipBounds[2]; uniform float pickId; varying float value, kill; varying vec3 worldCoordinate; varying vec2 planeCoordinate; varying vec3 surfaceNormal; vec2 splitFloat(float v) { float vh = 255.0 * v; float upper = floor(vh); float lower = fract(vh); return vec2(upper / 255.0, floor(lower * 16.0) / 16.0); } void main() { if ((kill > 0.0) || (outOfRange(clipBounds[0], clipBounds[1], worldCoordinate))) discard; vec2 ux = splitFloat(planeCoordinate.x / shape.x); vec2 uy = splitFloat(planeCoordinate.y / shape.y); gl_FragColor = vec4(pickId, ux.x, uy.x, ux.y + (uy.y/16.0)); } `]);t.createShader=function(f){var v=o(f,n,i,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return v.attributes.uv.location=0,v.attributes.f.location=1,v.attributes.normal.location=2,v},t.createPickShader=function(f){var v=o(f,n,h,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return v.attributes.uv.location=0,v.attributes.f.location=1,v.attributes.normal.location=2,v},t.createContourShader=function(f){var v=o(f,s,i,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return v.attributes.uv.location=0,v.attributes.f.location=1,v},t.createPickContourShader=function(f){var v=o(f,s,h,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return v.attributes.uv.location=0,v.attributes.f.location=1,v}},9499:function(e,t,r){"use strict";e.exports=se;var o=r(8828),a=r(2762),n=r(8116),i=r(7766),s=r(1888),h=r(6729),f=r(5298),v=r(9994),c=r(9618),T=r(3711),l=r(6760),_=r(7608),w=r(2478),A=r(6199),M=r(990),g=M.createShader,b=M.createContourShader,p=M.createPickShader,u=M.createPickContourShader,y=4*10,m=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],R=[[0,0],[0,1],[1,0],[1,1],[1,0],[0,1]],L=[[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0]];(function(){for(var ae=0;ae<3;++ae){var j=L[ae],Q=(ae+1)%3,re=(ae+2)%3;j[Q+0]=1,j[re+3]=1,j[ae+6]=1}})();function z(ae,j,Q,re,pe){this.position=ae,this.index=j,this.uv=Q,this.level=re,this.dataCoordinate=pe}var F=256;function N(ae,j,Q,re,pe,we,Se,Ie,Re,We,at,nt,tt,qe,he){this.gl=ae,this.shape=j,this.bounds=Q,this.objectOffset=he,this.intensityBounds=[],this._shader=re,this._pickShader=pe,this._coordinateBuffer=we,this._vao=Se,this._colorMap=Ie,this._contourShader=Re,this._contourPickShader=We,this._contourBuffer=at,this._contourVAO=nt,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new z([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=tt,this._dynamicVAO=qe,this._dynamicOffsets=[0,0,0],this._dynamicCounts=[0,0,0],this.contourWidth=[1,1,1],this.contourLevels=[[1],[1],[1]],this.contourTint=[0,0,0],this.contourColor=[[.5,.5,.5,1],[.5,.5,.5,1],[.5,.5,.5,1]],this.showContour=!0,this.showSurface=!0,this.enableHighlight=[!0,!0,!0],this.highlightColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.highlightTint=[1,1,1],this.highlightLevel=[-1,-1,-1],this.enableDynamic=[!0,!0,!0],this.dynamicLevel=[NaN,NaN,NaN],this.dynamicColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.dynamicTint=[1,1,1],this.dynamicWidth=[1,1,1],this.axesBounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.surfaceProject=[!1,!1,!1],this.contourProject=[[!1,!1,!1],[!1,!1,!1],[!1,!1,!1]],this.colorBounds=[!1,!1],this._field=[c(s.mallocFloat(1024),[0,0]),c(s.mallocFloat(1024),[0,0]),c(s.mallocFloat(1024),[0,0])],this.pickId=1,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.snapToData=!1,this.pixelRatio=1,this.opacity=1,this.lightPosition=[10,1e4,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.vertexColor=0,this.dirty=!0}var O=N.prototype;O.genColormap=function(ae,j){var Q=!1,re=v([h({colormap:ae,nshades:F,format:"rgba"}).map(function(pe,we){var Se=j?P(we/255,j):pe[3];return Se<1&&(Q=!0),[pe[0],pe[1],pe[2],255*Se]})]);return f.divseq(re,255),this.hasAlphaScale=Q,re},O.isTransparent=function(){return this.opacity<1||this.hasAlphaScale},O.isOpaque=function(){return!this.isTransparent()},O.pickSlots=1,O.setPickBase=function(ae){this.pickId=ae};function P(ae,j){if(!j||!j.length)return 1;for(var Q=0;Qae&&Q>0){var re=(j[Q][0]-ae)/(j[Q][0]-j[Q-1][0]);return j[Q][1]*(1-re)+re*j[Q-1][1]}}return 1}var U=[0,0,0],B={showSurface:!1,showContour:!1,projections:[m.slice(),m.slice(),m.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function X(ae,j){var Q,re,pe,we=j.axes&&j.axes.lastCubeProps.axis||U,Se=j.showSurface,Ie=j.showContour;for(Q=0;Q<3;++Q)for(Se=Se||j.surfaceProject[Q],re=0;re<3;++re)Ie=Ie||j.contourProject[Q][re];for(Q=0;Q<3;++Q){var Re=B.projections[Q];for(re=0;re<16;++re)Re[re]=0;for(re=0;re<4;++re)Re[5*re]=1;Re[5*Q]=0,Re[12+Q]=j.axesBounds[+(we[Q]>0)][Q],l(Re,ae.model,Re);var We=B.clipBounds[Q];for(pe=0;pe<2;++pe)for(re=0;re<3;++re)We[pe][re]=ae.clipBounds[pe][re];We[0][Q]=-1e8,We[1][Q]=1e8}return B.showSurface=Se,B.showContour=Ie,B}var $={model:m,view:m,projection:m,inverseModel:m.slice(),lowerBound:[0,0,0],upperBound:[0,0,0],colorMap:0,clipBounds:[[0,0,0],[0,0,0]],height:0,contourTint:0,contourColor:[0,0,0,1],permutation:[1,0,0,0,1,0,0,0,1],zOffset:-1e-4,objectOffset:[0,0,0],kambient:1,kdiffuse:1,kspecular:1,lightPosition:[1e3,1e3,1e3],eyePosition:[0,0,0],roughness:1,fresnel:1,opacity:1,vertexColor:0},le=m.slice(),ce=[1,0,0,0,1,0,0,0,1];function de(ae,j){ae=ae||{};var Q=this.gl;Q.disable(Q.CULL_FACE),this._colorMap.bind(0);var re=$;re.model=ae.model||m,re.view=ae.view||m,re.projection=ae.projection||m,re.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],re.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],re.objectOffset=this.objectOffset,re.contourColor=this.contourColor[0],re.inverseModel=_(re.inverseModel,re.model);for(var pe=0;pe<2;++pe)for(var we=re.clipBounds[pe],Se=0;Se<3;++Se)we[Se]=Math.min(Math.max(this.clipBounds[pe][Se],-1e8),1e8);re.kambient=this.ambientLight,re.kdiffuse=this.diffuseLight,re.kspecular=this.specularLight,re.roughness=this.roughness,re.fresnel=this.fresnel,re.opacity=this.opacity,re.height=0,re.permutation=ce,re.vertexColor=this.vertexColor;var Ie=le;for(l(Ie,re.view,re.model),l(Ie,re.projection,Ie),_(Ie,Ie),pe=0;pe<3;++pe)re.eyePosition[pe]=Ie[12+pe]/Ie[15];var Re=Ie[15];for(pe=0;pe<3;++pe)Re+=this.lightPosition[pe]*Ie[4*pe+3];for(pe=0;pe<3;++pe){var We=Ie[12+pe];for(Se=0;Se<3;++Se)We+=Ie[4*Se+pe]*this.lightPosition[Se];re.lightPosition[pe]=We/Re}var at=X(re,this);if(at.showSurface){for(this._shader.bind(),this._shader.uniforms=re,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(Q.TRIANGLES,this._vertexCount),pe=0;pe<3;++pe)!this.surfaceProject[pe]||!this.vertexCount||(this._shader.uniforms.model=at.projections[pe],this._shader.uniforms.clipBounds=at.clipBounds[pe],this._vao.draw(Q.TRIANGLES,this._vertexCount));this._vao.unbind()}if(at.showContour){var nt=this._contourShader;re.kambient=1,re.kdiffuse=0,re.kspecular=0,re.opacity=1,nt.bind(),nt.uniforms=re;var tt=this._contourVAO;for(tt.bind(),pe=0;pe<3;++pe)for(nt.uniforms.permutation=L[pe],Q.lineWidth(this.contourWidth[pe]*this.pixelRatio),Se=0;Se>4)/16)/255,pe=Math.floor(re),we=re-pe,Se=j[1]*(ae.value[1]+(ae.value[2]&15)/16)/255,Ie=Math.floor(Se),Re=Se-Ie;pe+=1,Ie+=1;var We=Q.position;We[0]=We[1]=We[2]=0;for(var at=0;at<2;++at)for(var nt=at?we:1-we,tt=0;tt<2;++tt)for(var qe=tt?Re:1-Re,he=pe+at,ue=Ie+tt,ne=nt*qe,Ce=0;Ce<3;++Ce)We[Ce]+=this._field[Ce].get(he,ue)*ne;for(var Ye=this._pickResult.level,rt=0;rt<3;++rt)if(Ye[rt]=w.le(this.contourLevels[rt],We[rt]),Ye[rt]<0)this.contourLevels[rt].length>0&&(Ye[rt]=0);else if(Ye[rt]Math.abs(Mt-We[rt])&&(Ye[rt]+=1)}for(Q.index[0]=we<.5?pe:pe+1,Q.index[1]=Re<.5?Ie:Ie+1,Q.uv[0]=re/j[0],Q.uv[1]=Se/j[1],Ce=0;Ce<3;++Ce)Q.dataCoordinate[Ce]=this._field[Ce].get(Q.index[0],Q.index[1]);return Q},O.padField=function(ae,j){var Q=j.shape.slice(),re=ae.shape.slice();f.assign(ae.lo(1,1).hi(Q[0],Q[1]),j),f.assign(ae.lo(1).hi(Q[0],1),j.hi(Q[0],1)),f.assign(ae.lo(1,re[1]-1).hi(Q[0],1),j.lo(0,Q[1]-1).hi(Q[0],1)),f.assign(ae.lo(0,1).hi(1,Q[1]),j.hi(1)),f.assign(ae.lo(re[0]-1,1).hi(1,Q[1]),j.lo(Q[0]-1)),ae.set(0,0,j.get(0,0)),ae.set(0,re[1]-1,j.get(0,Q[1]-1)),ae.set(re[0]-1,0,j.get(Q[0]-1,0)),ae.set(re[0]-1,re[1]-1,j.get(Q[0]-1,Q[1]-1))};function Y(ae,j){return Array.isArray(ae)?[j(ae[0]),j(ae[1]),j(ae[2])]:[j(ae),j(ae),j(ae)]}function ee(ae){return Array.isArray(ae)?ae.length===3?[ae[0],ae[1],ae[2],1]:[ae[0],ae[1],ae[2],ae[3]]:[0,0,0,1]}function q(ae){if(Array.isArray(ae)){if(Array.isArray(ae))return[ee(ae[0]),ee(ae[1]),ee(ae[2])];var j=ee(ae);return[j.slice(),j.slice(),j.slice()]}}O.update=function(ae){ae=ae||{},this.objectOffset=ae.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in ae&&(this.contourWidth=Y(ae.contourWidth,Number)),"showContour"in ae&&(this.showContour=Y(ae.showContour,Boolean)),"showSurface"in ae&&(this.showSurface=!!ae.showSurface),"contourTint"in ae&&(this.contourTint=Y(ae.contourTint,Boolean)),"contourColor"in ae&&(this.contourColor=q(ae.contourColor)),"contourProject"in ae&&(this.contourProject=Y(ae.contourProject,function(pi){return Y(pi,Boolean)})),"surfaceProject"in ae&&(this.surfaceProject=ae.surfaceProject),"dynamicColor"in ae&&(this.dynamicColor=q(ae.dynamicColor)),"dynamicTint"in ae&&(this.dynamicTint=Y(ae.dynamicTint,Number)),"dynamicWidth"in ae&&(this.dynamicWidth=Y(ae.dynamicWidth,Number)),"opacity"in ae&&(this.opacity=ae.opacity),"opacityscale"in ae&&(this.opacityscale=ae.opacityscale),"colorBounds"in ae&&(this.colorBounds=ae.colorBounds),"vertexColor"in ae&&(this.vertexColor=ae.vertexColor?1:0),"colormap"in ae&&this._colorMap.setPixels(this.genColormap(ae.colormap,this.opacityscale));var j=ae.field||ae.coords&&ae.coords[2]||null,Q=!1;if(j||(this._field[2].shape[0]||this._field[2].shape[2]?j=this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):j=this._field[2].hi(0,0)),"field"in ae||"coords"in ae){var re=(j.shape[0]+2)*(j.shape[1]+2);re>this._field[2].data.length&&(s.freeFloat(this._field[2].data),this._field[2].data=s.mallocFloat(o.nextPow2(re))),this._field[2]=c(this._field[2].data,[j.shape[0]+2,j.shape[1]+2]),this.padField(this._field[2],j),this.shape=j.shape.slice();for(var pe=this.shape,we=0;we<2;++we)this._field[2].size>this._field[we].data.length&&(s.freeFloat(this._field[we].data),this._field[we].data=s.mallocFloat(this._field[2].size)),this._field[we]=c(this._field[we].data,[pe[0]+2,pe[1]+2]);if(ae.coords){var Se=ae.coords;if(!Array.isArray(Se)||Se.length!==3)throw new Error("gl-surface: invalid coordinates for x/y");for(we=0;we<2;++we){var Ie=Se[we];for(tt=0;tt<2;++tt)if(Ie.shape[tt]!==pe[tt])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[we],Ie)}}else if(ae.ticks){var Re=ae.ticks;if(!Array.isArray(Re)||Re.length!==2)throw new Error("gl-surface: invalid ticks");for(we=0;we<2;++we){var We=Re[we];if((Array.isArray(We)||We.length)&&(We=c(We)),We.shape[0]!==pe[we])throw new Error("gl-surface: invalid tick length");var at=c(We.data,pe);at.stride[we]=We.stride[0],at.stride[we^1]=0,this.padField(this._field[we],at)}}else{for(we=0;we<2;++we){var nt=[0,0];nt[we]=1,this._field[we]=c(this._field[we].data,[pe[0]+2,pe[1]+2],nt,0)}this._field[0].set(0,0,0);for(var tt=0;tt0){for(var Za=0;Za<5;++Za)ur.pop();Ae-=1}continue e}}}Oa.push(Ae)}this._contourOffsets[sr]=Ta,this._contourCounts[sr]=Oa}var ri=s.mallocFloat(ur.length);for(we=0;wez||R<0||R>z)throw new Error("gl-texture2d: Invalid texture size");return y._shape=[m,R],y.bind(),L.texImage2D(L.TEXTURE_2D,0,y.format,m,R,0,y.format,y.type,null),y._mipLevels=[0],y}function l(y,m,R,L,z,F){this.gl=y,this.handle=m,this.format=z,this.type=F,this._shape=[R,L],this._mipLevels=[0],this._magFilter=y.NEAREST,this._minFilter=y.NEAREST,this._wrapS=y.CLAMP_TO_EDGE,this._wrapT=y.CLAMP_TO_EDGE,this._anisoSamples=1;var N=this,O=[this._wrapS,this._wrapT];Object.defineProperties(O,[{get:function(){return N._wrapS},set:function(U){return N.wrapS=U}},{get:function(){return N._wrapT},set:function(U){return N.wrapT=U}}]),this._wrapVector=O;var P=[this._shape[0],this._shape[1]];Object.defineProperties(P,[{get:function(){return N._shape[0]},set:function(U){return N.width=U}},{get:function(){return N._shape[1]},set:function(U){return N.height=U}}]),this._shapeVector=P}var _=l.prototype;Object.defineProperties(_,{minFilter:{get:function(){return this._minFilter},set:function(y){this.bind();var m=this.gl;if(this.type===m.FLOAT&&i.indexOf(y)>=0&&(m.getExtension("OES_texture_float_linear")||(y=m.NEAREST)),s.indexOf(y)<0)throw new Error("gl-texture2d: Unknown filter mode "+y);return m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MIN_FILTER,y),this._minFilter=y}},magFilter:{get:function(){return this._magFilter},set:function(y){this.bind();var m=this.gl;if(this.type===m.FLOAT&&i.indexOf(y)>=0&&(m.getExtension("OES_texture_float_linear")||(y=m.NEAREST)),s.indexOf(y)<0)throw new Error("gl-texture2d: Unknown filter mode "+y);return m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MAG_FILTER,y),this._magFilter=y}},mipSamples:{get:function(){return this._anisoSamples},set:function(y){var m=this._anisoSamples;if(this._anisoSamples=Math.max(y,1)|0,m!==this._anisoSamples){var R=this.gl.getExtension("EXT_texture_filter_anisotropic");R&&this.gl.texParameterf(this.gl.TEXTURE_2D,R.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(y){if(this.bind(),h.indexOf(y)<0)throw new Error("gl-texture2d: Unknown wrap mode "+y);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,y),this._wrapS=y}},wrapT:{get:function(){return this._wrapT},set:function(y){if(this.bind(),h.indexOf(y)<0)throw new Error("gl-texture2d: Unknown wrap mode "+y);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,y),this._wrapT=y}},wrap:{get:function(){return this._wrapVector},set:function(y){if(Array.isArray(y)||(y=[y,y]),y.length!==2)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var m=0;m<2;++m)if(h.indexOf(y[m])<0)throw new Error("gl-texture2d: Unknown wrap mode "+y);this._wrapS=y[0],this._wrapT=y[1];var R=this.gl;return this.bind(),R.texParameteri(R.TEXTURE_2D,R.TEXTURE_WRAP_S,this._wrapS),R.texParameteri(R.TEXTURE_2D,R.TEXTURE_WRAP_T,this._wrapT),y}},shape:{get:function(){return this._shapeVector},set:function(y){if(!Array.isArray(y))y=[y|0,y|0];else if(y.length!==2)throw new Error("gl-texture2d: Invalid texture shape");return T(this,y[0]|0,y[1]|0),[y[0]|0,y[1]|0]}},width:{get:function(){return this._shape[0]},set:function(y){return y=y|0,T(this,y,this._shape[1]),y}},height:{get:function(){return this._shape[1]},set:function(y){return y=y|0,T(this,this._shape[0],y),y}}}),_.bind=function(y){var m=this.gl;return y!==void 0&&m.activeTexture(m.TEXTURE0+(y|0)),m.bindTexture(m.TEXTURE_2D,this.handle),y!==void 0?y|0:m.getParameter(m.ACTIVE_TEXTURE)-m.TEXTURE0},_.dispose=function(){this.gl.deleteTexture(this.handle)},_.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var y=Math.min(this._shape[0],this._shape[1]),m=0;y>0;++m,y>>>=1)this._mipLevels.indexOf(m)<0&&this._mipLevels.push(m)},_.setPixels=function(y,m,R,L){var z=this.gl;this.bind(),Array.isArray(m)?(L=R,R=m[1]|0,m=m[0]|0):(m=m||0,R=R||0),L=L||0;var F=v(y)?y:y.raw;if(F){var N=this._mipLevels.indexOf(L)<0;N?(z.texImage2D(z.TEXTURE_2D,0,this.format,this.format,this.type,F),this._mipLevels.push(L)):z.texSubImage2D(z.TEXTURE_2D,L,m,R,this.format,this.type,F)}else if(y.shape&&y.stride&&y.data){if(y.shape.length<2||m+y.shape[1]>this._shape[1]>>>L||R+y.shape[0]>this._shape[0]>>>L||m<0||R<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");A(z,m,R,L,this.format,this.type,this._mipLevels,y)}else throw new Error("gl-texture2d: Unsupported data type")};function w(y,m){return y.length===3?m[2]===1&&m[1]===y[0]*y[2]&&m[0]===y[2]:m[0]===1&&m[1]===y[0]}function A(y,m,R,L,z,F,N,O){var P=O.dtype,U=O.shape.slice();if(U.length<2||U.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var B=0,X=0,$=w(U,O.stride.slice());P==="float32"?B=y.FLOAT:P==="float64"?(B=y.FLOAT,$=!1,P="float32"):P==="uint8"?B=y.UNSIGNED_BYTE:(B=y.UNSIGNED_BYTE,$=!1,P="uint8");var le=1;if(U.length===2)X=y.LUMINANCE,U=[U[0],U[1],1],O=o(O.data,U,[O.stride[0],O.stride[1],1],O.offset);else if(U.length===3){if(U[2]===1)X=y.ALPHA;else if(U[2]===2)X=y.LUMINANCE_ALPHA;else if(U[2]===3)X=y.RGB;else if(U[2]===4)X=y.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");le=U[2]}else throw new Error("gl-texture2d: Invalid shape for texture");if((X===y.LUMINANCE||X===y.ALPHA)&&(z===y.LUMINANCE||z===y.ALPHA)&&(X=z),X!==z)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var ce=O.size,de=N.indexOf(L)<0;if(de&&N.push(L),B===F&&$)O.offset===0&&O.data.length===ce?de?y.texImage2D(y.TEXTURE_2D,L,z,U[0],U[1],0,z,F,O.data):y.texSubImage2D(y.TEXTURE_2D,L,m,R,U[0],U[1],z,F,O.data):de?y.texImage2D(y.TEXTURE_2D,L,z,U[0],U[1],0,z,F,O.data.subarray(O.offset,O.offset+ce)):y.texSubImage2D(y.TEXTURE_2D,L,m,R,U[0],U[1],z,F,O.data.subarray(O.offset,O.offset+ce));else{var G;F===y.FLOAT?G=n.mallocFloat32(ce):G=n.mallocUint8(ce);var Y=o(G,U,[U[2],U[2]*U[0],1]);B===y.FLOAT&&F===y.UNSIGNED_BYTE?c(Y,O):a.assign(Y,O),de?y.texImage2D(y.TEXTURE_2D,L,z,U[0],U[1],0,z,F,G.subarray(0,ce)):y.texSubImage2D(y.TEXTURE_2D,L,m,R,U[0],U[1],z,F,G.subarray(0,ce)),F===y.FLOAT?n.freeFloat32(G):n.freeUint8(G)}}function M(y){var m=y.createTexture();return y.bindTexture(y.TEXTURE_2D,m),y.texParameteri(y.TEXTURE_2D,y.TEXTURE_MIN_FILTER,y.NEAREST),y.texParameteri(y.TEXTURE_2D,y.TEXTURE_MAG_FILTER,y.NEAREST),y.texParameteri(y.TEXTURE_2D,y.TEXTURE_WRAP_S,y.CLAMP_TO_EDGE),y.texParameteri(y.TEXTURE_2D,y.TEXTURE_WRAP_T,y.CLAMP_TO_EDGE),m}function g(y,m,R,L,z){var F=y.getParameter(y.MAX_TEXTURE_SIZE);if(m<0||m>F||R<0||R>F)throw new Error("gl-texture2d: Invalid texture shape");if(z===y.FLOAT&&!y.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var N=M(y);return y.texImage2D(y.TEXTURE_2D,0,L,m,R,0,L,z,null),new l(y,N,m,R,L,z)}function b(y,m,R,L,z,F){var N=M(y);return y.texImage2D(y.TEXTURE_2D,0,z,z,F,m),new l(y,N,R,L,z,F)}function p(y,m){var R=m.dtype,L=m.shape.slice(),z=y.getParameter(y.MAX_TEXTURE_SIZE);if(L[0]<0||L[0]>z||L[1]<0||L[1]>z)throw new Error("gl-texture2d: Invalid texture size");var F=w(L,m.stride.slice()),N=0;R==="float32"?N=y.FLOAT:R==="float64"?(N=y.FLOAT,F=!1,R="float32"):R==="uint8"?N=y.UNSIGNED_BYTE:(N=y.UNSIGNED_BYTE,F=!1,R="uint8");var O=0;if(L.length===2)O=y.LUMINANCE,L=[L[0],L[1],1],m=o(m.data,L,[m.stride[0],m.stride[1],1],m.offset);else if(L.length===3)if(L[2]===1)O=y.ALPHA;else if(L[2]===2)O=y.LUMINANCE_ALPHA;else if(L[2]===3)O=y.RGB;else if(L[2]===4)O=y.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");else throw new Error("gl-texture2d: Invalid shape for texture");N===y.FLOAT&&!y.getExtension("OES_texture_float")&&(N=y.UNSIGNED_BYTE,F=!1);var P,U,B=m.size;if(F)m.offset===0&&m.data.length===B?P=m.data:P=m.data.subarray(m.offset,m.offset+B);else{var X=[L[2],L[2]*L[0],1];U=n.malloc(B,R);var $=o(U,L,X,0);(R==="float32"||R==="float64")&&N===y.UNSIGNED_BYTE?c($,m):a.assign($,m),P=U.subarray(0,B)}var le=M(y);return y.texImage2D(y.TEXTURE_2D,0,O,L[0],L[1],0,O,N,P),F||n.free(U),new l(y,le,L[0],L[1],O,N)}function u(y){if(arguments.length<=1)throw new Error("gl-texture2d: Missing arguments for texture2d constructor");if(i||f(y),typeof arguments[1]=="number")return g(y,arguments[1],arguments[2],arguments[3]||y.RGBA,arguments[4]||y.UNSIGNED_BYTE);if(Array.isArray(arguments[1]))return g(y,arguments[1][0]|0,arguments[1][1]|0,arguments[2]||y.RGBA,arguments[3]||y.UNSIGNED_BYTE);if(typeof arguments[1]=="object"){var m=arguments[1],R=v(m)?m:m.raw;if(R)return b(y,R,m.width|0,m.height|0,arguments[2]||y.RGBA,arguments[3]||y.UNSIGNED_BYTE);if(m.shape&&m.data&&m.stride)return p(y,m)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")}},1433:function(e){"use strict";function t(r,o,a){o?o.bind():r.bindBuffer(r.ELEMENT_ARRAY_BUFFER,null);var n=r.getParameter(r.MAX_VERTEX_ATTRIBS)|0;if(a){if(a.length>n)throw new Error("gl-vao: Too many vertex attributes");for(var i=0;i1?0:Math.acos(c)}},9226:function(e){e.exports=t;function t(r,o){return r[0]=Math.ceil(o[0]),r[1]=Math.ceil(o[1]),r[2]=Math.ceil(o[2]),r}},3126:function(e){e.exports=t;function t(r){var o=new Float32Array(3);return o[0]=r[0],o[1]=r[1],o[2]=r[2],o}},3990:function(e){e.exports=t;function t(r,o){return r[0]=o[0],r[1]=o[1],r[2]=o[2],r}},1091:function(e){e.exports=t;function t(){var r=new Float32Array(3);return r[0]=0,r[1]=0,r[2]=0,r}},5911:function(e){e.exports=t;function t(r,o,a){var n=o[0],i=o[1],s=o[2],h=a[0],f=a[1],v=a[2];return r[0]=i*v-s*f,r[1]=s*h-n*v,r[2]=n*f-i*h,r}},5455:function(e,t,r){e.exports=r(7056)},7056:function(e){e.exports=t;function t(r,o){var a=o[0]-r[0],n=o[1]-r[1],i=o[2]-r[2];return Math.sqrt(a*a+n*n+i*i)}},4008:function(e,t,r){e.exports=r(6690)},6690:function(e){e.exports=t;function t(r,o,a){return r[0]=o[0]/a[0],r[1]=o[1]/a[1],r[2]=o[2]/a[2],r}},244:function(e){e.exports=t;function t(r,o){return r[0]*o[0]+r[1]*o[1]+r[2]*o[2]}},2613:function(e){e.exports=1e-6},9922:function(e,t,r){e.exports=a;var o=r(2613);function a(n,i){var s=n[0],h=n[1],f=n[2],v=i[0],c=i[1],T=i[2];return Math.abs(s-v)<=o*Math.max(1,Math.abs(s),Math.abs(v))&&Math.abs(h-c)<=o*Math.max(1,Math.abs(h),Math.abs(c))&&Math.abs(f-T)<=o*Math.max(1,Math.abs(f),Math.abs(T))}},9265:function(e){e.exports=t;function t(r,o){return r[0]===o[0]&&r[1]===o[1]&&r[2]===o[2]}},2681:function(e){e.exports=t;function t(r,o){return r[0]=Math.floor(o[0]),r[1]=Math.floor(o[1]),r[2]=Math.floor(o[2]),r}},5137:function(e,t,r){e.exports=a;var o=r(1091)();function a(n,i,s,h,f,v){var c,T;for(i||(i=3),s||(s=0),h?T=Math.min(h*i+s,n.length):T=n.length,c=s;c0&&(s=1/Math.sqrt(s),r[0]=o[0]*s,r[1]=o[1]*s,r[2]=o[2]*s),r}},7636:function(e){e.exports=t;function t(r,o){o=o||1;var a=Math.random()*2*Math.PI,n=Math.random()*2-1,i=Math.sqrt(1-n*n)*o;return r[0]=Math.cos(a)*i,r[1]=Math.sin(a)*i,r[2]=n*o,r}},6894:function(e){e.exports=t;function t(r,o,a,n){var i=a[1],s=a[2],h=o[1]-i,f=o[2]-s,v=Math.sin(n),c=Math.cos(n);return r[0]=o[0],r[1]=i+h*c-f*v,r[2]=s+h*v+f*c,r}},109:function(e){e.exports=t;function t(r,o,a,n){var i=a[0],s=a[2],h=o[0]-i,f=o[2]-s,v=Math.sin(n),c=Math.cos(n);return r[0]=i+f*v+h*c,r[1]=o[1],r[2]=s+f*c-h*v,r}},8692:function(e){e.exports=t;function t(r,o,a,n){var i=a[0],s=a[1],h=o[0]-i,f=o[1]-s,v=Math.sin(n),c=Math.cos(n);return r[0]=i+h*c-f*v,r[1]=s+h*v+f*c,r[2]=o[2],r}},2447:function(e){e.exports=t;function t(r,o){return r[0]=Math.round(o[0]),r[1]=Math.round(o[1]),r[2]=Math.round(o[2]),r}},6621:function(e){e.exports=t;function t(r,o,a){return r[0]=o[0]*a,r[1]=o[1]*a,r[2]=o[2]*a,r}},8489:function(e){e.exports=t;function t(r,o,a,n){return r[0]=o[0]+a[0]*n,r[1]=o[1]+a[1]*n,r[2]=o[2]+a[2]*n,r}},1463:function(e){e.exports=t;function t(r,o,a,n){return r[0]=o,r[1]=a,r[2]=n,r}},6141:function(e,t,r){e.exports=r(2953)},5486:function(e,t,r){e.exports=r(3066)},2953:function(e){e.exports=t;function t(r,o){var a=o[0]-r[0],n=o[1]-r[1],i=o[2]-r[2];return a*a+n*n+i*i}},3066:function(e){e.exports=t;function t(r){var o=r[0],a=r[1],n=r[2];return o*o+a*a+n*n}},2229:function(e,t,r){e.exports=r(6843)},6843:function(e){e.exports=t;function t(r,o,a){return r[0]=o[0]-a[0],r[1]=o[1]-a[1],r[2]=o[2]-a[2],r}},492:function(e){e.exports=t;function t(r,o,a){var n=o[0],i=o[1],s=o[2];return r[0]=n*a[0]+i*a[3]+s*a[6],r[1]=n*a[1]+i*a[4]+s*a[7],r[2]=n*a[2]+i*a[5]+s*a[8],r}},5673:function(e){e.exports=t;function t(r,o,a){var n=o[0],i=o[1],s=o[2],h=a[3]*n+a[7]*i+a[11]*s+a[15];return h=h||1,r[0]=(a[0]*n+a[4]*i+a[8]*s+a[12])/h,r[1]=(a[1]*n+a[5]*i+a[9]*s+a[13])/h,r[2]=(a[2]*n+a[6]*i+a[10]*s+a[14])/h,r}},264:function(e){e.exports=t;function t(r,o,a){var n=o[0],i=o[1],s=o[2],h=a[0],f=a[1],v=a[2],c=a[3],T=c*n+f*s-v*i,l=c*i+v*n-h*s,_=c*s+h*i-f*n,w=-h*n-f*i-v*s;return r[0]=T*c+w*-h+l*-v-_*-f,r[1]=l*c+w*-f+_*-h-T*-v,r[2]=_*c+w*-v+T*-f-l*-h,r}},4361:function(e){e.exports=t;function t(r,o,a){return r[0]=o[0]+a[0],r[1]=o[1]+a[1],r[2]=o[2]+a[2],r[3]=o[3]+a[3],r}},2335:function(e){e.exports=t;function t(r){var o=new Float32Array(4);return o[0]=r[0],o[1]=r[1],o[2]=r[2],o[3]=r[3],o}},2933:function(e){e.exports=t;function t(r,o){return r[0]=o[0],r[1]=o[1],r[2]=o[2],r[3]=o[3],r}},7536:function(e){e.exports=t;function t(){var r=new Float32Array(4);return r[0]=0,r[1]=0,r[2]=0,r[3]=0,r}},4691:function(e){e.exports=t;function t(r,o){var a=o[0]-r[0],n=o[1]-r[1],i=o[2]-r[2],s=o[3]-r[3];return Math.sqrt(a*a+n*n+i*i+s*s)}},1373:function(e){e.exports=t;function t(r,o,a){return r[0]=o[0]/a[0],r[1]=o[1]/a[1],r[2]=o[2]/a[2],r[3]=o[3]/a[3],r}},3750:function(e){e.exports=t;function t(r,o){return r[0]*o[0]+r[1]*o[1]+r[2]*o[2]+r[3]*o[3]}},3390:function(e){e.exports=t;function t(r,o,a,n){var i=new Float32Array(4);return i[0]=r,i[1]=o,i[2]=a,i[3]=n,i}},9970:function(e,t,r){e.exports={create:r(7536),clone:r(2335),fromValues:r(3390),copy:r(2933),set:r(4578),add:r(4361),subtract:r(6860),multiply:r(3576),divide:r(1373),min:r(2334),max:r(160),scale:r(9288),scaleAndAdd:r(4844),distance:r(4691),squaredDistance:r(7960),length:r(6808),squaredLength:r(483),negate:r(1498),inverse:r(4494),normalize:r(5177),dot:r(3750),lerp:r(2573),random:r(9131),transformMat4:r(5352),transformQuat:r(4041)}},4494:function(e){e.exports=t;function t(r,o){return r[0]=1/o[0],r[1]=1/o[1],r[2]=1/o[2],r[3]=1/o[3],r}},6808:function(e){e.exports=t;function t(r){var o=r[0],a=r[1],n=r[2],i=r[3];return Math.sqrt(o*o+a*a+n*n+i*i)}},2573:function(e){e.exports=t;function t(r,o,a,n){var i=o[0],s=o[1],h=o[2],f=o[3];return r[0]=i+n*(a[0]-i),r[1]=s+n*(a[1]-s),r[2]=h+n*(a[2]-h),r[3]=f+n*(a[3]-f),r}},160:function(e){e.exports=t;function t(r,o,a){return r[0]=Math.max(o[0],a[0]),r[1]=Math.max(o[1],a[1]),r[2]=Math.max(o[2],a[2]),r[3]=Math.max(o[3],a[3]),r}},2334:function(e){e.exports=t;function t(r,o,a){return r[0]=Math.min(o[0],a[0]),r[1]=Math.min(o[1],a[1]),r[2]=Math.min(o[2],a[2]),r[3]=Math.min(o[3],a[3]),r}},3576:function(e){e.exports=t;function t(r,o,a){return r[0]=o[0]*a[0],r[1]=o[1]*a[1],r[2]=o[2]*a[2],r[3]=o[3]*a[3],r}},1498:function(e){e.exports=t;function t(r,o){return r[0]=-o[0],r[1]=-o[1],r[2]=-o[2],r[3]=-o[3],r}},5177:function(e){e.exports=t;function t(r,o){var a=o[0],n=o[1],i=o[2],s=o[3],h=a*a+n*n+i*i+s*s;return h>0&&(h=1/Math.sqrt(h),r[0]=a*h,r[1]=n*h,r[2]=i*h,r[3]=s*h),r}},9131:function(e,t,r){var o=r(5177),a=r(9288);e.exports=n;function n(i,s){return s=s||1,i[0]=Math.random(),i[1]=Math.random(),i[2]=Math.random(),i[3]=Math.random(),o(i,i),a(i,i,s),i}},9288:function(e){e.exports=t;function t(r,o,a){return r[0]=o[0]*a,r[1]=o[1]*a,r[2]=o[2]*a,r[3]=o[3]*a,r}},4844:function(e){e.exports=t;function t(r,o,a,n){return r[0]=o[0]+a[0]*n,r[1]=o[1]+a[1]*n,r[2]=o[2]+a[2]*n,r[3]=o[3]+a[3]*n,r}},4578:function(e){e.exports=t;function t(r,o,a,n,i){return r[0]=o,r[1]=a,r[2]=n,r[3]=i,r}},7960:function(e){e.exports=t;function t(r,o){var a=o[0]-r[0],n=o[1]-r[1],i=o[2]-r[2],s=o[3]-r[3];return a*a+n*n+i*i+s*s}},483:function(e){e.exports=t;function t(r){var o=r[0],a=r[1],n=r[2],i=r[3];return o*o+a*a+n*n+i*i}},6860:function(e){e.exports=t;function t(r,o,a){return r[0]=o[0]-a[0],r[1]=o[1]-a[1],r[2]=o[2]-a[2],r[3]=o[3]-a[3],r}},5352:function(e){e.exports=t;function t(r,o,a){var n=o[0],i=o[1],s=o[2],h=o[3];return r[0]=a[0]*n+a[4]*i+a[8]*s+a[12]*h,r[1]=a[1]*n+a[5]*i+a[9]*s+a[13]*h,r[2]=a[2]*n+a[6]*i+a[10]*s+a[14]*h,r[3]=a[3]*n+a[7]*i+a[11]*s+a[15]*h,r}},4041:function(e){e.exports=t;function t(r,o,a){var n=o[0],i=o[1],s=o[2],h=a[0],f=a[1],v=a[2],c=a[3],T=c*n+f*s-v*i,l=c*i+v*n-h*s,_=c*s+h*i-f*n,w=-h*n-f*i-v*s;return r[0]=T*c+w*-h+l*-v-_*-f,r[1]=l*c+w*-f+_*-h-T*-v,r[2]=_*c+w*-v+T*-f-l*-h,r[3]=o[3],r}},1848:function(e,t,r){var o=r(4905),a=r(6468);e.exports=n;function n(i){for(var s=Array.isArray(i)?i:o(i),h=0;h0)continue;rt=ne.slice(0,1).join("")}return Q(rt),ce+=rt.length,P=P.slice(rt.length),P.length}while(!0)}function tt(){return/[^a-fA-F0-9]/.test(N)?(Q(P.join("")),F=h,L):(P.push(N),O=N,L+1)}function qe(){return N==="."||/[eE]/.test(N)?(P.push(N),F=w,O=N,L+1):N==="x"&&P.length===1&&P[0]==="0"?(F=u,P.push(N),O=N,L+1):/[^\d]/.test(N)?(Q(P.join("")),F=h,L):(P.push(N),O=N,L+1)}function he(){return N==="f"&&(P.push(N),O=N,L+=1),/[eE]/.test(N)||(N==="-"||N==="+")&&/[eE]/.test(O)?(P.push(N),O=N,L+1):/[^\d]/.test(N)?(Q(P.join("")),F=h,L):(P.push(N),O=N,L+1)}function ue(){if(/[^\d\w_]/.test(N)){var ne=P.join("");return j[ne]?F=g:ae[ne]?F=M:F=A,Q(P.join("")),F=h,L}return P.push(N),O=N,L+1}}},3508:function(e,t,r){var o=r(6852);o=o.slice().filter(function(a){return!/^(gl\_|texture)/.test(a)}),e.exports=o.concat(["gl_VertexID","gl_InstanceID","gl_Position","gl_PointSize","gl_FragCoord","gl_FrontFacing","gl_FragDepth","gl_PointCoord","gl_MaxVertexAttribs","gl_MaxVertexUniformVectors","gl_MaxVertexOutputVectors","gl_MaxFragmentInputVectors","gl_MaxVertexTextureImageUnits","gl_MaxCombinedTextureImageUnits","gl_MaxTextureImageUnits","gl_MaxFragmentUniformVectors","gl_MaxDrawBuffers","gl_MinProgramTexelOffset","gl_MaxProgramTexelOffset","gl_DepthRangeParameters","gl_DepthRange","trunc","round","roundEven","isnan","isinf","floatBitsToInt","floatBitsToUint","intBitsToFloat","uintBitsToFloat","packSnorm2x16","unpackSnorm2x16","packUnorm2x16","unpackUnorm2x16","packHalf2x16","unpackHalf2x16","outerProduct","transpose","determinant","inverse","texture","textureSize","textureProj","textureLod","textureOffset","texelFetch","texelFetchOffset","textureProjOffset","textureLodOffset","textureProjLod","textureProjLodOffset","textureGrad","textureGradOffset","textureProjGrad","textureProjGradOffset"])},6852:function(e){e.exports=["abs","acos","all","any","asin","atan","ceil","clamp","cos","cross","dFdx","dFdy","degrees","distance","dot","equal","exp","exp2","faceforward","floor","fract","gl_BackColor","gl_BackLightModelProduct","gl_BackLightProduct","gl_BackMaterial","gl_BackSecondaryColor","gl_ClipPlane","gl_ClipVertex","gl_Color","gl_DepthRange","gl_DepthRangeParameters","gl_EyePlaneQ","gl_EyePlaneR","gl_EyePlaneS","gl_EyePlaneT","gl_Fog","gl_FogCoord","gl_FogFragCoord","gl_FogParameters","gl_FragColor","gl_FragCoord","gl_FragData","gl_FragDepth","gl_FragDepthEXT","gl_FrontColor","gl_FrontFacing","gl_FrontLightModelProduct","gl_FrontLightProduct","gl_FrontMaterial","gl_FrontSecondaryColor","gl_LightModel","gl_LightModelParameters","gl_LightModelProducts","gl_LightProducts","gl_LightSource","gl_LightSourceParameters","gl_MaterialParameters","gl_MaxClipPlanes","gl_MaxCombinedTextureImageUnits","gl_MaxDrawBuffers","gl_MaxFragmentUniformComponents","gl_MaxLights","gl_MaxTextureCoords","gl_MaxTextureImageUnits","gl_MaxTextureUnits","gl_MaxVaryingFloats","gl_MaxVertexAttribs","gl_MaxVertexTextureImageUnits","gl_MaxVertexUniformComponents","gl_ModelViewMatrix","gl_ModelViewMatrixInverse","gl_ModelViewMatrixInverseTranspose","gl_ModelViewMatrixTranspose","gl_ModelViewProjectionMatrix","gl_ModelViewProjectionMatrixInverse","gl_ModelViewProjectionMatrixInverseTranspose","gl_ModelViewProjectionMatrixTranspose","gl_MultiTexCoord0","gl_MultiTexCoord1","gl_MultiTexCoord2","gl_MultiTexCoord3","gl_MultiTexCoord4","gl_MultiTexCoord5","gl_MultiTexCoord6","gl_MultiTexCoord7","gl_Normal","gl_NormalMatrix","gl_NormalScale","gl_ObjectPlaneQ","gl_ObjectPlaneR","gl_ObjectPlaneS","gl_ObjectPlaneT","gl_Point","gl_PointCoord","gl_PointParameters","gl_PointSize","gl_Position","gl_ProjectionMatrix","gl_ProjectionMatrixInverse","gl_ProjectionMatrixInverseTranspose","gl_ProjectionMatrixTranspose","gl_SecondaryColor","gl_TexCoord","gl_TextureEnvColor","gl_TextureMatrix","gl_TextureMatrixInverse","gl_TextureMatrixInverseTranspose","gl_TextureMatrixTranspose","gl_Vertex","greaterThan","greaterThanEqual","inversesqrt","length","lessThan","lessThanEqual","log","log2","matrixCompMult","max","min","mix","mod","normalize","not","notEqual","pow","radians","reflect","refract","sign","sin","smoothstep","sqrt","step","tan","texture2D","texture2DLod","texture2DProj","texture2DProjLod","textureCube","textureCubeLod","texture2DLodEXT","texture2DProjLodEXT","textureCubeLodEXT","texture2DGradEXT","texture2DProjGradEXT","textureCubeGradEXT"]},7932:function(e,t,r){var o=r(620);e.exports=o.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","uvec2","uvec3","uvec4","samplerCubeShadow","sampler2DArray","sampler2DArrayShadow","isampler2D","isampler3D","isamplerCube","isampler2DArray","usampler2D","usampler3D","usamplerCube","usampler2DArray","coherent","restrict","readonly","writeonly","resource","atomic_uint","noperspective","patch","sample","subroutine","common","partition","active","filter","image1D","image2D","image3D","imageCube","iimage1D","iimage2D","iimage3D","iimageCube","uimage1D","uimage2D","uimage3D","uimageCube","image1DArray","image2DArray","iimage1DArray","iimage2DArray","uimage1DArray","uimage2DArray","image1DShadow","image2DShadow","image1DArrayShadow","image2DArrayShadow","imageBuffer","iimageBuffer","uimageBuffer","sampler1DArray","sampler1DArrayShadow","isampler1D","isampler1DArray","usampler1D","usampler1DArray","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray"])},620:function(e){e.exports=["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","uint","void","bool","true","false","discard","return","mat2","mat3","mat4","vec2","vec3","vec4","ivec2","ivec3","ivec4","bvec2","bvec3","bvec4","sampler1D","sampler2D","sampler3D","samplerCube","sampler1DShadow","sampler2DShadow","struct","asm","class","union","enum","typedef","template","this","packed","goto","switch","default","inline","noinline","volatile","public","static","extern","external","interface","long","short","double","half","fixed","unsigned","input","output","hvec2","hvec3","hvec4","dvec2","dvec3","dvec4","fvec2","fvec3","fvec4","sampler2DRect","sampler3DRect","sampler2DRectShadow","sizeof","cast","namespace","using"]},7827:function(e){e.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},4905:function(e,t,r){var o=r(5874);e.exports=a;function a(n,i){var s=o(i),h=[];return h=h.concat(s(n)),h=h.concat(s(null)),h}},3236:function(e){e.exports=function(t){typeof t=="string"&&(t=[t]);for(var r=[].slice.call(arguments,1),o=[],a=0;a>1,T=-7,l=a?i-1:0,_=a?-1:1,w=r[o+l];for(l+=_,s=w&(1<<-T)-1,w>>=-T,T+=f;T>0;s=s*256+r[o+l],l+=_,T-=8);for(h=s&(1<<-T)-1,s>>=-T,T+=n;T>0;h=h*256+r[o+l],l+=_,T-=8);if(s===0)s=1-c;else{if(s===v)return h?NaN:(w?-1:1)*(1/0);h=h+Math.pow(2,n),s=s-c}return(w?-1:1)*h*Math.pow(2,s-n)},t.write=function(r,o,a,n,i,s){var h,f,v,c=s*8-i-1,T=(1<>1,_=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,w=n?0:s-1,A=n?1:-1,M=o<0||o===0&&1/o<0?1:0;for(o=Math.abs(o),isNaN(o)||o===1/0?(f=isNaN(o)?1:0,h=T):(h=Math.floor(Math.log(o)/Math.LN2),o*(v=Math.pow(2,-h))<1&&(h--,v*=2),h+l>=1?o+=_/v:o+=_*Math.pow(2,1-l),o*v>=2&&(h++,v/=2),h+l>=T?(f=0,h=T):h+l>=1?(f=(o*v-1)*Math.pow(2,i),h=h+l):(f=o*Math.pow(2,l-1)*Math.pow(2,i),h=0));i>=8;r[a+w]=f&255,w+=A,f/=256,i-=8);for(h=h<0;r[a+w]=h&255,w+=A,h/=256,c-=8);r[a+w-A]|=M*128}},8954:function(e,t,r){"use strict";e.exports=l;var o=r(3250),a=r(6803).Fw;function n(_,w,A){this.vertices=_,this.adjacent=w,this.boundary=A,this.lastVisited=-1}n.prototype.flip=function(){var _=this.vertices[0];this.vertices[0]=this.vertices[1],this.vertices[1]=_;var w=this.adjacent[0];this.adjacent[0]=this.adjacent[1],this.adjacent[1]=w};function i(_,w,A){this.vertices=_,this.cell=w,this.index=A}function s(_,w){return a(_.vertices,w.vertices)}function h(_){return function(){var w=this.tuple;return _.apply(this,w)}}function f(_){var w=o[_+1];return w||(w=o),h(w)}var v=[];function c(_,w,A){this.dimension=_,this.vertices=w,this.simplices=A,this.interior=A.filter(function(b){return!b.boundary}),this.tuple=new Array(_+1);for(var M=0;M<=_;++M)this.tuple[M]=this.vertices[M];var g=v[_];g||(g=v[_]=f(_)),this.orient=g}var T=c.prototype;T.handleBoundaryDegeneracy=function(_,w){var A=this.dimension,M=this.vertices.length-1,g=this.tuple,b=this.vertices,p=[_];for(_.lastVisited=-M;p.length>0;){_=p.pop();for(var u=_.adjacent,y=0;y<=A;++y){var m=u[y];if(!(!m.boundary||m.lastVisited<=-M)){for(var R=m.vertices,L=0;L<=A;++L){var z=R[L];z<0?g[L]=w:g[L]=b[z]}var F=this.orient();if(F>0)return m;m.lastVisited=-M,F===0&&p.push(m)}}}return null},T.walk=function(_,w){var A=this.vertices.length-1,M=this.dimension,g=this.vertices,b=this.tuple,p=w?this.interior.length*Math.random()|0:this.interior.length-1,u=this.interior[p];e:for(;!u.boundary;){for(var y=u.vertices,m=u.adjacent,R=0;R<=M;++R)b[R]=g[y[R]];u.lastVisited=A;for(var R=0;R<=M;++R){var L=m[R];if(!(L.lastVisited>=A)){var z=b[R];b[R]=_;var F=this.orient();if(b[R]=z,F<0){u=L;continue e}else L.boundary?L.lastVisited=-A:L.lastVisited=A}}return}return u},T.addPeaks=function(_,w){var A=this.vertices.length-1,M=this.dimension,g=this.vertices,b=this.tuple,p=this.interior,u=this.simplices,y=[w];w.lastVisited=A,w.vertices[w.vertices.indexOf(-1)]=A,w.boundary=!1,p.push(w);for(var m=[];y.length>0;){var w=y.pop(),R=w.vertices,L=w.adjacent,z=R.indexOf(A);if(!(z<0)){for(var F=0;F<=M;++F)if(F!==z){var N=L[F];if(!(!N.boundary||N.lastVisited>=A)){var O=N.vertices;if(N.lastVisited!==-A){for(var P=0,U=0;U<=M;++U)O[U]<0?(P=U,b[U]=_):b[U]=g[O[U]];var B=this.orient();if(B>0){O[P]=A,N.boundary=!1,p.push(N),y.push(N),N.lastVisited=A;continue}else N.lastVisited=-A}var X=N.adjacent,$=R.slice(),le=L.slice(),ce=new n($,le,!0);u.push(ce);var de=X.indexOf(w);if(!(de<0)){X[de]=ce,le[z]=N,$[F]=-1,le[F]=w,L[F]=ce,ce.flip();for(var U=0;U<=M;++U){var G=$[U];if(!(G<0||G===A)){for(var Y=new Array(M-1),ee=0,q=0;q<=M;++q){var se=$[q];se<0||q===U||(Y[ee++]=se)}m.push(new i(Y,ce,U))}}}}}}}m.sort(s);for(var F=0;F+1=0?p[y++]=u[R]:m=R&1;if(m===(_&1)){var L=p[0];p[0]=p[1],p[1]=L}w.push(p)}}return w};function l(_,w){var A=_.length;if(A===0)throw new Error("Must have at least d+1 points");var M=_[0].length;if(A<=M)throw new Error("Must input at least d+1 points");var g=_.slice(0,M+1),b=o.apply(void 0,g);if(b===0)throw new Error("Input not in general position");for(var p=new Array(M+1),u=0;u<=M;++u)p[u]=u;b<0&&(p[0]=1,p[1]=0);for(var y=new n(p,new Array(M+1),!1),m=y.adjacent,R=new Array(M+2),u=0;u<=M;++u){for(var L=p.slice(),z=0;z<=M;++z)z===u&&(L[z]=-1);var F=L[0];L[0]=L[1],L[1]=F;var N=new n(L,new Array(M+1),!0);m[u]=N,R[u]=N}R[M+1]=y;for(var u=0;u<=M;++u)for(var L=m[u].vertices,O=m[u].adjacent,z=0;z<=M;++z){var P=L[z];if(P<0){O[z]=y;continue}for(var U=0;U<=M;++U)m[U].vertices.indexOf(P)<0&&(O[z]=m[U])}for(var B=new c(M,g,R),X=!!w,u=M+1;u3*(R+1)?c(this,m):this.left.insert(m):this.left=b([m]);else if(m[0]>this.mid)this.right?4*(this.right.count+1)>3*(R+1)?c(this,m):this.right.insert(m):this.right=b([m]);else{var L=o.ge(this.leftPoints,m,M),z=o.ge(this.rightPoints,m,g);this.leftPoints.splice(L,0,m),this.rightPoints.splice(z,0,m)}},h.remove=function(m){var R=this.count-this.leftPoints;if(m[1]3*(R-1))return T(this,m);var z=this.left.remove(m);return z===i?(this.left=null,this.count-=1,n):(z===n&&(this.count-=1),z)}else if(m[0]>this.mid){if(!this.right)return a;var F=this.left?this.left.count:0;if(4*F>3*(R-1))return T(this,m);var z=this.right.remove(m);return z===i?(this.right=null,this.count-=1,n):(z===n&&(this.count-=1),z)}else{if(this.count===1)return this.leftPoints[0]===m?i:a;if(this.leftPoints.length===1&&this.leftPoints[0]===m){if(this.left&&this.right){for(var N=this,O=this.left;O.right;)N=O,O=O.right;if(N===this)O.right=this.right;else{var P=this.left,z=this.right;N.count-=O.count,N.right=O.left,O.left=P,O.right=z}f(this,O),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?f(this,this.left):f(this,this.right);return n}for(var P=o.ge(this.leftPoints,m,M);P=0&&m[z][1]>=R;--z){var F=L(m[z]);if(F)return F}}function w(m,R){for(var L=0;Lthis.mid){if(this.right){var L=this.right.queryPoint(m,R);if(L)return L}return _(this.rightPoints,m,R)}else return w(this.leftPoints,R)},h.queryInterval=function(m,R,L){if(mthis.mid&&this.right){var z=this.right.queryInterval(m,R,L);if(z)return z}return Rthis.mid?_(this.rightPoints,m,L):w(this.leftPoints,L)};function A(m,R){return m-R}function M(m,R){var L=m[0]-R[0];return L||m[1]-R[1]}function g(m,R){var L=m[1]-R[1];return L||m[0]-R[0]}function b(m){if(m.length===0)return null;for(var R=[],L=0;L>1],F=[],N=[],O=[],L=0;L13)&&o!==32&&o!==133&&o!==160&&o!==5760&&o!==6158&&(o<8192||o>8205)&&o!==8232&&o!==8233&&o!==8239&&o!==8287&&o!==8288&&o!==12288&&o!==65279)return!1;return!0}},395:function(e){function t(r,o,a){return r*(1-a)+o*a}e.exports=t},2652:function(e,t,r){var o=r(4335),a=r(6864),n=r(1903),i=r(9921),s=r(7608),h=r(5665),f={length:r(1387),normalize:r(3536),dot:r(244),cross:r(5911)},v=a(),c=a(),T=[0,0,0,0],l=[[0,0,0],[0,0,0],[0,0,0]],_=[0,0,0];e.exports=function(b,p,u,y,m,R){if(p||(p=[0,0,0]),u||(u=[0,0,0]),y||(y=[0,0,0]),m||(m=[0,0,0,1]),R||(R=[0,0,0,1]),!o(v,b)||(n(c,v),c[3]=0,c[7]=0,c[11]=0,c[15]=1,Math.abs(i(c)<1e-8)))return!1;var L=v[3],z=v[7],F=v[11],N=v[12],O=v[13],P=v[14],U=v[15];if(L!==0||z!==0||F!==0){T[0]=L,T[1]=z,T[2]=F,T[3]=U;var B=s(c,c);if(!B)return!1;h(c,c),w(m,T,c)}else m[0]=m[1]=m[2]=0,m[3]=1;if(p[0]=N,p[1]=O,p[2]=P,A(l,v),u[0]=f.length(l[0]),f.normalize(l[0],l[0]),y[0]=f.dot(l[0],l[1]),M(l[1],l[1],l[0],1,-y[0]),u[1]=f.length(l[1]),f.normalize(l[1],l[1]),y[0]/=u[1],y[1]=f.dot(l[0],l[2]),M(l[2],l[2],l[0],1,-y[1]),y[2]=f.dot(l[1],l[2]),M(l[2],l[2],l[1],1,-y[2]),u[2]=f.length(l[2]),f.normalize(l[2],l[2]),y[1]/=u[2],y[2]/=u[2],f.cross(_,l[1],l[2]),f.dot(l[0],_)<0)for(var X=0;X<3;X++)u[X]*=-1,l[X][0]*=-1,l[X][1]*=-1,l[X][2]*=-1;return R[0]=.5*Math.sqrt(Math.max(1+l[0][0]-l[1][1]-l[2][2],0)),R[1]=.5*Math.sqrt(Math.max(1-l[0][0]+l[1][1]-l[2][2],0)),R[2]=.5*Math.sqrt(Math.max(1-l[0][0]-l[1][1]+l[2][2],0)),R[3]=.5*Math.sqrt(Math.max(1+l[0][0]+l[1][1]+l[2][2],0)),l[2][1]>l[1][2]&&(R[0]=-R[0]),l[0][2]>l[2][0]&&(R[1]=-R[1]),l[1][0]>l[0][1]&&(R[2]=-R[2]),!0};function w(g,b,p){var u=b[0],y=b[1],m=b[2],R=b[3];return g[0]=p[0]*u+p[4]*y+p[8]*m+p[12]*R,g[1]=p[1]*u+p[5]*y+p[9]*m+p[13]*R,g[2]=p[2]*u+p[6]*y+p[10]*m+p[14]*R,g[3]=p[3]*u+p[7]*y+p[11]*m+p[15]*R,g}function A(g,b){g[0][0]=b[0],g[0][1]=b[1],g[0][2]=b[2],g[1][0]=b[4],g[1][1]=b[5],g[1][2]=b[6],g[2][0]=b[8],g[2][1]=b[9],g[2][2]=b[10]}function M(g,b,p,u,y){g[0]=b[0]*u+p[0]*y,g[1]=b[1]*u+p[1]*y,g[2]=b[2]*u+p[2]*y}},4335:function(e){e.exports=function(r,o){var a=o[15];if(a===0)return!1;for(var n=1/a,i=0;i<16;i++)r[i]=o[i]*n;return!0}},7442:function(e,t,r){var o=r(6658),a=r(7182),n=r(2652),i=r(9921),s=r(8648),h=T(),f=T(),v=T();e.exports=c;function c(w,A,M,g){if(i(A)===0||i(M)===0)return!1;var b=n(A,h.translate,h.scale,h.skew,h.perspective,h.quaternion),p=n(M,f.translate,f.scale,f.skew,f.perspective,f.quaternion);return!b||!p?!1:(o(v.translate,h.translate,f.translate,g),o(v.skew,h.skew,f.skew,g),o(v.scale,h.scale,f.scale,g),o(v.perspective,h.perspective,f.perspective,g),s(v.quaternion,h.quaternion,f.quaternion,g),a(w,v.translate,v.scale,v.skew,v.perspective,v.quaternion),!0)}function T(){return{translate:l(),scale:l(1),skew:l(),perspective:_(),quaternion:_()}}function l(w){return[w||0,w||0,w||0]}function _(){return[0,0,0,1]}},7182:function(e,t,r){var o={identity:r(7894),translate:r(7656),multiply:r(6760),create:r(6864),scale:r(2504),fromRotationTranslation:r(6743)},a=o.create(),n=o.create();e.exports=function(s,h,f,v,c,T){return o.identity(s),o.fromRotationTranslation(s,T,h),s[3]=c[0],s[7]=c[1],s[11]=c[2],s[15]=c[3],o.identity(n),v[2]!==0&&(n[9]=v[2],o.multiply(s,s,n)),v[1]!==0&&(n[9]=0,n[8]=v[1],o.multiply(s,s,n)),v[0]!==0&&(n[8]=0,n[4]=v[0],o.multiply(s,s,n)),o.scale(s,s,f),s}},1811:function(e,t,r){"use strict";var o=r(2478),a=r(7442),n=r(7608),i=r(5567),s=r(2408),h=r(7089),f=r(6582),v=r(7656),c=r(2504),T=r(3536),l=[0,0,0];e.exports=M;function _(g){this._components=g.slice(),this._time=[0],this.prevMatrix=g.slice(),this.nextMatrix=g.slice(),this.computedMatrix=g.slice(),this.computedInverse=g.slice(),this.computedEye=[0,0,0],this.computedUp=[0,0,0],this.computedCenter=[0,0,0],this.computedRadius=[0],this._limits=[-1/0,1/0]}var w=_.prototype;w.recalcMatrix=function(g){var b=this._time,p=o.le(b,g),u=this.computedMatrix;if(!(p<0)){var y=this._components;if(p===b.length-1)for(var m=16*p,R=0;R<16;++R)u[R]=y[m++];else{for(var L=b[p+1]-b[p],m=16*p,z=this.prevMatrix,F=!0,R=0;R<16;++R)z[R]=y[m++];for(var N=this.nextMatrix,R=0;R<16;++R)N[R]=y[m++],F=F&&z[R]===N[R];if(L<1e-6||F)for(var R=0;R<16;++R)u[R]=z[R];else a(u,z,N,(g-b[p])/L)}var O=this.computedUp;O[0]=u[1],O[1]=u[5],O[2]=u[9],T(O,O);var P=this.computedInverse;n(P,u);var U=this.computedEye,B=P[15];U[0]=P[12]/B,U[1]=P[13]/B,U[2]=P[14]/B;for(var X=this.computedCenter,$=Math.exp(this.computedRadius[0]),R=0;R<3;++R)X[R]=U[R]-u[2+4*R]*$}},w.idle=function(g){if(!(g1&&o(n[f[l-2]],n[f[l-1]],T)<=0;)l-=1,f.pop();for(f.push(c),l=v.length;l>1&&o(n[v[l-2]],n[v[l-1]],T)>=0;)l-=1,v.pop();v.push(c)}for(var _=new Array(v.length+f.length-2),w=0,s=0,A=f.length;s0;--M)_[w++]=v[M];return _}},351:function(e,t,r){"use strict";e.exports=a;var o=r(4687);function a(n,i){i||(i=n,n=window);var s=0,h=0,f=0,v={shift:!1,alt:!1,control:!1,meta:!1},c=!1;function T(m){var R=!1;return"altKey"in m&&(R=R||m.altKey!==v.alt,v.alt=!!m.altKey),"shiftKey"in m&&(R=R||m.shiftKey!==v.shift,v.shift=!!m.shiftKey),"ctrlKey"in m&&(R=R||m.ctrlKey!==v.control,v.control=!!m.ctrlKey),"metaKey"in m&&(R=R||m.metaKey!==v.meta,v.meta=!!m.metaKey),R}function l(m,R){var L=o.x(R),z=o.y(R);"buttons"in R&&(m=R.buttons|0),(m!==s||L!==h||z!==f||T(R))&&(s=m|0,h=L||0,f=z||0,i&&i(s,h,f,v))}function _(m){l(0,m)}function w(){(s||h||f||v.shift||v.alt||v.meta||v.control)&&(h=f=0,s=0,v.shift=v.alt=v.control=v.meta=!1,i&&i(0,0,0,v))}function A(m){T(m)&&i&&i(s,h,f,v)}function M(m){o.buttons(m)===0?l(0,m):l(s,m)}function g(m){l(s|o.buttons(m),m)}function b(m){l(s&~o.buttons(m),m)}function p(){c||(c=!0,n.addEventListener("mousemove",M),n.addEventListener("mousedown",g),n.addEventListener("mouseup",b),n.addEventListener("mouseleave",_),n.addEventListener("mouseenter",_),n.addEventListener("mouseout",_),n.addEventListener("mouseover",_),n.addEventListener("blur",w),n.addEventListener("keyup",A),n.addEventListener("keydown",A),n.addEventListener("keypress",A),n!==window&&(window.addEventListener("blur",w),window.addEventListener("keyup",A),window.addEventListener("keydown",A),window.addEventListener("keypress",A)))}function u(){c&&(c=!1,n.removeEventListener("mousemove",M),n.removeEventListener("mousedown",g),n.removeEventListener("mouseup",b),n.removeEventListener("mouseleave",_),n.removeEventListener("mouseenter",_),n.removeEventListener("mouseout",_),n.removeEventListener("mouseover",_),n.removeEventListener("blur",w),n.removeEventListener("keyup",A),n.removeEventListener("keydown",A),n.removeEventListener("keypress",A),n!==window&&(window.removeEventListener("blur",w),window.removeEventListener("keyup",A),window.removeEventListener("keydown",A),window.removeEventListener("keypress",A)))}p();var y={element:n};return Object.defineProperties(y,{enabled:{get:function(){return c},set:function(m){m?p():u()},enumerable:!0},buttons:{get:function(){return s},enumerable:!0},x:{get:function(){return h},enumerable:!0},y:{get:function(){return f},enumerable:!0},mods:{get:function(){return v},enumerable:!0}}),y}},24:function(e){var t={left:0,top:0};e.exports=r;function r(a,n,i){n=n||a.currentTarget||a.srcElement,Array.isArray(i)||(i=[0,0]);var s=a.clientX||0,h=a.clientY||0,f=o(n);return i[0]=s-f.left,i[1]=h-f.top,i}function o(a){return a===window||a===document||a===document.body?t:a.getBoundingClientRect()}},4687:function(e,t){"use strict";function r(i){if(typeof i=="object"){if("buttons"in i)return i.buttons;if("which"in i){var s=i.which;if(s===2)return 4;if(s===3)return 2;if(s>0)return 1<=0)return 1<0){if(le=1,G[ee++]=v(p[R],w,A,M),R+=B,g>0)for($=1,L=p[R],q=G[ee]=v(L,w,A,M),j=G[ee+se],pe=G[ee+Q],Ie=G[ee+we],(q!==j||q!==pe||q!==Ie)&&(F=p[R+z],O=p[R+N],U=p[R+P],h($,le,L,F,O,U,q,j,pe,Ie,w,A,M),Re=Y[ee]=ce++),ee+=1,R+=B,$=2;$0)for($=1,L=p[R],q=G[ee]=v(L,w,A,M),j=G[ee+se],pe=G[ee+Q],Ie=G[ee+we],(q!==j||q!==pe||q!==Ie)&&(F=p[R+z],O=p[R+N],U=p[R+P],h($,le,L,F,O,U,q,j,pe,Ie,w,A,M),Re=Y[ee]=ce++,Ie!==pe&&f(Y[ee+Q],Re,O,U,pe,Ie,w,A,M)),ee+=1,R+=B,$=2;$0){if($=1,G[ee++]=v(p[R],w,A,M),R+=B,b>0)for(le=1,L=p[R],q=G[ee]=v(L,w,A,M),pe=G[ee+Q],j=G[ee+se],Ie=G[ee+we],(q!==pe||q!==j||q!==Ie)&&(F=p[R+z],O=p[R+N],U=p[R+P],h($,le,L,F,O,U,q,pe,j,Ie,w,A,M),Re=Y[ee]=ce++),ee+=1,R+=B,le=2;le0)for(le=1,L=p[R],q=G[ee]=v(L,w,A,M),pe=G[ee+Q],j=G[ee+se],Ie=G[ee+we],(q!==pe||q!==j||q!==Ie)&&(F=p[R+z],O=p[R+N],U=p[R+P],h($,le,L,F,O,U,q,pe,j,Ie,w,A,M),Re=Y[ee]=ce++,Ie!==pe&&f(Y[ee+Q],Re,U,F,Ie,pe,w,A,M)),ee+=1,R+=B,le=2;le 0"),typeof s.vertex!="function"&&h("Must specify vertex creation function"),typeof s.cell!="function"&&h("Must specify cell creation function"),typeof s.phase!="function"&&h("Must specify phase function");for(var T=s.getters||[],l=new Array(v),_=0;_=0?l[_]=!0:l[_]=!1;return n(s.vertex,s.cell,s.phase,c,f,l)}},6199:function(e,t,r){"use strict";var o=r(1338),a={zero:function(M,g,b,p){var u=M[0],y=b[0];p|=0;var m=0,R=y;for(m=0;m2&&m[1]>2&&p(y.pick(-1,-1).lo(1,1).hi(m[0]-2,m[1]-2),u.pick(-1,-1,0).lo(1,1).hi(m[0]-2,m[1]-2),u.pick(-1,-1,1).lo(1,1).hi(m[0]-2,m[1]-2)),m[1]>2&&(b(y.pick(0,-1).lo(1).hi(m[1]-2),u.pick(0,-1,1).lo(1).hi(m[1]-2)),g(u.pick(0,-1,0).lo(1).hi(m[1]-2))),m[1]>2&&(b(y.pick(m[0]-1,-1).lo(1).hi(m[1]-2),u.pick(m[0]-1,-1,1).lo(1).hi(m[1]-2)),g(u.pick(m[0]-1,-1,0).lo(1).hi(m[1]-2))),m[0]>2&&(b(y.pick(-1,0).lo(1).hi(m[0]-2),u.pick(-1,0,0).lo(1).hi(m[0]-2)),g(u.pick(-1,0,1).lo(1).hi(m[0]-2))),m[0]>2&&(b(y.pick(-1,m[1]-1).lo(1).hi(m[0]-2),u.pick(-1,m[1]-1,0).lo(1).hi(m[0]-2)),g(u.pick(-1,m[1]-1,1).lo(1).hi(m[0]-2))),u.set(0,0,0,0),u.set(0,0,1,0),u.set(m[0]-1,0,0,0),u.set(m[0]-1,0,1,0),u.set(0,m[1]-1,0,0),u.set(0,m[1]-1,1,0),u.set(m[0]-1,m[1]-1,0,0),u.set(m[0]-1,m[1]-1,1,0),u}}function A(M){var g=M.join(),m=v[g];if(m)return m;for(var b=M.length,p=[T,l],u=1;u<=b;++u)p.push(_(u));var y=w,m=y.apply(void 0,p);return v[g]=m,m}e.exports=function(g,b,p){if(Array.isArray(p)||(typeof p=="string"?p=o(b.dimension,p):p=o(b.dimension,"clamp")),b.size===0)return g;if(b.dimension===0)return g.set(0),g;var u=A(p);return u(g,b)}},4317:function(e){"use strict";function t(i,s){var h=Math.floor(s),f=s-h,v=0<=h&&h0;){O<64?(g=O,O=0):(g=64,O-=64);for(var P=v[1]|0;P>0;){P<64?(b=P,P=0):(b=64,P-=64),l=F+O*u+P*y,A=N+O*R+P*L;var U=0,B=0,X=0,$=m,le=u-p*m,ce=y-g*u,de=z,G=R-p*z,Y=L-g*R;for(X=0;X0;){L<64?(g=L,L=0):(g=64,L-=64);for(var z=v[0]|0;z>0;){z<64?(M=z,z=0):(M=64,z-=64),l=m+L*p+z*b,A=R+L*y+z*u;var F=0,N=0,O=p,P=b-g*p,U=y,B=u-g*y;for(N=0;N0;){N<64?(b=N,N=0):(b=64,N-=64);for(var O=v[0]|0;O>0;){O<64?(M=O,O=0):(M=64,O-=64);for(var P=v[1]|0;P>0;){P<64?(g=P,P=0):(g=64,P-=64),l=z+N*y+O*p+P*u,A=F+N*L+O*m+P*R;var U=0,B=0,X=0,$=y,le=p-b*y,ce=u-M*p,de=L,G=m-b*L,Y=R-M*m;for(X=0;X_;){U=0,B=F-g;t:for(O=0;O$)break t;B+=m,U+=R}for(U=F,B=F-g,O=0;O>1,P=O-z,U=O+z,B=F,X=P,$=O,le=U,ce=N,de=w+1,G=A-1,Y=!0,ee,q,se,ae,j,Q,re,pe,we,Se=0,Ie=0,Re=0,We,at,nt,tt,qe,he,ue,ne,Ce,Ye,rt,Ke,Mt,kt,Nt,Gt,Mr=y,mr=T(Mr),qr=T(Mr);at=b*B,nt=b*X,Gt=g;e:for(We=0;We0){q=B,B=X,X=q;break e}if(Re<0)break e;Gt+=R}at=b*le,nt=b*ce,Gt=g;e:for(We=0;We0){q=le,le=ce,ce=q;break e}if(Re<0)break e;Gt+=R}at=b*B,nt=b*$,Gt=g;e:for(We=0;We0){q=B,B=$,$=q;break e}if(Re<0)break e;Gt+=R}at=b*X,nt=b*$,Gt=g;e:for(We=0;We0){q=X,X=$,$=q;break e}if(Re<0)break e;Gt+=R}at=b*B,nt=b*le,Gt=g;e:for(We=0;We0){q=B,B=le,le=q;break e}if(Re<0)break e;Gt+=R}at=b*$,nt=b*le,Gt=g;e:for(We=0;We0){q=$,$=le,le=q;break e}if(Re<0)break e;Gt+=R}at=b*X,nt=b*ce,Gt=g;e:for(We=0;We0){q=X,X=ce,ce=q;break e}if(Re<0)break e;Gt+=R}at=b*X,nt=b*$,Gt=g;e:for(We=0;We0){q=X,X=$,$=q;break e}if(Re<0)break e;Gt+=R}at=b*le,nt=b*ce,Gt=g;e:for(We=0;We0){q=le,le=ce,ce=q;break e}if(Re<0)break e;Gt+=R}for(at=b*B,nt=b*X,tt=b*$,qe=b*le,he=b*ce,ue=b*F,ne=b*O,Ce=b*N,Nt=0,Gt=g,We=0;We0)G--;else if(Re<0){for(at=b*Q,nt=b*de,tt=b*G,Gt=g,We=0;We0)for(;;){re=g+G*b,Nt=0;e:for(We=0;We0){if(--GN){e:for(;;){for(re=g+de*b,Nt=0,Gt=g,We=0;We1&&_?A(l,_[0],_[1]):A(l)}var f={"uint32,1,0":function(c,T){return function(l){var _=l.data,w=l.offset|0,A=l.shape,M=l.stride,g=M[0]|0,b=A[0]|0,p=M[1]|0,u=A[1]|0,y=p,m=p,R=1;b<=32?c(0,b-1,_,w,g,p,b,u,y,m,R):T(0,b-1,_,w,g,p,b,u,y,m,R)}}};function v(c,T){var l=[T,c].join(","),_=f[l],w=i(c,T),A=h(c,T,w);return _(w,A)}e.exports=v},446:function(e,t,r){"use strict";var o=r(7640),a={};function n(i){var s=i.order,h=i.dtype,f=[s,h],v=f.join(":"),c=a[v];return c||(a[v]=c=o(s,h)),c(i),i}e.exports=n},9618:function(e,t,r){var o=r(7163),a=typeof Float64Array<"u";function n(T,l){return T[0]-l[0]}function i(){var T=this.stride,l=new Array(T.length),_;for(_=0;_=0&&(p=g|0,b+=y*p,u-=p),new w(this.data,u,y,b)},A.step=function(g){var b=this.shape[0],p=this.stride[0],u=this.offset,y=0,m=Math.ceil;return typeof g=="number"&&(y=g|0,y<0?(u+=p*(b-1),b=m(-b/y)):b=m(b/y),p*=y),new w(this.data,b,p,u)},A.transpose=function(g){g=g===void 0?0:g|0;var b=this.shape,p=this.stride;return new w(this.data,b[g],p[g],this.offset)},A.pick=function(g){var b=[],p=[],u=this.offset;typeof g=="number"&&g>=0?u=u+this.stride[0]*g|0:(b.push(this.shape[0]),p.push(this.stride[0]));var y=l[b.length+1];return y(this.data,b,p,u)},function(g,b,p,u){return new w(g,b[0],p[0],u)}},2:function(T,l,_){function w(M,g,b,p,u,y){this.data=M,this.shape=[g,b],this.stride=[p,u],this.offset=y|0}var A=w.prototype;return A.dtype=T,A.dimension=2,Object.defineProperty(A,"size",{get:function(){return this.shape[0]*this.shape[1]}}),Object.defineProperty(A,"order",{get:function(){return Math.abs(this.stride[0])>Math.abs(this.stride[1])?[1,0]:[0,1]}}),A.set=function(g,b,p){return T==="generic"?this.data.set(this.offset+this.stride[0]*g+this.stride[1]*b,p):this.data[this.offset+this.stride[0]*g+this.stride[1]*b]=p},A.get=function(g,b){return T==="generic"?this.data.get(this.offset+this.stride[0]*g+this.stride[1]*b):this.data[this.offset+this.stride[0]*g+this.stride[1]*b]},A.index=function(g,b){return this.offset+this.stride[0]*g+this.stride[1]*b},A.hi=function(g,b){return new w(this.data,typeof g!="number"||g<0?this.shape[0]:g|0,typeof b!="number"||b<0?this.shape[1]:b|0,this.stride[0],this.stride[1],this.offset)},A.lo=function(g,b){var p=this.offset,u=0,y=this.shape[0],m=this.shape[1],R=this.stride[0],L=this.stride[1];return typeof g=="number"&&g>=0&&(u=g|0,p+=R*u,y-=u),typeof b=="number"&&b>=0&&(u=b|0,p+=L*u,m-=u),new w(this.data,y,m,R,L,p)},A.step=function(g,b){var p=this.shape[0],u=this.shape[1],y=this.stride[0],m=this.stride[1],R=this.offset,L=0,z=Math.ceil;return typeof g=="number"&&(L=g|0,L<0?(R+=y*(p-1),p=z(-p/L)):p=z(p/L),y*=L),typeof b=="number"&&(L=b|0,L<0?(R+=m*(u-1),u=z(-u/L)):u=z(u/L),m*=L),new w(this.data,p,u,y,m,R)},A.transpose=function(g,b){g=g===void 0?0:g|0,b=b===void 0?1:b|0;var p=this.shape,u=this.stride;return new w(this.data,p[g],p[b],u[g],u[b],this.offset)},A.pick=function(g,b){var p=[],u=[],y=this.offset;typeof g=="number"&&g>=0?y=y+this.stride[0]*g|0:(p.push(this.shape[0]),u.push(this.stride[0])),typeof b=="number"&&b>=0?y=y+this.stride[1]*b|0:(p.push(this.shape[1]),u.push(this.stride[1]));var m=l[p.length+1];return m(this.data,p,u,y)},function(g,b,p,u){return new w(g,b[0],b[1],p[0],p[1],u)}},3:function(T,l,_){function w(M,g,b,p,u,y,m,R){this.data=M,this.shape=[g,b,p],this.stride=[u,y,m],this.offset=R|0}var A=w.prototype;return A.dtype=T,A.dimension=3,Object.defineProperty(A,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]}}),Object.defineProperty(A,"order",{get:function(){var g=Math.abs(this.stride[0]),b=Math.abs(this.stride[1]),p=Math.abs(this.stride[2]);return g>b?b>p?[2,1,0]:g>p?[1,2,0]:[1,0,2]:g>p?[2,0,1]:p>b?[0,1,2]:[0,2,1]}}),A.set=function(g,b,p,u){return T==="generic"?this.data.set(this.offset+this.stride[0]*g+this.stride[1]*b+this.stride[2]*p,u):this.data[this.offset+this.stride[0]*g+this.stride[1]*b+this.stride[2]*p]=u},A.get=function(g,b,p){return T==="generic"?this.data.get(this.offset+this.stride[0]*g+this.stride[1]*b+this.stride[2]*p):this.data[this.offset+this.stride[0]*g+this.stride[1]*b+this.stride[2]*p]},A.index=function(g,b,p){return this.offset+this.stride[0]*g+this.stride[1]*b+this.stride[2]*p},A.hi=function(g,b,p){return new w(this.data,typeof g!="number"||g<0?this.shape[0]:g|0,typeof b!="number"||b<0?this.shape[1]:b|0,typeof p!="number"||p<0?this.shape[2]:p|0,this.stride[0],this.stride[1],this.stride[2],this.offset)},A.lo=function(g,b,p){var u=this.offset,y=0,m=this.shape[0],R=this.shape[1],L=this.shape[2],z=this.stride[0],F=this.stride[1],N=this.stride[2];return typeof g=="number"&&g>=0&&(y=g|0,u+=z*y,m-=y),typeof b=="number"&&b>=0&&(y=b|0,u+=F*y,R-=y),typeof p=="number"&&p>=0&&(y=p|0,u+=N*y,L-=y),new w(this.data,m,R,L,z,F,N,u)},A.step=function(g,b,p){var u=this.shape[0],y=this.shape[1],m=this.shape[2],R=this.stride[0],L=this.stride[1],z=this.stride[2],F=this.offset,N=0,O=Math.ceil;return typeof g=="number"&&(N=g|0,N<0?(F+=R*(u-1),u=O(-u/N)):u=O(u/N),R*=N),typeof b=="number"&&(N=b|0,N<0?(F+=L*(y-1),y=O(-y/N)):y=O(y/N),L*=N),typeof p=="number"&&(N=p|0,N<0?(F+=z*(m-1),m=O(-m/N)):m=O(m/N),z*=N),new w(this.data,u,y,m,R,L,z,F)},A.transpose=function(g,b,p){g=g===void 0?0:g|0,b=b===void 0?1:b|0,p=p===void 0?2:p|0;var u=this.shape,y=this.stride;return new w(this.data,u[g],u[b],u[p],y[g],y[b],y[p],this.offset)},A.pick=function(g,b,p){var u=[],y=[],m=this.offset;typeof g=="number"&&g>=0?m=m+this.stride[0]*g|0:(u.push(this.shape[0]),y.push(this.stride[0])),typeof b=="number"&&b>=0?m=m+this.stride[1]*b|0:(u.push(this.shape[1]),y.push(this.stride[1])),typeof p=="number"&&p>=0?m=m+this.stride[2]*p|0:(u.push(this.shape[2]),y.push(this.stride[2]));var R=l[u.length+1];return R(this.data,u,y,m)},function(g,b,p,u){return new w(g,b[0],b[1],b[2],p[0],p[1],p[2],u)}},4:function(T,l,_){function w(M,g,b,p,u,y,m,R,L,z){this.data=M,this.shape=[g,b,p,u],this.stride=[y,m,R,L],this.offset=z|0}var A=w.prototype;return A.dtype=T,A.dimension=4,Object.defineProperty(A,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]}}),Object.defineProperty(A,"order",{get:_}),A.set=function(g,b,p,u,y){return T==="generic"?this.data.set(this.offset+this.stride[0]*g+this.stride[1]*b+this.stride[2]*p+this.stride[3]*u,y):this.data[this.offset+this.stride[0]*g+this.stride[1]*b+this.stride[2]*p+this.stride[3]*u]=y},A.get=function(g,b,p,u){return T==="generic"?this.data.get(this.offset+this.stride[0]*g+this.stride[1]*b+this.stride[2]*p+this.stride[3]*u):this.data[this.offset+this.stride[0]*g+this.stride[1]*b+this.stride[2]*p+this.stride[3]*u]},A.index=function(g,b,p,u){return this.offset+this.stride[0]*g+this.stride[1]*b+this.stride[2]*p+this.stride[3]*u},A.hi=function(g,b,p,u){return new w(this.data,typeof g!="number"||g<0?this.shape[0]:g|0,typeof b!="number"||b<0?this.shape[1]:b|0,typeof p!="number"||p<0?this.shape[2]:p|0,typeof u!="number"||u<0?this.shape[3]:u|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.offset)},A.lo=function(g,b,p,u){var y=this.offset,m=0,R=this.shape[0],L=this.shape[1],z=this.shape[2],F=this.shape[3],N=this.stride[0],O=this.stride[1],P=this.stride[2],U=this.stride[3];return typeof g=="number"&&g>=0&&(m=g|0,y+=N*m,R-=m),typeof b=="number"&&b>=0&&(m=b|0,y+=O*m,L-=m),typeof p=="number"&&p>=0&&(m=p|0,y+=P*m,z-=m),typeof u=="number"&&u>=0&&(m=u|0,y+=U*m,F-=m),new w(this.data,R,L,z,F,N,O,P,U,y)},A.step=function(g,b,p,u){var y=this.shape[0],m=this.shape[1],R=this.shape[2],L=this.shape[3],z=this.stride[0],F=this.stride[1],N=this.stride[2],O=this.stride[3],P=this.offset,U=0,B=Math.ceil;return typeof g=="number"&&(U=g|0,U<0?(P+=z*(y-1),y=B(-y/U)):y=B(y/U),z*=U),typeof b=="number"&&(U=b|0,U<0?(P+=F*(m-1),m=B(-m/U)):m=B(m/U),F*=U),typeof p=="number"&&(U=p|0,U<0?(P+=N*(R-1),R=B(-R/U)):R=B(R/U),N*=U),typeof u=="number"&&(U=u|0,U<0?(P+=O*(L-1),L=B(-L/U)):L=B(L/U),O*=U),new w(this.data,y,m,R,L,z,F,N,O,P)},A.transpose=function(g,b,p,u){g=g===void 0?0:g|0,b=b===void 0?1:b|0,p=p===void 0?2:p|0,u=u===void 0?3:u|0;var y=this.shape,m=this.stride;return new w(this.data,y[g],y[b],y[p],y[u],m[g],m[b],m[p],m[u],this.offset)},A.pick=function(g,b,p,u){var y=[],m=[],R=this.offset;typeof g=="number"&&g>=0?R=R+this.stride[0]*g|0:(y.push(this.shape[0]),m.push(this.stride[0])),typeof b=="number"&&b>=0?R=R+this.stride[1]*b|0:(y.push(this.shape[1]),m.push(this.stride[1])),typeof p=="number"&&p>=0?R=R+this.stride[2]*p|0:(y.push(this.shape[2]),m.push(this.stride[2])),typeof u=="number"&&u>=0?R=R+this.stride[3]*u|0:(y.push(this.shape[3]),m.push(this.stride[3]));var L=l[y.length+1];return L(this.data,y,m,R)},function(g,b,p,u){return new w(g,b[0],b[1],b[2],b[3],p[0],p[1],p[2],p[3],u)}},5:function(l,_,w){function A(g,b,p,u,y,m,R,L,z,F,N,O){this.data=g,this.shape=[b,p,u,y,m],this.stride=[R,L,z,F,N],this.offset=O|0}var M=A.prototype;return M.dtype=l,M.dimension=5,Object.defineProperty(M,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]*this.shape[4]}}),Object.defineProperty(M,"order",{get:w}),M.set=function(b,p,u,y,m,R){return l==="generic"?this.data.set(this.offset+this.stride[0]*b+this.stride[1]*p+this.stride[2]*u+this.stride[3]*y+this.stride[4]*m,R):this.data[this.offset+this.stride[0]*b+this.stride[1]*p+this.stride[2]*u+this.stride[3]*y+this.stride[4]*m]=R},M.get=function(b,p,u,y,m){return l==="generic"?this.data.get(this.offset+this.stride[0]*b+this.stride[1]*p+this.stride[2]*u+this.stride[3]*y+this.stride[4]*m):this.data[this.offset+this.stride[0]*b+this.stride[1]*p+this.stride[2]*u+this.stride[3]*y+this.stride[4]*m]},M.index=function(b,p,u,y,m){return this.offset+this.stride[0]*b+this.stride[1]*p+this.stride[2]*u+this.stride[3]*y+this.stride[4]*m},M.hi=function(b,p,u,y,m){return new A(this.data,typeof b!="number"||b<0?this.shape[0]:b|0,typeof p!="number"||p<0?this.shape[1]:p|0,typeof u!="number"||u<0?this.shape[2]:u|0,typeof y!="number"||y<0?this.shape[3]:y|0,typeof m!="number"||m<0?this.shape[4]:m|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},M.lo=function(b,p,u,y,m){var R=this.offset,L=0,z=this.shape[0],F=this.shape[1],N=this.shape[2],O=this.shape[3],P=this.shape[4],U=this.stride[0],B=this.stride[1],X=this.stride[2],$=this.stride[3],le=this.stride[4];return typeof b=="number"&&b>=0&&(L=b|0,R+=U*L,z-=L),typeof p=="number"&&p>=0&&(L=p|0,R+=B*L,F-=L),typeof u=="number"&&u>=0&&(L=u|0,R+=X*L,N-=L),typeof y=="number"&&y>=0&&(L=y|0,R+=$*L,O-=L),typeof m=="number"&&m>=0&&(L=m|0,R+=le*L,P-=L),new A(this.data,z,F,N,O,P,U,B,X,$,le,R)},M.step=function(b,p,u,y,m){var R=this.shape[0],L=this.shape[1],z=this.shape[2],F=this.shape[3],N=this.shape[4],O=this.stride[0],P=this.stride[1],U=this.stride[2],B=this.stride[3],X=this.stride[4],$=this.offset,le=0,ce=Math.ceil;return typeof b=="number"&&(le=b|0,le<0?($+=O*(R-1),R=ce(-R/le)):R=ce(R/le),O*=le),typeof p=="number"&&(le=p|0,le<0?($+=P*(L-1),L=ce(-L/le)):L=ce(L/le),P*=le),typeof u=="number"&&(le=u|0,le<0?($+=U*(z-1),z=ce(-z/le)):z=ce(z/le),U*=le),typeof y=="number"&&(le=y|0,le<0?($+=B*(F-1),F=ce(-F/le)):F=ce(F/le),B*=le),typeof m=="number"&&(le=m|0,le<0?($+=X*(N-1),N=ce(-N/le)):N=ce(N/le),X*=le),new A(this.data,R,L,z,F,N,O,P,U,B,X,$)},M.transpose=function(b,p,u,y,m){b=b===void 0?0:b|0,p=p===void 0?1:p|0,u=u===void 0?2:u|0,y=y===void 0?3:y|0,m=m===void 0?4:m|0;var R=this.shape,L=this.stride;return new A(this.data,R[b],R[p],R[u],R[y],R[m],L[b],L[p],L[u],L[y],L[m],this.offset)},M.pick=function(b,p,u,y,m){var R=[],L=[],z=this.offset;typeof b=="number"&&b>=0?z=z+this.stride[0]*b|0:(R.push(this.shape[0]),L.push(this.stride[0])),typeof p=="number"&&p>=0?z=z+this.stride[1]*p|0:(R.push(this.shape[1]),L.push(this.stride[1])),typeof u=="number"&&u>=0?z=z+this.stride[2]*u|0:(R.push(this.shape[2]),L.push(this.stride[2])),typeof y=="number"&&y>=0?z=z+this.stride[3]*y|0:(R.push(this.shape[3]),L.push(this.stride[3])),typeof m=="number"&&m>=0?z=z+this.stride[4]*m|0:(R.push(this.shape[4]),L.push(this.stride[4]));var F=_[R.length+1];return F(this.data,R,L,z)},function(b,p,u,y){return new A(b,p[0],p[1],p[2],p[3],p[4],u[0],u[1],u[2],u[3],u[4],y)}}};function h(T,l){var _=l===-1?"T":String(l),w=s[_];return l===-1?w(T):l===0?w(T,v[T][0]):w(T,v[T],i)}function f(T){if(o(T))return"buffer";if(a)switch(Object.prototype.toString.call(T)){case"[object Float64Array]":return"float64";case"[object Float32Array]":return"float32";case"[object Int8Array]":return"int8";case"[object Int16Array]":return"int16";case"[object Int32Array]":return"int32";case"[object Uint8ClampedArray]":return"uint8_clamped";case"[object Uint8Array]":return"uint8";case"[object Uint16Array]":return"uint16";case"[object Uint32Array]":return"uint32";case"[object BigInt64Array]":return"bigint64";case"[object BigUint64Array]":return"biguint64"}return Array.isArray(T)?"array":"generic"}var v={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};function c(T,l,_,w){if(T===void 0){var u=v.array[0];return u([])}else typeof T=="number"&&(T=[T]);l===void 0&&(l=[T.length]);var A=l.length;if(_===void 0){_=new Array(A);for(var M=A-1,g=1;M>=0;--M)_[M]=g,g*=l[M]}if(w===void 0){w=0;for(var M=0;M>>0;e.exports=i;function i(s,h){if(isNaN(s)||isNaN(h))return NaN;if(s===h)return s;if(s===0)return h<0?-a:a;var f=o.hi(s),v=o.lo(s);return h>s==s>0?v===n?(f+=1,v=0):v+=1:v===0?(v=n,f-=1):v-=1,o.pack(v,f)}},8406:function(e,t){var r=1e-6,o=1e-6;t.vertexNormals=function(a,n,i){for(var s=n.length,h=new Array(s),f=i===void 0?r:i,v=0;vf)for(var R=h[l],L=1/Math.sqrt(p*y),m=0;m<3;++m){var z=(m+1)%3,F=(m+2)%3;R[m]+=L*(u[z]*b[F]-u[F]*b[z])}}for(var v=0;vf)for(var L=1/Math.sqrt(N),m=0;m<3;++m)R[m]*=L;else for(var m=0;m<3;++m)R[m]=0}return h},t.faceNormals=function(a,n,i){for(var s=a.length,h=new Array(s),f=i===void 0?o:i,v=0;vf?M=1/Math.sqrt(M):M=0;for(var l=0;l<3;++l)A[l]*=M;h[v]=A}return h}},4081:function(e){"use strict";e.exports=t;function t(r,o,a,n,i,s,h,f,v,c){var T=o+s+c;if(l>0){var l=Math.sqrt(T+1);r[0]=.5*(h-v)/l,r[1]=.5*(f-n)/l,r[2]=.5*(a-s)/l,r[3]=.5*l}else{var _=Math.max(o,s,c),l=Math.sqrt(2*_-T+1);o>=_?(r[0]=.5*l,r[1]=.5*(i+a)/l,r[2]=.5*(f+n)/l,r[3]=.5*(h-v)/l):s>=_?(r[0]=.5*(a+i)/l,r[1]=.5*l,r[2]=.5*(v+h)/l,r[3]=.5*(f-n)/l):(r[0]=.5*(n+f)/l,r[1]=.5*(h+v)/l,r[2]=.5*l,r[3]=.5*(a-i)/l)}return r}},9977:function(e,t,r){"use strict";e.exports=l;var o=r(9215),a=r(6582),n=r(7399),i=r(7608),s=r(4081);function h(_,w,A){return Math.sqrt(Math.pow(_,2)+Math.pow(w,2)+Math.pow(A,2))}function f(_,w,A,M){return Math.sqrt(Math.pow(_,2)+Math.pow(w,2)+Math.pow(A,2)+Math.pow(M,2))}function v(_,w){var A=w[0],M=w[1],g=w[2],b=w[3],p=f(A,M,g,b);p>1e-6?(_[0]=A/p,_[1]=M/p,_[2]=g/p,_[3]=b/p):(_[0]=_[1]=_[2]=0,_[3]=1)}function c(_,w,A){this.radius=o([A]),this.center=o(w),this.rotation=o(_),this.computedRadius=this.radius.curve(0),this.computedCenter=this.center.curve(0),this.computedRotation=this.rotation.curve(0),this.computedUp=[.1,0,0],this.computedEye=[.1,0,0],this.computedMatrix=[.1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.recalcMatrix(0)}var T=c.prototype;T.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},T.recalcMatrix=function(_){this.radius.curve(_),this.center.curve(_),this.rotation.curve(_);var w=this.computedRotation;v(w,w);var A=this.computedMatrix;n(A,w);var M=this.computedCenter,g=this.computedEye,b=this.computedUp,p=Math.exp(this.computedRadius[0]);g[0]=M[0]+p*A[2],g[1]=M[1]+p*A[6],g[2]=M[2]+p*A[10],b[0]=A[1],b[1]=A[5],b[2]=A[9];for(var u=0;u<3;++u){for(var y=0,m=0;m<3;++m)y+=A[u+4*m]*g[m];A[12+u]=-y}},T.getMatrix=function(_,w){this.recalcMatrix(_);var A=this.computedMatrix;if(w){for(var M=0;M<16;++M)w[M]=A[M];return w}return A},T.idle=function(_){this.center.idle(_),this.radius.idle(_),this.rotation.idle(_)},T.flush=function(_){this.center.flush(_),this.radius.flush(_),this.rotation.flush(_)},T.pan=function(_,w,A,M){w=w||0,A=A||0,M=M||0,this.recalcMatrix(_);var g=this.computedMatrix,b=g[1],p=g[5],u=g[9],y=h(b,p,u);b/=y,p/=y,u/=y;var m=g[0],R=g[4],L=g[8],z=m*b+R*p+L*u;m-=b*z,R-=p*z,L-=u*z;var F=h(m,R,L);m/=F,R/=F,L/=F;var N=g[2],O=g[6],P=g[10],U=N*b+O*p+P*u,B=N*m+O*R+P*L;N-=U*b+B*m,O-=U*p+B*R,P-=U*u+B*L;var X=h(N,O,P);N/=X,O/=X,P/=X;var $=m*w+b*A,le=R*w+p*A,ce=L*w+u*A;this.center.move(_,$,le,ce);var de=Math.exp(this.computedRadius[0]);de=Math.max(1e-4,de+M),this.radius.set(_,Math.log(de))},T.rotate=function(_,w,A,M){this.recalcMatrix(_),w=w||0,A=A||0;var g=this.computedMatrix,b=g[0],p=g[4],u=g[8],y=g[1],m=g[5],R=g[9],L=g[2],z=g[6],F=g[10],N=w*b+A*y,O=w*p+A*m,P=w*u+A*R,U=-(z*P-F*O),B=-(F*N-L*P),X=-(L*O-z*N),$=Math.sqrt(Math.max(0,1-Math.pow(U,2)-Math.pow(B,2)-Math.pow(X,2))),le=f(U,B,X,$);le>1e-6?(U/=le,B/=le,X/=le,$/=le):(U=B=X=0,$=1);var ce=this.computedRotation,de=ce[0],G=ce[1],Y=ce[2],ee=ce[3],q=de*$+ee*U+G*X-Y*B,se=G*$+ee*B+Y*U-de*X,ae=Y*$+ee*X+de*B-G*U,j=ee*$-de*U-G*B-Y*X;if(M){U=L,B=z,X=F;var Q=Math.sin(M)/h(U,B,X);U*=Q,B*=Q,X*=Q,$=Math.cos(w),q=q*$+j*U+se*X-ae*B,se=se*$+j*B+ae*U-q*X,ae=ae*$+j*X+q*B-se*U,j=j*$-q*U-se*B-ae*X}var re=f(q,se,ae,j);re>1e-6?(q/=re,se/=re,ae/=re,j/=re):(q=se=ae=0,j=1),this.rotation.set(_,q,se,ae,j)},T.lookAt=function(_,w,A,M){this.recalcMatrix(_),A=A||this.computedCenter,w=w||this.computedEye,M=M||this.computedUp;var g=this.computedMatrix;a(g,w,A,M);var b=this.computedRotation;s(b,g[0],g[1],g[2],g[4],g[5],g[6],g[8],g[9],g[10]),v(b,b),this.rotation.set(_,b[0],b[1],b[2],b[3]);for(var p=0,u=0;u<3;++u)p+=Math.pow(A[u]-w[u],2);this.radius.set(_,.5*Math.log(Math.max(p,1e-6))),this.center.set(_,A[0],A[1],A[2])},T.translate=function(_,w,A,M){this.center.move(_,w||0,A||0,M||0)},T.setMatrix=function(_,w){var A=this.computedRotation;s(A,w[0],w[1],w[2],w[4],w[5],w[6],w[8],w[9],w[10]),v(A,A),this.rotation.set(_,A[0],A[1],A[2],A[3]);var M=this.computedMatrix;i(M,w);var g=M[15];if(Math.abs(g)>1e-6){var b=M[12]/g,p=M[13]/g,u=M[14]/g;this.recalcMatrix(_);var y=Math.exp(this.computedRadius[0]);this.center.set(_,b-M[2]*y,p-M[6]*y,u-M[10]*y),this.radius.idle(_)}else this.center.idle(_),this.radius.idle(_)},T.setDistance=function(_,w){w>0&&this.radius.set(_,Math.log(w))},T.setDistanceLimits=function(_,w){_>0?_=Math.log(_):_=-1/0,w>0?w=Math.log(w):w=1/0,w=Math.max(w,_),this.radius.bounds[0][0]=_,this.radius.bounds[1][0]=w},T.getDistanceLimits=function(_){var w=this.radius.bounds;return _?(_[0]=Math.exp(w[0][0]),_[1]=Math.exp(w[1][0]),_):[Math.exp(w[0][0]),Math.exp(w[1][0])]},T.toJSON=function(){return this.recalcMatrix(this.lastT()),{center:this.computedCenter.slice(),rotation:this.computedRotation.slice(),distance:Math.log(this.computedRadius[0]),zoomMin:this.radius.bounds[0][0],zoomMax:this.radius.bounds[1][0]}},T.fromJSON=function(_){var w=this.lastT(),A=_.center;A&&this.center.set(w,A[0],A[1],A[2]);var M=_.rotation;M&&this.rotation.set(w,M[0],M[1],M[2],M[3]);var g=_.distance;g&&g>0&&this.radius.set(w,Math.log(g)),this.setDistanceLimits(_.zoomMin,_.zoomMax)};function l(_){_=_||{};var w=_.center||[0,0,0],A=_.rotation||[0,0,0,1],M=_.radius||1;w=[].slice.call(w,0,3),A=[].slice.call(A,0,4),v(A,A);var g=new c(A,w,Math.log(M));return g.setDistanceLimits(_.zoomMin,_.zoomMax),("eye"in _||"up"in _)&&g.lookAt(0,_.eye,_.center,_.up),g}},1371:function(e,t,r){"use strict";var o=r(3233);e.exports=function(n,i,s){return s=typeof s<"u"?s+"":" ",o(s,i)+n}},3202:function(e){e.exports=function(r,o){o||(o=[0,""]),r=String(r);var a=parseFloat(r,10);return o[0]=a,o[1]=r.match(/[\d.\-\+]*\s*(.*)/)[1]||"",o}},3088:function(e,t,r){"use strict";e.exports=a;var o=r(3140);function a(n,i){for(var s=i.length|0,h=n.length,f=[new Array(s),new Array(s)],v=0;v0){R=f[F][y][0],z=F;break}L=R[z^1];for(var N=0;N<2;++N)for(var O=f[N][y],P=0;P0&&(R=U,L=B,z=N)}return m||R&&l(R,z),L}function w(u,y){var m=f[y][u][0],R=[u];l(m,y);for(var L=m[y^1],z=y;;){for(;L!==u;)R.push(L),L=_(R[R.length-2],L,!1);if(f[0][u].length+f[1][u].length===0)break;var F=R[R.length-1],N=u,O=R[1],P=_(F,N,!0);if(o(i[F],i[N],i[O],i[P])<0)break;R.push(u),L=_(F,N)}return R}function A(u,y){return y[1]===y[y.length-1]}for(var v=0;v0;){var b=f[0][v].length,p=w(v,M);A(g,p)?g.push.apply(g,p):(g.length>0&&T.push(g),g=p)}g.length>0&&T.push(g)}return T}},5609:function(e,t,r){"use strict";e.exports=a;var o=r(3134);function a(n,i){for(var s=o(n,i.length),h=new Array(i.length),f=new Array(i.length),v=[],c=0;c0;){var l=v.pop();h[l]=!1;for(var _=s[l],c=0;c<_.length;++c){var w=_[c];--f[w]===0&&v.push(w)}}for(var A=new Array(i.length),M=[],c=0;c0}b=b.filter(p);for(var u=b.length,y=new Array(u),m=new Array(u),g=0;g0;){var re=ae.pop(),pe=le[re];h(pe,function(We,at){return We-at});var we=pe.length,Se=j[re],Ie;if(Se===0){var O=b[re];Ie=[O]}for(var g=0;g=0)&&(j[Re]=Se^1,ae.push(Re),Se===0)){var O=b[Re];se(O)||(O.reverse(),Ie.push(O))}}Se===0&&Q.push(Ie)}return Q}},5085:function(e,t,r){e.exports=_;var o=r(3250)[3],a=r(4209),n=r(3352),i=r(2478);function s(){return!0}function h(w){return function(A,M){var g=w[A];return g?!!g.queryPoint(M,s):!1}}function f(w){for(var A={},M=0;M0&&A[g]===M[0])b=w[g-1];else return 1;for(var p=1;b;){var u=b.key,y=o(M,u[0],u[1]);if(u[0][0]0)p=-1,b=b.right;else return 0;else if(y>0)b=b.left;else if(y<0)p=1,b=b.right;else return 0}return p}}function c(w){return 1}function T(w){return function(M){return w(M[0],M[1])?0:1}}function l(w,A){return function(g){return w(g[0],g[1])?0:A(g)}}function _(w){for(var A=w.length,M=[],g=[],b=0,p=0;p=c?(u=1,m=c+2*_+A):(u=-_/c,m=_*u+A)):(u=0,w>=0?(y=0,m=A):-w>=l?(y=1,m=l+2*w+A):(y=-w/l,m=w*y+A));else if(y<0)y=0,_>=0?(u=0,m=A):-_>=c?(u=1,m=c+2*_+A):(u=-_/c,m=_*u+A);else{var R=1/p;u*=R,y*=R,m=u*(c*u+T*y+2*_)+y*(T*u+l*y+2*w)+A}else{var L,z,F,N;u<0?(L=T+_,z=l+w,z>L?(F=z-L,N=c-2*T+l,F>=N?(u=1,y=0,m=c+2*_+A):(u=F/N,y=1-u,m=u*(c*u+T*y+2*_)+y*(T*u+l*y+2*w)+A)):(u=0,z<=0?(y=1,m=l+2*w+A):w>=0?(y=0,m=A):(y=-w/l,m=w*y+A))):y<0?(L=T+w,z=c+_,z>L?(F=z-L,N=c-2*T+l,F>=N?(y=1,u=0,m=l+2*w+A):(y=F/N,u=1-y,m=u*(c*u+T*y+2*_)+y*(T*u+l*y+2*w)+A)):(y=0,z<=0?(u=1,m=c+2*_+A):_>=0?(u=0,m=A):(u=-_/c,m=_*u+A))):(F=l+w-T-_,F<=0?(u=0,y=1,m=l+2*w+A):(N=c-2*T+l,F>=N?(u=1,y=0,m=c+2*_+A):(u=F/N,y=1-u,m=u*(c*u+T*y+2*_)+y*(T*u+l*y+2*w)+A)))}for(var O=1-u-y,v=0;v0){var l=s[f-1];if(o(c,l)===0&&n(l)!==T){f-=1;continue}}s[f++]=c}}return s.length=f,s}},3233:function(e){"use strict";var t="",r;e.exports=o;function o(a,n){if(typeof a!="string")throw new TypeError("expected a string");if(n===1)return a;if(n===2)return a+a;var i=a.length*n;if(r!==a||typeof r>"u")r=a,t="";else if(t.length>=i)return t.substr(0,i);for(;i>t.length&&n>1;)n&1&&(t+=a),n>>=1,a+=a;return t+=a,t=t.substr(0,i),t}},3025:function(e,t,r){e.exports=r.g.performance&&r.g.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}},7004:function(e){"use strict";e.exports=t;function t(r){for(var o=r.length,a=r[r.length-1],n=o,i=o-2;i>=0;--i){var s=a,h=r[i];a=s+h;var f=a-s,v=h-f;v&&(r[--n]=a,a=v)}for(var c=0,i=n;i0){if(z<=0)return F;N=L+z}else if(L<0){if(z>=0)return F;N=-(L+z)}else return F;var O=f*N;return F>=O||F<=-O?F:w(y,m,R)},function(y,m,R,L){var z=y[0]-L[0],F=m[0]-L[0],N=R[0]-L[0],O=y[1]-L[1],P=m[1]-L[1],U=R[1]-L[1],B=y[2]-L[2],X=m[2]-L[2],$=R[2]-L[2],le=F*U,ce=N*P,de=N*O,G=z*U,Y=z*P,ee=F*O,q=B*(le-ce)+X*(de-G)+$*(Y-ee),se=(Math.abs(le)+Math.abs(ce))*Math.abs(B)+(Math.abs(de)+Math.abs(G))*Math.abs(X)+(Math.abs(Y)+Math.abs(ee))*Math.abs($),ae=v*se;return q>ae||-q>ae?q:A(y,m,R,L)}];function g(u){var y=M[u.length];return y||(y=M[u.length]=_(u.length)),y.apply(void 0,u)}function b(u,y,m,R,L,z,F){return function(O,P,U,B,X){switch(arguments.length){case 0:case 1:return 0;case 2:return R(O,P);case 3:return L(O,P,U);case 4:return z(O,P,U,B);case 5:return F(O,P,U,B,X)}for(var $=new Array(arguments.length),le=0;le0&&c>0||v<0&&c<0)return!1;var T=o(h,i,s),l=o(f,i,s);return T>0&&l>0||T<0&&l<0?!1:v===0&&c===0&&T===0&&l===0?a(i,s,h,f):!0}},8545:function(e){"use strict";e.exports=r;function t(o,a){var n=o+a,i=n-o,s=n-i,h=a-i,f=o-s,v=f+h;return v?[v,n]:[n]}function r(o,a){var n=o.length|0,i=a.length|0;if(n===1&&i===1)return t(o[0],-a[0]);var s=n+i,h=new Array(s),f=0,v=0,c=0,T=Math.abs,l=o[v],_=T(l),w=-a[c],A=T(w),M,g;_=i?(M=l,v+=1,v=i?(M=l,v+=1,v"u"&&(M=s(_));var g=_.length;if(g===0||M<1)return{cells:[],vertexIds:[],vertexWeights:[]};var b=h(w,+A),p=f(_,M),u=v(p,w,b,+A),y=c(p,w.length|0),m=i(M)(_,p.data,y,b),R=T(p),L=[].slice.call(u.data,0,u.shape[0]);return a.free(b),a.free(p.data),a.free(u.data),a.free(y),{cells:m,vertexIds:R,vertexWeights:L}}},1570:function(e){"use strict";e.exports=r;var t=[function(){function a(i,s,h,f){for(var v=Math.min(h,f)|0,c=Math.max(h,f)|0,T=i[2*v],l=i[2*v+1];T>1,w=s[2*_+1];if(w===c)return _;c>1,w=s[2*_+1];if(w===c)return _;c>1,w=s[2*_+1];if(w===c)return _;c>1,w=s[2*_+1];if(w===c)return _;c>1,N=f(y[F],m);N<=0?(N===0&&(z=F),R=F+1):N>0&&(L=F-1)}return z}o=l;function _(y,m){for(var R=new Array(y.length),L=0,z=R.length;L=y.length||f(y[le],F)!==0););}return R}o=_;function w(y,m){if(!m)return _(T(M(y,0)),y,0);for(var R=new Array(m),L=0;L>>U&1&&P.push(z[U]);m.push(P)}return c(m)}o=A;function M(y,m){if(m<0)return[];for(var R=[],L=(1<0)-(n<0)},t.abs=function(n){var i=n>>r-1;return(n^i)-i},t.min=function(n,i){return i^(n^i)&-(n65535)<<4,n>>>=i,s=(n>255)<<3,n>>>=s,i|=s,s=(n>15)<<2,n>>>=s,i|=s,s=(n>3)<<1,n>>>=s,i|=s,i|n>>1},t.log10=function(n){return n>=1e9?9:n>=1e8?8:n>=1e7?7:n>=1e6?6:n>=1e5?5:n>=1e4?4:n>=1e3?3:n>=100?2:n>=10?1:0},t.popCount=function(n){return n=n-(n>>>1&1431655765),n=(n&858993459)+(n>>>2&858993459),(n+(n>>>4)&252645135)*16843009>>>24};function o(n){var i=32;return n&=-n,n&&i--,n&65535&&(i-=16),n&16711935&&(i-=8),n&252645135&&(i-=4),n&858993459&&(i-=2),n&1431655765&&(i-=1),i}t.countTrailingZeros=o,t.nextPow2=function(n){return n+=n===0,--n,n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n+1},t.prevPow2=function(n){return n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n-(n>>>1)},t.parity=function(n){return n^=n>>>16,n^=n>>>8,n^=n>>>4,n&=15,27030>>>n&1};var a=new Array(256);(function(n){for(var i=0;i<256;++i){var s=i,h=i,f=7;for(s>>>=1;s;s>>>=1)h<<=1,h|=s&1,--f;n[i]=h<>>8&255]<<16|a[n>>>16&255]<<8|a[n>>>24&255]},t.interleave2=function(n,i){return n&=65535,n=(n|n<<8)&16711935,n=(n|n<<4)&252645135,n=(n|n<<2)&858993459,n=(n|n<<1)&1431655765,i&=65535,i=(i|i<<8)&16711935,i=(i|i<<4)&252645135,i=(i|i<<2)&858993459,i=(i|i<<1)&1431655765,n|i<<1},t.deinterleave2=function(n,i){return n=n>>>i&1431655765,n=(n|n>>>1)&858993459,n=(n|n>>>2)&252645135,n=(n|n>>>4)&16711935,n=(n|n>>>16)&65535,n<<16>>16},t.interleave3=function(n,i,s){return n&=1023,n=(n|n<<16)&4278190335,n=(n|n<<8)&251719695,n=(n|n<<4)&3272356035,n=(n|n<<2)&1227133513,i&=1023,i=(i|i<<16)&4278190335,i=(i|i<<8)&251719695,i=(i|i<<4)&3272356035,i=(i|i<<2)&1227133513,n|=i<<1,s&=1023,s=(s|s<<16)&4278190335,s=(s|s<<8)&251719695,s=(s|s<<4)&3272356035,s=(s|s<<2)&1227133513,n|s<<2},t.deinterleave3=function(n,i){return n=n>>>i&1227133513,n=(n|n>>>2)&3272356035,n=(n|n>>>4)&251719695,n=(n|n>>>8)&4278190335,n=(n|n>>>16)&1023,n<<22>>22},t.nextCombination=function(n){var i=n|n-1;return i+1|(~i&-~i)-1>>>o(n)+1}},2014:function(e,t,r){"use strict";"use restrict";var o=r(3105),a=r(4623);function n(u){for(var y=0,m=Math.max,R=0,L=u.length;R>1,F=h(u[z],y);F<=0?(F===0&&(L=z),m=z+1):F>0&&(R=z-1)}return L}t.findCell=T;function l(u,y){for(var m=new Array(u.length),R=0,L=m.length;R=u.length||h(u[$],z)!==0););}return m}t.incidence=l;function _(u,y){if(!y)return l(c(A(u,0)),u,0);for(var m=new Array(y),R=0;R>>P&1&&O.push(L[P]);y.push(O)}return v(y)}t.explode=w;function A(u,y){if(y<0)return[];for(var m=[],R=(1<>1:(G>>1)-1}function R(G){for(var Y=y(G);;){var ee=Y,q=2*G+1,se=2*(G+1),ae=G;if(q0;){var ee=m(G);if(ee>=0){var q=y(ee);if(Y0){var G=O[0];return u(0,B-1),B-=1,R(0),G}return-1}function F(G,Y){var ee=O[G];return _[ee]===Y?G:(_[ee]=-1/0,L(G),z(),_[ee]=Y,B+=1,L(B-1))}function N(G){if(!w[G]){w[G]=!0;var Y=T[G],ee=l[G];T[ee]>=0&&(T[ee]=Y),l[Y]>=0&&(l[Y]=ee),P[Y]>=0&&F(P[Y],p(Y)),P[ee]>=0&&F(P[ee],p(ee))}}for(var O=[],P=new Array(v),A=0;A>1;A>=0;--A)R(A);for(;;){var X=z();if(X<0||_[X]>f)break;N(X)}for(var $=[],A=0;A=0&&ee>=0&&Y!==ee){var q=P[Y],se=P[ee];q!==se&&de.push([q,se])}}),a.unique(a.normalize(de)),{positions:$,edges:de}}},1303:function(e,t,r){"use strict";e.exports=n;var o=r(3250);function a(i,s){var h,f;if(s[0][0]s[1][0])h=s[1],f=s[0];else{var v=Math.min(i[0][1],i[1][1]),c=Math.max(i[0][1],i[1][1]),T=Math.min(s[0][1],s[1][1]),l=Math.max(s[0][1],s[1][1]);return cl?v-l:c-l}var _,w;i[0][1]s[1][0])h=s[1],f=s[0];else return a(s,i);var v,c;if(i[0][0]i[1][0])v=i[1],c=i[0];else return-a(i,s);var T=o(h,f,c),l=o(h,f,v);if(T<0){if(l<=0)return T}else if(T>0){if(l>=0)return T}else if(l)return l;if(T=o(c,v,f),l=o(c,v,h),T<0){if(l<=0)return T}else if(T>0){if(l>=0)return T}else if(l)return l;return f[0]-c[0]}},4209:function(e,t,r){"use strict";e.exports=l;var o=r(2478),a=r(3840),n=r(3250),i=r(1303);function s(_,w,A){this.slabs=_,this.coordinates=w,this.horizontal=A}var h=s.prototype;function f(_,w){return _.y-w}function v(_,w){for(var A=null;_;){var M=_.key,g,b;M[0][0]0)if(w[0]!==M[1][0])A=_,_=_.right;else{var u=v(_.right,w);if(u)return u;_=_.left}else{if(w[0]!==M[1][0])return _;var u=v(_.right,w);if(u)return u;_=_.left}}return A}h.castUp=function(_){var w=o.le(this.coordinates,_[0]);if(w<0)return-1;var A=this.slabs[w],M=v(this.slabs[w],_),g=-1;if(M&&(g=M.value),this.coordinates[w]===_[0]){var b=null;if(M&&(b=M.key),w>0){var p=v(this.slabs[w-1],_);p&&(b?i(p.key,b)>0&&(b=p.key,g=p.value):(g=p.value,b=p.key))}var u=this.horizontal[w];if(u.length>0){var y=o.ge(u,_[1],f);if(y=u.length)return g;m=u[y]}}if(m.start)if(b){var R=n(b[0],b[1],[_[0],m.y]);b[0][0]>b[1][0]&&(R=-R),R>0&&(g=m.index)}else g=m.index;else m.y!==_[1]&&(g=m.index)}}}return g};function c(_,w,A,M){this.y=_,this.index=w,this.start=A,this.closed=M}function T(_,w,A,M){this.x=_,this.segment=w,this.create=A,this.index=M}function l(_){for(var w=_.length,A=2*w,M=new Array(A),g=0;g1&&(w=1);for(var A=1-w,M=v.length,g=new Array(M),b=0;b0||_>0&&g<0){var b=i(w,g,A,_);T.push(b),l.push(b.slice())}g<0?l.push(A.slice()):g>0?T.push(A.slice()):(T.push(A.slice()),l.push(A.slice())),_=g}return{positive:T,negative:l}}function h(v,c){for(var T=[],l=n(v[v.length-1],c),_=v[v.length-1],w=v[0],A=0;A0||l>0&&M<0)&&T.push(i(_,M,w,l)),M>=0&&T.push(w.slice()),l=M}return T}function f(v,c){for(var T=[],l=n(v[v.length-1],c),_=v[v.length-1],w=v[0],A=0;A0||l>0&&M<0)&&T.push(i(_,M,w,l)),M<=0&&T.push(w.slice()),l=M}return T}},3387:function(e,t,r){var o;(function(){"use strict";var a={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function n(v){return s(f(v),arguments)}function i(v,c){return n.apply(null,[v].concat(c||[]))}function s(v,c){var T=1,l=v.length,_,w="",A,M,g,b,p,u,y,m;for(A=0;A=0),g.type){case"b":_=parseInt(_,10).toString(2);break;case"c":_=String.fromCharCode(parseInt(_,10));break;case"d":case"i":_=parseInt(_,10);break;case"j":_=JSON.stringify(_,null,g.width?parseInt(g.width):0);break;case"e":_=g.precision?parseFloat(_).toExponential(g.precision):parseFloat(_).toExponential();break;case"f":_=g.precision?parseFloat(_).toFixed(g.precision):parseFloat(_);break;case"g":_=g.precision?String(Number(_.toPrecision(g.precision))):parseFloat(_);break;case"o":_=(parseInt(_,10)>>>0).toString(8);break;case"s":_=String(_),_=g.precision?_.substring(0,g.precision):_;break;case"t":_=String(!!_),_=g.precision?_.substring(0,g.precision):_;break;case"T":_=Object.prototype.toString.call(_).slice(8,-1).toLowerCase(),_=g.precision?_.substring(0,g.precision):_;break;case"u":_=parseInt(_,10)>>>0;break;case"v":_=_.valueOf(),_=g.precision?_.substring(0,g.precision):_;break;case"x":_=(parseInt(_,10)>>>0).toString(16);break;case"X":_=(parseInt(_,10)>>>0).toString(16).toUpperCase();break}a.json.test(g.type)?w+=_:(a.number.test(g.type)&&(!y||g.sign)?(m=y?"+":"-",_=_.toString().replace(a.sign,"")):m="",p=g.pad_char?g.pad_char==="0"?"0":g.pad_char.charAt(1):" ",u=g.width-(m+_).length,b=g.width&&u>0?p.repeat(u):"",w+=g.align?m+_+b:p==="0"?m+b+_:b+m+_)}return w}var h=Object.create(null);function f(v){if(h[v])return h[v];for(var c=v,T,l=[],_=0;c;){if((T=a.text.exec(c))!==null)l.push(T[0]);else if((T=a.modulo.exec(c))!==null)l.push("%");else if((T=a.placeholder.exec(c))!==null){if(T[2]){_|=1;var w=[],A=T[2],M=[];if((M=a.key.exec(A))!==null)for(w.push(M[1]);(A=A.substring(M[0].length))!=="";)if((M=a.key_access.exec(A))!==null)w.push(M[1]);else if((M=a.index_access.exec(A))!==null)w.push(M[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");T[2]=w}else _|=2;if(_===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");l.push({placeholder:T[0],param_no:T[1],keys:T[2],sign:T[3],pad_char:T[4],align:T[5],width:T[6],precision:T[7],type:T[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");c=c.substring(T[0].length)}return h[v]=l}t.sprintf=n,t.vsprintf=i,typeof window<"u"&&(window.sprintf=n,window.vsprintf=i,o=function(){return{sprintf:n,vsprintf:i}}.call(t,r,t,e),o!==void 0&&(e.exports=o))})()},3711:function(e,t,r){"use strict";e.exports=f;var o=r(2640),a=r(781),n={"2d":function(v,c,T){var l=v({order:c,scalarArguments:3,getters:T==="generic"?[0]:void 0,phase:function(w,A,M,g){return w>g|0},vertex:function(w,A,M,g,b,p,u,y,m,R,L,z,F){var N=(u<<0)+(y<<1)+(m<<2)+(R<<3)|0;if(!(N===0||N===15))switch(N){case 0:L.push([w-.5,A-.5]);break;case 1:L.push([w-.25-.25*(g+M-2*F)/(M-g),A-.25-.25*(b+M-2*F)/(M-b)]);break;case 2:L.push([w-.75-.25*(-g-M+2*F)/(g-M),A-.25-.25*(p+g-2*F)/(g-p)]);break;case 3:L.push([w-.5,A-.5-.5*(b+M+p+g-4*F)/(M-b+g-p)]);break;case 4:L.push([w-.25-.25*(p+b-2*F)/(b-p),A-.75-.25*(-b-M+2*F)/(b-M)]);break;case 5:L.push([w-.5-.5*(g+M+p+b-4*F)/(M-g+b-p),A-.5]);break;case 6:L.push([w-.5-.25*(-g-M+p+b)/(g-M+b-p),A-.5-.25*(-b-M+p+g)/(b-M+g-p)]);break;case 7:L.push([w-.75-.25*(p+b-2*F)/(b-p),A-.75-.25*(p+g-2*F)/(g-p)]);break;case 8:L.push([w-.75-.25*(-p-b+2*F)/(p-b),A-.75-.25*(-p-g+2*F)/(p-g)]);break;case 9:L.push([w-.5-.25*(g+M+-p-b)/(M-g+p-b),A-.5-.25*(b+M+-p-g)/(M-b+p-g)]);break;case 10:L.push([w-.5-.5*(-g-M+-p-b+4*F)/(g-M+p-b),A-.5]);break;case 11:L.push([w-.25-.25*(-p-b+2*F)/(p-b),A-.75-.25*(b+M-2*F)/(M-b)]);break;case 12:L.push([w-.5,A-.5-.5*(-b-M+-p-g+4*F)/(b-M+p-g)]);break;case 13:L.push([w-.75-.25*(g+M-2*F)/(M-g),A-.25-.25*(-p-g+2*F)/(p-g)]);break;case 14:L.push([w-.25-.25*(-g-M+2*F)/(g-M),A-.25-.25*(-b-M+2*F)/(b-M)]);break;case 15:L.push([w-.5,A-.5]);break}},cell:function(w,A,M,g,b,p,u,y,m){b?y.push([w,A]):y.push([A,w])}});return function(_,w){var A=[],M=[];return l(_,A,M,w),{positions:A,cells:M}}}};function i(v,c){var T=v.length+"d",l=n[T];if(l)return l(o,v,c)}function s(v,c){for(var T=a(v,c),l=T.length,_=new Array(l),w=new Array(l),A=0;AMath.max(g,b)?p[2]=1:g>Math.max(M,b)?p[0]=1:p[1]=1;for(var u=0,y=0,m=0;m<3;++m)u+=A[m]*A[m],y+=p[m]*A[m];for(var m=0;m<3;++m)p[m]-=y/u*A[m];return s(p,p),p}function T(A,M,g,b,p,u,y,m){this.center=o(g),this.up=o(b),this.right=o(p),this.radius=o([u]),this.angle=o([y,m]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(A,M),this.computedCenter=this.center.curve(0),this.computedUp=this.up.curve(0),this.computedRight=this.right.curve(0),this.computedRadius=this.radius.curve(0),this.computedAngle=this.angle.curve(0),this.computedToward=[0,0,0],this.computedEye=[0,0,0],this.computedMatrix=new Array(16);for(var R=0;R<16;++R)this.computedMatrix[R]=.5;this.recalcMatrix(0)}var l=T.prototype;l.setDistanceLimits=function(A,M){A>0?A=Math.log(A):A=-1/0,M>0?M=Math.log(M):M=1/0,M=Math.max(M,A),this.radius.bounds[0][0]=A,this.radius.bounds[1][0]=M},l.getDistanceLimits=function(A){var M=this.radius.bounds[0];return A?(A[0]=Math.exp(M[0][0]),A[1]=Math.exp(M[1][0]),A):[Math.exp(M[0][0]),Math.exp(M[1][0])]},l.recalcMatrix=function(A){this.center.curve(A),this.up.curve(A),this.right.curve(A),this.radius.curve(A),this.angle.curve(A);for(var M=this.computedUp,g=this.computedRight,b=0,p=0,u=0;u<3;++u)p+=M[u]*g[u],b+=M[u]*M[u];for(var y=Math.sqrt(b),m=0,u=0;u<3;++u)g[u]-=M[u]*p/b,m+=g[u]*g[u],M[u]/=y;for(var R=Math.sqrt(m),u=0;u<3;++u)g[u]/=R;var L=this.computedToward;i(L,M,g),s(L,L);for(var z=Math.exp(this.computedRadius[0]),F=this.computedAngle[0],N=this.computedAngle[1],O=Math.cos(F),P=Math.sin(F),U=Math.cos(N),B=Math.sin(N),X=this.computedCenter,$=O*U,le=P*U,ce=B,de=-O*B,G=-P*B,Y=U,ee=this.computedEye,q=this.computedMatrix,u=0;u<3;++u){var se=$*g[u]+le*L[u]+ce*M[u];q[4*u+1]=de*g[u]+G*L[u]+Y*M[u],q[4*u+2]=se,q[4*u+3]=0}var ae=q[1],j=q[5],Q=q[9],re=q[2],pe=q[6],we=q[10],Se=j*we-Q*pe,Ie=Q*re-ae*we,Re=ae*pe-j*re,We=f(Se,Ie,Re);Se/=We,Ie/=We,Re/=We,q[0]=Se,q[4]=Ie,q[8]=Re;for(var u=0;u<3;++u)ee[u]=X[u]+q[2+4*u]*z;for(var u=0;u<3;++u){for(var m=0,at=0;at<3;++at)m+=q[u+4*at]*ee[at];q[12+u]=-m}q[15]=1},l.getMatrix=function(A,M){this.recalcMatrix(A);var g=this.computedMatrix;if(M){for(var b=0;b<16;++b)M[b]=g[b];return M}return g};var _=[0,0,0];l.rotate=function(A,M,g,b){if(this.angle.move(A,M,g),b){this.recalcMatrix(A);var p=this.computedMatrix;_[0]=p[2],_[1]=p[6],_[2]=p[10];for(var u=this.computedUp,y=this.computedRight,m=this.computedToward,R=0;R<3;++R)p[4*R]=u[R],p[4*R+1]=y[R],p[4*R+2]=m[R];n(p,p,b,_);for(var R=0;R<3;++R)u[R]=p[4*R],y[R]=p[4*R+1];this.up.set(A,u[0],u[1],u[2]),this.right.set(A,y[0],y[1],y[2])}},l.pan=function(A,M,g,b){M=M||0,g=g||0,b=b||0,this.recalcMatrix(A);var p=this.computedMatrix,u=Math.exp(this.computedRadius[0]),y=p[1],m=p[5],R=p[9],L=f(y,m,R);y/=L,m/=L,R/=L;var z=p[0],F=p[4],N=p[8],O=z*y+F*m+N*R;z-=y*O,F-=m*O,N-=R*O;var P=f(z,F,N);z/=P,F/=P,N/=P;var U=z*M+y*g,B=F*M+m*g,X=N*M+R*g;this.center.move(A,U,B,X);var $=Math.exp(this.computedRadius[0]);$=Math.max(1e-4,$+b),this.radius.set(A,Math.log($))},l.translate=function(A,M,g,b){this.center.move(A,M||0,g||0,b||0)},l.setMatrix=function(A,M,g,b){var p=1;typeof g=="number"&&(p=g|0),(p<0||p>3)&&(p=1);var u=(p+2)%3,y=(p+1)%3;M||(this.recalcMatrix(A),M=this.computedMatrix);var m=M[p],R=M[p+4],L=M[p+8];if(b){var F=Math.abs(m),N=Math.abs(R),O=Math.abs(L),P=Math.max(F,N,O);F===P?(m=m<0?-1:1,R=L=0):O===P?(L=L<0?-1:1,m=R=0):(R=R<0?-1:1,m=L=0)}else{var z=f(m,R,L);m/=z,R/=z,L/=z}var U=M[u],B=M[u+4],X=M[u+8],$=U*m+B*R+X*L;U-=m*$,B-=R*$,X-=L*$;var le=f(U,B,X);U/=le,B/=le,X/=le;var ce=R*X-L*B,de=L*U-m*X,G=m*B-R*U,Y=f(ce,de,G);ce/=Y,de/=Y,G/=Y,this.center.jump(A,ue,ne,Ce),this.radius.idle(A),this.up.jump(A,m,R,L),this.right.jump(A,U,B,X);var ee,q;if(p===2){var se=M[1],ae=M[5],j=M[9],Q=se*U+ae*B+j*X,re=se*ce+ae*de+j*G;Ie<0?ee=-Math.PI/2:ee=Math.PI/2,q=Math.atan2(re,Q)}else{var pe=M[2],we=M[6],Se=M[10],Ie=pe*m+we*R+Se*L,Re=pe*U+we*B+Se*X,We=pe*ce+we*de+Se*G;ee=Math.asin(v(Ie)),q=Math.atan2(We,Re)}this.angle.jump(A,q,ee),this.recalcMatrix(A);var at=M[2],nt=M[6],tt=M[10],qe=this.computedMatrix;a(qe,M);var he=qe[15],ue=qe[12]/he,ne=qe[13]/he,Ce=qe[14]/he,Ye=Math.exp(this.computedRadius[0]);this.center.jump(A,ue-at*Ye,ne-nt*Ye,Ce-tt*Ye)},l.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},l.idle=function(A){this.center.idle(A),this.up.idle(A),this.right.idle(A),this.radius.idle(A),this.angle.idle(A)},l.flush=function(A){this.center.flush(A),this.up.flush(A),this.right.flush(A),this.radius.flush(A),this.angle.flush(A)},l.setDistance=function(A,M){M>0&&this.radius.set(A,Math.log(M))},l.lookAt=function(A,M,g,b){this.recalcMatrix(A),M=M||this.computedEye,g=g||this.computedCenter,b=b||this.computedUp;var p=b[0],u=b[1],y=b[2],m=f(p,u,y);if(!(m<1e-6)){p/=m,u/=m,y/=m;var R=M[0]-g[0],L=M[1]-g[1],z=M[2]-g[2],F=f(R,L,z);if(!(F<1e-6)){R/=F,L/=F,z/=F;var N=this.computedRight,O=N[0],P=N[1],U=N[2],B=p*O+u*P+y*U;O-=B*p,P-=B*u,U-=B*y;var X=f(O,P,U);if(!(X<.01&&(O=u*z-y*L,P=y*R-p*z,U=p*L-u*R,X=f(O,P,U),X<1e-6))){O/=X,P/=X,U/=X,this.up.set(A,p,u,y),this.right.set(A,O,P,U),this.center.set(A,g[0],g[1],g[2]),this.radius.set(A,Math.log(F));var $=u*U-y*P,le=y*O-p*U,ce=p*P-u*O,de=f($,le,ce);$/=de,le/=de,ce/=de;var G=p*R+u*L+y*z,Y=O*R+P*L+U*z,ee=$*R+le*L+ce*z,q=Math.asin(v(G)),se=Math.atan2(ee,Y),ae=this.angle._state,j=ae[ae.length-1],Q=ae[ae.length-2];j=j%(2*Math.PI);var re=Math.abs(j+2*Math.PI-se),pe=Math.abs(j-se),we=Math.abs(j-2*Math.PI-se);re0?U.pop():new ArrayBuffer(O)}t.mallocArrayBuffer=_;function w(N){return new Uint8Array(_(N),0,N)}t.mallocUint8=w;function A(N){return new Uint16Array(_(2*N),0,N)}t.mallocUint16=A;function M(N){return new Uint32Array(_(4*N),0,N)}t.mallocUint32=M;function g(N){return new Int8Array(_(N),0,N)}t.mallocInt8=g;function b(N){return new Int16Array(_(2*N),0,N)}t.mallocInt16=b;function p(N){return new Int32Array(_(4*N),0,N)}t.mallocInt32=p;function u(N){return new Float32Array(_(4*N),0,N)}t.mallocFloat32=t.mallocFloat=u;function y(N){return new Float64Array(_(8*N),0,N)}t.mallocFloat64=t.mallocDouble=y;function m(N){return i?new Uint8ClampedArray(_(N),0,N):w(N)}t.mallocUint8Clamped=m;function R(N){return s?new BigUint64Array(_(8*N),0,N):null}t.mallocBigUint64=R;function L(N){return h?new BigInt64Array(_(8*N),0,N):null}t.mallocBigInt64=L;function z(N){return new DataView(_(N),0,N)}t.mallocDataView=z;function F(N){N=o.nextPow2(N);var O=o.log2(N),P=c[O];return P.length>0?P.pop():new n(N)}t.mallocBuffer=F,t.clearCache=function(){for(var O=0;O<32;++O)f.UINT8[O].length=0,f.UINT16[O].length=0,f.UINT32[O].length=0,f.INT8[O].length=0,f.INT16[O].length=0,f.INT32[O].length=0,f.FLOAT[O].length=0,f.DOUBLE[O].length=0,f.BIGUINT64[O].length=0,f.BIGINT64[O].length=0,f.UINT8C[O].length=0,v[O].length=0,c[O].length=0}},1755:function(e){"use strict";"use restrict";e.exports=t;function t(o){this.roots=new Array(o),this.ranks=new Array(o);for(var a=0;a",U="",B=P.length,X=U.length,$=F[0]===_||F[0]===M,le=0,ce=-X;le>-1&&(le=N.indexOf(P,le),!(le===-1||(ce=N.indexOf(U,le+B),ce===-1)||ce<=le));){for(var de=le;de=ce)O[de]=null,N=N.substr(0,de)+" "+N.substr(de+1);else if(O[de]!==null){var G=O[de].indexOf(F[0]);G===-1?O[de]+=F:$&&(O[de]=O[de].substr(0,G+1)+(1+parseInt(O[de][G+1]))+O[de].substr(G+2))}var Y=le+B,ee=N.substr(Y,ce-Y),q=ee.indexOf(P);q!==-1?le=q:le=ce+X}return O}function p(z,F,N){for(var O=F.textAlign||"start",P=F.textBaseline||"alphabetic",U=[1<<30,1<<30],B=[0,0],X=z.length,$=0;$/g,` `):N=N.replace(/\/g," ");var B="",X=[];for(j=0;j-1?parseInt(ne[1+rt]):0,kt=Ke>-1?parseInt(Ce[1+Ke]):0;Mt!==kt&&(Ye=Ye.replace(Re(),"?px "),pe*=Math.pow(.75,kt-Mt),Ye=Ye.replace("?px ",Re())),re+=.25*G*(kt-Mt)}if(U.superscripts===!0){var Nt=ne.indexOf(_),Gt=Ce.indexOf(_),Mr=Nt>-1?parseInt(ne[1+Nt]):0,mr=Gt>-1?parseInt(Ce[1+Gt]):0;Mr!==mr&&(Ye=Ye.replace(Re(),"?px "),pe*=Math.pow(.75,mr-Mr),Ye=Ye.replace("?px ",Re())),re-=.25*G*(mr-Mr)}if(U.bolds===!0){var qr=ne.indexOf(v)>-1,Er=Ce.indexOf(v)>-1;!qr&&Er&&(Ir?Ye=Ye.replace("italic ","italic bold "):Ye="bold "+Ye),qr&&!Er&&(Ye=Ye.replace("bold ",""))}if(U.italics===!0){var Ir=ne.indexOf(T)>-1,_t=Ce.indexOf(T)>-1;!Ir&&_t&&(Ye="italic "+Ye),Ir&&!_t&&(Ye=Ye.replace("italic ",""))}F.font=Ye}for(ae=0;ae0&&(P=O.size),O.lineSpacing&&O.lineSpacing>0&&(U=O.lineSpacing),O.styletags&&O.styletags.breaklines&&(B.breaklines=!!O.styletags.breaklines),O.styletags&&O.styletags.bolds&&(B.bolds=!!O.styletags.bolds),O.styletags&&O.styletags.italics&&(B.italics=!!O.styletags.italics),O.styletags&&O.styletags.subscripts&&(B.subscripts=!!O.styletags.subscripts),O.styletags&&O.styletags.superscripts&&(B.superscripts=!!O.styletags.superscripts)),N.font=[O.fontStyle,O.fontVariant,O.fontWeight,P+"px",O.font].filter(function($){return $}).join(" "),N.textAlign="start",N.textBaseline="alphabetic",N.direction="ltr";var X=u(F,N,z,P,U,B);return R(X,O,P)}},1538:function(e){(function(){"use strict";if(typeof ses<"u"&&ses.ok&&!ses.ok())return;function r(m){m.permitHostObjects___&&m.permitHostObjects___(r)}typeof ses<"u"&&(ses.weakMapPermitHostObjects=r);var o=!1;if(typeof WeakMap=="function"){var a=WeakMap;if(!(typeof navigator<"u"&&/Firefox/.test(navigator.userAgent))){var n=new a,i=Object.freeze({});if(n.set(i,1),n.get(i)!==1)o=!0;else{e.exports=WeakMap;return}}}var s=Object.prototype.hasOwnProperty,h=Object.getOwnPropertyNames,f=Object.defineProperty,v=Object.isExtensible,c="weakmap:",T=c+"ident:"+Math.random()+"___";if(typeof crypto<"u"&&typeof crypto.getRandomValues=="function"&&typeof ArrayBuffer=="function"&&typeof Uint8Array=="function"){var l=new ArrayBuffer(25),_=new Uint8Array(l);crypto.getRandomValues(_),T=c+"rand:"+Array.prototype.map.call(_,function(m){return(m%36).toString(36)}).join("")+"___"}function w(m){return!(m.substr(0,c.length)==c&&m.substr(m.length-3)==="___")}if(f(Object,"getOwnPropertyNames",{value:function(R){return h(R).filter(w)}}),"getPropertyNames"in Object){var A=Object.getPropertyNames;f(Object,"getPropertyNames",{value:function(R){return A(R).filter(w)}})}function M(m){if(m!==Object(m))throw new TypeError("Not an object: "+m);var R=m[T];if(R&&R.key===m)return R;if(v(m)){R={key:m};try{return f(m,T,{value:R,writable:!1,enumerable:!1,configurable:!1}),R}catch{return}}}(function(){var m=Object.freeze;f(Object,"freeze",{value:function(F){return M(F),m(F)}});var R=Object.seal;f(Object,"seal",{value:function(F){return M(F),R(F)}});var L=Object.preventExtensions;f(Object,"preventExtensions",{value:function(F){return M(F),L(F)}})})();function g(m){return m.prototype=null,Object.freeze(m)}var b=!1;function p(){!b&&typeof console<"u"&&(b=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}var u=0,y=function(){this instanceof y||p();var m=[],R=[],L=u++;function z(P,U){var B,X=M(P);return X?L in X?X[L]:U:(B=m.indexOf(P),B>=0?R[B]:U)}function F(P){var U=M(P);return U?L in U:m.indexOf(P)>=0}function N(P,U){var B,X=M(P);return X?X[L]=U:(B=m.indexOf(P),B>=0?R[B]=U:(B=m.length,R[B]=U,m[B]=P)),this}function O(P){var U=M(P),B,X;return U?L in U&&delete U[L]:(B=m.indexOf(P),B<0?!1:(X=m.length-1,m[B]=void 0,R[B]=R[X],m[B]=m[X],m.length=X,R.length=X,!0))}return Object.create(y.prototype,{get___:{value:g(z)},has___:{value:g(F)},set___:{value:g(N)},delete___:{value:g(O)}})};y.prototype=Object.create(Object.prototype,{get:{value:function(R,L){return this.get___(R,L)},writable:!0,configurable:!0},has:{value:function(R){return this.has___(R)},writable:!0,configurable:!0},set:{value:function(R,L){return this.set___(R,L)},writable:!0,configurable:!0},delete:{value:function(R){return this.delete___(R)},writable:!0,configurable:!0}}),typeof a=="function"?function(){o&&typeof Proxy<"u"&&(Proxy=void 0);function m(){this instanceof y||p();var R=new a,L=void 0,z=!1;function F(U,B){return L?R.has(U)?R.get(U):L.get___(U,B):R.get(U,B)}function N(U){return R.has(U)||(L?L.has___(U):!1)}var O;o?O=function(U,B){return R.set(U,B),R.has(U)||(L||(L=new y),L.set(U,B)),this}:O=function(U,B){if(z)try{R.set(U,B)}catch{L||(L=new y),L.set___(U,B)}else R.set(U,B);return this};function P(U){var B=!!R.delete(U);return L&&L.delete___(U)||B}return Object.create(y.prototype,{get___:{value:g(F)},has___:{value:g(N)},set___:{value:g(O)},delete___:{value:g(P)},permitHostObjects___:{value:g(function(U){if(U===r)z=!0;else throw new Error("bogus call to permitHostObjects___")})}})}m.prototype=y.prototype,e.exports=m,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():(typeof Proxy<"u"&&(Proxy=void 0),e.exports=y)})()},236:function(e,t,r){var o=r(8284);e.exports=a;function a(){var n={};return function(i){if((typeof i!="object"||i===null)&&typeof i!="function")throw new Error("Weakmap-shim: Key must be object");var s=i.valueOf(n);return s&&s.identity===n?s:o(i,n)}}},8284:function(e){e.exports=t;function t(r,o){var a={identity:o},n=r.valueOf;return Object.defineProperty(r,"valueOf",{value:function(i){return i!==o?n.apply(this,arguments):a},writable:!0}),a}},606:function(e,t,r){var o=r(236);e.exports=a;function a(){var n=o();return{get:function(i,s){var h=n(i);return h.hasOwnProperty("value")?h.value:s},set:function(i,s){return n(i).value=s,this},has:function(i){return"value"in n(i)},delete:function(i){return delete n(i).value}}}},3349:function(e){"use strict";function t(){return function(s,h,f,v,c,T){var l=s[0],_=f[0],w=[0],A=_;v|=0;var M=0,g=_;for(M=0;M=0!=p>=0&&c.push(w[0]+.5+.5*(b+p)/(b-p))}v+=g,++w[0]}}}function r(){return t()}var o=r;function a(s){var h={};return function(v,c,T){var l=v.dtype,_=v.order,w=[l,_.join()].join(),A=h[w];return A||(h[w]=A=s([l,_])),A(v.shape.slice(0),v.data,v.stride,v.offset|0,c,T)}}function n(s){return a(o.bind(void 0,s))}function i(s){return n({funcName:s.funcName})}e.exports=i({funcName:"zeroCrossings"})},781:function(e,t,r){"use strict";e.exports=a;var o=r(3349);function a(n,i){var s=[];return i=+i||0,o(n.hi(n.shape[0]-1),s,i),s}},7790:function(){}},x={};function S(e){var t=x[e];if(t!==void 0)return t.exports;var r=x[e]={id:e,loaded:!1,exports:{}};return d[e].call(r.exports,r,r.exports,S),r.loaded=!0,r.exports}(function(){S.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}()})(),function(){S.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e}}();var E=S(1964);V.exports=E})()}}),xE=He({"node_modules/color-name/index.js"(Z,V){"use strict";V.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}}}),GN=He({"node_modules/color-normalize/node_modules/color-parse/index.js"(Z,V){"use strict";var d=xE();V.exports=S;var x={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function S(E){var e,t=[],r=1,o;if(typeof E=="string")if(E=E.toLowerCase(),d[E])t=d[E].slice(),o="rgb";else if(E==="transparent")r=0,o="rgb",t=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(E)){var a=E.slice(1),n=a.length,i=n<=4;r=1,i?(t=[parseInt(a[0]+a[0],16),parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16)],n===4&&(r=parseInt(a[3]+a[3],16)/255)):(t=[parseInt(a[0]+a[1],16),parseInt(a[2]+a[3],16),parseInt(a[4]+a[5],16)],n===8&&(r=parseInt(a[6]+a[7],16)/255)),t[0]||(t[0]=0),t[1]||(t[1]=0),t[2]||(t[2]=0),o="rgb"}else if(e=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(E)){var s=e[1],h=s==="rgb",a=s.replace(/a$/,"");o=a;var n=a==="cmyk"?4:a==="gray"?1:3;t=e[2].trim().split(/\s*[,\/]\s*|\s+/).map(function(c,T){if(/%$/.test(c))return T===n?parseFloat(c)/100:a==="rgb"?parseFloat(c)*255/100:parseFloat(c);if(a[T]==="h"){if(/deg$/.test(c))return parseFloat(c);if(x[c]!==void 0)return x[c]}return parseFloat(c)}),s===a&&t.push(1),r=h||t[n]===void 0?1:t[n],t=t.slice(0,n)}else E.length>10&&/[0-9](?:\s|\/)/.test(E)&&(t=E.match(/([0-9]+)/g).map(function(f){return parseFloat(f)}),o=E.match(/([a-z])/ig).join("").toLowerCase());else isNaN(E)?Array.isArray(E)||E.length?(t=[E[0],E[1],E[2]],o="rgb",r=E.length===4?E[3]:1):E instanceof Object&&(E.r!=null||E.red!=null||E.R!=null?(o="rgb",t=[E.r||E.red||E.R||0,E.g||E.green||E.G||0,E.b||E.blue||E.B||0]):(o="hsl",t=[E.h||E.hue||E.H||0,E.s||E.saturation||E.S||0,E.l||E.lightness||E.L||E.b||E.brightness]),r=E.a||E.alpha||E.opacity||1,E.opacity!=null&&(r/=100)):(o="rgb",t=[E>>>16,(E&65280)>>>8,E&255]);return{space:o,values:t,alpha:r}}}}),HN=He({"node_modules/color-normalize/node_modules/color-rgba/index.js"(Z,V){"use strict";var d=GN();V.exports=function(E){Array.isArray(E)&&E.raw&&(E=String.raw.apply(null,arguments));var e,t,r,o=d(E);if(!o.space)return[];var a=[0,0,0],n=o.space[0]==="h"?[360,100,100]:[255,255,255];return e=Array(3),e[0]=Math.min(Math.max(o.values[0],a[0]),n[0]),e[1]=Math.min(Math.max(o.values[1],a[1]),n[1]),e[2]=Math.min(Math.max(o.values[2],a[2]),n[2]),o.space[0]==="h"&&(e=x(e)),e.push(Math.min(Math.max(o.alpha,0),1)),e};function x(S){var E=S[0]/360,e=S[1]/100,t=S[2]/100,r,o,a,n,i,s=0;if(e===0)return i=t*255,[i,i,i];for(o=t<.5?t*(1+e):t+e-t*e,r=2*t-o,n=[0,0,0];s<3;)a=E+1/3*-(s-1),a<0?a++:a>1&&a--,i=6*a<1?r+(o-r)*6*a:2*a<1?o:3*a<2?r+(o-r)*(2/3-a)*6:r,n[s++]=i*255;return n}}}),mx=He({"node_modules/clamp/index.js"(Z,V){V.exports=d;function d(x,S,E){return SE?E:x:xS?S:x}}}),Q3=He({"node_modules/dtype/index.js"(Z,V){V.exports=function(d){switch(d){case"int8":return Int8Array;case"int16":return Int16Array;case"int32":return Int32Array;case"uint8":return Uint8Array;case"uint16":return Uint16Array;case"uint32":return Uint32Array;case"float32":return Float32Array;case"float64":return Float64Array;case"array":return Array;case"uint8_clamped":return Uint8ClampedArray}}}}),d0=He({"node_modules/color-normalize/index.js"(Z,V){"use strict";var d=HN(),x=mx(),S=Q3();V.exports=function(t,r){(r==="float"||!r)&&(r="array"),r==="uint"&&(r="uint8"),r==="uint_clamped"&&(r="uint8_clamped");var o=S(r),a=new o(4),n=r!=="uint8"&&r!=="uint8_clamped";return(!t.length||typeof t=="string")&&(t=d(t),t[0]/=255,t[1]/=255,t[2]/=255),E(t)?(a[0]=t[0],a[1]=t[1],a[2]=t[2],a[3]=t[3]!=null?t[3]:255,n&&(a[0]/=255,a[1]/=255,a[2]/=255,a[3]/=255),a):(n?(a[0]=t[0],a[1]=t[1],a[2]=t[2],a[3]=t[3]!=null?t[3]:1):(a[0]=x(Math.floor(t[0]*255),0,255),a[1]=x(Math.floor(t[1]*255),0,255),a[2]=x(Math.floor(t[2]*255),0,255),a[3]=t[3]==null?255:x(Math.floor(t[3]*255),0,255)),a)};function E(e){return!!(e instanceof Uint8Array||e instanceof Uint8ClampedArray||Array.isArray(e)&&(e[0]>1||e[0]===0)&&(e[1]>1||e[1]===0)&&(e[2]>1||e[2]===0)&&(!e[3]||e[3]>1))}}}),em=He({"src/lib/str2rgbarray.js"(Z,V){"use strict";var d=d0();function x(S){return S?d(S):[0,0,0,1]}V.exports=x}}),tm=He({"src/lib/gl_format_color.js"(Z,V){"use strict";var d=as(),x=Ch(),S=d0(),E=rc(),e=sh().defaultLine,t=bp().isArrayOrTypedArray,r=S(e),o=1;function a(f,v){var c=f;return c[3]*=v,c}function n(f){if(d(f))return r;var v=S(f);return v.length?v:r}function i(f){return d(f)?f:o}function s(f,v,c){var T=f.color;T&&T._inputArray&&(T=T._inputArray);var l=t(T),_=t(v),w=E.extractOpts(f),A=[],M,g,b,p,u;if(w.colorscale!==void 0?M=E.makeColorScaleFuncFromTrace(f):M=n,l?g=function(m,R){return m[R]===void 0?r:S(M(m[R]))}:g=n,_?b=function(m,R){return m[R]===void 0?o:i(m[R])}:b=i,l||_)for(var y=0;y0){var c=o.c2l(f);o._lowerLogErrorBound||(o._lowerLogErrorBound=c),o._lowerErrorBound=Math.min(o._lowerLogErrorBound,c)}}else n[i]=[-s[0]*r,s[1]*r]}return n}function S(e){for(var t=0;t-1?-1:R.indexOf("right")>-1?1:0}function w(R){return R==null?0:R.indexOf("top")>-1?-1:R.indexOf("bottom")>-1?1:0}function A(R){var L=0,z=0,F=[L,z];if(Array.isArray(R))for(var N=0;N=0){var X=T(U.position,U.delaunayColor,U.delaunayAxis);X.opacity=R.opacity,this.delaunayMesh?this.delaunayMesh.update(X):(X.gl=L,this.delaunayMesh=E(X),this.delaunayMesh._trace=this,this.scene.glplot.add(this.delaunayMesh))}else this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose(),this.delaunayMesh=null)},c.dispose=function(){this.linePlot&&(this.scene.glplot.remove(this.linePlot),this.linePlot.dispose()),this.scatterPlot&&(this.scene.glplot.remove(this.scatterPlot),this.scatterPlot.dispose()),this.errorBars&&(this.scene.glplot.remove(this.errorBars),this.errorBars.dispose()),this.textMarkers&&(this.scene.glplot.remove(this.textMarkers),this.textMarkers.dispose()),this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose())};function m(R,L){var z=new v(R,L.uid);return z.update(L),z}V.exports=m}}),wE=He({"src/traces/scatter3d/attributes.js"(Z,V){"use strict";var d=af(),x=tc(),S=ku(),E=tf().axisHoverFormat,{hovertemplateAttrs:e,texttemplateAttrs:t,templatefallbackAttrs:r}=Jl(),o=ru(),a=bE(),n=eT(),i=Qo().extendFlat,s=pc().overrideAll,h=Jm(),f=d.line,v=d.marker,c=v.line,T=i({width:f.width,dash:{valType:"enumerated",values:h(a),dflt:"solid"}},S("line"));function l(w){return{show:{valType:"boolean",dflt:!1},opacity:{valType:"number",min:0,max:1,dflt:1},scale:{valType:"number",min:0,max:10,dflt:2/3}}}var _=V.exports=s({x:d.x,y:d.y,z:{valType:"data_array"},text:i({},d.text,{}),texttemplate:t(),texttemplatefallback:r({editType:"calc"}),hovertext:i({},d.hovertext,{}),hovertemplate:e(),hovertemplatefallback:r(),xhoverformat:E("x"),yhoverformat:E("y"),zhoverformat:E("z"),mode:i({},d.mode,{dflt:"lines+markers"}),surfaceaxis:{valType:"enumerated",values:[-1,0,1,2],dflt:-1},surfacecolor:{valType:"color"},projection:{x:l("x"),y:l("y"),z:l("z")},connectgaps:d.connectgaps,line:T,marker:i({symbol:{valType:"enumerated",values:h(n),dflt:"circle",arrayOk:!0},size:i({},v.size,{dflt:8}),sizeref:v.sizeref,sizemin:v.sizemin,sizemode:v.sizemode,opacity:i({},v.opacity,{arrayOk:!1}),colorbar:v.colorbar,line:i({width:i({},c.width,{arrayOk:!1})},S("marker.line"))},S("marker")),textposition:i({},d.textposition,{dflt:"top center"}),textfont:x({noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,editType:"calc",colorEditType:"style",arrayOk:!0,variantValues:["normal","small-caps"]}),opacity:o.opacity,hoverinfo:i({},o.hoverinfo)},"calc","nested");_.x.editType=_.y.editType=_.z.editType="calc+clearAxisTypes"}}),ZN=He({"src/traces/scatter3d/defaults.js"(Z,V){"use strict";var d=lo(),x=sa(),S=Fu(),E=md(),e=Dd(),t=zd(),r=wE();V.exports=function(n,i,s,h){function f(M,g){return x.coerce(n,i,r,M,g)}var v=o(n,i,f,h);if(!v){i.visible=!1;return}f("text"),f("hovertext"),f("hovertemplate"),f("hovertemplatefallback"),f("xhoverformat"),f("yhoverformat"),f("zhoverformat"),f("mode"),S.hasMarkers(i)&&E(n,i,s,h,f,{noAngle:!0,noLineDash:!0,noSelect:!0}),S.hasLines(i)&&(f("connectgaps"),e(n,i,s,h,f)),S.hasText(i)&&(f("texttemplate"),f("texttemplatefallback"),t(n,i,h,f,{noSelect:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}));var c=(i.line||{}).color,T=(i.marker||{}).color;f("surfaceaxis")>=0&&f("surfacecolor",c||T);for(var l=["x","y","z"],_=0;_<3;++_){var w="projection."+l[_];f(w+".show")&&(f(w+".opacity"),f(w+".scale"))}var A=d.getComponentMethod("errorbars","supplyDefaults");A(n,i,c||T||s,{axis:"z"}),A(n,i,c||T||s,{axis:"y",inherit:"z"}),A(n,i,c||T||s,{axis:"x",inherit:"z"})};function o(a,n,i,s){var h=0,f=i("x"),v=i("y"),c=i("z"),T=d.getComponentMethod("calendars","handleTraceDefaults");return T(a,n,["x","y","z"],s),f&&v&&c&&(h=Math.min(f.length,v.length,c.length),n._length=n._xlength=n._ylength=n._zlength=h),h}}}),YN=He({"src/traces/scatter3d/calc.js"(Z,V){"use strict";var d=Av(),x=Fd();V.exports=function(E,e){var t=[{x:!1,y:!1,trace:e,t:{}}];return d(t,e),x(E,e),t}}}),KN=He({"node_modules/get-canvas-context/index.js"(Z,V){V.exports=d;function d(x,S){if(typeof x!="string")throw new TypeError("must specify type string");if(S=S||{},typeof document>"u"&&!S.canvas)return null;var E=S.canvas||document.createElement("canvas");typeof S.width=="number"&&(E.width=S.width),typeof S.height=="number"&&(E.height=S.height);var e=S,t;try{var r=[x];x.indexOf("webgl")===0&&r.push("experimental-"+x);for(var o=0;o/g," "));i[s]=c,h.tickmode=f}}o.ticks=i;for(var s=0;s<3;++s){E[s]=.5*(r.glplot.bounds[0][s]+r.glplot.bounds[1][s]);for(var T=0;T<2;++T)o.bounds[T][s]=r.glplot.bounds[T][s]}r.contourLevels=e(i)}}}),tU=He({"src/plots/gl3d/scene.js"(Z,V){"use strict";var d=Yh().gl_plot3d,x=d.createCamera,S=d.createScene,E=JN(),e=b2(),t=lo(),r=sa(),o=r.preserveDrawingBuffer(),a=Ho(),n=rf(),i=em(),s=TE(),h=U5(),f=$N(),v=QN(),c=eU(),T=Yd().applyAutorangeOptions,l,_,w=!1;function A(z,F){var N=document.createElement("div"),O=z.container;this.graphDiv=z.graphDiv;var P=document.createElementNS("http://www.w3.org/2000/svg","svg");P.style.position="absolute",P.style.top=P.style.left="0px",P.style.width=P.style.height="100%",P.style["z-index"]=20,P.style["pointer-events"]="none",N.appendChild(P),this.svgContainer=P,N.id=z.id,N.style.position="absolute",N.style.top=N.style.left="0px",N.style.width=N.style.height="100%",O.appendChild(N),this.fullLayout=F,this.id=z.id||"scene",this.fullSceneLayout=F[this.id],this.plotArgs=[[],{},{}],this.axesOptions=f(F,F[this.id]),this.spikeOptions=v(F[this.id]),this.container=N,this.staticMode=!!z.staticPlot,this.pixelRatio=this.pixelRatio||z.plotGlPixelRatio||2,this.dataScale=[1,1,1],this.contourLevels=[[],[],[]],this.convertAnnotations=t.getComponentMethod("annotations3d","convert"),this.drawAnnotations=t.getComponentMethod("annotations3d","draw"),this.initializeGLPlot()}var M=A.prototype;M.prepareOptions=function(){var z=this,F={canvas:z.canvas,gl:z.gl,glOptions:{preserveDrawingBuffer:o,premultipliedAlpha:!0,antialias:!0},container:z.container,axes:z.axesOptions,spikes:z.spikeOptions,pickRadius:10,snapToData:!0,autoScale:!0,autoBounds:!1,cameraObject:z.camera,pixelRatio:z.pixelRatio};if(z.staticMode){if(!_&&(l=document.createElement("canvas"),_=E({canvas:l,preserveDrawingBuffer:!0,premultipliedAlpha:!0,antialias:!0}),!_))throw new Error("error creating static canvas/context for image server");F.gl=_,F.canvas=l}return F};var g=!0;M.tryCreatePlot=function(){var z=this,F=z.prepareOptions(),N=!0;try{z.glplot=S(F)}catch{if(z.staticMode||!g||o)N=!1;else{r.warn(["webgl setup failed possibly due to","false preserveDrawingBuffer config.","The mobile/tablet device may not be detected by is-mobile module.","Enabling preserveDrawingBuffer in second attempt to create webgl scene..."].join(" "));try{o=F.glOptions.preserveDrawingBuffer=!0,z.glplot=S(F)}catch{o=F.glOptions.preserveDrawingBuffer=!1,N=!1}}}return g=!1,N},M.initializeGLCamera=function(){var z=this,F=z.fullSceneLayout.camera,N=F.projection.type==="orthographic";z.camera=x(z.container,{center:[F.center.x,F.center.y,F.center.z],eye:[F.eye.x,F.eye.y,F.eye.z],up:[F.up.x,F.up.y,F.up.z],_ortho:N,zoomMin:.01,zoomMax:100,mode:"orbit"})},M.initializeGLPlot=function(){var z=this;z.initializeGLCamera();var F=z.tryCreatePlot();if(!F)return s(z);z.traces={},z.make4thDimension();var N=z.graphDiv,O=N.layout,P=function(){var B={};return z.isCameraChanged(O)&&(B[z.id+".camera"]=z.getCamera()),z.isAspectChanged(O)&&(B[z.id+".aspectratio"]=z.glplot.getAspectratio(),O[z.id].aspectmode!=="manual"&&(z.fullSceneLayout.aspectmode=O[z.id].aspectmode=B[z.id+".aspectmode"]="manual")),B},U=function(B){if(B.fullSceneLayout.dragmode!==!1){var X=P();B.saveLayout(O),B.graphDiv.emit("plotly_relayout",X)}};return z.glplot.canvas&&(z.glplot.canvas.addEventListener("mouseup",function(){U(z)}),z.glplot.canvas.addEventListener("touchstart",function(){w=!0}),z.glplot.canvas.addEventListener("wheel",function(B){if(N._context._scrollZoom.gl3d){if(z.camera._ortho){var X=B.deltaX>B.deltaY?1.1:.9090909090909091,$=z.glplot.getAspectratio();z.glplot.setAspectratio({x:X*$.x,y:X*$.y,z:X*$.z})}U(z)}},e?{passive:!1}:!1),z.glplot.canvas.addEventListener("mousemove",function(){if(z.fullSceneLayout.dragmode!==!1&&z.camera.mouseListener.buttons!==0){var B=P();z.graphDiv.emit("plotly_relayouting",B)}}),z.staticMode||z.glplot.canvas.addEventListener("webglcontextlost",function(B){N&&N.emit&&N.emit("plotly_webglcontextlost",{event:B,layer:z.id})},!1)),z.glplot.oncontextloss=function(){z.recoverContext()},z.glplot.onrender=function(){z.render()},!0},M.render=function(){var z=this,F=z.graphDiv,N,O=z.svgContainer,P=z.container.getBoundingClientRect();F._fullLayout._calcInverseTransform(F);var U=F._fullLayout._invScaleX,B=F._fullLayout._invScaleY,X=P.width*U,$=P.height*B;O.setAttributeNS(null,"viewBox","0 0 "+X+" "+$),O.setAttributeNS(null,"width",X),O.setAttributeNS(null,"height",$),c(z),z.glplot.axes.update(z.axesOptions);for(var le=Object.keys(z.traces),ce=null,de=z.glplot.selection,G=0;G")):N.type==="isosurface"||N.type==="volume"?(ae.valueLabel=a.hoverLabelText(z._mockAxis,z._mockAxis.d2l(de.traceCoordinate[3]),N.valuehoverformat),we.push("value: "+ae.valueLabel),de.textLabel&&we.push(de.textLabel),pe=we.join("
")):pe=de.textLabel;var Se={x:de.traceCoordinate[0],y:de.traceCoordinate[1],z:de.traceCoordinate[2],data:q._input,fullData:q,curveNumber:q.index,pointNumber:se};n.appendArrayPointValue(Se,q,se),N._module.eventData&&(Se=q._module.eventData(Se,de,q,{},se));var Ie={points:[Se]};if(z.fullSceneLayout.hovermode){var Re=[];n.loneHover({trace:q,x:(.5+.5*ee[0]/ee[3])*X,y:(.5-.5*ee[1]/ee[3])*$,xLabel:ae.xLabel,yLabel:ae.yLabel,zLabel:ae.zLabel,text:pe,name:ce.name,color:n.castHoverOption(q,se,"bgcolor")||ce.color,borderColor:n.castHoverOption(q,se,"bordercolor"),fontFamily:n.castHoverOption(q,se,"font.family"),fontSize:n.castHoverOption(q,se,"font.size"),fontColor:n.castHoverOption(q,se,"font.color"),nameLength:n.castHoverOption(q,se,"namelength"),textAlign:n.castHoverOption(q,se,"align"),hovertemplate:r.castOption(q,se,"hovertemplate"),hovertemplateLabels:r.extendFlat({},Se,ae),eventData:[Se]},{container:O,gd:F,inOut_bbox:Re}),Se.bbox=Re[0]}de.distance<5&&(de.buttons||w)?F.emit("plotly_click",Ie):F.emit("plotly_hover",Ie),this.oldEventData=Ie}else n.loneUnhover(O),this.oldEventData&&F.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;z.drawAnnotations(z)},M.recoverContext=function(){var z=this;z.glplot.dispose();var F=function(){if(z.glplot.gl.isContextLost()){requestAnimationFrame(F);return}if(!z.initializeGLPlot()){r.error("Catastrophic and unrecoverable WebGL error. Context lost.");return}z.plot.apply(z,z.plotArgs)};requestAnimationFrame(F)};var b=["xaxis","yaxis","zaxis"];function p(z,F,N){for(var O=z.fullSceneLayout,P=0;P<3;P++){var U=b[P],B=U.charAt(0),X=O[U],$=F[B],le=F[B+"calendar"],ce=F["_"+B+"length"];if(!r.isArrayOrTypedArray($))N[0][P]=Math.min(N[0][P],0),N[1][P]=Math.max(N[1][P],ce-1);else for(var de,G=0;G<(ce||$.length);G++)if(r.isArrayOrTypedArray($[G]))for(var Y=0;Y<$[G].length;++Y)de=X.d2l($[G][Y],0,le),!isNaN(de)&&isFinite(de)&&(N[0][P]=Math.min(N[0][P],de),N[1][P]=Math.max(N[1][P],de));else de=X.d2l($[G],0,le),!isNaN(de)&&isFinite(de)&&(N[0][P]=Math.min(N[0][P],de),N[1][P]=Math.max(N[1][P],de))}}function u(z,F){for(var N=z.fullSceneLayout,O=N.annotations||[],P=0;P<3;P++)for(var U=b[P],B=U.charAt(0),X=N[U],$=0;$q[1][B])q[0][B]=-1,q[1][B]=1;else{var at=q[1][B]-q[0][B];q[0][B]-=at/32,q[1][B]+=at/32}if(j=[q[0][B],q[1][B]],j=T(j,$),q[0][B]=j[0],q[1][B]=j[1],$.isReversed()){var nt=q[0][B];q[0][B]=q[1][B],q[1][B]=nt}}else j=$.range,q[0][B]=$.r2l(j[0]),q[1][B]=$.r2l(j[1]);q[0][B]===q[1][B]&&(q[0][B]-=1,q[1][B]+=1),se[B]=q[1][B]-q[0][B],$.range=[q[0][B],q[1][B]],$.limitRange(),O.glplot.setBounds(B,{min:$.range[0]*Y[B],max:$.range[1]*Y[B]})}var tt,qe=ce.aspectmode;if(qe==="cube")tt=[1,1,1];else if(qe==="manual"){var he=ce.aspectratio;tt=[he.x,he.y,he.z]}else if(qe==="auto"||qe==="data"){var ue=[1,1,1];for(B=0;B<3;++B){$=ce[b[B]],le=$.type;var ne=ae[le];ue[B]=Math.pow(ne.acc,1/ne.count)/Y[B]}qe==="data"||Math.max.apply(null,ue)/Math.min.apply(null,ue)<=4?tt=ue:tt=[1,1,1]}else throw new Error("scene.js aspectRatio was not one of the enumerated types");ce.aspectratio.x=de.aspectratio.x=tt[0],ce.aspectratio.y=de.aspectratio.y=tt[1],ce.aspectratio.z=de.aspectratio.z=tt[2],O.glplot.setAspectratio(ce.aspectratio),O.viewInitial.aspectratio||(O.viewInitial.aspectratio={x:ce.aspectratio.x,y:ce.aspectratio.y,z:ce.aspectratio.z}),O.viewInitial.aspectmode||(O.viewInitial.aspectmode=ce.aspectmode);var Ce=ce.domain||null,Ye=F._size||null;if(Ce&&Ye){var rt=O.container.style;rt.position="absolute",rt.left=Ye.l+Ce.x[0]*Ye.w+"px",rt.top=Ye.t+(1-Ce.y[1])*Ye.h+"px",rt.width=Ye.w*(Ce.x[1]-Ce.x[0])+"px",rt.height=Ye.h*(Ce.y[1]-Ce.y[0])+"px"}O.glplot.redraw()}},M.destroy=function(){var z=this;z.glplot&&(z.camera.mouseListener.enabled=!1,z.container.removeEventListener("wheel",z.camera.wheelListener),z.camera=null,z.glplot.dispose(),z.container.parentNode.removeChild(z.container),z.glplot=null)};function y(z){return[[z.eye.x,z.eye.y,z.eye.z],[z.center.x,z.center.y,z.center.z],[z.up.x,z.up.y,z.up.z]]}function m(z){return{up:{x:z.up[0],y:z.up[1],z:z.up[2]},center:{x:z.center[0],y:z.center[1],z:z.center[2]},eye:{x:z.eye[0],y:z.eye[1],z:z.eye[2]},projection:{type:z._ortho===!0?"orthographic":"perspective"}}}M.getCamera=function(){var z=this;return z.camera.view.recalcMatrix(z.camera.view.lastT()),m(z.camera)},M.setViewport=function(z){var F=this,N=z.camera;F.camera.lookAt.apply(this,y(N)),F.glplot.setAspectratio(z.aspectratio);var O=N.projection.type==="orthographic",P=F.camera._ortho;O!==P&&(F.glplot.redraw(),F.glplot.clearRGBA(),F.glplot.dispose(),F.initializeGLPlot())},M.isCameraChanged=function(z){var F=this,N=F.getCamera(),O=r.nestedProperty(z,F.id+".camera"),P=O.get();function U(le,ce,de,G){var Y=["up","center","eye"],ee=["x","y","z"];return ce[Y[de]]&&le[Y[de]][ee[G]]===ce[Y[de]][ee[G]]}var B=!1;if(P===void 0)B=!0;else{for(var X=0;X<3;X++)for(var $=0;$<3;$++)if(!U(N,P,X,$)){B=!0;break}(!P.projection||N.projection&&N.projection.type!==P.projection.type)&&(B=!0)}return B},M.isAspectChanged=function(z){var F=this,N=F.glplot.getAspectratio(),O=r.nestedProperty(z,F.id+".aspectratio"),P=O.get();return P===void 0||P.x!==N.x||P.y!==N.y||P.z!==N.z},M.saveLayout=function(z){var F=this,N=F.fullLayout,O,P,U,B,X,$,le=F.isCameraChanged(z),ce=F.isAspectChanged(z),de=le||ce;if(de){var G={};if(le&&(O=F.getCamera(),P=r.nestedProperty(z,F.id+".camera"),U=P.get(),G[F.id+".camera"]=U),ce&&(B=F.glplot.getAspectratio(),X=r.nestedProperty(z,F.id+".aspectratio"),$=X.get(),G[F.id+".aspectratio"]=$),t.call("_storeDirectGUIEdit",z,N._preGUI,G),le){P.set(O);var Y=r.nestedProperty(N,F.id+".camera");Y.set(O)}if(ce){X.set(B);var ee=r.nestedProperty(N,F.id+".aspectratio");ee.set(B),F.glplot.redraw()}}return de},M.updateFx=function(z,F){var N=this,O=N.camera;if(O)if(z==="orbit")O.mode="orbit",O.keyBindingMode="rotate";else if(z==="turntable"){O.up=[0,0,1],O.mode="turntable",O.keyBindingMode="rotate";var P=N.graphDiv,U=P._fullLayout,B=N.fullSceneLayout.camera,X=B.up.x,$=B.up.y,le=B.up.z;if(le/Math.sqrt(X*X+$*$+le*le)<.999){var ce=N.id+".camera.up",de={x:0,y:0,z:1},G={};G[ce]=de;var Y=P.layout;t.call("_storeDirectGUIEdit",Y,U._preGUI,G),B.up=de,r.nestedProperty(Y,ce).set(de)}}else O.keyBindingMode=z;N.fullSceneLayout.hovermode=F};function R(z,F,N){for(var O=0,P=N-1;O0)for(var X=255/B,$=0;$<3;++$)z[U+$]=Math.min(X*z[U+$],255)}}M.toImage=function(z){var F=this;z||(z="png"),F.staticMode&&F.container.appendChild(l),F.glplot.redraw();var N=F.glplot.gl,O=N.drawingBufferWidth,P=N.drawingBufferHeight;N.bindFramebuffer(N.FRAMEBUFFER,null);var U=new Uint8Array(O*P*4);N.readPixels(0,0,O,P,N.RGBA,N.UNSIGNED_BYTE,U),R(U,O,P),L(U,O,P);var B=document.createElement("canvas");B.width=O,B.height=P;var X=B.getContext("2d",{willReadFrequently:!0}),$=X.createImageData(O,P);$.data.set(U),X.putImageData($,0,0);var le;switch(z){case"jpeg":le=B.toDataURL("image/jpeg");break;case"webp":le=B.toDataURL("image/webp");break;default:le=B.toDataURL("image/png")}return F.staticMode&&F.container.removeChild(l),le},M.setConvert=function(){for(var z=this,F=0;F<3;F++){var N=z.fullSceneLayout[b[F]];a.setConvert(N,z.fullLayout),N.setScale=r.noop}},M.make4thDimension=function(){var z=this,F=z.graphDiv,N=F._fullLayout;z._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},a.setConvert(z._mockAxis,N)},V.exports=A}}),rU=He({"src/plots/gl3d/layout/attributes.js"(Z,V){"use strict";V.exports={scene:{valType:"subplotid",dflt:"scene",editType:"calc+clearAxisTypes"}}}}),AE=He({"src/plots/gl3d/layout/axis_attributes.js"(Z,V){"use strict";var d=Jn(),x=Wh(),S=Qo().extendFlat,E=pc().overrideAll;V.exports=E({visible:x.visible,showspikes:{valType:"boolean",dflt:!0},spikesides:{valType:"boolean",dflt:!0},spikethickness:{valType:"number",min:0,dflt:2},spikecolor:{valType:"color",dflt:d.defaultLine},showbackground:{valType:"boolean",dflt:!1},backgroundcolor:{valType:"color",dflt:"rgba(204, 204, 204, 0.5)"},showaxeslabels:{valType:"boolean",dflt:!0},color:x.color,categoryorder:x.categoryorder,categoryarray:x.categoryarray,title:{text:x.title.text,font:x.title.font},type:S({},x.type,{values:["-","linear","log","date","category"]}),autotypenumbers:x.autotypenumbers,autorange:x.autorange,autorangeoptions:{minallowed:x.autorangeoptions.minallowed,maxallowed:x.autorangeoptions.maxallowed,clipmin:x.autorangeoptions.clipmin,clipmax:x.autorangeoptions.clipmax,include:x.autorangeoptions.include,editType:"plot"},rangemode:x.rangemode,minallowed:x.minallowed,maxallowed:x.maxallowed,range:S({},x.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],anim:!1}),tickmode:x.minor.tickmode,nticks:x.nticks,tick0:x.tick0,dtick:x.dtick,tickvals:x.tickvals,ticktext:x.ticktext,ticks:x.ticks,mirror:x.mirror,ticklen:x.ticklen,tickwidth:x.tickwidth,tickcolor:x.tickcolor,showticklabels:x.showticklabels,labelalias:x.labelalias,tickfont:x.tickfont,tickangle:x.tickangle,tickprefix:x.tickprefix,showtickprefix:x.showtickprefix,ticksuffix:x.ticksuffix,showticksuffix:x.showticksuffix,showexponent:x.showexponent,exponentformat:x.exponentformat,minexponent:x.minexponent,separatethousands:x.separatethousands,tickformat:x.tickformat,tickformatstops:x.tickformatstops,hoverformat:x.hoverformat,showline:x.showline,linecolor:x.linecolor,linewidth:x.linewidth,showgrid:x.showgrid,gridcolor:S({},x.gridcolor,{dflt:"rgb(204, 204, 204)"}),gridwidth:x.gridwidth,zeroline:x.zeroline,zerolinecolor:x.zerolinecolor,zerolinewidth:x.zerolinewidth},"plot","from-root")}}),SE=He({"src/plots/gl3d/layout/layout_attributes.js"(Z,V){"use strict";var d=AE(),x=wc().attributes,S=Qo().extendFlat,E=sa().counterRegex;function e(t,r,o){return{x:{valType:"number",dflt:t,editType:"camera"},y:{valType:"number",dflt:r,editType:"camera"},z:{valType:"number",dflt:o,editType:"camera"},editType:"camera"}}V.exports={_arrayAttrRegexps:[E("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:S(e(0,0,1),{}),center:S(e(0,0,0),{}),eye:S(e(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:x({name:"scene",editType:"plot"}),aspectmode:{valType:"enumerated",values:["auto","cube","data","manual"],dflt:"auto",editType:"plot",impliedEdits:{"aspectratio.x":void 0,"aspectratio.y":void 0,"aspectratio.z":void 0}},aspectratio:{x:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},y:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},z:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},editType:"plot",impliedEdits:{aspectmode:"manual"}},xaxis:d,yaxis:d,zaxis:d,dragmode:{valType:"enumerated",values:["orbit","turntable","zoom","pan",!1],editType:"plot"},hovermode:{valType:"enumerated",values:["closest",!1],dflt:"closest",editType:"modebar"},uirevision:{valType:"any",editType:"none"},editType:"plot"}}}),aU=He({"src/plots/gl3d/layout/axis_defaults.js"(Z,V){"use strict";var d=Ch().mix,x=sa(),S=zl(),E=AE(),e=B5(),t=F_(),r=["xaxis","yaxis","zaxis"],o=100*136/187;V.exports=function(n,i,s){var h,f;function v(l,_){return x.coerce(h,f,E,l,_)}for(var c=0;c1;function v(c){if(!f){var T=d.validate(i[c],t[c]);if(T)return i[c]}}E(i,s,h,{type:o,attributes:t,handleDefaults:a,fullLayout:s,font:s.font,fullData:h,getDfltFromLayout:v,autotypenumbersDflt:s.autotypenumbers,paper_bgcolor:s.paper_bgcolor,calendar:s.calendar})};function a(n,i,s,h){for(var f=s("bgcolor"),v=x.combine(f,h.paper_bgcolor),c=["up","center","eye"],T=0;T.999)&&(M="turntable")}else M="turntable";s("dragmode",M),s("hovermode",h.getDfltFromLayout("hovermode"))}}}),v0=He({"src/plots/gl3d/index.js"(Z){"use strict";var V=pc().overrideAll,d=Zm(),x=tU(),S=Hh().getSubplotData,E=sa(),e=vd(),t="gl3d",r="scene";Z.name=t,Z.attr=r,Z.idRoot=r,Z.idRegex=Z.attrRegex=E.counterRegex("scene"),Z.attributes=rU(),Z.layoutAttributes=SE(),Z.baseLayoutAttrOverrides=V({hoverlabel:d.hoverlabel},"plot","nested"),Z.supplyLayoutDefaults=iU(),Z.plot=function(a){for(var n=a._fullLayout,i=a._fullData,s=n._subplots[t],h=0;h0){R=h[L];break}return R}function T(y,m){if(!(y<1||m<1)){for(var R=v(y),L=v(m),z=1,F=0;FA;)L--,L/=c(L),L++,L1?z:1};function M(y,m,R){var L=R[8]+R[2]*m[0]+R[5]*m[1];return y[0]=(R[6]+R[0]*m[0]+R[3]*m[1])/L,y[1]=(R[7]+R[1]*m[0]+R[4]*m[1])/L,y}function g(y,m,R){return b(y,m,M,R),y}function b(y,m,R,L){for(var z=[0,0],F=y.shape[0],N=y.shape[1],O=0;O0&&this.contourStart[L]!==null&&this.contourEnd[L]!==null&&this.contourEnd[L]>this.contourStart[L]))for(m[L]=!0,z=this.contourStart[L];z$&&(this.minValues[U]=$),this.maxValues[U]<$&&(this.maxValues[U]=$));for(U=0;U<3;U++)this.objectOffset[U]=.5*(this.minValues[U]+this.maxValues[U]);for(U=0;U<3;U++)for(B=0;Bh&&(o.isomin=null,o.isomax=null);var f=i("x"),v=i("y"),c=i("z"),T=i("value");if(!f||!f.length||!v||!v.length||!c||!c.length||!T||!T.length){o.visible=!1;return}var l=x.getComponentMethod("calendars","handleTraceDefaults");l(r,o,["x","y","z"],n),i("valuehoverformat"),["x","y","z"].forEach(function(M){i(M+"hoverformat");var g="caps."+M,b=i(g+".show");b&&i(g+".fill");var p="slices."+M,u=i(p+".show");u&&(i(p+".fill"),i(p+".locations"))});var _=i("spaceframe.show");_&&i("spaceframe.fill");var w=i("surface.show");w&&(i("surface.count"),i("surface.fill"),i("surface.pattern"));var A=i("contour.show");A&&(i("contour.color"),i("contour.width")),["text","hovertext","hovertemplate","lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","opacity"].forEach(function(M){i(M)}),E(r,o,n,i,{prefix:"",cLetter:"c"}),o._length=null}V.exports={supplyDefaults:e,supplyIsoDefaults:t}}}),rT=He({"src/traces/streamtube/calc.js"(Z,V){"use strict";var d=sa(),x=Tp();function S(r,o){o._len=Math.min(o.u.length,o.v.length,o.w.length,o.x.length,o.y.length,o.z.length),o._u=t(o.u,o._len),o._v=t(o.v,o._len),o._w=t(o.w,o._len),o._x=t(o.x,o._len),o._y=t(o.y,o._len),o._z=t(o.z,o._len);var a=E(o);o._gridFill=a.fill,o._Xs=a.Xs,o._Ys=a.Ys,o._Zs=a.Zs,o._len=a.len;var n=0,i,s,h;o.starts&&(i=t(o.starts.x||[]),s=t(o.starts.y||[]),h=t(o.starts.z||[]),n=Math.min(i.length,s.length,h.length)),o._startsX=i||[],o._startsY=s||[],o._startsZ=h||[];var f=0,v=1/0,c;for(c=0;c1&&(u=o[i-1],m=a[i-1],L=n[i-1]),s=0;su?"-":"+")+"x"),A=A.replace("y",(y>m?"-":"+")+"y"),A=A.replace("z",(R>L?"-":"+")+"z");var O=function(){i=0,z=[],F=[],N=[]};(!i||i0;v--){var c=Math.min(f[v],f[v-1]),T=Math.max(f[v],f[v-1]);if(T>c&&c-1}function Q(_t,Oe){return _t===null?Oe:_t}function re(_t,Oe,Je){le();var Ae=[Oe],Le=[Je];if(q>=1)Ae=[Oe],Le=[Je];else if(q>0){var Ue=ae(Oe,Je);Ae=Ue.xyzv,Le=Ue.abc}for(var Ze=0;Ze-1?Je[ut]:$(Ut,Ct,Pt);fr>-1?st[ut]=fr:st[ut]=de(Ut,Ct,Pt,Q(_t,jt))}G(st[0],st[1],st[2])}}function pe(_t,Oe,Je){var Ae=function(Le,Ue,Ze){re(_t,[Oe[Le],Oe[Ue],Oe[Ze]],[Je[Le],Je[Ue],Je[Ze]])};Ae(0,1,2),Ae(2,3,0)}function we(_t,Oe,Je){var Ae=function(Le,Ue,Ze){re(_t,[Oe[Le],Oe[Ue],Oe[Ze]],[Je[Le],Je[Ue],Je[Ze]])};Ae(0,1,2),Ae(3,0,1),Ae(2,3,0),Ae(1,2,3)}function Se(_t,Oe,Je,Ae){var Le=_t[3];LeAe&&(Le=Ae);for(var Ue=(_t[3]-Le)/(_t[3]-Oe[3]+1e-9),Ze=[],st=0;st<4;st++)Ze[st]=(1-Ue)*_t[st]+Ue*Oe[st];return Ze}function Ie(_t,Oe,Je){return _t>=Oe&&_t<=Je}function Re(_t){var Oe=.001*(O-N);return _t>=N-Oe&&_t<=O+Oe}function We(_t){for(var Oe=[],Je=0;Je<4;Je++){var Ae=_t[Je];Oe.push([h._x[Ae],h._y[Ae],h._z[Ae],h._value[Ae]])}return Oe}var at=3;function nt(_t,Oe,Je,Ae,Le,Ue){Ue||(Ue=1),Je=[-1,-1,-1];var Ze=!1,st=[Ie(Oe[0][3],Ae,Le),Ie(Oe[1][3],Ae,Le),Ie(Oe[2][3],Ae,Le)];if(!st[0]&&!st[1]&&!st[2])return!1;var ut=function(Ct,Pt,jt){return Re(Pt[0][3])&&Re(Pt[1][3])&&Re(Pt[2][3])?(re(Ct,Pt,jt),!0):Uest?[z,Ue]:[Ue,F];Nt(Oe,ut[0],ut[1])}}var Ut=[[Math.min(N,F),Math.max(N,F)],[Math.min(z,O),Math.max(z,O)]];["x","y","z"].forEach(function(Ct){for(var Pt=[],jt=0;jt0&&(Oa.push(Wa.id),Ct==="x"?Ia.push([Wa.distRatio,0,0]):Ct==="y"?Ia.push([0,Wa.distRatio,0]):Ia.push([0,0,Wa.distRatio]))}else Ct==="x"?Ta=qr(1,u-1):Ct==="y"?Ta=qr(1,y-1):Ta=qr(1,m-1);Oa.length>0&&(Ct==="x"?Pt[fr]=Gt(_t,Oa,ur,sr,Ia,Pt[fr]):Ct==="y"?Pt[fr]=Mr(_t,Oa,ur,sr,Ia,Pt[fr]):Pt[fr]=mr(_t,Oa,ur,sr,Ia,Pt[fr]),fr++),Ta.length>0&&(Ct==="x"?Pt[fr]=Ye(_t,Ta,ur,sr,Pt[fr]):Ct==="y"?Pt[fr]=rt(_t,Ta,ur,sr,Pt[fr]):Pt[fr]=Ke(_t,Ta,ur,sr,Pt[fr]),fr++)}var Ca=h.caps[Ct];Ca.show&&Ca.fill&&(se(Ca.fill),Ct==="x"?Pt[fr]=Ye(_t,[0,u-1],ur,sr,Pt[fr]):Ct==="y"?Pt[fr]=rt(_t,[0,y-1],ur,sr,Pt[fr]):Pt[fr]=Ke(_t,[0,m-1],ur,sr,Pt[fr]),fr++)}}),w===0&&ce(),h._meshX=P,h._meshY=U,h._meshZ=B,h._meshIntensity=X,h._Xs=g,h._Ys=b,h._Zs=p}return Ir(),h}function s(h,f){var v=h.glplot.gl,c=d({gl:v}),T=new o(h,c,f.uid);return c._trace=T,T.update(f),h.glplot.add(c),T}V.exports={findNearestOnAxis:r,generateIsoMeshes:i,createIsosurfaceTrace:s}}}),fU=He({"src/traces/isosurface/index.js"(Z,V){"use strict";V.exports={attributes:tT(),supplyDefaults:EE().supplyDefaults,calc:kE(),colorbar:{min:"cmin",max:"cmax"},plot:aT().createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:v0(),categories:["gl3d","showLegend"],meta:{}}}}),hU=He({"lib/isosurface.js"(Z,V){"use strict";V.exports=fU()}}),CE=He({"src/traces/volume/attributes.js"(Z,V){"use strict";var d=ku(),x=tT(),S=gx(),E=ru(),e=Qo().extendFlat,t=pc().overrideAll,r=V.exports=t(e({x:x.x,y:x.y,z:x.z,value:x.value,isomin:x.isomin,isomax:x.isomax,surface:x.surface,spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:1}},slices:x.slices,caps:x.caps,text:x.text,hovertext:x.hovertext,xhoverformat:x.xhoverformat,yhoverformat:x.yhoverformat,zhoverformat:x.zhoverformat,valuehoverformat:x.valuehoverformat,hovertemplate:x.hovertemplate,hovertemplatefallback:x.hovertemplatefallback},d("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{colorbar:x.colorbar,opacity:x.opacity,opacityscale:S.opacityscale,lightposition:x.lightposition,lighting:x.lighting,flatshading:x.flatshading,contour:x.contour,hoverinfo:e({},E.hoverinfo),showlegend:e({},E.showlegend,{dflt:!1})}),"calc","nested");r.x.editType=r.y.editType=r.z.editType=r.value.editType="calc+clearAxisTypes"}}),pU=He({"src/traces/volume/defaults.js"(Z,V){"use strict";var d=sa(),x=CE(),S=EE().supplyIsoDefaults,E=ME().opacityscaleDefaults;V.exports=function(t,r,o,a){function n(i,s){return d.coerce(t,r,x,i,s)}S(t,r,o,a,n),E(t,r,a,n)}}}),dU=He({"src/traces/volume/convert.js"(Z,V){"use strict";var d=Yh().gl_mesh3d,x=tm().parseColorScale,S=sa().isArrayOrTypedArray,E=em(),e=rc().extractOpts,t=E1(),r=aT().findNearestOnAxis,o=aT().generateIsoMeshes;function a(s,h,f){this.scene=s,this.uid=f,this.mesh=h,this.name="",this.data=null,this.showContour=!1}var n=a.prototype;n.handlePick=function(s){if(s.object===this.mesh){var h=s.data.index,f=this.data._meshX[h],v=this.data._meshY[h],c=this.data._meshZ[h],T=this.data._Ys.length,l=this.data._Zs.length,_=r(f,this.data._Xs).id,w=r(v,this.data._Ys).id,A=r(c,this.data._Zs).id,M=s.index=A+l*w+l*T*_;s.traceCoordinate=[this.data._meshX[M],this.data._meshY[M],this.data._meshZ[M],this.data._value[M]];var g=this.data.hovertext||this.data.text;return S(g)&&g[M]!==void 0?s.textLabel=g[M]:g&&(s.textLabel=g),!0}},n.update=function(s){var h=this.scene,f=h.fullSceneLayout;this.data=o(s);function v(w,A,M,g){return A.map(function(b){return w.d2l(b,0,g)*M})}var c=t(v(f.xaxis,s._meshX,h.dataScale[0],s.xcalendar),v(f.yaxis,s._meshY,h.dataScale[1],s.ycalendar),v(f.zaxis,s._meshZ,h.dataScale[2],s.zcalendar)),T=t(s._meshI,s._meshJ,s._meshK),l={positions:c,cells:T,lightPosition:[s.lightposition.x,s.lightposition.y,s.lightposition.z],ambient:s.lighting.ambient,diffuse:s.lighting.diffuse,specular:s.lighting.specular,roughness:s.lighting.roughness,fresnel:s.lighting.fresnel,vertexNormalsEpsilon:s.lighting.vertexnormalsepsilon,faceNormalsEpsilon:s.lighting.facenormalsepsilon,opacity:s.opacity,opacityscale:s.opacityscale,contourEnable:s.contour.show,contourColor:E(s.contour.color).slice(0,3),contourWidth:s.contour.width,useFacetNormals:s.flatshading},_=e(s);l.vertexIntensity=s._meshIntensity,l.vertexIntensityBounds=[_.min,_.max],l.colormap=x(s),this.mesh.update(l)},n.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function i(s,h){var f=s.glplot.gl,v=d({gl:f}),c=new a(s,v,h.uid);return v._trace=c,c.update(h),s.glplot.add(v),c}V.exports=i}}),vU=He({"src/traces/volume/index.js"(Z,V){"use strict";V.exports={attributes:CE(),supplyDefaults:pU(),calc:kE(),colorbar:{min:"cmin",max:"cmax"},plot:dU(),moduleType:"trace",name:"volume",basePlotModule:v0(),categories:["gl3d","showLegend"],meta:{}}}}),mU=He({"lib/volume.js"(Z,V){"use strict";V.exports=vU()}}),gU=He({"src/traces/mesh3d/defaults.js"(Z,V){"use strict";var d=lo(),x=sa(),S=_h(),E=M1();V.exports=function(t,r,o,a){function n(v,c){return x.coerce(t,r,E,v,c)}function i(v){var c=v.map(function(T){var l=n(T);return l&&x.isArrayOrTypedArray(l)?l:null});return c.every(function(T){return T&&T.length===c[0].length})&&c}var s=i(["x","y","z"]);if(!s){r.visible=!1;return}if(i(["i","j","k"]),r.i&&(!r.j||!r.k)||r.j&&(!r.k||!r.i)||r.k&&(!r.i||!r.j)){r.visible=!1;return}var h=d.getComponentMethod("calendars","handleTraceDefaults");h(t,r,["x","y","z"],a),["lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","alphahull","delaunayaxis","opacity"].forEach(function(v){n(v)});var f=n("contour.show");f&&(n("contour.color"),n("contour.width")),"intensity"in t?(n("intensity"),n("intensitymode"),S(t,r,a,n,{prefix:"",cLetter:"c"})):(r.showscale=!1,"facecolor"in t?n("facecolor"):"vertexcolor"in t?n("vertexcolor"):n("color",o)),n("text"),n("hovertext"),n("hovertemplate"),n("hovertemplatefallback"),n("xhoverformat"),n("yhoverformat"),n("zhoverformat"),r._length=null}}}),yU=He({"src/traces/mesh3d/calc.js"(Z,V){"use strict";var d=Tp();V.exports=function(S,E){E.intensity&&d(S,E,{vals:E.intensity,containerStr:"",cLetter:"c"})}}}),_U=He({"src/traces/mesh3d/convert.js"(Z,V){"use strict";var d=Yh().gl_mesh3d,x=Yh().delaunay_triangulate,S=Yh().alpha_shape,E=Yh().convex_hull,e=tm().parseColorScale,t=sa().isArrayOrTypedArray,r=em(),o=rc().extractOpts,a=E1();function n(l,_,w){this.scene=l,this.uid=w,this.mesh=_,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var i=n.prototype;i.handlePick=function(l){if(l.object===this.mesh){var _=l.index=l.data.index;l.data._cellCenter?l.traceCoordinate=l.data.dataCoordinate:l.traceCoordinate=[this.data.x[_],this.data.y[_],this.data.z[_]];var w=this.data.hovertext||this.data.text;return t(w)&&w[_]!==void 0?l.textLabel=w[_]:w&&(l.textLabel=w),!0}};function s(l){for(var _=[],w=l.length,A=0;A=_-.5)return!1;return!0}i.update=function(l){var _=this.scene,w=_.fullSceneLayout;this.data=l;var A=l.x.length,M=a(h(w.xaxis,l.x,_.dataScale[0],l.xcalendar),h(w.yaxis,l.y,_.dataScale[1],l.ycalendar),h(w.zaxis,l.z,_.dataScale[2],l.zcalendar)),g;if(l.i&&l.j&&l.k){if(l.i.length!==l.j.length||l.j.length!==l.k.length||!c(l.i,A)||!c(l.j,A)||!c(l.k,A))return;g=a(f(l.i),f(l.j),f(l.k))}else l.alphahull===0?g=E(M):l.alphahull>0?g=S(l.alphahull,M):g=v(l.delaunayaxis,M);var b={positions:M,cells:g,lightPosition:[l.lightposition.x,l.lightposition.y,l.lightposition.z],ambient:l.lighting.ambient,diffuse:l.lighting.diffuse,specular:l.lighting.specular,roughness:l.lighting.roughness,fresnel:l.lighting.fresnel,vertexNormalsEpsilon:l.lighting.vertexnormalsepsilon,faceNormalsEpsilon:l.lighting.facenormalsepsilon,opacity:l.opacity,contourEnable:l.contour.show,contourColor:r(l.contour.color).slice(0,3),contourWidth:l.contour.width,useFacetNormals:l.flatshading};if(l.intensity){var p=o(l);this.color="#fff";var u=l.intensitymode;b[u+"Intensity"]=l.intensity,b[u+"IntensityBounds"]=[p.min,p.max],b.colormap=e(l)}else l.vertexcolor?(this.color=l.vertexcolor[0],b.vertexColors=s(l.vertexcolor)):l.facecolor?(this.color=l.facecolor[0],b.cellColors=s(l.facecolor)):(this.color=l.color,b.meshColor=r(l.color));this.mesh.update(b)},i.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function T(l,_){var w=l.glplot.gl,A=d({gl:w}),M=new n(l,A,_.uid);return A._trace=M,M.update(_),l.glplot.add(A),M}V.exports=T}}),xU=He({"src/traces/mesh3d/index.js"(Z,V){"use strict";V.exports={attributes:M1(),supplyDefaults:gU(),calc:yU(),colorbar:{min:"cmin",max:"cmax"},plot:_U(),moduleType:"trace",name:"mesh3d",basePlotModule:v0(),categories:["gl3d","showLegend"],meta:{}}}}),bU=He({"lib/mesh3d.js"(Z,V){"use strict";V.exports=xU()}}),LE=He({"src/traces/cone/attributes.js"(Z,V){"use strict";var d=ku(),x=tf().axisHoverFormat,{hovertemplateAttrs:S,templatefallbackAttrs:E}=Jl(),e=M1(),t=ru(),r=Qo().extendFlat,o={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},u:{valType:"data_array",editType:"calc"},v:{valType:"data_array",editType:"calc"},w:{valType:"data_array",editType:"calc"},sizemode:{valType:"enumerated",values:["scaled","absolute","raw"],editType:"calc",dflt:"scaled"},sizeref:{valType:"number",editType:"calc",min:0},anchor:{valType:"enumerated",editType:"calc",values:["tip","tail","cm","center"],dflt:"cm"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:S({editType:"calc"},{keys:["norm"]}),hovertemplatefallback:E({editType:"calc"}),uhoverformat:x("u",1),vhoverformat:x("v",1),whoverformat:x("w",1),xhoverformat:x("x"),yhoverformat:x("y"),zhoverformat:x("z"),showlegend:r({},t.showlegend,{dflt:!1})};r(o,d("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var a=["opacity","lightposition","lighting"];a.forEach(function(n){o[n]=e[n]}),o.hoverinfo=r({},t.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"}),V.exports=o}}),wU=He({"src/traces/cone/defaults.js"(Z,V){"use strict";var d=sa(),x=_h(),S=LE();V.exports=function(e,t,r,o){function a(T,l){return d.coerce(e,t,S,T,l)}var n=a("u"),i=a("v"),s=a("w"),h=a("x"),f=a("y"),v=a("z");if(!n||!n.length||!i||!i.length||!s||!s.length||!h||!h.length||!f||!f.length||!v||!v.length){t.visible=!1;return}var c=a("sizemode");a("sizeref",c==="raw"?1:.5),a("anchor"),a("lighting.ambient"),a("lighting.diffuse"),a("lighting.specular"),a("lighting.roughness"),a("lighting.fresnel"),a("lightposition.x"),a("lightposition.y"),a("lightposition.z"),x(e,t,o,a,{prefix:"",cLetter:"c"}),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("uhoverformat"),a("vhoverformat"),a("whoverformat"),a("xhoverformat"),a("yhoverformat"),a("zhoverformat"),t._length=null}}}),TU=He({"src/traces/cone/calc.js"(Z,V){"use strict";var d=Tp();V.exports=function(S,E){for(var e=E.u,t=E.v,r=E.w,o=Math.min(E.x.length,E.y.length,E.z.length,e.length,t.length,r.length),a=-1/0,n=1/0,i=0;i2?c=f.slice(1,v-1):v===2?c=[(f[0]+f[1])/2]:c=f,c}function i(f){var v=f.length;return v===1?[.5,.5]:[f[1]-f[0],f[v-1]-f[v-2]]}function s(f,v){var c=f.fullSceneLayout,T=f.dataScale,l=v._len,_={};function w(de,G){var Y=c[G],ee=T[r[G]];return S.simpleMap(de,function(q){return Y.d2l(q)*ee})}if(_.vectors=t(w(v._u,"xaxis"),w(v._v,"yaxis"),w(v._w,"zaxis"),l),!l)return{positions:[],cells:[]};var A=w(v._Xs,"xaxis"),M=w(v._Ys,"yaxis"),g=w(v._Zs,"zaxis");_.meshgrid=[A,M,g],_.gridFill=v._gridFill;var b=v._slen;if(b)_.startingPositions=t(w(v._startsX,"xaxis"),w(v._startsY,"yaxis"),w(v._startsZ,"zaxis"));else{for(var p=M[0],u=n(A),y=n(g),m=new Array(u.length*y.length),R=0,L=0;Lp&&(p=R[0]),R[1]u&&(u=R[1])}function m(R){switch(R.type){case"GeometryCollection":R.geometries.forEach(m);break;case"Point":y(R.coordinates);break;case"MultiPoint":R.coordinates.forEach(y);break}}w.arcs.forEach(function(R){for(var L=-1,z=R.length,F;++Lp&&(p=F[0]),F[1]u&&(u=F[1])});for(M in w.objects)m(w.objects[M]);return[g,b,p,u]}function e(w,A){for(var M,g=w.length,b=g-A;b<--g;)M=w[b],w[b++]=w[g],w[g]=M}function t(w,A){return typeof A=="string"&&(A=w.objects[A]),A.type==="GeometryCollection"?{type:"FeatureCollection",features:A.geometries.map(function(M){return r(w,M)})}:r(w,A)}function r(w,A){var M=A.id,g=A.bbox,b=A.properties==null?{}:A.properties,p=o(w,A);return M==null&&g==null?{type:"Feature",properties:b,geometry:p}:g==null?{type:"Feature",id:M,properties:b,geometry:p}:{type:"Feature",id:M,bbox:g,properties:b,geometry:p}}function o(w,A){var M=S(w.transform),g=w.arcs;function b(L,z){z.length&&z.pop();for(var F=g[L<0?~L:L],N=0,O=F.length;N1)g=s(w,A,M);else for(b=0,g=new Array(p=w.arcs.length);b1)for(var z=1,F=y(R[0]),N,O;zF&&(O=R[0],R[0]=R[z],R[z]=O,F=N);return R}).filter(function(m){return m.length>0})}}function c(w,A){for(var M=0,g=w.length;M>>1;w[b]=2))throw new Error("n must be \u22652");m=w.bbox||E(w);var M=m[0],g=m[1],b=m[2],p=m[3],u;A={scale:[b-M?(b-M)/(u-1):1,p-g?(p-g)/(u-1):1],translate:[M,g]}}else m=w.bbox;var y=l(A),m,R,L=w.objects,z={};function F(P){return y(P)}function N(P){var U;switch(P.type){case"GeometryCollection":U={type:"GeometryCollection",geometries:P.geometries.map(N)};break;case"Point":U={type:"Point",coordinates:F(P.coordinates)};break;case"MultiPoint":U={type:"MultiPoint",coordinates:P.coordinates.map(F)};break;default:return P}return P.id!=null&&(U.id=P.id),P.bbox!=null&&(U.bbox=P.bbox),P.properties!=null&&(U.properties=P.properties),U}function O(P){var U=0,B=1,X=P.length,$,le=new Array(X);for(le[0]=y(P[0],0);++U0&&(E.push(e),e=[])}return e.length>0&&E.push(e),E},Z.makeLine=function(d){return d.length===1?{type:"LineString",coordinates:d[0]}:{type:"MultiLineString",coordinates:d}},Z.makePolygon=function(d){if(d.length===1)return{type:"Polygon",coordinates:d};for(var x=new Array(d.length),S=0;Se(N,z)),F)}function r(L,z,F={}){for(let O of L){if(O.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(O[O.length-1].length!==O[0].length)throw new Error("First and last Position are not equivalent.");for(let P=0;Pr(N,z)),F)}function a(L,z,F={}){if(L.length<2)throw new Error("coordinates must be an array of two or more positions");return S({type:"LineString",coordinates:L},z,F)}function n(L,z,F={}){return i(L.map(N=>a(N,z)),F)}function i(L,z={}){let F={type:"FeatureCollection"};return z.id&&(F.id=z.id),z.bbox&&(F.bbox=z.bbox),F.features=L,F}function s(L,z,F={}){return S({type:"MultiLineString",coordinates:L},z,F)}function h(L,z,F={}){return S({type:"MultiPoint",coordinates:L},z,F)}function f(L,z,F={}){return S({type:"MultiPolygon",coordinates:L},z,F)}function v(L,z,F={}){return S({type:"GeometryCollection",geometries:L},z,F)}function c(L,z=0){if(z&&!(z>=0))throw new Error("precision must be a positive number");let F=Math.pow(10,z||0);return Math.round(L*F)/F}function T(L,z="kilometers"){let F=d[z];if(!F)throw new Error(z+" units is invalid");return L*F}function l(L,z="kilometers"){let F=d[z];if(!F)throw new Error(z+" units is invalid");return L/F}function _(L,z){return M(l(L,z))}function w(L){let z=L%360;return z<0&&(z+=360),z}function A(L){return L=L%360,L>180?L-360:L<-180?L+360:L}function M(L){return L%(2*Math.PI)*180/Math.PI}function g(L){return L%360*Math.PI/180}function b(L,z="kilometers",F="kilometers"){if(!(L>=0))throw new Error("length must be a positive number");return T(l(L,z),F)}function p(L,z="meters",F="kilometers"){if(!(L>=0))throw new Error("area must be a positive number");let N=x[z];if(!N)throw new Error("invalid original units");let O=x[F];if(!O)throw new Error("invalid final units");return L/N*O}function u(L){return!isNaN(L)&&L!==null&&!Array.isArray(L)}function y(L){return L!==null&&typeof L=="object"&&!Array.isArray(L)}function m(L){if(!L)throw new Error("bbox is required");if(!Array.isArray(L))throw new Error("bbox must be an Array");if(L.length!==4&&L.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");L.forEach(z=>{if(!u(z))throw new Error("bbox must only contain numbers")})}function R(L){if(!L)throw new Error("id is required");if(["string","number"].indexOf(typeof L)===-1)throw new Error("id must be a number or a string")}Z.areaFactors=x,Z.azimuthToBearing=A,Z.bearingToAzimuth=w,Z.convertArea=p,Z.convertLength=b,Z.degreesToRadians=g,Z.earthRadius=V,Z.factors=d,Z.feature=S,Z.featureCollection=i,Z.geometry=E,Z.geometryCollection=v,Z.isNumber=u,Z.isObject=y,Z.lengthToDegrees=_,Z.lengthToRadians=l,Z.lineString=a,Z.lineStrings=n,Z.multiLineString=s,Z.multiPoint=h,Z.multiPolygon=f,Z.point=e,Z.points=t,Z.polygon=r,Z.polygons=o,Z.radiansToDegrees=M,Z.radiansToLength=T,Z.round=c,Z.validateBBox=m,Z.validateId=R}}),sT=He({"node_modules/@turf/meta/dist/cjs/index.cjs"(Z){"use strict";Object.defineProperty(Z,"__esModule",{value:!0});var V=oT();function d(l,_,w){if(l!==null)for(var A,M,g,b,p,u,y,m=0,R=0,L,z=l.type,F=z==="FeatureCollection",N=z==="Feature",O=F?l.features.length:1,P=0;Pu||F>y||N>m){p=R,u=A,y=F,m=N,g=0;return}var O=V.lineString.call(void 0,[p,R],w.properties);if(_(O,A,M,N,g)===!1)return!1;g++,p=R})===!1)return!1}}})}function h(l,_,w){var A=w,M=!1;return s(l,function(g,b,p,u,y){M===!1&&w===void 0?A=g:A=_(A,g,b,p,u,y),M=!0}),A}function f(l,_){if(!l)throw new Error("geojson is required");n(l,function(w,A,M){if(w.geometry!==null){var g=w.geometry.type,b=w.geometry.coordinates;switch(g){case"LineString":if(_(w,A,M,0,0)===!1)return!1;break;case"Polygon":for(var p=0;pn+S(i),0)}function S(a){let n=0,i;switch(a.type){case"Polygon":return E(a.coordinates);case"MultiPolygon":for(i=0;i0){n+=Math.abs(r(a[0]));for(let i=1;i=n?(s+2)%n:s+2],c=h[0]*t,T=f[1]*t,l=v[0]*t;i+=(l-c)*Math.sin(T),s++}return i*e}var o=x;Z.area=x,Z.default=o}}),zU=He({"node_modules/@turf/centroid/dist/cjs/index.cjs"(Z){"use strict";Object.defineProperty(Z,"__esModule",{value:!0});var V=oT(),d=sT();function x(E,e={}){let t=0,r=0,o=0;return d.coordEach.call(void 0,E,function(a){t+=a[0],r+=a[1],o++},!0),V.point.call(void 0,[t/o,r/o],e.properties)}var S=x;Z.centroid=x,Z.default=S}}),FU=He({"node_modules/@turf/bbox/dist/cjs/index.cjs"(Z){"use strict";Object.defineProperty(Z,"__esModule",{value:!0});var V=sT();function d(S,E={}){if(S.bbox!=null&&E.recompute!==!0)return S.bbox;let e=[1/0,1/0,-1/0,-1/0];return V.coordEach.call(void 0,S,t=>{e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]0&&O[P+1][0]<0)return P;return null}switch(y==="RUS"||y==="FJI"?R=function(O){var P;if(N(O)===null)P=O;else for(P=new Array(O.length),F=0;FP?U[B++]=[O[F][0]+360,O[F][1]]:F===P?(U[B++]=O[F],U[B++]=[O[F][0],-90]):U[B++]=O[F];var X=n.tester(U);X.pts.pop(),m.push(X)}:R=function(O){m.push(n.tester(O))},p.type){case"MultiPolygon":for(L=0;L0?X.properties.ct=A(X):X.properties.ct=[NaN,NaN],U.fIn=O,U.fOut=X,m.push(X)}else r.log(["Location",U.loc,"does not have a valid GeoJSON geometry.","Traces with locationmode *geojson-id* only support","*Polygon* and *MultiPolygon* geometries."].join(" "))}delete y[P]}switch(u.type){case"FeatureCollection":var F=u.features;for(R=0;Rm&&(m=z,u=L)}else u=p;return E(u).geometry.coordinates}function M(b){var p=window.PlotlyGeoAssets||{},u=[];function y(F){return new Promise(function(N,O){d.json(F,function(P,U){if(P){delete p[F];var B=P.status===404?'GeoJSON at URL "'+F+'" does not exist.':"Unexpected error while fetching from "+F;return O(new Error(B))}return p[F]=U,N(U)})})}function m(F){return new Promise(function(N,O){var P=0,U=setInterval(function(){if(p[F]&&p[F]!=="pending")return clearInterval(U),N(p[F]);if(P>100)return clearInterval(U),O("Unexpected error while fetching from "+F);P++},50)})}for(var R=0;R")}}}),NU=He({"src/traces/scattergeo/event_data.js"(Z,V){"use strict";V.exports=function(x,S,E,e,t){x.lon=S.lon,x.lat=S.lat,x.location=S.loc?S.loc:null;var r=e[t];return r.fIn&&r.fIn.properties&&(x.properties=r.fIn.properties),x}}}),UU=He({"src/traces/scattergeo/select.js"(Z,V){"use strict";var d=Fu(),x=Ws().BADNUM;V.exports=function(E,e){var t=E.cd,r=E.xaxis,o=E.yaxis,a=[],n=t[0].trace,i,s,h,f,v,c=!d.hasMarkers(n)&&!d.hasText(n);if(c)return[];if(e===!1)for(v=0;vq?1:ee>=q?0:NaN}function S(ee){return ee.length===1&&(ee=E(ee)),{left:function(q,se,ae,j){for(ae==null&&(ae=0),j==null&&(j=q.length);ae>>1;ee(q[Q],se)<0?ae=Q+1:j=Q}return ae},right:function(q,se,ae,j){for(ae==null&&(ae=0),j==null&&(j=q.length);ae>>1;ee(q[Q],se)>0?j=Q:ae=Q+1}return ae}}}function E(ee){return function(q,se){return x(ee(q),se)}}var e=S(x),t=e.right,r=e.left;function o(ee,q){q==null&&(q=a);for(var se=0,ae=ee.length-1,j=ee[0],Q=new Array(ae<0?0:ae);seee?1:q>=ee?0:NaN}function s(ee){return ee===null?NaN:+ee}function h(ee,q){var se=ee.length,ae=0,j=-1,Q=0,re,pe,we=0;if(q==null)for(;++j1)return we/(ae-1)}function f(ee,q){var se=h(ee,q);return se&&Math.sqrt(se)}function v(ee,q){var se=ee.length,ae=-1,j,Q,re;if(q==null){for(;++ae=j)for(Q=re=j;++aej&&(Q=j),re=j)for(Q=re=j;++aej&&(Q=j),re0)return[ee];if((ae=q0)for(ee=Math.ceil(ee/pe),q=Math.floor(q/pe),re=new Array(Q=Math.ceil(q-ee+1));++j=0?(Q>=M?10:Q>=g?5:Q>=b?2:1)*Math.pow(10,j):-Math.pow(10,-j)/(Q>=M?10:Q>=g?5:Q>=b?2:1)}function y(ee,q,se){var ae=Math.abs(q-ee)/Math.max(0,se),j=Math.pow(10,Math.floor(Math.log(ae)/Math.LN10)),Q=ae/j;return Q>=M?j*=10:Q>=g?j*=5:Q>=b&&(j*=2),qRe;)We.pop(),--at;var nt=new Array(at+1),tt;for(Q=0;Q<=at;++Q)tt=nt[Q]=[],tt.x0=Q>0?We[Q-1]:Ie,tt.x1=Q=1)return+se(ee[ae-1],ae-1,ee);var ae,j=(ae-1)*q,Q=Math.floor(j),re=+se(ee[Q],Q,ee),pe=+se(ee[Q+1],Q+1,ee);return re+(pe-re)*(j-Q)}}function z(ee,q,se){return ee=l.call(ee,s).sort(x),Math.ceil((se-q)/(2*(L(ee,.75)-L(ee,.25))*Math.pow(ee.length,-1/3)))}function F(ee,q,se){return Math.ceil((se-q)/(3.5*f(ee)*Math.pow(ee.length,-1/3)))}function N(ee,q){var se=ee.length,ae=-1,j,Q;if(q==null){for(;++ae=j)for(Q=j;++aeQ&&(Q=j)}else for(;++ae=j)for(Q=j;++aeQ&&(Q=j);return Q}function O(ee,q){var se=ee.length,ae=se,j=-1,Q,re=0;if(q==null)for(;++j=0;)for(re=ee[q],se=re.length;--se>=0;)Q[--j]=re[se];return Q}function B(ee,q){var se=ee.length,ae=-1,j,Q;if(q==null){for(;++ae=j)for(Q=j;++aej&&(Q=j)}else for(;++ae=j)for(Q=j;++aej&&(Q=j);return Q}function X(ee,q){for(var se=q.length,ae=new Array(se);se--;)ae[se]=ee[q[se]];return ae}function $(ee,q){if(se=ee.length){var se,ae=0,j=0,Q,re=ee[j];for(q==null&&(q=x);++ae0?1:Qt<0?-1:0},p=Math.sqrt,u=Math.tan;function y(Qt){return Qt>1?0:Qt<-1?a:Math.acos(Qt)}function m(Qt){return Qt>1?n:Qt<-1?-n:Math.asin(Qt)}function R(Qt){return(Qt=g(Qt/2))*Qt}function L(){}function z(Qt,br){Qt&&N.hasOwnProperty(Qt.type)&&N[Qt.type](Qt,br)}var F={Feature:function(Qt,br){z(Qt.geometry,br)},FeatureCollection:function(Qt,br){for(var aa=Qt.features,$r=-1,ka=aa.length;++$r=0?1:-1,ka=$r*aa,li=l(br),Ci=g(br),Hi=G*Ci,Qi=de*li+Hi*l(ka),pn=Hi*$r*g(ka);B.add(T(pn,Qi)),ce=Qt,de=li,G=Ci}function j(Qt){return X.reset(),U(Qt,Y),X*2}function Q(Qt){return[T(Qt[1],Qt[0]),m(Qt[2])]}function re(Qt){var br=Qt[0],aa=Qt[1],$r=l(aa);return[$r*l(br),$r*g(br),g(aa)]}function pe(Qt,br){return Qt[0]*br[0]+Qt[1]*br[1]+Qt[2]*br[2]}function we(Qt,br){return[Qt[1]*br[2]-Qt[2]*br[1],Qt[2]*br[0]-Qt[0]*br[2],Qt[0]*br[1]-Qt[1]*br[0]]}function Se(Qt,br){Qt[0]+=br[0],Qt[1]+=br[1],Qt[2]+=br[2]}function Ie(Qt,br){return[Qt[0]*br,Qt[1]*br,Qt[2]*br]}function Re(Qt){var br=p(Qt[0]*Qt[0]+Qt[1]*Qt[1]+Qt[2]*Qt[2]);Qt[0]/=br,Qt[1]/=br,Qt[2]/=br}var We,at,nt,tt,qe,he,ue,ne,Ce=S(),Ye,rt,Ke={point:Mt,lineStart:Nt,lineEnd:Gt,polygonStart:function(){Ke.point=Mr,Ke.lineStart=mr,Ke.lineEnd=qr,Ce.reset(),Y.polygonStart()},polygonEnd:function(){Y.polygonEnd(),Ke.point=Mt,Ke.lineStart=Nt,Ke.lineEnd=Gt,B<0?(We=-(nt=180),at=-(tt=90)):Ce>r?tt=90:Ce<-r&&(at=-90),rt[0]=We,rt[1]=nt},sphere:function(){We=-(nt=180),at=-(tt=90)}};function Mt(Qt,br){Ye.push(rt=[We=Qt,nt=Qt]),brtt&&(tt=br)}function kt(Qt,br){var aa=re([Qt*f,br*f]);if(ne){var $r=we(ne,aa),ka=[$r[1],-$r[0],0],li=we(ka,$r);Re(li),li=Q(li);var Ci=Qt-qe,Hi=Ci>0?1:-1,Qi=li[0]*h*Hi,pn,Pi=v(Ci)>180;Pi^(Hi*qett&&(tt=pn)):(Qi=(Qi+360)%360-180,Pi^(Hi*qett&&(tt=br))),Pi?QtEr(We,nt)&&(nt=Qt):Er(Qt,nt)>Er(We,nt)&&(We=Qt):nt>=We?(Qtnt&&(nt=Qt)):Qt>qe?Er(We,Qt)>Er(We,nt)&&(nt=Qt):Er(Qt,nt)>Er(We,nt)&&(We=Qt)}else Ye.push(rt=[We=Qt,nt=Qt]);brtt&&(tt=br),ne=aa,qe=Qt}function Nt(){Ke.point=kt}function Gt(){rt[0]=We,rt[1]=nt,Ke.point=Mt,ne=null}function Mr(Qt,br){if(ne){var aa=Qt-qe;Ce.add(v(aa)>180?aa+(aa>0?360:-360):aa)}else he=Qt,ue=br;Y.point(Qt,br),kt(Qt,br)}function mr(){Y.lineStart()}function qr(){Mr(he,ue),Y.lineEnd(),v(Ce)>r&&(We=-(nt=180)),rt[0]=We,rt[1]=nt,ne=null}function Er(Qt,br){return(br-=Qt)<0?br+360:br}function Ir(Qt,br){return Qt[0]-br[0]}function _t(Qt,br){return Qt[0]<=Qt[1]?Qt[0]<=br&&br<=Qt[1]:brEr($r[0],$r[1])&&($r[1]=ka[1]),Er(ka[0],$r[1])>Er($r[0],$r[1])&&($r[0]=ka[0])):li.push($r=ka);for(Ci=-1/0,aa=li.length-1,br=0,$r=li[aa];br<=aa;$r=ka,++br)ka=li[br],(Hi=Er($r[1],ka[0]))>Ci&&(Ci=Hi,We=ka[0],nt=$r[1])}return Ye=rt=null,We===1/0||at===1/0?[[NaN,NaN],[NaN,NaN]]:[[We,at],[nt,tt]]}var Je,Ae,Le,Ue,Ze,st,ut,Ut,Ct,Pt,jt,fr,ur,sr,Pr,Ta,Oa={sphere:L,point:Ia,lineStart:Wa,lineEnd:wi,polygonStart:function(){Oa.lineStart=Kt,Oa.lineEnd=Dt},polygonEnd:function(){Oa.lineStart=Wa,Oa.lineEnd=wi}};function Ia(Qt,br){Qt*=f,br*=f;var aa=l(br);qa(aa*l(Qt),aa*g(Qt),g(br))}function qa(Qt,br,aa){++Je,Le+=(Qt-Le)/Je,Ue+=(br-Ue)/Je,Ze+=(aa-Ze)/Je}function Wa(){Oa.point=Ca}function Ca(Qt,br){Qt*=f,br*=f;var aa=l(br);sr=aa*l(Qt),Pr=aa*g(Qt),Ta=g(br),Oa.point=hi,qa(sr,Pr,Ta)}function hi(Qt,br){Qt*=f,br*=f;var aa=l(br),$r=aa*l(Qt),ka=aa*g(Qt),li=g(br),Ci=T(p((Ci=Pr*li-Ta*ka)*Ci+(Ci=Ta*$r-sr*li)*Ci+(Ci=sr*ka-Pr*$r)*Ci),sr*$r+Pr*ka+Ta*li);Ae+=Ci,st+=Ci*(sr+(sr=$r)),ut+=Ci*(Pr+(Pr=ka)),Ut+=Ci*(Ta+(Ta=li)),qa(sr,Pr,Ta)}function wi(){Oa.point=Ia}function Kt(){Oa.point=Yt}function Dt(){Jt(fr,ur),Oa.point=Ia}function Yt(Qt,br){fr=Qt,ur=br,Qt*=f,br*=f,Oa.point=Jt;var aa=l(br);sr=aa*l(Qt),Pr=aa*g(Qt),Ta=g(br),qa(sr,Pr,Ta)}function Jt(Qt,br){Qt*=f,br*=f;var aa=l(br),$r=aa*l(Qt),ka=aa*g(Qt),li=g(br),Ci=Pr*li-Ta*ka,Hi=Ta*$r-sr*li,Qi=sr*ka-Pr*$r,pn=p(Ci*Ci+Hi*Hi+Qi*Qi),Pi=m(pn),Di=pn&&-Pi/pn;Ct+=Di*Ci,Pt+=Di*Hi,jt+=Di*Qi,Ae+=Pi,st+=Pi*(sr+(sr=$r)),ut+=Pi*(Pr+(Pr=ka)),Ut+=Pi*(Ta+(Ta=li)),qa(sr,Pr,Ta)}function Fr(Qt){Je=Ae=Le=Ue=Ze=st=ut=Ut=Ct=Pt=jt=0,U(Qt,Oa);var br=Ct,aa=Pt,$r=jt,ka=br*br+aa*aa+$r*$r;return kaa?Qt+Math.round(-Qt/s)*s:Qt,br]}ca.invert=ca;function Ba(Qt,br,aa){return(Qt%=s)?br||aa?ra(Za(Qt),ri(br,aa)):Za(Qt):br||aa?ri(br,aa):ca}function $a(Qt){return function(br,aa){return br+=Qt,[br>a?br-s:br<-a?br+s:br,aa]}}function Za(Qt){var br=$a(Qt);return br.invert=$a(-Qt),br}function ri(Qt,br){var aa=l(Qt),$r=g(Qt),ka=l(br),li=g(br);function Ci(Hi,Qi){var pn=l(Qi),Pi=l(Hi)*pn,Di=g(Hi)*pn,Ni=g(Qi),mi=Ni*aa+Pi*$r;return[T(Di*ka-mi*li,Pi*aa-Ni*$r),m(mi*ka+Di*li)]}return Ci.invert=function(Hi,Qi){var pn=l(Qi),Pi=l(Hi)*pn,Di=g(Hi)*pn,Ni=g(Qi),mi=Ni*ka-Di*li;return[T(Di*ka+Ni*li,Pi*aa+mi*$r),m(mi*aa-Pi*$r)]},Ci}function pi(Qt){Qt=Ba(Qt[0]*f,Qt[1]*f,Qt.length>2?Qt[2]*f:0);function br(aa){return aa=Qt(aa[0]*f,aa[1]*f),aa[0]*=h,aa[1]*=h,aa}return br.invert=function(aa){return aa=Qt.invert(aa[0]*f,aa[1]*f),aa[0]*=h,aa[1]*=h,aa},br}function Ra(Qt,br,aa,$r,ka,li){if(aa){var Ci=l(br),Hi=g(br),Qi=$r*aa;ka==null?(ka=br+$r*s,li=br-Qi/2):(ka=an(Ci,ka),li=an(Ci,li),($r>0?kali)&&(ka+=$r*s));for(var pn,Pi=ka;$r>0?Pi>li:Pi1&&Qt.push(Qt.pop().concat(Qt.shift()))},result:function(){var aa=Qt;return Qt=[],br=null,aa}}}function xt(Qt,br){return v(Qt[0]-br[0])=0;--Hi)ka.point((Di=Pi[Hi])[0],Di[1]);else $r(Ni.x,Ni.p.x,-1,ka);Ni=Ni.p}Ni=Ni.o,Pi=Ni.z,mi=!mi}while(!Ni.v);ka.lineEnd()}}}function Cr(Qt){if(br=Qt.length){for(var br,aa=0,$r=Qt[0],ka;++aa=0?1:-1,Ns=rl*Ms,el=Ns>a,ws=$n*go;if(xr.add(T(ws*rl*g(Ns),no*Ko+ws*l(Ns))),Ci+=el?Ms+rl*s:Ms,el^mi>=aa^Tn>=aa){var Fl=we(re(Ni),re(co));Re(Fl);var _l=we(li,Fl);Re(_l);var ll=(el^Ms>=0?-1:1)*m(_l[2]);($r>ll||$r===ll&&(Fl[0]||Fl[1]))&&(Hi+=el^Ms>=0?1:-1)}}return(Ci<-r||Ci0){for(Qi||(ka.polygonStart(),Qi=!0),ka.lineStart(),Ko=0;Ko1&&un&2&&go.push(go.pop().concat(go.shift())),Pi.push(go.filter(gt))}}return Ni}}function gt(Qt){return Qt.length>1}function Xt(Qt,br){return((Qt=Qt.x)[0]<0?Qt[1]-n-r:n-Qt[1])-((br=br.x)[0]<0?br[1]-n-r:n-br[1])}var vr=Hr(function(){return!0},Or,Pa,[-a,-n]);function Or(Qt){var br=NaN,aa=NaN,$r=NaN,ka;return{lineStart:function(){Qt.lineStart(),ka=1},point:function(li,Ci){var Hi=li>0?a:-a,Qi=v(li-br);v(Qi-a)0?n:-n),Qt.point($r,aa),Qt.lineEnd(),Qt.lineStart(),Qt.point(Hi,aa),Qt.point(li,aa),ka=0):$r!==Hi&&Qi>=a&&(v(br-$r)r?c((g(br)*(li=l($r))*g(aa)-g($r)*(ka=l(br))*g(Qt))/(ka*li*Ci)):(br+$r)/2}function Pa(Qt,br,aa,$r){var ka;if(Qt==null)ka=aa*n,$r.point(-a,ka),$r.point(0,ka),$r.point(a,ka),$r.point(a,0),$r.point(a,-ka),$r.point(0,-ka),$r.point(-a,-ka),$r.point(-a,0),$r.point(-a,ka);else if(v(Qt[0]-br[0])>r){var li=Qt[0]0,ka=v(br)>r;function li(Pi,Di,Ni,mi){Ra(mi,Qt,aa,Ni,Pi,Di)}function Ci(Pi,Di){return l(Pi)*l(Di)>br}function Hi(Pi){var Di,Ni,mi,Sn,$n;return{lineStart:function(){Sn=mi=!1,$n=1},point:function(no,Qn){var co=[no,Qn],Tn,un=Ci(no,Qn),go=$r?un?0:pn(no,Qn):un?pn(no+(no<0?a:-a),Qn):0;if(!Di&&(Sn=mi=un)&&Pi.lineStart(),un!==mi&&(Tn=Qi(Di,co),(!Tn||xt(Di,Tn)||xt(co,Tn))&&(co[2]=1)),un!==mi)$n=0,un?(Pi.lineStart(),Tn=Qi(co,Di),Pi.point(Tn[0],Tn[1])):(Tn=Qi(Di,co),Pi.point(Tn[0],Tn[1],2),Pi.lineEnd()),Di=Tn;else if(ka&&Di&&$r^un){var Ko;!(go&Ni)&&(Ko=Qi(co,Di,!0))&&($n=0,$r?(Pi.lineStart(),Pi.point(Ko[0][0],Ko[0][1]),Pi.point(Ko[1][0],Ko[1][1]),Pi.lineEnd()):(Pi.point(Ko[1][0],Ko[1][1]),Pi.lineEnd(),Pi.lineStart(),Pi.point(Ko[0][0],Ko[0][1],3)))}un&&(!Di||!xt(Di,co))&&Pi.point(co[0],co[1]),Di=co,mi=un,Ni=go},lineEnd:function(){mi&&Pi.lineEnd(),Di=null},clean:function(){return $n|(Sn&&mi)<<1}}}function Qi(Pi,Di,Ni){var mi=re(Pi),Sn=re(Di),$n=[1,0,0],no=we(mi,Sn),Qn=pe(no,no),co=no[0],Tn=Qn-co*co;if(!Tn)return!Ni&Πvar un=br*Qn/Tn,go=-br*co/Tn,Ko=we($n,no),Ms=Ie($n,un),rl=Ie(no,go);Se(Ms,rl);var Ns=Ko,el=pe(Ms,Ns),ws=pe(Ns,Ns),Fl=el*el-ws*(pe(Ms,Ms)-1);if(!(Fl<0)){var _l=p(Fl),ll=Ie(Ns,(-el-_l)/ws);if(Se(ll,Ms),ll=Q(ll),!Ni)return ll;var jn=Pi[0],Io=Di[0],Js=Pi[1],Ds=Di[1],uu;Io0^ll[1]<(v(ll[0]-jn)a^(jn<=ll[0]&&ll[0]<=Io)){var bu=Ie(Ns,(-el+_l)/ws);return Se(bu,Ms),[ll,Q(bu)]}}}function pn(Pi,Di){var Ni=$r?Qt:a-Qt,mi=0;return Pi<-Ni?mi|=1:Pi>Ni&&(mi|=2),Di<-Ni?mi|=4:Di>Ni&&(mi|=8),mi}return Hr(Ci,Hi,li,$r?[0,-Qt]:[-a,Qt-a])}function la(Qt,br,aa,$r,ka,li){var Ci=Qt[0],Hi=Qt[1],Qi=br[0],pn=br[1],Pi=0,Di=1,Ni=Qi-Ci,mi=pn-Hi,Sn;if(Sn=aa-Ci,!(!Ni&&Sn>0)){if(Sn/=Ni,Ni<0){if(Sn0){if(Sn>Di)return;Sn>Pi&&(Pi=Sn)}if(Sn=ka-Ci,!(!Ni&&Sn<0)){if(Sn/=Ni,Ni<0){if(Sn>Di)return;Sn>Pi&&(Pi=Sn)}else if(Ni>0){if(Sn0)){if(Sn/=mi,mi<0){if(Sn0){if(Sn>Di)return;Sn>Pi&&(Pi=Sn)}if(Sn=li-Hi,!(!mi&&Sn<0)){if(Sn/=mi,mi<0){if(Sn>Di)return;Sn>Pi&&(Pi=Sn)}else if(mi>0){if(Sn0&&(Qt[0]=Ci+Pi*Ni,Qt[1]=Hi+Pi*mi),Di<1&&(br[0]=Ci+Di*Ni,br[1]=Hi+Di*mi),!0}}}}}var _a=1e9,Ai=-_a;function ki(Qt,br,aa,$r){function ka(pn,Pi){return Qt<=pn&&pn<=aa&&br<=Pi&&Pi<=$r}function li(pn,Pi,Di,Ni){var mi=0,Sn=0;if(pn==null||(mi=Ci(pn,Di))!==(Sn=Ci(Pi,Di))||Qi(pn,Pi)<0^Di>0)do Ni.point(mi===0||mi===3?Qt:aa,mi>1?$r:br);while((mi=(mi+Di+4)%4)!==Sn);else Ni.point(Pi[0],Pi[1])}function Ci(pn,Pi){return v(pn[0]-Qt)0?0:3:v(pn[0]-aa)0?2:1:v(pn[1]-br)0?1:0:Pi>0?3:2}function Hi(pn,Pi){return Qi(pn.x,Pi.x)}function Qi(pn,Pi){var Di=Ci(pn,1),Ni=Ci(Pi,1);return Di!==Ni?Di-Ni:Di===0?Pi[1]-pn[1]:Di===1?pn[0]-Pi[0]:Di===2?pn[1]-Pi[1]:Pi[0]-pn[0]}return function(pn){var Pi=pn,Di=fn(),Ni,mi,Sn,$n,no,Qn,co,Tn,un,go,Ko,Ms={point:rl,lineStart:Fl,lineEnd:_l,polygonStart:el,polygonEnd:ws};function rl(jn,Io){ka(jn,Io)&&Pi.point(jn,Io)}function Ns(){for(var jn=0,Io=0,Js=mi.length;Io$r&&(Rc-Ic)*($r-bu)>(Au-bu)*(Qt-Ic)&&++jn:Au<=$r&&(Rc-Ic)*($r-bu)<(Au-bu)*(Qt-Ic)&&--jn;return jn}function el(){Pi=Di,Ni=[],mi=[],Ko=!0}function ws(){var jn=Ns(),Io=Ko&&jn,Js=(Ni=x.merge(Ni)).length;(Io||Js)&&(pn.polygonStart(),Io&&(pn.lineStart(),li(null,null,1,pn),pn.lineEnd()),Js&&Br(Ni,Hi,jn,li,pn),pn.polygonEnd()),Pi=pn,Ni=mi=Sn=null}function Fl(){Ms.point=ll,mi&&mi.push(Sn=[]),go=!0,un=!1,co=Tn=NaN}function _l(){Ni&&(ll($n,no),Qn&&un&&Di.rejoin(),Ni.push(Di.result())),Ms.point=rl,un&&Pi.lineEnd()}function ll(jn,Io){var Js=ka(jn,Io);if(mi&&Sn.push([jn,Io]),go)$n=jn,no=Io,Qn=Js,go=!1,Js&&(Pi.lineStart(),Pi.point(jn,Io));else if(Js&&un)Pi.point(jn,Io);else{var Ds=[co=Math.max(Ai,Math.min(_a,co)),Tn=Math.max(Ai,Math.min(_a,Tn))],uu=[jn=Math.max(Ai,Math.min(_a,jn)),Io=Math.max(Ai,Math.min(_a,Io))];la(Ds,uu,Qt,br,aa,$r)?(un||(Pi.lineStart(),Pi.point(Ds[0],Ds[1])),Pi.point(uu[0],uu[1]),Js||Pi.lineEnd(),Ko=!1):Js&&(Pi.lineStart(),Pi.point(jn,Io),Ko=!1)}co=jn,Tn=Io,un=Js}return Ms}}function Ki(){var Qt=0,br=0,aa=960,$r=500,ka,li,Ci;return Ci={stream:function(Hi){return ka&&li===Hi?ka:ka=ki(Qt,br,aa,$r)(li=Hi)},extent:function(Hi){return arguments.length?(Qt=+Hi[0][0],br=+Hi[0][1],aa=+Hi[1][0],$r=+Hi[1][1],ka=li=null,Ci):[[Qt,br],[aa,$r]]}}}var yn=S(),Ln,kn,Bn,ao={sphere:L,point:L,lineStart:xo,lineEnd:L,polygonStart:L,polygonEnd:L};function xo(){ao.point=Fs,ao.lineEnd=Co}function Co(){ao.point=ao.lineEnd=L}function Fs(Qt,br){Qt*=f,br*=f,Ln=Qt,kn=g(br),Bn=l(br),ao.point=Mn}function Mn(Qt,br){Qt*=f,br*=f;var aa=g(br),$r=l(br),ka=v(Qt-Ln),li=l(ka),Ci=g(ka),Hi=$r*Ci,Qi=Bn*aa-kn*$r*li,pn=kn*aa+Bn*$r*li;yn.add(T(p(Hi*Hi+Qi*Qi),pn)),Ln=Qt,kn=aa,Bn=$r}function Ao(Qt){return yn.reset(),U(Qt,ao),+yn}var On=[null,null],ts={type:"LineString",coordinates:On};function is(Qt,br){return On[0]=Qt,On[1]=br,Ao(ts)}var _s={Feature:function(Qt,br){return io(Qt.geometry,br)},FeatureCollection:function(Qt,br){for(var aa=Qt.features,$r=-1,ka=aa.length;++$r0&&(ka=is(Qt[li],Qt[li-1]),ka>0&&aa<=ka&&$r<=ka&&(aa+$r-ka)*(1-Math.pow((aa-$r)/ka,2))r}).map(Ni)).concat(x.range(_(li/pn)*pn,ka,pn).filter(function(Tn){return v(Tn%Di)>r}).map(mi))}return Qn.lines=function(){return co().map(function(Tn){return{type:"LineString",coordinates:Tn}})},Qn.outline=function(){return{type:"Polygon",coordinates:[Sn($r).concat($n(Ci).slice(1),Sn(aa).reverse().slice(1),$n(Hi).reverse().slice(1))]}},Qn.extent=function(Tn){return arguments.length?Qn.extentMajor(Tn).extentMinor(Tn):Qn.extentMinor()},Qn.extentMajor=function(Tn){return arguments.length?($r=+Tn[0][0],aa=+Tn[1][0],Hi=+Tn[0][1],Ci=+Tn[1][1],$r>aa&&(Tn=$r,$r=aa,aa=Tn),Hi>Ci&&(Tn=Hi,Hi=Ci,Ci=Tn),Qn.precision(no)):[[$r,Hi],[aa,Ci]]},Qn.extentMinor=function(Tn){return arguments.length?(br=+Tn[0][0],Qt=+Tn[1][0],li=+Tn[0][1],ka=+Tn[1][1],br>Qt&&(Tn=br,br=Qt,Qt=Tn),li>ka&&(Tn=li,li=ka,ka=Tn),Qn.precision(no)):[[br,li],[Qt,ka]]},Qn.step=function(Tn){return arguments.length?Qn.stepMajor(Tn).stepMinor(Tn):Qn.stepMinor()},Qn.stepMajor=function(Tn){return arguments.length?(Pi=+Tn[0],Di=+Tn[1],Qn):[Pi,Di]},Qn.stepMinor=function(Tn){return arguments.length?(Qi=+Tn[0],pn=+Tn[1],Qn):[Qi,pn]},Qn.precision=function(Tn){return arguments.length?(no=+Tn,Ni=Gi(li,ka,90),mi=Pn(br,Qt,no),Sn=Gi(Hi,Ci,90),$n=Pn($r,aa,no),Qn):no},Qn.extentMajor([[-180,-90+r],[180,90-r]]).extentMinor([[-180,-80-r],[180,80+r]])}function xs(){return js()()}function Hn(Qt,br){var aa=Qt[0]*f,$r=Qt[1]*f,ka=br[0]*f,li=br[1]*f,Ci=l($r),Hi=g($r),Qi=l(li),pn=g(li),Pi=Ci*l(aa),Di=Ci*g(aa),Ni=Qi*l(ka),mi=Qi*g(ka),Sn=2*m(p(R(li-$r)+Ci*Qi*R(ka-aa))),$n=g(Sn),no=Sn?function(Qn){var co=g(Qn*=Sn)/$n,Tn=g(Sn-Qn)/$n,un=Tn*Pi+co*Ni,go=Tn*Di+co*mi,Ko=Tn*Hi+co*pn;return[T(go,un)*h,T(Ko,p(un*un+go*go))*h]}:function(){return[aa*h,$r*h]};return no.distance=Sn,no}function Os(Qt){return Qt}var ds=S(),Xs=S(),il,_n,Lo,bo,Rs={point:L,lineStart:L,lineEnd:L,polygonStart:function(){Rs.lineStart=pu,Rs.lineEnd=vl},polygonEnd:function(){Rs.lineStart=Rs.lineEnd=Rs.point=L,ds.add(v(Xs)),Xs.reset()},result:function(){var Qt=ds/2;return ds.reset(),Qt}};function pu(){Rs.point=uo}function uo(Qt,br){Rs.point=Gs,il=Lo=Qt,_n=bo=br}function Gs(Qt,br){Xs.add(bo*Qt-Lo*br),Lo=Qt,bo=br}function vl(){Gs(il,_n)}var As=1/0,qs=As,us=-As,Ss=us,Nl={point:su,lineStart:L,lineEnd:L,polygonStart:L,polygonEnd:L,result:function(){var Qt=[[As,qs],[us,Ss]];return us=Ss=-(qs=As=1/0),Qt}};function su(Qt,br){Qtus&&(us=Qt),brSs&&(Ss=br)}var Tc=0,du=0,Sf=0,Uc=0,Bs=0,dc=0,Hc=0,lu=0,Pl=0,ic,Ou,nl,ml,bs={point:Zs,lineStart:nc,lineEnd:fl,polygonStart:function(){bs.lineStart=xh,bs.lineEnd=ss},polygonEnd:function(){bs.point=Zs,bs.lineStart=nc,bs.lineEnd=fl},result:function(){var Qt=Pl?[Hc/Pl,lu/Pl]:dc?[Uc/dc,Bs/dc]:Sf?[Tc/Sf,du/Sf]:[NaN,NaN];return Tc=du=Sf=Uc=Bs=dc=Hc=lu=Pl=0,Qt}};function Zs(Qt,br){Tc+=Qt,du+=br,++Sf}function nc(){bs.point=Ul}function Ul(Qt,br){bs.point=qu,Zs(nl=Qt,ml=br)}function qu(Qt,br){var aa=Qt-nl,$r=br-ml,ka=p(aa*aa+$r*$r);Uc+=ka*(nl+Qt)/2,Bs+=ka*(ml+br)/2,dc+=ka,Zs(nl=Qt,ml=br)}function fl(){bs.point=Zs}function xh(){bs.point=bh}function ss(){ks(ic,Ou)}function bh(Qt,br){bs.point=ks,Zs(ic=nl=Qt,Ou=ml=br)}function ks(Qt,br){var aa=Qt-nl,$r=br-ml,ka=p(aa*aa+$r*$r);Uc+=ka*(nl+Qt)/2,Bs+=ka*(ml+br)/2,dc+=ka,ka=ml*Qt-nl*br,Hc+=ka*(nl+Qt),lu+=ka*(ml+br),Pl+=ka*3,Zs(nl=Qt,ml=br)}function to(Qt){this._context=Qt}to.prototype={_radius:4.5,pointRadius:function(Qt){return this._radius=Qt,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(Qt,br){switch(this._point){case 0:{this._context.moveTo(Qt,br),this._point=1;break}case 1:{this._context.lineTo(Qt,br);break}default:{this._context.moveTo(Qt+this._radius,br),this._context.arc(Qt,br,this._radius,0,s);break}}},result:L};var Wc=S(),Vu,jl,Mf,Ac,nf,$l={point:L,lineStart:function(){$l.point=Jf},lineEnd:function(){Vu&&Of(jl,Mf),$l.point=L},polygonStart:function(){Vu=!0},polygonEnd:function(){Vu=null},result:function(){var Qt=+Wc;return Wc.reset(),Qt}};function Jf(Qt,br){$l.point=Of,jl=Ac=Qt,Mf=nf=br}function Of(Qt,br){Ac-=Qt,nf-=br,Wc.add(p(Ac*Ac+nf*nf)),Ac=Qt,nf=br}function of(){this._string=[]}of.prototype={_radius:4.5,_circle:jc(4.5),pointRadius:function(Qt){return(Qt=+Qt)!==this._radius&&(this._radius=Qt,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._string.push("Z"),this._point=NaN},point:function(Qt,br){switch(this._point){case 0:{this._string.push("M",Qt,",",br),this._point=1;break}case 1:{this._string.push("L",Qt,",",br);break}default:{this._circle==null&&(this._circle=jc(this._radius)),this._string.push("M",Qt,",",br,this._circle);break}}},result:function(){if(this._string.length){var Qt=this._string.join("");return this._string=[],Qt}else return null}};function jc(Qt){return"m0,"+Qt+"a"+Qt+","+Qt+" 0 1,1 0,"+-2*Qt+"a"+Qt+","+Qt+" 0 1,1 0,"+2*Qt+"z"}function Bf(Qt,br){var aa=4.5,$r,ka;function li(Ci){return Ci&&(typeof aa=="function"&&ka.pointRadius(+aa.apply(this,arguments)),U(Ci,$r(ka))),ka.result()}return li.area=function(Ci){return U(Ci,$r(Rs)),Rs.result()},li.measure=function(Ci){return U(Ci,$r($l)),$l.result()},li.bounds=function(Ci){return U(Ci,$r(Nl)),Nl.result()},li.centroid=function(Ci){return U(Ci,$r(bs)),bs.result()},li.projection=function(Ci){return arguments.length?($r=Ci==null?(Qt=null,Os):(Qt=Ci).stream,li):Qt},li.context=function(Ci){return arguments.length?(ka=Ci==null?(br=null,new of):new to(br=Ci),typeof aa!="function"&&ka.pointRadius(aa),li):br},li.pointRadius=function(Ci){return arguments.length?(aa=typeof Ci=="function"?Ci:(ka.pointRadius(+Ci),+Ci),li):aa},li.projection(Qt).context(br)}function Nf(Qt){return{stream:Gu(Qt)}}function Gu(Qt){return function(br){var aa=new Ef;for(var $r in Qt)aa[$r]=Qt[$r];return aa.stream=br,aa}}function Ef(){}Ef.prototype={constructor:Ef,point:function(Qt,br){this.stream.point(Qt,br)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function oc(Qt,br,aa){var $r=Qt.clipExtent&&Qt.clipExtent();return Qt.scale(150).translate([0,0]),$r!=null&&Qt.clipExtent(null),U(aa,Qt.stream(Nl)),br(Nl.result()),$r!=null&&Qt.clipExtent($r),Qt}function Xc(Qt,br,aa){return oc(Qt,function($r){var ka=br[1][0]-br[0][0],li=br[1][1]-br[0][1],Ci=Math.min(ka/($r[1][0]-$r[0][0]),li/($r[1][1]-$r[0][1])),Hi=+br[0][0]+(ka-Ci*($r[1][0]+$r[0][0]))/2,Qi=+br[0][1]+(li-Ci*($r[1][1]+$r[0][1]))/2;Qt.scale(150*Ci).translate([Hi,Qi])},aa)}function Ql(Qt,br,aa){return Xc(Qt,[[0,0],br],aa)}function qc(Qt,br,aa){return oc(Qt,function($r){var ka=+br,li=ka/($r[1][0]-$r[0][0]),Ci=(ka-li*($r[1][0]+$r[0][0]))/2,Hi=-li*$r[0][1];Qt.scale(150*li).translate([Ci,Hi])},aa)}function Sc(Qt,br,aa){return oc(Qt,function($r){var ka=+br,li=ka/($r[1][1]-$r[0][1]),Ci=-li*$r[0][0],Hi=(ka-li*($r[1][1]+$r[0][1]))/2;Qt.scale(150*li).translate([Ci,Hi])},aa)}var Ys=16,kf=l(30*f);function fh(Qt,br){return+br?Zc(Qt,br):Uf(Qt)}function Uf(Qt){return Gu({point:function(br,aa){br=Qt(br,aa),this.stream.point(br[0],br[1])}})}function Zc(Qt,br){function aa($r,ka,li,Ci,Hi,Qi,pn,Pi,Di,Ni,mi,Sn,$n,no){var Qn=pn-$r,co=Pi-ka,Tn=Qn*Qn+co*co;if(Tn>4*br&&$n--){var un=Ci+Ni,go=Hi+mi,Ko=Qi+Sn,Ms=p(un*un+go*go+Ko*Ko),rl=m(Ko/=Ms),Ns=v(v(Ko)-1)br||v((Qn*_l+co*ll)/Tn-.5)>.3||Ci*Ni+Hi*mi+Qi*Sn2?jn[2]%360*f:0,_l()):[Hi*h,Qi*h,pn*h]},ws.angle=function(jn){return arguments.length?(Di=jn%360*f,_l()):Di*h},ws.reflectX=function(jn){return arguments.length?(Ni=jn?-1:1,_l()):Ni<0},ws.reflectY=function(jn){return arguments.length?(mi=jn?-1:1,_l()):mi<0},ws.precision=function(jn){return arguments.length?(Ko=fh(Ms,go=jn*jn),ll()):p(go)},ws.fitExtent=function(jn,Io){return Xc(ws,jn,Io)},ws.fitSize=function(jn,Io){return Ql(ws,jn,Io)},ws.fitWidth=function(jn,Io){return qc(ws,jn,Io)},ws.fitHeight=function(jn,Io){return Sc(ws,jn,Io)};function _l(){var jn=yl(aa,0,0,Ni,mi,Di).apply(null,br(li,Ci)),Io=(Di?yl:jf)(aa,$r-jn[0],ka-jn[1],Ni,mi,Di);return Pi=Ba(Hi,Qi,pn),Ms=ra(br,Io),rl=ra(Pi,Ms),Ko=fh(Ms,go),ll()}function ll(){return Ns=el=null,ws}return function(){return br=Qt.apply(this,arguments),ws.invert=br.invert&&Fl,_l()}}function ol(Qt){var br=0,aa=a/3,$r=Mc(Qt),ka=$r(br,aa);return ka.parallels=function(li){return arguments.length?$r(br=li[0]*f,aa=li[1]*f):[br*h,aa*h]},ka}function vc(Qt){var br=l(Qt);function aa($r,ka){return[$r*br,g(ka)/br]}return aa.invert=function($r,ka){return[$r/br,m(ka*br)]},aa}function yu(Qt,br){var aa=g(Qt),$r=(aa+g(br))/2;if(v($r)=.12&&no<.234&&$n>=-.425&&$n<-.214?ka:no>=.166&&no<.234&&$n>=-.214&&$n<-.115?Ci:aa).invert(Ni)},Pi.stream=function(Ni){return Qt&&br===Ni?Qt:Qt=qf([aa.stream(br=Ni),ka.stream(Ni),Ci.stream(Ni)])},Pi.precision=function(Ni){return arguments.length?(aa.precision(Ni),ka.precision(Ni),Ci.precision(Ni),Di()):aa.precision()},Pi.scale=function(Ni){return arguments.length?(aa.scale(Ni),ka.scale(Ni*.35),Ci.scale(Ni),Pi.translate(aa.translate())):aa.scale()},Pi.translate=function(Ni){if(!arguments.length)return aa.translate();var mi=aa.scale(),Sn=+Ni[0],$n=+Ni[1];return $r=aa.translate(Ni).clipExtent([[Sn-.455*mi,$n-.238*mi],[Sn+.455*mi,$n+.238*mi]]).stream(pn),li=ka.translate([Sn-.307*mi,$n+.201*mi]).clipExtent([[Sn-.425*mi+r,$n+.12*mi+r],[Sn-.214*mi-r,$n+.234*mi-r]]).stream(pn),Hi=Ci.translate([Sn-.205*mi,$n+.212*mi]).clipExtent([[Sn-.214*mi+r,$n+.166*mi+r],[Sn-.115*mi-r,$n+.234*mi-r]]).stream(pn),Di()},Pi.fitExtent=function(Ni,mi){return Xc(Pi,Ni,mi)},Pi.fitSize=function(Ni,mi){return Ql(Pi,Ni,mi)},Pi.fitWidth=function(Ni,mi){return qc(Pi,Ni,mi)},Pi.fitHeight=function(Ni,mi){return Sc(Pi,Ni,mi)};function Di(){return Qt=br=null,Pi}return Pi.scale(1070)}function Bu(Qt){return function(br,aa){var $r=l(br),ka=l(aa),li=Qt($r*ka);return[li*ka*g(br),li*g(aa)]}}function Ec(Qt){return function(br,aa){var $r=p(br*br+aa*aa),ka=Qt($r),li=g(ka),Ci=l(ka);return[T(br*li,$r*Ci),m($r&&aa*li/$r)]}}var mc=Bu(function(Qt){return p(2/(1+Qt))});mc.invert=Ec(function(Qt){return 2*m(Qt/2)});function Lh(){return Lu(mc).scale(124.75).clipAngle(180-.001)}var sf=Bu(function(Qt){return(Qt=y(Qt))&&Qt/g(Qt)});sf.invert=Ec(function(Qt){return Qt});function vf(){return Lu(sf).scale(79.4188).clipAngle(180-.001)}function Nu(Qt,br){return[Qt,A(u((n+br)/2))]}Nu.invert=function(Qt,br){return[Qt,2*c(w(br))-n]};function lf(){return au(Nu).scale(961/s)}function au(Qt){var br=Lu(Qt),aa=br.center,$r=br.scale,ka=br.translate,li=br.clipExtent,Ci=null,Hi,Qi,pn;br.scale=function(Di){return arguments.length?($r(Di),Pi()):$r()},br.translate=function(Di){return arguments.length?(ka(Di),Pi()):ka()},br.center=function(Di){return arguments.length?(aa(Di),Pi()):aa()},br.clipExtent=function(Di){return arguments.length?(Di==null?Ci=Hi=Qi=pn=null:(Ci=+Di[0][0],Hi=+Di[0][1],Qi=+Di[1][0],pn=+Di[1][1]),Pi()):Ci==null?null:[[Ci,Hi],[Qi,pn]]};function Pi(){var Di=a*$r(),Ni=br(pi(br.rotate()).invert([0,0]));return li(Ci==null?[[Ni[0]-Di,Ni[1]-Di],[Ni[0]+Di,Ni[1]+Di]]:Qt===Nu?[[Math.max(Ni[0]-Di,Ci),Hi],[Math.min(Ni[0]+Di,Qi),pn]]:[[Ci,Math.max(Ni[1]-Di,Hi)],[Qi,Math.min(Ni[1]+Di,pn)]])}return Pi()}function Yc(Qt){return u((n+Qt)/2)}function hh(Qt,br){var aa=l(Qt),$r=Qt===br?g(Qt):A(aa/l(br))/A(Yc(br)/Yc(Qt)),ka=aa*M(Yc(Qt),$r)/$r;if(!$r)return Nu;function li(Ci,Hi){ka>0?Hi<-n+r&&(Hi=-n+r):Hi>n-r&&(Hi=n-r);var Qi=ka/M(Yc(Hi),$r);return[Qi*g($r*Ci),ka-Qi*l($r*Ci)]}return li.invert=function(Ci,Hi){var Qi=ka-Hi,pn=b($r)*p(Ci*Ci+Qi*Qi),Pi=T(Ci,v(Qi))*b(Qi);return Qi*$r<0&&(Pi-=a*b(Ci)*b(Qi)),[Pi/$r,2*c(M(ka/pn,1/$r))-n]},li}function mf(){return ol(hh).scale(109.5).parallels([30,30])}function sl(Qt,br){return[Qt,br]}sl.invert=sl;function _u(){return Lu(sl).scale(152.63)}function Pu(Qt,br){var aa=l(Qt),$r=Qt===br?g(Qt):(aa-l(br))/(br-Qt),ka=aa/$r+Qt;if(v($r)r&&--$r>0);return[Qt/(.8707+(li=aa*aa)*(-.131979+li*(-.013791+li*li*li*(.003971-.001529*li)))),aa]};function gc(){return Lu(Cc).scale(175.295)}function ql(Qt,br){return[l(br)*g(Qt),g(br)]}ql.invert=Ec(m);function xu(){return Lu(ql).scale(249.5).clipAngle(90+r)}function Lc(Qt,br){var aa=l(br),$r=1+l(Qt)*aa;return[aa*g(Qt)/$r,g(br)/$r]}Lc.invert=Ec(function(Qt){return 2*c(Qt)});function Jc(){return Lu(Lc).scale(250).clipAngle(142)}function sc(Qt,br){return[A(u((n+br)/2)),-Qt]}sc.invert=function(Qt,br){return[-br,2*c(w(Qt))-n]};function Pc(){var Qt=au(sc),br=Qt.center,aa=Qt.rotate;return Qt.center=function($r){return arguments.length?br([-$r[1],$r[0]]):($r=br(),[$r[1],-$r[0]])},Qt.rotate=function($r){return arguments.length?aa([$r[0],$r[1],$r.length>2?$r[2]+90:90]):($r=aa(),[$r[0],$r[1],$r[2]-90])},aa([0,0,90]).scale(159.155)}d.geoAlbers=El,d.geoAlbersUsa=Qf,d.geoArea=j,d.geoAzimuthalEqualArea=Lh,d.geoAzimuthalEqualAreaRaw=mc,d.geoAzimuthalEquidistant=vf,d.geoAzimuthalEquidistantRaw=sf,d.geoBounds=Oe,d.geoCentroid=Fr,d.geoCircle=tn,d.geoClipAntimeridian=vr,d.geoClipCircle=ma,d.geoClipExtent=Ki,d.geoClipRectangle=ki,d.geoConicConformal=mf,d.geoConicConformalRaw=hh,d.geoConicEqualArea=Tu,d.geoConicEqualAreaRaw=yu,d.geoConicEquidistant=Cf,d.geoConicEquidistantRaw=Pu,d.geoContains=Xo,d.geoDistance=is,d.geoEqualEarth=Lf,d.geoEqualEarthRaw=Kc,d.geoEquirectangular=_u,d.geoEquirectangularRaw=sl,d.geoGnomonic=Vf,d.geoGnomonicRaw=iu,d.geoGraticule=js,d.geoGraticule10=xs,d.geoIdentity=Xu,d.geoInterpolate=Hn,d.geoLength=Ao,d.geoMercator=lf,d.geoMercatorRaw=Nu,d.geoNaturalEarth1=gc,d.geoNaturalEarth1Raw=Cc,d.geoOrthographic=xu,d.geoOrthographicRaw=ql,d.geoPath=Bf,d.geoProjection=Lu,d.geoProjectionMutator=Mc,d.geoRotation=pi,d.geoStereographic=Jc,d.geoStereographicRaw=Lc,d.geoStream=U,d.geoTransform=Nf,d.geoTransverseMercator=Pc,d.geoTransverseMercatorRaw=sc,Object.defineProperty(d,"__esModule",{value:!0})})}}),jU=He({"node_modules/d3-geo-projection/dist/d3-geo-projection.js"(Z,V){(function(d,x){typeof Z=="object"&&typeof V<"u"?x(Z,zE(),_x()):x(d.d3=d.d3||{},d.d3,d.d3)})(Z,function(d,x,S){"use strict";var E=Math.abs,e=Math.atan,t=Math.atan2,r=Math.cos,o=Math.exp,a=Math.floor,n=Math.log,i=Math.max,s=Math.min,h=Math.pow,f=Math.round,v=Math.sign||function(Ve){return Ve>0?1:Ve<0?-1:0},c=Math.sin,T=Math.tan,l=1e-6,_=1e-12,w=Math.PI,A=w/2,M=w/4,g=Math.SQRT1_2,b=F(2),p=F(w),u=w*2,y=180/w,m=w/180;function R(Ve){return Ve?Ve/Math.sin(Ve):1}function L(Ve){return Ve>1?A:Ve<-1?-A:Math.asin(Ve)}function z(Ve){return Ve>1?0:Ve<-1?w:Math.acos(Ve)}function F(Ve){return Ve>0?Math.sqrt(Ve):0}function N(Ve){return Ve=o(2*Ve),(Ve-1)/(Ve+1)}function O(Ve){return(o(Ve)-o(-Ve))/2}function P(Ve){return(o(Ve)+o(-Ve))/2}function U(Ve){return n(Ve+F(Ve*Ve+1))}function B(Ve){return n(Ve+F(Ve*Ve-1))}function X(Ve){var $e=T(Ve/2),ot=2*n(r(Ve/2))/($e*$e);function pt(Et,bt){var Rt=r(Et),lr=r(bt),yr=c(bt),kr=lr*Rt,jr=-((1-kr?n((1+kr)/2)/(1-kr):-.5)+ot/(1+kr));return[jr*lr*c(Et),jr*yr]}return pt.invert=function(Et,bt){var Rt=F(Et*Et+bt*bt),lr=-Ve/2,yr=50,kr;if(!Rt)return[0,0];do{var jr=lr/2,Qr=r(jr),ha=c(jr),Aa=ha/Qr,Da=-n(E(Qr));lr-=kr=(2/Aa*Da-ot*Aa-Rt)/(-Da/(ha*ha)+1-ot/(2*Qr*Qr))*(Qr<0?.7:1)}while(E(kr)>l&&--yr>0);var ci=c(lr);return[t(Et*ci,Rt*r(lr)),L(bt*ci/Rt)]},pt}function $(){var Ve=A,$e=x.geoProjectionMutator(X),ot=$e(Ve);return ot.radius=function(pt){return arguments.length?$e(Ve=pt*m):Ve*y},ot.scale(179.976).clipAngle(147)}function le(Ve,$e){var ot=r($e),pt=R(z(ot*r(Ve/=2)));return[2*ot*c(Ve)*pt,c($e)*pt]}le.invert=function(Ve,$e){if(!(Ve*Ve+4*$e*$e>w*w+l)){var ot=Ve,pt=$e,Et=25;do{var bt=c(ot),Rt=c(ot/2),lr=r(ot/2),yr=c(pt),kr=r(pt),jr=c(2*pt),Qr=yr*yr,ha=kr*kr,Aa=Rt*Rt,Da=1-ha*lr*lr,ci=Da?z(kr*lr)*F(Vi=1/Da):Vi=0,Vi,ji=2*ci*kr*Rt-Ve,on=ci*yr-$e,An=Vi*(ha*Aa+ci*kr*lr*Qr),Yn=Vi*(.5*bt*jr-ci*2*yr*Rt),Nn=Vi*.25*(jr*Rt-ci*yr*ha*bt),wo=Vi*(Qr*lr+ci*Aa*kr),os=Yn*Nn-wo*An;if(!os)break;var So=(on*Yn-ji*wo)/os,Zo=(ji*Nn-on*An)/os;ot-=So,pt-=Zo}while((E(So)>l||E(Zo)>l)&&--Et>0);return[ot,pt]}};function ce(){return x.geoProjection(le).scale(152.63)}function de(Ve){var $e=c(Ve),ot=r(Ve),pt=Ve>=0?1:-1,Et=T(pt*Ve),bt=(1+$e-ot)/2;function Rt(lr,yr){var kr=r(yr),jr=r(lr/=2);return[(1+kr)*c(lr),(pt*yr>-t(jr,Et)-.001?0:-pt*10)+bt+c(yr)*ot-(1+kr)*$e*jr]}return Rt.invert=function(lr,yr){var kr=0,jr=0,Qr=50;do{var ha=r(kr),Aa=c(kr),Da=r(jr),ci=c(jr),Vi=1+Da,ji=Vi*Aa-lr,on=bt+ci*ot-Vi*$e*ha-yr,An=Vi*ha/2,Yn=-Aa*ci,Nn=$e*Vi*Aa/2,wo=ot*Da+$e*ha*ci,os=Yn*Nn-wo*An,So=(on*Yn-ji*wo)/os/2,Zo=(ji*Nn-on*An)/os;E(Zo)>2&&(Zo/=2),kr-=So,jr-=Zo}while((E(So)>l||E(Zo)>l)&&--Qr>0);return pt*jr>-t(r(kr),Et)-.001?[kr*2,jr]:null},Rt}function G(){var Ve=20*m,$e=Ve>=0?1:-1,ot=T($e*Ve),pt=x.geoProjectionMutator(de),Et=pt(Ve),bt=Et.stream;return Et.parallel=function(Rt){return arguments.length?(ot=T(($e=(Ve=Rt*m)>=0?1:-1)*Ve),pt(Ve)):Ve*y},Et.stream=function(Rt){var lr=Et.rotate(),yr=bt(Rt),kr=(Et.rotate([0,0]),bt(Rt)),jr=Et.precision();return Et.rotate(lr),yr.sphere=function(){kr.polygonStart(),kr.lineStart();for(var Qr=$e*-180;$e*Qr<180;Qr+=$e*90)kr.point(Qr,$e*90);if(Ve)for(;$e*(Qr-=3*$e*jr)>=-180;)kr.point(Qr,$e*-t(r(Qr*m/2),ot)*y);kr.lineEnd(),kr.polygonEnd()},yr},Et.scale(218.695).center([0,28.0974])}function Y(Ve,$e){var ot=T($e/2),pt=F(1-ot*ot),Et=1+pt*r(Ve/=2),bt=c(Ve)*pt/Et,Rt=ot/Et,lr=bt*bt,yr=Rt*Rt;return[4/3*bt*(3+lr-3*yr),4/3*Rt*(3+3*lr-yr)]}Y.invert=function(Ve,$e){if(Ve*=3/8,$e*=3/8,!Ve&&E($e)>1)return null;var ot=Ve*Ve,pt=$e*$e,Et=1+ot+pt,bt=F((Et-F(Et*Et-4*$e*$e))/2),Rt=L(bt)/3,lr=bt?B(E($e/bt))/3:U(E(Ve))/3,yr=r(Rt),kr=P(lr),jr=kr*kr-yr*yr;return[v(Ve)*2*t(O(lr)*yr,.25-jr),v($e)*2*t(kr*c(Rt),.25+jr)]};function ee(){return x.geoProjection(Y).scale(66.1603)}var q=F(8),se=n(1+b);function ae(Ve,$e){var ot=E($e);return ot_&&--pt>0);return[Ve/(r(ot)*(q-1/c(ot))),v($e)*ot]};function j(){return x.geoProjection(ae).scale(112.314)}function Q(Ve){var $e=2*w/Ve;function ot(pt,Et){var bt=x.geoAzimuthalEquidistantRaw(pt,Et);if(E(pt)>A){var Rt=t(bt[1],bt[0]),lr=F(bt[0]*bt[0]+bt[1]*bt[1]),yr=$e*f((Rt-A)/$e)+A,kr=t(c(Rt-=yr),2-r(Rt));Rt=yr+L(w/lr*c(kr))-kr,bt[0]=lr*r(Rt),bt[1]=lr*c(Rt)}return bt}return ot.invert=function(pt,Et){var bt=F(pt*pt+Et*Et);if(bt>A){var Rt=t(Et,pt),lr=$e*f((Rt-A)/$e)+A,yr=Rt>lr?-1:1,kr=bt*r(lr-Rt),jr=1/T(yr*z((kr-w)/F(w*(w-2*kr)+bt*bt)));Rt=lr+2*e((jr+yr*F(jr*jr-3))/3),pt=bt*r(Rt),Et=bt*c(Rt)}return x.geoAzimuthalEquidistantRaw.invert(pt,Et)},ot}function re(){var Ve=5,$e=x.geoProjectionMutator(Q),ot=$e(Ve),pt=ot.stream,Et=.01,bt=-r(Et*m),Rt=c(Et*m);return ot.lobes=function(lr){return arguments.length?$e(Ve=+lr):Ve},ot.stream=function(lr){var yr=ot.rotate(),kr=pt(lr),jr=(ot.rotate([0,0]),pt(lr));return ot.rotate(yr),kr.sphere=function(){jr.polygonStart(),jr.lineStart();for(var Qr=0,ha=360/Ve,Aa=2*w/Ve,Da=90-180/Ve,ci=A;Qr0&&E(Et)>l);return pt<0?NaN:ot}function Re(Ve,$e,ot){return $e===void 0&&($e=40),ot===void 0&&(ot=_),function(pt,Et,bt,Rt){var lr,yr,kr;bt=bt===void 0?0:+bt,Rt=Rt===void 0?0:+Rt;for(var jr=0;jr<$e;jr++){var Qr=Ve(bt,Rt),ha=Qr[0]-pt,Aa=Qr[1]-Et;if(E(ha)lr){bt-=yr/=2,Rt-=kr/=2;continue}lr=Da;var ci=(bt>0?-1:1)*ot,Vi=(Rt>0?-1:1)*ot,ji=Ve(bt+ci,Rt),on=Ve(bt,Rt+Vi),An=(ji[0]-Qr[0])/ci,Yn=(ji[1]-Qr[1])/ci,Nn=(on[0]-Qr[0])/Vi,wo=(on[1]-Qr[1])/Vi,os=wo*An-Yn*Nn,So=(E(os)<.5?.5:1)/os;if(yr=(Aa*Nn-ha*wo)*So,kr=(ha*Yn-Aa*An)*So,bt+=yr,Rt+=kr,E(yr)0&&(lr[1]*=1+yr/1.5*lr[0]*lr[0]),lr}return pt.invert=Re(pt),pt}function at(){return x.geoProjection(We()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])}function nt(Ve,$e){var ot=Ve*c($e),pt=30,Et;do $e-=Et=($e+c($e)-ot)/(1+r($e));while(E(Et)>l&&--pt>0);return $e/2}function tt(Ve,$e,ot){function pt(Et,bt){return[Ve*Et*r(bt=nt(ot,bt)),$e*c(bt)]}return pt.invert=function(Et,bt){return bt=L(bt/$e),[Et/(Ve*r(bt)),L((2*bt+c(2*bt))/ot)]},pt}var qe=tt(b/A,b,w);function he(){return x.geoProjection(qe).scale(169.529)}var ue=2.00276,ne=1.11072;function Ce(Ve,$e){var ot=nt(w,$e);return[ue*Ve/(1/r($e)+ne/r(ot)),($e+b*c(ot))/ue]}Ce.invert=function(Ve,$e){var ot=ue*$e,pt=$e<0?-M:M,Et=25,bt,Rt;do Rt=ot-b*c(pt),pt-=bt=(c(2*pt)+2*pt-w*c(Rt))/(2*r(2*pt)+2+w*r(Rt)*b*r(pt));while(E(bt)>l&&--Et>0);return Rt=ot-b*c(pt),[Ve*(1/r(Rt)+ne/r(pt))/ue,Rt]};function Ye(){return x.geoProjection(Ce).scale(160.857)}function rt(Ve){var $e=0,ot=x.geoProjectionMutator(Ve),pt=ot($e);return pt.parallel=function(Et){return arguments.length?ot($e=Et*m):$e*y},pt}function Ke(Ve,$e){return[Ve*r($e),$e]}Ke.invert=function(Ve,$e){return[Ve/r($e),$e]};function Mt(){return x.geoProjection(Ke).scale(152.63)}function kt(Ve){if(!Ve)return Ke;var $e=1/T(Ve);function ot(pt,Et){var bt=$e+Ve-Et,Rt=bt&&pt*r(Et)/bt;return[bt*c(Rt),$e-bt*r(Rt)]}return ot.invert=function(pt,Et){var bt=F(pt*pt+(Et=$e-Et)*Et),Rt=$e+Ve-bt;return[bt/r(Rt)*t(pt,Et),Rt]},ot}function Nt(){return rt(kt).scale(123.082).center([0,26.1441]).parallel(45)}function Gt(Ve){function $e(ot,pt){var Et=A-pt,bt=Et&&ot*Ve*c(Et)/Et;return[Et*c(bt)/Ve,A-Et*r(bt)]}return $e.invert=function(ot,pt){var Et=ot*Ve,bt=A-pt,Rt=F(Et*Et+bt*bt),lr=t(Et,bt);return[(Rt?Rt/c(Rt):1)*lr/Ve,A-Rt]},$e}function Mr(){var Ve=.5,$e=x.geoProjectionMutator(Gt),ot=$e(Ve);return ot.fraction=function(pt){return arguments.length?$e(Ve=+pt):Ve},ot.scale(158.837)}var mr=tt(1,4/w,w);function qr(){return x.geoProjection(mr).scale(152.63)}function Er(Ve,$e,ot,pt,Et,bt){var Rt=r(bt),lr;if(E(Ve)>1||E(bt)>1)lr=z(ot*Et+$e*pt*Rt);else{var yr=c(Ve/2),kr=c(bt/2);lr=2*L(F(yr*yr+$e*pt*kr*kr))}return E(lr)>l?[lr,t(pt*c(bt),$e*Et-ot*pt*Rt)]:[0,0]}function Ir(Ve,$e,ot){return z((Ve*Ve+$e*$e-ot*ot)/(2*Ve*$e))}function _t(Ve){return Ve-2*w*a((Ve+w)/(2*w))}function Oe(Ve,$e,ot){for(var pt=[[Ve[0],Ve[1],c(Ve[1]),r(Ve[1])],[$e[0],$e[1],c($e[1]),r($e[1])],[ot[0],ot[1],c(ot[1]),r(ot[1])]],Et=pt[2],bt,Rt=0;Rt<3;++Rt,Et=bt)bt=pt[Rt],Et.v=Er(bt[1]-Et[1],Et[3],Et[2],bt[3],bt[2],bt[0]-Et[0]),Et.point=[0,0];var lr=Ir(pt[0].v[0],pt[2].v[0],pt[1].v[0]),yr=Ir(pt[0].v[0],pt[1].v[0],pt[2].v[0]),kr=w-lr;pt[2].point[1]=0,pt[0].point[0]=-(pt[1].point[0]=pt[0].v[0]/2);var jr=[pt[2].point[0]=pt[0].point[0]+pt[2].v[0]*r(lr),2*(pt[0].point[1]=pt[1].point[1]=pt[2].v[0]*c(lr))];function Qr(ha,Aa){var Da=c(Aa),ci=r(Aa),Vi=new Array(3),ji;for(ji=0;ji<3;++ji){var on=pt[ji];if(Vi[ji]=Er(Aa-on[1],on[3],on[2],ci,Da,ha-on[0]),!Vi[ji][0])return on.point;Vi[ji][1]=_t(Vi[ji][1]-on.v[1])}var An=jr.slice();for(ji=0;ji<3;++ji){var Yn=ji==2?0:ji+1,Nn=Ir(pt[ji].v[0],Vi[ji][0],Vi[Yn][0]);Vi[ji][1]<0&&(Nn=-Nn),ji?ji==1?(Nn=yr-Nn,An[0]-=Vi[ji][0]*r(Nn),An[1]-=Vi[ji][0]*c(Nn)):(Nn=kr-Nn,An[0]+=Vi[ji][0]*r(Nn),An[1]+=Vi[ji][0]*c(Nn)):(An[0]+=Vi[ji][0]*r(Nn),An[1]-=Vi[ji][0]*c(Nn))}return An[0]/=3,An[1]/=3,An}return Qr}function Je(Ve){return Ve[0]*=m,Ve[1]*=m,Ve}function Ae(){return Le([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])}function Le(Ve,$e,ot){var pt=x.geoCentroid({type:"MultiPoint",coordinates:[Ve,$e,ot]}),Et=[-pt[0],-pt[1]],bt=x.geoRotation(Et),Rt=Oe(Je(bt(Ve)),Je(bt($e)),Je(bt(ot)));Rt.invert=Re(Rt);var lr=x.geoProjection(Rt).rotate(Et),yr=lr.center;return delete lr.rotate,lr.center=function(kr){return arguments.length?yr(bt(kr)):bt.invert(yr())},lr.clipAngle(90)}function Ue(Ve,$e){var ot=F(1-c($e));return[2/p*Ve*ot,p*(1-ot)]}Ue.invert=function(Ve,$e){var ot=(ot=$e/p-1)*ot;return[ot>0?Ve*F(w/ot)/2:0,L(1-ot)]};function Ze(){return x.geoProjection(Ue).scale(95.6464).center([0,30])}function st(Ve){var $e=T(Ve);function ot(pt,Et){return[pt,(pt?pt/c(pt):1)*(c(Et)*r(pt)-$e*r(Et))]}return ot.invert=$e?function(pt,Et){pt&&(Et*=c(pt)/pt);var bt=r(pt);return[pt,2*t(F(bt*bt+$e*$e-Et*Et)-bt,$e-Et)]}:function(pt,Et){return[pt,L(pt?Et*T(pt)/pt:Et)]},ot}function ut(){return rt(st).scale(249.828).clipAngle(90)}var Ut=F(3);function Ct(Ve,$e){return[Ut*Ve*(2*r(2*$e/3)-1)/p,Ut*p*c($e/3)]}Ct.invert=function(Ve,$e){var ot=3*L($e/(Ut*p));return[p*Ve/(Ut*(2*r(2*ot/3)-1)),ot]};function Pt(){return x.geoProjection(Ct).scale(156.19)}function jt(Ve){var $e=r(Ve);function ot(pt,Et){return[pt*$e,c(Et)/$e]}return ot.invert=function(pt,Et){return[pt/$e,L(Et*$e)]},ot}function fr(){return rt(jt).parallel(38.58).scale(195.044)}function ur(Ve){var $e=r(Ve);function ot(pt,Et){return[pt*$e,(1+$e)*T(Et/2)]}return ot.invert=function(pt,Et){return[pt/$e,e(Et/(1+$e))*2]},ot}function sr(){return rt(ur).scale(124.75)}function Pr(Ve,$e){var ot=F(8/(3*w));return[ot*Ve*(1-E($e)/w),ot*$e]}Pr.invert=function(Ve,$e){var ot=F(8/(3*w)),pt=$e/ot;return[Ve/(ot*(1-E(pt)/w)),pt]};function Ta(){return x.geoProjection(Pr).scale(165.664)}function Oa(Ve,$e){var ot=F(4-3*c(E($e)));return[2/F(6*w)*Ve*ot,v($e)*F(2*w/3)*(2-ot)]}Oa.invert=function(Ve,$e){var ot=2-E($e)/F(2*w/3);return[Ve*F(6*w)/(2*ot),v($e)*L((4-ot*ot)/3)]};function Ia(){return x.geoProjection(Oa).scale(165.664)}function qa(Ve,$e){var ot=F(w*(4+w));return[2/ot*Ve*(1+F(1-4*$e*$e/(w*w))),4/ot*$e]}qa.invert=function(Ve,$e){var ot=F(w*(4+w))/2;return[Ve*ot/(1+F(1-$e*$e*(4+w)/(4*w))),$e*ot/2]};function Wa(){return x.geoProjection(qa).scale(180.739)}function Ca(Ve,$e){var ot=(2+A)*c($e);$e/=2;for(var pt=0,Et=1/0;pt<10&&E(Et)>l;pt++){var bt=r($e);$e-=Et=($e+c($e)*(bt+2)-ot)/(2*bt*(1+bt))}return[2/F(w*(4+w))*Ve*(1+r($e)),2*F(w/(4+w))*c($e)]}Ca.invert=function(Ve,$e){var ot=$e*F((4+w)/w)/2,pt=L(ot),Et=r(pt);return[Ve/(2/F(w*(4+w))*(1+Et)),L((pt+ot*(Et+2))/(2+A))]};function hi(){return x.geoProjection(Ca).scale(180.739)}function wi(Ve,$e){return[Ve*(1+r($e))/F(2+w),2*$e/F(2+w)]}wi.invert=function(Ve,$e){var ot=F(2+w),pt=$e*ot/2;return[ot*Ve/(1+r(pt)),pt]};function Kt(){return x.geoProjection(wi).scale(173.044)}function Dt(Ve,$e){for(var ot=(1+A)*c($e),pt=0,Et=1/0;pt<10&&E(Et)>l;pt++)$e-=Et=($e+c($e)-ot)/(1+r($e));return ot=F(2+w),[Ve*(1+r($e))/ot,2*$e/ot]}Dt.invert=function(Ve,$e){var ot=1+A,pt=F(ot/2);return[Ve*2*pt/(1+r($e*=pt)),L(($e+c($e))/ot)]};function Yt(){return x.geoProjection(Dt).scale(173.044)}var Jt=3+2*b;function Fr(Ve,$e){var ot=c(Ve/=2),pt=r(Ve),Et=F(r($e)),bt=r($e/=2),Rt=c($e)/(bt+b*pt*Et),lr=F(2/(1+Rt*Rt)),yr=F((b*bt+(pt+ot)*Et)/(b*bt+(pt-ot)*Et));return[Jt*(lr*(yr-1/yr)-2*n(yr)),Jt*(lr*Rt*(yr+1/yr)-2*e(Rt))]}Fr.invert=function(Ve,$e){if(!(bt=Y.invert(Ve/1.2,$e*1.065)))return null;var ot=bt[0],pt=bt[1],Et=20,bt;Ve/=Jt,$e/=Jt;do{var Rt=ot/2,lr=pt/2,yr=c(Rt),kr=r(Rt),jr=c(lr),Qr=r(lr),ha=r(pt),Aa=F(ha),Da=jr/(Qr+b*kr*Aa),ci=Da*Da,Vi=F(2/(1+ci)),ji=b*Qr+(kr+yr)*Aa,on=b*Qr+(kr-yr)*Aa,An=ji/on,Yn=F(An),Nn=Yn-1/Yn,wo=Yn+1/Yn,os=Vi*Nn-2*n(Yn)-Ve,So=Vi*Da*wo-2*e(Da)-$e,Zo=jr&&g*Aa*yr*ci/jr,hs=(b*kr*Qr+Aa)/(2*(Qr+b*kr*Aa)*(Qr+b*kr*Aa)*Aa),ul=-.5*Da*Vi*Vi*Vi,tl=ul*Zo,Jo=ul*hs,$o=($o=2*Qr+b*Aa*(kr-yr))*$o*Yn,Il=(b*kr*Qr*Aa+ha)/$o,eu=-(b*yr*jr)/(Aa*$o),Ru=Nn*tl-2*Il/Yn+Vi*(Il+Il/An),vu=Nn*Jo-2*eu/Yn+Vi*(eu+eu/An),Tl=Da*wo*tl-2*Zo/(1+ci)+Vi*wo*Zo+Vi*Da*(Il-Il/An),cu=Da*wo*Jo-2*hs/(1+ci)+Vi*wo*hs+Vi*Da*(eu-eu/An),uc=vu*Tl-cu*Ru;if(!uc)break;var Vl=(So*vu-os*cu)/uc,Gl=(os*Tl-So*Ru)/uc;ot-=Vl,pt=i(-A,s(A,pt-Gl))}while((E(Vl)>l||E(Gl)>l)&&--Et>0);return E(E(pt)-A)pt){var Qr=F(jr),ha=t(kr,yr),Aa=ot*f(ha/ot),Da=ha-Aa,ci=Ve*r(Da),Vi=(Ve*c(Da)-Da*c(ci))/(A-ci),ji=xt(Da,Vi),on=(w-Ve)/lt(ji,ci,w);yr=Qr;var An=50,Yn;do yr-=Yn=(Ve+lt(ji,ci,yr)*on-Qr)/(ji(yr)*on);while(E(Yn)>l&&--An>0);kr=Da*c(yr),yrpt){var yr=F(lr),kr=t(Rt,bt),jr=ot*f(kr/ot),Qr=kr-jr;bt=yr*r(Qr),Rt=yr*c(Qr);for(var ha=bt-A,Aa=c(bt),Da=Rt/Aa,ci=btl||E(Da)>l)&&--ci>0);return[Qr,ha]},yr}var xr=Cr(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);function Rr(){return x.geoProjection(xr).scale(149.995)}var Ur=Cr(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);function Hr(){return x.geoProjection(Ur).scale(153.93)}var gt=Cr(5/6*w,-.62636,-.0344,0,1.3493,-.05524,0,.045);function Xt(){return x.geoProjection(gt).scale(130.945)}function vr(Ve,$e){var ot=Ve*Ve,pt=$e*$e;return[Ve*(1-.162388*pt)*(.87-952426e-9*ot*ot),$e*(1+pt/12)]}vr.invert=function(Ve,$e){var ot=Ve,pt=$e,Et=50,bt;do{var Rt=pt*pt;pt-=bt=(pt*(1+Rt/12)-$e)/(1+Rt/4)}while(E(bt)>l&&--Et>0);Et=50,Ve/=1-.162388*Rt;do{var lr=(lr=ot*ot)*lr;ot-=bt=(ot*(.87-952426e-9*lr)-Ve)/(.87-.00476213*lr)}while(E(bt)>l&&--Et>0);return[ot,pt]};function Or(){return x.geoProjection(vr).scale(131.747)}var ba=Cr(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function Pa(){return x.geoProjection(ba).scale(131.087)}function ma(Ve){var $e=Ve(A,0)[0]-Ve(-A,0)[0];function ot(pt,Et){var bt=pt>0?-.5:.5,Rt=Ve(pt+bt*w,Et);return Rt[0]-=bt*$e,Rt}return Ve.invert&&(ot.invert=function(pt,Et){var bt=pt>0?-.5:.5,Rt=Ve.invert(pt+bt*$e,Et),lr=Rt[0]-bt*w;return lr<-w?lr+=2*w:lr>w&&(lr-=2*w),Rt[0]=lr,Rt}),ot}function la(Ve,$e){var ot=v(Ve),pt=v($e),Et=r($e),bt=r(Ve)*Et,Rt=c(Ve)*Et,lr=c(pt*$e);Ve=E(t(Rt,lr)),$e=L(bt),E(Ve-A)>l&&(Ve%=A);var yr=_a(Ve>w/4?A-Ve:Ve,$e);return Ve>w/4&&(lr=yr[0],yr[0]=-yr[1],yr[1]=-lr),yr[0]*=ot,yr[1]*=-pt,yr}la.invert=function(Ve,$e){E(Ve)>1&&(Ve=v(Ve)*2-Ve),E($e)>1&&($e=v($e)*2-$e);var ot=v(Ve),pt=v($e),Et=-ot*Ve,bt=-pt*$e,Rt=bt/Et<1,lr=Ai(Rt?bt:Et,Rt?Et:bt),yr=lr[0],kr=lr[1],jr=r(kr);return Rt&&(yr=-A-yr),[ot*(t(c(yr)*jr,-c(kr))+w),pt*L(r(yr)*jr)]};function _a(Ve,$e){if($e===A)return[0,0];var ot=c($e),pt=ot*ot,Et=pt*pt,bt=1+Et,Rt=1+3*Et,lr=1-Et,yr=L(1/F(bt)),kr=lr+pt*bt*yr,jr=(1-ot)/kr,Qr=F(jr),ha=jr*bt,Aa=F(ha),Da=Qr*lr,ci,Vi;if(Ve===0)return[0,-(Da+pt*Aa)];var ji=r($e),on=1/ji,An=2*ot*ji,Yn=(-3*pt+yr*Rt)*An,Nn=(-kr*ji-(1-ot)*Yn)/(kr*kr),wo=.5*Nn/Qr,os=lr*wo-2*pt*Qr*An,So=pt*bt*Nn+jr*Rt*An,Zo=-on*An,hs=-on*So,ul=-2*on*os,tl=4*Ve/w,Jo;if(Ve>.222*w||$e.175*w){if(ci=(Da+pt*F(ha*(1+Et)-Da*Da))/(1+Et),Ve>w/4)return[ci,ci];var $o=ci,Il=.5*ci;ci=.5*(Il+$o),Vi=50;do{var eu=F(ha-ci*ci),Ru=ci*(ul+Zo*eu)+hs*L(ci/Aa)-tl;if(!Ru)break;Ru<0?Il=ci:$o=ci,ci=.5*(Il+$o)}while(E($o-Il)>l&&--Vi>0)}else{ci=l,Vi=25;do{var vu=ci*ci,Tl=F(ha-vu),cu=ul+Zo*Tl,uc=ci*cu+hs*L(ci/Aa)-tl,Vl=cu+(hs-Zo*vu)/Tl;ci-=Jo=Tl?uc/Vl:0}while(E(Jo)>l&&--Vi>0)}return[ci,-Da-pt*F(ha-ci*ci)]}function Ai(Ve,$e){for(var ot=0,pt=1,Et=.5,bt=50;;){var Rt=Et*Et,lr=F(Et),yr=L(1/F(1+Rt)),kr=1-Rt+Et*(1+Rt)*yr,jr=(1-lr)/kr,Qr=F(jr),ha=jr*(1+Rt),Aa=Qr*(1-Rt),Da=ha-Ve*Ve,ci=F(Da),Vi=$e+Aa+Et*ci;if(E(pt-ot)<_||--bt===0||Vi===0)break;Vi>0?ot=Et:pt=Et,Et=.5*(ot+pt)}if(!bt)return null;var ji=L(lr),on=r(ji),An=1/on,Yn=2*lr*on,Nn=(-3*Et+yr*(1+3*Rt))*Yn,wo=(-kr*on-(1-lr)*Nn)/(kr*kr),os=.5*wo/Qr,So=(1-Rt)*os-2*Et*Qr*Yn,Zo=-2*An*So,hs=-An*Yn,ul=-An*(Et*(1+Rt)*wo+jr*(1+3*Rt)*Yn);return[w/4*(Ve*(Zo+hs*ci)+ul*L(Ve/F(ha))),ji]}function ki(){return x.geoProjection(ma(la)).scale(239.75)}function Ki(Ve,$e,ot){var pt,Et,bt;return Ve?(pt=yn(Ve,ot),$e?(Et=yn($e,1-ot),bt=Et[1]*Et[1]+ot*pt[0]*pt[0]*Et[0]*Et[0],[[pt[0]*Et[2]/bt,pt[1]*pt[2]*Et[0]*Et[1]/bt],[pt[1]*Et[1]/bt,-pt[0]*pt[2]*Et[0]*Et[2]/bt],[pt[2]*Et[1]*Et[2]/bt,-ot*pt[0]*pt[1]*Et[0]/bt]]):[[pt[0],0],[pt[1],0],[pt[2],0]]):(Et=yn($e,1-ot),[[0,Et[0]/Et[1]],[1/Et[1],0],[Et[2]/Et[1],0]])}function yn(Ve,$e){var ot,pt,Et,bt,Rt;if($e=1-l)return ot=(1-$e)/4,pt=P(Ve),bt=N(Ve),Et=1/pt,Rt=pt*O(Ve),[bt+ot*(Rt-Ve)/(pt*pt),Et-ot*bt*Et*(Rt-Ve),Et+ot*bt*Et*(Rt+Ve),2*e(o(Ve))-A+ot*(Rt-Ve)/pt];var lr=[1,0,0,0,0,0,0,0,0],yr=[F($e),0,0,0,0,0,0,0,0],kr=0;for(pt=F(1-$e),Rt=1;E(yr[kr]/lr[kr])>l&&kr<8;)ot=lr[kr++],yr[kr]=(ot-pt)/2,lr[kr]=(ot+pt)/2,pt=F(ot*pt),Rt*=2;Et=Rt*lr[kr]*Ve;do bt=yr[kr]*c(pt=Et)/lr[kr],Et=(L(bt)+Et)/2;while(--kr);return[c(Et),bt=r(Et),bt/r(Et-pt),Et]}function Ln(Ve,$e,ot){var pt=E(Ve),Et=E($e),bt=O(Et);if(pt){var Rt=1/c(pt),lr=1/(T(pt)*T(pt)),yr=-(lr+ot*(bt*bt*Rt*Rt)-1+ot),kr=(ot-1)*lr,jr=(-yr+F(yr*yr-4*kr))/2;return[kn(e(1/F(jr)),ot)*v(Ve),kn(e(F((jr/lr-1)/ot)),1-ot)*v($e)]}return[0,kn(e(bt),1-ot)*v($e)]}function kn(Ve,$e){if(!$e)return Ve;if($e===1)return n(T(Ve/2+M));for(var ot=1,pt=F(1-$e),Et=F($e),bt=0;E(Et)>l;bt++){if(Ve%w){var Rt=e(pt*T(Ve)/ot);Rt<0&&(Rt+=w),Ve+=Rt+~~(Ve/w)*w}else Ve+=Ve;Et=(ot+pt)/2,pt=F(ot*pt),Et=((ot=Et)-pt)/2}return Ve/(h(2,bt)*ot)}function Bn(Ve,$e){var ot=(b-1)/(b+1),pt=F(1-ot*ot),Et=kn(A,pt*pt),bt=-1,Rt=n(T(w/4+E($e)/2)),lr=o(bt*Rt)/F(ot),yr=ao(lr*r(bt*Ve),lr*c(bt*Ve)),kr=Ln(yr[0],yr[1],pt*pt);return[-kr[1],($e>=0?1:-1)*(.5*Et-kr[0])]}function ao(Ve,$e){var ot=Ve*Ve,pt=$e+1,Et=1-ot-$e*$e;return[.5*((Ve>=0?A:-A)-t(Et,2*Ve)),-.25*n(Et*Et+4*ot)+.5*n(pt*pt+ot)]}function xo(Ve,$e){var ot=$e[0]*$e[0]+$e[1]*$e[1];return[(Ve[0]*$e[0]+Ve[1]*$e[1])/ot,(Ve[1]*$e[0]-Ve[0]*$e[1])/ot]}Bn.invert=function(Ve,$e){var ot=(b-1)/(b+1),pt=F(1-ot*ot),Et=kn(A,pt*pt),bt=-1,Rt=Ki(.5*Et-$e,-Ve,pt*pt),lr=xo(Rt[0],Rt[1]),yr=t(lr[1],lr[0])/bt;return[yr,2*e(o(.5/bt*n(ot*lr[0]*lr[0]+ot*lr[1]*lr[1])))-A]};function Co(){return x.geoProjection(ma(Bn)).scale(151.496)}function Fs(Ve){var $e=c(Ve),ot=r(Ve),pt=Mn(Ve);pt.invert=Mn(-Ve);function Et(bt,Rt){var lr=pt(bt,Rt);bt=lr[0],Rt=lr[1];var yr=c(Rt),kr=r(Rt),jr=r(bt),Qr=z($e*yr+ot*kr*jr),ha=c(Qr),Aa=E(ha)>l?Qr/ha:1;return[Aa*ot*c(bt),(E(bt)>A?Aa:-Aa)*($e*kr-ot*yr*jr)]}return Et.invert=function(bt,Rt){var lr=F(bt*bt+Rt*Rt),yr=-c(lr),kr=r(lr),jr=lr*kr,Qr=-Rt*yr,ha=lr*$e,Aa=F(jr*jr+Qr*Qr-ha*ha),Da=t(jr*ha+Qr*Aa,Qr*ha-jr*Aa),ci=(lr>A?-1:1)*t(bt*yr,lr*r(Da)*kr+Rt*c(Da)*yr);return pt.invert(ci,Da)},Et}function Mn(Ve){var $e=c(Ve),ot=r(Ve);return function(pt,Et){var bt=r(Et),Rt=r(pt)*bt,lr=c(pt)*bt,yr=c(Et);return[t(lr,Rt*ot-yr*$e),L(yr*ot+Rt*$e)]}}function Ao(){var Ve=0,$e=x.geoProjectionMutator(Fs),ot=$e(Ve),pt=ot.rotate,Et=ot.stream,bt=x.geoCircle();return ot.parallel=function(Rt){if(!arguments.length)return Ve*y;var lr=ot.rotate();return $e(Ve=Rt*m).rotate(lr)},ot.rotate=function(Rt){return arguments.length?(pt.call(ot,[Rt[0],Rt[1]-Ve*y]),bt.center([-Rt[0],-Rt[1]]),ot):(Rt=pt.call(ot),Rt[1]+=Ve*y,Rt)},ot.stream=function(Rt){return Rt=Et(Rt),Rt.sphere=function(){Rt.polygonStart();var lr=.01,yr=bt.radius(90-lr)().coordinates[0],kr=yr.length-1,jr=-1,Qr;for(Rt.lineStart();++jr=0;)Rt.point((Qr=yr[jr])[0],Qr[1]);Rt.lineEnd(),Rt.polygonEnd()},Rt},ot.scale(79.4187).parallel(45).clipAngle(180-.001)}var On=3,ts=L(1-1/On)*y,is=jt(0);function _s(Ve){var $e=ts*m,ot=Ue(w,$e)[0]-Ue(-w,$e)[0],pt=is(0,$e)[1],Et=Ue(0,$e)[1],bt=p-Et,Rt=u/Ve,lr=4/u,yr=pt+bt*bt*4/u;function kr(jr,Qr){var ha,Aa=E(Qr);if(Aa>$e){var Da=s(Ve-1,i(0,a((jr+w)/Rt)));jr+=w*(Ve-1)/Ve-Da*Rt,ha=Ue(jr,Aa),ha[0]=ha[0]*u/ot-u*(Ve-1)/(2*Ve)+Da*u/Ve,ha[1]=pt+(ha[1]-Et)*4*bt/u,Qr<0&&(ha[1]=-ha[1])}else ha=is(jr,Qr);return ha[0]*=lr,ha[1]/=yr,ha}return kr.invert=function(jr,Qr){jr/=lr,Qr*=yr;var ha=E(Qr);if(ha>pt){var Aa=s(Ve-1,i(0,a((jr+w)/Rt)));jr=(jr+w*(Ve-1)/Ve-Aa*Rt)*ot/u;var Da=Ue.invert(jr,.25*(ha-pt)*u/bt+Et);return Da[0]-=w*(Ve-1)/Ve-Aa*Rt,Qr<0&&(Da[1]=-Da[1]),Da}return is.invert(jr,Qr)},kr}function Oo(Ve,$e){return[Ve,$e&1?90-l:ts]}function io(Ve,$e){return[Ve,$e&1?-90+l:-ts]}function Gn(Ve){return[Ve[0]*(1-l),Ve[1]]}function eo(Ve){var $e=[].concat(S.range(-180,180+Ve/2,Ve).map(Oo),S.range(180,-180-Ve/2,-Ve).map(io));return{type:"Polygon",coordinates:[Ve===180?$e.map(Gn):$e]}}function ns(){var Ve=4,$e=x.geoProjectionMutator(_s),ot=$e(Ve),pt=ot.stream;return ot.lobes=function(Et){return arguments.length?$e(Ve=+Et):Ve},ot.stream=function(Et){var bt=ot.rotate(),Rt=pt(Et),lr=(ot.rotate([0,0]),pt(Et));return ot.rotate(bt),Rt.sphere=function(){x.geoStream(eo(180/Ve),lr)},Rt},ot.scale(239.75)}function gs(Ve){var $e=1+Ve,ot=c(1/$e),pt=L(ot),Et=2*F(w/(bt=w+4*pt*$e)),bt,Rt=.5*Et*($e+F(Ve*(2+Ve))),lr=Ve*Ve,yr=$e*$e;function kr(jr,Qr){var ha=1-c(Qr),Aa,Da;if(ha&&ha<2){var ci=A-Qr,Vi=25,ji;do{var on=c(ci),An=r(ci),Yn=pt+t(on,$e-An),Nn=1+yr-2*$e*An;ci-=ji=(ci-lr*pt-$e*on+Nn*Yn-.5*ha*bt)/(2*$e*on*Yn)}while(E(ji)>_&&--Vi>0);Aa=Et*F(Nn),Da=jr*Yn/w}else Aa=Et*(Ve+ha),Da=jr*pt/w;return[Aa*c(Da),Rt-Aa*r(Da)]}return kr.invert=function(jr,Qr){var ha=jr*jr+(Qr-=Rt)*Qr,Aa=(1+yr-ha/(Et*Et))/(2*$e),Da=z(Aa),ci=c(Da),Vi=pt+t(ci,$e-Aa);return[L(jr/F(ha))*w/Vi,L(1-2*(Da-lr*pt-$e*ci+(1+yr-2*$e*Aa)*Vi)/bt)]},kr}function Ls(){var Ve=1,$e=x.geoProjectionMutator(gs),ot=$e(Ve);return ot.ratio=function(pt){return arguments.length?$e(Ve=+pt):Ve},ot.scale(167.774).center([0,18.67])}var Xo=.7109889596207567,Gi=.0528035274542;function Pn(Ve,$e){return $e>-Xo?(Ve=qe(Ve,$e),Ve[1]+=Gi,Ve):Ke(Ve,$e)}Pn.invert=function(Ve,$e){return $e>-Xo?qe.invert(Ve,$e-Gi):Ke.invert(Ve,$e)};function js(){return x.geoProjection(Pn).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}function xs(Ve,$e){return E($e)>Xo?(Ve=qe(Ve,$e),Ve[1]-=$e>0?Gi:-Gi,Ve):Ke(Ve,$e)}xs.invert=function(Ve,$e){return E($e)>Xo?qe.invert(Ve,$e+($e>0?Gi:-Gi)):Ke.invert(Ve,$e)};function Hn(){return x.geoProjection(xs).scale(152.63)}function Os(Ve,$e,ot,pt){var Et=F(4*w/(2*ot+(1+Ve-$e/2)*c(2*ot)+(Ve+$e)/2*c(4*ot)+$e/2*c(6*ot))),bt=F(pt*c(ot)*F((1+Ve*r(2*ot)+$e*r(4*ot))/(1+Ve+$e))),Rt=ot*yr(1);function lr(Qr){return F(1+Ve*r(2*Qr)+$e*r(4*Qr))}function yr(Qr){var ha=Qr*ot;return(2*ha+(1+Ve-$e/2)*c(2*ha)+(Ve+$e)/2*c(4*ha)+$e/2*c(6*ha))/ot}function kr(Qr){return lr(Qr)*c(Qr)}var jr=function(Qr,ha){var Aa=ot*Ie(yr,Rt*c(ha)/ot,ha/w);isNaN(Aa)&&(Aa=ot*v(ha));var Da=Et*lr(Aa);return[Da*bt*Qr/w*r(Aa),Da/bt*c(Aa)]};return jr.invert=function(Qr,ha){var Aa=Ie(kr,ha*bt/Et);return[Qr*w/(r(Aa)*Et*bt*lr(Aa)),L(ot*yr(Aa/ot)/Rt)]},ot===0&&(Et=F(pt/w),jr=function(Qr,ha){return[Qr*Et,c(ha)/Et]},jr.invert=function(Qr,ha){return[Qr/Et,L(ha*Et)]}),jr}function ds(){var Ve=1,$e=0,ot=45*m,pt=2,Et=x.geoProjectionMutator(Os),bt=Et(Ve,$e,ot,pt);return bt.a=function(Rt){return arguments.length?Et(Ve=+Rt,$e,ot,pt):Ve},bt.b=function(Rt){return arguments.length?Et(Ve,$e=+Rt,ot,pt):$e},bt.psiMax=function(Rt){return arguments.length?Et(Ve,$e,ot=+Rt*m,pt):ot*y},bt.ratio=function(Rt){return arguments.length?Et(Ve,$e,ot,pt=+Rt):pt},bt.scale(180.739)}function Xs(Ve,$e,ot,pt,Et,bt,Rt,lr,yr,kr,jr){if(jr.nanEncountered)return NaN;var Qr,ha,Aa,Da,ci,Vi,ji,on,An,Yn;if(Qr=ot-$e,ha=Ve($e+Qr*.25),Aa=Ve(ot-Qr*.25),isNaN(ha)){jr.nanEncountered=!0;return}if(isNaN(Aa)){jr.nanEncountered=!0;return}return Da=Qr*(pt+4*ha+Et)/12,ci=Qr*(Et+4*Aa+bt)/12,Vi=Da+ci,Yn=(Vi-Rt)/15,kr>yr?(jr.maxDepthCount++,Vi+Yn):Math.abs(Yn)>1;do yr[Vi]>Aa?ci=Vi:Da=Vi,Vi=Da+ci>>1;while(Vi>Da);var ji=yr[Vi+1]-yr[Vi];return ji&&(ji=(Aa-yr[Vi+1])/ji),(Vi+1+ji)/Rt}var Qr=2*jr(1)/w*bt/ot,ha=function(Aa,Da){var ci=jr(E(c(Da))),Vi=pt(ci)*Aa;return ci/=Qr,[Vi,Da>=0?ci:-ci]};return ha.invert=function(Aa,Da){var ci;return Da*=Qr,E(Da)<1&&(ci=v(Da)*L(Et(E(Da))*bt)),[Aa/pt(E(Da)),ci]},ha}function Lo(){var Ve=0,$e=2.5,ot=1.183136,pt=x.geoProjectionMutator(_n),Et=pt(Ve,$e,ot);return Et.alpha=function(bt){return arguments.length?pt(Ve=+bt,$e,ot):Ve},Et.k=function(bt){return arguments.length?pt(Ve,$e=+bt,ot):$e},Et.gamma=function(bt){return arguments.length?pt(Ve,$e,ot=+bt):ot},Et.scale(152.63)}function bo(Ve,$e){return E(Ve[0]-$e[0])=0;--yr)ot=Ve[1][yr],pt=ot[0][0],Et=ot[0][1],bt=ot[1][1],Rt=ot[2][0],lr=ot[2][1],$e.push(Rs([[Rt-l,lr-l],[Rt-l,bt+l],[pt+l,bt+l],[pt+l,Et-l]],30));return{type:"Polygon",coordinates:[S.merge($e)]}}function uo(Ve,$e,ot){var pt,Et;function bt(yr,kr){for(var jr=kr<0?-1:1,Qr=$e[+(kr<0)],ha=0,Aa=Qr.length-1;haQr[ha][2][0];++ha);var Da=Ve(yr-Qr[ha][1][0],kr);return Da[0]+=Ve(Qr[ha][1][0],jr*kr>jr*Qr[ha][0][1]?Qr[ha][0][1]:kr)[0],Da}ot?bt.invert=ot(bt):Ve.invert&&(bt.invert=function(yr,kr){for(var jr=Et[+(kr<0)],Qr=$e[+(kr<0)],ha=0,Aa=jr.length;haDa&&(ci=Aa,Aa=Da,Da=ci),[[Qr,Aa],[ha,Da]]})}),Rt):$e.map(function(kr){return kr.map(function(jr){return[[jr[0][0]*y,jr[0][1]*y],[jr[1][0]*y,jr[1][1]*y],[jr[2][0]*y,jr[2][1]*y]]})})},$e!=null&&Rt.lobes($e),Rt}var Gs=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function vl(){return uo(Ce,Gs).scale(160.857)}var As=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function qs(){return uo(xs,As).scale(152.63)}var us=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function Ss(){return uo(qe,us).scale(169.529)}var Nl=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function su(){return uo(qe,Nl).scale(169.529).rotate([20,0])}var Tc=[[[[-180,35],[-30,90],[0,35]],[[0,35],[30,90],[180,35]]],[[[-180,-10],[-102,-90],[-65,-10]],[[-65,-10],[5,-90],[77,-10]],[[77,-10],[103,-90],[180,-10]]]];function du(){return uo(Pn,Tc,Re).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}var Sf=[[[[-180,0],[-110,90],[-40,0]],[[-40,0],[0,90],[40,0]],[[40,0],[110,90],[180,0]]],[[[-180,0],[-110,-90],[-40,0]],[[-40,0],[0,-90],[40,0]],[[40,0],[110,-90],[180,0]]]];function Uc(){return uo(Ke,Sf).scale(152.63).rotate([-20,0])}function Bs(Ve,$e){return[3/u*Ve*F(w*w/3-$e*$e),$e]}Bs.invert=function(Ve,$e){return[u/3*Ve/F(w*w/3-$e*$e),$e]};function dc(){return x.geoProjection(Bs).scale(158.837)}function Hc(Ve){function $e(ot,pt){if(E(E(pt)-A)2)return null;ot/=2,pt/=2;var bt=ot*ot,Rt=pt*pt,lr=2*pt/(1+bt+Rt);return lr=h((1+lr)/(1-lr),1/Ve),[t(2*ot,1-bt-Rt)/Ve,L((lr-1)/(lr+1))]},$e}function lu(){var Ve=.5,$e=x.geoProjectionMutator(Hc),ot=$e(Ve);return ot.spacing=function(pt){return arguments.length?$e(Ve=+pt):Ve},ot.scale(124.75)}var Pl=w/b;function ic(Ve,$e){return[Ve*(1+F(r($e)))/2,$e/(r($e/2)*r(Ve/6))]}ic.invert=function(Ve,$e){var ot=E(Ve),pt=E($e),Et=l,bt=A;ptl||E(Vi)>l)&&--Et>0);return Et&&[ot,pt]};function ml(){return x.geoProjection(nl).scale(139.98)}function bs(Ve,$e){return[c(Ve)/r($e),T($e)*r(Ve)]}bs.invert=function(Ve,$e){var ot=Ve*Ve,pt=$e*$e,Et=pt+1,bt=ot+Et,Rt=Ve?g*F((bt-F(bt*bt-4*ot))/ot):1/F(Et);return[L(Ve*Rt),v($e)*z(Rt)]};function Zs(){return x.geoProjection(bs).scale(144.049).clipAngle(90-.001)}function nc(Ve){var $e=r(Ve),ot=T(M+Ve/2);function pt(Et,bt){var Rt=bt-Ve,lr=E(Rt)=0;)jr=Ve[kr],Qr=jr[0]+lr*(Aa=Qr)-yr*ha,ha=jr[1]+lr*ha+yr*Aa;return Qr=lr*(Aa=Qr)-yr*ha,ha=lr*ha+yr*Aa,[Qr,ha]}return ot.invert=function(pt,Et){var bt=20,Rt=pt,lr=Et;do{for(var yr=$e,kr=Ve[yr],jr=kr[0],Qr=kr[1],ha=0,Aa=0,Da;--yr>=0;)kr=Ve[yr],ha=jr+Rt*(Da=ha)-lr*Aa,Aa=Qr+Rt*Aa+lr*Da,jr=kr[0]+Rt*(Da=jr)-lr*Qr,Qr=kr[1]+Rt*Qr+lr*Da;ha=jr+Rt*(Da=ha)-lr*Aa,Aa=Qr+Rt*Aa+lr*Da,jr=Rt*(Da=jr)-lr*Qr-pt,Qr=Rt*Qr+lr*Da-Et;var ci=ha*ha+Aa*Aa,Vi,ji;Rt-=Vi=(jr*ha+Qr*Aa)/ci,lr-=ji=(Qr*ha-jr*Aa)/ci}while(E(Vi)+E(ji)>l*l&&--bt>0);if(bt){var on=F(Rt*Rt+lr*lr),An=2*e(on*.5),Yn=c(An);return[t(Rt*Yn,on*r(An)),on?L(lr*Yn/on):0]}},ot}var ss=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],bh=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],ks=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],to=[[.9245,0],[0,0],[.01943,0]],Wc=[[.721316,0],[0,0],[-.00881625,-.00617325]];function Vu(){return $l(ss,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)}function jl(){return $l(bh,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])}function Mf(){return $l(ks,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])}function Ac(){return $l(to,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)}function nf(){return $l(Wc,[165,10]).scale(250).clipAngle(130).center([-165,-10])}function $l(Ve,$e){var ot=x.geoProjection(xh(Ve)).rotate($e).clipAngle(90),pt=x.geoRotation($e),Et=ot.center;return delete ot.rotate,ot.center=function(bt){return arguments.length?Et(pt(bt)):pt.invert(Et())},ot}var Jf=F(6),Of=F(7);function of(Ve,$e){var ot=L(7*c($e)/(3*Jf));return[Jf*Ve*(2*r(2*ot/3)-1)/Of,9*c(ot/3)/Of]}of.invert=function(Ve,$e){var ot=3*L($e*Of/9);return[Ve*Of/(Jf*(2*r(2*ot/3)-1)),L(c(ot)*3*Jf/7)]};function jc(){return x.geoProjection(of).scale(164.859)}function Bf(Ve,$e){for(var ot=(1+g)*c($e),pt=$e,Et=0,bt;Et<25&&(pt-=bt=(c(pt/2)+c(pt)-ot)/(.5*r(pt/2)+r(pt)),!(E(bt)_&&--pt>0);return bt=ot*ot,Rt=bt*bt,lr=bt*Rt,[Ve/(.84719-.13063*bt+lr*lr*(-.04515+.05494*bt-.02326*Rt+.00331*lr)),ot]};function Xc(){return x.geoProjection(oc).scale(175.295)}function Ql(Ve,$e){return[Ve*(1+r($e))/2,2*($e-T($e/2))]}Ql.invert=function(Ve,$e){for(var ot=$e/2,pt=0,Et=1/0;pt<10&&E(Et)>l;++pt){var bt=r($e/2);$e-=Et=($e-T($e/2)-ot)/(1-.5/(bt*bt))}return[2*Ve/(1+r($e)),$e]};function qc(){return x.geoProjection(Ql).scale(152.63)}var Sc=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function Ys(){return uo(pe(1/0),Sc).rotate([20,0]).scale(152.63)}function kf(Ve,$e){var ot=c($e),pt=r($e),Et=v(Ve);if(Ve===0||E($e)===A)return[0,$e];if($e===0)return[Ve,0];if(E(Ve)===A)return[Ve*pt,A*ot];var bt=w/(2*Ve)-2*Ve/w,Rt=2*$e/w,lr=(1-Rt*Rt)/(ot-Rt),yr=bt*bt,kr=lr*lr,jr=1+yr/kr,Qr=1+kr/yr,ha=(bt*ot/lr-bt/2)/jr,Aa=(kr*ot/yr+lr/2)/Qr,Da=ha*ha+pt*pt/jr,ci=Aa*Aa-(kr*ot*ot/yr+lr*ot-1)/Qr;return[A*(ha+F(Da)*Et),A*(Aa+F(ci<0?0:ci)*v(-$e*bt)*Et)]}kf.invert=function(Ve,$e){Ve/=A,$e/=A;var ot=Ve*Ve,pt=$e*$e,Et=ot+pt,bt=w*w;return[Ve?(Et-1+F((1-Et)*(1-Et)+4*ot))/(2*Ve)*A:0,Ie(function(Rt){return Et*(w*c(Rt)-2*Rt)*w+4*Rt*Rt*($e-c(Rt))+2*w*Rt-bt*$e},0)]};function fh(){return x.geoProjection(kf).scale(127.267)}var Uf=1.0148,Zc=.23185,$f=-.14499,Cu=.02406,jf=Uf,yl=5*Zc,Lu=7*$f,Mc=9*Cu,ol=1.790857183;function vc(Ve,$e){var ot=$e*$e;return[Ve,$e*(Uf+ot*ot*(Zc+ot*($f+Cu*ot)))]}vc.invert=function(Ve,$e){$e>ol?$e=ol:$e<-ol&&($e=-ol);var ot=$e,pt;do{var Et=ot*ot;ot-=pt=(ot*(Uf+Et*Et*(Zc+Et*($f+Cu*Et)))-$e)/(jf+Et*Et*(yl+Et*(Lu+Mc*Et)))}while(E(pt)>l);return[Ve,ot]};function yu(){return x.geoProjection(vc).scale(139.319)}function Tu(Ve,$e){if(E($e)l&&--Et>0);return Rt=T(pt),[(E($e)=0;)if(pt=$e[lr],ot[0]===pt[0]&&ot[1]===pt[1]){if(bt)return[bt,ot];bt=ot}}}function au(Ve){for(var $e=Ve.length,ot=[],pt=Ve[$e-1],Et=0;Et<$e;++Et)ot.push([pt,pt=Ve[Et]]);return ot}function Yc(Ve){return Ve.project.invert||Ve.children&&Ve.children.some(Yc)}var hh=[[0,90],[-90,0],[0,0],[90,0],[180,0],[0,-90]],mf=[[0,2,1],[0,3,2],[5,1,2],[5,2,3],[0,1,4],[0,4,3],[5,4,1],[5,3,4]].map(function(Ve){return Ve.map(function($e){return hh[$e]})});function sl(Ve){Ve=Ve||function(ot){var pt=x.geoCentroid({type:"MultiPoint",coordinates:ot});return x.geoGnomonic().scale(1).translate([0,0]).rotate([-pt[0],-pt[1]])};var $e=mf.map(function(ot){return{face:ot,project:Ve(ot)}});return[-1,0,0,1,0,1,4,5].forEach(function(ot,pt){var Et=$e[ot];Et&&(Et.children||(Et.children=[])).push($e[pt])}),sf($e[0],function(ot,pt){return $e[ot<-w/2?pt<0?6:4:ot<0?pt<0?2:0:ot0?[-pt[0],0]:[180-pt[0],180])};var $e=mf.map(function(ot){return{face:ot,project:Ve(ot)}});return[-1,0,0,1,0,1,4,5].forEach(function(ot,pt){var Et=$e[ot];Et&&(Et.children||(Et.children=[])).push($e[pt])}),sf($e[0],function(ot,pt){return $e[ot<-w/2?pt<0?6:4:ot<0?pt<0?2:0:otpt^Aa>pt&&ot<(ha-kr)*(pt-jr)/(Aa-jr)+kr&&(Et=!Et)}return Et}function iu(Ve,$e){var ot=$e.stream,pt;if(!ot)throw new Error("invalid projection");switch(Ve&&Ve.type){case"Feature":pt=Xu;break;case"FeatureCollection":pt=Vf;break;default:pt=gc;break}return pt(Ve,ot)}function Vf(Ve,$e){return{type:"FeatureCollection",features:Ve.features.map(function(ot){return Xu(ot,$e)})}}function Xu(Ve,$e){return{type:"Feature",id:Ve.id,properties:Ve.properties,geometry:gc(Ve.geometry,$e)}}function Cc(Ve,$e){return{type:"GeometryCollection",geometries:Ve.geometries.map(function(ot){return gc(ot,$e)})}}function gc(Ve,$e){if(!Ve)return null;if(Ve.type==="GeometryCollection")return Cc(Ve,$e);var ot;switch(Ve.type){case"Point":ot=Lc;break;case"MultiPoint":ot=Lc;break;case"LineString":ot=Jc;break;case"MultiLineString":ot=Jc;break;case"Polygon":ot=sc;break;case"MultiPolygon":ot=sc;break;case"Sphere":ot=sc;break;default:return null}return x.geoStream(Ve,$e(ot)),ot.result()}var ql=[],xu=[],Lc={point:function(Ve,$e){ql.push([Ve,$e])},result:function(){var Ve=ql.length?ql.length<2?{type:"Point",coordinates:ql[0]}:{type:"MultiPoint",coordinates:ql}:null;return ql=[],Ve}},Jc={lineStart:Wu,point:function(Ve,$e){ql.push([Ve,$e])},lineEnd:function(){ql.length&&(xu.push(ql),ql=[])},result:function(){var Ve=xu.length?xu.length<2?{type:"LineString",coordinates:xu[0]}:{type:"MultiLineString",coordinates:xu}:null;return xu=[],Ve}},sc={polygonStart:Wu,lineStart:Wu,point:function(Ve,$e){ql.push([Ve,$e])},lineEnd:function(){var Ve=ql.length;if(Ve){do ql.push(ql[0].slice());while(++Ve<4);xu.push(ql),ql=[]}},polygonEnd:Wu,result:function(){if(!xu.length)return null;var Ve=[],$e=[];return xu.forEach(function(ot){Kc(ot)?Ve.push([ot]):$e.push(ot)}),$e.forEach(function(ot){var pt=ot[0];Ve.some(function(Et){if(Lf(Et[0],pt))return Et.push(ot),!0})||Ve.push([ot])}),xu=[],Ve.length?Ve.length>1?{type:"MultiPolygon",coordinates:Ve}:{type:"Polygon",coordinates:Ve[0]}:null}};function Pc(Ve){var $e=Ve(A,0)[0]-Ve(-A,0)[0];function ot(pt,Et){var bt=E(pt)0?pt-w:pt+w,Et),lr=(Rt[0]-Rt[1])*g,yr=(Rt[0]+Rt[1])*g;if(bt)return[lr,yr];var kr=$e*g,jr=lr>0^yr>0?-1:1;return[jr*lr-v(yr)*kr,jr*yr-v(lr)*kr]}return Ve.invert&&(ot.invert=function(pt,Et){var bt=(pt+Et)*g,Rt=(Et-pt)*g,lr=E(bt)<.5*$e&&E(Rt)<.5*$e;if(!lr){var yr=$e*g,kr=bt>0^Rt>0?-1:1,jr=-kr*pt+(Rt>0?1:-1)*yr,Qr=-kr*Et+(bt>0?1:-1)*yr;bt=(-jr-Qr)*g,Rt=(jr-Qr)*g}var ha=Ve.invert(bt,Rt);return lr||(ha[0]+=bt>0?w:-w),ha}),x.geoProjection(ot).rotate([-90,-90,45]).clipAngle(180-.001)}function Qt(){return Pc(la).scale(176.423)}function br(){return Pc(Bn).scale(111.48)}function aa(Ve,$e){if(!(0<=($e=+$e)&&$e<=20))throw new Error("invalid digits");function ot(kr){var jr=kr.length,Qr=2,ha=new Array(jr);for(ha[0]=+kr[0].toFixed($e),ha[1]=+kr[1].toFixed($e);Qr2||Aa[0]!=jr[0]||Aa[1]!=jr[1])&&(Qr.push(Aa),jr=Aa)}return Qr.length===1&&kr.length>1&&Qr.push(ot(kr[kr.length-1])),Qr}function bt(kr){return kr.map(Et)}function Rt(kr){if(kr==null)return kr;var jr;switch(kr.type){case"GeometryCollection":jr={type:"GeometryCollection",geometries:kr.geometries.map(Rt)};break;case"Point":jr={type:"Point",coordinates:ot(kr.coordinates)};break;case"MultiPoint":jr={type:kr.type,coordinates:pt(kr.coordinates)};break;case"LineString":jr={type:kr.type,coordinates:Et(kr.coordinates)};break;case"MultiLineString":case"Polygon":jr={type:kr.type,coordinates:bt(kr.coordinates)};break;case"MultiPolygon":jr={type:"MultiPolygon",coordinates:kr.coordinates.map(bt)};break;default:return kr}return kr.bbox!=null&&(jr.bbox=kr.bbox),jr}function lr(kr){var jr={type:"Feature",properties:kr.properties,geometry:Rt(kr.geometry)};return kr.id!=null&&(jr.id=kr.id),kr.bbox!=null&&(jr.bbox=kr.bbox),jr}if(Ve!=null)switch(Ve.type){case"Feature":return lr(Ve);case"FeatureCollection":{var yr={type:"FeatureCollection",features:Ve.features.map(lr)};return Ve.bbox!=null&&(yr.bbox=Ve.bbox),yr}default:return Rt(Ve)}return Ve}function $r(Ve){var $e=c(Ve);function ot(pt,Et){var bt=$e?T(pt*$e/2)/$e:pt/2;if(!Et)return[2*bt,-Ve];var Rt=2*e(bt*c(Et)),lr=1/T(Et);return[c(Rt)*lr,Et+(1-r(Rt))*lr-Ve]}return ot.invert=function(pt,Et){if(E(Et+=Ve)l&&--lr>0);var ha=pt*(kr=T(Rt)),Aa=T(E(Et)0?A:-A)*(yr+Et*(jr-Rt)/2+Et*Et*(jr-2*yr+Rt)/2)]}Ci.invert=function(Ve,$e){var ot=$e/A,pt=ot*90,Et=s(18,E(pt/5)),bt=i(0,a(Et));do{var Rt=li[bt][1],lr=li[bt+1][1],yr=li[s(19,bt+2)][1],kr=yr-Rt,jr=yr-2*lr+Rt,Qr=2*(E(ot)-lr)/kr,ha=jr/kr,Aa=Qr*(1-ha*Qr*(1-2*ha*Qr));if(Aa>=0||bt===1){pt=($e>=0?5:-5)*(Aa+Et);var Da=50,ci;do Et=s(18,E(pt)/5),bt=a(Et),Aa=Et-bt,Rt=li[bt][1],lr=li[bt+1][1],yr=li[s(19,bt+2)][1],pt-=(ci=($e>=0?A:-A)*(lr+Aa*(yr-Rt)/2+Aa*Aa*(yr-2*lr+Rt)/2)-$e)*y;while(E(ci)>_&&--Da>0);break}}while(--bt>=0);var Vi=li[bt][0],ji=li[bt+1][0],on=li[s(19,bt+2)][0];return[Ve/(ji+Aa*(on-Vi)/2+Aa*Aa*(on-2*ji+Vi)/2),pt*m]};function Hi(){return x.geoProjection(Ci).scale(152.63)}function Qi(Ve){function $e(ot,pt){var Et=r(pt),bt=(Ve-1)/(Ve-Et*r(ot));return[bt*Et*c(ot),bt*c(pt)]}return $e.invert=function(ot,pt){var Et=ot*ot+pt*pt,bt=F(Et),Rt=(Ve-F(1-Et*(Ve+1)/(Ve-1)))/((Ve-1)/bt+bt/(Ve-1));return[t(ot*Rt,bt*F(1-Rt*Rt)),bt?L(pt*Rt/bt):0]},$e}function pn(Ve,$e){var ot=Qi(Ve);if(!$e)return ot;var pt=r($e),Et=c($e);function bt(Rt,lr){var yr=ot(Rt,lr),kr=yr[1],jr=kr*Et/(Ve-1)+pt;return[yr[0]*pt/jr,kr/jr]}return bt.invert=function(Rt,lr){var yr=(Ve-1)/(Ve-1-lr*Et);return ot.invert(yr*Rt,yr*lr*pt)},bt}function Pi(){var Ve=2,$e=0,ot=x.geoProjectionMutator(pn),pt=ot(Ve,$e);return pt.distance=function(Et){return arguments.length?ot(Ve=+Et,$e):Ve},pt.tilt=function(Et){return arguments.length?ot(Ve,$e=Et*m):$e*y},pt.scale(432.147).clipAngle(z(1/Ve)*y-1e-6)}var Di=1e-4,Ni=1e4,mi=-180,Sn=mi+Di,$n=180,no=$n-Di,Qn=-90,co=Qn+Di,Tn=90,un=Tn-Di;function go(Ve){return Ve.length>0}function Ko(Ve){return Math.floor(Ve*Ni)/Ni}function Ms(Ve){return Ve===Qn||Ve===Tn?[0,Ve]:[mi,Ko(Ve)]}function rl(Ve){var $e=Ve[0],ot=Ve[1],pt=!1;return $e<=Sn?($e=mi,pt=!0):$e>=no&&($e=$n,pt=!0),ot<=co?(ot=Qn,pt=!0):ot>=un&&(ot=Tn,pt=!0),pt?[$e,ot]:Ve}function Ns(Ve){return Ve.map(rl)}function el(Ve,$e,ot){for(var pt=0,Et=Ve.length;pt=no||jr<=co||jr>=un){bt[Rt]=rl(yr);for(var Qr=Rt+1;QrSn&&Aaco&&Da=lr)break;ot.push({index:-1,polygon:$e,ring:bt=bt.slice(Qr-1)}),bt[0]=Ms(bt[0][1]),Rt=-1,lr=bt.length}}}}function ws(Ve){var $e,ot=Ve.length,pt={},Et={},bt,Rt,lr,yr,kr;for($e=0;$e0?w-lr:lr)*y],kr=x.geoProjection(Ve(Rt)).rotate(yr),jr=x.geoRotation(yr),Qr=kr.center;return delete kr.rotate,kr.center=function(ha){return arguments.length?Qr(jr(ha)):jr.invert(Qr())},kr.clipAngle(90)}function Ds(Ve){var $e=r(Ve);function ot(pt,Et){var bt=x.geoGnomonicRaw(pt,Et);return bt[0]*=$e,bt}return ot.invert=function(pt,Et){return x.geoGnomonicRaw.invert(pt/$e,Et)},ot}function uu(){return Iu([-158,21.5],[-77,39]).clipAngle(60).scale(400)}function Iu(Ve,$e){return Js(Ds,Ve,$e)}function Zu(Ve){if(!(Ve*=2))return x.geoAzimuthalEquidistantRaw;var $e=-Ve/2,ot=-$e,pt=Ve*Ve,Et=T(ot),bt=.5/c(ot);function Rt(lr,yr){var kr=z(r(yr)*r(lr-$e)),jr=z(r(yr)*r(lr-ot)),Qr=yr<0?-1:1;return kr*=kr,jr*=jr,[(kr-jr)/(2*Ve),Qr*F(4*pt*jr-(pt-kr+jr)*(pt-kr+jr))/(2*Ve)]}return Rt.invert=function(lr,yr){var kr=yr*yr,jr=r(F(kr+(ha=lr+$e)*ha)),Qr=r(F(kr+(ha=lr+ot)*ha)),ha,Aa;return[t(Aa=jr-Qr,ha=(jr+Qr)*Et),(yr<0?-1:1)*z(F(ha*ha+Aa*Aa)*bt)]},Rt}function Ic(){return bu([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)}function bu(Ve,$e){return Js(Zu,Ve,$e)}function Rc(Ve,$e){if(E($e)l&&--lr>0);return[v(Ve)*(F(Et*Et+4)+Et)*w/4,A*Rt]};function Yu(){return x.geoProjection(lc).scale(127.16)}function Fe(Ve,$e,ot,pt,Et){function bt(Rt,lr){var yr=ot*c(pt*lr),kr=F(1-yr*yr),jr=F(2/(1+kr*r(Rt*=Et)));return[Ve*kr*jr*c(Rt),$e*yr*jr]}return bt.invert=function(Rt,lr){var yr=Rt/Ve,kr=lr/$e,jr=F(yr*yr+kr*kr),Qr=2*L(jr/2);return[t(Rt*T(Qr),Ve*jr)/Et,jr&&L(lr*c(Qr)/($e*ot*jr))/pt]},bt}function I(Ve,$e,ot,pt){var Et=w/3;Ve=i(Ve,l),$e=i($e,l),Ve=s(Ve,A),$e=s($e,w-l),ot=i(ot,0),ot=s(ot,100-l),pt=i(pt,l);var bt=ot/100+1,Rt=pt/100,lr=z(bt*r(Et))/Et,yr=c(Ve)/c(lr*A),kr=$e/w,jr=F(Rt*c(Ve/2)/c($e/2)),Qr=jr/F(kr*yr*lr),ha=1/(jr*F(kr*yr*lr));return Fe(Qr,ha,yr,lr,kr)}function ie(){var Ve=65*m,$e=60*m,ot=20,pt=200,Et=x.geoProjectionMutator(I),bt=Et(Ve,$e,ot,pt);return bt.poleline=function(Rt){return arguments.length?Et(Ve=+Rt*m,$e,ot,pt):Ve*y},bt.parallels=function(Rt){return arguments.length?Et(Ve,$e=+Rt*m,ot,pt):$e*y},bt.inflation=function(Rt){return arguments.length?Et(Ve,$e,ot=+Rt,pt):ot},bt.ratio=function(Rt){return arguments.length?Et(Ve,$e,ot,pt=+Rt):pt},bt.scale(163.775)}function Te(){return ie().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)}var Me=4*w+3*F(3),ze=2*F(2*w*F(3)/Me),ht=tt(ze*F(3)/w,ze,Me/6);function wt(){return x.geoProjection(ht).scale(176.84)}function Ot(Ve,$e){return[Ve*F(1-3*$e*$e/(w*w)),$e]}Ot.invert=function(Ve,$e){return[Ve/F(1-3*$e*$e/(w*w)),$e]};function $t(){return x.geoProjection(Ot).scale(152.63)}function Tr(Ve,$e){var ot=r($e),pt=r(Ve)*ot,Et=1-pt,bt=r(Ve=t(c(Ve)*ot,-c($e))),Rt=c(Ve);return ot=F(1-pt*pt),[Rt*ot-bt*Et,-bt*ot-Rt*Et]}Tr.invert=function(Ve,$e){var ot=(Ve*Ve+$e*$e)/-2,pt=F(-ot*(2+ot)),Et=$e*ot+Ve*pt,bt=Ve*ot-$e*pt,Rt=F(bt*bt+Et*Et);return[t(pt*Et,Rt*(1+ot)),Rt?-L(pt*bt/Rt):0]};function Ar(){return x.geoProjection(Tr).rotate([0,-90,45]).scale(124.75).clipAngle(180-.001)}function Kr(Ve,$e){var ot=le(Ve,$e);return[(ot[0]+Ve/A)/2,(ot[1]+$e)/2]}Kr.invert=function(Ve,$e){var ot=Ve,pt=$e,Et=25;do{var bt=r(pt),Rt=c(pt),lr=c(2*pt),yr=Rt*Rt,kr=bt*bt,jr=c(ot),Qr=r(ot/2),ha=c(ot/2),Aa=ha*ha,Da=1-kr*Qr*Qr,ci=Da?z(bt*Qr)*F(Vi=1/Da):Vi=0,Vi,ji=.5*(2*ci*bt*ha+ot/A)-Ve,on=.5*(ci*Rt+pt)-$e,An=.5*Vi*(kr*Aa+ci*bt*Qr*yr)+.5/A,Yn=Vi*(jr*lr/4-ci*Rt*ha),Nn=.125*Vi*(lr*ha-ci*Rt*kr*jr),wo=.5*Vi*(yr*Qr+ci*Aa*bt)+.5,os=Yn*Nn-wo*An,So=(on*Yn-ji*wo)/os,Zo=(ji*Nn-on*An)/os;ot-=So,pt-=Zo}while((E(So)>l||E(Zo)>l)&&--Et>0);return[ot,pt]};function na(){return x.geoProjection(Kr).scale(158.837)}d.geoNaturalEarth=x.geoNaturalEarth1,d.geoNaturalEarthRaw=x.geoNaturalEarth1Raw,d.geoAiry=$,d.geoAiryRaw=X,d.geoAitoff=ce,d.geoAitoffRaw=le,d.geoArmadillo=G,d.geoArmadilloRaw=de,d.geoAugust=ee,d.geoAugustRaw=Y,d.geoBaker=j,d.geoBakerRaw=ae,d.geoBerghaus=re,d.geoBerghausRaw=Q,d.geoBertin1953=at,d.geoBertin1953Raw=We,d.geoBoggs=Ye,d.geoBoggsRaw=Ce,d.geoBonne=Nt,d.geoBonneRaw=kt,d.geoBottomley=Mr,d.geoBottomleyRaw=Gt,d.geoBromley=qr,d.geoBromleyRaw=mr,d.geoChamberlin=Le,d.geoChamberlinRaw=Oe,d.geoChamberlinAfrica=Ae,d.geoCollignon=Ze,d.geoCollignonRaw=Ue,d.geoCraig=ut,d.geoCraigRaw=st,d.geoCraster=Pt,d.geoCrasterRaw=Ct,d.geoCylindricalEqualArea=fr,d.geoCylindricalEqualAreaRaw=jt,d.geoCylindricalStereographic=sr,d.geoCylindricalStereographicRaw=ur,d.geoEckert1=Ta,d.geoEckert1Raw=Pr,d.geoEckert2=Ia,d.geoEckert2Raw=Oa,d.geoEckert3=Wa,d.geoEckert3Raw=qa,d.geoEckert4=hi,d.geoEckert4Raw=Ca,d.geoEckert5=Kt,d.geoEckert5Raw=wi,d.geoEckert6=Yt,d.geoEckert6Raw=Dt,d.geoEisenlohr=ta,d.geoEisenlohrRaw=Fr,d.geoFahey=Ba,d.geoFaheyRaw=ca,d.geoFoucaut=Za,d.geoFoucautRaw=$a,d.geoFoucautSinusoidal=pi,d.geoFoucautSinusoidalRaw=ri,d.geoGilbert=tn,d.geoGingery=Br,d.geoGingeryRaw=fn,d.geoGinzburg4=Rr,d.geoGinzburg4Raw=xr,d.geoGinzburg5=Hr,d.geoGinzburg5Raw=Ur,d.geoGinzburg6=Xt,d.geoGinzburg6Raw=gt,d.geoGinzburg8=Or,d.geoGinzburg8Raw=vr,d.geoGinzburg9=Pa,d.geoGinzburg9Raw=ba,d.geoGringorten=ki,d.geoGringortenRaw=la,d.geoGuyou=Co,d.geoGuyouRaw=Bn,d.geoHammer=Se,d.geoHammerRaw=pe,d.geoHammerRetroazimuthal=Ao,d.geoHammerRetroazimuthalRaw=Fs,d.geoHealpix=ns,d.geoHealpixRaw=_s,d.geoHill=Ls,d.geoHillRaw=gs,d.geoHomolosine=Hn,d.geoHomolosineRaw=xs,d.geoHufnagel=ds,d.geoHufnagelRaw=Os,d.geoHyperelliptical=Lo,d.geoHyperellipticalRaw=_n,d.geoInterrupt=uo,d.geoInterruptedBoggs=vl,d.geoInterruptedHomolosine=qs,d.geoInterruptedMollweide=Ss,d.geoInterruptedMollweideHemispheres=su,d.geoInterruptedSinuMollweide=du,d.geoInterruptedSinusoidal=Uc,d.geoKavrayskiy7=dc,d.geoKavrayskiy7Raw=Bs,d.geoLagrange=lu,d.geoLagrangeRaw=Hc,d.geoLarrivee=Ou,d.geoLarriveeRaw=ic,d.geoLaskowski=ml,d.geoLaskowskiRaw=nl,d.geoLittrow=Zs,d.geoLittrowRaw=bs,d.geoLoximuthal=Ul,d.geoLoximuthalRaw=nc,d.geoMiller=fl,d.geoMillerRaw=qu,d.geoModifiedStereographic=$l,d.geoModifiedStereographicRaw=xh,d.geoModifiedStereographicAlaska=Vu,d.geoModifiedStereographicGs48=jl,d.geoModifiedStereographicGs50=Mf,d.geoModifiedStereographicMiller=Ac,d.geoModifiedStereographicLee=nf,d.geoMollweide=he,d.geoMollweideRaw=qe,d.geoMtFlatPolarParabolic=jc,d.geoMtFlatPolarParabolicRaw=of,d.geoMtFlatPolarQuartic=Nf,d.geoMtFlatPolarQuarticRaw=Bf,d.geoMtFlatPolarSinusoidal=Ef,d.geoMtFlatPolarSinusoidalRaw=Gu,d.geoNaturalEarth2=Xc,d.geoNaturalEarth2Raw=oc,d.geoNellHammer=qc,d.geoNellHammerRaw=Ql,d.geoInterruptedQuarticAuthalic=Ys,d.geoNicolosi=fh,d.geoNicolosiRaw=kf,d.geoPatterson=yu,d.geoPattersonRaw=vc,d.geoPolyconic=El,d.geoPolyconicRaw=Tu,d.geoPolyhedral=sf,d.geoPolyhedralButterfly=sl,d.geoPolyhedralCollignon=Cf,d.geoPolyhedralWaterman=hl,d.geoProject=iu,d.geoGringortenQuincuncial=Qt,d.geoPeirceQuincuncial=br,d.geoPierceQuincuncial=br,d.geoQuantize=aa,d.geoQuincuncial=Pc,d.geoRectangularPolyconic=ka,d.geoRectangularPolyconicRaw=$r,d.geoRobinson=Hi,d.geoRobinsonRaw=Ci,d.geoSatellite=Pi,d.geoSatelliteRaw=pn,d.geoSinuMollweide=js,d.geoSinuMollweideRaw=Pn,d.geoSinusoidal=Mt,d.geoSinusoidalRaw=Ke,d.geoStitch=ll,d.geoTimes=Io,d.geoTimesRaw=jn,d.geoTwoPointAzimuthal=Iu,d.geoTwoPointAzimuthalRaw=Ds,d.geoTwoPointAzimuthalUsa=uu,d.geoTwoPointEquidistant=bu,d.geoTwoPointEquidistantRaw=Zu,d.geoTwoPointEquidistantUsa=Ic,d.geoVanDerGrinten=Au,d.geoVanDerGrintenRaw=Rc,d.geoVanDerGrinten2=fo,d.geoVanDerGrinten2Raw=yc,d.geoVanDerGrinten3=Dc,d.geoVanDerGrinten3Raw=zo,d.geoVanDerGrinten4=Yu,d.geoVanDerGrinten4Raw=lc,d.geoWagner=ie,d.geoWagner7=Te,d.geoWagnerRaw=I,d.geoWagner4=wt,d.geoWagner4Raw=ht,d.geoWagner6=$t,d.geoWagner6Raw=Ot,d.geoWiechel=Ar,d.geoWiechelRaw=Tr,d.geoWinkel3=na,d.geoWinkel3Raw=Kr,Object.defineProperty(d,"__esModule",{value:!0})})}}),qU=He({"src/plots/geo/zoom.js"(Z,V){"use strict";var d=Wn(),x=sa(),S=lo(),E=Math.PI/180,e=180/Math.PI,t={cursor:"pointer"},r={cursor:"auto"};function o(y,m){var R=y.projection,L;return m._isScoped?L=i:m._isClipped?L=h:L=s,L(y,R)}V.exports=o;function a(y,m){return d.behavior.zoom().translate(m.translate()).scale(m.scale())}function n(y,m,R){var L=y.id,z=y.graphDiv,F=z.layout,N=F[L],O=z._fullLayout,P=O[L],U={},B={};function X($,le){U[L+"."+$]=x.nestedProperty(N,$).get(),S.call("_storeDirectGUIEdit",F,O._preGUI,U);var ce=x.nestedProperty(P,$);ce.get()!==le&&(ce.set(le),x.nestedProperty(N,$).set(le),B[L+"."+$]=le)}R(X),X("projection.scale",m.scale()/y.fitScale),X("fitbounds",!1),z.emit("plotly_relayout",B)}function i(y,m){var R=a(y,m);function L(){d.select(this).style(t)}function z(){m.scale(d.event.scale).translate(d.event.translate),y.render(!0);var O=m.invert(y.midPt);y.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":m.scale()/y.fitScale,"geo.center.lon":O[0],"geo.center.lat":O[1]})}function F(O){var P=m.invert(y.midPt);O("center.lon",P[0]),O("center.lat",P[1])}function N(){d.select(this).style(r),n(y,m,F)}return R.on("zoomstart",L).on("zoom",z).on("zoomend",N),R}function s(y,m){var R=a(y,m),L=2,z,F,N,O,P,U,B,X,$;function le(q){return m.invert(q)}function ce(q){var se=le(q);if(!se)return!0;var ae=m(se);return Math.abs(ae[0]-q[0])>L||Math.abs(ae[1]-q[1])>L}function de(){d.select(this).style(t),z=d.mouse(this),F=m.rotate(),N=m.translate(),O=F,P=le(z)}function G(){if(U=d.mouse(this),ce(z)){R.scale(m.scale()),R.translate(m.translate());return}m.scale(d.event.scale),m.translate([N[0],d.event.translate[1]]),P?le(U)&&(X=le(U),B=[O[0]+(X[0]-P[0]),F[1],F[2]],m.rotate(B),O=B):(z=U,P=le(z)),$=!0,y.render(!0);var q=m.rotate(),se=m.invert(y.midPt);y.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":m.scale()/y.fitScale,"geo.center.lon":se[0],"geo.center.lat":se[1],"geo.projection.rotation.lon":-q[0]})}function Y(){d.select(this).style(r),$&&n(y,m,ee)}function ee(q){var se=m.rotate(),ae=m.invert(y.midPt);q("projection.rotation.lon",-se[0]),q("center.lon",ae[0]),q("center.lat",ae[1])}return R.on("zoomstart",de).on("zoom",G).on("zoomend",Y),R}function h(y,m){var R={r:m.rotate(),k:m.scale()},L=a(y,m),z=u(L,"zoomstart","zoom","zoomend"),F=0,N=L.on,O;L.on("zoomstart",function(){d.select(this).style(t);var $=d.mouse(this),le=m.rotate(),ce=le,de=m.translate(),G=v(le);O=f(m,$),N.call(L,"zoom",function(){var Y=d.mouse(this);if(m.scale(R.k=d.event.scale),!O)$=Y,O=f(m,$);else if(f(m,Y)){m.rotate(le).translate(de);var ee=f(m,Y),q=T(O,ee),se=M(c(G,q)),ae=R.r=l(se,O,ce);(!isFinite(ae[0])||!isFinite(ae[1])||!isFinite(ae[2]))&&(ae=ce),m.rotate(ae),ce=ae}U(z.of(this,arguments))}),P(z.of(this,arguments))}).on("zoomend",function(){d.select(this).style(r),N.call(L,"zoom",null),B(z.of(this,arguments)),n(y,m,X)}).on("zoom.redraw",function(){y.render(!0);var $=m.rotate();y.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":m.scale()/y.fitScale,"geo.projection.rotation.lon":-$[0],"geo.projection.rotation.lat":-$[1]})});function P($){F++||$({type:"zoomstart"})}function U($){$({type:"zoom"})}function B($){--F||$({type:"zoomend"})}function X($){var le=m.rotate();$("projection.rotation.lon",-le[0]),$("projection.rotation.lat",-le[1])}return d.rebind(L,z,"on")}function f(y,m){var R=y.invert(m);return R&&isFinite(R[0])&&isFinite(R[1])&&g(R)}function v(y){var m=.5*y[0]*E,R=.5*y[1]*E,L=.5*y[2]*E,z=Math.sin(m),F=Math.cos(m),N=Math.sin(R),O=Math.cos(R),P=Math.sin(L),U=Math.cos(L);return[F*O*U+z*N*P,z*O*U-F*N*P,F*N*U+z*O*P,F*O*P-z*N*U]}function c(y,m){var R=y[0],L=y[1],z=y[2],F=y[3],N=m[0],O=m[1],P=m[2],U=m[3];return[R*N-L*O-z*P-F*U,R*O+L*N+z*U-F*P,R*P-L*U+z*N+F*O,R*U+L*P-z*O+F*N]}function T(y,m){if(!(!y||!m)){var R=p(y,m),L=Math.sqrt(b(R,R)),z=.5*Math.acos(Math.max(-1,Math.min(1,b(y,m)))),F=Math.sin(z)/L;return L&&[Math.cos(z),R[2]*F,-R[1]*F,R[0]*F]}}function l(y,m,R){var L=A(m,2,y[0]);L=A(L,1,y[1]),L=A(L,0,y[2]-R[2]);var z=m[0],F=m[1],N=m[2],O=L[0],P=L[1],U=L[2],B=Math.atan2(F,z)*e,X=Math.sqrt(z*z+F*F),$,le;Math.abs(P)>X?(le=(P>0?90:-90)-B,$=0):(le=Math.asin(P/X)*e-B,$=Math.sqrt(X*X-P*P));var ce=180-le-2*B,de=(Math.atan2(U,O)-Math.atan2(N,$))*e,G=(Math.atan2(U,O)-Math.atan2(N,-$))*e,Y=_(R[0],R[1],le,de),ee=_(R[0],R[1],ce,G);return Y<=ee?[le,de,R[2]]:[ce,G,R[2]]}function _(y,m,R,L){var z=w(R-y),F=w(L-m);return Math.sqrt(z*z+F*F)}function w(y){return(y%360+540)%360-180}function A(y,m,R){var L=R*E,z=y.slice(),F=m===0?1:0,N=m===2?1:2,O=Math.cos(L),P=Math.sin(L);return z[F]=y[F]*O-y[N]*P,z[N]=y[N]*O+y[F]*P,z}function M(y){return[Math.atan2(2*(y[0]*y[1]+y[2]*y[3]),1-2*(y[1]*y[1]+y[2]*y[2]))*e,Math.asin(Math.max(-1,Math.min(1,2*(y[0]*y[2]-y[3]*y[1]))))*e,Math.atan2(2*(y[0]*y[3]+y[1]*y[2]),1-2*(y[2]*y[2]+y[3]*y[3]))*e]}function g(y){var m=y[0]*E,R=y[1]*E,L=Math.cos(R);return[L*Math.cos(m),L*Math.sin(m),Math.sin(R)]}function b(y,m){for(var R=0,L=0,z=y.length;L0&&P._module.calcGeoJSON(O,L)}if(!z){var U=this.updateProjection(R,L);if(U)return;(!this.viewInitial||this.scope!==F.scope)&&this.saveViewInitial(F)}this.scope=F.scope,this.updateBaseLayers(L,F),this.updateDims(L,F),this.updateFx(L,F),s.generalUpdatePerTraceModule(this.graphDiv,this,R,F);var B=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=B.selectAll(".point"),this.dataPoints.text=B.selectAll("text"),this.dataPaths.line=B.selectAll(".js-line");var X=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=X.selectAll("path"),this._render()},p.updateProjection=function(R,L){var z=this.graphDiv,F=L[this.id],N=L._size,O=F.domain,P=F.projection,U=F.lonaxis,B=F.lataxis,X=U._ax,$=B._ax,le=this.projection=u(F),ce=[[N.l+N.w*O.x[0],N.t+N.h*(1-O.y[1])],[N.l+N.w*O.x[1],N.t+N.h*(1-O.y[0])]],de=F.center||{},G=P.rotation||{},Y=U.range||[],ee=B.range||[];if(F.fitbounds){X._length=ce[1][0]-ce[0][0],$._length=ce[1][1]-ce[0][1],X.range=f(z,X),$.range=f(z,$);var q=(X.range[0]+X.range[1])/2,se=($.range[0]+$.range[1])/2;if(F._isScoped)de={lon:q,lat:se};else if(F._isClipped){de={lon:q,lat:se},G={lon:q,lat:se,roll:G.roll};var ae=P.type,j=w.lonaxisSpan[ae]/2||180,Q=w.lataxisSpan[ae]/2||90;Y=[q-j,q+j],ee=[se-Q,se+Q]}else de={lon:q,lat:se},G={lon:q,lat:G.lat,roll:G.roll}}le.center([de.lon-G.lon,de.lat-G.lat]).rotate([-G.lon,-G.lat,G.roll]).parallels(P.parallels);var re=m(Y,ee);le.fitExtent(ce,re);var pe=this.bounds=le.getBounds(re),we=this.fitScale=le.scale(),Se=le.translate();if(F.fitbounds){var Ie=le.getBounds(m(X.range,$.range)),Re=Math.min((pe[1][0]-pe[0][0])/(Ie[1][0]-Ie[0][0]),(pe[1][1]-pe[0][1])/(Ie[1][1]-Ie[0][1]));isFinite(Re)?le.scale(Re*we):r.warn("Something went wrong during"+this.id+"fitbounds computations.")}else le.scale(P.scale*we);var We=this.midPt=[(pe[0][0]+pe[1][0])/2,(pe[0][1]+pe[1][1])/2];if(le.translate([Se[0]+(We[0]-Se[0]),Se[1]+(We[1]-Se[1])]).clipExtent(pe),F._isAlbersUsa){var at=le([de.lon,de.lat]),nt=le.translate();le.translate([nt[0]-(at[0]-nt[0]),nt[1]-(at[1]-nt[1])])}},p.updateBaseLayers=function(R,L){var z=this,F=z.topojson,N=z.layers,O=z.basePaths;function P(ce){return ce==="lonaxis"||ce==="lataxis"}function U(ce){return!!w.lineLayers[ce]}function B(ce){return!!w.fillLayers[ce]}var X=this.hasChoropleth?w.layersForChoropleth:w.layers,$=X.filter(function(ce){return U(ce)||B(ce)?L["show"+ce]:P(ce)?L[ce].showgrid:!0}),le=z.framework.selectAll(".layer").data($,String);le.exit().each(function(ce){delete N[ce],delete O[ce],d.select(this).remove()}),le.enter().append("g").attr("class",function(ce){return"layer "+ce}).each(function(ce){var de=N[ce]=d.select(this);ce==="bg"?z.bgRect=de.append("rect").style("pointer-events","all"):P(ce)?O[ce]=de.append("path").style("fill","none"):ce==="backplot"?de.append("g").classed("choroplethlayer",!0):ce==="frontplot"?de.append("g").classed("scatterlayer",!0):U(ce)?O[ce]=de.append("path").style("fill","none").style("stroke-miterlimit",2):B(ce)&&(O[ce]=de.append("path").style("stroke","none"))}),le.order(),le.each(function(ce){var de=O[ce],G=w.layerNameToAdjective[ce];ce==="frame"?de.datum(w.sphereSVG):U(ce)||B(ce)?de.datum(g(F,F.objects[ce])):P(ce)&&de.datum(y(ce,L,R)).call(a.stroke,L[ce].gridcolor).call(n.dashLine,L[ce].griddash,L[ce].gridwidth),U(ce)?de.call(a.stroke,L[G+"color"]).call(n.dashLine,"",L[G+"width"]):B(ce)&&de.call(a.fill,L[G+"color"])})},p.updateDims=function(R,L){var z=this.bounds,F=(L.framewidth||0)/2,N=z[0][0]-F,O=z[0][1]-F,P=z[1][0]-N+F,U=z[1][1]-O+F;n.setRect(this.clipRect,N,O,P,U),this.bgRect.call(n.setRect,N,O,P,U).call(a.fill,L.bgcolor),this.xaxis._offset=N,this.xaxis._length=P,this.yaxis._offset=O,this.yaxis._length=U},p.updateFx=function(R,L){var z=this,F=z.graphDiv,N=z.bgRect,O=R.dragmode,P=R.clickmode;if(z.isStatic)return;function U(){var le=z.viewInitial,ce={};for(var de in le)ce[z.id+"."+de]=le[de];t.call("_guiRelayout",F,ce),F.emit("plotly_doubleclick",null)}function B(le){return z.projection.invert([le[0]+z.xaxis._offset,le[1]+z.yaxis._offset])}var X=function(le,ce){if(ce.isRect){var de=le.range={};de[z.id]=[B([ce.xmin,ce.ymin]),B([ce.xmax,ce.ymax])]}else{var G=le.lassoPoints={};G[z.id]=ce.map(B)}},$={element:z.bgRect.node(),gd:F,plotinfo:{id:z.id,xaxis:z.xaxis,yaxis:z.yaxis,fillRangeItems:X},xaxes:[z.xaxis],yaxes:[z.yaxis],subplot:z.id,clickFn:function(le){le===2&&T(F)}};O==="pan"?(N.node().onmousedown=null,N.call(_(z,L)),N.on("dblclick.zoom",U),F._context._scrollZoom.geo||N.on("wheel.zoom",null)):(O==="select"||O==="lasso")&&(N.on(".zoom",null),$.prepFn=function(le,ce,de){c(le,ce,de,$,O)},v.init($)),N.on("mousemove",function(){var le=z.projection.invert(r.getPositionFromD3Event());if(!le)return v.unhover(F,d.event);z.xaxis.p2c=function(){return le[0]},z.yaxis.p2c=function(){return le[1]},i.hover(F,d.event,z.id)}),N.on("mouseout",function(){F._dragging||v.unhover(F,d.event)}),N.on("click",function(){O!=="select"&&O!=="lasso"&&(P.indexOf("select")>-1&&l(d.event,F,[z.xaxis],[z.yaxis],z.id,$),P.indexOf("event")>-1&&i.click(F,d.event))})},p.makeFramework=function(){var R=this,L=R.graphDiv,z=L._fullLayout,F="clip"+z._uid+R.id;R.clipDef=z._clips.append("clipPath").attr("id",F),R.clipRect=R.clipDef.append("rect"),R.framework=d.select(R.container).append("g").attr("class","geo "+R.id).call(n.setClipUrl,F,L),R.project=function(N){var O=R.projection(N);return O?[O[0]-R.xaxis._offset,O[1]-R.yaxis._offset]:[null,null]},R.xaxis={_id:"x",c2p:function(N){return R.project(N)[0]}},R.yaxis={_id:"y",c2p:function(N){return R.project(N)[1]}},R.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},h.setConvert(R.mockAxis,z)},p.saveViewInitial=function(R){var L=R.center||{},z=R.projection,F=z.rotation||{};this.viewInitial={fitbounds:R.fitbounds,"projection.scale":z.scale};var N;R._isScoped?N={"center.lon":L.lon,"center.lat":L.lat}:R._isClipped?N={"projection.rotation.lon":F.lon,"projection.rotation.lat":F.lat}:N={"center.lon":L.lon,"center.lat":L.lat,"projection.rotation.lon":F.lon},r.extendFlat(this.viewInitial,N)},p.render=function(R){this._hasMarkerAngles&&R?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()},p._render=function(){var R=this.projection,L=R.getPath(),z;function F(O){var P=R(O.lonlat);return P?o(P[0],P[1]):null}function N(O){return R.isLonLatOverEdges(O.lonlat)?"none":null}for(z in this.basePaths)this.basePaths[z].attr("d",L);for(z in this.dataPaths)this.dataPaths[z].attr("d",function(O){return L(O.geojson)});for(z in this.dataPoints)this.dataPoints[z].attr("display",N).attr("transform",F)};function u(R){var L=R.projection,z=L.type,F=w.projNames[z];F="geo"+r.titleCase(F);for(var N=x[F]||e[F],O=N(),P=R._isSatellite?Math.acos(1/L.distance)*180/Math.PI:R._isClipped?w.lonaxisSpan[z]/2:null,U=["center","rotate","parallels","clipExtent"],B=function(le){return le?O:[]},X=0;XG}else return!1},O.getPath=function(){return S().projection(O)},O.getBounds=function(le){return O.getPath().bounds(le)},O.precision(w.precision),R._isSatellite&&O.tilt(L.tilt).distance(L.distance),P&&O.clipAngle(P-w.clipPad),O}function y(R,L,z){var F=1e-6,N=2.5,O=L[R],P=w.scopeDefaults[L.scope],U,B,X;R==="lonaxis"?(U=P.lonaxisRange,B=P.lataxisRange,X=function(se,ae){return[se,ae]}):R==="lataxis"&&(U=P.lataxisRange,B=P.lonaxisRange,X=function(se,ae){return[ae,se]});var $={type:"linear",range:[U[0],U[1]-F],tick0:O.tick0,dtick:O.dtick};h.setConvert($,z);var le=h.calcTicks($);!L.isScoped&&R==="lonaxis"&&le.pop();for(var ce=le.length,de=new Array(ce),G=0;G0&&N<0&&(N+=360);var U=(N-F)/4;return{type:"Polygon",coordinates:[[[F,O],[F,P],[F+U,P],[F+2*U,P],[F+3*U,P],[N,P],[N,O],[N-U,O],[N-2*U,O],[N-3*U,O],[F,O]]]}}}}),FE=He({"src/plots/geo/layout_attributes.js"(Z,V){"use strict";var d=sh(),x=wc().attributes,S=Gh().dash,E=yx(),e=pc().overrideAll,t=Jm(),r={range:{valType:"info_array",items:[{valType:"number"},{valType:"number"}]},showgrid:{valType:"boolean",dflt:!1},tick0:{valType:"number",dflt:0},dtick:{valType:"number"},gridcolor:{valType:"color",dflt:d.lightLine},gridwidth:{valType:"number",min:0,dflt:1},griddash:S},o=V.exports=e({domain:x({name:"geo"},{}),fitbounds:{valType:"enumerated",values:[!1,"locations","geojson"],dflt:!1,editType:"plot"},resolution:{valType:"enumerated",values:[110,50],dflt:110,coerceNumber:!0},scope:{valType:"enumerated",values:t(E.scopeDefaults),dflt:"world"},projection:{type:{valType:"enumerated",values:t(E.projNames)},rotation:{lon:{valType:"number"},lat:{valType:"number"},roll:{valType:"number"}},tilt:{valType:"number",dflt:0},distance:{valType:"number",min:1.001,dflt:2},parallels:{valType:"info_array",items:[{valType:"number"},{valType:"number"}]},scale:{valType:"number",min:0,dflt:1}},center:{lon:{valType:"number"},lat:{valType:"number"}},visible:{valType:"boolean",dflt:!0},showcoastlines:{valType:"boolean"},coastlinecolor:{valType:"color",dflt:d.defaultLine},coastlinewidth:{valType:"number",min:0,dflt:1},showland:{valType:"boolean",dflt:!1},landcolor:{valType:"color",dflt:E.landColor},showocean:{valType:"boolean",dflt:!1},oceancolor:{valType:"color",dflt:E.waterColor},showlakes:{valType:"boolean",dflt:!1},lakecolor:{valType:"color",dflt:E.waterColor},showrivers:{valType:"boolean",dflt:!1},rivercolor:{valType:"color",dflt:E.waterColor},riverwidth:{valType:"number",min:0,dflt:1},showcountries:{valType:"boolean"},countrycolor:{valType:"color",dflt:d.defaultLine},countrywidth:{valType:"number",min:0,dflt:1},showsubunits:{valType:"boolean"},subunitcolor:{valType:"color",dflt:d.defaultLine},subunitwidth:{valType:"number",min:0,dflt:1},showframe:{valType:"boolean"},framecolor:{valType:"color",dflt:d.defaultLine},framewidth:{valType:"number",min:0,dflt:1},bgcolor:{valType:"color",dflt:d.background},lonaxis:r,lataxis:r},"plot","from-root");o.uirevision={valType:"any",editType:"none"}}}),GU=He({"src/plots/geo/layout_defaults.js"(Z,V){"use strict";var d=sa(),x=o0(),S=Hh().getSubplotData,E=yx(),e=FE(),t=E.axesNames;V.exports=function(a,n,i){x(a,n,i,{type:"geo",attributes:e,handleDefaults:r,fullData:i,partition:"y"})};function r(o,a,n,i){var s=S(i.fullData,"geo",i.id),h=s.map(function(ee){return ee.index}),f=n("resolution"),v=n("scope"),c=E.scopeDefaults[v],T=n("projection.type",c.projType),l=a._isAlbersUsa=T==="albers usa";l&&(v=a.scope="usa");var _=a._isScoped=v!=="world",w=a._isSatellite=T==="satellite",A=a._isConic=T.indexOf("conic")!==-1||T==="albers",M=a._isClipped=!!E.lonaxisSpan[T];if(o.visible===!1){var g=d.extendDeep({},a._template);g.showcoastlines=!1,g.showcountries=!1,g.showframe=!1,g.showlakes=!1,g.showland=!1,g.showocean=!1,g.showrivers=!1,g.showsubunits=!1,g.lonaxis&&(g.lonaxis.showgrid=!1),g.lataxis&&(g.lataxis.showgrid=!1),a._template=g}for(var b=n("visible"),p,u=0;u0&&B<0&&(B+=360);var X=(U+B)/2,$;if(!l){var le=_?c.projRotate:[X,0,0];$=n("projection.rotation.lon",le[0]),n("projection.rotation.lat",le[1]),n("projection.rotation.roll",le[2]),p=n("showcoastlines",!_&&b),p&&(n("coastlinecolor"),n("coastlinewidth")),p=n("showocean",b?void 0:!1),p&&n("oceancolor")}var ce,de;if(l?(ce=-96.6,de=38.7):(ce=_?X:$,de=(P[0]+P[1])/2),n("center.lon",ce),n("center.lat",de),w&&(n("projection.tilt"),n("projection.distance")),A){var G=c.projParallels||[0,60];n("projection.parallels",G)}n("projection.scale"),p=n("showland",b?void 0:!1),p&&n("landcolor"),p=n("showlakes",b?void 0:!1),p&&n("lakecolor"),p=n("showrivers",b?void 0:!1),p&&(n("rivercolor"),n("riverwidth")),p=n("showcountries",_&&v!=="usa"&&b),p&&(n("countrycolor"),n("countrywidth")),(v==="usa"||v==="north america"&&f===50)&&(n("showsubunits",b),n("subunitcolor"),n("subunitwidth")),_||(p=n("showframe",b),p&&(n("framecolor"),n("framewidth"))),n("bgcolor");var Y=n("fitbounds");Y&&(delete a.projection.scale,_?(delete a.center.lon,delete a.center.lat):M?(delete a.center.lon,delete a.center.lat,delete a.projection.rotation.lon,delete a.projection.rotation.lat,delete a.lonaxis.range,delete a.lataxis.range):(delete a.center.lon,delete a.center.lat,delete a.projection.rotation.lon))}}}),OE=He({"src/plots/geo/index.js"(Z,V){"use strict";var d=Hh().getSubplotCalcData,x=sa().counterRegex,S=VU(),E="geo",e=x(E),t={};t[E]={valType:"subplotid",dflt:E,editType:"calc"};function r(n){for(var i=n._fullLayout,s=n.calcdata,h=i._subplots[E],f=0;f")}}}}),fT=He({"src/traces/choropleth/event_data.js"(Z,V){"use strict";V.exports=function(x,S,E,e,t){x.location=S.location,x.z=S.z;var r=e[t];return r.fIn&&r.fIn.properties&&(x.properties=r.fIn.properties),x.ct=r.ct,x}}}),hT=He({"src/traces/choropleth/select.js"(Z,V){"use strict";V.exports=function(x,S){var E=x.cd,e=x.xaxis,t=x.yaxis,r=[],o,a,n,i,s;if(S===!1)for(o=0;o=Math.min(B,X)&&T<=Math.max(B,X)?0:1/0}if(L=Math.min($,le)&&l<=Math.max($,le)?0:1/0}N=Math.sqrt(L*L+z*z),u=w[R]}}}else for(R=w.length-1;R>-1;R--)p=w[R],y=v[p],m=c[p],L=h.c2p(y)-T,z=f.c2p(m)-l,F=Math.sqrt(L*L+z*z),F100},Z.isDotSymbol=function(d){return typeof d=="string"?V.DOT_RE.test(d):d>200}}}),KU=He({"src/traces/scattergl/defaults.js"(Z,V){"use strict";var d=sa(),x=lo(),S=dT(),E=xx(),e=Tv(),t=Fu(),r=n1(),o=Qd(),a=md(),n=Dd(),i=ev(),s=zd();V.exports=function(f,v,c,T){function l(u,y){return d.coerce(f,v,E,u,y)}var _=f.marker?S.isOpenSymbol(f.marker.symbol):!1,w=t.isBubble(f),A=r(f,v,T,l);if(!A){v.visible=!1;return}o(f,v,T,l),l("xhoverformat"),l("yhoverformat");var M=A>>1,f=r[h],v=a!==void 0?a(f,o):f-o;v>=0?(s=h,i=h-1):n=h+1}return s}function x(r,o,a,n,i){for(var s=i+1;n<=i;){var h=n+i>>>1,f=r[h],v=a!==void 0?a(f,o):f-o;v>0?(s=h,i=h-1):n=h+1}return s}function S(r,o,a,n,i){for(var s=n-1;n<=i;){var h=n+i>>>1,f=r[h],v=a!==void 0?a(f,o):f-o;v<0?(s=h,n=h+1):i=h-1}return s}function E(r,o,a,n,i){for(var s=n-1;n<=i;){var h=n+i>>>1,f=r[h],v=a!==void 0?a(f,o):f-o;v<=0?(s=h,n=h+1):i=h-1}return s}function e(r,o,a,n,i){for(;n<=i;){var s=n+i>>>1,h=r[s],f=a!==void 0?a(h,o):h-o;if(f===0)return s;f<=0?n=s+1:i=s-1}return-1}function t(r,o,a,n,i,s){return typeof a=="function"?s(r,o,a,n===void 0?0:n|0,i===void 0?r.length-1:i|0):s(r,o,void 0,a===void 0?0:a|0,n===void 0?r.length-1:n|0)}V.exports={ge:function(r,o,a,n,i){return t(r,o,a,n,i,d)},gt:function(r,o,a,n,i){return t(r,o,a,n,i,x)},lt:function(r,o,a,n,i){return t(r,o,a,n,i,S)},le:function(r,o,a,n,i){return t(r,o,a,n,i,E)},eq:function(r,o,a,n,i){return t(r,o,a,n,i,e)}}}}),Ev=He({"node_modules/pick-by-alias/index.js"(Z,V){"use strict";V.exports=function(E,e,t){var r={},o,a;if(typeof e=="string"&&(e=x(e)),Array.isArray(e)){var n={};for(a=0;a1&&(S=arguments),typeof S=="string"?S=S.split(/\s/).map(parseFloat):typeof S=="number"&&(S=[S]),S.length&&typeof S[0]=="number"?S.length===1?E={width:S[0],height:S[0],x:0,y:0}:S.length===2?E={width:S[0],height:S[1],x:0,y:0}:E={x:S[0],y:S[1],width:S[2]-S[0]||0,height:S[3]-S[1]||0}:S&&(S=d(S,{left:"x l left Left",top:"y t top Top",width:"w width W Width",height:"h height W Width",bottom:"b bottom Bottom",right:"r right Right"}),E={x:S.left||0,y:S.top||0},S.width==null?S.right?E.width=S.right-E.x:E.width=0:E.width=S.width,S.height==null?S.bottom?E.height=S.bottom-E.y:E.height=0:E.height=S.height),E}}}),mg=He({"node_modules/array-bounds/index.js"(Z,V){"use strict";V.exports=d;function d(x,S){if(!x||x.length==null)throw Error("Argument should be an array");S==null?S=1:S=Math.floor(S);for(var E=Array(S*2),e=0;et&&(t=x[o]),x[o]>>1,w;v.dtype||(v.dtype="array"),typeof v.dtype=="string"?w=new(a(v.dtype))(_):v.dtype&&(w=v.dtype,Array.isArray(w)&&(w.length=_));for(let L=0;L<_;++L)w[L]=L;let A=[],M=[],g=[],b=[];u(0,0,1,w,0,1);let p=0;for(let L=0;Lc||P>i){for(let se=0;sere||X>pe||$=ce||j===Q)return;let we=A[ae];Q===void 0&&(Q=we.length);for(let he=j;he=N&&ne<=P&&Ce>=O&&Ce<=U&&de.push(ue)}let Se=M[ae],Ie=Se[j*4+0],Re=Se[j*4+1],We=Se[j*4+2],at=Se[j*4+3],nt=Y(Se,j+1),tt=se*.5,qe=ae+1;G(ee,q,tt,qe,Ie,Re||We||at||nt),G(ee,q+tt,tt,qe,Re,We||at||nt),G(ee+tt,q,tt,qe,We,at||nt),G(ee+tt,q+tt,tt,qe,at,nt)}function Y(ee,q){let se=null,ae=0;for(;se===null;)if(se=ee[q*4+ae],ae++,ae>ee.length)return null;return se}return de}function m(L,z,F,N,O){let P=[];for(let U=0;U1&&(f=1),f<-1&&(f=-1),h*Math.acos(f)},t=function(a,n,i,s,h,f,v,c,T,l,_,w){var A=Math.pow(h,2),M=Math.pow(f,2),g=Math.pow(_,2),b=Math.pow(w,2),p=A*M-A*b-M*g;p<0&&(p=0),p/=A*b+M*g,p=Math.sqrt(p)*(v===c?-1:1);var u=p*h/f*w,y=p*-f/h*_,m=l*u-T*y+(a+i)/2,R=T*u+l*y+(n+s)/2,L=(_-u)/h,z=(w-y)/f,F=(-_-u)/h,N=(-w-y)/f,O=e(1,0,L,z),P=e(L,z,F,N);return c===0&&P>0&&(P-=x),c===1&&P<0&&(P+=x),[m,R,O,P]},r=function(a){var n=a.px,i=a.py,s=a.cx,h=a.cy,f=a.rx,v=a.ry,c=a.xAxisRotation,T=c===void 0?0:c,l=a.largeArcFlag,_=l===void 0?0:l,w=a.sweepFlag,A=w===void 0?0:w,M=[];if(f===0||v===0)return[];var g=Math.sin(T*x/360),b=Math.cos(T*x/360),p=b*(n-s)/2+g*(i-h)/2,u=-g*(n-s)/2+b*(i-h)/2;if(p===0&&u===0)return[];f=Math.abs(f),v=Math.abs(v);var y=Math.pow(p,2)/Math.pow(f,2)+Math.pow(u,2)/Math.pow(v,2);y>1&&(f*=Math.sqrt(y),v*=Math.sqrt(y));var m=t(n,i,s,h,f,v,_,A,g,b,p,u),R=d(m,4),L=R[0],z=R[1],F=R[2],N=R[3],O=Math.abs(N)/(x/4);Math.abs(1-O)<1e-7&&(O=1);var P=Math.max(Math.ceil(O),1);N/=P;for(var U=0;U4?(o=l[l.length-4],a=l[l.length-3]):(o=f,a=v),r.push(l)}return r}function S(e,t,r,o){return["C",e,t,r,o,r,o]}function E(e,t,r,o,a,n){return["C",e/3+2/3*r,t/3+2/3*o,a/3+2/3*r,n/3+2/3*o,a,n]}}}),UE=He({"node_modules/is-svg-path/index.js"(Z,V){"use strict";V.exports=function(x){return typeof x!="string"?!1:(x=x.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(x)&&/[\dz]$/i.test(x)&&x.length>4))}}}),nj=He({"node_modules/svg-path-bounds/index.js"(Z,V){"use strict";var d=M_(),x=NE(),S=ij(),E=UE(),e=K_();V.exports=t;function t(r){if(Array.isArray(r)&&r.length===1&&typeof r[0]=="string"&&(r=r[0]),typeof r=="string"&&(e(E(r),"String is not an SVG path."),r=d(r)),e(Array.isArray(r),"Argument should be a string or an array of path segments."),r=x(r),r=S(r),!r.length)return[0,0,0,0];for(var o=[1/0,1/0,-1/0,-1/0],a=0,n=r.length;ao[2]&&(o[2]=i[s+0]),i[s+1]>o[3]&&(o[3]=i[s+1]);return o}}}),oj=He({"node_modules/normalize-svg-path/index.js"(Z,V){var d=Math.PI,x=o(120);V.exports=S;function S(a){for(var n,i=[],s=0,h=0,f=0,v=0,c=null,T=null,l=0,_=0,w=0,A=a.length;w7&&(i.push(M.splice(0,7)),M.unshift("C"));break;case"S":var b=l,p=_;(n=="C"||n=="S")&&(b+=b-s,p+=p-h),M=["C",b,p,M[1],M[2],M[3],M[4]];break;case"T":n=="Q"||n=="T"?(c=l*2-c,T=_*2-T):(c=l,T=_),M=e(l,_,c,T,M[1],M[2]);break;case"Q":c=M[1],T=M[2],M=e(l,_,M[1],M[2],M[3],M[4]);break;case"L":M=E(l,_,M[1],M[2]);break;case"H":M=E(l,_,M[1],_);break;case"V":M=E(l,_,l,M[1]);break;case"Z":M=E(l,_,f,v);break}n=g,l=M[M.length-2],_=M[M.length-1],M.length>4?(s=M[M.length-4],h=M[M.length-3]):(s=l,h=_),i.push(M)}return i}function E(a,n,i,s){return["C",a,n,i,s,i,s]}function e(a,n,i,s,h,f){return["C",a/3+2/3*i,n/3+2/3*s,h/3+2/3*i,f/3+2/3*s,h,f]}function t(a,n,i,s,h,f,v,c,T,l){if(l)m=l[0],R=l[1],u=l[2],y=l[3];else{var _=r(a,n,-h);a=_.x,n=_.y,_=r(c,T,-h),c=_.x,T=_.y;var w=(a-c)/2,A=(n-T)/2,M=w*w/(i*i)+A*A/(s*s);M>1&&(M=Math.sqrt(M),i=M*i,s=M*s);var g=i*i,b=s*s,p=(f==v?-1:1)*Math.sqrt(Math.abs((g*b-g*A*A-b*w*w)/(g*A*A+b*w*w)));p==1/0&&(p=1);var u=p*i*A/s+(a+c)/2,y=p*-s*w/i+(n+T)/2,m=Math.asin(((n-y)/s).toFixed(9)),R=Math.asin(((T-y)/s).toFixed(9));m=aR&&(m=m-d*2),!v&&R>m&&(R=R-d*2)}if(Math.abs(R-m)>x){var L=R,z=c,F=T;R=m+x*(v&&R>m?1:-1),c=u+i*Math.cos(R),T=y+s*Math.sin(R);var N=t(c,T,i,s,h,0,v,z,F,[R,L,u,y])}var O=Math.tan((R-m)/4),P=4/3*i*O,U=4/3*s*O,B=[2*a-(a+P*Math.sin(m)),2*n-(n-U*Math.cos(m)),c+P*Math.sin(R),T-U*Math.cos(R),c,T];if(l)return B;N&&(B=B.concat(N));for(var X=0;X0?r.strokeStyle="white":r.strokeStyle="black",r.lineWidth=Math.abs(c)),r.translate(h*.5,f*.5),r.scale(_,_),n()){var w=new Path2D(i);r.fill(w),c&&r.stroke(w)}else{var A=x(i);S(r,A),r.fill(),c&&r.stroke()}r.setTransform(1,0,0,1,0,0);var M=e(r,{cutoff:s.cutoff!=null?s.cutoff:.5,radius:s.radius!=null?s.radius:v*.5});return M}var a;function n(){if(a!=null)return a;var i=document.createElement("canvas").getContext("2d");if(i.canvas.width=i.canvas.height=1,!window.Path2D)return a=!1;var s=new Path2D("M0,0h1v1h-1v-1Z");i.fillStyle="black",i.fill(s);var h=i.getImageData(0,0,1,1);return a=h&&h.data&&h.data[3]===255}}}),yg=He({"src/traces/scattergl/convert.js"(Z,V){"use strict";var d=as(),x=uj(),S=d0(),E=lo(),e=sa(),t=e.isArrayOrTypedArray,r=es(),o=ef(),a=tm().formatColor,n=Fu(),i=r1(),s=dT(),h=y0(),f=Ym().DESELECTDIM,v={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},c=$p().appendArrayPointValue;function T(N,O){var P,U={marker:void 0,markerSel:void 0,markerUnsel:void 0,line:void 0,fill:void 0,errorX:void 0,errorY:void 0,text:void 0,textSel:void 0,textUnsel:void 0},B=N._context.plotGlPixelRatio;if(O.visible!==!0)return U;if(n.hasText(O)&&(U.text=l(N,O),U.textSel=M(N,O,O.selected),U.textUnsel=M(N,O,O.unselected)),n.hasMarkers(O)&&(U.marker=w(N,O),U.markerSel=A(N,O,O.selected),U.markerUnsel=A(N,O,O.unselected),!O.unselected&&t(O.marker.opacity))){var X=O.marker.opacity;for(U.markerUnsel.opacity=new Array(X.length),P=0;P500?"bold":"normal":N}function w(N,O){var P=O._length,U=O.marker,B={},X,$=t(U.symbol),le=t(U.angle),ce=t(U.color),de=t(U.line.color),G=t(U.opacity),Y=t(U.size),ee=t(U.line.width),q;if($||(q=s.isOpenSymbol(U.symbol)),$||ce||de||G||le){B.symbols=new Array(P),B.angles=new Array(P),B.colors=new Array(P),B.borderColors=new Array(P);var se=U.symbol,ae=U.angle,j=a(U,U.opacity,P),Q=a(U.line,U.opacity,P);if(!t(Q[0])){var re=Q;for(Q=Array(P),X=0;Xh.TOO_MANY_POINTS||n.hasMarkers(O)?"rect":"round";if(de&&O.connectgaps){var Y=X[0],ee=X[1];for($=0;$1?ce[$]:ce[0]:ce,q=t(de)?de.length>1?de[$]:de[0]:de,se=v[ee],ae=v[q],j=G?G/.8+1:0,Q=-ae*j-ae*.5;X.offset[$]=[se*j/Y,Q/Y]}}return X}V.exports={style:T,markerStyle:w,markerSelection:A,linePositions:L,errorBarPositions:z,textPosition:F}}}),jE=He({"src/traces/scattergl/scene_update.js"(Z,V){"use strict";var d=sa();V.exports=function(S,E){var e=E._scene,t={count:0,dirty:!0,lineOptions:[],fillOptions:[],markerOptions:[],markerSelectedOptions:[],markerUnselectedOptions:[],errorXOptions:[],errorYOptions:[],textOptions:[],textSelectedOptions:[],textUnselectedOptions:[],selectBatch:[],unselectBatch:[]},r={fill2d:!1,scatter2d:!1,error2d:!1,line2d:!1,glText:!1,select2d:!1};return E._scene||(e=E._scene={},e.init=function(){d.extendFlat(e,r,t)},e.init(),e.update=function(a){var n=d.repeat(a,e.count);if(e.fill2d&&e.fill2d.update(n),e.scatter2d&&e.scatter2d.update(n),e.line2d&&e.line2d.update(n),e.error2d&&e.error2d.update(n.concat(n)),e.select2d&&e.select2d.update(n),e.glText)for(var i=0;i=f,u=b*2,y={},m,R=A.makeCalcdata(_,"x"),L=M.makeCalcdata(_,"y"),z=e(_,A,"x",R),F=e(_,M,"y",L),N=z.vals,O=F.vals;_._x=N,_._y=O,_.xperiodalignment&&(_._origX=R,_._xStarts=z.starts,_._xEnds=z.ends),_.yperiodalignment&&(_._origY=L,_._yStarts=F.starts,_._yEnds=F.ends);var P=new Array(u),U=new Array(b);for(m=0;m1&&x.extendFlat(g.line,i.linePositions(T,_,w)),g.errorX||g.errorY){var b=i.errorBarPositions(T,_,w,A,M);g.errorX&&x.extendFlat(g.errorX,b.x),g.errorY&&x.extendFlat(g.errorY,b.y)}return g.text&&(x.extendFlat(g.text,{positions:w},i.textPosition(T,_,g.text,g.marker)),x.extendFlat(g.textSel,{positions:w},i.textPosition(T,_,g.text,g.markerSel)),x.extendFlat(g.textUnsel,{positions:w},i.textPosition(T,_,g.text,g.markerUnsel))),g}}}),qE=He({"src/traces/scattergl/edit_style.js"(Z,V){"use strict";var d=sa(),x=Jn(),S=Ym().DESELECTDIM;function E(e){var t=e[0],r=t.trace,o=t.t,a=o._scene,n=o.index,i=a.selectBatch[n],s=a.unselectBatch[n],h=a.textOptions[n],f=a.textSelectedOptions[n]||{},v=a.textUnselectedOptions[n]||{},c=d.extendFlat({},h),T,l;if(i.length||s.length){var _=f.color,w=v.color,A=h.color,M=d.isArrayOrTypedArray(A);for(c.color=new Array(r._length),T=0;T>>24,r=(E&16711680)>>>16,o=(E&65280)>>>8,a=E&255;return e===!1?[t,r,o,a]:[t/255,r/255,o/255,a/255]}}}),ch=He({"node_modules/object-assign/index.js"(Z,V){"use strict";var d=Object.getOwnPropertySymbols,x=Object.prototype.hasOwnProperty,S=Object.prototype.propertyIsEnumerable;function E(t){if(t==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}function e(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de",Object.getOwnPropertyNames(t)[0]==="5")return!1;for(var r={},o=0;o<10;o++)r["_"+String.fromCharCode(o)]=o;var a=Object.getOwnPropertyNames(r).map(function(i){return r[i]});if(a.join("")!=="0123456789")return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(i){n[i]=i}),Object.keys(Object.assign({},n)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}V.exports=e()?Object.assign:function(t,r){for(var o,a=E(t),n,i=1;iy.length)&&(m=y.length);for(var R=0,L=new Array(m);R 1.0 + delta) { discard; } alpha -= smoothstep(1.0 - delta, 1.0 + delta, radius); float borderRadius = fragBorderRadius; float ratio = smoothstep(borderRadius - delta, borderRadius + delta, radius); vec4 color = mix(fragColor, fragBorderColor, ratio); color.a *= alpha * opacity; gl_FragColor = color; } `]),ce.vert=c([`precision highp float; #define GLSLIFY 1 attribute float x, y, xFract, yFract; attribute float size, borderSize; attribute vec4 colorId, borderColorId; attribute float isActive; // \`invariant\` effectively turns off optimizations for the position. // We need this because -fast-math on M1 Macs is re-ordering // floating point operations in a way that causes floating point // precision limits to put points in the wrong locations. invariant gl_Position; uniform bool constPointSize; uniform float pixelRatio; uniform vec2 paletteSize, scale, scaleFract, translate, translateFract; uniform sampler2D paletteTexture; const float maxSize = 100.; varying vec4 fragColor, fragBorderColor; varying float fragBorderRadius, fragWidth; float pointSizeScale = (constPointSize) ? 2. : pixelRatio; bool isDirect = (paletteSize.x < 1.); vec4 getColor(vec4 id) { return isDirect ? id / 255. : texture2D(paletteTexture, vec2( (id.x + .5) / paletteSize.x, (id.y + .5) / paletteSize.y ) ); } void main() { // ignore inactive points if (isActive == 0.) return; vec2 position = vec2(x, y); vec2 positionFract = vec2(xFract, yFract); vec4 color = getColor(colorId); vec4 borderColor = getColor(borderColorId); float size = size * maxSize / 255.; float borderSize = borderSize * maxSize / 255.; gl_PointSize = (size + borderSize) * pointSizeScale; vec2 pos = (position + translate) * scale + (positionFract + translateFract) * scale + (position + translate) * scaleFract + (positionFract + translateFract) * scaleFract; gl_Position = vec4(pos * 2. - 1., 0., 1.); fragBorderRadius = 1. - 2. * borderSize / (size + borderSize); fragColor = color; fragBorderColor = borderColor.a == 0. || borderSize == 0. ? vec4(color.rgb, 0.) : borderColor; fragWidth = 1. / gl_PointSize; } `]),w&&(ce.frag=ce.frag.replace("smoothstep","smoothStep"),le.frag=le.frag.replace("smoothstep","smoothStep")),this.drawCircle=y(ce)}b.defaults={color:"black",borderColor:"transparent",borderSize:0,size:12,opacity:1,marker:void 0,viewport:null,range:null,pixelSize:null,count:0,offset:0,bounds:null,positions:[],snap:1e4},b.prototype.render=function(){return arguments.length&&this.update.apply(this,arguments),this.draw(),this},b.prototype.draw=function(){for(var y=this,m=arguments.length,R=new Array(m),L=0;Lue)?qe.tree=f(tt,{bounds:Ke}):ue&&ue.length&&(qe.tree=ue),qe.tree){var Mt={primitive:"points",usage:"static",data:qe.tree,type:"uint32"};qe.elements?qe.elements(Mt):qe.elements=N.elements(Mt)}var kt=A.float32(tt);ne({data:kt,usage:"dynamic"});var Nt=A.fract32(tt,kt);return Ce({data:Nt,usage:"dynamic"}),Ye({data:new Uint8Array(rt),type:"uint8",usage:"stream"}),tt}},{marker:function(tt,qe,he){var ue=qe.activation;if(ue.forEach(function(Nt){return Nt&&Nt.destroy&&Nt.destroy()}),ue.length=0,!tt||typeof tt[0]=="number"){var ne=y.addMarker(tt);ue[ne]=!0}else{for(var Ce=[],Ye=0,rt=Math.min(tt.length,qe.count);Ye=0)return z;var F;if(y instanceof Uint8Array||y instanceof Uint8ClampedArray)F=y;else{F=new Uint8Array(y.length);for(var N=0,O=y.length;NL*4&&(this.tooManyColors=!0),this.updatePalette(R),z.length===1?z[0]:z},b.prototype.updatePalette=function(y){if(!this.tooManyColors){var m=this.maxColors,R=this.paletteTexture,L=Math.ceil(y.length*.25/m);if(L>1){y=y.slice();for(var z=y.length*.25%m;z80*P){le=de=N[0],ce=G=N[1];for(var se=P;sede&&(de=Y),ee>G&&(G=ee);q=Math.max(de-le,G-ce),q=q!==0?32767/q:0}return E(X,$,P,le,ce,q,0),$}function x(N,O,P,U,B){var X,$;if(B===F(N,O,P,U)>0)for(X=O;X=O;X-=U)$=R(X,N[X],N[X+1],$);return $&&A($,$.next)&&(L($),$=$.next),$}function S(N,O){if(!N)return N;O||(O=N);var P=N,U;do if(U=!1,!P.steiner&&(A(P,P.next)||w(P.prev,P,P.next)===0)){if(L(P),P=O=P.prev,P===P.next)break;U=!0}else P=P.next;while(U||P!==O);return O}function E(N,O,P,U,B,X,$){if(N){!$&&X&&f(N,U,B,X);for(var le=N,ce,de;N.prev!==N.next;){if(ce=N.prev,de=N.next,X?t(N,U,B,X):e(N)){O.push(ce.i/P|0),O.push(N.i/P|0),O.push(de.i/P|0),L(N),N=de.next,le=de.next;continue}if(N=de,N===le){$?$===1?(N=r(S(N),O,P),E(N,O,P,U,B,X,2)):$===2&&o(N,O,P,U,B,X):E(S(N),O,P,U,B,X,1);break}}}}function e(N){var O=N.prev,P=N,U=N.next;if(w(O,P,U)>=0)return!1;for(var B=O.x,X=P.x,$=U.x,le=O.y,ce=P.y,de=U.y,G=BX?B>$?B:$:X>$?X:$,q=le>ce?le>de?le:de:ce>de?ce:de,se=U.next;se!==O;){if(se.x>=G&&se.x<=ee&&se.y>=Y&&se.y<=q&&l(B,le,X,ce,$,de,se.x,se.y)&&w(se.prev,se,se.next)>=0)return!1;se=se.next}return!0}function t(N,O,P,U){var B=N.prev,X=N,$=N.next;if(w(B,X,$)>=0)return!1;for(var le=B.x,ce=X.x,de=$.x,G=B.y,Y=X.y,ee=$.y,q=lece?le>de?le:de:ce>de?ce:de,j=G>Y?G>ee?G:ee:Y>ee?Y:ee,Q=c(q,se,O,P,U),re=c(ae,j,O,P,U),pe=N.prevZ,we=N.nextZ;pe&&pe.z>=Q&&we&&we.z<=re;){if(pe.x>=q&&pe.x<=ae&&pe.y>=se&&pe.y<=j&&pe!==B&&pe!==$&&l(le,G,ce,Y,de,ee,pe.x,pe.y)&&w(pe.prev,pe,pe.next)>=0||(pe=pe.prevZ,we.x>=q&&we.x<=ae&&we.y>=se&&we.y<=j&&we!==B&&we!==$&&l(le,G,ce,Y,de,ee,we.x,we.y)&&w(we.prev,we,we.next)>=0))return!1;we=we.nextZ}for(;pe&&pe.z>=Q;){if(pe.x>=q&&pe.x<=ae&&pe.y>=se&&pe.y<=j&&pe!==B&&pe!==$&&l(le,G,ce,Y,de,ee,pe.x,pe.y)&&w(pe.prev,pe,pe.next)>=0)return!1;pe=pe.prevZ}for(;we&&we.z<=re;){if(we.x>=q&&we.x<=ae&&we.y>=se&&we.y<=j&&we!==B&&we!==$&&l(le,G,ce,Y,de,ee,we.x,we.y)&&w(we.prev,we,we.next)>=0)return!1;we=we.nextZ}return!0}function r(N,O,P){var U=N;do{var B=U.prev,X=U.next.next;!A(B,X)&&M(B,U,U.next,X)&&u(B,X)&&u(X,B)&&(O.push(B.i/P|0),O.push(U.i/P|0),O.push(X.i/P|0),L(U),L(U.next),U=N=X),U=U.next}while(U!==N);return S(U)}function o(N,O,P,U,B,X){var $=N;do{for(var le=$.next.next;le!==$.prev;){if($.i!==le.i&&_($,le)){var ce=m($,le);$=S($,$.next),ce=S(ce,ce.next),E($,O,P,U,B,X,0),E(ce,O,P,U,B,X,0);return}le=le.next}$=$.next}while($!==N)}function a(N,O,P,U){var B=[],X,$,le,ce,de;for(X=0,$=O.length;X<$;X++)le=O[X]*U,ce=X<$-1?O[X+1]*U:N.length,de=x(N,le,ce,U,!1),de===de.next&&(de.steiner=!0),B.push(T(de));for(B.sort(n),X=0;X=P.next.y&&P.next.y!==P.y){var le=P.x+(B-P.y)*(P.next.x-P.x)/(P.next.y-P.y);if(le<=U&&le>X&&(X=le,$=P.x=P.x&&P.x>=de&&U!==P.x&&l(B$.x||P.x===$.x&&h($,P)))&&($=P,Y=ee)),P=P.next;while(P!==ce);return $}function h(N,O){return w(N.prev,N,O.prev)<0&&w(O.next,N,N.next)<0}function f(N,O,P,U){var B=N;do B.z===0&&(B.z=c(B.x,B.y,O,P,U)),B.prevZ=B.prev,B.nextZ=B.next,B=B.next;while(B!==N);B.prevZ.nextZ=null,B.prevZ=null,v(B)}function v(N){var O,P,U,B,X,$,le,ce,de=1;do{for(P=N,N=null,X=null,$=0;P;){for($++,U=P,le=0,O=0;O0||ce>0&&U;)le!==0&&(ce===0||!U||P.z<=U.z)?(B=P,P=P.nextZ,le--):(B=U,U=U.nextZ,ce--),X?X.nextZ=B:N=B,B.prevZ=X,X=B;P=U}X.nextZ=null,de*=2}while($>1);return N}function c(N,O,P,U,B){return N=(N-P)*B|0,O=(O-U)*B|0,N=(N|N<<8)&16711935,N=(N|N<<4)&252645135,N=(N|N<<2)&858993459,N=(N|N<<1)&1431655765,O=(O|O<<8)&16711935,O=(O|O<<4)&252645135,O=(O|O<<2)&858993459,O=(O|O<<1)&1431655765,N|O<<1}function T(N){var O=N,P=N;do(O.x=(N-$)*(X-le)&&(N-$)*(U-le)>=(P-$)*(O-le)&&(P-$)*(X-le)>=(B-$)*(U-le)}function _(N,O){return N.next.i!==O.i&&N.prev.i!==O.i&&!p(N,O)&&(u(N,O)&&u(O,N)&&y(N,O)&&(w(N.prev,N,O.prev)||w(N,O.prev,O))||A(N,O)&&w(N.prev,N,N.next)>0&&w(O.prev,O,O.next)>0)}function w(N,O,P){return(O.y-N.y)*(P.x-O.x)-(O.x-N.x)*(P.y-O.y)}function A(N,O){return N.x===O.x&&N.y===O.y}function M(N,O,P,U){var B=b(w(N,O,P)),X=b(w(N,O,U)),$=b(w(P,U,N)),le=b(w(P,U,O));return!!(B!==X&&$!==le||B===0&&g(N,P,O)||X===0&&g(N,U,O)||$===0&&g(P,N,U)||le===0&&g(P,O,U))}function g(N,O,P){return O.x<=Math.max(N.x,P.x)&&O.x>=Math.min(N.x,P.x)&&O.y<=Math.max(N.y,P.y)&&O.y>=Math.min(N.y,P.y)}function b(N){return N>0?1:N<0?-1:0}function p(N,O){var P=N;do{if(P.i!==N.i&&P.next.i!==N.i&&P.i!==O.i&&P.next.i!==O.i&&M(P,P.next,N,O))return!0;P=P.next}while(P!==N);return!1}function u(N,O){return w(N.prev,N,N.next)<0?w(N,O,N.next)>=0&&w(N,N.prev,O)>=0:w(N,O,N.prev)<0||w(N,N.next,O)<0}function y(N,O){var P=N,U=!1,B=(N.x+O.x)/2,X=(N.y+O.y)/2;do P.y>X!=P.next.y>X&&P.next.y!==P.y&&B<(P.next.x-P.x)*(X-P.y)/(P.next.y-P.y)+P.x&&(U=!U),P=P.next;while(P!==N);return U}function m(N,O){var P=new z(N.i,N.x,N.y),U=new z(O.i,O.x,O.y),B=N.next,X=O.prev;return N.next=O,O.prev=N,P.next=B,B.prev=P,U.next=P,P.prev=U,X.next=U,U.prev=X,U}function R(N,O,P,U){var B=new z(N,O,P);return U?(B.next=U.next,B.prev=U,U.next.prev=B,U.next=B):(B.prev=B,B.next=B),B}function L(N){N.next.prev=N.prev,N.prev.next=N.next,N.prevZ&&(N.prevZ.nextZ=N.nextZ),N.nextZ&&(N.nextZ.prevZ=N.prevZ)}function z(N,O,P){this.i=N,this.x=O,this.y=P,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}d.deviation=function(N,O,P,U){var B=O&&O.length,X=B?O[0]*P:N.length,$=Math.abs(F(N,0,X,P));if(B)for(var le=0,ce=O.length;le0&&(U+=N[B-1].length,P.holes.push(U))}return P}}}),mj=He({"node_modules/array-normalize/index.js"(Z,V){"use strict";var d=mg();V.exports=x;function x(S,E,e){if(!S||S.length==null)throw Error("Argument should be an array");E==null&&(E=1),e==null&&(e=d(S,E));for(var t=0;t-1}}}),JE=He({"node_modules/es5-ext/string/#/contains/index.js"(Z,V){"use strict";V.exports=Cj()()?String.prototype.contains:Lj()}}),am=He({"node_modules/d/index.js"(Z,V){"use strict";var d=_g(),x=YE(),S=_T(),E=KE(),e=JE(),t=V.exports=function(r,o){var a,n,i,s,h;return arguments.length<2||typeof r!="string"?(s=o,o=r,r=null):s=arguments[2],d(r)?(a=e.call(r,"c"),n=e.call(r,"e"),i=e.call(r,"w")):(a=i=!0,n=!1),h={value:o,configurable:a,enumerable:n,writable:i},s?S(E(s),h):h};t.gs=function(r,o,a){var n,i,s,h;return typeof r!="string"?(s=a,a=o,o=r,r=null):s=arguments[3],d(o)?x(o)?d(a)?x(a)||(s=a,a=void 0):a=void 0:(s=o,o=a=void 0):o=void 0,d(r)?(n=e.call(r,"c"),i=e.call(r,"e")):(n=!0,i=!1),h={get:o,set:a,configurable:n,enumerable:i},s?S(E(s),h):h}}}),bx=He({"node_modules/es5-ext/function/is-arguments.js"(Z,V){"use strict";var d=Object.prototype.toString,x=d.call(function(){return arguments}());V.exports=function(S){return d.call(S)===x}}}),wx=He({"node_modules/es5-ext/string/is-string.js"(Z,V){"use strict";var d=Object.prototype.toString,x=d.call("");V.exports=function(S){return typeof S=="string"||S&&typeof S=="object"&&(S instanceof String||d.call(S)===x)||!1}}}),Pj=He({"node_modules/ext/global-this/is-implemented.js"(Z,V){"use strict";V.exports=function(){return typeof globalThis!="object"||!globalThis?!1:globalThis.Array===Array}}}),Ij=He({"node_modules/ext/global-this/implementation.js"(Z,V){var d=function(){if(typeof self=="object"&&self)return self;if(typeof window=="object"&&window)return window;throw new Error("Unable to resolve global `this`")};V.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch{return d()}try{return __global__||d()}finally{delete Object.prototype.__global__}}()}}),Tx=He({"node_modules/ext/global-this/index.js"(Z,V){"use strict";V.exports=Pj()()?globalThis:Ij()}}),Rj=He({"node_modules/es6-symbol/is-implemented.js"(Z,V){"use strict";var d=Tx(),x={object:!0,symbol:!0};V.exports=function(){var S=d.Symbol,E;if(typeof S!="function")return!1;E=S("test symbol");try{String(E)}catch{return!1}return!(!x[typeof S.iterator]||!x[typeof S.toPrimitive]||!x[typeof S.toStringTag])}}}),Dj=He({"node_modules/es6-symbol/is-symbol.js"(Z,V){"use strict";V.exports=function(d){return d?typeof d=="symbol"?!0:!d.constructor||d.constructor.name!=="Symbol"?!1:d[d.constructor.toStringTag]==="Symbol":!1}}}),$E=He({"node_modules/es6-symbol/validate-symbol.js"(Z,V){"use strict";var d=Dj();V.exports=function(x){if(!d(x))throw new TypeError(x+" is not a symbol");return x}}}),zj=He({"node_modules/es6-symbol/lib/private/generate-name.js"(Z,V){"use strict";var d=am(),x=Object.create,S=Object.defineProperty,E=Object.prototype,e=x(null);V.exports=function(t){for(var r=0,o,a;e[t+(r||"")];)++r;return t+=r||"",e[t]=!0,o="@@"+t,S(E,o,d.gs(null,function(n){a||(a=!0,S(this,o,d(n)),a=!1)})),o}}}),Fj=He({"node_modules/es6-symbol/lib/private/setup/standard-symbols.js"(Z,V){"use strict";var d=am(),x=Tx().Symbol;V.exports=function(S){return Object.defineProperties(S,{hasInstance:d("",x&&x.hasInstance||S("hasInstance")),isConcatSpreadable:d("",x&&x.isConcatSpreadable||S("isConcatSpreadable")),iterator:d("",x&&x.iterator||S("iterator")),match:d("",x&&x.match||S("match")),replace:d("",x&&x.replace||S("replace")),search:d("",x&&x.search||S("search")),species:d("",x&&x.species||S("species")),split:d("",x&&x.split||S("split")),toPrimitive:d("",x&&x.toPrimitive||S("toPrimitive")),toStringTag:d("",x&&x.toStringTag||S("toStringTag")),unscopables:d("",x&&x.unscopables||S("unscopables"))})}}}),Oj=He({"node_modules/es6-symbol/lib/private/setup/symbol-registry.js"(Z,V){"use strict";var d=am(),x=$E(),S=Object.create(null);V.exports=function(E){return Object.defineProperties(E,{for:d(function(e){return S[e]?S[e]:S[e]=E(String(e))}),keyFor:d(function(e){var t;x(e);for(t in S)if(S[t]===e)return t})})}}}),Bj=He({"node_modules/es6-symbol/polyfill.js"(Z,V){"use strict";var d=am(),x=$E(),S=Tx().Symbol,E=zj(),e=Fj(),t=Oj(),r=Object.create,o=Object.defineProperties,a=Object.defineProperty,n,i,s;if(typeof S=="function")try{String(S()),s=!0}catch{}else S=null;i=function(f){if(this instanceof i)throw new TypeError("Symbol is not a constructor");return n(f)},V.exports=n=function h(f){var v;if(this instanceof h)throw new TypeError("Symbol is not a constructor");return s?S(f):(v=r(i.prototype),f=f===void 0?"":String(f),o(v,{__description__:d("",f),__name__:d("",E(f))}))},e(n),t(n),o(i.prototype,{constructor:d(n),toString:d("",function(){return this.__name__})}),o(n.prototype,{toString:d(function(){return"Symbol ("+x(this).__description__+")"}),valueOf:d(function(){return x(this)})}),a(n.prototype,n.toPrimitive,d("",function(){var h=x(this);return typeof h=="symbol"?h:h.toString()})),a(n.prototype,n.toStringTag,d("c","Symbol")),a(i.prototype,n.toStringTag,d("c",n.prototype[n.toStringTag])),a(i.prototype,n.toPrimitive,d("c",n.prototype[n.toPrimitive]))}}),x0=He({"node_modules/es6-symbol/index.js"(Z,V){"use strict";V.exports=Rj()()?Tx().Symbol:Bj()}}),Nj=He({"node_modules/es5-ext/array/#/clear.js"(Z,V){"use strict";var d=rm();V.exports=function(){return d(this).length=0,this}}}),L1=He({"node_modules/es5-ext/object/valid-callable.js"(Z,V){"use strict";V.exports=function(d){if(typeof d!="function")throw new TypeError(d+" is not a function");return d}}}),Uj=He({"node_modules/type/string/coerce.js"(Z,V){"use strict";var d=_g(),x=yT(),S=Object.prototype.toString;V.exports=function(E){if(!d(E))return null;if(x(E)){var e=E.toString;if(typeof e!="function"||e===S)return null}try{return""+E}catch{return null}}}}),jj=He({"node_modules/type/lib/safe-to-string.js"(Z,V){"use strict";V.exports=function(d){try{return d.toString()}catch{try{return String(d)}catch{return null}}}}}),qj=He({"node_modules/type/lib/to-short-string.js"(Z,V){"use strict";var d=jj(),x=/[\n\r\u2028\u2029]/g;V.exports=function(S){var E=d(S);return E===null?"":(E.length>100&&(E=E.slice(0,99)+"\u2026"),E=E.replace(x,function(e){switch(e){case` `:return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("Unexpected character")}}),E)}}}),QE=He({"node_modules/type/lib/resolve-exception.js"(Z,V){"use strict";var d=_g(),x=yT(),S=Uj(),E=qj(),e=function(t,r){return t.replace("%v",E(r))};V.exports=function(t,r,o){if(!x(o))throw new TypeError(e(r,t));if(!d(t)){if("default"in o)return o.default;if(o.isOptional)return null}var a=S(o.errorMessage);throw d(a)||(a=r),new TypeError(e(a,t))}}}),Vj=He({"node_modules/type/value/ensure.js"(Z,V){"use strict";var d=QE(),x=_g();V.exports=function(S){return x(S)?S:d(S,"Cannot use %v",arguments[1])}}}),Gj=He({"node_modules/type/plain-function/ensure.js"(Z,V){"use strict";var d=QE(),x=YE();V.exports=function(S){return x(S)?S:d(S,"%v is not a plain function",arguments[1])}}}),Hj=He({"node_modules/es5-ext/array/from/is-implemented.js"(Z,V){"use strict";V.exports=function(){var d=Array.from,x,S;return typeof d!="function"?!1:(x=["raz","dwa"],S=d(x),!!(S&&S!==x&&S[1]==="dwa"))}}}),Wj=He({"node_modules/es5-ext/function/is-function.js"(Z,V){"use strict";var d=Object.prototype.toString,x=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);V.exports=function(S){return typeof S=="function"&&x(d.call(S))}}}),Xj=He({"node_modules/es5-ext/math/sign/is-implemented.js"(Z,V){"use strict";V.exports=function(){var d=Math.sign;return typeof d!="function"?!1:d(10)===1&&d(-20)===-1}}}),Zj=He({"node_modules/es5-ext/math/sign/shim.js"(Z,V){"use strict";V.exports=function(d){return d=Number(d),isNaN(d)||d===0?d:d>0?1:-1}}}),Yj=He({"node_modules/es5-ext/math/sign/index.js"(Z,V){"use strict";V.exports=Xj()()?Math.sign:Zj()}}),Kj=He({"node_modules/es5-ext/number/to-integer.js"(Z,V){"use strict";var d=Yj(),x=Math.abs,S=Math.floor;V.exports=function(E){return isNaN(E)?0:(E=Number(E),E===0||!isFinite(E)?E:d(E)*S(x(E)))}}}),Jj=He({"node_modules/es5-ext/number/to-pos-integer.js"(Z,V){"use strict";var d=Kj(),x=Math.max;V.exports=function(S){return x(0,d(S))}}}),$j=He({"node_modules/es5-ext/array/from/shim.js"(Z,V){"use strict";var d=x0().iterator,x=bx(),S=Wj(),E=Jj(),e=L1(),t=rm(),r=_0(),o=wx(),a=Array.isArray,n=Function.prototype.call,i={configurable:!0,enumerable:!0,writable:!0,value:null},s=Object.defineProperty;V.exports=function(h){var f=arguments[1],v=arguments[2],c,T,l,_,w,A,M,g,b,p;if(h=Object(t(h)),r(f)&&e(f),!this||this===Array||!S(this)){if(!f){if(x(h))return w=h.length,w!==1?Array.apply(null,h):(_=new Array(1),_[0]=h[0],_);if(a(h)){for(_=new Array(w=h.length),T=0;T=55296&&A<=56319&&(p+=h[++T])),p=f?n.call(f,v,p,l):p,c?(i.value=p,s(_,l,i)):_[l]=p,++l;w=l}}if(w===void 0)for(w=E(h.length),c&&(_=new c(w)),T=0;T=this.__nextIndex__)){if(++this.__nextIndex__,!this.__redo__){o(this,"__redo__",e("c",[i]));return}this.__redo__.forEach(function(s,h){s>=i&&(this.__redo__[h]=++s)},this),this.__redo__.push(i)}}),_onDelete:e(function(i){var s;i>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(s=this.__redo__.indexOf(i),s!==-1&&this.__redo__.splice(s,1),this.__redo__.forEach(function(h,f){h>i&&(this.__redo__[f]=--h)},this)))}),_onClear:e(function(){this.__redo__&&d.call(this.__redo__),this.__nextIndex__=0})}))),o(n.prototype,r.iterator,e(function(){return this}))}}),nq=He({"node_modules/es6-iterator/array.js"(Z,V){"use strict";var d=gT(),x=JE(),S=am(),E=x0(),e=e6(),t=Object.defineProperty,r;r=V.exports=function(o,a){if(!(this instanceof r))throw new TypeError("Constructor requires 'new'");e.call(this,o),a?x.call(a,"key+value")?a="key+value":x.call(a,"key")?a="key":a="value":a="value",t(this,"__kind__",S("",a))},d&&d(r,e),delete r.prototype.constructor,r.prototype=Object.create(e.prototype,{_resolve:S(function(o){return this.__kind__==="value"?this.__list__[o]:this.__kind__==="key+value"?[o,this.__list__[o]]:o})}),t(r.prototype,E.toStringTag,S("c","Array Iterator"))}}),oq=He({"node_modules/es6-iterator/string.js"(Z,V){"use strict";var d=gT(),x=am(),S=x0(),E=e6(),e=Object.defineProperty,t;t=V.exports=function(r){if(!(this instanceof t))throw new TypeError("Constructor requires 'new'");r=String(r),E.call(this,r),e(this,"__length__",x("",r.length))},d&&d(t,E),delete t.prototype.constructor,t.prototype=Object.create(E.prototype,{_next:x(function(){if(this.__list__){if(this.__nextIndex__=55296&&a<=56319?o+this.__list__[this.__nextIndex__++]:o)})}),e(t.prototype,S.toStringTag,x("c","String Iterator"))}}),sq=He({"node_modules/es6-iterator/is-iterable.js"(Z,V){"use strict";var d=bx(),x=_0(),S=wx(),E=x0().iterator,e=Array.isArray;V.exports=function(t){return x(t)?e(t)||S(t)||d(t)?!0:typeof t[E]=="function":!1}}}),lq=He({"node_modules/es6-iterator/valid-iterable.js"(Z,V){"use strict";var d=sq();V.exports=function(x){if(!d(x))throw new TypeError(x+" is not iterable");return x}}}),t6=He({"node_modules/es6-iterator/get.js"(Z,V){"use strict";var d=bx(),x=wx(),S=nq(),E=oq(),e=lq(),t=x0().iterator;V.exports=function(r){return typeof e(r)[t]=="function"?r[t]():d(r)?new S(r):x(r)?new E(r):new S(r)}}}),uq=He({"node_modules/es6-iterator/for-of.js"(Z,V){"use strict";var d=bx(),x=L1(),S=wx(),E=t6(),e=Array.isArray,t=Function.prototype.call,r=Array.prototype.some;V.exports=function(o,a){var n,i=arguments[2],s,h,f,v,c,T,l;if(e(o)||d(o)?n="array":S(o)?n="string":o=E(o),x(a),h=function(){f=!0},n==="array"){r.call(o,function(_){return t.call(a,i,_,h),f});return}if(n==="string"){for(c=o.length,v=0;v=55296&&l<=56319&&(T+=o[++v])),t.call(a,i,T,h),!f);++v);return}for(s=o.next();!s.done;){if(t.call(a,i,s.value,h),f)return;s=o.next()}}}}),cq=He({"node_modules/es6-weak-map/is-native-implemented.js"(Z,V){"use strict";V.exports=function(){return typeof WeakMap!="function"?!1:Object.prototype.toString.call(new WeakMap)==="[object WeakMap]"}()}}),fq=He({"node_modules/es6-weak-map/polyfill.js"(Z,V){"use strict";var d=_0(),x=gT(),S=xj(),E=rm(),e=bj(),t=am(),r=t6(),o=uq(),a=x0().toStringTag,n=cq(),i=Array.isArray,s=Object.defineProperty,h=Object.prototype.hasOwnProperty,f=Object.getPrototypeOf,v;V.exports=v=function(){var c=arguments[0],T;if(!(this instanceof v))throw new TypeError("Constructor requires 'new'");return T=n&&x&&WeakMap!==v?x(new WeakMap,f(this)):this,d(c)&&(i(c)||(c=r(c))),s(T,"__weakMapData__",t("c","$weakMap$"+e())),c&&o(c,function(l){E(l),T.set(l[0],l[1])}),T},n&&(x&&x(v,WeakMap),v.prototype=Object.create(WeakMap.prototype,{constructor:t(v)})),Object.defineProperties(v.prototype,{delete:t(function(c){return h.call(S(c),this.__weakMapData__)?(delete c[this.__weakMapData__],!0):!1}),get:t(function(c){if(h.call(S(c),this.__weakMapData__))return c[this.__weakMapData__]}),has:t(function(c){return h.call(S(c),this.__weakMapData__)}),set:t(function(c,T){return s(S(c),this.__weakMapData__,t("c",T)),this}),toString:t(function(){return"[object WeakMap]"})}),s(v.prototype,a,t("c","WeakMap"))}}),r6=He({"node_modules/es6-weak-map/index.js"(Z,V){"use strict";V.exports=gj()()?WeakMap:fq()}}),hq=He({"node_modules/array-find-index/index.js"(Z,V){"use strict";V.exports=function(d,x,S){if(typeof Array.prototype.findIndex=="function")return d.findIndex(x,S);if(typeof x!="function")throw new TypeError("predicate must be a function");var E=Object(d),e=E.length;if(e===0)return-1;for(var t=0;t 0. && baClipping < length(normalWidth * endBotJoin)) { //handle miter clipping bTopCoord -= normalWidth * endTopJoin; bTopCoord += normalize(endTopJoin * normalWidth) * baClipping; } if (nextReverse) { //make join rectangular vec2 miterShift = normalWidth * endJoinDirection * miterLimit * .5; float normalAdjust = 1. - min(miterLimit / endMiterRatio, 1.); bBotCoord = bCoord + miterShift - normalAdjust * normalWidth * currNormal * .5; bTopCoord = bCoord + miterShift + normalAdjust * normalWidth * currNormal * .5; } else if (!prevReverse && abClipping > 0. && abClipping < length(normalWidth * startBotJoin)) { //handle miter clipping aBotCoord -= normalWidth * startBotJoin; aBotCoord += normalize(startBotJoin * normalWidth) * abClipping; } vec2 aTopPosition = (aTopCoord) * adjustedScale + translate; vec2 aBotPosition = (aBotCoord) * adjustedScale + translate; vec2 bTopPosition = (bTopCoord) * adjustedScale + translate; vec2 bBotPosition = (bBotCoord) * adjustedScale + translate; //position is normalized 0..1 coord on the screen vec2 position = (aTopPosition * lineTop + aBotPosition * lineBot) * lineStart + (bTopPosition * lineTop + bBotPosition * lineBot) * lineEnd; startCoord = aCoord * scaleRatio + translate * viewport.zw + viewport.xy; endCoord = bCoord * scaleRatio + translate * viewport.zw + viewport.xy; gl_Position = vec4(position * 2.0 - 1.0, depth, 1); enableStartMiter = step(dot(currTangent, prevTangent), .5); enableEndMiter = step(dot(currTangent, nextTangent), .5); //bevel miter cutoffs if (miterMode == 1.) { if (enableStartMiter == 1.) { vec2 startMiterWidth = vec2(startJoinDirection) * thickness * miterLimit * .5; startCutoff = vec4(aCoord, aCoord); startCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio; startCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw; startCutoff += viewport.xyxy; startCutoff += startMiterWidth.xyxy; } if (enableEndMiter == 1.) { vec2 endMiterWidth = vec2(endJoinDirection) * thickness * miterLimit * .5; endCutoff = vec4(bCoord, bCoord); endCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x) / scaleRatio; endCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw; endCutoff += viewport.xyxy; endCutoff += endMiterWidth.xyxy; } } //round miter cutoffs else if (miterMode == 2.) { if (enableStartMiter == 1.) { vec2 startMiterWidth = vec2(startJoinDirection) * thickness * abs(dot(startJoinDirection, currNormal)) * .5; startCutoff = vec4(aCoord, aCoord); startCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio; startCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw; startCutoff += viewport.xyxy; startCutoff += startMiterWidth.xyxy; } if (enableEndMiter == 1.) { vec2 endMiterWidth = vec2(endJoinDirection) * thickness * abs(dot(endJoinDirection, currNormal)) * .5; endCutoff = vec4(bCoord, bCoord); endCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x) / scaleRatio; endCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw; endCutoff += viewport.xyxy; endCutoff += endMiterWidth.xyxy; } } } `,l=` precision highp float; uniform float dashLength, pixelRatio, thickness, opacity, id, miterMode; uniform sampler2D dashTexture; varying vec4 fragColor; varying vec2 tangent; varying vec4 startCutoff, endCutoff; varying vec2 startCoord, endCoord; varying float enableStartMiter, enableEndMiter; float distToLine(vec2 p, vec2 a, vec2 b) { vec2 diff = b - a; vec2 perp = normalize(vec2(-diff.y, diff.x)); return dot(p - a, perp); } void main() { float alpha = 1., distToStart, distToEnd; float cutoff = thickness * .5; //bevel miter if (miterMode == 1.) { if (enableStartMiter == 1.) { distToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw); if (distToStart < -1.) { discard; return; } alpha *= min(max(distToStart + 1., 0.), 1.); } if (enableEndMiter == 1.) { distToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw); if (distToEnd < -1.) { discard; return; } alpha *= min(max(distToEnd + 1., 0.), 1.); } } // round miter else if (miterMode == 2.) { if (enableStartMiter == 1.) { distToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw); if (distToStart < 0.) { float radius = length(gl_FragCoord.xy - startCoord); if(radius > cutoff + .5) { discard; return; } alpha -= smoothstep(cutoff - .5, cutoff + .5, radius); } } if (enableEndMiter == 1.) { distToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw); if (distToEnd < 0.) { float radius = length(gl_FragCoord.xy - endCoord); if(radius > cutoff + .5) { discard; return; } alpha -= smoothstep(cutoff - .5, cutoff + .5, radius); } } } float t = fract(dot(tangent, gl_FragCoord.xy) / dashLength) * .5 + .25; float dash = texture2D(dashTexture, vec2(t, .5)).r; gl_FragColor = fragColor; gl_FragColor.a *= alpha * opacity * dash; } `;V.exports=_;function _(w,A){if(!(this instanceof _))return new _(w,A);if(typeof w=="function"?(A||(A={}),A.regl=w):A=w,A.length&&(A.positions=A),w=A.regl,!w.hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");this.gl=w._gl,this.regl=w,this.passes=[],this.shaders=_.shaders.has(w)?_.shaders.get(w):_.shaders.set(w,_.createShaders(w)).get(w),this.update(A)}_.dashMult=2,_.maxPatternLength=256,_.precisionThreshold=3e6,_.maxPoints=1e4,_.maxLines=2048,_.shaders=new n,_.createShaders=function(w){let A=w.buffer({usage:"static",type:"float",data:[0,1,0,0,1,1,1,0]}),M={primitive:"triangle strip",instances:w.prop("count"),count:4,offset:0,uniforms:{miterMode:(u,y)=>y.join==="round"?2:1,miterLimit:w.prop("miterLimit"),scale:w.prop("scale"),scaleFract:w.prop("scaleFract"),translateFract:w.prop("translateFract"),translate:w.prop("translate"),thickness:w.prop("thickness"),dashTexture:w.prop("dashTexture"),opacity:w.prop("opacity"),pixelRatio:w.context("pixelRatio"),id:w.prop("id"),dashLength:w.prop("dashLength"),viewport:(u,y)=>[y.viewport.x,y.viewport.y,u.viewportWidth,u.viewportHeight],depth:w.prop("depth")},blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:(u,y)=>!y.overlay},stencil:{enable:!1},scissor:{enable:!0,box:w.prop("viewport")},viewport:w.prop("viewport")},g=w(S({vert:h,frag:f,attributes:{lineEnd:{buffer:A,divisor:0,stride:8,offset:0},lineTop:{buffer:A,divisor:0,stride:8,offset:4},aCoord:{buffer:w.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:w.prop("positionBuffer"),stride:8,offset:16,divisor:1},aCoordFract:{buffer:w.prop("positionFractBuffer"),stride:8,offset:8,divisor:1},bCoordFract:{buffer:w.prop("positionFractBuffer"),stride:8,offset:16,divisor:1},color:{buffer:w.prop("colorBuffer"),stride:4,offset:0,divisor:1}}},M)),b;try{b=w(S({cull:{enable:!0,face:"back"},vert:T,frag:l,attributes:{lineEnd:{buffer:A,divisor:0,stride:8,offset:0},lineTop:{buffer:A,divisor:0,stride:8,offset:4},aColor:{buffer:w.prop("colorBuffer"),stride:4,offset:0,divisor:1},bColor:{buffer:w.prop("colorBuffer"),stride:4,offset:4,divisor:1},prevCoord:{buffer:w.prop("positionBuffer"),stride:8,offset:0,divisor:1},aCoord:{buffer:w.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:w.prop("positionBuffer"),stride:8,offset:16,divisor:1},nextCoord:{buffer:w.prop("positionBuffer"),stride:8,offset:24,divisor:1}}},M))}catch{b=g}return{fill:w({primitive:"triangle",elements:(u,y)=>y.triangles,offset:0,vert:v,frag:c,uniforms:{scale:w.prop("scale"),color:w.prop("fill"),scaleFract:w.prop("scaleFract"),translateFract:w.prop("translateFract"),translate:w.prop("translate"),opacity:w.prop("opacity"),pixelRatio:w.context("pixelRatio"),id:w.prop("id"),viewport:(u,y)=>[y.viewport.x,y.viewport.y,u.viewportWidth,u.viewportHeight]},attributes:{position:{buffer:w.prop("positionBuffer"),stride:8,offset:8},positionFract:{buffer:w.prop("positionFractBuffer"),stride:8,offset:8}},blend:M.blend,depth:{enable:!1},scissor:M.scissor,stencil:M.stencil,viewport:M.viewport}),rect:g,miter:b}},_.defaults={dashes:null,join:"miter",miterLimit:1,thickness:10,cap:"square",color:"black",opacity:1,overlay:!1,viewport:null,range:null,close:!1,fill:null},_.prototype.render=function(...w){w.length&&this.update(...w),this.draw()},_.prototype.draw=function(...w){return(w.length?w:this.passes).forEach((A,M)=>{if(A&&Array.isArray(A))return this.draw(...A);typeof A=="number"&&(A=this.passes[A]),A&&A.count>1&&A.opacity&&(this.regl._refresh(),A.fill&&A.triangles&&A.triangles.length>2&&this.shaders.fill(A),A.thickness&&(A.scale[0]*A.viewport.width>_.precisionThreshold||A.scale[1]*A.viewport.height>_.precisionThreshold?this.shaders.rect(A):A.join==="rect"||!A.join&&(A.thickness<=2||A.count>=_.maxPoints)?this.shaders.rect(A):this.shaders.miter(A)))}),this},_.prototype.update=function(w){if(!w)return;w.length!=null?typeof w[0]=="number"&&(w=[{positions:w}]):Array.isArray(w)||(w=[w]);let{regl:A,gl:M}=this;if(w.forEach((b,p)=>{let u=this.passes[p];if(b!==void 0){if(b===null){this.passes[p]=null;return}if(typeof b[0]=="number"&&(b={positions:b}),b=E(b,{positions:"positions points data coords",thickness:"thickness lineWidth lineWidths line-width linewidth width stroke-width strokewidth strokeWidth",join:"lineJoin linejoin join type mode",miterLimit:"miterlimit miterLimit",dashes:"dash dashes dasharray dash-array dashArray",color:"color colour stroke colors colours stroke-color strokeColor",fill:"fill fill-color fillColor",opacity:"alpha opacity",overlay:"overlay crease overlap intersect",close:"closed close closed-path closePath",range:"range dataBox",viewport:"viewport viewBox",hole:"holes hole hollow",splitNull:"splitNull"}),u||(this.passes[p]=u={id:p,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:A.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:"linear",min:"linear"}),colorBuffer:A.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array}),positionBuffer:A.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),positionFractBuffer:A.buffer({usage:"dynamic",type:"float",data:new Uint8Array})},b=S({},_.defaults,b)),b.thickness!=null&&(u.thickness=parseFloat(b.thickness)),b.opacity!=null&&(u.opacity=parseFloat(b.opacity)),b.miterLimit!=null&&(u.miterLimit=parseFloat(b.miterLimit)),b.overlay!=null&&(u.overlay=!!b.overlay,p<_.maxLines&&(u.depth=2*(_.maxLines-1-p%_.maxLines)/_.maxLines-1)),b.join!=null&&(u.join=b.join),b.hole!=null&&(u.hole=b.hole),b.fill!=null&&(u.fill=b.fill?d(b.fill,"uint8"):null),b.viewport!=null&&(u.viewport=i(b.viewport)),u.viewport||(u.viewport=i([M.drawingBufferWidth,M.drawingBufferHeight])),b.close!=null&&(u.close=b.close),b.positions===null&&(b.positions=[]),b.positions){let R,L;if(b.positions.x&&b.positions.y){let O=b.positions.x,P=b.positions.y;L=u.count=Math.max(O.length,P.length),R=new Float64Array(L*2);for(let U=0;Uce-de),X=[],$=0,le=u.hole!=null?u.hole[0]:null;if(le!=null){let ce=s(B,de=>de>=le);B=B.slice(0,ce),B.push(le)}for(let ce=0;ceee-le+(B[ce]-$)),Y=t(de,G);Y=Y.map(ee=>ee+$+(ee+${w.colorBuffer.destroy(),w.positionBuffer.destroy(),w.dashTexture.destroy()}),this.passes.length=0,this}}}),pq=He({"node_modules/regl-error2d/index.js"(Z,V){"use strict";var d=mg(),x=d0(),S=GE(),E=Ev(),e=ch(),t=gg(),{float32:r,fract32:o}=mT();V.exports=n;var a=[[1,0,0,1,0,0],[1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,1,0,0],[1,0,0,1,0,0],[1,0,-1,0,0,1],[1,0,-1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,1],[1,0,-1,0,0,1],[-1,0,-1,0,0,1],[-1,0,-1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,1],[-1,0,-1,0,0,1],[0,1,1,0,0,0],[0,1,-1,0,0,0],[0,-1,-1,0,0,0],[0,-1,-1,0,0,0],[0,1,1,0,0,0],[0,-1,1,0,0,0],[0,1,0,-1,1,0],[0,1,0,-1,-1,0],[0,1,0,1,-1,0],[0,1,0,1,1,0],[0,1,0,-1,1,0],[0,1,0,1,-1,0],[0,-1,0,-1,1,0],[0,-1,0,-1,-1,0],[0,-1,0,1,-1,0],[0,-1,0,1,1,0],[0,-1,0,-1,1,0],[0,-1,0,1,-1,0]];function n(i,s){if(typeof i=="function"?(s||(s={}),s.regl=i):s=i,s.length&&(s.positions=s),i=s.regl,!i.hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");let h=i._gl,f,v,c,T,l,_,w={color:"black",capSize:5,lineWidth:1,opacity:1,viewport:null,range:null,offset:0,count:0,bounds:null,positions:[],errors:[]},A=[];return T=i.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array(0)}),v=i.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),c=i.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),l=i.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),_=i.buffer({usage:"static",type:"float",data:a}),p(s),f=i({vert:` precision highp float; attribute vec2 position, positionFract; attribute vec4 error; attribute vec4 color; attribute vec2 direction, lineOffset, capOffset; uniform vec4 viewport; uniform float lineWidth, capSize; uniform vec2 scale, scaleFract, translate, translateFract; varying vec4 fragColor; void main() { fragColor = color / 255.; vec2 pixelOffset = lineWidth * lineOffset + (capSize + lineWidth) * capOffset; vec2 dxy = -step(.5, direction.xy) * error.xz + step(direction.xy, vec2(-.5)) * error.yw; vec2 position = position + dxy; vec2 pos = (position + translate) * scale + (positionFract + translateFract) * scale + (position + translate) * scaleFract + (positionFract + translateFract) * scaleFract; pos += pixelOffset / viewport.zw; gl_Position = vec4(pos * 2. - 1., 0, 1); } `,frag:` precision highp float; varying vec4 fragColor; uniform float opacity; void main() { gl_FragColor = fragColor; gl_FragColor.a *= opacity; } `,uniforms:{range:i.prop("range"),lineWidth:i.prop("lineWidth"),capSize:i.prop("capSize"),opacity:i.prop("opacity"),scale:i.prop("scale"),translate:i.prop("translate"),scaleFract:i.prop("scaleFract"),translateFract:i.prop("translateFract"),viewport:(y,m)=>[m.viewport.x,m.viewport.y,y.viewportWidth,y.viewportHeight]},attributes:{color:{buffer:T,offset:(y,m)=>m.offset*4,divisor:1},position:{buffer:v,offset:(y,m)=>m.offset*8,divisor:1},positionFract:{buffer:c,offset:(y,m)=>m.offset*8,divisor:1},error:{buffer:l,offset:(y,m)=>m.offset*16,divisor:1},direction:{buffer:_,stride:24,offset:0},lineOffset:{buffer:_,stride:24,offset:8},capOffset:{buffer:_,stride:24,offset:16}},primitive:"triangles",blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:!1},scissor:{enable:!0,box:i.prop("viewport")},viewport:i.prop("viewport"),stencil:!1,instances:i.prop("count"),count:a.length}),e(M,{update:p,draw:g,destroy:u,regl:i,gl:h,canvas:h.canvas,groups:A}),M;function M(y){y?p(y):y===null&&u(),g()}function g(y){if(typeof y=="number")return b(y);y&&!Array.isArray(y)&&(y=[y]),i._refresh(),A.forEach((m,R)=>{if(m){if(y&&(y[R]?m.draw=!0:m.draw=!1),!m.draw){m.draw=!0;return}b(R)}})}function b(y){typeof y=="number"&&(y=A[y]),y!=null&&y&&y.count&&y.color&&y.opacity&&y.positions&&y.positions.length>1&&(y.scaleRatio=[y.scale[0]*y.viewport.width,y.scale[1]*y.viewport.height],f(y),y.after&&y.after(y))}function p(y){if(!y)return;y.length!=null?typeof y[0]=="number"&&(y=[{positions:y}]):Array.isArray(y)||(y=[y]);let m=0,R=0;if(M.groups=A=y.map((F,N)=>{let O=A[N];if(F)typeof F=="function"?F={after:F}:typeof F[0]=="number"&&(F={positions:F});else return O;return F=E(F,{color:"color colors fill",capSize:"capSize cap capsize cap-size",lineWidth:"lineWidth line-width width line thickness",opacity:"opacity alpha",range:"range dataBox",viewport:"viewport viewBox",errors:"errors error",positions:"positions position data points"}),O||(A[N]=O={id:N,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},F=e({},w,F)),S(O,F,[{lineWidth:P=>+P*.5,capSize:P=>+P*.5,opacity:parseFloat,errors:P=>(P=t(P),R+=P.length,P),positions:(P,U)=>(P=t(P,"float64"),U.count=Math.floor(P.length/2),U.bounds=d(P,2),U.offset=m,m+=U.count,P)},{color:(P,U)=>{let B=U.count;if(P||(P="transparent"),!Array.isArray(P)||typeof P[0]=="number"){let $=P;P=Array(B);for(let le=0;le{let X=U.bounds;return P||(P=X),U.scale=[1/(P[2]-P[0]),1/(P[3]-P[1])],U.translate=[-P[0],-P[1]],U.scaleFract=o(U.scale),U.translateFract=o(U.translate),P},viewport:P=>{let U;return Array.isArray(P)?U={x:P[0],y:P[1],width:P[2]-P[0],height:P[3]-P[1]}:P?(U={x:P.x||P.left||0,y:P.y||P.top||0},P.right?U.width=P.right-U.x:U.width=P.w||P.width||0,P.bottom?U.height=P.bottom-U.y:U.height=P.h||P.height||0):U={x:0,y:0,width:h.drawingBufferWidth,height:h.drawingBufferHeight},U}}]),O}),m||R){let F=A.reduce((U,B,X)=>U+(B?B.count:0),0),N=new Float64Array(F*2),O=new Uint8Array(F*4),P=new Float32Array(F*4);A.forEach((U,B)=>{if(!U)return;let{positions:X,count:$,offset:le,color:ce,errors:de}=U;$&&(O.set(ce,le*4),P.set(de,le*4),N.set(X,le*2))});var L=r(N);v(L);var z=o(N,L);c(z),T(O),l(P)}}function u(){v.destroy(),c.destroy(),T.destroy(),l.destroy(),_.destroy()}}}}),dq=He({"node_modules/unquote/index.js"(Z,V){var d=/[\'\"]/;V.exports=function(S){return S?(d.test(S.charAt(0))&&(S=S.substr(1)),d.test(S.charAt(S.length-1))&&(S=S.substr(0,S.length-1)),S):""}}}),i6=He({"node_modules/css-global-keywords/index.json"(Z,V){V.exports=["inherit","initial","unset"]}}),n6=He({"node_modules/css-system-font-keywords/index.json"(Z,V){V.exports=["caption","icon","menu","message-box","small-caption","status-bar"]}}),o6=He({"node_modules/css-font-weight-keywords/index.json"(Z,V){V.exports=["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]}}),s6=He({"node_modules/css-font-style-keywords/index.json"(Z,V){V.exports=["normal","italic","oblique"]}}),l6=He({"node_modules/css-font-stretch-keywords/index.json"(Z,V){V.exports=["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]}}),vq=He({"node_modules/parenthesis/index.js"(Z,V){"use strict";function d(E,e){if(typeof E!="string")return[E];var t=[E];typeof e=="string"||Array.isArray(e)?e={brackets:e}:e||(e={});var r=e.brackets?Array.isArray(e.brackets)?e.brackets:[e.brackets]:["{}","[]","()"],o=e.escape||"___",a=!!e.flat;r.forEach(function(s){var h=new RegExp(["\\",s[0],"[^\\",s[0],"\\",s[1],"]*\\",s[1]].join("")),f=[];function v(c,T,l){var _=t.push(c.slice(s[0].length,-s[1].length))-1;return f.push(_),o+_+o}t.forEach(function(c,T){for(var l,_=0;c!=l;)if(l=c,c=c.replace(h,v),_++>1e4)throw Error("References have circular dependency. Please, check them.");t[T]=c}),f=f.reverse(),t=t.map(function(c){return f.forEach(function(T){c=c.replace(new RegExp("(\\"+o+T+"\\"+o+")","g"),s[0]+"$1"+s[1])}),c})});var n=new RegExp("\\"+o+"([0-9]+)\\"+o);function i(s,h,f){for(var v=[],c,T=0;c=n.exec(s);){if(T++>1e4)throw Error("Circular references in parenthesis");v.push(s.slice(0,c.index)),v.push(i(h[c[1]],h)),s=s.slice(c.index+c[0].length)}return v.push(s),v}return a?t:i(t[0],t)}function x(E,e){if(e&&e.flat){var t=e&&e.escape||"___",r=E[0],o;if(!r)return"";for(var a=new RegExp("\\"+t+"([0-9]+)\\"+t),n=0;r!=o;){if(n++>1e4)throw Error("Circular references in "+E);o=r,r=r.replace(a,i)}return r}return E.reduce(function s(h,f){return Array.isArray(f)&&(f=f.reduce(s,"")),h+f},"");function i(s,h){if(E[h]==null)throw Error("Reference "+h+"is undefined");return E[h]}}function S(E,e){return Array.isArray(E)?x(E,e):d(E,e)}S.parse=d,S.stringify=x,V.exports=S}}),mq=He({"node_modules/string-split-by/index.js"(Z,V){"use strict";var d=vq();V.exports=function(S,E,e){if(S==null)throw Error("First argument should be a string");if(E==null)throw Error("Separator should be a string or a RegExp");e?(typeof e=="string"||Array.isArray(e))&&(e={ignore:e}):e={},e.escape==null&&(e.escape=!0),e.ignore==null?e.ignore=["[]","()","{}","<>",'""',"''","``","\u201C\u201D","\xAB\xBB"]:(typeof e.ignore=="string"&&(e.ignore=[e.ignore]),e.ignore=e.ignore.map(function(h){return h.length===1&&(h=h+h),h}));var t=d.parse(S,{flat:!0,brackets:e.ignore}),r=t[0],o=r.split(E);if(e.escape){for(var a=[],n=0;n1&&Zt===cr&&(Zt==='"'||Zt==="'"))return['"'+r(it.substr(1,it.length-2))+'"'];var oa=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(it);if(oa)return o(it.substr(0,oa.index)).concat(o(oa[1])).concat(o(it.substr(oa.index+oa[0].length)));var wa=it.split(".");if(wa.length===1)return['"'+r(it)+'"'];for(var va=[],ya=0;ya"u"?1:window.devicePixelRatio,si=!1,gn={},zi=function(ea){},Ei=function(){};if(typeof Zt=="string"?cr=document.querySelector(Zt):typeof Zt=="object"&&(_(Zt)?cr=Zt:w(Zt)?(va=Zt,wa=va.canvas):("gl"in Zt?va=Zt.gl:"canvas"in Zt?wa=M(Zt.canvas):"container"in Zt&&(oa=M(Zt.container)),"attributes"in Zt&&(ya=Zt.attributes),"extensions"in Zt&&(Ya=A(Zt.extensions)),"optionalExtensions"in Zt&&(bi=A(Zt.optionalExtensions)),"onDone"in Zt&&(zi=Zt.onDone),"profile"in Zt&&(si=!!Zt.profile),"pixelRatio"in Zt&&(yi=+Zt.pixelRatio),"cachedCode"in Zt&&(gn=Zt.cachedCode))),cr&&(cr.nodeName.toLowerCase()==="canvas"?wa=cr:oa=cr),!va){if(!wa){var Na=T(oa||document.body,zi,yi);if(!Na)return null;wa=Na.canvas,Ei=Na.onDestroy}ya.premultipliedAlpha===void 0&&(ya.premultipliedAlpha=!0),va=l(wa,ya)}return va?{gl:va,canvas:wa,container:oa,extensions:Ya,optionalExtensions:bi,pixelRatio:yi,profile:si,cachedCode:gn,onDone:zi,onDestroy:Ei}:(Ei(),zi("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function b(it,Zt){var cr={};function oa(ya){var Ya=ya.toLowerCase(),bi;try{bi=cr[Ya]=it.getExtension(Ya)}catch{}return!!bi}for(var wa=0;wa65535)<<4,it>>>=Zt,cr=(it>255)<<3,it>>>=cr,Zt|=cr,cr=(it>15)<<2,it>>>=cr,Zt|=cr,cr=(it>3)<<1,it>>>=cr,Zt|=cr,Zt|it>>1}function P(){var it=p(8,function(){return[]});function Zt(va){var ya=N(va),Ya=it[O(ya)>>2];return Ya.length>0?Ya.pop():new ArrayBuffer(ya)}function cr(va){it[O(va.byteLength)>>2].push(va)}function oa(va,ya){var Ya=null;switch(va){case u:Ya=new Int8Array(Zt(ya),0,ya);break;case y:Ya=new Uint8Array(Zt(ya),0,ya);break;case m:Ya=new Int16Array(Zt(2*ya),0,ya);break;case R:Ya=new Uint16Array(Zt(2*ya),0,ya);break;case L:Ya=new Int32Array(Zt(4*ya),0,ya);break;case z:Ya=new Uint32Array(Zt(4*ya),0,ya);break;case F:Ya=new Float32Array(Zt(4*ya),0,ya);break;default:return null}return Ya.length!==ya?Ya.subarray(0,ya):Ya}function wa(va){cr(va.buffer)}return{alloc:Zt,free:cr,allocType:oa,freeType:wa}}var U=P();U.zero=P();var B=3408,X=3410,$=3411,le=3412,ce=3413,de=3414,G=3415,Y=33901,ee=33902,q=3379,se=3386,ae=34921,j=36347,Q=36348,re=35661,pe=35660,we=34930,Se=36349,Ie=34076,Re=34024,We=7936,at=7937,nt=7938,tt=35724,qe=34047,he=36063,ue=34852,ne=3553,Ce=34067,Ye=34069,rt=33984,Ke=6408,Mt=5126,kt=5121,Nt=36160,Gt=36053,Mr=36064,mr=16384,qr=function(it,Zt){var cr=1;Zt.ext_texture_filter_anisotropic&&(cr=it.getParameter(qe));var oa=1,wa=1;Zt.webgl_draw_buffers&&(oa=it.getParameter(ue),wa=it.getParameter(he));var va=!!Zt.oes_texture_float;if(va){var ya=it.createTexture();it.bindTexture(ne,ya),it.texImage2D(ne,0,Ke,1,1,0,Ke,Mt,null);var Ya=it.createFramebuffer();if(it.bindFramebuffer(Nt,Ya),it.framebufferTexture2D(Nt,Mr,ne,ya,0),it.bindTexture(ne,null),it.checkFramebufferStatus(Nt)!==Gt)va=!1;else{it.viewport(0,0,1,1),it.clearColor(1,0,0,1),it.clear(mr);var bi=U.allocType(Mt,4);it.readPixels(0,0,1,1,Ke,Mt,bi),it.getError()?va=!1:(it.deleteFramebuffer(Ya),it.deleteTexture(ya),va=bi[0]===1),U.freeType(bi)}}var yi=typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),si=!0;if(!yi){var gn=it.createTexture(),zi=U.allocType(kt,36);it.activeTexture(rt),it.bindTexture(Ce,gn),it.texImage2D(Ye,0,Ke,3,3,0,Ke,kt,zi),U.freeType(zi),it.bindTexture(Ce,null),it.deleteTexture(gn),si=!it.getError()}return{colorBits:[it.getParameter(X),it.getParameter($),it.getParameter(le),it.getParameter(ce)],depthBits:it.getParameter(de),stencilBits:it.getParameter(G),subpixelBits:it.getParameter(B),extensions:Object.keys(Zt).filter(function(Ei){return!!Zt[Ei]}),maxAnisotropic:cr,maxDrawbuffers:oa,maxColorAttachments:wa,pointSizeDims:it.getParameter(Y),lineWidthDims:it.getParameter(ee),maxViewportDims:it.getParameter(se),maxCombinedTextureUnits:it.getParameter(re),maxCubeMapSize:it.getParameter(Ie),maxRenderbufferSize:it.getParameter(Re),maxTextureUnits:it.getParameter(we),maxTextureSize:it.getParameter(q),maxAttributes:it.getParameter(ae),maxVertexUniforms:it.getParameter(j),maxVertexTextureUnits:it.getParameter(pe),maxVaryingVectors:it.getParameter(Q),maxFragmentUniforms:it.getParameter(Se),glsl:it.getParameter(tt),renderer:it.getParameter(at),vendor:it.getParameter(We),version:it.getParameter(nt),readFloat:va,npotTextureCube:si}},Er=function(it){return it instanceof Uint8Array||it instanceof Uint16Array||it instanceof Uint32Array||it instanceof Int8Array||it instanceof Int16Array||it instanceof Int32Array||it instanceof Float32Array||it instanceof Float64Array||it instanceof Uint8ClampedArray};function Ir(it){return!!it&&typeof it=="object"&&Array.isArray(it.shape)&&Array.isArray(it.stride)&&typeof it.offset=="number"&&it.shape.length===it.stride.length&&(Array.isArray(it.data)||Er(it.data))}var _t=function(it){return Object.keys(it).map(function(Zt){return it[Zt]})},Oe={shape:st,flatten:Ze};function Je(it,Zt,cr){for(var oa=0;oa0){var hn;if(Array.isArray(Ma[0])){Li=Ca(Ma);for(var Ha=1,Ua=1;Ua0){if(typeof Ha[0]=="number"){var Ti=U.allocType(Va.dtype,Ha.length);Fr(Ti,Ha),Li(Ti,Yi),U.freeType(Ti)}else if(Array.isArray(Ha[0])||Er(Ha[0])){Ri=Ca(Ha);var xi=Wa(Ha,Ri,Va.dtype);Li(xi,Yi),U.freeType(xi)}}}else if(Ir(Ha)){Ri=Ha.shape;var Xi=Ha.stride,vn=0,Rn=0,Ii=0,nn=0;Ri.length===1?(vn=Ri[0],Rn=1,Ii=Xi[0],nn=0):Ri.length===2&&(vn=Ri[0],Rn=Ri[1],Ii=Xi[0],nn=Xi[1]);var En=Array.isArray(Ha.data)?Va.dtype:Jt(Ha.data),Dn=U.allocType(En,vn*Rn);ta(Dn,Ha.data,vn,Rn,Ii,nn,Ha.offset),Li(Dn,Yi),U.freeType(Dn)}return Bi}return Qa||Bi(ea),Bi._reglType="buffer",Bi._buffer=Va,Bi.subdata=hn,cr.profile&&(Bi.stats=Va.stats),Bi.destroy=function(){zi(Va)},Bi}function Na(){_t(va).forEach(function(ea){ea.buffer=it.createBuffer(),it.bindBuffer(ea.type,ea.buffer),it.bufferData(ea.type,ea.persistentData||ea.byteLength,ea.usage)})}return cr.profile&&(Zt.getTotalBufferSize=function(){var ea=0;return Object.keys(va).forEach(function(Ma){ea+=va[Ma].stats.size}),ea}),{create:Ei,createStream:bi,destroyStream:yi,clear:function(){_t(va).forEach(zi),Ya.forEach(zi)},getBuffer:function(ea){return ea&&ea._buffer instanceof ya?ea._buffer:null},restore:Na,_initBuffer:gn}}var ca=0,Ba=0,$a=1,Za=1,ri=4,pi=4,Ra={points:ca,point:Ba,lines:$a,line:Za,triangles:ri,triangle:pi,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},an=0,tn=1,fn=4,xt=5120,lt=5121,Br=5122,Cr=5123,xr=5124,Rr=5125,Ur=34963,Hr=35040,gt=35044;function Xt(it,Zt,cr,oa){var wa={},va=0,ya={uint8:lt,uint16:Cr};Zt.oes_element_index_uint&&(ya.uint32=Rr);function Ya(Na){this.id=va++,wa[this.id]=this,this.buffer=Na,this.primType=fn,this.vertCount=0,this.type=0}Ya.prototype.bind=function(){this.buffer.bind()};var bi=[];function yi(Na){var ea=bi.pop();return ea||(ea=new Ya(cr.create(null,Ur,!0,!1)._buffer)),gn(ea,Na,Hr,-1,-1,0,0),ea}function si(Na){bi.push(Na)}function gn(Na,ea,Ma,Qa,di,Va,Bi){Na.buffer.bind();var Li;if(ea){var hn=Bi;!Bi&&(!Er(ea)||Ir(ea)&&!Er(ea.data))&&(hn=Zt.oes_element_index_uint?Rr:Cr),cr._initBuffer(Na.buffer,ea,Ma,hn,3)}else it.bufferData(Ur,Va,Ma),Na.buffer.dtype=Li||lt,Na.buffer.usage=Ma,Na.buffer.dimension=3,Na.buffer.byteLength=Va;if(Li=Bi,!Bi){switch(Na.buffer.dtype){case lt:case xt:Li=lt;break;case Cr:case Br:Li=Cr;break;case Rr:case xr:Li=Rr;break;default:}Na.buffer.dtype=Li}Na.type=Li;var Ha=di;Ha<0&&(Ha=Na.buffer.byteLength,Li===Cr?Ha>>=1:Li===Rr&&(Ha>>=2)),Na.vertCount=Ha;var Ua=Qa;if(Qa<0){Ua=fn;var Yi=Na.buffer.dimension;Yi===1&&(Ua=an),Yi===2&&(Ua=tn),Yi===3&&(Ua=fn)}Na.primType=Ua}function zi(Na){oa.elementsCount--,delete wa[Na.id],Na.buffer.destroy(),Na.buffer=null}function Ei(Na,ea){var Ma=cr.create(null,Ur,!0),Qa=new Ya(Ma._buffer);oa.elementsCount++;function di(Va){if(!Va)Ma(),Qa.primType=fn,Qa.vertCount=0,Qa.type=lt;else if(typeof Va=="number")Ma(Va),Qa.primType=fn,Qa.vertCount=Va|0,Qa.type=lt;else{var Bi=null,Li=gt,hn=-1,Ha=-1,Ua=0,Yi=0;Array.isArray(Va)||Er(Va)||Ir(Va)?Bi=Va:("data"in Va&&(Bi=Va.data),"usage"in Va&&(Li=qa[Va.usage]),"primitive"in Va&&(hn=Ra[Va.primitive]),"count"in Va&&(Ha=Va.count|0),"type"in Va&&(Yi=ya[Va.type]),"length"in Va?Ua=Va.length|0:(Ua=Ha,Yi===Cr||Yi===Br?Ua*=2:(Yi===Rr||Yi===xr)&&(Ua*=4))),gn(Qa,Bi,Li,hn,Ha,Ua,Yi)}return di}return di(Na),di._reglType="elements",di._elements=Qa,di.subdata=function(Va,Bi){return Ma.subdata(Va,Bi),di},di.destroy=function(){zi(Qa)},di}return{create:Ei,createStream:yi,destroyStream:si,getElements:function(Na){return typeof Na=="function"&&Na._elements instanceof Ya?Na._elements:null},clear:function(){_t(wa).forEach(zi)}}}var vr=new Float32Array(1),Or=new Uint32Array(vr.buffer),ba=5123;function Pa(it){for(var Zt=U.allocType(ba,it.length),cr=0;cr>>31<<15,va=(oa<<1>>>24)-127,ya=oa>>13&1023;if(va<-24)Zt[cr]=wa;else if(va<-14){var Ya=-14-va;Zt[cr]=wa+(ya+1024>>Ya)}else va>15?Zt[cr]=wa+31744:Zt[cr]=wa+(va+15<<10)+ya}return Zt}function ma(it){return Array.isArray(it)||Er(it)}var la=34467,_a=3553,Ai=34067,ki=34069,Ki=6408,yn=6406,Ln=6407,kn=6409,Bn=6410,ao=32854,xo=32855,Co=36194,Fs=32819,Mn=32820,Ao=33635,On=34042,ts=6402,is=34041,_s=35904,Oo=35906,io=36193,Gn=33776,eo=33777,ns=33778,gs=33779,Ls=35986,Xo=35987,Gi=34798,Pn=35840,js=35841,xs=35842,Hn=35843,Os=36196,ds=5121,Xs=5123,il=5125,_n=5126,Lo=10242,bo=10243,Rs=10497,pu=33071,uo=33648,Gs=10240,vl=10241,As=9728,qs=9729,us=9984,Ss=9985,Nl=9986,su=9987,Tc=33170,du=4352,Sf=4353,Uc=4354,Bs=34046,dc=3317,Hc=37440,lu=37441,Pl=37443,ic=37444,Ou=33984,nl=[us,Nl,Ss,su],ml=[0,kn,Bn,Ln,Ki],bs={};bs[kn]=bs[yn]=bs[ts]=1,bs[is]=bs[Bn]=2,bs[Ln]=bs[_s]=3,bs[Ki]=bs[Oo]=4;function Zs(it){return"[object "+it+"]"}var nc=Zs("HTMLCanvasElement"),Ul=Zs("OffscreenCanvas"),qu=Zs("CanvasRenderingContext2D"),fl=Zs("ImageBitmap"),xh=Zs("HTMLImageElement"),ss=Zs("HTMLVideoElement"),bh=Object.keys(ut).concat([nc,Ul,qu,fl,xh,ss]),ks=[];ks[ds]=1,ks[_n]=4,ks[io]=2,ks[Xs]=2,ks[il]=4;var to=[];to[ao]=2,to[xo]=2,to[Co]=2,to[is]=4,to[Gn]=.5,to[eo]=.5,to[ns]=1,to[gs]=1,to[Ls]=.5,to[Xo]=1,to[Gi]=1,to[Pn]=.5,to[js]=.25,to[xs]=.5,to[Hn]=.25,to[Os]=.5;function Wc(it){return Array.isArray(it)&&(it.length===0||typeof it[0]=="number")}function Vu(it){if(!Array.isArray(it))return!1;var Zt=it.length;return!(Zt===0||!ma(it[0]))}function jl(it){return Object.prototype.toString.call(it)}function Mf(it){return jl(it)===nc}function Ac(it){return jl(it)===Ul}function nf(it){return jl(it)===qu}function $l(it){return jl(it)===fl}function Jf(it){return jl(it)===xh}function Of(it){return jl(it)===ss}function of(it){if(!it)return!1;var Zt=jl(it);return bh.indexOf(Zt)>=0?!0:Wc(it)||Vu(it)||Ir(it)}function jc(it){return ut[Object.prototype.toString.call(it)]|0}function Bf(it,Zt){var cr=Zt.length;switch(it.type){case ds:case Xs:case il:case _n:var oa=U.allocType(it.type,cr);oa.set(Zt),it.data=oa;break;case io:it.data=Pa(Zt);break;default:}}function Nf(it,Zt){return U.allocType(it.type===io?_n:it.type,Zt)}function Gu(it,Zt){it.type===io?(it.data=Pa(Zt),U.freeType(Zt)):it.data=Zt}function Ef(it,Zt,cr,oa,wa,va){for(var ya=it.width,Ya=it.height,bi=it.channels,yi=ya*Ya*bi,si=Nf(it,yi),gn=0,zi=0;zi=1;)Ya+=ya*bi*bi,bi/=2;return Ya}else return ya*cr*oa}function Xc(it,Zt,cr,oa,wa,va,ya){var Ya={"don't care":du,"dont care":du,nice:Uc,fast:Sf},bi={repeat:Rs,clamp:pu,mirror:uo},yi={nearest:As,linear:qs},si=d({mipmap:su,"nearest mipmap nearest":us,"linear mipmap nearest":Ss,"nearest mipmap linear":Nl,"linear mipmap linear":su},yi),gn={none:0,browser:ic},zi={uint8:ds,rgba4:Fs,rgb565:Ao,"rgb5 a1":Mn},Ei={alpha:yn,luminance:kn,"luminance alpha":Bn,rgb:Ln,rgba:Ki,rgba4:ao,"rgb5 a1":xo,rgb565:Co},Na={};Zt.ext_srgb&&(Ei.srgb=_s,Ei.srgba=Oo),Zt.oes_texture_float&&(zi.float32=zi.float=_n),Zt.oes_texture_half_float&&(zi.float16=zi["half float"]=io),Zt.webgl_depth_texture&&(d(Ei,{depth:ts,"depth stencil":is}),d(zi,{uint16:Xs,uint32:il,"depth stencil":On})),Zt.webgl_compressed_texture_s3tc&&d(Na,{"rgb s3tc dxt1":Gn,"rgba s3tc dxt1":eo,"rgba s3tc dxt3":ns,"rgba s3tc dxt5":gs}),Zt.webgl_compressed_texture_atc&&d(Na,{"rgb atc":Ls,"rgba atc explicit alpha":Xo,"rgba atc interpolated alpha":Gi}),Zt.webgl_compressed_texture_pvrtc&&d(Na,{"rgb pvrtc 4bppv1":Pn,"rgb pvrtc 2bppv1":js,"rgba pvrtc 4bppv1":xs,"rgba pvrtc 2bppv1":Hn}),Zt.webgl_compressed_texture_etc1&&(Na["rgb etc1"]=Os);var ea=Array.prototype.slice.call(it.getParameter(la));Object.keys(Na).forEach(function(ke){var Qe=Na[ke];ea.indexOf(Qe)>=0&&(Ei[ke]=Qe)});var Ma=Object.keys(Ei);cr.textureFormats=Ma;var Qa=[];Object.keys(Ei).forEach(function(ke){var Qe=Ei[ke];Qa[Qe]=ke});var di=[];Object.keys(zi).forEach(function(ke){var Qe=zi[ke];di[Qe]=ke});var Va=[];Object.keys(yi).forEach(function(ke){var Qe=yi[ke];Va[Qe]=ke});var Bi=[];Object.keys(si).forEach(function(ke){var Qe=si[ke];Bi[Qe]=ke});var Li=[];Object.keys(bi).forEach(function(ke){var Qe=bi[ke];Li[Qe]=ke});var hn=Ma.reduce(function(ke,Qe){var vt=Ei[Qe];return vt===kn||vt===yn||vt===kn||vt===Bn||vt===ts||vt===is||Zt.ext_srgb&&(vt===_s||vt===Oo)?ke[vt]=vt:vt===xo||Qe.indexOf("rgba")>=0?ke[vt]=Ki:ke[vt]=Ln,ke},{});function Ha(){this.internalformat=Ki,this.format=Ki,this.type=ds,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=ic,this.width=0,this.height=0,this.channels=0}function Ua(ke,Qe){ke.internalformat=Qe.internalformat,ke.format=Qe.format,ke.type=Qe.type,ke.compressed=Qe.compressed,ke.premultiplyAlpha=Qe.premultiplyAlpha,ke.flipY=Qe.flipY,ke.unpackAlignment=Qe.unpackAlignment,ke.colorSpace=Qe.colorSpace,ke.width=Qe.width,ke.height=Qe.height,ke.channels=Qe.channels}function Yi(ke,Qe){if(!(typeof Qe!="object"||!Qe)){if("premultiplyAlpha"in Qe&&(ke.premultiplyAlpha=Qe.premultiplyAlpha),"flipY"in Qe&&(ke.flipY=Qe.flipY),"alignment"in Qe&&(ke.unpackAlignment=Qe.alignment),"colorSpace"in Qe&&(ke.colorSpace=gn[Qe.colorSpace]),"type"in Qe){var vt=Qe.type;ke.type=zi[vt]}var qt=ke.width,wr=ke.height,Nr=ke.channels,pr=!1;"shape"in Qe?(qt=Qe.shape[0],wr=Qe.shape[1],Qe.shape.length===3&&(Nr=Qe.shape[2],pr=!0)):("radius"in Qe&&(qt=wr=Qe.radius),"width"in Qe&&(qt=Qe.width),"height"in Qe&&(wr=Qe.height),"channels"in Qe&&(Nr=Qe.channels,pr=!0)),ke.width=qt|0,ke.height=wr|0,ke.channels=Nr|0;var mt=!1;if("format"in Qe){var St=Qe.format,Ft=ke.internalformat=Ei[St];ke.format=hn[Ft],St in zi&&("type"in Qe||(ke.type=zi[St])),St in Na&&(ke.compressed=!0),mt=!0}!pr&&mt?ke.channels=bs[ke.format]:pr&&!mt&&ke.channels!==ml[ke.format]&&(ke.format=ke.internalformat=ml[ke.channels])}}function Ri(ke){it.pixelStorei(Hc,ke.flipY),it.pixelStorei(lu,ke.premultiplyAlpha),it.pixelStorei(Pl,ke.colorSpace),it.pixelStorei(dc,ke.unpackAlignment)}function Ti(){Ha.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function xi(ke,Qe){var vt=null;if(of(Qe)?vt=Qe:Qe&&(Yi(ke,Qe),"x"in Qe&&(ke.xOffset=Qe.x|0),"y"in Qe&&(ke.yOffset=Qe.y|0),of(Qe.data)&&(vt=Qe.data)),Qe.copy){var qt=wa.viewportWidth,wr=wa.viewportHeight;ke.width=ke.width||qt-ke.xOffset,ke.height=ke.height||wr-ke.yOffset,ke.needsCopy=!0}else if(!vt)ke.width=ke.width||1,ke.height=ke.height||1,ke.channels=ke.channels||4;else if(Er(vt))ke.channels=ke.channels||4,ke.data=vt,!("type"in Qe)&&ke.type===ds&&(ke.type=jc(vt));else if(Wc(vt))ke.channels=ke.channels||4,Bf(ke,vt),ke.alignment=1,ke.needsFree=!0;else if(Ir(vt)){var Nr=vt.data;!Array.isArray(Nr)&&ke.type===ds&&(ke.type=jc(Nr));var pr=vt.shape,mt=vt.stride,St,Ft,rr,hr,nr,dr;pr.length===3?(rr=pr[2],dr=mt[2]):(rr=1,dr=1),St=pr[0],Ft=pr[1],hr=mt[0],nr=mt[1],ke.alignment=1,ke.width=St,ke.height=Ft,ke.channels=rr,ke.format=ke.internalformat=ml[rr],ke.needsFree=!0,Ef(ke,Nr,hr,nr,dr,vt.offset)}else if(Mf(vt)||Ac(vt)||nf(vt))Mf(vt)||Ac(vt)?ke.element=vt:ke.element=vt.canvas,ke.width=ke.element.width,ke.height=ke.element.height,ke.channels=4;else if($l(vt))ke.element=vt,ke.width=vt.width,ke.height=vt.height,ke.channels=4;else if(Jf(vt))ke.element=vt,ke.width=vt.naturalWidth,ke.height=vt.naturalHeight,ke.channels=4;else if(Of(vt))ke.element=vt,ke.width=vt.videoWidth,ke.height=vt.videoHeight,ke.channels=4;else if(Vu(vt)){var or=ke.width||vt[0].length,Wt=ke.height||vt.length,ir=ke.channels;ma(vt[0][0])?ir=ir||vt[0][0].length:ir=ir||1;for(var Vt=Oe.shape(vt),Dr=1,Jr=0;Jr>=wr,vt.height>>=wr,xi(vt,qt[wr]),ke.mipmask|=1<=0&&!("faces"in Qe)&&(ke.genMipmaps=!0)}if("mag"in Qe){var qt=Qe.mag;ke.magFilter=yi[qt]}var wr=ke.wrapS,Nr=ke.wrapT;if("wrap"in Qe){var pr=Qe.wrap;typeof pr=="string"?wr=Nr=bi[pr]:Array.isArray(pr)&&(wr=bi[pr[0]],Nr=bi[pr[1]])}else{if("wrapS"in Qe){var mt=Qe.wrapS;wr=bi[mt]}if("wrapT"in Qe){var St=Qe.wrapT;Nr=bi[St]}}if(ke.wrapS=wr,ke.wrapT=Nr,"anisotropic"in Qe){var Ft=Qe.anisotropic;ke.anisotropic=Qe.anisotropic}if("mipmap"in Qe){var rr=!1;switch(typeof Qe.mipmap){case"string":ke.mipmapHint=Ya[Qe.mipmap],ke.genMipmaps=!0,rr=!0;break;case"boolean":rr=ke.genMipmaps=Qe.mipmap;break;case"object":ke.genMipmaps=!1,rr=!0;break;default:}rr&&!("min"in Qe)&&(ke.minFilter=us)}}function kl(ke,Qe){it.texParameteri(Qe,vl,ke.minFilter),it.texParameteri(Qe,Gs,ke.magFilter),it.texParameteri(Qe,Lo,ke.wrapS),it.texParameteri(Qe,bo,ke.wrapT),Zt.ext_texture_filter_anisotropic&&it.texParameteri(Qe,Bs,ke.anisotropic),ke.genMipmaps&&(it.hint(Tc,ke.mipmapHint),it.generateMipmap(Qe))}var tu=0,Vs={},pl=cr.maxTextureUnits,wl=Array(pl).map(function(){return null});function Zn(ke){Ha.call(this),this.mipmask=0,this.internalformat=Ki,this.id=tu++,this.refCount=1,this.target=ke,this.texture=it.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new fs,ya.profile&&(this.stats={size:0})}function Cl(ke){it.activeTexture(Ou),it.bindTexture(ke.target,ke.texture)}function Po(){var ke=wl[0];ke?it.bindTexture(ke.target,ke.texture):it.bindTexture(_a,null)}function ge(ke){var Qe=ke.texture,vt=ke.unit,qt=ke.target;vt>=0&&(it.activeTexture(Ou+vt),it.bindTexture(qt,null),wl[vt]=null),it.deleteTexture(Qe),ke.texture=null,ke.params=null,ke.pixels=null,ke.refCount=0,delete Vs[ke.id],va.textureCount--}d(Zn.prototype,{bind:function(){var ke=this;ke.bindCount+=1;var Qe=ke.unit;if(Qe<0){for(var vt=0;vt0)continue;qt.unit=-1}wl[vt]=ke,Qe=vt;break}Qe>=pl,ya.profile&&va.maxTextureUnits>nr)-rr,dr.height=dr.height||(vt.height>>nr)-hr,Cl(vt),vn(dr,_a,rr,hr,nr),Po(),nn(dr),qt}function Nr(pr,mt){var St=pr|0,Ft=mt|0||St;if(St===vt.width&&Ft===vt.height)return qt;qt.width=vt.width=St,qt.height=vt.height=Ft,Cl(vt);for(var rr=0;vt.mipmask>>rr;++rr){var hr=St>>rr,nr=Ft>>rr;if(!hr||!nr)break;it.texImage2D(_a,rr,vt.format,hr,nr,0,vt.format,vt.type,null)}return Po(),ya.profile&&(vt.stats.size=oc(vt.internalformat,vt.type,St,Ft,!1,!1)),qt}return qt(ke,Qe),qt.subimage=wr,qt.resize=Nr,qt._reglType="texture2d",qt._texture=vt,ya.profile&&(qt.stats=vt.stats),qt.destroy=function(){vt.decRef()},qt}function xe(ke,Qe,vt,qt,wr,Nr){var pr=new Zn(Ai);Vs[pr.id]=pr,va.cubeCount++;var mt=new Array(6);function St(hr,nr,dr,or,Wt,ir){var Vt,Dr=pr.texInfo;for(fs.call(Dr),Vt=0;Vt<6;++Vt)mt[Vt]=ho();if(typeof hr=="number"||!hr){var Jr=hr|0||1;for(Vt=0;Vt<6;++Vt)Dn(mt[Vt],Jr,Jr)}else if(typeof hr=="object")if(nr)Xn(mt[0],hr),Xn(mt[1],nr),Xn(mt[2],dr),Xn(mt[3],or),Xn(mt[4],Wt),Xn(mt[5],ir);else if(Sl(Dr,hr),Yi(pr,hr),"faces"in hr){var ga=hr.faces;for(Vt=0;Vt<6;++Vt)Ua(mt[Vt],pr),Xn(mt[Vt],ga[Vt])}else for(Vt=0;Vt<6;++Vt)Xn(mt[Vt],hr);for(Ua(pr,mt[0]),Dr.genMipmaps?pr.mipmask=(mt[0].width<<1)-1:pr.mipmask=mt[0].mipmask,pr.internalformat=mt[0].internalformat,St.width=mt[0].width,St.height=mt[0].height,Cl(pr),Vt=0;Vt<6;++Vt)zs(mt[Vt],ki+Vt);for(kl(Dr,Ai),Po(),ya.profile&&(pr.stats.size=oc(pr.internalformat,pr.type,St.width,St.height,Dr.genMipmaps,!0)),St.format=Qa[pr.internalformat],St.type=di[pr.type],St.mag=Va[Dr.magFilter],St.min=Bi[Dr.minFilter],St.wrapS=Li[Dr.wrapS],St.wrapT=Li[Dr.wrapT],Vt=0;Vt<6;++Vt)Wl(mt[Vt]);return St}function Ft(hr,nr,dr,or,Wt){var ir=dr|0,Vt=or|0,Dr=Wt|0,Jr=Ii();return Ua(Jr,pr),Jr.width=0,Jr.height=0,xi(Jr,nr),Jr.width=Jr.width||(pr.width>>Dr)-ir,Jr.height=Jr.height||(pr.height>>Dr)-Vt,Cl(pr),vn(Jr,ki+hr,ir,Vt,Dr),Po(),nn(Jr),St}function rr(hr){var nr=hr|0;if(nr!==pr.width){St.width=pr.width=nr,St.height=pr.height=nr,Cl(pr);for(var dr=0;dr<6;++dr)for(var or=0;pr.mipmask>>or;++or)it.texImage2D(ki+dr,or,pr.format,nr>>or,nr>>or,0,pr.format,pr.type,null);return Po(),ya.profile&&(pr.stats.size=oc(pr.internalformat,pr.type,St.width,St.height,!1,!0)),St}}return St(ke,Qe,vt,qt,wr,Nr),St.subimage=Ft,St.resize=rr,St._reglType="textureCube",St._texture=pr,ya.profile&&(St.stats=pr.stats),St.destroy=function(){pr.decRef()},St}function te(){for(var ke=0;ke>qt,vt.height>>qt,0,vt.internalformat,vt.type,null);else for(var wr=0;wr<6;++wr)it.texImage2D(ki+wr,qt,vt.internalformat,vt.width>>qt,vt.height>>qt,0,vt.internalformat,vt.type,null);kl(vt.texInfo,vt.target)})}function je(){for(var ke=0;ke=0?Wl=!0:bi.indexOf(fs)>=0&&(Wl=!1))),("depthTexture"in Zn||"depthStencilTexture"in Zn)&&(wl=!!(Zn.depthTexture||Zn.depthStencilTexture)),"depth"in Zn&&(typeof Zn.depth=="boolean"?zs=Zn.depth:(tu=Zn.depth,bl=!1)),"stencil"in Zn&&(typeof Zn.stencil=="boolean"?bl=Zn.stencil:(Vs=Zn.stencil,zs=!1)),"depthStencil"in Zn&&(typeof Zn.depthStencil=="boolean"?zs=bl=Zn.depthStencil:(pl=Zn.depthStencil,zs=!1,bl=!1))}var Po=null,ge=null,K=null,xe=null;if(Array.isArray(ho))Po=ho.map(Na);else if(ho)Po=[Na(ho)];else for(Po=new Array(kl),En=0;En0&&(nn.depth=xi[0].depth,nn.stencil=xi[0].stencil,nn.depthStencil=xi[0].depthStencil),xi[Ii]?xi[Ii](nn):xi[Ii]=Ua(nn)}return d(Xi,{width:En,height:En,color:fs})}function vn(Rn){var Ii,nn=Rn|0;if(nn===Xi.width)return Xi;var En=Xi.color;for(Ii=0;Ii=En.byteLength?Dn.subdata(En):(Dn.destroy(),Ua.buffers[Rn]=null)),Ua.buffers[Rn]||(Dn=Ua.buffers[Rn]=wa.create(Ii,mf,!1,!0)),nn.buffer=wa.getBuffer(Dn),nn.size=nn.buffer.dimension|0,nn.normalized=!1,nn.type=nn.buffer.dtype,nn.offset=0,nn.stride=0,nn.divisor=0,nn.state=1,Xi[Rn]=1}else wa.getBuffer(Ii)?(nn.buffer=wa.getBuffer(Ii),nn.size=nn.buffer.dimension|0,nn.normalized=!1,nn.type=nn.buffer.dtype,nn.offset=0,nn.stride=0,nn.divisor=0,nn.state=1):wa.getBuffer(Ii.buffer)?(nn.buffer=wa.getBuffer(Ii.buffer),nn.size=(+Ii.size||nn.buffer.dimension)|0,nn.normalized=!!Ii.normalized||!1,"type"in Ii?nn.type=Ta[Ii.type]:nn.type=nn.buffer.dtype,nn.offset=(Ii.offset||0)|0,nn.stride=(Ii.stride||0)|0,nn.divisor=(Ii.divisor||0)|0,nn.state=1):"x"in Ii&&(nn.x=+Ii.x||0,nn.y=+Ii.y||0,nn.z=+Ii.z||0,nn.w=+Ii.w||0,nn.state=2)}for(var Xn=0;Xn1)for(var Ri=0;Riea&&(ea=Ma.stats.uniformsCount)}),ea},cr.getMaxAttributesCount=function(){var ea=0;return si.forEach(function(Ma){Ma.stats.attributesCount>ea&&(ea=Ma.stats.attributesCount)}),ea});function Na(){wa={},va={};for(var ea=0;ea16&&(cr=Pi(cr,it.length*8));for(var oa=Array(16),wa=Array(16),va=0;va<16;va++)oa[va]=cr[va]^909522486,wa[va]=cr[va]^1549556828;var ya=Pi(oa.concat(Pc(Zt)),512+Zt.length*8);return Qt(Pi(wa.concat(ya),768))}function xu(it){for(var Zt=Vf?"0123456789ABCDEF":"0123456789abcdef",cr="",oa,wa=0;wa>>4&15)+Zt.charAt(oa&15);return cr}function Lc(it){for(var Zt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",cr="",oa=it.length,wa=0;wait.length*8?cr+=Xu:cr+=Zt.charAt(va>>>6*(3-ya)&63);return cr}function Jc(it,Zt){var cr=Zt.length,oa=Array(),wa,va,ya,Ya,bi=Array(Math.ceil(it.length/2));for(wa=0;wa0;){for(Ya=Array(),ya=0,wa=0;wa0||va>0)&&(Ya[Ya.length]=va);oa[oa.length]=ya,bi=Ya}var yi="";for(wa=oa.length-1;wa>=0;wa--)yi+=Zt.charAt(oa[wa]);var si=Math.ceil(it.length*8/(Math.log(Zt.length)/Math.log(2)));for(wa=yi.length;wa>>6&31,128|oa&63):oa<=65535?Zt+=String.fromCharCode(224|oa>>>12&15,128|oa>>>6&63,128|oa&63):oa<=2097151&&(Zt+=String.fromCharCode(240|oa>>>18&7,128|oa>>>12&63,128|oa>>>6&63,128|oa&63));return Zt}function Pc(it){for(var Zt=Array(it.length>>2),cr=0;cr>5]|=(it.charCodeAt(cr/8)&255)<<24-cr%32;return Zt}function Qt(it){for(var Zt="",cr=0;cr>5]>>>24-cr%32&255);return Zt}function br(it,Zt){return it>>>Zt|it<<32-Zt}function aa(it,Zt){return it>>>Zt}function $r(it,Zt,cr){return it&Zt^~it&cr}function ka(it,Zt,cr){return it&Zt^it&cr^Zt&cr}function li(it){return br(it,2)^br(it,13)^br(it,22)}function Ci(it){return br(it,6)^br(it,11)^br(it,25)}function Hi(it){return br(it,7)^br(it,18)^aa(it,3)}function Qi(it){return br(it,17)^br(it,19)^aa(it,10)}var pn=new Array(1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998);function Pi(it,Zt){var cr=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),oa=new Array(64),wa,va,ya,Ya,bi,yi,si,gn,zi,Ei,Na,ea;for(it[Zt>>5]|=128<<24-Zt%32,it[(Zt+64>>9<<4)+15]=Zt,zi=0;zi>16)+(Zt>>16)+(cr>>16);return oa<<16|cr&65535}function Ni(it){return Array.prototype.slice.call(it)}function mi(it){return Ni(it).join("")}function Sn(it){var Zt=it&&it.cache,cr=0,oa=[],wa=[],va=[];function ya(Na,ea){var Ma=ea&&ea.stable;if(!Ma){for(var Qa=0;Qa0&&(Na.push(di,"="),Na.push.apply(Na,Ni(arguments)),Na.push(";")),di}return d(ea,{def:Qa,toString:function(){return mi([Ma.length>0?"var "+Ma.join(",")+";":"",mi(Na)])}})}function bi(){var Na=Ya(),ea=Ya(),Ma=Na.toString,Qa=ea.toString;function di(Va,Bi){ea(Va,Bi,"=",Na.def(Va,Bi),";")}return d(function(){Na.apply(Na,Ni(arguments))},{def:Na.def,entry:Na,exit:ea,save:di,set:function(Va,Bi,Li){di(Va,Bi),Na(Va,Bi,"=",Li,";")},toString:function(){return Ma()+Qa()}})}function yi(){var Na=mi(arguments),ea=bi(),Ma=bi(),Qa=ea.toString,di=Ma.toString;return d(ea,{then:function(){return ea.apply(ea,Ni(arguments)),this},else:function(){return Ma.apply(Ma,Ni(arguments)),this},toString:function(){var Va=di();return Va&&(Va="else{"+Va+"}"),mi(["if(",Na,"){",Qa(),"}",Va])}})}var si=Ya(),gn={};function zi(Na,ea){var Ma=[];function Qa(){var hn="a"+Ma.length;return Ma.push(hn),hn}ea=ea||0;for(var di=0;di":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},za={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Xa={cw:et,ccw:dt};function fi(it){return Array.isArray(it)||Er(it)||Ir(it)}function ni(it){return it.sort(function(Zt,cr){return Zt===Me?-1:cr===Me?1:Zt=1,oa>=2,Zt)}else if(cr===Ms){var wa=it.data;return new La(wa.thisDep,wa.contextDep,wa.propDep,Zt)}else{if(cr===rl)return new La(!1,!1,!1,Zt);if(cr===Ns){for(var va=!1,ya=!1,Ya=!1,bi=0;bi=1&&(ya=!0),si>=2&&(Ya=!0)}else yi.type===Ms&&(va=va||yi.data.thisDep,ya=ya||yi.data.contextDep,Ya=Ya||yi.data.propDep)}return new La(va,ya,Ya,Zt)}else return new La(cr===Ko,cr===go,cr===un,Zt)}}var In=new La(!1,!1,!1,function(){});function Kn(it,Zt,cr,oa,wa,va,ya,Ya,bi,yi,si,gn,zi,Ei,Na,ea){var Ma=yi.Record,Qa={add:32774,subtract:32778,"reverse subtract":32779};cr.ext_blend_minmax&&(Qa.min=yt,Qa.max=Tt);var di=cr.angle_instanced_arrays,Va=cr.webgl_draw_buffers,Bi=cr.oes_vertex_array_object,Li={dirty:!0,profile:ea.profile},hn={},Ha=[],Ua={},Yi={};function Ri(mt){return mt.replace(".","_")}function Ti(mt,St,Ft){var rr=Ri(mt);Ha.push(mt),hn[rr]=Li[rr]=!!Ft,Ua[rr]=St}function xi(mt,St,Ft){var rr=Ri(mt);Ha.push(mt),Array.isArray(Ft)?(Li[rr]=Ft.slice(),hn[rr]=Ft.slice()):Li[rr]=hn[rr]=Ft,Yi[rr]=St}function Xi(mt){return!!isNaN(mt)}Ti(el,ci),Ti(ws,Da),xi(Fl,"blendColor",[0,0,0,0]),xi(_l,"blendEquationSeparate",[Xr,Xr]),xi(ll,"blendFuncSeparate",[Gr,_r,Gr,_r]),Ti(jn,ji,!0),xi(Io,"depthFunc",xa),xi(Js,"depthRange",[0,1]),xi(Ds,"depthMask",!0),xi(uu,uu,[!0,!0,!0,!0]),Ti(Iu,Aa),xi(Zu,"cullFace",De),xi(Ic,Ic,dt),xi(bu,bu,1),Ti(Rc,An),xi(Au,"polygonOffset",[0,0]),Ti(yc,Yn),Ti(fo,Nn),xi(zo,"sampleCoverage",[1,!1]),Ti(Dc,Vi),xi(lc,"stencilMask",-1),xi(Yu,"stencilFunc",[tr,0,-1]),xi(Fe,"stencilOpSeparate",[me,zt,zt,zt]),xi(I,"stencilOpSeparate",[De,zt,zt,zt]),Ti(ie,on),xi(Te,"scissor",[0,0,it.drawingBufferWidth,it.drawingBufferHeight]),xi(Me,Me,[0,0,it.drawingBufferWidth,it.drawingBufferHeight]);var vn={gl:it,context:zi,strings:Zt,next:hn,current:Li,draw:gn,elements:va,buffer:wa,shader:si,attributes:yi.state,vao:yi,uniforms:bi,framebuffer:Ya,extensions:cr,timer:Ei,isBufferArgs:fi},Rn={primTypes:Ra,compareFuncs:Sa,blendFuncs:ti,blendEquations:Qa,stencilOps:za,glTypes:Ta,orientationType:Xa};Va&&(Rn.backBuffer=[De],Rn.drawBuffer=p(oa.maxDrawbuffers,function(mt){return mt===0?[0]:p(mt,function(St){return Ja+St})}));var Ii=0;function nn(){var mt=Sn({cache:Na}),St=mt.link,Ft=mt.global;mt.id=Ii++,mt.batchId="0";var rr=St(vn),hr=mt.shared={props:"a0"};Object.keys(vn).forEach(function(ir){hr[ir]=Ft.def(rr,".",ir)});var nr=mt.next={},dr=mt.current={};Object.keys(Yi).forEach(function(ir){Array.isArray(Li[ir])&&(nr[ir]=Ft.def(hr.next,".",ir),dr[ir]=Ft.def(hr.current,".",ir))});var or=mt.constants={};Object.keys(Rn).forEach(function(ir){or[ir]=Ft.def(JSON.stringify(Rn[ir]))}),mt.invoke=function(ir,Vt){switch(Vt.type){case Tn:var Dr=["this",hr.context,hr.props,mt.batchId];return ir.def(St(Vt.data),".call(",Dr.slice(0,Math.max(Vt.data.length+1,4)),")");case un:return ir.def(hr.props,Vt.data);case go:return ir.def(hr.context,Vt.data);case Ko:return ir.def("this",Vt.data);case Ms:return Vt.data.append(mt,ir),Vt.data.ref;case rl:return Vt.data.toString();case Ns:return Vt.data.map(function(Jr){return mt.invoke(ir,Jr)})}},mt.attribCache={};var Wt={};return mt.scopeAttrib=function(ir){var Vt=Zt.id(ir);if(Vt in Wt)return Wt[Vt];var Dr=yi.scope[Vt];Dr||(Dr=yi.scope[Vt]=new Ma);var Jr=Wt[Vt]=St(Dr);return Jr},mt}function En(mt){var St=mt.static,Ft=mt.dynamic,rr;if(ze in St){var hr=!!St[ze];rr=rn(function(dr,or){return hr}),rr.enable=hr}else if(ze in Ft){var nr=Ft[ze];rr=dn(nr,function(dr,or){return dr.invoke(or,nr)})}return rr}function Dn(mt,St){var Ft=mt.static,rr=mt.dynamic;if(ht in Ft){var hr=Ft[ht];return hr?(hr=Ya.getFramebuffer(hr),rn(function(dr,or){var Wt=dr.link(hr),ir=dr.shared;or.set(ir.framebuffer,".next",Wt);var Vt=ir.context;return or.set(Vt,"."+pt,Wt+".width"),or.set(Vt,"."+Et,Wt+".height"),Wt})):rn(function(dr,or){var Wt=dr.shared;or.set(Wt.framebuffer,".next","null");var ir=Wt.context;return or.set(ir,"."+pt,ir+"."+yr),or.set(ir,"."+Et,ir+"."+kr),"null"})}else if(ht in rr){var nr=rr[ht];return dn(nr,function(dr,or){var Wt=dr.invoke(or,nr),ir=dr.shared,Vt=ir.framebuffer,Dr=or.def(Vt,".getFramebuffer(",Wt,")");or.set(Vt,".next",Dr);var Jr=ir.context;return or.set(Jr,"."+pt,Dr+"?"+Dr+".width:"+Jr+"."+yr),or.set(Jr,"."+Et,Dr+"?"+Dr+".height:"+Jr+"."+kr),Dr})}else return null}function Xn(mt,St,Ft){var rr=mt.static,hr=mt.dynamic;function nr(Wt){if(Wt in rr){var ir=rr[Wt],Vt=!0,Dr=ir.x|0,Jr=ir.y|0,ga,vi;return"width"in ir?ga=ir.width|0:Vt=!1,"height"in ir?vi=ir.height|0:Vt=!1,new La(!Vt&&St&&St.thisDep,!Vt&&St&&St.contextDep,!Vt&&St&&St.propDep,function(Zi,Fi){var ui=Zi.shared.context,_i=ga;"width"in ir||(_i=Fi.def(ui,".",pt,"-",Dr));var Si=vi;return"height"in ir||(Si=Fi.def(ui,".",Et,"-",Jr)),[Dr,Jr,_i,Si]})}else if(Wt in hr){var Ga=hr[Wt],ai=dn(Ga,function(Zi,Fi){var ui=Zi.invoke(Fi,Ga),_i=Zi.shared.context,Si=Fi.def(ui,".x|0"),Ui=Fi.def(ui,".y|0"),cn=Fi.def('"width" in ',ui,"?",ui,".width|0:","(",_i,".",pt,"-",Si,")"),yo=Fi.def('"height" in ',ui,"?",ui,".height|0:","(",_i,".",Et,"-",Ui,")");return[Si,Ui,cn,yo]});return St&&(ai.thisDep=ai.thisDep||St.thisDep,ai.contextDep=ai.contextDep||St.contextDep,ai.propDep=ai.propDep||St.propDep),ai}else return St?new La(St.thisDep,St.contextDep,St.propDep,function(Zi,Fi){var ui=Zi.shared.context;return[0,0,Fi.def(ui,".",pt),Fi.def(ui,".",Et)]}):null}var dr=nr(Me);if(dr){var or=dr;dr=new La(dr.thisDep,dr.contextDep,dr.propDep,function(Wt,ir){var Vt=or.append(Wt,ir),Dr=Wt.shared.context;return ir.set(Dr,"."+bt,Vt[2]),ir.set(Dr,"."+Rt,Vt[3]),Vt})}return{viewport:dr,scissor_box:nr(Te)}}function zs(mt,St){var Ft=mt.static,rr=typeof Ft[Ot]=="string"&&typeof Ft[wt]=="string";if(rr){if(Object.keys(St.dynamic).length>0)return null;var hr=St.static,nr=Object.keys(hr);if(nr.length>0&&typeof hr[nr[0]]=="number"){for(var dr=[],or=0;or"+Si+"?"+Vt+".constant["+Si+"]:0;"}).join(""),"}}else{","if(",ga,"(",Vt,".buffer)){",Zi,"=",vi,".createStream(",Qr,",",Vt,".buffer);","}else{",Zi,"=",vi,".getBuffer(",Vt,".buffer);","}",Fi,'="type" in ',Vt,"?",Jr.glTypes,"[",Vt,".type]:",Zi,".dtype;",Ga.normalized,"=!!",Vt,".normalized;");function ui(_i){ir(Ga[_i],"=",Vt,".",_i,"|0;")}return ui("size"),ui("offset"),ui("stride"),ui("divisor"),ir("}}"),ir.exit("if(",Ga.isStream,"){",vi,".destroyStream(",Zi,");","}"),Ga}hr[nr]=dn(dr,or)}),hr}function kl(mt){var St=mt.static,Ft=mt.dynamic,rr={};return Object.keys(St).forEach(function(hr){var nr=St[hr];rr[hr]=rn(function(dr,or){return typeof nr=="number"||typeof nr=="boolean"?""+nr:dr.link(nr)})}),Object.keys(Ft).forEach(function(hr){var nr=Ft[hr];rr[hr]=dn(nr,function(dr,or){return dr.invoke(or,nr)})}),rr}function tu(mt,St,Ft,rr,hr){var nr=mt.static,dr=mt.dynamic,or=zs(mt,St),Wt=Dn(mt,hr),ir=Xn(mt,Wt,hr),Vt=ho(mt,hr),Dr=Wl(mt,hr),Jr=bl(mt,hr,or);function ga(ui){var _i=ir[ui];_i&&(Dr[ui]=_i)}ga(Me),ga(Ri(Te));var vi=Object.keys(Dr).length>0,Ga={framebuffer:Wt,draw:Vt,shader:Jr,state:Dr,dirty:vi,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(Ga.profile=En(mt,hr),Ga.uniforms=fs(Ft,hr),Ga.drawVAO=Ga.scopeVAO=Vt.vao,!Ga.drawVAO&&Jr.program&&!or&&cr.angle_instanced_arrays&&Vt.static.elements){var ai=!0,Zi=Jr.program.attributes.map(function(ui){var _i=St.static[ui];return ai=ai&&!!_i,_i});if(ai&&Zi.length>0){var Fi=yi.getVAO(yi.createVAO({attributes:Zi,elements:Vt.static.elements}));Ga.drawVAO=new La(null,null,null,function(ui,_i){return ui.link(Fi)}),Ga.useVAO=!0}}return or?Ga.useVAO=!0:Ga.attributes=Sl(St,hr),Ga.context=kl(rr,hr),Ga}function Vs(mt,St,Ft){var rr=mt.shared,hr=rr.context,nr=mt.scope();Object.keys(Ft).forEach(function(dr){St.save(hr,"."+dr);var or=Ft[dr],Wt=or.append(mt,St);Array.isArray(Wt)?nr(hr,".",dr,"=[",Wt.join(),"];"):nr(hr,".",dr,"=",Wt,";")}),St(nr)}function pl(mt,St,Ft,rr){var hr=mt.shared,nr=hr.gl,dr=hr.framebuffer,or;Va&&(or=St.def(hr.extensions,".webgl_draw_buffers"));var Wt=mt.constants,ir=Wt.drawBuffer,Vt=Wt.backBuffer,Dr;Ft?Dr=Ft.append(mt,St):Dr=St.def(dr,".next"),rr||St("if(",Dr,"!==",dr,".cur){"),St("if(",Dr,"){",nr,".bindFramebuffer(",pa,",",Dr,".framebuffer);"),Va&&St(or,".drawBuffersWEBGL(",ir,"[",Dr,".colorAttachments.length]);"),St("}else{",nr,".bindFramebuffer(",pa,",null);"),Va&&St(or,".drawBuffersWEBGL(",Vt,");"),St("}",dr,".cur=",Dr,";"),rr||St("}")}function wl(mt,St,Ft){var rr=mt.shared,hr=rr.gl,nr=mt.current,dr=mt.next,or=rr.current,Wt=rr.next,ir=mt.cond(or,".dirty");Ha.forEach(function(Vt){var Dr=Ri(Vt);if(!(Dr in Ft.state)){var Jr,ga;if(Dr in dr){Jr=dr[Dr],ga=nr[Dr];var vi=p(Li[Dr].length,function(ai){return ir.def(Jr,"[",ai,"]")});ir(mt.cond(vi.map(function(ai,Zi){return ai+"!=="+ga+"["+Zi+"]"}).join("||")).then(hr,".",Yi[Dr],"(",vi,");",vi.map(function(ai,Zi){return ga+"["+Zi+"]="+ai}).join(";"),";"))}else{Jr=ir.def(Wt,".",Dr);var Ga=mt.cond(Jr,"!==",or,".",Dr);ir(Ga),Dr in Ua?Ga(mt.cond(Jr).then(hr,".enable(",Ua[Dr],");").else(hr,".disable(",Ua[Dr],");"),or,".",Dr,"=",Jr,";"):Ga(hr,".",Yi[Dr],"(",Jr,");",or,".",Dr,"=",Jr,";")}}}),Object.keys(Ft.state).length===0&&ir(or,".dirty=false;"),St(ir)}function Zn(mt,St,Ft,rr){var hr=mt.shared,nr=mt.current,dr=hr.current,or=hr.gl,Wt;ni(Object.keys(Ft)).forEach(function(ir){var Vt=Ft[ir];if(!(rr&&!rr(Vt))){var Dr=Vt.append(mt,St);if(Ua[ir]){var Jr=Ua[ir];sn(Vt)?(Wt=mt.link(Dr,{stable:!0}),St(mt.cond(Wt).then(or,".enable(",Jr,");").else(or,".disable(",Jr,");")),St(dr,".",ir,"=",Wt,";")):(St(mt.cond(Dr).then(or,".enable(",Jr,");").else(or,".disable(",Jr,");")),St(dr,".",ir,"=",Dr,";"))}else if(ma(Dr)){var ga=nr[ir];St(or,".",Yi[ir],"(",Dr,");",Dr.map(function(vi,Ga){return ga+"["+Ga+"]="+vi}).join(";"),";")}else sn(Vt)?(Wt=mt.link(Dr,{stable:!0}),St(or,".",Yi[ir],"(",Wt,");",dr,".",ir,"=",Wt,";")):St(or,".",Yi[ir],"(",Dr,");",dr,".",ir,"=",Dr,";")}})}function Cl(mt,St){di&&(mt.instancing=St.def(mt.shared.extensions,".angle_instanced_arrays"))}function Po(mt,St,Ft,rr,hr){var nr=mt.shared,dr=mt.stats,or=nr.current,Wt=nr.timer,ir=Ft.profile;function Vt(){return typeof performance>"u"?"Date.now()":"performance.now()"}var Dr,Jr;function ga(ui){Dr=St.def(),ui(Dr,"=",Vt(),";"),typeof hr=="string"?ui(dr,".count+=",hr,";"):ui(dr,".count++;"),Ei&&(rr?(Jr=St.def(),ui(Jr,"=",Wt,".getNumPendingQueries();")):ui(Wt,".beginQuery(",dr,");"))}function vi(ui){ui(dr,".cpuTime+=",Vt(),"-",Dr,";"),Ei&&(rr?ui(Wt,".pushScopeStats(",Jr,",",Wt,".getNumPendingQueries(),",dr,");"):ui(Wt,".endQuery();"))}function Ga(ui){var _i=St.def(or,".profile");St(or,".profile=",ui,";"),St.exit(or,".profile=",_i,";")}var ai;if(ir){if(sn(ir)){ir.enable?(ga(St),vi(St.exit),Ga("true")):Ga("false");return}ai=ir.append(mt,St),Ga(ai)}else ai=St.def(or,".profile");var Zi=mt.block();ga(Zi),St("if(",ai,"){",Zi,"}");var Fi=mt.block();vi(Fi),St.exit("if(",ai,"){",Fi,"}")}function ge(mt,St,Ft,rr,hr){var nr=mt.shared;function dr(Wt){switch(Wt){case os:case ul:case Il:return 2;case So:case tl:case eu:return 3;case Zo:case Jo:case Ru:return 4;default:return 1}}function or(Wt,ir,Vt){var Dr=nr.gl,Jr=St.def(Wt,".location"),ga=St.def(nr.attributes,"[",Jr,"]"),vi=Vt.state,Ga=Vt.buffer,ai=[Vt.x,Vt.y,Vt.z,Vt.w],Zi=["buffer","normalized","offset","stride"];function Fi(){St("if(!",ga,".buffer){",Dr,".enableVertexAttribArray(",Jr,");}");var _i=Vt.type,Si;if(Vt.size?Si=St.def(Vt.size,"||",ir):Si=ir,St("if(",ga,".type!==",_i,"||",ga,".size!==",Si,"||",Zi.map(function(cn){return ga+"."+cn+"!=="+Vt[cn]}).join("||"),"){",Dr,".bindBuffer(",Qr,",",Ga,".buffer);",Dr,".vertexAttribPointer(",[Jr,Si,_i,Vt.normalized,Vt.stride,Vt.offset],");",ga,".type=",_i,";",ga,".size=",Si,";",Zi.map(function(cn){return ga+"."+cn+"="+Vt[cn]+";"}).join(""),"}"),di){var Ui=Vt.divisor;St("if(",ga,".divisor!==",Ui,"){",mt.instancing,".vertexAttribDivisorANGLE(",[Jr,Ui],");",ga,".divisor=",Ui,";}")}}function ui(){St("if(",ga,".buffer){",Dr,".disableVertexAttribArray(",Jr,");",ga,".buffer=null;","}if(",$n.map(function(_i,Si){return ga+"."+_i+"!=="+ai[Si]}).join("||"),"){",Dr,".vertexAttrib4f(",Jr,",",ai,");",$n.map(function(_i,Si){return ga+"."+_i+"="+ai[Si]+";"}).join(""),"}")}vi===Qn?Fi():vi===co?ui():(St("if(",vi,"===",Qn,"){"),Fi(),St("}else{"),ui(),St("}"))}rr.forEach(function(Wt){var ir=Wt.name,Vt=Ft.attributes[ir],Dr;if(Vt){if(!hr(Vt))return;Dr=Vt.append(mt,St)}else{if(!hr(In))return;var Jr=mt.scopeAttrib(ir);Dr={},Object.keys(new Ma).forEach(function(ga){Dr[ga]=St.def(Jr,".",ga)})}or(mt.link(Wt),dr(Wt.info.type),Dr)})}function K(mt,St,Ft,rr,hr,nr){for(var dr=mt.shared,or=dr.gl,Wt,ir=0;ir1){for(var Uo=[],Is=[],Fo=0;Fo>1)",Ga],");")}function Ui(){Ft(ai,".drawArraysInstancedANGLE(",[Jr,ga,vi,Ga],");")}Vt&&Vt!=="null"?Fi?Si():(Ft("if(",Vt,"){"),Si(),Ft("}else{"),Ui(),Ft("}")):Ui()}function _i(){function Si(){Ft(nr+".drawElements("+[Jr,vi,Zi,ga+"<<(("+Zi+"-"+no+")>>1)"]+");")}function Ui(){Ft(nr+".drawArrays("+[Jr,ga,vi]+");")}Vt&&Vt!=="null"?Fi?Si():(Ft("if(",Vt,"){"),Si(),Ft("}else{"),Ui(),Ft("}")):Ui()}di&&(typeof Ga!="number"||Ga>=0)?typeof Ga=="string"?(Ft("if(",Ga,">0){"),ui(),Ft("}else if(",Ga,"<0){"),_i(),Ft("}")):ui():_i()}function te(mt,St,Ft,rr,hr){var nr=nn(),dr=nr.proc("body",hr);return di&&(nr.instancing=dr.def(nr.shared.extensions,".angle_instanced_arrays")),mt(nr,dr,Ft,rr),nr.compile().body}function ye(mt,St,Ft,rr){Cl(mt,St),Ft.useVAO?Ft.drawVAO?St(mt.shared.vao,".setVAO(",Ft.drawVAO.append(mt,St),");"):St(mt.shared.vao,".setVAO(",mt.shared.vao,".targetVAO);"):(St(mt.shared.vao,".setVAO(null);"),ge(mt,St,Ft,rr.attributes,function(){return!0})),K(mt,St,Ft,rr.uniforms,function(){return!0},!1),xe(mt,St,St,Ft)}function je(mt,St){var Ft=mt.proc("draw",1);Cl(mt,Ft),Vs(mt,Ft,St.context),pl(mt,Ft,St.framebuffer),wl(mt,Ft,St),Zn(mt,Ft,St.state),Po(mt,Ft,St,!1,!0);var rr=St.shader.progVar.append(mt,Ft);if(Ft(mt.shared.gl,".useProgram(",rr,".program);"),St.shader.program)ye(mt,Ft,St,St.shader.program);else{Ft(mt.shared.vao,".setVAO(null);");var hr=mt.global.def("{}"),nr=Ft.def(rr,".id"),dr=Ft.def(hr,"[",nr,"]");Ft(mt.cond(dr).then(dr,".call(this,a0);").else(dr,"=",hr,"[",nr,"]=",mt.link(function(or){return te(ye,mt,St,or,1)}),"(",rr,");",dr,".call(this,a0);"))}Object.keys(St.state).length>0&&Ft(mt.shared.current,".dirty=true;"),mt.shared.vao&&Ft(mt.shared.vao,".setVAO(null);")}function ke(mt,St,Ft,rr){mt.batchId="a1",Cl(mt,St);function hr(){return!0}ge(mt,St,Ft,rr.attributes,hr),K(mt,St,Ft,rr.uniforms,hr,!1),xe(mt,St,St,Ft)}function Qe(mt,St,Ft,rr){Cl(mt,St);var hr=Ft.contextDep,nr=St.def(),dr="a0",or="a1",Wt=St.def();mt.shared.props=Wt,mt.batchId=nr;var ir=mt.scope(),Vt=mt.scope();St(ir.entry,"for(",nr,"=0;",nr,"<",or,";++",nr,"){",Wt,"=",dr,"[",nr,"];",Vt,"}",ir.exit);function Dr(Zi){return Zi.contextDep&&hr||Zi.propDep}function Jr(Zi){return!Dr(Zi)}if(Ft.needsContext&&Vs(mt,Vt,Ft.context),Ft.needsFramebuffer&&pl(mt,Vt,Ft.framebuffer),Zn(mt,Vt,Ft.state,Dr),Ft.profile&&Dr(Ft.profile)&&Po(mt,Vt,Ft,!1,!0),rr)Ft.useVAO?Ft.drawVAO?Dr(Ft.drawVAO)?Vt(mt.shared.vao,".setVAO(",Ft.drawVAO.append(mt,Vt),");"):ir(mt.shared.vao,".setVAO(",Ft.drawVAO.append(mt,ir),");"):ir(mt.shared.vao,".setVAO(",mt.shared.vao,".targetVAO);"):(ir(mt.shared.vao,".setVAO(null);"),ge(mt,ir,Ft,rr.attributes,Jr),ge(mt,Vt,Ft,rr.attributes,Dr)),K(mt,ir,Ft,rr.uniforms,Jr,!1),K(mt,Vt,Ft,rr.uniforms,Dr,!0),xe(mt,ir,Vt,Ft);else{var ga=mt.global.def("{}"),vi=Ft.shader.progVar.append(mt,Vt),Ga=Vt.def(vi,".id"),ai=Vt.def(ga,"[",Ga,"]");Vt(mt.shared.gl,".useProgram(",vi,".program);","if(!",ai,"){",ai,"=",ga,"[",Ga,"]=",mt.link(function(Zi){return te(ke,mt,Ft,Zi,2)}),"(",vi,");}",ai,".call(this,a0[",nr,"],",nr,");")}}function vt(mt,St){var Ft=mt.proc("batch",2);mt.batchId="0",Cl(mt,Ft);var rr=!1,hr=!0;Object.keys(St.context).forEach(function(ga){rr=rr||St.context[ga].propDep}),rr||(Vs(mt,Ft,St.context),hr=!1);var nr=St.framebuffer,dr=!1;nr?(nr.propDep?rr=dr=!0:nr.contextDep&&rr&&(dr=!0),dr||pl(mt,Ft,nr)):pl(mt,Ft,null),St.state.viewport&&St.state.viewport.propDep&&(rr=!0);function or(ga){return ga.contextDep&&rr||ga.propDep}wl(mt,Ft,St),Zn(mt,Ft,St.state,function(ga){return!or(ga)}),(!St.profile||!or(St.profile))&&Po(mt,Ft,St,!1,"a1"),St.contextDep=rr,St.needsContext=hr,St.needsFramebuffer=dr;var Wt=St.shader.progVar;if(Wt.contextDep&&rr||Wt.propDep)Qe(mt,Ft,St,null);else{var ir=Wt.append(mt,Ft);if(Ft(mt.shared.gl,".useProgram(",ir,".program);"),St.shader.program)Qe(mt,Ft,St,St.shader.program);else{Ft(mt.shared.vao,".setVAO(null);");var Vt=mt.global.def("{}"),Dr=Ft.def(ir,".id"),Jr=Ft.def(Vt,"[",Dr,"]");Ft(mt.cond(Jr).then(Jr,".call(this,a0,a1);").else(Jr,"=",Vt,"[",Dr,"]=",mt.link(function(ga){return te(Qe,mt,St,ga,2)}),"(",ir,");",Jr,".call(this,a0,a1);"))}}Object.keys(St.state).length>0&&Ft(mt.shared.current,".dirty=true;"),mt.shared.vao&&Ft(mt.shared.vao,".setVAO(null);")}function qt(mt,St){var Ft=mt.proc("scope",3);mt.batchId="a2";var rr=mt.shared,hr=rr.current;if(Vs(mt,Ft,St.context),St.framebuffer&&St.framebuffer.append(mt,Ft),ni(Object.keys(St.state)).forEach(function(or){var Wt=St.state[or],ir=Wt.append(mt,Ft);ma(ir)?ir.forEach(function(Vt,Dr){Xi(Vt)?Ft.set(mt.next[or],"["+Dr+"]",Vt):Ft.set(mt.next[or],"["+Dr+"]",mt.link(Vt,{stable:!0}))}):sn(Wt)?Ft.set(rr.next,"."+or,mt.link(ir,{stable:!0})):Ft.set(rr.next,"."+or,ir)}),Po(mt,Ft,St,!0,!0),[$t,Kr,Ar,na,Tr].forEach(function(or){var Wt=St.draw[or];if(Wt){var ir=Wt.append(mt,Ft);Xi(ir)?Ft.set(rr.draw,"."+or,ir):Ft.set(rr.draw,"."+or,mt.link(ir),{stable:!0})}}),Object.keys(St.uniforms).forEach(function(or){var Wt=St.uniforms[or].append(mt,Ft);Array.isArray(Wt)&&(Wt="["+Wt.map(function(ir){return Xi(ir)?ir:mt.link(ir,{stable:!0})})+"]"),Ft.set(rr.uniforms,"["+mt.link(Zt.id(or),{stable:!0})+"]",Wt)}),Object.keys(St.attributes).forEach(function(or){var Wt=St.attributes[or].append(mt,Ft),ir=mt.scopeAttrib(or);Object.keys(new Ma).forEach(function(Vt){Ft.set(ir,"."+Vt,Wt[Vt])})}),St.scopeVAO){var nr=St.scopeVAO.append(mt,Ft);Xi(nr)?Ft.set(rr.vao,".targetVAO",nr):Ft.set(rr.vao,".targetVAO",mt.link(nr,{stable:!0}))}function dr(or){var Wt=St.shader[or];if(Wt){var ir=Wt.append(mt,Ft);Xi(ir)?Ft.set(rr.shader,"."+or,ir):Ft.set(rr.shader,"."+or,mt.link(ir,{stable:!0}))}}dr(wt),dr(Ot),Object.keys(St.state).length>0&&(Ft(hr,".dirty=true;"),Ft.exit(hr,".dirty=true;")),Ft("a1(",mt.shared.context,",a0,",mt.batchId,");")}function wr(mt){if(!(typeof mt!="object"||ma(mt))){for(var St=Object.keys(mt),Ft=0;Ft=0;--te){var ye=vn[te];ye&&ye(Na,null,0)}cr.flush(),si&&si.update()}function Xn(){!En&&vn.length>0&&(En=f.next(Dn))}function zs(){En&&(f.cancel(Dn),En=null)}function bl(te){te.preventDefault(),wa=!0,zs(),Rn.forEach(function(ye){ye()})}function ho(te){cr.getError(),wa=!1,va.restore(),hn.restore(),di.restore(),Ha.restore(),Ua.restore(),Yi.restore(),Bi.restore(),si&&si.restore(),Ri.procs.refresh(),Xn(),Ii.forEach(function(ye){ye()})}Xi&&(Xi.addEventListener(cs,bl,!1),Xi.addEventListener(vs,ho,!1));function Wl(){vn.length=0,zs(),Xi&&(Xi.removeEventListener(cs,bl),Xi.removeEventListener(vs,ho)),hn.clear(),Yi.clear(),Ua.clear(),Bi.clear(),Ha.clear(),Va.clear(),di.clear(),si&&si.clear(),nn.forEach(function(te){te()})}function fs(te){function ye(nr){var dr=d({},nr);delete dr.uniforms,delete dr.attributes,delete dr.context,delete dr.vao,"stencil"in dr&&dr.stencil.op&&(dr.stencil.opBack=dr.stencil.opFront=dr.stencil.op,delete dr.stencil.op);function or(Wt){if(Wt in dr){var ir=dr[Wt];delete dr[Wt],Object.keys(ir).forEach(function(Vt){dr[Wt+"."+Vt]=ir[Vt]})}}return or("blend"),or("depth"),or("cull"),or("stencil"),or("polygonOffset"),or("scissor"),or("sample"),"vao"in nr&&(dr.vao=nr.vao),dr}function je(nr,dr){var or={},Wt={};return Object.keys(nr).forEach(function(ir){var Vt=nr[ir];if(h.isDynamic(Vt)){Wt[ir]=h.unbox(Vt,ir);return}else if(dr&&Array.isArray(Vt)){for(var Dr=0;Dr0)return mt.call(this,rr(nr|0),nr|0)}else if(Array.isArray(nr)){if(nr.length)return mt.call(this,nr,nr.length)}else return pr.call(this,nr)}return d(hr,{stats:wr,destroy:function(){Nr.destroy()}})}var Sl=Yi.setFBO=fs({framebuffer:h.define.call(null,Al,"framebuffer")});function kl(te,ye){var je=0;Ri.procs.poll();var ke=ye.color;ke&&(cr.clearColor(+ke[0]||0,+ke[1]||0,+ke[2]||0,+ke[3]||0),je|=al),"depth"in ye&&(cr.clearDepth(+ye.depth),je|=xl),"stencil"in ye&&(cr.clearStencil(ye.stencil|0),je|=mn),cr.clear(je)}function tu(te){if("framebuffer"in te)if(te.framebuffer&&te.framebuffer_reglType==="framebufferCube")for(var ye=0;ye<6;++ye)Sl(d({framebuffer:te.framebuffer.faces[ye]},te),kl);else Sl(te,kl);else kl(null,te)}function Vs(te){vn.push(te);function ye(){var je=Rl(vn,te);function ke(){var Qe=Rl(vn,ke);vn[Qe]=vn[vn.length-1],vn.length-=1,vn.length<=0&&zs()}vn[je]=ke}return Xn(),{cancel:ye}}function pl(){var te=xi.viewport,ye=xi.scissor_box;te[0]=te[1]=ye[0]=ye[1]=0,Na.viewportWidth=Na.framebufferWidth=Na.drawingBufferWidth=te[2]=ye[2]=cr.drawingBufferWidth,Na.viewportHeight=Na.framebufferHeight=Na.drawingBufferHeight=te[3]=ye[3]=cr.drawingBufferHeight}function wl(){Na.tick+=1,Na.time=Cl(),pl(),Ri.procs.poll()}function Zn(){Ha.refresh(),pl(),Ri.procs.refresh(),si&&si.update()}function Cl(){return(v()-gn)/1e3}Zn();function Po(te,ye){var je;switch(te){case"frame":return Vs(ye);case"lost":je=Rn;break;case"restore":je=Ii;break;case"destroy":je=nn;break;default:}return je.push(ye),{cancel:function(){for(var ke=0;ke=0},read:Ti,destroy:Wl,_gl:cr,_refresh:Zn,poll:function(){wl(),si&&si.update()},now:Cl,stats:Ya,getCachedCode:ge,preloadCachedCode:K});return Zt.onDone(null,xe),xe}return _c})}}),bq=He({"node_modules/gl-util/context.js"(Z,V){"use strict";var d=Ev();V.exports=function(o){if(o?typeof o=="string"&&(o={container:o}):o={},S(o)?o={container:o}:E(o)?o={container:o}:e(o)?o={gl:o}:o=d(o,{container:"container target element el canvas holder parent parentNode wrapper use ref root node",gl:"gl context webgl glContext",attrs:"attributes attrs contextAttributes",pixelRatio:"pixelRatio pxRatio px ratio pxratio pixelratio",width:"w width",height:"h height"},!0),o.pixelRatio||(o.pixelRatio=window.pixelRatio||1),o.gl)return o.gl;if(o.canvas&&(o.container=o.canvas.parentNode),o.container){if(typeof o.container=="string"){var a=document.querySelector(o.container);if(!a)throw Error("Element "+o.container+" is not found");o.container=a}S(o.container)?(o.canvas=o.container,o.container=o.canvas.parentNode):o.canvas||(o.canvas=t(),o.container.appendChild(o.canvas),x(o))}else if(!o.canvas)if(typeof document<"u")o.container=document.body||document.documentElement,o.canvas=t(),o.container.appendChild(o.canvas),x(o);else throw Error("Not DOM environment. Use headless-gl.");return o.gl||["webgl","experimental-webgl","webgl-experimental"].some(function(n){try{o.gl=o.canvas.getContext(n,o.attrs)}catch{}return o.gl}),o.gl};function x(r){if(r.container)if(r.container==document.body)document.body.style.width||(r.canvas.width=r.width||r.pixelRatio*window.innerWidth),document.body.style.height||(r.canvas.height=r.height||r.pixelRatio*window.innerHeight);else{var o=r.container.getBoundingClientRect();r.canvas.width=r.width||o.right-o.left,r.canvas.height=r.height||o.bottom-o.top}}function S(r){return typeof r.getContext=="function"&&"width"in r&&"height"in r}function E(r){return typeof r.nodeName=="string"&&typeof r.appendChild=="function"&&typeof r.getBoundingClientRect=="function"}function e(r){return typeof r.drawArrays=="function"||typeof r.drawElements=="function"}function t(){var r=document.createElement("canvas");return r.style.position="absolute",r.style.top=0,r.style.left=0,r}}}),wq=He({"node_modules/font-atlas/index.js"(Z,V){"use strict";var d=c6(),x=[32,126];V.exports=S;function S(E){E=E||{};var e=E.shape?E.shape:E.canvas?[E.canvas.width,E.canvas.height]:[512,512],t=E.canvas||document.createElement("canvas"),r=E.font,o=typeof E.step=="number"?[E.step,E.step]:E.step||[32,32],a=E.chars||x;if(r&&typeof r!="string"&&(r=d(r)),!Array.isArray(a))a=String(a).split("");else if(a.length===2&&typeof a[0]=="number"&&typeof a[1]=="number"){for(var n=[],i=a[0],s=0;i<=a[1];i++)n[s++]=String.fromCharCode(i);a=n}e=e.slice(),t.width=e[0],t.height=e[1];var h=t.getContext("2d");h.fillStyle="#000",h.fillRect(0,0,t.width,t.height),h.font=r,h.textAlign="center",h.textBaseline="middle",h.fillStyle="#fff";for(var f=o[0]/2,v=o[1]/2,i=0;ie[0]-o[0]/2&&(f=o[0]/2,v+=o[1]);return t}}}),f6=He({"node_modules/bit-twiddle/twiddle.js"(Z){"use strict";"use restrict";var V=32;Z.INT_BITS=V,Z.INT_MAX=2147483647,Z.INT_MIN=-1<0)-(S<0)},Z.abs=function(S){var E=S>>V-1;return(S^E)-E},Z.min=function(S,E){return E^(S^E)&-(S65535)<<4,S>>>=E,e=(S>255)<<3,S>>>=e,E|=e,e=(S>15)<<2,S>>>=e,E|=e,e=(S>3)<<1,S>>>=e,E|=e,E|S>>1},Z.log10=function(S){return S>=1e9?9:S>=1e8?8:S>=1e7?7:S>=1e6?6:S>=1e5?5:S>=1e4?4:S>=1e3?3:S>=100?2:S>=10?1:0},Z.popCount=function(S){return S=S-(S>>>1&1431655765),S=(S&858993459)+(S>>>2&858993459),(S+(S>>>4)&252645135)*16843009>>>24};function d(S){var E=32;return S&=-S,S&&E--,S&65535&&(E-=16),S&16711935&&(E-=8),S&252645135&&(E-=4),S&858993459&&(E-=2),S&1431655765&&(E-=1),E}Z.countTrailingZeros=d,Z.nextPow2=function(S){return S+=S===0,--S,S|=S>>>1,S|=S>>>2,S|=S>>>4,S|=S>>>8,S|=S>>>16,S+1},Z.prevPow2=function(S){return S|=S>>>1,S|=S>>>2,S|=S>>>4,S|=S>>>8,S|=S>>>16,S-(S>>>1)},Z.parity=function(S){return S^=S>>>16,S^=S>>>8,S^=S>>>4,S&=15,27030>>>S&1};var x=new Array(256);(function(S){for(var E=0;E<256;++E){var e=E,t=E,r=7;for(e>>>=1;e;e>>>=1)t<<=1,t|=e&1,--r;S[E]=t<>>8&255]<<16|x[S>>>16&255]<<8|x[S>>>24&255]},Z.interleave2=function(S,E){return S&=65535,S=(S|S<<8)&16711935,S=(S|S<<4)&252645135,S=(S|S<<2)&858993459,S=(S|S<<1)&1431655765,E&=65535,E=(E|E<<8)&16711935,E=(E|E<<4)&252645135,E=(E|E<<2)&858993459,E=(E|E<<1)&1431655765,S|E<<1},Z.deinterleave2=function(S,E){return S=S>>>E&1431655765,S=(S|S>>>1)&858993459,S=(S|S>>>2)&252645135,S=(S|S>>>4)&16711935,S=(S|S>>>16)&65535,S<<16>>16},Z.interleave3=function(S,E,e){return S&=1023,S=(S|S<<16)&4278190335,S=(S|S<<8)&251719695,S=(S|S<<4)&3272356035,S=(S|S<<2)&1227133513,E&=1023,E=(E|E<<16)&4278190335,E=(E|E<<8)&251719695,E=(E|E<<4)&3272356035,E=(E|E<<2)&1227133513,S|=E<<1,e&=1023,e=(e|e<<16)&4278190335,e=(e|e<<8)&251719695,e=(e|e<<4)&3272356035,e=(e|e<<2)&1227133513,S|e<<2},Z.deinterleave3=function(S,E){return S=S>>>E&1227133513,S=(S|S>>>2)&3272356035,S=(S|S>>>4)&251719695,S=(S|S>>>8)&4278190335,S=(S|S>>>16)&1023,S<<22>>22},Z.nextCombination=function(S){var E=S|S-1;return E+1|(~E&-~E)-1>>>d(S)+1}}}),Tq=He({"node_modules/dup/dup.js"(Z,V){"use strict";function d(E,e,t){var r=E[t]|0;if(r<=0)return[];var o=new Array(r),a;if(t===E.length-1)for(a=0;a"u"&&(e=0),typeof E){case"number":if(E>0)return x(E|0,e);break;case"object":if(typeof E.length=="number")return d(E,e,0);break}return[]}V.exports=S}}),Aq=He({"node_modules/typedarray-pool/pool.js"(Z){"use strict";var V=f6(),d=Tq(),x=rg().Buffer;window.__TYPEDARRAY_POOL||(window.__TYPEDARRAY_POOL={UINT8:d([32,0]),UINT16:d([32,0]),UINT32:d([32,0]),BIGUINT64:d([32,0]),INT8:d([32,0]),INT16:d([32,0]),INT32:d([32,0]),BIGINT64:d([32,0]),FLOAT:d([32,0]),DOUBLE:d([32,0]),DATA:d([32,0]),UINT8C:d([32,0]),BUFFER:d([32,0])});var S=typeof Uint8ClampedArray<"u",E=typeof BigUint64Array<"u",e=typeof BigInt64Array<"u",t=window.__TYPEDARRAY_POOL;t.UINT8C||(t.UINT8C=d([32,0])),t.BIGUINT64||(t.BIGUINT64=d([32,0])),t.BIGINT64||(t.BIGINT64=d([32,0])),t.BUFFER||(t.BUFFER=d([32,0]));var r=t.DATA,o=t.BUFFER;Z.free=function(u){if(x.isBuffer(u))o[V.log2(u.length)].push(u);else{if(Object.prototype.toString.call(u)!=="[object ArrayBuffer]"&&(u=u.buffer),!u)return;var y=u.length||u.byteLength,m=V.log2(y)|0;r[m].push(u)}};function a(p){if(p){var u=p.length||p.byteLength,y=V.log2(u);r[y].push(p)}}function n(p){a(p.buffer)}Z.freeUint8=Z.freeUint16=Z.freeUint32=Z.freeBigUint64=Z.freeInt8=Z.freeInt16=Z.freeInt32=Z.freeBigInt64=Z.freeFloat32=Z.freeFloat=Z.freeFloat64=Z.freeDouble=Z.freeUint8Clamped=Z.freeDataView=n,Z.freeArrayBuffer=a,Z.freeBuffer=function(u){o[V.log2(u.length)].push(u)},Z.malloc=function(u,y){if(y===void 0||y==="arraybuffer")return i(u);switch(y){case"uint8":return s(u);case"uint16":return h(u);case"uint32":return f(u);case"int8":return v(u);case"int16":return c(u);case"int32":return T(u);case"float":case"float32":return l(u);case"double":case"float64":return _(u);case"uint8_clamped":return w(u);case"bigint64":return M(u);case"biguint64":return A(u);case"buffer":return b(u);case"data":case"dataview":return g(u);default:return null}return null};function i(u){var u=V.nextPow2(u),y=V.log2(u),m=r[y];return m.length>0?m.pop():new ArrayBuffer(u)}Z.mallocArrayBuffer=i;function s(p){return new Uint8Array(i(p),0,p)}Z.mallocUint8=s;function h(p){return new Uint16Array(i(2*p),0,p)}Z.mallocUint16=h;function f(p){return new Uint32Array(i(4*p),0,p)}Z.mallocUint32=f;function v(p){return new Int8Array(i(p),0,p)}Z.mallocInt8=v;function c(p){return new Int16Array(i(2*p),0,p)}Z.mallocInt16=c;function T(p){return new Int32Array(i(4*p),0,p)}Z.mallocInt32=T;function l(p){return new Float32Array(i(4*p),0,p)}Z.mallocFloat32=Z.mallocFloat=l;function _(p){return new Float64Array(i(8*p),0,p)}Z.mallocFloat64=Z.mallocDouble=_;function w(p){return S?new Uint8ClampedArray(i(p),0,p):s(p)}Z.mallocUint8Clamped=w;function A(p){return E?new BigUint64Array(i(8*p),0,p):null}Z.mallocBigUint64=A;function M(p){return e?new BigInt64Array(i(8*p),0,p):null}Z.mallocBigInt64=M;function g(p){return new DataView(i(p),0,p)}Z.mallocDataView=g;function b(p){p=V.nextPow2(p);var u=V.log2(p),y=o[u];return y.length>0?y.pop():new x(p)}Z.mallocBuffer=b,Z.clearCache=function(){for(var u=0;u<32;++u)t.UINT8[u].length=0,t.UINT16[u].length=0,t.UINT32[u].length=0,t.INT8[u].length=0,t.INT16[u].length=0,t.INT32[u].length=0,t.FLOAT[u].length=0,t.DOUBLE[u].length=0,t.BIGUINT64[u].length=0,t.BIGINT64[u].length=0,t.UINT8C[u].length=0,r[u].length=0,o[u].length=0}}}),Sq=He({"node_modules/is-plain-obj/index.js"(Z,V){"use strict";var d=Object.prototype.toString;V.exports=function(x){var S;return d.call(x)==="[object Object]"&&(S=Object.getPrototypeOf(x),S===null||S===Object.getPrototypeOf({}))}}}),h6=He({"node_modules/parse-unit/index.js"(Z,V){V.exports=function(x,S){S||(S=[0,""]),x=String(x);var E=parseFloat(x,10);return S[0]=E,S[1]=x.match(/[\d.\-\+]*\s*(.*)/)[1]||"",S}}}),Mq=He({"node_modules/to-px/topx.js"(Z,V){"use strict";var d=h6();V.exports=e;var x=96;function S(t,r){var o=d(getComputedStyle(t).getPropertyValue(r));return o[0]*e(o[1],t)}function E(t,r){var o=document.createElement("div");o.style["font-size"]="128"+t,r.appendChild(o);var a=S(o,"font-size")/128;return r.removeChild(o),a}function e(t,r){switch(r=r||document.body,t=(t||"px").trim().toLowerCase(),(r===window||r===document)&&(r=document.body),t){case"%":return r.clientHeight/100;case"ch":case"ex":return E(t,r);case"em":return S(r,"font-size");case"rem":return S(document.body,"font-size");case"vw":return window.innerWidth/100;case"vh":return window.innerHeight/100;case"vmin":return Math.min(window.innerWidth,window.innerHeight)/100;case"vmax":return Math.max(window.innerWidth,window.innerHeight)/100;case"in":return x;case"cm":return x/2.54;case"mm":return x/25.4;case"pt":return x/72;case"pc":return x/6}return 1}}}),Eq=He({"node_modules/detect-kerning/index.js"(Z,V){"use strict";V.exports=E;var d=E.canvas=document.createElement("canvas"),x=d.getContext("2d"),S=e([32,126]);E.createPairs=e,E.ascii=S;function E(t,r){Array.isArray(t)&&(t=t.join(", "));var o={},a,n=16,i=.05;r&&(r.length===2&&typeof r[0]=="number"?a=e(r):Array.isArray(r)?a=r:(r.o?a=e(r.o):r.pairs&&(a=r.pairs),r.fontSize&&(n=r.fontSize),r.threshold!=null&&(i=r.threshold))),a||(a=S),x.font=n+"px "+t;for(var s=0;sn*i){var c=(v-f)/n;o[h]=c*1e3}}return o}function e(t){for(var r=[],o=t[0];o<=t[1];o++)for(var a=String.fromCharCode(o),n=t[0];n0;o-=4)if(r[o]!==0)return Math.floor((o-3)*.25/t)}}}),Cq=He({"node_modules/gl-text/dist.js"(Z,V){"use strict";var d=_q(),x=Ev(),S=xq(),E=bq(),e=r6(),t=d0(),r=wq(),o=Aq(),a=C1(),n=Sq(),i=h6(),s=Mq(),h=Eq(),f=ch(),v=kq(),c=gg(),T=f6(),l=T.nextPow2,_=new e,w=!1;document.body&&(A=document.body.appendChild(document.createElement("div")),A.style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(A).fontStretch&&(w=!0),document.body.removeChild(A));var A,M=function(p){g(p)?(p={regl:p},this.gl=p.regl._gl):this.gl=E(p),this.shader=_.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=p.regl||S({gl:this.gl}),this.charBuffer=this.regl.buffer({type:"uint8",usage:"stream"}),this.sizeBuffer=this.regl.buffer({type:"float",usage:"stream"}),this.shader||(this.shader=this.createShader(),_.set(this.gl,this.shader)),this.batch=[],this.fontSize=[],this.font=[],this.fontAtlas=[],this.draw=this.shader.draw.bind(this),this.render=function(){this.regl._refresh(),this.draw(this.batch)},this.canvas=this.gl.canvas,this.update(n(p)?p:{})};M.prototype.createShader=function(){var p=this.regl,u=p({blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},stencil:{enable:!1},depth:{enable:!1},count:p.prop("count"),offset:p.prop("offset"),attributes:{charOffset:{offset:4,stride:8,buffer:p.this("sizeBuffer")},width:{offset:0,stride:8,buffer:p.this("sizeBuffer")},char:p.this("charBuffer"),position:p.this("position")},uniforms:{atlasSize:function(m,R){return[R.atlas.width,R.atlas.height]},atlasDim:function(m,R){return[R.atlas.cols,R.atlas.rows]},atlas:function(m,R){return R.atlas.texture},charStep:function(m,R){return R.atlas.step},em:function(m,R){return R.atlas.em},color:p.prop("color"),opacity:p.prop("opacity"),viewport:p.this("viewportArray"),scale:p.this("scale"),align:p.prop("align"),baseline:p.prop("baseline"),translate:p.this("translate"),positionOffset:p.prop("positionOffset")},primitive:"points",viewport:p.this("viewport"),vert:` precision highp float; attribute float width, charOffset, char; attribute vec2 position; uniform float fontSize, charStep, em, align, baseline; uniform vec4 viewport; uniform vec4 color; uniform vec2 atlasSize, atlasDim, scale, translate, positionOffset; varying vec2 charCoord, charId; varying float charWidth; varying vec4 fontColor; void main () { vec2 offset = floor(em * (vec2(align + charOffset, baseline) + vec2(positionOffset.x, -positionOffset.y))) / (viewport.zw * scale.xy); vec2 position = (position + translate) * scale; position += offset * scale; charCoord = position * viewport.zw + viewport.xy; gl_Position = vec4(position * 2. - 1., 0, 1); gl_PointSize = charStep; charId.x = mod(char, atlasDim.x); charId.y = floor(char / atlasDim.x); charWidth = width * em; fontColor = color / 255.; }`,frag:` precision highp float; uniform float fontSize, charStep, opacity; uniform vec2 atlasSize; uniform vec4 viewport; uniform sampler2D atlas; varying vec4 fontColor; varying vec2 charCoord, charId; varying float charWidth; float lightness(vec4 color) { return color.r * 0.299 + color.g * 0.587 + color.b * 0.114; } void main () { vec2 uv = gl_FragCoord.xy - charCoord + charStep * .5; float halfCharStep = floor(charStep * .5 + .5); // invert y and shift by 1px (FF expecially needs that) uv.y = charStep - uv.y; // ignore points outside of character bounding box float halfCharWidth = ceil(charWidth * .5); if (floor(uv.x) > halfCharStep + halfCharWidth || floor(uv.x) < halfCharStep - halfCharWidth) return; uv += charId * charStep; uv = uv / atlasSize; vec4 color = fontColor; vec4 mask = texture2D(atlas, uv); float maskY = lightness(mask); // float colorY = lightness(color); color.a *= maskY; color.a *= opacity; // color.a += .1; // antialiasing, see yiq color space y-channel formula // color.rgb += (1. - color.rgb) * (1. - mask.rgb); gl_FragColor = color; }`}),y={};return{regl:p,draw:u,atlas:y}},M.prototype.update=function(p){var u=this;if(typeof p=="string")p={text:p};else if(!p)return;p=x(p,{position:"position positions coord coords coordinates",font:"font fontFace fontface typeface cssFont css-font family fontFamily",fontSize:"fontSize fontsize size font-size",text:"text texts chars characters value values symbols",align:"align alignment textAlign textbaseline",baseline:"baseline textBaseline textbaseline",direction:"dir direction textDirection",color:"color colour fill fill-color fillColor textColor textcolor",kerning:"kerning kern",range:"range dataBox",viewport:"vp viewport viewBox viewbox viewPort",opacity:"opacity alpha transparency visible visibility opaque",offset:"offset positionOffset padding shift indent indentation"},!0),p.opacity!=null&&(Array.isArray(p.opacity)?this.opacity=p.opacity.map(function(ne){return parseFloat(ne)}):this.opacity=parseFloat(p.opacity)),p.viewport!=null&&(this.viewport=a(p.viewport),this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),this.viewport==null&&(this.viewport={x:0,y:0,width:this.gl.drawingBufferWidth,height:this.gl.drawingBufferHeight},this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),p.kerning!=null&&(this.kerning=p.kerning),p.offset!=null&&(typeof p.offset=="number"&&(p.offset=[p.offset,0]),this.positionOffset=c(p.offset)),p.direction&&(this.direction=p.direction),p.range&&(this.range=p.range,this.scale=[1/(p.range[2]-p.range[0]),1/(p.range[3]-p.range[1])],this.translate=[-p.range[0],-p.range[1]]),p.scale&&(this.scale=p.scale),p.translate&&(this.translate=p.translate),this.scale||(this.scale=[1/this.viewport.width,1/this.viewport.height]),this.translate||(this.translate=[0,0]),!this.font.length&&!p.font&&(p.font=M.baseFontSize+"px sans-serif");var y=!1,m=!1;if(p.font&&(Array.isArray(p.font)?p.font:[p.font]).forEach(function(ne,Ce){if(typeof ne=="string")try{ne=d.parse(ne)}catch{ne=d.parse(M.baseFontSize+"px "+ne)}else{var Ye=ne.style,rt=ne.weight,Ke=ne.stretch,Mt=ne.variant;ne=d.parse(d.stringify(ne)),Ye&&(ne.style=Ye),rt&&(ne.weight=rt),Ke&&(ne.stretch=Ke),Mt&&(ne.variant=Mt)}var kt=d.stringify({size:M.baseFontSize,family:ne.family,stretch:w?ne.stretch:void 0,variant:ne.variant,weight:ne.weight,style:ne.style}),Nt=i(ne.size),Gt=Math.round(Nt[0]*s(Nt[1]));if(Gt!==u.fontSize[Ce]&&(m=!0,u.fontSize[Ce]=Gt),(!u.font[Ce]||kt!=u.font[Ce].baseString)&&(y=!0,u.font[Ce]=M.fonts[kt],!u.font[Ce])){var Mr=ne.family.join(", "),mr=[ne.style];ne.style!=ne.variant&&mr.push(ne.variant),ne.variant!=ne.weight&&mr.push(ne.weight),w&&ne.weight!=ne.stretch&&mr.push(ne.stretch),u.font[Ce]={baseString:kt,family:Mr,weight:ne.weight,stretch:ne.stretch,style:ne.style,variant:ne.variant,width:{},kerning:{},metrics:v(Mr,{origin:"top",fontSize:M.baseFontSize,fontStyle:mr.join(" ")})},M.fonts[kt]=u.font[Ce]}}),(y||m)&&this.font.forEach(function(ne,Ce){var Ye=d.stringify({size:u.fontSize[Ce],family:ne.family,stretch:w?ne.stretch:void 0,variant:ne.variant,weight:ne.weight,style:ne.style});if(u.fontAtlas[Ce]=u.shader.atlas[Ye],!u.fontAtlas[Ce]){var rt=ne.metrics;u.shader.atlas[Ye]=u.fontAtlas[Ce]={fontString:Ye,step:Math.ceil(u.fontSize[Ce]*rt.bottom*.5)*2,em:u.fontSize[Ce],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:u.regl.texture()}}p.text==null&&(p.text=u.text)}),typeof p.text=="string"&&p.position&&p.position.length>2){for(var R=Array(p.position.length*.5),L=0;L2){for(var N=!p.position[0].length,O=o.mallocFloat(this.count*2),P=0,U=0;P1?u.align[Ce]:u.align[0]:u.align;if(typeof Ye=="number")return Ye;switch(Ye){case"right":case"end":return-ne;case"center":case"centre":case"middle":return-ne*.5}return 0})),this.baseline==null&&p.baseline==null&&(p.baseline=0),p.baseline!=null&&(this.baseline=p.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map(function(ne,Ce){var Ye=(u.font[Ce]||u.font[0]).metrics,rt=0;return rt+=Ye.bottom*.5,typeof ne=="number"?rt+=ne-Ye.baseline:rt+=-Ye[ne],rt*=-1,rt})),p.color!=null)if(p.color||(p.color="transparent"),typeof p.color=="string"||!isNaN(p.color))this.color=t(p.color,"uint8");else{var Ie;if(typeof p.color[0]=="number"&&p.color.length>this.counts.length){var Re=p.color.length;Ie=o.mallocUint8(Re);for(var We=(p.color.subarray||p.color.slice).bind(p.color),at=0;at4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2;if(qe){var he=Math.max(this.position.length*.5||0,this.color.length*.25||0,this.baselineOffset.length||0,this.alignOffset.length||0,this.font.length||0,this.opacity.length||0,this.positionOffset.length*.5||0);this.batch=Array(he);for(var ue=0;ue1?this.counts[ue]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[ue]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(ue*4,ue*4+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[ue]:this.opacity,baseline:this.baselineOffset[ue]!=null?this.baselineOffset[ue]:this.baselineOffset[0],align:this.align?this.alignOffset[ue]!=null?this.alignOffset[ue]:this.alignOffset[0]:0,atlas:this.fontAtlas[ue]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(ue*2,ue*2+2):this.positionOffset}}else this.count?this.batch=[{count:this.count,offset:0,color:this.color||[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[0]:this.opacity,baseline:this.baselineOffset[0],align:this.alignOffset?this.alignOffset[0]:0,atlas:this.fontAtlas[0],positionOffset:this.positionOffset}]:this.batch=[]}},M.prototype.destroy=function(){},M.prototype.kerning=!0,M.prototype.position={constant:new Float32Array(2)},M.prototype.translate=null,M.prototype.scale=null,M.prototype.font=null,M.prototype.text="",M.prototype.positionOffset=[0,0],M.prototype.opacity=1,M.prototype.color=new Uint8Array([0,0,0,255]),M.prototype.alignOffset=[0,0],M.maxAtlasSize=1024,M.atlasCanvas=document.createElement("canvas"),M.atlasContext=M.atlasCanvas.getContext("2d",{alpha:!1}),M.baseFontSize=64,M.fonts={};function g(b){return typeof b=="function"&&b._gl&&b.prop&&b.texture&&b.buffer}V.exports=M}}),Lq=He({"node_modules/@plotly/regl/dist/regl.unchecked.js"(Z,V){(function(d,x){typeof Z=="object"&&typeof V<"u"?V.exports=x():d.createREGL=x()})(Z,function(){"use strict";var d=function(it,Zt){for(var cr=Object.keys(Zt),oa=0;oa1&&Zt===cr&&(Zt==='"'||Zt==="'"))return['"'+r(it.substr(1,it.length-2))+'"'];var oa=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(it);if(oa)return o(it.substr(0,oa.index)).concat(o(oa[1])).concat(o(it.substr(oa.index+oa[0].length)));var wa=it.split(".");if(wa.length===1)return['"'+r(it)+'"'];for(var va=[],ya=0;ya"u"?1:window.devicePixelRatio,si=!1,gn={},zi=function(ea){},Ei=function(){};if(typeof Zt=="string"?cr=document.querySelector(Zt):typeof Zt=="object"&&(_(Zt)?cr=Zt:w(Zt)?(va=Zt,wa=va.canvas):("gl"in Zt?va=Zt.gl:"canvas"in Zt?wa=M(Zt.canvas):"container"in Zt&&(oa=M(Zt.container)),"attributes"in Zt&&(ya=Zt.attributes),"extensions"in Zt&&(Ya=A(Zt.extensions)),"optionalExtensions"in Zt&&(bi=A(Zt.optionalExtensions)),"onDone"in Zt&&(zi=Zt.onDone),"profile"in Zt&&(si=!!Zt.profile),"pixelRatio"in Zt&&(yi=+Zt.pixelRatio),"cachedCode"in Zt&&(gn=Zt.cachedCode))),cr&&(cr.nodeName.toLowerCase()==="canvas"?wa=cr:oa=cr),!va){if(!wa){var Na=T(oa||document.body,zi,yi);if(!Na)return null;wa=Na.canvas,Ei=Na.onDestroy}ya.premultipliedAlpha===void 0&&(ya.premultipliedAlpha=!0),va=l(wa,ya)}return va?{gl:va,canvas:wa,container:oa,extensions:Ya,optionalExtensions:bi,pixelRatio:yi,profile:si,cachedCode:gn,onDone:zi,onDestroy:Ei}:(Ei(),zi("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function b(it,Zt){var cr={};function oa(ya){var Ya=ya.toLowerCase(),bi;try{bi=cr[Ya]=it.getExtension(Ya)}catch{}return!!bi}for(var wa=0;wa65535)<<4,it>>>=Zt,cr=(it>255)<<3,it>>>=cr,Zt|=cr,cr=(it>15)<<2,it>>>=cr,Zt|=cr,cr=(it>3)<<1,it>>>=cr,Zt|=cr,Zt|it>>1}function P(){var it=p(8,function(){return[]});function Zt(va){var ya=N(va),Ya=it[O(ya)>>2];return Ya.length>0?Ya.pop():new ArrayBuffer(ya)}function cr(va){it[O(va.byteLength)>>2].push(va)}function oa(va,ya){var Ya=null;switch(va){case u:Ya=new Int8Array(Zt(ya),0,ya);break;case y:Ya=new Uint8Array(Zt(ya),0,ya);break;case m:Ya=new Int16Array(Zt(2*ya),0,ya);break;case R:Ya=new Uint16Array(Zt(2*ya),0,ya);break;case L:Ya=new Int32Array(Zt(4*ya),0,ya);break;case z:Ya=new Uint32Array(Zt(4*ya),0,ya);break;case F:Ya=new Float32Array(Zt(4*ya),0,ya);break;default:return null}return Ya.length!==ya?Ya.subarray(0,ya):Ya}function wa(va){cr(va.buffer)}return{alloc:Zt,free:cr,allocType:oa,freeType:wa}}var U=P();U.zero=P();var B=3408,X=3410,$=3411,le=3412,ce=3413,de=3414,G=3415,Y=33901,ee=33902,q=3379,se=3386,ae=34921,j=36347,Q=36348,re=35661,pe=35660,we=34930,Se=36349,Ie=34076,Re=34024,We=7936,at=7937,nt=7938,tt=35724,qe=34047,he=36063,ue=34852,ne=3553,Ce=34067,Ye=34069,rt=33984,Ke=6408,Mt=5126,kt=5121,Nt=36160,Gt=36053,Mr=36064,mr=16384,qr=function(it,Zt){var cr=1;Zt.ext_texture_filter_anisotropic&&(cr=it.getParameter(qe));var oa=1,wa=1;Zt.webgl_draw_buffers&&(oa=it.getParameter(ue),wa=it.getParameter(he));var va=!!Zt.oes_texture_float;if(va){var ya=it.createTexture();it.bindTexture(ne,ya),it.texImage2D(ne,0,Ke,1,1,0,Ke,Mt,null);var Ya=it.createFramebuffer();if(it.bindFramebuffer(Nt,Ya),it.framebufferTexture2D(Nt,Mr,ne,ya,0),it.bindTexture(ne,null),it.checkFramebufferStatus(Nt)!==Gt)va=!1;else{it.viewport(0,0,1,1),it.clearColor(1,0,0,1),it.clear(mr);var bi=U.allocType(Mt,4);it.readPixels(0,0,1,1,Ke,Mt,bi),it.getError()?va=!1:(it.deleteFramebuffer(Ya),it.deleteTexture(ya),va=bi[0]===1),U.freeType(bi)}}var yi=typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),si=!0;if(!yi){var gn=it.createTexture(),zi=U.allocType(kt,36);it.activeTexture(rt),it.bindTexture(Ce,gn),it.texImage2D(Ye,0,Ke,3,3,0,Ke,kt,zi),U.freeType(zi),it.bindTexture(Ce,null),it.deleteTexture(gn),si=!it.getError()}return{colorBits:[it.getParameter(X),it.getParameter($),it.getParameter(le),it.getParameter(ce)],depthBits:it.getParameter(de),stencilBits:it.getParameter(G),subpixelBits:it.getParameter(B),extensions:Object.keys(Zt).filter(function(Ei){return!!Zt[Ei]}),maxAnisotropic:cr,maxDrawbuffers:oa,maxColorAttachments:wa,pointSizeDims:it.getParameter(Y),lineWidthDims:it.getParameter(ee),maxViewportDims:it.getParameter(se),maxCombinedTextureUnits:it.getParameter(re),maxCubeMapSize:it.getParameter(Ie),maxRenderbufferSize:it.getParameter(Re),maxTextureUnits:it.getParameter(we),maxTextureSize:it.getParameter(q),maxAttributes:it.getParameter(ae),maxVertexUniforms:it.getParameter(j),maxVertexTextureUnits:it.getParameter(pe),maxVaryingVectors:it.getParameter(Q),maxFragmentUniforms:it.getParameter(Se),glsl:it.getParameter(tt),renderer:it.getParameter(at),vendor:it.getParameter(We),version:it.getParameter(nt),readFloat:va,npotTextureCube:si}},Er=function(it){return it instanceof Uint8Array||it instanceof Uint16Array||it instanceof Uint32Array||it instanceof Int8Array||it instanceof Int16Array||it instanceof Int32Array||it instanceof Float32Array||it instanceof Float64Array||it instanceof Uint8ClampedArray};function Ir(it){return!!it&&typeof it=="object"&&Array.isArray(it.shape)&&Array.isArray(it.stride)&&typeof it.offset=="number"&&it.shape.length===it.stride.length&&(Array.isArray(it.data)||Er(it.data))}var _t=function(it){return Object.keys(it).map(function(Zt){return it[Zt]})},Oe={shape:st,flatten:Ze};function Je(it,Zt,cr){for(var oa=0;oa0){var hn;if(Array.isArray(Ma[0])){Li=Ca(Ma);for(var Ha=1,Ua=1;Ua0){if(typeof Ha[0]=="number"){var Ti=U.allocType(Va.dtype,Ha.length);Fr(Ti,Ha),Li(Ti,Yi),U.freeType(Ti)}else if(Array.isArray(Ha[0])||Er(Ha[0])){Ri=Ca(Ha);var xi=Wa(Ha,Ri,Va.dtype);Li(xi,Yi),U.freeType(xi)}}}else if(Ir(Ha)){Ri=Ha.shape;var Xi=Ha.stride,vn=0,Rn=0,Ii=0,nn=0;Ri.length===1?(vn=Ri[0],Rn=1,Ii=Xi[0],nn=0):Ri.length===2&&(vn=Ri[0],Rn=Ri[1],Ii=Xi[0],nn=Xi[1]);var En=Array.isArray(Ha.data)?Va.dtype:Jt(Ha.data),Dn=U.allocType(En,vn*Rn);ta(Dn,Ha.data,vn,Rn,Ii,nn,Ha.offset),Li(Dn,Yi),U.freeType(Dn)}return Bi}return Qa||Bi(ea),Bi._reglType="buffer",Bi._buffer=Va,Bi.subdata=hn,cr.profile&&(Bi.stats=Va.stats),Bi.destroy=function(){zi(Va)},Bi}function Na(){_t(va).forEach(function(ea){ea.buffer=it.createBuffer(),it.bindBuffer(ea.type,ea.buffer),it.bufferData(ea.type,ea.persistentData||ea.byteLength,ea.usage)})}return cr.profile&&(Zt.getTotalBufferSize=function(){var ea=0;return Object.keys(va).forEach(function(Ma){ea+=va[Ma].stats.size}),ea}),{create:Ei,createStream:bi,destroyStream:yi,clear:function(){_t(va).forEach(zi),Ya.forEach(zi)},getBuffer:function(ea){return ea&&ea._buffer instanceof ya?ea._buffer:null},restore:Na,_initBuffer:gn}}var ca=0,Ba=0,$a=1,Za=1,ri=4,pi=4,Ra={points:ca,point:Ba,lines:$a,line:Za,triangles:ri,triangle:pi,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},an=0,tn=1,fn=4,xt=5120,lt=5121,Br=5122,Cr=5123,xr=5124,Rr=5125,Ur=34963,Hr=35040,gt=35044;function Xt(it,Zt,cr,oa){var wa={},va=0,ya={uint8:lt,uint16:Cr};Zt.oes_element_index_uint&&(ya.uint32=Rr);function Ya(Na){this.id=va++,wa[this.id]=this,this.buffer=Na,this.primType=fn,this.vertCount=0,this.type=0}Ya.prototype.bind=function(){this.buffer.bind()};var bi=[];function yi(Na){var ea=bi.pop();return ea||(ea=new Ya(cr.create(null,Ur,!0,!1)._buffer)),gn(ea,Na,Hr,-1,-1,0,0),ea}function si(Na){bi.push(Na)}function gn(Na,ea,Ma,Qa,di,Va,Bi){Na.buffer.bind();var Li;if(ea){var hn=Bi;!Bi&&(!Er(ea)||Ir(ea)&&!Er(ea.data))&&(hn=Zt.oes_element_index_uint?Rr:Cr),cr._initBuffer(Na.buffer,ea,Ma,hn,3)}else it.bufferData(Ur,Va,Ma),Na.buffer.dtype=Li||lt,Na.buffer.usage=Ma,Na.buffer.dimension=3,Na.buffer.byteLength=Va;if(Li=Bi,!Bi){switch(Na.buffer.dtype){case lt:case xt:Li=lt;break;case Cr:case Br:Li=Cr;break;case Rr:case xr:Li=Rr;break;default:}Na.buffer.dtype=Li}Na.type=Li;var Ha=di;Ha<0&&(Ha=Na.buffer.byteLength,Li===Cr?Ha>>=1:Li===Rr&&(Ha>>=2)),Na.vertCount=Ha;var Ua=Qa;if(Qa<0){Ua=fn;var Yi=Na.buffer.dimension;Yi===1&&(Ua=an),Yi===2&&(Ua=tn),Yi===3&&(Ua=fn)}Na.primType=Ua}function zi(Na){oa.elementsCount--,delete wa[Na.id],Na.buffer.destroy(),Na.buffer=null}function Ei(Na,ea){var Ma=cr.create(null,Ur,!0),Qa=new Ya(Ma._buffer);oa.elementsCount++;function di(Va){if(!Va)Ma(),Qa.primType=fn,Qa.vertCount=0,Qa.type=lt;else if(typeof Va=="number")Ma(Va),Qa.primType=fn,Qa.vertCount=Va|0,Qa.type=lt;else{var Bi=null,Li=gt,hn=-1,Ha=-1,Ua=0,Yi=0;Array.isArray(Va)||Er(Va)||Ir(Va)?Bi=Va:("data"in Va&&(Bi=Va.data),"usage"in Va&&(Li=qa[Va.usage]),"primitive"in Va&&(hn=Ra[Va.primitive]),"count"in Va&&(Ha=Va.count|0),"type"in Va&&(Yi=ya[Va.type]),"length"in Va?Ua=Va.length|0:(Ua=Ha,Yi===Cr||Yi===Br?Ua*=2:(Yi===Rr||Yi===xr)&&(Ua*=4))),gn(Qa,Bi,Li,hn,Ha,Ua,Yi)}return di}return di(Na),di._reglType="elements",di._elements=Qa,di.subdata=function(Va,Bi){return Ma.subdata(Va,Bi),di},di.destroy=function(){zi(Qa)},di}return{create:Ei,createStream:yi,destroyStream:si,getElements:function(Na){return typeof Na=="function"&&Na._elements instanceof Ya?Na._elements:null},clear:function(){_t(wa).forEach(zi)}}}var vr=new Float32Array(1),Or=new Uint32Array(vr.buffer),ba=5123;function Pa(it){for(var Zt=U.allocType(ba,it.length),cr=0;cr>>31<<15,va=(oa<<1>>>24)-127,ya=oa>>13&1023;if(va<-24)Zt[cr]=wa;else if(va<-14){var Ya=-14-va;Zt[cr]=wa+(ya+1024>>Ya)}else va>15?Zt[cr]=wa+31744:Zt[cr]=wa+(va+15<<10)+ya}return Zt}function ma(it){return Array.isArray(it)||Er(it)}var la=34467,_a=3553,Ai=34067,ki=34069,Ki=6408,yn=6406,Ln=6407,kn=6409,Bn=6410,ao=32854,xo=32855,Co=36194,Fs=32819,Mn=32820,Ao=33635,On=34042,ts=6402,is=34041,_s=35904,Oo=35906,io=36193,Gn=33776,eo=33777,ns=33778,gs=33779,Ls=35986,Xo=35987,Gi=34798,Pn=35840,js=35841,xs=35842,Hn=35843,Os=36196,ds=5121,Xs=5123,il=5125,_n=5126,Lo=10242,bo=10243,Rs=10497,pu=33071,uo=33648,Gs=10240,vl=10241,As=9728,qs=9729,us=9984,Ss=9985,Nl=9986,su=9987,Tc=33170,du=4352,Sf=4353,Uc=4354,Bs=34046,dc=3317,Hc=37440,lu=37441,Pl=37443,ic=37444,Ou=33984,nl=[us,Nl,Ss,su],ml=[0,kn,Bn,Ln,Ki],bs={};bs[kn]=bs[yn]=bs[ts]=1,bs[is]=bs[Bn]=2,bs[Ln]=bs[_s]=3,bs[Ki]=bs[Oo]=4;function Zs(it){return"[object "+it+"]"}var nc=Zs("HTMLCanvasElement"),Ul=Zs("OffscreenCanvas"),qu=Zs("CanvasRenderingContext2D"),fl=Zs("ImageBitmap"),xh=Zs("HTMLImageElement"),ss=Zs("HTMLVideoElement"),bh=Object.keys(ut).concat([nc,Ul,qu,fl,xh,ss]),ks=[];ks[ds]=1,ks[_n]=4,ks[io]=2,ks[Xs]=2,ks[il]=4;var to=[];to[ao]=2,to[xo]=2,to[Co]=2,to[is]=4,to[Gn]=.5,to[eo]=.5,to[ns]=1,to[gs]=1,to[Ls]=.5,to[Xo]=1,to[Gi]=1,to[Pn]=.5,to[js]=.25,to[xs]=.5,to[Hn]=.25,to[Os]=.5;function Wc(it){return Array.isArray(it)&&(it.length===0||typeof it[0]=="number")}function Vu(it){if(!Array.isArray(it))return!1;var Zt=it.length;return!(Zt===0||!ma(it[0]))}function jl(it){return Object.prototype.toString.call(it)}function Mf(it){return jl(it)===nc}function Ac(it){return jl(it)===Ul}function nf(it){return jl(it)===qu}function $l(it){return jl(it)===fl}function Jf(it){return jl(it)===xh}function Of(it){return jl(it)===ss}function of(it){if(!it)return!1;var Zt=jl(it);return bh.indexOf(Zt)>=0?!0:Wc(it)||Vu(it)||Ir(it)}function jc(it){return ut[Object.prototype.toString.call(it)]|0}function Bf(it,Zt){var cr=Zt.length;switch(it.type){case ds:case Xs:case il:case _n:var oa=U.allocType(it.type,cr);oa.set(Zt),it.data=oa;break;case io:it.data=Pa(Zt);break;default:}}function Nf(it,Zt){return U.allocType(it.type===io?_n:it.type,Zt)}function Gu(it,Zt){it.type===io?(it.data=Pa(Zt),U.freeType(Zt)):it.data=Zt}function Ef(it,Zt,cr,oa,wa,va){for(var ya=it.width,Ya=it.height,bi=it.channels,yi=ya*Ya*bi,si=Nf(it,yi),gn=0,zi=0;zi=1;)Ya+=ya*bi*bi,bi/=2;return Ya}else return ya*cr*oa}function Xc(it,Zt,cr,oa,wa,va,ya){var Ya={"don't care":du,"dont care":du,nice:Uc,fast:Sf},bi={repeat:Rs,clamp:pu,mirror:uo},yi={nearest:As,linear:qs},si=d({mipmap:su,"nearest mipmap nearest":us,"linear mipmap nearest":Ss,"nearest mipmap linear":Nl,"linear mipmap linear":su},yi),gn={none:0,browser:ic},zi={uint8:ds,rgba4:Fs,rgb565:Ao,"rgb5 a1":Mn},Ei={alpha:yn,luminance:kn,"luminance alpha":Bn,rgb:Ln,rgba:Ki,rgba4:ao,"rgb5 a1":xo,rgb565:Co},Na={};Zt.ext_srgb&&(Ei.srgb=_s,Ei.srgba=Oo),Zt.oes_texture_float&&(zi.float32=zi.float=_n),Zt.oes_texture_half_float&&(zi.float16=zi["half float"]=io),Zt.webgl_depth_texture&&(d(Ei,{depth:ts,"depth stencil":is}),d(zi,{uint16:Xs,uint32:il,"depth stencil":On})),Zt.webgl_compressed_texture_s3tc&&d(Na,{"rgb s3tc dxt1":Gn,"rgba s3tc dxt1":eo,"rgba s3tc dxt3":ns,"rgba s3tc dxt5":gs}),Zt.webgl_compressed_texture_atc&&d(Na,{"rgb atc":Ls,"rgba atc explicit alpha":Xo,"rgba atc interpolated alpha":Gi}),Zt.webgl_compressed_texture_pvrtc&&d(Na,{"rgb pvrtc 4bppv1":Pn,"rgb pvrtc 2bppv1":js,"rgba pvrtc 4bppv1":xs,"rgba pvrtc 2bppv1":Hn}),Zt.webgl_compressed_texture_etc1&&(Na["rgb etc1"]=Os);var ea=Array.prototype.slice.call(it.getParameter(la));Object.keys(Na).forEach(function(ke){var Qe=Na[ke];ea.indexOf(Qe)>=0&&(Ei[ke]=Qe)});var Ma=Object.keys(Ei);cr.textureFormats=Ma;var Qa=[];Object.keys(Ei).forEach(function(ke){var Qe=Ei[ke];Qa[Qe]=ke});var di=[];Object.keys(zi).forEach(function(ke){var Qe=zi[ke];di[Qe]=ke});var Va=[];Object.keys(yi).forEach(function(ke){var Qe=yi[ke];Va[Qe]=ke});var Bi=[];Object.keys(si).forEach(function(ke){var Qe=si[ke];Bi[Qe]=ke});var Li=[];Object.keys(bi).forEach(function(ke){var Qe=bi[ke];Li[Qe]=ke});var hn=Ma.reduce(function(ke,Qe){var vt=Ei[Qe];return vt===kn||vt===yn||vt===kn||vt===Bn||vt===ts||vt===is||Zt.ext_srgb&&(vt===_s||vt===Oo)?ke[vt]=vt:vt===xo||Qe.indexOf("rgba")>=0?ke[vt]=Ki:ke[vt]=Ln,ke},{});function Ha(){this.internalformat=Ki,this.format=Ki,this.type=ds,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=ic,this.width=0,this.height=0,this.channels=0}function Ua(ke,Qe){ke.internalformat=Qe.internalformat,ke.format=Qe.format,ke.type=Qe.type,ke.compressed=Qe.compressed,ke.premultiplyAlpha=Qe.premultiplyAlpha,ke.flipY=Qe.flipY,ke.unpackAlignment=Qe.unpackAlignment,ke.colorSpace=Qe.colorSpace,ke.width=Qe.width,ke.height=Qe.height,ke.channels=Qe.channels}function Yi(ke,Qe){if(!(typeof Qe!="object"||!Qe)){if("premultiplyAlpha"in Qe&&(ke.premultiplyAlpha=Qe.premultiplyAlpha),"flipY"in Qe&&(ke.flipY=Qe.flipY),"alignment"in Qe&&(ke.unpackAlignment=Qe.alignment),"colorSpace"in Qe&&(ke.colorSpace=gn[Qe.colorSpace]),"type"in Qe){var vt=Qe.type;ke.type=zi[vt]}var qt=ke.width,wr=ke.height,Nr=ke.channels,pr=!1;"shape"in Qe?(qt=Qe.shape[0],wr=Qe.shape[1],Qe.shape.length===3&&(Nr=Qe.shape[2],pr=!0)):("radius"in Qe&&(qt=wr=Qe.radius),"width"in Qe&&(qt=Qe.width),"height"in Qe&&(wr=Qe.height),"channels"in Qe&&(Nr=Qe.channels,pr=!0)),ke.width=qt|0,ke.height=wr|0,ke.channels=Nr|0;var mt=!1;if("format"in Qe){var St=Qe.format,Ft=ke.internalformat=Ei[St];ke.format=hn[Ft],St in zi&&("type"in Qe||(ke.type=zi[St])),St in Na&&(ke.compressed=!0),mt=!0}!pr&&mt?ke.channels=bs[ke.format]:pr&&!mt&&ke.channels!==ml[ke.format]&&(ke.format=ke.internalformat=ml[ke.channels])}}function Ri(ke){it.pixelStorei(Hc,ke.flipY),it.pixelStorei(lu,ke.premultiplyAlpha),it.pixelStorei(Pl,ke.colorSpace),it.pixelStorei(dc,ke.unpackAlignment)}function Ti(){Ha.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function xi(ke,Qe){var vt=null;if(of(Qe)?vt=Qe:Qe&&(Yi(ke,Qe),"x"in Qe&&(ke.xOffset=Qe.x|0),"y"in Qe&&(ke.yOffset=Qe.y|0),of(Qe.data)&&(vt=Qe.data)),Qe.copy){var qt=wa.viewportWidth,wr=wa.viewportHeight;ke.width=ke.width||qt-ke.xOffset,ke.height=ke.height||wr-ke.yOffset,ke.needsCopy=!0}else if(!vt)ke.width=ke.width||1,ke.height=ke.height||1,ke.channels=ke.channels||4;else if(Er(vt))ke.channels=ke.channels||4,ke.data=vt,!("type"in Qe)&&ke.type===ds&&(ke.type=jc(vt));else if(Wc(vt))ke.channels=ke.channels||4,Bf(ke,vt),ke.alignment=1,ke.needsFree=!0;else if(Ir(vt)){var Nr=vt.data;!Array.isArray(Nr)&&ke.type===ds&&(ke.type=jc(Nr));var pr=vt.shape,mt=vt.stride,St,Ft,rr,hr,nr,dr;pr.length===3?(rr=pr[2],dr=mt[2]):(rr=1,dr=1),St=pr[0],Ft=pr[1],hr=mt[0],nr=mt[1],ke.alignment=1,ke.width=St,ke.height=Ft,ke.channels=rr,ke.format=ke.internalformat=ml[rr],ke.needsFree=!0,Ef(ke,Nr,hr,nr,dr,vt.offset)}else if(Mf(vt)||Ac(vt)||nf(vt))Mf(vt)||Ac(vt)?ke.element=vt:ke.element=vt.canvas,ke.width=ke.element.width,ke.height=ke.element.height,ke.channels=4;else if($l(vt))ke.element=vt,ke.width=vt.width,ke.height=vt.height,ke.channels=4;else if(Jf(vt))ke.element=vt,ke.width=vt.naturalWidth,ke.height=vt.naturalHeight,ke.channels=4;else if(Of(vt))ke.element=vt,ke.width=vt.videoWidth,ke.height=vt.videoHeight,ke.channels=4;else if(Vu(vt)){var or=ke.width||vt[0].length,Wt=ke.height||vt.length,ir=ke.channels;ma(vt[0][0])?ir=ir||vt[0][0].length:ir=ir||1;for(var Vt=Oe.shape(vt),Dr=1,Jr=0;Jr>=wr,vt.height>>=wr,xi(vt,qt[wr]),ke.mipmask|=1<=0&&!("faces"in Qe)&&(ke.genMipmaps=!0)}if("mag"in Qe){var qt=Qe.mag;ke.magFilter=yi[qt]}var wr=ke.wrapS,Nr=ke.wrapT;if("wrap"in Qe){var pr=Qe.wrap;typeof pr=="string"?wr=Nr=bi[pr]:Array.isArray(pr)&&(wr=bi[pr[0]],Nr=bi[pr[1]])}else{if("wrapS"in Qe){var mt=Qe.wrapS;wr=bi[mt]}if("wrapT"in Qe){var St=Qe.wrapT;Nr=bi[St]}}if(ke.wrapS=wr,ke.wrapT=Nr,"anisotropic"in Qe){var Ft=Qe.anisotropic;ke.anisotropic=Qe.anisotropic}if("mipmap"in Qe){var rr=!1;switch(typeof Qe.mipmap){case"string":ke.mipmapHint=Ya[Qe.mipmap],ke.genMipmaps=!0,rr=!0;break;case"boolean":rr=ke.genMipmaps=Qe.mipmap;break;case"object":ke.genMipmaps=!1,rr=!0;break;default:}rr&&!("min"in Qe)&&(ke.minFilter=us)}}function kl(ke,Qe){it.texParameteri(Qe,vl,ke.minFilter),it.texParameteri(Qe,Gs,ke.magFilter),it.texParameteri(Qe,Lo,ke.wrapS),it.texParameteri(Qe,bo,ke.wrapT),Zt.ext_texture_filter_anisotropic&&it.texParameteri(Qe,Bs,ke.anisotropic),ke.genMipmaps&&(it.hint(Tc,ke.mipmapHint),it.generateMipmap(Qe))}var tu=0,Vs={},pl=cr.maxTextureUnits,wl=Array(pl).map(function(){return null});function Zn(ke){Ha.call(this),this.mipmask=0,this.internalformat=Ki,this.id=tu++,this.refCount=1,this.target=ke,this.texture=it.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new fs,ya.profile&&(this.stats={size:0})}function Cl(ke){it.activeTexture(Ou),it.bindTexture(ke.target,ke.texture)}function Po(){var ke=wl[0];ke?it.bindTexture(ke.target,ke.texture):it.bindTexture(_a,null)}function ge(ke){var Qe=ke.texture,vt=ke.unit,qt=ke.target;vt>=0&&(it.activeTexture(Ou+vt),it.bindTexture(qt,null),wl[vt]=null),it.deleteTexture(Qe),ke.texture=null,ke.params=null,ke.pixels=null,ke.refCount=0,delete Vs[ke.id],va.textureCount--}d(Zn.prototype,{bind:function(){var ke=this;ke.bindCount+=1;var Qe=ke.unit;if(Qe<0){for(var vt=0;vt0)continue;qt.unit=-1}wl[vt]=ke,Qe=vt;break}Qe>=pl,ya.profile&&va.maxTextureUnits>nr)-rr,dr.height=dr.height||(vt.height>>nr)-hr,Cl(vt),vn(dr,_a,rr,hr,nr),Po(),nn(dr),qt}function Nr(pr,mt){var St=pr|0,Ft=mt|0||St;if(St===vt.width&&Ft===vt.height)return qt;qt.width=vt.width=St,qt.height=vt.height=Ft,Cl(vt);for(var rr=0;vt.mipmask>>rr;++rr){var hr=St>>rr,nr=Ft>>rr;if(!hr||!nr)break;it.texImage2D(_a,rr,vt.format,hr,nr,0,vt.format,vt.type,null)}return Po(),ya.profile&&(vt.stats.size=oc(vt.internalformat,vt.type,St,Ft,!1,!1)),qt}return qt(ke,Qe),qt.subimage=wr,qt.resize=Nr,qt._reglType="texture2d",qt._texture=vt,ya.profile&&(qt.stats=vt.stats),qt.destroy=function(){vt.decRef()},qt}function xe(ke,Qe,vt,qt,wr,Nr){var pr=new Zn(Ai);Vs[pr.id]=pr,va.cubeCount++;var mt=new Array(6);function St(hr,nr,dr,or,Wt,ir){var Vt,Dr=pr.texInfo;for(fs.call(Dr),Vt=0;Vt<6;++Vt)mt[Vt]=ho();if(typeof hr=="number"||!hr){var Jr=hr|0||1;for(Vt=0;Vt<6;++Vt)Dn(mt[Vt],Jr,Jr)}else if(typeof hr=="object")if(nr)Xn(mt[0],hr),Xn(mt[1],nr),Xn(mt[2],dr),Xn(mt[3],or),Xn(mt[4],Wt),Xn(mt[5],ir);else if(Sl(Dr,hr),Yi(pr,hr),"faces"in hr){var ga=hr.faces;for(Vt=0;Vt<6;++Vt)Ua(mt[Vt],pr),Xn(mt[Vt],ga[Vt])}else for(Vt=0;Vt<6;++Vt)Xn(mt[Vt],hr);for(Ua(pr,mt[0]),Dr.genMipmaps?pr.mipmask=(mt[0].width<<1)-1:pr.mipmask=mt[0].mipmask,pr.internalformat=mt[0].internalformat,St.width=mt[0].width,St.height=mt[0].height,Cl(pr),Vt=0;Vt<6;++Vt)zs(mt[Vt],ki+Vt);for(kl(Dr,Ai),Po(),ya.profile&&(pr.stats.size=oc(pr.internalformat,pr.type,St.width,St.height,Dr.genMipmaps,!0)),St.format=Qa[pr.internalformat],St.type=di[pr.type],St.mag=Va[Dr.magFilter],St.min=Bi[Dr.minFilter],St.wrapS=Li[Dr.wrapS],St.wrapT=Li[Dr.wrapT],Vt=0;Vt<6;++Vt)Wl(mt[Vt]);return St}function Ft(hr,nr,dr,or,Wt){var ir=dr|0,Vt=or|0,Dr=Wt|0,Jr=Ii();return Ua(Jr,pr),Jr.width=0,Jr.height=0,xi(Jr,nr),Jr.width=Jr.width||(pr.width>>Dr)-ir,Jr.height=Jr.height||(pr.height>>Dr)-Vt,Cl(pr),vn(Jr,ki+hr,ir,Vt,Dr),Po(),nn(Jr),St}function rr(hr){var nr=hr|0;if(nr!==pr.width){St.width=pr.width=nr,St.height=pr.height=nr,Cl(pr);for(var dr=0;dr<6;++dr)for(var or=0;pr.mipmask>>or;++or)it.texImage2D(ki+dr,or,pr.format,nr>>or,nr>>or,0,pr.format,pr.type,null);return Po(),ya.profile&&(pr.stats.size=oc(pr.internalformat,pr.type,St.width,St.height,!1,!0)),St}}return St(ke,Qe,vt,qt,wr,Nr),St.subimage=Ft,St.resize=rr,St._reglType="textureCube",St._texture=pr,ya.profile&&(St.stats=pr.stats),St.destroy=function(){pr.decRef()},St}function te(){for(var ke=0;ke>qt,vt.height>>qt,0,vt.internalformat,vt.type,null);else for(var wr=0;wr<6;++wr)it.texImage2D(ki+wr,qt,vt.internalformat,vt.width>>qt,vt.height>>qt,0,vt.internalformat,vt.type,null);kl(vt.texInfo,vt.target)})}function je(){for(var ke=0;ke=0?Wl=!0:bi.indexOf(fs)>=0&&(Wl=!1))),("depthTexture"in Zn||"depthStencilTexture"in Zn)&&(wl=!!(Zn.depthTexture||Zn.depthStencilTexture)),"depth"in Zn&&(typeof Zn.depth=="boolean"?zs=Zn.depth:(tu=Zn.depth,bl=!1)),"stencil"in Zn&&(typeof Zn.stencil=="boolean"?bl=Zn.stencil:(Vs=Zn.stencil,zs=!1)),"depthStencil"in Zn&&(typeof Zn.depthStencil=="boolean"?zs=bl=Zn.depthStencil:(pl=Zn.depthStencil,zs=!1,bl=!1))}var Po=null,ge=null,K=null,xe=null;if(Array.isArray(ho))Po=ho.map(Na);else if(ho)Po=[Na(ho)];else for(Po=new Array(kl),En=0;En0&&(nn.depth=xi[0].depth,nn.stencil=xi[0].stencil,nn.depthStencil=xi[0].depthStencil),xi[Ii]?xi[Ii](nn):xi[Ii]=Ua(nn)}return d(Xi,{width:En,height:En,color:fs})}function vn(Rn){var Ii,nn=Rn|0;if(nn===Xi.width)return Xi;var En=Xi.color;for(Ii=0;Ii=En.byteLength?Dn.subdata(En):(Dn.destroy(),Ua.buffers[Rn]=null)),Ua.buffers[Rn]||(Dn=Ua.buffers[Rn]=wa.create(Ii,mf,!1,!0)),nn.buffer=wa.getBuffer(Dn),nn.size=nn.buffer.dimension|0,nn.normalized=!1,nn.type=nn.buffer.dtype,nn.offset=0,nn.stride=0,nn.divisor=0,nn.state=1,Xi[Rn]=1}else wa.getBuffer(Ii)?(nn.buffer=wa.getBuffer(Ii),nn.size=nn.buffer.dimension|0,nn.normalized=!1,nn.type=nn.buffer.dtype,nn.offset=0,nn.stride=0,nn.divisor=0,nn.state=1):wa.getBuffer(Ii.buffer)?(nn.buffer=wa.getBuffer(Ii.buffer),nn.size=(+Ii.size||nn.buffer.dimension)|0,nn.normalized=!!Ii.normalized||!1,"type"in Ii?nn.type=Ta[Ii.type]:nn.type=nn.buffer.dtype,nn.offset=(Ii.offset||0)|0,nn.stride=(Ii.stride||0)|0,nn.divisor=(Ii.divisor||0)|0,nn.state=1):"x"in Ii&&(nn.x=+Ii.x||0,nn.y=+Ii.y||0,nn.z=+Ii.z||0,nn.w=+Ii.w||0,nn.state=2)}for(var Xn=0;Xn1)for(var Ri=0;Riea&&(ea=Ma.stats.uniformsCount)}),ea},cr.getMaxAttributesCount=function(){var ea=0;return si.forEach(function(Ma){Ma.stats.attributesCount>ea&&(ea=Ma.stats.attributesCount)}),ea});function Na(){wa={},va={};for(var ea=0;ea16&&(cr=Pi(cr,it.length*8));for(var oa=Array(16),wa=Array(16),va=0;va<16;va++)oa[va]=cr[va]^909522486,wa[va]=cr[va]^1549556828;var ya=Pi(oa.concat(Pc(Zt)),512+Zt.length*8);return Qt(Pi(wa.concat(ya),768))}function xu(it){for(var Zt=Vf?"0123456789ABCDEF":"0123456789abcdef",cr="",oa,wa=0;wa>>4&15)+Zt.charAt(oa&15);return cr}function Lc(it){for(var Zt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",cr="",oa=it.length,wa=0;wait.length*8?cr+=Xu:cr+=Zt.charAt(va>>>6*(3-ya)&63);return cr}function Jc(it,Zt){var cr=Zt.length,oa=Array(),wa,va,ya,Ya,bi=Array(Math.ceil(it.length/2));for(wa=0;wa0;){for(Ya=Array(),ya=0,wa=0;wa0||va>0)&&(Ya[Ya.length]=va);oa[oa.length]=ya,bi=Ya}var yi="";for(wa=oa.length-1;wa>=0;wa--)yi+=Zt.charAt(oa[wa]);var si=Math.ceil(it.length*8/(Math.log(Zt.length)/Math.log(2)));for(wa=yi.length;wa>>6&31,128|oa&63):oa<=65535?Zt+=String.fromCharCode(224|oa>>>12&15,128|oa>>>6&63,128|oa&63):oa<=2097151&&(Zt+=String.fromCharCode(240|oa>>>18&7,128|oa>>>12&63,128|oa>>>6&63,128|oa&63));return Zt}function Pc(it){for(var Zt=Array(it.length>>2),cr=0;cr>5]|=(it.charCodeAt(cr/8)&255)<<24-cr%32;return Zt}function Qt(it){for(var Zt="",cr=0;cr>5]>>>24-cr%32&255);return Zt}function br(it,Zt){return it>>>Zt|it<<32-Zt}function aa(it,Zt){return it>>>Zt}function $r(it,Zt,cr){return it&Zt^~it&cr}function ka(it,Zt,cr){return it&Zt^it&cr^Zt&cr}function li(it){return br(it,2)^br(it,13)^br(it,22)}function Ci(it){return br(it,6)^br(it,11)^br(it,25)}function Hi(it){return br(it,7)^br(it,18)^aa(it,3)}function Qi(it){return br(it,17)^br(it,19)^aa(it,10)}var pn=new Array(1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998);function Pi(it,Zt){var cr=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),oa=new Array(64),wa,va,ya,Ya,bi,yi,si,gn,zi,Ei,Na,ea;for(it[Zt>>5]|=128<<24-Zt%32,it[(Zt+64>>9<<4)+15]=Zt,zi=0;zi>16)+(Zt>>16)+(cr>>16);return oa<<16|cr&65535}function Ni(it){return Array.prototype.slice.call(it)}function mi(it){return Ni(it).join("")}function Sn(it){var Zt=it&&it.cache,cr=0,oa=[],wa=[],va=[];function ya(Na,ea){var Ma=ea&&ea.stable;if(!Ma){for(var Qa=0;Qa0&&(Na.push(di,"="),Na.push.apply(Na,Ni(arguments)),Na.push(";")),di}return d(ea,{def:Qa,toString:function(){return mi([Ma.length>0?"var "+Ma.join(",")+";":"",mi(Na)])}})}function bi(){var Na=Ya(),ea=Ya(),Ma=Na.toString,Qa=ea.toString;function di(Va,Bi){ea(Va,Bi,"=",Na.def(Va,Bi),";")}return d(function(){Na.apply(Na,Ni(arguments))},{def:Na.def,entry:Na,exit:ea,save:di,set:function(Va,Bi,Li){di(Va,Bi),Na(Va,Bi,"=",Li,";")},toString:function(){return Ma()+Qa()}})}function yi(){var Na=mi(arguments),ea=bi(),Ma=bi(),Qa=ea.toString,di=Ma.toString;return d(ea,{then:function(){return ea.apply(ea,Ni(arguments)),this},else:function(){return Ma.apply(Ma,Ni(arguments)),this},toString:function(){var Va=di();return Va&&(Va="else{"+Va+"}"),mi(["if(",Na,"){",Qa(),"}",Va])}})}var si=Ya(),gn={};function zi(Na,ea){var Ma=[];function Qa(){var hn="a"+Ma.length;return Ma.push(hn),hn}ea=ea||0;for(var di=0;di":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},za={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Xa={cw:et,ccw:dt};function fi(it){return Array.isArray(it)||Er(it)||Ir(it)}function ni(it){return it.sort(function(Zt,cr){return Zt===Me?-1:cr===Me?1:Zt=1,oa>=2,Zt)}else if(cr===Ms){var wa=it.data;return new La(wa.thisDep,wa.contextDep,wa.propDep,Zt)}else{if(cr===rl)return new La(!1,!1,!1,Zt);if(cr===Ns){for(var va=!1,ya=!1,Ya=!1,bi=0;bi=1&&(ya=!0),si>=2&&(Ya=!0)}else yi.type===Ms&&(va=va||yi.data.thisDep,ya=ya||yi.data.contextDep,Ya=Ya||yi.data.propDep)}return new La(va,ya,Ya,Zt)}else return new La(cr===Ko,cr===go,cr===un,Zt)}}var In=new La(!1,!1,!1,function(){});function Kn(it,Zt,cr,oa,wa,va,ya,Ya,bi,yi,si,gn,zi,Ei,Na,ea){var Ma=yi.Record,Qa={add:32774,subtract:32778,"reverse subtract":32779};cr.ext_blend_minmax&&(Qa.min=yt,Qa.max=Tt);var di=cr.angle_instanced_arrays,Va=cr.webgl_draw_buffers,Bi=cr.oes_vertex_array_object,Li={dirty:!0,profile:ea.profile},hn={},Ha=[],Ua={},Yi={};function Ri(mt){return mt.replace(".","_")}function Ti(mt,St,Ft){var rr=Ri(mt);Ha.push(mt),hn[rr]=Li[rr]=!!Ft,Ua[rr]=St}function xi(mt,St,Ft){var rr=Ri(mt);Ha.push(mt),Array.isArray(Ft)?(Li[rr]=Ft.slice(),hn[rr]=Ft.slice()):Li[rr]=hn[rr]=Ft,Yi[rr]=St}function Xi(mt){return!!isNaN(mt)}Ti(el,ci),Ti(ws,Da),xi(Fl,"blendColor",[0,0,0,0]),xi(_l,"blendEquationSeparate",[Xr,Xr]),xi(ll,"blendFuncSeparate",[Gr,_r,Gr,_r]),Ti(jn,ji,!0),xi(Io,"depthFunc",xa),xi(Js,"depthRange",[0,1]),xi(Ds,"depthMask",!0),xi(uu,uu,[!0,!0,!0,!0]),Ti(Iu,Aa),xi(Zu,"cullFace",De),xi(Ic,Ic,dt),xi(bu,bu,1),Ti(Rc,An),xi(Au,"polygonOffset",[0,0]),Ti(yc,Yn),Ti(fo,Nn),xi(zo,"sampleCoverage",[1,!1]),Ti(Dc,Vi),xi(lc,"stencilMask",-1),xi(Yu,"stencilFunc",[tr,0,-1]),xi(Fe,"stencilOpSeparate",[me,zt,zt,zt]),xi(I,"stencilOpSeparate",[De,zt,zt,zt]),Ti(ie,on),xi(Te,"scissor",[0,0,it.drawingBufferWidth,it.drawingBufferHeight]),xi(Me,Me,[0,0,it.drawingBufferWidth,it.drawingBufferHeight]);var vn={gl:it,context:zi,strings:Zt,next:hn,current:Li,draw:gn,elements:va,buffer:wa,shader:si,attributes:yi.state,vao:yi,uniforms:bi,framebuffer:Ya,extensions:cr,timer:Ei,isBufferArgs:fi},Rn={primTypes:Ra,compareFuncs:Sa,blendFuncs:ti,blendEquations:Qa,stencilOps:za,glTypes:Ta,orientationType:Xa};Va&&(Rn.backBuffer=[De],Rn.drawBuffer=p(oa.maxDrawbuffers,function(mt){return mt===0?[0]:p(mt,function(St){return Ja+St})}));var Ii=0;function nn(){var mt=Sn({cache:Na}),St=mt.link,Ft=mt.global;mt.id=Ii++,mt.batchId="0";var rr=St(vn),hr=mt.shared={props:"a0"};Object.keys(vn).forEach(function(ir){hr[ir]=Ft.def(rr,".",ir)});var nr=mt.next={},dr=mt.current={};Object.keys(Yi).forEach(function(ir){Array.isArray(Li[ir])&&(nr[ir]=Ft.def(hr.next,".",ir),dr[ir]=Ft.def(hr.current,".",ir))});var or=mt.constants={};Object.keys(Rn).forEach(function(ir){or[ir]=Ft.def(JSON.stringify(Rn[ir]))}),mt.invoke=function(ir,Vt){switch(Vt.type){case Tn:var Dr=["this",hr.context,hr.props,mt.batchId];return ir.def(St(Vt.data),".call(",Dr.slice(0,Math.max(Vt.data.length+1,4)),")");case un:return ir.def(hr.props,Vt.data);case go:return ir.def(hr.context,Vt.data);case Ko:return ir.def("this",Vt.data);case Ms:return Vt.data.append(mt,ir),Vt.data.ref;case rl:return Vt.data.toString();case Ns:return Vt.data.map(function(Jr){return mt.invoke(ir,Jr)})}},mt.attribCache={};var Wt={};return mt.scopeAttrib=function(ir){var Vt=Zt.id(ir);if(Vt in Wt)return Wt[Vt];var Dr=yi.scope[Vt];Dr||(Dr=yi.scope[Vt]=new Ma);var Jr=Wt[Vt]=St(Dr);return Jr},mt}function En(mt){var St=mt.static,Ft=mt.dynamic,rr;if(ze in St){var hr=!!St[ze];rr=rn(function(dr,or){return hr}),rr.enable=hr}else if(ze in Ft){var nr=Ft[ze];rr=dn(nr,function(dr,or){return dr.invoke(or,nr)})}return rr}function Dn(mt,St){var Ft=mt.static,rr=mt.dynamic;if(ht in Ft){var hr=Ft[ht];return hr?(hr=Ya.getFramebuffer(hr),rn(function(dr,or){var Wt=dr.link(hr),ir=dr.shared;or.set(ir.framebuffer,".next",Wt);var Vt=ir.context;return or.set(Vt,"."+pt,Wt+".width"),or.set(Vt,"."+Et,Wt+".height"),Wt})):rn(function(dr,or){var Wt=dr.shared;or.set(Wt.framebuffer,".next","null");var ir=Wt.context;return or.set(ir,"."+pt,ir+"."+yr),or.set(ir,"."+Et,ir+"."+kr),"null"})}else if(ht in rr){var nr=rr[ht];return dn(nr,function(dr,or){var Wt=dr.invoke(or,nr),ir=dr.shared,Vt=ir.framebuffer,Dr=or.def(Vt,".getFramebuffer(",Wt,")");or.set(Vt,".next",Dr);var Jr=ir.context;return or.set(Jr,"."+pt,Dr+"?"+Dr+".width:"+Jr+"."+yr),or.set(Jr,"."+Et,Dr+"?"+Dr+".height:"+Jr+"."+kr),Dr})}else return null}function Xn(mt,St,Ft){var rr=mt.static,hr=mt.dynamic;function nr(Wt){if(Wt in rr){var ir=rr[Wt],Vt=!0,Dr=ir.x|0,Jr=ir.y|0,ga,vi;return"width"in ir?ga=ir.width|0:Vt=!1,"height"in ir?vi=ir.height|0:Vt=!1,new La(!Vt&&St&&St.thisDep,!Vt&&St&&St.contextDep,!Vt&&St&&St.propDep,function(Zi,Fi){var ui=Zi.shared.context,_i=ga;"width"in ir||(_i=Fi.def(ui,".",pt,"-",Dr));var Si=vi;return"height"in ir||(Si=Fi.def(ui,".",Et,"-",Jr)),[Dr,Jr,_i,Si]})}else if(Wt in hr){var Ga=hr[Wt],ai=dn(Ga,function(Zi,Fi){var ui=Zi.invoke(Fi,Ga),_i=Zi.shared.context,Si=Fi.def(ui,".x|0"),Ui=Fi.def(ui,".y|0"),cn=Fi.def('"width" in ',ui,"?",ui,".width|0:","(",_i,".",pt,"-",Si,")"),yo=Fi.def('"height" in ',ui,"?",ui,".height|0:","(",_i,".",Et,"-",Ui,")");return[Si,Ui,cn,yo]});return St&&(ai.thisDep=ai.thisDep||St.thisDep,ai.contextDep=ai.contextDep||St.contextDep,ai.propDep=ai.propDep||St.propDep),ai}else return St?new La(St.thisDep,St.contextDep,St.propDep,function(Zi,Fi){var ui=Zi.shared.context;return[0,0,Fi.def(ui,".",pt),Fi.def(ui,".",Et)]}):null}var dr=nr(Me);if(dr){var or=dr;dr=new La(dr.thisDep,dr.contextDep,dr.propDep,function(Wt,ir){var Vt=or.append(Wt,ir),Dr=Wt.shared.context;return ir.set(Dr,"."+bt,Vt[2]),ir.set(Dr,"."+Rt,Vt[3]),Vt})}return{viewport:dr,scissor_box:nr(Te)}}function zs(mt,St){var Ft=mt.static,rr=typeof Ft[Ot]=="string"&&typeof Ft[wt]=="string";if(rr){if(Object.keys(St.dynamic).length>0)return null;var hr=St.static,nr=Object.keys(hr);if(nr.length>0&&typeof hr[nr[0]]=="number"){for(var dr=[],or=0;or"+Si+"?"+Vt+".constant["+Si+"]:0;"}).join(""),"}}else{","if(",ga,"(",Vt,".buffer)){",Zi,"=",vi,".createStream(",Qr,",",Vt,".buffer);","}else{",Zi,"=",vi,".getBuffer(",Vt,".buffer);","}",Fi,'="type" in ',Vt,"?",Jr.glTypes,"[",Vt,".type]:",Zi,".dtype;",Ga.normalized,"=!!",Vt,".normalized;");function ui(_i){ir(Ga[_i],"=",Vt,".",_i,"|0;")}return ui("size"),ui("offset"),ui("stride"),ui("divisor"),ir("}}"),ir.exit("if(",Ga.isStream,"){",vi,".destroyStream(",Zi,");","}"),Ga}hr[nr]=dn(dr,or)}),hr}function kl(mt){var St=mt.static,Ft=mt.dynamic,rr={};return Object.keys(St).forEach(function(hr){var nr=St[hr];rr[hr]=rn(function(dr,or){return typeof nr=="number"||typeof nr=="boolean"?""+nr:dr.link(nr)})}),Object.keys(Ft).forEach(function(hr){var nr=Ft[hr];rr[hr]=dn(nr,function(dr,or){return dr.invoke(or,nr)})}),rr}function tu(mt,St,Ft,rr,hr){var nr=mt.static,dr=mt.dynamic,or=zs(mt,St),Wt=Dn(mt,hr),ir=Xn(mt,Wt,hr),Vt=ho(mt,hr),Dr=Wl(mt,hr),Jr=bl(mt,hr,or);function ga(ui){var _i=ir[ui];_i&&(Dr[ui]=_i)}ga(Me),ga(Ri(Te));var vi=Object.keys(Dr).length>0,Ga={framebuffer:Wt,draw:Vt,shader:Jr,state:Dr,dirty:vi,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(Ga.profile=En(mt,hr),Ga.uniforms=fs(Ft,hr),Ga.drawVAO=Ga.scopeVAO=Vt.vao,!Ga.drawVAO&&Jr.program&&!or&&cr.angle_instanced_arrays&&Vt.static.elements){var ai=!0,Zi=Jr.program.attributes.map(function(ui){var _i=St.static[ui];return ai=ai&&!!_i,_i});if(ai&&Zi.length>0){var Fi=yi.getVAO(yi.createVAO({attributes:Zi,elements:Vt.static.elements}));Ga.drawVAO=new La(null,null,null,function(ui,_i){return ui.link(Fi)}),Ga.useVAO=!0}}return or?Ga.useVAO=!0:Ga.attributes=Sl(St,hr),Ga.context=kl(rr,hr),Ga}function Vs(mt,St,Ft){var rr=mt.shared,hr=rr.context,nr=mt.scope();Object.keys(Ft).forEach(function(dr){St.save(hr,"."+dr);var or=Ft[dr],Wt=or.append(mt,St);Array.isArray(Wt)?nr(hr,".",dr,"=[",Wt.join(),"];"):nr(hr,".",dr,"=",Wt,";")}),St(nr)}function pl(mt,St,Ft,rr){var hr=mt.shared,nr=hr.gl,dr=hr.framebuffer,or;Va&&(or=St.def(hr.extensions,".webgl_draw_buffers"));var Wt=mt.constants,ir=Wt.drawBuffer,Vt=Wt.backBuffer,Dr;Ft?Dr=Ft.append(mt,St):Dr=St.def(dr,".next"),rr||St("if(",Dr,"!==",dr,".cur){"),St("if(",Dr,"){",nr,".bindFramebuffer(",pa,",",Dr,".framebuffer);"),Va&&St(or,".drawBuffersWEBGL(",ir,"[",Dr,".colorAttachments.length]);"),St("}else{",nr,".bindFramebuffer(",pa,",null);"),Va&&St(or,".drawBuffersWEBGL(",Vt,");"),St("}",dr,".cur=",Dr,";"),rr||St("}")}function wl(mt,St,Ft){var rr=mt.shared,hr=rr.gl,nr=mt.current,dr=mt.next,or=rr.current,Wt=rr.next,ir=mt.cond(or,".dirty");Ha.forEach(function(Vt){var Dr=Ri(Vt);if(!(Dr in Ft.state)){var Jr,ga;if(Dr in dr){Jr=dr[Dr],ga=nr[Dr];var vi=p(Li[Dr].length,function(ai){return ir.def(Jr,"[",ai,"]")});ir(mt.cond(vi.map(function(ai,Zi){return ai+"!=="+ga+"["+Zi+"]"}).join("||")).then(hr,".",Yi[Dr],"(",vi,");",vi.map(function(ai,Zi){return ga+"["+Zi+"]="+ai}).join(";"),";"))}else{Jr=ir.def(Wt,".",Dr);var Ga=mt.cond(Jr,"!==",or,".",Dr);ir(Ga),Dr in Ua?Ga(mt.cond(Jr).then(hr,".enable(",Ua[Dr],");").else(hr,".disable(",Ua[Dr],");"),or,".",Dr,"=",Jr,";"):Ga(hr,".",Yi[Dr],"(",Jr,");",or,".",Dr,"=",Jr,";")}}}),Object.keys(Ft.state).length===0&&ir(or,".dirty=false;"),St(ir)}function Zn(mt,St,Ft,rr){var hr=mt.shared,nr=mt.current,dr=hr.current,or=hr.gl,Wt;ni(Object.keys(Ft)).forEach(function(ir){var Vt=Ft[ir];if(!(rr&&!rr(Vt))){var Dr=Vt.append(mt,St);if(Ua[ir]){var Jr=Ua[ir];sn(Vt)?(Wt=mt.link(Dr,{stable:!0}),St(mt.cond(Wt).then(or,".enable(",Jr,");").else(or,".disable(",Jr,");")),St(dr,".",ir,"=",Wt,";")):(St(mt.cond(Dr).then(or,".enable(",Jr,");").else(or,".disable(",Jr,");")),St(dr,".",ir,"=",Dr,";"))}else if(ma(Dr)){var ga=nr[ir];St(or,".",Yi[ir],"(",Dr,");",Dr.map(function(vi,Ga){return ga+"["+Ga+"]="+vi}).join(";"),";")}else sn(Vt)?(Wt=mt.link(Dr,{stable:!0}),St(or,".",Yi[ir],"(",Wt,");",dr,".",ir,"=",Wt,";")):St(or,".",Yi[ir],"(",Dr,");",dr,".",ir,"=",Dr,";")}})}function Cl(mt,St){di&&(mt.instancing=St.def(mt.shared.extensions,".angle_instanced_arrays"))}function Po(mt,St,Ft,rr,hr){var nr=mt.shared,dr=mt.stats,or=nr.current,Wt=nr.timer,ir=Ft.profile;function Vt(){return typeof performance>"u"?"Date.now()":"performance.now()"}var Dr,Jr;function ga(ui){Dr=St.def(),ui(Dr,"=",Vt(),";"),typeof hr=="string"?ui(dr,".count+=",hr,";"):ui(dr,".count++;"),Ei&&(rr?(Jr=St.def(),ui(Jr,"=",Wt,".getNumPendingQueries();")):ui(Wt,".beginQuery(",dr,");"))}function vi(ui){ui(dr,".cpuTime+=",Vt(),"-",Dr,";"),Ei&&(rr?ui(Wt,".pushScopeStats(",Jr,",",Wt,".getNumPendingQueries(),",dr,");"):ui(Wt,".endQuery();"))}function Ga(ui){var _i=St.def(or,".profile");St(or,".profile=",ui,";"),St.exit(or,".profile=",_i,";")}var ai;if(ir){if(sn(ir)){ir.enable?(ga(St),vi(St.exit),Ga("true")):Ga("false");return}ai=ir.append(mt,St),Ga(ai)}else ai=St.def(or,".profile");var Zi=mt.block();ga(Zi),St("if(",ai,"){",Zi,"}");var Fi=mt.block();vi(Fi),St.exit("if(",ai,"){",Fi,"}")}function ge(mt,St,Ft,rr,hr){var nr=mt.shared;function dr(Wt){switch(Wt){case os:case ul:case Il:return 2;case So:case tl:case eu:return 3;case Zo:case Jo:case Ru:return 4;default:return 1}}function or(Wt,ir,Vt){var Dr=nr.gl,Jr=St.def(Wt,".location"),ga=St.def(nr.attributes,"[",Jr,"]"),vi=Vt.state,Ga=Vt.buffer,ai=[Vt.x,Vt.y,Vt.z,Vt.w],Zi=["buffer","normalized","offset","stride"];function Fi(){St("if(!",ga,".buffer){",Dr,".enableVertexAttribArray(",Jr,");}");var _i=Vt.type,Si;if(Vt.size?Si=St.def(Vt.size,"||",ir):Si=ir,St("if(",ga,".type!==",_i,"||",ga,".size!==",Si,"||",Zi.map(function(cn){return ga+"."+cn+"!=="+Vt[cn]}).join("||"),"){",Dr,".bindBuffer(",Qr,",",Ga,".buffer);",Dr,".vertexAttribPointer(",[Jr,Si,_i,Vt.normalized,Vt.stride,Vt.offset],");",ga,".type=",_i,";",ga,".size=",Si,";",Zi.map(function(cn){return ga+"."+cn+"="+Vt[cn]+";"}).join(""),"}"),di){var Ui=Vt.divisor;St("if(",ga,".divisor!==",Ui,"){",mt.instancing,".vertexAttribDivisorANGLE(",[Jr,Ui],");",ga,".divisor=",Ui,";}")}}function ui(){St("if(",ga,".buffer){",Dr,".disableVertexAttribArray(",Jr,");",ga,".buffer=null;","}if(",$n.map(function(_i,Si){return ga+"."+_i+"!=="+ai[Si]}).join("||"),"){",Dr,".vertexAttrib4f(",Jr,",",ai,");",$n.map(function(_i,Si){return ga+"."+_i+"="+ai[Si]+";"}).join(""),"}")}vi===Qn?Fi():vi===co?ui():(St("if(",vi,"===",Qn,"){"),Fi(),St("}else{"),ui(),St("}"))}rr.forEach(function(Wt){var ir=Wt.name,Vt=Ft.attributes[ir],Dr;if(Vt){if(!hr(Vt))return;Dr=Vt.append(mt,St)}else{if(!hr(In))return;var Jr=mt.scopeAttrib(ir);Dr={},Object.keys(new Ma).forEach(function(ga){Dr[ga]=St.def(Jr,".",ga)})}or(mt.link(Wt),dr(Wt.info.type),Dr)})}function K(mt,St,Ft,rr,hr,nr){for(var dr=mt.shared,or=dr.gl,Wt,ir=0;ir1){for(var Uo=[],Is=[],Fo=0;Fo>1)",Ga],");")}function Ui(){Ft(ai,".drawArraysInstancedANGLE(",[Jr,ga,vi,Ga],");")}Vt&&Vt!=="null"?Fi?Si():(Ft("if(",Vt,"){"),Si(),Ft("}else{"),Ui(),Ft("}")):Ui()}function _i(){function Si(){Ft(nr+".drawElements("+[Jr,vi,Zi,ga+"<<(("+Zi+"-"+no+")>>1)"]+");")}function Ui(){Ft(nr+".drawArrays("+[Jr,ga,vi]+");")}Vt&&Vt!=="null"?Fi?Si():(Ft("if(",Vt,"){"),Si(),Ft("}else{"),Ui(),Ft("}")):Ui()}di&&(typeof Ga!="number"||Ga>=0)?typeof Ga=="string"?(Ft("if(",Ga,">0){"),ui(),Ft("}else if(",Ga,"<0){"),_i(),Ft("}")):ui():_i()}function te(mt,St,Ft,rr,hr){var nr=nn(),dr=nr.proc("body",hr);return di&&(nr.instancing=dr.def(nr.shared.extensions,".angle_instanced_arrays")),mt(nr,dr,Ft,rr),nr.compile().body}function ye(mt,St,Ft,rr){Cl(mt,St),Ft.useVAO?Ft.drawVAO?St(mt.shared.vao,".setVAO(",Ft.drawVAO.append(mt,St),");"):St(mt.shared.vao,".setVAO(",mt.shared.vao,".targetVAO);"):(St(mt.shared.vao,".setVAO(null);"),ge(mt,St,Ft,rr.attributes,function(){return!0})),K(mt,St,Ft,rr.uniforms,function(){return!0},!1),xe(mt,St,St,Ft)}function je(mt,St){var Ft=mt.proc("draw",1);Cl(mt,Ft),Vs(mt,Ft,St.context),pl(mt,Ft,St.framebuffer),wl(mt,Ft,St),Zn(mt,Ft,St.state),Po(mt,Ft,St,!1,!0);var rr=St.shader.progVar.append(mt,Ft);if(Ft(mt.shared.gl,".useProgram(",rr,".program);"),St.shader.program)ye(mt,Ft,St,St.shader.program);else{Ft(mt.shared.vao,".setVAO(null);");var hr=mt.global.def("{}"),nr=Ft.def(rr,".id"),dr=Ft.def(hr,"[",nr,"]");Ft(mt.cond(dr).then(dr,".call(this,a0);").else(dr,"=",hr,"[",nr,"]=",mt.link(function(or){return te(ye,mt,St,or,1)}),"(",rr,");",dr,".call(this,a0);"))}Object.keys(St.state).length>0&&Ft(mt.shared.current,".dirty=true;"),mt.shared.vao&&Ft(mt.shared.vao,".setVAO(null);")}function ke(mt,St,Ft,rr){mt.batchId="a1",Cl(mt,St);function hr(){return!0}ge(mt,St,Ft,rr.attributes,hr),K(mt,St,Ft,rr.uniforms,hr,!1),xe(mt,St,St,Ft)}function Qe(mt,St,Ft,rr){Cl(mt,St);var hr=Ft.contextDep,nr=St.def(),dr="a0",or="a1",Wt=St.def();mt.shared.props=Wt,mt.batchId=nr;var ir=mt.scope(),Vt=mt.scope();St(ir.entry,"for(",nr,"=0;",nr,"<",or,";++",nr,"){",Wt,"=",dr,"[",nr,"];",Vt,"}",ir.exit);function Dr(Zi){return Zi.contextDep&&hr||Zi.propDep}function Jr(Zi){return!Dr(Zi)}if(Ft.needsContext&&Vs(mt,Vt,Ft.context),Ft.needsFramebuffer&&pl(mt,Vt,Ft.framebuffer),Zn(mt,Vt,Ft.state,Dr),Ft.profile&&Dr(Ft.profile)&&Po(mt,Vt,Ft,!1,!0),rr)Ft.useVAO?Ft.drawVAO?Dr(Ft.drawVAO)?Vt(mt.shared.vao,".setVAO(",Ft.drawVAO.append(mt,Vt),");"):ir(mt.shared.vao,".setVAO(",Ft.drawVAO.append(mt,ir),");"):ir(mt.shared.vao,".setVAO(",mt.shared.vao,".targetVAO);"):(ir(mt.shared.vao,".setVAO(null);"),ge(mt,ir,Ft,rr.attributes,Jr),ge(mt,Vt,Ft,rr.attributes,Dr)),K(mt,ir,Ft,rr.uniforms,Jr,!1),K(mt,Vt,Ft,rr.uniforms,Dr,!0),xe(mt,ir,Vt,Ft);else{var ga=mt.global.def("{}"),vi=Ft.shader.progVar.append(mt,Vt),Ga=Vt.def(vi,".id"),ai=Vt.def(ga,"[",Ga,"]");Vt(mt.shared.gl,".useProgram(",vi,".program);","if(!",ai,"){",ai,"=",ga,"[",Ga,"]=",mt.link(function(Zi){return te(ke,mt,Ft,Zi,2)}),"(",vi,");}",ai,".call(this,a0[",nr,"],",nr,");")}}function vt(mt,St){var Ft=mt.proc("batch",2);mt.batchId="0",Cl(mt,Ft);var rr=!1,hr=!0;Object.keys(St.context).forEach(function(ga){rr=rr||St.context[ga].propDep}),rr||(Vs(mt,Ft,St.context),hr=!1);var nr=St.framebuffer,dr=!1;nr?(nr.propDep?rr=dr=!0:nr.contextDep&&rr&&(dr=!0),dr||pl(mt,Ft,nr)):pl(mt,Ft,null),St.state.viewport&&St.state.viewport.propDep&&(rr=!0);function or(ga){return ga.contextDep&&rr||ga.propDep}wl(mt,Ft,St),Zn(mt,Ft,St.state,function(ga){return!or(ga)}),(!St.profile||!or(St.profile))&&Po(mt,Ft,St,!1,"a1"),St.contextDep=rr,St.needsContext=hr,St.needsFramebuffer=dr;var Wt=St.shader.progVar;if(Wt.contextDep&&rr||Wt.propDep)Qe(mt,Ft,St,null);else{var ir=Wt.append(mt,Ft);if(Ft(mt.shared.gl,".useProgram(",ir,".program);"),St.shader.program)Qe(mt,Ft,St,St.shader.program);else{Ft(mt.shared.vao,".setVAO(null);");var Vt=mt.global.def("{}"),Dr=Ft.def(ir,".id"),Jr=Ft.def(Vt,"[",Dr,"]");Ft(mt.cond(Jr).then(Jr,".call(this,a0,a1);").else(Jr,"=",Vt,"[",Dr,"]=",mt.link(function(ga){return te(Qe,mt,St,ga,2)}),"(",ir,");",Jr,".call(this,a0,a1);"))}}Object.keys(St.state).length>0&&Ft(mt.shared.current,".dirty=true;"),mt.shared.vao&&Ft(mt.shared.vao,".setVAO(null);")}function qt(mt,St){var Ft=mt.proc("scope",3);mt.batchId="a2";var rr=mt.shared,hr=rr.current;if(Vs(mt,Ft,St.context),St.framebuffer&&St.framebuffer.append(mt,Ft),ni(Object.keys(St.state)).forEach(function(or){var Wt=St.state[or],ir=Wt.append(mt,Ft);ma(ir)?ir.forEach(function(Vt,Dr){Xi(Vt)?Ft.set(mt.next[or],"["+Dr+"]",Vt):Ft.set(mt.next[or],"["+Dr+"]",mt.link(Vt,{stable:!0}))}):sn(Wt)?Ft.set(rr.next,"."+or,mt.link(ir,{stable:!0})):Ft.set(rr.next,"."+or,ir)}),Po(mt,Ft,St,!0,!0),[$t,Kr,Ar,na,Tr].forEach(function(or){var Wt=St.draw[or];if(Wt){var ir=Wt.append(mt,Ft);Xi(ir)?Ft.set(rr.draw,"."+or,ir):Ft.set(rr.draw,"."+or,mt.link(ir),{stable:!0})}}),Object.keys(St.uniforms).forEach(function(or){var Wt=St.uniforms[or].append(mt,Ft);Array.isArray(Wt)&&(Wt="["+Wt.map(function(ir){return Xi(ir)?ir:mt.link(ir,{stable:!0})})+"]"),Ft.set(rr.uniforms,"["+mt.link(Zt.id(or),{stable:!0})+"]",Wt)}),Object.keys(St.attributes).forEach(function(or){var Wt=St.attributes[or].append(mt,Ft),ir=mt.scopeAttrib(or);Object.keys(new Ma).forEach(function(Vt){Ft.set(ir,"."+Vt,Wt[Vt])})}),St.scopeVAO){var nr=St.scopeVAO.append(mt,Ft);Xi(nr)?Ft.set(rr.vao,".targetVAO",nr):Ft.set(rr.vao,".targetVAO",mt.link(nr,{stable:!0}))}function dr(or){var Wt=St.shader[or];if(Wt){var ir=Wt.append(mt,Ft);Xi(ir)?Ft.set(rr.shader,"."+or,ir):Ft.set(rr.shader,"."+or,mt.link(ir,{stable:!0}))}}dr(wt),dr(Ot),Object.keys(St.state).length>0&&(Ft(hr,".dirty=true;"),Ft.exit(hr,".dirty=true;")),Ft("a1(",mt.shared.context,",a0,",mt.batchId,");")}function wr(mt){if(!(typeof mt!="object"||ma(mt))){for(var St=Object.keys(mt),Ft=0;Ft=0;--te){var ye=vn[te];ye&&ye(Na,null,0)}cr.flush(),si&&si.update()}function Xn(){!En&&vn.length>0&&(En=f.next(Dn))}function zs(){En&&(f.cancel(Dn),En=null)}function bl(te){te.preventDefault(),wa=!0,zs(),Rn.forEach(function(ye){ye()})}function ho(te){cr.getError(),wa=!1,va.restore(),hn.restore(),di.restore(),Ha.restore(),Ua.restore(),Yi.restore(),Bi.restore(),si&&si.restore(),Ri.procs.refresh(),Xn(),Ii.forEach(function(ye){ye()})}Xi&&(Xi.addEventListener(cs,bl,!1),Xi.addEventListener(vs,ho,!1));function Wl(){vn.length=0,zs(),Xi&&(Xi.removeEventListener(cs,bl),Xi.removeEventListener(vs,ho)),hn.clear(),Yi.clear(),Ua.clear(),Bi.clear(),Ha.clear(),Va.clear(),di.clear(),si&&si.clear(),nn.forEach(function(te){te()})}function fs(te){function ye(nr){var dr=d({},nr);delete dr.uniforms,delete dr.attributes,delete dr.context,delete dr.vao,"stencil"in dr&&dr.stencil.op&&(dr.stencil.opBack=dr.stencil.opFront=dr.stencil.op,delete dr.stencil.op);function or(Wt){if(Wt in dr){var ir=dr[Wt];delete dr[Wt],Object.keys(ir).forEach(function(Vt){dr[Wt+"."+Vt]=ir[Vt]})}}return or("blend"),or("depth"),or("cull"),or("stencil"),or("polygonOffset"),or("scissor"),or("sample"),"vao"in nr&&(dr.vao=nr.vao),dr}function je(nr,dr){var or={},Wt={};return Object.keys(nr).forEach(function(ir){var Vt=nr[ir];if(h.isDynamic(Vt)){Wt[ir]=h.unbox(Vt,ir);return}else if(dr&&Array.isArray(Vt)){for(var Dr=0;Dr0)return mt.call(this,rr(nr|0),nr|0)}else if(Array.isArray(nr)){if(nr.length)return mt.call(this,nr,nr.length)}else return pr.call(this,nr)}return d(hr,{stats:wr,destroy:function(){Nr.destroy()}})}var Sl=Yi.setFBO=fs({framebuffer:h.define.call(null,Al,"framebuffer")});function kl(te,ye){var je=0;Ri.procs.poll();var ke=ye.color;ke&&(cr.clearColor(+ke[0]||0,+ke[1]||0,+ke[2]||0,+ke[3]||0),je|=al),"depth"in ye&&(cr.clearDepth(+ye.depth),je|=xl),"stencil"in ye&&(cr.clearStencil(ye.stencil|0),je|=mn),cr.clear(je)}function tu(te){if("framebuffer"in te)if(te.framebuffer&&te.framebuffer_reglType==="framebufferCube")for(var ye=0;ye<6;++ye)Sl(d({framebuffer:te.framebuffer.faces[ye]},te),kl);else Sl(te,kl);else kl(null,te)}function Vs(te){vn.push(te);function ye(){var je=Rl(vn,te);function ke(){var Qe=Rl(vn,ke);vn[Qe]=vn[vn.length-1],vn.length-=1,vn.length<=0&&zs()}vn[je]=ke}return Xn(),{cancel:ye}}function pl(){var te=xi.viewport,ye=xi.scissor_box;te[0]=te[1]=ye[0]=ye[1]=0,Na.viewportWidth=Na.framebufferWidth=Na.drawingBufferWidth=te[2]=ye[2]=cr.drawingBufferWidth,Na.viewportHeight=Na.framebufferHeight=Na.drawingBufferHeight=te[3]=ye[3]=cr.drawingBufferHeight}function wl(){Na.tick+=1,Na.time=Cl(),pl(),Ri.procs.poll()}function Zn(){Ha.refresh(),pl(),Ri.procs.refresh(),si&&si.update()}function Cl(){return(v()-gn)/1e3}Zn();function Po(te,ye){var je;switch(te){case"frame":return Vs(ye);case"lost":je=Rn;break;case"restore":je=Ii;break;case"destroy":je=nn;break;default:}return je.push(ye),{cancel:function(){for(var ke=0;ke=0},read:Ti,destroy:Wl,_gl:cr,_refresh:Zn,poll:function(){wl(),si&&si.update()},now:Cl,stats:Ya,getCachedCode:ge,preloadCachedCode:K});return Zt.onDone(null,xe),xe}return _c})}}),xT=He({"src/lib/prepare_regl.js"(Z,V){"use strict";var d=TE(),x=Lq();V.exports=function(E,e,t){var r=E._fullLayout,o=!0;return r._glcanvas.each(function(a){if(a.regl){a.regl.preloadCachedCode(t);return}if(!(a.pick&&!r._has("parcoords"))){try{a.regl=x({canvas:this,attributes:{antialias:!a.pick,preserveDrawingBuffer:!0},pixelRatio:E._context.plotGlPixelRatio||window.devicePixelRatio,extensions:e||[],cachedCode:t||{}})}catch{o=!1}a.regl||(o=!1),o&&this.addEventListener("webglcontextlost",function(n){E&&E.emit&&E.emit("plotly_webglcontextlost",{event:n,layer:a.key})},!1)}}),o||d({container:r._glcontainer.node()}),o}}}),p6=He({"src/traces/scattergl/plot.js"(h,V){"use strict";var d=HE(),x=a6(),S=pq(),E=Cq(),e=sa(),t=Jd().selectMode,r=xT(),o=Fu(),a=O5(),n=qE().styleTextSelection,i={};function s(f,v,c,T){var l=f._size,_=f.width*T,w=f.height*T,A=l.l*T,M=l.b*T,g=l.r*T,b=l.t*T,p=l.w*T,u=l.h*T;return[A+v.domain[0]*p,M+c.domain[0]*u,_-g-(1-v.domain[1])*p,w-b-(1-c.domain[1])*u]}var h=V.exports=function(v,c,T){if(T.length){var l=v._fullLayout,_=c._scene,w=c.xaxis,A=c.yaxis,M,g;if(_){var b=r(v,["ANGLE_instanced_arrays","OES_element_index_uint"],i);if(!b){_.init();return}var p=_.count,u=l._glcanvas.data()[0].regl;if(a(v,c,T),_.dirty){if((_.line2d||_.error2d)&&!(_.scatter2d||_.fill2d||_.glText)&&u.clear({color:!0,depth:!0}),_.error2d===!0&&(_.error2d=S(u)),_.line2d===!0&&(_.line2d=x(u)),_.scatter2d===!0&&(_.scatter2d=d(u)),_.fill2d===!0&&(_.fill2d=x(u)),_.glText===!0)for(_.glText=new Array(p),M=0;M_.glText.length){var y=p-_.glText.length;for(M=0;MQ&&(isNaN(j[re])||isNaN(j[re+1]));)re-=2;ae.positions=j.slice(Q,re+2)}return ae}),_.line2d.update(_.lineOptions)),_.error2d){var L=(_.errorXOptions||[]).concat(_.errorYOptions||[]);_.error2d.update(L)}_.scatter2d&&_.scatter2d.update(_.markerOptions),_.fillOrder=e.repeat(null,p),_.fill2d&&(_.fillOptions=_.fillOptions.map(function(ae,j){var Q=T[j];if(!(!ae||!Q||!Q[0]||!Q[0].trace)){var re=Q[0],pe=re.trace,we=re.t,Se=_.lineOptions[j],Ie,Re,We=[];pe._ownfill&&We.push(j),pe._nexttrace&&We.push(j+1),We.length&&(_.fillOrder[j]=We);var at=[],nt=Se&&Se.positions||we.positions,tt,qe;if(pe.fill==="tozeroy"){for(tt=0;tttt&&isNaN(nt[qe+1]);)qe-=2;nt[tt+1]!==0&&(at=[nt[tt],0]),at=at.concat(nt.slice(tt,qe+2)),nt[qe+1]!==0&&(at=at.concat([nt[qe],0]))}else if(pe.fill==="tozerox"){for(tt=0;tttt&&isNaN(nt[qe]);)qe-=2;nt[tt]!==0&&(at=[0,nt[tt+1]]),at=at.concat(nt.slice(tt,qe+2)),nt[qe]!==0&&(at=at.concat([0,nt[qe+1]]))}else if(pe.fill==="toself"||pe.fill==="tonext"){for(at=[],Ie=0,ae.splitNull=!0,Re=0;Re-1;for(let[ae]of T)if(ae){var O=ae.trace,P=ae.t,U=P.index,B=O._length,X=P.x,$=P.y;if(O.selectedpoints||F||N){if(F||(F=!0),O.selectedpoints){var le=_.selectBatch[U]=e.selIndices2selPoints(O),ce={};for(g=0;gw&&c||_n,m;for(y?m=c.sizeAvg||Math.max(c.size,3):m=S(h,v),A=0;A<_.length;A++)w=_[A],M=f[w],g=x.getFromId(s,h._diag[w][0])||{},b=x.getFromId(s,h._diag[w][1])||{},E(s,h,g,b,T[A],T[A],m);var R=o(s,h);return R.matrix||(R.matrix=!0),R.matrixOptions=c,R.selectedOptions=t(s,h,h.selected),R.unselectedOptions=t(s,h,h.unselected),[{x:!1,y:!1,t:{},trace:h}]}}}),Fq=He({"node_modules/performance-now/lib/performance-now.js"(Z,V){(function(){var d,x,S,E,e,t;typeof performance<"u"&&performance!==null&&performance.now?V.exports=function(){return performance.now()}:typeof process<"u"&&process!==null&&process.hrtime?(V.exports=function(){return(d()-e)/1e6},x=process.hrtime,d=function(){var r;return r=x(),r[0]*1e9+r[1]},E=d(),t=process.uptime()*1e9,e=E-t):Date.now?(V.exports=function(){return Date.now()-S},S=Date.now()):(V.exports=function(){return new Date().getTime()-S},S=new Date().getTime())}).call(Z)}}),Oq=He({"node_modules/raf/index.js"(Z,V){var d=Fq(),x=window,S=["moz","webkit"],E="AnimationFrame",e=x["request"+E],t=x["cancel"+E]||x["cancelRequest"+E];for(r=0;!e&&r{this.draw(),this.dirty=!0,this.planned=null})):(this.draw(),this.dirty=!0,E(()=>{this.dirty=!1})),this)},o.prototype.update=function(...s){if(!s.length)return;for(let v=0;vm||!c.lower&&y{h[T+_]=v})}this.scatter.draw(...h)}return this},o.prototype.destroy=function(){return this.traces.forEach(s=>{s.buffer&&s.buffer.destroy&&s.buffer.destroy()}),this.traces=null,this.passes=null,this.scatter.destroy(),this};function a(s,h,f){let v=s.id!=null?s.id:s,c=h,T=f;return v<<16|(c&255)<<8|T&255}function n(s,h,f){let v,c,T,l,_,w,A,M,g=s[h],b=s[f];return g.length>2?(v=g[0],T=g[2],c=g[1],l=g[3]):g.length?(v=c=g[0],T=l=g[1]):(v=g.x,c=g.y,T=g.x+g.width,l=g.y+g.height),b.length>2?(_=b[0],A=b[2],w=b[1],M=b[3]):b.length?(_=w=b[0],A=M=b[1]):(_=b.x,w=b.y,A=b.x+b.width,M=b.y+b.height),[_,c,A,l]}function i(s){if(typeof s=="number")return[s,s,s,s];if(s.length===2)return[s[0],s[1],s[0],s[1]];{let h=t(s);return[h.x,h.y,h.x+h.width,h.y+h.height]}}}}),Uq=He({"src/traces/splom/plot.js"(Z,V){"use strict";var d=Nq(),x=sa(),S=ef(),E=Jd().selectMode;V.exports=function(r,o,a){if(a.length)for(var n=0;n-1,N=E(c)||!!n.selectedpoints||F,O=!0;if(N){var P=n._length;if(n.selectedpoints){s.selectBatch=n.selectedpoints;var U=n.selectedpoints,B={};for(_=0;_=X[$][0]&&B<=X[$][1])return!0;return!1}function h(B){B.attr("x",-d.bar.captureWidth/2).attr("width",d.bar.captureWidth)}function f(B){B.attr("visibility","visible").style("visibility","visible").attr("fill","yellow").attr("opacity",0)}function v(B){if(!B.brush.filterSpecified)return"0,"+B.height;for(var X=c(B.brush.filter.getConsolidated(),B.height),$=[0],le,ce,de,G=X.length?X[0][0]:null,Y=0;YB[1]+$||X=.9*B[1]+.1*B[0]?"n":X<=.9*B[0]+.1*B[1]?"s":"ns"}function l(){x.select(document.body).style("cursor",null)}function _(B){B.attr("stroke-dasharray",v)}function w(B,X){var $=x.select(B).selectAll(".highlight, .highlight-shadow"),le=X?$.transition().duration(d.bar.snapDuration).each("end",X):$;_(le)}function A(B,X){var $=B.brush,le=$.filterSpecified,ce=NaN,de={},G;if(le){var Y=B.height,ee=$.filter.getConsolidated(),q=c(ee,Y),se=NaN,ae=NaN,j=NaN;for(G=0;G<=q.length;G++){var Q=q[G];if(Q&&Q[0]<=X&&X<=Q[1]){se=G;break}else if(ae=G?G-1:NaN,Q&&Q[0]>X){j=G;break}}if(ce=se,isNaN(ce)&&(isNaN(ae)||isNaN(j)?ce=isNaN(ae)?j:ae:ce=X-q[ae][1]=Ie[0]&&Se<=Ie[1]){de.clickableOrdinalRange=Ie;break}}}return de}function M(B,X){x.event.sourceEvent.stopPropagation();var $=X.height-x.mouse(B)[1]-2*d.verticalPadding,le=X.unitToPaddedPx.invert($),ce=X.brush,de=A(X,$),G=de.interval,Y=ce.svgBrush;if(Y.wasDragged=!1,Y.grabbingBar=de.region==="ns",Y.grabbingBar){var ee=G.map(X.unitToPaddedPx);Y.grabPoint=$-ee[0]-d.verticalPadding,Y.barLength=ee[1]-ee[0]}Y.clickableOrdinalRange=de.clickableOrdinalRange,Y.stayingIntervals=X.multiselect&&ce.filterSpecified?ce.filter.getConsolidated():[],G&&(Y.stayingIntervals=Y.stayingIntervals.filter(function(q){return q[0]!==G[0]&&q[1]!==G[1]})),Y.startExtent=de.region?G[de.region==="s"?1:0]:le,X.parent.inBrushDrag=!0,Y.brushStartCallback()}function g(B,X){x.event.sourceEvent.stopPropagation();var $=X.height-x.mouse(B)[1]-2*d.verticalPadding,le=X.brush.svgBrush;le.wasDragged=!0,le._dragging=!0,le.grabbingBar?le.newExtent=[$-le.grabPoint,$+le.barLength-le.grabPoint].map(X.unitToPaddedPx.invert):le.newExtent=[le.startExtent,X.unitToPaddedPx.invert($)].sort(e),X.brush.filterSpecified=!0,le.extent=le.stayingIntervals.concat([le.newExtent]),le.brushCallback(X),w(B.parentNode)}function b(B,X){var $=X.brush,le=$.filter,ce=$.svgBrush;ce._dragging||(p(B,X),g(B,X),X.brush.svgBrush.wasDragged=!1),ce._dragging=!1;var de=x.event;de.sourceEvent.stopPropagation();var G=ce.grabbingBar;if(ce.grabbingBar=!1,ce.grabLocation=void 0,X.parent.inBrushDrag=!1,l(),!ce.wasDragged){ce.wasDragged=void 0,ce.clickableOrdinalRange?$.filterSpecified&&X.multiselect?ce.extent.push(ce.clickableOrdinalRange):(ce.extent=[ce.clickableOrdinalRange],$.filterSpecified=!0):G?(ce.extent=ce.stayingIntervals,ce.extent.length===0&&z($)):z($),ce.brushCallback(X),w(B.parentNode),ce.brushEndCallback($.filterSpecified?le.getConsolidated():[]);return}var Y=function(){le.set(le.getConsolidated())};if(X.ordinal){var ee=X.unitTickvals;ee[ee.length-1]ce.newExtent[0];ce.extent=ce.stayingIntervals.concat(q?[ce.newExtent]:[]),ce.extent.length||z($),ce.brushCallback(X),q?w(B.parentNode,Y):(Y(),w(B.parentNode))}else Y();ce.brushEndCallback($.filterSpecified?le.getConsolidated():[])}function p(B,X){var $=X.height-x.mouse(B)[1]-2*d.verticalPadding,le=A(X,$),ce="crosshair";le.clickableOrdinalRange?ce="pointer":le.region&&(ce=le.region+"-resize"),x.select(document.body).style("cursor",ce)}function u(B){B.on("mousemove",function(X){x.event.preventDefault(),X.parent.inBrushDrag||p(this,X)}).on("mouseleave",function(X){X.parent.inBrushDrag||l()}).call(x.behavior.drag().on("dragstart",function(X){M(this,X)}).on("drag",function(X){g(this,X)}).on("dragend",function(X){b(this,X)}))}function y(B,X){return B[0]-X[0]}function m(B,X,$){var le=$._context.staticPlot,ce=B.selectAll(".background").data(E);ce.enter().append("rect").classed("background",!0).call(h).call(f).style("pointer-events",le?"none":"auto").attr("transform",t(0,d.verticalPadding)),ce.call(u).attr("height",function(Y){return Y.height-d.verticalPadding});var de=B.selectAll(".highlight-shadow").data(E);de.enter().append("line").classed("highlight-shadow",!0).attr("x",-d.bar.width/2).attr("stroke-width",d.bar.width+d.bar.strokeWidth).attr("stroke",X).attr("opacity",d.bar.strokeOpacity).attr("stroke-linecap","butt"),de.attr("y1",function(Y){return Y.height}).call(_);var G=B.selectAll(".highlight").data(E);G.enter().append("line").classed("highlight",!0).attr("x",-d.bar.width/2).attr("stroke-width",d.bar.width-d.bar.strokeWidth).attr("stroke",d.bar.fillColor).attr("opacity",d.bar.fillOpacity).attr("stroke-linecap","butt"),G.attr("y1",function(Y){return Y.height}).call(_)}function R(B,X,$){var le=B.selectAll("."+d.cn.axisBrush).data(E,S);le.enter().append("g").classed(d.cn.axisBrush,!0),m(le,X,$)}function L(B){return B.svgBrush.extent.map(function(X){return X.slice()})}function z(B){B.filterSpecified=!1,B.svgBrush.extent=[[-1/0,1/0]]}function F(B){return function($){var le=$.brush,ce=L(le),de=ce.slice();le.filter.set(de),B()}}function N(B){for(var X=B.slice(),$=[],le,ce=X.shift();ce;){for(le=ce.slice();(ce=X.shift())&&ce[0]<=le[1];)le[1]=Math.max(le[1],ce[1]);$.push(le)}return $.length===1&&$[0][0]>$[0][1]&&($=[]),$}function O(){var B=[],X,$;return{set:function(le){B=le.map(function(ce){return ce.slice().sort(e)}).sort(y),B.length===1&&B[0][0]===-1/0&&B[0][1]===1/0&&(B=[[0,-1]]),X=N(B),$=B.reduce(function(ce,de){return[Math.min(ce[0],de[0]),Math.max(ce[1],de[1])]},[1/0,-1/0])},get:function(){return B.slice()},getConsolidated:function(){return X},getBounds:function(){return $}}}function P(B,X,$,le,ce,de){var G=O();return G.set($),{filter:G,filterSpecified:X,svgBrush:{extent:[],brushStartCallback:le,brushCallback:F(ce),brushEndCallback:de}}}function U(B,X){if(Array.isArray(B[0])?(B=B.map(function(le){return le.sort(e)}),X.multiselect?B=N(B.sort(y)):B=[B[0]]):B=[B.sort(e)],X.tickvals){var $=X.tickvals.slice().sort(e);if(B=B.map(function(le){var ce=[i(0,$,le[0],[]),i(1,$,le[1],[])];if(ce[1]>ce[0])return ce}).filter(function(le){return le}),!B.length)return}return B.length>1?B:B[0]}V.exports={makeBrush:P,ensureAxisBrush:R,cleanRanges:U}}}),Zq=He({"src/traces/parcoords/defaults.js"(Z,V){"use strict";var d=sa(),x=wp().hasColorscale,S=_h(),E=wc().defaults,e=hp(),t=Ho(),r=m6(),o=g6(),a=Ax().maxDimensionCount,n=bT();function i(h,f,v,c,T){var l=T("line.color",v);if(x(h,"line")&&d.isArrayOrTypedArray(l)){if(l.length)return T("line.colorscale"),S(h,f,c,T,{prefix:"line.",cLetter:"c"}),l.length;f.line.color=v}return 1/0}function s(h,f,v,c){function T(M,g){return d.coerce(h,f,r.dimensions,M,g)}var l=T("values"),_=T("visible");if(l&&l.length||(_=f.visible=!1),_){T("label"),T("tickvals"),T("ticktext"),T("tickformat");var w=T("range");f._ax={_id:"y",type:"linear",showexponent:"all",exponentformat:"B",range:w},t.setConvert(f._ax,c.layout),T("multiselect");var A=T("constraintrange");A&&(f.constraintrange=o.cleanRanges(A,f))}}V.exports=function(f,v,c,T){function l(g,b){return d.coerce(f,v,r,g,b)}var _=f.dimensions;Array.isArray(_)&&_.length>a&&(d.log("parcoords traces support up to "+a+" dimensions at the moment"),_.splice(a));var w=e(f,v,{name:"dimensions",layout:T,handleItemDefaults:s}),A=i(f,v,c,T,l);E(v,T,l),(!Array.isArray(w)||!w.length)&&(v.visible=!1),n(v,w,"values",A);var M=d.extendFlat({},T.font,{size:Math.round(T.font.size/1.2)});d.coerceFont(l,"labelfont",M),d.coerceFont(l,"tickfont",M,{autoShadowDflt:!0}),d.coerceFont(l,"rangefont",M),l("labelangle"),l("labelside"),l("unselected.line.color"),l("unselected.line.opacity")}}}),Yq=He({"src/traces/parcoords/calc.js"(Z,V){"use strict";var d=sa().isArrayOrTypedArray,x=rc(),S=kv().wrap;V.exports=function(t,r){var o,a;return x.hasColorscale(r,"line")&&d(r.line.color)?(o=r.line.color,a=x.extractOpts(r.line).colorscale,x.calc(t,r,{vals:o,containerStr:"line",cLetter:"c"})):(o=E(r._length),a=[[0,r.line.color],[1,r.line.color]]),S({lineColor:o,cscale:a})};function E(e){for(var t=new Array(e),r=0;r>>16,(Z&65280)>>>8,Z&255],alpha:1};if(typeof Z=="number")return{space:"rgb",values:[Z>>>16,(Z&65280)>>>8,Z&255],alpha:1};if(Z=String(Z).toLowerCase(),wT.default[Z])S=wT.default[Z].slice(),e="rgb";else if(Z==="transparent")E=0,e="rgb",S=[0,0,0];else if(Z[0]==="#"){var t=Z.slice(1),r=t.length,o=r<=4;E=1,o?(S=[parseInt(t[0]+t[0],16),parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16)],r===4&&(E=parseInt(t[3]+t[3],16)/255)):(S=[parseInt(t[0]+t[1],16),parseInt(t[2]+t[3],16),parseInt(t[4]+t[5],16)],r===8&&(E=parseInt(t[6]+t[7],16)/255)),S[0]||(S[0]=0),S[1]||(S[1]=0),S[2]||(S[2]=0),e="rgb"}else if(x=/^((?:rgba?|hs[lvb]a?|hwba?|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms|oklch|oklab|color))\s*\(([^\)]*)\)/.exec(Z)){var a=x[1];e=a.replace(/a$/,"");var n=e==="cmyk"?4:e==="gray"?1:3;S=x[2].trim().split(/\s*[,\/]\s*|\s+/),e==="color"&&(e=S.shift()),S=S.map(function(i,s){if(i[i.length-1]==="%")return i=parseFloat(i)/100,s===3?i:e==="rgb"?i*255:e[0]==="h"||e[0]==="l"&&!s?i*100:e==="lab"?i*125:e==="lch"?s<2?i*150:i*360:e[0]==="o"&&!s?i:e==="oklab"?i*.4:e==="oklch"?s<2?i*.4:i*360:i;if(e[s]==="h"||s===2&&e[e.length-1]==="h"){if(TT[i]!==void 0)return TT[i];if(i.endsWith("deg"))return parseFloat(i);if(i.endsWith("turn"))return parseFloat(i)*360;if(i.endsWith("grad"))return parseFloat(i)*360/400;if(i.endsWith("rad"))return parseFloat(i)*180/Math.PI}return i==="none"?0:parseFloat(i)}),E=S.length>n?S.pop():1}else/[0-9](?:\s|\/|,)/.test(Z)&&(S=Z.match(/([0-9]+)/g).map(function(i){return parseFloat(i)}),e=((d=(V=Z.match(/([a-z])/ig))==null?void 0:V.join(""))==null?void 0:d.toLowerCase())||"rgb");return{space:e,values:S,alpha:E}}var wT,y6,TT,Jq=Go({"node_modules/color-parse/index.js"(){wT=jp(xE(),1),y6=Kq,TT={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}}}),Sx,_6=Go({"node_modules/color-space/rgb.js"(){Sx={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}}}),Mx,$q=Go({"node_modules/color-space/hsl.js"(){_6(),Mx={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(Z){var V=Z[0]/360,d=Z[1]/100,x=Z[2]/100,S,E,e,t,r,o=0;if(d===0)return r=x*255,[r,r,r];for(E=x<.5?x*(1+d):x+d-x*d,S=2*x-E,t=[0,0,0];o<3;)e=V+1/3*-(o-1),e<0?e++:e>1&&e--,r=6*e<1?S+(E-S)*6*e:2*e<1?E:3*e<2?S+(E-S)*(2/3-e)*6:S,t[o++]=r*255;return t}},Sx.hsl=function(Z){var V=Z[0]/255,d=Z[1]/255,x=Z[2]/255,S=Math.min(V,d,x),E=Math.max(V,d,x),e=E-S,t,r,o;return E===S?t=0:V===E?t=(d-x)/e:d===E?t=2+(x-V)/e:x===E&&(t=4+(V-d)/e),t=Math.min(t*60,360),t<0&&(t+=360),o=(S+E)/2,E===S?r=0:o<=.5?r=e/(E+S):r=e/(2-E-S),[t,r*100,o*100]}}}),x6={};Kl(x6,{default:()=>Qq});function Qq(Z){Array.isArray(Z)&&Z.raw&&(Z=String.raw(...arguments)),Z instanceof Number&&(Z=+Z);var V,d,x,S=y6(Z);if(!S.space)return[];let E=S.space[0]==="h"?Mx.min:Sx.min,e=S.space[0]==="h"?Mx.max:Sx.max;return V=Array(3),V[0]=Math.min(Math.max(S.values[0],E[0]),e[0]),V[1]=Math.min(Math.max(S.values[1],E[1]),e[1]),V[2]=Math.min(Math.max(S.values[2],E[2]),e[2]),S.space[0]==="h"&&(V=Mx.rgb(V)),V.push(Math.min(Math.max(S.alpha,0),1)),V}var eV=Go({"node_modules/color-rgba/index.js"(){Jq(),_6(),$q()}}),b6=He({"src/traces/parcoords/helpers.js"(Z){"use strict";var V=sa().isTypedArray;Z.convertTypedArray=function(d){return V(d)?Array.prototype.slice.call(d):d},Z.isOrdinal=function(d){return!!d.tickvals},Z.isVisible=function(d){return d.visible||!("visible"in d)}}}),tV=He({"src/traces/parcoords/lines.js"(Z,V){"use strict";var d=["precision highp float;","","varying vec4 fragColor;","","attribute vec4 p01_04, p05_08, p09_12, p13_16,"," p17_20, p21_24, p25_28, p29_32,"," p33_36, p37_40, p41_44, p45_48,"," p49_52, p53_56, p57_60, colors;","","uniform mat4 dim0A, dim1A, dim0B, dim1B, dim0C, dim1C, dim0D, dim1D,"," loA, hiA, loB, hiB, loC, hiC, loD, hiD;","","uniform vec2 resolution, viewBoxPos, viewBoxSize;","uniform float maskHeight;","uniform float drwLayer; // 0: context, 1: focus, 2: pick","uniform vec4 contextColor;","uniform sampler2D maskTexture, palette;","","bool isPick = (drwLayer > 1.5);","bool isContext = (drwLayer < 0.5);","","const vec4 ZEROS = vec4(0.0, 0.0, 0.0, 0.0);","const vec4 UNITS = vec4(1.0, 1.0, 1.0, 1.0);","","float val(mat4 p, mat4 v) {"," return dot(matrixCompMult(p, v) * UNITS, UNITS);","}","","float axisY(float ratio, mat4 A, mat4 B, mat4 C, mat4 D) {"," float y1 = val(A, dim0A) + val(B, dim0B) + val(C, dim0C) + val(D, dim0D);"," float y2 = val(A, dim1A) + val(B, dim1B) + val(C, dim1C) + val(D, dim1D);"," return y1 * (1.0 - ratio) + y2 * ratio;","}","","int iMod(int a, int b) {"," return a - b * (a / b);","}","","bool fOutside(float p, float lo, float hi) {"," return (lo < hi) && (lo > p || p > hi);","}","","bool vOutside(vec4 p, vec4 lo, vec4 hi) {"," return ("," fOutside(p[0], lo[0], hi[0]) ||"," fOutside(p[1], lo[1], hi[1]) ||"," fOutside(p[2], lo[2], hi[2]) ||"," fOutside(p[3], lo[3], hi[3])"," );","}","","bool mOutside(mat4 p, mat4 lo, mat4 hi) {"," return ("," vOutside(p[0], lo[0], hi[0]) ||"," vOutside(p[1], lo[1], hi[1]) ||"," vOutside(p[2], lo[2], hi[2]) ||"," vOutside(p[3], lo[3], hi[3])"," );","}","","bool outsideBoundingBox(mat4 A, mat4 B, mat4 C, mat4 D) {"," return mOutside(A, loA, hiA) ||"," mOutside(B, loB, hiB) ||"," mOutside(C, loC, hiC) ||"," mOutside(D, loD, hiD);","}","","bool outsideRasterMask(mat4 A, mat4 B, mat4 C, mat4 D) {"," mat4 pnts[4];"," pnts[0] = A;"," pnts[1] = B;"," pnts[2] = C;"," pnts[3] = D;",""," for(int i = 0; i < 4; ++i) {"," for(int j = 0; j < 4; ++j) {"," for(int k = 0; k < 4; ++k) {"," if(0 == iMod("," int(255.0 * texture2D(maskTexture,"," vec2("," (float(i * 2 + j / 2) + 0.5) / 8.0,"," (pnts[i][j][k] * (maskHeight - 1.0) + 1.0) / maskHeight"," ))[3]"," ) / int(pow(2.0, float(iMod(j * 4 + k, 8)))),"," 2"," )) return true;"," }"," }"," }"," return false;","}","","vec4 position(bool isContext, float v, mat4 A, mat4 B, mat4 C, mat4 D) {"," float x = 0.5 * sign(v) + 0.5;"," float y = axisY(x, A, B, C, D);"," float z = 1.0 - abs(v);",""," z += isContext ? 0.0 : 2.0 * float("," outsideBoundingBox(A, B, C, D) ||"," outsideRasterMask(A, B, C, D)"," );",""," return vec4("," 2.0 * (vec2(x, y) * viewBoxSize + viewBoxPos) / resolution - 1.0,"," z,"," 1.0"," );","}","","void main() {"," mat4 A = mat4(p01_04, p05_08, p09_12, p13_16);"," mat4 B = mat4(p17_20, p21_24, p25_28, p29_32);"," mat4 C = mat4(p33_36, p37_40, p41_44, p45_48);"," mat4 D = mat4(p49_52, p53_56, p57_60, ZEROS);",""," float v = colors[3];",""," gl_Position = position(isContext, v, A, B, C, D);",""," fragColor ="," isContext ? vec4(contextColor) :"," isPick ? vec4(colors.rgb, 1.0) : texture2D(palette, vec2(abs(v), 0.5));","}"].join(` `),x=["precision highp float;","","varying vec4 fragColor;","","void main() {"," gl_FragColor = fragColor;","}"].join(` `),S=Ax().maxDimensionCount,E=sa(),e=1e-6,t=2048,r=new Uint8Array(4),o=new Uint8Array(4),a={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function n(b){b.read({x:0,y:0,width:1,height:1,data:r})}function i(b,p,u,y,m){var R=b._gl;R.enable(R.SCISSOR_TEST),R.scissor(p,u,y,m),b.clear({color:[0,0,0,0],depth:1})}function s(b,p,u,y,m,R){var L=R.key;function z(F){var N=Math.min(y,m-F*y);F===0&&(window.cancelAnimationFrame(u.currentRafs[L]),delete u.currentRafs[L],i(b,R.scissorX,R.scissorY,R.scissorWidth,R.viewBoxSize[1])),!u.clearOnly&&(R.count=2*N,R.offset=2*F*y,p(R),F*y+N>>8*p)%256/255}function c(b,p,u){for(var y=new Array(b*(S+4)),m=0,R=0;RRe&&(Re=ae[pe].dim1.canvasX,Se=pe);re===0&&i(m,0,0,N.canvasWidth,N.canvasHeight);var We=G(u);for(pe=0;pepe._length&&(qe=qe.slice(0,pe._length));var he=pe.tickvals,ue;function ne(Mt,kt){return{val:Mt,text:ue[kt]}}function Ce(Mt,kt){return Mt.val-kt.val}if(S(he)&&he.length){x.isTypedArray(he)&&(he=Array.from(he)),ue=pe.ticktext,!S(ue)||!ue.length?ue=he.map(E(pe.tickformat)):ue.length>he.length?ue=ue.slice(0,he.length):he.length>ue.length&&(he=he.slice(0,ue.length));for(var Ye=1;Ye=kt||mr>=Nt)return;var qr=Ke.lineLayer.readPixel(Mr,Nt-1-mr),Er=qr[3]!==0,Ir=Er?qr[2]+256*(qr[1]+256*qr[0]):null,_t={x:Mr,y:mr,clientX:Mt.clientX,clientY:Mt.clientY,dataIndex:Ke.model.key,curveNumber:Ir};Ir!==Se&&(Er?Y.hover(_t):Y.unhover&&Y.unhover(_t),Se=Ir)}}),we.style("opacity",function(Ke){return Ke.pick?0:1}),se.style("background","rgba(255, 255, 255, 0)");var Re=se.selectAll("."+T.cn.parcoords).data(pe,h);Re.exit().remove(),Re.enter().append("g").classed(T.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),Re.attr("transform",function(Ke){return o(Ke.model.translateX,Ke.model.translateY)});var We=Re.selectAll("."+T.cn.parcoordsControlView).data(f,h);We.enter().append("g").classed(T.cn.parcoordsControlView,!0),We.attr("transform",function(Ke){return o(Ke.model.pad.l,Ke.model.pad.t)});var at=We.selectAll("."+T.cn.yAxis).data(function(Ke){return Ke.dimensions},h);at.enter().append("g").classed(T.cn.yAxis,!0),We.each(function(Ke){U(at,Ke,j)}),we.each(function(Ke){if(Ke.viewModel){!Ke.lineLayer||Y?Ke.lineLayer=_(this,Ke):Ke.lineLayer.update(Ke),(Ke.key||Ke.key===0)&&(Ke.viewModel[Ke.key]=Ke.lineLayer);var Mt=!Ke.context||Y;Ke.lineLayer.render(Ke.viewModel.panels,Mt)}}),at.attr("transform",function(Ke){return o(Ke.xScale(Ke.xIndex),0)}),at.call(d.behavior.drag().origin(function(Ke){return Ke}).on("drag",function(Ke){var Mt=Ke.parent;re.linePickActive(!1),Ke.x=Math.max(-T.overdrag,Math.min(Ke.model.width+T.overdrag,d.event.x)),Ke.canvasX=Ke.x*Ke.model.canvasPixelRatio,at.sort(function(kt,Nt){return kt.x-Nt.x}).each(function(kt,Nt){kt.xIndex=Nt,kt.x=Ke===kt?kt.x:kt.xScale(kt.xIndex),kt.canvasX=kt.x*kt.model.canvasPixelRatio}),U(at,Mt,j),at.filter(function(kt){return Math.abs(Ke.xIndex-kt.xIndex)!==0}).attr("transform",function(kt){return o(kt.xScale(kt.xIndex),0)}),d.select(this).attr("transform",o(Ke.x,0)),at.each(function(kt,Nt,Gt){Gt===Ke.parent.key&&(Mt.dimensions[Nt]=kt)}),Mt.contextLayer&&Mt.contextLayer.render(Mt.panels,!1,!L(Mt)),Mt.focusLayer.render&&Mt.focusLayer.render(Mt.panels)}).on("dragend",function(Ke){var Mt=Ke.parent;Ke.x=Ke.xScale(Ke.xIndex),Ke.canvasX=Ke.x*Ke.model.canvasPixelRatio,U(at,Mt,j),d.select(this).attr("transform",function(kt){return o(kt.x,0)}),Mt.contextLayer&&Mt.contextLayer.render(Mt.panels,!1,!L(Mt)),Mt.focusLayer&&Mt.focusLayer.render(Mt.panels),Mt.pickLayer&&Mt.pickLayer.render(Mt.panels,!0),re.linePickActive(!0),Y&&Y.axesMoved&&Y.axesMoved(Mt.key,Mt.dimensions.map(function(kt){return kt.crossfilterDimensionIndex}))})),at.exit().remove();var nt=at.selectAll("."+T.cn.axisOverlays).data(f,h);nt.enter().append("g").classed(T.cn.axisOverlays,!0),nt.selectAll("."+T.cn.axis).remove();var tt=nt.selectAll("."+T.cn.axis).data(f,h);tt.enter().append("g").classed(T.cn.axis,!0),tt.each(function(Ke){var Mt=Ke.model.height/Ke.model.tickDistance,kt=Ke.domainScale,Nt=kt.domain();d.select(this).call(d.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(Mt,Ke.tickFormat).tickValues(Ke.ordinal?Nt:null).tickFormat(function(Gt){return c.isOrdinal(Ke)?Gt:X(Ke.model.dimensions[Ke.visibleIndex],Gt)}).scale(kt)),n.font(tt.selectAll("text"),Ke.model.tickFont)}),tt.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),tt.selectAll("text").style("cursor","default");var qe=nt.selectAll("."+T.cn.axisHeading).data(f,h);qe.enter().append("g").classed(T.cn.axisHeading,!0);var he=qe.selectAll("."+T.cn.axisTitle).data(f,h);he.enter().append("text").classed(T.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("pointer-events",ee?"none":"auto"),he.text(function(Ke){return Ke.label}).each(function(Ke){var Mt=d.select(this);n.font(Mt,Ke.model.labelFont),a.convertToTspans(Mt,ce)}).attr("transform",function(Ke){var Mt=P(Ke.model.labelAngle,Ke.model.labelSide),kt=T.axisTitleOffset;return(Mt.dir>0?"":o(0,2*kt+Ke.model.height))+r(Mt.degrees)+o(-kt*Mt.dx,-kt*Mt.dy)}).attr("text-anchor",function(Ke){var Mt=P(Ke.model.labelAngle,Ke.model.labelSide),kt=Math.abs(Mt.dx),Nt=Math.abs(Mt.dy);return 2*kt>Nt?Mt.dir*Mt.dx<0?"start":"end":"middle"});var ue=nt.selectAll("."+T.cn.axisExtent).data(f,h);ue.enter().append("g").classed(T.cn.axisExtent,!0);var ne=ue.selectAll("."+T.cn.axisExtentTop).data(f,h);ne.enter().append("g").classed(T.cn.axisExtentTop,!0),ne.attr("transform",o(0,-T.axisExtentOffset));var Ce=ne.selectAll("."+T.cn.axisExtentTopText).data(f,h);Ce.enter().append("text").classed(T.cn.axisExtentTopText,!0).call(N),Ce.text(function(Ke){return $(Ke,!0)}).each(function(Ke){n.font(d.select(this),Ke.model.rangeFont)});var Ye=ue.selectAll("."+T.cn.axisExtentBottom).data(f,h);Ye.enter().append("g").classed(T.cn.axisExtentBottom,!0),Ye.attr("transform",function(Ke){return o(0,Ke.model.height+T.axisExtentOffset)});var rt=Ye.selectAll("."+T.cn.axisExtentBottomText).data(f,h);rt.enter().append("text").classed(T.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(N),rt.text(function(Ke){return $(Ke,!1)}).each(function(Ke){n.font(d.select(this),Ke.model.rangeFont)}),l.ensureAxisBrush(nt,Q,ce)}}}),w6=He({"src/traces/parcoords/plot.js"(r,V){"use strict";var d=rV(),x=xT(),S=b6().isVisible,E={};function e(o,a,n){var i=a.indexOf(n),s=o.indexOf(i);return s===-1&&(s+=a.length),s}function t(o,a){return function(i,s){return e(o,a,i)-e(o,a,s)}}var r=V.exports=function(a,n){var i=a._fullLayout,s=x(a,[],E);if(s){var h={},f={},v={},c={},T=i._size;n.forEach(function(M,g){var b=M[0].trace;v[g]=b.index;var p=c[g]=b.index;h[g]=a.data[p].dimensions,f[g]=a.data[p].dimensions.slice()});var l=function(M,g,b){var p=f[M][g],u=b.map(function(F){return F.slice()}),y="dimensions["+g+"].constraintrange",m=i._tracePreGUI[a._fullData[v[M]]._fullInput.uid];if(m[y]===void 0){var R=p.constraintrange;m[y]=R||null}var L=a._fullData[v[M]].dimensions[g];u.length?(u.length===1&&(u=u[0]),p.constraintrange=u,L.constraintrange=u.slice(),u=[u]):(delete p.constraintrange,delete L.constraintrange,u=null);var z={};z[y]=u,a.emit("plotly_restyle",[z,[c[M]]])},_=function(M){a.emit("plotly_hover",M)},w=function(M){a.emit("plotly_unhover",M)},A=function(M,g){var b=t(g,f[M].filter(S));h[M].sort(b),f[M].filter(function(p){return!S(p)}).sort(function(p){return f[M].indexOf(p)}).forEach(function(p){h[M].splice(h[M].indexOf(p),1),h[M].splice(f[M].indexOf(p),0,p)}),a.emit("plotly_restyle",[{dimensions:[h[M]]},[c[M]]])};d(a,n,{width:T.w,height:T.h,margin:{t:T.t,r:T.r,b:T.b,l:T.l}},{filterChanged:l,hover:_,unhover:w,axesMoved:A})}};r.reglPrecompiled=E}}),aV=He({"src/traces/parcoords/base_plot.js"(Z){"use strict";var V=Wn(),d=Hh().getModuleCalcData,x=w6(),S=vd();Z.name="parcoords",Z.plot=function(E){var e=d(E.calcdata,"parcoords")[0];e.length&&x(E,e)},Z.clean=function(E,e,t,r){var o=r._has&&r._has("parcoords"),a=e._has&&e._has("parcoords");o&&!a&&(r._paperdiv.selectAll(".parcoords").remove(),r._glimages.selectAll("*").remove())},Z.toSVG=function(E){var e=E._fullLayout._glimages,t=V.select(E).selectAll(".svg-container"),r=t.filter(function(a,n){return n===t.size()-1}).selectAll(".gl-canvas-context, .gl-canvas-focus");function o(){var a=this,n=a.toDataURL("image/png"),i=e.append("svg:image");i.attr({xmlns:S.svg,"xlink:href":n,preserveAspectRatio:"none",x:0,y:0,width:a.style.width,height:a.style.height})}r.each(o),window.setTimeout(function(){V.selectAll("#filterBarPattern").attr("id","filterBarPattern")},60)}}}),iV=He({"src/traces/parcoords/base_index.js"(Z,V){"use strict";V.exports={attributes:m6(),supplyDefaults:Zq(),calc:Yq(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:aV(),categories:["gl","regl","noOpacity","noHover"],meta:{}}}}),nV=He({"src/traces/parcoords/index.js"(Z,V){"use strict";var d=iV();d.plot=w6(),V.exports=d}}),oV=He({"lib/parcoords.js"(Z,V){"use strict";V.exports=nV()}}),T6=He({"src/traces/parcats/attributes.js"(Z,V){"use strict";var d=Qo().extendFlat,x=ru(),S=tc(),E=ku(),{hovertemplateAttrs:e,templatefallbackAttrs:t}=Jl(),r=wc().attributes,o=d({editType:"calc"},E("line",{editTypeOverride:"calc"}),{shape:{valType:"enumerated",values:["linear","hspline"],dflt:"linear",editType:"plot"},hovertemplate:e({editType:"plot",arrayOk:!1},{keys:["count","probability"]}),hovertemplatefallback:t({editType:"plot"})});V.exports={domain:r({name:"parcats",trace:!0,editType:"calc"}),hoverinfo:d({},x.hoverinfo,{flags:["count","probability"],editType:"plot",arrayOk:!1}),hoveron:{valType:"enumerated",values:["category","color","dimension"],dflt:"category",editType:"plot"},hovertemplate:e({editType:"plot",arrayOk:!1},{keys:["count","probability","category","categorycount","colorcount","bandcolorcount"]}),hovertemplatefallback:t({editType:"plot"}),arrangement:{valType:"enumerated",values:["perpendicular","freeform","fixed"],dflt:"perpendicular",editType:"plot"},bundlecolors:{valType:"boolean",dflt:!0,editType:"plot"},sortpaths:{valType:"enumerated",values:["forward","backward"],dflt:"forward",editType:"plot"},labelfont:S({editType:"calc"}),tickfont:S({autoShadowDflt:!0,editType:"calc"}),dimensions:{_isLinkedToArray:"dimension",label:{valType:"string",editType:"calc"},categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},ticktext:{valType:"data_array",editType:"calc"},values:{valType:"data_array",dflt:[],editType:"calc"},displayindex:{valType:"integer",editType:"calc"},editType:"calc",visible:{valType:"boolean",dflt:!0,editType:"calc"}},line:o,counts:{valType:"number",min:0,dflt:1,arrayOk:!0,editType:"calc"},customdata:void 0,hoverlabel:void 0,ids:void 0,legend:void 0,legendgroup:void 0,legendrank:void 0,opacity:void 0,selectedpoints:void 0,showlegend:void 0}}}),sV=He({"src/traces/parcats/defaults.js"(Z,V){"use strict";var d=sa(),x=wp().hasColorscale,S=_h(),E=wc().defaults,e=hp(),t=T6(),r=bT(),o=bp().isTypedArraySpec;function a(i,s,h,f,v){v("line.shape"),v("line.hovertemplate"),v("line.hovertemplatefallback");var c=v("line.color",f.colorway[0]);if(x(i,"line")&&d.isArrayOrTypedArray(c)){if(c.length)return v("line.colorscale"),S(i,s,f,v,{prefix:"line.",cLetter:"c"}),c.length;s.line.color=h}return 1/0}function n(i,s){function h(w,A){return d.coerce(i,s,t.dimensions,w,A)}var f=h("values"),v=h("visible");if(f&&f.length||(v=s.visible=!1),v){h("label"),h("displayindex",s._index);var c=i.categoryarray,T=d.isArrayOrTypedArray(c)&&c.length>0||o(c),l;T&&(l="array");var _=h("categoryorder",l);_==="array"?(h("categoryarray"),h("ticktext")):(delete i.categoryarray,delete i.ticktext),!T&&_==="array"&&(s.categoryorder="trace")}}V.exports=function(s,h,f,v){function c(w,A){return d.coerce(s,h,t,w,A)}var T=e(s,h,{name:"dimensions",handleItemDefaults:n}),l=a(s,h,f,v,c);E(h,v,c),(!Array.isArray(T)||!T.length)&&(h.visible=!1),r(h,T,"values",l),c("hoveron"),c("hovertemplate"),c("hovertemplatefallback"),c("arrangement"),c("bundlecolors"),c("sortpaths"),c("counts");var _=v.font;d.coerceFont(c,"labelfont",_,{overrideDflt:{size:Math.round(_.size)}}),d.coerceFont(c,"tickfont",_,{autoShadowDflt:!0,overrideDflt:{size:Math.round(_.size/1.2)}})}}}),lV=He({"src/traces/parcats/calc.js"(Z,V){"use strict";var d=kv().wrap,x=wp().hasColorscale,S=Tp(),E=r5(),e=es(),t=sa(),r=as();V.exports=function(_,w){var A=t.filterVisible(w.dimensions);if(A.length===0)return[];var M=A.map(function(G){var Y;if(G.categoryorder==="trace")Y=null;else if(G.categoryorder==="array")Y=G.categoryarray;else{Y=E(G.values);for(var ee=!0,q=0;q=l.length||_[l[w]]!==void 0)return!1;_[l[w]]=!0}return!0}}}),uV=He({"src/traces/parcats/parcats.js"(Z,V){"use strict";var d=Wn(),x=(pg(),zf(p0)).interpolateNumber,S=k2(),E=rf(),e=sa(),t=e.strTranslate,r=es(),o=Ch(),a=ou();function n(q,se,ae,j){var Q=se._context.staticPlot,re=q.map(ce.bind(0,se,ae)),pe=j.selectAll("g.parcatslayer").data([null]);pe.enter().append("g").attr("class","parcatslayer").style("pointer-events",Q?"none":"all");var we=pe.selectAll("g.trace.parcats").data(re,i),Se=we.enter().append("g").attr("class","trace parcats");we.attr("transform",function(ne){return t(ne.x,ne.y)}),Se.append("g").attr("class","paths");var Ie=we.select("g.paths"),Re=Ie.selectAll("path.path").data(function(ne){return ne.paths},i);Re.attr("fill",function(ne){return ne.model.color});var We=Re.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",function(ne){return ne.model.color}).attr("fill-opacity",0);_(We),Re.attr("d",function(ne){return ne.svgD}),We.empty()||Re.sort(h),Re.exit().remove(),Re.on("mouseover",f).on("mouseout",v).on("click",l),Se.append("g").attr("class","dimensions");var at=we.select("g.dimensions"),nt=at.selectAll("g.dimension").data(function(ne){return ne.dimensions},i);nt.enter().append("g").attr("class","dimension"),nt.attr("transform",function(ne){return t(ne.x,0)}),nt.exit().remove();var tt=nt.selectAll("g.category").data(function(ne){return ne.categories},i),qe=tt.enter().append("g").attr("class","category");tt.attr("transform",function(ne){return t(0,ne.y)}),qe.append("rect").attr("class","catrect").attr("pointer-events","none"),tt.select("rect.catrect").attr("fill","none").attr("width",function(ne){return ne.width}).attr("height",function(ne){return ne.height}),M(qe);var he=tt.selectAll("rect.bandrect").data(function(ne){return ne.bands},i);he.each(function(){e.raiseToTop(this)}),he.attr("fill",function(ne){return ne.color});var ue=he.enter().append("rect").attr("class","bandrect").attr("stroke-opacity",0).attr("fill",function(ne){return ne.color}).attr("fill-opacity",0);he.attr("fill",function(ne){return ne.color}).attr("width",function(ne){return ne.width}).attr("height",function(ne){return ne.height}).attr("y",function(ne){return ne.y}).attr("cursor",function(ne){return ne.parcatsViewModel.arrangement==="fixed"?"default":ne.parcatsViewModel.arrangement==="perpendicular"?"ns-resize":"move"}),b(ue),he.exit().remove(),qe.append("text").attr("class","catlabel").attr("pointer-events","none"),tt.select("text.catlabel").attr("text-anchor",function(ne){return s(ne)?"start":"end"}).attr("alignment-baseline","middle").style("fill","rgb(0, 0, 0)").attr("x",function(ne){return s(ne)?ne.width+5:-5}).attr("y",function(ne){return ne.height/2}).text(function(ne){return ne.model.categoryLabel}).each(function(ne){r.font(d.select(this),ne.parcatsViewModel.categorylabelfont),a.convertToTspans(d.select(this),se)}),qe.append("text").attr("class","dimlabel"),tt.select("text.dimlabel").attr("text-anchor","middle").attr("alignment-baseline","baseline").attr("cursor",function(ne){return ne.parcatsViewModel.arrangement==="fixed"?"default":"ew-resize"}).attr("x",function(ne){return ne.width/2}).attr("y",-5).text(function(ne,Ce){return Ce===0?ne.parcatsViewModel.model.dimensions[ne.model.dimensionInd].dimensionLabel:null}).each(function(ne){r.font(d.select(this),ne.parcatsViewModel.labelfont)}),tt.selectAll("rect.bandrect").on("mouseover",N).on("mouseout",O),tt.exit().remove(),nt.call(d.behavior.drag().origin(function(ne){return{x:ne.x,y:0}}).on("dragstart",P).on("drag",U).on("dragend",B)),we.each(function(ne){ne.traceSelection=d.select(this),ne.pathSelection=d.select(this).selectAll("g.paths").selectAll("path.path"),ne.dimensionSelection=d.select(this).selectAll("g.dimensions").selectAll("g.dimension")}),we.exit().remove()}V.exports=function(q,se,ae,j){n(ae,q,j,se)};function i(q){return q.key}function s(q){var se=q.parcatsViewModel.dimensions.length,ae=q.parcatsViewModel.dimensions[se-1].model.dimensionInd;return q.model.dimensionInd===ae}function h(q,se){return q.model.rawColor>se.model.rawColor?1:q.model.rawColor"),Ke=d.mouse(Q)[0];E.loneHover({trace:re,x:tt-we.left+Se.left,y:qe-we.top+Se.top,text:rt,color:q.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:he,idealAlign:Ke1&&Ie.displayInd===Se.dimensions.length-1?(at=pe.left,nt="left"):(at=pe.left+pe.width,nt="right");var tt=we.model.count,qe=we.model.categoryLabel,he=tt/we.parcatsViewModel.model.count,ue={countLabel:tt,categoryLabel:qe,probabilityLabel:he.toFixed(3)},ne=[];we.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&ne.push(["Count:",ue.countLabel].join(" ")),we.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&ne.push(["P("+ue.categoryLabel+"):",ue.probabilityLabel].join(" "));var Ce=ne.join("
");return{trace:Re,x:j*(at-se.left),y:Q*(We-se.top),text:Ce,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:nt,hovertemplate:Re.hovertemplate,hovertemplateLabels:ue,eventData:[{data:Re._input,fullData:Re,count:tt,category:qe,probability:he}]}}function z(q,se,ae){var j=[];return d.select(ae.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each(function(){var Q=this;j.push(L(q,se,Q))}),j}function F(q,se,ae){q._fullLayout._calcInverseTransform(q);var j=q._fullLayout._invScaleX,Q=q._fullLayout._invScaleY,re=ae.getBoundingClientRect(),pe=d.select(ae).datum(),we=pe.categoryViewModel,Se=we.parcatsViewModel,Ie=Se.model.dimensions[we.model.dimensionInd],Re=Se.trace,We=re.y+re.height/2,at,nt;Se.dimensions.length>1&&Ie.displayInd===Se.dimensions.length-1?(at=re.left,nt="left"):(at=re.left+re.width,nt="right");var tt=we.model.categoryLabel,qe=pe.parcatsViewModel.model.count,he=0;pe.categoryViewModel.bands.forEach(function(Gt){Gt.color===pe.color&&(he+=Gt.count)});var ue=we.model.count,ne=0;Se.pathSelection.each(function(Gt){Gt.model.color===pe.color&&(ne+=Gt.model.count)});var Ce=he/qe,Ye=he/ne,rt=he/ue,Ke={countLabel:he,categoryLabel:tt,probabilityLabel:Ce.toFixed(3)},Mt=[];we.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&Mt.push(["Count:",Ke.countLabel].join(" ")),we.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&(Mt.push("P(color \u2229 "+tt+"): "+Ke.probabilityLabel),Mt.push("P("+tt+" | color): "+Ye.toFixed(3)),Mt.push("P(color | "+tt+"): "+rt.toFixed(3)));var kt=Mt.join("
"),Nt=o.mostReadable(pe.color,["black","white"]);return{trace:Re,x:j*(at-se.left),y:Q*(We-se.top),text:kt,color:pe.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:Nt,fontSize:10,idealAlign:nt,hovertemplate:Re.hovertemplate,hovertemplateLabels:Ke,eventData:[{data:Re._input,fullData:Re,category:tt,count:qe,probability:Ce,categorycount:ue,colorcount:ne,bandcolorcount:he}]}}function N(q){if(!q.parcatsViewModel.dragDimension&&q.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){var se=d.mouse(this)[1];if(se<-1)return;var ae=q.parcatsViewModel.graphDiv,j=ae._fullLayout,Q=j._paperdiv.node().getBoundingClientRect(),re=q.parcatsViewModel.hoveron,pe=this;if(re==="color"?(y(pe),R(pe,"plotly_hover",d.event)):(u(pe),m(pe,"plotly_hover",d.event)),q.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var we;re==="category"?we=L(ae,Q,pe):re==="color"?we=F(ae,Q,pe):re==="dimension"&&(we=z(ae,Q,pe)),we&&E.loneHover(we,{container:j._hoverlayer.node(),outerContainer:j._paper.node(),gd:ae})}}}function O(q){var se=q.parcatsViewModel;if(!se.dragDimension&&(_(se.pathSelection),M(se.dimensionSelection.selectAll("g.category")),b(se.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),E.loneUnhover(se.graphDiv._fullLayout._hoverlayer.node()),se.pathSelection.sort(h),se.hoverinfoItems.indexOf("skip")===-1)){var ae=q.parcatsViewModel.hoveron,j=this;ae==="color"?R(j,"plotly_unhover",d.event):m(j,"plotly_unhover",d.event)}}function P(q){q.parcatsViewModel.arrangement!=="fixed"&&(q.dragDimensionDisplayInd=q.model.displayInd,q.initialDragDimensionDisplayInds=q.parcatsViewModel.model.dimensions.map(function(se){return se.displayInd}),q.dragHasMoved=!1,q.dragCategoryDisplayInd=null,d.select(this).selectAll("g.category").select("rect.catrect").each(function(se){var ae=d.mouse(this)[0],j=d.mouse(this)[1];-2<=ae&&ae<=se.width+2&&-2<=j&&j<=se.height+2&&(q.dragCategoryDisplayInd=se.model.displayInd,q.initialDragCategoryDisplayInds=q.model.categories.map(function(Q){return Q.displayInd}),se.model.dragY=se.y,e.raiseToTop(this.parentNode),d.select(this.parentNode).selectAll("rect.bandrect").each(function(Q){Q.yRe.y+Re.height/2&&(re.model.displayInd=Re.model.displayInd,Re.model.displayInd=we),q.dragCategoryDisplayInd=re.model.displayInd}if(q.dragCategoryDisplayInd===null||q.parcatsViewModel.arrangement==="freeform"){Q.model.dragX=d.event.x;var We=q.parcatsViewModel.dimensions[ae],at=q.parcatsViewModel.dimensions[j];We!==void 0&&Q.model.dragXat.x&&(Q.model.displayInd=at.model.displayInd,at.model.displayInd=q.dragDimensionDisplayInd),q.dragDimensionDisplayInd=Q.model.displayInd}Y(q.parcatsViewModel),G(q.parcatsViewModel),le(q.parcatsViewModel),$(q.parcatsViewModel)}}function B(q){if(q.parcatsViewModel.arrangement!=="fixed"&&q.dragDimensionDisplayInd!==null){d.select(this).selectAll("text").attr("font-weight","normal");var se={},ae=X(q.parcatsViewModel),j=q.parcatsViewModel.model.dimensions.map(function(at){return at.displayInd}),Q=q.initialDragDimensionDisplayInds.some(function(at,nt){return at!==j[nt]});Q&&j.forEach(function(at,nt){var tt=q.parcatsViewModel.model.dimensions[nt].containerInd;se["dimensions["+tt+"].displayindex"]=at});var re=!1;if(q.dragCategoryDisplayInd!==null){var pe=q.model.categories.map(function(at){return at.displayInd});if(re=q.initialDragCategoryDisplayInds.some(function(at,nt){return at!==pe[nt]}),re){var we=q.model.categories.slice().sort(function(at,nt){return at.displayInd-nt.displayInd}),Se=we.map(function(at){return at.categoryValue}),Ie=we.map(function(at){return at.categoryLabel});se["dimensions["+q.model.containerInd+"].categoryarray"]=[Se],se["dimensions["+q.model.containerInd+"].ticktext"]=[Ie],se["dimensions["+q.model.containerInd+"].categoryorder"]="array"}}if(q.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1&&!q.dragHasMoved&&q.potentialClickBand&&(q.parcatsViewModel.hoveron==="color"?R(q.potentialClickBand,"plotly_click",d.event.sourceEvent):m(q.potentialClickBand,"plotly_click",d.event.sourceEvent)),q.model.dragX=null,q.dragCategoryDisplayInd!==null){var Re=q.parcatsViewModel.dimensions[q.dragDimensionDisplayInd].categories[q.dragCategoryDisplayInd];Re.model.dragY=null,q.dragCategoryDisplayInd=null}q.dragDimensionDisplayInd=null,q.parcatsViewModel.dragDimension=null,q.dragHasMoved=null,q.potentialClickBand=null,Y(q.parcatsViewModel),G(q.parcatsViewModel);var We=d.transition().duration(300).ease("cubic-in-out");We.each(function(){le(q.parcatsViewModel,!0),$(q.parcatsViewModel,!0)}).each("end",function(){(Q||re)&&S.restyle(q.parcatsViewModel.graphDiv,se,[ae])})}}function X(q){for(var se,ae=q.graphDiv._fullData,j=0;j=0;Se--)Ie+="C"+pe[Se]+","+(se[Se+1]+j)+" "+re[Se]+","+(se[Se]+j)+" "+(q[Se]+ae[Se])+","+(se[Se]+j),Ie+="l-"+ae[Se]+",0 ";return Ie+="Z",Ie}function G(q){var se=q.dimensions,ae=q.model,j=se.map(function(qr){return qr.categories.map(function(Er){return Er.y})}),Q=q.model.dimensions.map(function(qr){return qr.categories.map(function(Er){return Er.displayInd})}),re=q.model.dimensions.map(function(qr){return qr.displayInd}),pe=q.dimensions.map(function(qr){return qr.model.dimensionInd}),we=se.map(function(qr){return qr.x}),Se=se.map(function(qr){return qr.width}),Ie=[];for(var Re in ae.paths)ae.paths.hasOwnProperty(Re)&&Ie.push(ae.paths[Re]);function We(qr){var Er=qr.categoryInds.map(function(_t,Oe){return Q[Oe][_t]}),Ir=pe.map(function(_t){return Er[_t]});return Ir}Ie.sort(function(qr,Er){var Ir=We(qr),_t=We(Er);return q.sortpaths==="backward"&&(Ir.reverse(),_t.reverse()),Ir.push(qr.valueInds[0]),_t.push(Er.valueInds[0]),q.bundlecolors&&(Ir.unshift(qr.rawColor),_t.unshift(Er.rawColor)),Ir<_t?-1:Ir>_t?1:0});for(var at=new Array(Ie.length),nt=se[0].model.count,tt=se[0].categories.map(function(qr){return qr.height}).reduce(function(qr,Er){return qr+Er}),qe=0;qe0?ue=tt*(he.count/nt):ue=0;for(var ne=new Array(j.length),Ce=0;Ce1?pe=(q.width-2*ae-j)/(Q-1):pe=0,we=ae,Se=we+pe*re;var Ie=[],Re=q.model.maxCats,We=se.categories.length,at=8,nt=se.count,tt=q.height-at*(Re-1),qe,he,ue,ne,Ce,Ye=(Re-We)*at/2,rt=se.categories.map(function(Ke){return{displayInd:Ke.displayInd,categoryInd:Ke.categoryInd}});for(rt.sort(function(Ke,Mt){return Ke.displayInd-Mt.displayInd}),Ce=0;Ce0?qe=he.count/nt*tt:qe=0,ue={key:he.valueInds[0],model:he,width:j,height:qe,y:he.dragY!==null?he.dragY:Ye,bands:[],parcatsViewModel:q},Ye=Ye+qe+at,Ie.push(ue);return{key:se.dimensionInd,x:se.dragX!==null?se.dragX:Se,y:0,width:j,model:se,categories:Ie,parcatsViewModel:q,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}}}),A6=He({"src/traces/parcats/plot.js"(Z,V){"use strict";var d=uV();V.exports=function(S,E,e,t){var r=S._fullLayout,o=r._paper,a=r._size;d(S,o,E,{width:a.w,height:a.h,margin:{t:a.t,r:a.r,b:a.b,l:a.l}},e,t)}}}),cV=He({"src/traces/parcats/base_plot.js"(Z){"use strict";var V=Hh().getModuleCalcData,d=A6(),x="parcats";Z.name=x,Z.plot=function(S,E,e,t){var r=V(S.calcdata,x);if(r.length){var o=r[0];d(S,o,e,t)}},Z.clean=function(S,E,e,t){var r=t._has&&t._has("parcats"),o=E._has&&E._has("parcats");r&&!o&&t._paperdiv.selectAll(".parcats").remove()}}}),fV=He({"src/traces/parcats/index.js"(Z,V){"use strict";V.exports={attributes:T6(),supplyDefaults:sV(),calc:lV(),plot:A6(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcats",basePlotModule:cV(),categories:["noOpacity"],meta:{}}}}),hV=He({"lib/parcats.js"(Z,V){"use strict";V.exports=fV()}}),im=He({"src/plots/mapbox/constants.js"(Z,V){"use strict";var d=Jm(),x="1.13.4",S='\xA9 OpenStreetMap contributors',E=['\xA9 Carto',S].join(" "),e=['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under ODbL'].join(" "),t=['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under CC BY SA'].join(" "),r={"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:S,tiles:["https://a.tile.openstreetmap.org/{z}/{x}/{y}.png","https://b.tile.openstreetmap.org/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-osm-tiles",type:"raster",source:"plotly-osm-tiles",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"white-bg":{id:"white-bg",version:8,sources:{},layers:[{id:"white-bg",type:"background",paint:{"background-color":"#FFFFFF"},minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-positron":{id:"carto-positron",version:8,sources:{"plotly-carto-positron":{type:"raster",attribution:E,tiles:["https://cartodb-basemaps-c.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-carto-positron",type:"raster",source:"plotly-carto-positron",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-darkmatter":{id:"carto-darkmatter",version:8,sources:{"plotly-carto-darkmatter":{type:"raster",attribution:E,tiles:["https://cartodb-basemaps-c.global.ssl.fastly.net/dark_all/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-carto-darkmatter",type:"raster",source:"plotly-carto-darkmatter",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-terrain":{id:"stamen-terrain",version:8,sources:{"plotly-stamen-terrain":{type:"raster",attribution:e,tiles:["https://tiles.stadiamaps.com/tiles/stamen_terrain/{z}/{x}/{y}.png?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-terrain",type:"raster",source:"plotly-stamen-terrain",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-toner":{id:"stamen-toner",version:8,sources:{"plotly-stamen-toner":{type:"raster",attribution:e,tiles:["https://tiles.stadiamaps.com/tiles/stamen_toner/{z}/{x}/{y}.png?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-toner",type:"raster",source:"plotly-stamen-toner",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-watercolor":{id:"stamen-watercolor",version:8,sources:{"plotly-stamen-watercolor":{type:"raster",attribution:t,tiles:["https://tiles.stadiamaps.com/tiles/stamen_watercolor/{z}/{x}/{y}.jpg?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-watercolor",type:"raster",source:"plotly-stamen-watercolor",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"}},o=d(r);V.exports={requiredVersion:x,styleUrlPrefix:"mapbox://styles/mapbox/",styleUrlSuffix:"v9",styleValuesMapbox:["basic","streets","outdoors","light","dark","satellite","satellite-streets"],styleValueDflt:"basic",stylesNonMapbox:r,styleValuesNonMapbox:o,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",wrongVersionErrorMsg:["Your custom plotly.js bundle is not using the correct mapbox-gl version","Please install @plotly/mapbox-gl@"+x+"."].join(` `),noAccessTokenErrorMsg:["Missing Mapbox access token.","Mapbox trace type require a Mapbox access token to be registered.","For example:"," Plotly.newPlot(gd, data, layout, { mapboxAccessToken: 'my-access-token' });","More info here: https://www.mapbox.com/help/define-access-token/"].join(` `),missingStyleErrorMsg:["No valid mapbox style found, please set `mapbox.style` to one of:",o.join(", "),"or register a Mapbox access token to use a Mapbox-served style."].join(` `),multipleTokensErrorMsg:["Set multiple mapbox access token across different mapbox subplot,","using first token found as mapbox-gl does not allow multipleaccess tokens on the same page."].join(` `),mapOnErrorMsg:"Mapbox error.",mapboxLogo:{path0:"m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z",path1:"M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z",path2:"M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z",polygon:"11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34"},styleRules:{map:"overflow:hidden;position:relative;","missing-css":"display:none;",canary:"background-color:salmon;","ctrl-bottom-left":"position: absolute; pointer-events: none; z-index: 2; bottom: 0; left: 0;","ctrl-bottom-right":"position: absolute; pointer-events: none; z-index: 2; right: 0; bottom: 0;",ctrl:"clear: both; pointer-events: auto; transform: translate(0, 0);","ctrl-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-inner":"display: none;","ctrl-attrib.mapboxgl-compact:hover .mapboxgl-ctrl-attrib-inner":"display: block; margin-top:2px","ctrl-attrib.mapboxgl-compact:hover":"padding: 2px 24px 2px 4px; visibility: visible; margin-top: 6px;","ctrl-attrib.mapboxgl-compact::after":`content: ""; cursor: pointer; position: absolute; background-image: url('data:image/svg+xml;charset=utf-8,%3Csvg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"%3E %3Cpath fill="%23333333" fill-rule="evenodd" d="M4,10a6,6 0 1,0 12,0a6,6 0 1,0 -12,0 M9,7a1,1 0 1,0 2,0a1,1 0 1,0 -2,0 M9,10a1,1 0 1,1 2,0l0,3a1,1 0 1,1 -2,0"/%3E %3C/svg%3E'); background-color: rgba(255, 255, 255, 0.5); width: 24px; height: 24px; box-sizing: border-box; border-radius: 12px;`,"ctrl-attrib.mapboxgl-compact":"min-height: 20px; padding: 0; margin: 10px; position: relative; background-color: #fff; border-radius: 3px 12px 12px 3px;","ctrl-bottom-right > .mapboxgl-ctrl-attrib.mapboxgl-compact::after":"bottom: 0; right: 0","ctrl-bottom-left > .mapboxgl-ctrl-attrib.mapboxgl-compact::after":"bottom: 0; left: 0","ctrl-bottom-left .mapboxgl-ctrl":"margin: 0 0 10px 10px; float: left;","ctrl-bottom-right .mapboxgl-ctrl":"margin: 0 10px 10px 0; float: right;","ctrl-attrib":"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px","ctrl-attrib a":"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px","ctrl-attrib a:hover":"color: inherit; text-decoration: underline;","ctrl-attrib .mapbox-improve-map":"font-weight: bold; margin-left: 2px;","attrib-empty":"display: none;","ctrl-logo":`display:block; width: 21px; height: 21px; background-image: url('data:image/svg+xml;charset=utf-8,%3C?xml version="1.0" encoding="utf-8"?%3E %3Csvg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 21 21" style="enable-background:new 0 0 21 21;" xml:space="preserve"%3E%3Cg transform="translate(0,0.01)"%3E%3Cpath d="m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z" style="opacity:0.9;fill:%23ffffff;enable-background:new" class="st0"/%3E%3Cpath d="M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z" style="opacity:0.35;enable-background:new" class="st1"/%3E%3Cpath d="M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z" style="opacity:0.35;enable-background:new" class="st1"/%3E%3Cpolygon points="11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34 " style="opacity:0.9;fill:%23ffffff;enable-background:new" class="st0"/%3E%3C/g%3E%3C/svg%3E')`}}}}),Ex=He({"src/plots/mapbox/layout_attributes.js"(Z,V){"use strict";var d=sa(),x=Jn().defaultLine,S=wc().attributes,E=tc(),e=af().textposition,t=pc().overrideAll,r=zl().templatedArray,o=im(),a=E({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});a.family.dflt="Open Sans Regular, Arial Unicode MS Regular";var n=V.exports=t({_arrayAttrRegexps:[d.counterRegex("mapbox",".layers",!0)],domain:S({name:"mapbox"}),accesstoken:{valType:"string",noBlank:!0,strict:!0},style:{valType:"any",values:o.styleValuesMapbox.concat(o.styleValuesNonMapbox),dflt:o.styleValueDflt},center:{lon:{valType:"number",dflt:0},lat:{valType:"number",dflt:0}},zoom:{valType:"number",dflt:1},bearing:{valType:"number",dflt:0},pitch:{valType:"number",dflt:0},bounds:{west:{valType:"number"},east:{valType:"number"},south:{valType:"number"},north:{valType:"number"}},layers:r("layer",{visible:{valType:"boolean",dflt:!0},sourcetype:{valType:"enumerated",values:["geojson","vector","raster","image"],dflt:"geojson"},source:{valType:"any"},sourcelayer:{valType:"string",dflt:""},sourceattribution:{valType:"string"},type:{valType:"enumerated",values:["circle","line","fill","symbol","raster"],dflt:"circle"},coordinates:{valType:"any"},below:{valType:"string"},color:{valType:"color",dflt:x},opacity:{valType:"number",min:0,max:1,dflt:1},minzoom:{valType:"number",min:0,max:24,dflt:0},maxzoom:{valType:"number",min:0,max:24,dflt:24},circle:{radius:{valType:"number",dflt:15}},line:{width:{valType:"number",dflt:2},dash:{valType:"data_array"}},fill:{outlinecolor:{valType:"color",dflt:x}},symbol:{icon:{valType:"string",dflt:"marker"},iconsize:{valType:"number",dflt:10},text:{valType:"string",dflt:""},placement:{valType:"enumerated",values:["point","line","line-center"],dflt:"point"},textfont:a,textposition:d.extendFlat({},e,{arrayOk:!1})}})},"plot","from-root");n.uirevision={valType:"any",editType:"none"}}}),AT=He({"src/traces/scattermapbox/attributes.js"(Z,V){"use strict";var{hovertemplateAttrs:d,texttemplateAttrs:x,templatefallbackAttrs:S}=Jl(),E=$d(),e=vg(),t=af(),r=Ex(),o=ru(),a=ku(),n=Qo().extendFlat,i=pc().overrideAll,s=Ex(),h=e.line,f=e.marker;V.exports=i({lon:e.lon,lat:e.lat,cluster:{enabled:{valType:"boolean"},maxzoom:n({},s.layers.maxzoom,{}),step:{valType:"number",arrayOk:!0,dflt:-1,min:-1},size:{valType:"number",arrayOk:!0,dflt:20,min:0},color:{valType:"color",arrayOk:!0},opacity:n({},f.opacity,{dflt:1})},mode:n({},t.mode,{dflt:"markers"}),text:n({},t.text,{}),texttemplate:x({editType:"plot"},{keys:["lat","lon","text"]}),texttemplatefallback:S({editType:"plot"}),hovertext:n({},t.hovertext,{}),line:{color:h.color,width:h.width},connectgaps:t.connectgaps,marker:n({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:f.opacity,size:f.size,sizeref:f.sizeref,sizemin:f.sizemin,sizemode:f.sizemode},a("marker")),fill:e.fill,fillcolor:E(),textfont:r.layers.symbol.textfont,textposition:r.layers.symbol.textposition,below:{valType:"string"},selected:{marker:t.selected.marker},unselected:{marker:t.unselected.marker},hoverinfo:n({},o.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:d(),hovertemplatefallback:S()},"calc","nested")}}),S6=He({"src/traces/scattermapbox/constants.js"(Z,V){"use strict";var d=["Metropolis Black Italic","Metropolis Black","Metropolis Bold Italic","Metropolis Bold","Metropolis Extra Bold Italic","Metropolis Extra Bold","Metropolis Extra Light Italic","Metropolis Extra Light","Metropolis Light Italic","Metropolis Light","Metropolis Medium Italic","Metropolis Medium","Metropolis Regular Italic","Metropolis Regular","Metropolis Semi Bold Italic","Metropolis Semi Bold","Metropolis Thin Italic","Metropolis Thin","Open Sans Bold Italic","Open Sans Bold","Open Sans Extrabold Italic","Open Sans Extrabold","Open Sans Italic","Open Sans Light Italic","Open Sans Light","Open Sans Regular","Open Sans Semibold Italic","Open Sans Semibold","Klokantech Noto Sans Bold","Klokantech Noto Sans CJK Bold","Klokantech Noto Sans CJK Regular","Klokantech Noto Sans Italic","Klokantech Noto Sans Regular"];V.exports={isSupportedFont:function(x){return d.indexOf(x)!==-1}}}}),pV=He({"src/traces/scattermapbox/defaults.js"(Z,V){"use strict";var d=sa(),x=Fu(),S=md(),E=Dd(),e=zd(),t=ev(),r=AT(),o=S6().isSupportedFont;V.exports=function(i,s,h,f){function v(y,m){return d.coerce(i,s,r,y,m)}function c(y,m){return d.coerce2(i,s,r,y,m)}var T=a(i,s,v);if(!T){s.visible=!1;return}if(v("text"),v("texttemplate"),v("texttemplatefallback"),v("hovertext"),v("hovertemplate"),v("hovertemplatefallback"),v("mode"),v("below"),x.hasMarkers(s)){S(i,s,h,f,v,{noLine:!0,noAngle:!0}),v("marker.allowoverlap"),v("marker.angle");var l=s.marker;l.symbol!=="circle"&&(d.isArrayOrTypedArray(l.size)&&(l.size=l.size[0]),d.isArrayOrTypedArray(l.color)&&(l.color=l.color[0]))}x.hasLines(s)&&(E(i,s,h,f,v,{noDash:!0}),v("connectgaps"));var _=c("cluster.maxzoom"),w=c("cluster.step"),A=c("cluster.color",s.marker&&s.marker.color||h),M=c("cluster.size"),g=c("cluster.opacity"),b=_!==!1||w!==!1||A!==!1||M!==!1||g!==!1,p=v("cluster.enabled",b);if(p||x.hasText(s)){var u=f.font.family;e(i,s,f,v,{noSelect:!0,noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,font:{family:o(u)?u:"Open Sans Regular",weight:f.font.weight,style:f.font.style,size:f.font.size,color:f.font.color}})}v("fill"),s.fill!=="none"&&t(i,s,h,v),d.coerceSelectionMarkerOpacity(s,v)};function a(n,i,s){var h=s("lon")||[],f=s("lat")||[],v=Math.min(h.length,f.length);return i._length=v,v}}}),M6=He({"src/traces/scattermapbox/format_labels.js"(Z,V){"use strict";var d=Ho();V.exports=function(S,E,e){var t={},r=e[E.subplot]._subplot,o=r.mockAxis,a=S.lonlat;return t.lonLabel=d.tickText(o,o.c2l(a[0]),!0).text,t.latLabel=d.tickText(o,o.c2l(a[1]),!0).text,t}}}),E6=He({"src/plots/mapbox/convert_text_opts.js"(Z,V){"use strict";var d=sa();V.exports=function(S,E){var e=S.split(" "),t=e[0],r=e[1],o=d.isArrayOrTypedArray(E)?d.mean(E):E,a=.5+o/100,n=1.5+o/100,i=["",""],s=[0,0];switch(t){case"top":i[0]="top",s[1]=-n;break;case"bottom":i[0]="bottom",s[1]=n;break}switch(r){case"left":i[1]="right",s[0]=-a;break;case"right":i[1]="left",s[0]=a;break}var h;return i[0]&&i[1]?h=i.join("-"):i[0]?h=i[0]:i[1]?h=i[1]:h="center",{anchor:h,offset:s}}}}),dV=He({"src/traces/scattermapbox/convert.js"(Z,V){"use strict";var d=as(),x=sa(),S=Ws().BADNUM,E=m0(),e=rc(),t=es(),r=r1(),o=Fu(),a=S6().isSupportedFont,n=E6(),i=$p().appendArrayPointValue,s=ou().NEWLINES,h=ou().BR_TAG_ALL;V.exports=function(g,b){var p=b[0].trace,u=p.visible===!0&&p._length!==0,y=p.fill!=="none",m=o.hasLines(p),R=o.hasMarkers(p),L=o.hasText(p),z=R&&p.marker.symbol==="circle",F=R&&p.marker.symbol!=="circle",N=p.cluster&&p.cluster.enabled,O=f("fill"),P=f("line"),U=f("circle"),B=f("symbol"),X={fill:O,line:P,circle:U,symbol:B};if(!u)return X;var $;if((y||m)&&($=E.calcTraceToLineCoords(b)),y&&(O.geojson=E.makePolygon($),O.layout.visibility="visible",x.extendFlat(O.paint,{"fill-color":p.fillcolor})),m&&(P.geojson=E.makeLine($),P.layout.visibility="visible",x.extendFlat(P.paint,{"line-width":p.line.width,"line-color":p.line.color,"line-opacity":p.opacity})),z){var le=v(b);U.geojson=le.geojson,U.layout.visibility="visible",N&&(U.filter=["!",["has","point_count"]],X.cluster={type:"circle",filter:["has","point_count"],layout:{visibility:"visible"},paint:{"circle-color":w(p.cluster.color,p.cluster.step),"circle-radius":w(p.cluster.size,p.cluster.step),"circle-opacity":w(p.cluster.opacity,p.cluster.step)}},X.clusterCount={type:"symbol",filter:["has","point_count"],paint:{},layout:{"text-field":"{point_count_abbreviated}","text-font":A(p),"text-size":12}}),x.extendFlat(U.paint,{"circle-color":le.mcc,"circle-radius":le.mrc,"circle-opacity":le.mo})}if(z&&N&&(U.filter=["!",["has","point_count"]]),(F||L)&&(B.geojson=c(b,g),x.extendFlat(B.layout,{visibility:"visible","icon-image":"{symbol}-15","text-field":"{text}"}),F&&(x.extendFlat(B.layout,{"icon-size":p.marker.size/10}),"angle"in p.marker&&p.marker.angle!=="auto"&&x.extendFlat(B.layout,{"icon-rotate":{type:"identity",property:"angle"},"icon-rotation-alignment":"map"}),B.layout["icon-allow-overlap"]=p.marker.allowoverlap,x.extendFlat(B.paint,{"icon-opacity":p.opacity*p.marker.opacity,"icon-color":p.marker.color})),L)){var ce=(p.marker||{}).size,de=n(p.textposition,ce);x.extendFlat(B.layout,{"text-size":p.textfont.size,"text-anchor":de.anchor,"text-offset":de.offset,"text-font":A(p)}),x.extendFlat(B.paint,{"text-color":p.textfont.color,"text-opacity":p.opacity})}return X};function f(M){return{type:M,geojson:E.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function v(M){var g=M[0].trace,b=g.marker,p=g.selectedpoints,u=x.isArrayOrTypedArray(b.color),y=x.isArrayOrTypedArray(b.size),m=x.isArrayOrTypedArray(b.opacity),R;function L(ce){return g.opacity*ce}function z(ce){return ce/2}var F;u&&(e.hasColorscale(g,"marker")?F=e.makeColorScaleFuncFromTrace(b):F=x.identity);var N;y&&(N=r(g));var O;m&&(O=function(ce){var de=d(ce)?+x.constrain(ce,0,1):0;return L(de)});var P=[];for(R=0;R850?R+=" Black":u>750?R+=" Extra Bold":u>650?R+=" Bold":u>550?R+=" Semi Bold":u>450?R+=" Medium":u>350?R+=" Regular":u>250?R+=" Light":u>150?R+=" Extra Light":R+=" Thin"):y.slice(0,2).join(" ")==="Open Sans"?(R="Open Sans",u>750?R+=" Extrabold":u>650?R+=" Bold":u>550?R+=" Semibold":u>350?R+=" Regular":R+=" Light"):y.slice(0,3).join(" ")==="Klokantech Noto Sans"&&(R="Klokantech Noto Sans",y[3]==="CJK"&&(R+=" CJK"),R+=u>500?" Bold":" Regular")),m&&(R+=" Italic"),R==="Open Sans Regular Italic"?R="Open Sans Italic":R==="Open Sans Regular Bold"?R="Open Sans Bold":R==="Open Sans Regular Bold Italic"?R="Open Sans Bold Italic":R==="Klokantech Noto Sans Regular Italic"&&(R="Klokantech Noto Sans Italic"),a(R)||(R=b);var L=R.split(", ");return L}}}),vV=He({"src/traces/scattermapbox/plot.js"(Z,V){"use strict";var d=sa(),x=dV(),S=im().traceLayerPrefix,E={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function e(r,o,a,n){this.type="scattermapbox",this.subplot=r,this.uid=o,this.clusterEnabled=a,this.isHidden=n,this.sourceIds={fill:"source-"+o+"-fill",line:"source-"+o+"-line",circle:"source-"+o+"-circle",symbol:"source-"+o+"-symbol",cluster:"source-"+o+"-circle",clusterCount:"source-"+o+"-circle"},this.layerIds={fill:S+o+"-fill",line:S+o+"-line",circle:S+o+"-circle",symbol:S+o+"-symbol",cluster:S+o+"-cluster",clusterCount:S+o+"-cluster-count"},this.below=null}var t=e.prototype;t.addSource=function(r,o,a){var n={type:"geojson",data:o.geojson};a&&a.enabled&&d.extendFlat(n,{cluster:!0,clusterMaxZoom:a.maxzoom});var i=this.subplot.map.getSource(this.sourceIds[r]);i?i.setData(o.geojson):this.subplot.map.addSource(this.sourceIds[r],n)},t.setSourceData=function(r,o){this.subplot.map.getSource(this.sourceIds[r]).setData(o.geojson)},t.addLayer=function(r,o,a){var n={type:o.type,id:this.layerIds[r],source:this.sourceIds[r],layout:o.layout,paint:o.paint};o.filter&&(n.filter=o.filter);for(var i=this.layerIds[r],s,h=this.subplot.getMapLayers(),f=0;f=0;m--){var R=y[m];i.removeLayer(c.layerIds[R])}u||i.removeSource(c.sourceIds.circle)}function _(u){for(var y=E.nonCluster,m=0;m=0;m--){var R=y[m];i.removeLayer(c.layerIds[R]),u||i.removeSource(c.sourceIds[R])}}function A(u){v?l(u):w(u)}function M(u){f?T(u):_(u)}function g(){for(var u=f?E.cluster:E.nonCluster,y=0;y=0;n--){var i=a[n];o.removeLayer(this.layerIds[i]),o.removeSource(this.sourceIds[i])}},V.exports=function(o,a){var n=a[0].trace,i=n.cluster&&n.cluster.enabled,s=n.visible!==!0,h=new e(o,n.uid,i,s),f=x(o.gd,a),v=h.below=o.belowLookup["trace-"+n.uid],c,T,l;if(i)for(h.addSource("circle",f.circle,n.cluster),c=0;c=0?Math.floor((n+180)/360):Math.ceil((n-180)/360),M=A*360,g=n-M;function b(N){var O=N.lonlat;if(O[0]===e||_&&T.indexOf(N.i+1)===-1)return 1/0;var P=x.modHalf(O[0],360),U=O[1],B=c.project([P,U]),X=B.x-f.c2p([g,U]),$=B.y-v.c2p([P,i]),le=Math.max(3,N.mrc||0);return Math.max(Math.sqrt(X*X+$*$)-le,1-3/le)}if(d.getClosest(s,b,a),a.index!==!1){var p=s[a.index],u=p.lonlat,y=[x.modHalf(u[0],360)+M,u[1]],m=f.c2p(y),R=v.c2p(y),L=p.mrc||1;a.x0=m-L,a.x1=m+L,a.y0=R-L,a.y1=R+L;var z={};z[h.subplot]={_subplot:c};var F=h._module.formatLabels(p,h,z);return a.lonLabel=F.lonLabel,a.latLabel=F.latLabel,a.color=S(h,p),a.extraText=o(h,p,s[0].t.labels),a.hovertemplate=h.hovertemplate,[a]}}function o(a,n,i){if(a.hovertemplate)return;var s=n.hi||a.hoverinfo,h=s.split("+"),f=h.indexOf("all")!==-1,v=h.indexOf("lon")!==-1,c=h.indexOf("lat")!==-1,T=n.lonlat,l=[];function _(w){return w+"\xB0"}return f||v&&c?l.push("("+_(T[1])+", "+_(T[0])+")"):v?l.push(i.lon+_(T[0])):c&&l.push(i.lat+_(T[1])),(f||h.indexOf("text")!==-1)&&E(n,a,l),l.join("
")}V.exports={hoverPoints:r,getExtraText:o}}}),mV=He({"src/traces/scattermapbox/event_data.js"(Z,V){"use strict";V.exports=function(x,S){return x.lon=S.lon,x.lat=S.lat,x}}}),gV=He({"src/traces/scattermapbox/select.js"(Z,V){"use strict";var d=sa(),x=Fu(),S=Ws().BADNUM;V.exports=function(e,t){var r=e.cd,o=e.xaxis,a=e.yaxis,n=[],i=r[0].trace,s;if(!x.hasMarkers(i))return[];if(t===!1)for(s=0;s"u"&&(C=1e-6);var H,oe,be,Pe,Ne;for(be=k,Ne=0;Ne<8;Ne++){if(Pe=this.sampleCurveX(be)-k,Math.abs(Pe)oe)return oe;for(;HPe?H=be:oe=be,be=(oe-H)*.5+H}return be},a.prototype.solve=function(k,C){return this.sampleCurveY(this.solveCurveX(k,C))};var n=i;function i(k,C){this.x=k,this.y=C}i.prototype={clone:function(){return new i(this.x,this.y)},add:function(k){return this.clone()._add(k)},sub:function(k){return this.clone()._sub(k)},multByPoint:function(k){return this.clone()._multByPoint(k)},divByPoint:function(k){return this.clone()._divByPoint(k)},mult:function(k){return this.clone()._mult(k)},div:function(k){return this.clone()._div(k)},rotate:function(k){return this.clone()._rotate(k)},rotateAround:function(k,C){return this.clone()._rotateAround(k,C)},matMult:function(k){return this.clone()._matMult(k)},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(k){return this.x===k.x&&this.y===k.y},dist:function(k){return Math.sqrt(this.distSqr(k))},distSqr:function(k){var C=k.x-this.x,H=k.y-this.y;return C*C+H*H},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(k){return Math.atan2(this.y-k.y,this.x-k.x)},angleWith:function(k){return this.angleWithSep(k.x,k.y)},angleWithSep:function(k,C){return Math.atan2(this.x*C-this.y*k,this.x*k+this.y*C)},_matMult:function(k){var C=k[0]*this.x+k[1]*this.y,H=k[2]*this.x+k[3]*this.y;return this.x=C,this.y=H,this},_add:function(k){return this.x+=k.x,this.y+=k.y,this},_sub:function(k){return this.x-=k.x,this.y-=k.y,this},_mult:function(k){return this.x*=k,this.y*=k,this},_div:function(k){return this.x/=k,this.y/=k,this},_multByPoint:function(k){return this.x*=k.x,this.y*=k.y,this},_divByPoint:function(k){return this.x/=k.x,this.y/=k.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var k=this.y;return this.y=this.x,this.x=-k,this},_rotate:function(k){var C=Math.cos(k),H=Math.sin(k),oe=C*this.x-H*this.y,be=H*this.x+C*this.y;return this.x=oe,this.y=be,this},_rotateAround:function(k,C){var H=Math.cos(k),oe=Math.sin(k),be=C.x+H*(this.x-C.x)-oe*(this.y-C.y),Pe=C.y+oe*(this.x-C.x)+H*(this.y-C.y);return this.x=be,this.y=Pe,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},i.convert=function(k){return k instanceof i?k:Array.isArray(k)?new i(k[0],k[1]):k};var s=typeof self<"u"?self:{};function h(k,C){if(Array.isArray(k)){if(!Array.isArray(C)||k.length!==C.length)return!1;for(var H=0;H=1)return 1;var C=k*k,H=C*k;return 4*(k<.5?H:3*(k-C)+H-.75)}function c(k,C,H,oe){var be=new o(k,C,H,oe);return function(Pe){return be.solve(Pe)}}var T=c(.25,.1,.25,1);function l(k,C,H){return Math.min(H,Math.max(C,k))}function _(k,C,H){var oe=H-C,be=((k-C)%oe+oe)%oe+C;return be===C?H:be}function w(k,C,H){if(!k.length)return H(null,[]);var oe=k.length,be=new Array(k.length),Pe=null;k.forEach(function(Ne,ft){C(Ne,function(It,Ht){It&&(Pe=It),be[ft]=Ht,--oe===0&&H(Pe,be)})})}function A(k){var C=[];for(var H in k)C.push(k[H]);return C}function M(k,C){var H=[];for(var oe in k)oe in C||H.push(oe);return H}function g(k){for(var C=[],H=arguments.length-1;H-- >0;)C[H]=arguments[H+1];for(var oe=0,be=C;oe>C/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,k)}return k()}function m(k){return k<=1?1:Math.pow(2,Math.ceil(Math.log(k)/Math.LN2))}function R(k){return k?/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(k):!1}function L(k,C){k.forEach(function(H){C[H]&&(C[H]=C[H].bind(C))})}function z(k,C){return k.indexOf(C,k.length-C.length)!==-1}function F(k,C,H){var oe={};for(var be in k)oe[be]=C.call(H||this,k[be],be,k);return oe}function N(k,C,H){var oe={};for(var be in k)C.call(H||this,k[be],be,k)&&(oe[be]=k[be]);return oe}function O(k){return Array.isArray(k)?k.map(O):typeof k=="object"&&k?F(k,O):k}function P(k,C){for(var H=0;H=0)return!0;return!1}var U={};function B(k){U[k]||(typeof console<"u"&&console.warn(k),U[k]=!0)}function X(k,C,H){return(H.y-k.y)*(C.x-k.x)>(C.y-k.y)*(H.x-k.x)}function $(k){for(var C=0,H=0,oe=k.length,be=oe-1,Pe=void 0,Ne=void 0;H@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,H={};if(k.replace(C,function(be,Pe,Ne,ft){var It=Ne||ft;return H[Pe]=It?It.toLowerCase():!0,""}),H["max-age"]){var oe=parseInt(H["max-age"],10);isNaN(oe)?delete H["max-age"]:H["max-age"]=oe}return H}var G=null;function Y(k){if(G==null){var C=k.navigator?k.navigator.userAgent:null;G=!!k.safari||!!(C&&(/\b(iPad|iPhone|iPod)\b/.test(C)||C.match("Safari")&&!C.match("Chrome")))}return G}function ee(k){try{var C=s[k];return C.setItem("_mapbox_test_",1),C.removeItem("_mapbox_test_"),!0}catch{return!1}}function q(k){return s.btoa(encodeURIComponent(k).replace(/%([0-9A-F]{2})/g,function(C,H){return String.fromCharCode(+("0x"+H))}))}function se(k){return decodeURIComponent(s.atob(k).split("").map(function(C){return"%"+("00"+C.charCodeAt(0).toString(16)).slice(-2)}).join(""))}var ae=s.performance&&s.performance.now?s.performance.now.bind(s.performance):Date.now.bind(Date),j=s.requestAnimationFrame||s.mozRequestAnimationFrame||s.webkitRequestAnimationFrame||s.msRequestAnimationFrame,Q=s.cancelAnimationFrame||s.mozCancelAnimationFrame||s.webkitCancelAnimationFrame||s.msCancelAnimationFrame,re,pe,we={now:ae,frame:function(C){var H=j(C);return{cancel:function(){return Q(H)}}},getImageData:function(C,H){H===void 0&&(H=0);var oe=s.document.createElement("canvas"),be=oe.getContext("2d");if(!be)throw new Error("failed to create canvas 2d context");return oe.width=C.width,oe.height=C.height,be.drawImage(C,0,0,C.width,C.height),be.getImageData(-H,-H,C.width+2*H,C.height+2*H)},resolveURL:function(C){return re||(re=s.document.createElement("a")),re.href=C,re.href},hardwareConcurrency:s.navigator&&s.navigator.hardwareConcurrency||4,get devicePixelRatio(){return s.devicePixelRatio},get prefersReducedMotion(){return s.matchMedia?(pe==null&&(pe=s.matchMedia("(prefers-reduced-motion: reduce)")),pe.matches):!1}},Se={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},Ie={supported:!1,testSupport:tt},Re,We=!1,at,nt=!1;s.document&&(at=s.document.createElement("img"),at.onload=function(){Re&&qe(Re),Re=null,nt=!0},at.onerror=function(){We=!0,Re=null},at.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");function tt(k){We||!at||(nt?qe(k):Re=k)}function qe(k){var C=k.createTexture();k.bindTexture(k.TEXTURE_2D,C);try{if(k.texImage2D(k.TEXTURE_2D,0,k.RGBA,k.RGBA,k.UNSIGNED_BYTE,at),k.isContextLost())return;Ie.supported=!0}catch{}k.deleteTexture(C),We=!0}var he="01";function ue(){for(var k="1",C="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",H="",oe=0;oe<10;oe++)H+=C[Math.floor(Math.random()*62)];var be=12*60*60*1e3,Pe=[k,he,H].join(""),Ne=Date.now()+be;return{token:Pe,tokenExpiresAt:Ne}}var ne=function(C,H){this._transformRequestFn=C,this._customAccessToken=H,this._createSkuToken()};ne.prototype._createSkuToken=function(){var C=ue();this._skuToken=C.token,this._skuTokenExpiresAt=C.tokenExpiresAt},ne.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},ne.prototype.transformRequest=function(C,H){return this._transformRequestFn?this._transformRequestFn(C,H)||{url:C}:{url:C}},ne.prototype.normalizeStyleURL=function(C,H){if(!Ce(C))return C;var oe=Nt(C);return oe.path="/styles/v1"+oe.path,this._makeAPIURL(oe,this._customAccessToken||H)},ne.prototype.normalizeGlyphsURL=function(C,H){if(!Ce(C))return C;var oe=Nt(C);return oe.path="/fonts/v1"+oe.path,this._makeAPIURL(oe,this._customAccessToken||H)},ne.prototype.normalizeSourceURL=function(C,H){if(!Ce(C))return C;var oe=Nt(C);return oe.path="/v4/"+oe.authority+".json",oe.params.push("secure"),this._makeAPIURL(oe,this._customAccessToken||H)},ne.prototype.normalizeSpriteURL=function(C,H,oe,be){var Pe=Nt(C);return Ce(C)?(Pe.path="/styles/v1"+Pe.path+"/sprite"+H+oe,this._makeAPIURL(Pe,this._customAccessToken||be)):(Pe.path+=""+H+oe,Gt(Pe))},ne.prototype.normalizeTileURL=function(C,H){if(this._isSkuTokenExpired()&&this._createSkuToken(),C&&!Ce(C))return C;var oe=Nt(C),be=/(\.(png|jpg)\d*)(?=$)/,Pe=/^.+\/v4\//,Ne=we.devicePixelRatio>=2||H===512?"@2x":"",ft=Ie.supported?".webp":"$1";oe.path=oe.path.replace(be,""+Ne+ft),oe.path=oe.path.replace(Pe,"/"),oe.path="/v4"+oe.path;var It=this._customAccessToken||Mt(oe.params)||Se.ACCESS_TOKEN;return Se.REQUIRE_ACCESS_TOKEN&&It&&this._skuToken&&oe.params.push("sku="+this._skuToken),this._makeAPIURL(oe,It)},ne.prototype.canonicalizeTileURL=function(C,H){var oe="/v4/",be=/\.[\w]+$/,Pe=Nt(C);if(!Pe.path.match(/(^\/v4\/)/)||!Pe.path.match(be))return C;var Ne="mapbox://tiles/";Ne+=Pe.path.replace(oe,"");var ft=Pe.params;return H&&(ft=ft.filter(function(It){return!It.match(/^access_token=/)})),ft.length&&(Ne+="?"+ft.join("&")),Ne},ne.prototype.canonicalizeTileset=function(C,H){for(var oe=H?Ce(H):!1,be=[],Pe=0,Ne=C.tiles||[];Pe=0&&C.params.splice(Pe,1)}if(be.path!=="/"&&(C.path=""+be.path+C.path),!Se.REQUIRE_ACCESS_TOKEN)return Gt(C);if(H=H||Se.ACCESS_TOKEN,!H)throw new Error("An API access token is required to use Mapbox GL. "+oe);if(H[0]==="s")throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). "+oe);return C.params=C.params.filter(function(Ne){return Ne.indexOf("access_token")===-1}),C.params.push("access_token="+H),Gt(C)};function Ce(k){return k.indexOf("mapbox:")===0}var Ye=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function rt(k){return Ye.test(k)}function Ke(k){return k.indexOf("sku=")>0&&rt(k)}function Mt(k){for(var C=0,H=k;C=1&&s.localStorage.setItem(H,JSON.stringify(this.eventData))}catch{B("Unable to write to LocalStorage")}},qr.prototype.processRequests=function(C){},qr.prototype.postEvent=function(C,H,oe,be){var Pe=this;if(Se.EVENTS_URL){var Ne=Nt(Se.EVENTS_URL);Ne.params.push("access_token="+(be||Se.ACCESS_TOKEN||""));var ft={event:this.type,created:new Date(C).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:r,skuId:he,userId:this.anonId},It=H?g(ft,H):ft,Ht={url:Gt(Ne),headers:{"Content-Type":"text/plain"},body:JSON.stringify([It])};this.pendingRequest=ca(Ht,function(er){Pe.pendingRequest=null,oe(er),Pe.saveEventData(),Pe.processRequests(be)})}},qr.prototype.queueRequest=function(C,H){this.queue.push(C),this.processRequests(H)};var Er=function(k){function C(){k.call(this,"map.load"),this.success={},this.skuToken=""}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype.postMapLoadEvent=function(oe,be,Pe,Ne){this.skuToken=Pe,(Se.EVENTS_URL&&Ne||Se.ACCESS_TOKEN&&Array.isArray(oe)&&oe.some(function(ft){return Ce(ft)||rt(ft)}))&&this.queueRequest({id:be,timestamp:Date.now()},Ne)},C.prototype.processRequests=function(oe){var be=this;if(!(this.pendingRequest||this.queue.length===0)){var Pe=this.queue.shift(),Ne=Pe.id,ft=Pe.timestamp;Ne&&this.success[Ne]||(this.anonId||this.fetchEventData(),R(this.anonId)||(this.anonId=y()),this.postEvent(ft,{skuToken:this.skuToken},function(It){It||Ne&&(be.success[Ne]=!0)},oe))}},C}(qr),Ir=function(k){function C(H){k.call(this,"appUserTurnstile"),this._customAccessToken=H}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype.postTurnstileEvent=function(oe,be){Se.EVENTS_URL&&Se.ACCESS_TOKEN&&Array.isArray(oe)&&oe.some(function(Pe){return Ce(Pe)||rt(Pe)})&&this.queueRequest(Date.now(),be)},C.prototype.processRequests=function(oe){var be=this;if(!(this.pendingRequest||this.queue.length===0)){(!this.anonId||!this.eventData.lastSuccess||!this.eventData.tokenU)&&this.fetchEventData();var Pe=mr(Se.ACCESS_TOKEN),Ne=Pe?Pe.u:Se.ACCESS_TOKEN,ft=Ne!==this.eventData.tokenU;R(this.anonId)||(this.anonId=y(),ft=!0);var It=this.queue.shift();if(this.eventData.lastSuccess){var Ht=new Date(this.eventData.lastSuccess),er=new Date(It),Lr=(It-this.eventData.lastSuccess)/(24*60*60*1e3);ft=ft||Lr>=1||Lr<-1||Ht.getDate()!==er.getDate()}else ft=!0;if(!ft)return this.processRequests();this.postEvent(It,{"enabled.telemetry":!1},function(Zr){Zr||(be.eventData.lastSuccess=It,be.eventData.tokenU=Ne)},oe)}},C}(qr),_t=new Ir,Oe=_t.postTurnstileEvent.bind(_t),Je=new Er,Ae=Je.postMapLoadEvent.bind(Je),Le="mapbox-tiles",Ue=500,Ze=50,st=1e3*60*7,ut;function Ut(){s.caches&&!ut&&(ut=s.caches.open(Le))}var Ct;function Pt(k,C){if(Ct===void 0)try{new Response(new ReadableStream),Ct=!0}catch{Ct=!1}Ct?C(k.body):k.blob().then(C)}function jt(k,C,H){if(Ut(),!!ut){var oe={status:C.status,statusText:C.statusText,headers:new s.Headers};C.headers.forEach(function(Ne,ft){return oe.headers.set(ft,Ne)});var be=de(C.headers.get("Cache-Control")||"");if(!be["no-store"]){be["max-age"]&&oe.headers.set("Expires",new Date(H+be["max-age"]*1e3).toUTCString());var Pe=new Date(oe.headers.get("Expires")).getTime()-H;PeDate.now()&&!H["no-cache"]}var Pr=1/0;function Ta(k){Pr++,Pr>Ze&&(k.getActor().send("enforceCacheSizeLimit",Ue),Pr=0)}function Oa(k){Ut(),ut&&ut.then(function(C){C.keys().then(function(H){for(var oe=0;oe=200&&H.status<300||H.status===0)&&H.response!==null){var be=H.response;if(k.type==="json")try{be=JSON.parse(H.response)}catch(Pe){return C(Pe)}C(null,be,H.getResponseHeader("Cache-Control"),H.getResponseHeader("Expires"))}else C(new wi(H.statusText,H.status,k.url))},H.send(k.body),{cancel:function(){return H.abort()}}}var Fr=function(k,C){if(!Dt(k.url)){if(s.fetch&&s.Request&&s.AbortController&&s.Request.prototype.hasOwnProperty("signal"))return Yt(k,C);if(ce()&&self.worker&&self.worker.actor){var H=!0;return self.worker.actor.send("getResource",k,C,void 0,H)}}return Jt(k,C)},ta=function(k,C){return Fr(g(k,{type:"json"}),C)},ra=function(k,C){return Fr(g(k,{type:"arrayBuffer"}),C)},ca=function(k,C){return Fr(g(k,{method:"POST"}),C)};function Ba(k){var C=s.document.createElement("a");return C.href=k,C.protocol===s.document.location.protocol&&C.host===s.document.location.host}var $a="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function Za(k,C,H,oe){var be=new s.Image,Pe=s.URL;be.onload=function(){C(null,be),Pe.revokeObjectURL(be.src),be.onload=null,s.requestAnimationFrame(function(){be.src=$a})},be.onerror=function(){return C(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))};var Ne=new s.Blob([new Uint8Array(k)],{type:"image/png"});be.cacheControl=H,be.expires=oe,be.src=k.byteLength?Pe.createObjectURL(Ne):$a}function ri(k,C){var H=new s.Blob([new Uint8Array(k)],{type:"image/png"});s.createImageBitmap(H).then(function(oe){C(null,oe)}).catch(function(oe){C(new Error("Could not load image because of "+oe.message+". Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))})}var pi,Ra,an=function(){pi=[],Ra=0};an();var tn=function(k,C){if(Ie.supported&&(k.headers||(k.headers={}),k.headers.accept="image/webp,*/*"),Ra>=Se.MAX_PARALLEL_IMAGE_REQUESTS){var H={requestParameters:k,callback:C,cancelled:!1,cancel:function(){this.cancelled=!0}};return pi.push(H),H}Ra++;var oe=!1,be=function(){if(!oe)for(oe=!0,Ra--;pi.length&&Ra0||this._oneTimeListeners&&this._oneTimeListeners[C]&&this._oneTimeListeners[C].length>0||this._eventedParent&&this._eventedParent.listens(C)},xr.prototype.setEventedParent=function(C,H){return this._eventedParent=C,this._eventedParentData=H,this};var Rr=8,Ur={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"}},Hr={"*":{type:"source"}},gt=["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],Xt={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:"*"}},vr={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:"*"}},Or={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:"*"}},ba={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"}},Pa={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"}}},ma={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"}}},la={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"}},_a=["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],Ai={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},ki={"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"}},Ki={"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"}},yn={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Ln={"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"}},kn={"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"}},Bn={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},ao={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},xo={type:"array",value:"*"},Co={type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},Fs={type:"enum",values:{Point:{},LineString:{},Polygon:{}}},Mn={type:"array",minimum:0,maximum:24,value:["number","color"],length:2},Ao={type:"array",value:"*",minimum:1},On={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}},ts=["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],is={"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"}},_s={"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"}},Oo={"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"}},io={"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"}},Gn={"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"}},eo={"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"}},ns={"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"}},gs={"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"}},Ls={duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},Xo={"*":{type:"string"}},Gi={$version:Rr,$root:Ur,sources:Hr,source:gt,source_vector:Xt,source_raster:vr,source_raster_dem:Or,source_geojson:ba,source_video:Pa,source_image:ma,layer:la,layout:_a,layout_background:Ai,layout_fill:ki,layout_circle:Ki,layout_heatmap:yn,"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:Ln,layout_symbol:kn,layout_raster:Bn,layout_hillshade:ao,filter:xo,filter_operator:Co,geometry_type:Fs,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:Mn,expression:Ao,light:On,paint:ts,paint_fill:is,"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:_s,paint_circle:Oo,paint_heatmap:io,paint_symbol:Gn,paint_raster:eo,paint_hillshade:ns,paint_background:gs,transition:Ls,"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:Xo},Pn=function(C,H,oe,be){this.message=(C?C+": ":"")+oe,be&&(this.identifier=be),H!=null&&H.__line__&&(this.line=H.__line__)};function js(k){var C=k.key,H=k.value;return H?[new Pn(C,H,"constants have been deprecated as of v8")]:[]}function xs(k){for(var C=[],H=arguments.length-1;H-- >0;)C[H]=arguments[H+1];for(var oe=0,be=C;oe":k.itemType.kind==="value"?"array":"array<"+C+">"}else return k.kind}var Nl=[il,_n,Lo,bo,Rs,As,pu,us(uo),qs];function su(k,C){if(C.kind==="error")return null;if(k.kind==="array"){if(C.kind==="array"&&(C.N===0&&C.itemType.kind==="value"||!su(k.itemType,C.itemType))&&(typeof k.N!="number"||k.N===C.N))return null}else{if(k.kind===C.kind)return null;if(k.kind==="value")for(var H=0,oe=Nl;H255?255:Ht}function be(Ht){return Ht<0?0:Ht>1?1:Ht}function Pe(Ht){return Ht[Ht.length-1]==="%"?oe(parseFloat(Ht)/100*255):oe(parseInt(Ht))}function Ne(Ht){return Ht[Ht.length-1]==="%"?be(parseFloat(Ht)/100):be(parseFloat(Ht))}function ft(Ht,er,Lr){return Lr<0?Lr+=1:Lr>1&&(Lr-=1),Lr*6<1?Ht+(er-Ht)*Lr*6:Lr*2<1?er:Lr*3<2?Ht+(er-Ht)*(2/3-Lr)*6:Ht}function It(Ht){var er=Ht.replace(/ /g,"").toLowerCase();if(er in H)return H[er].slice();if(er[0]==="#"){if(er.length===4){var Lr=parseInt(er.substr(1),16);return Lr>=0&&Lr<=4095?[(Lr&3840)>>4|(Lr&3840)>>8,Lr&240|(Lr&240)>>4,Lr&15|(Lr&15)<<4,1]:null}else if(er.length===7){var Lr=parseInt(er.substr(1),16);return Lr>=0&&Lr<=16777215?[(Lr&16711680)>>16,(Lr&65280)>>8,Lr&255,1]:null}return null}var Zr=er.indexOf("("),Vr=er.indexOf(")");if(Zr!==-1&&Vr+1===er.length){var ua=er.substr(0,Zr),Fa=er.substr(Zr+1,Vr-(Zr+1)).split(","),Mi=1;switch(ua){case"rgba":if(Fa.length!==4)return null;Mi=Ne(Fa.pop());case"rgb":return Fa.length!==3?null:[Pe(Fa[0]),Pe(Fa[1]),Pe(Fa[2]),Mi];case"hsla":if(Fa.length!==4)return null;Mi=Ne(Fa.pop());case"hsl":if(Fa.length!==3)return null;var ii=(parseFloat(Fa[0])%360+360)%360/360,$i=Ne(Fa[1]),Oi=Ne(Fa[2]),Ji=Oi<=.5?Oi*($i+1):Oi+$i-Oi*$i,ln=Oi*2-Ji;return[oe(ft(ln,Ji,ii+1/3)*255),oe(ft(ln,Ji,ii)*255),oe(ft(ln,Ji,ii-1/3)*255),Mi];default:return null}}return null}try{C.parseCSSColor=It}catch{}}),Uc=Sf.parseCSSColor,Bs=function(C,H,oe,be){be===void 0&&(be=1),this.r=C,this.g=H,this.b=oe,this.a=be};Bs.parse=function(C){if(C){if(C instanceof Bs)return C;if(typeof C=="string"){var H=Uc(C);if(H)return new Bs(H[0]/255*H[3],H[1]/255*H[3],H[2]/255*H[3],H[3])}}},Bs.prototype.toString=function(){var C=this.toArray(),H=C[0],oe=C[1],be=C[2],Pe=C[3];return"rgba("+Math.round(H)+","+Math.round(oe)+","+Math.round(be)+","+Pe+")"},Bs.prototype.toArray=function(){var C=this,H=C.r,oe=C.g,be=C.b,Pe=C.a;return Pe===0?[0,0,0,0]:[H*255/Pe,oe*255/Pe,be*255/Pe,Pe]},Bs.black=new Bs(0,0,0,1),Bs.white=new Bs(1,1,1,1),Bs.transparent=new Bs(0,0,0,0),Bs.red=new Bs(1,0,0,1);var dc=function(C,H,oe){C?this.sensitivity=H?"variant":"case":this.sensitivity=H?"accent":"base",this.locale=oe,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};dc.prototype.compare=function(C,H){return this.collator.compare(C,H)},dc.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var Hc=function(C,H,oe,be,Pe){this.text=C,this.image=H,this.scale=oe,this.fontStack=be,this.textColor=Pe},lu=function(C){this.sections=C};lu.fromString=function(C){return new lu([new Hc(C,null,null,null,null)])},lu.prototype.isEmpty=function(){return this.sections.length===0?!0:!this.sections.some(function(C){return C.text.length!==0||C.image&&C.image.name.length!==0})},lu.factory=function(C){return C instanceof lu?C:lu.fromString(C)},lu.prototype.toString=function(){return this.sections.length===0?"":this.sections.map(function(C){return C.text}).join("")},lu.prototype.serialize=function(){for(var C=["format"],H=0,oe=this.sections;H=0&&k<=255&&typeof C=="number"&&C>=0&&C<=255&&typeof H=="number"&&H>=0&&H<=255)){var be=typeof oe=="number"?[k,C,H,oe]:[k,C,H];return"Invalid rgba value ["+be.join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}return typeof oe>"u"||typeof oe=="number"&&oe>=0&&oe<=1?null:"Invalid rgba value ["+[k,C,H,oe].join(", ")+"]: 'a' must be between 0 and 1."}function Ou(k){if(k===null)return!0;if(typeof k=="string")return!0;if(typeof k=="boolean")return!0;if(typeof k=="number")return!0;if(k instanceof Bs)return!0;if(k instanceof dc)return!0;if(k instanceof lu)return!0;if(k instanceof Pl)return!0;if(Array.isArray(k)){for(var C=0,H=k;C2){var ft=C[1];if(typeof ft!="string"||!(ft in nc)||ft==="object")return H.error('The item type argument of "array" must be one of string, number, boolean',1);Ne=nc[ft],oe++}else Ne=uo;var It;if(C.length>3){if(C[2]!==null&&(typeof C[2]!="number"||C[2]<0||C[2]!==Math.floor(C[2])))return H.error('The length argument to "array" must be a positive integer literal',2);It=C[2],oe++}be=us(Ne,It)}else be=nc[Pe];for(var Ht=[];oe1)&&H.push(be)}}return H.concat(this.args.map(function(Pe){return Pe.serialize()}))};var qu=function(C){this.type=As,this.sections=C};qu.parse=function(C,H){if(C.length<2)return H.error("Expected at least one argument.");var oe=C[1];if(!Array.isArray(oe)&&typeof oe=="object")return H.error("First argument must be an image or text section.");for(var be=[],Pe=!1,Ne=1;Ne<=C.length-1;++Ne){var ft=C[Ne];if(Pe&&typeof ft=="object"&&!Array.isArray(ft)){Pe=!1;var It=null;if(ft["font-scale"]&&(It=H.parse(ft["font-scale"],1,_n),!It))return null;var Ht=null;if(ft["text-font"]&&(Ht=H.parse(ft["text-font"],1,us(Lo)),!Ht))return null;var er=null;if(ft["text-color"]&&(er=H.parse(ft["text-color"],1,Rs),!er))return null;var Lr=be[be.length-1];Lr.scale=It,Lr.font=Ht,Lr.textColor=er}else{var Zr=H.parse(C[Ne],1,uo);if(!Zr)return null;var Vr=Zr.type.kind;if(Vr!=="string"&&Vr!=="value"&&Vr!=="null"&&Vr!=="resolvedImage")return H.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");Pe=!0,be.push({content:Zr,scale:null,font:null,textColor:null})}}return new qu(be)},qu.prototype.evaluate=function(C){var H=function(oe){var be=oe.content.evaluate(C);return nl(be)===qs?new Hc("",be,null,null,null):new Hc(ml(be),null,oe.scale?oe.scale.evaluate(C):null,oe.font?oe.font.evaluate(C).join(","):null,oe.textColor?oe.textColor.evaluate(C):null)};return new lu(this.sections.map(H))},qu.prototype.eachChild=function(C){for(var H=0,oe=this.sections;H-1),oe},fl.prototype.eachChild=function(C){C(this.input)},fl.prototype.outputDefined=function(){return!1},fl.prototype.serialize=function(){return["image",this.input.serialize()]};var xh={"to-boolean":bo,"to-color":Rs,"to-number":_n,"to-string":Lo},ss=function(C,H){this.type=C,this.args=H};ss.parse=function(C,H){if(C.length<2)return H.error("Expected at least one argument.");var oe=C[0];if((oe==="to-boolean"||oe==="to-string")&&C.length!==2)return H.error("Expected one argument.");for(var be=xh[oe],Pe=[],Ne=1;Ne4?oe="Invalid rbga value "+JSON.stringify(H)+": expected an array containing either three or four numeric values.":oe=ic(H[0],H[1],H[2],H[3]),!oe))return new Bs(H[0]/255,H[1]/255,H[2]/255,H[3])}throw new Zs(oe||"Could not parse color from value '"+(typeof H=="string"?H:String(JSON.stringify(H)))+"'")}else if(this.type.kind==="number"){for(var It=null,Ht=0,er=this.args;Ht=C[2]||k[1]<=C[1]||k[3]>=C[3])}function Jf(k,C){var H=Ac(k[0]),oe=nf(k[1]),be=Math.pow(2,C.z);return[Math.round(H*be*jl),Math.round(oe*be*jl)]}function Of(k,C,H){var oe=k[0]-C[0],be=k[1]-C[1],Pe=k[0]-H[0],Ne=k[1]-H[1];return oe*Ne-Pe*be===0&&oe*Pe<=0&&be*Ne<=0}function of(k,C,H){return C[1]>k[1]!=H[1]>k[1]&&k[0]<(H[0]-C[0])*(k[1]-C[1])/(H[1]-C[1])+C[0]}function jc(k,C){for(var H=!1,oe=0,be=C.length;oe0&&Lr<0||er<0&&Lr>0}function Ef(k,C,H,oe){var be=[C[0]-k[0],C[1]-k[1]],Pe=[oe[0]-H[0],oe[1]-H[1]];return Nf(Pe,be)===0?!1:!!(Gu(k,C,H,oe)&&Gu(H,oe,k,C))}function oc(k,C,H){for(var oe=0,be=H;oeH[2]){var be=oe*.5,Pe=k[0]-H[0]>be?-oe:H[0]-k[0]>be?oe:0;Pe===0&&(Pe=k[0]-H[2]>be?-oe:H[2]-k[0]>be?oe:0),k[0]+=Pe}Mf(C,k)}function kf(k){k[0]=k[1]=1/0,k[2]=k[3]=-1/0}function fh(k,C,H,oe){for(var be=Math.pow(2,oe.z)*jl,Pe=[oe.x*jl,oe.y*jl],Ne=[],ft=0,It=k;ft=0)return!1;var H=!0;return k.eachChild(function(oe){H&&!Lu(oe,C)&&(H=!1)}),H}var Mc=function(C,H){this.type=H.type,this.name=C,this.boundExpression=H};Mc.parse=function(C,H){if(C.length!==2||typeof C[1]!="string")return H.error("'var' expression requires exactly one string literal argument.");var oe=C[1];return H.scope.has(oe)?new Mc(oe,H.scope.get(oe)):H.error('Unknown variable "'+oe+'". Make sure "'+oe+'" has been bound in an enclosing "let" expression before using it.',1)},Mc.prototype.evaluate=function(C){return this.boundExpression.evaluate(C)},Mc.prototype.eachChild=function(){},Mc.prototype.outputDefined=function(){return!1},Mc.prototype.serialize=function(){return["var",this.name]};var ol=function(C,H,oe,be,Pe){H===void 0&&(H=[]),be===void 0&&(be=new Xs),Pe===void 0&&(Pe=[]),this.registry=C,this.path=H,this.key=H.map(function(Ne){return"["+Ne+"]"}).join(""),this.scope=be,this.errors=Pe,this.expectedType=oe};ol.prototype.parse=function(C,H,oe,be,Pe){return Pe===void 0&&(Pe={}),H?this.concat(H,oe,be)._parse(C,Pe):this._parse(C,Pe)},ol.prototype._parse=function(C,H){(C===null||typeof C=="string"||typeof C=="boolean"||typeof C=="number")&&(C=["literal",C]);function oe(er,Lr,Zr){return Zr==="assert"?new Ul(Lr,[er]):Zr==="coerce"?new ss(Lr,[er]):er}if(Array.isArray(C)){if(C.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var be=C[0];if(typeof be!="string")return this.error("Expression name must be a string, but found "+typeof be+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var Pe=this.registry[be];if(Pe){var Ne=Pe.parse(C,this);if(!Ne)return null;if(this.expectedType){var ft=this.expectedType,It=Ne.type;if((ft.kind==="string"||ft.kind==="number"||ft.kind==="boolean"||ft.kind==="object"||ft.kind==="array")&&It.kind==="value")Ne=oe(Ne,ft,H.typeAnnotation||"assert");else if((ft.kind==="color"||ft.kind==="formatted"||ft.kind==="resolvedImage")&&(It.kind==="value"||It.kind==="string"))Ne=oe(Ne,ft,H.typeAnnotation||"coerce");else if(this.checkSubtype(ft,It))return null}if(!(Ne instanceof bs)&&Ne.type.kind!=="resolvedImage"&&vc(Ne)){var Ht=new ks;try{Ne=new bs(Ne.type,Ne.evaluate(Ht))}catch(er){return this.error(er.message),null}}return Ne}return this.error('Unknown expression "'+be+'". If you wanted a literal array, use ["literal", [...]].',0)}else return typeof C>"u"?this.error("'undefined' value invalid. Use null instead."):typeof C=="object"?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof C+" instead.")},ol.prototype.concat=function(C,H,oe){var be=typeof C=="number"?this.path.concat(C):this.path,Pe=oe?this.scope.concat(oe):this.scope;return new ol(this.registry,be,H||null,Pe,this.errors)},ol.prototype.error=function(C){for(var H=[],oe=arguments.length-1;oe-- >0;)H[oe]=arguments[oe+1];var be=""+this.key+H.map(function(Pe){return"["+Pe+"]"}).join("");this.errors.push(new ds(be,C))},ol.prototype.checkSubtype=function(C,H){var oe=su(C,H);return oe&&this.error(oe),oe};function vc(k){if(k instanceof Mc)return vc(k.boundExpression);if(k instanceof to&&k.name==="error")return!1;if(k instanceof Vu)return!1;if(k instanceof Cu)return!1;var C=k instanceof ss||k instanceof Ul,H=!0;return k.eachChild(function(oe){C?H=H&&vc(oe):H=H&&oe instanceof bs}),H?jf(k)&&Lu(k,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"]):!1}function yu(k,C){for(var H=k.length-1,oe=0,be=H,Pe=0,Ne,ft;oe<=be;)if(Pe=Math.floor((oe+be)/2),Ne=k[Pe],ft=k[Pe+1],Ne<=C){if(Pe===H||CC)be=Pe-1;else throw new Zs("Input is not a number.");return 0}var Tu=function(C,H,oe){this.type=C,this.input=H,this.labels=[],this.outputs=[];for(var be=0,Pe=oe;be=ft)return H.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',Ht);var Lr=H.parse(It,er,Pe);if(!Lr)return null;Pe=Pe||Lr.type,be.push([ft,Lr])}return new Tu(Pe,oe,be)},Tu.prototype.evaluate=function(C){var H=this.labels,oe=this.outputs;if(H.length===1)return oe[0].evaluate(C);var be=this.input.evaluate(C);if(be<=H[0])return oe[0].evaluate(C);var Pe=H.length;if(be>=H[Pe-1])return oe[Pe-1].evaluate(C);var Ne=yu(H,be);return oe[Ne].evaluate(C)},Tu.prototype.eachChild=function(C){C(this.input);for(var H=0,oe=this.outputs;H0&&C.push(this.labels[H]),C.push(this.outputs[H].serialize());return C};function El(k,C,H){return k*(1-H)+C*H}function qf(k,C,H){return new Bs(El(k.r,C.r,H),El(k.g,C.g,H),El(k.b,C.b,H),El(k.a,C.a,H))}function Qf(k,C,H){return k.map(function(oe,be){return El(oe,C[be],H)})}var Bu=Object.freeze({__proto__:null,number:El,color:qf,array:Qf}),Ec=.95047,mc=1,Lh=1.08883,sf=4/29,vf=6/29,Nu=3*vf*vf,lf=vf*vf*vf,au=Math.PI/180,Yc=180/Math.PI;function hh(k){return k>lf?Math.pow(k,1/3):k/Nu+sf}function mf(k){return k>vf?k*k*k:Nu*(k-sf)}function sl(k){return 255*(k<=.0031308?12.92*k:1.055*Math.pow(k,1/2.4)-.055)}function _u(k){return k/=255,k<=.04045?k/12.92:Math.pow((k+.055)/1.055,2.4)}function Pu(k){var C=_u(k.r),H=_u(k.g),oe=_u(k.b),be=hh((.4124564*C+.3575761*H+.1804375*oe)/Ec),Pe=hh((.2126729*C+.7151522*H+.072175*oe)/mc),Ne=hh((.0193339*C+.119192*H+.9503041*oe)/Lh);return{l:116*Pe-16,a:500*(be-Pe),b:200*(Pe-Ne),alpha:k.a}}function Cf(k){var C=(k.l+16)/116,H=isNaN(k.a)?C:C+k.a/500,oe=isNaN(k.b)?C:C-k.b/200;return C=mc*mf(C),H=Ec*mf(H),oe=Lh*mf(oe),new Bs(sl(3.2404542*H-1.5371385*C-.4985314*oe),sl(-.969266*H+1.8760108*C+.041556*oe),sl(.0556434*H-.2040259*C+1.0572252*oe),k.alpha)}function hl(k,C,H){return{l:El(k.l,C.l,H),a:El(k.a,C.a,H),b:El(k.b,C.b,H),alpha:El(k.alpha,C.alpha,H)}}function uf(k){var C=Pu(k),H=C.l,oe=C.a,be=C.b,Pe=Math.atan2(be,oe)*Yc;return{h:Pe<0?Pe+360:Pe,c:Math.sqrt(oe*oe+be*be),l:H,alpha:k.a}}function kc(k){var C=k.h*au,H=k.c,oe=k.l;return Cf({l:oe,a:Math.cos(C)*H,b:Math.sin(C)*H,alpha:k.alpha})}function Hu(k,C,H){var oe=C-k;return k+H*(oe>180||oe<-180?oe-360*Math.round(oe/360):oe)}function gf(k,C,H){return{h:Hu(k.h,C.h,H),c:El(k.c,C.c,H),l:El(k.l,C.l,H),alpha:El(k.alpha,C.alpha,H)}}var Wu={forward:Pu,reverse:Cf,interpolate:hl},Kc={forward:uf,reverse:kc,interpolate:gf},Lf=Object.freeze({__proto__:null,lab:Wu,hcl:Kc}),iu=function(C,H,oe,be,Pe){this.type=C,this.operator=H,this.interpolation=oe,this.input=be,this.labels=[],this.outputs=[];for(var Ne=0,ft=Pe;Ne1}))return H.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);be={name:"cubic-bezier",controlPoints:It}}else return H.error("Unknown interpolation type "+String(be[0]),1,0);if(C.length-1<4)return H.error("Expected at least 4 arguments, but found only "+(C.length-1)+".");if((C.length-1)%2!==0)return H.error("Expected an even number of arguments.");if(Pe=H.parse(Pe,2,_n),!Pe)return null;var Ht=[],er=null;oe==="interpolate-hcl"||oe==="interpolate-lab"?er=Rs:H.expectedType&&H.expectedType.kind!=="value"&&(er=H.expectedType);for(var Lr=0;Lr=Zr)return H.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',ua);var Mi=H.parse(Vr,Fa,er);if(!Mi)return null;er=er||Mi.type,Ht.push([Zr,Mi])}return er.kind!=="number"&&er.kind!=="color"&&!(er.kind==="array"&&er.itemType.kind==="number"&&typeof er.N=="number")?H.error("Type "+Ss(er)+" is not interpolatable."):new iu(er,oe,be,Pe,Ht)},iu.prototype.evaluate=function(C){var H=this.labels,oe=this.outputs;if(H.length===1)return oe[0].evaluate(C);var be=this.input.evaluate(C);if(be<=H[0])return oe[0].evaluate(C);var Pe=H.length;if(be>=H[Pe-1])return oe[Pe-1].evaluate(C);var Ne=yu(H,be),ft=H[Ne],It=H[Ne+1],Ht=iu.interpolationFactor(this.interpolation,be,ft,It),er=oe[Ne].evaluate(C),Lr=oe[Ne+1].evaluate(C);return this.operator==="interpolate"?Bu[this.type.kind.toLowerCase()](er,Lr,Ht):this.operator==="interpolate-hcl"?Kc.reverse(Kc.interpolate(Kc.forward(er),Kc.forward(Lr),Ht)):Wu.reverse(Wu.interpolate(Wu.forward(er),Wu.forward(Lr),Ht))},iu.prototype.eachChild=function(C){C(this.input);for(var H=0,oe=this.outputs;H=oe.length)throw new Zs("Array index out of bounds: "+H+" > "+(oe.length-1)+".");if(H!==Math.floor(H))throw new Zs("Array index must be an integer, but found "+H+" instead.");return oe[H]},gc.prototype.eachChild=function(C){C(this.index),C(this.input)},gc.prototype.outputDefined=function(){return!1},gc.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var ql=function(C,H){this.type=bo,this.needle=C,this.haystack=H};ql.parse=function(C,H){if(C.length!==3)return H.error("Expected 2 arguments, but found "+(C.length-1)+" instead.");var oe=H.parse(C[1],1,uo),be=H.parse(C[2],2,uo);return!oe||!be?null:Tc(oe.type,[bo,Lo,_n,il,uo])?new ql(oe,be):H.error("Expected first argument to be of type boolean, string, number or null, but found "+Ss(oe.type)+" instead")},ql.prototype.evaluate=function(C){var H=this.needle.evaluate(C),oe=this.haystack.evaluate(C);if(!oe)return!1;if(!du(H,["boolean","string","number","null"]))throw new Zs("Expected first argument to be of type boolean, string, number or null, but found "+Ss(nl(H))+" instead.");if(!du(oe,["string","array"]))throw new Zs("Expected second argument to be of type array or string, but found "+Ss(nl(oe))+" instead.");return oe.indexOf(H)>=0},ql.prototype.eachChild=function(C){C(this.needle),C(this.haystack)},ql.prototype.outputDefined=function(){return!0},ql.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var xu=function(C,H,oe){this.type=_n,this.needle=C,this.haystack=H,this.fromIndex=oe};xu.parse=function(C,H){if(C.length<=2||C.length>=5)return H.error("Expected 3 or 4 arguments, but found "+(C.length-1)+" instead.");var oe=H.parse(C[1],1,uo),be=H.parse(C[2],2,uo);if(!oe||!be)return null;if(!Tc(oe.type,[bo,Lo,_n,il,uo]))return H.error("Expected first argument to be of type boolean, string, number or null, but found "+Ss(oe.type)+" instead");if(C.length===4){var Pe=H.parse(C[3],3,_n);return Pe?new xu(oe,be,Pe):null}else return new xu(oe,be)},xu.prototype.evaluate=function(C){var H=this.needle.evaluate(C),oe=this.haystack.evaluate(C);if(!du(H,["boolean","string","number","null"]))throw new Zs("Expected first argument to be of type boolean, string, number or null, but found "+Ss(nl(H))+" instead.");if(!du(oe,["string","array"]))throw new Zs("Expected second argument to be of type array or string, but found "+Ss(nl(oe))+" instead.");if(this.fromIndex){var be=this.fromIndex.evaluate(C);return oe.indexOf(H,be)}return oe.indexOf(H)},xu.prototype.eachChild=function(C){C(this.needle),C(this.haystack),this.fromIndex&&C(this.fromIndex)},xu.prototype.outputDefined=function(){return!1},xu.prototype.serialize=function(){if(this.fromIndex!=null&&this.fromIndex!==void 0){var C=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),C]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var Lc=function(C,H,oe,be,Pe,Ne){this.inputType=C,this.type=H,this.input=oe,this.cases=be,this.outputs=Pe,this.otherwise=Ne};Lc.parse=function(C,H){if(C.length<5)return H.error("Expected at least 4 arguments, but found only "+(C.length-1)+".");if(C.length%2!==1)return H.error("Expected an even number of arguments.");var oe,be;H.expectedType&&H.expectedType.kind!=="value"&&(be=H.expectedType);for(var Pe={},Ne=[],ft=2;ftNumber.MAX_SAFE_INTEGER)return er.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if(typeof Vr=="number"&&Math.floor(Vr)!==Vr)return er.error("Numeric branch labels must be integer values.");if(!oe)oe=nl(Vr);else if(er.checkSubtype(oe,nl(Vr)))return null;if(typeof Pe[String(Vr)]<"u")return er.error("Branch labels must be unique.");Pe[String(Vr)]=Ne.length}var ua=H.parse(Ht,ft,be);if(!ua)return null;be=be||ua.type,Ne.push(ua)}var Fa=H.parse(C[1],1,uo);if(!Fa)return null;var Mi=H.parse(C[C.length-1],C.length-1,be);return!Mi||Fa.type.kind!=="value"&&H.concat(1).checkSubtype(oe,Fa.type)?null:new Lc(oe,be,Fa,Pe,Ne,Mi)},Lc.prototype.evaluate=function(C){var H=this.input.evaluate(C),oe=nl(H)===this.inputType&&this.outputs[this.cases[H]]||this.otherwise;return oe.evaluate(C)},Lc.prototype.eachChild=function(C){C(this.input),this.outputs.forEach(C),C(this.otherwise)},Lc.prototype.outputDefined=function(){return this.outputs.every(function(C){return C.outputDefined()})&&this.otherwise.outputDefined()},Lc.prototype.serialize=function(){for(var C=this,H=["match",this.input.serialize()],oe=Object.keys(this.cases).sort(),be=[],Pe={},Ne=0,ft=oe;Ne=5)return H.error("Expected 3 or 4 arguments, but found "+(C.length-1)+" instead.");var oe=H.parse(C[1],1,uo),be=H.parse(C[2],2,_n);if(!oe||!be)return null;if(!Tc(oe.type,[us(uo),Lo,uo]))return H.error("Expected first argument to be of type array or string, but found "+Ss(oe.type)+" instead");if(C.length===4){var Pe=H.parse(C[3],3,_n);return Pe?new sc(oe.type,oe,be,Pe):null}else return new sc(oe.type,oe,be)},sc.prototype.evaluate=function(C){var H=this.input.evaluate(C),oe=this.beginIndex.evaluate(C);if(!du(H,["string","array"]))throw new Zs("Expected first argument to be of type array or string, but found "+Ss(nl(H))+" instead.");if(this.endIndex){var be=this.endIndex.evaluate(C);return H.slice(oe,be)}return H.slice(oe)},sc.prototype.eachChild=function(C){C(this.input),C(this.beginIndex),this.endIndex&&C(this.endIndex)},sc.prototype.outputDefined=function(){return!1},sc.prototype.serialize=function(){if(this.endIndex!=null&&this.endIndex!==void 0){var C=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),C]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};function Pc(k,C){return k==="=="||k==="!="?C.kind==="boolean"||C.kind==="string"||C.kind==="number"||C.kind==="null"||C.kind==="value":C.kind==="string"||C.kind==="number"||C.kind==="value"}function Qt(k,C,H){return C===H}function br(k,C,H){return C!==H}function aa(k,C,H){return CH}function ka(k,C,H){return C<=H}function li(k,C,H){return C>=H}function Ci(k,C,H,oe){return oe.compare(C,H)===0}function Hi(k,C,H,oe){return!Ci(k,C,H,oe)}function Qi(k,C,H,oe){return oe.compare(C,H)<0}function pn(k,C,H,oe){return oe.compare(C,H)>0}function Pi(k,C,H,oe){return oe.compare(C,H)<=0}function Di(k,C,H,oe){return oe.compare(C,H)>=0}function Ni(k,C,H){var oe=k!=="=="&&k!=="!=";return function(){function be(Pe,Ne,ft){this.type=bo,this.lhs=Pe,this.rhs=Ne,this.collator=ft,this.hasUntypedArgument=Pe.type.kind==="value"||Ne.type.kind==="value"}return be.parse=function(Ne,ft){if(Ne.length!==3&&Ne.length!==4)return ft.error("Expected two or three arguments.");var It=Ne[0],Ht=ft.parse(Ne[1],1,uo);if(!Ht)return null;if(!Pc(It,Ht.type))return ft.concat(1).error('"'+It+`" comparisons are not supported for type '`+Ss(Ht.type)+"'.");var er=ft.parse(Ne[2],2,uo);if(!er)return null;if(!Pc(It,er.type))return ft.concat(2).error('"'+It+`" comparisons are not supported for type '`+Ss(er.type)+"'.");if(Ht.type.kind!==er.type.kind&&Ht.type.kind!=="value"&&er.type.kind!=="value")return ft.error("Cannot compare types '"+Ss(Ht.type)+"' and '"+Ss(er.type)+"'.");oe&&(Ht.type.kind==="value"&&er.type.kind!=="value"?Ht=new Ul(er.type,[Ht]):Ht.type.kind!=="value"&&er.type.kind==="value"&&(er=new Ul(Ht.type,[er])));var Lr=null;if(Ne.length===4){if(Ht.type.kind!=="string"&&er.type.kind!=="string"&&Ht.type.kind!=="value"&&er.type.kind!=="value")return ft.error("Cannot use collator to compare non-string types.");if(Lr=ft.parse(Ne[3],3,vl),!Lr)return null}return new be(Ht,er,Lr)},be.prototype.evaluate=function(Ne){var ft=this.lhs.evaluate(Ne),It=this.rhs.evaluate(Ne);if(oe&&this.hasUntypedArgument){var Ht=nl(ft),er=nl(It);if(Ht.kind!==er.kind||!(Ht.kind==="string"||Ht.kind==="number"))throw new Zs('Expected arguments for "'+k+'" to be (string, string) or (number, number), but found ('+Ht.kind+", "+er.kind+") instead.")}if(this.collator&&!oe&&this.hasUntypedArgument){var Lr=nl(ft),Zr=nl(It);if(Lr.kind!=="string"||Zr.kind!=="string")return C(Ne,ft,It)}return this.collator?H(Ne,ft,It,this.collator.evaluate(Ne)):C(Ne,ft,It)},be.prototype.eachChild=function(Ne){Ne(this.lhs),Ne(this.rhs),this.collator&&Ne(this.collator)},be.prototype.outputDefined=function(){return!0},be.prototype.serialize=function(){var Ne=[k];return this.eachChild(function(ft){Ne.push(ft.serialize())}),Ne},be}()}var mi=Ni("==",Qt,Ci),Sn=Ni("!=",br,Hi),$n=Ni("<",aa,Qi),no=Ni(">",$r,pn),Qn=Ni("<=",ka,Pi),co=Ni(">=",li,Di),Tn=function(C,H,oe,be,Pe){this.type=Lo,this.number=C,this.locale=H,this.currency=oe,this.minFractionDigits=be,this.maxFractionDigits=Pe};Tn.parse=function(C,H){if(C.length!==3)return H.error("Expected two arguments.");var oe=H.parse(C[1],1,_n);if(!oe)return null;var be=C[2];if(typeof be!="object"||Array.isArray(be))return H.error("NumberFormat options argument must be an object.");var Pe=null;if(be.locale&&(Pe=H.parse(be.locale,1,Lo),!Pe))return null;var Ne=null;if(be.currency&&(Ne=H.parse(be.currency,1,Lo),!Ne))return null;var ft=null;if(be["min-fraction-digits"]&&(ft=H.parse(be["min-fraction-digits"],1,_n),!ft))return null;var It=null;return be["max-fraction-digits"]&&(It=H.parse(be["max-fraction-digits"],1,_n),!It)?null:new Tn(oe,Pe,Ne,ft,It)},Tn.prototype.evaluate=function(C){return new Intl.NumberFormat(this.locale?this.locale.evaluate(C):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(C):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(C):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(C):void 0}).format(this.number.evaluate(C))},Tn.prototype.eachChild=function(C){C(this.number),this.locale&&C(this.locale),this.currency&&C(this.currency),this.minFractionDigits&&C(this.minFractionDigits),this.maxFractionDigits&&C(this.maxFractionDigits)},Tn.prototype.outputDefined=function(){return!1},Tn.prototype.serialize=function(){var C={};return this.locale&&(C.locale=this.locale.serialize()),this.currency&&(C.currency=this.currency.serialize()),this.minFractionDigits&&(C["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(C["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),C]};var un=function(C){this.type=_n,this.input=C};un.parse=function(C,H){if(C.length!==2)return H.error("Expected 1 argument, but found "+(C.length-1)+" instead.");var oe=H.parse(C[1],1);return oe?oe.type.kind!=="array"&&oe.type.kind!=="string"&&oe.type.kind!=="value"?H.error("Expected argument of type string or array, but found "+Ss(oe.type)+" instead."):new un(oe):null},un.prototype.evaluate=function(C){var H=this.input.evaluate(C);if(typeof H=="string")return H.length;if(Array.isArray(H))return H.length;throw new Zs("Expected value to be of type string or array, but found "+Ss(nl(H))+" instead.")},un.prototype.eachChild=function(C){C(this.input)},un.prototype.outputDefined=function(){return!1},un.prototype.serialize=function(){var C=["length"];return this.eachChild(function(H){C.push(H.serialize())}),C};var go={"==":mi,"!=":Sn,">":no,"<":$n,">=":co,"<=":Qn,array:Ul,at:gc,boolean:Ul,case:Jc,coalesce:Xu,collator:Vu,format:qu,image:fl,in:ql,"index-of":xu,interpolate:iu,"interpolate-hcl":iu,"interpolate-lab":iu,length:un,let:Cc,literal:bs,match:Lc,number:Ul,"number-format":Tn,object:Ul,slice:sc,step:Tu,string:Ul,"to-boolean":ss,"to-color":ss,"to-number":ss,"to-string":ss,var:Mc,within:Cu};function Ko(k,C){var H=C[0],oe=C[1],be=C[2],Pe=C[3];H=H.evaluate(k),oe=oe.evaluate(k),be=be.evaluate(k);var Ne=Pe?Pe.evaluate(k):1,ft=ic(H,oe,be,Ne);if(ft)throw new Zs(ft);return new Bs(H/255*Ne,oe/255*Ne,be/255*Ne,Ne)}function Ms(k,C){return k in C}function rl(k,C){var H=C[k];return typeof H>"u"?null:H}function Ns(k,C,H,oe){for(;H<=oe;){var be=H+oe>>1;if(C[be]===k)return!0;C[be]>k?oe=be-1:H=be+1}return!1}function el(k){return{type:k}}to.register(go,{error:[Gs,[Lo],function(k,C){var H=C[0];throw new Zs(H.evaluate(k))}],typeof:[Lo,[uo],function(k,C){var H=C[0];return Ss(nl(H.evaluate(k)))}],"to-rgba":[us(_n,4),[Rs],function(k,C){var H=C[0];return H.evaluate(k).toArray()}],rgb:[Rs,[_n,_n,_n],Ko],rgba:[Rs,[_n,_n,_n,_n],Ko],has:{type:bo,overloads:[[[Lo],function(k,C){var H=C[0];return Ms(H.evaluate(k),k.properties())}],[[Lo,pu],function(k,C){var H=C[0],oe=C[1];return Ms(H.evaluate(k),oe.evaluate(k))}]]},get:{type:uo,overloads:[[[Lo],function(k,C){var H=C[0];return rl(H.evaluate(k),k.properties())}],[[Lo,pu],function(k,C){var H=C[0],oe=C[1];return rl(H.evaluate(k),oe.evaluate(k))}]]},"feature-state":[uo,[Lo],function(k,C){var H=C[0];return rl(H.evaluate(k),k.featureState||{})}],properties:[pu,[],function(k){return k.properties()}],"geometry-type":[Lo,[],function(k){return k.geometryType()}],id:[uo,[],function(k){return k.id()}],zoom:[_n,[],function(k){return k.globals.zoom}],"heatmap-density":[_n,[],function(k){return k.globals.heatmapDensity||0}],"line-progress":[_n,[],function(k){return k.globals.lineProgress||0}],accumulated:[uo,[],function(k){return k.globals.accumulated===void 0?null:k.globals.accumulated}],"+":[_n,el(_n),function(k,C){for(var H=0,oe=0,be=C;oe":[bo,[Lo,uo],function(k,C){var H=C[0],oe=C[1],be=k.properties()[H.value],Pe=oe.value;return typeof be==typeof Pe&&be>Pe}],"filter-id->":[bo,[uo],function(k,C){var H=C[0],oe=k.id(),be=H.value;return typeof oe==typeof be&&oe>be}],"filter-<=":[bo,[Lo,uo],function(k,C){var H=C[0],oe=C[1],be=k.properties()[H.value],Pe=oe.value;return typeof be==typeof Pe&&be<=Pe}],"filter-id-<=":[bo,[uo],function(k,C){var H=C[0],oe=k.id(),be=H.value;return typeof oe==typeof be&&oe<=be}],"filter->=":[bo,[Lo,uo],function(k,C){var H=C[0],oe=C[1],be=k.properties()[H.value],Pe=oe.value;return typeof be==typeof Pe&&be>=Pe}],"filter-id->=":[bo,[uo],function(k,C){var H=C[0],oe=k.id(),be=H.value;return typeof oe==typeof be&&oe>=be}],"filter-has":[bo,[uo],function(k,C){var H=C[0];return H.value in k.properties()}],"filter-has-id":[bo,[],function(k){return k.id()!==null&&k.id()!==void 0}],"filter-type-in":[bo,[us(Lo)],function(k,C){var H=C[0];return H.value.indexOf(k.geometryType())>=0}],"filter-id-in":[bo,[us(uo)],function(k,C){var H=C[0];return H.value.indexOf(k.id())>=0}],"filter-in-small":[bo,[Lo,us(uo)],function(k,C){var H=C[0],oe=C[1];return oe.value.indexOf(k.properties()[H.value])>=0}],"filter-in-large":[bo,[Lo,us(uo)],function(k,C){var H=C[0],oe=C[1];return Ns(k.properties()[H.value],oe.value,0,oe.value.length-1)}],all:{type:bo,overloads:[[[bo,bo],function(k,C){var H=C[0],oe=C[1];return H.evaluate(k)&&oe.evaluate(k)}],[el(bo),function(k,C){for(var H=0,oe=C;H-1}function jn(k){return!!k.expression&&k.expression.interpolated}function Io(k){return k instanceof Number?"number":k instanceof String?"string":k instanceof Boolean?"boolean":Array.isArray(k)?"array":k===null?"null":typeof k}function Js(k){return typeof k=="object"&&k!==null&&!Array.isArray(k)}function Ds(k){return k}function uu(k,C){var H=C.type==="color",oe=k.stops&&typeof k.stops[0][0]=="object",be=oe||k.property!==void 0,Pe=oe||!be,Ne=k.type||(jn(C)?"exponential":"interval");if(H&&(k=xs({},k),k.stops&&(k.stops=k.stops.map(function(Un){return[Un[0],Bs.parse(Un[1])]})),k.default?k.default=Bs.parse(k.default):k.default=Bs.parse(C.default)),k.colorSpace&&k.colorSpace!=="rgb"&&!Lf[k.colorSpace])throw new Error("Unknown color space: "+k.colorSpace);var ft,It,Ht;if(Ne==="exponential")ft=bu;else if(Ne==="interval")ft=Ic;else if(Ne==="categorical"){ft=Zu,It=Object.create(null);for(var er=0,Lr=k.stops;er=k.stops[oe-1][0])return k.stops[oe-1][1];var be=yu(k.stops.map(function(Pe){return Pe[0]}),H);return k.stops[be][1]}function bu(k,C,H){var oe=k.base!==void 0?k.base:1;if(Io(H)!=="number")return Iu(k.default,C.default);var be=k.stops.length;if(be===1||H<=k.stops[0][0])return k.stops[0][1];if(H>=k.stops[be-1][0])return k.stops[be-1][1];var Pe=yu(k.stops.map(function(Lr){return Lr[0]}),H),Ne=Au(H,oe,k.stops[Pe][0],k.stops[Pe+1][0]),ft=k.stops[Pe][1],It=k.stops[Pe+1][1],Ht=Bu[C.type]||Ds;if(k.colorSpace&&k.colorSpace!=="rgb"){var er=Lf[k.colorSpace];Ht=function(Lr,Zr){return er.reverse(er.interpolate(er.forward(Lr),er.forward(Zr),Ne))}}return typeof ft.evaluate=="function"?{evaluate:function(){for(var Zr=[],Vr=arguments.length;Vr--;)Zr[Vr]=arguments[Vr];var ua=ft.evaluate.apply(void 0,Zr),Fa=It.evaluate.apply(void 0,Zr);if(!(ua===void 0||Fa===void 0))return Ht(ua,Fa,Ne)}}:Ht(ft,It,Ne)}function Rc(k,C,H){return C.type==="color"?H=Bs.parse(H):C.type==="formatted"?H=lu.fromString(H.toString()):C.type==="resolvedImage"?H=Pl.fromString(H.toString()):Io(H)!==C.type&&(C.type!=="enum"||!C.values[H])&&(H=void 0),Iu(H,k.default,C.default)}function Au(k,C,H,oe){var be=oe-H,Pe=k-H;return be===0?0:C===1?Pe/be:(Math.pow(C,Pe)-1)/(Math.pow(C,be)-1)}var yc=function(C,H){this.expression=C,this._warningHistory={},this._evaluator=new ks,this._defaultValue=H?Me(H):null,this._enumValues=H&&H.type==="enum"?H.values:null};yc.prototype.evaluateWithoutErrorHandling=function(C,H,oe,be,Pe,Ne){return this._evaluator.globals=C,this._evaluator.feature=H,this._evaluator.featureState=oe,this._evaluator.canonical=be,this._evaluator.availableImages=Pe||null,this._evaluator.formattedSection=Ne,this.expression.evaluate(this._evaluator)},yc.prototype.evaluate=function(C,H,oe,be,Pe,Ne){this._evaluator.globals=C,this._evaluator.feature=H||null,this._evaluator.featureState=oe||null,this._evaluator.canonical=be,this._evaluator.availableImages=Pe||null,this._evaluator.formattedSection=Ne||null;try{var ft=this.expression.evaluate(this._evaluator);if(ft==null||typeof ft=="number"&&ft!==ft)return this._defaultValue;if(this._enumValues&&!(ft in this._enumValues))throw new Zs("Expected value to be one of "+Object.keys(this._enumValues).map(function(It){return JSON.stringify(It)}).join(", ")+", but found "+JSON.stringify(ft)+" instead.");return ft}catch(It){return this._warningHistory[It.message]||(this._warningHistory[It.message]=!0,typeof console<"u"&&console.warn(It.message)),this._defaultValue}};function fo(k){return Array.isArray(k)&&k.length>0&&typeof k[0]=="string"&&k[0]in go}function zo(k,C){var H=new ol(go,[],C?Te(C):void 0),oe=H.parse(k,void 0,void 0,void 0,C&&C.type==="string"?{typeAnnotation:"coerce"}:void 0);return oe?ws(new yc(oe,C)):Fl(H.errors)}var Dc=function(C,H){this.kind=C,this._styleExpression=H,this.isStateDependent=C!=="constant"&&!yl(H.expression)};Dc.prototype.evaluateWithoutErrorHandling=function(C,H,oe,be,Pe,Ne){return this._styleExpression.evaluateWithoutErrorHandling(C,H,oe,be,Pe,Ne)},Dc.prototype.evaluate=function(C,H,oe,be,Pe,Ne){return this._styleExpression.evaluate(C,H,oe,be,Pe,Ne)};var lc=function(C,H,oe,be){this.kind=C,this.zoomStops=oe,this._styleExpression=H,this.isStateDependent=C!=="camera"&&!yl(H.expression),this.interpolationType=be};lc.prototype.evaluateWithoutErrorHandling=function(C,H,oe,be,Pe,Ne){return this._styleExpression.evaluateWithoutErrorHandling(C,H,oe,be,Pe,Ne)},lc.prototype.evaluate=function(C,H,oe,be,Pe,Ne){return this._styleExpression.evaluate(C,H,oe,be,Pe,Ne)},lc.prototype.interpolationFactor=function(C,H,oe){return this.interpolationType?iu.interpolationFactor(this.interpolationType,C,H,oe):0};function Yu(k,C){if(k=zo(k,C),k.result==="error")return k;var H=k.value.expression,oe=jf(H);if(!oe&&!_l(C))return Fl([new ds("","data expressions not supported")]);var be=Lu(H,["zoom"]);if(!be&&!ll(C))return Fl([new ds("","zoom expressions not supported")]);var Pe=ie(H);if(!Pe&&!be)return Fl([new ds("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(Pe instanceof ds)return Fl([Pe]);if(Pe instanceof iu&&!jn(C))return Fl([new ds("",'"interpolate" expressions cannot be used with this property')]);if(!Pe)return ws(oe?new Dc("constant",k.value):new Dc("source",k.value));var Ne=Pe instanceof iu?Pe.interpolation:void 0;return ws(oe?new lc("camera",k.value,Pe.labels,Ne):new lc("composite",k.value,Pe.labels,Ne))}var Fe=function(C,H){this._parameters=C,this._specification=H,xs(this,uu(this._parameters,this._specification))};Fe.deserialize=function(C){return new Fe(C._parameters,C._specification)},Fe.serialize=function(C){return{_parameters:C._parameters,_specification:C._specification}};function I(k,C){if(Js(k))return new Fe(k,C);if(fo(k)){var H=Yu(k,C);if(H.result==="error")throw new Error(H.value.map(function(be){return be.key+": "+be.message}).join(", "));return H.value}else{var oe=k;return typeof k=="string"&&C.type==="color"&&(oe=Bs.parse(k)),{kind:"constant",evaluate:function(){return oe}}}}function ie(k){var C=null;if(k instanceof Cc)C=ie(k.result);else if(k instanceof Xu)for(var H=0,oe=k.args;Hoe.maximum?[new Pn(C,H,H+" is greater than the maximum value "+oe.maximum)]:[]}function Ot(k){var C=k.valueSpec,H=Hn(k.value.type),oe,be={},Pe,Ne,ft=H!=="categorical"&&k.value.property===void 0,It=!ft,Ht=Io(k.value.stops)==="array"&&Io(k.value.stops[0])==="array"&&Io(k.value.stops[0][0])==="object",er=ze({key:k.key,value:k.value,valueSpec:k.styleSpec.function,style:k.style,styleSpec:k.styleSpec,objectElementValidators:{stops:Lr,default:ua}});return H==="identity"&&ft&&er.push(new Pn(k.key,k.value,'missing required property "property"')),H!=="identity"&&!k.value.stops&&er.push(new Pn(k.key,k.value,'missing required property "stops"')),H==="exponential"&&k.valueSpec.expression&&!jn(k.valueSpec)&&er.push(new Pn(k.key,k.value,"exponential functions not supported")),k.styleSpec.$version>=8&&(It&&!_l(k.valueSpec)?er.push(new Pn(k.key,k.value,"property functions not supported")):ft&&!ll(k.valueSpec)&&er.push(new Pn(k.key,k.value,"zoom functions not supported"))),(H==="categorical"||Ht)&&k.value.property===void 0&&er.push(new Pn(k.key,k.value,'"property" property is required')),er;function Lr(Fa){if(H==="identity")return[new Pn(Fa.key,Fa.value,'identity function may not have a "stops" property')];var Mi=[],ii=Fa.value;return Mi=Mi.concat(ht({key:Fa.key,value:ii,valueSpec:Fa.valueSpec,style:Fa.style,styleSpec:Fa.styleSpec,arrayElementValidator:Zr})),Io(ii)==="array"&&ii.length===0&&Mi.push(new Pn(Fa.key,ii,"array must have at least one stop")),Mi}function Zr(Fa){var Mi=[],ii=Fa.value,$i=Fa.key;if(Io(ii)!=="array")return[new Pn($i,ii,"array expected, "+Io(ii)+" found")];if(ii.length!==2)return[new Pn($i,ii,"array length 2 expected, length "+ii.length+" found")];if(Ht){if(Io(ii[0])!=="object")return[new Pn($i,ii,"object expected, "+Io(ii[0])+" found")];if(ii[0].zoom===void 0)return[new Pn($i,ii,"object stop key must have zoom")];if(ii[0].value===void 0)return[new Pn($i,ii,"object stop key must have value")];if(Ne&&Ne>Hn(ii[0].zoom))return[new Pn($i,ii[0].zoom,"stop zoom values must appear in ascending order")];Hn(ii[0].zoom)!==Ne&&(Ne=Hn(ii[0].zoom),Pe=void 0,be={}),Mi=Mi.concat(ze({key:$i+"[0]",value:ii[0],valueSpec:{zoom:{}},style:Fa.style,styleSpec:Fa.styleSpec,objectElementValidators:{zoom:wt,value:Vr}}))}else Mi=Mi.concat(Vr({key:$i+"[0]",value:ii[0],valueSpec:{},style:Fa.style,styleSpec:Fa.styleSpec},ii));return fo(Os(ii[1]))?Mi.concat([new Pn($i+"[1]",ii[1],"expressions are not allowed in function stops.")]):Mi.concat(So({key:$i+"[1]",value:ii[1],valueSpec:C,style:Fa.style,styleSpec:Fa.styleSpec}))}function Vr(Fa,Mi){var ii=Io(Fa.value),$i=Hn(Fa.value),Oi=Fa.value!==null?Fa.value:Mi;if(!oe)oe=ii;else if(ii!==oe)return[new Pn(Fa.key,Oi,ii+" stop domain type must match previous stop domain type "+oe)];if(ii!=="number"&&ii!=="string"&&ii!=="boolean")return[new Pn(Fa.key,Oi,"stop domain value must be a number, string, or boolean")];if(ii!=="number"&&H!=="categorical"){var Ji="number expected, "+ii+" found";return _l(C)&&H===void 0&&(Ji+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Pn(Fa.key,Oi,Ji)]}return H==="categorical"&&ii==="number"&&(!isFinite($i)||Math.floor($i)!==$i)?[new Pn(Fa.key,Oi,"integer expected, found "+$i)]:H!=="categorical"&&ii==="number"&&Pe!==void 0&&$i=2&&k[1]!=="$id"&&k[1]!=="$type";case"in":return k.length>=3&&(typeof k[1]!="string"||Array.isArray(k[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return k.length!==3||Array.isArray(k[1])||Array.isArray(k[2]);case"any":case"all":for(var C=0,H=k.slice(1);CC?1:0}function pt(k){if(!Array.isArray(k))return!1;if(k[0]==="within")return!0;for(var C=1;C"||C==="<="||C===">="?bt(k[1],k[2],C):C==="any"?Rt(k.slice(1)):C==="all"?["all"].concat(k.slice(1).map(Et)):C==="none"?["all"].concat(k.slice(1).map(Et).map(kr)):C==="in"?lr(k[1],k.slice(2)):C==="!in"?kr(lr(k[1],k.slice(2))):C==="has"?yr(k[1]):C==="!has"?kr(yr(k[1])):C==="within"?k:!0;return H}function bt(k,C,H){switch(k){case"$type":return["filter-type-"+H,C];case"$id":return["filter-id-"+H,C];default:return["filter-"+H,k,C]}}function Rt(k){return["any"].concat(k.map(Et))}function lr(k,C){if(C.length===0)return!1;switch(k){case"$type":return["filter-type-in",["literal",C]];case"$id":return["filter-id-in",["literal",C]];default:return C.length>200&&!C.some(function(H){return typeof H!=typeof C[0]})?["filter-in-large",k,["literal",C.sort(ot)]]:["filter-in-small",k,["literal",C]]}}function yr(k){switch(k){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",k]}}function kr(k){return["!",k]}function jr(k){return na(Os(k.value))?$t(xs({},k,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Qr(k)}function Qr(k){var C=k.value,H=k.key;if(Io(C)!=="array")return[new Pn(H,C,"array expected, "+Io(C)+" found")];var oe=k.styleSpec,be,Pe=[];if(C.length<1)return[new Pn(H,C,"filter array must have at least 1 element")];switch(Pe=Pe.concat(Kr({key:H+"[0]",value:C[0],valueSpec:oe.filter_operator,style:k.style,styleSpec:k.styleSpec})),Hn(C[0])){case"<":case"<=":case">":case">=":C.length>=2&&Hn(C[1])==="$type"&&Pe.push(new Pn(H,C,'"$type" cannot be use with operator "'+C[0]+'"'));case"==":case"!=":C.length!==3&&Pe.push(new Pn(H,C,'filter array for operator "'+C[0]+'" must have 3 elements'));case"in":case"!in":C.length>=2&&(be=Io(C[1]),be!=="string"&&Pe.push(new Pn(H+"[1]",C[1],"string expected, "+be+" found")));for(var Ne=2;Ne=er[Vr+0]&&oe>=er[Vr+1])?(Ne[Zr]=!0,Pe.push(Ht[Zr])):Ne[Zr]=!1}}},cu.prototype._forEachCell=function(k,C,H,oe,be,Pe,Ne,ft){for(var It=this._convertToCellCoord(k),Ht=this._convertToCellCoord(C),er=this._convertToCellCoord(H),Lr=this._convertToCellCoord(oe),Zr=It;Zr<=er;Zr++)for(var Vr=Ht;Vr<=Lr;Vr++){var ua=this.d*Vr+Zr;if(!(ft&&!ft(this._convertFromCellCoord(Zr),this._convertFromCellCoord(Vr),this._convertFromCellCoord(Zr+1),this._convertFromCellCoord(Vr+1)))&&be.call(this,k,C,H,oe,ua,Pe,Ne,ft))return}},cu.prototype._convertFromCellCoord=function(k){return(k-this.padding)/this.scale},cu.prototype._convertToCellCoord=function(k){return Math.max(0,Math.min(this.d-1,Math.floor(k*this.scale)+this.padding))},cu.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var k=this.cells,C=Tl+this.cells.length+1+1,H=0,oe=0;oe=0)){var Lr=k[er];Ht[er]=Gl[It].shallow.indexOf(er)>=0?Lr:yt(Lr,C)}k instanceof Error&&(Ht.message=k.message)}if(Ht.$name)throw new Error("$name property is reserved for worker serialization logic.");return It!=="Object"&&(Ht.$name=It),Ht}throw new Error("can't serialize object of type "+typeof k)}function Tt(k){if(k==null||typeof k=="boolean"||typeof k=="number"||typeof k=="string"||k instanceof Boolean||k instanceof Number||k instanceof String||k instanceof Date||k instanceof RegExp||et(k)||dt(k)||ArrayBuffer.isView(k)||k instanceof uc)return k;if(Array.isArray(k))return k.map(Tt);if(typeof k=="object"){var C=k.$name||"Object",H=Gl[C],oe=H.klass;if(!oe)throw new Error("can't deserialize unregistered class "+C);if(oe.deserialize)return oe.deserialize(k);for(var be=Object.create(oe.prototype),Pe=0,Ne=Object.keys(k);Pe=0?It:Tt(It)}}return be}throw new Error("can't deserialize object of type "+typeof k)}var tr=function(){this.first=!0};tr.prototype.update=function(C,H){var oe=Math.floor(C);return this.first?(this.first=!1,this.lastIntegerZoom=oe,this.lastIntegerZoomTime=0,this.lastZoom=C,this.lastFloorZoom=oe,!0):(this.lastFloorZoom>oe?(this.lastIntegerZoom=oe+1,this.lastIntegerZoomTime=H):this.lastFloorZoom=128&&k<=255},Arabic:function(k){return k>=1536&&k<=1791},"Arabic Supplement":function(k){return k>=1872&&k<=1919},"Arabic Extended-A":function(k){return k>=2208&&k<=2303},"Hangul Jamo":function(k){return k>=4352&&k<=4607},"Unified Canadian Aboriginal Syllabics":function(k){return k>=5120&&k<=5759},Khmer:function(k){return k>=6016&&k<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(k){return k>=6320&&k<=6399},"General Punctuation":function(k){return k>=8192&&k<=8303},"Letterlike Symbols":function(k){return k>=8448&&k<=8527},"Number Forms":function(k){return k>=8528&&k<=8591},"Miscellaneous Technical":function(k){return k>=8960&&k<=9215},"Control Pictures":function(k){return k>=9216&&k<=9279},"Optical Character Recognition":function(k){return k>=9280&&k<=9311},"Enclosed Alphanumerics":function(k){return k>=9312&&k<=9471},"Geometric Shapes":function(k){return k>=9632&&k<=9727},"Miscellaneous Symbols":function(k){return k>=9728&&k<=9983},"Miscellaneous Symbols and Arrows":function(k){return k>=11008&&k<=11263},"CJK Radicals Supplement":function(k){return k>=11904&&k<=12031},"Kangxi Radicals":function(k){return k>=12032&&k<=12255},"Ideographic Description Characters":function(k){return k>=12272&&k<=12287},"CJK Symbols and Punctuation":function(k){return k>=12288&&k<=12351},Hiragana:function(k){return k>=12352&&k<=12447},Katakana:function(k){return k>=12448&&k<=12543},Bopomofo:function(k){return k>=12544&&k<=12591},"Hangul Compatibility Jamo":function(k){return k>=12592&&k<=12687},Kanbun:function(k){return k>=12688&&k<=12703},"Bopomofo Extended":function(k){return k>=12704&&k<=12735},"CJK Strokes":function(k){return k>=12736&&k<=12783},"Katakana Phonetic Extensions":function(k){return k>=12784&&k<=12799},"Enclosed CJK Letters and Months":function(k){return k>=12800&&k<=13055},"CJK Compatibility":function(k){return k>=13056&&k<=13311},"CJK Unified Ideographs Extension A":function(k){return k>=13312&&k<=19903},"Yijing Hexagram Symbols":function(k){return k>=19904&&k<=19967},"CJK Unified Ideographs":function(k){return k>=19968&&k<=40959},"Yi Syllables":function(k){return k>=40960&&k<=42127},"Yi Radicals":function(k){return k>=42128&&k<=42191},"Hangul Jamo Extended-A":function(k){return k>=43360&&k<=43391},"Hangul Syllables":function(k){return k>=44032&&k<=55215},"Hangul Jamo Extended-B":function(k){return k>=55216&&k<=55295},"Private Use Area":function(k){return k>=57344&&k<=63743},"CJK Compatibility Ideographs":function(k){return k>=63744&&k<=64255},"Arabic Presentation Forms-A":function(k){return k>=64336&&k<=65023},"Vertical Forms":function(k){return k>=65040&&k<=65055},"CJK Compatibility Forms":function(k){return k>=65072&&k<=65103},"Small Form Variants":function(k){return k>=65104&&k<=65135},"Arabic Presentation Forms-B":function(k){return k>=65136&&k<=65279},"Halfwidth and Fullwidth Forms":function(k){return k>=65280&&k<=65519}};function _r(k){for(var C=0,H=k;C=65097&&k<=65103)||zt["CJK Compatibility Ideographs"](k)||zt["CJK Compatibility"](k)||zt["CJK Radicals Supplement"](k)||zt["CJK Strokes"](k)||zt["CJK Symbols and Punctuation"](k)&&!(k>=12296&&k<=12305)&&!(k>=12308&&k<=12319)&&k!==12336||zt["CJK Unified Ideographs Extension A"](k)||zt["CJK Unified Ideographs"](k)||zt["Enclosed CJK Letters and Months"](k)||zt["Hangul Compatibility Jamo"](k)||zt["Hangul Jamo Extended-A"](k)||zt["Hangul Jamo Extended-B"](k)||zt["Hangul Jamo"](k)||zt["Hangul Syllables"](k)||zt.Hiragana(k)||zt["Ideographic Description Characters"](k)||zt.Kanbun(k)||zt["Kangxi Radicals"](k)||zt["Katakana Phonetic Extensions"](k)||zt.Katakana(k)&&k!==12540||zt["Halfwidth and Fullwidth Forms"](k)&&k!==65288&&k!==65289&&k!==65293&&!(k>=65306&&k<=65310)&&k!==65339&&k!==65341&&k!==65343&&!(k>=65371&&k<=65503)&&k!==65507&&!(k>=65512&&k<=65519)||zt["Small Form Variants"](k)&&!(k>=65112&&k<=65118)&&!(k>=65123&&k<=65126)||zt["Unified Canadian Aboriginal Syllabics"](k)||zt["Unified Canadian Aboriginal Syllabics Extended"](k)||zt["Vertical Forms"](k)||zt["Yijing Hexagram Symbols"](k)||zt["Yi Syllables"](k)||zt["Yi Radicals"](k))}function Ja(k){return!!(zt["Latin-1 Supplement"](k)&&(k===167||k===169||k===174||k===177||k===188||k===189||k===190||k===215||k===247)||zt["General Punctuation"](k)&&(k===8214||k===8224||k===8225||k===8240||k===8241||k===8251||k===8252||k===8258||k===8263||k===8264||k===8265||k===8273)||zt["Letterlike Symbols"](k)||zt["Number Forms"](k)||zt["Miscellaneous Technical"](k)&&(k>=8960&&k<=8967||k>=8972&&k<=8991||k>=8996&&k<=9e3||k===9003||k>=9085&&k<=9114||k>=9150&&k<=9165||k===9167||k>=9169&&k<=9179||k>=9186&&k<=9215)||zt["Control Pictures"](k)&&k!==9251||zt["Optical Character Recognition"](k)||zt["Enclosed Alphanumerics"](k)||zt["Geometric Shapes"](k)||zt["Miscellaneous Symbols"](k)&&!(k>=9754&&k<=9759)||zt["Miscellaneous Symbols and Arrows"](k)&&(k>=11026&&k<=11055||k>=11088&&k<=11097||k>=11192&&k<=11243)||zt["CJK Symbols and Punctuation"](k)||zt.Katakana(k)||zt["Private Use Area"](k)||zt["CJK Compatibility Forms"](k)||zt["Small Form Variants"](k)||zt["Halfwidth and Fullwidth Forms"](k)||k===8734||k===8756||k===8757||k>=9984&&k<=10087||k>=10102&&k<=10131||k===65532||k===65533)}function ti(k){return!(pa(k)||Ja(k))}function Sa(k){return zt.Arabic(k)||zt["Arabic Supplement"](k)||zt["Arabic Extended-A"](k)||zt["Arabic Presentation Forms-A"](k)||zt["Arabic Presentation Forms-B"](k)}function za(k){return k>=1424&&k<=2303||zt["Arabic Presentation Forms-A"](k)||zt["Arabic Presentation Forms-B"](k)}function Xa(k,C){return!(!C&&za(k)||k>=2304&&k<=3583||k>=3840&&k<=4255||zt.Khmer(k))}function fi(k){for(var C=0,H=k;C-1&&(rn=La.error),sn&&sn(k)};function Kn(){ro.fire(new Br("pluginStateChange",{pluginStatus:rn,pluginURL:dn}))}var ro=new xr,Yo=function(){return rn},oo=function(k){return k({pluginStatus:rn,pluginURL:dn}),ro.on("pluginStateChange",k),k},Wo=function(k,C,H){if(H===void 0&&(H=!1),rn===La.deferred||rn===La.loading||rn===La.loaded)throw new Error("setRTLTextPlugin cannot be called multiple times.");dn=we.resolveURL(k),rn=La.deferred,sn=C,Kn(),H||cl()},cl=function(){if(rn!==La.deferred||!dn)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");rn=La.loading,Kn(),dn&&ra({url:dn},function(k){k?In(k):(rn=La.loaded,Kn())})},al={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return rn===La.loaded||al.applyArabicShaping!=null},isLoading:function(){return rn===La.loading},setState:function(C){rn=C.pluginStatus,dn=C.pluginURL},isParsed:function(){return al.applyArabicShaping!=null&&al.processBidirectionalText!=null&&al.processStyledBidirectionalText!=null},getPluginURL:function(){return dn}},xl=function(){!al.isLoading()&&!al.isLoaded()&&Yo()==="deferred"&&cl()},mn=function(C,H){this.zoom=C,H?(this.now=H.now,this.fadeDuration=H.fadeDuration,this.zoomHistory=H.zoomHistory,this.transition=H.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new tr,this.transition={})};mn.prototype.isSupportedScript=function(C){return ni(C,al.isLoaded())},mn.prototype.crossFadingFactor=function(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)},mn.prototype.getCrossfadeParameters=function(){var C=this.zoom,H=C-Math.floor(C),oe=this.crossFadingFactor();return C>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:H+(1-H)*oe}:{fromScale:.5,toScale:1,t:1-(1-oe)*H}};var po=function(C,H){this.property=C,this.value=H,this.expression=I(H===void 0?C.specification.default:H,C.specification)};po.prototype.isDataDriven=function(){return this.expression.kind==="source"||this.expression.kind==="composite"},po.prototype.possiblyEvaluate=function(C,H,oe){return this.property.possiblyEvaluate(this,C,H,oe)};var cs=function(C){this.property=C,this.value=new po(C,void 0)};cs.prototype.transitioned=function(C,H){return new Al(this.property,this.value,H,g({},C.transition,this.transition),C.now)},cs.prototype.untransitioned=function(){return new Al(this.property,this.value,null,{},0)};var vs=function(C){this._properties=C,this._values=Object.create(C.defaultTransitionablePropertyValues)};vs.prototype.getValue=function(C){return O(this._values[C].value.value)},vs.prototype.setValue=function(C,H){this._values.hasOwnProperty(C)||(this._values[C]=new cs(this._values[C].property)),this._values[C].value=new po(this._values[C].property,H===null?void 0:O(H))},vs.prototype.getTransition=function(C){return O(this._values[C].transition)},vs.prototype.setTransition=function(C,H){this._values.hasOwnProperty(C)||(this._values[C]=new cs(this._values[C].property)),this._values[C].transition=O(H)||void 0},vs.prototype.serialize=function(){for(var C={},H=0,oe=Object.keys(this._values);Hthis.end)return this.prior=null,Pe;if(this.value.isDataDriven())return this.prior=null,Pe;if(beNe.zoomHistory.lastIntegerZoom?{from:oe,to:be}:{from:Pe,to:be}},C.prototype.interpolate=function(oe){return oe},C}(Zt),oa=function(C){this.specification=C};oa.prototype.possiblyEvaluate=function(C,H,oe,be){if(C.value!==void 0)if(C.expression.kind==="constant"){var Pe=C.expression.evaluate(H,null,{},oe,be);return this._calculate(Pe,Pe,Pe,H)}else return this._calculate(C.expression.evaluate(new mn(Math.floor(H.zoom-1),H)),C.expression.evaluate(new mn(Math.floor(H.zoom),H)),C.expression.evaluate(new mn(Math.floor(H.zoom+1),H)),H)},oa.prototype._calculate=function(C,H,oe,be){var Pe=be.zoom;return Pe>be.zoomHistory.lastIntegerZoom?{from:C,to:H}:{from:oe,to:H}},oa.prototype.interpolate=function(C){return C};var wa=function(C){this.specification=C};wa.prototype.possiblyEvaluate=function(C,H,oe,be){return!!C.expression.evaluate(H,null,{},oe,be)},wa.prototype.interpolate=function(){return!1};var va=function(C){this.properties=C,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(var H in C){var oe=C[H];oe.specification.overridable&&this.overridableProperties.push(H);var be=this.defaultPropertyValues[H]=new po(oe,void 0),Pe=this.defaultTransitionablePropertyValues[H]=new cs(oe);this.defaultTransitioningPropertyValues[H]=Pe.untransitioned(),this.defaultPossiblyEvaluatedValues[H]=be.possiblyEvaluate({})}};me("DataDrivenProperty",Zt),me("DataConstantProperty",it),me("CrossFadedDataDrivenProperty",cr),me("CrossFadedProperty",oa),me("ColorRampProperty",wa);var ya="-transition",Ya=function(k){function C(H,oe){if(k.call(this),this.id=H.id,this.type=H.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},H.type!=="custom"&&(H=H,this.metadata=H.metadata,this.minzoom=H.minzoom,this.maxzoom=H.maxzoom,H.type!=="background"&&(this.source=H.source,this.sourceLayer=H["source-layer"],this.filter=H.filter),oe.layout&&(this._unevaluatedLayout=new Su(oe.layout)),oe.paint)){this._transitionablePaint=new vs(oe.paint);for(var be in H.paint)this.setPaintProperty(be,H.paint[be],{validate:!1});for(var Pe in H.layout)this.setLayoutProperty(Pe,H.layout[Pe],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new _c(oe.paint)}}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},C.prototype.getLayoutProperty=function(oe){return oe==="visibility"?this.visibility:this._unevaluatedLayout.getValue(oe)},C.prototype.setLayoutProperty=function(oe,be,Pe){if(Pe===void 0&&(Pe={}),be!=null){var Ne="layers."+this.id+".layout."+oe;if(this._validate(eu,Ne,oe,be,Pe))return}if(oe==="visibility"){this.visibility=be;return}this._unevaluatedLayout.setValue(oe,be)},C.prototype.getPaintProperty=function(oe){return z(oe,ya)?this._transitionablePaint.getTransition(oe.slice(0,-ya.length)):this._transitionablePaint.getValue(oe)},C.prototype.setPaintProperty=function(oe,be,Pe){if(Pe===void 0&&(Pe={}),be!=null){var Ne="layers."+this.id+".paint."+oe;if(this._validate(Il,Ne,oe,be,Pe))return!1}if(z(oe,ya))return this._transitionablePaint.setTransition(oe.slice(0,-ya.length),be||void 0),!1;var ft=this._transitionablePaint._values[oe],It=ft.property.specification["property-type"]==="cross-faded-data-driven",Ht=ft.value.isDataDriven(),er=ft.value;this._transitionablePaint.setValue(oe,be),this._handleSpecialPaintPropertyUpdate(oe);var Lr=this._transitionablePaint._values[oe].value,Zr=Lr.isDataDriven();return Zr||Ht||It||this._handleOverridablePaintPropertyUpdate(oe,er,Lr)},C.prototype._handleSpecialPaintPropertyUpdate=function(oe){},C.prototype._handleOverridablePaintPropertyUpdate=function(oe,be,Pe){return!1},C.prototype.isHidden=function(oe){return this.minzoom&&oe=this.maxzoom?!0:this.visibility==="none"},C.prototype.updateTransitions=function(oe){this._transitioningPaint=this._transitionablePaint.transitioned(oe,this._transitioningPaint)},C.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},C.prototype.recalculate=function(oe,be){oe.getCrossfadeParameters&&(this._crossfadeParameters=oe.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(oe,void 0,be)),this.paint=this._transitioningPaint.possiblyEvaluate(oe,void 0,be)},C.prototype.serialize=function(){var oe={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&&(oe.layout=oe.layout||{},oe.layout.visibility=this.visibility),N(oe,function(be,Pe){return be!==void 0&&!(Pe==="layout"&&!Object.keys(be).length)&&!(Pe==="paint"&&!Object.keys(be).length)})},C.prototype._validate=function(oe,be,Pe,Ne,ft){return ft===void 0&&(ft={}),ft&&ft.validate===!1?!1:Ru(this,oe.call(Jo,{key:be,layerType:this.type,objectKey:Pe,value:Ne,styleSpec:Gi,style:{glyphs:!0,sprite:!0}}))},C.prototype.is3D=function(){return!1},C.prototype.isTileClipped=function(){return!1},C.prototype.hasOffscreenPass=function(){return!1},C.prototype.resize=function(){},C.prototype.isStateDependent=function(){for(var oe in this.paint._values){var be=this.paint.get(oe);if(!(!(be instanceof Rl)||!_l(be.property.specification))&&(be.value.kind==="source"||be.value.kind==="composite")&&be.value.isStateDependent)return!0}return!1},C}(xr),bi={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},yi=function(C,H){this._structArray=C,this._pos1=H*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},si=128,gn=5,zi=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};zi.serialize=function(C,H){return C._trim(),H&&(C.isTransferred=!0,H.push(C.arrayBuffer)),{length:C.length,arrayBuffer:C.arrayBuffer}},zi.deserialize=function(C){var H=Object.create(this.prototype);return H.arrayBuffer=C.arrayBuffer,H.length=C.length,H.capacity=C.arrayBuffer.byteLength/H.bytesPerElement,H._refreshViews(),H},zi.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},zi.prototype.clear=function(){this.length=0},zi.prototype.resize=function(C){this.reserve(C),this.length=C},zi.prototype.reserve=function(C){if(C>this.capacity){this.capacity=Math.max(C,Math.floor(this.capacity*gn),si),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var H=this.uint8;this._refreshViews(),H&&this.uint8.set(H)}},zi.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};function Ei(k,C){C===void 0&&(C=1);var H=0,oe=0,be=k.map(function(Ne){var ft=Na(Ne.type),It=H=ea(H,Math.max(C,ft)),Ht=Ne.components||1;return oe=Math.max(oe,ft),H+=ft*Ht,{name:Ne.name,type:Ne.type,components:Ht,offset:It}}),Pe=ea(H,Math.max(oe,C));return{members:be,size:Pe,alignment:C}}function Na(k){return bi[k].BYTES_PER_ELEMENT}function ea(k,C){return Math.ceil(k/C)*C}var Ma=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},C.prototype.emplaceBack=function(oe,be){var Pe=this.length;return this.resize(Pe+1),this.emplace(Pe,oe,be)},C.prototype.emplace=function(oe,be,Pe){var Ne=oe*2;return this.int16[Ne+0]=be,this.int16[Ne+1]=Pe,oe},C}(zi);Ma.prototype.bytesPerElement=4,me("StructArrayLayout2i4",Ma);var Qa=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},C.prototype.emplaceBack=function(oe,be,Pe,Ne){var ft=this.length;return this.resize(ft+1),this.emplace(ft,oe,be,Pe,Ne)},C.prototype.emplace=function(oe,be,Pe,Ne,ft){var It=oe*4;return this.int16[It+0]=be,this.int16[It+1]=Pe,this.int16[It+2]=Ne,this.int16[It+3]=ft,oe},C}(zi);Qa.prototype.bytesPerElement=8,me("StructArrayLayout4i8",Qa);var di=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},C.prototype.emplaceBack=function(oe,be,Pe,Ne,ft,It){var Ht=this.length;return this.resize(Ht+1),this.emplace(Ht,oe,be,Pe,Ne,ft,It)},C.prototype.emplace=function(oe,be,Pe,Ne,ft,It,Ht){var er=oe*6;return this.int16[er+0]=be,this.int16[er+1]=Pe,this.int16[er+2]=Ne,this.int16[er+3]=ft,this.int16[er+4]=It,this.int16[er+5]=Ht,oe},C}(zi);di.prototype.bytesPerElement=12,me("StructArrayLayout2i4i12",di);var Va=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},C.prototype.emplaceBack=function(oe,be,Pe,Ne,ft,It){var Ht=this.length;return this.resize(Ht+1),this.emplace(Ht,oe,be,Pe,Ne,ft,It)},C.prototype.emplace=function(oe,be,Pe,Ne,ft,It,Ht){var er=oe*4,Lr=oe*8;return this.int16[er+0]=be,this.int16[er+1]=Pe,this.uint8[Lr+4]=Ne,this.uint8[Lr+5]=ft,this.uint8[Lr+6]=It,this.uint8[Lr+7]=Ht,oe},C}(zi);Va.prototype.bytesPerElement=8,me("StructArrayLayout2i4ub8",Va);var Bi=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},C.prototype.emplaceBack=function(oe,be){var Pe=this.length;return this.resize(Pe+1),this.emplace(Pe,oe,be)},C.prototype.emplace=function(oe,be,Pe){var Ne=oe*2;return this.float32[Ne+0]=be,this.float32[Ne+1]=Pe,oe},C}(zi);Bi.prototype.bytesPerElement=8,me("StructArrayLayout2f8",Bi);var Li=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},C.prototype.emplaceBack=function(oe,be,Pe,Ne,ft,It,Ht,er,Lr,Zr){var Vr=this.length;return this.resize(Vr+1),this.emplace(Vr,oe,be,Pe,Ne,ft,It,Ht,er,Lr,Zr)},C.prototype.emplace=function(oe,be,Pe,Ne,ft,It,Ht,er,Lr,Zr,Vr){var ua=oe*10;return this.uint16[ua+0]=be,this.uint16[ua+1]=Pe,this.uint16[ua+2]=Ne,this.uint16[ua+3]=ft,this.uint16[ua+4]=It,this.uint16[ua+5]=Ht,this.uint16[ua+6]=er,this.uint16[ua+7]=Lr,this.uint16[ua+8]=Zr,this.uint16[ua+9]=Vr,oe},C}(zi);Li.prototype.bytesPerElement=20,me("StructArrayLayout10ui20",Li);var hn=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},C.prototype.emplaceBack=function(oe,be,Pe,Ne,ft,It,Ht,er,Lr,Zr,Vr,ua){var Fa=this.length;return this.resize(Fa+1),this.emplace(Fa,oe,be,Pe,Ne,ft,It,Ht,er,Lr,Zr,Vr,ua)},C.prototype.emplace=function(oe,be,Pe,Ne,ft,It,Ht,er,Lr,Zr,Vr,ua,Fa){var Mi=oe*12;return this.int16[Mi+0]=be,this.int16[Mi+1]=Pe,this.int16[Mi+2]=Ne,this.int16[Mi+3]=ft,this.uint16[Mi+4]=It,this.uint16[Mi+5]=Ht,this.uint16[Mi+6]=er,this.uint16[Mi+7]=Lr,this.int16[Mi+8]=Zr,this.int16[Mi+9]=Vr,this.int16[Mi+10]=ua,this.int16[Mi+11]=Fa,oe},C}(zi);hn.prototype.bytesPerElement=24,me("StructArrayLayout4i4ui4i24",hn);var Ha=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},C.prototype.emplaceBack=function(oe,be,Pe){var Ne=this.length;return this.resize(Ne+1),this.emplace(Ne,oe,be,Pe)},C.prototype.emplace=function(oe,be,Pe,Ne){var ft=oe*3;return this.float32[ft+0]=be,this.float32[ft+1]=Pe,this.float32[ft+2]=Ne,oe},C}(zi);Ha.prototype.bytesPerElement=12,me("StructArrayLayout3f12",Ha);var Ua=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},C.prototype.emplaceBack=function(oe){var be=this.length;return this.resize(be+1),this.emplace(be,oe)},C.prototype.emplace=function(oe,be){var Pe=oe*1;return this.uint32[Pe+0]=be,oe},C}(zi);Ua.prototype.bytesPerElement=4,me("StructArrayLayout1ul4",Ua);var Yi=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.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)},C.prototype.emplaceBack=function(oe,be,Pe,Ne,ft,It,Ht,er,Lr){var Zr=this.length;return this.resize(Zr+1),this.emplace(Zr,oe,be,Pe,Ne,ft,It,Ht,er,Lr)},C.prototype.emplace=function(oe,be,Pe,Ne,ft,It,Ht,er,Lr,Zr){var Vr=oe*10,ua=oe*5;return this.int16[Vr+0]=be,this.int16[Vr+1]=Pe,this.int16[Vr+2]=Ne,this.int16[Vr+3]=ft,this.int16[Vr+4]=It,this.int16[Vr+5]=Ht,this.uint32[ua+3]=er,this.uint16[Vr+8]=Lr,this.uint16[Vr+9]=Zr,oe},C}(zi);Yi.prototype.bytesPerElement=20,me("StructArrayLayout6i1ul2ui20",Yi);var Ri=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},C.prototype.emplaceBack=function(oe,be,Pe,Ne,ft,It){var Ht=this.length;return this.resize(Ht+1),this.emplace(Ht,oe,be,Pe,Ne,ft,It)},C.prototype.emplace=function(oe,be,Pe,Ne,ft,It,Ht){var er=oe*6;return this.int16[er+0]=be,this.int16[er+1]=Pe,this.int16[er+2]=Ne,this.int16[er+3]=ft,this.int16[er+4]=It,this.int16[er+5]=Ht,oe},C}(zi);Ri.prototype.bytesPerElement=12,me("StructArrayLayout2i2i2i12",Ri);var Ti=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},C.prototype.emplaceBack=function(oe,be,Pe,Ne,ft){var It=this.length;return this.resize(It+1),this.emplace(It,oe,be,Pe,Ne,ft)},C.prototype.emplace=function(oe,be,Pe,Ne,ft,It){var Ht=oe*4,er=oe*8;return this.float32[Ht+0]=be,this.float32[Ht+1]=Pe,this.float32[Ht+2]=Ne,this.int16[er+6]=ft,this.int16[er+7]=It,oe},C}(zi);Ti.prototype.bytesPerElement=16,me("StructArrayLayout2f1f2i16",Ti);var xi=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},C.prototype.emplaceBack=function(oe,be,Pe,Ne){var ft=this.length;return this.resize(ft+1),this.emplace(ft,oe,be,Pe,Ne)},C.prototype.emplace=function(oe,be,Pe,Ne,ft){var It=oe*12,Ht=oe*3;return this.uint8[It+0]=be,this.uint8[It+1]=Pe,this.float32[Ht+1]=Ne,this.float32[Ht+2]=ft,oe},C}(zi);xi.prototype.bytesPerElement=12,me("StructArrayLayout2ub2f12",xi);var Xi=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},C.prototype.emplaceBack=function(oe,be,Pe){var Ne=this.length;return this.resize(Ne+1),this.emplace(Ne,oe,be,Pe)},C.prototype.emplace=function(oe,be,Pe,Ne){var ft=oe*3;return this.uint16[ft+0]=be,this.uint16[ft+1]=Pe,this.uint16[ft+2]=Ne,oe},C}(zi);Xi.prototype.bytesPerElement=6,me("StructArrayLayout3ui6",Xi);var vn=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.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)},C.prototype.emplaceBack=function(oe,be,Pe,Ne,ft,It,Ht,er,Lr,Zr,Vr,ua,Fa,Mi,ii,$i,Oi){var Ji=this.length;return this.resize(Ji+1),this.emplace(Ji,oe,be,Pe,Ne,ft,It,Ht,er,Lr,Zr,Vr,ua,Fa,Mi,ii,$i,Oi)},C.prototype.emplace=function(oe,be,Pe,Ne,ft,It,Ht,er,Lr,Zr,Vr,ua,Fa,Mi,ii,$i,Oi,Ji){var ln=oe*24,wn=oe*12,Vn=oe*48;return this.int16[ln+0]=be,this.int16[ln+1]=Pe,this.uint16[ln+2]=Ne,this.uint16[ln+3]=ft,this.uint32[wn+2]=It,this.uint32[wn+3]=Ht,this.uint32[wn+4]=er,this.uint16[ln+10]=Lr,this.uint16[ln+11]=Zr,this.uint16[ln+12]=Vr,this.float32[wn+7]=ua,this.float32[wn+8]=Fa,this.uint8[Vn+36]=Mi,this.uint8[Vn+37]=ii,this.uint8[Vn+38]=$i,this.uint32[wn+10]=Oi,this.int16[ln+22]=Ji,oe},C}(zi);vn.prototype.bytesPerElement=48,me("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",vn);var Rn=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.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)},C.prototype.emplaceBack=function(oe,be,Pe,Ne,ft,It,Ht,er,Lr,Zr,Vr,ua,Fa,Mi,ii,$i,Oi,Ji,ln,wn,Vn,Un,Mo,so,mo,Cs,Eo,Ro){var $s=this.length;return this.resize($s+1),this.emplace($s,oe,be,Pe,Ne,ft,It,Ht,er,Lr,Zr,Vr,ua,Fa,Mi,ii,$i,Oi,Ji,ln,wn,Vn,Un,Mo,so,mo,Cs,Eo,Ro)},C.prototype.emplace=function(oe,be,Pe,Ne,ft,It,Ht,er,Lr,Zr,Vr,ua,Fa,Mi,ii,$i,Oi,Ji,ln,wn,Vn,Un,Mo,so,mo,Cs,Eo,Ro,$s){var Ts=oe*34,Xl=oe*17;return this.int16[Ts+0]=be,this.int16[Ts+1]=Pe,this.int16[Ts+2]=Ne,this.int16[Ts+3]=ft,this.int16[Ts+4]=It,this.int16[Ts+5]=Ht,this.int16[Ts+6]=er,this.int16[Ts+7]=Lr,this.uint16[Ts+8]=Zr,this.uint16[Ts+9]=Vr,this.uint16[Ts+10]=ua,this.uint16[Ts+11]=Fa,this.uint16[Ts+12]=Mi,this.uint16[Ts+13]=ii,this.uint16[Ts+14]=$i,this.uint16[Ts+15]=Oi,this.uint16[Ts+16]=Ji,this.uint16[Ts+17]=ln,this.uint16[Ts+18]=wn,this.uint16[Ts+19]=Vn,this.uint16[Ts+20]=Un,this.uint16[Ts+21]=Mo,this.uint16[Ts+22]=so,this.uint32[Xl+12]=mo,this.float32[Xl+13]=Cs,this.float32[Xl+14]=Eo,this.float32[Xl+15]=Ro,this.float32[Xl+16]=$s,oe},C}(zi);Rn.prototype.bytesPerElement=68,me("StructArrayLayout8i15ui1ul4f68",Rn);var Ii=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},C.prototype.emplaceBack=function(oe){var be=this.length;return this.resize(be+1),this.emplace(be,oe)},C.prototype.emplace=function(oe,be){var Pe=oe*1;return this.float32[Pe+0]=be,oe},C}(zi);Ii.prototype.bytesPerElement=4,me("StructArrayLayout1f4",Ii);var nn=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},C.prototype.emplaceBack=function(oe,be,Pe){var Ne=this.length;return this.resize(Ne+1),this.emplace(Ne,oe,be,Pe)},C.prototype.emplace=function(oe,be,Pe,Ne){var ft=oe*3;return this.int16[ft+0]=be,this.int16[ft+1]=Pe,this.int16[ft+2]=Ne,oe},C}(zi);nn.prototype.bytesPerElement=6,me("StructArrayLayout3i6",nn);var En=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},C.prototype.emplaceBack=function(oe,be,Pe){var Ne=this.length;return this.resize(Ne+1),this.emplace(Ne,oe,be,Pe)},C.prototype.emplace=function(oe,be,Pe,Ne){var ft=oe*2,It=oe*4;return this.uint32[ft+0]=be,this.uint16[It+2]=Pe,this.uint16[It+3]=Ne,oe},C}(zi);En.prototype.bytesPerElement=8,me("StructArrayLayout1ul2ui8",En);var Dn=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},C.prototype.emplaceBack=function(oe,be){var Pe=this.length;return this.resize(Pe+1),this.emplace(Pe,oe,be)},C.prototype.emplace=function(oe,be,Pe){var Ne=oe*2;return this.uint16[Ne+0]=be,this.uint16[Ne+1]=Pe,oe},C}(zi);Dn.prototype.bytesPerElement=4,me("StructArrayLayout2ui4",Dn);var Xn=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},C.prototype.emplaceBack=function(oe){var be=this.length;return this.resize(be+1),this.emplace(be,oe)},C.prototype.emplace=function(oe,be){var Pe=oe*1;return this.uint16[Pe+0]=be,oe},C}(zi);Xn.prototype.bytesPerElement=2,me("StructArrayLayout1ui2",Xn);var zs=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},C.prototype.emplaceBack=function(oe,be,Pe,Ne){var ft=this.length;return this.resize(ft+1),this.emplace(ft,oe,be,Pe,Ne)},C.prototype.emplace=function(oe,be,Pe,Ne,ft){var It=oe*4;return this.float32[It+0]=be,this.float32[It+1]=Pe,this.float32[It+2]=Ne,this.float32[It+3]=ft,oe},C}(zi);zs.prototype.bytesPerElement=16,me("StructArrayLayout4f16",zs);var bl=function(k){function C(){k.apply(this,arguments)}k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C;var H={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 H.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},H.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},H.x1.get=function(){return this._structArray.int16[this._pos2+2]},H.y1.get=function(){return this._structArray.int16[this._pos2+3]},H.x2.get=function(){return this._structArray.int16[this._pos2+4]},H.y2.get=function(){return this._structArray.int16[this._pos2+5]},H.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},H.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},H.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},H.anchorPoint.get=function(){return new n(this.anchorPointX,this.anchorPointY)},Object.defineProperties(C.prototype,H),C}(yi);bl.prototype.size=20;var ho=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype.get=function(oe){return new bl(this,oe)},C}(Yi);me("CollisionBoxArray",ho);var Wl=function(k){function C(){k.apply(this,arguments)}k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C;var H={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 H.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},H.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},H.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},H.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},H.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},H.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},H.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},H.segment.get=function(){return this._structArray.uint16[this._pos2+10]},H.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},H.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},H.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},H.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},H.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},H.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},H.placedOrientation.set=function(oe){this._structArray.uint8[this._pos1+37]=oe},H.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},H.hidden.set=function(oe){this._structArray.uint8[this._pos1+38]=oe},H.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},H.crossTileID.set=function(oe){this._structArray.uint32[this._pos4+10]=oe},H.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(C.prototype,H),C}(yi);Wl.prototype.size=48;var fs=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype.get=function(oe){return new Wl(this,oe)},C}(vn);me("PlacedSymbolArray",fs);var Sl=function(k){function C(){k.apply(this,arguments)}k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C;var H={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 H.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},H.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},H.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},H.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},H.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},H.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},H.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},H.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},H.key.get=function(){return this._structArray.uint16[this._pos2+8]},H.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},H.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},H.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},H.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},H.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},H.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},H.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},H.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},H.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},H.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},H.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},H.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},H.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},H.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},H.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},H.crossTileID.set=function(oe){this._structArray.uint32[this._pos4+12]=oe},H.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},H.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},H.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},H.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(C.prototype,H),C}(yi);Sl.prototype.size=68;var kl=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype.get=function(oe){return new Sl(this,oe)},C}(Rn);me("SymbolInstanceArray",kl);var tu=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype.getoffsetX=function(oe){return this.float32[oe*1+0]},C}(Ii);me("GlyphOffsetArray",tu);var Vs=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype.getx=function(oe){return this.int16[oe*3+0]},C.prototype.gety=function(oe){return this.int16[oe*3+1]},C.prototype.gettileUnitDistanceFromAnchor=function(oe){return this.int16[oe*3+2]},C}(nn);me("SymbolLineVertexArray",Vs);var pl=function(k){function C(){k.apply(this,arguments)}k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C;var H={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return H.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},H.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},H.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(C.prototype,H),C}(yi);pl.prototype.size=8;var wl=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype.get=function(oe){return new pl(this,oe)},C}(En);me("FeatureIndexArray",wl);var Zn=Ei([{name:"a_pos",components:2,type:"Int16"}],4),Cl=Zn.members,Po=function(C){C===void 0&&(C=[]),this.segments=C};Po.prototype.prepareSegment=function(C,H,oe,be){var Pe=this.segments[this.segments.length-1];return C>Po.MAX_VERTEX_ARRAY_LENGTH&&B("Max vertices per segment is "+Po.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+C),(!Pe||Pe.vertexLength+C>Po.MAX_VERTEX_ARRAY_LENGTH||Pe.sortKey!==be)&&(Pe={vertexOffset:H.length,primitiveOffset:oe.length,vertexLength:0,primitiveLength:0},be!==void 0&&(Pe.sortKey=be),this.segments.push(Pe)),Pe},Po.prototype.get=function(){return this.segments},Po.prototype.destroy=function(){for(var C=0,H=this.segments;C>>16)*It&65535)<<16)&4294967295,er=er<<15|er>>>17,er=(er&65535)*Ht+(((er>>>16)*Ht&65535)<<16)&4294967295,Ne^=er,Ne=Ne<<13|Ne>>>19,ft=(Ne&65535)*5+(((Ne>>>16)*5&65535)<<16)&4294967295,Ne=(ft&65535)+27492+(((ft>>>16)+58964&65535)<<16);switch(er=0,be){case 3:er^=(H.charCodeAt(Lr+2)&255)<<16;case 2:er^=(H.charCodeAt(Lr+1)&255)<<8;case 1:er^=H.charCodeAt(Lr)&255,er=(er&65535)*It+(((er>>>16)*It&65535)<<16)&4294967295,er=er<<15|er>>>17,er=(er&65535)*Ht+(((er>>>16)*Ht&65535)<<16)&4294967295,Ne^=er}return Ne^=H.length,Ne^=Ne>>>16,Ne=(Ne&65535)*2246822507+(((Ne>>>16)*2246822507&65535)<<16)&4294967295,Ne^=Ne>>>13,Ne=(Ne&65535)*3266489909+(((Ne>>>16)*3266489909&65535)<<16)&4294967295,Ne^=Ne>>>16,Ne>>>0}k.exports=C}),te=t(function(k){function C(H,oe){for(var be=H.length,Pe=oe^be,Ne=0,ft;be>=4;)ft=H.charCodeAt(Ne)&255|(H.charCodeAt(++Ne)&255)<<8|(H.charCodeAt(++Ne)&255)<<16|(H.charCodeAt(++Ne)&255)<<24,ft=(ft&65535)*1540483477+(((ft>>>16)*1540483477&65535)<<16),ft^=ft>>>24,ft=(ft&65535)*1540483477+(((ft>>>16)*1540483477&65535)<<16),Pe=(Pe&65535)*1540483477+(((Pe>>>16)*1540483477&65535)<<16)^ft,be-=4,++Ne;switch(be){case 3:Pe^=(H.charCodeAt(Ne+2)&255)<<16;case 2:Pe^=(H.charCodeAt(Ne+1)&255)<<8;case 1:Pe^=H.charCodeAt(Ne)&255,Pe=(Pe&65535)*1540483477+(((Pe>>>16)*1540483477&65535)<<16)}return Pe^=Pe>>>13,Pe=(Pe&65535)*1540483477+(((Pe>>>16)*1540483477&65535)<<16),Pe^=Pe>>>15,Pe>>>0}k.exports=C}),ye=xe,je=xe,ke=te;ye.murmur3=je,ye.murmur2=ke;var Qe=function(){this.ids=[],this.positions=[],this.indexed=!1};Qe.prototype.add=function(C,H,oe,be){this.ids.push(qt(C)),this.positions.push(H,oe,be)},Qe.prototype.getPositions=function(C){for(var H=qt(C),oe=0,be=this.ids.length-1;oe>1;this.ids[Pe]>=H?be=Pe:oe=Pe+1}for(var Ne=[];this.ids[oe]===H;){var ft=this.positions[3*oe],It=this.positions[3*oe+1],Ht=this.positions[3*oe+2];Ne.push({index:ft,start:It,end:Ht}),oe++}return Ne},Qe.serialize=function(C,H){var oe=new Float64Array(C.ids),be=new Uint32Array(C.positions);return wr(oe,be,0,oe.length-1),H&&H.push(oe.buffer,be.buffer),{ids:oe,positions:be}},Qe.deserialize=function(C){var H=new Qe;return H.ids=C.ids,H.positions=C.positions,H.indexed=!0,H};var vt=Math.pow(2,53)-1;function qt(k){var C=+k;return!isNaN(C)&&C<=vt?C:ye(String(k))}function wr(k,C,H,oe){for(;H>1],Pe=H-1,Ne=oe+1;;){do Pe++;while(k[Pe]be);if(Pe>=Ne)break;Nr(k,Pe,Ne),Nr(C,3*Pe,3*Ne),Nr(C,3*Pe+1,3*Ne+1),Nr(C,3*Pe+2,3*Ne+2)}Ne-HNe.x+1||ItNe.y+1)&&B("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return H}function yo(k,C){return{type:k.type,id:k.id,properties:k.properties,geometry:C?cn(k):[]}}function Uo(k,C,H,oe,be){k.emplaceBack(C*2+(oe+1)/2,H*2+(be+1)/2)}var Is=function(C){this.zoom=C.zoom,this.overscaling=C.overscaling,this.layers=C.layers,this.layerIds=this.layers.map(function(H){return H.id}),this.index=C.index,this.hasPattern=!1,this.layoutVertexArray=new Ma,this.indexArray=new Xi,this.segments=new Po,this.programConfigurations=new Ga(C.layers,C.zoom),this.stateDependentLayerIds=this.layers.filter(function(H){return H.isStateDependent()}).map(function(H){return H.id})};Is.prototype.populate=function(C,H,oe){var be=this.layers[0],Pe=[],Ne=null;be.type==="circle"&&(Ne=be.layout.get("circle-sort-key"));for(var ft=0,It=C;ft=ui||Zr<0||Zr>=ui)){var Vr=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,C.sortKey),ua=Vr.vertexLength;Uo(this.layoutVertexArray,Lr,Zr,-1,-1),Uo(this.layoutVertexArray,Lr,Zr,1,-1),Uo(this.layoutVertexArray,Lr,Zr,1,1),Uo(this.layoutVertexArray,Lr,Zr,-1,1),this.indexArray.emplaceBack(ua,ua+1,ua+2),this.indexArray.emplaceBack(ua,ua+3,ua+2),Vr.vertexLength+=4,Vr.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,C,oe,{},be)},me("CircleBucket",Is,{omit:["layers"]});function Fo(k,C){for(var H=0;H=3){for(var Pe=0;Pe1){if(kp(k,C))return!0;for(var oe=0;oe1?k.distSqr(H):k.distSqr(H.sub(C)._mult(be)._add(C))}function ed(k,C){for(var H=!1,oe,be,Pe,Ne=0;NeC.y!=Pe.y>C.y&&C.x<(Pe.x-be.x)*(C.y-be.y)/(Pe.y-be.y)+be.x&&(H=!H)}return H}function Ih(k,C){for(var H=!1,oe=0,be=k.length-1;oeC.y!=Ne.y>C.y&&C.x<(Ne.x-Pe.x)*(C.y-Pe.y)/(Ne.y-Pe.y)+Pe.x&&(H=!H)}return H}function td(k,C,H,oe,be){for(var Pe=0,Ne=k;Pe=ft.x&&be>=ft.y)return!0}var It=[new n(C,H),new n(C,be),new n(oe,be),new n(oe,H)];if(k.length>2)for(var Ht=0,er=It;Htbe.x&&C.x>be.x||k.ybe.y&&C.y>be.y)return!1;var Pe=X(k,C,H[0]);return Pe!==X(k,C,H[1])||Pe!==X(k,C,H[2])||Pe!==X(k,C,H[3])}function Rh(k,C,H){var oe=C.paint.get(k).value;return oe.kind==="constant"?oe.value:H.programConfigurations.get(C.id).getMaxValue(k)}function Cp(k){return Math.sqrt(k[0]*k[0]+k[1]*k[1])}function Vp(k,C,H,oe,be){if(!C[0]&&!C[1])return k;var Pe=n.convert(C)._mult(be);H==="viewport"&&Pe._rotate(-oe);for(var Ne=[],ft=0;ft0&&(Pe=1/Math.sqrt(Pe)),k[0]=C[0]*Pe,k[1]=C[1]*Pe,k[2]=C[2]*Pe,k}function UT(k,C){return k[0]*C[0]+k[1]*C[1]+k[2]*C[2]}function jT(k,C,H){var oe=C[0],be=C[1],Pe=C[2],Ne=H[0],ft=H[1],It=H[2];return k[0]=be*It-Pe*ft,k[1]=Pe*Ne-oe*It,k[2]=oe*ft-be*Ne,k}function qT(k,C,H){var oe=C[0],be=C[1],Pe=C[2];return k[0]=oe*H[0]+be*H[3]+Pe*H[6],k[1]=oe*H[1]+be*H[4]+Pe*H[7],k[2]=oe*H[2]+be*H[5]+Pe*H[8],k}var VT=lv,vk=function(){var k=sv();return function(C,H,oe,be,Pe,Ne){var ft,It;for(H||(H=3),oe||(oe=0),be?It=Math.min(be*H+oe,C.length):It=C.length,ft=oe;ftk.width||be.height>k.height||H.x>k.width-be.width||H.y>k.height-be.height)throw new RangeError("out of range source coordinates for image copy");if(be.width>C.width||be.height>C.height||oe.x>C.width-be.width||oe.y>C.height-be.height)throw new RangeError("out of range destination coordinates for image copy");for(var Ne=k.data,ft=C.data,It=0;It80*H){ft=Ht=k[0],It=er=k[1];for(var ua=H;uaHt&&(Ht=Lr),Zr>er&&(er=Zr);Vr=Math.max(Ht-ft,er-It),Vr=Vr!==0?1/Vr:0}return E0(Pe,Ne,H,ft,It,Vr),Ne}function Mg(k,C,H,oe,be){var Pe,Ne;if(be===U1(k,C,H,oe)>0)for(Pe=C;Pe=C;Pe-=oe)Ne=Ux(Pe,k[Pe],k[Pe+1],Ne);return Ne&&C0(Ne,Ne.next)&&(I0(Ne),Ne=Ne.next),Ne}function uv(k,C){if(!k)return k;C||(C=k);var H=k,oe;do if(oe=!1,!H.steiner&&(C0(H,H.next)||cf(H.prev,H,H.next)===0)){if(I0(H),H=C=H.prev,H===H.next)break;oe=!0}else H=H.next;while(oe||H!==C);return C}function E0(k,C,H,oe,be,Pe,Ne){if(k){!Ne&&Pe&&Eg(k,oe,be,Pe);for(var ft=k,It,Ht;k.prev!==k.next;){if(It=k.prev,Ht=k.next,Pe?Ox(k,oe,be,Pe):Fx(k)){C.push(It.i/H),C.push(k.i/H),C.push(Ht.i/H),I0(k),k=Ht.next,ft=Ht.next;continue}if(k=Ht,k===ft){Ne?Ne===1?(k=k0(uv(k),C,H),E0(k,C,H,oe,be,Pe,2)):Ne===2&&yd(k,C,H,oe,be,Pe):E0(uv(k),C,H,oe,be,Pe,1);break}}}}function Fx(k){var C=k.prev,H=k,oe=k.next;if(cf(C,H,oe)>=0)return!1;for(var be=k.next.next;be!==k.prev;){if(fv(C.x,C.y,H.x,H.y,oe.x,oe.y,be.x,be.y)&&cf(be.prev,be,be.next)>=0)return!1;be=be.next}return!0}function Ox(k,C,H,oe){var be=k.prev,Pe=k,Ne=k.next;if(cf(be,Pe,Ne)>=0)return!1;for(var ft=be.xPe.x?be.x>Ne.x?be.x:Ne.x:Pe.x>Ne.x?Pe.x:Ne.x,er=be.y>Pe.y?be.y>Ne.y?be.y:Ne.y:Pe.y>Ne.y?Pe.y:Ne.y,Lr=F1(ft,It,C,H,oe),Zr=F1(Ht,er,C,H,oe),Vr=k.prevZ,ua=k.nextZ;Vr&&Vr.z>=Lr&&ua&&ua.z<=Zr;){if(Vr!==k.prev&&Vr!==k.next&&fv(be.x,be.y,Pe.x,Pe.y,Ne.x,Ne.y,Vr.x,Vr.y)&&cf(Vr.prev,Vr,Vr.next)>=0||(Vr=Vr.prevZ,ua!==k.prev&&ua!==k.next&&fv(be.x,be.y,Pe.x,Pe.y,Ne.x,Ne.y,ua.x,ua.y)&&cf(ua.prev,ua,ua.next)>=0))return!1;ua=ua.nextZ}for(;Vr&&Vr.z>=Lr;){if(Vr!==k.prev&&Vr!==k.next&&fv(be.x,be.y,Pe.x,Pe.y,Ne.x,Ne.y,Vr.x,Vr.y)&&cf(Vr.prev,Vr,Vr.next)>=0)return!1;Vr=Vr.prevZ}for(;ua&&ua.z<=Zr;){if(ua!==k.prev&&ua!==k.next&&fv(be.x,be.y,Pe.x,Pe.y,Ne.x,Ne.y,ua.x,ua.y)&&cf(ua.prev,ua,ua.next)>=0)return!1;ua=ua.nextZ}return!0}function k0(k,C,H){var oe=k;do{var be=oe.prev,Pe=oe.next.next;!C0(be,Pe)&&kg(be,oe,oe.next,Pe)&&P0(be,Pe)&&P0(Pe,be)&&(C.push(be.i/H),C.push(oe.i/H),C.push(Pe.i/H),I0(oe),I0(oe.next),oe=k=Pe),oe=oe.next}while(oe!==k);return uv(oe)}function yd(k,C,H,oe,be,Pe){var Ne=k;do{for(var ft=Ne.next.next;ft!==Ne.prev;){if(Ne.i!==ft.i&&cm(Ne,ft)){var It=B1(Ne,ft);Ne=uv(Ne,Ne.next),It=uv(It,It.next),E0(Ne,C,H,oe,be,Pe),E0(It,C,H,oe,be,Pe);return}ft=ft.next}Ne=Ne.next}while(Ne!==k)}function cv(k,C,H,oe){var be=[],Pe,Ne,ft,It,Ht;for(Pe=0,Ne=C.length;Pe=H.next.y&&H.next.y!==H.y){var ft=H.x+(be-H.y)*(H.next.x-H.x)/(H.next.y-H.y);if(ft<=oe&&ft>Pe){if(Pe=ft,ft===oe){if(be===H.y)return H;if(be===H.next.y)return H.next}Ne=H.x=H.x&&H.x>=Ht&&oe!==H.x&&fv(beNe.x||H.x===Ne.x&&$T(Ne,H)))&&(Ne=H,Lr=Zr)),H=H.next;while(H!==It);return Ne}function $T(k,C){return cf(k.prev,k,C.prev)<0&&cf(C.next,k,k.next)<0}function Eg(k,C,H,oe){var be=k;do be.z===null&&(be.z=F1(be.x,be.y,C,H,oe)),be.prevZ=be.prev,be.nextZ=be.next,be=be.next;while(be!==k);be.prevZ.nextZ=null,be.prevZ=null,z1(be)}function z1(k){var C,H,oe,be,Pe,Ne,ft,It,Ht=1;do{for(H=k,k=null,Pe=null,Ne=0;H;){for(Ne++,oe=H,ft=0,C=0;C0||It>0&&oe;)ft!==0&&(It===0||!oe||H.z<=oe.z)?(be=H,H=H.nextZ,ft--):(be=oe,oe=oe.nextZ,It--),Pe?Pe.nextZ=be:k=be,be.prevZ=Pe,Pe=be;H=oe}Pe.nextZ=null,Ht*=2}while(Ne>1);return k}function F1(k,C,H,oe,be){return k=32767*(k-H)*be,C=32767*(C-oe)*be,k=(k|k<<8)&16711935,k=(k|k<<4)&252645135,k=(k|k<<2)&858993459,k=(k|k<<1)&1431655765,C=(C|C<<8)&16711935,C=(C|C<<4)&252645135,C=(C|C<<2)&858993459,C=(C|C<<1)&1431655765,k|C<<1}function O1(k){var C=k,H=k;do(C.x=0&&(k-Ne)*(oe-ft)-(H-Ne)*(C-ft)>=0&&(H-Ne)*(Pe-ft)-(be-Ne)*(oe-ft)>=0}function cm(k,C){return k.next.i!==C.i&&k.prev.i!==C.i&&!Nx(k,C)&&(P0(k,C)&&P0(C,k)&&QT(k,C)&&(cf(k.prev,k,C.prev)||cf(k,C.prev,C))||C0(k,C)&&cf(k.prev,k,k.next)>0&&cf(C.prev,C,C.next)>0)}function cf(k,C,H){return(C.y-k.y)*(H.x-C.x)-(C.x-k.x)*(H.y-C.y)}function C0(k,C){return k.x===C.x&&k.y===C.y}function kg(k,C,H,oe){var be=Dv(cf(k,C,H)),Pe=Dv(cf(k,C,oe)),Ne=Dv(cf(H,oe,k)),ft=Dv(cf(H,oe,C));return!!(be!==Pe&&Ne!==ft||be===0&&L0(k,H,C)||Pe===0&&L0(k,oe,C)||Ne===0&&L0(H,k,oe)||ft===0&&L0(H,C,oe))}function L0(k,C,H){return C.x<=Math.max(k.x,H.x)&&C.x>=Math.min(k.x,H.x)&&C.y<=Math.max(k.y,H.y)&&C.y>=Math.min(k.y,H.y)}function Dv(k){return k>0?1:k<0?-1:0}function Nx(k,C){var H=k;do{if(H.i!==k.i&&H.next.i!==k.i&&H.i!==C.i&&H.next.i!==C.i&&kg(H,H.next,k,C))return!0;H=H.next}while(H!==k);return!1}function P0(k,C){return cf(k.prev,k,k.next)<0?cf(k,C,k.next)>=0&&cf(k,k.prev,C)>=0:cf(k,C,k.prev)<0||cf(k,k.next,C)<0}function QT(k,C){var H=k,oe=!1,be=(k.x+C.x)/2,Pe=(k.y+C.y)/2;do H.y>Pe!=H.next.y>Pe&&H.next.y!==H.y&&be<(H.next.x-H.x)*(Pe-H.y)/(H.next.y-H.y)+H.x&&(oe=!oe),H=H.next;while(H!==k);return oe}function B1(k,C){var H=new N1(k.i,k.x,k.y),oe=new N1(C.i,C.x,C.y),be=k.next,Pe=C.prev;return k.next=C,C.prev=k,H.next=be,be.prev=H,oe.next=H,H.prev=oe,Pe.next=oe,oe.prev=Pe,oe}function Ux(k,C,H,oe){var be=new N1(k,C,H);return oe?(be.next=oe.next,be.prev=oe,oe.next.prev=be,oe.next=be):(be.prev=be,be.next=be),be}function I0(k){k.next.prev=k.prev,k.prev.next=k.next,k.prevZ&&(k.prevZ.nextZ=k.nextZ),k.nextZ&&(k.nextZ.prevZ=k.prevZ)}function N1(k,C,H){this.i=k,this.x=C,this.y=H,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}um.deviation=function(k,C,H,oe){var be=C&&C.length,Pe=be?C[0]*H:k.length,Ne=Math.abs(U1(k,0,Pe,H));if(be)for(var ft=0,It=C.length;ft0&&(oe+=k[be-1].length,H.holes.push(oe))}return H},Sg.default=zx;function j1(k,C,H,oe,be){Hd(k,C,H||0,oe||k.length-1,be||jx)}function Hd(k,C,H,oe,be){for(;oe>H;){if(oe-H>600){var Pe=oe-H+1,Ne=C-H+1,ft=Math.log(Pe),It=.5*Math.exp(2*ft/3),Ht=.5*Math.sqrt(ft*It*(Pe-It)/Pe)*(Ne-Pe/2<0?-1:1),er=Math.max(H,Math.floor(C-Ne*It/Pe+Ht)),Lr=Math.min(oe,Math.floor(C+(Pe-Ne)*It/Pe+Ht));Hd(k,C,er,Lr,be)}var Zr=k[C],Vr=H,ua=oe;for(fm(k,H,C),be(k[oe],Zr)>0&&fm(k,H,oe);Vr0;)ua--}be(k[H],Zr)===0?fm(k,H,ua):(ua++,fm(k,ua,oe)),ua<=C&&(H=ua+1),C<=ua&&(oe=ua-1)}}function fm(k,C,H){var oe=k[C];k[C]=k[H],k[H]=oe}function jx(k,C){return kC?1:0}function Cg(k,C){var H=k.length;if(H<=1)return[k];for(var oe=[],be,Pe,Ne=0;Ne1)for(var It=0;It>3}if(oe--,H===1||H===2)be+=k.readSVarint(),Pe+=k.readSVarint(),H===1&&(ft&&Ne.push(ft),ft=[]),ft.push(new n(be,Pe));else if(H===7)ft&&ft.push(ft[0].clone());else throw new Error("unknown command "+H)}return ft&&Ne.push(ft),Ne},zv.prototype.bbox=function(){var k=this._pbf;k.pos=this._geometry;for(var C=k.readVarint()+k.pos,H=1,oe=0,be=0,Pe=0,Ne=1/0,ft=-1/0,It=1/0,Ht=-1/0;k.pos>3}if(oe--,H===1||H===2)be+=k.readSVarint(),Pe+=k.readSVarint(),beft&&(ft=be),PeHt&&(Ht=Pe);else if(H!==7)throw new Error("unknown command "+H)}return[Ne,It,ft,Ht]},zv.prototype.toGeoJSON=function(k,C,H){var oe=this.extent*Math.pow(2,H),be=this.extent*k,Pe=this.extent*C,Ne=this.loadGeometry(),ft=zv.types[this.type],It,Ht;function er(Vr){for(var ua=0;ua>3;C=oe===1?k.readString():oe===2?k.readFloat():oe===3?k.readDouble():oe===4?k.readVarint64():oe===5?k.readVarint():oe===6?k.readSVarint():oe===7?k.readBoolean():null}return C}G1.prototype.feature=function(k){if(k<0||k>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[k];var C=this._pbf.readVarint()+this._pbf.pos;return new V1(this._pbf,C,this.extent,this._keys,this._values)};var Jx=tA;function tA(k,C){this.layers=k.readFields(rA,{},C)}function rA(k,C,H){if(k===3){var oe=new Wd(H,H.readVarint()+H.pos);oe.length&&(C[oe.name]=oe)}}var $x=Jx,hm=V1,Qx=Wd,Xd={VectorTile:$x,VectorTileFeature:hm,VectorTileLayer:Qx},eb=Xd.VectorTileFeature.types,Pg=500,pm=Math.pow(2,13);function hv(k,C,H,oe,be,Pe,Ne,ft){k.emplaceBack(C,H,Math.floor(oe*pm)*2+Ne,be*pm*2,Pe*pm*2,Math.round(ft))}var cd=function(C){this.zoom=C.zoom,this.overscaling=C.overscaling,this.layers=C.layers,this.layerIds=this.layers.map(function(H){return H.id}),this.index=C.index,this.hasPattern=!1,this.layoutVertexArray=new di,this.indexArray=new Xi,this.programConfigurations=new Ga(C.layers,C.zoom),this.segments=new Po,this.stateDependentLayerIds=this.layers.filter(function(H){return H.isStateDependent()}).map(function(H){return H.id})};cd.prototype.populate=function(C,H,oe){this.features=[],this.hasPattern=Lg("fill-extrusion",this.layers,H);for(var be=0,Pe=C;be=1){var Ji=Mi[$i-1];if(!aA(Oi,Ji)){Vr.vertexLength+4>Po.MAX_VERTEX_ARRAY_LENGTH&&(Vr=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var ln=Oi.sub(Ji)._perp()._unit(),wn=Ji.dist(Oi);ii+wn>32768&&(ii=0),hv(this.layoutVertexArray,Oi.x,Oi.y,ln.x,ln.y,0,0,ii),hv(this.layoutVertexArray,Oi.x,Oi.y,ln.x,ln.y,0,1,ii),ii+=wn,hv(this.layoutVertexArray,Ji.x,Ji.y,ln.x,ln.y,0,0,ii),hv(this.layoutVertexArray,Ji.x,Ji.y,ln.x,ln.y,0,1,ii);var Vn=Vr.vertexLength;this.indexArray.emplaceBack(Vn,Vn+2,Vn+1),this.indexArray.emplaceBack(Vn+1,Vn+2,Vn+3),Vr.vertexLength+=4,Vr.primitiveLength+=2}}}}if(Vr.vertexLength+Ht>Po.MAX_VERTEX_ARRAY_LENGTH&&(Vr=this.segments.prepareSegment(Ht,this.layoutVertexArray,this.indexArray)),eb[C.type]==="Polygon"){for(var Un=[],Mo=[],so=Vr.vertexLength,mo=0,Cs=It;moui)||k.y===C.y&&(k.y<0||k.y>ui)}function iA(k){return k.every(function(C){return C.x<0})||k.every(function(C){return C.x>ui})||k.every(function(C){return C.y<0})||k.every(function(C){return C.y>ui})}var dm=new va({"fill-extrusion-opacity":new it(Gi["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Zt(Gi["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new it(Gi["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new it(Gi["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new cr(Gi["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Zt(Gi["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Zt(Gi["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new it(Gi["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])}),wh={paint:dm},pv=function(k){function C(H){k.call(this,H,wh)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype.createBucket=function(oe){return new cd(oe)},C.prototype.queryRadius=function(){return Cp(this.paint.get("fill-extrusion-translate"))},C.prototype.is3D=function(){return!0},C.prototype.queryIntersectsFeature=function(oe,be,Pe,Ne,ft,It,Ht,er){var Lr=Vp(oe,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),It.angle,Ht),Zr=this.paint.get("fill-extrusion-height").evaluate(be,Pe),Vr=this.paint.get("fill-extrusion-base").evaluate(be,Pe),ua=nA(Lr,er,It,0),Fa=W1(Ne,Vr,Zr,er),Mi=Fa[0],ii=Fa[1];return tb(Mi,ii,ua)},C}(Ya);function Fv(k,C){return k.x*C.x+k.y*C.y}function H1(k,C){if(k.length===1){for(var H=0,oe=C[H++],be;!be||oe.equals(be);)if(be=C[H++],!be)return 1/0;for(;H=2&&C[Ht-1].equals(C[Ht-2]);)Ht--;for(var er=0;er0;if(Un&&$i>er){var so=Vr.dist(ua);if(so>2*Lr){var mo=Vr.sub(Vr.sub(ua)._mult(Lr/so)._round());this.updateDistance(ua,mo),this.addCurrentVertex(mo,Mi,0,0,Zr),ua=mo}}var Cs=ua&&Fa,Eo=Cs?oe:It?"butt":be;if(Cs&&Eo==="round"&&(wnPe&&(Eo="bevel"),Eo==="bevel"&&(wn>2&&(Eo="flipbevel"),wn100)Oi=ii.mult(-1);else{var Ro=wn*Mi.add(ii).mag()/Mi.sub(ii).mag();Oi._perp()._mult(Ro*(Mo?-1:1))}this.addCurrentVertex(Vr,Oi,0,0,Zr),this.addCurrentVertex(Vr,Oi.mult(-1),0,0,Zr)}else if(Eo==="bevel"||Eo==="fakeround"){var $s=-Math.sqrt(wn*wn-1),Ts=Mo?$s:0,Xl=Mo?0:$s;if(ua&&this.addCurrentVertex(Vr,Mi,Ts,Xl,Zr),Eo==="fakeround")for(var zu=Math.round(Vn*180/Math.PI/Z1),Zl=1;Zl2*Lr){var Zf=Vr.add(Fa.sub(Vr)._mult(Lr/gh)._round());this.updateDistance(Vr,Zf),this.addCurrentVertex(Zf,ii,0,0,Zr),Vr=Zf}}}}},Hf.prototype.addCurrentVertex=function(C,H,oe,be,Pe,Ne){Ne===void 0&&(Ne=!1);var ft=H.x+H.y*oe,It=H.y-H.x*oe,Ht=-H.x+H.y*be,er=-H.y-H.x*be;this.addHalfVertex(C,ft,It,Ne,!1,oe,Pe),this.addHalfVertex(C,Ht,er,Ne,!0,-be,Pe),this.distance>O0/2&&this.totalDistance===0&&(this.distance=0,this.addCurrentVertex(C,H,oe,be,Pe,Ne))},Hf.prototype.addHalfVertex=function(C,H,oe,be,Pe,Ne,ft){var It=C.x,Ht=C.y,er=this.lineClips?this.scaledDistance*(O0-1):this.scaledDistance,Lr=er*Rg;if(this.layoutVertexArray.emplaceBack((It<<1)+(be?1:0),(Ht<<1)+(Pe?1:0),Math.round(Ig*H)+128,Math.round(Ig*oe)+128,(Ne===0?0:Ne<0?-1:1)+1|(Lr&63)<<2,Lr>>6),this.lineClips){var Zr=this.scaledDistance-this.lineClips.start,Vr=this.lineClips.end-this.lineClips.start,ua=Zr/Vr;this.layoutVertexArray2.emplaceBack(ua,this.lineClipsArray.length)}var Fa=ft.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,Fa),ft.primitiveLength++),Pe?this.e2=Fa:this.e1=Fa},Hf.prototype.updateScaledDistance=function(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance},Hf.prototype.updateDistance=function(C,H){this.distance+=C.dist(H),this.updateScaledDistance()},me("LineBucket",Hf,{omit:["layers","patternFeatures"]});var Y1=new va({"line-cap":new it(Gi.layout_line["line-cap"]),"line-join":new Zt(Gi.layout_line["line-join"]),"line-miter-limit":new it(Gi.layout_line["line-miter-limit"]),"line-round-limit":new it(Gi.layout_line["line-round-limit"]),"line-sort-key":new Zt(Gi.layout_line["line-sort-key"])}),K1=new va({"line-opacity":new Zt(Gi.paint_line["line-opacity"]),"line-color":new Zt(Gi.paint_line["line-color"]),"line-translate":new it(Gi.paint_line["line-translate"]),"line-translate-anchor":new it(Gi.paint_line["line-translate-anchor"]),"line-width":new Zt(Gi.paint_line["line-width"]),"line-gap-width":new Zt(Gi.paint_line["line-gap-width"]),"line-offset":new Zt(Gi.paint_line["line-offset"]),"line-blur":new Zt(Gi.paint_line["line-blur"]),"line-dasharray":new oa(Gi.paint_line["line-dasharray"]),"line-pattern":new cr(Gi.paint_line["line-pattern"]),"line-gradient":new wa(Gi.paint_line["line-gradient"])}),Dg={paint:K1,layout:Y1},sA=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype.possiblyEvaluate=function(oe,be){return be=new mn(Math.floor(be.zoom),{now:be.now,fadeDuration:be.fadeDuration,zoomHistory:be.zoomHistory,transition:be.transition}),k.prototype.possiblyEvaluate.call(this,oe,be)},C.prototype.evaluate=function(oe,be,Pe,Ne){return be=g({},be,{zoom:Math.floor(be.zoom)}),k.prototype.evaluate.call(this,oe,be,Pe,Ne)},C}(Zt),W=new sA(Dg.paint.properties["line-width"].specification);W.useIntegerZoom=!0;var D=function(k){function C(H){k.call(this,H,Dg),this.gradientVersion=0}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._handleSpecialPaintPropertyUpdate=function(oe){if(oe==="line-gradient"){var be=this._transitionablePaint._values["line-gradient"].value.expression;this.stepInterpolant=be._styleExpression.expression instanceof Tu,this.gradientVersion=(this.gradientVersion+1)%f}},C.prototype.gradientExpression=function(){return this._transitionablePaint._values["line-gradient"].value.expression},C.prototype.recalculate=function(oe,be){k.prototype.recalculate.call(this,oe,be),this.paint._values["line-floorwidth"]=W.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,oe)},C.prototype.createBucket=function(oe){return new Hf(oe)},C.prototype.queryRadius=function(oe){var be=oe,Pe=J(Rh("line-width",this,be),Rh("line-gap-width",this,be)),Ne=Rh("line-offset",this,be);return Pe/2+Math.abs(Ne)+Cp(this.paint.get("line-translate"))},C.prototype.queryIntersectsFeature=function(oe,be,Pe,Ne,ft,It,Ht){var er=Vp(oe,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),It.angle,Ht),Lr=Ht/2*J(this.paint.get("line-width").evaluate(be,Pe),this.paint.get("line-gap-width").evaluate(be,Pe)),Zr=this.paint.get("line-offset").evaluate(be,Pe);return Zr&&(Ne=ve(Ne,Zr*Ht)),mu(er,Ne,Lr)},C.prototype.isTileClipped=function(){return!0},C}(Ya);function J(k,C){return C>0?C+2*k:k}function ve(k,C){for(var H=[],oe=new n(0,0),be=0;be":"\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"};function qi(k){for(var C="",H=0;H>1,er=-7,Lr=H?be-1:0,Zr=H?-1:1,Vr=k[C+Lr];for(Lr+=Zr,Pe=Vr&(1<<-er)-1,Vr>>=-er,er+=ft;er>0;Pe=Pe*256+k[C+Lr],Lr+=Zr,er-=8);for(Ne=Pe&(1<<-er)-1,Pe>>=-er,er+=oe;er>0;Ne=Ne*256+k[C+Lr],Lr+=Zr,er-=8);if(Pe===0)Pe=1-Ht;else{if(Pe===It)return Ne?NaN:(Vr?-1:1)*(1/0);Ne=Ne+Math.pow(2,oe),Pe=Pe-Ht}return(Vr?-1:1)*Ne*Math.pow(2,Pe-oe)},ko=function(k,C,H,oe,be,Pe){var Ne,ft,It,Ht=Pe*8-be-1,er=(1<>1,Zr=be===23?Math.pow(2,-24)-Math.pow(2,-77):0,Vr=oe?0:Pe-1,ua=oe?1:-1,Fa=C<0||C===0&&1/C<0?1:0;for(C=Math.abs(C),isNaN(C)||C===1/0?(ft=isNaN(C)?1:0,Ne=er):(Ne=Math.floor(Math.log(C)/Math.LN2),C*(It=Math.pow(2,-Ne))<1&&(Ne--,It*=2),Ne+Lr>=1?C+=Zr/It:C+=Zr*Math.pow(2,1-Lr),C*It>=2&&(Ne++,It/=2),Ne+Lr>=er?(ft=0,Ne=er):Ne+Lr>=1?(ft=(C*It-1)*Math.pow(2,be),Ne=Ne+Lr):(ft=C*Math.pow(2,Lr-1)*Math.pow(2,be),Ne=0));be>=8;k[H+Vr]=ft&255,Vr+=ua,ft/=256,be-=8);for(Ne=Ne<0;k[H+Vr]=Ne&255,Vr+=ua,Ne/=256,Ht-=8);k[H+Vr-ua]|=Fa*128},ys={read:qn,write:ko},vo=zn;function zn(k){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(k)?k:new Uint8Array(k||0),this.pos=0,this.type=0,this.length=this.buf.length}zn.Varint=0,zn.Fixed64=1,zn.Bytes=2,zn.Fixed32=5;var rs=65536*65536,jo=1/rs,Bo=12,bn=typeof TextDecoder>"u"?null:new TextDecoder("utf8");zn.prototype={destroy:function(){this.buf=null},readFields:function(k,C,H){for(H=H||this.length;this.pos>3,Pe=this.pos;this.type=oe&7,k(be,C,this),this.pos===Pe&&this.skip(oe)}return C},readMessage:function(k,C){return this.readFields(k,C,this.readVarint()+this.pos)},readFixed32:function(){var k=dh(this.buf,this.pos);return this.pos+=4,k},readSFixed32:function(){var k=Rp(this.buf,this.pos);return this.pos+=4,k},readFixed64:function(){var k=dh(this.buf,this.pos)+dh(this.buf,this.pos+4)*rs;return this.pos+=8,k},readSFixed64:function(){var k=dh(this.buf,this.pos)+Rp(this.buf,this.pos+4)*rs;return this.pos+=8,k},readFloat:function(){var k=ys.read(this.buf,this.pos,!0,23,4);return this.pos+=4,k},readDouble:function(){var k=ys.read(this.buf,this.pos,!0,52,8);return this.pos+=8,k},readVarint:function(k){var C=this.buf,H,oe;return oe=C[this.pos++],H=oe&127,oe<128||(oe=C[this.pos++],H|=(oe&127)<<7,oe<128)||(oe=C[this.pos++],H|=(oe&127)<<14,oe<128)||(oe=C[this.pos++],H|=(oe&127)<<21,oe<128)?H:(oe=C[this.pos],H|=(oe&15)<<28,ls(H,k,this))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var k=this.readVarint();return k%2===1?(k+1)/-2:k/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var k=this.readVarint()+this.pos,C=this.pos;return this.pos=k,k-C>=Bo&&bn?hu(this.buf,C,k):dp(this.buf,C,k)},readBytes:function(){var k=this.readVarint()+this.pos,C=this.buf.subarray(this.pos,k);return this.pos=k,C},readPackedVarint:function(k,C){if(this.type!==zn.Bytes)return k.push(this.readVarint(C));var H=No(this);for(k=k||[];this.pos127;);else if(C===zn.Bytes)this.pos=this.readVarint()+this.pos;else if(C===zn.Fixed32)this.pos+=4;else if(C===zn.Fixed64)this.pos+=8;else throw new Error("Unimplemented type: "+C)},writeTag:function(k,C){this.writeVarint(k<<3|C)},realloc:function(k){for(var C=this.length||16;C268435455||k<0){Ku(k,this);return}this.realloc(4),this.buf[this.pos++]=k&127|(k>127?128:0),!(k<=127)&&(this.buf[this.pos++]=(k>>>=7)&127|(k>127?128:0),!(k<=127)&&(this.buf[this.pos++]=(k>>>=7)&127|(k>127?128:0),!(k<=127)&&(this.buf[this.pos++]=k>>>7&127)))},writeSVarint:function(k){this.writeVarint(k<0?-k*2-1:k*2)},writeBoolean:function(k){this.writeVarint(!!k)},writeString:function(k){k=String(k),this.realloc(k.length*4),this.pos++;var C=this.pos;this.pos=fc(this.buf,k,this.pos);var H=this.pos-C;H>=128&&Hp(C,H,this),this.pos=C-1,this.writeVarint(H),this.pos+=H},writeFloat:function(k){this.realloc(4),ys.write(this.buf,k,this.pos,!0,23,4),this.pos+=4},writeDouble:function(k){this.realloc(8),ys.write(this.buf,k,this.pos,!0,52,8),this.pos+=8},writeBytes:function(k){var C=k.length;this.writeVarint(C),this.realloc(C);for(var H=0;H=128&&Hp(H,oe,this),this.pos=H-1,this.writeVarint(oe),this.pos+=oe},writeMessage:function(k,C,H){this.writeTag(k,zn.Bytes),this.writeRawMessage(C,H)},writePackedVarint:function(k,C){C.length&&this.writeMessage(k,Th,C)},writePackedSVarint:function(k,C){C.length&&this.writeMessage(k,rh,C)},writePackedBoolean:function(k,C){C.length&&this.writeMessage(k,Qh,C)},writePackedFloat:function(k,C){C.length&&this.writeMessage(k,Jh,C)},writePackedDouble:function(k,C){C.length&&this.writeMessage(k,$h,C)},writePackedFixed32:function(k,C){C.length&&this.writeMessage(k,ff,C)},writePackedSFixed32:function(k,C){C.length&&this.writeMessage(k,ah,C)},writePackedFixed64:function(k,C){C.length&&this.writeMessage(k,Fh,C)},writePackedSFixed64:function(k,C){C.length&&this.writeMessage(k,Ah,C)},writeBytesField:function(k,C){this.writeTag(k,zn.Bytes),this.writeBytes(C)},writeFixed32Field:function(k,C){this.writeTag(k,zn.Fixed32),this.writeFixed32(C)},writeSFixed32Field:function(k,C){this.writeTag(k,zn.Fixed32),this.writeSFixed32(C)},writeFixed64Field:function(k,C){this.writeTag(k,zn.Fixed64),this.writeFixed64(C)},writeSFixed64Field:function(k,C){this.writeTag(k,zn.Fixed64),this.writeSFixed64(C)},writeVarintField:function(k,C){this.writeTag(k,zn.Varint),this.writeVarint(C)},writeSVarintField:function(k,C){this.writeTag(k,zn.Varint),this.writeSVarint(C)},writeStringField:function(k,C){this.writeTag(k,zn.Bytes),this.writeString(C)},writeFloatField:function(k,C){this.writeTag(k,zn.Fixed32),this.writeFloat(C)},writeDoubleField:function(k,C){this.writeTag(k,zn.Fixed64),this.writeDouble(C)},writeBooleanField:function(k,C){this.writeVarintField(k,!!C)}};function ls(k,C,H){var oe=H.buf,be,Pe;if(Pe=oe[H.pos++],be=(Pe&112)>>4,Pe<128||(Pe=oe[H.pos++],be|=(Pe&127)<<3,Pe<128)||(Pe=oe[H.pos++],be|=(Pe&127)<<10,Pe<128)||(Pe=oe[H.pos++],be|=(Pe&127)<<17,Pe<128)||(Pe=oe[H.pos++],be|=(Pe&127)<<24,Pe<128)||(Pe=oe[H.pos++],be|=(Pe&1)<<31,Pe<128))return Ps(k,be,C);throw new Error("Expected varint not more than 10 bytes")}function No(k){return k.type===zn.Bytes?k.readVarint()+k.pos:k.pos+1}function Ps(k,C,H){return H?C*4294967296+(k>>>0):(C>>>0)*4294967296+(k>>>0)}function Ku(k,C){var H,oe;if(k>=0?(H=k%4294967296|0,oe=k/4294967296|0):(H=~(-k%4294967296),oe=~(-k/4294967296),H^4294967295?H=H+1|0:(H=0,oe=oe+1|0)),k>=18446744073709552e3||k<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");C.realloc(10),Uu(H,oe,C),th(oe,C)}function Uu(k,C,H){H.buf[H.pos++]=k&127|128,k>>>=7,H.buf[H.pos++]=k&127|128,k>>>=7,H.buf[H.pos++]=k&127|128,k>>>=7,H.buf[H.pos++]=k&127|128,k>>>=7,H.buf[H.pos]=k&127}function th(k,C){var H=(k&7)<<4;C.buf[C.pos++]|=H|((k>>>=3)?128:0),k&&(C.buf[C.pos++]=k&127|((k>>>=7)?128:0),k&&(C.buf[C.pos++]=k&127|((k>>>=7)?128:0),k&&(C.buf[C.pos++]=k&127|((k>>>=7)?128:0),k&&(C.buf[C.pos++]=k&127|((k>>>=7)?128:0),k&&(C.buf[C.pos++]=k&127)))))}function Hp(k,C,H){var oe=C<=16383?1:C<=2097151?2:C<=268435455?3:Math.floor(Math.log(C)/(Math.LN2*7));H.realloc(oe);for(var be=H.pos-1;be>=k;be--)H.buf[be+oe]=H.buf[be]}function Th(k,C){for(var H=0;H>>8,k[H+2]=C>>>16,k[H+3]=C>>>24}function Rp(k,C){return(k[C]|k[C+1]<<8|k[C+2]<<16)+(k[C+3]<<24)}function dp(k,C,H){for(var oe="",be=C;be239?4:Pe>223?3:Pe>191?2:1;if(be+ft>H)break;var It,Ht,er;ft===1?Pe<128&&(Ne=Pe):ft===2?(It=k[be+1],(It&192)===128&&(Ne=(Pe&31)<<6|It&63,Ne<=127&&(Ne=null))):ft===3?(It=k[be+1],Ht=k[be+2],(It&192)===128&&(Ht&192)===128&&(Ne=(Pe&15)<<12|(It&63)<<6|Ht&63,(Ne<=2047||Ne>=55296&&Ne<=57343)&&(Ne=null))):ft===4&&(It=k[be+1],Ht=k[be+2],er=k[be+3],(It&192)===128&&(Ht&192)===128&&(er&192)===128&&(Ne=(Pe&15)<<18|(It&63)<<12|(Ht&63)<<6|er&63,(Ne<=65535||Ne>=1114112)&&(Ne=null))),Ne===null?(Ne=65533,ft=1):Ne>65535&&(Ne-=65536,oe+=String.fromCharCode(Ne>>>10&1023|55296),Ne=56320|Ne&1023),oe+=String.fromCharCode(Ne),be+=ft}return oe}function hu(k,C,H){return bn.decode(k.subarray(C,H))}function fc(k,C,H){for(var oe=0,be,Pe;oe55295&&be<57344)if(Pe)if(be<56320){k[H++]=239,k[H++]=191,k[H++]=189,Pe=be;continue}else be=Pe-55296<<10|be-56320|65536,Pe=null;else{be>56319||oe+1===C.length?(k[H++]=239,k[H++]=191,k[H++]=189):Pe=be;continue}else Pe&&(k[H++]=239,k[H++]=191,k[H++]=189,Pe=null);be<128?k[H++]=be:(be<2048?k[H++]=be>>6|192:(be<65536?k[H++]=be>>12|224:(k[H++]=be>>18|240,k[H++]=be>>12&63|128),k[H++]=be>>6&63|128),k[H++]=be&63|128)}return H}var Ju=3;function Dp(k,C,H){k===1&&H.readMessage($c,C)}function $c(k,C,H){if(k===3){var oe=H.readMessage(vm,{}),be=oe.id,Pe=oe.bitmap,Ne=oe.width,ft=oe.height,It=oe.left,Ht=oe.top,er=oe.advance;C.push({id:be,bitmap:new Ip({width:Ne+2*Ju,height:ft+2*Ju},Pe),metrics:{width:Ne,height:ft,left:It,top:Ht,advance:er}})}}function vm(k,C,H){k===1?C.id=H.readVarint():k===2?C.bitmap=H.readBytes():k===3?C.width=H.readVarint():k===4?C.height=H.readVarint():k===5?C.left=H.readSVarint():k===6?C.top=H.readSVarint():k===7&&(C.advance=H.readVarint())}function _d(k){return new vo(k).readFields(Dp,[])}var fd=Ju;function Wp(k){for(var C=0,H=0,oe=0,be=k;oe=0;Vr--){var ua=ft[Vr];if(!(Zr.w>ua.w||Zr.h>ua.h)){if(Zr.x=ua.x,Zr.y=ua.y,Ht=Math.max(Ht,Zr.y+Zr.h),It=Math.max(It,Zr.x+Zr.w),Zr.w===ua.w&&Zr.h===ua.h){var Fa=ft.pop();Vr=0&&be>=C&&bd[this.text.charCodeAt(be)];be--)oe--;this.text=this.text.substring(C,oe),this.sectionIndex=this.sectionIndex.slice(C,oe)},vh.prototype.substring=function(C,H){var oe=new vh;return oe.text=this.text.substring(C,H),oe.sectionIndex=this.sectionIndex.slice(C,H),oe.sections=this.sections,oe},vh.prototype.toString=function(){return this.text},vh.prototype.getMaxScale=function(){var C=this;return this.sectionIndex.reduce(function(H,oe){return Math.max(H,C.sections[oe].scale)},0)},vh.prototype.addTextSection=function(C,H){this.text+=C.text,this.sections.push(Ov.forText(C.scale,C.fontStack||H));for(var oe=this.sections.length-1,be=0;be=xd?null:++this.imageSectionID:(this.imageSectionID=zg,this.imageSectionID)};function lA(k,C){for(var H=[],oe=k.text,be=0,Pe=0,Ne=C;Pe=0,er=0,Lr=0;Lr0&&Zf>Mo&&(Mo=Zf)}else{var Yl=H[mo.fontStack],Ol=Yl&&Yl[Eo];if(Ol&&Ol.rect)Ts=Ol.rect,$s=Ol.metrics;else{var $u=C[mo.fontStack],hc=$u&&$u[Eo];if(!hc)continue;$s=hc.metrics}Ro=(ln-mo.scale)*en}Zl?(k.verticalizable=!0,Un.push({glyph:Eo,imageName:Xl,x:Zr,y:Vr+Ro,vertical:Zl,scale:mo.scale,fontStack:mo.fontStack,sectionIndex:Cs,metrics:$s,rect:Ts}),Zr+=zu*mo.scale+Ht):(Un.push({glyph:Eo,imageName:Xl,x:Zr,y:Vr+Ro,vertical:Zl,scale:mo.scale,fontStack:mo.fontStack,sectionIndex:Cs,metrics:$s,rect:Ts}),Zr+=$s.advance*mo.scale+Ht)}if(Un.length!==0){var tp=Zr-Ht;ua=Math.max(tp,ua),hA(Un,0,Un.length-1,Mi,Mo)}Zr=0;var rp=Pe*ln+Mo;Vn.lineOffset=Math.max(Mo,wn),Vr+=rp,Fa=Math.max(rp,Fa),++ii}var yh=Vr-mm,gp=$1(Ne),yp=gp.horizontalAlign,ih=gp.verticalAlign;Oh(k.positionedLines,Mi,yp,ih,ua,Fa,Pe,yh,be.length),k.top+=-ih*yh,k.bottom=k.top+yh,k.left+=-yp*ua,k.right=k.left+ua}function hA(k,C,H,oe,be){if(!(!oe&&!be))for(var Pe=k[H],Ne=Pe.metrics.advance*Pe.scale,ft=(k[H].x+Ne)*oe,It=C;It<=H;It++)k[It].x-=ft,k[It].y+=be}function Oh(k,C,H,oe,be,Pe,Ne,ft,It){var Ht=(C-H)*be,er=0;Pe!==Ne?er=-ft*oe-mm:er=(-oe*It+.5)*Ne;for(var Lr=0,Zr=k;Lr-H/2;){if(Ne--,Ne<0)return!1;ft-=k[Ne].dist(Pe),Pe=k[Ne]}ft+=k[Ne].dist(k[Ne+1]),Ne++;for(var It=[],Ht=0;ftoe;)Ht-=It.shift().angleDelta;if(Ht>be)return!1;Ne++,ft+=Lr.dist(Zr)}return!0}function xk(k){for(var C=0,H=0;HHt){var ua=(Ht-It)/Vr,Fa=El(Lr.x,Zr.x,ua),Mi=El(Lr.y,Zr.y,ua),ii=new ep(Fa,Mi,Zr.angleTo(Lr),er);return ii._round(),!Ne||_k(k,ii,ft,Ne,C)?ii:void 0}It+=Vr}}function xW(k,C,H,oe,be,Pe,Ne,ft,It){var Ht=bk(oe,Pe,Ne),er=wk(oe,be),Lr=er*Ne,Zr=k[0].x===0||k[0].x===It||k[0].y===0||k[0].y===It;C-Lr=0&&Ji=0&&ln=0&&Zr+Ht<=er){var wn=new ep(Ji,ln,$i,ua);wn._round(),(!oe||_k(k,wn,Pe,oe,be))&&Vr.push(wn)}}Lr+=ii}return!ft&&!Vr.length&&!Ne&&(Vr=Tk(k,Lr/2,H,oe,be,Pe,Ne,!0,It)),Vr}function Ak(k,C,H,oe,be){for(var Pe=[],Ne=0;Ne=oe&&Lr.x>=oe)&&(er.x>=oe?er=new n(oe,er.y+(Lr.y-er.y)*((oe-er.x)/(Lr.x-er.x)))._round():Lr.x>=oe&&(Lr=new n(oe,er.y+(Lr.y-er.y)*((oe-er.x)/(Lr.x-er.x)))._round()),!(er.y>=be&&Lr.y>=be)&&(er.y>=be?er=new n(er.x+(Lr.x-er.x)*((be-er.y)/(Lr.y-er.y)),be)._round():Lr.y>=be&&(Lr=new n(er.x+(Lr.x-er.x)*((be-er.y)/(Lr.y-er.y)),be)._round()),(!It||!er.equals(It[It.length-1]))&&(It=[er],Pe.push(It)),It.push(Lr)))))}return Pe}var Bg=zc;function Sk(k,C,H,oe){var be=[],Pe=k.image,Ne=Pe.pixelRatio,ft=Pe.paddedRect.w-2*Bg,It=Pe.paddedRect.h-2*Bg,Ht=k.right-k.left,er=k.bottom-k.top,Lr=Pe.stretchX||[[0,ft]],Zr=Pe.stretchY||[[0,It]],Vr=function(Yl,Ol){return Yl+Ol[1]-Ol[0]},ua=Lr.reduce(Vr,0),Fa=Zr.reduce(Vr,0),Mi=ft-ua,ii=It-Fa,$i=0,Oi=ua,Ji=0,ln=Fa,wn=0,Vn=Mi,Un=0,Mo=ii;if(Pe.content&&oe){var so=Pe.content;$i=ub(Lr,0,so[0]),Ji=ub(Zr,0,so[1]),Oi=ub(Lr,so[0],so[2]),ln=ub(Zr,so[1],so[3]),wn=so[0]-$i,Un=so[1]-Ji,Vn=so[2]-so[0]-Oi,Mo=so[3]-so[1]-ln}var mo=function(Yl,Ol,$u,hc){var hf=cb(Yl.stretch-$i,Oi,Ht,k.left),_f=fb(Yl.fixed-wn,Vn,Yl.stretch,ua),gh=cb(Ol.stretch-Ji,ln,er,k.top),Zf=fb(Ol.fixed-Un,Mo,Ol.stretch,Fa),tp=cb($u.stretch-$i,Oi,Ht,k.left),rp=fb($u.fixed-wn,Vn,$u.stretch,ua),yh=cb(hc.stretch-Ji,ln,er,k.top),gp=fb(hc.fixed-Un,Mo,hc.stretch,Fa),yp=new n(hf,gh),ih=new n(tp,gh),_p=new n(tp,yh),nd=new n(hf,yh),Uv=new n(_f/Ne,Zf/Ne),_m=new n(rp/Ne,gp/Ne),xm=C*Math.PI/180;if(xm){var bm=Math.sin(xm),Wg=Math.cos(xm),wd=[Wg,-bm,bm,Wg];yp._matMult(wd),ih._matMult(wd),nd._matMult(wd),_p._matMult(wd)}var gb=Yl.stretch+Yl.fixed,xA=$u.stretch+$u.fixed,yb=Ol.stretch+Ol.fixed,bA=hc.stretch+hc.fixed,hd={x:Pe.paddedRect.x+Bg+gb,y:Pe.paddedRect.y+Bg+yb,w:xA-gb,h:bA-yb},Xg=Vn/Ne/Ht,_b=Mo/Ne/er;return{tl:yp,tr:ih,bl:nd,br:_p,tex:hd,writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:Uv,pixelOffsetBR:_m,minFontScaleX:Xg,minFontScaleY:_b,isSDF:H}};if(!oe||!Pe.stretchX&&!Pe.stretchY)be.push(mo({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:ft+1},{fixed:0,stretch:It+1}));else for(var Cs=Mk(Lr,Mi,ua),Eo=Mk(Zr,ii,Fa),Ro=0;Ro0&&(ua=Math.max(10,ua),this.circleDiameter=ua)}else{var Fa=Ne.top*ft-It,Mi=Ne.bottom*ft+It,ii=Ne.left*ft-It,$i=Ne.right*ft+It,Oi=Ne.collisionPadding;if(Oi&&(ii-=Oi[0]*ft,Fa-=Oi[1]*ft,$i+=Oi[2]*ft,Mi+=Oi[3]*ft),er){var Ji=new n(ii,Fa),ln=new n($i,Fa),wn=new n(ii,Mi),Vn=new n($i,Mi),Un=er*Math.PI/180;Ji._rotate(Un),ln._rotate(Un),wn._rotate(Un),Vn._rotate(Un),ii=Math.min(Ji.x,ln.x,wn.x,Vn.x),$i=Math.max(Ji.x,ln.x,wn.x,Vn.x),Fa=Math.min(Ji.y,ln.y,wn.y,Vn.y),Mi=Math.max(Ji.y,ln.y,wn.y,Vn.y)}C.emplaceBack(H.x,H.y,ii,Fa,$i,Mi,oe,be,Pe)}this.boxEndIndex=C.length},Ng=function(C,H){if(C===void 0&&(C=[]),H===void 0&&(H=wW),this.data=C,this.length=this.data.length,this.compare=H,this.length>0)for(var oe=(this.length>>1)-1;oe>=0;oe--)this._down(oe)};Ng.prototype.push=function(C){this.data.push(C),this.length++,this._up(this.length-1)},Ng.prototype.pop=function(){if(this.length!==0){var C=this.data[0],H=this.data.pop();return this.length--,this.length>0&&(this.data[0]=H,this._down(0)),C}},Ng.prototype.peek=function(){return this.data[0]},Ng.prototype._up=function(C){for(var H=this,oe=H.data,be=H.compare,Pe=oe[C];C>0;){var Ne=C-1>>1,ft=oe[Ne];if(be(Pe,ft)>=0)break;oe[C]=ft,C=Ne}oe[C]=Pe},Ng.prototype._down=function(C){for(var H=this,oe=H.data,be=H.compare,Pe=this.length>>1,Ne=oe[C];C=0)break;oe[C]=It,C=ft}oe[C]=Ne};function wW(k,C){return kC?1:0}function TW(k,C,H){C===void 0&&(C=1),H===void 0&&(H=!1);for(var oe=1/0,be=1/0,Pe=-1/0,Ne=-1/0,ft=k[0],It=0;ItPe)&&(Pe=Ht.x),(!It||Ht.y>Ne)&&(Ne=Ht.y)}var er=Pe-oe,Lr=Ne-be,Zr=Math.min(er,Lr),Vr=Zr/2,ua=new Ng([],AW);if(Zr===0)return new n(oe,be);for(var Fa=oe;Faii.d||!ii.d)&&(ii=Oi,H&&console.log("found best %d after %d probes",Math.round(1e4*Oi.d)/1e4,$i)),!(Oi.max-ii.d<=C)&&(Vr=Oi.h/2,ua.push(new Ug(Oi.p.x-Vr,Oi.p.y-Vr,Vr,k)),ua.push(new Ug(Oi.p.x+Vr,Oi.p.y-Vr,Vr,k)),ua.push(new Ug(Oi.p.x-Vr,Oi.p.y+Vr,Vr,k)),ua.push(new Ug(Oi.p.x+Vr,Oi.p.y+Vr,Vr,k)),$i+=4)}return H&&(console.log("num probes: "+$i),console.log("best distance: "+ii.d)),ii.p}function AW(k,C){return C.max-k.max}function Ug(k,C,H,oe){this.p=new n(k,C),this.h=H,this.d=SW(this.p,oe),this.max=this.d+this.h*Math.SQRT2}function SW(k,C){for(var H=!1,oe=1/0,be=0;bek.y!=er.y>k.y&&k.x<(er.x-Ht.x)*(k.y-Ht.y)/(er.y-Ht.y)+Ht.x&&(H=!H),oe=Math.min(oe,qd(k,Ht,er))}return(H?1:-1)*Math.sqrt(oe)}function MW(k){for(var C=0,H=0,oe=0,be=k[0],Pe=0,Ne=be.length,ft=Ne-1;Pe=ui||wd.y<0||wd.y>=ui||CW(k,wd,Wg,H,oe,be,Eo,k.layers[0],k.collisionBoxArray,C.index,C.sourceLayerIndex,k.index,ii,ln,Un,It,Oi,wn,Mo,Vr,C,Pe,Ht,er,Ne)};if(so==="line")for(var $s=0,Ts=Ak(C.geometry,0,0,ui,ui);$s1){var gh=_W(_f,Vn,H.vertical||ua,oe,Fa,$i);gh&&Ro(_f,gh)}}else if(C.type==="Polygon")for(var Zf=0,tp=Cg(C.geometry,0);Zfgm&&B(k.layerIds[0]+': Value for "text-size" is >= '+Q1+'. Reduce your "text-size".')):Mi.kind==="composite"&&(ii=[Bh*Vr.compositeTextSizes[0].evaluate(Ne,{},ua),Bh*Vr.compositeTextSizes[1].evaluate(Ne,{},ua)],(ii[0]>gm||ii[1]>gm)&&B(k.layerIds[0]+': Value for "text-size" is >= '+Q1+'. Reduce your "text-size".')),k.addSymbols(k.text,Fa,ii,ft,Pe,Ne,Ht,C,It.lineStartIndex,It.lineLength,Zr,ua);for(var $i=0,Oi=er;$igm&&B(k.layerIds[0]+': Value for "icon-size" is >= '+Q1+'. Reduce your "icon-size".')):yp.kind==="composite"&&(ih=[Bh*ln.compositeIconSizes[0].evaluate(Ji,{},Vn),Bh*ln.compositeIconSizes[1].evaluate(Ji,{},Vn)],(ih[0]>gm||ih[1]>gm)&&B(k.layerIds[0]+': Value for "icon-size" is >= '+Q1+'. Reduce your "icon-size".')),k.addSymbols(k.icon,yh,ih,Oi,$i,Ji,!1,C,so.lineStartIndex,so.lineLength,-1,Vn),Zl=k.icon.placedSymbolArray.length-1,gp&&(Ts=gp.length*4,k.addSymbols(k.icon,gp,ih,Oi,$i,Ji,vp.vertical,C,so.lineStartIndex,so.lineLength,-1,Vn),Yl=k.icon.placedSymbolArray.length-1)}for(var _p in oe.horizontal){var nd=oe.horizontal[_p];if(!mo){$u=ye(nd.text);var Uv=ft.layout.get("text-rotate").evaluate(Ji,{},Vn);mo=new hb(It,C,Ht,er,Lr,nd,Zr,Vr,ua,Uv)}var _m=nd.positionedLines.length===1;if(Xl+=kk(k,C,nd,Pe,ft,ua,Ji,Fa,so,oe.vertical?vp.horizontal:vp.horizontalOnly,_m?Object.keys(oe.horizontal):[_p],Ol,Zl,ln,Vn),_m)break}oe.vertical&&(zu+=kk(k,C,oe.vertical,Pe,ft,ua,Ji,Fa,so,vp.vertical,["vertical"],Ol,Yl,ln,Vn));var xm=mo?mo.boxStartIndex:k.collisionBoxArray.length,bm=mo?mo.boxEndIndex:k.collisionBoxArray.length,Wg=Eo?Eo.boxStartIndex:k.collisionBoxArray.length,wd=Eo?Eo.boxEndIndex:k.collisionBoxArray.length,gb=Cs?Cs.boxStartIndex:k.collisionBoxArray.length,xA=Cs?Cs.boxEndIndex:k.collisionBoxArray.length,yb=Ro?Ro.boxStartIndex:k.collisionBoxArray.length,bA=Ro?Ro.boxEndIndex:k.collisionBoxArray.length,hd=-1,Xg=function(r_,Hk){return r_&&r_.circleDiameter?Math.max(r_.circleDiameter,Hk):Hk};hd=Xg(mo,hd),hd=Xg(Eo,hd),hd=Xg(Cs,hd),hd=Xg(Ro,hd);var _b=hd>-1?1:0;_b&&(hd*=Un/en),k.glyphOffsetArray.length>=Du.MAX_GLYPHS&&B("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),Ji.sortKey!==void 0&&k.addToSortKeyRanges(k.symbolInstances.length,Ji.sortKey),k.symbolInstances.emplaceBack(C.x,C.y,Ol.right>=0?Ol.right:-1,Ol.center>=0?Ol.center:-1,Ol.left>=0?Ol.left:-1,Ol.vertical||-1,Zl,Yl,$u,xm,bm,Wg,wd,gb,xA,yb,bA,Ht,Xl,zu,$s,Ts,_b,0,Zr,hc,hf,hd)}function LW(k,C,H,oe){var be=k.compareText;if(!(C in be))be[C]=[];else for(var Pe=be[C],Ne=Pe.length-1;Ne>=0;Ne--)if(oe.dist(Pe[Ne])0)&&(Ne.value.kind!=="constant"||Ne.value.value.length>0),er=It.value.kind!=="constant"||!!It.value.value||Object.keys(It.parameters).length>0,Lr=Pe.get("symbol-sort-key");if(this.features=[],!(!Ht&&!er)){for(var Zr=H.iconDependencies,Vr=H.glyphDependencies,ua=H.availableImages,Fa=new mn(this.zoom),Mi=0,ii=C;Mi=0;for(var zu=0,Zl=Mo.sections;zu=0;It--)Ne[It]={x:H[It].x,y:H[It].y,tileUnitDistanceFromAnchor:Pe},It>0&&(Pe+=H[It-1].dist(H[It]));for(var Ht=0;Ht0},Du.prototype.hasIconData=function(){return this.icon.segments.get().length>0},Du.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},Du.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},Du.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},Du.prototype.addIndicesForPlacedSymbol=function(C,H){for(var oe=C.placedSymbolArray.get(H),be=oe.vertexStartIndex+oe.numGlyphs*4,Pe=oe.vertexStartIndex;Pe1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(C),this.sortedAngle=C,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var oe=0,be=this.symbolInstanceIndexes;oe=0&&Ht.indexOf(ft)===It&&H.addIndicesForPlacedSymbol(H.text,ft)}),Ne.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,Ne.verticalPlacedTextSymbolIndex),Ne.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,Ne.placedIconSymbolIndex),Ne.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,Ne.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},me("SymbolBucket",Du,{omit:["layers","collisionBoxArray","features","compareText"]}),Du.MAX_GLYPHS=65535,Du.addDynamicAttributes=vA;function DW(k,C){return C.replace(/{([^{}]+)}/g,function(H,oe){return oe in k?String(k[oe]):""})}var zW=new va({"symbol-placement":new it(Gi.layout_symbol["symbol-placement"]),"symbol-spacing":new it(Gi.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new it(Gi.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Zt(Gi.layout_symbol["symbol-sort-key"]),"symbol-z-order":new it(Gi.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new it(Gi.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new it(Gi.layout_symbol["icon-ignore-placement"]),"icon-optional":new it(Gi.layout_symbol["icon-optional"]),"icon-rotation-alignment":new it(Gi.layout_symbol["icon-rotation-alignment"]),"icon-size":new Zt(Gi.layout_symbol["icon-size"]),"icon-text-fit":new it(Gi.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new it(Gi.layout_symbol["icon-text-fit-padding"]),"icon-image":new Zt(Gi.layout_symbol["icon-image"]),"icon-rotate":new Zt(Gi.layout_symbol["icon-rotate"]),"icon-padding":new it(Gi.layout_symbol["icon-padding"]),"icon-keep-upright":new it(Gi.layout_symbol["icon-keep-upright"]),"icon-offset":new Zt(Gi.layout_symbol["icon-offset"]),"icon-anchor":new Zt(Gi.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new it(Gi.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new it(Gi.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new it(Gi.layout_symbol["text-rotation-alignment"]),"text-field":new Zt(Gi.layout_symbol["text-field"]),"text-font":new Zt(Gi.layout_symbol["text-font"]),"text-size":new Zt(Gi.layout_symbol["text-size"]),"text-max-width":new Zt(Gi.layout_symbol["text-max-width"]),"text-line-height":new it(Gi.layout_symbol["text-line-height"]),"text-letter-spacing":new Zt(Gi.layout_symbol["text-letter-spacing"]),"text-justify":new Zt(Gi.layout_symbol["text-justify"]),"text-radial-offset":new Zt(Gi.layout_symbol["text-radial-offset"]),"text-variable-anchor":new it(Gi.layout_symbol["text-variable-anchor"]),"text-anchor":new Zt(Gi.layout_symbol["text-anchor"]),"text-max-angle":new it(Gi.layout_symbol["text-max-angle"]),"text-writing-mode":new it(Gi.layout_symbol["text-writing-mode"]),"text-rotate":new Zt(Gi.layout_symbol["text-rotate"]),"text-padding":new it(Gi.layout_symbol["text-padding"]),"text-keep-upright":new it(Gi.layout_symbol["text-keep-upright"]),"text-transform":new Zt(Gi.layout_symbol["text-transform"]),"text-offset":new Zt(Gi.layout_symbol["text-offset"]),"text-allow-overlap":new it(Gi.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new it(Gi.layout_symbol["text-ignore-placement"]),"text-optional":new it(Gi.layout_symbol["text-optional"])}),FW=new va({"icon-opacity":new Zt(Gi.paint_symbol["icon-opacity"]),"icon-color":new Zt(Gi.paint_symbol["icon-color"]),"icon-halo-color":new Zt(Gi.paint_symbol["icon-halo-color"]),"icon-halo-width":new Zt(Gi.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Zt(Gi.paint_symbol["icon-halo-blur"]),"icon-translate":new it(Gi.paint_symbol["icon-translate"]),"icon-translate-anchor":new it(Gi.paint_symbol["icon-translate-anchor"]),"text-opacity":new Zt(Gi.paint_symbol["text-opacity"]),"text-color":new Zt(Gi.paint_symbol["text-color"],{runtimeType:Rs,getOverride:function(k){return k.textColor},hasOverride:function(k){return!!k.textColor}}),"text-halo-color":new Zt(Gi.paint_symbol["text-halo-color"]),"text-halo-width":new Zt(Gi.paint_symbol["text-halo-width"]),"text-halo-blur":new Zt(Gi.paint_symbol["text-halo-blur"]),"text-translate":new it(Gi.paint_symbol["text-translate"]),"text-translate-anchor":new it(Gi.paint_symbol["text-translate-anchor"])}),mA={paint:FW,layout:zW},Vg=function(C){this.type=C.property.overrides?C.property.overrides.runtimeType:il,this.defaultValue=C};Vg.prototype.evaluate=function(C){if(C.formattedSection){var H=this.defaultValue.property.overrides;if(H&&H.hasOverride(C.formattedSection))return H.getOverride(C.formattedSection)}return C.feature&&C.featureState?this.defaultValue.evaluate(C.feature,C.featureState):this.defaultValue.property.specification.default},Vg.prototype.eachChild=function(C){if(!this.defaultValue.isConstant()){var H=this.defaultValue.value;C(H._styleExpression.expression)}},Vg.prototype.outputDefined=function(){return!1},Vg.prototype.serialize=function(){return null},me("FormatSectionOverride",Vg,{omit:["defaultValue"]});var OW=function(k){function C(H){k.call(this,H,mA)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype.recalculate=function(oe,be){if(k.prototype.recalculate.call(this,oe,be),this.layout.get("icon-rotation-alignment")==="auto"&&(this.layout.get("symbol-placement")!=="point"?this.layout._values["icon-rotation-alignment"]="map":this.layout._values["icon-rotation-alignment"]="viewport"),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout.get("symbol-placement")!=="point"?this.layout._values["text-rotation-alignment"]="map":this.layout._values["text-rotation-alignment"]="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 Pe=this.layout.get("text-writing-mode");if(Pe){for(var Ne=[],ft=0,It=Pe;ft",targetMapId:be,sourceMapId:Ne.mapId})}}},Gg.prototype.receive=function(C){var H=C.data,oe=H.id;if(oe&&!(H.targetMapId&&this.mapId!==H.targetMapId))if(H.type===""){delete this.tasks[oe];var be=this.cancelCallbacks[oe];delete this.cancelCallbacks[oe],be&&be()}else ce()||H.mustQueue?(this.tasks[oe]=H,this.taskQueue.push(oe),this.invoker.trigger()):this.processTask(oe,H)},Gg.prototype.process=function(){if(this.taskQueue.length){var C=this.taskQueue.shift(),H=this.tasks[C];delete this.tasks[C],this.taskQueue.length&&this.invoker.trigger(),H&&this.processTask(C,H)}},Gg.prototype.processTask=function(C,H){var oe=this;if(H.type===""){var be=this.callbacks[C];delete this.callbacks[C],be&&(H.error?be(Tt(H.error)):be(null,Tt(H.data)))}else{var Pe=!1,Ne=Y(this.globalScope)?void 0:[],ft=H.hasCallback?function(Zr,Vr){Pe=!0,delete oe.cancelCallbacks[C],oe.target.postMessage({id:C,type:"",sourceMapId:oe.mapId,error:Zr?yt(Zr):null,data:yt(Vr,Ne)},Ne)}:function(Zr){Pe=!0},It=null,Ht=Tt(H.data);if(this.parent[H.type])It=this.parent[H.type](H.sourceMapId,Ht,ft);else if(this.parent.getWorkerSource){var er=H.type.split("."),Lr=this.parent.getWorkerSource(H.sourceMapId,er[0],Ht.source);It=Lr[er[1]](Ht,ft)}else ft(new Error("Could not find function "+H.type));!Pe&&It&&It.cancel&&(this.cancelCallbacks[C]=It.cancel)}},Gg.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};function ZW(k,C,H){C=Math.pow(2,H)-C-1;var oe=Dk(k*256,C*256,H),be=Dk((k+1)*256,(C+1)*256,H);return oe[0]+","+oe[1]+","+be[0]+","+be[1]}function Dk(k,C,H){var oe=2*Math.PI*6378137/256/Math.pow(2,H),be=k*oe-2*Math.PI*6378137/2,Pe=C*oe-2*Math.PI*6378137/2;return[be,Pe]}var Wf=function(C,H){C&&(H?this.setSouthWest(C).setNorthEast(H):C.length===4?this.setSouthWest([C[0],C[1]]).setNorthEast([C[2],C[3]]):this.setSouthWest(C[0]).setNorthEast(C[1]))};Wf.prototype.setNorthEast=function(C){return this._ne=C instanceof Fc?new Fc(C.lng,C.lat):Fc.convert(C),this},Wf.prototype.setSouthWest=function(C){return this._sw=C instanceof Fc?new Fc(C.lng,C.lat):Fc.convert(C),this},Wf.prototype.extend=function(C){var H=this._sw,oe=this._ne,be,Pe;if(C instanceof Fc)be=C,Pe=C;else if(C instanceof Wf){if(be=C._sw,Pe=C._ne,!be||!Pe)return this}else{if(Array.isArray(C))if(C.length===4||C.every(Array.isArray)){var Ne=C;return this.extend(Wf.convert(Ne))}else{var ft=C;return this.extend(Fc.convert(ft))}return this}return!H&&!oe?(this._sw=new Fc(be.lng,be.lat),this._ne=new Fc(Pe.lng,Pe.lat)):(H.lng=Math.min(be.lng,H.lng),H.lat=Math.min(be.lat,H.lat),oe.lng=Math.max(Pe.lng,oe.lng),oe.lat=Math.max(Pe.lat,oe.lat)),this},Wf.prototype.getCenter=function(){return new Fc((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},Wf.prototype.getSouthWest=function(){return this._sw},Wf.prototype.getNorthEast=function(){return this._ne},Wf.prototype.getNorthWest=function(){return new Fc(this.getWest(),this.getNorth())},Wf.prototype.getSouthEast=function(){return new Fc(this.getEast(),this.getSouth())},Wf.prototype.getWest=function(){return this._sw.lng},Wf.prototype.getSouth=function(){return this._sw.lat},Wf.prototype.getEast=function(){return this._ne.lng},Wf.prototype.getNorth=function(){return this._ne.lat},Wf.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},Wf.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},Wf.prototype.isEmpty=function(){return!(this._sw&&this._ne)},Wf.prototype.contains=function(C){var H=Fc.convert(C),oe=H.lng,be=H.lat,Pe=this._sw.lat<=be&&be<=this._ne.lat,Ne=this._sw.lng<=oe&&oe<=this._ne.lng;return this._sw.lng>this._ne.lng&&(Ne=this._sw.lng>=oe&&oe>=this._ne.lng),Pe&&Ne},Wf.convert=function(C){return!C||C instanceof Wf?C:new Wf(C)};var zk=63710088e-1,Fc=function(C,H){if(isNaN(C)||isNaN(H))throw new Error("Invalid LngLat object: ("+C+", "+H+")");if(this.lng=+C,this.lat=+H,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};Fc.prototype.wrap=function(){return new Fc(_(this.lng,-180,180),this.lat)},Fc.prototype.toArray=function(){return[this.lng,this.lat]},Fc.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},Fc.prototype.distanceTo=function(C){var H=Math.PI/180,oe=this.lat*H,be=C.lat*H,Pe=Math.sin(oe)*Math.sin(be)+Math.cos(oe)*Math.cos(be)*Math.cos((C.lng-this.lng)*H),Ne=zk*Math.acos(Math.min(Pe,1));return Ne},Fc.prototype.toBounds=function(C){C===void 0&&(C=0);var H=40075017,oe=360*C/H,be=oe/Math.cos(Math.PI/180*this.lat);return new Wf(new Fc(this.lng-be,this.lat-oe),new Fc(this.lng+be,this.lat+oe))},Fc.convert=function(C){if(C instanceof Fc)return C;if(Array.isArray(C)&&(C.length===2||C.length===3))return new Fc(Number(C[0]),Number(C[1]));if(!Array.isArray(C)&&typeof C=="object"&&C!==null)return new Fc(Number("lng"in C?C.lng:C.lon),Number(C.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 Fk=2*Math.PI*zk;function Ok(k){return Fk*Math.cos(k*Math.PI/180)}function Bk(k){return(180+k)/360}function Nk(k){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+k*Math.PI/360)))/360}function Uk(k,C){return k/Ok(C)}function YW(k){return k*360-180}function yA(k){var C=180-k*360;return 360/Math.PI*Math.atan(Math.exp(C*Math.PI/180))-90}function KW(k,C){return k*Ok(yA(C))}function JW(k){return 1/Math.cos(k*Math.PI/180)}var U0=function(C,H,oe){oe===void 0&&(oe=0),this.x=+C,this.y=+H,this.z=+oe};U0.fromLngLat=function(C,H){H===void 0&&(H=0);var oe=Fc.convert(C);return new U0(Bk(oe.lng),Nk(oe.lat),Uk(H,oe.lat))},U0.prototype.toLngLat=function(){return new Fc(YW(this.x),yA(this.y))},U0.prototype.toAltitude=function(){return KW(this.z,this.y)},U0.prototype.meterInMercatorCoordinateUnits=function(){return 1/Fk*JW(yA(this.y))};var j0=function(C,H,oe){this.z=C,this.x=H,this.y=oe,this.key=t_(0,C,C,H,oe)};j0.prototype.equals=function(C){return this.z===C.z&&this.x===C.x&&this.y===C.y},j0.prototype.url=function(C,H){var oe=ZW(this.x,this.y,this.z),be=$W(this.z,this.x,this.y);return C[(this.x+this.y)%C.length].replace("{prefix}",(this.x%16).toString(16)+(this.y%16).toString(16)).replace("{z}",String(this.z)).replace("{x}",String(this.x)).replace("{y}",String(H==="tms"?Math.pow(2,this.z)-this.y-1:this.y)).replace("{quadkey}",be).replace("{bbox-epsg-3857}",oe)},j0.prototype.getTilePoint=function(C){var H=Math.pow(2,this.z);return new n((C.x*H-this.x)*ui,(C.y*H-this.y)*ui)},j0.prototype.toString=function(){return this.z+"/"+this.x+"/"+this.y};var jk=function(C,H){this.wrap=C,this.canonical=H,this.key=t_(C,H.z,H.z,H.x,H.y)},Xf=function(C,H,oe,be,Pe){this.overscaledZ=C,this.wrap=H,this.canonical=new j0(oe,+be,+Pe),this.key=t_(H,C,oe,be,Pe)};Xf.prototype.equals=function(C){return this.overscaledZ===C.overscaledZ&&this.wrap===C.wrap&&this.canonical.equals(C.canonical)},Xf.prototype.scaledTo=function(C){var H=this.canonical.z-C;return C>this.canonical.z?new Xf(C,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Xf(C,this.wrap,C,this.canonical.x>>H,this.canonical.y>>H)},Xf.prototype.calculateScaledKey=function(C,H){var oe=this.canonical.z-C;return C>this.canonical.z?t_(this.wrap*+H,C,this.canonical.z,this.canonical.x,this.canonical.y):t_(this.wrap*+H,C,C,this.canonical.x>>oe,this.canonical.y>>oe)},Xf.prototype.isChildOf=function(C){if(C.wrap!==this.wrap)return!1;var H=this.canonical.z-C.canonical.z;return C.overscaledZ===0||C.overscaledZ>H&&C.canonical.y===this.canonical.y>>H},Xf.prototype.children=function(C){if(this.overscaledZ>=C)return[new Xf(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var H=this.canonical.z+1,oe=this.canonical.x*2,be=this.canonical.y*2;return[new Xf(H,this.wrap,H,oe,be),new Xf(H,this.wrap,H,oe+1,be),new Xf(H,this.wrap,H,oe,be+1),new Xf(H,this.wrap,H,oe+1,be+1)]},Xf.prototype.isLessThan=function(C){return this.wrapC.wrap?!1:this.overscaledZC.overscaledZ?!1:this.canonical.xC.canonical.x?!1:this.canonical.y0;Pe--)be=1<=this.dim+1||H<-1||H>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(H+1)*this.stride+(C+1)},Bv.prototype._unpackMapbox=function(C,H,oe){return(C*256*256+H*256+oe)/10-1e4},Bv.prototype._unpackTerrarium=function(C,H,oe){return C*256+H+oe/256-32768},Bv.prototype.getPixels=function(){return new eh({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},Bv.prototype.backfillBorder=function(C,H,oe){if(this.dim!==C.dim)throw new Error("dem dimension mismatch");var be=H*this.dim,Pe=H*this.dim+this.dim,Ne=oe*this.dim,ft=oe*this.dim+this.dim;switch(H){case-1:be=Pe-1;break;case 1:Pe=be+1;break}switch(oe){case-1:Ne=ft-1;break;case 1:ft=Ne+1;break}for(var It=-H*this.dim,Ht=-oe*this.dim,er=Ne;er=0&&Lr[3]>=0&&It.insert(ft,Lr[0],Lr[1],Lr[2],Lr[3])}},Nv.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new Xd.VectorTile(new vo(this.rawTileData)).layers,this.sourceLayerCoder=new vb(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},Nv.prototype.query=function(C,H,oe,be){var Pe=this;this.loadVTLayers();for(var Ne=C.params||{},ft=ui/C.tileSize/C.scale,It=$e(Ne.filter),Ht=C.queryGeometry,er=C.queryPadding*ft,Lr=Vk(Ht),Zr=this.grid.query(Lr.minX-er,Lr.minY-er,Lr.maxX+er,Lr.maxY+er),Vr=Vk(C.cameraQueryGeometry),ua=this.grid3D.query(Vr.minX-er,Vr.minY-er,Vr.maxX+er,Vr.maxY+er,function(wn,Vn,Un,Mo){return td(C.cameraQueryGeometry,wn-er,Vn-er,Un+er,Mo+er)}),Fa=0,Mi=ua;Fabe)Pe=!1;else if(!H)Pe=!0;else if(this.expirationTime=Rr.maxzoom)&&Rr.visibility!=="none"){h(xr,this.zoom,Jt);var Ur=$a[Rr.id]=Rr.createBucket({index:Ba.bucketLayerIDs.length,layers:xr,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:an,sourceID:this.source});Ur.populate(tn,Za,this.tileID.canonical),Ba.bucketLayerIDs.push(xr.map(function(la){return la.id}))}}}}var Hr,gt,Xt,vr,Or=e.mapObject(Za.glyphDependencies,function(la){return Object.keys(la).map(Number)});Object.keys(Or).length?Fr.send("getGlyphs",{uid:this.uid,stacks:Or},function(la,_a){Hr||(Hr=la,gt=_a,ma.call(ra))}):gt={};var ba=Object.keys(Za.iconDependencies);ba.length?Fr.send("getImages",{icons:ba,source:this.source,tileID:this.tileID,type:"icons"},function(la,_a){Hr||(Hr=la,Xt=_a,ma.call(ra))}):Xt={};var Pa=Object.keys(Za.patternDependencies);Pa.length?Fr.send("getImages",{icons:Pa,source:this.source,tileID:this.tileID,type:"patterns"},function(la,_a){Hr||(Hr=la,vr=_a,ma.call(ra))}):vr={},ma.call(this);function ma(){if(Hr)return ta(Hr);if(gt&&Xt&&vr){var la=new i(gt),_a=new e.ImageAtlas(Xt,vr);for(var Ai in $a){var ki=$a[Ai];ki instanceof e.SymbolBucket?(h(ki.layers,this.zoom,Jt),e.performSymbolLayout(ki,gt,la.positions,Xt,_a.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):ki.hasPattern&&(ki instanceof e.LineBucket||ki instanceof e.FillBucket||ki instanceof e.FillExtrusionBucket)&&(h(ki.layers,this.zoom,Jt),ki.addFeatures(Za,this.tileID.canonical,_a.patternPositions))}this.status="done",ta(null,{buckets:e.values($a).filter(function(Ki){return!Ki.isEmpty()}),featureIndex:Ba,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:la.image,imageAtlas:_a,glyphMap:this.returnDependencies?gt:null,iconMap:this.returnDependencies?Xt:null,glyphPositions:this.returnDependencies?la.positions:null})}}};function h(Kt,Dt,Yt){for(var Jt=new e.EvaluationParameters(Dt),Fr=0,ta=Kt;Fr=0!=!!Dt&&Kt.reverse()}var M=e.vectorTile.VectorTileFeature.prototype.toGeoJSON,g=function(Dt){this._feature=Dt,this.extent=e.EXTENT,this.type=Dt.type,this.properties=Dt.tags,"id"in Dt&&!isNaN(Dt.id)&&(this.id=parseInt(Dt.id,10))};g.prototype.loadGeometry=function(){if(this._feature.type===1){for(var Dt=[],Yt=0,Jt=this._feature.geometry;Yt"u"&&(Jt.push(ca),Ba=Jt.length-1,ta[ca]=Ba),Dt.writeVarint(Ba);var $a=Yt.properties[ca],Za=typeof $a;Za!=="string"&&Za!=="boolean"&&Za!=="number"&&($a=JSON.stringify($a));var ri=Za+":"+$a,pi=ra[ri];typeof pi>"u"&&(Fr.push($a),pi=Fr.length-1,ra[ri]=pi),Dt.writeVarint(pi)}}function $(Kt,Dt){return(Dt<<3)+(Kt&7)}function le(Kt){return Kt<<1^Kt>>31}function ce(Kt,Dt){for(var Yt=Kt.loadGeometry(),Jt=Kt.type,Fr=0,ta=0,ra=Yt.length,ca=0;ca>1;Y(Kt,Dt,ra,Jt,Fr,ta%2),G(Kt,Dt,Yt,Jt,ra-1,ta+1),G(Kt,Dt,Yt,ra+1,Fr,ta+1)}}function Y(Kt,Dt,Yt,Jt,Fr,ta){for(;Fr>Jt;){if(Fr-Jt>600){var ra=Fr-Jt+1,ca=Yt-Jt+1,Ba=Math.log(ra),$a=.5*Math.exp(2*Ba/3),Za=.5*Math.sqrt(Ba*$a*(ra-$a)/ra)*(ca-ra/2<0?-1:1),ri=Math.max(Jt,Math.floor(Yt-ca*$a/ra+Za)),pi=Math.min(Fr,Math.floor(Yt+(ra-ca)*$a/ra+Za));Y(Kt,Dt,Yt,ri,pi,ta)}var Ra=Dt[2*Yt+ta],an=Jt,tn=Fr;for(ee(Kt,Dt,Jt,Yt),Dt[2*Fr+ta]>Ra&&ee(Kt,Dt,Jt,Fr);anRa;)tn--}Dt[2*Jt+ta]===Ra?ee(Kt,Dt,Jt,tn):(tn++,ee(Kt,Dt,tn,Fr)),tn<=Yt&&(Jt=tn+1),Yt<=tn&&(Fr=tn-1)}}function ee(Kt,Dt,Yt,Jt){q(Kt,Yt,Jt),q(Dt,2*Yt,2*Jt),q(Dt,2*Yt+1,2*Jt+1)}function q(Kt,Dt,Yt){var Jt=Kt[Dt];Kt[Dt]=Kt[Yt],Kt[Yt]=Jt}function se(Kt,Dt,Yt,Jt,Fr,ta,ra){for(var ca=[0,Kt.length-1,0],Ba=[],$a,Za;ca.length;){var ri=ca.pop(),pi=ca.pop(),Ra=ca.pop();if(pi-Ra<=ra){for(var an=Ra;an<=pi;an++)$a=Dt[2*an],Za=Dt[2*an+1],$a>=Yt&&$a<=Fr&&Za>=Jt&&Za<=ta&&Ba.push(Kt[an]);continue}var tn=Math.floor((Ra+pi)/2);$a=Dt[2*tn],Za=Dt[2*tn+1],$a>=Yt&&$a<=Fr&&Za>=Jt&&Za<=ta&&Ba.push(Kt[tn]);var fn=(ri+1)%2;(ri===0?Yt<=$a:Jt<=Za)&&(ca.push(Ra),ca.push(tn-1),ca.push(fn)),(ri===0?Fr>=$a:ta>=Za)&&(ca.push(tn+1),ca.push(pi),ca.push(fn))}return Ba}function ae(Kt,Dt,Yt,Jt,Fr,ta){for(var ra=[0,Kt.length-1,0],ca=[],Ba=Fr*Fr;ra.length;){var $a=ra.pop(),Za=ra.pop(),ri=ra.pop();if(Za-ri<=ta){for(var pi=ri;pi<=Za;pi++)j(Dt[2*pi],Dt[2*pi+1],Yt,Jt)<=Ba&&ca.push(Kt[pi]);continue}var Ra=Math.floor((ri+Za)/2),an=Dt[2*Ra],tn=Dt[2*Ra+1];j(an,tn,Yt,Jt)<=Ba&&ca.push(Kt[Ra]);var fn=($a+1)%2;($a===0?Yt-Fr<=an:Jt-Fr<=tn)&&(ra.push(ri),ra.push(Ra-1),ra.push(fn)),($a===0?Yt+Fr>=an:Jt+Fr>=tn)&&(ra.push(Ra+1),ra.push(Za),ra.push(fn))}return ca}function j(Kt,Dt,Yt,Jt){var Fr=Kt-Yt,ta=Dt-Jt;return Fr*Fr+ta*ta}var Q=function(Kt){return Kt[0]},re=function(Kt){return Kt[1]},pe=function(Dt,Yt,Jt,Fr,ta){Yt===void 0&&(Yt=Q),Jt===void 0&&(Jt=re),Fr===void 0&&(Fr=64),ta===void 0&&(ta=Float64Array),this.nodeSize=Fr,this.points=Dt;for(var ra=Dt.length<65536?Uint16Array:Uint32Array,ca=this.ids=new ra(Dt.length),Ba=this.coords=new ta(Dt.length*2),$a=0;$a=Fr;Za--){var ri=+Date.now();Ba=this._cluster(Ba,Za),this.trees[Za]=new pe(Ba,ne,Ce,ra,Float32Array),Jt&&console.log("z%d: %d clusters in %dms",Za,Ba.length,+Date.now()-ri)}return Jt&&console.timeEnd("total time"),this},Se.prototype.getClusters=function(Dt,Yt){var Jt=((Dt[0]+180)%360+360)%360-180,Fr=Math.max(-90,Math.min(90,Dt[1])),ta=Dt[2]===180?180:((Dt[2]+180)%360+360)%360-180,ra=Math.max(-90,Math.min(90,Dt[3]));if(Dt[2]-Dt[0]>=360)Jt=-180,ta=180;else if(Jt>ta){var ca=this.getClusters([Jt,Fr,180,ra],Yt),Ba=this.getClusters([-180,Fr,ta,ra],Yt);return ca.concat(Ba)}for(var $a=this.trees[this._limitZoom(Yt)],Za=$a.range(nt(Jt),tt(ra),nt(ta),tt(Fr)),ri=[],pi=0,Ra=Za;piYt&&(tn+=Br.numPoints||1)}if(tn>=Ba){for(var Cr=ri.x*an,xr=ri.y*an,Rr=ca&&an>1?this._map(ri,!0):null,Ur=(Za<<5)+(Yt+1)+this.points.length,Hr=0,gt=Ra;Hr1)for(var ba=0,Pa=Ra;ba>5},Se.prototype._getOriginZoom=function(Dt){return(Dt-this.points.length)%32},Se.prototype._map=function(Dt,Yt){if(Dt.numPoints)return Yt?ue({},Dt.properties):Dt.properties;var Jt=this.points[Dt.index].properties,Fr=this.options.map(Jt);return Yt&&Fr===Jt?ue({},Fr):Fr};function Ie(Kt,Dt,Yt,Jt,Fr){return{x:Kt,y:Dt,zoom:1/0,id:Yt,parentId:-1,numPoints:Jt,properties:Fr}}function Re(Kt,Dt){var Yt=Kt.geometry.coordinates,Jt=Yt[0],Fr=Yt[1];return{x:nt(Jt),y:tt(Fr),zoom:1/0,index:Dt,parentId:-1}}function We(Kt){return{type:"Feature",id:Kt.id,properties:at(Kt),geometry:{type:"Point",coordinates:[qe(Kt.x),he(Kt.y)]}}}function at(Kt){var Dt=Kt.numPoints,Yt=Dt>=1e4?Math.round(Dt/1e3)+"k":Dt>=1e3?Math.round(Dt/100)/10+"k":Dt;return ue(ue({},Kt.properties),{cluster:!0,cluster_id:Kt.id,point_count:Dt,point_count_abbreviated:Yt})}function nt(Kt){return Kt/360+.5}function tt(Kt){var Dt=Math.sin(Kt*Math.PI/180),Yt=.5-.25*Math.log((1+Dt)/(1-Dt))/Math.PI;return Yt<0?0:Yt>1?1:Yt}function qe(Kt){return(Kt-.5)*360}function he(Kt){var Dt=(180-Kt*360)*Math.PI/180;return 360*Math.atan(Math.exp(Dt))/Math.PI-90}function ue(Kt,Dt){for(var Yt in Dt)Kt[Yt]=Dt[Yt];return Kt}function ne(Kt){return Kt.x}function Ce(Kt){return Kt.y}function Ye(Kt,Dt,Yt,Jt){for(var Fr=Jt,ta=Yt-Dt>>1,ra=Yt-Dt,ca,Ba=Kt[Dt],$a=Kt[Dt+1],Za=Kt[Yt],ri=Kt[Yt+1],pi=Dt+3;piFr)ca=pi,Fr=Ra;else if(Ra===Fr){var an=Math.abs(pi-ta);anJt&&(ca-Dt>3&&Ye(Kt,Dt,ca,Jt),Kt[ca+2]=Fr,Yt-ca>3&&Ye(Kt,ca,Yt,Jt))}function rt(Kt,Dt,Yt,Jt,Fr,ta){var ra=Fr-Yt,ca=ta-Jt;if(ra!==0||ca!==0){var Ba=((Kt-Yt)*ra+(Dt-Jt)*ca)/(ra*ra+ca*ca);Ba>1?(Yt=Fr,Jt=ta):Ba>0&&(Yt+=ra*Ba,Jt+=ca*Ba)}return ra=Kt-Yt,ca=Dt-Jt,ra*ra+ca*ca}function Ke(Kt,Dt,Yt,Jt){var Fr={id:typeof Kt>"u"?null:Kt,type:Dt,geometry:Yt,tags:Jt,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return Mt(Fr),Fr}function Mt(Kt){var Dt=Kt.geometry,Yt=Kt.type;if(Yt==="Point"||Yt==="MultiPoint"||Yt==="LineString")kt(Kt,Dt);else if(Yt==="Polygon"||Yt==="MultiLineString")for(var Jt=0;Jt0&&(Jt?ra+=(Fr*$a-Ba*ta)/2:ra+=Math.sqrt(Math.pow(Ba-Fr,2)+Math.pow($a-ta,2))),Fr=Ba,ta=$a}var Za=Dt.length-3;Dt[2]=1,Ye(Dt,0,Za,Yt),Dt[Za+2]=1,Dt.size=Math.abs(ra),Dt.start=0,Dt.end=Dt.size}function qr(Kt,Dt,Yt,Jt){for(var Fr=0;Fr1?1:Yt}function _t(Kt,Dt,Yt,Jt,Fr,ta,ra,ca){if(Yt/=Dt,Jt/=Dt,ta>=Yt&&ra=Jt)return null;for(var Ba=[],$a=0;$a=Yt&&an=Jt)continue;var tn=[];if(pi==="Point"||pi==="MultiPoint")Oe(ri,tn,Yt,Jt,Fr);else if(pi==="LineString")Je(ri,tn,Yt,Jt,Fr,!1,ca.lineMetrics);else if(pi==="MultiLineString")Le(ri,tn,Yt,Jt,Fr,!1);else if(pi==="Polygon")Le(ri,tn,Yt,Jt,Fr,!0);else if(pi==="MultiPolygon")for(var fn=0;fn=Yt&&ra<=Jt&&(Dt.push(Kt[ta]),Dt.push(Kt[ta+1]),Dt.push(Kt[ta+2]))}}function Je(Kt,Dt,Yt,Jt,Fr,ta,ra){for(var ca=Ae(Kt),Ba=Fr===0?Ze:st,$a=Kt.start,Za,ri,pi=0;piYt&&(ri=Ba(ca,Ra,an,fn,xt,Yt),ra&&(ca.start=$a+Za*ri)):lt>Jt?Br=Yt&&(ri=Ba(ca,Ra,an,fn,xt,Yt),Cr=!0),Br>Jt&<<=Jt&&(ri=Ba(ca,Ra,an,fn,xt,Jt),Cr=!0),!ta&&Cr&&(ra&&(ca.end=$a+Za*ri),Dt.push(ca),ca=Ae(Kt)),ra&&($a+=Za)}var xr=Kt.length-3;Ra=Kt[xr],an=Kt[xr+1],tn=Kt[xr+2],lt=Fr===0?Ra:an,lt>=Yt&<<=Jt&&Ue(ca,Ra,an,tn),xr=ca.length-3,ta&&xr>=3&&(ca[xr]!==ca[0]||ca[xr+1]!==ca[1])&&Ue(ca,ca[0],ca[1],ca[2]),ca.length&&Dt.push(ca)}function Ae(Kt){var Dt=[];return Dt.size=Kt.size,Dt.start=Kt.start,Dt.end=Kt.end,Dt}function Le(Kt,Dt,Yt,Jt,Fr,ta){for(var ra=0;rara.maxX&&(ra.maxX=Za),ri>ra.maxY&&(ra.maxY=ri)}return ra}function ur(Kt,Dt,Yt,Jt){var Fr=Dt.geometry,ta=Dt.type,ra=[];if(ta==="Point"||ta==="MultiPoint")for(var ca=0;ca0&&Dt.size<(Fr?ra:Jt)){Yt.numPoints+=Dt.length/3;return}for(var ca=[],Ba=0;Bara)&&(Yt.numSimplified++,ca.push(Dt[Ba]),ca.push(Dt[Ba+1])),Yt.numPoints++;Fr&&Pr(ca,ta),Kt.push(ca)}function Pr(Kt,Dt){for(var Yt=0,Jt=0,Fr=Kt.length,ta=Fr-2;Jt0===Dt)for(Jt=0,Fr=Kt.length;Jt24)throw new Error("maxZoom should be in the 0-24 range");if(Dt.promoteId&&Dt.generateId)throw new Error("promoteId and generateId cannot be used together.");var Jt=Nt(Kt,Dt);this.tiles={},this.tileCoords=[],Yt&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",Dt.indexMaxZoom,Dt.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),Jt=ut(Jt,Dt),Jt.length&&this.splitTile(Jt,0,0,0),Yt&&(Jt.length&&console.log("features: %d, points: %d",this.tiles[0].numFeatures,this.tiles[0].numPoints),console.timeEnd("generate tiles"),console.log("tiles generated:",this.total,JSON.stringify(this.stats)))}Oa.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},Oa.prototype.splitTile=function(Kt,Dt,Yt,Jt,Fr,ta,ra){for(var ca=[Kt,Dt,Yt,Jt],Ba=this.options,$a=Ba.debug;ca.length;){Jt=ca.pop(),Yt=ca.pop(),Dt=ca.pop(),Kt=ca.pop();var Za=1<1&&console.time("creation"),pi=this.tiles[ri]=fr(Kt,Dt,Yt,Jt,Ba),this.tileCoords.push({z:Dt,x:Yt,y:Jt}),$a)){$a>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",Dt,Yt,Jt,pi.numFeatures,pi.numPoints,pi.numSimplified),console.timeEnd("creation"));var Ra="z"+Dt;this.stats[Ra]=(this.stats[Ra]||0)+1,this.total++}if(pi.source=Kt,Fr){if(Dt===Ba.maxZoom||Dt===Fr)continue;var an=1<1&&console.time("clipping");var tn=.5*Ba.buffer/Ba.extent,fn=.5-tn,xt=.5+tn,lt=1+tn,Br,Cr,xr,Rr,Ur,Hr;Br=Cr=xr=Rr=null,Ur=_t(Kt,Za,Yt-tn,Yt+xt,0,pi.minX,pi.maxX,Ba),Hr=_t(Kt,Za,Yt+fn,Yt+lt,0,pi.minX,pi.maxX,Ba),Kt=null,Ur&&(Br=_t(Ur,Za,Jt-tn,Jt+xt,1,pi.minY,pi.maxY,Ba),Cr=_t(Ur,Za,Jt+fn,Jt+lt,1,pi.minY,pi.maxY,Ba),Ur=null),Hr&&(xr=_t(Hr,Za,Jt-tn,Jt+xt,1,pi.minY,pi.maxY,Ba),Rr=_t(Hr,Za,Jt+fn,Jt+lt,1,pi.minY,pi.maxY,Ba),Hr=null),$a>1&&console.timeEnd("clipping"),ca.push(Br||[],Dt+1,Yt*2,Jt*2),ca.push(Cr||[],Dt+1,Yt*2,Jt*2+1),ca.push(xr||[],Dt+1,Yt*2+1,Jt*2),ca.push(Rr||[],Dt+1,Yt*2+1,Jt*2+1)}}},Oa.prototype.getTile=function(Kt,Dt,Yt){var Jt=this.options,Fr=Jt.extent,ta=Jt.debug;if(Kt<0||Kt>24)return null;var ra=1<1&&console.log("drilling down to z%d-%d-%d",Kt,Dt,Yt);for(var Ba=Kt,$a=Dt,Za=Yt,ri;!ri&&Ba>0;)Ba--,$a=Math.floor($a/2),Za=Math.floor(Za/2),ri=this.tiles[Ia(Ba,$a,Za)];return!ri||!ri.source?null:(ta>1&&console.log("found parent tile z%d-%d-%d",Ba,$a,Za),ta>1&&console.time("drilling down"),this.splitTile(ri.source,Ba,$a,Za,Kt,Dt,Yt),ta>1&&console.timeEnd("drilling down"),this.tiles[ca]?Pt(this.tiles[ca],Fr):null)};function Ia(Kt,Dt,Yt){return((1<=0?0:ge.button},r.remove=function(ge){ge.parentNode&&ge.parentNode.removeChild(ge)};function c(ge,K,xe){var te,ye,je,ke=e.browser.devicePixelRatio>1?"@2x":"",Qe=e.getJSON(K.transformRequest(K.normalizeSpriteURL(ge,ke,".json"),e.ResourceType.SpriteJSON),function(wr,Nr){Qe=null,je||(je=wr,te=Nr,qt())}),vt=e.getImage(K.transformRequest(K.normalizeSpriteURL(ge,ke,".png"),e.ResourceType.SpriteImage),function(wr,Nr){vt=null,je||(je=wr,ye=Nr,qt())});function qt(){if(je)xe(je);else if(te&&ye){var wr=e.browser.getImageData(ye),Nr={};for(var pr in te){var mt=te[pr],St=mt.width,Ft=mt.height,rr=mt.x,hr=mt.y,nr=mt.sdf,dr=mt.pixelRatio,or=mt.stretchX,Wt=mt.stretchY,ir=mt.content,Vt=new e.RGBAImage({width:St,height:Ft});e.RGBAImage.copy(wr,Vt,{x:rr,y:hr},{x:0,y:0},{width:St,height:Ft}),Nr[pr]={data:Vt,pixelRatio:dr,sdf:nr,stretchX:or,stretchY:Wt,content:ir}}xe(null,Nr)}}return{cancel:function(){Qe&&(Qe.cancel(),Qe=null),vt&&(vt.cancel(),vt=null)}}}function T(ge){var K=ge.userImage;if(K&&K.render){var xe=K.render();if(xe)return ge.data.replace(new Uint8Array(K.data.buffer)),!0}return!1}var l=1,_=function(ge){function K(){ge.call(this),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new e.RGBAImage({width:1,height:1}),this.dirty=!0}return ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K,K.prototype.isLoaded=function(){return this.loaded},K.prototype.setLoaded=function(te){if(this.loaded!==te&&(this.loaded=te,te)){for(var ye=0,je=this.requestors;ye=0?1.2:1))}b.prototype.draw=function(ge){this.ctx.clearRect(0,0,this.size,this.size),this.ctx.fillText(ge,this.buffer,this.middle);for(var K=this.ctx.getImageData(0,0,this.size,this.size),xe=new Uint8ClampedArray(this.size*this.size),te=0;te65535){wr(new Error("glyphs > 65535 not supported"));return}if(mt.ranges[Ft]){wr(null,{stack:Nr,id:pr,glyph:St});return}var rr=mt.requests[Ft];rr||(rr=mt.requests[Ft]=[],y.loadGlyphRange(Nr,Ft,te.url,te.requestManager,function(hr,nr){if(nr){for(var dr in nr)te._doesCharSupportLocalGlyph(+dr)||(mt.glyphs[+dr]=nr[+dr]);mt.ranges[Ft]=!0}for(var or=0,Wt=rr;or1&&(qt=K[++vt]);var Nr=Math.abs(wr-qt.left),pr=Math.abs(wr-qt.right),mt=Math.min(Nr,pr),St=void 0,Ft=je/te*(ye+1);if(qt.isDash){var rr=ye-Math.abs(Ft);St=Math.sqrt(mt*mt+rr*rr)}else St=ye-Math.sqrt(mt*mt+Ft*Ft);this.data[Qe+wr]=Math.max(0,Math.min(255,St+128))}},F.prototype.addRegularDash=function(K){for(var xe=K.length-1;xe>=0;--xe){var te=K[xe],ye=K[xe+1];te.zeroLength?K.splice(xe,1):ye&&ye.isDash===te.isDash&&(ye.left=te.left,K.splice(xe,1))}var je=K[0],ke=K[K.length-1];je.isDash===ke.isDash&&(je.left=ke.left-this.width,ke.right=je.right+this.width);for(var Qe=this.width*this.nextRow,vt=0,qt=K[vt],wr=0;wr1&&(qt=K[++vt]);var Nr=Math.abs(wr-qt.left),pr=Math.abs(wr-qt.right),mt=Math.min(Nr,pr),St=qt.isDash?mt:-mt;this.data[Qe+wr]=Math.max(0,Math.min(255,St+128))}},F.prototype.addDash=function(K,xe){var te=xe?7:0,ye=2*te+1;if(this.nextRow+ye>this.height)return e.warnOnce("LineAtlas out of space"),null;for(var je=0,ke=0;ke=te.minX&&K.x=te.minY&&K.y0&&(wr[new e.OverscaledTileID(te.overscaledZ,Qe,ye.z,ke,ye.y-1).key]={backfilled:!1},wr[new e.OverscaledTileID(te.overscaledZ,te.wrap,ye.z,ye.x,ye.y-1).key]={backfilled:!1},wr[new e.OverscaledTileID(te.overscaledZ,qt,ye.z,vt,ye.y-1).key]={backfilled:!1}),ye.y+10&&(je.resourceTiming=te._resourceTiming,te._resourceTiming=[]),te.fire(new e.Event("data",je))})},K.prototype.onAdd=function(te){this.map=te,this.load()},K.prototype.setData=function(te){var ye=this;return this._data=te,this.fire(new e.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(je){if(je){ye.fire(new e.ErrorEvent(je));return}var ke={dataType:"source",sourceDataType:"content"};ye._collectResourceTiming&&ye._resourceTiming&&ye._resourceTiming.length>0&&(ke.resourceTiming=ye._resourceTiming,ye._resourceTiming=[]),ye.fire(new e.Event("data",ke))}),this},K.prototype.getClusterExpansionZoom=function(te,ye){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:te,source:this.id},ye),this},K.prototype.getClusterChildren=function(te,ye){return this.actor.send("geojson.getClusterChildren",{clusterId:te,source:this.id},ye),this},K.prototype.getClusterLeaves=function(te,ye,je,ke){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:te,limit:ye,offset:je},ke),this},K.prototype._updateWorkerData=function(te){var ye=this;this._loaded=!1;var je=e.extend({},this.workerOptions),ke=this._data;typeof ke=="string"?(je.request=this.map._requestManager.transformRequest(e.browser.resolveURL(ke),e.ResourceType.Source),je.request.collectResourceTiming=this._collectResourceTiming):je.data=JSON.stringify(ke),this.actor.send(this.type+".loadData",je,function(Qe,vt){ye._removed||vt&&vt.abandoned||(ye._loaded=!0,vt&&vt.resourceTiming&&vt.resourceTiming[ye.id]&&(ye._resourceTiming=vt.resourceTiming[ye.id].slice(0)),ye.actor.send(ye.type+".coalesce",{source:je.source},null),te(Qe))})},K.prototype.loaded=function(){return this._loaded},K.prototype.loadTile=function(te,ye){var je=this,ke=te.actor?"reloadTile":"loadTile";te.actor=this.actor;var Qe={type:this.type,uid:te.uid,tileID:te.tileID,zoom:te.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:e.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};te.request=this.actor.send(ke,Qe,function(vt,qt){return delete te.request,te.unloadVectorData(),te.aborted?ye(null):vt?ye(vt):(te.loadVectorData(qt,je.map.painter,ke==="reloadTile"),ye(null))})},K.prototype.abortTile=function(te){te.request&&(te.request.cancel(),delete te.request),te.aborted=!0},K.prototype.unloadTile=function(te){te.unloadVectorData(),this.actor.send("removeTile",{uid:te.uid,type:this.type,source:this.id})},K.prototype.onRemove=function(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})},K.prototype.serialize=function(){return e.extend({},this._options,{type:this.type,data:this._data})},K.prototype.hasTransition=function(){return!1},K}(e.Evented),le=e.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),ce=function(ge){function K(xe,te,ye,je){ge.call(this),this.id=xe,this.dispatcher=ye,this.coordinates=te.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(je),this.options=te}return ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K,K.prototype.load=function(te,ye){var je=this;this._loaded=!1,this.fire(new e.Event("dataloading",{dataType:"source"})),this.url=this.options.url,e.getImage(this.map._requestManager.transformRequest(this.url,e.ResourceType.Image),function(ke,Qe){je._loaded=!0,ke?je.fire(new e.ErrorEvent(ke)):Qe&&(je.image=Qe,te&&(je.coordinates=te),ye&&ye(),je._finishLoading())})},K.prototype.loaded=function(){return this._loaded},K.prototype.updateImage=function(te){var ye=this;return!this.image||!te.url?this:(this.options.url=te.url,this.load(te.coordinates,function(){ye.texture=null}),this)},K.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new e.Event("data",{dataType:"source",sourceDataType:"metadata"})))},K.prototype.onAdd=function(te){this.map=te,this.load()},K.prototype.setCoordinates=function(te){var ye=this;this.coordinates=te;var je=te.map(e.MercatorCoordinate.fromLngLat);this.tileID=de(je),this.minzoom=this.maxzoom=this.tileID.z;var ke=je.map(function(Qe){return ye.tileID.getTilePoint(Qe)._round()});return this._boundsArray=new e.StructArrayLayout4i8,this._boundsArray.emplaceBack(ke[0].x,ke[0].y,0,0),this._boundsArray.emplaceBack(ke[1].x,ke[1].y,e.EXTENT,0),this._boundsArray.emplaceBack(ke[3].x,ke[3].y,0,e.EXTENT),this._boundsArray.emplaceBack(ke[2].x,ke[2].y,e.EXTENT,e.EXTENT),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new e.Event("data",{dataType:"source",sourceDataType:"content"})),this},K.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||!this.image)){var te=this.map.painter.context,ye=te.gl;this.boundsBuffer||(this.boundsBuffer=te.createVertexBuffer(this._boundsArray,le.members)),this.boundsSegments||(this.boundsSegments=e.SegmentVector.simpleSegment(0,0,4,2)),this.texture||(this.texture=new e.Texture(te,this.image,ye.RGBA),this.texture.bind(ye.LINEAR,ye.CLAMP_TO_EDGE));for(var je in this.tiles){var ke=this.tiles[je];ke.state!=="loaded"&&(ke.state="loaded",ke.texture=this.texture)}}},K.prototype.loadTile=function(te,ye){this.tileID&&this.tileID.equals(te.tileID.canonical)?(this.tiles[String(te.tileID.wrap)]=te,te.buckets={},ye(null)):(te.state="errored",ye(null))},K.prototype.serialize=function(){return{type:"image",url:this.options.url,coordinates:this.coordinates}},K.prototype.hasTransition=function(){return!1},K}(e.Evented);function de(ge){for(var K=1/0,xe=1/0,te=-1/0,ye=-1/0,je=0,ke=ge;jeye.end(0)?this.fire(new e.ErrorEvent(new e.ValidationError("sources."+this.id,null,"Playback for this video can be set only between the "+ye.start(0)+" and "+ye.end(0)+"-second mark."))):this.video.currentTime=te}},K.prototype.getVideo=function(){return this.video},K.prototype.onAdd=function(te){this.map||(this.map=te,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},K.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||this.video.readyState<2)){var te=this.map.painter.context,ye=te.gl;this.boundsBuffer||(this.boundsBuffer=te.createVertexBuffer(this._boundsArray,le.members)),this.boundsSegments||(this.boundsSegments=e.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(ye.LINEAR,ye.CLAMP_TO_EDGE),ye.texSubImage2D(ye.TEXTURE_2D,0,0,0,ye.RGBA,ye.UNSIGNED_BYTE,this.video)):(this.texture=new e.Texture(te,this.video,ye.RGBA),this.texture.bind(ye.LINEAR,ye.CLAMP_TO_EDGE));for(var je in this.tiles){var ke=this.tiles[je];ke.state!=="loaded"&&(ke.state="loaded",ke.texture=this.texture)}}},K.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},K.prototype.hasTransition=function(){return this.video&&!this.video.paused},K}(ce),Y=function(ge){function K(xe,te,ye,je){ge.call(this,xe,te,ye,je),te.coordinates?(!Array.isArray(te.coordinates)||te.coordinates.length!==4||te.coordinates.some(function(ke){return!Array.isArray(ke)||ke.length!==2||ke.some(function(Qe){return typeof Qe!="number"})}))&&this.fire(new e.ErrorEvent(new e.ValidationError("sources."+xe,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new e.ErrorEvent(new e.ValidationError("sources."+xe,null,'missing required property "coordinates"'))),te.animate&&typeof te.animate!="boolean"&&this.fire(new e.ErrorEvent(new e.ValidationError("sources."+xe,null,'optional "animate" property must be a boolean value'))),te.canvas?typeof te.canvas!="string"&&!(te.canvas instanceof e.window.HTMLCanvasElement)&&this.fire(new e.ErrorEvent(new e.ValidationError("sources."+xe,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 e.ErrorEvent(new e.ValidationError("sources."+xe,null,'missing required property "canvas"'))),this.options=te,this.animate=te.animate!==void 0?te.animate:!0}return ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K,K.prototype.load=function(){if(this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof e.window.HTMLCanvasElement?this.options.canvas:e.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()){this.fire(new e.ErrorEvent(new Error("Canvas dimensions cannot be less than or equal to zero.")));return}this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading()},K.prototype.getCanvas=function(){return this.canvas},K.prototype.onAdd=function(te){this.map=te,this.load(),this.canvas&&this.animate&&this.play()},K.prototype.onRemove=function(){this.pause()},K.prototype.prepare=function(){var te=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,te=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,te=!0),!this._hasInvalidDimensions()&&Object.keys(this.tiles).length!==0){var ye=this.map.painter.context,je=ye.gl;this.boundsBuffer||(this.boundsBuffer=ye.createVertexBuffer(this._boundsArray,le.members)),this.boundsSegments||(this.boundsSegments=e.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(te||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new e.Texture(ye,this.canvas,je.RGBA,{premultiply:!0});for(var ke in this.tiles){var Qe=this.tiles[ke];Qe.state!=="loaded"&&(Qe.state="loaded",Qe.texture=this.texture)}}},K.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},K.prototype.hasTransition=function(){return this._playing},K.prototype._hasInvalidDimensions=function(){for(var te=0,ye=[this.canvas.width,this.canvas.height];tethis.max){var Qe=this._getAndRemoveByKey(this.order[0]);Qe&&this.onRemove(Qe)}return this},Re.prototype.has=function(K){return K.wrapped().key in this.data},Re.prototype.getAndRemove=function(K){return this.has(K)?this._getAndRemoveByKey(K.wrapped().key):null},Re.prototype._getAndRemoveByKey=function(K){var xe=this.data[K].shift();return xe.timeout&&clearTimeout(xe.timeout),this.data[K].length===0&&delete this.data[K],this.order.splice(this.order.indexOf(K),1),xe.value},Re.prototype.getByKey=function(K){var xe=this.data[K];return xe?xe[0].value:null},Re.prototype.get=function(K){if(!this.has(K))return null;var xe=this.data[K.wrapped().key][0];return xe.value},Re.prototype.remove=function(K,xe){if(!this.has(K))return this;var te=K.wrapped().key,ye=xe===void 0?0:this.data[te].indexOf(xe),je=this.data[te][ye];return this.data[te].splice(ye,1),je.timeout&&clearTimeout(je.timeout),this.data[te].length===0&&delete this.data[te],this.onRemove(je.value),this.order.splice(this.order.indexOf(te),1),this},Re.prototype.setMaxSize=function(K){for(this.max=K;this.order.length>this.max;){var xe=this._getAndRemoveByKey(this.order[0]);xe&&this.onRemove(xe)}return this},Re.prototype.filter=function(K){var xe=[];for(var te in this.data)for(var ye=0,je=this.data[te];ye1||(Math.abs(Nr)>1&&(Math.abs(Nr+mt)===1?Nr+=mt:Math.abs(Nr-mt)===1&&(Nr-=mt)),!(!wr.dem||!qt.dem)&&(qt.dem.backfillBorder(wr.dem,Nr,pr),qt.neighboringTiles&&qt.neighboringTiles[St]&&(qt.neighboringTiles[St].backfilled=!0)))}},K.prototype.getTile=function(te){return this.getTileByID(te.key)},K.prototype.getTileByID=function(te){return this._tiles[te]},K.prototype._retainLoadedChildren=function(te,ye,je,ke){for(var Qe in this._tiles){var vt=this._tiles[Qe];if(!(ke[Qe]||!vt.hasData()||vt.tileID.overscaledZ<=ye||vt.tileID.overscaledZ>je)){for(var qt=vt.tileID;vt&&vt.tileID.overscaledZ>ye+1;){var wr=vt.tileID.scaledTo(vt.tileID.overscaledZ-1);vt=this._tiles[wr.key],vt&&vt.hasData()&&(qt=wr)}for(var Nr=qt;Nr.overscaledZ>ye;)if(Nr=Nr.scaledTo(Nr.overscaledZ-1),te[Nr.key]){ke[qt.key]=qt;break}}}},K.prototype.findLoadedParent=function(te,ye){if(te.key in this._loadedParentTiles){var je=this._loadedParentTiles[te.key];return je&&je.tileID.overscaledZ>=ye?je:null}for(var ke=te.overscaledZ-1;ke>=ye;ke--){var Qe=te.scaledTo(ke),vt=this._getLoadedTile(Qe);if(vt)return vt}},K.prototype._getLoadedTile=function(te){var ye=this._tiles[te.key];if(ye&&ye.hasData())return ye;var je=this._cache.getByKey(te.wrapped().key);return je},K.prototype.updateCacheSize=function(te){var ye=Math.ceil(te.width/this._source.tileSize)+1,je=Math.ceil(te.height/this._source.tileSize)+1,ke=ye*je,Qe=5,vt=Math.floor(ke*Qe),qt=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,vt):vt;this._cache.setMaxSize(qt)},K.prototype.handleWrapJump=function(te){var ye=this._prevLng===void 0?te:this._prevLng,je=te-ye,ke=je/360,Qe=Math.round(ke);if(this._prevLng=te,Qe){var vt={};for(var qt in this._tiles){var wr=this._tiles[qt];wr.tileID=wr.tileID.unwrapTo(wr.tileID.wrap+Qe),vt[wr.tileID.key]=wr}this._tiles=vt;for(var Nr in this._timers)clearTimeout(this._timers[Nr]),delete this._timers[Nr];for(var pr in this._tiles){var mt=this._tiles[pr];this._setTileReloadTimer(pr,mt)}}},K.prototype.update=function(te){var ye=this;if(this.transform=te,!(!this._sourceLoaded||this._paused)){this.updateCacheSize(te),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={};var je;this.used?this._source.tileID?je=te.getVisibleUnwrappedCoordinates(this._source.tileID).map(function(ga){return new e.OverscaledTileID(ga.canonical.z,ga.wrap,ga.canonical.z,ga.canonical.x,ga.canonical.y)}):(je=te.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(je=je.filter(function(ga){return ye._source.hasTile(ga)}))):je=[];var ke=te.coveringZoomLevel(this._source),Qe=Math.max(ke-K.maxOverzooming,this._source.minzoom),vt=Math.max(ke+K.maxUnderzooming,this._source.minzoom),qt=this._updateRetainedTiles(je,ke);if(Ba(this._source.type)){for(var wr={},Nr={},pr=Object.keys(qt),mt=0,St=pr;mtthis._source.maxzoom){var nr=rr.children(this._source.maxzoom)[0],dr=this.getTile(nr);if(dr&&dr.hasData()){je[nr.key]=nr;continue}}else{var or=rr.children(this._source.maxzoom);if(je[or[0].key]&&je[or[1].key]&&je[or[2].key]&&je[or[3].key])continue}for(var Wt=hr.wasRequested(),ir=rr.overscaledZ-1;ir>=Qe;--ir){var Vt=rr.scaledTo(ir);if(ke[Vt.key]||(ke[Vt.key]=!0,hr=this.getTile(Vt),!hr&&Wt&&(hr=this._addTile(Vt)),hr&&(je[Vt.key]=Vt,Wt=hr.wasRequested(),hr.hasData())))break}}}return je},K.prototype._updateLoadedParentTileCache=function(){this._loadedParentTiles={};for(var te in this._tiles){for(var ye=[],je=void 0,ke=this._tiles[te].tileID;ke.overscaledZ>0;){if(ke.key in this._loadedParentTiles){je=this._loadedParentTiles[ke.key];break}ye.push(ke.key);var Qe=ke.scaledTo(ke.overscaledZ-1);if(je=this._getLoadedTile(Qe),je)break;ke=Qe}for(var vt=0,qt=ye;vt0)&&(ye.hasData()&&ye.state!=="reloading"?this._cache.add(ye.tileID,ye,ye.getExpiryTimeout()):(ye.aborted=!0,this._abortTile(ye),this._unloadTile(ye))))},K.prototype.clearTiles=function(){this._shouldReloadOnResume=!1,this._paused=!1;for(var te in this._tiles)this._removeTile(te);this._cache.reset()},K.prototype.tilesIn=function(te,ye,je){var ke=this,Qe=[],vt=this.transform;if(!vt)return Qe;for(var qt=je?vt.getCameraQueryGeometry(te):te,wr=te.map(function(ir){return vt.pointCoordinate(ir)}),Nr=qt.map(function(ir){return vt.pointCoordinate(ir)}),pr=this.getIds(),mt=1/0,St=1/0,Ft=-1/0,rr=-1/0,hr=0,nr=Nr;hr=0&&vi[1].y+ga>=0){var Ga=wr.map(function(Zi){return Dr.getTilePoint(Zi)}),ai=Nr.map(function(Zi){return Dr.getTilePoint(Zi)});Qe.push({tile:Vt,tileID:Dr,queryGeometry:Ga,cameraQueryGeometry:ai,scale:Jr})}}},Wt=0;Wt=e.browser.now())return!0}return!1},K.prototype.setFeatureState=function(te,ye,je){te=te||"_geojsonTileLayer",this._state.updateState(te,ye,je)},K.prototype.removeFeatureState=function(te,ye,je){te=te||"_geojsonTileLayer",this._state.removeFeatureState(te,ye,je)},K.prototype.getFeatureState=function(te,ye){return te=te||"_geojsonTileLayer",this._state.getState(te,ye)},K.prototype.setDependencies=function(te,ye,je){var ke=this._tiles[te];ke&&ke.setDependencies(ye,je)},K.prototype.reloadTilesForDependencies=function(te,ye){for(var je in this._tiles){var ke=this._tiles[je];ke.hasDependency(te,ye)&&this._reloadTile(je,"reloading")}this._cache.filter(function(Qe){return!Qe.hasDependency(te,ye)})},K}(e.Evented);ra.maxOverzooming=10,ra.maxUnderzooming=3;function ca(ge,K){var xe=Math.abs(ge.wrap*2)-+(ge.wrap<0),te=Math.abs(K.wrap*2)-+(K.wrap<0);return ge.overscaledZ-K.overscaledZ||te-xe||K.canonical.y-ge.canonical.y||K.canonical.x-ge.canonical.x}function Ba(ge){return ge==="raster"||ge==="image"||ge==="video"}function $a(){return new e.window.Worker(Po.workerUrl)}var Za="mapboxgl_preloaded_worker_pool",ri=function(){this.active={}};ri.prototype.acquire=function(K){if(!this.workers)for(this.workers=[];this.workers.length0?(ye-ke)/Qe:0;return this.points[je].mult(1-vt).add(this.points[xe].mult(vt))};var la=function(K,xe,te){var ye=this.boxCells=[],je=this.circleCells=[];this.xCellCount=Math.ceil(K/te),this.yCellCount=Math.ceil(xe/te);for(var ke=0;kethis.width||ye<0||xe>this.height)return je?!1:[];var Qe=[];if(K<=0&&xe<=0&&this.width<=te&&this.height<=ye){if(je)return!0;for(var vt=0;vt0:Qe}},la.prototype._queryCircle=function(K,xe,te,ye,je){var ke=K-te,Qe=K+te,vt=xe-te,qt=xe+te;if(Qe<0||ke>this.width||qt<0||vt>this.height)return ye?!1:[];var wr=[],Nr={hitTest:ye,circle:{x:K,y:xe,radius:te},seenUids:{box:{},circle:{}}};return this._forEachCell(ke,vt,Qe,qt,this._queryCellCircle,wr,Nr,je),ye?wr.length>0:wr},la.prototype.query=function(K,xe,te,ye,je){return this._query(K,xe,te,ye,!1,je)},la.prototype.hitTest=function(K,xe,te,ye,je){return this._query(K,xe,te,ye,!0,je)},la.prototype.hitTestCircle=function(K,xe,te,ye){return this._queryCircle(K,xe,te,!0,ye)},la.prototype._queryCell=function(K,xe,te,ye,je,ke,Qe,vt){var qt=Qe.seenUids,wr=this.boxCells[je];if(wr!==null)for(var Nr=this.bboxes,pr=0,mt=wr;pr=Nr[Ft+0]&&ye>=Nr[Ft+1]&&(!vt||vt(this.boxKeys[St]))){if(Qe.hitTest)return ke.push(!0),!0;ke.push({key:this.boxKeys[St],x1:Nr[Ft],y1:Nr[Ft+1],x2:Nr[Ft+2],y2:Nr[Ft+3]})}}}var rr=this.circleCells[je];if(rr!==null)for(var hr=this.circles,nr=0,dr=rr;nrQe*Qe+vt*vt},la.prototype._circleAndRectCollide=function(K,xe,te,ye,je,ke,Qe){var vt=(ke-ye)/2,qt=Math.abs(K-(ye+vt));if(qt>vt+te)return!1;var wr=(Qe-je)/2,Nr=Math.abs(xe-(je+wr));if(Nr>wr+te)return!1;if(qt<=vt||Nr<=wr)return!0;var pr=qt-vt,mt=Nr-wr;return pr*pr+mt*mt<=te*te};function _a(ge,K,xe,te,ye){var je=e.create();return K?(e.scale(je,je,[1/ye,1/ye,1]),xe||e.rotateZ(je,je,te.angle)):e.multiply(je,te.labelPlaneMatrix,ge),je}function Ai(ge,K,xe,te,ye){if(K){var je=e.clone(ge);return e.scale(je,je,[ye,ye,1]),xe||e.rotateZ(je,je,-te.angle),je}else return te.glCoordMatrix}function ki(ge,K){var xe=[ge.x,ge.y,0,1];Ao(xe,xe,K);var te=xe[3];return{point:new e.Point(xe[0]/te,xe[1]/te),signedDistanceFromCamera:te}}function Ki(ge,K){return .5+.5*(ge/K)}function yn(ge,K){var xe=ge[0]/ge[3],te=ge[1]/ge[3],ye=xe>=-K[0]&&xe<=K[0]&&te>=-K[1]&&te<=K[1];return ye}function Ln(ge,K,xe,te,ye,je,ke,Qe){var vt=te?ge.textSizeData:ge.iconSizeData,qt=e.evaluateSizeForZoom(vt,xe.transform.zoom),wr=[256/xe.width*2+1,256/xe.height*2+1],Nr=te?ge.text.dynamicLayoutVertexArray:ge.icon.dynamicLayoutVertexArray;Nr.clear();for(var pr=ge.lineVertexArray,mt=te?ge.text.placedSymbolArray:ge.icon.placedSymbolArray,St=xe.transform.width/xe.transform.height,Ft=!1,rr=0;rrje)return{useVertical:!0}}return(ge===e.WritingMode.vertical?K.yxe.x)?{needsFlipping:!0}:null}function ao(ge,K,xe,te,ye,je,ke,Qe,vt,qt,wr,Nr,pr,mt){var St=K/24,Ft=ge.lineOffsetX*St,rr=ge.lineOffsetY*St,hr;if(ge.numGlyphs>1){var nr=ge.glyphStartIndex+ge.numGlyphs,dr=ge.lineStartIndex,or=ge.lineStartIndex+ge.lineLength,Wt=kn(St,Qe,Ft,rr,xe,wr,Nr,ge,vt,je,pr);if(!Wt)return{notEnoughRoom:!0};var ir=ki(Wt.first.point,ke).point,Vt=ki(Wt.last.point,ke).point;if(te&&!xe){var Dr=Bn(ge.writingMode,ir,Vt,mt);if(Dr)return Dr}hr=[Wt.first];for(var Jr=ge.glyphStartIndex+1;Jr0?ai.point:xo(Nr,Ga,ga,1,ye),Fi=Bn(ge.writingMode,ga,Zi,mt);if(Fi)return Fi}var ui=Co(St*Qe.getoffsetX(ge.glyphStartIndex),Ft,rr,xe,wr,Nr,ge.segment,ge.lineStartIndex,ge.lineStartIndex+ge.lineLength,vt,je,pr);if(!ui)return{notEnoughRoom:!0};hr=[ui]}for(var _i=0,Si=hr;_i0?1:-1,St=0;te&&(mt*=-1,St=Math.PI),mt<0&&(St+=Math.PI);for(var Ft=mt>0?Qe+ke:Qe+ke+1,rr=ye,hr=ye,nr=0,dr=0,or=Math.abs(pr),Wt=[];nr+dr<=or;){if(Ft+=mt,Ft=vt)return null;if(hr=rr,Wt.push(rr),rr=Nr[Ft],rr===void 0){var ir=new e.Point(qt.getx(Ft),qt.gety(Ft)),Vt=ki(ir,wr);if(Vt.signedDistanceFromCamera>0)rr=Nr[Ft]=Vt.point;else{var Dr=Ft-mt,Jr=nr===0?je:new e.Point(qt.getx(Dr),qt.gety(Dr));rr=xo(Jr,ir,hr,or-nr+1,wr)}}nr+=dr,dr=hr.dist(rr)}var ga=(or-nr)/dr,vi=rr.sub(hr),Ga=vi.mult(ga)._add(hr);Ga._add(vi._unit()._perp()._mult(xe*mt));var ai=St+Math.atan2(rr.y-hr.y,rr.x-hr.x);return Wt.push(Ga),{point:Ga,angle:ai,path:Wt}}var Fs=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function Mn(ge,K){for(var xe=0;xe=1;Ui--)Si.push(ui.path[Ui]);for(var cn=1;cn<_i.path.length;cn++)Si.push(_i.path[cn]);var yo=Ga*2.5;if(vt){var Uo=Si.map(function(Lp){return ki(Lp,vt)});Uo.some(function(Lp){return Lp.signedDistanceFromCamera<=0})?Si=[]:Si=Uo.map(function(Lp){return Lp.point})}var Is=[];if(Si.length>0){for(var Fo=Si[0].clone(),Es=Si[0].clone(),Ks=1;Ks=ai.x&&Es.x<=Zi.x&&Fo.y>=ai.y&&Es.y<=Zi.y?Is=[Si]:Es.xZi.x||Es.yZi.y?Is=[]:Is=e.clipLine([Si],ai.x,ai.y,Zi.x,Zi.y)}for(var mu=0,Ep=Is;mu=this.screenRightBoundary||yethis.screenBottomBoundary},ts.prototype.isInsideGrid=function(K,xe,te,ye){return te>=0&&K=0&&xe0){var or;return this.prevPlacement&&this.prevPlacement.variableOffsets[pr.crossTileID]&&this.prevPlacement.placements[pr.crossTileID]&&this.prevPlacement.placements[pr.crossTileID].text&&(or=this.prevPlacement.variableOffsets[pr.crossTileID].anchor),this.variableOffsets[pr.crossTileID]={textOffset:rr,width:te,height:ye,anchor:K,textBoxScale:je,prevAnchor:or},this.markUsedJustification(mt,K,pr,St),mt.allowVerticalPlacement&&(this.markUsedOrientation(mt,St,pr),this.placedOrientations[pr.crossTileID]=St),{shift:hr,placedGlyphBoxes:nr}}},Xo.prototype.placeLayerBucketPart=function(K,xe,te){var ye=this,je=K.parameters,ke=je.bucket,Qe=je.layout,vt=je.posMatrix,qt=je.textLabelPlaneMatrix,wr=je.labelToScreenMatrix,Nr=je.textPixelRatio,pr=je.holdingForFade,mt=je.collisionBoxArray,St=je.partiallyEvaluatedTextSize,Ft=je.collisionGroup,rr=Qe.get("text-optional"),hr=Qe.get("icon-optional"),nr=Qe.get("text-allow-overlap"),dr=Qe.get("icon-allow-overlap"),or=Qe.get("text-rotation-alignment")==="map",Wt=Qe.get("text-pitch-alignment")==="map",ir=Qe.get("icon-text-fit")!=="none",Vt=Qe.get("symbol-z-order")==="viewport-y",Dr=nr&&(dr||!ke.hasIconData()||hr),Jr=dr&&(nr||!ke.hasTextData()||rr);!ke.collisionArrays&&mt&&ke.deserializeCollisionBoxes(mt);var ga=function(ui,_i){if(!xe[ui.crossTileID]){if(pr){ye.placements[ui.crossTileID]=new io(!1,!1,!1);return}var Si=!1,Ui=!1,cn=!0,yo=null,Uo={box:null,offscreen:null},Is={box:null,offscreen:null},Fo=null,Es=null,Ks=null,mu=0,Ep=0,kp=0;_i.textFeatureIndex?mu=_i.textFeatureIndex:ui.useRuntimeCollisionCircles&&(mu=ui.featureIndex),_i.verticalTextFeatureIndex&&(Ep=_i.verticalTextFeatureIndex);var Ph=_i.textBox;if(Ph){var qp=function(cc){var fu=e.WritingMode.horizontal;if(ke.allowVerticalPlacement&&!cc&&ye.prevPlacement){var Dh=ye.prevPlacement.placedOrientations[ui.crossTileID];Dh&&(ye.placedOrientations[ui.crossTileID]=Dh,fu=Dh,ye.markUsedOrientation(ke,fu,ui))}return fu},qd=function(cc,fu){if(ke.allowVerticalPlacement&&ui.numVerticalGlyphVertices>0&&_i.verticalTextBox)for(var Dh=0,Iv=ke.writingModes;Dh0&&(Kh=Kh.filter(function(cc){return cc!==Rh.anchor}),Kh.unshift(Rh.anchor))}var Cp=function(cc,fu,Dh){for(var Iv=cc.x2-cc.x1,sm=cc.y2-cc.y1,Mu=ui.textBoxScale,w0=ir&&!dr?fu:null,sv={box:[],offscreen:!1},xg=nr?Kh.length*2:Kh.length,Pp=0;Pp=Kh.length,T0=ye.attemptAnchorPlacement(lv,cc,Iv,sm,Mu,or,Wt,Nr,vt,Ft,bg,ui,ke,Dh,w0);if(T0&&(sv=T0.placedGlyphBoxes,sv&&sv.box&&sv.box.length)){Si=!0,yo=T0.shift;break}}return sv},Vp=function(){return Cp(Ph,_i.iconBox,e.WritingMode.horizontal)},Lp=function(){var cc=_i.verticalTextBox,fu=Uo&&Uo.box&&Uo.box.length;return ke.allowVerticalPlacement&&!fu&&ui.numVerticalGlyphVertices>0&&cc?Cp(cc,_i.verticalIconBox,e.WritingMode.vertical):{box:null,offscreen:null}};qd(Vp,Lp),Uo&&(Si=Uo.box,cn=Uo.offscreen);var Cv=qp(Uo&&Uo.box);if(!Si&&ye.prevPlacement){var Vd=ye.prevPlacement.variableOffsets[ui.crossTileID];Vd&&(ye.variableOffsets[ui.crossTileID]=Vd,ye.markUsedJustification(ke,Vd.anchor,ui,Cv))}}else{var ed=function(cc,fu){var Dh=ye.collisionIndex.placeCollisionBox(cc,nr,Nr,vt,Ft.predicate);return Dh&&Dh.box&&Dh.box.length&&(ye.markUsedOrientation(ke,fu,ui),ye.placedOrientations[ui.crossTileID]=fu),Dh},Ih=function(){return ed(Ph,e.WritingMode.horizontal)},td=function(){var cc=_i.verticalTextBox;return ke.allowVerticalPlacement&&ui.numVerticalGlyphVertices>0&&cc?ed(cc,e.WritingMode.vertical):{box:null,offscreen:null}};qd(Ih,td),qp(Uo&&Uo.box&&Uo.box.length)}}if(Fo=Uo,Si=Fo&&Fo.box&&Fo.box.length>0,cn=Fo&&Fo.offscreen,ui.useRuntimeCollisionCircles){var Gf=ke.text.placedSymbolArray.get(ui.centerJustifiedTextSymbolIndex),Gd=e.evaluateSizeForFeature(ke.textSizeData,St,Gf),Lv=Qe.get("text-padding"),ph=ui.collisionCircleDiameter;Es=ye.collisionIndex.placeCollisionCircles(nr,Gf,ke.lineVertexArray,ke.glyphOffsetArray,Gd,vt,qt,wr,te,Wt,Ft.predicate,ph,Lv),Si=nr||Es.circles.length>0&&!Es.collisionDetected,cn=cn&&Es.offscreen}if(_i.iconFeatureIndex&&(kp=_i.iconFeatureIndex),_i.iconBox){var iv=function(cc){var fu=ir&&yo?Ls(cc,yo.x,yo.y,or,Wt,ye.transform.angle):cc;return ye.collisionIndex.placeCollisionBox(fu,dr,Nr,vt,Ft.predicate)};Is&&Is.box&&Is.box.length&&_i.verticalIconBox?(Ks=iv(_i.verticalIconBox),Ui=Ks.box.length>0):(Ks=iv(_i.iconBox),Ui=Ks.box.length>0),cn=cn&&Ks.offscreen}var nm=rr||ui.numHorizontalGlyphVertices===0&&ui.numVerticalGlyphVertices===0,om=hr||ui.numIconVertices===0;if(!nm&&!om?Ui=Si=Ui&&Si:om?nm||(Ui=Ui&&Si):Si=Ui&&Si,Si&&Fo&&Fo.box&&(Is&&Is.box&&Ep?ye.collisionIndex.insertCollisionBox(Fo.box,Qe.get("text-ignore-placement"),ke.bucketInstanceId,Ep,Ft.ID):ye.collisionIndex.insertCollisionBox(Fo.box,Qe.get("text-ignore-placement"),ke.bucketInstanceId,mu,Ft.ID)),Ui&&Ks&&ye.collisionIndex.insertCollisionBox(Ks.box,Qe.get("icon-ignore-placement"),ke.bucketInstanceId,kp,Ft.ID),Es&&(Si&&ye.collisionIndex.insertCollisionCircles(Es.circles,Qe.get("text-ignore-placement"),ke.bucketInstanceId,mu,Ft.ID),te)){var Pv=ke.bucketInstanceId,nv=ye.collisionCircleArrays[Pv];nv===void 0&&(nv=ye.collisionCircleArrays[Pv]=new Gn);for(var ov=0;ov=0;--Ga){var ai=vi[Ga];ga(ke.symbolInstances.get(ai),ke.collisionArrays[ai])}else for(var Zi=K.symbolInstanceStart;Zi=0&&(ke>=0&&wr!==ke?K.text.placedSymbolArray.get(wr).crossTileID=0:K.text.placedSymbolArray.get(wr).crossTileID=te.crossTileID)}},Xo.prototype.markUsedOrientation=function(K,xe,te){for(var ye=xe===e.WritingMode.horizontal||xe===e.WritingMode.horizontalOnly?xe:0,je=xe===e.WritingMode.vertical?xe:0,ke=[te.leftJustifiedTextSymbolIndex,te.centerJustifiedTextSymbolIndex,te.rightJustifiedTextSymbolIndex],Qe=0,vt=ke;Qe0||Wt>0,ga=dr.numIconVertices>0,vi=ye.placedOrientations[dr.crossTileID],Ga=vi===e.WritingMode.vertical,ai=vi===e.WritingMode.horizontal||vi===e.WritingMode.horizontalOnly;if(Jr){var Zi=il(Dr.text),Fi=Ga?_n:Zi;St(K.text,or,Fi);var ui=ai?_n:Zi;St(K.text,Wt,ui);var _i=Dr.text.isHidden();[dr.rightJustifiedTextSymbolIndex,dr.centerJustifiedTextSymbolIndex,dr.leftJustifiedTextSymbolIndex].forEach(function(kp){kp>=0&&(K.text.placedSymbolArray.get(kp).hidden=_i||Ga?1:0)}),dr.verticalPlacedTextSymbolIndex>=0&&(K.text.placedSymbolArray.get(dr.verticalPlacedTextSymbolIndex).hidden=_i||ai?1:0);var Si=ye.variableOffsets[dr.crossTileID];Si&&ye.markUsedJustification(K,Si.anchor,dr,vi);var Ui=ye.placedOrientations[dr.crossTileID];Ui&&(ye.markUsedJustification(K,"left",dr,Ui),ye.markUsedOrientation(K,Ui,dr))}if(ga){var cn=il(Dr.icon),yo=!(pr&&dr.verticalPlacedIconSymbolIndex&&Ga);if(dr.placedIconSymbolIndex>=0){var Uo=yo?cn:_n;St(K.icon,dr.numIconVertices,Uo),K.icon.placedSymbolArray.get(dr.placedIconSymbolIndex).hidden=Dr.icon.isHidden()}if(dr.verticalPlacedIconSymbolIndex>=0){var Is=yo?_n:cn;St(K.icon,dr.numVerticalIconVertices,Is),K.icon.placedSymbolArray.get(dr.verticalPlacedIconSymbolIndex).hidden=Dr.icon.isHidden()}}if(K.hasIconCollisionBoxData()||K.hasTextCollisionBoxData()){var Fo=K.collisionArrays[nr];if(Fo){var Es=new e.Point(0,0);if(Fo.textBox||Fo.verticalTextBox){var Ks=!0;if(qt){var mu=ye.variableOffsets[ir];mu?(Es=gs(mu.anchor,mu.width,mu.height,mu.textOffset,mu.textBoxScale),wr&&Es._rotate(Nr?ye.transform.angle:-ye.transform.angle)):Ks=!1}Fo.textBox&&Gi(K.textCollisionBox.collisionVertexArray,Dr.text.placed,!Ks||Ga,Es.x,Es.y),Fo.verticalTextBox&&Gi(K.textCollisionBox.collisionVertexArray,Dr.text.placed,!Ks||ai,Es.x,Es.y)}var Ep=!!(!ai&&Fo.verticalIconBox);Fo.iconBox&&Gi(K.iconCollisionBox.collisionVertexArray,Dr.icon.placed,Ep,pr?Es.x:0,pr?Es.y:0),Fo.verticalIconBox&&Gi(K.iconCollisionBox.collisionVertexArray,Dr.icon.placed,!Ep,pr?Es.x:0,pr?Es.y:0)}}},rr=0;rrK},Xo.prototype.setStale=function(){this.stale=!0};function Gi(ge,K,xe,te,ye){ge.emplaceBack(K?1:0,xe?1:0,te||0,ye||0),ge.emplaceBack(K?1:0,xe?1:0,te||0,ye||0),ge.emplaceBack(K?1:0,xe?1:0,te||0,ye||0),ge.emplaceBack(K?1:0,xe?1:0,te||0,ye||0)}var Pn=Math.pow(2,25),js=Math.pow(2,24),xs=Math.pow(2,17),Hn=Math.pow(2,16),Os=Math.pow(2,9),ds=Math.pow(2,8),Xs=Math.pow(2,1);function il(ge){if(ge.opacity===0&&!ge.placed)return 0;if(ge.opacity===1&&ge.placed)return 4294967295;var K=ge.placed?1:0,xe=Math.floor(ge.opacity*127);return xe*Pn+K*js+xe*xs+K*Hn+xe*Os+K*ds+xe*Xs+K}var _n=0,Lo=function(K){this._sortAcrossTiles=K.layout.get("symbol-z-order")!=="viewport-y"&&K.layout.get("symbol-sort-key").constantOr(1)!==void 0,this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]};Lo.prototype.continuePlacement=function(K,xe,te,ye,je){for(var ke=this._bucketParts;this._currentTileIndex2};this._currentPlacementIndex>=0;){var Qe=K[this._currentPlacementIndex],vt=xe[Qe],qt=this.placement.collisionIndex.transform.zoom;if(vt.type==="symbol"&&(!vt.minzoom||vt.minzoom<=qt)&&(!vt.maxzoom||vt.maxzoom>qt)){this._inProgressLayer||(this._inProgressLayer=new Lo(vt));var wr=this._inProgressLayer.continuePlacement(te[vt.source],this.placement,this._showCollisionBoxes,vt,ke);if(wr)return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},bo.prototype.commit=function(K){return this.placement.commit(K),this.placement};var Rs=512/e.EXTENT/2,pu=function(K,xe,te){this.tileID=K,this.indexedSymbolInstances={},this.bucketInstanceId=te;for(var ye=0;yeK.overscaledZ)for(var qt in vt){var wr=vt[qt];wr.tileID.isChildOf(K)&&wr.findMatches(xe.symbolInstances,K,ke)}else{var Nr=K.scaledTo(Number(Qe)),pr=vt[Nr.key];pr&&pr.findMatches(xe.symbolInstances,K,ke)}}for(var mt=0;mt0)throw new Error("Unimplemented: "+ke.map(function(Qe){return Qe.command}).join(", ")+".");return je.forEach(function(Qe){Qe.command!=="setTransition"&&ye[Qe.command].apply(ye,Qe.args)}),this.stylesheet=te,!0},K.prototype.addImage=function(te,ye){if(this.getImage(te))return this.fire(new e.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(te,ye),this._afterImageUpdated(te)},K.prototype.updateImage=function(te,ye){this.imageManager.updateImage(te,ye)},K.prototype.getImage=function(te){return this.imageManager.getImage(te)},K.prototype.removeImage=function(te){if(!this.getImage(te))return this.fire(new e.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(te),this._afterImageUpdated(te)},K.prototype._afterImageUpdated=function(te){this._availableImages=this.imageManager.listImages(),this._changedImages[te]=!0,this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new e.Event("data",{dataType:"style"}))},K.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},K.prototype.addSource=function(te,ye,je){var ke=this;if(je===void 0&&(je={}),this._checkLoaded(),this.sourceCaches[te]!==void 0)throw new Error("There is already a source with this ID");if(!ye.type)throw new Error("The type property must be defined, but only the following properties were given: "+Object.keys(ye).join(", ")+".");var Qe=["vector","raster","geojson","video","image"],vt=Qe.indexOf(ye.type)>=0;if(!(vt&&this._validate(e.validateStyle.source,"sources."+te,ye,null,je))){this.map&&this.map._collectResourceTiming&&(ye.collectResourceTiming=!0);var qt=this.sourceCaches[te]=new ra(te,ye,this.dispatcher);qt.style=this,qt.setEventedParent(this,function(){return{isSourceLoaded:ke.loaded(),source:qt.serialize(),sourceId:te}}),qt.onAdd(this.map),this._changed=!0}},K.prototype.removeSource=function(te){if(this._checkLoaded(),this.sourceCaches[te]===void 0)throw new Error("There is no source with this ID");for(var ye in this._layers)if(this._layers[ye].source===te)return this.fire(new e.ErrorEvent(new Error('Source "'+te+'" cannot be removed while layer "'+ye+'" is using it.')));var je=this.sourceCaches[te];delete this.sourceCaches[te],delete this._updatedSources[te],je.fire(new e.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:te})),je.setEventedParent(null),je.clearTiles(),je.onRemove&&je.onRemove(this.map),this._changed=!0},K.prototype.setGeoJSONSourceData=function(te,ye){this._checkLoaded();var je=this.sourceCaches[te].getSource();je.setData(ye),this._changed=!0},K.prototype.getSource=function(te){return this.sourceCaches[te]&&this.sourceCaches[te].getSource()},K.prototype.addLayer=function(te,ye,je){je===void 0&&(je={}),this._checkLoaded();var ke=te.id;if(this.getLayer(ke)){this.fire(new e.ErrorEvent(new Error('Layer with id "'+ke+'" already exists on this map')));return}var Qe;if(te.type==="custom"){if(As(this,e.validateCustomStyleLayer(te)))return;Qe=e.createStyleLayer(te)}else{if(typeof te.source=="object"&&(this.addSource(ke,te.source),te=e.clone$1(te),te=e.extend(te,{source:ke})),this._validate(e.validateStyle.layer,"layers."+ke,te,{arrayIndex:-1},je))return;Qe=e.createStyleLayer(te),this._validateLayer(Qe),Qe.setEventedParent(this,{layer:{id:ke}}),this._serializedLayers[Qe.id]=Qe.serialize()}var vt=ye?this._order.indexOf(ye):this._order.length;if(ye&&vt===-1){this.fire(new e.ErrorEvent(new Error('Layer with id "'+ye+'" does not exist on this map.')));return}if(this._order.splice(vt,0,ke),this._layerOrderChanged=!0,this._layers[ke]=Qe,this._removedLayers[ke]&&Qe.source&&Qe.type!=="custom"){var qt=this._removedLayers[ke];delete this._removedLayers[ke],qt.type!==Qe.type?this._updatedSources[Qe.source]="clear":(this._updatedSources[Qe.source]="reload",this.sourceCaches[Qe.source].pause())}this._updateLayer(Qe),Qe.onAdd&&Qe.onAdd(this.map)},K.prototype.moveLayer=function(te,ye){this._checkLoaded(),this._changed=!0;var je=this._layers[te];if(!je){this.fire(new e.ErrorEvent(new Error("The layer '"+te+"' does not exist in the map's style and cannot be moved.")));return}if(te!==ye){var ke=this._order.indexOf(te);this._order.splice(ke,1);var Qe=ye?this._order.indexOf(ye):this._order.length;if(ye&&Qe===-1){this.fire(new e.ErrorEvent(new Error('Layer with id "'+ye+'" does not exist on this map.')));return}this._order.splice(Qe,0,te),this._layerOrderChanged=!0}},K.prototype.removeLayer=function(te){this._checkLoaded();var ye=this._layers[te];if(!ye){this.fire(new e.ErrorEvent(new Error("The layer '"+te+"' does not exist in the map's style and cannot be removed.")));return}ye.setEventedParent(null);var je=this._order.indexOf(te);this._order.splice(je,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[te]=ye,delete this._layers[te],delete this._serializedLayers[te],delete this._updatedLayers[te],delete this._updatedPaintProps[te],ye.onRemove&&ye.onRemove(this.map)},K.prototype.getLayer=function(te){return this._layers[te]},K.prototype.hasLayer=function(te){return te in this._layers},K.prototype.setLayerZoomRange=function(te,ye,je){this._checkLoaded();var ke=this.getLayer(te);if(!ke){this.fire(new e.ErrorEvent(new Error("The layer '"+te+"' does not exist in the map's style and cannot have zoom extent.")));return}ke.minzoom===ye&&ke.maxzoom===je||(ye!=null&&(ke.minzoom=ye),je!=null&&(ke.maxzoom=je),this._updateLayer(ke))},K.prototype.setFilter=function(te,ye,je){je===void 0&&(je={}),this._checkLoaded();var ke=this.getLayer(te);if(!ke){this.fire(new e.ErrorEvent(new Error("The layer '"+te+"' does not exist in the map's style and cannot be filtered.")));return}if(!e.deepEqual(ke.filter,ye)){if(ye==null){ke.filter=void 0,this._updateLayer(ke);return}this._validate(e.validateStyle.filter,"layers."+ke.id+".filter",ye,null,je)||(ke.filter=e.clone$1(ye),this._updateLayer(ke))}},K.prototype.getFilter=function(te){return e.clone$1(this.getLayer(te).filter)},K.prototype.setLayoutProperty=function(te,ye,je,ke){ke===void 0&&(ke={}),this._checkLoaded();var Qe=this.getLayer(te);if(!Qe){this.fire(new e.ErrorEvent(new Error("The layer '"+te+"' does not exist in the map's style and cannot be styled.")));return}e.deepEqual(Qe.getLayoutProperty(ye),je)||(Qe.setLayoutProperty(ye,je,ke),this._updateLayer(Qe))},K.prototype.getLayoutProperty=function(te,ye){var je=this.getLayer(te);if(!je){this.fire(new e.ErrorEvent(new Error("The layer '"+te+"' does not exist in the map's style.")));return}return je.getLayoutProperty(ye)},K.prototype.setPaintProperty=function(te,ye,je,ke){ke===void 0&&(ke={}),this._checkLoaded();var Qe=this.getLayer(te);if(!Qe){this.fire(new e.ErrorEvent(new Error("The layer '"+te+"' does not exist in the map's style and cannot be styled.")));return}if(!e.deepEqual(Qe.getPaintProperty(ye),je)){var vt=Qe.setPaintProperty(ye,je,ke);vt&&this._updateLayer(Qe),this._changed=!0,this._updatedPaintProps[te]=!0}},K.prototype.getPaintProperty=function(te,ye){return this.getLayer(te).getPaintProperty(ye)},K.prototype.setFeatureState=function(te,ye){this._checkLoaded();var je=te.source,ke=te.sourceLayer,Qe=this.sourceCaches[je];if(Qe===void 0){this.fire(new e.ErrorEvent(new Error("The source '"+je+"' does not exist in the map's style.")));return}var vt=Qe.getSource().type;if(vt==="geojson"&&ke){this.fire(new e.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter.")));return}if(vt==="vector"&&!ke){this.fire(new e.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}te.id===void 0&&this.fire(new e.ErrorEvent(new Error("The feature id parameter must be provided."))),Qe.setFeatureState(ke,te.id,ye)},K.prototype.removeFeatureState=function(te,ye){this._checkLoaded();var je=te.source,ke=this.sourceCaches[je];if(ke===void 0){this.fire(new e.ErrorEvent(new Error("The source '"+je+"' does not exist in the map's style.")));return}var Qe=ke.getSource().type,vt=Qe==="vector"?te.sourceLayer:void 0;if(Qe==="vector"&&!vt){this.fire(new e.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}if(ye&&typeof te.id!="string"&&typeof te.id!="number"){this.fire(new e.ErrorEvent(new Error("A feature id is required to remove its specific state property.")));return}ke.removeFeatureState(vt,te.id,ye)},K.prototype.getFeatureState=function(te){this._checkLoaded();var ye=te.source,je=te.sourceLayer,ke=this.sourceCaches[ye];if(ke===void 0){this.fire(new e.ErrorEvent(new Error("The source '"+ye+"' does not exist in the map's style.")));return}var Qe=ke.getSource().type;if(Qe==="vector"&&!je){this.fire(new e.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}return te.id===void 0&&this.fire(new e.ErrorEvent(new Error("The feature id parameter must be provided."))),ke.getFeatureState(je,te.id)},K.prototype.getTransition=function(){return e.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},K.prototype.serialize=function(){return e.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:e.mapObject(this.sourceCaches,function(te){return te.serialize()}),layers:this._serializeLayers(this._order)},function(te){return te!==void 0})},K.prototype._updateLayer=function(te){this._updatedLayers[te.id]=!0,te.source&&!this._updatedSources[te.source]&&this.sourceCaches[te.source].getSource().type!=="raster"&&(this._updatedSources[te.source]="reload",this.sourceCaches[te.source].pause()),this._changed=!0},K.prototype._flattenAndSortRenderedFeatures=function(te){for(var ye=this,je=function(ai){return ye._layers[ai].type==="fill-extrusion"},ke={},Qe=[],vt=this._order.length-1;vt>=0;vt--){var qt=this._order[vt];if(je(qt)){ke[qt]=vt;for(var wr=0,Nr=te;wr=0;nr--){var dr=this._order[nr];if(je(dr))for(var or=Qe.length-1;or>=0;or--){var Wt=Qe[or].feature;if(ke[Wt.layer.id] 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;}`,$l=`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 }`,Jf=`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;}`,Of=`#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 }`,of="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;}",jc=`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 }`,Bf="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;}",Nf=`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 }`,Gu=` #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);}`,Ef=`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 }`,oc=` #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);}`,Xc=`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 }`,Ql=` #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;}`,qc=`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 }`,Sc=` #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);}`,Ys=`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 }`,kf="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;}",fh=`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 }`,Uf=`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));}`,Zc=`#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 }`,$f=`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);}`,Cu=`#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 }`,jf=`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);}`,yl=hl(Tc,du),Lu=hl(Sf,Uc),Mc=hl(Bs,dc),ol=hl(Hc,lu),vc=hl(Pl,ic),yu=hl(Ou,nl),Tu=hl(ml,bs),El=hl(Zs,nc),qf=hl(Ul,qu),Qf=hl(fl,xh),Bu=hl(ss,bh),Ec=hl(ks,to),mc=hl(Wc,Vu),Lh=hl(jl,Mf),sf=hl(Ac,nf),vf=hl($l,Jf),Nu=hl(Of,of),lf=hl(jc,Bf),au=hl(Nf,Gu),Yc=hl(Ef,oc),hh=hl(Xc,Ql),mf=hl(qc,Sc),sl=hl(Ys,kf),_u=hl(fh,Uf),Pu=hl(Zc,$f),Cf=hl(Cu,jf);function hl(ge,K){var xe=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,te=K.match(/attribute ([\w]+) ([\w]+)/g),ye=ge.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),je=K.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),ke=je?je.concat(ye):ye,Qe={};return ge=ge.replace(xe,function(vt,qt,wr,Nr,pr){return Qe[pr]=!0,qt==="define"?` #ifndef HAS_UNIFORM_u_`+pr+` varying `+wr+" "+Nr+" "+pr+`; #else uniform `+wr+" "+Nr+" u_"+pr+`; #endif `:` #ifdef HAS_UNIFORM_u_`+pr+` `+wr+" "+Nr+" "+pr+" = u_"+pr+`; #endif `}),K=K.replace(xe,function(vt,qt,wr,Nr,pr){var mt=Nr==="float"?"vec2":"vec4",St=pr.match(/color/)?"color":mt;return Qe[pr]?qt==="define"?` #ifndef HAS_UNIFORM_u_`+pr+` uniform lowp float u_`+pr+`_t; attribute `+wr+" "+mt+" a_"+pr+`; varying `+wr+" "+Nr+" "+pr+`; #else uniform `+wr+" "+Nr+" u_"+pr+`; #endif `:St==="vec4"?` #ifndef HAS_UNIFORM_u_`+pr+` `+pr+" = a_"+pr+`; #else `+wr+" "+Nr+" "+pr+" = u_"+pr+`; #endif `:` #ifndef HAS_UNIFORM_u_`+pr+` `+pr+" = unpack_mix_"+St+"(a_"+pr+", u_"+pr+`_t); #else `+wr+" "+Nr+" "+pr+" = u_"+pr+`; #endif `:qt==="define"?` #ifndef HAS_UNIFORM_u_`+pr+` uniform lowp float u_`+pr+`_t; attribute `+wr+" "+mt+" a_"+pr+`; #else uniform `+wr+" "+Nr+" u_"+pr+`; #endif `:St==="vec4"?` #ifndef HAS_UNIFORM_u_`+pr+` `+wr+" "+Nr+" "+pr+" = a_"+pr+`; #else `+wr+" "+Nr+" "+pr+" = u_"+pr+`; #endif `:` #ifndef HAS_UNIFORM_u_`+pr+` `+wr+" "+Nr+" "+pr+" = unpack_mix_"+St+"(a_"+pr+", u_"+pr+`_t); #else `+wr+" "+Nr+" "+pr+" = u_"+pr+`; #endif `}),{fragmentSource:ge,vertexSource:K,staticAttributes:te,staticUniforms:ke}}var uf=Object.freeze({__proto__:null,prelude:yl,background:Lu,backgroundPattern:Mc,circle:ol,clippingMask:vc,heatmap:yu,heatmapTexture:Tu,collisionBox:El,collisionCircle:qf,debug:Qf,fill:Bu,fillOutline:Ec,fillOutlinePattern:mc,fillPattern:Lh,fillExtrusion:sf,fillExtrusionPattern:vf,hillshadePrepare:Nu,hillshade:lf,line:au,lineGradient:Yc,linePattern:hh,lineSDF:mf,raster:sl,symbolIcon:_u,symbolSDF:Pu,symbolTextAndIcon:Cf}),kc=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};kc.prototype.bind=function(K,xe,te,ye,je,ke,Qe,vt){this.context=K;for(var qt=this.boundPaintVertexBuffers.length!==ye.length,wr=0;!qt&&wr>16,Qe>>16],u_pixel_coord_lower:[ke&65535,Qe&65535]}}function Kc(ge,K,xe,te){var ye=xe.imageManager.getPattern(ge.from.toString()),je=xe.imageManager.getPattern(ge.to.toString()),ke=xe.imageManager.getPixelSize(),Qe=ke.width,vt=ke.height,qt=Math.pow(2,te.tileID.overscaledZ),wr=te.tileSize*Math.pow(2,xe.transform.tileZoom)/qt,Nr=wr*(te.tileID.canonical.x+te.tileID.wrap*qt),pr=wr*te.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:ye.tl,u_pattern_br_a:ye.br,u_pattern_tl_b:je.tl,u_pattern_br_b:je.br,u_texsize:[Qe,vt],u_mix:K.t,u_pattern_size_a:ye.displaySize,u_pattern_size_b:je.displaySize,u_scale_a:K.fromScale,u_scale_b:K.toScale,u_tile_units_to_pixels:1/is(te,1,xe.transform.tileZoom),u_pixel_coord_upper:[Nr>>16,pr>>16],u_pixel_coord_lower:[Nr&65535,pr&65535]}}var Lf=function(ge,K){return{u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_lightpos:new e.Uniform3f(ge,K.u_lightpos),u_lightintensity:new e.Uniform1f(ge,K.u_lightintensity),u_lightcolor:new e.Uniform3f(ge,K.u_lightcolor),u_vertical_gradient:new e.Uniform1f(ge,K.u_vertical_gradient),u_opacity:new e.Uniform1f(ge,K.u_opacity)}},iu=function(ge,K){return{u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_lightpos:new e.Uniform3f(ge,K.u_lightpos),u_lightintensity:new e.Uniform1f(ge,K.u_lightintensity),u_lightcolor:new e.Uniform3f(ge,K.u_lightcolor),u_vertical_gradient:new e.Uniform1f(ge,K.u_vertical_gradient),u_height_factor:new e.Uniform1f(ge,K.u_height_factor),u_image:new e.Uniform1i(ge,K.u_image),u_texsize:new e.Uniform2f(ge,K.u_texsize),u_pixel_coord_upper:new e.Uniform2f(ge,K.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(ge,K.u_pixel_coord_lower),u_scale:new e.Uniform3f(ge,K.u_scale),u_fade:new e.Uniform1f(ge,K.u_fade),u_opacity:new e.Uniform1f(ge,K.u_opacity)}},Vf=function(ge,K,xe,te){var ye=K.style.light,je=ye.properties.get("position"),ke=[je.x,je.y,je.z],Qe=e.create$1();ye.properties.get("anchor")==="viewport"&&e.fromRotation(Qe,-K.transform.angle),e.transformMat3(ke,ke,Qe);var vt=ye.properties.get("color");return{u_matrix:ge,u_lightpos:ke,u_lightintensity:ye.properties.get("intensity"),u_lightcolor:[vt.r,vt.g,vt.b],u_vertical_gradient:+xe,u_opacity:te}},Xu=function(ge,K,xe,te,ye,je,ke){return e.extend(Vf(ge,K,xe,te),Wu(je,K,ke),{u_height_factor:-Math.pow(2,ye.overscaledZ)/ke.tileSize/8})},Cc=function(ge,K){return{u_matrix:new e.UniformMatrix4f(ge,K.u_matrix)}},gc=function(ge,K){return{u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_image:new e.Uniform1i(ge,K.u_image),u_texsize:new e.Uniform2f(ge,K.u_texsize),u_pixel_coord_upper:new e.Uniform2f(ge,K.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(ge,K.u_pixel_coord_lower),u_scale:new e.Uniform3f(ge,K.u_scale),u_fade:new e.Uniform1f(ge,K.u_fade)}},ql=function(ge,K){return{u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_world:new e.Uniform2f(ge,K.u_world)}},xu=function(ge,K){return{u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_world:new e.Uniform2f(ge,K.u_world),u_image:new e.Uniform1i(ge,K.u_image),u_texsize:new e.Uniform2f(ge,K.u_texsize),u_pixel_coord_upper:new e.Uniform2f(ge,K.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(ge,K.u_pixel_coord_lower),u_scale:new e.Uniform3f(ge,K.u_scale),u_fade:new e.Uniform1f(ge,K.u_fade)}},Lc=function(ge){return{u_matrix:ge}},Jc=function(ge,K,xe,te){return e.extend(Lc(ge),Wu(xe,K,te))},sc=function(ge,K){return{u_matrix:ge,u_world:K}},Pc=function(ge,K,xe,te,ye){return e.extend(Jc(ge,K,xe,te),{u_world:ye})},Qt=function(ge,K){return{u_camera_to_center_distance:new e.Uniform1f(ge,K.u_camera_to_center_distance),u_scale_with_map:new e.Uniform1i(ge,K.u_scale_with_map),u_pitch_with_map:new e.Uniform1i(ge,K.u_pitch_with_map),u_extrude_scale:new e.Uniform2f(ge,K.u_extrude_scale),u_device_pixel_ratio:new e.Uniform1f(ge,K.u_device_pixel_ratio),u_matrix:new e.UniformMatrix4f(ge,K.u_matrix)}},br=function(ge,K,xe,te){var ye=ge.transform,je,ke;if(te.paint.get("circle-pitch-alignment")==="map"){var Qe=is(xe,1,ye.zoom);je=!0,ke=[Qe,Qe]}else je=!1,ke=ye.pixelsToGLUnits;return{u_camera_to_center_distance:ye.cameraToCenterDistance,u_scale_with_map:+(te.paint.get("circle-pitch-scale")==="map"),u_matrix:ge.translatePosMatrix(K.posMatrix,xe,te.paint.get("circle-translate"),te.paint.get("circle-translate-anchor")),u_pitch_with_map:+je,u_device_pixel_ratio:e.browser.devicePixelRatio,u_extrude_scale:ke}},aa=function(ge,K){return{u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_camera_to_center_distance:new e.Uniform1f(ge,K.u_camera_to_center_distance),u_pixels_to_tile_units:new e.Uniform1f(ge,K.u_pixels_to_tile_units),u_extrude_scale:new e.Uniform2f(ge,K.u_extrude_scale),u_overscale_factor:new e.Uniform1f(ge,K.u_overscale_factor)}},$r=function(ge,K){return{u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_inv_matrix:new e.UniformMatrix4f(ge,K.u_inv_matrix),u_camera_to_center_distance:new e.Uniform1f(ge,K.u_camera_to_center_distance),u_viewport_size:new e.Uniform2f(ge,K.u_viewport_size)}},ka=function(ge,K,xe){var te=is(xe,1,K.zoom),ye=Math.pow(2,K.zoom-xe.tileID.overscaledZ),je=xe.tileID.overscaleFactor();return{u_matrix:ge,u_camera_to_center_distance:K.cameraToCenterDistance,u_pixels_to_tile_units:te,u_extrude_scale:[K.pixelsToGLUnits[0]/(te*ye),K.pixelsToGLUnits[1]/(te*ye)],u_overscale_factor:je}},li=function(ge,K,xe){return{u_matrix:ge,u_inv_matrix:K,u_camera_to_center_distance:xe.cameraToCenterDistance,u_viewport_size:[xe.width,xe.height]}},Ci=function(ge,K){return{u_color:new e.UniformColor(ge,K.u_color),u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_overlay:new e.Uniform1i(ge,K.u_overlay),u_overlay_scale:new e.Uniform1f(ge,K.u_overlay_scale)}},Hi=function(ge,K,xe){return xe===void 0&&(xe=1),{u_matrix:ge,u_color:K,u_overlay:0,u_overlay_scale:xe}},Qi=function(ge,K){return{u_matrix:new e.UniformMatrix4f(ge,K.u_matrix)}},pn=function(ge){return{u_matrix:ge}},Pi=function(ge,K){return{u_extrude_scale:new e.Uniform1f(ge,K.u_extrude_scale),u_intensity:new e.Uniform1f(ge,K.u_intensity),u_matrix:new e.UniformMatrix4f(ge,K.u_matrix)}},Di=function(ge,K){return{u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_world:new e.Uniform2f(ge,K.u_world),u_image:new e.Uniform1i(ge,K.u_image),u_color_ramp:new e.Uniform1i(ge,K.u_color_ramp),u_opacity:new e.Uniform1f(ge,K.u_opacity)}},Ni=function(ge,K,xe,te){return{u_matrix:ge,u_extrude_scale:is(K,1,xe),u_intensity:te}},mi=function(ge,K,xe,te){var ye=e.create();e.ortho(ye,0,ge.width,ge.height,0,0,1);var je=ge.context.gl;return{u_matrix:ye,u_world:[je.drawingBufferWidth,je.drawingBufferHeight],u_image:xe,u_color_ramp:te,u_opacity:K.paint.get("heatmap-opacity")}},Sn=function(ge,K){return{u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_image:new e.Uniform1i(ge,K.u_image),u_latrange:new e.Uniform2f(ge,K.u_latrange),u_light:new e.Uniform2f(ge,K.u_light),u_shadow:new e.UniformColor(ge,K.u_shadow),u_highlight:new e.UniformColor(ge,K.u_highlight),u_accent:new e.UniformColor(ge,K.u_accent)}},$n=function(ge,K){return{u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_image:new e.Uniform1i(ge,K.u_image),u_dimension:new e.Uniform2f(ge,K.u_dimension),u_zoom:new e.Uniform1f(ge,K.u_zoom),u_unpack:new e.Uniform4f(ge,K.u_unpack)}},no=function(ge,K,xe){var te=xe.paint.get("hillshade-shadow-color"),ye=xe.paint.get("hillshade-highlight-color"),je=xe.paint.get("hillshade-accent-color"),ke=xe.paint.get("hillshade-illumination-direction")*(Math.PI/180);xe.paint.get("hillshade-illumination-anchor")==="viewport"&&(ke-=ge.transform.angle);var Qe=!ge.options.moving;return{u_matrix:ge.transform.calculatePosMatrix(K.tileID.toUnwrapped(),Qe),u_image:0,u_latrange:co(ge,K.tileID),u_light:[xe.paint.get("hillshade-exaggeration"),ke],u_shadow:te,u_highlight:ye,u_accent:je}},Qn=function(ge,K){var xe=K.stride,te=e.create();return e.ortho(te,0,e.EXTENT,-e.EXTENT,0,0,1),e.translate(te,te,[0,-e.EXTENT,0]),{u_matrix:te,u_image:1,u_dimension:[xe,xe],u_zoom:ge.overscaledZ,u_unpack:K.getUnpackVector()}};function co(ge,K){var xe=Math.pow(2,K.canonical.z),te=K.canonical.y;return[new e.MercatorCoordinate(0,te/xe).toLngLat().lat,new e.MercatorCoordinate(0,(te+1)/xe).toLngLat().lat]}var Tn=function(ge,K){return{u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_ratio:new e.Uniform1f(ge,K.u_ratio),u_device_pixel_ratio:new e.Uniform1f(ge,K.u_device_pixel_ratio),u_units_to_pixels:new e.Uniform2f(ge,K.u_units_to_pixels)}},un=function(ge,K){return{u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_ratio:new e.Uniform1f(ge,K.u_ratio),u_device_pixel_ratio:new e.Uniform1f(ge,K.u_device_pixel_ratio),u_units_to_pixels:new e.Uniform2f(ge,K.u_units_to_pixels),u_image:new e.Uniform1i(ge,K.u_image),u_image_height:new e.Uniform1f(ge,K.u_image_height)}},go=function(ge,K){return{u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_texsize:new e.Uniform2f(ge,K.u_texsize),u_ratio:new e.Uniform1f(ge,K.u_ratio),u_device_pixel_ratio:new e.Uniform1f(ge,K.u_device_pixel_ratio),u_image:new e.Uniform1i(ge,K.u_image),u_units_to_pixels:new e.Uniform2f(ge,K.u_units_to_pixels),u_scale:new e.Uniform3f(ge,K.u_scale),u_fade:new e.Uniform1f(ge,K.u_fade)}},Ko=function(ge,K){return{u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_ratio:new e.Uniform1f(ge,K.u_ratio),u_device_pixel_ratio:new e.Uniform1f(ge,K.u_device_pixel_ratio),u_units_to_pixels:new e.Uniform2f(ge,K.u_units_to_pixels),u_patternscale_a:new e.Uniform2f(ge,K.u_patternscale_a),u_patternscale_b:new e.Uniform2f(ge,K.u_patternscale_b),u_sdfgamma:new e.Uniform1f(ge,K.u_sdfgamma),u_image:new e.Uniform1i(ge,K.u_image),u_tex_y_a:new e.Uniform1f(ge,K.u_tex_y_a),u_tex_y_b:new e.Uniform1f(ge,K.u_tex_y_b),u_mix:new e.Uniform1f(ge,K.u_mix)}},Ms=function(ge,K,xe){var te=ge.transform;return{u_matrix:Fl(ge,K,xe),u_ratio:1/is(K,1,te.zoom),u_device_pixel_ratio:e.browser.devicePixelRatio,u_units_to_pixels:[1/te.pixelsToGLUnits[0],1/te.pixelsToGLUnits[1]]}},rl=function(ge,K,xe,te){return e.extend(Ms(ge,K,xe),{u_image:0,u_image_height:te})},Ns=function(ge,K,xe,te){var ye=ge.transform,je=ws(K,ye);return{u_matrix:Fl(ge,K,xe),u_texsize:K.imageAtlasTexture.size,u_ratio:1/is(K,1,ye.zoom),u_device_pixel_ratio:e.browser.devicePixelRatio,u_image:0,u_scale:[je,te.fromScale,te.toScale],u_fade:te.t,u_units_to_pixels:[1/ye.pixelsToGLUnits[0],1/ye.pixelsToGLUnits[1]]}},el=function(ge,K,xe,te,ye){var je=ge.transform,ke=ge.lineAtlas,Qe=ws(K,je),vt=xe.layout.get("line-cap")==="round",qt=ke.getDash(te.from,vt),wr=ke.getDash(te.to,vt),Nr=qt.width*ye.fromScale,pr=wr.width*ye.toScale;return e.extend(Ms(ge,K,xe),{u_patternscale_a:[Qe/Nr,-qt.height/2],u_patternscale_b:[Qe/pr,-wr.height/2],u_sdfgamma:ke.width/(Math.min(Nr,pr)*256*e.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:qt.y,u_tex_y_b:wr.y,u_mix:ye.t})};function ws(ge,K){return 1/is(ge,1,K.tileZoom)}function Fl(ge,K,xe){return ge.translatePosMatrix(K.tileID.posMatrix,K,xe.paint.get("line-translate"),xe.paint.get("line-translate-anchor"))}var _l=function(ge,K){return{u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_tl_parent:new e.Uniform2f(ge,K.u_tl_parent),u_scale_parent:new e.Uniform1f(ge,K.u_scale_parent),u_buffer_scale:new e.Uniform1f(ge,K.u_buffer_scale),u_fade_t:new e.Uniform1f(ge,K.u_fade_t),u_opacity:new e.Uniform1f(ge,K.u_opacity),u_image0:new e.Uniform1i(ge,K.u_image0),u_image1:new e.Uniform1i(ge,K.u_image1),u_brightness_low:new e.Uniform1f(ge,K.u_brightness_low),u_brightness_high:new e.Uniform1f(ge,K.u_brightness_high),u_saturation_factor:new e.Uniform1f(ge,K.u_saturation_factor),u_contrast_factor:new e.Uniform1f(ge,K.u_contrast_factor),u_spin_weights:new e.Uniform3f(ge,K.u_spin_weights)}},ll=function(ge,K,xe,te,ye){return{u_matrix:ge,u_tl_parent:K,u_scale_parent:xe,u_buffer_scale:1,u_fade_t:te.mix,u_opacity:te.opacity*ye.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:ye.paint.get("raster-brightness-min"),u_brightness_high:ye.paint.get("raster-brightness-max"),u_saturation_factor:Js(ye.paint.get("raster-saturation")),u_contrast_factor:Io(ye.paint.get("raster-contrast")),u_spin_weights:jn(ye.paint.get("raster-hue-rotate"))}};function jn(ge){ge*=Math.PI/180;var K=Math.sin(ge),xe=Math.cos(ge);return[(2*xe+1)/3,(-Math.sqrt(3)*K-xe+1)/3,(Math.sqrt(3)*K-xe+1)/3]}function Io(ge){return ge>0?1/(1-ge):1+ge}function Js(ge){return ge>0?1-1/(1.001-ge):-ge}var Ds=function(ge,K){return{u_is_size_zoom_constant:new e.Uniform1i(ge,K.u_is_size_zoom_constant),u_is_size_feature_constant:new e.Uniform1i(ge,K.u_is_size_feature_constant),u_size_t:new e.Uniform1f(ge,K.u_size_t),u_size:new e.Uniform1f(ge,K.u_size),u_camera_to_center_distance:new e.Uniform1f(ge,K.u_camera_to_center_distance),u_pitch:new e.Uniform1f(ge,K.u_pitch),u_rotate_symbol:new e.Uniform1i(ge,K.u_rotate_symbol),u_aspect_ratio:new e.Uniform1f(ge,K.u_aspect_ratio),u_fade_change:new e.Uniform1f(ge,K.u_fade_change),u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_label_plane_matrix:new e.UniformMatrix4f(ge,K.u_label_plane_matrix),u_coord_matrix:new e.UniformMatrix4f(ge,K.u_coord_matrix),u_is_text:new e.Uniform1i(ge,K.u_is_text),u_pitch_with_map:new e.Uniform1i(ge,K.u_pitch_with_map),u_texsize:new e.Uniform2f(ge,K.u_texsize),u_texture:new e.Uniform1i(ge,K.u_texture)}},uu=function(ge,K){return{u_is_size_zoom_constant:new e.Uniform1i(ge,K.u_is_size_zoom_constant),u_is_size_feature_constant:new e.Uniform1i(ge,K.u_is_size_feature_constant),u_size_t:new e.Uniform1f(ge,K.u_size_t),u_size:new e.Uniform1f(ge,K.u_size),u_camera_to_center_distance:new e.Uniform1f(ge,K.u_camera_to_center_distance),u_pitch:new e.Uniform1f(ge,K.u_pitch),u_rotate_symbol:new e.Uniform1i(ge,K.u_rotate_symbol),u_aspect_ratio:new e.Uniform1f(ge,K.u_aspect_ratio),u_fade_change:new e.Uniform1f(ge,K.u_fade_change),u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_label_plane_matrix:new e.UniformMatrix4f(ge,K.u_label_plane_matrix),u_coord_matrix:new e.UniformMatrix4f(ge,K.u_coord_matrix),u_is_text:new e.Uniform1i(ge,K.u_is_text),u_pitch_with_map:new e.Uniform1i(ge,K.u_pitch_with_map),u_texsize:new e.Uniform2f(ge,K.u_texsize),u_texture:new e.Uniform1i(ge,K.u_texture),u_gamma_scale:new e.Uniform1f(ge,K.u_gamma_scale),u_device_pixel_ratio:new e.Uniform1f(ge,K.u_device_pixel_ratio),u_is_halo:new e.Uniform1i(ge,K.u_is_halo)}},Iu=function(ge,K){return{u_is_size_zoom_constant:new e.Uniform1i(ge,K.u_is_size_zoom_constant),u_is_size_feature_constant:new e.Uniform1i(ge,K.u_is_size_feature_constant),u_size_t:new e.Uniform1f(ge,K.u_size_t),u_size:new e.Uniform1f(ge,K.u_size),u_camera_to_center_distance:new e.Uniform1f(ge,K.u_camera_to_center_distance),u_pitch:new e.Uniform1f(ge,K.u_pitch),u_rotate_symbol:new e.Uniform1i(ge,K.u_rotate_symbol),u_aspect_ratio:new e.Uniform1f(ge,K.u_aspect_ratio),u_fade_change:new e.Uniform1f(ge,K.u_fade_change),u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_label_plane_matrix:new e.UniformMatrix4f(ge,K.u_label_plane_matrix),u_coord_matrix:new e.UniformMatrix4f(ge,K.u_coord_matrix),u_is_text:new e.Uniform1i(ge,K.u_is_text),u_pitch_with_map:new e.Uniform1i(ge,K.u_pitch_with_map),u_texsize:new e.Uniform2f(ge,K.u_texsize),u_texsize_icon:new e.Uniform2f(ge,K.u_texsize_icon),u_texture:new e.Uniform1i(ge,K.u_texture),u_texture_icon:new e.Uniform1i(ge,K.u_texture_icon),u_gamma_scale:new e.Uniform1f(ge,K.u_gamma_scale),u_device_pixel_ratio:new e.Uniform1f(ge,K.u_device_pixel_ratio),u_is_halo:new e.Uniform1i(ge,K.u_is_halo)}},Zu=function(ge,K,xe,te,ye,je,ke,Qe,vt,qt){var wr=ye.transform;return{u_is_size_zoom_constant:+(ge==="constant"||ge==="source"),u_is_size_feature_constant:+(ge==="constant"||ge==="camera"),u_size_t:K?K.uSizeT:0,u_size:K?K.uSize:0,u_camera_to_center_distance:wr.cameraToCenterDistance,u_pitch:wr.pitch/360*2*Math.PI,u_rotate_symbol:+xe,u_aspect_ratio:wr.width/wr.height,u_fade_change:ye.options.fadeDuration?ye.symbolFadeChange:1,u_matrix:je,u_label_plane_matrix:ke,u_coord_matrix:Qe,u_is_text:+vt,u_pitch_with_map:+te,u_texsize:qt,u_texture:0}},Ic=function(ge,K,xe,te,ye,je,ke,Qe,vt,qt,wr){var Nr=ye.transform;return e.extend(Zu(ge,K,xe,te,ye,je,ke,Qe,vt,qt),{u_gamma_scale:te?Math.cos(Nr._pitch)*Nr.cameraToCenterDistance:1,u_device_pixel_ratio:e.browser.devicePixelRatio,u_is_halo:+wr})},bu=function(ge,K,xe,te,ye,je,ke,Qe,vt,qt){return e.extend(Ic(ge,K,xe,te,ye,je,ke,Qe,!0,vt,!0),{u_texsize_icon:qt,u_texture_icon:1})},Rc=function(ge,K){return{u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_opacity:new e.Uniform1f(ge,K.u_opacity),u_color:new e.UniformColor(ge,K.u_color)}},Au=function(ge,K){return{u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_opacity:new e.Uniform1f(ge,K.u_opacity),u_image:new e.Uniform1i(ge,K.u_image),u_pattern_tl_a:new e.Uniform2f(ge,K.u_pattern_tl_a),u_pattern_br_a:new e.Uniform2f(ge,K.u_pattern_br_a),u_pattern_tl_b:new e.Uniform2f(ge,K.u_pattern_tl_b),u_pattern_br_b:new e.Uniform2f(ge,K.u_pattern_br_b),u_texsize:new e.Uniform2f(ge,K.u_texsize),u_mix:new e.Uniform1f(ge,K.u_mix),u_pattern_size_a:new e.Uniform2f(ge,K.u_pattern_size_a),u_pattern_size_b:new e.Uniform2f(ge,K.u_pattern_size_b),u_scale_a:new e.Uniform1f(ge,K.u_scale_a),u_scale_b:new e.Uniform1f(ge,K.u_scale_b),u_pixel_coord_upper:new e.Uniform2f(ge,K.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(ge,K.u_pixel_coord_lower),u_tile_units_to_pixels:new e.Uniform1f(ge,K.u_tile_units_to_pixels)}},yc=function(ge,K,xe){return{u_matrix:ge,u_opacity:K,u_color:xe}},fo=function(ge,K,xe,te,ye,je){return e.extend(Kc(te,je,xe,ye),{u_matrix:ge,u_opacity:K})},zo={fillExtrusion:Lf,fillExtrusionPattern:iu,fill:Cc,fillPattern:gc,fillOutline:ql,fillOutlinePattern:xu,circle:Qt,collisionBox:aa,collisionCircle:$r,debug:Ci,clippingMask:Qi,heatmap:Pi,heatmapTexture:Di,hillshade:Sn,hillshadePrepare:$n,line:Tn,lineGradient:un,linePattern:go,lineSDF:Ko,raster:_l,symbolIcon:Ds,symbolSDF:uu,symbolTextAndIcon:Iu,background:Rc,backgroundPattern:Au},Dc;function lc(ge,K,xe,te,ye,je,ke){for(var Qe=ge.context,vt=Qe.gl,qt=ge.useProgram("collisionBox"),wr=[],Nr=0,pr=0,mt=0;mt0){var or=e.create(),Wt=hr;e.mul(or,rr.placementInvProjMatrix,ge.transform.glCoordMatrix),e.mul(or,or,rr.placementViewportMatrix),wr.push({circleArray:dr,circleOffset:pr,transform:Wt,invTransform:or}),Nr+=dr.length/4,pr=Nr}nr&&qt.draw(Qe,vt.LINES,Ia.disabled,Ca.disabled,ge.colorModeForRenderPass(),Fr.disabled,ka(hr,ge.transform,Ft),xe.id,nr.layoutVertexBuffer,nr.indexBuffer,nr.segments,null,ge.transform.zoom,null,null,nr.collisionVertexBuffer)}}if(!(!ke||!wr.length)){var ir=ge.useProgram("collisionCircle"),Vt=new e.StructArrayLayout2f1f2i16;Vt.resize(Nr*4),Vt._trim();for(var Dr=0,Jr=0,ga=wr;Jr=0&&(St[rr.associatedIconIndex]={shiftedAnchor:ai,angle:Zi})}}if(wr){mt.clear();for(var ui=ge.icon.placedSymbolArray,_i=0;_i0){var ke=e.browser.now(),Qe=(ke-ge.timeAdded)/je,vt=K?(ke-K.timeAdded)/je:-1,qt=xe.getSource(),wr=ye.coveringZoomLevel({tileSize:qt.tileSize,roundZoom:qt.roundZoom}),Nr=!K||Math.abs(K.tileID.overscaledZ-wr)>Math.abs(ge.tileID.overscaledZ-wr),pr=Nr&&ge.refreshedUponExpiration?1:e.clamp(Nr?Qe:1-vt,0,1);return ge.refreshedUponExpiration&&Qe>=1&&(ge.refreshedUponExpiration=!1),K?{opacity:1,mix:1-pr}:{opacity:pr,mix:0}}else return{opacity:1,mix:0}}function kr(ge,K,xe){var te=xe.paint.get("background-color"),ye=xe.paint.get("background-opacity");if(ye!==0){var je=ge.context,ke=je.gl,Qe=ge.transform,vt=Qe.tileSize,qt=xe.paint.get("background-pattern");if(!ge.isPatternMissing(qt)){var wr=!qt&&te.a===1&&ye===1&&ge.opaquePassEnabledForLayer()?"opaque":"translucent";if(ge.renderPass===wr){var Nr=Ca.disabled,pr=ge.depthModeForSublayer(0,wr==="opaque"?Ia.ReadWrite:Ia.ReadOnly),mt=ge.colorModeForRenderPass(),St=ge.useProgram(qt?"backgroundPattern":"background"),Ft=Qe.coveringTiles({tileSize:vt});qt&&(je.activeTexture.set(ke.TEXTURE0),ge.imageManager.bind(ge.context));for(var rr=xe.getCrossfadeParameters(),hr=0,nr=Ft;hr "+xe.overscaledZ);var hr=rr+" "+mt+"kb";wo(ge,hr),ke.draw(te,ye.TRIANGLES,Qe,vt,Dt.alphaBlended,Fr.disabled,Hi(je,e.Color.transparent,Ft),wr,ge.debugBuffer,ge.quadTriangleIndexBuffer,ge.debugSegments)}function wo(ge,K){ge.initDebugOverlayCanvas();var xe=ge.debugOverlayCanvas,te=ge.context.gl,ye=ge.debugOverlayCanvas.getContext("2d");ye.clearRect(0,0,xe.width,xe.height),ye.shadowColor="white",ye.shadowBlur=2,ye.lineWidth=1.5,ye.strokeStyle="white",ye.textBaseline="top",ye.font="bold 36px Open Sans, sans-serif",ye.fillText(K,5,5),ye.strokeText(K,5,5),ge.debugOverlayTexture.update(xe),ge.debugOverlayTexture.bind(te.LINEAR,te.CLAMP_TO_EDGE)}function os(ge,K,xe){var te=ge.context,ye=xe.implementation;if(ge.renderPass==="offscreen"){var je=ye.prerender;je&&(ge.setCustomLayerDefaults(),te.setColorMode(ge.colorModeForRenderPass()),je.call(ye,te.gl,ge.transform.customLayerMatrix()),te.setDirty(),ge.setBaseState())}else if(ge.renderPass==="translucent"){ge.setCustomLayerDefaults(),te.setColorMode(ge.colorModeForRenderPass()),te.setStencilMode(Ca.disabled);var ke=ye.renderingMode==="3d"?new Ia(ge.context.gl.LEQUAL,Ia.ReadWrite,ge.depthRangeFor3D):ge.depthModeForSublayer(0,Ia.ReadOnly);te.setDepthMode(ke),ye.render(te.gl,ge.transform.customLayerMatrix()),te.setDirty(),ge.setBaseState(),te.bindFramebuffer.set(null)}}var So={symbol:I,circle:Ot,heatmap:$t,line:na,fill:Ve,"fill-extrusion":ot,hillshade:Et,raster:lr,background:kr,debug:Yn,custom:os},Zo=function(K,xe){this.context=new ta(K),this.transform=xe,this._tileTextures={},this.setup(),this.numSublayers=ra.maxUnderzooming+ra.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new vl,this.gpuTimers={}};Zo.prototype.resize=function(K,xe){if(this.width=K*e.browser.devicePixelRatio,this.height=xe*e.browser.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var te=0,ye=this.style._order;te256&&this.clearStencil(),te.setColorMode(Dt.disabled),te.setDepthMode(Ia.disabled);var je=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var ke=0,Qe=xe;ke256&&this.clearStencil();var K=this.nextStencilID++,xe=this.context.gl;return new Ca({func:xe.NOTEQUAL,mask:255},K,255,xe.KEEP,xe.KEEP,xe.REPLACE)},Zo.prototype.stencilModeForClipping=function(K){var xe=this.context.gl;return new Ca({func:xe.EQUAL,mask:255},this._tileClippingMaskIDs[K.key],0,xe.KEEP,xe.KEEP,xe.REPLACE)},Zo.prototype.stencilConfigForOverlap=function(K){var xe,te=this.context.gl,ye=K.sort(function(qt,wr){return wr.overscaledZ-qt.overscaledZ}),je=ye[ye.length-1].overscaledZ,ke=ye[0].overscaledZ-je+1;if(ke>1){this.currentStencilSource=void 0,this.nextStencilID+ke>256&&this.clearStencil();for(var Qe={},vt=0;vt=0;this.currentLayer--){var or=this.style._layers[ye[this.currentLayer]],Wt=je[or.source],ir=vt[or.source];this._renderTileClippingMasks(or,ir),this.renderLayer(this,Wt,or,ir)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer0?xe.pop():null},Zo.prototype.isPatternMissing=function(K){if(!K)return!1;if(!K.from||!K.to)return!0;var xe=this.imageManager.getPattern(K.from.toString()),te=this.imageManager.getPattern(K.to.toString());return!xe||!te},Zo.prototype.useProgram=function(K,xe){this.cache=this.cache||{};var te=""+K+(xe?xe.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[te]||(this.cache[te]=new gf(this.context,K,uf[K],xe,zo[K],this._showOverdrawInspector)),this.cache[te]},Zo.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()},Zo.prototype.setBaseState=function(){var K=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(K.FUNC_ADD)},Zo.prototype.initDebugOverlayCanvas=function(){if(this.debugOverlayCanvas==null){this.debugOverlayCanvas=e.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;var K=this.context.gl;this.debugOverlayTexture=new e.Texture(this.context,this.debugOverlayCanvas,K.RGBA)}},Zo.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var hs=function(K,xe){this.points=K,this.planes=xe};hs.fromInvProjectionMatrix=function(K,xe,te){var ye=[[-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]],je=Math.pow(2,te),ke=ye.map(function(qt){return e.transformMat4([],qt,K)}).map(function(qt){return e.scale$1([],qt,1/qt[3]/xe*je)}),Qe=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]],vt=Qe.map(function(qt){var wr=e.sub([],ke[qt[0]],ke[qt[1]]),Nr=e.sub([],ke[qt[2]],ke[qt[1]]),pr=e.normalize([],e.cross([],wr,Nr)),mt=-e.dot(pr,ke[qt[1]]);return pr.concat(mt)});return new hs(ke,vt)};var ul=function(K,xe){this.min=K,this.max=xe,this.center=e.scale$2([],e.add([],this.min,this.max),.5)};ul.prototype.quadrant=function(K){for(var xe=[K%2===0,K<2],te=e.clone$2(this.min),ye=e.clone$2(this.max),je=0;je=0;if(ke===0)return 0;ke!==xe.length&&(te=!1)}if(te)return 2;for(var vt=0;vt<3;vt++){for(var qt=Number.MAX_VALUE,wr=-Number.MAX_VALUE,Nr=0;Nrthis.max[vt]-this.min[vt])return 0}return 1};var tl=function(K,xe,te,ye){if(K===void 0&&(K=0),xe===void 0&&(xe=0),te===void 0&&(te=0),ye===void 0&&(ye=0),isNaN(K)||K<0||isNaN(xe)||xe<0||isNaN(te)||te<0||isNaN(ye)||ye<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=K,this.bottom=xe,this.left=te,this.right=ye};tl.prototype.interpolate=function(K,xe,te){return xe.top!=null&&K.top!=null&&(this.top=e.number(K.top,xe.top,te)),xe.bottom!=null&&K.bottom!=null&&(this.bottom=e.number(K.bottom,xe.bottom,te)),xe.left!=null&&K.left!=null&&(this.left=e.number(K.left,xe.left,te)),xe.right!=null&&K.right!=null&&(this.right=e.number(K.right,xe.right,te)),this},tl.prototype.getCenter=function(K,xe){var te=e.clamp((this.left+K-this.right)/2,0,K),ye=e.clamp((this.top+xe-this.bottom)/2,0,xe);return new e.Point(te,ye)},tl.prototype.equals=function(K){return this.top===K.top&&this.bottom===K.bottom&&this.left===K.left&&this.right===K.right},tl.prototype.clone=function(){return new tl(this.top,this.bottom,this.left,this.right)},tl.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var Jo=function(K,xe,te,ye,je){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=je===void 0?!0:je,this._minZoom=K||0,this._maxZoom=xe||22,this._minPitch=te??0,this._maxPitch=ye??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new e.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new tl,this._posMatrixCache={},this._alignedPosMatrixCache={}},$o={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}};Jo.prototype.clone=function(){var K=new Jo(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return K.tileSize=this.tileSize,K.latRange=this.latRange,K.width=this.width,K.height=this.height,K._center=this._center,K.zoom=this.zoom,K.angle=this.angle,K._fov=this._fov,K._pitch=this._pitch,K._unmodified=this._unmodified,K._edgeInsets=this._edgeInsets.clone(),K._calcMatrices(),K},$o.minZoom.get=function(){return this._minZoom},$o.minZoom.set=function(ge){this._minZoom!==ge&&(this._minZoom=ge,this.zoom=Math.max(this.zoom,ge))},$o.maxZoom.get=function(){return this._maxZoom},$o.maxZoom.set=function(ge){this._maxZoom!==ge&&(this._maxZoom=ge,this.zoom=Math.min(this.zoom,ge))},$o.minPitch.get=function(){return this._minPitch},$o.minPitch.set=function(ge){this._minPitch!==ge&&(this._minPitch=ge,this.pitch=Math.max(this.pitch,ge))},$o.maxPitch.get=function(){return this._maxPitch},$o.maxPitch.set=function(ge){this._maxPitch!==ge&&(this._maxPitch=ge,this.pitch=Math.min(this.pitch,ge))},$o.renderWorldCopies.get=function(){return this._renderWorldCopies},$o.renderWorldCopies.set=function(ge){ge===void 0?ge=!0:ge===null&&(ge=!1),this._renderWorldCopies=ge},$o.worldSize.get=function(){return this.tileSize*this.scale},$o.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},$o.size.get=function(){return new e.Point(this.width,this.height)},$o.bearing.get=function(){return-this.angle/Math.PI*180},$o.bearing.set=function(ge){var K=-e.wrap(ge,-180,180)*Math.PI/180;this.angle!==K&&(this._unmodified=!1,this.angle=K,this._calcMatrices(),this.rotationMatrix=e.create$2(),e.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},$o.pitch.get=function(){return this._pitch/Math.PI*180},$o.pitch.set=function(ge){var K=e.clamp(ge,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==K&&(this._unmodified=!1,this._pitch=K,this._calcMatrices())},$o.fov.get=function(){return this._fov/Math.PI*180},$o.fov.set=function(ge){ge=Math.max(.01,Math.min(60,ge)),this._fov!==ge&&(this._unmodified=!1,this._fov=ge/180*Math.PI,this._calcMatrices())},$o.zoom.get=function(){return this._zoom},$o.zoom.set=function(ge){var K=Math.min(Math.max(ge,this.minZoom),this.maxZoom);this._zoom!==K&&(this._unmodified=!1,this._zoom=K,this.scale=this.zoomScale(K),this.tileZoom=Math.floor(K),this.zoomFraction=K-this.tileZoom,this._constrain(),this._calcMatrices())},$o.center.get=function(){return this._center},$o.center.set=function(ge){ge.lat===this._center.lat&&ge.lng===this._center.lng||(this._unmodified=!1,this._center=ge,this._constrain(),this._calcMatrices())},$o.padding.get=function(){return this._edgeInsets.toJSON()},$o.padding.set=function(ge){this._edgeInsets.equals(ge)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,ge,1),this._calcMatrices())},$o.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},Jo.prototype.isPaddingEqual=function(K){return this._edgeInsets.equals(K)},Jo.prototype.interpolatePadding=function(K,xe,te){this._unmodified=!1,this._edgeInsets.interpolate(K,xe,te),this._constrain(),this._calcMatrices()},Jo.prototype.coveringZoomLevel=function(K){var xe=(K.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/K.tileSize));return Math.max(0,xe)},Jo.prototype.getVisibleUnwrappedCoordinates=function(K){var xe=[new e.UnwrappedTileID(0,K)];if(this._renderWorldCopies)for(var te=this.pointCoordinate(new e.Point(0,0)),ye=this.pointCoordinate(new e.Point(this.width,0)),je=this.pointCoordinate(new e.Point(this.width,this.height)),ke=this.pointCoordinate(new e.Point(0,this.height)),Qe=Math.floor(Math.min(te.x,ye.x,je.x,ke.x)),vt=Math.floor(Math.max(te.x,ye.x,je.x,ke.x)),qt=1,wr=Qe-qt;wr<=vt+qt;wr++)wr!==0&&xe.push(new e.UnwrappedTileID(wr,K));return xe},Jo.prototype.coveringTiles=function(K){var xe=this.coveringZoomLevel(K),te=xe;if(K.minzoom!==void 0&&xeK.maxzoom&&(xe=K.maxzoom);var ye=e.MercatorCoordinate.fromLngLat(this.center),je=Math.pow(2,xe),ke=[je*ye.x,je*ye.y,0],Qe=hs.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,xe),vt=K.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(vt=xe);var qt=3,wr=function(Ga){return{aabb:new ul([Ga*je,0,0],[(Ga+1)*je,je,0]),zoom:0,x:0,y:0,wrap:Ga,fullyVisible:!1}},Nr=[],pr=[],mt=xe,St=K.reparseOverscaled?te:xe;if(this._renderWorldCopies)for(var Ft=1;Ft<=3;Ft++)Nr.push(wr(-Ft)),Nr.push(wr(Ft));for(Nr.push(wr(0));Nr.length>0;){var rr=Nr.pop(),hr=rr.x,nr=rr.y,dr=rr.fullyVisible;if(!dr){var or=rr.aabb.intersects(Qe);if(or===0)continue;dr=or===2}var Wt=rr.aabb.distanceX(ke),ir=rr.aabb.distanceY(ke),Vt=Math.max(Math.abs(Wt),Math.abs(ir)),Dr=qt+(1<Dr&&rr.zoom>=vt){pr.push({tileID:new e.OverscaledTileID(rr.zoom===mt?St:rr.zoom,rr.wrap,rr.zoom,hr,nr),distanceSq:e.sqrLen([ke[0]-.5-hr,ke[1]-.5-nr])});continue}for(var Jr=0;Jr<4;Jr++){var ga=(hr<<1)+Jr%2,vi=(nr<<1)+(Jr>>1);Nr.push({aabb:rr.aabb.quadrant(Jr),zoom:rr.zoom+1,x:ga,y:vi,wrap:rr.wrap,fullyVisible:dr})}}return pr.sort(function(Ga,ai){return Ga.distanceSq-ai.distanceSq}).map(function(Ga){return Ga.tileID})},Jo.prototype.resize=function(K,xe){this.width=K,this.height=xe,this.pixelsToGLUnits=[2/K,-2/xe],this._constrain(),this._calcMatrices()},$o.unmodified.get=function(){return this._unmodified},Jo.prototype.zoomScale=function(K){return Math.pow(2,K)},Jo.prototype.scaleZoom=function(K){return Math.log(K)/Math.LN2},Jo.prototype.project=function(K){var xe=e.clamp(K.lat,-this.maxValidLatitude,this.maxValidLatitude);return new e.Point(e.mercatorXfromLng(K.lng)*this.worldSize,e.mercatorYfromLat(xe)*this.worldSize)},Jo.prototype.unproject=function(K){return new e.MercatorCoordinate(K.x/this.worldSize,K.y/this.worldSize).toLngLat()},$o.point.get=function(){return this.project(this.center)},Jo.prototype.setLocationAtPoint=function(K,xe){var te=this.pointCoordinate(xe),ye=this.pointCoordinate(this.centerPoint),je=this.locationCoordinate(K),ke=new e.MercatorCoordinate(je.x-(te.x-ye.x),je.y-(te.y-ye.y));this.center=this.coordinateLocation(ke),this._renderWorldCopies&&(this.center=this.center.wrap())},Jo.prototype.locationPoint=function(K){return this.coordinatePoint(this.locationCoordinate(K))},Jo.prototype.pointLocation=function(K){return this.coordinateLocation(this.pointCoordinate(K))},Jo.prototype.locationCoordinate=function(K){return e.MercatorCoordinate.fromLngLat(K)},Jo.prototype.coordinateLocation=function(K){return K.toLngLat()},Jo.prototype.pointCoordinate=function(K){var xe=0,te=[K.x,K.y,0,1],ye=[K.x,K.y,1,1];e.transformMat4(te,te,this.pixelMatrixInverse),e.transformMat4(ye,ye,this.pixelMatrixInverse);var je=te[3],ke=ye[3],Qe=te[0]/je,vt=ye[0]/ke,qt=te[1]/je,wr=ye[1]/ke,Nr=te[2]/je,pr=ye[2]/ke,mt=Nr===pr?0:(xe-Nr)/(pr-Nr);return new e.MercatorCoordinate(e.number(Qe,vt,mt)/this.worldSize,e.number(qt,wr,mt)/this.worldSize)},Jo.prototype.coordinatePoint=function(K){var xe=[K.x*this.worldSize,K.y*this.worldSize,0,1];return e.transformMat4(xe,xe,this.pixelMatrix),new e.Point(xe[0]/xe[3],xe[1]/xe[3])},Jo.prototype.getBounds=function(){return new e.LngLatBounds().extend(this.pointLocation(new e.Point(0,0))).extend(this.pointLocation(new e.Point(this.width,0))).extend(this.pointLocation(new e.Point(this.width,this.height))).extend(this.pointLocation(new e.Point(0,this.height)))},Jo.prototype.getMaxBounds=function(){return!this.latRange||this.latRange.length!==2||!this.lngRange||this.lngRange.length!==2?null:new e.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]])},Jo.prototype.setMaxBounds=function(K){K?(this.lngRange=[K.getWest(),K.getEast()],this.latRange=[K.getSouth(),K.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},Jo.prototype.calculatePosMatrix=function(K,xe){xe===void 0&&(xe=!1);var te=K.key,ye=xe?this._alignedPosMatrixCache:this._posMatrixCache;if(ye[te])return ye[te];var je=K.canonical,ke=this.worldSize/this.zoomScale(je.z),Qe=je.x+Math.pow(2,je.z)*K.wrap,vt=e.identity(new Float64Array(16));return e.translate(vt,vt,[Qe*ke,je.y*ke,0]),e.scale(vt,vt,[ke/e.EXTENT,ke/e.EXTENT,1]),e.multiply(vt,xe?this.alignedProjMatrix:this.projMatrix,vt),ye[te]=new Float32Array(vt),ye[te]},Jo.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},Jo.prototype._constrain=function(){if(!(!this.center||!this.width||!this.height||this._constraining)){this._constraining=!0;var K=-90,xe=90,te=-180,ye=180,je,ke,Qe,vt,qt=this.size,wr=this._unmodified;if(this.latRange){var Nr=this.latRange;K=e.mercatorYfromLat(Nr[1])*this.worldSize,xe=e.mercatorYfromLat(Nr[0])*this.worldSize,je=xe-Kxe&&(vt=xe-rr)}if(this.lngRange){var hr=mt.x,nr=qt.x/2;hr-nrye&&(Qe=ye-nr)}(Qe!==void 0||vt!==void 0)&&(this.center=this.unproject(new e.Point(Qe!==void 0?Qe:mt.x,vt!==void 0?vt:mt.y))),this._unmodified=wr,this._constraining=!1}},Jo.prototype._calcMatrices=function(){if(this.height){var K=this._fov/2,xe=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(K)*this.height;var te=Math.PI/2+this._pitch,ye=this._fov*(.5+xe.y/this.height),je=Math.sin(ye)*this.cameraToCenterDistance/Math.sin(e.clamp(Math.PI-te-ye,.01,Math.PI-.01)),ke=this.point,Qe=ke.x,vt=ke.y,qt=Math.cos(Math.PI/2-this._pitch)*je+this.cameraToCenterDistance,wr=qt*1.01,Nr=this.height/50,pr=new Float64Array(16);e.perspective(pr,this._fov,this.width/this.height,Nr,wr),pr[8]=-xe.x*2/this.width,pr[9]=xe.y*2/this.height,e.scale(pr,pr,[1,-1,1]),e.translate(pr,pr,[0,0,-this.cameraToCenterDistance]),e.rotateX(pr,pr,this._pitch),e.rotateZ(pr,pr,this.angle),e.translate(pr,pr,[-Qe,-vt,0]),this.mercatorMatrix=e.scale([],pr,[this.worldSize,this.worldSize,this.worldSize]),e.scale(pr,pr,[1,1,e.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=pr,this.invProjMatrix=e.invert([],this.projMatrix);var mt=this.width%2/2,St=this.height%2/2,Ft=Math.cos(this.angle),rr=Math.sin(this.angle),hr=Qe-Math.round(Qe)+Ft*mt+rr*St,nr=vt-Math.round(vt)+Ft*St+rr*mt,dr=new Float64Array(pr);if(e.translate(dr,dr,[hr>.5?hr-1:hr,nr>.5?nr-1:nr,0]),this.alignedProjMatrix=dr,pr=e.create(),e.scale(pr,pr,[this.width/2,-this.height/2,1]),e.translate(pr,pr,[1,-1,0]),this.labelPlaneMatrix=pr,pr=e.create(),e.scale(pr,pr,[1,-1,1]),e.translate(pr,pr,[-1,-1,0]),e.scale(pr,pr,[2/this.width,2/this.height,1]),this.glCoordMatrix=pr,this.pixelMatrix=e.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),pr=e.invert(new Float64Array(16),this.pixelMatrix),!pr)throw new Error("failed to invert matrix");this.pixelMatrixInverse=pr,this._posMatrixCache={},this._alignedPosMatrixCache={}}},Jo.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var K=this.pointCoordinate(new e.Point(0,0)),xe=[K.x*this.worldSize,K.y*this.worldSize,0,1],te=e.transformMat4(xe,xe,this.pixelMatrix);return te[3]/this.cameraToCenterDistance},Jo.prototype.getCameraPoint=function(){var K=this._pitch,xe=Math.tan(K)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new e.Point(0,xe))},Jo.prototype.getCameraQueryGeometry=function(K){var xe=this.getCameraPoint();if(K.length===1)return[K[0],xe];for(var te=xe.x,ye=xe.y,je=xe.x,ke=xe.y,Qe=0,vt=K;Qe=3&&!K.some(function(te){return isNaN(te)})){var xe=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(K[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+K[2],+K[1]],zoom:+K[0],bearing:xe,pitch:+(K[4]||0)}),!0}return!1},eu.prototype._updateHashUnthrottled=function(){var K=e.window.location.href.replace(/(#.+)?$/,this.getHashString());try{e.window.history.replaceState(e.window.history.state,null,K)}catch{}};var Ru={linearity:.3,easing:e.bezier(0,0,.3,1)},vu=e.extend({deceleration:2500,maxSpeed:1400},Ru),Tl=e.extend({deceleration:20,maxSpeed:1400},Ru),cu=e.extend({deceleration:1e3,maxSpeed:360},Ru),uc=e.extend({deceleration:1e3,maxSpeed:90},Ru),Vl=function(K){this._map=K,this.clear()};Vl.prototype.clear=function(){this._inertiaBuffer=[]},Vl.prototype.record=function(K){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:e.browser.now(),settings:K})},Vl.prototype._drainInertiaBuffer=function(){for(var K=this._inertiaBuffer,xe=e.browser.now(),te=160;K.length>0&&xe-K[0].time>te;)K.shift()},Vl.prototype._onMoveEnd=function(K){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var xe={zoom:0,bearing:0,pitch:0,pan:new e.Point(0,0),pinchAround:void 0,around:void 0},te=0,ye=this._inertiaBuffer;te=this._clickTolerance||this._map.fire(new De(K.type,this._map,K))},yt.prototype.dblclick=function(K){return this._firePreventable(new De(K.type,this._map,K))},yt.prototype.mouseover=function(K){this._map.fire(new De(K.type,this._map,K))},yt.prototype.mouseout=function(K){this._map.fire(new De(K.type,this._map,K))},yt.prototype.touchstart=function(K){return this._firePreventable(new et(K.type,this._map,K))},yt.prototype.touchmove=function(K){this._map.fire(new et(K.type,this._map,K))},yt.prototype.touchend=function(K){this._map.fire(new et(K.type,this._map,K))},yt.prototype.touchcancel=function(K){this._map.fire(new et(K.type,this._map,K))},yt.prototype._firePreventable=function(K){if(this._map.fire(K),K.defaultPrevented)return{}},yt.prototype.isEnabled=function(){return!0},yt.prototype.isActive=function(){return!1},yt.prototype.enable=function(){},yt.prototype.disable=function(){};var Tt=function(K){this._map=K};Tt.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},Tt.prototype.mousemove=function(K){this._map.fire(new De(K.type,this._map,K))},Tt.prototype.mousedown=function(){this._delayContextMenu=!0},Tt.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new De("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},Tt.prototype.contextmenu=function(K){this._delayContextMenu?this._contextMenuEvent=K:this._map.fire(new De(K.type,this._map,K)),this._map.listens("contextmenu")&&K.preventDefault()},Tt.prototype.isEnabled=function(){return!0},Tt.prototype.isActive=function(){return!1},Tt.prototype.enable=function(){},Tt.prototype.disable=function(){};var tr=function(K,xe){this._map=K,this._el=K.getCanvasContainer(),this._container=K.getContainer(),this._clickTolerance=xe.clickTolerance||1};tr.prototype.isEnabled=function(){return!!this._enabled},tr.prototype.isActive=function(){return!!this._active},tr.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},tr.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},tr.prototype.mousedown=function(K,xe){this.isEnabled()&&K.shiftKey&&K.button===0&&(r.disableDrag(),this._startPos=this._lastPos=xe,this._active=!0)},tr.prototype.mousemoveWindow=function(K,xe){if(this._active){var te=xe;if(!(this._lastPos.equals(te)||!this._box&&te.dist(this._startPos)this.numTouches)&&(this.aborted=!0),!this.aborted&&(this.startTime===void 0&&(this.startTime=K.timeStamp),te.length===this.numTouches&&(this.centroid=_r(xe),this.touches=zt(te,xe)))},pa.prototype.touchmove=function(K,xe,te){if(!(this.aborted||!this.centroid)){var ye=zt(te,xe);for(var je in this.touches){var ke=this.touches[je],Qe=ye[je];(!Qe||Qe.dist(ke)>xa)&&(this.aborted=!0)}}},pa.prototype.touchend=function(K,xe,te){if((!this.centroid||K.timeStamp-this.startTime>Xr)&&(this.aborted=!0),te.length===0){var ye=!this.aborted&&this.centroid;if(this.reset(),ye)return ye}};var Ja=function(K){this.singleTap=new pa(K),this.numTaps=K.numTaps,this.reset()};Ja.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},Ja.prototype.touchstart=function(K,xe,te){this.singleTap.touchstart(K,xe,te)},Ja.prototype.touchmove=function(K,xe,te){this.singleTap.touchmove(K,xe,te)},Ja.prototype.touchend=function(K,xe,te){var ye=this.singleTap.touchend(K,xe,te);if(ye){var je=K.timeStamp-this.lastTime0&&(this._active=!0);var ye=zt(te,xe),je=new e.Point(0,0),ke=new e.Point(0,0),Qe=0;for(var vt in ye){var qt=ye[vt],wr=this._touches[vt];wr&&(je._add(qt),ke._add(qt.sub(wr)),Qe++,ye[vt]=qt)}if(this._touches=ye,!(QeMath.abs(ge.x)}var mn=100,po=function(ge){function K(){ge.apply(this,arguments)}return ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K,K.prototype.reset=function(){ge.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},K.prototype._start=function(te){this._lastPoints=te,xl(te[0].sub(te[1]))&&(this._valid=!1)},K.prototype._move=function(te,ye,je){var ke=te[0].sub(this._lastPoints[0]),Qe=te[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(ke,Qe,je.timeStamp),!!this._valid){this._lastPoints=te,this._active=!0;var vt=(ke.y+Qe.y)/2,qt=-.5;return{pitchDelta:vt*qt}}},K.prototype.gestureBeginsVertically=function(te,ye,je){if(this._valid!==void 0)return this._valid;var ke=2,Qe=te.mag()>=ke,vt=ye.mag()>=ke;if(!(!Qe&&!vt)){if(!Qe||!vt)return this._firstMove===void 0&&(this._firstMove=je),je-this._firstMove0==ye.y>0;return xl(te)&&xl(ye)&&qt}},K}(In),cs={panStep:100,bearingStep:15,pitchStep:10},vs=function(){var K=cs;this._panStep=K.panStep,this._bearingStep=K.bearingStep,this._pitchStep=K.pitchStep,this._rotationDisabled=!1};vs.prototype.reset=function(){this._active=!1},vs.prototype.keydown=function(K){var xe=this;if(!(K.altKey||K.ctrlKey||K.metaKey)){var te=0,ye=0,je=0,ke=0,Qe=0;switch(K.keyCode){case 61:case 107:case 171:case 187:te=1;break;case 189:case 109:case 173:te=-1;break;case 37:K.shiftKey?ye=-1:(K.preventDefault(),ke=-1);break;case 39:K.shiftKey?ye=1:(K.preventDefault(),ke=1);break;case 38:K.shiftKey?je=1:(K.preventDefault(),Qe=-1);break;case 40:K.shiftKey?je=-1:(K.preventDefault(),Qe=1);break;default:return}return this._rotationDisabled&&(ye=0,je=0),{cameraAnimation:function(vt){var qt=vt.getZoom();vt.easeTo({duration:300,easeId:"keyboardHandler",easing:Al,zoom:te?Math.round(qt)+te*(K.shiftKey?2:1):qt,bearing:vt.getBearing()+ye*xe._bearingStep,pitch:vt.getPitch()+je*xe._pitchStep,offset:[-ke*xe._panStep,-Qe*xe._panStep],center:vt.getCenter()},{originalEvent:K})}}}},vs.prototype.enable=function(){this._enabled=!0},vs.prototype.disable=function(){this._enabled=!1,this.reset()},vs.prototype.isEnabled=function(){return this._enabled},vs.prototype.isActive=function(){return this._active},vs.prototype.disableRotation=function(){this._rotationDisabled=!0},vs.prototype.enableRotation=function(){this._rotationDisabled=!1};function Al(ge){return ge*(2-ge)}var Hl=4.000244140625,Su=1/100,Rl=1/450,_c=2,it=function(K,xe){this._map=K,this._el=K.getCanvasContainer(),this._handler=xe,this._delta=0,this._defaultZoomRate=Su,this._wheelZoomRate=Rl,e.bindAll(["_onTimeout"],this)};it.prototype.setZoomRate=function(K){this._defaultZoomRate=K},it.prototype.setWheelZoomRate=function(K){this._wheelZoomRate=K},it.prototype.isEnabled=function(){return!!this._enabled},it.prototype.isActive=function(){return!!this._active||this._finishTimeout!==void 0},it.prototype.isZooming=function(){return!!this._zooming},it.prototype.enable=function(K){this.isEnabled()||(this._enabled=!0,this._aroundCenter=K&&K.around==="center")},it.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},it.prototype.wheel=function(K){if(this.isEnabled()){var xe=K.deltaMode===e.window.WheelEvent.DOM_DELTA_LINE?K.deltaY*40:K.deltaY,te=e.browser.now(),ye=te-(this._lastWheelEventTime||0);this._lastWheelEventTime=te,xe!==0&&xe%Hl===0?this._type="wheel":xe!==0&&Math.abs(xe)<4?this._type="trackpad":ye>400?(this._type=null,this._lastValue=xe,this._timeout=setTimeout(this._onTimeout,40,K)):this._type||(this._type=Math.abs(ye*xe)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,xe+=this._lastValue)),K.shiftKey&&xe&&(xe=xe/4),this._type&&(this._lastWheelEvent=K,this._delta-=xe,this._active||this._start(K)),K.preventDefault()}},it.prototype._onTimeout=function(K){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(K)},it.prototype._start=function(K){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 xe=r.mousePos(this._el,K);this._around=e.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(xe)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},it.prototype.renderFrame=function(){var K=this;if(this._frameId&&(this._frameId=null,!!this.isActive())){var xe=this._map.transform;if(this._delta!==0){var te=this._type==="wheel"&&Math.abs(this._delta)>Hl?this._wheelZoomRate:this._defaultZoomRate,ye=_c/(1+Math.exp(-Math.abs(this._delta*te)));this._delta<0&&ye!==0&&(ye=1/ye);var je=typeof this._targetZoom=="number"?xe.zoomScale(this._targetZoom):xe.scale;this._targetZoom=Math.min(xe.maxZoom,Math.max(xe.minZoom,xe.scaleZoom(je*ye))),this._type==="wheel"&&(this._startZoom=xe.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var ke=typeof this._targetZoom=="number"?this._targetZoom:xe.zoom,Qe=this._startZoom,vt=this._easing,qt=!1,wr;if(this._type==="wheel"&&Qe&&vt){var Nr=Math.min((e.browser.now()-this._lastWheelEventTime)/200,1),pr=vt(Nr);wr=e.number(Qe,ke,pr),Nr<1?this._frameId||(this._frameId=!0):qt=!0}else wr=ke,qt=!0;return this._active=!0,qt&&(this._active=!1,this._finishTimeout=setTimeout(function(){K._zooming=!1,K._handler._triggerRenderFrame(),delete K._targetZoom,delete K._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!qt,zoomDelta:wr-xe.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},it.prototype._smoothOutEasing=function(K){var xe=e.ease;if(this._prevEase){var te=this._prevEase,ye=(e.browser.now()-te.start)/te.duration,je=te.easing(ye+.01)-te.easing(ye),ke=.27/Math.sqrt(je*je+1e-4)*.01,Qe=Math.sqrt(.27*.27-ke*ke);xe=e.bezier(ke,Qe,.25,1)}return this._prevEase={start:e.browser.now(),duration:K,easing:xe},xe},it.prototype.reset=function(){this._active=!1};var Zt=function(K,xe){this._clickZoom=K,this._tapZoom=xe};Zt.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},Zt.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},Zt.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},Zt.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var cr=function(){this.reset()};cr.prototype.reset=function(){this._active=!1},cr.prototype.dblclick=function(K,xe){return K.preventDefault(),{cameraAnimation:function(te){te.easeTo({duration:300,zoom:te.getZoom()+(K.shiftKey?-1:1),around:te.unproject(xe)},{originalEvent:K})}}},cr.prototype.enable=function(){this._enabled=!0},cr.prototype.disable=function(){this._enabled=!1,this.reset()},cr.prototype.isEnabled=function(){return this._enabled},cr.prototype.isActive=function(){return this._active};var oa=function(){this._tap=new Ja({numTouches:1,numTaps:1}),this.reset()};oa.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},oa.prototype.touchstart=function(K,xe,te){this._swipePoint||(this._tapTime&&K.timeStamp-this._tapTime>Gr&&this.reset(),this._tapTime?te.length>0&&(this._swipePoint=xe[0],this._swipeTouch=te[0].identifier):this._tap.touchstart(K,xe,te))},oa.prototype.touchmove=function(K,xe,te){if(!this._tapTime)this._tap.touchmove(K,xe,te);else if(this._swipePoint){if(te[0].identifier!==this._swipeTouch)return;var ye=xe[0],je=ye.y-this._swipePoint.y;return this._swipePoint=ye,K.preventDefault(),this._active=!0,{zoomDelta:je/128}}},oa.prototype.touchend=function(K,xe,te){if(this._tapTime)this._swipePoint&&te.length===0&&this.reset();else{var ye=this._tap.touchend(K,xe,te);ye&&(this._tapTime=K.timeStamp)}},oa.prototype.touchcancel=function(){this.reset()},oa.prototype.enable=function(){this._enabled=!0},oa.prototype.disable=function(){this._enabled=!1,this.reset()},oa.prototype.isEnabled=function(){return this._enabled},oa.prototype.isActive=function(){return this._active};var wa=function(K,xe,te){this._el=K,this._mousePan=xe,this._touchPan=te};wa.prototype.enable=function(K){this._inertiaOptions=K||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},wa.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},wa.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},wa.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var va=function(K,xe,te){this._pitchWithRotate=K.pitchWithRotate,this._mouseRotate=xe,this._mousePitch=te};va.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},va.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},va.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},va.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var ya=function(K,xe,te,ye){this._el=K,this._touchZoom=xe,this._touchRotate=te,this._tapDragZoom=ye,this._rotationDisabled=!1,this._enabled=!0};ya.prototype.enable=function(K){this._touchZoom.enable(K),this._rotationDisabled||this._touchRotate.enable(K),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")},ya.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},ya.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},ya.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},ya.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},ya.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var Ya=function(ge){return ge.zoom||ge.drag||ge.pitch||ge.rotate},bi=function(ge){function K(){ge.apply(this,arguments)}return ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K,K}(e.Event);function yi(ge){return ge.panDelta&&ge.panDelta.mag()||ge.zoomDelta||ge.bearingDelta||ge.pitchDelta}var si=function(K,xe){this._map=K,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Vl(K),this._bearingSnap=xe.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(xe),e.bindAll(["handleEvent","handleWindowEvent"],this);var te=this._el;this._listeners=[[te,"touchstart",{passive:!0}],[te,"touchmove",{passive:!1}],[te,"touchend",void 0],[te,"touchcancel",void 0],[te,"mousedown",void 0],[te,"mousemove",void 0],[te,"mouseup",void 0],[e.window.document,"mousemove",{capture:!0}],[e.window.document,"mouseup",void 0],[te,"mouseover",void 0],[te,"mouseout",void 0],[te,"dblclick",void 0],[te,"click",void 0],[te,"keydown",{capture:!1}],[te,"keyup",void 0],[te,"wheel",{passive:!1}],[te,"contextmenu",void 0],[e.window,"blur",void 0]];for(var ye=0,je=this._listeners;yeQe?Math.min(2,Wt):Math.max(.5,Wt),Ga=Math.pow(vi,1-Jr),ai=ke.unproject(dr.add(or.mult(Jr*Ga)).mult(ga));ke.setLocationAtPoint(ke.renderWorldCopies?ai.wrap():ai,rr)}je._fireMoveEvents(ye)},function(Jr){je._afterEase(ye,Jr)},te),this},K.prototype._prepareEase=function(te,ye,je){je===void 0&&(je={}),this._moving=!0,!ye&&!je.moving&&this.fire(new e.Event("movestart",te)),this._zooming&&!je.zooming&&this.fire(new e.Event("zoomstart",te)),this._rotating&&!je.rotating&&this.fire(new e.Event("rotatestart",te)),this._pitching&&!je.pitching&&this.fire(new e.Event("pitchstart",te))},K.prototype._fireMoveEvents=function(te){this.fire(new e.Event("move",te)),this._zooming&&this.fire(new e.Event("zoom",te)),this._rotating&&this.fire(new e.Event("rotate",te)),this._pitching&&this.fire(new e.Event("pitch",te))},K.prototype._afterEase=function(te,ye){if(!(this._easeId&&ye&&this._easeId===ye)){delete this._easeId;var je=this._zooming,ke=this._rotating,Qe=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,je&&this.fire(new e.Event("zoomend",te)),ke&&this.fire(new e.Event("rotateend",te)),Qe&&this.fire(new e.Event("pitchend",te)),this.fire(new e.Event("moveend",te))}},K.prototype.flyTo=function(te,ye){var je=this;if(!te.essential&&e.browser.prefersReducedMotion){var ke=e.pick(te,["center","zoom","bearing","pitch","around"]);return this.jumpTo(ke,ye)}this.stop(),te=e.extend({offset:[0,0],speed:1.2,curve:1.42,easing:e.ease},te);var Qe=this.transform,vt=this.getZoom(),qt=this.getBearing(),wr=this.getPitch(),Nr=this.getPadding(),pr="zoom"in te?e.clamp(+te.zoom,Qe.minZoom,Qe.maxZoom):vt,mt="bearing"in te?this._normalizeBearing(te.bearing,qt):qt,St="pitch"in te?+te.pitch:wr,Ft="padding"in te?te.padding:Qe.padding,rr=Qe.zoomScale(pr-vt),hr=e.Point.convert(te.offset),nr=Qe.centerPoint.add(hr),dr=Qe.pointLocation(nr),or=e.LngLat.convert(te.center||dr);this._normalizeCenter(or);var Wt=Qe.project(dr),ir=Qe.project(or).sub(Wt),Vt=te.curve,Dr=Math.max(Qe.width,Qe.height),Jr=Dr/rr,ga=ir.mag();if("minZoom"in te){var vi=e.clamp(Math.min(te.minZoom,vt,pr),Qe.minZoom,Qe.maxZoom),Ga=Dr/Qe.zoomScale(vi-vt);Vt=Math.sqrt(Ga/ga*2)}var ai=Vt*Vt;function Zi(Fo){var Es=(Jr*Jr-Dr*Dr+(Fo?-1:1)*ai*ai*ga*ga)/(2*(Fo?Jr:Dr)*ai*ga);return Math.log(Math.sqrt(Es*Es+1)-Es)}function Fi(Fo){return(Math.exp(Fo)-Math.exp(-Fo))/2}function ui(Fo){return(Math.exp(Fo)+Math.exp(-Fo))/2}function _i(Fo){return Fi(Fo)/ui(Fo)}var Si=Zi(0),Ui=function(Fo){return ui(Si)/ui(Si+Vt*Fo)},cn=function(Fo){return Dr*((ui(Si)*_i(Si+Vt*Fo)-Fi(Si))/ai)/ga},yo=(Zi(1)-Si)/Vt;if(Math.abs(ga)<1e-6||!isFinite(yo)){if(Math.abs(Dr-Jr)<1e-6)return this.easeTo(te,ye);var Uo=Jrte.maxDuration&&(te.duration=0),this._zooming=!0,this._rotating=qt!==mt,this._pitching=St!==wr,this._padding=!Qe.isPaddingEqual(Ft),this._prepareEase(ye,!1),this._ease(function(Fo){var Es=Fo*yo,Ks=1/Ui(Es);Qe.zoom=Fo===1?pr:vt+Qe.scaleZoom(Ks),je._rotating&&(Qe.bearing=e.number(qt,mt,Fo)),je._pitching&&(Qe.pitch=e.number(wr,St,Fo)),je._padding&&(Qe.interpolatePadding(Nr,Ft,Fo),nr=Qe.centerPoint.add(hr));var mu=Fo===1?or:Qe.unproject(Wt.add(ir.mult(cn(Es))).mult(Ks));Qe.setLocationAtPoint(Qe.renderWorldCopies?mu.wrap():mu,nr),je._fireMoveEvents(ye)},function(){return je._afterEase(ye)},te),this},K.prototype.isEasing=function(){return!!this._easeFrameId},K.prototype.stop=function(){return this._stop()},K.prototype._stop=function(te,ye){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var je=this._onEaseEnd;delete this._onEaseEnd,je.call(this,ye)}if(!te){var ke=this.handlers;ke&&ke.stop(!1)}return this},K.prototype._ease=function(te,ye,je){je.animate===!1||je.duration===0?(te(1),ye()):(this._easeStart=e.browser.now(),this._easeOptions=je,this._onEaseFrame=te,this._onEaseEnd=ye,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},K.prototype._renderFrameCallback=function(){var te=Math.min((e.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(te)),te<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},K.prototype._normalizeBearing=function(te,ye){te=e.wrap(te,-180,180);var je=Math.abs(te-ye);return Math.abs(te-360-ye)180?-360:je<-180?360:0}},K}(e.Evented),zi=function(K){K===void 0&&(K={}),this.options=K,e.bindAll(["_toggleAttribution","_updateEditLink","_updateData","_updateCompact"],this)};zi.prototype.getDefaultPosition=function(){return"bottom-right"},zi.prototype.onAdd=function(K){var xe=this.options&&this.options.compact;return this._map=K,this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._compactButton=r.create("button","mapboxgl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=r.create("div","mapboxgl-ctrl-attrib-inner",this._container),this._innerContainer.setAttribute("role","list"),xe&&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),xe===void 0&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},zi.prototype.onRemove=function(){r.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},zi.prototype._setElementTitle=function(K,xe){var te=this._map._getUIString("AttributionControl."+xe);K.title=te,K.setAttribute("aria-label",te)},zi.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"))},zi.prototype._updateEditLink=function(){var K=this._editLink;K||(K=this._editLink=this._container.querySelector(".mapbox-improve-map"));var xe=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||e.config.ACCESS_TOKEN}];if(K){var te=xe.reduce(function(ye,je,ke){return je.value&&(ye+=je.key+"="+je.value+(ke=0)return!1;return!0});var Qe=K.join(" | ");Qe!==this._attribHTML&&(this._attribHTML=Qe,K.length?(this._innerContainer.innerHTML=Qe,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}},zi.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact","mapboxgl-compact-show")};var Ei=function(){e.bindAll(["_updateLogo"],this),e.bindAll(["_updateCompact"],this)};Ei.prototype.onAdd=function(K){this._map=K,this._container=r.create("div","mapboxgl-ctrl");var xe=r.create("a","mapboxgl-ctrl-logo");return xe.target="_blank",xe.rel="noopener nofollow",xe.href="https://www.mapbox.com/",xe.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),xe.setAttribute("rel","noopener nofollow"),this._container.appendChild(xe),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},Ei.prototype.onRemove=function(){r.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},Ei.prototype.getDefaultPosition=function(){return"bottom-left"},Ei.prototype._updateLogo=function(K){(!K||K.sourceDataType==="metadata")&&(this._container.style.display=this._logoRequired()?"block":"none")},Ei.prototype._logoRequired=function(){if(this._map.style){var K=this._map.style.sourceCaches;for(var xe in K){var te=K[xe].getSource();if(te.mapbox_logo)return!0}return!1}},Ei.prototype._updateCompact=function(){var K=this._container.children;if(K.length){var xe=K[0];this._map.getCanvasContainer().offsetWidth<250?xe.classList.add("mapboxgl-compact"):xe.classList.remove("mapboxgl-compact")}};var Na=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};Na.prototype.add=function(K){var xe=++this._id,te=this._queue;return te.push({callback:K,id:xe,cancelled:!1}),xe},Na.prototype.remove=function(K){for(var xe=this._currentlyRunning,te=xe?this._queue.concat(xe):this._queue,ye=0,je=te;yete.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(te.minPitch!=null&&te.maxPitch!=null&&te.minPitch>te.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(te.minPitch!=null&&te.minPitchhn)throw new Error("maxPitch must be less than or equal to "+hn);var je=new Jo(te.minZoom,te.maxZoom,te.minPitch,te.maxPitch,te.renderWorldCopies);if(ge.call(this,je,te),this._interactive=te.interactive,this._maxTileCacheSize=te.maxTileCacheSize,this._failIfMajorPerformanceCaveat=te.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=te.preserveDrawingBuffer,this._antialias=te.antialias,this._trackResize=te.trackResize,this._bearingSnap=te.bearingSnap,this._refreshExpiredTiles=te.refreshExpiredTiles,this._fadeDuration=te.fadeDuration,this._crossSourceCollisions=te.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=te.collectResourceTiming,this._renderTaskQueue=new Na,this._controls=[],this._mapId=e.uniqueId(),this._locale=e.extend({},ea,te.locale),this._clickTolerance=te.clickTolerance,this._requestManager=new e.RequestManager(te.transformRequest,te.accessToken),typeof te.container=="string"){if(this._container=e.window.document.getElementById(te.container),!this._container)throw new Error("Container '"+te.container+"' not found.")}else if(te.container instanceof Qa)this._container=te.container;else throw new Error("Invalid type: 'container' must be a String or HTMLElement.");if(te.maxBounds&&this.setMaxBounds(te.maxBounds),e.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 ye._update(!1)}),this.on("moveend",function(){return ye._update(!1)}),this.on("zoom",function(){return ye._update(!0)}),typeof e.window<"u"&&(e.window.addEventListener("online",this._onWindowOnline,!1),e.window.addEventListener("resize",this._onWindowResize,!1),e.window.addEventListener("orientationchange",this._onWindowResize,!1)),this.handlers=new si(this,te);var ke=typeof te.hash=="string"&&te.hash||void 0;this._hash=te.hash&&new eu(ke).addTo(this),(!this._hash||!this._hash._onHashChange())&&(this.jumpTo({center:te.center,zoom:te.zoom,bearing:te.bearing,pitch:te.pitch}),te.bounds&&(this.resize(),this.fitBounds(te.bounds,e.extend({},te.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=te.localIdeographFontFamily,te.style&&this.setStyle(te.style,{localIdeographFontFamily:te.localIdeographFontFamily}),te.attributionControl&&this.addControl(new zi({customAttribution:te.customAttribution})),this.addControl(new Ei,te.logoPosition),this.on("style.load",function(){ye.transform.unmodified&&ye.jumpTo(ye.style.stylesheet)}),this.on("data",function(Qe){ye._update(Qe.dataType==="style"),ye.fire(new e.Event(Qe.dataType+"data",Qe))}),this.on("dataloading",function(Qe){ye.fire(new e.Event(Qe.dataType+"dataloading",Qe))})}ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K;var xe={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return K.prototype._getMapId=function(){return this._mapId},K.prototype.addControl=function(ye,je){if(je===void 0&&(ye.getDefaultPosition?je=ye.getDefaultPosition():je="top-right"),!ye||!ye.onAdd)return this.fire(new e.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));var ke=ye.onAdd(this);this._controls.push(ye);var Qe=this._controlPositions[je];return je.indexOf("bottom")!==-1?Qe.insertBefore(ke,Qe.firstChild):Qe.appendChild(ke),this},K.prototype.removeControl=function(ye){if(!ye||!ye.onRemove)return this.fire(new e.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));var je=this._controls.indexOf(ye);return je>-1&&this._controls.splice(je,1),ye.onRemove(this),this},K.prototype.hasControl=function(ye){return this._controls.indexOf(ye)>-1},K.prototype.resize=function(ye){var je=this._containerDimensions(),ke=je[0],Qe=je[1];this._resizeCanvas(ke,Qe),this.transform.resize(ke,Qe),this.painter.resize(ke,Qe);var vt=!this._moving;return vt&&(this.stop(),this.fire(new e.Event("movestart",ye)).fire(new e.Event("move",ye))),this.fire(new e.Event("resize",ye)),vt&&this.fire(new e.Event("moveend",ye)),this},K.prototype.getBounds=function(){return this.transform.getBounds()},K.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},K.prototype.setMaxBounds=function(ye){return this.transform.setMaxBounds(e.LngLatBounds.convert(ye)),this._update()},K.prototype.setMinZoom=function(ye){if(ye=ye??Va,ye>=Va&&ye<=this.transform.maxZoom)return this.transform.minZoom=ye,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=ye,this._update(),this.getZoom()>ye&&this.setZoom(ye),this;throw new Error("maxZoom must be greater than the current minZoom")},K.prototype.getMaxZoom=function(){return this.transform.maxZoom},K.prototype.setMinPitch=function(ye){if(ye=ye??Li,ye=Li&&ye<=this.transform.maxPitch)return this.transform.minPitch=ye,this._update(),this.getPitch()hn)throw new Error("maxPitch must be less than or equal to "+hn);if(ye>=this.transform.minPitch)return this.transform.maxPitch=ye,this._update(),this.getPitch()>ye&&this.setPitch(ye),this;throw new Error("maxPitch must be greater than the current minPitch")},K.prototype.getMaxPitch=function(){return this.transform.maxPitch},K.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},K.prototype.setRenderWorldCopies=function(ye){return this.transform.renderWorldCopies=ye,this._update()},K.prototype.project=function(ye){return this.transform.locationPoint(e.LngLat.convert(ye))},K.prototype.unproject=function(ye){return this.transform.pointLocation(e.Point.convert(ye))},K.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},K.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},K.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},K.prototype._createDelegatedListener=function(ye,je,ke){var Qe=this,vt;if(ye==="mouseenter"||ye==="mouseover"){var qt=!1,wr=function(rr){var hr=Qe.getLayer(je)?Qe.queryRenderedFeatures(rr.point,{layers:[je]}):[];hr.length?qt||(qt=!0,ke.call(Qe,new De(ye,Qe,rr.originalEvent,{features:hr}))):qt=!1},Nr=function(){qt=!1};return{layer:je,listener:ke,delegates:{mousemove:wr,mouseout:Nr}}}else if(ye==="mouseleave"||ye==="mouseout"){var pr=!1,mt=function(rr){var hr=Qe.getLayer(je)?Qe.queryRenderedFeatures(rr.point,{layers:[je]}):[];hr.length?pr=!0:pr&&(pr=!1,ke.call(Qe,new De(ye,Qe,rr.originalEvent)))},St=function(rr){pr&&(pr=!1,ke.call(Qe,new De(ye,Qe,rr.originalEvent)))};return{layer:je,listener:ke,delegates:{mousemove:mt,mouseout:St}}}else{var Ft=function(rr){var hr=Qe.getLayer(je)?Qe.queryRenderedFeatures(rr.point,{layers:[je]}):[];hr.length&&(rr.features=hr,ke.call(Qe,rr),delete rr.features)};return{layer:je,listener:ke,delegates:(vt={},vt[ye]=Ft,vt)}}},K.prototype.on=function(ye,je,ke){if(ke===void 0)return ge.prototype.on.call(this,ye,je);var Qe=this._createDelegatedListener(ye,je,ke);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[ye]=this._delegatedListeners[ye]||[],this._delegatedListeners[ye].push(Qe);for(var vt in Qe.delegates)this.on(vt,Qe.delegates[vt]);return this},K.prototype.once=function(ye,je,ke){if(ke===void 0)return ge.prototype.once.call(this,ye,je);var Qe=this._createDelegatedListener(ye,je,ke);for(var vt in Qe.delegates)this.once(vt,Qe.delegates[vt]);return this},K.prototype.off=function(ye,je,ke){var Qe=this;if(ke===void 0)return ge.prototype.off.call(this,ye,je);var vt=function(qt){for(var wr=qt[ye],Nr=0;Nr180;){var ke=xe.locationPoint(ge);if(ke.x>=0&&ke.y>=0&&ke.x<=xe.width&&ke.y<=xe.height)break;ge.lng>xe.center.lng?ge.lng-=360:ge.lng+=360}return ge}var vn={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function Rn(ge,K,xe){var te=ge.classList;for(var ye in vn)te.remove("mapboxgl-"+xe+"-anchor-"+ye);te.add("mapboxgl-"+xe+"-anchor-"+K)}var Ii=function(ge){function K(xe,te){if(ge.call(this),(xe instanceof e.window.HTMLElement||te)&&(xe=e.extend({element:xe},te)),e.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick","_onKeyPress"],this),this._anchor=xe&&xe.anchor||"center",this._color=xe&&xe.color||"#3FB1CE",this._scale=xe&&xe.scale||1,this._draggable=xe&&xe.draggable||!1,this._clickTolerance=xe&&xe.clickTolerance||0,this._isDragging=!1,this._state="inactive",this._rotation=xe&&xe.rotation||0,this._rotationAlignment=xe&&xe.rotationAlignment||"auto",this._pitchAlignment=xe&&xe.pitchAlignment&&xe.pitchAlignment!=="auto"?xe.pitchAlignment:this._rotationAlignment,!xe||!xe.element){this._defaultMarker=!0,this._element=r.create("div"),this._element.setAttribute("aria-label","Map marker");var ye=r.createNS("http://www.w3.org/2000/svg","svg"),je=41,ke=27;ye.setAttributeNS(null,"display","block"),ye.setAttributeNS(null,"height",je+"px"),ye.setAttributeNS(null,"width",ke+"px"),ye.setAttributeNS(null,"viewBox","0 0 "+ke+" "+je);var Qe=r.createNS("http://www.w3.org/2000/svg","g");Qe.setAttributeNS(null,"stroke","none"),Qe.setAttributeNS(null,"stroke-width","1"),Qe.setAttributeNS(null,"fill","none"),Qe.setAttributeNS(null,"fill-rule","evenodd");var vt=r.createNS("http://www.w3.org/2000/svg","g");vt.setAttributeNS(null,"fill-rule","nonzero");var qt=r.createNS("http://www.w3.org/2000/svg","g");qt.setAttributeNS(null,"transform","translate(3.0, 29.0)"),qt.setAttributeNS(null,"fill","#000000");for(var wr=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}],Nr=0,pr=wr;Nr=ye}this._isDragging&&(this._pos=te.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 e.Event("dragstart"))),this.fire(new e.Event("drag")))},K.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 e.Event("dragend")),this._state="inactive"},K.prototype._addDragHandler=function(te){this._element.contains(te.originalEvent.target)&&(te.preventDefault(),this._positionDelta=te.point.sub(this._pos).add(this._offset),this._pointerdownPos=te.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))},K.prototype.setDraggable=function(te){return this._draggable=!!te,this._map&&(te?(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},K.prototype.isDraggable=function(){return this._draggable},K.prototype.setRotation=function(te){return this._rotation=te||0,this._update(),this},K.prototype.getRotation=function(){return this._rotation},K.prototype.setRotationAlignment=function(te){return this._rotationAlignment=te||"auto",this._update(),this},K.prototype.getRotationAlignment=function(){return this._rotationAlignment},K.prototype.setPitchAlignment=function(te){return this._pitchAlignment=te&&te!=="auto"?te:this._rotationAlignment,this._update(),this},K.prototype.getPitchAlignment=function(){return this._pitchAlignment},K}(e.Evented),nn={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},En;function Dn(ge){En!==void 0?ge(En):e.window.navigator.permissions!==void 0?e.window.navigator.permissions.query({name:"geolocation"}).then(function(K){En=K.state!=="denied",ge(En)}):(En=!!e.window.navigator.geolocation,ge(En))}var Xn=0,zs=!1,bl=function(ge){function K(xe){ge.call(this),this.options=e.extend({},nn,xe),e.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker"],this)}return ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K,K.prototype.onAdd=function(te){return this._map=te,this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),Dn(this._setupUI),this._container},K.prototype.onRemove=function(){this._geolocationWatchID!==void 0&&(e.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(),r.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,Xn=0,zs=!1},K.prototype._isOutOfMapMaxBounds=function(te){var ye=this._map.getMaxBounds(),je=te.coords;return ye&&(je.longitudeye.getEast()||je.latitudeye.getNorth())},K.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");break}},K.prototype._onSuccess=function(te){if(this._map){if(this._isOutOfMapMaxBounds(te)){this._setErrorState(),this.fire(new e.Event("outofmaxbounds",te)),this._updateMarker(),this._finish();return}if(this.options.trackUserLocation)switch(this._lastKnownPosition=te,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");break}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(te),(!this.options.trackUserLocation||this._watchState==="ACTIVE_LOCK")&&this._updateCamera(te),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new e.Event("geolocate",te)),this._finish()}},K.prototype._updateCamera=function(te){var ye=new e.LngLat(te.coords.longitude,te.coords.latitude),je=te.coords.accuracy,ke=this._map.getBearing(),Qe=e.extend({bearing:ke},this.options.fitBoundsOptions);this._map.fitBounds(ye.toBounds(je),Qe,{geolocateSource:!0})},K.prototype._updateMarker=function(te){if(te){var ye=new e.LngLat(te.coords.longitude,te.coords.latitude);this._accuracyCircleMarker.setLngLat(ye).addTo(this._map),this._userLocationDotMarker.setLngLat(ye).addTo(this._map),this._accuracy=te.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},K.prototype._updateCircleRadius=function(){var te=this._map._container.clientHeight/2,ye=this._map.unproject([0,te]),je=this._map.unproject([1,te]),ke=ye.distanceTo(je),Qe=Math.ceil(2*this._accuracy/ke);this._circleElement.style.width=Qe+"px",this._circleElement.style.height=Qe+"px"},K.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},K.prototype._onError=function(te){if(this._map){if(this.options.trackUserLocation)if(te.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 ye=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=ye,this._geolocateButton.setAttribute("aria-label",ye),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(te.code===3&&zs)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new e.Event("error",te)),this._finish()}},K.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},K.prototype._setupUI=function(te){var ye=this;if(this._container.addEventListener("contextmenu",function(Qe){return Qe.preventDefault()}),this._geolocateButton=r.create("button","mapboxgl-ctrl-geolocate",this._container),r.create("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden",!0),this._geolocateButton.type="button",te===!1){e.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");var je=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=je,this._geolocateButton.setAttribute("aria-label",je)}else{var ke=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=ke,this._geolocateButton.setAttribute("aria-label",ke)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=r.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new Ii(this._dotElement),this._circleElement=r.create("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Ii({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(Qe){var vt=Qe.originalEvent&&Qe.originalEvent.type==="resize";!Qe.geolocateSource&&ye._watchState==="ACTIVE_LOCK"&&!vt&&(ye._watchState="BACKGROUND",ye._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),ye._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),ye.fire(new e.Event("trackuserlocationend")))})},K.prototype.trigger=function(){if(!this._setup)return e.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 e.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Xn--,zs=!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 e.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 e.Event("trackuserlocationstart"));break}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");break}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Xn++;var te;Xn>1?(te={maximumAge:6e5,timeout:0},zs=!0):(te=this.options.positionOptions,zs=!1),this._geolocationWatchID=e.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,te)}}else e.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},K.prototype._clearWatch=function(){e.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)},K}(e.Evented),ho={maxWidth:100,unit:"metric"},Wl=function(K){this.options=e.extend({},ho,K),e.bindAll(["_onMove","setUnit"],this)};Wl.prototype.getDefaultPosition=function(){return"bottom-left"},Wl.prototype._onMove=function(){fs(this._map,this._container,this.options)},Wl.prototype.onAdd=function(K){return this._map=K,this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",K.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},Wl.prototype.onRemove=function(){r.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},Wl.prototype.setUnit=function(K){this.options.unit=K,fs(this._map,this._container,this.options)};function fs(ge,K,xe){var te=xe&&xe.maxWidth||100,ye=ge._container.clientHeight/2,je=ge.unproject([0,ye]),ke=ge.unproject([te,ye]),Qe=je.distanceTo(ke);if(xe&&xe.unit==="imperial"){var vt=3.2808*Qe;if(vt>5280){var qt=vt/5280;Sl(K,te,qt,ge._getUIString("ScaleControl.Miles"))}else Sl(K,te,vt,ge._getUIString("ScaleControl.Feet"))}else if(xe&&xe.unit==="nautical"){var wr=Qe/1852;Sl(K,te,wr,ge._getUIString("ScaleControl.NauticalMiles"))}else Qe>=1e3?Sl(K,te,Qe/1e3,ge._getUIString("ScaleControl.Kilometers")):Sl(K,te,Qe,ge._getUIString("ScaleControl.Meters"))}function Sl(ge,K,xe,te){var ye=tu(xe),je=ye/xe;ge.style.width=K*je+"px",ge.innerHTML=ye+" "+te}function kl(ge){var K=Math.pow(10,Math.ceil(-Math.log(ge)/Math.LN10));return Math.round(ge*K)/K}function tu(ge){var K=Math.pow(10,(""+Math.floor(ge)).length-1),xe=ge/K;return xe=xe>=10?10:xe>=5?5:xe>=3?3:xe>=2?2:xe>=1?1:kl(xe),K*xe}var Vs=function(K){this._fullscreen=!1,K&&K.container&&(K.container instanceof e.window.HTMLElement?this._container=K.container:e.warnOnce("Full screen control 'container' must be a DOM element.")),e.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in e.window.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in e.window.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in e.window.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in e.window.document&&(this._fullscreenchange="MSFullscreenChange")};Vs.prototype.onAdd=function(K){return this._map=K,this._container||(this._container=this._map.getContainer()),this._controlContainer=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",e.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},Vs.prototype.onRemove=function(){r.remove(this._controlContainer),this._map=null,e.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},Vs.prototype._checkFullscreenSupport=function(){return!!(e.window.document.fullscreenEnabled||e.window.document.mozFullScreenEnabled||e.window.document.msFullscreenEnabled||e.window.document.webkitFullscreenEnabled)},Vs.prototype._setupUI=function(){var K=this._fullscreenButton=r.create("button","mapboxgl-ctrl-fullscreen",this._controlContainer);r.create("span","mapboxgl-ctrl-icon",K).setAttribute("aria-hidden",!0),K.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),e.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},Vs.prototype._updateTitle=function(){var K=this._getTitle();this._fullscreenButton.setAttribute("aria-label",K),this._fullscreenButton.title=K},Vs.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},Vs.prototype._isFullscreen=function(){return this._fullscreen},Vs.prototype._changeIcon=function(){var K=e.window.document.fullscreenElement||e.window.document.mozFullScreenElement||e.window.document.webkitFullscreenElement||e.window.document.msFullscreenElement;K===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())},Vs.prototype._onClickFullscreen=function(){this._isFullscreen()?e.window.document.exitFullscreen?e.window.document.exitFullscreen():e.window.document.mozCancelFullScreen?e.window.document.mozCancelFullScreen():e.window.document.msExitFullscreen?e.window.document.msExitFullscreen():e.window.document.webkitCancelFullScreen&&e.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 pl={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px"},wl=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", "),Zn=function(ge){function K(xe){ge.call(this),this.options=e.extend(Object.create(pl),xe),e.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K,K.prototype.addTo=function(te){return this._map&&this.remove(),this._map=te,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 e.Event("open")),this},K.prototype.isOpen=function(){return!!this._map},K.prototype.remove=function(){return this._content&&r.remove(this._content),this._container&&(r.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 e.Event("close")),this},K.prototype.getLngLat=function(){return this._lngLat},K.prototype.setLngLat=function(te){return this._lngLat=e.LngLat.convert(te),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},K.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},K.prototype.getElement=function(){return this._container},K.prototype.setText=function(te){return this.setDOMContent(e.window.document.createTextNode(te))},K.prototype.setHTML=function(te){var ye=e.window.document.createDocumentFragment(),je=e.window.document.createElement("body"),ke;for(je.innerHTML=te;ke=je.firstChild,!!ke;)ye.appendChild(ke);return this.setDOMContent(ye)},K.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},K.prototype.setMaxWidth=function(te){return this.options.maxWidth=te,this._update(),this},K.prototype.setDOMContent=function(te){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=r.create("div","mapboxgl-popup-content",this._container);return this._content.appendChild(te),this._createCloseButton(),this._update(),this._focusFirstElement(),this},K.prototype.addClassName=function(te){this._container&&this._container.classList.add(te)},K.prototype.removeClassName=function(te){this._container&&this._container.classList.remove(te)},K.prototype.setOffset=function(te){return this.options.offset=te,this._update(),this},K.prototype.toggleClassName=function(te){if(this._container)return this._container.classList.toggle(te)},K.prototype._createCloseButton=function(){this.options.closeButton&&(this._closeButton=r.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))},K.prototype._onMouseUp=function(te){this._update(te.point)},K.prototype._onMouseMove=function(te){this._update(te.point)},K.prototype._onDrag=function(te){this._update(te.point)},K.prototype._update=function(te){var ye=this,je=this._lngLat||this._trackPointer;if(!(!this._map||!je||!this._content)&&(this._container||(this._container=r.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=r.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach(function(mt){return ye._container.classList.add(mt)}),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=Xi(this._lngLat,this._pos,this._map.transform)),!(this._trackPointer&&!te))){var ke=this._pos=this._trackPointer&&te?te:this._map.project(this._lngLat),Qe=this.options.anchor,vt=Cl(this.options.offset);if(!Qe){var qt=this._container.offsetWidth,wr=this._container.offsetHeight,Nr;ke.y+vt.bottom.ythis._map.transform.height-wr?Nr=["bottom"]:Nr=[],ke.xthis._map.transform.width-qt/2&&Nr.push("right"),Nr.length===0?Qe="bottom":Qe=Nr.join("-")}var pr=ke.add(vt[Qe]).round();r.setTransform(this._container,vn[Qe]+" translate("+pr.x+"px,"+pr.y+"px)"),Rn(this._container,Qe,"popup")}},K.prototype._focusFirstElement=function(){if(!(!this.options.focusAfterOpen||!this._container)){var te=this._container.querySelector(wl);te&&te.focus()}},K.prototype._onClose=function(){this.remove()},K}(e.Evented);function Cl(ge){if(ge)if(typeof ge=="number"){var K=Math.round(Math.sqrt(.5*Math.pow(ge,2)));return{center:new e.Point(0,0),top:new e.Point(0,ge),"top-left":new e.Point(K,K),"top-right":new e.Point(-K,K),bottom:new e.Point(0,-ge),"bottom-left":new e.Point(K,-K),"bottom-right":new e.Point(-K,-K),left:new e.Point(ge,0),right:new e.Point(-ge,0)}}else if(ge instanceof e.Point||Array.isArray(ge)){var xe=e.Point.convert(ge);return{center:xe,top:xe,"top-left":xe,"top-right":xe,bottom:xe,"bottom-left":xe,"bottom-right":xe,left:xe,right:xe}}else return{center:e.Point.convert(ge.center||[0,0]),top:e.Point.convert(ge.top||[0,0]),"top-left":e.Point.convert(ge["top-left"]||[0,0]),"top-right":e.Point.convert(ge["top-right"]||[0,0]),bottom:e.Point.convert(ge.bottom||[0,0]),"bottom-left":e.Point.convert(ge["bottom-left"]||[0,0]),"bottom-right":e.Point.convert(ge["bottom-right"]||[0,0]),left:e.Point.convert(ge.left||[0,0]),right:e.Point.convert(ge.right||[0,0])};else return Cl(new e.Point(0,0))}var Po={version:e.version,supported:t,setRTLTextPlugin:e.setRTLTextPlugin,getRTLTextPluginStatus:e.getRTLTextPluginStatus,Map:Ua,NavigationControl:Ti,GeolocateControl:bl,AttributionControl:zi,ScaleControl:Wl,FullscreenControl:Vs,Popup:Zn,Marker:Ii,Style:Nl,LngLat:e.LngLat,LngLatBounds:e.LngLatBounds,Point:e.Point,MercatorCoordinate:e.MercatorCoordinate,Evented:e.Evented,config:e.config,prewarm:tn,clearPrewarmedResources:fn,get accessToken(){return e.config.ACCESS_TOKEN},set accessToken(ge){e.config.ACCESS_TOKEN=ge},get baseApiUrl(){return e.config.API_URL},set baseApiUrl(ge){e.config.API_URL=ge},get workerCount(){return ri.workerCount},set workerCount(ge){ri.workerCount=ge},get maxParallelImageRequests(){return e.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(ge){e.config.MAX_PARALLEL_IMAGE_REQUESTS=ge},clearStorage:function(K){e.clearTileCache(K)},workerUrl:""};return Po}),S})}}),yV=He({"src/plots/mapbox/layers.js"(Z,V){"use strict";var d=sa(),x=ou().sanitizeHTML,S=E6(),E=im();function e(n,i){this.subplot=n,this.uid=n.uid+"-"+i,this.index=i,this.idSource="source-"+this.uid,this.idLayer=E.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var t=e.prototype;t.update=function(i){this.visible?this.needsNewImage(i)?this.updateImage(i):this.needsNewSource(i)?(this.removeLayer(),this.updateSource(i),this.updateLayer(i)):this.needsNewLayer(i)?this.updateLayer(i):this.updateStyle(i):(this.updateSource(i),this.updateLayer(i)),this.visible=r(i)},t.needsNewImage=function(n){var i=this.subplot.map;return i.getSource(this.idSource)&&this.sourceType==="image"&&n.sourcetype==="image"&&(this.source!==n.source||JSON.stringify(this.coordinates)!==JSON.stringify(n.coordinates))},t.needsNewSource=function(n){return this.sourceType!==n.sourcetype||JSON.stringify(this.source)!==JSON.stringify(n.source)||this.layerType!==n.type},t.needsNewLayer=function(n){return this.layerType!==n.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},t.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]},t.updateImage=function(n){var i=this.subplot.map;i.getSource(this.idSource).updateImage({url:n.source,coordinates:n.coordinates});var s=this.findFollowingMapboxLayerId(this.lookupBelow());s!==null&&this.subplot.map.moveLayer(this.idLayer,s)},t.updateSource=function(n){var i=this.subplot.map;if(i.getSource(this.idSource)&&i.removeSource(this.idSource),this.sourceType=n.sourcetype,this.source=n.source,!!r(n)){var s=a(n);i.addSource(this.idSource,s)}},t.findFollowingMapboxLayerId=function(n){if(n==="traces")for(var i=this.subplot.getMapLayers(),s=0;s0){for(var s=0;s0}function o(n){var i={},s={};switch(n.type){case"circle":d.extendFlat(s,{"circle-radius":n.circle.radius,"circle-color":n.color,"circle-opacity":n.opacity});break;case"line":d.extendFlat(s,{"line-width":n.line.width,"line-color":n.color,"line-opacity":n.opacity,"line-dasharray":n.line.dash});break;case"fill":d.extendFlat(s,{"fill-color":n.color,"fill-outline-color":n.fill.outlinecolor,"fill-opacity":n.opacity});break;case"symbol":var h=n.symbol,f=S(h.textposition,h.iconsize);d.extendFlat(i,{"icon-image":h.icon+"-15","icon-size":h.iconsize/10,"text-field":h.text,"text-size":h.textfont.size,"text-anchor":f.anchor,"text-offset":f.offset,"symbol-placement":h.placement}),d.extendFlat(s,{"icon-color":n.color,"text-color":h.textfont.color,"text-opacity":n.opacity});break;case"raster":d.extendFlat(s,{"raster-fade-duration":0,"raster-opacity":n.opacity});break}return{layout:i,paint:s}}function a(n){var i=n.sourcetype,s=n.source,h={type:i},f;return i==="geojson"?f="data":i==="vector"?f=typeof s=="string"?"url":"tiles":i==="raster"?(f="tiles",h.tileSize=256):i==="image"&&(f="url",h.coordinates=n.coordinates),h[f]=s,n.sourceattribution&&(h.attribution=x(n.sourceattribution)),h}V.exports=function(i,s,h){var f=new e(i,s);return f.update(h),f}}}),_V=He({"src/plots/mapbox/mapbox.js"(Z,V){"use strict";var d=k6(),x=sa(),S=g0(),E=lo(),e=Ho(),t=Ap(),r=rf(),o=Jd(),a=o.drawMode,n=o.selectMode,i=Af().prepSelect,s=Af().clearOutline,h=Af().clearSelectionsCache,f=Af().selectOnClick,v=im(),c=yV();function T(g,b){this.id=b,this.gd=g;var p=g._fullLayout,u=g._context;this.container=p._glcontainer.node(),this.isStatic=u.staticPlot,this.uid=p._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(p),this.map=null,this.accessToken=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var l=T.prototype;l.plot=function(g,b,p){var u=this,y=b[u.id];u.map&&y.accesstoken!==u.accessToken&&(u.map.remove(),u.map=null,u.styleObj=null,u.traceHash={},u.layerList=[]);var m;u.map?m=new Promise(function(R,L){u.updateMap(g,b,R,L)}):m=new Promise(function(R,L){u.createMap(g,b,R,L)}),p.push(m)},l.createMap=function(g,b,p,u){var y=this,m=b[y.id],R=y.styleObj=w(m.style,b);y.accessToken=m.accesstoken;var L=m.bounds,z=L?[[L.west,L.south],[L.east,L.north]]:null,F=y.map=new d.Map({container:y.div,style:R.style,center:M(m.center),zoom:m.zoom,bearing:m.bearing,pitch:m.pitch,maxBounds:z,interactive:!y.isStatic,preserveDrawingBuffer:y.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1}).addControl(new d.AttributionControl({compact:!0}));F._canvas.style.left="0px",F._canvas.style.top="0px",y.rejectOnError(u),y.isStatic||y.initFx(g,b);var N=[];N.push(new Promise(function(O){F.once("load",O)})),N=N.concat(S.fetchTraceGeoData(g)),Promise.all(N).then(function(){y.fillBelowLookup(g,b),y.updateData(g),y.updateLayout(b),y.resolveOnRender(p)}).catch(u)},l.updateMap=function(g,b,p,u){var y=this,m=y.map,R=b[this.id];y.rejectOnError(u);var L=[],z=w(R.style,b);JSON.stringify(y.styleObj)!==JSON.stringify(z)&&(y.styleObj=z,m.setStyle(z.style),y.traceHash={},L.push(new Promise(function(F){m.once("styledata",F)}))),L=L.concat(S.fetchTraceGeoData(g)),Promise.all(L).then(function(){y.fillBelowLookup(g,b),y.updateData(g),y.updateLayout(b),y.resolveOnRender(p)}).catch(u)},l.fillBelowLookup=function(g,b){var p=b[this.id],u=p.layers,y,m,R=this.belowLookup={},L=!1;for(y=0;y1)for(y=0;y-1&&f(z.originalEvent,u,[p.xaxis],[p.yaxis],p.id,L),F.indexOf("event")>-1&&r.click(u,z.originalEvent)}}},l.updateFx=function(g){var b=this,p=b.map,u=b.gd;if(b.isStatic)return;function y(z){var F=b.map.unproject(z);return[F.lng,F.lat]}var m=g.dragmode,R;R=function(z,F){if(F.isRect){var N=z.range={};N[b.id]=[y([F.xmin,F.ymin]),y([F.xmax,F.ymax])]}else{var O=z.lassoPoints={};O[b.id]=F.map(y)}};var L=b.dragOptions;b.dragOptions=x.extendDeep(L||{},{dragmode:g.dragmode,element:b.div,gd:u,plotinfo:{id:b.id,domain:g[b.id].domain,xaxis:b.xaxis,yaxis:b.yaxis,fillRangeItems:R},xaxes:[b.xaxis],yaxes:[b.yaxis],subplot:b.id}),p.off("click",b.onClickInPanHandler),n(m)||a(m)?(p.dragPan.disable(),p.on("zoomstart",b.clearOutline),b.dragOptions.prepFn=function(z,F,N){i(z,F,N,b.dragOptions,m)},t.init(b.dragOptions)):(p.dragPan.enable(),p.off("zoomstart",b.clearOutline),b.div.onmousedown=null,b.div.ontouchstart=null,b.div.removeEventListener("touchstart",b.div._ontouchstart),b.onClickInPanHandler=b.onClickInPanFn(b.dragOptions),p.on("click",b.onClickInPanHandler))},l.updateFramework=function(g){var b=g[this.id].domain,p=g._size,u=this.div.style;u.width=p.w*(b.x[1]-b.x[0])+"px",u.height=p.h*(b.y[1]-b.y[0])+"px",u.left=p.l+b.x[0]*p.w+"px",u.top=p.t+(1-b.y[1])*p.h+"px",this.xaxis._offset=p.l+b.x[0]*p.w,this.xaxis._length=p.w*(b.x[1]-b.x[0]),this.yaxis._offset=p.t+(1-b.y[1])*p.h,this.yaxis._length=p.h*(b.y[1]-b.y[0])},l.updateLayers=function(g){var b=g[this.id],p=b.layers,u=this.layerList,y;if(p.length!==u.length){for(y=0;yN/2){var O=R.split("|").join("
");z.text(O).attr("data-unformatted",O).call(o.convertToTspans,c),F=r.bBox(z.node())}z.attr("transform",x(-3,-F.height+8)),L.insert("rect",".static-attribution").attr({x:-F.width-6,y:-F.height-3,width:F.width+6,height:F.height+3,fill:"rgba(255, 255, 255, 0.75)"});var P=1;F.width+6>N&&(P=N/(F.width+6));var U=[_.l+_.w*M.x[1],_.t+_.h*(1-M.y[0])];L.attr("transform",x(U[0],U[1])+S(P))}};function f(c,T){var l=c._fullLayout,_=c._context;if(_.mapboxAccessToken==="")return"";for(var w=[],A=[],M=!1,g=!1,b=0;b1&&d.warn(i.multipleTokensErrorMsg),w[0]):(A.length&&d.log(["Listed mapbox access token(s)",A.join(","),"but did not use a Mapbox map style, ignoring token(s)."].join(" ")),"")}function v(c){return typeof c=="string"&&(i.styleValuesMapbox.indexOf(c)!==-1||c.indexOf("mapbox://")===0||c.indexOf("stamen")===0)}Z.updateFx=function(c){for(var T=c._fullLayout,l=T._subplots[n],_=0;_=0;o--)t.removeLayer(r[o][1])},e.dispose=function(){var t=this.subplot.map;this._removeLayers(),t.removeSource(this.sourceId)},V.exports=function(r,o){var a=o[0].trace,n=new E(r,a.uid),i=n.sourceId,s=d(o),h=n.below=r.belowLookup["trace-"+a.uid];return r.map.addSource(i,{type:"geojson",data:s.geojson}),n._addLayers(s,h),o[0].trace._glTrace=n,n}}}),SV=He({"src/traces/choroplethmapbox/index.js"(Z,V){"use strict";var d=["*choroplethmapbox* trace is deprecated!","Please consider switching to the *choroplethmap* trace type and `map` subplots.","Learn more at: https://plotly.com/python/maplibre-migration/","as well as https://plotly.com/javascript/maplibre-migration/"].join(" ");V.exports={attributes:C6(),supplyDefaults:TV(),colorbar:n0(),calc:lT(),plot:AV(),hoverPoints:cT(),eventData:fT(),selectPoints:hT(),styleOnSelect:function(x,S){if(S){var E=S[0].trace;E._glTrace.updateOnSelect(S)}},getBelow:function(x,S){for(var E=S.getMapLayers(),e=E.length-2;e>=0;e--){var t=E[e].id;if(typeof t=="string"&&t.indexOf("water")===0){for(var r=e+1;r0?+c[f]:0),h.push({type:"Feature",geometry:{type:"Point",coordinates:w},properties:A})}}var g=E.extractOpts(a),b=g.reversescale?E.flipScale(g.colorscale):g.colorscale,p=b[0][1],u=S.opacity(p)<1?p:S.addOpacity(p,0),y=["interpolate",["linear"],["heatmap-density"],0,u];for(f=1;f=0;r--)e.removeLayer(t[r][1])},E.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)},V.exports=function(t,r){var o=r[0].trace,a=new S(t,o.uid),n=a.sourceId,i=d(r),s=a.below=t.belowLookup["trace-"+o.uid];return t.map.addSource(n,{type:"geojson",data:i.geojson}),a._addLayers(i,s),a}}}),PV=He({"src/traces/densitymapbox/hover.js"(Z,V){"use strict";var d=Ho(),x=ST().hoverPoints,S=ST().getExtraText;V.exports=function(e,t,r){var o=x(e,t,r);if(o){var a=o[0],n=a.cd,i=n[0].trace,s=n[a.index];if(delete a.color,"z"in s){var h=a.subplot.mockAxis;a.z=s.z,a.zLabel=d.tickText(h,h.c2l(s.z),"hover").text}return a.extraText=S(i,s,n[0].t.labels),[a]}}}}),IV=He({"src/traces/densitymapbox/event_data.js"(Z,V){"use strict";V.exports=function(x,S){return x.lon=S.lon,x.lat=S.lat,x.z=S.z,x}}}),RV=He({"src/traces/densitymapbox/index.js"(Z,V){"use strict";var d=["*densitymapbox* trace is deprecated!","Please consider switching to the *densitymap* trace type and `map` subplots.","Learn more at: https://plotly.com/python/maplibre-migration/","as well as https://plotly.com/javascript/maplibre-migration/"].join(" ");V.exports={attributes:P6(),supplyDefaults:EV(),colorbar:n0(),formatLabels:M6(),calc:kV(),plot:LV(),hoverPoints:PV(),eventData:IV(),getBelow:function(x,S){for(var E=S.getMapLayers(),e=0;eESRI"},ortoInstaMaps:{type:"raster",tiles:["https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png"],tileSize:256,maxzoom:13},ortoICGC:{type:"raster",tiles:["https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg"],tileSize:256,minzoom:13.1,maxzoom:20},openmaptiles:{type:"vector",url:"https://geoserveis.icgc.cat/contextmaps/basemap.json"}},sprite:"https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1",glyphs:"https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf",layers:[{id:"background",type:"background",paint:{"background-color":"#F4F9F4"}},{id:"ortoEsri",type:"raster",source:"ortoEsri",maxzoom:16,layout:{visibility:"visible"}},{id:"ortoICGC",type:"raster",source:"ortoICGC",minzoom:13.1,maxzoom:19,layout:{visibility:"visible"}},{id:"ortoInstaMaps",type:"raster",source:"ortoInstaMaps",maxzoom:13,layout:{visibility:"visible"}},{id:"waterway_tunnel",type:"line",source:"openmaptiles","source-layer":"waterway",minzoom:14,filter:["all",["in","class","river","stream","canal"],["==","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,6]]},"line-dasharray":[2,4]}},{id:"waterway-other",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["!in","class","canal","river","stream"],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,2]]}}},{id:"waterway-stream-canal",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["all",["in","class","canal","stream"],["!=","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,6]]}}},{id:"waterway-river",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["all",["==","class","river"],["!=","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.2,stops:[[10,.8],[20,4]]},"line-opacity":.5}},{id:"water-offset",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",maxzoom:8,filter:["==","$type","Polygon"],layout:{visibility:"visible"},paint:{"fill-opacity":0,"fill-color":"#a0c8f0","fill-translate":{base:1,stops:[[6,[2,0]],[8,[0,0]]]}}},{id:"water",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",layout:{visibility:"visible"},paint:{"fill-color":"hsl(210, 67%, 85%)","fill-opacity":0}},{id:"water-pattern",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",layout:{visibility:"visible"},paint:{"fill-translate":[0,2.5],"fill-pattern":"wave","fill-opacity":1}},{id:"landcover-ice-shelf",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"landcover",filter:["==","subclass","ice_shelf"],layout:{visibility:"visible"},paint:{"fill-color":"#fff","fill-opacity":{base:1,stops:[[0,.9],[10,.3]]}}},{id:"tunnel-service-track-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","service","track"]],layout:{"line-join":"round"},paint:{"line-color":"#cfcdca","line-dasharray":[.5,.25],"line-width":{base:1.2,stops:[[15,1],[16,4],[20,11]]}}},{id:"tunnel-minor-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","minor"]],layout:{"line-join":"round"},paint:{"line-color":"#cfcdca","line-opacity":{stops:[[12,0],[12.5,1]]},"line-width":{base:1.2,stops:[[12,.5],[13,1],[14,4],[20,15]]}}},{id:"tunnel-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[8,1.5],[20,17]]}}},{id:"tunnel-trunk-primary-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.7}},{id:"tunnel-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","motorway"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-dasharray":[.5,.25],"line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.5}},{id:"tunnel-path",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","tunnel"],["==","class","path"]]],paint:{"line-color":"#cba","line-dasharray":[1.5,.75],"line-width":{base:1.2,stops:[[15,1.2],[20,4]]}}},{id:"tunnel-service-track",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","service","track"]],layout:{"line-join":"round"},paint:{"line-color":"#fff","line-width":{base:1.2,stops:[[15.5,0],[16,2],[20,7.5]]}}},{id:"tunnel-minor",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","minor_road"]],layout:{"line-join":"round"},paint:{"line-color":"#fff","line-opacity":1,"line-width":{base:1.2,stops:[[13.5,0],[14,2.5],[20,11.5]]}}},{id:"tunnel-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#fff4c6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,10]]}}},{id:"tunnel-trunk-primary",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#fff4c6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"tunnel-motorway",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","motorway"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"#ffdaa6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"tunnel-railway",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","rail"]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]},"line-dasharray":[2,2]}},{id:"ferry",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["in","class","ferry"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(108, 159, 182, 1)","line-width":1.1,"line-dasharray":[2,2]}},{id:"aeroway-taxiway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:12,filter:["all",["in","class","taxiway"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(153, 153, 153, 1)","line-width":{base:1.5,stops:[[11,2],[17,12]]},"line-opacity":1}},{id:"aeroway-runway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:12,filter:["all",["in","class","runway"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(153, 153, 153, 1)","line-width":{base:1.5,stops:[[11,5],[17,55]]},"line-opacity":1}},{id:"aeroway-taxiway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:4,filter:["all",["in","class","taxiway"],["==","$type","LineString"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(255, 255, 255, 1)","line-width":{base:1.5,stops:[[11,1],[17,10]]},"line-opacity":{base:1,stops:[[11,0],[12,1]]}}},{id:"aeroway-runway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:4,filter:["all",["in","class","runway"],["==","$type","LineString"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(255, 255, 255, 1)","line-width":{base:1.5,stops:[[11,4],[17,50]]},"line-opacity":{base:1,stops:[[11,0],[12,1]]}}},{id:"highway-motorway-link-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:12,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway_link"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"highway-link-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"highway-minor-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!=","brunnel","tunnel"],["in","class","minor","service","track"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#cfcdca","line-opacity":{stops:[[12,0],[12.5,0]]},"line-width":{base:1.2,stops:[[12,.5],[13,1],[14,4],[20,15]]}}},{id:"highway-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":.5,"line-width":{base:1.2,stops:[[8,1.5],[20,17]]}}},{id:"highway-primary-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":{stops:[[7,0],[8,.6]]},"line-width":{base:1.2,stops:[[7,0],[8,.6],[9,1.5],[20,22]]}}},{id:"highway-trunk-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","trunk"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":{stops:[[5,0],[6,.5]]},"line-width":{base:1.2,stops:[[5,0],[6,.6],[7,1.5],[20,22]]}}},{id:"highway-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:4,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[4,0],[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":{stops:[[4,0],[5,.5]]}}},{id:"highway-path",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","path"]]],paint:{"line-color":"#cba","line-dasharray":[1.5,.75],"line-width":{base:1.2,stops:[[15,1.2],[20,4]]}}},{id:"highway-motorway-link",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:12,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway_link"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"highway-link",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"highway-minor",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!=","brunnel","tunnel"],["in","class","minor","service","track"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fff","line-opacity":.5,"line-width":{base:1.2,stops:[[13.5,0],[14,2.5],[20,11.5]]}}},{id:"highway-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[8,.5],[20,13]]},"line-opacity":.5}},{id:"highway-primary",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["in","class","primary"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[8.5,0],[9,.5],[20,18]]},"line-opacity":0}},{id:"highway-trunk",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["in","class","trunk"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"highway-motorway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"railway-transit",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.77)","line-width":{base:1.4,stops:[[14,.4],[20,1]]}}},{id:"railway-transit-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.68)","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,2],[20,6]]}}},{id:"railway-service",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","rail"],["has","service"]]],paint:{"line-color":"hsla(0, 0%, 73%, 0.77)","line-width":{base:1.4,stops:[[14,.4],[20,1]]}}},{id:"railway-service-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","rail"],["has","service"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.68)","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,2],[20,6]]}}},{id:"railway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!has","service"],["!in","brunnel","bridge","tunnel"],["==","class","rail"]]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]}}},{id:"railway-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!has","service"],["!in","brunnel","bridge","tunnel"],["==","class","rail"]]],paint:{"line-color":"#bbb","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,3],[20,8]]}}},{id:"bridge-motorway-link-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway_link"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"bridge-link-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"bridge-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[8,1.5],[20,28]]}}},{id:"bridge-trunk-primary-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"hsl(28, 76%, 67%)","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,26]]}}},{id:"bridge-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.5}},{id:"bridge-path-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","path"]]],paint:{"line-color":"#f8f4f0","line-width":{base:1.2,stops:[[15,1.2],[20,18]]}}},{id:"bridge-path",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","path"]]],paint:{"line-color":"#cba","line-width":{base:1.2,stops:[[15,1.2],[20,4]]},"line-dasharray":[1.5,.75]}},{id:"bridge-motorway-link",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway_link"]],layout:{"line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"bridge-link",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"bridge-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,20]]}}},{id:"bridge-trunk-primary",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]}}},{id:"bridge-motorway",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway"]],layout:{"line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"bridge-railway",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","rail"]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]}}},{id:"bridge-railway-hatching",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","rail"]],paint:{"line-color":"#bbb","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,3],[20,8]]}}},{id:"cablecar",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["==","class","cable_car"],layout:{visibility:"visible","line-cap":"round"},paint:{"line-color":"hsl(0, 0%, 70%)","line-width":{base:1,stops:[[11,1],[19,2.5]]}}},{id:"cablecar-dash",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["==","class","cable_car"],layout:{visibility:"visible","line-cap":"round"},paint:{"line-color":"hsl(0, 0%, 70%)","line-width":{base:1,stops:[[11,3],[19,5.5]]},"line-dasharray":[2,3]}},{id:"boundary-land-level-4",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",[">=","admin_level",4],["<=","admin_level",8],["!=","maritime",1]],layout:{"line-join":"round"},paint:{"line-color":"#9e9cab","line-dasharray":[3,1,1,1],"line-width":{base:1.4,stops:[[4,.4],[5,1],[12,3]]},"line-opacity":.6}},{id:"boundary-land-level-2",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["==","admin_level",2],["!=","maritime",1],["!=","disputed",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"hsl(248, 7%, 66%)","line-width":{base:1,stops:[[0,.6],[4,1.4],[5,2],[12,2]]}}},{id:"boundary-land-disputed",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["!=","maritime",1],["==","disputed",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"hsl(248, 7%, 70%)","line-dasharray":[1,3],"line-width":{base:1,stops:[[0,.6],[4,1.4],[5,2],[12,8]]}}},{id:"boundary-water",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["in","admin_level",2,4],["==","maritime",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(154, 189, 214, 1)","line-width":{base:1,stops:[[0,.6],[4,1],[5,1],[12,1]]},"line-opacity":{stops:[[6,0],[10,0]]}}},{id:"waterway-name",type:"symbol",source:"openmaptiles","source-layer":"waterway",minzoom:13,filter:["all",["==","$type","LineString"],["has","name"]],layout:{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin} {name:nonlatin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"line","text-letter-spacing":.2,"symbol-spacing":350},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"water-name-lakeline",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["==","$type","LineString"],layout:{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":`{name:latin} {name:nonlatin}`,"text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"line","symbol-spacing":350,"text-letter-spacing":.2},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"water-name-ocean",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["all",["==","$type","Point"],["==","class","ocean"]],layout:{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"point","symbol-spacing":350,"text-letter-spacing":.2},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"water-name-other",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["all",["==","$type","Point"],["!in","class","ocean"]],layout:{"text-font":["Noto Sans Italic"],"text-size":{stops:[[0,10],[6,14]]},"text-field":`{name:latin} {name:nonlatin}`,"text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"point","symbol-spacing":350,"text-letter-spacing":.2,visibility:"visible"},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"poi-level-3",type:"symbol",source:"openmaptiles","source-layer":"poi",minzoom:16,filter:["all",["==","$type","Point"],[">=","rank",25]],layout:{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":`{name:latin} {name:nonlatin}`,"text-offset":[0,.6],"text-size":12,"text-max-width":9},paint:{"text-halo-blur":.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{id:"poi-level-2",type:"symbol",source:"openmaptiles","source-layer":"poi",minzoom:15,filter:["all",["==","$type","Point"],["<=","rank",24],[">=","rank",15]],layout:{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":`{name:latin} {name:nonlatin}`,"text-offset":[0,.6],"text-size":12,"text-max-width":9},paint:{"text-halo-blur":.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{id:"poi-level-1",type:"symbol",source:"openmaptiles","source-layer":"poi",minzoom:14,filter:["all",["==","$type","Point"],["<=","rank",14],["has","name"]],layout:{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":`{name:latin} {name:nonlatin}`,"text-offset":[0,.6],"text-size":11,"text-max-width":9},paint:{"text-halo-blur":.5,"text-color":"rgba(191, 228, 172, 1)","text-halo-width":1,"text-halo-color":"rgba(30, 29, 29, 1)"}},{id:"poi-railway",type:"symbol",source:"openmaptiles","source-layer":"poi",minzoom:13,filter:["all",["==","$type","Point"],["has","name"],["==","class","railway"],["==","subclass","station"]],layout:{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":`{name:latin} {name:nonlatin}`,"text-offset":[0,.6],"text-size":12,"text-max-width":9,"icon-optional":!1,"icon-ignore-placement":!1,"icon-allow-overlap":!1,"text-ignore-placement":!1,"text-allow-overlap":!1,"text-optional":!0},paint:{"text-halo-blur":.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{id:"road_oneway",type:"symbol",source:"openmaptiles","source-layer":"transportation",minzoom:15,filter:["all",["==","oneway",1],["in","class","motorway","trunk","primary","secondary","tertiary","minor","service"]],layout:{"symbol-placement":"line","icon-image":"oneway","symbol-spacing":75,"icon-padding":2,"icon-rotation-alignment":"map","icon-rotate":90,"icon-size":{stops:[[15,.5],[19,1]]}},paint:{"icon-opacity":.5}},{id:"road_oneway_opposite",type:"symbol",source:"openmaptiles","source-layer":"transportation",minzoom:15,filter:["all",["==","oneway",-1],["in","class","motorway","trunk","primary","secondary","tertiary","minor","service"]],layout:{"symbol-placement":"line","icon-image":"oneway","symbol-spacing":75,"icon-padding":2,"icon-rotation-alignment":"map","icon-rotate":-90,"icon-size":{stops:[[15,.5],[19,1]]}},paint:{"icon-opacity":.5}},{id:"highway-name-path",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:15.5,filter:["==","class","path"],layout:{"text-size":{base:1,stops:[[13,12],[14,13]]},"text-font":["Noto Sans Regular"],"text-field":"{name:latin} {name:nonlatin}","symbol-placement":"line","text-rotation-alignment":"map"},paint:{"text-halo-color":"#f8f4f0","text-color":"hsl(30, 23%, 62%)","text-halo-width":.5}},{id:"highway-name-minor",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:15,filter:["all",["==","$type","LineString"],["in","class","minor","service","track"]],layout:{"text-size":{base:1,stops:[[13,12],[14,13]]},"text-font":["Noto Sans Regular"],"text-field":"{name:latin} {name:nonlatin}","symbol-placement":"line","text-rotation-alignment":"map"},paint:{"text-halo-blur":.5,"text-color":"#765","text-halo-width":1}},{id:"highway-name-major",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:12.2,filter:["in","class","primary","secondary","tertiary","trunk"],layout:{"text-size":{base:1,stops:[[13,12],[14,13]]},"text-font":["Noto Sans Regular"],"text-field":"{name:latin} {name:nonlatin}","symbol-placement":"line","text-rotation-alignment":"map"},paint:{"text-halo-blur":.5,"text-color":"#765","text-halo-width":1}},{id:"highway-shield",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:8,filter:["all",["<=","ref_length",6],["==","$type","LineString"],["!in","network","us-interstate","us-highway","us-state"]],layout:{"text-size":10,"icon-image":"road_{ref_length}","icon-rotation-alignment":"viewport","symbol-spacing":200,"text-font":["Noto Sans Regular"],"symbol-placement":{base:1,stops:[[10,"point"],[11,"line"]]},"text-rotation-alignment":"viewport","icon-size":1,"text-field":"{ref}"},paint:{"text-opacity":1,"text-color":"rgba(20, 19, 19, 1)","text-halo-color":"rgba(230, 221, 221, 0)","text-halo-width":2,"icon-color":"rgba(183, 18, 18, 1)","icon-opacity":.3,"icon-halo-color":"rgba(183, 55, 55, 0)"}},{id:"highway-shield-us-interstate",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:7,filter:["all",["<=","ref_length",6],["==","$type","LineString"],["in","network","us-interstate"]],layout:{"text-size":10,"icon-image":"{network}_{ref_length}","icon-rotation-alignment":"viewport","symbol-spacing":200,"text-font":["Noto Sans Regular"],"symbol-placement":{base:1,stops:[[7,"point"],[7,"line"],[8,"line"]]},"text-rotation-alignment":"viewport","icon-size":1,"text-field":"{ref}"},paint:{"text-color":"rgba(0, 0, 0, 1)"}},{id:"highway-shield-us-other",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:9,filter:["all",["<=","ref_length",6],["==","$type","LineString"],["in","network","us-highway","us-state"]],layout:{"text-size":10,"icon-image":"{network}_{ref_length}","icon-rotation-alignment":"viewport","symbol-spacing":200,"text-font":["Noto Sans Regular"],"symbol-placement":{base:1,stops:[[10,"point"],[11,"line"]]},"text-rotation-alignment":"viewport","icon-size":1,"text-field":"{ref}"},paint:{"text-color":"rgba(0, 0, 0, 1)"}},{id:"place-other",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",minzoom:12,filter:["!in","class","city","town","village","country","continent"],layout:{"text-letter-spacing":.1,"text-size":{base:1.2,stops:[[12,10],[15,14]]},"text-font":["Noto Sans Bold"],"text-field":`{name:latin} {name:nonlatin}`,"text-transform":"uppercase","text-max-width":9,visibility:"visible"},paint:{"text-color":"rgba(255,255,255,1)","text-halo-width":1.2,"text-halo-color":"rgba(57, 28, 28, 1)"}},{id:"place-village",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",minzoom:10,filter:["==","class","village"],layout:{"text-font":["Noto Sans Regular"],"text-size":{base:1.2,stops:[[10,12],[15,16]]},"text-field":`{name:latin} {name:nonlatin}`,"text-max-width":8,visibility:"visible"},paint:{"text-color":"rgba(255, 255, 255, 1)","text-halo-width":1.2,"text-halo-color":"rgba(10, 9, 9, 0.8)"}},{id:"place-town",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["==","class","town"],layout:{"text-font":["Noto Sans Regular"],"text-size":{base:1.2,stops:[[10,14],[15,24]]},"text-field":`{name:latin} {name:nonlatin}`,"text-max-width":8,visibility:"visible"},paint:{"text-color":"rgba(255, 255, 255, 1)","text-halo-width":1.2,"text-halo-color":"rgba(22, 22, 22, 0.8)"}},{id:"place-city",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["!=","capital",2],["==","class","city"]],layout:{"text-font":["Noto Sans Regular"],"text-size":{base:1.2,stops:[[7,14],[11,24]]},"text-field":`{name:latin} {name:nonlatin}`,"text-max-width":8,visibility:"visible"},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-width":1.2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-city-capital",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","capital",2],["==","class","city"]],layout:{"text-font":["Noto Sans Regular"],"text-size":{base:1.2,stops:[[7,14],[11,24]]},"text-field":`{name:latin} {name:nonlatin}`,"text-max-width":8,"icon-image":"star_11","text-offset":[.4,0],"icon-size":.8,"text-anchor":"left",visibility:"visible"},paint:{"text-color":"#333","text-halo-width":1.2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-other",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],[">=","rank",3],["!has","iso_a2"]],layout:{"text-font":["Noto Sans Italic"],"text-field":"{name:latin}","text-size":{stops:[[3,11],[7,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-3",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],[">=","rank",3],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[3,11],[7,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-2",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],["==","rank",2],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[2,11],[5,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-1",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],["==","rank",1],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[1,11],[4,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-continent",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",maxzoom:1,filter:["==","class","continent"],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":14,"text-max-width":6.25,"text-transform":"uppercase",visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}}],id:"qebnlkra6"}}}),FV=He({"src/plots/map/styles/arcgis-sat.js"(Z,V){V.exports={version:8,name:"orto",metadata:{},center:[1.537786,41.837539],zoom:12,bearing:0,pitch:0,light:{anchor:"viewport",color:"white",intensity:.4,position:[1.15,45,30]},sources:{ortoEsri:{type:"raster",tiles:["https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"],tileSize:256,maxzoom:18,attribution:"ESRI © ESRI"},ortoInstaMaps:{type:"raster",tiles:["https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png"],tileSize:256,maxzoom:13},ortoICGC:{type:"raster",tiles:["https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg"],tileSize:256,minzoom:13.1,maxzoom:20},openmaptiles:{type:"vector",url:"https://geoserveis.icgc.cat/contextmaps/basemap.json"}},sprite:"https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1",glyphs:"https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf",layers:[{id:"background",type:"background",paint:{"background-color":"#F4F9F4"}},{id:"ortoEsri",type:"raster",source:"ortoEsri",maxzoom:16,layout:{visibility:"visible"}},{id:"ortoICGC",type:"raster",source:"ortoICGC",minzoom:13.1,maxzoom:19,layout:{visibility:"visible"}},{id:"ortoInstaMaps",type:"raster",source:"ortoInstaMaps",maxzoom:13,layout:{visibility:"visible"}}]}}}),b0=He({"src/plots/map/constants.js"(Z,V){"use strict";var d=Jm(),x=zV(),S=FV(),E='\xA9 OpenStreetMap contributors',e="https://basemaps.cartocdn.com/gl/positron-gl-style/style.json",t="https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json",r="https://basemaps.cartocdn.com/gl/voyager-gl-style/style.json",o="https://basemaps.cartocdn.com/gl/positron-nolabels-gl-style/style.json",a="https://basemaps.cartocdn.com/gl/dark-matter-nolabels-gl-style/style.json",n="https://basemaps.cartocdn.com/gl/voyager-nolabels-gl-style/style.json",i={basic:r,streets:r,outdoors:r,light:e,dark:t,satellite:S,"satellite-streets":x,"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:E,tiles:["https://tile.openstreetmap.org/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-osm-tiles",type:"raster",source:"plotly-osm-tiles",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"white-bg":{id:"white-bg",version:8,sources:{},layers:[{id:"white-bg",type:"background",paint:{"background-color":"#FFFFFF"},minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-positron":e,"carto-darkmatter":t,"carto-voyager":r,"carto-positron-nolabels":o,"carto-darkmatter-nolabels":a,"carto-voyager-nolabels":n},s=d(i);V.exports={styleValueDflt:"basic",stylesMap:i,styleValuesMap:s,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",missingStyleErrorMsg:["No valid maplibre style found, please set `map.style` to one of:",s.join(", "),"or use a tile service."].join(` `),mapOnErrorMsg:"Map error."}}}),kx=He({"src/plots/map/layout_attributes.js"(Z,V){"use strict";var d=sa(),x=Jn().defaultLine,S=wc().attributes,E=tc(),e=af().textposition,t=pc().overrideAll,r=zl().templatedArray,o=b0(),a=E({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});a.family.dflt="Open Sans Regular, Arial Unicode MS Regular";var n=V.exports=t({_arrayAttrRegexps:[d.counterRegex("map",".layers",!0)],domain:S({name:"map"}),style:{valType:"any",values:o.styleValuesMap,dflt:o.styleValueDflt},center:{lon:{valType:"number",dflt:0},lat:{valType:"number",dflt:0}},zoom:{valType:"number",dflt:1},bearing:{valType:"number",dflt:0},pitch:{valType:"number",dflt:0},bounds:{west:{valType:"number"},east:{valType:"number"},south:{valType:"number"},north:{valType:"number"}},layers:r("layer",{visible:{valType:"boolean",dflt:!0},sourcetype:{valType:"enumerated",values:["geojson","vector","raster","image"],dflt:"geojson"},source:{valType:"any"},sourcelayer:{valType:"string",dflt:""},sourceattribution:{valType:"string"},type:{valType:"enumerated",values:["circle","line","fill","symbol","raster"],dflt:"circle"},coordinates:{valType:"any"},below:{valType:"string"},color:{valType:"color",dflt:x},opacity:{valType:"number",min:0,max:1,dflt:1},minzoom:{valType:"number",min:0,max:24,dflt:0},maxzoom:{valType:"number",min:0,max:24,dflt:24},circle:{radius:{valType:"number",dflt:15}},line:{width:{valType:"number",dflt:2},dash:{valType:"data_array"}},fill:{outlinecolor:{valType:"color",dflt:x}},symbol:{icon:{valType:"string",dflt:"marker"},iconsize:{valType:"number",dflt:10},text:{valType:"string",dflt:""},placement:{valType:"enumerated",values:["point","line","line-center"],dflt:"point"},textfont:a,textposition:d.extendFlat({},e,{arrayOk:!1})}})},"plot","from-root");n.uirevision={valType:"any",editType:"none"}}}),ET=He({"src/traces/scattermap/attributes.js"(Z,V){"use strict";var{hovertemplateAttrs:d,texttemplateAttrs:x,templatefallbackAttrs:S}=Jl(),E=$d(),e=vg(),t=af(),r=kx(),o=ru(),a=ku(),n=Qo().extendFlat,i=pc().overrideAll,s=kx(),h=e.line,f=e.marker;V.exports=i({lon:e.lon,lat:e.lat,cluster:{enabled:{valType:"boolean"},maxzoom:n({},s.layers.maxzoom,{}),step:{valType:"number",arrayOk:!0,dflt:-1,min:-1},size:{valType:"number",arrayOk:!0,dflt:20,min:0},color:{valType:"color",arrayOk:!0},opacity:n({},f.opacity,{dflt:1})},mode:n({},t.mode,{dflt:"markers"}),text:n({},t.text,{}),texttemplate:x({editType:"plot"},{keys:["lat","lon","text"]}),texttemplatefallback:S({editType:"plot"}),hovertext:n({},t.hovertext,{}),line:{color:h.color,width:h.width},connectgaps:t.connectgaps,marker:n({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:f.opacity,size:f.size,sizeref:f.sizeref,sizemin:f.sizemin,sizemode:f.sizemode},a("marker")),fill:e.fill,fillcolor:E(),textfont:r.layers.symbol.textfont,textposition:r.layers.symbol.textposition,below:{valType:"string"},selected:{marker:t.selected.marker},unselected:{marker:t.unselected.marker},hoverinfo:n({},o.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:d(),hovertemplatefallback:S()},"calc","nested")}}),I6=He({"src/traces/scattermap/constants.js"(Z,V){"use strict";var d=["Metropolis Black Italic","Metropolis Black","Metropolis Bold Italic","Metropolis Bold","Metropolis Extra Bold Italic","Metropolis Extra Bold","Metropolis Extra Light Italic","Metropolis Extra Light","Metropolis Light Italic","Metropolis Light","Metropolis Medium Italic","Metropolis Medium","Metropolis Regular Italic","Metropolis Regular","Metropolis Semi Bold Italic","Metropolis Semi Bold","Metropolis Thin Italic","Metropolis Thin","Open Sans Bold Italic","Open Sans Bold","Open Sans Extrabold Italic","Open Sans Extrabold","Open Sans Italic","Open Sans Light Italic","Open Sans Light","Open Sans Regular","Open Sans Semibold Italic","Open Sans Semibold","Klokantech Noto Sans Bold","Klokantech Noto Sans CJK Bold","Klokantech Noto Sans CJK Regular","Klokantech Noto Sans Italic","Klokantech Noto Sans Regular"];V.exports={isSupportedFont:function(x){return d.indexOf(x)!==-1}}}}),OV=He({"src/traces/scattermap/defaults.js"(Z,V){"use strict";var d=sa(),x=Fu(),S=md(),E=Dd(),e=zd(),t=ev(),r=ET(),o=I6().isSupportedFont;V.exports=function(i,s,h,f){function v(y,m){return d.coerce(i,s,r,y,m)}function c(y,m){return d.coerce2(i,s,r,y,m)}var T=a(i,s,v);if(!T){s.visible=!1;return}if(v("text"),v("texttemplate"),v("texttemplatefallback"),v("hovertext"),v("hovertemplate"),v("hovertemplatefallback"),v("mode"),v("below"),x.hasMarkers(s)){S(i,s,h,f,v,{noLine:!0,noAngle:!0}),v("marker.allowoverlap"),v("marker.angle");var l=s.marker;l.symbol!=="circle"&&(d.isArrayOrTypedArray(l.size)&&(l.size=l.size[0]),d.isArrayOrTypedArray(l.color)&&(l.color=l.color[0]))}x.hasLines(s)&&(E(i,s,h,f,v,{noDash:!0}),v("connectgaps"));var _=c("cluster.maxzoom"),w=c("cluster.step"),A=c("cluster.color",s.marker&&s.marker.color||h),M=c("cluster.size"),g=c("cluster.opacity"),b=_!==!1||w!==!1||A!==!1||M!==!1||g!==!1,p=v("cluster.enabled",b);if(p||x.hasText(s)){var u=f.font.family;e(i,s,f,v,{noSelect:!0,noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,font:{family:o(u)?u:"Open Sans Regular",weight:f.font.weight,style:f.font.style,size:f.font.size,color:f.font.color}})}v("fill"),s.fill!=="none"&&t(i,s,h,v),d.coerceSelectionMarkerOpacity(s,v)};function a(n,i,s){var h=s("lon")||[],f=s("lat")||[],v=Math.min(h.length,f.length);return i._length=v,v}}}),R6=He({"src/traces/scattermap/format_labels.js"(Z,V){"use strict";var d=Ho();V.exports=function(S,E,e){var t={},r=e[E.subplot]._subplot,o=r.mockAxis,a=S.lonlat;return t.lonLabel=d.tickText(o,o.c2l(a[0]),!0).text,t.latLabel=d.tickText(o,o.c2l(a[1]),!0).text,t}}}),D6=He({"src/plots/map/convert_text_opts.js"(Z,V){"use strict";var d=sa();V.exports=function(S,E){var e=S.split(" "),t=e[0],r=e[1],o=d.isArrayOrTypedArray(E)?d.mean(E):E,a=.5+o/100,n=1.5+o/100,i=["",""],s=[0,0];switch(t){case"top":i[0]="top",s[1]=-n;break;case"bottom":i[0]="bottom",s[1]=n;break}switch(r){case"left":i[1]="right",s[0]=-a;break;case"right":i[1]="left",s[0]=a;break}var h;return i[0]&&i[1]?h=i.join("-"):i[0]?h=i[0]:i[1]?h=i[1]:h="center",{anchor:h,offset:s}}}}),BV=He({"src/traces/scattermap/convert.js"(Z,V){"use strict";var d=as(),x=sa(),S=Ws().BADNUM,E=m0(),e=rc(),t=es(),r=r1(),o=Fu(),a=I6().isSupportedFont,n=D6(),i=$p().appendArrayPointValue,s=ou().NEWLINES,h=ou().BR_TAG_ALL;V.exports=function(g,b){var p=b[0].trace,u=p.visible===!0&&p._length!==0,y=p.fill!=="none",m=o.hasLines(p),R=o.hasMarkers(p),L=o.hasText(p),z=R&&p.marker.symbol==="circle",F=R&&p.marker.symbol!=="circle",N=p.cluster&&p.cluster.enabled,O=f("fill"),P=f("line"),U=f("circle"),B=f("symbol"),X={fill:O,line:P,circle:U,symbol:B};if(!u)return X;var $;if((y||m)&&($=E.calcTraceToLineCoords(b)),y&&(O.geojson=E.makePolygon($),O.layout.visibility="visible",x.extendFlat(O.paint,{"fill-color":p.fillcolor})),m&&(P.geojson=E.makeLine($),P.layout.visibility="visible",x.extendFlat(P.paint,{"line-width":p.line.width,"line-color":p.line.color,"line-opacity":p.opacity})),z){var le=v(b);U.geojson=le.geojson,U.layout.visibility="visible",N&&(U.filter=["!",["has","point_count"]],X.cluster={type:"circle",filter:["has","point_count"],layout:{visibility:"visible"},paint:{"circle-color":w(p.cluster.color,p.cluster.step),"circle-radius":w(p.cluster.size,p.cluster.step),"circle-opacity":w(p.cluster.opacity,p.cluster.step)}},X.clusterCount={type:"symbol",filter:["has","point_count"],paint:{},layout:{"text-field":"{point_count_abbreviated}","text-font":A(p),"text-size":12}}),x.extendFlat(U.paint,{"circle-color":le.mcc,"circle-radius":le.mrc,"circle-opacity":le.mo})}if(z&&N&&(U.filter=["!",["has","point_count"]]),(F||L)&&(B.geojson=c(b,g),x.extendFlat(B.layout,{visibility:"visible","icon-image":"{symbol}-15","text-field":"{text}"}),F&&(x.extendFlat(B.layout,{"icon-size":p.marker.size/10}),"angle"in p.marker&&p.marker.angle!=="auto"&&x.extendFlat(B.layout,{"icon-rotate":{type:"identity",property:"angle"},"icon-rotation-alignment":"map"}),B.layout["icon-allow-overlap"]=p.marker.allowoverlap,x.extendFlat(B.paint,{"icon-opacity":p.opacity*p.marker.opacity,"icon-color":p.marker.color})),L)){var ce=(p.marker||{}).size,de=n(p.textposition,ce);x.extendFlat(B.layout,{"text-size":p.textfont.size,"text-anchor":de.anchor,"text-offset":de.offset,"text-font":A(p)}),x.extendFlat(B.paint,{"text-color":p.textfont.color,"text-opacity":p.opacity})}return X};function f(M){return{type:M,geojson:E.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function v(M){var g=M[0].trace,b=g.marker,p=g.selectedpoints,u=x.isArrayOrTypedArray(b.color),y=x.isArrayOrTypedArray(b.size),m=x.isArrayOrTypedArray(b.opacity),R;function L(ce){return g.opacity*ce}function z(ce){return ce/2}var F;u&&(e.hasColorscale(g,"marker")?F=e.makeColorScaleFuncFromTrace(b):F=x.identity);var N;y&&(N=r(g));var O;m&&(O=function(ce){var de=d(ce)?+x.constrain(ce,0,1):0;return L(de)});var P=[];for(R=0;R850?R+=" Black":u>750?R+=" Extra Bold":u>650?R+=" Bold":u>550?R+=" Semi Bold":u>450?R+=" Medium":u>350?R+=" Regular":u>250?R+=" Light":u>150?R+=" Extra Light":R+=" Thin"):y.slice(0,2).join(" ")==="Open Sans"?(R="Open Sans",u>750?R+=" Extrabold":u>650?R+=" Bold":u>550?R+=" Semibold":u>350?R+=" Regular":R+=" Light"):y.slice(0,3).join(" ")==="Klokantech Noto Sans"&&(R="Klokantech Noto Sans",y[3]==="CJK"&&(R+=" CJK"),R+=u>500?" Bold":" Regular")),m&&(R+=" Italic"),R==="Open Sans Regular Italic"?R="Open Sans Italic":R==="Open Sans Regular Bold"?R="Open Sans Bold":R==="Open Sans Regular Bold Italic"?R="Open Sans Bold Italic":R==="Klokantech Noto Sans Regular Italic"&&(R="Klokantech Noto Sans Italic"),a(R)||(R=b);var L=R.split(", ");return L}}}),NV=He({"src/traces/scattermap/plot.js"(Z,V){"use strict";var d=sa(),x=BV(),S=b0().traceLayerPrefix,E={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function e(r,o,a,n){this.type="scattermap",this.subplot=r,this.uid=o,this.clusterEnabled=a,this.isHidden=n,this.sourceIds={fill:"source-"+o+"-fill",line:"source-"+o+"-line",circle:"source-"+o+"-circle",symbol:"source-"+o+"-symbol",cluster:"source-"+o+"-circle",clusterCount:"source-"+o+"-circle"},this.layerIds={fill:S+o+"-fill",line:S+o+"-line",circle:S+o+"-circle",symbol:S+o+"-symbol",cluster:S+o+"-cluster",clusterCount:S+o+"-cluster-count"},this.below=null}var t=e.prototype;t.addSource=function(r,o,a){var n={type:"geojson",data:o.geojson};a&&a.enabled&&d.extendFlat(n,{cluster:!0,clusterMaxZoom:a.maxzoom});var i=this.subplot.map.getSource(this.sourceIds[r]);i?i.setData(o.geojson):this.subplot.map.addSource(this.sourceIds[r],n)},t.setSourceData=function(r,o){this.subplot.map.getSource(this.sourceIds[r]).setData(o.geojson)},t.addLayer=function(r,o,a){var n={type:o.type,id:this.layerIds[r],source:this.sourceIds[r],layout:o.layout,paint:o.paint};o.filter&&(n.filter=o.filter);for(var i=this.layerIds[r],s,h=this.subplot.getMapLayers(),f=0;f=0;m--){var R=y[m];i.removeLayer(c.layerIds[R])}u||i.removeSource(c.sourceIds.circle)}function _(u){for(var y=E.nonCluster,m=0;m=0;m--){var R=y[m];i.removeLayer(c.layerIds[R]),u||i.removeSource(c.sourceIds[R])}}function A(u){v?l(u):w(u)}function M(u){f?T(u):_(u)}function g(){for(var u=f?E.cluster:E.nonCluster,y=0;y=0;n--){var i=a[n];o.removeLayer(this.layerIds[i]),o.removeSource(this.sourceIds[i])}},V.exports=function(o,a){var n=a[0].trace,i=n.cluster&&n.cluster.enabled,s=n.visible!==!0,h=new e(o,n.uid,i,s),f=x(o.gd,a),v=h.below=o.belowLookup["trace-"+n.uid],c,T,l;if(i)for(h.addSource("circle",f.circle,n.cluster),c=0;c=0?Math.floor((n+180)/360):Math.ceil((n-180)/360),M=A*360,g=n-M;function b(N){var O=N.lonlat;if(O[0]===e||_&&T.indexOf(N.i+1)===-1)return 1/0;var P=x.modHalf(O[0],360),U=O[1],B=c.project([P,U]),X=B.x-f.c2p([g,U]),$=B.y-v.c2p([P,i]),le=Math.max(3,N.mrc||0);return Math.max(Math.sqrt(X*X+$*$)-le,1-3/le)}if(d.getClosest(s,b,a),a.index!==!1){var p=s[a.index],u=p.lonlat,y=[x.modHalf(u[0],360)+M,u[1]],m=f.c2p(y),R=v.c2p(y),L=p.mrc||1;a.x0=m-L,a.x1=m+L,a.y0=R-L,a.y1=R+L;var z={};z[h.subplot]={_subplot:c};var F=h._module.formatLabels(p,h,z);return a.lonLabel=F.lonLabel,a.latLabel=F.latLabel,a.color=S(h,p),a.extraText=o(h,p,s[0].t.labels),a.hovertemplate=h.hovertemplate,[a]}}function o(a,n,i){if(a.hovertemplate)return;var s=n.hi||a.hoverinfo,h=s.split("+"),f=h.indexOf("all")!==-1,v=h.indexOf("lon")!==-1,c=h.indexOf("lat")!==-1,T=n.lonlat,l=[];function _(w){return w+"\xB0"}return f||v&&c?l.push("("+_(T[1])+", "+_(T[0])+")"):v?l.push(i.lon+_(T[0])):c&&l.push(i.lat+_(T[1])),(f||h.indexOf("text")!==-1)&&E(n,a,l),l.join("
")}V.exports={hoverPoints:r,getExtraText:o}}}),UV=He({"src/traces/scattermap/event_data.js"(Z,V){"use strict";V.exports=function(x,S){return x.lon=S.lon,x.lat=S.lat,x}}}),jV=He({"src/traces/scattermap/select.js"(Z,V){"use strict";var d=sa(),x=Fu(),S=Ws().BADNUM;V.exports=function(e,t){var r=e.cd,o=e.xaxis,a=e.yaxis,n=[],i=r[0].trace,s;if(!x.hasMarkers(i))return[];if(t===!1)for(s=0;s1)return 1;for(var J=W,ve=0;ve<8;ve++){var Ee=this.sampleCurveX(J)-W;if(Math.abs(Ee)Ee?Ge=J:ct=J,J=.5*(ct-Ge)+Ge;return J},solve:function(W,D){return this.sampleCurveY(this.solveCurveX(W,D))}};var h=r(i);let f,v;function c(){return f==null&&(f=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),f}function T(){if(v==null&&(v=!1,c())){let D=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(D){for(let ve=0;ve<5*5;ve++){let Ee=4*ve;D.fillStyle=`rgb(${Ee},${Ee+1},${Ee+2})`,D.fillRect(ve%5,Math.floor(ve/5),1,1)}let J=D.getImageData(0,0,5,5).data;for(let ve=0;ve<5*5*4;ve++)if(ve%4!=3&&J[ve]!==ve){v=!0;break}}}return v||!1}function l(W,D,J,ve){let Ee=new h(W,D,J,ve);return Be=>Ee.solve(Be)}let _=l(.25,.1,.25,1);function w(W,D,J){return Math.min(J,Math.max(D,W))}function A(W,D,J){let ve=J-D,Ee=((W-D)%ve+ve)%ve+D;return Ee===D?J:Ee}function M(W,...D){for(let J of D)for(let ve in J)W[ve]=J[ve];return W}let g=1;function b(W,D,J){let ve={};for(let Ee in W)ve[Ee]=D.call(this,W[Ee],Ee,W);return ve}function p(W,D,J){let ve={};for(let Ee in W)D.call(this,W[Ee],Ee,W)&&(ve[Ee]=W[Ee]);return ve}function u(W){return Array.isArray(W)?W.map(u):typeof W=="object"&&W?b(W,u):W}let y={};function m(W){y[W]||(typeof console<"u"&&console.warn(W),y[W]=!0)}function R(W,D,J){return(J.y-W.y)*(D.x-W.x)>(D.y-W.y)*(J.x-W.x)}function L(W){return typeof WorkerGlobalScope<"u"&&W!==void 0&&W instanceof WorkerGlobalScope}let z=null;function F(W){return typeof ImageBitmap<"u"&&W instanceof ImageBitmap}let N="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function O(W,D,J,ve,Ee){return t(this,void 0,void 0,function*(){if(typeof VideoFrame>"u")throw new Error("VideoFrame not supported");let Be=new VideoFrame(W,{timestamp:0});try{let Ge=Be?.format;if(!Ge||!Ge.startsWith("BGR")&&!Ge.startsWith("RGB"))throw new Error(`Unrecognized format ${Ge}`);let ct=Ge.startsWith("BGR"),At=new Uint8ClampedArray(ve*Ee*4);if(yield Be.copyTo(At,function(Bt,ar,Sr,zr,Wr){let ia=4*Math.max(-ar,0),fa=(Math.max(0,Sr)-Sr)*zr*4+ia,ja=4*zr,Ka=Math.max(0,ar),Wi=Math.max(0,Sr);return{rect:{x:Ka,y:Wi,width:Math.min(Bt.width,ar+zr)-Ka,height:Math.min(Bt.height,Sr+Wr)-Wi},layout:[{offset:fa,stride:ja}]}}(W,D,J,ve,Ee)),ct)for(let Bt=0;BtL(self)?self.worker&&self.worker.referrer:(window.location.protocol==="blob:"?window.parent:window).location.href,Y=function(W,D){if(/:\/\//.test(W.url)&&!/^https?:|^file:/.test(W.url)){let ve=le(W.url);if(ve)return ve(W,D);if(L(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:W,targetMapId:ce},D)}if(!(/^file:/.test(J=W.url)||/^file:/.test(G())&&!/^\w+:/.test(J))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return function(ve,Ee){return t(this,void 0,void 0,function*(){let Be=new Request(ve.url,{method:ve.method||"GET",body:ve.body,credentials:ve.credentials,headers:ve.headers,cache:ve.cache,referrer:G(),signal:Ee.signal});ve.type!=="json"||Be.headers.has("Accept")||Be.headers.set("Accept","application/json");let Ge=yield fetch(Be);if(!Ge.ok){let Bt=yield Ge.blob();throw new de(Ge.status,Ge.statusText,ve.url,Bt)}let ct;ct=ve.type==="arrayBuffer"||ve.type==="image"?Ge.arrayBuffer():ve.type==="json"?Ge.json():Ge.text();let At=yield ct;if(Ee.signal.aborted)throw X();return{data:At,cacheControl:Ge.headers.get("Cache-Control"),expires:Ge.headers.get("Expires")}})}(W,D);if(L(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:W,mustQueue:!0,targetMapId:ce},D)}var J;return function(ve,Ee){return new Promise((Be,Ge)=>{var ct;let At=new XMLHttpRequest;At.open(ve.method||"GET",ve.url,!0),ve.type!=="arrayBuffer"&&ve.type!=="image"||(At.responseType="arraybuffer");for(let Bt in ve.headers)At.setRequestHeader(Bt,ve.headers[Bt]);ve.type==="json"&&(At.responseType="text",!((ct=ve.headers)===null||ct===void 0)&&ct.Accept||At.setRequestHeader("Accept","application/json")),At.withCredentials=ve.credentials==="include",At.onerror=()=>{Ge(new Error(At.statusText))},At.onload=()=>{if(!Ee.signal.aborted)if((At.status>=200&&At.status<300||At.status===0)&&At.response!==null){let Bt=At.response;if(ve.type==="json")try{Bt=JSON.parse(At.response)}catch(ar){return void Ge(ar)}Be({data:Bt,cacheControl:At.getResponseHeader("Cache-Control"),expires:At.getResponseHeader("Expires")})}else{let Bt=new Blob([At.response],{type:At.getResponseHeader("Content-Type")});Ge(new de(At.status,At.statusText,ve.url,Bt))}},Ee.signal.addEventListener("abort",()=>{At.abort(),Ge(X())}),At.send(ve.body)})}(W,D)};function ee(W){if(!W||W.indexOf("://")<=0||W.indexOf("data:image/")===0||W.indexOf("blob:")===0)return!0;let D=new URL(W),J=window.location;return D.protocol===J.protocol&&D.host===J.host}function q(W,D,J){J[W]&&J[W].indexOf(D)!==-1||(J[W]=J[W]||[],J[W].push(D))}function se(W,D,J){if(J&&J[W]){let ve=J[W].indexOf(D);ve!==-1&&J[W].splice(ve,1)}}class ae{constructor(D,J={}){M(this,J),this.type=D}}class j extends ae{constructor(D,J={}){super("error",M({error:D},J))}}class Q{on(D,J){return this._listeners=this._listeners||{},q(D,J,this._listeners),this}off(D,J){return se(D,J,this._listeners),se(D,J,this._oneTimeListeners),this}once(D,J){return J?(this._oneTimeListeners=this._oneTimeListeners||{},q(D,J,this._oneTimeListeners),this):new Promise(ve=>this.once(D,ve))}fire(D,J){typeof D=="string"&&(D=new ae(D,J||{}));let ve=D.type;if(this.listens(ve)){D.target=this;let Ee=this._listeners&&this._listeners[ve]?this._listeners[ve].slice():[];for(let ct of Ee)ct.call(this,D);let Be=this._oneTimeListeners&&this._oneTimeListeners[ve]?this._oneTimeListeners[ve].slice():[];for(let ct of Be)se(ve,ct,this._oneTimeListeners),ct.call(this,D);let Ge=this._eventedParent;Ge&&(M(D,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),Ge.fire(D))}else D instanceof j&&console.error(D.error);return this}listens(D){return this._listeners&&this._listeners[D]&&this._listeners[D].length>0||this._oneTimeListeners&&this._oneTimeListeners[D]&&this._oneTimeListeners[D].length>0||this._eventedParent&&this._eventedParent.listens(D)}setEventedParent(D,J){return this._eventedParent=D,this._eventedParentData=J,this}}var re={$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"},sky:{type:"sky"},projection:{type:"projection"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{},custom:{}},default:"mapbox"},redFactor:{type:"number",default:1},blueFactor:{type:"number",default:1},greenFactor:{type:"number",default:1},baseShift:{type:"number",default:0},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{required:!0,type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image",{"!":"icon-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"padding",default:[2],units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},"viewport-glyph":{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-variable-anchor-offset":{type:"variableAnchorOffsetCollection",requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field",{"!":"text-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},sky:{"sky-color":{type:"color","property-type":"data-constant",default:"#88C6FC",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-ground-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-fog-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"sky-horizon-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"atmosphere-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},projection:{type:{type:"enum",default:"mercator",values:{mercator:{},globe:{}}}},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"}}};let pe=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function we(W,D){let J={};for(let ve in W)ve!=="ref"&&(J[ve]=W[ve]);return pe.forEach(ve=>{ve in D&&(J[ve]=D[ve])}),J}function Se(W,D){if(Array.isArray(W)){if(!Array.isArray(D)||W.length!==D.length)return!1;for(let J=0;J`:W.itemType.kind==="value"?"array":`array<${D}>`}return W.kind}let Ae=[rt,Ke,Mt,kt,Nt,qr,Gt,Oe(Mr),Er,Ir,_t];function Le(W,D){if(D.kind==="error")return null;if(W.kind==="array"){if(D.kind==="array"&&(D.N===0&&D.itemType.kind==="value"||!Le(W.itemType,D.itemType))&&(typeof W.N!="number"||W.N===D.N))return null}else{if(W.kind===D.kind)return null;if(W.kind==="value"){for(let J of Ae)if(!Le(J,D))return null}}return`Expected ${Je(W)} but found ${Je(D)} instead.`}function Ue(W,D){return D.some(J=>J.kind===W.kind)}function Ze(W,D){return D.some(J=>J==="null"?W===null:J==="array"?Array.isArray(W):J==="object"?W&&!Array.isArray(W)&&typeof W=="object":J===typeof W)}function st(W,D){return W.kind==="array"&&D.kind==="array"?W.itemType.kind===D.itemType.kind&&typeof W.N=="number":W.kind===D.kind}let ut=.96422,Ut=.82521,Ct=4/29,Pt=6/29,jt=3*Pt*Pt,fr=Pt*Pt*Pt,ur=Math.PI/180,sr=180/Math.PI;function Pr(W){return(W%=360)<0&&(W+=360),W}function Ta([W,D,J,ve]){let Ee,Be,Ge=Ia((.2225045*(W=Oa(W))+.7168786*(D=Oa(D))+.0606169*(J=Oa(J)))/1);W===D&&D===J?Ee=Be=Ge:(Ee=Ia((.4360747*W+.3850649*D+.1430804*J)/ut),Be=Ia((.0139322*W+.0971045*D+.7141733*J)/Ut));let ct=116*Ge-16;return[ct<0?0:ct,500*(Ee-Ge),200*(Ge-Be),ve]}function Oa(W){return W<=.04045?W/12.92:Math.pow((W+.055)/1.055,2.4)}function Ia(W){return W>fr?Math.pow(W,1/3):W/jt+Ct}function qa([W,D,J,ve]){let Ee=(W+16)/116,Be=isNaN(D)?Ee:Ee+D/500,Ge=isNaN(J)?Ee:Ee-J/200;return Ee=1*Ca(Ee),Be=ut*Ca(Be),Ge=Ut*Ca(Ge),[Wa(3.1338561*Be-1.6168667*Ee-.4906146*Ge),Wa(-.9787684*Be+1.9161415*Ee+.033454*Ge),Wa(.0719453*Be-.2289914*Ee+1.4052427*Ge),ve]}function Wa(W){return(W=W<=.00304?12.92*W:1.055*Math.pow(W,1/2.4)-.055)<0?0:W>1?1:W}function Ca(W){return W>Pt?W*W*W:jt*(W-Ct)}function hi(W){return parseInt(W.padEnd(2,W),16)/255}function wi(W,D){return Kt(D?W/100:W,0,1)}function Kt(W,D,J){return Math.min(Math.max(D,W),J)}function Dt(W){return!W.some(Number.isNaN)}let Yt={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};class Jt{constructor(D,J,ve,Ee=1,Be=!0){this.r=D,this.g=J,this.b=ve,this.a=Ee,Be||(this.r*=Ee,this.g*=Ee,this.b*=Ee,Ee||this.overwriteGetter("rgb",[D,J,ve,Ee]))}static parse(D){if(D instanceof Jt)return D;if(typeof D!="string")return;let J=function(ve){if((ve=ve.toLowerCase().trim())==="transparent")return[0,0,0,0];let Ee=Yt[ve];if(Ee){let[Ge,ct,At]=Ee;return[Ge/255,ct/255,At/255,1]}if(ve.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(ve)){let Ge=ve.length<6?1:2,ct=1;return[hi(ve.slice(ct,ct+=Ge)),hi(ve.slice(ct,ct+=Ge)),hi(ve.slice(ct,ct+=Ge)),hi(ve.slice(ct,ct+Ge)||"ff")]}if(ve.startsWith("rgb")){let Ge=ve.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(Ge){let[ct,At,Bt,ar,Sr,zr,Wr,ia,fa,ja,Ka,Wi]=Ge,gi=[ar||" ",Wr||" ",ja].join("");if(gi===" "||gi===" /"||gi===",,"||gi===",,,"){let qi=[Bt,zr,fa].join(""),en=qi==="%%%"?100:qi===""?255:0;if(en){let qn=[Kt(+At/en,0,1),Kt(+Sr/en,0,1),Kt(+ia/en,0,1),Ka?wi(+Ka,Wi):1];if(Dt(qn))return qn}}return}}let Be=ve.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(Be){let[Ge,ct,At,Bt,ar,Sr,zr,Wr,ia]=Be,fa=[At||" ",ar||" ",zr].join("");if(fa===" "||fa===" /"||fa===",,"||fa===",,,"){let ja=[+ct,Kt(+Bt,0,100),Kt(+Sr,0,100),Wr?wi(+Wr,ia):1];if(Dt(ja))return function([Ka,Wi,gi,qi]){function en(qn){let ko=(qn+Ka/30)%12,ys=Wi*Math.min(gi,1-gi);return gi-ys*Math.max(-1,Math.min(ko-3,9-ko,1))}return Ka=Pr(Ka),Wi/=100,gi/=100,[en(0),en(8),en(4),qi]}(ja)}}}(D);return J?new Jt(...J,!1):void 0}get rgb(){let{r:D,g:J,b:ve,a:Ee}=this,Be=Ee||1/0;return this.overwriteGetter("rgb",[D/Be,J/Be,ve/Be,Ee])}get hcl(){return this.overwriteGetter("hcl",function(D){let[J,ve,Ee,Be]=Ta(D),Ge=Math.sqrt(ve*ve+Ee*Ee);return[Math.round(1e4*Ge)?Pr(Math.atan2(Ee,ve)*sr):NaN,Ge,J,Be]}(this.rgb))}get lab(){return this.overwriteGetter("lab",Ta(this.rgb))}overwriteGetter(D,J){return Object.defineProperty(this,D,{value:J}),J}toString(){let[D,J,ve,Ee]=this.rgb;return`rgba(${[D,J,ve].map(Be=>Math.round(255*Be)).join(",")},${Ee})`}}Jt.black=new Jt(0,0,0,1),Jt.white=new Jt(1,1,1,1),Jt.transparent=new Jt(0,0,0,0),Jt.red=new Jt(1,0,0,1);class Fr{constructor(D,J,ve){this.sensitivity=D?J?"variant":"case":J?"accent":"base",this.locale=ve,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(D,J){return this.collator.compare(D,J)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class ta{constructor(D,J,ve,Ee,Be){this.text=D,this.image=J,this.scale=ve,this.fontStack=Ee,this.textColor=Be}}class ra{constructor(D){this.sections=D}static fromString(D){return new ra([new ta(D,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(D=>D.text.length!==0||D.image&&D.image.name.length!==0)}static factory(D){return D instanceof ra?D:ra.fromString(D)}toString(){return this.sections.length===0?"":this.sections.map(D=>D.text).join("")}}class ca{constructor(D){this.values=D.slice()}static parse(D){if(D instanceof ca)return D;if(typeof D=="number")return new ca([D,D,D,D]);if(Array.isArray(D)&&!(D.length<1||D.length>4)){for(let J of D)if(typeof J!="number")return;switch(D.length){case 1:D=[D[0],D[0],D[0],D[0]];break;case 2:D=[D[0],D[1],D[0],D[1]];break;case 3:D=[D[0],D[1],D[2],D[1]]}return new ca(D)}}toString(){return JSON.stringify(this.values)}}let Ba=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class $a{constructor(D){this.values=D.slice()}static parse(D){if(D instanceof $a)return D;if(Array.isArray(D)&&!(D.length<1)&&D.length%2==0){for(let J=0;J=0&&W<=255&&typeof D=="number"&&D>=0&&D<=255&&typeof J=="number"&&J>=0&&J<=255?ve===void 0||typeof ve=="number"&&ve>=0&&ve<=1?null:`Invalid rgba value [${[W,D,J,ve].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof ve=="number"?[W,D,J,ve]:[W,D,J]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function pi(W){if(W===null||typeof W=="string"||typeof W=="boolean"||typeof W=="number"||W instanceof Jt||W instanceof Fr||W instanceof ra||W instanceof ca||W instanceof $a||W instanceof Za)return!0;if(Array.isArray(W)){for(let D of W)if(!pi(D))return!1;return!0}if(typeof W=="object"){for(let D in W)if(!pi(W[D]))return!1;return!0}return!1}function Ra(W){if(W===null)return rt;if(typeof W=="string")return Mt;if(typeof W=="boolean")return kt;if(typeof W=="number")return Ke;if(W instanceof Jt)return Nt;if(W instanceof Fr)return mr;if(W instanceof ra)return qr;if(W instanceof ca)return Er;if(W instanceof $a)return _t;if(W instanceof Za)return Ir;if(Array.isArray(W)){let D=W.length,J;for(let ve of W){let Ee=Ra(ve);if(J){if(J===Ee)continue;J=Mr;break}J=Ee}return Oe(J||Mr,D)}return Gt}function an(W){let D=typeof W;return W===null?"":D==="string"||D==="number"||D==="boolean"?String(W):W instanceof Jt||W instanceof ra||W instanceof ca||W instanceof $a||W instanceof Za?W.toString():JSON.stringify(W)}class tn{constructor(D,J){this.type=D,this.value=J}static parse(D,J){if(D.length!==2)return J.error(`'literal' expression requires exactly one argument, but found ${D.length-1} instead.`);if(!pi(D[1]))return J.error("invalid value");let ve=D[1],Ee=Ra(ve),Be=J.expectedType;return Ee.kind!=="array"||Ee.N!==0||!Be||Be.kind!=="array"||typeof Be.N=="number"&&Be.N!==0||(Ee=Be),new tn(Ee,ve)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}class fn{constructor(D){this.name="ExpressionEvaluationError",this.message=D}toJSON(){return this.message}}let xt={string:Mt,number:Ke,boolean:kt,object:Gt};class lt{constructor(D,J){this.type=D,this.args=J}static parse(D,J){if(D.length<2)return J.error("Expected at least one argument.");let ve,Ee=1,Be=D[0];if(Be==="array"){let ct,At;if(D.length>2){let Bt=D[1];if(typeof Bt!="string"||!(Bt in xt)||Bt==="object")return J.error('The item type argument of "array" must be one of string, number, boolean',1);ct=xt[Bt],Ee++}else ct=Mr;if(D.length>3){if(D[2]!==null&&(typeof D[2]!="number"||D[2]<0||D[2]!==Math.floor(D[2])))return J.error('The length argument to "array" must be a positive integer literal',2);At=D[2],Ee++}ve=Oe(ct,At)}else{if(!xt[Be])throw new Error(`Types doesn't contain name = ${Be}`);ve=xt[Be]}let Ge=[];for(;EeD.outputDefined())}}let Br={"to-boolean":kt,"to-color":Nt,"to-number":Ke,"to-string":Mt};class Cr{constructor(D,J){this.type=D,this.args=J}static parse(D,J){if(D.length<2)return J.error("Expected at least one argument.");let ve=D[0];if(!Br[ve])throw new Error(`Can't parse ${ve} as it is not part of the known types`);if((ve==="to-boolean"||ve==="to-string")&&D.length!==2)return J.error("Expected one argument.");let Ee=Br[ve],Be=[];for(let Ge=1;Ge4?`Invalid rbga value ${JSON.stringify(J)}: expected an array containing either three or four numeric values.`:ri(J[0],J[1],J[2],J[3]),!ve))return new Jt(J[0]/255,J[1]/255,J[2]/255,J[3])}throw new fn(ve||`Could not parse color from value '${typeof J=="string"?J:JSON.stringify(J)}'`)}case"padding":{let J;for(let ve of this.args){J=ve.evaluate(D);let Ee=ca.parse(J);if(Ee)return Ee}throw new fn(`Could not parse padding from value '${typeof J=="string"?J:JSON.stringify(J)}'`)}case"variableAnchorOffsetCollection":{let J;for(let ve of this.args){J=ve.evaluate(D);let Ee=$a.parse(J);if(Ee)return Ee}throw new fn(`Could not parse variableAnchorOffsetCollection from value '${typeof J=="string"?J:JSON.stringify(J)}'`)}case"number":{let J=null;for(let ve of this.args){if(J=ve.evaluate(D),J===null)return 0;let Ee=Number(J);if(!isNaN(Ee))return Ee}throw new fn(`Could not convert ${JSON.stringify(J)} to number.`)}case"formatted":return ra.fromString(an(this.args[0].evaluate(D)));case"resolvedImage":return Za.fromString(an(this.args[0].evaluate(D)));default:return an(this.args[0].evaluate(D))}}eachChild(D){this.args.forEach(D)}outputDefined(){return this.args.every(D=>D.outputDefined())}}let xr=["Unknown","Point","LineString","Polygon"];class Rr{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null}id(){return this.feature&&"id"in this.feature?this.feature.id:null}geometryType(){return this.feature?typeof this.feature.type=="number"?xr[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}parseColor(D){let J=this._parseColorCache[D];return J||(J=this._parseColorCache[D]=Jt.parse(D)),J}}class Ur{constructor(D,J,ve=[],Ee,Be=new Ye,Ge=[]){this.registry=D,this.path=ve,this.key=ve.map(ct=>`[${ct}]`).join(""),this.scope=Be,this.errors=Ge,this.expectedType=Ee,this._isConstant=J}parse(D,J,ve,Ee,Be={}){return J?this.concat(J,ve,Ee)._parse(D,Be):this._parse(D,Be)}_parse(D,J){function ve(Ee,Be,Ge){return Ge==="assert"?new lt(Be,[Ee]):Ge==="coerce"?new Cr(Be,[Ee]):Ee}if(D!==null&&typeof D!="string"&&typeof D!="boolean"&&typeof D!="number"||(D=["literal",D]),Array.isArray(D)){if(D.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');let Ee=D[0];if(typeof Ee!="string")return this.error(`Expression name must be a string, but found ${typeof Ee} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;let Be=this.registry[Ee];if(Be){let Ge=Be.parse(D,this);if(!Ge)return null;if(this.expectedType){let ct=this.expectedType,At=Ge.type;if(ct.kind!=="string"&&ct.kind!=="number"&&ct.kind!=="boolean"&&ct.kind!=="object"&&ct.kind!=="array"||At.kind!=="value")if(ct.kind!=="color"&&ct.kind!=="formatted"&&ct.kind!=="resolvedImage"||At.kind!=="value"&&At.kind!=="string")if(ct.kind!=="padding"||At.kind!=="value"&&At.kind!=="number"&&At.kind!=="array")if(ct.kind!=="variableAnchorOffsetCollection"||At.kind!=="value"&&At.kind!=="array"){if(this.checkSubtype(ct,At))return null}else Ge=ve(Ge,ct,J.typeAnnotation||"coerce");else Ge=ve(Ge,ct,J.typeAnnotation||"coerce");else Ge=ve(Ge,ct,J.typeAnnotation||"coerce");else Ge=ve(Ge,ct,J.typeAnnotation||"assert")}if(!(Ge instanceof tn)&&Ge.type.kind!=="resolvedImage"&&this._isConstant(Ge)){let ct=new Rr;try{Ge=new tn(Ge.type,Ge.evaluate(ct))}catch(At){return this.error(At.message),null}}return Ge}return this.error(`Unknown expression "${Ee}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(D===void 0?"'undefined' value invalid. Use null instead.":typeof D=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof D} instead.`)}concat(D,J,ve){let Ee=typeof D=="number"?this.path.concat(D):this.path,Be=ve?this.scope.concat(ve):this.scope;return new Ur(this.registry,this._isConstant,Ee,J||null,Be,this.errors)}error(D,...J){let ve=`${this.key}${J.map(Ee=>`[${Ee}]`).join("")}`;this.errors.push(new Ce(ve,D))}checkSubtype(D,J){let ve=Le(D,J);return ve&&this.error(ve),ve}}class Hr{constructor(D,J){this.type=J.type,this.bindings=[].concat(D),this.result=J}evaluate(D){return this.result.evaluate(D)}eachChild(D){for(let J of this.bindings)D(J[1]);D(this.result)}static parse(D,J){if(D.length<4)return J.error(`Expected at least 3 arguments, but found ${D.length-1} instead.`);let ve=[];for(let Be=1;Be=ve.length)throw new fn(`Array index out of bounds: ${J} > ${ve.length-1}.`);if(J!==Math.floor(J))throw new fn(`Array index must be an integer, but found ${J} instead.`);return ve[J]}eachChild(D){D(this.index),D(this.input)}outputDefined(){return!1}}class vr{constructor(D,J){this.type=kt,this.needle=D,this.haystack=J}static parse(D,J){if(D.length!==3)return J.error(`Expected 2 arguments, but found ${D.length-1} instead.`);let ve=J.parse(D[1],1,Mr),Ee=J.parse(D[2],2,Mr);return ve&&Ee?Ue(ve.type,[kt,Mt,Ke,rt,Mr])?new vr(ve,Ee):J.error(`Expected first argument to be of type boolean, string, number or null, but found ${Je(ve.type)} instead`):null}evaluate(D){let J=this.needle.evaluate(D),ve=this.haystack.evaluate(D);if(!ve)return!1;if(!Ze(J,["boolean","string","number","null"]))throw new fn(`Expected first argument to be of type boolean, string, number or null, but found ${Je(Ra(J))} instead.`);if(!Ze(ve,["string","array"]))throw new fn(`Expected second argument to be of type array or string, but found ${Je(Ra(ve))} instead.`);return ve.indexOf(J)>=0}eachChild(D){D(this.needle),D(this.haystack)}outputDefined(){return!0}}class Or{constructor(D,J,ve){this.type=Ke,this.needle=D,this.haystack=J,this.fromIndex=ve}static parse(D,J){if(D.length<=2||D.length>=5)return J.error(`Expected 3 or 4 arguments, but found ${D.length-1} instead.`);let ve=J.parse(D[1],1,Mr),Ee=J.parse(D[2],2,Mr);if(!ve||!Ee)return null;if(!Ue(ve.type,[kt,Mt,Ke,rt,Mr]))return J.error(`Expected first argument to be of type boolean, string, number or null, but found ${Je(ve.type)} instead`);if(D.length===4){let Be=J.parse(D[3],3,Ke);return Be?new Or(ve,Ee,Be):null}return new Or(ve,Ee)}evaluate(D){let J=this.needle.evaluate(D),ve=this.haystack.evaluate(D);if(!Ze(J,["boolean","string","number","null"]))throw new fn(`Expected first argument to be of type boolean, string, number or null, but found ${Je(Ra(J))} instead.`);let Ee;if(this.fromIndex&&(Ee=this.fromIndex.evaluate(D)),Ze(ve,["string"])){let Be=ve.indexOf(J,Ee);return Be===-1?-1:[...ve.slice(0,Be)].length}if(Ze(ve,["array"]))return ve.indexOf(J,Ee);throw new fn(`Expected second argument to be of type array or string, but found ${Je(Ra(ve))} instead.`)}eachChild(D){D(this.needle),D(this.haystack),this.fromIndex&&D(this.fromIndex)}outputDefined(){return!1}}class ba{constructor(D,J,ve,Ee,Be,Ge){this.inputType=D,this.type=J,this.input=ve,this.cases=Ee,this.outputs=Be,this.otherwise=Ge}static parse(D,J){if(D.length<5)return J.error(`Expected at least 4 arguments, but found only ${D.length-1}.`);if(D.length%2!=1)return J.error("Expected an even number of arguments.");let ve,Ee;J.expectedType&&J.expectedType.kind!=="value"&&(Ee=J.expectedType);let Be={},Ge=[];for(let Bt=2;BtNumber.MAX_SAFE_INTEGER)return zr.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof ia=="number"&&Math.floor(ia)!==ia)return zr.error("Numeric branch labels must be integer values.");if(ve){if(zr.checkSubtype(ve,Ra(ia)))return null}else ve=Ra(ia);if(Be[String(ia)]!==void 0)return zr.error("Branch labels must be unique.");Be[String(ia)]=Ge.length}let Wr=J.parse(Sr,Bt,Ee);if(!Wr)return null;Ee=Ee||Wr.type,Ge.push(Wr)}let ct=J.parse(D[1],1,Mr);if(!ct)return null;let At=J.parse(D[D.length-1],D.length-1,Ee);return At?ct.type.kind!=="value"&&J.concat(1).checkSubtype(ve,ct.type)?null:new ba(ve,Ee,ct,Be,Ge,At):null}evaluate(D){let J=this.input.evaluate(D);return(Ra(J)===this.inputType&&this.outputs[this.cases[J]]||this.otherwise).evaluate(D)}eachChild(D){D(this.input),this.outputs.forEach(D),D(this.otherwise)}outputDefined(){return this.outputs.every(D=>D.outputDefined())&&this.otherwise.outputDefined()}}class Pa{constructor(D,J,ve){this.type=D,this.branches=J,this.otherwise=ve}static parse(D,J){if(D.length<4)return J.error(`Expected at least 3 arguments, but found only ${D.length-1}.`);if(D.length%2!=0)return J.error("Expected an odd number of arguments.");let ve;J.expectedType&&J.expectedType.kind!=="value"&&(ve=J.expectedType);let Ee=[];for(let Ge=1;GeJ.outputDefined())&&this.otherwise.outputDefined()}}class ma{constructor(D,J,ve,Ee){this.type=D,this.input=J,this.beginIndex=ve,this.endIndex=Ee}static parse(D,J){if(D.length<=2||D.length>=5)return J.error(`Expected 3 or 4 arguments, but found ${D.length-1} instead.`);let ve=J.parse(D[1],1,Mr),Ee=J.parse(D[2],2,Ke);if(!ve||!Ee)return null;if(!Ue(ve.type,[Oe(Mr),Mt,Mr]))return J.error(`Expected first argument to be of type array or string, but found ${Je(ve.type)} instead`);if(D.length===4){let Be=J.parse(D[3],3,Ke);return Be?new ma(ve.type,ve,Ee,Be):null}return new ma(ve.type,ve,Ee)}evaluate(D){let J=this.input.evaluate(D),ve=this.beginIndex.evaluate(D),Ee;if(this.endIndex&&(Ee=this.endIndex.evaluate(D)),Ze(J,["string"]))return[...J].slice(ve,Ee).join("");if(Ze(J,["array"]))return J.slice(ve,Ee);throw new fn(`Expected first argument to be of type array or string, but found ${Je(Ra(J))} instead.`)}eachChild(D){D(this.input),D(this.beginIndex),this.endIndex&&D(this.endIndex)}outputDefined(){return!1}}function la(W,D){let J=W.length-1,ve,Ee,Be=0,Ge=J,ct=0;for(;Be<=Ge;)if(ct=Math.floor((Be+Ge)/2),ve=W[ct],Ee=W[ct+1],ve<=D){if(ct===J||DD))throw new fn("Input is not a number.");Ge=ct-1}return 0}class _a{constructor(D,J,ve){this.type=D,this.input=J,this.labels=[],this.outputs=[];for(let[Ee,Be]of ve)this.labels.push(Ee),this.outputs.push(Be)}static parse(D,J){if(D.length-1<4)return J.error(`Expected at least 4 arguments, but found only ${D.length-1}.`);if((D.length-1)%2!=0)return J.error("Expected an even number of arguments.");let ve=J.parse(D[1],1,Ke);if(!ve)return null;let Ee=[],Be=null;J.expectedType&&J.expectedType.kind!=="value"&&(Be=J.expectedType);for(let Ge=1;Ge=ct)return J.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',Bt);let Sr=J.parse(At,ar,Be);if(!Sr)return null;Be=Be||Sr.type,Ee.push([ct,Sr])}return new _a(Be,ve,Ee)}evaluate(D){let J=this.labels,ve=this.outputs;if(J.length===1)return ve[0].evaluate(D);let Ee=this.input.evaluate(D);if(Ee<=J[0])return ve[0].evaluate(D);let Be=J.length;return Ee>=J[Be-1]?ve[Be-1].evaluate(D):ve[la(J,Ee)].evaluate(D)}eachChild(D){D(this.input);for(let J of this.outputs)D(J)}outputDefined(){return this.outputs.every(D=>D.outputDefined())}}function Ai(W){return W&&W.__esModule&&Object.prototype.hasOwnProperty.call(W,"default")?W.default:W}var ki=Ki;function Ki(W,D,J,ve){this.cx=3*W,this.bx=3*(J-W)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*D,this.by=3*(ve-D)-this.cy,this.ay=1-this.cy-this.by,this.p1x=W,this.p1y=D,this.p2x=J,this.p2y=ve}Ki.prototype={sampleCurveX:function(W){return((this.ax*W+this.bx)*W+this.cx)*W},sampleCurveY:function(W){return((this.ay*W+this.by)*W+this.cy)*W},sampleCurveDerivativeX:function(W){return(3*this.ax*W+2*this.bx)*W+this.cx},solveCurveX:function(W,D){if(D===void 0&&(D=1e-6),W<0)return 0;if(W>1)return 1;for(var J=W,ve=0;ve<8;ve++){var Ee=this.sampleCurveX(J)-W;if(Math.abs(Ee)Ee?Ge=J:ct=J,J=.5*(ct-Ge)+Ge;return J},solve:function(W,D){return this.sampleCurveY(this.solveCurveX(W,D))}};var yn=Ai(ki);function Ln(W,D,J){return W+J*(D-W)}function kn(W,D,J){return W.map((ve,Ee)=>Ln(ve,D[Ee],J))}let Bn={number:Ln,color:function(W,D,J,ve="rgb"){switch(ve){case"rgb":{let[Ee,Be,Ge,ct]=kn(W.rgb,D.rgb,J);return new Jt(Ee,Be,Ge,ct,!1)}case"hcl":{let[Ee,Be,Ge,ct]=W.hcl,[At,Bt,ar,Sr]=D.hcl,zr,Wr;if(isNaN(Ee)||isNaN(At))isNaN(Ee)?isNaN(At)?zr=NaN:(zr=At,Ge!==1&&Ge!==0||(Wr=Bt)):(zr=Ee,ar!==1&&ar!==0||(Wr=Be));else{let Wi=At-Ee;At>Ee&&Wi>180?Wi-=360:At180&&(Wi+=360),zr=Ee+J*Wi}let[ia,fa,ja,Ka]=function([Wi,gi,qi,en]){return Wi=isNaN(Wi)?0:Wi*ur,qa([qi,Math.cos(Wi)*gi,Math.sin(Wi)*gi,en])}([zr,Wr??Ln(Be,Bt,J),Ln(Ge,ar,J),Ln(ct,Sr,J)]);return new Jt(ia,fa,ja,Ka,!1)}case"lab":{let[Ee,Be,Ge,ct]=qa(kn(W.lab,D.lab,J));return new Jt(Ee,Be,Ge,ct,!1)}}},array:kn,padding:function(W,D,J){return new ca(kn(W.values,D.values,J))},variableAnchorOffsetCollection:function(W,D,J){let ve=W.values,Ee=D.values;if(ve.length!==Ee.length)throw new fn(`Cannot interpolate values of different length. from: ${W.toString()}, to: ${D.toString()}`);let Be=[];for(let Ge=0;Getypeof ar!="number"||ar<0||ar>1))return J.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);Ee={name:"cubic-bezier",controlPoints:Bt}}}if(D.length-1<4)return J.error(`Expected at least 4 arguments, but found only ${D.length-1}.`);if((D.length-1)%2!=0)return J.error("Expected an even number of arguments.");if(Be=J.parse(Be,2,Ke),!Be)return null;let ct=[],At=null;ve==="interpolate-hcl"||ve==="interpolate-lab"?At=Nt:J.expectedType&&J.expectedType.kind!=="value"&&(At=J.expectedType);for(let Bt=0;Bt=ar)return J.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',zr);let ia=J.parse(Sr,Wr,At);if(!ia)return null;At=At||ia.type,ct.push([ar,ia])}return st(At,Ke)||st(At,Nt)||st(At,Er)||st(At,_t)||st(At,Oe(Ke))?new ao(At,ve,Ee,Be,ct):J.error(`Type ${Je(At)} is not interpolatable.`)}evaluate(D){let J=this.labels,ve=this.outputs;if(J.length===1)return ve[0].evaluate(D);let Ee=this.input.evaluate(D);if(Ee<=J[0])return ve[0].evaluate(D);let Be=J.length;if(Ee>=J[Be-1])return ve[Be-1].evaluate(D);let Ge=la(J,Ee),ct=ao.interpolationFactor(this.interpolation,Ee,J[Ge],J[Ge+1]),At=ve[Ge].evaluate(D),Bt=ve[Ge+1].evaluate(D);switch(this.operator){case"interpolate":return Bn[this.type.kind](At,Bt,ct);case"interpolate-hcl":return Bn.color(At,Bt,ct,"hcl");case"interpolate-lab":return Bn.color(At,Bt,ct,"lab")}}eachChild(D){D(this.input);for(let J of this.outputs)D(J)}outputDefined(){return this.outputs.every(D=>D.outputDefined())}}function xo(W,D,J,ve){let Ee=ve-J,Be=W-J;return Ee===0?0:D===1?Be/Ee:(Math.pow(D,Be)-1)/(Math.pow(D,Ee)-1)}class Co{constructor(D,J){this.type=D,this.args=J}static parse(D,J){if(D.length<2)return J.error("Expectected at least one argument.");let ve=null,Ee=J.expectedType;Ee&&Ee.kind!=="value"&&(ve=Ee);let Be=[];for(let ct of D.slice(1)){let At=J.parse(ct,1+Be.length,ve,void 0,{typeAnnotation:"omit"});if(!At)return null;ve=ve||At.type,Be.push(At)}if(!ve)throw new Error("No output type");let Ge=Ee&&Be.some(ct=>Le(Ee,ct.type));return new Co(Ge?Mr:ve,Be)}evaluate(D){let J,ve=null,Ee=0;for(let Be of this.args)if(Ee++,ve=Be.evaluate(D),ve&&ve instanceof Za&&!ve.available&&(J||(J=ve.name),ve=null,Ee===this.args.length&&(ve=J)),ve!==null)break;return ve}eachChild(D){this.args.forEach(D)}outputDefined(){return this.args.every(D=>D.outputDefined())}}function Fs(W,D){return W==="=="||W==="!="?D.kind==="boolean"||D.kind==="string"||D.kind==="number"||D.kind==="null"||D.kind==="value":D.kind==="string"||D.kind==="number"||D.kind==="value"}function Mn(W,D,J,ve){return ve.compare(D,J)===0}function Ao(W,D,J){let ve=W!=="=="&&W!=="!=";return class t7{constructor(Be,Ge,ct){this.type=kt,this.lhs=Be,this.rhs=Ge,this.collator=ct,this.hasUntypedArgument=Be.type.kind==="value"||Ge.type.kind==="value"}static parse(Be,Ge){if(Be.length!==3&&Be.length!==4)return Ge.error("Expected two or three arguments.");let ct=Be[0],At=Ge.parse(Be[1],1,Mr);if(!At)return null;if(!Fs(ct,At.type))return Ge.concat(1).error(`"${ct}" comparisons are not supported for type '${Je(At.type)}'.`);let Bt=Ge.parse(Be[2],2,Mr);if(!Bt)return null;if(!Fs(ct,Bt.type))return Ge.concat(2).error(`"${ct}" comparisons are not supported for type '${Je(Bt.type)}'.`);if(At.type.kind!==Bt.type.kind&&At.type.kind!=="value"&&Bt.type.kind!=="value")return Ge.error(`Cannot compare types '${Je(At.type)}' and '${Je(Bt.type)}'.`);ve&&(At.type.kind==="value"&&Bt.type.kind!=="value"?At=new lt(Bt.type,[At]):At.type.kind!=="value"&&Bt.type.kind==="value"&&(Bt=new lt(At.type,[Bt])));let ar=null;if(Be.length===4){if(At.type.kind!=="string"&&Bt.type.kind!=="string"&&At.type.kind!=="value"&&Bt.type.kind!=="value")return Ge.error("Cannot use collator to compare non-string types.");if(ar=Ge.parse(Be[3],3,mr),!ar)return null}return new t7(At,Bt,ar)}evaluate(Be){let Ge=this.lhs.evaluate(Be),ct=this.rhs.evaluate(Be);if(ve&&this.hasUntypedArgument){let At=Ra(Ge),Bt=Ra(ct);if(At.kind!==Bt.kind||At.kind!=="string"&&At.kind!=="number")throw new fn(`Expected arguments for "${W}" to be (string, string) or (number, number), but found (${At.kind}, ${Bt.kind}) instead.`)}if(this.collator&&!ve&&this.hasUntypedArgument){let At=Ra(Ge),Bt=Ra(ct);if(At.kind!=="string"||Bt.kind!=="string")return D(Be,Ge,ct)}return this.collator?J(Be,Ge,ct,this.collator.evaluate(Be)):D(Be,Ge,ct)}eachChild(Be){Be(this.lhs),Be(this.rhs),this.collator&&Be(this.collator)}outputDefined(){return!0}}}let On=Ao("==",function(W,D,J){return D===J},Mn),ts=Ao("!=",function(W,D,J){return D!==J},function(W,D,J,ve){return!Mn(0,D,J,ve)}),is=Ao("<",function(W,D,J){return D",function(W,D,J){return D>J},function(W,D,J,ve){return ve.compare(D,J)>0}),Oo=Ao("<=",function(W,D,J){return D<=J},function(W,D,J,ve){return ve.compare(D,J)<=0}),io=Ao(">=",function(W,D,J){return D>=J},function(W,D,J,ve){return ve.compare(D,J)>=0});class Gn{constructor(D,J,ve){this.type=mr,this.locale=ve,this.caseSensitive=D,this.diacriticSensitive=J}static parse(D,J){if(D.length!==2)return J.error("Expected one argument.");let ve=D[1];if(typeof ve!="object"||Array.isArray(ve))return J.error("Collator options argument must be an object.");let Ee=J.parse(ve["case-sensitive"]!==void 0&&ve["case-sensitive"],1,kt);if(!Ee)return null;let Be=J.parse(ve["diacritic-sensitive"]!==void 0&&ve["diacritic-sensitive"],1,kt);if(!Be)return null;let Ge=null;return ve.locale&&(Ge=J.parse(ve.locale,1,Mt),!Ge)?null:new Gn(Ee,Be,Ge)}evaluate(D){return new Fr(this.caseSensitive.evaluate(D),this.diacriticSensitive.evaluate(D),this.locale?this.locale.evaluate(D):null)}eachChild(D){D(this.caseSensitive),D(this.diacriticSensitive),this.locale&&D(this.locale)}outputDefined(){return!1}}class eo{constructor(D,J,ve,Ee,Be){this.type=Mt,this.number=D,this.locale=J,this.currency=ve,this.minFractionDigits=Ee,this.maxFractionDigits=Be}static parse(D,J){if(D.length!==3)return J.error("Expected two arguments.");let ve=J.parse(D[1],1,Ke);if(!ve)return null;let Ee=D[2];if(typeof Ee!="object"||Array.isArray(Ee))return J.error("NumberFormat options argument must be an object.");let Be=null;if(Ee.locale&&(Be=J.parse(Ee.locale,1,Mt),!Be))return null;let Ge=null;if(Ee.currency&&(Ge=J.parse(Ee.currency,1,Mt),!Ge))return null;let ct=null;if(Ee["min-fraction-digits"]&&(ct=J.parse(Ee["min-fraction-digits"],1,Ke),!ct))return null;let At=null;return Ee["max-fraction-digits"]&&(At=J.parse(Ee["max-fraction-digits"],1,Ke),!At)?null:new eo(ve,Be,Ge,ct,At)}evaluate(D){return new Intl.NumberFormat(this.locale?this.locale.evaluate(D):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(D):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(D):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(D):void 0}).format(this.number.evaluate(D))}eachChild(D){D(this.number),this.locale&&D(this.locale),this.currency&&D(this.currency),this.minFractionDigits&&D(this.minFractionDigits),this.maxFractionDigits&&D(this.maxFractionDigits)}outputDefined(){return!1}}class ns{constructor(D){this.type=qr,this.sections=D}static parse(D,J){if(D.length<2)return J.error("Expected at least one argument.");let ve=D[1];if(!Array.isArray(ve)&&typeof ve=="object")return J.error("First argument must be an image or text section.");let Ee=[],Be=!1;for(let Ge=1;Ge<=D.length-1;++Ge){let ct=D[Ge];if(Be&&typeof ct=="object"&&!Array.isArray(ct)){Be=!1;let At=null;if(ct["font-scale"]&&(At=J.parse(ct["font-scale"],1,Ke),!At))return null;let Bt=null;if(ct["text-font"]&&(Bt=J.parse(ct["text-font"],1,Oe(Mt)),!Bt))return null;let ar=null;if(ct["text-color"]&&(ar=J.parse(ct["text-color"],1,Nt),!ar))return null;let Sr=Ee[Ee.length-1];Sr.scale=At,Sr.font=Bt,Sr.textColor=ar}else{let At=J.parse(D[Ge],1,Mr);if(!At)return null;let Bt=At.type.kind;if(Bt!=="string"&&Bt!=="value"&&Bt!=="null"&&Bt!=="resolvedImage")return J.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");Be=!0,Ee.push({content:At,scale:null,font:null,textColor:null})}}return new ns(Ee)}evaluate(D){return new ra(this.sections.map(J=>{let ve=J.content.evaluate(D);return Ra(ve)===Ir?new ta("",ve,null,null,null):new ta(an(ve),null,J.scale?J.scale.evaluate(D):null,J.font?J.font.evaluate(D).join(","):null,J.textColor?J.textColor.evaluate(D):null)}))}eachChild(D){for(let J of this.sections)D(J.content),J.scale&&D(J.scale),J.font&&D(J.font),J.textColor&&D(J.textColor)}outputDefined(){return!1}}class gs{constructor(D){this.type=Ir,this.input=D}static parse(D,J){if(D.length!==2)return J.error("Expected two arguments.");let ve=J.parse(D[1],1,Mt);return ve?new gs(ve):J.error("No image name provided.")}evaluate(D){let J=this.input.evaluate(D),ve=Za.fromString(J);return ve&&D.availableImages&&(ve.available=D.availableImages.indexOf(J)>-1),ve}eachChild(D){D(this.input)}outputDefined(){return!1}}class Ls{constructor(D){this.type=Ke,this.input=D}static parse(D,J){if(D.length!==2)return J.error(`Expected 1 argument, but found ${D.length-1} instead.`);let ve=J.parse(D[1],1);return ve?ve.type.kind!=="array"&&ve.type.kind!=="string"&&ve.type.kind!=="value"?J.error(`Expected argument of type string or array, but found ${Je(ve.type)} instead.`):new Ls(ve):null}evaluate(D){let J=this.input.evaluate(D);if(typeof J=="string")return[...J].length;if(Array.isArray(J))return J.length;throw new fn(`Expected value to be of type string or array, but found ${Je(Ra(J))} instead.`)}eachChild(D){D(this.input)}outputDefined(){return!1}}let Xo=8192;function Gi(W,D){let J=(180+W[0])/360,ve=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+W[1]*Math.PI/360)))/360,Ee=Math.pow(2,D.z);return[Math.round(J*Ee*Xo),Math.round(ve*Ee*Xo)]}function Pn(W,D){let J=Math.pow(2,D.z);return[(Ee=(W[0]/Xo+D.x)/J,360*Ee-180),(ve=(W[1]/Xo+D.y)/J,360/Math.PI*Math.atan(Math.exp((180-360*ve)*Math.PI/180))-90)];var ve,Ee}function js(W,D){W[0]=Math.min(W[0],D[0]),W[1]=Math.min(W[1],D[1]),W[2]=Math.max(W[2],D[0]),W[3]=Math.max(W[3],D[1])}function xs(W,D){return!(W[0]<=D[0]||W[2]>=D[2]||W[1]<=D[1]||W[3]>=D[3])}function Hn(W,D,J){let ve=W[0]-D[0],Ee=W[1]-D[1],Be=W[0]-J[0],Ge=W[1]-J[1];return ve*Ge-Be*Ee==0&&ve*Be<=0&&Ee*Ge<=0}function Os(W,D,J,ve){return(Ee=[ve[0]-J[0],ve[1]-J[1]])[0]*(Be=[D[0]-W[0],D[1]-W[1]])[1]-Ee[1]*Be[0]!=0&&!(!bo(W,D,J,ve)||!bo(J,ve,W,D));var Ee,Be}function ds(W,D,J){for(let ve of J)for(let Ee=0;Ee(Ee=W)[1]!=(Ge=ct[At+1])[1]>Ee[1]&&Ee[0]<(Ge[0]-Be[0])*(Ee[1]-Be[1])/(Ge[1]-Be[1])+Be[0]&&(ve=!ve)}var Ee,Be,Ge;return ve}function il(W,D){for(let J of D)if(Xs(W,J))return!0;return!1}function _n(W,D){for(let J of W)if(!Xs(J,D))return!1;for(let J=0;J0&&ct<0||Ge<0&&ct>0}function Rs(W,D,J){let ve=[];for(let Ee=0;EeJ[2]){let Ee=.5*ve,Be=W[0]-J[0]>Ee?-ve:J[0]-W[0]>Ee?ve:0;Be===0&&(Be=W[0]-J[2]>Ee?-ve:J[2]-W[0]>Ee?ve:0),W[0]+=Be}js(D,W)}function Gs(W,D,J,ve){let Ee=Math.pow(2,ve.z)*Xo,Be=[ve.x*Xo,ve.y*Xo],Ge=[];for(let ct of W)for(let At of ct){let Bt=[At.x+Be[0],At.y+Be[1]];uo(Bt,D,J,Ee),Ge.push(Bt)}return Ge}function vl(W,D,J,ve){let Ee=Math.pow(2,ve.z)*Xo,Be=[ve.x*Xo,ve.y*Xo],Ge=[];for(let At of W){let Bt=[];for(let ar of At){let Sr=[ar.x+Be[0],ar.y+Be[1]];js(D,Sr),Bt.push(Sr)}Ge.push(Bt)}if(D[2]-D[0]<=Ee/2){(ct=D)[0]=ct[1]=1/0,ct[2]=ct[3]=-1/0;for(let At of Ge)for(let Bt of At)uo(Bt,D,J,Ee)}var ct;return Ge}class As{constructor(D,J){this.type=kt,this.geojson=D,this.geometries=J}static parse(D,J){if(D.length!==2)return J.error(`'within' expression requires exactly one argument, but found ${D.length-1} instead.`);if(pi(D[1])){let ve=D[1];if(ve.type==="FeatureCollection"){let Ee=[];for(let Be of ve.features){let{type:Ge,coordinates:ct}=Be.geometry;Ge==="Polygon"&&Ee.push(ct),Ge==="MultiPolygon"&&Ee.push(...ct)}if(Ee.length)return new As(ve,{type:"MultiPolygon",coordinates:Ee})}else if(ve.type==="Feature"){let Ee=ve.geometry.type;if(Ee==="Polygon"||Ee==="MultiPolygon")return new As(ve,ve.geometry)}else if(ve.type==="Polygon"||ve.type==="MultiPolygon")return new As(ve,ve)}return J.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(D){if(D.geometry()!=null&&D.canonicalID()!=null){if(D.geometryType()==="Point")return function(J,ve){let Ee=[1/0,1/0,-1/0,-1/0],Be=[1/0,1/0,-1/0,-1/0],Ge=J.canonicalID();if(ve.type==="Polygon"){let ct=Rs(ve.coordinates,Be,Ge),At=Gs(J.geometry(),Ee,Be,Ge);if(!xs(Ee,Be))return!1;for(let Bt of At)if(!Xs(Bt,ct))return!1}if(ve.type==="MultiPolygon"){let ct=pu(ve.coordinates,Be,Ge),At=Gs(J.geometry(),Ee,Be,Ge);if(!xs(Ee,Be))return!1;for(let Bt of At)if(!il(Bt,ct))return!1}return!0}(D,this.geometries);if(D.geometryType()==="LineString")return function(J,ve){let Ee=[1/0,1/0,-1/0,-1/0],Be=[1/0,1/0,-1/0,-1/0],Ge=J.canonicalID();if(ve.type==="Polygon"){let ct=Rs(ve.coordinates,Be,Ge),At=vl(J.geometry(),Ee,Be,Ge);if(!xs(Ee,Be))return!1;for(let Bt of At)if(!_n(Bt,ct))return!1}if(ve.type==="MultiPolygon"){let ct=pu(ve.coordinates,Be,Ge),At=vl(J.geometry(),Ee,Be,Ge);if(!xs(Ee,Be))return!1;for(let Bt of At)if(!Lo(Bt,ct))return!1}return!0}(D,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let qs=class{constructor(W=[],D=(J,ve)=>Jve?1:0){if(this.data=W,this.length=this.data.length,this.compare=D,this.length>0)for(let J=(this.length>>1)-1;J>=0;J--)this._down(J)}push(W){this.data.push(W),this._up(this.length++)}pop(){if(this.length===0)return;let W=this.data[0],D=this.data.pop();return--this.length>0&&(this.data[0]=D,this._down(0)),W}peek(){return this.data[0]}_up(W){let{data:D,compare:J}=this,ve=D[W];for(;W>0;){let Ee=W-1>>1,Be=D[Ee];if(J(ve,Be)>=0)break;D[W]=Be,W=Ee}D[W]=ve}_down(W){let{data:D,compare:J}=this,ve=this.length>>1,Ee=D[W];for(;W=0)break;D[W]=D[Be],W=Be}D[W]=Ee}};function us(W,D,J,ve,Ee){Ss(W,D,J,ve||W.length-1,Ee||su)}function Ss(W,D,J,ve,Ee){for(;ve>J;){if(ve-J>600){var Be=ve-J+1,Ge=D-J+1,ct=Math.log(Be),At=.5*Math.exp(2*ct/3),Bt=.5*Math.sqrt(ct*At*(Be-At)/Be)*(Ge-Be/2<0?-1:1);Ss(W,D,Math.max(J,Math.floor(D-Ge*At/Be+Bt)),Math.min(ve,Math.floor(D+(Be-Ge)*At/Be+Bt)),Ee)}var ar=W[D],Sr=J,zr=ve;for(Nl(W,J,D),Ee(W[ve],ar)>0&&Nl(W,J,ve);Sr0;)zr--}Ee(W[J],ar)===0?Nl(W,J,zr):Nl(W,++zr,ve),zr<=D&&(J=zr+1),D<=zr&&(ve=zr-1)}}function Nl(W,D,J){var ve=W[D];W[D]=W[J],W[J]=ve}function su(W,D){return WD?1:0}function Tc(W,D){if(W.length<=1)return[W];let J=[],ve,Ee;for(let Be of W){let Ge=Sf(Be);Ge!==0&&(Be.area=Math.abs(Ge),Ee===void 0&&(Ee=Ge<0),Ee===Ge<0?(ve&&J.push(ve),ve=[Be]):ve.push(Be))}if(ve&&J.push(ve),D>1)for(let Be=0;Be1?(Bt=D[At+1][0],ar=D[At+1][1]):Wr>0&&(Bt+=Sr/this.kx*Wr,ar+=zr/this.ky*Wr)),Sr=this.wrap(J[0]-Bt)*this.kx,zr=(J[1]-ar)*this.ky;let ia=Sr*Sr+zr*zr;ia180;)D-=360;return D}}function lu(W,D){return D[0]-W[0]}function Pl(W){return W[1]-W[0]+1}function ic(W,D){return W[1]>=W[0]&&W[1]W[1])return[null,null];let J=Pl(W);if(D){if(J===2)return[W,null];let Ee=Math.floor(J/2);return[[W[0],W[0]+Ee],[W[0]+Ee,W[1]]]}if(J===1)return[W,null];let ve=Math.floor(J/2)-1;return[[W[0],W[0]+ve],[W[0]+ve+1,W[1]]]}function nl(W,D){if(!ic(D,W.length))return[1/0,1/0,-1/0,-1/0];let J=[1/0,1/0,-1/0,-1/0];for(let ve=D[0];ve<=D[1];++ve)js(J,W[ve]);return J}function ml(W){let D=[1/0,1/0,-1/0,-1/0];for(let J of W)for(let ve of J)js(D,ve);return D}function bs(W){return W[0]!==-1/0&&W[1]!==-1/0&&W[2]!==1/0&&W[3]!==1/0}function Zs(W,D,J){if(!bs(W)||!bs(D))return NaN;let ve=0,Ee=0;return W[2]D[2]&&(ve=W[0]-D[2]),W[1]>D[3]&&(Ee=W[1]-D[3]),W[3]=ve)return ve;if(xs(Ee,Be)){if(bh(W,D))return 0}else if(bh(D,W))return 0;let Ge=1/0;for(let ct of W)for(let At=0,Bt=ct.length,ar=Bt-1;At0;){let At=Ge.pop();if(At[0]>=Be)continue;let Bt=At[1],ar=D?50:100;if(Pl(Bt)<=ar){if(!ic(Bt,W.length))return NaN;if(D){let Sr=ss(W,Bt,J,ve);if(isNaN(Sr)||Sr===0)return Sr;Be=Math.min(Be,Sr)}else for(let Sr=Bt[0];Sr<=Bt[1];++Sr){let zr=xh(W[Sr],J,ve);if(Be=Math.min(Be,zr),Be===0)return 0}}else{let Sr=Ou(Bt,D);to(Ge,Be,ve,W,ct,Sr[0]),to(Ge,Be,ve,W,ct,Sr[1])}}return Be}function jl(W,D,J,ve,Ee,Be=1/0){let Ge=Math.min(Be,Ee.distance(W[0],J[0]));if(Ge===0)return Ge;let ct=new qs([[0,[0,W.length-1],[0,J.length-1]]],lu);for(;ct.length>0;){let At=ct.pop();if(At[0]>=Ge)continue;let Bt=At[1],ar=At[2],Sr=D?50:100,zr=ve?50:100;if(Pl(Bt)<=Sr&&Pl(ar)<=zr){if(!ic(Bt,W.length)&&ic(ar,J.length))return NaN;let Wr;if(D&&ve)Wr=qu(W,Bt,J,ar,Ee),Ge=Math.min(Ge,Wr);else if(D&&!ve){let ia=W.slice(Bt[0],Bt[1]+1);for(let fa=ar[0];fa<=ar[1];++fa)if(Wr=nc(J[fa],ia,Ee),Ge=Math.min(Ge,Wr),Ge===0)return Ge}else if(!D&&ve){let ia=J.slice(ar[0],ar[1]+1);for(let fa=Bt[0];fa<=Bt[1];++fa)if(Wr=nc(W[fa],ia,Ee),Ge=Math.min(Ge,Wr),Ge===0)return Ge}else Wr=fl(W,Bt,J,ar,Ee),Ge=Math.min(Ge,Wr)}else{let Wr=Ou(Bt,D),ia=Ou(ar,ve);Wc(ct,Ge,Ee,W,J,Wr[0],ia[0]),Wc(ct,Ge,Ee,W,J,Wr[0],ia[1]),Wc(ct,Ge,Ee,W,J,Wr[1],ia[0]),Wc(ct,Ge,Ee,W,J,Wr[1],ia[1])}}return Ge}function Mf(W){return W.type==="MultiPolygon"?W.coordinates.map(D=>({type:"Polygon",coordinates:D})):W.type==="MultiLineString"?W.coordinates.map(D=>({type:"LineString",coordinates:D})):W.type==="MultiPoint"?W.coordinates.map(D=>({type:"Point",coordinates:D})):[W]}class Ac{constructor(D,J){this.type=Ke,this.geojson=D,this.geometries=J}static parse(D,J){if(D.length!==2)return J.error(`'distance' expression requires exactly one argument, but found ${D.length-1} instead.`);if(pi(D[1])){let ve=D[1];if(ve.type==="FeatureCollection")return new Ac(ve,ve.features.map(Ee=>Mf(Ee.geometry)).flat());if(ve.type==="Feature")return new Ac(ve,Mf(ve.geometry));if("type"in ve&&"coordinates"in ve)return new Ac(ve,Mf(ve))}return J.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(D){if(D.geometry()!=null&&D.canonicalID()!=null){if(D.geometryType()==="Point")return function(J,ve){let Ee=J.geometry(),Be=Ee.flat().map(At=>Pn([At.x,At.y],J.canonical));if(Ee.length===0)return NaN;let Ge=new Hc(Be[0][1]),ct=1/0;for(let At of ve){switch(At.type){case"Point":ct=Math.min(ct,jl(Be,!1,[At.coordinates],!1,Ge,ct));break;case"LineString":ct=Math.min(ct,jl(Be,!1,At.coordinates,!0,Ge,ct));break;case"Polygon":ct=Math.min(ct,Vu(Be,!1,At.coordinates,Ge,ct))}if(ct===0)return ct}return ct}(D,this.geometries);if(D.geometryType()==="LineString")return function(J,ve){let Ee=J.geometry(),Be=Ee.flat().map(At=>Pn([At.x,At.y],J.canonical));if(Ee.length===0)return NaN;let Ge=new Hc(Be[0][1]),ct=1/0;for(let At of ve){switch(At.type){case"Point":ct=Math.min(ct,jl(Be,!0,[At.coordinates],!1,Ge,ct));break;case"LineString":ct=Math.min(ct,jl(Be,!0,At.coordinates,!0,Ge,ct));break;case"Polygon":ct=Math.min(ct,Vu(Be,!0,At.coordinates,Ge,ct))}if(ct===0)return ct}return ct}(D,this.geometries);if(D.geometryType()==="Polygon")return function(J,ve){let Ee=J.geometry();if(Ee.length===0||Ee[0].length===0)return NaN;let Be=Tc(Ee,0).map(At=>At.map(Bt=>Bt.map(ar=>Pn([ar.x,ar.y],J.canonical)))),Ge=new Hc(Be[0][0][0][1]),ct=1/0;for(let At of ve)for(let Bt of Be){switch(At.type){case"Point":ct=Math.min(ct,Vu([At.coordinates],!1,Bt,Ge,ct));break;case"LineString":ct=Math.min(ct,Vu(At.coordinates,!0,Bt,Ge,ct));break;case"Polygon":ct=Math.min(ct,ks(Bt,At.coordinates,Ge,ct))}if(ct===0)return ct}return ct}(D,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}let nf={"==":On,"!=":ts,">":_s,"<":is,">=":io,"<=":Oo,array:lt,at:Xt,boolean:lt,case:Pa,coalesce:Co,collator:Gn,format:ns,image:gs,in:vr,"index-of":Or,interpolate:ao,"interpolate-hcl":ao,"interpolate-lab":ao,length:Ls,let:Hr,literal:tn,match:ba,number:lt,"number-format":eo,object:lt,slice:ma,step:_a,string:lt,"to-boolean":Cr,"to-color":Cr,"to-number":Cr,"to-string":Cr,var:gt,within:As,distance:Ac};class $l{constructor(D,J,ve,Ee){this.name=D,this.type=J,this._evaluate=ve,this.args=Ee}evaluate(D){return this._evaluate(D,this.args)}eachChild(D){this.args.forEach(D)}outputDefined(){return!1}static parse(D,J){let ve=D[0],Ee=$l.definitions[ve];if(!Ee)return J.error(`Unknown expression "${ve}". If you wanted a literal array, use ["literal", [...]].`,0);let Be=Array.isArray(Ee)?Ee[0]:Ee.type,Ge=Array.isArray(Ee)?[[Ee[1],Ee[2]]]:Ee.overloads,ct=Ge.filter(([Bt])=>!Array.isArray(Bt)||Bt.length===D.length-1),At=null;for(let[Bt,ar]of ct){At=new Ur(J.registry,Bf,J.path,null,J.scope);let Sr=[],zr=!1;for(let Wr=1;Wr{return zr=Sr,Array.isArray(zr)?`(${zr.map(Je).join(", ")})`:`(${Je(zr.type)}...)`;var zr}).join(" | "),ar=[];for(let Sr=1;Sr{J=D?J&&Bf(ve):J&&ve instanceof tn}),!!J&&Nf(W)&&Ef(W,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}function Nf(W){if(W instanceof $l&&(W.name==="get"&&W.args.length===1||W.name==="feature-state"||W.name==="has"&&W.args.length===1||W.name==="properties"||W.name==="geometry-type"||W.name==="id"||/^filter-/.test(W.name))||W instanceof As||W instanceof Ac)return!1;let D=!0;return W.eachChild(J=>{D&&!Nf(J)&&(D=!1)}),D}function Gu(W){if(W instanceof $l&&W.name==="feature-state")return!1;let D=!0;return W.eachChild(J=>{D&&!Gu(J)&&(D=!1)}),D}function Ef(W,D){if(W instanceof $l&&D.indexOf(W.name)>=0)return!1;let J=!0;return W.eachChild(ve=>{J&&!Ef(ve,D)&&(J=!1)}),J}function oc(W){return{result:"success",value:W}}function Xc(W){return{result:"error",value:W}}function Ql(W){return W["property-type"]==="data-driven"||W["property-type"]==="cross-faded-data-driven"}function qc(W){return!!W.expression&&W.expression.parameters.indexOf("zoom")>-1}function Sc(W){return!!W.expression&&W.expression.interpolated}function Ys(W){return W instanceof Number?"number":W instanceof String?"string":W instanceof Boolean?"boolean":Array.isArray(W)?"array":W===null?"null":typeof W}function kf(W){return typeof W=="object"&&W!==null&&!Array.isArray(W)}function fh(W){return W}function Uf(W,D){let J=D.type==="color",ve=W.stops&&typeof W.stops[0][0]=="object",Ee=ve||!(ve||W.property!==void 0),Be=W.type||(Sc(D)?"exponential":"interval");if(J||D.type==="padding"){let ar=J?Jt.parse:ca.parse;(W=ne({},W)).stops&&(W.stops=W.stops.map(Sr=>[Sr[0],ar(Sr[1])])),W.default=ar(W.default?W.default:D.default)}if(W.colorSpace&&(Ge=W.colorSpace)!=="rgb"&&Ge!=="hcl"&&Ge!=="lab")throw new Error(`Unknown color space: "${W.colorSpace}"`);var Ge;let ct,At,Bt;if(Be==="exponential")ct=jf;else if(Be==="interval")ct=Cu;else if(Be==="categorical"){ct=$f,At=Object.create(null);for(let ar of W.stops)At[ar[0]]=ar[1];Bt=typeof W.stops[0][0]}else{if(Be!=="identity")throw new Error(`Unknown function type "${Be}"`);ct=yl}if(ve){let ar={},Sr=[];for(let ia=0;iaia[0]),evaluate:({zoom:ia},fa)=>jf({stops:zr,base:W.base},D,ia).evaluate(ia,fa)}}if(Ee){let ar=Be==="exponential"?{name:"exponential",base:W.base!==void 0?W.base:1}:null;return{kind:"camera",interpolationType:ar,interpolationFactor:ao.interpolationFactor.bind(void 0,ar),zoomStops:W.stops.map(Sr=>Sr[0]),evaluate:({zoom:Sr})=>ct(W,D,Sr,At,Bt)}}return{kind:"source",evaluate(ar,Sr){let zr=Sr&&Sr.properties?Sr.properties[W.property]:void 0;return zr===void 0?Zc(W.default,D.default):ct(W,D,zr,At,Bt)}}}function Zc(W,D,J){return W!==void 0?W:D!==void 0?D:J!==void 0?J:void 0}function $f(W,D,J,ve,Ee){return Zc(typeof J===Ee?ve[J]:void 0,W.default,D.default)}function Cu(W,D,J){if(Ys(J)!=="number")return Zc(W.default,D.default);let ve=W.stops.length;if(ve===1||J<=W.stops[0][0])return W.stops[0][1];if(J>=W.stops[ve-1][0])return W.stops[ve-1][1];let Ee=la(W.stops.map(Be=>Be[0]),J);return W.stops[Ee][1]}function jf(W,D,J){let ve=W.base!==void 0?W.base:1;if(Ys(J)!=="number")return Zc(W.default,D.default);let Ee=W.stops.length;if(Ee===1||J<=W.stops[0][0])return W.stops[0][1];if(J>=W.stops[Ee-1][0])return W.stops[Ee-1][1];let Be=la(W.stops.map(ar=>ar[0]),J),Ge=function(ar,Sr,zr,Wr){let ia=Wr-zr,fa=ar-zr;return ia===0?0:Sr===1?fa/ia:(Math.pow(Sr,fa)-1)/(Math.pow(Sr,ia)-1)}(J,ve,W.stops[Be][0],W.stops[Be+1][0]),ct=W.stops[Be][1],At=W.stops[Be+1][1],Bt=Bn[D.type]||fh;return typeof ct.evaluate=="function"?{evaluate(...ar){let Sr=ct.evaluate.apply(void 0,ar),zr=At.evaluate.apply(void 0,ar);if(Sr!==void 0&&zr!==void 0)return Bt(Sr,zr,Ge,W.colorSpace)}}:Bt(ct,At,Ge,W.colorSpace)}function yl(W,D,J){switch(D.type){case"color":J=Jt.parse(J);break;case"formatted":J=ra.fromString(J.toString());break;case"resolvedImage":J=Za.fromString(J.toString());break;case"padding":J=ca.parse(J);break;default:Ys(J)===D.type||D.type==="enum"&&D.values[J]||(J=void 0)}return Zc(J,W.default,D.default)}$l.register(nf,{error:[{kind:"error"},[Mt],(W,[D])=>{throw new fn(D.evaluate(W))}],typeof:[Mt,[Mr],(W,[D])=>Je(Ra(D.evaluate(W)))],"to-rgba":[Oe(Ke,4),[Nt],(W,[D])=>{let[J,ve,Ee,Be]=D.evaluate(W).rgb;return[255*J,255*ve,255*Ee,Be]}],rgb:[Nt,[Ke,Ke,Ke],Jf],rgba:[Nt,[Ke,Ke,Ke,Ke],Jf],has:{type:kt,overloads:[[[Mt],(W,[D])=>Of(D.evaluate(W),W.properties())],[[Mt,Gt],(W,[D,J])=>Of(D.evaluate(W),J.evaluate(W))]]},get:{type:Mr,overloads:[[[Mt],(W,[D])=>of(D.evaluate(W),W.properties())],[[Mt,Gt],(W,[D,J])=>of(D.evaluate(W),J.evaluate(W))]]},"feature-state":[Mr,[Mt],(W,[D])=>of(D.evaluate(W),W.featureState||{})],properties:[Gt,[],W=>W.properties()],"geometry-type":[Mt,[],W=>W.geometryType()],id:[Mr,[],W=>W.id()],zoom:[Ke,[],W=>W.globals.zoom],"heatmap-density":[Ke,[],W=>W.globals.heatmapDensity||0],"line-progress":[Ke,[],W=>W.globals.lineProgress||0],accumulated:[Mr,[],W=>W.globals.accumulated===void 0?null:W.globals.accumulated],"+":[Ke,jc(Ke),(W,D)=>{let J=0;for(let ve of D)J+=ve.evaluate(W);return J}],"*":[Ke,jc(Ke),(W,D)=>{let J=1;for(let ve of D)J*=ve.evaluate(W);return J}],"-":{type:Ke,overloads:[[[Ke,Ke],(W,[D,J])=>D.evaluate(W)-J.evaluate(W)],[[Ke],(W,[D])=>-D.evaluate(W)]]},"/":[Ke,[Ke,Ke],(W,[D,J])=>D.evaluate(W)/J.evaluate(W)],"%":[Ke,[Ke,Ke],(W,[D,J])=>D.evaluate(W)%J.evaluate(W)],ln2:[Ke,[],()=>Math.LN2],pi:[Ke,[],()=>Math.PI],e:[Ke,[],()=>Math.E],"^":[Ke,[Ke,Ke],(W,[D,J])=>Math.pow(D.evaluate(W),J.evaluate(W))],sqrt:[Ke,[Ke],(W,[D])=>Math.sqrt(D.evaluate(W))],log10:[Ke,[Ke],(W,[D])=>Math.log(D.evaluate(W))/Math.LN10],ln:[Ke,[Ke],(W,[D])=>Math.log(D.evaluate(W))],log2:[Ke,[Ke],(W,[D])=>Math.log(D.evaluate(W))/Math.LN2],sin:[Ke,[Ke],(W,[D])=>Math.sin(D.evaluate(W))],cos:[Ke,[Ke],(W,[D])=>Math.cos(D.evaluate(W))],tan:[Ke,[Ke],(W,[D])=>Math.tan(D.evaluate(W))],asin:[Ke,[Ke],(W,[D])=>Math.asin(D.evaluate(W))],acos:[Ke,[Ke],(W,[D])=>Math.acos(D.evaluate(W))],atan:[Ke,[Ke],(W,[D])=>Math.atan(D.evaluate(W))],min:[Ke,jc(Ke),(W,D)=>Math.min(...D.map(J=>J.evaluate(W)))],max:[Ke,jc(Ke),(W,D)=>Math.max(...D.map(J=>J.evaluate(W)))],abs:[Ke,[Ke],(W,[D])=>Math.abs(D.evaluate(W))],round:[Ke,[Ke],(W,[D])=>{let J=D.evaluate(W);return J<0?-Math.round(-J):Math.round(J)}],floor:[Ke,[Ke],(W,[D])=>Math.floor(D.evaluate(W))],ceil:[Ke,[Ke],(W,[D])=>Math.ceil(D.evaluate(W))],"filter-==":[kt,[Mt,Mr],(W,[D,J])=>W.properties()[D.value]===J.value],"filter-id-==":[kt,[Mr],(W,[D])=>W.id()===D.value],"filter-type-==":[kt,[Mt],(W,[D])=>W.geometryType()===D.value],"filter-<":[kt,[Mt,Mr],(W,[D,J])=>{let ve=W.properties()[D.value],Ee=J.value;return typeof ve==typeof Ee&&ve{let J=W.id(),ve=D.value;return typeof J==typeof ve&&J":[kt,[Mt,Mr],(W,[D,J])=>{let ve=W.properties()[D.value],Ee=J.value;return typeof ve==typeof Ee&&ve>Ee}],"filter-id->":[kt,[Mr],(W,[D])=>{let J=W.id(),ve=D.value;return typeof J==typeof ve&&J>ve}],"filter-<=":[kt,[Mt,Mr],(W,[D,J])=>{let ve=W.properties()[D.value],Ee=J.value;return typeof ve==typeof Ee&&ve<=Ee}],"filter-id-<=":[kt,[Mr],(W,[D])=>{let J=W.id(),ve=D.value;return typeof J==typeof ve&&J<=ve}],"filter->=":[kt,[Mt,Mr],(W,[D,J])=>{let ve=W.properties()[D.value],Ee=J.value;return typeof ve==typeof Ee&&ve>=Ee}],"filter-id->=":[kt,[Mr],(W,[D])=>{let J=W.id(),ve=D.value;return typeof J==typeof ve&&J>=ve}],"filter-has":[kt,[Mr],(W,[D])=>D.value in W.properties()],"filter-has-id":[kt,[],W=>W.id()!==null&&W.id()!==void 0],"filter-type-in":[kt,[Oe(Mt)],(W,[D])=>D.value.indexOf(W.geometryType())>=0],"filter-id-in":[kt,[Oe(Mr)],(W,[D])=>D.value.indexOf(W.id())>=0],"filter-in-small":[kt,[Mt,Oe(Mr)],(W,[D,J])=>J.value.indexOf(W.properties()[D.value])>=0],"filter-in-large":[kt,[Mt,Oe(Mr)],(W,[D,J])=>function(ve,Ee,Be,Ge){for(;Be<=Ge;){let ct=Be+Ge>>1;if(Ee[ct]===ve)return!0;Ee[ct]>ve?Ge=ct-1:Be=ct+1}return!1}(W.properties()[D.value],J.value,0,J.value.length-1)],all:{type:kt,overloads:[[[kt,kt],(W,[D,J])=>D.evaluate(W)&&J.evaluate(W)],[jc(kt),(W,D)=>{for(let J of D)if(!J.evaluate(W))return!1;return!0}]]},any:{type:kt,overloads:[[[kt,kt],(W,[D,J])=>D.evaluate(W)||J.evaluate(W)],[jc(kt),(W,D)=>{for(let J of D)if(J.evaluate(W))return!0;return!1}]]},"!":[kt,[kt],(W,[D])=>!D.evaluate(W)],"is-supported-script":[kt,[Mt],(W,[D])=>{let J=W.globals&&W.globals.isSupportedScript;return!J||J(D.evaluate(W))}],upcase:[Mt,[Mt],(W,[D])=>D.evaluate(W).toUpperCase()],downcase:[Mt,[Mt],(W,[D])=>D.evaluate(W).toLowerCase()],concat:[Mt,jc(Mr),(W,D)=>D.map(J=>an(J.evaluate(W))).join("")],"resolved-locale":[Mt,[mr],(W,[D])=>D.evaluate(W).resolvedLocale()]});class Lu{constructor(D,J){var ve;this.expression=D,this._warningHistory={},this._evaluator=new Rr,this._defaultValue=J?(ve=J).type==="color"&&kf(ve.default)?new Jt(0,0,0,0):ve.type==="color"?Jt.parse(ve.default)||null:ve.type==="padding"?ca.parse(ve.default)||null:ve.type==="variableAnchorOffsetCollection"?$a.parse(ve.default)||null:ve.default===void 0?null:ve.default:null,this._enumValues=J&&J.type==="enum"?J.values:null}evaluateWithoutErrorHandling(D,J,ve,Ee,Be,Ge){return this._evaluator.globals=D,this._evaluator.feature=J,this._evaluator.featureState=ve,this._evaluator.canonical=Ee,this._evaluator.availableImages=Be||null,this._evaluator.formattedSection=Ge,this.expression.evaluate(this._evaluator)}evaluate(D,J,ve,Ee,Be,Ge){this._evaluator.globals=D,this._evaluator.feature=J||null,this._evaluator.featureState=ve||null,this._evaluator.canonical=Ee,this._evaluator.availableImages=Be||null,this._evaluator.formattedSection=Ge||null;try{let ct=this.expression.evaluate(this._evaluator);if(ct==null||typeof ct=="number"&&ct!=ct)return this._defaultValue;if(this._enumValues&&!(ct in this._enumValues))throw new fn(`Expected value to be one of ${Object.keys(this._enumValues).map(At=>JSON.stringify(At)).join(", ")}, but found ${JSON.stringify(ct)} instead.`);return ct}catch(ct){return this._warningHistory[ct.message]||(this._warningHistory[ct.message]=!0,typeof console<"u"&&console.warn(ct.message)),this._defaultValue}}}function Mc(W){return Array.isArray(W)&&W.length>0&&typeof W[0]=="string"&&W[0]in nf}function ol(W,D){let J=new Ur(nf,Bf,[],D?function(Ee){let Be={color:Nt,string:Mt,number:Ke,enum:Mt,boolean:kt,formatted:qr,padding:Er,resolvedImage:Ir,variableAnchorOffsetCollection:_t};return Ee.type==="array"?Oe(Be[Ee.value]||Mr,Ee.length):Be[Ee.type]}(D):void 0),ve=J.parse(W,void 0,void 0,void 0,D&&D.type==="string"?{typeAnnotation:"coerce"}:void 0);return ve?oc(new Lu(ve,D)):Xc(J.errors)}class vc{constructor(D,J){this.kind=D,this._styleExpression=J,this.isStateDependent=D!=="constant"&&!Gu(J.expression)}evaluateWithoutErrorHandling(D,J,ve,Ee,Be,Ge){return this._styleExpression.evaluateWithoutErrorHandling(D,J,ve,Ee,Be,Ge)}evaluate(D,J,ve,Ee,Be,Ge){return this._styleExpression.evaluate(D,J,ve,Ee,Be,Ge)}}class yu{constructor(D,J,ve,Ee){this.kind=D,this.zoomStops=ve,this._styleExpression=J,this.isStateDependent=D!=="camera"&&!Gu(J.expression),this.interpolationType=Ee}evaluateWithoutErrorHandling(D,J,ve,Ee,Be,Ge){return this._styleExpression.evaluateWithoutErrorHandling(D,J,ve,Ee,Be,Ge)}evaluate(D,J,ve,Ee,Be,Ge){return this._styleExpression.evaluate(D,J,ve,Ee,Be,Ge)}interpolationFactor(D,J,ve){return this.interpolationType?ao.interpolationFactor(this.interpolationType,D,J,ve):0}}function Tu(W,D){let J=ol(W,D);if(J.result==="error")return J;let ve=J.value.expression,Ee=Nf(ve);if(!Ee&&!Ql(D))return Xc([new Ce("","data expressions not supported")]);let Be=Ef(ve,["zoom"]);if(!Be&&!qc(D))return Xc([new Ce("","zoom expressions not supported")]);let Ge=qf(ve);return Ge||Be?Ge instanceof Ce?Xc([Ge]):Ge instanceof ao&&!Sc(D)?Xc([new Ce("",'"interpolate" expressions cannot be used with this property')]):oc(Ge?new yu(Ee?"camera":"composite",J.value,Ge.labels,Ge instanceof ao?Ge.interpolation:void 0):new vc(Ee?"constant":"source",J.value)):Xc([new Ce("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class El{constructor(D,J){this._parameters=D,this._specification=J,ne(this,Uf(this._parameters,this._specification))}static deserialize(D){return new El(D._parameters,D._specification)}static serialize(D){return{_parameters:D._parameters,_specification:D._specification}}}function qf(W){let D=null;if(W instanceof Hr)D=qf(W.result);else if(W instanceof Co){for(let J of W.args)if(D=qf(J),D)break}else(W instanceof _a||W instanceof ao)&&W.input instanceof $l&&W.input.name==="zoom"&&(D=W);return D instanceof Ce||W.eachChild(J=>{let ve=qf(J);ve instanceof Ce?D=ve:!D&&ve?D=new Ce("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):D&&ve&&D!==ve&&(D=new Ce("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),D}function Qf(W){if(W===!0||W===!1)return!0;if(!Array.isArray(W)||W.length===0)return!1;switch(W[0]){case"has":return W.length>=2&&W[1]!=="$id"&&W[1]!=="$type";case"in":return W.length>=3&&(typeof W[1]!="string"||Array.isArray(W[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return W.length!==3||Array.isArray(W[1])||Array.isArray(W[2]);case"any":case"all":for(let D of W.slice(1))if(!Qf(D)&&typeof D!="boolean")return!1;return!0;default:return!0}}let Bu={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Ec(W){if(W==null)return{filter:()=>!0,needGeometry:!1};Qf(W)||(W=sf(W));let D=ol(W,Bu);if(D.result==="error")throw new Error(D.value.map(J=>`${J.key}: ${J.message}`).join(", "));return{filter:(J,ve,Ee)=>D.value.evaluate(J,ve,{},Ee),needGeometry:Lh(W)}}function mc(W,D){return WD?1:0}function Lh(W){if(!Array.isArray(W))return!1;if(W[0]==="within"||W[0]==="distance")return!0;for(let D=1;D"||D==="<="||D===">="?vf(W[1],W[2],D):D==="any"?(J=W.slice(1),["any"].concat(J.map(sf))):D==="all"?["all"].concat(W.slice(1).map(sf)):D==="none"?["all"].concat(W.slice(1).map(sf).map(au)):D==="in"?Nu(W[1],W.slice(2)):D==="!in"?au(Nu(W[1],W.slice(2))):D==="has"?lf(W[1]):D!=="!has"||au(lf(W[1]));var J}function vf(W,D,J){switch(W){case"$type":return[`filter-type-${J}`,D];case"$id":return[`filter-id-${J}`,D];default:return[`filter-${J}`,W,D]}}function Nu(W,D){if(D.length===0)return!1;switch(W){case"$type":return["filter-type-in",["literal",D]];case"$id":return["filter-id-in",["literal",D]];default:return D.length>200&&!D.some(J=>typeof J!=typeof D[0])?["filter-in-large",W,["literal",D.sort(mc)]]:["filter-in-small",W,["literal",D]]}}function lf(W){switch(W){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",W]}}function au(W){return["!",W]}function Yc(W){let D=typeof W;if(D==="number"||D==="boolean"||D==="string"||W==null)return JSON.stringify(W);if(Array.isArray(W)){let Ee="[";for(let Be of W)Ee+=`${Yc(Be)},`;return`${Ee}]`}let J=Object.keys(W).sort(),ve="{";for(let Ee=0;Eeve.maximum?[new ue(D,J,`${J} is greater than the maximum value ${ve.maximum}`)]:[]}function uf(W){let D=W.valueSpec,J=sl(W.value.type),ve,Ee,Be,Ge={},ct=J!=="categorical"&&W.value.property===void 0,At=!ct,Bt=Ys(W.value.stops)==="array"&&Ys(W.value.stops[0])==="array"&&Ys(W.value.stops[0][0])==="object",ar=Pu({key:W.key,value:W.value,valueSpec:W.styleSpec.function,validateSpec:W.validateSpec,style:W.style,styleSpec:W.styleSpec,objectElementValidators:{stops:function(Wr){if(J==="identity")return[new ue(Wr.key,Wr.value,'identity function may not have a "stops" property')];let ia=[],fa=Wr.value;return ia=ia.concat(Cf({key:Wr.key,value:fa,valueSpec:Wr.valueSpec,validateSpec:Wr.validateSpec,style:Wr.style,styleSpec:Wr.styleSpec,arrayElementValidator:Sr})),Ys(fa)==="array"&&fa.length===0&&ia.push(new ue(Wr.key,fa,"array must have at least one stop")),ia},default:function(Wr){return Wr.validateSpec({key:Wr.key,value:Wr.value,valueSpec:D,validateSpec:Wr.validateSpec,style:Wr.style,styleSpec:Wr.styleSpec})}}});return J==="identity"&&ct&&ar.push(new ue(W.key,W.value,'missing required property "property"')),J==="identity"||W.value.stops||ar.push(new ue(W.key,W.value,'missing required property "stops"')),J==="exponential"&&W.valueSpec.expression&&!Sc(W.valueSpec)&&ar.push(new ue(W.key,W.value,"exponential functions not supported")),W.styleSpec.$version>=8&&(At&&!Ql(W.valueSpec)?ar.push(new ue(W.key,W.value,"property functions not supported")):ct&&!qc(W.valueSpec)&&ar.push(new ue(W.key,W.value,"zoom functions not supported"))),J!=="categorical"&&!Bt||W.value.property!==void 0||ar.push(new ue(W.key,W.value,'"property" property is required')),ar;function Sr(Wr){let ia=[],fa=Wr.value,ja=Wr.key;if(Ys(fa)!=="array")return[new ue(ja,fa,`array expected, ${Ys(fa)} found`)];if(fa.length!==2)return[new ue(ja,fa,`array length 2 expected, length ${fa.length} found`)];if(Bt){if(Ys(fa[0])!=="object")return[new ue(ja,fa,`object expected, ${Ys(fa[0])} found`)];if(fa[0].zoom===void 0)return[new ue(ja,fa,"object stop key must have zoom")];if(fa[0].value===void 0)return[new ue(ja,fa,"object stop key must have value")];if(Be&&Be>sl(fa[0].zoom))return[new ue(ja,fa[0].zoom,"stop zoom values must appear in ascending order")];sl(fa[0].zoom)!==Be&&(Be=sl(fa[0].zoom),Ee=void 0,Ge={}),ia=ia.concat(Pu({key:`${ja}[0]`,value:fa[0],valueSpec:{zoom:{}},validateSpec:Wr.validateSpec,style:Wr.style,styleSpec:Wr.styleSpec,objectElementValidators:{zoom:hl,value:zr}}))}else ia=ia.concat(zr({key:`${ja}[0]`,value:fa[0],valueSpec:{},validateSpec:Wr.validateSpec,style:Wr.style,styleSpec:Wr.styleSpec},fa));return Mc(_u(fa[1]))?ia.concat([new ue(`${ja}[1]`,fa[1],"expressions are not allowed in function stops.")]):ia.concat(Wr.validateSpec({key:`${ja}[1]`,value:fa[1],valueSpec:D,validateSpec:Wr.validateSpec,style:Wr.style,styleSpec:Wr.styleSpec}))}function zr(Wr,ia){let fa=Ys(Wr.value),ja=sl(Wr.value),Ka=Wr.value!==null?Wr.value:ia;if(ve){if(fa!==ve)return[new ue(Wr.key,Ka,`${fa} stop domain type must match previous stop domain type ${ve}`)]}else ve=fa;if(fa!=="number"&&fa!=="string"&&fa!=="boolean")return[new ue(Wr.key,Ka,"stop domain value must be a number, string, or boolean")];if(fa!=="number"&&J!=="categorical"){let Wi=`number expected, ${fa} found`;return Ql(D)&&J===void 0&&(Wi+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new ue(Wr.key,Ka,Wi)]}return J!=="categorical"||fa!=="number"||isFinite(ja)&&Math.floor(ja)===ja?J!=="categorical"&&fa==="number"&&Ee!==void 0&&janew ue(`${W.key}${ve.key}`,W.value,ve.message));let J=D.value.expression||D.value._styleExpression.expression;if(W.expressionContext==="property"&&W.propertyKey==="text-font"&&!J.outputDefined())return[new ue(W.key,W.value,`Invalid data expression for "${W.propertyKey}". Output values must be contained as literals within the expression.`)];if(W.expressionContext==="property"&&W.propertyType==="layout"&&!Gu(J))return[new ue(W.key,W.value,'"feature-state" data expressions are not supported with layout properties.')];if(W.expressionContext==="filter"&&!Gu(J))return[new ue(W.key,W.value,'"feature-state" data expressions are not supported with filters.')];if(W.expressionContext&&W.expressionContext.indexOf("cluster")===0){if(!Ef(J,["zoom","feature-state"]))return[new ue(W.key,W.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(W.expressionContext==="cluster-initial"&&!Nf(J))return[new ue(W.key,W.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Hu(W){let D=W.key,J=W.value,ve=W.valueSpec,Ee=[];return Array.isArray(ve.values)?ve.values.indexOf(sl(J))===-1&&Ee.push(new ue(D,J,`expected one of [${ve.values.join(", ")}], ${JSON.stringify(J)} found`)):Object.keys(ve.values).indexOf(sl(J))===-1&&Ee.push(new ue(D,J,`expected one of [${Object.keys(ve.values).join(", ")}], ${JSON.stringify(J)} found`)),Ee}function gf(W){return Qf(_u(W.value))?kc(ne({},W,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Wu(W)}function Wu(W){let D=W.value,J=W.key;if(Ys(D)!=="array")return[new ue(J,D,`array expected, ${Ys(D)} found`)];let ve=W.styleSpec,Ee,Be=[];if(D.length<1)return[new ue(J,D,"filter array must have at least 1 element")];switch(Be=Be.concat(Hu({key:`${J}[0]`,value:D[0],valueSpec:ve.filter_operator,style:W.style,styleSpec:W.styleSpec})),sl(D[0])){case"<":case"<=":case">":case">=":D.length>=2&&sl(D[1])==="$type"&&Be.push(new ue(J,D,`"$type" cannot be use with operator "${D[0]}"`));case"==":case"!=":D.length!==3&&Be.push(new ue(J,D,`filter array for operator "${D[0]}" must have 3 elements`));case"in":case"!in":D.length>=2&&(Ee=Ys(D[1]),Ee!=="string"&&Be.push(new ue(`${J}[1]`,D[1],`string expected, ${Ee} found`)));for(let Ge=2;Ge{Bt in J&&D.push(new ue(ve,J[Bt],`"${Bt}" is prohibited for ref layers`))}),Ee.layers.forEach(Bt=>{sl(Bt.id)===ct&&(At=Bt)}),At?At.ref?D.push(new ue(ve,J.ref,"ref cannot reference another ref layer")):Ge=sl(At.type):D.push(new ue(ve,J.ref,`ref layer "${ct}" not found`))}else if(Ge!=="background")if(J.source){let At=Ee.sources&&Ee.sources[J.source],Bt=At&&sl(At.type);At?Bt==="vector"&&Ge==="raster"?D.push(new ue(ve,J.source,`layer "${J.id}" requires a raster source`)):Bt!=="raster-dem"&&Ge==="hillshade"?D.push(new ue(ve,J.source,`layer "${J.id}" requires a raster-dem source`)):Bt==="raster"&&Ge!=="raster"?D.push(new ue(ve,J.source,`layer "${J.id}" requires a vector source`)):Bt!=="vector"||J["source-layer"]?Bt==="raster-dem"&&Ge!=="hillshade"?D.push(new ue(ve,J.source,"raster-dem source can only be used with layer type 'hillshade'.")):Ge!=="line"||!J.paint||!J.paint["line-gradient"]||Bt==="geojson"&&At.lineMetrics||D.push(new ue(ve,J,`layer "${J.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):D.push(new ue(ve,J,`layer "${J.id}" must specify a "source-layer"`)):D.push(new ue(ve,J.source,`source "${J.source}" not found`))}else D.push(new ue(ve,J,'missing required property "source"'));return D=D.concat(Pu({key:ve,value:J,valueSpec:Be.layer,style:W.style,styleSpec:W.styleSpec,validateSpec:W.validateSpec,objectElementValidators:{"*":()=>[],type:()=>W.validateSpec({key:`${ve}.type`,value:J.type,valueSpec:Be.layer.type,style:W.style,styleSpec:W.styleSpec,validateSpec:W.validateSpec,object:J,objectKey:"type"}),filter:gf,layout:At=>Pu({layer:J,key:At.key,value:At.value,style:At.style,styleSpec:At.styleSpec,validateSpec:At.validateSpec,objectElementValidators:{"*":Bt=>iu(ne({layerType:Ge},Bt))}}),paint:At=>Pu({layer:J,key:At.key,value:At.value,style:At.style,styleSpec:At.styleSpec,validateSpec:At.validateSpec,objectElementValidators:{"*":Bt=>Lf(ne({layerType:Ge},Bt))}})}})),D}function Xu(W){let D=W.value,J=W.key,ve=Ys(D);return ve!=="string"?[new ue(J,D,`string expected, ${ve} found`)]:[]}let Cc={promoteId:function({key:W,value:D}){if(Ys(D)==="string")return Xu({key:W,value:D});{let J=[];for(let ve in D)J.push(...Xu({key:`${W}.${ve}`,value:D[ve]}));return J}}};function gc(W){let D=W.value,J=W.key,ve=W.styleSpec,Ee=W.style,Be=W.validateSpec;if(!D.type)return[new ue(J,D,'"type" is required')];let Ge=sl(D.type),ct;switch(Ge){case"vector":case"raster":return ct=Pu({key:J,value:D,valueSpec:ve[`source_${Ge.replace("-","_")}`],style:W.style,styleSpec:ve,objectElementValidators:Cc,validateSpec:Be}),ct;case"raster-dem":return ct=function(At){var Bt;let ar=(Bt=At.sourceName)!==null&&Bt!==void 0?Bt:"",Sr=At.value,zr=At.styleSpec,Wr=zr.source_raster_dem,ia=At.style,fa=[],ja=Ys(Sr);if(Sr===void 0)return fa;if(ja!=="object")return fa.push(new ue("source_raster_dem",Sr,`object expected, ${ja} found`)),fa;let Ka=sl(Sr.encoding)==="custom",Wi=["redFactor","greenFactor","blueFactor","baseShift"],gi=At.value.encoding?`"${At.value.encoding}"`:"Default";for(let qi in Sr)!Ka&&Wi.includes(qi)?fa.push(new ue(qi,Sr[qi],`In "${ar}": "${qi}" is only valid when "encoding" is set to "custom". ${gi} encoding found`)):Wr[qi]?fa=fa.concat(At.validateSpec({key:qi,value:Sr[qi],valueSpec:Wr[qi],validateSpec:At.validateSpec,style:ia,styleSpec:zr})):fa.push(new ue(qi,Sr[qi],`unknown property "${qi}"`));return fa}({sourceName:J,value:D,style:W.style,styleSpec:ve,validateSpec:Be}),ct;case"geojson":if(ct=Pu({key:J,value:D,valueSpec:ve.source_geojson,style:Ee,styleSpec:ve,validateSpec:Be,objectElementValidators:Cc}),D.cluster)for(let At in D.clusterProperties){let[Bt,ar]=D.clusterProperties[At],Sr=typeof Bt=="string"?[Bt,["accumulated"],["get",At]]:Bt;ct.push(...kc({key:`${J}.${At}.map`,value:ar,validateSpec:Be,expressionContext:"cluster-map"})),ct.push(...kc({key:`${J}.${At}.reduce`,value:Sr,validateSpec:Be,expressionContext:"cluster-reduce"}))}return ct;case"video":return Pu({key:J,value:D,valueSpec:ve.source_video,style:Ee,validateSpec:Be,styleSpec:ve});case"image":return Pu({key:J,value:D,valueSpec:ve.source_image,style:Ee,validateSpec:Be,styleSpec:ve});case"canvas":return[new ue(J,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return Hu({key:`${J}.type`,value:D.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:Ee,validateSpec:Be,styleSpec:ve})}}function ql(W){let D=W.value,J=W.styleSpec,ve=J.light,Ee=W.style,Be=[],Ge=Ys(D);if(D===void 0)return Be;if(Ge!=="object")return Be=Be.concat([new ue("light",D,`object expected, ${Ge} found`)]),Be;for(let ct in D){let At=ct.match(/^(.*)-transition$/);Be=Be.concat(At&&ve[At[1]]&&ve[At[1]].transition?W.validateSpec({key:ct,value:D[ct],valueSpec:J.transition,validateSpec:W.validateSpec,style:Ee,styleSpec:J}):ve[ct]?W.validateSpec({key:ct,value:D[ct],valueSpec:ve[ct],validateSpec:W.validateSpec,style:Ee,styleSpec:J}):[new ue(ct,D[ct],`unknown property "${ct}"`)])}return Be}function xu(W){let D=W.value,J=W.styleSpec,ve=J.sky,Ee=W.style,Be=Ys(D);if(D===void 0)return[];if(Be!=="object")return[new ue("sky",D,`object expected, ${Be} found`)];let Ge=[];for(let ct in D)Ge=Ge.concat(ve[ct]?W.validateSpec({key:ct,value:D[ct],valueSpec:ve[ct],style:Ee,styleSpec:J}):[new ue(ct,D[ct],`unknown property "${ct}"`)]);return Ge}function Lc(W){let D=W.value,J=W.styleSpec,ve=J.terrain,Ee=W.style,Be=[],Ge=Ys(D);if(D===void 0)return Be;if(Ge!=="object")return Be=Be.concat([new ue("terrain",D,`object expected, ${Ge} found`)]),Be;for(let ct in D)Be=Be.concat(ve[ct]?W.validateSpec({key:ct,value:D[ct],valueSpec:ve[ct],validateSpec:W.validateSpec,style:Ee,styleSpec:J}):[new ue(ct,D[ct],`unknown property "${ct}"`)]);return Be}function Jc(W){let D=[],J=W.value,ve=W.key;if(Array.isArray(J)){let Ee=[],Be=[];for(let Ge in J)J[Ge].id&&Ee.includes(J[Ge].id)&&D.push(new ue(ve,J,`all the sprites' ids must be unique, but ${J[Ge].id} is duplicated`)),Ee.push(J[Ge].id),J[Ge].url&&Be.includes(J[Ge].url)&&D.push(new ue(ve,J,`all the sprites' URLs must be unique, but ${J[Ge].url} is duplicated`)),Be.push(J[Ge].url),D=D.concat(Pu({key:`${ve}[${Ge}]`,value:J[Ge],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:W.validateSpec}));return D}return Xu({key:ve,value:J})}let sc={"*":()=>[],array:Cf,boolean:function(W){let D=W.value,J=W.key,ve=Ys(D);return ve!=="boolean"?[new ue(J,D,`boolean expected, ${ve} found`)]:[]},number:hl,color:function(W){let D=W.key,J=W.value,ve=Ys(J);return ve!=="string"?[new ue(D,J,`color expected, ${ve} found`)]:Jt.parse(String(J))?[]:[new ue(D,J,`color expected, "${J}" found`)]},constants:mf,enum:Hu,filter:gf,function:uf,layer:Vf,object:Pu,source:gc,light:ql,sky:xu,terrain:Lc,projection:function(W){let D=W.value,J=W.styleSpec,ve=J.projection,Ee=W.style,Be=Ys(D);if(D===void 0)return[];if(Be!=="object")return[new ue("projection",D,`object expected, ${Be} found`)];let Ge=[];for(let ct in D)Ge=Ge.concat(ve[ct]?W.validateSpec({key:ct,value:D[ct],valueSpec:ve[ct],style:Ee,styleSpec:J}):[new ue(ct,D[ct],`unknown property "${ct}"`)]);return Ge},string:Xu,formatted:function(W){return Xu(W).length===0?[]:kc(W)},resolvedImage:function(W){return Xu(W).length===0?[]:kc(W)},padding:function(W){let D=W.key,J=W.value;if(Ys(J)==="array"){if(J.length<1||J.length>4)return[new ue(D,J,`padding requires 1 to 4 values; ${J.length} values found`)];let ve={type:"number"},Ee=[];for(let Be=0;Be[]}})),W.constants&&(J=J.concat(mf({key:"constants",value:W.constants,style:W,styleSpec:D,validateSpec:Pc}))),$r(J)}function aa(W){return function(D){return W(ps(To({},D),{validateSpec:Pc}))}}function $r(W){return[].concat(W).sort((D,J)=>D.line-J.line)}function ka(W){return function(...D){return $r(W.apply(this,D))}}br.source=ka(aa(gc)),br.sprite=ka(aa(Jc)),br.glyphs=ka(aa(Qt)),br.light=ka(aa(ql)),br.sky=ka(aa(xu)),br.terrain=ka(aa(Lc)),br.layer=ka(aa(Vf)),br.filter=ka(aa(gf)),br.paintProperty=ka(aa(Lf)),br.layoutProperty=ka(aa(iu));let li=br,Ci=li.light,Hi=li.sky,Qi=li.paintProperty,pn=li.layoutProperty;function Pi(W,D){let J=!1;if(D&&D.length)for(let ve of D)W.fire(new j(new Error(ve.message))),J=!0;return J}class Di{constructor(D,J,ve){let Ee=this.cells=[];if(D instanceof ArrayBuffer){this.arrayBuffer=D;let Ge=new Int32Array(this.arrayBuffer);D=Ge[0],this.d=(J=Ge[1])+2*(ve=Ge[2]);for(let At=0;At=Sr[ia+0]&&Ee>=Sr[ia+1])?(ct[Wr]=!0,Ge.push(ar[Wr])):ct[Wr]=!1}}}}_forEachCell(D,J,ve,Ee,Be,Ge,ct,At){let Bt=this._convertToCellCoord(D),ar=this._convertToCellCoord(J),Sr=this._convertToCellCoord(ve),zr=this._convertToCellCoord(Ee);for(let Wr=Bt;Wr<=Sr;Wr++)for(let ia=ar;ia<=zr;ia++){let fa=this.d*ia+Wr;if((!At||At(this._convertFromCellCoord(Wr),this._convertFromCellCoord(ia),this._convertFromCellCoord(Wr+1),this._convertFromCellCoord(ia+1)))&&Be.call(this,D,J,ve,Ee,fa,Ge,ct,At))return}}_convertFromCellCoord(D){return(D-this.padding)/this.scale}_convertToCellCoord(D){return Math.max(0,Math.min(this.d-1,Math.floor(D*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;let D=this.cells,J=3+this.cells.length+1+1,ve=0;for(let Ge=0;Ge=0)continue;let Ge=W[Be];Ee[Be]=Ni[J].shallow.indexOf(Be)>=0?Ge:Qn(Ge,D)}W instanceof Error&&(Ee.message=W.message)}if(Ee.$name)throw new Error("$name property is reserved for worker serialization logic.");return J!=="Object"&&(Ee.$name=J),Ee}function co(W){if(no(W))return W;if(Array.isArray(W))return W.map(co);if(typeof W!="object")throw new Error("can't deserialize object of type "+typeof W);let D=$n(W)||"Object";if(!Ni[D])throw new Error(`can't deserialize unregistered class ${D}`);let{klass:J}=Ni[D];if(!J)throw new Error(`can't deserialize unregistered class ${D}`);if(J.deserialize)return J.deserialize(W);let ve=Object.create(J.prototype);for(let Ee of Object.keys(W)){if(Ee==="$name")continue;let Be=W[Ee];ve[Ee]=Ni[D].shallow.indexOf(Ee)>=0?Be:co(Be)}return ve}class Tn{constructor(){this.first=!0}update(D,J){let ve=Math.floor(D);return this.first?(this.first=!1,this.lastIntegerZoom=ve,this.lastIntegerZoomTime=0,this.lastZoom=D,this.lastFloorZoom=ve,!0):(this.lastFloorZoom>ve?(this.lastIntegerZoom=ve+1,this.lastIntegerZoomTime=J):this.lastFloorZoomW>=128&&W<=255,"Hangul Jamo":W=>W>=4352&&W<=4607,Khmer:W=>W>=6016&&W<=6143,"General Punctuation":W=>W>=8192&&W<=8303,"Letterlike Symbols":W=>W>=8448&&W<=8527,"Number Forms":W=>W>=8528&&W<=8591,"Miscellaneous Technical":W=>W>=8960&&W<=9215,"Control Pictures":W=>W>=9216&&W<=9279,"Optical Character Recognition":W=>W>=9280&&W<=9311,"Enclosed Alphanumerics":W=>W>=9312&&W<=9471,"Geometric Shapes":W=>W>=9632&&W<=9727,"Miscellaneous Symbols":W=>W>=9728&&W<=9983,"Miscellaneous Symbols and Arrows":W=>W>=11008&&W<=11263,"Ideographic Description Characters":W=>W>=12272&&W<=12287,"CJK Symbols and Punctuation":W=>W>=12288&&W<=12351,Katakana:W=>W>=12448&&W<=12543,Kanbun:W=>W>=12688&&W<=12703,"CJK Strokes":W=>W>=12736&&W<=12783,"Enclosed CJK Letters and Months":W=>W>=12800&&W<=13055,"CJK Compatibility":W=>W>=13056&&W<=13311,"Yijing Hexagram Symbols":W=>W>=19904&&W<=19967,"Private Use Area":W=>W>=57344&&W<=63743,"Vertical Forms":W=>W>=65040&&W<=65055,"CJK Compatibility Forms":W=>W>=65072&&W<=65103,"Small Form Variants":W=>W>=65104&&W<=65135,"Halfwidth and Fullwidth Forms":W=>W>=65280&&W<=65519};function go(W){for(let D of W)if(ws(D.charCodeAt(0)))return!0;return!1}function Ko(W){for(let D of W)if(!Ns(D.charCodeAt(0)))return!1;return!0}function Ms(W){let D=W.map(J=>{try{return new RegExp(`\\p{sc=${J}}`,"u").source}catch{return null}}).filter(J=>J);return new RegExp(D.join("|"),"u")}let rl=Ms(["Arab","Dupl","Mong","Ougr","Syrc"]);function Ns(W){return!rl.test(String.fromCodePoint(W))}let el=Ms(["Bopo","Hani","Hira","Kana","Kits","Nshu","Tang","Yiii"]);function ws(W){return!(W!==746&&W!==747&&(W<4352||!(un["CJK Compatibility Forms"](W)&&!(W>=65097&&W<=65103)||un["CJK Compatibility"](W)||un["CJK Strokes"](W)||!(!un["CJK Symbols and Punctuation"](W)||W>=12296&&W<=12305||W>=12308&&W<=12319||W===12336)||un["Enclosed CJK Letters and Months"](W)||un["Ideographic Description Characters"](W)||un.Kanbun(W)||un.Katakana(W)&&W!==12540||!(!un["Halfwidth and Fullwidth Forms"](W)||W===65288||W===65289||W===65293||W>=65306&&W<=65310||W===65339||W===65341||W===65343||W>=65371&&W<=65503||W===65507||W>=65512&&W<=65519)||!(!un["Small Form Variants"](W)||W>=65112&&W<=65118||W>=65123&&W<=65126)||un["Vertical Forms"](W)||un["Yijing Hexagram Symbols"](W)||new RegExp("\\p{sc=Cans}","u").test(String.fromCodePoint(W))||new RegExp("\\p{sc=Hang}","u").test(String.fromCodePoint(W))||el.test(String.fromCodePoint(W)))))}function Fl(W){return!(ws(W)||function(D){return!!(un["Latin-1 Supplement"](D)&&(D===167||D===169||D===174||D===177||D===188||D===189||D===190||D===215||D===247)||un["General Punctuation"](D)&&(D===8214||D===8224||D===8225||D===8240||D===8241||D===8251||D===8252||D===8258||D===8263||D===8264||D===8265||D===8273)||un["Letterlike Symbols"](D)||un["Number Forms"](D)||un["Miscellaneous Technical"](D)&&(D>=8960&&D<=8967||D>=8972&&D<=8991||D>=8996&&D<=9e3||D===9003||D>=9085&&D<=9114||D>=9150&&D<=9165||D===9167||D>=9169&&D<=9179||D>=9186&&D<=9215)||un["Control Pictures"](D)&&D!==9251||un["Optical Character Recognition"](D)||un["Enclosed Alphanumerics"](D)||un["Geometric Shapes"](D)||un["Miscellaneous Symbols"](D)&&!(D>=9754&&D<=9759)||un["Miscellaneous Symbols and Arrows"](D)&&(D>=11026&&D<=11055||D>=11088&&D<=11097||D>=11192&&D<=11243)||un["CJK Symbols and Punctuation"](D)||un.Katakana(D)||un["Private Use Area"](D)||un["CJK Compatibility Forms"](D)||un["Small Form Variants"](D)||un["Halfwidth and Fullwidth Forms"](D)||D===8734||D===8756||D===8757||D>=9984&&D<=10087||D>=10102&&D<=10131||D===65532||D===65533)}(W))}let _l=Ms(["Adlm","Arab","Armi","Avst","Chrs","Cprt","Egyp","Elym","Gara","Hatr","Hebr","Hung","Khar","Lydi","Mand","Mani","Mend","Merc","Mero","Narb","Nbat","Nkoo","Orkh","Palm","Phli","Phlp","Phnx","Prti","Rohg","Samr","Sarb","Sogo","Syrc","Thaa","Todr","Yezi"]);function ll(W){return _l.test(String.fromCodePoint(W))}function jn(W,D){return!(!D&&ll(W)||W>=2304&&W<=3583||W>=3840&&W<=4255||un.Khmer(W))}function Io(W){for(let D of W)if(ll(D.charCodeAt(0)))return!0;return!1}let Js=new class{constructor(){this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null}setState(W){this.pluginStatus=W.pluginStatus,this.pluginURL=W.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(W){this.applyArabicShaping=W.applyArabicShaping,this.processBidirectionalText=W.processBidirectionalText,this.processStyledBidirectionalText=W.processStyledBidirectionalText}isParsed(){return this.applyArabicShaping!=null&&this.processBidirectionalText!=null&&this.processStyledBidirectionalText!=null}getPluginURL(){return this.pluginURL}getRTLTextPluginStatus(){return this.pluginStatus}};class Ds{constructor(D,J){this.zoom=D,J?(this.now=J.now,this.fadeDuration=J.fadeDuration,this.zoomHistory=J.zoomHistory,this.transition=J.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Tn,this.transition={})}isSupportedScript(D){return function(J,ve){for(let Ee of J)if(!jn(Ee.charCodeAt(0),ve))return!1;return!0}(D,Js.getRTLTextPluginStatus()==="loaded")}crossFadingFactor(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){let D=this.zoom,J=D-Math.floor(D),ve=this.crossFadingFactor();return D>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:J+(1-J)*ve}:{fromScale:.5,toScale:1,t:1-(1-ve)*J}}}class uu{constructor(D,J){this.property=D,this.value=J,this.expression=function(ve,Ee){if(kf(ve))return new El(ve,Ee);if(Mc(ve)){let Be=Tu(ve,Ee);if(Be.result==="error")throw new Error(Be.value.map(Ge=>`${Ge.key}: ${Ge.message}`).join(", "));return Be.value}{let Be=ve;return Ee.type==="color"&&typeof ve=="string"?Be=Jt.parse(ve):Ee.type!=="padding"||typeof ve!="number"&&!Array.isArray(ve)?Ee.type==="variableAnchorOffsetCollection"&&Array.isArray(ve)&&(Be=$a.parse(ve)):Be=ca.parse(ve),{kind:"constant",evaluate:()=>Be}}}(J===void 0?D.specification.default:J,D.specification)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}possiblyEvaluate(D,J,ve){return this.property.possiblyEvaluate(this,D,J,ve)}}class Iu{constructor(D){this.property=D,this.value=new uu(D,void 0)}transitioned(D,J){return new Ic(this.property,this.value,J,M({},D.transition,this.transition),D.now)}untransitioned(){return new Ic(this.property,this.value,null,{},0)}}class Zu{constructor(D){this._properties=D,this._values=Object.create(D.defaultTransitionablePropertyValues)}getValue(D){return u(this._values[D].value.value)}setValue(D,J){Object.prototype.hasOwnProperty.call(this._values,D)||(this._values[D]=new Iu(this._values[D].property)),this._values[D].value=new uu(this._values[D].property,J===null?void 0:u(J))}getTransition(D){return u(this._values[D].transition)}setTransition(D,J){Object.prototype.hasOwnProperty.call(this._values,D)||(this._values[D]=new Iu(this._values[D].property)),this._values[D].transition=u(J)||void 0}serialize(){let D={};for(let J of Object.keys(this._values)){let ve=this.getValue(J);ve!==void 0&&(D[J]=ve);let Ee=this.getTransition(J);Ee!==void 0&&(D[`${J}-transition`]=Ee)}return D}transitioned(D,J){let ve=new bu(this._properties);for(let Ee of Object.keys(this._values))ve._values[Ee]=this._values[Ee].transitioned(D,J._values[Ee]);return ve}untransitioned(){let D=new bu(this._properties);for(let J of Object.keys(this._values))D._values[J]=this._values[J].untransitioned();return D}}class Ic{constructor(D,J,ve,Ee,Be){this.property=D,this.value=J,this.begin=Be+Ee.delay||0,this.end=this.begin+Ee.duration||0,D.specification.transition&&(Ee.delay||Ee.duration)&&(this.prior=ve)}possiblyEvaluate(D,J,ve){let Ee=D.now||0,Be=this.value.possiblyEvaluate(D,J,ve),Ge=this.prior;if(Ge){if(Ee>this.end)return this.prior=null,Be;if(this.value.isDataDriven())return this.prior=null,Be;if(Ee=1)return 1;let Bt=At*At,ar=Bt*At;return 4*(At<.5?ar:3*(At-Bt)+ar-.75)}(ct))}}return Be}}class bu{constructor(D){this._properties=D,this._values=Object.create(D.defaultTransitioningPropertyValues)}possiblyEvaluate(D,J,ve){let Ee=new yc(this._properties);for(let Be of Object.keys(this._values))Ee._values[Be]=this._values[Be].possiblyEvaluate(D,J,ve);return Ee}hasTransition(){for(let D of Object.keys(this._values))if(this._values[D].prior)return!0;return!1}}class Rc{constructor(D){this._properties=D,this._values=Object.create(D.defaultPropertyValues)}hasValue(D){return this._values[D].value!==void 0}getValue(D){return u(this._values[D].value)}setValue(D,J){this._values[D]=new uu(this._values[D].property,J===null?void 0:u(J))}serialize(){let D={};for(let J of Object.keys(this._values)){let ve=this.getValue(J);ve!==void 0&&(D[J]=ve)}return D}possiblyEvaluate(D,J,ve){let Ee=new yc(this._properties);for(let Be of Object.keys(this._values))Ee._values[Be]=this._values[Be].possiblyEvaluate(D,J,ve);return Ee}}class Au{constructor(D,J,ve){this.property=D,this.value=J,this.parameters=ve}isConstant(){return this.value.kind==="constant"}constantOr(D){return this.value.kind==="constant"?this.value.value:D}evaluate(D,J,ve,Ee){return this.property.evaluate(this.value,this.parameters,D,J,ve,Ee)}}class yc{constructor(D){this._properties=D,this._values=Object.create(D.defaultPossiblyEvaluatedValues)}get(D){return this._values[D]}}class fo{constructor(D){this.specification=D}possiblyEvaluate(D,J){if(D.isDataDriven())throw new Error("Value should not be data driven");return D.expression.evaluate(J)}interpolate(D,J,ve){let Ee=Bn[this.specification.type];return Ee?Ee(D,J,ve):D}}class zo{constructor(D,J){this.specification=D,this.overrides=J}possiblyEvaluate(D,J,ve,Ee){return new Au(this,D.expression.kind==="constant"||D.expression.kind==="camera"?{kind:"constant",value:D.expression.evaluate(J,null,{},ve,Ee)}:D.expression,J)}interpolate(D,J,ve){if(D.value.kind!=="constant"||J.value.kind!=="constant")return D;if(D.value.value===void 0||J.value.value===void 0)return new Au(this,{kind:"constant",value:void 0},D.parameters);let Ee=Bn[this.specification.type];if(Ee){let Be=Ee(D.value.value,J.value.value,ve);return new Au(this,{kind:"constant",value:Be},D.parameters)}return D}evaluate(D,J,ve,Ee,Be,Ge){return D.kind==="constant"?D.value:D.evaluate(J,ve,Ee,Be,Ge)}}class Dc extends zo{possiblyEvaluate(D,J,ve,Ee){if(D.value===void 0)return new Au(this,{kind:"constant",value:void 0},J);if(D.expression.kind==="constant"){let Be=D.expression.evaluate(J,null,{},ve,Ee),Ge=D.property.specification.type==="resolvedImage"&&typeof Be!="string"?Be.name:Be,ct=this._calculate(Ge,Ge,Ge,J);return new Au(this,{kind:"constant",value:ct},J)}if(D.expression.kind==="camera"){let Be=this._calculate(D.expression.evaluate({zoom:J.zoom-1}),D.expression.evaluate({zoom:J.zoom}),D.expression.evaluate({zoom:J.zoom+1}),J);return new Au(this,{kind:"constant",value:Be},J)}return new Au(this,D.expression,J)}evaluate(D,J,ve,Ee,Be,Ge){if(D.kind==="source"){let ct=D.evaluate(J,ve,Ee,Be,Ge);return this._calculate(ct,ct,ct,J)}return D.kind==="composite"?this._calculate(D.evaluate({zoom:Math.floor(J.zoom)-1},ve,Ee),D.evaluate({zoom:Math.floor(J.zoom)},ve,Ee),D.evaluate({zoom:Math.floor(J.zoom)+1},ve,Ee),J):D.value}_calculate(D,J,ve,Ee){return Ee.zoom>Ee.zoomHistory.lastIntegerZoom?{from:D,to:J}:{from:ve,to:J}}interpolate(D){return D}}class lc{constructor(D){this.specification=D}possiblyEvaluate(D,J,ve,Ee){if(D.value!==void 0){if(D.expression.kind==="constant"){let Be=D.expression.evaluate(J,null,{},ve,Ee);return this._calculate(Be,Be,Be,J)}return this._calculate(D.expression.evaluate(new Ds(Math.floor(J.zoom-1),J)),D.expression.evaluate(new Ds(Math.floor(J.zoom),J)),D.expression.evaluate(new Ds(Math.floor(J.zoom+1),J)),J)}}_calculate(D,J,ve,Ee){return Ee.zoom>Ee.zoomHistory.lastIntegerZoom?{from:D,to:J}:{from:ve,to:J}}interpolate(D){return D}}class Yu{constructor(D){this.specification=D}possiblyEvaluate(D,J,ve,Ee){return!!D.expression.evaluate(J,null,{},ve,Ee)}interpolate(){return!1}}class Fe{constructor(D){this.properties=D,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(let J in D){let ve=D[J];ve.specification.overridable&&this.overridableProperties.push(J);let Ee=this.defaultPropertyValues[J]=new uu(ve,void 0),Be=this.defaultTransitionablePropertyValues[J]=new Iu(ve);this.defaultTransitioningPropertyValues[J]=Be.untransitioned(),this.defaultPossiblyEvaluatedValues[J]=Ee.possiblyEvaluate({})}}}mi("DataDrivenProperty",zo),mi("DataConstantProperty",fo),mi("CrossFadedDataDrivenProperty",Dc),mi("CrossFadedProperty",lc),mi("ColorRampProperty",Yu);let I="-transition";class ie extends Q{constructor(D,J){if(super(),this.id=D.id,this.type=D.type,this._featureFilter={filter:()=>!0,needGeometry:!1},D.type!=="custom"&&(this.metadata=D.metadata,this.minzoom=D.minzoom,this.maxzoom=D.maxzoom,D.type!=="background"&&(this.source=D.source,this.sourceLayer=D["source-layer"],this.filter=D.filter),J.layout&&(this._unevaluatedLayout=new Rc(J.layout)),J.paint)){this._transitionablePaint=new Zu(J.paint);for(let ve in D.paint)this.setPaintProperty(ve,D.paint[ve],{validate:!1});for(let ve in D.layout)this.setLayoutProperty(ve,D.layout[ve],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new yc(J.paint)}}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(D){return D==="visibility"?this.visibility:this._unevaluatedLayout.getValue(D)}setLayoutProperty(D,J,ve={}){J!=null&&this._validate(pn,`layers.${this.id}.layout.${D}`,D,J,ve)||(D!=="visibility"?this._unevaluatedLayout.setValue(D,J):this.visibility=J)}getPaintProperty(D){return D.endsWith(I)?this._transitionablePaint.getTransition(D.slice(0,-11)):this._transitionablePaint.getValue(D)}setPaintProperty(D,J,ve={}){if(J!=null&&this._validate(Qi,`layers.${this.id}.paint.${D}`,D,J,ve))return!1;if(D.endsWith(I))return this._transitionablePaint.setTransition(D.slice(0,-11),J||void 0),!1;{let Ee=this._transitionablePaint._values[D],Be=Ee.property.specification["property-type"]==="cross-faded-data-driven",Ge=Ee.value.isDataDriven(),ct=Ee.value;this._transitionablePaint.setValue(D,J),this._handleSpecialPaintPropertyUpdate(D);let At=this._transitionablePaint._values[D].value;return At.isDataDriven()||Ge||Be||this._handleOverridablePaintPropertyUpdate(D,ct,At)}}_handleSpecialPaintPropertyUpdate(D){}_handleOverridablePaintPropertyUpdate(D,J,ve){return!1}isHidden(D){return!!(this.minzoom&&D=this.maxzoom)||this.visibility==="none"}updateTransitions(D){this._transitioningPaint=this._transitionablePaint.transitioned(D,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(D,J){D.getCrossfadeParameters&&(this._crossfadeParameters=D.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(D,void 0,J)),this.paint=this._transitioningPaint.possiblyEvaluate(D,void 0,J)}serialize(){let D={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&&(D.layout=D.layout||{},D.layout.visibility=this.visibility),p(D,(J,ve)=>!(J===void 0||ve==="layout"&&!Object.keys(J).length||ve==="paint"&&!Object.keys(J).length))}_validate(D,J,ve,Ee,Be={}){return(!Be||Be.validate!==!1)&&Pi(this,D.call(li,{key:J,layerType:this.type,objectKey:ve,value:Ee,styleSpec:re,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(let D in this.paint._values){let J=this.paint.get(D);if(J instanceof Au&&Ql(J.property.specification)&&(J.value.kind==="source"||J.value.kind==="composite")&&J.value.isStateDependent)return!0}return!1}}let Te={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class Me{constructor(D,J){this._structArray=D,this._pos1=J*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class ze{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(D,J){return D._trim(),J&&(D.isTransferred=!0,J.push(D.arrayBuffer)),{length:D.length,arrayBuffer:D.arrayBuffer}}static deserialize(D){let J=Object.create(this.prototype);return J.arrayBuffer=D.arrayBuffer,J.length=D.length,J.capacity=D.arrayBuffer.byteLength/J.bytesPerElement,J._refreshViews(),J}_trim(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())}clear(){this.length=0}resize(D){this.reserve(D),this.length=D}reserve(D){if(D>this.capacity){this.capacity=Math.max(D,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);let J=this.uint8;this._refreshViews(),J&&this.uint8.set(J)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}}function ht(W,D=1){let J=0,ve=0;return{members:W.map(Ee=>{let Be=Te[Ee.type].BYTES_PER_ELEMENT,Ge=J=wt(J,Math.max(D,Be)),ct=Ee.components||1;return ve=Math.max(ve,Be),J+=Be*ct,{name:Ee.name,type:Ee.type,components:ct,offset:Ge}}),size:wt(J,Math.max(ve,D)),alignment:D}}function wt(W,D){return Math.ceil(W/D)*D}class Ot extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(D,J){let ve=this.length;return this.resize(ve+1),this.emplace(ve,D,J)}emplace(D,J,ve){let Ee=2*D;return this.int16[Ee+0]=J,this.int16[Ee+1]=ve,D}}Ot.prototype.bytesPerElement=4,mi("StructArrayLayout2i4",Ot);class $t extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(D,J,ve){let Ee=this.length;return this.resize(Ee+1),this.emplace(Ee,D,J,ve)}emplace(D,J,ve,Ee){let Be=3*D;return this.int16[Be+0]=J,this.int16[Be+1]=ve,this.int16[Be+2]=Ee,D}}$t.prototype.bytesPerElement=6,mi("StructArrayLayout3i6",$t);class Tr extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(D,J,ve,Ee){let Be=this.length;return this.resize(Be+1),this.emplace(Be,D,J,ve,Ee)}emplace(D,J,ve,Ee,Be){let Ge=4*D;return this.int16[Ge+0]=J,this.int16[Ge+1]=ve,this.int16[Ge+2]=Ee,this.int16[Ge+3]=Be,D}}Tr.prototype.bytesPerElement=8,mi("StructArrayLayout4i8",Tr);class Ar extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(D,J,ve,Ee,Be,Ge){let ct=this.length;return this.resize(ct+1),this.emplace(ct,D,J,ve,Ee,Be,Ge)}emplace(D,J,ve,Ee,Be,Ge,ct){let At=6*D;return this.int16[At+0]=J,this.int16[At+1]=ve,this.int16[At+2]=Ee,this.int16[At+3]=Be,this.int16[At+4]=Ge,this.int16[At+5]=ct,D}}Ar.prototype.bytesPerElement=12,mi("StructArrayLayout2i4i12",Ar);class Kr extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(D,J,ve,Ee,Be,Ge){let ct=this.length;return this.resize(ct+1),this.emplace(ct,D,J,ve,Ee,Be,Ge)}emplace(D,J,ve,Ee,Be,Ge,ct){let At=4*D,Bt=8*D;return this.int16[At+0]=J,this.int16[At+1]=ve,this.uint8[Bt+4]=Ee,this.uint8[Bt+5]=Be,this.uint8[Bt+6]=Ge,this.uint8[Bt+7]=ct,D}}Kr.prototype.bytesPerElement=8,mi("StructArrayLayout2i4ub8",Kr);class na extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(D,J){let ve=this.length;return this.resize(ve+1),this.emplace(ve,D,J)}emplace(D,J,ve){let Ee=2*D;return this.float32[Ee+0]=J,this.float32[Ee+1]=ve,D}}na.prototype.bytesPerElement=8,mi("StructArrayLayout2f8",na);class Ve extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(D,J,ve,Ee,Be,Ge,ct,At,Bt,ar){let Sr=this.length;return this.resize(Sr+1),this.emplace(Sr,D,J,ve,Ee,Be,Ge,ct,At,Bt,ar)}emplace(D,J,ve,Ee,Be,Ge,ct,At,Bt,ar,Sr){let zr=10*D;return this.uint16[zr+0]=J,this.uint16[zr+1]=ve,this.uint16[zr+2]=Ee,this.uint16[zr+3]=Be,this.uint16[zr+4]=Ge,this.uint16[zr+5]=ct,this.uint16[zr+6]=At,this.uint16[zr+7]=Bt,this.uint16[zr+8]=ar,this.uint16[zr+9]=Sr,D}}Ve.prototype.bytesPerElement=20,mi("StructArrayLayout10ui20",Ve);class $e extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(D,J,ve,Ee,Be,Ge,ct,At,Bt,ar,Sr,zr){let Wr=this.length;return this.resize(Wr+1),this.emplace(Wr,D,J,ve,Ee,Be,Ge,ct,At,Bt,ar,Sr,zr)}emplace(D,J,ve,Ee,Be,Ge,ct,At,Bt,ar,Sr,zr,Wr){let ia=12*D;return this.int16[ia+0]=J,this.int16[ia+1]=ve,this.int16[ia+2]=Ee,this.int16[ia+3]=Be,this.uint16[ia+4]=Ge,this.uint16[ia+5]=ct,this.uint16[ia+6]=At,this.uint16[ia+7]=Bt,this.int16[ia+8]=ar,this.int16[ia+9]=Sr,this.int16[ia+10]=zr,this.int16[ia+11]=Wr,D}}$e.prototype.bytesPerElement=24,mi("StructArrayLayout4i4ui4i24",$e);class ot extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(D,J,ve){let Ee=this.length;return this.resize(Ee+1),this.emplace(Ee,D,J,ve)}emplace(D,J,ve,Ee){let Be=3*D;return this.float32[Be+0]=J,this.float32[Be+1]=ve,this.float32[Be+2]=Ee,D}}ot.prototype.bytesPerElement=12,mi("StructArrayLayout3f12",ot);class pt extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(D){let J=this.length;return this.resize(J+1),this.emplace(J,D)}emplace(D,J){return this.uint32[1*D+0]=J,D}}pt.prototype.bytesPerElement=4,mi("StructArrayLayout1ul4",pt);class Et extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(D,J,ve,Ee,Be,Ge,ct,At,Bt){let ar=this.length;return this.resize(ar+1),this.emplace(ar,D,J,ve,Ee,Be,Ge,ct,At,Bt)}emplace(D,J,ve,Ee,Be,Ge,ct,At,Bt,ar){let Sr=10*D,zr=5*D;return this.int16[Sr+0]=J,this.int16[Sr+1]=ve,this.int16[Sr+2]=Ee,this.int16[Sr+3]=Be,this.int16[Sr+4]=Ge,this.int16[Sr+5]=ct,this.uint32[zr+3]=At,this.uint16[Sr+8]=Bt,this.uint16[Sr+9]=ar,D}}Et.prototype.bytesPerElement=20,mi("StructArrayLayout6i1ul2ui20",Et);class bt extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(D,J,ve,Ee,Be,Ge){let ct=this.length;return this.resize(ct+1),this.emplace(ct,D,J,ve,Ee,Be,Ge)}emplace(D,J,ve,Ee,Be,Ge,ct){let At=6*D;return this.int16[At+0]=J,this.int16[At+1]=ve,this.int16[At+2]=Ee,this.int16[At+3]=Be,this.int16[At+4]=Ge,this.int16[At+5]=ct,D}}bt.prototype.bytesPerElement=12,mi("StructArrayLayout2i2i2i12",bt);class Rt extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(D,J,ve,Ee,Be){let Ge=this.length;return this.resize(Ge+1),this.emplace(Ge,D,J,ve,Ee,Be)}emplace(D,J,ve,Ee,Be,Ge){let ct=4*D,At=8*D;return this.float32[ct+0]=J,this.float32[ct+1]=ve,this.float32[ct+2]=Ee,this.int16[At+6]=Be,this.int16[At+7]=Ge,D}}Rt.prototype.bytesPerElement=16,mi("StructArrayLayout2f1f2i16",Rt);class lr extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(D,J,ve,Ee,Be,Ge){let ct=this.length;return this.resize(ct+1),this.emplace(ct,D,J,ve,Ee,Be,Ge)}emplace(D,J,ve,Ee,Be,Ge,ct){let At=16*D,Bt=4*D,ar=8*D;return this.uint8[At+0]=J,this.uint8[At+1]=ve,this.float32[Bt+1]=Ee,this.float32[Bt+2]=Be,this.int16[ar+6]=Ge,this.int16[ar+7]=ct,D}}lr.prototype.bytesPerElement=16,mi("StructArrayLayout2ub2f2i16",lr);class yr extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(D,J,ve){let Ee=this.length;return this.resize(Ee+1),this.emplace(Ee,D,J,ve)}emplace(D,J,ve,Ee){let Be=3*D;return this.uint16[Be+0]=J,this.uint16[Be+1]=ve,this.uint16[Be+2]=Ee,D}}yr.prototype.bytesPerElement=6,mi("StructArrayLayout3ui6",yr);class kr extends ze{_refreshViews(){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)}emplaceBack(D,J,ve,Ee,Be,Ge,ct,At,Bt,ar,Sr,zr,Wr,ia,fa,ja,Ka){let Wi=this.length;return this.resize(Wi+1),this.emplace(Wi,D,J,ve,Ee,Be,Ge,ct,At,Bt,ar,Sr,zr,Wr,ia,fa,ja,Ka)}emplace(D,J,ve,Ee,Be,Ge,ct,At,Bt,ar,Sr,zr,Wr,ia,fa,ja,Ka,Wi){let gi=24*D,qi=12*D,en=48*D;return this.int16[gi+0]=J,this.int16[gi+1]=ve,this.uint16[gi+2]=Ee,this.uint16[gi+3]=Be,this.uint32[qi+2]=Ge,this.uint32[qi+3]=ct,this.uint32[qi+4]=At,this.uint16[gi+10]=Bt,this.uint16[gi+11]=ar,this.uint16[gi+12]=Sr,this.float32[qi+7]=zr,this.float32[qi+8]=Wr,this.uint8[en+36]=ia,this.uint8[en+37]=fa,this.uint8[en+38]=ja,this.uint32[qi+10]=Ka,this.int16[gi+22]=Wi,D}}kr.prototype.bytesPerElement=48,mi("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",kr);class jr extends ze{_refreshViews(){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)}emplaceBack(D,J,ve,Ee,Be,Ge,ct,At,Bt,ar,Sr,zr,Wr,ia,fa,ja,Ka,Wi,gi,qi,en,qn,ko,ys,vo,zn,rs,jo){let Bo=this.length;return this.resize(Bo+1),this.emplace(Bo,D,J,ve,Ee,Be,Ge,ct,At,Bt,ar,Sr,zr,Wr,ia,fa,ja,Ka,Wi,gi,qi,en,qn,ko,ys,vo,zn,rs,jo)}emplace(D,J,ve,Ee,Be,Ge,ct,At,Bt,ar,Sr,zr,Wr,ia,fa,ja,Ka,Wi,gi,qi,en,qn,ko,ys,vo,zn,rs,jo,Bo){let bn=32*D,ls=16*D;return this.int16[bn+0]=J,this.int16[bn+1]=ve,this.int16[bn+2]=Ee,this.int16[bn+3]=Be,this.int16[bn+4]=Ge,this.int16[bn+5]=ct,this.int16[bn+6]=At,this.int16[bn+7]=Bt,this.uint16[bn+8]=ar,this.uint16[bn+9]=Sr,this.uint16[bn+10]=zr,this.uint16[bn+11]=Wr,this.uint16[bn+12]=ia,this.uint16[bn+13]=fa,this.uint16[bn+14]=ja,this.uint16[bn+15]=Ka,this.uint16[bn+16]=Wi,this.uint16[bn+17]=gi,this.uint16[bn+18]=qi,this.uint16[bn+19]=en,this.uint16[bn+20]=qn,this.uint16[bn+21]=ko,this.uint16[bn+22]=ys,this.uint32[ls+12]=vo,this.float32[ls+13]=zn,this.float32[ls+14]=rs,this.uint16[bn+30]=jo,this.uint16[bn+31]=Bo,D}}jr.prototype.bytesPerElement=64,mi("StructArrayLayout8i15ui1ul2f2ui64",jr);class Qr extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(D){let J=this.length;return this.resize(J+1),this.emplace(J,D)}emplace(D,J){return this.float32[1*D+0]=J,D}}Qr.prototype.bytesPerElement=4,mi("StructArrayLayout1f4",Qr);class ha extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(D,J,ve){let Ee=this.length;return this.resize(Ee+1),this.emplace(Ee,D,J,ve)}emplace(D,J,ve,Ee){let Be=3*D;return this.uint16[6*D+0]=J,this.float32[Be+1]=ve,this.float32[Be+2]=Ee,D}}ha.prototype.bytesPerElement=12,mi("StructArrayLayout1ui2f12",ha);class Aa extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(D,J,ve){let Ee=this.length;return this.resize(Ee+1),this.emplace(Ee,D,J,ve)}emplace(D,J,ve,Ee){let Be=4*D;return this.uint32[2*D+0]=J,this.uint16[Be+2]=ve,this.uint16[Be+3]=Ee,D}}Aa.prototype.bytesPerElement=8,mi("StructArrayLayout1ul2ui8",Aa);class Da extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(D,J){let ve=this.length;return this.resize(ve+1),this.emplace(ve,D,J)}emplace(D,J,ve){let Ee=2*D;return this.uint16[Ee+0]=J,this.uint16[Ee+1]=ve,D}}Da.prototype.bytesPerElement=4,mi("StructArrayLayout2ui4",Da);class ci extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(D){let J=this.length;return this.resize(J+1),this.emplace(J,D)}emplace(D,J){return this.uint16[1*D+0]=J,D}}ci.prototype.bytesPerElement=2,mi("StructArrayLayout1ui2",ci);class Vi extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(D,J,ve,Ee){let Be=this.length;return this.resize(Be+1),this.emplace(Be,D,J,ve,Ee)}emplace(D,J,ve,Ee,Be){let Ge=4*D;return this.float32[Ge+0]=J,this.float32[Ge+1]=ve,this.float32[Ge+2]=Ee,this.float32[Ge+3]=Be,D}}Vi.prototype.bytesPerElement=16,mi("StructArrayLayout4f16",Vi);class ji extends Me{get anchorPointX(){return this._structArray.int16[this._pos2+0]}get anchorPointY(){return this._structArray.int16[this._pos2+1]}get x1(){return this._structArray.int16[this._pos2+2]}get y1(){return this._structArray.int16[this._pos2+3]}get x2(){return this._structArray.int16[this._pos2+4]}get y2(){return this._structArray.int16[this._pos2+5]}get featureIndex(){return this._structArray.uint32[this._pos4+3]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+8]}get bucketIndex(){return this._structArray.uint16[this._pos2+9]}get anchorPoint(){return new n(this.anchorPointX,this.anchorPointY)}}ji.prototype.size=20;class on extends Et{get(D){return new ji(this,D)}}mi("CollisionBoxArray",on);class An extends Me{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get glyphStartIndex(){return this._structArray.uint16[this._pos2+2]}get numGlyphs(){return this._structArray.uint16[this._pos2+3]}get vertexStartIndex(){return this._structArray.uint32[this._pos4+2]}get lineStartIndex(){return this._structArray.uint32[this._pos4+3]}get lineLength(){return this._structArray.uint32[this._pos4+4]}get segment(){return this._structArray.uint16[this._pos2+10]}get lowerSize(){return this._structArray.uint16[this._pos2+11]}get upperSize(){return this._structArray.uint16[this._pos2+12]}get lineOffsetX(){return this._structArray.float32[this._pos4+7]}get lineOffsetY(){return this._structArray.float32[this._pos4+8]}get writingMode(){return this._structArray.uint8[this._pos1+36]}get placedOrientation(){return this._structArray.uint8[this._pos1+37]}set placedOrientation(D){this._structArray.uint8[this._pos1+37]=D}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(D){this._structArray.uint8[this._pos1+38]=D}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(D){this._structArray.uint32[this._pos4+10]=D}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}An.prototype.size=48;class Yn extends kr{get(D){return new An(this,D)}}mi("PlacedSymbolArray",Yn);class Nn extends Me{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get rightJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+2]}get centerJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+3]}get leftJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+4]}get verticalPlacedTextSymbolIndex(){return this._structArray.int16[this._pos2+5]}get placedIconSymbolIndex(){return this._structArray.int16[this._pos2+6]}get verticalPlacedIconSymbolIndex(){return this._structArray.int16[this._pos2+7]}get key(){return this._structArray.uint16[this._pos2+8]}get textBoxStartIndex(){return this._structArray.uint16[this._pos2+9]}get textBoxEndIndex(){return this._structArray.uint16[this._pos2+10]}get verticalTextBoxStartIndex(){return this._structArray.uint16[this._pos2+11]}get verticalTextBoxEndIndex(){return this._structArray.uint16[this._pos2+12]}get iconBoxStartIndex(){return this._structArray.uint16[this._pos2+13]}get iconBoxEndIndex(){return this._structArray.uint16[this._pos2+14]}get verticalIconBoxStartIndex(){return this._structArray.uint16[this._pos2+15]}get verticalIconBoxEndIndex(){return this._structArray.uint16[this._pos2+16]}get featureIndex(){return this._structArray.uint16[this._pos2+17]}get numHorizontalGlyphVertices(){return this._structArray.uint16[this._pos2+18]}get numVerticalGlyphVertices(){return this._structArray.uint16[this._pos2+19]}get numIconVertices(){return this._structArray.uint16[this._pos2+20]}get numVerticalIconVertices(){return this._structArray.uint16[this._pos2+21]}get useRuntimeCollisionCircles(){return this._structArray.uint16[this._pos2+22]}get crossTileID(){return this._structArray.uint32[this._pos4+12]}set crossTileID(D){this._structArray.uint32[this._pos4+12]=D}get textBoxScale(){return this._structArray.float32[this._pos4+13]}get collisionCircleDiameter(){return this._structArray.float32[this._pos4+14]}get textAnchorOffsetStartIndex(){return this._structArray.uint16[this._pos2+30]}get textAnchorOffsetEndIndex(){return this._structArray.uint16[this._pos2+31]}}Nn.prototype.size=64;class wo extends jr{get(D){return new Nn(this,D)}}mi("SymbolInstanceArray",wo);class os extends Qr{getoffsetX(D){return this.float32[1*D+0]}}mi("GlyphOffsetArray",os);class So extends $t{getx(D){return this.int16[3*D+0]}gety(D){return this.int16[3*D+1]}gettileUnitDistanceFromAnchor(D){return this.int16[3*D+2]}}mi("SymbolLineVertexArray",So);class Zo extends Me{get textAnchor(){return this._structArray.uint16[this._pos2+0]}get textOffset0(){return this._structArray.float32[this._pos4+1]}get textOffset1(){return this._structArray.float32[this._pos4+2]}}Zo.prototype.size=12;class hs extends ha{get(D){return new Zo(this,D)}}mi("TextAnchorOffsetArray",hs);class ul extends Me{get featureIndex(){return this._structArray.uint32[this._pos4+0]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+2]}get bucketIndex(){return this._structArray.uint16[this._pos2+3]}}ul.prototype.size=8;class tl extends Aa{get(D){return new ul(this,D)}}mi("FeatureIndexArray",tl);class Jo extends Ot{}class $o extends Ot{}class Il extends Ot{}class eu extends Ar{}class Ru extends Kr{}class vu extends na{}class Tl extends Ve{}class cu extends $e{}class uc extends ot{}class Vl extends pt{}class Gl extends bt{}class me extends lr{}class De extends yr{}class et extends Da{}let dt=ht([{name:"a_pos",components:2,type:"Int16"}],4),{members:yt}=dt;class Tt{constructor(D=[]){this.segments=D}prepareSegment(D,J,ve,Ee){let Be=this.segments[this.segments.length-1];return D>Tt.MAX_VERTEX_ARRAY_LENGTH&&m(`Max vertices per segment is ${Tt.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${D}`),(!Be||Be.vertexLength+D>Tt.MAX_VERTEX_ARRAY_LENGTH||Be.sortKey!==Ee)&&(Be={vertexOffset:J.length,primitiveOffset:ve.length,vertexLength:0,primitiveLength:0},Ee!==void 0&&(Be.sortKey=Ee),this.segments.push(Be)),Be}get(){return this.segments}destroy(){for(let D of this.segments)for(let J in D.vaos)D.vaos[J].destroy()}static simpleSegment(D,J,ve,Ee){return new Tt([{vertexOffset:D,primitiveOffset:J,vertexLength:ve,primitiveLength:Ee,vaos:{},sortKey:0}])}}function tr(W,D){return 256*(W=w(Math.floor(W),0,255))+w(Math.floor(D),0,255)}Tt.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,mi("SegmentVector",Tt);let zt=ht([{name:"a_pattern_from",components:4,type:"Uint16"},{name:"a_pattern_to",components:4,type:"Uint16"},{name:"a_pixel_ratio_from",components:1,type:"Uint16"},{name:"a_pixel_ratio_to",components:1,type:"Uint16"}]);var _r={exports:{}},Gr={exports:{}};Gr.exports=function(W,D){var J,ve,Ee,Be,Ge,ct,At,Bt;for(ve=W.length-(J=3&W.length),Ee=D,Ge=3432918353,ct=461845907,Bt=0;Bt>>16)*Ge&65535)<<16)&4294967295)<<15|At>>>17))*ct+(((At>>>16)*ct&65535)<<16)&4294967295)<<13|Ee>>>19))+((5*(Ee>>>16)&65535)<<16)&4294967295))+((58964+(Be>>>16)&65535)<<16);switch(At=0,J){case 3:At^=(255&W.charCodeAt(Bt+2))<<16;case 2:At^=(255&W.charCodeAt(Bt+1))<<8;case 1:Ee^=At=(65535&(At=(At=(65535&(At^=255&W.charCodeAt(Bt)))*Ge+(((At>>>16)*Ge&65535)<<16)&4294967295)<<15|At>>>17))*ct+(((At>>>16)*ct&65535)<<16)&4294967295}return Ee^=W.length,Ee=2246822507*(65535&(Ee^=Ee>>>16))+((2246822507*(Ee>>>16)&65535)<<16)&4294967295,Ee=3266489909*(65535&(Ee^=Ee>>>13))+((3266489909*(Ee>>>16)&65535)<<16)&4294967295,(Ee^=Ee>>>16)>>>0};var Xr=Gr.exports,xa={exports:{}};xa.exports=function(W,D){for(var J,ve=W.length,Ee=D^ve,Be=0;ve>=4;)J=1540483477*(65535&(J=255&W.charCodeAt(Be)|(255&W.charCodeAt(++Be))<<8|(255&W.charCodeAt(++Be))<<16|(255&W.charCodeAt(++Be))<<24))+((1540483477*(J>>>16)&65535)<<16),Ee=1540483477*(65535&Ee)+((1540483477*(Ee>>>16)&65535)<<16)^(J=1540483477*(65535&(J^=J>>>24))+((1540483477*(J>>>16)&65535)<<16)),ve-=4,++Be;switch(ve){case 3:Ee^=(255&W.charCodeAt(Be+2))<<16;case 2:Ee^=(255&W.charCodeAt(Be+1))<<8;case 1:Ee=1540483477*(65535&(Ee^=255&W.charCodeAt(Be)))+((1540483477*(Ee>>>16)&65535)<<16)}return Ee=1540483477*(65535&(Ee^=Ee>>>13))+((1540483477*(Ee>>>16)&65535)<<16),(Ee^=Ee>>>15)>>>0};var pa=Xr,Ja=xa.exports;_r.exports=pa,_r.exports.murmur3=pa,_r.exports.murmur2=Ja;var ti=r(_r.exports);class Sa{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(D,J,ve,Ee){this.ids.push(za(D)),this.positions.push(J,ve,Ee)}getPositions(D){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");let J=za(D),ve=0,Ee=this.ids.length-1;for(;ve>1;this.ids[Ge]>=J?Ee=Ge:ve=Ge+1}let Be=[];for(;this.ids[ve]===J;)Be.push({index:this.positions[3*ve],start:this.positions[3*ve+1],end:this.positions[3*ve+2]}),ve++;return Be}static serialize(D,J){let ve=new Float64Array(D.ids),Ee=new Uint32Array(D.positions);return Xa(ve,Ee,0,ve.length-1),J&&J.push(ve.buffer,Ee.buffer),{ids:ve,positions:Ee}}static deserialize(D){let J=new Sa;return J.ids=D.ids,J.positions=D.positions,J.indexed=!0,J}}function za(W){let D=+W;return!isNaN(D)&&D<=Number.MAX_SAFE_INTEGER?D:ti(String(W))}function Xa(W,D,J,ve){for(;J>1],Be=J-1,Ge=ve+1;for(;;){do Be++;while(W[Be]Ee);if(Be>=Ge)break;fi(W,Be,Ge),fi(D,3*Be,3*Ge),fi(D,3*Be+1,3*Ge+1),fi(D,3*Be+2,3*Ge+2)}Ge-J`u_${Ee}`),this.type=ve}setUniform(D,J,ve){D.set(ve.constantOr(this.value))}getBinding(D,J,ve){return this.type==="color"?new rn(D,J):new La(D,J)}}class ro{constructor(D,J){this.uniformNames=J.map(ve=>`u_${ve}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(D,J){this.pixelRatioFrom=J.pixelRatio,this.pixelRatioTo=D.pixelRatio,this.patternFrom=J.tlbr,this.patternTo=D.tlbr}setUniform(D,J,ve,Ee){let Be=Ee==="u_pattern_to"?this.patternTo:Ee==="u_pattern_from"?this.patternFrom:Ee==="u_pixel_ratio_to"?this.pixelRatioTo:Ee==="u_pixel_ratio_from"?this.pixelRatioFrom:null;Be&&D.set(Be)}getBinding(D,J,ve){return ve.substr(0,9)==="u_pattern"?new sn(D,J):new La(D,J)}}class Yo{constructor(D,J,ve,Ee){this.expression=D,this.type=ve,this.maxValue=0,this.paintVertexAttributes=J.map(Be=>({name:`a_${Be}`,type:"Float32",components:ve==="color"?2:1,offset:0})),this.paintVertexArray=new Ee}populatePaintArray(D,J,ve,Ee,Be){let Ge=this.paintVertexArray.length,ct=this.expression.evaluate(new Ds(0),J,{},Ee,[],Be);this.paintVertexArray.resize(D),this._setPaintValue(Ge,D,ct)}updatePaintArray(D,J,ve,Ee){let Be=this.expression.evaluate({zoom:0},ve,Ee);this._setPaintValue(D,J,Be)}_setPaintValue(D,J,ve){if(this.type==="color"){let Ee=In(ve);for(let Be=D;Be`u_${ct}_t`),this.type=ve,this.useIntegerZoom=Ee,this.zoom=Be,this.maxValue=0,this.paintVertexAttributes=J.map(ct=>({name:`a_${ct}`,type:"Float32",components:ve==="color"?4:2,offset:0})),this.paintVertexArray=new Ge}populatePaintArray(D,J,ve,Ee,Be){let Ge=this.expression.evaluate(new Ds(this.zoom),J,{},Ee,[],Be),ct=this.expression.evaluate(new Ds(this.zoom+1),J,{},Ee,[],Be),At=this.paintVertexArray.length;this.paintVertexArray.resize(D),this._setPaintValue(At,D,Ge,ct)}updatePaintArray(D,J,ve,Ee){let Be=this.expression.evaluate({zoom:this.zoom},ve,Ee),Ge=this.expression.evaluate({zoom:this.zoom+1},ve,Ee);this._setPaintValue(D,J,Be,Ge)}_setPaintValue(D,J,ve,Ee){if(this.type==="color"){let Be=In(ve),Ge=In(Ee);for(let ct=D;ct`#define HAS_UNIFORM_${Ee}`))}return D}getBinderAttributes(){let D=[];for(let J in this.binders){let ve=this.binders[J];if(ve instanceof Yo||ve instanceof oo)for(let Ee=0;Ee!0){this.programConfigurations={};for(let Ee of D)this.programConfigurations[Ee.id]=new cl(Ee,J,ve);this.needsUpload=!1,this._featureMap=new Sa,this._bufferOffset=0}populatePaintArrays(D,J,ve,Ee,Be,Ge){for(let ct in this.programConfigurations)this.programConfigurations[ct].populatePaintArrays(D,J,Ee,Be,Ge);J.id!==void 0&&this._featureMap.add(J.id,ve,this._bufferOffset,D),this._bufferOffset=D,this.needsUpload=!0}updatePaintArrays(D,J,ve,Ee){for(let Be of ve)this.needsUpload=this.programConfigurations[Be.id].updatePaintArrays(D,this._featureMap,J,Be,Ee)||this.needsUpload}get(D){return this.programConfigurations[D]}upload(D){if(this.needsUpload){for(let J in this.programConfigurations)this.programConfigurations[J].upload(D);this.needsUpload=!1}}destroy(){for(let D in this.programConfigurations)this.programConfigurations[D].destroy()}}function xl(W,D){return{"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-extrusion-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"]}[W]||[W.replace(`${D}-`,"").replace(/-/g,"_")]}function mn(W,D,J){let ve={color:{source:na,composite:Vi},number:{source:Qr,composite:na}},Ee=function(Be){return{"line-pattern":{source:Tl,composite:Tl},"fill-pattern":{source:Tl,composite:Tl},"fill-extrusion-pattern":{source:Tl,composite:Tl}}[Be]}(W);return Ee&&Ee[J]||ve[D][J]}mi("ConstantBinder",Kn),mi("CrossFadedConstantBinder",ro),mi("SourceExpressionBinder",Yo),mi("CrossFadedCompositeBinder",Wo),mi("CompositeExpressionBinder",oo),mi("ProgramConfiguration",cl,{omit:["_buffers"]}),mi("ProgramConfigurationSet",al);let po=8192,cs=Math.pow(2,14)-1,vs=-cs-1;function Al(W){let D=po/W.extent,J=W.loadGeometry();for(let ve=0;veGe.x+1||AtGe.y+1)&&m("Geometry exceeds allowed extent, reduce your vector tile buffer size")}}return J}function Hl(W,D){return{type:W.type,id:W.id,properties:W.properties,geometry:D?Al(W):[]}}function Su(W,D,J,ve,Ee){W.emplaceBack(2*D+(ve+1)/2,2*J+(Ee+1)/2)}class Rl{constructor(D){this.zoom=D.zoom,this.overscaling=D.overscaling,this.layers=D.layers,this.layerIds=this.layers.map(J=>J.id),this.index=D.index,this.hasPattern=!1,this.layoutVertexArray=new $o,this.indexArray=new De,this.segments=new Tt,this.programConfigurations=new al(D.layers,D.zoom),this.stateDependentLayerIds=this.layers.filter(J=>J.isStateDependent()).map(J=>J.id)}populate(D,J,ve){let Ee=this.layers[0],Be=[],Ge=null,ct=!1;Ee.type==="circle"&&(Ge=Ee.layout.get("circle-sort-key"),ct=!Ge.isConstant());for(let{feature:At,id:Bt,index:ar,sourceLayerIndex:Sr}of D){let zr=this.layers[0]._featureFilter.needGeometry,Wr=Hl(At,zr);if(!this.layers[0]._featureFilter.filter(new Ds(this.zoom),Wr,ve))continue;let ia=ct?Ge.evaluate(Wr,{},ve):void 0,fa={id:Bt,properties:At.properties,type:At.type,sourceLayerIndex:Sr,index:ar,geometry:zr?Wr.geometry:Al(At),patterns:{},sortKey:ia};Be.push(fa)}ct&&Be.sort((At,Bt)=>At.sortKey-Bt.sortKey);for(let At of Be){let{geometry:Bt,index:ar,sourceLayerIndex:Sr}=At,zr=D[ar].feature;this.addFeature(At,Bt,ar,ve),J.featureIndex.insert(zr,Bt,ar,Sr,this.index)}}update(D,J,ve){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(D,J,this.stateDependentLayers,ve)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(D){this.uploaded||(this.layoutVertexBuffer=D.createVertexBuffer(this.layoutVertexArray,yt),this.indexBuffer=D.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(D),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(D,J,ve,Ee){for(let Be of J)for(let Ge of Be){let ct=Ge.x,At=Ge.y;if(ct<0||ct>=po||At<0||At>=po)continue;let Bt=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,D.sortKey),ar=Bt.vertexLength;Su(this.layoutVertexArray,ct,At,-1,-1),Su(this.layoutVertexArray,ct,At,1,-1),Su(this.layoutVertexArray,ct,At,1,1),Su(this.layoutVertexArray,ct,At,-1,1),this.indexArray.emplaceBack(ar,ar+1,ar+2),this.indexArray.emplaceBack(ar,ar+3,ar+2),Bt.vertexLength+=4,Bt.primitiveLength+=2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,D,ve,{},Ee)}}function _c(W,D){for(let J=0;J1){if(oa(W,D))return!0;for(let ve=0;ve1?J:J.sub(D)._mult(Ee)._add(D))}function Ya(W,D){let J,ve,Ee,Be=!1;for(let Ge=0;GeD.y!=Ee.y>D.y&&D.x<(Ee.x-ve.x)*(D.y-ve.y)/(Ee.y-ve.y)+ve.x&&(Be=!Be)}return Be}function bi(W,D){let J=!1;for(let ve=0,Ee=W.length-1;veD.y!=Ge.y>D.y&&D.x<(Ge.x-Be.x)*(D.y-Be.y)/(Ge.y-Be.y)+Be.x&&(J=!J)}return J}function yi(W,D,J){let ve=J[0],Ee=J[2];if(W.xEe.x&&D.x>Ee.x||W.yEe.y&&D.y>Ee.y)return!1;let Be=R(W,D,J[0]);return Be!==R(W,D,J[1])||Be!==R(W,D,J[2])||Be!==R(W,D,J[3])}function si(W,D,J){let ve=D.paint.get(W).value;return ve.kind==="constant"?ve.value:J.programConfigurations.get(D.id).getMaxValue(W)}function gn(W){return Math.sqrt(W[0]*W[0]+W[1]*W[1])}function zi(W,D,J,ve,Ee){if(!D[0]&&!D[1])return W;let Be=n.convert(D)._mult(Ee);J==="viewport"&&Be._rotate(-ve);let Ge=[];for(let ct=0;ctUa(ja,fa))}(Bt,At),Wr=Sr?ar*ct:ar;for(let ia of Ee)for(let fa of ia){let ja=Sr?fa:Ua(fa,At),Ka=Wr,Wi=hn([],[fa.x,fa.y,0,1],At);if(this.paint.get("circle-pitch-scale")==="viewport"&&this.paint.get("circle-pitch-alignment")==="map"?Ka*=Wi[3]/Ge.cameraToCenterDistance:this.paint.get("circle-pitch-scale")==="map"&&this.paint.get("circle-pitch-alignment")==="viewport"&&(Ka*=Ge.cameraToCenterDistance/Wi[3]),it(zr,ja,Ka))return!0}return!1}}function Ua(W,D){let J=hn([],[W.x,W.y,0,1],D);return new n(J[0]/J[3],J[1]/J[3])}class Yi extends Rl{}let Ri;mi("HeatmapBucket",Yi,{omit:["layers"]});var Ti={get paint(){return Ri=Ri||new Fe({"heatmap-radius":new zo(re.paint_heatmap["heatmap-radius"]),"heatmap-weight":new zo(re.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new fo(re.paint_heatmap["heatmap-intensity"]),"heatmap-color":new Yu(re.paint_heatmap["heatmap-color"]),"heatmap-opacity":new fo(re.paint_heatmap["heatmap-opacity"])})}};function xi(W,{width:D,height:J},ve,Ee){if(Ee){if(Ee instanceof Uint8ClampedArray)Ee=new Uint8Array(Ee.buffer);else if(Ee.length!==D*J*ve)throw new RangeError(`mismatched image size. expected: ${Ee.length} but got: ${D*J*ve}`)}else Ee=new Uint8Array(D*J*ve);return W.width=D,W.height=J,W.data=Ee,W}function Xi(W,{width:D,height:J},ve){if(D===W.width&&J===W.height)return;let Ee=xi({},{width:D,height:J},ve);vn(W,Ee,{x:0,y:0},{x:0,y:0},{width:Math.min(W.width,D),height:Math.min(W.height,J)},ve),W.width=D,W.height=J,W.data=Ee.data}function vn(W,D,J,ve,Ee,Be){if(Ee.width===0||Ee.height===0)return D;if(Ee.width>W.width||Ee.height>W.height||J.x>W.width-Ee.width||J.y>W.height-Ee.height)throw new RangeError("out of range source coordinates for image copy");if(Ee.width>D.width||Ee.height>D.height||ve.x>D.width-Ee.width||ve.y>D.height-Ee.height)throw new RangeError("out of range destination coordinates for image copy");let Ge=W.data,ct=D.data;if(Ge===ct)throw new Error("srcData equals dstData, so image is already copied");for(let At=0;At{D[W.evaluationKey]=At;let Bt=W.expression.evaluate(D);Ee.data[Ge+ct+0]=Math.floor(255*Bt.r/Bt.a),Ee.data[Ge+ct+1]=Math.floor(255*Bt.g/Bt.a),Ee.data[Ge+ct+2]=Math.floor(255*Bt.b/Bt.a),Ee.data[Ge+ct+3]=Math.floor(255*Bt.a)};if(W.clips)for(let Ge=0,ct=0;Ge80*J){ct=1/0,At=1/0;let ar=-1/0,Sr=-1/0;for(let zr=J;zrar&&(ar=Wr),ia>Sr&&(Sr=ia)}Bt=Math.max(ar-ct,Sr-At),Bt=Bt!==0?32767/Bt:0}return tu(Be,Ge,J,ct,At,Bt,0),Ge}function Sl(W,D,J,ve,Ee){let Be;if(Ee===function(Ge,ct,At,Bt){let ar=0;for(let Sr=ct,zr=At-Bt;Sr0)for(let Ge=D;Ge=D;Ge-=ve)Be=pr(Ge/ve|0,W[Ge],W[Ge+1],Be);return Be&&ke(Be,Be.next)&&(mt(Be),Be=Be.next),Be}function kl(W,D){if(!W)return W;D||(D=W);let J,ve=W;do if(J=!1,ve.steiner||!ke(ve,ve.next)&&je(ve.prev,ve,ve.next)!==0)ve=ve.next;else{if(mt(ve),ve=D=ve.prev,ve===ve.next)break;J=!0}while(J||ve!==D);return D}function tu(W,D,J,ve,Ee,Be,Ge){if(!W)return;!Ge&&Be&&function(At,Bt,ar,Sr){let zr=At;do zr.z===0&&(zr.z=K(zr.x,zr.y,Bt,ar,Sr)),zr.prevZ=zr.prev,zr.nextZ=zr.next,zr=zr.next;while(zr!==At);zr.prevZ.nextZ=null,zr.prevZ=null,function(Wr){let ia,fa=1;do{let ja,Ka=Wr;Wr=null;let Wi=null;for(ia=0;Ka;){ia++;let gi=Ka,qi=0;for(let qn=0;qn0||en>0&&gi;)qi!==0&&(en===0||!gi||Ka.z<=gi.z)?(ja=Ka,Ka=Ka.nextZ,qi--):(ja=gi,gi=gi.nextZ,en--),Wi?Wi.nextZ=ja:Wr=ja,ja.prevZ=Wi,Wi=ja;Ka=gi}Wi.nextZ=null,fa*=2}while(ia>1)}(zr)}(W,ve,Ee,Be);let ct=W;for(;W.prev!==W.next;){let At=W.prev,Bt=W.next;if(Be?pl(W,ve,Ee,Be):Vs(W))D.push(At.i,W.i,Bt.i),mt(W),W=Bt.next,ct=Bt.next;else if((W=Bt)===ct){Ge?Ge===1?tu(W=wl(kl(W),D),D,J,ve,Ee,Be,2):Ge===2&&Zn(W,D,J,ve,Ee,Be):tu(kl(W),D,J,ve,Ee,Be,1);break}}}function Vs(W){let D=W.prev,J=W,ve=W.next;if(je(D,J,ve)>=0)return!1;let Ee=D.x,Be=J.x,Ge=ve.x,ct=D.y,At=J.y,Bt=ve.y,ar=EeBe?Ee>Ge?Ee:Ge:Be>Ge?Be:Ge,Wr=ct>At?ct>Bt?ct:Bt:At>Bt?At:Bt,ia=ve.next;for(;ia!==D;){if(ia.x>=ar&&ia.x<=zr&&ia.y>=Sr&&ia.y<=Wr&&te(Ee,ct,Be,At,Ge,Bt,ia.x,ia.y)&&je(ia.prev,ia,ia.next)>=0)return!1;ia=ia.next}return!0}function pl(W,D,J,ve){let Ee=W.prev,Be=W,Ge=W.next;if(je(Ee,Be,Ge)>=0)return!1;let ct=Ee.x,At=Be.x,Bt=Ge.x,ar=Ee.y,Sr=Be.y,zr=Ge.y,Wr=ctAt?ct>Bt?ct:Bt:At>Bt?At:Bt,ja=ar>Sr?ar>zr?ar:zr:Sr>zr?Sr:zr,Ka=K(Wr,ia,D,J,ve),Wi=K(fa,ja,D,J,ve),gi=W.prevZ,qi=W.nextZ;for(;gi&&gi.z>=Ka&&qi&&qi.z<=Wi;){if(gi.x>=Wr&&gi.x<=fa&&gi.y>=ia&&gi.y<=ja&&gi!==Ee&&gi!==Ge&&te(ct,ar,At,Sr,Bt,zr,gi.x,gi.y)&&je(gi.prev,gi,gi.next)>=0||(gi=gi.prevZ,qi.x>=Wr&&qi.x<=fa&&qi.y>=ia&&qi.y<=ja&&qi!==Ee&&qi!==Ge&&te(ct,ar,At,Sr,Bt,zr,qi.x,qi.y)&&je(qi.prev,qi,qi.next)>=0))return!1;qi=qi.nextZ}for(;gi&&gi.z>=Ka;){if(gi.x>=Wr&&gi.x<=fa&&gi.y>=ia&&gi.y<=ja&&gi!==Ee&&gi!==Ge&&te(ct,ar,At,Sr,Bt,zr,gi.x,gi.y)&&je(gi.prev,gi,gi.next)>=0)return!1;gi=gi.prevZ}for(;qi&&qi.z<=Wi;){if(qi.x>=Wr&&qi.x<=fa&&qi.y>=ia&&qi.y<=ja&&qi!==Ee&&qi!==Ge&&te(ct,ar,At,Sr,Bt,zr,qi.x,qi.y)&&je(qi.prev,qi,qi.next)>=0)return!1;qi=qi.nextZ}return!0}function wl(W,D){let J=W;do{let ve=J.prev,Ee=J.next.next;!ke(ve,Ee)&&Qe(ve,J,J.next,Ee)&&wr(ve,Ee)&&wr(Ee,ve)&&(D.push(ve.i,J.i,Ee.i),mt(J),mt(J.next),J=W=Ee),J=J.next}while(J!==W);return kl(J)}function Zn(W,D,J,ve,Ee,Be){let Ge=W;do{let ct=Ge.next.next;for(;ct!==Ge.prev;){if(Ge.i!==ct.i&&ye(Ge,ct)){let At=Nr(Ge,ct);return Ge=kl(Ge,Ge.next),At=kl(At,At.next),tu(Ge,D,J,ve,Ee,Be,0),void tu(At,D,J,ve,Ee,Be,0)}ct=ct.next}Ge=Ge.next}while(Ge!==W)}function Cl(W,D){return W.x-D.x}function Po(W,D){let J=function(Ee,Be){let Ge=Be,ct=Ee.x,At=Ee.y,Bt,ar=-1/0;do{if(At<=Ge.y&&At>=Ge.next.y&&Ge.next.y!==Ge.y){let fa=Ge.x+(At-Ge.y)*(Ge.next.x-Ge.x)/(Ge.next.y-Ge.y);if(fa<=ct&&fa>ar&&(ar=fa,Bt=Ge.x=Ge.x&&Ge.x>=zr&&ct!==Ge.x&&te(AtBt.x||Ge.x===Bt.x&&ge(Bt,Ge)))&&(Bt=Ge,ia=fa)}Ge=Ge.next}while(Ge!==Sr);return Bt}(W,D);if(!J)return D;let ve=Nr(J,W);return kl(ve,ve.next),kl(J,J.next)}function ge(W,D){return je(W.prev,W,D.prev)<0&&je(D.next,W,W.next)<0}function K(W,D,J,ve,Ee){return(W=1431655765&((W=858993459&((W=252645135&((W=16711935&((W=(W-J)*Ee|0)|W<<8))|W<<4))|W<<2))|W<<1))|(D=1431655765&((D=858993459&((D=252645135&((D=16711935&((D=(D-ve)*Ee|0)|D<<8))|D<<4))|D<<2))|D<<1))<<1}function xe(W){let D=W,J=W;do(D.x=(W-Ge)*(Be-ct)&&(W-Ge)*(ve-ct)>=(J-Ge)*(D-ct)&&(J-Ge)*(Be-ct)>=(Ee-Ge)*(ve-ct)}function ye(W,D){return W.next.i!==D.i&&W.prev.i!==D.i&&!function(J,ve){let Ee=J;do{if(Ee.i!==J.i&&Ee.next.i!==J.i&&Ee.i!==ve.i&&Ee.next.i!==ve.i&&Qe(Ee,Ee.next,J,ve))return!0;Ee=Ee.next}while(Ee!==J);return!1}(W,D)&&(wr(W,D)&&wr(D,W)&&function(J,ve){let Ee=J,Be=!1,Ge=(J.x+ve.x)/2,ct=(J.y+ve.y)/2;do Ee.y>ct!=Ee.next.y>ct&&Ee.next.y!==Ee.y&&Ge<(Ee.next.x-Ee.x)*(ct-Ee.y)/(Ee.next.y-Ee.y)+Ee.x&&(Be=!Be),Ee=Ee.next;while(Ee!==J);return Be}(W,D)&&(je(W.prev,W,D.prev)||je(W,D.prev,D))||ke(W,D)&&je(W.prev,W,W.next)>0&&je(D.prev,D,D.next)>0)}function je(W,D,J){return(D.y-W.y)*(J.x-D.x)-(D.x-W.x)*(J.y-D.y)}function ke(W,D){return W.x===D.x&&W.y===D.y}function Qe(W,D,J,ve){let Ee=qt(je(W,D,J)),Be=qt(je(W,D,ve)),Ge=qt(je(J,ve,W)),ct=qt(je(J,ve,D));return Ee!==Be&&Ge!==ct||!(Ee!==0||!vt(W,J,D))||!(Be!==0||!vt(W,ve,D))||!(Ge!==0||!vt(J,W,ve))||!(ct!==0||!vt(J,D,ve))}function vt(W,D,J){return D.x<=Math.max(W.x,J.x)&&D.x>=Math.min(W.x,J.x)&&D.y<=Math.max(W.y,J.y)&&D.y>=Math.min(W.y,J.y)}function qt(W){return W>0?1:W<0?-1:0}function wr(W,D){return je(W.prev,W,W.next)<0?je(W,D,W.next)>=0&&je(W,W.prev,D)>=0:je(W,D,W.prev)<0||je(W,W.next,D)<0}function Nr(W,D){let J=St(W.i,W.x,W.y),ve=St(D.i,D.x,D.y),Ee=W.next,Be=D.prev;return W.next=D,D.prev=W,J.next=Ee,Ee.prev=J,ve.next=J,J.prev=ve,Be.next=ve,ve.prev=Be,ve}function pr(W,D,J,ve){let Ee=St(W,D,J);return ve?(Ee.next=ve.next,Ee.prev=ve,ve.next.prev=Ee,ve.next=Ee):(Ee.prev=Ee,Ee.next=Ee),Ee}function mt(W){W.next.prev=W.prev,W.prev.next=W.next,W.prevZ&&(W.prevZ.nextZ=W.nextZ),W.nextZ&&(W.nextZ.prevZ=W.prevZ)}function St(W,D,J){return{i:W,x:D,y:J,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function Ft(W,D,J){let ve=J.patternDependencies,Ee=!1;for(let Be of D){let Ge=Be.paint.get(`${W}-pattern`);Ge.isConstant()||(Ee=!0);let ct=Ge.constantOr(null);ct&&(Ee=!0,ve[ct.to]=!0,ve[ct.from]=!0)}return Ee}function rr(W,D,J,ve,Ee){let Be=Ee.patternDependencies;for(let Ge of D){let ct=Ge.paint.get(`${W}-pattern`).value;if(ct.kind!=="constant"){let At=ct.evaluate({zoom:ve-1},J,{},Ee.availableImages),Bt=ct.evaluate({zoom:ve},J,{},Ee.availableImages),ar=ct.evaluate({zoom:ve+1},J,{},Ee.availableImages);At=At&&At.name?At.name:At,Bt=Bt&&Bt.name?Bt.name:Bt,ar=ar&&ar.name?ar.name:ar,Be[At]=!0,Be[Bt]=!0,Be[ar]=!0,J.patterns[Ge.id]={min:At,mid:Bt,max:ar}}}return J}class hr{constructor(D){this.zoom=D.zoom,this.overscaling=D.overscaling,this.layers=D.layers,this.layerIds=this.layers.map(J=>J.id),this.index=D.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new Il,this.indexArray=new De,this.indexArray2=new et,this.programConfigurations=new al(D.layers,D.zoom),this.segments=new Tt,this.segments2=new Tt,this.stateDependentLayerIds=this.layers.filter(J=>J.isStateDependent()).map(J=>J.id)}populate(D,J,ve){this.hasPattern=Ft("fill",this.layers,J);let Ee=this.layers[0].layout.get("fill-sort-key"),Be=!Ee.isConstant(),Ge=[];for(let{feature:ct,id:At,index:Bt,sourceLayerIndex:ar}of D){let Sr=this.layers[0]._featureFilter.needGeometry,zr=Hl(ct,Sr);if(!this.layers[0]._featureFilter.filter(new Ds(this.zoom),zr,ve))continue;let Wr=Be?Ee.evaluate(zr,{},ve,J.availableImages):void 0,ia={id:At,properties:ct.properties,type:ct.type,sourceLayerIndex:ar,index:Bt,geometry:Sr?zr.geometry:Al(ct),patterns:{},sortKey:Wr};Ge.push(ia)}Be&&Ge.sort((ct,At)=>ct.sortKey-At.sortKey);for(let ct of Ge){let{geometry:At,index:Bt,sourceLayerIndex:ar}=ct;if(this.hasPattern){let Sr=rr("fill",this.layers,ct,this.zoom,J);this.patternFeatures.push(Sr)}else this.addFeature(ct,At,Bt,ve,{});J.featureIndex.insert(D[Bt].feature,At,Bt,ar,this.index)}}update(D,J,ve){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(D,J,this.stateDependentLayers,ve)}addFeatures(D,J,ve){for(let Ee of this.patternFeatures)this.addFeature(Ee,Ee.geometry,Ee.index,J,ve)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(D){this.uploaded||(this.layoutVertexBuffer=D.createVertexBuffer(this.layoutVertexArray,Wl),this.indexBuffer=D.createIndexBuffer(this.indexArray),this.indexBuffer2=D.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(D),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())}addFeature(D,J,ve,Ee,Be){for(let Ge of Tc(J,500)){let ct=0;for(let Wr of Ge)ct+=Wr.length;let At=this.segments.prepareSegment(ct,this.layoutVertexArray,this.indexArray),Bt=At.vertexLength,ar=[],Sr=[];for(let Wr of Ge){if(Wr.length===0)continue;Wr!==Ge[0]&&Sr.push(ar.length/2);let ia=this.segments2.prepareSegment(Wr.length,this.layoutVertexArray,this.indexArray2),fa=ia.vertexLength;this.layoutVertexArray.emplaceBack(Wr[0].x,Wr[0].y),this.indexArray2.emplaceBack(fa+Wr.length-1,fa),ar.push(Wr[0].x),ar.push(Wr[0].y);for(let ja=1;ja>3}if(Ee--,ve===1||ve===2)Be+=W.readSVarint(),Ge+=W.readSVarint(),ve===1&&(D&&ct.push(D),D=[]),D.push(new ga(Be,Ge));else{if(ve!==7)throw new Error("unknown command "+ve);D&&D.push(D[0].clone())}}return D&&ct.push(D),ct},Ga.prototype.bbox=function(){var W=this._pbf;W.pos=this._geometry;for(var D=W.readVarint()+W.pos,J=1,ve=0,Ee=0,Be=0,Ge=1/0,ct=-1/0,At=1/0,Bt=-1/0;W.pos>3}if(ve--,J===1||J===2)(Ee+=W.readSVarint())ct&&(ct=Ee),(Be+=W.readSVarint())Bt&&(Bt=Be);else if(J!==7)throw new Error("unknown command "+J)}return[Ge,At,ct,Bt]},Ga.prototype.toGeoJSON=function(W,D,J){var ve,Ee,Be=this.extent*Math.pow(2,J),Ge=this.extent*W,ct=this.extent*D,At=this.loadGeometry(),Bt=Ga.types[this.type];function ar(Wr){for(var ia=0;ia>3;Ee=Ge===1?ve.readString():Ge===2?ve.readFloat():Ge===3?ve.readDouble():Ge===4?ve.readVarint64():Ge===5?ve.readVarint():Ge===6?ve.readSVarint():Ge===7?ve.readBoolean():null}return Ee}(J))}_i.prototype.feature=function(W){if(W<0||W>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[W];var D=this._pbf.readVarint()+this._pbf.pos;return new Fi(this._pbf,D,this.extent,this._keys,this._values)};var Ui=ui;function cn(W,D,J){if(W===3){var ve=new Ui(J,J.readVarint()+J.pos);ve.length&&(D[ve.name]=ve)}}Jr.VectorTile=function(W,D){this.layers=W.readFields(cn,{},D)},Jr.VectorTileFeature=vi,Jr.VectorTileLayer=ui;let yo=Jr.VectorTileFeature.types,Uo=Math.pow(2,13);function Is(W,D,J,ve,Ee,Be,Ge,ct){W.emplaceBack(D,J,2*Math.floor(ve*Uo)+Ge,Ee*Uo*2,Be*Uo*2,Math.round(ct))}class Fo{constructor(D){this.zoom=D.zoom,this.overscaling=D.overscaling,this.layers=D.layers,this.layerIds=this.layers.map(J=>J.id),this.index=D.index,this.hasPattern=!1,this.layoutVertexArray=new eu,this.centroidVertexArray=new Jo,this.indexArray=new De,this.programConfigurations=new al(D.layers,D.zoom),this.segments=new Tt,this.stateDependentLayerIds=this.layers.filter(J=>J.isStateDependent()).map(J=>J.id)}populate(D,J,ve){this.features=[],this.hasPattern=Ft("fill-extrusion",this.layers,J);for(let{feature:Ee,id:Be,index:Ge,sourceLayerIndex:ct}of D){let At=this.layers[0]._featureFilter.needGeometry,Bt=Hl(Ee,At);if(!this.layers[0]._featureFilter.filter(new Ds(this.zoom),Bt,ve))continue;let ar={id:Be,sourceLayerIndex:ct,index:Ge,geometry:At?Bt.geometry:Al(Ee),properties:Ee.properties,type:Ee.type,patterns:{}};this.hasPattern?this.features.push(rr("fill-extrusion",this.layers,ar,this.zoom,J)):this.addFeature(ar,ar.geometry,Ge,ve,{}),J.featureIndex.insert(Ee,ar.geometry,Ge,ct,this.index,!0)}}addFeatures(D,J,ve){for(let Ee of this.features){let{geometry:Be}=Ee;this.addFeature(Ee,Be,Ee.index,J,ve)}}update(D,J,ve){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(D,J,this.stateDependentLayers,ve)}isEmpty(){return this.layoutVertexArray.length===0&&this.centroidVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(D){this.uploaded||(this.layoutVertexBuffer=D.createVertexBuffer(this.layoutVertexArray,Dr),this.centroidVertexBuffer=D.createVertexBuffer(this.centroidVertexArray,Vt.members,!0),this.indexBuffer=D.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(D),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(D,J,ve,Ee,Be){for(let Ge of Tc(J,500)){let ct={x:0,y:0,vertexCount:0},At=0;for(let ia of Ge)At+=ia.length;let Bt=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray);for(let ia of Ge){if(ia.length===0||Ks(ia))continue;let fa=0;for(let ja=0;ja=1){let Wi=ia[ja-1];if(!Es(Ka,Wi)){Bt.vertexLength+4>Tt.MAX_VERTEX_ARRAY_LENGTH&&(Bt=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));let gi=Ka.sub(Wi)._perp()._unit(),qi=Wi.dist(Ka);fa+qi>32768&&(fa=0),Is(this.layoutVertexArray,Ka.x,Ka.y,gi.x,gi.y,0,0,fa),Is(this.layoutVertexArray,Ka.x,Ka.y,gi.x,gi.y,0,1,fa),ct.x+=2*Ka.x,ct.y+=2*Ka.y,ct.vertexCount+=2,fa+=qi,Is(this.layoutVertexArray,Wi.x,Wi.y,gi.x,gi.y,0,0,fa),Is(this.layoutVertexArray,Wi.x,Wi.y,gi.x,gi.y,0,1,fa),ct.x+=2*Wi.x,ct.y+=2*Wi.y,ct.vertexCount+=2;let en=Bt.vertexLength;this.indexArray.emplaceBack(en,en+2,en+1),this.indexArray.emplaceBack(en+1,en+2,en+3),Bt.vertexLength+=4,Bt.primitiveLength+=2}}}}if(Bt.vertexLength+At>Tt.MAX_VERTEX_ARRAY_LENGTH&&(Bt=this.segments.prepareSegment(At,this.layoutVertexArray,this.indexArray)),yo[D.type]!=="Polygon")continue;let ar=[],Sr=[],zr=Bt.vertexLength;for(let ia of Ge)if(ia.length!==0){ia!==Ge[0]&&Sr.push(ar.length/2);for(let fa=0;fapo)||W.y===D.y&&(W.y<0||W.y>po)}function Ks(W){return W.every(D=>D.x<0)||W.every(D=>D.x>po)||W.every(D=>D.y<0)||W.every(D=>D.y>po)}let mu;mi("FillExtrusionBucket",Fo,{omit:["layers","features"]});var Ep={get paint(){return mu=mu||new Fe({"fill-extrusion-opacity":new fo(re["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new zo(re["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new fo(re["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new fo(re["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new Dc(re["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new zo(re["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new zo(re["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new fo(re["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class kp extends ie{constructor(D){super(D,Ep)}createBucket(D){return new Fo(D)}queryRadius(){return gn(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature(D,J,ve,Ee,Be,Ge,ct,At){let Bt=zi(D,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),Ge.angle,ct),ar=this.paint.get("fill-extrusion-height").evaluate(J,ve),Sr=this.paint.get("fill-extrusion-base").evaluate(J,ve),zr=function(ia,fa,ja,Ka){let Wi=[];for(let gi of ia){let qi=[gi.x,gi.y,0,1];hn(qi,qi,fa),Wi.push(new n(qi[0]/qi[3],qi[1]/qi[3]))}return Wi}(Bt,At),Wr=function(ia,fa,ja,Ka){let Wi=[],gi=[],qi=Ka[8]*fa,en=Ka[9]*fa,qn=Ka[10]*fa,ko=Ka[11]*fa,ys=Ka[8]*ja,vo=Ka[9]*ja,zn=Ka[10]*ja,rs=Ka[11]*ja;for(let jo of ia){let Bo=[],bn=[];for(let ls of jo){let No=ls.x,Ps=ls.y,Ku=Ka[0]*No+Ka[4]*Ps+Ka[12],Uu=Ka[1]*No+Ka[5]*Ps+Ka[13],th=Ka[2]*No+Ka[6]*Ps+Ka[14],Hp=Ka[3]*No+Ka[7]*Ps+Ka[15],Th=th+qn,rh=Hp+ko,Jh=Ku+ys,$h=Uu+vo,Qh=th+zn,ff=Hp+rs,ah=new n((Ku+qi)/rh,(Uu+en)/rh);ah.z=Th/rh,Bo.push(ah);let Fh=new n(Jh/ff,$h/ff);Fh.z=Qh/ff,bn.push(Fh)}Wi.push(Bo),gi.push(bn)}return[Wi,gi]}(Ee,Sr,ar,At);return function(ia,fa,ja){let Ka=1/0;Zt(ja,fa)&&(Ka=qp(ja,fa[0]));for(let Wi=0;WiJ.id),this.index=D.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach(J=>{this.gradients[J.id]={}}),this.layoutVertexArray=new Ru,this.layoutVertexArray2=new vu,this.indexArray=new De,this.programConfigurations=new al(D.layers,D.zoom),this.segments=new Tt,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(J=>J.isStateDependent()).map(J=>J.id)}populate(D,J,ve){this.hasPattern=Ft("line",this.layers,J);let Ee=this.layers[0].layout.get("line-sort-key"),Be=!Ee.isConstant(),Ge=[];for(let{feature:ct,id:At,index:Bt,sourceLayerIndex:ar}of D){let Sr=this.layers[0]._featureFilter.needGeometry,zr=Hl(ct,Sr);if(!this.layers[0]._featureFilter.filter(new Ds(this.zoom),zr,ve))continue;let Wr=Be?Ee.evaluate(zr,{},ve):void 0,ia={id:At,properties:ct.properties,type:ct.type,sourceLayerIndex:ar,index:Bt,geometry:Sr?zr.geometry:Al(ct),patterns:{},sortKey:Wr};Ge.push(ia)}Be&&Ge.sort((ct,At)=>ct.sortKey-At.sortKey);for(let ct of Ge){let{geometry:At,index:Bt,sourceLayerIndex:ar}=ct;if(this.hasPattern){let Sr=rr("line",this.layers,ct,this.zoom,J);this.patternFeatures.push(Sr)}else this.addFeature(ct,At,Bt,ve,{});J.featureIndex.insert(D[Bt].feature,At,Bt,ar,this.index)}}update(D,J,ve){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(D,J,this.stateDependentLayers,ve)}addFeatures(D,J,ve){for(let Ee of this.patternFeatures)this.addFeature(Ee,Ee.geometry,Ee.index,J,ve)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(D){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=D.createVertexBuffer(this.layoutVertexArray2,td)),this.layoutVertexBuffer=D.createVertexBuffer(this.layoutVertexArray,ed),this.indexBuffer=D.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(D),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(D){if(D.properties&&Object.prototype.hasOwnProperty.call(D.properties,"mapbox_clip_start")&&Object.prototype.hasOwnProperty.call(D.properties,"mapbox_clip_end"))return{start:+D.properties.mapbox_clip_start,end:+D.properties.mapbox_clip_end}}addFeature(D,J,ve,Ee,Be){let Ge=this.layers[0].layout,ct=Ge.get("line-join").evaluate(D,{}),At=Ge.get("line-cap"),Bt=Ge.get("line-miter-limit"),ar=Ge.get("line-round-limit");this.lineClips=this.lineFeatureClips(D);for(let Sr of J)this.addLine(Sr,D,ct,At,Bt,ar);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,D,ve,Be,Ee)}addLine(D,J,ve,Ee,Be,Ge){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(let Ka=0;Ka=2&&D[At-1].equals(D[At-2]);)At--;let Bt=0;for(;Bt0;if(ko&&Ka>Bt){let rs=zr.dist(Wr);if(rs>2*ar){let jo=zr.sub(zr.sub(Wr)._mult(ar/rs)._round());this.updateDistance(Wr,jo),this.addCurrentVertex(jo,fa,0,0,Sr),Wr=jo}}let vo=Wr&&ia,zn=vo?ve:ct?"butt":Ee;if(vo&&zn==="round"&&(enBe&&(zn="bevel"),zn==="bevel"&&(en>2&&(zn="flipbevel"),en100)Wi=ja.mult(-1);else{let rs=en*fa.add(ja).mag()/fa.sub(ja).mag();Wi._perp()._mult(rs*(ys?-1:1))}this.addCurrentVertex(zr,Wi,0,0,Sr),this.addCurrentVertex(zr,Wi.mult(-1),0,0,Sr)}else if(zn==="bevel"||zn==="fakeround"){let rs=-Math.sqrt(en*en-1),jo=ys?rs:0,Bo=ys?0:rs;if(Wr&&this.addCurrentVertex(zr,fa,jo,Bo,Sr),zn==="fakeround"){let bn=Math.round(180*qn/Math.PI/20);for(let ls=1;ls2*ar){let jo=zr.add(ia.sub(zr)._mult(ar/rs)._round());this.updateDistance(zr,jo),this.addCurrentVertex(jo,ja,0,0,Sr),zr=jo}}}}addCurrentVertex(D,J,ve,Ee,Be,Ge=!1){let ct=J.y*Ee-J.x,At=-J.y-J.x*Ee;this.addHalfVertex(D,J.x+J.y*ve,J.y-J.x*ve,Ge,!1,ve,Be),this.addHalfVertex(D,ct,At,Ge,!0,-Ee,Be),this.distance>Cp/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(D,J,ve,Ee,Be,Ge))}addHalfVertex({x:D,y:J},ve,Ee,Be,Ge,ct,At){let Bt=.5*(this.lineClips?this.scaledDistance*(Cp-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((D<<1)+(Be?1:0),(J<<1)+(Ge?1:0),Math.round(63*ve)+128,Math.round(63*Ee)+128,1+(ct===0?0:ct<0?-1:1)|(63&Bt)<<2,Bt>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);let ar=At.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,ar),At.primitiveLength++),Ge?this.e2=ar:this.e1=ar}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(D,J){this.distance+=D.dist(J),this.updateScaledDistance()}}let Lp,Cv;mi("LineBucket",Vp,{omit:["layers","patternFeatures"]});var Vd={get paint(){return Cv=Cv||new Fe({"line-opacity":new zo(re.paint_line["line-opacity"]),"line-color":new zo(re.paint_line["line-color"]),"line-translate":new fo(re.paint_line["line-translate"]),"line-translate-anchor":new fo(re.paint_line["line-translate-anchor"]),"line-width":new zo(re.paint_line["line-width"]),"line-gap-width":new zo(re.paint_line["line-gap-width"]),"line-offset":new zo(re.paint_line["line-offset"]),"line-blur":new zo(re.paint_line["line-blur"]),"line-dasharray":new lc(re.paint_line["line-dasharray"]),"line-pattern":new Dc(re.paint_line["line-pattern"]),"line-gradient":new Yu(re.paint_line["line-gradient"])})},get layout(){return Lp=Lp||new Fe({"line-cap":new fo(re.layout_line["line-cap"]),"line-join":new zo(re.layout_line["line-join"]),"line-miter-limit":new fo(re.layout_line["line-miter-limit"]),"line-round-limit":new fo(re.layout_line["line-round-limit"]),"line-sort-key":new zo(re.layout_line["line-sort-key"])})}};class Gf extends zo{possiblyEvaluate(D,J){return J=new Ds(Math.floor(J.zoom),{now:J.now,fadeDuration:J.fadeDuration,zoomHistory:J.zoomHistory,transition:J.transition}),super.possiblyEvaluate(D,J)}evaluate(D,J,ve,Ee){return J=M({},J,{zoom:Math.floor(J.zoom)}),super.evaluate(D,J,ve,Ee)}}let Gd;class Lv extends ie{constructor(D){super(D,Vd),this.gradientVersion=0,Gd||(Gd=new Gf(Vd.paint.properties["line-width"].specification),Gd.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(D){if(D==="line-gradient"){let J=this.gradientExpression();this.stepInterpolant=!!function(ve){return ve._styleExpression!==void 0}(J)&&J._styleExpression.expression instanceof _a,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(D,J){super.recalculate(D,J),this.paint._values["line-floorwidth"]=Gd.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,D)}createBucket(D){return new Vp(D)}queryRadius(D){let J=D,ve=ph(si("line-width",this,J),si("line-gap-width",this,J)),Ee=si("line-offset",this,J);return ve/2+Math.abs(Ee)+gn(this.paint.get("line-translate"))}queryIntersectsFeature(D,J,ve,Ee,Be,Ge,ct){let At=zi(D,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),Ge.angle,ct),Bt=ct/2*ph(this.paint.get("line-width").evaluate(J,ve),this.paint.get("line-gap-width").evaluate(J,ve)),ar=this.paint.get("line-offset").evaluate(J,ve);return ar&&(Ee=function(Sr,zr){let Wr=[];for(let ia=0;ia=3){for(let ja=0;ja0?D+2*W:W}let iv=ht([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),nm=ht([{name:"a_projected_pos",components:3,type:"Float32"}],4);ht([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);let om=ht([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]);ht([{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"}]);let Pv=ht([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),nv=ht([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function ov(W,D,J){return W.sections.forEach(ve=>{ve.text=function(Ee,Be,Ge){let ct=Be.layout.get("text-transform").evaluate(Ge,{});return ct==="uppercase"?Ee=Ee.toLocaleUpperCase():ct==="lowercase"&&(Ee=Ee.toLocaleLowerCase()),Js.applyArabicShaping&&(Ee=Js.applyArabicShaping(Ee)),Ee}(ve.text,D,J)}),W}ht([{name:"triangle",components:3,type:"Uint16"}]),ht([{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"}]),ht([{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",name:"collisionCircleDiameter"},{type:"Uint16",name:"textAnchorOffsetStartIndex"},{type:"Uint16",name:"textAnchorOffsetEndIndex"}]),ht([{type:"Float32",name:"offsetX"}]),ht([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),ht([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);let cc={"!":"\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"};var fu=24,Dh=Mu,Iv=function(W,D,J,ve,Ee){var Be,Ge,ct=8*Ee-ve-1,At=(1<>1,ar=-7,Sr=J?Ee-1:0,zr=J?-1:1,Wr=W[D+Sr];for(Sr+=zr,Be=Wr&(1<<-ar)-1,Wr>>=-ar,ar+=ct;ar>0;Be=256*Be+W[D+Sr],Sr+=zr,ar-=8);for(Ge=Be&(1<<-ar)-1,Be>>=-ar,ar+=ve;ar>0;Ge=256*Ge+W[D+Sr],Sr+=zr,ar-=8);if(Be===0)Be=1-Bt;else{if(Be===At)return Ge?NaN:1/0*(Wr?-1:1);Ge+=Math.pow(2,ve),Be-=Bt}return(Wr?-1:1)*Ge*Math.pow(2,Be-ve)},sm=function(W,D,J,ve,Ee,Be){var Ge,ct,At,Bt=8*Be-Ee-1,ar=(1<>1,zr=Ee===23?Math.pow(2,-24)-Math.pow(2,-77):0,Wr=ve?0:Be-1,ia=ve?1:-1,fa=D<0||D===0&&1/D<0?1:0;for(D=Math.abs(D),isNaN(D)||D===1/0?(ct=isNaN(D)?1:0,Ge=ar):(Ge=Math.floor(Math.log(D)/Math.LN2),D*(At=Math.pow(2,-Ge))<1&&(Ge--,At*=2),(D+=Ge+Sr>=1?zr/At:zr*Math.pow(2,1-Sr))*At>=2&&(Ge++,At/=2),Ge+Sr>=ar?(ct=0,Ge=ar):Ge+Sr>=1?(ct=(D*At-1)*Math.pow(2,Ee),Ge+=Sr):(ct=D*Math.pow(2,Sr-1)*Math.pow(2,Ee),Ge=0));Ee>=8;W[J+Wr]=255&ct,Wr+=ia,ct/=256,Ee-=8);for(Ge=Ge<0;W[J+Wr]=255&Ge,Wr+=ia,Ge/=256,Bt-=8);W[J+Wr-ia]|=128*fa};function Mu(W){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(W)?W:new Uint8Array(W||0),this.pos=0,this.type=0,this.length=this.buf.length}Mu.Varint=0,Mu.Fixed64=1,Mu.Bytes=2,Mu.Fixed32=5;var w0=4294967296,sv=1/w0,xg=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");function Pp(W){return W.type===Mu.Bytes?W.readVarint()+W.pos:W.pos+1}function lv(W,D,J){return J?4294967296*D+(W>>>0):4294967296*(D>>>0)+(W>>>0)}function bg(W,D,J){var ve=D<=16383?1:D<=2097151?2:D<=268435455?3:Math.floor(Math.log(D)/(7*Math.LN2));J.realloc(ve);for(var Ee=J.pos-1;Ee>=W;Ee--)J.buf[Ee+ve]=J.buf[Ee]}function T0(W,D){for(var J=0;J>>8,W[J+2]=D>>>16,W[J+3]=D>>>24}function Lx(W,D){return(W[D]|W[D+1]<<8|W[D+2]<<16)+(W[D+3]<<24)}Mu.prototype={destroy:function(){this.buf=null},readFields:function(W,D,J){for(J=J||this.length;this.pos>3,Be=this.pos;this.type=7&ve,W(Ee,D,this),this.pos===Be&&this.skip(ve)}return D},readMessage:function(W,D){return this.readFields(W,D,this.readVarint()+this.pos)},readFixed32:function(){var W=Rv(this.buf,this.pos);return this.pos+=4,W},readSFixed32:function(){var W=Lx(this.buf,this.pos);return this.pos+=4,W},readFixed64:function(){var W=Rv(this.buf,this.pos)+Rv(this.buf,this.pos+4)*w0;return this.pos+=8,W},readSFixed64:function(){var W=Rv(this.buf,this.pos)+Lx(this.buf,this.pos+4)*w0;return this.pos+=8,W},readFloat:function(){var W=Iv(this.buf,this.pos,!0,23,4);return this.pos+=4,W},readDouble:function(){var W=Iv(this.buf,this.pos,!0,52,8);return this.pos+=8,W},readVarint:function(W){var D,J,ve=this.buf;return D=127&(J=ve[this.pos++]),J<128?D:(D|=(127&(J=ve[this.pos++]))<<7,J<128?D:(D|=(127&(J=ve[this.pos++]))<<14,J<128?D:(D|=(127&(J=ve[this.pos++]))<<21,J<128?D:function(Ee,Be,Ge){var ct,At,Bt=Ge.buf;if(ct=(112&(At=Bt[Ge.pos++]))>>4,At<128||(ct|=(127&(At=Bt[Ge.pos++]))<<3,At<128)||(ct|=(127&(At=Bt[Ge.pos++]))<<10,At<128)||(ct|=(127&(At=Bt[Ge.pos++]))<<17,At<128)||(ct|=(127&(At=Bt[Ge.pos++]))<<24,At<128)||(ct|=(1&(At=Bt[Ge.pos++]))<<31,At<128))return lv(Ee,ct,Be);throw new Error("Expected varint not more than 10 bytes")}(D|=(15&(J=ve[this.pos]))<<28,W,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var W=this.readVarint();return W%2==1?(W+1)/-2:W/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var W=this.readVarint()+this.pos,D=this.pos;return this.pos=W,W-D>=12&&xg?function(J,ve,Ee){return xg.decode(J.subarray(ve,Ee))}(this.buf,D,W):function(J,ve,Ee){for(var Be="",Ge=ve;Ge239?4:ar>223?3:ar>191?2:1;if(Ge+zr>Ee)break;zr===1?ar<128&&(Sr=ar):zr===2?(192&(ct=J[Ge+1]))==128&&(Sr=(31&ar)<<6|63&ct)<=127&&(Sr=null):zr===3?(At=J[Ge+2],(192&(ct=J[Ge+1]))==128&&(192&At)==128&&((Sr=(15&ar)<<12|(63&ct)<<6|63&At)<=2047||Sr>=55296&&Sr<=57343)&&(Sr=null)):zr===4&&(At=J[Ge+2],Bt=J[Ge+3],(192&(ct=J[Ge+1]))==128&&(192&At)==128&&(192&Bt)==128&&((Sr=(15&ar)<<18|(63&ct)<<12|(63&At)<<6|63&Bt)<=65535||Sr>=1114112)&&(Sr=null)),Sr===null?(Sr=65533,zr=1):Sr>65535&&(Sr-=65536,Be+=String.fromCharCode(Sr>>>10&1023|55296),Sr=56320|1023&Sr),Be+=String.fromCharCode(Sr),Ge+=zr}return Be}(this.buf,D,W)},readBytes:function(){var W=this.readVarint()+this.pos,D=this.buf.subarray(this.pos,W);return this.pos=W,D},readPackedVarint:function(W,D){if(this.type!==Mu.Bytes)return W.push(this.readVarint(D));var J=Pp(this);for(W=W||[];this.pos127;);else if(D===Mu.Bytes)this.pos=this.readVarint()+this.pos;else if(D===Mu.Fixed32)this.pos+=4;else{if(D!==Mu.Fixed64)throw new Error("Unimplemented type: "+D);this.pos+=8}},writeTag:function(W,D){this.writeVarint(W<<3|D)},realloc:function(W){for(var D=this.length||16;D268435455||W<0?function(D,J){var ve,Ee;if(D>=0?(ve=D%4294967296|0,Ee=D/4294967296|0):(Ee=~(-D/4294967296),4294967295^(ve=~(-D%4294967296))?ve=ve+1|0:(ve=0,Ee=Ee+1|0)),D>=18446744073709552e3||D<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");J.realloc(10),function(Be,Ge,ct){ct.buf[ct.pos++]=127&Be|128,Be>>>=7,ct.buf[ct.pos++]=127&Be|128,Be>>>=7,ct.buf[ct.pos++]=127&Be|128,Be>>>=7,ct.buf[ct.pos++]=127&Be|128,ct.buf[ct.pos]=127&(Be>>>=7)}(ve,0,J),function(Be,Ge){var ct=(7&Be)<<4;Ge.buf[Ge.pos++]|=ct|((Be>>>=3)?128:0),Be&&(Ge.buf[Ge.pos++]=127&Be|((Be>>>=7)?128:0),Be&&(Ge.buf[Ge.pos++]=127&Be|((Be>>>=7)?128:0),Be&&(Ge.buf[Ge.pos++]=127&Be|((Be>>>=7)?128:0),Be&&(Ge.buf[Ge.pos++]=127&Be|((Be>>>=7)?128:0),Be&&(Ge.buf[Ge.pos++]=127&Be)))))}(Ee,J)}(W,this):(this.realloc(4),this.buf[this.pos++]=127&W|(W>127?128:0),W<=127||(this.buf[this.pos++]=127&(W>>>=7)|(W>127?128:0),W<=127||(this.buf[this.pos++]=127&(W>>>=7)|(W>127?128:0),W<=127||(this.buf[this.pos++]=W>>>7&127))))},writeSVarint:function(W){this.writeVarint(W<0?2*-W-1:2*W)},writeBoolean:function(W){this.writeVarint(!!W)},writeString:function(W){W=String(W),this.realloc(4*W.length),this.pos++;var D=this.pos;this.pos=function(ve,Ee,Be){for(var Ge,ct,At=0;At55295&&Ge<57344){if(!ct){Ge>56319||At+1===Ee.length?(ve[Be++]=239,ve[Be++]=191,ve[Be++]=189):ct=Ge;continue}if(Ge<56320){ve[Be++]=239,ve[Be++]=191,ve[Be++]=189,ct=Ge;continue}Ge=ct-55296<<10|Ge-56320|65536,ct=null}else ct&&(ve[Be++]=239,ve[Be++]=191,ve[Be++]=189,ct=null);Ge<128?ve[Be++]=Ge:(Ge<2048?ve[Be++]=Ge>>6|192:(Ge<65536?ve[Be++]=Ge>>12|224:(ve[Be++]=Ge>>18|240,ve[Be++]=Ge>>12&63|128),ve[Be++]=Ge>>6&63|128),ve[Be++]=63&Ge|128)}return Be}(this.buf,W,this.pos);var J=this.pos-D;J>=128&&bg(D,J,this),this.pos=D-1,this.writeVarint(J),this.pos+=J},writeFloat:function(W){this.realloc(4),sm(this.buf,W,this.pos,!0,23,4),this.pos+=4},writeDouble:function(W){this.realloc(8),sm(this.buf,W,this.pos,!0,52,8),this.pos+=8},writeBytes:function(W){var D=W.length;this.writeVarint(D),this.realloc(D);for(var J=0;J=128&&bg(J,ve,this),this.pos=J-1,this.writeVarint(ve),this.pos+=ve},writeMessage:function(W,D,J){this.writeTag(W,Mu.Bytes),this.writeRawMessage(D,J)},writePackedVarint:function(W,D){D.length&&this.writeMessage(W,T0,D)},writePackedSVarint:function(W,D){D.length&&this.writeMessage(W,UT,D)},writePackedBoolean:function(W,D){D.length&&this.writeMessage(W,VT,D)},writePackedFloat:function(W,D){D.length&&this.writeMessage(W,jT,D)},writePackedDouble:function(W,D){D.length&&this.writeMessage(W,qT,D)},writePackedFixed32:function(W,D){D.length&&this.writeMessage(W,vk,D)},writePackedSFixed32:function(W,D){D.length&&this.writeMessage(W,GT,D)},writePackedFixed64:function(W,D){D.length&&this.writeMessage(W,HT,D)},writePackedSFixed64:function(W,D){D.length&&this.writeMessage(W,WT,D)},writeBytesField:function(W,D){this.writeTag(W,Mu.Bytes),this.writeBytes(D)},writeFixed32Field:function(W,D){this.writeTag(W,Mu.Fixed32),this.writeFixed32(D)},writeSFixed32Field:function(W,D){this.writeTag(W,Mu.Fixed32),this.writeSFixed32(D)},writeFixed64Field:function(W,D){this.writeTag(W,Mu.Fixed64),this.writeFixed64(D)},writeSFixed64Field:function(W,D){this.writeTag(W,Mu.Fixed64),this.writeSFixed64(D)},writeVarintField:function(W,D){this.writeTag(W,Mu.Varint),this.writeVarint(D)},writeSVarintField:function(W,D){this.writeTag(W,Mu.Varint),this.writeSVarint(D)},writeStringField:function(W,D){this.writeTag(W,Mu.Bytes),this.writeString(D)},writeFloatField:function(W,D){this.writeTag(W,Mu.Fixed32),this.writeFloat(D)},writeDoubleField:function(W,D){this.writeTag(W,Mu.Fixed64),this.writeDouble(D)},writeBooleanField:function(W,D){this.writeVarintField(W,!!D)}};var P1=r(Dh);let I1=3;function mk(W,D,J){W===1&&J.readMessage(XT,D)}function XT(W,D,J){if(W===3){let{id:ve,bitmap:Ee,width:Be,height:Ge,left:ct,top:At,advance:Bt}=J.readMessage(Px,{});D.push({id:ve,bitmap:new Rn({width:Be+2*I1,height:Ge+2*I1},Ee),metrics:{width:Be,height:Ge,left:ct,top:At,advance:Bt}})}}function Px(W,D,J){W===1?D.id=J.readVarint():W===2?D.bitmap=J.readBytes():W===3?D.width=J.readVarint():W===4?D.height=J.readVarint():W===5?D.left=J.readSVarint():W===6?D.top=J.readSVarint():W===7&&(D.advance=J.readVarint())}let Ix=I1;function R1(W){let D=0,J=0;for(let Ge of W)D+=Ge.w*Ge.h,J=Math.max(J,Ge.w);W.sort((Ge,ct)=>ct.h-Ge.h);let ve=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(D/.95)),J),h:1/0}],Ee=0,Be=0;for(let Ge of W)for(let ct=ve.length-1;ct>=0;ct--){let At=ve[ct];if(!(Ge.w>At.w||Ge.h>At.h)){if(Ge.x=At.x,Ge.y=At.y,Be=Math.max(Be,Ge.y+Ge.h),Ee=Math.max(Ee,Ge.x+Ge.w),Ge.w===At.w&&Ge.h===At.h){let Bt=ve.pop();ct=0&&ve>=D&&Ag[this.text.charCodeAt(ve)];ve--)J--;this.text=this.text.substring(D,J),this.sectionIndex=this.sectionIndex.slice(D,J)}substring(D,J){let ve=new lm;return ve.text=this.text.substring(D,J),ve.sectionIndex=this.sectionIndex.slice(D,J),ve.sections=this.sections,ve}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((D,J)=>Math.max(D,this.sections[J].scale),0)}addTextSection(D,J){this.text+=D.text,this.sections.push(S0.forText(D.scale,D.fontStack||J));let ve=this.sections.length-1;for(let Ee=0;Ee=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function M0(W,D,J,ve,Ee,Be,Ge,ct,At,Bt,ar,Sr,zr,Wr,ia){let fa=lm.fromFeature(W,Ee),ja;Sr===e.ah.vertical&&fa.verticalizePunctuation();let{processBidirectionalText:Ka,processStyledBidirectionalText:Wi}=Js;if(Ka&&fa.sections.length===1){ja=[];let en=Ka(fa.toString(),um(fa,Bt,Be,D,ve,Wr));for(let qn of en){let ko=new lm;ko.text=qn,ko.sections=fa.sections;for(let ys=0;ys0&&Xp>yf&&(yf=Xp)}else{let zc=ko[hu.fontStack],Pf=zc&&zc[Ju];if(Pf&&Pf.rect)vm=Pf.rect,$c=Pf.metrics;else{let Xp=qn[hu.fontStack],Zd=Xp&&Xp[Ju];if(!Zd)continue;$c=Zd.metrics}Dp=(ah-hu.scale)*fu}Wp?(en.verticalizable=!0,dh.push({glyph:Ju,imageName:_d,x:Ps,y:Ku+Dp,vertical:Wp,scale:hu.scale,fontStack:hu.fontStack,sectionIndex:fc,metrics:$c,rect:vm}),Ps+=fd*hu.scale+bn):(dh.push({glyph:Ju,imageName:_d,x:Ps,y:Ku+Dp,vertical:Wp,scale:hu.scale,fontStack:hu.fontStack,sectionIndex:fc,metrics:$c,rect:vm}),Ps+=$c.advance*hu.scale+bn)}dh.length!==0&&(Uu=Math.max(Ps-bn,Uu),uv(dh,0,dh.length-1,Hp,yf)),Ps=0;let Rp=zn*ah+yf;Ah.lineOffset=Math.max(yf,Fh),Ku+=Rp,th=Math.max(Rp,th),++Th}var rh;let Jh=Ku-eh,{horizontalAlign:$h,verticalAlign:Qh}=Mg(rs);(function(ff,ah,Fh,Ah,dh,yf,Rp,dp,hu){let fc=(ah-Fh)*dh,Ju=0;Ju=yf!==Rp?-dp*Ah-eh:(-Ah*hu+.5)*Rp;for(let Dp of ff)for(let $c of Dp.positionedGlyphs)$c.x+=fc,$c.y+=Ju})(en.positionedLines,Hp,$h,Qh,Uu,th,zn,Jh,vo.length),en.top+=-Qh*Jh,en.bottom=en.top+Jh,en.left+=-$h*Uu,en.right=en.left+Uu}(qi,D,J,ve,ja,Ge,ct,At,Sr,Bt,zr,ia),!function(en){for(let qn of en)if(qn.positionedGlyphs.length!==0)return!1;return!0}(gi)&&qi}let Ag={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},ZT={10:!0,32:!0,38:!0,41:!0,43:!0,45:!0,47:!0,173:!0,183:!0,8203:!0,8208:!0,8211:!0,8231:!0},YT={40:!0};function Rx(W,D,J,ve,Ee,Be){if(D.imageName){let Ge=ve[D.imageName];return Ge?Ge.displaySize[0]*D.scale*fu/Be+Ee:0}{let Ge=J[D.fontStack],ct=Ge&&Ge[W];return ct?ct.metrics.advance*D.scale+Ee:0}}function Dx(W,D,J,ve){let Ee=Math.pow(W-D,2);return ve?W=0,Bt=0;for(let Sr=0;SrBt){let ar=Math.ceil(Be/Bt);Ee*=ar/Ge,Ge=ar}return{x1:ve,y1:Ee,x2:ve+Be,y2:Ee+Ge}}function Ox(W,D,J,ve,Ee,Be){let Ge=W.image,ct;if(Ge.content){let ja=Ge.content,Ka=Ge.pixelRatio||1;ct=[ja[0]/Ka,ja[1]/Ka,Ge.displaySize[0]-ja[2]/Ka,Ge.displaySize[1]-ja[3]/Ka]}let At=D.left*Be,Bt=D.right*Be,ar,Sr,zr,Wr;J==="width"||J==="both"?(Wr=Ee[0]+At-ve[3],Sr=Ee[0]+Bt+ve[1]):(Wr=Ee[0]+(At+Bt-Ge.displaySize[0])/2,Sr=Wr+Ge.displaySize[0]);let ia=D.top*Be,fa=D.bottom*Be;return J==="height"||J==="both"?(ar=Ee[1]+ia-ve[0],zr=Ee[1]+fa+ve[2]):(ar=Ee[1]+(ia+fa-Ge.displaySize[1])/2,zr=ar+Ge.displaySize[1]),{image:Ge,top:ar,right:Sr,bottom:zr,left:Wr,collisionPadding:ct}}let k0=255,yd=128,cv=k0*yd;function Bx(W,D){let{expression:J}=D;if(J.kind==="constant")return{kind:"constant",layoutSize:J.evaluate(new Ds(W+1))};if(J.kind==="source")return{kind:"source"};{let{zoomStops:ve,interpolationType:Ee}=J,Be=0;for(;BeGe.id),this.index=D.index,this.pixelRatio=D.pixelRatio,this.sourceLayerIndex=D.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=di([]),this.placementViewportMatrix=di([]);let J=this.layers[0]._unevaluatedLayout._values;this.textSizeData=Bx(this.zoom,J["text-size"]),this.iconSizeData=Bx(this.zoom,J["icon-size"]);let ve=this.layers[0].layout,Ee=ve.get("symbol-sort-key"),Be=ve.get("symbol-z-order");this.canOverlap=D1(ve,"text-overlap","text-allow-overlap")!=="never"||D1(ve,"icon-overlap","icon-allow-overlap")!=="never"||ve.get("text-ignore-placement")||ve.get("icon-ignore-placement"),this.sortFeaturesByKey=Be!=="viewport-y"&&!Ee.isConstant(),this.sortFeaturesByY=(Be==="viewport-y"||Be==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,ve.get("symbol-placement")==="point"&&(this.writingModes=ve.get("text-writing-mode").map(Ge=>e.ah[Ge])),this.stateDependentLayerIds=this.layers.filter(Ge=>Ge.isStateDependent()).map(Ge=>Ge.id),this.sourceID=D.sourceID}createArrays(){this.text=new O1(new al(this.layers,this.zoom,D=>/^text/.test(D))),this.icon=new O1(new al(this.layers,this.zoom,D=>/^icon/.test(D))),this.glyphOffsetArray=new os,this.lineVertexArray=new So,this.symbolInstances=new wo,this.textAnchorOffsets=new hs}calculateGlyphDependencies(D,J,ve,Ee,Be){for(let Ge=0;Ge0)&&(Ge.value.kind!=="constant"||Ge.value.value.length>0),ar=At.value.kind!=="constant"||!!At.value.value||Object.keys(At.parameters).length>0,Sr=Be.get("symbol-sort-key");if(this.features=[],!Bt&&!ar)return;let zr=J.iconDependencies,Wr=J.glyphDependencies,ia=J.availableImages,fa=new Ds(this.zoom);for(let{feature:ja,id:Ka,index:Wi,sourceLayerIndex:gi}of D){let qi=Ee._featureFilter.needGeometry,en=Hl(ja,qi);if(!Ee._featureFilter.filter(fa,en,ve))continue;let qn,ko;if(qi||(en.geometry=Al(ja)),Bt){let vo=Ee.getValueAndResolveTokens("text-field",en,ve,ia),zn=ra.factory(vo),rs=this.hasRTLText=this.hasRTLText||F1(zn);(!rs||Js.getRTLTextPluginStatus()==="unavailable"||rs&&Js.isParsed())&&(qn=ov(zn,Ee,en))}if(ar){let vo=Ee.getValueAndResolveTokens("icon-image",en,ve,ia);ko=vo instanceof Za?vo:Za.fromString(vo)}if(!qn&&!ko)continue;let ys=this.sortFeaturesByKey?Sr.evaluate(en,{},ve):void 0;if(this.features.push({id:Ka,text:qn,icon:ko,index:Wi,sourceLayerIndex:gi,geometry:en.geometry,properties:ja.properties,type:JT[ja.type],sortKey:ys}),ko&&(zr[ko.name]=!0),qn){let vo=Ge.evaluate(en,{},ve).join(","),zn=Be.get("text-rotation-alignment")!=="viewport"&&Be.get("symbol-placement")!=="point";this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(e.ah.vertical)>=0;for(let rs of qn.sections)if(rs.image)zr[rs.image.name]=!0;else{let jo=go(qn.toString()),Bo=rs.fontStack||vo,bn=Wr[Bo]=Wr[Bo]||{};this.calculateGlyphDependencies(rs.text,bn,zn,this.allowVerticalPlacement,jo)}}}Be.get("symbol-placement")==="line"&&(this.features=function(ja){let Ka={},Wi={},gi=[],qi=0;function en(vo){gi.push(ja[vo]),qi++}function qn(vo,zn,rs){let jo=Wi[vo];return delete Wi[vo],Wi[zn]=jo,gi[jo].geometry[0].pop(),gi[jo].geometry[0]=gi[jo].geometry[0].concat(rs[0]),jo}function ko(vo,zn,rs){let jo=Ka[zn];return delete Ka[zn],Ka[vo]=jo,gi[jo].geometry[0].shift(),gi[jo].geometry[0]=rs[0].concat(gi[jo].geometry[0]),jo}function ys(vo,zn,rs){let jo=rs?zn[0][zn[0].length-1]:zn[0][0];return`${vo}:${jo.x}:${jo.y}`}for(let vo=0;vovo.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort((ja,Ka)=>ja.sortKey-Ka.sortKey)}update(D,J,ve){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(D,J,this.layers,ve),this.icon.programConfigurations.updatePaintArrays(D,J,this.layers,ve))}isEmpty(){return this.symbolInstances.length===0&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(D){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(D),this.iconCollisionBox.upload(D)),this.text.upload(D,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(D,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0}destroyDebugData(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()}destroy(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()}addToLineVertexArray(D,J){let ve=this.lineVertexArray.length;if(D.segment!==void 0){let Ee=D.dist(J[D.segment+1]),Be=D.dist(J[D.segment]),Ge={};for(let ct=D.segment+1;ct=0;ct--)Ge[ct]={x:J[ct].x,y:J[ct].y,tileUnitDistanceFromAnchor:Be},ct>0&&(Be+=J[ct-1].dist(J[ct]));for(let ct=0;ct0}hasIconData(){return this.icon.segments.get().length>0}hasDebugData(){return this.textCollisionBox&&this.iconCollisionBox}hasTextCollisionBoxData(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0}hasIconCollisionBoxData(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0}addIndicesForPlacedSymbol(D,J){let ve=D.placedSymbolArray.get(J),Ee=ve.vertexStartIndex+4*ve.numGlyphs;for(let Be=ve.vertexStartIndex;BeEe[ct]-Ee[At]||Be[At]-Be[ct]),Ge}addToSortKeyRanges(D,J){let ve=this.sortKeyRanges[this.sortKeyRanges.length-1];ve&&ve.sortKey===J?ve.symbolInstanceEnd=D+1:this.sortKeyRanges.push({sortKey:J,symbolInstanceStart:D,symbolInstanceEnd:D+1})}sortFeatures(D){if(this.sortFeaturesByY&&this.sortedAngle!==D&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(D),this.sortedAngle=D,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(let J of this.symbolInstanceIndexes){let ve=this.symbolInstances.get(J);this.featureSortOrder.push(ve.featureIndex),[ve.rightJustifiedTextSymbolIndex,ve.centerJustifiedTextSymbolIndex,ve.leftJustifiedTextSymbolIndex].forEach((Ee,Be,Ge)=>{Ee>=0&&Ge.indexOf(Ee)===Be&&this.addIndicesForPlacedSymbol(this.text,Ee)}),ve.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,ve.verticalPlacedTextSymbolIndex),ve.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,ve.placedIconSymbolIndex),ve.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,ve.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}let cf,C0;mi("SymbolBucket",cm,{omit:["layers","collisionBoxArray","features","compareText"]}),cm.MAX_GLYPHS=65535,cm.addDynamicAttributes=z1;var kg={get paint(){return C0=C0||new Fe({"icon-opacity":new zo(re.paint_symbol["icon-opacity"]),"icon-color":new zo(re.paint_symbol["icon-color"]),"icon-halo-color":new zo(re.paint_symbol["icon-halo-color"]),"icon-halo-width":new zo(re.paint_symbol["icon-halo-width"]),"icon-halo-blur":new zo(re.paint_symbol["icon-halo-blur"]),"icon-translate":new fo(re.paint_symbol["icon-translate"]),"icon-translate-anchor":new fo(re.paint_symbol["icon-translate-anchor"]),"text-opacity":new zo(re.paint_symbol["text-opacity"]),"text-color":new zo(re.paint_symbol["text-color"],{runtimeType:Nt,getOverride:W=>W.textColor,hasOverride:W=>!!W.textColor}),"text-halo-color":new zo(re.paint_symbol["text-halo-color"]),"text-halo-width":new zo(re.paint_symbol["text-halo-width"]),"text-halo-blur":new zo(re.paint_symbol["text-halo-blur"]),"text-translate":new fo(re.paint_symbol["text-translate"]),"text-translate-anchor":new fo(re.paint_symbol["text-translate-anchor"])})},get layout(){return cf=cf||new Fe({"symbol-placement":new fo(re.layout_symbol["symbol-placement"]),"symbol-spacing":new fo(re.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new fo(re.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new zo(re.layout_symbol["symbol-sort-key"]),"symbol-z-order":new fo(re.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new fo(re.layout_symbol["icon-allow-overlap"]),"icon-overlap":new fo(re.layout_symbol["icon-overlap"]),"icon-ignore-placement":new fo(re.layout_symbol["icon-ignore-placement"]),"icon-optional":new fo(re.layout_symbol["icon-optional"]),"icon-rotation-alignment":new fo(re.layout_symbol["icon-rotation-alignment"]),"icon-size":new zo(re.layout_symbol["icon-size"]),"icon-text-fit":new fo(re.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new fo(re.layout_symbol["icon-text-fit-padding"]),"icon-image":new zo(re.layout_symbol["icon-image"]),"icon-rotate":new zo(re.layout_symbol["icon-rotate"]),"icon-padding":new zo(re.layout_symbol["icon-padding"]),"icon-keep-upright":new fo(re.layout_symbol["icon-keep-upright"]),"icon-offset":new zo(re.layout_symbol["icon-offset"]),"icon-anchor":new zo(re.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new fo(re.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new fo(re.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new fo(re.layout_symbol["text-rotation-alignment"]),"text-field":new zo(re.layout_symbol["text-field"]),"text-font":new zo(re.layout_symbol["text-font"]),"text-size":new zo(re.layout_symbol["text-size"]),"text-max-width":new zo(re.layout_symbol["text-max-width"]),"text-line-height":new fo(re.layout_symbol["text-line-height"]),"text-letter-spacing":new zo(re.layout_symbol["text-letter-spacing"]),"text-justify":new zo(re.layout_symbol["text-justify"]),"text-radial-offset":new zo(re.layout_symbol["text-radial-offset"]),"text-variable-anchor":new fo(re.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new zo(re.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new zo(re.layout_symbol["text-anchor"]),"text-max-angle":new fo(re.layout_symbol["text-max-angle"]),"text-writing-mode":new fo(re.layout_symbol["text-writing-mode"]),"text-rotate":new zo(re.layout_symbol["text-rotate"]),"text-padding":new fo(re.layout_symbol["text-padding"]),"text-keep-upright":new fo(re.layout_symbol["text-keep-upright"]),"text-transform":new zo(re.layout_symbol["text-transform"]),"text-offset":new zo(re.layout_symbol["text-offset"]),"text-allow-overlap":new fo(re.layout_symbol["text-allow-overlap"]),"text-overlap":new fo(re.layout_symbol["text-overlap"]),"text-ignore-placement":new fo(re.layout_symbol["text-ignore-placement"]),"text-optional":new fo(re.layout_symbol["text-optional"])})}};class L0{constructor(D){if(D.property.overrides===void 0)throw new Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=D.property.overrides?D.property.overrides.runtimeType:rt,this.defaultValue=D}evaluate(D){if(D.formattedSection){let J=this.defaultValue.property.overrides;if(J&&J.hasOverride(D.formattedSection))return J.getOverride(D.formattedSection)}return D.feature&&D.featureState?this.defaultValue.evaluate(D.feature,D.featureState):this.defaultValue.property.specification.default}eachChild(D){this.defaultValue.isConstant()||D(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}mi("FormatSectionOverride",L0,{omit:["defaultValue"]});class Dv extends ie{constructor(D){super(D,kg)}recalculate(D,J){if(super.recalculate(D,J),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")==="map"?"map":"viewport"),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"){let ve=this.layout.get("text-writing-mode");if(ve){let Ee=[];for(let Be of ve)Ee.indexOf(Be)<0&&Ee.push(Be);this.layout._values["text-writing-mode"]=Ee}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(D,J,ve,Ee){let Be=this.layout.get(D).evaluate(J,{},ve,Ee),Ge=this._unevaluatedLayout._values[D];return Ge.isDataDriven()||Mc(Ge.value)||!Be?Be:function(ct,At){return At.replace(/{([^{}]+)}/g,(Bt,ar)=>ct&&ar in ct?String(ct[ar]):"")}(J.properties,Be)}createBucket(D){return new cm(D)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(let D of kg.paint.overridableProperties){if(!Dv.hasPaintOverride(this.layout,D))continue;let J=this.paint.get(D),ve=new L0(J),Ee=new Lu(ve,J.property.specification),Be=null;Be=J.value.kind==="constant"||J.value.kind==="source"?new vc("source",Ee):new yu("composite",Ee,J.value.zoomStops),this.paint._values[D]=new Au(J.property,Be,J.parameters)}}_handleOverridablePaintPropertyUpdate(D,J,ve){return!(!this.layout||J.isDataDriven()||ve.isDataDriven())&&Dv.hasPaintOverride(this.layout,D)}static hasPaintOverride(D,J){let ve=D.get("text-field"),Ee=kg.paint.properties[J],Be=!1,Ge=ct=>{for(let At of ct)if(Ee.overrides&&Ee.overrides.hasOverride(At))return void(Be=!0)};if(ve.value.kind==="constant"&&ve.value.value instanceof ra)Ge(ve.value.value.sections);else if(ve.value.kind==="source"){let ct=Bt=>{Be||(Bt instanceof tn&&Ra(Bt.value)===qr?Ge(Bt.value.sections):Bt instanceof ns?Ge(Bt.sections):Bt.eachChild(ct))},At=ve.value;At._styleExpression&&ct(At._styleExpression.expression)}return Be}}let Nx;var P0={get paint(){return Nx=Nx||new Fe({"background-color":new fo(re.paint_background["background-color"]),"background-pattern":new lc(re.paint_background["background-pattern"]),"background-opacity":new fo(re.paint_background["background-opacity"])})}};class QT extends ie{constructor(D){super(D,P0)}}let B1;var Ux={get paint(){return B1=B1||new Fe({"raster-opacity":new fo(re.paint_raster["raster-opacity"]),"raster-hue-rotate":new fo(re.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new fo(re.paint_raster["raster-brightness-min"]),"raster-brightness-max":new fo(re.paint_raster["raster-brightness-max"]),"raster-saturation":new fo(re.paint_raster["raster-saturation"]),"raster-contrast":new fo(re.paint_raster["raster-contrast"]),"raster-resampling":new fo(re.paint_raster["raster-resampling"]),"raster-fade-duration":new fo(re.paint_raster["raster-fade-duration"])})}};class I0 extends ie{constructor(D){super(D,Ux)}}class N1 extends ie{constructor(D){super(D,{}),this.onAdd=J=>{this.implementation.onAdd&&this.implementation.onAdd(J,J.painter.context.gl)},this.onRemove=J=>{this.implementation.onRemove&&this.implementation.onRemove(J,J.painter.context.gl)},this.implementation=D}is3D(){return this.implementation.renderingMode==="3d"}hasOffscreenPass(){return this.implementation.prerender!==void 0}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){throw new Error("Custom layers cannot be serialized")}}class U1{constructor(D){this._methodToThrottle=D,this._triggered=!1,typeof MessageChannel<"u"&&(this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._methodToThrottle()})}trigger(){this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout(()=>{this._triggered=!1,this._methodToThrottle()},0))}remove(){delete this._channel,this._methodToThrottle=()=>{}}}let j1=63710088e-1;class Hd{constructor(D,J){if(isNaN(D)||isNaN(J))throw new Error(`Invalid LngLat object: (${D}, ${J})`);if(this.lng=+D,this.lat=+J,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new Hd(A(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(D){let J=Math.PI/180,ve=this.lat*J,Ee=D.lat*J,Be=Math.sin(ve)*Math.sin(Ee)+Math.cos(ve)*Math.cos(Ee)*Math.cos((D.lng-this.lng)*J);return j1*Math.acos(Math.min(Be,1))}static convert(D){if(D instanceof Hd)return D;if(Array.isArray(D)&&(D.length===2||D.length===3))return new Hd(Number(D[0]),Number(D[1]));if(!Array.isArray(D)&&typeof D=="object"&&D!==null)return new Hd(Number("lng"in D?D.lng:D.lon),Number(D.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 [, ]")}}let fm=2*Math.PI*j1;function jx(W){return fm*Math.cos(W*Math.PI/180)}function Cg(W){return(180+W)/360}function qx(W){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+W*Math.PI/360)))/360}function Lg(W,D){return W/jx(D)}function R0(W){return 360/Math.PI*Math.atan(Math.exp((180-360*W)*Math.PI/180))-90}class D0{constructor(D,J,ve=0){this.x=+D,this.y=+J,this.z=+ve}static fromLngLat(D,J=0){let ve=Hd.convert(D);return new D0(Cg(ve.lng),qx(ve.lat),Lg(J,ve.lat))}toLngLat(){return new Hd(360*this.x-180,R0(this.y))}toAltitude(){return this.z*jx(R0(this.y))}meterInMercatorCoordinateUnits(){return 1/fm*(D=R0(this.y),1/Math.cos(D*Math.PI/180));var D}}function rd(W,D,J){var ve=2*Math.PI*6378137/256/Math.pow(2,J);return[W*ve-2*Math.PI*6378137/2,D*ve-2*Math.PI*6378137/2]}class q1{constructor(D,J,ve){if(!function(Ee,Be,Ge){return!(Ee<0||Ee>25||Ge<0||Ge>=Math.pow(2,Ee)||Be<0||Be>=Math.pow(2,Ee))}(D,J,ve))throw new Error(`x=${J}, y=${ve}, z=${D} outside of bounds. 0<=x<${Math.pow(2,D)}, 0<=y<${Math.pow(2,D)} 0<=z<=25 `);this.z=D,this.x=J,this.y=ve,this.key=z0(0,D,D,J,ve)}equals(D){return this.z===D.z&&this.x===D.x&&this.y===D.y}url(D,J,ve){let Ee=(Ge=this.y,ct=this.z,At=rd(256*(Be=this.x),256*(Ge=Math.pow(2,ct)-Ge-1),ct),Bt=rd(256*(Be+1),256*(Ge+1),ct),At[0]+","+At[1]+","+Bt[0]+","+Bt[1]);var Be,Ge,ct,At,Bt;let ar=function(Sr,zr,Wr){let ia,fa="";for(let ja=Sr;ja>0;ja--)ia=1<1?"@2x":"").replace(/{quadkey}/g,ar).replace(/{bbox-epsg-3857}/g,Ee)}isChildOf(D){let J=this.z-D.z;return J>0&&D.x===this.x>>J&&D.y===this.y>>J}getTilePoint(D){let J=Math.pow(2,this.z);return new n((D.x*J-this.x)*po,(D.y*J-this.y)*po)}toString(){return`${this.z}/${this.x}/${this.y}`}}class Vx{constructor(D,J){this.wrap=D,this.canonical=J,this.key=z0(D,J.z,J.z,J.x,J.y)}}class Gp{constructor(D,J,ve,Ee,Be){if(D= z; overscaledZ = ${D}; z = ${ve}`);this.overscaledZ=D,this.wrap=J,this.canonical=new q1(ve,+Ee,+Be),this.key=z0(J,D,ve,Ee,Be)}clone(){return new Gp(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(D){return this.overscaledZ===D.overscaledZ&&this.wrap===D.wrap&&this.canonical.equals(D.canonical)}scaledTo(D){if(D>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${D}; overscaledZ = ${this.overscaledZ}`);let J=this.canonical.z-D;return D>this.canonical.z?new Gp(D,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Gp(D,this.wrap,D,this.canonical.x>>J,this.canonical.y>>J)}calculateScaledKey(D,J){if(D>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${D}; overscaledZ = ${this.overscaledZ}`);let ve=this.canonical.z-D;return D>this.canonical.z?z0(this.wrap*+J,D,this.canonical.z,this.canonical.x,this.canonical.y):z0(this.wrap*+J,D,D,this.canonical.x>>ve,this.canonical.y>>ve)}isChildOf(D){if(D.wrap!==this.wrap)return!1;let J=this.canonical.z-D.canonical.z;return D.overscaledZ===0||D.overscaledZ>J&&D.canonical.y===this.canonical.y>>J}children(D){if(this.overscaledZ>=D)return[new Gp(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];let J=this.canonical.z+1,ve=2*this.canonical.x,Ee=2*this.canonical.y;return[new Gp(J,this.wrap,J,ve,Ee),new Gp(J,this.wrap,J,ve+1,Ee),new Gp(J,this.wrap,J,ve,Ee+1),new Gp(J,this.wrap,J,ve+1,Ee+1)]}isLessThan(D){return this.wrapD.wrap)&&(this.overscaledZD.overscaledZ)&&(this.canonical.xD.canonical.x)&&this.canonical.ythis.max&&(this.max=Sr),Sr=this.dim+1||J<-1||J>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(J+1)*this.stride+(D+1)}unpack(D,J,ve){return D*this.redFactor+J*this.greenFactor+ve*this.blueFactor-this.baseShift}getPixels(){return new Ii({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(D,J,ve){if(this.dim!==D.dim)throw new Error("dem dimension mismatch");let Ee=J*this.dim,Be=J*this.dim+this.dim,Ge=ve*this.dim,ct=ve*this.dim+this.dim;switch(J){case-1:Ee=Be-1;break;case 1:Be=Ee+1}switch(ve){case-1:Ge=ct-1;break;case 1:ct=Ge+1}let At=-J*this.dim,Bt=-ve*this.dim;for(let ar=Ge;ar=this._numberToString.length)throw new Error(`Out of bounds. Index requested n=${D} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[D]}}class V1{constructor(D,J,ve,Ee,Be){this.type="Feature",this._vectorTileFeature=D,D._z=J,D._x=ve,D._y=Ee,this.properties=D.properties,this.id=Be}get geometry(){return this._geometry===void 0&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry}set geometry(D){this._geometry=D}toJSON(){let D={geometry:this.geometry};for(let J in this)J!=="_geometry"&&J!=="_vectorTileFeature"&&(D[J]=this[J]);return D}}class zv{constructor(D,J){this.tileID=D,this.x=D.canonical.x,this.y=D.canonical.y,this.z=D.canonical.z,this.grid=new Di(po,16,0),this.grid3D=new Di(po,16,0),this.featureIndexArray=new tl,this.promoteId=J}insert(D,J,ve,Ee,Be,Ge){let ct=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(ve,Ee,Be);let At=Ge?this.grid3D:this.grid;for(let Bt=0;Bt=0&&Sr[3]>=0&&At.insert(ct,Sr[0],Sr[1],Sr[2],Sr[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=new Jr.VectorTile(new P1(this.rawTileData)).layers,this.sourceLayerCoder=new Hx(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers}query(D,J,ve,Ee){this.loadVTLayers();let Be=D.params||{},Ge=po/D.tileSize/D.scale,ct=Ec(Be.filter),At=D.queryGeometry,Bt=D.queryPadding*Ge,ar=Xx(At),Sr=this.grid.query(ar.minX-Bt,ar.minY-Bt,ar.maxX+Bt,ar.maxY+Bt),zr=Xx(D.cameraQueryGeometry),Wr=this.grid3D.query(zr.minX-Bt,zr.minY-Bt,zr.maxX+Bt,zr.maxY+Bt,(ja,Ka,Wi,gi)=>function(qi,en,qn,ko,ys){for(let zn of qi)if(en<=zn.x&&qn<=zn.y&&ko>=zn.x&&ys>=zn.y)return!0;let vo=[new n(en,qn),new n(en,ys),new n(ko,ys),new n(ko,qn)];if(qi.length>2){for(let zn of vo)if(bi(qi,zn))return!0}for(let zn=0;zn(gi||(gi=Al(qi)),en.queryIntersectsFeature(At,qi,qn,gi,this.z,D.transform,Ge,D.pixelPosMatrix)))}return ia}loadMatchingFeature(D,J,ve,Ee,Be,Ge,ct,At,Bt,ar,Sr){let zr=this.bucketLayerIDs[J];if(Ge&&!function(ja,Ka){for(let Wi=0;Wi=0)return!0;return!1}(Ge,zr))return;let Wr=this.sourceLayerCoder.decode(ve),ia=this.vtLayers[Wr].feature(Ee);if(Be.needGeometry){let ja=Hl(ia,!0);if(!Be.filter(new Ds(this.tileID.overscaledZ),ja,this.tileID.canonical))return}else if(!Be.filter(new Ds(this.tileID.overscaledZ),ia))return;let fa=this.getId(ia,Wr);for(let ja=0;ja{let ct=D instanceof yc?D.get(Ge):null;return ct&&ct.evaluate?ct.evaluate(J,ve,Ee):ct})}function Xx(W){let D=1/0,J=1/0,ve=-1/0,Ee=-1/0;for(let Be of W)D=Math.min(D,Be.x),J=Math.min(J,Be.y),ve=Math.max(ve,Be.x),Ee=Math.max(Ee,Be.y);return{minX:D,minY:J,maxX:ve,maxY:Ee}}function eA(W,D){return D-W}function Zx(W,D,J,ve,Ee){let Be=[];for(let Ge=0;Ge=ve&&Sr.x>=ve||(ar.x>=ve?ar=new n(ve,ar.y+(ve-ar.x)/(Sr.x-ar.x)*(Sr.y-ar.y))._round():Sr.x>=ve&&(Sr=new n(ve,ar.y+(ve-ar.x)/(Sr.x-ar.x)*(Sr.y-ar.y))._round()),ar.y>=Ee&&Sr.y>=Ee||(ar.y>=Ee?ar=new n(ar.x+(Ee-ar.y)/(Sr.y-ar.y)*(Sr.x-ar.x),Ee)._round():Sr.y>=Ee&&(Sr=new n(ar.x+(Ee-ar.y)/(Sr.y-ar.y)*(Sr.x-ar.x),Ee)._round()),At&&ar.equals(At[At.length-1])||(At=[ar],Be.push(At)),At.push(Sr)))))}}return Be}mi("FeatureIndex",zv,{omit:["rawTileData","sourceLayerCoder"]});class Wd extends n{constructor(D,J,ve,Ee){super(D,J),this.angle=ve,Ee!==void 0&&(this.segment=Ee)}clone(){return new Wd(this.x,this.y,this.angle,this.segment)}}function G1(W,D,J,ve,Ee){if(D.segment===void 0||J===0)return!0;let Be=D,Ge=D.segment+1,ct=0;for(;ct>-J/2;){if(Ge--,Ge<0)return!1;ct-=W[Ge].dist(Be),Be=W[Ge]}ct+=W[Ge].dist(W[Ge+1]),Ge++;let At=[],Bt=0;for(;ctve;)Bt-=At.shift().angleDelta;if(Bt>Ee)return!1;Ge++,ct+=ar.dist(Sr)}return!0}function Yx(W){let D=0;for(let J=0;JBt){let ia=(Bt-At)/Wr,fa=Bn.number(Sr.x,zr.x,ia),ja=Bn.number(Sr.y,zr.y,ia),Ka=new Wd(fa,ja,zr.angleTo(Sr),ar);return Ka._round(),!Ge||G1(W,Ka,ct,Ge,D)?Ka:void 0}At+=Wr}}function rA(W,D,J,ve,Ee,Be,Ge,ct,At){let Bt=Kx(ve,Be,Ge),ar=Jx(ve,Ee),Sr=ar*Ge,zr=W[0].x===0||W[0].x===At||W[0].y===0||W[0].y===At;return D-Sr=0&&qi=0&&en=0&&zr+Bt<=ar){let qn=new Wd(qi,en,Wi,ia);qn._round(),ve&&!G1(W,qn,Be,ve,Ee)||Wr.push(qn)}}Sr+=Ka}return ct||Wr.length||Ge||(Wr=$x(W,Sr/2,J,ve,Ee,Be,Ge,!0,At)),Wr}mi("Anchor",Wd);let hm=zh;function Qx(W,D,J,ve){let Ee=[],Be=W.image,Ge=Be.pixelRatio,ct=Be.paddedRect.w-2*hm,At=Be.paddedRect.h-2*hm,Bt={x1:W.left,y1:W.top,x2:W.right,y2:W.bottom},ar=Be.stretchX||[[0,ct]],Sr=Be.stretchY||[[0,At]],zr=(bn,ls)=>bn+ls[1]-ls[0],Wr=ar.reduce(zr,0),ia=Sr.reduce(zr,0),fa=ct-Wr,ja=At-ia,Ka=0,Wi=Wr,gi=0,qi=ia,en=0,qn=fa,ko=0,ys=ja;if(Be.content&&ve){let bn=Be.content,ls=bn[2]-bn[0],No=bn[3]-bn[1];(Be.textFitWidth||Be.textFitHeight)&&(Bt=Fx(W)),Ka=Xd(ar,0,bn[0]),gi=Xd(Sr,0,bn[1]),Wi=Xd(ar,bn[0],bn[2]),qi=Xd(Sr,bn[1],bn[3]),en=bn[0]-Ka,ko=bn[1]-gi,qn=ls-Wi,ys=No-qi}let vo=Bt.x1,zn=Bt.y1,rs=Bt.x2-vo,jo=Bt.y2-zn,Bo=(bn,ls,No,Ps)=>{let Ku=Pg(bn.stretch-Ka,Wi,rs,vo),Uu=pm(bn.fixed-en,qn,bn.stretch,Wr),th=Pg(ls.stretch-gi,qi,jo,zn),Hp=pm(ls.fixed-ko,ys,ls.stretch,ia),Th=Pg(No.stretch-Ka,Wi,rs,vo),rh=pm(No.fixed-en,qn,No.stretch,Wr),Jh=Pg(Ps.stretch-gi,qi,jo,zn),$h=pm(Ps.fixed-ko,ys,Ps.stretch,ia),Qh=new n(Ku,th),ff=new n(Th,th),ah=new n(Th,Jh),Fh=new n(Ku,Jh),Ah=new n(Uu/Ge,Hp/Ge),dh=new n(rh/Ge,$h/Ge),yf=D*Math.PI/180;if(yf){let hu=Math.sin(yf),fc=Math.cos(yf),Ju=[fc,-hu,hu,fc];Qh._matMult(Ju),ff._matMult(Ju),Fh._matMult(Ju),ah._matMult(Ju)}let Rp=bn.stretch+bn.fixed,dp=ls.stretch+ls.fixed;return{tl:Qh,tr:ff,bl:Fh,br:ah,tex:{x:Be.paddedRect.x+hm+Rp,y:Be.paddedRect.y+hm+dp,w:No.stretch+No.fixed-Rp,h:Ps.stretch+Ps.fixed-dp},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:Ah,pixelOffsetBR:dh,minFontScaleX:qn/Ge/rs,minFontScaleY:ys/Ge/jo,isSDF:J}};if(ve&&(Be.stretchX||Be.stretchY)){let bn=eb(ar,fa,Wr),ls=eb(Sr,ja,ia);for(let No=0;No0&&(fa=Math.max(10,fa),this.circleDiameter=fa)}else{let zr=!((Sr=Ge.image)===null||Sr===void 0)&&Sr.content&&(Ge.image.textFitWidth||Ge.image.textFitHeight)?Fx(Ge):{x1:Ge.left,y1:Ge.top,x2:Ge.right,y2:Ge.bottom};zr.y1=zr.y1*ct-At[0],zr.y2=zr.y2*ct+At[2],zr.x1=zr.x1*ct-At[3],zr.x2=zr.x2*ct+At[1];let Wr=Ge.collisionPadding;if(Wr&&(zr.x1-=Wr[0]*ct,zr.y1-=Wr[1]*ct,zr.x2+=Wr[2]*ct,zr.y2+=Wr[3]*ct),ar){let ia=new n(zr.x1,zr.y1),fa=new n(zr.x2,zr.y1),ja=new n(zr.x1,zr.y2),Ka=new n(zr.x2,zr.y2),Wi=ar*Math.PI/180;ia._rotate(Wi),fa._rotate(Wi),ja._rotate(Wi),Ka._rotate(Wi),zr.x1=Math.min(ia.x,fa.x,ja.x,Ka.x),zr.x2=Math.max(ia.x,fa.x,ja.x,Ka.x),zr.y1=Math.min(ia.y,fa.y,ja.y,Ka.y),zr.y2=Math.max(ia.y,fa.y,ja.y,Ka.y)}D.emplaceBack(J.x,J.y,zr.x1,zr.y1,zr.x2,zr.y2,ve,Ee,Be)}this.boxEndIndex=D.length}}class cd{constructor(D=[],J=(ve,Ee)=>veEe?1:0){if(this.data=D,this.length=this.data.length,this.compare=J,this.length>0)for(let ve=(this.length>>1)-1;ve>=0;ve--)this._down(ve)}push(D){this.data.push(D),this._up(this.length++)}pop(){if(this.length===0)return;let D=this.data[0],J=this.data.pop();return--this.length>0&&(this.data[0]=J,this._down(0)),D}peek(){return this.data[0]}_up(D){let{data:J,compare:ve}=this,Ee=J[D];for(;D>0;){let Be=D-1>>1,Ge=J[Be];if(ve(Ee,Ge)>=0)break;J[D]=Ge,D=Be}J[D]=Ee}_down(D){let{data:J,compare:ve}=this,Ee=this.length>>1,Be=J[D];for(;D=0)break;J[D]=J[Ge],D=Ge}J[D]=Be}}function aA(W,D=1,J=!1){let ve=1/0,Ee=1/0,Be=-1/0,Ge=-1/0,ct=W[0];for(let Wr=0;WrBe)&&(Be=ia.x),(!Wr||ia.y>Ge)&&(Ge=ia.y)}let At=Math.min(Be-ve,Ge-Ee),Bt=At/2,ar=new cd([],iA);if(At===0)return new n(ve,Ee);for(let Wr=ve;WrSr.d||!Sr.d)&&(Sr=Wr,J&&console.log("found best %d after %d probes",Math.round(1e4*Wr.d)/1e4,zr)),Wr.max-Sr.d<=D||(Bt=Wr.h/2,ar.push(new dm(Wr.p.x-Bt,Wr.p.y-Bt,Bt,W)),ar.push(new dm(Wr.p.x+Bt,Wr.p.y-Bt,Bt,W)),ar.push(new dm(Wr.p.x-Bt,Wr.p.y+Bt,Bt,W)),ar.push(new dm(Wr.p.x+Bt,Wr.p.y+Bt,Bt,W)),zr+=4)}return J&&(console.log(`num probes: ${zr}`),console.log(`best distance: ${Sr.d}`)),Sr.p}function iA(W,D){return D.max-W.max}function dm(W,D,J,ve){this.p=new n(W,D),this.h=J,this.d=function(Ee,Be){let Ge=!1,ct=1/0;for(let At=0;AtEe.y!=ia.y>Ee.y&&Ee.x<(ia.x-Wr.x)*(Ee.y-Wr.y)/(ia.y-Wr.y)+Wr.x&&(Ge=!Ge),ct=Math.min(ct,ya(Ee,Wr,ia))}}return(Ge?1:-1)*Math.sqrt(ct)}(this.p,ve),this.max=this.d+this.h*Math.SQRT2}var wh;e.aq=void 0,(wh=e.aq||(e.aq={}))[wh.center=1]="center",wh[wh.left=2]="left",wh[wh.right=3]="right",wh[wh.top=4]="top",wh[wh.bottom=5]="bottom",wh[wh["top-left"]=6]="top-left",wh[wh["top-right"]=7]="top-right",wh[wh["bottom-left"]=8]="bottom-left",wh[wh["bottom-right"]=9]="bottom-right";let pv=7,Fv=Number.POSITIVE_INFINITY;function H1(W,D){return D[1]!==Fv?function(J,ve,Ee){let Be=0,Ge=0;switch(ve=Math.abs(ve),Ee=Math.abs(Ee),J){case"top-right":case"top-left":case"top":Ge=Ee-pv;break;case"bottom-right":case"bottom-left":case"bottom":Ge=-Ee+pv}switch(J){case"top-right":case"bottom-right":case"right":Be=-ve;break;case"top-left":case"bottom-left":case"left":Be=ve}return[Be,Ge]}(W,D[0],D[1]):function(J,ve){let Ee=0,Be=0;ve<0&&(ve=0);let Ge=ve/Math.SQRT2;switch(J){case"top-right":case"top-left":Be=Ge-pv;break;case"bottom-right":case"bottom-left":Be=-Ge+pv;break;case"bottom":Be=-ve+pv;break;case"top":Be=ve-pv}switch(J){case"top-right":case"bottom-right":Ee=-Ge;break;case"top-left":case"bottom-left":Ee=Ge;break;case"left":Ee=ve;break;case"right":Ee=-ve}return[Ee,Be]}(W,D[0])}function tb(W,D,J){var ve;let Ee=W.layout,Be=(ve=Ee.get("text-variable-anchor-offset"))===null||ve===void 0?void 0:ve.evaluate(D,{},J);if(Be){let ct=Be.values,At=[];for(let Bt=0;Btzr*fu);ar.startsWith("top")?Sr[1]-=pv:ar.startsWith("bottom")&&(Sr[1]+=pv),At[Bt+1]=Sr}return new $a(At)}let Ge=Ee.get("text-variable-anchor");if(Ge){let ct;ct=W._unevaluatedLayout.getValue("text-radial-offset")!==void 0?[Ee.get("text-radial-offset").evaluate(D,{},J)*fu,Fv]:Ee.get("text-offset").evaluate(D,{},J).map(Bt=>Bt*fu);let At=[];for(let Bt of Ge)At.push(Bt,H1(Bt,ct));return new $a(At)}return null}function W1(W){switch(W){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function nA(W,D,J,ve,Ee,Be,Ge,ct,At,Bt,ar){let Sr=Be.textMaxSize.evaluate(D,{});Sr===void 0&&(Sr=Ge);let zr=W.layers[0].layout,Wr=zr.get("icon-offset").evaluate(D,{},ar),ia=ab(J.horizontal),fa=Ge/24,ja=W.tilePixelRatio*fa,Ka=W.tilePixelRatio*Sr/24,Wi=W.tilePixelRatio*ct,gi=W.tilePixelRatio*zr.get("symbol-spacing"),qi=zr.get("text-padding")*W.tilePixelRatio,en=function(bn,ls,No,Ps=1){let Ku=bn.get("icon-padding").evaluate(ls,{},No),Uu=Ku&&Ku.values;return[Uu[0]*Ps,Uu[1]*Ps,Uu[2]*Ps,Uu[3]*Ps]}(zr,D,ar,W.tilePixelRatio),qn=zr.get("text-max-angle")/180*Math.PI,ko=zr.get("text-rotation-alignment")!=="viewport"&&zr.get("symbol-placement")!=="point",ys=zr.get("icon-rotation-alignment")==="map"&&zr.get("symbol-placement")!=="point",vo=zr.get("symbol-placement"),zn=gi/2,rs=zr.get("icon-text-fit"),jo;ve&&rs!=="none"&&(W.allowVerticalPlacement&&J.vertical&&(jo=Ox(ve,J.vertical,rs,zr.get("icon-text-fit-padding"),Wr,fa)),ia&&(ve=Ox(ve,ia,rs,zr.get("icon-text-fit-padding"),Wr,fa)));let Bo=(bn,ls)=>{ls.x<0||ls.x>=po||ls.y<0||ls.y>=po||function(No,Ps,Ku,Uu,th,Hp,Th,rh,Jh,$h,Qh,ff,ah,Fh,Ah,dh,yf,Rp,dp,hu,fc,Ju,Dp,$c,vm){let _d=No.addToLineVertexArray(Ps,Ku),fd,Wp,zc,Pf,Xp=0,Zd=0,vp=0,mm=0,J1=-1,zg=-1,xd={},Ov=ti("");if(No.allowVerticalPlacement&&Uu.vertical){let Oh=rh.layout.get("text-rotate").evaluate(fc,{},$c)+90;zc=new hv(Jh,Ps,$h,Qh,ff,Uu.vertical,ah,Fh,Ah,Oh),Th&&(Pf=new hv(Jh,Ps,$h,Qh,ff,Th,yf,Rp,Ah,Oh))}if(th){let Oh=rh.layout.get("icon-rotate").evaluate(fc,{}),Zp=rh.layout.get("icon-text-fit")!=="none",dv=Qx(th,Oh,Dp,Zp),ep=Th?Qx(Th,Oh,Dp,Zp):void 0;Wp=new hv(Jh,Ps,$h,Qh,ff,th,yf,Rp,!1,Oh),Xp=4*dv.length;let Bh=No.iconSizeData,id=null;Bh.kind==="source"?(id=[yd*rh.layout.get("icon-size").evaluate(fc,{})],id[0]>cv&&m(`${No.layerIds[0]}: Value for "icon-size" is >= ${k0}. Reduce your "icon-size".`)):Bh.kind==="composite"&&(id=[yd*Ju.compositeIconSizes[0].evaluate(fc,{},$c),yd*Ju.compositeIconSizes[1].evaluate(fc,{},$c)],(id[0]>cv||id[1]>cv)&&m(`${No.layerIds[0]}: Value for "icon-size" is >= ${k0}. Reduce your "icon-size".`)),No.addSymbols(No.icon,dv,id,hu,dp,fc,e.ah.none,Ps,_d.lineStartIndex,_d.lineLength,-1,$c),J1=No.icon.placedSymbolArray.length-1,ep&&(Zd=4*ep.length,No.addSymbols(No.icon,ep,id,hu,dp,fc,e.ah.vertical,Ps,_d.lineStartIndex,_d.lineLength,-1,$c),zg=No.icon.placedSymbolArray.length-1)}let vh=Object.keys(Uu.horizontal);for(let Oh of vh){let Zp=Uu.horizontal[Oh];if(!fd){Ov=ti(Zp.text);let ep=rh.layout.get("text-rotate").evaluate(fc,{},$c);fd=new hv(Jh,Ps,$h,Qh,ff,Zp,ah,Fh,Ah,ep)}let dv=Zp.positionedLines.length===1;if(vp+=rb(No,Ps,Zp,Hp,rh,Ah,fc,dh,_d,Uu.vertical?e.ah.horizontal:e.ah.horizontalOnly,dv?vh:[Oh],xd,J1,Ju,$c),dv)break}Uu.vertical&&(mm+=rb(No,Ps,Uu.vertical,Hp,rh,Ah,fc,dh,_d,e.ah.vertical,["vertical"],xd,zg,Ju,$c));let lA=fd?fd.boxStartIndex:No.collisionBoxArray.length,Fg=fd?fd.boxEndIndex:No.collisionBoxArray.length,bd=zc?zc.boxStartIndex:No.collisionBoxArray.length,mp=zc?zc.boxEndIndex:No.collisionBoxArray.length,sb=Wp?Wp.boxStartIndex:No.collisionBoxArray.length,uA=Wp?Wp.boxEndIndex:No.collisionBoxArray.length,lb=Pf?Pf.boxStartIndex:No.collisionBoxArray.length,cA=Pf?Pf.boxEndIndex:No.collisionBoxArray.length,ad=-1,B0=(Oh,Zp)=>Oh&&Oh.circleDiameter?Math.max(Oh.circleDiameter,Zp):Zp;ad=B0(fd,ad),ad=B0(zc,ad),ad=B0(Wp,ad),ad=B0(Pf,ad);let Og=ad>-1?1:0;Og&&(ad*=vm/fu),No.glyphOffsetArray.length>=cm.MAX_GLYPHS&&m("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),fc.sortKey!==void 0&&No.addToSortKeyRanges(No.symbolInstances.length,fc.sortKey);let $1=tb(rh,fc,$c),[fA,hA]=function(Oh,Zp){let dv=Oh.length,ep=Zp?.values;if(ep?.length>0)for(let Bh=0;Bh=0?xd.right:-1,xd.center>=0?xd.center:-1,xd.left>=0?xd.left:-1,xd.vertical||-1,J1,zg,Ov,lA,Fg,bd,mp,sb,uA,lb,cA,$h,vp,mm,Xp,Zd,Og,0,ah,ad,fA,hA)}(W,ls,bn,J,ve,Ee,jo,W.layers[0],W.collisionBoxArray,D.index,D.sourceLayerIndex,W.index,ja,[qi,qi,qi,qi],ko,At,Wi,en,ys,Wr,D,Be,Bt,ar,Ge)};if(vo==="line")for(let bn of Zx(D.geometry,0,0,po,po)){let ls=rA(bn,gi,qn,J.vertical||ia,ve,24,Ka,W.overscaling,po);for(let No of ls)ia&&oA(W,ia.text,zn,No)||Bo(bn,No)}else if(vo==="line-center"){for(let bn of D.geometry)if(bn.length>1){let ls=tA(bn,qn,J.vertical||ia,ve,24,Ka);ls&&Bo(bn,ls)}}else if(D.type==="Polygon")for(let bn of Tc(D.geometry,0)){let ls=aA(bn,16);Bo(bn[0],new Wd(ls.x,ls.y,0))}else if(D.type==="LineString")for(let bn of D.geometry)Bo(bn,new Wd(bn[0].x,bn[0].y,0));else if(D.type==="Point")for(let bn of D.geometry)for(let ls of bn)Bo([ls],new Wd(ls.x,ls.y,0))}function rb(W,D,J,ve,Ee,Be,Ge,ct,At,Bt,ar,Sr,zr,Wr,ia){let fa=function(Wi,gi,qi,en,qn,ko,ys,vo){let zn=en.layout.get("text-rotate").evaluate(ko,{})*Math.PI/180,rs=[];for(let jo of gi.positionedLines)for(let Bo of jo.positionedGlyphs){if(!Bo.rect)continue;let bn=Bo.rect||{},ls=Ix+1,No=!0,Ps=1,Ku=0,Uu=(qn||vo)&&Bo.vertical,th=Bo.metrics.advance*Bo.scale/2;if(vo&&gi.verticalizable&&(Ku=jo.lineOffset/2-(Bo.imageName?-(fu-Bo.metrics.width*Bo.scale)/2:(Bo.scale-1)*fu)),Bo.imageName){let hu=ys[Bo.imageName];No=hu.sdf,Ps=hu.pixelRatio,ls=zh/Ps}let Hp=qn?[Bo.x+th,Bo.y]:[0,0],Th=qn?[0,0]:[Bo.x+th+qi[0],Bo.y+qi[1]-Ku],rh=[0,0];Uu&&(rh=Th,Th=[0,0]);let Jh=Bo.metrics.isDoubleResolution?2:1,$h=(Bo.metrics.left-ls)*Bo.scale-th+Th[0],Qh=(-Bo.metrics.top-ls)*Bo.scale+Th[1],ff=$h+bn.w/Jh*Bo.scale/Ps,ah=Qh+bn.h/Jh*Bo.scale/Ps,Fh=new n($h,Qh),Ah=new n(ff,Qh),dh=new n($h,ah),yf=new n(ff,ah);if(Uu){let hu=new n(-th,th-eh),fc=-Math.PI/2,Ju=fu/2-th,Dp=new n(5-eh-Ju,-(Bo.imageName?Ju:0)),$c=new n(...rh);Fh._rotateAround(fc,hu)._add(Dp)._add($c),Ah._rotateAround(fc,hu)._add(Dp)._add($c),dh._rotateAround(fc,hu)._add(Dp)._add($c),yf._rotateAround(fc,hu)._add(Dp)._add($c)}if(zn){let hu=Math.sin(zn),fc=Math.cos(zn),Ju=[fc,-hu,hu,fc];Fh._matMult(Ju),Ah._matMult(Ju),dh._matMult(Ju),yf._matMult(Ju)}let Rp=new n(0,0),dp=new n(0,0);rs.push({tl:Fh,tr:Ah,bl:dh,br:yf,tex:bn,writingMode:gi.writingMode,glyphOffset:Hp,sectionIndex:Bo.sectionIndex,isSDF:No,pixelOffsetTL:Rp,pixelOffsetBR:dp,minFontScaleX:0,minFontScaleY:0})}return rs}(0,J,ct,Ee,Be,Ge,ve,W.allowVerticalPlacement),ja=W.textSizeData,Ka=null;ja.kind==="source"?(Ka=[yd*Ee.layout.get("text-size").evaluate(Ge,{})],Ka[0]>cv&&m(`${W.layerIds[0]}: Value for "text-size" is >= ${k0}. Reduce your "text-size".`)):ja.kind==="composite"&&(Ka=[yd*Wr.compositeTextSizes[0].evaluate(Ge,{},ia),yd*Wr.compositeTextSizes[1].evaluate(Ge,{},ia)],(Ka[0]>cv||Ka[1]>cv)&&m(`${W.layerIds[0]}: Value for "text-size" is >= ${k0}. Reduce your "text-size".`)),W.addSymbols(W.text,fa,Ka,ct,Be,Ge,Bt,D,At.lineStartIndex,At.lineLength,zr,ia);for(let Wi of ar)Sr[Wi]=W.text.placedSymbolArray.length-1;return 4*fa.length}function ab(W){for(let D in W)return W[D];return null}function oA(W,D,J,ve){let Ee=W.compareText;if(D in Ee){let Be=Ee[D];for(let Ge=Be.length-1;Ge>=0;Ge--)if(ve.dist(Be[Ge])>4;if(Ee!==1)throw new Error(`Got v${Ee} data when expected v1.`);let Be=ib[15&ve];if(!Be)throw new Error("Unrecognized array type.");let[Ge]=new Uint16Array(D,2,1),[ct]=new Uint32Array(D,4,1);return new X1(ct,Ge,Be,D)}constructor(D,J=64,ve=Float64Array,Ee){if(isNaN(D)||D<0)throw new Error(`Unpexpected numItems value: ${D}.`);this.numItems=+D,this.nodeSize=Math.min(Math.max(+J,2),65535),this.ArrayType=ve,this.IndexArrayType=D<65536?Uint16Array:Uint32Array;let Be=ib.indexOf(this.ArrayType),Ge=2*D*this.ArrayType.BYTES_PER_ELEMENT,ct=D*this.IndexArrayType.BYTES_PER_ELEMENT,At=(8-ct%8)%8;if(Be<0)throw new Error(`Unexpected typed array class: ${ve}.`);Ee&&Ee instanceof ArrayBuffer?(this.data=Ee,this.ids=new this.IndexArrayType(this.data,8,D),this.coords=new this.ArrayType(this.data,8+ct+At,2*D),this._pos=2*D,this._finished=!0):(this.data=new ArrayBuffer(8+Ge+ct+At),this.ids=new this.IndexArrayType(this.data,8,D),this.coords=new this.ArrayType(this.data,8+ct+At,2*D),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+Be]),new Uint16Array(this.data,2,1)[0]=J,new Uint32Array(this.data,4,1)[0]=D)}add(D,J){let ve=this._pos>>1;return this.ids[ve]=ve,this.coords[this._pos++]=D,this.coords[this._pos++]=J,ve}finish(){let D=this._pos>>1;if(D!==this.numItems)throw new Error(`Added ${D} items when expected ${this.numItems}.`);return Ig(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(D,J,ve,Ee){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:Be,coords:Ge,nodeSize:ct}=this,At=[0,Be.length-1,0],Bt=[];for(;At.length;){let ar=At.pop()||0,Sr=At.pop()||0,zr=At.pop()||0;if(Sr-zr<=ct){for(let ja=zr;ja<=Sr;ja++){let Ka=Ge[2*ja],Wi=Ge[2*ja+1];Ka>=D&&Ka<=ve&&Wi>=J&&Wi<=Ee&&Bt.push(Be[ja])}continue}let Wr=zr+Sr>>1,ia=Ge[2*Wr],fa=Ge[2*Wr+1];ia>=D&&ia<=ve&&fa>=J&&fa<=Ee&&Bt.push(Be[Wr]),(ar===0?D<=ia:J<=fa)&&(At.push(zr),At.push(Wr-1),At.push(1-ar)),(ar===0?ve>=ia:Ee>=fa)&&(At.push(Wr+1),At.push(Sr),At.push(1-ar))}return Bt}within(D,J,ve){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:Ee,coords:Be,nodeSize:Ge}=this,ct=[0,Ee.length-1,0],At=[],Bt=ve*ve;for(;ct.length;){let ar=ct.pop()||0,Sr=ct.pop()||0,zr=ct.pop()||0;if(Sr-zr<=Ge){for(let ja=zr;ja<=Sr;ja++)ob(Be[2*ja],Be[2*ja+1],D,J)<=Bt&&At.push(Ee[ja]);continue}let Wr=zr+Sr>>1,ia=Be[2*Wr],fa=Be[2*Wr+1];ob(ia,fa,D,J)<=Bt&&At.push(Ee[Wr]),(ar===0?D-ve<=ia:J-ve<=fa)&&(ct.push(zr),ct.push(Wr-1),ct.push(1-ar)),(ar===0?D+ve>=ia:J+ve>=fa)&&(ct.push(Wr+1),ct.push(Sr),ct.push(1-ar))}return At}}function Ig(W,D,J,ve,Ee,Be){if(Ee-ve<=J)return;let Ge=ve+Ee>>1;nb(W,D,Ge,ve,Ee,Be),Ig(W,D,J,ve,Ge-1,1-Be),Ig(W,D,J,Ge+1,Ee,1-Be)}function nb(W,D,J,ve,Ee,Be){for(;Ee>ve;){if(Ee-ve>600){let Bt=Ee-ve+1,ar=J-ve+1,Sr=Math.log(Bt),zr=.5*Math.exp(2*Sr/3),Wr=.5*Math.sqrt(Sr*zr*(Bt-zr)/Bt)*(ar-Bt/2<0?-1:1);nb(W,D,J,Math.max(ve,Math.floor(J-ar*zr/Bt+Wr)),Math.min(Ee,Math.floor(J+(Bt-ar)*zr/Bt+Wr)),Be)}let Ge=D[2*J+Be],ct=ve,At=Ee;for(F0(W,D,ve,J),D[2*Ee+Be]>Ge&&F0(W,D,ve,Ee);ctGe;)At--}D[2*ve+Be]===Ge?F0(W,D,ve,At):(At++,F0(W,D,At,Ee)),At<=J&&(ve=At+1),J<=At&&(Ee=At-1)}}function F0(W,D,J,ve){Z1(W,J,ve),Z1(D,2*J,2*ve),Z1(D,2*J+1,2*ve+1)}function Z1(W,D,J){let ve=W[D];W[D]=W[J],W[J]=ve}function ob(W,D,J,ve){let Ee=W-J,Be=D-ve;return Ee*Ee+Be*Be}var Rg;e.bg=void 0,(Rg=e.bg||(e.bg={})).create="create",Rg.load="load",Rg.fullLoad="fullLoad";let O0=null,Hf=[],Y1=1e3/60,K1="loadTime",Dg="fullLoadTime",sA={mark(W){performance.mark(W)},frame(W){let D=W;O0!=null&&Hf.push(D-O0),O0=D},clearMetrics(){O0=null,Hf=[],performance.clearMeasures(K1),performance.clearMeasures(Dg);for(let W in e.bg)performance.clearMarks(e.bg[W])},getPerformanceMetrics(){performance.measure(K1,e.bg.create,e.bg.load),performance.measure(Dg,e.bg.create,e.bg.fullLoad);let W=performance.getEntriesByName(K1)[0].duration,D=performance.getEntriesByName(Dg)[0].duration,J=Hf.length,ve=1/(Hf.reduce((Be,Ge)=>Be+Ge,0)/J/1e3),Ee=Hf.filter(Be=>Be>Y1).reduce((Be,Ge)=>Be+(Ge-Y1)/Y1,0);return{loadTime:W,fullLoadTime:D,fps:ve,percentDroppedFrames:Ee/(J+Ee)*100,totalFrames:J}}};e.$=class extends Tr{},e.A=Qa,e.B=Hi,e.C=function(W){if(z==null){let D=W.navigator?W.navigator.userAgent:null;z=!!W.safari||!(!D||!(/\b(iPad|iPhone|iPod)\b/.test(D)||D.match("Safari")&&!D.match("Chrome")))}return z},e.D=fo,e.E=Q,e.F=class{constructor(W,D){this.target=W,this.mapId=D,this.resolveRejects={},this.tasks={},this.taskQueue=[],this.abortControllers={},this.messageHandlers={},this.invoker=new U1(()=>this.process()),this.subscription=function(J,ve,Ee,Be){return J.addEventListener(ve,Ee,!1),{unsubscribe:()=>{J.removeEventListener(ve,Ee,!1)}}}(this.target,"message",J=>this.receive(J)),this.globalScope=L(self)?W:window}registerMessageHandler(W,D){this.messageHandlers[W]=D}sendAsync(W,D){return new Promise((J,ve)=>{let Ee=Math.round(1e18*Math.random()).toString(36).substring(0,10);this.resolveRejects[Ee]={resolve:J,reject:ve},D&&D.signal.addEventListener("abort",()=>{delete this.resolveRejects[Ee];let ct={id:Ee,type:"",origin:location.origin,targetMapId:W.targetMapId,sourceMapId:this.mapId};this.target.postMessage(ct)},{once:!0});let Be=[],Ge=Object.assign(Object.assign({},W),{id:Ee,sourceMapId:this.mapId,origin:location.origin,data:Qn(W.data,Be)});this.target.postMessage(Ge,{transfer:Be})})}receive(W){let D=W.data,J=D.id;if(!(D.origin!=="file://"&&location.origin!=="file://"&&D.origin!=="resource://android"&&location.origin!=="resource://android"&&D.origin!==location.origin||D.targetMapId&&this.mapId!==D.targetMapId)){if(D.type===""){delete this.tasks[J];let ve=this.abortControllers[J];return delete this.abortControllers[J],void(ve&&ve.abort())}if(L(self)||D.mustQueue)return this.tasks[J]=D,this.taskQueue.push(J),void this.invoker.trigger();this.processTask(J,D)}}process(){if(this.taskQueue.length===0)return;let W=this.taskQueue.shift(),D=this.tasks[W];delete this.tasks[W],this.taskQueue.length>0&&this.invoker.trigger(),D&&this.processTask(W,D)}processTask(W,D){return t(this,void 0,void 0,function*(){if(D.type===""){let Ee=this.resolveRejects[W];return delete this.resolveRejects[W],Ee?void(D.error?Ee.reject(co(D.error)):Ee.resolve(co(D.data))):void 0}if(!this.messageHandlers[D.type])return void this.completeTask(W,new Error(`Could not find a registered handler for ${D.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));let J=co(D.data),ve=new AbortController;this.abortControllers[W]=ve;try{let Ee=yield this.messageHandlers[D.type](D.sourceMapId,J,ve);this.completeTask(W,null,Ee)}catch(Ee){this.completeTask(W,Ee)}})}completeTask(W,D,J){let ve=[];delete this.abortControllers[W];let Ee={id:W,type:"",sourceMapId:this.mapId,origin:location.origin,error:D?Qn(D):null,data:Qn(J,ve)};this.target.postMessage(Ee,{transfer:ve})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},e.G=ce,e.H=function(){var W=new Qa(16);return Qa!=Float32Array&&(W[1]=0,W[2]=0,W[3]=0,W[4]=0,W[6]=0,W[7]=0,W[8]=0,W[9]=0,W[11]=0,W[12]=0,W[13]=0,W[14]=0),W[0]=1,W[5]=1,W[10]=1,W[15]=1,W},e.I=wg,e.J=function(W,D,J){var ve,Ee,Be,Ge,ct,At,Bt,ar,Sr,zr,Wr,ia,fa=J[0],ja=J[1],Ka=J[2];return D===W?(W[12]=D[0]*fa+D[4]*ja+D[8]*Ka+D[12],W[13]=D[1]*fa+D[5]*ja+D[9]*Ka+D[13],W[14]=D[2]*fa+D[6]*ja+D[10]*Ka+D[14],W[15]=D[3]*fa+D[7]*ja+D[11]*Ka+D[15]):(Ee=D[1],Be=D[2],Ge=D[3],ct=D[4],At=D[5],Bt=D[6],ar=D[7],Sr=D[8],zr=D[9],Wr=D[10],ia=D[11],W[0]=ve=D[0],W[1]=Ee,W[2]=Be,W[3]=Ge,W[4]=ct,W[5]=At,W[6]=Bt,W[7]=ar,W[8]=Sr,W[9]=zr,W[10]=Wr,W[11]=ia,W[12]=ve*fa+ct*ja+Sr*Ka+D[12],W[13]=Ee*fa+At*ja+zr*Ka+D[13],W[14]=Be*fa+Bt*ja+Wr*Ka+D[14],W[15]=Ge*fa+ar*ja+ia*Ka+D[15]),W},e.K=function(W,D,J){var ve=J[0],Ee=J[1],Be=J[2];return W[0]=D[0]*ve,W[1]=D[1]*ve,W[2]=D[2]*ve,W[3]=D[3]*ve,W[4]=D[4]*Ee,W[5]=D[5]*Ee,W[6]=D[6]*Ee,W[7]=D[7]*Ee,W[8]=D[8]*Be,W[9]=D[9]*Be,W[10]=D[10]*Be,W[11]=D[11]*Be,W[12]=D[12],W[13]=D[13],W[14]=D[14],W[15]=D[15],W},e.L=Va,e.M=function(W,D){let J={};for(let ve=0;ve{let D=window.document.createElement("video");return D.muted=!0,new Promise(J=>{D.onloadstart=()=>{J(D)};for(let ve of W){let Ee=window.document.createElement("source");ee(ve)||(D.crossOrigin="Anonymous"),Ee.src=ve,D.appendChild(Ee)}})},e.a4=function(){return g++},e.a5=on,e.a6=cm,e.a7=Ec,e.a8=Hl,e.a9=V1,e.aA=function(W){if(W.type==="custom")return new N1(W);switch(W.type){case"background":return new QT(W);case"circle":return new Ha(W);case"fill":return new Wt(W);case"fill-extrusion":return new kp(W);case"heatmap":return new Dn(W);case"hillshade":return new bl(W);case"line":return new Lv(W);case"raster":return new I0(W);case"symbol":return new Dv(W)}},e.aB=u,e.aC=function(W,D){if(!W)return[{command:"setStyle",args:[D]}];let J=[];try{if(!Se(W.version,D.version))return[{command:"setStyle",args:[D]}];Se(W.center,D.center)||J.push({command:"setCenter",args:[D.center]}),Se(W.zoom,D.zoom)||J.push({command:"setZoom",args:[D.zoom]}),Se(W.bearing,D.bearing)||J.push({command:"setBearing",args:[D.bearing]}),Se(W.pitch,D.pitch)||J.push({command:"setPitch",args:[D.pitch]}),Se(W.sprite,D.sprite)||J.push({command:"setSprite",args:[D.sprite]}),Se(W.glyphs,D.glyphs)||J.push({command:"setGlyphs",args:[D.glyphs]}),Se(W.transition,D.transition)||J.push({command:"setTransition",args:[D.transition]}),Se(W.light,D.light)||J.push({command:"setLight",args:[D.light]}),Se(W.terrain,D.terrain)||J.push({command:"setTerrain",args:[D.terrain]}),Se(W.sky,D.sky)||J.push({command:"setSky",args:[D.sky]}),Se(W.projection,D.projection)||J.push({command:"setProjection",args:[D.projection]});let ve={},Ee=[];(function(Ge,ct,At,Bt){let ar;for(ar in ct=ct||{},Ge=Ge||{})Object.prototype.hasOwnProperty.call(Ge,ar)&&(Object.prototype.hasOwnProperty.call(ct,ar)||We(ar,At,Bt));for(ar in ct)Object.prototype.hasOwnProperty.call(ct,ar)&&(Object.prototype.hasOwnProperty.call(Ge,ar)?Se(Ge[ar],ct[ar])||(Ge[ar].type==="geojson"&&ct[ar].type==="geojson"&&nt(Ge,ct,ar)?Ie(At,{command:"setGeoJSONSourceData",args:[ar,ct[ar].data]}):at(ar,ct,At,Bt)):Re(ar,ct,At))})(W.sources,D.sources,Ee,ve);let Be=[];W.layers&&W.layers.forEach(Ge=>{"source"in Ge&&ve[Ge.source]?J.push({command:"removeLayer",args:[Ge.id]}):Be.push(Ge)}),J=J.concat(Ee),function(Ge,ct,At){ct=ct||[];let Bt=(Ge=Ge||[]).map(qe),ar=ct.map(qe),Sr=Ge.reduce(he,{}),zr=ct.reduce(he,{}),Wr=Bt.slice(),ia=Object.create(null),fa,ja,Ka,Wi,gi;for(let qi=0,en=0;qi@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(J,ve,Ee,Be)=>{let Ge=Ee||Be;return D[ve]=!Ge||Ge.toLowerCase(),""}),D["max-age"]){let J=parseInt(D["max-age"],10);isNaN(J)?delete D["max-age"]:D["max-age"]=J}return D},e.ab=function(W,D){let J=[];for(let ve in W)ve in D||J.push(ve);return J},e.ac=w,e.ad=function(W,D,J){var ve=Math.sin(J),Ee=Math.cos(J),Be=D[0],Ge=D[1],ct=D[2],At=D[3],Bt=D[4],ar=D[5],Sr=D[6],zr=D[7];return D!==W&&(W[8]=D[8],W[9]=D[9],W[10]=D[10],W[11]=D[11],W[12]=D[12],W[13]=D[13],W[14]=D[14],W[15]=D[15]),W[0]=Be*Ee+Bt*ve,W[1]=Ge*Ee+ar*ve,W[2]=ct*Ee+Sr*ve,W[3]=At*Ee+zr*ve,W[4]=Bt*Ee-Be*ve,W[5]=ar*Ee-Ge*ve,W[6]=Sr*Ee-ct*ve,W[7]=zr*Ee-At*ve,W},e.ae=function(W){var D=new Qa(16);return D[0]=W[0],D[1]=W[1],D[2]=W[2],D[3]=W[3],D[4]=W[4],D[5]=W[5],D[6]=W[6],D[7]=W[7],D[8]=W[8],D[9]=W[9],D[10]=W[10],D[11]=W[11],D[12]=W[12],D[13]=W[13],D[14]=W[14],D[15]=W[15],D},e.af=hn,e.ag=function(W,D){let J=0,ve=0;if(W.kind==="constant")ve=W.layoutSize;else if(W.kind!=="source"){let{interpolationType:Ee,minZoom:Be,maxZoom:Ge}=W,ct=Ee?w(ao.interpolationFactor(Ee,D,Be,Ge),0,1):0;W.kind==="camera"?ve=Bn.number(W.minSize,W.maxSize,ct):J=ct}return{uSizeT:J,uSize:ve}},e.ai=function(W,{uSize:D,uSizeT:J},{lowerSize:ve,upperSize:Ee}){return W.kind==="source"?ve/yd:W.kind==="composite"?Bn.number(ve/yd,Ee/yd,J):D},e.aj=z1,e.ak=function(W,D,J,ve){let Ee=D.y-W.y,Be=D.x-W.x,Ge=ve.y-J.y,ct=ve.x-J.x,At=Ge*Be-ct*Ee;if(At===0)return null;let Bt=(ct*(W.y-J.y)-Ge*(W.x-J.x))/At;return new n(W.x+Bt*Be,W.y+Bt*Ee)},e.al=Zx,e.am=_c,e.an=di,e.ao=function(W){let D=1/0,J=1/0,ve=-1/0,Ee=-1/0;for(let Be of W)D=Math.min(D,Be.x),J=Math.min(J,Be.y),ve=Math.max(ve,Be.x),Ee=Math.max(Ee,Be.y);return[D,J,ve,Ee]},e.ap=fu,e.ar=D1,e.as=function(W,D){var J=D[0],ve=D[1],Ee=D[2],Be=D[3],Ge=D[4],ct=D[5],At=D[6],Bt=D[7],ar=D[8],Sr=D[9],zr=D[10],Wr=D[11],ia=D[12],fa=D[13],ja=D[14],Ka=D[15],Wi=J*ct-ve*Ge,gi=J*At-Ee*Ge,qi=J*Bt-Be*Ge,en=ve*At-Ee*ct,qn=ve*Bt-Be*ct,ko=Ee*Bt-Be*At,ys=ar*fa-Sr*ia,vo=ar*ja-zr*ia,zn=ar*Ka-Wr*ia,rs=Sr*ja-zr*fa,jo=Sr*Ka-Wr*fa,Bo=zr*Ka-Wr*ja,bn=Wi*Bo-gi*jo+qi*rs+en*zn-qn*vo+ko*ys;return bn?(W[0]=(ct*Bo-At*jo+Bt*rs)*(bn=1/bn),W[1]=(Ee*jo-ve*Bo-Be*rs)*bn,W[2]=(fa*ko-ja*qn+Ka*en)*bn,W[3]=(zr*qn-Sr*ko-Wr*en)*bn,W[4]=(At*zn-Ge*Bo-Bt*vo)*bn,W[5]=(J*Bo-Ee*zn+Be*vo)*bn,W[6]=(ja*qi-ia*ko-Ka*gi)*bn,W[7]=(ar*ko-zr*qi+Wr*gi)*bn,W[8]=(Ge*jo-ct*zn+Bt*ys)*bn,W[9]=(ve*zn-J*jo-Be*ys)*bn,W[10]=(ia*qn-fa*qi+Ka*Wi)*bn,W[11]=(Sr*qi-ar*qn-Wr*Wi)*bn,W[12]=(ct*vo-Ge*rs-At*ys)*bn,W[13]=(J*rs-ve*vo+Ee*ys)*bn,W[14]=(fa*gi-ia*en-ja*Wi)*bn,W[15]=(ar*en-Sr*gi+zr*Wi)*bn,W):null},e.at=W1,e.au=Mg,e.av=X1,e.aw=function(){let W={},D=re.$version;for(let J in re.$root){let ve=re.$root[J];if(ve.required){let Ee=null;Ee=J==="version"?D:ve.type==="array"?[]:{},Ee!=null&&(W[J]=Ee)}}return W},e.ax=Tn,e.ay=G,e.az=function(W){W=W.slice();let D=Object.create(null);for(let J=0;J25||ve<0||ve>=1||J<0||J>=1)},e.bc=function(W,D){return W[0]=D[0],W[1]=0,W[2]=0,W[3]=0,W[4]=0,W[5]=D[1],W[6]=0,W[7]=0,W[8]=0,W[9]=0,W[10]=D[2],W[11]=0,W[12]=0,W[13]=0,W[14]=0,W[15]=1,W},e.bd=class extends $t{},e.be=j1,e.bf=sA,e.bh=de,e.bi=function(W,D){$.REGISTERED_PROTOCOLS[W]=D},e.bj=function(W){delete $.REGISTERED_PROTOCOLS[W]},e.bk=function(W,D){let J={};for(let Ee=0;EeBo*fu)}let vo=Ge?"center":J.get("text-justify").evaluate(Bt,{},W.canonical),zn=J.get("symbol-placement")==="point"?J.get("text-max-width").evaluate(Bt,{},W.canonical)*fu:1/0,rs=()=>{W.bucket.allowVerticalPlacement&&go(qi)&&(ia.vertical=M0(fa,W.glyphMap,W.glyphPositions,W.imagePositions,ar,zn,Be,ko,"left",qn,Ka,e.ah.vertical,!0,zr,Sr))};if(!Ge&&ys){let jo=new Set;if(vo==="auto")for(let bn=0;bnt(void 0,void 0,void 0,function*(){if(W.byteLength===0)return createImageBitmap(new ImageData(1,1));let D=new Blob([new Uint8Array(W)],{type:"image/png"});try{return createImageBitmap(D)}catch(J){throw new Error(`Could not load image because of ${J.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`)}}),e.e=M,e.f=W=>new Promise((D,J)=>{let ve=new Image;ve.onload=()=>{D(ve),URL.revokeObjectURL(ve.src),ve.onload=null,window.requestAnimationFrame(()=>{ve.src=N})},ve.onerror=()=>J(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."));let Ee=new Blob([new Uint8Array(W)],{type:"image/png"});ve.src=W.byteLength?URL.createObjectURL(Ee):N}),e.g=le,e.h=(W,D)=>Y(M(W,{type:"json"}),D),e.i=L,e.j=j,e.k=ae,e.l=(W,D)=>Y(M(W,{type:"arrayBuffer"}),D),e.m=Y,e.n=function(W){return new P1(W).readFields(mk,[])},e.o=Rn,e.p=R1,e.q=Fe,e.r=Ci,e.s=ee,e.t=Pi,e.u=li,e.v=re,e.w=m,e.x=function([W,D,J]){return D+=90,D*=Math.PI/180,J*=Math.PI/180,{x:W*Math.cos(D)*Math.sin(J),y:W*Math.sin(D)*Math.sin(J),z:W*Math.cos(J)}},e.y=Bn,e.z=Ds}),S("worker",["./shared"],function(e){"use strict";class t{constructor(Oe){this.keyCache={},Oe&&this.replace(Oe)}replace(Oe){this._layerConfigs={},this._layers={},this.update(Oe,[])}update(Oe,Je){for(let Le of Oe){this._layerConfigs[Le.id]=Le;let Ue=this._layers[Le.id]=e.aA(Le);Ue._featureFilter=e.a7(Ue.filter),this.keyCache[Le.id]&&delete this.keyCache[Le.id]}for(let Le of Je)delete this.keyCache[Le],delete this._layerConfigs[Le],delete this._layers[Le];this.familiesBySource={};let Ae=e.bk(Object.values(this._layerConfigs),this.keyCache);for(let Le of Ae){let Ue=Le.map(Pt=>this._layers[Pt.id]),Ze=Ue[0];if(Ze.visibility==="none")continue;let st=Ze.source||"",ut=this.familiesBySource[st];ut||(ut=this.familiesBySource[st]={});let Ut=Ze.sourceLayer||"_geojsonTileLayer",Ct=ut[Ut];Ct||(Ct=ut[Ut]=[]),Ct.push(Ue)}}}class r{constructor(Oe){let Je={},Ae=[];for(let st in Oe){let ut=Oe[st],Ut=Je[st]={};for(let Ct in ut){let Pt=ut[+Ct];if(!Pt||Pt.bitmap.width===0||Pt.bitmap.height===0)continue;let jt={x:0,y:0,w:Pt.bitmap.width+2,h:Pt.bitmap.height+2};Ae.push(jt),Ut[Ct]={rect:jt,metrics:Pt.metrics}}}let{w:Le,h:Ue}=e.p(Ae),Ze=new e.o({width:Le||1,height:Ue||1});for(let st in Oe){let ut=Oe[st];for(let Ut in ut){let Ct=ut[+Ut];if(!Ct||Ct.bitmap.width===0||Ct.bitmap.height===0)continue;let Pt=Je[st][Ut].rect;e.o.copy(Ct.bitmap,Ze,{x:0,y:0},{x:Pt.x+1,y:Pt.y+1},Ct.bitmap)}}this.image=Ze,this.positions=Je}}e.bl("GlyphAtlas",r);class o{constructor(Oe){this.tileID=new e.S(Oe.tileID.overscaledZ,Oe.tileID.wrap,Oe.tileID.canonical.z,Oe.tileID.canonical.x,Oe.tileID.canonical.y),this.uid=Oe.uid,this.zoom=Oe.zoom,this.pixelRatio=Oe.pixelRatio,this.tileSize=Oe.tileSize,this.source=Oe.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=Oe.showCollisionBoxes,this.collectResourceTiming=!!Oe.collectResourceTiming,this.returnDependencies=!!Oe.returnDependencies,this.promoteId=Oe.promoteId,this.inFlightDependencies=[]}parse(Oe,Je,Ae,Le){return e._(this,void 0,void 0,function*(){this.status="parsing",this.data=Oe,this.collisionBoxArray=new e.a5;let Ue=new e.bm(Object.keys(Oe.layers).sort()),Ze=new e.bn(this.tileID,this.promoteId);Ze.bucketLayerIDs=[];let st={},ut={featureIndex:Ze,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:Ae},Ut=Je.familiesBySource[this.source];for(let Wa in Ut){let Ca=Oe.layers[Wa];if(!Ca)continue;Ca.version===1&&e.w(`Vector tile source "${this.source}" layer "${Wa}" does not use vector tile spec v2 and therefore may have some rendering errors.`);let hi=Ue.encode(Wa),wi=[];for(let Kt=0;Kt=Dt.maxzoom||Dt.visibility!=="none"&&(a(Kt,this.zoom,Ae),(st[Dt.id]=Dt.createBucket({index:Ze.bucketLayerIDs.length,layers:Kt,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:hi,sourceID:this.source})).populate(wi,ut,this.tileID.canonical),Ze.bucketLayerIDs.push(Kt.map(Yt=>Yt.id)))}}let Ct=e.aF(ut.glyphDependencies,Wa=>Object.keys(Wa).map(Number));this.inFlightDependencies.forEach(Wa=>Wa?.abort()),this.inFlightDependencies=[];let Pt=Promise.resolve({});if(Object.keys(Ct).length){let Wa=new AbortController;this.inFlightDependencies.push(Wa),Pt=Le.sendAsync({type:"GG",data:{stacks:Ct,source:this.source,tileID:this.tileID,type:"glyphs"}},Wa)}let jt=Object.keys(ut.iconDependencies),fr=Promise.resolve({});if(jt.length){let Wa=new AbortController;this.inFlightDependencies.push(Wa),fr=Le.sendAsync({type:"GI",data:{icons:jt,source:this.source,tileID:this.tileID,type:"icons"}},Wa)}let ur=Object.keys(ut.patternDependencies),sr=Promise.resolve({});if(ur.length){let Wa=new AbortController;this.inFlightDependencies.push(Wa),sr=Le.sendAsync({type:"GI",data:{icons:ur,source:this.source,tileID:this.tileID,type:"patterns"}},Wa)}let[Pr,Ta,Oa]=yield Promise.all([Pt,fr,sr]),Ia=new r(Pr),qa=new e.bo(Ta,Oa);for(let Wa in st){let Ca=st[Wa];Ca instanceof e.a6?(a(Ca.layers,this.zoom,Ae),e.bp({bucket:Ca,glyphMap:Pr,glyphPositions:Ia.positions,imageMap:Ta,imagePositions:qa.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical})):Ca.hasPattern&&(Ca instanceof e.bq||Ca instanceof e.br||Ca instanceof e.bs)&&(a(Ca.layers,this.zoom,Ae),Ca.addFeatures(ut,this.tileID.canonical,qa.patternPositions))}return this.status="done",{buckets:Object.values(st).filter(Wa=>!Wa.isEmpty()),featureIndex:Ze,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:Ia.image,imageAtlas:qa,glyphMap:this.returnDependencies?Pr:null,iconMap:this.returnDependencies?Ta:null,glyphPositions:this.returnDependencies?Ia.positions:null}})}}function a(_t,Oe,Je){let Ae=new e.z(Oe);for(let Le of _t)Le.recalculate(Ae,Je)}class n{constructor(Oe,Je,Ae){this.actor=Oe,this.layerIndex=Je,this.availableImages=Ae,this.fetching={},this.loading={},this.loaded={}}loadVectorTile(Oe,Je){return e._(this,void 0,void 0,function*(){let Ae=yield e.l(Oe.request,Je);try{return{vectorTile:new e.bt.VectorTile(new e.bu(Ae.data)),rawData:Ae.data,cacheControl:Ae.cacheControl,expires:Ae.expires}}catch(Le){let Ue=new Uint8Array(Ae.data),Ze=`Unable to parse the tile at ${Oe.request.url}, `;throw Ze+=Ue[0]===31&&Ue[1]===139?"please make sure the data is not gzipped and that you have configured the relevant header in the server":`got error: ${Le.message}`,new Error(Ze)}})}loadTile(Oe){return e._(this,void 0,void 0,function*(){let Je=Oe.uid,Ae=!!(Oe&&Oe.request&&Oe.request.collectResourceTiming)&&new e.bv(Oe.request),Le=new o(Oe);this.loading[Je]=Le;let Ue=new AbortController;Le.abort=Ue;try{let Ze=yield this.loadVectorTile(Oe,Ue);if(delete this.loading[Je],!Ze)return null;let st=Ze.rawData,ut={};Ze.expires&&(ut.expires=Ze.expires),Ze.cacheControl&&(ut.cacheControl=Ze.cacheControl);let Ut={};if(Ae){let Pt=Ae.finish();Pt&&(Ut.resourceTiming=JSON.parse(JSON.stringify(Pt)))}Le.vectorTile=Ze.vectorTile;let Ct=Le.parse(Ze.vectorTile,this.layerIndex,this.availableImages,this.actor);this.loaded[Je]=Le,this.fetching[Je]={rawTileData:st,cacheControl:ut,resourceTiming:Ut};try{let Pt=yield Ct;return e.e({rawTileData:st.slice(0)},Pt,ut,Ut)}finally{delete this.fetching[Je]}}catch(Ze){throw delete this.loading[Je],Le.status="done",this.loaded[Je]=Le,Ze}})}reloadTile(Oe){return e._(this,void 0,void 0,function*(){let Je=Oe.uid;if(!this.loaded||!this.loaded[Je])throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");let Ae=this.loaded[Je];if(Ae.showCollisionBoxes=Oe.showCollisionBoxes,Ae.status==="parsing"){let Le=yield Ae.parse(Ae.vectorTile,this.layerIndex,this.availableImages,this.actor),Ue;if(this.fetching[Je]){let{rawTileData:Ze,cacheControl:st,resourceTiming:ut}=this.fetching[Je];delete this.fetching[Je],Ue=e.e({rawTileData:Ze.slice(0)},Le,st,ut)}else Ue=Le;return Ue}if(Ae.status==="done"&&Ae.vectorTile)return Ae.parse(Ae.vectorTile,this.layerIndex,this.availableImages,this.actor)})}abortTile(Oe){return e._(this,void 0,void 0,function*(){let Je=this.loading,Ae=Oe.uid;Je&&Je[Ae]&&Je[Ae].abort&&(Je[Ae].abort.abort(),delete Je[Ae])})}removeTile(Oe){return e._(this,void 0,void 0,function*(){this.loaded&&this.loaded[Oe.uid]&&delete this.loaded[Oe.uid]})}}class i{constructor(){this.loaded={}}loadTile(Oe){return e._(this,void 0,void 0,function*(){let{uid:Je,encoding:Ae,rawImageData:Le,redFactor:Ue,greenFactor:Ze,blueFactor:st,baseShift:ut}=Oe,Ut=Le.width+2,Ct=Le.height+2,Pt=e.b(Le)?new e.R({width:Ut,height:Ct},yield e.bw(Le,-1,-1,Ut,Ct)):Le,jt=new e.bx(Je,Pt,Ae,Ue,Ze,st,ut);return this.loaded=this.loaded||{},this.loaded[Je]=jt,jt})}removeTile(Oe){let Je=this.loaded,Ae=Oe.uid;Je&&Je[Ae]&&delete Je[Ae]}}function s(_t,Oe){if(_t.length!==0){h(_t[0],Oe);for(var Je=1;Je<_t.length;Je++)h(_t[Je],!Oe)}}function h(_t,Oe){for(var Je=0,Ae=0,Le=0,Ue=_t.length,Ze=Ue-1;Le=Math.abs(st)?Je-ut+st:st-ut+Je,Je=ut}Je+Ae>=0!=!!Oe&&_t.reverse()}var f=e.by(function _t(Oe,Je){var Ae,Le=Oe&&Oe.type;if(Le==="FeatureCollection")for(Ae=0;Ae>31}function L(_t,Oe){for(var Je=_t.loadGeometry(),Ae=_t.type,Le=0,Ue=0,Ze=Je.length,st=0;st_t},O=Math.fround||(P=new Float32Array(1),_t=>(P[0]=+_t,P[0]));var P;let U=3,B=5,X=6;class ${constructor(Oe){this.options=Object.assign(Object.create(N),Oe),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(Oe){let{log:Je,minZoom:Ae,maxZoom:Le}=this.options;Je&&console.time("total time");let Ue=`prepare ${Oe.length} points`;Je&&console.time(Ue),this.points=Oe;let Ze=[];for(let ut=0;ut=Ae;ut--){let Ut=+Date.now();st=this.trees[ut]=this._createTree(this._cluster(st,ut)),Je&&console.log("z%d: %d clusters in %dms",ut,st.numItems,+Date.now()-Ut)}return Je&&console.timeEnd("total time"),this}getClusters(Oe,Je){let Ae=((Oe[0]+180)%360+360)%360-180,Le=Math.max(-90,Math.min(90,Oe[1])),Ue=Oe[2]===180?180:((Oe[2]+180)%360+360)%360-180,Ze=Math.max(-90,Math.min(90,Oe[3]));if(Oe[2]-Oe[0]>=360)Ae=-180,Ue=180;else if(Ae>Ue){let Pt=this.getClusters([Ae,Le,180,Ze],Je),jt=this.getClusters([-180,Le,Ue,Ze],Je);return Pt.concat(jt)}let st=this.trees[this._limitZoom(Je)],ut=st.range(de(Ae),G(Ze),de(Ue),G(Le)),Ut=st.data,Ct=[];for(let Pt of ut){let jt=this.stride*Pt;Ct.push(Ut[jt+B]>1?le(Ut,jt,this.clusterProps):this.points[Ut[jt+U]])}return Ct}getChildren(Oe){let Je=this._getOriginId(Oe),Ae=this._getOriginZoom(Oe),Le="No cluster with the specified id.",Ue=this.trees[Ae];if(!Ue)throw new Error(Le);let Ze=Ue.data;if(Je*this.stride>=Ze.length)throw new Error(Le);let st=this.options.radius/(this.options.extent*Math.pow(2,Ae-1)),ut=Ue.within(Ze[Je*this.stride],Ze[Je*this.stride+1],st),Ut=[];for(let Ct of ut){let Pt=Ct*this.stride;Ze[Pt+4]===Oe&&Ut.push(Ze[Pt+B]>1?le(Ze,Pt,this.clusterProps):this.points[Ze[Pt+U]])}if(Ut.length===0)throw new Error(Le);return Ut}getLeaves(Oe,Je,Ae){let Le=[];return this._appendLeaves(Le,Oe,Je=Je||10,Ae=Ae||0,0),Le}getTile(Oe,Je,Ae){let Le=this.trees[this._limitZoom(Oe)],Ue=Math.pow(2,Oe),{extent:Ze,radius:st}=this.options,ut=st/Ze,Ut=(Ae-ut)/Ue,Ct=(Ae+1+ut)/Ue,Pt={features:[]};return this._addTileFeatures(Le.range((Je-ut)/Ue,Ut,(Je+1+ut)/Ue,Ct),Le.data,Je,Ae,Ue,Pt),Je===0&&this._addTileFeatures(Le.range(1-ut/Ue,Ut,1,Ct),Le.data,Ue,Ae,Ue,Pt),Je===Ue-1&&this._addTileFeatures(Le.range(0,Ut,ut/Ue,Ct),Le.data,-1,Ae,Ue,Pt),Pt.features.length?Pt:null}getClusterExpansionZoom(Oe){let Je=this._getOriginZoom(Oe)-1;for(;Je<=this.options.maxZoom;){let Ae=this.getChildren(Oe);if(Je++,Ae.length!==1)break;Oe=Ae[0].properties.cluster_id}return Je}_appendLeaves(Oe,Je,Ae,Le,Ue){let Ze=this.getChildren(Je);for(let st of Ze){let ut=st.properties;if(ut&&ut.cluster?Ue+ut.point_count<=Le?Ue+=ut.point_count:Ue=this._appendLeaves(Oe,ut.cluster_id,Ae,Le,Ue):Ue1,Ct,Pt,jt;if(Ut)Ct=ce(Je,ut,this.clusterProps),Pt=Je[ut],jt=Je[ut+1];else{let sr=this.points[Je[ut+U]];Ct=sr.properties;let[Pr,Ta]=sr.geometry.coordinates;Pt=de(Pr),jt=G(Ta)}let fr={type:1,geometry:[[Math.round(this.options.extent*(Pt*Ue-Ae)),Math.round(this.options.extent*(jt*Ue-Le))]],tags:Ct},ur;ur=Ut||this.options.generateId?Je[ut+U]:this.points[Je[ut+U]].id,ur!==void 0&&(fr.id=ur),Ze.features.push(fr)}}_limitZoom(Oe){return Math.max(this.options.minZoom,Math.min(Math.floor(+Oe),this.options.maxZoom+1))}_cluster(Oe,Je){let{radius:Ae,extent:Le,reduce:Ue,minPoints:Ze}=this.options,st=Ae/(Le*Math.pow(2,Je)),ut=Oe.data,Ut=[],Ct=this.stride;for(let Pt=0;PtJe&&(Pr+=ut[Oa+B])}if(Pr>sr&&Pr>=Ze){let Ta,Oa=jt*sr,Ia=fr*sr,qa=-1,Wa=((Pt/Ct|0)<<5)+(Je+1)+this.points.length;for(let Ca of ur){let hi=Ca*Ct;if(ut[hi+2]<=Je)continue;ut[hi+2]=Je;let wi=ut[hi+B];Oa+=ut[hi]*wi,Ia+=ut[hi+1]*wi,ut[hi+4]=Wa,Ue&&(Ta||(Ta=this._map(ut,Pt,!0),qa=this.clusterProps.length,this.clusterProps.push(Ta)),Ue(Ta,this._map(ut,hi)))}ut[Pt+4]=Wa,Ut.push(Oa/Pr,Ia/Pr,1/0,Wa,-1,Pr),Ue&&Ut.push(qa)}else{for(let Ta=0;Ta1)for(let Ta of ur){let Oa=Ta*Ct;if(!(ut[Oa+2]<=Je)){ut[Oa+2]=Je;for(let Ia=0;Ia>5}_getOriginZoom(Oe){return(Oe-this.points.length)%32}_map(Oe,Je,Ae){if(Oe[Je+B]>1){let Ze=this.clusterProps[Oe[Je+X]];return Ae?Object.assign({},Ze):Ze}let Le=this.points[Oe[Je+U]].properties,Ue=this.options.map(Le);return Ae&&Ue===Le?Object.assign({},Ue):Ue}}function le(_t,Oe,Je){return{type:"Feature",id:_t[Oe+U],properties:ce(_t,Oe,Je),geometry:{type:"Point",coordinates:[(Ae=_t[Oe],360*(Ae-.5)),Y(_t[Oe+1])]}};var Ae}function ce(_t,Oe,Je){let Ae=_t[Oe+B],Le=Ae>=1e4?`${Math.round(Ae/1e3)}k`:Ae>=1e3?Math.round(Ae/100)/10+"k":Ae,Ue=_t[Oe+X],Ze=Ue===-1?{}:Object.assign({},Je[Ue]);return Object.assign(Ze,{cluster:!0,cluster_id:_t[Oe+U],point_count:Ae,point_count_abbreviated:Le})}function de(_t){return _t/360+.5}function G(_t){let Oe=Math.sin(_t*Math.PI/180),Je=.5-.25*Math.log((1+Oe)/(1-Oe))/Math.PI;return Je<0?0:Je>1?1:Je}function Y(_t){let Oe=(180-360*_t)*Math.PI/180;return 360*Math.atan(Math.exp(Oe))/Math.PI-90}function ee(_t,Oe,Je,Ae){let Le=Ae,Ue=Oe+(Je-Oe>>1),Ze,st=Je-Oe,ut=_t[Oe],Ut=_t[Oe+1],Ct=_t[Je],Pt=_t[Je+1];for(let jt=Oe+3;jtLe)Ze=jt,Le=fr;else if(fr===Le){let ur=Math.abs(jt-Ue);urAe&&(Ze-Oe>3&&ee(_t,Oe,Ze,Ae),_t[Ze+2]=Le,Je-Ze>3&&ee(_t,Ze,Je,Ae))}function q(_t,Oe,Je,Ae,Le,Ue){let Ze=Le-Je,st=Ue-Ae;if(Ze!==0||st!==0){let ut=((_t-Je)*Ze+(Oe-Ae)*st)/(Ze*Ze+st*st);ut>1?(Je=Le,Ae=Ue):ut>0&&(Je+=Ze*ut,Ae+=st*ut)}return Ze=_t-Je,st=Oe-Ae,Ze*Ze+st*st}function se(_t,Oe,Je,Ae){let Le={id:_t??null,type:Oe,geometry:Je,tags:Ae,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};if(Oe==="Point"||Oe==="MultiPoint"||Oe==="LineString")ae(Le,Je);else if(Oe==="Polygon")ae(Le,Je[0]);else if(Oe==="MultiLineString")for(let Ue of Je)ae(Le,Ue);else if(Oe==="MultiPolygon")for(let Ue of Je)ae(Le,Ue[0]);return Le}function ae(_t,Oe){for(let Je=0;Je0&&(Ze+=Ae?(Le*Ct-Ut*Ue)/2:Math.sqrt(Math.pow(Ut-Le,2)+Math.pow(Ct-Ue,2))),Le=Ut,Ue=Ct}let st=Oe.length-3;Oe[2]=1,ee(Oe,0,st,Je),Oe[st+2]=1,Oe.size=Math.abs(Ze),Oe.start=0,Oe.end=Oe.size}function pe(_t,Oe,Je,Ae){for(let Le=0;Le<_t.length;Le++){let Ue=[];re(_t[Le],Ue,Je,Ae),Oe.push(Ue)}}function we(_t){return _t/360+.5}function Se(_t){let Oe=Math.sin(_t*Math.PI/180),Je=.5-.25*Math.log((1+Oe)/(1-Oe))/Math.PI;return Je<0?0:Je>1?1:Je}function Ie(_t,Oe,Je,Ae,Le,Ue,Ze,st){if(Ae/=Oe,Ue>=(Je/=Oe)&&Ze=Ae)return null;let ut=[];for(let Ut of _t){let Ct=Ut.geometry,Pt=Ut.type,jt=Le===0?Ut.minX:Ut.minY,fr=Le===0?Ut.maxX:Ut.maxY;if(jt>=Je&&fr=Ae)continue;let ur=[];if(Pt==="Point"||Pt==="MultiPoint")Re(Ct,ur,Je,Ae,Le);else if(Pt==="LineString")We(Ct,ur,Je,Ae,Le,!1,st.lineMetrics);else if(Pt==="MultiLineString")nt(Ct,ur,Je,Ae,Le,!1);else if(Pt==="Polygon")nt(Ct,ur,Je,Ae,Le,!0);else if(Pt==="MultiPolygon")for(let sr of Ct){let Pr=[];nt(sr,Pr,Je,Ae,Le,!0),Pr.length&&ur.push(Pr)}if(ur.length){if(st.lineMetrics&&Pt==="LineString"){for(let sr of ur)ut.push(se(Ut.id,Pt,sr,Ut.tags));continue}Pt!=="LineString"&&Pt!=="MultiLineString"||(ur.length===1?(Pt="LineString",ur=ur[0]):Pt="MultiLineString"),Pt!=="Point"&&Pt!=="MultiPoint"||(Pt=ur.length===3?"Point":"MultiPoint"),ut.push(se(Ut.id,Pt,ur,Ut.tags))}}return ut.length?ut:null}function Re(_t,Oe,Je,Ae,Le){for(let Ue=0;Ue<_t.length;Ue+=3){let Ze=_t[Ue+Le];Ze>=Je&&Ze<=Ae&&tt(Oe,_t[Ue],_t[Ue+1],_t[Ue+2])}}function We(_t,Oe,Je,Ae,Le,Ue,Ze){let st=at(_t),ut=Le===0?qe:he,Ut,Ct,Pt=_t.start;for(let Pr=0;Pr<_t.length-3;Pr+=3){let Ta=_t[Pr],Oa=_t[Pr+1],Ia=_t[Pr+2],qa=_t[Pr+3],Wa=_t[Pr+4],Ca=Le===0?Ta:Oa,hi=Le===0?qa:Wa,wi=!1;Ze&&(Ut=Math.sqrt(Math.pow(Ta-qa,2)+Math.pow(Oa-Wa,2))),CaJe&&(Ct=ut(st,Ta,Oa,qa,Wa,Je),Ze&&(st.start=Pt+Ut*Ct)):Ca>Ae?hi=Je&&(Ct=ut(st,Ta,Oa,qa,Wa,Je),wi=!0),hi>Ae&&Ca<=Ae&&(Ct=ut(st,Ta,Oa,qa,Wa,Ae),wi=!0),!Ue&&wi&&(Ze&&(st.end=Pt+Ut*Ct),Oe.push(st),st=at(_t)),Ze&&(Pt+=Ut)}let jt=_t.length-3,fr=_t[jt],ur=_t[jt+1],sr=Le===0?fr:ur;sr>=Je&&sr<=Ae&&tt(st,fr,ur,_t[jt+2]),jt=st.length-3,Ue&&jt>=3&&(st[jt]!==st[0]||st[jt+1]!==st[1])&&tt(st,st[0],st[1],st[2]),st.length&&Oe.push(st)}function at(_t){let Oe=[];return Oe.size=_t.size,Oe.start=_t.start,Oe.end=_t.end,Oe}function nt(_t,Oe,Je,Ae,Le,Ue){for(let Ze of _t)We(Ze,Oe,Je,Ae,Le,Ue,!1)}function tt(_t,Oe,Je,Ae){_t.push(Oe,Je,Ae)}function qe(_t,Oe,Je,Ae,Le,Ue){let Ze=(Ue-Oe)/(Ae-Oe);return tt(_t,Ue,Je+(Le-Je)*Ze,1),Ze}function he(_t,Oe,Je,Ae,Le,Ue){let Ze=(Ue-Je)/(Le-Je);return tt(_t,Oe+(Ae-Oe)*Ze,Ue,1),Ze}function ue(_t,Oe){let Je=[];for(let Ae=0;Ae<_t.length;Ae++){let Le=_t[Ae],Ue=Le.type,Ze;if(Ue==="Point"||Ue==="MultiPoint"||Ue==="LineString")Ze=ne(Le.geometry,Oe);else if(Ue==="MultiLineString"||Ue==="Polygon"){Ze=[];for(let st of Le.geometry)Ze.push(ne(st,Oe))}else if(Ue==="MultiPolygon"){Ze=[];for(let st of Le.geometry){let ut=[];for(let Ut of st)ut.push(ne(Ut,Oe));Ze.push(ut)}}Je.push(se(Le.id,Ue,Ze,Le.tags))}return Je}function ne(_t,Oe){let Je=[];Je.size=_t.size,_t.start!==void 0&&(Je.start=_t.start,Je.end=_t.end);for(let Ae=0;Ae<_t.length;Ae+=3)Je.push(_t[Ae]+Oe,_t[Ae+1],_t[Ae+2]);return Je}function Ce(_t,Oe){if(_t.transformed)return _t;let Je=1<<_t.z,Ae=_t.x,Le=_t.y;for(let Ue of _t.features){let Ze=Ue.geometry,st=Ue.type;if(Ue.geometry=[],st===1)for(let ut=0;ut0&&Oe.size<(Le?Ze:Ae))return void(Je.numPoints+=Oe.length/3);let st=[];for(let ut=0;utZe)&&(Je.numSimplified++,st.push(Oe[ut],Oe[ut+1])),Je.numPoints++;Le&&function(ut,Ut){let Ct=0;for(let Pt=0,jt=ut.length,fr=jt-2;Pt0===Ut)for(let Pt=0,jt=ut.length;Pt24)throw new Error("maxZoom should be in the 0-24 range");if(Je.promoteId&&Je.generateId)throw new Error("promoteId and generateId cannot be used together.");let Le=function(Ue,Ze){let st=[];if(Ue.type==="FeatureCollection")for(let ut=0;ut1&&console.time("creation"),fr=this.tiles[jt]=rt(Oe,Je,Ae,Le,Ut),this.tileCoords.push({z:Je,x:Ae,y:Le}),Ct)){Ct>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",Je,Ae,Le,fr.numFeatures,fr.numPoints,fr.numSimplified),console.timeEnd("creation"));let wi=`z${Je}`;this.stats[wi]=(this.stats[wi]||0)+1,this.total++}if(fr.source=Oe,Ue==null){if(Je===Ut.indexMaxZoom||fr.numPoints<=Ut.indexMaxPoints)continue}else{if(Je===Ut.maxZoom||Je===Ue)continue;if(Ue!=null){let wi=Ue-Je;if(Ae!==Ze>>wi||Le!==st>>wi)continue}}if(fr.source=null,Oe.length===0)continue;Ct>1&&console.time("clipping");let ur=.5*Ut.buffer/Ut.extent,sr=.5-ur,Pr=.5+ur,Ta=1+ur,Oa=null,Ia=null,qa=null,Wa=null,Ca=Ie(Oe,Pt,Ae-ur,Ae+Pr,0,fr.minX,fr.maxX,Ut),hi=Ie(Oe,Pt,Ae+sr,Ae+Ta,0,fr.minX,fr.maxX,Ut);Oe=null,Ca&&(Oa=Ie(Ca,Pt,Le-ur,Le+Pr,1,fr.minY,fr.maxY,Ut),Ia=Ie(Ca,Pt,Le+sr,Le+Ta,1,fr.minY,fr.maxY,Ut),Ca=null),hi&&(qa=Ie(hi,Pt,Le-ur,Le+Pr,1,fr.minY,fr.maxY,Ut),Wa=Ie(hi,Pt,Le+sr,Le+Ta,1,fr.minY,fr.maxY,Ut),hi=null),Ct>1&&console.timeEnd("clipping"),ut.push(Oa||[],Je+1,2*Ae,2*Le),ut.push(Ia||[],Je+1,2*Ae,2*Le+1),ut.push(qa||[],Je+1,2*Ae+1,2*Le),ut.push(Wa||[],Je+1,2*Ae+1,2*Le+1)}}getTile(Oe,Je,Ae){Oe=+Oe,Je=+Je,Ae=+Ae;let Le=this.options,{extent:Ue,debug:Ze}=Le;if(Oe<0||Oe>24)return null;let st=1<1&&console.log("drilling down to z%d-%d-%d",Oe,Je,Ae);let Ut,Ct=Oe,Pt=Je,jt=Ae;for(;!Ut&&Ct>0;)Ct--,Pt>>=1,jt>>=1,Ut=this.tiles[Gt(Ct,Pt,jt)];return Ut&&Ut.source?(Ze>1&&(console.log("found parent tile z%d-%d-%d",Ct,Pt,jt),console.time("drilling down")),this.splitTile(Ut.source,Ct,Pt,jt,Oe,Je,Ae),Ze>1&&console.timeEnd("drilling down"),this.tiles[ut]?Ce(this.tiles[ut],Ue):null):null}}function Gt(_t,Oe,Je){return 32*((1<<_t)*Je+Oe)+_t}function Mr(_t,Oe){return Oe?_t.properties[Oe]:_t.id}function mr(_t,Oe){if(_t==null)return!0;if(_t.type==="Feature")return Mr(_t,Oe)!=null;if(_t.type==="FeatureCollection"){let Je=new Set;for(let Ae of _t.features){let Le=Mr(Ae,Oe);if(Le==null||Je.has(Le))return!1;Je.add(Le)}return!0}return!1}function qr(_t,Oe){let Je=new Map;if(_t!=null)if(_t.type==="Feature")Je.set(Mr(_t,Oe),_t);else for(let Ae of _t.features)Je.set(Mr(Ae,Oe),Ae);return Je}class Er extends n{constructor(){super(...arguments),this._dataUpdateable=new Map}loadVectorTile(Oe,Je){return e._(this,void 0,void 0,function*(){let Ae=Oe.tileID.canonical;if(!this._geoJSONIndex)throw new Error("Unable to parse the data into a cluster or geojson");let Le=this._geoJSONIndex.getTile(Ae.z,Ae.x,Ae.y);if(!Le)return null;let Ue=new class{constructor(st){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=e.X,this.length=st.length,this._features=st}feature(st){return new class{constructor(ut){this._feature=ut,this.extent=e.X,this.type=ut.type,this.properties=ut.tags,"id"in ut&&!isNaN(ut.id)&&(this.id=parseInt(ut.id,10))}loadGeometry(){if(this._feature.type===1){let ut=[];for(let Ut of this._feature.geometry)ut.push([new e.P(Ut[0],Ut[1])]);return ut}{let ut=[];for(let Ut of this._feature.geometry){let Ct=[];for(let Pt of Ut)Ct.push(new e.P(Pt[0],Pt[1]));ut.push(Ct)}return ut}}toGeoJSON(ut,Ut,Ct){return v.call(this,ut,Ut,Ct)}}(this._features[st])}}(Le.features),Ze=F(Ue);return Ze.byteOffset===0&&Ze.byteLength===Ze.buffer.byteLength||(Ze=new Uint8Array(Ze)),{vectorTile:Ue,rawData:Ze.buffer}})}loadData(Oe){return e._(this,void 0,void 0,function*(){var Je;(Je=this._pendingRequest)===null||Je===void 0||Je.abort();let Ae=!!(Oe&&Oe.request&&Oe.request.collectResourceTiming)&&new e.bv(Oe.request);this._pendingRequest=new AbortController;try{this._pendingData=this.loadAndProcessGeoJSON(Oe,this._pendingRequest),this._geoJSONIndex=Oe.cluster?new $(function({superclusterOptions:Ze,clusterProperties:st}){if(!st||!Ze)return Ze;let ut={},Ut={},Ct={accumulated:null,zoom:0},Pt={properties:null},jt=Object.keys(st);for(let fr of jt){let[ur,sr]=st[fr],Pr=e.bC(sr),Ta=e.bC(typeof ur=="string"?[ur,["accumulated"],["get",fr]]:ur);ut[fr]=Pr.value,Ut[fr]=Ta.value}return Ze.map=fr=>{Pt.properties=fr;let ur={};for(let sr of jt)ur[sr]=ut[sr].evaluate(Ct,Pt);return ur},Ze.reduce=(fr,ur)=>{Pt.properties=ur;for(let sr of jt)Ct.accumulated=fr[sr],fr[sr]=Ut[sr].evaluate(Ct,Pt)},Ze}(Oe)).load((yield this._pendingData).features):(Le=yield this._pendingData,new Nt(Le,Oe.geojsonVtOptions)),this.loaded={};let Ue={};if(Ae){let Ze=Ae.finish();Ze&&(Ue.resourceTiming={},Ue.resourceTiming[Oe.source]=JSON.parse(JSON.stringify(Ze)))}return Ue}catch(Ue){if(delete this._pendingRequest,e.bB(Ue))return{abandoned:!0};throw Ue}var Le})}getData(){return e._(this,void 0,void 0,function*(){return this._pendingData})}reloadTile(Oe){let Je=this.loaded;return Je&&Je[Oe.uid]?super.reloadTile(Oe):this.loadTile(Oe)}loadAndProcessGeoJSON(Oe,Je){return e._(this,void 0,void 0,function*(){let Ae=yield this.loadGeoJSON(Oe,Je);if(delete this._pendingRequest,typeof Ae!="object")throw new Error(`Input data given to '${Oe.source}' is not a valid GeoJSON object.`);if(f(Ae,!0),Oe.filter){let Le=e.bC(Oe.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(Le.result==="error")throw new Error(Le.value.map(Ze=>`${Ze.key}: ${Ze.message}`).join(", "));Ae={type:"FeatureCollection",features:Ae.features.filter(Ze=>Le.value.evaluate({zoom:0},Ze))}}return Ae})}loadGeoJSON(Oe,Je){return e._(this,void 0,void 0,function*(){let{promoteId:Ae}=Oe;if(Oe.request){let Le=yield e.h(Oe.request,Je);return this._dataUpdateable=mr(Le.data,Ae)?qr(Le.data,Ae):void 0,Le.data}if(typeof Oe.data=="string")try{let Le=JSON.parse(Oe.data);return this._dataUpdateable=mr(Le,Ae)?qr(Le,Ae):void 0,Le}catch{throw new Error(`Input data given to '${Oe.source}' is not a valid GeoJSON object.`)}if(!Oe.dataDiff)throw new Error(`Input data given to '${Oe.source}' is not a valid GeoJSON object.`);if(!this._dataUpdateable)throw new Error(`Cannot update existing geojson data in ${Oe.source}`);return function(Le,Ue,Ze){var st,ut,Ut,Ct;if(Ue.removeAll&&Le.clear(),Ue.remove)for(let Pt of Ue.remove)Le.delete(Pt);if(Ue.add)for(let Pt of Ue.add){let jt=Mr(Pt,Ze);jt!=null&&Le.set(jt,Pt)}if(Ue.update)for(let Pt of Ue.update){let jt=Le.get(Pt.id);if(jt==null)continue;let fr=!Pt.removeAllProperties&&(((st=Pt.removeProperties)===null||st===void 0?void 0:st.length)>0||((ut=Pt.addOrUpdateProperties)===null||ut===void 0?void 0:ut.length)>0);if((Pt.newGeometry||Pt.removeAllProperties||fr)&&(jt=Object.assign({},jt),Le.set(Pt.id,jt),fr&&(jt.properties=Object.assign({},jt.properties))),Pt.newGeometry&&(jt.geometry=Pt.newGeometry),Pt.removeAllProperties)jt.properties={};else if(((Ut=Pt.removeProperties)===null||Ut===void 0?void 0:Ut.length)>0)for(let ur of Pt.removeProperties)Object.prototype.hasOwnProperty.call(jt.properties,ur)&&delete jt.properties[ur];if(((Ct=Pt.addOrUpdateProperties)===null||Ct===void 0?void 0:Ct.length)>0)for(let{key:ur,value:sr}of Pt.addOrUpdateProperties)jt.properties[ur]=sr}}(this._dataUpdateable,Oe.dataDiff,Ae),{type:"FeatureCollection",features:Array.from(this._dataUpdateable.values())}})}removeSource(Oe){return e._(this,void 0,void 0,function*(){this._pendingRequest&&this._pendingRequest.abort()})}getClusterExpansionZoom(Oe){return this._geoJSONIndex.getClusterExpansionZoom(Oe.clusterId)}getClusterChildren(Oe){return this._geoJSONIndex.getChildren(Oe.clusterId)}getClusterLeaves(Oe){return this._geoJSONIndex.getLeaves(Oe.clusterId,Oe.limit,Oe.offset)}}class Ir{constructor(Oe){this.self=Oe,this.actor=new e.F(Oe),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.self.registerWorkerSource=(Je,Ae)=>{if(this.externalWorkerSourceTypes[Je])throw new Error(`Worker source with name "${Je}" already registered.`);this.externalWorkerSourceTypes[Je]=Ae},this.self.addProtocol=e.bi,this.self.removeProtocol=e.bj,this.self.registerRTLTextPlugin=Je=>{if(e.bD.isParsed())throw new Error("RTL text plugin already registered.");e.bD.setMethods(Je)},this.actor.registerMessageHandler("LDT",(Je,Ae)=>this._getDEMWorkerSource(Je,Ae.source).loadTile(Ae)),this.actor.registerMessageHandler("RDT",(Je,Ae)=>e._(this,void 0,void 0,function*(){this._getDEMWorkerSource(Je,Ae.source).removeTile(Ae)})),this.actor.registerMessageHandler("GCEZ",(Je,Ae)=>e._(this,void 0,void 0,function*(){return this._getWorkerSource(Je,Ae.type,Ae.source).getClusterExpansionZoom(Ae)})),this.actor.registerMessageHandler("GCC",(Je,Ae)=>e._(this,void 0,void 0,function*(){return this._getWorkerSource(Je,Ae.type,Ae.source).getClusterChildren(Ae)})),this.actor.registerMessageHandler("GCL",(Je,Ae)=>e._(this,void 0,void 0,function*(){return this._getWorkerSource(Je,Ae.type,Ae.source).getClusterLeaves(Ae)})),this.actor.registerMessageHandler("LD",(Je,Ae)=>this._getWorkerSource(Je,Ae.type,Ae.source).loadData(Ae)),this.actor.registerMessageHandler("GD",(Je,Ae)=>this._getWorkerSource(Je,Ae.type,Ae.source).getData()),this.actor.registerMessageHandler("LT",(Je,Ae)=>this._getWorkerSource(Je,Ae.type,Ae.source).loadTile(Ae)),this.actor.registerMessageHandler("RT",(Je,Ae)=>this._getWorkerSource(Je,Ae.type,Ae.source).reloadTile(Ae)),this.actor.registerMessageHandler("AT",(Je,Ae)=>this._getWorkerSource(Je,Ae.type,Ae.source).abortTile(Ae)),this.actor.registerMessageHandler("RMT",(Je,Ae)=>this._getWorkerSource(Je,Ae.type,Ae.source).removeTile(Ae)),this.actor.registerMessageHandler("RS",(Je,Ae)=>e._(this,void 0,void 0,function*(){if(!this.workerSources[Je]||!this.workerSources[Je][Ae.type]||!this.workerSources[Je][Ae.type][Ae.source])return;let Le=this.workerSources[Je][Ae.type][Ae.source];delete this.workerSources[Je][Ae.type][Ae.source],Le.removeSource!==void 0&&Le.removeSource(Ae)})),this.actor.registerMessageHandler("RM",Je=>e._(this,void 0,void 0,function*(){delete this.layerIndexes[Je],delete this.availableImages[Je],delete this.workerSources[Je],delete this.demWorkerSources[Je]})),this.actor.registerMessageHandler("SR",(Je,Ae)=>e._(this,void 0,void 0,function*(){this.referrer=Ae})),this.actor.registerMessageHandler("SRPS",(Je,Ae)=>this._syncRTLPluginState(Je,Ae)),this.actor.registerMessageHandler("IS",(Je,Ae)=>e._(this,void 0,void 0,function*(){this.self.importScripts(Ae)})),this.actor.registerMessageHandler("SI",(Je,Ae)=>this._setImages(Je,Ae)),this.actor.registerMessageHandler("UL",(Je,Ae)=>e._(this,void 0,void 0,function*(){this._getLayerIndex(Je).update(Ae.layers,Ae.removedIds)})),this.actor.registerMessageHandler("SL",(Je,Ae)=>e._(this,void 0,void 0,function*(){this._getLayerIndex(Je).replace(Ae)}))}_setImages(Oe,Je){return e._(this,void 0,void 0,function*(){this.availableImages[Oe]=Je;for(let Ae in this.workerSources[Oe]){let Le=this.workerSources[Oe][Ae];for(let Ue in Le)Le[Ue].availableImages=Je}})}_syncRTLPluginState(Oe,Je){return e._(this,void 0,void 0,function*(){if(e.bD.isParsed())return e.bD.getState();if(Je.pluginStatus!=="loading")return e.bD.setState(Je),Je;let Ae=Je.pluginURL;if(this.self.importScripts(Ae),e.bD.isParsed()){let Le={pluginStatus:"loaded",pluginURL:Ae};return e.bD.setState(Le),Le}throw e.bD.setState({pluginStatus:"error",pluginURL:""}),new Error(`RTL Text Plugin failed to import scripts from ${Ae}`)})}_getAvailableImages(Oe){let Je=this.availableImages[Oe];return Je||(Je=[]),Je}_getLayerIndex(Oe){let Je=this.layerIndexes[Oe];return Je||(Je=this.layerIndexes[Oe]=new t),Je}_getWorkerSource(Oe,Je,Ae){if(this.workerSources[Oe]||(this.workerSources[Oe]={}),this.workerSources[Oe][Je]||(this.workerSources[Oe][Je]={}),!this.workerSources[Oe][Je][Ae]){let Le={sendAsync:(Ue,Ze)=>(Ue.targetMapId=Oe,this.actor.sendAsync(Ue,Ze))};switch(Je){case"vector":this.workerSources[Oe][Je][Ae]=new n(Le,this._getLayerIndex(Oe),this._getAvailableImages(Oe));break;case"geojson":this.workerSources[Oe][Je][Ae]=new Er(Le,this._getLayerIndex(Oe),this._getAvailableImages(Oe));break;default:this.workerSources[Oe][Je][Ae]=new this.externalWorkerSourceTypes[Je](Le,this._getLayerIndex(Oe),this._getAvailableImages(Oe))}}return this.workerSources[Oe][Je][Ae]}_getDEMWorkerSource(Oe,Je){return this.demWorkerSources[Oe]||(this.demWorkerSources[Oe]={}),this.demWorkerSources[Oe][Je]||(this.demWorkerSources[Oe][Je]=new i),this.demWorkerSources[Oe][Je]}}return e.i(self)&&(self.worker=new Ir(self)),Ir}),S("index",["exports","./shared"],function(e,t){"use strict";var r="4.7.1";let o,a,n={now:typeof performance<"u"&&performance&&performance.now?performance.now.bind(performance):Date.now.bind(Date),frameAsync:Fe=>new Promise((I,ie)=>{let Te=requestAnimationFrame(I);Fe.signal.addEventListener("abort",()=>{cancelAnimationFrame(Te),ie(t.c())})}),getImageData(Fe,I=0){return this.getImageCanvasContext(Fe).getImageData(-I,-I,Fe.width+2*I,Fe.height+2*I)},getImageCanvasContext(Fe){let I=window.document.createElement("canvas"),ie=I.getContext("2d",{willReadFrequently:!0});if(!ie)throw new Error("failed to create canvas 2d context");return I.width=Fe.width,I.height=Fe.height,ie.drawImage(Fe,0,0,Fe.width,Fe.height),ie},resolveURL:Fe=>(o||(o=document.createElement("a")),o.href=Fe,o.href),hardwareConcurrency:typeof navigator<"u"&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return!!matchMedia&&(a==null&&(a=matchMedia("(prefers-reduced-motion: reduce)")),a.matches)}};class i{static testProp(I){if(!i.docStyle)return I[0];for(let ie=0;ie{window.removeEventListener("click",i.suppressClickInternal,!0)},0)}static getScale(I){let ie=I.getBoundingClientRect();return{x:ie.width/I.offsetWidth||1,y:ie.height/I.offsetHeight||1,boundingClientRect:ie}}static getPoint(I,ie,Te){let Me=ie.boundingClientRect;return new t.P((Te.clientX-Me.left)/ie.x-I.clientLeft,(Te.clientY-Me.top)/ie.y-I.clientTop)}static mousePos(I,ie){let Te=i.getScale(I);return i.getPoint(I,Te,ie)}static touchPos(I,ie){let Te=[],Me=i.getScale(I);for(let ze=0;ze{h&&T(h),h=null,c=!0},f.onerror=()=>{v=!0,h=null},f.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA="),function(Fe){let I,ie,Te,Me;Fe.resetRequestQueue=()=>{I=[],ie=0,Te=0,Me={}},Fe.addThrottleControl=Ot=>{let $t=Te++;return Me[$t]=Ot,$t},Fe.removeThrottleControl=Ot=>{delete Me[Ot],ht()},Fe.getImage=(Ot,$t,Tr=!0)=>new Promise((Ar,Kr)=>{s.supported&&(Ot.headers||(Ot.headers={}),Ot.headers.accept="image/webp,*/*"),t.e(Ot,{type:"image"}),I.push({abortController:$t,requestParameters:Ot,supportImageRefresh:Tr,state:"queued",onError:na=>{Kr(na)},onSuccess:na=>{Ar(na)}}),ht()});let ze=Ot=>t._(this,void 0,void 0,function*(){Ot.state="running";let{requestParameters:$t,supportImageRefresh:Tr,onError:Ar,onSuccess:Kr,abortController:na}=Ot,Ve=Tr===!1&&!t.i(self)&&!t.g($t.url)&&(!$t.headers||Object.keys($t.headers).reduce((pt,Et)=>pt&&Et==="accept",!0));ie++;let $e=Ve?wt($t,na):t.m($t,na);try{let pt=yield $e;delete Ot.abortController,Ot.state="completed",pt.data instanceof HTMLImageElement||t.b(pt.data)?Kr(pt):pt.data&&Kr({data:yield(ot=pt.data,typeof createImageBitmap=="function"?t.d(ot):t.f(ot)),cacheControl:pt.cacheControl,expires:pt.expires})}catch(pt){delete Ot.abortController,Ar(pt)}finally{ie--,ht()}var ot}),ht=()=>{let Ot=(()=>{for(let $t of Object.keys(Me))if(Me[$t]())return!0;return!1})()?t.a.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:t.a.MAX_PARALLEL_IMAGE_REQUESTS;for(let $t=ie;$t0;$t++){let Tr=I.shift();Tr.abortController.signal.aborted?$t--:ze(Tr)}},wt=(Ot,$t)=>new Promise((Tr,Ar)=>{let Kr=new Image,na=Ot.url,Ve=Ot.credentials;Ve&&Ve==="include"?Kr.crossOrigin="use-credentials":(Ve&&Ve==="same-origin"||!t.s(na))&&(Kr.crossOrigin="anonymous"),$t.signal.addEventListener("abort",()=>{Kr.src="",Ar(t.c())}),Kr.fetchPriority="high",Kr.onload=()=>{Kr.onerror=Kr.onload=null,Tr({data:Kr})},Kr.onerror=()=>{Kr.onerror=Kr.onload=null,$t.signal.aborted||Ar(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))},Kr.src=na})}(l||(l={})),l.resetRequestQueue();class _{constructor(I){this._transformRequestFn=I}transformRequest(I,ie){return this._transformRequestFn&&this._transformRequestFn(I,ie)||{url:I}}setTransformRequest(I){this._transformRequestFn=I}}function w(Fe){var I=new t.A(3);return I[0]=Fe[0],I[1]=Fe[1],I[2]=Fe[2],I}var A,M=function(Fe,I,ie){return Fe[0]=I[0]-ie[0],Fe[1]=I[1]-ie[1],Fe[2]=I[2]-ie[2],Fe};A=new t.A(3),t.A!=Float32Array&&(A[0]=0,A[1]=0,A[2]=0);var g=function(Fe){var I=Fe[0],ie=Fe[1];return I*I+ie*ie};function b(Fe){let I=[];if(typeof Fe=="string")I.push({id:"default",url:Fe});else if(Fe&&Fe.length>0){let ie=[];for(let{id:Te,url:Me}of Fe){let ze=`${Te}${Me}`;ie.indexOf(ze)===-1&&(ie.push(ze),I.push({id:Te,url:Me}))}}return I}function p(Fe,I,ie){let Te=Fe.split("?");return Te[0]+=`${I}${ie}`,Te.join("?")}(function(){var Fe=new t.A(2);t.A!=Float32Array&&(Fe[0]=0,Fe[1]=0)})();class u{constructor(I,ie,Te,Me){this.context=I,this.format=Te,this.texture=I.gl.createTexture(),this.update(ie,Me)}update(I,ie,Te){let{width:Me,height:ze}=I,ht=!(this.size&&this.size[0]===Me&&this.size[1]===ze||Te),{context:wt}=this,{gl:Ot}=wt;if(this.useMipmap=!!(ie&&ie.useMipmap),Ot.bindTexture(Ot.TEXTURE_2D,this.texture),wt.pixelStoreUnpackFlipY.set(!1),wt.pixelStoreUnpack.set(1),wt.pixelStoreUnpackPremultiplyAlpha.set(this.format===Ot.RGBA&&(!ie||ie.premultiply!==!1)),ht)this.size=[Me,ze],I instanceof HTMLImageElement||I instanceof HTMLCanvasElement||I instanceof HTMLVideoElement||I instanceof ImageData||t.b(I)?Ot.texImage2D(Ot.TEXTURE_2D,0,this.format,this.format,Ot.UNSIGNED_BYTE,I):Ot.texImage2D(Ot.TEXTURE_2D,0,this.format,Me,ze,0,this.format,Ot.UNSIGNED_BYTE,I.data);else{let{x:$t,y:Tr}=Te||{x:0,y:0};I instanceof HTMLImageElement||I instanceof HTMLCanvasElement||I instanceof HTMLVideoElement||I instanceof ImageData||t.b(I)?Ot.texSubImage2D(Ot.TEXTURE_2D,0,$t,Tr,Ot.RGBA,Ot.UNSIGNED_BYTE,I):Ot.texSubImage2D(Ot.TEXTURE_2D,0,$t,Tr,Me,ze,Ot.RGBA,Ot.UNSIGNED_BYTE,I.data)}this.useMipmap&&this.isSizePowerOfTwo()&&Ot.generateMipmap(Ot.TEXTURE_2D)}bind(I,ie,Te){let{context:Me}=this,{gl:ze}=Me;ze.bindTexture(ze.TEXTURE_2D,this.texture),Te!==ze.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(Te=ze.LINEAR),I!==this.filter&&(ze.texParameteri(ze.TEXTURE_2D,ze.TEXTURE_MAG_FILTER,I),ze.texParameteri(ze.TEXTURE_2D,ze.TEXTURE_MIN_FILTER,Te||I),this.filter=I),ie!==this.wrap&&(ze.texParameteri(ze.TEXTURE_2D,ze.TEXTURE_WRAP_S,ie),ze.texParameteri(ze.TEXTURE_2D,ze.TEXTURE_WRAP_T,ie),this.wrap=ie)}isSizePowerOfTwo(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0}destroy(){let{gl:I}=this.context;I.deleteTexture(this.texture),this.texture=null}}function y(Fe){let{userImage:I}=Fe;return!!(I&&I.render&&I.render())&&(Fe.data.replace(new Uint8Array(I.data.buffer)),!0)}class m extends t.E{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new t.R({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(I){if(this.loaded!==I&&(this.loaded=I,I)){for(let{ids:ie,promiseResolve:Te}of this.requestors)Te(this._getImagesForIds(ie));this.requestors=[]}}getImage(I){let ie=this.images[I];if(ie&&!ie.data&&ie.spriteData){let Te=ie.spriteData;ie.data=new t.R({width:Te.width,height:Te.height},Te.context.getImageData(Te.x,Te.y,Te.width,Te.height).data),ie.spriteData=null}return ie}addImage(I,ie){if(this.images[I])throw new Error(`Image id ${I} already exist, use updateImage instead`);this._validate(I,ie)&&(this.images[I]=ie)}_validate(I,ie){let Te=!0,Me=ie.data||ie.spriteData;return this._validateStretch(ie.stretchX,Me&&Me.width)||(this.fire(new t.j(new Error(`Image "${I}" has invalid "stretchX" value`))),Te=!1),this._validateStretch(ie.stretchY,Me&&Me.height)||(this.fire(new t.j(new Error(`Image "${I}" has invalid "stretchY" value`))),Te=!1),this._validateContent(ie.content,ie)||(this.fire(new t.j(new Error(`Image "${I}" has invalid "content" value`))),Te=!1),Te}_validateStretch(I,ie){if(!I)return!0;let Te=0;for(let Me of I){if(Me[0]{let Me=!0;if(!this.isLoaded())for(let ze of I)this.images[ze]||(Me=!1);this.isLoaded()||Me?ie(this._getImagesForIds(I)):this.requestors.push({ids:I,promiseResolve:ie})})}_getImagesForIds(I){let ie={};for(let Te of I){let Me=this.getImage(Te);Me||(this.fire(new t.k("styleimagemissing",{id:Te})),Me=this.getImage(Te)),Me?ie[Te]={data:Me.data.clone(),pixelRatio:Me.pixelRatio,sdf:Me.sdf,version:Me.version,stretchX:Me.stretchX,stretchY:Me.stretchY,content:Me.content,textFitWidth:Me.textFitWidth,textFitHeight:Me.textFitHeight,hasRenderCallback:!!(Me.userImage&&Me.userImage.render)}:t.w(`Image "${Te}" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.`)}return ie}getPixelSize(){let{width:I,height:ie}=this.atlasImage;return{width:I,height:ie}}getPattern(I){let ie=this.patterns[I],Te=this.getImage(I);if(!Te)return null;if(ie&&ie.position.version===Te.version)return ie.position;if(ie)ie.position.version=Te.version;else{let Me={w:Te.data.width+2,h:Te.data.height+2,x:0,y:0},ze=new t.I(Me,Te);this.patterns[I]={bin:Me,position:ze}}return this._updatePatternAtlas(),this.patterns[I].position}bind(I){let ie=I.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new u(I,this.atlasImage,ie.RGBA),this.atlasTexture.bind(ie.LINEAR,ie.CLAMP_TO_EDGE)}_updatePatternAtlas(){let I=[];for(let ze in this.patterns)I.push(this.patterns[ze].bin);let{w:ie,h:Te}=t.p(I),Me=this.atlasImage;Me.resize({width:ie||1,height:Te||1});for(let ze in this.patterns){let{bin:ht}=this.patterns[ze],wt=ht.x+1,Ot=ht.y+1,$t=this.getImage(ze).data,Tr=$t.width,Ar=$t.height;t.R.copy($t,Me,{x:0,y:0},{x:wt,y:Ot},{width:Tr,height:Ar}),t.R.copy($t,Me,{x:0,y:Ar-1},{x:wt,y:Ot-1},{width:Tr,height:1}),t.R.copy($t,Me,{x:0,y:0},{x:wt,y:Ot+Ar},{width:Tr,height:1}),t.R.copy($t,Me,{x:Tr-1,y:0},{x:wt-1,y:Ot},{width:1,height:Ar}),t.R.copy($t,Me,{x:0,y:0},{x:wt+Tr,y:Ot},{width:1,height:Ar})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}dispatchRenderCallbacks(I){for(let ie of I){if(this.callbackDispatchedThisFrame[ie])continue;this.callbackDispatchedThisFrame[ie]=!0;let Te=this.getImage(ie);Te||t.w(`Image with ID: "${ie}" was not found`),y(Te)&&this.updateImage(ie,Te)}}}let R=1e20;function L(Fe,I,ie,Te,Me,ze,ht,wt,Ot){for(let $t=I;$t-1);Ot++,ze[Ot]=wt,ht[Ot]=$t,ht[Ot+1]=R}for(let wt=0,Ot=0;wt65535)throw new Error("glyphs > 65535 not supported");if(Te.ranges[ze])return{stack:I,id:ie,glyph:Me};if(!this.url)throw new Error("glyphsUrl is not set");if(!Te.requests[ze]){let wt=F.loadGlyphRange(I,ze,this.url,this.requestManager);Te.requests[ze]=wt}let ht=yield Te.requests[ze];for(let wt in ht)this._doesCharSupportLocalGlyph(+wt)||(Te.glyphs[+wt]=ht[+wt]);return Te.ranges[ze]=!0,{stack:I,id:ie,glyph:ht[ie]||null}})}_doesCharSupportLocalGlyph(I){return!!this.localIdeographFontFamily&&new RegExp("\\p{Ideo}|\\p{sc=Hang}|\\p{sc=Hira}|\\p{sc=Kana}","u").test(String.fromCodePoint(I))}_tinySDF(I,ie,Te){let Me=this.localIdeographFontFamily;if(!Me||!this._doesCharSupportLocalGlyph(Te))return;let ze=I.tinySDF;if(!ze){let wt="400";/bold/i.test(ie)?wt="900":/medium/i.test(ie)?wt="500":/light/i.test(ie)&&(wt="200"),ze=I.tinySDF=new F.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:Me,fontWeight:wt})}let ht=ze.draw(String.fromCharCode(Te));return{id:Te,bitmap:new t.o({width:ht.width||60,height:ht.height||60},ht.data),metrics:{width:ht.glyphWidth/2||24,height:ht.glyphHeight/2||24,left:ht.glyphLeft/2+.5||0,top:ht.glyphTop/2-27.5||-8,advance:ht.glyphAdvance/2||24,isDoubleResolution:!0}}}}F.loadGlyphRange=function(Fe,I,ie,Te){return t._(this,void 0,void 0,function*(){let Me=256*I,ze=Me+255,ht=Te.transformRequest(ie.replace("{fontstack}",Fe).replace("{range}",`${Me}-${ze}`),"Glyphs"),wt=yield t.l(ht,new AbortController);if(!wt||!wt.data)throw new Error(`Could not load glyph range. range: ${I}, ${Me}-${ze}`);let Ot={};for(let $t of t.n(wt.data))Ot[$t.id]=$t;return Ot})},F.TinySDF=class{constructor({fontSize:Fe=24,buffer:I=3,radius:ie=8,cutoff:Te=.25,fontFamily:Me="sans-serif",fontWeight:ze="normal",fontStyle:ht="normal"}={}){this.buffer=I,this.cutoff=Te,this.radius=ie;let wt=this.size=Fe+4*I,Ot=this._createCanvas(wt),$t=this.ctx=Ot.getContext("2d",{willReadFrequently:!0});$t.font=`${ht} ${ze} ${Fe}px ${Me}`,$t.textBaseline="alphabetic",$t.textAlign="left",$t.fillStyle="black",this.gridOuter=new Float64Array(wt*wt),this.gridInner=new Float64Array(wt*wt),this.f=new Float64Array(wt),this.z=new Float64Array(wt+1),this.v=new Uint16Array(wt)}_createCanvas(Fe){let I=document.createElement("canvas");return I.width=I.height=Fe,I}draw(Fe){let{width:I,actualBoundingBoxAscent:ie,actualBoundingBoxDescent:Te,actualBoundingBoxLeft:Me,actualBoundingBoxRight:ze}=this.ctx.measureText(Fe),ht=Math.ceil(ie),wt=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(ze-Me))),Ot=Math.min(this.size-this.buffer,ht+Math.ceil(Te)),$t=wt+2*this.buffer,Tr=Ot+2*this.buffer,Ar=Math.max($t*Tr,0),Kr=new Uint8ClampedArray(Ar),na={data:Kr,width:$t,height:Tr,glyphWidth:wt,glyphHeight:Ot,glyphTop:ht,glyphLeft:0,glyphAdvance:I};if(wt===0||Ot===0)return na;let{ctx:Ve,buffer:$e,gridInner:ot,gridOuter:pt}=this;Ve.clearRect($e,$e,wt,Ot),Ve.fillText(Fe,$e,$e+ht);let Et=Ve.getImageData($e,$e,wt,Ot);pt.fill(R,0,Ar),ot.fill(0,0,Ar);for(let bt=0;bt0?kr*kr:0,ot[yr]=kr<0?kr*kr:0}}L(pt,0,0,$t,Tr,$t,this.f,this.v,this.z),L(ot,$e,$e,wt,Ot,$t,this.f,this.v,this.z);for(let bt=0;bt1&&(Ot=I[++wt]);let Tr=Math.abs($t-Ot.left),Ar=Math.abs($t-Ot.right),Kr=Math.min(Tr,Ar),na,Ve=ze/Te*(Me+1);if(Ot.isDash){let $e=Me-Math.abs(Ve);na=Math.sqrt(Kr*Kr+$e*$e)}else na=Me-Math.sqrt(Kr*Kr+Ve*Ve);this.data[ht+$t]=Math.max(0,Math.min(255,na+128))}}}addRegularDash(I){for(let wt=I.length-1;wt>=0;--wt){let Ot=I[wt],$t=I[wt+1];Ot.zeroLength?I.splice(wt,1):$t&&$t.isDash===Ot.isDash&&($t.left=Ot.left,I.splice(wt,1))}let ie=I[0],Te=I[I.length-1];ie.isDash===Te.isDash&&(ie.left=Te.left-this.width,Te.right=ie.right+this.width);let Me=this.width*this.nextRow,ze=0,ht=I[ze];for(let wt=0;wt1&&(ht=I[++ze]);let Ot=Math.abs(wt-ht.left),$t=Math.abs(wt-ht.right),Tr=Math.min(Ot,$t);this.data[Me+wt]=Math.max(0,Math.min(255,(ht.isDash?Tr:-Tr)+128))}}addDash(I,ie){let Te=ie?7:0,Me=2*Te+1;if(this.nextRow+Me>this.height)return t.w("LineAtlas out of space"),null;let ze=0;for(let wt=0;wt{ie.terminate()}),this.workers=null)}isPreloaded(){return!!this.active[$]}numActive(){return Object.keys(this.active).length}}let ce=Math.floor(n.hardwareConcurrency/2),de,G;function Y(){return de||(de=new le),de}le.workerCount=t.C(globalThis)?Math.max(Math.min(ce,3),1):1;class ee{constructor(I,ie){this.workerPool=I,this.actors=[],this.currentActor=0,this.id=ie;let Te=this.workerPool.acquire(ie);for(let Me=0;Me{ie.remove()}),this.actors=[],I&&this.workerPool.release(this.id)}registerMessageHandler(I,ie){for(let Te of this.actors)Te.registerMessageHandler(I,ie)}}function q(){return G||(G=new ee(Y(),t.G),G.registerMessageHandler("GR",(Fe,I,ie)=>t.m(I,ie))),G}function se(Fe,I){let ie=t.H();return t.J(ie,ie,[1,1,0]),t.K(ie,ie,[.5*Fe.width,.5*Fe.height,1]),t.L(ie,ie,Fe.calculatePosMatrix(I.toUnwrapped()))}function ae(Fe,I,ie,Te,Me,ze){let ht=function(Ar,Kr,na){if(Ar)for(let Ve of Ar){let $e=Kr[Ve];if($e&&$e.source===na&&$e.type==="fill-extrusion")return!0}else for(let Ve in Kr){let $e=Kr[Ve];if($e.source===na&&$e.type==="fill-extrusion")return!0}return!1}(Me&&Me.layers,I,Fe.id),wt=ze.maxPitchScaleFactor(),Ot=Fe.tilesIn(Te,wt,ht);Ot.sort(j);let $t=[];for(let Ar of Ot)$t.push({wrappedTileID:Ar.tileID.wrapped().key,queryResults:Ar.tile.queryRenderedFeatures(I,ie,Fe._state,Ar.queryGeometry,Ar.cameraQueryGeometry,Ar.scale,Me,ze,wt,se(Fe.transform,Ar.tileID))});let Tr=function(Ar){let Kr={},na={};for(let Ve of Ar){let $e=Ve.queryResults,ot=Ve.wrappedTileID,pt=na[ot]=na[ot]||{};for(let Et in $e){let bt=$e[Et],Rt=pt[Et]=pt[Et]||{},lr=Kr[Et]=Kr[Et]||[];for(let yr of bt)Rt[yr.featureIndex]||(Rt[yr.featureIndex]=!0,lr.push(yr))}}return Kr}($t);for(let Ar in Tr)Tr[Ar].forEach(Kr=>{let na=Kr.feature,Ve=Fe.getFeatureState(na.layer["source-layer"],na.id);na.source=na.layer.source,na.layer["source-layer"]&&(na.sourceLayer=na.layer["source-layer"]),na.state=Ve});return Tr}function j(Fe,I){let ie=Fe.tileID,Te=I.tileID;return ie.overscaledZ-Te.overscaledZ||ie.canonical.y-Te.canonical.y||ie.wrap-Te.wrap||ie.canonical.x-Te.canonical.x}function Q(Fe,I,ie){return t._(this,void 0,void 0,function*(){let Te=Fe;if(Fe.url?Te=(yield t.h(I.transformRequest(Fe.url,"Source"),ie)).data:yield n.frameAsync(ie),!Te)return null;let Me=t.M(t.e(Te,Fe),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return"vector_layers"in Te&&Te.vector_layers&&(Me.vectorLayerIds=Te.vector_layers.map(ze=>ze.id)),Me})}class re{constructor(I,ie){I&&(ie?this.setSouthWest(I).setNorthEast(ie):Array.isArray(I)&&(I.length===4?this.setSouthWest([I[0],I[1]]).setNorthEast([I[2],I[3]]):this.setSouthWest(I[0]).setNorthEast(I[1])))}setNorthEast(I){return this._ne=I instanceof t.N?new t.N(I.lng,I.lat):t.N.convert(I),this}setSouthWest(I){return this._sw=I instanceof t.N?new t.N(I.lng,I.lat):t.N.convert(I),this}extend(I){let ie=this._sw,Te=this._ne,Me,ze;if(I instanceof t.N)Me=I,ze=I;else{if(!(I instanceof re))return Array.isArray(I)?I.length===4||I.every(Array.isArray)?this.extend(re.convert(I)):this.extend(t.N.convert(I)):I&&("lng"in I||"lon"in I)&&"lat"in I?this.extend(t.N.convert(I)):this;if(Me=I._sw,ze=I._ne,!Me||!ze)return this}return ie||Te?(ie.lng=Math.min(Me.lng,ie.lng),ie.lat=Math.min(Me.lat,ie.lat),Te.lng=Math.max(ze.lng,Te.lng),Te.lat=Math.max(ze.lat,Te.lat)):(this._sw=new t.N(Me.lng,Me.lat),this._ne=new t.N(ze.lng,ze.lat)),this}getCenter(){return new t.N((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)}getSouthWest(){return this._sw}getNorthEast(){return this._ne}getNorthWest(){return new t.N(this.getWest(),this.getNorth())}getSouthEast(){return new t.N(this.getEast(),this.getSouth())}getWest(){return this._sw.lng}getSouth(){return this._sw.lat}getEast(){return this._ne.lng}getNorth(){return this._ne.lat}toArray(){return[this._sw.toArray(),this._ne.toArray()]}toString(){return`LngLatBounds(${this._sw.toString()}, ${this._ne.toString()})`}isEmpty(){return!(this._sw&&this._ne)}contains(I){let{lng:ie,lat:Te}=t.N.convert(I),Me=this._sw.lng<=ie&&ie<=this._ne.lng;return this._sw.lng>this._ne.lng&&(Me=this._sw.lng>=ie&&ie>=this._ne.lng),this._sw.lat<=Te&&Te<=this._ne.lat&&Me}static convert(I){return I instanceof re?I:I&&new re(I)}static fromLngLat(I,ie=0){let Te=360*ie/40075017,Me=Te/Math.cos(Math.PI/180*I.lat);return new re(new t.N(I.lng-Me,I.lat-Te),new t.N(I.lng+Me,I.lat+Te))}adjustAntiMeridian(){let I=new t.N(this._sw.lng,this._sw.lat),ie=new t.N(this._ne.lng,this._ne.lat);return new re(I,I.lng>ie.lng?new t.N(ie.lng+360,ie.lat):ie)}}class pe{constructor(I,ie,Te){this.bounds=re.convert(this.validateBounds(I)),this.minzoom=ie||0,this.maxzoom=Te||24}validateBounds(I){return Array.isArray(I)&&I.length===4?[Math.max(-180,I[0]),Math.max(-90,I[1]),Math.min(180,I[2]),Math.min(90,I[3])]:[-180,-90,180,90]}contains(I){let ie=Math.pow(2,I.z),Te=Math.floor(t.O(this.bounds.getWest())*ie),Me=Math.floor(t.Q(this.bounds.getNorth())*ie),ze=Math.ceil(t.O(this.bounds.getEast())*ie),ht=Math.ceil(t.Q(this.bounds.getSouth())*ie);return I.x>=Te&&I.x=Me&&I.y{this._options.tiles=I}),this}setUrl(I){return this.setSourceProperty(()=>{this.url=I,this._options.url=I}),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}serialize(){return t.e({},this._options)}loadTile(I){return t._(this,void 0,void 0,function*(){let ie=I.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),Te={request:this.map._requestManager.transformRequest(ie,"Tile"),uid:I.uid,tileID:I.tileID,zoom:I.tileID.overscaledZ,tileSize:this.tileSize*I.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};Te.request.collectResourceTiming=this._collectResourceTiming;let Me="RT";if(I.actor&&I.state!=="expired"){if(I.state==="loading")return new Promise((ze,ht)=>{I.reloadPromise={resolve:ze,reject:ht}})}else I.actor=this.dispatcher.getActor(),Me="LT";I.abortController=new AbortController;try{let ze=yield I.actor.sendAsync({type:Me,data:Te},I.abortController);if(delete I.abortController,I.aborted)return;this._afterTileLoadWorkerResponse(I,ze)}catch(ze){if(delete I.abortController,I.aborted)return;if(ze&&ze.status!==404)throw ze;this._afterTileLoadWorkerResponse(I,null)}})}_afterTileLoadWorkerResponse(I,ie){if(ie&&ie.resourceTiming&&(I.resourceTiming=ie.resourceTiming),ie&&this.map._refreshExpiredTiles&&I.setExpiryData(ie),I.loadVectorData(ie,this.map.painter),I.reloadPromise){let Te=I.reloadPromise;I.reloadPromise=null,this.loadTile(I).then(Te.resolve).catch(Te.reject)}}abortTile(I){return t._(this,void 0,void 0,function*(){I.abortController&&(I.abortController.abort(),delete I.abortController),I.actor&&(yield I.actor.sendAsync({type:"AT",data:{uid:I.uid,type:this.type,source:this.id}}))})}unloadTile(I){return t._(this,void 0,void 0,function*(){I.unloadVectorData(),I.actor&&(yield I.actor.sendAsync({type:"RMT",data:{uid:I.uid,type:this.type,source:this.id}}))})}hasTransition(){return!1}}class Se extends t.E{constructor(I,ie,Te,Me){super(),this.id=I,this.dispatcher=Te,this.setEventedParent(Me),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=t.e({type:"raster"},ie),t.e(this,t.M(ie,["url","scheme","tileSize"]))}load(){return t._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new t.k("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{let I=yield Q(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,I&&(t.e(this,I),I.bounds&&(this.tileBounds=new pe(I.bounds,this.minzoom,this.maxzoom)),this.fire(new t.k("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new t.k("data",{dataType:"source",sourceDataType:"content"})))}catch(I){this._tileJSONRequest=null,this.fire(new t.j(I))}})}loaded(){return this._loaded}onAdd(I){this.map=I,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}setSourceProperty(I){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null),I(),this.load()}setTiles(I){return this.setSourceProperty(()=>{this._options.tiles=I}),this}setUrl(I){return this.setSourceProperty(()=>{this.url=I,this._options.url=I}),this}serialize(){return t.e({},this._options)}hasTile(I){return!this.tileBounds||this.tileBounds.contains(I.canonical)}loadTile(I){return t._(this,void 0,void 0,function*(){let ie=I.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);I.abortController=new AbortController;try{let Te=yield l.getImage(this.map._requestManager.transformRequest(ie,"Tile"),I.abortController,this.map._refreshExpiredTiles);if(delete I.abortController,I.aborted)return void(I.state="unloaded");if(Te&&Te.data){this.map._refreshExpiredTiles&&Te.cacheControl&&Te.expires&&I.setExpiryData({cacheControl:Te.cacheControl,expires:Te.expires});let Me=this.map.painter.context,ze=Me.gl,ht=Te.data;I.texture=this.map.painter.getTileTexture(ht.width),I.texture?I.texture.update(ht,{useMipmap:!0}):(I.texture=new u(Me,ht,ze.RGBA,{useMipmap:!0}),I.texture.bind(ze.LINEAR,ze.CLAMP_TO_EDGE,ze.LINEAR_MIPMAP_NEAREST)),I.state="loaded"}}catch(Te){if(delete I.abortController,I.aborted)I.state="unloaded";else if(Te)throw I.state="errored",Te}})}abortTile(I){return t._(this,void 0,void 0,function*(){I.abortController&&(I.abortController.abort(),delete I.abortController)})}unloadTile(I){return t._(this,void 0,void 0,function*(){I.texture&&this.map.painter.saveTileTexture(I.texture)})}hasTransition(){return!1}}class Ie extends Se{constructor(I,ie,Te,Me){super(I,ie,Te,Me),this.type="raster-dem",this.maxzoom=22,this._options=t.e({type:"raster-dem"},ie),this.encoding=ie.encoding||"mapbox",this.redFactor=ie.redFactor,this.greenFactor=ie.greenFactor,this.blueFactor=ie.blueFactor,this.baseShift=ie.baseShift}loadTile(I){return t._(this,void 0,void 0,function*(){let ie=I.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),Te=this.map._requestManager.transformRequest(ie,"Tile");I.neighboringTiles=this._getNeighboringTiles(I.tileID),I.abortController=new AbortController;try{let Me=yield l.getImage(Te,I.abortController,this.map._refreshExpiredTiles);if(delete I.abortController,I.aborted)return void(I.state="unloaded");if(Me&&Me.data){let ze=Me.data;this.map._refreshExpiredTiles&&Me.cacheControl&&Me.expires&&I.setExpiryData({cacheControl:Me.cacheControl,expires:Me.expires});let ht=t.b(ze)&&t.U()?ze:yield this.readImageNow(ze),wt={type:this.type,uid:I.uid,source:this.id,rawImageData:ht,encoding:this.encoding,redFactor:this.redFactor,greenFactor:this.greenFactor,blueFactor:this.blueFactor,baseShift:this.baseShift};if(!I.actor||I.state==="expired"){I.actor=this.dispatcher.getActor();let Ot=yield I.actor.sendAsync({type:"LDT",data:wt});I.dem=Ot,I.needsHillshadePrepare=!0,I.needsTerrainPrepare=!0,I.state="loaded"}}}catch(Me){if(delete I.abortController,I.aborted)I.state="unloaded";else if(Me)throw I.state="errored",Me}})}readImageNow(I){return t._(this,void 0,void 0,function*(){if(typeof VideoFrame<"u"&&t.V()){let ie=I.width+2,Te=I.height+2;try{return new t.R({width:ie,height:Te},yield t.W(I,-1,-1,ie,Te))}catch{}}return n.getImageData(I,1)})}_getNeighboringTiles(I){let ie=I.canonical,Te=Math.pow(2,ie.z),Me=(ie.x-1+Te)%Te,ze=ie.x===0?I.wrap-1:I.wrap,ht=(ie.x+1+Te)%Te,wt=ie.x+1===Te?I.wrap+1:I.wrap,Ot={};return Ot[new t.S(I.overscaledZ,ze,ie.z,Me,ie.y).key]={backfilled:!1},Ot[new t.S(I.overscaledZ,wt,ie.z,ht,ie.y).key]={backfilled:!1},ie.y>0&&(Ot[new t.S(I.overscaledZ,ze,ie.z,Me,ie.y-1).key]={backfilled:!1},Ot[new t.S(I.overscaledZ,I.wrap,ie.z,ie.x,ie.y-1).key]={backfilled:!1},Ot[new t.S(I.overscaledZ,wt,ie.z,ht,ie.y-1).key]={backfilled:!1}),ie.y+10&&t.e(ze,{resourceTiming:Me}),this.fire(new t.k("data",Object.assign(Object.assign({},ze),{sourceDataType:"metadata"}))),this.fire(new t.k("data",Object.assign(Object.assign({},ze),{sourceDataType:"content"})))}catch(Te){if(this._pendingLoads--,this._removed)return void this.fire(new t.k("dataabort",{dataType:"source"}));this.fire(new t.j(Te))}})}loaded(){return this._pendingLoads===0}loadTile(I){return t._(this,void 0,void 0,function*(){let ie=I.actor?"RT":"LT";I.actor=this.actor;let Te={type:this.type,uid:I.uid,tileID:I.tileID,zoom:I.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};I.abortController=new AbortController;let Me=yield this.actor.sendAsync({type:ie,data:Te},I.abortController);delete I.abortController,I.unloadVectorData(),I.aborted||I.loadVectorData(Me,this.map.painter,ie==="RT")})}abortTile(I){return t._(this,void 0,void 0,function*(){I.abortController&&(I.abortController.abort(),delete I.abortController),I.aborted=!0})}unloadTile(I){return t._(this,void 0,void 0,function*(){I.unloadVectorData(),yield this.actor.sendAsync({type:"RMT",data:{uid:I.uid,type:this.type,source:this.id}})})}onRemove(){this._removed=!0,this.actor.sendAsync({type:"RS",data:{type:this.type,source:this.id}})}serialize(){return t.e({},this._options,{type:this.type,data:this._data})}hasTransition(){return!1}}var We=t.Y([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class at extends t.E{constructor(I,ie,Te,Me){super(),this.id=I,this.dispatcher=Te,this.coordinates=ie.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(Me),this.options=ie}load(I){return t._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new t.k("dataloading",{dataType:"source"})),this.url=this.options.url,this._request=new AbortController;try{let ie=yield l.getImage(this.map._requestManager.transformRequest(this.url,"Image"),this._request);this._request=null,this._loaded=!0,ie&&ie.data&&(this.image=ie.data,I&&(this.coordinates=I),this._finishLoading())}catch(ie){this._request=null,this._loaded=!0,this.fire(new t.j(ie))}})}loaded(){return this._loaded}updateImage(I){return I.url?(this._request&&(this._request.abort(),this._request=null),this.options.url=I.url,this.load(I.coordinates).finally(()=>{this.texture=null}),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new t.k("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(I){this.map=I,this.load()}onRemove(){this._request&&(this._request.abort(),this._request=null)}setCoordinates(I){this.coordinates=I;let ie=I.map(t.Z.fromLngLat);this.tileID=function(Me){let ze=1/0,ht=1/0,wt=-1/0,Ot=-1/0;for(let Kr of Me)ze=Math.min(ze,Kr.x),ht=Math.min(ht,Kr.y),wt=Math.max(wt,Kr.x),Ot=Math.max(Ot,Kr.y);let $t=Math.max(wt-ze,Ot-ht),Tr=Math.max(0,Math.floor(-Math.log($t)/Math.LN2)),Ar=Math.pow(2,Tr);return new t.a1(Tr,Math.floor((ze+wt)/2*Ar),Math.floor((ht+Ot)/2*Ar))}(ie),this.minzoom=this.maxzoom=this.tileID.z;let Te=ie.map(Me=>this.tileID.getTilePoint(Me)._round());return this._boundsArray=new t.$,this._boundsArray.emplaceBack(Te[0].x,Te[0].y,0,0),this._boundsArray.emplaceBack(Te[1].x,Te[1].y,t.X,0),this._boundsArray.emplaceBack(Te[3].x,Te[3].y,0,t.X),this._boundsArray.emplaceBack(Te[2].x,Te[2].y,t.X,t.X),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new t.k("data",{dataType:"source",sourceDataType:"content"})),this}prepare(){if(Object.keys(this.tiles).length===0||!this.image)return;let I=this.map.painter.context,ie=I.gl;this.boundsBuffer||(this.boundsBuffer=I.createVertexBuffer(this._boundsArray,We.members)),this.boundsSegments||(this.boundsSegments=t.a0.simpleSegment(0,0,4,2)),this.texture||(this.texture=new u(I,this.image,ie.RGBA),this.texture.bind(ie.LINEAR,ie.CLAMP_TO_EDGE));let Te=!1;for(let Me in this.tiles){let ze=this.tiles[Me];ze.state!=="loaded"&&(ze.state="loaded",ze.texture=this.texture,Te=!0)}Te&&this.fire(new t.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}loadTile(I){return t._(this,void 0,void 0,function*(){this.tileID&&this.tileID.equals(I.tileID.canonical)?(this.tiles[String(I.tileID.wrap)]=I,I.buckets={}):I.state="errored"})}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}}class nt extends at{constructor(I,ie,Te,Me){super(I,ie,Te,Me),this.roundZoom=!0,this.type="video",this.options=ie}load(){return t._(this,void 0,void 0,function*(){this._loaded=!1;let I=this.options;this.urls=[];for(let ie of I.urls)this.urls.push(this.map._requestManager.transformRequest(ie,"Source").url);try{let ie=yield t.a3(this.urls);if(this._loaded=!0,!ie)return;this.video=ie,this.video.loop=!0,this.video.addEventListener("playing",()=>{this.map.triggerRepaint()}),this.map&&this.video.play(),this._finishLoading()}catch(ie){this.fire(new t.j(ie))}})}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(I){if(this.video){let ie=this.video.seekable;Iie.end(0)?this.fire(new t.j(new t.a2(`sources.${this.id}`,null,`Playback for this video can be set only between the ${ie.start(0)} and ${ie.end(0)}-second mark.`))):this.video.currentTime=I}}getVideo(){return this.video}onAdd(I){this.map||(this.map=I,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}prepare(){if(Object.keys(this.tiles).length===0||this.video.readyState<2)return;let I=this.map.painter.context,ie=I.gl;this.boundsBuffer||(this.boundsBuffer=I.createVertexBuffer(this._boundsArray,We.members)),this.boundsSegments||(this.boundsSegments=t.a0.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(ie.LINEAR,ie.CLAMP_TO_EDGE),ie.texSubImage2D(ie.TEXTURE_2D,0,0,0,ie.RGBA,ie.UNSIGNED_BYTE,this.video)):(this.texture=new u(I,this.video,ie.RGBA),this.texture.bind(ie.LINEAR,ie.CLAMP_TO_EDGE));let Te=!1;for(let Me in this.tiles){let ze=this.tiles[Me];ze.state!=="loaded"&&(ze.state="loaded",ze.texture=this.texture,Te=!0)}Te&&this.fire(new t.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}hasTransition(){return this.video&&!this.video.paused}}class tt extends at{constructor(I,ie,Te,Me){super(I,ie,Te,Me),ie.coordinates?Array.isArray(ie.coordinates)&&ie.coordinates.length===4&&!ie.coordinates.some(ze=>!Array.isArray(ze)||ze.length!==2||ze.some(ht=>typeof ht!="number"))||this.fire(new t.j(new t.a2(`sources.${I}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new t.j(new t.a2(`sources.${I}`,null,'missing required property "coordinates"'))),ie.animate&&typeof ie.animate!="boolean"&&this.fire(new t.j(new t.a2(`sources.${I}`,null,'optional "animate" property must be a boolean value'))),ie.canvas?typeof ie.canvas=="string"||ie.canvas instanceof HTMLCanvasElement||this.fire(new t.j(new t.a2(`sources.${I}`,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 t.j(new t.a2(`sources.${I}`,null,'missing required property "canvas"'))),this.options=ie,this.animate=ie.animate===void 0||ie.animate}load(){return t._(this,void 0,void 0,function*(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof HTMLCanvasElement?this.options.canvas:document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new t.j(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())})}getCanvas(){return this.canvas}onAdd(I){this.map=I,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let I=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,I=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,I=!0),this._hasInvalidDimensions()||Object.keys(this.tiles).length===0)return;let ie=this.map.painter.context,Te=ie.gl;this.boundsBuffer||(this.boundsBuffer=ie.createVertexBuffer(this._boundsArray,We.members)),this.boundsSegments||(this.boundsSegments=t.a0.simpleSegment(0,0,4,2)),this.texture?(I||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new u(ie,this.canvas,Te.RGBA,{premultiply:!0});let Me=!1;for(let ze in this.tiles){let ht=this.tiles[ze];ht.state!=="loaded"&&(ht.state="loaded",ht.texture=this.texture,Me=!0)}Me&&this.fire(new t.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"canvas",coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(let I of[this.canvas.width,this.canvas.height])if(isNaN(I)||I<=0)return!0;return!1}}let qe={},he=Fe=>{switch(Fe){case"geojson":return Re;case"image":return at;case"raster":return Se;case"raster-dem":return Ie;case"vector":return we;case"video":return nt;case"canvas":return tt}return qe[Fe]},ue="RTLPluginLoaded";class ne extends t.E{constructor(){super(...arguments),this.status="unavailable",this.url=null,this.dispatcher=q()}_syncState(I){return this.status=I,this.dispatcher.broadcast("SRPS",{pluginStatus:I,pluginURL:this.url}).catch(ie=>{throw this.status="error",ie})}getRTLTextPluginStatus(){return this.status}clearRTLTextPlugin(){this.status="unavailable",this.url=null}setRTLTextPlugin(I){return t._(this,arguments,void 0,function*(ie,Te=!1){if(this.url)throw new Error("setRTLTextPlugin cannot be called multiple times.");if(this.url=n.resolveURL(ie),!this.url)throw new Error(`requested url ${ie} is invalid`);if(this.status==="unavailable"){if(!Te)return this._requestImport();this.status="deferred",this._syncState(this.status)}else if(this.status==="requested")return this._requestImport()})}_requestImport(){return t._(this,void 0,void 0,function*(){yield this._syncState("loading"),this.status="loaded",this.fire(new t.k(ue))})}lazyLoad(){this.status==="unavailable"?this.status="requested":this.status==="deferred"&&this._requestImport()}}let Ce=null;function Ye(){return Ce||(Ce=new ne),Ce}class rt{constructor(I,ie){this.timeAdded=0,this.fadeEndTime=0,this.tileID=I,this.uid=t.a4(),this.uses=0,this.tileSize=ie,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.rtt=[],this.rttCoords={},this.expiredRequestCount=0,this.state="loading"}registerFadeDuration(I){let ie=I+this.timeAdded;ieze.getLayer($t)).filter(Boolean);if(Ot.length!==0){wt.layers=Ot,wt.stateDependentLayerIds&&(wt.stateDependentLayers=wt.stateDependentLayerIds.map($t=>Ot.filter(Tr=>Tr.id===$t)[0]));for(let $t of Ot)ht[$t.id]=wt}}return ht}(I.buckets,ie.style),this.hasSymbolBuckets=!1;for(let Me in this.buckets){let ze=this.buckets[Me];if(ze instanceof t.a6){if(this.hasSymbolBuckets=!0,!Te)break;ze.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(let Me in this.buckets){let ze=this.buckets[Me];if(ze instanceof t.a6&&ze.hasRTLText){this.hasRTLText=!0,Ye().lazyLoad();break}}this.queryPadding=0;for(let Me in this.buckets){let ze=this.buckets[Me];this.queryPadding=Math.max(this.queryPadding,ie.style.getLayer(Me).queryRadius(ze))}I.imageAtlas&&(this.imageAtlas=I.imageAtlas),I.glyphAtlasImage&&(this.glyphAtlasImage=I.glyphAtlasImage)}else this.collisionBoxArray=new t.a5}unloadVectorData(){for(let I in this.buckets)this.buckets[I].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.imageAtlas&&(this.imageAtlas=null),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state="unloaded"}getBucket(I){return this.buckets[I.id]}upload(I){for(let Te in this.buckets){let Me=this.buckets[Te];Me.uploadPending()&&Me.upload(I)}let ie=I.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new u(I,this.imageAtlas.image,ie.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new u(I,this.glyphAtlasImage,ie.ALPHA),this.glyphAtlasImage=null)}prepare(I){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(I,this.imageAtlasTexture)}queryRenderedFeatures(I,ie,Te,Me,ze,ht,wt,Ot,$t,Tr){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:Me,cameraQueryGeometry:ze,scale:ht,tileSize:this.tileSize,pixelPosMatrix:Tr,transform:Ot,params:wt,queryPadding:this.queryPadding*$t},I,ie,Te):{}}querySourceFeatures(I,ie){let Te=this.latestFeatureIndex;if(!Te||!Te.rawTileData)return;let Me=Te.loadVTLayers(),ze=ie&&ie.sourceLayer?ie.sourceLayer:"",ht=Me._geojsonTileLayer||Me[ze];if(!ht)return;let wt=t.a7(ie&&ie.filter),{z:Ot,x:$t,y:Tr}=this.tileID.canonical,Ar={z:Ot,x:$t,y:Tr};for(let Kr=0;KrTe)Me=!1;else if(ie)if(this.expirationTime{this.remove(I,ze)},Te)),this.data[Me].push(ze),this.order.push(Me),this.order.length>this.max){let ht=this._getAndRemoveByKey(this.order[0]);ht&&this.onRemove(ht)}return this}has(I){return I.wrapped().key in this.data}getAndRemove(I){return this.has(I)?this._getAndRemoveByKey(I.wrapped().key):null}_getAndRemoveByKey(I){let ie=this.data[I].shift();return ie.timeout&&clearTimeout(ie.timeout),this.data[I].length===0&&delete this.data[I],this.order.splice(this.order.indexOf(I),1),ie.value}getByKey(I){let ie=this.data[I];return ie?ie[0].value:null}get(I){return this.has(I)?this.data[I.wrapped().key][0].value:null}remove(I,ie){if(!this.has(I))return this;let Te=I.wrapped().key,Me=ie===void 0?0:this.data[Te].indexOf(ie),ze=this.data[Te][Me];return this.data[Te].splice(Me,1),ze.timeout&&clearTimeout(ze.timeout),this.data[Te].length===0&&delete this.data[Te],this.onRemove(ze.value),this.order.splice(this.order.indexOf(Te),1),this}setMaxSize(I){for(this.max=I;this.order.length>this.max;){let ie=this._getAndRemoveByKey(this.order[0]);ie&&this.onRemove(ie)}return this}filter(I){let ie=[];for(let Te in this.data)for(let Me of this.data[Te])I(Me.value)||ie.push(Me);for(let Te of ie)this.remove(Te.value.tileID,Te)}}class Mt{constructor(){this.state={},this.stateChanges={},this.deletedStates={}}updateState(I,ie,Te){let Me=String(ie);if(this.stateChanges[I]=this.stateChanges[I]||{},this.stateChanges[I][Me]=this.stateChanges[I][Me]||{},t.e(this.stateChanges[I][Me],Te),this.deletedStates[I]===null){this.deletedStates[I]={};for(let ze in this.state[I])ze!==Me&&(this.deletedStates[I][ze]=null)}else if(this.deletedStates[I]&&this.deletedStates[I][Me]===null){this.deletedStates[I][Me]={};for(let ze in this.state[I][Me])Te[ze]||(this.deletedStates[I][Me][ze]=null)}else for(let ze in Te)this.deletedStates[I]&&this.deletedStates[I][Me]&&this.deletedStates[I][Me][ze]===null&&delete this.deletedStates[I][Me][ze]}removeFeatureState(I,ie,Te){if(this.deletedStates[I]===null)return;let Me=String(ie);if(this.deletedStates[I]=this.deletedStates[I]||{},Te&&ie!==void 0)this.deletedStates[I][Me]!==null&&(this.deletedStates[I][Me]=this.deletedStates[I][Me]||{},this.deletedStates[I][Me][Te]=null);else if(ie!==void 0)if(this.stateChanges[I]&&this.stateChanges[I][Me])for(Te in this.deletedStates[I][Me]={},this.stateChanges[I][Me])this.deletedStates[I][Me][Te]=null;else this.deletedStates[I][Me]=null;else this.deletedStates[I]=null}getState(I,ie){let Te=String(ie),Me=t.e({},(this.state[I]||{})[Te],(this.stateChanges[I]||{})[Te]);if(this.deletedStates[I]===null)return{};if(this.deletedStates[I]){let ze=this.deletedStates[I][ie];if(ze===null)return{};for(let ht in ze)delete Me[ht]}return Me}initializeTileState(I,ie){I.setFeatureState(this.state,ie)}coalesceChanges(I,ie){let Te={};for(let Me in this.stateChanges){this.state[Me]=this.state[Me]||{};let ze={};for(let ht in this.stateChanges[Me])this.state[Me][ht]||(this.state[Me][ht]={}),t.e(this.state[Me][ht],this.stateChanges[Me][ht]),ze[ht]=this.state[Me][ht];Te[Me]=ze}for(let Me in this.deletedStates){this.state[Me]=this.state[Me]||{};let ze={};if(this.deletedStates[Me]===null)for(let ht in this.state[Me])ze[ht]={},this.state[Me][ht]={};else for(let ht in this.deletedStates[Me]){if(this.deletedStates[Me][ht]===null)this.state[Me][ht]={};else for(let wt of Object.keys(this.deletedStates[Me][ht]))delete this.state[Me][ht][wt];ze[ht]=this.state[Me][ht]}Te[Me]=Te[Me]||{},t.e(Te[Me],ze)}if(this.stateChanges={},this.deletedStates={},Object.keys(Te).length!==0)for(let Me in I)I[Me].setFeatureState(Te,ie)}}class kt extends t.E{constructor(I,ie,Te){super(),this.id=I,this.dispatcher=Te,this.on("data",Me=>this._dataHandler(Me)),this.on("dataloading",()=>{this._sourceErrored=!1}),this.on("error",()=>{this._sourceErrored=this._source.loaded()}),this._source=((Me,ze,ht,wt)=>{let Ot=new(he(ze.type))(Me,ze,ht,wt);if(Ot.id!==Me)throw new Error(`Expected Source id to be ${Me} instead of ${Ot.id}`);return Ot})(I,ie,Te,this),this._tiles={},this._cache=new Ke(0,Me=>this._unloadTile(Me)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new Mt,this._didEmitContent=!1,this._updated=!1}onAdd(I){this.map=I,this._maxTileCacheSize=I?I._maxTileCacheSize:null,this._maxTileCacheZoomLevels=I?I._maxTileCacheZoomLevels:null,this._source&&this._source.onAdd&&this._source.onAdd(I)}onRemove(I){this.clearTiles(),this._source&&this._source.onRemove&&this._source.onRemove(I)}loaded(){if(this._sourceErrored)return!0;if(!this._sourceLoaded||!this._source.loaded())return!1;if(!(this.used===void 0&&this.usedForTerrain===void 0||this.used||this.usedForTerrain))return!0;if(!this._updated)return!1;for(let I in this._tiles){let ie=this._tiles[I];if(ie.state!=="loaded"&&ie.state!=="errored")return!1}return!0}getSource(){return this._source}pause(){this._paused=!0}resume(){if(!this._paused)return;let I=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,I&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(I,ie,Te){return t._(this,void 0,void 0,function*(){try{yield this._source.loadTile(I),this._tileLoaded(I,ie,Te)}catch(Me){I.state="errored",Me.status!==404?this._source.fire(new t.j(Me,{tile:I})):this.update(this.transform,this.terrain)}})}_unloadTile(I){this._source.unloadTile&&this._source.unloadTile(I)}_abortTile(I){this._source.abortTile&&this._source.abortTile(I),this._source.fire(new t.k("dataabort",{tile:I,coord:I.tileID,dataType:"source"}))}serialize(){return this._source.serialize()}prepare(I){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(let ie in this._tiles){let Te=this._tiles[ie];Te.upload(I),Te.prepare(this.map.style.imageManager)}}getIds(){return Object.values(this._tiles).map(I=>I.tileID).sort(Nt).map(I=>I.key)}getRenderableIds(I){let ie=[];for(let Te in this._tiles)this._isIdRenderable(Te,I)&&ie.push(this._tiles[Te]);return I?ie.sort((Te,Me)=>{let ze=Te.tileID,ht=Me.tileID,wt=new t.P(ze.canonical.x,ze.canonical.y)._rotate(this.transform.angle),Ot=new t.P(ht.canonical.x,ht.canonical.y)._rotate(this.transform.angle);return ze.overscaledZ-ht.overscaledZ||Ot.y-wt.y||Ot.x-wt.x}).map(Te=>Te.tileID.key):ie.map(Te=>Te.tileID).sort(Nt).map(Te=>Te.key)}hasRenderableParent(I){let ie=this.findLoadedParent(I,0);return!!ie&&this._isIdRenderable(ie.tileID.key)}_isIdRenderable(I,ie){return this._tiles[I]&&this._tiles[I].hasData()&&!this._coveredTiles[I]&&(ie||!this._tiles[I].holdingForFade())}reload(){if(this._paused)this._shouldReloadOnResume=!0;else{this._cache.reset();for(let I in this._tiles)this._tiles[I].state!=="errored"&&this._reloadTile(I,"reloading")}}_reloadTile(I,ie){return t._(this,void 0,void 0,function*(){let Te=this._tiles[I];Te&&(Te.state!=="loading"&&(Te.state=ie),yield this._loadTile(Te,I,ie))})}_tileLoaded(I,ie,Te){I.timeAdded=n.now(),Te==="expired"&&(I.refreshedUponExpiration=!0),this._setTileReloadTimer(ie,I),this.getSource().type==="raster-dem"&&I.dem&&this._backfillDEM(I),this._state.initializeTileState(I,this.map?this.map.painter:null),I.aborted||this._source.fire(new t.k("data",{dataType:"source",tile:I,coord:I.tileID}))}_backfillDEM(I){let ie=this.getRenderableIds();for(let Me=0;Me1||(Math.abs(ht)>1&&(Math.abs(ht+Ot)===1?ht+=Ot:Math.abs(ht-Ot)===1&&(ht-=Ot)),ze.dem&&Me.dem&&(Me.dem.backfillBorder(ze.dem,ht,wt),Me.neighboringTiles&&Me.neighboringTiles[$t]&&(Me.neighboringTiles[$t].backfilled=!0)))}}getTile(I){return this.getTileByID(I.key)}getTileByID(I){return this._tiles[I]}_retainLoadedChildren(I,ie,Te,Me){for(let ze in this._tiles){let ht=this._tiles[ze];if(Me[ze]||!ht.hasData()||ht.tileID.overscaledZ<=ie||ht.tileID.overscaledZ>Te)continue;let wt=ht.tileID;for(;ht&&ht.tileID.overscaledZ>ie+1;){let $t=ht.tileID.scaledTo(ht.tileID.overscaledZ-1);ht=this._tiles[$t.key],ht&&ht.hasData()&&(wt=$t)}let Ot=wt;for(;Ot.overscaledZ>ie;)if(Ot=Ot.scaledTo(Ot.overscaledZ-1),I[Ot.key]){Me[wt.key]=wt;break}}}findLoadedParent(I,ie){if(I.key in this._loadedParentTiles){let Te=this._loadedParentTiles[I.key];return Te&&Te.tileID.overscaledZ>=ie?Te:null}for(let Te=I.overscaledZ-1;Te>=ie;Te--){let Me=I.scaledTo(Te),ze=this._getLoadedTile(Me);if(ze)return ze}}findLoadedSibling(I){return this._getLoadedTile(I)}_getLoadedTile(I){let ie=this._tiles[I.key];return ie&&ie.hasData()?ie:this._cache.getByKey(I.wrapped().key)}updateCacheSize(I){let ie=Math.ceil(I.width/this._source.tileSize)+1,Te=Math.ceil(I.height/this._source.tileSize)+1,Me=Math.floor(ie*Te*(this._maxTileCacheZoomLevels===null?t.a.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels)),ze=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,Me):Me;this._cache.setMaxSize(ze)}handleWrapJump(I){let ie=Math.round((I-(this._prevLng===void 0?I:this._prevLng))/360);if(this._prevLng=I,ie){let Te={};for(let Me in this._tiles){let ze=this._tiles[Me];ze.tileID=ze.tileID.unwrapTo(ze.tileID.wrap+ie),Te[ze.tileID.key]=ze}this._tiles=Te;for(let Me in this._timers)clearTimeout(this._timers[Me]),delete this._timers[Me];for(let Me in this._tiles)this._setTileReloadTimer(Me,this._tiles[Me])}}_updateCoveredAndRetainedTiles(I,ie,Te,Me,ze,ht){let wt={},Ot={},$t=Object.keys(I),Tr=n.now();for(let Ar of $t){let Kr=I[Ar],na=this._tiles[Ar];if(!na||na.fadeEndTime!==0&&na.fadeEndTime<=Tr)continue;let Ve=this.findLoadedParent(Kr,ie),$e=this.findLoadedSibling(Kr),ot=Ve||$e||null;ot&&(this._addTile(ot.tileID),wt[ot.tileID.key]=ot.tileID),Ot[Ar]=Kr}this._retainLoadedChildren(Ot,Me,Te,I);for(let Ar in wt)I[Ar]||(this._coveredTiles[Ar]=!0,I[Ar]=wt[Ar]);if(ht){let Ar={},Kr={};for(let na of ze)this._tiles[na.key].hasData()?Ar[na.key]=na:Kr[na.key]=na;for(let na in Kr){let Ve=Kr[na].children(this._source.maxzoom);this._tiles[Ve[0].key]&&this._tiles[Ve[1].key]&&this._tiles[Ve[2].key]&&this._tiles[Ve[3].key]&&(Ar[Ve[0].key]=I[Ve[0].key]=Ve[0],Ar[Ve[1].key]=I[Ve[1].key]=Ve[1],Ar[Ve[2].key]=I[Ve[2].key]=Ve[2],Ar[Ve[3].key]=I[Ve[3].key]=Ve[3],delete Kr[na])}for(let na in Kr){let Ve=Kr[na],$e=this.findLoadedParent(Ve,this._source.minzoom),ot=this.findLoadedSibling(Ve),pt=$e||ot||null;if(pt){Ar[pt.tileID.key]=I[pt.tileID.key]=pt.tileID;for(let Et in Ar)Ar[Et].isChildOf(pt.tileID)&&delete Ar[Et]}}for(let na in this._tiles)Ar[na]||(this._coveredTiles[na]=!0)}}update(I,ie){if(!this._sourceLoaded||this._paused)return;let Te;this.transform=I,this.terrain=ie,this.updateCacheSize(I),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used||this.usedForTerrain?this._source.tileID?Te=I.getVisibleUnwrappedCoordinates(this._source.tileID).map(Tr=>new t.S(Tr.canonical.z,Tr.wrap,Tr.canonical.z,Tr.canonical.x,Tr.canonical.y)):(Te=I.coveringTiles({tileSize:this.usedForTerrain?this.tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:!this.usedForTerrain&&this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled,terrain:ie}),this._source.hasTile&&(Te=Te.filter(Tr=>this._source.hasTile(Tr)))):Te=[];let Me=I.coveringZoomLevel(this._source),ze=Math.max(Me-kt.maxOverzooming,this._source.minzoom),ht=Math.max(Me+kt.maxUnderzooming,this._source.minzoom);if(this.usedForTerrain){let Tr={};for(let Ar of Te)if(Ar.canonical.z>this._source.minzoom){let Kr=Ar.scaledTo(Ar.canonical.z-1);Tr[Kr.key]=Kr;let na=Ar.scaledTo(Math.max(this._source.minzoom,Math.min(Ar.canonical.z,5)));Tr[na.key]=na}Te=Te.concat(Object.values(Tr))}let wt=Te.length===0&&!this._updated&&this._didEmitContent;this._updated=!0,wt&&this.fire(new t.k("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));let Ot=this._updateRetainedTiles(Te,Me);Gt(this._source.type)&&this._updateCoveredAndRetainedTiles(Ot,ze,ht,Me,Te,ie);for(let Tr in Ot)this._tiles[Tr].clearFadeHold();let $t=t.ab(this._tiles,Ot);for(let Tr of $t){let Ar=this._tiles[Tr];Ar.hasSymbolBuckets&&!Ar.holdingForFade()?Ar.setHoldDuration(this.map._fadeDuration):Ar.hasSymbolBuckets&&!Ar.symbolFadeFinished()||this._removeTile(Tr)}this._updateLoadedParentTileCache(),this._updateLoadedSiblingTileCache()}releaseSymbolFadeTiles(){for(let I in this._tiles)this._tiles[I].holdingForFade()&&this._removeTile(I)}_updateRetainedTiles(I,ie){var Te;let Me={},ze={},ht=Math.max(ie-kt.maxOverzooming,this._source.minzoom),wt=Math.max(ie+kt.maxUnderzooming,this._source.minzoom),Ot={};for(let $t of I){let Tr=this._addTile($t);Me[$t.key]=$t,Tr.hasData()||iethis._source.maxzoom){let Kr=$t.children(this._source.maxzoom)[0],na=this.getTile(Kr);if(na&&na.hasData()){Me[Kr.key]=Kr;continue}}else{let Kr=$t.children(this._source.maxzoom);if(Me[Kr[0].key]&&Me[Kr[1].key]&&Me[Kr[2].key]&&Me[Kr[3].key])continue}let Ar=Tr.wasRequested();for(let Kr=$t.overscaledZ-1;Kr>=ht;--Kr){let na=$t.scaledTo(Kr);if(ze[na.key])break;if(ze[na.key]=!0,Tr=this.getTile(na),!Tr&&Ar&&(Tr=this._addTile(na)),Tr){let Ve=Tr.hasData();if((Ve||!(!((Te=this.map)===null||Te===void 0)&&Te.cancelPendingTileRequestsWhileZooming)||Ar)&&(Me[na.key]=na),Ar=Tr.wasRequested(),Ve)break}}}return Me}_updateLoadedParentTileCache(){this._loadedParentTiles={};for(let I in this._tiles){let ie=[],Te,Me=this._tiles[I].tileID;for(;Me.overscaledZ>0;){if(Me.key in this._loadedParentTiles){Te=this._loadedParentTiles[Me.key];break}ie.push(Me.key);let ze=Me.scaledTo(Me.overscaledZ-1);if(Te=this._getLoadedTile(ze),Te)break;Me=ze}for(let ze of ie)this._loadedParentTiles[ze]=Te}}_updateLoadedSiblingTileCache(){this._loadedSiblingTiles={};for(let I in this._tiles){let ie=this._tiles[I].tileID,Te=this._getLoadedTile(ie);this._loadedSiblingTiles[ie.key]=Te}}_addTile(I){let ie=this._tiles[I.key];if(ie)return ie;ie=this._cache.getAndRemove(I),ie&&(this._setTileReloadTimer(I.key,ie),ie.tileID=I,this._state.initializeTileState(ie,this.map?this.map.painter:null),this._cacheTimers[I.key]&&(clearTimeout(this._cacheTimers[I.key]),delete this._cacheTimers[I.key],this._setTileReloadTimer(I.key,ie)));let Te=ie;return ie||(ie=new rt(I,this._source.tileSize*I.overscaleFactor()),this._loadTile(ie,I.key,ie.state)),ie.uses++,this._tiles[I.key]=ie,Te||this._source.fire(new t.k("dataloading",{tile:ie,coord:ie.tileID,dataType:"source"})),ie}_setTileReloadTimer(I,ie){I in this._timers&&(clearTimeout(this._timers[I]),delete this._timers[I]);let Te=ie.getExpiryTimeout();Te&&(this._timers[I]=setTimeout(()=>{this._reloadTile(I,"expired"),delete this._timers[I]},Te))}_removeTile(I){let ie=this._tiles[I];ie&&(ie.uses--,delete this._tiles[I],this._timers[I]&&(clearTimeout(this._timers[I]),delete this._timers[I]),ie.uses>0||(ie.hasData()&&ie.state!=="reloading"?this._cache.add(ie.tileID,ie,ie.getExpiryTimeout()):(ie.aborted=!0,this._abortTile(ie),this._unloadTile(ie))))}_dataHandler(I){let ie=I.sourceDataType;I.dataType==="source"&&ie==="metadata"&&(this._sourceLoaded=!0),this._sourceLoaded&&!this._paused&&I.dataType==="source"&&ie==="content"&&(this.reload(),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0)}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(let I in this._tiles)this._removeTile(I);this._cache.reset()}tilesIn(I,ie,Te){let Me=[],ze=this.transform;if(!ze)return Me;let ht=Te?ze.getCameraQueryGeometry(I):I,wt=I.map(Ve=>ze.pointCoordinate(Ve,this.terrain)),Ot=ht.map(Ve=>ze.pointCoordinate(Ve,this.terrain)),$t=this.getIds(),Tr=1/0,Ar=1/0,Kr=-1/0,na=-1/0;for(let Ve of Ot)Tr=Math.min(Tr,Ve.x),Ar=Math.min(Ar,Ve.y),Kr=Math.max(Kr,Ve.x),na=Math.max(na,Ve.y);for(let Ve=0;Ve<$t.length;Ve++){let $e=this._tiles[$t[Ve]];if($e.holdingForFade())continue;let ot=$e.tileID,pt=Math.pow(2,ze.zoom-$e.tileID.overscaledZ),Et=ie*$e.queryPadding*t.X/$e.tileSize/pt,bt=[ot.getTilePoint(new t.Z(Tr,Ar)),ot.getTilePoint(new t.Z(Kr,na))];if(bt[0].x-Et=0&&bt[1].y+Et>=0){let Rt=wt.map(yr=>ot.getTilePoint(yr)),lr=Ot.map(yr=>ot.getTilePoint(yr));Me.push({tile:$e,tileID:ot,queryGeometry:Rt,cameraQueryGeometry:lr,scale:pt})}}return Me}getVisibleCoordinates(I){let ie=this.getRenderableIds(I).map(Te=>this._tiles[Te].tileID);for(let Te of ie)Te.posMatrix=this.transform.calculatePosMatrix(Te.toUnwrapped());return ie}hasTransition(){if(this._source.hasTransition())return!0;if(Gt(this._source.type)){let I=n.now();for(let ie in this._tiles)if(this._tiles[ie].fadeEndTime>=I)return!0}return!1}setFeatureState(I,ie,Te){this._state.updateState(I=I||"_geojsonTileLayer",ie,Te)}removeFeatureState(I,ie,Te){this._state.removeFeatureState(I=I||"_geojsonTileLayer",ie,Te)}getFeatureState(I,ie){return this._state.getState(I=I||"_geojsonTileLayer",ie)}setDependencies(I,ie,Te){let Me=this._tiles[I];Me&&Me.setDependencies(ie,Te)}reloadTilesForDependencies(I,ie){for(let Te in this._tiles)this._tiles[Te].hasDependency(I,ie)&&this._reloadTile(Te,"reloading");this._cache.filter(Te=>!Te.hasDependency(I,ie))}}function Nt(Fe,I){let ie=Math.abs(2*Fe.wrap)-+(Fe.wrap<0),Te=Math.abs(2*I.wrap)-+(I.wrap<0);return Fe.overscaledZ-I.overscaledZ||Te-ie||I.canonical.y-Fe.canonical.y||I.canonical.x-Fe.canonical.x}function Gt(Fe){return Fe==="raster"||Fe==="image"||Fe==="video"}kt.maxOverzooming=10,kt.maxUnderzooming=3;class Mr{constructor(I,ie){this.reset(I,ie)}reset(I,ie){this.points=I||[],this._distances=[0];for(let Te=1;Te0?(Me-ht)/wt:0;return this.points[ze].mult(1-Ot).add(this.points[ie].mult(Ot))}}function mr(Fe,I){let ie=!0;return Fe==="always"||Fe!=="never"&&I!=="never"||(ie=!1),ie}class qr{constructor(I,ie,Te){let Me=this.boxCells=[],ze=this.circleCells=[];this.xCellCount=Math.ceil(I/Te),this.yCellCount=Math.ceil(ie/Te);for(let ht=0;htthis.width||Me<0||ie>this.height)return[];let Ot=[];if(I<=0&&ie<=0&&this.width<=Te&&this.height<=Me){if(ze)return[{key:null,x1:I,y1:ie,x2:Te,y2:Me}];for(let $t=0;$t0}hitTestCircle(I,ie,Te,Me,ze){let ht=I-Te,wt=I+Te,Ot=ie-Te,$t=ie+Te;if(wt<0||ht>this.width||$t<0||Ot>this.height)return!1;let Tr=[];return this._forEachCell(ht,Ot,wt,$t,this._queryCellCircle,Tr,{hitTest:!0,overlapMode:Me,circle:{x:I,y:ie,radius:Te},seenUids:{box:{},circle:{}}},ze),Tr.length>0}_queryCell(I,ie,Te,Me,ze,ht,wt,Ot){let{seenUids:$t,hitTest:Tr,overlapMode:Ar}=wt,Kr=this.boxCells[ze];if(Kr!==null){let Ve=this.bboxes;for(let $e of Kr)if(!$t.box[$e]){$t.box[$e]=!0;let ot=4*$e,pt=this.boxKeys[$e];if(I<=Ve[ot+2]&&ie<=Ve[ot+3]&&Te>=Ve[ot+0]&&Me>=Ve[ot+1]&&(!Ot||Ot(pt))&&(!Tr||!mr(Ar,pt.overlapMode))&&(ht.push({key:pt,x1:Ve[ot],y1:Ve[ot+1],x2:Ve[ot+2],y2:Ve[ot+3]}),Tr))return!0}}let na=this.circleCells[ze];if(na!==null){let Ve=this.circles;for(let $e of na)if(!$t.circle[$e]){$t.circle[$e]=!0;let ot=3*$e,pt=this.circleKeys[$e];if(this._circleAndRectCollide(Ve[ot],Ve[ot+1],Ve[ot+2],I,ie,Te,Me)&&(!Ot||Ot(pt))&&(!Tr||!mr(Ar,pt.overlapMode))){let Et=Ve[ot],bt=Ve[ot+1],Rt=Ve[ot+2];if(ht.push({key:pt,x1:Et-Rt,y1:bt-Rt,x2:Et+Rt,y2:bt+Rt}),Tr)return!0}}}return!1}_queryCellCircle(I,ie,Te,Me,ze,ht,wt,Ot){let{circle:$t,seenUids:Tr,overlapMode:Ar}=wt,Kr=this.boxCells[ze];if(Kr!==null){let Ve=this.bboxes;for(let $e of Kr)if(!Tr.box[$e]){Tr.box[$e]=!0;let ot=4*$e,pt=this.boxKeys[$e];if(this._circleAndRectCollide($t.x,$t.y,$t.radius,Ve[ot+0],Ve[ot+1],Ve[ot+2],Ve[ot+3])&&(!Ot||Ot(pt))&&!mr(Ar,pt.overlapMode))return ht.push(!0),!0}}let na=this.circleCells[ze];if(na!==null){let Ve=this.circles;for(let $e of na)if(!Tr.circle[$e]){Tr.circle[$e]=!0;let ot=3*$e,pt=this.circleKeys[$e];if(this._circlesCollide(Ve[ot],Ve[ot+1],Ve[ot+2],$t.x,$t.y,$t.radius)&&(!Ot||Ot(pt))&&!mr(Ar,pt.overlapMode))return ht.push(!0),!0}}}_forEachCell(I,ie,Te,Me,ze,ht,wt,Ot){let $t=this._convertToXCellCoord(I),Tr=this._convertToYCellCoord(ie),Ar=this._convertToXCellCoord(Te),Kr=this._convertToYCellCoord(Me);for(let na=$t;na<=Ar;na++)for(let Ve=Tr;Ve<=Kr;Ve++)if(ze.call(this,I,ie,Te,Me,this.xCellCount*Ve+na,ht,wt,Ot))return}_convertToXCellCoord(I){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(I*this.xScale)))}_convertToYCellCoord(I){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(I*this.yScale)))}_circlesCollide(I,ie,Te,Me,ze,ht){let wt=Me-I,Ot=ze-ie,$t=Te+ht;return $t*$t>wt*wt+Ot*Ot}_circleAndRectCollide(I,ie,Te,Me,ze,ht,wt){let Ot=(ht-Me)/2,$t=Math.abs(I-(Me+Ot));if($t>Ot+Te)return!1;let Tr=(wt-ze)/2,Ar=Math.abs(ie-(ze+Tr));if(Ar>Tr+Te)return!1;if($t<=Ot||Ar<=Tr)return!0;let Kr=$t-Ot,na=Ar-Tr;return Kr*Kr+na*na<=Te*Te}}function Er(Fe,I,ie,Te,Me){let ze=t.H();return I?(t.K(ze,ze,[1/Me,1/Me,1]),ie||t.ad(ze,ze,Te.angle)):t.L(ze,Te.labelPlaneMatrix,Fe),ze}function Ir(Fe,I,ie,Te,Me){if(I){let ze=t.ae(Fe);return t.K(ze,ze,[Me,Me,1]),ie||t.ad(ze,ze,-Te.angle),ze}return Te.glCoordMatrix}function _t(Fe,I,ie,Te){let Me;Te?(Me=[Fe,I,Te(Fe,I),1],t.af(Me,Me,ie)):(Me=[Fe,I,0,1],sr(Me,Me,ie));let ze=Me[3];return{point:new t.P(Me[0]/ze,Me[1]/ze),signedDistanceFromCamera:ze,isOccluded:!1}}function Oe(Fe,I){return .5+Fe/I*.5}function Je(Fe,I){return Fe.x>=-I[0]&&Fe.x<=I[0]&&Fe.y>=-I[1]&&Fe.y<=I[1]}function Ae(Fe,I,ie,Te,Me,ze,ht,wt,Ot,$t,Tr,Ar,Kr,na,Ve){let $e=Te?Fe.textSizeData:Fe.iconSizeData,ot=t.ag($e,ie.transform.zoom),pt=[256/ie.width*2+1,256/ie.height*2+1],Et=Te?Fe.text.dynamicLayoutVertexArray:Fe.icon.dynamicLayoutVertexArray;Et.clear();let bt=Fe.lineVertexArray,Rt=Te?Fe.text.placedSymbolArray:Fe.icon.placedSymbolArray,lr=ie.transform.width/ie.transform.height,yr=!1;for(let kr=0;krMath.abs(ie.x-I.x)*Te?{useVertical:!0}:(Fe===t.ah.vertical?I.yie.x)?{needsFlipping:!0}:null}function Ze(Fe,I,ie,Te,Me,ze,ht,wt,Ot,$t,Tr){let Ar=ie/24,Kr=I.lineOffsetX*Ar,na=I.lineOffsetY*Ar,Ve;if(I.numGlyphs>1){let $e=I.glyphStartIndex+I.numGlyphs,ot=I.lineStartIndex,pt=I.lineStartIndex+I.lineLength,Et=Le(Ar,wt,Kr,na,Te,I,Tr,Fe);if(!Et)return{notEnoughRoom:!0};let bt=_t(Et.first.point.x,Et.first.point.y,ht,Fe.getElevation).point,Rt=_t(Et.last.point.x,Et.last.point.y,ht,Fe.getElevation).point;if(Me&&!Te){let lr=Ue(I.writingMode,bt,Rt,$t);if(lr)return lr}Ve=[Et.first];for(let lr=I.glyphStartIndex+1;lr<$e-1;lr++)Ve.push(jt(Ar*wt.getoffsetX(lr),Kr,na,Te,I.segment,ot,pt,Fe,Tr));Ve.push(Et.last)}else{if(Me&&!Te){let ot=_t(Fe.tileAnchorPoint.x,Fe.tileAnchorPoint.y,ze,Fe.getElevation).point,pt=I.lineStartIndex+I.segment+1,Et=new t.P(Fe.lineVertexArray.getx(pt),Fe.lineVertexArray.gety(pt)),bt=_t(Et.x,Et.y,ze,Fe.getElevation),Rt=bt.signedDistanceFromCamera>0?bt.point:function(yr,kr,jr,Qr,ha,Aa){return st(yr,kr,jr,1,ha,Aa)}(Fe.tileAnchorPoint,Et,ot,0,ze,Fe),lr=Ue(I.writingMode,ot,Rt,$t);if(lr)return lr}let $e=jt(Ar*wt.getoffsetX(I.glyphStartIndex),Kr,na,Te,I.segment,I.lineStartIndex,I.lineStartIndex+I.lineLength,Fe,Tr);if(!$e||Fe.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};Ve=[$e]}for(let $e of Ve)t.aj(Ot,$e.point,$e.angle);return{}}function st(Fe,I,ie,Te,Me,ze){let ht=Fe.add(Fe.sub(I)._unit()),wt=Me!==void 0?_t(ht.x,ht.y,Me,ze.getElevation).point:Ut(ht.x,ht.y,ze).point,Ot=ie.sub(wt);return ie.add(Ot._mult(Te/Ot.mag()))}function ut(Fe,I,ie){let Te=I.projectionCache;if(Te.projections[Fe])return Te.projections[Fe];let Me=new t.P(I.lineVertexArray.getx(Fe),I.lineVertexArray.gety(Fe)),ze=Ut(Me.x,Me.y,I);if(ze.signedDistanceFromCamera>0)return Te.projections[Fe]=ze.point,Te.anyProjectionOccluded=Te.anyProjectionOccluded||ze.isOccluded,ze.point;let ht=Fe-ie.direction;return function(wt,Ot,$t,Tr,Ar){return st(wt,Ot,$t,Tr,void 0,Ar)}(ie.distanceFromAnchor===0?I.tileAnchorPoint:new t.P(I.lineVertexArray.getx(ht),I.lineVertexArray.gety(ht)),Me,ie.previousVertex,ie.absOffsetX-ie.distanceFromAnchor+1,I)}function Ut(Fe,I,ie){let Te=Fe+ie.translation[0],Me=I+ie.translation[1],ze;return!ie.pitchWithMap&&ie.projection.useSpecialProjectionForSymbols?(ze=ie.projection.projectTileCoordinates(Te,Me,ie.unwrappedTileID,ie.getElevation),ze.point.x=(.5*ze.point.x+.5)*ie.width,ze.point.y=(.5*-ze.point.y+.5)*ie.height):(ze=_t(Te,Me,ie.labelPlaneMatrix,ie.getElevation),ze.isOccluded=!1),ze}function Ct(Fe,I,ie){return Fe._unit()._perp()._mult(I*ie)}function Pt(Fe,I,ie,Te,Me,ze,ht,wt,Ot){if(wt.projectionCache.offsets[Fe])return wt.projectionCache.offsets[Fe];let $t=ie.add(I);if(Fe+Ot.direction=Me)return wt.projectionCache.offsets[Fe]=$t,$t;let Tr=ut(Fe+Ot.direction,wt,Ot),Ar=Ct(Tr.sub(ie),ht,Ot.direction),Kr=ie.add(Ar),na=Tr.add(Ar);return wt.projectionCache.offsets[Fe]=t.ak(ze,$t,Kr,na)||$t,wt.projectionCache.offsets[Fe]}function jt(Fe,I,ie,Te,Me,ze,ht,wt,Ot){let $t=Te?Fe-I:Fe+I,Tr=$t>0?1:-1,Ar=0;Te&&(Tr*=-1,Ar=Math.PI),Tr<0&&(Ar+=Math.PI);let Kr,na=Tr>0?ze+Me:ze+Me+1;wt.projectionCache.cachedAnchorPoint?Kr=wt.projectionCache.cachedAnchorPoint:(Kr=Ut(wt.tileAnchorPoint.x,wt.tileAnchorPoint.y,wt).point,wt.projectionCache.cachedAnchorPoint=Kr);let Ve,$e,ot=Kr,pt=Kr,Et=0,bt=0,Rt=Math.abs($t),lr=[],yr;for(;Et+bt<=Rt;){if(na+=Tr,na=ht)return null;Et+=bt,pt=ot,$e=Ve;let Qr={absOffsetX:Rt,direction:Tr,distanceFromAnchor:Et,previousVertex:pt};if(ot=ut(na,wt,Qr),ie===0)lr.push(pt),yr=ot.sub(pt);else{let ha,Aa=ot.sub(pt);ha=Aa.mag()===0?Ct(ut(na+Tr,wt,Qr).sub(ot),ie,Tr):Ct(Aa,ie,Tr),$e||($e=pt.add(ha)),Ve=Pt(na,ha,ot,ze,ht,$e,ie,wt,Qr),lr.push($e),yr=Ve.sub($e)}bt=yr.mag()}let kr=yr._mult((Rt-Et)/bt)._add($e||pt),jr=Ar+Math.atan2(ot.y-pt.y,ot.x-pt.x);return lr.push(kr),{point:kr,angle:Ot?jr:0,path:lr}}let fr=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function ur(Fe,I){for(let ie=0;ie=1;Nn--)on.push(Vi.path[Nn]);for(let Nn=1;Nnwo.signedDistanceFromCamera<=0)?[]:Nn.map(wo=>wo.point)}let Yn=[];if(on.length>0){let Nn=on[0].clone(),wo=on[0].clone();for(let os=1;os=Aa.x&&wo.x<=Da.x&&Nn.y>=Aa.y&&wo.y<=Da.y?[on]:wo.xDa.x||wo.yDa.y?[]:t.al([on],Aa.x,Aa.y,Da.x,Da.y)}for(let Nn of Yn){ci.reset(Nn,.25*ha);let wo=0;wo=ci.length<=.5*ha?1:Math.ceil(ci.paddedLength/An)+1;for(let os=0;os_t(Me.x,Me.y,Te,ie.getElevation))}queryRenderedSymbols(I){if(I.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};let ie=[],Te=1/0,Me=1/0,ze=-1/0,ht=-1/0;for(let Tr of I){let Ar=new t.P(Tr.x+Pr,Tr.y+Pr);Te=Math.min(Te,Ar.x),Me=Math.min(Me,Ar.y),ze=Math.max(ze,Ar.x),ht=Math.max(ht,Ar.y),ie.push(Ar)}let wt=this.grid.query(Te,Me,ze,ht).concat(this.ignoredGrid.query(Te,Me,ze,ht)),Ot={},$t={};for(let Tr of wt){let Ar=Tr.key;if(Ot[Ar.bucketInstanceId]===void 0&&(Ot[Ar.bucketInstanceId]={}),Ot[Ar.bucketInstanceId][Ar.featureIndex])continue;let Kr=[new t.P(Tr.x1,Tr.y1),new t.P(Tr.x2,Tr.y1),new t.P(Tr.x2,Tr.y2),new t.P(Tr.x1,Tr.y2)];t.am(ie,Kr)&&(Ot[Ar.bucketInstanceId][Ar.featureIndex]=!0,$t[Ar.bucketInstanceId]===void 0&&($t[Ar.bucketInstanceId]=[]),$t[Ar.bucketInstanceId].push(Ar.featureIndex))}return $t}insertCollisionBox(I,ie,Te,Me,ze,ht){(Te?this.ignoredGrid:this.grid).insert({bucketInstanceId:Me,featureIndex:ze,collisionGroupID:ht,overlapMode:ie},I[0],I[1],I[2],I[3])}insertCollisionCircles(I,ie,Te,Me,ze,ht){let wt=Te?this.ignoredGrid:this.grid,Ot={bucketInstanceId:Me,featureIndex:ze,collisionGroupID:ht,overlapMode:ie};for(let $t=0;$t=this.screenRightBoundary||Methis.screenBottomBoundary}isInsideGrid(I,ie,Te,Me){return Te>=0&&I=0&&iethis.projectAndGetPerspectiveRatio(Te,ha.x,ha.y,Me,$t));jr=Qr.some(ha=>!ha.isOccluded),kr=Qr.map(ha=>ha.point)}else jr=!0;return{box:t.ao(kr),allPointsOccluded:!jr}}}function Oa(Fe,I,ie){return I*(t.X/(Fe.tileSize*Math.pow(2,ie-Fe.tileID.overscaledZ)))}class Ia{constructor(I,ie,Te,Me){this.opacity=I?Math.max(0,Math.min(1,I.opacity+(I.placed?ie:-ie))):Me&&Te?1:0,this.placed=Te}isHidden(){return this.opacity===0&&!this.placed}}class qa{constructor(I,ie,Te,Me,ze){this.text=new Ia(I?I.text:null,ie,Te,ze),this.icon=new Ia(I?I.icon:null,ie,Me,ze)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class Wa{constructor(I,ie,Te){this.text=I,this.icon=ie,this.skipFade=Te}}class Ca{constructor(){this.invProjMatrix=t.H(),this.viewportMatrix=t.H(),this.circles=[]}}class hi{constructor(I,ie,Te,Me,ze){this.bucketInstanceId=I,this.featureIndex=ie,this.sourceLayerIndex=Te,this.bucketIndex=Me,this.tileID=ze}}class wi{constructor(I){this.crossSourceCollisions=I,this.maxGroupID=0,this.collisionGroups={}}get(I){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[I]){let ie=++this.maxGroupID;this.collisionGroups[I]={ID:ie,predicate:Te=>Te.collisionGroupID===ie}}return this.collisionGroups[I]}}function Kt(Fe,I,ie,Te,Me){let{horizontalAlign:ze,verticalAlign:ht}=t.au(Fe);return new t.P(-(ze-.5)*I+Te[0]*Me,-(ht-.5)*ie+Te[1]*Me)}class Dt{constructor(I,ie,Te,Me,ze,ht){this.transform=I.clone(),this.terrain=Te,this.collisionIndex=new Ta(this.transform,ie),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=Me,this.retainedQueryData={},this.collisionGroups=new wi(ze),this.collisionCircleArrays={},this.collisionBoxArrays=new Map,this.prevPlacement=ht,ht&&(ht.prevPlacement=void 0),this.placedOrientations={}}_getTerrainElevationFunc(I){let ie=this.terrain;return ie?(Te,Me)=>ie.getElevation(I,Te,Me):null}getBucketParts(I,ie,Te,Me){let ze=Te.getBucket(ie),ht=Te.latestFeatureIndex;if(!ze||!ht||ie.id!==ze.layerIds[0])return;let wt=Te.collisionBoxArray,Ot=ze.layers[0].layout,$t=ze.layers[0].paint,Tr=Math.pow(2,this.transform.zoom-Te.tileID.overscaledZ),Ar=Te.tileSize/t.X,Kr=Te.tileID.toUnwrapped(),na=this.transform.calculatePosMatrix(Kr),Ve=Ot.get("text-pitch-alignment")==="map",$e=Ot.get("text-rotation-alignment")==="map",ot=Oa(Te,1,this.transform.zoom),pt=this.collisionIndex.mapProjection.translatePosition(this.transform,Te,$t.get("text-translate"),$t.get("text-translate-anchor")),Et=this.collisionIndex.mapProjection.translatePosition(this.transform,Te,$t.get("icon-translate"),$t.get("icon-translate-anchor")),bt=Er(na,Ve,$e,this.transform,ot),Rt=null;if(Ve){let yr=Ir(na,Ve,$e,this.transform,ot);Rt=t.L([],this.transform.labelPlaneMatrix,yr)}this.retainedQueryData[ze.bucketInstanceId]=new hi(ze.bucketInstanceId,ht,ze.sourceLayerIndex,ze.index,Te.tileID);let lr={bucket:ze,layout:Ot,translationText:pt,translationIcon:Et,posMatrix:na,unwrappedTileID:Kr,textLabelPlaneMatrix:bt,labelToScreenMatrix:Rt,scale:Tr,textPixelRatio:Ar,holdingForFade:Te.holdingForFade(),collisionBoxArray:wt,partiallyEvaluatedTextSize:t.ag(ze.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(ze.sourceID)};if(Me)for(let yr of ze.sortKeyRanges){let{sortKey:kr,symbolInstanceStart:jr,symbolInstanceEnd:Qr}=yr;I.push({sortKey:kr,symbolInstanceStart:jr,symbolInstanceEnd:Qr,parameters:lr})}else I.push({symbolInstanceStart:0,symbolInstanceEnd:ze.symbolInstances.length,parameters:lr})}attemptAnchorPlacement(I,ie,Te,Me,ze,ht,wt,Ot,$t,Tr,Ar,Kr,na,Ve,$e,ot,pt,Et,bt){let Rt=t.aq[I.textAnchor],lr=[I.textOffset0,I.textOffset1],yr=Kt(Rt,Te,Me,lr,ze),kr=this.collisionIndex.placeCollisionBox(ie,Kr,Ot,$t,Tr,wt,ht,ot,Ar.predicate,bt,yr);if((!Et||this.collisionIndex.placeCollisionBox(Et,Kr,Ot,$t,Tr,wt,ht,pt,Ar.predicate,bt,yr).placeable)&&kr.placeable){let jr;if(this.prevPlacement&&this.prevPlacement.variableOffsets[na.crossTileID]&&this.prevPlacement.placements[na.crossTileID]&&this.prevPlacement.placements[na.crossTileID].text&&(jr=this.prevPlacement.variableOffsets[na.crossTileID].anchor),na.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[na.crossTileID]={textOffset:lr,width:Te,height:Me,anchor:Rt,textBoxScale:ze,prevAnchor:jr},this.markUsedJustification(Ve,Rt,na,$e),Ve.allowVerticalPlacement&&(this.markUsedOrientation(Ve,$e,na),this.placedOrientations[na.crossTileID]=$e),{shift:yr,placedGlyphBoxes:kr}}}placeLayerBucketPart(I,ie,Te){let{bucket:Me,layout:ze,translationText:ht,translationIcon:wt,posMatrix:Ot,unwrappedTileID:$t,textLabelPlaneMatrix:Tr,labelToScreenMatrix:Ar,textPixelRatio:Kr,holdingForFade:na,collisionBoxArray:Ve,partiallyEvaluatedTextSize:$e,collisionGroup:ot}=I.parameters,pt=ze.get("text-optional"),Et=ze.get("icon-optional"),bt=t.ar(ze,"text-overlap","text-allow-overlap"),Rt=bt==="always",lr=t.ar(ze,"icon-overlap","icon-allow-overlap"),yr=lr==="always",kr=ze.get("text-rotation-alignment")==="map",jr=ze.get("text-pitch-alignment")==="map",Qr=ze.get("icon-text-fit")!=="none",ha=ze.get("symbol-z-order")==="viewport-y",Aa=Rt&&(yr||!Me.hasIconData()||Et),Da=yr&&(Rt||!Me.hasTextData()||pt);!Me.collisionArrays&&Ve&&Me.deserializeCollisionBoxes(Ve);let ci=this._getTerrainElevationFunc(this.retainedQueryData[Me.bucketInstanceId].tileID),Vi=(ji,on,An)=>{var Yn,Nn;if(ie[ji.crossTileID])return;if(na)return void(this.placements[ji.crossTileID]=new Wa(!1,!1,!1));let wo=!1,os=!1,So=!0,Zo=null,hs={box:null,placeable:!1,offscreen:null},ul={box:null,placeable:!1,offscreen:null},tl=null,Jo=null,$o=null,Il=0,eu=0,Ru=0;on.textFeatureIndex?Il=on.textFeatureIndex:ji.useRuntimeCollisionCircles&&(Il=ji.featureIndex),on.verticalTextFeatureIndex&&(eu=on.verticalTextFeatureIndex);let vu=on.textBox;if(vu){let Vl=et=>{let dt=t.ah.horizontal;if(Me.allowVerticalPlacement&&!et&&this.prevPlacement){let yt=this.prevPlacement.placedOrientations[ji.crossTileID];yt&&(this.placedOrientations[ji.crossTileID]=yt,dt=yt,this.markUsedOrientation(Me,dt,ji))}return dt},Gl=(et,dt)=>{if(Me.allowVerticalPlacement&&ji.numVerticalGlyphVertices>0&&on.verticalTextBox){for(let yt of Me.writingModes)if(yt===t.ah.vertical?(hs=dt(),ul=hs):hs=et(),hs&&hs.placeable)break}else hs=et()},me=ji.textAnchorOffsetStartIndex,De=ji.textAnchorOffsetEndIndex;if(De===me){let et=(dt,yt)=>{let Tt=this.collisionIndex.placeCollisionBox(dt,bt,Kr,Ot,$t,jr,kr,ht,ot.predicate,ci);return Tt&&Tt.placeable&&(this.markUsedOrientation(Me,yt,ji),this.placedOrientations[ji.crossTileID]=yt),Tt};Gl(()=>et(vu,t.ah.horizontal),()=>{let dt=on.verticalTextBox;return Me.allowVerticalPlacement&&ji.numVerticalGlyphVertices>0&&dt?et(dt,t.ah.vertical):{box:null,offscreen:null}}),Vl(hs&&hs.placeable)}else{let et=t.aq[(Nn=(Yn=this.prevPlacement)===null||Yn===void 0?void 0:Yn.variableOffsets[ji.crossTileID])===null||Nn===void 0?void 0:Nn.anchor],dt=(Tt,tr,zt)=>{let _r=Tt.x2-Tt.x1,Gr=Tt.y2-Tt.y1,Xr=ji.textBoxScale,xa=Qr&&lr==="never"?tr:null,pa=null,Ja=bt==="never"?1:2,ti="never";et&&Ja++;for(let Sa=0;Sadt(vu,on.iconBox,t.ah.horizontal),()=>{let Tt=on.verticalTextBox;return Me.allowVerticalPlacement&&(!hs||!hs.placeable)&&ji.numVerticalGlyphVertices>0&&Tt?dt(Tt,on.verticalIconBox,t.ah.vertical):{box:null,occluded:!0,offscreen:null}}),hs&&(wo=hs.placeable,So=hs.offscreen);let yt=Vl(hs&&hs.placeable);if(!wo&&this.prevPlacement){let Tt=this.prevPlacement.variableOffsets[ji.crossTileID];Tt&&(this.variableOffsets[ji.crossTileID]=Tt,this.markUsedJustification(Me,Tt.anchor,ji,yt))}}}if(tl=hs,wo=tl&&tl.placeable,So=tl&&tl.offscreen,ji.useRuntimeCollisionCircles){let Vl=Me.text.placedSymbolArray.get(ji.centerJustifiedTextSymbolIndex),Gl=t.ai(Me.textSizeData,$e,Vl),me=ze.get("text-padding");Jo=this.collisionIndex.placeCollisionCircles(bt,Vl,Me.lineVertexArray,Me.glyphOffsetArray,Gl,Ot,$t,Tr,Ar,Te,jr,ot.predicate,ji.collisionCircleDiameter,me,ht,ci),Jo.circles.length&&Jo.collisionDetected&&!Te&&t.w("Collisions detected, but collision boxes are not shown"),wo=Rt||Jo.circles.length>0&&!Jo.collisionDetected,So=So&&Jo.offscreen}if(on.iconFeatureIndex&&(Ru=on.iconFeatureIndex),on.iconBox){let Vl=Gl=>this.collisionIndex.placeCollisionBox(Gl,lr,Kr,Ot,$t,jr,kr,wt,ot.predicate,ci,Qr&&Zo?Zo:void 0);ul&&ul.placeable&&on.verticalIconBox?($o=Vl(on.verticalIconBox),os=$o.placeable):($o=Vl(on.iconBox),os=$o.placeable),So=So&&$o.offscreen}let Tl=pt||ji.numHorizontalGlyphVertices===0&&ji.numVerticalGlyphVertices===0,cu=Et||ji.numIconVertices===0;Tl||cu?cu?Tl||(os=os&&wo):wo=os&&wo:os=wo=os&&wo;let uc=os&&$o.placeable;if(wo&&tl.placeable&&this.collisionIndex.insertCollisionBox(tl.box,bt,ze.get("text-ignore-placement"),Me.bucketInstanceId,ul&&ul.placeable&&eu?eu:Il,ot.ID),uc&&this.collisionIndex.insertCollisionBox($o.box,lr,ze.get("icon-ignore-placement"),Me.bucketInstanceId,Ru,ot.ID),Jo&&wo&&this.collisionIndex.insertCollisionCircles(Jo.circles,bt,ze.get("text-ignore-placement"),Me.bucketInstanceId,Il,ot.ID),Te&&this.storeCollisionData(Me.bucketInstanceId,An,on,tl,$o,Jo),ji.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");if(Me.bucketInstanceId===0)throw new Error("bucket.bucketInstanceId can't be 0");this.placements[ji.crossTileID]=new Wa(wo||Aa,os||Da,So||Me.justReloaded),ie[ji.crossTileID]=!0};if(ha){if(I.symbolInstanceStart!==0)throw new Error("bucket.bucketInstanceId should be 0");let ji=Me.getSortedSymbolIndexes(this.transform.angle);for(let on=ji.length-1;on>=0;--on){let An=ji[on];Vi(Me.symbolInstances.get(An),Me.collisionArrays[An],An)}}else for(let ji=I.symbolInstanceStart;ji=0&&(I.text.placedSymbolArray.get(wt).crossTileID=ze>=0&&wt!==ze?0:Te.crossTileID)}markUsedOrientation(I,ie,Te){let Me=ie===t.ah.horizontal||ie===t.ah.horizontalOnly?ie:0,ze=ie===t.ah.vertical?ie:0,ht=[Te.leftJustifiedTextSymbolIndex,Te.centerJustifiedTextSymbolIndex,Te.rightJustifiedTextSymbolIndex];for(let wt of ht)I.text.placedSymbolArray.get(wt).placedOrientation=Me;Te.verticalPlacedTextSymbolIndex&&(I.text.placedSymbolArray.get(Te.verticalPlacedTextSymbolIndex).placedOrientation=ze)}commit(I){this.commitTime=I,this.zoomAtLastRecencyCheck=this.transform.zoom;let ie=this.prevPlacement,Te=!1;this.prevZoomAdjustment=ie?ie.zoomAdjustment(this.transform.zoom):0;let Me=ie?ie.symbolFadeChange(I):1,ze=ie?ie.opacities:{},ht=ie?ie.variableOffsets:{},wt=ie?ie.placedOrientations:{};for(let Ot in this.placements){let $t=this.placements[Ot],Tr=ze[Ot];Tr?(this.opacities[Ot]=new qa(Tr,Me,$t.text,$t.icon),Te=Te||$t.text!==Tr.text.placed||$t.icon!==Tr.icon.placed):(this.opacities[Ot]=new qa(null,Me,$t.text,$t.icon,$t.skipFade),Te=Te||$t.text||$t.icon)}for(let Ot in ze){let $t=ze[Ot];if(!this.opacities[Ot]){let Tr=new qa($t,Me,!1,!1);Tr.isHidden()||(this.opacities[Ot]=Tr,Te=Te||$t.text.placed||$t.icon.placed)}}for(let Ot in ht)this.variableOffsets[Ot]||!this.opacities[Ot]||this.opacities[Ot].isHidden()||(this.variableOffsets[Ot]=ht[Ot]);for(let Ot in wt)this.placedOrientations[Ot]||!this.opacities[Ot]||this.opacities[Ot].isHidden()||(this.placedOrientations[Ot]=wt[Ot]);if(ie&&ie.lastPlacementChangeTime===void 0)throw new Error("Last placement time for previous placement is not defined");Te?this.lastPlacementChangeTime=I:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=ie?ie.lastPlacementChangeTime:I)}updateLayerOpacities(I,ie){let Te={};for(let Me of ie){let ze=Me.getBucket(I);ze&&Me.latestFeatureIndex&&I.id===ze.layerIds[0]&&this.updateBucketOpacities(ze,Me.tileID,Te,Me.collisionBoxArray)}}updateBucketOpacities(I,ie,Te,Me){I.hasTextData()&&(I.text.opacityVertexArray.clear(),I.text.hasVisibleVertices=!1),I.hasIconData()&&(I.icon.opacityVertexArray.clear(),I.icon.hasVisibleVertices=!1),I.hasIconCollisionBoxData()&&I.iconCollisionBox.collisionVertexArray.clear(),I.hasTextCollisionBoxData()&&I.textCollisionBox.collisionVertexArray.clear();let ze=I.layers[0],ht=ze.layout,wt=new qa(null,0,!1,!1,!0),Ot=ht.get("text-allow-overlap"),$t=ht.get("icon-allow-overlap"),Tr=ze._unevaluatedLayout.hasValue("text-variable-anchor")||ze._unevaluatedLayout.hasValue("text-variable-anchor-offset"),Ar=ht.get("text-rotation-alignment")==="map",Kr=ht.get("text-pitch-alignment")==="map",na=ht.get("icon-text-fit")!=="none",Ve=new qa(null,0,Ot&&($t||!I.hasIconData()||ht.get("icon-optional")),$t&&(Ot||!I.hasTextData()||ht.get("text-optional")),!0);!I.collisionArrays&&Me&&(I.hasIconCollisionBoxData()||I.hasTextCollisionBoxData())&&I.deserializeCollisionBoxes(Me);let $e=(pt,Et,bt)=>{for(let Rt=0;Rt0,jr=this.placedOrientations[Et.crossTileID],Qr=jr===t.ah.vertical,ha=jr===t.ah.horizontal||jr===t.ah.horizontalOnly;if(bt>0||Rt>0){let Da=Za(yr.text);$e(I.text,bt,Qr?ri:Da),$e(I.text,Rt,ha?ri:Da);let ci=yr.text.isHidden();[Et.rightJustifiedTextSymbolIndex,Et.centerJustifiedTextSymbolIndex,Et.leftJustifiedTextSymbolIndex].forEach(on=>{on>=0&&(I.text.placedSymbolArray.get(on).hidden=ci||Qr?1:0)}),Et.verticalPlacedTextSymbolIndex>=0&&(I.text.placedSymbolArray.get(Et.verticalPlacedTextSymbolIndex).hidden=ci||ha?1:0);let Vi=this.variableOffsets[Et.crossTileID];Vi&&this.markUsedJustification(I,Vi.anchor,Et,jr);let ji=this.placedOrientations[Et.crossTileID];ji&&(this.markUsedJustification(I,"left",Et,ji),this.markUsedOrientation(I,ji,Et))}if(kr){let Da=Za(yr.icon),ci=!(na&&Et.verticalPlacedIconSymbolIndex&&Qr);Et.placedIconSymbolIndex>=0&&($e(I.icon,Et.numIconVertices,ci?Da:ri),I.icon.placedSymbolArray.get(Et.placedIconSymbolIndex).hidden=yr.icon.isHidden()),Et.verticalPlacedIconSymbolIndex>=0&&($e(I.icon,Et.numVerticalIconVertices,ci?ri:Da),I.icon.placedSymbolArray.get(Et.verticalPlacedIconSymbolIndex).hidden=yr.icon.isHidden())}let Aa=ot&&ot.has(pt)?ot.get(pt):{text:null,icon:null};if(I.hasIconCollisionBoxData()||I.hasTextCollisionBoxData()){let Da=I.collisionArrays[pt];if(Da){let ci=new t.P(0,0);if(Da.textBox||Da.verticalTextBox){let Vi=!0;if(Tr){let ji=this.variableOffsets[lr];ji?(ci=Kt(ji.anchor,ji.width,ji.height,ji.textOffset,ji.textBoxScale),Ar&&ci._rotate(Kr?this.transform.angle:-this.transform.angle)):Vi=!1}if(Da.textBox||Da.verticalTextBox){let ji;Da.textBox&&(ji=Qr),Da.verticalTextBox&&(ji=ha),Yt(I.textCollisionBox.collisionVertexArray,yr.text.placed,!Vi||ji,Aa.text,ci.x,ci.y)}}if(Da.iconBox||Da.verticalIconBox){let Vi=!!(!ha&&Da.verticalIconBox),ji;Da.iconBox&&(ji=Vi),Da.verticalIconBox&&(ji=!Vi),Yt(I.iconCollisionBox.collisionVertexArray,yr.icon.placed,ji,Aa.icon,na?ci.x:0,na?ci.y:0)}}}}if(I.sortFeatures(this.transform.angle),this.retainedQueryData[I.bucketInstanceId]&&(this.retainedQueryData[I.bucketInstanceId].featureSortOrder=I.featureSortOrder),I.hasTextData()&&I.text.opacityVertexBuffer&&I.text.opacityVertexBuffer.updateData(I.text.opacityVertexArray),I.hasIconData()&&I.icon.opacityVertexBuffer&&I.icon.opacityVertexBuffer.updateData(I.icon.opacityVertexArray),I.hasIconCollisionBoxData()&&I.iconCollisionBox.collisionVertexBuffer&&I.iconCollisionBox.collisionVertexBuffer.updateData(I.iconCollisionBox.collisionVertexArray),I.hasTextCollisionBoxData()&&I.textCollisionBox.collisionVertexBuffer&&I.textCollisionBox.collisionVertexBuffer.updateData(I.textCollisionBox.collisionVertexArray),I.text.opacityVertexArray.length!==I.text.layoutVertexArray.length/4)throw new Error(`bucket.text.opacityVertexArray.length (= ${I.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${I.text.layoutVertexArray.length}) / 4`);if(I.icon.opacityVertexArray.length!==I.icon.layoutVertexArray.length/4)throw new Error(`bucket.icon.opacityVertexArray.length (= ${I.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${I.icon.layoutVertexArray.length}) / 4`);if(I.bucketInstanceId in this.collisionCircleArrays){let pt=this.collisionCircleArrays[I.bucketInstanceId];I.placementInvProjMatrix=pt.invProjMatrix,I.placementViewportMatrix=pt.viewportMatrix,I.collisionCircleArray=pt.circles,delete this.collisionCircleArrays[I.bucketInstanceId]}}symbolFadeChange(I){return this.fadeDuration===0?1:(I-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(I){return Math.max(0,(this.transform.zoom-I)/1.5)}hasTransitions(I){return this.stale||I-this.lastPlacementChangeTimeI}setStale(){this.stale=!0}}function Yt(Fe,I,ie,Te,Me,ze){Te&&Te.length!==0||(Te=[0,0,0,0]);let ht=Te[0]-Pr,wt=Te[1]-Pr,Ot=Te[2]-Pr,$t=Te[3]-Pr;Fe.emplaceBack(I?1:0,ie?1:0,Me||0,ze||0,ht,wt),Fe.emplaceBack(I?1:0,ie?1:0,Me||0,ze||0,Ot,wt),Fe.emplaceBack(I?1:0,ie?1:0,Me||0,ze||0,Ot,$t),Fe.emplaceBack(I?1:0,ie?1:0,Me||0,ze||0,ht,$t)}let Jt=Math.pow(2,25),Fr=Math.pow(2,24),ta=Math.pow(2,17),ra=Math.pow(2,16),ca=Math.pow(2,9),Ba=Math.pow(2,8),$a=Math.pow(2,1);function Za(Fe){if(Fe.opacity===0&&!Fe.placed)return 0;if(Fe.opacity===1&&Fe.placed)return 4294967295;let I=Fe.placed?1:0,ie=Math.floor(127*Fe.opacity);return ie*Jt+I*Fr+ie*ta+I*ra+ie*ca+I*Ba+ie*$a+I}let ri=0;function pi(){return{isOccluded:(Fe,I,ie)=>!1,getPitchedTextCorrection:(Fe,I,ie)=>1,get useSpecialProjectionForSymbols(){return!1},projectTileCoordinates(Fe,I,ie,Te){throw new Error("Not implemented.")},translatePosition:(Fe,I,ie,Te)=>function(Me,ze,ht,wt,Ot=!1){if(!ht[0]&&!ht[1])return[0,0];let $t=Ot?wt==="map"?Me.angle:0:wt==="viewport"?-Me.angle:0;if($t){let Tr=Math.sin($t),Ar=Math.cos($t);ht=[ht[0]*Ar-ht[1]*Tr,ht[0]*Tr+ht[1]*Ar]}return[Ot?ht[0]:Oa(ze,ht[0],Me.zoom),Ot?ht[1]:Oa(ze,ht[1],Me.zoom)]}(Fe,I,ie,Te),getCircleRadiusCorrection:Fe=>1}}class Ra{constructor(I){this._sortAcrossTiles=I.layout.get("symbol-z-order")!=="viewport-y"&&!I.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(I,ie,Te,Me,ze){let ht=this._bucketParts;for(;this._currentTileIndexwt.sortKey-Ot.sortKey));this._currentPartIndex!this._forceFullPlacement&&n.now()-Me>2;for(;this._currentPlacementIndex>=0;){let ht=ie[I[this._currentPlacementIndex]],wt=this.placement.collisionIndex.transform.zoom;if(ht.type==="symbol"&&(!ht.minzoom||ht.minzoom<=wt)&&(!ht.maxzoom||ht.maxzoom>wt)){if(this._inProgressLayer||(this._inProgressLayer=new Ra(ht)),this._inProgressLayer.continuePlacement(Te[ht.source],this.placement,this._showCollisionBoxes,ht,ze))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(I){return this.placement.commit(I),this.placement}}let tn=512/t.X/2;class fn{constructor(I,ie,Te){this.tileID=I,this.bucketInstanceId=Te,this._symbolsByKey={};let Me=new Map;for(let ze=0;ze({x:Math.floor(Ot.anchorX*tn),y:Math.floor(Ot.anchorY*tn)})),crossTileIDs:ht.map(Ot=>Ot.crossTileID)};if(wt.positions.length>128){let Ot=new t.av(wt.positions.length,16,Uint16Array);for(let{x:$t,y:Tr}of wt.positions)Ot.add($t,Tr);Ot.finish(),delete wt.positions,wt.index=Ot}this._symbolsByKey[ze]=wt}}getScaledCoordinates(I,ie){let{x:Te,y:Me,z:ze}=this.tileID.canonical,{x:ht,y:wt,z:Ot}=ie.canonical,$t=tn/Math.pow(2,Ot-ze),Tr=(wt*t.X+I.anchorY)*$t,Ar=Me*t.X*tn;return{x:Math.floor((ht*t.X+I.anchorX)*$t-Te*t.X*tn),y:Math.floor(Tr-Ar)}}findMatches(I,ie,Te){let Me=this.tileID.canonical.zI)}}class xt{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class lt{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(I){let ie=Math.round((I-this.lng)/360);if(ie!==0)for(let Te in this.indexes){let Me=this.indexes[Te],ze={};for(let ht in Me){let wt=Me[ht];wt.tileID=wt.tileID.unwrapTo(wt.tileID.wrap+ie),ze[wt.tileID.key]=wt}this.indexes[Te]=ze}this.lng=I}addBucket(I,ie,Te){if(this.indexes[I.overscaledZ]&&this.indexes[I.overscaledZ][I.key]){if(this.indexes[I.overscaledZ][I.key].bucketInstanceId===ie.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(I.overscaledZ,this.indexes[I.overscaledZ][I.key])}for(let ze=0;zeI.overscaledZ)for(let wt in ht){let Ot=ht[wt];Ot.tileID.isChildOf(I)&&Ot.findMatches(ie.symbolInstances,I,Me)}else{let wt=ht[I.scaledTo(Number(ze)).key];wt&&wt.findMatches(ie.symbolInstances,I,Me)}}for(let ze=0;ze{ie[Te]=!0});for(let Te in this.layerIndexes)ie[Te]||delete this.layerIndexes[Te]}}let Cr=(Fe,I)=>t.t(Fe,I&&I.filter(ie=>ie.identifier!=="source.canvas")),xr=t.aw();class Rr extends t.E{constructor(I,ie={}){super(),this._rtlPluginLoaded=()=>{for(let Te in this.sourceCaches){let Me=this.sourceCaches[Te].getSource().type;Me!=="vector"&&Me!=="geojson"||this.sourceCaches[Te].reload()}},this.map=I,this.dispatcher=new ee(Y(),I._getMapId()),this.dispatcher.registerMessageHandler("GG",(Te,Me)=>this.getGlyphs(Te,Me)),this.dispatcher.registerMessageHandler("GI",(Te,Me)=>this.getImages(Te,Me)),this.imageManager=new m,this.imageManager.setEventedParent(this),this.glyphManager=new F(I._requestManager,ie.localIdeographFontFamily),this.lineAtlas=new X(256,512),this.crossTileSymbolIndex=new Br,this._spritesImagesIds={},this._layers={},this._order=[],this.sourceCaches={},this.zoomHistory=new t.ax,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast("SR",t.ay()),Ye().on(ue,this._rtlPluginLoaded),this.on("data",Te=>{if(Te.dataType!=="source"||Te.sourceDataType!=="metadata")return;let Me=this.sourceCaches[Te.sourceId];if(!Me)return;let ze=Me.getSource();if(ze&&ze.vectorLayerIds)for(let ht in this._layers){let wt=this._layers[ht];wt.source===ze.id&&this._validateLayer(wt)}})}loadURL(I,ie={},Te){this.fire(new t.k("dataloading",{dataType:"style"})),ie.validate=typeof ie.validate!="boolean"||ie.validate;let Me=this.map._requestManager.transformRequest(I,"Style");this._loadStyleRequest=new AbortController;let ze=this._loadStyleRequest;t.h(Me,this._loadStyleRequest).then(ht=>{this._loadStyleRequest=null,this._load(ht.data,ie,Te)}).catch(ht=>{this._loadStyleRequest=null,ht&&!ze.signal.aborted&&this.fire(new t.j(ht))})}loadJSON(I,ie={},Te){this.fire(new t.k("dataloading",{dataType:"style"})),this._frameRequest=new AbortController,n.frameAsync(this._frameRequest).then(()=>{this._frameRequest=null,ie.validate=ie.validate!==!1,this._load(I,ie,Te)}).catch(()=>{})}loadEmpty(){this.fire(new t.k("dataloading",{dataType:"style"})),this._load(xr,{validate:!1})}_load(I,ie,Te){var Me;let ze=ie.transformStyle?ie.transformStyle(Te,I):I;if(!ie.validate||!Cr(this,t.u(ze))){this._loaded=!0,this.stylesheet=ze;for(let ht in ze.sources)this.addSource(ht,ze.sources[ht],{validate:!1});ze.sprite?this._loadSprite(ze.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(ze.glyphs),this._createLayers(),this.light=new P(this.stylesheet.light),this.sky=new B(this.stylesheet.sky),this.map.setTerrain((Me=this.stylesheet.terrain)!==null&&Me!==void 0?Me:null),this.fire(new t.k("data",{dataType:"style"})),this.fire(new t.k("style.load"))}}_createLayers(){let I=t.az(this.stylesheet.layers);this.dispatcher.broadcast("SL",I),this._order=I.map(ie=>ie.id),this._layers={},this._serializedLayers=null;for(let ie of I){let Te=t.aA(ie);Te.setEventedParent(this,{layer:{id:ie.id}}),this._layers[ie.id]=Te}}_loadSprite(I,ie=!1,Te=void 0){let Me;this.imageManager.setLoaded(!1),this._spriteRequest=new AbortController,function(ze,ht,wt,Ot){return t._(this,void 0,void 0,function*(){let $t=b(ze),Tr=wt>1?"@2x":"",Ar={},Kr={};for(let{id:na,url:Ve}of $t){let $e=ht.transformRequest(p(Ve,Tr,".json"),"SpriteJSON");Ar[na]=t.h($e,Ot);let ot=ht.transformRequest(p(Ve,Tr,".png"),"SpriteImage");Kr[na]=l.getImage(ot,Ot)}return yield Promise.all([...Object.values(Ar),...Object.values(Kr)]),function(na,Ve){return t._(this,void 0,void 0,function*(){let $e={};for(let ot in na){$e[ot]={};let pt=n.getImageCanvasContext((yield Ve[ot]).data),Et=(yield na[ot]).data;for(let bt in Et){let{width:Rt,height:lr,x:yr,y:kr,sdf:jr,pixelRatio:Qr,stretchX:ha,stretchY:Aa,content:Da,textFitWidth:ci,textFitHeight:Vi}=Et[bt];$e[ot][bt]={data:null,pixelRatio:Qr,sdf:jr,stretchX:ha,stretchY:Aa,content:Da,textFitWidth:ci,textFitHeight:Vi,spriteData:{width:Rt,height:lr,x:yr,y:kr,context:pt}}}}return $e})}(Ar,Kr)})}(I,this.map._requestManager,this.map.getPixelRatio(),this._spriteRequest).then(ze=>{if(this._spriteRequest=null,ze)for(let ht in ze){this._spritesImagesIds[ht]=[];let wt=this._spritesImagesIds[ht]?this._spritesImagesIds[ht].filter(Ot=>!(Ot in ze)):[];for(let Ot of wt)this.imageManager.removeImage(Ot),this._changedImages[Ot]=!0;for(let Ot in ze[ht]){let $t=ht==="default"?Ot:`${ht}:${Ot}`;this._spritesImagesIds[ht].push($t),$t in this.imageManager.images?this.imageManager.updateImage($t,ze[ht][Ot],!1):this.imageManager.addImage($t,ze[ht][Ot]),ie&&(this._changedImages[$t]=!0)}}}).catch(ze=>{this._spriteRequest=null,Me=ze,this.fire(new t.j(Me))}).finally(()=>{this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),ie&&(this._changed=!0),this.dispatcher.broadcast("SI",this._availableImages),this.fire(new t.k("data",{dataType:"style"})),Te&&Te(Me)})}_unloadSprite(){for(let I of Object.values(this._spritesImagesIds).flat())this.imageManager.removeImage(I),this._changedImages[I]=!0;this._spritesImagesIds={},this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new t.k("data",{dataType:"style"}))}_validateLayer(I){let ie=this.sourceCaches[I.source];if(!ie)return;let Te=I.sourceLayer;if(!Te)return;let Me=ie.getSource();(Me.type==="geojson"||Me.vectorLayerIds&&Me.vectorLayerIds.indexOf(Te)===-1)&&this.fire(new t.j(new Error(`Source layer "${Te}" does not exist on source "${Me.id}" as specified by style layer "${I.id}".`)))}loaded(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(let I in this.sourceCaches)if(!this.sourceCaches[I].loaded())return!1;return!!this.imageManager.isLoaded()}_serializeByIds(I,ie=!1){let Te=this._serializedAllLayers();if(!I||I.length===0)return Object.values(ie?t.aB(Te):Te);let Me=[];for(let ze of I)if(Te[ze]){let ht=ie?t.aB(Te[ze]):Te[ze];Me.push(ht)}return Me}_serializedAllLayers(){let I=this._serializedLayers;if(I)return I;I=this._serializedLayers={};let ie=Object.keys(this._layers);for(let Te of ie){let Me=this._layers[Te];Me.type!=="custom"&&(I[Te]=Me.serialize())}return I}hasTransitions(){if(this.light&&this.light.hasTransition()||this.sky&&this.sky.hasTransition())return!0;for(let I in this.sourceCaches)if(this.sourceCaches[I].hasTransition())return!0;for(let I in this._layers)if(this._layers[I].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading.")}update(I){if(!this._loaded)return;let ie=this._changed;if(ie){let Me=Object.keys(this._updatedLayers),ze=Object.keys(this._removedLayers);(Me.length||ze.length)&&this._updateWorkerLayers(Me,ze);for(let ht in this._updatedSources){let wt=this._updatedSources[ht];if(wt==="reload")this._reloadSource(ht);else{if(wt!=="clear")throw new Error(`Invalid action ${wt}`);this._clearSource(ht)}}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(let ht in this._updatedPaintProps)this._layers[ht].updateTransitions(I);this.light.updateTransitions(I),this.sky.updateTransitions(I),this._resetUpdates()}let Te={};for(let Me in this.sourceCaches){let ze=this.sourceCaches[Me];Te[Me]=ze.used,ze.used=!1}for(let Me of this._order){let ze=this._layers[Me];ze.recalculate(I,this._availableImages),!ze.isHidden(I.zoom)&&ze.source&&(this.sourceCaches[ze.source].used=!0)}for(let Me in Te){let ze=this.sourceCaches[Me];!!Te[Me]!=!!ze.used&&ze.fire(new t.k("data",{sourceDataType:"visibility",dataType:"source",sourceId:Me}))}this.light.recalculate(I),this.sky.recalculate(I),this.z=I.zoom,ie&&this.fire(new t.k("data",{dataType:"style"}))}_updateTilesForChangedImages(){let I=Object.keys(this._changedImages);if(I.length){for(let ie in this.sourceCaches)this.sourceCaches[ie].reloadTilesForDependencies(["icons","patterns"],I);this._changedImages={}}}_updateTilesForChangedGlyphs(){if(this._glyphsDidChange){for(let I in this.sourceCaches)this.sourceCaches[I].reloadTilesForDependencies(["glyphs"],[""]);this._glyphsDidChange=!1}}_updateWorkerLayers(I,ie){this.dispatcher.broadcast("UL",{layers:this._serializeByIds(I,!1),removedIds:ie})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(I,ie={}){var Te;this._checkLoaded();let Me=this.serialize();if(I=ie.transformStyle?ie.transformStyle(Me,I):I,((Te=ie.validate)===null||Te===void 0||Te)&&Cr(this,t.u(I)))return!1;(I=t.aB(I)).layers=t.az(I.layers);let ze=t.aC(Me,I),ht=this._getOperationsToPerform(ze);if(ht.unimplemented.length>0)throw new Error(`Unimplemented: ${ht.unimplemented.join(", ")}.`);if(ht.operations.length===0)return!1;for(let wt of ht.operations)wt();return this.stylesheet=I,this._serializedLayers=null,!0}_getOperationsToPerform(I){let ie=[],Te=[];for(let Me of I)switch(Me.command){case"setCenter":case"setZoom":case"setBearing":case"setPitch":continue;case"addLayer":ie.push(()=>this.addLayer.apply(this,Me.args));break;case"removeLayer":ie.push(()=>this.removeLayer.apply(this,Me.args));break;case"setPaintProperty":ie.push(()=>this.setPaintProperty.apply(this,Me.args));break;case"setLayoutProperty":ie.push(()=>this.setLayoutProperty.apply(this,Me.args));break;case"setFilter":ie.push(()=>this.setFilter.apply(this,Me.args));break;case"addSource":ie.push(()=>this.addSource.apply(this,Me.args));break;case"removeSource":ie.push(()=>this.removeSource.apply(this,Me.args));break;case"setLayerZoomRange":ie.push(()=>this.setLayerZoomRange.apply(this,Me.args));break;case"setLight":ie.push(()=>this.setLight.apply(this,Me.args));break;case"setGeoJSONSourceData":ie.push(()=>this.setGeoJSONSourceData.apply(this,Me.args));break;case"setGlyphs":ie.push(()=>this.setGlyphs.apply(this,Me.args));break;case"setSprite":ie.push(()=>this.setSprite.apply(this,Me.args));break;case"setSky":ie.push(()=>this.setSky.apply(this,Me.args));break;case"setTerrain":ie.push(()=>this.map.setTerrain.apply(this,Me.args));break;case"setTransition":ie.push(()=>{});break;default:Te.push(Me.command)}return{operations:ie,unimplemented:Te}}addImage(I,ie){if(this.getImage(I))return this.fire(new t.j(new Error(`An image named "${I}" already exists.`)));this.imageManager.addImage(I,ie),this._afterImageUpdated(I)}updateImage(I,ie){this.imageManager.updateImage(I,ie)}getImage(I){return this.imageManager.getImage(I)}removeImage(I){if(!this.getImage(I))return this.fire(new t.j(new Error(`An image named "${I}" does not exist.`)));this.imageManager.removeImage(I),this._afterImageUpdated(I)}_afterImageUpdated(I){this._availableImages=this.imageManager.listImages(),this._changedImages[I]=!0,this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new t.k("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(I,ie,Te={}){if(this._checkLoaded(),this.sourceCaches[I]!==void 0)throw new Error(`Source "${I}" already exists.`);if(!ie.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(ie).join(", ")}.`);if(["vector","raster","geojson","video","image"].indexOf(ie.type)>=0&&this._validate(t.u.source,`sources.${I}`,ie,null,Te))return;this.map&&this.map._collectResourceTiming&&(ie.collectResourceTiming=!0);let Me=this.sourceCaches[I]=new kt(I,ie,this.dispatcher);Me.style=this,Me.setEventedParent(this,()=>({isSourceLoaded:Me.loaded(),source:Me.serialize(),sourceId:I})),Me.onAdd(this.map),this._changed=!0}removeSource(I){if(this._checkLoaded(),this.sourceCaches[I]===void 0)throw new Error("There is no source with this ID");for(let Te in this._layers)if(this._layers[Te].source===I)return this.fire(new t.j(new Error(`Source "${I}" cannot be removed while layer "${Te}" is using it.`)));let ie=this.sourceCaches[I];delete this.sourceCaches[I],delete this._updatedSources[I],ie.fire(new t.k("data",{sourceDataType:"metadata",dataType:"source",sourceId:I})),ie.setEventedParent(null),ie.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(I,ie){if(this._checkLoaded(),this.sourceCaches[I]===void 0)throw new Error(`There is no source with this ID=${I}`);let Te=this.sourceCaches[I].getSource();if(Te.type!=="geojson")throw new Error(`geojsonSource.type is ${Te.type}, which is !== 'geojson`);Te.setData(ie),this._changed=!0}getSource(I){return this.sourceCaches[I]&&this.sourceCaches[I].getSource()}addLayer(I,ie,Te={}){this._checkLoaded();let Me=I.id;if(this.getLayer(Me))return void this.fire(new t.j(new Error(`Layer "${Me}" already exists on this map.`)));let ze;if(I.type==="custom"){if(Cr(this,t.aD(I)))return;ze=t.aA(I)}else{if("source"in I&&typeof I.source=="object"&&(this.addSource(Me,I.source),I=t.aB(I),I=t.e(I,{source:Me})),this._validate(t.u.layer,`layers.${Me}`,I,{arrayIndex:-1},Te))return;ze=t.aA(I),this._validateLayer(ze),ze.setEventedParent(this,{layer:{id:Me}})}let ht=ie?this._order.indexOf(ie):this._order.length;if(ie&&ht===-1)this.fire(new t.j(new Error(`Cannot add layer "${Me}" before non-existing layer "${ie}".`)));else{if(this._order.splice(ht,0,Me),this._layerOrderChanged=!0,this._layers[Me]=ze,this._removedLayers[Me]&&ze.source&&ze.type!=="custom"){let wt=this._removedLayers[Me];delete this._removedLayers[Me],wt.type!==ze.type?this._updatedSources[ze.source]="clear":(this._updatedSources[ze.source]="reload",this.sourceCaches[ze.source].pause())}this._updateLayer(ze),ze.onAdd&&ze.onAdd(this.map)}}moveLayer(I,ie){if(this._checkLoaded(),this._changed=!0,!this._layers[I])return void this.fire(new t.j(new Error(`The layer '${I}' does not exist in the map's style and cannot be moved.`)));if(I===ie)return;let Te=this._order.indexOf(I);this._order.splice(Te,1);let Me=ie?this._order.indexOf(ie):this._order.length;ie&&Me===-1?this.fire(new t.j(new Error(`Cannot move layer "${I}" before non-existing layer "${ie}".`))):(this._order.splice(Me,0,I),this._layerOrderChanged=!0)}removeLayer(I){this._checkLoaded();let ie=this._layers[I];if(!ie)return void this.fire(new t.j(new Error(`Cannot remove non-existing layer "${I}".`)));ie.setEventedParent(null);let Te=this._order.indexOf(I);this._order.splice(Te,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[I]=ie,delete this._layers[I],this._serializedLayers&&delete this._serializedLayers[I],delete this._updatedLayers[I],delete this._updatedPaintProps[I],ie.onRemove&&ie.onRemove(this.map)}getLayer(I){return this._layers[I]}getLayersOrder(){return[...this._order]}hasLayer(I){return I in this._layers}setLayerZoomRange(I,ie,Te){this._checkLoaded();let Me=this.getLayer(I);Me?Me.minzoom===ie&&Me.maxzoom===Te||(ie!=null&&(Me.minzoom=ie),Te!=null&&(Me.maxzoom=Te),this._updateLayer(Me)):this.fire(new t.j(new Error(`Cannot set the zoom range of non-existing layer "${I}".`)))}setFilter(I,ie,Te={}){this._checkLoaded();let Me=this.getLayer(I);if(Me){if(!t.aE(Me.filter,ie))return ie==null?(Me.filter=void 0,void this._updateLayer(Me)):void(this._validate(t.u.filter,`layers.${Me.id}.filter`,ie,null,Te)||(Me.filter=t.aB(ie),this._updateLayer(Me)))}else this.fire(new t.j(new Error(`Cannot filter non-existing layer "${I}".`)))}getFilter(I){return t.aB(this.getLayer(I).filter)}setLayoutProperty(I,ie,Te,Me={}){this._checkLoaded();let ze=this.getLayer(I);ze?t.aE(ze.getLayoutProperty(ie),Te)||(ze.setLayoutProperty(ie,Te,Me),this._updateLayer(ze)):this.fire(new t.j(new Error(`Cannot style non-existing layer "${I}".`)))}getLayoutProperty(I,ie){let Te=this.getLayer(I);if(Te)return Te.getLayoutProperty(ie);this.fire(new t.j(new Error(`Cannot get style of non-existing layer "${I}".`)))}setPaintProperty(I,ie,Te,Me={}){this._checkLoaded();let ze=this.getLayer(I);ze?t.aE(ze.getPaintProperty(ie),Te)||(ze.setPaintProperty(ie,Te,Me)&&this._updateLayer(ze),this._changed=!0,this._updatedPaintProps[I]=!0,this._serializedLayers=null):this.fire(new t.j(new Error(`Cannot style non-existing layer "${I}".`)))}getPaintProperty(I,ie){return this.getLayer(I).getPaintProperty(ie)}setFeatureState(I,ie){this._checkLoaded();let Te=I.source,Me=I.sourceLayer,ze=this.sourceCaches[Te];if(ze===void 0)return void this.fire(new t.j(new Error(`The source '${Te}' does not exist in the map's style.`)));let ht=ze.getSource().type;ht==="geojson"&&Me?this.fire(new t.j(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):ht!=="vector"||Me?(I.id===void 0&&this.fire(new t.j(new Error("The feature id parameter must be provided."))),ze.setFeatureState(Me,I.id,ie)):this.fire(new t.j(new Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(I,ie){this._checkLoaded();let Te=I.source,Me=this.sourceCaches[Te];if(Me===void 0)return void this.fire(new t.j(new Error(`The source '${Te}' does not exist in the map's style.`)));let ze=Me.getSource().type,ht=ze==="vector"?I.sourceLayer:void 0;ze!=="vector"||ht?ie&&typeof I.id!="string"&&typeof I.id!="number"?this.fire(new t.j(new Error("A feature id is required to remove its specific state property."))):Me.removeFeatureState(ht,I.id,ie):this.fire(new t.j(new Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(I){this._checkLoaded();let ie=I.source,Te=I.sourceLayer,Me=this.sourceCaches[ie];if(Me!==void 0)return Me.getSource().type!=="vector"||Te?(I.id===void 0&&this.fire(new t.j(new Error("The feature id parameter must be provided."))),Me.getFeatureState(Te,I.id)):void this.fire(new t.j(new Error("The sourceLayer parameter must be provided for vector source types.")));this.fire(new t.j(new Error(`The source '${ie}' does not exist in the map's style.`)))}getTransition(){return t.e({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)}serialize(){if(!this._loaded)return;let I=t.aF(this.sourceCaches,ze=>ze.serialize()),ie=this._serializeByIds(this._order,!0),Te=this.map.getTerrain()||void 0,Me=this.stylesheet;return t.aG({version:Me.version,name:Me.name,metadata:Me.metadata,light:Me.light,sky:Me.sky,center:Me.center,zoom:Me.zoom,bearing:Me.bearing,pitch:Me.pitch,sprite:Me.sprite,glyphs:Me.glyphs,transition:Me.transition,sources:I,layers:ie,terrain:Te},ze=>ze!==void 0)}_updateLayer(I){this._updatedLayers[I.id]=!0,I.source&&!this._updatedSources[I.source]&&this.sourceCaches[I.source].getSource().type!=="raster"&&(this._updatedSources[I.source]="reload",this.sourceCaches[I.source].pause()),this._serializedLayers=null,this._changed=!0}_flattenAndSortRenderedFeatures(I){let ie=ht=>this._layers[ht].type==="fill-extrusion",Te={},Me=[];for(let ht=this._order.length-1;ht>=0;ht--){let wt=this._order[ht];if(ie(wt)){Te[wt]=ht;for(let Ot of I){let $t=Ot[wt];if($t)for(let Tr of $t)Me.push(Tr)}}}Me.sort((ht,wt)=>wt.intersectionZ-ht.intersectionZ);let ze=[];for(let ht=this._order.length-1;ht>=0;ht--){let wt=this._order[ht];if(ie(wt))for(let Ot=Me.length-1;Ot>=0;Ot--){let $t=Me[Ot].feature;if(Te[$t.layer.id]{let jr=pt.featureSortOrder;if(jr){let Qr=jr.indexOf(yr.featureIndex);return jr.indexOf(kr.featureIndex)-Qr}return kr.featureIndex-yr.featureIndex});for(let yr of lr)Rt.push(yr)}}for(let pt in Ve)Ve[pt].forEach(Et=>{let bt=Et.feature,Rt=$t[wt[pt].source].getFeatureState(bt.layer["source-layer"],bt.id);bt.source=bt.layer.source,bt.layer["source-layer"]&&(bt.sourceLayer=bt.layer["source-layer"]),bt.state=Rt});return Ve}(this._layers,ht,this.sourceCaches,I,ie,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(ze)}querySourceFeatures(I,ie){ie&&ie.filter&&this._validate(t.u.filter,"querySourceFeatures.filter",ie.filter,null,ie);let Te=this.sourceCaches[I];return Te?function(Me,ze){let ht=Me.getRenderableIds().map($t=>Me.getTileByID($t)),wt=[],Ot={};for(let $t=0;$tKr.getTileByID(na)).sort((na,Ve)=>Ve.tileID.overscaledZ-na.tileID.overscaledZ||(na.tileID.isLessThan(Ve.tileID)?-1:1))}let Ar=this.crossTileSymbolIndex.addLayer(Tr,Ot[Tr.source],I.center.lng);ht=ht||Ar}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((ze=ze||this._layerOrderChanged||Te===0)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(n.now(),I.zoom))&&(this.pauseablePlacement=new an(I,this.map.terrain,this._order,ze,ie,Te,Me,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,Ot),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(n.now()),wt=!0),ht&&this.pauseablePlacement.placement.setStale()),wt||ht)for(let $t of this._order){let Tr=this._layers[$t];Tr.type==="symbol"&&this.placement.updateLayerOpacities(Tr,Ot[Tr.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(n.now())}_releaseSymbolFadeTiles(){for(let I in this.sourceCaches)this.sourceCaches[I].releaseSymbolFadeTiles()}getImages(I,ie){return t._(this,void 0,void 0,function*(){let Te=yield this.imageManager.getImages(ie.icons);this._updateTilesForChangedImages();let Me=this.sourceCaches[ie.source];return Me&&Me.setDependencies(ie.tileID.key,ie.type,ie.icons),Te})}getGlyphs(I,ie){return t._(this,void 0,void 0,function*(){let Te=yield this.glyphManager.getGlyphs(ie.stacks),Me=this.sourceCaches[ie.source];return Me&&Me.setDependencies(ie.tileID.key,ie.type,[""]),Te})}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(I,ie={}){this._checkLoaded(),I&&this._validate(t.u.glyphs,"glyphs",I,null,ie)||(this._glyphsDidChange=!0,this.stylesheet.glyphs=I,this.glyphManager.entries={},this.glyphManager.setURL(I))}addSprite(I,ie,Te={},Me){this._checkLoaded();let ze=[{id:I,url:ie}],ht=[...b(this.stylesheet.sprite),...ze];this._validate(t.u.sprite,"sprite",ht,null,Te)||(this.stylesheet.sprite=ht,this._loadSprite(ze,!0,Me))}removeSprite(I){this._checkLoaded();let ie=b(this.stylesheet.sprite);if(ie.find(Te=>Te.id===I)){if(this._spritesImagesIds[I])for(let Te of this._spritesImagesIds[I])this.imageManager.removeImage(Te),this._changedImages[Te]=!0;ie.splice(ie.findIndex(Te=>Te.id===I),1),this.stylesheet.sprite=ie.length>0?ie:void 0,delete this._spritesImagesIds[I],this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new t.k("data",{dataType:"style"}))}else this.fire(new t.j(new Error(`Sprite "${I}" doesn't exists on this map.`)))}getSprite(){return b(this.stylesheet.sprite)}setSprite(I,ie={},Te){this._checkLoaded(),I&&this._validate(t.u.sprite,"sprite",I,null,ie)||(this.stylesheet.sprite=I,I?this._loadSprite(I,!0,Te):(this._unloadSprite(),Te&&Te(null)))}}var Ur=t.Y([{name:"a_pos",type:"Int16",components:2}]);let Hr={prelude:gt(`#ifdef GL_ES precision mediump float; #else #if !defined(lowp) #define lowp #endif #if !defined(mediump) #define mediump #endif #if !defined(highp) #define highp #endif #endif `,`#ifdef GL_ES precision highp float; #else #if !defined(lowp) #define lowp #endif #if !defined(mediump) #define mediump #endif #if !defined(highp) #define highp #endif #endif vec2 unpack_float(const float packedValue) {int packedIntValue=int(packedValue);int v0=packedIntValue/256;return vec2(v0,packedIntValue-v0*256);}vec2 unpack_opacity(const float packedOpacity) {int intOpacity=int(packedOpacity)/2;return vec2(float(intOpacity)/127.0,mod(packedOpacity,2.0));}vec4 decode_color(const vec2 encodedColor) {return vec4(unpack_float(encodedColor[0])/255.0,unpack_float(encodedColor[1])/255.0 );}float unpack_mix_vec2(const vec2 packedValue,const float t) {return mix(packedValue[0],packedValue[1],t);}vec4 unpack_mix_color(const vec4 packedColors,const float t) {vec4 minColor=decode_color(vec2(packedColors[0],packedColors[1]));vec4 maxColor=decode_color(vec2(packedColors[2],packedColors[3]));return mix(minColor,maxColor,t);}vec2 get_pattern_pos(const vec2 pixel_coord_upper,const vec2 pixel_coord_lower,const vec2 pattern_size,const float tile_units_to_pixels,const vec2 pos) {vec2 offset=mod(mod(mod(pixel_coord_upper,pattern_size)*256.0,pattern_size)*256.0+pixel_coord_lower,pattern_size);return (tile_units_to_pixels*pos+offset)/pattern_size;} #ifdef TERRAIN3D uniform sampler2D u_terrain;uniform float u_terrain_dim;uniform mat4 u_terrain_matrix;uniform vec4 u_terrain_unpack;uniform float u_terrain_exaggeration;uniform highp sampler2D u_depth; #endif const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitShifts=vec4(1.)/bitSh;highp float unpack(highp vec4 color) {return dot(color,bitShifts);}highp float depthOpacity(vec3 frag) { #ifdef TERRAIN3D highp float d=unpack(texture2D(u_depth,frag.xy*0.5+0.5))+0.0001-frag.z;return 1.0-max(0.0,min(1.0,-d*500.0)); #else return 1.0; #endif }float calculate_visibility(vec4 pos) { #ifdef TERRAIN3D vec3 frag=pos.xyz/pos.w;highp float d=depthOpacity(frag);if (d > 0.95) return 1.0;return (d+depthOpacity(frag+vec3(0.0,0.01,0.0)))/2.0; #else return 1.0; #endif }float ele(vec2 pos) { #ifdef TERRAIN3D vec4 rgb=(texture2D(u_terrain,pos)*255.0)*u_terrain_unpack;return rgb.r+rgb.g+rgb.b-u_terrain_unpack.a; #else return 0.0; #endif }float get_elevation(vec2 pos) { #ifdef TERRAIN3D vec2 coord=(u_terrain_matrix*vec4(pos,0.0,1.0)).xy*u_terrain_dim+1.0;vec2 f=fract(coord);vec2 c=(floor(coord)+0.5)/(u_terrain_dim+2.0);float d=1.0/(u_terrain_dim+2.0);float tl=ele(c);float tr=ele(c+vec2(d,0.0));float bl=ele(c+vec2(0.0,d));float br=ele(c+vec2(d,d));float elevation=mix(mix(tl,tr,f.x),mix(bl,br,f.x),f.y);return elevation*u_terrain_exaggeration; #else return 0.0; #endif }`),background:gt(`uniform vec4 u_color;uniform float u_opacity;void main() {gl_FragColor=u_color*u_opacity; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,"attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),backgroundPattern:gt(`uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_mix)*u_opacity; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,"uniform mat4 u_matrix;uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_a*u_pattern_size_a,u_tile_units_to_pixels,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_b*u_pattern_size_b,u_tile_units_to_pixels,a_pos);}"),circle:gt(`varying vec3 v_data;varying float v_visibility; #pragma mapbox: define highp vec4 color #pragma mapbox: define mediump float radius #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define highp vec4 stroke_color #pragma mapbox: define mediump float stroke_width #pragma mapbox: define lowp float stroke_opacity void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize mediump float radius #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize highp vec4 stroke_color #pragma mapbox: initialize mediump float stroke_width #pragma mapbox: initialize lowp float stroke_opacity vec2 extrude=v_data.xy;float extrude_length=length(extrude);float antialiased_blur=v_data.z;float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(antialiased_blur,0.0,extrude_length-radius/(radius+stroke_width));gl_FragColor=v_visibility*opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,`uniform mat4 u_matrix;uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;attribute vec2 a_pos;varying vec3 v_data;varying float v_visibility; #pragma mapbox: define highp vec4 color #pragma mapbox: define mediump float radius #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define highp vec4 stroke_color #pragma mapbox: define mediump float stroke_width #pragma mapbox: define lowp float stroke_opacity void main(void) { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize mediump float radius #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize highp vec4 stroke_color #pragma mapbox: initialize mediump float stroke_width #pragma mapbox: initialize lowp float stroke_opacity vec2 extrude=vec2(mod(a_pos,2.0)*2.0-1.0);vec2 circle_center=floor(a_pos*0.5);float ele=get_elevation(circle_center);v_visibility=calculate_visibility(u_matrix*vec4(circle_center,ele,1.0));if (u_pitch_with_map) {vec2 corner_position=circle_center;if (u_scale_with_map) {corner_position+=extrude*(radius+stroke_width)*u_extrude_scale;} else {vec4 projected_center=u_matrix*vec4(circle_center,0,1);corner_position+=extrude*(radius+stroke_width)*u_extrude_scale*(projected_center.w/u_camera_to_center_distance);}gl_Position=u_matrix*vec4(corner_position,ele,1);} else {gl_Position=u_matrix*vec4(circle_center,ele,1);if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}float antialiasblur=-max(1.0/u_device_pixel_ratio/(radius+stroke_width),blur);v_data=vec3(extrude.x,extrude.y,antialiasblur);}`),clippingMask:gt("void main() {gl_FragColor=vec4(1.0);}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),heatmap:gt(`uniform highp float u_intensity;varying vec2 v_extrude; #pragma mapbox: define highp float weight #define GAUSS_COEF 0.3989422804014327 void main() { #pragma mapbox: initialize highp float weight float d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);gl_FragColor=vec4(val,1.0,1.0,1.0); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,`uniform mat4 u_matrix;uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;attribute vec2 a_pos;varying vec2 v_extrude; #pragma mapbox: define highp float weight #pragma mapbox: define mediump float radius const highp float ZERO=1.0/255.0/16.0; #define GAUSS_COEF 0.3989422804014327 void main(void) { #pragma mapbox: initialize highp float weight #pragma mapbox: initialize mediump float radius vec2 unscaled_extrude=vec2(mod(a_pos,2.0)*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec4 pos=vec4(floor(a_pos*0.5)+extrude,get_elevation(floor(a_pos*0.5)),1);gl_Position=u_matrix*pos;}`),heatmapTexture:gt(`uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;varying vec2 v_pos;void main() {float t=texture2D(u_image,v_pos).r;vec4 color=texture2D(u_color_ramp,vec2(t,0.5));gl_FragColor=color*u_opacity; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(0.0); #endif }`,"uniform mat4 u_matrix;uniform vec2 u_world;attribute vec2 a_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}"),collisionBox:gt("varying float v_placed;varying float v_notUsed;void main() {float alpha=0.5;gl_FragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 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_anchor_pos;attribute vec2 a_placed;attribute vec2 a_box_real;uniform mat4 u_matrix;uniform vec2 u_pixel_extrude_scale;varying float v_placed;varying float v_notUsed;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);}void main() {gl_Position=projectTileWithElevation(a_anchor_pos,get_elevation(a_anchor_pos));gl_Position.xy=((a_box_real+0.5)*u_pixel_extrude_scale*2.0-1.0)*vec2(1.0,-1.0)*gl_Position.w;if (gl_Position.z/gl_Position.w < 1.1) {gl_Position.z=0.5;}v_placed=a_placed.x;v_notUsed=a_placed.y;}"),collisionCircle:gt("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);}"),debug:gt("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,get_elevation(a_pos),1);}"),fill:gt(`#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);}`),fillOutline:gt(`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;}`),fillOutlinePattern:gt(`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;}`),fillPattern:gt(`#ifdef GL_ES precision highp float; #endif 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);}`),fillExtrusion:gt(`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; #ifdef TERRAIN3D attribute vec2 a_centroid; #endif 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; #ifdef TERRAIN3D float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0); #else float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0; #endif base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;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;}`),fillExtrusionPattern:gt(`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; #ifdef TERRAIN3D attribute vec2 a_centroid; #endif 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; #ifdef TERRAIN3D float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0); #else float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0; #endif base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;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;}`),hillshadePrepare:gt(`#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;}"),hillshade:gt(`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;}"),line:gt(`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; #ifdef TERRAIN3D v_gamma_scale=1.0; #else 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; #endif v_width2=vec2(outset,inset);}`),lineGradient:gt(`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; #ifdef TERRAIN3D v_gamma_scale=1.0; #else 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; #endif v_width2=vec2(outset,inset);}`),linePattern:gt(`#ifdef GL_ES precision highp float; #endif 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; #ifdef TERRAIN3D v_gamma_scale=1.0; #else 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; #endif v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`),lineSDF:gt(`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; #ifdef TERRAIN3D v_gamma_scale=1.0; #else 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; #endif 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);}`),raster:gt(`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;}"),symbolIcon:gt(`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 }`,`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;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;varying vec2 v_tex;varying float v_fade_opacity;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);} #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;float ele=get_elevation(a_pos);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;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);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=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);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;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}gl_Position=finalPos;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;float visibility=calculate_visibility(projectedPoint);v_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));}`),symbolSDF:gt(`#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 inner_edge=(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);inner_edge=inner_edge+gamma*gamma_scale;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(inner_edge-gamma_scaled,inner_edge+gamma_scaled,dist);if (u_is_halo) {lowp float halo_edge=(6.0-halo_width/fontScale)/SDF_PX;alpha=min(smoothstep(halo_edge-gamma_scaled,halo_edge+gamma_scaled,dist),1.0-alpha);}gl_FragColor=color*(alpha*opacity*fade_opacity); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,`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 bool u_is_along_line;uniform bool u_is_variable_anchor;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_translation;uniform float u_pitched_scale;varying vec2 v_data0;varying vec3 v_data1;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);} #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;float ele=get_elevation(a_pos);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;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);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=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);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;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}`),symbolTextAndIcon:gt(`#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 }`,`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;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;varying vec4 v_data0;varying vec4 v_data1;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);} #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;float ele=get_elevation(a_pos);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;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);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=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);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;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,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);}`),terrain:gt("uniform sampler2D u_texture;uniform vec4 u_fog_color;uniform vec4 u_horizon_color;uniform float u_fog_ground_blend;uniform float u_fog_ground_blend_opacity;uniform float u_horizon_fog_blend;varying vec2 v_texture_pos;varying float v_fog_depth;const float gamma=2.2;vec4 gammaToLinear(vec4 color) {return pow(color,vec4(gamma));}vec4 linearToGamma(vec4 color) {return pow(color,vec4(1.0/gamma));}void main() {vec4 surface_color=texture2D(u_texture,v_texture_pos);if (v_fog_depth > u_fog_ground_blend) {vec4 surface_color_linear=gammaToLinear(surface_color);float blend_color=smoothstep(0.0,1.0,max((v_fog_depth-u_horizon_fog_blend)/(1.0-u_horizon_fog_blend),0.0));vec4 fog_horizon_color_linear=mix(gammaToLinear(u_fog_color),gammaToLinear(u_horizon_color),blend_color);float factor_fog=max(v_fog_depth-u_fog_ground_blend,0.0)/(1.0-u_fog_ground_blend);gl_FragColor=linearToGamma(mix(surface_color_linear,fog_horizon_color_linear,pow(factor_fog,2.0)*u_fog_ground_blend_opacity));} else {gl_FragColor=surface_color;}}","attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform mat4 u_fog_matrix;uniform float u_ele_delta;varying vec2 v_texture_pos;varying float v_fog_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);vec4 pos=u_fog_matrix*vec4(a_pos3d.xy,ele,1.0);v_fog_depth=pos.z/pos.w*0.5+0.5;}"),terrainDepth:gt("varying float v_depth;const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitMsk=vec4(0.,vec3(1./256.0));highp vec4 pack(highp float value) {highp vec4 comp=fract(value*bitSh);comp-=comp.xxyz*bitMsk;return comp;}void main() {gl_FragColor=pack(v_depth);}","attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform float u_ele_delta;varying float v_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);v_depth=gl_Position.z/gl_Position.w;}"),terrainCoords:gt("precision mediump float;uniform sampler2D u_texture;uniform float u_terrain_coords_id;varying vec2 v_texture_pos;void main() {vec4 rgba=texture2D(u_texture,v_texture_pos);gl_FragColor=vec4(rgba.r,rgba.g,rgba.b,u_terrain_coords_id);}","attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform float u_ele_delta;varying vec2 v_texture_pos;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);}"),sky:gt("uniform vec4 u_sky_color;uniform vec4 u_horizon_color;uniform float u_horizon;uniform float u_sky_horizon_blend;void main() {float y=gl_FragCoord.y;if (y > u_horizon) {float blend=y-u_horizon;if (blend < u_sky_horizon_blend) {gl_FragColor=mix(u_sky_color,u_horizon_color,pow(1.0-blend/u_sky_horizon_blend,2.0));} else {gl_FragColor=u_sky_color;}}}","attribute vec2 a_pos;void main() {gl_Position=vec4(a_pos,1.0,1.0);}")};function gt(Fe,I){let ie=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,Te=I.match(/attribute ([\w]+) ([\w]+)/g),Me=Fe.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),ze=I.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),ht=ze?ze.concat(Me):Me,wt={};return{fragmentSource:Fe=Fe.replace(ie,(Ot,$t,Tr,Ar,Kr)=>(wt[Kr]=!0,$t==="define"?` #ifndef HAS_UNIFORM_u_${Kr} varying ${Tr} ${Ar} ${Kr}; #else uniform ${Tr} ${Ar} u_${Kr}; #endif `:` #ifdef HAS_UNIFORM_u_${Kr} ${Tr} ${Ar} ${Kr} = u_${Kr}; #endif `)),vertexSource:I=I.replace(ie,(Ot,$t,Tr,Ar,Kr)=>{let na=Ar==="float"?"vec2":"vec4",Ve=Kr.match(/color/)?"color":na;return wt[Kr]?$t==="define"?` #ifndef HAS_UNIFORM_u_${Kr} uniform lowp float u_${Kr}_t; attribute ${Tr} ${na} a_${Kr}; varying ${Tr} ${Ar} ${Kr}; #else uniform ${Tr} ${Ar} u_${Kr}; #endif `:Ve==="vec4"?` #ifndef HAS_UNIFORM_u_${Kr} ${Kr} = a_${Kr}; #else ${Tr} ${Ar} ${Kr} = u_${Kr}; #endif `:` #ifndef HAS_UNIFORM_u_${Kr} ${Kr} = unpack_mix_${Ve}(a_${Kr}, u_${Kr}_t); #else ${Tr} ${Ar} ${Kr} = u_${Kr}; #endif `:$t==="define"?` #ifndef HAS_UNIFORM_u_${Kr} uniform lowp float u_${Kr}_t; attribute ${Tr} ${na} a_${Kr}; #else uniform ${Tr} ${Ar} u_${Kr}; #endif `:Ve==="vec4"?` #ifndef HAS_UNIFORM_u_${Kr} ${Tr} ${Ar} ${Kr} = a_${Kr}; #else ${Tr} ${Ar} ${Kr} = u_${Kr}; #endif `:` #ifndef HAS_UNIFORM_u_${Kr} ${Tr} ${Ar} ${Kr} = unpack_mix_${Ve}(a_${Kr}, u_${Kr}_t); #else ${Tr} ${Ar} ${Kr} = u_${Kr}; #endif `}),staticAttributes:Te,staticUniforms:ht}}class Xt{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(I,ie,Te,Me,ze,ht,wt,Ot,$t){this.context=I;let Tr=this.boundPaintVertexBuffers.length!==Me.length;for(let Ar=0;!Tr&&Ar({u_matrix:Fe,u_texture:0,u_ele_delta:I,u_fog_matrix:ie,u_fog_color:Te?Te.properties.get("fog-color"):t.aM.white,u_fog_ground_blend:Te?Te.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:Te?Te.calculateFogBlendOpacity(Me):0,u_horizon_color:Te?Te.properties.get("horizon-color"):t.aM.white,u_horizon_fog_blend:Te?Te.properties.get("horizon-fog-blend"):1});function Or(Fe){let I=[];for(let ie=0;ie({u_depth:new t.aH(yr,kr.u_depth),u_terrain:new t.aH(yr,kr.u_terrain),u_terrain_dim:new t.aI(yr,kr.u_terrain_dim),u_terrain_matrix:new t.aJ(yr,kr.u_terrain_matrix),u_terrain_unpack:new t.aK(yr,kr.u_terrain_unpack),u_terrain_exaggeration:new t.aI(yr,kr.u_terrain_exaggeration)}))(I,lr),this.binderUniforms=Te?Te.getUniforms(I,lr):[]}draw(I,ie,Te,Me,ze,ht,wt,Ot,$t,Tr,Ar,Kr,na,Ve,$e,ot,pt,Et){let bt=I.gl;if(this.failedToCreate)return;if(I.program.set(this.program),I.setDepthMode(Te),I.setStencilMode(Me),I.setColorMode(ze),I.setCullFace(ht),Ot){I.activeTexture.set(bt.TEXTURE2),bt.bindTexture(bt.TEXTURE_2D,Ot.depthTexture),I.activeTexture.set(bt.TEXTURE3),bt.bindTexture(bt.TEXTURE_2D,Ot.texture);for(let lr in this.terrainUniforms)this.terrainUniforms[lr].set(Ot[lr])}for(let lr in this.fixedUniforms)this.fixedUniforms[lr].set(wt[lr]);$e&&$e.setUniforms(I,this.binderUniforms,na,{zoom:Ve});let Rt=0;switch(ie){case bt.LINES:Rt=2;break;case bt.TRIANGLES:Rt=3;break;case bt.LINE_STRIP:Rt=1}for(let lr of Kr.get()){let yr=lr.vaos||(lr.vaos={});(yr[$t]||(yr[$t]=new Xt)).bind(I,this,Tr,$e?$e.getPaintVertexBuffers():[],Ar,lr.vertexOffset,ot,pt,Et),bt.drawElements(ie,lr.primitiveLength*Rt,bt.UNSIGNED_SHORT,lr.primitiveOffset*Rt*2)}}}function Pa(Fe,I,ie){let Te=1/Oa(ie,1,I.transform.tileZoom),Me=Math.pow(2,ie.tileID.overscaledZ),ze=ie.tileSize*Math.pow(2,I.transform.tileZoom)/Me,ht=ze*(ie.tileID.canonical.x+ie.tileID.wrap*Me),wt=ze*ie.tileID.canonical.y;return{u_image:0,u_texsize:ie.imageAtlasTexture.size,u_scale:[Te,Fe.fromScale,Fe.toScale],u_fade:Fe.t,u_pixel_coord_upper:[ht>>16,wt>>16],u_pixel_coord_lower:[65535&ht,65535&wt]}}let ma=(Fe,I,ie,Te)=>{let Me=I.style.light,ze=Me.properties.get("position"),ht=[ze.x,ze.y,ze.z],wt=function(){var $t=new t.A(9);return t.A!=Float32Array&&($t[1]=0,$t[2]=0,$t[3]=0,$t[5]=0,$t[6]=0,$t[7]=0),$t[0]=1,$t[4]=1,$t[8]=1,$t}();Me.properties.get("anchor")==="viewport"&&function($t,Tr){var Ar=Math.sin(Tr),Kr=Math.cos(Tr);$t[0]=Kr,$t[1]=Ar,$t[2]=0,$t[3]=-Ar,$t[4]=Kr,$t[5]=0,$t[6]=0,$t[7]=0,$t[8]=1}(wt,-I.transform.angle),function($t,Tr,Ar){var Kr=Tr[0],na=Tr[1],Ve=Tr[2];$t[0]=Kr*Ar[0]+na*Ar[3]+Ve*Ar[6],$t[1]=Kr*Ar[1]+na*Ar[4]+Ve*Ar[7],$t[2]=Kr*Ar[2]+na*Ar[5]+Ve*Ar[8]}(ht,ht,wt);let Ot=Me.properties.get("color");return{u_matrix:Fe,u_lightpos:ht,u_lightintensity:Me.properties.get("intensity"),u_lightcolor:[Ot.r,Ot.g,Ot.b],u_vertical_gradient:+ie,u_opacity:Te}},la=(Fe,I,ie,Te,Me,ze,ht)=>t.e(ma(Fe,I,ie,Te),Pa(ze,I,ht),{u_height_factor:-Math.pow(2,Me.overscaledZ)/ht.tileSize/8}),_a=Fe=>({u_matrix:Fe}),Ai=(Fe,I,ie,Te)=>t.e(_a(Fe),Pa(ie,I,Te)),ki=(Fe,I)=>({u_matrix:Fe,u_world:I}),Ki=(Fe,I,ie,Te,Me)=>t.e(Ai(Fe,I,ie,Te),{u_world:Me}),yn=(Fe,I,ie,Te)=>{let Me=Fe.transform,ze,ht;if(Te.paint.get("circle-pitch-alignment")==="map"){let wt=Oa(ie,1,Me.zoom);ze=!0,ht=[wt,wt]}else ze=!1,ht=Me.pixelsToGLUnits;return{u_camera_to_center_distance:Me.cameraToCenterDistance,u_scale_with_map:+(Te.paint.get("circle-pitch-scale")==="map"),u_matrix:Fe.translatePosMatrix(I.posMatrix,ie,Te.paint.get("circle-translate"),Te.paint.get("circle-translate-anchor")),u_pitch_with_map:+ze,u_device_pixel_ratio:Fe.pixelRatio,u_extrude_scale:ht}},Ln=(Fe,I,ie)=>({u_matrix:Fe,u_inv_matrix:I,u_camera_to_center_distance:ie.cameraToCenterDistance,u_viewport_size:[ie.width,ie.height]}),kn=(Fe,I,ie=1)=>({u_matrix:Fe,u_color:I,u_overlay:0,u_overlay_scale:ie}),Bn=Fe=>({u_matrix:Fe}),ao=(Fe,I,ie,Te)=>({u_matrix:Fe,u_extrude_scale:Oa(I,1,ie),u_intensity:Te}),xo=(Fe,I,ie,Te)=>{let Me=t.H();t.aP(Me,0,Fe.width,Fe.height,0,0,1);let ze=Fe.context.gl;return{u_matrix:Me,u_world:[ze.drawingBufferWidth,ze.drawingBufferHeight],u_image:ie,u_color_ramp:Te,u_opacity:I.paint.get("heatmap-opacity")}};function Co(Fe,I){let ie=Math.pow(2,I.canonical.z),Te=I.canonical.y;return[new t.Z(0,Te/ie).toLngLat().lat,new t.Z(0,(Te+1)/ie).toLngLat().lat]}let Fs=(Fe,I,ie,Te)=>{let Me=Fe.transform;return{u_matrix:is(Fe,I,ie,Te),u_ratio:1/Oa(I,1,Me.zoom),u_device_pixel_ratio:Fe.pixelRatio,u_units_to_pixels:[1/Me.pixelsToGLUnits[0],1/Me.pixelsToGLUnits[1]]}},Mn=(Fe,I,ie,Te,Me)=>t.e(Fs(Fe,I,ie,Me),{u_image:0,u_image_height:Te}),Ao=(Fe,I,ie,Te,Me)=>{let ze=Fe.transform,ht=ts(I,ze);return{u_matrix:is(Fe,I,ie,Me),u_texsize:I.imageAtlasTexture.size,u_ratio:1/Oa(I,1,ze.zoom),u_device_pixel_ratio:Fe.pixelRatio,u_image:0,u_scale:[ht,Te.fromScale,Te.toScale],u_fade:Te.t,u_units_to_pixels:[1/ze.pixelsToGLUnits[0],1/ze.pixelsToGLUnits[1]]}},On=(Fe,I,ie,Te,Me,ze)=>{let ht=Fe.lineAtlas,wt=ts(I,Fe.transform),Ot=ie.layout.get("line-cap")==="round",$t=ht.getDash(Te.from,Ot),Tr=ht.getDash(Te.to,Ot),Ar=$t.width*Me.fromScale,Kr=Tr.width*Me.toScale;return t.e(Fs(Fe,I,ie,ze),{u_patternscale_a:[wt/Ar,-$t.height/2],u_patternscale_b:[wt/Kr,-Tr.height/2],u_sdfgamma:ht.width/(256*Math.min(Ar,Kr)*Fe.pixelRatio)/2,u_image:0,u_tex_y_a:$t.y,u_tex_y_b:Tr.y,u_mix:Me.t})};function ts(Fe,I){return 1/Oa(Fe,1,I.tileZoom)}function is(Fe,I,ie,Te){return Fe.translatePosMatrix(Te?Te.posMatrix:I.tileID.posMatrix,I,ie.paint.get("line-translate"),ie.paint.get("line-translate-anchor"))}let _s=(Fe,I,ie,Te,Me)=>{return{u_matrix:Fe,u_tl_parent:I,u_scale_parent:ie,u_buffer_scale:1,u_fade_t:Te.mix,u_opacity:Te.opacity*Me.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:Me.paint.get("raster-brightness-min"),u_brightness_high:Me.paint.get("raster-brightness-max"),u_saturation_factor:(ht=Me.paint.get("raster-saturation"),ht>0?1-1/(1.001-ht):-ht),u_contrast_factor:(ze=Me.paint.get("raster-contrast"),ze>0?1/(1-ze):1+ze),u_spin_weights:Oo(Me.paint.get("raster-hue-rotate"))};var ze,ht};function Oo(Fe){Fe*=Math.PI/180;let I=Math.sin(Fe),ie=Math.cos(Fe);return[(2*ie+1)/3,(-Math.sqrt(3)*I-ie+1)/3,(Math.sqrt(3)*I-ie+1)/3]}let io=(Fe,I,ie,Te,Me,ze,ht,wt,Ot,$t,Tr,Ar,Kr,na)=>{let Ve=ht.transform;return{u_is_size_zoom_constant:+(Fe==="constant"||Fe==="source"),u_is_size_feature_constant:+(Fe==="constant"||Fe==="camera"),u_size_t:I?I.uSizeT:0,u_size:I?I.uSize:0,u_camera_to_center_distance:Ve.cameraToCenterDistance,u_pitch:Ve.pitch/360*2*Math.PI,u_rotate_symbol:+ie,u_aspect_ratio:Ve.width/Ve.height,u_fade_change:ht.options.fadeDuration?ht.symbolFadeChange:1,u_matrix:wt,u_label_plane_matrix:Ot,u_coord_matrix:$t,u_is_text:+Ar,u_pitch_with_map:+Te,u_is_along_line:Me,u_is_variable_anchor:ze,u_texsize:Kr,u_texture:0,u_translation:Tr,u_pitched_scale:na}},Gn=(Fe,I,ie,Te,Me,ze,ht,wt,Ot,$t,Tr,Ar,Kr,na,Ve)=>{let $e=ht.transform;return t.e(io(Fe,I,ie,Te,Me,ze,ht,wt,Ot,$t,Tr,Ar,Kr,Ve),{u_gamma_scale:Te?Math.cos($e._pitch)*$e.cameraToCenterDistance:1,u_device_pixel_ratio:ht.pixelRatio,u_is_halo:+na})},eo=(Fe,I,ie,Te,Me,ze,ht,wt,Ot,$t,Tr,Ar,Kr,na)=>t.e(Gn(Fe,I,ie,Te,Me,ze,ht,wt,Ot,$t,Tr,!0,Ar,!0,na),{u_texsize_icon:Kr,u_texture_icon:1}),ns=(Fe,I,ie)=>({u_matrix:Fe,u_opacity:I,u_color:ie}),gs=(Fe,I,ie,Te,Me,ze)=>t.e(function(ht,wt,Ot,$t){let Tr=Ot.imageManager.getPattern(ht.from.toString()),Ar=Ot.imageManager.getPattern(ht.to.toString()),{width:Kr,height:na}=Ot.imageManager.getPixelSize(),Ve=Math.pow(2,$t.tileID.overscaledZ),$e=$t.tileSize*Math.pow(2,Ot.transform.tileZoom)/Ve,ot=$e*($t.tileID.canonical.x+$t.tileID.wrap*Ve),pt=$e*$t.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:Tr.tl,u_pattern_br_a:Tr.br,u_pattern_tl_b:Ar.tl,u_pattern_br_b:Ar.br,u_texsize:[Kr,na],u_mix:wt.t,u_pattern_size_a:Tr.displaySize,u_pattern_size_b:Ar.displaySize,u_scale_a:wt.fromScale,u_scale_b:wt.toScale,u_tile_units_to_pixels:1/Oa($t,1,Ot.transform.tileZoom),u_pixel_coord_upper:[ot>>16,pt>>16],u_pixel_coord_lower:[65535&ot,65535&pt]}}(Te,ze,ie,Me),{u_matrix:Fe,u_opacity:I}),Ls={fillExtrusion:(Fe,I)=>({u_matrix:new t.aJ(Fe,I.u_matrix),u_lightpos:new t.aN(Fe,I.u_lightpos),u_lightintensity:new t.aI(Fe,I.u_lightintensity),u_lightcolor:new t.aN(Fe,I.u_lightcolor),u_vertical_gradient:new t.aI(Fe,I.u_vertical_gradient),u_opacity:new t.aI(Fe,I.u_opacity)}),fillExtrusionPattern:(Fe,I)=>({u_matrix:new t.aJ(Fe,I.u_matrix),u_lightpos:new t.aN(Fe,I.u_lightpos),u_lightintensity:new t.aI(Fe,I.u_lightintensity),u_lightcolor:new t.aN(Fe,I.u_lightcolor),u_vertical_gradient:new t.aI(Fe,I.u_vertical_gradient),u_height_factor:new t.aI(Fe,I.u_height_factor),u_image:new t.aH(Fe,I.u_image),u_texsize:new t.aO(Fe,I.u_texsize),u_pixel_coord_upper:new t.aO(Fe,I.u_pixel_coord_upper),u_pixel_coord_lower:new t.aO(Fe,I.u_pixel_coord_lower),u_scale:new t.aN(Fe,I.u_scale),u_fade:new t.aI(Fe,I.u_fade),u_opacity:new t.aI(Fe,I.u_opacity)}),fill:(Fe,I)=>({u_matrix:new t.aJ(Fe,I.u_matrix)}),fillPattern:(Fe,I)=>({u_matrix:new t.aJ(Fe,I.u_matrix),u_image:new t.aH(Fe,I.u_image),u_texsize:new t.aO(Fe,I.u_texsize),u_pixel_coord_upper:new t.aO(Fe,I.u_pixel_coord_upper),u_pixel_coord_lower:new t.aO(Fe,I.u_pixel_coord_lower),u_scale:new t.aN(Fe,I.u_scale),u_fade:new t.aI(Fe,I.u_fade)}),fillOutline:(Fe,I)=>({u_matrix:new t.aJ(Fe,I.u_matrix),u_world:new t.aO(Fe,I.u_world)}),fillOutlinePattern:(Fe,I)=>({u_matrix:new t.aJ(Fe,I.u_matrix),u_world:new t.aO(Fe,I.u_world),u_image:new t.aH(Fe,I.u_image),u_texsize:new t.aO(Fe,I.u_texsize),u_pixel_coord_upper:new t.aO(Fe,I.u_pixel_coord_upper),u_pixel_coord_lower:new t.aO(Fe,I.u_pixel_coord_lower),u_scale:new t.aN(Fe,I.u_scale),u_fade:new t.aI(Fe,I.u_fade)}),circle:(Fe,I)=>({u_camera_to_center_distance:new t.aI(Fe,I.u_camera_to_center_distance),u_scale_with_map:new t.aH(Fe,I.u_scale_with_map),u_pitch_with_map:new t.aH(Fe,I.u_pitch_with_map),u_extrude_scale:new t.aO(Fe,I.u_extrude_scale),u_device_pixel_ratio:new t.aI(Fe,I.u_device_pixel_ratio),u_matrix:new t.aJ(Fe,I.u_matrix)}),collisionBox:(Fe,I)=>({u_matrix:new t.aJ(Fe,I.u_matrix),u_pixel_extrude_scale:new t.aO(Fe,I.u_pixel_extrude_scale)}),collisionCircle:(Fe,I)=>({u_matrix:new t.aJ(Fe,I.u_matrix),u_inv_matrix:new t.aJ(Fe,I.u_inv_matrix),u_camera_to_center_distance:new t.aI(Fe,I.u_camera_to_center_distance),u_viewport_size:new t.aO(Fe,I.u_viewport_size)}),debug:(Fe,I)=>({u_color:new t.aL(Fe,I.u_color),u_matrix:new t.aJ(Fe,I.u_matrix),u_overlay:new t.aH(Fe,I.u_overlay),u_overlay_scale:new t.aI(Fe,I.u_overlay_scale)}),clippingMask:(Fe,I)=>({u_matrix:new t.aJ(Fe,I.u_matrix)}),heatmap:(Fe,I)=>({u_extrude_scale:new t.aI(Fe,I.u_extrude_scale),u_intensity:new t.aI(Fe,I.u_intensity),u_matrix:new t.aJ(Fe,I.u_matrix)}),heatmapTexture:(Fe,I)=>({u_matrix:new t.aJ(Fe,I.u_matrix),u_world:new t.aO(Fe,I.u_world),u_image:new t.aH(Fe,I.u_image),u_color_ramp:new t.aH(Fe,I.u_color_ramp),u_opacity:new t.aI(Fe,I.u_opacity)}),hillshade:(Fe,I)=>({u_matrix:new t.aJ(Fe,I.u_matrix),u_image:new t.aH(Fe,I.u_image),u_latrange:new t.aO(Fe,I.u_latrange),u_light:new t.aO(Fe,I.u_light),u_shadow:new t.aL(Fe,I.u_shadow),u_highlight:new t.aL(Fe,I.u_highlight),u_accent:new t.aL(Fe,I.u_accent)}),hillshadePrepare:(Fe,I)=>({u_matrix:new t.aJ(Fe,I.u_matrix),u_image:new t.aH(Fe,I.u_image),u_dimension:new t.aO(Fe,I.u_dimension),u_zoom:new t.aI(Fe,I.u_zoom),u_unpack:new t.aK(Fe,I.u_unpack)}),line:(Fe,I)=>({u_matrix:new t.aJ(Fe,I.u_matrix),u_ratio:new t.aI(Fe,I.u_ratio),u_device_pixel_ratio:new t.aI(Fe,I.u_device_pixel_ratio),u_units_to_pixels:new t.aO(Fe,I.u_units_to_pixels)}),lineGradient:(Fe,I)=>({u_matrix:new t.aJ(Fe,I.u_matrix),u_ratio:new t.aI(Fe,I.u_ratio),u_device_pixel_ratio:new t.aI(Fe,I.u_device_pixel_ratio),u_units_to_pixels:new t.aO(Fe,I.u_units_to_pixels),u_image:new t.aH(Fe,I.u_image),u_image_height:new t.aI(Fe,I.u_image_height)}),linePattern:(Fe,I)=>({u_matrix:new t.aJ(Fe,I.u_matrix),u_texsize:new t.aO(Fe,I.u_texsize),u_ratio:new t.aI(Fe,I.u_ratio),u_device_pixel_ratio:new t.aI(Fe,I.u_device_pixel_ratio),u_image:new t.aH(Fe,I.u_image),u_units_to_pixels:new t.aO(Fe,I.u_units_to_pixels),u_scale:new t.aN(Fe,I.u_scale),u_fade:new t.aI(Fe,I.u_fade)}),lineSDF:(Fe,I)=>({u_matrix:new t.aJ(Fe,I.u_matrix),u_ratio:new t.aI(Fe,I.u_ratio),u_device_pixel_ratio:new t.aI(Fe,I.u_device_pixel_ratio),u_units_to_pixels:new t.aO(Fe,I.u_units_to_pixels),u_patternscale_a:new t.aO(Fe,I.u_patternscale_a),u_patternscale_b:new t.aO(Fe,I.u_patternscale_b),u_sdfgamma:new t.aI(Fe,I.u_sdfgamma),u_image:new t.aH(Fe,I.u_image),u_tex_y_a:new t.aI(Fe,I.u_tex_y_a),u_tex_y_b:new t.aI(Fe,I.u_tex_y_b),u_mix:new t.aI(Fe,I.u_mix)}),raster:(Fe,I)=>({u_matrix:new t.aJ(Fe,I.u_matrix),u_tl_parent:new t.aO(Fe,I.u_tl_parent),u_scale_parent:new t.aI(Fe,I.u_scale_parent),u_buffer_scale:new t.aI(Fe,I.u_buffer_scale),u_fade_t:new t.aI(Fe,I.u_fade_t),u_opacity:new t.aI(Fe,I.u_opacity),u_image0:new t.aH(Fe,I.u_image0),u_image1:new t.aH(Fe,I.u_image1),u_brightness_low:new t.aI(Fe,I.u_brightness_low),u_brightness_high:new t.aI(Fe,I.u_brightness_high),u_saturation_factor:new t.aI(Fe,I.u_saturation_factor),u_contrast_factor:new t.aI(Fe,I.u_contrast_factor),u_spin_weights:new t.aN(Fe,I.u_spin_weights)}),symbolIcon:(Fe,I)=>({u_is_size_zoom_constant:new t.aH(Fe,I.u_is_size_zoom_constant),u_is_size_feature_constant:new t.aH(Fe,I.u_is_size_feature_constant),u_size_t:new t.aI(Fe,I.u_size_t),u_size:new t.aI(Fe,I.u_size),u_camera_to_center_distance:new t.aI(Fe,I.u_camera_to_center_distance),u_pitch:new t.aI(Fe,I.u_pitch),u_rotate_symbol:new t.aH(Fe,I.u_rotate_symbol),u_aspect_ratio:new t.aI(Fe,I.u_aspect_ratio),u_fade_change:new t.aI(Fe,I.u_fade_change),u_matrix:new t.aJ(Fe,I.u_matrix),u_label_plane_matrix:new t.aJ(Fe,I.u_label_plane_matrix),u_coord_matrix:new t.aJ(Fe,I.u_coord_matrix),u_is_text:new t.aH(Fe,I.u_is_text),u_pitch_with_map:new t.aH(Fe,I.u_pitch_with_map),u_is_along_line:new t.aH(Fe,I.u_is_along_line),u_is_variable_anchor:new t.aH(Fe,I.u_is_variable_anchor),u_texsize:new t.aO(Fe,I.u_texsize),u_texture:new t.aH(Fe,I.u_texture),u_translation:new t.aO(Fe,I.u_translation),u_pitched_scale:new t.aI(Fe,I.u_pitched_scale)}),symbolSDF:(Fe,I)=>({u_is_size_zoom_constant:new t.aH(Fe,I.u_is_size_zoom_constant),u_is_size_feature_constant:new t.aH(Fe,I.u_is_size_feature_constant),u_size_t:new t.aI(Fe,I.u_size_t),u_size:new t.aI(Fe,I.u_size),u_camera_to_center_distance:new t.aI(Fe,I.u_camera_to_center_distance),u_pitch:new t.aI(Fe,I.u_pitch),u_rotate_symbol:new t.aH(Fe,I.u_rotate_symbol),u_aspect_ratio:new t.aI(Fe,I.u_aspect_ratio),u_fade_change:new t.aI(Fe,I.u_fade_change),u_matrix:new t.aJ(Fe,I.u_matrix),u_label_plane_matrix:new t.aJ(Fe,I.u_label_plane_matrix),u_coord_matrix:new t.aJ(Fe,I.u_coord_matrix),u_is_text:new t.aH(Fe,I.u_is_text),u_pitch_with_map:new t.aH(Fe,I.u_pitch_with_map),u_is_along_line:new t.aH(Fe,I.u_is_along_line),u_is_variable_anchor:new t.aH(Fe,I.u_is_variable_anchor),u_texsize:new t.aO(Fe,I.u_texsize),u_texture:new t.aH(Fe,I.u_texture),u_gamma_scale:new t.aI(Fe,I.u_gamma_scale),u_device_pixel_ratio:new t.aI(Fe,I.u_device_pixel_ratio),u_is_halo:new t.aH(Fe,I.u_is_halo),u_translation:new t.aO(Fe,I.u_translation),u_pitched_scale:new t.aI(Fe,I.u_pitched_scale)}),symbolTextAndIcon:(Fe,I)=>({u_is_size_zoom_constant:new t.aH(Fe,I.u_is_size_zoom_constant),u_is_size_feature_constant:new t.aH(Fe,I.u_is_size_feature_constant),u_size_t:new t.aI(Fe,I.u_size_t),u_size:new t.aI(Fe,I.u_size),u_camera_to_center_distance:new t.aI(Fe,I.u_camera_to_center_distance),u_pitch:new t.aI(Fe,I.u_pitch),u_rotate_symbol:new t.aH(Fe,I.u_rotate_symbol),u_aspect_ratio:new t.aI(Fe,I.u_aspect_ratio),u_fade_change:new t.aI(Fe,I.u_fade_change),u_matrix:new t.aJ(Fe,I.u_matrix),u_label_plane_matrix:new t.aJ(Fe,I.u_label_plane_matrix),u_coord_matrix:new t.aJ(Fe,I.u_coord_matrix),u_is_text:new t.aH(Fe,I.u_is_text),u_pitch_with_map:new t.aH(Fe,I.u_pitch_with_map),u_is_along_line:new t.aH(Fe,I.u_is_along_line),u_is_variable_anchor:new t.aH(Fe,I.u_is_variable_anchor),u_texsize:new t.aO(Fe,I.u_texsize),u_texsize_icon:new t.aO(Fe,I.u_texsize_icon),u_texture:new t.aH(Fe,I.u_texture),u_texture_icon:new t.aH(Fe,I.u_texture_icon),u_gamma_scale:new t.aI(Fe,I.u_gamma_scale),u_device_pixel_ratio:new t.aI(Fe,I.u_device_pixel_ratio),u_is_halo:new t.aH(Fe,I.u_is_halo),u_translation:new t.aO(Fe,I.u_translation),u_pitched_scale:new t.aI(Fe,I.u_pitched_scale)}),background:(Fe,I)=>({u_matrix:new t.aJ(Fe,I.u_matrix),u_opacity:new t.aI(Fe,I.u_opacity),u_color:new t.aL(Fe,I.u_color)}),backgroundPattern:(Fe,I)=>({u_matrix:new t.aJ(Fe,I.u_matrix),u_opacity:new t.aI(Fe,I.u_opacity),u_image:new t.aH(Fe,I.u_image),u_pattern_tl_a:new t.aO(Fe,I.u_pattern_tl_a),u_pattern_br_a:new t.aO(Fe,I.u_pattern_br_a),u_pattern_tl_b:new t.aO(Fe,I.u_pattern_tl_b),u_pattern_br_b:new t.aO(Fe,I.u_pattern_br_b),u_texsize:new t.aO(Fe,I.u_texsize),u_mix:new t.aI(Fe,I.u_mix),u_pattern_size_a:new t.aO(Fe,I.u_pattern_size_a),u_pattern_size_b:new t.aO(Fe,I.u_pattern_size_b),u_scale_a:new t.aI(Fe,I.u_scale_a),u_scale_b:new t.aI(Fe,I.u_scale_b),u_pixel_coord_upper:new t.aO(Fe,I.u_pixel_coord_upper),u_pixel_coord_lower:new t.aO(Fe,I.u_pixel_coord_lower),u_tile_units_to_pixels:new t.aI(Fe,I.u_tile_units_to_pixels)}),terrain:(Fe,I)=>({u_matrix:new t.aJ(Fe,I.u_matrix),u_texture:new t.aH(Fe,I.u_texture),u_ele_delta:new t.aI(Fe,I.u_ele_delta),u_fog_matrix:new t.aJ(Fe,I.u_fog_matrix),u_fog_color:new t.aL(Fe,I.u_fog_color),u_fog_ground_blend:new t.aI(Fe,I.u_fog_ground_blend),u_fog_ground_blend_opacity:new t.aI(Fe,I.u_fog_ground_blend_opacity),u_horizon_color:new t.aL(Fe,I.u_horizon_color),u_horizon_fog_blend:new t.aI(Fe,I.u_horizon_fog_blend)}),terrainDepth:(Fe,I)=>({u_matrix:new t.aJ(Fe,I.u_matrix),u_ele_delta:new t.aI(Fe,I.u_ele_delta)}),terrainCoords:(Fe,I)=>({u_matrix:new t.aJ(Fe,I.u_matrix),u_texture:new t.aH(Fe,I.u_texture),u_terrain_coords_id:new t.aI(Fe,I.u_terrain_coords_id),u_ele_delta:new t.aI(Fe,I.u_ele_delta)}),sky:(Fe,I)=>({u_sky_color:new t.aL(Fe,I.u_sky_color),u_horizon_color:new t.aL(Fe,I.u_horizon_color),u_horizon:new t.aI(Fe,I.u_horizon),u_sky_horizon_blend:new t.aI(Fe,I.u_sky_horizon_blend)})};class Xo{constructor(I,ie,Te){this.context=I;let Me=I.gl;this.buffer=Me.createBuffer(),this.dynamicDraw=!!Te,this.context.unbindVAO(),I.bindElementBuffer.set(this.buffer),Me.bufferData(Me.ELEMENT_ARRAY_BUFFER,ie.arrayBuffer,this.dynamicDraw?Me.DYNAMIC_DRAW:Me.STATIC_DRAW),this.dynamicDraw||delete ie.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(I){let ie=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),ie.bufferSubData(ie.ELEMENT_ARRAY_BUFFER,0,I.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}let Gi={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class Pn{constructor(I,ie,Te,Me){this.length=ie.length,this.attributes=Te,this.itemSize=ie.bytesPerElement,this.dynamicDraw=Me,this.context=I;let ze=I.gl;this.buffer=ze.createBuffer(),I.bindVertexBuffer.set(this.buffer),ze.bufferData(ze.ARRAY_BUFFER,ie.arrayBuffer,this.dynamicDraw?ze.DYNAMIC_DRAW:ze.STATIC_DRAW),this.dynamicDraw||delete ie.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(I){if(I.length!==this.length)throw new Error(`Length of new data is ${I.length}, which doesn't match current length of ${this.length}`);let ie=this.context.gl;this.bind(),ie.bufferSubData(ie.ARRAY_BUFFER,0,I.arrayBuffer)}enableAttributes(I,ie){for(let Te=0;Te0){let yr=t.H();t.aQ(yr,bt.placementInvProjMatrix,Fe.transform.glCoordMatrix),t.aQ(yr,yr,bt.placementViewportMatrix),Ot.push({circleArray:lr,circleOffset:Tr,transform:Et.posMatrix,invTransform:yr,coord:Et}),$t+=lr.length/4,Tr=$t}Rt&&wt.draw(ze,ht.LINES,ss.disabled,ks.disabled,Fe.colorModeForRenderPass(),to.disabled,{u_matrix:Et.posMatrix,u_pixel_extrude_scale:[1/(Ar=Fe.transform).width,1/Ar.height]},Fe.style.map.terrain&&Fe.style.map.terrain.getTerrainData(Et),ie.id,Rt.layoutVertexBuffer,Rt.indexBuffer,Rt.segments,null,Fe.transform.zoom,null,null,Rt.collisionVertexBuffer)}var Ar;if(!Me||!Ot.length)return;let Kr=Fe.useProgram("collisionCircle"),na=new t.aR;na.resize(4*$t),na._trim();let Ve=0;for(let pt of Ot)for(let Et=0;Et=0&&(pt[bt.associatedIconIndex]={shiftedAnchor:An,angle:Yn})}else ur(bt.numGlyphs,$e)}if($t){ot.clear();let Et=Fe.icon.placedSymbolArray;for(let bt=0;btFe.style.map.terrain.getElevation(Aa,zt,_r):null,tr=ie.layout.get("text-rotation-alignment")==="map";Ae(ci,Aa.posMatrix,Fe,Me,eu,vu,pt,$t,tr,$e,Aa.toUnwrapped(),Ve.width,Ve.height,Tl,Tt)}let Vl=Aa.posMatrix,Gl=Me&&jr||uc,me=Et||Gl?jl:eu,De=Ru,et=on&&ie.paint.get(Me?"text-halo-width":"icon-halo-width").constantOr(1)!==0,dt;dt=on?ci.iconsInText?eo(An.kind,wo,bt,pt,Et,Gl,Fe,Vl,me,De,Tl,So,tl,ha):Gn(An.kind,wo,bt,pt,Et,Gl,Fe,Vl,me,De,Tl,Me,So,!0,ha):io(An.kind,wo,bt,pt,Et,Gl,Fe,Vl,me,De,Tl,Me,So,ha);let yt={program:Nn,buffers:Vi,uniformValues:dt,atlasTexture:Zo,atlasTextureIcon:Jo,atlasInterpolation:hs,atlasInterpolationIcon:ul,isSDF:on,hasHalo:et};if(lr&&ci.canOverlap){yr=!0;let Tt=Vi.segments.get();for(let tr of Tt)Qr.push({segments:new t.a0([tr]),sortKey:tr.sortKey,state:yt,terrainData:os})}else Qr.push({segments:Vi.segments,sortKey:0,state:yt,terrainData:os})}yr&&Qr.sort((Aa,Da)=>Aa.sortKey-Da.sortKey);for(let Aa of Qr){let Da=Aa.state;if(Kr.activeTexture.set(na.TEXTURE0),Da.atlasTexture.bind(Da.atlasInterpolation,na.CLAMP_TO_EDGE),Da.atlasTextureIcon&&(Kr.activeTexture.set(na.TEXTURE1),Da.atlasTextureIcon&&Da.atlasTextureIcon.bind(Da.atlasInterpolationIcon,na.CLAMP_TO_EDGE)),Da.isSDF){let ci=Da.uniformValues;Da.hasHalo&&(ci.u_is_halo=1,Of(Da.buffers,Aa.segments,ie,Fe,Da.program,kr,Tr,Ar,ci,Aa.terrainData)),ci.u_is_halo=0}Of(Da.buffers,Aa.segments,ie,Fe,Da.program,kr,Tr,Ar,Da.uniformValues,Aa.terrainData)}}function Of(Fe,I,ie,Te,Me,ze,ht,wt,Ot,$t){let Tr=Te.context;Me.draw(Tr,Tr.gl.TRIANGLES,ze,ht,wt,to.disabled,Ot,$t,ie.id,Fe.layoutVertexBuffer,Fe.indexBuffer,I,ie.paint,Te.transform.zoom,Fe.programConfigurations.get(ie.id),Fe.dynamicLayoutVertexBuffer,Fe.opacityVertexBuffer)}function of(Fe,I,ie,Te){let Me=Fe.context,ze=Me.gl,ht=ks.disabled,wt=new fl([ze.ONE,ze.ONE],t.aM.transparent,[!0,!0,!0,!0]),Ot=I.getBucket(ie);if(!Ot)return;let $t=Te.key,Tr=ie.heatmapFbos.get($t);Tr||(Tr=Bf(Me,I.tileSize,I.tileSize),ie.heatmapFbos.set($t,Tr)),Me.bindFramebuffer.set(Tr.framebuffer),Me.viewport.set([0,0,I.tileSize,I.tileSize]),Me.clear({color:t.aM.transparent});let Ar=Ot.programConfigurations.get(ie.id),Kr=Fe.useProgram("heatmap",Ar),na=Fe.style.map.terrain.getTerrainData(Te);Kr.draw(Me,ze.TRIANGLES,ss.disabled,ht,wt,to.disabled,ao(Te.posMatrix,I,Fe.transform.zoom,ie.paint.get("heatmap-intensity")),na,ie.id,Ot.layoutVertexBuffer,Ot.indexBuffer,Ot.segments,ie.paint,Fe.transform.zoom,Ar)}function jc(Fe,I,ie){let Te=Fe.context,Me=Te.gl;Te.setColorMode(Fe.colorModeForRenderPass());let ze=Nf(Te,I),ht=ie.key,wt=I.heatmapFbos.get(ht);wt&&(Te.activeTexture.set(Me.TEXTURE0),Me.bindTexture(Me.TEXTURE_2D,wt.colorAttachment.get()),Te.activeTexture.set(Me.TEXTURE1),ze.bind(Me.LINEAR,Me.CLAMP_TO_EDGE),Fe.useProgram("heatmapTexture").draw(Te,Me.TRIANGLES,ss.disabled,ks.disabled,Fe.colorModeForRenderPass(),to.disabled,xo(Fe,I,0,1),null,I.id,Fe.rasterBoundsBuffer,Fe.quadTriangleIndexBuffer,Fe.rasterBoundsSegments,I.paint,Fe.transform.zoom),wt.destroy(),I.heatmapFbos.delete(ht))}function Bf(Fe,I,ie){var Te,Me;let ze=Fe.gl,ht=ze.createTexture();ze.bindTexture(ze.TEXTURE_2D,ht),ze.texParameteri(ze.TEXTURE_2D,ze.TEXTURE_WRAP_S,ze.CLAMP_TO_EDGE),ze.texParameteri(ze.TEXTURE_2D,ze.TEXTURE_WRAP_T,ze.CLAMP_TO_EDGE),ze.texParameteri(ze.TEXTURE_2D,ze.TEXTURE_MIN_FILTER,ze.LINEAR),ze.texParameteri(ze.TEXTURE_2D,ze.TEXTURE_MAG_FILTER,ze.LINEAR);let wt=(Te=Fe.HALF_FLOAT)!==null&&Te!==void 0?Te:ze.UNSIGNED_BYTE,Ot=(Me=Fe.RGBA16F)!==null&&Me!==void 0?Me:ze.RGBA;ze.texImage2D(ze.TEXTURE_2D,0,Ot,I,ie,0,ze.RGBA,wt,null);let $t=Fe.createFramebuffer(I,ie,!1,!1);return $t.colorAttachment.set(ht),$t}function Nf(Fe,I){return I.colorRampTexture||(I.colorRampTexture=new u(Fe,I.colorRamp,Fe.gl.RGBA)),I.colorRampTexture}function Gu(Fe,I,ie,Te,Me){if(!ie||!Te||!Te.imageAtlas)return;let ze=Te.imageAtlas.patternPositions,ht=ze[ie.to.toString()],wt=ze[ie.from.toString()];if(!ht&&wt&&(ht=wt),!wt&&ht&&(wt=ht),!ht||!wt){let Ot=Me.getPaintProperty(I);ht=ze[Ot],wt=ze[Ot]}ht&&wt&&Fe.setConstantPatternPositions(ht,wt)}function Ef(Fe,I,ie,Te,Me,ze,ht){let wt=Fe.context.gl,Ot="fill-pattern",$t=ie.paint.get(Ot),Tr=$t&&$t.constantOr(1),Ar=ie.getCrossfadeParameters(),Kr,na,Ve,$e,ot;ht?(na=Tr&&!ie.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",Kr=wt.LINES):(na=Tr?"fillPattern":"fill",Kr=wt.TRIANGLES);let pt=$t.constantOr(null);for(let Et of Te){let bt=I.getTile(Et);if(Tr&&!bt.patternsLoaded())continue;let Rt=bt.getBucket(ie);if(!Rt)continue;let lr=Rt.programConfigurations.get(ie.id),yr=Fe.useProgram(na,lr),kr=Fe.style.map.terrain&&Fe.style.map.terrain.getTerrainData(Et);Tr&&(Fe.context.activeTexture.set(wt.TEXTURE0),bt.imageAtlasTexture.bind(wt.LINEAR,wt.CLAMP_TO_EDGE),lr.updatePaintBuffers(Ar)),Gu(lr,Ot,pt,bt,ie);let jr=kr?Et:null,Qr=Fe.translatePosMatrix(jr?jr.posMatrix:Et.posMatrix,bt,ie.paint.get("fill-translate"),ie.paint.get("fill-translate-anchor"));if(ht){$e=Rt.indexBuffer2,ot=Rt.segments2;let ha=[wt.drawingBufferWidth,wt.drawingBufferHeight];Ve=na==="fillOutlinePattern"&&Tr?Ki(Qr,Fe,Ar,bt,ha):ki(Qr,ha)}else $e=Rt.indexBuffer,ot=Rt.segments,Ve=Tr?Ai(Qr,Fe,Ar,bt):_a(Qr);yr.draw(Fe.context,Kr,Me,Fe.stencilModeForClipping(Et),ze,to.disabled,Ve,kr,ie.id,Rt.layoutVertexBuffer,$e,ot,ie.paint,Fe.transform.zoom,lr)}}function oc(Fe,I,ie,Te,Me,ze,ht){let wt=Fe.context,Ot=wt.gl,$t="fill-extrusion-pattern",Tr=ie.paint.get($t),Ar=Tr.constantOr(1),Kr=ie.getCrossfadeParameters(),na=ie.paint.get("fill-extrusion-opacity"),Ve=Tr.constantOr(null);for(let $e of Te){let ot=I.getTile($e),pt=ot.getBucket(ie);if(!pt)continue;let Et=Fe.style.map.terrain&&Fe.style.map.terrain.getTerrainData($e),bt=pt.programConfigurations.get(ie.id),Rt=Fe.useProgram(Ar?"fillExtrusionPattern":"fillExtrusion",bt);Ar&&(Fe.context.activeTexture.set(Ot.TEXTURE0),ot.imageAtlasTexture.bind(Ot.LINEAR,Ot.CLAMP_TO_EDGE),bt.updatePaintBuffers(Kr)),Gu(bt,$t,Ve,ot,ie);let lr=Fe.translatePosMatrix($e.posMatrix,ot,ie.paint.get("fill-extrusion-translate"),ie.paint.get("fill-extrusion-translate-anchor")),yr=ie.paint.get("fill-extrusion-vertical-gradient"),kr=Ar?la(lr,Fe,yr,na,$e,Kr,ot):ma(lr,Fe,yr,na);Rt.draw(wt,wt.gl.TRIANGLES,Me,ze,ht,to.backCCW,kr,Et,ie.id,pt.layoutVertexBuffer,pt.indexBuffer,pt.segments,ie.paint,Fe.transform.zoom,bt,Fe.style.map.terrain&&pt.centroidVertexBuffer)}}function Xc(Fe,I,ie,Te,Me,ze,ht){let wt=Fe.context,Ot=wt.gl,$t=ie.fbo;if(!$t)return;let Tr=Fe.useProgram("hillshade"),Ar=Fe.style.map.terrain&&Fe.style.map.terrain.getTerrainData(I);wt.activeTexture.set(Ot.TEXTURE0),Ot.bindTexture(Ot.TEXTURE_2D,$t.colorAttachment.get()),Tr.draw(wt,Ot.TRIANGLES,Me,ze,ht,to.disabled,((Kr,na,Ve,$e)=>{let ot=Ve.paint.get("hillshade-shadow-color"),pt=Ve.paint.get("hillshade-highlight-color"),Et=Ve.paint.get("hillshade-accent-color"),bt=Ve.paint.get("hillshade-illumination-direction")*(Math.PI/180);Ve.paint.get("hillshade-illumination-anchor")==="viewport"&&(bt-=Kr.transform.angle);let Rt=!Kr.options.moving;return{u_matrix:$e?$e.posMatrix:Kr.transform.calculatePosMatrix(na.tileID.toUnwrapped(),Rt),u_image:0,u_latrange:Co(0,na.tileID),u_light:[Ve.paint.get("hillshade-exaggeration"),bt],u_shadow:ot,u_highlight:pt,u_accent:Et}})(Fe,ie,Te,Ar?I:null),Ar,Te.id,Fe.rasterBoundsBuffer,Fe.quadTriangleIndexBuffer,Fe.rasterBoundsSegments)}function Ql(Fe,I,ie,Te,Me,ze){let ht=Fe.context,wt=ht.gl,Ot=I.dem;if(Ot&&Ot.data){let $t=Ot.dim,Tr=Ot.stride,Ar=Ot.getPixels();if(ht.activeTexture.set(wt.TEXTURE1),ht.pixelStoreUnpackPremultiplyAlpha.set(!1),I.demTexture=I.demTexture||Fe.getTileTexture(Tr),I.demTexture){let na=I.demTexture;na.update(Ar,{premultiply:!1}),na.bind(wt.NEAREST,wt.CLAMP_TO_EDGE)}else I.demTexture=new u(ht,Ar,wt.RGBA,{premultiply:!1}),I.demTexture.bind(wt.NEAREST,wt.CLAMP_TO_EDGE);ht.activeTexture.set(wt.TEXTURE0);let Kr=I.fbo;if(!Kr){let na=new u(ht,{width:$t,height:$t,data:null},wt.RGBA);na.bind(wt.LINEAR,wt.CLAMP_TO_EDGE),Kr=I.fbo=ht.createFramebuffer($t,$t,!0,!1),Kr.colorAttachment.set(na.texture)}ht.bindFramebuffer.set(Kr.framebuffer),ht.viewport.set([0,0,$t,$t]),Fe.useProgram("hillshadePrepare").draw(ht,wt.TRIANGLES,Te,Me,ze,to.disabled,((na,Ve)=>{let $e=Ve.stride,ot=t.H();return t.aP(ot,0,t.X,-t.X,0,0,1),t.J(ot,ot,[0,-t.X,0]),{u_matrix:ot,u_image:1,u_dimension:[$e,$e],u_zoom:na.overscaledZ,u_unpack:Ve.getUnpackVector()}})(I.tileID,Ot),null,ie.id,Fe.rasterBoundsBuffer,Fe.quadTriangleIndexBuffer,Fe.rasterBoundsSegments),I.needsHillshadePrepare=!1}}function qc(Fe,I,ie,Te,Me,ze){let ht=Te.paint.get("raster-fade-duration");if(!ze&&ht>0){let wt=n.now(),Ot=(wt-Fe.timeAdded)/ht,$t=I?(wt-I.timeAdded)/ht:-1,Tr=ie.getSource(),Ar=Me.coveringZoomLevel({tileSize:Tr.tileSize,roundZoom:Tr.roundZoom}),Kr=!I||Math.abs(I.tileID.overscaledZ-Ar)>Math.abs(Fe.tileID.overscaledZ-Ar),na=Kr&&Fe.refreshedUponExpiration?1:t.ac(Kr?Ot:1-$t,0,1);return Fe.refreshedUponExpiration&&Ot>=1&&(Fe.refreshedUponExpiration=!1),I?{opacity:1,mix:1-na}:{opacity:na,mix:0}}return{opacity:1,mix:0}}let Sc=new t.aM(1,0,0,1),Ys=new t.aM(0,1,0,1),kf=new t.aM(0,0,1,1),fh=new t.aM(1,0,1,1),Uf=new t.aM(0,1,1,1);function Zc(Fe,I,ie,Te){Cu(Fe,0,I+ie/2,Fe.transform.width,ie,Te)}function $f(Fe,I,ie,Te){Cu(Fe,I-ie/2,0,ie,Fe.transform.height,Te)}function Cu(Fe,I,ie,Te,Me,ze){let ht=Fe.context,wt=ht.gl;wt.enable(wt.SCISSOR_TEST),wt.scissor(I*Fe.pixelRatio,ie*Fe.pixelRatio,Te*Fe.pixelRatio,Me*Fe.pixelRatio),ht.clear({color:ze}),wt.disable(wt.SCISSOR_TEST)}function jf(Fe,I,ie){let Te=Fe.context,Me=Te.gl,ze=ie.posMatrix,ht=Fe.useProgram("debug"),wt=ss.disabled,Ot=ks.disabled,$t=Fe.colorModeForRenderPass(),Tr="$debug",Ar=Fe.style.map.terrain&&Fe.style.map.terrain.getTerrainData(ie);Te.activeTexture.set(Me.TEXTURE0);let Kr=I.getTileByID(ie.key).latestRawTileData,na=Math.floor((Kr&&Kr.byteLength||0)/1024),Ve=I.getTile(ie).tileSize,$e=512/Math.min(Ve,512)*(ie.overscaledZ/Fe.transform.zoom)*.5,ot=ie.canonical.toString();ie.overscaledZ!==ie.canonical.z&&(ot+=` => ${ie.overscaledZ}`),function(pt,Et){pt.initDebugOverlayCanvas();let bt=pt.debugOverlayCanvas,Rt=pt.context.gl,lr=pt.debugOverlayCanvas.getContext("2d");lr.clearRect(0,0,bt.width,bt.height),lr.shadowColor="white",lr.shadowBlur=2,lr.lineWidth=1.5,lr.strokeStyle="white",lr.textBaseline="top",lr.font="bold 36px Open Sans, sans-serif",lr.fillText(Et,5,5),lr.strokeText(Et,5,5),pt.debugOverlayTexture.update(bt),pt.debugOverlayTexture.bind(Rt.LINEAR,Rt.CLAMP_TO_EDGE)}(Fe,`${ot} ${na}kB`),ht.draw(Te,Me.TRIANGLES,wt,Ot,fl.alphaBlended,to.disabled,kn(ze,t.aM.transparent,$e),null,Tr,Fe.debugBuffer,Fe.quadTriangleIndexBuffer,Fe.debugSegments),ht.draw(Te,Me.LINE_STRIP,wt,Ot,$t,to.disabled,kn(ze,t.aM.red),Ar,Tr,Fe.debugBuffer,Fe.tileBorderIndexBuffer,Fe.debugSegments)}function yl(Fe,I,ie){let Te=Fe.context,Me=Te.gl,ze=Fe.colorModeForRenderPass(),ht=new ss(Me.LEQUAL,ss.ReadWrite,Fe.depthRangeFor3D),wt=Fe.useProgram("terrain"),Ot=I.getTerrainMesh();Te.bindFramebuffer.set(null),Te.viewport.set([0,0,Fe.width,Fe.height]);for(let $t of ie){let Tr=Fe.renderToTexture.getTexture($t),Ar=I.getTerrainData($t.tileID);Te.activeTexture.set(Me.TEXTURE0),Me.bindTexture(Me.TEXTURE_2D,Tr.texture);let Kr=Fe.transform.calculatePosMatrix($t.tileID.toUnwrapped()),na=I.getMeshFrameDelta(Fe.transform.zoom),Ve=Fe.transform.calculateFogMatrix($t.tileID.toUnwrapped()),$e=vr(Kr,na,Ve,Fe.style.sky,Fe.transform.pitch);wt.draw(Te,Me.TRIANGLES,ht,ks.disabled,ze,to.backCCW,$e,Ar,"terrain",Ot.vertexBuffer,Ot.indexBuffer,Ot.segments)}}class Lu{constructor(I,ie,Te){this.vertexBuffer=I,this.indexBuffer=ie,this.segments=Te}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}class Mc{constructor(I,ie){this.context=new xh(I),this.transform=ie,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:t.an(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=kt.maxUnderzooming+kt.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new Br}resize(I,ie,Te){if(this.width=Math.floor(I*Te),this.height=Math.floor(ie*Te),this.pixelRatio=Te,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(let Me of this.style._order)this.style._layers[Me].resize()}setup(){let I=this.context,ie=new t.aX;ie.emplaceBack(0,0),ie.emplaceBack(t.X,0),ie.emplaceBack(0,t.X),ie.emplaceBack(t.X,t.X),this.tileExtentBuffer=I.createVertexBuffer(ie,Ur.members),this.tileExtentSegments=t.a0.simpleSegment(0,0,4,2);let Te=new t.aX;Te.emplaceBack(0,0),Te.emplaceBack(t.X,0),Te.emplaceBack(0,t.X),Te.emplaceBack(t.X,t.X),this.debugBuffer=I.createVertexBuffer(Te,Ur.members),this.debugSegments=t.a0.simpleSegment(0,0,4,5);let Me=new t.$;Me.emplaceBack(0,0,0,0),Me.emplaceBack(t.X,0,t.X,0),Me.emplaceBack(0,t.X,0,t.X),Me.emplaceBack(t.X,t.X,t.X,t.X),this.rasterBoundsBuffer=I.createVertexBuffer(Me,We.members),this.rasterBoundsSegments=t.a0.simpleSegment(0,0,4,2);let ze=new t.aX;ze.emplaceBack(0,0),ze.emplaceBack(1,0),ze.emplaceBack(0,1),ze.emplaceBack(1,1),this.viewportBuffer=I.createVertexBuffer(ze,Ur.members),this.viewportSegments=t.a0.simpleSegment(0,0,4,2);let ht=new t.aZ;ht.emplaceBack(0),ht.emplaceBack(1),ht.emplaceBack(3),ht.emplaceBack(2),ht.emplaceBack(0),this.tileBorderIndexBuffer=I.createIndexBuffer(ht);let wt=new t.aY;wt.emplaceBack(0,1,2),wt.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=I.createIndexBuffer(wt);let Ot=this.context.gl;this.stencilClearMode=new ks({func:Ot.ALWAYS,mask:0},0,255,Ot.ZERO,Ot.ZERO,Ot.ZERO)}clearStencil(){let I=this.context,ie=I.gl;this.nextStencilID=1,this.currentStencilSource=void 0;let Te=t.H();t.aP(Te,0,this.width,this.height,0,0,1),t.K(Te,Te,[ie.drawingBufferWidth,ie.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(I,ie.TRIANGLES,ss.disabled,this.stencilClearMode,fl.disabled,to.disabled,Bn(Te),null,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(I,ie){if(this.currentStencilSource===I.source||!I.isTileClipped()||!ie||!ie.length)return;this.currentStencilSource=I.source;let Te=this.context,Me=Te.gl;this.nextStencilID+ie.length>256&&this.clearStencil(),Te.setColorMode(fl.disabled),Te.setDepthMode(ss.disabled);let ze=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(let ht of ie){let wt=this._tileClippingMaskIDs[ht.key]=this.nextStencilID++,Ot=this.style.map.terrain&&this.style.map.terrain.getTerrainData(ht);ze.draw(Te,Me.TRIANGLES,ss.disabled,new ks({func:Me.ALWAYS,mask:0},wt,255,Me.KEEP,Me.KEEP,Me.REPLACE),fl.disabled,to.disabled,Bn(ht.posMatrix),Ot,"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();let I=this.nextStencilID++,ie=this.context.gl;return new ks({func:ie.NOTEQUAL,mask:255},I,255,ie.KEEP,ie.KEEP,ie.REPLACE)}stencilModeForClipping(I){let ie=this.context.gl;return new ks({func:ie.EQUAL,mask:255},this._tileClippingMaskIDs[I.key],0,ie.KEEP,ie.KEEP,ie.REPLACE)}stencilConfigForOverlap(I){let ie=this.context.gl,Te=I.sort((ht,wt)=>wt.overscaledZ-ht.overscaledZ),Me=Te[Te.length-1].overscaledZ,ze=Te[0].overscaledZ-Me+1;if(ze>1){this.currentStencilSource=void 0,this.nextStencilID+ze>256&&this.clearStencil();let ht={};for(let wt=0;wt({u_sky_color:pt.properties.get("sky-color"),u_horizon_color:pt.properties.get("horizon-color"),u_horizon:(Et.height/2+Et.getHorizon())*bt,u_sky_horizon_blend:pt.properties.get("sky-horizon-blend")*Et.height/2*bt}))($t,Ot.style.map.transform,Ot.pixelRatio),na=new ss(Ar.LEQUAL,ss.ReadWrite,[0,1]),Ve=ks.disabled,$e=Ot.colorModeForRenderPass(),ot=Ot.useProgram("sky");if(!$t.mesh){let pt=new t.aX;pt.emplaceBack(-1,-1),pt.emplaceBack(1,-1),pt.emplaceBack(1,1),pt.emplaceBack(-1,1);let Et=new t.aY;Et.emplaceBack(0,1,2),Et.emplaceBack(0,2,3),$t.mesh=new Lu(Tr.createVertexBuffer(pt,Ur.members),Tr.createIndexBuffer(Et),t.a0.simpleSegment(0,0,pt.length,Et.length))}ot.draw(Tr,Ar.TRIANGLES,na,Ve,$e,to.disabled,Kr,void 0,"sky",$t.mesh.vertexBuffer,$t.mesh.indexBuffer,$t.mesh.segments)}(this,this.style.sky),this._showOverdrawInspector=ie.showOverdrawInspector,this.depthRangeFor3D=[0,1-(I._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass="opaque",this.currentLayer=Te.length-1;this.currentLayer>=0;this.currentLayer--){let Ot=this.style._layers[Te[this.currentLayer]],$t=Me[Ot.source],Tr=ze[Ot.source];this._renderTileClippingMasks(Ot,Tr),this.renderLayer(this,$t,Ot,Tr)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayerot.source&&!ot.isHidden(Tr)?[$t.sourceCaches[ot.source]]:[]),na=Kr.filter(ot=>ot.getSource().type==="vector"),Ve=Kr.filter(ot=>ot.getSource().type!=="vector"),$e=ot=>{(!Ar||Ar.getSource().maxzoom$e(ot)),Ar||Ve.forEach(ot=>$e(ot)),Ar}(this.style,this.transform.zoom);Ot&&function($t,Tr,Ar){for(let Kr=0;Kr0),Me&&(t.b0(ie,Te),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,function(ze,ht){let wt=ze.context,Ot=wt.gl,$t=fl.unblended,Tr=new ss(Ot.LEQUAL,ss.ReadWrite,[0,1]),Ar=ht.getTerrainMesh(),Kr=ht.sourceCache.getRenderableTiles(),na=ze.useProgram("terrainDepth");wt.bindFramebuffer.set(ht.getFramebuffer("depth").framebuffer),wt.viewport.set([0,0,ze.width/devicePixelRatio,ze.height/devicePixelRatio]),wt.clear({color:t.aM.transparent,depth:1});for(let Ve of Kr){let $e=ht.getTerrainData(Ve.tileID),ot={u_matrix:ze.transform.calculatePosMatrix(Ve.tileID.toUnwrapped()),u_ele_delta:ht.getMeshFrameDelta(ze.transform.zoom)};na.draw(wt,Ot.TRIANGLES,Tr,ks.disabled,$t,to.backCCW,ot,$e,"terrain",Ar.vertexBuffer,Ar.indexBuffer,Ar.segments)}wt.bindFramebuffer.set(null),wt.viewport.set([0,0,ze.width,ze.height])}(this,this.style.map.terrain),function(ze,ht){let wt=ze.context,Ot=wt.gl,$t=fl.unblended,Tr=new ss(Ot.LEQUAL,ss.ReadWrite,[0,1]),Ar=ht.getTerrainMesh(),Kr=ht.getCoordsTexture(),na=ht.sourceCache.getRenderableTiles(),Ve=ze.useProgram("terrainCoords");wt.bindFramebuffer.set(ht.getFramebuffer("coords").framebuffer),wt.viewport.set([0,0,ze.width/devicePixelRatio,ze.height/devicePixelRatio]),wt.clear({color:t.aM.transparent,depth:1}),ht.coordsIndex=[];for(let $e of na){let ot=ht.getTerrainData($e.tileID);wt.activeTexture.set(Ot.TEXTURE0),Ot.bindTexture(Ot.TEXTURE_2D,Kr.texture);let pt={u_matrix:ze.transform.calculatePosMatrix($e.tileID.toUnwrapped()),u_terrain_coords_id:(255-ht.coordsIndex.length)/255,u_texture:0,u_ele_delta:ht.getMeshFrameDelta(ze.transform.zoom)};Ve.draw(wt,Ot.TRIANGLES,Tr,ks.disabled,$t,to.backCCW,pt,ot,"terrain",Ar.vertexBuffer,Ar.indexBuffer,Ar.segments),ht.coordsIndex.push($e.tileID.key)}wt.bindFramebuffer.set(null),wt.viewport.set([0,0,ze.width,ze.height])}(this,this.style.map.terrain))}renderLayer(I,ie,Te,Me){if(!Te.isHidden(this.transform.zoom)&&(Te.type==="background"||Te.type==="custom"||(Me||[]).length))switch(this.id=Te.id,Te.type){case"symbol":(function(ze,ht,wt,Ot,$t){if(ze.renderPass!=="translucent")return;let Tr=ks.disabled,Ar=ze.colorModeForRenderPass();(wt._unevaluatedLayout.hasValue("text-variable-anchor")||wt._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function(Kr,na,Ve,$e,ot,pt,Et,bt,Rt){let lr=na.transform,yr=pi(),kr=ot==="map",jr=pt==="map";for(let Qr of Kr){let ha=$e.getTile(Qr),Aa=ha.getBucket(Ve);if(!Aa||!Aa.text||!Aa.text.segments.get().length)continue;let Da=t.ag(Aa.textSizeData,lr.zoom),ci=Oa(ha,1,na.transform.zoom),Vi=Er(Qr.posMatrix,jr,kr,na.transform,ci),ji=Ve.layout.get("icon-text-fit")!=="none"&&Aa.hasIconData();if(Da){let on=Math.pow(2,lr.zoom-ha.tileID.overscaledZ),An=na.style.map.terrain?(Nn,wo)=>na.style.map.terrain.getElevation(Qr,Nn,wo):null,Yn=yr.translatePosition(lr,ha,Et,bt);nf(Aa,kr,jr,Rt,lr,Vi,Qr.posMatrix,on,Da,ji,yr,Yn,Qr.toUnwrapped(),An)}}}(Ot,ze,wt,ht,wt.layout.get("text-rotation-alignment"),wt.layout.get("text-pitch-alignment"),wt.paint.get("text-translate"),wt.paint.get("text-translate-anchor"),$t),wt.paint.get("icon-opacity").constantOr(1)!==0&&Jf(ze,ht,wt,Ot,!1,wt.paint.get("icon-translate"),wt.paint.get("icon-translate-anchor"),wt.layout.get("icon-rotation-alignment"),wt.layout.get("icon-pitch-alignment"),wt.layout.get("icon-keep-upright"),Tr,Ar),wt.paint.get("text-opacity").constantOr(1)!==0&&Jf(ze,ht,wt,Ot,!0,wt.paint.get("text-translate"),wt.paint.get("text-translate-anchor"),wt.layout.get("text-rotation-alignment"),wt.layout.get("text-pitch-alignment"),wt.layout.get("text-keep-upright"),Tr,Ar),ht.map.showCollisionBoxes&&(Vu(ze,ht,wt,Ot,!0),Vu(ze,ht,wt,Ot,!1))})(I,ie,Te,Me,this.style.placement.variableOffsets);break;case"circle":(function(ze,ht,wt,Ot){if(ze.renderPass!=="translucent")return;let $t=wt.paint.get("circle-opacity"),Tr=wt.paint.get("circle-stroke-width"),Ar=wt.paint.get("circle-stroke-opacity"),Kr=!wt.layout.get("circle-sort-key").isConstant();if($t.constantOr(1)===0&&(Tr.constantOr(1)===0||Ar.constantOr(1)===0))return;let na=ze.context,Ve=na.gl,$e=ze.depthModeForSublayer(0,ss.ReadOnly),ot=ks.disabled,pt=ze.colorModeForRenderPass(),Et=[];for(let bt=0;btbt.sortKey-Rt.sortKey);for(let bt of Et){let{programConfiguration:Rt,program:lr,layoutVertexBuffer:yr,indexBuffer:kr,uniformValues:jr,terrainData:Qr}=bt.state;lr.draw(na,Ve.TRIANGLES,$e,ot,pt,to.disabled,jr,Qr,wt.id,yr,kr,bt.segments,wt.paint,ze.transform.zoom,Rt)}})(I,ie,Te,Me);break;case"heatmap":(function(ze,ht,wt,Ot){if(wt.paint.get("heatmap-opacity")===0)return;let $t=ze.context;if(ze.style.map.terrain){for(let Tr of Ot){let Ar=ht.getTile(Tr);ht.hasRenderableParent(Tr)||(ze.renderPass==="offscreen"?of(ze,Ar,wt,Tr):ze.renderPass==="translucent"&&jc(ze,wt,Tr))}$t.viewport.set([0,0,ze.width,ze.height])}else ze.renderPass==="offscreen"?function(Tr,Ar,Kr,na){let Ve=Tr.context,$e=Ve.gl,ot=ks.disabled,pt=new fl([$e.ONE,$e.ONE],t.aM.transparent,[!0,!0,!0,!0]);(function(Et,bt,Rt){let lr=Et.gl;Et.activeTexture.set(lr.TEXTURE1),Et.viewport.set([0,0,bt.width/4,bt.height/4]);let yr=Rt.heatmapFbos.get(t.aU);yr?(lr.bindTexture(lr.TEXTURE_2D,yr.colorAttachment.get()),Et.bindFramebuffer.set(yr.framebuffer)):(yr=Bf(Et,bt.width/4,bt.height/4),Rt.heatmapFbos.set(t.aU,yr))})(Ve,Tr,Kr),Ve.clear({color:t.aM.transparent});for(let Et=0;Et20&&Tr.texParameterf(Tr.TEXTURE_2D,$t.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,$t.extTextureFilterAnisotropicMax);let Aa=ze.style.map.terrain&&ze.style.map.terrain.getTerrainData(Et),Da=Aa?Et:null,ci=Da?Da.posMatrix:ze.transform.calculatePosMatrix(Et.toUnwrapped(),pt),Vi=_s(ci,Qr||[0,0],jr||1,kr,wt);Ar instanceof at?Kr.draw($t,Tr.TRIANGLES,bt,ks.disabled,na,to.disabled,Vi,Aa,wt.id,Ar.boundsBuffer,ze.quadTriangleIndexBuffer,Ar.boundsSegments):Kr.draw($t,Tr.TRIANGLES,bt,Ve[Et.overscaledZ],na,to.disabled,Vi,Aa,wt.id,ze.rasterBoundsBuffer,ze.quadTriangleIndexBuffer,ze.rasterBoundsSegments)}})(I,ie,Te,Me);break;case"background":(function(ze,ht,wt,Ot){let $t=wt.paint.get("background-color"),Tr=wt.paint.get("background-opacity");if(Tr===0)return;let Ar=ze.context,Kr=Ar.gl,na=ze.transform,Ve=na.tileSize,$e=wt.paint.get("background-pattern");if(ze.isPatternMissing($e))return;let ot=!$e&&$t.a===1&&Tr===1&&ze.opaquePassEnabledForLayer()?"opaque":"translucent";if(ze.renderPass!==ot)return;let pt=ks.disabled,Et=ze.depthModeForSublayer(0,ot==="opaque"?ss.ReadWrite:ss.ReadOnly),bt=ze.colorModeForRenderPass(),Rt=ze.useProgram($e?"backgroundPattern":"background"),lr=Ot||na.coveringTiles({tileSize:Ve,terrain:ze.style.map.terrain});$e&&(Ar.activeTexture.set(Kr.TEXTURE0),ze.imageManager.bind(ze.context));let yr=wt.getCrossfadeParameters();for(let kr of lr){let jr=Ot?kr.posMatrix:ze.transform.calculatePosMatrix(kr.toUnwrapped()),Qr=$e?gs(jr,Tr,ze,$e,{tileID:kr,tileSize:Ve},yr):ns(jr,Tr,$t),ha=ze.style.map.terrain&&ze.style.map.terrain.getTerrainData(kr);Rt.draw(Ar,Kr.TRIANGLES,Et,pt,bt,to.disabled,Qr,ha,wt.id,ze.tileExtentBuffer,ze.quadTriangleIndexBuffer,ze.tileExtentSegments)}})(I,0,Te,Me);break;case"custom":(function(ze,ht,wt){let Ot=ze.context,$t=wt.implementation;if(ze.renderPass==="offscreen"){let Tr=$t.prerender;Tr&&(ze.setCustomLayerDefaults(),Ot.setColorMode(ze.colorModeForRenderPass()),Tr.call($t,Ot.gl,ze.transform.customLayerMatrix()),Ot.setDirty(),ze.setBaseState())}else if(ze.renderPass==="translucent"){ze.setCustomLayerDefaults(),Ot.setColorMode(ze.colorModeForRenderPass()),Ot.setStencilMode(ks.disabled);let Tr=$t.renderingMode==="3d"?new ss(ze.context.gl.LEQUAL,ss.ReadWrite,ze.depthRangeFor3D):ze.depthModeForSublayer(0,ss.ReadOnly);Ot.setDepthMode(Tr),$t.render(Ot.gl,ze.transform.customLayerMatrix(),{farZ:ze.transform.farZ,nearZ:ze.transform.nearZ,fov:ze.transform._fov,modelViewProjectionMatrix:ze.transform.modelViewProjectionMatrix,projectionMatrix:ze.transform.projectionMatrix}),Ot.setDirty(),ze.setBaseState(),Ot.bindFramebuffer.set(null)}})(I,0,Te)}}translatePosMatrix(I,ie,Te,Me,ze){if(!Te[0]&&!Te[1])return I;let ht=ze?Me==="map"?this.transform.angle:0:Me==="viewport"?-this.transform.angle:0;if(ht){let $t=Math.sin(ht),Tr=Math.cos(ht);Te=[Te[0]*Tr-Te[1]*$t,Te[0]*$t+Te[1]*Tr]}let wt=[ze?Te[0]:Oa(ie,Te[0],this.transform.zoom),ze?Te[1]:Oa(ie,Te[1],this.transform.zoom),0],Ot=new Float32Array(16);return t.J(Ot,I,wt),Ot}saveTileTexture(I){let ie=this._tileTextures[I.size[0]];ie?ie.push(I):this._tileTextures[I.size[0]]=[I]}getTileTexture(I){let ie=this._tileTextures[I];return ie&&ie.length>0?ie.pop():null}isPatternMissing(I){if(!I)return!1;if(!I.from||!I.to)return!0;let ie=this.imageManager.getPattern(I.from.toString()),Te=this.imageManager.getPattern(I.to.toString());return!ie||!Te}useProgram(I,ie){this.cache=this.cache||{};let Te=I+(ie?ie.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"")+(this.style.map.terrain?"/terrain":"");return this.cache[Te]||(this.cache[Te]=new ba(this.context,Hr[I],ie,Ls[I],this._showOverdrawInspector,this.style.map.terrain)),this.cache[Te]}setCustomLayerDefaults(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()}setBaseState(){let I=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(I.FUNC_ADD)}initDebugOverlayCanvas(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new u(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}overLimit(){let{drawingBufferWidth:I,drawingBufferHeight:ie}=this.context.gl;return this.width!==I||this.height!==ie}}class ol{constructor(I,ie){this.points=I,this.planes=ie}static fromInvProjectionMatrix(I,ie,Te){let Me=Math.pow(2,Te),ze=[[-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(wt=>{let Ot=1/(wt=t.af([],wt,I))[3]/ie*Me;return t.b1(wt,wt,[Ot,Ot,1/wt[3],Ot])}),ht=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(wt=>{let Ot=function(Kr,na){var Ve=na[0],$e=na[1],ot=na[2],pt=Ve*Ve+$e*$e+ot*ot;return pt>0&&(pt=1/Math.sqrt(pt)),Kr[0]=na[0]*pt,Kr[1]=na[1]*pt,Kr[2]=na[2]*pt,Kr}([],function(Kr,na,Ve){var $e=na[0],ot=na[1],pt=na[2],Et=Ve[0],bt=Ve[1],Rt=Ve[2];return Kr[0]=ot*Rt-pt*bt,Kr[1]=pt*Et-$e*Rt,Kr[2]=$e*bt-ot*Et,Kr}([],M([],ze[wt[0]],ze[wt[1]]),M([],ze[wt[2]],ze[wt[1]]))),$t=-((Tr=Ot)[0]*(Ar=ze[wt[1]])[0]+Tr[1]*Ar[1]+Tr[2]*Ar[2]);var Tr,Ar;return Ot.concat($t)});return new ol(ze,ht)}}class vc{constructor(I,ie){this.min=I,this.max=ie,this.center=function(Te,Me,ze){return Te[0]=.5*Me[0],Te[1]=.5*Me[1],Te[2]=.5*Me[2],Te}([],function(Te,Me,ze){return Te[0]=Me[0]+ze[0],Te[1]=Me[1]+ze[1],Te[2]=Me[2]+ze[2],Te}([],this.min,this.max))}quadrant(I){let ie=[I%2==0,I<2],Te=w(this.min),Me=w(this.max);for(let ze=0;ze=0&&ht++;if(ht===0)return 0;ht!==ie.length&&(Te=!1)}if(Te)return 2;for(let Me=0;Me<3;Me++){let ze=Number.MAX_VALUE,ht=-Number.MAX_VALUE;for(let wt=0;wtthis.max[Me]-this.min[Me])return 0}return 1}}class yu{constructor(I=0,ie=0,Te=0,Me=0){if(isNaN(I)||I<0||isNaN(ie)||ie<0||isNaN(Te)||Te<0||isNaN(Me)||Me<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=I,this.bottom=ie,this.left=Te,this.right=Me}interpolate(I,ie,Te){return ie.top!=null&&I.top!=null&&(this.top=t.y.number(I.top,ie.top,Te)),ie.bottom!=null&&I.bottom!=null&&(this.bottom=t.y.number(I.bottom,ie.bottom,Te)),ie.left!=null&&I.left!=null&&(this.left=t.y.number(I.left,ie.left,Te)),ie.right!=null&&I.right!=null&&(this.right=t.y.number(I.right,ie.right,Te)),this}getCenter(I,ie){let Te=t.ac((this.left+I-this.right)/2,0,I),Me=t.ac((this.top+ie-this.bottom)/2,0,ie);return new t.P(Te,Me)}equals(I){return this.top===I.top&&this.bottom===I.bottom&&this.left===I.left&&this.right===I.right}clone(){return new yu(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}let Tu=85.051129;class El{constructor(I,ie,Te,Me,ze){this.tileSize=512,this._renderWorldCopies=ze===void 0||!!ze,this._minZoom=I||0,this._maxZoom=ie||22,this._minPitch=Te??0,this._maxPitch=Me??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new t.N(0,0),this._elevation=0,this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new yu,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={},this.minElevationForCurrentTile=0}clone(){let I=new El(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return I.apply(this),I}apply(I){this.tileSize=I.tileSize,this.latRange=I.latRange,this.lngRange=I.lngRange,this.width=I.width,this.height=I.height,this._center=I._center,this._elevation=I._elevation,this.minElevationForCurrentTile=I.minElevationForCurrentTile,this.zoom=I.zoom,this.angle=I.angle,this._fov=I._fov,this._pitch=I._pitch,this._unmodified=I._unmodified,this._edgeInsets=I._edgeInsets.clone(),this._calcMatrices()}get minZoom(){return this._minZoom}set minZoom(I){this._minZoom!==I&&(this._minZoom=I,this.zoom=Math.max(this.zoom,I))}get maxZoom(){return this._maxZoom}set maxZoom(I){this._maxZoom!==I&&(this._maxZoom=I,this.zoom=Math.min(this.zoom,I))}get minPitch(){return this._minPitch}set minPitch(I){this._minPitch!==I&&(this._minPitch=I,this.pitch=Math.max(this.pitch,I))}get maxPitch(){return this._maxPitch}set maxPitch(I){this._maxPitch!==I&&(this._maxPitch=I,this.pitch=Math.min(this.pitch,I))}get renderWorldCopies(){return this._renderWorldCopies}set renderWorldCopies(I){I===void 0?I=!0:I===null&&(I=!1),this._renderWorldCopies=I}get worldSize(){return this.tileSize*this.scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new t.P(this.width,this.height)}get bearing(){return-this.angle/Math.PI*180}set bearing(I){let ie=-t.b3(I,-180,180)*Math.PI/180;this.angle!==ie&&(this._unmodified=!1,this.angle=ie,this._calcMatrices(),this.rotationMatrix=function(){var Te=new t.A(4);return t.A!=Float32Array&&(Te[1]=0,Te[2]=0),Te[0]=1,Te[3]=1,Te}(),function(Te,Me,ze){var ht=Me[0],wt=Me[1],Ot=Me[2],$t=Me[3],Tr=Math.sin(ze),Ar=Math.cos(ze);Te[0]=ht*Ar+Ot*Tr,Te[1]=wt*Ar+$t*Tr,Te[2]=ht*-Tr+Ot*Ar,Te[3]=wt*-Tr+$t*Ar}(this.rotationMatrix,this.rotationMatrix,this.angle))}get pitch(){return this._pitch/Math.PI*180}set pitch(I){let ie=t.ac(I,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==ie&&(this._unmodified=!1,this._pitch=ie,this._calcMatrices())}get fov(){return this._fov/Math.PI*180}set fov(I){I=Math.max(.01,Math.min(60,I)),this._fov!==I&&(this._unmodified=!1,this._fov=I/180*Math.PI,this._calcMatrices())}get zoom(){return this._zoom}set zoom(I){let ie=Math.min(Math.max(I,this.minZoom),this.maxZoom);this._zoom!==ie&&(this._unmodified=!1,this._zoom=ie,this.tileZoom=Math.max(0,Math.floor(ie)),this.scale=this.zoomScale(ie),this._constrain(),this._calcMatrices())}get center(){return this._center}set center(I){I.lat===this._center.lat&&I.lng===this._center.lng||(this._unmodified=!1,this._center=I,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}set elevation(I){I!==this._elevation&&(this._elevation=I,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}set padding(I){this._edgeInsets.equals(I)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,I,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this.width,this.height)}isPaddingEqual(I){return this._edgeInsets.equals(I)}interpolatePadding(I,ie,Te){this._unmodified=!1,this._edgeInsets.interpolate(I,ie,Te),this._constrain(),this._calcMatrices()}coveringZoomLevel(I){let ie=(I.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/I.tileSize));return Math.max(0,ie)}getVisibleUnwrappedCoordinates(I){let ie=[new t.b4(0,I)];if(this._renderWorldCopies){let Te=this.pointCoordinate(new t.P(0,0)),Me=this.pointCoordinate(new t.P(this.width,0)),ze=this.pointCoordinate(new t.P(this.width,this.height)),ht=this.pointCoordinate(new t.P(0,this.height)),wt=Math.floor(Math.min(Te.x,Me.x,ze.x,ht.x)),Ot=Math.floor(Math.max(Te.x,Me.x,ze.x,ht.x)),$t=1;for(let Tr=wt-$t;Tr<=Ot+$t;Tr++)Tr!==0&&ie.push(new t.b4(Tr,I))}return ie}coveringTiles(I){var ie,Te;let Me=this.coveringZoomLevel(I),ze=Me;if(I.minzoom!==void 0&&MeI.maxzoom&&(Me=I.maxzoom);let ht=this.pointCoordinate(this.getCameraPoint()),wt=t.Z.fromLngLat(this.center),Ot=Math.pow(2,Me),$t=[Ot*ht.x,Ot*ht.y,0],Tr=[Ot*wt.x,Ot*wt.y,0],Ar=ol.fromInvProjectionMatrix(this.invModelViewProjectionMatrix,this.worldSize,Me),Kr=I.minzoom||0;!I.terrain&&this.pitch<=60&&this._edgeInsets.top<.1&&(Kr=Me);let na=I.terrain?2/Math.min(this.tileSize,I.tileSize)*this.tileSize:3,Ve=bt=>({aabb:new vc([bt*Ot,0,0],[(bt+1)*Ot,Ot,0]),zoom:0,x:0,y:0,wrap:bt,fullyVisible:!1}),$e=[],ot=[],pt=Me,Et=I.reparseOverscaled?ze:Me;if(this._renderWorldCopies)for(let bt=1;bt<=3;bt++)$e.push(Ve(-bt)),$e.push(Ve(bt));for($e.push(Ve(0));$e.length>0;){let bt=$e.pop(),Rt=bt.x,lr=bt.y,yr=bt.fullyVisible;if(!yr){let Aa=bt.aabb.intersects(Ar);if(Aa===0)continue;yr=Aa===2}let kr=I.terrain?$t:Tr,jr=bt.aabb.distanceX(kr),Qr=bt.aabb.distanceY(kr),ha=Math.max(Math.abs(jr),Math.abs(Qr));if(bt.zoom===pt||ha>na+(1<=Kr){let Aa=pt-bt.zoom,Da=$t[0]-.5-(Rt<>1),Vi=bt.zoom+1,ji=bt.aabb.quadrant(Aa);if(I.terrain){let on=new t.S(Vi,bt.wrap,Vi,Da,ci),An=I.terrain.getMinMaxElevation(on),Yn=(ie=An.minElevation)!==null&&ie!==void 0?ie:this.elevation,Nn=(Te=An.maxElevation)!==null&&Te!==void 0?Te:this.elevation;ji=new vc([ji.min[0],ji.min[1],Yn],[ji.max[0],ji.max[1],Nn])}$e.push({aabb:ji,zoom:Vi,x:Da,y:ci,wrap:bt.wrap,fullyVisible:yr})}}return ot.sort((bt,Rt)=>bt.distanceSq-Rt.distanceSq).map(bt=>bt.tileID)}resize(I,ie){this.width=I,this.height=ie,this.pixelsToGLUnits=[2/I,-2/ie],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(I){return Math.pow(2,I)}scaleZoom(I){return Math.log(I)/Math.LN2}project(I){let ie=t.ac(I.lat,-85.051129,Tu);return new t.P(t.O(I.lng)*this.worldSize,t.Q(ie)*this.worldSize)}unproject(I){return new t.Z(I.x/this.worldSize,I.y/this.worldSize).toLngLat()}get point(){return this.project(this.center)}getCameraPosition(){return{lngLat:this.pointLocation(this.getCameraPoint()),altitude:Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter+this.elevation}}recalculateZoom(I){let ie=this.elevation,Te=Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter,Me=this.pointLocation(this.centerPoint,I),ze=I.getElevationForLngLatZoom(Me,this.tileZoom);if(!(this.elevation-ze))return;let ht=Te+ie-ze,wt=Math.cos(this._pitch)*this.cameraToCenterDistance/ht/t.b5(1,Me.lat),Ot=this.scaleZoom(wt/this.tileSize);this._elevation=ze,this._center=Me,this.zoom=Ot}setLocationAtPoint(I,ie){let Te=this.pointCoordinate(ie),Me=this.pointCoordinate(this.centerPoint),ze=this.locationCoordinate(I),ht=new t.Z(ze.x-(Te.x-Me.x),ze.y-(Te.y-Me.y));this.center=this.coordinateLocation(ht),this._renderWorldCopies&&(this.center=this.center.wrap())}locationPoint(I,ie){return ie?this.coordinatePoint(this.locationCoordinate(I),ie.getElevationForLngLatZoom(I,this.tileZoom),this.pixelMatrix3D):this.coordinatePoint(this.locationCoordinate(I))}pointLocation(I,ie){return this.coordinateLocation(this.pointCoordinate(I,ie))}locationCoordinate(I){return t.Z.fromLngLat(I)}coordinateLocation(I){return I&&I.toLngLat()}pointCoordinate(I,ie){if(ie){let Kr=ie.pointCoordinate(I);if(Kr!=null)return Kr}let Te=[I.x,I.y,0,1],Me=[I.x,I.y,1,1];t.af(Te,Te,this.pixelMatrixInverse),t.af(Me,Me,this.pixelMatrixInverse);let ze=Te[3],ht=Me[3],wt=Te[1]/ze,Ot=Me[1]/ht,$t=Te[2]/ze,Tr=Me[2]/ht,Ar=$t===Tr?0:(0-$t)/(Tr-$t);return new t.Z(t.y.number(Te[0]/ze,Me[0]/ht,Ar)/this.worldSize,t.y.number(wt,Ot,Ar)/this.worldSize)}coordinatePoint(I,ie=0,Te=this.pixelMatrix){let Me=[I.x*this.worldSize,I.y*this.worldSize,ie,1];return t.af(Me,Me,Te),new t.P(Me[0]/Me[3],Me[1]/Me[3])}getBounds(){let I=Math.max(0,this.height/2-this.getHorizon());return new re().extend(this.pointLocation(new t.P(0,I))).extend(this.pointLocation(new t.P(this.width,I))).extend(this.pointLocation(new t.P(this.width,this.height))).extend(this.pointLocation(new t.P(0,this.height)))}getMaxBounds(){return this.latRange&&this.latRange.length===2&&this.lngRange&&this.lngRange.length===2?new re([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null}getHorizon(){return Math.tan(Math.PI/2-this._pitch)*this.cameraToCenterDistance*.85}setMaxBounds(I){I?(this.lngRange=[I.getWest(),I.getEast()],this.latRange=[I.getSouth(),I.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-85.051129,Tu])}calculateTileMatrix(I){let ie=I.canonical,Te=this.worldSize/this.zoomScale(ie.z),Me=ie.x+Math.pow(2,ie.z)*I.wrap,ze=t.an(new Float64Array(16));return t.J(ze,ze,[Me*Te,ie.y*Te,0]),t.K(ze,ze,[Te/t.X,Te/t.X,1]),ze}calculatePosMatrix(I,ie=!1){let Te=I.key,Me=ie?this._alignedPosMatrixCache:this._posMatrixCache;if(Me[Te])return Me[Te];let ze=this.calculateTileMatrix(I);return t.L(ze,ie?this.alignedModelViewProjectionMatrix:this.modelViewProjectionMatrix,ze),Me[Te]=new Float32Array(ze),Me[Te]}calculateFogMatrix(I){let ie=I.key,Te=this._fogMatrixCache;if(Te[ie])return Te[ie];let Me=this.calculateTileMatrix(I);return t.L(Me,this.fogMatrix,Me),Te[ie]=new Float32Array(Me),Te[ie]}customLayerMatrix(){return this.mercatorMatrix.slice()}getConstrained(I,ie){ie=t.ac(+ie,this.minZoom,this.maxZoom);let Te={center:new t.N(I.lng,I.lat),zoom:ie},Me=this.lngRange;if(!this._renderWorldCopies&&Me===null){let bt=179.9999999999;Me=[-bt,bt]}let ze=this.tileSize*this.zoomScale(Te.zoom),ht=0,wt=ze,Ot=0,$t=ze,Tr=0,Ar=0,{x:Kr,y:na}=this.size;if(this.latRange){let bt=this.latRange;ht=t.Q(bt[1])*ze,wt=t.Q(bt[0])*ze,wt-htwt&&(pt=wt-bt)}if(Me){let bt=(Ot+$t)/2,Rt=Ve;this._renderWorldCopies&&(Rt=t.b3(Ve,bt-ze/2,bt+ze/2));let lr=Kr/2;Rt-lr$t&&(ot=$t-lr)}if(ot!==void 0||pt!==void 0){let bt=new t.P(ot??Ve,pt??$e);Te.center=this.unproject.call({worldSize:ze},bt).wrap()}return Te}_constrain(){if(!this.center||!this.width||!this.height||this._constraining)return;this._constraining=!0;let I=this._unmodified,{center:ie,zoom:Te}=this.getConstrained(this.center,this.zoom);this.center=ie,this.zoom=Te,this._unmodified=I,this._constraining=!1}_calcMatrices(){if(!this.height)return;let I=this.centerOffset,ie=this.point.x,Te=this.point.y;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height,this._pixelPerMeter=t.b5(1,this.center.lat)*this.worldSize;let Me=t.an(new Float64Array(16));t.K(Me,Me,[this.width/2,-this.height/2,1]),t.J(Me,Me,[1,-1,0]),this.labelPlaneMatrix=Me,Me=t.an(new Float64Array(16)),t.K(Me,Me,[1,-1,1]),t.J(Me,Me,[-1,-1,0]),t.K(Me,Me,[2/this.width,2/this.height,1]),this.glCoordMatrix=Me;let ze=this.cameraToCenterDistance+this._elevation*this._pixelPerMeter/Math.cos(this._pitch),ht=Math.min(this.elevation,this.minElevationForCurrentTile),wt=ze-ht*this._pixelPerMeter/Math.cos(this._pitch),Ot=ht<0?wt:ze,$t=Math.PI/2+this._pitch,Tr=this._fov*(.5+I.y/this.height),Ar=Math.sin(Tr)*Ot/Math.sin(t.ac(Math.PI-$t-Tr,.01,Math.PI-.01)),Kr=this.getHorizon(),na=2*Math.atan(Kr/this.cameraToCenterDistance)*(.5+I.y/(2*Kr)),Ve=Math.sin(na)*Ot/Math.sin(t.ac(Math.PI-$t-na,.01,Math.PI-.01)),$e=Math.min(Ar,Ve);this.farZ=1.01*(Math.cos(Math.PI/2-this._pitch)*$e+Ot),this.nearZ=this.height/50,Me=new Float64Array(16),t.b6(Me,this._fov,this.width/this.height,this.nearZ,this.farZ),Me[8]=2*-I.x/this.width,Me[9]=2*I.y/this.height,this.projectionMatrix=t.ae(Me),t.K(Me,Me,[1,-1,1]),t.J(Me,Me,[0,0,-this.cameraToCenterDistance]),t.b7(Me,Me,this._pitch),t.ad(Me,Me,this.angle),t.J(Me,Me,[-ie,-Te,0]),this.mercatorMatrix=t.K([],Me,[this.worldSize,this.worldSize,this.worldSize]),t.K(Me,Me,[1,1,this._pixelPerMeter]),this.pixelMatrix=t.L(new Float64Array(16),this.labelPlaneMatrix,Me),t.J(Me,Me,[0,0,-this.elevation]),this.modelViewProjectionMatrix=Me,this.invModelViewProjectionMatrix=t.as([],Me),this.fogMatrix=new Float64Array(16),t.b6(this.fogMatrix,this._fov,this.width/this.height,ze,this.farZ),this.fogMatrix[8]=2*-I.x/this.width,this.fogMatrix[9]=2*I.y/this.height,t.K(this.fogMatrix,this.fogMatrix,[1,-1,1]),t.J(this.fogMatrix,this.fogMatrix,[0,0,-this.cameraToCenterDistance]),t.b7(this.fogMatrix,this.fogMatrix,this._pitch),t.ad(this.fogMatrix,this.fogMatrix,this.angle),t.J(this.fogMatrix,this.fogMatrix,[-ie,-Te,0]),t.K(this.fogMatrix,this.fogMatrix,[1,1,this._pixelPerMeter]),t.J(this.fogMatrix,this.fogMatrix,[0,0,-this.elevation]),this.pixelMatrix3D=t.L(new Float64Array(16),this.labelPlaneMatrix,Me);let ot=this.width%2/2,pt=this.height%2/2,Et=Math.cos(this.angle),bt=Math.sin(this.angle),Rt=ie-Math.round(ie)+Et*ot+bt*pt,lr=Te-Math.round(Te)+Et*pt+bt*ot,yr=new Float64Array(Me);if(t.J(yr,yr,[Rt>.5?Rt-1:Rt,lr>.5?lr-1:lr,0]),this.alignedModelViewProjectionMatrix=yr,Me=t.as(new Float64Array(16),this.pixelMatrix),!Me)throw new Error("failed to invert matrix");this.pixelMatrixInverse=Me,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={}}maxPitchScaleFactor(){if(!this.pixelMatrixInverse)return 1;let I=this.pointCoordinate(new t.P(0,0)),ie=[I.x*this.worldSize,I.y*this.worldSize,0,1];return t.af(ie,ie,this.pixelMatrix)[3]/this.cameraToCenterDistance}getCameraPoint(){let I=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new t.P(0,I))}getCameraQueryGeometry(I){let ie=this.getCameraPoint();if(I.length===1)return[I[0],ie];{let Te=ie.x,Me=ie.y,ze=ie.x,ht=ie.y;for(let wt of I)Te=Math.min(Te,wt.x),Me=Math.min(Me,wt.y),ze=Math.max(ze,wt.x),ht=Math.max(ht,wt.y);return[new t.P(Te,Me),new t.P(ze,Me),new t.P(ze,ht),new t.P(Te,ht),new t.P(Te,Me)]}}lngLatToCameraDepth(I,ie){let Te=this.locationCoordinate(I),Me=[Te.x*this.worldSize,Te.y*this.worldSize,ie,1];return t.af(Me,Me,this.modelViewProjectionMatrix),Me[2]/Me[3]}}function qf(Fe,I){let ie,Te=!1,Me=null,ze=null,ht=()=>{Me=null,Te&&(Fe.apply(ze,ie),Me=setTimeout(ht,I),Te=!1)};return(...wt)=>(Te=!0,ze=this,ie=wt,Me||ht(),Me)}class Qf{constructor(I){this._getCurrentHash=()=>{let ie=window.location.hash.replace("#","");if(this._hashName){let Te;return ie.split("&").map(Me=>Me.split("=")).forEach(Me=>{Me[0]===this._hashName&&(Te=Me)}),(Te&&Te[1]||"").split("/")}return ie.split("/")},this._onHashChange=()=>{let ie=this._getCurrentHash();if(ie.length>=3&&!ie.some(Te=>isNaN(Te))){let Te=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(ie[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+ie[2],+ie[1]],zoom:+ie[0],bearing:Te,pitch:+(ie[4]||0)}),!0}return!1},this._updateHashUnthrottled=()=>{let ie=window.location.href.replace(/(#.*)?$/,this.getHashString());window.history.replaceState(window.history.state,null,ie)},this._removeHash=()=>{let ie=this._getCurrentHash();if(ie.length===0)return;let Te=ie.join("/"),Me=Te;Me.split("&").length>0&&(Me=Me.split("&")[0]),this._hashName&&(Me=`${this._hashName}=${Te}`);let ze=window.location.hash.replace(Me,"");ze.startsWith("#&")?ze=ze.slice(0,1)+ze.slice(2):ze==="#"&&(ze="");let ht=window.location.href.replace(/(#.+)?$/,ze);ht=ht.replace("&&","&"),window.history.replaceState(window.history.state,null,ht)},this._updateHash=qf(this._updateHashUnthrottled,300),this._hashName=I&&encodeURIComponent(I)}addTo(I){return this._map=I,addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this}remove(){return removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),this._removeHash(),delete this._map,this}getHashString(I){let ie=this._map.getCenter(),Te=Math.round(100*this._map.getZoom())/100,Me=Math.ceil((Te*Math.LN2+Math.log(512/360/.5))/Math.LN10),ze=Math.pow(10,Me),ht=Math.round(ie.lng*ze)/ze,wt=Math.round(ie.lat*ze)/ze,Ot=this._map.getBearing(),$t=this._map.getPitch(),Tr="";if(Tr+=I?`/${ht}/${wt}/${Te}`:`${Te}/${wt}/${ht}`,(Ot||$t)&&(Tr+="/"+Math.round(10*Ot)/10),$t&&(Tr+=`/${Math.round($t)}`),this._hashName){let Ar=this._hashName,Kr=!1,na=window.location.hash.slice(1).split("&").map(Ve=>{let $e=Ve.split("=")[0];return $e===Ar?(Kr=!0,`${$e}=${Tr}`):Ve}).filter(Ve=>Ve);return Kr||na.push(`${Ar}=${Tr}`),`#${na.join("&")}`}return`#${Tr}`}}let Bu={linearity:.3,easing:t.b8(0,0,.3,1)},Ec=t.e({deceleration:2500,maxSpeed:1400},Bu),mc=t.e({deceleration:20,maxSpeed:1400},Bu),Lh=t.e({deceleration:1e3,maxSpeed:360},Bu),sf=t.e({deceleration:1e3,maxSpeed:90},Bu);class vf{constructor(I){this._map=I,this.clear()}clear(){this._inertiaBuffer=[]}record(I){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:n.now(),settings:I})}_drainInertiaBuffer(){let I=this._inertiaBuffer,ie=n.now();for(;I.length>0&&ie-I[0].time>160;)I.shift()}_onMoveEnd(I){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;let ie={zoom:0,bearing:0,pitch:0,pan:new t.P(0,0),pinchAround:void 0,around:void 0};for(let{settings:ze}of this._inertiaBuffer)ie.zoom+=ze.zoomDelta||0,ie.bearing+=ze.bearingDelta||0,ie.pitch+=ze.pitchDelta||0,ze.panDelta&&ie.pan._add(ze.panDelta),ze.around&&(ie.around=ze.around),ze.pinchAround&&(ie.pinchAround=ze.pinchAround);let Te=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,Me={};if(ie.pan.mag()){let ze=lf(ie.pan.mag(),Te,t.e({},Ec,I||{}));Me.offset=ie.pan.mult(ze.amount/ie.pan.mag()),Me.center=this._map.transform.center,Nu(Me,ze)}if(ie.zoom){let ze=lf(ie.zoom,Te,mc);Me.zoom=this._map.transform.zoom+ze.amount,Nu(Me,ze)}if(ie.bearing){let ze=lf(ie.bearing,Te,Lh);Me.bearing=this._map.transform.bearing+t.ac(ze.amount,-179,179),Nu(Me,ze)}if(ie.pitch){let ze=lf(ie.pitch,Te,sf);Me.pitch=this._map.transform.pitch+ze.amount,Nu(Me,ze)}if(Me.zoom||Me.bearing){let ze=ie.pinchAround===void 0?ie.around:ie.pinchAround;Me.around=ze?this._map.unproject(ze):this._map.getCenter()}return this.clear(),t.e(Me,{noMoveStart:!0})}}function Nu(Fe,I){(!Fe.duration||Fe.durationie.unproject(Ot)),wt=ze.reduce((Ot,$t,Tr,Ar)=>Ot.add($t.div(Ar.length)),new t.P(0,0));super(I,{points:ze,point:wt,lngLats:ht,lngLat:ie.unproject(wt),originalEvent:Te}),this._defaultPrevented=!1}}class hh extends t.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(I,ie,Te){super(I,{originalEvent:Te}),this._defaultPrevented=!1}}class mf{constructor(I,ie){this._map=I,this._clickTolerance=ie.clickTolerance}reset(){delete this._mousedownPos}wheel(I){return this._firePreventable(new hh(I.type,this._map,I))}mousedown(I,ie){return this._mousedownPos=ie,this._firePreventable(new au(I.type,this._map,I))}mouseup(I){this._map.fire(new au(I.type,this._map,I))}click(I,ie){this._mousedownPos&&this._mousedownPos.dist(ie)>=this._clickTolerance||this._map.fire(new au(I.type,this._map,I))}dblclick(I){return this._firePreventable(new au(I.type,this._map,I))}mouseover(I){this._map.fire(new au(I.type,this._map,I))}mouseout(I){this._map.fire(new au(I.type,this._map,I))}touchstart(I){return this._firePreventable(new Yc(I.type,this._map,I))}touchmove(I){this._map.fire(new Yc(I.type,this._map,I))}touchend(I){this._map.fire(new Yc(I.type,this._map,I))}touchcancel(I){this._map.fire(new Yc(I.type,this._map,I))}_firePreventable(I){if(this._map.fire(I),I.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class sl{constructor(I){this._map=I}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(I){this._map.fire(new au(I.type,this._map,I))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new au("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(I){this._delayContextMenu?this._contextMenuEvent=I:this._ignoreContextMenu||this._map.fire(new au(I.type,this._map,I)),this._map.listens("contextmenu")&&I.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class _u{constructor(I){this._map=I}get transform(){return this._map._requestedCameraState||this._map.transform}get center(){return{lng:this.transform.center.lng,lat:this.transform.center.lat}}get zoom(){return this.transform.zoom}get pitch(){return this.transform.pitch}get bearing(){return this.transform.bearing}unproject(I){return this.transform.pointLocation(t.P.convert(I),this._map.terrain)}}class Pu{constructor(I,ie){this._map=I,this._tr=new _u(I),this._el=I.getCanvasContainer(),this._container=I.getContainer(),this._clickTolerance=ie.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(I,ie){this.isEnabled()&&I.shiftKey&&I.button===0&&(i.disableDrag(),this._startPos=this._lastPos=ie,this._active=!0)}mousemoveWindow(I,ie){if(!this._active)return;let Te=ie;if(this._lastPos.equals(Te)||!this._box&&Te.dist(this._startPos)ze.fitScreenCoordinates(Te,Me,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",I)}keydown(I){this._active&&I.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",I))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(i.remove(this._box),this._box=null),i.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(I,ie){return this._map.fire(new t.k(I,{originalEvent:ie}))}}function Cf(Fe,I){if(Fe.length!==I.length)throw new Error(`The number of touches and points are not equal - touches ${Fe.length}, points ${I.length}`);let ie={};for(let Te=0;Tethis.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=I.timeStamp),Te.length===this.numTouches&&(this.centroid=function(Me){let ze=new t.P(0,0);for(let ht of Me)ze._add(ht);return ze.div(Me.length)}(ie),this.touches=Cf(Te,ie)))}touchmove(I,ie,Te){if(this.aborted||!this.centroid)return;let Me=Cf(Te,ie);for(let ze in this.touches){let ht=Me[ze];(!ht||ht.dist(this.touches[ze])>30)&&(this.aborted=!0)}}touchend(I,ie,Te){if((!this.centroid||I.timeStamp-this.startTime>500)&&(this.aborted=!0),Te.length===0){let Me=!this.aborted&&this.centroid;if(this.reset(),Me)return Me}}}class uf{constructor(I){this.singleTap=new hl(I),this.numTaps=I.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(I,ie,Te){this.singleTap.touchstart(I,ie,Te)}touchmove(I,ie,Te){this.singleTap.touchmove(I,ie,Te)}touchend(I,ie,Te){let Me=this.singleTap.touchend(I,ie,Te);if(Me){let ze=I.timeStamp-this.lastTime<500,ht=!this.lastTap||this.lastTap.dist(Me)<30;if(ze&&ht||this.reset(),this.count++,this.lastTime=I.timeStamp,this.lastTap=Me,this.count===this.numTaps)return this.reset(),Me}}}class kc{constructor(I){this._tr=new _u(I),this._zoomIn=new uf({numTouches:1,numTaps:2}),this._zoomOut=new uf({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(I,ie,Te){this._zoomIn.touchstart(I,ie,Te),this._zoomOut.touchstart(I,ie,Te)}touchmove(I,ie,Te){this._zoomIn.touchmove(I,ie,Te),this._zoomOut.touchmove(I,ie,Te)}touchend(I,ie,Te){let Me=this._zoomIn.touchend(I,ie,Te),ze=this._zoomOut.touchend(I,ie,Te),ht=this._tr;return Me?(this._active=!0,I.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:wt=>wt.easeTo({duration:300,zoom:ht.zoom+1,around:ht.unproject(Me)},{originalEvent:I})}):ze?(this._active=!0,I.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:wt=>wt.easeTo({duration:300,zoom:ht.zoom-1,around:ht.unproject(ze)},{originalEvent:I})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Hu{constructor(I){this._enabled=!!I.enable,this._moveStateManager=I.moveStateManager,this._clickTolerance=I.clickTolerance||1,this._moveFunction=I.move,this._activateOnStart=!!I.activateOnStart,I.assignEvents(this),this.reset()}reset(I){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(I)}_move(...I){let ie=this._moveFunction(...I);if(ie.bearingDelta||ie.pitchDelta||ie.around||ie.panDelta)return this._active=!0,ie}dragStart(I,ie){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(I)&&(this._moveStateManager.startMove(I),this._lastPoint=ie.length?ie[0]:ie,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(I,ie){if(!this.isEnabled())return;let Te=this._lastPoint;if(!Te)return;if(I.preventDefault(),!this._moveStateManager.isValidMoveEvent(I))return void this.reset(I);let Me=ie.length?ie[0]:ie;return!this._moved&&Me.dist(Te){Fe.mousedown=Fe.dragStart,Fe.mousemoveWindow=Fe.dragMove,Fe.mouseup=Fe.dragEnd,Fe.contextmenu=I=>{I.preventDefault()}},iu=({enable:Fe,clickTolerance:I,bearingDegreesPerPixelMoved:ie=.8})=>{let Te=new Wu({checkCorrectEvent:Me=>i.mouseButton(Me)===0&&Me.ctrlKey||i.mouseButton(Me)===2});return new Hu({clickTolerance:I,move:(Me,ze)=>({bearingDelta:(ze.x-Me.x)*ie}),moveStateManager:Te,enable:Fe,assignEvents:Lf})},Vf=({enable:Fe,clickTolerance:I,pitchDegreesPerPixelMoved:ie=-.5})=>{let Te=new Wu({checkCorrectEvent:Me=>i.mouseButton(Me)===0&&Me.ctrlKey||i.mouseButton(Me)===2});return new Hu({clickTolerance:I,move:(Me,ze)=>({pitchDelta:(ze.y-Me.y)*ie}),moveStateManager:Te,enable:Fe,assignEvents:Lf})};class Xu{constructor(I,ie){this._clickTolerance=I.clickTolerance||1,this._map=ie,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new t.P(0,0)}_shouldBePrevented(I){return I<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(I,ie,Te){return this._calculateTransform(I,ie,Te)}touchmove(I,ie,Te){if(this._active){if(!this._shouldBePrevented(Te.length))return I.preventDefault(),this._calculateTransform(I,ie,Te);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",I)}}touchend(I,ie,Te){this._calculateTransform(I,ie,Te),this._active&&this._shouldBePrevented(Te.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(I,ie,Te){Te.length>0&&(this._active=!0);let Me=Cf(Te,ie),ze=new t.P(0,0),ht=new t.P(0,0),wt=0;for(let $t in Me){let Tr=Me[$t],Ar=this._touches[$t];Ar&&(ze._add(Tr),ht._add(Tr.sub(Ar)),wt++,Me[$t]=Tr)}if(this._touches=Me,this._shouldBePrevented(wt)||!ht.mag())return;let Ot=ht.div(wt);return this._sum._add(Ot),this._sum.mag()Math.abs(Fe.x)}class Pc extends Cc{constructor(I){super(),this._currentTouchCount=0,this._map=I}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(I,ie,Te){super.touchstart(I,ie,Te),this._currentTouchCount=Te.length}_start(I){this._lastPoints=I,sc(I[0].sub(I[1]))&&(this._valid=!1)}_move(I,ie,Te){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;let Me=I[0].sub(this._lastPoints[0]),ze=I[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(Me,ze,Te.timeStamp),this._valid?(this._lastPoints=I,this._active=!0,{pitchDelta:(Me.y+ze.y)/2*-.5}):void 0}gestureBeginsVertically(I,ie,Te){if(this._valid!==void 0)return this._valid;let Me=I.mag()>=2,ze=ie.mag()>=2;if(!Me&&!ze)return;if(!Me||!ze)return this._firstMove===void 0&&(this._firstMove=Te),Te-this._firstMove<100&&void 0;let ht=I.y>0==ie.y>0;return sc(I)&&sc(ie)&&ht}}let Qt={panStep:100,bearingStep:15,pitchStep:10};class br{constructor(I){this._tr=new _u(I);let ie=Qt;this._panStep=ie.panStep,this._bearingStep=ie.bearingStep,this._pitchStep=ie.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(I){if(I.altKey||I.ctrlKey||I.metaKey)return;let ie=0,Te=0,Me=0,ze=0,ht=0;switch(I.keyCode){case 61:case 107:case 171:case 187:ie=1;break;case 189:case 109:case 173:ie=-1;break;case 37:I.shiftKey?Te=-1:(I.preventDefault(),ze=-1);break;case 39:I.shiftKey?Te=1:(I.preventDefault(),ze=1);break;case 38:I.shiftKey?Me=1:(I.preventDefault(),ht=-1);break;case 40:I.shiftKey?Me=-1:(I.preventDefault(),ht=1);break;default:return}return this._rotationDisabled&&(Te=0,Me=0),{cameraAnimation:wt=>{let Ot=this._tr;wt.easeTo({duration:300,easeId:"keyboardHandler",easing:aa,zoom:ie?Math.round(Ot.zoom)+ie*(I.shiftKey?2:1):Ot.zoom,bearing:Ot.bearing+Te*this._bearingStep,pitch:Ot.pitch+Me*this._pitchStep,offset:[-ze*this._panStep,-ht*this._panStep],center:Ot.center},{originalEvent:I})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}disableRotation(){this._rotationDisabled=!0}enableRotation(){this._rotationDisabled=!1}}function aa(Fe){return Fe*(2-Fe)}let $r=4.000244140625;class ka{constructor(I,ie){this._onTimeout=Te=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(Te)},this._map=I,this._tr=new _u(I),this._triggerRenderFrame=ie,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222}setZoomRate(I){this._defaultZoomRate=I}setWheelZoomRate(I){this._wheelZoomRate=I}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(I){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!I&&I.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(I){return!!this._map.cooperativeGestures.isEnabled()&&!(I.ctrlKey||this._map.cooperativeGestures.isBypassed(I))}wheel(I){if(!this.isEnabled())return;if(this._shouldBePrevented(I))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",I);let ie=I.deltaMode===WheelEvent.DOM_DELTA_LINE?40*I.deltaY:I.deltaY,Te=n.now(),Me=Te-(this._lastWheelEventTime||0);this._lastWheelEventTime=Te,ie!==0&&ie%$r==0?this._type="wheel":ie!==0&&Math.abs(ie)<4?this._type="trackpad":Me>400?(this._type=null,this._lastValue=ie,this._timeout=setTimeout(this._onTimeout,40,I)):this._type||(this._type=Math.abs(Me*ie)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,ie+=this._lastValue)),I.shiftKey&&ie&&(ie/=4),this._type&&(this._lastWheelEvent=I,this._delta-=ie,this._active||this._start(I)),I.preventDefault()}_start(I){if(!this._delta)return;this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);let ie=i.mousePos(this._map.getCanvas(),I),Te=this._tr;this._around=ie.y>Te.transform.height/2-Te.transform.getHorizon()?t.N.convert(this._aroundCenter?Te.center:Te.unproject(ie)):t.N.convert(Te.center),this._aroundPoint=Te.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._triggerRenderFrame())}renderFrame(){if(!this._frameId||(this._frameId=null,!this.isActive()))return;let I=this._tr.transform;if(this._delta!==0){let Ot=this._type==="wheel"&&Math.abs(this._delta)>$r?this._wheelZoomRate:this._defaultZoomRate,$t=2/(1+Math.exp(-Math.abs(this._delta*Ot)));this._delta<0&&$t!==0&&($t=1/$t);let Tr=typeof this._targetZoom=="number"?I.zoomScale(this._targetZoom):I.scale;this._targetZoom=Math.min(I.maxZoom,Math.max(I.minZoom,I.scaleZoom(Tr*$t))),this._type==="wheel"&&(this._startZoom=I.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}let ie=typeof this._targetZoom=="number"?this._targetZoom:I.zoom,Te=this._startZoom,Me=this._easing,ze,ht=!1,wt=n.now()-this._lastWheelEventTime;if(this._type==="wheel"&&Te&&Me&&wt){let Ot=Math.min(wt/200,1),$t=Me(Ot);ze=t.y.number(Te,ie,$t),Ot<1?this._frameId||(this._frameId=!0):ht=!0}else ze=ie,ht=!0;return this._active=!0,ht&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!ht,zoomDelta:ze-I.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(I){let ie=t.b9;if(this._prevEase){let Te=this._prevEase,Me=(n.now()-Te.start)/Te.duration,ze=Te.easing(Me+.01)-Te.easing(Me),ht=.27/Math.sqrt(ze*ze+1e-4)*.01,wt=Math.sqrt(.0729-ht*ht);ie=t.b8(ht,wt,.25,1)}return this._prevEase={start:n.now(),duration:I,easing:ie},ie}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class li{constructor(I,ie){this._clickZoom=I,this._tapZoom=ie}enable(){this._clickZoom.enable(),this._tapZoom.enable()}disable(){this._clickZoom.disable(),this._tapZoom.disable()}isEnabled(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()}isActive(){return this._clickZoom.isActive()||this._tapZoom.isActive()}}class Ci{constructor(I){this._tr=new _u(I),this.reset()}reset(){this._active=!1}dblclick(I,ie){return I.preventDefault(),{cameraAnimation:Te=>{Te.easeTo({duration:300,zoom:this._tr.zoom+(I.shiftKey?-1:1),around:this._tr.unproject(ie)},{originalEvent:I})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Hi{constructor(){this._tap=new uf({numTouches:1,numTaps:1}),this.reset()}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,delete this._tapPoint,this._tap.reset()}touchstart(I,ie,Te){if(!this._swipePoint)if(this._tapTime){let Me=ie[0],ze=I.timeStamp-this._tapTime<500,ht=this._tapPoint.dist(Me)<30;ze&&ht?Te.length>0&&(this._swipePoint=Me,this._swipeTouch=Te[0].identifier):this.reset()}else this._tap.touchstart(I,ie,Te)}touchmove(I,ie,Te){if(this._tapTime){if(this._swipePoint){if(Te[0].identifier!==this._swipeTouch)return;let Me=ie[0],ze=Me.y-this._swipePoint.y;return this._swipePoint=Me,I.preventDefault(),this._active=!0,{zoomDelta:ze/128}}}else this._tap.touchmove(I,ie,Te)}touchend(I,ie,Te){if(this._tapTime)this._swipePoint&&Te.length===0&&this.reset();else{let Me=this._tap.touchend(I,ie,Te);Me&&(this._tapTime=I.timeStamp,this._tapPoint=Me)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Qi{constructor(I,ie,Te){this._el=I,this._mousePan=ie,this._touchPan=Te}enable(I){this._inertiaOptions=I||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("maplibregl-touch-drag-pan")}disable(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("maplibregl-touch-drag-pan")}isEnabled(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()}isActive(){return this._mousePan.isActive()||this._touchPan.isActive()}}class pn{constructor(I,ie,Te){this._pitchWithRotate=I.pitchWithRotate,this._mouseRotate=ie,this._mousePitch=Te}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()}}class Pi{constructor(I,ie,Te,Me){this._el=I,this._touchZoom=ie,this._touchRotate=Te,this._tapDragZoom=Me,this._rotationDisabled=!1,this._enabled=!0}enable(I){this._touchZoom.enable(I),this._rotationDisabled||this._touchRotate.enable(I),this._tapDragZoom.enable(),this._el.classList.add("maplibregl-touch-zoom-rotate")}disable(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("maplibregl-touch-zoom-rotate")}isEnabled(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()}isActive(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}class Di{constructor(I,ie){this._bypassKey=navigator.userAgent.indexOf("Mac")!==-1?"metaKey":"ctrlKey",this._map=I,this._options=ie,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;let I=this._map.getCanvasContainer();I.classList.add("maplibregl-cooperative-gestures"),this._container=i.create("div","maplibregl-cooperative-gesture-screen",I);let ie=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(ie=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));let Te=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),Me=document.createElement("div");Me.className="maplibregl-desktop-message",Me.textContent=ie,this._container.appendChild(Me);let ze=document.createElement("div");ze.className="maplibregl-mobile-message",ze.textContent=Te,this._container.appendChild(ze),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&(i.remove(this._container),this._map.getCanvasContainer().classList.remove("maplibregl-cooperative-gestures")),delete this._container}enable(){this._setupUI(),this._enabled=!0}disable(){this._enabled=!1,this._destroyUI()}isEnabled(){return this._enabled}isBypassed(I){return I[this._bypassKey]}notifyGestureBlocked(I,ie){this._enabled&&(this._map.fire(new t.k("cooperativegestureprevented",{gestureType:I,originalEvent:ie})),this._container.classList.add("maplibregl-show"),setTimeout(()=>{this._container.classList.remove("maplibregl-show")},100))}}let Ni=Fe=>Fe.zoom||Fe.drag||Fe.pitch||Fe.rotate;class mi extends t.k{}function Sn(Fe){return Fe.panDelta&&Fe.panDelta.mag()||Fe.zoomDelta||Fe.bearingDelta||Fe.pitchDelta}class $n{constructor(I,ie){this.handleWindowEvent=Me=>{this.handleEvent(Me,`${Me.type}Window`)},this.handleEvent=(Me,ze)=>{if(Me.type==="blur")return void this.stop(!0);this._updatingCamera=!0;let ht=Me.type==="renderFrame"?void 0:Me,wt={needsRenderFrame:!1},Ot={},$t={},Tr=Me.touches,Ar=Tr?this._getMapTouches(Tr):void 0,Kr=Ar?i.touchPos(this._map.getCanvas(),Ar):i.mousePos(this._map.getCanvas(),Me);for(let{handlerName:$e,handler:ot,allowed:pt}of this._handlers){if(!ot.isEnabled())continue;let Et;this._blockedByActive($t,pt,$e)?ot.reset():ot[ze||Me.type]&&(Et=ot[ze||Me.type](Me,Kr,Ar),this.mergeHandlerResult(wt,Ot,Et,$e,ht),Et&&Et.needsRenderFrame&&this._triggerRenderFrame()),(Et||ot.isActive())&&($t[$e]=ot)}let na={};for(let $e in this._previousActiveHandlers)$t[$e]||(na[$e]=ht);this._previousActiveHandlers=$t,(Object.keys(na).length||Sn(wt))&&(this._changes.push([wt,Ot,na]),this._triggerRenderFrame()),(Object.keys($t).length||Sn(wt))&&this._map._stop(!0),this._updatingCamera=!1;let{cameraAnimation:Ve}=wt;Ve&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],Ve(this._map))},this._map=I,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new vf(I),this._bearingSnap=ie.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(ie);let Te=this._el;this._listeners=[[Te,"touchstart",{passive:!0}],[Te,"touchmove",{passive:!1}],[Te,"touchend",void 0],[Te,"touchcancel",void 0],[Te,"mousedown",void 0],[Te,"mousemove",void 0],[Te,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[Te,"mouseover",void 0],[Te,"mouseout",void 0],[Te,"dblclick",void 0],[Te,"click",void 0],[Te,"keydown",{capture:!1}],[Te,"keyup",void 0],[Te,"wheel",{passive:!1}],[Te,"contextmenu",void 0],[window,"blur",void 0]];for(let[Me,ze,ht]of this._listeners)i.addEventListener(Me,ze,Me===document?this.handleWindowEvent:this.handleEvent,ht)}destroy(){for(let[I,ie,Te]of this._listeners)i.removeEventListener(I,ie,I===document?this.handleWindowEvent:this.handleEvent,Te)}_addDefaultHandlers(I){let ie=this._map,Te=ie.getCanvasContainer();this._add("mapEvent",new mf(ie,I));let Me=ie.boxZoom=new Pu(ie,I);this._add("boxZoom",Me),I.interactive&&I.boxZoom&&Me.enable();let ze=ie.cooperativeGestures=new Di(ie,I.cooperativeGestures);this._add("cooperativeGestures",ze),I.cooperativeGestures&&ze.enable();let ht=new kc(ie),wt=new Ci(ie);ie.doubleClickZoom=new li(wt,ht),this._add("tapZoom",ht),this._add("clickZoom",wt),I.interactive&&I.doubleClickZoom&&ie.doubleClickZoom.enable();let Ot=new Hi;this._add("tapDragZoom",Ot);let $t=ie.touchPitch=new Pc(ie);this._add("touchPitch",$t),I.interactive&&I.touchPitch&&ie.touchPitch.enable(I.touchPitch);let Tr=iu(I),Ar=Vf(I);ie.dragRotate=new pn(I,Tr,Ar),this._add("mouseRotate",Tr,["mousePitch"]),this._add("mousePitch",Ar,["mouseRotate"]),I.interactive&&I.dragRotate&&ie.dragRotate.enable();let Kr=(({enable:Et,clickTolerance:bt})=>{let Rt=new Wu({checkCorrectEvent:lr=>i.mouseButton(lr)===0&&!lr.ctrlKey});return new Hu({clickTolerance:bt,move:(lr,yr)=>({around:yr,panDelta:yr.sub(lr)}),activateOnStart:!0,moveStateManager:Rt,enable:Et,assignEvents:Lf})})(I),na=new Xu(I,ie);ie.dragPan=new Qi(Te,Kr,na),this._add("mousePan",Kr),this._add("touchPan",na,["touchZoom","touchRotate"]),I.interactive&&I.dragPan&&ie.dragPan.enable(I.dragPan);let Ve=new Jc,$e=new xu;ie.touchZoomRotate=new Pi(Te,$e,Ve,Ot),this._add("touchRotate",Ve,["touchPan","touchZoom"]),this._add("touchZoom",$e,["touchPan","touchRotate"]),I.interactive&&I.touchZoomRotate&&ie.touchZoomRotate.enable(I.touchZoomRotate);let ot=ie.scrollZoom=new ka(ie,()=>this._triggerRenderFrame());this._add("scrollZoom",ot,["mousePan"]),I.interactive&&I.scrollZoom&&ie.scrollZoom.enable(I.scrollZoom);let pt=ie.keyboard=new br(ie);this._add("keyboard",pt),I.interactive&&I.keyboard&&ie.keyboard.enable(),this._add("blockableMapEvent",new sl(ie))}_add(I,ie,Te){this._handlers.push({handlerName:I,handler:ie,allowed:Te}),this._handlersById[I]=ie}stop(I){if(!this._updatingCamera){for(let{handler:ie}of this._handlers)ie.reset();this._inertia.clear(),this._fireEvents({},{},I),this._changes=[]}}isActive(){for(let{handler:I}of this._handlers)if(I.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!Ni(this._eventsInProgress)||this.isZooming()}_blockedByActive(I,ie,Te){for(let Me in I)if(Me!==Te&&(!ie||ie.indexOf(Me)<0))return!0;return!1}_getMapTouches(I){let ie=[];for(let Te of I)this._el.contains(Te.target)&&ie.push(Te);return ie}mergeHandlerResult(I,ie,Te,Me,ze){if(!Te)return;t.e(I,Te);let ht={handlerName:Me,originalEvent:Te.originalEvent||ze};Te.zoomDelta!==void 0&&(ie.zoom=ht),Te.panDelta!==void 0&&(ie.drag=ht),Te.pitchDelta!==void 0&&(ie.pitch=ht),Te.bearingDelta!==void 0&&(ie.rotate=ht)}_applyChanges(){let I={},ie={},Te={};for(let[Me,ze,ht]of this._changes)Me.panDelta&&(I.panDelta=(I.panDelta||new t.P(0,0))._add(Me.panDelta)),Me.zoomDelta&&(I.zoomDelta=(I.zoomDelta||0)+Me.zoomDelta),Me.bearingDelta&&(I.bearingDelta=(I.bearingDelta||0)+Me.bearingDelta),Me.pitchDelta&&(I.pitchDelta=(I.pitchDelta||0)+Me.pitchDelta),Me.around!==void 0&&(I.around=Me.around),Me.pinchAround!==void 0&&(I.pinchAround=Me.pinchAround),Me.noInertia&&(I.noInertia=Me.noInertia),t.e(ie,ze),t.e(Te,ht);this._updateMapTransform(I,ie,Te),this._changes=[]}_updateMapTransform(I,ie,Te){let Me=this._map,ze=Me._getTransformForUpdate(),ht=Me.terrain;if(!(Sn(I)||ht&&this._terrainMovement))return this._fireEvents(ie,Te,!0);let{panDelta:wt,zoomDelta:Ot,bearingDelta:$t,pitchDelta:Tr,around:Ar,pinchAround:Kr}=I;Kr!==void 0&&(Ar=Kr),Me._stop(!0),Ar=Ar||Me.transform.centerPoint;let na=ze.pointLocation(wt?Ar.sub(wt):Ar);$t&&(ze.bearing+=$t),Tr&&(ze.pitch+=Tr),Ot&&(ze.zoom+=Ot),ht?this._terrainMovement||!ie.drag&&!ie.zoom?ie.drag&&this._terrainMovement?ze.center=ze.pointLocation(ze.centerPoint.sub(wt)):ze.setLocationAtPoint(na,Ar):(this._terrainMovement=!0,this._map._elevationFreeze=!0,ze.setLocationAtPoint(na,Ar)):ze.setLocationAtPoint(na,Ar),Me._applyUpdatedTransform(ze),this._map._update(),I.noInertia||this._inertia.record(I),this._fireEvents(ie,Te,!0)}_fireEvents(I,ie,Te){let Me=Ni(this._eventsInProgress),ze=Ni(I),ht={};for(let Ar in I){let{originalEvent:Kr}=I[Ar];this._eventsInProgress[Ar]||(ht[`${Ar}start`]=Kr),this._eventsInProgress[Ar]=I[Ar]}!Me&&ze&&this._fireEvent("movestart",ze.originalEvent);for(let Ar in ht)this._fireEvent(Ar,ht[Ar]);ze&&this._fireEvent("move",ze.originalEvent);for(let Ar in I){let{originalEvent:Kr}=I[Ar];this._fireEvent(Ar,Kr)}let wt={},Ot;for(let Ar in this._eventsInProgress){let{handlerName:Kr,originalEvent:na}=this._eventsInProgress[Ar];this._handlersById[Kr].isActive()||(delete this._eventsInProgress[Ar],Ot=ie[Kr]||na,wt[`${Ar}end`]=Ot)}for(let Ar in wt)this._fireEvent(Ar,wt[Ar]);let $t=Ni(this._eventsInProgress),Tr=(Me||ze)&&!$t;if(Tr&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;let Ar=this._map._getTransformForUpdate();Ar.recalculateZoom(this._map.terrain),this._map._applyUpdatedTransform(Ar)}if(Te&&Tr){this._updatingCamera=!0;let Ar=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),Kr=na=>na!==0&&-this._bearingSnap{delete this._frameId,this.handleEvent(new mi("renderFrame",{timeStamp:I})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class no extends t.E{constructor(I,ie){super(),this._renderFrameCallback=()=>{let Te=Math.min((n.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(Te)),Te<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=I,this._bearingSnap=ie.bearingSnap,this.on("moveend",()=>{delete this._requestedCameraState})}getCenter(){return new t.N(this.transform.center.lng,this.transform.center.lat)}setCenter(I,ie){return this.jumpTo({center:I},ie)}panBy(I,ie,Te){return I=t.P.convert(I).mult(-1),this.panTo(this.transform.center,t.e({offset:I},ie),Te)}panTo(I,ie,Te){return this.easeTo(t.e({center:I},ie),Te)}getZoom(){return this.transform.zoom}setZoom(I,ie){return this.jumpTo({zoom:I},ie),this}zoomTo(I,ie,Te){return this.easeTo(t.e({zoom:I},ie),Te)}zoomIn(I,ie){return this.zoomTo(this.getZoom()+1,I,ie),this}zoomOut(I,ie){return this.zoomTo(this.getZoom()-1,I,ie),this}getBearing(){return this.transform.bearing}setBearing(I,ie){return this.jumpTo({bearing:I},ie),this}getPadding(){return this.transform.padding}setPadding(I,ie){return this.jumpTo({padding:I},ie),this}rotateTo(I,ie,Te){return this.easeTo(t.e({bearing:I},ie),Te)}resetNorth(I,ie){return this.rotateTo(0,t.e({duration:1e3},I),ie),this}resetNorthPitch(I,ie){return this.easeTo(t.e({bearing:0,pitch:0,duration:1e3},I),ie),this}snapToNorth(I,ie){return Math.abs(this.getBearing()){if(this._zooming&&(Me.zoom=t.y.number(ze,ot,kr)),this._rotating&&(Me.bearing=t.y.number(ht,$t,kr)),this._pitching&&(Me.pitch=t.y.number(wt,Tr,kr)),this._padding&&(Me.interpolatePadding(Ot,Ar,kr),na=Me.centerPoint.add(Kr)),this.terrain&&!I.freezeElevation&&this._updateElevation(kr),Rt)Me.setLocationAtPoint(Rt,lr);else{let jr=Me.zoomScale(Me.zoom-ze),Qr=ot>ze?Math.min(2,bt):Math.max(.5,bt),ha=Math.pow(Qr,1-kr),Aa=Me.unproject(pt.add(Et.mult(kr*ha)).mult(jr));Me.setLocationAtPoint(Me.renderWorldCopies?Aa.wrap():Aa,na)}this._applyUpdatedTransform(Me),this._fireMoveEvents(ie)},kr=>{this.terrain&&I.freezeElevation&&this._finalizeElevation(),this._afterEase(ie,kr)},I),this}_prepareEase(I,ie,Te={}){this._moving=!0,ie||Te.moving||this.fire(new t.k("movestart",I)),this._zooming&&!Te.zooming&&this.fire(new t.k("zoomstart",I)),this._rotating&&!Te.rotating&&this.fire(new t.k("rotatestart",I)),this._pitching&&!Te.pitching&&this.fire(new t.k("pitchstart",I))}_prepareElevation(I){this._elevationCenter=I,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(I,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(I){this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);let ie=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(I<1&&ie!==this._elevationTarget){let Te=this._elevationTarget-this._elevationStart;this._elevationStart+=I*(Te-(ie-(Te*I+this._elevationStart))/(1-I)),this._elevationTarget=ie}this.transform.elevation=t.y.number(this._elevationStart,this._elevationTarget,I)}_finalizeElevation(){this._elevationFreeze=!1,this.transform.recalculateZoom(this.terrain)}_getTransformForUpdate(){return this.transformCameraUpdate||this.terrain?(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState):this.transform}_elevateCameraIfInsideTerrain(I){let ie=I.getCameraPosition(),Te=this.terrain.getElevationForLngLatZoom(ie.lngLat,I.zoom);if(ie.altitudethis._elevateCameraIfInsideTerrain(Me)),this.transformCameraUpdate&&ie.push(Me=>this.transformCameraUpdate(Me)),!ie.length)return;let Te=I.clone();for(let Me of ie){let ze=Te.clone(),{center:ht,zoom:wt,pitch:Ot,bearing:$t,elevation:Tr}=Me(ze);ht&&(ze.center=ht),wt!==void 0&&(ze.zoom=wt),Ot!==void 0&&(ze.pitch=Ot),$t!==void 0&&(ze.bearing=$t),Tr!==void 0&&(ze.elevation=Tr),Te.apply(ze)}this.transform.apply(Te)}_fireMoveEvents(I){this.fire(new t.k("move",I)),this._zooming&&this.fire(new t.k("zoom",I)),this._rotating&&this.fire(new t.k("rotate",I)),this._pitching&&this.fire(new t.k("pitch",I))}_afterEase(I,ie){if(this._easeId&&ie&&this._easeId===ie)return;delete this._easeId;let Te=this._zooming,Me=this._rotating,ze=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,Te&&this.fire(new t.k("zoomend",I)),Me&&this.fire(new t.k("rotateend",I)),ze&&this.fire(new t.k("pitchend",I)),this.fire(new t.k("moveend",I))}flyTo(I,ie){var Te;if(!I.essential&&n.prefersReducedMotion){let on=t.M(I,["center","zoom","bearing","pitch","around"]);return this.jumpTo(on,ie)}this.stop(),I=t.e({offset:[0,0],speed:1.2,curve:1.42,easing:t.b9},I);let Me=this._getTransformForUpdate(),ze=Me.zoom,ht=Me.bearing,wt=Me.pitch,Ot=Me.padding,$t="bearing"in I?this._normalizeBearing(I.bearing,ht):ht,Tr="pitch"in I?+I.pitch:wt,Ar="padding"in I?I.padding:Me.padding,Kr=t.P.convert(I.offset),na=Me.centerPoint.add(Kr),Ve=Me.pointLocation(na),{center:$e,zoom:ot}=Me.getConstrained(t.N.convert(I.center||Ve),(Te=I.zoom)!==null&&Te!==void 0?Te:ze);this._normalizeCenter($e,Me);let pt=Me.zoomScale(ot-ze),Et=Me.project(Ve),bt=Me.project($e).sub(Et),Rt=I.curve,lr=Math.max(Me.width,Me.height),yr=lr/pt,kr=bt.mag();if("minZoom"in I){let on=t.ac(Math.min(I.minZoom,ze,ot),Me.minZoom,Me.maxZoom),An=lr/Me.zoomScale(on-ze);Rt=Math.sqrt(An/kr*2)}let jr=Rt*Rt;function Qr(on){let An=(yr*yr-lr*lr+(on?-1:1)*jr*jr*kr*kr)/(2*(on?yr:lr)*jr*kr);return Math.log(Math.sqrt(An*An+1)-An)}function ha(on){return(Math.exp(on)-Math.exp(-on))/2}function Aa(on){return(Math.exp(on)+Math.exp(-on))/2}let Da=Qr(!1),ci=function(on){return Aa(Da)/Aa(Da+Rt*on)},Vi=function(on){return lr*((Aa(Da)*(ha(An=Da+Rt*on)/Aa(An))-ha(Da))/jr)/kr;var An},ji=(Qr(!0)-Da)/Rt;if(Math.abs(kr)<1e-6||!isFinite(ji)){if(Math.abs(lr-yr)<1e-6)return this.easeTo(I,ie);let on=yr0,ci=An=>Math.exp(on*Rt*An)}return I.duration="duration"in I?+I.duration:1e3*ji/("screenSpeed"in I?+I.screenSpeed/Rt:+I.speed),I.maxDuration&&I.duration>I.maxDuration&&(I.duration=0),this._zooming=!0,this._rotating=ht!==$t,this._pitching=Tr!==wt,this._padding=!Me.isPaddingEqual(Ar),this._prepareEase(ie,!1),this.terrain&&this._prepareElevation($e),this._ease(on=>{let An=on*ji,Yn=1/ci(An);Me.zoom=on===1?ot:ze+Me.scaleZoom(Yn),this._rotating&&(Me.bearing=t.y.number(ht,$t,on)),this._pitching&&(Me.pitch=t.y.number(wt,Tr,on)),this._padding&&(Me.interpolatePadding(Ot,Ar,on),na=Me.centerPoint.add(Kr)),this.terrain&&!I.freezeElevation&&this._updateElevation(on);let Nn=on===1?$e:Me.unproject(Et.add(bt.mult(Vi(An))).mult(Yn));Me.setLocationAtPoint(Me.renderWorldCopies?Nn.wrap():Nn,na),this._applyUpdatedTransform(Me),this._fireMoveEvents(ie)},()=>{this.terrain&&I.freezeElevation&&this._finalizeElevation(),this._afterEase(ie)},I),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(I,ie){var Te;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){let Me=this._onEaseEnd;delete this._onEaseEnd,Me.call(this,ie)}return I||(Te=this.handlers)===null||Te===void 0||Te.stop(!1),this}_ease(I,ie,Te){Te.animate===!1||Te.duration===0?(I(1),ie()):(this._easeStart=n.now(),this._easeOptions=Te,this._onEaseFrame=I,this._onEaseEnd=ie,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(I,ie){I=t.b3(I,-180,180);let Te=Math.abs(I-ie);return Math.abs(I-360-ie)180?-360:Te<-180?360:0}queryTerrainElevation(I){return this.terrain?this.terrain.getElevationForLngLatZoom(t.N.convert(I),this.transform.tileZoom)-this.transform.elevation:null}}let Qn={compact:!0,customAttribution:'MapLibre'};class co{constructor(I=Qn){this._toggleAttribution=()=>{this._container.classList.contains("maplibregl-compact")&&(this._container.classList.contains("maplibregl-compact-show")?(this._container.setAttribute("open",""),this._container.classList.remove("maplibregl-compact-show")):(this._container.classList.add("maplibregl-compact-show"),this._container.removeAttribute("open")))},this._updateData=ie=>{!ie||ie.sourceDataType!=="metadata"&&ie.sourceDataType!=="visibility"&&ie.dataType!=="style"&&ie.type!=="terrain"||this._updateAttributions()},this._updateCompact=()=>{this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact===!1?this._container.setAttribute("open",""):this._container.classList.contains("maplibregl-compact")||this._container.classList.contains("maplibregl-attrib-empty")||(this._container.setAttribute("open",""),this._container.classList.add("maplibregl-compact","maplibregl-compact-show")):(this._container.setAttribute("open",""),this._container.classList.contains("maplibregl-compact")&&this._container.classList.remove("maplibregl-compact","maplibregl-compact-show"))},this._updateCompactMinimize=()=>{this._container.classList.contains("maplibregl-compact")&&this._container.classList.contains("maplibregl-compact-show")&&this._container.classList.remove("maplibregl-compact-show")},this.options=I}getDefaultPosition(){return"bottom-right"}onAdd(I){return this._map=I,this._compact=this.options.compact,this._container=i.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=i.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=i.create("div","maplibregl-ctrl-attrib-inner",this._container),this._updateAttributions(),this._updateCompact(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("terrain",this._updateData),this._map.on("resize",this._updateCompact),this._map.on("drag",this._updateCompactMinimize),this._container}onRemove(){i.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("terrain",this._updateData),this._map.off("resize",this._updateCompact),this._map.off("drag",this._updateCompactMinimize),this._map=void 0,this._compact=void 0,this._attribHTML=void 0}_setElementTitle(I,ie){let Te=this._map._getUIString(`AttributionControl.${ie}`);I.title=Te,I.setAttribute("aria-label",Te)}_updateAttributions(){if(!this._map.style)return;let I=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?I=I.concat(this.options.customAttribution.map(Me=>typeof Me!="string"?"":Me)):typeof this.options.customAttribution=="string"&&I.push(this.options.customAttribution)),this._map.style.stylesheet){let Me=this._map.style.stylesheet;this.styleOwner=Me.owner,this.styleId=Me.id}let ie=this._map.style.sourceCaches;for(let Me in ie){let ze=ie[Me];if(ze.used||ze.usedForTerrain){let ht=ze.getSource();ht.attribution&&I.indexOf(ht.attribution)<0&&I.push(ht.attribution)}}I=I.filter(Me=>String(Me).trim()),I.sort((Me,ze)=>Me.length-ze.length),I=I.filter((Me,ze)=>{for(let ht=ze+1;ht=0)return!1;return!0});let Te=I.join(" | ");Te!==this._attribHTML&&(this._attribHTML=Te,I.length?(this._innerContainer.innerHTML=Te,this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null)}}class Tn{constructor(I={}){this._updateCompact=()=>{let ie=this._container.children;if(ie.length){let Te=ie[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&Te.classList.add("maplibregl-compact"):Te.classList.remove("maplibregl-compact")}},this.options=I}getDefaultPosition(){return"bottom-left"}onAdd(I){this._map=I,this._compact=this.options&&this.options.compact,this._container=i.create("div","maplibregl-ctrl");let ie=i.create("a","maplibregl-ctrl-logo");return ie.target="_blank",ie.rel="noopener nofollow",ie.href="https://maplibre.org/",ie.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),ie.setAttribute("rel","noopener nofollow"),this._container.appendChild(ie),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){i.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class un{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(I){let ie=++this._id;return this._queue.push({callback:I,id:ie,cancelled:!1}),ie}remove(I){let ie=this._currentlyRunning,Te=ie?this._queue.concat(ie):this._queue;for(let Me of Te)if(Me.id===I)return void(Me.cancelled=!0)}run(I=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");let ie=this._currentlyRunning=this._queue;this._queue=[];for(let Te of ie)if(!Te.cancelled&&(Te.callback(I),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var go=t.Y([{name:"a_pos3d",type:"Int16",components:3}]);class Ko extends t.E{constructor(I){super(),this.sourceCache=I,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.deltaZoom=1,I.usedForTerrain=!0,I.tileSize=this.tileSize*2**this.deltaZoom}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null}update(I,ie){this.sourceCache.update(I,ie),this._renderableTilesKeys=[];let Te={};for(let Me of I.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:ie}))Te[Me.key]=!0,this._renderableTilesKeys.push(Me.key),this._tiles[Me.key]||(Me.posMatrix=new Float64Array(16),t.aP(Me.posMatrix,0,t.X,0,t.X,0,1),this._tiles[Me.key]=new rt(Me,this.tileSize));for(let Me in this._tiles)Te[Me]||delete this._tiles[Me]}freeRtt(I){for(let ie in this._tiles){let Te=this._tiles[ie];(!I||Te.tileID.equals(I)||Te.tileID.isChildOf(I)||I.isChildOf(Te.tileID))&&(Te.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(I=>this.getTileByID(I))}getTileByID(I){return this._tiles[I]}getTerrainCoords(I){let ie={};for(let Te of this._renderableTilesKeys){let Me=this._tiles[Te].tileID;if(Me.canonical.equals(I.canonical)){let ze=I.clone();ze.posMatrix=new Float64Array(16),t.aP(ze.posMatrix,0,t.X,0,t.X,0,1),ie[Te]=ze}else if(Me.canonical.isChildOf(I.canonical)){let ze=I.clone();ze.posMatrix=new Float64Array(16);let ht=Me.canonical.z-I.canonical.z,wt=Me.canonical.x-(Me.canonical.x>>ht<>ht<>ht;t.aP(ze.posMatrix,0,$t,0,$t,0,1),t.J(ze.posMatrix,ze.posMatrix,[-wt*$t,-Ot*$t,0]),ie[Te]=ze}else if(I.canonical.isChildOf(Me.canonical)){let ze=I.clone();ze.posMatrix=new Float64Array(16);let ht=I.canonical.z-Me.canonical.z,wt=I.canonical.x-(I.canonical.x>>ht<>ht<>ht;t.aP(ze.posMatrix,0,t.X,0,t.X,0,1),t.J(ze.posMatrix,ze.posMatrix,[wt*$t,Ot*$t,0]),t.K(ze.posMatrix,ze.posMatrix,[1/2**ht,1/2**ht,0]),ie[Te]=ze}}return ie}getSourceTile(I,ie){let Te=this.sourceCache._source,Me=I.overscaledZ-this.deltaZoom;if(Me>Te.maxzoom&&(Me=Te.maxzoom),Me=Te.minzoom&&(!ze||!ze.dem);)ze=this.sourceCache.getTileByID(I.scaledTo(Me--).key);return ze}tilesAfterTime(I=Date.now()){return Object.values(this._tiles).filter(ie=>ie.timeAdded>=I)}}class Ms{constructor(I,ie,Te){this.painter=I,this.sourceCache=new Ko(ie),this.options=Te,this.exaggeration=typeof Te.exaggeration=="number"?Te.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}getDEMElevation(I,ie,Te,Me=t.X){var ze;if(!(ie>=0&&ie=0&&TeI.canonical.z&&(I.canonical.z>=Me?ze=I.canonical.z-Me:t.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));let ht=I.canonical.x-(I.canonical.x>>ze<>ze<>8<<4|ze>>8,ie[ht+3]=0;let Te=new t.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(ie.buffer)),Me=new u(I,Te,I.gl.RGBA,{premultiply:!1});return Me.bind(I.gl.NEAREST,I.gl.CLAMP_TO_EDGE),this._coordsTexture=Me,Me}pointCoordinate(I){this.painter.maybeDrawDepthAndCoords(!0);let ie=new Uint8Array(4),Te=this.painter.context,Me=Te.gl,ze=Math.round(I.x*this.painter.pixelRatio/devicePixelRatio),ht=Math.round(I.y*this.painter.pixelRatio/devicePixelRatio),wt=Math.round(this.painter.height/devicePixelRatio);Te.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),Me.readPixels(ze,wt-ht-1,1,1,Me.RGBA,Me.UNSIGNED_BYTE,ie),Te.bindFramebuffer.set(null);let Ot=ie[0]+(ie[2]>>4<<8),$t=ie[1]+((15&ie[2])<<8),Tr=this.coordsIndex[255-ie[3]],Ar=Tr&&this.sourceCache.getTileByID(Tr);if(!Ar)return null;let Kr=this._coordsTextureSize,na=(1<I.id!==ie),this._recentlyUsed.push(I.id)}stampObject(I){I.stamp=++this._stamp}getOrCreateFreeObject(){for(let ie of this._recentlyUsed)if(!this._objects[ie].inUse)return this._objects[ie];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");let I=this._createObject(this._objects.length);return this._objects.push(I),I}freeObject(I){I.inUse=!1}freeAllObjects(){for(let I of this._objects)this.freeObject(I)}isFull(){return!(this._objects.length!I.inUse)===!1}}let Ns={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0};class el{constructor(I,ie){this.painter=I,this.terrain=ie,this.pool=new rl(I.context,30,ie.sourceCache.tileSize*ie.qualityFactor)}destruct(){this.pool.destruct()}getTexture(I){return this.pool.getObjectForId(I.rtt[this._stacks.length-1].id).texture}prepareForRender(I,ie){this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.sourceCache.getRenderableTiles(),this._renderableLayerIds=I._order.filter(Te=>!I._layers[Te].isHidden(ie)),this._coordsDescendingInv={};for(let Te in I.sourceCaches){this._coordsDescendingInv[Te]={};let Me=I.sourceCaches[Te].getVisibleCoordinates();for(let ze of Me){let ht=this.terrain.sourceCache.getTerrainCoords(ze);for(let wt in ht)this._coordsDescendingInv[Te][wt]||(this._coordsDescendingInv[Te][wt]=[]),this._coordsDescendingInv[Te][wt].push(ht[wt])}}this._coordsDescendingInvStr={};for(let Te of I._order){let Me=I._layers[Te],ze=Me.source;if(Ns[Me.type]&&!this._coordsDescendingInvStr[ze]){this._coordsDescendingInvStr[ze]={};for(let ht in this._coordsDescendingInv[ze])this._coordsDescendingInvStr[ze][ht]=this._coordsDescendingInv[ze][ht].map(wt=>wt.key).sort().join()}}for(let Te of this._renderableTiles)for(let Me in this._coordsDescendingInvStr){let ze=this._coordsDescendingInvStr[Me][Te.tileID.key];ze&&ze!==Te.rttCoords[Me]&&(Te.rtt=[])}}renderLayer(I){if(I.isHidden(this.painter.transform.zoom))return!1;let ie=I.type,Te=this.painter,Me=this._renderableLayerIds[this._renderableLayerIds.length-1]===I.id;if(Ns[ie]&&(this._prevType&&Ns[this._prevType]||this._stacks.push([]),this._prevType=ie,this._stacks[this._stacks.length-1].push(I.id),!Me))return!0;if(Ns[this._prevType]||Ns[ie]&&Me){this._prevType=ie;let ze=this._stacks.length-1,ht=this._stacks[ze]||[];for(let wt of this._renderableTiles){if(this.pool.isFull()&&(yl(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(wt),wt.rtt[ze]){let $t=this.pool.getObjectForId(wt.rtt[ze].id);if($t.stamp===wt.rtt[ze].stamp){this.pool.useObject($t);continue}}let Ot=this.pool.getOrCreateFreeObject();this.pool.useObject(Ot),this.pool.stampObject(Ot),wt.rtt[ze]={id:Ot.id,stamp:Ot.stamp},Te.context.bindFramebuffer.set(Ot.fbo.framebuffer),Te.context.clear({color:t.aM.transparent,stencil:0}),Te.currentStencilSource=void 0;for(let $t=0;$t{Fe.touchstart=Fe.dragStart,Fe.touchmoveWindow=Fe.dragMove,Fe.touchend=Fe.dragEnd},jn={showCompass:!0,showZoom:!0,visualizePitch:!1};class Io{constructor(I,ie,Te=!1){this.mousedown=ht=>{this.startMouse(t.e({},ht,{ctrlKey:!0,preventDefault:()=>ht.preventDefault()}),i.mousePos(this.element,ht)),i.addEventListener(window,"mousemove",this.mousemove),i.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=ht=>{this.moveMouse(ht,i.mousePos(this.element,ht))},this.mouseup=ht=>{this.mouseRotate.dragEnd(ht),this.mousePitch&&this.mousePitch.dragEnd(ht),this.offTemp()},this.touchstart=ht=>{ht.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=i.touchPos(this.element,ht.targetTouches)[0],this.startTouch(ht,this._startPos),i.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),i.addEventListener(window,"touchend",this.touchend))},this.touchmove=ht=>{ht.targetTouches.length!==1?this.reset():(this._lastPos=i.touchPos(this.element,ht.targetTouches)[0],this.moveTouch(ht,this._lastPos))},this.touchend=ht=>{ht.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos){this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),this.touchRotate.reset(),this.touchPitch&&this.touchPitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()},this._clickTolerance=10;let Me=I.dragRotate._mouseRotate.getClickTolerance(),ze=I.dragRotate._mousePitch.getClickTolerance();this.element=ie,this.mouseRotate=iu({clickTolerance:Me,enable:!0}),this.touchRotate=(({enable:ht,clickTolerance:wt,bearingDegreesPerPixelMoved:Ot=.8})=>{let $t=new Kc;return new Hu({clickTolerance:wt,move:(Tr,Ar)=>({bearingDelta:(Ar.x-Tr.x)*Ot}),moveStateManager:$t,enable:ht,assignEvents:ll})})({clickTolerance:Me,enable:!0}),this.map=I,Te&&(this.mousePitch=Vf({clickTolerance:ze,enable:!0}),this.touchPitch=(({enable:ht,clickTolerance:wt,pitchDegreesPerPixelMoved:Ot=-.5})=>{let $t=new Kc;return new Hu({clickTolerance:wt,move:(Tr,Ar)=>({pitchDelta:(Ar.y-Tr.y)*Ot}),moveStateManager:$t,enable:ht,assignEvents:ll})})({clickTolerance:ze,enable:!0})),i.addEventListener(ie,"mousedown",this.mousedown),i.addEventListener(ie,"touchstart",this.touchstart,{passive:!1}),i.addEventListener(ie,"touchcancel",this.reset)}startMouse(I,ie){this.mouseRotate.dragStart(I,ie),this.mousePitch&&this.mousePitch.dragStart(I,ie),i.disableDrag()}startTouch(I,ie){this.touchRotate.dragStart(I,ie),this.touchPitch&&this.touchPitch.dragStart(I,ie),i.disableDrag()}moveMouse(I,ie){let Te=this.map,{bearingDelta:Me}=this.mouseRotate.dragMove(I,ie)||{};if(Me&&Te.setBearing(Te.getBearing()+Me),this.mousePitch){let{pitchDelta:ze}=this.mousePitch.dragMove(I,ie)||{};ze&&Te.setPitch(Te.getPitch()+ze)}}moveTouch(I,ie){let Te=this.map,{bearingDelta:Me}=this.touchRotate.dragMove(I,ie)||{};if(Me&&Te.setBearing(Te.getBearing()+Me),this.touchPitch){let{pitchDelta:ze}=this.touchPitch.dragMove(I,ie)||{};ze&&Te.setPitch(Te.getPitch()+ze)}}off(){let I=this.element;i.removeEventListener(I,"mousedown",this.mousedown),i.removeEventListener(I,"touchstart",this.touchstart,{passive:!1}),i.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),i.removeEventListener(window,"touchend",this.touchend),i.removeEventListener(I,"touchcancel",this.reset),this.offTemp()}offTemp(){i.enableDrag(),i.removeEventListener(window,"mousemove",this.mousemove),i.removeEventListener(window,"mouseup",this.mouseup),i.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),i.removeEventListener(window,"touchend",this.touchend)}}let Js;function Ds(Fe,I,ie){let Te=new t.N(Fe.lng,Fe.lat);if(Fe=new t.N(Fe.lng,Fe.lat),I){let Me=new t.N(Fe.lng-360,Fe.lat),ze=new t.N(Fe.lng+360,Fe.lat),ht=ie.locationPoint(Fe).distSqr(I);ie.locationPoint(Me).distSqr(I)180;){let Me=ie.locationPoint(Fe);if(Me.x>=0&&Me.y>=0&&Me.x<=ie.width&&Me.y<=ie.height)break;Fe.lng>ie.center.lng?Fe.lng-=360:Fe.lng+=360}return Fe.lng!==Te.lng&&ie.locationPoint(Fe).y>ie.height/2-ie.getHorizon()?Fe:Te}let uu={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function Iu(Fe,I,ie){let Te=Fe.classList;for(let Me in uu)Te.remove(`maplibregl-${ie}-anchor-${Me}`);Te.add(`maplibregl-${ie}-anchor-${I}`)}class Zu extends t.E{constructor(I){if(super(),this._onKeyPress=ie=>{let Te=ie.code,Me=ie.charCode||ie.keyCode;Te!=="Space"&&Te!=="Enter"&&Me!==32&&Me!==13||this.togglePopup()},this._onMapClick=ie=>{let Te=ie.originalEvent.target,Me=this._element;this._popup&&(Te===Me||Me.contains(Te))&&this.togglePopup()},this._update=ie=>{var Te;if(!this._map)return;let Me=this._map.loaded()&&!this._map.isMoving();(ie?.type==="terrain"||ie?.type==="render"&&!Me)&&this._map.once("render",this._update),this._lngLat=this._map.transform.renderWorldCopies?Ds(this._lngLat,this._flatPos,this._map.transform):(Te=this._lngLat)===null||Te===void 0?void 0:Te.wrap(),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map.transform.locationPoint(this._lngLat)._add(this._offset));let ze="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?ze=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(ze=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let ht="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?ht="rotateX(0deg)":this._pitchAlignment==="map"&&(ht=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||ie&&ie.type!=="moveend"||(this._pos=this._pos.round()),i.setTransform(this._element,`${uu[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${ht} ${ze}`),n.frameAsync(new AbortController).then(()=>{this._updateOpacity(ie&&ie.type==="moveend")}).catch(()=>{})},this._onMove=ie=>{if(!this._isDragging){let Te=this._clickTolerance||this._map._clickTolerance;this._isDragging=ie.point.dist(this._pointerdownPos)>=Te}this._isDragging&&(this._pos=ie.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 t.k("dragstart"))),this.fire(new t.k("drag")))},this._onUp=()=>{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 t.k("dragend")),this._state="inactive"},this._addDragHandler=ie=>{this._element.contains(ie.originalEvent.target)&&(ie.preventDefault(),this._positionDelta=ie.point.sub(this._pos).add(this._offset),this._pointerdownPos=ie.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))},this._anchor=I&&I.anchor||"center",this._color=I&&I.color||"#3FB1CE",this._scale=I&&I.scale||1,this._draggable=I&&I.draggable||!1,this._clickTolerance=I&&I.clickTolerance||0,this._subpixelPositioning=I&&I.subpixelPositioning||!1,this._isDragging=!1,this._state="inactive",this._rotation=I&&I.rotation||0,this._rotationAlignment=I&&I.rotationAlignment||"auto",this._pitchAlignment=I&&I.pitchAlignment&&I.pitchAlignment!=="auto"?I.pitchAlignment:this._rotationAlignment,this.setOpacity(),this.setOpacity(I?.opacity,I?.opacityWhenCovered),I&&I.element)this._element=I.element,this._offset=t.P.convert(I&&I.offset||[0,0]);else{this._defaultMarker=!0,this._element=i.create("div");let ie=i.createNS("http://www.w3.org/2000/svg","svg"),Te=41,Me=27;ie.setAttributeNS(null,"display","block"),ie.setAttributeNS(null,"height",`${Te}px`),ie.setAttributeNS(null,"width",`${Me}px`),ie.setAttributeNS(null,"viewBox",`0 0 ${Me} ${Te}`);let ze=i.createNS("http://www.w3.org/2000/svg","g");ze.setAttributeNS(null,"stroke","none"),ze.setAttributeNS(null,"stroke-width","1"),ze.setAttributeNS(null,"fill","none"),ze.setAttributeNS(null,"fill-rule","evenodd");let ht=i.createNS("http://www.w3.org/2000/svg","g");ht.setAttributeNS(null,"fill-rule","nonzero");let wt=i.createNS("http://www.w3.org/2000/svg","g");wt.setAttributeNS(null,"transform","translate(3.0, 29.0)"),wt.setAttributeNS(null,"fill","#000000");let Ot=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];for(let pt of Ot){let Et=i.createNS("http://www.w3.org/2000/svg","ellipse");Et.setAttributeNS(null,"opacity","0.04"),Et.setAttributeNS(null,"cx","10.5"),Et.setAttributeNS(null,"cy","5.80029008"),Et.setAttributeNS(null,"rx",pt.rx),Et.setAttributeNS(null,"ry",pt.ry),wt.appendChild(Et)}let $t=i.createNS("http://www.w3.org/2000/svg","g");$t.setAttributeNS(null,"fill",this._color);let Tr=i.createNS("http://www.w3.org/2000/svg","path");Tr.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),$t.appendChild(Tr);let Ar=i.createNS("http://www.w3.org/2000/svg","g");Ar.setAttributeNS(null,"opacity","0.25"),Ar.setAttributeNS(null,"fill","#000000");let Kr=i.createNS("http://www.w3.org/2000/svg","path");Kr.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),Ar.appendChild(Kr);let na=i.createNS("http://www.w3.org/2000/svg","g");na.setAttributeNS(null,"transform","translate(6.0, 7.0)"),na.setAttributeNS(null,"fill","#FFFFFF");let Ve=i.createNS("http://www.w3.org/2000/svg","g");Ve.setAttributeNS(null,"transform","translate(8.0, 8.0)");let $e=i.createNS("http://www.w3.org/2000/svg","circle");$e.setAttributeNS(null,"fill","#000000"),$e.setAttributeNS(null,"opacity","0.25"),$e.setAttributeNS(null,"cx","5.5"),$e.setAttributeNS(null,"cy","5.5"),$e.setAttributeNS(null,"r","5.4999962");let ot=i.createNS("http://www.w3.org/2000/svg","circle");ot.setAttributeNS(null,"fill","#FFFFFF"),ot.setAttributeNS(null,"cx","5.5"),ot.setAttributeNS(null,"cy","5.5"),ot.setAttributeNS(null,"r","5.4999962"),Ve.appendChild($e),Ve.appendChild(ot),ht.appendChild(wt),ht.appendChild($t),ht.appendChild(Ar),ht.appendChild(na),ht.appendChild(Ve),ie.appendChild(ht),ie.setAttributeNS(null,"height",Te*this._scale+"px"),ie.setAttributeNS(null,"width",Me*this._scale+"px"),this._element.appendChild(ie),this._offset=t.P.convert(I&&I.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",ie=>{ie.preventDefault()}),this._element.addEventListener("mousedown",ie=>{ie.preventDefault()}),Iu(this._element,this._anchor,"marker"),I&&I.className)for(let ie of I.className.split(" "))this._element.classList.add(ie);this._popup=null}addTo(I){return this.remove(),this._map=I,this._element.setAttribute("aria-label",I._getUIString("Marker.Title")),I.getCanvasContainer().appendChild(this._element),I.on("move",this._update),I.on("moveend",this._update),I.on("terrain",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this}remove(){return this._opacityTimeout&&(clearTimeout(this._opacityTimeout),delete this._opacityTimeout),this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("terrain",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),i.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(I){return this._lngLat=t.N.convert(I),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(I){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),I){if(!("offset"in I.options)){let Me=Math.abs(13.5)/Math.SQRT2;I.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[Me,-1*(38.1-13.5+Me)],"bottom-right":[-Me,-1*(38.1-13.5+Me)],left:[13.5,-1*(38.1-13.5)],right:[-13.5,-1*(38.1-13.5)]}:this._offset}this._popup=I,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(I){return this._subpixelPositioning=I,this}getPopup(){return this._popup}togglePopup(){let I=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:I?(I.isOpen()?I.remove():(I.setLngLat(this._lngLat),I.addTo(this._map)),this):this}_updateOpacity(I=!1){var ie,Te;if(!(!((ie=this._map)===null||ie===void 0)&&ie.terrain))return void(this._element.style.opacity!==this._opacity&&(this._element.style.opacity=this._opacity));if(I)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout(()=>{this._opacityTimeout=null},100)}let Me=this._map,ze=Me.terrain.depthAtPoint(this._pos),ht=Me.terrain.getElevationForLngLatZoom(this._lngLat,Me.transform.tileZoom);if(Me.transform.lngLatToCameraDepth(this._lngLat,ht)-ze<.006)return void(this._element.style.opacity=this._opacity);let wt=-this._offset.y/Me.transform._pixelPerMeter,Ot=Math.sin(Me.getPitch()*Math.PI/180)*wt,$t=Me.terrain.depthAtPoint(new t.P(this._pos.x,this._pos.y-this._offset.y)),Tr=Me.transform.lngLatToCameraDepth(this._lngLat,ht+Ot)-$t>.006;!((Te=this._popup)===null||Te===void 0)&&Te.isOpen()&&Tr&&this._popup.remove(),this._element.style.opacity=Tr?this._opacityWhenCovered:this._opacity}getOffset(){return this._offset}setOffset(I){return this._offset=t.P.convert(I),this._update(),this}addClassName(I){this._element.classList.add(I)}removeClassName(I){this._element.classList.remove(I)}toggleClassName(I){return this._element.classList.toggle(I)}setDraggable(I){return this._draggable=!!I,this._map&&(I?(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}isDraggable(){return this._draggable}setRotation(I){return this._rotation=I||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(I){return this._rotationAlignment=I||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(I){return this._pitchAlignment=I&&I!=="auto"?I:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(I,ie){return I===void 0&&ie===void 0&&(this._opacity="1",this._opacityWhenCovered="0.2"),I!==void 0&&(this._opacity=I),ie!==void 0&&(this._opacityWhenCovered=ie),this._map&&this._updateOpacity(!0),this}}let Ic={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},bu=0,Rc=!1,Au={maxWidth:100,unit:"metric"};function yc(Fe,I,ie){let Te=ie&&ie.maxWidth||100,Me=Fe._container.clientHeight/2,ze=Fe.unproject([0,Me]),ht=Fe.unproject([Te,Me]),wt=ze.distanceTo(ht);if(ie&&ie.unit==="imperial"){let Ot=3.2808*wt;Ot>5280?fo(I,Te,Ot/5280,Fe._getUIString("ScaleControl.Miles")):fo(I,Te,Ot,Fe._getUIString("ScaleControl.Feet"))}else ie&&ie.unit==="nautical"?fo(I,Te,wt/1852,Fe._getUIString("ScaleControl.NauticalMiles")):wt>=1e3?fo(I,Te,wt/1e3,Fe._getUIString("ScaleControl.Kilometers")):fo(I,Te,wt,Fe._getUIString("ScaleControl.Meters"))}function fo(Fe,I,ie,Te){let Me=function(ze){let ht=Math.pow(10,`${Math.floor(ze)}`.length-1),wt=ze/ht;return wt=wt>=10?10:wt>=5?5:wt>=3?3:wt>=2?2:wt>=1?1:function(Ot){let $t=Math.pow(10,Math.ceil(-Math.log(Ot)/Math.LN10));return Math.round(Ot*$t)/$t}(wt),ht*wt}(ie);Fe.style.width=I*(Me/ie)+"px",Fe.innerHTML=`${Me} ${Te}`}let zo={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1},Dc=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function lc(Fe){if(Fe){if(typeof Fe=="number"){let I=Math.round(Math.abs(Fe)/Math.SQRT2);return{center:new t.P(0,0),top:new t.P(0,Fe),"top-left":new t.P(I,I),"top-right":new t.P(-I,I),bottom:new t.P(0,-Fe),"bottom-left":new t.P(I,-I),"bottom-right":new t.P(-I,-I),left:new t.P(Fe,0),right:new t.P(-Fe,0)}}if(Fe instanceof t.P||Array.isArray(Fe)){let I=t.P.convert(Fe);return{center:I,top:I,"top-left":I,"top-right":I,bottom:I,"bottom-left":I,"bottom-right":I,left:I,right:I}}return{center:t.P.convert(Fe.center||[0,0]),top:t.P.convert(Fe.top||[0,0]),"top-left":t.P.convert(Fe["top-left"]||[0,0]),"top-right":t.P.convert(Fe["top-right"]||[0,0]),bottom:t.P.convert(Fe.bottom||[0,0]),"bottom-left":t.P.convert(Fe["bottom-left"]||[0,0]),"bottom-right":t.P.convert(Fe["bottom-right"]||[0,0]),left:t.P.convert(Fe.left||[0,0]),right:t.P.convert(Fe.right||[0,0])}}return lc(new t.P(0,0))}let Yu=r;e.AJAXError=t.bh,e.Evented=t.E,e.LngLat=t.N,e.MercatorCoordinate=t.Z,e.Point=t.P,e.addProtocol=t.bi,e.config=t.a,e.removeProtocol=t.bj,e.AttributionControl=co,e.BoxZoomHandler=Pu,e.CanvasSource=tt,e.CooperativeGesturesHandler=Di,e.DoubleClickZoomHandler=li,e.DragPanHandler=Qi,e.DragRotateHandler=pn,e.EdgeInsets=yu,e.FullscreenControl=class extends t.E{constructor(Fe={}){super(),this._onFullscreenChange=()=>{var I;let ie=window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement;for(;!((I=ie?.shadowRoot)===null||I===void 0)&&I.fullscreenElement;)ie=ie.shadowRoot.fullscreenElement;ie===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,Fe&&Fe.container&&(Fe.container instanceof HTMLElement?this._container=Fe.container:t.w("Full screen control 'container' must be a DOM element.")),"onfullscreenchange"in document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in document&&(this._fullscreenchange="MSFullscreenChange")}onAdd(Fe){return this._map=Fe,this._container||(this._container=this._map.getContainer()),this._controlContainer=i.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){i.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){let Fe=this._fullscreenButton=i.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);i.create("span","maplibregl-ctrl-icon",Fe).setAttribute("aria-hidden","true"),Fe.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){let Fe=this._getTitle();this._fullscreenButton.setAttribute("aria-label",Fe),this._fullscreenButton.title=Fe}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_handleFullscreenChange(){this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("maplibregl-ctrl-shrink"),this._fullscreenButton.classList.toggle("maplibregl-ctrl-fullscreen"),this._updateTitle(),this._fullscreen?(this.fire(new t.k("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new t.k("fullscreenend")),this._prevCooperativeGesturesEnabled&&this._map.cooperativeGestures.enable())}_exitFullscreen(){window.document.exitFullscreen?window.document.exitFullscreen():window.document.mozCancelFullScreen?window.document.mozCancelFullScreen():window.document.msExitFullscreen?window.document.msExitFullscreen():window.document.webkitCancelFullScreen?window.document.webkitCancelFullScreen():this._togglePseudoFullScreen()}_requestFullscreen(){this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen?this._container.webkitRequestFullscreen():this._togglePseudoFullScreen()}_togglePseudoFullScreen(){this._container.classList.toggle("maplibregl-pseudo-fullscreen"),this._handleFullscreenChange(),this._map.resize()}},e.GeoJSONSource=Re,e.GeolocateControl=class extends t.E{constructor(Fe){super(),this._onSuccess=I=>{if(this._map){if(this._isOutOfMapMaxBounds(I))return this._setErrorState(),this.fire(new t.k("outofmaxbounds",I)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=I,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background");break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(I),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(I),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new t.k("geolocate",I)),this._finish()}},this._updateCamera=I=>{let ie=new t.N(I.coords.longitude,I.coords.latitude),Te=I.coords.accuracy,Me=this._map.getBearing(),ze=t.e({bearing:Me},this.options.fitBoundsOptions),ht=re.fromLngLat(ie,Te);this._map.fitBounds(ht,ze,{geolocateSource:!0})},this._updateMarker=I=>{if(I){let ie=new t.N(I.coords.longitude,I.coords.latitude);this._accuracyCircleMarker.setLngLat(ie).addTo(this._map),this._userLocationDotMarker.setLngLat(ie).addTo(this._map),this._accuracy=I.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onZoom=()=>{this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},this._onError=I=>{if(this._map){if(this.options.trackUserLocation)if(I.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;let ie=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=ie,this._geolocateButton.setAttribute("aria-label",ie),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(I.code===3&&Rc)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new t.k("error",I)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",I=>I.preventDefault()),this._geolocateButton=i.create("button","maplibregl-ctrl-geolocate",this._container),i.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=I=>{if(this._map){if(I===!1){t.w("Geolocation support is not available so the GeolocateControl will be disabled.");let ie=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=ie,this._geolocateButton.setAttribute("aria-label",ie)}else{let ie=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=ie,this._geolocateButton.setAttribute("aria-label",ie)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=i.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new Zu({element:this._dotElement}),this._circleElement=i.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Zu({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",()=>this.trigger()),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",ie=>{ie.geolocateSource||this._watchState!=="ACTIVE_LOCK"||ie.originalEvent&&ie.originalEvent.type==="resize"||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new t.k("trackuserlocationend")),this.fire(new t.k("userlocationlostfocus")))})}},this.options=t.e({},Ic,Fe)}onAdd(Fe){return this._map=Fe,this._container=i.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),function(){return t._(this,arguments,void 0,function*(I=!1){if(Js!==void 0&&!I)return Js;if(window.navigator.permissions===void 0)return Js=!!window.navigator.geolocation,Js;try{Js=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch{Js=!!window.navigator.geolocation}return Js})}().then(I=>this._finishSetupUI(I)),this._container}onRemove(){this._geolocationWatchID!==void 0&&(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(),i.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,bu=0,Rc=!1}_isOutOfMapMaxBounds(Fe){let I=this._map.getMaxBounds(),ie=Fe.coords;return I&&(ie.longitudeI.getEast()||ie.latitudeI.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"ACTIVE_ERROR":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadius(){let Fe=this._map.getBounds(),I=Fe.getSouthEast(),ie=Fe.getNorthEast(),Te=I.distanceTo(ie),Me=Math.ceil(this._accuracy/(Te/this._map._container.clientHeight)*2);this._circleElement.style.width=`${Me}px`,this._circleElement.style.height=`${Me}px`}trigger(){if(!this._setup)return t.w("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 t.k("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":bu--,Rc=!1,this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this.fire(new t.k("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new t.k("trackuserlocationstart")),this.fire(new t.k("userlocationfocus"));break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"OFF":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){let Fe;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),bu++,bu>1?(Fe={maximumAge:6e5,timeout:0},Rc=!0):(Fe=this.options.positionOptions,Rc=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,Fe)}}else window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0}_clearWatch(){window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}},e.Hash=Qf,e.ImageSource=at,e.KeyboardHandler=br,e.LngLatBounds=re,e.LogoControl=Tn,e.Map=class extends no{constructor(Fe){t.bf.mark(t.bg.create);let I=Object.assign(Object.assign({},_l),Fe);if(I.minZoom!=null&&I.maxZoom!=null&&I.minZoom>I.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(I.minPitch!=null&&I.maxPitch!=null&&I.minPitch>I.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(I.minPitch!=null&&I.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(I.maxPitch!=null&&I.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(super(new El(I.minZoom,I.maxZoom,I.minPitch,I.maxPitch,I.renderWorldCopies),{bearingSnap:I.bearingSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new un,this._controls=[],this._mapId=t.a4(),this._contextLost=ie=>{ie.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.fire(new t.k("webglcontextlost",{originalEvent:ie}))},this._contextRestored=ie=>{this._setupPainter(),this.resize(),this._update(),this.fire(new t.k("webglcontextrestored",{originalEvent:ie}))},this._onMapScroll=ie=>{if(ie.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=I.interactive,this._maxTileCacheSize=I.maxTileCacheSize,this._maxTileCacheZoomLevels=I.maxTileCacheZoomLevels,this._failIfMajorPerformanceCaveat=I.failIfMajorPerformanceCaveat===!0,this._preserveDrawingBuffer=I.preserveDrawingBuffer===!0,this._antialias=I.antialias===!0,this._trackResize=I.trackResize===!0,this._bearingSnap=I.bearingSnap,this._refreshExpiredTiles=I.refreshExpiredTiles===!0,this._fadeDuration=I.fadeDuration,this._crossSourceCollisions=I.crossSourceCollisions===!0,this._collectResourceTiming=I.collectResourceTiming===!0,this._locale=Object.assign(Object.assign({},ws),I.locale),this._clickTolerance=I.clickTolerance,this._overridePixelRatio=I.pixelRatio,this._maxCanvasSize=I.maxCanvasSize,this.transformCameraUpdate=I.transformCameraUpdate,this.cancelPendingTileRequestsWhileZooming=I.cancelPendingTileRequestsWhileZooming===!0,this._imageQueueHandle=l.addThrottleControl(()=>this.isMoving()),this._requestManager=new _(I.transformRequest),typeof I.container=="string"){if(this._container=document.getElementById(I.container),!this._container)throw new Error(`Container '${I.container}' not found.`)}else{if(!(I.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=I.container}if(I.maxBounds&&this.setMaxBounds(I.maxBounds),this._setupContainer(),this._setupPainter(),this.on("move",()=>this._update(!1)).on("moveend",()=>this._update(!1)).on("zoom",()=>this._update(!0)).on("terrain",()=>{this.painter.terrainFacilitator.dirty=!0,this._update(!0)}).once("idle",()=>{this._idleTriggered=!0}),typeof window<"u"){addEventListener("online",this._onWindowOnline,!1);let ie=!1,Te=qf(Me=>{this._trackResize&&!this._removed&&(this.resize(Me),this.redraw())},50);this._resizeObserver=new ResizeObserver(Me=>{ie?Te(Me):ie=!0}),this._resizeObserver.observe(this._container)}this.handlers=new $n(this,I),this._hash=I.hash&&new Qf(typeof I.hash=="string"&&I.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:I.center,zoom:I.zoom,bearing:I.bearing,pitch:I.pitch}),I.bounds&&(this.resize(),this.fitBounds(I.bounds,t.e({},I.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=I.localIdeographFontFamily,this._validateStyle=I.validateStyle,I.style&&this.setStyle(I.style,{localIdeographFontFamily:I.localIdeographFontFamily}),I.attributionControl&&this.addControl(new co(typeof I.attributionControl=="boolean"?void 0:I.attributionControl)),I.maplibreLogo&&this.addControl(new Tn,I.logoPosition),this.on("style.load",()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet)}),this.on("data",ie=>{this._update(ie.dataType==="style"),this.fire(new t.k(`${ie.dataType}data`,ie))}),this.on("dataloading",ie=>{this.fire(new t.k(`${ie.dataType}dataloading`,ie))}),this.on("dataabort",ie=>{this.fire(new t.k("sourcedataabort",ie))})}_getMapId(){return this._mapId}addControl(Fe,I){if(I===void 0&&(I=Fe.getDefaultPosition?Fe.getDefaultPosition():"top-right"),!Fe||!Fe.onAdd)return this.fire(new t.j(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));let ie=Fe.onAdd(this);this._controls.push(Fe);let Te=this._controlPositions[I];return I.indexOf("bottom")!==-1?Te.insertBefore(ie,Te.firstChild):Te.appendChild(ie),this}removeControl(Fe){if(!Fe||!Fe.onRemove)return this.fire(new t.j(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));let I=this._controls.indexOf(Fe);return I>-1&&this._controls.splice(I,1),Fe.onRemove(this),this}hasControl(Fe){return this._controls.indexOf(Fe)>-1}calculateCameraOptionsFromTo(Fe,I,ie,Te){return Te==null&&this.terrain&&(Te=this.terrain.getElevationForLngLatZoom(ie,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(Fe,I,ie,Te)}resize(Fe){var I;let ie=this._containerDimensions(),Te=ie[0],Me=ie[1],ze=this._getClampedPixelRatio(Te,Me);if(this._resizeCanvas(Te,Me,ze),this.painter.resize(Te,Me,ze),this.painter.overLimit()){let wt=this.painter.context.gl;this._maxCanvasSize=[wt.drawingBufferWidth,wt.drawingBufferHeight];let Ot=this._getClampedPixelRatio(Te,Me);this._resizeCanvas(Te,Me,Ot),this.painter.resize(Te,Me,Ot)}this.transform.resize(Te,Me),(I=this._requestedCameraState)===null||I===void 0||I.resize(Te,Me);let ht=!this._moving;return ht&&(this.stop(),this.fire(new t.k("movestart",Fe)).fire(new t.k("move",Fe))),this.fire(new t.k("resize",Fe)),ht&&this.fire(new t.k("moveend",Fe)),this}_getClampedPixelRatio(Fe,I){let{0:ie,1:Te}=this._maxCanvasSize,Me=this.getPixelRatio(),ze=Fe*Me,ht=I*Me;return Math.min(ze>ie?ie/ze:1,ht>Te?Te/ht:1)*Me}getPixelRatio(){var Fe;return(Fe=this._overridePixelRatio)!==null&&Fe!==void 0?Fe:devicePixelRatio}setPixelRatio(Fe){this._overridePixelRatio=Fe,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(Fe){return this.transform.setMaxBounds(re.convert(Fe)),this._update()}setMinZoom(Fe){if((Fe=Fe??-2)>=-2&&Fe<=this.transform.maxZoom)return this.transform.minZoom=Fe,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=Fe,this._update(),this.getZoom()>Fe&&this.setZoom(Fe),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(Fe){if((Fe=Fe??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(Fe>=0&&Fe<=this.transform.maxPitch)return this.transform.minPitch=Fe,this._update(),this.getPitch()85)throw new Error("maxPitch must be less than or equal to 85");if(Fe>=this.transform.minPitch)return this.transform.maxPitch=Fe,this._update(),this.getPitch()>Fe&&this.setPitch(Fe),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(Fe){return this.transform.renderWorldCopies=Fe,this._update()}project(Fe){return this.transform.locationPoint(t.N.convert(Fe),this.style&&this.terrain)}unproject(Fe){return this.transform.pointLocation(t.P.convert(Fe),this.terrain)}isMoving(){var Fe;return this._moving||((Fe=this.handlers)===null||Fe===void 0?void 0:Fe.isMoving())}isZooming(){var Fe;return this._zooming||((Fe=this.handlers)===null||Fe===void 0?void 0:Fe.isZooming())}isRotating(){var Fe;return this._rotating||((Fe=this.handlers)===null||Fe===void 0?void 0:Fe.isRotating())}_createDelegatedListener(Fe,I,ie){if(Fe==="mouseenter"||Fe==="mouseover"){let Te=!1;return{layers:I,listener:ie,delegates:{mousemove:ze=>{let ht=I.filter(Ot=>this.getLayer(Ot)),wt=ht.length!==0?this.queryRenderedFeatures(ze.point,{layers:ht}):[];wt.length?Te||(Te=!0,ie.call(this,new au(Fe,this,ze.originalEvent,{features:wt}))):Te=!1},mouseout:()=>{Te=!1}}}}if(Fe==="mouseleave"||Fe==="mouseout"){let Te=!1;return{layers:I,listener:ie,delegates:{mousemove:ht=>{let wt=I.filter(Ot=>this.getLayer(Ot));(wt.length!==0?this.queryRenderedFeatures(ht.point,{layers:wt}):[]).length?Te=!0:Te&&(Te=!1,ie.call(this,new au(Fe,this,ht.originalEvent)))},mouseout:ht=>{Te&&(Te=!1,ie.call(this,new au(Fe,this,ht.originalEvent)))}}}}{let Te=Me=>{let ze=I.filter(wt=>this.getLayer(wt)),ht=ze.length!==0?this.queryRenderedFeatures(Me.point,{layers:ze}):[];ht.length&&(Me.features=ht,ie.call(this,Me),delete Me.features)};return{layers:I,listener:ie,delegates:{[Fe]:Te}}}}_saveDelegatedListener(Fe,I){this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[Fe]=this._delegatedListeners[Fe]||[],this._delegatedListeners[Fe].push(I)}_removeDelegatedListener(Fe,I,ie){if(!this._delegatedListeners||!this._delegatedListeners[Fe])return;let Te=this._delegatedListeners[Fe];for(let Me=0;MeI.includes(ht))){for(let ht in ze.delegates)this.off(ht,ze.delegates[ht]);return void Te.splice(Me,1)}}}on(Fe,I,ie){if(ie===void 0)return super.on(Fe,I);let Te=this._createDelegatedListener(Fe,typeof I=="string"?[I]:I,ie);this._saveDelegatedListener(Fe,Te);for(let Me in Te.delegates)this.on(Me,Te.delegates[Me]);return this}once(Fe,I,ie){if(ie===void 0)return super.once(Fe,I);let Te=typeof I=="string"?[I]:I,Me=this._createDelegatedListener(Fe,Te,ie);for(let ze in Me.delegates){let ht=Me.delegates[ze];Me.delegates[ze]=(...wt)=>{this._removeDelegatedListener(Fe,Te,ie),ht(...wt)}}this._saveDelegatedListener(Fe,Me);for(let ze in Me.delegates)this.once(ze,Me.delegates[ze]);return this}off(Fe,I,ie){return ie===void 0?super.off(Fe,I):(this._removeDelegatedListener(Fe,typeof I=="string"?[I]:I,ie),this)}queryRenderedFeatures(Fe,I){if(!this.style)return[];let ie,Te=Fe instanceof t.P||Array.isArray(Fe),Me=Te?Fe:[[0,0],[this.transform.width,this.transform.height]];if(I=I||(Te?{}:Fe)||{},Me instanceof t.P||typeof Me[0]=="number")ie=[t.P.convert(Me)];else{let ze=t.P.convert(Me[0]),ht=t.P.convert(Me[1]);ie=[ze,new t.P(ht.x,ze.y),ht,new t.P(ze.x,ht.y),ze]}return this.style.queryRenderedFeatures(ie,I,this.transform)}querySourceFeatures(Fe,I){return this.style.querySourceFeatures(Fe,I)}setStyle(Fe,I){return(I=t.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},I)).diff!==!1&&I.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&Fe?(this._diffStyle(Fe,I),this):(this._localIdeographFontFamily=I.localIdeographFontFamily,this._updateStyle(Fe,I))}setTransformRequest(Fe){return this._requestManager.setTransformRequest(Fe),this}_getUIString(Fe){let I=this._locale[Fe];if(I==null)throw new Error(`Missing UI string '${Fe}'`);return I}_updateStyle(Fe,I){if(I.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",()=>this._updateStyle(Fe,I));let ie=this.style&&I.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!Fe)),Fe?(this.style=new Rr(this,I||{}),this.style.setEventedParent(this,{style:this.style}),typeof Fe=="string"?this.style.loadURL(Fe,I,ie):this.style.loadJSON(Fe,I,ie),this):(delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new Rr(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(Fe,I){if(typeof Fe=="string"){let ie=this._requestManager.transformRequest(Fe,"Style");t.h(ie,new AbortController).then(Te=>{this._updateDiff(Te.data,I)}).catch(Te=>{Te&&this.fire(new t.j(Te))})}else typeof Fe=="object"&&this._updateDiff(Fe,I)}_updateDiff(Fe,I){try{this.style.setState(Fe,I)&&this._update(!0)}catch(ie){t.w(`Unable to perform style diff: ${ie.message||ie.error||ie}. Rebuilding the style from scratch.`),this._updateStyle(Fe,I)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():t.w("There is no style added to the map.")}addSource(Fe,I){return this._lazyInitEmptyStyle(),this.style.addSource(Fe,I),this._update(!0)}isSourceLoaded(Fe){let I=this.style&&this.style.sourceCaches[Fe];if(I!==void 0)return I.loaded();this.fire(new t.j(new Error(`There is no source with ID '${Fe}'`)))}setTerrain(Fe){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),Fe){let I=this.style.sourceCaches[Fe.source];if(!I)throw new Error(`cannot load terrain, because there exists no source with ID: ${Fe.source}`);this.terrain===null&&I.reload();for(let ie in this.style._layers){let Te=this.style._layers[ie];Te.type==="hillshade"&&Te.source===Fe.source&&t.w("You are using the same source for a hillshade layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.")}this.terrain=new Ms(this.painter,I,Fe),this.painter.renderToTexture=new el(this.painter,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._terrainDataCallback=ie=>{ie.dataType==="style"?this.terrain.sourceCache.freeRtt():ie.dataType==="source"&&ie.tile&&(ie.sourceId!==Fe.source||this._elevationFreeze||(this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.terrain.sourceCache.freeRtt(ie.tile.tileID))},this.style.on("data",this._terrainDataCallback)}else this.terrain&&this.terrain.sourceCache.destruct(),this.terrain=null,this.painter.renderToTexture&&this.painter.renderToTexture.destruct(),this.painter.renderToTexture=null,this.transform.minElevationForCurrentTile=0,this.transform.elevation=0;return this.fire(new t.k("terrain",{terrain:Fe})),this}getTerrain(){var Fe,I;return(I=(Fe=this.terrain)===null||Fe===void 0?void 0:Fe.options)!==null&&I!==void 0?I:null}areTilesLoaded(){let Fe=this.style&&this.style.sourceCaches;for(let I in Fe){let ie=Fe[I]._tiles;for(let Te in ie){let Me=ie[Te];if(Me.state!=="loaded"&&Me.state!=="errored")return!1}}return!0}removeSource(Fe){return this.style.removeSource(Fe),this._update(!0)}getSource(Fe){return this.style.getSource(Fe)}addImage(Fe,I,ie={}){let{pixelRatio:Te=1,sdf:Me=!1,stretchX:ze,stretchY:ht,content:wt,textFitWidth:Ot,textFitHeight:$t}=ie;if(this._lazyInitEmptyStyle(),!(I instanceof HTMLImageElement||t.b(I))){if(I.width===void 0||I.height===void 0)return this.fire(new t.j(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));{let{width:Tr,height:Ar,data:Kr}=I,na=I;return this.style.addImage(Fe,{data:new t.R({width:Tr,height:Ar},new Uint8Array(Kr)),pixelRatio:Te,stretchX:ze,stretchY:ht,content:wt,textFitWidth:Ot,textFitHeight:$t,sdf:Me,version:0,userImage:na}),na.onAdd&&na.onAdd(this,Fe),this}}{let{width:Tr,height:Ar,data:Kr}=n.getImageData(I);this.style.addImage(Fe,{data:new t.R({width:Tr,height:Ar},Kr),pixelRatio:Te,stretchX:ze,stretchY:ht,content:wt,textFitWidth:Ot,textFitHeight:$t,sdf:Me,version:0})}}updateImage(Fe,I){let ie=this.style.getImage(Fe);if(!ie)return this.fire(new t.j(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));let Te=I instanceof HTMLImageElement||t.b(I)?n.getImageData(I):I,{width:Me,height:ze,data:ht}=Te;if(Me===void 0||ze===void 0)return this.fire(new t.j(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));if(Me!==ie.data.width||ze!==ie.data.height)return this.fire(new t.j(new Error("The width and height of the updated image must be that same as the previous version of the image")));let wt=!(I instanceof HTMLImageElement||t.b(I));return ie.data.replace(ht,wt),this.style.updateImage(Fe,ie),this}getImage(Fe){return this.style.getImage(Fe)}hasImage(Fe){return Fe?!!this.style.getImage(Fe):(this.fire(new t.j(new Error("Missing required image id"))),!1)}removeImage(Fe){this.style.removeImage(Fe)}loadImage(Fe){return l.getImage(this._requestManager.transformRequest(Fe,"Image"),new AbortController)}listImages(){return this.style.listImages()}addLayer(Fe,I){return this._lazyInitEmptyStyle(),this.style.addLayer(Fe,I),this._update(!0)}moveLayer(Fe,I){return this.style.moveLayer(Fe,I),this._update(!0)}removeLayer(Fe){return this.style.removeLayer(Fe),this._update(!0)}getLayer(Fe){return this.style.getLayer(Fe)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(Fe,I,ie){return this.style.setLayerZoomRange(Fe,I,ie),this._update(!0)}setFilter(Fe,I,ie={}){return this.style.setFilter(Fe,I,ie),this._update(!0)}getFilter(Fe){return this.style.getFilter(Fe)}setPaintProperty(Fe,I,ie,Te={}){return this.style.setPaintProperty(Fe,I,ie,Te),this._update(!0)}getPaintProperty(Fe,I){return this.style.getPaintProperty(Fe,I)}setLayoutProperty(Fe,I,ie,Te={}){return this.style.setLayoutProperty(Fe,I,ie,Te),this._update(!0)}getLayoutProperty(Fe,I){return this.style.getLayoutProperty(Fe,I)}setGlyphs(Fe,I={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(Fe,I),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(Fe,I,ie={}){return this._lazyInitEmptyStyle(),this.style.addSprite(Fe,I,ie,Te=>{Te||this._update(!0)}),this}removeSprite(Fe){return this._lazyInitEmptyStyle(),this.style.removeSprite(Fe),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(Fe,I={}){return this._lazyInitEmptyStyle(),this.style.setSprite(Fe,I,ie=>{ie||this._update(!0)}),this}setLight(Fe,I={}){return this._lazyInitEmptyStyle(),this.style.setLight(Fe,I),this._update(!0)}getLight(){return this.style.getLight()}setSky(Fe){return this._lazyInitEmptyStyle(),this.style.setSky(Fe),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(Fe,I){return this.style.setFeatureState(Fe,I),this._update()}removeFeatureState(Fe,I){return this.style.removeFeatureState(Fe,I),this._update()}getFeatureState(Fe){return this.style.getFeatureState(Fe)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let Fe=0,I=0;return this._container&&(Fe=this._container.clientWidth||400,I=this._container.clientHeight||300),[Fe,I]}_setupContainer(){let Fe=this._container;Fe.classList.add("maplibregl-map");let I=this._canvasContainer=i.create("div","maplibregl-canvas-container",Fe);this._interactive&&I.classList.add("maplibregl-interactive"),this._canvas=i.create("canvas","maplibregl-canvas",I),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex",this._interactive?"0":"-1"),this._canvas.setAttribute("aria-label",this._getUIString("Map.Title")),this._canvas.setAttribute("role","region");let ie=this._containerDimensions(),Te=this._getClampedPixelRatio(ie[0],ie[1]);this._resizeCanvas(ie[0],ie[1],Te);let Me=this._controlContainer=i.create("div","maplibregl-control-container",Fe),ze=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(ht=>{ze[ht]=i.create("div",`maplibregl-ctrl-${ht} `,Me)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(Fe,I,ie){this._canvas.width=Math.floor(ie*Fe),this._canvas.height=Math.floor(ie*I),this._canvas.style.width=`${Fe}px`,this._canvas.style.height=`${I}px`}_setupPainter(){let Fe={alpha:!0,stencil:!0,depth:!0,failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1},I=null;this._canvas.addEventListener("webglcontextcreationerror",Te=>{I={requestedAttributes:Fe},Te&&(I.statusMessage=Te.statusMessage,I.type=Te.type)},{once:!0});let ie=this._canvas.getContext("webgl2",Fe)||this._canvas.getContext("webgl",Fe);if(!ie){let Te="Failed to initialize WebGL";throw I?(I.message=Te,new Error(JSON.stringify(I))):new Error(Te)}this.painter=new Mc(ie,this.transform),s.testSupport(ie)}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(Fe){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||Fe,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(Fe){return this._update(),this._renderTaskQueue.add(Fe)}_cancelRenderFrame(Fe){this._renderTaskQueue.remove(Fe)}_render(Fe){let I=this._idleTriggered?this._fadeDuration:0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(Fe),this._removed)return;let ie=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;let Me=this.transform.zoom,ze=n.now();this.style.zoomHistory.update(Me,ze);let ht=new t.z(Me,{now:ze,fadeDuration:I,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),wt=ht.crossFadingFactor();wt===1&&wt===this._crossFadingFactor||(ie=!0,this._crossFadingFactor=wt),this.style.update(ht)}this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.sourceCache.update(this.transform,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._elevationFreeze||(this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))):(this.transform.minElevationForCurrentTile=0,this.transform.elevation=0),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,I,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:I,showPadding:this.showPadding}),this.fire(new t.k("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,t.bf.mark(t.bg.load),this.fire(new t.k("load"))),this.style&&(this.style.hasTransitions()||ie)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();let Te=this._sourcesDirty||this._styleDirty||this._placementDirty;return Te||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new t.k("idle")),!this._loaded||this._fullyLoaded||Te||(this._fullyLoaded=!0,t.bf.mark(t.bg.fullLoad)),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var Fe;this._hash&&this._hash.remove();for(let ie of this._controls)ie.onRemove(this);this._controls=[],this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),typeof window<"u"&&removeEventListener("online",this._onWindowOnline,!1),l.removeThrottleControl(this._imageQueueHandle),(Fe=this._resizeObserver)===null||Fe===void 0||Fe.disconnect();let I=this.painter.context.gl.getExtension("WEBGL_lose_context");I?.loseContext&&I.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),i.remove(this._canvasContainer),i.remove(this._controlContainer),this._container.classList.remove("maplibregl-map"),t.bf.clearMetrics(),this._removed=!0,this.fire(new t.k("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,n.frameAsync(this._frameRequest).then(Fe=>{t.bf.frame(Fe),this._frameRequest=null,this._render(Fe)}).catch(()=>{}))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(Fe){this._showTileBoundaries!==Fe&&(this._showTileBoundaries=Fe,this._update())}get showPadding(){return!!this._showPadding}set showPadding(Fe){this._showPadding!==Fe&&(this._showPadding=Fe,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(Fe){this._showCollisionBoxes!==Fe&&(this._showCollisionBoxes=Fe,Fe?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(Fe){this._showOverdrawInspector!==Fe&&(this._showOverdrawInspector=Fe,this._update())}get repaint(){return!!this._repaint}set repaint(Fe){this._repaint!==Fe&&(this._repaint=Fe,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(Fe){this._vertices=Fe,this._update()}get version(){return Fl}getCameraTargetElevation(){return this.transform.elevation}},e.MapMouseEvent=au,e.MapTouchEvent=Yc,e.MapWheelEvent=hh,e.Marker=Zu,e.NavigationControl=class{constructor(Fe){this._updateZoomButtons=()=>{let I=this._map.getZoom(),ie=I===this._map.getMaxZoom(),Te=I===this._map.getMinZoom();this._zoomInButton.disabled=ie,this._zoomOutButton.disabled=Te,this._zoomInButton.setAttribute("aria-disabled",ie.toString()),this._zoomOutButton.setAttribute("aria-disabled",Te.toString())},this._rotateCompassArrow=()=>{let I=this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(this._map.transform.pitch*(Math.PI/180)),.5)}) rotateX(${this._map.transform.pitch}deg) rotateZ(${this._map.transform.angle*(180/Math.PI)}deg)`:`rotate(${this._map.transform.angle*(180/Math.PI)}deg)`;this._compassIcon.style.transform=I},this._setButtonTitle=(I,ie)=>{let Te=this._map._getUIString(`NavigationControl.${ie}`);I.title=Te,I.setAttribute("aria-label",Te)},this.options=t.e({},jn,Fe),this._container=i.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",I=>I.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",I=>this._map.zoomIn({},{originalEvent:I})),i.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",I=>this._map.zoomOut({},{originalEvent:I})),i.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",I=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:I}):this._map.resetNorth({},{originalEvent:I})}),this._compassIcon=i.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(Fe){return this._map=Fe,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new Io(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){i.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(Fe,I){let ie=i.create("button",Fe,this._container);return ie.type="button",ie.addEventListener("click",I),ie}},e.Popup=class extends t.E{constructor(Fe){super(),this.remove=()=>(this._content&&i.remove(this._content),this._container&&(i.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),this._map._canvasContainer.classList.remove("maplibregl-track-pointer"),delete this._map,this.fire(new t.k("close"))),this),this._onMouseUp=I=>{this._update(I.point)},this._onMouseMove=I=>{this._update(I.point)},this._onDrag=I=>{this._update(I.point)},this._update=I=>{var ie;if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=i.create("div","maplibregl-popup",this._map.getContainer()),this._tip=i.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(let wt of this.options.className.split(" "))this._container.classList.add(wt);this._closeButton&&this._closeButton.setAttribute("aria-label",this._map._getUIString("Popup.Close")),this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer")}if(this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._lngLat=this._map.transform.renderWorldCopies&&!this._trackPointer?Ds(this._lngLat,this._flatPos,this._map.transform):(ie=this._lngLat)===null||ie===void 0?void 0:ie.wrap(),this._trackPointer&&!I)return;let Te=this._flatPos=this._pos=this._trackPointer&&I?I:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&I?I:this._map.transform.locationPoint(this._lngLat));let Me=this.options.anchor,ze=lc(this.options.offset);if(!Me){let wt=this._container.offsetWidth,Ot=this._container.offsetHeight,$t;$t=Te.y+ze.bottom.ythis._map.transform.height-Ot?["bottom"]:[],Te.xthis._map.transform.width-wt/2&&$t.push("right"),Me=$t.length===0?"bottom":$t.join("-")}let ht=Te.add(ze[Me]);this.options.subpixelPositioning||(ht=ht.round()),i.setTransform(this._container,`${uu[Me]} translate(${ht.x}px,${ht.y}px)`),Iu(this._container,Me,"popup")},this._onClose=()=>{this.remove()},this.options=t.e(Object.create(zo),Fe)}addTo(Fe){return this._map&&this.remove(),this._map=Fe,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("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")):this._map.on("move",this._update),this.fire(new t.k("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(Fe){return this._lngLat=t.N.convert(Fe),this._pos=null,this._flatPos=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("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.remove("maplibregl-track-pointer")),this}trackPointer(){return this._trackPointer=!0,this._pos=null,this._flatPos=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("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")),this}getElement(){return this._container}setText(Fe){return this.setDOMContent(document.createTextNode(Fe))}setHTML(Fe){let I=document.createDocumentFragment(),ie=document.createElement("body"),Te;for(ie.innerHTML=Fe;Te=ie.firstChild,Te;)I.appendChild(Te);return this.setDOMContent(I)}getMaxWidth(){var Fe;return(Fe=this._container)===null||Fe===void 0?void 0:Fe.style.maxWidth}setMaxWidth(Fe){return this.options.maxWidth=Fe,this._update(),this}setDOMContent(Fe){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=i.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(Fe),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(Fe){return this._container&&this._container.classList.add(Fe),this}removeClassName(Fe){return this._container&&this._container.classList.remove(Fe),this}setOffset(Fe){return this.options.offset=Fe,this._update(),this}toggleClassName(Fe){if(this._container)return this._container.classList.toggle(Fe)}setSubpixelPositioning(Fe){this.options.subpixelPositioning=Fe}_createCloseButton(){this.options.closeButton&&(this._closeButton=i.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;let Fe=this._container.querySelector(Dc);Fe&&Fe.focus()}},e.RasterDEMTileSource=Ie,e.RasterTileSource=Se,e.ScaleControl=class{constructor(Fe){this._onMove=()=>{yc(this._map,this._container,this.options)},this.setUnit=I=>{this.options.unit=I,yc(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},Au),Fe)}getDefaultPosition(){return"bottom-left"}onAdd(Fe){return this._map=Fe,this._container=i.create("div","maplibregl-ctrl maplibregl-ctrl-scale",Fe.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){i.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}},e.ScrollZoomHandler=ka,e.Style=Rr,e.TerrainControl=class{constructor(Fe){this._toggleTerrain=()=>{this._map.getTerrain()?this._map.setTerrain(null):this._map.setTerrain(this.options),this._updateTerrainIcon()},this._updateTerrainIcon=()=>{this._terrainButton.classList.remove("maplibregl-ctrl-terrain"),this._terrainButton.classList.remove("maplibregl-ctrl-terrain-enabled"),this._map.terrain?(this._terrainButton.classList.add("maplibregl-ctrl-terrain-enabled"),this._terrainButton.title=this._map._getUIString("TerrainControl.Disable")):(this._terrainButton.classList.add("maplibregl-ctrl-terrain"),this._terrainButton.title=this._map._getUIString("TerrainControl.Enable"))},this.options=Fe}onAdd(Fe){return this._map=Fe,this._container=i.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=i.create("button","maplibregl-ctrl-terrain",this._container),i.create("span","maplibregl-ctrl-icon",this._terrainButton).setAttribute("aria-hidden","true"),this._terrainButton.type="button",this._terrainButton.addEventListener("click",this._toggleTerrain),this._updateTerrainIcon(),this._map.on("terrain",this._updateTerrainIcon),this._container}onRemove(){i.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},e.TwoFingersTouchPitchHandler=Pc,e.TwoFingersTouchRotateHandler=Jc,e.TwoFingersTouchZoomHandler=xu,e.TwoFingersTouchZoomRotateHandler=Pi,e.VectorTileSource=we,e.VideoSource=nt,e.addSourceType=(Fe,I)=>t._(void 0,void 0,void 0,function*(){if(he(Fe))throw new Error(`A source type called "${Fe}" already exists.`);((ie,Te)=>{qe[ie]=Te})(Fe,I)}),e.clearPrewarmedResources=function(){let Fe=de;Fe&&(Fe.isPreloaded()&&Fe.numActive()===1?(Fe.release($),de=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()"))},e.getMaxParallelImageRequests=function(){return t.a.MAX_PARALLEL_IMAGE_REQUESTS},e.getRTLTextPluginStatus=function(){return Ye().getRTLTextPluginStatus()},e.getVersion=function(){return Yu},e.getWorkerCount=function(){return le.workerCount},e.getWorkerUrl=function(){return t.a.WORKER_URL},e.importScriptInWorkers=function(Fe){return q().broadcast("IS",Fe)},e.prewarm=function(){Y().acquire($)},e.setMaxParallelImageRequests=function(Fe){t.a.MAX_PARALLEL_IMAGE_REQUESTS=Fe},e.setRTLTextPlugin=function(Fe,I){return Ye().setRTLTextPlugin(Fe,I)},e.setWorkerCount=function(Fe){le.workerCount=Fe},e.setWorkerUrl=function(Fe){t.a.WORKER_URL=Fe}});var E=d;return E})}}),VV=He({"src/plots/map/layers.js"(Z,V){"use strict";var d=sa(),x=ou().sanitizeHTML,S=D6(),E=b0();function e(n,i){this.subplot=n,this.uid=n.uid+"-"+i,this.index=i,this.idSource="source-"+this.uid,this.idLayer=E.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var t=e.prototype;t.update=function(i){this.visible?this.needsNewImage(i)?this.updateImage(i):this.needsNewSource(i)?(this.removeLayer(),this.updateSource(i),this.updateLayer(i)):this.needsNewLayer(i)?this.updateLayer(i):this.updateStyle(i):(this.updateSource(i),this.updateLayer(i)),this.visible=r(i)},t.needsNewImage=function(n){var i=this.subplot.map;return i.getSource(this.idSource)&&this.sourceType==="image"&&n.sourcetype==="image"&&(this.source!==n.source||JSON.stringify(this.coordinates)!==JSON.stringify(n.coordinates))},t.needsNewSource=function(n){return this.sourceType!==n.sourcetype||JSON.stringify(this.source)!==JSON.stringify(n.source)||this.layerType!==n.type},t.needsNewLayer=function(n){return this.layerType!==n.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},t.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]},t.updateImage=function(n){var i=this.subplot.map;i.getSource(this.idSource).updateImage({url:n.source,coordinates:n.coordinates});var s=this.findFollowingMapLayerId(this.lookupBelow());s!==null&&this.subplot.map.moveLayer(this.idLayer,s)},t.updateSource=function(n){var i=this.subplot.map;if(i.getSource(this.idSource)&&i.removeSource(this.idSource),this.sourceType=n.sourcetype,this.source=n.source,!!r(n)){var s=a(n);i.addSource(this.idSource,s)}},t.findFollowingMapLayerId=function(n){if(n==="traces")for(var i=this.subplot.getMapLayers(),s=0;s0){for(var s=0;s0}function o(n){var i={},s={};switch(n.type){case"circle":d.extendFlat(s,{"circle-radius":n.circle.radius,"circle-color":n.color,"circle-opacity":n.opacity});break;case"line":d.extendFlat(s,{"line-width":n.line.width,"line-color":n.color,"line-opacity":n.opacity,"line-dasharray":n.line.dash});break;case"fill":d.extendFlat(s,{"fill-color":n.color,"fill-outline-color":n.fill.outlinecolor,"fill-opacity":n.opacity});break;case"symbol":var h=n.symbol,f=S(h.textposition,h.iconsize);d.extendFlat(i,{"icon-image":h.icon+"-15","icon-size":h.iconsize/10,"text-field":h.text,"text-size":h.textfont.size,"text-anchor":f.anchor,"text-offset":f.offset,"symbol-placement":h.placement}),d.extendFlat(s,{"icon-color":n.color,"text-color":h.textfont.color,"text-opacity":n.opacity});break;case"raster":d.extendFlat(s,{"raster-fade-duration":0,"raster-opacity":n.opacity});break}return{layout:i,paint:s}}function a(n){var i=n.sourcetype,s=n.source,h={type:i},f;return i==="geojson"?f="data":i==="vector"?f=typeof s=="string"?"url":"tiles":i==="raster"?(f="tiles",h.tileSize=256):i==="image"&&(f="url",h.coordinates=n.coordinates),h[f]=s,n.sourceattribution&&(h.attribution=x(n.sourceattribution)),h}V.exports=function(i,s,h){var f=new e(i,s);return f.update(h),f}}}),GV=He({"src/plots/map/map.js"(Z,V){"use strict";var d=qV(),x=sa(),S=g0(),E=lo(),e=Ho(),t=Ap(),r=rf(),o=Jd(),a=o.drawMode,n=o.selectMode,i=Af().prepSelect,s=Af().clearOutline,h=Af().clearSelectionsCache,f=Af().selectOnClick,v=b0(),c=VV();function T(g,b){this.id=b,this.gd=g;var p=g._fullLayout,u=g._context;this.container=p._glcontainer.node(),this.isStatic=u.staticPlot,this.uid=p._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(p),this.map=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var l=T.prototype;l.plot=function(g,b,p){var u=this,y;u.map?y=new Promise(function(m,R){u.updateMap(g,b,m,R)}):y=new Promise(function(m,R){u.createMap(g,b,m,R)}),p.push(y)},l.createMap=function(g,b,p,u){var y=this,m=b[y.id],R=y.styleObj=w(m.style),L=m.bounds,z=L?[[L.west,L.south],[L.east,L.north]]:null,F=y.map=new d.Map({container:y.div,style:R.style,center:M(m.center),zoom:m.zoom,bearing:m.bearing,pitch:m.pitch,maxBounds:z,interactive:!y.isStatic,preserveDrawingBuffer:y.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1}).addControl(new d.AttributionControl({compact:!0})),N={};F.on("styleimagemissing",function(P){var U=P.id;if(!N[U]&&U.includes("-15")){N[U]=!0;var B=new Image(15,15);B.onload=function(){F.addImage(U,B)},B.crossOrigin="Anonymous",B.src="https://unpkg.com/maki@2.1.0/icons/"+U+".svg"}}),F.setTransformRequest(function(P){return P=P.replace("https://fonts.openmaptiles.org/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold"),P=P.replace("https://tiles.basemaps.cartocdn.com/fonts/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold"),P=P.replace("https://fonts.openmaptiles.org/Open Sans Regular,Arial Unicode MS Regular","https://fonts.openmaptiles.org/Klokantech Noto Sans Regular"),{url:P}}),F._canvas.style.left="0px",F._canvas.style.top="0px",y.rejectOnError(u),y.isStatic||y.initFx(g,b);var O=[];O.push(new Promise(function(P){F.once("load",P)})),O=O.concat(S.fetchTraceGeoData(g)),Promise.all(O).then(function(){y.fillBelowLookup(g,b),y.updateData(g),y.updateLayout(b),y.resolveOnRender(p)}).catch(u)},l.updateMap=function(g,b,p,u){var y=this,m=y.map,R=b[this.id];y.rejectOnError(u);var L=[],z=w(R.style);JSON.stringify(y.styleObj)!==JSON.stringify(z)&&(y.styleObj=z,m.setStyle(z.style),y.traceHash={},L.push(new Promise(function(F){m.once("styledata",F)}))),L=L.concat(S.fetchTraceGeoData(g)),Promise.all(L).then(function(){y.fillBelowLookup(g,b),y.updateData(g),y.updateLayout(b),y.resolveOnRender(p)}).catch(u)},l.fillBelowLookup=function(g,b){var p=b[this.id],u=p.layers,y,m,R=this.belowLookup={},L=!1;for(y=0;y1)for(y=0;y-1&&f(z.originalEvent,u,[p.xaxis],[p.yaxis],p.id,L),F.indexOf("event")>-1&&r.click(u,z.originalEvent)}}},l.updateFx=function(g){var b=this,p=b.map,u=b.gd;if(b.isStatic)return;function y(z){var F=b.map.unproject(z);return[F.lng,F.lat]}var m=g.dragmode,R;R=function(z,F){if(F.isRect){var N=z.range={};N[b.id]=[y([F.xmin,F.ymin]),y([F.xmax,F.ymax])]}else{var O=z.lassoPoints={};O[b.id]=F.map(y)}};var L=b.dragOptions;b.dragOptions=x.extendDeep(L||{},{dragmode:g.dragmode,element:b.div,gd:u,plotinfo:{id:b.id,domain:g[b.id].domain,xaxis:b.xaxis,yaxis:b.yaxis,fillRangeItems:R},xaxes:[b.xaxis],yaxes:[b.yaxis],subplot:b.id}),p.off("click",b.onClickInPanHandler),n(m)||a(m)?(p.dragPan.disable(),p.on("zoomstart",b.clearOutline),b.dragOptions.prepFn=function(z,F,N){i(z,F,N,b.dragOptions,m)},t.init(b.dragOptions)):(p.dragPan.enable(),p.off("zoomstart",b.clearOutline),b.div.onmousedown=null,b.div.ontouchstart=null,b.div.removeEventListener("touchstart",b.div._ontouchstart),b.onClickInPanHandler=b.onClickInPanFn(b.dragOptions),p.on("click",b.onClickInPanHandler))},l.updateFramework=function(g){var b=g[this.id].domain,p=g._size,u=this.div.style;u.width=p.w*(b.x[1]-b.x[0])+"px",u.height=p.h*(b.y[1]-b.y[0])+"px",u.left=p.l+b.x[0]*p.w+"px",u.top=p.t+(1-b.y[1])*p.h+"px",this.xaxis._offset=p.l+b.x[0]*p.w,this.xaxis._length=p.w*(b.x[1]-b.x[0]),this.yaxis._offset=p.t+(1-b.y[1])*p.h,this.yaxis._length=p.h*(b.y[1]-b.y[0])},l.updateLayers=function(g){var b=g[this.id],p=b.layers,u=this.layerList,y;if(p.length!==u.length){for(y=0;yp/2){var u=A.split("|").join("
");g.text(u).attr("data-unformatted",u).call(r.convertToTspans,n),b=t.bBox(g.node())}g.attr("transform",d(-3,-b.height+8)),M.insert("rect",".static-attribution").attr({x:-b.width-6,y:-b.height-3,width:b.width+6,height:b.height+3,fill:"rgba(255, 255, 255, 0.75)"});var y=1;b.width+6>p&&(y=p/(b.width+6));var m=[h.l+h.w*c.x[1],h.t+h.h*(1-c.y[0])];M.attr("transform",d(m[0],m[1])+x(y))}},Z.updateFx=function(n){for(var i=n._fullLayout,s=i._subplots[a],h=0;h=0;o--)t.removeLayer(r[o][1])},e.dispose=function(){var t=this.subplot.map;this._removeLayers(),t.removeSource(this.sourceId)},V.exports=function(r,o){var a=o[0].trace,n=new E(r,a.uid),i=n.sourceId,s=d(o),h=n.below=r.belowLookup["trace-"+a.uid];return r.map.addSource(i,{type:"geojson",data:s.geojson}),n._addLayers(s,h),o[0].trace._glTrace=n,n}}}),KV=He({"src/traces/choroplethmap/index.js"(Z,V){"use strict";V.exports={attributes:z6(),supplyDefaults:ZV(),colorbar:n0(),calc:lT(),plot:YV(),hoverPoints:cT(),eventData:fT(),selectPoints:hT(),styleOnSelect:function(d,x){if(x){var S=x[0].trace;S._glTrace.updateOnSelect(x)}},getBelow:function(d,x){for(var S=x.getMapLayers(),E=S.length-2;E>=0;E--){var e=S[E].id;if(typeof e=="string"&&e.indexOf("water")===0){for(var t=E+1;t0?+c[f]:0),h.push({type:"Feature",geometry:{type:"Point",coordinates:w},properties:A})}}var g=E.extractOpts(a),b=g.reversescale?E.flipScale(g.colorscale):g.colorscale,p=b[0][1],u=S.opacity(p)<1?p:S.addOpacity(p,0),y=["interpolate",["linear"],["heatmap-density"],0,u];for(f=1;f=0;r--)e.removeLayer(t[r][1])},E.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)},V.exports=function(t,r){var o=r[0].trace,a=new S(t,o.uid),n=a.sourceId,i=d(r),s=a.below=t.belowLookup["trace-"+o.uid];return t.map.addSource(n,{type:"geojson",data:i.geojson}),a._addLayers(i,s),a}}}),rG=He({"src/traces/densitymap/hover.js"(Z,V){"use strict";var d=Ho(),x=kT().hoverPoints,S=kT().getExtraText;V.exports=function(e,t,r){var o=x(e,t,r);if(o){var a=o[0],n=a.cd,i=n[0].trace,s=n[a.index];if(delete a.color,"z"in s){var h=a.subplot.mockAxis;a.z=s.z,a.zLabel=d.tickText(h,h.c2l(s.z),"hover").text}return a.extraText=S(i,s,n[0].t.labels),[a]}}}}),aG=He({"src/traces/densitymap/event_data.js"(Z,V){"use strict";V.exports=function(x,S){return x.lon=S.lon,x.lat=S.lat,x.z=S.z,x}}}),iG=He({"src/traces/densitymap/index.js"(Z,V){"use strict";V.exports={attributes:O6(),supplyDefaults:$V(),colorbar:n0(),formatLabels:R6(),calc:QV(),plot:tG(),hoverPoints:rG(),eventData:aG(),getBelow:function(d,x){for(var S=x.getMapLayers(),E=0;E0;){l=w[w.length-1];var A=x[l];if(r[l]=0&&a[l].push(o[g])}r[l]=M}else{if(e[l]===E[l]){for(var b=[],p=[],u=0,M=_.length-1;M>=0;--M){var y=_[M];if(t[y]=!1,b.push(y),p.push(a[y]),u+=a[y].length,o[y]=s.length,y===l){_.length=M;break}}s.push(b);for(var m=new Array(u),M=0;Mg&&(g=i.source[_]),i.target[_]>g&&(g=i.target[_]);var b=g+1;a.node._count=b;var p,u=a.node.groups,y={};for(_=0;_0&&e(N,b)&&e(O,b)&&!(y.hasOwnProperty(N)&&y.hasOwnProperty(O)&&y[N]===y[O])){y.hasOwnProperty(O)&&(O=y[O]),y.hasOwnProperty(N)&&(N=y[N]),N=+N,O=+O,c[N]=c[O]=!0;var P="";i.label&&i.label[_]&&(P=i.label[_]);var U=null;P&&T.hasOwnProperty(P)&&(U=T[P]),s.push({pointNumber:_,label:P,color:h?i.color[_]:i.color,hovercolor:f?i.hovercolor[_]:i.hovercolor,customdata:v?i.customdata[_]:i.customdata,concentrationscale:U,source:N,target:O,value:+F}),z.source.push(N),z.target.push(O)}}var B=b+u.length,X=E(n.color),$=E(n.customdata),le=[];for(_=0;_b-1,childrenNodes:[],pointNumber:_,label:ce,color:X?n.color[_]:n.color,customdata:$?n.customdata[_]:n.customdata})}var de=!1;return o(B,z.source,z.target)&&(de=!0),{circular:de,links:s,nodes:le,groups:u,groupLookup:y}}function o(a,n,i){for(var s=x.init2dArray(a,0),h=0;h1})}V.exports=function(n,i){var s=r(i);return S({circular:s.circular,_nodes:s.nodes,_links:s.links,_groups:s.groups,_groupLookup:s.groupLookup})}}}),lG=He({"node_modules/d3-quadtree/dist/d3-quadtree.js"(Z,V){(function(d,x){typeof Z=="object"&&typeof V<"u"?x(Z):(d=d||self,x(d.d3=d.d3||{}))})(Z,function(d){"use strict";function x(b){var p=+this._x.call(null,b),u=+this._y.call(null,b);return S(this.cover(p,u),p,u,b)}function S(b,p,u,y){if(isNaN(p)||isNaN(u))return b;var m,R=b._root,L={data:y},z=b._x0,F=b._y0,N=b._x1,O=b._y1,P,U,B,X,$,le,ce,de;if(!R)return b._root=L,b;for(;R.length;)if(($=p>=(P=(z+N)/2))?z=P:N=P,(le=u>=(U=(F+O)/2))?F=U:O=U,m=R,!(R=R[ce=le<<1|$]))return m[ce]=L,b;if(B=+b._x.call(null,R.data),X=+b._y.call(null,R.data),p===B&&u===X)return L.next=R,m?m[ce]=L:b._root=L,b;do m=m?m[ce]=new Array(4):b._root=new Array(4),($=p>=(P=(z+N)/2))?z=P:N=P,(le=u>=(U=(F+O)/2))?F=U:O=U;while((ce=le<<1|$)===(de=(X>=U)<<1|B>=P));return m[de]=R,m[ce]=L,b}function E(b){var p,u,y=b.length,m,R,L=new Array(y),z=new Array(y),F=1/0,N=1/0,O=-1/0,P=-1/0;for(u=0;uO&&(O=m),RP&&(P=R));if(F>O||N>P)return this;for(this.cover(F,N).cover(O,P),u=0;ub||b>=m||y>p||p>=R;)switch(N=(pO||(z=X.y0)>P||(F=X.x1)=ce)<<1|b>=le)&&(X=U[U.length-1],U[U.length-1]=U[U.length-1-$],U[U.length-1-$]=X)}else{var de=b-+this._x.call(null,B.data),G=p-+this._y.call(null,B.data),Y=de*de+G*G;if(Y=(U=(L+F)/2))?L=U:F=U,($=P>=(B=(z+N)/2))?z=B:N=B,p=u,!(u=u[le=$<<1|X]))return this;if(!u.length)break;(p[le+1&3]||p[le+2&3]||p[le+3&3])&&(y=p,ce=le)}for(;u.data!==b;)if(m=u,!(u=u.next))return this;return(R=u.next)&&delete u.next,m?(R?m.next=R:delete m.next,this):p?(R?p[le]=R:delete p[le],(u=p[0]||p[1]||p[2]||p[3])&&u===(p[3]||p[2]||p[1]||p[0])&&!u.length&&(y?y[ce]=u:this._root=u),this):(this._root=R,this)}function i(b){for(var p=0,u=b.length;p=c.length)return l!=null&&g.sort(l),_!=null?_(g):g;for(var y=-1,m=g.length,R=c[b++],L,z,F=E(),N,O=p();++yc.length)return g;var p,u=T[b-1];return _!=null&&b>=c.length?p=g.entries():(p=[],g.each(function(y,m){p.push({key:m,values:M(y,b)})})),u!=null?p.sort(function(y,m){return u(y.key,m.key)}):p}return w={object:function(g){return A(g,0,t,r)},map:function(g){return A(g,0,o,a)},entries:function(g){return M(A(g,0,o,a),0)},key:function(g){return c.push(g),w},sortKeys:function(g){return T[c.length-1]=g,w},sortValues:function(g){return l=g,w},rollup:function(g){return _=g,w}}}function t(){return{}}function r(c,T,l){c[T]=l}function o(){return E()}function a(c,T,l){c.set(T,l)}function n(){}var i=E.prototype;n.prototype=s.prototype={constructor:n,has:i.has,add:function(c){return c+="",this[x+c]=c,this},remove:i.remove,clear:i.clear,values:i.keys,size:i.size,empty:i.empty,each:i.each};function s(c,T){var l=new n;if(c instanceof n)c.each(function(A){l.add(A)});else if(c){var _=-1,w=c.length;if(T==null)for(;++_=0&&(i=n.slice(s+1),n=n.slice(0,s)),n&&!a.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:i}})}E.prototype=S.prototype={constructor:E,on:function(o,a){var n=this._,i=e(o+"",n),s,h=-1,f=i.length;if(arguments.length<2){for(;++h0)for(var n=new Array(s),i=0,s,h;i=0&&b._call.call(null,p),b=b._next;--x}function l(){a=(o=i.now())+n,x=S=0;try{T()}finally{x=0,w(),a=0}}function _(){var b=i.now(),p=b-o;p>e&&(n-=p,o=b)}function w(){for(var b,p=t,u,y=1/0;p;)p._call?(y>p._time&&(y=p._time),b=p,p=p._next):(u=p._next,p._next=null,p=b?b._next=u:t=u);r=b,A(y)}function A(b){if(!x){S&&(S=clearTimeout(S));var p=b-a;p>24?(b<1/0&&(S=setTimeout(l,b-i.now()-n)),E&&(E=clearInterval(E))):(E||(o=i.now(),E=setInterval(_,e)),x=1,s(l))}}function M(b,p,u){var y=new v;return p=p==null?0:+p,y.restart(function(m){y.stop(),b(m+p)},p,u),y}function g(b,p,u){var y=new v,m=p;return p==null?(y.restart(b,p,u),y):(p=+p,u=u==null?h():+u,y.restart(function R(L){L+=m,y.restart(R,m+=p,u),b(L)},p,u),y)}d.interval=g,d.now=h,d.timeout=M,d.timer=c,d.timerFlush=T,Object.defineProperty(d,"__esModule",{value:!0})})}}),fG=He({"node_modules/d3-force/dist/d3-force.js"(Z,V){(function(d,x){typeof Z=="object"&&typeof V<"u"?x(Z,lG(),LT(),uG(),cG()):x(d.d3=d.d3||{},d.d3,d.d3,d.d3,d.d3)})(Z,function(d,x,S,E,e){"use strict";function t(b,p){var u;b==null&&(b=0),p==null&&(p=0);function y(){var m,R=u.length,L,z=0,F=0;for(m=0;mP.index){var Q=U-se.x-se.vx,re=B-se.y-se.vy,pe=Q*Q+re*re;peU+j||eeB+j||qF.r&&(F.r=F[N].r)}function z(){if(p){var F,N=p.length,O;for(u=new Array(N),F=0;F1?($==null?z.remove(X):z.set(X,B($)),p):z.get(X)},find:function(X,$,le){var ce=0,de=b.length,G,Y,ee,q,se;for(le==null?le=1/0:le*=le,ce=0;ce1?(N.on(X,$),p):N.on(X)}}}function w(){var b,p,u,y=r(-30),m,R=1,L=1/0,z=.81;function F(U){var B,X=b.length,$=x.quadtree(b,v,c).visitAfter(O);for(u=U,B=0;B=L)return;(U.data!==p||U.next)&&(le===0&&(le=o(),G+=le*le),ce===0&&(ce=o(),G+=ce*ce),GE)if(!(Math.abs(l*v-c*T)>E)||!s)this._+="L"+(this._x1=o)+","+(this._y1=a);else{var w=n-h,A=i-f,M=v*v+c*c,g=w*w+A*A,b=Math.sqrt(M),p=Math.sqrt(_),u=s*Math.tan((x-Math.acos((M+_-g)/(2*b*p)))/2),y=u/p,m=u/b;Math.abs(y-1)>E&&(this._+="L"+(o+y*T)+","+(a+y*l)),this._+="A"+s+","+s+",0,0,"+ +(l*w>T*A)+","+(this._x1=o+m*v)+","+(this._y1=a+m*c)}},arc:function(o,a,n,i,s,h){o=+o,a=+a,n=+n,h=!!h;var f=n*Math.cos(i),v=n*Math.sin(i),c=o+f,T=a+v,l=1^h,_=h?i-s:s-i;if(n<0)throw new Error("negative radius: "+n);this._x1===null?this._+="M"+c+","+T:(Math.abs(this._x1-c)>E||Math.abs(this._y1-T)>E)&&(this._+="L"+c+","+T),n&&(_<0&&(_=_%S+S),_>e?this._+="A"+n+","+n+",0,1,"+l+","+(o-f)+","+(a-v)+"A"+n+","+n+",0,1,"+l+","+(this._x1=c)+","+(this._y1=T):_>E&&(this._+="A"+n+","+n+",0,"+ +(_>=x)+","+l+","+(this._x1=o+n*Math.cos(s))+","+(this._y1=a+n*Math.sin(s))))},rect:function(o,a,n,i){this._+="M"+(this._x0=this._x1=+o)+","+(this._y0=this._y1=+a)+"h"+ +n+"v"+ +i+"h"+-n+"Z"},toString:function(){return this._}},d.path=r,Object.defineProperty(d,"__esModule",{value:!0})})}}),U6=He({"node_modules/d3-shape/dist/d3-shape.js"(Z,V){(function(d,x){typeof Z=="object"&&typeof V<"u"?x(Z,hG()):(d=d||self,x(d.d3=d.d3||{},d.d3))})(Z,function(d,x){"use strict";function S(gt){return function(){return gt}}var E=Math.abs,e=Math.atan2,t=Math.cos,r=Math.max,o=Math.min,a=Math.sin,n=Math.sqrt,i=1e-12,s=Math.PI,h=s/2,f=2*s;function v(gt){return gt>1?0:gt<-1?s:Math.acos(gt)}function c(gt){return gt>=1?h:gt<=-1?-h:Math.asin(gt)}function T(gt){return gt.innerRadius}function l(gt){return gt.outerRadius}function _(gt){return gt.startAngle}function w(gt){return gt.endAngle}function A(gt){return gt&>.padAngle}function M(gt,Xt,vr,Or,ba,Pa,ma,la){var _a=vr-gt,Ai=Or-Xt,ki=ma-ba,Ki=la-Pa,yn=Ki*_a-ki*Ai;if(!(yn*ynns*ns+gs*gs&&(is=Oo,_s=io),{cx:is,cy:_s,x01:-ki,y01:-Ki,x11:is*(ba/Ao-1),y11:_s*(ba/Ao-1)}}function b(){var gt=T,Xt=l,vr=S(0),Or=null,ba=_,Pa=w,ma=A,la=null;function _a(){var Ai,ki,Ki=+gt.apply(this,arguments),yn=+Xt.apply(this,arguments),Ln=ba.apply(this,arguments)-h,kn=Pa.apply(this,arguments)-h,Bn=E(kn-Ln),ao=kn>Ln;if(la||(la=Ai=x.path()),yni))la.moveTo(0,0);else if(Bn>f-i)la.moveTo(yn*t(Ln),yn*a(Ln)),la.arc(0,0,yn,Ln,kn,!ao),Ki>i&&(la.moveTo(Ki*t(kn),Ki*a(kn)),la.arc(0,0,Ki,kn,Ln,ao));else{var xo=Ln,Co=kn,Fs=Ln,Mn=kn,Ao=Bn,On=Bn,ts=ma.apply(this,arguments)/2,is=ts>i&&(Or?+Or.apply(this,arguments):n(Ki*Ki+yn*yn)),_s=o(E(yn-Ki)/2,+vr.apply(this,arguments)),Oo=_s,io=_s,Gn,eo;if(is>i){var ns=c(is/Ki*a(ts)),gs=c(is/yn*a(ts));(Ao-=ns*2)>i?(ns*=ao?1:-1,Fs+=ns,Mn-=ns):(Ao=0,Fs=Mn=(Ln+kn)/2),(On-=gs*2)>i?(gs*=ao?1:-1,xo+=gs,Co-=gs):(On=0,xo=Co=(Ln+kn)/2)}var Ls=yn*t(xo),Xo=yn*a(xo),Gi=Ki*t(Mn),Pn=Ki*a(Mn);if(_s>i){var js=yn*t(Co),xs=yn*a(Co),Hn=Ki*t(Fs),Os=Ki*a(Fs),ds;if(Bni?io>i?(Gn=g(Hn,Os,Ls,Xo,yn,io,ao),eo=g(js,xs,Gi,Pn,yn,io,ao),la.moveTo(Gn.cx+Gn.x01,Gn.cy+Gn.y01),io<_s?la.arc(Gn.cx,Gn.cy,io,e(Gn.y01,Gn.x01),e(eo.y01,eo.x01),!ao):(la.arc(Gn.cx,Gn.cy,io,e(Gn.y01,Gn.x01),e(Gn.y11,Gn.x11),!ao),la.arc(0,0,yn,e(Gn.cy+Gn.y11,Gn.cx+Gn.x11),e(eo.cy+eo.y11,eo.cx+eo.x11),!ao),la.arc(eo.cx,eo.cy,io,e(eo.y11,eo.x11),e(eo.y01,eo.x01),!ao))):(la.moveTo(Ls,Xo),la.arc(0,0,yn,xo,Co,!ao)):la.moveTo(Ls,Xo),!(Ki>i)||!(Ao>i)?la.lineTo(Gi,Pn):Oo>i?(Gn=g(Gi,Pn,js,xs,Ki,-Oo,ao),eo=g(Ls,Xo,Hn,Os,Ki,-Oo,ao),la.lineTo(Gn.cx+Gn.x01,Gn.cy+Gn.y01),Oo<_s?la.arc(Gn.cx,Gn.cy,Oo,e(Gn.y01,Gn.x01),e(eo.y01,eo.x01),!ao):(la.arc(Gn.cx,Gn.cy,Oo,e(Gn.y01,Gn.x01),e(Gn.y11,Gn.x11),!ao),la.arc(0,0,Ki,e(Gn.cy+Gn.y11,Gn.cx+Gn.x11),e(eo.cy+eo.y11,eo.cx+eo.x11),ao),la.arc(eo.cx,eo.cy,Oo,e(eo.y11,eo.x11),e(eo.y01,eo.x01),!ao))):la.arc(0,0,Ki,Mn,Fs,ao)}if(la.closePath(),Ai)return la=null,Ai+""||null}return _a.centroid=function(){var Ai=(+gt.apply(this,arguments)+ +Xt.apply(this,arguments))/2,ki=(+ba.apply(this,arguments)+ +Pa.apply(this,arguments))/2-s/2;return[t(ki)*Ai,a(ki)*Ai]},_a.innerRadius=function(Ai){return arguments.length?(gt=typeof Ai=="function"?Ai:S(+Ai),_a):gt},_a.outerRadius=function(Ai){return arguments.length?(Xt=typeof Ai=="function"?Ai:S(+Ai),_a):Xt},_a.cornerRadius=function(Ai){return arguments.length?(vr=typeof Ai=="function"?Ai:S(+Ai),_a):vr},_a.padRadius=function(Ai){return arguments.length?(Or=Ai==null?null:typeof Ai=="function"?Ai:S(+Ai),_a):Or},_a.startAngle=function(Ai){return arguments.length?(ba=typeof Ai=="function"?Ai:S(+Ai),_a):ba},_a.endAngle=function(Ai){return arguments.length?(Pa=typeof Ai=="function"?Ai:S(+Ai),_a):Pa},_a.padAngle=function(Ai){return arguments.length?(ma=typeof Ai=="function"?Ai:S(+Ai),_a):ma},_a.context=function(Ai){return arguments.length?(la=Ai??null,_a):la},_a}function p(gt){this._context=gt}p.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(gt,Xt){switch(gt=+gt,Xt=+Xt,this._point){case 0:this._point=1,this._line?this._context.lineTo(gt,Xt):this._context.moveTo(gt,Xt);break;case 1:this._point=2;default:this._context.lineTo(gt,Xt);break}}};function u(gt){return new p(gt)}function y(gt){return gt[0]}function m(gt){return gt[1]}function R(){var gt=y,Xt=m,vr=S(!0),Or=null,ba=u,Pa=null;function ma(la){var _a,Ai=la.length,ki,Ki=!1,yn;for(Or==null&&(Pa=ba(yn=x.path())),_a=0;_a<=Ai;++_a)!(_a=yn;--Ln)la.point(Co[Ln],Fs[Ln]);la.lineEnd(),la.areaEnd()}ao&&(Co[Ki]=+gt(Bn,Ki,ki),Fs[Ki]=+vr(Bn,Ki,ki),la.point(Xt?+Xt(Bn,Ki,ki):Co[Ki],Or?+Or(Bn,Ki,ki):Fs[Ki]))}if(xo)return la=null,xo+""||null}function Ai(){return R().defined(ba).curve(ma).context(Pa)}return _a.x=function(ki){return arguments.length?(gt=typeof ki=="function"?ki:S(+ki),Xt=null,_a):gt},_a.x0=function(ki){return arguments.length?(gt=typeof ki=="function"?ki:S(+ki),_a):gt},_a.x1=function(ki){return arguments.length?(Xt=ki==null?null:typeof ki=="function"?ki:S(+ki),_a):Xt},_a.y=function(ki){return arguments.length?(vr=typeof ki=="function"?ki:S(+ki),Or=null,_a):vr},_a.y0=function(ki){return arguments.length?(vr=typeof ki=="function"?ki:S(+ki),_a):vr},_a.y1=function(ki){return arguments.length?(Or=ki==null?null:typeof ki=="function"?ki:S(+ki),_a):Or},_a.lineX0=_a.lineY0=function(){return Ai().x(gt).y(vr)},_a.lineY1=function(){return Ai().x(gt).y(Or)},_a.lineX1=function(){return Ai().x(Xt).y(vr)},_a.defined=function(ki){return arguments.length?(ba=typeof ki=="function"?ki:S(!!ki),_a):ba},_a.curve=function(ki){return arguments.length?(ma=ki,Pa!=null&&(la=ma(Pa)),_a):ma},_a.context=function(ki){return arguments.length?(ki==null?Pa=la=null:la=ma(Pa=ki),_a):Pa},_a}function z(gt,Xt){return Xtgt?1:Xt>=gt?0:NaN}function F(gt){return gt}function N(){var gt=F,Xt=z,vr=null,Or=S(0),ba=S(f),Pa=S(0);function ma(la){var _a,Ai=la.length,ki,Ki,yn=0,Ln=new Array(Ai),kn=new Array(Ai),Bn=+Or.apply(this,arguments),ao=Math.min(f,Math.max(-f,ba.apply(this,arguments)-Bn)),xo,Co=Math.min(Math.abs(ao)/Ai,Pa.apply(this,arguments)),Fs=Co*(ao<0?-1:1),Mn;for(_a=0;_a0&&(yn+=Mn);for(Xt!=null?Ln.sort(function(Ao,On){return Xt(kn[Ao],kn[On])}):vr!=null&&Ln.sort(function(Ao,On){return vr(la[Ao],la[On])}),_a=0,Ki=yn?(ao-Ai*Fs)/yn:0;_a0?Mn*Ki:0)+Fs,kn[ki]={data:la[ki],index:_a,value:Mn,startAngle:Bn,endAngle:xo,padAngle:Co};return kn}return ma.value=function(la){return arguments.length?(gt=typeof la=="function"?la:S(+la),ma):gt},ma.sortValues=function(la){return arguments.length?(Xt=la,vr=null,ma):Xt},ma.sort=function(la){return arguments.length?(vr=la,Xt=null,ma):vr},ma.startAngle=function(la){return arguments.length?(Or=typeof la=="function"?la:S(+la),ma):Or},ma.endAngle=function(la){return arguments.length?(ba=typeof la=="function"?la:S(+la),ma):ba},ma.padAngle=function(la){return arguments.length?(Pa=typeof la=="function"?la:S(+la),ma):Pa},ma}var O=U(u);function P(gt){this._curve=gt}P.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(gt,Xt){this._curve.point(Xt*Math.sin(gt),Xt*-Math.cos(gt))}};function U(gt){function Xt(vr){return new P(gt(vr))}return Xt._curve=gt,Xt}function B(gt){var Xt=gt.curve;return gt.angle=gt.x,delete gt.x,gt.radius=gt.y,delete gt.y,gt.curve=function(vr){return arguments.length?Xt(U(vr)):Xt()._curve},gt}function X(){return B(R().curve(O))}function $(){var gt=L().curve(O),Xt=gt.curve,vr=gt.lineX0,Or=gt.lineX1,ba=gt.lineY0,Pa=gt.lineY1;return gt.angle=gt.x,delete gt.x,gt.startAngle=gt.x0,delete gt.x0,gt.endAngle=gt.x1,delete gt.x1,gt.radius=gt.y,delete gt.y,gt.innerRadius=gt.y0,delete gt.y0,gt.outerRadius=gt.y1,delete gt.y1,gt.lineStartAngle=function(){return B(vr())},delete gt.lineX0,gt.lineEndAngle=function(){return B(Or())},delete gt.lineX1,gt.lineInnerRadius=function(){return B(ba())},delete gt.lineY0,gt.lineOuterRadius=function(){return B(Pa())},delete gt.lineY1,gt.curve=function(ma){return arguments.length?Xt(U(ma)):Xt()._curve},gt}function le(gt,Xt){return[(Xt=+Xt)*Math.cos(gt-=Math.PI/2),Xt*Math.sin(gt)]}var ce=Array.prototype.slice;function de(gt){return gt.source}function G(gt){return gt.target}function Y(gt){var Xt=de,vr=G,Or=y,ba=m,Pa=null;function ma(){var la,_a=ce.call(arguments),Ai=Xt.apply(this,_a),ki=vr.apply(this,_a);if(Pa||(Pa=la=x.path()),gt(Pa,+Or.apply(this,(_a[0]=Ai,_a)),+ba.apply(this,_a),+Or.apply(this,(_a[0]=ki,_a)),+ba.apply(this,_a)),la)return Pa=null,la+""||null}return ma.source=function(la){return arguments.length?(Xt=la,ma):Xt},ma.target=function(la){return arguments.length?(vr=la,ma):vr},ma.x=function(la){return arguments.length?(Or=typeof la=="function"?la:S(+la),ma):Or},ma.y=function(la){return arguments.length?(ba=typeof la=="function"?la:S(+la),ma):ba},ma.context=function(la){return arguments.length?(Pa=la??null,ma):Pa},ma}function ee(gt,Xt,vr,Or,ba){gt.moveTo(Xt,vr),gt.bezierCurveTo(Xt=(Xt+Or)/2,vr,Xt,ba,Or,ba)}function q(gt,Xt,vr,Or,ba){gt.moveTo(Xt,vr),gt.bezierCurveTo(Xt,vr=(vr+ba)/2,Or,vr,Or,ba)}function se(gt,Xt,vr,Or,ba){var Pa=le(Xt,vr),ma=le(Xt,vr=(vr+ba)/2),la=le(Or,vr),_a=le(Or,ba);gt.moveTo(Pa[0],Pa[1]),gt.bezierCurveTo(ma[0],ma[1],la[0],la[1],_a[0],_a[1])}function ae(){return Y(ee)}function j(){return Y(q)}function Q(){var gt=Y(se);return gt.angle=gt.x,delete gt.x,gt.radius=gt.y,delete gt.y,gt}var re={draw:function(gt,Xt){var vr=Math.sqrt(Xt/s);gt.moveTo(vr,0),gt.arc(0,0,vr,0,f)}},pe={draw:function(gt,Xt){var vr=Math.sqrt(Xt/5)/2;gt.moveTo(-3*vr,-vr),gt.lineTo(-vr,-vr),gt.lineTo(-vr,-3*vr),gt.lineTo(vr,-3*vr),gt.lineTo(vr,-vr),gt.lineTo(3*vr,-vr),gt.lineTo(3*vr,vr),gt.lineTo(vr,vr),gt.lineTo(vr,3*vr),gt.lineTo(-vr,3*vr),gt.lineTo(-vr,vr),gt.lineTo(-3*vr,vr),gt.closePath()}},we=Math.sqrt(1/3),Se=we*2,Ie={draw:function(gt,Xt){var vr=Math.sqrt(Xt/Se),Or=vr*we;gt.moveTo(0,-vr),gt.lineTo(Or,0),gt.lineTo(0,vr),gt.lineTo(-Or,0),gt.closePath()}},Re=.8908130915292852,We=Math.sin(s/10)/Math.sin(7*s/10),at=Math.sin(f/10)*We,nt=-Math.cos(f/10)*We,tt={draw:function(gt,Xt){var vr=Math.sqrt(Xt*Re),Or=at*vr,ba=nt*vr;gt.moveTo(0,-vr),gt.lineTo(Or,ba);for(var Pa=1;Pa<5;++Pa){var ma=f*Pa/5,la=Math.cos(ma),_a=Math.sin(ma);gt.lineTo(_a*vr,-la*vr),gt.lineTo(la*Or-_a*ba,_a*Or+la*ba)}gt.closePath()}},qe={draw:function(gt,Xt){var vr=Math.sqrt(Xt),Or=-vr/2;gt.rect(Or,Or,vr,vr)}},he=Math.sqrt(3),ue={draw:function(gt,Xt){var vr=-Math.sqrt(Xt/(he*3));gt.moveTo(0,vr*2),gt.lineTo(-he*vr,-vr),gt.lineTo(he*vr,-vr),gt.closePath()}},ne=-.5,Ce=Math.sqrt(3)/2,Ye=1/Math.sqrt(12),rt=(Ye/2+1)*3,Ke={draw:function(gt,Xt){var vr=Math.sqrt(Xt/rt),Or=vr/2,ba=vr*Ye,Pa=Or,ma=vr*Ye+vr,la=-Pa,_a=ma;gt.moveTo(Or,ba),gt.lineTo(Pa,ma),gt.lineTo(la,_a),gt.lineTo(ne*Or-Ce*ba,Ce*Or+ne*ba),gt.lineTo(ne*Pa-Ce*ma,Ce*Pa+ne*ma),gt.lineTo(ne*la-Ce*_a,Ce*la+ne*_a),gt.lineTo(ne*Or+Ce*ba,ne*ba-Ce*Or),gt.lineTo(ne*Pa+Ce*ma,ne*ma-Ce*Pa),gt.lineTo(ne*la+Ce*_a,ne*_a-Ce*la),gt.closePath()}},Mt=[re,pe,Ie,qe,tt,ue,Ke];function kt(){var gt=S(re),Xt=S(64),vr=null;function Or(){var ba;if(vr||(vr=ba=x.path()),gt.apply(this,arguments).draw(vr,+Xt.apply(this,arguments)),ba)return vr=null,ba+""||null}return Or.type=function(ba){return arguments.length?(gt=typeof ba=="function"?ba:S(ba),Or):gt},Or.size=function(ba){return arguments.length?(Xt=typeof ba=="function"?ba:S(+ba),Or):Xt},Or.context=function(ba){return arguments.length?(vr=ba??null,Or):vr},Or}function Nt(){}function Gt(gt,Xt,vr){gt._context.bezierCurveTo((2*gt._x0+gt._x1)/3,(2*gt._y0+gt._y1)/3,(gt._x0+2*gt._x1)/3,(gt._y0+2*gt._y1)/3,(gt._x0+4*gt._x1+Xt)/6,(gt._y0+4*gt._y1+vr)/6)}function Mr(gt){this._context=gt}Mr.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Gt(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(gt,Xt){switch(gt=+gt,Xt=+Xt,this._point){case 0:this._point=1,this._line?this._context.lineTo(gt,Xt):this._context.moveTo(gt,Xt);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Gt(this,gt,Xt);break}this._x0=this._x1,this._x1=gt,this._y0=this._y1,this._y1=Xt}};function mr(gt){return new Mr(gt)}function qr(gt){this._context=gt}qr.prototype={areaStart:Nt,areaEnd:Nt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(gt,Xt){switch(gt=+gt,Xt=+Xt,this._point){case 0:this._point=1,this._x2=gt,this._y2=Xt;break;case 1:this._point=2,this._x3=gt,this._y3=Xt;break;case 2:this._point=3,this._x4=gt,this._y4=Xt,this._context.moveTo((this._x0+4*this._x1+gt)/6,(this._y0+4*this._y1+Xt)/6);break;default:Gt(this,gt,Xt);break}this._x0=this._x1,this._x1=gt,this._y0=this._y1,this._y1=Xt}};function Er(gt){return new qr(gt)}function Ir(gt){this._context=gt}Ir.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(gt,Xt){switch(gt=+gt,Xt=+Xt,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var vr=(this._x0+4*this._x1+gt)/6,Or=(this._y0+4*this._y1+Xt)/6;this._line?this._context.lineTo(vr,Or):this._context.moveTo(vr,Or);break;case 3:this._point=4;default:Gt(this,gt,Xt);break}this._x0=this._x1,this._x1=gt,this._y0=this._y1,this._y1=Xt}};function _t(gt){return new Ir(gt)}function Oe(gt,Xt){this._basis=new Mr(gt),this._beta=Xt}Oe.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var gt=this._x,Xt=this._y,vr=gt.length-1;if(vr>0)for(var Or=gt[0],ba=Xt[0],Pa=gt[vr]-Or,ma=Xt[vr]-ba,la=-1,_a;++la<=vr;)_a=la/vr,this._basis.point(this._beta*gt[la]+(1-this._beta)*(Or+_a*Pa),this._beta*Xt[la]+(1-this._beta)*(ba+_a*ma));this._x=this._y=null,this._basis.lineEnd()},point:function(gt,Xt){this._x.push(+gt),this._y.push(+Xt)}};var Je=function gt(Xt){function vr(Or){return Xt===1?new Mr(Or):new Oe(Or,Xt)}return vr.beta=function(Or){return gt(+Or)},vr}(.85);function Ae(gt,Xt,vr){gt._context.bezierCurveTo(gt._x1+gt._k*(gt._x2-gt._x0),gt._y1+gt._k*(gt._y2-gt._y0),gt._x2+gt._k*(gt._x1-Xt),gt._y2+gt._k*(gt._y1-vr),gt._x2,gt._y2)}function Le(gt,Xt){this._context=gt,this._k=(1-Xt)/6}Le.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Ae(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(gt,Xt){switch(gt=+gt,Xt=+Xt,this._point){case 0:this._point=1,this._line?this._context.lineTo(gt,Xt):this._context.moveTo(gt,Xt);break;case 1:this._point=2,this._x1=gt,this._y1=Xt;break;case 2:this._point=3;default:Ae(this,gt,Xt);break}this._x0=this._x1,this._x1=this._x2,this._x2=gt,this._y0=this._y1,this._y1=this._y2,this._y2=Xt}};var Ue=function gt(Xt){function vr(Or){return new Le(Or,Xt)}return vr.tension=function(Or){return gt(+Or)},vr}(0);function Ze(gt,Xt){this._context=gt,this._k=(1-Xt)/6}Ze.prototype={areaStart:Nt,areaEnd:Nt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(gt,Xt){switch(gt=+gt,Xt=+Xt,this._point){case 0:this._point=1,this._x3=gt,this._y3=Xt;break;case 1:this._point=2,this._context.moveTo(this._x4=gt,this._y4=Xt);break;case 2:this._point=3,this._x5=gt,this._y5=Xt;break;default:Ae(this,gt,Xt);break}this._x0=this._x1,this._x1=this._x2,this._x2=gt,this._y0=this._y1,this._y1=this._y2,this._y2=Xt}};var st=function gt(Xt){function vr(Or){return new Ze(Or,Xt)}return vr.tension=function(Or){return gt(+Or)},vr}(0);function ut(gt,Xt){this._context=gt,this._k=(1-Xt)/6}ut.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(gt,Xt){switch(gt=+gt,Xt=+Xt,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Ae(this,gt,Xt);break}this._x0=this._x1,this._x1=this._x2,this._x2=gt,this._y0=this._y1,this._y1=this._y2,this._y2=Xt}};var Ut=function gt(Xt){function vr(Or){return new ut(Or,Xt)}return vr.tension=function(Or){return gt(+Or)},vr}(0);function Ct(gt,Xt,vr){var Or=gt._x1,ba=gt._y1,Pa=gt._x2,ma=gt._y2;if(gt._l01_a>i){var la=2*gt._l01_2a+3*gt._l01_a*gt._l12_a+gt._l12_2a,_a=3*gt._l01_a*(gt._l01_a+gt._l12_a);Or=(Or*la-gt._x0*gt._l12_2a+gt._x2*gt._l01_2a)/_a,ba=(ba*la-gt._y0*gt._l12_2a+gt._y2*gt._l01_2a)/_a}if(gt._l23_a>i){var Ai=2*gt._l23_2a+3*gt._l23_a*gt._l12_a+gt._l12_2a,ki=3*gt._l23_a*(gt._l23_a+gt._l12_a);Pa=(Pa*Ai+gt._x1*gt._l23_2a-Xt*gt._l12_2a)/ki,ma=(ma*Ai+gt._y1*gt._l23_2a-vr*gt._l12_2a)/ki}gt._context.bezierCurveTo(Or,ba,Pa,ma,gt._x2,gt._y2)}function Pt(gt,Xt){this._context=gt,this._alpha=Xt}Pt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(gt,Xt){if(gt=+gt,Xt=+Xt,this._point){var vr=this._x2-gt,Or=this._y2-Xt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(vr*vr+Or*Or,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(gt,Xt):this._context.moveTo(gt,Xt);break;case 1:this._point=2;break;case 2:this._point=3;default:Ct(this,gt,Xt);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=gt,this._y0=this._y1,this._y1=this._y2,this._y2=Xt}};var jt=function gt(Xt){function vr(Or){return Xt?new Pt(Or,Xt):new Le(Or,0)}return vr.alpha=function(Or){return gt(+Or)},vr}(.5);function fr(gt,Xt){this._context=gt,this._alpha=Xt}fr.prototype={areaStart:Nt,areaEnd:Nt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(gt,Xt){if(gt=+gt,Xt=+Xt,this._point){var vr=this._x2-gt,Or=this._y2-Xt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(vr*vr+Or*Or,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=gt,this._y3=Xt;break;case 1:this._point=2,this._context.moveTo(this._x4=gt,this._y4=Xt);break;case 2:this._point=3,this._x5=gt,this._y5=Xt;break;default:Ct(this,gt,Xt);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=gt,this._y0=this._y1,this._y1=this._y2,this._y2=Xt}};var ur=function gt(Xt){function vr(Or){return Xt?new fr(Or,Xt):new Ze(Or,0)}return vr.alpha=function(Or){return gt(+Or)},vr}(.5);function sr(gt,Xt){this._context=gt,this._alpha=Xt}sr.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(gt,Xt){if(gt=+gt,Xt=+Xt,this._point){var vr=this._x2-gt,Or=this._y2-Xt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(vr*vr+Or*Or,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Ct(this,gt,Xt);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=gt,this._y0=this._y1,this._y1=this._y2,this._y2=Xt}};var Pr=function gt(Xt){function vr(Or){return Xt?new sr(Or,Xt):new ut(Or,0)}return vr.alpha=function(Or){return gt(+Or)},vr}(.5);function Ta(gt){this._context=gt}Ta.prototype={areaStart:Nt,areaEnd:Nt,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(gt,Xt){gt=+gt,Xt=+Xt,this._point?this._context.lineTo(gt,Xt):(this._point=1,this._context.moveTo(gt,Xt))}};function Oa(gt){return new Ta(gt)}function Ia(gt){return gt<0?-1:1}function qa(gt,Xt,vr){var Or=gt._x1-gt._x0,ba=Xt-gt._x1,Pa=(gt._y1-gt._y0)/(Or||ba<0&&-0),ma=(vr-gt._y1)/(ba||Or<0&&-0),la=(Pa*ba+ma*Or)/(Or+ba);return(Ia(Pa)+Ia(ma))*Math.min(Math.abs(Pa),Math.abs(ma),.5*Math.abs(la))||0}function Wa(gt,Xt){var vr=gt._x1-gt._x0;return vr?(3*(gt._y1-gt._y0)/vr-Xt)/2:Xt}function Ca(gt,Xt,vr){var Or=gt._x0,ba=gt._y0,Pa=gt._x1,ma=gt._y1,la=(Pa-Or)/3;gt._context.bezierCurveTo(Or+la,ba+la*Xt,Pa-la,ma-la*vr,Pa,ma)}function hi(gt){this._context=gt}hi.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Ca(this,this._t0,Wa(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(gt,Xt){var vr=NaN;if(gt=+gt,Xt=+Xt,!(gt===this._x1&&Xt===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(gt,Xt):this._context.moveTo(gt,Xt);break;case 1:this._point=2;break;case 2:this._point=3,Ca(this,Wa(this,vr=qa(this,gt,Xt)),vr);break;default:Ca(this,this._t0,vr=qa(this,gt,Xt));break}this._x0=this._x1,this._x1=gt,this._y0=this._y1,this._y1=Xt,this._t0=vr}}};function wi(gt){this._context=new Kt(gt)}(wi.prototype=Object.create(hi.prototype)).point=function(gt,Xt){hi.prototype.point.call(this,Xt,gt)};function Kt(gt){this._context=gt}Kt.prototype={moveTo:function(gt,Xt){this._context.moveTo(Xt,gt)},closePath:function(){this._context.closePath()},lineTo:function(gt,Xt){this._context.lineTo(Xt,gt)},bezierCurveTo:function(gt,Xt,vr,Or,ba,Pa){this._context.bezierCurveTo(Xt,gt,Or,vr,Pa,ba)}};function Dt(gt){return new hi(gt)}function Yt(gt){return new wi(gt)}function Jt(gt){this._context=gt}Jt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var gt=this._x,Xt=this._y,vr=gt.length;if(vr)if(this._line?this._context.lineTo(gt[0],Xt[0]):this._context.moveTo(gt[0],Xt[0]),vr===2)this._context.lineTo(gt[1],Xt[1]);else for(var Or=Fr(gt),ba=Fr(Xt),Pa=0,ma=1;ma=0;--Xt)ba[Xt]=(ma[Xt]-ba[Xt+1])/Pa[Xt];for(Pa[vr-1]=(gt[vr]+ba[vr-1])/2,Xt=0;Xt=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(gt,Xt){switch(gt=+gt,Xt=+Xt,this._point){case 0:this._point=1,this._line?this._context.lineTo(gt,Xt):this._context.moveTo(gt,Xt);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,Xt),this._context.lineTo(gt,Xt);else{var vr=this._x*(1-this._t)+gt*this._t;this._context.lineTo(vr,this._y),this._context.lineTo(vr,Xt)}break}}this._x=gt,this._y=Xt}};function ca(gt){return new ra(gt,.5)}function Ba(gt){return new ra(gt,0)}function $a(gt){return new ra(gt,1)}function Za(gt,Xt){if((ma=gt.length)>1)for(var vr=1,Or,ba,Pa=gt[Xt[0]],ma,la=Pa.length;vr=0;)vr[Xt]=Xt;return vr}function pi(gt,Xt){return gt[Xt]}function Ra(){var gt=S([]),Xt=ri,vr=Za,Or=pi;function ba(Pa){var ma=gt.apply(this,arguments),la,_a=Pa.length,Ai=ma.length,ki=new Array(Ai),Ki;for(la=0;la0){for(var vr,Or,ba=0,Pa=gt[0].length,ma;ba0)for(var vr,Or=0,ba,Pa,ma,la,_a,Ai=gt[Xt[0]].length;Or0?(ba[0]=ma,ba[1]=ma+=Pa):Pa<0?(ba[1]=la,ba[0]=la+=Pa):(ba[0]=0,ba[1]=Pa)}function fn(gt,Xt){if((ba=gt.length)>0){for(var vr=0,Or=gt[Xt[0]],ba,Pa=Or.length;vr0)||!((Pa=(ba=gt[Xt[0]]).length)>0))){for(var vr=0,Or=1,ba,Pa,ma;OrPa&&(Pa=ba,vr=Xt);return vr}function Cr(gt){var Xt=gt.map(xr);return ri(gt).sort(function(vr,Or){return Xt[vr]-Xt[Or]})}function xr(gt){for(var Xt=0,vr=-1,Or=gt.length,ba;++vr0;--se)Q(q*=.99),re(),j(q),re();function ae(){var pe=x.max(ee,function(Ie){return Ie.length}),we=B*(R-y)/(pe-1);z>we&&(z=we);var Se=x.min(ee,function(Ie){return(R-y-(Ie.length-1)*z)/x.sum(Ie,f)});ee.forEach(function(Ie){Ie.forEach(function(Re,We){Re.y1=(Re.y0=We)+Re.value*Se})}),Y.links.forEach(function(Ie){Ie.width=Ie.value*Se})}function j(pe){ee.forEach(function(we){we.forEach(function(Se){if(Se.targetLinks.length){var Ie=(x.sum(Se.targetLinks,c)/x.sum(Se.targetLinks,f)-v(Se))*pe;Se.y0+=Ie,Se.y1+=Ie}})})}function Q(pe){ee.slice().reverse().forEach(function(we){we.forEach(function(Se){if(Se.sourceLinks.length){var Ie=(x.sum(Se.sourceLinks,T)/x.sum(Se.sourceLinks,f)-v(Se))*pe;Se.y0+=Ie,Se.y1+=Ie}})})}function re(){ee.forEach(function(pe){var we,Se,Ie=y,Re=pe.length,We;for(pe.sort(h),We=0;We0&&(we.y0+=Se,we.y1+=Se),Ie=we.y1+z;if(Se=Ie-z-R,Se>0)for(Ie=we.y0-=Se,we.y1-=Se,We=Re-2;We>=0;--We)we=pe[We],Se=we.y1+z-Ie,Se>0&&(we.y0-=Se,we.y1-=Se),Ie=we.y0})}}function G(Y){Y.nodes.forEach(function(ee){ee.sourceLinks.sort(s),ee.targetLinks.sort(i)}),Y.nodes.forEach(function(ee){var q=ee.y0,se=q;ee.sourceLinks.forEach(function(ae){ae.y0=q+ae.width/2,q+=ae.width}),ee.targetLinks.forEach(function(ae){ae.y1=se+ae.width/2,se+=ae.width})})}return X};function g(u){return[u.source.x1,u.y0]}function b(u){return[u.target.x0,u.y1]}var p=function(){return E.linkHorizontal().source(g).target(b)};d.sankey=M,d.sankeyCenter=a,d.sankeyLeft=t,d.sankeyRight=r,d.sankeyJustify=o,d.sankeyLinkHorizontal=p,Object.defineProperty(d,"__esModule",{value:!0})})}}),dG=He({"node_modules/elementary-circuits-directed-graph/johnson.js"(Z,V){var d=N6();V.exports=function(S,E){var e=[],t=[],r=[],o={},a=[],n;function i(A){r[A]=!1,o.hasOwnProperty(A)&&Object.keys(o[A]).forEach(function(M){delete o[A][M],r[M]&&i(M)})}function s(A){var M=!1;t.push(A),r[A]=!0;var g,b;for(g=0;g=A})}function v(A){f(A);for(var M=S,g=d(M),b=g.components.filter(function(z){return z.length>1}),p=1/0,u,y=0;y"u"?"undefined":s(Le))!=="object"&&(Le=Je.source=g(Oe,Le)),(typeof Ue>"u"?"undefined":s(Ue))!=="object"&&(Ue=Je.target=g(Oe,Ue)),Le.sourceLinks.push(Je),Ue.targetLinks.push(Je)}),_t}function Gt(_t){_t.nodes.forEach(function(Oe){Oe.partOfCycle=!1,Oe.value=Math.max(x.sum(Oe.sourceLinks,c),x.sum(Oe.targetLinks,c)),Oe.sourceLinks.forEach(function(Je){Je.circular&&(Oe.partOfCycle=!0,Oe.circularLinkType=Je.circularLinkType)}),Oe.targetLinks.forEach(function(Je){Je.circular&&(Oe.partOfCycle=!0,Oe.circularLinkType=Je.circularLinkType)})})}function Mr(_t){var Oe=0,Je=0,Ae=0,Le=0,Ue=x.max(_t.nodes,function(Ze){return Ze.column});return _t.links.forEach(function(Ze){Ze.circular&&(Ze.circularLinkType=="top"?Oe=Oe+Ze.width:Je=Je+Ze.width,Ze.target.column==0&&(Le=Le+Ze.width),Ze.source.column==Ue&&(Ae=Ae+Ze.width))}),Oe=Oe>0?Oe+p+u:Oe,Je=Je>0?Je+p+u:Je,Ae=Ae>0?Ae+p+u:Ae,Le=Le>0?Le+p+u:Le,{top:Oe,bottom:Je,left:Le,right:Ae}}function mr(_t,Oe){var Je=x.max(_t.nodes,function(Ut){return Ut.column}),Ae=at-Re,Le=nt-We,Ue=Ae+Oe.right+Oe.left,Ze=Le+Oe.top+Oe.bottom,st=Ae/Ue,ut=Le/Ze;return Re=Re*st+Oe.left,at=Oe.right==0?at:at*st,We=We*ut+Oe.top,nt=nt*ut,_t.nodes.forEach(function(Ut){Ut.x0=Re+Ut.column*((at-Re-tt)/Je),Ut.x1=Ut.x0+tt}),ut}function qr(_t){var Oe,Je,Ae;for(Oe=_t.nodes,Je=[],Ae=0;Oe.length;++Ae,Oe=Je,Je=[])Oe.forEach(function(Le){Le.depth=Ae,Le.sourceLinks.forEach(function(Ue){Je.indexOf(Ue.target)<0&&!Ue.circular&&Je.push(Ue.target)})});for(Oe=_t.nodes,Je=[],Ae=0;Oe.length;++Ae,Oe=Je,Je=[])Oe.forEach(function(Le){Le.height=Ae,Le.targetLinks.forEach(function(Ue){Je.indexOf(Ue.source)<0&&!Ue.circular&&Je.push(Ue.source)})});_t.nodes.forEach(function(Le){Le.column=Math.floor(ue.call(null,Le,Ae))})}function Er(_t,Oe,Je){var Ae=S.nest().key(function(Ut){return Ut.column}).sortKeys(x.ascending).entries(_t.nodes).map(function(Ut){return Ut.values});Ze(Je),ut();for(var Le=1,Ue=Oe;Ue>0;--Ue)st(Le*=.99,Je),ut();function Ze(Ut){if(Ke){var Ct=1/0;Ae.forEach(function(ur){var sr=nt*Ke/(ur.length+1);Ct=sr0))if(ur==0&&fr==1)Pr=sr.y1-sr.y0,sr.y0=nt/2-Pr/2,sr.y1=nt/2+Pr/2;else if(ur==Pt-1&&fr==1)Pr=sr.y1-sr.y0,sr.y0=nt/2-Pr/2,sr.y1=nt/2+Pr/2;else{var Ta=0,Oa=x.mean(sr.sourceLinks,_),Ia=x.mean(sr.targetLinks,l);Oa&&Ia?Ta=(Oa+Ia)/2:Ta=Oa||Ia;var qa=(Ta-T(sr))*Ut;sr.y0+=qa,sr.y1+=qa}})})}function ut(){Ae.forEach(function(Ut){var Ct,Pt,jt=We,fr=Ut.length,ur;for(Ut.sort(v),ur=0;ur0&&(Ct.y0+=Pt,Ct.y1+=Pt),jt=Ct.y1+qe;if(Pt=jt-qe-nt,Pt>0)for(jt=Ct.y0-=Pt,Ct.y1-=Pt,ur=fr-2;ur>=0;--ur)Ct=Ut[ur],Pt=Ct.y1+qe-jt,Pt>0&&(Ct.y0-=Pt,Ct.y1-=Pt),jt=Ct.y0})}}function Ir(_t){_t.nodes.forEach(function(Oe){Oe.sourceLinks.sort(f),Oe.targetLinks.sort(h)}),_t.nodes.forEach(function(Oe){var Je=Oe.y0,Ae=Je,Le=Oe.y1,Ue=Le;Oe.sourceLinks.forEach(function(Ze){Ze.circular?(Ze.y0=Le-Ze.width/2,Le=Le-Ze.width):(Ze.y0=Je+Ze.width/2,Je+=Ze.width)}),Oe.targetLinks.forEach(function(Ze){Ze.circular?(Ze.y1=Ue-Ze.width/2,Ue=Ue-Ze.width):(Ze.y1=Ae+Ze.width/2,Ae+=Ze.width)})})}return kt}function R(Re,We,at){var nt=0;if(at===null){for(var tt=[],qe=0;qeWe.source.column)}function N(Re,We){var at=0;Re.sourceLinks.forEach(function(tt){at=tt.circular&&!Se(tt,We)?at+1:at});var nt=0;return Re.targetLinks.forEach(function(tt){nt=tt.circular&&!Se(tt,We)?nt+1:nt}),at+nt}function O(Re){var We=Re.source.sourceLinks,at=0;We.forEach(function(qe){at=qe.circular?at+1:at});var nt=Re.target.targetLinks,tt=0;return nt.forEach(function(qe){tt=qe.circular?tt+1:tt}),!(at>1||tt>1)}function P(Re,We,at){return Re.sort(X),Re.forEach(function(nt,tt){var qe=0;if(Se(nt,at)&&O(nt))nt.circularPathData.verticalBuffer=qe+nt.width/2;else{var he=0;for(he;heqe?ue:qe}nt.circularPathData.verticalBuffer=qe+nt.width/2}}),Re}function U(Re,We,at,nt){var tt=5,qe=x.min(Re.links,function(ne){return ne.source.y0});Re.links.forEach(function(ne){ne.circular&&(ne.circularPathData={})});var he=Re.links.filter(function(ne){return ne.circularLinkType=="top"});P(he,We,nt);var ue=Re.links.filter(function(ne){return ne.circularLinkType=="bottom"});P(ue,We,nt),Re.links.forEach(function(ne){if(ne.circular){if(ne.circularPathData.arcRadius=ne.width+u,ne.circularPathData.leftNodeBuffer=tt,ne.circularPathData.rightNodeBuffer=tt,ne.circularPathData.sourceWidth=ne.source.x1-ne.source.x0,ne.circularPathData.sourceX=ne.source.x0+ne.circularPathData.sourceWidth,ne.circularPathData.targetX=ne.target.x0,ne.circularPathData.sourceY=ne.y0,ne.circularPathData.targetY=ne.y1,Se(ne,nt)&&O(ne))ne.circularPathData.leftSmallArcRadius=u+ne.width/2,ne.circularPathData.leftLargeArcRadius=u+ne.width/2,ne.circularPathData.rightSmallArcRadius=u+ne.width/2,ne.circularPathData.rightLargeArcRadius=u+ne.width/2,ne.circularLinkType=="bottom"?(ne.circularPathData.verticalFullExtent=ne.source.y1+p+ne.circularPathData.verticalBuffer,ne.circularPathData.verticalLeftInnerExtent=ne.circularPathData.verticalFullExtent-ne.circularPathData.leftLargeArcRadius,ne.circularPathData.verticalRightInnerExtent=ne.circularPathData.verticalFullExtent-ne.circularPathData.rightLargeArcRadius):(ne.circularPathData.verticalFullExtent=ne.source.y0-p-ne.circularPathData.verticalBuffer,ne.circularPathData.verticalLeftInnerExtent=ne.circularPathData.verticalFullExtent+ne.circularPathData.leftLargeArcRadius,ne.circularPathData.verticalRightInnerExtent=ne.circularPathData.verticalFullExtent+ne.circularPathData.rightLargeArcRadius);else{var Ce=ne.source.column,Ye=ne.circularLinkType,rt=Re.links.filter(function(kt){return kt.source.column==Ce&&kt.circularLinkType==Ye});ne.circularLinkType=="bottom"?rt.sort(le):rt.sort($);var Ke=0;rt.forEach(function(kt,Nt){kt.circularLinkID==ne.circularLinkID&&(ne.circularPathData.leftSmallArcRadius=u+ne.width/2+Ke,ne.circularPathData.leftLargeArcRadius=u+ne.width/2+Nt*We+Ke),Ke=Ke+kt.width}),Ce=ne.target.column,rt=Re.links.filter(function(kt){return kt.target.column==Ce&&kt.circularLinkType==Ye}),ne.circularLinkType=="bottom"?rt.sort(de):rt.sort(ce),Ke=0,rt.forEach(function(kt,Nt){kt.circularLinkID==ne.circularLinkID&&(ne.circularPathData.rightSmallArcRadius=u+ne.width/2+Ke,ne.circularPathData.rightLargeArcRadius=u+ne.width/2+Nt*We+Ke),Ke=Ke+kt.width}),ne.circularLinkType=="bottom"?(ne.circularPathData.verticalFullExtent=Math.max(at,ne.source.y1,ne.target.y1)+p+ne.circularPathData.verticalBuffer,ne.circularPathData.verticalLeftInnerExtent=ne.circularPathData.verticalFullExtent-ne.circularPathData.leftLargeArcRadius,ne.circularPathData.verticalRightInnerExtent=ne.circularPathData.verticalFullExtent-ne.circularPathData.rightLargeArcRadius):(ne.circularPathData.verticalFullExtent=qe-p-ne.circularPathData.verticalBuffer,ne.circularPathData.verticalLeftInnerExtent=ne.circularPathData.verticalFullExtent+ne.circularPathData.leftLargeArcRadius,ne.circularPathData.verticalRightInnerExtent=ne.circularPathData.verticalFullExtent+ne.circularPathData.rightLargeArcRadius)}ne.circularPathData.leftInnerExtent=ne.circularPathData.sourceX+ne.circularPathData.leftNodeBuffer,ne.circularPathData.rightInnerExtent=ne.circularPathData.targetX-ne.circularPathData.rightNodeBuffer,ne.circularPathData.leftFullExtent=ne.circularPathData.sourceX+ne.circularPathData.leftLargeArcRadius+ne.circularPathData.leftNodeBuffer,ne.circularPathData.rightFullExtent=ne.circularPathData.targetX-ne.circularPathData.rightLargeArcRadius-ne.circularPathData.rightNodeBuffer}if(ne.circular)ne.path=B(ne);else{var Mt=E.linkHorizontal().source(function(kt){var Nt=kt.source.x0+(kt.source.x1-kt.source.x0),Gt=kt.y0;return[Nt,Gt]}).target(function(kt){var Nt=kt.target.x0,Gt=kt.y1;return[Nt,Gt]});ne.path=Mt(ne)}})}function B(Re){var We="";return Re.circularLinkType=="top"?We="M"+Re.circularPathData.sourceX+" "+Re.circularPathData.sourceY+" L"+Re.circularPathData.leftInnerExtent+" "+Re.circularPathData.sourceY+" A"+Re.circularPathData.leftLargeArcRadius+" "+Re.circularPathData.leftSmallArcRadius+" 0 0 0 "+Re.circularPathData.leftFullExtent+" "+(Re.circularPathData.sourceY-Re.circularPathData.leftSmallArcRadius)+" L"+Re.circularPathData.leftFullExtent+" "+Re.circularPathData.verticalLeftInnerExtent+" A"+Re.circularPathData.leftLargeArcRadius+" "+Re.circularPathData.leftLargeArcRadius+" 0 0 0 "+Re.circularPathData.leftInnerExtent+" "+Re.circularPathData.verticalFullExtent+" L"+Re.circularPathData.rightInnerExtent+" "+Re.circularPathData.verticalFullExtent+" A"+Re.circularPathData.rightLargeArcRadius+" "+Re.circularPathData.rightLargeArcRadius+" 0 0 0 "+Re.circularPathData.rightFullExtent+" "+Re.circularPathData.verticalRightInnerExtent+" L"+Re.circularPathData.rightFullExtent+" "+(Re.circularPathData.targetY-Re.circularPathData.rightSmallArcRadius)+" A"+Re.circularPathData.rightLargeArcRadius+" "+Re.circularPathData.rightSmallArcRadius+" 0 0 0 "+Re.circularPathData.rightInnerExtent+" "+Re.circularPathData.targetY+" L"+Re.circularPathData.targetX+" "+Re.circularPathData.targetY:We="M"+Re.circularPathData.sourceX+" "+Re.circularPathData.sourceY+" L"+Re.circularPathData.leftInnerExtent+" "+Re.circularPathData.sourceY+" A"+Re.circularPathData.leftLargeArcRadius+" "+Re.circularPathData.leftSmallArcRadius+" 0 0 1 "+Re.circularPathData.leftFullExtent+" "+(Re.circularPathData.sourceY+Re.circularPathData.leftSmallArcRadius)+" L"+Re.circularPathData.leftFullExtent+" "+Re.circularPathData.verticalLeftInnerExtent+" A"+Re.circularPathData.leftLargeArcRadius+" "+Re.circularPathData.leftLargeArcRadius+" 0 0 1 "+Re.circularPathData.leftInnerExtent+" "+Re.circularPathData.verticalFullExtent+" L"+Re.circularPathData.rightInnerExtent+" "+Re.circularPathData.verticalFullExtent+" A"+Re.circularPathData.rightLargeArcRadius+" "+Re.circularPathData.rightLargeArcRadius+" 0 0 1 "+Re.circularPathData.rightFullExtent+" "+Re.circularPathData.verticalRightInnerExtent+" L"+Re.circularPathData.rightFullExtent+" "+(Re.circularPathData.targetY+Re.circularPathData.rightSmallArcRadius)+" A"+Re.circularPathData.rightLargeArcRadius+" "+Re.circularPathData.rightSmallArcRadius+" 0 0 1 "+Re.circularPathData.rightInnerExtent+" "+Re.circularPathData.targetY+" L"+Re.circularPathData.targetX+" "+Re.circularPathData.targetY,We}function X(Re,We){return G(Re)==G(We)?Re.circularLinkType=="bottom"?le(Re,We):$(Re,We):G(We)-G(Re)}function $(Re,We){return Re.y0-We.y0}function le(Re,We){return We.y0-Re.y0}function ce(Re,We){return Re.y1-We.y1}function de(Re,We){return We.y1-Re.y1}function G(Re){return Re.target.column-Re.source.column}function Y(Re){return Re.target.x0-Re.source.x1}function ee(Re,We){var at=z(Re),nt=Y(We)/Math.tan(at),tt=we(Re)=="up"?Re.y1+nt:Re.y1-nt;return tt}function q(Re,We){var at=z(Re),nt=Y(We)/Math.tan(at),tt=we(Re)=="up"?Re.y1-nt:Re.y1+nt;return tt}function se(Re,We,at,nt){Re.links.forEach(function(tt){if(!tt.circular&&tt.target.column-tt.source.column>1){var qe=tt.source.column+1,he=tt.target.column-1,ue=1,ne=he-qe+1;for(ue=1;qe<=he;qe++,ue++)Re.nodes.forEach(function(Ce){if(Ce.column==qe){var Ye=ue/(ne+1),rt=Math.pow(1-Ye,3),Ke=3*Ye*Math.pow(1-Ye,2),Mt=3*Math.pow(Ye,2)*(1-Ye),kt=Math.pow(Ye,3),Nt=rt*tt.y0+Ke*tt.y0+Mt*tt.y1+kt*tt.y1,Gt=Nt-tt.width/2,Mr=Nt+tt.width/2,mr;Gt>Ce.y0&&GtCe.y0&&MrCe.y1&&j(qr,mr,We,at)})):GtCe.y1&&(mr=Mr-Ce.y0+10,Ce=j(Ce,mr,We,at),Re.nodes.forEach(function(qr){b(qr,nt)==b(Ce,nt)||qr.column!=Ce.column||qr.y0Ce.y1&&j(qr,mr,We,at)}))}})}})}function ae(Re,We){return Re.y0>We.y0&&Re.y0We.y0&&Re.y1We.y1}function j(Re,We,at,nt){return Re.y0+We>=at&&Re.y1+We<=nt&&(Re.y0=Re.y0+We,Re.y1=Re.y1+We,Re.targetLinks.forEach(function(tt){tt.y1=tt.y1+We}),Re.sourceLinks.forEach(function(tt){tt.y0=tt.y0+We})),Re}function Q(Re,We,at,nt){Re.nodes.forEach(function(tt){nt&&tt.y+(tt.y1-tt.y0)>We&&(tt.y=tt.y-(tt.y+(tt.y1-tt.y0)-We));var qe=Re.links.filter(function(ne){return b(ne.source,at)==b(tt,at)}),he=qe.length;he>1&&qe.sort(function(ne,Ce){if(!ne.circular&&!Ce.circular){if(ne.target.column==Ce.target.column)return ne.y1-Ce.y1;if(pe(ne,Ce)){if(ne.target.column>Ce.target.column){var Ye=q(Ce,ne);return ne.y1-Ye}if(Ce.target.column>ne.target.column){var rt=q(ne,Ce);return rt-Ce.y1}}else return ne.y1-Ce.y1}if(ne.circular&&!Ce.circular)return ne.circularLinkType=="top"?-1:1;if(Ce.circular&&!ne.circular)return Ce.circularLinkType=="top"?1:-1;if(ne.circular&&Ce.circular)return ne.circularLinkType===Ce.circularLinkType&&ne.circularLinkType=="top"?ne.target.column===Ce.target.column?ne.target.y1-Ce.target.y1:Ce.target.column-ne.target.column:ne.circularLinkType===Ce.circularLinkType&&ne.circularLinkType=="bottom"?ne.target.column===Ce.target.column?Ce.target.y1-ne.target.y1:ne.target.column-Ce.target.column:ne.circularLinkType=="top"?-1:1});var ue=tt.y0;qe.forEach(function(ne){ne.y0=ue+ne.width/2,ue=ue+ne.width}),qe.forEach(function(ne,Ce){if(ne.circularLinkType=="bottom"){var Ye=Ce+1,rt=0;for(Ye;Ye1&&tt.sort(function(ue,ne){if(!ue.circular&&!ne.circular){if(ue.source.column==ne.source.column)return ue.y0-ne.y0;if(pe(ue,ne)){if(ne.source.column0?"up":"down"}function Se(Re,We){return b(Re.source,We)==b(Re.target,We)}function Ie(Re,We,at){var nt=Re.nodes,tt=Re.links,qe=!1,he=!1;if(tt.forEach(function(Ke){Ke.circularLinkType=="top"?qe=!0:Ke.circularLinkType=="bottom"&&(he=!0)}),qe==!1||he==!1){var ue=x.min(nt,function(Ke){return Ke.y0}),ne=x.max(nt,function(Ke){return Ke.y1}),Ce=ne-ue,Ye=at-We,rt=Ye/Ce;nt.forEach(function(Ke){var Mt=(Ke.y1-Ke.y0)*rt;Ke.y0=(Ke.y0-ue)*rt,Ke.y1=Ke.y0+Mt}),tt.forEach(function(Ke){Ke.y0=(Ke.y0-ue)*rt,Ke.y1=(Ke.y1-ue)*rt,Ke.width=Ke.width*rt})}}d.sankeyCircular=m,d.sankeyCenter=n,d.sankeyLeft=r,d.sankeyRight=o,d.sankeyJustify=a,Object.defineProperty(d,"__esModule",{value:!0})})}}),j6=He({"src/traces/sankey/constants.js"(Z,V){"use strict";V.exports={nodeTextOffsetHorizontal:4,nodeTextOffsetVertical:3,nodePadAcross:10,sankeyIterations:50,forceIterations:5,forceTicksPerFrame:10,duration:500,ease:"linear",cn:{sankey:"sankey",sankeyLinks:"sankey-links",sankeyLink:"sankey-link",sankeyNodeSet:"sankey-node-set",sankeyNode:"sankey-node",nodeRect:"node-rect",nodeLabel:"node-label"}}}}),mG=He({"src/traces/sankey/render.js"(Z,V){"use strict";var d=fG(),x=(pg(),zf(p0)).interpolateNumber,S=Wn(),E=pG(),e=vG(),t=j6(),r=Ch(),o=Jn(),a=es(),n=sa(),i=n.strTranslate,s=n.strRotate,h=kv(),f=h.keyFun,v=h.repeat,c=h.unwrap,T=ou(),l=lo(),_=uh(),w=_.CAP_SHIFT,A=_.LINE_SPACING,M=3;function g(ee,q,se){var ae=c(q),j=ae.trace,Q=j.domain,re=j.orientation==="h",pe=j.node.pad,we=j.node.thickness,Se={justify:E.sankeyJustify,left:E.sankeyLeft,right:E.sankeyRight,center:E.sankeyCenter}[j.node.align],Ie=ee.width*(Q.x[1]-Q.x[0]),Re=ee.height*(Q.y[1]-Q.y[0]),We=ae._nodes,at=ae._links,nt=ae.circular,tt;nt?tt=e.sankeyCircular().circularLinkGap(0):tt=E.sankey(),tt.iterations(t.sankeyIterations).size(re?[Ie,Re]:[Re,Ie]).nodeWidth(we).nodePadding(pe).nodeId(function(qr){return qr.pointNumber}).nodeAlign(Se).nodes(We).links(at);var qe=tt();tt.nodePadding()=Oe||(_t=Oe-Ir.y0,_t>1e-6&&(Ir.y0+=_t,Ir.y1+=_t)),Oe=Ir.y1+pe})}function Nt(qr){var Er=qr.map(function(Ue,Ze){return{x0:Ue.x0,index:Ze}}).sort(function(Ue,Ze){return Ue.x0-Ze.x0}),Ir=[],_t=-1,Oe,Je=-1/0,Ae;for(he=0;heJe+we&&(_t+=1,Oe=Le.x0),Je=Le.x0,Ir[_t]||(Ir[_t]=[]),Ir[_t].push(Le),Ae=Oe-Le.x0,Le.x0+=Ae,Le.x1+=Ae}return Ir}if(j.node.x.length&&j.node.y.length){for(he=0;he0?" L "+j.targetX+" "+j.targetY:"")+"Z"):(se="M "+(j.targetX-q)+" "+(j.targetY-ae)+" L "+(j.rightInnerExtent-q)+" "+(j.targetY-ae)+" A "+(j.rightLargeArcRadius+ae)+" "+(j.rightSmallArcRadius+ae)+" 0 0 0 "+(j.rightFullExtent-ae-q)+" "+(j.targetY+j.rightSmallArcRadius)+" L "+(j.rightFullExtent-ae-q)+" "+j.verticalRightInnerExtent,Q&&re?se+=" A "+(j.rightLargeArcRadius+ae)+" "+(j.rightLargeArcRadius+ae)+" 0 0 0 "+(j.rightInnerExtent-ae-q)+" "+(j.verticalFullExtent+ae)+" L "+(j.rightFullExtent+ae-q-(j.rightLargeArcRadius-ae))+" "+(j.verticalFullExtent+ae)+" A "+(j.rightLargeArcRadius+ae)+" "+(j.rightLargeArcRadius+ae)+" 0 0 0 "+(j.leftFullExtent+ae)+" "+j.verticalLeftInnerExtent:Q?se+=" A "+(j.rightLargeArcRadius-ae)+" "+(j.rightSmallArcRadius-ae)+" 0 0 1 "+(j.rightFullExtent-q-ae-(j.rightLargeArcRadius-ae))+" "+(j.verticalFullExtent-ae)+" L "+(j.leftFullExtent+ae+(j.rightLargeArcRadius-ae))+" "+(j.verticalFullExtent-ae)+" A "+(j.rightLargeArcRadius-ae)+" "+(j.rightSmallArcRadius-ae)+" 0 0 1 "+(j.leftFullExtent+ae)+" "+j.verticalLeftInnerExtent:se+=" A "+(j.rightLargeArcRadius+ae)+" "+(j.rightLargeArcRadius+ae)+" 0 0 0 "+(j.rightInnerExtent-q)+" "+(j.verticalFullExtent+ae)+" L "+j.leftInnerExtent+" "+(j.verticalFullExtent+ae)+" A "+(j.leftLargeArcRadius+ae)+" "+(j.leftLargeArcRadius+ae)+" 0 0 0 "+(j.leftFullExtent+ae)+" "+j.verticalLeftInnerExtent,se+=" L "+(j.leftFullExtent+ae)+" "+(j.sourceY+j.leftSmallArcRadius)+" A "+(j.leftLargeArcRadius+ae)+" "+(j.leftSmallArcRadius+ae)+" 0 0 0 "+j.leftInnerExtent+" "+(j.sourceY-ae)+" L "+j.sourceX+" "+(j.sourceY-ae)+" L "+j.sourceX+" "+(j.sourceY+ae)+" L "+j.leftInnerExtent+" "+(j.sourceY+ae)+" A "+(j.leftLargeArcRadius-ae)+" "+(j.leftSmallArcRadius-ae)+" 0 0 1 "+(j.leftFullExtent-ae)+" "+(j.sourceY+j.leftSmallArcRadius)+" L "+(j.leftFullExtent-ae)+" "+j.verticalLeftInnerExtent,Q&&re?se+=" A "+(j.rightLargeArcRadius-ae)+" "+(j.rightSmallArcRadius-ae)+" 0 0 1 "+(j.leftFullExtent-ae-(j.rightLargeArcRadius-ae))+" "+(j.verticalFullExtent-ae)+" L "+(j.rightFullExtent+ae-q+(j.rightLargeArcRadius-ae))+" "+(j.verticalFullExtent-ae)+" A "+(j.rightLargeArcRadius-ae)+" "+(j.rightSmallArcRadius-ae)+" 0 0 1 "+(j.rightFullExtent+ae-q)+" "+j.verticalRightInnerExtent:Q?se+=" A "+(j.rightLargeArcRadius+ae)+" "+(j.rightLargeArcRadius+ae)+" 0 0 0 "+(j.leftFullExtent+ae)+" "+(j.verticalFullExtent+ae)+" L "+(j.rightFullExtent-q-ae)+" "+(j.verticalFullExtent+ae)+" A "+(j.rightLargeArcRadius+ae)+" "+(j.rightLargeArcRadius+ae)+" 0 0 0 "+(j.rightFullExtent+ae-q)+" "+j.verticalRightInnerExtent:se+=" A "+(j.leftLargeArcRadius-ae)+" "+(j.leftLargeArcRadius-ae)+" 0 0 1 "+j.leftInnerExtent+" "+(j.verticalFullExtent-ae)+" L "+(j.rightInnerExtent-q)+" "+(j.verticalFullExtent-ae)+" A "+(j.rightLargeArcRadius-ae)+" "+(j.rightLargeArcRadius-ae)+" 0 0 1 "+(j.rightFullExtent+ae-q)+" "+j.verticalRightInnerExtent,se+=" L "+(j.rightFullExtent+ae-q)+" "+(j.targetY+j.rightSmallArcRadius)+" A "+(j.rightLargeArcRadius-ae)+" "+(j.rightSmallArcRadius-ae)+" 0 0 1 "+(j.rightInnerExtent-q)+" "+(j.targetY+ae)+" L "+(j.targetX-q)+" "+(j.targetY+ae)+(q>0?" L "+j.targetX+" "+j.targetY:"")+"Z"),se}function u(){var ee=.5;function q(se){var ae=se.linkArrowLength;if(se.link.circular)return p(se.link,ae);var j=Math.abs((se.link.target.x0-se.link.source.x1)/2);ae>j&&(ae=j);var Q=se.link.source.x1,re=se.link.target.x0-ae,pe=x(Q,re),we=pe(ee),Se=pe(1-ee),Ie=se.link.y0-se.link.width/2,Re=se.link.y0+se.link.width/2,We=se.link.y1-se.link.width/2,at=se.link.y1+se.link.width/2,nt="M"+Q+","+Ie,tt="C"+we+","+Ie+" "+Se+","+We+" "+re+","+We,qe="C"+Se+","+at+" "+we+","+Re+" "+Q+","+Re,he=ae>0?"L"+(re+ae)+","+(We+se.link.width/2):"";return he+="L"+re+","+at,nt+tt+he+qe+"Z"}return q}function y(ee,q){var se=r(q.color),ae=t.nodePadAcross,j=ee.nodePad/2;q.dx=q.x1-q.x0,q.dy=q.y1-q.y0;var Q=q.dx,re=Math.max(.5,q.dy),pe="node_"+q.pointNumber;return q.group&&(pe=n.randstr()),q.trace=ee.trace,q.curveNumber=ee.trace.index,{index:q.pointNumber,key:pe,partOfGroup:q.partOfGroup||!1,group:q.group,traceId:ee.key,trace:ee.trace,node:q,nodePad:ee.nodePad,nodeLineColor:ee.nodeLineColor,nodeLineWidth:ee.nodeLineWidth,textFont:ee.textFont,size:ee.horizontal?ee.height:ee.width,visibleWidth:Math.ceil(Q),visibleHeight:re,zoneX:-ae,zoneY:-j,zoneWidth:Q+2*ae,zoneHeight:re+2*j,labelY:ee.horizontal?q.dy/2+1:q.dx/2+1,left:q.originalLayer===1,sizeAcross:ee.width,forceLayouts:ee.forceLayouts,horizontal:ee.horizontal,darkBackground:se.getBrightness()<=128,tinyColorHue:o.tinyRGB(se),tinyColorAlpha:se.getAlpha(),valueFormat:ee.valueFormat,valueSuffix:ee.valueSuffix,sankey:ee.sankey,graph:ee.graph,arrangement:ee.arrangement,uniqueNodeLabelPathId:[ee.guid,ee.key,pe].join("_"),interactionState:ee.interactionState,figure:ee}}function m(ee){ee.attr("transform",function(q){return i(q.node.x0.toFixed(3),q.node.y0.toFixed(3))})}function R(ee){ee.call(m)}function L(ee,q){ee.call(R),q.attr("d",u())}function z(ee){ee.attr("width",function(q){return q.node.x1-q.node.x0}).attr("height",function(q){return q.visibleHeight})}function F(ee){return ee.link.width>1||ee.linkLineWidth>0}function N(ee){var q=i(ee.translateX,ee.translateY);return q+(ee.horizontal?"matrix(1 0 0 1 0 0)":"matrix(0 1 1 0 0 0)")}function O(ee,q,se){ee.on(".basic",null).on("mouseover.basic",function(ae){!ae.interactionState.dragInProgress&&!ae.partOfGroup&&(se.hover(this,ae,q),ae.interactionState.hovered=[this,ae])}).on("mousemove.basic",function(ae){!ae.interactionState.dragInProgress&&!ae.partOfGroup&&(se.follow(this,ae),ae.interactionState.hovered=[this,ae])}).on("mouseout.basic",function(ae){!ae.interactionState.dragInProgress&&!ae.partOfGroup&&(se.unhover(this,ae,q),ae.interactionState.hovered=!1)}).on("click.basic",function(ae){ae.interactionState.hovered&&(se.unhover(this,ae,q),ae.interactionState.hovered=!1),!ae.interactionState.dragInProgress&&!ae.partOfGroup&&se.select(this,ae,q)})}function P(ee,q,se,ae){var j=S.behavior.drag().origin(function(Q){return{x:Q.node.x0+Q.visibleWidth/2,y:Q.node.y0+Q.visibleHeight/2}}).on("dragstart",function(Q){if(Q.arrangement!=="fixed"&&(n.ensureSingle(ae._fullLayout._infolayer,"g","dragcover",function(pe){ae._fullLayout._dragCover=pe}),n.raiseToTop(this),Q.interactionState.dragInProgress=Q.node,ce(Q.node),Q.interactionState.hovered&&(se.nodeEvents.unhover.apply(0,Q.interactionState.hovered),Q.interactionState.hovered=!1),Q.arrangement==="snap")){var re=Q.traceId+"|"+Q.key;Q.forceLayouts[re]?Q.forceLayouts[re].alpha(1):U(ee,re,Q,ae),B(ee,q,Q,re,ae)}}).on("drag",function(Q){if(Q.arrangement!=="fixed"){var re=S.event.x,pe=S.event.y;Q.arrangement==="snap"?(Q.node.x0=re-Q.visibleWidth/2,Q.node.x1=re+Q.visibleWidth/2,Q.node.y0=pe-Q.visibleHeight/2,Q.node.y1=pe+Q.visibleHeight/2):(Q.arrangement==="freeform"&&(Q.node.x0=re-Q.visibleWidth/2,Q.node.x1=re+Q.visibleWidth/2),pe=Math.max(0,Math.min(Q.size-Q.visibleHeight/2,pe)),Q.node.y0=pe-Q.visibleHeight/2,Q.node.y1=pe+Q.visibleHeight/2),ce(Q.node),Q.arrangement!=="snap"&&(Q.sankey.update(Q.graph),L(ee.filter(de(Q)),q))}}).on("dragend",function(Q){if(Q.arrangement!=="fixed"){Q.interactionState.dragInProgress=!1;for(var re=0;re0)window.requestAnimationFrame(Q);else{var we=se.node.originalX;se.node.x0=we-se.visibleWidth/2,se.node.x1=we+se.visibleWidth/2,$(se,j)}})}function X(ee,q,se,ae){return function(){for(var Q=0,re=0;re0&&ae.forceLayouts[q].alpha(0)}}function $(ee,q){for(var se=[],ae=[],j=0;j"),color:_(G,"bgcolor")||t.addOpacity(ae.color,1),borderColor:_(G,"bordercolor"),fontFamily:_(G,"font.family"),fontSize:_(G,"font.size"),fontColor:_(G,"font.color"),fontWeight:_(G,"font.weight"),fontStyle:_(G,"font.style"),fontVariant:_(G,"font.variant"),fontTextcase:_(G,"font.textcase"),fontLineposition:_(G,"font.lineposition"),fontShadow:_(G,"font.shadow"),nameLength:_(G,"namelength"),textAlign:_(G,"align"),idealAlign:d.event.x"),color:_(G,"bgcolor")||de.tinyColorHue,borderColor:_(G,"bordercolor"),fontFamily:_(G,"font.family"),fontSize:_(G,"font.size"),fontColor:_(G,"font.color"),fontWeight:_(G,"font.weight"),fontStyle:_(G,"font.style"),fontVariant:_(G,"font.variant"),fontTextcase:_(G,"font.textcase"),fontLineposition:_(G,"font.lineposition"),fontShadow:_(G,"font.shadow"),nameLength:_(G,"namelength"),textAlign:_(G,"align"),idealAlign:"left",hovertemplate:G.hovertemplate,hovertemplateLabels:Q,eventData:[de.node]},{container:g._hoverlayer.node(),outerContainer:g._paper.node(),gd:A});i(we,.85),s(we)}}},le=function(ce,de,G){A._fullLayout.hovermode!==!1&&(d.select(ce).call(c,de,G),de.node.trace.node.hoverinfo!=="skip"&&(de.node.fullData=de.node.trace,A.emit("plotly_unhover",{event:d.event,points:[de.node]})),e.loneUnhover(g._hoverlayer.node()))};E(A,b,M,{width:p.w,height:p.h,margin:{t:p.t,r:p.r,b:p.b,l:p.l}},{linkEvents:{hover:R,follow:P,unhover:U,select:m},nodeEvents:{hover:X,follow:$,unhover:le,select:B}})}}}),gG=He({"src/traces/sankey/base_plot.js"(Z){"use strict";var V=pc().overrideAll,d=Hh().getModuleCalcData,x=q6(),S=Zm(),E=Kd(),e=Ap(),t=Af().prepSelect,r=sa(),o=lo(),a="sankey";Z.name=a,Z.baseLayoutAttrOverrides=V({hoverlabel:S.hoverlabel},"plot","nested"),Z.plot=function(i){var s=d(i.calcdata,a)[0];x(i,s),Z.updateFx(i)},Z.clean=function(i,s,h,f){var v=f._has&&f._has(a),c=s._has&&s._has(a);v&&!c&&(f._paperdiv.selectAll(".sankey").remove(),f._paperdiv.selectAll(".bgsankey").remove())},Z.updateFx=function(i){for(var s=0;s0}V.exports=function(F,N,O,P){var U=F._fullLayout,B;w(O)&&P&&(B=P()),E.makeTraceGroups(U._indicatorlayer,N,"trace").each(function(X){var $=X[0],le=$.trace,ce=d.select(this),de=le._hasGauge,G=le._isAngular,Y=le._isBullet,ee=le.domain,q={w:U._size.w*(ee.x[1]-ee.x[0]),h:U._size.h*(ee.y[1]-ee.y[0]),l:U._size.l+U._size.w*ee.x[0],r:U._size.r+U._size.w*(1-ee.x[1]),t:U._size.t+U._size.h*(1-ee.y[1]),b:U._size.b+U._size.h*ee.y[0]},se=q.l+q.w/2,ae=q.t+q.h/2,j=Math.min(q.w/2,q.h),Q=n.innerRadius*j,re,pe,we,Se=le.align||"center";if(pe=ae,!de)re=q.l+l[Se]*q.w,we=function(ne){return y(ne,q.w,q.h)};else if(G&&(re=se,pe=ae+j/2,we=function(ne){return m(ne,.9*Q)}),Y){var Ie=n.bulletPadding,Re=1-n.bulletNumberDomainSize+Ie;re=q.l+(Re+(1-Re)*l[Se])*q.w,we=function(ne){return y(ne,(n.bulletNumberDomainSize-Ie)*q.w,q.h)}}g(F,ce,X,{numbersX:re,numbersY:pe,numbersScaler:we,transitionOpts:O,onComplete:B});var We,at;de&&(We={range:le.gauge.axis.range,color:le.gauge.bgcolor,line:{color:le.gauge.bordercolor,width:0},thickness:1},at={range:le.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:le.gauge.bordercolor,width:le.gauge.borderwidth},thickness:1});var nt=ce.selectAll("g.angular").data(G?X:[]);nt.exit().remove();var tt=ce.selectAll("g.angularaxis").data(G?X:[]);tt.exit().remove(),G&&M(F,ce,X,{radius:j,innerRadius:Q,gauge:nt,layer:tt,size:q,gaugeBg:We,gaugeOutline:at,transitionOpts:O,onComplete:B});var qe=ce.selectAll("g.bullet").data(Y?X:[]);qe.exit().remove();var he=ce.selectAll("g.bulletaxis").data(Y?X:[]);he.exit().remove(),Y&&A(F,ce,X,{gauge:qe,layer:he,size:q,gaugeBg:We,gaugeOutline:at,transitionOpts:O,onComplete:B});var ue=ce.selectAll("text.title").data(X);ue.exit().remove(),ue.enter().append("text").classed("title",!0),ue.attr("text-anchor",function(){return Y?T.right:T[le.title.align]}).text(le.title.text).call(a.font,le.title.font).call(i.convertToTspans,F),ue.attr("transform",function(){var ne=q.l+q.w*l[le.title.align],Ce,Ye=n.titlePadding,rt=a.bBox(ue.node());if(de){if(G)if(le.gauge.axis.visible){var Ke=a.bBox(tt.node());Ce=Ke.top-Ye-rt.bottom}else Ce=q.t+q.h/2-j/2-rt.bottom-Ye;Y&&(Ce=pe-(rt.top+rt.bottom)/2,ne=q.l-n.bulletPadding*q.w)}else Ce=le._numbersTop-Ye-rt.bottom;return t(ne,Ce)})})};function A(z,F,N,O){var P=N[0].trace,U=O.gauge,B=O.layer,X=O.gaugeBg,$=O.gaugeOutline,le=O.size,ce=P.domain,de=O.transitionOpts,G=O.onComplete,Y,ee,q,se,ae;U.enter().append("g").classed("bullet",!0),U.attr("transform",t(le.l,le.t)),B.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),B.selectAll("g.xbulletaxistick,path,text").remove();var j=le.h,Q=P.gauge.bar.thickness*j,re=ce.x[0],pe=ce.x[0]+(ce.x[1]-ce.x[0])*(P._hasNumber||P._hasDelta?1-n.bulletNumberDomainSize:1);Y=u(z,P.gauge.axis),Y._id="xbulletaxis",Y.domain=[re,pe],Y.setScale(),ee=s.calcTicks(Y),q=s.makeTransTickFn(Y),se=s.getTickSigns(Y)[2],ae=le.t+le.h,Y.visible&&(s.drawTicks(z,Y,{vals:Y.ticks==="inside"?s.clipEnds(Y,ee):ee,layer:B,path:s.makeTickPath(Y,ae,se),transFn:q}),s.drawLabels(z,Y,{vals:ee,layer:B,transFn:q,labelFns:s.makeLabelFns(Y,ae)}));function we(tt){tt.attr("width",function(qe){return Math.max(0,Y.c2p(qe.range[1])-Y.c2p(qe.range[0]))}).attr("x",function(qe){return Y.c2p(qe.range[0])}).attr("y",function(qe){return .5*(1-qe.thickness)*j}).attr("height",function(qe){return qe.thickness*j})}var Se=[X].concat(P.gauge.steps),Ie=U.selectAll("g.bg-bullet").data(Se);Ie.enter().append("g").classed("bg-bullet",!0).append("rect"),Ie.select("rect").call(we).call(b),Ie.exit().remove();var Re=U.selectAll("g.value-bullet").data([P.gauge.bar]);Re.enter().append("g").classed("value-bullet",!0).append("rect"),Re.select("rect").attr("height",Q).attr("y",(j-Q)/2).call(b),w(de)?Re.select("rect").transition().duration(de.duration).ease(de.easing).each("end",function(){G&&G()}).each("interrupt",function(){G&&G()}).attr("width",Math.max(0,Y.c2p(Math.min(P.gauge.axis.range[1],N[0].y)))):Re.select("rect").attr("width",typeof N[0].y=="number"?Math.max(0,Y.c2p(Math.min(P.gauge.axis.range[1],N[0].y))):0),Re.exit().remove();var We=N.filter(function(){return P.gauge.threshold.value||P.gauge.threshold.value===0}),at=U.selectAll("g.threshold-bullet").data(We);at.enter().append("g").classed("threshold-bullet",!0).append("line"),at.select("line").attr("x1",Y.c2p(P.gauge.threshold.value)).attr("x2",Y.c2p(P.gauge.threshold.value)).attr("y1",(1-P.gauge.threshold.thickness)/2*j).attr("y2",(1-(1-P.gauge.threshold.thickness)/2)*j).call(c.stroke,P.gauge.threshold.line.color).style("stroke-width",P.gauge.threshold.line.width),at.exit().remove();var nt=U.selectAll("g.gauge-outline").data([$]);nt.enter().append("g").classed("gauge-outline",!0).append("rect"),nt.select("rect").call(we).call(b),nt.exit().remove()}function M(z,F,N,O){var P=N[0].trace,U=O.size,B=O.radius,X=O.innerRadius,$=O.gaugeBg,le=O.gaugeOutline,ce=[U.l+U.w/2,U.t+U.h/2+B/2],de=O.gauge,G=O.layer,Y=O.transitionOpts,ee=O.onComplete,q=Math.PI/2;function se(Mt){var kt=P.gauge.axis.range[0],Nt=P.gauge.axis.range[1],Gt=(Mt-kt)/(Nt-kt)*Math.PI-q;return Gt<-q?-q:Gt>q?q:Gt}function ae(Mt){return d.svg.arc().innerRadius((X+B)/2-Mt/2*(B-X)).outerRadius((X+B)/2+Mt/2*(B-X)).startAngle(-q)}function j(Mt){Mt.attr("d",function(kt){return ae(kt.thickness).startAngle(se(kt.range[0])).endAngle(se(kt.range[1]))()})}var Q,re,pe,we;de.enter().append("g").classed("angular",!0),de.attr("transform",t(ce[0],ce[1])),G.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),G.selectAll("g.xangularaxistick,path,text").remove(),Q=u(z,P.gauge.axis),Q.type="linear",Q.range=P.gauge.axis.range,Q._id="xangularaxis",Q.ticklabeloverflow="allow",Q.setScale();var Se=function(Mt){return(Q.range[0]-Mt.x)/(Q.range[1]-Q.range[0])*Math.PI+Math.PI},Ie={},Re=s.makeLabelFns(Q,0),We=Re.labelStandoff;Ie.xFn=function(Mt){var kt=Se(Mt);return Math.cos(kt)*We},Ie.yFn=function(Mt){var kt=Se(Mt),Nt=Math.sin(kt)>0?.2:1;return-Math.sin(kt)*(We+Mt.fontSize*Nt)+Math.abs(Math.cos(kt))*(Mt.fontSize*o)},Ie.anchorFn=function(Mt){var kt=Se(Mt),Nt=Math.cos(kt);return Math.abs(Nt)<.1?"middle":Nt>0?"start":"end"},Ie.heightFn=function(Mt,kt,Nt){var Gt=Se(Mt);return-.5*(1+Math.sin(Gt))*Nt};var at=function(Mt){return t(ce[0]+B*Math.cos(Mt),ce[1]-B*Math.sin(Mt))};pe=function(Mt){return at(Se(Mt))};var nt=function(Mt){var kt=Se(Mt);return at(kt)+"rotate("+-r(kt)+")"};if(re=s.calcTicks(Q),we=s.getTickSigns(Q)[2],Q.visible){we=Q.ticks==="inside"?-1:1;var tt=(Q.linewidth||1)/2;s.drawTicks(z,Q,{vals:re,layer:G,path:"M"+we*tt+",0h"+we*Q.ticklen,transFn:nt}),s.drawLabels(z,Q,{vals:re,layer:G,transFn:pe,labelFns:Ie})}var qe=[$].concat(P.gauge.steps),he=de.selectAll("g.bg-arc").data(qe);he.enter().append("g").classed("bg-arc",!0).append("path"),he.select("path").call(j).call(b),he.exit().remove();var ue=ae(P.gauge.bar.thickness),ne=de.selectAll("g.value-arc").data([P.gauge.bar]);ne.enter().append("g").classed("value-arc",!0).append("path");var Ce=ne.select("path");w(Y)?(Ce.transition().duration(Y.duration).ease(Y.easing).each("end",function(){ee&&ee()}).each("interrupt",function(){ee&&ee()}).attrTween("d",p(ue,se(N[0].lastY),se(N[0].y))),P._lastValue=N[0].y):Ce.attr("d",typeof N[0].y=="number"?ue.endAngle(se(N[0].y)):"M0,0Z"),Ce.call(b),ne.exit().remove(),qe=[];var Ye=P.gauge.threshold.value;(Ye||Ye===0)&&qe.push({range:[Ye,Ye],color:P.gauge.threshold.color,line:{color:P.gauge.threshold.line.color,width:P.gauge.threshold.line.width},thickness:P.gauge.threshold.thickness});var rt=de.selectAll("g.threshold-arc").data(qe);rt.enter().append("g").classed("threshold-arc",!0).append("path"),rt.select("path").call(j).call(b),rt.exit().remove();var Ke=de.selectAll("g.gauge-outline").data([le]);Ke.enter().append("g").classed("gauge-outline",!0).append("path"),Ke.select("path").call(j).call(b),Ke.exit().remove()}function g(z,F,N,O){var P=N[0].trace,U=O.numbersX,B=O.numbersY,X=P.align||"center",$=T[X],le=O.transitionOpts,ce=O.onComplete,de=E.ensureSingle(F,"g","numbers"),G,Y,ee,q=[];P._hasNumber&&q.push("number"),P._hasDelta&&(q.push("delta"),P.delta.position==="left"&&q.reverse());var se=de.selectAll("text").data(q);se.enter().append("text"),se.attr("text-anchor",function(){return $}).attr("class",function(at){return at}).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),se.exit().remove();function ae(at,nt,tt,qe){if(at.match("s")&&tt>=0!=qe>=0&&!nt(tt).slice(-1).match(_)&&!nt(qe).slice(-1).match(_)){var he=at.slice().replace("s","f").replace(/\d+/,function(ne){return parseInt(ne)-1}),ue=u(z,{tickformat:he});return function(ne){return Math.abs(ne)<1?s.tickText(ue,ne).text:nt(ne)}}else return nt}function j(){var at=u(z,{tickformat:P.number.valueformat},P._range);at.setScale(),s.prepTicks(at);var nt=function(ne){return s.tickText(at,ne).text},tt=P.number.suffix,qe=P.number.prefix,he=de.select("text.number");function ue(){var ne=typeof N[0].y=="number"?qe+nt(N[0].y)+tt:"-";he.text(ne).call(a.font,P.number.font).call(i.convertToTspans,z)}return w(le)?he.transition().duration(le.duration).ease(le.easing).each("end",function(){ue(),ce&&ce()}).each("interrupt",function(){ue(),ce&&ce()}).attrTween("text",function(){var ne=d.select(this),Ce=S(N[0].lastY,N[0].y);P._lastValue=N[0].y;var Ye=ae(P.number.valueformat,nt,N[0].lastY,N[0].y);return function(rt){ne.text(qe+Ye(Ce(rt))+tt)}}):ue(),G=R(qe+nt(N[0].y)+tt,P.number.font,$,z),he}function Q(){var at=u(z,{tickformat:P.delta.valueformat},P._range);at.setScale(),s.prepTicks(at);var nt=function(rt){return s.tickText(at,rt).text},tt=P.delta.suffix,qe=P.delta.prefix,he=function(rt){var Ke=P.delta.relative?rt.relativeDelta:rt.delta;return Ke},ue=function(rt,Ke){return rt===0||typeof rt!="number"||isNaN(rt)?"-":(rt>0?P.delta.increasing.symbol:P.delta.decreasing.symbol)+qe+Ke(rt)+tt},ne=function(rt){return rt.delta>=0?P.delta.increasing.color:P.delta.decreasing.color};P._deltaLastValue===void 0&&(P._deltaLastValue=he(N[0]));var Ce=de.select("text.delta");Ce.call(a.font,P.delta.font).call(c.fill,ne({delta:P._deltaLastValue}));function Ye(){Ce.text(ue(he(N[0]),nt)).call(c.fill,ne(N[0])).call(i.convertToTspans,z)}return w(le)?Ce.transition().duration(le.duration).ease(le.easing).tween("text",function(){var rt=d.select(this),Ke=he(N[0]),Mt=P._deltaLastValue,kt=ae(P.delta.valueformat,nt,Mt,Ke),Nt=S(Mt,Ke);return P._deltaLastValue=Ke,function(Gt){rt.text(ue(Nt(Gt),kt)),rt.call(c.fill,ne({delta:Nt(Gt)}))}}).each("end",function(){Ye(),ce&&ce()}).each("interrupt",function(){Ye(),ce&&ce()}):Ye(),Y=R(ue(he(N[0]),nt),P.delta.font,$,z),Ce}var re=P.mode+P.align,pe;if(P._hasDelta&&(pe=Q(),re+=P.delta.position+P.delta.font.size+P.delta.font.family+P.delta.valueformat,re+=P.delta.increasing.symbol+P.delta.decreasing.symbol,ee=Y),P._hasNumber&&(j(),re+=P.number.font.size+P.number.font.family+P.number.valueformat+P.number.suffix+P.number.prefix,ee=G),P._hasDelta&&P._hasNumber){var we=[(G.left+G.right)/2,(G.top+G.bottom)/2],Se=[(Y.left+Y.right)/2,(Y.top+Y.bottom)/2],Ie,Re,We=.75*P.delta.font.size;P.delta.position==="left"&&(Ie=L(P,"deltaPos",0,-1*(G.width*l[P.align]+Y.width*(1-l[P.align])+We),re,Math.min),Re=we[1]-Se[1],ee={width:G.width+Y.width+We,height:Math.max(G.height,Y.height),left:Y.left+Ie,right:G.right,top:Math.min(G.top,Y.top+Re),bottom:Math.max(G.bottom,Y.bottom+Re)}),P.delta.position==="right"&&(Ie=L(P,"deltaPos",0,G.width*(1-l[P.align])+Y.width*l[P.align]+We,re,Math.max),Re=we[1]-Se[1],ee={width:G.width+Y.width+We,height:Math.max(G.height,Y.height),left:G.left,right:Y.right+Ie,top:Math.min(G.top,Y.top+Re),bottom:Math.max(G.bottom,Y.bottom+Re)}),P.delta.position==="bottom"&&(Ie=null,Re=Y.height,ee={width:Math.max(G.width,Y.width),height:G.height+Y.height,left:Math.min(G.left,Y.left),right:Math.max(G.right,Y.right),top:G.bottom-G.height,bottom:G.bottom+Y.height}),P.delta.position==="top"&&(Ie=null,Re=G.top,ee={width:Math.max(G.width,Y.width),height:G.height+Y.height,left:Math.min(G.left,Y.left),right:Math.max(G.right,Y.right),top:G.bottom-G.height-Y.height,bottom:G.bottom}),pe.attr({dx:Ie,dy:Re})}(P._hasNumber||P._hasDelta)&&de.attr("transform",function(){var at=O.numbersScaler(ee);re+=at[2];var nt=L(P,"numbersScale",1,at[0],re,Math.min),tt;P._scaleNumbers||(nt=1),P._isAngular?tt=B-nt*ee.bottom:tt=B-nt*(ee.top+ee.bottom)/2,P._numbersTop=nt*ee.top+tt;var qe=ee[X];X==="center"&&(qe=(ee.left+ee.right)/2);var he=U-nt*qe;return he=L(P,"numbersTranslate",0,he,re,Math.max),t(he,tt)+e(nt)})}function b(z){z.each(function(F){c.stroke(d.select(this),F.line.color)}).each(function(F){c.fill(d.select(this),F.color)}).style("stroke-width",function(F){return F.line.width})}function p(z,F,N){return function(){var O=x(F,N);return function(P){return z.endAngle(O(P))()}}}function u(z,F,N){var O=z._fullLayout,P=E.extendFlat({type:"linear",ticks:"outside",range:N,showline:!0},F),U={type:"linear",_id:"x"+F._id},B={letter:"x",font:O.font,noAutotickangles:!0,noHover:!0,noTickson:!0};function X($,le){return E.coerce(P,U,v,$,le)}return h(P,U,X,B,O),f(P,U,X,B),U}function y(z,F,N){var O=Math.min(F/z.width,N/z.height);return[O,z,F+"x"+N]}function m(z,F){var N=Math.sqrt(z.width/2*(z.width/2)+z.height*z.height),O=F/N;return[O,z,F]}function R(z,F,N,O){var P=document.createElementNS("http://www.w3.org/2000/svg","text"),U=d.select(P);return U.text(z).attr("x",0).attr("y",0).attr("text-anchor",N).attr("data-unformatted",z).call(i.convertToTspans,O).call(a.font,F),a.bBox(U.node())}function L(z,F,N,O,P,U){var B="_cache"+F;z[B]&&z[B].key===P||(z[B]={key:P,value:N});var X=E.aggNums(U,null,[z[B].value,O],2);return z[B].value=X,X}}}),SG=He({"src/traces/indicator/index.js"(Z,V){"use strict";V.exports={moduleType:"trace",name:"indicator",basePlotModule:bG(),categories:["svg","noOpacity","noHover"],animatable:!0,attributes:V6(),supplyDefaults:wG().supplyDefaults,calc:TG().calc,plot:AG(),meta:{}}}}),MG=He({"lib/indicator.js"(Z,V){"use strict";V.exports=SG()}}),H6=He({"src/traces/table/attributes.js"(Z,V){"use strict";var d=$0(),x=Qo().extendFlat,S=pc().overrideAll,E=tc(),e=wc().attributes,t=tf().descriptionOnlyNumbers,r=V.exports=S({domain:e({name:"table",trace:!0}),columnwidth:{valType:"number",arrayOk:!0,dflt:null},columnorder:{valType:"data_array"},header:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:t("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:28},align:x({},d.align,{arrayOk:!0}),line:{width:{valType:"number",arrayOk:!0,dflt:1},color:{valType:"color",arrayOk:!0,dflt:"grey"}},fill:{color:{valType:"color",arrayOk:!0,dflt:"white"}},font:x({},E({arrayOk:!0}))},cells:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:t("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:20},align:x({},d.align,{arrayOk:!0}),line:{width:{valType:"number",arrayOk:!0,dflt:1},color:{valType:"color",arrayOk:!0,dflt:"grey"}},fill:{color:{valType:"color",arrayOk:!0,dflt:"white"}},font:x({},E({arrayOk:!0}))}},"calc","from-root")}}),EG=He({"src/traces/table/defaults.js"(Z,V){"use strict";var d=sa(),x=H6(),S=wc().defaults;function E(e,t){for(var r=e.columnorder||[],o=e.header.values.length,a=r.slice(0,o),n=a.slice().sort(function(h,f){return h-f}),i=a.map(function(h){return n.indexOf(h)}),s=i.length;s",maxDimensionCount:60,overdrag:45,releaseTransitionDuration:120,releaseTransitionEase:"cubic-out",scrollbarCaptureWidth:18,scrollbarHideDelay:1e3,scrollbarHideDuration:1e3,scrollbarOffset:5,scrollbarWidth:8,transitionDuration:100,transitionEase:"cubic-out",uplift:5,wrapSpacer:" ",wrapSplitCharacter:" ",cn:{table:"table",tableControlView:"table-control-view",scrollBackground:"scroll-background",yColumn:"y-column",columnBlock:"column-block",scrollAreaClip:"scroll-area-clip",scrollAreaClipRect:"scroll-area-clip-rect",columnBoundary:"column-boundary",columnBoundaryClippath:"column-boundary-clippath",columnBoundaryRect:"column-boundary-rect",columnCells:"column-cells",columnCell:"column-cell",cellRect:"cell-rect",cellText:"cell-text",cellTextHolder:"cell-text-holder",scrollbarKit:"scrollbar-kit",scrollbar:"scrollbar",scrollbarSlider:"scrollbar-slider",scrollbarGlyph:"scrollbar-glyph",scrollbarCaptureZone:"scrollbar-capture-zone"}}}}),CG=He({"src/traces/table/data_preparation_helper.js"(Z,V){"use strict";var d=W6(),x=Qo().extendFlat,S=as(),E=bp().isTypedArray,e=bp().isArrayOrTypedArray;V.exports=function(v,c){var T=o(c.cells.values),l=function($){return $.slice(c.header.values.length,$.length)},_=o(c.header.values);_.length&&!_[0].length&&(_[0]=[""],_=o(_));var w=_.concat(l(T).map(function(){return a((_[0]||[""]).length)})),A=c.domain,M=Math.floor(v._fullLayout._size.w*(A.x[1]-A.x[0])),g=Math.floor(v._fullLayout._size.h*(A.y[1]-A.y[0])),b=c.header.values.length?w[0].map(function(){return c.header.height}):[d.emptyHeaderHeight],p=T.length?T[0].map(function(){return c.cells.height}):[],u=b.reduce(r,0),y=g-u,m=y+d.uplift,R=s(p,m),L=s(b,u),z=i(L,[]),F=i(R,z),N={},O=c._fullInput.columnorder;e(O)&&(O=Array.from(O)),O=O.concat(l(T.map(function($,le){return le})));var P=w.map(function($,le){var ce=e(c.columnwidth)?c.columnwidth[Math.min(le,c.columnwidth.length-1)]:c.columnwidth;return S(ce)?Number(ce):1}),U=P.reduce(r,0);P=P.map(function($){return $/U*M});var B=Math.max(t(c.header.line.width),t(c.cells.line.width)),X={key:c.uid+v._context.staticPlot,translateX:A.x[0]*v._fullLayout._size.w,translateY:v._fullLayout._size.h*(1-A.y[1]),size:v._fullLayout._size,width:M,maxLineWidth:B,height:g,columnOrder:O,groupHeight:g,rowBlocks:F,headerRowBlocks:z,scrollY:0,cells:x({},c.cells,{values:T}),headerCells:x({},c.header,{values:w}),gdColumns:w.map(function($){return $[0]}),gdColumnsOriginalOrder:w.map(function($){return $[0]}),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:w.map(function($,le){var ce=N[$];N[$]=(ce||0)+1;var de=$+"__"+N[$];return{key:de,label:$,specIndex:le,xIndex:O[le],xScale:n,x:void 0,calcdata:void 0,columnWidth:P[le]}})};return X.columns.forEach(function($){$.calcdata=X,$.x=n($)}),X};function t(f){if(e(f)){for(var v=0,c=0;c=v||g===f.length-1)&&(c[l]=w,w.key=M++,w.firstRowIndex=A,w.lastRowIndex=g,w=h(),l+=_,A=g+1,_=0);return c}function h(){return{firstRowIndex:null,lastRowIndex:null,rows:[]}}}}),LG=He({"src/traces/table/data_split_helpers.js"(Z){"use strict";var V=Qo().extendFlat;Z.splitToPanels=function(x){var S=[0,0],E=V({},x,{key:"header",type:"header",page:0,prevPages:S,currentRepaint:[null,null],dragHandle:!0,values:x.calcdata.headerCells.values[x.specIndex],rowBlocks:x.calcdata.headerRowBlocks,calcdata:V({},x.calcdata,{cells:x.calcdata.headerCells})}),e=V({},x,{key:"cells1",type:"cells",page:0,prevPages:S,currentRepaint:[null,null],dragHandle:!1,values:x.calcdata.cells.values[x.specIndex],rowBlocks:x.calcdata.rowBlocks}),t=V({},x,{key:"cells2",type:"cells",page:1,prevPages:S,currentRepaint:[null,null],dragHandle:!1,values:x.calcdata.cells.values[x.specIndex],rowBlocks:x.calcdata.rowBlocks});return[e,t,E]},Z.splitToCells=function(x){var S=d(x);return(x.values||[]).slice(S[0],S[1]).map(function(E,e){var t=typeof E=="string"&&E.match(/[<$&> ]/)?"_keybuster_"+Math.random():"";return{keyWithinBlock:e+t,key:S[0]+e,column:x,calcdata:x.calcdata,page:x.page,rowBlocks:x.rowBlocks,value:E}})};function d(x){var S=x.rowBlocks[x.page],E=S?S.rows[0].rowIndex:0,e=S?E+S.rows.length:0;return[E,e]}}}),X6=He({"src/traces/table/plot.js"(Z,V){"use strict";var d=W6(),x=Wn(),S=sa(),E=S.numberFormat,e=kv(),t=es(),r=ou(),o=sa().raiseToTop,a=sa().strTranslate,n=sa().cancelTransition,i=CG(),s=LG(),h=Jn();V.exports=function(re,pe){var we=!re._context.staticPlot,Se=re._fullLayout._paper.selectAll("."+d.cn.table).data(pe.map(function(Ke){var Mt=e.unwrap(Ke),kt=Mt.trace;return i(re,kt)}),e.keyFun);Se.exit().remove(),Se.enter().append("g").classed(d.cn.table,!0).attr("overflow","visible").style("box-sizing","content-box").style("position","absolute").style("left",0).style("overflow","visible").style("shape-rendering","crispEdges").style("pointer-events","all"),Se.attr("width",function(Ke){return Ke.width+Ke.size.l+Ke.size.r}).attr("height",function(Ke){return Ke.height+Ke.size.t+Ke.size.b}).attr("transform",function(Ke){return a(Ke.translateX,Ke.translateY)});var Ie=Se.selectAll("."+d.cn.tableControlView).data(e.repeat,e.keyFun),Re=Ie.enter().append("g").classed(d.cn.tableControlView,!0).style("box-sizing","content-box");if(we){var We="onwheel"in document?"wheel":"mousewheel";Re.on("mousemove",function(Ke){Ie.filter(function(Mt){return Ke===Mt}).call(l,re)}).on(We,function(Ke){if(!Ke.scrollbarState.wheeling){Ke.scrollbarState.wheeling=!0;var Mt=Ke.scrollY+x.event.deltaY,kt=$(re,Ie,null,Mt)(Ke);kt||(x.event.stopPropagation(),x.event.preventDefault()),Ke.scrollbarState.wheeling=!1}}).call(l,re,!0)}Ie.attr("transform",function(Ke){return a(Ke.size.l,Ke.size.t)});var at=Ie.selectAll("."+d.cn.scrollBackground).data(e.repeat,e.keyFun);at.enter().append("rect").classed(d.cn.scrollBackground,!0).attr("fill","none"),at.attr("width",function(Ke){return Ke.width}).attr("height",function(Ke){return Ke.height}),Ie.each(function(Ke){t.setClipUrl(x.select(this),v(re,Ke),re)});var nt=Ie.selectAll("."+d.cn.yColumn).data(function(Ke){return Ke.columns},e.keyFun);nt.enter().append("g").classed(d.cn.yColumn,!0),nt.exit().remove(),nt.attr("transform",function(Ke){return a(Ke.x,0)}),we&&nt.call(x.behavior.drag().origin(function(Ke){var Mt=x.select(this);return N(Mt,Ke,-d.uplift),o(this),Ke.calcdata.columnDragInProgress=!0,l(Ie.filter(function(kt){return Ke.calcdata.key===kt.key}),re),Ke}).on("drag",function(Ke){var Mt=x.select(this),kt=function(Mr){return(Ke===Mr?x.event.x:Mr.x)+Mr.columnWidth/2};Ke.x=Math.max(-d.overdrag,Math.min(Ke.calcdata.width+d.overdrag-Ke.columnWidth,x.event.x));var Nt=T(nt).filter(function(Mr){return Mr.calcdata.key===Ke.calcdata.key}),Gt=Nt.sort(function(Mr,mr){return kt(Mr)-kt(mr)});Gt.forEach(function(Mr,mr){Mr.xIndex=mr,Mr.x=Ke===Mr?Mr.x:Mr.xScale(Mr)}),nt.filter(function(Mr){return Ke!==Mr}).transition().ease(d.transitionEase).duration(d.transitionDuration).attr("transform",function(Mr){return a(Mr.x,0)}),Mt.call(n).attr("transform",a(Ke.x,-d.uplift))}).on("dragend",function(Ke){var Mt=x.select(this),kt=Ke.calcdata;Ke.x=Ke.xScale(Ke),Ke.calcdata.columnDragInProgress=!1,N(Mt,Ke,0),z(re,kt,kt.columns.map(function(Nt){return Nt.xIndex}))})),nt.each(function(Ke){t.setClipUrl(x.select(this),c(re,Ke),re)});var tt=nt.selectAll("."+d.cn.columnBlock).data(s.splitToPanels,e.keyFun);tt.enter().append("g").classed(d.cn.columnBlock,!0).attr("id",function(Ke){return Ke.key}),tt.style("cursor",function(Ke){return Ke.dragHandle?"ew-resize":Ke.calcdata.scrollbarState.barWiggleRoom?"ns-resize":"default"});var qe=tt.filter(P),he=tt.filter(O);we&&he.call(x.behavior.drag().origin(function(Ke){return x.event.stopPropagation(),Ke}).on("drag",$(re,Ie,-1)).on("dragend",function(){})),_(re,Ie,qe,tt),_(re,Ie,he,tt);var ue=Ie.selectAll("."+d.cn.scrollAreaClip).data(e.repeat,e.keyFun);ue.enter().append("clipPath").classed(d.cn.scrollAreaClip,!0).attr("id",function(Ke){return v(re,Ke)});var ne=ue.selectAll("."+d.cn.scrollAreaClipRect).data(e.repeat,e.keyFun);ne.enter().append("rect").classed(d.cn.scrollAreaClipRect,!0).attr("x",-d.overdrag).attr("y",-d.uplift).attr("fill","none"),ne.attr("width",function(Ke){return Ke.width+2*d.overdrag}).attr("height",function(Ke){return Ke.height+d.uplift});var Ce=nt.selectAll("."+d.cn.columnBoundary).data(e.repeat,e.keyFun);Ce.enter().append("g").classed(d.cn.columnBoundary,!0);var Ye=nt.selectAll("."+d.cn.columnBoundaryClippath).data(e.repeat,e.keyFun);Ye.enter().append("clipPath").classed(d.cn.columnBoundaryClippath,!0),Ye.attr("id",function(Ke){return c(re,Ke)});var rt=Ye.selectAll("."+d.cn.columnBoundaryRect).data(e.repeat,e.keyFun);rt.enter().append("rect").classed(d.cn.columnBoundaryRect,!0).attr("fill","none"),rt.attr("width",function(Ke){return Ke.columnWidth+2*f(Ke)}).attr("height",function(Ke){return Ke.calcdata.height+2*f(Ke)+d.uplift}).attr("x",function(Ke){return-f(Ke)}).attr("y",function(Ke){return-f(Ke)}),X(null,he,Ie)};function f(Q){return Math.ceil(Q.calcdata.maxLineWidth/2)}function v(Q,re){return"clip"+Q._fullLayout._uid+"_scrollAreaBottomClip_"+re.key}function c(Q,re){return"clip"+Q._fullLayout._uid+"_columnBoundaryClippath_"+re.calcdata.key+"_"+re.specIndex}function T(Q){return[].concat.apply([],Q.map(function(re){return re})).map(function(re){return re.__data__})}function l(Q,re,pe){function we(nt){var tt=nt.rowBlocks;return ee(tt,tt.length-1)+(tt.length?q(tt[tt.length-1],1/0):1)}var Se=Q.selectAll("."+d.cn.scrollbarKit).data(e.repeat,e.keyFun);Se.enter().append("g").classed(d.cn.scrollbarKit,!0).style("shape-rendering","geometricPrecision"),Se.each(function(nt){var tt=nt.scrollbarState;tt.totalHeight=we(nt),tt.scrollableAreaHeight=nt.groupHeight-U(nt),tt.currentlyVisibleHeight=Math.min(tt.totalHeight,tt.scrollableAreaHeight),tt.ratio=tt.currentlyVisibleHeight/tt.totalHeight,tt.barLength=Math.max(tt.ratio*tt.currentlyVisibleHeight,d.goldenRatio*d.scrollbarWidth),tt.barWiggleRoom=tt.currentlyVisibleHeight-tt.barLength,tt.wiggleRoom=Math.max(0,tt.totalHeight-tt.scrollableAreaHeight),tt.topY=tt.barWiggleRoom===0?0:nt.scrollY/tt.wiggleRoom*tt.barWiggleRoom,tt.bottomY=tt.topY+tt.barLength,tt.dragMultiplier=tt.wiggleRoom/tt.barWiggleRoom}).attr("transform",function(nt){var tt=nt.width+d.scrollbarWidth/2+d.scrollbarOffset;return a(tt,U(nt))});var Ie=Se.selectAll("."+d.cn.scrollbar).data(e.repeat,e.keyFun);Ie.enter().append("g").classed(d.cn.scrollbar,!0);var Re=Ie.selectAll("."+d.cn.scrollbarSlider).data(e.repeat,e.keyFun);Re.enter().append("g").classed(d.cn.scrollbarSlider,!0),Re.attr("transform",function(nt){return a(0,nt.scrollbarState.topY||0)});var We=Re.selectAll("."+d.cn.scrollbarGlyph).data(e.repeat,e.keyFun);We.enter().append("line").classed(d.cn.scrollbarGlyph,!0).attr("stroke","black").attr("stroke-width",d.scrollbarWidth).attr("stroke-linecap","round").attr("y1",d.scrollbarWidth/2),We.attr("y2",function(nt){return nt.scrollbarState.barLength-d.scrollbarWidth/2}).attr("stroke-opacity",function(nt){return nt.columnDragInProgress||!nt.scrollbarState.barWiggleRoom||pe?0:.4}),We.transition().delay(0).duration(0),We.transition().delay(d.scrollbarHideDelay).duration(d.scrollbarHideDuration).attr("stroke-opacity",0);var at=Ie.selectAll("."+d.cn.scrollbarCaptureZone).data(e.repeat,e.keyFun);at.enter().append("line").classed(d.cn.scrollbarCaptureZone,!0).attr("stroke","white").attr("stroke-opacity",.01).attr("stroke-width",d.scrollbarCaptureWidth).attr("stroke-linecap","butt").attr("y1",0).on("mousedown",function(nt){var tt=x.event.y,qe=this.getBoundingClientRect(),he=nt.scrollbarState,ue=tt-qe.top,ne=x.scale.linear().domain([0,he.scrollableAreaHeight]).range([0,he.totalHeight]).clamp(!0);he.topY<=ue&&ue<=he.bottomY||$(re,Q,null,ne(ue-he.barLength/2))(nt)}).call(x.behavior.drag().origin(function(nt){return x.event.stopPropagation(),nt.scrollbarState.scrollbarScrollInProgress=!0,nt}).on("drag",$(re,Q)).on("dragend",function(){})),at.attr("y2",function(nt){return nt.scrollbarState.scrollableAreaHeight}),re._context.staticPlot&&(We.remove(),at.remove())}function _(Q,re,pe,we){var Se=w(pe),Ie=A(Se);p(Ie);var Re=M(Ie);y(Re);var We=b(Ie),at=g(We);u(at),m(at,re,we,Q),Y(Ie)}function w(Q){var re=Q.selectAll("."+d.cn.columnCells).data(e.repeat,e.keyFun);return re.enter().append("g").classed(d.cn.columnCells,!0),re.exit().remove(),re}function A(Q){var re=Q.selectAll("."+d.cn.columnCell).data(s.splitToCells,function(pe){return pe.keyWithinBlock});return re.enter().append("g").classed(d.cn.columnCell,!0),re.exit().remove(),re}function M(Q){var re=Q.selectAll("."+d.cn.cellRect).data(e.repeat,function(pe){return pe.keyWithinBlock});return re.enter().append("rect").classed(d.cn.cellRect,!0),re}function g(Q){var re=Q.selectAll("."+d.cn.cellText).data(e.repeat,function(pe){return pe.keyWithinBlock});return re.enter().append("text").classed(d.cn.cellText,!0).style("cursor",function(){return"auto"}).on("mousedown",function(){x.event.stopPropagation()}),re}function b(Q){var re=Q.selectAll("."+d.cn.cellTextHolder).data(e.repeat,function(pe){return pe.keyWithinBlock});return re.enter().append("g").classed(d.cn.cellTextHolder,!0).style("shape-rendering","geometricPrecision"),re}function p(Q){Q.each(function(re,pe){var we=re.calcdata.cells.font,Se=re.column.specIndex,Ie={size:F(we.size,Se,pe),color:F(we.color,Se,pe),family:F(we.family,Se,pe),weight:F(we.weight,Se,pe),style:F(we.style,Se,pe),variant:F(we.variant,Se,pe),textcase:F(we.textcase,Se,pe),lineposition:F(we.lineposition,Se,pe),shadow:F(we.shadow,Se,pe)};re.rowNumber=re.key,re.align=F(re.calcdata.cells.align,Se,pe),re.cellBorderWidth=F(re.calcdata.cells.line.width,Se,pe),re.font=Ie})}function u(Q){Q.each(function(re){t.font(x.select(this),re.font)})}function y(Q){Q.attr("width",function(re){return re.column.columnWidth}).attr("stroke-width",function(re){return re.cellBorderWidth}).each(function(re){var pe=x.select(this);h.stroke(pe,F(re.calcdata.cells.line.color,re.column.specIndex,re.rowNumber)),h.fill(pe,F(re.calcdata.cells.fill.color,re.column.specIndex,re.rowNumber))})}function m(Q,re,pe,we){Q.text(function(Se){var Ie=Se.column.specIndex,Re=Se.rowNumber,We=Se.value,at=typeof We=="string",nt=at&&We.match(/
/i),tt=!at||nt;Se.mayHaveMarkup=at&&We.match(/[<&>]/);var qe=R(We);Se.latex=qe;var he=qe?"":F(Se.calcdata.cells.prefix,Ie,Re)||"",ue=qe?"":F(Se.calcdata.cells.suffix,Ie,Re)||"",ne=qe?null:F(Se.calcdata.cells.format,Ie,Re)||null,Ce=he+(ne?E(ne)(Se.value):Se.value)+ue,Ye;Se.wrappingNeeded=!Se.wrapped&&!tt&&!qe&&(Ye=L(Ce)),Se.cellHeightMayIncrease=nt||qe||Se.mayHaveMarkup||(Ye===void 0?L(Ce):Ye),Se.needsConvertToTspans=Se.mayHaveMarkup||Se.wrappingNeeded||Se.latex;var rt;if(Se.wrappingNeeded){var Ke=d.wrapSplitCharacter===" "?Ce.replace(/Se&&we.push(Ie),Se+=at}return we}function X(Q,re,pe){var we=T(re)[0];if(we!==void 0){var Se=we.rowBlocks,Ie=we.calcdata,Re=ee(Se,Se.length),We=we.calcdata.groupHeight-U(we),at=Ie.scrollY=Math.max(0,Math.min(Re-We,Ie.scrollY)),nt=B(Se,at,We);nt.length===1&&(nt[0]===Se.length-1?nt.unshift(nt[0]-1):nt.push(nt[0]+1)),nt[0]%2&&nt.reverse(),re.each(function(tt,qe){tt.page=nt[qe],tt.scrollY=at}),re.attr("transform",function(tt){var qe=ee(tt.rowBlocks,tt.page)-tt.scrollY;return a(0,qe)}),Q&&(le(Q,pe,re,nt,we.prevPages,we,0),le(Q,pe,re,nt,we.prevPages,we,1),l(pe,Q))}}function $(Q,re,pe,we){return function(Ie){var Re=Ie.calcdata?Ie.calcdata:Ie,We=re.filter(function(qe){return Re.key===qe.key}),at=pe||Re.scrollbarState.dragMultiplier,nt=Re.scrollY;Re.scrollY=we===void 0?Re.scrollY+at*x.event.dy:we;var tt=We.selectAll("."+d.cn.yColumn).selectAll("."+d.cn.columnBlock).filter(O);return X(Q,tt,We),Re.scrollY===nt}}function le(Q,re,pe,we,Se,Ie,Re){var We=we[Re]!==Se[Re];We&&(clearTimeout(Ie.currentRepaint[Re]),Ie.currentRepaint[Re]=setTimeout(function(){var at=pe.filter(function(nt,tt){return tt===Re&&we[tt]!==Se[tt]});_(Q,re,at,pe),Se[Re]=we[Re]}))}function ce(Q,re,pe,we){return function(){var Ie=x.select(re.parentNode);Ie.each(function(Re){var We=Re.fragments;Ie.selectAll("tspan.line").each(function(Ce,Ye){We[Ye].width=this.getComputedTextLength()});var at=We[We.length-1].width,nt=We.slice(0,-1),tt=[],qe,he,ue=0,ne=Re.column.columnWidth-2*d.cellPad;for(Re.value="";nt.length;)qe=nt.shift(),he=qe.width+at,ue+he>ne&&(Re.value+=tt.join(d.wrapSpacer)+d.lineBreaker,tt=[],ue=0),tt.push(qe.text),ue+=he;ue&&(Re.value+=tt.join(d.wrapSpacer)),Re.wrapped=!0}),Ie.selectAll("tspan.line").remove(),m(Ie.select("."+d.cn.cellText),pe,Q,we),x.select(re.parentNode.parentNode).call(Y)}}function de(Q,re,pe,we,Se){return function(){if(!Se.settledY){var Re=x.select(re.parentNode),We=ae(Se),at=Se.key-We.firstRowIndex,nt=We.rows[at].rowHeight,tt=Se.cellHeightMayIncrease?re.parentNode.getBoundingClientRect().height+2*d.cellPad:nt,qe=Math.max(tt,nt),he=qe-We.rows[at].rowHeight;he&&(We.rows[at].rowHeight=qe,Q.selectAll("."+d.cn.columnCell).call(Y),X(null,Q.filter(O),0),l(pe,we,!0)),Re.attr("transform",function(){var ue=this,ne=ue.parentNode,Ce=ne.getBoundingClientRect(),Ye=x.select(ue.parentNode).select("."+d.cn.cellRect).node().getBoundingClientRect(),rt=ue.transform.baseVal.consolidate(),Ke=Ye.top-Ce.top+(rt?rt.matrix.f:d.cellPad);return a(G(Se,x.select(ue.parentNode).select("."+d.cn.cellTextHolder).node().getBoundingClientRect().width),Ke)}),Se.settledY=!0}}}function G(Q,re){switch(Q.align){case"left":return d.cellPad;case"right":return Q.column.columnWidth-(re||0)-d.cellPad;case"center":return(Q.column.columnWidth-(re||0))/2;default:return d.cellPad}}function Y(Q){Q.attr("transform",function(re){var pe=re.rowBlocks[0].auxiliaryBlocks.reduce(function(Re,We){return Re+q(We,1/0)},0),we=ae(re),Se=q(we,re.key),Ie=Se+pe;return a(0,Ie)}).selectAll("."+d.cn.cellRect).attr("height",function(re){return j(ae(re),re.key).rowHeight})}function ee(Q,re){for(var pe=0,we=re-1;we>=0;we--)pe+=se(Q[we]);return pe}function q(Q,re){for(var pe=0,we=0;weE.length&&(S=S.slice(0,E.length)):S=[],t=0;t90&&(v-=180,n=-n),{angle:v,flip:n,p:x.c2p(e,S,E),offsetMultplier:i}}}}),UG=He({"src/traces/carpet/plot.js"(Z,V){"use strict";var d=Wn(),x=es(),S=Z6(),E=Y6(),e=NG(),t=ou(),r=sa(),o=r.strRotate,a=r.strTranslate,n=uh();V.exports=function(_,w,A,M){var g=_._context.staticPlot,b=w.xaxis,p=w.yaxis,u=_._fullLayout,y=u._clips;r.makeTraceGroups(M,A,"trace").each(function(m){var R=d.select(this),L=m[0],z=L.trace,F=z.aaxis,N=z.baxis,O=r.ensureSingle(R,"g","minorlayer"),P=r.ensureSingle(R,"g","majorlayer"),U=r.ensureSingle(R,"g","boundarylayer"),B=r.ensureSingle(R,"g","labellayer");R.style("opacity",z.opacity),s(b,p,P,F,"a",F._gridlines,!0,g),s(b,p,P,N,"b",N._gridlines,!0,g),s(b,p,O,F,"a",F._minorgridlines,!0,g),s(b,p,O,N,"b",N._minorgridlines,!0,g),s(b,p,U,F,"a-boundary",F._boundarylines,g),s(b,p,U,N,"b-boundary",N._boundarylines,g);var X=h(_,b,p,z,L,B,F._labels,"a-label"),$=h(_,b,p,z,L,B,N._labels,"b-label");f(_,B,z,L,b,p,X,$),i(z,L,y,b,p)})};function i(l,_,w,A,M){var g,b,p,u,y=w.select("#"+l._clipPathId);y.size()||(y=w.append("clipPath").classed("carpetclip",!0));var m=r.ensureSingle(y,"path","carpetboundary"),R=_.clipsegments,L=[];for(u=0;u0?"start":"end","data-notex":1}).call(x.font,R.font).text(R.text).call(t.convertToTspans,l),P=x.bBox(this);O.attr("transform",a(z.p[0],z.p[1])+o(z.angle)+a(R.axis.labelpadding*N,P.height*.3)),y=Math.max(y,P.width+R.axis.labelpadding)}),u.exit().remove(),m.maxExtent=y,m}function f(l,_,w,A,M,g,b,p){var u,y,m,R,L=r.aggNums(Math.min,null,w.a),z=r.aggNums(Math.max,null,w.a),F=r.aggNums(Math.min,null,w.b),N=r.aggNums(Math.max,null,w.b);u=.5*(L+z),y=F,m=w.ab2xy(u,y,!0),R=w.dxyda_rough(u,y),b.angle===void 0&&r.extendFlat(b,e(w,M,g,m,w.dxydb_rough(u,y))),T(l,_,w,A,m,R,w.aaxis,M,g,b,"a-title"),u=L,y=.5*(F+N),m=w.ab2xy(u,y,!0),R=w.dxydb_rough(u,y),p.angle===void 0&&r.extendFlat(p,e(w,M,g,m,w.dxyda_rough(u,y))),T(l,_,w,A,m,R,w.baxis,M,g,p,"b-title")}var v=n.LINE_SPACING,c=(1-n.MID_SHIFT)/v+1;function T(l,_,w,A,M,g,b,p,u,y,m){var R=[];b.title.text&&R.push(b.title.text);var L=_.selectAll("text."+m).data(R),z=y.maxExtent;L.enter().append("text").classed(m,!0),L.each(function(){var F=e(w,p,u,M,g);["start","both"].indexOf(b.showticklabels)===-1&&(z=0);var N=b.title.font.size;z+=N+b.title.offset;var O=y.angle+(y.flip<0?180:0),P=(O-F.angle+450)%360,U=P>90&&P<270,B=d.select(this);B.text(b.title.text).call(t.convertToTspans,l),U&&(z=(-t.lineCount(B)+c)*v*N-z),B.attr("transform",a(F.p[0],F.p[1])+o(F.angle)+a(0,z)).attr("text-anchor","middle").call(x.font,b.title.font)}),L.exit().remove()}}}),jG=He({"src/traces/carpet/cheater_basis.js"(Z,V){"use strict";var d=sa().isArrayOrTypedArray;V.exports=function(x,S,E){var e,t,r,o,a,n,i=[],s=d(x)?x.length:x,h=d(S)?S.length:S,f=d(x)?x:null,v=d(S)?S:null;f&&(r=(f.length-1)/(f[f.length-1]-f[0])/(s-1)),v&&(o=(v.length-1)/(v[v.length-1]-v[0])/(h-1));var c,T=1/0,l=-1/0;for(t=0;t=10)return null;for(var e=1/0,t=-1/0,r=S.length,o=0;o0&&(q=E.dxydi([],X-1,le,0,ce),Q.push(de[0]+q[0]/3),re.push(de[1]+q[1]/3),se=E.dxydi([],X-1,le,1,ce),Q.push(ee[0]-se[0]/3),re.push(ee[1]-se[1]/3)),Q.push(ee[0]),re.push(ee[1]),de=ee;else for(X=E.a2i(B),G=Math.floor(Math.max(0,Math.min(F-2,X))),Y=X-G,pe.length=F,pe.crossLength=N,pe.xy=function(we){return E.evalxy([],X,we)},pe.dxy=function(we,Se){return E.dxydj([],G,we,Y,Se)},$=0;$0&&(ae=E.dxydj([],G,$-1,Y,0),Q.push(de[0]+ae[0]/3),re.push(de[1]+ae[1]/3),j=E.dxydj([],G,$-1,Y,1),Q.push(ee[0]-j[0]/3),re.push(ee[1]-j[1]/3)),Q.push(ee[0]),re.push(ee[1]),de=ee;return pe.axisLetter=e,pe.axis=M,pe.crossAxis=y,pe.value=B,pe.constvar=t,pe.index=f,pe.x=Q,pe.y=re,pe.smoothing=y.smoothing,pe}function U(B){var X,$,le,ce,de,G=[],Y=[],ee={};if(ee.length=A.length,ee.crossLength=u.length,e==="b")for(le=Math.max(0,Math.min(N-2,B)),de=Math.min(1,Math.max(0,B-le)),ee.xy=function(q){return E.evalxy([],q,B)},ee.dxy=function(q,se){return E.dxydi([],q,le,se,de)},X=0;XA.length-1)&&g.push(x(U(o),{color:M.gridcolor,width:M.gridwidth,dash:M.griddash}));for(f=s;fA.length-1)&&!(T<0||T>A.length-1))for(l=A[a],_=A[T],r=0;rA[A.length-1])&&b.push(x(P(c),{color:M.minorgridcolor,width:M.minorgridwidth,dash:M.minorgriddash})));M.startline&&p.push(x(U(0),{color:M.startlinecolor,width:M.startlinewidth})),M.endline&&p.push(x(U(A.length-1),{color:M.endlinecolor,width:M.endlinewidth}))}else{for(n=5e-15,i=[Math.floor((A[A.length-1]-M.tick0)/M.dtick*(1+n)),Math.ceil((A[0]-M.tick0)/M.dtick/(1+n))].sort(function(B,X){return B-X}),s=i[0],h=i[1],f=s;f<=h;f++)v=M.tick0+M.dtick*f,g.push(x(P(v),{color:M.gridcolor,width:M.gridwidth,dash:M.griddash}));for(f=s-1;fA[A.length-1])&&b.push(x(P(c),{color:M.minorgridcolor,width:M.minorgridwidth,dash:M.minorgriddash}));M.startline&&p.push(x(P(A[0]),{color:M.startlinecolor,width:M.startlinewidth})),M.endline&&p.push(x(P(A[A.length-1]),{color:M.endlinecolor,width:M.endlinewidth}))}}}}),GG=He({"src/traces/carpet/calc_labels.js"(Z,V){"use strict";var d=Ho(),x=Qo().extendFlat;V.exports=function(E,e){var t,r,o,a,n,i=e._labels=[],s=e._gridlines;for(t=0;t=0;t--)r[s-t]=x[h][t],o[s-t]=S[h][t];for(a.push({x:r,y:o,bicubic:n}),t=h,r=[],o=[];t>=0;t--)r[h-t]=x[t][0],o[h-t]=S[t][0];return a.push({x:r,y:o,bicubic:i}),a}}}),WG=He({"src/traces/carpet/smooth_fill_2d_array.js"(Z,V){"use strict";var d=sa();V.exports=function(S,E,e){var t,r,o,a=[],n=[],i=S[0].length,s=S.length;function h($,le){var ce=0,de,G=0;return $>0&&(de=S[le][$-1])!==void 0&&(G++,ce+=de),$0&&(de=S[le-1][$])!==void 0&&(G++,ce+=de),le0&&r0&&tu);return d.log("Smoother converged to",y,"after",R,"iterations"),S}}}),XG=He({"src/traces/carpet/constants.js"(Z,V){"use strict";V.exports={RELATIVE_CULL_TOLERANCE:1e-6}}}),ZG=He({"src/traces/carpet/catmull_rom.js"(Z,V){"use strict";var d=.5;V.exports=function(S,E,e,t){var r=S[0]-E[0],o=S[1]-E[1],a=e[0]-E[0],n=e[1]-E[1],i=Math.pow(r*r+o*o,d/2),s=Math.pow(a*a+n*n,d/2),h=(s*s*r-i*i*a)*t,f=(s*s*o-i*i*n)*t,v=s*(i+s)*3,c=i*(i+s)*3;return[[E[0]+(v&&h/v),E[1]+(v&&f/v)],[E[0]-(c&&h/c),E[1]-(c&&f/c)]]}}}),YG=He({"src/traces/carpet/compute_control_points.js"(Z,V){"use strict";var d=ZG(),x=sa().ensureArray;function S(E,e,t){var r=-.5*t[0]+1.5*e[0],o=-.5*t[1]+1.5*e[1];return[(2*r+E[0])/3,(2*o+E[1])/3]}V.exports=function(e,t,r,o,a,n){var i,s,h,f,v,c,T,l,_,w,A=r[0].length,M=r.length,g=a?3*A-2:A,b=n?3*M-2:M;for(e=x(e,b),t=x(t,b),h=0;hv&&gT&&bc||bl},o.setScale=function(){var g=o._x,b=o._y,p=S(o._xctrl,o._yctrl,g,b,h.smoothing,f.smoothing);o._xctrl=p[0],o._yctrl=p[1],o.evalxy=E([o._xctrl,o._yctrl],i,s,h.smoothing,f.smoothing),o.dxydi=e([o._xctrl,o._yctrl],h.smoothing,f.smoothing),o.dxydj=t([o._xctrl,o._yctrl],h.smoothing,f.smoothing)},o.i2a=function(g){var b=Math.max(0,Math.floor(g[0]),i-2),p=g[0]-b;return(1-p)*a[b]+p*a[b+1]},o.j2b=function(g){var b=Math.max(0,Math.floor(g[1]),i-2),p=g[1]-b;return(1-p)*n[b]+p*n[b+1]},o.ij2ab=function(g){return[o.i2a(g[0]),o.j2b(g[1])]},o.a2i=function(g){var b=Math.max(0,Math.min(x(g,a),i-2)),p=a[b],u=a[b+1];return Math.max(0,Math.min(i-1,b+(g-p)/(u-p)))},o.b2j=function(g){var b=Math.max(0,Math.min(x(g,n),s-2)),p=n[b],u=n[b+1];return Math.max(0,Math.min(s-1,b+(g-p)/(u-p)))},o.ab2ij=function(g){return[o.a2i(g[0]),o.b2j(g[1])]},o.i2c=function(g,b){return o.evalxy([],g,b)},o.ab2xy=function(g,b,p){if(!p&&(ga[i-1]|bn[s-1]))return[!1,!1];var u=o.a2i(g),y=o.b2j(b),m=o.evalxy([],u,y);if(p){var R=0,L=0,z=[],F,N,O,P;ga[i-1]?(F=i-2,N=1,R=(g-a[i-1])/(a[i-1]-a[i-2])):(F=Math.max(0,Math.min(i-2,Math.floor(u))),N=u-F),bn[s-1]?(O=s-2,P=1,L=(b-n[s-1])/(n[s-1]-n[s-2])):(O=Math.max(0,Math.min(s-2,Math.floor(y))),P=y-O),R&&(o.dxydi(z,F,O,N,P),m[0]+=z[0]*R,m[1]+=z[1]*R),L&&(o.dxydj(z,F,O,N,P),m[0]+=z[0]*L,m[1]+=z[1]*L)}return m},o.c2p=function(g,b,p){return[b.c2p(g[0]),p.c2p(g[1])]},o.p2x=function(g,b,p){return[b.p2c(g[0]),p.p2c(g[1])]},o.dadi=function(g){var b=Math.max(0,Math.min(a.length-2,g));return a[b+1]-a[b]},o.dbdj=function(g){var b=Math.max(0,Math.min(n.length-2,g));return n[b+1]-n[b]},o.dxyda=function(g,b,p,u){var y=o.dxydi(null,g,b,p,u),m=o.dadi(g,p);return[y[0]/m,y[1]/m]},o.dxydb=function(g,b,p,u){var y=o.dxydj(null,g,b,p,u),m=o.dbdj(b,u);return[y[0]/m,y[1]/m]},o.dxyda_rough=function(g,b,p){var u=_*(p||.1),y=o.ab2xy(g+u,b,!0),m=o.ab2xy(g-u,b,!0);return[(y[0]-m[0])*.5/u,(y[1]-m[1])*.5/u]},o.dxydb_rough=function(g,b,p){var u=w*(p||.1),y=o.ab2xy(g,b+u,!0),m=o.ab2xy(g,b-u,!0);return[(y[0]-m[0])*.5/u,(y[1]-m[1])*.5/u]},o.dpdx=function(g){return g._m},o.dpdy=function(g){return g._m}}}}),eH=He({"src/traces/carpet/calc.js"(Z,V){"use strict";var d=Ho(),x=sa().isArray1D,S=jG(),E=qG(),e=VG(),t=GG(),r=HG(),o=Y2(),a=WG(),n=Z2(),i=QG();V.exports=function(h,f){var v=d.getFromId(h,f.xaxis),c=d.getFromId(h,f.yaxis),T=f.aaxis,l=f.baxis,_=f.x,w=f.y,A=[];_&&x(_)&&A.push("x"),w&&x(w)&&A.push("y"),A.length&&n(f,T,l,"a","b",A);var M=f._a=f._a||f.a,g=f._b=f._b||f.b;_=f._x||f.x,w=f._y||f.y;var b={};if(f._cheater){var p=T.cheatertype==="index"?M.length:M,u=l.cheatertype==="index"?g.length:g;_=S(p,u,f.cheaterslope)}f._x=_=o(_),f._y=w=o(w),a(_,M,g),a(w,M,g),i(f),f.setScale();var y=E(_),m=E(w),R=.5*(y[1]-y[0]),L=.5*(y[1]+y[0]),z=.5*(m[1]-m[0]),F=.5*(m[1]+m[0]),N=1.3;return y=[L-R*N,L+R*N],m=[F-z*N,F+z*N],f._extremes[v._id]=d.findExtremes(v,y,{padded:!0}),f._extremes[c._id]=d.findExtremes(c,m,{padded:!0}),e(f,"a","b"),e(f,"b","a"),t(f,T),t(f,l),b.clipsegments=r(f._xctrl,f._yctrl,T,l),b.x=_,b.y=w,b.a=M,b.b=g,[b]}}}),tH=He({"src/traces/carpet/index.js"(Z,V){"use strict";V.exports={attributes:PT(),supplyDefaults:BG(),plot:UG(),calc:eH(),animatable:!0,isContainer:!0,moduleType:"trace",name:"carpet",basePlotModule:Kf(),categories:["cartesian","svg","carpet","carpetAxis","notLegendIsolatable","noMultiCategory","noHover","noSortingByValue"],meta:{}}}}),rH=He({"lib/carpet.js"(Z,V){"use strict";V.exports=tH()}}),K6=He({"src/traces/scattercarpet/attributes.js"(Z,V){"use strict";var d=$d(),x=af(),S=ru(),{hovertemplateAttrs:E,texttemplateAttrs:e,templatefallbackAttrs:t}=Jl(),r=ku(),o=Qo().extendFlat,a=x.marker,n=x.line,i=a.line;V.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:o({},x.mode,{dflt:"markers"}),text:o({},x.text,{}),texttemplate:e({editType:"plot"},{keys:["a","b","text"]}),texttemplatefallback:t({editType:"plot"}),hovertext:o({},x.hovertext,{}),line:{color:n.color,width:n.width,dash:n.dash,backoff:n.backoff,shape:o({},n.shape,{values:["linear","spline"]}),smoothing:n.smoothing,editType:"calc"},connectgaps:x.connectgaps,fill:o({},x.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:d(),marker:o({symbol:a.symbol,opacity:a.opacity,maxdisplayed:a.maxdisplayed,angle:a.angle,angleref:a.angleref,standoff:a.standoff,size:a.size,sizeref:a.sizeref,sizemin:a.sizemin,sizemode:a.sizemode,line:o({width:i.width,dash:i.dash,editType:"calc"},r("marker.line")),gradient:a.gradient,editType:"calc"},r("marker")),textfont:x.textfont,textposition:x.textposition,selected:x.selected,unselected:x.unselected,hoverinfo:o({},S.hoverinfo,{flags:["a","b","text","name"]}),hoveron:x.hoveron,hovertemplate:E(),hovertemplatefallback:t(),zorder:x.zorder}}}),aH=He({"src/traces/scattercarpet/defaults.js"(Z,V){"use strict";var d=sa(),x=Tv(),S=Fu(),E=md(),e=Dd(),t=o1(),r=zd(),o=ev(),a=K6();V.exports=function(i,s,h,f){function v(M,g){return d.coerce(i,s,a,M,g)}v("carpet"),s.xaxis="x",s.yaxis="y";var c=v("a"),T=v("b"),l=Math.min(c.length,T.length);if(!l){s.visible=!1;return}s._length=l,v("text"),v("texttemplate"),v("texttemplatefallback"),v("hovertext");var _=l0?b=M.labelprefix.replace(/ = $/,""):b=M._hovertitle,l.push(b+": "+g.toFixed(3)+M.labelsuffix)}if(!v.hovertemplate){var w=f.hi||v.hoverinfo,A=w.split("+");A.indexOf("all")!==-1&&(A=["a","b","text"]),A.indexOf("a")!==-1&&_(c.aaxis,f.a),A.indexOf("b")!==-1&&_(c.baxis,f.b),l.push("y: "+a.yLabel),A.indexOf("text")!==-1&&x(f,v,l),a.extraText=l.join("
")}return o}}}),lH=He({"src/traces/scattercarpet/event_data.js"(Z,V){"use strict";V.exports=function(x,S,E,e,t){var r=e[t];return x.a=r.a,x.b=r.b,x.y=r.y,x}}}),uH=He({"src/traces/scattercarpet/index.js"(Z,V){"use strict";V.exports={attributes:K6(),supplyDefaults:aH(),colorbar:pp(),formatLabels:iH(),calc:nH(),plot:oH(),style:Qp().style,styleOnSelect:Qp().styleOnSelect,hoverPoints:sH(),selectPoints:c1(),eventData:lH(),moduleType:"trace",name:"scattercarpet",basePlotModule:Kf(),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}}}),cH=He({"lib/scattercarpet.js"(Z,V){"use strict";V.exports=uH()}}),J6=He({"src/traces/contourcarpet/attributes.js"(Z,V){"use strict";var d=p1(),x=V_(),S=ku(),E=Qo().extendFlat,e=x.contours;V.exports=E({carpet:{valType:"string",editType:"calc"},z:d.z,a:d.x,a0:d.x0,da:d.dx,b:d.y,b0:d.y0,db:d.dy,text:d.text,hovertext:d.hovertext,transpose:d.transpose,atype:d.xtype,btype:d.ytype,fillcolor:x.fillcolor,autocontour:x.autocontour,ncontours:x.ncontours,contours:{type:e.type,start:e.start,end:e.end,size:e.size,coloring:{valType:"enumerated",values:["fill","lines","none"],dflt:"fill",editType:"calc"},showlines:e.showlines,showlabels:e.showlabels,labelfont:e.labelfont,labelformat:e.labelformat,operation:e.operation,value:e.value,editType:"calc",impliedEdits:{autocontour:!1}},line:{color:x.line.color,width:x.line.width,dash:x.line.dash,smoothing:x.line.smoothing,editType:"plot"},zorder:x.zorder},S("",{cLetter:"z",autoColorDflt:!1}))}}),$6=He({"src/traces/contourcarpet/defaults.js"(Z,V){"use strict";var d=sa(),x=X2(),S=J6(),E=TS(),e=s3(),t=l3();V.exports=function(o,a,n,i){function s(c,T){return d.coerce(o,a,S,c,T)}function h(c){return d.coerce2(o,a,S,c)}if(s("carpet"),o.a&&o.b){var f=x(o,a,s,i,"a","b");if(!f){a.visible=!1;return}s("text");var v=s("contours.type")==="constraint";v?E(o,a,s,i,n,{hasHover:!1}):(e(o,a,s,h),t(o,a,s,i,{hasHover:!1}))}else a._defaultColor=n,a._length=null;s("zorder")}}}),fH=He({"src/traces/contourcarpet/calc.js"(Z,V){"use strict";var d=Tp(),x=sa(),S=Z2(),E=Y2(),e=K2(),t=J2(),r=sS(),o=$6(),a=IT(),n=dS();V.exports=function(h,f){var v=f._carpetTrace=a(h,f);if(!(!v||!v.visible||v.visible==="legendonly")){if(!f.a||!f.b){var c=h.data[v.index],T=h.data[f.index];T.a||(T.a=c.a),T.b||(T.b=c.b),o(T,f,f._defaultColor,h._fullLayout)}var l=i(h,f);return n(f,f._z),l}};function i(s,h){var f=h._carpetTrace,v=f.aaxis,c=f.baxis,T,l,_,w,A,M,g;v._minDtick=0,c._minDtick=0,x.isArray1D(h.z)&&S(h,v,c,"a","b",["z"]),T=h._a=h._a||h.a,w=h._b=h._b||h.b,T=T?v.makeCalcdata(h,"_a"):[],w=w?c.makeCalcdata(h,"_b"):[],l=h.a0||0,_=h.da||1,A=h.b0||0,M=h.db||1,g=h._z=E(h._z||h.z,h.transpose),h._emptypoints=t(g),e(g,h._emptypoints);var b=x.maxRowLength(g),p=h.xtype==="scaled"?"":T,u=r(h,p,l,_,b,v),y=h.ytype==="scaled"?"":w,m=r(h,y,A,M,g.length,c),R={a:u,b:m,z:g};return h.contours.type==="levels"&&h.contours.coloring!=="none"&&d(s,h,{vals:g,containerStr:"",cLetter:"z"}),[R]}}}),hH=He({"src/traces/carpet/axis_aligned_line.js"(Z,V){"use strict";var d=sa().isArrayOrTypedArray;V.exports=function(x,S,E,e){var t,r,o,a,n,i,s,h,f,v,c,T,l,_=d(E)?"a":"b",w=_==="a"?x.aaxis:x.baxis,A=w.smoothing,M=_==="a"?x.a2i:x.b2j,g=_==="a"?E:e,b=_==="a"?e:E,p=_==="a"?S.a.length:S.b.length,u=_==="a"?S.b.length:S.a.length,y=Math.floor(_==="a"?x.b2j(b):x.a2i(b)),m=_==="a"?function(le){return x.evalxy([],le,y)}:function(le){return x.evalxy([],y,le)};A&&(o=Math.max(0,Math.min(u-2,y)),a=y-o,r=_==="a"?function(le,ce){return x.dxydi([],le,o,ce,a)}:function(le,ce){return x.dxydj([],o,le,a,ce)});var R=M(g[0]),L=M(g[1]),z=R0?Math.floor:Math.ceil,O=z>0?Math.ceil:Math.floor,P=z>0?Math.min:Math.max,U=z>0?Math.max:Math.min,B=N(R+F),X=O(L-F);s=m(R);var $=[[s]];for(t=B;t*z=0;pe--)j=U.clipsegments[pe],Q=x([],j.x,R.c2p),re=x([],j.y,L.c2p),Q.reverse(),re.reverse(),we.push(S(Q,re,j.bicubic));var Se="M"+we.join("L")+"Z";A(F,U.clipsegments,R,L,ce,G),M(O,F,R,L,ae,ee,Y,P,U,G,Se),c(F,le,p,N,$,u,P),E.setClipUrl(F,P._clipPathId,p)})};function v(b,p){var u,y,m,R,L,z,F,N,O;for(u=0;ule&&(y.max=le),y.len=y.max-y.min}function l(b,p,u){var y=b.getPointAtLength(p),m=b.getPointAtLength(u),R=m.x-y.x,L=m.y-y.y,z=Math.sqrt(R*R+L*L);return[R/z,L/z]}function _(b){var p=Math.sqrt(b[0]*b[0]+b[1]*b[1]);return[b[0]/p,b[1]/p]}function w(b,p){var u=Math.abs(b[0]*p[0]+b[1]*p[1]),y=Math.sqrt(1-u*u);return y/u}function A(b,p,u,y,m,R){var L,z,F,N,O=e.ensureSingle(b,"g","contourbg"),P=O.selectAll("path").data(R==="fill"&&!m?[0]:[]);P.enter().append("path"),P.exit().remove();var U=[];for(N=0;N=0&&(B=Q,$=le):Math.abs(U[1]-B[1])=0&&(B=Q,$=le):e.log("endpt to newendpt is not vert. or horz.",U,B,Q)}if($>=0)break;N+=ae(U,B),U=B}if($===p.edgepaths.length){e.log("unclosed perimeter path");break}F=$,P=O.indexOf(F)===-1,P&&(F=O[0],N+=ae(U,B)+"Z",U=null)}for(F=0;Fg):M=z>m,g=z;var F=v(m,R,L,z);F.pos=y,F.yc=(m+z)/2,F.i=u,F.dir=M?"increasing":"decreasing",F.x=F.pos,F.y=[L,R],b&&(F.orig_p=s[u]),w&&(F.tx=i.text[u]),A&&(F.htx=i.hovertext[u]),p.push(F)}else p.push({pos:y,empty:!0})}return i._extremes[f._id]=S.findExtremes(f,d.concat(l,T),{padded:!0}),p.length&&(p[0].t={labels:{open:x(n,"open:")+" ",high:x(n,"high:")+" ",low:x(n,"low:")+" ",close:x(n,"close:")+" "}}),p}function a(n,i,s){var h=s._minDiff;if(!h){var f=n._fullData,v=[];h=1/0;var c;for(c=0;c"+_.labels[y]+d.hoverLabelText(T,m,l.yhoverformat)):(L=x.extendFlat({},A),L.y0=L.y1=R,L.yLabelVal=m,L.yLabel=_.labels[y]+d.hoverLabelText(T,m,l.yhoverformat),L.name="",w.push(L),p[m]=L)}return w}function i(s,h,f,v){var c=s.cd,T=s.ya,l=c[0].trace,_=c[0].t,w=a(s,h,f,v);if(!w)return[];var A=w.index,M=c[A],g=w.index=M.i,b=M.dir;function p(F){return _.labels[F]+d.hoverLabelText(T,l[F][g],l.yhoverformat)}var u=M.hi||l.hoverinfo||"",y=u.split("+"),m=u==="all",R=m||y.indexOf("y")!==-1,L=m||y.indexOf("text")!==-1,z=R?[p("open"),p("high"),p("low"),p("close")+" "+r[b]]:[];return L&&e(M,l,z),w.extraText=z.join("
"),w.y0=w.y1=T.c2p(M.yc,!0),[w]}V.exports={hoverPoints:o,hoverSplit:n,hoverOnPoints:i}}}),rk=He({"src/traces/ohlc/select.js"(Z,V){"use strict";V.exports=function(x,S){var E=x.cd,e=x.xaxis,t=x.yaxis,r=[],o,a=E[0].t.bPos||0;if(S===!1)for(o=0;oh?function(l){return l<=0}:function(l){return l>=0};a.c2g=function(l){var _=a.c2l(l)-s;return(T(_)?_:0)+c},a.g2c=function(l){return a.l2c(l+s-c)},a.g2p=function(l){return l*v},a.c2p=function(l){return a.g2p(a.c2g(l))}}}function t(a,n){return n==="degrees"?S(a):a}function r(a,n){return n==="degrees"?E(a):a}function o(a,n){var i=a.type;if(i==="linear"){var s=a.d2c,h=a.c2d;a.d2c=function(f,v){return t(s(f),v)},a.c2d=function(f,v){return h(r(f,v))}}a.makeCalcdata=function(f,v){var c=f[v],T=f._length,l,_,w=function(p){return a.d2c(p,f.thetaunit)};if(c)for(l=new Array(T),_=0;_0?p:1/0},M=S(w,A),g=d.mod(M+1,w.length);return[w[M],w[g]]}function v(_){return Math.abs(_)>1e-10?_:0}function c(_,w,A){w=w||0,A=A||0;for(var M=_.length,g=new Array(M),b=0;b0?1:0}function x(r){var o=r[0],a=r[1];if(!isFinite(o)||!isFinite(a))return[1,0];var n=(o+1)*(o+1)+a*a;return[(o*o+a*a-1)/n,2*a/n]}function S(r,o){var a=o[0],n=o[1];return[a*r.radius+r.cx,-n*r.radius+r.cy]}function E(r,o){return o*r.radius}function e(r,o,a,n){var i=S(r,x([a,o])),s=i[0],h=i[1],f=S(r,x([n,o])),v=f[0],c=f[1];if(o===0)return["M"+s+","+h,"L"+v+","+c].join(" ");var T=E(r,1/Math.abs(o));return["M"+s+","+h,"A"+T+","+T+" 0 0,"+(o<0?1:0)+" "+v+","+c].join(" ")}function t(r,o,a,n){var i=E(r,1/(o+1)),s=S(r,x([o,a])),h=s[0],f=s[1],v=S(r,x([o,n])),c=v[0],T=v[1];if(d(a)!==d(n)){var l=S(r,x([o,0])),_=l[0],w=l[1];return["M"+h+","+f,"A"+i+","+i+" 0 0,"+(0at?(nt=re,tt=re*at,ue=(pe-tt)/q.h/2,qe=[j[0],j[1]],he=[Q[0]+ue,Q[1]-ue]):(nt=pe/at,tt=pe,ue=(re-nt)/q.w/2,qe=[j[0]+ue,j[1]-ue],he=[Q[0],Q[1]]),Y.xLength2=nt,Y.yLength2=tt,Y.xDomain2=qe,Y.yDomain2=he;var ne=Y.xOffset2=q.l+q.w*qe[0],Ce=Y.yOffset2=q.t+q.h*(1-he[1]),Ye=Y.radius=nt/Ie,rt=Y.innerRadius=Y.getHole(G)*Ye,Ke=Y.cx=ne-Ye*Se[0],Mt=Y.cy=Ce+Ye*Se[3],kt=Y.cxx=Ke-ne,Nt=Y.cyy=Mt-Ce,Gt=se.side,Mr;Gt==="counterclockwise"?(Mr=Gt,Gt="top"):Gt==="clockwise"&&(Mr=Gt,Gt="bottom"),Y.radialAxis=Y.mockAxis(de,G,se,{_id:"x",side:Gt,_trueSide:Mr,domain:[rt/q.w,Ye/q.w]}),Y.angularAxis=Y.mockAxis(de,G,ae,{side:"right",domain:[0,Math.PI],autorange:!1}),Y.doAutoRange(de,G),Y.updateAngularAxis(de,G),Y.updateRadialAxis(de,G),Y.updateRadialAxisTitle(de,G),Y.xaxis=Y.mockCartesianAxis(de,G,{_id:"x",domain:qe}),Y.yaxis=Y.mockCartesianAxis(de,G,{_id:"y",domain:he});var mr=Y.pathSubplot();Y.clipPaths.forTraces.select("path").attr("d",mr).attr("transform",t(kt,Nt)),ee.frontplot.attr("transform",t(ne,Ce)).call(o.setClipUrl,Y._hasClipOnAxisFalse?null:Y.clipIds.forTraces,Y.gd),ee.bg.attr("d",mr).attr("transform",t(Ke,Mt)).call(r.fill,G.bgcolor)},B.mockAxis=function(de,G,Y,ee){var q=E.extendFlat({},Y,ee);return s(q,G,de),q},B.mockCartesianAxis=function(de,G,Y){var ee=this,q=ee.isSmith,se=Y._id,ae=E.extendFlat({type:"linear"},Y);i(ae,de);var j={x:[0,2],y:[1,3]};return ae.setRange=function(){var Q=ee.sectorBBox,re=j[se],pe=ee.radialAxis._rl,we=(pe[1]-pe[0])/(1-ee.getHole(G));ae.range=[Q[re[0]]*we,Q[re[1]]*we]},ae.isPtWithinRange=se==="x"&&!q?function(Q){return ee.isPtInside(Q)}:function(){return!0},ae.setRange(),ae.setScale(),ae},B.doAutoRange=function(de,G){var Y=this,ee=Y.gd,q=Y.radialAxis,se=Y.getRadial(G);h(ee,q);var ae=q.range;if(se.range=ae.slice(),se._input.range=ae.slice(),q._rl=[q.r2l(ae[0],null,"gregorian"),q.r2l(ae[1],null,"gregorian")],q.minallowed!==void 0){var j=q.r2l(q.minallowed);q._rl[0]>q._rl[1]?q._rl[1]=Math.max(q._rl[1],j):q._rl[0]=Math.max(q._rl[0],j)}if(q.maxallowed!==void 0){var Q=q.r2l(q.maxallowed);q._rl[0]90&&pe<=270&&(we.tickangle=180);var Re=Ie?function(Ye){var rt=z(Y,m([Ye.x,0]));return t(rt[0]-j,rt[1]-Q)}:function(Ye){return t(we.l2p(Ye.x)+ae,0)},We=Ie?function(Ye){return L(Y,Ye.x,-1/0,1/0)}:function(Ye){return Y.pathArc(we.r2p(Ye.x)+ae)},at=X(re);if(Y.radialTickLayout!==at&&(q["radial-axis"].selectAll(".xtick").remove(),Y.radialTickLayout=at),Se){we.setScale();var nt=0,tt=Ie?(we.tickvals||[]).filter(function(Ye){return Ye>=0}).map(function(Ye){return n.tickText(we,Ye,!0,!1)}):n.calcTicks(we),qe=Ie?tt:n.clipEnds(we,tt),he=n.getTickSigns(we)[2];Ie&&((we.ticks==="top"&&we.side==="bottom"||we.ticks==="bottom"&&we.side==="top")&&(he=-he),we.ticks==="top"&&we.side==="top"&&(nt=-we.ticklen),we.ticks==="bottom"&&we.side==="bottom"&&(nt=we.ticklen)),n.drawTicks(ee,we,{vals:tt,layer:q["radial-axis"],path:n.makeTickPath(we,0,he),transFn:Re,crisp:!1}),n.drawGrid(ee,we,{vals:qe,layer:q["radial-grid"],path:We,transFn:E.noop,crisp:!1}),n.drawLabels(ee,we,{vals:tt,layer:q["radial-axis"],transFn:Re,labelFns:n.makeLabelFns(we,nt)})}var ue=Y.radialAxisAngle=Y.vangles?P(le(O(re.angle),Y.vangles)):re.angle,ne=t(j,Q),Ce=ne+e(-ue);ce(q["radial-axis"],Se&&(re.showticklabels||re.ticks),{transform:Ce}),ce(q["radial-grid"],Se&&re.showgrid,{transform:Ie?"":ne}),ce(q["radial-line"].select("line"),Se&&re.showline,{x1:Ie?-se:ae,y1:0,x2:se,y2:0,transform:Ce}).attr("stroke-width",re.linewidth).call(r.stroke,re.linecolor)},B.updateRadialAxisTitle=function(de,G,Y){if(!this.isSmith){var ee=this,q=ee.gd,se=ee.radius,ae=ee.cx,j=ee.cy,Q=ee.getRadial(G),re=ee.id+"title",pe=0;if(Q.title){var we=o.bBox(ee.layers["radial-axis"].node()).height,Se=Q.title.font.size,Ie=Q.side;pe=Ie==="top"?Se:Ie==="counterclockwise"?-(we+Se*.4):we+Se*.8}var Re=Y!==void 0?Y:ee.radialAxisAngle,We=O(Re),at=Math.cos(We),nt=Math.sin(We),tt=ae+se/2*at+pe*nt,qe=j-se/2*nt+pe*at;ee.layers["radial-axis-title"]=T.draw(q,re,{propContainer:Q,propName:ee.id+".radialaxis.title.text",placeholder:F(q,"Click to enter radial axis title"),attributes:{x:tt,y:qe,"text-anchor":"middle"},transform:{rotate:-Re}})}},B.updateAngularAxis=function(de,G){var Y=this,ee=Y.gd,q=Y.layers,se=Y.radius,ae=Y.innerRadius,j=Y.cx,Q=Y.cy,re=Y.getAngular(G),pe=Y.angularAxis,we=Y.isSmith;we||(Y.fillViewInitialKey("angularaxis.rotation",re.rotation),pe.setGeometry(),pe.setScale());var Se=we?function(rt){var Ke=z(Y,m([0,rt.x]));return Math.atan2(Ke[0]-j,Ke[1]-Q)-Math.PI/2}:function(rt){return pe.t2g(rt.x)};pe.type==="linear"&&pe.thetaunit==="radians"&&(pe.tick0=P(pe.tick0),pe.dtick=P(pe.dtick));var Ie=function(rt){return t(j+se*Math.cos(rt),Q-se*Math.sin(rt))},Re=we?function(rt){var Ke=z(Y,m([0,rt.x]));return t(Ke[0],Ke[1])}:function(rt){return Ie(Se(rt))},We=we?function(rt){var Ke=z(Y,m([0,rt.x])),Mt=Math.atan2(Ke[0]-j,Ke[1]-Q)-Math.PI/2;return t(Ke[0],Ke[1])+e(-P(Mt))}:function(rt){var Ke=Se(rt);return Ie(Ke)+e(-P(Ke))},at=we?function(rt){return R(Y,rt.x,0,1/0)}:function(rt){var Ke=Se(rt),Mt=Math.cos(Ke),kt=Math.sin(Ke);return"M"+[j+ae*Mt,Q-ae*kt]+"L"+[j+se*Mt,Q-se*kt]},nt=n.makeLabelFns(pe,0),tt=nt.labelStandoff,qe={};qe.xFn=function(rt){var Ke=Se(rt);return Math.cos(Ke)*tt},qe.yFn=function(rt){var Ke=Se(rt),Mt=Math.sin(Ke)>0?.2:1;return-Math.sin(Ke)*(tt+rt.fontSize*Mt)+Math.abs(Math.cos(Ke))*(rt.fontSize*b)},qe.anchorFn=function(rt){var Ke=Se(rt),Mt=Math.cos(Ke);return Math.abs(Mt)<.1?"middle":Mt>0?"start":"end"},qe.heightFn=function(rt,Ke,Mt){var kt=Se(rt);return-.5*(1+Math.sin(kt))*Mt};var he=X(re);Y.angularTickLayout!==he&&(q["angular-axis"].selectAll("."+pe._id+"tick").remove(),Y.angularTickLayout=he);var ue=we?[1/0].concat(pe.tickvals||[]).map(function(rt){return n.tickText(pe,rt,!0,!1)}):n.calcTicks(pe);we&&(ue[0].text="\u221E",ue[0].fontSize*=1.75);var ne;if(G.gridshape==="linear"?(ne=ue.map(Se),E.angleDelta(ne[0],ne[1])<0&&(ne=ne.slice().reverse())):ne=null,Y.vangles=ne,pe.type==="category"&&(ue=ue.filter(function(rt){return E.isAngleInsideSector(Se(rt),Y.sectorInRad)})),pe.visible){var Ce=pe.ticks==="inside"?-1:1,Ye=(pe.linewidth||1)/2;n.drawTicks(ee,pe,{vals:ue,layer:q["angular-axis"],path:"M"+Ce*Ye+",0h"+Ce*pe.ticklen,transFn:We,crisp:!1}),n.drawGrid(ee,pe,{vals:ue,layer:q["angular-grid"],path:at,transFn:E.noop,crisp:!1}),n.drawLabels(ee,pe,{vals:ue,layer:q["angular-axis"],repositionOnUpdate:!0,transFn:Re,labelFns:qe})}ce(q["angular-line"].select("path"),re.showline,{d:Y.pathSubplot(),transform:t(j,Q)}).attr("stroke-width",re.linewidth).call(r.stroke,re.linecolor)},B.updateFx=function(de,G){if(!this.gd._context.staticPlot){var Y=!this.isSmith;Y&&(this.updateAngularDrag(de),this.updateRadialDrag(de,G,0),this.updateRadialDrag(de,G,1)),this.updateHoverAndMainDrag(de)}},B.updateHoverAndMainDrag=function(de){var G=this,Y=G.isSmith,ee=G.gd,q=G.layers,se=de._zoomlayer,ae=p.MINZOOM,j=p.OFFEDGE,Q=G.radius,re=G.innerRadius,pe=G.cx,we=G.cy,Se=G.cxx,Ie=G.cyy,Re=G.sectorInRad,We=G.vangles,at=G.radialAxis,nt=u.clampTiny,tt=u.findXYatLength,qe=u.findEnclosingVertexAngles,he=p.cornerHalfWidth,ue=p.cornerLen/2,ne,Ce,Ye=f.makeDragger(q,"path","maindrag",de.dragmode===!1?"none":"crosshair");d.select(Ye).attr("d",G.pathSubplot()).attr("transform",t(pe,we)),Ye.onmousemove=function(ur){c.hover(ee,ur,G.id),ee._fullLayout._lasthover=Ye,ee._fullLayout._hoversubplot=G.id},Ye.onmouseout=function(ur){ee._dragging||v.unhover(ee,ur)};var rt={element:Ye,gd:ee,subplot:G.id,plotinfo:{id:G.id,xaxis:G.xaxis,yaxis:G.yaxis},xaxes:[G.xaxis],yaxes:[G.yaxis]},Ke,Mt,kt,Nt,Gt,Mr,mr,qr,Er;function Ir(ur,sr){return Math.sqrt(ur*ur+sr*sr)}function _t(ur,sr){return Ir(ur-Se,sr-Ie)}function Oe(ur,sr){return Math.atan2(Ie-sr,ur-Se)}function Je(ur,sr){return[ur*Math.cos(sr),ur*Math.sin(-sr)]}function Ae(ur,sr){if(ur===0)return G.pathSector(2*he);var Pr=ue/ur,Ta=sr-Pr,Oa=sr+Pr,Ia=Math.max(0,Math.min(ur,Q)),qa=Ia-he,Wa=Ia+he;return"M"+Je(qa,Ta)+"A"+[qa,qa]+" 0,0,0 "+Je(qa,Oa)+"L"+Je(Wa,Oa)+"A"+[Wa,Wa]+" 0,0,1 "+Je(Wa,Ta)+"Z"}function Le(ur,sr,Pr){if(ur===0)return G.pathSector(2*he);var Ta=Je(ur,sr),Oa=Je(ur,Pr),Ia=nt((Ta[0]+Oa[0])/2),qa=nt((Ta[1]+Oa[1])/2),Wa,Ca;if(Ia&&qa){var hi=qa/Ia,wi=-1/hi,Kt=tt(he,hi,Ia,qa);Wa=tt(ue,wi,Kt[0][0],Kt[0][1]),Ca=tt(ue,wi,Kt[1][0],Kt[1][1])}else{var Dt,Yt;qa?(Dt=ue,Yt=he):(Dt=he,Yt=ue),Wa=[[Ia-Dt,qa-Yt],[Ia+Dt,qa-Yt]],Ca=[[Ia-Dt,qa+Yt],[Ia+Dt,qa+Yt]]}return"M"+Wa.join("L")+"L"+Ca.reverse().join("L")+"Z"}function Ue(){kt=null,Nt=null,Gt=G.pathSubplot(),Mr=!1;var ur=ee._fullLayout[G.id];mr=x(ur.bgcolor).getLuminance(),qr=f.makeZoombox(se,mr,pe,we,Gt),qr.attr("fill-rule","evenodd"),Er=f.makeCorners(se,pe,we),w(ee)}function Ze(ur,sr){return sr=Math.max(Math.min(sr,Q),re),urae?(ur-1&&ur===1&&_(sr,ee,[G.xaxis],[G.yaxis],G.id,rt),Pr.indexOf("event")>-1&&c.click(ee,sr,G.id)}rt.prepFn=function(ur,sr,Pr){var Ta=ee._fullLayout.dragmode,Oa=Ye.getBoundingClientRect();ee._fullLayout._calcInverseTransform(ee);var Ia=ee._fullLayout._invTransform;ne=ee._fullLayout._invScaleX,Ce=ee._fullLayout._invScaleY;var qa=E.apply3DTransform(Ia)(sr-Oa.left,Pr-Oa.top);if(Ke=qa[0],Mt=qa[1],We){var Wa=u.findPolygonOffset(Q,Re[0],Re[1],We);Ke+=Se+Wa[0],Mt+=Ie+Wa[1]}switch(Ta){case"zoom":rt.clickFn=fr,Y||(We?rt.moveFn=Ct:rt.moveFn=ut,rt.doneFn=Pt,Ue(ur,sr,Pr));break;case"select":case"lasso":l(ur,sr,Pr,rt,Ta);break}},v.init(rt)},B.updateRadialDrag=function(de,G,Y){var ee=this,q=ee.gd,se=ee.layers,ae=ee.radius,j=ee.innerRadius,Q=ee.cx,re=ee.cy,pe=ee.radialAxis,we=p.radialDragBoxSize,Se=we/2;if(!pe.visible)return;var Ie=O(ee.radialAxisAngle),Re=pe._rl,We=Re[0],at=Re[1],nt=Re[Y],tt=.75*(Re[1]-Re[0])/(1-ee.getHole(G))/ae,qe,he,ue;Y?(qe=Q+(ae+Se)*Math.cos(Ie),he=re-(ae+Se)*Math.sin(Ie),ue="radialdrag"):(qe=Q+(j-Se)*Math.cos(Ie),he=re-(j-Se)*Math.sin(Ie),ue="radialdrag-inner");var ne=f.makeRectDragger(se,ue,"crosshair",-Se,-Se,we,we),Ce={element:ne,gd:q};de.dragmode===!1&&(Ce.dragmode=!1),ce(d.select(ne),pe.visible&&j0!=(Y?Ke>We:Ke=90||q>90&&se>=450?Ie=1:j<=0&&re<=0?Ie=0:Ie=Math.max(j,re),q<=180&&se>=180||q>180&&se>=540?pe=-1:ae>=0&&Q>=0?pe=0:pe=Math.min(ae,Q),q<=270&&se>=270||q>270&&se>=630?we=-1:j>=0&&re>=0?we=0:we=Math.min(j,re),se>=360?Se=1:ae<=0&&Q<=0?Se=0:Se=Math.max(ae,Q),[pe,we,Se,Ie]}function le(de,G){var Y=function(q){return E.angleDist(de,q)},ee=E.findIndexOfMin(G,Y);return G[ee]}function ce(de,G,Y){return G?(de.attr("display",null),de.attr(Y)):de&&de.attr("display","none"),de}}}),sk=He({"src/plots/polar/layout_attributes.js"(Z,V){"use strict";var d=sh(),x=Wh(),S=wc().attributes,E=sa().extendFlat,e=pc().overrideAll,t=e({color:x.color,showline:E({},x.showline,{dflt:!0}),linecolor:x.linecolor,linewidth:x.linewidth,showgrid:E({},x.showgrid,{dflt:!0}),gridcolor:x.gridcolor,gridwidth:x.gridwidth,griddash:x.griddash},"plot","from-root"),r=e({tickmode:x.minor.tickmode,nticks:x.nticks,tick0:x.tick0,dtick:x.dtick,tickvals:x.tickvals,ticktext:x.ticktext,ticks:x.ticks,ticklen:x.ticklen,tickwidth:x.tickwidth,tickcolor:x.tickcolor,ticklabelstep:x.ticklabelstep,showticklabels:x.showticklabels,labelalias:x.labelalias,minorloglabels:x.minorloglabels,showtickprefix:x.showtickprefix,tickprefix:x.tickprefix,showticksuffix:x.showticksuffix,ticksuffix:x.ticksuffix,showexponent:x.showexponent,exponentformat:x.exponentformat,minexponent:x.minexponent,separatethousands:x.separatethousands,tickfont:x.tickfont,tickangle:x.tickangle,tickformat:x.tickformat,tickformatstops:x.tickformatstops,layer:x.layer},"plot","from-root"),o={visible:E({},x.visible,{dflt:!0}),type:E({},x.type,{values:["-","linear","log","date","category"]}),autotypenumbers:x.autotypenumbers,autorangeoptions:{minallowed:x.autorangeoptions.minallowed,maxallowed:x.autorangeoptions.maxallowed,clipmin:x.autorangeoptions.clipmin,clipmax:x.autorangeoptions.clipmax,include:x.autorangeoptions.include,editType:"plot"},autorange:E({},x.autorange,{editType:"plot"}),rangemode:{valType:"enumerated",values:["tozero","nonnegative","normal"],dflt:"tozero",editType:"calc"},minallowed:E({},x.minallowed,{editType:"plot"}),maxallowed:E({},x.maxallowed,{editType:"plot"}),range:E({},x.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],editType:"plot"}),categoryorder:x.categoryorder,categoryarray:x.categoryarray,angle:{valType:"angle",editType:"plot"},autotickangles:x.autotickangles,side:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"clockwise",editType:"plot"},title:{text:E({},x.title.text,{editType:"plot",dflt:""}),font:E({},x.title.font,{editType:"plot"}),editType:"plot"},hoverformat:x.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};E(o,t,r);var a={visible:E({},x.visible,{dflt:!0}),type:{valType:"enumerated",values:["-","linear","category"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:x.autotypenumbers,categoryorder:x.categoryorder,categoryarray:x.categoryarray,thetaunit:{valType:"enumerated",values:["radians","degrees"],dflt:"degrees",editType:"calc"},period:{valType:"number",editType:"calc",min:0},direction:{valType:"enumerated",values:["counterclockwise","clockwise"],dflt:"counterclockwise",editType:"calc"},rotation:{valType:"angle",editType:"calc"},hoverformat:x.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};E(a,t,r),V.exports={domain:S({name:"polar",editType:"plot"}),sector:{valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],dflt:[0,360],editType:"plot"},hole:{valType:"number",min:0,max:1,dflt:0,editType:"plot"},bgcolor:{valType:"color",editType:"plot",dflt:d.background},radialaxis:o,angularaxis:a,gridshape:{valType:"enumerated",values:["circular","linear"],dflt:"circular",editType:"plot"},uirevision:{valType:"any",editType:"none"},editType:"calc"}}}),SH=He({"src/plots/polar/layout_defaults.js"(Z,V){"use strict";var d=sa(),x=Jn(),S=zl(),E=o0(),e=Hh().getSubplotData,t=Y0(),r=t1(),o=Qm(),a=e0(),n=I2(),i=z_(),s=f5(),h=a1(),f=sk(),v=ik(),c=DT(),T=c.axisNames;function l(w,A,M,g){var b=M("bgcolor");g.bgColor=x.combine(b,g.paper_bgcolor);var p=M("sector");M("hole");var u=e(g.fullData,c.name,g.id),y=g.layoutOut,m;function R(we,Se){return M(m+"."+we,Se)}for(var L=0;L")}}V.exports={hoverPoints:x,makeHoverPointText:S}}}),kH=He({"src/traces/scatterpolar/index.js"(Z,V){"use strict";V.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:FT(),categories:["polar","symbols","showLegend","scatter-like"],attributes:Cx(),supplyDefaults:OT().supplyDefaults,colorbar:pp(),formatLabels:BT(),calc:MH(),plot:EH(),style:Qp().style,styleOnSelect:Qp().styleOnSelect,hoverPoints:NT().hoverPoints,selectPoints:c1(),meta:{}}}}),CH=He({"lib/scatterpolar.js"(Z,V){"use strict";V.exports=kH()}}),lk=He({"src/traces/scatterpolargl/attributes.js"(Z,V){"use strict";var d=Cx(),{cliponaxis:x,hoveron:S}=d,E=Qs(d,["cliponaxis","hoveron"]),{connectgaps:e,line:{color:t,dash:r,width:o},fill:a,fillcolor:n,marker:i,textfont:s,textposition:h}=xx();V.exports=ps(To({},E),{connectgaps:e,fill:a,fillcolor:n,line:{color:t,dash:r,editType:"calc",width:o},marker:i,textfont:s,textposition:h})}}),LH=He({"src/traces/scatterpolargl/defaults.js"(Z,V){"use strict";var d=sa(),x=Fu(),S=OT().handleRThetaDefaults,E=md(),e=Dd(),t=zd(),r=ev(),o=Tv().PTS_LINESONLY,a=lk();V.exports=function(i,s,h,f){function v(T,l){return d.coerce(i,s,a,T,l)}var c=S(i,s,f,v);if(!c){s.visible=!1;return}v("thetaunit"),v("mode",c=r&&(g.marker.cluster=_.tree),g.marker&&(g.markerSel.positions=g.markerUnsel.positions=g.marker.positions=y),g.line&&y.length>1&&t.extendFlat(g.line,e.linePositions(n,l,y)),g.text&&(t.extendFlat(g.text,{positions:y},e.textPosition(n,l,g.text,g.marker)),t.extendFlat(g.textSel,{positions:y},e.textPosition(n,l,g.text,g.markerSel)),t.extendFlat(g.textUnsel,{positions:y},e.textPosition(n,l,g.text,g.markerUnsel))),g.fill&&!v.fill2d&&(v.fill2d=!0),g.marker&&!v.scatter2d&&(v.scatter2d=!0),g.line&&!v.line2d&&(v.line2d=!0),g.text&&!v.glText&&(v.glText=!0),v.lineOptions.push(g.line),v.fillOptions.push(g.fill),v.markerOptions.push(g.marker),v.markerSelectedOptions.push(g.markerSel),v.markerUnselectedOptions.push(g.markerUnsel),v.textOptions.push(g.text),v.textSelectedOptions.push(g.textSel),v.textUnselectedOptions.push(g.textUnsel),v.selectBatch.push([]),v.unselectBatch.push([]),_.x=m,_.y=R,_.rawx=m,_.rawy=R,_.r=A,_.theta=M,_.positions=y,_._scene=v,_.index=v.count,v.count++}}),S(n,i,s)}},V.exports.reglPrecompiled=o}}),FH=He({"src/traces/scatterpolargl/index.js"(Z,V){"use strict";var d=DH();d.plot=zH(),V.exports=d}}),OH=He({"lib/scatterpolargl.js"(Z,V){"use strict";V.exports=FH()}}),uk=He({"src/traces/barpolar/attributes.js"(Z,V){"use strict";var{hovertemplateAttrs:d,templatefallbackAttrs:x}=Jl(),S=Qo().extendFlat,E=Cx(),e=Sv();V.exports={r:E.r,theta:E.theta,r0:E.r0,dr:E.dr,theta0:E.theta0,dtheta:E.dtheta,thetaunit:E.thetaunit,base:S({},e.base,{}),offset:S({},e.offset,{}),width:S({},e.width,{}),text:S({},e.text,{}),hovertext:S({},e.hovertext,{}),marker:t(),hoverinfo:E.hoverinfo,hovertemplate:d(),hovertemplatefallback:x(),selected:e.selected,unselected:e.unselected};function t(){var r=S({},e.marker);return delete r.cornerradius,r}}}),ck=He({"src/traces/barpolar/layout_attributes.js"(Z,V){"use strict";V.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}}}),BH=He({"src/traces/barpolar/defaults.js"(Z,V){"use strict";var d=sa(),x=OT().handleRThetaDefaults,S=j2(),E=uk();V.exports=function(t,r,o,a){function n(s,h){return d.coerce(t,r,E,s,h)}var i=x(t,r,a,n);if(!i){r.visible=!1;return}n("thetaunit"),n("base"),n("offset"),n("width"),n("text"),n("hovertext"),n("hovertemplate"),n("hovertemplatefallback"),S(t,r,n,o,a),d.coerceSelectionMarkerOpacity(r,n)}}}),NH=He({"src/traces/barpolar/layout_defaults.js"(Z,V){"use strict";var d=sa(),x=ck();V.exports=function(S,E,e){var t={},r;function o(i,s){return d.coerce(S[r]||{},E[r],x,i,s)}for(var a=0;a0?(f=s,v=h):(f=h,v=s);var c=e.findEnclosingVertexAngles(f,r.vangles)[0],T=e.findEnclosingVertexAngles(v,r.vangles)[1],l=[c,(f+v)/2,T];return e.pathPolygonAnnulus(n,i,f,v,l,o,a)}:function(n,i,s,h){return S.pathAnnulus(n,i,s,h,o,a)}}}}),jH=He({"src/traces/barpolar/hover.js"(Z,V){"use strict";var d=rf(),x=sa(),S=f1().getTraceColor,E=x.fillText,e=NT().makeHoverPointText,t=zT().isPtInsidePolygon;V.exports=function(o,a,n){var i=o.cd,s=i[0].trace,h=o.subplot,f=h.radialAxis,v=h.angularAxis,c=h.vangles,T=c?t:x.isPtInsideSector,l=o.maxHoverDistance,_=v._period||2*Math.PI,w=Math.abs(f.g2p(Math.sqrt(a*a+n*n))),A=Math.atan2(n,a);f.range[0]>f.range[1]&&(A+=Math.PI);var M=function(u){return T(w,A,[u.rp0,u.rp1],[u.thetag0,u.thetag1],c)?l+Math.min(1,Math.abs(u.thetag1-u.thetag0)/_)-1+(u.rp1-w)/(u.rp1-u.rp0)-1:1/0};if(d.getClosest(i,M,o),o.index!==!1){var g=o.index,b=i[g];o.x0=o.x1=b.ct[0],o.y0=o.y1=b.ct[1];var p=x.extendFlat({},b,{r:b.s,theta:b.p});return E(b,s,o),e(p,s,h,o),o.hovertemplate=s.hovertemplate,o.color=S(s,b),o.xLabelVal=o.yLabelVal=void 0,b.s<0&&(o.idealAlign="left"),[o]}}}}),qH=He({"src/traces/barpolar/index.js"(Z,V){"use strict";V.exports={moduleType:"trace",name:"barpolar",basePlotModule:FT(),categories:["polar","bar","showLegend"],attributes:uk(),layoutAttributes:ck(),supplyDefaults:BH(),supplyLayoutDefaults:NH(),calc:fk().calc,crossTraceCalc:fk().crossTraceCalc,plot:UH(),colorbar:pp(),formatLabels:BT(),style:Nd().style,styleOnSelect:Nd().styleOnSelect,hoverPoints:jH(),selectPoints:h1(),meta:{}}}}),VH=He({"lib/barpolar.js"(Z,V){"use strict";V.exports=qH()}}),hk=He({"src/plots/smith/constants.js"(Z,V){"use strict";V.exports={attr:"subplot",name:"smith",axisNames:["realaxis","imaginaryaxis"],axisName2dataArray:{imaginaryaxis:"imag",realaxis:"real"}}}}),pk=He({"src/plots/smith/layout_attributes.js"(Z,V){"use strict";var d=sh(),x=Wh(),S=wc().attributes,E=sa().extendFlat,e=pc().overrideAll,t=e({color:x.color,showline:E({},x.showline,{dflt:!0}),linecolor:x.linecolor,linewidth:x.linewidth,showgrid:E({},x.showgrid,{dflt:!0}),gridcolor:x.gridcolor,gridwidth:x.gridwidth,griddash:x.griddash},"plot","from-root"),r=e({ticklen:x.ticklen,tickwidth:E({},x.tickwidth,{dflt:2}),tickcolor:x.tickcolor,showticklabels:x.showticklabels,labelalias:x.labelalias,showtickprefix:x.showtickprefix,tickprefix:x.tickprefix,showticksuffix:x.showticksuffix,ticksuffix:x.ticksuffix,tickfont:x.tickfont,tickformat:x.tickformat,hoverformat:x.hoverformat,layer:x.layer},"plot","from-root"),o=E({visible:E({},x.visible,{dflt:!0}),tickvals:{dflt:[.2,.5,1,2,5],valType:"data_array",editType:"plot"},tickangle:E({},x.tickangle,{dflt:90}),ticks:{valType:"enumerated",values:["top","bottom",""],editType:"ticks"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},editType:"calc"},t,r),a=E({visible:E({},x.visible,{dflt:!0}),tickvals:{valType:"data_array",editType:"plot"},ticks:x.ticks,editType:"calc"},t,r);V.exports={domain:S({name:"smith",editType:"plot"}),bgcolor:{valType:"color",editType:"plot",dflt:d.background},realaxis:o,imaginaryaxis:a,editType:"calc"}}}),GH=He({"src/plots/smith/layout_defaults.js"(Z,V){"use strict";var d=sa(),x=Jn(),S=zl(),E=o0(),e=Hh().getSubplotData,t=e0(),r=Qm(),o=z_(),a=wv(),n=pk(),i=hk(),s=i.axisNames,h=v(function(c){return d.isTypedArray(c)&&(c=Array.from(c)),c.slice().reverse().map(function(T){return-T}).concat([0]).concat(c)},String);function f(c,T,l,_){var w=l("bgcolor");_.bgColor=x.combine(w,_.paper_bgcolor);var A=e(_.fullData,i.name,_.id),M=_.layoutOut,g;function b(B,X){return l(g+"."+B,X)}for(var p=0;p")}}V.exports={hoverPoints:x,makeHoverPointText:S}}}),JH=He({"src/traces/scattersmith/index.js"(Z,V){"use strict";V.exports={moduleType:"trace",name:"scattersmith",basePlotModule:HH(),categories:["smith","symbols","showLegend","scatter-like"],attributes:dk(),supplyDefaults:WH(),colorbar:pp(),formatLabels:XH(),calc:ZH(),plot:YH(),style:Qp().style,styleOnSelect:Qp().styleOnSelect,hoverPoints:KH().hoverPoints,selectPoints:c1(),meta:{}}}}),$H=He({"lib/scattersmith.js"(Z,V){"use strict";V.exports=JH()}}),Mp=He({"node_modules/world-calendars/dist/main.js"(Z,V){var d=ch();function x(){this.regionalOptions=[],this.regionalOptions[""]={invalidCalendar:"Calendar {0} not found",invalidDate:"Invalid {0} date",invalidMonth:"Invalid {0} month",invalidYear:"Invalid {0} year",differentCalendars:"Cannot mix {0} and {1} dates"},this.local=this.regionalOptions[""],this.calendars={},this._localCals={}}d(x.prototype,{instance:function(o,a){o=(o||"gregorian").toLowerCase(),a=a||"";var n=this._localCals[o+"-"+a];if(!n&&this.calendars[o]&&(n=new this.calendars[o](a),this._localCals[o+"-"+a]=n),!n)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,o);return n},newDate:function(o,a,n,i,s){return i=(o!=null&&o.year?o.calendar():typeof i=="string"?this.instance(i,s):i)||this.instance(),i.newDate(o,a,n)},substituteDigits:function(o){return function(a){return(a+"").replace(/[0-9]/g,function(n){return o[n]})}},substituteChineseDigits:function(o,a){return function(n){for(var i="",s=0;n>0;){var h=n%10;i=(h===0?"":o[h]+a[s])+i,s++,n=Math.floor(n/10)}return i.indexOf(o[1]+a[1])===0&&(i=i.substr(1)),i||o[0]}}});function S(o,a,n,i){if(this._calendar=o,this._year=a,this._month=n,this._day=i,this._calendar._validateLevel===0&&!this._calendar.isValid(this._year,this._month,this._day))throw(r.local.invalidDate||r.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function E(o,a){return o=""+o,"000000".substring(0,a-o.length)+o}d(S.prototype,{newDate:function(o,a,n){return this._calendar.newDate(o??this,a,n)},year:function(o){return arguments.length===0?this._year:this.set(o,"y")},month:function(o){return arguments.length===0?this._month:this.set(o,"m")},day:function(o){return arguments.length===0?this._day:this.set(o,"d")},date:function(o,a,n){if(!this._calendar.isValid(o,a,n))throw(r.local.invalidDate||r.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=o,this._month=a,this._day=n,this},leapYear:function(){return this._calendar.leapYear(this)},epoch:function(){return this._calendar.epoch(this)},formatYear:function(){return this._calendar.formatYear(this)},monthOfYear:function(){return this._calendar.monthOfYear(this)},weekOfYear:function(){return this._calendar.weekOfYear(this)},daysInYear:function(){return this._calendar.daysInYear(this)},dayOfYear:function(){return this._calendar.dayOfYear(this)},daysInMonth:function(){return this._calendar.daysInMonth(this)},dayOfWeek:function(){return this._calendar.dayOfWeek(this)},weekDay:function(){return this._calendar.weekDay(this)},extraInfo:function(){return this._calendar.extraInfo(this)},add:function(o,a){return this._calendar.add(this,o,a)},set:function(o,a){return this._calendar.set(this,o,a)},compareTo:function(o){if(this._calendar.name!==o._calendar.name)throw(r.local.differentCalendars||r.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,o._calendar.local.name);var a=this._year!==o._year?this._year-o._year:this._month!==o._month?this.monthOfYear()-o.monthOfYear():this._day-o._day;return a===0?0:a<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(o){return this._calendar.fromJD(o)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(o){return this._calendar.fromJSDate(o)},toString:function(){return(this.year()<0?"-":"")+E(Math.abs(this.year()),4)+"-"+E(this.month(),2)+"-"+E(this.day(),2)}});function e(){this.shortYearCutoff="+10"}d(e.prototype,{_validateLevel:0,newDate:function(o,a,n){return o==null?this.today():(o.year&&(this._validate(o,a,n,r.local.invalidDate||r.regionalOptions[""].invalidDate),n=o.day(),a=o.month(),o=o.year()),new S(this,o,a,n))},today:function(){return this.fromJSDate(new Date)},epoch:function(o){var a=this._validate(o,this.minMonth,this.minDay,r.local.invalidYear||r.regionalOptions[""].invalidYear);return a.year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(o){var a=this._validate(o,this.minMonth,this.minDay,r.local.invalidYear||r.regionalOptions[""].invalidYear);return(a.year()<0?"-":"")+E(Math.abs(a.year()),4)},monthsInYear:function(o){return this._validate(o,this.minMonth,this.minDay,r.local.invalidYear||r.regionalOptions[""].invalidYear),12},monthOfYear:function(o,a){var n=this._validate(o,a,this.minDay,r.local.invalidMonth||r.regionalOptions[""].invalidMonth);return(n.month()+this.monthsInYear(n)-this.firstMonth)%this.monthsInYear(n)+this.minMonth},fromMonthOfYear:function(o,a){var n=(a+this.firstMonth-2*this.minMonth)%this.monthsInYear(o)+this.minMonth;return this._validate(o,n,this.minDay,r.local.invalidMonth||r.regionalOptions[""].invalidMonth),n},daysInYear:function(o){var a=this._validate(o,this.minMonth,this.minDay,r.local.invalidYear||r.regionalOptions[""].invalidYear);return this.leapYear(a)?366:365},dayOfYear:function(o,a,n){var i=this._validate(o,a,n,r.local.invalidDate||r.regionalOptions[""].invalidDate);return i.toJD()-this.newDate(i.year(),this.fromMonthOfYear(i.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(o,a,n){var i=this._validate(o,a,n,r.local.invalidDate||r.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(i))+2)%this.daysInWeek()},extraInfo:function(o,a,n){return this._validate(o,a,n,r.local.invalidDate||r.regionalOptions[""].invalidDate),{}},add:function(o,a,n){return this._validate(o,this.minMonth,this.minDay,r.local.invalidDate||r.regionalOptions[""].invalidDate),this._correctAdd(o,this._add(o,a,n),a,n)},_add:function(o,a,n){if(this._validateLevel++,n==="d"||n==="w"){var i=o.toJD()+a*(n==="w"?this.daysInWeek():1),s=o.calendar().fromJD(i);return this._validateLevel--,[s.year(),s.month(),s.day()]}try{var h=o.year()+(n==="y"?a:0),f=o.monthOfYear()+(n==="m"?a:0),s=o.day(),v=function(l){for(;f_-1+l.minMonth;)h++,f-=_,_=l.monthsInYear(h)};n==="y"?(o.month()!==this.fromMonthOfYear(h,f)&&(f=this.newDate(h,o.month(),this.minDay).monthOfYear()),f=Math.min(f,this.monthsInYear(h)),s=Math.min(s,this.daysInMonth(h,this.fromMonthOfYear(h,f)))):n==="m"&&(v(this),s=Math.min(s,this.daysInMonth(h,this.fromMonthOfYear(h,f))));var c=[h,this.fromMonthOfYear(h,f),s];return this._validateLevel--,c}catch(T){throw this._validateLevel--,T}},_correctAdd:function(o,a,n,i){if(!this.hasYearZero&&(i==="y"||i==="m")&&(a[0]===0||o.year()>0!=a[0]>0)){var s={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[i],h=n<0?-1:1;a=this._add(o,n*s[0]+h*s[1],s[2])}return o.date(a[0],a[1],a[2])},set:function(o,a,n){this._validate(o,this.minMonth,this.minDay,r.local.invalidDate||r.regionalOptions[""].invalidDate);var i=n==="y"?a:o.year(),s=n==="m"?a:o.month(),h=n==="d"?a:o.day();return(n==="y"||n==="m")&&(h=Math.min(h,this.daysInMonth(i,s))),o.date(i,s,h)},isValid:function(o,a,n){this._validateLevel++;var i=this.hasYearZero||o!==0;if(i){var s=this.newDate(o,a,this.minDay);i=a>=this.minMonth&&a-this.minMonth=this.minDay&&n-this.minDay13.5?13:1),T=s-(c>2.5?4716:4715);return T<=0&&T--,this.newDate(T,c,v)},toJSDate:function(o,a,n){var i=this._validate(o,a,n,r.local.invalidDate||r.regionalOptions[""].invalidDate),s=new Date(i.year(),i.month()-1,i.day());return s.setHours(0),s.setMinutes(0),s.setSeconds(0),s.setMilliseconds(0),s.setHours(s.getHours()>12?s.getHours()+2:0),s},fromJSDate:function(o){return this.newDate(o.getFullYear(),o.getMonth()+1,o.getDate())}});var r=V.exports=new x;r.cdate=S,r.baseCalendar=e,r.calendars.gregorian=t}}),QH=He({"node_modules/world-calendars/dist/plus.js"(){var Z=ch(),V=Mp();Z(V.regionalOptions[""],{invalidArguments:"Invalid arguments",invalidFormat:"Cannot format a date from another calendar",missingNumberAt:"Missing number at position {0}",unknownNameAt:"Unknown name at position {0}",unexpectedLiteralAt:"Unexpected literal at position {0}",unexpectedText:"Additional text found at end"}),V.local=V.regionalOptions[""],Z(V.cdate.prototype,{formatDate:function(d,x){return typeof d!="string"&&(x=d,d=""),this._calendar.formatDate(d||"",this,x)}}),Z(V.baseCalendar.prototype,{UNIX_EPOCH:V.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:24*60*60,TICKS_EPOCH:V.instance().jdEpoch,TICKS_PER_DAY:24*60*60*1e7,ATOM:"yyyy-mm-dd",COOKIE:"D, dd M yyyy",FULL:"DD, MM d, yyyy",ISO_8601:"yyyy-mm-dd",JULIAN:"J",RFC_822:"D, d M yy",RFC_850:"DD, dd-M-yy",RFC_1036:"D, d M yy",RFC_1123:"D, d M yyyy",RFC_2822:"D, d M yyyy",RSS:"D, d M yy",TICKS:"!",TIMESTAMP:"@",W3C:"yyyy-mm-dd",formatDate:function(d,x,S){if(typeof d!="string"&&(S=x,x=d,d=""),!x)return"";if(x.calendar()!==this)throw V.local.invalidFormat||V.regionalOptions[""].invalidFormat;d=d||this.local.dateFormat,S=S||{};for(var E=S.dayNamesShort||this.local.dayNamesShort,e=S.dayNames||this.local.dayNames,t=S.monthNumbers||this.local.monthNumbers,r=S.monthNamesShort||this.local.monthNamesShort,o=S.monthNames||this.local.monthNames,a=S.calculateWeek||this.local.calculateWeek,n=function(A,M){for(var g=1;w+g1},i=function(A,M,g,b){var p=""+M;if(n(A,b))for(;p.length1},_=function(R,L){var z=l(R,L),F=[2,3,z?4:2,z?4:2,10,11,20]["oyYJ@!".indexOf(R)+1],N=new RegExp("^-?\\d{1,"+F+"}"),O=x.substring(p).match(N);if(!O)throw(V.local.missingNumberAt||V.regionalOptions[""].missingNumberAt).replace(/\{0\}/,p);return p+=O[0].length,parseInt(O[0],10)},w=this,A=function(){if(typeof o=="function"){l("m");var R=o.call(w,x.substring(p));return p+=R.length,R}return _("m")},M=function(R,L,z,F){for(var N=l(R,F)?z:L,O=0;O-1){h=1,f=v;for(var m=this.daysInMonth(s,h);f>m;m=this.daysInMonth(s,h))h++,f-=m}return i>-1?this.fromJD(i):this.newDate(s,h,f)},determineDate:function(d,x,S,E,e){S&&typeof S!="object"&&(e=E,E=S,S=null),typeof E!="string"&&(e=E,E="");var t=this,r=function(o){try{return t.parseDate(E,o,e)}catch{}o=o.toLowerCase();for(var a=(o.match(/^c/)&&S?S.newDate():null)||t.today(),n=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,i=n.exec(o);i;)a.add(parseInt(i[1],10),i[2]||"d"),i=n.exec(o);return a};return x=x?x.newDate():null,d=d==null?x:typeof d=="string"?r(d):typeof d=="number"?isNaN(d)||d===1/0||d===-1/0?x:t.today().add(d,"d"):t.newDate(d),d}})}}),eW=He({"node_modules/world-calendars/dist/calendars/chinese.js"(){var Z=Mp(),V=ch(),d=Z.instance();function x(i){this.local=this.regionalOptions[i||""]||this.regionalOptions[""]}x.prototype=new Z.baseCalendar,V(x.prototype,{name:"Chinese",jdEpoch:17214255e-1,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(i,s){if(typeof i=="string"){var h=i.match(E);return h?h[0]:""}var f=this._validateYear(i),v=i.month(),c=""+this.toChineseMonth(f,v);return s&&c.length<2&&(c="0"+c),this.isIntercalaryMonth(f,v)&&(c+="i"),c},monthNames:function(i){if(typeof i=="string"){var s=i.match(e);return s?s[0]:""}var h=this._validateYear(i),f=i.month(),v=this.toChineseMonth(h,f),c=["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708"][v-1];return this.isIntercalaryMonth(h,f)&&(c="\u95F0"+c),c},monthNamesShort:function(i){if(typeof i=="string"){var s=i.match(t);return s?s[0]:""}var h=this._validateYear(i),f=i.month(),v=this.toChineseMonth(h,f),c=["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"][v-1];return this.isIntercalaryMonth(h,f)&&(c="\u95F0"+c),c},parseMonth:function(i,s){i=this._validateYear(i);var h=parseInt(s),f;if(isNaN(h))s[0]==="\u95F0"&&(f=!0,s=s.substring(1)),s[s.length-1]==="\u6708"&&(s=s.substring(0,s.length-1)),h=1+["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"].indexOf(s);else{var v=s[s.length-1];f=v==="i"||v==="I"}var c=this.toMonthIndex(i,h,f);return c},dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},_validateYear:function(i,s){if(i.year&&(i=i.year()),typeof i!="number"||i<1888||i>2111)throw s.replace(/\{0\}/,this.local.name);return i},toMonthIndex:function(i,s,h){var f=this.intercalaryMonth(i),v=h&&s!==f;if(v||s<1||s>12)throw Z.local.invalidMonth.replace(/\{0\}/,this.local.name);var c;return f?!h&&s<=f?c=s-1:c=s:c=s-1,c},toChineseMonth:function(i,s){i.year&&(i=i.year(),s=i.month());var h=this.intercalaryMonth(i),f=h?12:11;if(s<0||s>f)throw Z.local.invalidMonth.replace(/\{0\}/,this.local.name);var v;return h?s>13;return h},isIntercalaryMonth:function(i,s){i.year&&(i=i.year(),s=i.month());var h=this.intercalaryMonth(i);return!!h&&h===s},leapYear:function(i){return this.intercalaryMonth(i)!==0},weekOfYear:function(i,s,h){var f=this._validateYear(i,Z.local.invalidyear),v=o[f-o[0]],c=v>>9&4095,T=v>>5&15,l=v&31,_;_=d.newDate(c,T,l),_.add(4-(_.dayOfWeek()||7),"d");var w=this.toJD(i,s,h)-_.toJD();return 1+Math.floor(w/7)},monthsInYear:function(i){return this.leapYear(i)?13:12},daysInMonth:function(i,s){i.year&&(s=i.month(),i=i.year()),i=this._validateYear(i);var h=r[i-r[0]],f=h>>13,v=f?12:11;if(s>v)throw Z.local.invalidMonth.replace(/\{0\}/,this.local.name);var c=h&1<<12-s?30:29;return c},weekDay:function(i,s,h){return(this.dayOfWeek(i,s,h)||7)<6},toJD:function(i,s,h){var f=this._validate(i,c,h,Z.local.invalidDate);i=this._validateYear(f.year()),s=f.month(),h=f.day();var v=this.isIntercalaryMonth(i,s),c=this.toChineseMonth(i,s),T=n(i,c,h,v);return d.toJD(T.year,T.month,T.day)},fromJD:function(i){var s=d.fromJD(i),h=a(s.year(),s.month(),s.day()),f=this.toMonthIndex(h.year,h.month,h.isIntercalary);return this.newDate(h.year,f,h.day)},fromString:function(i){var s=i.match(S),h=this._validateYear(+s[1]),f=+s[2],v=!!s[3],c=this.toMonthIndex(h,f,v),T=+s[4];return this.newDate(h,c,T)},add:function(i,s,h){var f=i.year(),v=i.month(),c=this.isIntercalaryMonth(f,v),T=this.toChineseMonth(f,v),l=Object.getPrototypeOf(x.prototype).add.call(this,i,s,h);if(h==="y"){var _=l.year(),w=l.month(),A=this.isIntercalaryMonth(_,T),M=c&&A?this.toMonthIndex(_,T,!0):this.toMonthIndex(_,T,!1);M!==w&&l.month(M)}return l}});var S=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,E=/^\d?\d[iI]?/m,e=/^闰?十?[一二三四五六七八九]?月/m,t=/^闰?十?[一二三四五六七八九]?/m;Z.calendars.chinese=x;var r=[1887,5780,5802,19157,2742,50359,1198,2646,46378,7466,3412,30122,5482,67949,2396,5294,43597,6732,6954,36181,2772,4954,18781,2396,54427,5274,6730,47781,5800,6868,21210,4790,59703,2350,5270,46667,3402,3496,38325,1388,4782,18735,2350,52374,6804,7498,44457,2906,1388,29294,4700,63789,6442,6804,56138,5802,2772,38235,1210,4698,22827,5418,63125,3476,5802,43701,2484,5302,27223,2646,70954,7466,3412,54698,5482,2412,38062,5294,2636,32038,6954,60245,2772,4826,43357,2394,5274,39501,6730,72357,5800,5844,53978,4790,2358,38039,5270,87627,3402,3496,54708,5484,4782,43311,2350,3222,27978,7498,68965,2904,5484,45677,4700,6444,39573,6804,6986,19285,2772,62811,1210,4698,47403,5418,5780,38570,5546,76469,2420,5302,51799,2646,5414,36501,3412,5546,18869,2412,54446,5276,6732,48422,6822,2900,28010,4826,92509,2394,5274,55883,6730,6820,47956,5812,2778,18779,2358,62615,5270,5450,46757,3492,5556,27318,4718,67887,2350,3222,52554,7498,3428,38252,5468,4700,31022,6444,64149,6804,6986,43861,2772,5338,35421,2650,70955,5418,5780,54954,5546,2740,38074,5302,2646,29991,3366,61011,3412,5546,43445,2412,5294,35406,6732,72998,6820,6996,52586,2778,2396,38045,5274,6698,23333,6820,64338,5812,2746,43355,2358,5270,39499,5450,79525,3492,5548],o=[1887,966732,967231,967733,968265,968766,969297,969798,970298,970829,971330,971830,972362,972863,973395,973896,974397,974928,975428,975929,976461,976962,977462,977994,978494,979026,979526,980026,980558,981059,981559,982091,982593,983124,983624,984124,984656,985157,985656,986189,986690,987191,987722,988222,988753,989254,989754,990286,990788,991288,991819,992319,992851,993352,993851,994383,994885,995385,995917,996418,996918,997450,997949,998481,998982,999483,1000014,1000515,1001016,1001548,1002047,1002578,1003080,1003580,1004111,1004613,1005113,1005645,1006146,1006645,1007177,1007678,1008209,1008710,1009211,1009743,1010243,1010743,1011275,1011775,1012306,1012807,1013308,1013840,1014341,1014841,1015373,1015874,1016404,1016905,1017405,1017937,1018438,1018939,1019471,1019972,1020471,1021002,1021503,1022035,1022535,1023036,1023568,1024069,1024568,1025100,1025601,1026102,1026633,1027133,1027666,1028167,1028666,1029198,1029699,1030199,1030730,1031231,1031763,1032264,1032764,1033296,1033797,1034297,1034828,1035329,1035830,1036362,1036861,1037393,1037894,1038394,1038925,1039427,1039927,1040459,1040959,1041491,1041992,1042492,1043023,1043524,1044024,1044556,1045057,1045558,1046090,1046590,1047121,1047622,1048122,1048654,1049154,1049655,1050187,1050689,1051219,1051720,1052220,1052751,1053252,1053752,1054284,1054786,1055285,1055817,1056317,1056849,1057349,1057850,1058382,1058883,1059383,1059915,1060415,1060947,1061447,1061947,1062479,1062981,1063480,1064012,1064514,1065014,1065545,1066045,1066577,1067078,1067578,1068110,1068611,1069112,1069642,1070142,1070674,1071175,1071675,1072207,1072709,1073209,1073740,1074241,1074741,1075273,1075773,1076305,1076807,1077308,1077839,1078340,1078840,1079372,1079871,1080403,1080904];function a(i,s,h,f){var v,c;if(typeof i=="object")v=i,c=s||{};else{var T=typeof i=="number"&&i>=1888&&i<=2111;if(!T)throw new Error("Solar year outside range 1888-2111");var l=typeof s=="number"&&s>=1&&s<=12;if(!l)throw new Error("Solar month outside range 1 - 12");var _=typeof h=="number"&&h>=1&&h<=31;if(!_)throw new Error("Solar day outside range 1 - 31");v={year:i,month:s,day:h},c=f||{}}var w=o[v.year-o[0]],A=v.year<<9|v.month<<5|v.day;c.year=A>=w?v.year:v.year-1,w=o[c.year-o[0]];var M=w>>9&4095,g=w>>5&15,b=w&31,p,u=new Date(M,g-1,b),y=new Date(v.year,v.month-1,v.day);p=Math.round((y-u)/(24*3600*1e3));var m=r[c.year-r[0]],R;for(R=0;R<13;R++){var L=m&1<<12-R?30:29;if(p>13;return!z||R=1888&&i<=2111;if(!l)throw new Error("Lunar year outside range 1888-2111");var _=typeof s=="number"&&s>=1&&s<=12;if(!_)throw new Error("Lunar month outside range 1 - 12");var w=typeof h=="number"&&h>=1&&h<=30;if(!w)throw new Error("Lunar day outside range 1 - 30");var A;typeof f=="object"?(A=!1,c=f):(A=!!f,c=v||{}),T={year:i,month:s,day:h,isIntercalary:A}}var M;M=T.day-1;var g=r[T.year-r[0]],b=g>>13,p;b&&(T.month>b||T.isIntercalary)?p=T.month:p=T.month-1;for(var u=0;u>9&4095,L=m>>5&15,z=m&31,F=new Date(R,L-1,z+M);return c.year=F.getFullYear(),c.month=1+F.getMonth(),c.day=F.getDate(),c}}}),tW=He({"node_modules/world-calendars/dist/calendars/coptic.js"(){var Z=Mp(),V=ch();function d(x){this.local=this.regionalOptions[x||""]||this.regionalOptions[""]}d.prototype=new Z.baseCalendar,V(d.prototype,{name:"Coptic",jdEpoch:18250295e-1,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Coptic",epochs:["BAM","AM"],monthNames:["Thout","Paopi","Hathor","Koiak","Tobi","Meshir","Paremhat","Paremoude","Pashons","Paoni","Epip","Mesori","Pi Kogi Enavot"],monthNamesShort:["Tho","Pao","Hath","Koi","Tob","Mesh","Pat","Pad","Pash","Pao","Epi","Meso","PiK"],dayNames:["Tkyriaka","Pesnau","Pshoment","Peftoou","Ptiou","Psoou","Psabbaton"],dayNamesShort:["Tky","Pes","Psh","Pef","Pti","Pso","Psa"],dayNamesMin:["Tk","Pes","Psh","Pef","Pt","Pso","Psa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(E){var S=this._validate(E,this.minMonth,this.minDay,Z.local.invalidYear),E=S.year()+(S.year()<0?1:0);return E%4===3||E%4===-1},monthsInYear:function(x){return this._validate(x,this.minMonth,this.minDay,Z.local.invalidYear||Z.regionalOptions[""].invalidYear),13},weekOfYear:function(x,S,E){var e=this.newDate(x,S,E);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInMonth:function(x,S){var E=this._validate(x,S,this.minDay,Z.local.invalidMonth);return this.daysPerMonth[E.month()-1]+(E.month()===13&&this.leapYear(E.year())?1:0)},weekDay:function(x,S,E){return(this.dayOfWeek(x,S,E)||7)<6},toJD:function(x,S,E){var e=this._validate(x,S,E,Z.local.invalidDate);return x=e.year(),x<0&&x++,e.day()+(e.month()-1)*30+(x-1)*365+Math.floor(x/4)+this.jdEpoch-1},fromJD:function(x){var S=Math.floor(x)+.5-this.jdEpoch,E=Math.floor((S-Math.floor((S+366)/1461))/365)+1;E<=0&&E--,S=Math.floor(x)+.5-this.newDate(E,1,1).toJD();var e=Math.floor(S/30)+1,t=S-(e-1)*30+1;return this.newDate(E,e,t)}}),Z.calendars.coptic=d}}),rW=He({"node_modules/world-calendars/dist/calendars/discworld.js"(){var Z=Mp(),V=ch();function d(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}d.prototype=new Z.baseCalendar,V(d.prototype,{name:"Discworld",jdEpoch:17214255e-1,daysPerMonth:[16,32,32,32,32,32,32,32,32,32,32,32,32],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Discworld",epochs:["BUC","UC"],monthNames:["Ick","Offle","February","March","April","May","June","Grune","August","Spune","Sektober","Ember","December"],monthNamesShort:["Ick","Off","Feb","Mar","Apr","May","Jun","Gru","Aug","Spu","Sek","Emb","Dec"],dayNames:["Sunday","Octeday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Oct","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Oc","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:2,isRTL:!1}},leapYear:function(S){return this._validate(S,this.minMonth,this.minDay,Z.local.invalidYear),!1},monthsInYear:function(S){return this._validate(S,this.minMonth,this.minDay,Z.local.invalidYear),13},daysInYear:function(S){return this._validate(S,this.minMonth,this.minDay,Z.local.invalidYear),400},weekOfYear:function(S,E,e){var t=this.newDate(S,E,e);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/8)+1},daysInMonth:function(S,E){var e=this._validate(S,E,this.minDay,Z.local.invalidMonth);return this.daysPerMonth[e.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(S,E,e){var t=this._validate(S,E,e,Z.local.invalidDate);return(t.day()+1)%8},weekDay:function(S,E,e){var t=this.dayOfWeek(S,E,e);return t>=2&&t<=6},extraInfo:function(S,E,e){var t=this._validate(S,E,e,Z.local.invalidDate);return{century:x[Math.floor((t.year()-1)/100)+1]||""}},toJD:function(S,E,e){var t=this._validate(S,E,e,Z.local.invalidDate);return S=t.year()+(t.year()<0?1:0),E=t.month(),e=t.day(),e+(E>1?16:0)+(E>2?(E-2)*32:0)+(S-1)*400+this.jdEpoch-1},fromJD:function(S){S=Math.floor(S+.5)-Math.floor(this.jdEpoch)-1;var E=Math.floor(S/400)+1;S-=(E-1)*400,S+=S>15?16:0;var e=Math.floor(S/32)+1,t=S-(e-1)*32+1;return this.newDate(E<=0?E-1:E,e,t)}});var x={20:"Fruitbat",21:"Anchovy"};Z.calendars.discworld=d}}),aW=He({"node_modules/world-calendars/dist/calendars/ethiopian.js"(){var Z=Mp(),V=ch();function d(x){this.local=this.regionalOptions[x||""]||this.regionalOptions[""]}d.prototype=new Z.baseCalendar,V(d.prototype,{name:"Ethiopian",jdEpoch:17242205e-1,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Ethiopian",epochs:["BEE","EE"],monthNames:["Meskerem","Tikemet","Hidar","Tahesas","Tir","Yekatit","Megabit","Miazia","Genbot","Sene","Hamle","Nehase","Pagume"],monthNamesShort:["Mes","Tik","Hid","Tah","Tir","Yek","Meg","Mia","Gen","Sen","Ham","Neh","Pag"],dayNames:["Ehud","Segno","Maksegno","Irob","Hamus","Arb","Kidame"],dayNamesShort:["Ehu","Seg","Mak","Iro","Ham","Arb","Kid"],dayNamesMin:["Eh","Se","Ma","Ir","Ha","Ar","Ki"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(E){var S=this._validate(E,this.minMonth,this.minDay,Z.local.invalidYear),E=S.year()+(S.year()<0?1:0);return E%4===3||E%4===-1},monthsInYear:function(x){return this._validate(x,this.minMonth,this.minDay,Z.local.invalidYear||Z.regionalOptions[""].invalidYear),13},weekOfYear:function(x,S,E){var e=this.newDate(x,S,E);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInMonth:function(x,S){var E=this._validate(x,S,this.minDay,Z.local.invalidMonth);return this.daysPerMonth[E.month()-1]+(E.month()===13&&this.leapYear(E.year())?1:0)},weekDay:function(x,S,E){return(this.dayOfWeek(x,S,E)||7)<6},toJD:function(x,S,E){var e=this._validate(x,S,E,Z.local.invalidDate);return x=e.year(),x<0&&x++,e.day()+(e.month()-1)*30+(x-1)*365+Math.floor(x/4)+this.jdEpoch-1},fromJD:function(x){var S=Math.floor(x)+.5-this.jdEpoch,E=Math.floor((S-Math.floor((S+366)/1461))/365)+1;E<=0&&E--,S=Math.floor(x)+.5-this.newDate(E,1,1).toJD();var e=Math.floor(S/30)+1,t=S-(e-1)*30+1;return this.newDate(E,e,t)}}),Z.calendars.ethiopian=d}}),iW=He({"node_modules/world-calendars/dist/calendars/hebrew.js"(){var Z=Mp(),V=ch();function d(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}d.prototype=new Z.baseCalendar,V(d.prototype,{name:"Hebrew",jdEpoch:347995.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29,29],hasYearZero:!1,minMonth:1,firstMonth:7,minDay:1,regionalOptions:{"":{name:"Hebrew",epochs:["BAM","AM"],monthNames:["Nisan","Iyar","Sivan","Tammuz","Av","Elul","Tishrei","Cheshvan","Kislev","Tevet","Shevat","Adar","Adar II"],monthNamesShort:["Nis","Iya","Siv","Tam","Av","Elu","Tis","Che","Kis","Tev","She","Ada","Ad2"],dayNames:["Yom Rishon","Yom Sheni","Yom Shlishi","Yom Revi'i","Yom Chamishi","Yom Shishi","Yom Shabbat"],dayNamesShort:["Ris","She","Shl","Rev","Cha","Shi","Sha"],dayNamesMin:["Ri","She","Shl","Re","Ch","Shi","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(S){var E=this._validate(S,this.minMonth,this.minDay,Z.local.invalidYear);return this._leapYear(E.year())},_leapYear:function(S){return S=S<0?S+1:S,x(S*7+1,19)<7},monthsInYear:function(S){return this._validate(S,this.minMonth,this.minDay,Z.local.invalidYear),this._leapYear(S.year?S.year():S)?13:12},weekOfYear:function(S,E,e){var t=this.newDate(S,E,e);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInYear:function(S){var E=this._validate(S,this.minMonth,this.minDay,Z.local.invalidYear);return S=E.year(),this.toJD(S===-1?1:S+1,7,1)-this.toJD(S,7,1)},daysInMonth:function(S,E){return S.year&&(E=S.month(),S=S.year()),this._validate(S,E,this.minDay,Z.local.invalidMonth),E===12&&this.leapYear(S)||E===8&&x(this.daysInYear(S),10)===5?30:E===9&&x(this.daysInYear(S),10)===3?29:this.daysPerMonth[E-1]},weekDay:function(S,E,e){return this.dayOfWeek(S,E,e)!==6},extraInfo:function(S,E,e){var t=this._validate(S,E,e,Z.local.invalidDate);return{yearType:(this.leapYear(t)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(t)%10-3]}},toJD:function(S,E,e){var t=this._validate(S,E,e,Z.local.invalidDate);S=t.year(),E=t.month(),e=t.day();var r=S<=0?S+1:S,o=this.jdEpoch+this._delay1(r)+this._delay2(r)+e+1;if(E<7){for(var a=7;a<=this.monthsInYear(S);a++)o+=this.daysInMonth(S,a);for(var a=1;a=this.toJD(E===-1?1:E+1,7,1);)E++;for(var e=Sthis.toJD(E,e,this.daysInMonth(E,e));)e++;var t=S-this.toJD(E,e,1)+1;return this.newDate(E,e,t)}});function x(S,E){return S-E*Math.floor(S/E)}Z.calendars.hebrew=d}}),nW=He({"node_modules/world-calendars/dist/calendars/islamic.js"(){var Z=Mp(),V=ch();function d(x){this.local=this.regionalOptions[x||""]||this.regionalOptions[""]}d.prototype=new Z.baseCalendar,V(d.prototype,{name:"Islamic",jdEpoch:19484395e-1,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Islamic",epochs:["BH","AH"],monthNames:["Muharram","Safar","Rabi' al-awwal","Rabi' al-thani","Jumada al-awwal","Jumada al-thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-ahad","Yawm al-ithnayn","Yawm ath-thulaathaa'","Yawm al-arbi'aa'","Yawm al-kham\u012Bs","Yawm al-jum'a","Yawm as-sabt"],dayNamesShort:["Aha","Ith","Thu","Arb","Kha","Jum","Sab"],dayNamesMin:["Ah","It","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(x){var S=this._validate(x,this.minMonth,this.minDay,Z.local.invalidYear);return(S.year()*11+14)%30<11},weekOfYear:function(x,S,E){var e=this.newDate(x,S,E);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInYear:function(x){return this.leapYear(x)?355:354},daysInMonth:function(x,S){var E=this._validate(x,S,this.minDay,Z.local.invalidMonth);return this.daysPerMonth[E.month()-1]+(E.month()===12&&this.leapYear(E.year())?1:0)},weekDay:function(x,S,E){return this.dayOfWeek(x,S,E)!==5},toJD:function(x,S,E){var e=this._validate(x,S,E,Z.local.invalidDate);return x=e.year(),S=e.month(),E=e.day(),x=x<=0?x+1:x,E+Math.ceil(29.5*(S-1))+(x-1)*354+Math.floor((3+11*x)/30)+this.jdEpoch-1},fromJD:function(x){x=Math.floor(x)+.5;var S=Math.floor((30*(x-this.jdEpoch)+10646)/10631);S=S<=0?S-1:S;var E=Math.min(12,Math.ceil((x-29-this.toJD(S,1,1))/29.5)+1),e=x-this.toJD(S,E,1)+1;return this.newDate(S,E,e)}}),Z.calendars.islamic=d}}),oW=He({"node_modules/world-calendars/dist/calendars/julian.js"(){var Z=Mp(),V=ch();function d(x){this.local=this.regionalOptions[x||""]||this.regionalOptions[""]}d.prototype=new Z.baseCalendar,V(d.prototype,{name:"Julian",jdEpoch:17214235e-1,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Julian",epochs:["BC","AD"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"mm/dd/yyyy",firstDay:0,isRTL:!1}},leapYear:function(E){var S=this._validate(E,this.minMonth,this.minDay,Z.local.invalidYear),E=S.year()<0?S.year()+1:S.year();return E%4===0},weekOfYear:function(x,S,E){var e=this.newDate(x,S,E);return e.add(4-(e.dayOfWeek()||7),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInMonth:function(x,S){var E=this._validate(x,S,this.minDay,Z.local.invalidMonth);return this.daysPerMonth[E.month()-1]+(E.month()===2&&this.leapYear(E.year())?1:0)},weekDay:function(x,S,E){return(this.dayOfWeek(x,S,E)||7)<6},toJD:function(x,S,E){var e=this._validate(x,S,E,Z.local.invalidDate);return x=e.year(),S=e.month(),E=e.day(),x<0&&x++,S<=2&&(x--,S+=12),Math.floor(365.25*(x+4716))+Math.floor(30.6001*(S+1))+E-1524.5},fromJD:function(x){var S=Math.floor(x+.5),E=S+1524,e=Math.floor((E-122.1)/365.25),t=Math.floor(365.25*e),r=Math.floor((E-t)/30.6001),o=r-Math.floor(r<14?1:13),a=e-Math.floor(o>2?4716:4715),n=E-t-Math.floor(30.6001*r);return a<=0&&a--,this.newDate(a,o,n)}}),Z.calendars.julian=d}}),sW=He({"node_modules/world-calendars/dist/calendars/mayan.js"(){var Z=Mp(),V=ch();function d(E){this.local=this.regionalOptions[E||""]||this.regionalOptions[""]}d.prototype=new Z.baseCalendar,V(d.prototype,{name:"Mayan",jdEpoch:584282.5,hasYearZero:!0,minMonth:0,firstMonth:0,minDay:0,regionalOptions:{"":{name:"Mayan",epochs:["",""],monthNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],monthNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],dayNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesMin:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],digits:null,dateFormat:"YYYY.m.d",firstDay:0,isRTL:!1,haabMonths:["Pop","Uo","Zip","Zotz","Tzec","Xul","Yaxkin","Mol","Chen","Yax","Zac","Ceh","Mac","Kankin","Muan","Pax","Kayab","Cumku","Uayeb"],tzolkinMonths:["Imix","Ik","Akbal","Kan","Chicchan","Cimi","Manik","Lamat","Muluc","Oc","Chuen","Eb","Ben","Ix","Men","Cib","Caban","Etznab","Cauac","Ahau"]}},leapYear:function(E){return this._validate(E,this.minMonth,this.minDay,Z.local.invalidYear),!1},formatYear:function(E){var e=this._validate(E,this.minMonth,this.minDay,Z.local.invalidYear);E=e.year();var t=Math.floor(E/400);E=E%400,E+=E<0?400:0;var r=Math.floor(E/20);return t+"."+r+"."+E%20},forYear:function(E){if(E=E.split("."),E.length<3)throw"Invalid Mayan year";for(var e=0,t=0;t19||t>0&&r<0)throw"Invalid Mayan year";e=e*20+r}return e},monthsInYear:function(E){return this._validate(E,this.minMonth,this.minDay,Z.local.invalidYear),18},weekOfYear:function(E,e,t){return this._validate(E,e,t,Z.local.invalidDate),0},daysInYear:function(E){return this._validate(E,this.minMonth,this.minDay,Z.local.invalidYear),360},daysInMonth:function(E,e){return this._validate(E,e,this.minDay,Z.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(E,e,t){var r=this._validate(E,e,t,Z.local.invalidDate);return r.day()},weekDay:function(E,e,t){return this._validate(E,e,t,Z.local.invalidDate),!0},extraInfo:function(E,e,t){var r=this._validate(E,e,t,Z.local.invalidDate),o=r.toJD(),a=this._toHaab(o),n=this._toTzolkin(o);return{haabMonthName:this.local.haabMonths[a[0]-1],haabMonth:a[0],haabDay:a[1],tzolkinDayName:this.local.tzolkinMonths[n[0]-1],tzolkinDay:n[0],tzolkinTrecena:n[1]}},_toHaab:function(E){E-=this.jdEpoch;var e=x(E+8+17*20,365);return[Math.floor(e/20)+1,x(e,20)]},_toTzolkin:function(E){return E-=this.jdEpoch,[S(E+20,20),S(E+4,13)]},toJD:function(E,e,t){var r=this._validate(E,e,t,Z.local.invalidDate);return r.day()+r.month()*20+r.year()*360+this.jdEpoch},fromJD:function(E){E=Math.floor(E)+.5-this.jdEpoch;var e=Math.floor(E/360);E=E%360,E+=E<0?360:0;var t=Math.floor(E/20),r=E%20;return this.newDate(e,t,r)}});function x(E,e){return E-e*Math.floor(E/e)}function S(E,e){return x(E-1,e)+1}Z.calendars.mayan=d}}),lW=He({"node_modules/world-calendars/dist/calendars/nanakshahi.js"(){var Z=Mp(),V=ch();function d(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}d.prototype=new Z.baseCalendar;var x=Z.instance("gregorian");V(d.prototype,{name:"Nanakshahi",jdEpoch:22576735e-1,daysPerMonth:[31,31,31,31,31,30,30,30,30,30,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Nanakshahi",epochs:["BN","AN"],monthNames:["Chet","Vaisakh","Jeth","Harh","Sawan","Bhadon","Assu","Katak","Maghar","Poh","Magh","Phagun"],monthNamesShort:["Che","Vai","Jet","Har","Saw","Bha","Ass","Kat","Mgr","Poh","Mgh","Pha"],dayNames:["Somvaar","Mangalvar","Budhvaar","Veervaar","Shukarvaar","Sanicharvaar","Etvaar"],dayNamesShort:["Som","Mangal","Budh","Veer","Shukar","Sanichar","Et"],dayNamesMin:["So","Ma","Bu","Ve","Sh","Sa","Et"],digits:null,dateFormat:"dd-mm-yyyy",firstDay:0,isRTL:!1}},leapYear:function(S){var E=this._validate(S,this.minMonth,this.minDay,Z.local.invalidYear||Z.regionalOptions[""].invalidYear);return x.leapYear(E.year()+(E.year()<1?1:0)+1469)},weekOfYear:function(S,E,e){var t=this.newDate(S,E,e);return t.add(1-(t.dayOfWeek()||7),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInMonth:function(S,E){var e=this._validate(S,E,this.minDay,Z.local.invalidMonth);return this.daysPerMonth[e.month()-1]+(e.month()===12&&this.leapYear(e.year())?1:0)},weekDay:function(S,E,e){return(this.dayOfWeek(S,E,e)||7)<6},toJD:function(r,E,e){var t=this._validate(r,E,e,Z.local.invalidMonth),r=t.year();r<0&&r++;for(var o=t.day(),a=1;a=this.toJD(E+1,1,1);)E++;for(var e=S-Math.floor(this.toJD(E,1,1)+.5)+1,t=1;e>this.daysInMonth(E,t);)e-=this.daysInMonth(E,t),t++;return this.newDate(E,t,e)}}),Z.calendars.nanakshahi=d}}),uW=He({"node_modules/world-calendars/dist/calendars/nepali.js"(){var Z=Mp(),V=ch();function d(x){this.local=this.regionalOptions[x||""]||this.regionalOptions[""]}d.prototype=new Z.baseCalendar,V(d.prototype,{name:"Nepali",jdEpoch:17007095e-1,daysPerMonth:[31,31,32,32,31,30,30,29,30,29,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,daysPerYear:365,regionalOptions:{"":{name:"Nepali",epochs:["BBS","ABS"],monthNames:["Baisakh","Jestha","Ashadh","Shrawan","Bhadra","Ashwin","Kartik","Mangsir","Paush","Mangh","Falgun","Chaitra"],monthNamesShort:["Bai","Je","As","Shra","Bha","Ash","Kar","Mang","Pau","Ma","Fal","Chai"],dayNames:["Aaitabaar","Sombaar","Manglbaar","Budhabaar","Bihibaar","Shukrabaar","Shanibaar"],dayNamesShort:["Aaita","Som","Mangl","Budha","Bihi","Shukra","Shani"],dayNamesMin:["Aai","So","Man","Bu","Bi","Shu","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:1,isRTL:!1}},leapYear:function(x){return this.daysInYear(x)!==this.daysPerYear},weekOfYear:function(x,S,E){var e=this.newDate(x,S,E);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInYear:function(x){var S=this._validate(x,this.minMonth,this.minDay,Z.local.invalidYear);if(x=S.year(),typeof this.NEPALI_CALENDAR_DATA[x]>"u")return this.daysPerYear;for(var E=0,e=this.minMonth;e<=12;e++)E+=this.NEPALI_CALENDAR_DATA[x][e];return E},daysInMonth:function(x,S){return x.year&&(S=x.month(),x=x.year()),this._validate(x,S,this.minDay,Z.local.invalidMonth),typeof this.NEPALI_CALENDAR_DATA[x]>"u"?this.daysPerMonth[S-1]:this.NEPALI_CALENDAR_DATA[x][S]},weekDay:function(x,S,E){return this.dayOfWeek(x,S,E)!==6},toJD:function(x,S,E){var e=this._validate(x,S,E,Z.local.invalidDate);x=e.year(),S=e.month(),E=e.day();var t=Z.instance(),r=0,o=S,a=x;this._createMissingCalendarData(x);var n=x-(o>9||o===9&&E>=this.NEPALI_CALENDAR_DATA[a][0]?56:57);for(S!==9&&(r=E,o--);o!==9;)o<=0&&(o=12,a--),r+=this.NEPALI_CALENDAR_DATA[a][o],o--;return S===9?(r+=E-this.NEPALI_CALENDAR_DATA[a][0],r<0&&(r+=t.daysInYear(n))):r+=this.NEPALI_CALENDAR_DATA[a][9]-this.NEPALI_CALENDAR_DATA[a][0],t.newDate(n,1,1).add(r,"d").toJD()},fromJD:function(x){var S=Z.instance(),E=S.fromJD(x),e=E.year(),t=E.dayOfYear(),r=e+56;this._createMissingCalendarData(r);for(var o=9,a=this.NEPALI_CALENDAR_DATA[r][0],n=this.NEPALI_CALENDAR_DATA[r][o]-a+1;t>n;)o++,o>12&&(o=1,r++),n+=this.NEPALI_CALENDAR_DATA[r][o];var i=this.NEPALI_CALENDAR_DATA[r][o]-(n-t);return this.newDate(r,o,i)},_createMissingCalendarData:function(x){var S=this.daysPerMonth.slice(0);S.unshift(17);for(var E=x-1;E"u"&&(this.NEPALI_CALENDAR_DATA[E]=S)},NEPALI_CALENDAR_DATA:{1970:[18,31,31,32,31,31,31,30,29,30,29,30,30],1971:[18,31,31,32,31,32,30,30,29,30,29,30,30],1972:[17,31,32,31,32,31,30,30,30,29,29,30,30],1973:[19,30,32,31,32,31,30,30,30,29,30,29,31],1974:[19,31,31,32,30,31,31,30,29,30,29,30,30],1975:[18,31,31,32,32,30,31,30,29,30,29,30,30],1976:[17,31,32,31,32,31,30,30,30,29,29,30,31],1977:[18,31,32,31,32,31,31,29,30,29,30,29,31],1978:[18,31,31,32,31,31,31,30,29,30,29,30,30],1979:[18,31,31,32,32,31,30,30,29,30,29,30,30],1980:[17,31,32,31,32,31,30,30,30,29,29,30,31],1981:[18,31,31,31,32,31,31,29,30,30,29,30,30],1982:[18,31,31,32,31,31,31,30,29,30,29,30,30],1983:[18,31,31,32,32,31,30,30,29,30,29,30,30],1984:[17,31,32,31,32,31,30,30,30,29,29,30,31],1985:[18,31,31,31,32,31,31,29,30,30,29,30,30],1986:[18,31,31,32,31,31,31,30,29,30,29,30,30],1987:[18,31,32,31,32,31,30,30,29,30,29,30,30],1988:[17,31,32,31,32,31,30,30,30,29,29,30,31],1989:[18,31,31,31,32,31,31,30,29,30,29,30,30],1990:[18,31,31,32,31,31,31,30,29,30,29,30,30],1991:[18,31,32,31,32,31,30,30,29,30,29,30,30],1992:[17,31,32,31,32,31,30,30,30,29,30,29,31],1993:[18,31,31,31,32,31,31,30,29,30,29,30,30],1994:[18,31,31,32,31,31,31,30,29,30,29,30,30],1995:[17,31,32,31,32,31,30,30,30,29,29,30,30],1996:[17,31,32,31,32,31,30,30,30,29,30,29,31],1997:[18,31,31,32,31,31,31,30,29,30,29,30,30],1998:[18,31,31,32,31,31,31,30,29,30,29,30,30],1999:[17,31,32,31,32,31,30,30,30,29,29,30,31],2e3:[17,30,32,31,32,31,30,30,30,29,30,29,31],2001:[18,31,31,32,31,31,31,30,29,30,29,30,30],2002:[18,31,31,32,32,31,30,30,29,30,29,30,30],2003:[17,31,32,31,32,31,30,30,30,29,29,30,31],2004:[17,30,32,31,32,31,30,30,30,29,30,29,31],2005:[18,31,31,32,31,31,31,30,29,30,29,30,30],2006:[18,31,31,32,32,31,30,30,29,30,29,30,30],2007:[17,31,32,31,32,31,30,30,30,29,29,30,31],2008:[17,31,31,31,32,31,31,29,30,30,29,29,31],2009:[18,31,31,32,31,31,31,30,29,30,29,30,30],2010:[18,31,31,32,32,31,30,30,29,30,29,30,30],2011:[17,31,32,31,32,31,30,30,30,29,29,30,31],2012:[17,31,31,31,32,31,31,29,30,30,29,30,30],2013:[18,31,31,32,31,31,31,30,29,30,29,30,30],2014:[18,31,31,32,32,31,30,30,29,30,29,30,30],2015:[17,31,32,31,32,31,30,30,30,29,29,30,31],2016:[17,31,31,31,32,31,31,29,30,30,29,30,30],2017:[18,31,31,32,31,31,31,30,29,30,29,30,30],2018:[18,31,32,31,32,31,30,30,29,30,29,30,30],2019:[17,31,32,31,32,31,30,30,30,29,30,29,31],2020:[17,31,31,31,32,31,31,30,29,30,29,30,30],2021:[18,31,31,32,31,31,31,30,29,30,29,30,30],2022:[17,31,32,31,32,31,30,30,30,29,29,30,30],2023:[17,31,32,31,32,31,30,30,30,29,30,29,31],2024:[17,31,31,31,32,31,31,30,29,30,29,30,30],2025:[18,31,31,32,31,31,31,30,29,30,29,30,30],2026:[17,31,32,31,32,31,30,30,30,29,29,30,31],2027:[17,30,32,31,32,31,30,30,30,29,30,29,31],2028:[17,31,31,32,31,31,31,30,29,30,29,30,30],2029:[18,31,31,32,31,32,30,30,29,30,29,30,30],2030:[17,31,32,31,32,31,30,30,30,30,30,30,31],2031:[17,31,32,31,32,31,31,31,31,31,31,31,31],2032:[17,32,32,32,32,32,32,32,32,32,32,32,32],2033:[18,31,31,32,32,31,30,30,29,30,29,30,30],2034:[17,31,32,31,32,31,30,30,30,29,29,30,31],2035:[17,30,32,31,32,31,31,29,30,30,29,29,31],2036:[17,31,31,32,31,31,31,30,29,30,29,30,30],2037:[18,31,31,32,32,31,30,30,29,30,29,30,30],2038:[17,31,32,31,32,31,30,30,30,29,29,30,31],2039:[17,31,31,31,32,31,31,29,30,30,29,30,30],2040:[17,31,31,32,31,31,31,30,29,30,29,30,30],2041:[18,31,31,32,32,31,30,30,29,30,29,30,30],2042:[17,31,32,31,32,31,30,30,30,29,29,30,31],2043:[17,31,31,31,32,31,31,29,30,30,29,30,30],2044:[17,31,31,32,31,31,31,30,29,30,29,30,30],2045:[18,31,32,31,32,31,30,30,29,30,29,30,30],2046:[17,31,32,31,32,31,30,30,30,29,29,30,31],2047:[17,31,31,31,32,31,31,30,29,30,29,30,30],2048:[17,31,31,32,31,31,31,30,29,30,29,30,30],2049:[17,31,32,31,32,31,30,30,30,29,29,30,30],2050:[17,31,32,31,32,31,30,30,30,29,30,29,31],2051:[17,31,31,31,32,31,31,30,29,30,29,30,30],2052:[17,31,31,32,31,31,31,30,29,30,29,30,30],2053:[17,31,32,31,32,31,30,30,30,29,29,30,30],2054:[17,31,32,31,32,31,30,30,30,29,30,29,31],2055:[17,31,31,32,31,31,31,30,29,30,30,29,30],2056:[17,31,31,32,31,32,30,30,29,30,29,30,30],2057:[17,31,32,31,32,31,30,30,30,29,29,30,31],2058:[17,30,32,31,32,31,30,30,30,29,30,29,31],2059:[17,31,31,32,31,31,31,30,29,30,29,30,30],2060:[17,31,31,32,32,31,30,30,29,30,29,30,30],2061:[17,31,32,31,32,31,30,30,30,29,29,30,31],2062:[17,30,32,31,32,31,31,29,30,29,30,29,31],2063:[17,31,31,32,31,31,31,30,29,30,29,30,30],2064:[17,31,31,32,32,31,30,30,29,30,29,30,30],2065:[17,31,32,31,32,31,30,30,30,29,29,30,31],2066:[17,31,31,31,32,31,31,29,30,30,29,29,31],2067:[17,31,31,32,31,31,31,30,29,30,29,30,30],2068:[17,31,31,32,32,31,30,30,29,30,29,30,30],2069:[17,31,32,31,32,31,30,30,30,29,29,30,31],2070:[17,31,31,31,32,31,31,29,30,30,29,30,30],2071:[17,31,31,32,31,31,31,30,29,30,29,30,30],2072:[17,31,32,31,32,31,30,30,29,30,29,30,30],2073:[17,31,32,31,32,31,30,30,30,29,29,30,31],2074:[17,31,31,31,32,31,31,30,29,30,29,30,30],2075:[17,31,31,32,31,31,31,30,29,30,29,30,30],2076:[16,31,32,31,32,31,30,30,30,29,29,30,30],2077:[17,31,32,31,32,31,30,30,30,29,30,29,31],2078:[17,31,31,31,32,31,31,30,29,30,29,30,30],2079:[17,31,31,32,31,31,31,30,29,30,29,30,30],2080:[16,31,32,31,32,31,30,30,30,29,29,30,30],2081:[17,31,31,32,32,31,30,30,30,29,30,30,30],2082:[17,31,32,31,32,31,30,30,30,29,30,30,30],2083:[17,31,31,32,31,31,30,30,30,29,30,30,30],2084:[17,31,31,32,31,31,30,30,30,29,30,30,30],2085:[17,31,32,31,32,31,31,30,30,29,30,30,30],2086:[17,31,32,31,32,31,30,30,30,29,30,30,30],2087:[16,31,31,32,31,31,31,30,30,29,30,30,30],2088:[16,30,31,32,32,30,31,30,30,29,30,30,30],2089:[17,31,32,31,32,31,30,30,30,29,30,30,30],2090:[17,31,32,31,32,31,30,30,30,29,30,30,30],2091:[16,31,31,32,31,31,31,30,30,29,30,30,30],2092:[16,31,31,32,32,31,30,30,30,29,30,30,30],2093:[17,31,32,31,32,31,30,30,30,29,30,30,30],2094:[17,31,31,32,31,31,30,30,30,29,30,30,30],2095:[17,31,31,32,31,31,31,30,29,30,30,30,30],2096:[17,30,31,32,32,31,30,30,29,30,29,30,30],2097:[17,31,32,31,32,31,30,30,30,29,30,30,30],2098:[17,31,31,32,31,31,31,29,30,29,30,30,31],2099:[17,31,31,32,31,31,31,30,29,29,30,30,30],2100:[17,31,32,31,32,30,31,30,29,30,29,30,30]}}),Z.calendars.nepali=d}}),cW=He({"node_modules/world-calendars/dist/calendars/persian.js"(){var Z=Mp(),V=ch();function d(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}function x(S){var E=S-475;S<0&&E++;var e=.242197,t=e*E,r=e*(E+1),o=t-Math.floor(t),a=r-Math.floor(r);return o>a}d.prototype=new Z.baseCalendar,V(d.prototype,{name:"Persian",jdEpoch:19483205e-1,daysPerMonth:[31,31,31,31,31,31,30,30,30,30,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Persian",epochs:["BP","AP"],monthNames:["Farvardin","Ordibehesht","Khordad","Tir","Mordad","Shahrivar","Mehr","Aban","Azar","Dey","Bahman","Esfand"],monthNamesShort:["Far","Ord","Kho","Tir","Mor","Sha","Meh","Aba","Aza","Dey","Bah","Esf"],dayNames:["Yekshanbeh","Doshanbeh","Seshanbeh","Chah\u0101rshanbeh","Panjshanbeh","Jom'eh","Shanbeh"],dayNamesShort:["Yek","Do","Se","Cha","Panj","Jom","Sha"],dayNamesMin:["Ye","Do","Se","Ch","Pa","Jo","Sh"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(S){var E=this._validate(S,this.minMonth,this.minDay,Z.local.invalidYear);return x(E.year())},weekOfYear:function(S,E,e){var t=this.newDate(S,E,e);return t.add(-((t.dayOfWeek()+1)%7),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInMonth:function(S,E){var e=this._validate(S,E,this.minDay,Z.local.invalidMonth);return this.daysPerMonth[e.month()-1]+(e.month()===12&&this.leapYear(e.year())?1:0)},weekDay:function(S,E,e){return this.dayOfWeek(S,E,e)!==5},toJD:function(S,E,e){var t=this._validate(S,E,e,Z.local.invalidDate);S=t.year(),E=t.month(),e=t.day();var r=0;if(S>0)for(var o=1;o0?S-1:S)*365+r+this.jdEpoch-1},fromJD:function(S){S=Math.floor(S)+.5;var E=475+(S-this.toJD(475,1,1))/365.242197,e=Math.floor(E);e<=0&&e--,S>this.toJD(e,12,x(e)?30:29)&&(e++,e===0&&e++);var t=S-this.toJD(e,1,1)+1,r=t<=186?Math.ceil(t/31):Math.ceil((t-6)/30),o=S-this.toJD(e,r,1)+1;return this.newDate(e,r,o)}}),Z.calendars.persian=d,Z.calendars.jalali=d}}),fW=He({"node_modules/world-calendars/dist/calendars/taiwan.js"(){var Z=Mp(),V=ch(),d=Z.instance();function x(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}x.prototype=new Z.baseCalendar,V(x.prototype,{name:"Taiwan",jdEpoch:24194025e-1,yearsOffset:1911,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Taiwan",epochs:["BROC","ROC"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},leapYear:function(e){var E=this._validate(e,this.minMonth,this.minDay,Z.local.invalidYear),e=this._t2gYear(E.year());return d.leapYear(e)},weekOfYear:function(r,E,e){var t=this._validate(r,this.minMonth,this.minDay,Z.local.invalidYear),r=this._t2gYear(t.year());return d.weekOfYear(r,t.month(),t.day())},daysInMonth:function(S,E){var e=this._validate(S,E,this.minDay,Z.local.invalidMonth);return this.daysPerMonth[e.month()-1]+(e.month()===2&&this.leapYear(e.year())?1:0)},weekDay:function(S,E,e){return(this.dayOfWeek(S,E,e)||7)<6},toJD:function(r,E,e){var t=this._validate(r,E,e,Z.local.invalidDate),r=this._t2gYear(t.year());return d.toJD(r,t.month(),t.day())},fromJD:function(S){var E=d.fromJD(S),e=this._g2tYear(E.year());return this.newDate(e,E.month(),E.day())},_t2gYear:function(S){return S+this.yearsOffset+(S>=-this.yearsOffset&&S<=-1?1:0)},_g2tYear:function(S){return S-this.yearsOffset-(S>=1&&S<=this.yearsOffset?1:0)}}),Z.calendars.taiwan=x}}),hW=He({"node_modules/world-calendars/dist/calendars/thai.js"(){var Z=Mp(),V=ch(),d=Z.instance();function x(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}x.prototype=new Z.baseCalendar,V(x.prototype,{name:"Thai",jdEpoch:15230985e-1,yearsOffset:543,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Thai",epochs:["BBE","BE"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(e){var E=this._validate(e,this.minMonth,this.minDay,Z.local.invalidYear),e=this._t2gYear(E.year());return d.leapYear(e)},weekOfYear:function(r,E,e){var t=this._validate(r,this.minMonth,this.minDay,Z.local.invalidYear),r=this._t2gYear(t.year());return d.weekOfYear(r,t.month(),t.day())},daysInMonth:function(S,E){var e=this._validate(S,E,this.minDay,Z.local.invalidMonth);return this.daysPerMonth[e.month()-1]+(e.month()===2&&this.leapYear(e.year())?1:0)},weekDay:function(S,E,e){return(this.dayOfWeek(S,E,e)||7)<6},toJD:function(r,E,e){var t=this._validate(r,E,e,Z.local.invalidDate),r=this._t2gYear(t.year());return d.toJD(r,t.month(),t.day())},fromJD:function(S){var E=d.fromJD(S),e=this._g2tYear(E.year());return this.newDate(e,E.month(),E.day())},_t2gYear:function(S){return S-this.yearsOffset-(S>=1&&S<=this.yearsOffset?1:0)},_g2tYear:function(S){return S+this.yearsOffset+(S>=-this.yearsOffset&&S<=-1?1:0)}}),Z.calendars.thai=x}}),pW=He({"node_modules/world-calendars/dist/calendars/ummalqura.js"(){var Z=Mp(),V=ch();function d(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}d.prototype=new Z.baseCalendar,V(d.prototype,{name:"UmmAlQura",hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Umm al-Qura",epochs:["BH","AH"],monthNames:["Al-Muharram","Safar","Rabi' al-awwal","Rabi' Al-Thani","Jumada Al-Awwal","Jumada Al-Thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-Ahad","Yawm al-Ithnain","Yawm al-Thal\u0101th\u0101\u2019","Yawm al-Arba\u2018\u0101\u2019","Yawm al-Kham\u012Bs","Yawm al-Jum\u2018a","Yawm al-Sabt"],dayNamesMin:["Ah","Ith","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!0}},leapYear:function(S){var E=this._validate(S,this.minMonth,this.minDay,Z.local.invalidYear);return this.daysInYear(E.year())===355},weekOfYear:function(S,E,e){var t=this.newDate(S,E,e);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInYear:function(S){for(var E=0,e=1;e<=12;e++)E+=this.daysInMonth(S,e);return E},daysInMonth:function(S,E){for(var e=this._validate(S,E,this.minDay,Z.local.invalidMonth),t=e.toJD()-24e5+.5,r=0,o=0;ot)return x[r]-x[r-1];r++}return 30},weekDay:function(S,E,e){return this.dayOfWeek(S,E,e)!==5},toJD:function(S,E,e){var t=this._validate(S,E,e,Z.local.invalidDate),r=12*(t.year()-1)+t.month()-15292,o=t.day()+x[r-1]-1;return o+24e5-.5},fromJD:function(S){for(var E=S-24e5+.5,e=0,t=0;tE);t++)e++;var r=e+15292,o=Math.floor((r-1)/12),a=o+1,n=r-12*o,i=E-x[e-1]+1;return this.newDate(a,n,i)},isValid:function(S,E,e){var t=Z.baseCalendar.prototype.isValid.apply(this,arguments);return t&&(S=S.year!=null?S.year:S,t=S>=1276&&S<=1500),t},_validate:function(S,E,e,t){var r=Z.baseCalendar.prototype._validate.apply(this,arguments);if(r.year<1276||r.year>1500)throw t.replace(/\{0\}/,this.local.name);return r}}),Z.calendars.ummalqura=d;var x=[20,50,79,109,138,168,197,227,256,286,315,345,374,404,433,463,492,522,551,581,611,641,670,700,729,759,788,818,847,877,906,936,965,995,1024,1054,1083,1113,1142,1172,1201,1231,1260,1290,1320,1350,1379,1409,1438,1468,1497,1527,1556,1586,1615,1645,1674,1704,1733,1763,1792,1822,1851,1881,1910,1940,1969,1999,2028,2058,2087,2117,2146,2176,2205,2235,2264,2294,2323,2353,2383,2413,2442,2472,2501,2531,2560,2590,2619,2649,2678,2708,2737,2767,2796,2826,2855,2885,2914,2944,2973,3003,3032,3062,3091,3121,3150,3180,3209,3239,3268,3298,3327,3357,3386,3416,3446,3476,3505,3535,3564,3594,3623,3653,3682,3712,3741,3771,3800,3830,3859,3889,3918,3948,3977,4007,4036,4066,4095,4125,4155,4185,4214,4244,4273,4303,4332,4362,4391,4421,4450,4480,4509,4539,4568,4598,4627,4657,4686,4716,4745,4775,4804,4834,4863,4893,4922,4952,4981,5011,5040,5070,5099,5129,5158,5188,5218,5248,5277,5307,5336,5366,5395,5425,5454,5484,5513,5543,5572,5602,5631,5661,5690,5720,5749,5779,5808,5838,5867,5897,5926,5956,5985,6015,6044,6074,6103,6133,6162,6192,6221,6251,6281,6311,6340,6370,6399,6429,6458,6488,6517,6547,6576,6606,6635,6665,6694,6724,6753,6783,6812,6842,6871,6901,6930,6960,6989,7019,7048,7078,7107,7137,7166,7196,7225,7255,7284,7314,7344,7374,7403,7433,7462,7492,7521,7551,7580,7610,7639,7669,7698,7728,7757,7787,7816,7846,7875,7905,7934,7964,7993,8023,8053,8083,8112,8142,8171,8201,8230,8260,8289,8319,8348,8378,8407,8437,8466,8496,8525,8555,8584,8614,8643,8673,8702,8732,8761,8791,8821,8850,8880,8909,8938,8968,8997,9027,9056,9086,9115,9145,9175,9205,9234,9264,9293,9322,9352,9381,9410,9440,9470,9499,9529,9559,9589,9618,9648,9677,9706,9736,9765,9794,9824,9853,9883,9913,9943,9972,10002,10032,10061,10090,10120,10149,10178,10208,10237,10267,10297,10326,10356,10386,10415,10445,10474,10504,10533,10562,10592,10621,10651,10680,10710,10740,10770,10799,10829,10858,10888,10917,10947,10976,11005,11035,11064,11094,11124,11153,11183,11213,11242,11272,11301,11331,11360,11389,11419,11448,11478,11507,11537,11567,11596,11626,11655,11685,11715,11744,11774,11803,11832,11862,11891,11921,11950,11980,12010,12039,12069,12099,12128,12158,12187,12216,12246,12275,12304,12334,12364,12393,12423,12453,12483,12512,12542,12571,12600,12630,12659,12688,12718,12747,12777,12807,12837,12866,12896,12926,12955,12984,13014,13043,13072,13102,13131,13161,13191,13220,13250,13280,13310,13339,13368,13398,13427,13456,13486,13515,13545,13574,13604,13634,13664,13693,13723,13752,13782,13811,13840,13870,13899,13929,13958,13988,14018,14047,14077,14107,14136,14166,14195,14224,14254,14283,14313,14342,14372,14401,14431,14461,14490,14520,14550,14579,14609,14638,14667,14697,14726,14756,14785,14815,14844,14874,14904,14933,14963,14993,15021,15051,15081,15110,15140,15169,15199,15228,15258,15287,15317,15347,15377,15406,15436,15465,15494,15524,15553,15582,15612,15641,15671,15701,15731,15760,15790,15820,15849,15878,15908,15937,15966,15996,16025,16055,16085,16114,16144,16174,16204,16233,16262,16292,16321,16350,16380,16409,16439,16468,16498,16528,16558,16587,16617,16646,16676,16705,16734,16764,16793,16823,16852,16882,16912,16941,16971,17001,17030,17060,17089,17118,17148,17177,17207,17236,17266,17295,17325,17355,17384,17414,17444,17473,17502,17532,17561,17591,17620,17650,17679,17709,17738,17768,17798,17827,17857,17886,17916,17945,17975,18004,18034,18063,18093,18122,18152,18181,18211,18241,18270,18300,18330,18359,18388,18418,18447,18476,18506,18535,18565,18595,18625,18654,18684,18714,18743,18772,18802,18831,18860,18890,18919,18949,18979,19008,19038,19068,19098,19127,19156,19186,19215,19244,19274,19303,19333,19362,19392,19422,19452,19481,19511,19540,19570,19599,19628,19658,19687,19717,19746,19776,19806,19836,19865,19895,19924,19954,19983,20012,20042,20071,20101,20130,20160,20190,20219,20249,20279,20308,20338,20367,20396,20426,20455,20485,20514,20544,20573,20603,20633,20662,20692,20721,20751,20780,20810,20839,20869,20898,20928,20957,20987,21016,21046,21076,21105,21135,21164,21194,21223,21253,21282,21312,21341,21371,21400,21430,21459,21489,21519,21548,21578,21607,21637,21666,21696,21725,21754,21784,21813,21843,21873,21902,21932,21962,21991,22021,22050,22080,22109,22138,22168,22197,22227,22256,22286,22316,22346,22375,22405,22434,22464,22493,22522,22552,22581,22611,22640,22670,22700,22730,22759,22789,22818,22848,22877,22906,22936,22965,22994,23024,23054,23083,23113,23143,23173,23202,23232,23261,23290,23320,23349,23379,23408,23438,23467,23497,23527,23556,23586,23616,23645,23674,23704,23733,23763,23792,23822,23851,23881,23910,23940,23970,23999,24029,24058,24088,24117,24147,24176,24206,24235,24265,24294,24324,24353,24383,24413,24442,24472,24501,24531,24560,24590,24619,24648,24678,24707,24737,24767,24796,24826,24856,24885,24915,24944,24974,25003,25032,25062,25091,25121,25150,25180,25210,25240,25269,25299,25328,25358,25387,25416,25446,25475,25505,25534,25564,25594,25624,25653,25683,25712,25742,25771,25800,25830,25859,25888,25918,25948,25977,26007,26037,26067,26096,26126,26155,26184,26214,26243,26272,26302,26332,26361,26391,26421,26451,26480,26510,26539,26568,26598,26627,26656,26686,26715,26745,26775,26805,26834,26864,26893,26923,26952,26982,27011,27041,27070,27099,27129,27159,27188,27218,27248,27277,27307,27336,27366,27395,27425,27454,27484,27513,27542,27572,27602,27631,27661,27691,27720,27750,27779,27809,27838,27868,27897,27926,27956,27985,28015,28045,28074,28104,28134,28163,28193,28222,28252,28281,28310,28340,28369,28399,28428,28458,28488,28517,28547,28577,28607,28636,28665,28695,28724,28754,28783,28813,28843,28872,28901,28931,28960,28990,29019,29049,29078,29108,29137,29167,29196,29226,29255,29285,29315,29345,29375,29404,29434,29463,29492,29522,29551,29580,29610,29640,29669,29699,29729,29759,29788,29818,29847,29876,29906,29935,29964,29994,30023,30053,30082,30112,30141,30171,30200,30230,30259,30289,30318,30348,30378,30408,30437,30467,30496,30526,30555,30585,30614,30644,30673,30703,30732,30762,30791,30821,30850,30880,30909,30939,30968,30998,31027,31057,31086,31116,31145,31175,31204,31234,31263,31293,31322,31352,31381,31411,31441,31471,31500,31530,31559,31589,31618,31648,31676,31706,31736,31766,31795,31825,31854,31884,31913,31943,31972,32002,32031,32061,32090,32120,32150,32180,32209,32239,32268,32298,32327,32357,32386,32416,32445,32475,32504,32534,32563,32593,32622,32652,32681,32711,32740,32770,32799,32829,32858,32888,32917,32947,32976,33006,33035,33065,33094,33124,33153,33183,33213,33243,33272,33302,33331,33361,33390,33420,33450,33479,33509,33539,33568,33598,33627,33657,33686,33716,33745,33775,33804,33834,33863,33893,33922,33952,33981,34011,34040,34069,34099,34128,34158,34187,34217,34247,34277,34306,34336,34365,34395,34424,34454,34483,34512,34542,34571,34601,34631,34660,34690,34719,34749,34778,34808,34837,34867,34896,34926,34955,34985,35015,35044,35074,35103,35133,35162,35192,35222,35251,35280,35310,35340,35370,35399,35429,35458,35488,35517,35547,35576,35605,35635,35665,35694,35723,35753,35782,35811,35841,35871,35901,35930,35960,35989,36019,36048,36078,36107,36136,36166,36195,36225,36254,36284,36314,36343,36373,36403,36433,36462,36492,36521,36551,36580,36610,36639,36669,36698,36728,36757,36786,36816,36845,36875,36904,36934,36963,36993,37022,37052,37081,37111,37141,37170,37200,37229,37259,37288,37318,37347,37377,37406,37436,37465,37495,37524,37554,37584,37613,37643,37672,37701,37731,37760,37790,37819,37849,37878,37908,37938,37967,37997,38027,38056,38085,38115,38144,38174,38203,38233,38262,38292,38322,38351,38381,38410,38440,38469,38499,38528,38558,38587,38617,38646,38676,38705,38735,38764,38794,38823,38853,38882,38912,38941,38971,39001,39030,39059,39089,39118,39148,39178,39208,39237,39267,39297,39326,39355,39385,39414,39444,39473,39503,39532,39562,39592,39621,39650,39680,39709,39739,39768,39798,39827,39857,39886,39916,39946,39975,40005,40035,40064,40094,40123,40153,40182,40212,40241,40271,40300,40330,40359,40389,40418,40448,40477,40507,40536,40566,40595,40625,40655,40685,40714,40744,40773,40803,40832,40862,40892,40921,40951,40980,41009,41039,41068,41098,41127,41157,41186,41216,41245,41275,41304,41334,41364,41393,41422,41452,41481,41511,41540,41570,41599,41629,41658,41688,41718,41748,41777,41807,41836,41865,41894,41924,41953,41983,42012,42042,42072,42102,42131,42161,42190,42220,42249,42279,42308,42337,42367,42397,42426,42456,42485,42515,42545,42574,42604,42633,42662,42692,42721,42751,42780,42810,42839,42869,42899,42929,42958,42988,43017,43046,43076,43105,43135,43164,43194,43223,43253,43283,43312,43342,43371,43401,43430,43460,43489,43519,43548,43578,43607,43637,43666,43696,43726,43755,43785,43814,43844,43873,43903,43932,43962,43991,44021,44050,44080,44109,44139,44169,44198,44228,44258,44287,44317,44346,44375,44405,44434,44464,44493,44523,44553,44582,44612,44641,44671,44700,44730,44759,44788,44818,44847,44877,44906,44936,44966,44996,45025,45055,45084,45114,45143,45172,45202,45231,45261,45290,45320,45350,45380,45409,45439,45468,45498,45527,45556,45586,45615,45644,45674,45704,45733,45763,45793,45823,45852,45882,45911,45940,45970,45999,46028,46058,46088,46117,46147,46177,46206,46236,46265,46295,46324,46354,46383,46413,46442,46472,46501,46531,46560,46590,46620,46649,46679,46708,46738,46767,46797,46826,46856,46885,46915,46944,46974,47003,47033,47063,47092,47122,47151,47181,47210,47240,47269,47298,47328,47357,47387,47417,47446,47476,47506,47535,47565,47594,47624,47653,47682,47712,47741,47771,47800,47830,47860,47890,47919,47949,47978,48008,48037,48066,48096,48125,48155,48184,48214,48244,48273,48303,48333,48362,48392,48421,48450,48480,48509,48538,48568,48598,48627,48657,48687,48717,48746,48776,48805,48834,48864,48893,48922,48952,48982,49011,49041,49071,49100,49130,49160,49189,49218,49248,49277,49306,49336,49365,49395,49425,49455,49484,49514,49543,49573,49602,49632,49661,49690,49720,49749,49779,49809,49838,49868,49898,49927,49957,49986,50016,50045,50075,50104,50133,50163,50192,50222,50252,50281,50311,50340,50370,50400,50429,50459,50488,50518,50547,50576,50606,50635,50665,50694,50724,50754,50784,50813,50843,50872,50902,50931,50960,50990,51019,51049,51078,51108,51138,51167,51197,51227,51256,51286,51315,51345,51374,51403,51433,51462,51492,51522,51552,51582,51611,51641,51670,51699,51729,51758,51787,51816,51846,51876,51906,51936,51965,51995,52025,52054,52083,52113,52142,52171,52200,52230,52260,52290,52319,52349,52379,52408,52438,52467,52497,52526,52555,52585,52614,52644,52673,52703,52733,52762,52792,52822,52851,52881,52910,52939,52969,52998,53028,53057,53087,53116,53146,53176,53205,53235,53264,53294,53324,53353,53383,53412,53441,53471,53500,53530,53559,53589,53619,53648,53678,53708,53737,53767,53796,53825,53855,53884,53913,53943,53973,54003,54032,54062,54092,54121,54151,54180,54209,54239,54268,54297,54327,54357,54387,54416,54446,54476,54505,54535,54564,54593,54623,54652,54681,54711,54741,54770,54800,54830,54859,54889,54919,54948,54977,55007,55036,55066,55095,55125,55154,55184,55213,55243,55273,55302,55332,55361,55391,55420,55450,55479,55508,55538,55567,55597,55627,55657,55686,55716,55745,55775,55804,55834,55863,55892,55922,55951,55981,56011,56040,56070,56100,56129,56159,56188,56218,56247,56276,56306,56335,56365,56394,56424,56454,56483,56513,56543,56572,56601,56631,56660,56690,56719,56749,56778,56808,56837,56867,56897,56926,56956,56985,57015,57044,57074,57103,57133,57162,57192,57221,57251,57280,57310,57340,57369,57399,57429,57458,57487,57517,57546,57576,57605,57634,57664,57694,57723,57753,57783,57813,57842,57871,57901,57930,57959,57989,58018,58048,58077,58107,58137,58167,58196,58226,58255,58285,58314,58343,58373,58402,58432,58461,58491,58521,58551,58580,58610,58639,58669,58698,58727,58757,58786,58816,58845,58875,58905,58934,58964,58994,59023,59053,59082,59111,59141,59170,59200,59229,59259,59288,59318,59348,59377,59407,59436,59466,59495,59525,59554,59584,59613,59643,59672,59702,59731,59761,59791,59820,59850,59879,59909,59939,59968,59997,60027,60056,60086,60115,60145,60174,60204,60234,60264,60293,60323,60352,60381,60411,60440,60469,60499,60528,60558,60588,60618,60648,60677,60707,60736,60765,60795,60824,60853,60883,60912,60942,60972,61002,61031,61061,61090,61120,61149,61179,61208,61237,61267,61296,61326,61356,61385,61415,61445,61474,61504,61533,61563,61592,61621,61651,61680,61710,61739,61769,61799,61828,61858,61888,61917,61947,61976,62006,62035,62064,62094,62123,62153,62182,62212,62242,62271,62301,62331,62360,62390,62419,62448,62478,62507,62537,62566,62596,62625,62655,62685,62715,62744,62774,62803,62832,62862,62891,62921,62950,62980,63009,63039,63069,63099,63128,63157,63187,63216,63246,63275,63305,63334,63363,63393,63423,63453,63482,63512,63541,63571,63600,63630,63659,63689,63718,63747,63777,63807,63836,63866,63895,63925,63955,63984,64014,64043,64073,64102,64131,64161,64190,64220,64249,64279,64309,64339,64368,64398,64427,64457,64486,64515,64545,64574,64603,64633,64663,64692,64722,64752,64782,64811,64841,64870,64899,64929,64958,64987,65017,65047,65076,65106,65136,65166,65195,65225,65254,65283,65313,65342,65371,65401,65431,65460,65490,65520,65549,65579,65608,65638,65667,65697,65726,65755,65785,65815,65844,65874,65903,65933,65963,65992,66022,66051,66081,66110,66140,66169,66199,66228,66258,66287,66317,66346,66376,66405,66435,66465,66494,66524,66553,66583,66612,66641,66671,66700,66730,66760,66789,66819,66849,66878,66908,66937,66967,66996,67025,67055,67084,67114,67143,67173,67203,67233,67262,67292,67321,67351,67380,67409,67439,67468,67497,67527,67557,67587,67617,67646,67676,67705,67735,67764,67793,67823,67852,67882,67911,67941,67971,68e3,68030,68060,68089,68119,68148,68177,68207,68236,68266,68295,68325,68354,68384,68414,68443,68473,68502,68532,68561,68591,68620,68650,68679,68708,68738,68768,68797,68827,68857,68886,68916,68946,68975,69004,69034,69063,69092,69122,69152,69181,69211,69240,69270,69300,69330,69359,69388,69418,69447,69476,69506,69535,69565,69595,69624,69654,69684,69713,69743,69772,69802,69831,69861,69890,69919,69949,69978,70008,70038,70067,70097,70126,70156,70186,70215,70245,70274,70303,70333,70362,70392,70421,70451,70481,70510,70540,70570,70599,70629,70658,70687,70717,70746,70776,70805,70835,70864,70894,70924,70954,70983,71013,71042,71071,71101,71130,71159,71189,71218,71248,71278,71308,71337,71367,71397,71426,71455,71485,71514,71543,71573,71602,71632,71662,71691,71721,71751,71781,71810,71839,71869,71898,71927,71957,71986,72016,72046,72075,72105,72135,72164,72194,72223,72253,72282,72311,72341,72370,72400,72429,72459,72489,72518,72548,72577,72607,72637,72666,72695,72725,72754,72784,72813,72843,72872,72902,72931,72961,72991,73020,73050,73080,73109,73139,73168,73197,73227,73256,73286,73315,73345,73375,73404,73434,73464,73493,73523,73552,73581,73611,73640,73669,73699,73729,73758,73788,73818,73848,73877,73907,73936,73965,73995,74024,74053,74083,74113,74142,74172,74202,74231,74261,74291,74320,74349,74379,74408,74437,74467,74497,74526,74556,74586,74615,74645,74675,74704,74733,74763,74792,74822,74851,74881,74910,74940,74969,74999,75029,75058,75088,75117,75147,75176,75206,75235,75264,75294,75323,75353,75383,75412,75442,75472,75501,75531,75560,75590,75619,75648,75678,75707,75737,75766,75796,75826,75856,75885,75915,75944,75974,76003,76032,76062,76091,76121,76150,76180,76210,76239,76269,76299,76328,76358,76387,76416,76446,76475,76505,76534,76564,76593,76623,76653,76682,76712,76741,76771,76801,76830,76859,76889,76918,76948,76977,77007,77036,77066,77096,77125,77155,77185,77214,77243,77273,77302,77332,77361,77390,77420,77450,77479,77509,77539,77569,77598,77627,77657,77686,77715,77745,77774,77804,77833,77863,77893,77923,77952,77982,78011,78041,78070,78099,78129,78158,78188,78217,78247,78277,78307,78336,78366,78395,78425,78454,78483,78513,78542,78572,78601,78631,78661,78690,78720,78750,78779,78808,78838,78867,78897,78926,78956,78985,79015,79044,79074,79104,79133,79163,79192,79222,79251,79281,79310,79340,79369,79399,79428,79458,79487,79517,79546,79576,79606,79635,79665,79695,79724,79753,79783,79812,79841,79871,79900,79930,79960,79990]}}),dW=He({"src/components/calendars/calendars.js"(Z,V){"use strict";V.exports=Mp(),QH(),eW(),tW(),rW(),aW(),iW(),nW(),oW(),sW(),lW(),uW(),cW(),fW(),hW(),pW()}}),vW=He({"src/components/calendars/index.js"(Z,V){"use strict";var d=dW(),x=sa(),S=Ws(),E=S.EPOCHJD,e=S.ONEDAY,t={valType:"enumerated",values:x.sortObjectKeys(d.calendars),editType:"calc",dflt:"gregorian"},r=function(g,b,p,u){var y={};return y[p]=t,x.coerce(g,b,y,p,u)},o=function(g,b,p,u){for(var y=0;y0){if(++_e>=qZ)return arguments[0]}else _e=0;return fe.apply(void 0,arguments)}}var Pb=HZ;var WZ=Pb(Ab),Ib=WZ;var XZ=/\{\n\/\* \[wrapped with (.+)\] \*/,ZZ=/,? & /;function YZ(fe){var _e=fe.match(XZ);return _e?_e[1].split(ZZ):[]}var cC=YZ;var KZ=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;function JZ(fe,_e){var Xe=_e.length;if(!Xe)return fe;var Lt=Xe-1;return _e[Lt]=(Xe>1?"& ":"")+_e[Lt],_e=_e.join(Xe>2?", ":" "),fe.replace(KZ,`{ /* [wrapped with `+_e+`] */ `)}var fC=JZ;function $Z(fe){return function(){return fe}}var Qg=$Z;var QZ=function(){try{var fe=sd(Object,"defineProperty");return fe({},"",{}),fe}catch{}}(),ey=QZ;var eY=ey?function(fe,_e){return ey(fe,"toString",{configurable:!0,enumerable:!1,value:Qg(_e),writable:!0})}:Bc,hC=eY;var tY=Pb(hC),ty=tY;function rY(fe,_e){for(var Xe=-1,Lt=fe==null?0:fe.length;++Xe-1}var Mm=sY;var lY=1,uY=2,cY=8,fY=16,hY=32,pY=64,dY=128,vY=256,mY=512,gY=[["ary",dY],["bind",lY],["bindKey",uY],["curry",cY],["curryRight",fY],["flip",mY],["partial",hY],["partialRight",pY],["rearg",vY]];function yY(fe,_e){return Nh(gY,function(Xe){var Lt="_."+Xe[0];_e&Xe[1]&&!Mm(fe,Lt)&&fe.push(Lt)}),fe.sort()}var dC=yY;function _Y(fe,_e,Xe){var Lt=_e+"";return ty(fe,fC(Lt,dC(cC(Lt),Xe)))}var Db=_Y;var xY=1,bY=2,wY=4,TY=8,vC=32,mC=64;function AY(fe,_e,Xe,Lt,gr,Yr,Ea,ei,oi,Cn){var xn=_e&TY,Fn=xn?Ea:void 0,To=xn?void 0:Ea,ps=xn?Yr:void 0,Qs=xn?void 0:Yr;_e|=xn?vC:mC,_e&=~(xn?mC:vC),_e&wY||(_e&=~(xY|bY));var Go=[fe,_e,gr,ps,Fn,Qs,To,ei,oi,Cn],He=Xe.apply(void 0,Go);return i_(fe)&&Ib(He,Go),He.placeholder=Lt,Db(He,fe,_e)}var zb=AY;function SY(fe){var _e=fe;return _e.placeholder}var Sd=SY;var MY=9007199254740991,EY=/^(?:0|[1-9]\d*)$/;function kY(fe,_e){var Xe=typeof fe;return _e=_e??MY,!!_e&&(Xe=="number"||Xe!="symbol"&&EY.test(fe))&&fe>-1&&fe%1==0&&fe<_e}var ip=kY;var CY=Math.min;function LY(fe,_e){for(var Xe=fe.length,Lt=CY(_e.length,Xe),gr=pf(fe);Lt--;){var Yr=_e[Lt];fe[Lt]=ip(Yr,Xe)?gr[Yr]:void 0}return fe}var gC=LY;var yC="__lodash_placeholder__";function PY(fe,_e){for(var Xe=-1,Lt=fe.length,gr=0,Yr=[];++Xe1&&nu.reverse(),xn&&oi-1&&fe%1==0&&fe<=iK}var Em=nK;function oK(fe){return fe!=null&&Em(fe.length)&&!ap(fe)}var Vc=oK;function sK(fe,_e,Xe){if(!Ll(Xe))return!1;var Lt=typeof _e;return(Lt=="number"?Vc(Xe)&&ip(_e,Xe.length):Lt=="string"&&_e in Xe)?oh(Xe[_e],fe):!1}var Nc=sK;function lK(fe){return Vo(function(_e,Xe){var Lt=-1,gr=Xe.length,Yr=gr>1?Xe[gr-1]:void 0,Ea=gr>2?Xe[2]:void 0;for(Yr=fe.length>3&&typeof Yr=="function"?(gr--,Yr):void 0,Ea&&Nc(Xe[0],Xe[1],Ea)&&(Yr=gr<3?void 0:Yr,gr=1),_e=Object(_e);++Lt-1}var KC=OJ;function BJ(fe,_e){var Xe=this.__data__,Lt=Cm(Xe,fe);return Lt<0?(++this.size,Xe.push([fe,_e])):Xe[Lt][1]=_e,this}var JC=BJ;function ly(fe){var _e=-1,Xe=fe==null?0:fe.length;for(this.clear();++_e0&&Xe(ei)?_e>1?sL(ei,_e-1,Xe,Lt,gr):Op(gr,ei):Lt||(gr[gr.length]=ei)}return gr}var Qu=sL;function l$(fe){var _e=fe==null?0:fe.length;return _e?Qu(fe,1):[]}var qb=l$;function u$(fe){return ty(Ob(fe,void 0,qb),fe+"")}var lp=u$;var c$=lp(fy),lL=c$;var f$=Nb(Object.getPrototypeOf,Object),Rm=f$;var h$="[object Object]",p$=Function.prototype,d$=Object.prototype,uL=p$.toString,v$=d$.hasOwnProperty,m$=uL.call(Object);function g$(fe){if(!Dl(fe)||Oc(fe)!=h$)return!1;var _e=Rm(fe);if(_e===null)return!0;var Xe=v$.call(_e,"constructor")&&_e.constructor;return typeof Xe=="function"&&Xe instanceof Xe&&uL.call(Xe)==m$}var gv=g$;var y$="[object DOMException]",_$="[object Error]";function x$(fe){if(!Dl(fe))return!1;var _e=Oc(fe);return _e==_$||_e==y$||typeof fe.message=="string"&&typeof fe.name=="string"&&!gv(fe)}var hy=x$;var b$=Vo(function(fe,_e){try{return xf(fe,void 0,_e)}catch(Xe){return hy(Xe)?Xe:new Error(Xe)}}),Vb=b$;var w$="Expected a function";function T$(fe,_e){var Xe;if(typeof _e!="function")throw new TypeError(w$);return fe=qo(fe),function(){return--fe>0&&(Xe=_e.apply(this,arguments)),fe<=1&&(_e=void 0),Xe}}var Gb=T$;var A$=1,S$=32,PA=Vo(function(fe,_e,Xe){var Lt=A$;if(Xe.length){var gr=Yp(Xe,Sd(PA));Lt|=S$}return np(fe,Lt,_e,Xe,gr)});PA.placeholder={};var Hb=PA;var M$=lp(function(fe,_e){return Nh(_e,function(Xe){Xe=Eh(Xe),op(fe,Xe,Hb(fe[Xe],fe))}),fe}),cL=M$;var E$=1,k$=2,C$=32,IA=Vo(function(fe,_e,Xe){var Lt=E$|k$;if(Xe.length){var gr=Yp(Xe,Sd(IA));Lt|=C$}return np(_e,Lt,fe,Xe,gr)});IA.placeholder={};var fL=IA;function L$(fe,_e,Xe){var Lt=-1,gr=fe.length;_e<0&&(_e=-_e>gr?0:gr+_e),Xe=Xe>gr?gr:Xe,Xe<0&&(Xe+=gr),gr=_e>Xe?0:Xe-_e>>>0,_e>>>=0;for(var Yr=Array(gr);++Lt=Lt?fe:Yf(fe,_e,Xe)}var Bp=P$;var I$="\\ud800-\\udfff",R$="\\u0300-\\u036f",D$="\\ufe20-\\ufe2f",z$="\\u20d0-\\u20ff",F$=R$+D$+z$,O$="\\ufe0e\\ufe0f",B$="\\u200d",N$=RegExp("["+B$+I$+F$+O$+"]");function U$(fe){return N$.test(fe)}var kd=U$;function j$(fe){return fe.split("")}var hL=j$;var pL="\\ud800-\\udfff",q$="\\u0300-\\u036f",V$="\\ufe20-\\ufe2f",G$="\\u20d0-\\u20ff",H$=q$+V$+G$,W$="\\ufe0e\\ufe0f",X$="["+pL+"]",RA="["+H$+"]",DA="\\ud83c[\\udffb-\\udfff]",Z$="(?:"+RA+"|"+DA+")",dL="[^"+pL+"]",vL="(?:\\ud83c[\\udde6-\\uddff]){2}",mL="[\\ud800-\\udbff][\\udc00-\\udfff]",Y$="\\u200d",gL=Z$+"?",yL="["+W$+"]?",K$="(?:"+Y$+"(?:"+[dL,vL,mL].join("|")+")"+yL+gL+")*",J$=yL+gL+K$,$$="(?:"+[dL+RA+"?",RA,vL,mL,X$].join("|")+")",Q$=RegExp(DA+"(?="+DA+")|"+$$+J$,"g");function eQ(fe){return fe.match(Q$)||[]}var _L=eQ;function tQ(fe){return kd(fe)?_L(fe):hL(fe)}var Uh=tQ;function rQ(fe){return function(_e){_e=Us(_e);var Xe=kd(_e)?Uh(_e):void 0,Lt=Xe?Xe[0]:_e.charAt(0),gr=Xe?Bp(Xe,1).join(""):_e.slice(1);return Lt[fe]()+gr}}var Wb=rQ;var aQ=Wb("toUpperCase"),py=aQ;function iQ(fe){return py(Us(fe).toLowerCase())}var Xb=iQ;function nQ(fe,_e,Xe,Lt){var gr=-1,Yr=fe==null?0:fe.length;for(Lt&&Yr&&(Xe=fe[++gr]);++gr=_e?fe:_e)),fe}var ud=iee;function nee(fe,_e,Xe){return Xe===void 0&&(Xe=_e,_e=void 0),Xe!==void 0&&(Xe=Sh(Xe),Xe=Xe===Xe?Xe:0),_e!==void 0&&(_e=Sh(_e),_e=_e===_e?_e:0),ud(Sh(fe),_e,Xe)}var HL=nee;function oee(){this.__data__=new Lm,this.size=0}var WL=oee;function see(fe){var _e=this.__data__,Xe=_e.delete(fe);return this.size=_e.size,Xe}var XL=see;function lee(fe){return this.__data__.get(fe)}var ZL=lee;function uee(fe){return this.__data__.has(fe)}var YL=uee;var cee=200;function fee(fe,_e){var Xe=this.__data__;if(Xe instanceof Lm){var Lt=Xe.__data__;if(!Pm||Lt.lengthei))return!1;var Cn=Yr.get(fe),xn=Yr.get(_e);if(Cn&&xn)return Cn==_e&&xn==fe;var Fn=-1,To=!0,ps=Xe&fre?new zm:void 0;for(Yr.set(fe,_e),Yr.set(_e,fe);++Fn=_e||Wn<0||Fn&&dd>=Yr}function Kl(){var Ff=Py();if(He(Ff))return nu(Ff);ei=setTimeout(Kl,Go(Ff))}function nu(Ff){return ei=void 0,To&&Lt?ps(Ff):(Lt=gr=void 0,Ea)}function jp(){ei!==void 0&&clearTimeout(ei),Cn=0,Lt=oi=gr=ei=void 0}function zf(){return ei===void 0?Ea:nu(Py())}function fp(){var Ff=Py(),Wn=He(Ff);if(Lt=arguments,gr=this,oi=Ff,Wn){if(ei===void 0)return Qs(oi);if(Fn)return clearTimeout(ei),ei=setTimeout(Kl,_e),ps(oi)}return ei===void 0&&(ei=setTimeout(Kl,_e)),Ea}return fp.cancel=jp,fp.flush=zf,fp}var xw=Aae;function Sae(fe,_e){return fe==null||fe!==fe?_e:fe}var QP=Sae;var eI=Object.prototype,Mae=eI.hasOwnProperty,Eae=Vo(function(fe,_e){fe=Object(fe);var Xe=-1,Lt=_e.length,gr=Lt>2?_e[2]:void 0;for(gr&&Nc(_e[0],_e[1],gr)&&(Lt=1);++Xe=Uae&&(Yr=Gv,Ea=!1,_e=new zm(_e));e:for(;++gr=0&&fe.slice(Xe,gr)==_e}var yI=nie;function oie(fe,_e){return Ml(_e,function(Xe){return[Xe,fe[Xe]]})}var _I=oie;function sie(fe){var _e=-1,Xe=Array(fe.size);return fe.forEach(function(Lt){Xe[++_e]=[Lt,Lt]}),Xe}var xI=sie;var lie="[object Map]",uie="[object Set]";function cie(fe){return function(_e){var Xe=jh(_e);return Xe==lie?Sy(_e):Xe==uie?xI(_e):_I(_e,fe(_e))}}var Mw=cie;var fie=Mw(gu),p_=fie;var hie=Mw(Gc),d_=hie;var pie={"&":"&","<":"<",">":">",'"':""","'":"'"},die=vy(pie),bI=die;var wI=/[&<>"']/g,vie=RegExp(wI.source);function mie(fe){return fe=Us(fe),fe&&vie.test(fe)?fe.replace(wI,bI):fe}var Ew=mie;var TI=/[\\^$.*+?()[\]{}|]/g,gie=RegExp(TI.source);function yie(fe){return fe=Us(fe),fe&&gie.test(fe)?fe.replace(TI,"\\$&"):fe}var AI=yie;function _ie(fe,_e){for(var Xe=-1,Lt=fe==null?0:fe.length;++Xegr?0:gr+Xe),Lt=Lt===void 0||Lt>gr?gr:qo(Lt),Lt<0&&(Lt+=gr),Lt=Xe>Lt?0:Cw(Lt);Xe-1?gr[Yr?_e[Ea]:Ea]:void 0}}var Pw=kie;var Cie=Math.max;function Lie(fe,_e,Xe){var Lt=fe==null?0:fe.length;if(!Lt)return-1;var gr=Xe==null?0:qo(Xe);return gr<0&&(gr=Cie(Lt+gr,0)),Sm(fe,_o(_e,3),gr)}var Iw=Lie;var Pie=Pw(Iw),LI=Pie;function Iie(fe,_e,Xe){var Lt;return Xe(fe,function(gr,Yr,Ea){if(_e(gr,Yr,Ea))return Lt=Yr,!1}),Lt}var Rw=Iie;function Rie(fe,_e){return Rw(fe,_o(_e,3),cp)}var PI=Rie;var Die=Math.max,zie=Math.min;function Fie(fe,_e,Xe){var Lt=fe==null?0:fe.length;if(!Lt)return-1;var gr=Lt-1;return Xe!==void 0&&(gr=qo(Xe),gr=Xe<0?Die(Lt+gr,0):zie(gr,Lt-1)),Sm(fe,_o(_e,3),gr,!0)}var Dw=Fie;var Oie=Pw(Dw),II=Oie;function Bie(fe,_e){return Rw(fe,_o(_e,3),Dy)}var RI=Bie;function Nie(fe){return fe&&fe.length?fe[0]:void 0}var v_=Nie;function Uie(fe,_e){var Xe=-1,Lt=Vc(fe)?Array(fe.length):[];return Up(fe,function(gr,Yr,Ea){Lt[++Xe]=_e(gr,Yr,Ea)}),Lt}var zw=Uie;function jie(fe,_e){var Xe=Do(fe)?Ml:zw;return Xe(fe,_o(_e,3))}var Um=jie;function qie(fe,_e){return Qu(Um(fe,_e),1)}var DI=qie;var Vie=1/0;function Gie(fe,_e){return Qu(Um(fe,_e),Vie)}var zI=Gie;function Hie(fe,_e,Xe){return Xe=Xe===void 0?1:qo(Xe),Qu(Um(fe,_e),Xe)}var FI=Hie;var Wie=1/0;function Xie(fe){var _e=fe==null?0:fe.length;return _e?Qu(fe,Wie):[]}var OI=Xie;function Zie(fe,_e){var Xe=fe==null?0:fe.length;return Xe?(_e=_e===void 0?1:qo(_e),Qu(fe,_e)):[]}var BI=Zie;var Yie=512;function Kie(fe){return np(fe,Yie)}var NI=Kie;var Jie=gy("floor"),UI=Jie;var $ie="Expected a function",Qie=8,ene=32,tne=128,rne=256;function ane(fe){return lp(function(_e){var Xe=_e.length,Lt=Xe,gr=zp.prototype.thru;for(fe&&_e.reverse();Lt--;){var Yr=_e[Lt];if(typeof Yr!="function")throw new TypeError($ie);if(gr&&!Ea&&$g(Yr)=="wrapper")var Ea=new zp([],!0)}for(Lt=Ea?Lt:Xe;++Lt_e}var zy=gne;function yne(fe){return function(_e,Xe){return typeof _e=="string"&&typeof Xe=="string"||(_e=Sh(_e),Xe=Sh(Xe)),fe(_e,Xe)}}var qm=yne;var _ne=qm(zy),JI=_ne;var xne=qm(function(fe,_e){return fe>=_e}),$I=xne;var bne=Object.prototype,wne=bne.hasOwnProperty;function Tne(fe,_e){return fe!=null&&wne.call(fe,_e)}var QI=Tne;function Ane(fe,_e){return fe!=null&&dw(fe,_e,QI)}var e8=Ane;var Sne=Math.max,Mne=Math.min;function Ene(fe,_e,Xe){return fe>=Mne(_e,Xe)&&fe-1:!!gr&&Ad(fe,_e,Xe)>-1}var a8=Dne;var zne=Math.max;function Fne(fe,_e,Xe){var Lt=fe==null?0:fe.length;if(!Lt)return-1;var gr=Xe==null?0:qo(Xe);return gr<0&&(gr=zne(Lt+gr,0)),Ad(fe,_e,gr)}var i8=Fne;function One(fe){var _e=fe==null?0:fe.length;return _e?Yf(fe,0,-1):[]}var n8=One;var Bne=Math.min;function Nne(fe,_e,Xe){for(var Lt=Xe?Ry:Mm,gr=fe[0].length,Yr=fe.length,Ea=Yr,ei=Array(Yr),oi=1/0,Cn=[];Ea--;){var xn=fe[Ea];Ea&&_e&&(xn=Ml(xn,wf(_e))),oi=Bne(xn.length,oi),ei[Ea]=!Xe&&(_e||gr>=120&&xn.length>=120)?new zm(Ea&&xn):void 0}xn=fe[0];var Fn=-1,To=ei[0];e:for(;++Fn=-F8&&fe<=F8}var O8=Doe;function zoe(fe){return fe===void 0}var B8=zoe;var Foe="[object WeakMap]";function Ooe(fe){return Dl(fe)&&jh(fe)==Foe}var N8=Ooe;var Boe="[object WeakSet]";function Noe(fe){return Dl(fe)&&Oc(fe)==Boe}var U8=Noe;var Uoe=1;function joe(fe){return _o(typeof fe=="function"?fe:up(fe,Uoe))}var j8=joe;var qoe=Array.prototype,Voe=qoe.join;function Goe(fe,_e){return fe==null?"":Voe.call(fe,_e)}var q8=Goe;var Hoe=Cd(function(fe,_e,Xe){return fe+(Xe?"-":"")+_e.toLowerCase()}),V8=Hoe;var Woe=Bm(function(fe,_e,Xe){op(fe,Xe,_e)}),G8=Woe;function Xoe(fe,_e,Xe){for(var Lt=Xe+1;Lt--;)if(fe[Lt]===_e)return Lt;return Lt}var H8=Xoe;var Zoe=Math.max,Yoe=Math.min;function Koe(fe,_e,Xe){var Lt=fe==null?0:fe.length;if(!Lt)return-1;var gr=Lt;return Xe!==void 0&&(gr=qo(Xe),gr=gr<0?Zoe(Lt+gr,0):Yoe(gr,Lt-1)),_e===_e?H8(fe,_e,gr):Sm(fe,Rb,gr,!0)}var W8=Koe;var Joe=Cd(function(fe,_e,Xe){return fe+(Xe?" ":"")+_e.toLowerCase()}),X8=Joe;var $oe=Wb("toLowerCase"),Z8=$oe;function Qoe(fe,_e){return fe<_e}var Uy=Qoe;var ese=qm(Uy),Y8=ese;var tse=qm(function(fe,_e){return fe<=_e}),K8=tse;function rse(fe,_e){var Xe={};return _e=_o(_e,3),cp(fe,function(Lt,gr,Yr){op(Xe,_e(Lt,gr,Yr),Lt)}),Xe}var J8=rse;function ase(fe,_e){var Xe={};return _e=_o(_e,3),cp(fe,function(Lt,gr,Yr){op(Xe,gr,_e(Lt,gr,Yr))}),Xe}var $8=ase;var ise=1;function nse(fe){return pw(up(fe,ise))}var Q8=nse;var ose=1;function sse(fe,_e){return vw(fe,up(_e,ose))}var eR=sse;function lse(fe,_e,Xe){for(var Lt=-1,gr=fe.length;++Lt=this.__values__.length,_e=fe?void 0:this.__values__[this.__index__++];return{done:fe,value:_e}}var hR=Cse;function Lse(fe,_e){var Xe=fe.length;if(Xe)return _e+=_e<0?Xe:0,ip(_e,Xe)?fe[_e]:void 0}var Gw=Lse;function Pse(fe,_e){return fe&&fe.length?Gw(fe,qo(_e)):void 0}var pR=Pse;function Ise(fe){return fe=qo(fe),Vo(function(_e){return Gw(_e,fe)})}var dR=Ise;function Rse(fe,_e){return _e=Fp(_e,fe),fe=Bw(fe,_e),fe==null||delete fe[Eh(Tf(_e))]}var qy=Rse;function Dse(fe){return gv(fe)?void 0:fe}var vR=Dse;var zse=1,Fse=2,Ose=4,Bse=lp(function(fe,_e){var Xe={};if(fe==null)return Xe;var Lt=!1;_e=Ml(_e,function(Yr){return Yr=Fp(Yr,fe),Lt||(Lt=Yr.length>1),Yr}),Mh(fe,by(fe),Xe),Lt&&(Xe=up(Xe,zse|Fse|Ose,vR));for(var gr=_e.length;gr--;)qy(Xe,_e[gr]);return Xe}),mR=Bse;function Nse(fe,_e,Xe,Lt){if(!Ll(fe))return fe;_e=Fp(_e,fe);for(var gr=-1,Yr=_e.length,Ea=Yr-1,ei=fe;ei!=null&&++gr_e||Yr&&Ea&&oi&&!ei&&!Cn||Lt&&Ea&&oi||!Xe&&oi||!gr)return 1;if(!Lt&&!Yr&&!Cn&&fe<_e||Cn&&Xe&&gr&&!Lt&&!Yr||ei&&Xe&&gr||!Ea&&gr||!oi)return-1}return 0}var Xw=Hse;function Wse(fe,_e,Xe){for(var Lt=-1,gr=fe.criteria,Yr=_e.criteria,Ea=gr.length,ei=Xe.length;++Lt=ei)return oi;var Cn=Xe[Lt];return oi*(Cn=="desc"?-1:1)}}return fe.index-_e.index}var xR=Wse;function Xse(fe,_e,Xe){_e.length?_e=Ml(_e,function(Yr){return Do(Yr)?function(Ea){return ld(Ea,Yr.length===1?Yr[0]:Yr)}:Yr}):_e=[Bc];var Lt=-1;_e=Ml(_e,wf(_o));var gr=zw(fe,function(Yr,Ea,ei){var oi=Ml(_e,function(Cn){return Cn(Yr)});return{criteria:oi,index:++Lt,value:Yr}});return _R(gr,function(Yr,Ea){return xR(Yr,Ea,Xe)})}var Zw=Xse;function Zse(fe,_e,Xe,Lt){return fe==null?[]:(Do(_e)||(_e=_e==null?[]:[_e]),Xe=Lt?void 0:Xe,Do(Xe)||(Xe=Xe==null?[]:[Xe]),Zw(fe,_e,Xe))}var bR=Zse;function Yse(fe){return lp(function(_e){return _e=Ml(_e,wf(_o)),Vo(function(Xe){var Lt=this;return fe(_e,function(gr){return xf(gr,Lt,Xe)})})})}var Vy=Yse;var Kse=Vy(Ml),wR=Kse;var Jse=Vo,TR=Jse;var $se=Math.min,Qse=TR(function(fe,_e){_e=_e.length==1&&Do(_e[0])?Ml(_e[0],wf(_o)):Ml(Qu(_e,1),wf(_o));var Xe=_e.length;return Vo(function(Lt){for(var gr=-1,Yr=$se(Lt.length,Xe);++grrle)return Xe;do _e%2&&(Xe+=fe),_e=ale(_e/2),_e&&(fe+=fe);while(_e);return Xe}var m_=ile;var nle=Cy("length"),ER=nle;var CR="\\ud800-\\udfff",ole="\\u0300-\\u036f",sle="\\ufe20-\\ufe2f",lle="\\u20d0-\\u20ff",ule=ole+sle+lle,cle="\\ufe0e\\ufe0f",fle="["+CR+"]",NA="["+ule+"]",UA="\\ud83c[\\udffb-\\udfff]",hle="(?:"+NA+"|"+UA+")",LR="[^"+CR+"]",PR="(?:\\ud83c[\\udde6-\\uddff]){2}",IR="[\\ud800-\\udbff][\\udc00-\\udfff]",ple="\\u200d",RR=hle+"?",DR="["+cle+"]?",dle="(?:"+ple+"(?:"+[LR,PR,IR].join("|")+")"+DR+RR+")*",vle=DR+RR+dle,mle="(?:"+[LR+NA+"?",NA,PR,IR,fle].join("|")+")",kR=RegExp(UA+"(?="+UA+")|"+mle+vle,"g");function gle(fe){for(var _e=kR.lastIndex=0;kR.test(fe);)++_e;return _e}var zR=gle;function yle(fe){return kd(fe)?zR(fe):ER(fe)}var Pd=yle;var _le=Math.ceil;function xle(fe,_e){_e=_e===void 0?" ":nh(_e);var Xe=_e.length;if(Xe<2)return Xe?m_(_e,fe):_e;var Lt=m_(_e,_le(fe/Pd(_e)));return kd(_e)?Bp(Uh(Lt),0,fe).join(""):Lt.slice(0,fe)}var H0=xle;var ble=Math.ceil,wle=Math.floor;function Tle(fe,_e,Xe){fe=Us(fe),_e=qo(_e);var Lt=_e?Pd(fe):0;if(!_e||Lt>=_e)return fe;var gr=(_e-Lt)/2;return H0(wle(gr),Xe)+fe+H0(ble(gr),Xe)}var FR=Tle;function Ale(fe,_e,Xe){fe=Us(fe),_e=qo(_e);var Lt=_e?Pd(fe):0;return _e&&Lt<_e?fe+H0(_e-Lt,Xe):fe}var OR=Ale;function Sle(fe,_e,Xe){fe=Us(fe),_e=qo(_e);var Lt=_e?Pd(fe):0;return _e&&Lt<_e?H0(_e-Lt,Xe)+fe:fe}var BR=Sle;var Mle=/^\s+/,Ele=wu.parseInt;function kle(fe,_e,Xe){return Xe||_e==null?_e=0:_e&&(_e=+_e),Ele(Us(fe).replace(Mle,""),_e||0)}var NR=kle;var Cle=32,jA=Vo(function(fe,_e){var Xe=Yp(_e,Sd(jA));return np(fe,Cle,void 0,_e,Xe)});jA.placeholder={};var Yw=jA;var Lle=64,qA=Vo(function(fe,_e){var Xe=Yp(_e,Sd(qA));return np(fe,Lle,void 0,_e,Xe)});qA.placeholder={};var UR=qA;var Ple=Bm(function(fe,_e,Xe){fe[Xe?0:1].push(_e)},function(){return[[],[]]}),jR=Ple;function Ile(fe,_e){return Hw(fe,_e,function(Xe,Lt){return ky(fe,Lt)})}var qR=Ile;var Rle=lp(function(fe,_e){return fe==null?{}:qR(fe,_e)}),VR=Rle;function Dle(fe){for(var _e,Xe=this;Xe instanceof Tm;){var Lt=Cb(Xe);Lt.__index__=0,Lt.__values__=void 0,_e?gr.__wrapped__=Lt:_e=Lt;var gr=Lt;Xe=Xe.__wrapped__}return gr.__wrapped__=fe,_e}var GR=Dle;function zle(fe){return function(_e){return fe==null?void 0:ld(fe,_e)}}var HR=zle;function Fle(fe,_e,Xe,Lt){for(var gr=Xe-1,Yr=fe.length;++gr-1;)ei!==fe&&XR.call(ei,oi,1),XR.call(fe,oi,1);return fe}var Gy=Ble;function Nle(fe,_e){return fe&&fe.length&&_e&&_e.length?Gy(fe,_e):fe}var Kw=Nle;var Ule=Vo(Kw),ZR=Ule;function jle(fe,_e,Xe){return fe&&fe.length&&_e&&_e.length?Gy(fe,_e,_o(Xe,2)):fe}var YR=jle;function qle(fe,_e,Xe){return fe&&fe.length&&_e&&_e.length?Gy(fe,_e,void 0,Xe):fe}var KR=qle;var Vle=Array.prototype,Gle=Vle.splice;function Hle(fe,_e){for(var Xe=fe?_e.length:0,Lt=Xe-1;Xe--;){var gr=_e[Xe];if(Xe==Lt||gr!==Yr){var Yr=gr;ip(gr)?Gle.call(fe,gr,1):qy(fe,gr)}}return fe}var Jw=Hle;var Wle=lp(function(fe,_e){var Xe=fe==null?0:fe.length,Lt=fy(fe,_e);return Jw(fe,Ml(_e,function(gr){return ip(gr,Xe)?+gr:gr}).sort(Xw)),Lt}),JR=Wle;var Xle=Math.floor,Zle=Math.random;function Yle(fe,_e){return fe+Xle(Zle()*(_e-fe+1))}var Hy=Yle;var Kle=parseFloat,Jle=Math.min,$le=Math.random;function Qle(fe,_e,Xe){if(Xe&&typeof Xe!="boolean"&&Nc(fe,_e,Xe)&&(_e=Xe=void 0),Xe===void 0&&(typeof _e=="boolean"?(Xe=_e,_e=void 0):typeof fe=="boolean"&&(Xe=fe,fe=void 0)),fe===void 0&&_e===void 0?(fe=0,_e=1):(fe=od(fe),_e===void 0?(_e=fe,fe=0):_e=od(_e)),fe>_e){var Lt=fe;fe=_e,_e=Lt}if(Xe||fe%1||_e%1){var gr=$le();return Jle(fe+gr*(_e-fe+Kle("1e-"+((gr+"").length-1))),_e)}return Hy(fe,_e)}var $R=Qle;var eue=Math.ceil,tue=Math.max;function rue(fe,_e,Xe,Lt){for(var gr=-1,Yr=tue(eue((_e-fe)/(Xe||1)),0),Ea=Array(Yr);Yr--;)Ea[Lt?Yr:++gr]=fe,fe+=Xe;return Ea}var QR=rue;function aue(fe){return function(_e,Xe,Lt){return Lt&&typeof Lt!="number"&&Nc(_e,Xe,Lt)&&(Xe=Lt=void 0),_e=od(_e),Xe===void 0?(Xe=_e,_e=0):Xe=od(Xe),Lt=Lt===void 0?_e1&&Nc(fe,_e[0],_e[1])?_e=[]:Xe>2&&Nc(_e[0],_e[1],_e[2])&&(_e=[_e[0]]),Zw(fe,Qu(_e,1),[])}),k4=que;var Vue=4294967295,Gue=Vue-1,Hue=Math.floor,Wue=Math.min;function Xue(fe,_e,Xe,Lt){var gr=0,Yr=fe==null?0:fe.length;if(Yr===0)return 0;_e=Xe(_e);for(var Ea=_e!==_e,ei=_e===null,oi=Rf(_e),Cn=_e===void 0;gr>>1;function Kue(fe,_e,Xe){var Lt=0,gr=fe==null?Lt:fe.length;if(typeof _e=="number"&&_e===_e&&gr<=Yue){for(;Lt>>1,Ea=fe[Yr];Ea!==null&&!Rf(Ea)&&(Xe?Ea<=_e:Ea<_e)?Lt=Yr+1:gr=Yr}return gr}return Wy(fe,_e,Bc,Xe)}var Wm=Kue;function Jue(fe,_e){return Wm(fe,_e)}var C4=Jue;function $ue(fe,_e,Xe){return Wy(fe,_e,_o(Xe,2))}var L4=$ue;function Que(fe,_e){var Xe=fe==null?0:fe.length;if(Xe){var Lt=Wm(fe,_e);if(Lt>>0,Xe?(fe=Us(fe),fe&&(typeof _e=="string"||_e!=null&&!Ny(_e))&&(_e=nh(_e),!_e&&kd(fe))?Bp(Uh(fe),0,Xe):fe.split(_e,Xe)):[]}var O4=sce;var lce="Expected a function",uce=Math.max;function cce(fe,_e){if(typeof fe!="function")throw new TypeError(lce);return _e=_e==null?0:uce(qo(_e),0),Vo(function(Xe){var Lt=Xe[_e],gr=Bp(Xe,0,_e);return Lt&&Op(gr,Lt),xf(fe,this,gr)})}var B4=cce;var fce=Cd(function(fe,_e,Xe){return fe+(Xe?" ":"")+py(_e)}),N4=fce;function hce(fe,_e,Xe){return fe=Us(fe),Xe=Xe==null?0:ud(qo(Xe),0,fe.length),_e=nh(_e),fe.slice(Xe,Xe+_e.length)==_e}var U4=hce;function pce(){return{}}var j4=pce;function dce(){return""}var q4=dce;function vce(){return!0}var V4=vce;var mce=wm(function(fe,_e){return fe-_e},0),G4=mce;function gce(fe){return fe&&fe.length?jy(fe,Bc):0}var H4=gce;function yce(fe,_e){return fe&&fe.length?jy(fe,_o(_e,2)):0}var W4=yce;function _ce(fe){var _e=fe==null?0:fe.length;return _e?Yf(fe,1,_e):[]}var X4=_ce;function xce(fe,_e,Xe){return fe&&fe.length?(_e=Xe||_e===void 0?1:qo(_e),Yf(fe,0,_e<0?0:_e)):[]}var Z4=xce;function bce(fe,_e,Xe){var Lt=fe==null?0:fe.length;return Lt?(_e=Xe||_e===void 0?1:qo(_e),_e=Lt-_e,Yf(fe,_e<0?0:_e,Lt)):[]}var Y4=bce;function wce(fe,_e){return fe&&fe.length?Nm(fe,_o(_e,3),!1,!0):[]}var K4=wce;function Tce(fe,_e){return fe&&fe.length?Nm(fe,_o(_e,3)):[]}var J4=Tce;function Ace(fe,_e){return _e(fe),fe}var $4=Ace;var Q4=Object.prototype,Sce=Q4.hasOwnProperty;function Mce(fe,_e,Xe,Lt){return fe===void 0||oh(fe,Q4[Xe])&&!Sce.call(Lt,Xe)?_e:fe}var VA=Mce;var Ece={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};function kce(fe){return"\\"+Ece[fe]}var eD=kce;var Cce=/<%=([\s\S]+?)%>/g,r2=Cce;var Lce=/<%-([\s\S]+?)%>/g,tD=Lce;var Pce=/<%([\s\S]+?)%>/g,rD=Pce;var Ice={escape:tD,evaluate:rD,interpolate:r2,variable:"",imports:{_:{escape:Ew}}},y_=Ice;var Rce="Invalid `variable` option passed into `_.template`",Dce=/\b__p \+= '';/g,zce=/\b(__p \+=) '' \+/g,Fce=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Oce=/[()=,{}\[\]\/\s]/,Bce=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,a2=/($^)/,Nce=/['\n\r\u2028\u2029\\]/g,Uce=Object.prototype,aD=Uce.hasOwnProperty;function jce(fe,_e,Xe){var Lt=y_.imports._.templateSettings||y_;Xe&&Nc(fe,_e,Xe)&&(_e=void 0),fe=Us(fe),_e=km({},_e,Lt,VA);var gr=km({},_e.imports,Lt.imports,VA),Yr=gu(gr),Ea=Fy(gr,Yr),ei,oi,Cn=0,xn=_e.interpolate||a2,Fn="__p += '",To=RegExp((_e.escape||a2).source+"|"+xn.source+"|"+(xn===r2?Bce:a2).source+"|"+(_e.evaluate||a2).source+"|$","g"),ps=aD.call(_e,"sourceURL")?"//# sourceURL="+(_e.sourceURL+"").replace(/\s/g," ")+` `:"";fe.replace(To,function(He,Kl,nu,jp,zf,fp){return nu||(nu=jp),Fn+=fe.slice(Cn,fp).replace(Nce,eD),Kl&&(ei=!0,Fn+=`' + __e(`+Kl+`) + '`),zf&&(oi=!0,Fn+=`'; `+zf+`; __p += '`),nu&&(Fn+=`' + ((__t = (`+nu+`)) == null ? '' : __t) + '`),Cn=fp+He.length,He}),Fn+=`'; `;var Qs=aD.call(_e,"variable")&&_e.variable;if(!Qs)Fn=`with (obj) { `+Fn+` } `;else if(Oce.test(Qs))throw new Error(Rce);Fn=(oi?Fn.replace(Dce,""):Fn).replace(zce,"$1").replace(Fce,"$1;"),Fn="function("+(Qs||"obj")+`) { `+(Qs?"":`obj || (obj = {}); `)+"var __t, __p = ''"+(ei?", __e = _.escape":"")+(oi?`, __j = Array.prototype.join; function print() { __p += __j.call(arguments, '') } `:`; `)+Fn+`return __p }`;var Go=Vb(function(){return Function(Yr,ps+"return "+Fn).apply(void 0,Ea)});if(Go.source=Fn,hy(Go))throw Go;return Go}var iD=jce;var qce="Expected a function";function Vce(fe,_e,Xe){var Lt=!0,gr=!0;if(typeof fe!="function")throw new TypeError(qce);return Ll(Xe)&&(Lt="leading"in Xe?!!Xe.leading:Lt,gr="trailing"in Xe?!!Xe.trailing:gr),xw(fe,_e,{leading:Lt,maxWait:_e,trailing:gr})}var nD=Vce;function Gce(fe,_e){return _e(fe)}var Wv=Gce;var Hce=9007199254740991,GA=4294967295,Wce=Math.min;function Xce(fe,_e){if(fe=qo(fe),fe<1||fe>Hce)return[];var Xe=GA,Lt=Wce(fe,GA);_e=kh(_e),fe-=GA;for(var gr=ay(Lt,_e);++Xe-1;);return Xe}var n2=rfe;function afe(fe,_e){for(var Xe=-1,Lt=fe.length;++Xe-1;);return Xe}var o2=afe;function ife(fe,_e,Xe){if(fe=Us(fe),fe&&(Xe||_e===void 0))return wb(fe);if(!fe||!(_e=nh(_e)))return fe;var Lt=Uh(fe),gr=Uh(_e),Yr=o2(Lt,gr),Ea=n2(Lt,gr)+1;return Bp(Lt,Yr,Ea).join("")}var dD=ife;function nfe(fe,_e,Xe){if(fe=Us(fe),fe&&(Xe||_e===void 0))return fe.slice(0,bb(fe)+1);if(!fe||!(_e=nh(_e)))return fe;var Lt=Uh(fe),gr=n2(Lt,Uh(_e))+1;return Bp(Lt,0,gr).join("")}var vD=nfe;var ofe=/^\s+/;function sfe(fe,_e,Xe){if(fe=Us(fe),fe&&(Xe||_e===void 0))return fe.replace(ofe,"");if(!fe||!(_e=nh(_e)))return fe;var Lt=Uh(fe),gr=o2(Lt,Uh(_e));return Bp(Lt,gr).join("")}var mD=sfe;var lfe=30,ufe="...",cfe=/\w*$/;function ffe(fe,_e){var Xe=lfe,Lt=ufe;if(Ll(_e)){var gr="separator"in _e?_e.separator:gr;Xe="length"in _e?qo(_e.length):Xe,Lt="omission"in _e?nh(_e.omission):Lt}fe=Us(fe);var Yr=fe.length;if(kd(fe)){var Ea=Uh(fe);Yr=Ea.length}if(Xe>=Yr)return fe;var ei=Xe-Pd(Lt);if(ei<1)return Lt;var oi=Ea?Bp(Ea,0,ei).join(""):fe.slice(0,ei);if(gr===void 0)return oi+Lt;if(Ea&&(ei+=oi.length-ei),Ny(gr)){if(fe.slice(ei).search(gr)){var Cn,xn=oi;for(gr.global||(gr=RegExp(gr.source,Us(cfe.exec(gr))+"g")),gr.lastIndex=0;Cn=gr.exec(xn);)var Fn=Cn.index;oi=oi.slice(0,Fn===void 0?ei:Fn)}}else if(fe.indexOf(nh(gr),ei)!=ei){var To=oi.lastIndexOf(gr);To>-1&&(oi=oi.slice(0,To))}return oi+Lt}var gD=ffe;function hfe(fe){return Fb(fe,1)}var yD=hfe;var pfe={"&":"&","<":"<",">":">",""":'"',"'":"'"},dfe=vy(pfe),_D=dfe;var xD=/&(?:amp|lt|gt|quot|#39);/g,vfe=RegExp(xD.source);function mfe(fe){return fe=Us(fe),fe&&vfe.test(fe)?fe.replace(xD,_D):fe}var bD=mfe;var gfe=1/0,yfe=Dm&&1/Fm(new Dm([,-0]))[1]==gfe?function(fe){return new Dm(fe)}:Kg,wD=yfe;var _fe=200;function xfe(fe,_e,Xe){var Lt=-1,gr=Mm,Yr=fe.length,Ea=!0,ei=[],oi=ei;if(Xe)Ea=!1,gr=Ry;else if(Yr>=_fe){var Cn=_e?null:wD(fe);if(Cn)return Fm(Cn);Ea=!1,gr=Gv,oi=new zm}else oi=_e?[]:ei;e:for(;++Lt1||this.__actions__.length||!(Lt instanceof Bl)||!ip(Xe)?this.thru(gr):(Lt=Lt.slice(Xe,+Xe+(_e?1:0)),Lt.__actions__.push({func:Wv,args:[gr],thisArg:void 0}),new zp(Lt,this.__chain__).thru(function(Yr){return _e&&!Yr.length&&Yr.push(void 0),Yr}))}),OD=Ufe;function jfe(){return Kb(this)}var BD=jfe;function qfe(){var fe=this.__wrapped__;if(fe instanceof Bl){var _e=fe;return this.__actions__.length&&(_e=new Bl(this)),_e=_e.reverse(),_e.__actions__.push({func:Wv,args:[g_],thisArg:void 0}),new zp(_e,this.__chain__)}return this.thru(g_)}var ND=qfe;function Vfe(fe,_e,Xe){var Lt=fe.length;if(Lt<2)return Lt?Jp(fe[0]):[];for(var gr=-1,Yr=Array(Lt);++gr1?fe[_e-1]:void 0;return Xe=typeof Xe=="function"?(fe.pop(),Xe):void 0,s2(fe,Xe)}),WD=Jfe;var ms={chunk:GL,compact:CP,concat:LP,difference:uI,differenceBy:cI,differenceWith:fI,drop:pI,dropRight:dI,dropRightWhile:vI,dropWhile:mI,fill:kI,findIndex:Iw,findLastIndex:Dw,first:v_,flatten:qb,flattenDeep:OI,flattenDepth:BI,fromPairs:XI,head:v_,indexOf:i8,initial:n8,intersection:o8,intersectionBy:s8,intersectionWith:l8,join:q8,last:Tf,lastIndexOf:W8,nth:pR,pull:ZR,pullAll:Kw,pullAllBy:YR,pullAllWith:KR,pullAt:JR,remove:s4,reverse:g_,slice:A4,sortedIndex:C4,sortedIndexBy:L4,sortedIndexOf:P4,sortedLastIndex:I4,sortedLastIndexBy:R4,sortedLastIndexOf:D4,sortedUniq:z4,sortedUniqBy:F4,tail:X4,take:Z4,takeRight:Y4,takeRightWhile:K4,takeWhile:J4,union:TD,unionBy:AD,unionWith:SD,uniq:MD,uniqBy:ED,uniqWith:kD,unzip:Xy,unzipWith:s2,without:zD,xor:UD,xorBy:jD,xorWith:qD,zip:VD,zipObject:GD,zipObjectDeep:HD,zipWith:WD};var xc={countBy:YP,each:f_,eachRight:h_,every:MI,filter:CI,find:LI,findLast:II,flatMap:DI,flatMapDeep:zI,flatMapDepth:FI,forEach:f_,forEachRight:h_,groupBy:KI,includes:a8,invokeMap:d8,keyBy:G8,map:Um,orderBy:bR,partition:jR,reduce:a4,reduceRight:n4,reject:o4,sample:d4,sampleSize:g4,shuffle:w4,size:T4,some:E4,sortBy:k4};var HA={now:Py};var Df={after:aC,ary:Fb,before:Gb,bind:Hb,bindKey:fL,curry:JP,curryRight:$P,debounce:xw,defer:sI,delay:lI,flip:NI,memoize:Ub,negate:Hv,once:yR,overArgs:AR,partial:Yw,partialRight:UR,rearg:r4,rest:c4,spread:B4,throttle:nD,unary:yD,wrap:FD};var Hs={castArray:qL,clone:AP,cloneDeep:SP,cloneDeepWith:MP,cloneWith:EP,conformsTo:WP,eq:oh,gt:JI,gte:$I,isArguments:pd,isArray:Do,isArrayBuffer:g8,isArrayLike:Vc,isArrayLikeObject:Eu,isBoolean:y8,isBuffer:Kp,isDate:b8,isElement:w8,isEmpty:T8,isEqual:A8,isEqualWith:S8,isError:hy,isFinite:M8,isFunction:ap,isInteger:Nw,isLength:Em,isMap:nw,isMatch:E8,isMatchWith:k8,isNaN:C8,isNative:P8,isNil:I8,isNull:R8,isNumber:Uw,isObject:Ll,isObjectLike:Dl,isPlainObject:gv,isRegExp:Ny,isSafeInteger:O8,isSet:ow,isString:Vm,isSymbol:Rf,isTypedArray:Ed,isUndefined:B8,isWeakMap:N8,isWeakSet:U8,lt:Y8,lte:K8,toArray:Vw,toFinite:od,toInteger:qo,toLength:Cw,toNumber:Sh,toPlainObject:bw,toSafeInteger:fD,toString:Us};var xp={add:eC,ceil:VL,divide:hI,floor:UI,max:tR,maxBy:rR,mean:aR,meanBy:iR,min:lR,minBy:uR,multiply:cR,round:h4,subtract:G4,sum:H4,sumBy:W4};var __={clamp:HL,inRange:r8,random:$R};var dl={assign:BC,assignIn:s_,assignInWith:km,assignWith:jC,at:lL,create:KP,defaults:tI,defaultsDeep:oI,entries:p_,entriesIn:d_,extend:s_,extendWith:km,findKey:PI,findLastKey:RI,forIn:VI,forInRight:GI,forOwn:HI,forOwnRight:WI,functions:ZI,functionsIn:YI,get:cy,has:e8,hasIn:ky,invert:c8,invertBy:h8,invoke:p8,keys:gu,keysIn:Gc,mapKeys:J8,mapValues:$8,merge:nR,mergeWith:ww,omit:mR,omitBy:gR,pick:VR,pickBy:Ww,result:f4,set:y4,setWith:_4,toPairs:p_,toPairsIn:d_,transform:pD,unset:LD,update:PD,updateWith:ID,values:Ld,valuesIn:DD};var Id={at:OD,chain:Kb,commit:kP,lodash:da,next:hR,plant:GR,reverse:ND,tap:$4,thru:Wv,toIterator:sD,toJSON:Xm,value:Xm,valueOf:Xm,wrapperChain:BD};var ju={camelCase:jL,capitalize:Xb,deburr:Zb,endsWith:yI,escape:Ew,escapeRegExp:AI,kebabCase:V8,lowerCase:X8,lowerFirst:Z8,pad:FR,padEnd:OR,padStart:BR,parseInt:NR,repeat:l4,replace:u4,snakeCase:S4,split:O4,startCase:N4,startsWith:U4,template:iD,templateSettings:y_,toLower:lD,toUpper:hD,trim:dD,trimEnd:vD,trimStart:mD,truncate:gD,unescape:bD,upperCase:RD,upperFirst:py,words:Yb};var ec={attempt:Vb,bindAll:cL,cond:VP,conforms:HP,constant:Qg,defaultTo:QP,flow:jI,flowRight:qI,identity:Bc,iteratee:j8,matches:Q8,matchesProperty:eR,method:oR,methodOf:sR,mixin:qw,noop:Kg,nthArg:dR,over:wR,overEvery:SR,overSome:MR,property:mw,propertyOf:HR,range:e4,rangeRight:t4,stubArray:_y,stubFalse:iy,stubObject:j4,stubString:q4,stubTrue:V4,times:oD,toPath:uD,uniqueId:CD};function $fe(){var fe=new Bl(this.__wrapped__);return fe.__actions__=pf(this.__actions__),fe.__dir__=this.__dir__,fe.__filtered__=this.__filtered__,fe.__iteratees__=pf(this.__iteratees__),fe.__takeCount__=this.__takeCount__,fe.__views__=pf(this.__views__),fe}var XD=$fe;function Qfe(){if(this.__filtered__){var fe=new Bl(this);fe.__dir__=-1,fe.__filtered__=!0}else fe=this.clone(),fe.__dir__*=-1;return fe}var ZD=Qfe;var ehe=Math.max,the=Math.min;function rhe(fe,_e,Xe){for(var Lt=-1,gr=Xe.length;++Lt0||_e<0)?new Bl(Xe):(fe<0?Xe=Xe.takeRight(-fe):fe&&(Xe=Xe.drop(fe)),_e!==void 0&&(_e=qo(_e),Xe=_e<0?Xe.dropRight(-_e):Xe.take(_e-fe)),Xe)};Bl.prototype.takeRightWhile=function(fe){return this.reverse().takeWhile(fe).reverse()};Bl.prototype.toArray=function(){return this.take(QD)};cp(Bl.prototype,function(fe,_e){var Xe=/^(?:filter|find|map|reject)|While$/.test(_e),Lt=/^(?:head|last)$/.test(_e),gr=da[Lt?"take"+(_e=="last"?"Right":""):_e],Yr=Lt||/^find/.test(_e);gr&&(da.prototype[_e]=function(){var Ea=this.__wrapped__,ei=Lt?[1]:arguments,oi=Ea instanceof Bl,Cn=ei[0],xn=oi||Do(Ea),Fn=function(Kl){var nu=gr.apply(da,Op([Kl],ei));return Lt&&To?nu[0]:nu};xn&&Xe&&typeof Cn=="function"&&Cn.length!=1&&(oi=xn=!1);var To=this.__chain__,ps=!!this.__actions__.length,Qs=Yr&&!To,Go=oi&&!ps;if(!Yr&&xn){Ea=Go?Ea:new Bl(this);var He=fe.apply(Ea,ei);return He.__actions__.push({func:Wv,args:[Fn],thisArg:void 0}),new zp(He,To)}return Qs&&Go?fe.apply(this,ei):(He=this.thru(Fn),Qs?Lt?He.value()[0]:He.value():He)})});Nh(["pop","push","shift","sort","splice","unshift"],function(fe){var _e=fhe[fe],Xe=/^(?:push|sort|unshift)$/.test(fe)?"tap":"thru",Lt=/^(?:pop|shift)$/.test(fe);da.prototype[fe]=function(){var gr=arguments;if(Lt&&!this.__chain__){var Yr=this.value();return _e.apply(Do(Yr)?Yr:[],gr)}return this[Xe](function(Ea){return _e.apply(Do(Ea)?Ea:[],gr)})}});cp(Bl.prototype,function(fe,_e){var Xe=da[_e];if(Xe){var Lt=Xe.name+"";e7.call(Am,Lt)||(Am[Lt]=[]),Am[Lt].push({name:_e,func:Xe})}});Am[ry(void 0,lhe).name]=[{name:"wrapper",func:void 0}];Bl.prototype.clone=XD;Bl.prototype.reverse=ZD;Bl.prototype.value=KD;da.prototype.at=Id.at;da.prototype.chain=Id.wrapperChain;da.prototype.commit=Id.commit;da.prototype.next=Id.next;da.prototype.plant=Id.plant;da.prototype.reverse=Id.reverse;da.prototype.toJSON=da.prototype.valueOf=da.prototype.value=Id.value;da.prototype.first=da.prototype.head;JD&&(da.prototype[JD]=Id.toIterator);var Qc=da;var Rd=cX(a7());window.PlotlyConfig={MathJaxConfig:"local"};var XA=class{constructor(_e,Xe){this.model=_e,this.serializers=Xe}get(_e){let Xe=this.serializers[_e],Lt=this.model.get(_e);return Xe?.deserialize?Xe.deserialize(Lt):Lt}set(_e,Xe){let Lt=this.serializers[_e];Lt?.serialize&&(Xe=Lt.serialize(Xe)),this.model.set(_e,Xe)}on(_e,Xe){this.model.on(_e,Xe)}save_changes(){this.model.save_changes()}defaults(){return{_widget_data:[],_widget_layout:{},_config:{},_py2js_addTraces:null,_py2js_deleteTraces:null,_py2js_moveTraces:null,_py2js_restyle:null,_py2js_relayout:null,_py2js_update:null,_py2js_animate:null,_py2js_removeLayoutProps:null,_py2js_removeTraceProps:null,_js2py_restyle:null,_js2py_relayout:null,_js2py_update:null,_js2py_layoutDelta:null,_js2py_traceDeltas:null,_js2py_pointsCallback:null,_last_layout_edit_id:0,_last_trace_edit_id:0}}initialize(){this.model.on("change:_widget_data",()=>this.do_data()),this.model.on("change:_widget_layout",()=>this.do_layout()),this.model.on("change:_py2js_addTraces",()=>this.do_addTraces()),this.model.on("change:_py2js_deleteTraces",()=>this.do_deleteTraces()),this.model.on("change:_py2js_moveTraces",()=>this.do_moveTraces()),this.model.on("change:_py2js_restyle",()=>this.do_restyle()),this.model.on("change:_py2js_relayout",()=>this.do_relayout()),this.model.on("change:_py2js_update",()=>this.do_update()),this.model.on("change:_py2js_animate",()=>this.do_animate()),this.model.on("change:_py2js_removeLayoutProps",()=>this.do_removeLayoutProps()),this.model.on("change:_py2js_removeTraceProps",()=>this.do_removeTraceProps())}_normalize_trace_indexes(_e){if(_e==null){var Xe=this.model.get("_widget_data").length;_e=Qc.range(Xe)}return Array.isArray(_e)||(_e=[_e]),_e}do_data(){}do_layout(){}do_addTraces(){var _e=this.model.get("_py2js_addTraces");if(_e!==null){var Xe=this.model.get("_widget_data"),Lt=_e.trace_data;Qc.forEach(Lt,function(gr){Xe.push(gr)})}}do_deleteTraces(){var _e=this.model.get("_py2js_deleteTraces");if(_e!==null){var Xe=_e.delete_inds,Lt=this.model.get("_widget_data");Xe.slice().reverse().forEach(function(gr){Lt.splice(gr,1)})}}do_moveTraces(){var _e=this.model.get("_py2js_moveTraces");if(_e!==null){var Xe=this.model.get("_widget_data"),Lt=_e.current_trace_inds,gr=_e.new_trace_inds;yhe(Xe,Lt,gr)}}do_restyle(){var _e=this.model.get("_py2js_restyle");if(_e!==null){var Xe=_e.restyle_data,Lt=this._normalize_trace_indexes(_e.restyle_traces);n7(this.model.get("_widget_data"),Xe,Lt)}}do_relayout(){var _e=this.model.get("_py2js_relayout");_e!==null&&f2(this.model.get("_widget_layout"),_e.relayout_data)}do_update(){var _e=this.model.get("_py2js_update");if(_e!==null){var Xe=_e.style_data,Lt=_e.layout_data,gr=this._normalize_trace_indexes(_e.style_traces);n7(this.model.get("_widget_data"),Xe,gr),f2(this.model.get("_widget_layout"),Lt)}}do_animate(){var _e=this.model.get("_py2js_animate");if(_e!==null){for(var Xe=_e.style_data,Lt=_e.layout_data,gr=this._normalize_trace_indexes(_e.style_traces),Yr=0;Yrthis.do_addTraces()),this.model.on("change:_py2js_deleteTraces",()=>this.do_deleteTraces()),this.model.on("change:_py2js_moveTraces",()=>this.do_moveTraces()),this.model.on("change:_py2js_restyle",()=>this.do_restyle()),this.model.on("change:_py2js_relayout",()=>this.do_relayout()),this.model.on("change:_py2js_update",()=>this.do_update()),this.model.on("change:_py2js_animate",()=>this.do_animate()),window?.MathJax?.Hub?.Config?.({SVG:{font:"STIX-Web"}});var Xe=this.model.get("_last_layout_edit_id"),Lt=this.model.get("_last_trace_edit_id");this.viewID=s7();var gr=Qc.cloneDeep(this.model.get("_widget_data")),Yr=Qc.cloneDeep(this.model.get("_widget_layout"));Yr.height||(Yr.height=360);var Ea=this.model.get("_config");Ea.editSelection=!1,Rd.default.newPlot(_e.el,gr,Yr,Ea).then(function(){_e._sendTraceDeltas(Lt),_e._sendLayoutDelta(Xe),_e.el.on("plotly_restyle",function(oi){_e.handle_plotly_restyle(oi)}),_e.el.on("plotly_relayout",function(oi){_e.handle_plotly_relayout(oi)}),_e.el.on("plotly_update",function(oi){_e.handle_plotly_update(oi)}),_e.el.on("plotly_click",function(oi){_e.handle_plotly_click(oi)}),_e.el.on("plotly_hover",function(oi){_e.handle_plotly_hover(oi)}),_e.el.on("plotly_unhover",function(oi){_e.handle_plotly_unhover(oi)}),_e.el.on("plotly_selected",function(oi){_e.handle_plotly_selected(oi)}),_e.el.on("plotly_deselect",function(oi){_e.handle_plotly_deselect(oi)}),_e.el.on("plotly_doubleclick",function(oi){_e.handle_plotly_doubleclick(oi)});var ei=new CustomEvent("plotlywidget-after-render",{detail:{element:_e.el,viewID:_e.viewID}});document.dispatchEvent(ei)})}_processLuminoMessage(_e,Xe){Xe.apply(this,arguments);var Lt=this;switch(_e.type){case"before-attach":var gr={showgrid:!1,showline:!1,tickvals:[]};Rd.default.newPlot(Lt.el,[],{xaxis:gr,yaxis:gr}),this.resizeEventListener=()=>{this.autosizeFigure()},window.addEventListener("resize",this.resizeEventListener);break;case"after-attach":this.perform_render();break;case"after-show":case"resize":this.autosizeFigure();break}}autosizeFigure(){var _e=this,Xe=_e.model.get("_widget_layout");(Qc.isNil(Xe)||Qc.isNil(Xe.width))&&Rd.default.Plots.resize(_e.el).then(function(){var Lt=_e.model.get("_last_layout_edit_id");_e._sendLayoutDelta(Lt)})}remove(){Rd.default.purge(this.el),window.removeEventListener("resize",this.resizeEventListener)}getFullData(){return Qc.mergeWith({},this.el._fullData,this.el.data,i7)}getFullLayout(){return Qc.mergeWith({},this.el._fullLayout,this.el.layout,i7)}buildPointsObject(_e){var Xe;if(_e.hasOwnProperty("points")){var Lt=_e.points,gr=Lt.length,Yr=!0;for(let xn=0;xn=0;gr--)Lt.splice(0,0,fe[_e[gr]]),fe.splice(_e[gr],1);var Yr=Qc(Xe).zip(Lt).sortBy(0).unzip().value();Xe=Yr[0],Lt=Yr[1];for(var Ea=0;Ea0&&typeof Yr[0]=="object"){Xe[Lt]=new Array(Yr.length);for(var Ea=0;Ea0&&(Xe[Lt]=ei)}else typeof Yr=="object"&&!Array.isArray(Yr)?Xe[Lt]=x_(Yr,{}):Yr!==void 0&&typeof Yr!="function"&&(Xe[Lt]=Yr)}}return Xe}function s7(fe,_e,Xe,Lt){if(Xe||(Xe=16),_e===void 0&&(_e=24),_e<=0)return"0";var gr=Math.log(Math.pow(2,_e))/Math.log(Xe),Yr="",Ea,ei,oi;for(Ea=2;gr===1/0;Ea*=2)gr=Math.log(Math.pow(2,_e/Ea))/Math.log(Xe)*Ea;var Cn=gr-Math.floor(gr);for(Ea=0;Ea=Math.pow(2,_e)?Lt>10?(console.warn("randstr failed uniqueness"),Yr):s7(fe,_e,Xe,(Lt||0)+1):Yr}var EHe=()=>{let fe;return{initialize(_e){fe=new XA(_e.model,dhe),fe.initialize()},render({el:_e}){let Xe=new ZA(fe,_e);return Xe.perform_render(),()=>Xe.remove()}}};export{XA as FigureModel,ZA as FigureView,EHe as default}; /*! Bundled license information: plotly.js/dist/plotly.js: (*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT *) (*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh *) (*! * Determine if an object is a Buffer * * @author Feross Aboukhadijeh * @license MIT *) (*! * pad-left * * Copyright (c) 2014-2015, Jon Schlinkert. * Licensed under the MIT license. *) (*! * repeat-string * * Copyright (c) 2014-2015, Jon Schlinkert. * Licensed under the MIT License. *) (*! Bundled license information: native-promise-only/lib/npo.src.js: (*! Native Promise Only v0.8.1 (c) Kyle Simpson MIT License: http://getify.mit-license.org *) polybooljs/index.js: (* * @copyright 2016 Sean Connelly (@voidqk), http://syntheti.cc * @license MIT * @preserve Project Home: https://github.com/voidqk/polybooljs *) ieee754/index.js: (*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh *) buffer/index.js: (*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT *) safe-buffer/index.js: (*! safe-buffer. MIT License. Feross Aboukhadijeh *) assert/build/internal/util/comparisons.js: (*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT *) object-assign/index.js: (* object-assign (c) Sindre Sorhus @license MIT *) maplibre-gl/dist/maplibre-gl.js: (** * MapLibre GL JS * @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v4.7.1/LICENSE.txt *) *) lodash-es/lodash.default.js: (** * @license * Lodash (Custom Build) * Build: `lodash modularize exports="es" -o ./` * Copyright OpenJS Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors *) lodash-es/lodash.js: (** * @license * Lodash (Custom Build) * Build: `lodash modularize exports="es" -o ./` * Copyright OpenJS Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors *) */