diff --git a/CHANGELOG.md b/CHANGELOG.md index bc5b3cc5e9a..436ee0661e5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Fix `hex_to_rgb` parsing of 3-digit shorthand hexadecimal colors such as `#FFF` [[#5662](https://github.com/plotly/plotly.py/pull/5662)], with thanks to @genrichez for the contribution! - Add `` to the `to_html()` template to comply with modern web standards [[#5693](https://github.com/plotly/plotly.py/pull/5693)], with thanks to @mishrakushal for the contribution! - Fix `mpl_to_plotly` silently dropping matplotlib path collections in data coordinates (such as violin plots, pcolor, event plots, stack plots, fill_between, and stem plots) by rendering them as filled polygons or lines [[#5702](https://github.com/plotly/plotly.py/pull/5702)], with thanks to @robertoffmoura for the contribution! - +- Fix serialization of box/lasso select data for multiple subplots ## [6.9.0] - 2026-07-09 diff --git a/js/src/widget.ts b/js/src/widget.ts index 284116648da..cd21d6bf964 100644 --- a/js/src/widget.ts +++ b/js/src/widget.ts @@ -109,9 +109,7 @@ type Py2JsUpdateMsg = Py2JsMsg & { type Selector = { type: "box" | "lasso"; - selector_state: - | { xrange: number[]; yrange: number[] } - | { xs: number[]; ys: number[] }; + selector_state: Record; }; // Model @@ -1149,22 +1147,30 @@ export class FigureView { var selectorObject: Selector; if (data.hasOwnProperty("range")) { - // Box selection + // Box selection - preserve all subplot-specific axis keys (x, x2, x3, ... and y, y2, y3, ...) + var rangeData = data["range"]; + // Verify we have at least an x and y range (in any subplot) + var hasXRange = Object.keys(rangeData || {}).some((key: string) => /^x\d*$/.test(key)); + var hasYRange = Object.keys(rangeData || {}).some((key: string) => /^y\d*$/.test(key)); + if (!hasXRange || !hasYRange) { + return null; + } selectorObject = { type: "box", - selector_state: { - xrange: data["range"]["x"], - yrange: data["range"]["y"], - }, + selector_state: rangeData, }; } else if (data.hasOwnProperty("lassoPoints")) { - // Lasso selection + // Lasso selection - preserve all subplot-specific axis keys + var lassoData = data["lassoPoints"]; + // Verify we have at least an x and y coordinate array (in any subplot) + var hasXCoords = Object.keys(lassoData || {}).some((key: string) => /^x\d*$/.test(key)); + var hasYCoords = Object.keys(lassoData || {}).some((key: string) => /^y\d*$/.test(key)); + if (!hasXCoords || !hasYCoords) { + return null; + } selectorObject = { type: "lasso", - selector_state: { - xs: data["lassoPoints"]["x"], - ys: data["lassoPoints"]["y"], - }, + selector_state: lassoData, }; } else { selectorObject = null; diff --git a/plotly/package_data/widgetbundle.js b/plotly/package_data/widgetbundle.js index 8649f29a710..d3f975ae213 100644 --- a/plotly/package_data/widgetbundle.js +++ b/plotly/package_data/widgetbundle.js @@ -1,11 +1,11 @@ -var iX=Object.create;var Wk=Object.defineProperty;var nX=Object.getOwnPropertyDescriptor;var oX=Object.getOwnPropertyNames;var sX=Object.getPrototypeOf,lX=Object.prototype.hasOwnProperty;var uX=(fe,_e)=>()=>(_e||fe((_e={exports:{}}).exports,_e),_e.exports);var cX=(fe,_e,Xe,Lt)=>{if(_e&&typeof _e=="object"||typeof _e=="function")for(let gr of oX(_e))!lX.call(fe,gr)&&gr!==Xe&&Wk(fe,gr,{get:()=>_e[gr],enumerable:!(Lt=nX(_e,gr))||Lt.enumerable});return fe};var fX=(fe,_e,Xe)=>(Xe=fe!=null?iX(sX(fe)):{},cX(_e||!fe||!fe.__esModule?Wk(Xe,"default",{value:fe,enumerable:!0}):Xe,fe));var a7=uX((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,Ln=Object.prototype.hasOwnProperty,_n=Object.prototype.propertyIsEnumerable,Fn=(Z,q,v)=>q in Z?Xe(Z,q,{enumerable:!0,configurable:!0,writable:!0,value:v}):Z[q]=v,So=(Z,q)=>{for(var v in q||(q={}))Ln.call(q,v)&&Fn(Z,v,q[v]);if(ei)for(var v of ei(q))_n.call(q,v)&&Fn(Z,v,q[v]);return Z},vs=(Z,q)=>Lt(Z,Yr(q)),Qs=(Z,q)=>{var v={};for(var _ in Z)Ln.call(Z,_)&&q.indexOf(_)<0&&(v[_]=Z[_]);if(Z!=null&&ei)for(var _ of ei(Z))q.indexOf(_)<0&&_n.call(Z,_)&&(v[_]=Z[_]);return v},Ho=(Z,q,v)=>function(){if(v)throw v[0];try{return Z&&(q=(0,Z[Ea(Z)[0]])(Z=0)),q}catch(S){throw v=[S],S}},He=(Z,q)=>function(){try{return q||(0,Z[Ea(Z)[0]])((q={exports:{}}).exports,q),q.exports}catch(_){throw q=0,_}},Jl=(Z,q)=>{for(var v in q)Xe(Z,v,{get:q[v],enumerable:!0})},ou=(Z,q,v,_)=>{if(q&&typeof q=="object"||typeof q=="function")for(let S of Ea(q))!Ln.call(Z,S)&&S!==v&&Xe(Z,S,{get:()=>q[S],enumerable:!(_=gr(q,S))||_.enumerable});return Z},jp=(Z,q,v)=>(v=Z!=null?_e(oi(Z)):{},ou(q||!Z||!Z.__esModule?Xe(v,"default",{value:Z,enumerable:!0}):v,Z)),zf=Z=>ou(Xe({},"__esModule",{value:!0}),Z),Gh=He({"src/version.js"(Z){"use strict";Z.version="3.7.0"}}),Ff=He({"node_modules/native-promise-only/lib/npo.src.js"(Z,q){(function(_,S,M){S[_]=S[_]||M(),typeof q<"u"&&q.exports&&(q.exports=S[_])})("Promise",typeof window<"u"?window:Z,function(){"use strict";var _,S,M,e=Object.prototype.toString,t=typeof setImmediate<"u"?function(x){return setImmediate(x)}:setTimeout;try{Object.defineProperty({},"x",{}),_=function(x,w,A,E){return Object.defineProperty(x,w,{value:A,writable:!0,configurable:E!==!1})}}catch{_=function(w,A,E){return w[A]=E,w}}M=function(){var x,w,A;function E(p,b){this.fn=p,this.self=b,this.next=void 0}return{add:function(b,d){A=new E(b,d),w?w.next=A:x=A,w=A,A=void 0},drain:function(){var b=x;for(x=w=S=void 0;b;)b.fn.call(b.self),b=b.next}}}();function r(l,x){M.add(l,x),S||(S=t(M.drain))}function o(l){var x,w=typeof l;return l!=null&&(w=="object"||w=="function")&&(x=l.then),typeof x=="function"?x:!1}function a(){for(var l=0;l0&&r(a,w))}catch(A){s.call(new f(w),A)}}}function s(l){var x=this;x.triggered||(x.triggered=!0,x.def&&(x=x.def),x.msg=l,x.state=2,x.chain.length>0&&r(a,x))}function h(l,x,w,A){for(var E=0;EDe?1:me>=De?0:NaN}v.descending=function(me,De){return Deme?1:De>=me?0:NaN},v.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},v.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},v.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)},v.deviation=function(){var me=v.variance.apply(this,arguments);return me&&Math.sqrt(me)};function m(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=m(s);v.bisectLeft=c.left,v.bisect=v.bisectRight=c.right,v.bisector=function(me){return m(me.length===1?function(De,et){return s(me(De),et)}:me)},v.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},v.permute=function(me,De){for(var et=De.length,dt=new Array(et);et--;)dt[et]=me[De[et]];return dt},v.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;v.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=x(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,wa=_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(wa,pa){Gr.push({key:wa,values:tr(pa,_r)})}),Xr?Gr.sort(function(wa,pa){return Xr(wa.key,pa.key)}):Gr}return me.map=function(zt,_r){return Tt(_r,zt,0)},me.entries=function(zt){return tr(Tt(v.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},v.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 W(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=v.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=v.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=Pe(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=Bt.get(me);tr&&(me=tr,Tt=Ar);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([^.]+)"+v.requote(me)+"$"),wa;for(var pa in this)if(wa=pa.match(Xr)){var Ja=this[pa];this.removeEventListener(wa[1],Ja,Ja.$),delete this[pa]}}return yt?De?_r:zt:De?U:Gr}var Bt=v.map({mouseenter:"mouseover",mouseleave:"mouseout"});M&&Bt.forEach(function(me){"on"+me in M&&Bt.remove(me)});function Vt(me,De){return function(et){var dt=v.event;v.event=et,De[0]=this.__data__;try{me.apply(this,De)}finally{v.event=dt}}}function Ar(me,De){var et=Vt(me,De);return function(dt){var yt=this,Tt=dt.relatedTarget;(!Tt||Tt!==yt&&!(Tt.compareDocumentPosition(yt)&8))&&et.call(yt,dt)}}var vr,qr=0;function kr(me){var De=".dragsuppress-"+ ++qr,et="click"+De,dt=v.select(t(me)).on("touchmove"+De,$).on("dragstart"+De,$).on("selectstart"+De,$);if(vr==null&&(vr="onselectstart"in me?!1:O(me.style,"userSelect")),vr){var yt=e(me).style,Tt=yt[vr];yt[vr]="none"}return function(tr){if(dt.on(De,null),vr&&(yt[vr]=Tt),tr){var zt=function(){dt.on(et,null)};dt.on(et,function(){$(),zt()},!0),setTimeout(zt,0)}}}v.mouse=function(me){return _t(me,ue())};var Ur=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(Ur<0){var yt=t(me);if(yt.scrollX||yt.scrollY){et=v.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var Tt=et[0][0].getScreenCTM();Ur=!(Tt.f||Tt.e),et.remove()}}return Ur?(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]}v.touch=function(me,De,et){if(arguments.length<3&&(et=De,De=ue().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 cr(me){return me>1?st:me<-1?-st:Math.asin(me)}function or(me){return((me=Math.exp(me))-1/me)/2}function nr(me){return((me=Math.exp(me))+1/me)/2}function Pr(me){return((me=Math.exp(2*me))-1)/(me+1)}function _a(me){return(me=Math.sin(me/2))*me}var Fa=Math.SQRT2,Ra=2,qa=4;v.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,wa,pa;if(Xr0&&(mn=mn.transition().duration(tr)),mn.call(ni.event)}function Jn(){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 $o(mn){Jn(),mn({type:"zoom",scale:me.k,translate:[me.x,me.y]})}function no(mn){--zt||(mn({type:"zoomend"}),et=null)}function Xo(){var mn=this,po=ti.of(mn,arguments),fs=0,ms=v.select(t(mn)).on(Gr,Su).on(Xr,Rl),Tl=La(v.mouse(mn)),Wl=kr(mn);Bn.call(mn),ro(po);function Su(){fs=1,dn(v.mouse(mn),Tl),$o(po)}function Rl(){ms.on(Gr,null).on(Xr,null),Wl(fs),no(po)}}function cl(){var mn=this,po=ti.of(mn,arguments),fs={},ms=0,Tl,Wl=".zoom-"+v.event.changedTouches[0].identifier,Su="touchmove"+Wl,Rl="touchend"+Wl,_c=[],it=v.select(mn),Xt=kr(mn);oa(),ro(po),it.on(_r,null).on(pa,oa);function fr(){var xa=v.touches(mn);return Tl=me.k,xa.forEach(function(Ya){Ya.identifier in fs&&(fs[Ya.identifier]=La(Ya))}),xa}function oa(){var xa=v.event.target;v.select(xa).on(Su,Ta).on(Rl,ma),_c.push(xa);for(var Ya=v.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];ms=Na*Na+ea*ea}}function Ta(){var xa=v.touches(mn),Ya,bi,yi,si;Bn.call(mn);for(var gn=0,zi=xa.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))}v.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?Ia(me.l,me.a,me.b):Ia((me=Hr((me=v.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*=ot)*De,Math.sin(me)*De)}v.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=rn(yt)*Ba,dt=rn(dt)*$a,Tt=rn(Tt)*Za,new xt(cn(3.2404542*yt-1.5371385*dt-.4985314*Tt),cn(-.969266*yt+1.8760108*dt+.041556*Tt),cn(.0556434*yt-.2040259*dt+1.0572252*Tt))}function Ia(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 rn(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 cn(me){return Math.round(255*(me<=.00304?12.92*me:1.055*Math.pow(me,1/2.4)-.055))}v.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,Zt):new xt(me,De,et)}function ut(me){return new xt(me>>16,me>>8&255,me&255)}function Or(me){return ut(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 Nr(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 Yt(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 Kt(me){var De=parseFloat(me);return me.charAt(me.length-1)==="%"?Math.round(De*2.55):De}var mr=v.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});mr.forEach(function(me,De){mr.set(me,ut(De))});function Ir(me){return typeof me=="function"?me:function(){return me}}v.functor=Ir,v.xhr=va(F);function va(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=v.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,wa;if(!Xr&&la(zt)||Xr>=200&&Xr<300||Xr===304){try{wa=et.call(yt,zt)}catch(pa){Tt.error.call(yt,pa);return}Tt.load.call(yt,wa)}else Tt.error.call(yt,zt)}return zt.onprogress=function(Xr){var wa=v.event;v.event=Xr;try{Tt.progress.call(yt,zt)}finally{v.event=wa}},yt.header=function(Xr,wa){return Xr=(Xr+"").toLowerCase(),arguments.length<2?tr[Xr]:(wa==null?delete tr[Xr]:tr[Xr]=wa+"",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,wa,pa){if(arguments.length===2&&typeof wa=="function"&&(pa=wa,wa=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(wa??null),yt},yt.abort=function(){return zt.abort(),yt},v.rebind(yt,Tt,"on"),dt==null?yt:yt.get(ga(dt))}function ga(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}v.dsv=function(me,De){var et=new RegExp('["'+me+` -]`),dt=me.charCodeAt(0);function yt(Gr,Xr,wa){arguments.length<3&&(wa=Xr,Xr=null);var pa=Pa(Gr,De,Xr==null?Tt:tr(Xr),wa);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 wa;return yt.parseRows(Gr,function(pa,Ja){if(wa)return wa(pa,Ja-1);var ti=function(Sa){for(var za={},Xa=pa.length,fi=0;fi=ti)return pa;if(fi)return fi=!1,wa;var sn=Sa;if(Gr.charCodeAt(sn)===34){for(var an=sn;an++()=>(_e||fe((_e={exports:{}}).exports,_e),_e.exports);var cX=(fe,_e,Xe,Lt)=>{if(_e&&typeof _e=="object"||typeof _e=="function")for(let gr of oX(_e))!lX.call(fe,gr)&&gr!==Xe&&Wk(fe,gr,{get:()=>_e[gr],enumerable:!(Lt=nX(_e,gr))||Lt.enumerable});return fe};var fX=(fe,_e,Xe)=>(Xe=fe!=null?iX(sX(fe)):{},cX(_e||!fe||!fe.__esModule?Wk(Xe,"default",{value:fe,enumerable:!0}):Xe,fe));var a7=uX((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,Zr=Object.getOwnPropertyDescriptors,Ea=Object.getOwnPropertyNames,ei=Object.getOwnPropertySymbols,ai=Object.getPrototypeOf,wn=Object.prototype.hasOwnProperty,_n=Object.prototype.propertyIsEnumerable,Fn=(Z,q,v)=>q in Z?Xe(Z,q,{enumerable:!0,configurable:!0,writable:!0,value:v}):Z[q]=v,So=(Z,q)=>{for(var v in q||(q={}))wn.call(q,v)&&Fn(Z,v,q[v]);if(ei)for(var v of ei(q))_n.call(q,v)&&Fn(Z,v,q[v]);return Z},vs=(Z,q)=>Lt(Z,Zr(q)),Qs=(Z,q)=>{var v={};for(var _ in Z)wn.call(Z,_)&&q.indexOf(_)<0&&(v[_]=Z[_]);if(Z!=null&&ei)for(var _ of ei(Z))q.indexOf(_)<0&&_n.call(Z,_)&&(v[_]=Z[_]);return v},Ho=(Z,q,v)=>function(){if(v)throw v[0];try{return Z&&(q=(0,Z[Ea(Z)[0]])(Z=0)),q}catch(S){throw v=[S],S}},He=(Z,q)=>function(){try{return q||(0,Z[Ea(Z)[0]])((q={exports:{}}).exports,q),q.exports}catch(_){throw q=0,_}},Jl=(Z,q)=>{for(var v in q)Xe(Z,v,{get:q[v],enumerable:!0})},ou=(Z,q,v,_)=>{if(q&&typeof q=="object"||typeof q=="function")for(let S of Ea(q))!wn.call(Z,S)&&S!==v&&Xe(Z,S,{get:()=>q[S],enumerable:!(_=gr(q,S))||_.enumerable});return Z},jp=(Z,q,v)=>(v=Z!=null?_e(ai(Z)):{},ou(q||!Z||!Z.__esModule?Xe(v,"default",{value:Z,enumerable:!0}):v,Z)),zf=Z=>ou(Xe({},"__esModule",{value:!0}),Z),Gh=He({"src/version.js"(Z){"use strict";Z.version="3.7.0"}}),Ff=He({"node_modules/native-promise-only/lib/npo.src.js"(Z,q){(function(_,S,M){S[_]=S[_]||M(),typeof q<"u"&&q.exports&&(q.exports=S[_])})("Promise",typeof window<"u"?window:Z,function(){"use strict";var _,S,M,e=Object.prototype.toString,t=typeof setImmediate<"u"?function(x){return setImmediate(x)}:setTimeout;try{Object.defineProperty({},"x",{}),_=function(x,w,A,E){return Object.defineProperty(x,w,{value:A,writable:!0,configurable:E!==!1})}}catch{_=function(w,A,E){return w[A]=E,w}}M=function(){var x,w,A;function E(p,b){this.fn=p,this.self=b,this.next=void 0}return{add:function(b,d){A=new E(b,d),w?w.next=A:x=A,w=A,A=void 0},drain:function(){var b=x;for(x=w=S=void 0;b;)b.fn.call(b.self),b=b.next}}}();function r(l,x){M.add(l,x),S||(S=t(M.drain))}function o(l){var x,w=typeof l;return l!=null&&(w=="object"||w=="function")&&(x=l.then),typeof x=="function"?x:!1}function a(){for(var l=0;l0&&r(a,w))}catch(A){s.call(new f(w),A)}}}function s(l){var x=this;x.triggered||(x.triggered=!0,x.def&&(x=x.def),x.msg=l,x.state=2,x.chain.length>0&&r(a,x))}function h(l,x,w,A){for(var E=0;EDe?1:me>=De?0:NaN}v.descending=function(me,De){return Deme?1:De>=me?0:NaN},v.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},v.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},v.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)},v.deviation=function(){var me=v.variance.apply(this,arguments);return me&&Math.sqrt(me)};function m(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=m(s);v.bisectLeft=c.left,v.bisect=v.bisectRight=c.right,v.bisector=function(me){return m(me.length===1?function(De,et){return s(me(De),et)}:me)},v.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},v.permute=function(me,De){for(var et=De.length,dt=new Array(et);et--;)dt[et]=me[De[et]];return dt},v.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;v.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=x(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,wa=_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(wa,pa){Gr.push({key:wa,values:tr(pa,_r)})}),Xr?Gr.sort(function(wa,pa){return Xr(wa.key,pa.key)}):Gr}return me.map=function(zt,_r){return Tt(_r,zt,0)},me.entries=function(zt){return tr(Tt(v.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},v.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 W(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=v.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=v.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=Pe(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=Bt.get(me);tr&&(me=tr,Tt=Ar);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([^.]+)"+v.requote(me)+"$"),wa;for(var pa in this)if(wa=pa.match(Xr)){var Ja=this[pa];this.removeEventListener(wa[1],Ja,Ja.$),delete this[pa]}}return yt?De?_r:zt:De?U:Gr}var Bt=v.map({mouseenter:"mouseover",mouseleave:"mouseout"});M&&Bt.forEach(function(me){"on"+me in M&&Bt.remove(me)});function Vt(me,De){return function(et){var dt=v.event;v.event=et,De[0]=this.__data__;try{me.apply(this,De)}finally{v.event=dt}}}function Ar(me,De){var et=Vt(me,De);return function(dt){var yt=this,Tt=dt.relatedTarget;(!Tt||Tt!==yt&&!(Tt.compareDocumentPosition(yt)&8))&&et.call(yt,dt)}}var vr,qr=0;function kr(me){var De=".dragsuppress-"+ ++qr,et="click"+De,dt=v.select(t(me)).on("touchmove"+De,$).on("dragstart"+De,$).on("selectstart"+De,$);if(vr==null&&(vr="onselectstart"in me?!1:O(me.style,"userSelect")),vr){var yt=e(me).style,Tt=yt[vr];yt[vr]="none"}return function(tr){if(dt.on(De,null),vr&&(yt[vr]=Tt),tr){var zt=function(){dt.on(et,null)};dt.on(et,function(){$(),zt()},!0),setTimeout(zt,0)}}}v.mouse=function(me){return _t(me,ue())};var Ur=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(Ur<0){var yt=t(me);if(yt.scrollX||yt.scrollY){et=v.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var Tt=et[0][0].getScreenCTM();Ur=!(Tt.f||Tt.e),et.remove()}}return Ur?(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]}v.touch=function(me,De,et){if(arguments.length<3&&(et=De,De=ue().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 cr(me){return me>1?st:me<-1?-st:Math.asin(me)}function or(me){return((me=Math.exp(me))-1/me)/2}function nr(me){return((me=Math.exp(me))+1/me)/2}function Pr(me){return((me=Math.exp(2*me))-1)/(me+1)}function _a(me){return(me=Math.sin(me/2))*me}var Fa=Math.SQRT2,Ra=2,qa=4;v.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,wa,pa;if(Xr0&&(mn=mn.transition().duration(tr)),mn.call(oi.event)}function Jn(){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 $o(mn){Jn(),mn({type:"zoom",scale:me.k,translate:[me.x,me.y]})}function no(mn){--zt||(mn({type:"zoomend"}),et=null)}function Xo(){var mn=this,po=ti.of(mn,arguments),fs=0,ms=v.select(t(mn)).on(Gr,Su).on(Xr,Rl),Tl=La(v.mouse(mn)),Wl=kr(mn);Bn.call(mn),ro(po);function Su(){fs=1,dn(v.mouse(mn),Tl),$o(po)}function Rl(){ms.on(Gr,null).on(Xr,null),Wl(fs),no(po)}}function cl(){var mn=this,po=ti.of(mn,arguments),fs={},ms=0,Tl,Wl=".zoom-"+v.event.changedTouches[0].identifier,Su="touchmove"+Wl,Rl="touchend"+Wl,_c=[],it=v.select(mn),Xt=kr(mn);oa(),ro(po),it.on(_r,null).on(pa,oa);function fr(){var xa=v.touches(mn);return Tl=me.k,xa.forEach(function(Ya){Ya.identifier in fs&&(fs[Ya.identifier]=La(Ya))}),xa}function oa(){var xa=v.event.target;v.select(xa).on(Su,Ta).on(Rl,ma),_c.push(xa);for(var Ya=v.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];ms=Na*Na+ea*ea}}function Ta(){var xa=v.touches(mn),Ya,bi,yi,si;Bn.call(mn);for(var gn=0,zi=xa.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))}v.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?Ia(me.l,me.a,me.b):Ia((me=Hr((me=v.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*=ot)*De,Math.sin(me)*De)}v.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=rn(yt)*Ba,dt=rn(dt)*$a,Tt=rn(Tt)*Za,new xt(cn(3.2404542*yt-1.5371385*dt-.4985314*Tt),cn(-.969266*yt+1.8760108*dt+.041556*Tt),cn(.0556434*yt-.2040259*dt+1.0572252*Tt))}function Ia(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 rn(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 cn(me){return Math.round(255*(me<=.00304?12.92*me:1.055*Math.pow(me,1/2.4)-.055))}v.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,Zt):new xt(me,De,et)}function ut(me){return new xt(me>>16,me>>8&255,me&255)}function Or(me){return ut(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 Nr(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 Yt(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 Kt(me){var De=parseFloat(me);return me.charAt(me.length-1)==="%"?Math.round(De*2.55):De}var mr=v.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});mr.forEach(function(me,De){mr.set(me,ut(De))});function Ir(me){return typeof me=="function"?me:function(){return me}}v.functor=Ir,v.xhr=va(F);function va(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=v.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,wa;if(!Xr&&la(zt)||Xr>=200&&Xr<300||Xr===304){try{wa=et.call(yt,zt)}catch(pa){Tt.error.call(yt,pa);return}Tt.load.call(yt,wa)}else Tt.error.call(yt,zt)}return zt.onprogress=function(Xr){var wa=v.event;v.event=Xr;try{Tt.progress.call(yt,zt)}finally{v.event=wa}},yt.header=function(Xr,wa){return Xr=(Xr+"").toLowerCase(),arguments.length<2?tr[Xr]:(wa==null?delete tr[Xr]:tr[Xr]=wa+"",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,wa,pa){if(arguments.length===2&&typeof wa=="function"&&(pa=wa,wa=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(wa??null),yt},yt.abort=function(){return zt.abort(),yt},v.rebind(yt,Tt,"on"),dt==null?yt:yt.get(ga(dt))}function ga(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}v.dsv=function(me,De){var et=new RegExp('["'+me+` +]`),dt=me.charCodeAt(0);function yt(Gr,Xr,wa){arguments.length<3&&(wa=Xr,Xr=null);var pa=Pa(Gr,De,Xr==null?Tt:tr(Xr),wa);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 wa;return yt.parseRows(Gr,function(pa,Ja){if(wa)return wa(pa,Ja-1);var ti=function(Sa){for(var za={},Xa=pa.length,fi=0;fi=ti)return pa;if(fi)return fi=!1,wa;var sn=Sa;if(Gr.charCodeAt(sn)===34){for(var an=sn;an++24?(isFinite(De)&&(clearTimeout(Ki),Ki=setTimeout(On,De)),ki=0):(ki=1,Mn(On))}v.timer.flush=function(){En(),ao()};function En(){for(var me=Date.now(),De=ba;De;)me>=De.t&&De.c(me-De.t)&&(De.c=null),De=De.n;return me}function ao(){for(var me,De=ba,et=1/0;De;)De.c?(De.t=0;--zt)Sa.push(yt[Gr[wa[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 kn(me,De){return me[0]-De[0]||me[1]-De[1]}v.geom.polygon=function(me){return Y(me,wo),me};var wo=v.geom.polygon.prototype=[];wo.area=function(){for(var me=-1,De=this.length,et,dt=this[De-1],yt=0;++meYe)zt=zt.L;else if(tr=De-lo(zt,et),tr>Ye){if(!zt.R){dt=zt;break}zt=zt.R}else{Tt>-Ye?(dt=zt.P,yt=zt):tr>-Ye?(dt=zt,yt=zt.N):dt=yt=zt;break}var _r=Ko(me);if(Yn.insert(dt,_r),!(!dt&&!yt)){if(dt===yt){Po(dt),yt=Ko(dt.site),Yn.insert(_r,yt),_r.edge=yt.edge=Nl(dt.site,_r.site),yn(dt),yn(yt);return}if(!yt){_r.edge=Nl(dt.site,_r.site);return}Po(dt),Po(yt);var Gr=dt.site,Xr=Gr.x,wa=Gr.y,pa=me.x-Xr,Ja=me.y-wa,ti=yt.site,Sa=ti.x-Xr,za=ti.y-wa,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+wa};Ts(yt.edge,Gr,ti,La),_r.edge=Nl(Gr,me,null,La),yt.edge=Nl(me,ti,null,La),yn(dt),yn(yt)}}function bs(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,wa=1/Tt-1/Gr,pa=Xr/Gr;return wa?(-pa+Math.sqrt(pa*pa-2*wa*(Xr*Xr/(-2*Gr)-_r+Gr/2+yt-Tt/2)))/wa+dt:(dt+zt)/2}function lo(me,De){var et=me.N;if(et)return bs(et,De);var dt=me.site;return dt.y===De?dt.x:1/0}function Zo(me){this.site=me,this.edges=[]}Zo.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(Hs),me.length};function ws(me){for(var De=me[0][0],et=me[1][0],dt=me[0][1],yt=me[1][1],Tt,tr,zt,_r,Gr=jo,Xr=Gr.length,wa,pa,Ja,ti,Sa,za;Xr--;)if(wa=Gr[Xr],!(!wa||!wa.prepare()))for(Ja=wa.edges,ti=Ja.length,pa=0;paYe||l(_r-tr)>Ye)&&(Ja.splice(pa,0,new Ls(Ks(wa.site,za,l(zt-De)Ye?{x:De,y:l(Tt-De)Ye?{x:l(tr-yt)Ye?{x:et,y:l(Tt-et)Ye?{x:l(tr-dt)=-Ae)){var pa=_r*_r+Gr*Gr,Ja=Xr*Xr+za*za,ti=(za*pa-Gr*Ja)/wa,Sa=(_r*Ja-Xr*pa)/wa,za=Sa+zt,Xa=_s.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=ss._;ni;)if(Xa.y0)){if(Sa/=Ja,Ja<0){if(Sa0){if(Sa>pa)return;Sa>wa&&(wa=Sa)}if(Sa=et-zt,!(!Ja&&Sa<0)){if(Sa/=Ja,Ja<0){if(Sa>pa)return;Sa>wa&&(wa=Sa)}else if(Ja>0){if(Sa0)){if(Sa/=ti,ti<0){if(Sa0){if(Sa>pa)return;Sa>wa&&(wa=Sa)}if(Sa=dt-_r,!(!ti&&Sa<0)){if(Sa/=ti,ti<0){if(Sa>pa)return;Sa>wa&&(wa=Sa)}else if(ti>0){if(Sa0&&(yt.a={x:zt+wa*Ja,y:_r+wa*ti}),pa<1&&(yt.b={x:zt+pa*Ja,y:_r+pa*ti}),yt}}}}}}function Ws(me){for(var De=ys,et=To(me[0][0],me[0][1],me[1][0],me[1][1]),dt=De.length,yt;dt--;)yt=De[dt],(!Ll(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>=wa&&Xa.y<=Ja?[[Xr,Ja],[pa,Ja],[pa,wa],[Xr,wa]]:[];fi.point=_r[Sa]}),Gr}function zt(_r){return _r.map(function(Gr,Xr){return{x:Math.round(dt(Gr,Xr)/Ye)*Ye,y:Math.round(yt(Gr,Xr)/Ye)*Ye,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,wa){for(var pa=Xr.site,Ja=Xr.edges.sort(Hs),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),an>La&&(La=an),Ja.push(sn),ti.push(an)}var dn=ni-Xa,In=La-fi;dn>In?La=fi+dn:ni=Xa+In;function Jn(no,Xo,cl,al,_l,mn,po,fs){if(!(isNaN(cl)||isNaN(al)))if(no.leaf){var ms=no.x,Tl=no.y;if(ms!=null)if(l(ms-cl)+l(Tl-al)<.01)ro(no,Xo,cl,al,_l,mn,po,fs);else{var Wl=no.point;no.x=no.y=no.point=null,ro(no,Wl,ms,Tl,_l,mn,po,fs),ro(no,Xo,cl,al,_l,mn,po,fs)}else no.x=cl,no.y=al,no.point=Xo}else ro(no,Xo,cl,al,_l,mn,po,fs)}function ro(no,Xo,cl,al,_l,mn,po,fs){var ms=(_l+po)*.5,Tl=(mn+fs)*.5,Wl=cl>=ms,Su=al>=Tl,Rl=Su<<1|Wl;no.leaf=!1,no=no.nodes[Rl]||(no.nodes[Rl]=uu()),Wl?_l=ms:po=ms,Su?mn=Tl:fs=Tl,Jn(no,Xo,cl,al,_l,mn,po,fs)}var $o=uu();if($o.add=function(no){Jn($o,no,+wa(no,++Sa),+pa(no,Sa),Xa,fi,ni,La)},$o.visit=function(no){Pl(no,$o,Xa,fi,ni,La)},$o.find=function(no){return ic($o,no[0],no[1],Xa,fi,ni,La)},Sa=-1,De==null){for(;++SaTt||pa>tr||Ja=sn,In=et>=an,Jn=In<<1|dn,ro=Jn+4;Jnet&&(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:vl(dt,yt)})),et=nc.lastIndex;return et=0&&!(dt=v.interpolators[et](me,De)););return dt}v.interpolators=[function(me,De){var et=typeof De;return(et==="string"?mr.has(De.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(De)?Ou:As:De instanceof wi?Ou:Array.isArray(De)?qu:et==="object"&&isNaN(De)?nl:vl)(me,De)}],v.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=us.get(dt)||F,bh(dt(et.apply(null,_.call(arguments,1))))};function bh(me){return function(De){return De<=0?0:De>=1?1:me(De)}}function Ps(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 Xc(me){return me*me}function Vu(me){return me*me*me}function ql(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 Ql(me){return 1-Math.sqrt(1-me*me)}function Jf(me,De){var et;return arguments.length<2&&(De=.45),arguments.length?et=De/We*Math.asin(1/me):(me=1,et=De/4),function(dt){return 1+me*Math.pow(2,-10*dt)*Math.sin((dt-et)*We/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}v.interpolateHcl=jc;function jc(me,De){me=v.hcl(me),De=v.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)+""}}v.interpolateHsl=Bf;function Bf(me,De){me=v.hsl(me),De=v.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 Zt(et+Tt*_r,dt+tr*_r,yt+zt*_r)+""}}v.interpolateLab=Nf;function Nf(me,De){me=v.lab(me),De=v.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)+""}}v.interpolateRound=Gu;function Gu(me,De){return De-=me,function(et){return Math.round(me+De*et)}}v.transform=function(me){var De=M.createElementNS(v.ns.prefix.svg,"g");return(v.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=Zc(De),yt=oc(De,et),Tt=Zc(eu(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:vl(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:vl(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:vl(me[0],De[0])},{i:yt-2,x:vl(me[1],De[1])})}else(De[0]!==1||De[1]!==1)&&et.push(Sc(et)+"scale("+De+")")}function Yc(me,De){var et=[],dt=[];return me=v.transform(me),De=v.transform(De),Zs(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=wn(me.tick)),me):Tt},me.start=function(){var La,sn=Ja.length,an=ti.length,dn=dt[0],In=dt[1],Jn,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(wa){var pa,Ja;me&&(pa=wa.children)&&pa.sort(me),et&&(Ja=wa.parent)&&(Ja.value+=wa.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 v.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]}v.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),wa,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]&&(wa=zt[v.bisect(Xr,za,1,ti)-1],wa.y+=Sa,wa.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=Ir(Tt),yt):et},yt.bins=function(Tt){return arguments.length?(dt=typeof Tt=="number"?function(tr){return Hu(tr,Tt)}:Ir(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[v.min(me),v.max(me)]}v.layout.pack=function(){var me=v.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],wa=dt==null?Math.sqrt:typeof dt=="function"?dt:function(){return dt};if(_r.x=_r.y=0,mc(_r,function(Ja){Ja.r=+wa(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 Jc(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 nu(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,wa,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],Vl(tr,zt,_r),Ja(_r),Jc(tr,_r),tr._pack_prev=_r,Jc(_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 wa={A:null,children:[Xr]},pa=[wa],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&&!$c(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 $c(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}v.layout.cluster=function(){var me=v.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=xr(za)):(Sa.x=Gr?Xr+=De(Sa,Gr):0,Sa.y=0,Gr=Sa)});var wa=$r(_r),pa=ka(_r),Ja=wa.x-De(wa,pa)/2,ti=pa.x+De(pa,wa)/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 xr(me){return 1+v.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}v.layout.treemap=function(){var me=v.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"||(an=pa(fi,dn))<=sn?(ni.pop(),sn=an):(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 wa(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(wa)}}function pa(Sa,za){for(var Xa=Sa.area,fi,ni=0,La=1/0,sn=-1,an=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,an=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=v.random.normal.apply(v,arguments);return function(){return Math.exp(me())}},bates:function(me){var De=v.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,jl),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 io(me,_r),tr()},zt.copy=function(){return Sn(me,De,et,dt)},tr()}function Qn(me,De){return v.rebind(me,De,"range","rangeRound","interpolate","clamp")}function io(me,De){return Pi(me,Di(eo(me,De)[2])),Pi(me,Di(eo(me,De)[2])),me}function eo(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 v.range.apply(v,eo(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 yo(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}v.scale.log=function(){return Qo(v.scale.linear().domain([0,1]),10,!0,[1,10])};function Qo(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:ks);return me.domain(zt),dt=zt.map(Tt),tr},tr.ticks=function(){var zt=Hi(dt),_r=[],Gr=zt[0],Xr=zt[1],wa=Math.floor(yt(Gr)),pa=Math.ceil(yt(Xr)),Ja=De%1?2:De;if(isFinite(pa-wa)){if(et){for(;wa0;ti--)_r.push(Tt(wa)*ti);for(wa=0;_r[wa]Xr;pa--);_r=_r.slice(wa,pa)}return _r},tr.copy=function(){return Qo(me.copy(),De,et,dt)},Qn(tr,me)}var ks={floor:function(me){return-Math.ceil(-me)},ceil:function(me){return-Math.floor(-me)}};v.scale.pow=function(){return rl(v.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(io(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)},Qn(Tt,me)}function Ns(me){return function(De){return De<0?-Math.pow(-De,me):Math.pow(De,me)}}v.scale.sqrt=function(){return v.scale.pow().exponent(.5)},v.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 v.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=Ke)return _r(Xr,ti)+(Gr?_r(Gr,1-ti):"")+"Z";var Sa,za,Xa,fi,ni=0,La=0,sn,an,dn,In,Jn,ro,$o,no,Xo=[];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=cr(Xa/Xr*Math.sin(fi))),Gr&&(ni=cr(Xa/Gr*Math.sin(fi)))),Xr){sn=Xr*Math.cos(wa+La),an=Xr*Math.sin(wa+La),dn=Xr*Math.cos(pa-La),In=Xr*Math.sin(pa-La);var cl=Math.abs(pa-wa-2*La)<=Le?0:1;if(La&&yc(sn,an,dn,In)===ti^cl){var al=(wa+pa)/2;sn=Xr*Math.cos(al),an=Xr*Math.sin(al),dn=In=null}}else sn=an=0;if(Gr){Jn=Gr*Math.cos(pa-ni),ro=Gr*Math.sin(pa-ni),$o=Gr*Math.cos(wa+ni),no=Gr*Math.sin(wa+ni);var _l=Math.abs(wa-pa+2*ni)<=Le?0:1;if(ni&&yc(Jn,ro,$o,no)===1-ti^_l){var mn=(wa+pa)/2;Jn=Gr*Math.cos(mn),ro=Gr*Math.sin(mn),$o=no=null}}else Jn=ro=0;if(Ja>Ye&&(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,wa=me[1]+Gr,pa=De[0]+_r,Ja=De[1]+Gr,ti=(Xr+pa)/2,Sa=(wa+Ja)/2,za=pa-Xr,Xa=Ja-wa,fi=za*za+Xa*Xa,ni=et-dt,La=Xr*Ja-pa*wa,sn=(Xa<0?-1:1)*Math.sqrt(Math.max(0,ni*ni*fi-La*La)),an=(La*Xa-za*sn)/fi,dn=(-La*za-Xa*sn)/fi,In=(La*Xa+za*sn)/fi,Jn=(-La*za+Xa*sn)/fi,ro=an-ti,$o=dn-Sa,no=In-ti,Xo=Jn-Sa;return ro*ro+$o*$o>no*no+Xo*Xo&&(an=In,dn=Jn),[[an-_r,dn-Gr],[an*et/ni,dn*et/ni]]}function Fo(){return!0}function Dc(me){var De=Co,et=bo,dt=Fo,yt=Yu,Tt=yt.key,tr=.7;function zt(_r){var Gr=[],Xr=[],wa=-1,pa=_r.length,Ja,ti=Ir(De),Sa=Ir(et);function za(){Gr.push("M",yt(me(Xr),tr))}for(;++wa1?me.join("L"):me+"Z"}function Oe(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 ur(me){return me.length<3?Yu(me):me[0]+wt(me,Dt(me))}v.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 "+wa}function Gr(Xr,wa,pa,Ja){return"Q 0,0 "+Ja}return Tt.radius=function(Xr){return arguments.length?(et=Ir(Xr),Tt):et},Tt.source=function(Xr){return arguments.length?(me=Ir(Xr),Tt):me},Tt.target=function(Xr){return arguments.length?(De=Ir(Xr),Tt):De},Tt.startAngle=function(Xr){return arguments.length?(dt=Ir(Xr),Tt):dt},Tt.endAngle=function(Xr){return arguments.length?(yt=Ir(Xr),Tt):yt},Tt};function ha(me){return me.radius}v.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=Ir(yt),dt):me},dt.target=function(yt){return arguments.length?(De=Ir(yt),dt):De},dt.projection=function(yt){return arguments.length?(et=yt,dt):et},dt};function Aa(me){return[me.x,me.y]}v.svg.diagonal.radial=function(){var me=v.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)]}}v.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=Ir(dt),et):me},et.size=function(dt){return arguments.length?(De=Ir(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=v.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*Kn)),et=De*Kn;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"}});v.svg.symbolTypes=on.keys();var An=Math.sqrt(3),Kn=Math.tan(30*ot);ae.transition=function(me){for(var De=ds||++Yo,et=ts(me),dt=[],yt,Tt,tr=ul||{time:Date.now(),ease:ql,delay:0,duration:250},zt=-1,_r=this.length;++zt<_r;){dt.push(yt=[]);for(var Gr=this[zt],Xr=-1,wa=Gr.length;++Xr0;)wa[--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=wn(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)}v.svg.axis=function(){var me=v.scale.linear(),De=tu,et=6,dt=6,yt=3,Tt=[10],tr=null,zt;function _r(Gr){Gr.each(function(){var Xr=v.select(this),wa=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",Ye),Xa=v.transition(Sa.exit()).style("opacity",Ye).remove(),fi=v.transition(Sa.order()).style("opacity",1),ni=Math.max(et,0)+yt,La,sn=Qi(pa),an=Xr.selectAll(".domain").data([0]),dn=(an.enter().append("path").attr("class","domain"),v.transition(an));za.append("line"),za.append("text");var In=za.select("line"),Jn=fi.select("line"),ro=Sa.select("text").text(ti),$o=za.select("text"),no=fi.select("text"),Xo=De==="top"||De==="left"?-1:1,cl,al,_l,mn;if(De==="bottom"||De==="top"?(La=vu,cl="x",_l="y",al="x2",mn="y2",ro.attr("dy",Xo<0?"0em":".71em").style("text-anchor","middle"),dn.attr("d","M"+sn[0]+","+Xo*dt+"V0H"+sn[1]+"V"+Xo*dt)):(La=wl,cl="y",_l="x",al="y2",mn="x2",ro.attr("dy",".32em").style("text-anchor",Xo<0?"end":"start"),dn.attr("d","M"+Xo*dt+","+sn[0]+"H0V"+sn[1]+"H"+Xo*dt)),In.attr(mn,Xo*et),$o.attr(_l,Xo*ni),Jn.attr(al,0).attr(mn,Xo*et),no.attr(cl,0).attr(_l,Xo*ni),pa.rangeBand){var po=pa,fs=po.rangeBand()/2;wa=pa=function(ms){return po(ms)+fs}}else wa.rangeBand?wa=pa:Xa.call(La,pa,wa);za.call(La,wa,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+"":tu,_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 tu="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 wl(me,De,et){me.attr("transform",function(dt){var yt=De(dt);return"translate(0,"+(isFinite(yt)?yt:et(dt))+")"})}v.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=v.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(an){return"resize "+an}).style("cursor",function(an){return fu[an]}).append("rect").attr("x",function(an){return/[ew]$/.test(an)?-3:null}).attr("y",function(an){return/^[ns]/.test(an)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),fi.style("display",Xr.empty()?"none":null);var ni=v.transition(za),La=v.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)),wa(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,ds?v.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 wa(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=v.select(v.event.target),Xa=me.of(Sa,arguments),fi=v.select(Sa),ni=za.datum(),La=!/^(n|s)$/.test(ni)&&De,sn=!/^(e|w)$/.test(ni)&&et,an=za.classed("extent"),dn=kr(Sa),In,Jn=v.mouse(Sa),ro,$o=v.select(t(Sa)).on("keydown.brush",cl).on("keyup.brush",al);if(v.event.changedTouches?$o.on("touchmove.brush",_l).on("touchend.brush",po):$o.on("mousemove.brush",_l).on("mouseup.brush",po),fi.interrupt().selectAll("*").interrupt(),an)Jn[0]=dt[0]-Jn[0],Jn[1]=yt[0]-Jn[1];else if(ni){var no=+/w$/.test(ni),Xo=+/^n/.test(ni);ro=[dt[1-no]-Jn[0],yt[1-Xo]-Jn[1]],Jn[0]=dt[no],Jn[1]=yt[Xo]}else v.event.altKey&&(In=Jn.slice());fi.style("pointer-events","none").selectAll(".resize").style("display",null),v.select("body").style("cursor",za.style("cursor")),Xa({type:"brushstart"}),_l();function cl(){v.event.keyCode==32&&(an||(In=null,Jn[0]-=dt[1],Jn[1]-=yt[1],an=2),$())}function al(){v.event.keyCode==32&&an==2&&(Jn[0]+=dt[1],Jn[1]+=yt[1],an=0,$())}function _l(){var fs=v.mouse(Sa),ms=!1;ro&&(fs[0]+=ro[0],fs[1]+=ro[1]),an||(v.event.altKey?(In||(In=[(dt[0]+dt[1])/2,(yt[0]+yt[1])/2]),Jn[0]=dt[+(fs[0]0))return Vt;do Vt.push(Ar=new Date(+St)),Ce(St,Bt),ne(St);while(Ar=kt)for(;ne(kt),!St(kt);)kt.setTime(kt-1)},function(kt,Bt){if(kt>=kt)if(Bt<0)for(;++Bt<=0;)for(;Ce(kt,-1),!St(kt););else for(;--Bt>=0;)for(;Ce(kt,1),!St(kt););})},Ze&&(Je.count=function(St,kt){return _.setTime(+St),S.setTime(+kt),ne(_),ne(S),Math.floor(Ze(_,S))},Je.every=function(St){return St=Math.floor(St),!isFinite(St)||!(St>0)?null:St>1?Je.filter(rt?function(kt){return rt(kt)%St===0}:function(kt){return Je.count(0,kt)%St===0}):Je}),Je}var e=M(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?M(function(Ce){Ce.setTime(Math.floor(Ce/ne)*ne)},function(Ce,Ze){Ce.setTime(+Ce+Ze*ne)},function(Ce,Ze){return(Ze-Ce)/ne}):e};var t=e.range,r=1e3,o=6e4,a=36e5,i=864e5,n=6048e5,s=M(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=M(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()}),m=f.range,c=M(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=M(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)/i},function(ne){return ne.getDate()-1}),x=l.range;function w(ne){return M(function(Ce){Ce.setDate(Ce.getDate()-(Ce.getDay()+7-ne)%7),Ce.setHours(0,0,0,0)},function(Ce,Ze){Ce.setDate(Ce.getDate()+Ze*7)},function(Ce,Ze){return(Ze-Ce-(Ze.getTimezoneOffset()-Ce.getTimezoneOffset())*o)/n})}var A=w(0),E=w(1),p=w(2),b=w(3),d=w(4),u=w(5),g=w(6),y=A.range,D=E.range,P=p.range,z=b.range,F=d.range,N=u.range,O=g.range,L=M(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=L.range,B=M(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:M(function(Ce){Ce.setFullYear(Math.floor(Ce.getFullYear()/ne)*ne),Ce.setMonth(0,1),Ce.setHours(0,0,0,0)},function(Ce,Ze){Ce.setFullYear(Ce.getFullYear()+Ze*ne)})};var W=B.range,$=M(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()}),ue=$.range,ce=M(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,Y=M(function(ne){ne.setUTCHours(0,0,0,0)},function(ne,Ce){ne.setUTCDate(ne.getUTCDate()+Ce)},function(ne,Ce){return(Ce-ne)/i},function(ne){return ne.getUTCDate()-1}),X=Y.range;function Q(ne){return M(function(Ce){Ce.setUTCDate(Ce.getUTCDate()-(Ce.getUTCDay()+7-ne)%7),Ce.setUTCHours(0,0,0,0)},function(Ce,Ze){Ce.setUTCDate(Ce.getUTCDate()+Ze*7)},function(Ce,Ze){return(Ze-Ce)/n})}var V=Q(0),le=Q(1),ae=Q(2),j=Q(3),ee=Q(4),te=Q(5),pe=Q(6),we=V.range,Se=le.range,Re=ae.range,Pe=j.range,je=ee.range,at=te.range,nt=pe.range,tt=M(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()}),Ve=tt.range,he=M(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:M(function(Ce){Ce.setUTCFullYear(Math.floor(Ce.getUTCFullYear()/ne)*ne),Ce.setUTCMonth(0,1),Ce.setUTCHours(0,0,0,0)},function(Ce,Ze){Ce.setUTCFullYear(Ce.getUTCFullYear()+Ze*ne)})};var se=he.range;v.timeDay=l,v.timeDays=x,v.timeFriday=u,v.timeFridays=N,v.timeHour=c,v.timeHours=T,v.timeInterval=M,v.timeMillisecond=e,v.timeMilliseconds=t,v.timeMinute=f,v.timeMinutes=m,v.timeMonday=E,v.timeMondays=D,v.timeMonth=L,v.timeMonths=U,v.timeSaturday=g,v.timeSaturdays=O,v.timeSecond=s,v.timeSeconds=h,v.timeSunday=A,v.timeSundays=y,v.timeThursday=d,v.timeThursdays=F,v.timeTuesday=p,v.timeTuesdays=P,v.timeWednesday=b,v.timeWednesdays=z,v.timeWeek=A,v.timeWeeks=y,v.timeYear=B,v.timeYears=W,v.utcDay=Y,v.utcDays=X,v.utcFriday=te,v.utcFridays=at,v.utcHour=ce,v.utcHours=de,v.utcMillisecond=e,v.utcMilliseconds=t,v.utcMinute=$,v.utcMinutes=ue,v.utcMonday=le,v.utcMondays=Se,v.utcMonth=tt,v.utcMonths=Ve,v.utcSaturday=pe,v.utcSaturdays=nt,v.utcSecond=s,v.utcSeconds=h,v.utcSunday=V,v.utcSundays=we,v.utcThursday=ee,v.utcThursdays=je,v.utcTuesday=ae,v.utcTuesdays=Re,v.utcWednesday=j,v.utcWednesdays=Pe,v.utcWeek=V,v.utcWeeks=we,v.utcYear=he,v.utcYears=se,Object.defineProperty(v,"__esModule",{value:!0})})}}),Zv=He({"node_modules/d3-time-format/dist/d3-time-format.js"(Z,q){(function(v,_){typeof Z=="object"&&typeof q<"u"?_(Z,dd()):(v=v||self,_(v.d3=v.d3||{},v.d3))})(Z,function(v,_){"use strict";function S(Fe){if(0<=Fe.y&&Fe.y<100){var Ye=new Date(-1,Fe.m,Fe.d,Fe.H,Fe.M,Fe.S,Fe.L);return Ye.setFullYear(Fe.y),Ye}return new Date(Fe.y,Fe.m,Fe.d,Fe.H,Fe.M,Fe.S,Fe.L)}function M(Fe){if(0<=Fe.y&&Fe.y<100){var Ye=new Date(Date.UTC(-1,Fe.m,Fe.d,Fe.H,Fe.M,Fe.S,Fe.L));return Ye.setUTCFullYear(Fe.y),Ye}return new Date(Date.UTC(Fe.y,Fe.m,Fe.d,Fe.H,Fe.M,Fe.S,Fe.L))}function e(Fe,Ye,Ae){return{y:Fe,m:Ye,d:Ae,H:0,M:0,S:0,L:0}}function t(Fe){var Ye=Fe.dateTime,Ae=Fe.date,Le=Fe.time,We=Fe.periods,Ke=Fe.days,st=Fe.shortDays,ot=Fe.months,Ut=Fe.shortMonths,Ct=h(We),Pt=f(We),jt=h(Ke),cr=f(Ke),or=h(st),nr=f(st),Pr=h(ot),_a=f(ot),Fa=h(Ut),Ra=f(Ut),qa={a:$a,A:Za,b:ri,B:pi,c:null,d:L,e:L,f:ue,H:U,I:B,j:W,L:$,m:ce,M:de,p:Ia,q:rn,Q:kt,s:Bt,S:Y,u:X,U:Q,V,w:le,W:ae,x:null,X:null,y:j,Y:ee,Z:te,"%":St},Wa={a:tn,A:cn,b:xt,B:ut,c:null,d:pe,e:pe,f:je,H:we,I:Se,j:Re,L:Pe,m:at,M:nt,p:Or,q:Cr,Q:kt,s:Bt,S:tt,u:Ve,U:he,V:se,w:ne,W:Ce,x:null,X:null,y:Ze,Y:rt,Z:Je,"%":St},Ca={a:Zt,A:Jt,b:Fr,B:ta,c:ra,d,e:d,f:z,H:g,I:g,j:u,L:P,m:b,M:y,p:Rt,q:p,Q:N,s:O,S:D,u:c,U:T,V:l,w:m,W:x,x:ca,X:Ba,y:A,Y:w,Z:E,"%":F};qa.x=hi(Ae,qa),qa.X=hi(Le,qa),qa.c=hi(Ye,qa),Wa.x=hi(Ae,Wa),Wa.X=hi(Le,Wa),Wa.c=hi(Ye,Wa);function hi(wr,Rr){return function(Nr){var Hr=[],gt=-1,Kt=0,mr=wr.length,Ir,va,Pa;for(Nr instanceof Date||(Nr=new Date(+Nr));++gt53)return null;"w"in Hr||(Hr.w=1),"Z"in Hr?(Kt=M(e(Hr.y,0,1)),mr=Kt.getUTCDay(),Kt=mr>4||mr===0?_.utcMonday.ceil(Kt):_.utcMonday(Kt),Kt=_.utcDay.offset(Kt,(Hr.V-1)*7),Hr.y=Kt.getUTCFullYear(),Hr.m=Kt.getUTCMonth(),Hr.d=Kt.getUTCDate()+(Hr.w+6)%7):(Kt=S(e(Hr.y,0,1)),mr=Kt.getDay(),Kt=mr>4||mr===0?_.timeMonday.ceil(Kt):_.timeMonday(Kt),Kt=_.timeDay.offset(Kt,(Hr.V-1)*7),Hr.y=Kt.getFullYear(),Hr.m=Kt.getMonth(),Hr.d=Kt.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),mr="Z"in Hr?M(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-(mr+5)%7:Hr.w+Hr.U*7-(mr+6)%7);return"Z"in Hr?(Hr.H+=Hr.Z/100|0,Hr.M+=Hr.Z%100,M(Hr)):S(Hr)}}function Yt(wr,Rr,Nr,Hr){for(var gt=0,Kt=Rr.length,mr=Nr.length,Ir,va;gt=mr)return-1;if(Ir=Rr.charCodeAt(gt++),Ir===37){if(Ir=Rr.charAt(gt++),va=Ca[Ir in r?Rr.charAt(gt++):Ir],!va||(Hr=va(wr,Nr,Hr))<0)return-1}else if(Ir!=Nr.charCodeAt(Hr++))return-1}return Hr}function Rt(wr,Rr,Nr){var Hr=Ct.exec(Rr.slice(Nr));return Hr?(wr.p=Pt[Hr[0].toLowerCase()],Nr+Hr[0].length):-1}function Zt(wr,Rr,Nr){var Hr=or.exec(Rr.slice(Nr));return Hr?(wr.w=nr[Hr[0].toLowerCase()],Nr+Hr[0].length):-1}function Jt(wr,Rr,Nr){var Hr=jt.exec(Rr.slice(Nr));return Hr?(wr.w=cr[Hr[0].toLowerCase()],Nr+Hr[0].length):-1}function Fr(wr,Rr,Nr){var Hr=Fa.exec(Rr.slice(Nr));return Hr?(wr.m=Ra[Hr[0].toLowerCase()],Nr+Hr[0].length):-1}function ta(wr,Rr,Nr){var Hr=Pr.exec(Rr.slice(Nr));return Hr?(wr.m=_a[Hr[0].toLowerCase()],Nr+Hr[0].length):-1}function ra(wr,Rr,Nr){return Yt(wr,Ye,Rr,Nr)}function ca(wr,Rr,Nr){return Yt(wr,Ae,Rr,Nr)}function Ba(wr,Rr,Nr){return Yt(wr,Le,Rr,Nr)}function $a(wr){return st[wr.getDay()]}function Za(wr){return Ke[wr.getDay()]}function ri(wr){return Ut[wr.getMonth()]}function pi(wr){return ot[wr.getMonth()]}function Ia(wr){return We[+(wr.getHours()>=12)]}function rn(wr){return 1+~~(wr.getMonth()/3)}function tn(wr){return st[wr.getUTCDay()]}function cn(wr){return Ke[wr.getUTCDay()]}function xt(wr){return Ut[wr.getUTCMonth()]}function ut(wr){return ot[wr.getUTCMonth()]}function Or(wr){return We[+(wr.getUTCHours()>=12)]}function Cr(wr){return 1+~~(wr.getUTCMonth()/3)}return{format:function(wr){var Rr=hi(wr+="",qa);return Rr.toString=function(){return wr},Rr},parse:function(wr){var Rr=wi(wr+="",!1);return Rr.toString=function(){return wr},Rr},utcFormat:function(wr){var Rr=hi(wr+="",Wa);return Rr.toString=function(){return wr},Rr},utcParse:function(wr){var Rr=wi(wr+="",!0);return Rr.toString=function(){return wr},Rr}}}var r={"-":"",_:" ",0:"0"},o=/^\s*\d+/,a=/^%/,i=/[\\^$*+?|[\]().{}]/g;function n(Fe,Ye,Ae){var Le=Fe<0?"-":"",We=(Le?-Fe:Fe)+"",Ke=We.length;return Le+(Ke68?1900:2e3),Ae+Le[0].length):-1}function E(Fe,Ye,Ae){var Le=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(Ye.slice(Ae,Ae+6));return Le?(Fe.Z=Le[1]?0:-(Le[2]+(Le[3]||"00")),Ae+Le[0].length):-1}function p(Fe,Ye,Ae){var Le=o.exec(Ye.slice(Ae,Ae+1));return Le?(Fe.q=Le[0]*3-3,Ae+Le[0].length):-1}function b(Fe,Ye,Ae){var Le=o.exec(Ye.slice(Ae,Ae+2));return Le?(Fe.m=Le[0]-1,Ae+Le[0].length):-1}function d(Fe,Ye,Ae){var Le=o.exec(Ye.slice(Ae,Ae+2));return Le?(Fe.d=+Le[0],Ae+Le[0].length):-1}function u(Fe,Ye,Ae){var Le=o.exec(Ye.slice(Ae,Ae+3));return Le?(Fe.m=0,Fe.d=+Le[0],Ae+Le[0].length):-1}function g(Fe,Ye,Ae){var Le=o.exec(Ye.slice(Ae,Ae+2));return Le?(Fe.H=+Le[0],Ae+Le[0].length):-1}function y(Fe,Ye,Ae){var Le=o.exec(Ye.slice(Ae,Ae+2));return Le?(Fe.M=+Le[0],Ae+Le[0].length):-1}function D(Fe,Ye,Ae){var Le=o.exec(Ye.slice(Ae,Ae+2));return Le?(Fe.S=+Le[0],Ae+Le[0].length):-1}function P(Fe,Ye,Ae){var Le=o.exec(Ye.slice(Ae,Ae+3));return Le?(Fe.L=+Le[0],Ae+Le[0].length):-1}function z(Fe,Ye,Ae){var Le=o.exec(Ye.slice(Ae,Ae+6));return Le?(Fe.L=Math.floor(Le[0]/1e3),Ae+Le[0].length):-1}function F(Fe,Ye,Ae){var Le=a.exec(Ye.slice(Ae,Ae+1));return Le?Ae+Le[0].length:-1}function N(Fe,Ye,Ae){var Le=o.exec(Ye.slice(Ae));return Le?(Fe.Q=+Le[0],Ae+Le[0].length):-1}function O(Fe,Ye,Ae){var Le=o.exec(Ye.slice(Ae));return Le?(Fe.s=+Le[0],Ae+Le[0].length):-1}function L(Fe,Ye){return n(Fe.getDate(),Ye,2)}function U(Fe,Ye){return n(Fe.getHours(),Ye,2)}function B(Fe,Ye){return n(Fe.getHours()%12||12,Ye,2)}function W(Fe,Ye){return n(1+_.timeDay.count(_.timeYear(Fe),Fe),Ye,3)}function $(Fe,Ye){return n(Fe.getMilliseconds(),Ye,3)}function ue(Fe,Ye){return $(Fe,Ye)+"000"}function ce(Fe,Ye){return n(Fe.getMonth()+1,Ye,2)}function de(Fe,Ye){return n(Fe.getMinutes(),Ye,2)}function Y(Fe,Ye){return n(Fe.getSeconds(),Ye,2)}function X(Fe){var Ye=Fe.getDay();return Ye===0?7:Ye}function Q(Fe,Ye){return n(_.timeSunday.count(_.timeYear(Fe)-1,Fe),Ye,2)}function V(Fe,Ye){var Ae=Fe.getDay();return Fe=Ae>=4||Ae===0?_.timeThursday(Fe):_.timeThursday.ceil(Fe),n(_.timeThursday.count(_.timeYear(Fe),Fe)+(_.timeYear(Fe).getDay()===4),Ye,2)}function le(Fe){return Fe.getDay()}function ae(Fe,Ye){return n(_.timeMonday.count(_.timeYear(Fe)-1,Fe),Ye,2)}function j(Fe,Ye){return n(Fe.getFullYear()%100,Ye,2)}function ee(Fe,Ye){return n(Fe.getFullYear()%1e4,Ye,4)}function te(Fe){var Ye=Fe.getTimezoneOffset();return(Ye>0?"-":(Ye*=-1,"+"))+n(Ye/60|0,"0",2)+n(Ye%60,"0",2)}function pe(Fe,Ye){return n(Fe.getUTCDate(),Ye,2)}function we(Fe,Ye){return n(Fe.getUTCHours(),Ye,2)}function Se(Fe,Ye){return n(Fe.getUTCHours()%12||12,Ye,2)}function Re(Fe,Ye){return n(1+_.utcDay.count(_.utcYear(Fe),Fe),Ye,3)}function Pe(Fe,Ye){return n(Fe.getUTCMilliseconds(),Ye,3)}function je(Fe,Ye){return Pe(Fe,Ye)+"000"}function at(Fe,Ye){return n(Fe.getUTCMonth()+1,Ye,2)}function nt(Fe,Ye){return n(Fe.getUTCMinutes(),Ye,2)}function tt(Fe,Ye){return n(Fe.getUTCSeconds(),Ye,2)}function Ve(Fe){var Ye=Fe.getUTCDay();return Ye===0?7:Ye}function he(Fe,Ye){return n(_.utcSunday.count(_.utcYear(Fe)-1,Fe),Ye,2)}function se(Fe,Ye){var Ae=Fe.getUTCDay();return Fe=Ae>=4||Ae===0?_.utcThursday(Fe):_.utcThursday.ceil(Fe),n(_.utcThursday.count(_.utcYear(Fe),Fe)+(_.utcYear(Fe).getUTCDay()===4),Ye,2)}function ne(Fe){return Fe.getUTCDay()}function Ce(Fe,Ye){return n(_.utcMonday.count(_.utcYear(Fe)-1,Fe),Ye,2)}function Ze(Fe,Ye){return n(Fe.getUTCFullYear()%100,Ye,2)}function rt(Fe,Ye){return n(Fe.getUTCFullYear()%1e4,Ye,4)}function Je(){return"+0000"}function St(){return"%"}function kt(Fe){return+Fe}function Bt(Fe){return Math.floor(+Fe/1e3)}var Vt;Ar({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 Ar(Fe){return Vt=t(Fe),v.timeFormat=Vt.format,v.timeParse=Vt.parse,v.utcFormat=Vt.utcFormat,v.utcParse=Vt.utcParse,Vt}var vr="%Y-%m-%dT%H:%M:%S.%LZ";function qr(Fe){return Fe.toISOString()}var kr=Date.prototype.toISOString?qr:v.utcFormat(vr);function Ur(Fe){var Ye=new Date(Fe);return isNaN(Ye)?null:Ye}var _t=+new Date("2000-01-01T00:00:00.000Z")?Ur:v.utcParse(vr);v.isoFormat=kr,v.isoParse=_t,v.timeFormatDefaultLocale=Ar,v.timeFormatLocale=t,Object.defineProperty(v,"__esModule",{value:!0})})}}),YA=He({"node_modules/d3-format/dist/d3-format.js"(Z,q){(function(v,_){typeof Z=="object"&&typeof q<"u"?_(Z):(v=typeof globalThis<"u"?globalThis:v||self,_(v.d3=v.d3||{}))})(Z,function(v){"use strict";function _(b){return Math.abs(b=Math.round(b))>=1e21?b.toLocaleString("en").replace(/,/g,""):b.toString(10)}function S(b,d){if((u=(b=d?b.toExponential(d-1):b.toExponential()).indexOf("e"))<0)return null;var u,g=b.slice(0,u);return[g.length>1?g[0]+g.slice(2):g,+b.slice(u+1)]}function M(b){return b=S(Math.abs(b)),b?b[1]:NaN}function e(b,d){return function(u,g){for(var y=u.length,D=[],P=0,z=b[0],F=0;y>0&&z>0&&(F+z+1>g&&(z=Math.max(1,g-F)),D.push(u.substring(y-=z,y+z)),!((F+=z+1)>g));)z=b[P=(P+1)%b.length];return D.reverse().join(d)}}function t(b){return function(d){return d.replace(/[0-9]/g,function(u){return b[+u]})}}var r=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function o(b){if(!(d=r.exec(b)))throw new Error("invalid format: "+b);var d;return new a({fill:d[1],align:d[2],sign:d[3],symbol:d[4],zero:d[5],width:d[6],comma:d[7],precision:d[8]&&d[8].slice(1),trim:d[9],type:d[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 i(b){e:for(var d=b.length,u=1,g=-1,y;u0&&(g=0);break}return g>0?b.slice(0,g)+b.slice(y+1):b}var n;function s(b,d){var u=S(b,d);if(!u)return b+"";var g=u[0],y=u[1],D=y-(n=Math.max(-8,Math.min(8,Math.floor(y/3)))*3)+1,P=g.length;return D===P?g:D>P?g+new Array(D-P+1).join("0"):D>0?g.slice(0,D)+"."+g.slice(D):"0."+new Array(1-D).join("0")+S(b,Math.max(0,d+D-1))[0]}function h(b,d){var u=S(b,d);if(!u)return b+"";var g=u[0],y=u[1];return y<0?"0."+new Array(-y).join("0")+g:g.length>y+1?g.slice(0,y+1)+"."+g.slice(y+1):g+new Array(y-g.length+2).join("0")}var f={"%":function(b,d){return(b*100).toFixed(d)},b:function(b){return Math.round(b).toString(2)},c:function(b){return b+""},d:_,e:function(b,d){return b.toExponential(d)},f:function(b,d){return b.toFixed(d)},g:function(b,d){return b.toPrecision(d)},o:function(b){return Math.round(b).toString(8)},p:function(b,d){return h(b*100,d)},r:h,s,X:function(b){return Math.round(b).toString(16).toUpperCase()},x:function(b){return Math.round(b).toString(16)}};function m(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 d=b.grouping===void 0||b.thousands===void 0?m:e(c.call(b.grouping,Number),b.thousands+""),u=b.currency===void 0?"":b.currency[0]+"",g=b.currency===void 0?"":b.currency[1]+"",y=b.decimal===void 0?".":b.decimal+"",D=b.numerals===void 0?m:t(c.call(b.numerals,String)),P=b.percent===void 0?"%":b.percent+"",z=b.minus===void 0?"-":b.minus+"",F=b.nan===void 0?"NaN":b.nan+"";function N(L){L=o(L);var U=L.fill,B=L.align,W=L.sign,$=L.symbol,ue=L.zero,ce=L.width,de=L.comma,Y=L.precision,X=L.trim,Q=L.type;Q==="n"?(de=!0,Q="g"):f[Q]||(Y===void 0&&(Y=12),X=!0,Q="g"),(ue||U==="0"&&B==="=")&&(ue=!0,U="0",B="=");var V=$==="$"?u:$==="#"&&/[boxX]/.test(Q)?"0"+Q.toLowerCase():"",le=$==="$"?g:/[%p]/.test(Q)?P:"",ae=f[Q],j=/[defgprs%]/.test(Q);Y=Y===void 0?6:/[gprs]/.test(Q)?Math.max(1,Math.min(21,Y)):Math.max(0,Math.min(20,Y));function ee(te){var pe=V,we=le,Se,Re,Pe;if(Q==="c")we=ae(te)+we,te="";else{te=+te;var je=te<0||1/te<0;if(te=isNaN(te)?F:ae(Math.abs(te),Y),X&&(te=i(te)),je&&+te==0&&W!=="+"&&(je=!1),pe=(je?W==="("?W:z:W==="-"||W==="("?"":W)+pe,we=(Q==="s"?T[8+n/3]:"")+we+(je&&W==="("?")":""),j){for(Se=-1,Re=te.length;++SePe||Pe>57){we=(Pe===46?y+te.slice(Se+1):te.slice(Se))+we,te=te.slice(0,Se);break}}}de&&!ue&&(te=d(te,1/0));var at=pe.length+te.length+we.length,nt=at>1)+pe+te+we+nt.slice(at);break;default:te=nt+pe+te+we;break}return D(te)}return ee.toString=function(){return L+""},ee}function O(L,U){var B=N((L=o(L),L.type="f",L)),W=Math.max(-8,Math.min(8,Math.floor(M(U)/3)))*3,$=Math.pow(10,-W),ue=T[8+W/3];return function(ce){return B($*ce)+ue}}return{format:N,formatPrefix:O}}var x;w({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function w(b){return x=l(b),v.format=x.format,v.formatPrefix=x.formatPrefix,x}function A(b){return Math.max(0,-M(Math.abs(b)))}function E(b,d){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(M(d)/3)))*3-M(Math.abs(b)))}function p(b,d){return b=Math.abs(b),d=Math.abs(d)-b,Math.max(0,M(d)-M(b))+1}v.FormatSpecifier=a,v.formatDefaultLocale=w,v.formatLocale=l,v.formatSpecifier=o,v.precisionFixed=A,v.precisionPrefix=E,v.precisionRound=p,Object.defineProperty(v,"__esModule",{value:!0})})}}),l7=He({"node_modules/is-string-blank/index.js"(Z,q){"use strict";q.exports=function(v){for(var _=v.length,S,M=0;M<_;M++)if(S=v.charCodeAt(M),(S<9||S>13)&&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}}}),ns=He({"node_modules/fast-isnumeric/index.js"(Z,q){"use strict";var v=l7();q.exports=function(_){var S=typeof _;if(S==="string"){var M=_;if(_=+_,_===0&&v(M))return!1}else if(S!=="number")return!1;return _-_<1}}}),Gs=He({"src/constants/numerical.js"(Z,q){"use strict";q.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,q){(function(v,_){typeof Z=="object"&&typeof q<"u"?_(Z):(v=typeof globalThis<"u"?globalThis:v||self,_(v["base64-arraybuffer"]={}))})(Z,function(v){"use strict";for(var _="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",S=typeof Uint8Array>"u"?[]:new Uint8Array(256),M=0;M<_.length;M++)S[_.charCodeAt(M)]=M;var e=function(r){var o=new Uint8Array(r),a,i=o.length,n="";for(a=0;a>2],n+=_[(o[a]&3)<<4|o[a+1]>>4],n+=_[(o[a+1]&15)<<2|o[a+2]>>6],n+=_[o[a+2]&63];return i%3===2?n=n.substring(0,n.length-1)+"=":i%3===1&&(n=n.substring(0,n.length-2)+"=="),n},t=function(r){var o=r.length*.75,a=r.length,i,n=0,s,h,f,m;r[r.length-1]==="="&&(o--,r[r.length-2]==="="&&o--);var c=new ArrayBuffer(o),T=new Uint8Array(c);for(i=0;i>4,T[n++]=(h&15)<<4|f>>2,T[n++]=(f&3)<<6|m&63;return c};v.decode=t,v.encode=e,Object.defineProperty(v,"__esModule",{value:!0})})}}),Yv=He({"src/lib/is_plain_object.js"(Z,q){"use strict";q.exports=function(_){return window&&window.process&&window.process.versions?Object.prototype.toString.call(_)==="[object Object]":Object.prototype.toString.call(_)==="[object Object]"&&Object.getPrototypeOf(_).hasOwnProperty("hasOwnProperty")}}}),hp=He({"src/lib/array.js"(Z){"use strict";var q=KA().decode,v=Yv(),_=Array.isArray,S=ArrayBuffer,M=DataView;function e(s){return S.isView(s)&&!(s instanceof M)}Z.isTypedArray=e;function t(s){return _(s)||e(s)}Z.isArrayOrTypedArray=t;function r(s){return!t(s[0])}Z.isArray1D=r,Z.ensureArray=function(s,h){return _(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=i(s),m=f.dtype,c=o[m];if(!c)throw new Error('Error in dtype: "'+m+'"');var T=c.BYTES_PER_ELEMENT,l=f.bdata;a(l)||(l=q(l));var x=f.shape===void 0?[l.byteLength/T]:(""+f.shape).split(",");x.reverse();var w=x.length,A,E,p=+x[0],b=T*p,d=0;if(w===1)h=new c(l);else if(w===2)for(A=+x[1],E=0;E2)return c[A]=c[A]|e,x.set(w,null);if(l){for(h=A;h0)return Math.log(S)/Math.LN10;var e=Math.log(Math.min(M[0],M[1]))/Math.LN10;return v(e)||(e=Math.log(Math.max(M[0],M[1]))/Math.LN10-6),e}}}),f7=He({"src/lib/relink_private.js"(Z,q){"use strict";var v=hp().isArrayOrTypedArray,_=Yv();q.exports=function S(M,e){for(var t in e){var r=e[t],o=M[t];if(o!==r)if(t.charAt(0)==="_"||typeof r=="function"){if(t in M)continue;M[t]=r}else if(v(r)&&v(o)&&_(r[0])){if(t==="customdata"||t==="ids")continue;for(var a=Math.min(r.length,o.length),i=0;iM/2?S-Math.round(S/M)*M:S}q.exports={mod:v,modHalf:_}}}),Ch=He({"node_modules/tinycolor2/tinycolor.js"(Z,q){(function(v){var _=/^\s+/,S=/\s+$/,M=0,e=v.round,t=v.min,r=v.max,o=v.random;function a(j,ee){if(j=j||"",ee=ee||{},j instanceof a)return j;if(!(this instanceof a))return new a(j,ee);var te=i(j);this._originalInput=j,this._r=te.r,this._g=te.g,this._b=te.b,this._a=te.a,this._roundA=e(100*this._a)/100,this._format=ee.format||te.format,this._gradientType=ee.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=te.ok,this._tc_id=M++}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(),ee,te,pe,we,Se,Re;return ee=j.r/255,te=j.g/255,pe=j.b/255,ee<=.03928?we=ee/12.92:we=v.pow((ee+.055)/1.055,2.4),te<=.03928?Se=te/12.92:Se=v.pow((te+.055)/1.055,2.4),pe<=.03928?Re=pe/12.92:Re=v.pow((pe+.055)/1.055,2.4),.2126*we+.7152*Se+.0722*Re},setAlpha:function(j){return this._a=L(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),ee=e(j.h*360),te=e(j.s*100),pe=e(j.v*100);return this._a==1?"hsv("+ee+", "+te+"%, "+pe+"%)":"hsva("+ee+", "+te+"%, "+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),ee=e(j.h*360),te=e(j.s*100),pe=e(j.l*100);return this._a==1?"hsl("+ee+", "+te+"%, "+pe+"%)":"hsla("+ee+", "+te+"%, "+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 ee="#"+l(this._r,this._g,this._b,this._a),te=ee,pe=this._gradientType?"GradientType = 1, ":"";if(j){var we=a(j);te="#"+l(we._r,we._g,we._b,we._a)}return"progid:DXImageTransform.Microsoft.gradient("+pe+"startColorstr="+ee+",endColorstr="+te+")"},toString:function(j){var ee=!!j;j=j||this._format;var te=!1,pe=this._a<1&&this._a>=0,we=!ee&&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"&&(te=this.toRgbString()),j==="prgb"&&(te=this.toPercentageRgbString()),(j==="hex"||j==="hex6")&&(te=this.toHexString()),j==="hex3"&&(te=this.toHexString(!0)),j==="hex4"&&(te=this.toHex8String(!0)),j==="hex8"&&(te=this.toHex8String()),j==="name"&&(te=this.toName()),j==="hsl"&&(te=this.toHslString()),j==="hsv"&&(te=this.toHsvString()),te||this.toHexString())},clone:function(){return a(this.toString())},_applyModification:function(j,ee){var te=j.apply(null,[this].concat([].slice.call(ee)));return this._r=te._r,this._g=te._g,this._b=te._b,this.setAlpha(te._a),this},lighten:function(){return this._applyModification(E,arguments)},brighten:function(){return this._applyModification(p,arguments)},darken:function(){return this._applyModification(b,arguments)},desaturate:function(){return this._applyModification(x,arguments)},saturate:function(){return this._applyModification(w,arguments)},greyscale:function(){return this._applyModification(A,arguments)},spin:function(){return this._applyModification(d,arguments)},_applyCombination:function(j,ee){return j.apply(null,[this].concat([].slice.call(ee)))},analogous:function(){return this._applyCombination(P,arguments)},complement:function(){return this._applyCombination(u,arguments)},monochromatic:function(){return this._applyCombination(z,arguments)},splitcomplement:function(){return this._applyCombination(D,arguments)},triad:function(){return this._applyCombination(g,arguments)},tetrad:function(){return this._applyCombination(y,arguments)}},a.fromRatio=function(j,ee){if(typeof j=="object"){var te={};for(var pe in j)j.hasOwnProperty(pe)&&(pe==="a"?te[pe]=j[pe]:te[pe]=de(j[pe]));j=te}return a(j,ee)};function i(j){var ee={r:0,g:0,b:0},te=1,pe=null,we=null,Se=null,Re=!1,Pe=!1;return typeof j=="string"&&(j=le(j)),typeof j=="object"&&(V(j.r)&&V(j.g)&&V(j.b)?(ee=n(j.r,j.g,j.b),Re=!0,Pe=String(j.r).substr(-1)==="%"?"prgb":"rgb"):V(j.h)&&V(j.s)&&V(j.v)?(pe=de(j.s),we=de(j.v),ee=m(j.h,pe,we),Re=!0,Pe="hsv"):V(j.h)&&V(j.s)&&V(j.l)&&(pe=de(j.s),Se=de(j.l),ee=h(j.h,pe,Se),Re=!0,Pe="hsl"),j.hasOwnProperty("a")&&(te=j.a)),te=L(te),{ok:Re,format:j.format||Pe,r:t(255,r(ee.r,0)),g:t(255,r(ee.g,0)),b:t(255,r(ee.b,0)),a:te}}function n(j,ee,te){return{r:U(j,255)*255,g:U(ee,255)*255,b:U(te,255)*255}}function s(j,ee,te){j=U(j,255),ee=U(ee,255),te=U(te,255);var pe=r(j,ee,te),we=t(j,ee,te),Se,Re,Pe=(pe+we)/2;if(pe==we)Se=Re=0;else{var je=pe-we;switch(Re=Pe>.5?je/(2-pe-we):je/(pe+we),pe){case j:Se=(ee-te)/je+(ee1&&(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(ee===0)pe=we=Se=te;else{var Pe=te<.5?te*(1+ee):te+ee-te*ee,je=2*te-Pe;pe=Re(je,Pe,j+1/3),we=Re(je,Pe,j),Se=Re(je,Pe,j-1/3)}return{r:pe*255,g:we*255,b:Se*255}}function f(j,ee,te){j=U(j,255),ee=U(ee,255),te=U(te,255);var pe=r(j,ee,te),we=t(j,ee,te),Se,Re,Pe=pe,je=pe-we;if(Re=pe===0?0:je/pe,pe==we)Se=0;else{switch(pe){case j:Se=(ee-te)/je+(ee>1)+720)%360;--ee;)pe.h=(pe.h+we)%360,Se.push(a(pe));return Se}function z(j,ee){ee=ee||6;for(var te=a(j).toHsv(),pe=te.h,we=te.s,Se=te.v,Re=[],Pe=1/ee;ee--;)Re.push(a({h:pe,s:we,v:Se})),Se=(Se+Pe)%1;return Re}a.mix=function(j,ee,te){te=te===0?0:te||50;var pe=a(j).toRgb(),we=a(ee).toRgb(),Se=te/100,Re={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(Re)},a.readability=function(j,ee){var te=a(j),pe=a(ee);return(v.max(te.getLuminance(),pe.getLuminance())+.05)/(v.min(te.getLuminance(),pe.getLuminance())+.05)},a.isReadable=function(j,ee,te){var pe=a.readability(j,ee),we,Se;switch(Se=!1,we=ae(te),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,ee,te){var pe=null,we=0,Se,Re,Pe,je;te=te||{},Re=te.includeFallbackColors,Pe=te.level,je=te.size;for(var at=0;atwe&&(we=Se,pe=a(ee[at]));return a.isReadable(j,pe,{level:Pe,size:je})||!Re?pe:(te.includeFallbackColors=!1,a.mostReadable(j,["#fff","#000"],te))};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 ee={};for(var te in j)j.hasOwnProperty(te)&&(ee[j[te]]=te);return ee}function L(j){return j=parseFloat(j),(isNaN(j)||j<0||j>1)&&(j=1),j}function U(j,ee){$(j)&&(j="100%");var te=ue(j);return j=t(ee,r(0,parseFloat(j))),te&&(j=parseInt(j*ee,10)/100),v.abs(j-ee)<1e-6?1:j%ee/parseFloat(ee)}function B(j){return t(1,r(0,j))}function W(j){return parseInt(j,16)}function $(j){return typeof j=="string"&&j.indexOf(".")!=-1&&parseFloat(j)===1}function ue(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 Y(j){return v.round(parseFloat(j)*255).toString(16)}function X(j){return W(j)/255}var Q=function(){var j="[-\\+]?\\d+%?",ee="[-\\+]?\\d*\\.\\d+%?",te="(?:"+ee+")|(?:"+j+")",pe="[\\s|\\(]+("+te+")[,|\\s]+("+te+")[,|\\s]+("+te+")\\s*\\)?",we="[\\s|\\(]+("+te+")[,|\\s]+("+te+")[,|\\s]+("+te+")[,|\\s]+("+te+")\\s*\\)?";return{CSS_UNIT:new RegExp(te),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 V(j){return!!Q.CSS_UNIT.exec(j)}function le(j){j=j.replace(_,"").replace(S,"").toLowerCase();var ee=!1;if(F[j])j=F[j],ee=!0;else if(j=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var te;return(te=Q.rgb.exec(j))?{r:te[1],g:te[2],b:te[3]}:(te=Q.rgba.exec(j))?{r:te[1],g:te[2],b:te[3],a:te[4]}:(te=Q.hsl.exec(j))?{h:te[1],s:te[2],l:te[3]}:(te=Q.hsla.exec(j))?{h:te[1],s:te[2],l:te[3],a:te[4]}:(te=Q.hsv.exec(j))?{h:te[1],s:te[2],v:te[3]}:(te=Q.hsva.exec(j))?{h:te[1],s:te[2],v:te[3],a:te[4]}:(te=Q.hex8.exec(j))?{r:W(te[1]),g:W(te[2]),b:W(te[3]),a:X(te[4]),format:ee?"name":"hex8"}:(te=Q.hex6.exec(j))?{r:W(te[1]),g:W(te[2]),b:W(te[3]),format:ee?"name":"hex"}:(te=Q.hex4.exec(j))?{r:W(te[1]+""+te[1]),g:W(te[2]+""+te[2]),b:W(te[3]+""+te[3]),a:X(te[4]+""+te[4]),format:ee?"name":"hex8"}:(te=Q.hex3.exec(j))?{r:W(te[1]+""+te[1]),g:W(te[2]+""+te[2]),b:W(te[3]+""+te[3]),format:ee?"name":"hex"}:!1}function ae(j){var ee,te;return j=j||{level:"AA",size:"small"},ee=(j.level||"AA").toUpperCase(),te=(j.size||"small").toLowerCase(),ee!=="AA"&&ee!=="AAA"&&(ee="AA"),te!=="small"&&te!=="large"&&(te="small"),{level:ee,size:te}}typeof q<"u"&&q.exports?q.exports=a:window.tinycolor=a})(Math)}}),rs=He({"src/lib/extend.js"(Z){"use strict";var q=Yv(),v=Array.isArray;function _(M,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 m=Math.round(s[0]*255)+", "+Math.round(s[1]*255)+", "+Math.round(s[2]*255);return h?"rgba("+m+", "+s[3]+")":"rgb("+m+")"}}}),Km=He({"src/constants/interactions.js"(Z,q){"use strict";q.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}}}),Jy=He({"src/lib/regex.js"(Z){"use strict";Z.counter=function(q,v,_,S){var M=(v||"")+(_?"":"$"),e=S===!1?"":"^";return q==="xy"?new RegExp(e+"x([2-9]|[1-9][0-9]+)?y([2-9]|[1-9][0-9]+)?"+M):new RegExp(e+q+"([2-9]|[1-9][0-9]+)?"+M)}}}),h7=He({"src/lib/coerce.js"(Z){"use strict";var q=ns(),v=Ch(),_=rs().extendFlat,S=au(),M=W0(),e=$n(),t=Km().DESELECTDIM,r=b_(),o=Jy().counter,a=Yy().modHalf,i=hp().isArrayOrTypedArray,n=hp().isTypedArraySpec,s=hp().decodeTypedArraySpec;Z.valObjectMeta={data_array:{coerceFunction:function(f,m,c){m.set(i(f)?f:n(f)?s(f):c)}},enumerated:{coerceFunction:function(f,m,c,T){T.coerceNumber&&(f=+f),T.values.indexOf(f)===-1?m.set(c):m.set(f)},validateFunction:function(f,m){m.coerceNumber&&(f=+f);for(var c=m.values,T=0;Tx===!0||x===!1;l(f)||T.arrayOk&&Array.isArray(f)&&f.length>0&&f.every(l)?m.set(f):m.set(c)}},number:{coerceFunction:function(f,m,c,T){n(f)&&(f=s(f)),!q(f)||T.min!==void 0&&fT.max?m.set(c):m.set(+f)}},integer:{coerceFunction:function(f,m,c,T){if((T.extras||[]).indexOf(f)!==-1){m.set(f);return}n(f)&&(f=s(f)),f%1||!q(f)||T.min!==void 0&&fT.max?m.set(c):m.set(+f)}},string:{coerceFunction:function(f,m,c,T){if(typeof f!="string"){var l=typeof f=="number";T.strict===!0||!l?m.set(c):m.set(String(f))}else T.noBlank&&!f?m.set(c):m.set(f)}},color:{coerceFunction:function(f,m,c){n(f)&&(f=s(f)),v(f).isValid()?m.set(f):m.set(c)}},colorlist:{coerceFunction:function(f,m,c){function T(l){return v(l).isValid()}!Array.isArray(f)||!f.length?m.set(c):f.every(T)?m.set(f):m.set(c)}},colorscale:{coerceFunction:function(f,m,c){m.set(M.get(f,c))}},angle:{coerceFunction:function(f,m,c){n(f)&&(f=s(f)),f==="auto"?m.set("auto"):q(f)?m.set(a(+f,360)):m.set(c)}},subplotid:{coerceFunction:function(f,m,c,T){var l=T.regex||o(c);let x=w=>typeof w=="string"&&l.test(w);x(f)||T.arrayOk&&i(f)&&f.length>0&&f.every(x)?m.set(f):m.set(c)},validateFunction:function(f,m){var c=m.dflt;return f===c?!0:typeof f!="string"?!1:!!o(c).test(f)}},flaglist:{coerceFunction:function(f,m,c,T){if((T.extras||[]).indexOf(f)!==-1){m.set(f);return}if(typeof f!="string"){m.set(c);return}for(var l=f.split("+"),x=0;x/g),c=0;c1){var e=["LOG:"];for(M=0;M1){var t=[];for(M=0;M"),"long")}},S.warn=function(){var M;if(v.logging>0){var e=["WARN:"];for(M=0;M0){var t=[];for(M=0;M"),"stick")}},S.error=function(){var M;if(v.logging>0){var e=["ERROR:"];for(M=0;M0){var t=[];for(M=0;M"),"stick")}}}}),p2=He({"src/lib/noop.js"(Z,q){"use strict";q.exports=function(){}}}),$A=He({"src/lib/push_unique.js"(Z,q){"use strict";q.exports=function(_,S){if(S instanceof RegExp){for(var M=S.toString(),e=0;e<_.length;e++)if(_[e]instanceof RegExp&&_[e].toString()===M)return _;_.push(S)}else(S||S===0)&&_.indexOf(S)===-1&&_.push(S);return _}}}),p7=He({"node_modules/gl-mat4/create.js"(Z,q){q.exports=v;function v(){var _=new Float32Array(16);return _[0]=1,_[1]=0,_[2]=0,_[3]=0,_[4]=0,_[5]=1,_[6]=0,_[7]=0,_[8]=0,_[9]=0,_[10]=1,_[11]=0,_[12]=0,_[13]=0,_[14]=0,_[15]=1,_}}}),d7=He({"node_modules/gl-mat4/clone.js"(Z,q){q.exports=v;function v(_){var S=new Float32Array(16);return S[0]=_[0],S[1]=_[1],S[2]=_[2],S[3]=_[3],S[4]=_[4],S[5]=_[5],S[6]=_[6],S[7]=_[7],S[8]=_[8],S[9]=_[9],S[10]=_[10],S[11]=_[11],S[12]=_[12],S[13]=_[13],S[14]=_[14],S[15]=_[15],S}}}),v7=He({"node_modules/gl-mat4/copy.js"(Z,q){q.exports=v;function v(_,S){return _[0]=S[0],_[1]=S[1],_[2]=S[2],_[3]=S[3],_[4]=S[4],_[5]=S[5],_[6]=S[6],_[7]=S[7],_[8]=S[8],_[9]=S[9],_[10]=S[10],_[11]=S[11],_[12]=S[12],_[13]=S[13],_[14]=S[14],_[15]=S[15],_}}}),QA=He({"node_modules/gl-mat4/identity.js"(Z,q){q.exports=v;function v(_){return _[0]=1,_[1]=0,_[2]=0,_[3]=0,_[4]=0,_[5]=1,_[6]=0,_[7]=0,_[8]=0,_[9]=0,_[10]=1,_[11]=0,_[12]=0,_[13]=0,_[14]=0,_[15]=1,_}}}),m7=He({"node_modules/gl-mat4/transpose.js"(Z,q){q.exports=v;function v(_,S){if(_===S){var M=S[1],e=S[2],t=S[3],r=S[6],o=S[7],a=S[11];_[1]=S[4],_[2]=S[8],_[3]=S[12],_[4]=M,_[6]=S[9],_[7]=S[13],_[8]=e,_[9]=r,_[11]=S[14],_[12]=t,_[13]=o,_[14]=a}else _[0]=S[0],_[1]=S[4],_[2]=S[8],_[3]=S[12],_[4]=S[1],_[5]=S[5],_[6]=S[9],_[7]=S[13],_[8]=S[2],_[9]=S[6],_[10]=S[10],_[11]=S[14],_[12]=S[3],_[13]=S[7],_[14]=S[11],_[15]=S[15];return _}}}),g7=He({"node_modules/gl-mat4/invert.js"(Z,q){q.exports=v;function v(_,S){var M=S[0],e=S[1],t=S[2],r=S[3],o=S[4],a=S[5],i=S[6],n=S[7],s=S[8],h=S[9],f=S[10],m=S[11],c=S[12],T=S[13],l=S[14],x=S[15],w=M*a-e*o,A=M*i-t*o,E=M*n-r*o,p=e*i-t*a,b=e*n-r*a,d=t*n-r*i,u=s*T-h*c,g=s*l-f*c,y=s*x-m*c,D=h*l-f*T,P=h*x-m*T,z=f*x-m*l,F=w*z-A*P+E*D+p*y-b*g+d*u;return F?(F=1/F,_[0]=(a*z-i*P+n*D)*F,_[1]=(t*P-e*z-r*D)*F,_[2]=(T*d-l*b+x*p)*F,_[3]=(f*b-h*d-m*p)*F,_[4]=(i*y-o*z-n*g)*F,_[5]=(M*z-t*y+r*g)*F,_[6]=(l*E-c*d-x*A)*F,_[7]=(s*d-f*E+m*A)*F,_[8]=(o*P-a*y+n*u)*F,_[9]=(e*y-M*P-r*u)*F,_[10]=(c*b-T*E+x*w)*F,_[11]=(h*E-s*b-m*w)*F,_[12]=(a*g-o*D-i*u)*F,_[13]=(M*D-e*g+t*u)*F,_[14]=(T*A-c*p-l*w)*F,_[15]=(s*p-h*A+f*w)*F,_):null}}}),y7=He({"node_modules/gl-mat4/adjoint.js"(Z,q){q.exports=v;function v(_,S){var M=S[0],e=S[1],t=S[2],r=S[3],o=S[4],a=S[5],i=S[6],n=S[7],s=S[8],h=S[9],f=S[10],m=S[11],c=S[12],T=S[13],l=S[14],x=S[15];return _[0]=a*(f*x-m*l)-h*(i*x-n*l)+T*(i*m-n*f),_[1]=-(e*(f*x-m*l)-h*(t*x-r*l)+T*(t*m-r*f)),_[2]=e*(i*x-n*l)-a*(t*x-r*l)+T*(t*n-r*i),_[3]=-(e*(i*m-n*f)-a*(t*m-r*f)+h*(t*n-r*i)),_[4]=-(o*(f*x-m*l)-s*(i*x-n*l)+c*(i*m-n*f)),_[5]=M*(f*x-m*l)-s*(t*x-r*l)+c*(t*m-r*f),_[6]=-(M*(i*x-n*l)-o*(t*x-r*l)+c*(t*n-r*i)),_[7]=M*(i*m-n*f)-o*(t*m-r*f)+s*(t*n-r*i),_[8]=o*(h*x-m*T)-s*(a*x-n*T)+c*(a*m-n*h),_[9]=-(M*(h*x-m*T)-s*(e*x-r*T)+c*(e*m-r*h)),_[10]=M*(a*x-n*T)-o*(e*x-r*T)+c*(e*n-r*a),_[11]=-(M*(a*m-n*h)-o*(e*m-r*h)+s*(e*n-r*a)),_[12]=-(o*(h*l-f*T)-s*(a*l-i*T)+c*(a*f-i*h)),_[13]=M*(h*l-f*T)-s*(e*l-t*T)+c*(e*f-t*h),_[14]=-(M*(a*l-i*T)-o*(e*l-t*T)+c*(e*i-t*a)),_[15]=M*(a*f-i*h)-o*(e*f-t*h)+s*(e*i-t*a),_}}}),_7=He({"node_modules/gl-mat4/determinant.js"(Z,q){q.exports=v;function v(_){var S=_[0],M=_[1],e=_[2],t=_[3],r=_[4],o=_[5],a=_[6],i=_[7],n=_[8],s=_[9],h=_[10],f=_[11],m=_[12],c=_[13],T=_[14],l=_[15],x=S*o-M*r,w=S*a-e*r,A=S*i-t*r,E=M*a-e*o,p=M*i-t*o,b=e*i-t*a,d=n*c-s*m,u=n*T-h*m,g=n*l-f*m,y=s*T-h*c,D=s*l-f*c,P=h*l-f*T;return x*P-w*D+A*y+E*g-p*u+b*d}}}),x7=He({"node_modules/gl-mat4/multiply.js"(Z,q){q.exports=v;function v(_,S,M){var e=S[0],t=S[1],r=S[2],o=S[3],a=S[4],i=S[5],n=S[6],s=S[7],h=S[8],f=S[9],m=S[10],c=S[11],T=S[12],l=S[13],x=S[14],w=S[15],A=M[0],E=M[1],p=M[2],b=M[3];return _[0]=A*e+E*a+p*h+b*T,_[1]=A*t+E*i+p*f+b*l,_[2]=A*r+E*n+p*m+b*x,_[3]=A*o+E*s+p*c+b*w,A=M[4],E=M[5],p=M[6],b=M[7],_[4]=A*e+E*a+p*h+b*T,_[5]=A*t+E*i+p*f+b*l,_[6]=A*r+E*n+p*m+b*x,_[7]=A*o+E*s+p*c+b*w,A=M[8],E=M[9],p=M[10],b=M[11],_[8]=A*e+E*a+p*h+b*T,_[9]=A*t+E*i+p*f+b*l,_[10]=A*r+E*n+p*m+b*x,_[11]=A*o+E*s+p*c+b*w,A=M[12],E=M[13],p=M[14],b=M[15],_[12]=A*e+E*a+p*h+b*T,_[13]=A*t+E*i+p*f+b*l,_[14]=A*r+E*n+p*m+b*x,_[15]=A*o+E*s+p*c+b*w,_}}}),b7=He({"node_modules/gl-mat4/translate.js"(Z,q){q.exports=v;function v(_,S,M){var e=M[0],t=M[1],r=M[2],o,a,i,n,s,h,f,m,c,T,l,x;return S===_?(_[12]=S[0]*e+S[4]*t+S[8]*r+S[12],_[13]=S[1]*e+S[5]*t+S[9]*r+S[13],_[14]=S[2]*e+S[6]*t+S[10]*r+S[14],_[15]=S[3]*e+S[7]*t+S[11]*r+S[15]):(o=S[0],a=S[1],i=S[2],n=S[3],s=S[4],h=S[5],f=S[6],m=S[7],c=S[8],T=S[9],l=S[10],x=S[11],_[0]=o,_[1]=a,_[2]=i,_[3]=n,_[4]=s,_[5]=h,_[6]=f,_[7]=m,_[8]=c,_[9]=T,_[10]=l,_[11]=x,_[12]=o*e+s*t+c*r+S[12],_[13]=a*e+h*t+T*r+S[13],_[14]=i*e+f*t+l*r+S[14],_[15]=n*e+m*t+x*r+S[15]),_}}}),w7=He({"node_modules/gl-mat4/scale.js"(Z,q){q.exports=v;function v(_,S,M){var e=M[0],t=M[1],r=M[2];return _[0]=S[0]*e,_[1]=S[1]*e,_[2]=S[2]*e,_[3]=S[3]*e,_[4]=S[4]*t,_[5]=S[5]*t,_[6]=S[6]*t,_[7]=S[7]*t,_[8]=S[8]*r,_[9]=S[9]*r,_[10]=S[10]*r,_[11]=S[11]*r,_[12]=S[12],_[13]=S[13],_[14]=S[14],_[15]=S[15],_}}}),T7=He({"node_modules/gl-mat4/rotate.js"(Z,q){q.exports=v;function v(_,S,M,e){var t=e[0],r=e[1],o=e[2],a=Math.sqrt(t*t+r*r+o*o),i,n,s,h,f,m,c,T,l,x,w,A,E,p,b,d,u,g,y,D,P,z,F,N;return Math.abs(a)<1e-6?null:(a=1/a,t*=a,r*=a,o*=a,i=Math.sin(M),n=Math.cos(M),s=1-n,h=S[0],f=S[1],m=S[2],c=S[3],T=S[4],l=S[5],x=S[6],w=S[7],A=S[8],E=S[9],p=S[10],b=S[11],d=t*t*s+n,u=r*t*s+o*i,g=o*t*s-r*i,y=t*r*s-o*i,D=r*r*s+n,P=o*r*s+t*i,z=t*o*s+r*i,F=r*o*s-t*i,N=o*o*s+n,_[0]=h*d+T*u+A*g,_[1]=f*d+l*u+E*g,_[2]=m*d+x*u+p*g,_[3]=c*d+w*u+b*g,_[4]=h*y+T*D+A*P,_[5]=f*y+l*D+E*P,_[6]=m*y+x*D+p*P,_[7]=c*y+w*D+b*P,_[8]=h*z+T*F+A*N,_[9]=f*z+l*F+E*N,_[10]=m*z+x*F+p*N,_[11]=c*z+w*F+b*N,S!==_&&(_[12]=S[12],_[13]=S[13],_[14]=S[14],_[15]=S[15]),_)}}}),A7=He({"node_modules/gl-mat4/rotateX.js"(Z,q){q.exports=v;function v(_,S,M){var e=Math.sin(M),t=Math.cos(M),r=S[4],o=S[5],a=S[6],i=S[7],n=S[8],s=S[9],h=S[10],f=S[11];return S!==_&&(_[0]=S[0],_[1]=S[1],_[2]=S[2],_[3]=S[3],_[12]=S[12],_[13]=S[13],_[14]=S[14],_[15]=S[15]),_[4]=r*t+n*e,_[5]=o*t+s*e,_[6]=a*t+h*e,_[7]=i*t+f*e,_[8]=n*t-r*e,_[9]=s*t-o*e,_[10]=h*t-a*e,_[11]=f*t-i*e,_}}}),S7=He({"node_modules/gl-mat4/rotateY.js"(Z,q){q.exports=v;function v(_,S,M){var e=Math.sin(M),t=Math.cos(M),r=S[0],o=S[1],a=S[2],i=S[3],n=S[8],s=S[9],h=S[10],f=S[11];return S!==_&&(_[4]=S[4],_[5]=S[5],_[6]=S[6],_[7]=S[7],_[12]=S[12],_[13]=S[13],_[14]=S[14],_[15]=S[15]),_[0]=r*t-n*e,_[1]=o*t-s*e,_[2]=a*t-h*e,_[3]=i*t-f*e,_[8]=r*e+n*t,_[9]=o*e+s*t,_[10]=a*e+h*t,_[11]=i*e+f*t,_}}}),M7=He({"node_modules/gl-mat4/rotateZ.js"(Z,q){q.exports=v;function v(_,S,M){var e=Math.sin(M),t=Math.cos(M),r=S[0],o=S[1],a=S[2],i=S[3],n=S[4],s=S[5],h=S[6],f=S[7];return S!==_&&(_[8]=S[8],_[9]=S[9],_[10]=S[10],_[11]=S[11],_[12]=S[12],_[13]=S[13],_[14]=S[14],_[15]=S[15]),_[0]=r*t+n*e,_[1]=o*t+s*e,_[2]=a*t+h*e,_[3]=i*t+f*e,_[4]=n*t-r*e,_[5]=s*t-o*e,_[6]=h*t-a*e,_[7]=f*t-i*e,_}}}),E7=He({"node_modules/gl-mat4/fromRotation.js"(Z,q){q.exports=v;function v(_,S,M){var e,t,r,o=M[0],a=M[1],i=M[2],n=Math.sqrt(o*o+a*a+i*i);return Math.abs(n)<1e-6?null:(n=1/n,o*=n,a*=n,i*=n,e=Math.sin(S),t=Math.cos(S),r=1-t,_[0]=o*o*r+t,_[1]=a*o*r+i*e,_[2]=i*o*r-a*e,_[3]=0,_[4]=o*a*r-i*e,_[5]=a*a*r+t,_[6]=i*a*r+o*e,_[7]=0,_[8]=o*i*r+a*e,_[9]=a*i*r-o*e,_[10]=i*i*r+t,_[11]=0,_[12]=0,_[13]=0,_[14]=0,_[15]=1,_)}}}),k7=He({"node_modules/gl-mat4/fromRotationTranslation.js"(Z,q){q.exports=v;function v(_,S,M){var e=S[0],t=S[1],r=S[2],o=S[3],a=e+e,i=t+t,n=r+r,s=e*a,h=e*i,f=e*n,m=t*i,c=t*n,T=r*n,l=o*a,x=o*i,w=o*n;return _[0]=1-(m+T),_[1]=h+w,_[2]=f-x,_[3]=0,_[4]=h-w,_[5]=1-(s+T),_[6]=c+l,_[7]=0,_[8]=f+x,_[9]=c-l,_[10]=1-(s+m),_[11]=0,_[12]=M[0],_[13]=M[1],_[14]=M[2],_[15]=1,_}}}),C7=He({"node_modules/gl-mat4/fromScaling.js"(Z,q){q.exports=v;function v(_,S){return _[0]=S[0],_[1]=0,_[2]=0,_[3]=0,_[4]=0,_[5]=S[1],_[6]=0,_[7]=0,_[8]=0,_[9]=0,_[10]=S[2],_[11]=0,_[12]=0,_[13]=0,_[14]=0,_[15]=1,_}}}),L7=He({"node_modules/gl-mat4/fromTranslation.js"(Z,q){q.exports=v;function v(_,S){return _[0]=1,_[1]=0,_[2]=0,_[3]=0,_[4]=0,_[5]=1,_[6]=0,_[7]=0,_[8]=0,_[9]=0,_[10]=1,_[11]=0,_[12]=S[0],_[13]=S[1],_[14]=S[2],_[15]=1,_}}}),P7=He({"node_modules/gl-mat4/fromXRotation.js"(Z,q){q.exports=v;function v(_,S){var M=Math.sin(S),e=Math.cos(S);return _[0]=1,_[1]=0,_[2]=0,_[3]=0,_[4]=0,_[5]=e,_[6]=M,_[7]=0,_[8]=0,_[9]=-M,_[10]=e,_[11]=0,_[12]=0,_[13]=0,_[14]=0,_[15]=1,_}}}),I7=He({"node_modules/gl-mat4/fromYRotation.js"(Z,q){q.exports=v;function v(_,S){var M=Math.sin(S),e=Math.cos(S);return _[0]=e,_[1]=0,_[2]=-M,_[3]=0,_[4]=0,_[5]=1,_[6]=0,_[7]=0,_[8]=M,_[9]=0,_[10]=e,_[11]=0,_[12]=0,_[13]=0,_[14]=0,_[15]=1,_}}}),R7=He({"node_modules/gl-mat4/fromZRotation.js"(Z,q){q.exports=v;function v(_,S){var M=Math.sin(S),e=Math.cos(S);return _[0]=e,_[1]=M,_[2]=0,_[3]=0,_[4]=-M,_[5]=e,_[6]=0,_[7]=0,_[8]=0,_[9]=0,_[10]=1,_[11]=0,_[12]=0,_[13]=0,_[14]=0,_[15]=1,_}}}),D7=He({"node_modules/gl-mat4/fromQuat.js"(Z,q){q.exports=v;function v(_,S){var M=S[0],e=S[1],t=S[2],r=S[3],o=M+M,a=e+e,i=t+t,n=M*o,s=e*o,h=e*a,f=t*o,m=t*a,c=t*i,T=r*o,l=r*a,x=r*i;return _[0]=1-h-c,_[1]=s+x,_[2]=f-l,_[3]=0,_[4]=s-x,_[5]=1-n-c,_[6]=m+T,_[7]=0,_[8]=f+l,_[9]=m-T,_[10]=1-n-h,_[11]=0,_[12]=0,_[13]=0,_[14]=0,_[15]=1,_}}}),z7=He({"node_modules/gl-mat4/frustum.js"(Z,q){q.exports=v;function v(_,S,M,e,t,r,o){var a=1/(M-S),i=1/(t-e),n=1/(r-o);return _[0]=r*2*a,_[1]=0,_[2]=0,_[3]=0,_[4]=0,_[5]=r*2*i,_[6]=0,_[7]=0,_[8]=(M+S)*a,_[9]=(t+e)*i,_[10]=(o+r)*n,_[11]=-1,_[12]=0,_[13]=0,_[14]=o*r*2*n,_[15]=0,_}}}),F7=He({"node_modules/gl-mat4/perspective.js"(Z,q){q.exports=v;function v(_,S,M,e,t){var r=1/Math.tan(S/2),o=1/(e-t);return _[0]=r/M,_[1]=0,_[2]=0,_[3]=0,_[4]=0,_[5]=r,_[6]=0,_[7]=0,_[8]=0,_[9]=0,_[10]=(t+e)*o,_[11]=-1,_[12]=0,_[13]=0,_[14]=2*t*e*o,_[15]=0,_}}}),O7=He({"node_modules/gl-mat4/perspectiveFromFieldOfView.js"(Z,q){q.exports=v;function v(_,S,M,e){var t=Math.tan(S.upDegrees*Math.PI/180),r=Math.tan(S.downDegrees*Math.PI/180),o=Math.tan(S.leftDegrees*Math.PI/180),a=Math.tan(S.rightDegrees*Math.PI/180),i=2/(o+a),n=2/(t+r);return _[0]=i,_[1]=0,_[2]=0,_[3]=0,_[4]=0,_[5]=n,_[6]=0,_[7]=0,_[8]=-((o-a)*i*.5),_[9]=(t-r)*n*.5,_[10]=e/(M-e),_[11]=-1,_[12]=0,_[13]=0,_[14]=e*M/(M-e),_[15]=0,_}}}),B7=He({"node_modules/gl-mat4/ortho.js"(Z,q){q.exports=v;function v(_,S,M,e,t,r,o){var a=1/(S-M),i=1/(e-t),n=1/(r-o);return _[0]=-2*a,_[1]=0,_[2]=0,_[3]=0,_[4]=0,_[5]=-2*i,_[6]=0,_[7]=0,_[8]=0,_[9]=0,_[10]=2*n,_[11]=0,_[12]=(S+M)*a,_[13]=(t+e)*i,_[14]=(o+r)*n,_[15]=1,_}}}),N7=He({"node_modules/gl-mat4/lookAt.js"(Z,q){var v=QA();q.exports=_;function _(S,M,e,t){var r,o,a,i,n,s,h,f,m,c,T=M[0],l=M[1],x=M[2],w=t[0],A=t[1],E=t[2],p=e[0],b=e[1],d=e[2];return Math.abs(T-p)<1e-6&&Math.abs(l-b)<1e-6&&Math.abs(x-d)<1e-6?v(S):(h=T-p,f=l-b,m=x-d,c=1/Math.sqrt(h*h+f*f+m*m),h*=c,f*=c,m*=c,r=A*m-E*f,o=E*h-w*m,a=w*f-A*h,c=Math.sqrt(r*r+o*o+a*a),c?(c=1/c,r*=c,o*=c,a*=c):(r=0,o=0,a=0),i=f*a-m*o,n=m*r-h*a,s=h*o-f*r,c=Math.sqrt(i*i+n*n+s*s),c?(c=1/c,i*=c,n*=c,s*=c):(i=0,n=0,s=0),S[0]=r,S[1]=i,S[2]=h,S[3]=0,S[4]=o,S[5]=n,S[6]=f,S[7]=0,S[8]=a,S[9]=s,S[10]=m,S[11]=0,S[12]=-(r*T+o*l+a*x),S[13]=-(i*T+n*l+s*x),S[14]=-(h*T+f*l+m*x),S[15]=1,S)}}}),U7=He({"node_modules/gl-mat4/str.js"(Z,q){q.exports=v;function v(_){return"mat4("+_[0]+", "+_[1]+", "+_[2]+", "+_[3]+", "+_[4]+", "+_[5]+", "+_[6]+", "+_[7]+", "+_[8]+", "+_[9]+", "+_[10]+", "+_[11]+", "+_[12]+", "+_[13]+", "+_[14]+", "+_[15]+")"}}}),e5=He({"node_modules/gl-mat4/index.js"(Z,q){q.exports={create:p7(),clone:d7(),copy:v7(),identity:QA(),transpose:m7(),invert:g7(),adjoint:y7(),determinant:_7(),multiply:x7(),translate:b7(),scale:w7(),rotate:T7(),rotateX:A7(),rotateY:S7(),rotateZ:M7(),fromRotation:E7(),fromRotationTranslation:k7(),fromScaling:C7(),fromTranslation:L7(),fromXRotation:P7(),fromYRotation:I7(),fromZRotation:R7(),fromQuat:D7(),frustum:z7(),perspective:F7(),perspectiveFromFieldOfView:O7(),ortho:B7(),lookAt:N7(),str:U7()}}}),d2=He({"src/lib/matrix.js"(Z){"use strict";var q=e5();Z.init2dArray=function(v,_){for(var S=new Array(v),M=0;MSo({valType:"string",dflt:"",editType:M},e!==!1?{arrayOk:!0}:{}),Z.texttemplateAttrs=({editType:M="calc",arrayOk:e}={},t={})=>So({valType:"string",dflt:"",editType:M},e!==!1?{arrayOk:!0}:{}),Z.shapeTexttemplateAttrs=({editType:M="arraydraw",newshape:e}={},t={})=>({valType:"string",dflt:"",editType:M}),Z.templatefallbackAttrs=({editType:M="none"}={})=>({valType:"any",dflt:"-",editType:M})}}),v2=He({"src/components/shapes/label_texttemplate.js"(Z,q){"use strict";function v(A,E){return E?E.d2l(A):A}function _(A,E){return E?E.l2d(A):A}function S(A){return A.x0}function M(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 i(A){return A.y1shift||0}function n(A,E){return v(A.x1,E)+o(A)-v(A.x0,E)-r(A)}function s(A,E,p){return v(A.y1,p)+i(A)-v(A.y0,p)-a(A)}function h(A,E){return Math.abs(n(A,E))}function f(A,E,p){return Math.abs(s(A,E,p))}function m(A,E,p){return A.type!=="line"?void 0:Math.sqrt(Math.pow(n(A,E),2)+Math.pow(s(A,E,p),2))}function c(A,E){return _((v(A.x1,E)+o(A)+v(A.x0,E)+r(A))/2,E)}function T(A,E,p){return _((v(A.y1,p)+i(A)+v(A.y0,p)+a(A))/2,p)}function l(A,E,p){return A.type!=="line"?void 0:s(A,E,p)/n(A,E)}var x=["x0","x1","y0","y1","dy","height","ycenter"],w=["x0","x1","y0","y1","dx","width","xcenter"];q.exports={x0:S,x1:M,y0:e,y1:t,slope:l,dx:n,dy:s,width:h,height:f,length:m,xcenter:c,ycenter:T,simpleXVariables:x,simpleYVariables:w}}}),j7=He({"src/components/shapes/draw_newshape/attributes.js"(Z,q){"use strict";var v=pc().overrideAll,_=au(),S=tc(),M=Hh().dash,e=rs().extendFlat,{shapeTexttemplateAttrs:t,templatefallbackAttrs:r}=$l(),o=v2();q.exports=v({newshape:{visible:e({},_.visible,{}),showlegend:{valType:"boolean",dflt:!1},legend:e({},_.legend,{}),legendgroup:e({},_.legendgroup,{}),legendgrouptitle:{text:e({},_.legendgrouptitle.text,{}),font:S({})},legendrank:e({},_.legendrank,{}),legendwidth:e({},_.legendwidth,{}),line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:4},dash:e({},M,{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({},_.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,q){"use strict";var v=Hh().dash,_=rs().extendFlat;q.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:_({},v,{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,q){"use strict";q.exports=function(v){var _=v.editType;return{t:{valType:"number",dflt:0,editType:_},r:{valType:"number",dflt:0,editType:_},b:{valType:"number",dflt:0,editType:_},l:{valType:"number",dflt:0,editType:_},editType:_}}}}),$y=He({"src/plots/layout_attributes.js"(Z,q){"use strict";var v=tc(),_=A_(),S=sh(),M=j7(),e=q7(),t=m2(),r=rs().extendFlat,o=v({editType:"calc"});o.family.dflt='"Open Sans", verdana, arial, sans-serif',o.size.dflt=12,o.color.dflt=S.defaultLine,q.exports={font:o,title:{text:{valType:"string",editType:"layoutstyle"},font:v({editType:"layoutstyle"}),subtitle:{text:{valType:"string",editType:"layoutstyle"},font:v({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:M.newshape,activeshape:M.activeshape,newselection:e.newselection,activeselection:e.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:r({},_.transition,{editType:"none"})}}}),V7=He({"node_modules/maplibre-gl/dist/maplibre-gl.css"(){(function(){if(!document.getElementById("ce8d464691048653ffe3a57c6c18ab566e8366f186677868cf724621a857b4fe")){var Z=document.createElement("style");Z.id="ce8d464691048653ffe3a57c6c18ab566e8366f186677868cf724621a857b4fe",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)}})()}}),so=He({"src/registry.js"(Z){"use strict";var q=Jm(),v=p2(),_=$A(),S=Yv(),M=T_().addStyleRule,e=rs(),t=au(),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<=x?F:e}if(typeof F!="string"&&typeof F!="number")return e;F=String(F);var B=c(N),W=F.charAt(0);B&&(W==="G"||W==="g")&&(F=F.slice(1),N="");var $=B&&N.slice(0,7)==="chinese",ue=F.match($?f:h);if(!ue)return e;var ce=ue[1],de=ue[3]||"1",Y=Number(ue[5]||1),X=Number(ue[7]||0),Q=Number(ue[9]||0),V=Number(ue[11]||0);if(B){if(ce.length===2)return e;ce=Number(ce);var le;try{var ae=n.getComponentMethod("calendars","getCal")(N);if($){var j=de.charAt(de.length-1)==="i";de=parseInt(de,10),le=ae.newDate(ce,ae.toMonthIndex(ce,de,j),Y)}else le=ae.newDate(ce,Number(de),Y)}catch{return e}return le?(le.toJD()-i)*t+X*r+Q*o+V*a:e}ce.length===2?ce=(Number(ce)+2e3-m)%100+m:ce=Number(ce),de-=1;var ee=new Date(Date.UTC(2e3,de,Y,X,Q));return ee.setUTCFullYear(ce),ee.getUTCMonth()!==de||ee.getUTCDate()!==Y?e:ee.getTime()+V*a},l=Z.MIN_MS=Z.dateTime2ms("-9999"),x=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,E=3*r,p=5*o;Z.ms2DateTime=function(F,N,O){if(typeof F!="number"||!(F>=l&&F<=x))return e;N||(N=0);var L=Math.floor(S(F+.05,1)*10),U=Math.round(F-L/10),B,W,$,ue,ce,de;if(c(O)){var Y=Math.floor(U/t)+i,X=Math.floor(S(F,t));try{B=n.getComponentMethod("calendars","getCal")(O).fromJD(Y).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;W=N=l+t&&F<=x-t))return e;var N=Math.floor(S(F+.05,1)*10),O=new Date(Math.round(F-N/10)),L=q("%Y-%m-%d")(O),U=O.getHours(),B=O.getMinutes(),W=O.getSeconds(),$=O.getUTCMilliseconds()*10+N;return b(L,U,B,W,$)};function b(F,N,O,L,U){if((N||O||L||U)&&(F+=" "+w(N,2)+":"+w(O,2),(L||U)&&(F+=":"+w(L,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 _.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 _.error("unrecognized date",F),N;return F};var d=/%\d?f/g,u=/%h/g,g={1:"1",2:"1",3:"2",4:"2"};function y(F,N,O,L){F=F.replace(d,function(B){var W=Math.min(+B.charAt(1)||6,6),$=(N/1e3%1+2).toFixed(W).slice(2).replace(/0+$/,"")||"0";return $});var U=new Date(Math.floor(N+.05));if(F=F.replace(u,function(){return g[O("%q")(U)]}),c(L))try{F=n.getComponentMethod("calendars","worldCalFmt")(F,N,L)}catch{return"Invalid"}return O(F)(U)}var D=[59,59.9,59.99,59.999,59.9999];function P(F,N){var O=S(F+.05,t),L=w(Math.floor(O/r),2)+":"+w(S(Math.floor(O/o),60),2);if(N!=="M"){v(N)||(N=0);var U=Math.min(S(F/a,60),D[N]),B=(100+U).toFixed(N).slice(1);N>0&&(B=B.replace(/0+$/,"").replace(/[\.]$/,"")),L+=":"+B}return L}Z.formatDate=function(F,N,O,L,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+` +`)};function zt(Gr){return Gr.map(_r).join(me)}function _r(Gr){return et.test(Gr)?'"'+Gr.replace(/\"/g,'""')+'"':Gr}return yt},v.csv=v.dsv(",","text/csv"),v.tsv=v.dsv(" ","text/tab-separated-values");var ba,Ai,ki,Ki,En=this[O(this,"requestAnimationFrame")]||function(me){setTimeout(me,17)};v.timer=function(){Tn.apply(this,arguments)};function Tn(me,De,et){var dt=arguments.length;dt<2&&(De=0),dt<3&&(et=Date.now());var yt=et+De,Tt={c:me,t:yt,n:null};return Ai?Ai.n=Tt:ba=Tt,Ai=Tt,ki||(Ki=clearTimeout(Ki),ki=1,En(On)),Tt}function On(){var me=kn(),De=ao()-me;De>24?(isFinite(De)&&(clearTimeout(Ki),Ki=setTimeout(On,De)),ki=0):(ki=1,En(On))}v.timer.flush=function(){kn(),ao()};function kn(){for(var me=Date.now(),De=ba;De;)me>=De.t&&De.c(me-De.t)&&(De.c=null),De=De.n;return me}function ao(){for(var me,De=ba,et=1/0;De;)De.c?(De.t=0;--zt)Sa.push(yt[Gr[wa[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 Cn(me,De){return me[0]-De[0]||me[1]-De[1]}v.geom.polygon=function(me){return Y(me,wo),me};var wo=v.geom.polygon.prototype=[];wo.area=function(){for(var me=-1,De=this.length,et,dt=this[De-1],yt=0;++meYe)zt=zt.L;else if(tr=De-lo(zt,et),tr>Ye){if(!zt.R){dt=zt;break}zt=zt.R}else{Tt>-Ye?(dt=zt.P,yt=zt):tr>-Ye?(dt=zt,yt=zt.N):dt=yt=zt;break}var _r=Ko(me);if(Yn.insert(dt,_r),!(!dt&&!yt)){if(dt===yt){Po(dt),yt=Ko(dt.site),Yn.insert(_r,yt),_r.edge=yt.edge=Nl(dt.site,_r.site),yn(dt),yn(yt);return}if(!yt){_r.edge=Nl(dt.site,_r.site);return}Po(dt),Po(yt);var Gr=dt.site,Xr=Gr.x,wa=Gr.y,pa=me.x-Xr,Ja=me.y-wa,ti=yt.site,Sa=ti.x-Xr,za=ti.y-wa,Xa=2*(pa*za-Ja*Sa),fi=pa*pa+Ja*Ja,oi=Sa*Sa+za*za,La={x:(za*fi-Ja*oi)/Xa+Xr,y:(pa*oi-Sa*fi)/Xa+wa};Ts(yt.edge,Gr,ti,La),_r.edge=Nl(Gr,me,null,La),yt.edge=Nl(me,ti,null,La),yn(dt),yn(yt)}}function bs(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,wa=1/Tt-1/Gr,pa=Xr/Gr;return wa?(-pa+Math.sqrt(pa*pa-2*wa*(Xr*Xr/(-2*Gr)-_r+Gr/2+yt-Tt/2)))/wa+dt:(dt+zt)/2}function lo(me,De){var et=me.N;if(et)return bs(et,De);var dt=me.site;return dt.y===De?dt.x:1/0}function Zo(me){this.site=me,this.edges=[]}Zo.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(Hs),me.length};function ws(me){for(var De=me[0][0],et=me[1][0],dt=me[0][1],yt=me[1][1],Tt,tr,zt,_r,Gr=jo,Xr=Gr.length,wa,pa,Ja,ti,Sa,za;Xr--;)if(wa=Gr[Xr],!(!wa||!wa.prepare()))for(Ja=wa.edges,ti=Ja.length,pa=0;paYe||l(_r-tr)>Ye)&&(Ja.splice(pa,0,new Ls(Ks(wa.site,za,l(zt-De)Ye?{x:De,y:l(Tt-De)Ye?{x:l(tr-yt)Ye?{x:et,y:l(Tt-et)Ye?{x:l(tr-dt)=-Ae)){var pa=_r*_r+Gr*Gr,Ja=Xr*Xr+za*za,ti=(za*pa-Gr*Ja)/wa,Sa=(_r*Ja-Xr*pa)/wa,za=Sa+zt,Xa=_s.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,oi=ss._;oi;)if(Xa.y0)){if(Sa/=Ja,Ja<0){if(Sa0){if(Sa>pa)return;Sa>wa&&(wa=Sa)}if(Sa=et-zt,!(!Ja&&Sa<0)){if(Sa/=Ja,Ja<0){if(Sa>pa)return;Sa>wa&&(wa=Sa)}else if(Ja>0){if(Sa0)){if(Sa/=ti,ti<0){if(Sa0){if(Sa>pa)return;Sa>wa&&(wa=Sa)}if(Sa=dt-_r,!(!ti&&Sa<0)){if(Sa/=ti,ti<0){if(Sa>pa)return;Sa>wa&&(wa=Sa)}else if(ti>0){if(Sa0&&(yt.a={x:zt+wa*Ja,y:_r+wa*ti}),pa<1&&(yt.b={x:zt+pa*Ja,y:_r+pa*ti}),yt}}}}}}function Ws(me){for(var De=ys,et=To(me[0][0],me[0][1],me[1][0],me[1][1]),dt=De.length,yt;dt--;)yt=De[dt],(!Ll(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>=wa&&Xa.y<=Ja?[[Xr,Ja],[pa,Ja],[pa,wa],[Xr,wa]]:[];fi.point=_r[Sa]}),Gr}function zt(_r){return _r.map(function(Gr,Xr){return{x:Math.round(dt(Gr,Xr)/Ye)*Ye,y:Math.round(yt(Gr,Xr)/Ye)*Ye,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,wa){for(var pa=Xr.site,Ja=Xr.edges.sort(Hs),ti=-1,Sa=Ja.length,za,Xa,fi=Ja[Sa-1].edge,oi=fi.l===pa?fi.r:fi.l;++tioi&&(oi=Xr.x),Xr.y>La&&(La=Xr.y),Ja.push(Xr.x),ti.push(Xr.y);else for(Sa=0;Saoi&&(oi=sn),an>La&&(La=an),Ja.push(sn),ti.push(an)}var dn=oi-Xa,In=La-fi;dn>In?La=fi+dn:oi=Xa+In;function Jn(no,Xo,cl,al,_l,mn,po,fs){if(!(isNaN(cl)||isNaN(al)))if(no.leaf){var ms=no.x,Tl=no.y;if(ms!=null)if(l(ms-cl)+l(Tl-al)<.01)ro(no,Xo,cl,al,_l,mn,po,fs);else{var Wl=no.point;no.x=no.y=no.point=null,ro(no,Wl,ms,Tl,_l,mn,po,fs),ro(no,Xo,cl,al,_l,mn,po,fs)}else no.x=cl,no.y=al,no.point=Xo}else ro(no,Xo,cl,al,_l,mn,po,fs)}function ro(no,Xo,cl,al,_l,mn,po,fs){var ms=(_l+po)*.5,Tl=(mn+fs)*.5,Wl=cl>=ms,Su=al>=Tl,Rl=Su<<1|Wl;no.leaf=!1,no=no.nodes[Rl]||(no.nodes[Rl]=uu()),Wl?_l=ms:po=ms,Su?mn=Tl:fs=Tl,Jn(no,Xo,cl,al,_l,mn,po,fs)}var $o=uu();if($o.add=function(no){Jn($o,no,+wa(no,++Sa),+pa(no,Sa),Xa,fi,oi,La)},$o.visit=function(no){Pl(no,$o,Xa,fi,oi,La)},$o.find=function(no){return ic($o,no[0],no[1],Xa,fi,oi,La)},Sa=-1,De==null){for(;++SaTt||pa>tr||Ja=sn,In=et>=an,Jn=In<<1|dn,ro=Jn+4;Jnet&&(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:vl(dt,yt)})),et=nc.lastIndex;return et=0&&!(dt=v.interpolators[et](me,De)););return dt}v.interpolators=[function(me,De){var et=typeof De;return(et==="string"?mr.has(De.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(De)?Ou:As:De instanceof wi?Ou:Array.isArray(De)?qu:et==="object"&&isNaN(De)?nl:vl)(me,De)}],v.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=us.get(dt)||F,bh(dt(et.apply(null,_.call(arguments,1))))};function bh(me){return function(De){return De<=0?0:De>=1?1:me(De)}}function Ps(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 Xc(me){return me*me}function Vu(me){return me*me*me}function ql(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 Ql(me){return 1-Math.sqrt(1-me*me)}function Jf(me,De){var et;return arguments.length<2&&(De=.45),arguments.length?et=De/We*Math.asin(1/me):(me=1,et=De/4),function(dt){return 1+me*Math.pow(2,-10*dt)*Math.sin((dt-et)*We/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}v.interpolateHcl=jc;function jc(me,De){me=v.hcl(me),De=v.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)+""}}v.interpolateHsl=Bf;function Bf(me,De){me=v.hsl(me),De=v.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 Zt(et+Tt*_r,dt+tr*_r,yt+zt*_r)+""}}v.interpolateLab=Nf;function Nf(me,De){me=v.lab(me),De=v.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)+""}}v.interpolateRound=Gu;function Gu(me,De){return De-=me,function(et){return Math.round(me+De*et)}}v.transform=function(me){var De=M.createElementNS(v.ns.prefix.svg,"g");return(v.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=Zc(De),yt=oc(De,et),Tt=Zc(eu(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:vl(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:vl(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:vl(me[0],De[0])},{i:yt-2,x:vl(me[1],De[1])})}else(De[0]!==1||De[1]!==1)&&et.push(Sc(et)+"scale("+De+")")}function Yc(me,De){var et=[],dt=[];return me=v.transform(me),De=v.transform(De),Zs(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=Tn(me.tick)),me):Tt},me.start=function(){var La,sn=Ja.length,an=ti.length,dn=dt[0],In=dt[1],Jn,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(wa){var pa,Ja;me&&(pa=wa.children)&&pa.sort(me),et&&(Ja=wa.parent)&&(Ja.value+=wa.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 v.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]}v.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),wa,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]&&(wa=zt[v.bisect(Xr,za,1,ti)-1],wa.y+=Sa,wa.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=Ir(Tt),yt):et},yt.bins=function(Tt){return arguments.length?(dt=typeof Tt=="number"?function(tr){return Hu(tr,Tt)}:Ir(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[v.min(me),v.max(me)]}v.layout.pack=function(){var me=v.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],wa=dt==null?Math.sqrt:typeof dt=="function"?dt:function(){return dt};if(_r.x=_r.y=0,mc(_r,function(Ja){Ja.r=+wa(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 Jc(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 nu(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,wa,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],Vl(tr,zt,_r),Ja(_r),Jc(tr,_r),tr._pack_prev=_r,Jc(_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,oi=et[0]/(za.x+De(za,Sa)/2+fi),La=et[1]/(Xa.depth||1);Ec(Ja,function(sn){sn.x=(sn.x+fi)*oi,sn.y=sn.depth*La})}return pa}function Tt(Xr){for(var wa={A:null,children:[Xr]},pa=[wa],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),oi+=Sa.m,Xa+=Ja.m,La+=za.m,fi+=ti.m;Sa&&!$c(ti)&&(ti.t=Sa,ti.m+=oi-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 $c(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}v.layout.cluster=function(){var me=v.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=xr(za)):(Sa.x=Gr?Xr+=De(Sa,Gr):0,Sa.y=0,Gr=Sa)});var wa=$r(_r),pa=ka(_r),Ja=wa.x-De(wa,pa)/2,ti=pa.x+De(pa,wa)/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 xr(me){return 1+v.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}v.layout.treemap=function(){var me=v.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,oi,La;++Xa0;)fi.push(La=oi[In-1]),fi.area+=La.area,zt!=="squarify"||(an=pa(fi,dn))<=sn?(oi.pop(),sn=an):(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 wa(Sa){var za=Sa.children;if(za&&za.length){var Xa=yt(Sa),fi=za.slice(),oi,La=[];for(Gr(fi,Xa.dx*Xa.dy/Sa.value),La.area=0;oi=fi.pop();)La.push(oi),La.area+=oi.area,oi.z!=null&&(Ja(La,oi.z?Xa.dx:Xa.dy,Xa,!fi.length),La.length=La.area=0);za.forEach(wa)}}function pa(Sa,za){for(var Xa=Sa.area,fi,oi=0,La=1/0,sn=-1,an=Sa.length;++snoi&&(oi=fi));return Xa*=Xa,za*=za,Xa?Math.max(za*oi*_r/Xa,Xa/(za*La*_r)):1/0}function Ja(Sa,za,Xa,fi){var oi=-1,La=Sa.length,sn=Xa.x,an=Xa.y,dn=za?De(Sa.area/za):0,In;if(za==Xa.dx){for((fi||dn>Xa.dy)&&(dn=Xa.dy);++oiXa.dx)&&(dn=Xa.dx);++oi1);return me+De*dt*Math.sqrt(-2*Math.log(Tt)/Tt)}},logNormal:function(){var me=v.random.normal.apply(v,arguments);return function(){return Math.exp(me())}},bates:function(me){var De=v.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,jl),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 io(me,_r),tr()},zt.copy=function(){return Mn(me,De,et,dt)},tr()}function Qn(me,De){return v.rebind(me,De,"range","rangeRound","interpolate","clamp")}function io(me,De){return Pi(me,Di(eo(me,De)[2])),Pi(me,Di(eo(me,De)[2])),me}function eo(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 v.range.apply(v,eo(me,De))}var An={s:1,g:1,p:1,r:1,e:1};function un(me){return-Math.floor(Math.log(me)/Math.LN10+.01)}function yo(me,De){var et=un(De[2]);return me in An?Math.abs(et-un(Math.max(l(De[0]),l(De[1]))))+ +(me!=="e"):et-(me==="%")*2}v.scale.log=function(){return Qo(v.scale.linear().domain([0,1]),10,!0,[1,10])};function Qo(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:ks);return me.domain(zt),dt=zt.map(Tt),tr},tr.ticks=function(){var zt=Hi(dt),_r=[],Gr=zt[0],Xr=zt[1],wa=Math.floor(yt(Gr)),pa=Math.ceil(yt(Xr)),Ja=De%1?2:De;if(isFinite(pa-wa)){if(et){for(;wa0;ti--)_r.push(Tt(wa)*ti);for(wa=0;_r[wa]Xr;pa--);_r=_r.slice(wa,pa)}return _r},tr.copy=function(){return Qo(me.copy(),De,et,dt)},Qn(tr,me)}var ks={floor:function(me){return-Math.ceil(-me)},ceil:function(me){return-Math.floor(-me)}};v.scale.pow=function(){return rl(v.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(io(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)},Qn(Tt,me)}function Ns(me){return function(De){return De<0?-Math.pow(-De,me):Math.pow(De,me)}}v.scale.sqrt=function(){return v.scale.pow().exponent(.5)},v.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 v.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=Ke)return _r(Xr,ti)+(Gr?_r(Gr,1-ti):"")+"Z";var Sa,za,Xa,fi,oi=0,La=0,sn,an,dn,In,Jn,ro,$o,no,Xo=[];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=cr(Xa/Xr*Math.sin(fi))),Gr&&(oi=cr(Xa/Gr*Math.sin(fi)))),Xr){sn=Xr*Math.cos(wa+La),an=Xr*Math.sin(wa+La),dn=Xr*Math.cos(pa-La),In=Xr*Math.sin(pa-La);var cl=Math.abs(pa-wa-2*La)<=Le?0:1;if(La&&yc(sn,an,dn,In)===ti^cl){var al=(wa+pa)/2;sn=Xr*Math.cos(al),an=Xr*Math.sin(al),dn=In=null}}else sn=an=0;if(Gr){Jn=Gr*Math.cos(pa-oi),ro=Gr*Math.sin(pa-oi),$o=Gr*Math.cos(wa+oi),no=Gr*Math.sin(wa+oi);var _l=Math.abs(wa-pa+2*oi)<=Le?0:1;if(oi&&yc(Jn,ro,$o,no)===1-ti^_l){var mn=(wa+pa)/2;Jn=Gr*Math.cos(mn),ro=Gr*Math.sin(mn),$o=no=null}}else Jn=ro=0;if(Ja>Ye&&(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,wa=me[1]+Gr,pa=De[0]+_r,Ja=De[1]+Gr,ti=(Xr+pa)/2,Sa=(wa+Ja)/2,za=pa-Xr,Xa=Ja-wa,fi=za*za+Xa*Xa,oi=et-dt,La=Xr*Ja-pa*wa,sn=(Xa<0?-1:1)*Math.sqrt(Math.max(0,oi*oi*fi-La*La)),an=(La*Xa-za*sn)/fi,dn=(-La*za-Xa*sn)/fi,In=(La*Xa+za*sn)/fi,Jn=(-La*za+Xa*sn)/fi,ro=an-ti,$o=dn-Sa,no=In-ti,Xo=Jn-Sa;return ro*ro+$o*$o>no*no+Xo*Xo&&(an=In,dn=Jn),[[an-_r,dn-Gr],[an*et/oi,dn*et/oi]]}function Fo(){return!0}function Dc(me){var De=Co,et=bo,dt=Fo,yt=Yu,Tt=yt.key,tr=.7;function zt(_r){var Gr=[],Xr=[],wa=-1,pa=_r.length,Ja,ti=Ir(De),Sa=Ir(et);function za(){Gr.push("M",yt(me(Xr),tr))}for(;++wa1?me.join("L"):me+"Z"}function Oe(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 ur(me){return me.length<3?Yu(me):me[0]+wt(me,Dt(me))}v.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 "+wa}function Gr(Xr,wa,pa,Ja){return"Q 0,0 "+Ja}return Tt.radius=function(Xr){return arguments.length?(et=Ir(Xr),Tt):et},Tt.source=function(Xr){return arguments.length?(me=Ir(Xr),Tt):me},Tt.target=function(Xr){return arguments.length?(De=Ir(Xr),Tt):De},Tt.startAngle=function(Xr){return arguments.length?(dt=Ir(Xr),Tt):dt},Tt.endAngle=function(Xr){return arguments.length?(yt=Ir(Xr),Tt):yt},Tt};function ha(me){return me.radius}v.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=Ir(yt),dt):me},dt.target=function(yt){return arguments.length?(De=Ir(yt),dt):De},dt.projection=function(yt){return arguments.length?(et=yt,dt):et},dt};function Aa(me){return[me.x,me.y]}v.svg.diagonal.radial=function(){var me=v.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)]}}v.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=Ir(dt),et):me},et.size=function(dt){return arguments.length?(De=Ir(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=v.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*Kn)),et=De*Kn;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/Sn),et=De*Sn/2;return"M0,"+et+"L"+De+","+-et+" "+-De+","+-et+"Z"},"triangle-up":function(me){var De=Math.sqrt(me/Sn),et=De*Sn/2;return"M0,"+-et+"L"+De+","+et+" "+-De+","+et+"Z"}});v.svg.symbolTypes=on.keys();var Sn=Math.sqrt(3),Kn=Math.tan(30*ot);ae.transition=function(me){for(var De=ds||++Yo,et=ts(me),dt=[],yt,Tt,tr=ul||{time:Date.now(),ease:ql,delay:0,duration:250},zt=-1,_r=this.length;++zt<_r;){dt.push(yt=[]);for(var Gr=this[zt],Xr=-1,wa=Gr.length;++Xr0;)wa[--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=Tn(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)}v.svg.axis=function(){var me=v.scale.linear(),De=tu,et=6,dt=6,yt=3,Tt=[10],tr=null,zt;function _r(Gr){Gr.each(function(){var Xr=v.select(this),wa=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",Ye),Xa=v.transition(Sa.exit()).style("opacity",Ye).remove(),fi=v.transition(Sa.order()).style("opacity",1),oi=Math.max(et,0)+yt,La,sn=Qi(pa),an=Xr.selectAll(".domain").data([0]),dn=(an.enter().append("path").attr("class","domain"),v.transition(an));za.append("line"),za.append("text");var In=za.select("line"),Jn=fi.select("line"),ro=Sa.select("text").text(ti),$o=za.select("text"),no=fi.select("text"),Xo=De==="top"||De==="left"?-1:1,cl,al,_l,mn;if(De==="bottom"||De==="top"?(La=vu,cl="x",_l="y",al="x2",mn="y2",ro.attr("dy",Xo<0?"0em":".71em").style("text-anchor","middle"),dn.attr("d","M"+sn[0]+","+Xo*dt+"V0H"+sn[1]+"V"+Xo*dt)):(La=wl,cl="y",_l="x",al="y2",mn="x2",ro.attr("dy",".32em").style("text-anchor",Xo<0?"end":"start"),dn.attr("d","M"+Xo*dt+","+sn[0]+"H0V"+sn[1]+"H"+Xo*dt)),In.attr(mn,Xo*et),$o.attr(_l,Xo*oi),Jn.attr(al,0).attr(mn,Xo*et),no.attr(cl,0).attr(_l,Xo*oi),pa.rangeBand){var po=pa,fs=po.rangeBand()/2;wa=pa=function(ms){return po(ms)+fs}}else wa.rangeBand?wa=pa:Xa.call(La,pa,wa);za.call(La,wa,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+"":tu,_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 tu="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 wl(me,De,et){me.attr("transform",function(dt){var yt=De(dt);return"translate(0,"+(isFinite(yt)?yt:et(dt))+")"})}v.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=v.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(an){return"resize "+an}).style("cursor",function(an){return fu[an]}).append("rect").attr("x",function(an){return/[ew]$/.test(an)?-3:null}).attr("y",function(an){return/^[ns]/.test(an)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),fi.style("display",Xr.empty()?"none":null);var oi=v.transition(za),La=v.transition(Xa),sn;De&&(sn=Qi(De),La.attr("x",sn[0]).attr("width",sn[1]-sn[0]),pa(oi)),et&&(sn=Qi(et),La.attr("y",sn[0]).attr("height",sn[1]-sn[0]),Ja(oi)),wa(oi)})}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,ds?v.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 oi=qu(dt,Xa.x),La=qu(yt,Xa.y);return Tt=tr=null,function(sn){dt=Xa.x=oi(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 wa(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=v.select(v.event.target),Xa=me.of(Sa,arguments),fi=v.select(Sa),oi=za.datum(),La=!/^(n|s)$/.test(oi)&&De,sn=!/^(e|w)$/.test(oi)&&et,an=za.classed("extent"),dn=kr(Sa),In,Jn=v.mouse(Sa),ro,$o=v.select(t(Sa)).on("keydown.brush",cl).on("keyup.brush",al);if(v.event.changedTouches?$o.on("touchmove.brush",_l).on("touchend.brush",po):$o.on("mousemove.brush",_l).on("mouseup.brush",po),fi.interrupt().selectAll("*").interrupt(),an)Jn[0]=dt[0]-Jn[0],Jn[1]=yt[0]-Jn[1];else if(oi){var no=+/w$/.test(oi),Xo=+/^n/.test(oi);ro=[dt[1-no]-Jn[0],yt[1-Xo]-Jn[1]],Jn[0]=dt[no],Jn[1]=yt[Xo]}else v.event.altKey&&(In=Jn.slice());fi.style("pointer-events","none").selectAll(".resize").style("display",null),v.select("body").style("cursor",za.style("cursor")),Xa({type:"brushstart"}),_l();function cl(){v.event.keyCode==32&&(an||(In=null,Jn[0]-=dt[1],Jn[1]-=yt[1],an=2),$())}function al(){v.event.keyCode==32&&an==2&&(Jn[0]+=dt[1],Jn[1]+=yt[1],an=0,$())}function _l(){var fs=v.mouse(Sa),ms=!1;ro&&(fs[0]+=ro[0],fs[1]+=ro[1]),an||(v.event.altKey?(In||(In=[(dt[0]+dt[1])/2,(yt[0]+yt[1])/2]),Jn[0]=dt[+(fs[0]0))return Vt;do Vt.push(Ar=new Date(+St)),Ce(St,Bt),ne(St);while(Ar=kt)for(;ne(kt),!St(kt);)kt.setTime(kt-1)},function(kt,Bt){if(kt>=kt)if(Bt<0)for(;++Bt<=0;)for(;Ce(kt,-1),!St(kt););else for(;--Bt>=0;)for(;Ce(kt,1),!St(kt););})},Ze&&(Je.count=function(St,kt){return _.setTime(+St),S.setTime(+kt),ne(_),ne(S),Math.floor(Ze(_,S))},Je.every=function(St){return St=Math.floor(St),!isFinite(St)||!(St>0)?null:St>1?Je.filter(rt?function(kt){return rt(kt)%St===0}:function(kt){return Je.count(0,kt)%St===0}):Je}),Je}var e=M(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?M(function(Ce){Ce.setTime(Math.floor(Ce/ne)*ne)},function(Ce,Ze){Ce.setTime(+Ce+Ze*ne)},function(Ce,Ze){return(Ze-Ce)/ne}):e};var t=e.range,r=1e3,o=6e4,a=36e5,i=864e5,n=6048e5,s=M(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=M(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()}),m=f.range,c=M(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=M(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)/i},function(ne){return ne.getDate()-1}),x=l.range;function w(ne){return M(function(Ce){Ce.setDate(Ce.getDate()-(Ce.getDay()+7-ne)%7),Ce.setHours(0,0,0,0)},function(Ce,Ze){Ce.setDate(Ce.getDate()+Ze*7)},function(Ce,Ze){return(Ze-Ce-(Ze.getTimezoneOffset()-Ce.getTimezoneOffset())*o)/n})}var A=w(0),E=w(1),p=w(2),b=w(3),d=w(4),u=w(5),g=w(6),y=A.range,D=E.range,P=p.range,z=b.range,F=d.range,N=u.range,O=g.range,L=M(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=L.range,B=M(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:M(function(Ce){Ce.setFullYear(Math.floor(Ce.getFullYear()/ne)*ne),Ce.setMonth(0,1),Ce.setHours(0,0,0,0)},function(Ce,Ze){Ce.setFullYear(Ce.getFullYear()+Ze*ne)})};var W=B.range,$=M(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()}),ue=$.range,ce=M(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,Y=M(function(ne){ne.setUTCHours(0,0,0,0)},function(ne,Ce){ne.setUTCDate(ne.getUTCDate()+Ce)},function(ne,Ce){return(Ce-ne)/i},function(ne){return ne.getUTCDate()-1}),X=Y.range;function Q(ne){return M(function(Ce){Ce.setUTCDate(Ce.getUTCDate()-(Ce.getUTCDay()+7-ne)%7),Ce.setUTCHours(0,0,0,0)},function(Ce,Ze){Ce.setUTCDate(Ce.getUTCDate()+Ze*7)},function(Ce,Ze){return(Ze-Ce)/n})}var V=Q(0),le=Q(1),ae=Q(2),j=Q(3),ee=Q(4),te=Q(5),pe=Q(6),we=V.range,Se=le.range,Re=ae.range,Pe=j.range,je=ee.range,at=te.range,nt=pe.range,tt=M(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()}),Ve=tt.range,he=M(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:M(function(Ce){Ce.setUTCFullYear(Math.floor(Ce.getUTCFullYear()/ne)*ne),Ce.setUTCMonth(0,1),Ce.setUTCHours(0,0,0,0)},function(Ce,Ze){Ce.setUTCFullYear(Ce.getUTCFullYear()+Ze*ne)})};var se=he.range;v.timeDay=l,v.timeDays=x,v.timeFriday=u,v.timeFridays=N,v.timeHour=c,v.timeHours=T,v.timeInterval=M,v.timeMillisecond=e,v.timeMilliseconds=t,v.timeMinute=f,v.timeMinutes=m,v.timeMonday=E,v.timeMondays=D,v.timeMonth=L,v.timeMonths=U,v.timeSaturday=g,v.timeSaturdays=O,v.timeSecond=s,v.timeSeconds=h,v.timeSunday=A,v.timeSundays=y,v.timeThursday=d,v.timeThursdays=F,v.timeTuesday=p,v.timeTuesdays=P,v.timeWednesday=b,v.timeWednesdays=z,v.timeWeek=A,v.timeWeeks=y,v.timeYear=B,v.timeYears=W,v.utcDay=Y,v.utcDays=X,v.utcFriday=te,v.utcFridays=at,v.utcHour=ce,v.utcHours=de,v.utcMillisecond=e,v.utcMilliseconds=t,v.utcMinute=$,v.utcMinutes=ue,v.utcMonday=le,v.utcMondays=Se,v.utcMonth=tt,v.utcMonths=Ve,v.utcSaturday=pe,v.utcSaturdays=nt,v.utcSecond=s,v.utcSeconds=h,v.utcSunday=V,v.utcSundays=we,v.utcThursday=ee,v.utcThursdays=je,v.utcTuesday=ae,v.utcTuesdays=Re,v.utcWednesday=j,v.utcWednesdays=Pe,v.utcWeek=V,v.utcWeeks=we,v.utcYear=he,v.utcYears=se,Object.defineProperty(v,"__esModule",{value:!0})})}}),Zv=He({"node_modules/d3-time-format/dist/d3-time-format.js"(Z,q){(function(v,_){typeof Z=="object"&&typeof q<"u"?_(Z,dd()):(v=v||self,_(v.d3=v.d3||{},v.d3))})(Z,function(v,_){"use strict";function S(Fe){if(0<=Fe.y&&Fe.y<100){var Ye=new Date(-1,Fe.m,Fe.d,Fe.H,Fe.M,Fe.S,Fe.L);return Ye.setFullYear(Fe.y),Ye}return new Date(Fe.y,Fe.m,Fe.d,Fe.H,Fe.M,Fe.S,Fe.L)}function M(Fe){if(0<=Fe.y&&Fe.y<100){var Ye=new Date(Date.UTC(-1,Fe.m,Fe.d,Fe.H,Fe.M,Fe.S,Fe.L));return Ye.setUTCFullYear(Fe.y),Ye}return new Date(Date.UTC(Fe.y,Fe.m,Fe.d,Fe.H,Fe.M,Fe.S,Fe.L))}function e(Fe,Ye,Ae){return{y:Fe,m:Ye,d:Ae,H:0,M:0,S:0,L:0}}function t(Fe){var Ye=Fe.dateTime,Ae=Fe.date,Le=Fe.time,We=Fe.periods,Ke=Fe.days,st=Fe.shortDays,ot=Fe.months,Ut=Fe.shortMonths,Ct=h(We),Pt=f(We),jt=h(Ke),cr=f(Ke),or=h(st),nr=f(st),Pr=h(ot),_a=f(ot),Fa=h(Ut),Ra=f(Ut),qa={a:$a,A:Za,b:ri,B:pi,c:null,d:L,e:L,f:ue,H:U,I:B,j:W,L:$,m:ce,M:de,p:Ia,q:rn,Q:kt,s:Bt,S:Y,u:X,U:Q,V,w:le,W:ae,x:null,X:null,y:j,Y:ee,Z:te,"%":St},Wa={a:tn,A:cn,b:xt,B:ut,c:null,d:pe,e:pe,f:je,H:we,I:Se,j:Re,L:Pe,m:at,M:nt,p:Or,q:Cr,Q:kt,s:Bt,S:tt,u:Ve,U:he,V:se,w:ne,W:Ce,x:null,X:null,y:Ze,Y:rt,Z:Je,"%":St},Ca={a:Zt,A:Jt,b:Fr,B:ta,c:ra,d,e:d,f:z,H:g,I:g,j:u,L:P,m:b,M:y,p:Rt,q:p,Q:N,s:O,S:D,u:c,U:T,V:l,w:m,W:x,x:ca,X:Ba,y:A,Y:w,Z:E,"%":F};qa.x=hi(Ae,qa),qa.X=hi(Le,qa),qa.c=hi(Ye,qa),Wa.x=hi(Ae,Wa),Wa.X=hi(Le,Wa),Wa.c=hi(Ye,Wa);function hi(wr,Rr){return function(Nr){var Hr=[],gt=-1,Kt=0,mr=wr.length,Ir,va,Pa;for(Nr instanceof Date||(Nr=new Date(+Nr));++gt53)return null;"w"in Hr||(Hr.w=1),"Z"in Hr?(Kt=M(e(Hr.y,0,1)),mr=Kt.getUTCDay(),Kt=mr>4||mr===0?_.utcMonday.ceil(Kt):_.utcMonday(Kt),Kt=_.utcDay.offset(Kt,(Hr.V-1)*7),Hr.y=Kt.getUTCFullYear(),Hr.m=Kt.getUTCMonth(),Hr.d=Kt.getUTCDate()+(Hr.w+6)%7):(Kt=S(e(Hr.y,0,1)),mr=Kt.getDay(),Kt=mr>4||mr===0?_.timeMonday.ceil(Kt):_.timeMonday(Kt),Kt=_.timeDay.offset(Kt,(Hr.V-1)*7),Hr.y=Kt.getFullYear(),Hr.m=Kt.getMonth(),Hr.d=Kt.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),mr="Z"in Hr?M(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-(mr+5)%7:Hr.w+Hr.U*7-(mr+6)%7);return"Z"in Hr?(Hr.H+=Hr.Z/100|0,Hr.M+=Hr.Z%100,M(Hr)):S(Hr)}}function Yt(wr,Rr,Nr,Hr){for(var gt=0,Kt=Rr.length,mr=Nr.length,Ir,va;gt=mr)return-1;if(Ir=Rr.charCodeAt(gt++),Ir===37){if(Ir=Rr.charAt(gt++),va=Ca[Ir in r?Rr.charAt(gt++):Ir],!va||(Hr=va(wr,Nr,Hr))<0)return-1}else if(Ir!=Nr.charCodeAt(Hr++))return-1}return Hr}function Rt(wr,Rr,Nr){var Hr=Ct.exec(Rr.slice(Nr));return Hr?(wr.p=Pt[Hr[0].toLowerCase()],Nr+Hr[0].length):-1}function Zt(wr,Rr,Nr){var Hr=or.exec(Rr.slice(Nr));return Hr?(wr.w=nr[Hr[0].toLowerCase()],Nr+Hr[0].length):-1}function Jt(wr,Rr,Nr){var Hr=jt.exec(Rr.slice(Nr));return Hr?(wr.w=cr[Hr[0].toLowerCase()],Nr+Hr[0].length):-1}function Fr(wr,Rr,Nr){var Hr=Fa.exec(Rr.slice(Nr));return Hr?(wr.m=Ra[Hr[0].toLowerCase()],Nr+Hr[0].length):-1}function ta(wr,Rr,Nr){var Hr=Pr.exec(Rr.slice(Nr));return Hr?(wr.m=_a[Hr[0].toLowerCase()],Nr+Hr[0].length):-1}function ra(wr,Rr,Nr){return Yt(wr,Ye,Rr,Nr)}function ca(wr,Rr,Nr){return Yt(wr,Ae,Rr,Nr)}function Ba(wr,Rr,Nr){return Yt(wr,Le,Rr,Nr)}function $a(wr){return st[wr.getDay()]}function Za(wr){return Ke[wr.getDay()]}function ri(wr){return Ut[wr.getMonth()]}function pi(wr){return ot[wr.getMonth()]}function Ia(wr){return We[+(wr.getHours()>=12)]}function rn(wr){return 1+~~(wr.getMonth()/3)}function tn(wr){return st[wr.getUTCDay()]}function cn(wr){return Ke[wr.getUTCDay()]}function xt(wr){return Ut[wr.getUTCMonth()]}function ut(wr){return ot[wr.getUTCMonth()]}function Or(wr){return We[+(wr.getUTCHours()>=12)]}function Cr(wr){return 1+~~(wr.getUTCMonth()/3)}return{format:function(wr){var Rr=hi(wr+="",qa);return Rr.toString=function(){return wr},Rr},parse:function(wr){var Rr=wi(wr+="",!1);return Rr.toString=function(){return wr},Rr},utcFormat:function(wr){var Rr=hi(wr+="",Wa);return Rr.toString=function(){return wr},Rr},utcParse:function(wr){var Rr=wi(wr+="",!0);return Rr.toString=function(){return wr},Rr}}}var r={"-":"",_:" ",0:"0"},o=/^\s*\d+/,a=/^%/,i=/[\\^$*+?|[\]().{}]/g;function n(Fe,Ye,Ae){var Le=Fe<0?"-":"",We=(Le?-Fe:Fe)+"",Ke=We.length;return Le+(Ke68?1900:2e3),Ae+Le[0].length):-1}function E(Fe,Ye,Ae){var Le=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(Ye.slice(Ae,Ae+6));return Le?(Fe.Z=Le[1]?0:-(Le[2]+(Le[3]||"00")),Ae+Le[0].length):-1}function p(Fe,Ye,Ae){var Le=o.exec(Ye.slice(Ae,Ae+1));return Le?(Fe.q=Le[0]*3-3,Ae+Le[0].length):-1}function b(Fe,Ye,Ae){var Le=o.exec(Ye.slice(Ae,Ae+2));return Le?(Fe.m=Le[0]-1,Ae+Le[0].length):-1}function d(Fe,Ye,Ae){var Le=o.exec(Ye.slice(Ae,Ae+2));return Le?(Fe.d=+Le[0],Ae+Le[0].length):-1}function u(Fe,Ye,Ae){var Le=o.exec(Ye.slice(Ae,Ae+3));return Le?(Fe.m=0,Fe.d=+Le[0],Ae+Le[0].length):-1}function g(Fe,Ye,Ae){var Le=o.exec(Ye.slice(Ae,Ae+2));return Le?(Fe.H=+Le[0],Ae+Le[0].length):-1}function y(Fe,Ye,Ae){var Le=o.exec(Ye.slice(Ae,Ae+2));return Le?(Fe.M=+Le[0],Ae+Le[0].length):-1}function D(Fe,Ye,Ae){var Le=o.exec(Ye.slice(Ae,Ae+2));return Le?(Fe.S=+Le[0],Ae+Le[0].length):-1}function P(Fe,Ye,Ae){var Le=o.exec(Ye.slice(Ae,Ae+3));return Le?(Fe.L=+Le[0],Ae+Le[0].length):-1}function z(Fe,Ye,Ae){var Le=o.exec(Ye.slice(Ae,Ae+6));return Le?(Fe.L=Math.floor(Le[0]/1e3),Ae+Le[0].length):-1}function F(Fe,Ye,Ae){var Le=a.exec(Ye.slice(Ae,Ae+1));return Le?Ae+Le[0].length:-1}function N(Fe,Ye,Ae){var Le=o.exec(Ye.slice(Ae));return Le?(Fe.Q=+Le[0],Ae+Le[0].length):-1}function O(Fe,Ye,Ae){var Le=o.exec(Ye.slice(Ae));return Le?(Fe.s=+Le[0],Ae+Le[0].length):-1}function L(Fe,Ye){return n(Fe.getDate(),Ye,2)}function U(Fe,Ye){return n(Fe.getHours(),Ye,2)}function B(Fe,Ye){return n(Fe.getHours()%12||12,Ye,2)}function W(Fe,Ye){return n(1+_.timeDay.count(_.timeYear(Fe),Fe),Ye,3)}function $(Fe,Ye){return n(Fe.getMilliseconds(),Ye,3)}function ue(Fe,Ye){return $(Fe,Ye)+"000"}function ce(Fe,Ye){return n(Fe.getMonth()+1,Ye,2)}function de(Fe,Ye){return n(Fe.getMinutes(),Ye,2)}function Y(Fe,Ye){return n(Fe.getSeconds(),Ye,2)}function X(Fe){var Ye=Fe.getDay();return Ye===0?7:Ye}function Q(Fe,Ye){return n(_.timeSunday.count(_.timeYear(Fe)-1,Fe),Ye,2)}function V(Fe,Ye){var Ae=Fe.getDay();return Fe=Ae>=4||Ae===0?_.timeThursday(Fe):_.timeThursday.ceil(Fe),n(_.timeThursday.count(_.timeYear(Fe),Fe)+(_.timeYear(Fe).getDay()===4),Ye,2)}function le(Fe){return Fe.getDay()}function ae(Fe,Ye){return n(_.timeMonday.count(_.timeYear(Fe)-1,Fe),Ye,2)}function j(Fe,Ye){return n(Fe.getFullYear()%100,Ye,2)}function ee(Fe,Ye){return n(Fe.getFullYear()%1e4,Ye,4)}function te(Fe){var Ye=Fe.getTimezoneOffset();return(Ye>0?"-":(Ye*=-1,"+"))+n(Ye/60|0,"0",2)+n(Ye%60,"0",2)}function pe(Fe,Ye){return n(Fe.getUTCDate(),Ye,2)}function we(Fe,Ye){return n(Fe.getUTCHours(),Ye,2)}function Se(Fe,Ye){return n(Fe.getUTCHours()%12||12,Ye,2)}function Re(Fe,Ye){return n(1+_.utcDay.count(_.utcYear(Fe),Fe),Ye,3)}function Pe(Fe,Ye){return n(Fe.getUTCMilliseconds(),Ye,3)}function je(Fe,Ye){return Pe(Fe,Ye)+"000"}function at(Fe,Ye){return n(Fe.getUTCMonth()+1,Ye,2)}function nt(Fe,Ye){return n(Fe.getUTCMinutes(),Ye,2)}function tt(Fe,Ye){return n(Fe.getUTCSeconds(),Ye,2)}function Ve(Fe){var Ye=Fe.getUTCDay();return Ye===0?7:Ye}function he(Fe,Ye){return n(_.utcSunday.count(_.utcYear(Fe)-1,Fe),Ye,2)}function se(Fe,Ye){var Ae=Fe.getUTCDay();return Fe=Ae>=4||Ae===0?_.utcThursday(Fe):_.utcThursday.ceil(Fe),n(_.utcThursday.count(_.utcYear(Fe),Fe)+(_.utcYear(Fe).getUTCDay()===4),Ye,2)}function ne(Fe){return Fe.getUTCDay()}function Ce(Fe,Ye){return n(_.utcMonday.count(_.utcYear(Fe)-1,Fe),Ye,2)}function Ze(Fe,Ye){return n(Fe.getUTCFullYear()%100,Ye,2)}function rt(Fe,Ye){return n(Fe.getUTCFullYear()%1e4,Ye,4)}function Je(){return"+0000"}function St(){return"%"}function kt(Fe){return+Fe}function Bt(Fe){return Math.floor(+Fe/1e3)}var Vt;Ar({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 Ar(Fe){return Vt=t(Fe),v.timeFormat=Vt.format,v.timeParse=Vt.parse,v.utcFormat=Vt.utcFormat,v.utcParse=Vt.utcParse,Vt}var vr="%Y-%m-%dT%H:%M:%S.%LZ";function qr(Fe){return Fe.toISOString()}var kr=Date.prototype.toISOString?qr:v.utcFormat(vr);function Ur(Fe){var Ye=new Date(Fe);return isNaN(Ye)?null:Ye}var _t=+new Date("2000-01-01T00:00:00.000Z")?Ur:v.utcParse(vr);v.isoFormat=kr,v.isoParse=_t,v.timeFormatDefaultLocale=Ar,v.timeFormatLocale=t,Object.defineProperty(v,"__esModule",{value:!0})})}}),YA=He({"node_modules/d3-format/dist/d3-format.js"(Z,q){(function(v,_){typeof Z=="object"&&typeof q<"u"?_(Z):(v=typeof globalThis<"u"?globalThis:v||self,_(v.d3=v.d3||{}))})(Z,function(v){"use strict";function _(b){return Math.abs(b=Math.round(b))>=1e21?b.toLocaleString("en").replace(/,/g,""):b.toString(10)}function S(b,d){if((u=(b=d?b.toExponential(d-1):b.toExponential()).indexOf("e"))<0)return null;var u,g=b.slice(0,u);return[g.length>1?g[0]+g.slice(2):g,+b.slice(u+1)]}function M(b){return b=S(Math.abs(b)),b?b[1]:NaN}function e(b,d){return function(u,g){for(var y=u.length,D=[],P=0,z=b[0],F=0;y>0&&z>0&&(F+z+1>g&&(z=Math.max(1,g-F)),D.push(u.substring(y-=z,y+z)),!((F+=z+1)>g));)z=b[P=(P+1)%b.length];return D.reverse().join(d)}}function t(b){return function(d){return d.replace(/[0-9]/g,function(u){return b[+u]})}}var r=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function o(b){if(!(d=r.exec(b)))throw new Error("invalid format: "+b);var d;return new a({fill:d[1],align:d[2],sign:d[3],symbol:d[4],zero:d[5],width:d[6],comma:d[7],precision:d[8]&&d[8].slice(1),trim:d[9],type:d[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 i(b){e:for(var d=b.length,u=1,g=-1,y;u0&&(g=0);break}return g>0?b.slice(0,g)+b.slice(y+1):b}var n;function s(b,d){var u=S(b,d);if(!u)return b+"";var g=u[0],y=u[1],D=y-(n=Math.max(-8,Math.min(8,Math.floor(y/3)))*3)+1,P=g.length;return D===P?g:D>P?g+new Array(D-P+1).join("0"):D>0?g.slice(0,D)+"."+g.slice(D):"0."+new Array(1-D).join("0")+S(b,Math.max(0,d+D-1))[0]}function h(b,d){var u=S(b,d);if(!u)return b+"";var g=u[0],y=u[1];return y<0?"0."+new Array(-y).join("0")+g:g.length>y+1?g.slice(0,y+1)+"."+g.slice(y+1):g+new Array(y-g.length+2).join("0")}var f={"%":function(b,d){return(b*100).toFixed(d)},b:function(b){return Math.round(b).toString(2)},c:function(b){return b+""},d:_,e:function(b,d){return b.toExponential(d)},f:function(b,d){return b.toFixed(d)},g:function(b,d){return b.toPrecision(d)},o:function(b){return Math.round(b).toString(8)},p:function(b,d){return h(b*100,d)},r:h,s,X:function(b){return Math.round(b).toString(16).toUpperCase()},x:function(b){return Math.round(b).toString(16)}};function m(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 d=b.grouping===void 0||b.thousands===void 0?m:e(c.call(b.grouping,Number),b.thousands+""),u=b.currency===void 0?"":b.currency[0]+"",g=b.currency===void 0?"":b.currency[1]+"",y=b.decimal===void 0?".":b.decimal+"",D=b.numerals===void 0?m:t(c.call(b.numerals,String)),P=b.percent===void 0?"%":b.percent+"",z=b.minus===void 0?"-":b.minus+"",F=b.nan===void 0?"NaN":b.nan+"";function N(L){L=o(L);var U=L.fill,B=L.align,W=L.sign,$=L.symbol,ue=L.zero,ce=L.width,de=L.comma,Y=L.precision,X=L.trim,Q=L.type;Q==="n"?(de=!0,Q="g"):f[Q]||(Y===void 0&&(Y=12),X=!0,Q="g"),(ue||U==="0"&&B==="=")&&(ue=!0,U="0",B="=");var V=$==="$"?u:$==="#"&&/[boxX]/.test(Q)?"0"+Q.toLowerCase():"",le=$==="$"?g:/[%p]/.test(Q)?P:"",ae=f[Q],j=/[defgprs%]/.test(Q);Y=Y===void 0?6:/[gprs]/.test(Q)?Math.max(1,Math.min(21,Y)):Math.max(0,Math.min(20,Y));function ee(te){var pe=V,we=le,Se,Re,Pe;if(Q==="c")we=ae(te)+we,te="";else{te=+te;var je=te<0||1/te<0;if(te=isNaN(te)?F:ae(Math.abs(te),Y),X&&(te=i(te)),je&&+te==0&&W!=="+"&&(je=!1),pe=(je?W==="("?W:z:W==="-"||W==="("?"":W)+pe,we=(Q==="s"?T[8+n/3]:"")+we+(je&&W==="("?")":""),j){for(Se=-1,Re=te.length;++SePe||Pe>57){we=(Pe===46?y+te.slice(Se+1):te.slice(Se))+we,te=te.slice(0,Se);break}}}de&&!ue&&(te=d(te,1/0));var at=pe.length+te.length+we.length,nt=at>1)+pe+te+we+nt.slice(at);break;default:te=nt+pe+te+we;break}return D(te)}return ee.toString=function(){return L+""},ee}function O(L,U){var B=N((L=o(L),L.type="f",L)),W=Math.max(-8,Math.min(8,Math.floor(M(U)/3)))*3,$=Math.pow(10,-W),ue=T[8+W/3];return function(ce){return B($*ce)+ue}}return{format:N,formatPrefix:O}}var x;w({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function w(b){return x=l(b),v.format=x.format,v.formatPrefix=x.formatPrefix,x}function A(b){return Math.max(0,-M(Math.abs(b)))}function E(b,d){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(M(d)/3)))*3-M(Math.abs(b)))}function p(b,d){return b=Math.abs(b),d=Math.abs(d)-b,Math.max(0,M(d)-M(b))+1}v.FormatSpecifier=a,v.formatDefaultLocale=w,v.formatLocale=l,v.formatSpecifier=o,v.precisionFixed=A,v.precisionPrefix=E,v.precisionRound=p,Object.defineProperty(v,"__esModule",{value:!0})})}}),l7=He({"node_modules/is-string-blank/index.js"(Z,q){"use strict";q.exports=function(v){for(var _=v.length,S,M=0;M<_;M++)if(S=v.charCodeAt(M),(S<9||S>13)&&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}}}),ns=He({"node_modules/fast-isnumeric/index.js"(Z,q){"use strict";var v=l7();q.exports=function(_){var S=typeof _;if(S==="string"){var M=_;if(_=+_,_===0&&v(M))return!1}else if(S!=="number")return!1;return _-_<1}}}),Gs=He({"src/constants/numerical.js"(Z,q){"use strict";q.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,q){(function(v,_){typeof Z=="object"&&typeof q<"u"?_(Z):(v=typeof globalThis<"u"?globalThis:v||self,_(v["base64-arraybuffer"]={}))})(Z,function(v){"use strict";for(var _="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",S=typeof Uint8Array>"u"?[]:new Uint8Array(256),M=0;M<_.length;M++)S[_.charCodeAt(M)]=M;var e=function(r){var o=new Uint8Array(r),a,i=o.length,n="";for(a=0;a>2],n+=_[(o[a]&3)<<4|o[a+1]>>4],n+=_[(o[a+1]&15)<<2|o[a+2]>>6],n+=_[o[a+2]&63];return i%3===2?n=n.substring(0,n.length-1)+"=":i%3===1&&(n=n.substring(0,n.length-2)+"=="),n},t=function(r){var o=r.length*.75,a=r.length,i,n=0,s,h,f,m;r[r.length-1]==="="&&(o--,r[r.length-2]==="="&&o--);var c=new ArrayBuffer(o),T=new Uint8Array(c);for(i=0;i>4,T[n++]=(h&15)<<4|f>>2,T[n++]=(f&3)<<6|m&63;return c};v.decode=t,v.encode=e,Object.defineProperty(v,"__esModule",{value:!0})})}}),Yv=He({"src/lib/is_plain_object.js"(Z,q){"use strict";q.exports=function(_){return window&&window.process&&window.process.versions?Object.prototype.toString.call(_)==="[object Object]":Object.prototype.toString.call(_)==="[object Object]"&&Object.getPrototypeOf(_).hasOwnProperty("hasOwnProperty")}}}),hp=He({"src/lib/array.js"(Z){"use strict";var q=KA().decode,v=Yv(),_=Array.isArray,S=ArrayBuffer,M=DataView;function e(s){return S.isView(s)&&!(s instanceof M)}Z.isTypedArray=e;function t(s){return _(s)||e(s)}Z.isArrayOrTypedArray=t;function r(s){return!t(s[0])}Z.isArray1D=r,Z.ensureArray=function(s,h){return _(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=i(s),m=f.dtype,c=o[m];if(!c)throw new Error('Error in dtype: "'+m+'"');var T=c.BYTES_PER_ELEMENT,l=f.bdata;a(l)||(l=q(l));var x=f.shape===void 0?[l.byteLength/T]:(""+f.shape).split(",");x.reverse();var w=x.length,A,E,p=+x[0],b=T*p,d=0;if(w===1)h=new c(l);else if(w===2)for(A=+x[1],E=0;E2)return c[A]=c[A]|e,x.set(w,null);if(l){for(h=A;h0)return Math.log(S)/Math.LN10;var e=Math.log(Math.min(M[0],M[1]))/Math.LN10;return v(e)||(e=Math.log(Math.max(M[0],M[1]))/Math.LN10-6),e}}}),f7=He({"src/lib/relink_private.js"(Z,q){"use strict";var v=hp().isArrayOrTypedArray,_=Yv();q.exports=function S(M,e){for(var t in e){var r=e[t],o=M[t];if(o!==r)if(t.charAt(0)==="_"||typeof r=="function"){if(t in M)continue;M[t]=r}else if(v(r)&&v(o)&&_(r[0])){if(t==="customdata"||t==="ids")continue;for(var a=Math.min(r.length,o.length),i=0;iM/2?S-Math.round(S/M)*M:S}q.exports={mod:v,modHalf:_}}}),Ch=He({"node_modules/tinycolor2/tinycolor.js"(Z,q){(function(v){var _=/^\s+/,S=/\s+$/,M=0,e=v.round,t=v.min,r=v.max,o=v.random;function a(j,ee){if(j=j||"",ee=ee||{},j instanceof a)return j;if(!(this instanceof a))return new a(j,ee);var te=i(j);this._originalInput=j,this._r=te.r,this._g=te.g,this._b=te.b,this._a=te.a,this._roundA=e(100*this._a)/100,this._format=ee.format||te.format,this._gradientType=ee.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=te.ok,this._tc_id=M++}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(),ee,te,pe,we,Se,Re;return ee=j.r/255,te=j.g/255,pe=j.b/255,ee<=.03928?we=ee/12.92:we=v.pow((ee+.055)/1.055,2.4),te<=.03928?Se=te/12.92:Se=v.pow((te+.055)/1.055,2.4),pe<=.03928?Re=pe/12.92:Re=v.pow((pe+.055)/1.055,2.4),.2126*we+.7152*Se+.0722*Re},setAlpha:function(j){return this._a=L(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),ee=e(j.h*360),te=e(j.s*100),pe=e(j.v*100);return this._a==1?"hsv("+ee+", "+te+"%, "+pe+"%)":"hsva("+ee+", "+te+"%, "+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),ee=e(j.h*360),te=e(j.s*100),pe=e(j.l*100);return this._a==1?"hsl("+ee+", "+te+"%, "+pe+"%)":"hsla("+ee+", "+te+"%, "+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 ee="#"+l(this._r,this._g,this._b,this._a),te=ee,pe=this._gradientType?"GradientType = 1, ":"";if(j){var we=a(j);te="#"+l(we._r,we._g,we._b,we._a)}return"progid:DXImageTransform.Microsoft.gradient("+pe+"startColorstr="+ee+",endColorstr="+te+")"},toString:function(j){var ee=!!j;j=j||this._format;var te=!1,pe=this._a<1&&this._a>=0,we=!ee&&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"&&(te=this.toRgbString()),j==="prgb"&&(te=this.toPercentageRgbString()),(j==="hex"||j==="hex6")&&(te=this.toHexString()),j==="hex3"&&(te=this.toHexString(!0)),j==="hex4"&&(te=this.toHex8String(!0)),j==="hex8"&&(te=this.toHex8String()),j==="name"&&(te=this.toName()),j==="hsl"&&(te=this.toHslString()),j==="hsv"&&(te=this.toHsvString()),te||this.toHexString())},clone:function(){return a(this.toString())},_applyModification:function(j,ee){var te=j.apply(null,[this].concat([].slice.call(ee)));return this._r=te._r,this._g=te._g,this._b=te._b,this.setAlpha(te._a),this},lighten:function(){return this._applyModification(E,arguments)},brighten:function(){return this._applyModification(p,arguments)},darken:function(){return this._applyModification(b,arguments)},desaturate:function(){return this._applyModification(x,arguments)},saturate:function(){return this._applyModification(w,arguments)},greyscale:function(){return this._applyModification(A,arguments)},spin:function(){return this._applyModification(d,arguments)},_applyCombination:function(j,ee){return j.apply(null,[this].concat([].slice.call(ee)))},analogous:function(){return this._applyCombination(P,arguments)},complement:function(){return this._applyCombination(u,arguments)},monochromatic:function(){return this._applyCombination(z,arguments)},splitcomplement:function(){return this._applyCombination(D,arguments)},triad:function(){return this._applyCombination(g,arguments)},tetrad:function(){return this._applyCombination(y,arguments)}},a.fromRatio=function(j,ee){if(typeof j=="object"){var te={};for(var pe in j)j.hasOwnProperty(pe)&&(pe==="a"?te[pe]=j[pe]:te[pe]=de(j[pe]));j=te}return a(j,ee)};function i(j){var ee={r:0,g:0,b:0},te=1,pe=null,we=null,Se=null,Re=!1,Pe=!1;return typeof j=="string"&&(j=le(j)),typeof j=="object"&&(V(j.r)&&V(j.g)&&V(j.b)?(ee=n(j.r,j.g,j.b),Re=!0,Pe=String(j.r).substr(-1)==="%"?"prgb":"rgb"):V(j.h)&&V(j.s)&&V(j.v)?(pe=de(j.s),we=de(j.v),ee=m(j.h,pe,we),Re=!0,Pe="hsv"):V(j.h)&&V(j.s)&&V(j.l)&&(pe=de(j.s),Se=de(j.l),ee=h(j.h,pe,Se),Re=!0,Pe="hsl"),j.hasOwnProperty("a")&&(te=j.a)),te=L(te),{ok:Re,format:j.format||Pe,r:t(255,r(ee.r,0)),g:t(255,r(ee.g,0)),b:t(255,r(ee.b,0)),a:te}}function n(j,ee,te){return{r:U(j,255)*255,g:U(ee,255)*255,b:U(te,255)*255}}function s(j,ee,te){j=U(j,255),ee=U(ee,255),te=U(te,255);var pe=r(j,ee,te),we=t(j,ee,te),Se,Re,Pe=(pe+we)/2;if(pe==we)Se=Re=0;else{var je=pe-we;switch(Re=Pe>.5?je/(2-pe-we):je/(pe+we),pe){case j:Se=(ee-te)/je+(ee1&&(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(ee===0)pe=we=Se=te;else{var Pe=te<.5?te*(1+ee):te+ee-te*ee,je=2*te-Pe;pe=Re(je,Pe,j+1/3),we=Re(je,Pe,j),Se=Re(je,Pe,j-1/3)}return{r:pe*255,g:we*255,b:Se*255}}function f(j,ee,te){j=U(j,255),ee=U(ee,255),te=U(te,255);var pe=r(j,ee,te),we=t(j,ee,te),Se,Re,Pe=pe,je=pe-we;if(Re=pe===0?0:je/pe,pe==we)Se=0;else{switch(pe){case j:Se=(ee-te)/je+(ee>1)+720)%360;--ee;)pe.h=(pe.h+we)%360,Se.push(a(pe));return Se}function z(j,ee){ee=ee||6;for(var te=a(j).toHsv(),pe=te.h,we=te.s,Se=te.v,Re=[],Pe=1/ee;ee--;)Re.push(a({h:pe,s:we,v:Se})),Se=(Se+Pe)%1;return Re}a.mix=function(j,ee,te){te=te===0?0:te||50;var pe=a(j).toRgb(),we=a(ee).toRgb(),Se=te/100,Re={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(Re)},a.readability=function(j,ee){var te=a(j),pe=a(ee);return(v.max(te.getLuminance(),pe.getLuminance())+.05)/(v.min(te.getLuminance(),pe.getLuminance())+.05)},a.isReadable=function(j,ee,te){var pe=a.readability(j,ee),we,Se;switch(Se=!1,we=ae(te),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,ee,te){var pe=null,we=0,Se,Re,Pe,je;te=te||{},Re=te.includeFallbackColors,Pe=te.level,je=te.size;for(var at=0;atwe&&(we=Se,pe=a(ee[at]));return a.isReadable(j,pe,{level:Pe,size:je})||!Re?pe:(te.includeFallbackColors=!1,a.mostReadable(j,["#fff","#000"],te))};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 ee={};for(var te in j)j.hasOwnProperty(te)&&(ee[j[te]]=te);return ee}function L(j){return j=parseFloat(j),(isNaN(j)||j<0||j>1)&&(j=1),j}function U(j,ee){$(j)&&(j="100%");var te=ue(j);return j=t(ee,r(0,parseFloat(j))),te&&(j=parseInt(j*ee,10)/100),v.abs(j-ee)<1e-6?1:j%ee/parseFloat(ee)}function B(j){return t(1,r(0,j))}function W(j){return parseInt(j,16)}function $(j){return typeof j=="string"&&j.indexOf(".")!=-1&&parseFloat(j)===1}function ue(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 Y(j){return v.round(parseFloat(j)*255).toString(16)}function X(j){return W(j)/255}var Q=function(){var j="[-\\+]?\\d+%?",ee="[-\\+]?\\d*\\.\\d+%?",te="(?:"+ee+")|(?:"+j+")",pe="[\\s|\\(]+("+te+")[,|\\s]+("+te+")[,|\\s]+("+te+")\\s*\\)?",we="[\\s|\\(]+("+te+")[,|\\s]+("+te+")[,|\\s]+("+te+")[,|\\s]+("+te+")\\s*\\)?";return{CSS_UNIT:new RegExp(te),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 V(j){return!!Q.CSS_UNIT.exec(j)}function le(j){j=j.replace(_,"").replace(S,"").toLowerCase();var ee=!1;if(F[j])j=F[j],ee=!0;else if(j=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var te;return(te=Q.rgb.exec(j))?{r:te[1],g:te[2],b:te[3]}:(te=Q.rgba.exec(j))?{r:te[1],g:te[2],b:te[3],a:te[4]}:(te=Q.hsl.exec(j))?{h:te[1],s:te[2],l:te[3]}:(te=Q.hsla.exec(j))?{h:te[1],s:te[2],l:te[3],a:te[4]}:(te=Q.hsv.exec(j))?{h:te[1],s:te[2],v:te[3]}:(te=Q.hsva.exec(j))?{h:te[1],s:te[2],v:te[3],a:te[4]}:(te=Q.hex8.exec(j))?{r:W(te[1]),g:W(te[2]),b:W(te[3]),a:X(te[4]),format:ee?"name":"hex8"}:(te=Q.hex6.exec(j))?{r:W(te[1]),g:W(te[2]),b:W(te[3]),format:ee?"name":"hex"}:(te=Q.hex4.exec(j))?{r:W(te[1]+""+te[1]),g:W(te[2]+""+te[2]),b:W(te[3]+""+te[3]),a:X(te[4]+""+te[4]),format:ee?"name":"hex8"}:(te=Q.hex3.exec(j))?{r:W(te[1]+""+te[1]),g:W(te[2]+""+te[2]),b:W(te[3]+""+te[3]),format:ee?"name":"hex"}:!1}function ae(j){var ee,te;return j=j||{level:"AA",size:"small"},ee=(j.level||"AA").toUpperCase(),te=(j.size||"small").toLowerCase(),ee!=="AA"&&ee!=="AAA"&&(ee="AA"),te!=="small"&&te!=="large"&&(te="small"),{level:ee,size:te}}typeof q<"u"&&q.exports?q.exports=a:window.tinycolor=a})(Math)}}),rs=He({"src/lib/extend.js"(Z){"use strict";var q=Yv(),v=Array.isArray;function _(M,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 m=Math.round(s[0]*255)+", "+Math.round(s[1]*255)+", "+Math.round(s[2]*255);return h?"rgba("+m+", "+s[3]+")":"rgb("+m+")"}}}),Km=He({"src/constants/interactions.js"(Z,q){"use strict";q.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}}}),Jy=He({"src/lib/regex.js"(Z){"use strict";Z.counter=function(q,v,_,S){var M=(v||"")+(_?"":"$"),e=S===!1?"":"^";return q==="xy"?new RegExp(e+"x([2-9]|[1-9][0-9]+)?y([2-9]|[1-9][0-9]+)?"+M):new RegExp(e+q+"([2-9]|[1-9][0-9]+)?"+M)}}}),h7=He({"src/lib/coerce.js"(Z){"use strict";var q=ns(),v=Ch(),_=rs().extendFlat,S=au(),M=W0(),e=$n(),t=Km().DESELECTDIM,r=b_(),o=Jy().counter,a=Yy().modHalf,i=hp().isArrayOrTypedArray,n=hp().isTypedArraySpec,s=hp().decodeTypedArraySpec;Z.valObjectMeta={data_array:{coerceFunction:function(f,m,c){m.set(i(f)?f:n(f)?s(f):c)}},enumerated:{coerceFunction:function(f,m,c,T){T.coerceNumber&&(f=+f),T.values.indexOf(f)===-1?m.set(c):m.set(f)},validateFunction:function(f,m){m.coerceNumber&&(f=+f);for(var c=m.values,T=0;Tx===!0||x===!1;l(f)||T.arrayOk&&Array.isArray(f)&&f.length>0&&f.every(l)?m.set(f):m.set(c)}},number:{coerceFunction:function(f,m,c,T){n(f)&&(f=s(f)),!q(f)||T.min!==void 0&&fT.max?m.set(c):m.set(+f)}},integer:{coerceFunction:function(f,m,c,T){if((T.extras||[]).indexOf(f)!==-1){m.set(f);return}n(f)&&(f=s(f)),f%1||!q(f)||T.min!==void 0&&fT.max?m.set(c):m.set(+f)}},string:{coerceFunction:function(f,m,c,T){if(typeof f!="string"){var l=typeof f=="number";T.strict===!0||!l?m.set(c):m.set(String(f))}else T.noBlank&&!f?m.set(c):m.set(f)}},color:{coerceFunction:function(f,m,c){n(f)&&(f=s(f)),v(f).isValid()?m.set(f):m.set(c)}},colorlist:{coerceFunction:function(f,m,c){function T(l){return v(l).isValid()}!Array.isArray(f)||!f.length?m.set(c):f.every(T)?m.set(f):m.set(c)}},colorscale:{coerceFunction:function(f,m,c){m.set(M.get(f,c))}},angle:{coerceFunction:function(f,m,c){n(f)&&(f=s(f)),f==="auto"?m.set("auto"):q(f)?m.set(a(+f,360)):m.set(c)}},subplotid:{coerceFunction:function(f,m,c,T){var l=T.regex||o(c);let x=w=>typeof w=="string"&&l.test(w);x(f)||T.arrayOk&&i(f)&&f.length>0&&f.every(x)?m.set(f):m.set(c)},validateFunction:function(f,m){var c=m.dflt;return f===c?!0:typeof f!="string"?!1:!!o(c).test(f)}},flaglist:{coerceFunction:function(f,m,c,T){if((T.extras||[]).indexOf(f)!==-1){m.set(f);return}if(typeof f!="string"){m.set(c);return}for(var l=f.split("+"),x=0;x/g),c=0;c1){var e=["LOG:"];for(M=0;M1){var t=[];for(M=0;M"),"long")}},S.warn=function(){var M;if(v.logging>0){var e=["WARN:"];for(M=0;M0){var t=[];for(M=0;M"),"stick")}},S.error=function(){var M;if(v.logging>0){var e=["ERROR:"];for(M=0;M0){var t=[];for(M=0;M"),"stick")}}}}),p2=He({"src/lib/noop.js"(Z,q){"use strict";q.exports=function(){}}}),$A=He({"src/lib/push_unique.js"(Z,q){"use strict";q.exports=function(_,S){if(S instanceof RegExp){for(var M=S.toString(),e=0;e<_.length;e++)if(_[e]instanceof RegExp&&_[e].toString()===M)return _;_.push(S)}else(S||S===0)&&_.indexOf(S)===-1&&_.push(S);return _}}}),p7=He({"node_modules/gl-mat4/create.js"(Z,q){q.exports=v;function v(){var _=new Float32Array(16);return _[0]=1,_[1]=0,_[2]=0,_[3]=0,_[4]=0,_[5]=1,_[6]=0,_[7]=0,_[8]=0,_[9]=0,_[10]=1,_[11]=0,_[12]=0,_[13]=0,_[14]=0,_[15]=1,_}}}),d7=He({"node_modules/gl-mat4/clone.js"(Z,q){q.exports=v;function v(_){var S=new Float32Array(16);return S[0]=_[0],S[1]=_[1],S[2]=_[2],S[3]=_[3],S[4]=_[4],S[5]=_[5],S[6]=_[6],S[7]=_[7],S[8]=_[8],S[9]=_[9],S[10]=_[10],S[11]=_[11],S[12]=_[12],S[13]=_[13],S[14]=_[14],S[15]=_[15],S}}}),v7=He({"node_modules/gl-mat4/copy.js"(Z,q){q.exports=v;function v(_,S){return _[0]=S[0],_[1]=S[1],_[2]=S[2],_[3]=S[3],_[4]=S[4],_[5]=S[5],_[6]=S[6],_[7]=S[7],_[8]=S[8],_[9]=S[9],_[10]=S[10],_[11]=S[11],_[12]=S[12],_[13]=S[13],_[14]=S[14],_[15]=S[15],_}}}),QA=He({"node_modules/gl-mat4/identity.js"(Z,q){q.exports=v;function v(_){return _[0]=1,_[1]=0,_[2]=0,_[3]=0,_[4]=0,_[5]=1,_[6]=0,_[7]=0,_[8]=0,_[9]=0,_[10]=1,_[11]=0,_[12]=0,_[13]=0,_[14]=0,_[15]=1,_}}}),m7=He({"node_modules/gl-mat4/transpose.js"(Z,q){q.exports=v;function v(_,S){if(_===S){var M=S[1],e=S[2],t=S[3],r=S[6],o=S[7],a=S[11];_[1]=S[4],_[2]=S[8],_[3]=S[12],_[4]=M,_[6]=S[9],_[7]=S[13],_[8]=e,_[9]=r,_[11]=S[14],_[12]=t,_[13]=o,_[14]=a}else _[0]=S[0],_[1]=S[4],_[2]=S[8],_[3]=S[12],_[4]=S[1],_[5]=S[5],_[6]=S[9],_[7]=S[13],_[8]=S[2],_[9]=S[6],_[10]=S[10],_[11]=S[14],_[12]=S[3],_[13]=S[7],_[14]=S[11],_[15]=S[15];return _}}}),g7=He({"node_modules/gl-mat4/invert.js"(Z,q){q.exports=v;function v(_,S){var M=S[0],e=S[1],t=S[2],r=S[3],o=S[4],a=S[5],i=S[6],n=S[7],s=S[8],h=S[9],f=S[10],m=S[11],c=S[12],T=S[13],l=S[14],x=S[15],w=M*a-e*o,A=M*i-t*o,E=M*n-r*o,p=e*i-t*a,b=e*n-r*a,d=t*n-r*i,u=s*T-h*c,g=s*l-f*c,y=s*x-m*c,D=h*l-f*T,P=h*x-m*T,z=f*x-m*l,F=w*z-A*P+E*D+p*y-b*g+d*u;return F?(F=1/F,_[0]=(a*z-i*P+n*D)*F,_[1]=(t*P-e*z-r*D)*F,_[2]=(T*d-l*b+x*p)*F,_[3]=(f*b-h*d-m*p)*F,_[4]=(i*y-o*z-n*g)*F,_[5]=(M*z-t*y+r*g)*F,_[6]=(l*E-c*d-x*A)*F,_[7]=(s*d-f*E+m*A)*F,_[8]=(o*P-a*y+n*u)*F,_[9]=(e*y-M*P-r*u)*F,_[10]=(c*b-T*E+x*w)*F,_[11]=(h*E-s*b-m*w)*F,_[12]=(a*g-o*D-i*u)*F,_[13]=(M*D-e*g+t*u)*F,_[14]=(T*A-c*p-l*w)*F,_[15]=(s*p-h*A+f*w)*F,_):null}}}),y7=He({"node_modules/gl-mat4/adjoint.js"(Z,q){q.exports=v;function v(_,S){var M=S[0],e=S[1],t=S[2],r=S[3],o=S[4],a=S[5],i=S[6],n=S[7],s=S[8],h=S[9],f=S[10],m=S[11],c=S[12],T=S[13],l=S[14],x=S[15];return _[0]=a*(f*x-m*l)-h*(i*x-n*l)+T*(i*m-n*f),_[1]=-(e*(f*x-m*l)-h*(t*x-r*l)+T*(t*m-r*f)),_[2]=e*(i*x-n*l)-a*(t*x-r*l)+T*(t*n-r*i),_[3]=-(e*(i*m-n*f)-a*(t*m-r*f)+h*(t*n-r*i)),_[4]=-(o*(f*x-m*l)-s*(i*x-n*l)+c*(i*m-n*f)),_[5]=M*(f*x-m*l)-s*(t*x-r*l)+c*(t*m-r*f),_[6]=-(M*(i*x-n*l)-o*(t*x-r*l)+c*(t*n-r*i)),_[7]=M*(i*m-n*f)-o*(t*m-r*f)+s*(t*n-r*i),_[8]=o*(h*x-m*T)-s*(a*x-n*T)+c*(a*m-n*h),_[9]=-(M*(h*x-m*T)-s*(e*x-r*T)+c*(e*m-r*h)),_[10]=M*(a*x-n*T)-o*(e*x-r*T)+c*(e*n-r*a),_[11]=-(M*(a*m-n*h)-o*(e*m-r*h)+s*(e*n-r*a)),_[12]=-(o*(h*l-f*T)-s*(a*l-i*T)+c*(a*f-i*h)),_[13]=M*(h*l-f*T)-s*(e*l-t*T)+c*(e*f-t*h),_[14]=-(M*(a*l-i*T)-o*(e*l-t*T)+c*(e*i-t*a)),_[15]=M*(a*f-i*h)-o*(e*f-t*h)+s*(e*i-t*a),_}}}),_7=He({"node_modules/gl-mat4/determinant.js"(Z,q){q.exports=v;function v(_){var S=_[0],M=_[1],e=_[2],t=_[3],r=_[4],o=_[5],a=_[6],i=_[7],n=_[8],s=_[9],h=_[10],f=_[11],m=_[12],c=_[13],T=_[14],l=_[15],x=S*o-M*r,w=S*a-e*r,A=S*i-t*r,E=M*a-e*o,p=M*i-t*o,b=e*i-t*a,d=n*c-s*m,u=n*T-h*m,g=n*l-f*m,y=s*T-h*c,D=s*l-f*c,P=h*l-f*T;return x*P-w*D+A*y+E*g-p*u+b*d}}}),x7=He({"node_modules/gl-mat4/multiply.js"(Z,q){q.exports=v;function v(_,S,M){var e=S[0],t=S[1],r=S[2],o=S[3],a=S[4],i=S[5],n=S[6],s=S[7],h=S[8],f=S[9],m=S[10],c=S[11],T=S[12],l=S[13],x=S[14],w=S[15],A=M[0],E=M[1],p=M[2],b=M[3];return _[0]=A*e+E*a+p*h+b*T,_[1]=A*t+E*i+p*f+b*l,_[2]=A*r+E*n+p*m+b*x,_[3]=A*o+E*s+p*c+b*w,A=M[4],E=M[5],p=M[6],b=M[7],_[4]=A*e+E*a+p*h+b*T,_[5]=A*t+E*i+p*f+b*l,_[6]=A*r+E*n+p*m+b*x,_[7]=A*o+E*s+p*c+b*w,A=M[8],E=M[9],p=M[10],b=M[11],_[8]=A*e+E*a+p*h+b*T,_[9]=A*t+E*i+p*f+b*l,_[10]=A*r+E*n+p*m+b*x,_[11]=A*o+E*s+p*c+b*w,A=M[12],E=M[13],p=M[14],b=M[15],_[12]=A*e+E*a+p*h+b*T,_[13]=A*t+E*i+p*f+b*l,_[14]=A*r+E*n+p*m+b*x,_[15]=A*o+E*s+p*c+b*w,_}}}),b7=He({"node_modules/gl-mat4/translate.js"(Z,q){q.exports=v;function v(_,S,M){var e=M[0],t=M[1],r=M[2],o,a,i,n,s,h,f,m,c,T,l,x;return S===_?(_[12]=S[0]*e+S[4]*t+S[8]*r+S[12],_[13]=S[1]*e+S[5]*t+S[9]*r+S[13],_[14]=S[2]*e+S[6]*t+S[10]*r+S[14],_[15]=S[3]*e+S[7]*t+S[11]*r+S[15]):(o=S[0],a=S[1],i=S[2],n=S[3],s=S[4],h=S[5],f=S[6],m=S[7],c=S[8],T=S[9],l=S[10],x=S[11],_[0]=o,_[1]=a,_[2]=i,_[3]=n,_[4]=s,_[5]=h,_[6]=f,_[7]=m,_[8]=c,_[9]=T,_[10]=l,_[11]=x,_[12]=o*e+s*t+c*r+S[12],_[13]=a*e+h*t+T*r+S[13],_[14]=i*e+f*t+l*r+S[14],_[15]=n*e+m*t+x*r+S[15]),_}}}),w7=He({"node_modules/gl-mat4/scale.js"(Z,q){q.exports=v;function v(_,S,M){var e=M[0],t=M[1],r=M[2];return _[0]=S[0]*e,_[1]=S[1]*e,_[2]=S[2]*e,_[3]=S[3]*e,_[4]=S[4]*t,_[5]=S[5]*t,_[6]=S[6]*t,_[7]=S[7]*t,_[8]=S[8]*r,_[9]=S[9]*r,_[10]=S[10]*r,_[11]=S[11]*r,_[12]=S[12],_[13]=S[13],_[14]=S[14],_[15]=S[15],_}}}),T7=He({"node_modules/gl-mat4/rotate.js"(Z,q){q.exports=v;function v(_,S,M,e){var t=e[0],r=e[1],o=e[2],a=Math.sqrt(t*t+r*r+o*o),i,n,s,h,f,m,c,T,l,x,w,A,E,p,b,d,u,g,y,D,P,z,F,N;return Math.abs(a)<1e-6?null:(a=1/a,t*=a,r*=a,o*=a,i=Math.sin(M),n=Math.cos(M),s=1-n,h=S[0],f=S[1],m=S[2],c=S[3],T=S[4],l=S[5],x=S[6],w=S[7],A=S[8],E=S[9],p=S[10],b=S[11],d=t*t*s+n,u=r*t*s+o*i,g=o*t*s-r*i,y=t*r*s-o*i,D=r*r*s+n,P=o*r*s+t*i,z=t*o*s+r*i,F=r*o*s-t*i,N=o*o*s+n,_[0]=h*d+T*u+A*g,_[1]=f*d+l*u+E*g,_[2]=m*d+x*u+p*g,_[3]=c*d+w*u+b*g,_[4]=h*y+T*D+A*P,_[5]=f*y+l*D+E*P,_[6]=m*y+x*D+p*P,_[7]=c*y+w*D+b*P,_[8]=h*z+T*F+A*N,_[9]=f*z+l*F+E*N,_[10]=m*z+x*F+p*N,_[11]=c*z+w*F+b*N,S!==_&&(_[12]=S[12],_[13]=S[13],_[14]=S[14],_[15]=S[15]),_)}}}),A7=He({"node_modules/gl-mat4/rotateX.js"(Z,q){q.exports=v;function v(_,S,M){var e=Math.sin(M),t=Math.cos(M),r=S[4],o=S[5],a=S[6],i=S[7],n=S[8],s=S[9],h=S[10],f=S[11];return S!==_&&(_[0]=S[0],_[1]=S[1],_[2]=S[2],_[3]=S[3],_[12]=S[12],_[13]=S[13],_[14]=S[14],_[15]=S[15]),_[4]=r*t+n*e,_[5]=o*t+s*e,_[6]=a*t+h*e,_[7]=i*t+f*e,_[8]=n*t-r*e,_[9]=s*t-o*e,_[10]=h*t-a*e,_[11]=f*t-i*e,_}}}),S7=He({"node_modules/gl-mat4/rotateY.js"(Z,q){q.exports=v;function v(_,S,M){var e=Math.sin(M),t=Math.cos(M),r=S[0],o=S[1],a=S[2],i=S[3],n=S[8],s=S[9],h=S[10],f=S[11];return S!==_&&(_[4]=S[4],_[5]=S[5],_[6]=S[6],_[7]=S[7],_[12]=S[12],_[13]=S[13],_[14]=S[14],_[15]=S[15]),_[0]=r*t-n*e,_[1]=o*t-s*e,_[2]=a*t-h*e,_[3]=i*t-f*e,_[8]=r*e+n*t,_[9]=o*e+s*t,_[10]=a*e+h*t,_[11]=i*e+f*t,_}}}),M7=He({"node_modules/gl-mat4/rotateZ.js"(Z,q){q.exports=v;function v(_,S,M){var e=Math.sin(M),t=Math.cos(M),r=S[0],o=S[1],a=S[2],i=S[3],n=S[4],s=S[5],h=S[6],f=S[7];return S!==_&&(_[8]=S[8],_[9]=S[9],_[10]=S[10],_[11]=S[11],_[12]=S[12],_[13]=S[13],_[14]=S[14],_[15]=S[15]),_[0]=r*t+n*e,_[1]=o*t+s*e,_[2]=a*t+h*e,_[3]=i*t+f*e,_[4]=n*t-r*e,_[5]=s*t-o*e,_[6]=h*t-a*e,_[7]=f*t-i*e,_}}}),E7=He({"node_modules/gl-mat4/fromRotation.js"(Z,q){q.exports=v;function v(_,S,M){var e,t,r,o=M[0],a=M[1],i=M[2],n=Math.sqrt(o*o+a*a+i*i);return Math.abs(n)<1e-6?null:(n=1/n,o*=n,a*=n,i*=n,e=Math.sin(S),t=Math.cos(S),r=1-t,_[0]=o*o*r+t,_[1]=a*o*r+i*e,_[2]=i*o*r-a*e,_[3]=0,_[4]=o*a*r-i*e,_[5]=a*a*r+t,_[6]=i*a*r+o*e,_[7]=0,_[8]=o*i*r+a*e,_[9]=a*i*r-o*e,_[10]=i*i*r+t,_[11]=0,_[12]=0,_[13]=0,_[14]=0,_[15]=1,_)}}}),k7=He({"node_modules/gl-mat4/fromRotationTranslation.js"(Z,q){q.exports=v;function v(_,S,M){var e=S[0],t=S[1],r=S[2],o=S[3],a=e+e,i=t+t,n=r+r,s=e*a,h=e*i,f=e*n,m=t*i,c=t*n,T=r*n,l=o*a,x=o*i,w=o*n;return _[0]=1-(m+T),_[1]=h+w,_[2]=f-x,_[3]=0,_[4]=h-w,_[5]=1-(s+T),_[6]=c+l,_[7]=0,_[8]=f+x,_[9]=c-l,_[10]=1-(s+m),_[11]=0,_[12]=M[0],_[13]=M[1],_[14]=M[2],_[15]=1,_}}}),C7=He({"node_modules/gl-mat4/fromScaling.js"(Z,q){q.exports=v;function v(_,S){return _[0]=S[0],_[1]=0,_[2]=0,_[3]=0,_[4]=0,_[5]=S[1],_[6]=0,_[7]=0,_[8]=0,_[9]=0,_[10]=S[2],_[11]=0,_[12]=0,_[13]=0,_[14]=0,_[15]=1,_}}}),L7=He({"node_modules/gl-mat4/fromTranslation.js"(Z,q){q.exports=v;function v(_,S){return _[0]=1,_[1]=0,_[2]=0,_[3]=0,_[4]=0,_[5]=1,_[6]=0,_[7]=0,_[8]=0,_[9]=0,_[10]=1,_[11]=0,_[12]=S[0],_[13]=S[1],_[14]=S[2],_[15]=1,_}}}),P7=He({"node_modules/gl-mat4/fromXRotation.js"(Z,q){q.exports=v;function v(_,S){var M=Math.sin(S),e=Math.cos(S);return _[0]=1,_[1]=0,_[2]=0,_[3]=0,_[4]=0,_[5]=e,_[6]=M,_[7]=0,_[8]=0,_[9]=-M,_[10]=e,_[11]=0,_[12]=0,_[13]=0,_[14]=0,_[15]=1,_}}}),I7=He({"node_modules/gl-mat4/fromYRotation.js"(Z,q){q.exports=v;function v(_,S){var M=Math.sin(S),e=Math.cos(S);return _[0]=e,_[1]=0,_[2]=-M,_[3]=0,_[4]=0,_[5]=1,_[6]=0,_[7]=0,_[8]=M,_[9]=0,_[10]=e,_[11]=0,_[12]=0,_[13]=0,_[14]=0,_[15]=1,_}}}),R7=He({"node_modules/gl-mat4/fromZRotation.js"(Z,q){q.exports=v;function v(_,S){var M=Math.sin(S),e=Math.cos(S);return _[0]=e,_[1]=M,_[2]=0,_[3]=0,_[4]=-M,_[5]=e,_[6]=0,_[7]=0,_[8]=0,_[9]=0,_[10]=1,_[11]=0,_[12]=0,_[13]=0,_[14]=0,_[15]=1,_}}}),D7=He({"node_modules/gl-mat4/fromQuat.js"(Z,q){q.exports=v;function v(_,S){var M=S[0],e=S[1],t=S[2],r=S[3],o=M+M,a=e+e,i=t+t,n=M*o,s=e*o,h=e*a,f=t*o,m=t*a,c=t*i,T=r*o,l=r*a,x=r*i;return _[0]=1-h-c,_[1]=s+x,_[2]=f-l,_[3]=0,_[4]=s-x,_[5]=1-n-c,_[6]=m+T,_[7]=0,_[8]=f+l,_[9]=m-T,_[10]=1-n-h,_[11]=0,_[12]=0,_[13]=0,_[14]=0,_[15]=1,_}}}),z7=He({"node_modules/gl-mat4/frustum.js"(Z,q){q.exports=v;function v(_,S,M,e,t,r,o){var a=1/(M-S),i=1/(t-e),n=1/(r-o);return _[0]=r*2*a,_[1]=0,_[2]=0,_[3]=0,_[4]=0,_[5]=r*2*i,_[6]=0,_[7]=0,_[8]=(M+S)*a,_[9]=(t+e)*i,_[10]=(o+r)*n,_[11]=-1,_[12]=0,_[13]=0,_[14]=o*r*2*n,_[15]=0,_}}}),F7=He({"node_modules/gl-mat4/perspective.js"(Z,q){q.exports=v;function v(_,S,M,e,t){var r=1/Math.tan(S/2),o=1/(e-t);return _[0]=r/M,_[1]=0,_[2]=0,_[3]=0,_[4]=0,_[5]=r,_[6]=0,_[7]=0,_[8]=0,_[9]=0,_[10]=(t+e)*o,_[11]=-1,_[12]=0,_[13]=0,_[14]=2*t*e*o,_[15]=0,_}}}),O7=He({"node_modules/gl-mat4/perspectiveFromFieldOfView.js"(Z,q){q.exports=v;function v(_,S,M,e){var t=Math.tan(S.upDegrees*Math.PI/180),r=Math.tan(S.downDegrees*Math.PI/180),o=Math.tan(S.leftDegrees*Math.PI/180),a=Math.tan(S.rightDegrees*Math.PI/180),i=2/(o+a),n=2/(t+r);return _[0]=i,_[1]=0,_[2]=0,_[3]=0,_[4]=0,_[5]=n,_[6]=0,_[7]=0,_[8]=-((o-a)*i*.5),_[9]=(t-r)*n*.5,_[10]=e/(M-e),_[11]=-1,_[12]=0,_[13]=0,_[14]=e*M/(M-e),_[15]=0,_}}}),B7=He({"node_modules/gl-mat4/ortho.js"(Z,q){q.exports=v;function v(_,S,M,e,t,r,o){var a=1/(S-M),i=1/(e-t),n=1/(r-o);return _[0]=-2*a,_[1]=0,_[2]=0,_[3]=0,_[4]=0,_[5]=-2*i,_[6]=0,_[7]=0,_[8]=0,_[9]=0,_[10]=2*n,_[11]=0,_[12]=(S+M)*a,_[13]=(t+e)*i,_[14]=(o+r)*n,_[15]=1,_}}}),N7=He({"node_modules/gl-mat4/lookAt.js"(Z,q){var v=QA();q.exports=_;function _(S,M,e,t){var r,o,a,i,n,s,h,f,m,c,T=M[0],l=M[1],x=M[2],w=t[0],A=t[1],E=t[2],p=e[0],b=e[1],d=e[2];return Math.abs(T-p)<1e-6&&Math.abs(l-b)<1e-6&&Math.abs(x-d)<1e-6?v(S):(h=T-p,f=l-b,m=x-d,c=1/Math.sqrt(h*h+f*f+m*m),h*=c,f*=c,m*=c,r=A*m-E*f,o=E*h-w*m,a=w*f-A*h,c=Math.sqrt(r*r+o*o+a*a),c?(c=1/c,r*=c,o*=c,a*=c):(r=0,o=0,a=0),i=f*a-m*o,n=m*r-h*a,s=h*o-f*r,c=Math.sqrt(i*i+n*n+s*s),c?(c=1/c,i*=c,n*=c,s*=c):(i=0,n=0,s=0),S[0]=r,S[1]=i,S[2]=h,S[3]=0,S[4]=o,S[5]=n,S[6]=f,S[7]=0,S[8]=a,S[9]=s,S[10]=m,S[11]=0,S[12]=-(r*T+o*l+a*x),S[13]=-(i*T+n*l+s*x),S[14]=-(h*T+f*l+m*x),S[15]=1,S)}}}),U7=He({"node_modules/gl-mat4/str.js"(Z,q){q.exports=v;function v(_){return"mat4("+_[0]+", "+_[1]+", "+_[2]+", "+_[3]+", "+_[4]+", "+_[5]+", "+_[6]+", "+_[7]+", "+_[8]+", "+_[9]+", "+_[10]+", "+_[11]+", "+_[12]+", "+_[13]+", "+_[14]+", "+_[15]+")"}}}),e5=He({"node_modules/gl-mat4/index.js"(Z,q){q.exports={create:p7(),clone:d7(),copy:v7(),identity:QA(),transpose:m7(),invert:g7(),adjoint:y7(),determinant:_7(),multiply:x7(),translate:b7(),scale:w7(),rotate:T7(),rotateX:A7(),rotateY:S7(),rotateZ:M7(),fromRotation:E7(),fromRotationTranslation:k7(),fromScaling:C7(),fromTranslation:L7(),fromXRotation:P7(),fromYRotation:I7(),fromZRotation:R7(),fromQuat:D7(),frustum:z7(),perspective:F7(),perspectiveFromFieldOfView:O7(),ortho:B7(),lookAt:N7(),str:U7()}}}),d2=He({"src/lib/matrix.js"(Z){"use strict";var q=e5();Z.init2dArray=function(v,_){for(var S=new Array(v),M=0;MSo({valType:"string",dflt:"",editType:M},e!==!1?{arrayOk:!0}:{}),Z.texttemplateAttrs=({editType:M="calc",arrayOk:e}={},t={})=>So({valType:"string",dflt:"",editType:M},e!==!1?{arrayOk:!0}:{}),Z.shapeTexttemplateAttrs=({editType:M="arraydraw",newshape:e}={},t={})=>({valType:"string",dflt:"",editType:M}),Z.templatefallbackAttrs=({editType:M="none"}={})=>({valType:"any",dflt:"-",editType:M})}}),v2=He({"src/components/shapes/label_texttemplate.js"(Z,q){"use strict";function v(A,E){return E?E.d2l(A):A}function _(A,E){return E?E.l2d(A):A}function S(A){return A.x0}function M(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 i(A){return A.y1shift||0}function n(A,E){return v(A.x1,E)+o(A)-v(A.x0,E)-r(A)}function s(A,E,p){return v(A.y1,p)+i(A)-v(A.y0,p)-a(A)}function h(A,E){return Math.abs(n(A,E))}function f(A,E,p){return Math.abs(s(A,E,p))}function m(A,E,p){return A.type!=="line"?void 0:Math.sqrt(Math.pow(n(A,E),2)+Math.pow(s(A,E,p),2))}function c(A,E){return _((v(A.x1,E)+o(A)+v(A.x0,E)+r(A))/2,E)}function T(A,E,p){return _((v(A.y1,p)+i(A)+v(A.y0,p)+a(A))/2,p)}function l(A,E,p){return A.type!=="line"?void 0:s(A,E,p)/n(A,E)}var x=["x0","x1","y0","y1","dy","height","ycenter"],w=["x0","x1","y0","y1","dx","width","xcenter"];q.exports={x0:S,x1:M,y0:e,y1:t,slope:l,dx:n,dy:s,width:h,height:f,length:m,xcenter:c,ycenter:T,simpleXVariables:x,simpleYVariables:w}}}),j7=He({"src/components/shapes/draw_newshape/attributes.js"(Z,q){"use strict";var v=pc().overrideAll,_=au(),S=tc(),M=Hh().dash,e=rs().extendFlat,{shapeTexttemplateAttrs:t,templatefallbackAttrs:r}=$l(),o=v2();q.exports=v({newshape:{visible:e({},_.visible,{}),showlegend:{valType:"boolean",dflt:!1},legend:e({},_.legend,{}),legendgroup:e({},_.legendgroup,{}),legendgrouptitle:{text:e({},_.legendgrouptitle.text,{}),font:S({})},legendrank:e({},_.legendrank,{}),legendwidth:e({},_.legendwidth,{}),line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:4},dash:e({},M,{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({},_.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,q){"use strict";var v=Hh().dash,_=rs().extendFlat;q.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:_({},v,{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,q){"use strict";q.exports=function(v){var _=v.editType;return{t:{valType:"number",dflt:0,editType:_},r:{valType:"number",dflt:0,editType:_},b:{valType:"number",dflt:0,editType:_},l:{valType:"number",dflt:0,editType:_},editType:_}}}}),$y=He({"src/plots/layout_attributes.js"(Z,q){"use strict";var v=tc(),_=A_(),S=sh(),M=j7(),e=q7(),t=m2(),r=rs().extendFlat,o=v({editType:"calc"});o.family.dflt='"Open Sans", verdana, arial, sans-serif',o.size.dflt=12,o.color.dflt=S.defaultLine,q.exports={font:o,title:{text:{valType:"string",editType:"layoutstyle"},font:v({editType:"layoutstyle"}),subtitle:{text:{valType:"string",editType:"layoutstyle"},font:v({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:M.newshape,activeshape:M.activeshape,newselection:e.newselection,activeselection:e.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:r({},_.transition,{editType:"none"})}}}),V7=He({"node_modules/maplibre-gl/dist/maplibre-gl.css"(){(function(){if(!document.getElementById("ce8d464691048653ffe3a57c6c18ab566e8366f186677868cf724621a857b4fe")){var Z=document.createElement("style");Z.id="ce8d464691048653ffe3a57c6c18ab566e8366f186677868cf724621a857b4fe",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)}})()}}),so=He({"src/registry.js"(Z){"use strict";var q=Jm(),v=p2(),_=$A(),S=Yv(),M=T_().addStyleRule,e=rs(),t=au(),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<=x?F:e}if(typeof F!="string"&&typeof F!="number")return e;F=String(F);var B=c(N),W=F.charAt(0);B&&(W==="G"||W==="g")&&(F=F.slice(1),N="");var $=B&&N.slice(0,7)==="chinese",ue=F.match($?f:h);if(!ue)return e;var ce=ue[1],de=ue[3]||"1",Y=Number(ue[5]||1),X=Number(ue[7]||0),Q=Number(ue[9]||0),V=Number(ue[11]||0);if(B){if(ce.length===2)return e;ce=Number(ce);var le;try{var ae=n.getComponentMethod("calendars","getCal")(N);if($){var j=de.charAt(de.length-1)==="i";de=parseInt(de,10),le=ae.newDate(ce,ae.toMonthIndex(ce,de,j),Y)}else le=ae.newDate(ce,Number(de),Y)}catch{return e}return le?(le.toJD()-i)*t+X*r+Q*o+V*a:e}ce.length===2?ce=(Number(ce)+2e3-m)%100+m:ce=Number(ce),de-=1;var ee=new Date(Date.UTC(2e3,de,Y,X,Q));return ee.setUTCFullYear(ce),ee.getUTCMonth()!==de||ee.getUTCDate()!==Y?e:ee.getTime()+V*a},l=Z.MIN_MS=Z.dateTime2ms("-9999"),x=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,E=3*r,p=5*o;Z.ms2DateTime=function(F,N,O){if(typeof F!="number"||!(F>=l&&F<=x))return e;N||(N=0);var L=Math.floor(S(F+.05,1)*10),U=Math.round(F-L/10),B,W,$,ue,ce,de;if(c(O)){var Y=Math.floor(U/t)+i,X=Math.floor(S(F,t));try{B=n.getComponentMethod("calendars","getCal")(O).fromJD(Y).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;W=N=l+t&&F<=x-t))return e;var N=Math.floor(S(F+.05,1)*10),O=new Date(Math.round(F-N/10)),L=q("%Y-%m-%d")(O),U=O.getHours(),B=O.getMinutes(),W=O.getSeconds(),$=O.getUTCMilliseconds()*10+N;return b(L,U,B,W,$)};function b(F,N,O,L,U){if((N||O||L||U)&&(F+=" "+w(N,2)+":"+w(O,2),(L||U)&&(F+=":"+w(L,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 _.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 _.error("unrecognized date",F),N;return F};var d=/%\d?f/g,u=/%h/g,g={1:"1",2:"1",3:"2",4:"2"};function y(F,N,O,L){F=F.replace(d,function(B){var W=Math.min(+B.charAt(1)||6,6),$=(N/1e3%1+2).toFixed(W).slice(2).replace(/0+$/,"")||"0";return $});var U=new Date(Math.floor(N+.05));if(F=F.replace(u,function(){return g[O("%q")(U)]}),c(L))try{F=n.getComponentMethod("calendars","worldCalFmt")(F,N,L)}catch{return"Invalid"}return O(F)(U)}var D=[59,59.9,59.99,59.999,59.9999];function P(F,N){var O=S(F+.05,t),L=w(Math.floor(O/r),2)+":"+w(S(Math.floor(O/o),60),2);if(N!=="M"){v(N)||(N=0);var U=Math.min(S(F/a,60),D[N]),B=(100+U).toFixed(N).slice(1);N>0&&(B=B.replace(/0+$/,"").replace(/[\.]$/,"")),L+=":"+B}return L}Z.formatDate=function(F,N,O,L,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 P(F,O)+` -`+y(B.dayMonthYear,F,L,U);return y(N,F,L,U)};var z=3*t;Z.incrementMonth=function(F,N,O){O=c(O)&&O;var L=S(F,t);if(F=Math.round(F-L),O)try{var U=Math.round(F/t)+i,B=n.getComponentMethod("calendars","getCal")(O),W=B.fromJD(U);return N%12?B.add(W,N,"m"):B.add(W,N/12,"y"),(W.toJD()-i)*t+L}catch{_.error("invalid ms "+F+" in calendar "+O)}var $=new Date(F+z);return $.setUTCMonth($.getUTCMonth()+N)+L-z},Z.findExactDates=function(F,N){for(var O=0,L=0,U=0,B=0,W,$,ue=c(N)&&n.getComponentMethod("calendars","getCal")(N),ce=0;ce1?(i[h-1]-i[0])/(h-1):1,c,T;for(m>=0?T=n?e:t:T=n?o:r,a+=m*M*(n?-1:1)*(m>=0?1:-1);s90&&v.log("Long binary search..."),s-1};function e(a,i){return ai}function o(a,i){return a>=i}Z.sorterAsc=function(a,i){return a-i},Z.sorterDes=function(a,i){return i-a},Z.distinctVals=function(a){var i=a.slice();i.sort(Z.sorterAsc);var n;for(n=i.length-1;n>-1&&i[n]===S;n--);for(var s=i[n]-i[0]||1,h=s/(n||1)/1e4,f=[],m,c=0;c<=n;c++){var T=i[c],l=T-m;m===void 0?(f.push(T),m=T):l>h&&(s=Math.min(s,l),f.push(T),m=T)}return{vals:f,minDiff:s}},Z.roundUp=function(a,i,n){for(var s=0,h=i.length-1,f,m=0,c=n?0:1,T=n?1:0,l=n?Math.ceil:Math.floor;s0&&(s=1),n&&s)return a.sort(i)}return s?a:a.reverse()},Z.findIndexOfMin=function(a,i){i=i||_;for(var n=1/0,s,h=0;hM.length)&&(e=M.length),q(S)||(S=!1),v(M[0])){for(r=new Array(e),t=0;t_.length-1)return _[_.length-1];var M=S%1;return M*_[Math.ceil(S)]+(1-M)*_[Math.floor(S)]}}}),W7=He({"src/lib/angles.js"(Z,q){"use strict";var v=Yy(),_=v.mod,S=v.modHalf,M=Math.PI,e=2*M;function t(T){return T/180*M}function r(T){return T/M*180}function o(T){return Math.abs(T[1]-T[0])>e-1e-14}function a(T,l){return S(l-T,e)}function i(T,l){return Math.abs(a(T,l))}function n(T,l){if(o(l))return!0;var x,w;l[0]w&&(w+=e);var A=_(T,e),E=A+e;return A>=x&&A<=w||E>=x&&E<=w}function s(T,l,x,w){if(!n(l,w))return!1;var A,E;return x[0]=A&&T<=E}function h(T,l,x,w,A,E,p){A=A||0,E=E||0;var b=o([x,w]),d,u,g,y,D;b?(d=0,u=M,g=e):x1/3&&v.x<2/3},Z.isRightAnchor=function(v){return v.xanchor==="right"||v.xanchor==="auto"&&v.x>=2/3},Z.isTopAnchor=function(v){return v.yanchor==="top"||v.yanchor==="auto"&&v.y>=2/3},Z.isMiddleAnchor=function(v){return v.yanchor==="middle"||v.yanchor==="auto"&&v.y>1/3&&v.y<2/3},Z.isBottomAnchor=function(v){return v.yanchor==="bottom"||v.yanchor==="auto"&&v.y<=1/3}}}),Z7=He({"src/lib/geometry2d.js"(Z){"use strict";var q=Yy().mod;Z.segmentsIntersect=v;function v(t,r,o,a,i,n,s,h){var f=o-t,m=i-t,c=s-i,T=a-r,l=n-r,x=h-n,w=f*x-c*T;if(w===0)return null;var A=(m*x-c*l)/w,E=(m*T-f*l)/w;return E<0||E>1||A<0||A>1?null:{x:t+f*A,y:r+T*A}}Z.segmentDistance=function(r,o,a,i,n,s,h,f){if(v(r,o,a,i,n,s,h,f))return 0;var m=a-r,c=i-o,T=h-n,l=f-s,x=m*m+c*c,w=T*T+l*l,A=Math.min(_(m,c,x,n-r,s-o),_(m,c,x,h-r,f-o),_(T,l,w,r-n,o-s),_(T,l,w,a-n,i-s));return Math.sqrt(A)};function _(t,r,o,a,i){var n=a*t+i*r;if(n<0)return a*a+i*i;if(n>o){var s=a-t,h=i-r;return s*s+h*h}else{var f=a*r-i*t;return f*f/o}}var S,M,e;Z.getTextLocation=function(r,o,a,i){if((r!==M||i!==e)&&(S={},M=r,e=i),S[a])return S[a];var n=r.getPointAtLength(q(a-i/2,o)),s=r.getPointAtLength(q(a+i/2,o)),h=Math.atan((s.y-n.y)/(s.x-n.x)),f=r.getPointAtLength(q(a,o)),m=(f.x*4+n.x+s.x)/6,c=(f.y*4+n.y+s.y)/6,T={x:m,y:c,theta:h};return S[a]=T,T},Z.clearLocationCache=function(){M=null},Z.getVisibleSegment=function(r,o,a){var i=o.left,n=o.right,s=o.top,h=o.bottom,f=0,m=r.getTotalLength(),c=m,T,l;function x(A){var E=r.getPointAtLength(A);A===0?T=E:A===m&&(l=E);var p=E.xn?E.x-n:0,b=E.yh?E.y-h:0;return Math.sqrt(p*p+b*b)}for(var w=x(f);w;){if(f+=w+a,f>c)return;w=x(f)}for(w=x(c);w;){if(c-=w+a,f>c)return;w=x(c)}return{min:f,max:c,len:c-f,total:m,isClosed:f===0&&c===m&&Math.abs(T.x-l.x)<.1&&Math.abs(T.y-l.y)<.1}},Z.findPointOnPath=function(r,o,a,i){i=i||{};for(var n=i.pathLength||r.getTotalLength(),s=i.tolerance||.001,h=i.iterationLimit||30,f=r.getPointAtLength(0)[a]>r.getPointAtLength(n)[a]?-1:1,m=0,c=0,T=n,l,x,w;m0?T=l:c=l,m++}return x}}}),y2=He({"src/lib/throttle.js"(Z){"use strict";var q={};Z.throttle=function(S,M,e){var t=q[S],r=Date.now();if(!t){for(var o in q)q[o].tst.ts+M){a();return}t.timer=setTimeout(function(){a(),t.timer=null},M)},Z.done=function(_){var S=q[_];return!S||!S.timer?Promise.resolve():new Promise(function(M){var e=S.onDone;S.onDone=function(){e&&e(),M(),S.onDone=null}})},Z.clear=function(_){if(_)v(q[_]),delete q[_];else for(var S in q)Z.clear(S)};function v(_){_&&_.timer!==null&&(clearTimeout(_.timer),_.timer=null)}}}),Y7=He({"src/lib/clear_responsive.js"(Z,q){"use strict";q.exports=function(_){_._responsiveChartHandler&&(window.removeEventListener("resize",_._responsiveChartHandler),delete _._responsiveChartHandler)}}}),K7=He({"node_modules/is-mobile/index.js"(Z,q){"use strict";q.exports=M,q.exports.isMobile=M,q.exports.default=M;var v=/(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,_=/CrOS/,S=/android|ipad|playbook|silk/i;function M(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=v.test(t)&&!_.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,q){"use strict";var v=ns(),_=K7();q.exports=function(e){var t;if(e&&e.hasOwnProperty("userAgent")?t=e.userAgent:t=S(),typeof t!="string")return!0;var r=_({ua:{headers:{"user-agent":t}},tablet:!0,featureDetect:!1});if(!r)for(var o=t.split(" "),a=1;a-1;n--){var s=o[n];if(s.slice(0,8)==="Version/"){var h=s.slice(8).split(".")[0];if(v(h)&&(h=+h),h>=13)return!0}}}return r};function S(){var M;return typeof navigator<"u"&&(M=navigator.userAgent),M&&M.headers&&typeof M.headers["user-agent"]=="string"&&(M=M.headers["user-agent"]),M}}}),$7=He({"src/lib/make_trace_groups.js"(Z,q){"use strict";var v=Vn();q.exports=function(S,M,e){var t=S.selectAll("g."+e.replace(/\s/g,".")).data(M,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]=v.select(this)}),t}}}),Q7=He({"src/lib/localize.js"(Z,q){"use strict";var v=so();q.exports=function(S,M){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 i=a[M];if(i)return i}r=v.localeRegistry}var n=e.split("-")[0];if(n===e)break;e=n}return M}}}),r5=He({"src/lib/filter_unique.js"(Z,q){"use strict";q.exports=function(_){for(var S={},M=[],e=0,t=0;t<_.length;t++){var r=_[t];S[r]!==1&&(S[r]=1,M[e++]=r)}return M}}}),ez=He({"src/lib/filter_visible.js"(Z,q){"use strict";q.exports=function(e){for(var t=S(e)?_:v,r=[],o=0;o1?(M*_+M*S)/M:_+S,t=String(e).length;if(t>16){var r=String(S).length,o=String(_).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,q){"use strict";var v=ns(),_=Gs().BADNUM,S=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g;q.exports=function(e){return typeof e=="string"&&(e=e.replace(S,"")),v(e)?Number(e):_}}}),sa=He({"src/lib/index.js"(Z,q){"use strict";var v=Vn(),_=Zv().utcFormat,S=YA().format,M=ns(),e=Gs(),t=e.FP_SAFE,r=-t,o=e.BADNUM,a=q.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 i={};a.warnBadFormat=function(ae){var j=String(ae);i[j]||(i[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=Yv(),a.toLogRange=h2(),a.relinkPrivateKeys=f7();var n=hp();a.isArrayBuffer=n.isArrayBuffer,a.isTypedArray=n.isTypedArray,a.isArrayOrTypedArray=n.isArrayOrTypedArray,a.isArray1D=n.isArray1D,a.ensureArray=n.ensureArray,a.concat=n.concat,a.maxRowLength=n.maxRowLength,a.minRowLength=n.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 m=g2();a.findBin=m.findBin,a.sorterAsc=m.sorterAsc,a.sorterDes=m.sorterDes,a.distinctVals=m.distinctVals,a.roundUp=m.roundUp,a.sort=m.sort,a.findIndexOfMin=m.findIndexOfMin,a.sortObjectKeys=$m();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 x=X7();a.isLeftAnchor=x.isLeftAnchor,a.isCenterAnchor=x.isCenterAnchor,a.isRightAnchor=x.isRightAnchor,a.isTopAnchor=x.isTopAnchor,a.isMiddleAnchor=x.isMiddleAnchor,a.isBottomAnchor=x.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=rs();a.extendFlat=A.extendFlat,a.extendDeep=A.extendDeep,a.extendDeepAll=A.extendDeepAll,a.extendDeepNoArrays=A.extendDeepNoArrays;var E=Jm();a.log=E.log,a.warn=E.warn,a.error=E.error;var p=Jy();a.counterRegex=p.counter;var b=y2();a.throttle=b.throttle,a.throttleDone=b.done,a.clearThrottle=b.clear;var d=T_();a.getGraphDiv=d.getGraphDiv,a.isPlotDiv=d.isPlotDiv,a.removeElement=d.removeElement,a.addStyleRule=d.addStyleRule,a.addRelatedStyleRule=d.addRelatedStyleRule,a.deleteRelatedStyleRule=d.deleteRelatedStyleRule,a.setStyleOnHover=d.setStyleOnHover,a.getFullTransformMatrix=d.getFullTransformMatrix,a.getElementTransformMatrix=d.getElementTransformMatrix,a.getElementAndAncestors=d.getElementAndAncestors,a.equalDomRects=d.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 M(j)?(j=Number(j),j>t||j=j?!1:M(ae)&&ae>=0&&ae%1===0},a.noop=p2(),a.identity=S_(),a.repeat=function(ae,j){for(var ee=new Array(j),te=0;teee?Math.max(ee,Math.min(j,ae)):Math.max(j,Math.min(ee,ae))},a.bBoxIntersect=function(ae,j,ee){return ee=ee||0,ae.left<=j.right+ee&&j.left<=ae.right+ee&&ae.top<=j.bottom+ee&&j.top<=ae.bottom+ee},a.simpleMap=function(ae,j,ee,te,pe){for(var we=ae.length,Se=new Array(we),Re=0;Re=Math.pow(2,ee)?pe>10?(a.warn("randstr failed uniqueness"),Se):ae(j,ee,te,(pe||0)+1):Se},a.OptionControl=function(ae,j){ae||(ae={}),j||(j="opt");var ee={};return ee.optionList=[],ee._newoption=function(te){te[j]=ae,ee[te.name]=te,ee.optionList.push(te)},ee["_"+j]=ae,ee},a.smooth=function(ae,j){if(j=Math.round(j)||0,j<2)return ae;var ee=ae.length,te=2*ee,pe=2*j-1,we=new Array(pe),Se=new Array(ee),Re,Pe,je,at;for(Re=0;Re=te&&(je-=te*Math.floor(je/te)),je<0?je=-1-je:je>=ee&&(je=te-1-je),at+=ae[je]*we[Pe];Se[Re]=at}return Se},a.syncOrAsync=function(ae,j,ee){var te,pe;function we(){return a.syncOrAsync(ae,j,ee)}for(;ae.length;)if(pe=ae.splice(0,1)[0],te=pe(j),te&&te.then)return te.then(we);return ee&&ee(j)},a.stripTrailingSlash=function(ae){return ae.slice(-1)==="/"?ae.slice(0,-1):ae},a.noneOrAll=function(ae,j,ee){if(ae){var te=!1,pe=!0,we,Se;for(we=0;we0?pe:0})},a.fillArray=function(ae,j,ee,te){if(te=te||a.identity,a.isArrayOrTypedArray(ae))for(var pe=0;peP.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 v.selection},a.ensureSingle=function(ae,j,ee,te){var pe=ae.select(j+(ee?"."+ee:""));if(pe.size())return pe;var we=ae.append(j);return ee&&we.classed(ee,!0),te&&we.call(te),we},a.ensureSingleById=function(ae,j,ee,te){var pe=ae.select(j+"#"+ee);if(pe.size())return pe;var we=ae.append(j).attr("id",ee);return te&&we.call(te),we},a.objectFromPath=function(ae,j){for(var ee=ae.split("."),te,pe=te={},we=0;we1?pe+Se[1]:"";if(we&&(Se.length>1||Re.length>4||ee))for(;te.test(Re);)Re=Re.replace(te,"$1"+we+"$2");return Re+Pe},a.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var L=/^\w*$/;a.templateString=function(ae,j){var ee={};return ae.replace(a.TEMPLATE_STRING_REGEX,function(te,pe){var we;return L.test(pe)?we=j[pe]:(ee[pe]=ee[pe]||a.nestedProperty(j,pe).get,we=ee[pe](!0)),we!==void 0?we:""})};var U={max:10,count:0,name:"hovertemplate"};a.hovertemplateString=ae=>de(vs(So({},ae),{opts:U}));var B={max:10,count:0,name:"texttemplate"};a.texttemplateString=ae=>de(vs(So({},ae),{opts:B}));var W=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/;function $(ae){var j=ae.match(W);return j?{key:j[1],op:j[2],number:Number(j[3])}:{key:ae,op:null,number:null}}var ue={max:10,count:0,name:"texttemplate",parseMultDiv:!0};a.texttemplateStringForShapes=ae=>de(vs(So({},ae),{opts:ue}));var ce=/^[:|\|]/;function de({data:ae=[],locale:j,fallback:ee,labels:te={},opts:pe,template:we}){return we.replace(a.TEMPLATE_STRING_REGEX,(Se,Re,Pe)=>{let je=["xother","yother"].includes(Re),at=["_xother","_yother"].includes(Re),nt=["_xother_","_yother_"].includes(Re),tt=["xother_","yother_"].includes(Re),Ve=je||at||tt||nt;(at||nt)&&(Re=Re.substring(1)),(tt||nt)&&(Re=Re.substring(0,Re.length-1));let he=null,se=null;if(pe.parseMultDiv){var ne=$(Re);Re=ne.key,he=ne.op,se=ne.number}let Ce;if(Ve){if(te[Re]===void 0)return"";Ce=te[Re]}else for(let St of ae)if(St){if(St.hasOwnProperty(Re)){Ce=St[Re];break}if(L.test(Re)||(Ce=a.nestedProperty(St,Re).get(!0)),Ce!==void 0)break}if(Ce===void 0){let{count:St,max:kt,name:Bt}=pe,Vt=ee===!1?Se:ee;return St=Y&&Se<=X,je=Re>=Y&&Re<=X;if(Pe&&(te=10*te+Se-Y),je&&(pe=10*pe+Re-Y),!Pe||!je){if(te!==pe)return te-pe;if(Se!==Re)return Se-Re}}return pe-te};var Q=2e9;a.seedPseudoRandom=function(){Q=2e9},a.pseudoRandom=function(){var ae=Q;return Q=(69069*Q+1)%4294967296,Math.abs(Q-ae)<429496729?a.pseudoRandom():Q/4294967296},a.fillText=function(ae,j,ee){var te=Array.isArray(ee)?function(Se){ee.push(Se)}:function(Se){ee.text=Se},pe=a.extractOption(ae,j,"htx","hovertext");if(a.isValidTextValue(pe))return te(pe);var we=a.extractOption(ae,j,"tx","text");if(a.isValidTextValue(we))return te(we)},a.isValidTextValue=function(ae){return ae||ae===0},a.formatPercent=function(ae,j){j=j||0;for(var ee=(Math.round(100*ae*Math.pow(10,j))*Math.pow(.1,j)).toFixed(j)+"%",te=0;te1&&(je=1):je=0,a.strTranslate(pe-je*(ee+Se),we-je*(te+Re))+a.strScale(je)+(Pe?"rotate("+Pe+(j?"":" "+ee+" "+te)+")":"")},a.setTransormAndDisplay=function(ae,j){ae.attr("transform",a.getTextTransform(j)),ae.style("display",j.scale?null:"none")},a.ensureUniformFontSize=function(ae,j){var ee=a.extendFlat({},j);return ee.size=Math.max(j.size,ae._fullLayout.uniformtext.minsize||0),ee},a.join2=function(ae,j,ee){var te=ae.length;return te>1?ae.slice(0,-1).join(j)+ee+ae[te-1]:ae.join(j)},a.bigFont=function(ae){return Math.round(1.2*ae)};var V=a.getFirefoxVersion(),le=V!==null&&V<86;a.getPositionFromD3Event=function(){return le?[v.event.layerX,v.event.layerY]:[v.event.offsetX,v.event.offsetY]}}}),az=He({"build/plotcss.js"(){"use strict";var Z=sa(),q={"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;","X .plotly-cloud-dialog":'font-family:"Open Sans",verdana,arial,sans-serif;position:absolute;top:0;left:0;width:100%;height:100%;z-index:1001;display:flex;align-items:center;justify-content:center;background-color:rgba(0,0,0,.4);',"X .plotly-cloud-dialog .plotly-cloud-dialog-box":"box-sizing:border-box;min-width:300px;max-width:420px;padding:20px 24px;background-color:#fff;border:1px solid #e0e2e5;border-radius:4px;box-shadow:0 4px 16px rgba(0,0,0,.25);font-size:13px;color:#2a3f5f;","X .plotly-cloud-dialog .plotly-cloud-dialog-title":"font-size:16px;font-weight:bold;margin-bottom:12px;","X .plotly-cloud-dialog .plotly-cloud-dialog-message":"line-height:1.5;overflow-wrap:break-word;word-wrap:break-word;","X .plotly-cloud-dialog .plotly-cloud-dialog-buttons":"display:flex;justify-content:flex-end;margin-top:20px;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn":"font-family:inherit;font-size:13px;padding:7px 16px;margin-left:8px;border-radius:3px;border:1px solid rgba(0,0,0,0);cursor:pointer;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn:focus-visible":"outline:2px solid #447adb;outline-offset:1px;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--cancel":"background-color:#fff;border-color:#e0e2e5;color:#777;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--cancel:hover":"background-color:#f3f3f3;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--confirm":"background-color:#447adb;color:#fff;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--confirm:hover":"background-color:#1d3b84;",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(_ in q)v=_.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier"),Z.addStyleRule(v,q[_]);var v,_}}),a5=He({"node_modules/is-browser/client.js"(Z,q){q.exports=!0}}),i5=He({"node_modules/has-hover/index.js"(Z,q){"use strict";var v=a5(),_;typeof window.matchMedia=="function"?_=!window.matchMedia("(hover: none)").matches:_=v,q.exports=_}}),Z0=He({"node_modules/events/events.js"(Z,q){"use strict";var v=typeof Reflect=="object"?Reflect:null,_=v&&typeof v.apply=="function"?v.apply:function(E,p,b){return Function.prototype.apply.call(E,p,b)},S;v&&typeof v.ownKeys=="function"?S=v.ownKeys:Object.getOwnPropertySymbols?S=function(E){return Object.getOwnPropertyNames(E).concat(Object.getOwnPropertySymbols(E))}:S=function(E){return Object.getOwnPropertyNames(E)};function M(A){console&&console.warn&&console.warn(A)}var e=Number.isNaN||function(E){return E!==E};function t(){t.init.call(this)}q.exports=t,q.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(E){if(typeof E!="number"||E<0||e(E))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+E+".");return this._maxListeners=E,this};function a(A){return A._maxListeners===void 0?t.defaultMaxListeners:A._maxListeners}t.prototype.getMaxListeners=function(){return a(this)},t.prototype.emit=function(E){for(var p=[],b=1;b0&&(g=p[0]),g instanceof Error)throw g;var y=new Error("Unhandled error."+(g?" ("+g.message+")":""));throw y.context=g,y}var D=u[E];if(D===void 0)return!1;if(typeof D=="function")_(D,this,p);else for(var P=D.length,z=m(D,P),b=0;b0&&g.length>d&&!g.warned){g.warned=!0;var y=new Error("Possible EventEmitter memory leak detected. "+g.length+" "+String(E)+" listeners added. Use emitter.setMaxListeners() to increase limit");y.name="MaxListenersExceededWarning",y.emitter=A,y.type=E,y.count=g.length,M(y)}return A}t.prototype.addListener=function(E,p){return i(this,E,p,!1)},t.prototype.on=t.prototype.addListener,t.prototype.prependListener=function(E,p){return i(this,E,p,!0)};function n(){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,E,p){var b={fired:!1,wrapFn:void 0,target:A,type:E,listener:p},d=n.bind(b);return d.listener=p,b.wrapFn=d,d}t.prototype.once=function(E,p){return o(p),this.on(E,s(this,E,p)),this},t.prototype.prependOnceListener=function(E,p){return o(p),this.prependListener(E,s(this,E,p)),this},t.prototype.removeListener=function(E,p){var b,d,u,g,y;if(o(p),d=this._events,d===void 0)return this;if(b=d[E],b===void 0)return this;if(b===p||b.listener===p)--this._eventsCount===0?this._events=Object.create(null):(delete d[E],d.removeListener&&this.emit("removeListener",E,b.listener||p));else if(typeof b!="function"){for(u=-1,g=b.length-1;g>=0;g--)if(b[g]===p||b[g].listener===p){y=b[g].listener,u=g;break}if(u<0)return this;u===0?b.shift():c(b,u),b.length===1&&(d[E]=b[0]),d.removeListener!==void 0&&this.emit("removeListener",E,y||p)}return this},t.prototype.off=t.prototype.removeListener,t.prototype.removeAllListeners=function(E){var p,b,d;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[E]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete b[E]),this;if(arguments.length===0){var u=Object.keys(b),g;for(d=0;d=0;d--)this.removeListener(E,p[d]);return this};function h(A,E,p){var b=A._events;if(b===void 0)return[];var d=b[E];return d===void 0?[]:typeof d=="function"?p?[d.listener||d]:[d]:p?T(d):m(d,d.length)}t.prototype.listeners=function(E){return h(this,E,!0)},t.prototype.rawListeners=function(E){return h(this,E,!1)},t.listenerCount=function(A,E){return typeof A.listenerCount=="function"?A.listenerCount(E):f.call(A,E)},t.prototype.listenerCount=f;function f(A){var E=this._events;if(E!==void 0){var p=E[A];if(typeof p=="function")return 1;if(p!==void 0)return p.length}return 0}t.prototype.eventNames=function(){return this._eventsCount>0?S(this._events):[]};function m(A,E){for(var p=new Array(E),b=0;b{},{passive:!0}),S},triggerHandler:function(S,M,e){var t,r=S._ev;if(!r)return;var o=r._events[M];if(!o)return;function a(n){if(n.listener){if(r.removeListener(M,n.listener),!n.fired)return n.fired=!0,n.listener.apply(r,[e])}else return n.apply(r,[e])}o=Array.isArray(o)?o:[o];var i;for(i=0;i_.queueLength&&(e.undoQueue.queue.shift(),e.undoQueue.index--)},M.startSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!0,e.undoQueue.beginSequence=!0},M.stopSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!1,e.undoQueue.beginSequence=!1},M.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=L.length)return!1;if(P.dimensions===2){if(F++,z.length===F)return P;var U=z[F];if(!w(U))return!1;P=L[O][U]}else P=L[O]}else P=L}}return P}function w(P){return P===Math.round(P)&&P>=0}function A(P){var z,F;z=q.modules[P]._module,F=z.basePlotModule;var N={};N.type=null;var O=o({},_),L=o({},z.attributes);Z.crawl(L,function(W,$,ue,ce,de){n(O,de).set(void 0),W===void 0&&n(L,de).set(void 0)}),o(N,O),q.traceIs(P,"noOpacity")&&delete N.opacity,q.traceIs(P,"showLegend")||(delete N.showlegend,delete N.legendgroup),q.traceIs(P,"noHover")&&(delete N.hoverinfo,delete N.hoverlabel),z.selectPoints||delete N.selectedpoints,o(N,L),F.attributes&&o(N,F.attributes),N.type=P;var U={meta:z.meta||{},categories:z.categories||{},animatable:!!z.animatable,type:P,attributes:b(N)};if(z.layoutAttributes){var B={};o(B,z.layoutAttributes),U.layoutAttributes=b(B)}return z.animatable||Z.crawl(U,function(W){Z.isValObject(W)&&"anim"in W&&delete W.anim}),U}function E(){var P={},z,F;o(P,S);for(z in q.subplotsRegistry)if(F=q.subplotsRegistry[z],!!F.layoutAttributes)if(Array.isArray(F.attr))for(var N=0;N=a&&(o._input||{})._templateitemname;n&&(i=a);var s=r+"["+i+"]",h;function f(){h={},n&&(h[s]={},h[s][_]=n)}f();function m(x,w){h[x]=w}function c(x,w){n?q.nestedProperty(h[s],x).set(w):h[s+"."+x]=w}function T(){var x=h;return f(),x}function l(x,w){x&&c(x,w);var A=T();for(var E in A)q.nestedProperty(t,E).set(A[E])}return{modifyBase:m,modifyItem:c,getUpdateObj:T,applyUpdate:l}}}}),lh=He({"src/plots/cartesian/constants.js"(Z,q){"use strict";var v=Jy().counter;q.exports={idRegex:{x:v("x","( domain)?"),y:v("y","( domain)?")},attrRegex:v("[xy]axis"),xAxisMatch:v("xaxis"),yAxisMatch:v("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"}}}),tf=He({"src/plots/cartesian/axis_ids.js"(Z){"use strict";var q=so(),v=lh();Z.id2name=function(M){if(!(typeof M!="string"||!M.match(v.AX_ID_PATTERN))){var e=M.split(" ")[0].slice(1);return e==="1"&&(e=""),M.charAt(0)+"axis"+e}},Z.name2id=function(M){if(M.match(v.AX_NAME_PATTERN)){var e=M.slice(5);return e==="1"&&(e=""),M.charAt(0)+e}},Z.cleanId=function(M,e,t){var r=/( domain)$/.test(M);if(!(typeof M!="string"||!M.match(v.AX_ID_PATTERN))&&!(e&&M.charAt(0)!==e)&&!(r&&!t)){var o=M.split(" ")[0].slice(1).replace(/^0+/,"");return o==="1"&&(o=""),M.charAt(0)+o+(r&&t?" domain":"")}},Z.list=function(S,M,e){var t=S._fullLayout;if(!t)return[];var r=Z.listIds(S,M),o=new Array(r.length),a;for(a=0;at?1:-1:+(S.slice(1)||1)-+(M.slice(1)||1)},Z.ref2id=function(S){return/^[xyz]/.test(S)?S.split(" ")[0]:!1};function _(S,M){if(M&&M.length){for(var e=0;e0?".":"")+n;v.isPlainObject(s)?t(s,o,h,i+1):o(h,n,s)}})}}}),bc=He({"src/plots/plots.js"(Z,q){"use strict";var v=Vn(),_=Zv().timeFormatLocale,S=YA().formatLocale,M=ns(),e=KA(),t=Gh().version,r=so(),o=e1(),a=zl(),i=sa(),n=$n(),s=Gs().BADNUM,h=tf(),f=Qm().clearOutline,m=_2(),c=A_(),T=n5(),l=Wh().getModuleCalcData,x=i.relinkPrivateKeys,w=i._,A=q.exports={};i.extendFlat(A,r),A.attributes=au(),A.attributes.type.values=A.allTypes,A.fontAttrs=tc(),A.layoutAttributes=$y();var E=nz();A.executeAPICommand=E.executeAPICommand,A.computeAPICommandBindings=E.computeAPICommandBindings,A.manageCommandObserver=E.manageCommandObserver,A.hasSimpleAPICommandBindings=E.hasSimpleAPICommandBindings,A.redrawText=function(X){return X=i.getGraphDiv(X),new Promise(function(Q){setTimeout(function(){X._fullLayout&&(r.getComponentMethod("annotations","draw")(X),r.getComponentMethod("legend","draw")(X),r.getComponentMethod("colorbar","draw")(X),Q(A.previousPromises(X)))},300)})},A.resize=function(X){X=i.getGraphDiv(X);var Q,V=new Promise(function(le,ae){(!X||i.isHidden(X))&&ae(new Error("Resize must be passed a displayed plot div element.")),X._redrawTimer&&clearTimeout(X._redrawTimer),X._resolveResize&&(Q=X._resolveResize),X._resolveResize=le,X._redrawTimer=setTimeout(function(){if(!X.layout||X.layout.width&&X.layout.height||i.isHidden(X)){le(X);return}delete X.layout.width,delete X.layout.height;var j=X.changed;X.autoplay=!0,r.call("relayout",X,{autosize:!0}).then(function(){X.changed=j,X._resolveResize===le&&(delete X._resolveResize,le(X))})},100)});return Q&&Q(V),V},A.previousPromises=function(X){if((X._promises||[]).length)return Promise.all(X._promises).then(function(){X._promises=[]})},A.addLinks=function(X){if(!(!X._context.showLink&&!X._context.showSources)){var Q=X._fullLayout,V=i.ensureSingle(Q._paper,"text","js-plot-link-container",function(pe){pe.style({"font-family":'"Open Sans", Arial, sans-serif',"font-size":"12px",fill:n.defaultLine,"pointer-events":"all"}).each(function(){var we=v.select(this);we.append("tspan").classed("js-link-to-tool",!0),we.append("tspan").classed("js-link-spacer",!0),we.append("tspan").classed("js-sourcelinks",!0)})}),le=V.node(),ae={y:Q._paper.attr("height")-9};document.body.contains(le)&&le.getComputedTextLength()>=Q.width-20?(ae["text-anchor"]="start",ae.x=5):(ae["text-anchor"]="end",ae.x=Q._paper.attr("width")-7),V.attr(ae);var j=V.select(".js-link-to-tool"),ee=V.select(".js-link-spacer"),te=V.select(".js-sourcelinks");X._context.showSources&&X._context.showSources(X),X._context.showLink&&p(X,j),ee.text(j.text()&&te.text()?" - ":"")}};function p(X,Q){Q.text("");var V=Q.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(X._context.linkText+" \xBB");if(X._context.sendData)V.on("click",function(){A.sendDataToCloud(X)});else{var le=window.location.pathname.split("/"),ae=window.location.search;V.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+le[2].split(".")[0]+"/"+le[1]+ae})}}A.sendDataToCloud=function(X,Q){X.emit("plotly_beforeexport");let V=new URL(Q).origin;var le=A.graphJson(X,!1,"keepdata","object");le.version=t;var ae=new URL(Q);ae.searchParams.set("origin",window.location.origin);var j=window.open(ae.href,"_blank");if(!j){console.error("Unable to open Plotly Cloud (the popup may have been blocked)"),X.emit("plotly_exportfail");return}var ee=function(te){te.origin===V&&te.data&&te.data.type==="CHART_AUTH_SUCCESS"&&(j.postMessage({type:"chart",chart:le},V),window.removeEventListener("message",ee),X.emit("plotly_afterexport"))};return window.addEventListener("message",ee),!1};var b=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],d=["year","month","dayMonth","dayMonthYear"];A.supplyDefaults=function(X,Q){var V=Q&&Q.skipUpdateCalc,le=X._fullLayout||{};if(le._skipDefaults){delete le._skipDefaults;return}var ae=X._fullLayout={},j=X.layout||{},ee=X._fullData||[],te=X._fullData=[],pe=X.data||[],we=X.calcdata||[],Se=X._context||{},Re;X._transitionData||A.createTransitionData(X),ae._dfltTitle={plot:w(X,"Click to enter Plot title"),subtitle:w(X,"Click to enter Plot subtitle"),x:w(X,"Click to enter X axis title"),y:w(X,"Click to enter Y axis title"),colorbar:w(X,"Click to enter Colorscale title"),annotation:w(X,"new text")},ae._traceWord=w(X,"trace");var Pe=y(X,b);if(ae._mapboxAccessToken=Se.mapboxAccessToken,le._initialAutoSizeIsDone){var je=le.width,at=le.height;A.supplyLayoutGlobalDefaults(j,ae,Pe),j.width||(ae.width=je),j.height||(ae.height=at),A.sanitizeMargins(ae)}else{A.supplyLayoutGlobalDefaults(j,ae,Pe);var nt=!j.width||!j.height,tt=ae.autosize,Ve=Se.autosizable,he=nt&&(tt||Ve);he?A.plotAutoSize(X,j,ae):nt&&A.sanitizeMargins(ae),!tt&&nt&&(j.width=ae.width,j.height=ae.height)}ae._d3locale=D(Pe,ae.separators),ae._extraFormat=y(X,d),ae._initialAutoSizeIsDone=!0,ae._dataLength=pe.length,ae._modules=[],ae._visibleModules=[],ae._basePlotModules=[];var se=ae._subplots=g(),ne=ae._splomAxes={x:{},y:{}},Ce=ae._splomSubplots={};ae._splomGridDflt={},ae._scatterStackOpts={},ae._firstScatter={},ae._alignmentOpts={},ae._colorAxes={},ae._requestRangeslider={},ae._traceUids=u(ee,pe),A.supplyDataDefaults(pe,te,j,ae);var Ze=Object.keys(ne.x),rt=Object.keys(ne.y);if(Ze.length>1&&rt.length>1){for(r.getComponentMethod("grid","sizeDefaults")(j,ae),Re=0;Re15&&rt.length>15&&ae.shapes.length===0&&ae.images.length===0,A.linkSubplots(te,ae,ee,le),A.cleanPlot(te,ae,ee,le);var Vt=!!(le._has&&le._has("cartesian")),Ar=!!(ae._has&&ae._has("cartesian")),vr=Vt,qr=Ar;vr&&!qr?le._bgLayer.remove():qr&&!vr&&(ae._shouldCreateBgLayer=!0),le._zoomlayer&&!X._dragging&&f({_fullLayout:le}),P(te,ae),x(ae,le),r.getComponentMethod("colorscale","crossTraceDefaults")(te,ae),ae._preGUI||(ae._preGUI={}),ae._tracePreGUI||(ae._tracePreGUI={});var kr=ae._tracePreGUI,Ur={},_t;for(_t in kr)Ur[_t]="old";for(Re=0;Re0){var Se=1-2*j;ee=Math.round(Se*ee),te=Math.round(Se*te)}}var Re=A.layoutAttributes.width.min,Pe=A.layoutAttributes.height.min;ee1,at=!V.height&&Math.abs(le.height-te)>1;(at||je)&&(je&&(le.width=ee),at&&(le.height=te)),Q._initialAutoSize||(Q._initialAutoSize={width:ee,height:te}),A.sanitizeMargins(le)},A.supplyLayoutModuleDefaults=function(X,Q,V,le){var ae=r.componentsRegistry,j=Q._basePlotModules,ee,te,pe,we=r.subplotsRegistry.cartesian;for(ee in ae)pe=ae[ee],pe.includeBasePlot&&pe.includeBasePlot(X,Q);j.length||j.push(we),Q._has("cartesian")&&(r.getComponentMethod("grid","contentDefaults")(X,Q),we.finalizeSubplots(X,Q));for(var Se in Q._subplots)Q._subplots[Se].sort(i.subplotSort);for(te=0;te1&&(V.l/=tt,V.r/=tt)}if(Pe){var Ve=(V.t+V.b)/Pe;Ve>1&&(V.t/=Ve,V.b/=Ve)}var he=V.xl!==void 0?V.xl:V.x,se=V.xr!==void 0?V.xr:V.x,ne=V.yt!==void 0?V.yt:V.y,Ce=V.yb!==void 0?V.yb:V.y;je[Q]={l:{val:he,size:V.l+nt},r:{val:se,size:V.r+nt},b:{val:Ce,size:V.b+nt},t:{val:ne,size:V.t+nt}},at[Q]=1}if(!le._replotting)return A.doAutoMargin(X)}};function U(X){if("_redrawFromAutoMarginCount"in X._fullLayout)return!1;var Q=h.list(X,"",!0);for(var V in Q)if(Q[V].autoshift||Q[V].shift)return!0;return!1}A.doAutoMargin=function(X){var Q=X._fullLayout,V=Q.width,le=Q.height;Q._size||(Q._size={}),N(Q);var ae=Q._size,j=Q.margin,ee={t:0,b:0,l:0,r:0},te=i.extendFlat({},ae),pe=j.l,we=j.r,Se=j.t,Re=j.b,Pe=Q._pushmargin,je=Q._pushmarginIds,at=Q.minreducedwidth,nt=Q.minreducedheight;if(j.autoexpand!==!1){for(var tt in Pe)je[tt]||delete Pe[tt];var Ve=X._fullLayout._reservedMargin;for(var he in Ve)for(var se in Ve[he]){var ne=Ve[he][se];ee[se]=Math.max(ee[se],ne)}Pe.base={l:{val:0,size:pe},r:{val:1,size:we},t:{val:1,size:Se},b:{val:0,size:Re}};for(var Ce in ee){var Ze=0;for(var rt in Pe)rt!=="base"&&M(Pe[rt][Ce].size)&&(Ze=Pe[rt][Ce].size>Ze?Pe[rt][Ce].size:Ze);var Je=Math.max(0,j[Ce]-Ze);ee[Ce]=Math.max(0,ee[Ce]-Je)}for(var St in Pe){var kt=Pe[St].l||{},Bt=Pe[St].b||{},Vt=kt.val,Ar=kt.size,vr=Bt.val,qr=Bt.size,kr=V-ee.r-ee.l,Ur=le-ee.t-ee.b;for(var _t in Pe){if(M(Ar)&&Pe[_t].r){var Fe=Pe[_t].r.val,Ye=Pe[_t].r.size;if(Fe>Vt){var Ae=(Ar*Fe+(Ye-kr)*Vt)/(Fe-Vt),Le=(Ye*(1-Vt)+(Ar-kr)*(1-Fe))/(Fe-Vt);Ae+Le>pe+we&&(pe=Ae,we=Le)}}if(M(qr)&&Pe[_t].t){var We=Pe[_t].t.val,Ke=Pe[_t].t.size;if(We>vr){var st=(qr*We+(Ke-Ur)*vr)/(We-vr),ot=(Ke*(1-vr)+(qr-Ur)*(1-We))/(We-vr);st+ot>Re+Se&&(Re=st,Se=ot)}}}}}var Ut=i.constrain(V-j.l-j.r,O,at),Ct=i.constrain(le-j.t-j.b,L,nt),Pt=Math.max(0,V-Ut),jt=Math.max(0,le-Ct);if(Pt){var cr=(pe+we)/Pt;cr>1&&(pe/=cr,we/=cr)}if(jt){var or=(Re+Se)/jt;or>1&&(Re/=or,Se/=or)}if(ae.l=Math.round(pe)+ee.l,ae.r=Math.round(we)+ee.r,ae.t=Math.round(Se)+ee.t,ae.b=Math.round(Re)+ee.b,ae.p=Math.round(j.pad),ae.w=Math.round(V)-ae.l-ae.r,ae.h=Math.round(le)-ae.t-ae.b,!Q._replotting&&(A.didMarginChange(te,ae)||U(X))){"_redrawFromAutoMarginCount"in Q?Q._redrawFromAutoMarginCount++:Q._redrawFromAutoMarginCount=1;var nr=3*(1+Object.keys(je).length);if(Q._redrawFromAutoMarginCount1)return!0}return!1},A.graphJson=function(X,Q,V,le,ae,j){(ae&&Q&&!X._fullData||ae&&!Q&&!X._fullLayout)&&A.supplyDefaults(X);var ee=ae?X._fullData:X.data,te=ae?X._fullLayout:X.layout,pe=(X._transitionData||{})._frames;function we(Pe,je){if(typeof Pe=="function")return je?"_function_":null;if(i.isPlainObject(Pe)){var at={},nt;return Object.keys(Pe).sort().forEach(function(se){if(["_","["].indexOf(se.charAt(0))===-1){if(typeof Pe[se]=="function"){je&&(at[se]="_function");return}if(V==="keepdata"){if(se.slice(-3)==="src")return}else if(V==="keepstream"){if(nt=Pe[se+"src"],typeof nt=="string"&&nt.indexOf(":")>0&&!i.isPlainObject(Pe.stream))return}else if(V!=="keepall"&&(nt=Pe[se+"src"],typeof nt=="string"&&nt.indexOf(":")>0))return;at[se]=we(Pe[se],je)}}),at}var tt=Array.isArray(Pe),Ve=i.isTypedArray(Pe);if((tt||Ve)&&Pe.dtype&&Pe.shape){var he=Pe.bdata;return we({dtype:Pe.dtype,shape:Pe.shape,bdata:i.isArrayBuffer(he)?e.encode(he):he},je)}return tt?Pe.map(function(se){return we(se,je)}):Ve?i.simpleMap(Pe,i.identity):i.isJSDate(Pe)?i.ms2DateTimeLocal(+Pe):Pe}var Se={data:(ee||[]).map(function(Pe){var je=we(Pe);return Q&&delete je.fit,je})};if(!Q&&(Se.layout=we(te),ae)){var Re=te._size;Se.layout.computed={margin:{b:Re.b,l:Re.l,r:Re.r,t:Re.t}}}return pe&&(Se.frames=we(pe)),j&&(Se.config=we(X._context,!0)),le==="object"?Se:JSON.stringify(Se)},A.modifyFrames=function(X,Q){var V,le,ae,j=X._transitionData._frames,ee=X._transitionData._frameHash;for(V=0;V0&&(X._transitioningWithDuration=!0),X._transitionData._interruptCallbacks.push(function(){le=!0}),V.redraw&&X._transitionData._interruptCallbacks.push(function(){return r.call("redraw",X)}),X._transitionData._interruptCallbacks.push(function(){X.emit("plotly_transitioninterrupted",[])});var Pe=0,je=0;function at(){return Pe++,function(){je++,!le&&je===Pe&&te(Re)}}V.runFn(at),setTimeout(at())})}function te(Re){if(X._transitionData)return j(X._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(V.redraw)return r.call("redraw",X)}).then(function(){X._transitioning=!1,X._transitioningWithDuration=!1,X.emit("plotly_transitioned",[])}).then(Re)}function pe(){if(X._transitionData)return X._transitioning=!1,ae(X._transitionData._interruptCallbacks)}var we=[A.previousPromises,pe,V.prepareFn,A.rehover,A.reselect,ee],Se=i.syncOrAsync(we,X);return(!Se||!Se.then)&&(Se=Promise.resolve()),Se.then(function(){return X})}A.doCalcdata=function(X,Q){var V=h.list(X),le=X._fullData,ae=X._fullLayout,j,ee,te,pe,we=new Array(le.length),Se=(X.calcdata||[]).slice();for(X.calcdata=we,ae._numBoxes=0,ae._numViolins=0,ae._violinScaleGroupStats={},X._hmpixcount=0,X._hmlumcount=0,ae._piecolormap={},ae._sunburstcolormap={},ae._treemapcolormap={},ae._iciclecolormap={},ae._funnelareacolormap={},te=0;te=0;pe--)if(Ce[pe].enabled){j._indexToPoints=Ce[pe]._indexToPoints;break}ee&&ee.calc&&(ne=ee.calc(X,j))}(!Array.isArray(ne)||!ne[0])&&(ne=[{x:s,y:s}]),ne[0].t||(ne[0].t={}),ne[0].trace=j,we[he]=ne}}for(de(V,le,ae),te=0;teee||Pe>te)&&(ae.style("overflow","hidden"),Se=ae.node().getBoundingClientRect(),Re=Se.width,Pe=Se.height);var je=+O.attr("x"),at=+O.attr("y"),nt=Y||O.node().getBoundingClientRect().height,tt=-nt/4;if(ue[0]==="y")j.attr({transform:"rotate("+[-90,je,at]+")"+_(-Re/2,tt-Pe/2)});else if(ue[0]==="l")at=tt-Pe/2;else if(ue[0]==="a"&&ue.indexOf("atitle")!==0)je=0,at=tt;else{var Ve=O.attr("text-anchor");je=je-Re*(Ve==="middle"?.5:Ve==="end"?1:0),at=at+tt-Pe/2}ae.attr({x:je,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 i(O,L,U){var B=parseInt((MathJax.version||"").split(".")[0]);if(B!==2&&B!==3){v.warn("No MathJax version:",MathJax.version);return}var W,$,ue,ce,de=function(){return $=v.extendDeepAll({},MathJax.Hub.config),ue=MathJax.Hub.processSectionDelay,MathJax.Hub.processSectionDelay!==void 0&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:a},displayAlign:"left"})},Y=function(){$=v.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=a},X=function(){if(W=MathJax.Hub.config.menuSettings.renderer,W!=="SVG")return MathJax.Hub.setRenderer("SVG")},Q=function(){W=MathJax.config.startup.output,W!=="svg"&&(MathJax.config.startup.output="svg")},V=function(){var pe="math-output-"+v.randstr({},64);ce=q.select("body").append("div").attr({id:pe}).style({visibility:"hidden",position:"absolute","font-size":L.fontSize+"px"}).text(o(O));var we=ce.node();return B===2?MathJax.Hub.Typeset(we):MathJax.typeset([we])},le=function(){var pe=ce.select(B===2?".MathJax_SVG":".MathJax"),we=!pe.empty()&&ce.select("svg").node();if(!we)v.log("There was an error in the tex syntax.",O),U();else{var Se=we.getBoundingClientRect(),Re;B===2?Re=q.select("body").select("#MathJax_SVG_glyphs"):Re=pe.select("defs"),U(pe,Re,Se)}ce.remove()},ae=function(){if(W!=="SVG")return MathJax.Hub.setRenderer(W)},j=function(){W!=="svg"&&(MathJax.config.startup.output=W)},ee=function(){return ue!==void 0&&(MathJax.Hub.processSectionDelay=ue),MathJax.Hub.Config($)},te=function(){MathJax.config=$};B===2?MathJax.Hub.Queue(de,X,V,le,ae,ee):B===3&&(Y(),Q(),MathJax.startup.defaultReady(),MathJax.startup.promise.then(function(){V(),le(),j(),te()}))}var n={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",m=["http:","https:","mailto:","",void 0,":"],c=Z.NEWLINES=/(\r\n?|\n)/g,T=/(<[^<>]*>)/,l=/<(\/?)([^ >]*)(\s+(.*))?>/i,x=//i;Z.BR_TAG_ALL=//gi;var w=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,A=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,E=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,p=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function b(O,L){if(!O)return null;var U=O.match(L),B=U&&(U[3]||U[4]);return B&&y(B)}var d=/(^|;)\s*color:/;Z.plainText=function(O,L){L=L||{};for(var U=L.len!==void 0&&L.len!==-1?L.len:1/0,B=L.allowedTags!==void 0?L.allowedTags:["br"],W="...",$=W.length,ue=O.split(T),ce=[],de="",Y=0,X=0;X$?ce.push(Q.slice(0,Math.max(0,j-$))+W):ce.push(Q.slice(0,j));break}de=""}}return ce.join("")};var u={mu:"\u03BC",amp:"&",lt:"<",gt:">",nbsp:"\xA0",times:"\xD7",plusmn:"\xB1",deg:"\xB0"},g=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function y(O){return O.replace(g,function(L,U){var B;return U.charAt(0)==="#"?B=D(U.charAt(1)==="x"?parseInt(U.slice(2),16):parseInt(U.slice(1),10)):B=u[U],B||L})}Z.convertEntities=y;function D(O){if(!(O>1114111)){var L=String.fromCodePoint;if(L)return L(O);var U=String.fromCharCode;return O<=65535?U(O):U((O>>10)+55232,O%1024+56320)}}function P(O,L){L=L.replace(c," ");var U=!1,B=[],W,$=-1;function ue(){$++;var Pe=document.createElementNS(S.svg,"tspan");q.select(Pe).attr({class:"line",dy:$*M+"em"}),O.appendChild(Pe),W=Pe;var je=B;if(B=[{node:Pe}],je.length>1)for(var at=1;at.",L);return}var je=B.pop();Pe!==je.type&&v.log("Start tag <"+je.type+"> doesnt match end tag <"+Pe+">. Pretending it did match.",L),W=B[B.length-1].node}var X=x.test(L);X?ue():(W=O,B=[{node:O}]);for(var Q=L.split(T),V=0;V=0;x--,w++){var A=c[x];l[w]=[1-A[0],A[1]]}return l}function h(c,T){T=T||{};for(var l=c.domain,x=c.range,w=x.length,A=new Array(w),E=0;Ec-f?f=c-(m-c):m-c=0?x=o.colorscale.sequential:x=o.colorscale.sequentialminus,s._sync("colorscale",x)}}}}),rc=He({"src/components/colorscale/index.js"(Z,q){"use strict";var v=W0(),_=wp();q.exports={moduleType:"component",name:"colorscale",attributes:ku(),layoutAttributes:o5(),supplyLayoutDefaults:oz(),handleDefaults:_h(),crossTraceDefaults:sz(),calc:Tp(),scales:v.scales,defaultScale:v.defaultScale,getScale:v.get,isValidScale:v.isValid,hasColorscale:_.hasColorscale,extractOpts:_.extractOpts,extractScale:_.extractScale,flipScale:_.flipScale,makeColorScaleFunc:_.makeColorScaleFunc,makeColorScaleFuncFromTrace:_.makeColorScaleFuncFromTrace}}}),Fu=He({"src/traces/scatter/subtypes.js"(Z,q){"use strict";var v=sa(),_=hp().isTypedArraySpec;q.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 M=S.marker;return v.isPlainObject(M)&&(v.isArrayOrTypedArray(M.size)||_(M.size))}}}}),r1=He({"src/traces/scatter/make_bubble_size_func.js"(Z,q){"use strict";var v=ns();q.exports=function(S,M){M||(M=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 i=o(a/M);return v(i)&&i>0?Math.max(i,r):0}}}}),$p=He({"src/components/fx/helpers.js"(Z){"use strict";var q=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||[],i=0;i=0&&o.index2&&(r.push([a].concat(i.splice(0,2))),n="l",a=a=="m"?"l":"L");;){if(i.length==v[n])return i.unshift(a),r.push(i);if(i.length0&&(se=100,he=he.replace("-open","")),he.indexOf("-dot")>0&&(se+=200,he=he.replace("-dot","")),he=l.symbolNames.indexOf(he),he>=0&&(he+=se)}return he%100>=d||he>=400?0:Math.floor(Math.max(he,0))};function g(he,se,ne,Ce){var Ze=he%100;return l.symbolFuncs[Ze](se,ne,Ce)+(he>=200?u:"")}var y=S("~f"),D={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,se,ne,Ce,Ze,rt){var Je=D[Ce];return P(he,se,ne,Je.type,Ze,rt,Je.start,Je.stop,!1,Je.reversed)};function P(he,se,ne,Ce,Ze,rt,Je,St,kt,Bt){var Vt=Ze.length,Ar;Ce==="linear"?Ar={node:"linearGradient",attrs:{x1:Je.x,y1:Je.y,x2:St.x,y2:St.y,gradientUnits:kt?"userSpaceOnUse":"objectBoundingBox"},reversed:Bt}:Ce==="radial"&&(Ar={node:"radialGradient",reversed:Bt});for(var vr=new Array(Vt),qr=0;qr=0&&he.i===void 0&&(he.i=rt.i),se.style("opacity",Ce.selectedOpacityFn?Ce.selectedOpacityFn(he):he.mo===void 0?Je.opacity:he.mo),Ce.ms2mrc){var kt;he.ms==="various"||Je.size==="various"?kt=3:kt=Ce.ms2mrc(he.ms),he.mrc=kt,Ce.selectedSizeFn&&(kt=he.mrc=Ce.selectedSizeFn(he));var Bt=l.symbolNumber(he.mx||Je.symbol)||0;he.om=Bt%200>=100;var Vt=Ve(he,ne),Ar=ee(he,ne);se.attr("d",g(Bt,kt,Vt,Ar))}var vr=!1,qr,kr,Ur;if(he.so)Ur=St.outlierwidth,kr=St.outliercolor,qr=Je.outliercolor;else{var _t=(St||{}).width;Ur=(he.mlw+1||_t+1||(he.trace?(he.trace.marker.line||{}).width:0)+1)-1||0,"mlc"in he?kr=he.mlcc=Ce.lineScale(he.mlc):_.isArrayOrTypedArray(St.color)?kr=r.defaultLine:kr=St.color,_.isArrayOrTypedArray(Je.color)&&(qr=r.defaultLine,vr=!0),"mc"in he?qr=he.mcc=Ce.markerScale(he.mc):qr=Je.color||Je.colors||"rgba(0,0,0,0)",Ce.selectedColorFn&&(qr=Ce.selectedColorFn(he))}let Fe=he.mld||(St||{}).dash;if(Fe&&l.dashLine(se,Fe,Ur),he.om)se.call(r.stroke,qr).style({"stroke-width":(Ur||1)+"px",fill:"none"});else{se.style("stroke-width",(he.isBlank?0:Ur)+"px");var Ye=Je.gradient,Ae=he.mgt;Ae?vr=!0:Ae=Ye&&Ye.type,_.isArrayOrTypedArray(Ae)&&(Ae=Ae[0],D[Ae]||(Ae=0));var Le=Je.pattern,We=l.getPatternAttr,Ke=Le&&(We(Le.shape,he.i,"")||We(Le.path,he.i,""));if(Ae&&Ae!=="none"){var st=he.mgc;st?vr=!0:st=Ye.color;var ot=ne.uid;vr&&(ot+="-"+he.i),l.gradient(se,Ze,ot,Ae,[[0,st],[1,qr]],"fill")}else if(Ke){var Ut=!1,Ct=Le.fgcolor;!Ct&&rt&&rt.color&&(Ct=rt.color,Ut=!0);var Pt=We(Ct,he.i,rt&&rt.color||null),jt=We(Le.bgcolor,he.i,null),cr=Le.fgopacity,or=We(Le.size,he.i,8),nr=We(Le.solidity,he.i,.3);Ut=Ut||he.mcc||_.isArrayOrTypedArray(Le.shape)||_.isArrayOrTypedArray(Le.path)||_.isArrayOrTypedArray(Le.bgcolor)||_.isArrayOrTypedArray(Le.fgcolor)||_.isArrayOrTypedArray(Le.size)||_.isArrayOrTypedArray(Le.solidity);var Pr=ne.uid;Ut&&(Pr+="-"+he.i),l.pattern(se,"point",Ze,Pr,Ke,or,nr,he.mcc,Le.fillmode,jt,Pt,cr)}else _.isArrayOrTypedArray(qr)?r.fill(se,qr[he.i]):r.fill(se,qr);Ur&&r.stroke(se,kr)}},l.makePointStyleFns=function(he){var se={},ne=he.marker;return se.markerScale=l.tryColorscale(ne,""),se.lineScale=l.tryColorscale(ne,"line"),t.traceIs(he,"symbols")&&(se.ms2mrc=m.isBubble(he)?c(he):function(){return(ne.size||6)/2}),he.selectedpoints&&_.extendFlat(se,l.makeSelectedPointStyleFns(he)),se},l.makeSelectedPointStyleFns=function(he){var se={},ne=he.selected||{},Ce=he.unselected||{},Ze=he.marker||{},rt=ne.marker||{},Je=Ce.marker||{},St=Ze.opacity,kt=rt.opacity,Bt=Je.opacity,Vt=kt!==void 0,Ar=Bt!==void 0;(_.isArrayOrTypedArray(St)||Vt||Ar)&&(se.selectedOpacityFn=function(Le){var We=Le.mo===void 0?Ze.opacity:Le.mo;return Le.selected?Vt?kt:We:Ar?Bt:f*We});var vr=Ze.color,qr=rt.color,kr=Je.color;(qr||kr)&&(se.selectedColorFn=function(Le){var We=Le.mcc||vr;return Le.selected?qr||We:kr||We});var Ur=Ze.size,_t=rt.size,Fe=Je.size,Ye=_t!==void 0,Ae=Fe!==void 0;return t.traceIs(he,"symbols")&&(Ye||Ae)&&(se.selectedSizeFn=function(Le){var We=Le.mrc||Ur/2;return Le.selected?Ye?_t/2:We:Ae?Fe/2:We}),se},l.makeSelectedTextStyleFns=function(he){var se={},ne=he.selected||{},Ce=he.unselected||{},Ze=he.textfont||{},rt=ne.textfont||{},Je=Ce.textfont||{},St=Ze.color,kt=rt.color,Bt=Je.color;return se.selectedTextColorFn=function(Vt){var Ar=Vt.tc||St;return Vt.selected?kt||Ar:Bt||(kt?Ar:r.addOpacity(Ar,f))},se},l.selectedPointStyle=function(he,se){if(!(!he.size()||!se.selectedpoints)){var ne=l.makeSelectedPointStyleFns(se),Ce=se.marker||{},Ze=[];ne.selectedOpacityFn&&Ze.push(function(rt,Je){rt.style("opacity",ne.selectedOpacityFn(Je))}),ne.selectedColorFn&&Ze.push(function(rt,Je){r.fill(rt,ne.selectedColorFn(Je))}),ne.selectedSizeFn&&Ze.push(function(rt,Je){var St=Je.mx||Ce.symbol||0,kt=ne.selectedSizeFn(Je);rt.attr("d",g(l.symbolNumber(St),kt,Ve(Je,se),ee(Je,se))),Je.mrc2=kt}),Ze.length&&he.each(function(rt){for(var Je=v.select(this),St=0;St0?ne:0}l.textPointStyle=function(he,se,ne){if(he.size()){var Ce;if(se.selectedpoints){var Ze=l.makeSelectedTextStyleFns(se);Ce=Ze.selectedTextColorFn}var rt=se.texttemplate,Je=ne._fullLayout;he.each(function(St){var kt=v.select(this),Bt=rt?_.extractOption(St,se,"txt","texttemplate"):_.extractOption(St,se,"tx","text");if(!Bt&&Bt!==0){kt.remove();return}if(rt){var Vt=se._module.formatLabels,Ar=Vt?Vt(St,se,Je):{},vr={};T(vr,se,St.i),Bt=_.texttemplateString({data:[vr,St,se._meta],fallback:se.texttemplatefallback,labels:Ar,locale:Je._d3locale,template:Bt})}var qr=St.tp||se.textposition,kr=N(St,se),Ur=Ce?Ce(St):St.tc||se.textfont.color;kt.call(l.font,{family:St.tf||se.textfont.family,weight:St.tw||se.textfont.weight,style:St.ty||se.textfont.style,variant:St.tv||se.textfont.variant,textcase:St.tC||se.textfont.textcase,lineposition:St.tE||se.textfont.lineposition,shadow:St.tS||se.textfont.shadow,size:kr,color:Ur}).text(Bt).call(i.convertToTspans,ne).call(F,qr,kr,St.mrc)})}},l.selectedTextStyle=function(he,se){if(!(!he.size()||!se.selectedpoints)){var ne=l.makeSelectedTextStyleFns(se);he.each(function(Ce){var Ze=v.select(this),rt=ne.selectedTextColorFn(Ce),Je=Ce.tp||se.textposition,St=N(Ce,se);r.fill(Ze,rt);var kt=t.traceIs(se,"bar-like");F(Ze,Je,St,Ce.mrc2||Ce.mrc,kt)})}};var O=.5;l.smoothopen=function(he,se){if(he.length<3)return"M"+he.join("L");var ne="M"+he[0],Ce=[],Ze;for(Ze=1;Ze=kt||Le>=Vt&&Le<=kt)&&(We<=Ar&&We>=Bt||We>=Ar&&We<=Bt)&&(he=[Le,We])}return he}l.applyBackoff=Y,l.makeTester=function(){var he=_.ensureSingleById(v.select("body"),"svg","js-plotly-tester",function(ne){ne.attr(n.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})}),se=_.ensureSingle(he,"path","js-reference-point",function(ne){ne.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})});l.tester=he,l.testref=se},l.savedBBoxes={};var X=0,Q=1e4;l.bBox=function(he,se,ne){ne||(ne=V(he));var Ce;if(ne){if(Ce=l.savedBBoxes[ne],Ce)return _.extendFlat({},Ce)}else if(he.childNodes.length===1){var Ze=he.childNodes[0];if(ne=V(Ze),ne){var rt=+Ze.getAttribute("x")||0,Je=+Ze.getAttribute("y")||0,St=Ze.getAttribute("transform");if(!St){var kt=l.bBox(Ze,!1,ne);return rt&&(kt.left+=rt,kt.right+=rt),Je&&(kt.top+=Je,kt.bottom+=Je),kt}if(ne+="~"+rt+"~"+Je+"~"+St,Ce=l.savedBBoxes[ne],Ce)return _.extendFlat({},Ce)}}var Bt,Vt;se?Bt=he:(Vt=l.tester.node(),Bt=he.cloneNode(!0),Vt.appendChild(Bt)),v.select(Bt).attr("transform",null).call(i.positionText,0,0);var Ar=Bt.getBoundingClientRect(),vr=l.testref.node().getBoundingClientRect();se||Vt.removeChild(Bt);var qr={height:Ar.height,width:Ar.width,left:Ar.left-vr.left,top:Ar.top-vr.top,right:Ar.right-vr.left,bottom:Ar.bottom-vr.top};return X>=Q&&(l.savedBBoxes={},X=0),ne&&(l.savedBBoxes[ne]=qr),X++,_.extendFlat({},qr)};function V(he){var se=he.getAttribute("data-unformatted");if(se!==null)return se+he.getAttribute("data-math")+he.getAttribute("text-anchor")+he.getAttribute("style")}l.setClipUrl=function(he,se,ne){he.attr("clip-path",le(se,ne))};function le(he,se){if(!he)return null;var ne=se._context,Ce=ne._exportedPlot?"":ne._baseUrl||"";return Ce?"url('"+Ce+"#"+he+"')":"url(#"+he+")"}l.getTranslate=function(he){var se=/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,ne=he.attr?"attr":"getAttribute",Ce=he[ne]("transform")||"",Ze=Ce.replace(se,function(rt,Je,St){return[Je,St].join(" ")}).split(" ");return{x:+Ze[0]||0,y:+Ze[1]||0}},l.setTranslate=function(he,se,ne){var Ce=/(\btranslate\(.*?\);?)/,Ze=he.attr?"attr":"getAttribute",rt=he.attr?"attr":"setAttribute",Je=he[Ze]("transform")||"";return se=se||0,ne=ne||0,Je=Je.replace(Ce,"").trim(),Je+=a(se,ne),Je=Je.trim(),he[rt]("transform",Je),Je},l.getScale=function(he){var se=/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,ne=he.attr?"attr":"getAttribute",Ce=he[ne]("transform")||"",Ze=Ce.replace(se,function(rt,Je,St){return[Je,St].join(" ")}).split(" ");return{x:+Ze[0]||1,y:+Ze[1]||1}},l.setScale=function(he,se,ne){var Ce=/(\bscale\(.*?\);?)/,Ze=he.attr?"attr":"getAttribute",rt=he.attr?"attr":"setAttribute",Je=he[Ze]("transform")||"";return se=se||1,ne=ne||1,Je=Je.replace(Ce,"").trim(),Je+="scale("+se+","+ne+")",Je=Je.trim(),he[rt]("transform",Je),Je};var ae=/\s*sc.*/;l.setPointGroupScale=function(he,se,ne){if(se=se||1,ne=ne||1,!!he){var Ce=se===1&&ne===1?"":"scale("+se+","+ne+")";he.each(function(){var Ze=(this.getAttribute("transform")||"").replace(ae,"");Ze+=Ce,Ze=Ze.trim(),this.setAttribute("transform",Ze)})}};var j=/translate\([^)]*\)\s*$/;l.setTextPointsScale=function(he,se,ne){he&&he.each(function(){var Ce,Ze=v.select(this),rt=Ze.select("text");if(rt.node()){var Je=parseFloat(rt.attr("x")||0),St=parseFloat(rt.attr("y")||0),kt=(Ze.attr("transform")||"").match(j);se===1&&ne===1?Ce=[]:Ce=[a(Je,St),"scale("+se+","+ne+")",a(-Je,-St)],kt&&Ce.push(kt),Ze.attr("transform",Ce.join(""))}})};function ee(he,se){var ne;return he&&(ne=he.mf),ne===void 0&&(ne=se.marker&&se.marker.standoff||0),!se._geo&&!se._xA?-ne:ne}l.getMarkerStandoff=ee;var te=Math.atan2,pe=Math.cos,we=Math.sin;function Se(he,se){var ne=se[0],Ce=se[1];return[ne*pe(he)-Ce*we(he),ne*we(he)+Ce*pe(he)]}var Re,Pe,je,at,nt,tt;function Ve(he,se){var ne=he.ma;ne===void 0&&(ne=se.marker.angle,(!ne||_.isArrayOrTypedArray(ne))&&(ne=0));var Ce,Ze,rt=se.marker.angleref;if(rt==="previous"||rt==="north"){if(se._geo){var Je=se._geo.project(he.lonlat);Ce=Je[0],Ze=Je[1]}else{var St=se._xA,kt=se._yA;if(St&&kt)Ce=St.c2p(he.x),Ze=kt.c2p(he.y);else return 90}if(se._geo){var Bt=he.lonlat[0],Vt=he.lonlat[1],Ar=se._geo.project([Bt,Vt+1e-5]),vr=se._geo.project([Bt+1e-5,Vt]),qr=te(vr[1]-Ze,vr[0]-Ce),kr=te(Ar[1]-Ze,Ar[0]-Ce),Ur;if(rt==="north")Ur=ne/180*Math.PI;else if(rt==="previous"){var _t=Bt/180*Math.PI,Fe=Vt/180*Math.PI,Ye=Re/180*Math.PI,Ae=Pe/180*Math.PI,Le=Ye-_t,We=pe(Ae)*we(Le),Ke=we(Ae)*pe(Fe)-pe(Ae)*we(Fe)*pe(Le);Ur=-te(We,Ke)-Math.PI,Re=Bt,Pe=Vt}var st=Se(qr,[pe(Ur),0]),ot=Se(kr,[we(Ur),0]);ne=te(st[1]+ot[1],st[0]+ot[0])/Math.PI*180,rt==="previous"&&!(tt===se.uid&&he.i===nt+1)&&(ne=null)}if(rt==="previous"&&!se._geo)if(tt===se.uid&&he.i===nt+1&&M(Ce)&&M(Ze)){var Ut=Ce-je,Ct=Ze-at,Pt=se.line&&se.line.shape||"",jt=Pt.slice(Pt.length-1);jt==="h"&&(Ct=0),jt==="v"&&(Ut=0),ne+=te(Ct,Ut)/Math.PI*180+90}else ne=null}return je=Ce,at=Ze,nt=he.i,tt=se.uid,ne}l.getMarkerAngle=Ve}}),K0=He({"src/components/titles/index.js"(Z,q){"use strict";var v=Vn(),_=ns(),S=bc(),M=so(),e=sa(),t=e.strTranslate,r=as(),o=$n(),a=su(),i=Km(),n=uh().OPPOSITE_SIDE,s=/ [XY][0-9]* /,h=1.6,f=1.6;function m(c,T,l){var x=c._fullLayout,w=l.propContainer,A=l.propName,E=l.placeholder,p=l.traceIndex,b=l.avoid||{},d=l.attributes,u=l.transform,g=l.containerGroup,y=1,D=w.title,P=(D&&D.text?D.text:"").trim(),z=!1,F=D&&D.font?D.font:{},N=F.family,O=F.size,L=F.color,U=F.weight,B=F.style,W=F.variant,$=F.textcase,ue=F.lineposition,ce=F.shadow,de=l.subtitlePropName,Y=!!de,X=l.subtitlePlaceholder,Q=(w.title||{}).subtitle||{text:"",font:{}},V=(Q.text||"").trim(),le=!1,ae=1,j=Q.font,ee=j.family,te=j.size,pe=j.color,we=j.weight,Se=j.style,Re=j.variant,Pe=j.textcase,je=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 Ve(vr,qr){return vr===void 0||qr===void 0?!1:vr.replace(s," % ")===qr.replace(s," % ")}P===""?y=0:Ve(P,E)&&(tt||(P=""),y=.2,z=!0),Y&&(V===""?ae=0:Ve(V,X)&&(tt||(V=""),ae=.2,le=!0)),l._meta?P=e.templateString(P,l._meta):x._meta&&(P=e.templateString(P,x._meta));var he=P||V||tt,se;g||(g=e.ensureSingle(x._infolayer,"g","g-"+T),se=x._hColorbarMoveTitle);var ne=g.selectAll("text."+T).data(he?[0]:[]);ne.enter().append("text"),ne.text(P).attr("class",T),ne.exit().remove();var Ce=null,Ze=T+"-subtitle",rt=V||tt;if(Y&&(Ce=g.selectAll("text."+Ze).data(rt?[0]:[]),Ce.enter().append("text"),Ce.text(V).attr("class",Ze),Ce.exit().remove()),!he)return g;function Je(vr,qr){e.syncOrAsync([St,kt],{title:vr,subtitle:qr})}function St(vr){var qr=vr.title,kr=vr.subtitle,Ur;!u&&se&&(u={}),u?(Ur="",u.rotate&&(Ur+="rotate("+[u.rotate,d.x,d.y]+")"),(u.offset||se)&&(Ur+=t(0,(u.offset||0)-(se||0)))):Ur=null,qr.attr("transform",Ur);function _t(Ke){if(Ke){var st=v.select(Ke.node().parentNode).select("."+Ze);if(!st.empty()){var ot=Ke.node().getBBox();if(ot.height){var Ut=ot.y+ot.height+h*te;st.attr("y",Ut)}}}}if(qr.style("opacity",y*o.opacity(L)).call(r.font,{color:o.rgb(L),size:v.round(O,2),family:N,weight:U,style:B,variant:W,textcase:$,shadow:ce,lineposition:ue}).attr(d).call(a.convertToTspans,c,_t),kr&&!kr.empty()){var Fe=g.select("."+T+"-math-group"),Ye=qr.node().getBBox(),Ae=Fe.node()?Fe.node().getBBox():void 0,Le=Ae?Ae.y+Ae.height+h*te:Ye.y+Ye.height+f*te,We=e.extendFlat({},d,{y:Le});kr.attr("transform",Ur),kr.style("opacity",ae*o.opacity(pe)).call(r.font,{color:o.rgb(pe),size:v.round(te,2),family:ee,weight:we,style:Se,variant:Re,textcase:Pe,shadow:at,lineposition:je}).attr(We).call(a.convertToTspans,c)}return S.previousPromises(c)}function kt(vr){var qr=vr.title,kr=v.select(qr.node().parentNode);if(b&&b.selection&&b.side&&P){kr.attr("transform",null);var Ur=n[b.side],_t=b.side==="left"||b.side==="top"?-1:1,Fe=_(b.pad)?b.pad:2,Ye=r.bBox(kr.node()),Ae={t:0,b:0,l:0,r:0},Le=c._fullLayout._reservedMargin;for(var We in Le)for(var Ke in Le[We]){var st=Le[We][Ke];Ae[Ke]=Math.max(Ae[Ke],st)}var ot={left:Ae.l,top:Ae.t,right:x.width-Ae.r,bottom:x.height-Ae.b},Ut=b.maxShift||_t*(ot[b.side]-Ye[b.side]),Ct=0;if(Ut<0)Ct=Ut;else{var Pt=b.offsetLeft||0,jt=b.offsetTop||0;Ye.left-=Pt,Ye.right-=Pt,Ye.top-=jt,Ye.bottom-=jt,b.selection.each(function(){var or=r.bBox(this);e.bBoxIntersect(Ye,or,Fe)&&(Ct=Math.max(Ct,_t*(or[b.side]-Ye[Ur])+Fe))}),Ct=Math.min(Ut,Ct),w._titleScoot=Math.abs(Ct)}if(Ct>0||Ut<0){var cr={left:[-Ct,0],right:[Ct,0],top:[0,-Ct],bottom:[0,Ct]}[b.side];kr.attr("transform",t(cr[0],cr[1]))}}}ne.call(Je,Ce);function Bt(vr,qr){vr.text(qr).on("mouseover.opacity",function(){v.select(this).transition().duration(i.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){v.select(this).transition().duration(i.HIDE_PLACEHOLDER).style("opacity",0)})}if(tt&&(P?ne.on(".opacity",null):(Bt(ne,E),z=!0),ne.call(a.makeEditable,{gd:c}).on("edit",function(vr){p!==void 0?M.call("_guiRestyle",c,A,vr,p):M.call("_guiRelayout",c,A,vr)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(Je)}).on("input",function(vr){this.text(vr||" ").call(a.positionText,d.x,d.y)}),Y)){if(Y&&!P){var Vt=ne.node().getBBox(),Ar=Vt.y+Vt.height+f*te;Ce.attr("y",Ar)}V?Ce.on(".opacity",null):(Bt(Ce,X),le=!0),Ce.call(a.makeEditable,{gd:c}).on("edit",function(vr){M.call("_guiRelayout",c,"title.subtitle.text",vr)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(Je)}).on("input",function(vr){this.text(vr||" ").call(a.positionText,Ce.attr("x"),Ce.attr("y"))})}return ne.classed("js-placeholder",z),Ce&&!Ce.empty()&&Ce.classed("js-placeholder",le),g}q.exports={draw:m,SUBTITLE_PADDING_EM:f,SUBTITLE_PADDING_MATHJAX_EM:h}}}),wv=He({"src/plots/cartesian/set_convert.js"(Z,q){"use strict";var v=Vn(),_=Zv().utcFormat,S=sa(),M=S.numberFormat,e=ns(),t=S.cleanNumber,r=S.ms2DateTime,o=S.dateTime2ms,a=S.ensureNumber,i=S.isArrayOrTypedArray,n=Gs(),s=n.FP_SAFE,h=n.BADNUM,f=n.LOG_CLIP,m=n.ONEWEEK,c=n.ONEDAY,T=n.ONEHOUR,l=n.ONEMIN,x=n.ONESEC,w=tf(),A=lh(),E=A.HOUR_PATTERN,p=A.WEEKDAY_PATTERN;function b(u){return Math.pow(10,u)}function d(u){return u!=null}q.exports=function(g,y){y=y||{};var D=g._id||"x",P=D.charAt(0);function z(V,le){if(V>0)return Math.log(V)/Math.LN10;if(V<=0&&le&&g.range&&g.range.length===2){var ae=g.range[0],j=g.range[1];return .5*(ae+j-2*f*Math.abs(ae-j))}else return h}function F(V,le,ae,j){if((j||{}).msUTC&&e(V))return+V;var ee=o(V,ae||g.calendar);if(ee===h)if(e(V)){V=+V;var te=Math.floor(S.mod(V+.05,1)*10),pe=Math.round(V-te/10);ee=o(new Date(pe))+te/10}else return h;return ee}function N(V,le,ae){return r(V,le,ae||g.calendar)}function O(V){return g._categories[Math.round(V)]}function L(V){if(d(V)){if(g._categoriesMap===void 0&&(g._categoriesMap={}),g._categoriesMap[V]!==void 0)return g._categoriesMap[V];g._categories.push(typeof V=="number"?String(V):V);var le=g._categories.length-1;return g._categoriesMap[V]=le,le}return h}function U(V,le){for(var ae=new Array(le),j=0;jg.range[1]&&(ae=!ae);for(var j=ae?-1:1,ee=j*V,te=0,pe=0;peSe)te=pe+1;else{te=ee<(we+Se)/2?pe:pe+1;break}}var Re=g._B[te]||0;return isFinite(Re)?ue(V,g._m2,Re):0},Y=function(V){var le=g._rangebreaks.length;if(!le)return ce(V,g._m,g._b);for(var ae=0,j=0;jg._rangebreaks[j].pmax&&(ae=j+1);return ce(V,g._m2,g._B[ae])}}g.c2l=g.type==="log"?z:a,g.l2c=g.type==="log"?b:a,g.l2p=de,g.p2l=Y,g.c2p=g.type==="log"?function(V,le){return de(z(V,le))}:de,g.p2c=g.type==="log"?function(V){return b(Y(V))}:Y,["linear","-"].indexOf(g.type)!==-1?(g.d2r=g.r2d=g.d2c=g.r2c=g.d2l=g.r2l=t,g.c2d=g.c2r=g.l2d=g.l2r=a,g.d2p=g.r2p=function(V){return g.l2p(t(V))},g.p2d=g.p2r=Y,g.cleanPos=a):g.type==="log"?(g.d2r=g.d2l=function(V,le){return z(t(V),le)},g.r2d=g.r2c=function(V){return b(t(V))},g.d2c=g.r2l=t,g.c2d=g.l2r=a,g.c2r=z,g.l2d=b,g.d2p=function(V,le){return g.l2p(g.d2r(V,le))},g.p2d=function(V){return b(Y(V))},g.r2p=function(V){return g.l2p(t(V))},g.p2r=Y,g.cleanPos=a):g.type==="date"?(g.d2r=g.r2d=S.identity,g.d2c=g.r2c=g.d2l=g.r2l=F,g.c2d=g.c2r=g.l2d=g.l2r=N,g.d2p=g.r2p=function(V,le,ae){return g.l2p(F(V,0,ae))},g.p2d=g.p2r=function(V,le,ae){return N(Y(V),le,ae)},g.cleanPos=function(V){return S.cleanDate(V,h,g.calendar)}):g.type==="category"?(g.d2c=g.d2l=L,g.r2d=g.c2d=g.l2d=O,g.d2r=g.d2l_noadd=W,g.r2c=function(V){var le=$(V);return le!==void 0?le:g.fraction2r(.5)},g.l2r=g.c2r=a,g.r2l=$,g.d2p=function(V){return g.l2p(g.r2c(V))},g.p2d=function(V){return O(Y(V))},g.r2p=g.d2p,g.p2r=Y,g.cleanPos=function(V){return typeof V=="string"&&V!==""?V:a(V)}):g.type==="multicategory"&&(g.r2d=g.c2d=g.l2d=O,g.d2r=g.d2l_noadd=W,g.r2c=function(V){var le=W(V);return le!==void 0?le:g.fraction2r(.5)},g.r2c_just_indices=B,g.l2r=g.c2r=a,g.r2l=W,g.d2p=function(V){return g.l2p(g.r2c(V))},g.p2d=function(V){return O(Y(V))},g.r2p=g.d2p,g.p2r=Y,g.cleanPos=function(V){return Array.isArray(V)||typeof V=="string"&&V!==""?V:a(V)},g.setupMultiCategory=function(V){var le=g._traceIndices,ae,j,ee=g._matchGroup;if(ee&&g._categories.length===0){for(var te in ee)if(te!==D){var pe=y[w.id2name(te)];le=le.concat(pe._traceIndices)}}var we=[[0,{}],[0,{}]],Se=[];for(ae=0;aepe[1]&&(j[te?0:1]=ae,ee[1]=pe[1]),ee[0]>=ee[1])if(le!==void 0){var we=pe[0]+1;ae!==void 0&&(we=Math.min(we,pe[1])),j[te?0:1]=g.l2r(we)}else ae!==void 0&&(j[te?1:0]=g.l2r(pe[1]-1))}},g.cleanRange=function(V,le){g._cleanRange(V,le),g.limitRange(V)},g._cleanRange=function(V,le){le||(le={}),V||(V="range");var ae=S.nestedProperty(g,V).get(),j,ee;if(g.type==="date"?ee=S.dfltRange(g.calendar):P==="y"?ee=A.DFLTRANGEY:g._name==="realaxis"?ee=[0,1]:ee=le.dfltRange||A.DFLTRANGEX,ee=ee.slice(),(g.rangemode==="tozero"||g.rangemode==="nonnegative")&&(ee[0]=0),!ae||ae.length!==2){S.nestedProperty(g,V).set(ee);return}var te=ae[0]===null,pe=ae[1]===null;for(g.type==="date"&&!g.autorange&&(ae[0]=S.cleanDate(ae[0],h,g.calendar),ae[1]=S.cleanDate(ae[1],h,g.calendar)),j=0;j<2;j++)if(g.type==="date"){if(!S.isDateTime(ae[j],g.calendar)){g[V]=ee;break}if(g.r2l(ae[0])===g.r2l(ae[1])){var we=S.constrain(g.r2l(ae[0]),S.MIN_MS+1e3,S.MAX_MS-1e3);ae[0]=g.l2r(we-1e3),ae[1]=g.l2r(we+1e3);break}}else{if(!e(ae[j]))if(!(te||pe)&&e(ae[1-j]))ae[j]=ae[1-j]*(j?10:.1);else{g[V]=ee;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}}},g.setScale=function(V){var le=y._size;if(g.overlaying){var ae=w.getFromId({_fullLayout:y},g.overlaying);g.domain=ae.domain}var j=V&&g._r?"_r":"range",ee=g.calendar;g.cleanRange(j);var te=g.r2l(g[j][0],ee),pe=g.r2l(g[j][1],ee),we=P==="y";if(we?(g._offset=le.t+(1-g.domain[1])*le.h,g._length=le.h*(g.domain[1]-g.domain[0]),g._m=g._length/(te-pe),g._b=-g._m*pe):(g._offset=le.l+g.domain[0]*le.w,g._length=le.w*(g.domain[1]-g.domain[0]),g._m=g._length/(pe-te),g._b=-g._m*te),g._rangebreaks=[],g._lBreaks=0,g._m2=0,g._B=[],g.rangebreaks){var Se,Re;if(g._rangebreaks=g.locateBreaks(Math.min(te,pe),Math.max(te,pe)),g._rangebreaks.length){for(Se=0;Sepe&&(Pe=!Pe),Pe&&g._rangebreaks.reverse();var je=Pe?-1:1;for(g._m2=je*g._length/(Math.abs(pe-te)-g._lBreaks),g._B.push(-g._m2*(we?pe:te)),Se=0;Seee&&(ee+=7,teee&&(ee+=24,te=j&&te=j&&V=Je.min&&(neJe.max&&(Je.max=Ce),Ze=!1)}Ze&&pe.push({min:ne,max:Ce})}};for(ae=0;aex*2}function n(f){return Math.max(1,(f-1)/1e3)}function s(f,m){for(var c=f.length,T=n(c),l=0,x=0,w={},A=0;Al*2}function h(f){return M(f[0])&&M(f[1])}}}),Yd=He({"src/plots/cartesian/autorange.js"(Z,q){"use strict";var v=Vn(),_=ns(),S=sa(),M=Gs().FP_SAFE,e=so(),t=as(),r=tf(),o=r.getFromId,a=r.isLinked;q.exports={applyAutorangeOptions:g,getAutoRange:i,makePadFn:s,doAutoRange:c,findExtremes:T,concatExtremes:m};function i(y,D){var P,z,F=[],N=y._fullLayout,O=s(N,D,0),L=s(N,D,1),U=m(y,D),B=U.min,W=U.max;if(B.length===0||W.length===0)return S.simpleMap(D.range,D.r2l);var $=B[0].val,ue=W[0].val;for(P=1;P0&&(Se=le-O(ee)-L(te),Se>ae?Re/Se>j&&(pe=ee,we=te,j=Re/Se):Re/le>j&&(pe={val:ee.val,nopad:1},we={val:te.val,nopad:1},j=Re/le));function Pe(Ve,he){return Math.max(Ve,L(he))}if($===ue){var je=$-1,at=$+1;if(Q)if($===0)F=[0,1];else{var nt=($>0?W:B).reduce(Pe,0),tt=$/(1-Math.min(.5,nt/le));F=$>0?[0,tt]:[tt,0]}else V?F=[Math.max(0,je),Math.max(1,at)]:F=[je,at]}else Q?(pe.val>=0&&(pe={val:0,nopad:1}),we.val<=0&&(we={val:0,nopad:1})):V&&(pe.val-j*O(pe)<0&&(pe={val:0,nopad:1}),we.val<=0&&(we={val:1,nopad:1})),j=(we.val-pe.val-n(D,ee.val,te.val))/(le-O(pe)-L(we)),F=[pe.val-j*O(pe),we.val+j*L(we)];return F=g(F,D),D.limitRange&&D.limitRange(),de&&F.reverse(),S.simpleMap(F,D.l2r||Number)}function n(y,D,P){var z=0;if(y.rangebreaks)for(var F=y.locateBreaks(D,P),N=0;N0?P.ppadplus:P.ppadminus)||P.ppad||0),ee=ae((y._m>0?P.ppadminus:P.ppadplus)||P.ppad||0),te=ae(P.vpadplus||P.vpad),pe=ae(P.vpadminus||P.vpad);if(!B){if(V=1/0,le=-1/0,U)for($=0;$0&&(V=ue),ue>le&&ue-M&&(V=ue),ue>le&&ue=Re;$--)Se($);return{min:z,max:F,opts:P}}function l(y,D,P,z){w(y,D,P,z,E)}function x(y,D,P,z){w(y,D,P,z,p)}function w(y,D,P,z,F){for(var N=z.tozero,O=z.extrapad,L=!0,U=0;U=P&&(B.extrapad||!O)){L=!1;break}else F(D,B.val)&&B.pad<=P&&(O||!B.extrapad)&&(y.splice(U,1),U--)}if(L){var W=N&&D===0;y.push({val:D,pad:W?0:P,extrapad:W?!1:O})}}function A(y){return _(y)&&Math.abs(y)=D}function b(y,D){var P=D.autorangeoptions;return P&&P.minallowed!==void 0&&u(D,P.minallowed,P.maxallowed)?P.minallowed:P&&P.clipmin!==void 0&&u(D,P.clipmin,P.clipmax)?Math.max(y,D.d2l(P.clipmin)):y}function d(y,D){var P=D.autorangeoptions;return P&&P.maxallowed!==void 0&&u(D,P.minallowed,P.maxallowed)?P.maxallowed:P&&P.clipmax!==void 0&&u(D,P.clipmin,P.clipmax)?Math.min(y,D.d2l(P.clipmax)):y}function u(y,D,P){return D!==void 0&&P!==void 0?(D=y.d2l(D),P=y.d2l(P),D=U&&(N=U,P=U),O<=U&&(O=U,z=U)}}return P=b(P,D),z=d(z,D),[P,z]}}}),Wo=He({"src/plots/cartesian/axes.js"(Z,q){"use strict";var v=Vn(),_=ns(),S=bc(),M=so(),e=sa(),t=e.strTranslate,r=su(),o=K0(),a=$n(),i=as(),n=Xh(),s=l5(),h=lh(),f=Gs(),m=f.ONEMAXYEAR,c=f.ONEAVGYEAR,T=f.ONEMINYEAR,l=f.ONEMAXQUARTER,x=f.ONEAVGQUARTER,w=f.ONEMINQUARTER,A=f.ONEMAXMONTH,E=f.ONEAVGMONTH,p=f.ONEMINMONTH,b=f.ONEWEEK,d=f.ONEDAY,u=d/2,g=f.ONEHOUR,y=f.ONEMIN,D=f.ONESEC,P=f.ONEMILLI,z=f.ONEMICROSEC,F=f.MINUS_SIGN,N=f.BADNUM,O={K:"zeroline"},L={K:"gridline",L:"path"},U={K:"minor-gridline",L:"path"},B={K:"tick",L:"path"},W={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"]},ue=uh(),ce=ue.MID_SHIFT,de=ue.CAP_SHIFT,Y=ue.LINE_SPACING,X=ue.OPPOSITE_SIDE,Q=3,V=q.exports={};V.setConvert=wv();var le=a1(),ae=tf(),j=ae.idSort,ee=ae.isLinked;V.id2name=ae.id2name,V.name2id=ae.name2id,V.cleanId=ae.cleanId,V.list=ae.list,V.listIds=ae.listIds,V.getFromId=ae.getFromId,V.getFromTrace=ae.getFromTrace;var te=Yd();V.getAutoRange=te.getAutoRange,V.findExtremes=te.findExtremes;var pe=1e-4;function we(xt){var ut=(xt[1]-xt[0])*pe;return[xt[0]-ut,xt[1]+ut]}V.coerceRef=function(xt,ut,Or,Cr,wr,Rr){var Nr=Cr.charAt(Cr.length-1),Hr=Or._fullLayout._subplots[Nr+"axis"],gt=Cr+"ref",Kt={};return wr||(wr=Hr[0]||(typeof Rr=="string"?Rr:Rr[0])),Rr||(Rr=wr),Hr=Hr.concat(Hr.map(function(mr){return mr+" domain"})),Kt[gt]={valType:"enumerated",values:Hr.concat(Rr?typeof Rr=="string"?[Rr]:Rr:[]),dflt:wr},e.coerce(xt,ut,Kt,gt)},V.coerceRefArray=function(xt,ut,Or,Cr,wr,Rr,Nr){let Hr=Cr.charAt(Cr.length-1);var gt=Or._fullLayout._subplots[Hr+"axis"];let Kt=Cr+"ref";var mr=xt[Kt];wr||(wr=gt[0]||(typeof Rr=="string"?Rr:Rr[0])),gt=gt.concat(gt.map(va=>va+" domain")),gt=gt.concat(Rr||[]),mr.length>Nr?(e.warn("Array attribute "+Kt+" has more entries than expected, truncating to "+Nr),mr=mr.slice(0,Nr)):mr.length2e-6||((Or-xt._forceTick0)/xt._minDtick%1+1.000001)%1>2e-6)&&(xt._minDtick=0))},V.saveRangeInitial=function(xt,ut){for(var Or=V.list(xt,"",!0),Cr=!1,wr=0;wrIr*.3||Kt(Cr)||Kt(wr))){var va=Or.dtick/2;xt+=xt+vaNr){var Hr=Number(Or.slice(1));Rr.exactYears>Nr&&Hr%12===0?xt=V.tickIncrement(xt,"M6","reverse")+d*1.5:Rr.exactMonths>Nr?xt=V.tickIncrement(xt,"M1","reverse")+d*15.5:xt-=u;var gt=V.tickIncrement(xt,Or);if(gt<=Cr)return gt}return xt}V.prepMinorTicks=function(xt,ut,Or){var Cr,wr;if(!((Cr=ut.minor)!=null&&Cr.dtick)){delete xt.dtick;var Rr=ut.dtick&&_(ut._tmin),Nr;if(Rr){var Hr=V.tickIncrement(ut._tmin,ut.dtick,!0);Nr=[ut._tmin,Hr*.99+ut._tmin*.01]}else{var gt=e.simpleMap(ut.range,ut.r2l);Nr=[gt[0],.8*gt[0]+.2*gt[1]]}if(xt.range=e.simpleMap(Nr,ut.l2r),xt._isMinor=!0,V.prepTicks(xt,Or),Rr){var Kt=_(ut.dtick),mr=_(xt.dtick),Ir=Kt?ut.dtick:+ut.dtick.substring(1),va=mr?xt.dtick:+xt.dtick.substring(1);Kt&&mr?nt(Ir,va)?Ir===2*b&&va===2*d&&(xt.dtick=b):Ir===2*b&&va===3*d?xt.dtick=b:Ir===b&&!(ut._input.minor||{}).nticks?xt.dtick=d:tt(Ir/va,2.5)?xt.dtick=Ir/2:xt.dtick=Ir:String(ut.dtick).charAt(0)==="M"?mr?xt.dtick="M1":nt(Ir,va)?Ir>=12&&va===2&&(xt.dtick="M3"):xt.dtick=ut.dtick:String(xt.dtick).charAt(0)==="L"?String(ut.dtick).charAt(0)==="L"?nt(Ir,va)||(xt.dtick=tt(Ir/va,2.5)?ut.dtick/2:ut.dtick):xt.dtick="D1":xt.dtick==="D2"&&+ut.dtick>1&&(xt.dtick=1)}xt.range=ut.range}((wr=ut.minor)==null?void 0:wr._tick0Init)===void 0&&(xt.tick0=ut.tick0)};function nt(xt,ut){return Math.abs((xt/ut+.5)%1-.5)<.001}function tt(xt,ut){return Math.abs(xt/ut-1)<.001}V.prepTicks=function(xt,ut){var Or=e.simpleMap(xt.range,xt.r2l,void 0,void 0,ut);if(xt.tickmode==="auto"||!xt.dtick){var Cr=xt.nticks,wr;Cr||(xt.type==="category"||xt.type==="multicategory"?(wr=xt.tickfont?e.bigFont(xt.tickfont.size||12):15,Cr=xt._length/wr):(wr=xt._id.charAt(0)==="y"?40:80,Cr=e.constrain(xt._length/wr,4,9)+1),xt._name==="radialaxis"&&(Cr*=2)),xt.minor&&xt.minor.tickmode!=="array"||xt.tickmode==="array"&&(Cr*=100),xt._roughDTick=Math.abs(Or[1]-Or[0])/Cr,V.autoTicks(xt,xt._roughDTick),xt._minDtick>0&&xt.dtick0?(Rr=Cr-1,Nr=Cr):(Rr=Cr,Nr=Cr);var Hr=xt[Rr].value,gt=xt[Nr].value,Kt=Math.abs(gt-Hr),mr=Or||Kt,Ir=0;mr>=T?Kt>=T&&Kt<=m?Ir=Kt:Ir=c:Or===x&&mr>=w?Kt>=w&&Kt<=l?Ir=Kt:Ir=x:mr>=p?Kt>=p&&Kt<=A?Ir=Kt:Ir=E:Or===b&&mr>=b?Ir=b:mr>=d?Ir=d:Or===u&&mr>=u?Ir=u:Or===g&&mr>=g&&(Ir=g);var va;Ir>=Kt&&(Ir=Kt,va=!0);var Pa=wr+Ir;if(ut.rangebreaks&&Ir>0){for(var ga=84,la=0,ba=0;bab&&(Ir=Kt)}(Ir>0||Cr===0)&&(xt[Cr].periodX=wr+Ir/2)}}V.calcTicks=function(ut,Or){for(var Cr=ut.type,wr=ut.calendar,Rr=ut.ticklabelstep,Nr=ut.ticklabelmode==="period",Hr=ut.range[0]>ut.range[1],gt=!ut.ticklabelindex||e.isArrayOrTypedArray(ut.ticklabelindex)?ut.ticklabelindex:[ut.ticklabelindex],Kt=e.simpleMap(ut.range,ut.r2l,void 0,void 0,Or),mr=Kt[1]=(Mn?0:1);wn--){var On=!wn;wn?(ut._dtickInit=ut.dtick,ut._tick0Init=ut.tick0):Mn&&(ut.minor._dtickInit=ut.minor.dtick,ut.minor._tick0Init=ut.minor.tick0);var En=wn?ut:e.extendFlat({},ut,Mn?ut.minor:{minor:{}});if(On?V.prepMinorTicks(En,ut,Or):V.prepTicks(En,Or),En.tickmode==="array"){wn?(ba=[],ga=Ze(ut,!On)):(Ai=[],la=Ze(ut,!On));continue}if(En.tickmode==="sync"){ba=[],ga=Ce(ut);continue}var ao=we(Kt),Co=ao[0],bo=ao[1],zs=_(En.dtick),kn=Cr==="log"&&!(zs||En.dtick.charAt(0)==="L"),wo=V.tickFirst(En,Or);if(wn){if(ut._tmin=wo,wo=bo:go<=bo;go=V.tickIncrement(go,jo,mr,wr)){if(wn&&os++,En.rangebreaks&&!mr){if(go=va)break}if(ba.length>Pa||go===Zn)break;Zn=go;var Yn={value:go};wn?(kn&&go!==(go|0)&&(Yn.simpleLabel=!0),Rr>1&&os%Rr&&(Yn.skipLabel=!0),ba.push(Yn)):(Yn.minor=!0,Ai.push(Yn))}}if(!Ai||Ai.length<3)gt=!1;else{var Gn=(Ai[2].value-Ai[1].value)*(Hr?-1:1);cn(Gn,ut.tickformat)||(gt=!1,Ai=Ai.slice(1))}if(!gt)ki=ba;else{var Hn=ba.concat(Ai);Nr&&ba.length&&(Hn=Hn.slice(1)),Hn=Hn.sort(function(Ks,Ts){return Ks.value-Ts.value}).filter(function(Ks,Ts,Ls){return Ts===0||Ks.value!==Ls[Ts-1].value});var ss=Hn.map(function(Ks,Ts){return Ks.minor===void 0&&!Ks.skipLabel?Ts:null}).filter(function(Ks){return Ks!==null});ss.forEach(function(Ks){gt.map(function(Ts){var Ls=Ks+Ts;Ls>=0&&Ls-1;Zo--){if(ba[Zo].drop){ba.splice(Zo,1);continue}ba[Zo].value=ri(ba[Zo].value,ut);var yn=ut.c2p(ba[Zo].value);(ws?il>yn-Hs:ilva||Jova&&(Ls.periodX=va),Jowr&&vac)ut/=c,Cr=wr(10),xt.dtick="M"+12*vr(ut,Cr,rt);else if(Rr>E)ut/=E,xt.dtick="M"+vr(ut,1,Je);else if(Rr>d){if(xt.dtick=vr(ut,d,xt._hasDayOfWeekBreaks?[1,2,7,14]:kt),!Or){var Nr=V.getTickFormat(xt),Hr=xt.ticklabelmode==="period";Hr&&(xt._rawTick0=xt.tick0),/%[uVW]/.test(Nr)?xt.tick0=e.dateTick0(xt.calendar,2):xt.tick0=e.dateTick0(xt.calendar,1),Hr&&(xt._dowTick0=xt.tick0)}}else Rr>g?xt.dtick=vr(ut,g,Je):Rr>y?xt.dtick=vr(ut,y,St):Rr>D?xt.dtick=vr(ut,D,St):(Cr=wr(10),xt.dtick=vr(ut,Cr,rt))}else if(xt.type==="log"){xt.tick0=0;var gt=e.simpleMap(xt.range,xt.r2l);if(xt._isMinor&&(ut*=1.5),ut>.7)xt.dtick=Math.ceil(ut);else if(Math.abs(gt[1]-gt[0])<1){var Kt=1.5*Math.abs((gt[1]-gt[0])/ut);ut=Math.abs(Math.pow(10,gt[1])-Math.pow(10,gt[0]))/Kt,Cr=wr(10),xt.dtick="L"+vr(ut,Cr,rt)}else xt.dtick=ut>.3?"D2":"D1"}else xt.type==="category"||xt.type==="multicategory"?(xt.tick0=0,xt.dtick=Math.ceil(Math.max(ut,1))):Za(xt)?(xt.tick0=0,Cr=1,xt.dtick=vr(ut,Cr,Ar)):(xt.tick0=0,Cr=wr(10),xt.dtick=vr(ut,Cr,rt));if(xt.dtick===0&&(xt.dtick=1),!_(xt.dtick)&&typeof xt.dtick!="string"){var mr=xt.dtick;throw xt.dtick=1,"ax.dtick error: "+String(mr)}};function qr(xt){var ut=xt.dtick;if(xt._tickexponent=0,!_(ut)&&typeof ut!="string"&&(ut=1),(xt.type==="category"||xt.type==="multicategory")&&(xt._tickround=null),xt.type==="date"){var Or=xt.r2l(xt.tick0),Cr=xt.l2r(Or).replace(/(^-|i)/g,""),wr=Cr.length;if(String(ut).charAt(0)==="M")wr>10||Cr.slice(5)!=="01-01"?xt._tickround="d":xt._tickround=+ut.slice(1)%12===0?"y":"m";else if(ut>=d&&wr<=10||ut>=d*15)xt._tickround="d";else if(ut>=y&&wr<=16||ut>=g)xt._tickround="M";else if(ut>=D&&wr<=19||ut>=y)xt._tickround="S";else{var Rr=xt.l2r(Or+ut).replace(/^-/,"").length;xt._tickround=Math.max(wr,Rr)-20,xt._tickround<0&&(xt._tickround=4)}}else if(_(ut)||ut.charAt(0)==="L"){var Nr=xt.range.map(xt.r2d||Number);_(ut)||(ut=Number(ut.slice(1))),xt._tickround=2-Math.floor(Math.log(ut)/Math.LN10+.01);var Hr=Math.max(Math.abs(Nr[0]),Math.abs(Nr[1])),gt=Math.floor(Math.log(Hr)/Math.LN10+.01),Kt=xt.minexponent===void 0?3:xt.minexponent;Math.abs(gt)>Kt&&(ot(xt.exponentformat)&&xt.exponentformat!=="SI extended"&&!Ut(gt)||ot(xt.exponentformat)&&xt.exponentformat==="SI extended"&&!Ct(gt)?xt._tickexponent=3*Math.round((gt-1)/3):xt._tickexponent=gt)}else xt._tickround=null}V.tickIncrement=function(xt,ut,Or,Cr){var wr=Or?-1:1;if(_(ut))return e.increment(xt,wr*ut);var Rr=ut.charAt(0),Nr=wr*Number(ut.slice(1));if(Rr==="M")return e.incrementMonth(xt,Nr,Cr);if(Rr==="L")return Math.log(Math.pow(10,xt)+Nr)/Math.LN10;if(Rr==="D"){var Hr=ut==="D2"?Vt:Bt,gt=xt+wr*.01,Kt=e.roundUp(e.mod(gt,1),Hr,Or);return Math.floor(gt)+Math.log(v.round(Math.pow(10,Kt),1))/Math.LN10}throw"unrecognized dtick "+String(ut)},V.tickFirst=function(xt,ut){var Or=xt.r2l||Number,Cr=e.simpleMap(xt.range,Or,void 0,void 0,ut),wr=Cr[1]=0&&Ai<=xt._length?ba:null};if(Rr&&e.isArrayOrTypedArray(xt.ticktext)){var Ir=e.simpleMap(xt.range,xt.r2l),va=(Math.abs(Ir[1]-Ir[0])-(xt._lBreaks||0))/1e4;for(Kt=0;Kt"+Hr;else{var Kt=pi(xt),mr=xt._trueSide||xt.side;(!Kt&&mr==="top"||Kt&&mr==="bottom")&&(Nr+="
")}ut.text=Nr}function _t(xt,ut,Or,Cr,wr){var Rr=xt.dtick,Nr=ut.x,Hr=xt.tickformat,gt=typeof Rr=="string"&&Rr.charAt(0);if(wr==="never"&&(wr=""),Cr&>!=="L"&&(Rr="L3",gt="L"),Hr||gt==="L")ut.text=jt(Math.pow(10,Nr),xt,wr,Cr);else if(_(Rr)||gt==="D"&&(xt.minorloglabels==="complete"||e.mod(Nr+.01,1)<.1)){var Kt;xt.minorloglabels==="complete"&&!(e.mod(Nr+.01,1)<.1)&&(Kt=!0,ut.fontSize*=.75);var mr=Math.pow(10,Nr).toExponential(0),Ir=mr.split("e"),va=+Ir[1],Pa=Math.abs(va),ga=xt.exponentformat;ga==="power"||ot(ga)&&ga!=="SI extended"&&Ut(va)||ot(ga)&&ga==="SI extended"&&Ct(va)?(ut.text=Ir[0],Pa>0&&(ut.text+="x10"),ut.text==="1x10"&&(ut.text="10"),va!==0&&va!==1&&(ut.text+=""+(va>0?"":F)+Pa+""),ut.fontSize*=1.25):(ga==="e"||ga==="E")&&Pa>2?ut.text=Ir[0]+ga+(va>0?"+":F)+Pa:(ut.text=jt(Math.pow(10,Nr),xt,"","fakehover"),Rr==="D1"&&xt._id.charAt(0)==="y"&&(ut.dy-=ut.fontSize/6))}else if(gt==="D")ut.text=xt.minorloglabels==="none"?"":String(Math.round(Math.pow(10,e.mod(Nr,1)))),ut.fontSize*=.75;else throw"unrecognized dtick "+String(Rr);if(xt.dtick==="D1"){var la=String(ut.text).charAt(0);(la==="0"||la==="1")&&(xt._id.charAt(0)==="y"?ut.dx-=ut.fontSize/4:(ut.dy+=ut.fontSize/2,ut.dx+=(xt.range[1]>xt.range[0]?1:-1)*ut.fontSize*(Nr<0?.5:.25)))}}function Fe(xt,ut){var Or=xt._categories[Math.round(ut.x)];Or===void 0&&(Or=""),ut.text=String(Or)}function Ye(xt,ut,Or){var Cr=Math.round(ut.x),wr=xt._categories[Cr]||[],Rr=wr[1]===void 0?"":String(wr[1]),Nr=wr[0]===void 0?"":String(wr[0]);Or?ut.text=Nr+" - "+Rr:(ut.text=Rr,ut.text2=Nr)}function Ae(xt,ut,Or,Cr,wr){wr==="never"?wr="":xt.showexponent==="all"&&Math.abs(ut.x/xt.dtick)<1e-6&&(wr="hide"),ut.text=jt(ut.x,xt,wr,Cr)}function Le(xt,ut,Or,Cr,wr){if(xt.thetaunit==="radians"&&!Or){var Rr=ut.x/180;if(Rr===0)ut.text="0";else{var Nr=We(Rr);if(Nr[1]>=100)ut.text=jt(e.deg2rad(ut.x),xt,wr,Cr);else{var Hr=ut.x<0;Nr[1]===1?Nr[0]===1?ut.text="\u03C0":ut.text=Nr[0]+"\u03C0":ut.text=["",Nr[0],"","\u2044","",Nr[1],"","\u03C0"].join(""),Hr&&(ut.text=F+ut.text)}}}else ut.text=jt(ut.x,xt,wr,Cr)}function We(xt){function ut(Hr,gt){return Math.abs(Hr-gt)<=1e-6}function Or(Hr,gt){return ut(gt,0)?Hr:Or(gt,Hr%gt)}function Cr(Hr){for(var gt=1;!ut(Math.round(Hr*gt)/gt,Hr);)gt*=10;return gt}var wr=Cr(xt),Rr=xt*wr,Nr=Math.abs(Or(Rr,wr));return[Math.round(Rr/Nr),Math.round(wr/Nr)]}var Ke=["f","p","n","\u03BC","m","","k","M","G","T"],st=["q","r","y","z","a",...Ke,"P","E","Z","Y","R","Q"],ot=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,ut){return ot(ut)?!!(ut==="SI extended"&&Ct(xt)||ut!=="SI extended"&&Ut(xt)):!1}function jt(xt,ut,Or,Cr){var wr=xt<0,Rr=ut._tickround,Nr=Or||ut.exponentformat||"B",Hr=ut._tickexponent,gt=V.getTickFormat(ut),Kt=ut.separatethousands;if(Cr){var mr={exponentformat:Nr,minexponent:ut.minexponent,dtick:ut.showexponent==="none"?ut.dtick:_(xt)&&Math.abs(xt)||1,range:ut.showexponent==="none"?ut.range.map(ut.r2d):[0,xt||1]};qr(mr),Rr=(Number(mr._tickround)||0)+4,Hr=mr._tickexponent,ut.hoverformat&&(gt=ut.hoverformat)}if(gt)return ut._numFormat(gt)(xt).replace(/-/g,F);var Ir=Math.pow(10,-Rr)/2;if(Nr==="none"&&(Hr=0),xt=Math.abs(xt),xt"+ga+"":Nr==="B"&&Hr===9?xt+="B":ot(Nr)&&(xt+=Nr==="SI extended"?st[Hr/3+10]:Ke[Hr/3+5])}return wr?F+xt:xt}V.getTickFormat=function(xt){var ut;function Or(gt){return typeof gt!="string"?gt:Number(gt.replace("M",""))*E}function Cr(gt,Kt){var mr=["L","D"];if(typeof gt==typeof Kt){if(typeof gt=="number")return gt-Kt;var Ir=mr.indexOf(gt.charAt(0)),va=mr.indexOf(Kt.charAt(0));return Ir===va?Number(gt.replace(/(L|D)/g,""))-Number(Kt.replace(/(L|D)/g,"")):Ir-va}else return typeof gt=="number"?1:-1}function wr(gt,Kt,mr){var Ir=mr||function(ga){return ga},va=Kt[0],Pa=Kt[1];return(!va&&typeof va!="number"||Ir(va)<=Ir(gt))&&(!Pa&&typeof Pa!="number"||Ir(Pa)>=Ir(gt))}function Rr(gt,Kt){var mr=Kt[0]===null,Ir=Kt[1]===null,va=Cr(gt,Kt[0])>=0,Pa=Cr(gt,Kt[1])<=0;return(mr||va)&&(Ir||Pa)}var Nr,Hr;if(xt.tickformatstops&&xt.tickformatstops.length>0)switch(xt.type){case"date":case"linear":{for(ut=0;ut=0&&wr.unshift(wr.splice(mr,1).shift())}});var Hr={false:{left:0,right:0}};return e.syncOrAsync(wr.map(function(gt){return function(){if(gt){var Kt=V.getFromId(xt,gt);Or||(Or={}),Or.axShifts=Hr,Or.overlayingShiftedAx=Nr;var mr=V.drawOne(xt,Kt,Or);return Kt._shiftPusher&&rn(Kt,Kt._fullDepth||0,Hr,!0),Kt._r=Kt.range.slice(),Kt._rl=e.simpleMap(Kt._r,Kt.r2l),mr}}}))},V.drawOne=function(xt,ut,Or){Or=Or||{};var Cr=Or.axShifts||{},wr=Or.overlayingShiftedAx||[],Rr,Nr,Hr;ut.setScale();var gt=xt._fullLayout,Kt=ut._id,mr=Kt.charAt(0),Ir=V.counterLetter(Kt),va=gt._plots[ut._mainSubplot],Pa=ut.zerolinelayer==="above traces";if(!va)return;if(ut._shiftPusher=ut.autoshift||wr.indexOf(ut._id)!==-1||wr.indexOf(ut.overlaying)!==-1,ut._shiftPusher&ut.anchor==="free"){var ga=ut.linewidth/2||0;ut.ticks==="inside"&&(ga+=ut.ticklen),rn(ut,ga,Cr,!0),rn(ut,ut.shift||0,Cr,!1)}(Or.skipTitle!==!0||ut._shift===void 0)&&(ut._shift=tn(ut,Cr));var la=va[mr+"axislayer"],ba=ut._mainLinePosition,Ai=ba+=ut._shift,ki=ut._mainMirrorPosition,Ki=ut._vals=V.calcTicks(ut),Mn=[ut.mirror,Ai,ki].join("_");for(Rr=0;Rr0?Ls.bottom-Ks:0,Ts))));var lu=0,Tc=0;if(ut._shiftPusher&&(lu=Math.max(Ts,Ls.height>0?uo==="l"?Ks-Ls.left:Ls.right-Ks:0),ut.title.text!==gt._dfltTitle[mr]&&(Tc=(ut._titleStandoff||0)+(ut._titleScoot||0),uo==="l"&&(Tc+=Ca(ut))),ut._fullDepth=Math.max(lu,Tc)),ut.automargin){Jo={x:0,y:0,r:0,l:0,t:0,b:0};var du=[0,1],Sf=typeof ut._shift=="number"?ut._shift:0;if(mr==="x"){if(uo==="b"?Jo[uo]=ut._depth:(Jo[uo]=ut._depth=Math.max(Ls.width>0?Ks-Ls.top:0,Ts),du.reverse()),Ls.width>0){var Uc=Ls.right-(ut._offset+ut._length);Uc>0&&(Jo.xr=1,Jo.r=Uc);var Bs=ut._offset-Ls.left;Bs>0&&(Jo.xl=0,Jo.l=Bs)}}else if(uo==="l"?(ut._depth=Math.max(Ls.height>0?Ks-Ls.left:0,Ts),Jo[uo]=ut._depth-Sf):(ut._depth=Math.max(Ls.height>0?Ls.right-Ks:0,Ts),Jo[uo]=ut._depth+Sf,du.reverse()),Ls.height>0){var dc=Ls.bottom-(ut._offset+ut._length);dc>0&&(Jo.yb=0,Jo.b=dc);var Wc=ut._offset-Ls.top;Wc>0&&(Jo.yt=1,Jo.t=Wc)}Jo[Ir]=ut.anchor==="free"?ut.position:ut._anchorAxis.domain[du[0]],ut.title.text!==gt._dfltTitle[mr]&&(Jo[uo]+=Ca(ut)+(ut.title.standoff||0)),ut.mirror&&ut.anchor!=="free"&&(Es={x:0,y:0,r:0,l:0,t:0,b:0},Es[Nl]=ut.linewidth,ut.mirror&&ut.mirror!==!0&&(Es[Nl]+=Ts),ut.mirror===!0||ut.mirror==="ticks"?Es[Ir]=ut._anchorAxis.domain[du[1]]:(ut.mirror==="all"||ut.mirror==="allticks")&&(Es[Ir]=[ut._counterDomainMin,ut._counterDomainMax][du[1]]))}Ll&&(Ul=M.getComponentMethod("rangeslider","autoMarginOpts")(xt,ut)),typeof ut.automargin=="string"&&(cr(Jo,ut.automargin),cr(Es,ut.automargin)),S.autoMargin(xt,Jt(ut),Jo),S.autoMargin(xt,Fr(ut),Es),S.autoMargin(xt,ta(ut),Ul)}),e.syncOrAsync(To)}};function cr(xt,ut){if(xt){var Or=Object.keys($).reduce(function(Cr,wr){return ut.indexOf(wr)!==-1&&$[wr].forEach(function(Rr){Cr[Rr]=1}),Cr},{});Object.keys(xt).forEach(function(Cr){Or[Cr]||(Cr.length===1?xt[Cr]=0:delete xt[Cr])})}}function or(xt,ut){var Or=[],Cr,wr=function(Rr,Nr){var Hr=Rr.xbnd[Nr];Hr!==null&&Or.push(e.extendFlat({},Rr,{x:Hr}))};if(ut.length){for(Cr=0;Crxt.range[1],Hr=xt.ticklabelposition&&xt.ticklabelposition.indexOf("inside")!==-1,gt=!Hr;if(Or){var Kt=Nr?-1:1;Or=Or*Kt}if(Cr){var mr=xt.side,Ir=Hr&&(mr==="top"||mr==="left")||gt&&(mr==="bottom"||mr==="right")?1:-1;Cr=Cr*Ir}return xt._id.charAt(0)==="x"?function(va){return t(wr+xt._offset+xt.l2p(Fa(va))+Or,Rr+Cr)}:function(va){return t(Rr+Cr,wr+xt._offset+xt.l2p(Fa(va))+Or)}};function Fa(xt){return xt.periodX!==void 0?xt.periodX:xt.x}function Ra(xt){var ut=xt.ticklabelposition||"",Or=xt.tickson||"",Cr=function(ga){return ut.indexOf(ga)!==-1},wr=Cr("top"),Rr=Cr("left"),Nr=Cr("right"),Hr=Cr("bottom"),gt=Cr("inside"),Kt=Or!=="boundaries"&&(Hr||Rr||wr||Nr);if(!Kt&&!gt)return[0,0];var mr=xt.side,Ir=Kt?(xt.tickwidth||0)/2:0,va=Q,Pa=xt.tickfont?xt.tickfont.size:12;return(Hr||wr)&&(Ir+=Pa*de,va+=(xt.linewidth||0)/2),(Rr||Nr)&&(Ir+=(xt.linewidth||0)/2,va+=Q),gt&&mr==="top"&&(va-=Pa*(1-de)),(Rr||wr)&&(Ir=-Ir),(mr==="bottom"||mr==="right")&&(va=-va),[Kt?Ir:0,gt?va:0]}V.makeTickPath=function(xt,ut,Or,Cr){Cr||(Cr={});var wr=Cr.minor;if(wr&&!xt.minor)return"";var Rr=Cr.len!==void 0?Cr.len:wr?xt.minor.ticklen:xt.ticklen,Nr=xt._id.charAt(0),Hr=(xt.linewidth||1)/2;return Nr==="x"?"M0,"+(ut+Hr*Or)+"v"+Rr*Or:"M"+(ut+Hr*Or)+",0h"+Rr*Or},V.makeLabelFns=function(xt,ut,Or){var Cr=xt.ticklabelposition||"",wr=xt.tickson||"",Rr=function(wo){return Cr.indexOf(wo)!==-1},Nr=Rr("top"),Hr=Rr("left"),gt=Rr("right"),Kt=Rr("bottom"),mr=wr!=="boundaries"&&(Kt||Hr||Nr||gt),Ir=Rr("inside"),va=Cr==="inside"&&xt.ticks==="inside"||!Ir&&xt.ticks==="outside"&&wr!=="boundaries",Pa=0,ga=0,la=va?xt.ticklen:0;if(Ir?la*=-1:mr&&(la=0),va&&(Pa+=la,Or)){var ba=e.deg2rad(Or);Pa=la*Math.cos(ba)+1,ga=la*Math.sin(ba)}xt.showticklabels&&(va||xt.showline)&&(Pa+=.2*xt.tickfont.size),Pa+=(xt.linewidth||1)/2*(Ir?-1:1);var Ai={labelStandoff:Pa,labelShift:ga},ki,Ki,Mn,wn,On=0,En=xt.side,ao=xt._id.charAt(0),Co=xt.tickangle,bo;if(ao==="x")bo=!Ir&&En==="bottom"||Ir&&En==="top",wn=bo?1:-1,Ir&&(wn*=-1),ki=ga*wn,Ki=ut+Pa*wn,Mn=bo?1:-.2,Math.abs(Co)===90&&(Ir?Mn+=ce:Co===-90&&En==="bottom"?Mn=de:Co===90&&En==="top"?Mn=ce:Mn=.5,On=ce/2*(Co/90)),Ai.xFn=function(wo){return wo.dx+ki+On*wo.fontSize},Ai.yFn=function(wo){return wo.dy+Ki+wo.fontSize*Mn},Ai.anchorFn=function(wo,Zn){if(mr){if(Hr)return"end";if(gt)return"start"}return!_(Zn)||Zn===0||Zn===180?"middle":Zn*wn<0!==Ir?"end":"start"},Ai.heightFn=function(wo,Zn,go){return Zn<-60||Zn>60?-.5*go:xt.side==="top"!==Ir?-go:0};else if(ao==="y"){if(bo=!Ir&&En==="left"||Ir&&En==="right",wn=bo?1:-1,Ir&&(wn*=-1),ki=Pa,Ki=ga*wn,Mn=0,!Ir&&Math.abs(Co)===90&&(Co===-90&&En==="left"||Co===90&&En==="right"?Mn=de:Mn=.5),Ir){var zs=_(Co)?+Co:0;if(zs!==0){var kn=e.deg2rad(zs);On=Math.abs(Math.sin(kn))*de*wn,Mn=0}}Ai.xFn=function(wo){return wo.dx+ut-(ki+wo.fontSize*Mn)*wn+On*wo.fontSize},Ai.yFn=function(wo){return wo.dy+Ki+wo.fontSize*ce},Ai.anchorFn=function(wo,Zn){return _(Zn)&&Math.abs(Zn)===90?"middle":bo?"end":"start"},Ai.heightFn=function(wo,Zn,go){return xt.side==="right"&&(Zn*=-1),Zn<-30?-go:Zn<30?-.5*go:0}}return Ai};function qa(xt){return[xt.text,xt.x,xt.axInfo,xt.font,xt.fontSize,xt.fontColor].join("_")}V.drawTicks=function(xt,ut,Or){Or=Or||{};var Cr=ut._id+"tick",wr=[].concat(ut.minor&&ut.minor.ticks?Or.vals.filter(function(Nr){return Nr.minor&&!Nr.noTick}):[]).concat(ut.ticks?Or.vals.filter(function(Nr){return!Nr.minor&&!Nr.noTick}):[]),Rr=Or.layer.selectAll("path."+Cr).data(wr,qa);Rr.exit().remove(),Rr.enter().append("path").classed(Cr,1).classed("ticks",1).classed("crisp",Or.crisp!==!1).each(function(Nr){return a.stroke(v.select(this),Nr.minor?ut.minor.tickcolor:ut.tickcolor)}).style("stroke-width",function(Nr){return i.crispRound(xt,Nr.minor?ut.minor.tickwidth:ut.tickwidth,1)+"px"}).attr("d",Or.path).style("display",null),Ia(ut,[B]),Rr.attr("transform",Or.transFn)},V.drawGrid=function(xt,ut,Or){if(Or=Or||{},ut.tickmode!=="sync"){var Cr=ut._id+"grid",wr=ut.minor&&ut.minor.showgrid,Rr=wr?Or.vals.filter(function(Ai){return Ai.minor}):[],Nr=ut.showgrid?Or.vals.filter(function(Ai){return!Ai.minor}):[],Hr=Or.counterAxis;if(Hr&&V.shouldShowZeroLine(xt,ut,Hr))for(var gt=ut.tickmode==="array",Kt=0;Kt=0;ga--){var la=ga?va:Pa;if(la){var ba=la.selectAll("path."+Cr).data(ga?Nr:Rr,qa);ba.exit().remove(),ba.enter().append("path").classed(Cr,1).classed("crisp",Or.crisp!==!1),ba.attr("transform",Or.transFn).attr("d",Or.path).each(function(Ai){return a.stroke(v.select(this),Ai.minor?ut.minor.gridcolor:ut.gridcolor||"#ddd")}).style("stroke-dasharray",function(Ai){return i.dashStyle(Ai.minor?ut.minor.griddash:ut.griddash,Ai.minor?ut.minor.gridwidth:ut.gridwidth)}).style("stroke-width",function(Ai){return(Ai.minor?Ir:ut._gw)+"px"}).style("display",null),typeof Or.path=="function"&&ba.attr("d",Or.path)}}Ia(ut,[L,U])}},V.drawZeroLine=function(xt,ut,Or){Or=Or||Or;var Cr=ut._id+"zl",wr=V.shouldShowZeroLine(xt,ut,Or.counterAxis),Rr=Or.layer.selectAll("path."+Cr).data(wr?[{x:0,id:ut._id}]:[]);Rr.exit().remove(),Rr.enter().append("path").classed(Cr,1).classed("zl",1).classed("crisp",Or.crisp!==!1).each(function(){Or.layer.selectAll("path").sort(function(Nr,Hr){return j(Nr.id,Hr.id)})}),Rr.attr("transform",Or.transFn).attr("d",Or.path).call(a.stroke,ut.zerolinecolor||a.defaultLine).style("stroke-width",i.crispRound(xt,ut.zerolinewidth,ut._gw||1)+"px").style("display",null),Ia(ut,[O])},V.drawLabels=function(xt,ut,Or){Or=Or||{};var Cr=xt._fullLayout,wr=ut._id,Rr=ut.zerolinelayer==="above traces",Nr=Or.cls||wr+"tick",Hr=Or.vals.filter(function(Yn){return Yn.text}),gt=Or.labelFns,Kt=Or.secondary?0:ut.tickangle,mr=(ut._prevTickAngles||{})[Nr],Ir=Or.layer.selectAll("g."+Nr).data(ut.showticklabels?Hr:[],qa),va=[];Ir.enter().append("g").classed(Nr,1).append("text").attr("text-anchor","middle").each(function(Yn){var Gn=v.select(this),Hn=xt._promises.length;Gn.call(r.positionText,gt.xFn(Yn),gt.yFn(Yn)).call(i.font,{family:Yn.font,size:Yn.fontSize,color:Yn.fontColor,weight:Yn.fontWeight,style:Yn.fontStyle,variant:Yn.fontVariant,textcase:Yn.fontTextcase,lineposition:Yn.fontLineposition,shadow:Yn.fontShadow}).text(Yn.text).call(r.convertToTspans,xt),xt._promises[Hn]?va.push(xt._promises.pop().then(function(){Pa(Gn,Kt)})):Pa(Gn,Kt)}),Ia(ut,[W]),Ir.exit().remove(),Or.repositionOnUpdate&&Ir.each(function(Yn){v.select(this).select("text").call(r.positionText,gt.xFn(Yn),gt.yFn(Yn))});function Pa(Yn,Gn){Yn.each(function(Hn){var ss=v.select(this),_s=ss.select(".text-math-group"),ps=gt.anchorFn(Hn,Gn),Ko=Or.transFn.call(ss.node(),Hn)+(_(Gn)&&+Gn!=0?" rotate("+Gn+","+gt.xFn(Hn)+","+(gt.yFn(Hn)-Hn.fontSize/2)+")":""),Gi=r.lineCount(ss),Pn=Y*Hn.fontSize,qs=gt.heightFn(Hn,_(Gn)?+Gn:0,(Gi-1)*Pn);if(qs&&(Ko+=t(0,qs)),_s.empty()){var bs=ss.select("text");bs.attr({transform:Ko,"text-anchor":ps}),bs.style("display",null),ut._adjustTickLabelsOverflow&&ut._adjustTickLabelsOverflow()}else{var lo=i.bBox(_s.node()).width,Zo=lo*{end:-.5,start:.5}[ps];_s.attr("transform",Ko+t(Zo,0))}})}ut._adjustTickLabelsOverflow=function(){var Yn=ut.ticklabeloverflow;if(!(!Yn||Yn==="allow")){var Gn=Yn.indexOf("hide")!==-1,Hn=ut._id.charAt(0)==="x",ss=0,_s=Hn?xt._fullLayout.width:xt._fullLayout.height;if(Yn.indexOf("domain")!==-1){var ps=e.simpleMap(ut.range,ut.r2l);ss=ut.l2p(ps[0])+ut._offset,_s=ut.l2p(ps[1])+ut._offset}var Ko=Math.min(ss,_s),Gi=Math.max(ss,_s),Pn=ut.side,qs=1/0,bs=-1/0;Ir.each(function(Hs){var il=v.select(this),yn=il.select(".text-math-group");if(yn.empty()){var Po=i.bBox(il.node()),To=0;Hn?(Po.right>Gi||Po.leftGi||Po.top+(ut.tickangle?0:Hs.fontSize/4)ut["_visibleLabelMin_"+ps._id]?il.style("display","none"):Gi.K==="tick"&&!Ko&&il.node().style.display!=="none"&&il.style("display",null)})})})})},Pa(Ir,mr+1?mr:Kt);function ga(){return va.length&&Promise.all(va)}var la=null;function ba(){if(Pa(Ir,Kt),Hr.length&&ut.autotickangles&&(ut.type!=="log"||String(ut.dtick).charAt(0)!=="D")){la=ut.autotickangles[0];var Yn=0,Gn=[],Hn,ss=1;Ir.each(function(Jo){Yn=Math.max(Yn,Jo.fontSize);var Es=ut.l2p(Jo.x),Ul=Zt(this),lu=i.bBox(Ul.node());ss=Math.max(ss,r.lineCount(Ul)),Gn.push({top:0,bottom:10,height:10,left:Es-lu.width/2,right:Es+lu.width/2+2,width:lu.width+2})});var _s=(ut.tickson==="boundaries"||ut.showdividers)&&!Or.secondary,ps=Hr.length,Ko=Math.abs((Hr[ps-1].x-Hr[0].x)*ut._m)/(ps-1),Gi=_s?Ko/2:Ko,Pn=_s?ut.ticklen:Yn*1.25*ss,qs=Math.sqrt(Math.pow(Gi,2)+Math.pow(Pn,2)),bs=Gi/qs,lo=ut.autotickangles.map(function(Jo){return Jo*Math.PI/180}),Zo=lo.find(function(Jo){return Math.abs(Math.cos(Jo))<=bs});Zo===void 0&&(Zo=lo.reduce(function(Jo,Es){return Math.abs(Math.cos(Jo))os*go&&(kn=go,Co[ao]=bo[ao]=wo[ao])}var ys=Math.abs(kn-zs);ys-wn>0?(ys-=wn,wn*=1+wn/ys):wn=0,ut._id.charAt(0)!=="y"&&(wn=-wn),Co[En]=Ki.p2r(Ki.r2p(bo[En])+On*wn),Ki.autorange==="min"||Ki.autorange==="max reversed"?(Co[0]=null,Ki._rangeInitial0=void 0,Ki._rangeInitial1=void 0):(Ki.autorange==="max"||Ki.autorange==="min reversed")&&(Co[1]=null,Ki._rangeInitial0=void 0,Ki._rangeInitial1=void 0),Cr._insideTickLabelsUpdaterange[Ki._name+".range"]=Co}var jo=e.syncOrAsync(Ai);return jo&&jo.then&&xt._promises.push(jo),jo};function Wa(xt,ut,Or){var Cr=ut._id+"divider",wr=Or.vals,Rr=Or.layer.selectAll("path."+Cr).data(wr,qa);Rr.exit().remove(),Rr.enter().insert("path",":first-child").classed(Cr,1).classed("crisp",1).call(a.stroke,ut.dividercolor).style("stroke-width",i.crispRound(xt,ut.dividerwidth,1)+"px"),Rr.attr("transform",Or.transFn).attr("d",Or.path)}V.getPxPosition=function(xt,ut){var Or=xt._fullLayout._size,Cr=ut._id.charAt(0),wr=ut.side,Rr;if(ut.anchor!=="free"?Rr=ut._anchorAxis:Cr==="x"?Rr={_offset:Or.t+(1-(ut.position||0))*Or.h,_length:0}:Cr==="y"&&(Rr={_offset:Or.l+(ut.position||0)*Or.w+ut._shift,_length:0}),wr==="top"||wr==="left")return Rr._offset;if(wr==="bottom"||wr==="right")return Rr._offset+Rr._length};function Ca(xt){var ut=xt.title.font.size,Or=(xt.title.text.match(r.BR_TAG_ALL)||[]).length;return xt.title.hasOwnProperty("standoff")?ut*(de+Or*Y):Or?ut*(Or+1)*Y:ut}function hi(xt,ut){var Or=xt._fullLayout,Cr=ut._id,wr=Cr.charAt(0),Rr=ut.title.font.size,Nr,Hr=(ut.title.text.match(r.BR_TAG_ALL)||[]).length;if(ut.title.hasOwnProperty("standoff"))ut.side==="bottom"||ut.side==="right"?Nr=ut._depth+ut.title.standoff+Rr*de:(ut.side==="top"||ut.side==="left")&&(Nr=ut._depth+ut.title.standoff+Rr*(ce+Hr*Y));else{var gt=pi(ut);if(ut.type==="multicategory")Nr=ut._depth;else{var Kt=1.5*Rr;gt&&(Kt=.5*Rr,ut.ticks==="outside"&&(Kt+=ut.ticklen)),Nr=10+Kt+(ut.linewidth?ut.linewidth-1:0)}gt||(wr==="x"?Nr+=ut.side==="top"?Rr*(ut.showticklabels?1:0):Rr*(ut.showticklabels?1.5:.5):Nr+=ut.side==="right"?Rr*(ut.showticklabels?1:.5):Rr*(ut.showticklabels?.5:0))}var mr=V.getPxPosition(xt,ut),Ir,va,Pa;wr==="x"?(va=ut._offset+ut._length/2,Pa=ut.side==="top"?mr-Nr:mr+Nr):(Pa=ut._offset+ut._length/2,va=ut.side==="right"?mr+Nr:mr-Nr,Ir={rotate:"-90",offset:0});var ga;if(ut.type!=="multicategory"){var la=ut._selections[ut._id+"tick"];if(ga={selection:la,side:ut.side},la&&la.node()&&la.node().parentNode){var ba=i.getTranslate(la.node().parentNode);ga.offsetLeft=ba.x,ga.offsetTop=ba.y}ut.title.hasOwnProperty("standoff")&&(ga.pad=0)}return ut._titleStandoff=Nr,o.draw(xt,Cr+"title",{propContainer:ut,propName:ut._name+".title.text",placeholder:Or._dfltTitle[wr],avoid:ga,transform:Ir,attributes:{x:va,y:Pa,"text-anchor":"middle"}})}V.shouldShowZeroLine=function(xt,ut,Or){var Cr=e.simpleMap(ut.range,ut.r2l);return Cr[0]*Cr[1]<=0&&ut.zeroline&&(ut.type==="linear"||ut.type==="-")&&!(ut.rangebreaks&&ut.maskBreaks(0)===N)&&(wi(ut,0)||!Yt(xt,ut,Or,Cr)||Rt(xt,ut))},V.clipEnds=function(xt,ut){return ut.filter(function(Or){return wi(xt,Or.x)})};function wi(xt,ut){var Or=xt.l2p(ut);return Or>1&&Or1)for(wr=1;wr=wr.min&&xt=z:/%L/.test(ut)?xt>=P:/%[SX]/.test(ut)?xt>=D:/%M/.test(ut)?xt>=y:/%[HI]/.test(ut)?xt>=g:/%p/.test(ut)?xt>=u:/%[Aadejuwx]/.test(ut)?xt>=d:/%[UVW]/.test(ut)?xt>=b:/%[Bbm]/.test(ut)?xt>=p:/%[q]/.test(ut)?xt>=w:/%[Yy]/.test(ut)?xt>=T:!0}}}),f5=He({"src/plots/cartesian/autorange_options_defaults.js"(Z,q){"use strict";q.exports=function(_,S,M){var e,t;if(M){var r=S==="reversed"||S==="min reversed"||S==="max reversed";e=M[r?1:0],t=M[r?0:1]}var o=_("autorangeoptions.minallowed",t===null?e:void 0),a=_("autorangeoptions.maxallowed",e===null?t:void 0);o===void 0&&_("autorangeoptions.clipmin"),a===void 0&&_("autorangeoptions.clipmax"),_("autorangeoptions.include")}}}),h5=He({"src/plots/cartesian/range_defaults.js"(Z,q){"use strict";var v=f5();q.exports=function(S,M,e,t){var r=M._template||{},o=M.type||r.type||"-";e("minallowed"),e("maxallowed");var a=e("range");if(!a){var i;!t.noInsiderange&&o!=="log"&&(i=e("insiderange"),i&&(i[0]===null||i[1]===null)&&(M.insiderange=!1,i=void 0),i&&(a=e("range",i)))}var n=M.getAutorangeDflt(a,t),s=e("autorange",n),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 M.range,M.autorange=!0,h=!0),h||(n=M.getAutorangeDflt(a,t),s=e("autorange",n)),s&&(v(e,s,a),(o==="linear"||o==="-")&&e("rangemode")),M.cleanRange()}}}),uz=He({"node_modules/mouse-event-offset/index.js"(Z,q){var v={left:0,top:0};q.exports=_;function _(M,e,t){e=e||M.currentTarget||M.srcElement,Array.isArray(t)||(t=[0,0]);var r=M.clientX||0,o=M.clientY||0,a=S(e);return t[0]=r-a.left,t[1]=o-a.top,t}function S(M){return M===window||M===document||M===document.body?v:M.getBoundingClientRect()}}}),b2=He({"node_modules/has-passive-events/index.js"(Z,q){"use strict";var v=a5();function _(){var S=!1;try{var M=Object.defineProperty({},"passive",{get:function(){S=!0}});window.addEventListener("test",null,M),window.removeEventListener("test",null,M)}catch{S=!1}return S}q.exports=v&&_()}}),cz=He({"src/components/dragelement/align.js"(Z,q){"use strict";q.exports=function(_,S,M,e,t){var r=(_-M)/(e-M),o=r+S/(e-M),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,q){"use strict";var v=sa(),_=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];q.exports=function(M,e,t,r){return t==="left"?M=0:t==="center"?M=1:t==="right"?M=2:M=v.constrain(Math.floor(M*3),0,2),r==="bottom"?e=0:r==="middle"?e=1:r==="top"?e=2:e=v.constrain(Math.floor(e*3),0,2),_[e][M]}}}),hz=He({"src/components/dragelement/unhover.js"(Z,q){"use strict";var v=Qy(),_=y2(),S=T_().getGraphDiv,M=w_(),e=q.exports={};e.wrapped=function(t,r,o){t=S(t),t._fullLayout&&_.clear(t._fullLayout._uid+M.HOVERID),e.raw(t,r,o)},e.raw=function(r,o){var a=r._fullLayout,i=r._hoverdata;o||(o={}),!(o.target&&!r._dragged&&v.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&&i&&r.emit("plotly_unhover",{event:o,points:i}))}}}),Ap=He({"src/components/dragelement/index.js"(Z,q){"use strict";var v=uz(),_=i5(),S=b2(),M=sa().removeElement,e=lh(),t=q.exports={};t.align=cz(),t.getCursor=fz();var r=hz();t.unhover=r.wrapped,t.unhoverRaw=r.raw,t.init=function(n){var s=n.gd,h=1,f=s._context.doubleClickDelay,m=n.element,c,T,l,x,w,A,E,p;s._mouseDownTime||(s._mouseDownTime=0),m.style.pointerEvents="all",m.onmousedown=u,S?(m._ontouchstart&&m.removeEventListener("touchstart",m._ontouchstart),m._ontouchstart=u,m.addEventListener("touchstart",u,{passive:!1})):m.ontouchstart=u;function b(D,P,z){return Math.abs(D)"u"&&typeof D.clientY>"u"&&(D.clientX=c,D.clientY=T),l=new Date().getTime(),l-s._mouseDownTimef&&(h=Math.max(h-1,1)),s._dragged)n.doneFn&&n.doneFn();else{var P;A.target===E?P=A:(P={target:E,srcElement:E,toElement:E},Object.keys(A).concat(Object.keys(A.__proto__)).forEach(z=>{var F=A[z];!P[z]&&typeof F!="function"&&(P[z]=F)})),n.clickFn&&n.clickFn(h,P),p||E.dispatchEvent(new MouseEvent("click",D))}s._dragging=!1,s._dragged=!1}};function o(){var i=document.createElement("div");i.className="dragcover";var n=i.style;return n.position="fixed",n.left=0,n.right=0,n.top=0,n.bottom=0,n.zIndex=999999999,n.background="none",document.body.appendChild(i),i}t.coverSlip=o;function a(i){return v(i.changedTouches?i.changedTouches[0]:i,document.body)}}}),Kd=He({"src/lib/setcursor.js"(Z,q){"use strict";q.exports=function(_,S){(_.attr("class")||"").split(" ").forEach(function(M){M.indexOf("cursor-")===0&&_.classed(M,!1)}),S&&_.classed("cursor-"+S,!0)}}}),pz=He({"src/lib/override_cursor.js"(Z,q){"use strict";var v=Kd(),_="data-savedcursor",S="!!";q.exports=function(e,t){var r=e.attr(_);if(t){if(!r){for(var o=(e.attr("class")||"").split(" "),a=0;aX.legend.length)for(var le=X.legend.length;le(a==="legend"?1:0));if(z===!1&&(n[a]=void 0),!(z===!1&&!f.uirevision)&&(c("uirevision",n.uirevision),z!==!1)){c("borderwidth");var F=c("orientation"),N=c("yref"),O=c("xref"),L=F==="h",U=N==="paper",B=O==="paper",W,$,ue,ce="left";L?(W=0,v.getComponentMethod("rangeslider","isVisible")(i.xaxis)?U?($=1.1,ue="bottom"):($=1,ue="top"):U?($=-.1,ue="top"):($=0,ue="bottom")):($=1,ue="auto",B?W=1.02:(W=1,ce="right")),_.coerce(f,m,{x:{valType:"number",editType:"legend",min:B?-2:0,max:B?3:1,dflt:W}},"x"),_.coerce(f,m,{y:{valType:"number",editType:"legend",min:U?-2:0,max:U?3:1,dflt:$}},"y"),c("traceorder",d),r.isGrouped(n[a])&&c("tracegroupgap"),c("entrywidth"),c("entrywidthmode"),c("indentation"),c("itemsizing"),c("itemwidth"),c("itemclick"),c("itemdoubleclick"),c("groupclick"),c("xanchor",ce),c("yanchor",ue),c("maxheight"),c("valign"),_.noneOrAll(f,m,["x","y"]);var de=c("title.text");if(de){c("title.side",L?"left":"top");var Y=_.extendFlat({},T,{size:_.bigFont(T.size)});_.coerceFont(c,"title.font",Y);let X=h>1;c("titleclick",X?"toggle":!1),c("titledoubleclick",X?"toggleothers":!1)}}}q.exports=function(i,n,s){var h,f=s.slice(),m=n.shapes;if(m)for(h=0;htt.showlegend||tt.legendgroup);var T=m.concat(c),l=n.trace;l._isShape&&(l=l._fullInput);var x=l.legendgroup,w,A,E,p,b,d,u={},g=[],y=[],D=[];function P(tt,Ve){var he=g.indexOf(tt),se=u.visible;return se||(se=u.visible=[]),g.indexOf(tt)===-1&&(g.push(tt),he=g.length-1),se[he]=Ve,he}var z=(i.shapes||[]).map(function(tt){return tt._input}),F=!1;function N(tt,Ve){z[tt].visible=Ve,F=!0}function O(tt,Ve){if(!(n.groupTitle&&!h)){var he=tt._fullInput||tt,se=he._isShape,ne=he.index;ne===void 0&&(ne=he._index);var Ce=he.visible===!1?!1:Ve;se?N(ne,Ce):P(ne,Ce)}}var L=l.legend,U=l._fullInput,B=U&&U._isShape;if(!B&&q.traceIs(l,"pie-like")){var W=n.label,$=f.indexOf(W);if(a==="toggle")$===-1?f.push(W):f.splice($,1);else if(a==="toggleothers"){var ue=$!==-1,ce=[];for(w=0;wE.showlegend||E.legendgroup),h=i.concat(s);function f(E){return(E.legend||"legend")===n}var m,c;if(o==="toggle")m=!h.some(function(p){return f(p)&&p.visible===!0}),c=!1;else{let E=h.some(function(p){return!f(p)&&p.visible===!0&&p.showlegend!==!1});m=!0,c=!E}let T={visible:[]},l=[],x=(a.shapes||[]).map(function(E){return E._input});for(var w=!1,A=0;AN&&(z=N)}D[T][0]._groupMinRank=z,D[T][0]._preGroupSort=T}var O=function(ue,ce){return ue[0]._groupMinRank-ce[0]._groupMinRank||ue[0]._preGroupSort-ce[0]._preGroupSort},L=function(ue,ce){var de=v(ue.trace.legendrank)?ue.trace.legendrank[ue.i]:ue.trace.legendrank,Y=v(ce.trace.legendrank)?ce.trace.legendrank[ce.i]:ce.trace.legendrank;return de-Y||ue._preSort-ce._preSort};for(D.forEach(function(ue,ce){ue[0]._preGroupSort=ce}),D.sort(O),T=0;T0)le=X.width;else return 0;return d?V:Math.min(le,Q)};A.each(function(Y){var X=v.select(this),Q=S.ensureSingle(X,"g","layers");Q.style("opacity",Y[0].trace.opacity);var V=p.indentation,le=p.valign,ae=Y[0].lineHeight,j=Y[0].height;if(le==="middle"&&V===0||!ae||!j)Q.attr("transform",null);else{var ee={top:1,bottom:-1}[le],te=ee*(.5*(ae-j+3))||0,pe=p.indentation;Q.attr("transform",M(pe,te))}var we=Q.selectAll("g.legendfill").data([Y]);we.enter().append("g").classed("legendfill",!0);var Se=Q.selectAll("g.legendlines").data([Y]);Se.enter().append("g").classed("legendlines",!0);var Re=Q.selectAll("g.legendsymbols").data([Y]);Re.enter().append("g").classed("legendsymbols",!0),Re.selectAll("g.legendpoints").data([Y]).enter().append("g").classed("legendpoints",!0)}).each(de).each(F).each(O).each(N).each(U).each(ue).each($).each(P).each(z).each(B).each(W);function P(Y){var X=l(Y),Q=X.showFill,V=X.showLine,le=X.showGradientLine,ae=X.showGradientFill,j=X.anyFill,ee=X.anyLine,te=Y[0],pe=te.trace,we,Se,Re=r(pe),Pe=Re.colorscale,je=Re.reversescale,at=function(Ce){if(Ce.size())if(Q)e.fillGroupStyle(Ce,E,!0);else{var Ze="legendfill-"+pe.uid;e.gradient(Ce,E,Ze,T(je),Pe,"fill")}},nt=function(Ce){if(Ce.size()){var Ze="legendline-"+pe.uid;e.lineGroupStyle(Ce),e.gradient(Ce,E,Ze,T(je),Pe,"stroke")}},tt=o.hasMarkers(pe)||!j?"M5,0":ee?"M5,-2":"M5,-3",Ve=v.select(this),he=Ve.select(".legendfill").selectAll("path").data(Q||ae?[Y]:[]);if(he.enter().append("path").classed("js-fill",!0),he.exit().remove(),he.attr("d",tt+"h"+u+"v6h-"+u+"z").call(at),V||le){var se=D(void 0,pe.line,m,h);Se=S.minExtend(pe,{line:{width:se}}),we=[S.minExtend(te,{trace:Se})]}var ne=Ve.select(".legendlines").selectAll("path").data(V||le?[we]:[]);ne.enter().append("path").classed("js-line",!0),ne.exit().remove(),ne.attr("d",tt+(le?"l"+u+",0.0001":"h"+u)).call(V?e.lineGroupStyle:nt)}function z(Y){var X=l(Y),Q=X.anyFill,V=X.anyLine,le=X.showLine,ae=X.showMarker,j=Y[0],ee=j.trace,te=!ae&&!V&&!Q&&o.hasText(ee),pe,we;function Se(he,se,ne,Ce){var Ze=S.nestedProperty(ee,he).get(),rt=S.isArrayOrTypedArray(Ze)&&se?se(Ze):Ze;if(d&&rt&&Ce!==void 0&&(rt=Ce),ne){if(rtne[1])return ne[1]}return rt}function Re(he){return j._distinct&&j.index&&he[j.index]?he[j.index]:he[0]}if(ae||te||le){var Pe={},je={};if(ae){Pe.mc=Se("marker.color",Re),Pe.mx=Se("marker.symbol",Re),Pe.mo=Se("marker.opacity",S.mean,[.2,1]),Pe.mlc=Se("marker.line.color",Re),Pe.mlw=Se("marker.line.width",S.mean,[0,5],f),Pe.mld=ee._isShape?"solid":Se("marker.line.dash",Re),je.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var at=Se("marker.size",S.mean,[2,16],s);Pe.ms=at,je.marker.size=at}le&&(je.line={width:Se("line.width",Re,[0,10],h)}),te&&(Pe.tx="Aa",Pe.tp=Se("textposition",Re),Pe.ts=10,Pe.tc=Se("textfont.color",Re),Pe.tf=Se("textfont.family",Re),Pe.tw=Se("textfont.weight",Re),Pe.ty=Se("textfont.style",Re),Pe.tv=Se("textfont.variant",Re),Pe.tC=Se("textfont.textcase",Re),Pe.tE=Se("textfont.lineposition",Re),Pe.tS=Se("textfont.shadow",Re)),pe=[S.minExtend(j,Pe)],we=S.minExtend(ee,je),we.selectedpoints=null,we.texttemplate=null}var nt=v.select(this).select("g.legendpoints"),tt=nt.selectAll("path.scatterpts").data(ae?pe:[]);tt.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",y),tt.exit().remove(),tt.call(e.pointStyle,we,E),ae&&(pe[0].mrc=3);var Ve=nt.selectAll("g.pointtext").data(te?pe:[]);Ve.enter().append("g").classed("pointtext",!0).append("text").attr("transform",y),Ve.exit().remove(),Ve.selectAll("text").call(e.textPointStyle,we,E)}function F(Y){var X=Y[0].trace,Q=X.type==="waterfall";if(Y[0]._distinct&&Q){var V=Y[0].trace[Y[0].dir].marker;return Y[0].mc=V.color,Y[0].mlw=V.line.width,Y[0].mlc=V.line.color,L(Y,this,"waterfall")}var le=[];X.visible&&Q&&(le=Y[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=v.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(le);ae.enter().append("path").classed("legendwaterfall",!0).attr("transform",y).style("stroke-miterlimit",1),ae.exit().remove(),ae.each(function(j){var ee=v.select(this),te=X[j[0]].marker,pe=D(void 0,te.line,c,f);ee.attr("d",j[1]).style("stroke-width",pe+"px").call(t.fill,te.color),pe&&ee.call(t.stroke,te.line.color)})}function N(Y){L(Y,this)}function O(Y){L(Y,this,"funnel")}function L(Y,X,Q){var V=Y[0].trace,le=V.marker||{},ae=le.line||{},j=le.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",ee=Q?V.visible&&V.type===Q:_.traceIs(V,"bar"),te=v.select(X).select("g.legendpoints").selectAll("path.legend"+Q).data(ee?[Y]:[]);te.enter().append("path").classed("legend"+Q,!0).attr("d",j).attr("transform",y),te.exit().remove(),te.each(function(pe){var we=v.select(this),Se=pe[0],Re=D(Se.mlw,le.line,c,f);we.style("stroke-width",Re+"px");var Pe=Se.mcc;if(!p._inHover&&"mc"in Se){var je=r(le),at=je.mid;at===void 0&&(at=(je.max+je.min)/2),Pe=e.tryColorscale(le,"")(at)}var nt=Pe||Se.mc||le.color,tt=le.pattern,Ve=e.getPatternAttr,he=tt&&(Ve(tt.shape,0,"")||Ve(tt.path,0,""));if(he){var se=Ve(tt.bgcolor,0,null),ne=Ve(tt.fgcolor,0,null),Ce=tt.fgopacity,Ze=x(tt.size,8,10),rt=x(tt.solidity,.5,1),Je="legend-"+V.uid;we.call(e.pattern,"legend",E,Je,he,Ze,rt,Pe,tt.fillmode,se,ne,Ce)}else we.call(t.fill,nt);Re&&t.stroke(we,Se.mlc||ae.color)})}function U(Y){var X=Y[0].trace,Q=v.select(this).select("g.legendpoints").selectAll("path.legendbox").data(X.visible&&_.traceIs(X,"box-violin")?[Y]:[]);Q.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",y),Q.exit().remove(),Q.each(function(){var V=v.select(this);if((X.boxpoints==="all"||X.points==="all")&&t.opacity(X.fillcolor)===0&&t.opacity((X.line||{}).color)===0){var le=S.minExtend(X,{marker:{size:d?s:S.constrain(X.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});Q.call(e.pointStyle,le,E)}else{var ae=D(void 0,X.line,c,f);V.style("stroke-width",ae+"px").call(t.fill,X.fillcolor),ae&&t.stroke(V,X.line.color)}})}function B(Y){var X=Y[0].trace,Q=v.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(X.visible&&X.type==="candlestick"?[Y,Y]:[]);Q.enter().append("path").classed("legendcandle",!0).attr("d",function(V,le){return le?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",y).style("stroke-miterlimit",1),Q.exit().remove(),Q.each(function(V,le){var ae=v.select(this),j=X[le?"increasing":"decreasing"],ee=D(void 0,j.line,c,f);ae.style("stroke-width",ee+"px").call(t.fill,j.fillcolor),ee&&t.stroke(ae,j.line.color)})}function W(Y){var X=Y[0].trace,Q=v.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(X.visible&&X.type==="ohlc"?[Y,Y]:[]);Q.enter().append("path").classed("legendohlc",!0).attr("d",function(V,le){return le?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",y).style("stroke-miterlimit",1),Q.exit().remove(),Q.each(function(V,le){var ae=v.select(this),j=X[le?"increasing":"decreasing"],ee=D(void 0,j.line,c,f);ae.style("fill","none").call(e.dashLine,j.line.dash,ee),ee&&t.stroke(ae,j.line.color)})}function $(Y){ce(Y,this,"pie")}function ue(Y){ce(Y,this,"funnelarea")}function ce(Y,X,Q){var V=Y[0],le=V.trace,ae=Q?le.visible&&le.type===Q:_.traceIs(le,Q),j=v.select(X).select("g.legendpoints").selectAll("path.legend"+Q).data(ae?[Y]:[]);if(j.enter().append("path").classed("legend"+Q,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",y),j.exit().remove(),j.size()){var ee=le.marker||{},te=D(i(ee.line.width,V.pts),ee.line,c,f),pe="pieLike",we=S.minExtend(le,{marker:{line:{width:te}}},pe),Se=S.minExtend(V,{trace:we},pe);a(j,Se,we,E)}}function de(Y){var X=Y[0].trace,Q,V=[];if(X.visible)switch(X.type){case"histogram2d":case"heatmap":V=[["M-15,-2V4H15V-2Z"]],Q=!0;break;case"choropleth":case"choroplethmapbox":case"choroplethmap":V=[["M-6,-6V6H6V-6Z"]],Q=!0;break;case"densitymapbox":case"densitymap":V=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],Q="radial";break;case"cone":V=[["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"]],Q=!1;break;case"streamtube":V=[["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"]],Q=!1;break;case"surface":V=[["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"]],Q=!0;break;case"mesh3d":V=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],Q=!1;break;case"volume":V=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],Q=!0;break;case"isosurface":V=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],Q=!1;break}var le=v.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(V);le.enter().append("path").classed("legend3dandfriends",!0).attr("transform",y).style("stroke-miterlimit",1),le.exit().remove(),le.each(function(ae,j){var ee=v.select(this),te=r(X),pe=te.colorscale,we=te.reversescale,Se=function(at){if(at.size()){var nt="legendfill-"+X.uid;e.gradient(at,E,nt,T(we,Q==="radial"),pe,"fill")}},Re;if(pe){if(!Q){var je=pe.length;Re=j===0?pe[we?je-1:0][1]:j===1?pe[we?0:je-1][1]:pe[Math.floor((je-1)/2)][1]}}else{var Pe=X.vertexcolor||X.facecolor||X.color;Re=S.isArrayOrTypedArray(Pe)?Pe[j]||Pe[0]:Pe}ee.attr("d",ae[0]),Re?ee.call(t.fill,Re):ee.call(Se)})}};function T(w,A){var E=A?"radial":"horizontal";return E+(w?"":"reversed")}function l(w){var A=w[0].trace,E=A.contours,p=o.hasLines(A),b=o.hasMarkers(A),d=A.visible&&A.fill&&A.fill!=="none",u=!1,g=!1;if(E){var y=E.coloring;y==="lines"?u=!0:p=y==="none"||y==="heatmap"||E.showlines,E.type==="constraint"?d=E._operation!=="=":(y==="fill"||y==="heatmap")&&(g=!0)}return{showMarker:b,showLine:p,showFill:d,showGradientLine:u,showGradientFill:g,anyLine:p||u,anyFill:d||g}}function x(w,A,E){return w&&S.isArrayOrTypedArray(w)?A:w>E?E:w}}}),y5=He({"src/components/legend/draw.js"(Z,q){"use strict";var v=Vn(),_=sa(),S=bc(),M=so(),e=Qy(),t=Ap(),r=as(),o=$n(),a=su(),i=v5().handleItemClick,n=v5().handleTitleClick,s=m5(),h=uh(),f=h.LINE_SPACING,m=h.FROM_TL,c=h.FROM_BR,T=dz(),l=g5(),x=E_(),w=1,A=/^legend[0-9]*$/;q.exports=function(W,$){if($)p(W,$);else{var ue=W._fullLayout,ce=ue._legends,de=ue._infolayer.selectAll('[class^="legend"]');de.each(function(){var V=v.select(this),le=V.attr("class"),ae=le.split(" ")[0];ae.match(A)&&ce.indexOf(ae)===-1&&V.remove()});for(var Y=0;Y1)}var te=ue.hiddenlabels||[];if(!X&&(!ue.showlegend||!Q.length))return Y.selectAll("."+ce).remove(),ue._topdefs.select("#"+de).remove(),S.autoMargin(B,ce);var pe=_.ensureSingle(Y,"g",ce,function(Ve){X||Ve.attr("pointer-events","all")}),we=_.ensureSingleById(ue._topdefs,"clipPath",de,function(Ve){Ve.append("rect")}),Se=_.ensureSingle(pe,"rect","bg",function(Ve){Ve.attr("shape-rendering","crispEdges")});Se.call(o.stroke,$.bordercolor).call(o.fill,$.bgcolor).style("stroke-width",$.borderwidth+"px");var Re=_.ensureSingle(pe,"g","scrollbox"),Pe=$.title;$._titleWidth=0,$._titleHeight=0;var je;Pe.text?(je=_.ensureSingle(Re,"text",ce+"titletext"),je.attr("text-anchor","start").call(r.font,Pe.font).text(Pe.text),P(je,Re,B,$,w),!X&&($.titleclick||$.titledoubleclick)&&D(Re,B,$,ce)):(Re.selectAll("."+ce+"titletext").remove(),Re.selectAll("."+ce+"titletoggle").remove());var at=_.ensureSingle(pe,"rect","scrollbar",function(Ve){Ve.attr(s.scrollBarEnterAttrs).call(o.fill,s.scrollBarColor)}),nt=Re.selectAll("g.groups").data(Q);nt.enter().append("g").attr("class","groups"),nt.exit().remove();var tt=nt.selectAll("g.traces").data(_.identity);tt.enter().append("g").attr("class","traces"),tt.exit().remove(),tt.style("opacity",function(Ve){let he=Ve[0],se=he.trace;if(he.groupTitle){let ne=se.legendgroup,Ce=(ue.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 M.traceIs(se,"pie-like")?te.indexOf(Ve[0].label)!==-1?.5:1:se.visible==="legendonly"?.5:1}).each(function(){v.select(this).call(u,B,$)}).call(l,B,$).each(function(Ve){X||Ve[0].groupTitle&&$.groupclick==="toggleitem"||v.select(this).call(y,B,ce)}),_.syncOrAsync([S.previousPromises,function(){return N(B,nt,tt,$,Re)},function(){var Ve=ue._size,he=$.borderwidth,se=$.xref==="paper",ne=$.yref==="paper";if(Pe.text){let Ct=(ue.shapes||[]).filter(function(jt){return jt.showlegend}),Pt=B._fullData.concat(Ct).some(function(jt){let cr=jt.legend||"legend";var or=Array.isArray(cr)?cr.includes(ce):cr===ce;return or&&jt.visible===!0});je.style("opacity",Pt?1:.5)}if(!X){var Ce,Ze;se?Ce=Ve.l+Ve.w*$.x-m[L($)]*$._width:Ce=ue.width*$.x-m[L($)]*$._width,ne?Ze=Ve.t+Ve.h*(1-$.y)-m[U($)]*$._effHeight:Ze=ue.height*(1-$.y)-m[U($)]*$._effHeight;var rt=O(B,ce,Ce,Ze);if(rt)return;if(ue.margin.autoexpand){var Je=Ce,St=Ze;Ce=se?_.constrain(Ce,0,ue.width-$._width):Je,Ze=ne?_.constrain(Ze,0,ue.height-$._effHeight):St,Ce!==Je&&_.log("Constrain "+ce+".x to make legend fit inside graph"),Ze!==St&&_.log("Constrain "+ce+".y to make legend fit inside graph")}r.setTranslate(pe,Ce,Ze)}if(at.on(".drag",null),pe.on("wheel",null),X||$._height<=$._maxHeight||B._context.staticPlot){var kt=$._effHeight;X&&(kt=$._height),Se.attr({width:$._width-he,height:kt-he,x:he/2,y:he/2}),r.setTranslate(Re,0,0),we.select("rect").attr({width:$._width-2*he,height:kt-2*he,x:he,y:he}),r.setClipUrl(Re,de,B),r.setRect(at,0,0,0,0),delete $._scrollY}else{var Bt=Math.max(s.scrollBarMinHeight,$._effHeight*$._effHeight/$._height),Vt=$._effHeight-Bt-2*s.scrollBarMargin,Ar=$._height-$._effHeight,vr=Vt/Ar,qr=Math.min($._scrollY||0,Ar);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(Re,de,B),We(qr,Bt,vr),pe.on("wheel",function(){qr=_.constrain($._scrollY+v.event.deltaY/Ar*Vt,0,Ar),We(qr,Bt,vr),qr!==0&&qr!==Ar&&v.event.preventDefault()});var kr,Ur,_t,Fe=function(Ct,Pt,jt){var cr=(jt-Pt)/vr+Ct;return _.constrain(cr,0,Ar)},Ye=function(Ct,Pt,jt){var cr=(Pt-jt)/vr+Ct;return _.constrain(cr,0,Ar)},Ae=v.behavior.drag().on("dragstart",function(){var Ct=v.event.sourceEvent;Ct.type==="touchstart"?kr=Ct.changedTouches[0].clientY:kr=Ct.clientY,_t=qr}).on("drag",function(){var Ct=v.event.sourceEvent;Ct.buttons===2||Ct.ctrlKey||(Ct.type==="touchmove"?Ur=Ct.changedTouches[0].clientY:Ur=Ct.clientY,qr=Fe(_t,kr,Ur),We(qr,Bt,vr))});at.call(Ae);var Le=v.behavior.drag().on("dragstart",function(){var Ct=v.event.sourceEvent;Ct.type==="touchstart"&&(kr=Ct.changedTouches[0].clientY,_t=qr)}).on("drag",function(){var Ct=v.event.sourceEvent;Ct.type==="touchmove"&&(Ur=Ct.changedTouches[0].clientY,qr=Ye(_t,kr,Ur),We(qr,Bt,vr))});Re.call(Le)}function We(Ct,Pt,jt){$._scrollY=B._fullLayout[ce]._scrollY=Ct,r.setTranslate(Re,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 Ke,st,ot,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);ot=Pt.x,Ut=Pt.y}},moveFn:function(Ct,Pt){if(ot!==void 0&&Ut!==void 0){var jt=ot+Ct,cr=Ut+Pt;r.setTranslate(pe,jt,cr),Ke=t.align(jt,$._width,Ve.l,Ve.l+Ve.w,$.xanchor),st=t.align(cr+$._height,-$._height,Ve.t+Ve.h,Ve.t,$.yanchor)}},doneFn:function(){if(Ke!==void 0&&st!==void 0){var Ct={};Ct[ce+".x"]=Ke,Ct[ce+".y"]=st,M.call("_guiRelayout",B,Ct)}},clickFn:function(Ct,Pt){var jt=Y.selectAll("g.traces").filter(function(){var cr=this.getBoundingClientRect();return Pt.clientX>=cr.left&&Pt.clientX<=cr.right&&Pt.clientY>=cr.top&&Pt.clientY<=cr.bottom});jt.size()>0&&d(B,$,jt,Ct,Pt)}})}}],B)}}function b(B,W,$){var ue=B[0],ce=ue.width,de=W.entrywidthmode,Y=ue.trace.legendwidth||W.entrywidth;return de==="fraction"?W._maxWidth*Y:$+(Y||ce)}function d(B,W,$,ue,ce){var de=B._fullLayout,Y=$.data()[0][0].trace,X=W.itemclick,Q=W.itemdoubleclick,V={event:ce,node:$.node(),curveNumber:Y.index,expandedIndex:Y.index,data:B.data,layout:B.layout,frames:B._transitionData._frames,config:B._context,fullData:B._fullData,fullLayout:de};Y._group&&(V.group=Y._group),M.traceIs(Y,"pie-like")&&(V.label=$.datum()[0].label);var le=e.triggerHandler(B,"plotly_legendclick",V);if(ue===1){if(le===!1)return;W._clickTimeout=setTimeout(function(){B._fullLayout&&X&&i($,B,W,X)},B._context.doubleClickDelay)}else if(ue===2){W._clickTimeout&&clearTimeout(W._clickTimeout),B._legendMouseDownTime=0;var ae=e.triggerHandler(B,"plotly_legenddoubleclick",V);ae!==!1&&le!==!1&&Q&&i($,B,W,Q)}}function u(B,W,$){var ue=x.getId($),ce=B.data()[0][0],de=ce.trace,Y=M.traceIs(de,"pie-like"),X=!$._inHover&&W._context.edits.legendText&&!Y,Q=$._maxNameLength,V,le;ce.groupTitle?(V=ce.groupTitle.text,le=ce.groupTitle.font):(le=$.font,$.entries?V=ce.text:(V=Y?ce.label:de.name,de._meta&&(V=_.templateString(V,de._meta))));var ae=_.ensureSingle(B,"text",ue+"text");ae.attr("text-anchor","start").call(r.font,le).text(X?g(V,Q):V);var j=$.indentation+$.itemwidth+s.itemGap*2;a.positionText(ae,j,0),X?ae.call(a.makeEditable,{gd:W,text:V}).call(P,B,W,$).on("edit",function(ee){this.text(g(ee,Q)).call(P,B,W,$);var te=ce.trace._fullInput||{},pe={};return pe.name=ee,te._isShape?M.call("_guiRelayout",W,"shapes["+de.index+"].name",pe.name):M.call("_guiRestyle",W,pe,de.index)}):P(ae,B,W,$)}function g(B,W){var $=Math.max(4,W);if(B&&B.trim().length>=$/2)return B;B=B||"";for(var ue=$-B.length;ue>0;ue--)B+=" ";return B}function y(B,W,$){var ue=W._context.doubleClickDelay,ce,de=1,Y=_.ensureSingle(B,"rect",$+"toggle",function(X){W._context.staticPlot||X.style("cursor","pointer").attr("pointer-events","all"),X.call(o.fill,"rgba(0,0,0,0)")});W._context.staticPlot||(Y.on("mousedown",function(){ce=new Date().getTime(),ce-W._legendMouseDownTimeue&&(de=Math.max(de-1,1)),d(W,X,B,de,v.event)}}))}function D(B,W,$,ue){if(W._fullData.some(function(V){let le=V.legend||"legend";return(Array.isArray(le)?le.includes(ue):le===ue)&&M.traceIs(V,"pie-like")}))return;let de=W._context.doubleClickDelay;var Y,X=1;let Q=_.ensureSingle(B,"rect",ue+"titletoggle",function(V){W._context.staticPlot||V.style("cursor","pointer").attr("pointer-events","all"),V.call(o.fill,"rgba(0,0,0,0)")});W._context.staticPlot||(Q.on("mousedown",function(){Y=new Date().getTime(),Y-W._legendMouseDownTimede&&(X=Math.max(X-1,1));let V={event:v.event,legendId:ue,data:W.data,layout:W.layout,fullData:W._fullData,fullLayout:W._fullLayout};if(X===1&&$.titleclick){if(e.triggerHandler(W,"plotly_legendtitleclick",V)===!1)return;$._titleClickTimeout=setTimeout(function(){W._fullLayout&&n(W,$,$.titleclick)},de)}else X===2&&($._titleClickTimeout&&clearTimeout($._titleClickTimeout),W._legendMouseDownTime=0,e.triggerHandler(W,"plotly_legendtitledoubleclick",V)!==!1&&$.titledoubleclick&&n(W,$,$.titledoubleclick))}))}function P(B,W,$,ue,ce){ue._inHover&&B.attr("data-notex",!0),a.convertToTspans(B,$,function(){z(W,$,ue,ce)})}function z(B,W,$,ue){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 Y=B.select("g[class*=math-group]"),X=Y.node(),Q=x.getId($);$||($=W._fullLayout[Q]);var V=$.borderwidth,le;ue===w?le=$.title.font:ce.groupTitle?le=ce.groupTitle.font:le=$.font;var ae=le.size*f,j,ee;if(X){var te=r.bBox(X);j=te.height,ee=te.width,ue===w?r.setTranslate(Y,V,V+j*.75):r.setTranslate(Y,0,j*.25)}else{var pe="."+Q+(ue===w?"title":"")+"text",we=B.select(pe),Se=a.lineCount(we),Re=we.node();if(j=ae*Se,ee=Re?r.bBox(Re).width:0,ue===w)$.title.side==="left"&&(ee+=s.itemGap*2),a.positionText(we,V+s.titlePad,V+ae);else{var Pe=s.itemGap*2+$.indentation+$.itemwidth;ce.groupTitle&&(Pe=s.itemGap,ee-=$.indentation+$.itemwidth),a.positionText(we,Pe,-ae*((Se-1)/2-.3))}}ue===w?($._titleWidth=ee,$._titleHeight=j):(ce.lineHeight=ae,ce.height=Math.max(j,16)+3,ce.width=ee)}function F(B){var W=0,$=0,ue=B.title.side;return ue&&(ue.indexOf("left")!==-1&&(W=B._titleWidth),ue.indexOf("top")!==-1&&($=B._titleHeight)),[W,$]}function N(B,W,$,ue,ce){var de=B._fullLayout,Y=x.getId(ue);ue||(ue=de[Y]);var X=de._size,Q=x.isVertical(ue),V=x.isGrouped(ue),le=ue.entrywidthmode==="fraction",ae=ue.borderwidth,j=2*ae,ee=s.itemGap,te=ue.indentation+ue.itemwidth+ee*2,pe=2*(ae+ee),we=U(ue),Se=ue.y<0||ue.y===0&&we==="top",Re=ue.y>1||ue.y===1&&we==="bottom",Pe=ue.tracegroupgap,je={};let{orientation:at,yref:nt}=ue,{maxheight:tt}=ue,Ve=Se||Re||at!=="v"||nt!=="paper";tt||(tt=Ve?.5:1);let he=Ve?de.height:X.h;ue._maxHeight=Math.max(tt>1?tt:tt*he,30);var se=0;ue._width=0,ue._height=0;var ne=F(ue);if(Q)$.each(function(Ct){var Pt=Ct[0].height;r.setTranslate(this,ae+ne[0],ae+ne[1]+ue._height+Pt/2+ee),ue._height+=Pt,ue._width=Math.max(ue._width,Ct[0].width)}),se=te+ue._width,ue._width+=ee+te+j,ue._height+=pe,V&&(W.each(function(Ct,Pt){r.setTranslate(this,0,Pt*ue.tracegroupgap)}),ue._height+=(ue._lgroupsLength-1)*ue.tracegroupgap);else{var Ce=L(ue),Ze=ue.x<0||ue.x===0&&Ce==="right",rt=ue.x>1||ue.x===1&&Ce==="left",Je=Re||Se,St=de.width/2;ue._maxWidth=Math.max(Ze?Je&&Ce==="left"?X.l+X.w:St:rt?Je&&Ce==="right"?X.r+X.w:St:X.w,2*te);var kt=0,Bt=0;$.each(function(Ct){var Pt=b(Ct,ue,te);kt=Math.max(kt,Pt),Bt+=Pt}),se=null;var Vt=0;if(V){var Ar=0,vr=0,qr=0;W.each(function(){var Ct=0,Pt=0;v.select(this).selectAll("g.traces").each(function(cr){var or=b(cr,ue,te),nr=cr[0].height;r.setTranslate(this,ne[0],ne[1]+ae+ee+nr/2+Pt),Pt+=nr,Ct=Math.max(Ct,or),je[cr[0].trace.legendgroup]=Ct});var jt=Ct+ee;vr>0&&jt+ae+vr>ue._maxWidth?(Vt=Math.max(Vt,vr),vr=0,qr+=Ar+Pe,Ar=Pt):Ar=Math.max(Ar,Pt),r.setTranslate(this,vr,qr),vr+=jt}),ue._width=Math.max(Vt,vr)+ae,ue._height=qr+Ar+pe}else{var kr=$.size(),Ur=Bt+j+(kr-1)*ee=ue._maxWidth&&(Vt=Math.max(Vt,Ae),Fe=0,Ye+=_t,ue._height+=_t,_t=0),r.setTranslate(this,ne[0]+ae+Fe,ne[1]+ae+Ye+Pt/2+ee),Ae=Fe+jt+ee,Fe+=cr,_t=Math.max(_t,Pt)}),Ur?(ue._width=Fe+j,ue._height=_t+pe):(ue._width=Math.max(Vt,Ae)+j,ue._height+=_t+pe)}}ue._width=Math.ceil(Math.max(ue._width+ne[0],ue._titleWidth+2*(ae+s.titlePad))),ue._height=Math.ceil(Math.max(ue._height+ne[1],ue._titleHeight+2*(ae+s.itemGap))),ue._effHeight=Math.min(ue._height,ue._maxHeight);var Le=B._context.edits,We=Le.legendText||Le.legendPosition;$.each(function(Ct){var Pt=v.select(this).select("."+Y+"toggle"),jt=Ct[0].height,cr=Ct[0].trace.legendgroup,or=b(Ct,ue,te);V&&cr!==""&&(or=je[cr]);var nr=We?te:se||or;!Q&&!le&&(nr+=ee/2),r.setRect(Pt,0,-jt/2,nr,jt)});var Ke=ce.select("."+Y+"titletext");Ke.node()&&E(Ke,ue,ae);var st=ce.select("."+Y+"titletoggle");if(st.size()&&Ke.node()){var ot=Ke.attr("x")||0,Ut=s.titlePad;r.setRect(st,ot-Ut,ae,ue._titleWidth+2*Ut,ue._titleHeight+2*Ut)}}function O(B,W,$,ue){var ce=B._fullLayout,de=ce[W],Y=L(de),X=U(de),Q=de.xref==="paper",V=de.yref==="paper";B._fullLayout._reservedMargin[W]={};var le=de.y<.5?"b":"t",ae=de.x<.5?"l":"r",j={r:ce.width-$,l:$+de._width,b:ce.height-ue,t:ue+de._effHeight};if(Q&&V)return S.autoMargin(B,W,{x:de.x,y:de.y,l:de._width*m[Y],r:de._width*c[Y],b:de._effHeight*c[X],t:de._effHeight*m[X]});Q?B._fullLayout._reservedMargin[W][le]=j[le]:V||de.orientation==="v"?B._fullLayout._reservedMargin[W][ae]=j[ae]:B._fullLayout._reservedMargin[W][le]=j[le]}function L(B){return _.isRightAnchor(B)?"right":_.isCenterAnchor(B)?"center":"left"}function U(B){return _.isBottomAnchor(B)?"bottom":_.isMiddleAnchor(B)?"middle":"top"}}}),_5=He({"src/components/fx/hover.js"(Z){"use strict";var q=Vn(),v=ns(),_=Ch(),S=sa(),M=S.pushUnique,e=S.strTranslate,t=S.strRotate,r=Qy(),o=su(),a=pz(),i=as(),n=$n(),s=Ap(),h=Wo(),f=lh().zindexSeparator,m=so(),c=$p(),T=w_(),l=d5(),x=y5(),w=T.YANGLE,A=Math.PI*w/180,E=1/Math.sin(A),p=Math.cos(A),b=Math.sin(A),d=T.HOVERARROWSIZE,u=T.HOVERTEXTPAD,g={box:!0,ohlc:!0,violin:!0,candlestick:!0},y={scatter:!0,scattergl:!0,splom:!0};function D(j,ee){return j.distance-ee.distance}Z.hover=function(ee,te,pe,we){ee=S.getGraphDiv(ee);var Se=te.target;S.throttle(ee._fullLayout._uid+T.HOVERID,T.HOVERMINTIME,function(){P(ee,te,pe,we,Se)})},Z.loneHover=function(ee,te){var pe=!0;Array.isArray(ee)||(pe=!1,ee=[ee]);var we=te.gd,Se=V(we),Re=le(we),Pe=ee.map(function(Ce){var Ze=Ce._x0||Ce.x0||Ce.x||0,rt=Ce._x1||Ce.x1||Ce.x||0,Je=Ce._y0||Ce.y0||Ce.y||0,St=Ce._y1||Ce.y1||Ce.y||0,kt=Ce.eventData;if(kt){var Bt=Math.min(Ze,rt),Vt=Math.max(Ze,rt),Ar=Math.min(Je,St),vr=Math.max(Je,St),qr=Ce.trace;if(m.traceIs(qr,"gl3d")){var kr=we._fullLayout[qr.scene]._scene.container,Ur=kr.offsetLeft,_t=kr.offsetTop;Bt+=Ur,Vt+=Ur,Ar+=_t,vr+=_t}kt.bbox={x0:Bt+Re,x1:Vt+Re,y0:Ar+Se,y1:vr+Se},kt.xPixel=(Ze+rt)/2,kt.yPixel=(Je+St)/2,te.inOut_bbox&&te.inOut_bbox.push(kt.bbox)}else kt=!1;return{color:Ce.color||n.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}}),je=!1,at=N(Pe,{gd:we,hovermode:"closest",rotateLabels:je,bgColor:te.bgColor||n.background,container:q.select(te.container),outerContainer:te.outerContainer||te.container}),nt=at.hoverLabels,tt=5,Ve=0,he=0;nt.sort(function(Ce,Ze){return Ce.y0-Ze.y0}).each(function(Ce,Ze){var rt=Ce.y0-Ce.by/2;rt-ttVt[0]._length||Wa<0||Wa>Ar[0]._length)return s.unhoverRaw(j,ee)}if(ee.pointerX=qa+Vt[0]._offset,ee.pointerY=Wa+Ar[0]._offset,"xval"in ee?Ae=c.flat(Se,ee.xval):Ae=c.p2c(Vt,qa),"yval"in ee?Le=c.flat(Se,ee.yval):Le=c.p2c(Ar,Wa),!v(Ae[0])||!v(Le[0]))return S.warn("Fx.hover failed",ee,j),s.unhoverRaw(j,ee)}Pe.clickanywhere&&(j._hoverXVals=Ae,j._hoverYVals=Le,j._hoverXAxes=Vt,j._hoverYAxes=Ar);var wi=1/0;function Yt(kn,wo){for(Ke=0;Kenr&&(Fe.splice(0,nr),wi=Fe[0].distance),tt&&_t!==0&&Fe.length===0){or.distance=_t,or.index=!1;var jo=ot._module.hoverPoints(or,jt,cr,"closest",{hoverLayer:Pe._hoverlayer});if(jo&&(jo=jo.filter(function(ps){return ps.spikeDistance<=_t})),jo&&jo.length){var Yn,Gn=jo.filter(function(ps){return ps.xa.showspikes&&ps.xa.spikesnap!=="hovered data"});if(Gn.length){var Hn=Gn[0];v(Hn.x0)&&v(Hn.y0)&&(Yn=Zt(Hn),(!Pr.vLinePoint||Pr.vLinePoint.spikeDistance>Yn.spikeDistance)&&(Pr.vLinePoint=Yn))}var ss=jo.filter(function(ps){return ps.ya.showspikes&&ps.ya.spikesnap!=="hovered data"});if(ss.length){var _s=ss[0];v(_s.x0)&&v(_s.y0)&&(Yn=Zt(_s),(!Pr.hLinePoint||Pr.hLinePoint.spikeDistance>Yn.spikeDistance)&&(Pr.hLinePoint=Yn))}}}}}Yt();function Rt(kn,wo,Zn){for(var go=null,os=1/0,ys,jo=0;jokn.trace.index===tn.trace.index):Fe=[tn];var cn=Fe.length,xt=Q("x",tn,Pe),ut=Q("y",tn,Pe);Yt(xt,ut);var Or=[],Cr={},wr=0,Rr=function(kn){var wo=g[kn.trace.type]?z(kn):kn.trace.index;if(!Cr[wo])wr++,Cr[wo]=wr,Or.push(kn);else{var Zn=Cr[wo]-1,go=Or[Zn];Zn>0&&Math.abs(kn.distance)cn-1;Nr--)Rr(Fe[Nr]);Fe=Or,ra()}var Hr=j._hoverdata,gt=[],Kt=V(j),mr=le(j);for(let kn of Fe){var Ir=c.makeEventData(kn,kn.trace,kn.cd);if(kn.hovertemplate!==!1){var va=!1;kn.cd[kn.index]&&kn.cd[kn.index].ht&&(va=kn.cd[kn.index].ht),kn.hovertemplate=va||kn.trace.hovertemplate||!1}if(kn.xa&&kn.ya){var Pa=kn.x0+kn.xa._offset,ga=kn.x1+kn.xa._offset,la=kn.y0+kn.ya._offset,ba=kn.y1+kn.ya._offset,Ai=Math.min(Pa,ga),ki=Math.max(Pa,ga),Ki=Math.min(la,ba),Mn=Math.max(la,ba);Ir.bbox={x0:Ai+mr,x1:ki+mr,y0:Ki+Kt,y1:Mn+Kt},Ir.xPixel=(Pa+ga)/2,Ir.yPixel=(la+ba)/2}kn.eventData=[Ir],gt.push(Ir)}j._hoverdata=gt;var wn=Ve==="y"&&(Ye.length>1||Fe.length>1)||Ve==="closest"&&_a&&Fe.length>1,On=n.combine(Pe.plot_bgcolor||n.background,Pe.paper_bgcolor),En=N(Fe,{gd:j,hovermode:Ve,rotateLabels:wn,bgColor:On,container:Pe._hoverlayer,outerContainer:Pe._paper.node(),commonLabelOpts:Pe.hoverlabel,hoverdistance:Pe.hoverdistance}),ao=En.hoverLabels;if(c.isUnifiedHover(Ve)||(L(ao,wn,Pe,En.commonLabelBoundingBox),W(ao,wn,Pe._invScaleX,Pe._invScaleY)),we&&we.tagName){var Co=m.getComponentMethod("annotations","hasClickToShow")(j,gt);a(q.select(we),Co?"pointer":"")}var bo=ce(j,ee,Hr);if(!we||pe||!bo&&!Pe.hoveranywhere)return;Hr&&bo&&j.emit("plotly_unhover",{event:ee,points:Hr}),zs(j._hoverdata);function zs(kn){j.emit("plotly_hover",{event:ee,points:kn,xaxes:Vt,yaxes:Ar,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,ee){var te=ee.gd,pe=te._fullLayout,we=ee.hovermode,Se=ee.rotateLabels,Re=ee.bgColor,Pe=ee.container,je=ee.outerContainer,at=ee.commonLabelOpts||{};if(j.length===0)return[[]];var nt=ee.fontFamily||T.HOVERFONT,tt=ee.fontSize||T.HOVERFONTSIZE,Ve=ee.fontWeight||pe.font.weight,he=ee.fontStyle||pe.font.style,se=ee.fontVariant||pe.font.variant,ne=ee.fontTextcase||pe.font.textcase,Ce=ee.fontLineposition||pe.font.lineposition,Ze=ee.fontShadow||pe.font.shadow,rt=j[0],Je=rt.xa,St=rt.ya,kt=we.charAt(0),Bt=kt+"Label",Vt=rt[Bt];if(Vt===void 0&&Je.type==="multicategory")for(var Ar=0;Arpe.width-gt&&(Kt=pe.width-gt),rn.attr("d","M"+(Rr-Kt)+",0L"+(Rr-Kt+d)+","+Hr+d+"H"+gt+"v"+Hr+(u*2+wr.height)+"H"+-gt+"V"+Hr+d+"H"+(Rr-Kt-d)+"Z"),Rr=Kt,Ke.minX=Rr-gt,Ke.maxX=Rr+gt,Je.side==="top"?(Ke.minY=Nr-(u*2+wr.height),Ke.maxY=Nr-u):(Ke.minY=Nr+u,Ke.maxY=Nr+(u*2+wr.height))}else{var mr,Ir,va;St.side==="right"?(mr="start",Ir=1,va="",Rr=Je._offset+Je._length):(mr="end",Ir=-1,va="-",Rr=Je._offset),Nr=St._offset+(rt.y0+rt.y1)/2,tn.attr("text-anchor",mr),rn.attr("d","M0,0L"+va+d+","+d+"V"+(u+wr.height/2)+"h"+va+(u*2+wr.width)+"V-"+(u+wr.height/2)+"H"+va+d+"V-"+d+"Z"),Ke.minY=Nr-(u+wr.height/2),Ke.maxY=Nr+(u+wr.height/2),St.side==="right"?(Ke.minX=Rr+d,Ke.maxX=Rr+d+(u*2+wr.width)):(Ke.minX=Rr-d-(u*2+wr.width),Ke.maxX=Rr-d);var Pa=wr.height/2,ga=qr-wr.top-Pa,la="clip"+pe._uid+"commonlabel"+St._id,ba;if(Rrrn.hoverinfo!=="none");if(Ia.length===0)return[];var st=pe.hoverlabel,ot=st.font,Ut=Ia[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}):Vt,jt={showlegend:!0,legend:{title:{text:Pt,font:ot},font:ot,bgcolor:st.bgcolor,bordercolor:st.bordercolor,borderwidth:1,tracegroupgap:7,traceorder:pe.legend?pe.legend.traceorder:void 0,orientation:"v"}},cr={font:ot};l(jt,cr,te._fullData);var or=cr.legend;or.entries=[];for(var nr=0;nr=0?Za=ra:ca+hi=0?Za=ca:Ba+hi=0?ri=Fr:ta+wi=0?ri=ta:$a+wi=0,(Ia.idealAlign==="top"||!Ki)&&Mn?(va-=ga/2,Ia.anchor="end"):Ki?(va+=ga/2,Ia.anchor="start"):Ia.anchor="middle",Ia.crossPos=va;else{if(Ia.pos=va,Ki=Ir+Pa/2+ki<=kr,Mn=Ir-Pa/2-ki>=0,(Ia.idealAlign==="left"||!Ki)&&Mn)Ir-=Pa/2,Ia.anchor="end";else if(Ki)Ir+=Pa/2,Ia.anchor="start";else{Ia.anchor="middle";var wn=ki/2,On=Ir+wn-kr,En=Ir-wn;On>0&&(Ir-=On),En<0&&(Ir+=-En)}Ia.crossPos=Ir}Nr.attr("text-anchor",Ia.anchor),gt&&Hr.attr("text-anchor",Ia.anchor),rn.attr("transform",e(Ir,va)+(Se?t(w):""))}),{hoverLabels:pi,commonLabelBoundingBox:Ke}}function O(j,ee,te,pe,we,Se){var Re,Pe,je="",at="";j.nameOverride!==void 0&&(j.name=j.nameOverride),j.name&&(j.trace._meta&&(j.name=S.templateString(j.name,j.trace._meta)),je=Y(j.name,j.nameLength));var nt=te.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)):ee&&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&&(je===""&&Se.remove(),at=je),(Pe=(Re=j.trace)==null?void 0:Re.hoverlabel)!=null&&Pe.split&&(j.hovertemplate="");let{hovertemplate:Ve=!1}=j;if(Ve){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:Ve}),at=at.replace(F,(se,ne)=>(je=Y(ne,j.nameLength),""))}return[at,je]}function L(j,ee,te,pe){var we=ee?"xa":"ya",Se=ee?"ya":"xa",Re=0,Pe=1,je=j.size(),at=new Array(je),nt=0,tt=pe.minX,Ve=pe.maxX,he=pe.minY,se=pe.maxY,ne=function(Ae){return Ae*te._invScaleX},Ce=function(Ae){return Ae*te._invScaleY};j.each(function(Ae){var Le=Ae[we],We=Ae[Se],Ke=Le._id.charAt(0)==="x",st=Le.range;nt===0&&st&&st[0]>st[1]!==Ke&&(Pe=-1);var ot=0,Ut=Ke?te.width:te.height;if(te.hovermode==="x"||te.hovermode==="y"){var Ct=U(Ae,ee),Pt=Ae.anchor,jt=Pt==="end"?-1:1,cr,or;if(Pt==="middle")cr=Ae.crossPos+(Ke?Ce(Ct.y-Ae.by/2):ne(Ae.bx/2+Ae.tx2width/2)),or=cr+(Ke?Ce(Ae.by):ne(Ae.bx));else if(Ke)cr=Ae.crossPos+Ce(d+Ct.y)-Ce(Ae.by/2-d),or=cr+Ce(Ae.by);else{var nr=ne(jt*d+Ct.x),Pr=nr+ne(jt*Ae.bx);cr=Ae.crossPos+Math.min(nr,Pr),or=Ae.crossPos+Math.max(nr,Pr)}Ke?he!==void 0&&se!==void 0&&Math.min(or,se)-Math.max(cr,he)>1&&(We.side==="left"?(ot=We._mainLinePosition,Ut=te.width):Ut=We._mainLinePosition):tt!==void 0&&Ve!==void 0&&Math.min(or,Ve)-Math.max(cr,tt)>1&&(We.side==="top"?(ot=We._mainLinePosition,Ut=te.height):Ut=We._mainLinePosition)}at[nt++]=[{datum:Ae,traceIndex:Ae.trace.index,dp:0,pos:Ae.pos,posref:Ae.posref,size:Ae.by*(Ke?E:1)/2,pmin:ot,pmax:Ut}]}),at.sort(function(Ae,Le){return Ae[0].posref-Le[0].posref||Pe*(Le[0].traceIndex-Ae[0].traceIndex)});var Ze,rt,Je,St,kt,Bt,Vt;function Ar(Ae){var Le=Ae[0],We=Ae[Ae.length-1];if(rt=Le.pmin-Le.pos-Le.dp+Le.size,Je=We.pos+We.dp+We.size-Le.pmax,rt>.01){for(kt=Ae.length-1;kt>=0;kt--)Ae[kt].dp+=rt;Ze=!1}if(!(Je<.01)){if(rt<-.01){for(kt=Ae.length-1;kt>=0;kt--)Ae[kt].dp-=Je;Ze=!1}if(Ze){var Ke=0;for(St=0;StLe.pmax&&Ke++;for(St=Ae.length-1;St>=0&&!(Ke<=0);St--)Bt=Ae[St],Bt.pos>Le.pmax-1&&(Bt.del=!0,Ke--);for(St=0;St=0;kt--)Ae[kt].dp-=Je;for(St=Ae.length-1;St>=0&&!(Ke<=0);St--)Bt=Ae[St],Bt.pos+Bt.dp+Bt.size>Le.pmax&&(Bt.del=!0,Ke--)}}}for(;!Ze&&Re<=je;){for(Re++,Ze=!0,St=0;St.01){for(kt=qr.length-1;kt>=0;kt--)qr[kt].dp+=rt;for(vr.push.apply(vr,qr),at.splice(St+1,1),Vt=0,kt=vr.length-1;kt>=0;kt--)Vt+=vr[kt].dp;for(Je=Vt/vr.length,kt=vr.length-1;kt>=0;kt--)vr[kt].dp-=Je;Ze=!1}else St++}at.forEach(Ar)}for(St=at.length-1;St>=0;St--){var _t=at[St];for(kt=_t.length-1;kt>=0;kt--){var Fe=_t[kt],Ye=Fe.datum;Ye.offset=Fe.dp,Ye.del=Fe.del}}}function U(j,ee){var te=0,pe=j.offset;return ee&&(pe*=-b,te=j.offset*p),{x:te,y:pe}}function B(j){var ee={start:1,end:-1,middle:0}[j.anchor],te=ee*(d+u),pe=te+ee*(j.txwidth+u),we=j.anchor==="middle";return we&&(te-=j.tx2width/2,pe+=j.txwidth/2+u),{alignShift:ee,textShiftX:te,text2ShiftX:pe}}function W(j,ee,te,pe){var we=function(Re){return Re*te},Se=function(Re){return Re*pe};j.each(function(Re){var Pe=q.select(this);if(Re.del)return Pe.remove();var je=Pe.select("text.nums"),at=Re.anchor,nt=at==="end"?-1:1,tt=B(Re),Ve=U(Re,ee),he=Ve.x,se=Ve.y,ne=at==="middle",Ce="hoverlabel"in Re.trace?Re.trace.hoverlabel.showarrow:!0,Ze;ne?Ze="M-"+we(Re.bx/2+Re.tx2width/2)+","+Se(se-Re.by/2)+"h"+we(Re.bx)+"v"+Se(Re.by)+"h-"+we(Re.bx)+"Z":Ce?Ze="M0,0L"+we(nt*d+he)+","+Se(d+se)+"v"+Se(Re.by/2-d)+"h"+we(nt*Re.bx)+"v-"+Se(Re.by)+"H"+we(nt*d+he)+"V"+Se(se-d)+"Z":Ze="M"+we(nt*d+he)+","+Se(se-Re.by/2)+"h"+we(nt*Re.bx)+"v"+Se(Re.by)+"h"+we(-nt*Re.bx)+"Z",Pe.select("path").attr("d",Ze);var rt=he+tt.textShiftX,Je=se+Re.ty0-Re.by/2+u,St=Re.textAlign||"auto";St!=="auto"&&(St==="left"&&at!=="start"?(je.attr("text-anchor","start"),rt=ne?-Re.bx/2-Re.tx2width/2+u:-Re.bx-u):St==="right"&&at!=="end"&&(je.attr("text-anchor","end"),rt=ne?Re.bx/2-Re.tx2width/2-u:Re.bx+u)),je.call(o.positionText,we(rt),Se(Je)),Re.tx2width&&(Pe.select("text.name").call(o.positionText,we(tt.text2ShiftX+tt.alignShift*u+he),Se(se+Re.ty0-Re.by/2+u)),Pe.select("rect").call(i.setRect,we(tt.text2ShiftX+(tt.alignShift-1)*Re.tx2width/2+he),Se(se-Re.by/2-1),we(Re.tx2width),Se(Re.by+2)))})}function $(j,ee){var te=j.index,pe=j.trace||{},we=j.cd[0],Se=j.cd[te]||{};function Re(Ve){return Ve||v(Ve)&&Ve===0}var Pe=Array.isArray(te)?function(Ve,he){var se=S.castOption(we,te,Ve);return Re(se)?se:S.extractOption({},pe,"",he)}:function(Ve,he){return S.extractOption(Se,pe,Ve,he)};function je(Ve,he,se){var ne=Pe(he,se);Re(ne)&&(j[Ve]=ne)}if(je("hoverinfo","hi","hoverinfo"),je("bgcolor","hbg","hoverlabel.bgcolor"),je("borderColor","hbc","hoverlabel.bordercolor"),je("fontFamily","htf","hoverlabel.font.family"),je("fontSize","hts","hoverlabel.font.size"),je("fontColor","htc","hoverlabel.font.color"),je("fontWeight","htw","hoverlabel.font.weight"),je("fontStyle","hty","hoverlabel.font.style"),je("fontVariant","htv","hoverlabel.font.variant"),je("nameLength","hnl","hoverlabel.namelength"),je("textAlign","hta","hoverlabel.align"),j.posref=ee==="y"||ee==="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,ee==="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,ee==="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 ue(j,ee,te){var pe=te.container,we=te.fullLayout,Se=we._size,Re=te.event,Pe=!!ee.hLinePoint,je=!!ee.vLinePoint,at,nt;if(pe.selectAll(".spikeline").remove(),!!(je||Pe)){var tt=n.combine(we.plot_bgcolor,we.paper_bgcolor);if(Pe){var Ve=ee.hLinePoint,he,se;at=Ve&&Ve.xa,nt=Ve&&Ve.ya;var ne=nt.spikesnap;ne==="cursor"?(he=Re.pointerX,se=Re.pointerY):(he=at._offset+Ve.x,se=nt._offset+Ve.y);var Ce=_.readability(Ve.color,tt)<1.5?n.contrast(tt):Ve.color,Ze=nt.spikemode,rt=nt.spikethickness,Je=nt.spikecolor||Ce,St=h.getPxPosition(j,nt),kt,Bt;if(Ze.indexOf("toaxis")!==-1||Ze.indexOf("across")!==-1){if(Ze.indexOf("toaxis")!==-1&&(kt=St,Bt=he),Ze.indexOf("across")!==-1){var Vt=nt._counterDomainMin,Ar=nt._counterDomainMax;nt.anchor==="free"&&(Vt=Math.min(Vt,nt.position),Ar=Math.max(Ar,nt.position)),kt=Se.l+Vt*Se.w,Bt=Se.l+Ar*Se.w}pe.insert("line",":first-child").attr({x1:kt,x2:Bt,y1:se,y2:se,"stroke-width":rt,stroke:Je,"stroke-dasharray":i.dashStyle(nt.spikedash,rt)}).classed("spikeline",!0).classed("crisp",!0),pe.insert("line",":first-child").attr({x1:kt,x2:Bt,y1:se,y2:se,"stroke-width":rt+2,stroke:tt}).classed("spikeline",!0).classed("crisp",!0)}Ze.indexOf("marker")!==-1&&pe.insert("circle",":first-child").attr({cx:St+(nt.side!=="right"?rt:-rt),cy:se,r:rt,fill:Je}).classed("spikeline",!0)}if(je){var vr=ee.vLinePoint,qr,kr;at=vr&&vr.xa,nt=vr&&vr.ya;var Ur=at.spikesnap;Ur==="cursor"?(qr=Re.pointerX,kr=Re.pointerY):(qr=at._offset+vr.x,kr=nt._offset+vr.y);var _t=_.readability(vr.color,tt)<1.5?n.contrast(tt):vr.color,Fe=at.spikemode,Ye=at.spikethickness,Ae=at.spikecolor||_t,Le=h.getPxPosition(j,at),We,Ke;if(Fe.indexOf("toaxis")!==-1||Fe.indexOf("across")!==-1){if(Fe.indexOf("toaxis")!==-1&&(We=Le,Ke=kr),Fe.indexOf("across")!==-1){var st=at._counterDomainMin,ot=at._counterDomainMax;at.anchor==="free"&&(st=Math.min(st,at.position),ot=Math.max(ot,at.position)),We=Se.t+(1-ot)*Se.h,Ke=Se.t+(1-st)*Se.h}pe.insert("line",":first-child").attr({x1:qr,x2:qr,y1:We,y2:Ke,"stroke-width":Ye,stroke:Ae,"stroke-dasharray":i.dashStyle(at.spikedash,Ye)}).classed("spikeline",!0).classed("crisp",!0),pe.insert("line",":first-child").attr({x1:qr,x2:qr,y1:We,y2:Ke,"stroke-width":Ye+2,stroke:tt}).classed("spikeline",!0).classed("crisp",!0)}Fe.indexOf("marker")!==-1&&pe.insert("circle",":first-child").attr({cx:qr,cy:Le-(at.side!=="top"?Ye:-Ye),r:Ye,fill:Ae}).classed("spikeline",!0)}}}function ce(j,ee,te){if(!te||te.length!==j._hoverdata.length)return!0;for(var pe=te.length-1;pe>=0;pe--){var we=te[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,ee){return!ee||ee.vLinePoint!==j._spikepoints.vLinePoint||ee.hLinePoint!==j._spikepoints.hLinePoint}function Y(j,ee){return o.plainText(j||"",{len:ee,allowedTags:["br","sub","sup","b","i","em","s","u"]})}function X(j,ee){for(var te=ee.charAt(0),pe=[],we=[],Se=[],Re=0;Rej.offsetTop+j.clientTop,le=j=>j.offsetLeft+j.clientLeft;function ae(j,ee){var te=j._fullLayout,pe=ee.getBoundingClientRect(),we=pe.left,Se=pe.top,Re=we+pe.width,Pe=Se+pe.height,je=S.apply3DTransform(te._invTransform)(we,Se),at=S.apply3DTransform(te._invTransform)(Re,Pe),nt=je[0],tt=je[1],Ve=at[0],he=at[1];return{x:nt,y:tt,width:Ve-nt,height:he-tt,top:Math.min(tt,he),left:Math.min(nt,Ve),right:Math.max(nt,Ve),bottom:Math.max(tt,he)}}}}),k_=He({"src/components/fx/hoverlabel_defaults.js"(Z,q){"use strict";var v=sa(),_=$n(),S=$p().isUnifiedHover;q.exports=function(e,t,r,o){o=o||{};var a=t.legend;function i(n){o.font[n]||(o.font[n]=a?t.legend.font[n]:t.font[n])}t&&S(t.hovermode)&&(o.font||(o.font={}),i("size"),i("family"),i("color"),i("weight"),i("style"),i("variant"),a?(o.bgcolor||(o.bgcolor=_.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),v.coerceFont(r,"hoverlabel.font",o.font),r("hoverlabel.align",o.align)}}}),mz=He({"src/components/fx/layout_global_defaults.js"(Z,q){"use strict";var v=sa(),_=k_(),S=Ym();q.exports=function(e,t){function r(o,a){return v.coerce(e,t,S,o,a)}_(e,t,r)}}}),gz=He({"src/components/fx/defaults.js"(Z,q){"use strict";var v=sa(),_=Ky(),S=k_();q.exports=function(e,t,r,o){function a(n,s){return v.coerce(e,t,_,n,s)}var i=v.extendFlat({},o.hoverlabel);t.hovertemplate&&(i.namelength=-1),S(e,t,a,i)}}}),x5=He({"src/components/fx/hovermode_defaults.js"(Z,q){"use strict";var v=sa(),_=Ym();q.exports=function(M,e){function t(r,o){return e[r]!==void 0?e[r]:v.coerce(M,e,_,r,o)}return t("clickmode"),t("hoversubplots"),t("hoveranywhere"),t("clickanywhere"),t("hovermode")}}}),yz=He({"src/components/fx/layout_defaults.js"(Z,q){"use strict";var v=sa(),_=Ym(),S=x5(),M=k_();q.exports=function(t,r){function o(m,c){return v.coerce(t,r,_,m,c)}var a=S(t,r);a&&(o("hoverdistance"),o("spikedistance"),a.indexOf("unified")!==-1&&o("hoversort"));var i=o("dragmode");i==="select"&&o("selectdirection");var n=r._has("mapbox"),s=r._has("map"),h=r._has("geo"),f=r._basePlotModules.length;r.dragmode==="zoom"&&((n||s||h)&&f===1||(n||s)&&h&&f===2)&&(r.dragmode="pan"),M(t,r,o),v.coerceFont(o,"hoverlabel.grouptitlefont",r.hoverlabel.font)}}}),_z=He({"src/components/fx/calc.js"(Z,q){"use strict";var v=sa(),_=so();q.exports=function(e){var t=e.calcdata,r=e._fullLayout;function o(h){return function(f){return v.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,q){"use strict";var v=32;q.exports={CIRCLE_SIDES:v,i000:0,i090:v/4,i180:v/2,i270:v/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,q){"use strict";var v=sa().strTranslate;function _(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 M(t){var r=t._id.charAt(0)==="y"?1:0;return function(o){return _(t,o[r])}}function e(t){return v(t.xaxis._offset,t.yaxis._offset)}q.exports={p2r:_,r2p:S,axValue:M,getTransform:e}}}),a0=He({"src/components/shapes/draw_newshape/helpers.js"(Z){"use strict";var q=M_(),v=T2(),_=v.CIRCLE_SIDES,S=v.SQRT2,M=A2(),e=M.p2r,t=M.r2p,r=[0,3,4,5,6,1,2],o=[0,3,4,1,2];Z.writePaths=function(n){var s=n.length;if(!s)return"M0,0Z";for(var h="",f=0;f0&&x{let s=n.charAt(0),h=a[s].drawn!==void 0;return i+(h?1:0)},0)},Z.getDataToPixel=function(e,t,r,o,a){var i=e._fullLayout._size,n;if(t)if(a==="domain")n=function(h){return t._length*(o?1-h:h)+t._offset};else{var s=Z.shapePositionToRange(t);n=function(h){var f=M(t,r);return t._offset+t.r2p(s(h,!0))+f},t.type==="date"&&(n=Z.decodeDate(n))}else o?n=function(h){return i.t+i.h*(1-h)}:n=function(h){return i.l+i.w*h};return n},Z.getPixelToData=function(e,t,r,o){var a=e._fullLayout._size,i;if(t)if(o==="domain")i=function(s){var h=(s-t._offset)/t._length;return r?1-h:h};else{var n=Z.rangeToShapePosition(t);i=function(s){return n(t.p2r(s-t._offset))}}else r?i=function(s){return 1-(s-a.t)/a.h}:i=function(s){return(s-a.l)/a.w};return i},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=_.getRefType(t.xref),a=_.getRefType(t.yref),i=e._fullLayout._size;var n,s,h,f,m,c,T,l,x,w,A,E;function p(z,F,N,O){var L;if(z)if(F==="domain")O?L=function(U){return z._offset+z._length*(1-U)}:L=function(U){return z._offset+z._length*U};else{let U=Z.shapePositionToRange(z);L=function(B){return z._offset+z.r2p(U(B,!0))},N==="path"&&z.type==="date"&&(L=Z.decodeDate(L))}else O?L=function(U){return i.t+i.h*(1-U)}:L=function(U){return i.l+i.w*U};return L}if(o==="array"?(T=[],n=t.xref.map(function(z){return _.getFromId(e,z)}),T=t.xref.map(function(z,F){return p(n[F],_.getRefType(z),r,!1)})):(n=_.getFromId(e,t.xref),T=p(n,o,r,!1)),a==="array"?(l=[],s=t.yref.map(function(z){return _.getFromId(e,z)}),l=t.yref.map(function(z,F){return p(s[F],_.getRefType(z),r,!0)})):(s=_.getFromId(e,t.yref),l=p(s,a,r,!0)),r==="path")return S(t,T,l);if(o==="array")h=M(n[0],t.x0shift),f=M(n[1],t.x1shift),x=T[0](t.x0)+h,w=T[1](t.x1)+f;else if(h=M(n,t.x0shift),f=M(n,t.x1shift),t.xsizemode==="pixel"){let z=T(t.xanchor);x=z+t.x0+h,w=z+t.x1+f}else x=T(t.x0)+h,w=T(t.x1)+f;if(a==="array")m=M(s[0],t.y0shift),c=M(s[1],t.y1shift),A=l[0](t.y0)+m,E=l[1](t.y1)+c;else if(m=M(s,t.y0shift),c=M(s,t.y1shift),t.ysizemode==="pixel"){let z=l(t.yanchor);A=z-t.y0+m,E=z-t.y1+c}else A=l(t.y0)+m,E=l(t.y1)+c;if(r==="line")return"M"+x+","+A+"L"+w+","+E;if(r==="rect")return"M"+x+","+A+"H"+w+"V"+E+"H"+x+"Z";var b=(x+w)/2,d=(A+E)/2,u=Math.abs(b-x),g=Math.abs(d-A),y="A"+u+","+g,D=b+u+","+d,P=b+","+(d-g);return"M"+D+y+" 0 1,1 "+P+y+" 0 0,1 "+D+"Z"};function S(e,t,r){let o=e.path,a=e.xsizemode,i=e.ysizemode,n=e.xanchor,s=e.yanchor,h=Array.isArray(e.xref),f=Array.isArray(e.yref);var m=0,c=0;return o.replace(q.segmentRE,function(T){var l=0,x=T.charAt(0),w=q.paramIsX[x],A=q.paramIsY[x],E=q.numParams[x];let p=w.drawn!==void 0,b=A.drawn!==void 0,d=h?t[m]:t,u=f?r[c]:r;var g=T.slice(1).replace(q.paramRE,function(y){return w[l]?a==="pixel"?y=d(n)+Number(y):y=d(y):A[l]&&(i==="pixel"?y=u(s)-Number(y):y=u(y)),l++,l>E&&(y="X"),y});return l>E&&(g=g.replace(/[\s,]*X.*/,""),v.log("Ignoring extra params in segment "+T)),p&&m++,b&&c++,x+g})}Z.getPixelShift=M;function M(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,q){"use strict";var v=sa(),_=Wo(),S=su(),M=as(),e=a0().readPaths,t=i0(),r=t.getPathString,o=v2(),a=uh().FROM_TL;q.exports=function(h,f,m,c){if(c.selectAll(".shape-label").remove(),!!(m.label.text||m.label.texttemplate)){var T;if(m.label.texttemplate){var l={};if(m.type!=="path"){var x=_.getFromId(h,m.xref),w=_.getFromId(h,m.yref);let j=Array.isArray(m.xref),ee=Array.isArray(m.yref);for(var A in o){var E=typeof o[A]=="function",p=!j||o.simpleXVariables.includes(A),b=!ee||o.simpleYVariables.includes(A);if(E&&p&&b){var d=o[A](m,x,w);d!==void 0&&(l[A]=d)}}}T=v.texttemplateStringForShapes({data:[l],fallback:m.label.texttemplatefallback,locale:h._fullLayout._d3locale,template:m.label.texttemplate})}else T=m.label.text;var u={"data-index":f},g=m.label.font,y={"data-notex":1},D=c.append("g").attr(u).classed("shape-label",!0),P=D.append("text").attr(y).classed("shape-label-text",!0).text(T),z,F,N,O;if(m.path){var L=r(h,m),U=e(L,h);z=1/0,N=1/0,F=-1/0,O=-1/0;for(var B=0;Bt.getDataToPixel(h,se,he,!1,ne)(Ve),tt=(Ve,he,se,ne)=>t.getDataToPixel(h,se,he,!0,ne)(Ve);if(m.xsizemode==="pixel"){let Ve=nt(m.xanchor,void 0,te,Re),he=t.getPixelShift(te,m.x0shift),se=t.getPixelShift(te,m.x1shift);z=Ve+m.x0+he,F=Ve+m.x1+se}else z=nt(m.x0,m.x0shift,te,Re),F=nt(m.x1,m.x1shift,pe,Pe);if(m.ysizemode==="pixel"){let Ve=tt(m.yanchor,void 0,we,je),he=t.getPixelShift(we,m.y0shift),se=t.getPixelShift(we,m.y1shift);N=Ve-m.y0+he,O=Ve-m.y1+se}else N=tt(m.y0,m.y0shift,we,je),O=tt(m.y1,m.y1shift,Se,at)}var Y=m.label.textangle;Y==="auto"&&(m.type==="line"?Y=i(z,N,F,O):Y=0),P.call(function(j){return j.call(M.font,g).attr({}),S.convertToTspans(j,h),j});var X=M.bBox(P.node()),Q=n(z,N,F,O,m,Y,X),V=Q.textx,le=Q.texty,ae=Q.xanchor;P.attr({"text-anchor":{left:"start",center:"middle",right:"end"}[ae],y:le,x:V,transform:"rotate("+Y+","+V+","+le+")"}).call(S.positionText,V,le)}};function i(s,h,f,m){var c,T;return T=Math.abs(f-s),f>=s?c=h-m:c=m-h,-180/Math.PI*Math.atan2(c,T)}function n(s,h,f,m,c,T,l){var x=c.label.textposition,w=c.label.textangle,A=c.label.padding,E=c.type,p=Math.PI/180*T,b=Math.sin(p),d=Math.cos(p),u=c.label.xanchor,g=c.label.yanchor,y,D,P,z;if(E==="line"){x==="start"?(y=s,D=h):x==="end"?(y=f,D=m):(y=(s+f)/2,D=(h+m)/2),u==="auto"&&(x==="start"?w==="auto"?f>s?u="left":fs?u="right":fs?u="right":fs?u="left":f1&&!(tt.length===2&&tt[1][0]==="Z")&&(Y===0&&(tt[0][0]="M"),y[de]=tt,N(),O())}}function pe(tt,Ve){if(tt===2){de=+Ve.srcElement.getAttribute("data-i"),Y=+Ve.srcElement.getAttribute("data-j");var he=y[de];!T(he)&&!l(he)&&te()}}function we(tt){ue=[];for(var Ve=0;Ve{if(!P._dragging&&P._fullLayout.hoveranywhere){let U=O(L);U&&h.hover(P,U,F.id)}}),N.addEventListener("click",L=>{if(!P._dragged&&P._fullLayout.clickanywhere){let U=O(L);U&&h.click(P,U,F.id)}})}function p(P,z,F){let N=F.xref,O=F.yref;if(Array.isArray(N)||Array.isArray(O)){let L="clip"+z._fullLayout._uid+"shape"+F._index,U=b(z,N,O);S.ensureSingleById(z._fullLayout._clips,"clipPath",L,function(B){B.append("rect")}).select("rect").attr(U),i.setClipUrl(P,L,z)}else{let L=(N+O).replace(/paper/g,"").replace(/[xyz][0-9]* *domain/g,"");i.setClipUrl(P,L?"clip"+z._fullLayout._uid+L:null,z)}}function b(P,z,F){let N=P._fullLayout._size;function O(B,W){let $=(Array.isArray(B)?B:[B]).map(de=>M.getFromId(P,de)).filter(Boolean);if(!$.length)return W?[N.t,N.t+N.h]:[N.l,N.l+N.w];let ue=$.map(function(de){return de._offset}),ce=$.map(function(de){return de._offset+de._length});return[Math.min(...ue),Math.max(...ce)]}let L=O(z,!1),U=O(F,!0);return{x:L[0],y:U[0],width:L[1]-L[0],height:U[1]-U[0]}}function d(P,z,F,N,O,L){var U=10,B=10,W=F.xsizemode==="pixel",$=F.ysizemode==="pixel",ue=F.type==="line",ce=F.type==="path",de=L.modifyItem,Y,X,Q,V,le,ae,j,ee,te,pe,we,Se,Re,Pe,je,at=v.select(z.node().parentNode),nt=M.getFromId(P,F.xref),tt=M.getRefType(F.xref),Ve=M.getFromId(P,F.yref),he=M.getRefType(F.yref),se=F.x0shift,ne=F.x1shift,Ce=F.y0shift,Ze=F.y1shift,rt=function(st,ot){var Ut=c.getDataToPixel(P,nt,ot,!1,tt);return Ut(st)},Je=function(st,ot){var Ut=c.getDataToPixel(P,Ve,ot,!0,he);return Ut(st)},St=c.getPixelToData(P,nt,!1,tt),kt=c.getPixelToData(P,Ve,!0,he),Bt=vr(),Vt={element:Bt.node(),gd:P,prepFn:Ur,doneFn:_t,clickFn:Fe},Ar;s.init(Vt),Bt.node().onmousemove=kr;function vr(){return ue?qr():z}function qr(){var st=10,ot=Math.max(F.line.width,st),Ut=O.append("g").attr("data-index",N).attr("drag-helper",!0);Ut.append("path").attr("d",z.attr("d")).style({cursor:"move","stroke-width":ot,"stroke-opacity":"0"});var Ct={"fill-opacity":"0"},Pt=Math.max(ot/2,st);return Ut.append("circle").attr({"data-line-point":"start-point",cx:W?rt(F.xanchor)+F.x0:rt(F.x0,se),cy:$?Je(F.yanchor)-F.y0:Je(F.y0,Ce),r:Pt}).style(Ct).classed("cursor-grab",!0),Ut.append("circle").attr({"data-line-point":"end-point",cx:W?rt(F.xanchor)+F.x1:rt(F.x1,ne),cy:$?Je(F.yanchor)-F.y1:Je(F.y1,Ze),r:Pt}).style(Ct).classed("cursor-grab",!0),Ut}function kr(st){if(x(P)){Ar=null;return}if(ue)st.target.tagName==="path"?Ar="move":Ar=st.target.attributes["data-line-point"].value==="start-point"?"resize-over-start-point":"resize-over-end-point";else{var ot=Vt.element.getBoundingClientRect(),Ut=ot.right-ot.left,Ct=ot.bottom-ot.top,Pt=st.clientX-ot.left,jt=st.clientY-ot.top,cr=!ce&&Ut>U&&Ct>B&&!st.shiftKey?s.getCursor(Pt/Ut,1-jt/Ct):"move";f(z,cr),Ar=cr.split("-")[0]}}function Ur(st){x(P)||(W&&(le=rt(F.xanchor)),$&&(ae=Je(F.yanchor)),F.type==="path"?je=F.path:(Y=W?F.x0:rt(F.x0),X=$?F.y0:Je(F.y0),Q=W?F.x1:rt(F.x1),V=$?F.y1:Je(F.y1)),YV?(j=X,we="y0",ee=V,Se="y1"):(j=V,we="y1",ee=X,Se="y0"),kr(st),Le(O,F),Ke(z,F,P),Vt.moveFn=Ar==="move"?Ye:Ae,Vt.altKey=st.altKey)}function _t(){x(P)||(f(z),We(O),p(z,P,F),_.call("_guiRelayout",P,L.getUpdateObj()))}function Fe(){x(P)||We(O)}function Ye(st,ot){if(F.type==="path"){var Ut=function(jt){return jt},Ct=Ut,Pt=Ut;W?de("xanchor",F.xanchor=St(le+st)):(Ct=function(cr){return St(rt(cr)+st)},nt&&nt.type==="date"&&(Ct=c.encodeDate(Ct))),$?de("yanchor",F.yanchor=kt(ae+ot)):(Pt=function(cr){return kt(Je(cr)+ot)},Ve&&Ve.type==="date"&&(Pt=c.encodeDate(Pt))),de("path",F.path=u(je,Ct,Pt))}else W?de("xanchor",F.xanchor=St(le+st)):(de("x0",F.x0=St(Y+st)),de("x1",F.x1=St(Q+st))),$?de("yanchor",F.yanchor=kt(ae+ot)):(de("y0",F.y0=kt(X+ot)),de("y1",F.y1=kt(V+ot)));z.attr("d",T(P,F)),Le(O,F),r(P,N,F,at)}function Ae(st,ot){if(ce){var Ut=function(Yt){return Yt},Ct=Ut,Pt=Ut;W?de("xanchor",F.xanchor=St(le+st)):(Ct=function(Rt){return St(rt(Rt)+st)},nt&&nt.type==="date"&&(Ct=c.encodeDate(Ct))),$?de("yanchor",F.yanchor=kt(ae+ot)):(Pt=function(Rt){return kt(Je(Rt)+ot)},Ve&&Ve.type==="date"&&(Pt=c.encodeDate(Pt))),de("path",F.path=u(je,Ct,Pt))}else if(ue){if(Ar==="resize-over-start-point"){var jt=Y+st,cr=$?X-ot:X+ot;de("x0",F.x0=W?jt:St(jt)),de("y0",F.y0=$?cr:kt(cr))}else if(Ar==="resize-over-end-point"){var or=Q+st,nr=$?V-ot:V+ot;de("x1",F.x1=W?or:St(or)),de("y1",F.y1=$?nr:kt(nr))}}else{var Pr=function(Yt){return Ar.indexOf(Yt)!==-1},_a=Pr("n"),Fa=Pr("s"),Ra=Pr("w"),qa=Pr("e"),Wa=_a?j+ot:j,Ca=Fa?ee+ot:ee,hi=Ra?te+st:te,wi=qa?pe+st:pe;$&&(_a&&(Wa=j-ot),Fa&&(Ca=ee-ot)),(!$&&Ca-Wa>B||$&&Wa-Ca>B)&&(de(we,F[we]=$?Wa:kt(Wa)),de(Se,F[Se]=$?Ca:kt(Ca))),wi-hi>U&&(de(Re,F[Re]=W?hi:St(hi)),de(Pe,F[Pe]=W?wi:St(wi)))}z.attr("d",T(P,F)),Le(O,F),r(P,N,F,at)}function Le(st,ot){(W||$)&&Ut();function Ut(){var Ct=ot.type!=="path",Pt=st.selectAll(".visual-cue").data([0]),jt=1;Pt.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":jt}).classed("visual-cue",!0);var cr=rt(W?ot.xanchor:S.midRange(Ct?[ot.x0,ot.x1]:c.extractPathCoords(ot.path,m.paramIsX))),or=Je($?ot.yanchor:S.midRange(Ct?[ot.y0,ot.y1]:c.extractPathCoords(ot.path,m.paramIsY)));if(cr=c.roundPositionForSharpStrokeRendering(cr,jt),or=c.roundPositionForSharpStrokeRendering(or,jt),W&&$){var nr="M"+(cr-1-jt)+","+(or-1-jt)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";Pt.attr("d",nr)}else if(W){var Pr="M"+(cr-1-jt)+","+(or-9-jt)+"v18 h2 v-18 Z";Pt.attr("d",Pr)}else{var _a="M"+(cr-9-jt)+","+(or-1-jt)+"h18 v2 h-18 Z";Pt.attr("d",_a)}}}function We(st){st.selectAll(".visual-cue").remove()}function Ke(st,ot,Ut){var Ct=ot.xref,Pt=ot.yref,jt=M.getFromId(Ut,Ct),cr=M.getFromId(Ut,Pt),or="";Ct!=="paper"&&!jt.autorange&&(or+=Ct),Pt!=="paper"&&!cr.autorange&&(or+=Pt),i.setClipUrl(st,or?"clip"+Ut._fullLayout._uid+or:null,Ut)}}function u(P,z,F){return P.replace(m.segmentRE,function(N){var O=0,L=N.charAt(0),U=m.paramIsX[L],B=m.paramIsY[L],W=m.numParams[L],$=N.slice(1).replace(m.paramRE,function(ue){return O>=W||(U[O]?ue=z(ue):B[O]&&(ue=F(ue)),O++),ue});return L+$})}function g(P,z){if(w(P)){var F=z.node(),N=+F.getAttribute("data-index");if(N>=0){if(N===P._fullLayout._activeShapeIndex){y(P);return}P._fullLayout._activeShapeIndex=N,P._fullLayout._deactivateShape=y,l(P)}}}function y(P){if(w(P)){var z=P._fullLayout._activeShapeIndex;z>=0&&(o(P),delete P._fullLayout._activeShapeIndex,l(P))}}function D(P){if(w(P)){o(P);var z=P._fullLayout._activeShapeIndex,F=(P.layout||{}).shapes||[];if(z1?(ce=["toggleHover"],de=["resetViews"]):u?(ue=["zoomInGeo","zoomOutGeo"],ce=["hoverClosestGeo"],de=["resetGeo"]):d?(ce=["hoverClosest3d"],de=["resetCameraDefault3d","resetCameraLastSave3d"]):P?(ue=["zoomInMapbox","zoomOutMapbox"],ce=["toggleHover"],de=["resetViewMapbox"]):z?(ue=["zoomInMap","zoomOutMap"],ce=["toggleHover"],de=["resetViewMap"]):g?ce=["hoverClosestPie"]:O?(ce=["hoverClosestCartesian","hoverCompareCartesian"],de=["resetViewSankey"]):ce=["toggleHover"],b&&ce.push("toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"),(s(T)||U)&&(ce=[]),b&&!L&&(ue=["zoomIn2d","zoomOut2d","autoScale2d"],de[0]!=="resetViews"&&(de=["resetScale2d"])),d?Y=["zoom3d","pan3d","orbitRotation","tableRotation"]:b&&!L||D?Y=["zoom2d","pan2d"]:P||z||u?Y=["pan2d"]:F&&(Y=["zoom2d"]),n(T)&&Y.push("select2d","lasso2d");var X=[],Q=function(j){X.indexOf(j)===-1&&ce.indexOf(j)!==-1&&X.push(j)};if(Array.isArray(E)){for(var V=[],le=0;lew?T.slice(w):l.slice(x))+A}function h(m,c){for(var T=c._size,l=T.h/T.w,x={},w=Object.keys(m),A=0;At*D&&!N)){for(w=0;wY&&tece&&(ce=te);var we=(ce-ue)/(2*de);u/=we,ue=p.l2r(ue),ce=p.l2r(ce),p.range=p._input.range=B=O[1]||W[1]<=O[0])&&$[0]L[0])return!0}return!1}function A(O){var L=O._fullLayout,U=L._size,B=U.p,W=i.list(O,"",!0),$,ue,ce,de,Y,X;if(L._paperdiv.style({width:O._context.responsive&&L.autosize&&!O._context._hasZeroWidth&&!O.layout.width?"100%":L.width+"px",height:O._context.responsive&&L.autosize&&!O._context._hasZeroHeight&&!O.layout.height?"100%":L.height+"px"}).selectAll(".main-svg").call(r.setSize,L.width,L.height),O._context.setBackground(O,L.paper_bgcolor),Z.drawMainTitle(O),a.manage(O),!L._has("cartesian"))return _.previousPromises(O);function Q(Ae,Le,We){var Ke=Ae._lw/2;if(Ae._id.charAt(0)==="x"){if(Le){if(We==="top")return Le._offset-B-Ke}else return U.t+U.h*(1-(Ae.position||0))+Ke%1;return Le._offset+Le._length+B+Ke}if(Le){if(We==="right")return Le._offset+Le._length+B+Ke}else return U.l+U.w*(Ae.position||0)+Ke%1;return Le._offset-B-Ke}for($=0;$0){y(O,$,Y,de),ce.attr({x:ue,y:$,"text-anchor":B,dy:z(L.yanchor)}).call(M.positionText,ue,$);var X=(L.text.match(M.BR_TAG_ALL)||[]).length;if(X){var Q=n.LINE_SPACING*X+n.MID_SHIFT;L.y===0&&(Q=-Q),ce.selectAll(".line").each(function(){var ee=+this.getAttribute("dy").slice(0,-2)-Q+"em";this.setAttribute("dy",ee)})}var V=q.select(O).selectAll(".gtitle-subtitle");if(V.node()){var le=ce.node().getBBox(),ae=le.y+le.height,j=ae+o.SUBTITLE_PADDING_EM*L.subtitle.font.size;V.attr({x:ue,y:j,"text-anchor":B,dy:z(L.yanchor)}).call(M.positionText,ue,j)}}}};function d(O,L,U,B,W){var $=L.yref==="paper"?O._fullLayout._size.h:O._fullLayout.height,ue=S.isTopAnchor(L)?B:B-W,ce=U==="b"?$-ue:ue;return S.isTopAnchor(L)&&U==="t"||S.isBottomAnchor(L)&&U==="b"?!1:ce.5?"t":"b",ue=O._fullLayout.margin[$],ce=0;return L.yref==="paper"?ce=U+L.pad.t+L.pad.b:L.yref==="container"&&(ce=u($,B,W,O._fullLayout.height,U)+L.pad.t+L.pad.b),ce>ue?ce:0}function y(O,L,U,B){var W="title.automargin",$=O._fullLayout.title,ue=$.y>.5?"t":"b",ce={x:$.x,y:$.y,t:0,b:0},de={};$.yref==="paper"&&d(O,$,ue,L,B)?ce[ue]=U:$.yref==="container"&&(de[ue]=U,O._fullLayout._reservedMargin[W]=de),_.allowAutoMargin(O,W),_.autoMargin(O,W,ce)}function D(O,L){var U=O.title,B=O._size,W=0;switch(L===c?W=U.pad.l:L===l&&(W=-U.pad.r),U.xref){case"paper":return B.l+B.w*U.x+W;case"container":default:return O.width*U.x+W}}function P(O,L){var U=O.title,B=O._size,W=0;if(L==="0em"||!L?W=-U.pad.b:L===n.CAP_SHIFT+"em"&&(W=U.pad.t),U.y==="auto")return B.t/2;switch(U.yref){case"paper":return B.t+B.h-B.h*U.y+W;case"container":default:return O.height-O.height*U.y+W}}function z(O){return O==="top"?n.CAP_SHIFT+.3+"em":O==="bottom"?"-0.3em":n.MID_SHIFT+"em"}function F(O){var L=O.title,U=T;return S.isRightAnchor(L)?U=l:S.isLeftAnchor(L)&&(U=c),U}function N(O){var L=O.title,U="0em";return S.isTopAnchor(L)?U=n.CAP_SHIFT+"em":S.isMiddleAnchor(L)&&(U=n.MID_SHIFT+"em"),U}Z.doTraceStyle=function(O){var L=O.calcdata,U=[],B;for(B=0;B=0;F--){var N=E.append("path").attr(b).style("opacity",F?.1:d).call(M.stroke,g).call(M.fill,u).call(e.dashLine,F?"solid":D,F?4+y:y);if(s(N,c,x),P){var O=t(c.layout,"selections",x);N.style({cursor:"move"});var L={element:N.node(),plotinfo:w,gd:c,editHelpers:O,isActiveSelection:!0},U=v(p,c);_(U,N,L)}else N.style("pointer-events",F?"all":"none");z[F]=N}var B=z[0],W=z[1];W.node().addEventListener("click",function(){return h(c,B)})}}function s(c,T,l){var x=l.xref+l.yref;e.setClipUrl(c,"clip"+T._fullLayout._uid+x,T)}function h(c,T){if(i(c)){var l=T.node(),x=+l.getAttribute("data-index");if(x>=0){if(x===c._fullLayout._activeSelectionIndex){m(c);return}c._fullLayout._activeSelectionIndex=x,c._fullLayout._deactivateSelection=m,a(c)}}}function f(c){if(i(c)){var T=c._fullLayout.selections.length-1;c._fullLayout._activeSelectionIndex=T,c._fullLayout._deactivateSelection=m,a(c)}}function m(c){if(i(c)){var T=c._fullLayout._activeSelectionIndex;T>=0&&(S(c),delete c._fullLayout._activeSelectionIndex,a(c))}}}}),Sz=He({"node_modules/polybooljs/lib/build-log.js"(Z,q){function v(){var _,S=0,M=!1;function e(t,r){return _.list.push({type:t,data:r?JSON.parse(JSON.stringify(r)):void 0}),_}return _={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===M?_:(M=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")}},_}q.exports=v}}),Mz=He({"node_modules/polybooljs/lib/epsilon.js"(Z,q){function v(_){typeof _!="number"&&(_=1e-10);var S={epsilon:function(M){return typeof M=="number"&&(_=M),_},pointAboveOrOnLine:function(M,e,t){var r=e[0],o=e[1],a=t[0],i=t[1],n=M[0],s=M[1];return(a-r)*(s-o)-(i-o)*(n-r)>=-_},pointBetween:function(M,e,t){var r=M[1]-e[1],o=t[0]-e[0],a=M[0]-e[0],i=t[1]-e[1],n=a*o+r*i;if(n<_)return!1;var s=o*o+i*i;return!(n-s>-_)},pointsSameX:function(M,e){return Math.abs(M[0]-e[0])<_},pointsSameY:function(M,e){return Math.abs(M[1]-e[1])<_},pointsSame:function(M,e){return S.pointsSameX(M,e)&&S.pointsSameY(M,e)},pointsCompare:function(M,e){return S.pointsSameX(M,e)?S.pointsSameY(M,e)?0:M[1]_!=a-r>_&&(o-s)*(r-h)/(a-h)+s-t>_&&(i=!i),o=s,a=h}return i}};return S}q.exports=v}}),Ez=He({"node_modules/polybooljs/lib/linked-list.js"(Z,q){var v={create:function(){var _={root:{root:!0,next:null},exists:function(S){return!(S===null||S===_.root)},isEmpty:function(){return _.root.next===null},getHead:function(){return _.root.next},insertBefore:function(S,M){for(var e=_.root,t=_.root.next;t!==null;){if(M(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 M=_.root,e=_.root.next;e!==null&&!S(e);)M=e,e=e.next;return{before:M===_.root?null:M,after:e,insert:function(t){return t.prev=M,t.next=e,M.next=t,e!==null&&(e.prev=t),t}}}};return _},node:function(_){return _.prev=null,_.next=null,_.remove=function(){_.prev.next=_.next,_.next&&(_.next.prev=_.prev),_.prev=null,_.next=null},_}};q.exports=v}}),kz=He({"node_modules/polybooljs/lib/intersecter.js"(Z,q){var v=Ez();function _(S,M,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,x){return{id:e?e.segmentId():-1,start:T,end:l,myFill:{above:x.myFill.above,below:x.myFill.below},otherFill:null}}var o=v.create();function a(T,l,x,w,A,E){var p=M.pointsCompare(l,A);return p!==0?p:M.pointsSame(x,E)?0:T!==w?T?1:-1:M.pointAboveOrOnLine(x,w?A:E,w?E:A)?1:-1}function i(T,l){o.insertBefore(T,function(x){var w=a(T.isStart,T.pt,l,x.isStart,x.pt,x.other.pt);return w<0})}function n(T,l){var x=v.node({isStart:!0,pt:T.start,seg:T,primary:l,other:null,status:null});return i(x,T.end),x}function s(T,l,x){var w=v.node({isStart:!1,pt:l.end,seg:l,primary:x,other:T,status:null});T.other=w,i(w,T.pt)}function h(T,l){var x=n(T,l);return s(x,T,l),x}function f(T,l){e&&e.segmentChop(T.seg,l),T.other.remove(),T.seg.end=l,T.other.pt=l,i(T.other,T.pt)}function m(T,l){var x=r(l,T.seg.end,T.seg);return f(T,l),h(x,T.primary)}function c(T,l){var x=v.create();function w(O,L){var U=O.seg.start,B=O.seg.end,W=L.seg.start,$=L.seg.end;return M.pointsCollinear(U,W,$)?M.pointsCollinear(B,W,$)||M.pointAboveOrOnLine(B,W,$)?1:-1:M.pointAboveOrOnLine(U,W,$)?1:-1}function A(O){return x.findTransition(function(L){var U=w(O,L.ev);return U>0})}function E(O,L){var U=O.seg,B=L.seg,W=U.start,$=U.end,ue=B.start,ce=B.end;e&&e.checkIntersection(U,B);var de=M.linesIntersect(W,$,ue,ce);if(de===!1){if(!M.pointsCollinear(W,$,ue)||M.pointsSame(W,ce)||M.pointsSame($,ue))return!1;var Y=M.pointsSame(W,ue),X=M.pointsSame($,ce);if(Y&&X)return L;var Q=!Y&&M.pointBetween(W,ue,ce),V=!X&&M.pointBetween($,ue,ce);if(Y)return V?m(L,$):m(O,ce),L;Q&&(X||(V?m(L,$):m(O,ce)),m(L,W))}else de.alongA===0&&(de.alongB===-1?m(O,ue):de.alongB===0?m(O,de.pt):de.alongB===1&&m(O,ce)),de.alongB===0&&(de.alongA===-1?m(L,W):de.alongA===0?m(L,de.pt):de.alongA===1&&m(L,$));return!1}for(var p=[];!o.isEmpty();){var b=o.getHead();if(e&&e.vert(b.pt[0]),b.isStart){let O=function(){if(g){var L=E(b,g);if(L)return L}return y?E(b,y):!1};var d=O;e&&e.segmentNew(b.seg,b.primary);var u=A(b),g=u.before?u.before.ev:null,y=u.after?u.after.ev:null;e&&e.tempStatus(b.seg,g?g.seg:!1,y?y.seg:!1);var D=O();if(D){if(S){var P;b.seg.myFill.below===null?P=!0:P=b.seg.myFill.above!==b.seg.myFill.below,P&&(D.seg.myFill.above=!D.seg.myFill.above)}else D.seg.otherFill=b.seg.myFill;e&&e.segmentUpdate(D.seg),b.other.remove(),b.remove()}if(o.getHead()!==b){e&&e.rewind(b.seg);continue}if(S){var P;b.seg.myFill.below===null?P=!0:P=b.seg.myFill.above!==b.seg.myFill.below,y?b.seg.myFill.below=y.seg.myFill.above:b.seg.myFill.below=T,P?b.seg.myFill.above=!b.seg.myFill.below:b.seg.myFill.above=b.seg.myFill.below}else if(b.seg.otherFill===null){var z;y?b.primary===y.primary?z=y.seg.otherFill.above:z=y.seg.myFill.above:z=b.primary?l:T,b.seg.otherFill={above:z,below:z}}e&&e.status(b.seg,g?g.seg:!1,y?y.seg:!1),b.other.status=u.insert(v.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(x.exists(F.prev)&&x.exists(F.next)&&E(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}p.push(b.seg)}o.getHead().remove()}return e&&e.done(),p}return S?{addRegion:function(T){for(var l,x=T[T.length-1],w=0;wr!=m>r&&t<(f-s)*(r-h)/(m-h)+s;c&&(o=!o)}return o}}}),I_=He({"src/lib/polygon.js"(Z,q){"use strict";var v=d2().dot,_=Gs().BADNUM,S=q.exports={};S.tester=function(e){var t=e.slice(),r=t[0][0],o=r,a=t[0][1],i=a,n;for((t[t.length-1][0]!==t[0][0]||t[t.length-1][1]!==t[0][1])&&t.push(t[0]),n=1;no||A===_||Ai||x&&h(l))}function m(l,x){var w=l[0],A=l[1];if(w===_||wo||A===_||Ai)return!1;var E=t.length,p=t[0][0],b=t[0][1],d=0,u,g,y,D,P;for(u=1;uMath.max(g,p)||A>Math.max(y,b)))if(An||Math.abs(v(m,h))>o)return!0;return!1},S.filter=function(e,t){var r=[e[0]],o=0,a=0;function i(s){e.push(s);var h=r.length,f=o;r.splice(a+1);for(var m=f+1;m1){var n=e.pop();i(n)}return{addPt:i,raw:e,filtered:r}}}}),Dz=He({"src/components/selections/constants.js"(Z,q){"use strict";q.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}}}),zz=He({"src/components/selections/select.js"(Z,q){"use strict";var v=Iz(),_=Rz(),S=so(),M=as().dashStyle,e=$n(),t=Hc(),r=$p().makeEventData,o=Jd(),a=o.freeMode,i=o.rectMode,n=o.drawMode,s=o.openMode,h=o.selectMode,f=i0(),m=L_(),c=M2(),T=Qm().clearOutline,l=a0(),x=l.handleEllipse,w=l.readPaths,A=S2().newShapes,E=b5(),p=k5().activateLastSelection,b=sa(),d=b.sorterAsc,u=I_(),g=y2(),y=tf().getFromId,D=C_(),P=P_().redrawReglTraces,z=Dz(),F=z.MINSELECT,N=u.filter,O=u.tester,L=A2(),U=L.p2r,B=L.axValue,W=L.getTransform;function $(Fe){return Fe.subplot!==void 0}function ue(Fe,Ye,Ae,Le,We){var Ke=!$(Le),st=a(We),ot=i(We),Ut=s(We),Ct=n(We),Pt=h(We),jt=We==="drawline",cr=We==="drawcircle",or=jt||cr,nr=Le.gd,Pr=nr._fullLayout,_a=Pt&&Pr.newselection.mode==="immediate"&&Ke,Fa=Pr._zoomlayer,Ra=Le.element.getBoundingClientRect(),qa=Le.plotinfo,Wa=W(qa),Ca=Ye-Ra.left,hi=Ae-Ra.top;Pr._calcInverseTransform(nr);var wi=b.apply3DTransform(Pr._invTransform)(Ca,hi);Ca=wi[0],hi=wi[1];var Yt=Pr._invScaleX,Rt=Pr._invScaleY,Zt=Ca,Jt=hi,Fr="M"+Ca+","+hi,ta=Le.xaxes[0],ra=Le.yaxes[0],ca=ta._length,Ba=ra._length,$a=Fe.altKey&&!(n(We)&&Ut),Za,ri,pi,Ia,rn,tn,cn;V(Fe,nr,Le),st&&(Za=N([[Ca,hi]],z.BENDPX));var xt=Fa.selectAll("path.select-outline-"+qa.id).data([1]),ut=Ct?Pr.newshape:Pr.newselection;Ct&&(Le.hasText=ut.label.text||ut.label.texttemplate);var Or=Ct&&!Ut?ut.fillcolor:"rgba(0,0,0,0)",Cr=ut.line.color||(Ke?e.contrast(nr._fullLayout.plot_bgcolor):"#7f7f7f");xt.enter().append("path").attr("class","select-outline select-outline-"+qa.id).style({opacity:Ct?ut.opacity/2:1,"stroke-dasharray":M(ut.line.dash,ut.line.width),"stroke-width":ut.line.width+"px","shape-rendering":"crispEdges"}).call(e.stroke,Cr).call(e.fill,Or).attr("fill-rule","evenodd").classed("cursor-move",!!Ct).attr("transform",Wa).attr("d",Fr+"Z");var wr=Fa.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=Fa.select(".label-temp");Rr.empty()&&(Rr=Fa.append("g").classed("label-temp",!0).classed("select-outline",!0).style({opacity:.8}))}var Nr=Pr._uid+z.SELECTID,Hr=[],gt=te(nr,Le.xaxes,Le.yaxes,Le.subplot);_a&&!Fe.shiftKey&&(Le._clearSubplotSelections=function(){if(Ke){var mr=ta._id,Ir=ra._id;rt(nr,mr,Ir,gt);for(var va=(nr.layout||{}).selections||[],Pa=[],ga=!1,la=0;la=0){nr._fullLayout._deactivateShape(nr);return}if(!Ct){var va=Pr.clickmode;g.done(Nr).then(function(){if(g.clear(Nr),mr===2){for(xt.remove(),rn=0;rn-1&&ce(Ir,nr,Le.xaxes,Le.yaxes,Le.subplot,Le,xt),va==="event"&&Ur(nr,void 0);t.click(nr,Ir,qa.id)}).catch(b.error)}},Le.doneFn=function(){wr.remove(),g.done(Nr).then(function(){g.clear(Nr),!_a&&Ia&&Le.selectionDefs&&(Ia.subtract=$a,Le.selectionDefs.push(Ia),Le.mergedPolygons.length=0,[].push.apply(Le.mergedPolygons,pi)),(_a||Ct)&&j(Le,_a),Le.doneFnCompleted&&Le.doneFnCompleted(Hr),Pt&&Ur(nr,cn)}).catch(b.error)}}function ce(Fe,Ye,Ae,Le,We,Ke,st){var ot=Ye._hoverdata,Ut=Ye._fullLayout,Ct=Ut.clickmode,Pt=Ct.indexOf("event")>-1,jt=[],cr,or,nr,Pr,_a,Fa,Ra,qa,Wa,Ca;if(we(ot)){V(Fe,Ye,Ke),cr=te(Ye,Ae,Le,We);var hi=Se(ot,cr),wi=hi.pointNumbers.length>0;if(wi?Pe(cr,hi):je(cr)&&(Ra=Re(hi))){for(st&&st.remove(),Ca=0;Ca=0}function ae(Fe){return Fe._fullLayout._activeSelectionIndex>=0}function j(Fe,Ye){var Ae=Fe.dragmode,Le=Fe.plotinfo,We=Fe.gd;le(We)&&We._fullLayout._deactivateShape(We),ae(We)&&We._fullLayout._deactivateSelection(We);var Ke=We._fullLayout,st=Ke._zoomlayer,ot=n(Ae),Ut=h(Ae);if(ot||Ut){var Ct=st.selectAll(".select-outline-"+Le.id);if(Ct&&We._fullLayout._outlining){var Pt;ot&&(Pt=A(Ct,Fe)),Pt&&S.call("_guiRelayout",We,{shapes:Pt});var jt;Ut&&!$(Fe)&&(jt=E(Ct,Fe)),jt&&(We._fullLayout._noEmitSelectedAtStart=!0,S.call("_guiRelayout",We,{selections:jt}).then(function(){Ye&&p(We)})),We._fullLayout._outlining=!1}}Le.selection={},Le.selection.selectionDefs=Fe.selectionDefs=[],Le.selection.mergedPolygons=Fe.mergedPolygons=[]}function ee(Fe){return Fe._id}function te(Fe,Ye,Ae,Le){if(!Fe.calcdata)return[];var We=[],Ke=Ye.map(ee),st=Ae.map(ee),ot,Ut,Ct;for(Ct=0;Ct0,Ke=We?Le[0]:Ae;return Ye.selectedpoints?Ye.selectedpoints.indexOf(Ke)>-1:!1}function Pe(Fe,Ye){var Ae=[],Le,We,Ke,st;for(st=0;st0&&Ae.push(Le);if(Ae.length===1&&(Ke=Ae[0]===Ye.searchInfo,Ke&&(We=Ye.searchInfo.cd[0].trace,We.selectedpoints.length===Ye.pointNumbers.length))){for(st=0;st1||(Ye+=Le.selectedpoints.length,Ye>1)))return!1;return Ye===1}function at(Fe,Ye,Ae){var Le;for(Le=0;Le-1&&Ye;if(!st&&Ye){var mr=St(Fe,!0);if(mr.length){var Ir=mr[0].xref,va=mr[0].yref;if(Ir&&va){var Pa=Vt(mr),ga=vr([y(Fe,Ir,"x"),y(Fe,va,"y")]);ga(Hr,Pa)}}Fe._fullLayout._noEmitSelectedAtStart?Fe._fullLayout._noEmitSelectedAtStart=!1:Kt&&Ur(Fe,Hr),cr._reselect=!1}if(!st&&cr._deselect){var la=cr._deselect;ot=la.xref,Ut=la.yref,Ze(ot,Ut,Pt)||rt(Fe,ot,Ut,Le),Kt&&(Hr.points.length?Ur(Fe,Hr):_t(Fe)),cr._deselect=!1}return{eventData:Hr,selectionTesters:Ae}}function Ce(Fe){var Ye=Fe.calcdata;if(Ye)for(var Ae=0;Ae=0){Or._fullLayout._deactivateShape(Or);return}var Cr=Or._fullLayout.clickmode;if(X(Or),xt===2&&!he&&ri(),Ve)Cr.indexOf("select")>-1&&d(ut,Or,rt,Je,we.id,Pt),Cr.indexOf("event")>-1&&n.click(Or,ut,we.id);else if(xt===1&&he){var wr=at?ne:se,Rr=at==="s"||nt==="w"?0:1,Nr=wr._name+".range["+Rr+"]",Hr=L(wr,Rr),gt="left",Kt="middle";if(wr.fixedrange)return;at?(Kt=at==="n"?"top":"bottom",wr.side==="right"&&(gt="right")):nt==="e"&&(gt="right"),Or._context.showAxisRangeEntryBoxes&&v.select(Ct).call(o.makeEditable,{gd:Or,immediate:!0,background:Or._fullLayout.paper_bgcolor,text:String(Hr),fill:wr.tickfont?wr.tickfont.color:"#444",horizontalAlign:gt,verticalAlign:Kt}).on("edit",function(mr){var Ir=wr.d2r(mr);Ir!==void 0&&t.call("_guiRelayout",Or,Nr,Ir)})}}f.init(Pt);var or,nr,Pr,_a,Fa,Ra,qa,Wa,Ca,hi;function wi(xt,ut,Or){var Cr=Ct.getBoundingClientRect();or=ut-Cr.left,nr=Or-Cr.top,pe._fullLayout._calcInverseTransform(pe);var wr=_.apply3DTransform(pe._fullLayout._invTransform)(or,nr);or=wr[0],nr=wr[1],Pr={l:or,r:or,w:0,t:nr,b:nr,h:0},_a=pe._hmpixcount?pe._hmlumcount/pe._hmpixcount:M(pe._fullLayout.plot_bgcolor).getLuminance(),Fa="M0,0H"+Bt+"V"+Vt+"H0V0",Ra=!1,qa="xy",hi=!1,Wa=ue(tt,_a,St,kt,Fa),Ca=ce(tt,St,kt)}function Yt(xt,ut){if(pe._transitioningWithDuration)return!1;var Or=Math.max(0,Math.min(Bt,Ke*xt+or)),Cr=Math.max(0,Math.min(Vt,st*ut+nr)),wr=Math.abs(Or-or),Rr=Math.abs(Cr-nr);Pr.l=Math.min(or,Or),Pr.r=Math.max(or,Or),Pr.t=Math.min(nr,Cr),Pr.b=Math.max(nr,Cr);function Nr(){qa="",Pr.r=Pr.l,Pr.t=Pr.b,Ca.attr("d","M0,0Z")}if(Ar.isSubplotConstrained)wr>D||Rr>D?(qa="xy",wr/Bt>Rr/Vt?(Rr=wr*Vt/Bt,nr>Cr?Pr.t=nr-Rr:Pr.b=nr+Rr):(wr=Rr*Bt/Vt,or>Or?Pr.l=or-wr:Pr.r=or+wr),Ca.attr("d",ae(Pr))):Nr();else if(vr.isSubplotConstrained)if(wr>D||Rr>D){qa="xy";var Hr=Math.min(Pr.l/Bt,(Vt-Pr.b)/Vt),gt=Math.max(Pr.r/Bt,(Vt-Pr.t)/Vt);Pr.l=Hr*Bt,Pr.r=gt*Bt,Pr.b=(1-Hr)*Vt,Pr.t=(1-gt)*Vt,Ca.attr("d",ae(Pr))}else Nr();else!kr||Rr0){var mr;if(vr.isSubplotConstrained||!qr&&kr.length===1){for(mr=0;mr1&&(Nr.maxallowed!==void 0&&_t===(Nr.range[0]1&&(Hr.maxallowed!==void 0&&Fe===(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 ue(pe,we,Se,Re,Pe){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,Re)).attr("d",Pe+"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,Re,Pe,je){pe.attr("d",Re+"M"+Se.l+","+Se.t+"v"+Se.h+"h"+Se.w+"v-"+Se.h+"h-"+Se.w+"Z"),Y(pe,we,Pe,je)}function Y(pe,we,Se,Re){Se||(pe.transition().style("fill",Re>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),we.transition().style("opacity",1).duration(200))}function X(pe){v.select(pe).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function Q(pe){P&&pe.data&&pe._context.showTips&&(_.notifier(_._(pe,"Double-click to zoom back out"),"long",pe),P=!1)}function V(pe,we){return"M"+(pe.l-.5)+","+(we-D-.5)+"h-3v"+(2*D+1)+"h3ZM"+(pe.r+.5)+","+(we-D-.5)+"h3v"+(2*D+1)+"h-3Z"}function le(pe,we){return"M"+(we-D-.5)+","+(pe.t-.5)+"v-3h"+(2*D+1)+"v3ZM"+(we-D-.5)+","+(pe.b+.5)+"v3h"+(2*D+1)+"v-3Z"}function ae(pe){var we=Math.floor(Math.min(pe.b-pe.t,pe.r-pe.l,D)/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,Re,Pe){for(var je=!1,at={},nt={},tt,Ve,he,se,ne=(Pe||{}).xaHash,Ce=(Pe||{}).yaHash,Ze=0;Ze1&&_.warn("Full array edits are incompatible with other edits",h);var w=i[""][""];if(t(w))a.set(null);else if(Array.isArray(w))a.set(w);else return _.warn("Unrecognized full array edit value",h,w),!0;return T?!1:(f(l,x),m(o),!0)}var A=Object.keys(i).map(Number).sort(S),E=a.get(),p=E||[],b=s(x,h).get(),d=[],u=-1,g=p.length,y,D,P,z,F,N,O,L;for(y=0;yp.length-(O?0:1)){_.warn("index out of range",h,P);continue}if(N!==void 0)F.length>1&&_.warn("Insertion & removal are incompatible with edits to the same index.",h,P),t(N)?d.push(P):O?(N==="add"&&(N={}),p.splice(P,0,N),b&&b.splice(P,0,{})):_.warn("Unrecognized full object edit value",h,P,N),u===-1&&(u=P);else for(D=0;D=0;y--)p.splice(d[y],1),b&&b.splice(d[y],1);if(p.length?E||a.set(p):a.set(null),T)return!1;if(f(l,x),c!==v){var U;if(u===-1)U=A;else{for(g=Math.max(p.length,g),U=[],y=0;y=u));y++)U.push(P);for(y=u;y0&&_.log("Clearing previous rejected promises from queue."),l._promises=[]},Z.cleanLayout=function(l){var x,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,E=(S.subplotsRegistry.polar||{}).attrRegex,p=(S.subplotsRegistry.ternary||{}).attrRegex,b=(S.subplotsRegistry.gl3d||{}).attrRegex,d=Object.keys(l);for(x=0;x3?(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 i(l,x,w=!1){var A=l[x],E=x.charAt(0);w&&Array.isArray(A)||A&&A!=="paper"&&(l[x]=t(A,E,!0))}Z.cleanData=function(l){for(var x=0;x0)return l.slice(0,x)}Z.hasParent=function(l,x){for(var w=c(x);w;){if(w in l)return!0;w=c(w)}return!1},Z.clearAxisTypes=function(l,x,w){for(var A=0;A{let w=(...A)=>A.every(E=>_.isPlainObject(E))||A.every(E=>Array.isArray(E));if([l,x].every(A=>Array.isArray(A))){if(l.length!==x.length)return!1;for(let A=0;A_.isPlainObject(A))){if(Object.keys(l).length!==Object.keys(x).length)return!1;for(let A in l){if(A.startsWith("_"))continue;let E=l[A],p=x[A];if(E!==p&&!(w(E,p)?T(E,p):!1))return!1}return!0}return!1};Z.collectionsAreEqual=T}}),k2=He({"src/plot_api/plot_api.js"(Z){"use strict";var q=Vn(),v=ns(),_=i5(),S=sa(),M=S.nestedProperty,e=Qy(),t=iz(),r=so(),o=e1(),a=bc(),i=Wo(),n=h5(),s=Xh(),h=as(),f=$n(),m=I5().initInteractions,c=vd(),T=Af().clearOutline,l=X0().dfltConfig,x=Nz(),w=Uz(),A=P_(),E=pc(),p=lh().AX_NAME_PATTERN,b=0,d=5;function u(Ae,Le,We,Ke){var st;if(Ae=S.getGraphDiv(Ae),e.init(Ae),S.isPlainObject(Le)){var ot=Le;Le=ot.data,We=ot.layout,Ke=ot.config,st=ot.frames}var Ut=e.triggerHandler(Ae,"plotly_beforeplot",[Le,We,Ke]);if(Ut===!1)return Promise.reject();!Le&&!We&&!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,Ke),We||(We={}),q.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(We)),a.supplyDefaults(Ae);var jt=Ae._fullLayout,cr=jt._has("cartesian");jt._replotting=!0,(Pt||jt._shouldCreateBgLayer)&&(Ye(Ae),jt._shouldCreateBgLayer&&delete jt._shouldCreateBgLayer),h.initGradients(Ae),h.initPatterns(Ae),Pt&&i.saveShowSpikeInitial(Ae);var or=!Ae.calcdata||Ae.calcdata.length!==(Ae._fullData||[]).length;or&&a.doCalcdata(Ae);for(var nr=0;nr=Ae.data.length||st<-Ae.data.length)throw new Error(We+" must be valid indices for gd.data.");if(Le.indexOf(st,Ke+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 "+We+" must be unique.")}}function U(Ae,Le,We){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]),L(Ae,Le,"currentIndices"),typeof We<"u"&&!Array.isArray(We)&&(We=[We]),typeof We<"u"&&L(Ae,We,"newIndices"),typeof We<"u"&&Le.length!==We.length)throw new Error("current and new indices must be of equal length.")}function B(Ae,Le,We){var Ke,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]),Ke=0;Ke"u")throw new Error("indices must be an integer or array of integers");L(Ae,We,"indices");for(var ot in Le){if(!Array.isArray(Le[ot])||Le[ot].length!==We.length)throw new Error("attribute "+ot+" must be an array of length equal to indices array length");if(st&&(!(ot in Ke)||!Array.isArray(Ke[ot])||Ke[ot].length!==Le[ot].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,We,Ke){var st=S.isPlainObject(Ke),ot=[],Ut,Ct,Pt,jt,cr;Array.isArray(We)||(We=[We]),We=O(We,Ae.data.length-1);for(var or in Le)for(var nr=0;nr=0&&cr=0&&cr"u")return jt=Z.redraw(Ae),t.add(Ae,st,Ut,ot,Ct),jt;Array.isArray(We)||(We=[We]);try{U(Ae,Ke,We)}catch(cr){throw Ae.data.splice(Ae.data.length-Le.length,Le.length),cr}return t.startSequence(Ae),t.add(Ae,st,Ut,ot,Ct),jt=Z.moveTraces(Ae,Ke,We),t.stopSequence(Ae),jt}function Q(Ae,Le){Ae=S.getGraphDiv(Ae);var We=[],Ke=Z.addTraces,st=Q,ot=[Ae,We,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]),L(Ae,Le,"indices"),Le=O(Le,Ae.data.length-1),Le.sort(S.sorterDes),Ct=0;Ct"u")for(We=[],jt=0;jt0&&typeof Zt.parts[ta]!="string";)ta--;var ra=Zt.parts[ta],ca=Zt.parts[ta-1]+"."+ra,Ba=Zt.parts.slice(0,ta).join("."),$a=M(Ae.layout,Ba).get(),Za=M(Ke,Ba).get(),ri=Zt.get();if(Jt!==void 0){qa[Rt]=Jt,Wa[Rt]=ra==="reverse"?Jt:ae(ri);var pi=o.getLayoutValObject(Ke,Zt.parts);if(pi&&pi.impliedEdits&&Jt!==null)for(var Ia in pi.impliedEdits)Ca(S.relativeAttr(Rt,Ia),pi.impliedEdits[Ia]);if(["width","height"].indexOf(Rt)!==-1)if(Jt){Ca("autosize",null);var rn=Rt==="height"?"width":"height";Ca(rn,Ke[rn])}else Ke[Rt]=Ae._initialAutoSize[Rt];else if(Rt==="autosize")Ca("width",Jt?null:Ke.width),Ca("height",Jt?null:Ke.height);else if(ca.match(Pe))Yt(ca),M(Ke,Ba+"._inputRange").set(null);else if(ca.match(je)){Yt(ca),M(Ke,Ba+"._inputRange").set(null);var tn=M(Ke,Ba).get();tn._inputDomain&&(tn._input.domain=tn._inputDomain.slice())}else ca.match(at)&&M(Ke,Ba+"._inputDomain").set(null);if(ra==="type"){wi=$a;var cn=Za.type==="linear"&&Jt==="log",xt=Za.type==="log"&&Jt==="linear";if(cn||xt){if(!wi||!wi.range)Ca(Ba+".autorange",!0);else if(Za.autorange)cn&&(wi.range=wi.range[1]>wi.range[0]?[1,2]:[2,1]);else{var ut=wi.range[0],Or=wi.range[1];cn?(ut<=0&&Or<=0&&Ca(Ba+".autorange",!0),ut<=0?ut=Or/1e6:Or<=0&&(Or=ut/1e6),Ca(Ba+".range[0]",Math.log(ut)/Math.LN10),Ca(Ba+".range[1]",Math.log(Or)/Math.LN10)):(Ca(Ba+".range[0]",Math.pow(10,ut)),Ca(Ba+".range[1]",Math.pow(10,Or)))}Array.isArray(Ke._subplots.polar)&&Ke._subplots.polar.length&&Ke[Zt.parts[0]]&&Zt.parts[1]==="radialaxis"&&delete Ke[Zt.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);M(Ke,Ba+"._inputRange").set(null)}else if(ra.match(p)){var Cr=M(Ke,Rt).get(),wr=(Jt||{}).type;(!wr||wr==="-")&&(wr="linear"),r.getComponentMethod("annotations","convertCoords")(Ae,Cr,wr,Ca),r.getComponentMethod("images","convertCoords")(Ae,Cr,wr,Ca)}var Rr=x.containerArrayMatch(Rt);if(Rr){cr=Rr.array,or=Rr.index;var Nr=Rr.property,Hr=pi||{editType:"calc"};or!==""&&Nr===""&&(x.isAddVal(Jt)?Wa[Rt]=null:x.isRemoveVal(Jt)?Wa[Rt]=(M(We,cr).get()||[])[or]:S.warn("unrecognized full object value",Le)),E.update(Ra,Hr),jt[cr]||(jt[cr]={});var gt=jt[cr][or];gt||(gt=jt[cr][or]={}),gt[Nr]=Jt,delete Le[Rt]}else ra==="reverse"?($a.range?$a.range.reverse():(Ca(Ba+".autorange",!0),$a.range=[1,0]),Za.autorange?Ra.calc=!0:Ra.plot=!0):(Rt==="dragmode"&&(Jt===!1&&ri!==!1||Jt!==!1&&ri===!1)||Ke._has("scatter-like")&&Ke._has("regl")&&Rt==="dragmode"&&(Jt==="lasso"||Jt==="select")&&!(ri==="lasso"||ri==="select")?Ra.plot=!0:pi?E.update(Ra,pi):Ra.calc=!0,Zt.set(Jt))}}for(cr in jt){var Kt=x.applyContainerArrayChanges(Ae,ot(We,cr),jt[cr],Ra,ot);Kt||(Ra.plot=!0)}for(var mr in hi){wi=i.getFromId(Ae,mr);var Ir=wi&&wi._constraintGroup;if(Ir){Ra.calc=!0;for(var va in Ir)hi[va]||(i.getFromId(Ae,va)._constraintShrinkable=!0)}}(tt(Ae)||Le.height||Le.width)&&(Ra.plot=!0);var Pa=Ke.shapes;for(or=0;or1;)if(Ke.pop(),We=M(Le,Ke.join(".")+".uirevision").get(),We!==void 0)return We;return Le.uirevision}function rt(Ae,Le){for(var We=0;We[Ba,Ae._ev.listeners(Ba)]);ot=Z.newPlot(Ae,Le,We,Ke).then(()=>{for(let[Ba,$a]of ca)$a.forEach(Za=>Ae.on(Ba,Za));return Z.react(Ae,Le,We,Ke)})}else{Ae.data=Le||[],w.cleanData(Ae.data),Ae.layout=We||{},w.cleanLayout(Ae.layout),kt(Ae.data,Ae.layout,Ct,Pt),a.supplyDefaults(Ae,{skipUpdateCalc:!0});var or=Ae._fullData,nr=Ae._fullLayout,Pr=nr.datarevision===void 0,_a=nr.transition,Fa=Ar(Ae,Pt,nr,Pr,_a),Ra=Fa.newDataRevision,qa=Vt(Ae,Ct,or,Pr,_a,Ra);if(tt(Ae)&&(Fa.layoutReplot=!0),qa.calc||Fa.calc){Ae.calcdata=void 0;for(var Wa=Object.getOwnPropertyNames(nr),Ca=0;Ca(cr||Ae.emit("plotly_react",{config:Ke,data:Le,layout:We}),Ae))}function Vt(Ae,Le,We,Ke,st,ot){var Ut=Le.length===We.length;if(!st&&!Ut)return{fullReplot:!0,calc:!0};var Ct=E.traceFlags();Ct.arrays={},Ct.nChanges=0,Ct.nChangesAnim=0;var Pt,jt;function cr(Pr){var _a=o.getTraceValObject(jt,Pr);return!jt._module.animatable&&_a.anim&&(_a.anim=!1),_a}var or={getValObject:cr,flags:Ct,immutable:Ke,transition:st,newDataRevision:ot,gd:Ae},nr={};for(Pt=0;Pt=st.length?st[0]:st[jt]:st}function Ct(jt){return Array.isArray(ot)?jt>=ot.length?ot[0]:ot[jt]:ot}function Pt(jt,cr){var or=0;return function(){if(jt&&++or===cr)return jt()}}return new Promise(function(jt,cr){function or(){if(Ke._frameQueue.length!==0){for(;Ke._frameQueue.length;){var ra=Ke._frameQueue.pop();ra.onInterrupt&&ra.onInterrupt()}Ae.emit("plotly_animationinterrupted",[])}}function nr(ra){if(ra.length!==0){for(var ca=0;caKe._timeToNext&&_a()};ra()}var Ra=0;function qa(ra){return Array.isArray(st)?Ra>=st.length?ra.transitionOpts=st[Ra]:ra.transitionOpts=st[0]:ra.transitionOpts=st,Ra++,ra}var Wa,Ca,hi=[],wi=Le==null,Yt=Array.isArray(Le),Rt=!wi&&!Yt&&S.isPlainObject(Le);if(Rt)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?nr(hi):(Ae.emit("plotly_animated"),jt())})}function kr(Ae,Le,We){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 Ke,st,ot,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,cr=[],or={};for(Ke=Le.length-1;Ke>=0;Ke--)if(S.isPlainObject(Le[Ke])){var nr=Le[Ke].name,Pr=(Pt[nr]||or[nr]||{}).name,_a=Le[Ke].name,Fa=Pt[Pr]||or[Pr];Pr&&_a&&typeof _a=="number"&&Fa&&bZt.index?-1:Rt.index=0;Ke--){if(st=cr[Ke].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(ot=0;ot=0;We--)Ke=Le[We],ot.push({type:"delete",index:Ke}),Ut.unshift({type:"insert",index:Ke,value:st[Ke]});var Ct=a.modifyFrames,Pt=a.modifyFrames,jt=[Ae,Ut],cr=[Ae,ot];return t&&t.add(Ae,Ct,jt,Pt,cr),a.modifyFrames(Ae,ot)}function _t(Ae){Ae=S.getGraphDiv(Ae);var Le=Ae._fullLayout||{},We=Ae._fullData||[];return a.cleanPlot([],{},We,Le),a.purge(Ae),e.purge(Ae),Le._container&&Le._container.remove(),delete Ae._context,Ae}function Fe(Ae){var Le=Ae._fullLayout,We=Ae.getBoundingClientRect();if(!S.equalDomRects(We,Le._lastBBox)){var Ke=Le._invTransform=S.inverseTransformMatrix(S.getFullTransformMatrix(Ae));Le._invScaleX=Math.sqrt(Ke[0][0]*Ke[0][0]+Ke[0][1]*Ke[0][1]+Ke[0][2]*Ke[0][2]),Le._invScaleY=Math.sqrt(Ke[1][0]*Ke[1][0]+Ke[1][1]*Ke[1][1]+Ke[1][2]*Ke[1][2]),Le._lastBBox=We}}function Ye(Ae){var Le=q.select(Ae),We=Ae._fullLayout;if(We._calcInverseTransform=Fe,We._calcInverseTransform(Ae),We._container=Le.selectAll(".plot-container").data([0]),We._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0).style({width:"100%",height:"100%"}),We._paperdiv=We._container.selectAll(".svg-container").data([0]),We._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),We._glcontainer=We._paperdiv.selectAll(".gl-container").data([{}]),We._glcontainer.enter().append("div").classed("gl-container",!0),We._paperdiv.selectAll(".main-svg").remove(),We._paperdiv.select(".modebar-container").remove(),We._paper=We._paperdiv.insert("svg",":first-child").classed("main-svg",!0),We._toppaper=We._paperdiv.append("svg").classed("main-svg",!0),We._modebardiv=We._paperdiv.append("div"),delete We._modeBar,We._hoverpaper=We._paperdiv.append("svg").classed("main-svg",!0),!We._uid){var Ke={};q.selectAll("defs").each(function(){this.id&&(Ke[this.id.split("-")[1]]=1)}),We._uid=S.randstr(Ke)}We._paperdiv.selectAll(".main-svg").attr(c.svgAttrs),We._defs=We._paper.append("defs").attr("id","defs-"+We._uid),We._clips=We._defs.append("g").classed("clips",!0),We._topdefs=We._toppaper.append("defs").attr("id","topdefs-"+We._uid),We._topclips=We._topdefs.append("g").classed("clips",!0),We._bgLayer=We._paper.append("g").classed("bglayer",!0),We._draggers=We._paper.append("g").classed("draglayer",!0);var st=We._paper.append("g").classed("layer-below",!0);We._imageLowerLayer=st.append("g").classed("imagelayer",!0),We._shapeLowerLayer=st.append("g").classed("shapelayer",!0),We._cartesianlayer=We._paper.append("g").classed("cartesianlayer",!0),We._polarlayer=We._paper.append("g").classed("polarlayer",!0),We._smithlayer=We._paper.append("g").classed("smithlayer",!0),We._ternarylayer=We._paper.append("g").classed("ternarylayer",!0),We._geolayer=We._paper.append("g").classed("geolayer",!0),We._funnelarealayer=We._paper.append("g").classed("funnelarealayer",!0),We._pielayer=We._paper.append("g").classed("pielayer",!0),We._iciclelayer=We._paper.append("g").classed("iciclelayer",!0),We._treemaplayer=We._paper.append("g").classed("treemaplayer",!0),We._sunburstlayer=We._paper.append("g").classed("sunburstlayer",!0),We._indicatorlayer=We._toppaper.append("g").classed("indicatorlayer",!0),We._glimages=We._paper.append("g").classed("glimages",!0);var ot=We._toppaper.append("g").classed("layer-above",!0);We._imageUpperLayer=ot.append("g").classed("imagelayer",!0),We._shapeUpperLayer=ot.append("g").classed("shapelayer",!0),We._selectionLayer=We._toppaper.append("g").classed("selectionlayer",!0),We._infolayer=We._toppaper.append("g").classed("infolayer",!0),We._menulayer=We._toppaper.append("g").classed("menulayer",!0),We._zoomlayer=We._toppaper.append("g").classed("zoomlayer",!0),We._hoverlayer=We._hoverpaper.append("g").classed("hoverlayer",!0),We._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),Ae.emit("plotly_framework")}Z.animate=qr,Z.addFrames=kr,Z.deleteFrames=Ur,Z.addTraces=X,Z.deleteTraces=Q,Z.extendTraces=de,Z.moveTraces=V,Z.prependTraces=Y,Z.newPlot=N,Z._doPlot=u,Z.purge=_t,Z.react=Bt,Z.redraw=F,Z.relayout=we,Z.restyle=le,Z.setPlotConfig=y,Z.update=Ve,Z._guiRelayout=he(we),Z._guiRestyle=he(le),Z._guiUpdate=he(Ve),Z._storeDirectGUIEdit=te}}),Kv=He({"src/snapshot/helpers.js"(Z){"use strict";var q=so();Z.getDelay=function(S){return S._has&&(S._has("gl3d")||S._has("mapbox")||S._has("map"))?500:0},Z.getRedrawFunc=function(S){return function(){q.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 v=window.URL||window.webkitURL;Z.createObjectURL=function(S){return v.createObjectURL(S)},Z.revokeObjectURL=function(S){return v.revokeObjectURL(S)},Z.createBlob=function(S,M){if(M==="svg")return new window.Blob([S],{type:"image/svg+xml;charset=utf-8"});if(M==="full-json")return new window.Blob([S],{type:"application/json;charset=utf-8"});var e=_(window.atob(S));return new window.Blob([e],{type:"image/"+M})},Z.octetStream=function(S){document.location.href="data:application/octet-stream"+S};function _(S){for(var M=S.length,e=new ArrayBuffer(M),t=new Uint8Array(e),r=0;r{let l=T.toLowerCase();return a.includes(l)?T:i.includes(l)?"<":n.includes(l)?">":T.includes("<")||T.includes(">")?"":m.html(T).text()});return m.remove(),c}function h(f){return f.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")}q.exports=function(m,c,T){var l=m._fullLayout,x=l._paper,w=l._toppaper,A=l.width,E=l.height,p;x.insert("rect",":first-child").call(S.setRect,0,0,A,E).call(M.fill,l.paper_bgcolor);var b=l._basePlotModules||[];for(p=0;p1&&E.push(s("object","layout"))),_.supplyDefaults(p);for(var u=p._fullData,g=b.length,y=0;yD.length&&A.push(s("unused",E,g.concat(D.length)));var L=D.length,U=Array.isArray(O);U&&(L=Math.min(L,O.length));var B,W,$,ue,ce;if(P.dimensions===2)for(W=0;WD[W].length&&A.push(s("unused",E,g.concat(W,D[W].length)));var de=D[W].length;for(B=0;B<(U?Math.min(de,O[W].length):de);B++)$=U?O[W][B]:O,ue=y[W][B],ce=D[W][B],v.validate(ue,$)?ce!==ue&&ce!==+ue&&A.push(s("dynamic",E,g.concat(W,B),ue,ce)):A.push(s("value",E,g.concat(W,B),ue))}else A.push(s("array",E,g.concat(W),y[W]));else for(W=0;WF?A.push({code:"unused",traceType:y,templateCount:z,dataCount:F}):F>z&&A.push({code:"reused",traceType:y,templateCount:z,dataCount:F})}}function N(O,L){for(var U in O)if(U.charAt(0)!=="_"){var B=O[U],W=s(O,U,L);v(B)?(Array.isArray(O)&&B._template===!1&&B.templateitemname&&A.push({code:"missing",path:W,templateitemname:B.templateitemname}),N(B,W)):Array.isArray(B)&&h(B)&&N(B,W)}}if(N({data:p,layout:E},""),A.length)return A.map(f)};function h(m){for(var c=0;c=0;f--){var m=e[f];if(m.type==="scatter"&&m.xaxis===s.xaxis&&m.yaxis===s.yaxis){m.opacity=void 0;break}}}}}}}),Xz=He({"src/traces/scatter/layout_defaults.js"(Z,q){"use strict";var v=sa(),_=_2();q.exports=function(S,M){function e(r,o){return v.coerce(S,M,_,r,o)}var t=M.barmode==="group";M.scattermode==="group"&&e("scattergap",t?M.bargap:.2)}}}),tv=He({"src/plots/cartesian/align_period.js"(Z,q){"use strict";var v=ns(),_=sa(),S=_.dateTime2ms,M=_.incrementMonth,e=Gs(),t=e.ONEAVGMONTH;q.exports=function(o,a,i,n){if(a.type!=="date")return{vals:n};var s=o[i+"periodalignment"];if(!s)return{vals:n};var h=o[i+"period"],f;if(v(h)){if(h=+h,h<=0)return{vals:n}}else if(typeof h=="string"&&h.charAt(0)==="M"){var m=+h.substring(1);if(m>0&&Math.round(m)===m)f=m;else return{vals:n}}for(var c=a.calendar,T=s==="start",l=s==="end",x=o[i+"period0"],w=S(x,c)||0,A=[],E=[],p=[],b=n.length,d=0;du;)D=M(D,-f,c);for(;D<=u;)D=M(D,f,c);y=M(D,-f,c)}else{for(g=Math.round((u-w)/h),D=w+g*h;D>u;)D-=h;for(;D<=u;)D+=h;y=D-h}A[d]=T?y:l?D:(y+D)/2,E[d]=y,p[d]=D}return{vals:A,starts:E,ends:p}}}}),Fd=He({"src/traces/scatter/colorscale_calc.js"(Z,q){"use strict";var v=wp().hasColorscale,_=Tp(),S=Fu();q.exports=function(e,t){S.hasLines(t)&&v(t,"line")&&_(e,t,{vals:t.line.color,containerStr:"line",cLetter:"c"}),S.hasMarkers(t)&&(v(t,"marker")&&_(e,t,{vals:t.marker.color,containerStr:"marker",cLetter:"c"}),v(t,"marker.line")&&_(e,t,{vals:t.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}}}),Av=He({"src/traces/scatter/arrays_to_calcdata.js"(Z,q){"use strict";var v=sa();q.exports=function(S,M){for(var e=0;eN&&y[L].gap;)L--;for(B=y[L].s,O=y.length-1;O>L;O--)y[O].s=B;for(;Nue+W||!v($))}for(var de=0;deL(B))):L(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 D(F,N,O,L){for(var U=z(L),B=0;Bz[c]&&c0?e:t)/(c._m*x*(c._m>0?e:t)))),jt*=1e3}if(cr===S){if(l&&(cr=c.c2p(Pt.y,!0)),cr===S)return!1;cr*=1e3}return[jt,cr]}function ee(Ct,Pt,jt,cr){var or=jt-Ct,nr=cr-Pt,Pr=.5-Ct,_a=.5-Pt,Fa=or*or+nr*nr,Ra=or*Pr+nr*_a;if(Ra>0&&Ra1||Math.abs(Pr.y-jt[0][1])>1)&&(Pr=[Pr.x,Pr.y],cr&&Se(Pr,Ct)je||Ct[1]nt)return[a(Ct[0],Pe,je),a(Ct[1],at,nt)]}function St(Ct,Pt){if(Ct[0]===Pt[0]&&(Ct[0]===Pe||Ct[0]===je)||Ct[1]===Pt[1]&&(Ct[1]===at||Ct[1]===nt))return!0}function kt(Ct,Pt){var jt=[],cr=Je(Ct),or=Je(Pt);return cr&&or&&St(cr,or)||(cr&&jt.push(cr),or&&jt.push(or)),jt}function Bt(Ct,Pt,jt){return function(cr,or){var nr=Je(cr),Pr=Je(or),_a=[];if(nr&&Pr&&St(nr,Pr))return _a;nr&&_a.push(nr),Pr&&_a.push(Pr);var Fa=2*r.constrain((cr[Ct]+or[Ct])/2,Pt,jt)-((nr||cr)[Ct]+(Pr||or)[Ct]);if(Fa){var Ra;nr&&Pr?Ra=Fa>0==nr[Ct]>Pr[Ct]?nr:Pr:Ra=nr||Pr,Ra[Ct]+=Fa}return _a}}var Vt;d==="linear"||d==="spline"?Vt=rt:d==="hv"||d==="vh"?Vt=kt:d==="hvh"?Vt=Bt(0,Pe,je):d==="vhv"&&(Vt=Bt(1,at,nt));function Ar(Ct,Pt){var jt=Pt[0]-Ct[0],cr=(Pt[1]-Ct[1])/jt,or=(Ct[1]*Pt[0]-Pt[1]*Ct[0])/jt;return or>0?[cr>0?Pe:je,nt]:[cr>0?je:Pe,at]}function vr(Ct){var Pt=Ct[0],jt=Ct[1],cr=Pt===z[F-1][0],or=jt===z[F-1][1];if(!(cr&&or))if(F>1){var nr=Pt===z[F-2][0],Pr=jt===z[F-2][1];cr&&(Pt===Pe||Pt===je)&&nr?Pr?F--:z[F-1]=Ct:or&&(jt===at||jt===nt)&&Pr?nr?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]&&vr([se,ne]),vr(Ct),Ce=null,se=ne=0}var kr=r.isArrayOrTypedArray(E);function Ur(Ct){if(Ct&&A&&(Ct.i=N,Ct.d=s,Ct.trace=f,Ct.marker=kr?E[Ct.i]:E,Ct.backoff=A),te=Ct[0]/x,pe=Ct[1]/w,Ve=Ct[0]je?je:0,he=Ct[1]nt?nt:0,Ve||he){if(!F)z[F++]=[Ve||Ct[0],he||Ct[1]];else if(Ce){var Pt=Vt(Ce,Ct);Pt.length>1&&(qr(Pt[0]),z[F++]=Pt[1])}else Ze=Vt(z[F-1],Ct)[0],z[F++]=Ze;var jt=z[F-1];Ve&&he&&(jt[0]!==Ve||jt[1]!==he)?(Ce&&(se!==Ve&&ne!==he?vr(se&&ne?Ar(Ce,Ct):[se||Ve,ne||he]):se&&ne&&vr([se,ne])),vr([Ve,he])):se-Ve&&ne-he&&vr([Ve||se,he||ne]),Ce=Ct,se=Ve,ne=he}else Ce&&qr(Vt(Ce,Ct)[0]),z[F++]=Ct}for(N=0;Nwe(W,_t))break;L=W,Q=ce[0]*ue[0]+ce[1]*ue[1],Q>Y?(Y=Q,U=W,$=!1):Q=s.length||!W)break;Ur(W),O=W}}Ce&&vr([se||Ce[0],ne||Ce[1]]),y.push(z.slice(0,F))}var Fe=d.slice(d.length-1);if(A&&Fe!=="h"&&Fe!=="v"){for(var Ye=!1,Ae=-1,Le=[],We=0;We=0?i=m:(i=m=f,f++),i0,d=a(m,c,T);if(A=l.selectAll("g.trace").data(d,function(g){return g[0].trace.uid}),A.enter().append("g").attr("class",function(g){return"trace scatter trace"+g[0].trace.uid}).style("stroke-miterlimit",2),A.order(),n(m,A,c),b){w&&(E=w());var u=v.transition().duration(x.duration).ease(x.easing).each("end",function(){E&&E()}).each("interrupt",function(){E&&E()});u.each(function(){l.selectAll("g.trace").each(function(g,y){s(m,y,c,g,d,this,x)})})}else A.each(function(g,y){s(m,y,c,g,d,this,x)});p&&A.exit().remove(),l.selectAll("path:not([d])").remove()};function n(f,m,c){m.each(function(T){var l=M(v.select(this),"g","fills");t.setClipUrl(l,c.layerClipId,f);var x=T[0].trace;x._ownFill=null,x._nextFill=null;var w=[];x._ownfill&&w.push("_ownFill"),x._nexttrace&&w.push("_nextFill");var A=l.selectAll("g").data(w,e);A.enter().append("g"),A.exit().remove(),A.order().each(function(E){x[E]=M(v.select(this),"path","js-fill")})})}function s(f,m,c,T,l,x,w){var A=f._context.staticPlot,E;h(f,m,c,T,l);var p=!!w&&w.duration>0;function b(vr){return p?vr.transition():vr}var d=c.xaxis,u=c.yaxis,g=T[0].trace,y=g.line,D=v.select(x),P=M(D,"g","errorbars"),z=M(D,"g","lines"),F=M(D,"g","points"),N=M(D,"g","text");if(_.getComponentMethod("errorbars","plot")(f,P,c,w),g.visible!==!0)return;b(D).style("opacity",g.opacity);var O,L,U=g.fill.charAt(g.fill.length-1);U!=="x"&&U!=="y"&&(U="");var B,W;U==="y"?(B=1,W=u.c2p(0,!0)):U==="x"&&(B=0,W=d.c2p(0,!0)),T[0][c.isRangePlot?"nodeRangePlot3":"node3"]=D;var $="",ue=[],ce=g._prevtrace,de=null,Y=null;ce&&($=ce._prevRevpath||"",L=ce._nextFill,ue=ce._ownPolygons,de=ce._fillsegments,Y=ce._fillElement);var X,Q,V="",le="",ae,j,ee,te,pe,we,Se=[];g._polygons=[];var Re=[],Pe=[],je=S.noop;if(O=g._ownFill,r.hasLines(g)||g.fill!=="none"){L&&L.datum(T),["hv","vh","hvh","vhv"].indexOf(y.shape)!==-1?(ae=t.steps(y.shape),j=t.steps(y.shape.split("").reverse().join(""))):y.shape==="spline"?ae=j=function(vr){var qr=vr[vr.length-1];return vr.length>1&&vr[0][0]===qr[0]&&vr[0][1]===qr[1]?t.smoothclosed(vr.slice(1),y.smoothing):t.smoothopen(vr,y.smoothing)}:ae=j=function(vr){return"M"+vr.join("L")},ee=function(vr){return j(vr.reverse())},Pe=o(T,{xaxis:d,yaxis:u,trace:g,connectGaps:g.connectgaps,baseTolerance:Math.max(y.width||1,3)/4,shape:y.shape,backoff:y.backoff,simplify:y.simplify,fill:g.fill}),Re=new Array(Pe.length);var at=0;for(E=0;E=A[0]&&D.x<=A[1]&&D.y>=E[0]&&D.y<=E[1]}),u=Math.ceil(d.length/b),g=0;l.forEach(function(D,P){var z=D[0].trace;r.hasMarkers(z)&&z.marker.maxdisplayed>0&&P=Math.min(ce,de)&&c<=Math.max(ce,de)?0:1/0}var Y=Math.max(3,ue.mrc||0),X=1-1/Y,Q=Math.abs(f.c2p(ue.x)-c);return Q=Math.min(ce,de)&&T<=Math.max(ce,de)?0:1/0}var Y=Math.max(3,ue.mrc||0),X=1-1/Y,Q=Math.abs(m.c2p(ue.y)-T);return Qle!=Re>=le&&(pe=ee[j-1][0],we=ee[j][0],Re-Se&&(te=pe+(we-pe)*(le-Se)/(Re-Se),Y=Math.min(Y,te),X=Math.max(X,te)));return Y=Math.max(Y,0),X=Math.min(X,f._length),{x0:Y,x1:X,y0:le,y1:le}}if(x.indexOf("fills")!==-1&&h._fillElement){var B=L(h._fillElement)&&!L(h._fillExclusionElement);if(B){var W=U(h._polygons);W===null&&(W={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),v.extendFlat(o,{distance:o.maxHoverDistance,x0:W.x0,x1:W.x1,y0:W.y0,y1:W.y1,color:$,hovertemplate:!1}),delete o.index,h.text&&!v.isArrayOrTypedArray(h.text)?o.text=String(h.text):o.text=h.name,[o]}}}}}),c1=He({"src/traces/scatter/select.js"(Z,q){"use strict";var v=Fu();q.exports=function(S,M){var e=S.cd,t=S.xaxis,r=S.yaxis,o=[],a=e[0].trace,i,n,s,h,f=!v.hasMarkers(a)&&!v.hasText(a);if(f)return[];if(M===!1)for(i=0;i0&&(n["_"+a+"axes"]||{})[o])return n;if((n[a+"axis"]||a)===o){if(t(n,a))return n;if((n[a]||[]).length||n[a+"0"])return n}}}function e(r){return{v:"x",h:"y"}[r.orientation||"v"]}function t(r,o){var a=e(r),i=v(r,"box-violin"),n=v(r._fullInput||{},"candlestick");return i&&!n&&o===a&&r[a]===void 0&&r[a+"0"]===void 0}}}),I2=He({"src/plots/cartesian/category_order_defaults.js"(Z,q){"use strict";var v=hp().isTypedArraySpec;function _(S,M){var e=M.dataAttr||S._id.charAt(0),t={},r,o,a;if(M.axData)r=M.axData;else for(r=[],o=0;o0||v(o),i;a&&(i="array");var n=t("categoryorder",i),s;n==="array"&&(s=t("categoryarray")),!a&&n==="array"&&(n=e.categoryorder="trace"),n==="trace"?e._initialCategories=[]:n==="array"?e._initialCategories=s.slice():(s=_(e,r).sort(),n==="category ascending"?e._initialCategories=s:n==="category descending"&&(e._initialCategories=s.reverse()))}}}}),z_=He({"src/plots/cartesian/line_grid_defaults.js"(Z,q){"use strict";var v=Ch().mix,_=sh(),S=sa();q.exports=function(e,t,r,o){o=o||{};var a=o.dfltColor;function i(y,D){return S.coerce2(e,t,o.attributes,y,D)}var n=i("linecolor",a),s=i("linewidth"),h=r("showline",o.showLine||!!n||!!s);h||(delete t.linecolor,delete t.linewidth);var f=v(a,o.bgColor,o.blend||_.lightFraction).toRgbString(),m=i("gridcolor",f),c=i("gridwidth"),T=i("griddash"),l=r("showgrid",o.showGrid||!!m||!!c||!!T);if(l||(delete t.gridcolor,delete t.gridwidth,delete t.griddash),o.hasMinor){var x=v(t.gridcolor,o.bgColor,67).toRgbString(),w=i("minor.gridcolor",x),A=i("minor.gridwidth",t.gridwidth||1),E=i("minor.griddash",t.griddash||"solid"),p=r("minor.showgrid",!!w||!!A||!!E);p||(delete t.minor.gridcolor,delete t.minor.gridwidth,delete t.minor.griddash)}if(!o.noZeroLine){var b=i("zerolinelayer"),d=i("zerolinecolor",a),u=i("zerolinewidth"),g=r("zeroline",o.showGrid||!!d||!!u);g||(delete t.zerolinelayer,delete t.zerolinecolor,delete t.zerolinewidth)}}}}),F_=He({"src/plots/cartesian/axis_defaults.js"(Z,q){"use strict";var v=ns(),_=so(),S=sa(),M=zl(),e=pp(),t=Xh(),r=Y0(),o=t1(),a=e0(),i=t0(),n=I2(),s=z_(),h=h5(),f=wv(),m=lh().WEEKDAY_PATTERN,c=lh().HOUR_PATTERN;q.exports=function(A,E,p,b,d){var u=b.letter,g=b.font||{},y=b.splomStash||{},D=p("visible",!b.visibleDflt),P=E._template||{},z=E.type||P.type||"-",F;if(z==="date"){var N=_.getComponentMethod("calendars","handleDefaults");N(A,E,"calendar",b.calendar),b.noTicklabelmode||(F=p("ticklabelmode"))}!b.noTicklabelindex&&(z==="date"||z==="linear")&&p("ticklabelindex");var O="";(!b.noTicklabelposition||z==="multicategory")&&(O=S.coerce(A,E,{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||p("ticklabeloverflow",O.indexOf("inside")!==-1?"hide past domain":z==="category"||z==="multicategory"?"allow":"hide past div"),f(E,d),h(A,E,p,b),n(A,E,p,b),b.noHover||(z!=="category"&&p("hoverformat"),b.noUnifiedhovertitle||p("unifiedhovertitle.text"));var L=p("color"),U=L!==t.color.dflt?L:g.color,B=y.label||d._dfltTitle[u];if(i(A,E,p,z,b),!D)return E;p("title.text",B),S.coerceFont(p,"title.font",g,{overrideDflt:{size:S.bigFont(g.size),color:U}}),r(A,E,p,z);var W=b.hasMinor;if(W&&(M.newContainer(E,"minor"),r(A,E,p,z,{isMinor:!0})),a(A,E,p,z,b),o(A,E,p,b),W){var $=b.isMinor;b.isMinor=!0,o(A,E,p,b),b.isMinor=$}s(A,E,p,{dfltColor:L,bgColor:b.bgColor,showGrid:b.showGrid,hasMinor:W,attributes:t}),W&&E.ticklabelindex==null&&!E.minor.ticks&&!E.minor.showgrid&&delete E.minor,(E.showline||E.ticks)&&p("mirror");var ue=z==="multicategory";if(!b.noTickson&&(z==="category"||ue)&&(E.ticks||E.showgrid)&&(ue?(p("tickson","boundaries"),delete E.ticklabelposition):p("tickson")),ue){var ce=p("showdividers");ce&&(p("dividercolor"),p("dividerwidth"))}if(z==="date")if(e(A,E,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:T}),!E.rangebreaks.length)delete E.rangebreaks;else{for(var de=0;de=2){var u="",g,y;if(d.length===2){for(g=0;g<2;g++)if(y=x(d[g]),y){u=m;break}}var D=p("pattern",u);if(D===m)for(g=0;g<2;g++)y=x(d[g]),y&&(A.bounds[g]=d[g]=y-1);if(D)for(g=0;g<2;g++)switch(y=d[g],D){case m:if(!v(y)){A.enabled=!1;return}if(y=+y,y!==Math.floor(y)||y<0||y>=7){A.enabled=!1;return}A.bounds[g]=d[g]=y;break;case c:if(!v(y)){A.enabled=!1;return}if(y=+y,y<0||y>24){A.enabled=!1;return}A.bounds[g]=d[g]=y;break}if(E.autorange===!1){var P=E.range;if(P[0]P[1]){A.enabled=!1;return}}else if(d[0]>P[0]&&d[1]p[1]-1/4096&&(e.domain=f),_.noneOrAll(M.domain,e.domain,f),e.tickmode==="sync"&&(e.tickmode="auto")}return t("layer"),e}}}),Jz=He({"src/plots/cartesian/layout_defaults.js"(Z,q){"use strict";var v=sa(),_=$n(),S=$p().isUnifiedHover,M=x5(),e=zl(),t=$y(),r=Xh(),o=B5(),a=F_(),i=J0(),n=R2(),s=tf(),h=s.id2name,f=s.name2id,m=lh().AX_ID_PATTERN,c=so(),T=c.traceIs,l=c.getComponentMethod;function x(w,A,E){Array.isArray(w[A])?w[A].push(E):w[A]=[E]}q.exports=function(A,E,p){var b=E.autotypenumbers,d={},u={},g={},y={},D={},P={},z={},F={},N={},O={},L,U;for(L=0;L rect").call(M.setTranslate,0,0).call(M.setScale,1,1),E.plot.call(M.setTranslate,p._offset,b._offset).call(M.setScale,1,1);var d=E.plot.selectAll(".scatterlayer .trace");d.selectAll(".point").call(M.setPointGroupScale,1,1),d.selectAll(".textpoint").call(M.setTextPointsScale,1,1),d.call(M.hideOutsideRangePoints,E)}function h(E,p){var b=E.plotinfo,d=b.xaxis,u=b.yaxis,g=d._length,y=u._length,D=!!E.xr1,P=!!E.yr1,z=[];if(D){var F=S.simpleMap(E.xr0,d.r2l),N=S.simpleMap(E.xr1,d.r2l),O=F[1]-F[0],L=N[1]-N[0];z[0]=(F[0]*(1-p)+p*N[0]-F[0])/(F[1]-F[0])*g,z[2]=g*(1-p+p*L/O),d.range[0]=d.l2r(F[0]*(1-p)+p*N[0]),d.range[1]=d.l2r(F[1]*(1-p)+p*N[1])}else z[0]=0,z[2]=g;if(P){var U=S.simpleMap(E.yr0,u.r2l),B=S.simpleMap(E.yr1,u.r2l),W=U[1]-U[0],$=B[1]-B[0];z[1]=(U[1]*(1-p)+p*B[1]-U[1])/(U[0]-U[1])*y,z[3]=y*(1-p+p*$/W),u.range[0]=d.l2r(U[0]*(1-p)+p*B[0]),u.range[1]=u.l2r(U[1]*(1-p)+p*B[1])}else z[1]=0,z[3]=y;e.drawOne(r,d,{skipTitle:!0}),e.drawOne(r,u,{skipTitle:!0}),e.redrawComponents(r,[d._id,u._id]);var ue=D?g/z[2]:1,ce=P?y/z[3]:1,de=D?z[0]:0,Y=P?z[1]:0,X=D?z[0]/z[2]*g:0,Q=P?z[1]/z[3]*y:0,V=d._offset-X,le=u._offset-Q;b.clipRect.call(M.setTranslate,de,Y).call(M.setScale,1/ue,1/ce),b.plot.call(M.setTranslate,V,le).call(M.setScale,ue,ce),M.setPointGroupScale(b.zoomScalePts,1/ue,1/ce),M.setTextPointsScale(b.zoomScaleTxt,1/ue,1/ce)}var f;i&&(f=i());function m(){for(var E={},p=0;pa.duration?(m(),x=window.cancelAnimationFrame(A)):x=window.requestAnimationFrame(A)}return T=Date.now(),x=window.requestAnimationFrame(A),Promise.resolve()}}}),Kf=He({"src/plots/cartesian/index.js"(Z){"use strict";var q=Vn(),v=so(),_=sa(),S=bc(),M=as(),e=Wh().getModuleCalcData,t=tf(),r=lh(),o=vd(),a=_.ensureSingle;function i(T,l,x){return _.ensureSingle(T,l,x,function(w){w.datum(x)})}var n=r.zindexSeparator;Z.name="cartesian",Z.attr=["xaxis","yaxis"],Z.idRoot=["x","y"],Z.idRegex=r.idRegex,Z.attrRegex=r.attrRegex,Z.attributes=Kz(),Z.layoutAttributes=Xh(),Z.supplyLayoutDefaults=Jz(),Z.transitionAxes=$z(),Z.finalizeSubplots=function(T,l){var x=l._subplots,w=x.xaxis,A=x.yaxis,E=x.cartesian,p=E,b={},d={},u,g,y;for(u=0;u0){var P=D.id;if(P.indexOf(n)!==-1)continue;P+=n+(u+1),D=_.extendFlat({},D,{id:P,plot:A._cartesianlayer.selectAll(".subplot").select("."+P)})}for(var z=[],F,N=0;N1&&(W+=n+B),U.push(b+W),p=0;p1,y=l.mainplotinfo;if(!l.mainplot||g)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(!p){var D=a(w,"g","layer-subplot");l.shapelayer=a(D,"g","shapelayer"),l.imagelayer=a(D,"g","imagelayer"),y&&g?(l.minorGridlayer=y.minorGridlayer,l.gridlayer=y.gridlayer,l.zerolinelayer=y.zerolinelayer):(l.minorGridlayer=a(w,"g","minor-gridlayer"),l.gridlayer=a(w,"g","gridlayer"),l.zerolinelayer=a(w,"g","zerolinelayer"));var P=a(w,"g","layer-between");l.shapelayerBetween=a(P,"g","shapelayer"),l.imagelayerBetween=a(P,"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),y&&g?l.zerolinelayerAbove=y.zerolinelayerAbove:l.zerolinelayerAbove=a(w,"g","zerolinelayer-above"),p||(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-"+d),l.xaxislayer=w.select(".xaxislayer-"+b),l.yaxislayer=w.select(".yaxislayer-"+d))}else{var z=y.plotgroup,F=A+"-x",N=A+"-y";l.minorGridlayer=y.minorGridlayer,l.gridlayer=y.gridlayer,l.zerolinelayer=y.zerolinelayer,l.zerolinelayerAbove=y.zerolinelayerAbove,a(y.overlinesBelow,"path",F),a(y.overlinesBelow,"path",N),a(y.overaxesBelow,"g",F),a(y.overaxesBelow,"g",N),l.plot=a(y.overplot,"g",A),a(y.overlinesAbove,"path",F),a(y.overlinesAbove,"path",N),a(y.overaxesAbove,"g",F),a(y.overaxesAbove,"g",N),l.xlines=z.select(".overlines-"+b).select("."+F),l.ylines=z.select(".overlines-"+d).select("."+N),l.xaxislayer=z.select(".overaxes-"+b).select("."+F),l.yaxislayer=z.select(".overaxes-"+d).select("."+N)}p||(u||(i(l.minorGridlayer,"g",l.xaxis._id),i(l.minorGridlayer,"g",l.yaxis._id),l.minorGridlayer.selectAll("g").map(function(O){return O[0]}).sort(t.idSort),i(l.gridlayer,"g",l.xaxis._id),i(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 m(T,l){if(T){var x={};T.each(function(d){var u=d[0],g=q.select(this);g.remove(),c(u,l),x[u]=!0});for(var w in l._plots)for(var A=l._plots[w],E=A.overlays||[],p=0;p=0,l=i.indexOf("end")>=0,x=h.backoff*m+n.standoff,w=f.backoff*c+n.startstandoff,A,E,p,b;if(s.nodeName==="line"){A={x:+a.attr("x1"),y:+a.attr("y1")},E={x:+a.attr("x2"),y:+a.attr("y2")};var d=A.x-E.x,u=A.y-E.y;if(p=Math.atan2(u,d),b=p+Math.PI,x&&w&&x+w>Math.sqrt(d*d+u*u)){W();return}if(x){if(x*x>d*d+u*u){W();return}var g=x*Math.cos(p),y=x*Math.sin(p);E.x+=g,E.y+=y,a.attr({x2:E.x,y2:E.y})}if(w){if(w*w>d*d+u*u){W();return}var D=w*Math.cos(p),P=w*Math.sin(p);A.x-=D,A.y-=P,a.attr({x1:A.x,y1:A.y})}}else if(s.nodeName==="path"){var z=s.getTotalLength(),F="";if(z2/3?Ca="right":Ca="center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[Ca]}for(var Ze=!1,rt=["x","y"],Je=0;Je1)&&(Bt===kt?(ot=Vt.r2fraction(w["a"+St]),(ot<0||ot>1)&&(Ze=!0)):Ze=!0),Ye=Vt._offset+Vt.r2p(w[St]),We=.5}else{var Ut=st==="domain";St==="x"?(Le=w[St],Ye=Ut?Vt._offset+Vt._length*Le:Ye=u.l+u.w*Le):(Le=1-w[St],Ye=Ut?Vt._offset+Vt._length*Le:Ye=u.t+u.h*Le),We=w.showarrow?.5:Le}if(w.showarrow){Fe.head=Ye;var Ct=w["a"+St];if(Ke=vr*Ce(.5,w.xanchor)-qr*Ce(.5,w.yanchor),Bt===kt){var Pt=t.getRefType(Bt);Pt==="domain"?(St==="y"&&(Ct=1-Ct),Fe.tail=Vt._offset+Vt._length*Ct):Pt==="paper"?St==="y"?(Ct=1-Ct,Fe.tail=u.t+u.h*Ct):Fe.tail=u.l+u.w*Ct:Fe.tail=Vt._offset+Vt.r2p(Ct),Ae=Ke}else Fe.tail=Ye+Ct,Ae=Ke+Ct;Fe.text=Fe.tail+Ke;var jt=d[St==="x"?"width":"height"];if(kt==="paper"&&(Fe.head=M.constrain(Fe.head,1,jt-1)),Bt==="pixel"){var cr=-Math.max(Fe.tail-3,Fe.text),or=Math.min(Fe.tail+3,Fe.text)-jt;cr>0?(Fe.tail+=cr,Fe.text+=cr):or>0&&(Fe.tail-=or,Fe.text-=or)}Fe.tail+=_t,Fe.head+=_t}else Ke=kr*Ce(We,Ur),Ae=Ke,Fe.text=Ye+Ke;Fe.text+=_t,Ke+=_t,Ae+=_t,w["_"+St+"padplus"]=kr/2+Ae,w["_"+St+"padminus"]=kr/2-Ae,w["_"+St+"size"]=kr,w["_"+St+"shift"]=Ke}if(Ze){de.remove();return}var nr=0,Pr=0;if(w.align!=="left"&&(nr=(Ve-nt)*(w.align==="center"?.5:1)),w.valign!=="top"&&(Pr=(he-tt)*(w.valign==="middle"?.5:1)),je)Pe.select("svg").attr({x:Q+nr-1,y:Q+Pr}).call(o.setClipUrl,le?O:null,x);else{var _a=Q+Pr-at.top,Fa=Q+nr-at.left;te.call(i.positionText,Fa,_a).call(o.setClipUrl,le?O:null,x)}ae.select("rect").call(o.setRect,Q,Q,Ve,he),V.call(o.setRect,Y/2,Y/2,se-Y,ne-Y),de.call(o.setTranslate,Math.round(L.x.text-se/2),Math.round(L.y.text-ne/2)),W.attr({transform:"rotate("+U+","+L.x.text+","+L.y.text+")"});var Ra=function(Wa,Ca){B.selectAll(".annotation-arrow-g").remove();var hi=L.x.head,wi=L.y.head,Yt=L.x.tail+Wa,Rt=L.y.tail+Ca,Zt=L.x.text+Wa,Jt=L.y.text+Ca,Fr=M.rotationXYMatrix(U,Zt,Jt),ta=M.apply2DTransform(Fr),ra=M.apply2DTransform2(Fr),ca=+V.attr("width"),Ba=+V.attr("height"),$a=Zt-.5*ca,Za=$a+ca,ri=Jt-.5*Ba,pi=ri+Ba,Ia=[[$a,ri,$a,pi],[$a,pi,Za,pi],[Za,pi,Za,ri],[Za,ri,$a,ri]].map(ra);if(!Ia.reduce(function(gt,Kt){return gt^!!M.segmentsIntersect(hi,wi,hi+1e6,wi+1e6,Kt[0],Kt[1],Kt[2],Kt[3])},!1)){Ia.forEach(function(gt){var Kt=M.segmentsIntersect(Yt,Rt,hi,wi,gt[0],gt[1],gt[2],gt[3]);Kt&&(Yt=Kt.x,Rt=Kt.y)});var rn=w.arrowwidth,tn=w.arrowcolor,cn=w.arrowside,xt=B.append("g").style({opacity:r.opacity(tn)}).classed("annotation-arrow-g",!0),ut=xt.append("path").attr("d","M"+Yt+","+Rt+"L"+hi+","+wi).style("stroke-width",rn+"px").call(r.stroke,r.rgb(tn));if(f(ut,cn,w),g.annotationPosition&&ut.node().parentNode&&!E){var Or=hi,Cr=wi;if(w.standoff){var wr=Math.sqrt(Math.pow(hi-Yt,2)+Math.pow(wi-Rt,2));Or+=w.standoff*(Yt-hi)/wr,Cr+=w.standoff*(Rt-wi)/wr}var Rr=xt.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(Yt-Or)+","+(Rt-Cr),transform:e(Or,Cr)}).style("stroke-width",rn+6+"px").call(r.stroke,"rgba(0,0,0,0)").call(r.fill,"rgba(0,0,0,0)"),Nr,Hr;s.init({element:Rr.node(),gd:x,prepFn:function(){var gt=o.getTranslate(de);Nr=gt.x,Hr=gt.y,p&&p.autorange&&z(p._name+".autorange",!0),b&&b.autorange&&z(b._name+".autorange",!0)},moveFn:function(gt,Kt){var mr=ta(Nr,Hr),Ir=mr[0]+gt,va=mr[1]+Kt;de.call(o.setTranslate,Ir,va),F("x",T(p,gt,"x",u,w)),F("y",T(b,Kt,"y",u,w)),w.axref===w.xref&&F("ax",T(p,gt,"ax",u,w)),w.ayref===w.yref&&F("ay",T(b,Kt,"ay",u,w)),xt.attr("transform",e(gt,Kt)),W.attr({transform:"rotate("+U+","+Ir+","+va+")"})},doneFn:function(){_.call("_guiRelayout",x,N());var gt=document.querySelector(".js-notes-box-panel");gt&>.redraw(gt.selectedObj)}})}}};if(w.showarrow&&Ra(0,0),$){var qa;s.init({element:de.node(),gd:x,prepFn:function(){qa=W.attr("transform")},moveFn:function(Wa,Ca){var hi="pointer";if(w.showarrow)w.axref===w.xref?F("ax",T(p,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),Ra(Wa,Ca);else{if(E)return;var wi,Yt;if(p)wi=T(p,Wa,"x",u,w);else{var Rt=w._xsize/u.w,Zt=w.x+(w._xshift-w.xshift)/u.w-Rt/2;wi=s.align(Zt+Wa/u.w,Rt,0,1,w.xanchor)}if(b)Yt=T(b,Ca,"y",u,w);else{var Jt=w._ysize/u.h,Fr=w.y-(w._yshift+w.yshift)/u.h-Jt/2;Yt=s.align(Fr-Ca/u.h,Jt,0,1,w.yanchor)}F("x",wi),F("y",Yt),(!p||!b)&&(hi=s.getCursor(p?.5:wi,b?.5:Yt,w.xanchor,w.yanchor))}W.attr({transform:e(Wa,Ca)+qa}),n(de,hi)},clickFn:function(Wa,Ca){w.captureevents&&x.emit("plotly_clickannotation",ce(Ca))},doneFn:function(){n(de),_.call("_guiRelayout",x,N());var Wa=document.querySelector(".js-notes-box-panel");Wa&&Wa.redraw(Wa.selectedObj)}})}}g.annotationText?te.call(i.makeEditable,{delegate:de,gd:x}).call(pe).on("edit",function(Se){w.text=Se,this.call(pe),F("text",Se),p&&p.autorange&&z(p._name+".autorange",!0),b&&b.autorange&&z(b._name+".autorange",!0),_.call("_guiRelayout",x,N())}):te.call(pe)}}}),t9=He({"src/components/annotations/click.js"(Z,q){"use strict";var v=sa(),_=so(),S=zl().arrayEditor;q.exports={hasClickToShow:M,onClick:e};function M(o,a){var i=t(o,a);return i.on.length>0||i.explicitOff.length>0}function e(o,a){var i=t(o,a),n=i.on,s=i.off.concat(i.explicitOff),h={},f=o._fullLayout.annotations,m,c;if(n.length||s.length){for(m=0;m1){n=!0;break}}n?e.fullLayout._infolayer.select(".annotation-"+e.id+'[data-index="'+a+'"]').remove():(i._pdata=_(e.glplot.cameraParams,[t.xaxis.r2l(i.x)*r[0],t.yaxis.r2l(i.y)*r[1],t.zaxis.r2l(i.z)*r[2]]),v(e.graphDiv,i,a,e.id,i._xa,i._ya))}}}}),u9=He({"src/components/annotations3d/index.js"(Z,q){"use strict";var v=so(),_=sa();q.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:z2()}}},layoutAttributes:z2(),handleDefaults:o9(),includeBasePlot:S,convert:s9(),draw:l9()};function S(M,e){var t=v.subplotsRegistry.gl3d;if(t)for(var r=t.attrRegex,o=Object.keys(M),a=0;a{var y=g+"anchor",D=g==="x"?x:w,P={_fullLayout:i},z,F,N,O;let L=g+"ref",U=o[L];if(Array.isArray(U)&&U.length>0){let B=e.countDefiningCoords(c,f,g);O=_.coerceRefArray(o,a,P,g,void 0,"paper",B),a["_"+g+"refArray"]=!0}else O=_.coerceRef(o,a,P,g,void 0,"paper");if(Array.isArray(O))O.forEach(function(B){_.getRefType(B)==="range"&&(z=_.getFromId(P,B),z&&z._shapeIndices.indexOf(a._index)===-1&&z._shapeIndices.push(a._index))}),T&&[0,1].forEach(function(B){let W=O[B];_.getRefType(W)==="range"?(z=_.getFromId(P,W),F=e.shapePositionToRange(z),N=e.rangeToShapePosition(z),(z.type==="category"||z.type==="multicategory")&&n(g+B+"shift")):F=N=v.identity;let ue=g+B,ce=o[ue];if(o[ue]=F(o[ue],!0),D==="pixel"?n(ue,E[B]):_.coercePosition(a,P,n,W,ue,A[B]),a[ue]=N(a[ue]),o[ue]=ce,B===0&&D==="pixel"){let de=o[y];o[y]=F(o[y],!0),_.coercePosition(a,P,n,W,y,.25),a[y]=N(a[y]),o[y]=de}});else{if(_.getRefType(O)==="range"?(z=_.getFromId(P,O),z._shapeIndices.push(a._index),N=e.rangeToShapePosition(z),F=e.shapePositionToRange(z),T&&(z.type==="category"||z.type==="multicategory")&&(n(g+"0shift"),n(g+"1shift"))):F=N=v.identity,T){let W=g+"0",$=g+"1",ue=o[W],ce=o[$];o[W]=F(o[W],!0),o[$]=F(o[$],!0),D==="pixel"?(n(W,E[0]),n($,E[1])):(_.coercePosition(a,P,n,O,W,A[0]),_.coercePosition(a,P,n,O,$,A[1])),a[W]=N(a[W]),a[$]=N(a[$]),o[W]=ue,o[$]=ce}if(D==="pixel"){let W=o[y];o[y]=F(o[y],!0),_.coercePosition(a,P,n,O,y,.25),a[y]=N(a[y]),o[y]=W}}}),T&&v.noneOrAll(o,a,["x0","x1","y0","y1"]);var p=c==="line",b,d;if(T&&(b=n("label.texttemplate"),n("label.texttemplatefallback")),b||(d=n("label.text")),d||b){n("label.textangle");var u=n("label.textposition",p?"middle":"middle center");n("label.xanchor"),n("label.yanchor",t(p,u)),n("label.padding"),v.coerceFont(n,"label.font",i.font)}}}}),f9=He({"src/components/shapes/draw_newshape/defaults.js"(Z,q){"use strict";var v=$n(),_=sa();function S(M,e){return M?"bottom":e.indexOf("top")!==-1?"top":e.indexOf("bottom")!==-1?"bottom":"middle"}q.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"),_.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",v.contrast(a)),r("newshape.line.dash")}var i=e.dragmode==="drawline",n=r("newshape.label.text"),s=r("newshape.label.texttemplate");if(r("newshape.label.texttemplatefallback"),n||s){r("newshape.label.textangle");var h=r("newshape.label.textposition",i?"middle":"middle center");r("newshape.label.xanchor"),r("newshape.label.yanchor",S(i,h)),r("newshape.label.padding"),_.coerceFont(r,"newshape.label.font",t.font)}r("activeshape.fillcolor"),r("activeshape.opacity")}}}),h9=He({"src/components/shapes/calc_autorange.js"(Z,q){"use strict";var v=sa(),_=Wo(),S=L_(),M=i0();q.exports=function(n){var s=n._fullLayout,h=v.filterVisible(s.shapes);if(!(!h.length||!n._fullData.length))for(var f=0;f{c=_.getFromId(n,A),m._extremes[c._id]=_.findExtremes(c,E,t(m))})}else m.xref!=="paper"&&l!=="domain"&&(c=_.getFromId(n,m.xref),T=a(c,m,S.paramIsX),T&&(m._extremes[c._id]=_.findExtremes(c,T,t(m))));if(x==="array"){let w=e(n,m,"y");Object.entries(w).forEach(([A,E])=>{c=_.getFromId(n,A),m._extremes[c._id]=_.findExtremes(c,E,r(m))})}else m.yref!=="paper"&&x!=="domain"&&(c=_.getFromId(n,m.yref),T=a(c,m,S.paramIsY),T&&(m._extremes[c._id]=_.findExtremes(c,T,r(m))))}};function e(i,n,s){let h=n[s+"ref"],f=s==="x"?S.paramIsX:S.paramIsY;function m(A,E){A==="paper"||_.getRefType(A)==="domain"||(c[A]||(c[A]=[]),c[A].push(E))}let c={};if(n.type==="path"&&n.path){let A=n.path.match(S.segmentRE)||[];for(var T=0,l=0;lb&&(m(h[T],d[b]),T++)}}else m(h[0],n[s+"0"]),m(h[1],n[s+"1"]);let x={};for(let A in c){let E=_.getFromId(i,A);if(E){var w=E.type==="category"||E.type==="multicategory"?E.r2c:E.d2c;E.type==="date"&&(w=M.decodeDate(w)),x[E._id]=c[A].map(w)}}return x}function t(i){return o(i.line.width,i.xsizemode,i.x0,i.x1,i.path,!1)}function r(i){return o(i.line.width,i.ysizemode,i.y0,i.y1,i.path,!0)}function o(i,n,s,h,f,m){var c=i/2,T=m;if(n==="pixel"){var l=f?M.extractPathCoords(f,m?S.paramIsY:S.paramIsX):[s,h],x=v.aggNums(Math.max,null,l),w=v.aggNums(Math.min,null,l),A=w<0?Math.abs(w)+c:c,E=x>0?x+c:c;return{ppad:c,ppadplus:T?A:E,ppadminus:T?E:A}}else return{ppad:c}}function a(i,n,s){var h=i._id.charAt(0)==="x"?"x":"y",f=i.type==="category"||i.type==="multicategory",m,c,T=0,l=0,x=f?i.r2c:i.d2c,w=n[h+"sizemode"]==="scaled";if(w?(m=n[h+"0"],c=n[h+"1"],f&&(T=n[h+"0shift"],l=n[h+"1shift"])):(m=n[h+"anchor"],c=n[h+"anchor"]),m!==void 0)return[x(m)+T,x(c)+l];if(n.path){var A=1/0,E=-1/0,p=n.path.match(S.segmentRE),b,d,u,g,y;for(i.type==="date"&&(x=M.decodeDate(x)),b=0;bE&&(E=y)));if(E>=A)return[A,E]}}}}),p9=He({"src/components/shapes/index.js"(Z,q){"use strict";var v=E2();q.exports={moduleType:"component",name:"shapes",layoutAttributes:j5(),supplyLayoutDefaults:c9(),supplyDrawNewShapeDefaults:f9(),includeBasePlot:D_()("shapes"),calcAutorange:h9(),draw:v.draw,drawOne:v.drawOne}}}),q5=He({"src/components/images/attributes.js"(Z,q){"use strict";var v=lh(),_=zl().templatedArray,S=R_();q.exports=_("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",v.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",v.idRegex.y.toString()],dflt:"paper",editType:"arraydraw"},editType:"arraydraw"})}}),d9=He({"src/components/images/defaults.js"(Z,q){"use strict";var v=sa(),_=Wo(),S=pp(),M=q5(),e="images";q.exports=function(o,a){var i={name:e,handleItemDefaults:t};S(o,a,i)};function t(r,o,a){function i(x,w){return v.coerce(r,o,M,x,w)}var n=i("source"),s=i("visible",!!n);if(!s)return o;i("layer"),i("xanchor"),i("yanchor"),i("sizex"),i("sizey"),i("sizing"),i("opacity");for(var h={_fullLayout:a},f=["x","y"],m=0;m<2;m++){var c=f[m],T=_.coerceRef(r,o,h,c,"paper",void 0);if(T!=="paper"){var l=_.getFromId(h,T);l._imgIndices.push(o._index)}_.coercePosition(o,h,i,T,c,0)}return o}}}),v9=He({"src/components/images/draw.js"(Z,q){"use strict";var v=Vn(),_=as(),S=Wo(),M=tf(),e=vd();q.exports=function(r){var o=r._fullLayout,a=[],i={},n=[],s,h;for(h=0;h0);f&&(s("active"),s("direction"),s("type"),s("showactive"),s("x"),s("y"),v.noneOrAll(a,i,["x","y"]),s("xanchor"),s("yanchor"),s("pad.t"),s("pad.r"),s("pad.b"),s("pad.l"),v.coerceFont(s,"font",n.font),s("bgcolor",n.paper_bgcolor),s("bordercolor"),s("borderwidth"))}function o(a,i){function n(h,f){return v.coerce(a,i,t,h,f)}var s=n("visible",a.method==="skip"||Array.isArray(a.args));s&&(n("method"),n("args"),n("args2"),n("label"),n("execute"))}}}),_9=He({"src/components/updatemenus/scrollbox.js"(Z,q){"use strict";q.exports=e;var v=Vn(),_=$n(),S=as(),M=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 i=this.gd._fullLayout,n=i.width,s=i.height;this.position=r;var h=this.position.l,f=this.position.w,m=this.position.t,c=this.position.h,T=this.position.direction,l=T==="down",x=T==="left",w=T==="right",A=T==="up",E=f,p=c,b,d,u,g;!l&&!x&&!w&&!A&&(this.position.direction="down",l=!0);var y=l||A;y?(b=h,d=b+E,l?(u=m,g=Math.min(u+p,s),p=g-u):(g=m+p,u=Math.max(g-p,0),p=g-u)):(u=m,g=u+p,x?(d=h+E,b=Math.max(d-E,0),E=d-b):(b=h,d=Math.min(b+E,n),E=d-b)),this._box={l:b,t:u,w:E,h:p};var D=f>E,P=e.barLength+2*e.barPad,z=e.barWidth+2*e.barPad,F=h,N=m+c;N+z>s&&(N=s-z);var O=this.container.selectAll("rect.scrollbar-horizontal").data(D?[0]:[]);O.exit().on(".drag",null).remove(),O.enter().append("rect").classed("scrollbar-horizontal",!0).call(_.fill,e.barColor),D?(this.hbar=O.attr({rx:e.barRadius,ry:e.barRadius,x:F,y:N,width:P,height:z}),this._hbarXMin=F+P/2,this._hbarTranslateMax=E-P):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var L=c>p,U=e.barWidth+2*e.barPad,B=e.barLength+2*e.barPad,W=h+f,$=m;W+U>n&&(W=n-U);var ue=this.container.selectAll("rect.scrollbar-vertical").data(L?[0]:[]);ue.exit().on(".drag",null).remove(),ue.enter().append("rect").classed("scrollbar-vertical",!0).call(_.fill,e.barColor),L?(this.vbar=ue.attr({rx:e.barRadius,ry:e.barRadius,x:W,y:$,width:U,height:B}),this._vbarYMin=$+B/2,this._vbarTranslateMax=p-B):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var ce=this.id,de=b-.5,Y=L?d+U+.5:d+.5,X=u-.5,Q=D?g+z+.5:g+.5,V=i._topdefs.selectAll("#"+ce).data(D||L?[0]:[]);if(V.exit().remove(),V.enter().append("clipPath").attr("id",ce).append("rect"),D||L?(this._clipRect=V.select("rect").attr({x:Math.floor(de),y:Math.floor(X),width:Math.ceil(Y)-Math.floor(de),height:Math.ceil(Q)-Math.floor(X)}),this.container.call(S.setClipUrl,ce,this.gd),this.bg.attr({x:h,y:m,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),D||L){var le=v.behavior.drag().on("dragstart",function(){v.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(le);var ae=v.behavior.drag().on("dragstart",function(){v.event.sourceEvent.preventDefault(),v.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));D&&this.hbar.on(".drag",null).call(ae),L&&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-=v.event.dx),this.vbar&&(o-=v.event.dy),this.setTranslate(r,o)},e.prototype._onBoxWheel=function(){var r=this.translateX,o=this.translateY;this.hbar&&(r+=v.event.deltaY),this.vbar&&(o+=v.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,i=a+this._hbarTranslateMax,n=M.constrain(v.event.x,a,i),s=(n-a)/(i-a),h=this.position.w-this._box.w;r=s*h}if(this.vbar){var f=o+this._vbarYMin,m=f+this._vbarTranslateMax,c=M.constrain(v.event.y,f,m),T=(c-f)/(m-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,i=this.position.h-this._box.h;if(r=M.constrain(r||0,0,a),o=M.constrain(o||0,0,i),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 n=r/a;this.hbar.call(S.setTranslate,r+n*this._hbarTranslateMax,o)}if(this.vbar){var s=o/i;this.vbar.call(S.setTranslate,r,o+s*this._vbarTranslateMax)}}}}),x9=He({"src/components/updatemenus/draw.js"(Z,q){"use strict";var v=Vn(),_=bc(),S=$n(),M=as(),e=sa(),t=su(),r=zl().arrayEditor,o=uh().LINE_SPACING,a=F2(),i=_9();q.exports=function(P){var z=P._fullLayout,F=e.filterVisible(z[a.name]);function N(ce){_.autoMargin(P,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(){v.select(this).selectAll("g."+a.headerGroupClassName).each(N)}).remove(),F.length!==0){var L=O.selectAll("g."+a.headerGroupClassName).data(F,n);L.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]:[]);W.enter().append("g").classed(a.containerClassName,!0).style("cursor",L?null:"ew-resize");function $(Y){Y._commandObserver&&(Y._commandObserver.remove(),delete Y._commandObserver),_.autoMargin(O,f(Y))}if(W.exit().each(function(){v.select(this).selectAll("g."+a.groupClassName).each($)}).remove(),B.length!==0){var ue=W.selectAll("g."+a.groupClassName).data(B,c);ue.enter().append("g").classed(a.groupClassName,!0),ue.exit().each($).remove();for(var ce=0;ce0&&(ue=ue.transition().duration(O.transition.duration).ease(O.transition.easing)),ue.attr("transform",t($-a.gripWidth*.5,O._dims.currentValueTotalHeight))}}function D(N,O){var L=N._dims;return L.inputAreaStart+a.stepInset+(L.inputAreaLength-2*a.stepInset)*Math.min(1,Math.max(0,O))}function P(N,O){var L=N._dims;return Math.min(1,Math.max(0,(O-a.stepInset-L.inputAreaStart)/(L.inputAreaLength-2*a.stepInset-2*L.inputAreaStart)))}function z(N,O,L){var U=L._dims,B=e.ensureSingle(N,"rect",a.railTouchRectClass,function(W){W.call(d,O,N,L).style("pointer-events","all")});B.attr({width:U.inputAreaLength,height:Math.max(U.inputAreaWidth,a.tickOffset+L.ticklen+U.labelHeight)}).call(S.fill,L.bgcolor).attr("opacity",0),M.setTranslate(B,0,U.currentValueTotalHeight)}function F(N,O){var L=O._dims,U=L.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"),M.setTranslate(B,a.railInset,(L.inputAreaWidth-a.railWidth)*.5+L.currentValueTotalHeight)}}}),A9=He({"src/components/sliders/index.js"(Z,q){"use strict";var v=O_();q.exports={moduleType:"component",name:v.name,layoutAttributes:G5(),supplyLayoutDefaults:w9(),draw:T9()}}}),O2=He({"src/components/rangeslider/attributes.js"(Z,q){"use strict";var v=sh();q.exports={bgcolor:{valType:"color",dflt:v.background,editType:"plot"},bordercolor:{valType:"color",dflt:v.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,q){"use strict";q.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,q){"use strict";q.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}}}),S9=He({"src/components/rangeslider/helpers.js"(Z){"use strict";var q=tf(),v=su(),_=B2(),S=uh().LINE_SPACING,M=_.name;function e(t){var r=t&&t[M];return r&&r.visible}Z.isVisible=e,Z.makeData=function(t){for(var r=q.list({_fullLayout:t},"x",!0),o=t.margin,a=[],i=0;i=nt.max)je=pe[at+1];else if(Pe=nt.pmax)je=pe[at+1];else if(Pe0?d.touches[0].clientX:0}function m(d,u,g,y){if(u._context.staticPlot)return;var D=d.select("rect."+h.slideBoxClassName).node(),P=d.select("rect."+h.grabAreaMinClassName).node(),z=d.select("rect."+h.grabAreaMaxClassName).node();function F(){var N=v.event,O=N.target,L=f(N),U=L-d.node().getBoundingClientRect().left,B=y.d2p(g._rl[0]),W=y.d2p(g._rl[1]),$=n.coverSlip();this.addEventListener("touchmove",ue),this.addEventListener("touchend",ce),$.addEventListener("mousemove",ue),$.addEventListener("mouseup",ce);function ue(de){var Y=f(de),X=+Y-L,Q,V,le;switch(O){case D:if(le="ew-resize",B+X>g._length||W+X<0)return;Q=B+X,V=W+X;break;case P:if(le="col-resize",B+X>g._length)return;Q=B+X,V=W;break;case z:if(le="col-resize",W+X<0)return;Q=B,V=W+X;break;default:le="ew-resize",Q=U,V=U+X;break}if(V0);if(x){var w=o(n,s,h);T("x",w[0]),T("y",w[1]),v.noneOrAll(i,n,["x","y"]),T("xanchor"),T("yanchor"),v.coerceFont(T,"font",s.font);var A=T("bgcolor");T("activecolor",_.contrast(A,t.lightAmount,t.darkAmount)),T("bordercolor"),T("borderwidth")}};function r(a,i,n,s){var h=s.calendar;function f(T,l){return v.coerce(a,i,e.buttons,T,l)}var m=f("visible");if(m){var c=f("step");c!=="all"&&(h&&h!=="gregorian"&&(c==="month"||c==="year")?i.stepmode="backward":f("stepmode"),f("count")),f("label")}}function o(a,i,n){for(var s=n.filter(function(c){return i[c].anchor===a._id}),h=0,f=0;f1)){delete h.grid;return}if(!T&&!l&&!x){var g=b("pattern")==="independent";g&&(T=!0)}p._hasSubplotGrid=T;var y=b("roworder"),D=y==="top to bottom",P=T?.2:.1,z=T?.3:.1,F,N;w&&h._splomGridDflt&&(F=h._splomGridDflt.xside,N=h._splomGridDflt.yside),p._domains={x:a("x",b,P,F,u),y:a("y",b,z,N,d,D)}}function a(s,h,f,m,c,T){var l=h(s+"gap",f),x=h("domain."+s);h(s+"side",m);for(var w=new Array(c),A=x[0],E=(x[1]-A)/(c-l),p=E*(1-l),b=0;b0,m=r._context.staticPlot;o.each(function(c){var T=c[0].trace,l=T.error_x||{},x=T.error_y||{},w;T.ids&&(w=function(b){return b.id});var A=M.hasMarkers(T)&&T.marker.maxdisplayed>0;!x.visible&&!l.visible&&(c=[]);var E=v.select(this).selectAll("g.errorbar").data(c,w);if(E.exit().remove(),!!c.length){l.visible||E.selectAll("path.xerror").remove(),x.visible||E.selectAll("path.yerror").remove(),E.style("opacity",1);var p=E.enter().append("g").classed("errorbar",!0);f&&p.style("opacity",0).transition().duration(i.duration).style("opacity",1),S.setClipUrl(E,a.layerClipId,r),E.each(function(b){var d=v.select(this),u=e(b,s,h);if(!(A&&!b.vis)){var g,y=d.select("path.yerror");if(x.visible&&_(u.x)&&_(u.yh)&&_(u.ys)){var D=x.width;g="M"+(u.x-D)+","+u.yh+"h"+2*D+"m-"+D+",0V"+u.ys,u.noYS||(g+="m-"+D+",0h"+2*D),n=!y.size(),n?y=d.append("path").style("vector-effect",m?"none":"non-scaling-stroke").classed("yerror",!0):f&&(y=y.transition().duration(i.duration).ease(i.easing)),y.attr("d",g)}else y.remove();var P=d.select("path.xerror");if(l.visible&&_(u.y)&&_(u.xh)&&_(u.xs)){var z=(l.copy_ystyle?x:l).width;g="M"+u.xh+","+(u.y-z)+"v"+2*z+"m0,-"+z+"H"+u.xs,u.noXS||(g+="m0,-"+z+"v"+2*z),n=!P.size(),n?P=d.append("path").style("vector-effect",m?"none":"non-scaling-stroke").classed("xerror",!0):f&&(P=P.transition().duration(i.duration).ease(i.easing)),P.attr("d",g)}else P.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),_(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),_(a.xs)||(a.noXS=!0,a.xs=r.c2p(t.xs,!0))),a}}}),O9=He({"src/components/errorbars/style.js"(Z,q){"use strict";var v=Vn(),_=$n();q.exports=function(M){M.each(function(e){var t=e[0].trace,r=t.error_y||{},o=t.error_x||{},a=v.select(this);a.selectAll("path.yerror").style("stroke-width",r.thickness+"px").call(_.stroke,r.color),o.copy_ystyle&&(o=r),a.selectAll("path.xerror").style("stroke-width",o.thickness+"px").call(_.stroke,o.color)})}}}),B9=He({"src/components/errorbars/index.js"(Z,q){"use strict";var v=sa(),_=pc().overrideAll,S=Z5(),M={error_x:v.extendFlat({},S),error_y:v.extendFlat({},S)};delete M.error_x.copy_zstyle,delete M.error_y.copy_zstyle,delete M.error_y.copy_ystyle;var e={error_x:v.extendFlat({},S),error_y:v.extendFlat({},S),error_z:v.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,q.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:M,bar:M,histogram:M,scatter3d:_(e,"calc","nested"),scattergl:_(M,"calc","nested")}},supplyDefaults:D9(),calc:z9(),makeComputeError:Y5(),plot:F9(),style:O9(),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))}}}),N9=He({"src/components/colorbar/constants.js"(Z,q){"use strict";q.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"}}}}),U9=He({"src/components/colorbar/draw.js"(Z,q){"use strict";var v=Vn(),_=Ch(),S=bc(),M=so(),e=Wo(),t=Ap(),r=sa(),o=r.strTranslate,a=rs().extendFlat,i=Kd(),n=as(),s=$n(),h=K0(),f=su(),m=wp().flipScale,c=F_(),T=R2(),l=Xh(),x=uh(),w=x.LINE_SPACING,A=x.FROM_TL,E=x.FROM_BR,p=N9().cn;function b(P){var z=P._fullLayout,F=z._infolayer.selectAll("g."+p.colorbar).data(d(P),function(N){return N._id});F.enter().append("g").attr("class",function(N){return N._id}).classed(p.colorbar,!0),F.each(function(N){var O=v.select(this);r.ensureSingle(O,"rect",p.cbbg),r.ensureSingle(O,"g",p.cbfills),r.ensureSingle(O,"g",p.cblines),r.ensureSingle(O,"g",p.cbaxis,function(U){U.classed(p.crisp,!0)}),r.ensureSingle(O,"g",p.cbtitleunshift,function(U){U.append("g").classed(p.cbtitle,!0)}),r.ensureSingle(O,"rect",p.cboutline);var L=u(O,N,P);L&&L.then&&(P._promises||[]).push(L),P._context.edits.colorbarPosition&&g(O,N,P)}),F.exit().each(function(N){S.autoMargin(P,N._id)}).remove(),F.order()}function d(P){var z=P._fullLayout,F=P.calcdata,N=[],O,L,U,B;function W(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(P,U,O):(O._fillgradient=L.reversescale?m(L.colorscale):L.colorscale,O._zrange=[L[B.min],L[B.max]])}for(var ue=0;ue1){var Fe=Math.pow(10,Math.floor(Math.log(_t)/Math.LN10));kr*=Fe*r.roundUp(_t/Fe,[2,5,10]),(Math.abs(at.start)/at.size+1e-6)%1<2e-6&&(vr.tick0=0)}vr.dtick=kr}vr.domain=N?[Vt+X/ee.h,Vt+Ce-X/ee.h]:[Vt+Y/ee.w,Vt+Ce-Y/ee.w],vr.setScale(),P.attr("transform",o(Math.round(ee.l),Math.round(ee.t)));var Ye=P.select("."+p.cbtitleunshift).attr("transform",o(-Math.round(ee.l),-Math.round(ee.t))),Ae=vr.ticklabelposition,Le=vr.title.font.size,We=P.select("."+p.cbaxis),Ke,st=0,ot=0;function Ut(or,nr){var Pr={propContainer:vr,propName:z._propPrefix+"title.text",traceIndex:z._traceIndex,_meta:z._meta,placeholder:j._dfltTitle.colorbar,containerGroup:P.select("."+p.cbtitle)},_a=or.charAt(0)==="h"?or.slice(1):"h"+or;P.selectAll("."+_a+",."+_a+"-math-group").remove(),h.draw(F,or,a(Pr,nr||{}))}function Ct(){if(N&&qr||!N&&!qr){var or,nr;Se==="top"&&(or=Y+ee.l+Ze*Q,nr=X+ee.t+rt*(1-Vt-Ce)+3+Le*.75),Se==="bottom"&&(or=Y+ee.l+Ze*Q,nr=X+ee.t+rt*(1-Vt)-3-Le*.25),Se==="right"&&(nr=X+ee.t+rt*V+3+Le*.75,or=Y+ee.l+Ze*Vt),Ut(vr._id+"title",{attributes:{x:or,y:nr,"text-anchor":N?"start":"middle"}})}}function Pt(){if(N&&!qr||!N&&qr){var or=vr.position||0,nr=vr._offset+vr._length/2,Pr,_a;if(Se==="right")_a=nr,Pr=ee.l+Ze*or+10+Le*(vr.showticklabels?1:.5);else if(Pr=nr,Se==="bottom"&&(_a=ee.t+rt*or+10+(Ae.indexOf("inside")===-1?vr.tickfont.size:0)+(vr.ticks!=="inside"&&z.ticklen||0)),Se==="top"){var Fa=we.text.split("
").length;_a=ee.t+rt*or+10-he-w*Le*Fa}Ut((N?"h":"v")+vr._id+"title",{avoid:{selection:v.select(F).selectAll("g."+vr._id+"tick"),side:Se,offsetTop:N?0:ee.t,offsetLeft:N?ee.l:0,maxShift:N?j.width:j.height},attributes:{x:Pr,y:_a,"text-anchor":"middle"},transform:{rotate:N?-90:0,offset:0}})}}function jt(){if(!N&&!qr||N&&qr){var or=P.select("."+p.cbtitle),nr=or.select("text"),Pr=[-W/2,W/2],_a=or.select(".h"+vr._id+"title-math-group").node(),Fa=15.6;nr.node()&&(Fa=parseInt(nr.node().style.fontSize,10)*w);var Ra;if(_a?(Ra=n.bBox(_a),ot=Ra.width,st=Ra.height,st>Fa&&(Pr[1]-=(st-Fa)/2)):nr.node()&&!nr.classed(p.jsPlaceholder)&&(Ra=n.bBox(nr.node()),ot=Ra.width,st=Ra.height),N){if(st){if(st+=5,Se==="top")vr.domain[1]-=st/ee.h,Pr[1]*=-1;else{vr.domain[0]+=st/ee.h;var qa=f.lineCount(nr);Pr[1]+=(1-qa)*Fa}or.attr("transform",o(Pr[0],Pr[1])),vr.setScale()}}else ot&&(Se==="right"&&(vr.domain[0]+=(ot+Le/2)/ee.w),or.attr("transform",o(Pr[0],Pr[1])),vr.setScale())}P.selectAll("."+p.cbfills+",."+p.cblines).attr("transform",N?o(0,Math.round(ee.h*(1-vr.domain[1]))):o(Math.round(ee.w*vr.domain[0]),0)),We.attr("transform",N?o(0,Math.round(-ee.t)):o(Math.round(-ee.l),0));var Wa=P.select("."+p.cbfills).selectAll("rect."+p.cbfill).attr("style","").data(tt);Wa.enter().append("rect").classed(p.cbfill,!0).attr("style",""),Wa.exit().remove();var Ca=Re.map(vr.c2p).map(Math.round).sort(function(Zt,Jt){return Zt-Jt});Wa.each(function(Zt,Jt){var Fr=[Jt===0?Re[0]:(tt[Jt]+tt[Jt-1])/2,Jt===tt.length-1?Re[1]:(tt[Jt]+tt[Jt+1])/2].map(vr.c2p).map(Math.round);N&&(Fr[1]=r.constrain(Fr[1]+(Fr[1]>Fr[0])?1:-1,Ca[0],Ca[1]));var ta=v.select(this).attr(N?"x":"y",Je).attr(N?"y":"x",v.min(Fr)).attr(N?"width":"height",Math.max(he,2)).attr(N?"height":"width",Math.max(v.max(Fr)-v.min(Fr),2));if(z._fillgradient)n.gradient(ta,F,z._id,N?"vertical":"horizontalreversed",z._fillgradient,"fill");else{var ra=je(Zt).replace("e-","");ta.attr("fill",_(ra).toHexString())}});var hi=P.select("."+p.cblines).selectAll("path."+p.cbline).data(pe.color&&pe.width?Ve:[]);hi.enter().append("path").classed(p.cbline,!0),hi.exit().remove(),hi.each(function(Zt){var Jt=Je,Fr=Math.round(vr.c2p(Zt))+pe.width/2%1;v.select(this).attr("d","M"+(N?Jt+","+Fr:Fr+","+Jt)+(N?"h":"v")+he).call(n.lineGroupStyle,pe.width,Pe(Zt),pe.dash)}),We.selectAll("g."+vr._id+"tick,path").remove();var wi=Je+he+(W||0)/2-(z.ticks==="outside"?1:0),Yt=e.calcTicks(vr),Rt=e.getTickSigns(vr)[2];return e.drawTicks(F,vr,{vals:vr.ticks==="inside"?e.clipEnds(vr,Yt):Yt,layer:We,path:e.makeTickPath(vr,wi,Rt),transFn:e.makeTransTickFn(vr)}),e.drawLabels(F,vr,{vals:Yt,layer:We,transFn:e.makeTransTickLabelFn(vr),labelFns:e.makeLabelFns(vr,wi)})}function cr(){var or,nr=he+W/2;Ae.indexOf("inside")===-1&&(or=n.bBox(We.node()),nr+=N?or.width:or.height),Ke=Ye.select("text");var Pr=0,_a=N&&Se==="top",Fa=!N&&Se==="right",Ra=0;if(Ke.node()&&!Ke.classed(p.jsPlaceholder)){var qa,Wa=Ye.select(".h"+vr._id+"title-math-group").node();Wa&&(N&&qr||!N&&!qr)?(or=n.bBox(Wa),Pr=or.width,qa=or.height):(or=n.bBox(Ye.node()),Pr=or.right-ee.l-(N?Je:Ar),qa=or.bottom-ee.t-(N?Ar:Je),!N&&Se==="top"&&(nr+=or.height,Ra=or.height)),Fa&&(Ke.attr("transform",o(Pr/2+Le/2,0)),Pr*=2),nr=Math.max(nr,N?Pr:qa)}var Ca=(N?Y:X)*2+nr+$+W/2,hi=0;!N&&we.text&&de==="bottom"&&V<=0&&(hi=Ca/2,Ca+=hi,Ra+=hi),j._hColorbarMoveTitle=hi,j._hColorbarMoveCBTitle=Ra;var wi=$+W,Yt=(N?Je:Ar)-wi/2-(N?Y:0),Rt=(N?Ar:Je)-(N?ne:X+Ra-hi);P.select("."+p.cbbg).attr("x",Yt).attr("y",Rt).attr(N?"width":"height",Math.max(Ca-hi,2)).attr(N?"height":"width",Math.max(ne+wi,2)).call(s.fill,ue).call(s.stroke,z.bordercolor).style("stroke-width",$);var Zt=Fa?Math.max(Pr-10,0):0;P.selectAll("."+p.cboutline).attr("x",(N?Je:Ar+Y)+Zt).attr("y",(N?Ar+X-ne:Je)+(_a?st:0)).attr(N?"width":"height",Math.max(he,2)).attr(N?"height":"width",Math.max(ne-(N?2*X+st:2*Y+Zt),2)).call(s.stroke,z.outlinecolor).style({fill:"none","stroke-width":W});var Jt=N?St*Ca:0,Fr=N?0:(1-kt)*Ca-Ra;if(Jt=ae?ee.l-Jt:-Jt,Fr=le?ee.t-Fr:-Fr,P.attr("transform",o(Jt,Fr)),!N&&($||_(ue).getAlpha()&&!_.equals(j.paper_bgcolor,ue))){var ta=We.selectAll("text"),ra=ta[0].length,ca=P.select("."+p.cbbg).node(),Ba=n.bBox(ca),$a=n.getTranslate(P),Za=2;ta.each(function(Cr,wr){var Rr=0,Nr=ra-1;if(wr===Rr||wr===Nr){var Hr=n.bBox(this),gt=n.getTranslate(this),Kt;if(wr===Nr){var mr=Hr.right+gt.x,Ir=Ba.right+$a.x+Ar-$-Za+Q;Kt=Ir-mr,Kt>0&&(Kt=0)}else if(wr===Rr){var va=Hr.left+gt.x,Pa=Ba.left+$a.x+Ar+$+Za;Kt=Pa-va,Kt<0&&(Kt=0)}Kt&&(ra<3?this.setAttribute("transform","translate("+Kt+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var ri={},pi=A[ce],Ia=E[ce],rn=A[de],tn=E[de],cn=Ca-he;N?(L==="pixels"?(ri.y=V,ri.t=ne*rn,ri.b=ne*tn):(ri.t=ri.b=0,ri.yt=V+O*rn,ri.yb=V-O*tn),B==="pixels"?(ri.x=Q,ri.l=Ca*pi,ri.r=Ca*Ia):(ri.l=cn*pi,ri.r=cn*Ia,ri.xl=Q-U*pi,ri.xr=Q+U*Ia)):(L==="pixels"?(ri.x=Q,ri.l=ne*pi,ri.r=ne*Ia):(ri.l=ri.r=0,ri.xl=Q+O*pi,ri.xr=Q-O*Ia),B==="pixels"?(ri.y=1-V,ri.t=Ca*rn,ri.b=Ca*tn):(ri.t=cn*rn,ri.b=cn*tn,ri.yt=V-U*rn,ri.yb=V+U*tn));var xt=z.y<.5?"b":"t",ut=z.x<.5?"l":"r";F._fullLayout._reservedMargin[z._id]={};var Or={r:j.width-Yt-Jt,l:Yt+ri.r,b:j.height-Rt-Fr,t:Rt+ri.b};ae&&le?S.autoMargin(F,z._id,ri):ae?F._fullLayout._reservedMargin[z._id][xt]=Or[xt]:le||N?F._fullLayout._reservedMargin[z._id][ut]=Or[ut]:F._fullLayout._reservedMargin[z._id][xt]=Or[xt]}return r.syncOrAsync([S.previousPromises,Ct,jt,Pt,S.previousPromises,cr],F)}function g(P,z,F){var N=z.orientation==="v",O=F._fullLayout,L=O._size,U,B,W;t.init({element:P.node(),gd:F,prepFn:function(){U=P.attr("transform"),i(P)},moveFn:function($,ue){P.attr("transform",U+o($,ue)),B=t.align((N?z._uFrac:z._vFrac)+$/L.w,N?z._thickFrac:z._lenFrac,0,1,z.xanchor),W=t.align((N?z._vFrac:1-z._uFrac)-ue/L.h,N?z._lenFrac:z._thickFrac,0,1,z.yanchor);var ce=t.getCursor(B,W,z.xanchor,z.yanchor);i(P,ce)},doneFn:function(){if(i(P),B!==void 0&&W!==void 0){var $={};$[z._propPrefix+"x"]=B,$[z._propPrefix+"y"]=W,z._traceIndex!==void 0?M.call("_guiRestyle",F,$,z._traceIndex):M.call("_guiRelayout",F,$)}}})}function y(P,z,F){var N=z._levels,O=[],L=[],U,B,W=N.end+N.size/100,$=N.size,ue=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>=W:U<=W));B++)U>ue&&U0?U>=W:U<=W));B++)U>F[0]&&U-1}q.exports=function(o,a){var i,n=o.data,s=o.layout,h=M([],n),f=M({},s,e(a.tileClass)),m=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(i=0;i=0)return m}else if(typeof m=="string"&&(m=m.trim(),m.slice(-1)==="%"&&v(m.slice(0,-1))&&(m=+m.slice(0,-1),m>=0)))return m+"%"}function f(m,c,T,l,x,w){w=w||{};var A=w.moduleHasSelected!==!1,E=w.moduleHasUnselected!==!1,p=w.moduleHasConstrain!==!1,b=w.moduleHasCliponaxis!==!1,d=w.moduleHasTextangle!==!1,u=w.moduleHasInsideanchor!==!1,g=!!w.hasPathbar,y=Array.isArray(x)||x==="auto",D=y||x==="inside",P=y||x==="outside";if(D||P){var z=i(l,"textfont",T.font),F=_.extendFlat({},z),N=m.textfont&&m.textfont.color,O=!N;if(O&&delete F.color,i(l,"insidetextfont",F),g){var L=_.extendFlat({},z);O&&delete L.color,i(l,"pathbar.textfont",L)}P&&i(l,"outsidetextfont",z),A&&l("selected.textfont.color"),E&&l("unselected.textfont.color"),p&&l("constraintext"),b&&l("cliponaxis"),d&&l("textangle"),l("texttemplate"),l("texttemplatefallback")}D&&u&&l("insidetextanchor")}q.exports={supplyDefaults:n,crossTraceDefaults:s,handleText:f,validateCornerradius:h}}}),J5=He({"src/traces/bar/layout_defaults.js"(Z,q){"use strict";var v=so(),_=Wo(),S=sa(),M=U2(),e=gd().validateCornerradius;q.exports=function(t,r,o){function a(A,E){return S.coerce(t,r,M,A,E)}for(var i=!1,n=!1,s=!1,h={},f=a("barmode"),m=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"]);x.type!=="category"&&(n=!0)}}if(!i){delete r.barmode;return}f!=="overlay"&&a("barnorm"),a("bargap",n&&!s?0:.2),a("bargroupgap");var w=a("barcornerradius");r.barcornerradius=e(w)}}}),B_=He({"src/traces/bar/arrays_to_calcdata.js"(Z,q){"use strict";var v=sa();q.exports=function(S,M){for(var e=0;er;if(!o)return M}return e!==void 0?e:S.dflt},Z.coerceColor=function(S,M,e){return v(M).isValid()?M:e!==void 0?e:S.dflt},Z.coerceEnumerated=function(S,M,e){return S.coerceNumber&&(M=+M),S.values.indexOf(M)!==-1?M:e!==void 0?e:S.dflt},Z.getValue=function(S,M){var e;return _(S)?M1||g.bargap===0&&g.bargroupgap===0&&!y[0].trace.marker.line.width)&&v.select(this).attr("shape-rendering","crispEdges")}),d.selectAll("g.points").each(function(y){var D=v.select(this),P=y[0].trace;h(D,P,b)}),e.getComponentMethod("errorbars","style")(d)}function h(b,d,u){S.pointStyle(b.selectAll("path"),d,u),f(b,d,u)}function f(b,d,u){b.selectAll("text").each(function(g){var y=v.select(this),D=M.ensureUniformFontSize(u,l(y,g,d,u));S.font(y,D)})}function m(b,d,u){var g=d[0].trace;g.selectedpoints?c(u,g,b):(h(u,g,b),e.getComponentMethod("errorbars","style")(u))}function c(b,d,u){S.selectedPointStyle(b.selectAll("path"),d),T(b.selectAll("text"),d,u)}function T(b,d,u){b.each(function(g){var y=v.select(this),D;if(g.selected){D=M.ensureUniformFontSize(u,l(y,g,d,u));var P=d.selected.textfont&&d.selected.textfont.color;P&&(D.color=P),S.font(y,D)}else S.selectedTextStyle(y,d)})}function l(b,d,u,g){var y=g._fullLayout.font,D=u.textfont;if(b.classed("bartext-inside")){var P=p(d,u);D=w(u,d.i,y,P)}else b.classed("bartext-outside")&&(D=A(u,d.i,y));return D}function x(b,d,u){return E(o,b.textfont,d,u)}function w(b,d,u,g){var y=x(b,d,u),D=b._input.textfont===void 0||b._input.textfont.color===void 0||Array.isArray(b.textfont.color)&&b.textfont.color[d]===void 0;return D&&(y={color:_.contrast(g),family:y.family,size:y.size,weight:y.weight,style:y.style,variant:y.variant,textcase:y.textcase,lineposition:y.lineposition,shadow:y.shadow}),E(a,b.insidetextfont,d,y)}function A(b,d,u){var g=x(b,d,u);return E(i,b.outsidetextfont,d,g)}function E(b,d,u,g){d=d||{};var y=n.getValue(d.family,u),D=n.getValue(d.size,u),P=n.getValue(d.color,u),z=n.getValue(d.weight,u),F=n.getValue(d.style,u),N=n.getValue(d.variant,u),O=n.getValue(d.textcase,u),L=n.getValue(d.lineposition,u),U=n.getValue(d.shadow,u);return{family:n.coerceString(b.family,y,g.family),size:n.coerceNumber(b.size,D,g.size),color:n.coerceColor(b.color,P,g.color),weight:n.coerceString(b.weight,z,g.weight),style:n.coerceString(b.style,F,g.style),variant:n.coerceString(b.variant,N,g.variant),textcase:n.coerceString(b.variant,O,g.textcase),lineposition:n.coerceString(b.variant,L,g.lineposition),shadow:n.coerceString(b.variant,U,g.shadow)}}function p(b,d){return d.type==="waterfall"?d[b.dir].marker.color:b.mcc||b.mc||d.marker.color}q.exports={style:s,styleTextPoints:f,styleOnSelect:m,getInsideTextFont:w,getOutsideTextFont:A,getBarColor:p,resizeText:t}}}),tg=He({"src/traces/bar/plot.js"(Z,q){"use strict";var v=Vn(),_=ns(),S=sa(),M=su(),e=$n(),t=as(),r=so(),o=Wo().tickText,a=Sp(),i=a.recordMinTextSize,n=a.clearMinTextSize,s=Nd(),h=q2(),f=n0(),m=Sv(),c=m.text,T=m.textposition,l=$p().appendArrayPointValue,x=f.TEXTPAD;function w($){return $.id}function A($){if($.ids)return w}function E($){return($>0)-($<0)}function p($,ue){return $0}function g($,ue,ce,de,Y,X){var Q=ue.xaxis,V=ue.yaxis,le=$._fullLayout,ae=$._context.staticPlot;Y||(Y={mode:le.barmode,norm:le.barmode,gap:le.bargap,groupgap:le.bargroupgap},n("bar",le));var j=S.makeTraceGroups(de,ce,"trace bars").each(function(ee){var te=v.select(this),pe=ee[0].trace,we=ee[0].t,Se=pe.type==="waterfall",Re=pe.type==="funnel",Pe=pe.type==="histogram",je=pe.type==="bar",at=je||Re,nt=0;Se&&pe.connector.visible&&pe.connector.mode==="between"&&(nt=pe.connector.line.width/2);var tt=pe.orientation==="h",Ve=u(Y),he=S.ensureSingle(te,"g","points"),se=A(pe),ne=he.selectAll("g.point").data(S.identity,se);ne.enter().append("g").classed("point",!0),ne.exit().remove(),ne.each(function(Ze,rt){var Je=v.select(this),St=b(Ze,Q,V,tt),kt=St[0][0],Bt=St[0][1],Vt=St[1][0],Ar=St[1][1],vr=(tt?Bt-kt:Ar-Vt)===0;vr&&at&&h.getLineWidth(pe,Ze)&&(vr=!1),vr||(vr=!_(kt)||!_(Bt)||!_(Vt)||!_(Ar)),Ze.isBlank=vr,vr&&(tt?Bt=kt:Ar=Vt),nt&&!vr&&(tt?(kt-=p(kt,Bt)*nt,Bt+=p(kt,Bt)*nt):(Vt-=p(Vt,Ar)*nt,Ar+=p(Vt,Ar)*nt));var qr,kr;if(pe.type==="waterfall"){if(!vr){var Ur=pe[Ze.dir].marker;qr=Ur.line.width,kr=Ur.color}}else qr=h.getLineWidth(pe,Ze),kr=Ze.mc||pe.marker.color;function _t(wi){var Yt=v.round(qr/2%1,2);return Y.gap===0&&Y.groupgap===0?v.round(Math.round(wi)-Yt,2):wi}function Fe(wi,Yt,Rt){return Rt&&wi===Yt?wi:Math.abs(wi-Yt)>=2?_t(wi):wi>Yt?Math.ceil(wi):Math.floor(wi)}var Ye=e.opacity(kr),Ae=Ye<1||qr>.01?_t:Fe;$._context.staticPlot||(kt=Ae(kt,Bt,tt),Bt=Ae(Bt,kt,tt),Vt=Ae(Vt,Ar,!tt),Ar=Ae(Ar,Vt,!tt));var Le=tt?Q.c2p:V.c2p,We;Ze.s0>0?We=Ze._sMax:Ze.s0<0?We=Ze._sMin:We=Ze.s1>0?Ze._sMax:Ze._sMin;function Ke(wi,Yt){if(!wi)return 0;var Rt=Math.abs(tt?Ar-Vt:Bt-kt),Zt=Math.abs(tt?Bt-kt:Ar-Vt),Jt=Ae(Math.abs(Le(We,!0)-Le(0,!0))),Fr=Ze.hasB?Math.min(Rt/2,Zt/2):Math.min(Rt/2,Jt),ta;if(Yt==="%"){var ra=Math.min(50,wi);ta=Rt*(ra/100)}else ta=wi;return Ae(Math.max(Math.min(ta,Fr),0))}var st=je||Pe?Ke(we.cornerradiusvalue,we.cornerradiusform):0,ot,Ut,Ct="M"+kt+","+Vt+"V"+Ar+"H"+Bt+"V"+Vt+"Z",Pt=0;if(st&&Ze.s){var jt=E(Ze.s0)===0||E(Ze.s)===E(Ze.s0)?Ze.s1:Ze.s0;if(Pt=Ae(Ze.hasB?0:Math.abs(Le(We,!0)-Le(jt,!0))),Pt0?Math.sqrt(Pt*(2*st-Pt)):0,Fa=cr>0?Math.max:Math.min;ot="M"+kt+","+Vt+"V"+(Ar-Pr*or)+"H"+Fa(Bt-(st-Pt)*cr,kt)+"A "+st+","+st+" 0 0 "+nr+" "+Bt+","+(Ar-st*or-_a)+"V"+(Vt+st*or+_a)+"A "+st+","+st+" 0 0 "+nr+" "+Fa(Bt-(st-Pt)*cr,kt)+","+(Vt+Pr*or)+"Z"}else if(Ze.hasB)ot="M"+(kt+st*cr)+","+Vt+"A "+st+","+st+" 0 0 "+nr+" "+kt+","+(Vt+st*or)+"V"+(Ar-st*or)+"A "+st+","+st+" 0 0 "+nr+" "+(kt+st*cr)+","+Ar+"H"+(Bt-st*cr)+"A "+st+","+st+" 0 0 "+nr+" "+Bt+","+(Ar-st*or)+"V"+(Vt+st*or)+"A "+st+","+st+" 0 0 "+nr+" "+(Bt-st*cr)+","+Vt+"Z";else{Ut=Math.abs(Ar-Vt)+Pt;var Ra=Ut0?Math.sqrt(Pt*(2*st-Pt)):0,Wa=or>0?Math.max:Math.min;ot="M"+(kt+Ra*cr)+","+Vt+"V"+Wa(Ar-(st-Pt)*or,Vt)+"A "+st+","+st+" 0 0 "+nr+" "+(kt+st*cr-qa)+","+Ar+"H"+(Bt-st*cr+qa)+"A "+st+","+st+" 0 0 "+nr+" "+(Bt-Ra*cr)+","+Wa(Ar-(st-Pt)*or,Vt)+"V"+Vt+"Z"}}else ot=Ct}else ot=Ct;var Ca=d(S.ensureSingle(Je,"path"),le,Y,X);if(Ca.style("vector-effect",ae?"none":"non-scaling-stroke").attr("d",isNaN((Bt-kt)*(Ar-Vt))||vr&&$._context.staticPlot?"M0,0Z":ot).call(t.setClipUrl,ue.layerClipId,$),!le.uniformtext.mode&&Ve){var hi=t.makePointStyleFns(pe);t.singlePointStyle(Ze,Ca,pe,hi,$)}y($,ue,Je,ee,rt,kt,Bt,Vt,Ar,st,Pt,Y,X),ue.layerClipId&&t.hideOutsideRangePoint(Ze,Je.select("text"),Q,V,pe.xcalendar,pe.ycalendar)});var Ce=pe.cliponaxis===!1;t.setClipUrl(te,Ce?null:ue.layerClipId,$)});r.getComponentMethod("errorbars","plot")($,j,ue,Y)}function y($,ue,ce,de,Y,X,Q,V,le,ae,j,ee,te){var pe=ue.xaxis,we=ue.yaxis,Se=$._fullLayout,Re;function Pe(Ut,Ct,Pt){var jt=S.ensureSingle(Ut,"text").text(Ct).attr({class:"bartext bartext-"+Re,"text-anchor":"middle","data-notex":1}).call(t.font,Pt).call(M.convertToTspans,$);return jt}var je=de[0].trace,at=je.orientation==="h",nt=L(Se,de,Y,pe,we);Re=U(je,Y);var tt=ee.mode==="stack"||ee.mode==="relative",Ve=de[Y],he=!tt||Ve._outmost,se=Ve.hasB,ne=ae&&ae-j>x;if(!nt||Re==="none"||(Ve.isBlank||X===Q||V===le)&&(Re==="auto"||Re==="inside")){ce.select("text").remove();return}var Ce=Se.font,Ze=s.getBarColor(de[Y],je),rt=s.getInsideTextFont(je,Y,Ce,Ze),Je=s.getOutsideTextFont(je,Y,Ce),St=je.insidetextanchor||"end",kt=ce.datum();at?pe.type==="log"&&kt.s0<=0&&(pe.range[0]0&&_t>0,Ae;ne?se?Ae=D(Ar-2*ae,vr,Ur,_t,at)||D(Ar,vr-2*ae,Ur,_t,at):at?Ae=D(Ar-(ae-j),vr,Ur,_t,at)||D(Ar,vr-2*(ae-j),Ur,_t,at):Ae=D(Ar,vr-(ae-j),Ur,_t,at)||D(Ar-2*(ae-j),vr,Ur,_t,at):Ae=D(Ar,vr,Ur,_t,at),Ye&&Ae?Re="inside":(Re="outside",qr.remove(),qr=null)}else Re="inside";if(!qr){Fe=S.ensureUniformFontSize($,Re==="outside"?Je:rt),qr=Pe(ce,nt,Fe);var Le=qr.attr("transform");if(qr.attr("transform",""),kr=t.bBox(qr.node()),Ur=kr.width,_t=kr.height,qr.attr("transform",Le),Ur<=0||_t<=0){qr.remove();return}}var We=je.textangle,Ke,st;Re==="outside"?(st=je.constraintext==="both"||je.constraintext==="outside",Ke=O(X,Q,V,le,kr,{isHorizontal:at,constrained:st,angle:We})):(st=je.constraintext==="both"||je.constraintext==="inside",Ke=F(X,Q,V,le,kr,{isHorizontal:at,constrained:st,angle:We,anchor:St,hasB:se,r:ae,overhead:j})),Ke.fontSize=Fe.size,i(je.type==="histogram"?"bar":je.type,Ke,Se),Ve.transform=Ke;var ot=d(qr,Se,ee,te);S.setTransormAndDisplay(ot,Ke)}function D($,ue,ce,de,Y){if($<0||ue<0)return!1;var X=ce<=$&&de<=ue,Q=ce<=ue&&de<=$,V=Y?$>=ce*(ue/de):ue>=de*($/ce);return X||Q||V}function P($){return $==="auto"?0:$}function z($,ue){var ce=Math.PI/180*ue,de=Math.abs(Math.sin(ce)),Y=Math.abs(Math.cos(ce));return{x:$.width*Y+$.height*de,y:$.width*de+$.height*Y}}function F($,ue,ce,de,Y,X){var Q=!!X.isHorizontal,V=!!X.constrained,le=X.angle||0,ae=X.anchor,j=ae==="end",ee=ae==="start",te=X.leftToRight||0,pe=(te+1)/2,we=1-pe,Se=X.hasB,Re=X.r,Pe=X.overhead,je=Y.width,at=Y.height,nt=Math.abs(ue-$),tt=Math.abs(de-ce),Ve=nt>2*x&&tt>2*x?x:0;nt-=2*Ve,tt-=2*Ve;var he=P(le);le==="auto"&&!(je<=nt&&at<=tt)&&(je>nt||at>tt)&&(!(je>tt||at>nt)||jex){var Ze=N($,ue,ce,de,se,Re,Pe,Q,Se);ne=Ze.scale,Ce=Ze.pad}else ne=1,V&&(ne=Math.min(1,nt/se.x,tt/se.y)),Ce=0;var rt=Y.left*we+Y.right*pe,Je=(Y.top+Y.bottom)/2,St=($+x)*we+(ue-x)*pe,kt=(ce+de)/2,Bt=0,Vt=0;if(ee||j){var Ar=(Q?se.x:se.y)/2;Re&&(j||Se)&&(Ve+=Ce);var vr=Q?p($,ue):p(ce,de);Q?ee?(St=$+vr*Ve,Bt=-vr*Ar):(St=ue-vr*Ve,Bt=vr*Ar):ee?(kt=ce+vr*Ve,Vt=-vr*Ar):(kt=de-vr*Ve,Vt=vr*Ar)}return{textX:rt,textY:Je,targetX:St,targetY:kt,anchorX:Bt,anchorY:Vt,scale:ne,rotate:he}}function N($,ue,ce,de,Y,X,Q,V,le){var ae=Math.max(0,Math.abs(ue-$)-2*x),j=Math.max(0,Math.abs(de-ce)-2*x),ee=X-x,te=Q?ee-Math.sqrt(ee*ee-(ee-Q)*(ee-Q)):ee,pe=le?ee*2:V?ee-Q:2*te,we=le?ee*2:V?2*te:ee-Q,Se,Re,Pe,je,at;return Y.y/Y.x>=j/(ae-pe)?je=j/Y.y:Y.y/Y.x<=(j-we)/ae?je=ae/Y.x:!le&&V?(Se=Y.x*Y.x+Y.y*Y.y/4,Re=-2*Y.x*(ae-ee)-Y.y*(j/2-ee),Pe=(ae-ee)*(ae-ee)+(j/2-ee)*(j/2-ee)-ee*ee,je=(-Re+Math.sqrt(Re*Re-4*Se*Pe))/(2*Se)):le?(Se=(Y.x*Y.x+Y.y*Y.y)/4,Re=-Y.x*(ae/2-ee)-Y.y*(j/2-ee),Pe=(ae/2-ee)*(ae/2-ee)+(j/2-ee)*(j/2-ee)-ee*ee,je=(-Re+Math.sqrt(Re*Re-4*Se*Pe))/(2*Se)):(Se=Y.x*Y.x/4+Y.y*Y.y,Re=-Y.x*(ae/2-ee)-2*Y.y*(j-ee),Pe=(ae/2-ee)*(ae/2-ee)+(j-ee)*(j-ee)-ee*ee,je=(-Re+Math.sqrt(Re*Re-4*Se*Pe))/(2*Se)),je=Math.min(1,je),V?at=Math.max(0,ee-Math.sqrt(Math.max(0,ee*ee-(ee-(j-Y.y*je)/2)*(ee-(j-Y.y*je)/2)))-Q):at=Math.max(0,ee-Math.sqrt(Math.max(0,ee*ee-(ee-(ae-Y.x*je)/2)*(ee-(ae-Y.x*je)/2)))-Q),{scale:je,pad:at}}function O($,ue,ce,de,Y,X){var Q=!!X.isHorizontal,V=!!X.constrained,le=X.angle||0,ae=Y.width,j=Y.height,ee=Math.abs(ue-$),te=Math.abs(de-ce),pe;Q?pe=te>2*x?x:0:pe=ee>2*x?x:0;var we=1;V&&(we=Q?Math.min(1,te/j):Math.min(1,ee/ae));var Se=P(le),Re=z(Y,Se),Pe=(Q?Re.x:Re.y)/2,je=(Y.left+Y.right)/2,at=(Y.top+Y.bottom)/2,nt=($+ue)/2,tt=(ce+de)/2,Ve=0,he=0,se=Q?p(ue,$):p(ce,de);return Q?(nt=ue-se*pe,Ve=se*Pe):(tt=de+se*pe,he=-se*Pe),{textX:je,textY:at,targetX:nt,targetY:tt,anchorX:Ve,anchorY:he,scale:we,rotate:Se}}function L($,ue,ce,de,Y){var X=ue[0].trace,Q=X.texttemplate,V;return Q?V=B($,ue,ce,de,Y):X.textinfo?V=W(ue,ce,de,Y):V=h.getValue(X.text,ce),h.coerceString(c,V)}function U($,ue){var ce=h.getValue($.textposition,ue);return h.coerceEnumerated(T,ce)}function B($,ue,ce,de,Y){var X=ue[0].trace,Q=S.castOption(X,ce,"texttemplate");if(!Q)return"";var V=X.type==="histogram",le=X.type==="waterfall",ae=X.type==="funnel",j=X.orientation==="h",ee,te,pe,we;j?(ee="y",te=Y,pe="x",we=de):(ee="x",te=de,pe="y",we=Y);function Se(Ve){return o(te,te.c2l(Ve),!0).text}function Re(Ve){return o(we,we.c2l(Ve),!0).text}var Pe=ue[ce],je={};je.label=Pe.p,je.labelLabel=je[ee+"Label"]=Se(Pe.p);var at=S.castOption(X,Pe.i,"text");(at===0||at)&&(je.text=at),je.value=Pe.s,je.valueLabel=je[pe+"Label"]=Re(Pe.s);var nt={};l(nt,X,Pe.i),(V||nt.x===void 0)&&(nt.x=j?je.value:je.label),(V||nt.y===void 0)&&(nt.y=j?je.label:je.value),(V||nt.xLabel===void 0)&&(nt.xLabel=j?je.valueLabel:je.labelLabel),(V||nt.yLabel===void 0)&&(nt.yLabel=j?je.labelLabel:je.valueLabel),le&&(je.delta=+Pe.rawS||Pe.s,je.deltaLabel=Re(je.delta),je.final=Pe.v,je.finalLabel=Re(je.final),je.initial=je.final-je.delta,je.initialLabel=Re(je.initial)),ae&&(je.value=Pe.s,je.valueLabel=Re(je.value),je.percentInitial=Pe.begR,je.percentInitialLabel=S.formatPercent(Pe.begR),je.percentPrevious=Pe.difR,je.percentPreviousLabel=S.formatPercent(Pe.difR),je.percentTotal=Pe.sumR,je.percenTotalLabel=S.formatPercent(Pe.sumR));var tt=S.castOption(X,Pe.i,"customdata");return tt&&(je.customdata=tt),S.texttemplateString({data:[nt,je,X._meta],fallback:X.texttemplatefallback,labels:je,locale:$._d3locale,template:Q})}function W($,ue,ce,de){var Y=$[0].trace,X=Y.orientation==="h",Q=Y.type==="waterfall",V=Y.type==="funnel";function le(tt){var Ve=X?de:ce;return o(Ve,tt,!0).text}function ae(tt){var Ve=X?ce:de;return o(Ve,+tt,!0).text}var j=Y.textinfo,ee=$[ue],te=j.split("+"),pe=[],we,Se=function(tt){return te.indexOf(tt)!==-1};if(Se("label")&&pe.push(le($[ue].p)),Se("text")&&(we=S.castOption(Y,ee.i,"text"),(we===0||we)&&pe.push(we)),Q){var Re=+ee.rawS||ee.s,Pe=ee.v,je=Pe-Re;Se("initial")&&pe.push(ae(je)),Se("delta")&&pe.push(ae(Re)),Se("final")&&pe.push(ae(Pe))}if(V){Se("value")&&pe.push(ae(ee.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(ee.begR),nt&&(we+=" of initial"),pe.push(we)),Se("percent previous")&&(we=S.formatPercent(ee.difR),nt&&(we+=" of previous"),pe.push(we)),Se("percent total")&&(we=S.formatPercent(ee.sumR),nt&&(we+=" of total"),pe.push(we))}return pe.join("
")}q.exports={plot:g,toMoveInsideBar:F}}}),f1=He({"src/traces/bar/hover.js"(Z,q){"use strict";var v=Hc(),_=so(),S=$n(),M=sa().fillText,e=q2().getLineWidth,t=Wo().hoverLabelText,r=Gs().BADNUM;function o(n,s,h,f,m){var c=a(n,s,h,f,m);if(c){var T=c.cd,l=T[0].trace,x=T[c.index];return c.color=i(l,x),_.getComponentMethod("errorbars","hoverInfo")(x,l,c),[c]}}function a(n,s,h,f,m){var c=n.cd,T=c[0].trace,l=c[0].t,x=f==="closest",w=T.type==="waterfall",A=n.maxHoverDistance,E=n.maxSpikeDistance,p,b,d,u,g,y,D;T.orientation==="h"?(p=h,b=s,d="y",u="x",g=de,y=$):(p=s,b=h,d="x",u="y",y=de,g=$);var P=T[d+"period"],z=x||P;function F(we){return O(we,-1)}function N(we){return O(we,1)}function O(we,Se){var Re=we.w;return we[d]+Se*Re/2}function L(we){return we[d+"End"]-we[d+"Start"]}var U=x?F:P?function(we){return we.p-L(we)/2}:function(we){return Math.min(F(we),we.p-l.bardelta/2)},B=x?N:P?function(we){return we.p+L(we)/2}:function(we){return Math.max(N(we),we.p+l.bardelta/2)};function W(we,Se,Re){return m.finiteRange&&(Re=0),v.inbox(we-p,Se-p,Re+Math.min(1,Math.abs(Se-we)/D)-1)}function $(we){return W(U(we),B(we),A)}function ue(we){return W(F(we),N(we),E)}function ce(we){var Se=we[u];if(w){var Re=Math.abs(we.rawS)||0;b>0?Se+=Re:b<0&&(Se-=Re)}return Se}function de(we){var Se=b,Re=we.b,Pe=ce(we);return v.inbox(Re-Se,Pe-Se,A+(Pe-Se)/(Pe-Re)-1)}function Y(we){var Se=b,Re=we.b,Pe=ce(we);return v.inbox(Re-Se,Pe-Se,E+(Pe-Se)/(Pe-Re)-1)}var X=n[d+"a"],Q=n[u+"a"];D=Math.abs(X.r2c(X.range[1])-X.r2c(X.range[0]));function V(we){return(g(we)+y(we))/2}var le=v.getDistanceFunction(f,g,y,V);if(v.getClosest(c,le,n),n.index!==!1&&c[n.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=n.index,j=c[ae],ee=T.base?j.b+j.s:j.s;n[u+"0"]=n[u+"1"]=Q.c2p(j[u],!0),n[u+"LabelVal"]=ee;var te=l.extents[l.extents.round(j.p)];n[d+"0"]=X.c2p(x?U(j):te[0],!0),n[d+"1"]=X.c2p(x?B(j):te[1],!0);var pe=j.orig_p!==void 0;return n[d+"LabelVal"]=pe?j.orig_p:j.p,n.labelLabel=t(X,n[d+"LabelVal"],T[d+"hoverformat"]),n.valueLabel=t(Q,n[u+"LabelVal"],T[u+"hoverformat"]),n.baseLabel=t(Q,j.b,T[u+"hoverformat"]),n.spikeDistance=(Y(j)+ue(j))/2,n[d+"Spike"]=X.c2p(j.p,!0),M(j,T,n),n.hovertemplate=T.hovertemplate,n}}function i(n,s){var h=s.mcc||n.marker.color,f=s.mlcc||n.marker.line.color,m=e(n,s);if(S.opacity(h))return h;if(S.opacity(f)&&m)return f}q.exports={hoverPoints:o,hoverOnBars:a,getTraceColor:i}}}),K9=He({"src/traces/bar/event_data.js"(Z,q){"use strict";q.exports=function(_,S,M){return _.x="xVal"in S?S.xVal:S.x,_.y="yVal"in S?S.yVal:S.y,S.xa&&(_.xaxis=S.xa),S.ya&&(_.yaxis=S.ya),M.orientation==="h"?(_.label=_.y,_.value=_.x):(_.label=_.x,_.value=_.y),_}}}),h1=He({"src/traces/bar/select.js"(Z,q){"use strict";q.exports=function(S,M){var e=S.cd,t=S.xaxis,r=S.yaxis,o=e[0].trace,a=o.type==="funnel",i=o.orientation==="h",n=[],s;if(M===!1)for(s=0;s0?(P="v",d>0?z=Math.min(g,u):z=Math.min(u)):d>0?(P="h",z=Math.min(g)):z=0;if(!z){h.visible=!1;return}h._length=z;var U=f("orientation",P);h._hasPreCompStats?U==="v"&&d===0?(f("x0",0),f("dx",1)):U==="h"&&b===0&&(f("y0",0),f("dy",1)):U==="v"&&d===0?f("x0"):U==="h"&&b===0&&f("y0");var B=_.getComponentMethod("calendars","handleTraceDefaults");B(s,h,["x","y"],m)}function i(s,h,f,m){var c=m.prefix,T=v.coerce2(s,h,r,"marker.outliercolor"),l=f("marker.line.outliercolor"),x="outliers";h._hasPreCompStats?x="all":(T||l)&&(x="suspectedoutliers");var w=f(c+"points",x);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")),v.coerceSelectionMarkerOpacity(h,f)}function n(s,h){var f,m;function c(w){return v.coerce(m._input,m,r,w)}for(var T=0;Tce.uf};if(E._hasPreCompStats){var ae=E[z],j=function(vr){return P.d2c((E[vr]||[])[y])},ee=1/0,te=-1/0;for(y=0;y=ce.q1&&ce.q3>=ce.med){var we=j("lowerfence");ce.lf=we!==e&&we<=ce.q1?we:m(ce,Y,X);var Se=j("upperfence");ce.uf=Se!==e&&Se>=ce.q3?Se:c(ce,Y,X);var Re=j("mean");ce.mean=Re!==e?Re:X?M.mean(Y,X):(ce.q1+ce.q3)/2;var Pe=j("sd");ce.sd=Re!==e&&Pe>=0?Pe:X?M.stdev(Y,X,ce.mean):ce.q3-ce.q1,ce.lo=T(ce),ce.uo=l(ce);var je=j("notchspan");je=je!==e&&je>0?je:x(ce,X),ce.ln=ce.med-je,ce.un=ce.med+je;var at=ce.lf,nt=ce.uf;E.boxpoints&&Y.length&&(at=Math.min(at,Y[0]),nt=Math.max(nt,Y[X-1])),E.notched&&(at=Math.min(at,ce.ln),nt=Math.max(nt,ce.un)),ce.min=at,ce.max=nt}else{M.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}ee=Math.min(ee,ce.min),te=Math.max(te,ce.max),ce.pts2=de.filter(le),u.push(ce)}}E._extremes[P._id]=_.findExtremes(P,[ee,te],{padded:!0})}else{var Ve=P.makeCalcdata(E,z),he=o($,ue),se=$.length,ne=a(se);for(y=0;y=0&&Ce0){if(ce={},ce.pos=ce[N]=$[y],de=ce.pts=ne[y].sort(h),Y=ce[z]=de.map(f),X=Y.length,ce.min=Y[0],ce.max=Y[X-1],ce.mean=M.mean(Y,X),ce.sd=M.stdev(Y,X,ce.mean)*E.sdmultiple,ce.med=M.interp(Y,.5),X%2&&(St||kt)){var Bt,Vt;St?(Bt=Y.slice(0,X/2),Vt=Y.slice(X/2+1)):kt&&(Bt=Y.slice(0,X/2+1),Vt=Y.slice(X/2)),ce.q1=M.interp(Bt,.5),ce.q3=M.interp(Vt,.5)}else ce.q1=M.interp(Y,.25),ce.q3=M.interp(Y,.75);ce.lf=m(ce,Y,X),ce.uf=c(ce,Y,X),ce.lo=T(ce),ce.uo=l(ce);var Ar=x(ce,X);ce.ln=ce.med-Ar,ce.un=ce.med+Ar,Ze=Math.min(Ze,ce.ln),rt=Math.max(rt,ce.un),ce.pts2=de.filter(le),u.push(ce)}E.notched&&M.isTypedArray(Ve)&&(Ve=Array.from(Ve)),E._extremes[P._id]=_.findExtremes(P,E.notched?Ve.concat([Ze,rt]):Ve,{padded:!0})}return s(u,E),u.length>0?(u[0].t={num:p[g],dPos:ue,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:E.boxmean==="sd"||E.sizemode==="sd"?t(A,"mean \xB1 \u03C3:").replace("\u03C3",E.sdmultiple===1?"\u03C3":E.sdmultiple+"\u03C3"):t(A,"mean:"),lf:t(A,"lower fence:"),uf:t(A,"upper fence:")}},p[g]++,u):[{t:{empty:!0}}]};function r(w,A,E,p){var b=A in w,d=A+"0"in w,u="d"+A in w;if(b||d&&u){var g=E.makeCalcdata(w,A),y=S(w,E,A,g).vals;return[y,g]}var D;d?D=w[A+"0"]:"name"in w&&(E.type==="category"||v(w.name)&&["linear","log"].indexOf(E.type)!==-1||M.isDateTime(w.name)&&E.type==="date")?D=w.name:D=p;for(var P=E.type==="multicategory"?E.r2c_just_indices(D):E.d2c(D,0,w[A+"calendar"]),z=w._length,F=new Array(z),N=0;N1,d=1-s[r+"gap"],u=1-s[r+"groupgap"];for(m=0;m0;if(P==="positive"?(ce=z*(D?1:.5),X=Y,de=X=N):P==="negative"?(ce=X=N,de=z*(D?1:.5),Q=Y):(ce=de=z,X=Q=Y),te){var pe=g.pointpos,we=g.jitter,Se=g.marker.size/2,Re=0;pe+we>=0&&(Re=Y*(pe+we),Re>ce?(ee=!0,ae=Se,V=Re):Re>X&&(ae=Se,V=ce)),Re<=ce&&(V=ce);var Pe=0;pe-we<=0&&(Pe=-Y*(pe-we),Pe>de?(ee=!0,j=Se,le=Pe):Pe>Q&&(j=Se,le=de)),Pe<=de&&(le=de)}else V=ce,le=de;var je=new Array(T.length);for(c=0;cE.lo&&(U.so=!0)}return b});A.enter().append("path").classed("point",!0),A.exit().remove(),A.call(S.translatePoints,f,m)}function a(i,n,s,h){var f=n.val,m=n.pos,c=!!m.rangebreaks,T=h.bPos,l=h.bPosPxOffset||0,x=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 E=i.selectAll("path.mean").data(s.type==="box"&&s.boxmean||s.type==="violin"&&s.box.visible&&s.meanline.visible?_.identity:[]);E.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),E.exit().remove(),E.each(function(p){var b=m.c2l(p.pos+T,!0),d=m.l2p(b-w)+l,u=m.l2p(b+A)+l,g=c?(d+u)/2:m.l2p(b)+l,y=f.c2p(p.mean,!0),D=f.c2p(p.mean-p.sd,!0),P=f.c2p(p.mean+p.sd,!0);s.orientation==="h"?v.select(this).attr("d","M"+y+","+d+"V"+u+(x==="sd"?"m0,0L"+D+","+g+"L"+y+","+d+"L"+P+","+g+"Z":"")):v.select(this).attr("d","M"+d+","+y+"H"+u+(x==="sd"?"m0,0L"+g+","+D+"L"+d+","+y+"L"+g+","+P+"Z":""))})}q.exports={plot:t,plotBoxAndWhiskers:r,plotPoints:o,plotBoxMean:a}}}),W2=He({"src/traces/box/style.js"(Z,q){"use strict";var v=Vn(),_=$n(),S=as();function M(t,r,o){var a=o||v.select(t).selectAll("g.trace.boxes");a.style("opacity",function(i){return i[0].trace.opacity}),a.each(function(i){var n=v.select(this),s=i[0].trace,h=s.line.width;function f(T,l,x,w){T.style("stroke-width",l+"px").call(_.stroke,x).call(_.fill,w)}var m=n.selectAll("path.box");if(s.type==="candlestick")m.each(function(T){if(!T.empty){var l=v.select(this),x=s[T.dir];f(l,x.line.width,x.line.color,x.fillcolor),l.style("opacity",s.selectedpoints&&!T.selected?.3:1)}});else{f(m,h,s.line.color,s.fillcolor),n.selectAll("path.mean").style({"stroke-width":h,"stroke-dasharray":2*h+"px,"+h+"px"}).call(_.stroke,s.line.color);var c=n.selectAll("path.point");S.pointStyle(c,s,t)}})}function e(t,r,o){var a=r[0].trace,i=o.selectAll("path.point");a.selectedpoints?S.selectedPointStyle(i,a):S.pointStyle(i,a,t)}q.exports={style:M,styleOnSelect:e}}}),Q5=He({"src/traces/box/hover.js"(Z,q){"use strict";var v=Wo(),_=sa(),S=Hc(),M=$n(),e=_.fillText;function t(a,i,n,s){var h=a.cd,f=h[0].trace,m=f.hoveron,c=[],T;return m.indexOf("boxes")!==-1&&(c=c.concat(r(a,i,n,s))),m.indexOf("points")!==-1&&(T=o(a,i,n)),s==="closest"?T?[T]:c:(T&&c.push(T),c)}function r(a,i,n,s){var h=a.cd,f=a.xa,m=a.ya,c=h[0].trace,T=h[0].t,l=c.type==="violin",x,w,A,E,p,b,d,u,g,y,D,P=T.bdPos,z,F,N=T.wHover,O=function(Pe){return A.c2l(Pe.pos)+T.bPos-A.c2l(b)};l&&c.side!=="both"?(c.side==="positive"&&(g=function(Pe){var je=O(Pe);return S.inbox(je,je+N,y)},z=P,F=0),c.side==="negative"&&(g=function(Pe){var je=O(Pe);return S.inbox(je-N,je,y)},z=0,F=P)):(g=function(Pe){var je=O(Pe);return S.inbox(je-N,je+N,y)},z=F=P);var L;l?L=function(Pe){return S.inbox(Pe.span[0]-p,Pe.span[1]-p,y)}:L=function(Pe){return S.inbox(Pe.min-p,Pe.max-p,y)},c.orientation==="h"?(p=i,b=n,d=L,u=g,x="y",A=m,w="x",E=f):(p=n,b=i,d=g,u=L,x="x",A=f,w="y",E=m);var U=Math.min(1,P/Math.abs(A.r2c(A.range[1])-A.r2c(A.range[0])));y=a.maxHoverDistance-U,D=a.maxSpikeDistance-U;function B(Pe){return(d(Pe)+u(Pe))/2}var W=S.getDistanceFunction(s,d,u,B);if(S.getClosest(h,W,a),a.index===!1)return[];var $=h[a.index],ue=c.line.color,ce=(c.marker||{}).color;M.opacity(ue)&&c.line.width?a.color=ue:M.opacity(ce)&&c.boxpoints?a.color=ce:a.color=c.fillcolor,a[x+"0"]=A.c2p($.pos+T.bPos-F,!0),a[x+"1"]=A.c2p($.pos+T.bPos+z,!0),a[x+"LabelVal"]=$.orig_p!==void 0?$.orig_p:$.pos;var de=x+"Spike";a.spikeDistance=B($)*D/y,a[de]=A.c2p($.pos,!0);var Y=c.boxmean||c.sizemode==="sd"||(c.meanline||{}).visible,X=c.boxpoints||c.points,Q=X&&Y?["max","uf","q3","med","mean","q1","lf","min"]:X&&!Y?["max","uf","q3","med","q1","lf","min"]:!X&&Y?["max","q3","med","mean","q1","min"]:["max","q3","med","q1","min"],V=E.range[1]0&&(o=!0);for(var s=0;st){var r=t-M[_];return M[_]=t,r}}else return M[_]=t,t;return 0},max:function(_,S,M,e){var t=e[S];if(v(t))if(t=Number(t),v(M[_])){if(M[_]d&&dM){var y=u===_?1:6,D=u===_?"M12":"M1";return function(P,z){var F=T.c2d(P,_,l),N=F.indexOf("-",y);N>0&&(F=F.slice(0,N));var O=T.d2c(F,0,l);if(Or?h>M?h>_*1.1?_:h>S*1.1?S:M:h>e?e:h>t?t:r:Math.pow(10,Math.floor(Math.log(h)/Math.LN10))}function n(h,f,m,c,T,l){if(c&&h>M){var x=s(f,T,l),w=s(m,T,l),A=h===_?0:1;return x[A]!==w[A]}return Math.floor(m/h)-Math.floor(f/h)>.1}function s(h,f,m){var c=f.c2d(h,_,m).split("-");return c[0]===""&&(c.unshift(),c[0]="-"+c[0]),c}}}),oS=He({"src/traces/histogram/calc.js"(Z,q){"use strict";var v=ns(),_=sa(),S=so(),M=Wo(),{hasColorscale:e}=wp(),t=Tp(),r=B_(),o=rS(),a=aS(),i=iS(),n=nS();function s(T,l){var x=[],w=[],A=l.orientation==="h",E=M.getFromId(T,A?l.yaxis:l.xaxis),p=A?"y":"x",b={x:"y",y:"x"}[p],d=l[p+"calendar"],u=l.cumulative,g,y=h(T,l,E,p),D=y[0],P=y[1],z=typeof D.size=="string",F=[],N=z?F:D,O=[],L=[],U=[],B=0,W=l.histnorm,$=l.histfunc,ue=W.indexOf("density")!==-1,ce,de,Y;u.enabled&&ue&&(W=W.replace(/ ?density$/,""),ue=!1);var X=$==="max"||$==="min",Q=X?null:0,V=o.count,le=a[W],ae=!1,j=function(Ce){return E.r2c(Ce,0,d)},ee;for(_.isArrayOrTypedArray(l[b])&&$!=="count"&&(ee=l[b],ae=$==="avg",V=o[$]),g=j(D.start),de=j(D.end)+(g-M.tickIncrement(g,D.size,!1,d))/1e6;g=0&&Y=he;g--)if(w[g]){se=g;break}for(g=he;g<=se;g++)if(v(x[g])&&v(w[g])){var ne={p:x[g],s:w[g],b:0};u.enabled||(ne.pts=U[g],Se?ne.ph0=ne.ph1=U[g].length?P[U[g][0]]:x[g]:(l._computePh=!0,ne.ph0=nt(F[g]),ne.ph1=nt(F[g+1],!0))),Ve.push(ne)}return Ve.length===1&&(Ve[0].width1=M.tickIncrement(Ve[0].p,D.size,!1,d)-Ve[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(Ve,l),_.isArrayOrTypedArray(l.selectedpoints)&&_.tagSelected(Ve,l,je),Ve}function h(T,l,x,w,A){var E=w+"bins",p=T._fullLayout,b=l["_"+w+"bingroup"],d=p._histogramBinOpts[b],u=p.barmode==="overlay",g,y,D,P,z,F,N,O=function(at){return x.r2c(at,0,P)},L=function(at){return x.c2r(at,0,P)},U=x.type==="date"?function(at){return at||at===0?_.cleanDate(at,null,P):null}:function(at){return v(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],_.nestedProperty(y[0],E+"."+at).set(tt[at]))}if(l["_"+w+"autoBinFinished"])delete l["_"+w+"autoBinFinished"];else{y=d.traces;var W=[],$=!0,ue=!1,ce=!1;for(g=0;g"u"){if(A)return[Y,z,!0];Y=f(T,l,x,w,E)}N=D.cumulative||{},N.enabled&&N.currentbin!=="include"&&(N.direction==="decreasing"?Y.start=L(M.tickIncrement(O(Y.start),Y.size,!0,P)):Y.end=L(M.tickIncrement(O(Y.end),Y.size,!1,P))),d.size=Y.size,d.sizeFound||(F.size=Y.size,_.nestedProperty(y[0],E+".size").set(Y.size)),B("start",d,Y),B("end",d,Y)}z=l["_"+w+"pos0"],delete l["_"+w+"pos0"];var Q=l._input[E]||{},V=_.extendFlat({},d),le=d.start,ae=x.r2l(Q.start),j=ae!==void 0;if((d.startFound||j)&&ae!==x.r2l(le)){var ee=j?ae:_.aggNums(Math.min,null,z),te={type:x.type==="category"||x.type==="multicategory"?"linear":x.type,r2l:x.r2l,dtick:d.size,tick0:le,calendar:P,range:[ee,M.tickIncrement(ee,d.size,!1,P)].map(x.l2r)},pe=M.tickFirst(te);pe>x.r2l(ee)&&(pe=M.tickIncrement(pe,d.size,!0,P)),V.start=x.l2r(pe),j||_.nestedProperty(l,E+".start").set(V.start)}var we=d.end,Se=x.r2l(Q.end),Re=Se!==void 0;if((d.endFound||Re)&&Se!==x.r2l(we)){var Pe=Re?Se:_.aggNums(Math.max,null,z);V.end=x.l2r(Pe),Re||_.nestedProperty(l,E+".start").set(V.end)}var je="autobin"+w;return l._input[je]===!1&&(l._input[E]=_.extendFlat({},l[E]||{}),delete l._input[je],delete l[je]),[V,z]}function f(T,l,x,w,A){var E=T._fullLayout,p=m(T,l),b=!1,d=1/0,u=[l],g,y,D;for(g=0;g=0;w--)b(w);else if(l==="increasing"){for(w=1;w=0;w--)T[w]+=T[w+1];x==="exclude"&&(T.push(0),T.shift())}}q.exports={calc:s,calcAllAutoBins:h}}}),aF=He({"src/traces/histogram2d/calc.js"(Z,q){"use strict";var v=sa(),_=Wo(),S=rS(),M=aS(),e=iS(),t=nS(),r=oS().calcAllAutoBins;q.exports=function(s,h){var f=_.getFromId(s,h.xaxis),m=_.getFromId(s,h.yaxis),c=h.xcalendar,T=h.ycalendar,l=function(Fe){return f.r2c(Fe,0,c)},x=function(Fe){return m.r2c(Fe,0,T)},w=function(Fe){return f.c2r(Fe,0,c)},A=function(Fe){return m.c2r(Fe,0,T)},E,p,b,d,u=r(s,h,f,"x"),g=u[0],y=u[1],D=r(s,h,m,"y"),P=D[0],z=D[1],F=h._length;y.length>F&&y.splice(F,y.length-F),z.length>F&&z.splice(F,z.length-F);var N=[],O=[],L=[],U=typeof g.size=="string",B=typeof P.size=="string",W=[],$=[],ue=U?W:g,ce=B?$:P,de=0,Y=[],X=[],Q=h.histnorm,V=h.histfunc,le=Q.indexOf("density")!==-1,ae=V==="max"||V==="min",j=ae?null:0,ee=S.count,te=M[Q],pe=!1,we=[],Se=[],Re="z"in h?h.z:"marker"in h&&Array.isArray(h.marker.color)?h.marker.color:"";Re&&V!=="count"&&(pe=V==="avg",ee=S[V]);var Pe=g.size,je=l(g.start),at=l(g.end)+(je-_.tickIncrement(je,Pe,!1,c))/1e6;for(E=je;E=0&&b=0&&d_;i++)a=e(r,o,M(a));return a>_&&v.log("interp2d didn't converge quickly",a),r};function e(t,r,o){var a=0,i,n,s,h,f,m,c,T,l,x,w,A,E;for(h=0;hA&&(a=Math.max(a,Math.abs(t[n][s]-w)/(E-A))))}return a}}}),J2=He({"src/traces/heatmap/find_empties.js"(Z,q){"use strict";var v=sa().maxRowLength;q.exports=function(S){var M=[],e={},t=[],r=S[0],o=[],a=[0,0,0],i=v(S),n,s,h,f,m,c,T,l;for(s=0;s=0;m--)f=t[m],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(m,1),l=!0);if(!l)throw"findEmpties iterated with no new neighbors";for(f in T)e[f]=T[f],M.push(T[f])}return M.sort(function(x,w){return w[2]-x[2]})}}}),sS=He({"src/traces/heatmap/make_bound_array.js"(Z,q){"use strict";var v=so(),_=sa().isArrayOrTypedArray;q.exports=function(M,e,t,r,o,a){var i=[],n=v.traceIs(M,"contour"),s=v.traceIs(M,"histogram"),h,f,m,c=_(e)&&e.length>1;if(c&&!s&&a.type!=="category"){var T=e.length;if(T<=o){if(n)i=Array.from(e).slice(0,o);else if(o===1)a.type==="log"?i=[.5*e[0],2*e[0]]:i=[e[0]-.5,e[0]+.5];else if(a.type==="log"){for(i=[Math.pow(e[0],1.5)/Math.pow(e[1],.5)],m=1;m1){var Q=(X[X.length-1]-X[0])/(X.length-1),V=Math.abs(Q/100);for(F=0;FV)return!1}return!0}T._islinear=!1,l.type==="log"||x.type==="log"?E==="fast"&&L("log axis found"):U(p)?U(g)?T._islinear=!0:E==="fast"&&L("y scale is not linear"):E==="fast"&&L("x scale is not linear");var B=_.maxRowLength(z),W=T.xtype==="scaled"?"":p,$=n(T,W,b,d,B,l),ue=T.ytype==="scaled"?"":g,ce=n(T,ue,y,D,z.length,x);T._extremes[l._id]=S.findExtremes(l,$),T._extremes[x._id]=S.findExtremes(x,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&&P&&(de.orig_y=P),W&&W.length===$.length-1&&(de.xCenter=W),ue&&ue.length===ce.length-1&&(de.yCenter=ue),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 Y={type:T.type==="contour"?"heatmap":"histogram2d",xcalendar:T.xcalendar,ycalendar:T.ycalendar};de.xfill=n(Y,W,b,d,B,l),de.yfill=n(Y,ue,y,D,z.length,x)}return[de]};function h(m){for(var c=[],T=m.length,l=0;l0;)le=g.c2p(U[te]),te--;for(le0;)ee=y.c2p(B[te]),te--;ee=g._length||le<=0||j>=y._length||ee<=0;if(at){var nt=P.selectAll("image").data([]);nt.exit().remove(),x(P);return}var tt,Ve;Se==="fast"?(tt=Y,Ve=de):(tt=Pe,Ve=je);var he=document.createElement("canvas");he.width=tt,he.height=Ve;var se=he.getContext("2d",{willReadFrequently:!0}),ne=n(F,{noNumericCheck:!0,returnArray:!0}),Ce,Ze;Se==="fast"?(Ce=X?function(ba){return Y-1-ba}:t.identity,Ze=Q?function(ba){return de-1-ba}:t.identity):(Ce=function(ba){return t.constrain(Math.round(g.c2p(U[ba])-V),0,Pe)},Ze=function(ba){return t.constrain(Math.round(y.c2p(B[ba])-j),0,je)});var rt=Ze(0),Je=[rt,rt],St=X?0:1,kt=Q?0:1,Bt=0,Vt=0,Ar=0,vr=0,qr,kr,Ur,_t,Fe;function Ye(ba,Ai){if(ba!==void 0){var ki=ne(ba);return ki[0]=Math.round(ki[0]),ki[1]=Math.round(ki[1]),ki[2]=Math.round(ki[2]),Bt+=Ai,Vt+=ki[0]*Ai,Ar+=ki[1]*Ai,vr+=ki[2]*Ai,ki}return[0,0,0,0]}function Ae(ba,Ai,ki,Ki){var Mn=ba[ki.bin0];if(Mn===void 0)return Ye(void 0,1);var wn=ba[ki.bin1],On=Ai[ki.bin0],En=Ai[ki.bin1],ao=wn-Mn||0,Co=On-Mn||0,bo;return wn===void 0?En===void 0?bo=0:On===void 0?bo=2*(En-Mn):bo=(2*En-On-Mn)*2/3:En===void 0?On===void 0?bo=0:bo=(2*Mn-wn-On)*2/3:On===void 0?bo=(2*En-wn-Mn)*2/3:bo=En+Mn-wn-On,Ye(Mn+ki.frac*ao+Ki.frac*(Co+ki.frac*bo))}if(Se!=="default"){var Le=0,We;try{We=new Uint8Array(tt*Ve*4)}catch{We=new Array(tt*Ve*4)}if(Se==="smooth"){var Ke=W||U,st=$||B,ot=new Array(Ke.length),Ut=new Array(st.length),Ct=new Array(Pe),Pt=W?A:w,jt=$?A:w,cr,or,nr;for(te=0;te$a||$a>y._length))for(pe=ta;peri||ri>g._length)){var pi=o({x:Za,y:Ba},F,p._fullLayout);pi.x=Za,pi.y=Ba;var Ia=z.z[te][pe];Ia===void 0?(pi.z="",pi.zLabel=""):(pi.z=Ia,pi.zLabel=e.tickText(Yt,Ia,"hover").text);var rn=z.text&&z.text[te]&&z.text[te][pe];(rn===void 0||rn===!1)&&(rn=""),pi.text=rn;var tn=t.texttemplateString({data:[pi,F._meta],fallback:F.texttemplatefallback,labels:pi,locale:p._fullLayout._d3locale,template:hi});if(tn){var cn=tn.split("
"),xt=cn.length,ut=0;for(we=0;we=x[0].length||D<0||D>x.length)return}else{if(v.inbox(o-T[0],o-T[T.length-1],0)>0||v.inbox(a-l[0],a-l[l.length-1],0)>0)return;if(s){var P;for(b=[2*T[0]-T[1]],P=1;P=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}}}),V_=He({"src/traces/contour/attributes.js"(Z,q){"use strict";var v=p1(),_=af(),S=rf(),M=S.axisHoverFormat,e=S.descriptionOnlyNumbers,t=ku(),r=Hh().dash,o=tc(),a=rs().extendFlat,i=o3(),n=i.COMPARISON_OPS2,s=i.INTERVAL_OPS,h=_.line;q.exports=a({z:v.z,x:v.x,x0:v.x0,dx:v.dx,y:v.y,y0:v.y0,dy:v.dy,xperiod:v.xperiod,yperiod:v.yperiod,xperiod0:_.xperiod0,yperiod0:_.yperiod0,xperiodalignment:v.xperiodalignment,yperiodalignment:v.yperiodalignment,text:v.text,hovertext:v.hovertext,transpose:v.transpose,xtype:v.xtype,ytype:v.ytype,xhoverformat:M("x"),yhoverformat:M("y"),zhoverformat:M("z",1),hovertemplate:v.hovertemplate,hovertemplatefallback:v.hovertemplatefallback,texttemplate:a({},v.texttemplate,{}),texttemplatefallback:v.texttemplatefallback,textfont:a({},v.textfont,{}),hoverongaps:v.hoverongaps,connectgaps:a({},v.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(n).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:_.zorder},t("",{cLetter:"z",autoColorDflt:!1,editTypeOverride:"calc"}))}}),hS=He({"src/traces/histogram2dcontour/attributes.js"(Z,q){"use strict";var v=n3(),_=V_(),S=ku(),M=rf().axisHoverFormat,e=rs().extendFlat;q.exports=e({x:v.x,y:v.y,z:v.z,marker:v.marker,histnorm:v.histnorm,histfunc:v.histfunc,nbinsx:v.nbinsx,xbins:v.xbins,nbinsy:v.nbinsy,ybins:v.ybins,autobinx:v.autobinx,autobiny:v.autobiny,bingroup:v.bingroup,xbingroup:v.xbingroup,ybingroup:v.ybingroup,autocontour:_.autocontour,ncontours:_.ncontours,contours:_.contours,line:{color:_.line.color,width:e({},_.line.width,{dflt:.5}),dash:_.line.dash,smoothing:_.line.smoothing,editType:"plot"},xhoverformat:M("x"),yhoverformat:M("y"),zhoverformat:M("z",1),hovertemplate:v.hovertemplate,hovertemplatefallback:v.hovertemplatefallback,texttemplate:_.texttemplate,texttemplatefallback:_.texttemplatefallback,textfont:_.textfont},S("",{cLetter:"z",editTypeOverride:"calc"}))}}),s3=He({"src/traces/contour/contours_defaults.js"(Z,q){"use strict";q.exports=function(_,S,M,e){var t=e("contours.start"),r=e("contours.end"),o=t===!1||r===!1,a=M("contours.size"),i;o?i=S.autocontour=!0:i=M("autocontour",!1),(i||!a)&&M("ncontours")}}}),pS=He({"src/traces/contour/label_defaults.js"(Z,q){"use strict";var v=sa();q.exports=function(S,M,e,t){t||(t={});var r=S("contours.showlabels");if(r){var o=M.font;v.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,q){"use strict";var v=_h(),_=pS();q.exports=function(M,e,t,r,o){var a=t("contours.coloring"),i,n="";a==="fill"&&(i=t("contours.showlines")),i!==!1&&(a!=="lines"&&(n=t("line.color","#000")),t("line.width",.5),t("line.dash")),a!=="none"&&(M.showlegend!==!0&&(e.showlegend=!1),e._dfltShowLegend=!1,v(M,e,r,t,{prefix:"",cLetter:"z"})),t("line.smoothing"),_(t,r,n,o)}}}),vF=He({"src/traces/histogram2dcontour/defaults.js"(Z,q){"use strict";var v=sa(),_=fS(),S=s3(),M=l3(),e=q_(),t=hS();q.exports=function(o,a,i,n){function s(f,m){return v.coerce(o,a,t,f,m)}function h(f){return v.coerce2(o,a,t,f)}_(o,a,s,n),a.visible!==!1&&(S(o,a,s,h),M(o,a,s,n),s("xhoverformat"),s("yhoverformat"),s("hovertemplate"),s("hovertemplatefallback"),a.contours&&a.contours.coloring==="heatmap"&&e(s,n))}}}),dS=He({"src/traces/contour/set_contours.js"(Z,q){"use strict";var v=Wo(),_=sa();q.exports=function(e,t){var r=e.contours;if(e.autocontour){var o=e.zmin,a=e.zmax;(e.zauto||o===void 0)&&(o=_.aggNums(Math.min,null,t)),(e.zauto||a===void 0)&&(a=_.aggNums(Math.max,null,t));var i=S(o,a,e.ncontours);r.size=i.dtick,r.start=v.tickFirst(i),i.range.reverse(),r.end=v.tickFirst(i),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={}),_.extendFlat(e._input.contours,{start:r.start,end:r.end,size:r.size}),e._input.autocontour=!0}else if(r.type!=="constraint"){var n=r.start,s=r.end,h=e._input.contours;if(n>s&&(r.start=h.start=s,s=r.end=h.end=n,n=r.start),!(r.size>0)){var f;n===s?f=1:f=S(n,s,e.ncontours).dtick,h.size=r.size=f}}};function S(M,e,t){var r={type:"linear",range:[M,e]};return v.autoTicks(r,(e-M)/(t||15)),r}}}),G_=He({"src/traces/contour/end_plus.js"(Z,q){"use strict";q.exports=function(_){return _.end+_.size/1e6}}}),vS=He({"src/traces/contour/calc.js"(Z,q){"use strict";var v=rc(),_=$2(),S=dS(),M=G_();q.exports=function(t,r){var o=_(t,r),a=o[0].z;S(r,a);var i=r.contours,n=v.extractOpts(r),s;if(i.coloring==="heatmap"&&n.auto&&r.autocontour===!1){var h=i.start,f=M(i),m=i.size||1,c=Math.floor((f-h)/m)+1;isFinite(m)||(m=1,c=1);var T=h-m/2,l=T+c*m;s=[T,l]}else s=a;return v.calc(t,r,{vals:s,cLetter:"z"}),o}}}),H_=He({"src/traces/contour/constants.js"(Z,q){"use strict";q.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,q){"use strict";var v=H_();q.exports=function(M){var e=M[0].z,t=e.length,r=e[0].length,o=t===2||r===2,a,i,n,s,h,f,m,c,T;for(i=0;iS?0:1)+(M[0][1]>S?0:2)+(M[1][1]>S?0:4)+(M[1][0]>S?0:8);if(e===5||e===10){var t=(M[0][0]+M[0][1]+M[1][0]+M[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,q){"use strict";var v=sa(),_=H_();q.exports=function(a,i,n){var s,h,f,m,c;for(i=i||.01,n=n||.01,f=0;f20?(f=_.CHOOSESADDLE[f][(m[0]||m[1])<0?0:1],o.crossings[h]=_.SADDLEREMAINDER[f]):delete o.crossings[h],m=_.NEWDELTA[f],!m){v.log("Found bad marching index:",f,a,o.level);break}c.push(r(o,a,m)),a[0]+=m[0],a[1]+=m[1],h=a.join(","),S(c[c.length-1],c[c.length-2],n,s)&&c.pop();var E=m[0]&&(a[0]<0||a[0]>l-2)||m[1]&&(a[1]<0||a[1]>T-2),p=a[0]===x[0]&&a[1]===x[1]&&m[0]===w[0]&&m[1]===w[1];if(p||i&&E)break;f=o.crossings[h]}A===1e4&&v.log("Infinite loop in contour?");var b=S(c[0],c[c.length-1],n,s),d=0,u=.2*o.smoothing,g=[],y=0,D,P,z,F,N,O,L,U,B,W,$;for(A=1;A=y;A--)if(D=g[A],D=y&&D+g[P]U&&B--,o.edgepaths[B]=$.concat(c,W));break}Y||(o.edgepaths[U]=c.concat(W))}for(U=0;U20&&a?o===208||o===1114?n=i[0]===0?1:-1:s=i[1]===0?1:-1:_.BOTTOMSTART.indexOf(o)!==-1?s=1:_.LEFTSTART.indexOf(o)!==-1?n=1:_.TOPSTART.indexOf(o)!==-1?s=-1:n=-1,[n,s]}function r(o,a,i){var n=a[0]+Math.max(i[0],0),s=a[1]+Math.max(i[1],0),h=o.z[s][n],f=o.xaxis,m=o.yaxis;if(i[1]){var c=(o.level-h)/(o.z[s][n+1]-h),T=(c!==1?(1-c)*f.c2l(o.x[n]):0)+(c!==0?c*f.c2l(o.x[n+1]):0);return[f.c2p(f.l2c(T),!0),m.c2p(o.y[s],!0),n+c,s]}else{var l=(o.level-h)/(o.z[s+1][n]-h),x=(l!==1?(1-l)*m.c2l(o.y[s]):0)+(l!==0?l*m.c2l(o.y[s+1]):0);return[f.c2p(o.x[n],!0),m.c2p(m.l2c(x),!0),n,s+l]}}}}),mF=He({"src/traces/contour/constraint_mapping.js"(Z,q){"use strict";var v=o3(),_=ns();q.exports={"[]":M("[]"),"][":M("]["),">":e(">"),"<":e("<"),"=":e("=")};function S(t,r){var o=Array.isArray(r),a;function i(n){return _(n)?+n:null}return v.COMPARISON_OPS2.indexOf(t)!==-1?a=i(o?r[0]:r):v.INTERVAL_OPS.indexOf(t)!==-1?a=o?[i(r[0]),i(r[1])]:[i(r),i(r)]:v.SET_OPS.indexOf(t)!==-1&&(a=o?r.map(i):[i(r)]),a}function M(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,q){"use strict";var v=sa(),_=mF(),S=G_();q.exports=function(e,t,r){for(var o=e.type==="constraint"?_[e._operation](e.value):e,a=o.size,i=[],n=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){v.warn("Too many contours, clipping at 1000",e);break}return i}}}),_S=He({"src/traces/contour/convert_to_constraints.js"(Z,q){"use strict";var v=sa();q.exports=function(S,M){var e,t,r,o=function(n){return n.reverse()},a=function(n){return n};switch(M){case"=":case"<":return S;case">":for(S.length!==1&&v.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,i=-1/0,n=1/0;for(e=0;e":s>i&&(S.prefixBoundary=!0);break;case"<":(si||S.starts.length&&f===n)&&(S.prefixBoundary=!0);break;case"][":h=Math.min(s[0],s[1]),f=Math.max(s[0],s[1]),hi&&(S.prefixBoundary=!0);break}break}}}}),u3=He({"src/traces/contour/plot.js"(Z){"use strict";var q=Vn(),v=sa(),_=as(),S=rc(),M=su(),e=Wo(),t=wv(),r=e3(),o=mS(),a=gS(),i=yS(),n=_S(),s=xS(),h=H_(),f=h.LABELOPTIMIZER;Z.plot=function(p,b,d,u){var g=b.xaxis,y=b.yaxis;v.makeTraceGroups(u,d,"contour").each(function(D){var P=q.select(this),z=D[0],F=z.trace,N=z.x,O=z.y,L=F.contours,U=i(L,b,z),B=v.ensureSingle(P,"g","heatmapcoloring"),W=[];L.coloring==="heatmap"&&(W=[D]),r(p,b,W,B),o(U),a(U);var $=g.c2p(N[0],!0),ue=g.c2p(N[N.length-1],!0),ce=y.c2p(O[0],!0),de=y.c2p(O[O.length-1],!0),Y=[[$,de],[ue,de],[ue,ce],[$,ce]],X=U;L.type==="constraint"&&(X=n(U,L._operation)),m(P,Y,L),c(P,X,Y,L),l(P,U,p,z,L),w(P,b,p,z,Y)})};function m(E,p,b){var d=v.ensureSingle(E,"g","contourbg"),u=d.selectAll("path").data(b.coloring==="fill"?[0]:[]);u.enter().append("path"),u.exit().remove(),u.attr("d","M"+p.join("L")+"Z").style("stroke","none")}function c(E,p,b,d){var u=d.coloring==="fill"||d.type==="constraint"&&d._operation!=="=",g="M"+b.join("L")+"Z";u&&s(p,d);var y=v.ensureSingle(E,"g","contourfill"),D=y.selectAll("path").data(u?p:[]);D.enter().append("path"),D.exit().remove(),D.each(function(P){var z=(P.prefixBoundary?g:"")+T(P,b);z?q.select(this).attr("d",z).style("stroke","none"):q.select(this).remove()})}function T(E,p){var b="",d=0,u=E.edgepaths.map(function($,ue){return ue}),g=!0,y,D,P,z,F,N;function O($){return Math.abs($[1]-p[0][1])<.01}function L($){return Math.abs($[1]-p[2][1])<.01}function U($){return Math.abs($[0]-p[0][0])<.01}function B($){return Math.abs($[0]-p[2][0])<.01}for(;u.length;){for(N=_.smoothopen(E.edgepaths[d],E.smoothing),b+=g?N:N.replace(/^M/,"L"),u.splice(u.indexOf(d),1),y=E.edgepaths[d][E.edgepaths[d].length-1],z=-1,P=0;P<4;P++){if(!y){v.log("Missing end?",d,E);break}for(O(y)&&!B(y)?D=p[1]:U(y)?D=p[0]:L(y)?D=p[3]:B(y)&&(D=p[2]),F=0;F=0&&(D=W,z=F):Math.abs(y[1]-D[1])<.01?Math.abs(y[1]-W[1])<.01&&(W[0]-y[0])*(D[0]-W[0])>=0&&(D=W,z=F):v.log("endpt to newendpt is not vert. or horz.",y,D,W)}if(y=D,z>=0)break;b+="L"+D}if(z===E.edgepaths.length){v.log("unclosed perimeter path");break}d=z,g=u.indexOf(d)===-1,g&&(d=u[0],b+="Z")}for(d=0;df.MAXCOST*2)break;O&&(D/=2),y=z-D/2,P=y+D*1.5}if(N<=f.MAXCOST)return F};function x(E,p,b,d){var u=p.width/2,g=p.height/2,y=E.x,D=E.y,P=E.theta,z=Math.cos(P)*u,F=Math.sin(P)*u,N=(y>d.center?d.right-y:y-d.left)/(z+Math.abs(Math.sin(P)*g)),O=(D>d.middle?d.bottom-D:D-d.top)/(Math.abs(F)+Math.cos(P)*g);if(N<1||O<1)return 1/0;var L=f.EDGECOST*(1/(N-1)+1/(O-1));L+=f.ANGLECOST*P*P;for(var U=y-z,B=D-F,W=y+z,$=D+F,ue=0;ue=w)&&(r<=x&&(r=x),o>=w&&(o=w),i=Math.floor((o-r)/a)+1,n=0),l=0;lx&&(m.unshift(x),c.unshift(c[0])),m[m.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])]:v(s.value)&&(h=parseFloat(s.value),s.value=[h,h+1])):(n("contours.value",0),v(s.value)||(r(s.value)?s.value=parseFloat(s.value[0]):s.value=0))}}}),_F=He({"src/traces/contour/defaults.js"(Z,q){"use strict";var v=sa(),_=X2(),S=Qd(),M=TS(),e=s3(),t=l3(),r=q_(),o=V_();q.exports=function(i,n,s,h){function f(l,x){return v.coerce(i,n,o,l,x)}function m(l){return v.coerce2(i,n,o,l)}var c=_(i,n,f,h);if(!c){n.visible=!1;return}S(i,n,h,f),f("xhoverformat"),f("yhoverformat"),f("text"),f("hovertext"),f("hoverongaps"),f("hovertemplate"),f("hovertemplatefallback");var T=f("contours.type")==="constraint";f("connectgaps",v.isArray1D(n.z)),T?M(i,n,f,h,s):(e(i,n,f,m),t(i,n,f,h)),n.contours&&n.contours.coloring==="heatmap"&&r(f,h),f("zorder")}}}),xF=He({"src/traces/contour/index.js"(Z,q){"use strict";q.exports={attributes:V_(),supplyDefaults:_F(),calc:vS(),plot:u3().plot,style:c3(),colorbar:f3(),hoverPoints:wS(),moduleType:"trace",name:"contour",basePlotModule:Kf(),categories:["cartesian","svg","2dMap","contour","showLegend"],meta:{}}}}),bF=He({"lib/contour.js"(Z,q){"use strict";q.exports=xF()}}),AS=He({"src/traces/scatterternary/attributes.js"(Z,q){"use strict";var{hovertemplateAttrs:v,texttemplateAttrs:_,templatefallbackAttrs:S}=$l(),M=$d(),e=af(),t=au(),r=ku(),o=Hh().dash,a=rs().extendFlat,i=e.marker,n=e.line,s=i.line;q.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:_({editType:"plot"},{keys:["a","b","c","text"]}),texttemplatefallback:S({editType:"plot"}),hovertext:a({},e.hovertext,{}),line:{color:n.color,width:n.width,dash:o,backoff:n.backoff,shape:a({},n.shape,{values:["linear","spline"]}),smoothing:n.smoothing,editType:"calc"},connectgaps:e.connectgaps,cliponaxis:e.cliponaxis,fill:a({},e.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:M(),marker:a({symbol:i.symbol,opacity:i.opacity,angle:i.angle,angleref:i.angleref,standoff:i.standoff,maxdisplayed:i.maxdisplayed,size:i.size,sizeref:i.sizeref,sizemin:i.sizemin,sizemode:i.sizemode,line:a({width:s.width,dash:s.dash,editType:"calc"},r("marker.line")),gradient:i.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:v(),hovertemplatefallback:S()}}}),wF=He({"src/traces/scatterternary/defaults.js"(Z,q){"use strict";var v=sa(),_=Tv(),S=Fu(),M=md(),e=Dd(),t=o1(),r=zd(),o=ev(),a=AS();q.exports=function(n,s,h,f){function m(E,p){return v.coerce(n,s,a,E,p)}var c=m("a"),T=m("b"),l=m("c"),x;if(c?(x=c.length,T?(x=Math.min(x,T.length),l&&(x=Math.min(x,l.length))):l?x=Math.min(x,l.length):x=0):T&&l&&(x=Math.min(T.length,l.length)),!x){s.visible=!1;return}s._length=x,m("sum"),m("text"),m("hovertext"),s.hoveron!=="fills"&&(m("hovertemplate"),m("hovertemplatefallback"));var w=x<_.PTS_LINESONLY?"lines+markers":"lines";m("mode",w),S.hasMarkers(s)&&M(n,s,h,f,m,{gradient:!0}),S.hasLines(s)&&(e(n,s,h,f,m,{backoff:!0}),t(n,s,m),m("connectgaps")),S.hasText(s)&&(m("texttemplate"),m("texttemplatefallback"),r(n,s,f,m));var A=[];(S.hasMarkers(s)||S.hasText(s))&&(m("cliponaxis"),m("marker.maxdisplayed"),A.push("points")),m("fill"),s.fill!=="none"&&(o(n,s,h,m),S.hasLines(s)||t(n,s,m)),(s.fill==="tonext"||s.fill==="toself")&&A.push("fills"),m("hoveron",A.join("+")||"points"),v.coerceSelectionMarkerOpacity(s,m)}}}),TF=He({"src/traces/scatterternary/format_labels.js"(Z,q){"use strict";var v=Wo();q.exports=function(S,M,e){var t={},r=e[M.subplot]._subplot;return t.aLabel=v.tickText(r.aaxis,S.a,!0).text,t.bLabel=v.tickText(r.baxis,S.b,!0).text,t.cLabel=v.tickText(r.caxis,S.c,!0).text,t}}}),AF=He({"src/traces/scatterternary/calc.js"(Z,q){"use strict";var v=ns(),_=Fd(),S=Av(),M=Od(),e=Bd().calcMarkerSize,t=["a","b","c"],r={a:["b","c"],b:["a","c"],c:["a","b"]};q.exports=function(a,i){var n=a._fullLayout[i.subplot],s=n.sum,h=i.sum||s,f={a:i.a,b:i.b,c:i.c},m=i.ids,c,T,l,x,w,A;for(c=0;c"),o.hovertemplate=f.hovertemplate,r}}}),EF=He({"src/traces/scatterternary/event_data.js"(Z,q){"use strict";q.exports=function(_,S,M,e,t){if(S.xa&&(_.xaxis=S.xa),S.ya&&(_.yaxis=S.ya),e[t]){var r=e[t];_.a=r.a,_.b=r.b,_.c=r.c}else _.a=S.a,_.b=S.b,_.c=S.c;return _}}}),kF=He({"src/plots/ternary/ternary.js"(Z,q){"use strict";var v=Vn(),_=Ch(),S=so(),M=sa(),e=M.strTranslate,t=M._,r=$n(),o=as(),a=wv(),i=rs().extendFlat,n=bc(),s=Wo(),h=Ap(),f=Hc(),m=Jd(),c=m.freeMode,T=m.rectMode,l=K0(),x=Af().prepSelect,w=Af().selectOnClick,A=Af().clearOutline,E=Af().clearSelectionsCache,p=lh();function b(L,U){this.id=L.id,this.graphDiv=L.graphDiv,this.init(U),this.makeFramework(U),this.updateFx(U),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}q.exports=b;var d=b.prototype;d.init=function(L){this.container=L._ternarylayer,this.defs=L._defs,this.layoutId=L._uid,this.traceHash={},this.layers={}},d.plot=function(L,U){var B=this,W=U[B.id],$=U._size;B._hasClipOnAxisFalse=!1;for(var ue=0;ueu*X?(pe=X,te=pe*u):(te=Y,pe=te/u),we=ce*te/Y,Se=de*pe/X,j=U.l+U.w*$-te/2,ee=U.t+U.h*(1-ue)-pe/2,B.x0=j,B.y0=ee,B.w=te,B.h=pe,B.sum=Q,B.xaxis={type:"linear",range:[V+2*ae-Q,Q-V-2*le],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:[V,Q-le-ae],domain:[ue-Se/2,ue+Se/2],_id:"y"},a(B.yaxis,B.graphDiv._fullLayout),B.yaxis.setScale(),B.yaxis.isPtWithinRange=function(){return!0};var Re=B.yaxis.domain[0],Pe=B.aaxis=i({},L.aaxis,{range:[V,Q-le-ae],side:"left",tickangle:(+L.aaxis.tickangle||0)-30,domain:[Re,Re+Se*u],anchor:"free",position:0,_id:"y",_length:te});a(Pe,B.graphDiv._fullLayout),Pe.setScale();var je=B.baxis=i({},L.baxis,{range:[Q-V-ae,le],side:"bottom",domain:B.xaxis.domain,anchor:"free",position:0,_id:"x",_length:te});a(je,B.graphDiv._fullLayout),je.setScale();var at=B.caxis=i({},L.caxis,{range:[Q-V-le,ae],side:"right",tickangle:(+L.caxis.tickangle||0)+30,domain:[Re,Re+Se*u],anchor:"free",position:0,_id:"y",_length:te});a(at,B.graphDiv._fullLayout),at.setScale();var nt="M"+j+","+(ee+pe)+"h"+te+"l-"+te/2+",-"+pe+"Z";B.clipDef.select("path").attr("d",nt),B.layers.plotbg.select("path").attr("d",nt);var tt="M0,"+pe+"h"+te+"l-"+te/2+",-"+pe+"Z";B.clipDefRelative.select("path").attr("d",tt);var Ve=e(j,ee);B.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",Ve),B.clipDefRelative.select("path").attr("transform",null);var he=e(j-je._offset,ee+pe);B.layers.baxis.attr("transform",he),B.layers.bgrid.attr("transform",he);var se=e(j+te/2,ee)+"rotate(30)"+e(0,-Pe._offset);B.layers.aaxis.attr("transform",se),B.layers.agrid.attr("transform",se);var ne=e(j+te/2,ee)+"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",Pe.showline?"M"+j+","+(ee+pe)+"l"+te/2+",-"+pe:"M0,0").call(r.stroke,Pe.linecolor||"#000").style("stroke-width",(Pe.linewidth||0)+"px"),B.layers.bline.select("path").attr("d",je.showline?"M"+j+","+(ee+pe)+"h"+te:"M0,0").call(r.stroke,je.linecolor||"#000").style("stroke-width",(je.linewidth||0)+"px"),B.layers.cline.select("path").attr("d",at.showline?"M"+(j+te/2)+","+ee+"l"+te/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)},d.drawAxes=function(L){var U=this,B=U.graphDiv,W=U.id.slice(7)+"title",$=U.layers,ue=U.aaxis,ce=U.baxis,de=U.caxis;if(U.drawAx(ue),U.drawAx(ce),U.drawAx(de),L){var Y=Math.max(ue.showticklabels?ue.tickfont.size/2:0,(de.showticklabels?de.tickfont.size*.75:0)+(de.ticks==="outside"?de.ticklen*.87:0)),X=(ce.showticklabels?ce.tickfont.size:0)+(ce.ticks==="outside"?ce.ticklen:0)+3;$["a-title"]=l.draw(B,"a"+W,{propContainer:ue,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-ue.title.font.size/3-Y,"text-anchor":"middle"}}),$["b-title"]=l.draw(B,"b"+W,{propContainer:ce,propName:U.id+".baxis.title.text",placeholder:t(B,"Click to enter Component B title"),attributes:{x:U.x0-X,y:U.y0+U.h+ce.title.font.size*.83+X,"text-anchor":"middle"}}),$["c-title"]=l.draw(B,"c"+W,{propContainer:de,propName:U.id+".caxis.title.text",placeholder:t(B,"Click to enter Component C title"),attributes:{x:U.x0+U.w+X,y:U.y0+U.h+de.title.font.size*.83+X,"text-anchor":"middle"}})}},d.drawAx=function(L){var U=this,B=U.graphDiv,W=L._name,$=W.charAt(0),ue=L._id,ce=U.layers[W],de=30,Y=$+"tickLayout",X=g(L);U[Y]!==X&&(ce.selectAll("."+ue+"tick").remove(),U[Y]=X),L.setScale();var Q=s.calcTicks(L),V=s.clipEnds(L,Q),le=s.makeTransTickFn(L),ae=s.getTickSigns(L)[2],j=M.deg2rad(de),ee=ae*(L.linewidth||1)/2,te=ae*L.ticklen,pe=U.w,we=U.h,Se=$==="b"?"M0,"+ee+"l"+Math.sin(j)*te+","+Math.cos(j)*te:"M"+ee+",0l"+Math.cos(j)*te+","+-Math.sin(j)*te,Re={a:"M0,0l"+we+",-"+pe/2,b:"M0,0l-"+pe/2+",-"+we,c:"M0,0l-"+we+","+pe/2}[$];s.drawTicks(B,L,{vals:L.ticks==="inside"?V:Q,layer:ce,path:Se,transFn:le,crisp:!1}),s.drawGrid(B,L,{vals:V,layer:U.layers[$+"grid"],path:Re,transFn:le,crisp:!1}),s.drawLabels(B,L,{vals:Q,layer:ce,transFn:le,labelFns:s.makeLabelFns(L,0,de)})};function g(L){return L.ticks+String(L.ticklen)+String(L.showticklabels)}var y=p.MINZOOM/2+.87,D="m-0.87,.5h"+y+"v3h-"+(y+5.2)+"l"+(y/2+2.6)+",-"+(y*.87+4.5)+"l2.6,1.5l-"+y/2+","+y*.87+"Z",P="m0.87,.5h-"+y+"v3h"+(y+5.2)+"l-"+(y/2+2.6)+",-"+(y*.87+4.5)+"l-2.6,1.5l"+y/2+","+y*.87+"Z",z="m0,1l"+y/2+","+y*.87+"l2.6,-1.5l-"+(y/2+2.6)+",-"+(y*.87+4.5)+"l-"+(y/2+2.6)+","+(y*.87+4.5)+"l2.6,1.5l"+y/2+",-"+y*.87+"Z",F="m0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2Z",N=!0;d.clearOutline=function(){E(this.dragOptions),A(this.dragOptions.gd)},d.initInteractions=function(){var L=this,U=L.layers.plotbg.select("path").node(),B=L.graphDiv,W=B._fullLayout._zoomlayer,$,ue;this.dragOptions={element:U,gd:B,plotinfo:{id:L.id,domain:B._fullLayout[L.id].domain,xaxis:L.xaxis,yaxis:L.yaxis},subplot:L.id,prepFn:function(he,se,ne){L.dragOptions.xaxes=[L.xaxis],L.dragOptions.yaxes=[L.yaxis],$=B._fullLayout._invScaleX,ue=B._fullLayout._invScaleY;var Ce=L.dragOptions.dragmode=B._fullLayout.dragmode;c(Ce)?L.dragOptions.minDrag=1:L.dragOptions.minDrag=void 0,Ce==="zoom"?(L.dragOptions.moveFn=je,L.dragOptions.clickFn=pe,L.dragOptions.doneFn=at,we(he,se,ne)):Ce==="pan"?(L.dragOptions.moveFn=tt,L.dragOptions.clickFn=pe,L.dragOptions.doneFn=Ve,nt(),L.clearOutline(B)):(T(Ce)||c(Ce))&&x(he,se,ne,L.dragOptions,Ce)}};var ce,de,Y,X,Q,V,le,ae,j,ee;function te(he){var se={};return se[L.id+".aaxis.min"]=he.a,se[L.id+".baxis.min"]=he.b,se[L.id+".caxis.min"]=he.c,se}function pe(he,se){var ne=B._fullLayout.clickmode;O(B),he===2&&(B.emit("plotly_doubleclick",null),S.call("_guiRelayout",B,te({a:0,b:0,c:0}))),ne.indexOf("select")>-1&&he===1&&w(se,B,[L.xaxis],[L.yaxis],L.id,L.dragOptions),ne.indexOf("event")>-1&&f.click(B,se,L.id)}function we(he,se,ne){var Ce=U.getBoundingClientRect();ce=se-Ce.left,de=ne-Ce.top,B._fullLayout._calcInverseTransform(B);var Ze=B._fullLayout._invTransform,rt=M.apply3DTransform(Ze)(ce,de);ce=rt[0],de=rt[1],Y={a:L.aaxis.range[0],b:L.baxis.range[1],c:L.caxis.range[1]},Q=Y,X=L.aaxis.range[1]-Y.a,V=_(L.graphDiv._fullLayout[L.id].bgcolor).getLuminance(),le="M0,"+L.h+"L"+L.w/2+", 0L"+L.w+","+L.h+"Z",ae=!1,j=W.append("path").attr("class","zoombox").attr("transform",e(L.x0,L.y0)).style({fill:V>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",le),ee=W.append("path").attr("class","zoombox-corners").attr("transform",e(L.x0,L.y0)).style({fill:r.background,stroke:r.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),L.clearOutline(B)}function Se(he,se){return 1-se/L.h}function Re(he,se){return 1-(he+(L.h-se)/Math.sqrt(3))/L.w}function Pe(he,se){return(he-(L.h-se)/Math.sqrt(3))/L.w}function je(he,se){var ne=ce+he*$,Ce=de+se*ue,Ze=Math.max(0,Math.min(1,Se(ce,de),Se(ne,Ce))),rt=Math.max(0,Math.min(1,Re(ce,de),Re(ne,Ce))),Je=Math.max(0,Math.min(1,Pe(ce,de),Pe(ne,Ce))),St=(Ze/2+Je)*L.w,kt=(1-Ze/2-rt)*L.w,Bt=(St+kt)/2,Vt=kt-St,Ar=(1-Ze)*L.h,vr=Ar-Vt/u;Vt.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),ee.transition().style("opacity",1).duration(200),ae=!0),B.emit("plotly_relayouting",te(Q))}function at(){O(B),Q!==Y&&(S.call("_guiRelayout",B,te(Q)),N&&B.data&&B._context.showTips&&(M.notifier(t(B,"Double-click to zoom back out"),"long",B),N=!1))}function nt(){Y={a:L.aaxis.range[0],b:L.baxis.range[1],c:L.caxis.range[1]},Q=Y}function tt(he,se){var ne=he/L.xaxis._m,Ce=se/L.yaxis._m;Q={a:Y.a-Ce,b:Y.b+(ne+Ce)/2,c:Y.c-(ne-Ce)/2};var Ze=[Q.a,Q.b,Q.c].sort(M.sorterAsc),rt={a:Ze.indexOf(Q.a),b:Ze.indexOf(Q.b),c:Ze.indexOf(Q.c)};Ze[0]<0&&(Ze[1]+Ze[0]/2<0?(Ze[2]+=Ze[0]+Ze[1],Ze[0]=Ze[1]=0):(Ze[2]+=Ze[0]/2,Ze[1]+=Ze[0]/2,Ze[0]=0),Q={a:Ze[rt.a],b:Ze[rt.b],c:Ze[rt.c]},se=(Y.a-Q.a)*L.yaxis._m,he=(Y.c-Q.c-Y.b+Q.b)*L.xaxis._m);var Je=e(L.x0+he,L.y0+se);L.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",Je);var St=e(-he,-se);L.clipDefRelative.select("path").attr("transform",St),L.aaxis.range=[Q.a,L.sum-Q.b-Q.c],L.baxis.range=[L.sum-Q.a-Q.c,Q.b],L.caxis.range=[L.sum-Q.a-Q.b,Q.c],L.drawAxes(!1),L._hasClipOnAxisFalse&&L.plotContainer.select(".scatterlayer").selectAll(".trace").call(o.hideOutsideRangePoints,L),B.emit("plotly_relayouting",te(Q))}function Ve(){S.call("_guiRelayout",B,te(Q))}U.onmousemove=function(he){f.hover(B,he,L.id),B._fullLayout._lasthover=U,B._fullLayout._hoversubplot=L.id},U.onmouseout=function(he){B._dragging||h.unhover(B,he)},h.init(this.dragOptions)};function O(L){v.select(L).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}}}),SS=He({"src/plots/ternary/layout_attributes.js"(Z,q){"use strict";var v=sh(),_=wc().attributes,S=Xh(),M=pc().overrideAll,e=rs().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=q.exports=M({domain:_({name:"ternary"}),bgcolor:{valType:"color",dflt:v.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"}}}),s0=He({"src/plots/subplot_defaults.js"(Z,q){"use strict";var v=sa(),_=zl(),S=wc().defaults;q.exports=function(e,t,r,o){var a=o.type,i=o.attributes,n=o.handleDefaults,s=o.partition||"x",h=t._subplots[a],f=h.length,m=f&&h[0].replace(/\d+$/,""),c,T;function l(E,p){return v.coerce(c,T,i,E,p)}for(var x=0;x=x&&(b.min=0,d.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,m,c,T){var l=i[m._name];function x(g,y){return S.coerce(f,m,l,g,y)}x("uirevision",T.uirevision),m.type="linear";var w=x("color"),A=w!==l.color.dflt?w:c.font.color,E=m._name,p=E.charAt(0).toUpperCase(),b="Component "+p,d=x("title.text",b);m._hovertitle=d===b?d:p,S.coerceFont(x,"title.font",c.font,{overrideDflt:{size:S.bigFont(c.font.size),color:A}}),x("min"),o(f,m,x,"linear"),t(f,m,x,"linear"),e(f,m,x,"linear",{noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0}),r(f,m,x,{outerTicks:!0});var u=x("showticklabels");u&&(S.coerceFont(x,"tickfont",c.font,{overrideDflt:{color:A}}),x("tickangle"),x("tickformat")),a(f,m,x,{dfltColor:w,bgColor:c.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:l}),x("hoverformat"),x("layer")}}}),LF=He({"src/plots/ternary/index.js"(Z){"use strict";var q=kF(),v=Wh().getSubplotCalcData,_=sa().counterRegex,S="ternary";Z.name=S;var M=Z.attr="subplot";Z.idRoot=S,Z.idRegex=Z.attrRegex=_(S);var e=Z.attributes={};e[M]={valType:"subplotid",dflt:"ternary",editType:"calc"},Z.layoutAttributes=SS(),Z.supplyLayoutDefaults=CF(),Z.plot=function(r){for(var o=r._fullLayout,a=r.calcdata,i=o._subplots[S],n=0;n0){var E=r.xa,p=r.ya,b,d,u,g,y;f.orientation==="h"?(y=o,b="y",u=p,d="x",g=E):(y=a,b="x",u=E,d="y",g=p);var D=h[r.index];if(y>=D.span[0]&&y<=D.span[1]){var P=_.extendFlat({},r),z=g.c2p(y,!0),F=e.getKdeValue(D,f,y),N=e.getPositionOnKdePath(D,f,z),O=u._offset,L=u._length;P[b+"0"]=N[0],P[b+"1"]=N[1],P[d+"0"]=P[d+"1"]=z,P[d+"Label"]=d+": "+S.hoverLabelText(g,y,f[d+"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=m.marker;v.select(this).call(S.fill,c.mc||T.color).call(S.stroke,c.mlc||T.line.color).call(_.dashLine,T.line.dash,c.mlw||T.line.width).style("opacity",m.selectedpoints&&!c.selected?M:1)}}),r(f,m,a),f.selectAll(".regions").each(function(){v.select(this).selectAll("path").style("stroke-width",0).call(S.fill,m.connector.fillcolor)}),f.selectAll(".lines").each(function(){var c=m.connector.line;_.lineGroupStyle(v.select(this).selectAll("path"),c.width,c.color,c.dash)})})}q.exports={style:o}}}),YF=He({"src/traces/funnel/hover.js"(Z,q){"use strict";var v=$n().opacity,_=f1().hoverOnBars,S=sa().formatPercent;q.exports=function(t,r,o,a,i){var n=_(t,r,o,a,i);if(n){var s=n.cd,h=s[0].trace,f=h.orientation==="h",m=n.index,c=s[m],T=f?"x":"y";n[T+"LabelVal"]=c.s,n.percentInitial=c.begR,n.percentInitialLabel=S(c.begR,1),n.percentPrevious=c.difR,n.percentPreviousLabel=S(c.difR,1),n.percentTotal=c.sumR,n.percentTotalLabel=S(c.sumR,1);var l=c.hi||h.hoverinfo,x=[];if(l&&l!=="none"&&l!=="skip"){var w=l==="all",A=l.split("+"),E=function(p){return w||A.indexOf(p)!==-1};E("percent initial")&&x.push(n.percentInitialLabel+" of initial"),E("percent previous")&&x.push(n.percentPreviousLabel+" of previous"),E("percent total")&&x.push(n.percentTotalLabel+" of total")}return n.extraText=x.join("
"),n.color=M(h,c),[n]}};function M(e,t){var r=e.marker,o=t.mc||r.color,a=t.mlc||r.line.color,i=t.mlw||r.line.width;if(v(o))return o;if(v(a)&&i)return a}}}),KF=He({"src/traces/funnel/event_data.js"(Z,q){"use strict";q.exports=function(_,S){return _.x="xVal"in S?S.xVal:S.x,_.y="yVal"in S?S.yVal:S.y,"percentInitial"in S&&(_.percentInitial=S.percentInitial),"percentPrevious"in S&&(_.percentPrevious=S.percentPrevious),"percentTotal"in S&&(_.percentTotal=S.percentTotal),S.xa&&(_.xaxis=S.xa),S.ya&&(_.yaxis=S.ya),_}}}),JF=He({"src/traces/funnel/index.js"(Z,q){"use strict";q.exports={attributes:kS(),layoutAttributes:CS(),supplyDefaults:LS().supplyDefaults,crossTraceDefaults:LS().crossTraceDefaults,supplyLayoutDefaults:VF(),calc:HF(),crossTraceCalc:WF(),plot:XF(),style:ZF().style,hoverPoints:YF(),eventData:KF(),selectPoints:h1(),moduleType:"trace",name:"funnel",basePlotModule:Kf(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}}}),$F=He({"lib/funnel.js"(Z,q){"use strict";q.exports=JF()}}),QF=He({"src/traces/waterfall/constants.js"(Z,q){"use strict";q.exports={eventDataKeys:["initial","delta","final"]}}}),PS=He({"src/traces/waterfall/attributes.js"(Z,q){"use strict";var v=Sv(),_=af().line,S=au(),M=rf().axisHoverFormat,{hovertemplateAttrs:e,texttemplateAttrs:t,templatefallbackAttrs:r}=$l(),o=QF(),a=rs().extendFlat,i=$n();function n(s){return{marker:{color:a({},v.marker.color,{arrayOk:!1,editType:"style"}),line:{color:a({},v.marker.line.color,{arrayOk:!1,editType:"style"}),width:a({},v.marker.line.width,{arrayOk:!1,editType:"style"}),editType:"style"},editType:"style"},editType:"style"}}q.exports={measure:{valType:"data_array",dflt:[],editType:"calc"},base:{valType:"number",dflt:null,arrayOk:!1,editType:"calc"},x:v.x,x0:v.x0,dx:v.dx,y:v.y,y0:v.y0,dy:v.dy,xperiod:v.xperiod,yperiod:v.yperiod,xperiod0:v.xperiod0,yperiod0:v.yperiod0,xperiodalignment:v.xperiodalignment,yperiodalignment:v.yperiodalignment,xhoverformat:M("x"),yhoverformat:M("y"),hovertext:v.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:v.text,textposition:v.textposition,insidetextanchor:v.insidetextanchor,textangle:v.textangle,textfont:v.textfont,insidetextfont:v.insidetextfont,outsidetextfont:v.outsidetextfont,constraintext:v.constraintext,cliponaxis:v.cliponaxis,orientation:v.orientation,offset:v.offset,width:v.width,increasing:n("increasing"),decreasing:n("decreasing"),totals:n("intermediate sums and total"),connector:{line:{color:a({},_.color,{dflt:i.defaultLine}),width:a({},_.width,{editType:"plot"}),dash:_.dash,editType:"plot"},mode:{valType:"enumerated",values:["spanning","between"],dflt:"between",editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:v.offsetgroup,alignmentgroup:v.alignmentgroup,zorder:v.zorder}}}),IS=He({"src/traces/waterfall/layout_attributes.js"(Z,q){"use strict";q.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,q){"use strict";q.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"\u25B2"},DECREASING:{COLOR:"#FF4136",SYMBOL:"\u25BC"}}}}),RS=He({"src/traces/waterfall/defaults.js"(Z,q){"use strict";var v=sa(),_=Q0(),S=gd().handleText,M=n1(),e=Qd(),t=PS(),r=$n(),o=d1(),a=o.INCREASING.COLOR,i=o.DECREASING.COLOR,n="#4499FF";function s(m,c,T){m(c+".marker.color",T),m(c+".marker.line.color",r.defaultLine),m(c+".marker.line.width")}function h(m,c,T,l){function x(b,d){return v.coerce(m,c,t,b,d)}var w=M(m,c,l,x);if(!w){c.visible=!1;return}e(m,c,l,x),x("xhoverformat"),x("yhoverformat"),x("measure"),x("orientation",c.x&&!c.y?"h":"v"),x("base"),x("offset"),x("width"),x("text"),x("hovertext"),x("hovertemplate"),x("hovertemplatefallback");var A=x("textposition");S(m,c,l,x,A,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),c.textposition!=="none"&&(x("texttemplate"),x("texttemplatefallback"),c.texttemplate||x("textinfo")),s(x,"increasing",a),s(x,"decreasing",i),s(x,"totals",n);var E=x("connector.visible");if(E){x("connector.mode");var p=x("connector.line.width");p&&(x("connector.line.color"),x("connector.line.dash"))}x("zorder")}function f(m,c){var T,l;function x(A){return v.coerce(l._input,l,t,A)}if(c.waterfallmode==="group")for(var w=0;w0&&(x?y+="M"+u[0]+","+g[1]+"V"+g[0]:y+="M"+u[1]+","+g[0]+"H"+u[0]),w!=="between"&&(p.isSum||b path").each(function(c){if(!c.isBlank){var T=m[c.dir].marker;v.select(this).call(S.fill,T.color).call(S.stroke,T.line.color).call(_.dashLine,T.line.dash,T.line.width).style("opacity",m.selectedpoints&&!c.selected?M:1)}}),r(f,m,a),f.selectAll(".lines").each(function(){var c=m.connector.line;_.lineGroupStyle(v.select(this).selectAll("path"),c.width,c.color,c.dash)})})}q.exports={style:o}}}),nO=He({"src/traces/waterfall/hover.js"(Z,q){"use strict";var v=Wo().hoverLabelText,_=$n().opacity,S=f1().hoverOnBars,M=d1(),e={increasing:M.INCREASING.SYMBOL,decreasing:M.DECREASING.SYMBOL};q.exports=function(o,a,i,n,s){var h=S(o,a,i,n,s);if(!h)return;var f=h.cd,m=f[0].trace,c=m.orientation==="h",T=c?"x":"y",l=c?o.xa:o.ya;function x(D){return v(l,D,m[T+"hoverformat"])}var w=h.index,A=f[w],E=A.isSum?A.b+A.s:A.rawS;h.initial=A.b+A.s-E,h.delta=E,h.final=h.initial+h.delta;var p=x(Math.abs(h.delta));h.deltaLabel=E<0?"("+p+")":p,h.finalLabel=x(h.final),h.initialLabel=x(h.initial);var b=A.hi||m.hoverinfo,d=[];if(b&&b!=="none"&&b!=="skip"){var u=b==="all",g=b.split("+"),y=function(D){return u||g.indexOf(D)!==-1};A.isSum||(y("final")&&(c?!y("x"):!y("y"))&&d.push(h.finalLabel),y("delta")&&(E<0?d.push(h.deltaLabel+" "+e.decreasing):d.push(h.deltaLabel+" "+e.increasing)),y("initial")&&d.push("Initial: "+h.initialLabel))}return d.length&&(h.extraText=d.join("
")),h.color=t(m,A),[h]};function t(r,o){var a=r[o.dir].marker,i=a.color,n=a.line.color,s=a.line.width;if(_(i))return i;if(_(n)&&s)return n}}}),oO=He({"src/traces/waterfall/event_data.js"(Z,q){"use strict";q.exports=function(_,S){return _.x="xVal"in S?S.xVal:S.x,_.y="yVal"in S?S.yVal:S.y,"initial"in S&&(_.initial=S.initial),"delta"in S&&(_.delta=S.delta),"final"in S&&(_.final=S.final),S.xa&&(_.xaxis=S.xa),S.ya&&(_.yaxis=S.ya),_}}}),sO=He({"src/traces/waterfall/index.js"(Z,q){"use strict";q.exports={attributes:PS(),layoutAttributes:IS(),supplyDefaults:RS().supplyDefaults,crossTraceDefaults:RS().crossTraceDefaults,supplyLayoutDefaults:eO(),calc:tO(),crossTraceCalc:rO(),plot:aO(),style:iO().style,hoverPoints:nO(),eventData:oO(),selectPoints:h1(),moduleType:"trace",name:"waterfall",basePlotModule:Kf(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}}}),lO=He({"lib/waterfall.js"(Z,q){"use strict";q.exports=sO()}}),v1=He({"src/traces/image/constants.js"(Z,q){"use strict";q.exports={colormodel:{rgb:{min:[0,0,0],max:[255,255,255],fmt:function(v){return v.slice(0,3)},suffix:["","",""]},rgba:{min:[0,0,0,0],max:[255,255,255,1],fmt:function(v){return v.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(v){return v.slice(0,4)},suffix:["","","",""]},hsl:{min:[0,0,0],max:[360,100,100],fmt:function(v){var _=v.slice(0,3);return _[1]=_[1]+"%",_[2]=_[2]+"%",_},suffix:["\xB0","%","%"]},hsla:{min:[0,0,0,0],max:[360,100,100,1],fmt:function(v){var _=v.slice(0,4);return _[1]=_[1]+"%",_[2]=_[2]+"%",_},suffix:["\xB0","%","%",""]}}}}}),DS=He({"src/traces/image/attributes.js"(Z,q){"use strict";var v=au(),_=af().zorder,{hovertemplateAttrs:S,templatefallbackAttrs:M}=$l(),e=rs().extendFlat,t=v1().colormodel,r=["rgb","rgba","rgba256","hsl","hsla"],o=[],a=[];for(n=0;n0)throw new Error("Invalid string. Length must be a multiple of 4");var m=h.indexOf("=");m===-1&&(m=f);var c=m===f?0:4-m%4;return[m,c]}function r(h){var f=t(h),m=f[0],c=f[1];return(m+c)*3/4-c}function o(h,f,m){return(f+m)*3/4-m}function a(h){var f,m=t(h),c=m[0],T=m[1],l=new _(o(h,c,T)),x=0,w=T>0?c-4:c,A;for(A=0;A>16&255,l[x++]=f>>8&255,l[x++]=f&255;return T===2&&(f=v[h.charCodeAt(A)]<<2|v[h.charCodeAt(A+1)]>>4,l[x++]=f&255),T===1&&(f=v[h.charCodeAt(A)]<<10|v[h.charCodeAt(A+1)]<<4|v[h.charCodeAt(A+2)]>>2,l[x++]=f>>8&255,l[x++]=f&255),l}function i(h){return q[h>>18&63]+q[h>>12&63]+q[h>>6&63]+q[h&63]}function n(h,f,m){for(var c,T=[],l=f;lw?w:x+l));return c===1?(f=h[m-1],T.push(q[f>>2]+q[f<<4&63]+"==")):c===2&&(f=(h[m-2]<<8)+h[m-1],T.push(q[f>>10]+q[f>>4&63]+q[f<<2&63]+"=")),T.join("")}}}),fO=He({"node_modules/ieee754/index.js"(Z){Z.read=function(q,v,_,S,M){var e,t,r=M*8-S-1,o=(1<>1,i=-7,n=_?M-1:0,s=_?-1:1,h=q[v+n];for(n+=s,e=h&(1<<-i)-1,h>>=-i,i+=r;i>0;e=e*256+q[v+n],n+=s,i-=8);for(t=e&(1<<-i)-1,e>>=-i,i+=S;i>0;t=t*256+q[v+n],n+=s,i-=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(q,v,_,S,M,e){var t,r,o,a=e*8-M-1,i=(1<>1,s=M===23?Math.pow(2,-24)-Math.pow(2,-77):0,h=S?0:e-1,f=S?1:-1,m=v<0||v===0&&1/v<0?1:0;for(v=Math.abs(v),isNaN(v)||v===1/0?(r=isNaN(v)?1:0,t=i):(t=Math.floor(Math.log(v)/Math.LN2),v*(o=Math.pow(2,-t))<1&&(t--,o*=2),t+n>=1?v+=s/o:v+=s*Math.pow(2,1-n),v*o>=2&&(t++,o/=2),t+n>=i?(r=0,t=i):t+n>=1?(r=(v*o-1)*Math.pow(2,M),t=t+n):(r=v*Math.pow(2,n-1)*Math.pow(2,M),t=0));M>=8;q[_+h]=r&255,h+=f,r/=256,M-=8);for(t=t<0;q[_+h]=t&255,h+=f,t/=256,a-=8);q[_+h-f]|=m*128}}}),rg=He({"node_modules/buffer/index.js"(Z){"use strict";var q=cO(),v=fO(),_=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=M(),!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 M(){try{let he=new Uint8Array(1),se={foo:function(){return 42}};return Object.setPrototypeOf(se,Uint8Array.prototype),Object.setPrototypeOf(he,se),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 se=new Uint8Array(he);return Object.setPrototypeOf(se,t.prototype),se}function t(he,se,ne){if(typeof he=="number"){if(typeof se=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return i(he)}return r(he,se,ne)}t.poolSize=8192;function r(he,se,ne){if(typeof he=="string")return n(he,se);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(je(he,ArrayBuffer)||he&&je(he.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(je(he,SharedArrayBuffer)||he&&je(he.buffer,SharedArrayBuffer)))return f(he,se,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,se,ne);let Ze=m(he);if(Ze)return Ze;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof he[Symbol.toPrimitive]=="function")return t.from(he[Symbol.toPrimitive]("string"),se,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,se,ne){return r(he,se,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,se,ne){return o(he),he<=0?e(he):se!==void 0?typeof ne=="string"?e(he).fill(se,ne):e(he).fill(se):e(he)}t.alloc=function(he,se,ne){return a(he,se,ne)};function i(he){return o(he),e(he<0?0:c(he)|0)}t.allocUnsafe=function(he){return i(he)},t.allocUnsafeSlow=function(he){return i(he)};function n(he,se){if((typeof se!="string"||se==="")&&(se="utf8"),!t.isEncoding(se))throw new TypeError("Unknown encoding: "+se);let ne=l(he,se)|0,Ce=e(ne),Ze=Ce.write(he,se);return Ze!==ne&&(Ce=Ce.slice(0,Ze)),Ce}function s(he){let se=he.length<0?0:c(he.length)|0,ne=e(se);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(se){return se!=null&&se._isBuffer===!0&&se!==t.prototype},t.compare=function(se,ne){if(je(se,Uint8Array)&&(se=t.from(se,se.offset,se.byteLength)),je(ne,Uint8Array)&&(ne=t.from(ne,ne.offset,ne.byteLength)),!t.isBuffer(se)||!t.isBuffer(ne))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(se===ne)return 0;let Ce=se.length,Ze=ne.length;for(let rt=0,Je=Math.min(Ce,Ze);rtZe.length?(t.isBuffer(Je)||(Je=t.from(Je)),Je.copy(Ze,rt)):Uint8Array.prototype.set.call(Ze,Je,rt);else if(t.isBuffer(Je))Je.copy(Ze,rt);else throw new TypeError('"list" argument must be an Array of Buffers');rt+=Je.length}return Ze};function l(he,se){if(t.isBuffer(he))return he.length;if(ArrayBuffer.isView(he)||je(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 Ze=!1;for(;;)switch(se){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 Re(he).length;default:if(Ze)return Ce?-1:pe(he).length;se=(""+se).toLowerCase(),Ze=!0}}t.byteLength=l;function x(he,se,ne){let Ce=!1;if((se===void 0||se<0)&&(se=0),se>this.length||((ne===void 0||ne>this.length)&&(ne=this.length),ne<=0)||(ne>>>=0,se>>>=0,ne<=se))return"";for(he||(he="utf8");;)switch(he){case"hex":return O(this,se,ne);case"utf8":case"utf-8":return D(this,se,ne);case"ascii":return F(this,se,ne);case"latin1":case"binary":return N(this,se,ne);case"base64":return y(this,se,ne);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,se,ne);default:if(Ce)throw new TypeError("Unknown encoding: "+he);he=(he+"").toLowerCase(),Ce=!0}}t.prototype._isBuffer=!0;function w(he,se,ne){let Ce=he[se];he[se]=he[ne],he[ne]=Ce}t.prototype.swap16=function(){let se=this.length;if(se%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let ne=0;nene&&(se+=" ... "),""},_&&(t.prototype[_]=t.prototype.inspect),t.prototype.compare=function(se,ne,Ce,Ze,rt){if(je(se,Uint8Array)&&(se=t.from(se,se.offset,se.byteLength)),!t.isBuffer(se))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof se);if(ne===void 0&&(ne=0),Ce===void 0&&(Ce=se?se.length:0),Ze===void 0&&(Ze=0),rt===void 0&&(rt=this.length),ne<0||Ce>se.length||Ze<0||rt>this.length)throw new RangeError("out of range index");if(Ze>=rt&&ne>=Ce)return 0;if(Ze>=rt)return-1;if(ne>=Ce)return 1;if(ne>>>=0,Ce>>>=0,Ze>>>=0,rt>>>=0,this===se)return 0;let Je=rt-Ze,St=Ce-ne,kt=Math.min(Je,St),Bt=this.slice(Ze,rt),Vt=se.slice(ne,Ce);for(let Ar=0;Ar2147483647?ne=2147483647:ne<-2147483648&&(ne=-2147483648),ne=+ne,at(ne)&&(ne=Ze?0:he.length-1),ne<0&&(ne=he.length+ne),ne>=he.length){if(Ze)return-1;ne=he.length-1}else if(ne<0)if(Ze)ne=0;else return-1;if(typeof se=="string"&&(se=t.from(se,Ce)),t.isBuffer(se))return se.length===0?-1:E(he,se,ne,Ce,Ze);if(typeof se=="number")return se=se&255,typeof Uint8Array.prototype.indexOf=="function"?Ze?Uint8Array.prototype.indexOf.call(he,se,ne):Uint8Array.prototype.lastIndexOf.call(he,se,ne):E(he,[se],ne,Ce,Ze);throw new TypeError("val must be string, number or Buffer")}function E(he,se,ne,Ce,Ze){let rt=1,Je=he.length,St=se.length;if(Ce!==void 0&&(Ce=String(Ce).toLowerCase(),Ce==="ucs2"||Ce==="ucs-2"||Ce==="utf16le"||Ce==="utf-16le")){if(he.length<2||se.length<2)return-1;rt=2,Je/=2,St/=2,ne/=2}function kt(Vt,Ar){return rt===1?Vt[Ar]:Vt.readUInt16BE(Ar*rt)}let Bt;if(Ze){let Vt=-1;for(Bt=ne;BtJe&&(ne=Je-St),Bt=ne;Bt>=0;Bt--){let Vt=!0;for(let Ar=0;ArZe&&(Ce=Ze)):Ce=Ze;let rt=se.length;Ce>rt/2&&(Ce=rt/2);let Je;for(Je=0;Je>>0,isFinite(Ce)?(Ce=Ce>>>0,Ze===void 0&&(Ze="utf8")):(Ze=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),se.length>0&&(Ce<0||ne<0)||ne>this.length)throw new RangeError("Attempt to write outside buffer bounds");Ze||(Ze="utf8");let Je=!1;for(;;)switch(Ze){case"hex":return p(this,se,ne,Ce);case"utf8":case"utf-8":return b(this,se,ne,Ce);case"ascii":case"latin1":case"binary":return d(this,se,ne,Ce);case"base64":return u(this,se,ne,Ce);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return g(this,se,ne,Ce);default:if(Je)throw new TypeError("Unknown encoding: "+Ze);Ze=(""+Ze).toLowerCase(),Je=!0}},t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function y(he,se,ne){return se===0&&ne===he.length?q.fromByteArray(he):q.fromByteArray(he.slice(se,ne))}function D(he,se,ne){ne=Math.min(he.length,ne);let Ce=[],Ze=se;for(;Ze239?4:rt>223?3:rt>191?2:1;if(Ze+St<=ne){let kt,Bt,Vt,Ar;switch(St){case 1:rt<128&&(Je=rt);break;case 2:kt=he[Ze+1],(kt&192)===128&&(Ar=(rt&31)<<6|kt&63,Ar>127&&(Je=Ar));break;case 3:kt=he[Ze+1],Bt=he[Ze+2],(kt&192)===128&&(Bt&192)===128&&(Ar=(rt&15)<<12|(kt&63)<<6|Bt&63,Ar>2047&&(Ar<55296||Ar>57343)&&(Je=Ar));break;case 4:kt=he[Ze+1],Bt=he[Ze+2],Vt=he[Ze+3],(kt&192)===128&&(Bt&192)===128&&(Vt&192)===128&&(Ar=(rt&15)<<18|(kt&63)<<12|(Bt&63)<<6|Vt&63,Ar>65535&&Ar<1114112&&(Je=Ar))}}Je===null?(Je=65533,St=1):Je>65535&&(Je-=65536,Ce.push(Je>>>10&1023|55296),Je=56320|Je&1023),Ce.push(Je),Ze+=St}return z(Ce)}var P=4096;function z(he){let se=he.length;if(se<=P)return String.fromCharCode.apply(String,he);let ne="",Ce=0;for(;CeCe)&&(ne=Ce);let Ze="";for(let rt=se;rtCe&&(se=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(se,ne,Ce){se=se>>>0,ne=ne>>>0,Ce||U(se,ne,this.length);let Ze=this[se],rt=1,Je=0;for(;++Je>>0,ne=ne>>>0,Ce||U(se,ne,this.length);let Ze=this[se+--ne],rt=1;for(;ne>0&&(rt*=256);)Ze+=this[se+--ne]*rt;return Ze},t.prototype.readUint8=t.prototype.readUInt8=function(se,ne){return se=se>>>0,ne||U(se,1,this.length),this[se]},t.prototype.readUint16LE=t.prototype.readUInt16LE=function(se,ne){return se=se>>>0,ne||U(se,2,this.length),this[se]|this[se+1]<<8},t.prototype.readUint16BE=t.prototype.readUInt16BE=function(se,ne){return se=se>>>0,ne||U(se,2,this.length),this[se]<<8|this[se+1]},t.prototype.readUint32LE=t.prototype.readUInt32LE=function(se,ne){return se=se>>>0,ne||U(se,4,this.length),(this[se]|this[se+1]<<8|this[se+2]<<16)+this[se+3]*16777216},t.prototype.readUint32BE=t.prototype.readUInt32BE=function(se,ne){return se=se>>>0,ne||U(se,4,this.length),this[se]*16777216+(this[se+1]<<16|this[se+2]<<8|this[se+3])},t.prototype.readBigUInt64LE=tt(function(se){se=se>>>0,ae(se,"offset");let ne=this[se],Ce=this[se+7];(ne===void 0||Ce===void 0)&&j(se,this.length-8);let Ze=ne+this[++se]*2**8+this[++se]*2**16+this[++se]*2**24,rt=this[++se]+this[++se]*2**8+this[++se]*2**16+Ce*2**24;return BigInt(Ze)+(BigInt(rt)<>>0,ae(se,"offset");let ne=this[se],Ce=this[se+7];(ne===void 0||Ce===void 0)&&j(se,this.length-8);let Ze=ne*2**24+this[++se]*2**16+this[++se]*2**8+this[++se],rt=this[++se]*2**24+this[++se]*2**16+this[++se]*2**8+Ce;return(BigInt(Ze)<>>0,ne=ne>>>0,Ce||U(se,ne,this.length);let Ze=this[se],rt=1,Je=0;for(;++Je=rt&&(Ze-=Math.pow(2,8*ne)),Ze},t.prototype.readIntBE=function(se,ne,Ce){se=se>>>0,ne=ne>>>0,Ce||U(se,ne,this.length);let Ze=ne,rt=1,Je=this[se+--Ze];for(;Ze>0&&(rt*=256);)Je+=this[se+--Ze]*rt;return rt*=128,Je>=rt&&(Je-=Math.pow(2,8*ne)),Je},t.prototype.readInt8=function(se,ne){return se=se>>>0,ne||U(se,1,this.length),this[se]&128?(255-this[se]+1)*-1:this[se]},t.prototype.readInt16LE=function(se,ne){se=se>>>0,ne||U(se,2,this.length);let Ce=this[se]|this[se+1]<<8;return Ce&32768?Ce|4294901760:Ce},t.prototype.readInt16BE=function(se,ne){se=se>>>0,ne||U(se,2,this.length);let Ce=this[se+1]|this[se]<<8;return Ce&32768?Ce|4294901760:Ce},t.prototype.readInt32LE=function(se,ne){return se=se>>>0,ne||U(se,4,this.length),this[se]|this[se+1]<<8|this[se+2]<<16|this[se+3]<<24},t.prototype.readInt32BE=function(se,ne){return se=se>>>0,ne||U(se,4,this.length),this[se]<<24|this[se+1]<<16|this[se+2]<<8|this[se+3]},t.prototype.readBigInt64LE=tt(function(se){se=se>>>0,ae(se,"offset");let ne=this[se],Ce=this[se+7];(ne===void 0||Ce===void 0)&&j(se,this.length-8);let Ze=this[se+4]+this[se+5]*2**8+this[se+6]*2**16+(Ce<<24);return(BigInt(Ze)<>>0,ae(se,"offset");let ne=this[se],Ce=this[se+7];(ne===void 0||Ce===void 0)&&j(se,this.length-8);let Ze=(ne<<24)+this[++se]*2**16+this[++se]*2**8+this[++se];return(BigInt(Ze)<>>0,ne||U(se,4,this.length),v.read(this,se,!0,23,4)},t.prototype.readFloatBE=function(se,ne){return se=se>>>0,ne||U(se,4,this.length),v.read(this,se,!1,23,4)},t.prototype.readDoubleLE=function(se,ne){return se=se>>>0,ne||U(se,8,this.length),v.read(this,se,!0,52,8)},t.prototype.readDoubleBE=function(se,ne){return se=se>>>0,ne||U(se,8,this.length),v.read(this,se,!1,52,8)};function B(he,se,ne,Ce,Ze,rt){if(!t.isBuffer(he))throw new TypeError('"buffer" argument must be a Buffer instance');if(se>Ze||sehe.length)throw new RangeError("Index out of range")}t.prototype.writeUintLE=t.prototype.writeUIntLE=function(se,ne,Ce,Ze){if(se=+se,ne=ne>>>0,Ce=Ce>>>0,!Ze){let St=Math.pow(2,8*Ce)-1;B(this,se,ne,Ce,St,0)}let rt=1,Je=0;for(this[ne]=se&255;++Je>>0,Ce=Ce>>>0,!Ze){let St=Math.pow(2,8*Ce)-1;B(this,se,ne,Ce,St,0)}let rt=Ce-1,Je=1;for(this[ne+rt]=se&255;--rt>=0&&(Je*=256);)this[ne+rt]=se/Je&255;return ne+Ce},t.prototype.writeUint8=t.prototype.writeUInt8=function(se,ne,Ce){return se=+se,ne=ne>>>0,Ce||B(this,se,ne,1,255,0),this[ne]=se&255,ne+1},t.prototype.writeUint16LE=t.prototype.writeUInt16LE=function(se,ne,Ce){return se=+se,ne=ne>>>0,Ce||B(this,se,ne,2,65535,0),this[ne]=se&255,this[ne+1]=se>>>8,ne+2},t.prototype.writeUint16BE=t.prototype.writeUInt16BE=function(se,ne,Ce){return se=+se,ne=ne>>>0,Ce||B(this,se,ne,2,65535,0),this[ne]=se>>>8,this[ne+1]=se&255,ne+2},t.prototype.writeUint32LE=t.prototype.writeUInt32LE=function(se,ne,Ce){return se=+se,ne=ne>>>0,Ce||B(this,se,ne,4,4294967295,0),this[ne+3]=se>>>24,this[ne+2]=se>>>16,this[ne+1]=se>>>8,this[ne]=se&255,ne+4},t.prototype.writeUint32BE=t.prototype.writeUInt32BE=function(se,ne,Ce){return se=+se,ne=ne>>>0,Ce||B(this,se,ne,4,4294967295,0),this[ne]=se>>>24,this[ne+1]=se>>>16,this[ne+2]=se>>>8,this[ne+3]=se&255,ne+4};function W(he,se,ne,Ce,Ze){le(se,Ce,Ze,he,ne,7);let rt=Number(se&BigInt(4294967295));he[ne++]=rt,rt=rt>>8,he[ne++]=rt,rt=rt>>8,he[ne++]=rt,rt=rt>>8,he[ne++]=rt;let Je=Number(se>>BigInt(32)&BigInt(4294967295));return he[ne++]=Je,Je=Je>>8,he[ne++]=Je,Je=Je>>8,he[ne++]=Je,Je=Je>>8,he[ne++]=Je,ne}function $(he,se,ne,Ce,Ze){le(se,Ce,Ze,he,ne,7);let rt=Number(se&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 Je=Number(se>>BigInt(32)&BigInt(4294967295));return he[ne+3]=Je,Je=Je>>8,he[ne+2]=Je,Je=Je>>8,he[ne+1]=Je,Je=Je>>8,he[ne]=Je,ne+8}t.prototype.writeBigUInt64LE=tt(function(se,ne=0){return W(this,se,ne,BigInt(0),BigInt("0xffffffffffffffff"))}),t.prototype.writeBigUInt64BE=tt(function(se,ne=0){return $(this,se,ne,BigInt(0),BigInt("0xffffffffffffffff"))}),t.prototype.writeIntLE=function(se,ne,Ce,Ze){if(se=+se,ne=ne>>>0,!Ze){let kt=Math.pow(2,8*Ce-1);B(this,se,ne,Ce,kt-1,-kt)}let rt=0,Je=1,St=0;for(this[ne]=se&255;++rt>0)-St&255;return ne+Ce},t.prototype.writeIntBE=function(se,ne,Ce,Ze){if(se=+se,ne=ne>>>0,!Ze){let kt=Math.pow(2,8*Ce-1);B(this,se,ne,Ce,kt-1,-kt)}let rt=Ce-1,Je=1,St=0;for(this[ne+rt]=se&255;--rt>=0&&(Je*=256);)se<0&&St===0&&this[ne+rt+1]!==0&&(St=1),this[ne+rt]=(se/Je>>0)-St&255;return ne+Ce},t.prototype.writeInt8=function(se,ne,Ce){return se=+se,ne=ne>>>0,Ce||B(this,se,ne,1,127,-128),se<0&&(se=255+se+1),this[ne]=se&255,ne+1},t.prototype.writeInt16LE=function(se,ne,Ce){return se=+se,ne=ne>>>0,Ce||B(this,se,ne,2,32767,-32768),this[ne]=se&255,this[ne+1]=se>>>8,ne+2},t.prototype.writeInt16BE=function(se,ne,Ce){return se=+se,ne=ne>>>0,Ce||B(this,se,ne,2,32767,-32768),this[ne]=se>>>8,this[ne+1]=se&255,ne+2},t.prototype.writeInt32LE=function(se,ne,Ce){return se=+se,ne=ne>>>0,Ce||B(this,se,ne,4,2147483647,-2147483648),this[ne]=se&255,this[ne+1]=se>>>8,this[ne+2]=se>>>16,this[ne+3]=se>>>24,ne+4},t.prototype.writeInt32BE=function(se,ne,Ce){return se=+se,ne=ne>>>0,Ce||B(this,se,ne,4,2147483647,-2147483648),se<0&&(se=4294967295+se+1),this[ne]=se>>>24,this[ne+1]=se>>>16,this[ne+2]=se>>>8,this[ne+3]=se&255,ne+4},t.prototype.writeBigInt64LE=tt(function(se,ne=0){return W(this,se,ne,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),t.prototype.writeBigInt64BE=tt(function(se,ne=0){return $(this,se,ne,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function ue(he,se,ne,Ce,Ze,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,se,ne,Ce,Ze){return se=+se,ne=ne>>>0,Ze||ue(he,se,ne,4,34028234663852886e22,-34028234663852886e22),v.write(he,se,ne,Ce,23,4),ne+4}t.prototype.writeFloatLE=function(se,ne,Ce){return ce(this,se,ne,!0,Ce)},t.prototype.writeFloatBE=function(se,ne,Ce){return ce(this,se,ne,!1,Ce)};function de(he,se,ne,Ce,Ze){return se=+se,ne=ne>>>0,Ze||ue(he,se,ne,8,17976931348623157e292,-17976931348623157e292),v.write(he,se,ne,Ce,52,8),ne+8}t.prototype.writeDoubleLE=function(se,ne,Ce){return de(this,se,ne,!0,Ce)},t.prototype.writeDoubleBE=function(se,ne,Ce){return de(this,se,ne,!1,Ce)},t.prototype.copy=function(se,ne,Ce,Ze){if(!t.isBuffer(se))throw new TypeError("argument should be a Buffer");if(Ce||(Ce=0),!Ze&&Ze!==0&&(Ze=this.length),ne>=se.length&&(ne=se.length),ne||(ne=0),Ze>0&&Ze=this.length)throw new RangeError("Index out of range");if(Ze<0)throw new RangeError("sourceEnd out of bounds");Ze>this.length&&(Ze=this.length),se.length-ne>>0,Ce=Ce===void 0?this.length:Ce>>>0,se||(se=0);let rt;if(typeof se=="number")for(rt=ne;rt2**32?Ze=Q(String(ne)):typeof ne=="bigint"&&(Ze=String(ne),(ne>BigInt(2)**BigInt(32)||ne<-(BigInt(2)**BigInt(32)))&&(Ze=Q(Ze)),Ze+="n"),Ce+=` It must be ${se}. Received ${Ze}`,Ce},RangeError);function Q(he){let se="",ne=he.length,Ce=he[0]==="-"?1:0;for(;ne>=Ce+4;ne-=3)se=`_${he.slice(ne-3,ne)}${se}`;return`${he.slice(0,ne)}${se}`}function V(he,se,ne){ae(se,"offset"),(he[se]===void 0||he[se+ne]===void 0)&&j(se,he.length-(ne+1))}function le(he,se,ne,Ce,Ze,rt){if(he>ne||he3?se===0||se===BigInt(0)?St=`>= 0${Je} and < 2${Je} ** ${(rt+1)*8}${Je}`:St=`>= -(2${Je} ** ${(rt+1)*8-1}${Je}) and < 2 ** ${(rt+1)*8-1}${Je}`:St=`>= ${se}${Je} and <= ${ne}${Je}`,new Y.ERR_OUT_OF_RANGE("value",St,he)}V(Ce,Ze,rt)}function ae(he,se){if(typeof he!="number")throw new Y.ERR_INVALID_ARG_TYPE(se,"number",he)}function j(he,se,ne){throw Math.floor(he)!==he?(ae(he,ne),new Y.ERR_OUT_OF_RANGE(ne||"offset","an integer",he)):se<0?new Y.ERR_BUFFER_OUT_OF_BOUNDS:new Y.ERR_OUT_OF_RANGE(ne||"offset",`>= ${ne?1:0} and <= ${se}`,he)}var ee=/[^+/0-9A-Za-z-_]/g;function te(he){if(he=he.split("=")[0],he=he.trim().replace(ee,""),he.length<2)return"";for(;he.length%4!==0;)he=he+"=";return he}function pe(he,se){se=se||1/0;let ne,Ce=he.length,Ze=null,rt=[];for(let Je=0;Je55295&&ne<57344){if(!Ze){if(ne>56319){(se-=3)>-1&&rt.push(239,191,189);continue}else if(Je+1===Ce){(se-=3)>-1&&rt.push(239,191,189);continue}Ze=ne;continue}if(ne<56320){(se-=3)>-1&&rt.push(239,191,189),Ze=ne;continue}ne=(Ze-55296<<10|ne-56320)+65536}else Ze&&(se-=3)>-1&&rt.push(239,191,189);if(Ze=null,ne<128){if((se-=1)<0)break;rt.push(ne)}else if(ne<2048){if((se-=2)<0)break;rt.push(ne>>6|192,ne&63|128)}else if(ne<65536){if((se-=3)<0)break;rt.push(ne>>12|224,ne>>6&63|128,ne&63|128)}else if(ne<1114112){if((se-=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 se=[];for(let ne=0;ne>8,Ze=ne%256,rt.push(Ze),rt.push(Ce);return rt}function Re(he){return q.toByteArray(te(he))}function Pe(he,se,ne,Ce){let Ze;for(Ze=0;Ze=se.length||Ze>=he.length);++Ze)se[Ze+ne]=he[Ze];return Ze}function je(he,se){return he instanceof se||he!=null&&he.constructor!=null&&he.constructor.name!=null&&he.constructor.name===se.name}function at(he){return he!==he}var nt=function(){let he="0123456789abcdef",se=new Array(256);for(let ne=0;ne<16;++ne){let Ce=ne*16;for(let Ze=0;Ze<16;++Ze)se[Ce+Ze]=he[ne]+he[Ze]}return se}();function tt(he){return typeof BigInt>"u"?Ve:he}function Ve(){throw new Error("BigInt not supported")}}}),p3=He({"node_modules/has-symbols/shams.js"(Z,q){"use strict";q.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var _={},S=Symbol("test"),M=Object(S);if(typeof S=="string"||Object.prototype.toString.call(S)!=="[object Symbol]"||Object.prototype.toString.call(M)!=="[object Symbol]")return!1;var e=42;_[S]=e;for(var t in _)return!1;if(typeof Object.keys=="function"&&Object.keys(_).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(_).length!==0)return!1;var r=Object.getOwnPropertySymbols(_);if(r.length!==1||r[0]!==S||!Object.prototype.propertyIsEnumerable.call(_,S))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(_,S);if(o.value!==e||o.enumerable!==!0)return!1}return!0}}}),W_=He({"node_modules/has-tostringtag/shams.js"(Z,q){"use strict";var v=p3();q.exports=function(){return v()&&!!Symbol.toStringTag}}}),FS=He({"node_modules/es-object-atoms/index.js"(Z,q){"use strict";q.exports=Object}}),hO=He({"node_modules/es-errors/index.js"(Z,q){"use strict";q.exports=Error}}),pO=He({"node_modules/es-errors/eval.js"(Z,q){"use strict";q.exports=EvalError}}),dO=He({"node_modules/es-errors/range.js"(Z,q){"use strict";q.exports=RangeError}}),vO=He({"node_modules/es-errors/ref.js"(Z,q){"use strict";q.exports=ReferenceError}}),OS=He({"node_modules/es-errors/syntax.js"(Z,q){"use strict";q.exports=SyntaxError}}),m1=He({"node_modules/es-errors/type.js"(Z,q){"use strict";q.exports=TypeError}}),mO=He({"node_modules/es-errors/uri.js"(Z,q){"use strict";q.exports=URIError}}),gO=He({"node_modules/math-intrinsics/abs.js"(Z,q){"use strict";q.exports=Math.abs}}),yO=He({"node_modules/math-intrinsics/floor.js"(Z,q){"use strict";q.exports=Math.floor}}),_O=He({"node_modules/math-intrinsics/max.js"(Z,q){"use strict";q.exports=Math.max}}),xO=He({"node_modules/math-intrinsics/min.js"(Z,q){"use strict";q.exports=Math.min}}),bO=He({"node_modules/math-intrinsics/pow.js"(Z,q){"use strict";q.exports=Math.pow}}),wO=He({"node_modules/math-intrinsics/round.js"(Z,q){"use strict";q.exports=Math.round}}),TO=He({"node_modules/math-intrinsics/isNaN.js"(Z,q){"use strict";q.exports=Number.isNaN||function(_){return _!==_}}}),AO=He({"node_modules/math-intrinsics/sign.js"(Z,q){"use strict";var v=TO();q.exports=function(S){return v(S)||S===0?S:S<0?-1:1}}}),SO=He({"node_modules/gopd/gOPD.js"(Z,q){"use strict";q.exports=Object.getOwnPropertyDescriptor}}),ag=He({"node_modules/gopd/index.js"(Z,q){"use strict";var v=SO();if(v)try{v([],"length")}catch{v=null}q.exports=v}}),X_=He({"node_modules/es-define-property/index.js"(Z,q){"use strict";var v=Object.defineProperty||!1;if(v)try{v({},"a",{value:1})}catch{v=!1}q.exports=v}}),MO=He({"node_modules/has-symbols/index.js"(Z,q){"use strict";var v=typeof Symbol<"u"&&Symbol,_=p3();q.exports=function(){return typeof v!="function"||typeof Symbol!="function"||typeof v("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:_()}}}),BS=He({"node_modules/get-proto/Reflect.getPrototypeOf.js"(Z,q){"use strict";q.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null}}),NS=He({"node_modules/get-proto/Object.getPrototypeOf.js"(Z,q){"use strict";var v=FS();q.exports=v.getPrototypeOf||null}}),EO=He({"node_modules/function-bind/implementation.js"(Z,q){"use strict";var v="Function.prototype.bind called on incompatible ",_=Object.prototype.toString,S=Math.max,M="[object Function]",e=function(a,i){for(var n=[],s=0;s"u"||!b?v:b(Uint8Array),z={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?v:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?v:ArrayBuffer,"%ArrayIteratorPrototype%":p&&b?b([][Symbol.iterator]()):v,"%AsyncFromSyncIteratorPrototype%":v,"%AsyncFunction%":D,"%AsyncGenerator%":D,"%AsyncGeneratorFunction%":D,"%AsyncIteratorPrototype%":D,"%Atomics%":typeof Atomics>"u"?v:Atomics,"%BigInt%":typeof BigInt>"u"?v:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?v:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?v:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?v:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":S,"%eval%":eval,"%EvalError%":M,"%Float16Array%":typeof Float16Array>"u"?v:Float16Array,"%Float32Array%":typeof Float32Array>"u"?v:Float32Array,"%Float64Array%":typeof Float64Array>"u"?v:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?v:FinalizationRegistry,"%Function%":T,"%GeneratorFunction%":D,"%Int8Array%":typeof Int8Array>"u"?v:Int8Array,"%Int16Array%":typeof Int16Array>"u"?v:Int16Array,"%Int32Array%":typeof Int32Array>"u"?v:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":p&&b?b(b([][Symbol.iterator]())):v,"%JSON%":typeof JSON=="object"?JSON:v,"%Map%":typeof Map>"u"?v:Map,"%MapIteratorPrototype%":typeof Map>"u"||!p||!b?v:b(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":_,"%Object.getOwnPropertyDescriptor%":x,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?v:Promise,"%Proxy%":typeof Proxy>"u"?v:Proxy,"%RangeError%":e,"%ReferenceError%":t,"%Reflect%":typeof Reflect>"u"?v:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?v:Set,"%SetIteratorPrototype%":typeof Set>"u"||!p||!b?v:b(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?v:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":p&&b?b(""[Symbol.iterator]()):v,"%Symbol%":p?Symbol:v,"%SyntaxError%":r,"%ThrowTypeError%":E,"%TypedArray%":P,"%TypeError%":o,"%Uint8Array%":typeof Uint8Array>"u"?v:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?v:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?v:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?v:Uint32Array,"%URIError%":a,"%WeakMap%":typeof WeakMap>"u"?v:WeakMap,"%WeakRef%":typeof WeakRef>"u"?v:WeakRef,"%WeakSet%":typeof WeakSet>"u"?v:WeakSet,"%Function.prototype.call%":y,"%Function.prototype.apply%":g,"%Object.defineProperty%":w,"%Object.getPrototypeOf%":d,"%Math.abs%":i,"%Math.floor%":n,"%Math.max%":s,"%Math.min%":h,"%Math.pow%":f,"%Math.round%":m,"%Math.sign%":c,"%Reflect.getPrototypeOf%":u};if(b)try{null.error}catch(V){F=b(b(V)),z["%Error.prototype%"]=F}var F,N=function V(le){var ae;if(le==="%AsyncFunction%")ae=l("async function () {}");else if(le==="%GeneratorFunction%")ae=l("function* () {}");else if(le==="%AsyncGeneratorFunction%")ae=l("async function* () {}");else if(le==="%AsyncGenerator%"){var j=V("%AsyncGeneratorFunction%");j&&(ae=j.prototype)}else if(le==="%AsyncIteratorPrototype%"){var ee=V("%AsyncGenerator%");ee&&b&&(ae=b(ee.prototype))}return z[le]=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"]},L=g1(),U=RO(),B=L.call(y,Array.prototype.concat),W=L.call(g,Array.prototype.splice),$=L.call(y,String.prototype.replace),ue=L.call(y,String.prototype.slice),ce=L.call(y,RegExp.prototype.exec),de=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Y=/\\(\\)?/g,X=function(le){var ae=ue(le,0,1),j=ue(le,-1);if(ae==="%"&&j!=="%")throw new r("invalid intrinsic syntax, expected closing `%`");if(j==="%"&&ae!=="%")throw new r("invalid intrinsic syntax, expected opening `%`");var ee=[];return $(le,de,function(te,pe,we,Se){ee[ee.length]=we?$(Se,Y,"$1"):pe||te}),ee},Q=function(le,ae){var j=le,ee;if(U(O,j)&&(ee=O[j],j="%"+ee[0]+"%"),U(z,j)){var te=z[j];if(te===D&&(te=N(j)),typeof te>"u"&&!ae)throw new o("intrinsic "+le+" exists, but is not available. Please file an issue!");return{alias:ee,name:j,value:te}}throw new r("intrinsic "+le+" does not exist!")};q.exports=function(le,ae){if(typeof le!="string"||le.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(/^%?[^%]*%?$/,le)===null)throw new r("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var j=X(le),ee=j.length>0?j[0]:"",te=Q("%"+ee+"%",ae),pe=te.name,we=te.value,Se=!1,Re=te.alias;Re&&(ee=Re[0],W(j,B([0,1],Re)));for(var Pe=1,je=!0;Pe=j.length){var Ve=x(we,at);je=!!Ve,je&&"get"in Ve&&!("originalValue"in Ve.get)?we=Ve.get:we=we[at]}else je=U(we,at),we=we[at];je&&!Se&&(z[pe]=we)}}return we}}}),DO=He({"node_modules/define-data-property/index.js"(Z,q){"use strict";var v=X_(),_=OS(),S=m1(),M=ag();q.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,i=arguments.length>4?arguments[4]:null,n=arguments.length>5?arguments[5]:null,s=arguments.length>6?arguments[6]:!1,h=!!M&&M(t,r);if(v)v(t,r,{configurable:n===null&&h?h.configurable:!n,enumerable:a===null&&h?h.enumerable:!a,value:o,writable:i===null&&h?h.writable:!i});else if(s||!a&&!i&&!n)t[r]=o;else throw new _("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,q){"use strict";var v=X_(),_=function(){return!!v};_.hasArrayLengthDefineBug=function(){if(!v)return null;try{return v([],"length",{value:1}).length!==1}catch{return!0}},q.exports=_}}),zO=He({"node_modules/set-function-length/index.js"(Z,q){"use strict";var v=v3(),_=DO(),S=jS()(),M=ag(),e=m1(),t=v("%Math.floor%");q.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 i=arguments.length>2&&!!arguments[2],n=!0,s=!0;if("length"in o&&M){var h=M(o,"length");h&&!h.configurable&&(n=!1),h&&!h.writable&&(s=!1)}return(n||s||!i)&&(S?_(o,"length",a,!0,!0):_(o,"length",a)),o}}}),Z_=He({"node_modules/call-bind/index.js"(Z,q){"use strict";var v=g1(),_=v3(),S=zO(),M=m1(),e=_("%Function.prototype.apply%"),t=_("%Function.prototype.call%"),r=_("%Reflect.apply%",!0)||v.call(t,e),o=X_(),a=_("%Math.max%");q.exports=function(s){if(typeof s!="function")throw new M("a function is required");var h=r(v,t,arguments);return S(h,1+a(0,s.length-(arguments.length-1)),!0)};var i=function(){return r(v,e,arguments)};o?o(q.exports,"apply",{value:i}):q.exports.apply=i}}),y1=He({"node_modules/call-bind/callBound.js"(Z,q){"use strict";var v=v3(),_=Z_(),S=_(v("String.prototype.indexOf"));q.exports=function(e,t){var r=v(e,!!t);return typeof r=="function"&&S(e,".prototype.")>-1?_(r):r}}}),FO=He({"node_modules/is-arguments/index.js"(Z,q){"use strict";var v=W_()(),_=y1(),S=_("Object.prototype.toString"),M=function(o){return v&&o&&typeof o=="object"&&Symbol.toStringTag in o?!1:S(o)==="[object Arguments]"},e=function(o){return M(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 M(arguments)}();M.isLegacyArguments=e,q.exports=t?M:e}}),OO=He({"node_modules/is-generator-function/index.js"(Z,q){"use strict";var v=Object.prototype.toString,_=Function.prototype.toString,S=/^\s*(?:function)?\*/,M=W_()(),e=Object.getPrototypeOf,t=function(){if(!M)return!1;try{return Function("return function*() {}")()}catch{}},r;q.exports=function(a){if(typeof a!="function")return!1;if(S.test(_.call(a)))return!0;if(!M){var i=v.call(a);return i==="[object GeneratorFunction]"}if(!e)return!1;if(typeof r>"u"){var n=t();r=n?e(n):!1}return e(a)===r}}}),BO=He({"node_modules/is-callable/index.js"(Z,q){"use strict";var v=Function.prototype.toString,_=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,S,M;if(typeof _=="function"&&typeof Object.defineProperty=="function")try{S=Object.defineProperty({},"length",{get:function(){throw M}}),M={},_(function(){throw 42},null,S)}catch(x){x!==M&&(_=null)}else _=null;var e=/^\s*class\b/,t=function(w){try{var A=v.call(w);return e.test(A)}catch{return!1}},r=function(w){try{return t(w)?!1:(v.call(w),!0)}catch{return!1}},o=Object.prototype.toString,a="[object Object]",i="[object Function]",n="[object GeneratorFunction]",s="[object HTMLAllCollection]",h="[object HTML document.all class]",f="[object HTMLCollection]",m=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;q.exports=_?function(w){if(T(w))return!0;if(!w||typeof w!="function"&&typeof w!="object")return!1;try{_(w,null,S)}catch(A){if(A!==M)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(m)return r(w);if(t(w))return!1;var A=o.call(w);return A!==i&&A!==n&&!/^\[object HTML/.test(A)?!1:r(w)}}}),qS=He({"node_modules/for-each/index.js"(Z,q){"use strict";var v=BO(),_=Object.prototype.toString,S=Object.prototype.hasOwnProperty,M=function(a,i,n){for(var s=0,h=a.length;s=3&&(s=n),_.call(a)==="[object Array]"?M(a,i,s):typeof a=="string"?e(a,i,s):t(a,i,s)};q.exports=r}}),VS=He({"node_modules/available-typed-arrays/index.js"(Z,q){"use strict";var v=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],_=typeof globalThis>"u"?window:globalThis;q.exports=function(){for(var M=[],e=0;e"u"?window:globalThis,a=_(),i=M("String.prototype.slice"),n=Object.getPrototypeOf,s=M("Array.prototype.indexOf",!0)||function(T,l){for(var x=0;x-1?l:l!=="Object"?!1:m(T)}return e?f(T):null}}}),UO=He({"node_modules/is-typed-array/index.js"(Z,q){"use strict";var v=qS(),_=VS(),S=y1(),M=S("Object.prototype.toString"),e=W_()(),t=ag(),r=typeof globalThis>"u"?window:globalThis,o=_(),a=S("Array.prototype.indexOf",!0)||function(m,c){for(var T=0;T-1}return t?h(m):!1}}}),GS=He({"node_modules/util/support/types.js"(Z){"use strict";var q=FO(),v=OO(),_=NO(),S=UO();function M(Se){return Se.call.bind(Se)}var e=typeof BigInt<"u",t=typeof Symbol<"u",r=M(Object.prototype.toString),o=M(Number.prototype.valueOf),a=M(String.prototype.valueOf),i=M(Boolean.prototype.valueOf);e&&(n=M(BigInt.prototype.valueOf));var n;t&&(s=M(Symbol.prototype.valueOf));var s;function h(Se,Re){if(typeof Se!="object")return!1;try{return Re(Se),!0}catch{return!1}}Z.isArgumentsObject=q,Z.isGeneratorFunction=v,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 m(Se){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(Se):S(Se)||W(Se)}Z.isArrayBufferView=m;function c(Se){return _(Se)==="Uint8Array"}Z.isUint8Array=c;function T(Se){return _(Se)==="Uint8ClampedArray"}Z.isUint8ClampedArray=T;function l(Se){return _(Se)==="Uint16Array"}Z.isUint16Array=l;function x(Se){return _(Se)==="Uint32Array"}Z.isUint32Array=x;function w(Se){return _(Se)==="Int8Array"}Z.isInt8Array=w;function A(Se){return _(Se)==="Int16Array"}Z.isInt16Array=A;function E(Se){return _(Se)==="Int32Array"}Z.isInt32Array=E;function p(Se){return _(Se)==="Float32Array"}Z.isFloat32Array=p;function b(Se){return _(Se)==="Float64Array"}Z.isFloat64Array=b;function d(Se){return _(Se)==="BigInt64Array"}Z.isBigInt64Array=d;function u(Se){return _(Se)==="BigUint64Array"}Z.isBigUint64Array=u;function g(Se){return r(Se)==="[object Map]"}g.working=typeof Map<"u"&&g(new Map);function y(Se){return typeof Map>"u"?!1:g.working?g(Se):Se instanceof Map}Z.isMap=y;function D(Se){return r(Se)==="[object Set]"}D.working=typeof Set<"u"&&D(new Set);function P(Se){return typeof Set>"u"?!1:D.working?D(Se):Se instanceof Set}Z.isSet=P;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 L(Se){return r(Se)==="[object ArrayBuffer]"}L.working=typeof ArrayBuffer<"u"&&L(new ArrayBuffer);function U(Se){return typeof ArrayBuffer>"u"?!1:L.working?L(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 W(Se){return typeof DataView>"u"?!1:B.working?B(Se):Se instanceof DataView}Z.isDataView=W;var $=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function ue(Se){return r(Se)==="[object SharedArrayBuffer]"}function ce(Se){return typeof $>"u"?!1:(typeof ue.working>"u"&&(ue.working=ue(new $)),ue.working?ue(Se):Se instanceof $)}Z.isSharedArrayBuffer=ce;function de(Se){return r(Se)==="[object AsyncFunction]"}Z.isAsyncFunction=de;function Y(Se){return r(Se)==="[object Map Iterator]"}Z.isMapIterator=Y;function X(Se){return r(Se)==="[object Set Iterator]"}Z.isSetIterator=X;function Q(Se){return r(Se)==="[object Generator]"}Z.isGeneratorObject=Q;function V(Se){return r(Se)==="[object WebAssembly.Module]"}Z.isWebAssemblyCompiledModule=V;function le(Se){return h(Se,o)}Z.isNumberObject=le;function ae(Se){return h(Se,a)}Z.isStringObject=ae;function j(Se){return h(Se,i)}Z.isBooleanObject=j;function ee(Se){return e&&h(Se,n)}Z.isBigIntObject=ee;function te(Se){return t&&h(Se,s)}Z.isSymbolObject=te;function pe(Se){return le(Se)||ae(Se)||j(Se)||ee(Se)||te(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,q){q.exports=function(_){return _&&typeof _=="object"&&typeof _.copy=="function"&&typeof _.fill=="function"&&typeof _.readUInt8=="function"}}}),WS=He({"(disabled):node_modules/util/util.js"(Z){var q=Object.getOwnPropertyDescriptors||function(W){for(var $=Object.keys(W),ue={},ce=0;ce<$.length;ce++)ue[$[ce]]=Object.getOwnPropertyDescriptor(W,$[ce]);return ue},v=/%[sdj%]/g;Z.format=function(B){if(!w(B)){for(var W=[],$=0;$=ce)return X;switch(X){case"%s":return String(ue[$++]);case"%d":return Number(ue[$++]);case"%j":try{return JSON.stringify(ue[$++])}catch{return"[Circular]"}default:return X}}),Y=ue[$];$"u")return function(){return Z.deprecate(B,W).apply(this,arguments)};var $=!1;function ue(){if(!$){if(process.throwDeprecation)throw new Error(W);process.traceDeprecation?console.trace(W):console.error(W),$=!0}return B.apply(this,arguments)}return ue};var _={},S=/^$/;M="false",M=M.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),S=new RegExp("^"+M+"$","i");var M;Z.debuglog=function(B){if(B=B.toUpperCase(),!_[B])if(S.test(B)){var W=process.pid;_[B]=function(){var $=Z.format.apply(Z,arguments);console.error("%s %d: %s",B,W,$)}}else _[B]=function(){};return _[B]};function e(B,W){var $={seen:[],stylize:r};return arguments.length>=3&&($.depth=arguments[2]),arguments.length>=4&&($.colors=arguments[3]),c(W)?$.showHidden=W:W&&Z._extend($,W),E($.showHidden)&&($.showHidden=!1),E($.depth)&&($.depth=2),E($.colors)&&($.colors=!1),E($.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,W){var $=e.styles[W];return $?"\x1B["+e.colors[$][0]+"m"+B+"\x1B["+e.colors[$][1]+"m":B}function r(B,W){return B}function o(B){var W={};return B.forEach(function($,ue){W[$]=!0}),W}function a(B,W,$){if(B.customInspect&&W&&g(W.inspect)&&W.inspect!==Z.inspect&&!(W.constructor&&W.constructor.prototype===W)){var ue=W.inspect($,B);return w(ue)||(ue=a(B,ue,$)),ue}var ce=i(B,W);if(ce)return ce;var de=Object.keys(W),Y=o(de);if(B.showHidden&&(de=Object.getOwnPropertyNames(W)),u(W)&&(de.indexOf("message")>=0||de.indexOf("description")>=0))return n(W);if(de.length===0){if(g(W)){var X=W.name?": "+W.name:"";return B.stylize("[Function"+X+"]","special")}if(p(W))return B.stylize(RegExp.prototype.toString.call(W),"regexp");if(d(W))return B.stylize(Date.prototype.toString.call(W),"date");if(u(W))return n(W)}var Q="",V=!1,le=["{","}"];if(m(W)&&(V=!0,le=["[","]"]),g(W)){var ae=W.name?": "+W.name:"";Q=" [Function"+ae+"]"}if(p(W)&&(Q=" "+RegExp.prototype.toString.call(W)),d(W)&&(Q=" "+Date.prototype.toUTCString.call(W)),u(W)&&(Q=" "+n(W)),de.length===0&&(!V||W.length==0))return le[0]+Q+le[1];if($<0)return p(W)?B.stylize(RegExp.prototype.toString.call(W),"regexp"):B.stylize("[Object]","special");B.seen.push(W);var j;return V?j=s(B,W,$,Y,de):j=de.map(function(ee){return h(B,W,$,Y,ee,V)}),B.seen.pop(),f(j,Q,le)}function i(B,W){if(E(W))return B.stylize("undefined","undefined");if(w(W)){var $="'"+JSON.stringify(W).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return B.stylize($,"string")}if(x(W))return B.stylize(""+W,"number");if(c(W))return B.stylize(""+W,"boolean");if(T(W))return B.stylize("null","null")}function n(B){return"["+Error.prototype.toString.call(B)+"]"}function s(B,W,$,ue,ce){for(var de=[],Y=0,X=W.length;Y1?(i[h-1]-i[0])/(h-1):1,c,T;for(m>=0?T=n?e:t:T=n?o:r,a+=m*M*(n?-1:1)*(m>=0?1:-1);s90&&v.log("Long binary search..."),s-1};function e(a,i){return ai}function o(a,i){return a>=i}Z.sorterAsc=function(a,i){return a-i},Z.sorterDes=function(a,i){return i-a},Z.distinctVals=function(a){var i=a.slice();i.sort(Z.sorterAsc);var n;for(n=i.length-1;n>-1&&i[n]===S;n--);for(var s=i[n]-i[0]||1,h=s/(n||1)/1e4,f=[],m,c=0;c<=n;c++){var T=i[c],l=T-m;m===void 0?(f.push(T),m=T):l>h&&(s=Math.min(s,l),f.push(T),m=T)}return{vals:f,minDiff:s}},Z.roundUp=function(a,i,n){for(var s=0,h=i.length-1,f,m=0,c=n?0:1,T=n?1:0,l=n?Math.ceil:Math.floor;s0&&(s=1),n&&s)return a.sort(i)}return s?a:a.reverse()},Z.findIndexOfMin=function(a,i){i=i||_;for(var n=1/0,s,h=0;hM.length)&&(e=M.length),q(S)||(S=!1),v(M[0])){for(r=new Array(e),t=0;t_.length-1)return _[_.length-1];var M=S%1;return M*_[Math.ceil(S)]+(1-M)*_[Math.floor(S)]}}}),W7=He({"src/lib/angles.js"(Z,q){"use strict";var v=Yy(),_=v.mod,S=v.modHalf,M=Math.PI,e=2*M;function t(T){return T/180*M}function r(T){return T/M*180}function o(T){return Math.abs(T[1]-T[0])>e-1e-14}function a(T,l){return S(l-T,e)}function i(T,l){return Math.abs(a(T,l))}function n(T,l){if(o(l))return!0;var x,w;l[0]w&&(w+=e);var A=_(T,e),E=A+e;return A>=x&&A<=w||E>=x&&E<=w}function s(T,l,x,w){if(!n(l,w))return!1;var A,E;return x[0]=A&&T<=E}function h(T,l,x,w,A,E,p){A=A||0,E=E||0;var b=o([x,w]),d,u,g,y,D;b?(d=0,u=M,g=e):x1/3&&v.x<2/3},Z.isRightAnchor=function(v){return v.xanchor==="right"||v.xanchor==="auto"&&v.x>=2/3},Z.isTopAnchor=function(v){return v.yanchor==="top"||v.yanchor==="auto"&&v.y>=2/3},Z.isMiddleAnchor=function(v){return v.yanchor==="middle"||v.yanchor==="auto"&&v.y>1/3&&v.y<2/3},Z.isBottomAnchor=function(v){return v.yanchor==="bottom"||v.yanchor==="auto"&&v.y<=1/3}}}),Z7=He({"src/lib/geometry2d.js"(Z){"use strict";var q=Yy().mod;Z.segmentsIntersect=v;function v(t,r,o,a,i,n,s,h){var f=o-t,m=i-t,c=s-i,T=a-r,l=n-r,x=h-n,w=f*x-c*T;if(w===0)return null;var A=(m*x-c*l)/w,E=(m*T-f*l)/w;return E<0||E>1||A<0||A>1?null:{x:t+f*A,y:r+T*A}}Z.segmentDistance=function(r,o,a,i,n,s,h,f){if(v(r,o,a,i,n,s,h,f))return 0;var m=a-r,c=i-o,T=h-n,l=f-s,x=m*m+c*c,w=T*T+l*l,A=Math.min(_(m,c,x,n-r,s-o),_(m,c,x,h-r,f-o),_(T,l,w,r-n,o-s),_(T,l,w,a-n,i-s));return Math.sqrt(A)};function _(t,r,o,a,i){var n=a*t+i*r;if(n<0)return a*a+i*i;if(n>o){var s=a-t,h=i-r;return s*s+h*h}else{var f=a*r-i*t;return f*f/o}}var S,M,e;Z.getTextLocation=function(r,o,a,i){if((r!==M||i!==e)&&(S={},M=r,e=i),S[a])return S[a];var n=r.getPointAtLength(q(a-i/2,o)),s=r.getPointAtLength(q(a+i/2,o)),h=Math.atan((s.y-n.y)/(s.x-n.x)),f=r.getPointAtLength(q(a,o)),m=(f.x*4+n.x+s.x)/6,c=(f.y*4+n.y+s.y)/6,T={x:m,y:c,theta:h};return S[a]=T,T},Z.clearLocationCache=function(){M=null},Z.getVisibleSegment=function(r,o,a){var i=o.left,n=o.right,s=o.top,h=o.bottom,f=0,m=r.getTotalLength(),c=m,T,l;function x(A){var E=r.getPointAtLength(A);A===0?T=E:A===m&&(l=E);var p=E.xn?E.x-n:0,b=E.yh?E.y-h:0;return Math.sqrt(p*p+b*b)}for(var w=x(f);w;){if(f+=w+a,f>c)return;w=x(f)}for(w=x(c);w;){if(c-=w+a,f>c)return;w=x(c)}return{min:f,max:c,len:c-f,total:m,isClosed:f===0&&c===m&&Math.abs(T.x-l.x)<.1&&Math.abs(T.y-l.y)<.1}},Z.findPointOnPath=function(r,o,a,i){i=i||{};for(var n=i.pathLength||r.getTotalLength(),s=i.tolerance||.001,h=i.iterationLimit||30,f=r.getPointAtLength(0)[a]>r.getPointAtLength(n)[a]?-1:1,m=0,c=0,T=n,l,x,w;m0?T=l:c=l,m++}return x}}}),y2=He({"src/lib/throttle.js"(Z){"use strict";var q={};Z.throttle=function(S,M,e){var t=q[S],r=Date.now();if(!t){for(var o in q)q[o].tst.ts+M){a();return}t.timer=setTimeout(function(){a(),t.timer=null},M)},Z.done=function(_){var S=q[_];return!S||!S.timer?Promise.resolve():new Promise(function(M){var e=S.onDone;S.onDone=function(){e&&e(),M(),S.onDone=null}})},Z.clear=function(_){if(_)v(q[_]),delete q[_];else for(var S in q)Z.clear(S)};function v(_){_&&_.timer!==null&&(clearTimeout(_.timer),_.timer=null)}}}),Y7=He({"src/lib/clear_responsive.js"(Z,q){"use strict";q.exports=function(_){_._responsiveChartHandler&&(window.removeEventListener("resize",_._responsiveChartHandler),delete _._responsiveChartHandler)}}}),K7=He({"node_modules/is-mobile/index.js"(Z,q){"use strict";q.exports=M,q.exports.isMobile=M,q.exports.default=M;var v=/(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,_=/CrOS/,S=/android|ipad|playbook|silk/i;function M(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=v.test(t)&&!_.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,q){"use strict";var v=ns(),_=K7();q.exports=function(e){var t;if(e&&e.hasOwnProperty("userAgent")?t=e.userAgent:t=S(),typeof t!="string")return!0;var r=_({ua:{headers:{"user-agent":t}},tablet:!0,featureDetect:!1});if(!r)for(var o=t.split(" "),a=1;a-1;n--){var s=o[n];if(s.slice(0,8)==="Version/"){var h=s.slice(8).split(".")[0];if(v(h)&&(h=+h),h>=13)return!0}}}return r};function S(){var M;return typeof navigator<"u"&&(M=navigator.userAgent),M&&M.headers&&typeof M.headers["user-agent"]=="string"&&(M=M.headers["user-agent"]),M}}}),$7=He({"src/lib/make_trace_groups.js"(Z,q){"use strict";var v=Vn();q.exports=function(S,M,e){var t=S.selectAll("g."+e.replace(/\s/g,".")).data(M,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]=v.select(this)}),t}}}),Q7=He({"src/lib/localize.js"(Z,q){"use strict";var v=so();q.exports=function(S,M){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 i=a[M];if(i)return i}r=v.localeRegistry}var n=e.split("-")[0];if(n===e)break;e=n}return M}}}),r5=He({"src/lib/filter_unique.js"(Z,q){"use strict";q.exports=function(_){for(var S={},M=[],e=0,t=0;t<_.length;t++){var r=_[t];S[r]!==1&&(S[r]=1,M[e++]=r)}return M}}}),ez=He({"src/lib/filter_visible.js"(Z,q){"use strict";q.exports=function(e){for(var t=S(e)?_:v,r=[],o=0;o1?(M*_+M*S)/M:_+S,t=String(e).length;if(t>16){var r=String(S).length,o=String(_).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,q){"use strict";var v=ns(),_=Gs().BADNUM,S=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g;q.exports=function(e){return typeof e=="string"&&(e=e.replace(S,"")),v(e)?Number(e):_}}}),sa=He({"src/lib/index.js"(Z,q){"use strict";var v=Vn(),_=Zv().utcFormat,S=YA().format,M=ns(),e=Gs(),t=e.FP_SAFE,r=-t,o=e.BADNUM,a=q.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 i={};a.warnBadFormat=function(ae){var j=String(ae);i[j]||(i[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=Yv(),a.toLogRange=h2(),a.relinkPrivateKeys=f7();var n=hp();a.isArrayBuffer=n.isArrayBuffer,a.isTypedArray=n.isTypedArray,a.isArrayOrTypedArray=n.isArrayOrTypedArray,a.isArray1D=n.isArray1D,a.ensureArray=n.ensureArray,a.concat=n.concat,a.maxRowLength=n.maxRowLength,a.minRowLength=n.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 m=g2();a.findBin=m.findBin,a.sorterAsc=m.sorterAsc,a.sorterDes=m.sorterDes,a.distinctVals=m.distinctVals,a.roundUp=m.roundUp,a.sort=m.sort,a.findIndexOfMin=m.findIndexOfMin,a.sortObjectKeys=$m();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 x=X7();a.isLeftAnchor=x.isLeftAnchor,a.isCenterAnchor=x.isCenterAnchor,a.isRightAnchor=x.isRightAnchor,a.isTopAnchor=x.isTopAnchor,a.isMiddleAnchor=x.isMiddleAnchor,a.isBottomAnchor=x.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=rs();a.extendFlat=A.extendFlat,a.extendDeep=A.extendDeep,a.extendDeepAll=A.extendDeepAll,a.extendDeepNoArrays=A.extendDeepNoArrays;var E=Jm();a.log=E.log,a.warn=E.warn,a.error=E.error;var p=Jy();a.counterRegex=p.counter;var b=y2();a.throttle=b.throttle,a.throttleDone=b.done,a.clearThrottle=b.clear;var d=T_();a.getGraphDiv=d.getGraphDiv,a.isPlotDiv=d.isPlotDiv,a.removeElement=d.removeElement,a.addStyleRule=d.addStyleRule,a.addRelatedStyleRule=d.addRelatedStyleRule,a.deleteRelatedStyleRule=d.deleteRelatedStyleRule,a.setStyleOnHover=d.setStyleOnHover,a.getFullTransformMatrix=d.getFullTransformMatrix,a.getElementTransformMatrix=d.getElementTransformMatrix,a.getElementAndAncestors=d.getElementAndAncestors,a.equalDomRects=d.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 M(j)?(j=Number(j),j>t||j=j?!1:M(ae)&&ae>=0&&ae%1===0},a.noop=p2(),a.identity=S_(),a.repeat=function(ae,j){for(var ee=new Array(j),te=0;teee?Math.max(ee,Math.min(j,ae)):Math.max(j,Math.min(ee,ae))},a.bBoxIntersect=function(ae,j,ee){return ee=ee||0,ae.left<=j.right+ee&&j.left<=ae.right+ee&&ae.top<=j.bottom+ee&&j.top<=ae.bottom+ee},a.simpleMap=function(ae,j,ee,te,pe){for(var we=ae.length,Se=new Array(we),Re=0;Re=Math.pow(2,ee)?pe>10?(a.warn("randstr failed uniqueness"),Se):ae(j,ee,te,(pe||0)+1):Se},a.OptionControl=function(ae,j){ae||(ae={}),j||(j="opt");var ee={};return ee.optionList=[],ee._newoption=function(te){te[j]=ae,ee[te.name]=te,ee.optionList.push(te)},ee["_"+j]=ae,ee},a.smooth=function(ae,j){if(j=Math.round(j)||0,j<2)return ae;var ee=ae.length,te=2*ee,pe=2*j-1,we=new Array(pe),Se=new Array(ee),Re,Pe,je,at;for(Re=0;Re=te&&(je-=te*Math.floor(je/te)),je<0?je=-1-je:je>=ee&&(je=te-1-je),at+=ae[je]*we[Pe];Se[Re]=at}return Se},a.syncOrAsync=function(ae,j,ee){var te,pe;function we(){return a.syncOrAsync(ae,j,ee)}for(;ae.length;)if(pe=ae.splice(0,1)[0],te=pe(j),te&&te.then)return te.then(we);return ee&&ee(j)},a.stripTrailingSlash=function(ae){return ae.slice(-1)==="/"?ae.slice(0,-1):ae},a.noneOrAll=function(ae,j,ee){if(ae){var te=!1,pe=!0,we,Se;for(we=0;we0?pe:0})},a.fillArray=function(ae,j,ee,te){if(te=te||a.identity,a.isArrayOrTypedArray(ae))for(var pe=0;peP.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 v.selection},a.ensureSingle=function(ae,j,ee,te){var pe=ae.select(j+(ee?"."+ee:""));if(pe.size())return pe;var we=ae.append(j);return ee&&we.classed(ee,!0),te&&we.call(te),we},a.ensureSingleById=function(ae,j,ee,te){var pe=ae.select(j+"#"+ee);if(pe.size())return pe;var we=ae.append(j).attr("id",ee);return te&&we.call(te),we},a.objectFromPath=function(ae,j){for(var ee=ae.split("."),te,pe=te={},we=0;we1?pe+Se[1]:"";if(we&&(Se.length>1||Re.length>4||ee))for(;te.test(Re);)Re=Re.replace(te,"$1"+we+"$2");return Re+Pe},a.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var L=/^\w*$/;a.templateString=function(ae,j){var ee={};return ae.replace(a.TEMPLATE_STRING_REGEX,function(te,pe){var we;return L.test(pe)?we=j[pe]:(ee[pe]=ee[pe]||a.nestedProperty(j,pe).get,we=ee[pe](!0)),we!==void 0?we:""})};var U={max:10,count:0,name:"hovertemplate"};a.hovertemplateString=ae=>de(vs(So({},ae),{opts:U}));var B={max:10,count:0,name:"texttemplate"};a.texttemplateString=ae=>de(vs(So({},ae),{opts:B}));var W=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/;function $(ae){var j=ae.match(W);return j?{key:j[1],op:j[2],number:Number(j[3])}:{key:ae,op:null,number:null}}var ue={max:10,count:0,name:"texttemplate",parseMultDiv:!0};a.texttemplateStringForShapes=ae=>de(vs(So({},ae),{opts:ue}));var ce=/^[:|\|]/;function de({data:ae=[],locale:j,fallback:ee,labels:te={},opts:pe,template:we}){return we.replace(a.TEMPLATE_STRING_REGEX,(Se,Re,Pe)=>{let je=["xother","yother"].includes(Re),at=["_xother","_yother"].includes(Re),nt=["_xother_","_yother_"].includes(Re),tt=["xother_","yother_"].includes(Re),Ve=je||at||tt||nt;(at||nt)&&(Re=Re.substring(1)),(tt||nt)&&(Re=Re.substring(0,Re.length-1));let he=null,se=null;if(pe.parseMultDiv){var ne=$(Re);Re=ne.key,he=ne.op,se=ne.number}let Ce;if(Ve){if(te[Re]===void 0)return"";Ce=te[Re]}else for(let St of ae)if(St){if(St.hasOwnProperty(Re)){Ce=St[Re];break}if(L.test(Re)||(Ce=a.nestedProperty(St,Re).get(!0)),Ce!==void 0)break}if(Ce===void 0){let{count:St,max:kt,name:Bt}=pe,Vt=ee===!1?Se:ee;return St=Y&&Se<=X,je=Re>=Y&&Re<=X;if(Pe&&(te=10*te+Se-Y),je&&(pe=10*pe+Re-Y),!Pe||!je){if(te!==pe)return te-pe;if(Se!==Re)return Se-Re}}return pe-te};var Q=2e9;a.seedPseudoRandom=function(){Q=2e9},a.pseudoRandom=function(){var ae=Q;return Q=(69069*Q+1)%4294967296,Math.abs(Q-ae)<429496729?a.pseudoRandom():Q/4294967296},a.fillText=function(ae,j,ee){var te=Array.isArray(ee)?function(Se){ee.push(Se)}:function(Se){ee.text=Se},pe=a.extractOption(ae,j,"htx","hovertext");if(a.isValidTextValue(pe))return te(pe);var we=a.extractOption(ae,j,"tx","text");if(a.isValidTextValue(we))return te(we)},a.isValidTextValue=function(ae){return ae||ae===0},a.formatPercent=function(ae,j){j=j||0;for(var ee=(Math.round(100*ae*Math.pow(10,j))*Math.pow(.1,j)).toFixed(j)+"%",te=0;te1&&(je=1):je=0,a.strTranslate(pe-je*(ee+Se),we-je*(te+Re))+a.strScale(je)+(Pe?"rotate("+Pe+(j?"":" "+ee+" "+te)+")":"")},a.setTransormAndDisplay=function(ae,j){ae.attr("transform",a.getTextTransform(j)),ae.style("display",j.scale?null:"none")},a.ensureUniformFontSize=function(ae,j){var ee=a.extendFlat({},j);return ee.size=Math.max(j.size,ae._fullLayout.uniformtext.minsize||0),ee},a.join2=function(ae,j,ee){var te=ae.length;return te>1?ae.slice(0,-1).join(j)+ee+ae[te-1]:ae.join(j)},a.bigFont=function(ae){return Math.round(1.2*ae)};var V=a.getFirefoxVersion(),le=V!==null&&V<86;a.getPositionFromD3Event=function(){return le?[v.event.layerX,v.event.layerY]:[v.event.offsetX,v.event.offsetY]}}}),az=He({"build/plotcss.js"(){"use strict";var Z=sa(),q={"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;","X .plotly-cloud-dialog":'font-family:"Open Sans",verdana,arial,sans-serif;position:absolute;top:0;left:0;width:100%;height:100%;z-index:1001;display:flex;align-items:center;justify-content:center;background-color:rgba(0,0,0,.4);',"X .plotly-cloud-dialog .plotly-cloud-dialog-box":"box-sizing:border-box;min-width:300px;max-width:420px;padding:20px 24px;background-color:#fff;border:1px solid #e0e2e5;border-radius:4px;box-shadow:0 4px 16px rgba(0,0,0,.25);font-size:13px;color:#2a3f5f;","X .plotly-cloud-dialog .plotly-cloud-dialog-title":"font-size:16px;font-weight:bold;margin-bottom:12px;","X .plotly-cloud-dialog .plotly-cloud-dialog-message":"line-height:1.5;overflow-wrap:break-word;word-wrap:break-word;","X .plotly-cloud-dialog .plotly-cloud-dialog-buttons":"display:flex;justify-content:flex-end;margin-top:20px;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn":"font-family:inherit;font-size:13px;padding:7px 16px;margin-left:8px;border-radius:3px;border:1px solid rgba(0,0,0,0);cursor:pointer;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn:focus-visible":"outline:2px solid #447adb;outline-offset:1px;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--cancel":"background-color:#fff;border-color:#e0e2e5;color:#777;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--cancel:hover":"background-color:#f3f3f3;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--confirm":"background-color:#447adb;color:#fff;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--confirm:hover":"background-color:#1d3b84;",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(_ in q)v=_.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier"),Z.addStyleRule(v,q[_]);var v,_}}),a5=He({"node_modules/is-browser/client.js"(Z,q){q.exports=!0}}),i5=He({"node_modules/has-hover/index.js"(Z,q){"use strict";var v=a5(),_;typeof window.matchMedia=="function"?_=!window.matchMedia("(hover: none)").matches:_=v,q.exports=_}}),Z0=He({"node_modules/events/events.js"(Z,q){"use strict";var v=typeof Reflect=="object"?Reflect:null,_=v&&typeof v.apply=="function"?v.apply:function(E,p,b){return Function.prototype.apply.call(E,p,b)},S;v&&typeof v.ownKeys=="function"?S=v.ownKeys:Object.getOwnPropertySymbols?S=function(E){return Object.getOwnPropertyNames(E).concat(Object.getOwnPropertySymbols(E))}:S=function(E){return Object.getOwnPropertyNames(E)};function M(A){console&&console.warn&&console.warn(A)}var e=Number.isNaN||function(E){return E!==E};function t(){t.init.call(this)}q.exports=t,q.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(E){if(typeof E!="number"||E<0||e(E))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+E+".");return this._maxListeners=E,this};function a(A){return A._maxListeners===void 0?t.defaultMaxListeners:A._maxListeners}t.prototype.getMaxListeners=function(){return a(this)},t.prototype.emit=function(E){for(var p=[],b=1;b0&&(g=p[0]),g instanceof Error)throw g;var y=new Error("Unhandled error."+(g?" ("+g.message+")":""));throw y.context=g,y}var D=u[E];if(D===void 0)return!1;if(typeof D=="function")_(D,this,p);else for(var P=D.length,z=m(D,P),b=0;b0&&g.length>d&&!g.warned){g.warned=!0;var y=new Error("Possible EventEmitter memory leak detected. "+g.length+" "+String(E)+" listeners added. Use emitter.setMaxListeners() to increase limit");y.name="MaxListenersExceededWarning",y.emitter=A,y.type=E,y.count=g.length,M(y)}return A}t.prototype.addListener=function(E,p){return i(this,E,p,!1)},t.prototype.on=t.prototype.addListener,t.prototype.prependListener=function(E,p){return i(this,E,p,!0)};function n(){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,E,p){var b={fired:!1,wrapFn:void 0,target:A,type:E,listener:p},d=n.bind(b);return d.listener=p,b.wrapFn=d,d}t.prototype.once=function(E,p){return o(p),this.on(E,s(this,E,p)),this},t.prototype.prependOnceListener=function(E,p){return o(p),this.prependListener(E,s(this,E,p)),this},t.prototype.removeListener=function(E,p){var b,d,u,g,y;if(o(p),d=this._events,d===void 0)return this;if(b=d[E],b===void 0)return this;if(b===p||b.listener===p)--this._eventsCount===0?this._events=Object.create(null):(delete d[E],d.removeListener&&this.emit("removeListener",E,b.listener||p));else if(typeof b!="function"){for(u=-1,g=b.length-1;g>=0;g--)if(b[g]===p||b[g].listener===p){y=b[g].listener,u=g;break}if(u<0)return this;u===0?b.shift():c(b,u),b.length===1&&(d[E]=b[0]),d.removeListener!==void 0&&this.emit("removeListener",E,y||p)}return this},t.prototype.off=t.prototype.removeListener,t.prototype.removeAllListeners=function(E){var p,b,d;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[E]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete b[E]),this;if(arguments.length===0){var u=Object.keys(b),g;for(d=0;d=0;d--)this.removeListener(E,p[d]);return this};function h(A,E,p){var b=A._events;if(b===void 0)return[];var d=b[E];return d===void 0?[]:typeof d=="function"?p?[d.listener||d]:[d]:p?T(d):m(d,d.length)}t.prototype.listeners=function(E){return h(this,E,!0)},t.prototype.rawListeners=function(E){return h(this,E,!1)},t.listenerCount=function(A,E){return typeof A.listenerCount=="function"?A.listenerCount(E):f.call(A,E)},t.prototype.listenerCount=f;function f(A){var E=this._events;if(E!==void 0){var p=E[A];if(typeof p=="function")return 1;if(p!==void 0)return p.length}return 0}t.prototype.eventNames=function(){return this._eventsCount>0?S(this._events):[]};function m(A,E){for(var p=new Array(E),b=0;b{},{passive:!0}),S},triggerHandler:function(S,M,e){var t,r=S._ev;if(!r)return;var o=r._events[M];if(!o)return;function a(n){if(n.listener){if(r.removeListener(M,n.listener),!n.fired)return n.fired=!0,n.listener.apply(r,[e])}else return n.apply(r,[e])}o=Array.isArray(o)?o:[o];var i;for(i=0;i_.queueLength&&(e.undoQueue.queue.shift(),e.undoQueue.index--)},M.startSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!0,e.undoQueue.beginSequence=!0},M.stopSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!1,e.undoQueue.beginSequence=!1},M.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=L.length)return!1;if(P.dimensions===2){if(F++,z.length===F)return P;var U=z[F];if(!w(U))return!1;P=L[O][U]}else P=L[O]}else P=L}}return P}function w(P){return P===Math.round(P)&&P>=0}function A(P){var z,F;z=q.modules[P]._module,F=z.basePlotModule;var N={};N.type=null;var O=o({},_),L=o({},z.attributes);Z.crawl(L,function(W,$,ue,ce,de){n(O,de).set(void 0),W===void 0&&n(L,de).set(void 0)}),o(N,O),q.traceIs(P,"noOpacity")&&delete N.opacity,q.traceIs(P,"showLegend")||(delete N.showlegend,delete N.legendgroup),q.traceIs(P,"noHover")&&(delete N.hoverinfo,delete N.hoverlabel),z.selectPoints||delete N.selectedpoints,o(N,L),F.attributes&&o(N,F.attributes),N.type=P;var U={meta:z.meta||{},categories:z.categories||{},animatable:!!z.animatable,type:P,attributes:b(N)};if(z.layoutAttributes){var B={};o(B,z.layoutAttributes),U.layoutAttributes=b(B)}return z.animatable||Z.crawl(U,function(W){Z.isValObject(W)&&"anim"in W&&delete W.anim}),U}function E(){var P={},z,F;o(P,S);for(z in q.subplotsRegistry)if(F=q.subplotsRegistry[z],!!F.layoutAttributes)if(Array.isArray(F.attr))for(var N=0;N=a&&(o._input||{})._templateitemname;n&&(i=a);var s=r+"["+i+"]",h;function f(){h={},n&&(h[s]={},h[s][_]=n)}f();function m(x,w){h[x]=w}function c(x,w){n?q.nestedProperty(h[s],x).set(w):h[s+"."+x]=w}function T(){var x=h;return f(),x}function l(x,w){x&&c(x,w);var A=T();for(var E in A)q.nestedProperty(t,E).set(A[E])}return{modifyBase:m,modifyItem:c,getUpdateObj:T,applyUpdate:l}}}}),lh=He({"src/plots/cartesian/constants.js"(Z,q){"use strict";var v=Jy().counter;q.exports={idRegex:{x:v("x","( domain)?"),y:v("y","( domain)?")},attrRegex:v("[xy]axis"),xAxisMatch:v("xaxis"),yAxisMatch:v("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"}}}),tf=He({"src/plots/cartesian/axis_ids.js"(Z){"use strict";var q=so(),v=lh();Z.id2name=function(M){if(!(typeof M!="string"||!M.match(v.AX_ID_PATTERN))){var e=M.split(" ")[0].slice(1);return e==="1"&&(e=""),M.charAt(0)+"axis"+e}},Z.name2id=function(M){if(M.match(v.AX_NAME_PATTERN)){var e=M.slice(5);return e==="1"&&(e=""),M.charAt(0)+e}},Z.cleanId=function(M,e,t){var r=/( domain)$/.test(M);if(!(typeof M!="string"||!M.match(v.AX_ID_PATTERN))&&!(e&&M.charAt(0)!==e)&&!(r&&!t)){var o=M.split(" ")[0].slice(1).replace(/^0+/,"");return o==="1"&&(o=""),M.charAt(0)+o+(r&&t?" domain":"")}},Z.list=function(S,M,e){var t=S._fullLayout;if(!t)return[];var r=Z.listIds(S,M),o=new Array(r.length),a;for(a=0;at?1:-1:+(S.slice(1)||1)-+(M.slice(1)||1)},Z.ref2id=function(S){return/^[xyz]/.test(S)?S.split(" ")[0]:!1};function _(S,M){if(M&&M.length){for(var e=0;e0?".":"")+n;v.isPlainObject(s)?t(s,o,h,i+1):o(h,n,s)}})}}}),bc=He({"src/plots/plots.js"(Z,q){"use strict";var v=Vn(),_=Zv().timeFormatLocale,S=YA().formatLocale,M=ns(),e=KA(),t=Gh().version,r=so(),o=e1(),a=zl(),i=sa(),n=$n(),s=Gs().BADNUM,h=tf(),f=Qm().clearOutline,m=_2(),c=A_(),T=n5(),l=Wh().getModuleCalcData,x=i.relinkPrivateKeys,w=i._,A=q.exports={};i.extendFlat(A,r),A.attributes=au(),A.attributes.type.values=A.allTypes,A.fontAttrs=tc(),A.layoutAttributes=$y();var E=nz();A.executeAPICommand=E.executeAPICommand,A.computeAPICommandBindings=E.computeAPICommandBindings,A.manageCommandObserver=E.manageCommandObserver,A.hasSimpleAPICommandBindings=E.hasSimpleAPICommandBindings,A.redrawText=function(X){return X=i.getGraphDiv(X),new Promise(function(Q){setTimeout(function(){X._fullLayout&&(r.getComponentMethod("annotations","draw")(X),r.getComponentMethod("legend","draw")(X),r.getComponentMethod("colorbar","draw")(X),Q(A.previousPromises(X)))},300)})},A.resize=function(X){X=i.getGraphDiv(X);var Q,V=new Promise(function(le,ae){(!X||i.isHidden(X))&&ae(new Error("Resize must be passed a displayed plot div element.")),X._redrawTimer&&clearTimeout(X._redrawTimer),X._resolveResize&&(Q=X._resolveResize),X._resolveResize=le,X._redrawTimer=setTimeout(function(){if(!X.layout||X.layout.width&&X.layout.height||i.isHidden(X)){le(X);return}delete X.layout.width,delete X.layout.height;var j=X.changed;X.autoplay=!0,r.call("relayout",X,{autosize:!0}).then(function(){X.changed=j,X._resolveResize===le&&(delete X._resolveResize,le(X))})},100)});return Q&&Q(V),V},A.previousPromises=function(X){if((X._promises||[]).length)return Promise.all(X._promises).then(function(){X._promises=[]})},A.addLinks=function(X){if(!(!X._context.showLink&&!X._context.showSources)){var Q=X._fullLayout,V=i.ensureSingle(Q._paper,"text","js-plot-link-container",function(pe){pe.style({"font-family":'"Open Sans", Arial, sans-serif',"font-size":"12px",fill:n.defaultLine,"pointer-events":"all"}).each(function(){var we=v.select(this);we.append("tspan").classed("js-link-to-tool",!0),we.append("tspan").classed("js-link-spacer",!0),we.append("tspan").classed("js-sourcelinks",!0)})}),le=V.node(),ae={y:Q._paper.attr("height")-9};document.body.contains(le)&&le.getComputedTextLength()>=Q.width-20?(ae["text-anchor"]="start",ae.x=5):(ae["text-anchor"]="end",ae.x=Q._paper.attr("width")-7),V.attr(ae);var j=V.select(".js-link-to-tool"),ee=V.select(".js-link-spacer"),te=V.select(".js-sourcelinks");X._context.showSources&&X._context.showSources(X),X._context.showLink&&p(X,j),ee.text(j.text()&&te.text()?" - ":"")}};function p(X,Q){Q.text("");var V=Q.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(X._context.linkText+" \xBB");if(X._context.sendData)V.on("click",function(){A.sendDataToCloud(X)});else{var le=window.location.pathname.split("/"),ae=window.location.search;V.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+le[2].split(".")[0]+"/"+le[1]+ae})}}A.sendDataToCloud=function(X,Q){X.emit("plotly_beforeexport");let V=new URL(Q).origin;var le=A.graphJson(X,!1,"keepdata","object");le.version=t;var ae=new URL(Q);ae.searchParams.set("origin",window.location.origin);var j=window.open(ae.href,"_blank");if(!j){console.error("Unable to open Plotly Cloud (the popup may have been blocked)"),X.emit("plotly_exportfail");return}var ee=function(te){te.origin===V&&te.data&&te.data.type==="CHART_AUTH_SUCCESS"&&(j.postMessage({type:"chart",chart:le},V),window.removeEventListener("message",ee),X.emit("plotly_afterexport"))};return window.addEventListener("message",ee),!1};var b=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],d=["year","month","dayMonth","dayMonthYear"];A.supplyDefaults=function(X,Q){var V=Q&&Q.skipUpdateCalc,le=X._fullLayout||{};if(le._skipDefaults){delete le._skipDefaults;return}var ae=X._fullLayout={},j=X.layout||{},ee=X._fullData||[],te=X._fullData=[],pe=X.data||[],we=X.calcdata||[],Se=X._context||{},Re;X._transitionData||A.createTransitionData(X),ae._dfltTitle={plot:w(X,"Click to enter Plot title"),subtitle:w(X,"Click to enter Plot subtitle"),x:w(X,"Click to enter X axis title"),y:w(X,"Click to enter Y axis title"),colorbar:w(X,"Click to enter Colorscale title"),annotation:w(X,"new text")},ae._traceWord=w(X,"trace");var Pe=y(X,b);if(ae._mapboxAccessToken=Se.mapboxAccessToken,le._initialAutoSizeIsDone){var je=le.width,at=le.height;A.supplyLayoutGlobalDefaults(j,ae,Pe),j.width||(ae.width=je),j.height||(ae.height=at),A.sanitizeMargins(ae)}else{A.supplyLayoutGlobalDefaults(j,ae,Pe);var nt=!j.width||!j.height,tt=ae.autosize,Ve=Se.autosizable,he=nt&&(tt||Ve);he?A.plotAutoSize(X,j,ae):nt&&A.sanitizeMargins(ae),!tt&&nt&&(j.width=ae.width,j.height=ae.height)}ae._d3locale=D(Pe,ae.separators),ae._extraFormat=y(X,d),ae._initialAutoSizeIsDone=!0,ae._dataLength=pe.length,ae._modules=[],ae._visibleModules=[],ae._basePlotModules=[];var se=ae._subplots=g(),ne=ae._splomAxes={x:{},y:{}},Ce=ae._splomSubplots={};ae._splomGridDflt={},ae._scatterStackOpts={},ae._firstScatter={},ae._alignmentOpts={},ae._colorAxes={},ae._requestRangeslider={},ae._traceUids=u(ee,pe),A.supplyDataDefaults(pe,te,j,ae);var Ze=Object.keys(ne.x),rt=Object.keys(ne.y);if(Ze.length>1&&rt.length>1){for(r.getComponentMethod("grid","sizeDefaults")(j,ae),Re=0;Re15&&rt.length>15&&ae.shapes.length===0&&ae.images.length===0,A.linkSubplots(te,ae,ee,le),A.cleanPlot(te,ae,ee,le);var Vt=!!(le._has&&le._has("cartesian")),Ar=!!(ae._has&&ae._has("cartesian")),vr=Vt,qr=Ar;vr&&!qr?le._bgLayer.remove():qr&&!vr&&(ae._shouldCreateBgLayer=!0),le._zoomlayer&&!X._dragging&&f({_fullLayout:le}),P(te,ae),x(ae,le),r.getComponentMethod("colorscale","crossTraceDefaults")(te,ae),ae._preGUI||(ae._preGUI={}),ae._tracePreGUI||(ae._tracePreGUI={});var kr=ae._tracePreGUI,Ur={},_t;for(_t in kr)Ur[_t]="old";for(Re=0;Re0){var Se=1-2*j;ee=Math.round(Se*ee),te=Math.round(Se*te)}}var Re=A.layoutAttributes.width.min,Pe=A.layoutAttributes.height.min;ee1,at=!V.height&&Math.abs(le.height-te)>1;(at||je)&&(je&&(le.width=ee),at&&(le.height=te)),Q._initialAutoSize||(Q._initialAutoSize={width:ee,height:te}),A.sanitizeMargins(le)},A.supplyLayoutModuleDefaults=function(X,Q,V,le){var ae=r.componentsRegistry,j=Q._basePlotModules,ee,te,pe,we=r.subplotsRegistry.cartesian;for(ee in ae)pe=ae[ee],pe.includeBasePlot&&pe.includeBasePlot(X,Q);j.length||j.push(we),Q._has("cartesian")&&(r.getComponentMethod("grid","contentDefaults")(X,Q),we.finalizeSubplots(X,Q));for(var Se in Q._subplots)Q._subplots[Se].sort(i.subplotSort);for(te=0;te1&&(V.l/=tt,V.r/=tt)}if(Pe){var Ve=(V.t+V.b)/Pe;Ve>1&&(V.t/=Ve,V.b/=Ve)}var he=V.xl!==void 0?V.xl:V.x,se=V.xr!==void 0?V.xr:V.x,ne=V.yt!==void 0?V.yt:V.y,Ce=V.yb!==void 0?V.yb:V.y;je[Q]={l:{val:he,size:V.l+nt},r:{val:se,size:V.r+nt},b:{val:Ce,size:V.b+nt},t:{val:ne,size:V.t+nt}},at[Q]=1}if(!le._replotting)return A.doAutoMargin(X)}};function U(X){if("_redrawFromAutoMarginCount"in X._fullLayout)return!1;var Q=h.list(X,"",!0);for(var V in Q)if(Q[V].autoshift||Q[V].shift)return!0;return!1}A.doAutoMargin=function(X){var Q=X._fullLayout,V=Q.width,le=Q.height;Q._size||(Q._size={}),N(Q);var ae=Q._size,j=Q.margin,ee={t:0,b:0,l:0,r:0},te=i.extendFlat({},ae),pe=j.l,we=j.r,Se=j.t,Re=j.b,Pe=Q._pushmargin,je=Q._pushmarginIds,at=Q.minreducedwidth,nt=Q.minreducedheight;if(j.autoexpand!==!1){for(var tt in Pe)je[tt]||delete Pe[tt];var Ve=X._fullLayout._reservedMargin;for(var he in Ve)for(var se in Ve[he]){var ne=Ve[he][se];ee[se]=Math.max(ee[se],ne)}Pe.base={l:{val:0,size:pe},r:{val:1,size:we},t:{val:1,size:Se},b:{val:0,size:Re}};for(var Ce in ee){var Ze=0;for(var rt in Pe)rt!=="base"&&M(Pe[rt][Ce].size)&&(Ze=Pe[rt][Ce].size>Ze?Pe[rt][Ce].size:Ze);var Je=Math.max(0,j[Ce]-Ze);ee[Ce]=Math.max(0,ee[Ce]-Je)}for(var St in Pe){var kt=Pe[St].l||{},Bt=Pe[St].b||{},Vt=kt.val,Ar=kt.size,vr=Bt.val,qr=Bt.size,kr=V-ee.r-ee.l,Ur=le-ee.t-ee.b;for(var _t in Pe){if(M(Ar)&&Pe[_t].r){var Fe=Pe[_t].r.val,Ye=Pe[_t].r.size;if(Fe>Vt){var Ae=(Ar*Fe+(Ye-kr)*Vt)/(Fe-Vt),Le=(Ye*(1-Vt)+(Ar-kr)*(1-Fe))/(Fe-Vt);Ae+Le>pe+we&&(pe=Ae,we=Le)}}if(M(qr)&&Pe[_t].t){var We=Pe[_t].t.val,Ke=Pe[_t].t.size;if(We>vr){var st=(qr*We+(Ke-Ur)*vr)/(We-vr),ot=(Ke*(1-vr)+(qr-Ur)*(1-We))/(We-vr);st+ot>Re+Se&&(Re=st,Se=ot)}}}}}var Ut=i.constrain(V-j.l-j.r,O,at),Ct=i.constrain(le-j.t-j.b,L,nt),Pt=Math.max(0,V-Ut),jt=Math.max(0,le-Ct);if(Pt){var cr=(pe+we)/Pt;cr>1&&(pe/=cr,we/=cr)}if(jt){var or=(Re+Se)/jt;or>1&&(Re/=or,Se/=or)}if(ae.l=Math.round(pe)+ee.l,ae.r=Math.round(we)+ee.r,ae.t=Math.round(Se)+ee.t,ae.b=Math.round(Re)+ee.b,ae.p=Math.round(j.pad),ae.w=Math.round(V)-ae.l-ae.r,ae.h=Math.round(le)-ae.t-ae.b,!Q._replotting&&(A.didMarginChange(te,ae)||U(X))){"_redrawFromAutoMarginCount"in Q?Q._redrawFromAutoMarginCount++:Q._redrawFromAutoMarginCount=1;var nr=3*(1+Object.keys(je).length);if(Q._redrawFromAutoMarginCount1)return!0}return!1},A.graphJson=function(X,Q,V,le,ae,j){(ae&&Q&&!X._fullData||ae&&!Q&&!X._fullLayout)&&A.supplyDefaults(X);var ee=ae?X._fullData:X.data,te=ae?X._fullLayout:X.layout,pe=(X._transitionData||{})._frames;function we(Pe,je){if(typeof Pe=="function")return je?"_function_":null;if(i.isPlainObject(Pe)){var at={},nt;return Object.keys(Pe).sort().forEach(function(se){if(["_","["].indexOf(se.charAt(0))===-1){if(typeof Pe[se]=="function"){je&&(at[se]="_function");return}if(V==="keepdata"){if(se.slice(-3)==="src")return}else if(V==="keepstream"){if(nt=Pe[se+"src"],typeof nt=="string"&&nt.indexOf(":")>0&&!i.isPlainObject(Pe.stream))return}else if(V!=="keepall"&&(nt=Pe[se+"src"],typeof nt=="string"&&nt.indexOf(":")>0))return;at[se]=we(Pe[se],je)}}),at}var tt=Array.isArray(Pe),Ve=i.isTypedArray(Pe);if((tt||Ve)&&Pe.dtype&&Pe.shape){var he=Pe.bdata;return we({dtype:Pe.dtype,shape:Pe.shape,bdata:i.isArrayBuffer(he)?e.encode(he):he},je)}return tt?Pe.map(function(se){return we(se,je)}):Ve?i.simpleMap(Pe,i.identity):i.isJSDate(Pe)?i.ms2DateTimeLocal(+Pe):Pe}var Se={data:(ee||[]).map(function(Pe){var je=we(Pe);return Q&&delete je.fit,je})};if(!Q&&(Se.layout=we(te),ae)){var Re=te._size;Se.layout.computed={margin:{b:Re.b,l:Re.l,r:Re.r,t:Re.t}}}return pe&&(Se.frames=we(pe)),j&&(Se.config=we(X._context,!0)),le==="object"?Se:JSON.stringify(Se)},A.modifyFrames=function(X,Q){var V,le,ae,j=X._transitionData._frames,ee=X._transitionData._frameHash;for(V=0;V0&&(X._transitioningWithDuration=!0),X._transitionData._interruptCallbacks.push(function(){le=!0}),V.redraw&&X._transitionData._interruptCallbacks.push(function(){return r.call("redraw",X)}),X._transitionData._interruptCallbacks.push(function(){X.emit("plotly_transitioninterrupted",[])});var Pe=0,je=0;function at(){return Pe++,function(){je++,!le&&je===Pe&&te(Re)}}V.runFn(at),setTimeout(at())})}function te(Re){if(X._transitionData)return j(X._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(V.redraw)return r.call("redraw",X)}).then(function(){X._transitioning=!1,X._transitioningWithDuration=!1,X.emit("plotly_transitioned",[])}).then(Re)}function pe(){if(X._transitionData)return X._transitioning=!1,ae(X._transitionData._interruptCallbacks)}var we=[A.previousPromises,pe,V.prepareFn,A.rehover,A.reselect,ee],Se=i.syncOrAsync(we,X);return(!Se||!Se.then)&&(Se=Promise.resolve()),Se.then(function(){return X})}A.doCalcdata=function(X,Q){var V=h.list(X),le=X._fullData,ae=X._fullLayout,j,ee,te,pe,we=new Array(le.length),Se=(X.calcdata||[]).slice();for(X.calcdata=we,ae._numBoxes=0,ae._numViolins=0,ae._violinScaleGroupStats={},X._hmpixcount=0,X._hmlumcount=0,ae._piecolormap={},ae._sunburstcolormap={},ae._treemapcolormap={},ae._iciclecolormap={},ae._funnelareacolormap={},te=0;te=0;pe--)if(Ce[pe].enabled){j._indexToPoints=Ce[pe]._indexToPoints;break}ee&&ee.calc&&(ne=ee.calc(X,j))}(!Array.isArray(ne)||!ne[0])&&(ne=[{x:s,y:s}]),ne[0].t||(ne[0].t={}),ne[0].trace=j,we[he]=ne}}for(de(V,le,ae),te=0;teee||Pe>te)&&(ae.style("overflow","hidden"),Se=ae.node().getBoundingClientRect(),Re=Se.width,Pe=Se.height);var je=+O.attr("x"),at=+O.attr("y"),nt=Y||O.node().getBoundingClientRect().height,tt=-nt/4;if(ue[0]==="y")j.attr({transform:"rotate("+[-90,je,at]+")"+_(-Re/2,tt-Pe/2)});else if(ue[0]==="l")at=tt-Pe/2;else if(ue[0]==="a"&&ue.indexOf("atitle")!==0)je=0,at=tt;else{var Ve=O.attr("text-anchor");je=je-Re*(Ve==="middle"?.5:Ve==="end"?1:0),at=at+tt-Pe/2}ae.attr({x:je,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 i(O,L,U){var B=parseInt((MathJax.version||"").split(".")[0]);if(B!==2&&B!==3){v.warn("No MathJax version:",MathJax.version);return}var W,$,ue,ce,de=function(){return $=v.extendDeepAll({},MathJax.Hub.config),ue=MathJax.Hub.processSectionDelay,MathJax.Hub.processSectionDelay!==void 0&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:a},displayAlign:"left"})},Y=function(){$=v.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=a},X=function(){if(W=MathJax.Hub.config.menuSettings.renderer,W!=="SVG")return MathJax.Hub.setRenderer("SVG")},Q=function(){W=MathJax.config.startup.output,W!=="svg"&&(MathJax.config.startup.output="svg")},V=function(){var pe="math-output-"+v.randstr({},64);ce=q.select("body").append("div").attr({id:pe}).style({visibility:"hidden",position:"absolute","font-size":L.fontSize+"px"}).text(o(O));var we=ce.node();return B===2?MathJax.Hub.Typeset(we):MathJax.typeset([we])},le=function(){var pe=ce.select(B===2?".MathJax_SVG":".MathJax"),we=!pe.empty()&&ce.select("svg").node();if(!we)v.log("There was an error in the tex syntax.",O),U();else{var Se=we.getBoundingClientRect(),Re;B===2?Re=q.select("body").select("#MathJax_SVG_glyphs"):Re=pe.select("defs"),U(pe,Re,Se)}ce.remove()},ae=function(){if(W!=="SVG")return MathJax.Hub.setRenderer(W)},j=function(){W!=="svg"&&(MathJax.config.startup.output=W)},ee=function(){return ue!==void 0&&(MathJax.Hub.processSectionDelay=ue),MathJax.Hub.Config($)},te=function(){MathJax.config=$};B===2?MathJax.Hub.Queue(de,X,V,le,ae,ee):B===3&&(Y(),Q(),MathJax.startup.defaultReady(),MathJax.startup.promise.then(function(){V(),le(),j(),te()}))}var n={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",m=["http:","https:","mailto:","",void 0,":"],c=Z.NEWLINES=/(\r\n?|\n)/g,T=/(<[^<>]*>)/,l=/<(\/?)([^ >]*)(\s+(.*))?>/i,x=//i;Z.BR_TAG_ALL=//gi;var w=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,A=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,E=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,p=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function b(O,L){if(!O)return null;var U=O.match(L),B=U&&(U[3]||U[4]);return B&&y(B)}var d=/(^|;)\s*color:/;Z.plainText=function(O,L){L=L||{};for(var U=L.len!==void 0&&L.len!==-1?L.len:1/0,B=L.allowedTags!==void 0?L.allowedTags:["br"],W="...",$=W.length,ue=O.split(T),ce=[],de="",Y=0,X=0;X$?ce.push(Q.slice(0,Math.max(0,j-$))+W):ce.push(Q.slice(0,j));break}de=""}}return ce.join("")};var u={mu:"\u03BC",amp:"&",lt:"<",gt:">",nbsp:"\xA0",times:"\xD7",plusmn:"\xB1",deg:"\xB0"},g=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function y(O){return O.replace(g,function(L,U){var B;return U.charAt(0)==="#"?B=D(U.charAt(1)==="x"?parseInt(U.slice(2),16):parseInt(U.slice(1),10)):B=u[U],B||L})}Z.convertEntities=y;function D(O){if(!(O>1114111)){var L=String.fromCodePoint;if(L)return L(O);var U=String.fromCharCode;return O<=65535?U(O):U((O>>10)+55232,O%1024+56320)}}function P(O,L){L=L.replace(c," ");var U=!1,B=[],W,$=-1;function ue(){$++;var Pe=document.createElementNS(S.svg,"tspan");q.select(Pe).attr({class:"line",dy:$*M+"em"}),O.appendChild(Pe),W=Pe;var je=B;if(B=[{node:Pe}],je.length>1)for(var at=1;at.",L);return}var je=B.pop();Pe!==je.type&&v.log("Start tag <"+je.type+"> doesnt match end tag <"+Pe+">. Pretending it did match.",L),W=B[B.length-1].node}var X=x.test(L);X?ue():(W=O,B=[{node:O}]);for(var Q=L.split(T),V=0;V=0;x--,w++){var A=c[x];l[w]=[1-A[0],A[1]]}return l}function h(c,T){T=T||{};for(var l=c.domain,x=c.range,w=x.length,A=new Array(w),E=0;Ec-f?f=c-(m-c):m-c=0?x=o.colorscale.sequential:x=o.colorscale.sequentialminus,s._sync("colorscale",x)}}}}),rc=He({"src/components/colorscale/index.js"(Z,q){"use strict";var v=W0(),_=wp();q.exports={moduleType:"component",name:"colorscale",attributes:ku(),layoutAttributes:o5(),supplyLayoutDefaults:oz(),handleDefaults:_h(),crossTraceDefaults:sz(),calc:Tp(),scales:v.scales,defaultScale:v.defaultScale,getScale:v.get,isValidScale:v.isValid,hasColorscale:_.hasColorscale,extractOpts:_.extractOpts,extractScale:_.extractScale,flipScale:_.flipScale,makeColorScaleFunc:_.makeColorScaleFunc,makeColorScaleFuncFromTrace:_.makeColorScaleFuncFromTrace}}}),Fu=He({"src/traces/scatter/subtypes.js"(Z,q){"use strict";var v=sa(),_=hp().isTypedArraySpec;q.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 M=S.marker;return v.isPlainObject(M)&&(v.isArrayOrTypedArray(M.size)||_(M.size))}}}}),r1=He({"src/traces/scatter/make_bubble_size_func.js"(Z,q){"use strict";var v=ns();q.exports=function(S,M){M||(M=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 i=o(a/M);return v(i)&&i>0?Math.max(i,r):0}}}}),$p=He({"src/components/fx/helpers.js"(Z){"use strict";var q=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||[],i=0;i=0&&o.index2&&(r.push([a].concat(i.splice(0,2))),n="l",a=a=="m"?"l":"L");;){if(i.length==v[n])return i.unshift(a),r.push(i);if(i.length0&&(se=100,he=he.replace("-open","")),he.indexOf("-dot")>0&&(se+=200,he=he.replace("-dot","")),he=l.symbolNames.indexOf(he),he>=0&&(he+=se)}return he%100>=d||he>=400?0:Math.floor(Math.max(he,0))};function g(he,se,ne,Ce){var Ze=he%100;return l.symbolFuncs[Ze](se,ne,Ce)+(he>=200?u:"")}var y=S("~f"),D={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,se,ne,Ce,Ze,rt){var Je=D[Ce];return P(he,se,ne,Je.type,Ze,rt,Je.start,Je.stop,!1,Je.reversed)};function P(he,se,ne,Ce,Ze,rt,Je,St,kt,Bt){var Vt=Ze.length,Ar;Ce==="linear"?Ar={node:"linearGradient",attrs:{x1:Je.x,y1:Je.y,x2:St.x,y2:St.y,gradientUnits:kt?"userSpaceOnUse":"objectBoundingBox"},reversed:Bt}:Ce==="radial"&&(Ar={node:"radialGradient",reversed:Bt});for(var vr=new Array(Vt),qr=0;qr=0&&he.i===void 0&&(he.i=rt.i),se.style("opacity",Ce.selectedOpacityFn?Ce.selectedOpacityFn(he):he.mo===void 0?Je.opacity:he.mo),Ce.ms2mrc){var kt;he.ms==="various"||Je.size==="various"?kt=3:kt=Ce.ms2mrc(he.ms),he.mrc=kt,Ce.selectedSizeFn&&(kt=he.mrc=Ce.selectedSizeFn(he));var Bt=l.symbolNumber(he.mx||Je.symbol)||0;he.om=Bt%200>=100;var Vt=Ve(he,ne),Ar=ee(he,ne);se.attr("d",g(Bt,kt,Vt,Ar))}var vr=!1,qr,kr,Ur;if(he.so)Ur=St.outlierwidth,kr=St.outliercolor,qr=Je.outliercolor;else{var _t=(St||{}).width;Ur=(he.mlw+1||_t+1||(he.trace?(he.trace.marker.line||{}).width:0)+1)-1||0,"mlc"in he?kr=he.mlcc=Ce.lineScale(he.mlc):_.isArrayOrTypedArray(St.color)?kr=r.defaultLine:kr=St.color,_.isArrayOrTypedArray(Je.color)&&(qr=r.defaultLine,vr=!0),"mc"in he?qr=he.mcc=Ce.markerScale(he.mc):qr=Je.color||Je.colors||"rgba(0,0,0,0)",Ce.selectedColorFn&&(qr=Ce.selectedColorFn(he))}let Fe=he.mld||(St||{}).dash;if(Fe&&l.dashLine(se,Fe,Ur),he.om)se.call(r.stroke,qr).style({"stroke-width":(Ur||1)+"px",fill:"none"});else{se.style("stroke-width",(he.isBlank?0:Ur)+"px");var Ye=Je.gradient,Ae=he.mgt;Ae?vr=!0:Ae=Ye&&Ye.type,_.isArrayOrTypedArray(Ae)&&(Ae=Ae[0],D[Ae]||(Ae=0));var Le=Je.pattern,We=l.getPatternAttr,Ke=Le&&(We(Le.shape,he.i,"")||We(Le.path,he.i,""));if(Ae&&Ae!=="none"){var st=he.mgc;st?vr=!0:st=Ye.color;var ot=ne.uid;vr&&(ot+="-"+he.i),l.gradient(se,Ze,ot,Ae,[[0,st],[1,qr]],"fill")}else if(Ke){var Ut=!1,Ct=Le.fgcolor;!Ct&&rt&&rt.color&&(Ct=rt.color,Ut=!0);var Pt=We(Ct,he.i,rt&&rt.color||null),jt=We(Le.bgcolor,he.i,null),cr=Le.fgopacity,or=We(Le.size,he.i,8),nr=We(Le.solidity,he.i,.3);Ut=Ut||he.mcc||_.isArrayOrTypedArray(Le.shape)||_.isArrayOrTypedArray(Le.path)||_.isArrayOrTypedArray(Le.bgcolor)||_.isArrayOrTypedArray(Le.fgcolor)||_.isArrayOrTypedArray(Le.size)||_.isArrayOrTypedArray(Le.solidity);var Pr=ne.uid;Ut&&(Pr+="-"+he.i),l.pattern(se,"point",Ze,Pr,Ke,or,nr,he.mcc,Le.fillmode,jt,Pt,cr)}else _.isArrayOrTypedArray(qr)?r.fill(se,qr[he.i]):r.fill(se,qr);Ur&&r.stroke(se,kr)}},l.makePointStyleFns=function(he){var se={},ne=he.marker;return se.markerScale=l.tryColorscale(ne,""),se.lineScale=l.tryColorscale(ne,"line"),t.traceIs(he,"symbols")&&(se.ms2mrc=m.isBubble(he)?c(he):function(){return(ne.size||6)/2}),he.selectedpoints&&_.extendFlat(se,l.makeSelectedPointStyleFns(he)),se},l.makeSelectedPointStyleFns=function(he){var se={},ne=he.selected||{},Ce=he.unselected||{},Ze=he.marker||{},rt=ne.marker||{},Je=Ce.marker||{},St=Ze.opacity,kt=rt.opacity,Bt=Je.opacity,Vt=kt!==void 0,Ar=Bt!==void 0;(_.isArrayOrTypedArray(St)||Vt||Ar)&&(se.selectedOpacityFn=function(Le){var We=Le.mo===void 0?Ze.opacity:Le.mo;return Le.selected?Vt?kt:We:Ar?Bt:f*We});var vr=Ze.color,qr=rt.color,kr=Je.color;(qr||kr)&&(se.selectedColorFn=function(Le){var We=Le.mcc||vr;return Le.selected?qr||We:kr||We});var Ur=Ze.size,_t=rt.size,Fe=Je.size,Ye=_t!==void 0,Ae=Fe!==void 0;return t.traceIs(he,"symbols")&&(Ye||Ae)&&(se.selectedSizeFn=function(Le){var We=Le.mrc||Ur/2;return Le.selected?Ye?_t/2:We:Ae?Fe/2:We}),se},l.makeSelectedTextStyleFns=function(he){var se={},ne=he.selected||{},Ce=he.unselected||{},Ze=he.textfont||{},rt=ne.textfont||{},Je=Ce.textfont||{},St=Ze.color,kt=rt.color,Bt=Je.color;return se.selectedTextColorFn=function(Vt){var Ar=Vt.tc||St;return Vt.selected?kt||Ar:Bt||(kt?Ar:r.addOpacity(Ar,f))},se},l.selectedPointStyle=function(he,se){if(!(!he.size()||!se.selectedpoints)){var ne=l.makeSelectedPointStyleFns(se),Ce=se.marker||{},Ze=[];ne.selectedOpacityFn&&Ze.push(function(rt,Je){rt.style("opacity",ne.selectedOpacityFn(Je))}),ne.selectedColorFn&&Ze.push(function(rt,Je){r.fill(rt,ne.selectedColorFn(Je))}),ne.selectedSizeFn&&Ze.push(function(rt,Je){var St=Je.mx||Ce.symbol||0,kt=ne.selectedSizeFn(Je);rt.attr("d",g(l.symbolNumber(St),kt,Ve(Je,se),ee(Je,se))),Je.mrc2=kt}),Ze.length&&he.each(function(rt){for(var Je=v.select(this),St=0;St0?ne:0}l.textPointStyle=function(he,se,ne){if(he.size()){var Ce;if(se.selectedpoints){var Ze=l.makeSelectedTextStyleFns(se);Ce=Ze.selectedTextColorFn}var rt=se.texttemplate,Je=ne._fullLayout;he.each(function(St){var kt=v.select(this),Bt=rt?_.extractOption(St,se,"txt","texttemplate"):_.extractOption(St,se,"tx","text");if(!Bt&&Bt!==0){kt.remove();return}if(rt){var Vt=se._module.formatLabels,Ar=Vt?Vt(St,se,Je):{},vr={};T(vr,se,St.i),Bt=_.texttemplateString({data:[vr,St,se._meta],fallback:se.texttemplatefallback,labels:Ar,locale:Je._d3locale,template:Bt})}var qr=St.tp||se.textposition,kr=N(St,se),Ur=Ce?Ce(St):St.tc||se.textfont.color;kt.call(l.font,{family:St.tf||se.textfont.family,weight:St.tw||se.textfont.weight,style:St.ty||se.textfont.style,variant:St.tv||se.textfont.variant,textcase:St.tC||se.textfont.textcase,lineposition:St.tE||se.textfont.lineposition,shadow:St.tS||se.textfont.shadow,size:kr,color:Ur}).text(Bt).call(i.convertToTspans,ne).call(F,qr,kr,St.mrc)})}},l.selectedTextStyle=function(he,se){if(!(!he.size()||!se.selectedpoints)){var ne=l.makeSelectedTextStyleFns(se);he.each(function(Ce){var Ze=v.select(this),rt=ne.selectedTextColorFn(Ce),Je=Ce.tp||se.textposition,St=N(Ce,se);r.fill(Ze,rt);var kt=t.traceIs(se,"bar-like");F(Ze,Je,St,Ce.mrc2||Ce.mrc,kt)})}};var O=.5;l.smoothopen=function(he,se){if(he.length<3)return"M"+he.join("L");var ne="M"+he[0],Ce=[],Ze;for(Ze=1;Ze=kt||Le>=Vt&&Le<=kt)&&(We<=Ar&&We>=Bt||We>=Ar&&We<=Bt)&&(he=[Le,We])}return he}l.applyBackoff=Y,l.makeTester=function(){var he=_.ensureSingleById(v.select("body"),"svg","js-plotly-tester",function(ne){ne.attr(n.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})}),se=_.ensureSingle(he,"path","js-reference-point",function(ne){ne.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})});l.tester=he,l.testref=se},l.savedBBoxes={};var X=0,Q=1e4;l.bBox=function(he,se,ne){ne||(ne=V(he));var Ce;if(ne){if(Ce=l.savedBBoxes[ne],Ce)return _.extendFlat({},Ce)}else if(he.childNodes.length===1){var Ze=he.childNodes[0];if(ne=V(Ze),ne){var rt=+Ze.getAttribute("x")||0,Je=+Ze.getAttribute("y")||0,St=Ze.getAttribute("transform");if(!St){var kt=l.bBox(Ze,!1,ne);return rt&&(kt.left+=rt,kt.right+=rt),Je&&(kt.top+=Je,kt.bottom+=Je),kt}if(ne+="~"+rt+"~"+Je+"~"+St,Ce=l.savedBBoxes[ne],Ce)return _.extendFlat({},Ce)}}var Bt,Vt;se?Bt=he:(Vt=l.tester.node(),Bt=he.cloneNode(!0),Vt.appendChild(Bt)),v.select(Bt).attr("transform",null).call(i.positionText,0,0);var Ar=Bt.getBoundingClientRect(),vr=l.testref.node().getBoundingClientRect();se||Vt.removeChild(Bt);var qr={height:Ar.height,width:Ar.width,left:Ar.left-vr.left,top:Ar.top-vr.top,right:Ar.right-vr.left,bottom:Ar.bottom-vr.top};return X>=Q&&(l.savedBBoxes={},X=0),ne&&(l.savedBBoxes[ne]=qr),X++,_.extendFlat({},qr)};function V(he){var se=he.getAttribute("data-unformatted");if(se!==null)return se+he.getAttribute("data-math")+he.getAttribute("text-anchor")+he.getAttribute("style")}l.setClipUrl=function(he,se,ne){he.attr("clip-path",le(se,ne))};function le(he,se){if(!he)return null;var ne=se._context,Ce=ne._exportedPlot?"":ne._baseUrl||"";return Ce?"url('"+Ce+"#"+he+"')":"url(#"+he+")"}l.getTranslate=function(he){var se=/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,ne=he.attr?"attr":"getAttribute",Ce=he[ne]("transform")||"",Ze=Ce.replace(se,function(rt,Je,St){return[Je,St].join(" ")}).split(" ");return{x:+Ze[0]||0,y:+Ze[1]||0}},l.setTranslate=function(he,se,ne){var Ce=/(\btranslate\(.*?\);?)/,Ze=he.attr?"attr":"getAttribute",rt=he.attr?"attr":"setAttribute",Je=he[Ze]("transform")||"";return se=se||0,ne=ne||0,Je=Je.replace(Ce,"").trim(),Je+=a(se,ne),Je=Je.trim(),he[rt]("transform",Je),Je},l.getScale=function(he){var se=/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,ne=he.attr?"attr":"getAttribute",Ce=he[ne]("transform")||"",Ze=Ce.replace(se,function(rt,Je,St){return[Je,St].join(" ")}).split(" ");return{x:+Ze[0]||1,y:+Ze[1]||1}},l.setScale=function(he,se,ne){var Ce=/(\bscale\(.*?\);?)/,Ze=he.attr?"attr":"getAttribute",rt=he.attr?"attr":"setAttribute",Je=he[Ze]("transform")||"";return se=se||1,ne=ne||1,Je=Je.replace(Ce,"").trim(),Je+="scale("+se+","+ne+")",Je=Je.trim(),he[rt]("transform",Je),Je};var ae=/\s*sc.*/;l.setPointGroupScale=function(he,se,ne){if(se=se||1,ne=ne||1,!!he){var Ce=se===1&&ne===1?"":"scale("+se+","+ne+")";he.each(function(){var Ze=(this.getAttribute("transform")||"").replace(ae,"");Ze+=Ce,Ze=Ze.trim(),this.setAttribute("transform",Ze)})}};var j=/translate\([^)]*\)\s*$/;l.setTextPointsScale=function(he,se,ne){he&&he.each(function(){var Ce,Ze=v.select(this),rt=Ze.select("text");if(rt.node()){var Je=parseFloat(rt.attr("x")||0),St=parseFloat(rt.attr("y")||0),kt=(Ze.attr("transform")||"").match(j);se===1&&ne===1?Ce=[]:Ce=[a(Je,St),"scale("+se+","+ne+")",a(-Je,-St)],kt&&Ce.push(kt),Ze.attr("transform",Ce.join(""))}})};function ee(he,se){var ne;return he&&(ne=he.mf),ne===void 0&&(ne=se.marker&&se.marker.standoff||0),!se._geo&&!se._xA?-ne:ne}l.getMarkerStandoff=ee;var te=Math.atan2,pe=Math.cos,we=Math.sin;function Se(he,se){var ne=se[0],Ce=se[1];return[ne*pe(he)-Ce*we(he),ne*we(he)+Ce*pe(he)]}var Re,Pe,je,at,nt,tt;function Ve(he,se){var ne=he.ma;ne===void 0&&(ne=se.marker.angle,(!ne||_.isArrayOrTypedArray(ne))&&(ne=0));var Ce,Ze,rt=se.marker.angleref;if(rt==="previous"||rt==="north"){if(se._geo){var Je=se._geo.project(he.lonlat);Ce=Je[0],Ze=Je[1]}else{var St=se._xA,kt=se._yA;if(St&&kt)Ce=St.c2p(he.x),Ze=kt.c2p(he.y);else return 90}if(se._geo){var Bt=he.lonlat[0],Vt=he.lonlat[1],Ar=se._geo.project([Bt,Vt+1e-5]),vr=se._geo.project([Bt+1e-5,Vt]),qr=te(vr[1]-Ze,vr[0]-Ce),kr=te(Ar[1]-Ze,Ar[0]-Ce),Ur;if(rt==="north")Ur=ne/180*Math.PI;else if(rt==="previous"){var _t=Bt/180*Math.PI,Fe=Vt/180*Math.PI,Ye=Re/180*Math.PI,Ae=Pe/180*Math.PI,Le=Ye-_t,We=pe(Ae)*we(Le),Ke=we(Ae)*pe(Fe)-pe(Ae)*we(Fe)*pe(Le);Ur=-te(We,Ke)-Math.PI,Re=Bt,Pe=Vt}var st=Se(qr,[pe(Ur),0]),ot=Se(kr,[we(Ur),0]);ne=te(st[1]+ot[1],st[0]+ot[0])/Math.PI*180,rt==="previous"&&!(tt===se.uid&&he.i===nt+1)&&(ne=null)}if(rt==="previous"&&!se._geo)if(tt===se.uid&&he.i===nt+1&&M(Ce)&&M(Ze)){var Ut=Ce-je,Ct=Ze-at,Pt=se.line&&se.line.shape||"",jt=Pt.slice(Pt.length-1);jt==="h"&&(Ct=0),jt==="v"&&(Ut=0),ne+=te(Ct,Ut)/Math.PI*180+90}else ne=null}return je=Ce,at=Ze,nt=he.i,tt=se.uid,ne}l.getMarkerAngle=Ve}}),K0=He({"src/components/titles/index.js"(Z,q){"use strict";var v=Vn(),_=ns(),S=bc(),M=so(),e=sa(),t=e.strTranslate,r=as(),o=$n(),a=su(),i=Km(),n=uh().OPPOSITE_SIDE,s=/ [XY][0-9]* /,h=1.6,f=1.6;function m(c,T,l){var x=c._fullLayout,w=l.propContainer,A=l.propName,E=l.placeholder,p=l.traceIndex,b=l.avoid||{},d=l.attributes,u=l.transform,g=l.containerGroup,y=1,D=w.title,P=(D&&D.text?D.text:"").trim(),z=!1,F=D&&D.font?D.font:{},N=F.family,O=F.size,L=F.color,U=F.weight,B=F.style,W=F.variant,$=F.textcase,ue=F.lineposition,ce=F.shadow,de=l.subtitlePropName,Y=!!de,X=l.subtitlePlaceholder,Q=(w.title||{}).subtitle||{text:"",font:{}},V=(Q.text||"").trim(),le=!1,ae=1,j=Q.font,ee=j.family,te=j.size,pe=j.color,we=j.weight,Se=j.style,Re=j.variant,Pe=j.textcase,je=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 Ve(vr,qr){return vr===void 0||qr===void 0?!1:vr.replace(s," % ")===qr.replace(s," % ")}P===""?y=0:Ve(P,E)&&(tt||(P=""),y=.2,z=!0),Y&&(V===""?ae=0:Ve(V,X)&&(tt||(V=""),ae=.2,le=!0)),l._meta?P=e.templateString(P,l._meta):x._meta&&(P=e.templateString(P,x._meta));var he=P||V||tt,se;g||(g=e.ensureSingle(x._infolayer,"g","g-"+T),se=x._hColorbarMoveTitle);var ne=g.selectAll("text."+T).data(he?[0]:[]);ne.enter().append("text"),ne.text(P).attr("class",T),ne.exit().remove();var Ce=null,Ze=T+"-subtitle",rt=V||tt;if(Y&&(Ce=g.selectAll("text."+Ze).data(rt?[0]:[]),Ce.enter().append("text"),Ce.text(V).attr("class",Ze),Ce.exit().remove()),!he)return g;function Je(vr,qr){e.syncOrAsync([St,kt],{title:vr,subtitle:qr})}function St(vr){var qr=vr.title,kr=vr.subtitle,Ur;!u&&se&&(u={}),u?(Ur="",u.rotate&&(Ur+="rotate("+[u.rotate,d.x,d.y]+")"),(u.offset||se)&&(Ur+=t(0,(u.offset||0)-(se||0)))):Ur=null,qr.attr("transform",Ur);function _t(Ke){if(Ke){var st=v.select(Ke.node().parentNode).select("."+Ze);if(!st.empty()){var ot=Ke.node().getBBox();if(ot.height){var Ut=ot.y+ot.height+h*te;st.attr("y",Ut)}}}}if(qr.style("opacity",y*o.opacity(L)).call(r.font,{color:o.rgb(L),size:v.round(O,2),family:N,weight:U,style:B,variant:W,textcase:$,shadow:ce,lineposition:ue}).attr(d).call(a.convertToTspans,c,_t),kr&&!kr.empty()){var Fe=g.select("."+T+"-math-group"),Ye=qr.node().getBBox(),Ae=Fe.node()?Fe.node().getBBox():void 0,Le=Ae?Ae.y+Ae.height+h*te:Ye.y+Ye.height+f*te,We=e.extendFlat({},d,{y:Le});kr.attr("transform",Ur),kr.style("opacity",ae*o.opacity(pe)).call(r.font,{color:o.rgb(pe),size:v.round(te,2),family:ee,weight:we,style:Se,variant:Re,textcase:Pe,shadow:at,lineposition:je}).attr(We).call(a.convertToTspans,c)}return S.previousPromises(c)}function kt(vr){var qr=vr.title,kr=v.select(qr.node().parentNode);if(b&&b.selection&&b.side&&P){kr.attr("transform",null);var Ur=n[b.side],_t=b.side==="left"||b.side==="top"?-1:1,Fe=_(b.pad)?b.pad:2,Ye=r.bBox(kr.node()),Ae={t:0,b:0,l:0,r:0},Le=c._fullLayout._reservedMargin;for(var We in Le)for(var Ke in Le[We]){var st=Le[We][Ke];Ae[Ke]=Math.max(Ae[Ke],st)}var ot={left:Ae.l,top:Ae.t,right:x.width-Ae.r,bottom:x.height-Ae.b},Ut=b.maxShift||_t*(ot[b.side]-Ye[b.side]),Ct=0;if(Ut<0)Ct=Ut;else{var Pt=b.offsetLeft||0,jt=b.offsetTop||0;Ye.left-=Pt,Ye.right-=Pt,Ye.top-=jt,Ye.bottom-=jt,b.selection.each(function(){var or=r.bBox(this);e.bBoxIntersect(Ye,or,Fe)&&(Ct=Math.max(Ct,_t*(or[b.side]-Ye[Ur])+Fe))}),Ct=Math.min(Ut,Ct),w._titleScoot=Math.abs(Ct)}if(Ct>0||Ut<0){var cr={left:[-Ct,0],right:[Ct,0],top:[0,-Ct],bottom:[0,Ct]}[b.side];kr.attr("transform",t(cr[0],cr[1]))}}}ne.call(Je,Ce);function Bt(vr,qr){vr.text(qr).on("mouseover.opacity",function(){v.select(this).transition().duration(i.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){v.select(this).transition().duration(i.HIDE_PLACEHOLDER).style("opacity",0)})}if(tt&&(P?ne.on(".opacity",null):(Bt(ne,E),z=!0),ne.call(a.makeEditable,{gd:c}).on("edit",function(vr){p!==void 0?M.call("_guiRestyle",c,A,vr,p):M.call("_guiRelayout",c,A,vr)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(Je)}).on("input",function(vr){this.text(vr||" ").call(a.positionText,d.x,d.y)}),Y)){if(Y&&!P){var Vt=ne.node().getBBox(),Ar=Vt.y+Vt.height+f*te;Ce.attr("y",Ar)}V?Ce.on(".opacity",null):(Bt(Ce,X),le=!0),Ce.call(a.makeEditable,{gd:c}).on("edit",function(vr){M.call("_guiRelayout",c,"title.subtitle.text",vr)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(Je)}).on("input",function(vr){this.text(vr||" ").call(a.positionText,Ce.attr("x"),Ce.attr("y"))})}return ne.classed("js-placeholder",z),Ce&&!Ce.empty()&&Ce.classed("js-placeholder",le),g}q.exports={draw:m,SUBTITLE_PADDING_EM:f,SUBTITLE_PADDING_MATHJAX_EM:h}}}),wv=He({"src/plots/cartesian/set_convert.js"(Z,q){"use strict";var v=Vn(),_=Zv().utcFormat,S=sa(),M=S.numberFormat,e=ns(),t=S.cleanNumber,r=S.ms2DateTime,o=S.dateTime2ms,a=S.ensureNumber,i=S.isArrayOrTypedArray,n=Gs(),s=n.FP_SAFE,h=n.BADNUM,f=n.LOG_CLIP,m=n.ONEWEEK,c=n.ONEDAY,T=n.ONEHOUR,l=n.ONEMIN,x=n.ONESEC,w=tf(),A=lh(),E=A.HOUR_PATTERN,p=A.WEEKDAY_PATTERN;function b(u){return Math.pow(10,u)}function d(u){return u!=null}q.exports=function(g,y){y=y||{};var D=g._id||"x",P=D.charAt(0);function z(V,le){if(V>0)return Math.log(V)/Math.LN10;if(V<=0&&le&&g.range&&g.range.length===2){var ae=g.range[0],j=g.range[1];return .5*(ae+j-2*f*Math.abs(ae-j))}else return h}function F(V,le,ae,j){if((j||{}).msUTC&&e(V))return+V;var ee=o(V,ae||g.calendar);if(ee===h)if(e(V)){V=+V;var te=Math.floor(S.mod(V+.05,1)*10),pe=Math.round(V-te/10);ee=o(new Date(pe))+te/10}else return h;return ee}function N(V,le,ae){return r(V,le,ae||g.calendar)}function O(V){return g._categories[Math.round(V)]}function L(V){if(d(V)){if(g._categoriesMap===void 0&&(g._categoriesMap={}),g._categoriesMap[V]!==void 0)return g._categoriesMap[V];g._categories.push(typeof V=="number"?String(V):V);var le=g._categories.length-1;return g._categoriesMap[V]=le,le}return h}function U(V,le){for(var ae=new Array(le),j=0;jg.range[1]&&(ae=!ae);for(var j=ae?-1:1,ee=j*V,te=0,pe=0;peSe)te=pe+1;else{te=ee<(we+Se)/2?pe:pe+1;break}}var Re=g._B[te]||0;return isFinite(Re)?ue(V,g._m2,Re):0},Y=function(V){var le=g._rangebreaks.length;if(!le)return ce(V,g._m,g._b);for(var ae=0,j=0;jg._rangebreaks[j].pmax&&(ae=j+1);return ce(V,g._m2,g._B[ae])}}g.c2l=g.type==="log"?z:a,g.l2c=g.type==="log"?b:a,g.l2p=de,g.p2l=Y,g.c2p=g.type==="log"?function(V,le){return de(z(V,le))}:de,g.p2c=g.type==="log"?function(V){return b(Y(V))}:Y,["linear","-"].indexOf(g.type)!==-1?(g.d2r=g.r2d=g.d2c=g.r2c=g.d2l=g.r2l=t,g.c2d=g.c2r=g.l2d=g.l2r=a,g.d2p=g.r2p=function(V){return g.l2p(t(V))},g.p2d=g.p2r=Y,g.cleanPos=a):g.type==="log"?(g.d2r=g.d2l=function(V,le){return z(t(V),le)},g.r2d=g.r2c=function(V){return b(t(V))},g.d2c=g.r2l=t,g.c2d=g.l2r=a,g.c2r=z,g.l2d=b,g.d2p=function(V,le){return g.l2p(g.d2r(V,le))},g.p2d=function(V){return b(Y(V))},g.r2p=function(V){return g.l2p(t(V))},g.p2r=Y,g.cleanPos=a):g.type==="date"?(g.d2r=g.r2d=S.identity,g.d2c=g.r2c=g.d2l=g.r2l=F,g.c2d=g.c2r=g.l2d=g.l2r=N,g.d2p=g.r2p=function(V,le,ae){return g.l2p(F(V,0,ae))},g.p2d=g.p2r=function(V,le,ae){return N(Y(V),le,ae)},g.cleanPos=function(V){return S.cleanDate(V,h,g.calendar)}):g.type==="category"?(g.d2c=g.d2l=L,g.r2d=g.c2d=g.l2d=O,g.d2r=g.d2l_noadd=W,g.r2c=function(V){var le=$(V);return le!==void 0?le:g.fraction2r(.5)},g.l2r=g.c2r=a,g.r2l=$,g.d2p=function(V){return g.l2p(g.r2c(V))},g.p2d=function(V){return O(Y(V))},g.r2p=g.d2p,g.p2r=Y,g.cleanPos=function(V){return typeof V=="string"&&V!==""?V:a(V)}):g.type==="multicategory"&&(g.r2d=g.c2d=g.l2d=O,g.d2r=g.d2l_noadd=W,g.r2c=function(V){var le=W(V);return le!==void 0?le:g.fraction2r(.5)},g.r2c_just_indices=B,g.l2r=g.c2r=a,g.r2l=W,g.d2p=function(V){return g.l2p(g.r2c(V))},g.p2d=function(V){return O(Y(V))},g.r2p=g.d2p,g.p2r=Y,g.cleanPos=function(V){return Array.isArray(V)||typeof V=="string"&&V!==""?V:a(V)},g.setupMultiCategory=function(V){var le=g._traceIndices,ae,j,ee=g._matchGroup;if(ee&&g._categories.length===0){for(var te in ee)if(te!==D){var pe=y[w.id2name(te)];le=le.concat(pe._traceIndices)}}var we=[[0,{}],[0,{}]],Se=[];for(ae=0;aepe[1]&&(j[te?0:1]=ae,ee[1]=pe[1]),ee[0]>=ee[1])if(le!==void 0){var we=pe[0]+1;ae!==void 0&&(we=Math.min(we,pe[1])),j[te?0:1]=g.l2r(we)}else ae!==void 0&&(j[te?1:0]=g.l2r(pe[1]-1))}},g.cleanRange=function(V,le){g._cleanRange(V,le),g.limitRange(V)},g._cleanRange=function(V,le){le||(le={}),V||(V="range");var ae=S.nestedProperty(g,V).get(),j,ee;if(g.type==="date"?ee=S.dfltRange(g.calendar):P==="y"?ee=A.DFLTRANGEY:g._name==="realaxis"?ee=[0,1]:ee=le.dfltRange||A.DFLTRANGEX,ee=ee.slice(),(g.rangemode==="tozero"||g.rangemode==="nonnegative")&&(ee[0]=0),!ae||ae.length!==2){S.nestedProperty(g,V).set(ee);return}var te=ae[0]===null,pe=ae[1]===null;for(g.type==="date"&&!g.autorange&&(ae[0]=S.cleanDate(ae[0],h,g.calendar),ae[1]=S.cleanDate(ae[1],h,g.calendar)),j=0;j<2;j++)if(g.type==="date"){if(!S.isDateTime(ae[j],g.calendar)){g[V]=ee;break}if(g.r2l(ae[0])===g.r2l(ae[1])){var we=S.constrain(g.r2l(ae[0]),S.MIN_MS+1e3,S.MAX_MS-1e3);ae[0]=g.l2r(we-1e3),ae[1]=g.l2r(we+1e3);break}}else{if(!e(ae[j]))if(!(te||pe)&&e(ae[1-j]))ae[j]=ae[1-j]*(j?10:.1);else{g[V]=ee;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}}},g.setScale=function(V){var le=y._size;if(g.overlaying){var ae=w.getFromId({_fullLayout:y},g.overlaying);g.domain=ae.domain}var j=V&&g._r?"_r":"range",ee=g.calendar;g.cleanRange(j);var te=g.r2l(g[j][0],ee),pe=g.r2l(g[j][1],ee),we=P==="y";if(we?(g._offset=le.t+(1-g.domain[1])*le.h,g._length=le.h*(g.domain[1]-g.domain[0]),g._m=g._length/(te-pe),g._b=-g._m*pe):(g._offset=le.l+g.domain[0]*le.w,g._length=le.w*(g.domain[1]-g.domain[0]),g._m=g._length/(pe-te),g._b=-g._m*te),g._rangebreaks=[],g._lBreaks=0,g._m2=0,g._B=[],g.rangebreaks){var Se,Re;if(g._rangebreaks=g.locateBreaks(Math.min(te,pe),Math.max(te,pe)),g._rangebreaks.length){for(Se=0;Sepe&&(Pe=!Pe),Pe&&g._rangebreaks.reverse();var je=Pe?-1:1;for(g._m2=je*g._length/(Math.abs(pe-te)-g._lBreaks),g._B.push(-g._m2*(we?pe:te)),Se=0;Seee&&(ee+=7,teee&&(ee+=24,te=j&&te=j&&V=Je.min&&(neJe.max&&(Je.max=Ce),Ze=!1)}Ze&&pe.push({min:ne,max:Ce})}};for(ae=0;aex*2}function n(f){return Math.max(1,(f-1)/1e3)}function s(f,m){for(var c=f.length,T=n(c),l=0,x=0,w={},A=0;Al*2}function h(f){return M(f[0])&&M(f[1])}}}),Yd=He({"src/plots/cartesian/autorange.js"(Z,q){"use strict";var v=Vn(),_=ns(),S=sa(),M=Gs().FP_SAFE,e=so(),t=as(),r=tf(),o=r.getFromId,a=r.isLinked;q.exports={applyAutorangeOptions:g,getAutoRange:i,makePadFn:s,doAutoRange:c,findExtremes:T,concatExtremes:m};function i(y,D){var P,z,F=[],N=y._fullLayout,O=s(N,D,0),L=s(N,D,1),U=m(y,D),B=U.min,W=U.max;if(B.length===0||W.length===0)return S.simpleMap(D.range,D.r2l);var $=B[0].val,ue=W[0].val;for(P=1;P0&&(Se=le-O(ee)-L(te),Se>ae?Re/Se>j&&(pe=ee,we=te,j=Re/Se):Re/le>j&&(pe={val:ee.val,nopad:1},we={val:te.val,nopad:1},j=Re/le));function Pe(Ve,he){return Math.max(Ve,L(he))}if($===ue){var je=$-1,at=$+1;if(Q)if($===0)F=[0,1];else{var nt=($>0?W:B).reduce(Pe,0),tt=$/(1-Math.min(.5,nt/le));F=$>0?[0,tt]:[tt,0]}else V?F=[Math.max(0,je),Math.max(1,at)]:F=[je,at]}else Q?(pe.val>=0&&(pe={val:0,nopad:1}),we.val<=0&&(we={val:0,nopad:1})):V&&(pe.val-j*O(pe)<0&&(pe={val:0,nopad:1}),we.val<=0&&(we={val:1,nopad:1})),j=(we.val-pe.val-n(D,ee.val,te.val))/(le-O(pe)-L(we)),F=[pe.val-j*O(pe),we.val+j*L(we)];return F=g(F,D),D.limitRange&&D.limitRange(),de&&F.reverse(),S.simpleMap(F,D.l2r||Number)}function n(y,D,P){var z=0;if(y.rangebreaks)for(var F=y.locateBreaks(D,P),N=0;N0?P.ppadplus:P.ppadminus)||P.ppad||0),ee=ae((y._m>0?P.ppadminus:P.ppadplus)||P.ppad||0),te=ae(P.vpadplus||P.vpad),pe=ae(P.vpadminus||P.vpad);if(!B){if(V=1/0,le=-1/0,U)for($=0;$0&&(V=ue),ue>le&&ue-M&&(V=ue),ue>le&&ue=Re;$--)Se($);return{min:z,max:F,opts:P}}function l(y,D,P,z){w(y,D,P,z,E)}function x(y,D,P,z){w(y,D,P,z,p)}function w(y,D,P,z,F){for(var N=z.tozero,O=z.extrapad,L=!0,U=0;U=P&&(B.extrapad||!O)){L=!1;break}else F(D,B.val)&&B.pad<=P&&(O||!B.extrapad)&&(y.splice(U,1),U--)}if(L){var W=N&&D===0;y.push({val:D,pad:W?0:P,extrapad:W?!1:O})}}function A(y){return _(y)&&Math.abs(y)=D}function b(y,D){var P=D.autorangeoptions;return P&&P.minallowed!==void 0&&u(D,P.minallowed,P.maxallowed)?P.minallowed:P&&P.clipmin!==void 0&&u(D,P.clipmin,P.clipmax)?Math.max(y,D.d2l(P.clipmin)):y}function d(y,D){var P=D.autorangeoptions;return P&&P.maxallowed!==void 0&&u(D,P.minallowed,P.maxallowed)?P.maxallowed:P&&P.clipmax!==void 0&&u(D,P.clipmin,P.clipmax)?Math.min(y,D.d2l(P.clipmax)):y}function u(y,D,P){return D!==void 0&&P!==void 0?(D=y.d2l(D),P=y.d2l(P),D=U&&(N=U,P=U),O<=U&&(O=U,z=U)}}return P=b(P,D),z=d(z,D),[P,z]}}}),Wo=He({"src/plots/cartesian/axes.js"(Z,q){"use strict";var v=Vn(),_=ns(),S=bc(),M=so(),e=sa(),t=e.strTranslate,r=su(),o=K0(),a=$n(),i=as(),n=Xh(),s=l5(),h=lh(),f=Gs(),m=f.ONEMAXYEAR,c=f.ONEAVGYEAR,T=f.ONEMINYEAR,l=f.ONEMAXQUARTER,x=f.ONEAVGQUARTER,w=f.ONEMINQUARTER,A=f.ONEMAXMONTH,E=f.ONEAVGMONTH,p=f.ONEMINMONTH,b=f.ONEWEEK,d=f.ONEDAY,u=d/2,g=f.ONEHOUR,y=f.ONEMIN,D=f.ONESEC,P=f.ONEMILLI,z=f.ONEMICROSEC,F=f.MINUS_SIGN,N=f.BADNUM,O={K:"zeroline"},L={K:"gridline",L:"path"},U={K:"minor-gridline",L:"path"},B={K:"tick",L:"path"},W={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"]},ue=uh(),ce=ue.MID_SHIFT,de=ue.CAP_SHIFT,Y=ue.LINE_SPACING,X=ue.OPPOSITE_SIDE,Q=3,V=q.exports={};V.setConvert=wv();var le=a1(),ae=tf(),j=ae.idSort,ee=ae.isLinked;V.id2name=ae.id2name,V.name2id=ae.name2id,V.cleanId=ae.cleanId,V.list=ae.list,V.listIds=ae.listIds,V.getFromId=ae.getFromId,V.getFromTrace=ae.getFromTrace;var te=Yd();V.getAutoRange=te.getAutoRange,V.findExtremes=te.findExtremes;var pe=1e-4;function we(xt){var ut=(xt[1]-xt[0])*pe;return[xt[0]-ut,xt[1]+ut]}V.coerceRef=function(xt,ut,Or,Cr,wr,Rr){var Nr=Cr.charAt(Cr.length-1),Hr=Or._fullLayout._subplots[Nr+"axis"],gt=Cr+"ref",Kt={};return wr||(wr=Hr[0]||(typeof Rr=="string"?Rr:Rr[0])),Rr||(Rr=wr),Hr=Hr.concat(Hr.map(function(mr){return mr+" domain"})),Kt[gt]={valType:"enumerated",values:Hr.concat(Rr?typeof Rr=="string"?[Rr]:Rr:[]),dflt:wr},e.coerce(xt,ut,Kt,gt)},V.coerceRefArray=function(xt,ut,Or,Cr,wr,Rr,Nr){let Hr=Cr.charAt(Cr.length-1);var gt=Or._fullLayout._subplots[Hr+"axis"];let Kt=Cr+"ref";var mr=xt[Kt];wr||(wr=gt[0]||(typeof Rr=="string"?Rr:Rr[0])),gt=gt.concat(gt.map(va=>va+" domain")),gt=gt.concat(Rr||[]),mr.length>Nr?(e.warn("Array attribute "+Kt+" has more entries than expected, truncating to "+Nr),mr=mr.slice(0,Nr)):mr.length2e-6||((Or-xt._forceTick0)/xt._minDtick%1+1.000001)%1>2e-6)&&(xt._minDtick=0))},V.saveRangeInitial=function(xt,ut){for(var Or=V.list(xt,"",!0),Cr=!1,wr=0;wrIr*.3||Kt(Cr)||Kt(wr))){var va=Or.dtick/2;xt+=xt+vaNr){var Hr=Number(Or.slice(1));Rr.exactYears>Nr&&Hr%12===0?xt=V.tickIncrement(xt,"M6","reverse")+d*1.5:Rr.exactMonths>Nr?xt=V.tickIncrement(xt,"M1","reverse")+d*15.5:xt-=u;var gt=V.tickIncrement(xt,Or);if(gt<=Cr)return gt}return xt}V.prepMinorTicks=function(xt,ut,Or){var Cr,wr;if(!((Cr=ut.minor)!=null&&Cr.dtick)){delete xt.dtick;var Rr=ut.dtick&&_(ut._tmin),Nr;if(Rr){var Hr=V.tickIncrement(ut._tmin,ut.dtick,!0);Nr=[ut._tmin,Hr*.99+ut._tmin*.01]}else{var gt=e.simpleMap(ut.range,ut.r2l);Nr=[gt[0],.8*gt[0]+.2*gt[1]]}if(xt.range=e.simpleMap(Nr,ut.l2r),xt._isMinor=!0,V.prepTicks(xt,Or),Rr){var Kt=_(ut.dtick),mr=_(xt.dtick),Ir=Kt?ut.dtick:+ut.dtick.substring(1),va=mr?xt.dtick:+xt.dtick.substring(1);Kt&&mr?nt(Ir,va)?Ir===2*b&&va===2*d&&(xt.dtick=b):Ir===2*b&&va===3*d?xt.dtick=b:Ir===b&&!(ut._input.minor||{}).nticks?xt.dtick=d:tt(Ir/va,2.5)?xt.dtick=Ir/2:xt.dtick=Ir:String(ut.dtick).charAt(0)==="M"?mr?xt.dtick="M1":nt(Ir,va)?Ir>=12&&va===2&&(xt.dtick="M3"):xt.dtick=ut.dtick:String(xt.dtick).charAt(0)==="L"?String(ut.dtick).charAt(0)==="L"?nt(Ir,va)||(xt.dtick=tt(Ir/va,2.5)?ut.dtick/2:ut.dtick):xt.dtick="D1":xt.dtick==="D2"&&+ut.dtick>1&&(xt.dtick=1)}xt.range=ut.range}((wr=ut.minor)==null?void 0:wr._tick0Init)===void 0&&(xt.tick0=ut.tick0)};function nt(xt,ut){return Math.abs((xt/ut+.5)%1-.5)<.001}function tt(xt,ut){return Math.abs(xt/ut-1)<.001}V.prepTicks=function(xt,ut){var Or=e.simpleMap(xt.range,xt.r2l,void 0,void 0,ut);if(xt.tickmode==="auto"||!xt.dtick){var Cr=xt.nticks,wr;Cr||(xt.type==="category"||xt.type==="multicategory"?(wr=xt.tickfont?e.bigFont(xt.tickfont.size||12):15,Cr=xt._length/wr):(wr=xt._id.charAt(0)==="y"?40:80,Cr=e.constrain(xt._length/wr,4,9)+1),xt._name==="radialaxis"&&(Cr*=2)),xt.minor&&xt.minor.tickmode!=="array"||xt.tickmode==="array"&&(Cr*=100),xt._roughDTick=Math.abs(Or[1]-Or[0])/Cr,V.autoTicks(xt,xt._roughDTick),xt._minDtick>0&&xt.dtick0?(Rr=Cr-1,Nr=Cr):(Rr=Cr,Nr=Cr);var Hr=xt[Rr].value,gt=xt[Nr].value,Kt=Math.abs(gt-Hr),mr=Or||Kt,Ir=0;mr>=T?Kt>=T&&Kt<=m?Ir=Kt:Ir=c:Or===x&&mr>=w?Kt>=w&&Kt<=l?Ir=Kt:Ir=x:mr>=p?Kt>=p&&Kt<=A?Ir=Kt:Ir=E:Or===b&&mr>=b?Ir=b:mr>=d?Ir=d:Or===u&&mr>=u?Ir=u:Or===g&&mr>=g&&(Ir=g);var va;Ir>=Kt&&(Ir=Kt,va=!0);var Pa=wr+Ir;if(ut.rangebreaks&&Ir>0){for(var ga=84,la=0,ba=0;bab&&(Ir=Kt)}(Ir>0||Cr===0)&&(xt[Cr].periodX=wr+Ir/2)}}V.calcTicks=function(ut,Or){for(var Cr=ut.type,wr=ut.calendar,Rr=ut.ticklabelstep,Nr=ut.ticklabelmode==="period",Hr=ut.range[0]>ut.range[1],gt=!ut.ticklabelindex||e.isArrayOrTypedArray(ut.ticklabelindex)?ut.ticklabelindex:[ut.ticklabelindex],Kt=e.simpleMap(ut.range,ut.r2l,void 0,void 0,Or),mr=Kt[1]=(En?0:1);Tn--){var On=!Tn;Tn?(ut._dtickInit=ut.dtick,ut._tick0Init=ut.tick0):En&&(ut.minor._dtickInit=ut.minor.dtick,ut.minor._tick0Init=ut.minor.tick0);var kn=Tn?ut:e.extendFlat({},ut,En?ut.minor:{minor:{}});if(On?V.prepMinorTicks(kn,ut,Or):V.prepTicks(kn,Or),kn.tickmode==="array"){Tn?(ba=[],ga=Ze(ut,!On)):(Ai=[],la=Ze(ut,!On));continue}if(kn.tickmode==="sync"){ba=[],ga=Ce(ut);continue}var ao=we(Kt),Co=ao[0],bo=ao[1],zs=_(kn.dtick),Cn=Cr==="log"&&!(zs||kn.dtick.charAt(0)==="L"),wo=V.tickFirst(kn,Or);if(Tn){if(ut._tmin=wo,wo=bo:go<=bo;go=V.tickIncrement(go,jo,mr,wr)){if(Tn&&os++,kn.rangebreaks&&!mr){if(go=va)break}if(ba.length>Pa||go===Zn)break;Zn=go;var Yn={value:go};Tn?(Cn&&go!==(go|0)&&(Yn.simpleLabel=!0),Rr>1&&os%Rr&&(Yn.skipLabel=!0),ba.push(Yn)):(Yn.minor=!0,Ai.push(Yn))}}if(!Ai||Ai.length<3)gt=!1;else{var Gn=(Ai[2].value-Ai[1].value)*(Hr?-1:1);cn(Gn,ut.tickformat)||(gt=!1,Ai=Ai.slice(1))}if(!gt)ki=ba;else{var Hn=ba.concat(Ai);Nr&&ba.length&&(Hn=Hn.slice(1)),Hn=Hn.sort(function(Ks,Ts){return Ks.value-Ts.value}).filter(function(Ks,Ts,Ls){return Ts===0||Ks.value!==Ls[Ts-1].value});var ss=Hn.map(function(Ks,Ts){return Ks.minor===void 0&&!Ks.skipLabel?Ts:null}).filter(function(Ks){return Ks!==null});ss.forEach(function(Ks){gt.map(function(Ts){var Ls=Ks+Ts;Ls>=0&&Ls-1;Zo--){if(ba[Zo].drop){ba.splice(Zo,1);continue}ba[Zo].value=ri(ba[Zo].value,ut);var yn=ut.c2p(ba[Zo].value);(ws?il>yn-Hs:ilva||Jova&&(Ls.periodX=va),Jowr&&vac)ut/=c,Cr=wr(10),xt.dtick="M"+12*vr(ut,Cr,rt);else if(Rr>E)ut/=E,xt.dtick="M"+vr(ut,1,Je);else if(Rr>d){if(xt.dtick=vr(ut,d,xt._hasDayOfWeekBreaks?[1,2,7,14]:kt),!Or){var Nr=V.getTickFormat(xt),Hr=xt.ticklabelmode==="period";Hr&&(xt._rawTick0=xt.tick0),/%[uVW]/.test(Nr)?xt.tick0=e.dateTick0(xt.calendar,2):xt.tick0=e.dateTick0(xt.calendar,1),Hr&&(xt._dowTick0=xt.tick0)}}else Rr>g?xt.dtick=vr(ut,g,Je):Rr>y?xt.dtick=vr(ut,y,St):Rr>D?xt.dtick=vr(ut,D,St):(Cr=wr(10),xt.dtick=vr(ut,Cr,rt))}else if(xt.type==="log"){xt.tick0=0;var gt=e.simpleMap(xt.range,xt.r2l);if(xt._isMinor&&(ut*=1.5),ut>.7)xt.dtick=Math.ceil(ut);else if(Math.abs(gt[1]-gt[0])<1){var Kt=1.5*Math.abs((gt[1]-gt[0])/ut);ut=Math.abs(Math.pow(10,gt[1])-Math.pow(10,gt[0]))/Kt,Cr=wr(10),xt.dtick="L"+vr(ut,Cr,rt)}else xt.dtick=ut>.3?"D2":"D1"}else xt.type==="category"||xt.type==="multicategory"?(xt.tick0=0,xt.dtick=Math.ceil(Math.max(ut,1))):Za(xt)?(xt.tick0=0,Cr=1,xt.dtick=vr(ut,Cr,Ar)):(xt.tick0=0,Cr=wr(10),xt.dtick=vr(ut,Cr,rt));if(xt.dtick===0&&(xt.dtick=1),!_(xt.dtick)&&typeof xt.dtick!="string"){var mr=xt.dtick;throw xt.dtick=1,"ax.dtick error: "+String(mr)}};function qr(xt){var ut=xt.dtick;if(xt._tickexponent=0,!_(ut)&&typeof ut!="string"&&(ut=1),(xt.type==="category"||xt.type==="multicategory")&&(xt._tickround=null),xt.type==="date"){var Or=xt.r2l(xt.tick0),Cr=xt.l2r(Or).replace(/(^-|i)/g,""),wr=Cr.length;if(String(ut).charAt(0)==="M")wr>10||Cr.slice(5)!=="01-01"?xt._tickround="d":xt._tickround=+ut.slice(1)%12===0?"y":"m";else if(ut>=d&&wr<=10||ut>=d*15)xt._tickround="d";else if(ut>=y&&wr<=16||ut>=g)xt._tickround="M";else if(ut>=D&&wr<=19||ut>=y)xt._tickround="S";else{var Rr=xt.l2r(Or+ut).replace(/^-/,"").length;xt._tickround=Math.max(wr,Rr)-20,xt._tickround<0&&(xt._tickround=4)}}else if(_(ut)||ut.charAt(0)==="L"){var Nr=xt.range.map(xt.r2d||Number);_(ut)||(ut=Number(ut.slice(1))),xt._tickround=2-Math.floor(Math.log(ut)/Math.LN10+.01);var Hr=Math.max(Math.abs(Nr[0]),Math.abs(Nr[1])),gt=Math.floor(Math.log(Hr)/Math.LN10+.01),Kt=xt.minexponent===void 0?3:xt.minexponent;Math.abs(gt)>Kt&&(ot(xt.exponentformat)&&xt.exponentformat!=="SI extended"&&!Ut(gt)||ot(xt.exponentformat)&&xt.exponentformat==="SI extended"&&!Ct(gt)?xt._tickexponent=3*Math.round((gt-1)/3):xt._tickexponent=gt)}else xt._tickround=null}V.tickIncrement=function(xt,ut,Or,Cr){var wr=Or?-1:1;if(_(ut))return e.increment(xt,wr*ut);var Rr=ut.charAt(0),Nr=wr*Number(ut.slice(1));if(Rr==="M")return e.incrementMonth(xt,Nr,Cr);if(Rr==="L")return Math.log(Math.pow(10,xt)+Nr)/Math.LN10;if(Rr==="D"){var Hr=ut==="D2"?Vt:Bt,gt=xt+wr*.01,Kt=e.roundUp(e.mod(gt,1),Hr,Or);return Math.floor(gt)+Math.log(v.round(Math.pow(10,Kt),1))/Math.LN10}throw"unrecognized dtick "+String(ut)},V.tickFirst=function(xt,ut){var Or=xt.r2l||Number,Cr=e.simpleMap(xt.range,Or,void 0,void 0,ut),wr=Cr[1]=0&&Ai<=xt._length?ba:null};if(Rr&&e.isArrayOrTypedArray(xt.ticktext)){var Ir=e.simpleMap(xt.range,xt.r2l),va=(Math.abs(Ir[1]-Ir[0])-(xt._lBreaks||0))/1e4;for(Kt=0;Kt"+Hr;else{var Kt=pi(xt),mr=xt._trueSide||xt.side;(!Kt&&mr==="top"||Kt&&mr==="bottom")&&(Nr+="
")}ut.text=Nr}function _t(xt,ut,Or,Cr,wr){var Rr=xt.dtick,Nr=ut.x,Hr=xt.tickformat,gt=typeof Rr=="string"&&Rr.charAt(0);if(wr==="never"&&(wr=""),Cr&>!=="L"&&(Rr="L3",gt="L"),Hr||gt==="L")ut.text=jt(Math.pow(10,Nr),xt,wr,Cr);else if(_(Rr)||gt==="D"&&(xt.minorloglabels==="complete"||e.mod(Nr+.01,1)<.1)){var Kt;xt.minorloglabels==="complete"&&!(e.mod(Nr+.01,1)<.1)&&(Kt=!0,ut.fontSize*=.75);var mr=Math.pow(10,Nr).toExponential(0),Ir=mr.split("e"),va=+Ir[1],Pa=Math.abs(va),ga=xt.exponentformat;ga==="power"||ot(ga)&&ga!=="SI extended"&&Ut(va)||ot(ga)&&ga==="SI extended"&&Ct(va)?(ut.text=Ir[0],Pa>0&&(ut.text+="x10"),ut.text==="1x10"&&(ut.text="10"),va!==0&&va!==1&&(ut.text+=""+(va>0?"":F)+Pa+""),ut.fontSize*=1.25):(ga==="e"||ga==="E")&&Pa>2?ut.text=Ir[0]+ga+(va>0?"+":F)+Pa:(ut.text=jt(Math.pow(10,Nr),xt,"","fakehover"),Rr==="D1"&&xt._id.charAt(0)==="y"&&(ut.dy-=ut.fontSize/6))}else if(gt==="D")ut.text=xt.minorloglabels==="none"?"":String(Math.round(Math.pow(10,e.mod(Nr,1)))),ut.fontSize*=.75;else throw"unrecognized dtick "+String(Rr);if(xt.dtick==="D1"){var la=String(ut.text).charAt(0);(la==="0"||la==="1")&&(xt._id.charAt(0)==="y"?ut.dx-=ut.fontSize/4:(ut.dy+=ut.fontSize/2,ut.dx+=(xt.range[1]>xt.range[0]?1:-1)*ut.fontSize*(Nr<0?.5:.25)))}}function Fe(xt,ut){var Or=xt._categories[Math.round(ut.x)];Or===void 0&&(Or=""),ut.text=String(Or)}function Ye(xt,ut,Or){var Cr=Math.round(ut.x),wr=xt._categories[Cr]||[],Rr=wr[1]===void 0?"":String(wr[1]),Nr=wr[0]===void 0?"":String(wr[0]);Or?ut.text=Nr+" - "+Rr:(ut.text=Rr,ut.text2=Nr)}function Ae(xt,ut,Or,Cr,wr){wr==="never"?wr="":xt.showexponent==="all"&&Math.abs(ut.x/xt.dtick)<1e-6&&(wr="hide"),ut.text=jt(ut.x,xt,wr,Cr)}function Le(xt,ut,Or,Cr,wr){if(xt.thetaunit==="radians"&&!Or){var Rr=ut.x/180;if(Rr===0)ut.text="0";else{var Nr=We(Rr);if(Nr[1]>=100)ut.text=jt(e.deg2rad(ut.x),xt,wr,Cr);else{var Hr=ut.x<0;Nr[1]===1?Nr[0]===1?ut.text="\u03C0":ut.text=Nr[0]+"\u03C0":ut.text=["",Nr[0],"","\u2044","",Nr[1],"","\u03C0"].join(""),Hr&&(ut.text=F+ut.text)}}}else ut.text=jt(ut.x,xt,wr,Cr)}function We(xt){function ut(Hr,gt){return Math.abs(Hr-gt)<=1e-6}function Or(Hr,gt){return ut(gt,0)?Hr:Or(gt,Hr%gt)}function Cr(Hr){for(var gt=1;!ut(Math.round(Hr*gt)/gt,Hr);)gt*=10;return gt}var wr=Cr(xt),Rr=xt*wr,Nr=Math.abs(Or(Rr,wr));return[Math.round(Rr/Nr),Math.round(wr/Nr)]}var Ke=["f","p","n","\u03BC","m","","k","M","G","T"],st=["q","r","y","z","a",...Ke,"P","E","Z","Y","R","Q"],ot=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,ut){return ot(ut)?!!(ut==="SI extended"&&Ct(xt)||ut!=="SI extended"&&Ut(xt)):!1}function jt(xt,ut,Or,Cr){var wr=xt<0,Rr=ut._tickround,Nr=Or||ut.exponentformat||"B",Hr=ut._tickexponent,gt=V.getTickFormat(ut),Kt=ut.separatethousands;if(Cr){var mr={exponentformat:Nr,minexponent:ut.minexponent,dtick:ut.showexponent==="none"?ut.dtick:_(xt)&&Math.abs(xt)||1,range:ut.showexponent==="none"?ut.range.map(ut.r2d):[0,xt||1]};qr(mr),Rr=(Number(mr._tickround)||0)+4,Hr=mr._tickexponent,ut.hoverformat&&(gt=ut.hoverformat)}if(gt)return ut._numFormat(gt)(xt).replace(/-/g,F);var Ir=Math.pow(10,-Rr)/2;if(Nr==="none"&&(Hr=0),xt=Math.abs(xt),xt"+ga+"":Nr==="B"&&Hr===9?xt+="B":ot(Nr)&&(xt+=Nr==="SI extended"?st[Hr/3+10]:Ke[Hr/3+5])}return wr?F+xt:xt}V.getTickFormat=function(xt){var ut;function Or(gt){return typeof gt!="string"?gt:Number(gt.replace("M",""))*E}function Cr(gt,Kt){var mr=["L","D"];if(typeof gt==typeof Kt){if(typeof gt=="number")return gt-Kt;var Ir=mr.indexOf(gt.charAt(0)),va=mr.indexOf(Kt.charAt(0));return Ir===va?Number(gt.replace(/(L|D)/g,""))-Number(Kt.replace(/(L|D)/g,"")):Ir-va}else return typeof gt=="number"?1:-1}function wr(gt,Kt,mr){var Ir=mr||function(ga){return ga},va=Kt[0],Pa=Kt[1];return(!va&&typeof va!="number"||Ir(va)<=Ir(gt))&&(!Pa&&typeof Pa!="number"||Ir(Pa)>=Ir(gt))}function Rr(gt,Kt){var mr=Kt[0]===null,Ir=Kt[1]===null,va=Cr(gt,Kt[0])>=0,Pa=Cr(gt,Kt[1])<=0;return(mr||va)&&(Ir||Pa)}var Nr,Hr;if(xt.tickformatstops&&xt.tickformatstops.length>0)switch(xt.type){case"date":case"linear":{for(ut=0;ut=0&&wr.unshift(wr.splice(mr,1).shift())}});var Hr={false:{left:0,right:0}};return e.syncOrAsync(wr.map(function(gt){return function(){if(gt){var Kt=V.getFromId(xt,gt);Or||(Or={}),Or.axShifts=Hr,Or.overlayingShiftedAx=Nr;var mr=V.drawOne(xt,Kt,Or);return Kt._shiftPusher&&rn(Kt,Kt._fullDepth||0,Hr,!0),Kt._r=Kt.range.slice(),Kt._rl=e.simpleMap(Kt._r,Kt.r2l),mr}}}))},V.drawOne=function(xt,ut,Or){Or=Or||{};var Cr=Or.axShifts||{},wr=Or.overlayingShiftedAx||[],Rr,Nr,Hr;ut.setScale();var gt=xt._fullLayout,Kt=ut._id,mr=Kt.charAt(0),Ir=V.counterLetter(Kt),va=gt._plots[ut._mainSubplot],Pa=ut.zerolinelayer==="above traces";if(!va)return;if(ut._shiftPusher=ut.autoshift||wr.indexOf(ut._id)!==-1||wr.indexOf(ut.overlaying)!==-1,ut._shiftPusher&ut.anchor==="free"){var ga=ut.linewidth/2||0;ut.ticks==="inside"&&(ga+=ut.ticklen),rn(ut,ga,Cr,!0),rn(ut,ut.shift||0,Cr,!1)}(Or.skipTitle!==!0||ut._shift===void 0)&&(ut._shift=tn(ut,Cr));var la=va[mr+"axislayer"],ba=ut._mainLinePosition,Ai=ba+=ut._shift,ki=ut._mainMirrorPosition,Ki=ut._vals=V.calcTicks(ut),En=[ut.mirror,Ai,ki].join("_");for(Rr=0;Rr0?Ls.bottom-Ks:0,Ts))));var lu=0,Tc=0;if(ut._shiftPusher&&(lu=Math.max(Ts,Ls.height>0?uo==="l"?Ks-Ls.left:Ls.right-Ks:0),ut.title.text!==gt._dfltTitle[mr]&&(Tc=(ut._titleStandoff||0)+(ut._titleScoot||0),uo==="l"&&(Tc+=Ca(ut))),ut._fullDepth=Math.max(lu,Tc)),ut.automargin){Jo={x:0,y:0,r:0,l:0,t:0,b:0};var du=[0,1],Sf=typeof ut._shift=="number"?ut._shift:0;if(mr==="x"){if(uo==="b"?Jo[uo]=ut._depth:(Jo[uo]=ut._depth=Math.max(Ls.width>0?Ks-Ls.top:0,Ts),du.reverse()),Ls.width>0){var Uc=Ls.right-(ut._offset+ut._length);Uc>0&&(Jo.xr=1,Jo.r=Uc);var Bs=ut._offset-Ls.left;Bs>0&&(Jo.xl=0,Jo.l=Bs)}}else if(uo==="l"?(ut._depth=Math.max(Ls.height>0?Ks-Ls.left:0,Ts),Jo[uo]=ut._depth-Sf):(ut._depth=Math.max(Ls.height>0?Ls.right-Ks:0,Ts),Jo[uo]=ut._depth+Sf,du.reverse()),Ls.height>0){var dc=Ls.bottom-(ut._offset+ut._length);dc>0&&(Jo.yb=0,Jo.b=dc);var Wc=ut._offset-Ls.top;Wc>0&&(Jo.yt=1,Jo.t=Wc)}Jo[Ir]=ut.anchor==="free"?ut.position:ut._anchorAxis.domain[du[0]],ut.title.text!==gt._dfltTitle[mr]&&(Jo[uo]+=Ca(ut)+(ut.title.standoff||0)),ut.mirror&&ut.anchor!=="free"&&(Es={x:0,y:0,r:0,l:0,t:0,b:0},Es[Nl]=ut.linewidth,ut.mirror&&ut.mirror!==!0&&(Es[Nl]+=Ts),ut.mirror===!0||ut.mirror==="ticks"?Es[Ir]=ut._anchorAxis.domain[du[1]]:(ut.mirror==="all"||ut.mirror==="allticks")&&(Es[Ir]=[ut._counterDomainMin,ut._counterDomainMax][du[1]]))}Ll&&(Ul=M.getComponentMethod("rangeslider","autoMarginOpts")(xt,ut)),typeof ut.automargin=="string"&&(cr(Jo,ut.automargin),cr(Es,ut.automargin)),S.autoMargin(xt,Jt(ut),Jo),S.autoMargin(xt,Fr(ut),Es),S.autoMargin(xt,ta(ut),Ul)}),e.syncOrAsync(To)}};function cr(xt,ut){if(xt){var Or=Object.keys($).reduce(function(Cr,wr){return ut.indexOf(wr)!==-1&&$[wr].forEach(function(Rr){Cr[Rr]=1}),Cr},{});Object.keys(xt).forEach(function(Cr){Or[Cr]||(Cr.length===1?xt[Cr]=0:delete xt[Cr])})}}function or(xt,ut){var Or=[],Cr,wr=function(Rr,Nr){var Hr=Rr.xbnd[Nr];Hr!==null&&Or.push(e.extendFlat({},Rr,{x:Hr}))};if(ut.length){for(Cr=0;Crxt.range[1],Hr=xt.ticklabelposition&&xt.ticklabelposition.indexOf("inside")!==-1,gt=!Hr;if(Or){var Kt=Nr?-1:1;Or=Or*Kt}if(Cr){var mr=xt.side,Ir=Hr&&(mr==="top"||mr==="left")||gt&&(mr==="bottom"||mr==="right")?1:-1;Cr=Cr*Ir}return xt._id.charAt(0)==="x"?function(va){return t(wr+xt._offset+xt.l2p(Fa(va))+Or,Rr+Cr)}:function(va){return t(Rr+Cr,wr+xt._offset+xt.l2p(Fa(va))+Or)}};function Fa(xt){return xt.periodX!==void 0?xt.periodX:xt.x}function Ra(xt){var ut=xt.ticklabelposition||"",Or=xt.tickson||"",Cr=function(ga){return ut.indexOf(ga)!==-1},wr=Cr("top"),Rr=Cr("left"),Nr=Cr("right"),Hr=Cr("bottom"),gt=Cr("inside"),Kt=Or!=="boundaries"&&(Hr||Rr||wr||Nr);if(!Kt&&!gt)return[0,0];var mr=xt.side,Ir=Kt?(xt.tickwidth||0)/2:0,va=Q,Pa=xt.tickfont?xt.tickfont.size:12;return(Hr||wr)&&(Ir+=Pa*de,va+=(xt.linewidth||0)/2),(Rr||Nr)&&(Ir+=(xt.linewidth||0)/2,va+=Q),gt&&mr==="top"&&(va-=Pa*(1-de)),(Rr||wr)&&(Ir=-Ir),(mr==="bottom"||mr==="right")&&(va=-va),[Kt?Ir:0,gt?va:0]}V.makeTickPath=function(xt,ut,Or,Cr){Cr||(Cr={});var wr=Cr.minor;if(wr&&!xt.minor)return"";var Rr=Cr.len!==void 0?Cr.len:wr?xt.minor.ticklen:xt.ticklen,Nr=xt._id.charAt(0),Hr=(xt.linewidth||1)/2;return Nr==="x"?"M0,"+(ut+Hr*Or)+"v"+Rr*Or:"M"+(ut+Hr*Or)+",0h"+Rr*Or},V.makeLabelFns=function(xt,ut,Or){var Cr=xt.ticklabelposition||"",wr=xt.tickson||"",Rr=function(wo){return Cr.indexOf(wo)!==-1},Nr=Rr("top"),Hr=Rr("left"),gt=Rr("right"),Kt=Rr("bottom"),mr=wr!=="boundaries"&&(Kt||Hr||Nr||gt),Ir=Rr("inside"),va=Cr==="inside"&&xt.ticks==="inside"||!Ir&&xt.ticks==="outside"&&wr!=="boundaries",Pa=0,ga=0,la=va?xt.ticklen:0;if(Ir?la*=-1:mr&&(la=0),va&&(Pa+=la,Or)){var ba=e.deg2rad(Or);Pa=la*Math.cos(ba)+1,ga=la*Math.sin(ba)}xt.showticklabels&&(va||xt.showline)&&(Pa+=.2*xt.tickfont.size),Pa+=(xt.linewidth||1)/2*(Ir?-1:1);var Ai={labelStandoff:Pa,labelShift:ga},ki,Ki,En,Tn,On=0,kn=xt.side,ao=xt._id.charAt(0),Co=xt.tickangle,bo;if(ao==="x")bo=!Ir&&kn==="bottom"||Ir&&kn==="top",Tn=bo?1:-1,Ir&&(Tn*=-1),ki=ga*Tn,Ki=ut+Pa*Tn,En=bo?1:-.2,Math.abs(Co)===90&&(Ir?En+=ce:Co===-90&&kn==="bottom"?En=de:Co===90&&kn==="top"?En=ce:En=.5,On=ce/2*(Co/90)),Ai.xFn=function(wo){return wo.dx+ki+On*wo.fontSize},Ai.yFn=function(wo){return wo.dy+Ki+wo.fontSize*En},Ai.anchorFn=function(wo,Zn){if(mr){if(Hr)return"end";if(gt)return"start"}return!_(Zn)||Zn===0||Zn===180?"middle":Zn*Tn<0!==Ir?"end":"start"},Ai.heightFn=function(wo,Zn,go){return Zn<-60||Zn>60?-.5*go:xt.side==="top"!==Ir?-go:0};else if(ao==="y"){if(bo=!Ir&&kn==="left"||Ir&&kn==="right",Tn=bo?1:-1,Ir&&(Tn*=-1),ki=Pa,Ki=ga*Tn,En=0,!Ir&&Math.abs(Co)===90&&(Co===-90&&kn==="left"||Co===90&&kn==="right"?En=de:En=.5),Ir){var zs=_(Co)?+Co:0;if(zs!==0){var Cn=e.deg2rad(zs);On=Math.abs(Math.sin(Cn))*de*Tn,En=0}}Ai.xFn=function(wo){return wo.dx+ut-(ki+wo.fontSize*En)*Tn+On*wo.fontSize},Ai.yFn=function(wo){return wo.dy+Ki+wo.fontSize*ce},Ai.anchorFn=function(wo,Zn){return _(Zn)&&Math.abs(Zn)===90?"middle":bo?"end":"start"},Ai.heightFn=function(wo,Zn,go){return xt.side==="right"&&(Zn*=-1),Zn<-30?-go:Zn<30?-.5*go:0}}return Ai};function qa(xt){return[xt.text,xt.x,xt.axInfo,xt.font,xt.fontSize,xt.fontColor].join("_")}V.drawTicks=function(xt,ut,Or){Or=Or||{};var Cr=ut._id+"tick",wr=[].concat(ut.minor&&ut.minor.ticks?Or.vals.filter(function(Nr){return Nr.minor&&!Nr.noTick}):[]).concat(ut.ticks?Or.vals.filter(function(Nr){return!Nr.minor&&!Nr.noTick}):[]),Rr=Or.layer.selectAll("path."+Cr).data(wr,qa);Rr.exit().remove(),Rr.enter().append("path").classed(Cr,1).classed("ticks",1).classed("crisp",Or.crisp!==!1).each(function(Nr){return a.stroke(v.select(this),Nr.minor?ut.minor.tickcolor:ut.tickcolor)}).style("stroke-width",function(Nr){return i.crispRound(xt,Nr.minor?ut.minor.tickwidth:ut.tickwidth,1)+"px"}).attr("d",Or.path).style("display",null),Ia(ut,[B]),Rr.attr("transform",Or.transFn)},V.drawGrid=function(xt,ut,Or){if(Or=Or||{},ut.tickmode!=="sync"){var Cr=ut._id+"grid",wr=ut.minor&&ut.minor.showgrid,Rr=wr?Or.vals.filter(function(Ai){return Ai.minor}):[],Nr=ut.showgrid?Or.vals.filter(function(Ai){return!Ai.minor}):[],Hr=Or.counterAxis;if(Hr&&V.shouldShowZeroLine(xt,ut,Hr))for(var gt=ut.tickmode==="array",Kt=0;Kt=0;ga--){var la=ga?va:Pa;if(la){var ba=la.selectAll("path."+Cr).data(ga?Nr:Rr,qa);ba.exit().remove(),ba.enter().append("path").classed(Cr,1).classed("crisp",Or.crisp!==!1),ba.attr("transform",Or.transFn).attr("d",Or.path).each(function(Ai){return a.stroke(v.select(this),Ai.minor?ut.minor.gridcolor:ut.gridcolor||"#ddd")}).style("stroke-dasharray",function(Ai){return i.dashStyle(Ai.minor?ut.minor.griddash:ut.griddash,Ai.minor?ut.minor.gridwidth:ut.gridwidth)}).style("stroke-width",function(Ai){return(Ai.minor?Ir:ut._gw)+"px"}).style("display",null),typeof Or.path=="function"&&ba.attr("d",Or.path)}}Ia(ut,[L,U])}},V.drawZeroLine=function(xt,ut,Or){Or=Or||Or;var Cr=ut._id+"zl",wr=V.shouldShowZeroLine(xt,ut,Or.counterAxis),Rr=Or.layer.selectAll("path."+Cr).data(wr?[{x:0,id:ut._id}]:[]);Rr.exit().remove(),Rr.enter().append("path").classed(Cr,1).classed("zl",1).classed("crisp",Or.crisp!==!1).each(function(){Or.layer.selectAll("path").sort(function(Nr,Hr){return j(Nr.id,Hr.id)})}),Rr.attr("transform",Or.transFn).attr("d",Or.path).call(a.stroke,ut.zerolinecolor||a.defaultLine).style("stroke-width",i.crispRound(xt,ut.zerolinewidth,ut._gw||1)+"px").style("display",null),Ia(ut,[O])},V.drawLabels=function(xt,ut,Or){Or=Or||{};var Cr=xt._fullLayout,wr=ut._id,Rr=ut.zerolinelayer==="above traces",Nr=Or.cls||wr+"tick",Hr=Or.vals.filter(function(Yn){return Yn.text}),gt=Or.labelFns,Kt=Or.secondary?0:ut.tickangle,mr=(ut._prevTickAngles||{})[Nr],Ir=Or.layer.selectAll("g."+Nr).data(ut.showticklabels?Hr:[],qa),va=[];Ir.enter().append("g").classed(Nr,1).append("text").attr("text-anchor","middle").each(function(Yn){var Gn=v.select(this),Hn=xt._promises.length;Gn.call(r.positionText,gt.xFn(Yn),gt.yFn(Yn)).call(i.font,{family:Yn.font,size:Yn.fontSize,color:Yn.fontColor,weight:Yn.fontWeight,style:Yn.fontStyle,variant:Yn.fontVariant,textcase:Yn.fontTextcase,lineposition:Yn.fontLineposition,shadow:Yn.fontShadow}).text(Yn.text).call(r.convertToTspans,xt),xt._promises[Hn]?va.push(xt._promises.pop().then(function(){Pa(Gn,Kt)})):Pa(Gn,Kt)}),Ia(ut,[W]),Ir.exit().remove(),Or.repositionOnUpdate&&Ir.each(function(Yn){v.select(this).select("text").call(r.positionText,gt.xFn(Yn),gt.yFn(Yn))});function Pa(Yn,Gn){Yn.each(function(Hn){var ss=v.select(this),_s=ss.select(".text-math-group"),ps=gt.anchorFn(Hn,Gn),Ko=Or.transFn.call(ss.node(),Hn)+(_(Gn)&&+Gn!=0?" rotate("+Gn+","+gt.xFn(Hn)+","+(gt.yFn(Hn)-Hn.fontSize/2)+")":""),Gi=r.lineCount(ss),Pn=Y*Hn.fontSize,qs=gt.heightFn(Hn,_(Gn)?+Gn:0,(Gi-1)*Pn);if(qs&&(Ko+=t(0,qs)),_s.empty()){var bs=ss.select("text");bs.attr({transform:Ko,"text-anchor":ps}),bs.style("display",null),ut._adjustTickLabelsOverflow&&ut._adjustTickLabelsOverflow()}else{var lo=i.bBox(_s.node()).width,Zo=lo*{end:-.5,start:.5}[ps];_s.attr("transform",Ko+t(Zo,0))}})}ut._adjustTickLabelsOverflow=function(){var Yn=ut.ticklabeloverflow;if(!(!Yn||Yn==="allow")){var Gn=Yn.indexOf("hide")!==-1,Hn=ut._id.charAt(0)==="x",ss=0,_s=Hn?xt._fullLayout.width:xt._fullLayout.height;if(Yn.indexOf("domain")!==-1){var ps=e.simpleMap(ut.range,ut.r2l);ss=ut.l2p(ps[0])+ut._offset,_s=ut.l2p(ps[1])+ut._offset}var Ko=Math.min(ss,_s),Gi=Math.max(ss,_s),Pn=ut.side,qs=1/0,bs=-1/0;Ir.each(function(Hs){var il=v.select(this),yn=il.select(".text-math-group");if(yn.empty()){var Po=i.bBox(il.node()),To=0;Hn?(Po.right>Gi||Po.leftGi||Po.top+(ut.tickangle?0:Hs.fontSize/4)ut["_visibleLabelMin_"+ps._id]?il.style("display","none"):Gi.K==="tick"&&!Ko&&il.node().style.display!=="none"&&il.style("display",null)})})})})},Pa(Ir,mr+1?mr:Kt);function ga(){return va.length&&Promise.all(va)}var la=null;function ba(){if(Pa(Ir,Kt),Hr.length&&ut.autotickangles&&(ut.type!=="log"||String(ut.dtick).charAt(0)!=="D")){la=ut.autotickangles[0];var Yn=0,Gn=[],Hn,ss=1;Ir.each(function(Jo){Yn=Math.max(Yn,Jo.fontSize);var Es=ut.l2p(Jo.x),Ul=Zt(this),lu=i.bBox(Ul.node());ss=Math.max(ss,r.lineCount(Ul)),Gn.push({top:0,bottom:10,height:10,left:Es-lu.width/2,right:Es+lu.width/2+2,width:lu.width+2})});var _s=(ut.tickson==="boundaries"||ut.showdividers)&&!Or.secondary,ps=Hr.length,Ko=Math.abs((Hr[ps-1].x-Hr[0].x)*ut._m)/(ps-1),Gi=_s?Ko/2:Ko,Pn=_s?ut.ticklen:Yn*1.25*ss,qs=Math.sqrt(Math.pow(Gi,2)+Math.pow(Pn,2)),bs=Gi/qs,lo=ut.autotickangles.map(function(Jo){return Jo*Math.PI/180}),Zo=lo.find(function(Jo){return Math.abs(Math.cos(Jo))<=bs});Zo===void 0&&(Zo=lo.reduce(function(Jo,Es){return Math.abs(Math.cos(Jo))os*go&&(Cn=go,Co[ao]=bo[ao]=wo[ao])}var ys=Math.abs(Cn-zs);ys-Tn>0?(ys-=Tn,Tn*=1+Tn/ys):Tn=0,ut._id.charAt(0)!=="y"&&(Tn=-Tn),Co[kn]=Ki.p2r(Ki.r2p(bo[kn])+On*Tn),Ki.autorange==="min"||Ki.autorange==="max reversed"?(Co[0]=null,Ki._rangeInitial0=void 0,Ki._rangeInitial1=void 0):(Ki.autorange==="max"||Ki.autorange==="min reversed")&&(Co[1]=null,Ki._rangeInitial0=void 0,Ki._rangeInitial1=void 0),Cr._insideTickLabelsUpdaterange[Ki._name+".range"]=Co}var jo=e.syncOrAsync(Ai);return jo&&jo.then&&xt._promises.push(jo),jo};function Wa(xt,ut,Or){var Cr=ut._id+"divider",wr=Or.vals,Rr=Or.layer.selectAll("path."+Cr).data(wr,qa);Rr.exit().remove(),Rr.enter().insert("path",":first-child").classed(Cr,1).classed("crisp",1).call(a.stroke,ut.dividercolor).style("stroke-width",i.crispRound(xt,ut.dividerwidth,1)+"px"),Rr.attr("transform",Or.transFn).attr("d",Or.path)}V.getPxPosition=function(xt,ut){var Or=xt._fullLayout._size,Cr=ut._id.charAt(0),wr=ut.side,Rr;if(ut.anchor!=="free"?Rr=ut._anchorAxis:Cr==="x"?Rr={_offset:Or.t+(1-(ut.position||0))*Or.h,_length:0}:Cr==="y"&&(Rr={_offset:Or.l+(ut.position||0)*Or.w+ut._shift,_length:0}),wr==="top"||wr==="left")return Rr._offset;if(wr==="bottom"||wr==="right")return Rr._offset+Rr._length};function Ca(xt){var ut=xt.title.font.size,Or=(xt.title.text.match(r.BR_TAG_ALL)||[]).length;return xt.title.hasOwnProperty("standoff")?ut*(de+Or*Y):Or?ut*(Or+1)*Y:ut}function hi(xt,ut){var Or=xt._fullLayout,Cr=ut._id,wr=Cr.charAt(0),Rr=ut.title.font.size,Nr,Hr=(ut.title.text.match(r.BR_TAG_ALL)||[]).length;if(ut.title.hasOwnProperty("standoff"))ut.side==="bottom"||ut.side==="right"?Nr=ut._depth+ut.title.standoff+Rr*de:(ut.side==="top"||ut.side==="left")&&(Nr=ut._depth+ut.title.standoff+Rr*(ce+Hr*Y));else{var gt=pi(ut);if(ut.type==="multicategory")Nr=ut._depth;else{var Kt=1.5*Rr;gt&&(Kt=.5*Rr,ut.ticks==="outside"&&(Kt+=ut.ticklen)),Nr=10+Kt+(ut.linewidth?ut.linewidth-1:0)}gt||(wr==="x"?Nr+=ut.side==="top"?Rr*(ut.showticklabels?1:0):Rr*(ut.showticklabels?1.5:.5):Nr+=ut.side==="right"?Rr*(ut.showticklabels?1:.5):Rr*(ut.showticklabels?.5:0))}var mr=V.getPxPosition(xt,ut),Ir,va,Pa;wr==="x"?(va=ut._offset+ut._length/2,Pa=ut.side==="top"?mr-Nr:mr+Nr):(Pa=ut._offset+ut._length/2,va=ut.side==="right"?mr+Nr:mr-Nr,Ir={rotate:"-90",offset:0});var ga;if(ut.type!=="multicategory"){var la=ut._selections[ut._id+"tick"];if(ga={selection:la,side:ut.side},la&&la.node()&&la.node().parentNode){var ba=i.getTranslate(la.node().parentNode);ga.offsetLeft=ba.x,ga.offsetTop=ba.y}ut.title.hasOwnProperty("standoff")&&(ga.pad=0)}return ut._titleStandoff=Nr,o.draw(xt,Cr+"title",{propContainer:ut,propName:ut._name+".title.text",placeholder:Or._dfltTitle[wr],avoid:ga,transform:Ir,attributes:{x:va,y:Pa,"text-anchor":"middle"}})}V.shouldShowZeroLine=function(xt,ut,Or){var Cr=e.simpleMap(ut.range,ut.r2l);return Cr[0]*Cr[1]<=0&&ut.zeroline&&(ut.type==="linear"||ut.type==="-")&&!(ut.rangebreaks&&ut.maskBreaks(0)===N)&&(wi(ut,0)||!Yt(xt,ut,Or,Cr)||Rt(xt,ut))},V.clipEnds=function(xt,ut){return ut.filter(function(Or){return wi(xt,Or.x)})};function wi(xt,ut){var Or=xt.l2p(ut);return Or>1&&Or1)for(wr=1;wr=wr.min&&xt=z:/%L/.test(ut)?xt>=P:/%[SX]/.test(ut)?xt>=D:/%M/.test(ut)?xt>=y:/%[HI]/.test(ut)?xt>=g:/%p/.test(ut)?xt>=u:/%[Aadejuwx]/.test(ut)?xt>=d:/%[UVW]/.test(ut)?xt>=b:/%[Bbm]/.test(ut)?xt>=p:/%[q]/.test(ut)?xt>=w:/%[Yy]/.test(ut)?xt>=T:!0}}}),f5=He({"src/plots/cartesian/autorange_options_defaults.js"(Z,q){"use strict";q.exports=function(_,S,M){var e,t;if(M){var r=S==="reversed"||S==="min reversed"||S==="max reversed";e=M[r?1:0],t=M[r?0:1]}var o=_("autorangeoptions.minallowed",t===null?e:void 0),a=_("autorangeoptions.maxallowed",e===null?t:void 0);o===void 0&&_("autorangeoptions.clipmin"),a===void 0&&_("autorangeoptions.clipmax"),_("autorangeoptions.include")}}}),h5=He({"src/plots/cartesian/range_defaults.js"(Z,q){"use strict";var v=f5();q.exports=function(S,M,e,t){var r=M._template||{},o=M.type||r.type||"-";e("minallowed"),e("maxallowed");var a=e("range");if(!a){var i;!t.noInsiderange&&o!=="log"&&(i=e("insiderange"),i&&(i[0]===null||i[1]===null)&&(M.insiderange=!1,i=void 0),i&&(a=e("range",i)))}var n=M.getAutorangeDflt(a,t),s=e("autorange",n),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 M.range,M.autorange=!0,h=!0),h||(n=M.getAutorangeDflt(a,t),s=e("autorange",n)),s&&(v(e,s,a),(o==="linear"||o==="-")&&e("rangemode")),M.cleanRange()}}}),uz=He({"node_modules/mouse-event-offset/index.js"(Z,q){var v={left:0,top:0};q.exports=_;function _(M,e,t){e=e||M.currentTarget||M.srcElement,Array.isArray(t)||(t=[0,0]);var r=M.clientX||0,o=M.clientY||0,a=S(e);return t[0]=r-a.left,t[1]=o-a.top,t}function S(M){return M===window||M===document||M===document.body?v:M.getBoundingClientRect()}}}),b2=He({"node_modules/has-passive-events/index.js"(Z,q){"use strict";var v=a5();function _(){var S=!1;try{var M=Object.defineProperty({},"passive",{get:function(){S=!0}});window.addEventListener("test",null,M),window.removeEventListener("test",null,M)}catch{S=!1}return S}q.exports=v&&_()}}),cz=He({"src/components/dragelement/align.js"(Z,q){"use strict";q.exports=function(_,S,M,e,t){var r=(_-M)/(e-M),o=r+S/(e-M),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,q){"use strict";var v=sa(),_=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];q.exports=function(M,e,t,r){return t==="left"?M=0:t==="center"?M=1:t==="right"?M=2:M=v.constrain(Math.floor(M*3),0,2),r==="bottom"?e=0:r==="middle"?e=1:r==="top"?e=2:e=v.constrain(Math.floor(e*3),0,2),_[e][M]}}}),hz=He({"src/components/dragelement/unhover.js"(Z,q){"use strict";var v=Qy(),_=y2(),S=T_().getGraphDiv,M=w_(),e=q.exports={};e.wrapped=function(t,r,o){t=S(t),t._fullLayout&&_.clear(t._fullLayout._uid+M.HOVERID),e.raw(t,r,o)},e.raw=function(r,o){var a=r._fullLayout,i=r._hoverdata;o||(o={}),!(o.target&&!r._dragged&&v.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&&i&&r.emit("plotly_unhover",{event:o,points:i}))}}}),Ap=He({"src/components/dragelement/index.js"(Z,q){"use strict";var v=uz(),_=i5(),S=b2(),M=sa().removeElement,e=lh(),t=q.exports={};t.align=cz(),t.getCursor=fz();var r=hz();t.unhover=r.wrapped,t.unhoverRaw=r.raw,t.init=function(n){var s=n.gd,h=1,f=s._context.doubleClickDelay,m=n.element,c,T,l,x,w,A,E,p;s._mouseDownTime||(s._mouseDownTime=0),m.style.pointerEvents="all",m.onmousedown=u,S?(m._ontouchstart&&m.removeEventListener("touchstart",m._ontouchstart),m._ontouchstart=u,m.addEventListener("touchstart",u,{passive:!1})):m.ontouchstart=u;function b(D,P,z){return Math.abs(D)"u"&&typeof D.clientY>"u"&&(D.clientX=c,D.clientY=T),l=new Date().getTime(),l-s._mouseDownTimef&&(h=Math.max(h-1,1)),s._dragged)n.doneFn&&n.doneFn();else{var P;A.target===E?P=A:(P={target:E,srcElement:E,toElement:E},Object.keys(A).concat(Object.keys(A.__proto__)).forEach(z=>{var F=A[z];!P[z]&&typeof F!="function"&&(P[z]=F)})),n.clickFn&&n.clickFn(h,P),p||E.dispatchEvent(new MouseEvent("click",D))}s._dragging=!1,s._dragged=!1}};function o(){var i=document.createElement("div");i.className="dragcover";var n=i.style;return n.position="fixed",n.left=0,n.right=0,n.top=0,n.bottom=0,n.zIndex=999999999,n.background="none",document.body.appendChild(i),i}t.coverSlip=o;function a(i){return v(i.changedTouches?i.changedTouches[0]:i,document.body)}}}),Kd=He({"src/lib/setcursor.js"(Z,q){"use strict";q.exports=function(_,S){(_.attr("class")||"").split(" ").forEach(function(M){M.indexOf("cursor-")===0&&_.classed(M,!1)}),S&&_.classed("cursor-"+S,!0)}}}),pz=He({"src/lib/override_cursor.js"(Z,q){"use strict";var v=Kd(),_="data-savedcursor",S="!!";q.exports=function(e,t){var r=e.attr(_);if(t){if(!r){for(var o=(e.attr("class")||"").split(" "),a=0;aX.legend.length)for(var le=X.legend.length;le(a==="legend"?1:0));if(z===!1&&(n[a]=void 0),!(z===!1&&!f.uirevision)&&(c("uirevision",n.uirevision),z!==!1)){c("borderwidth");var F=c("orientation"),N=c("yref"),O=c("xref"),L=F==="h",U=N==="paper",B=O==="paper",W,$,ue,ce="left";L?(W=0,v.getComponentMethod("rangeslider","isVisible")(i.xaxis)?U?($=1.1,ue="bottom"):($=1,ue="top"):U?($=-.1,ue="top"):($=0,ue="bottom")):($=1,ue="auto",B?W=1.02:(W=1,ce="right")),_.coerce(f,m,{x:{valType:"number",editType:"legend",min:B?-2:0,max:B?3:1,dflt:W}},"x"),_.coerce(f,m,{y:{valType:"number",editType:"legend",min:U?-2:0,max:U?3:1,dflt:$}},"y"),c("traceorder",d),r.isGrouped(n[a])&&c("tracegroupgap"),c("entrywidth"),c("entrywidthmode"),c("indentation"),c("itemsizing"),c("itemwidth"),c("itemclick"),c("itemdoubleclick"),c("groupclick"),c("xanchor",ce),c("yanchor",ue),c("maxheight"),c("valign"),_.noneOrAll(f,m,["x","y"]);var de=c("title.text");if(de){c("title.side",L?"left":"top");var Y=_.extendFlat({},T,{size:_.bigFont(T.size)});_.coerceFont(c,"title.font",Y);let X=h>1;c("titleclick",X?"toggle":!1),c("titledoubleclick",X?"toggleothers":!1)}}}q.exports=function(i,n,s){var h,f=s.slice(),m=n.shapes;if(m)for(h=0;htt.showlegend||tt.legendgroup);var T=m.concat(c),l=n.trace;l._isShape&&(l=l._fullInput);var x=l.legendgroup,w,A,E,p,b,d,u={},g=[],y=[],D=[];function P(tt,Ve){var he=g.indexOf(tt),se=u.visible;return se||(se=u.visible=[]),g.indexOf(tt)===-1&&(g.push(tt),he=g.length-1),se[he]=Ve,he}var z=(i.shapes||[]).map(function(tt){return tt._input}),F=!1;function N(tt,Ve){z[tt].visible=Ve,F=!0}function O(tt,Ve){if(!(n.groupTitle&&!h)){var he=tt._fullInput||tt,se=he._isShape,ne=he.index;ne===void 0&&(ne=he._index);var Ce=he.visible===!1?!1:Ve;se?N(ne,Ce):P(ne,Ce)}}var L=l.legend,U=l._fullInput,B=U&&U._isShape;if(!B&&q.traceIs(l,"pie-like")){var W=n.label,$=f.indexOf(W);if(a==="toggle")$===-1?f.push(W):f.splice($,1);else if(a==="toggleothers"){var ue=$!==-1,ce=[];for(w=0;wE.showlegend||E.legendgroup),h=i.concat(s);function f(E){return(E.legend||"legend")===n}var m,c;if(o==="toggle")m=!h.some(function(p){return f(p)&&p.visible===!0}),c=!1;else{let E=h.some(function(p){return!f(p)&&p.visible===!0&&p.showlegend!==!1});m=!0,c=!E}let T={visible:[]},l=[],x=(a.shapes||[]).map(function(E){return E._input});for(var w=!1,A=0;AN&&(z=N)}D[T][0]._groupMinRank=z,D[T][0]._preGroupSort=T}var O=function(ue,ce){return ue[0]._groupMinRank-ce[0]._groupMinRank||ue[0]._preGroupSort-ce[0]._preGroupSort},L=function(ue,ce){var de=v(ue.trace.legendrank)?ue.trace.legendrank[ue.i]:ue.trace.legendrank,Y=v(ce.trace.legendrank)?ce.trace.legendrank[ce.i]:ce.trace.legendrank;return de-Y||ue._preSort-ce._preSort};for(D.forEach(function(ue,ce){ue[0]._preGroupSort=ce}),D.sort(O),T=0;T0)le=X.width;else return 0;return d?V:Math.min(le,Q)};A.each(function(Y){var X=v.select(this),Q=S.ensureSingle(X,"g","layers");Q.style("opacity",Y[0].trace.opacity);var V=p.indentation,le=p.valign,ae=Y[0].lineHeight,j=Y[0].height;if(le==="middle"&&V===0||!ae||!j)Q.attr("transform",null);else{var ee={top:1,bottom:-1}[le],te=ee*(.5*(ae-j+3))||0,pe=p.indentation;Q.attr("transform",M(pe,te))}var we=Q.selectAll("g.legendfill").data([Y]);we.enter().append("g").classed("legendfill",!0);var Se=Q.selectAll("g.legendlines").data([Y]);Se.enter().append("g").classed("legendlines",!0);var Re=Q.selectAll("g.legendsymbols").data([Y]);Re.enter().append("g").classed("legendsymbols",!0),Re.selectAll("g.legendpoints").data([Y]).enter().append("g").classed("legendpoints",!0)}).each(de).each(F).each(O).each(N).each(U).each(ue).each($).each(P).each(z).each(B).each(W);function P(Y){var X=l(Y),Q=X.showFill,V=X.showLine,le=X.showGradientLine,ae=X.showGradientFill,j=X.anyFill,ee=X.anyLine,te=Y[0],pe=te.trace,we,Se,Re=r(pe),Pe=Re.colorscale,je=Re.reversescale,at=function(Ce){if(Ce.size())if(Q)e.fillGroupStyle(Ce,E,!0);else{var Ze="legendfill-"+pe.uid;e.gradient(Ce,E,Ze,T(je),Pe,"fill")}},nt=function(Ce){if(Ce.size()){var Ze="legendline-"+pe.uid;e.lineGroupStyle(Ce),e.gradient(Ce,E,Ze,T(je),Pe,"stroke")}},tt=o.hasMarkers(pe)||!j?"M5,0":ee?"M5,-2":"M5,-3",Ve=v.select(this),he=Ve.select(".legendfill").selectAll("path").data(Q||ae?[Y]:[]);if(he.enter().append("path").classed("js-fill",!0),he.exit().remove(),he.attr("d",tt+"h"+u+"v6h-"+u+"z").call(at),V||le){var se=D(void 0,pe.line,m,h);Se=S.minExtend(pe,{line:{width:se}}),we=[S.minExtend(te,{trace:Se})]}var ne=Ve.select(".legendlines").selectAll("path").data(V||le?[we]:[]);ne.enter().append("path").classed("js-line",!0),ne.exit().remove(),ne.attr("d",tt+(le?"l"+u+",0.0001":"h"+u)).call(V?e.lineGroupStyle:nt)}function z(Y){var X=l(Y),Q=X.anyFill,V=X.anyLine,le=X.showLine,ae=X.showMarker,j=Y[0],ee=j.trace,te=!ae&&!V&&!Q&&o.hasText(ee),pe,we;function Se(he,se,ne,Ce){var Ze=S.nestedProperty(ee,he).get(),rt=S.isArrayOrTypedArray(Ze)&&se?se(Ze):Ze;if(d&&rt&&Ce!==void 0&&(rt=Ce),ne){if(rtne[1])return ne[1]}return rt}function Re(he){return j._distinct&&j.index&&he[j.index]?he[j.index]:he[0]}if(ae||te||le){var Pe={},je={};if(ae){Pe.mc=Se("marker.color",Re),Pe.mx=Se("marker.symbol",Re),Pe.mo=Se("marker.opacity",S.mean,[.2,1]),Pe.mlc=Se("marker.line.color",Re),Pe.mlw=Se("marker.line.width",S.mean,[0,5],f),Pe.mld=ee._isShape?"solid":Se("marker.line.dash",Re),je.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var at=Se("marker.size",S.mean,[2,16],s);Pe.ms=at,je.marker.size=at}le&&(je.line={width:Se("line.width",Re,[0,10],h)}),te&&(Pe.tx="Aa",Pe.tp=Se("textposition",Re),Pe.ts=10,Pe.tc=Se("textfont.color",Re),Pe.tf=Se("textfont.family",Re),Pe.tw=Se("textfont.weight",Re),Pe.ty=Se("textfont.style",Re),Pe.tv=Se("textfont.variant",Re),Pe.tC=Se("textfont.textcase",Re),Pe.tE=Se("textfont.lineposition",Re),Pe.tS=Se("textfont.shadow",Re)),pe=[S.minExtend(j,Pe)],we=S.minExtend(ee,je),we.selectedpoints=null,we.texttemplate=null}var nt=v.select(this).select("g.legendpoints"),tt=nt.selectAll("path.scatterpts").data(ae?pe:[]);tt.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",y),tt.exit().remove(),tt.call(e.pointStyle,we,E),ae&&(pe[0].mrc=3);var Ve=nt.selectAll("g.pointtext").data(te?pe:[]);Ve.enter().append("g").classed("pointtext",!0).append("text").attr("transform",y),Ve.exit().remove(),Ve.selectAll("text").call(e.textPointStyle,we,E)}function F(Y){var X=Y[0].trace,Q=X.type==="waterfall";if(Y[0]._distinct&&Q){var V=Y[0].trace[Y[0].dir].marker;return Y[0].mc=V.color,Y[0].mlw=V.line.width,Y[0].mlc=V.line.color,L(Y,this,"waterfall")}var le=[];X.visible&&Q&&(le=Y[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=v.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(le);ae.enter().append("path").classed("legendwaterfall",!0).attr("transform",y).style("stroke-miterlimit",1),ae.exit().remove(),ae.each(function(j){var ee=v.select(this),te=X[j[0]].marker,pe=D(void 0,te.line,c,f);ee.attr("d",j[1]).style("stroke-width",pe+"px").call(t.fill,te.color),pe&&ee.call(t.stroke,te.line.color)})}function N(Y){L(Y,this)}function O(Y){L(Y,this,"funnel")}function L(Y,X,Q){var V=Y[0].trace,le=V.marker||{},ae=le.line||{},j=le.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",ee=Q?V.visible&&V.type===Q:_.traceIs(V,"bar"),te=v.select(X).select("g.legendpoints").selectAll("path.legend"+Q).data(ee?[Y]:[]);te.enter().append("path").classed("legend"+Q,!0).attr("d",j).attr("transform",y),te.exit().remove(),te.each(function(pe){var we=v.select(this),Se=pe[0],Re=D(Se.mlw,le.line,c,f);we.style("stroke-width",Re+"px");var Pe=Se.mcc;if(!p._inHover&&"mc"in Se){var je=r(le),at=je.mid;at===void 0&&(at=(je.max+je.min)/2),Pe=e.tryColorscale(le,"")(at)}var nt=Pe||Se.mc||le.color,tt=le.pattern,Ve=e.getPatternAttr,he=tt&&(Ve(tt.shape,0,"")||Ve(tt.path,0,""));if(he){var se=Ve(tt.bgcolor,0,null),ne=Ve(tt.fgcolor,0,null),Ce=tt.fgopacity,Ze=x(tt.size,8,10),rt=x(tt.solidity,.5,1),Je="legend-"+V.uid;we.call(e.pattern,"legend",E,Je,he,Ze,rt,Pe,tt.fillmode,se,ne,Ce)}else we.call(t.fill,nt);Re&&t.stroke(we,Se.mlc||ae.color)})}function U(Y){var X=Y[0].trace,Q=v.select(this).select("g.legendpoints").selectAll("path.legendbox").data(X.visible&&_.traceIs(X,"box-violin")?[Y]:[]);Q.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",y),Q.exit().remove(),Q.each(function(){var V=v.select(this);if((X.boxpoints==="all"||X.points==="all")&&t.opacity(X.fillcolor)===0&&t.opacity((X.line||{}).color)===0){var le=S.minExtend(X,{marker:{size:d?s:S.constrain(X.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});Q.call(e.pointStyle,le,E)}else{var ae=D(void 0,X.line,c,f);V.style("stroke-width",ae+"px").call(t.fill,X.fillcolor),ae&&t.stroke(V,X.line.color)}})}function B(Y){var X=Y[0].trace,Q=v.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(X.visible&&X.type==="candlestick"?[Y,Y]:[]);Q.enter().append("path").classed("legendcandle",!0).attr("d",function(V,le){return le?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",y).style("stroke-miterlimit",1),Q.exit().remove(),Q.each(function(V,le){var ae=v.select(this),j=X[le?"increasing":"decreasing"],ee=D(void 0,j.line,c,f);ae.style("stroke-width",ee+"px").call(t.fill,j.fillcolor),ee&&t.stroke(ae,j.line.color)})}function W(Y){var X=Y[0].trace,Q=v.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(X.visible&&X.type==="ohlc"?[Y,Y]:[]);Q.enter().append("path").classed("legendohlc",!0).attr("d",function(V,le){return le?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",y).style("stroke-miterlimit",1),Q.exit().remove(),Q.each(function(V,le){var ae=v.select(this),j=X[le?"increasing":"decreasing"],ee=D(void 0,j.line,c,f);ae.style("fill","none").call(e.dashLine,j.line.dash,ee),ee&&t.stroke(ae,j.line.color)})}function $(Y){ce(Y,this,"pie")}function ue(Y){ce(Y,this,"funnelarea")}function ce(Y,X,Q){var V=Y[0],le=V.trace,ae=Q?le.visible&&le.type===Q:_.traceIs(le,Q),j=v.select(X).select("g.legendpoints").selectAll("path.legend"+Q).data(ae?[Y]:[]);if(j.enter().append("path").classed("legend"+Q,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",y),j.exit().remove(),j.size()){var ee=le.marker||{},te=D(i(ee.line.width,V.pts),ee.line,c,f),pe="pieLike",we=S.minExtend(le,{marker:{line:{width:te}}},pe),Se=S.minExtend(V,{trace:we},pe);a(j,Se,we,E)}}function de(Y){var X=Y[0].trace,Q,V=[];if(X.visible)switch(X.type){case"histogram2d":case"heatmap":V=[["M-15,-2V4H15V-2Z"]],Q=!0;break;case"choropleth":case"choroplethmapbox":case"choroplethmap":V=[["M-6,-6V6H6V-6Z"]],Q=!0;break;case"densitymapbox":case"densitymap":V=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],Q="radial";break;case"cone":V=[["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"]],Q=!1;break;case"streamtube":V=[["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"]],Q=!1;break;case"surface":V=[["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"]],Q=!0;break;case"mesh3d":V=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],Q=!1;break;case"volume":V=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],Q=!0;break;case"isosurface":V=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],Q=!1;break}var le=v.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(V);le.enter().append("path").classed("legend3dandfriends",!0).attr("transform",y).style("stroke-miterlimit",1),le.exit().remove(),le.each(function(ae,j){var ee=v.select(this),te=r(X),pe=te.colorscale,we=te.reversescale,Se=function(at){if(at.size()){var nt="legendfill-"+X.uid;e.gradient(at,E,nt,T(we,Q==="radial"),pe,"fill")}},Re;if(pe){if(!Q){var je=pe.length;Re=j===0?pe[we?je-1:0][1]:j===1?pe[we?0:je-1][1]:pe[Math.floor((je-1)/2)][1]}}else{var Pe=X.vertexcolor||X.facecolor||X.color;Re=S.isArrayOrTypedArray(Pe)?Pe[j]||Pe[0]:Pe}ee.attr("d",ae[0]),Re?ee.call(t.fill,Re):ee.call(Se)})}};function T(w,A){var E=A?"radial":"horizontal";return E+(w?"":"reversed")}function l(w){var A=w[0].trace,E=A.contours,p=o.hasLines(A),b=o.hasMarkers(A),d=A.visible&&A.fill&&A.fill!=="none",u=!1,g=!1;if(E){var y=E.coloring;y==="lines"?u=!0:p=y==="none"||y==="heatmap"||E.showlines,E.type==="constraint"?d=E._operation!=="=":(y==="fill"||y==="heatmap")&&(g=!0)}return{showMarker:b,showLine:p,showFill:d,showGradientLine:u,showGradientFill:g,anyLine:p||u,anyFill:d||g}}function x(w,A,E){return w&&S.isArrayOrTypedArray(w)?A:w>E?E:w}}}),y5=He({"src/components/legend/draw.js"(Z,q){"use strict";var v=Vn(),_=sa(),S=bc(),M=so(),e=Qy(),t=Ap(),r=as(),o=$n(),a=su(),i=v5().handleItemClick,n=v5().handleTitleClick,s=m5(),h=uh(),f=h.LINE_SPACING,m=h.FROM_TL,c=h.FROM_BR,T=dz(),l=g5(),x=E_(),w=1,A=/^legend[0-9]*$/;q.exports=function(W,$){if($)p(W,$);else{var ue=W._fullLayout,ce=ue._legends,de=ue._infolayer.selectAll('[class^="legend"]');de.each(function(){var V=v.select(this),le=V.attr("class"),ae=le.split(" ")[0];ae.match(A)&&ce.indexOf(ae)===-1&&V.remove()});for(var Y=0;Y1)}var te=ue.hiddenlabels||[];if(!X&&(!ue.showlegend||!Q.length))return Y.selectAll("."+ce).remove(),ue._topdefs.select("#"+de).remove(),S.autoMargin(B,ce);var pe=_.ensureSingle(Y,"g",ce,function(Ve){X||Ve.attr("pointer-events","all")}),we=_.ensureSingleById(ue._topdefs,"clipPath",de,function(Ve){Ve.append("rect")}),Se=_.ensureSingle(pe,"rect","bg",function(Ve){Ve.attr("shape-rendering","crispEdges")});Se.call(o.stroke,$.bordercolor).call(o.fill,$.bgcolor).style("stroke-width",$.borderwidth+"px");var Re=_.ensureSingle(pe,"g","scrollbox"),Pe=$.title;$._titleWidth=0,$._titleHeight=0;var je;Pe.text?(je=_.ensureSingle(Re,"text",ce+"titletext"),je.attr("text-anchor","start").call(r.font,Pe.font).text(Pe.text),P(je,Re,B,$,w),!X&&($.titleclick||$.titledoubleclick)&&D(Re,B,$,ce)):(Re.selectAll("."+ce+"titletext").remove(),Re.selectAll("."+ce+"titletoggle").remove());var at=_.ensureSingle(pe,"rect","scrollbar",function(Ve){Ve.attr(s.scrollBarEnterAttrs).call(o.fill,s.scrollBarColor)}),nt=Re.selectAll("g.groups").data(Q);nt.enter().append("g").attr("class","groups"),nt.exit().remove();var tt=nt.selectAll("g.traces").data(_.identity);tt.enter().append("g").attr("class","traces"),tt.exit().remove(),tt.style("opacity",function(Ve){let he=Ve[0],se=he.trace;if(he.groupTitle){let ne=se.legendgroup,Ce=(ue.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 M.traceIs(se,"pie-like")?te.indexOf(Ve[0].label)!==-1?.5:1:se.visible==="legendonly"?.5:1}).each(function(){v.select(this).call(u,B,$)}).call(l,B,$).each(function(Ve){X||Ve[0].groupTitle&&$.groupclick==="toggleitem"||v.select(this).call(y,B,ce)}),_.syncOrAsync([S.previousPromises,function(){return N(B,nt,tt,$,Re)},function(){var Ve=ue._size,he=$.borderwidth,se=$.xref==="paper",ne=$.yref==="paper";if(Pe.text){let Ct=(ue.shapes||[]).filter(function(jt){return jt.showlegend}),Pt=B._fullData.concat(Ct).some(function(jt){let cr=jt.legend||"legend";var or=Array.isArray(cr)?cr.includes(ce):cr===ce;return or&&jt.visible===!0});je.style("opacity",Pt?1:.5)}if(!X){var Ce,Ze;se?Ce=Ve.l+Ve.w*$.x-m[L($)]*$._width:Ce=ue.width*$.x-m[L($)]*$._width,ne?Ze=Ve.t+Ve.h*(1-$.y)-m[U($)]*$._effHeight:Ze=ue.height*(1-$.y)-m[U($)]*$._effHeight;var rt=O(B,ce,Ce,Ze);if(rt)return;if(ue.margin.autoexpand){var Je=Ce,St=Ze;Ce=se?_.constrain(Ce,0,ue.width-$._width):Je,Ze=ne?_.constrain(Ze,0,ue.height-$._effHeight):St,Ce!==Je&&_.log("Constrain "+ce+".x to make legend fit inside graph"),Ze!==St&&_.log("Constrain "+ce+".y to make legend fit inside graph")}r.setTranslate(pe,Ce,Ze)}if(at.on(".drag",null),pe.on("wheel",null),X||$._height<=$._maxHeight||B._context.staticPlot){var kt=$._effHeight;X&&(kt=$._height),Se.attr({width:$._width-he,height:kt-he,x:he/2,y:he/2}),r.setTranslate(Re,0,0),we.select("rect").attr({width:$._width-2*he,height:kt-2*he,x:he,y:he}),r.setClipUrl(Re,de,B),r.setRect(at,0,0,0,0),delete $._scrollY}else{var Bt=Math.max(s.scrollBarMinHeight,$._effHeight*$._effHeight/$._height),Vt=$._effHeight-Bt-2*s.scrollBarMargin,Ar=$._height-$._effHeight,vr=Vt/Ar,qr=Math.min($._scrollY||0,Ar);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(Re,de,B),We(qr,Bt,vr),pe.on("wheel",function(){qr=_.constrain($._scrollY+v.event.deltaY/Ar*Vt,0,Ar),We(qr,Bt,vr),qr!==0&&qr!==Ar&&v.event.preventDefault()});var kr,Ur,_t,Fe=function(Ct,Pt,jt){var cr=(jt-Pt)/vr+Ct;return _.constrain(cr,0,Ar)},Ye=function(Ct,Pt,jt){var cr=(Pt-jt)/vr+Ct;return _.constrain(cr,0,Ar)},Ae=v.behavior.drag().on("dragstart",function(){var Ct=v.event.sourceEvent;Ct.type==="touchstart"?kr=Ct.changedTouches[0].clientY:kr=Ct.clientY,_t=qr}).on("drag",function(){var Ct=v.event.sourceEvent;Ct.buttons===2||Ct.ctrlKey||(Ct.type==="touchmove"?Ur=Ct.changedTouches[0].clientY:Ur=Ct.clientY,qr=Fe(_t,kr,Ur),We(qr,Bt,vr))});at.call(Ae);var Le=v.behavior.drag().on("dragstart",function(){var Ct=v.event.sourceEvent;Ct.type==="touchstart"&&(kr=Ct.changedTouches[0].clientY,_t=qr)}).on("drag",function(){var Ct=v.event.sourceEvent;Ct.type==="touchmove"&&(Ur=Ct.changedTouches[0].clientY,qr=Ye(_t,kr,Ur),We(qr,Bt,vr))});Re.call(Le)}function We(Ct,Pt,jt){$._scrollY=B._fullLayout[ce]._scrollY=Ct,r.setTranslate(Re,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 Ke,st,ot,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);ot=Pt.x,Ut=Pt.y}},moveFn:function(Ct,Pt){if(ot!==void 0&&Ut!==void 0){var jt=ot+Ct,cr=Ut+Pt;r.setTranslate(pe,jt,cr),Ke=t.align(jt,$._width,Ve.l,Ve.l+Ve.w,$.xanchor),st=t.align(cr+$._height,-$._height,Ve.t+Ve.h,Ve.t,$.yanchor)}},doneFn:function(){if(Ke!==void 0&&st!==void 0){var Ct={};Ct[ce+".x"]=Ke,Ct[ce+".y"]=st,M.call("_guiRelayout",B,Ct)}},clickFn:function(Ct,Pt){var jt=Y.selectAll("g.traces").filter(function(){var cr=this.getBoundingClientRect();return Pt.clientX>=cr.left&&Pt.clientX<=cr.right&&Pt.clientY>=cr.top&&Pt.clientY<=cr.bottom});jt.size()>0&&d(B,$,jt,Ct,Pt)}})}}],B)}}function b(B,W,$){var ue=B[0],ce=ue.width,de=W.entrywidthmode,Y=ue.trace.legendwidth||W.entrywidth;return de==="fraction"?W._maxWidth*Y:$+(Y||ce)}function d(B,W,$,ue,ce){var de=B._fullLayout,Y=$.data()[0][0].trace,X=W.itemclick,Q=W.itemdoubleclick,V={event:ce,node:$.node(),curveNumber:Y.index,expandedIndex:Y.index,data:B.data,layout:B.layout,frames:B._transitionData._frames,config:B._context,fullData:B._fullData,fullLayout:de};Y._group&&(V.group=Y._group),M.traceIs(Y,"pie-like")&&(V.label=$.datum()[0].label);var le=e.triggerHandler(B,"plotly_legendclick",V);if(ue===1){if(le===!1)return;W._clickTimeout=setTimeout(function(){B._fullLayout&&X&&i($,B,W,X)},B._context.doubleClickDelay)}else if(ue===2){W._clickTimeout&&clearTimeout(W._clickTimeout),B._legendMouseDownTime=0;var ae=e.triggerHandler(B,"plotly_legenddoubleclick",V);ae!==!1&&le!==!1&&Q&&i($,B,W,Q)}}function u(B,W,$){var ue=x.getId($),ce=B.data()[0][0],de=ce.trace,Y=M.traceIs(de,"pie-like"),X=!$._inHover&&W._context.edits.legendText&&!Y,Q=$._maxNameLength,V,le;ce.groupTitle?(V=ce.groupTitle.text,le=ce.groupTitle.font):(le=$.font,$.entries?V=ce.text:(V=Y?ce.label:de.name,de._meta&&(V=_.templateString(V,de._meta))));var ae=_.ensureSingle(B,"text",ue+"text");ae.attr("text-anchor","start").call(r.font,le).text(X?g(V,Q):V);var j=$.indentation+$.itemwidth+s.itemGap*2;a.positionText(ae,j,0),X?ae.call(a.makeEditable,{gd:W,text:V}).call(P,B,W,$).on("edit",function(ee){this.text(g(ee,Q)).call(P,B,W,$);var te=ce.trace._fullInput||{},pe={};return pe.name=ee,te._isShape?M.call("_guiRelayout",W,"shapes["+de.index+"].name",pe.name):M.call("_guiRestyle",W,pe,de.index)}):P(ae,B,W,$)}function g(B,W){var $=Math.max(4,W);if(B&&B.trim().length>=$/2)return B;B=B||"";for(var ue=$-B.length;ue>0;ue--)B+=" ";return B}function y(B,W,$){var ue=W._context.doubleClickDelay,ce,de=1,Y=_.ensureSingle(B,"rect",$+"toggle",function(X){W._context.staticPlot||X.style("cursor","pointer").attr("pointer-events","all"),X.call(o.fill,"rgba(0,0,0,0)")});W._context.staticPlot||(Y.on("mousedown",function(){ce=new Date().getTime(),ce-W._legendMouseDownTimeue&&(de=Math.max(de-1,1)),d(W,X,B,de,v.event)}}))}function D(B,W,$,ue){if(W._fullData.some(function(V){let le=V.legend||"legend";return(Array.isArray(le)?le.includes(ue):le===ue)&&M.traceIs(V,"pie-like")}))return;let de=W._context.doubleClickDelay;var Y,X=1;let Q=_.ensureSingle(B,"rect",ue+"titletoggle",function(V){W._context.staticPlot||V.style("cursor","pointer").attr("pointer-events","all"),V.call(o.fill,"rgba(0,0,0,0)")});W._context.staticPlot||(Q.on("mousedown",function(){Y=new Date().getTime(),Y-W._legendMouseDownTimede&&(X=Math.max(X-1,1));let V={event:v.event,legendId:ue,data:W.data,layout:W.layout,fullData:W._fullData,fullLayout:W._fullLayout};if(X===1&&$.titleclick){if(e.triggerHandler(W,"plotly_legendtitleclick",V)===!1)return;$._titleClickTimeout=setTimeout(function(){W._fullLayout&&n(W,$,$.titleclick)},de)}else X===2&&($._titleClickTimeout&&clearTimeout($._titleClickTimeout),W._legendMouseDownTime=0,e.triggerHandler(W,"plotly_legendtitledoubleclick",V)!==!1&&$.titledoubleclick&&n(W,$,$.titledoubleclick))}))}function P(B,W,$,ue,ce){ue._inHover&&B.attr("data-notex",!0),a.convertToTspans(B,$,function(){z(W,$,ue,ce)})}function z(B,W,$,ue){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 Y=B.select("g[class*=math-group]"),X=Y.node(),Q=x.getId($);$||($=W._fullLayout[Q]);var V=$.borderwidth,le;ue===w?le=$.title.font:ce.groupTitle?le=ce.groupTitle.font:le=$.font;var ae=le.size*f,j,ee;if(X){var te=r.bBox(X);j=te.height,ee=te.width,ue===w?r.setTranslate(Y,V,V+j*.75):r.setTranslate(Y,0,j*.25)}else{var pe="."+Q+(ue===w?"title":"")+"text",we=B.select(pe),Se=a.lineCount(we),Re=we.node();if(j=ae*Se,ee=Re?r.bBox(Re).width:0,ue===w)$.title.side==="left"&&(ee+=s.itemGap*2),a.positionText(we,V+s.titlePad,V+ae);else{var Pe=s.itemGap*2+$.indentation+$.itemwidth;ce.groupTitle&&(Pe=s.itemGap,ee-=$.indentation+$.itemwidth),a.positionText(we,Pe,-ae*((Se-1)/2-.3))}}ue===w?($._titleWidth=ee,$._titleHeight=j):(ce.lineHeight=ae,ce.height=Math.max(j,16)+3,ce.width=ee)}function F(B){var W=0,$=0,ue=B.title.side;return ue&&(ue.indexOf("left")!==-1&&(W=B._titleWidth),ue.indexOf("top")!==-1&&($=B._titleHeight)),[W,$]}function N(B,W,$,ue,ce){var de=B._fullLayout,Y=x.getId(ue);ue||(ue=de[Y]);var X=de._size,Q=x.isVertical(ue),V=x.isGrouped(ue),le=ue.entrywidthmode==="fraction",ae=ue.borderwidth,j=2*ae,ee=s.itemGap,te=ue.indentation+ue.itemwidth+ee*2,pe=2*(ae+ee),we=U(ue),Se=ue.y<0||ue.y===0&&we==="top",Re=ue.y>1||ue.y===1&&we==="bottom",Pe=ue.tracegroupgap,je={};let{orientation:at,yref:nt}=ue,{maxheight:tt}=ue,Ve=Se||Re||at!=="v"||nt!=="paper";tt||(tt=Ve?.5:1);let he=Ve?de.height:X.h;ue._maxHeight=Math.max(tt>1?tt:tt*he,30);var se=0;ue._width=0,ue._height=0;var ne=F(ue);if(Q)$.each(function(Ct){var Pt=Ct[0].height;r.setTranslate(this,ae+ne[0],ae+ne[1]+ue._height+Pt/2+ee),ue._height+=Pt,ue._width=Math.max(ue._width,Ct[0].width)}),se=te+ue._width,ue._width+=ee+te+j,ue._height+=pe,V&&(W.each(function(Ct,Pt){r.setTranslate(this,0,Pt*ue.tracegroupgap)}),ue._height+=(ue._lgroupsLength-1)*ue.tracegroupgap);else{var Ce=L(ue),Ze=ue.x<0||ue.x===0&&Ce==="right",rt=ue.x>1||ue.x===1&&Ce==="left",Je=Re||Se,St=de.width/2;ue._maxWidth=Math.max(Ze?Je&&Ce==="left"?X.l+X.w:St:rt?Je&&Ce==="right"?X.r+X.w:St:X.w,2*te);var kt=0,Bt=0;$.each(function(Ct){var Pt=b(Ct,ue,te);kt=Math.max(kt,Pt),Bt+=Pt}),se=null;var Vt=0;if(V){var Ar=0,vr=0,qr=0;W.each(function(){var Ct=0,Pt=0;v.select(this).selectAll("g.traces").each(function(cr){var or=b(cr,ue,te),nr=cr[0].height;r.setTranslate(this,ne[0],ne[1]+ae+ee+nr/2+Pt),Pt+=nr,Ct=Math.max(Ct,or),je[cr[0].trace.legendgroup]=Ct});var jt=Ct+ee;vr>0&&jt+ae+vr>ue._maxWidth?(Vt=Math.max(Vt,vr),vr=0,qr+=Ar+Pe,Ar=Pt):Ar=Math.max(Ar,Pt),r.setTranslate(this,vr,qr),vr+=jt}),ue._width=Math.max(Vt,vr)+ae,ue._height=qr+Ar+pe}else{var kr=$.size(),Ur=Bt+j+(kr-1)*ee=ue._maxWidth&&(Vt=Math.max(Vt,Ae),Fe=0,Ye+=_t,ue._height+=_t,_t=0),r.setTranslate(this,ne[0]+ae+Fe,ne[1]+ae+Ye+Pt/2+ee),Ae=Fe+jt+ee,Fe+=cr,_t=Math.max(_t,Pt)}),Ur?(ue._width=Fe+j,ue._height=_t+pe):(ue._width=Math.max(Vt,Ae)+j,ue._height+=_t+pe)}}ue._width=Math.ceil(Math.max(ue._width+ne[0],ue._titleWidth+2*(ae+s.titlePad))),ue._height=Math.ceil(Math.max(ue._height+ne[1],ue._titleHeight+2*(ae+s.itemGap))),ue._effHeight=Math.min(ue._height,ue._maxHeight);var Le=B._context.edits,We=Le.legendText||Le.legendPosition;$.each(function(Ct){var Pt=v.select(this).select("."+Y+"toggle"),jt=Ct[0].height,cr=Ct[0].trace.legendgroup,or=b(Ct,ue,te);V&&cr!==""&&(or=je[cr]);var nr=We?te:se||or;!Q&&!le&&(nr+=ee/2),r.setRect(Pt,0,-jt/2,nr,jt)});var Ke=ce.select("."+Y+"titletext");Ke.node()&&E(Ke,ue,ae);var st=ce.select("."+Y+"titletoggle");if(st.size()&&Ke.node()){var ot=Ke.attr("x")||0,Ut=s.titlePad;r.setRect(st,ot-Ut,ae,ue._titleWidth+2*Ut,ue._titleHeight+2*Ut)}}function O(B,W,$,ue){var ce=B._fullLayout,de=ce[W],Y=L(de),X=U(de),Q=de.xref==="paper",V=de.yref==="paper";B._fullLayout._reservedMargin[W]={};var le=de.y<.5?"b":"t",ae=de.x<.5?"l":"r",j={r:ce.width-$,l:$+de._width,b:ce.height-ue,t:ue+de._effHeight};if(Q&&V)return S.autoMargin(B,W,{x:de.x,y:de.y,l:de._width*m[Y],r:de._width*c[Y],b:de._effHeight*c[X],t:de._effHeight*m[X]});Q?B._fullLayout._reservedMargin[W][le]=j[le]:V||de.orientation==="v"?B._fullLayout._reservedMargin[W][ae]=j[ae]:B._fullLayout._reservedMargin[W][le]=j[le]}function L(B){return _.isRightAnchor(B)?"right":_.isCenterAnchor(B)?"center":"left"}function U(B){return _.isBottomAnchor(B)?"bottom":_.isMiddleAnchor(B)?"middle":"top"}}}),_5=He({"src/components/fx/hover.js"(Z){"use strict";var q=Vn(),v=ns(),_=Ch(),S=sa(),M=S.pushUnique,e=S.strTranslate,t=S.strRotate,r=Qy(),o=su(),a=pz(),i=as(),n=$n(),s=Ap(),h=Wo(),f=lh().zindexSeparator,m=so(),c=$p(),T=w_(),l=d5(),x=y5(),w=T.YANGLE,A=Math.PI*w/180,E=1/Math.sin(A),p=Math.cos(A),b=Math.sin(A),d=T.HOVERARROWSIZE,u=T.HOVERTEXTPAD,g={box:!0,ohlc:!0,violin:!0,candlestick:!0},y={scatter:!0,scattergl:!0,splom:!0};function D(j,ee){return j.distance-ee.distance}Z.hover=function(ee,te,pe,we){ee=S.getGraphDiv(ee);var Se=te.target;S.throttle(ee._fullLayout._uid+T.HOVERID,T.HOVERMINTIME,function(){P(ee,te,pe,we,Se)})},Z.loneHover=function(ee,te){var pe=!0;Array.isArray(ee)||(pe=!1,ee=[ee]);var we=te.gd,Se=V(we),Re=le(we),Pe=ee.map(function(Ce){var Ze=Ce._x0||Ce.x0||Ce.x||0,rt=Ce._x1||Ce.x1||Ce.x||0,Je=Ce._y0||Ce.y0||Ce.y||0,St=Ce._y1||Ce.y1||Ce.y||0,kt=Ce.eventData;if(kt){var Bt=Math.min(Ze,rt),Vt=Math.max(Ze,rt),Ar=Math.min(Je,St),vr=Math.max(Je,St),qr=Ce.trace;if(m.traceIs(qr,"gl3d")){var kr=we._fullLayout[qr.scene]._scene.container,Ur=kr.offsetLeft,_t=kr.offsetTop;Bt+=Ur,Vt+=Ur,Ar+=_t,vr+=_t}kt.bbox={x0:Bt+Re,x1:Vt+Re,y0:Ar+Se,y1:vr+Se},kt.xPixel=(Ze+rt)/2,kt.yPixel=(Je+St)/2,te.inOut_bbox&&te.inOut_bbox.push(kt.bbox)}else kt=!1;return{color:Ce.color||n.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}}),je=!1,at=N(Pe,{gd:we,hovermode:"closest",rotateLabels:je,bgColor:te.bgColor||n.background,container:q.select(te.container),outerContainer:te.outerContainer||te.container}),nt=at.hoverLabels,tt=5,Ve=0,he=0;nt.sort(function(Ce,Ze){return Ce.y0-Ze.y0}).each(function(Ce,Ze){var rt=Ce.y0-Ce.by/2;rt-ttVt[0]._length||Wa<0||Wa>Ar[0]._length)return s.unhoverRaw(j,ee)}if(ee.pointerX=qa+Vt[0]._offset,ee.pointerY=Wa+Ar[0]._offset,"xval"in ee?Ae=c.flat(Se,ee.xval):Ae=c.p2c(Vt,qa),"yval"in ee?Le=c.flat(Se,ee.yval):Le=c.p2c(Ar,Wa),!v(Ae[0])||!v(Le[0]))return S.warn("Fx.hover failed",ee,j),s.unhoverRaw(j,ee)}Pe.clickanywhere&&(j._hoverXVals=Ae,j._hoverYVals=Le,j._hoverXAxes=Vt,j._hoverYAxes=Ar);var wi=1/0;function Yt(Cn,wo){for(Ke=0;Kenr&&(Fe.splice(0,nr),wi=Fe[0].distance),tt&&_t!==0&&Fe.length===0){or.distance=_t,or.index=!1;var jo=ot._module.hoverPoints(or,jt,cr,"closest",{hoverLayer:Pe._hoverlayer});if(jo&&(jo=jo.filter(function(ps){return ps.spikeDistance<=_t})),jo&&jo.length){var Yn,Gn=jo.filter(function(ps){return ps.xa.showspikes&&ps.xa.spikesnap!=="hovered data"});if(Gn.length){var Hn=Gn[0];v(Hn.x0)&&v(Hn.y0)&&(Yn=Zt(Hn),(!Pr.vLinePoint||Pr.vLinePoint.spikeDistance>Yn.spikeDistance)&&(Pr.vLinePoint=Yn))}var ss=jo.filter(function(ps){return ps.ya.showspikes&&ps.ya.spikesnap!=="hovered data"});if(ss.length){var _s=ss[0];v(_s.x0)&&v(_s.y0)&&(Yn=Zt(_s),(!Pr.hLinePoint||Pr.hLinePoint.spikeDistance>Yn.spikeDistance)&&(Pr.hLinePoint=Yn))}}}}}Yt();function Rt(Cn,wo,Zn){for(var go=null,os=1/0,ys,jo=0;joCn.trace.index===tn.trace.index):Fe=[tn];var cn=Fe.length,xt=Q("x",tn,Pe),ut=Q("y",tn,Pe);Yt(xt,ut);var Or=[],Cr={},wr=0,Rr=function(Cn){var wo=g[Cn.trace.type]?z(Cn):Cn.trace.index;if(!Cr[wo])wr++,Cr[wo]=wr,Or.push(Cn);else{var Zn=Cr[wo]-1,go=Or[Zn];Zn>0&&Math.abs(Cn.distance)cn-1;Nr--)Rr(Fe[Nr]);Fe=Or,ra()}var Hr=j._hoverdata,gt=[],Kt=V(j),mr=le(j);for(let Cn of Fe){var Ir=c.makeEventData(Cn,Cn.trace,Cn.cd);if(Cn.hovertemplate!==!1){var va=!1;Cn.cd[Cn.index]&&Cn.cd[Cn.index].ht&&(va=Cn.cd[Cn.index].ht),Cn.hovertemplate=va||Cn.trace.hovertemplate||!1}if(Cn.xa&&Cn.ya){var Pa=Cn.x0+Cn.xa._offset,ga=Cn.x1+Cn.xa._offset,la=Cn.y0+Cn.ya._offset,ba=Cn.y1+Cn.ya._offset,Ai=Math.min(Pa,ga),ki=Math.max(Pa,ga),Ki=Math.min(la,ba),En=Math.max(la,ba);Ir.bbox={x0:Ai+mr,x1:ki+mr,y0:Ki+Kt,y1:En+Kt},Ir.xPixel=(Pa+ga)/2,Ir.yPixel=(la+ba)/2}Cn.eventData=[Ir],gt.push(Ir)}j._hoverdata=gt;var Tn=Ve==="y"&&(Ye.length>1||Fe.length>1)||Ve==="closest"&&_a&&Fe.length>1,On=n.combine(Pe.plot_bgcolor||n.background,Pe.paper_bgcolor),kn=N(Fe,{gd:j,hovermode:Ve,rotateLabels:Tn,bgColor:On,container:Pe._hoverlayer,outerContainer:Pe._paper.node(),commonLabelOpts:Pe.hoverlabel,hoverdistance:Pe.hoverdistance}),ao=kn.hoverLabels;if(c.isUnifiedHover(Ve)||(L(ao,Tn,Pe,kn.commonLabelBoundingBox),W(ao,Tn,Pe._invScaleX,Pe._invScaleY)),we&&we.tagName){var Co=m.getComponentMethod("annotations","hasClickToShow")(j,gt);a(q.select(we),Co?"pointer":"")}var bo=ce(j,ee,Hr);if(!we||pe||!bo&&!Pe.hoveranywhere)return;Hr&&bo&&j.emit("plotly_unhover",{event:ee,points:Hr}),zs(j._hoverdata);function zs(Cn){j.emit("plotly_hover",{event:ee,points:Cn,xaxes:Vt,yaxes:Ar,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,ee){var te=ee.gd,pe=te._fullLayout,we=ee.hovermode,Se=ee.rotateLabels,Re=ee.bgColor,Pe=ee.container,je=ee.outerContainer,at=ee.commonLabelOpts||{};if(j.length===0)return[[]];var nt=ee.fontFamily||T.HOVERFONT,tt=ee.fontSize||T.HOVERFONTSIZE,Ve=ee.fontWeight||pe.font.weight,he=ee.fontStyle||pe.font.style,se=ee.fontVariant||pe.font.variant,ne=ee.fontTextcase||pe.font.textcase,Ce=ee.fontLineposition||pe.font.lineposition,Ze=ee.fontShadow||pe.font.shadow,rt=j[0],Je=rt.xa,St=rt.ya,kt=we.charAt(0),Bt=kt+"Label",Vt=rt[Bt];if(Vt===void 0&&Je.type==="multicategory")for(var Ar=0;Arpe.width-gt&&(Kt=pe.width-gt),rn.attr("d","M"+(Rr-Kt)+",0L"+(Rr-Kt+d)+","+Hr+d+"H"+gt+"v"+Hr+(u*2+wr.height)+"H"+-gt+"V"+Hr+d+"H"+(Rr-Kt-d)+"Z"),Rr=Kt,Ke.minX=Rr-gt,Ke.maxX=Rr+gt,Je.side==="top"?(Ke.minY=Nr-(u*2+wr.height),Ke.maxY=Nr-u):(Ke.minY=Nr+u,Ke.maxY=Nr+(u*2+wr.height))}else{var mr,Ir,va;St.side==="right"?(mr="start",Ir=1,va="",Rr=Je._offset+Je._length):(mr="end",Ir=-1,va="-",Rr=Je._offset),Nr=St._offset+(rt.y0+rt.y1)/2,tn.attr("text-anchor",mr),rn.attr("d","M0,0L"+va+d+","+d+"V"+(u+wr.height/2)+"h"+va+(u*2+wr.width)+"V-"+(u+wr.height/2)+"H"+va+d+"V-"+d+"Z"),Ke.minY=Nr-(u+wr.height/2),Ke.maxY=Nr+(u+wr.height/2),St.side==="right"?(Ke.minX=Rr+d,Ke.maxX=Rr+d+(u*2+wr.width)):(Ke.minX=Rr-d-(u*2+wr.width),Ke.maxX=Rr-d);var Pa=wr.height/2,ga=qr-wr.top-Pa,la="clip"+pe._uid+"commonlabel"+St._id,ba;if(Rrrn.hoverinfo!=="none");if(Ia.length===0)return[];var st=pe.hoverlabel,ot=st.font,Ut=Ia[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}):Vt,jt={showlegend:!0,legend:{title:{text:Pt,font:ot},font:ot,bgcolor:st.bgcolor,bordercolor:st.bordercolor,borderwidth:1,tracegroupgap:7,traceorder:pe.legend?pe.legend.traceorder:void 0,orientation:"v"}},cr={font:ot};l(jt,cr,te._fullData);var or=cr.legend;or.entries=[];for(var nr=0;nr=0?Za=ra:ca+hi=0?Za=ca:Ba+hi=0?ri=Fr:ta+wi=0?ri=ta:$a+wi=0,(Ia.idealAlign==="top"||!Ki)&&En?(va-=ga/2,Ia.anchor="end"):Ki?(va+=ga/2,Ia.anchor="start"):Ia.anchor="middle",Ia.crossPos=va;else{if(Ia.pos=va,Ki=Ir+Pa/2+ki<=kr,En=Ir-Pa/2-ki>=0,(Ia.idealAlign==="left"||!Ki)&&En)Ir-=Pa/2,Ia.anchor="end";else if(Ki)Ir+=Pa/2,Ia.anchor="start";else{Ia.anchor="middle";var Tn=ki/2,On=Ir+Tn-kr,kn=Ir-Tn;On>0&&(Ir-=On),kn<0&&(Ir+=-kn)}Ia.crossPos=Ir}Nr.attr("text-anchor",Ia.anchor),gt&&Hr.attr("text-anchor",Ia.anchor),rn.attr("transform",e(Ir,va)+(Se?t(w):""))}),{hoverLabels:pi,commonLabelBoundingBox:Ke}}function O(j,ee,te,pe,we,Se){var Re,Pe,je="",at="";j.nameOverride!==void 0&&(j.name=j.nameOverride),j.name&&(j.trace._meta&&(j.name=S.templateString(j.name,j.trace._meta)),je=Y(j.name,j.nameLength));var nt=te.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)):ee&&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&&(je===""&&Se.remove(),at=je),(Pe=(Re=j.trace)==null?void 0:Re.hoverlabel)!=null&&Pe.split&&(j.hovertemplate="");let{hovertemplate:Ve=!1}=j;if(Ve){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:Ve}),at=at.replace(F,(se,ne)=>(je=Y(ne,j.nameLength),""))}return[at,je]}function L(j,ee,te,pe){var we=ee?"xa":"ya",Se=ee?"ya":"xa",Re=0,Pe=1,je=j.size(),at=new Array(je),nt=0,tt=pe.minX,Ve=pe.maxX,he=pe.minY,se=pe.maxY,ne=function(Ae){return Ae*te._invScaleX},Ce=function(Ae){return Ae*te._invScaleY};j.each(function(Ae){var Le=Ae[we],We=Ae[Se],Ke=Le._id.charAt(0)==="x",st=Le.range;nt===0&&st&&st[0]>st[1]!==Ke&&(Pe=-1);var ot=0,Ut=Ke?te.width:te.height;if(te.hovermode==="x"||te.hovermode==="y"){var Ct=U(Ae,ee),Pt=Ae.anchor,jt=Pt==="end"?-1:1,cr,or;if(Pt==="middle")cr=Ae.crossPos+(Ke?Ce(Ct.y-Ae.by/2):ne(Ae.bx/2+Ae.tx2width/2)),or=cr+(Ke?Ce(Ae.by):ne(Ae.bx));else if(Ke)cr=Ae.crossPos+Ce(d+Ct.y)-Ce(Ae.by/2-d),or=cr+Ce(Ae.by);else{var nr=ne(jt*d+Ct.x),Pr=nr+ne(jt*Ae.bx);cr=Ae.crossPos+Math.min(nr,Pr),or=Ae.crossPos+Math.max(nr,Pr)}Ke?he!==void 0&&se!==void 0&&Math.min(or,se)-Math.max(cr,he)>1&&(We.side==="left"?(ot=We._mainLinePosition,Ut=te.width):Ut=We._mainLinePosition):tt!==void 0&&Ve!==void 0&&Math.min(or,Ve)-Math.max(cr,tt)>1&&(We.side==="top"?(ot=We._mainLinePosition,Ut=te.height):Ut=We._mainLinePosition)}at[nt++]=[{datum:Ae,traceIndex:Ae.trace.index,dp:0,pos:Ae.pos,posref:Ae.posref,size:Ae.by*(Ke?E:1)/2,pmin:ot,pmax:Ut}]}),at.sort(function(Ae,Le){return Ae[0].posref-Le[0].posref||Pe*(Le[0].traceIndex-Ae[0].traceIndex)});var Ze,rt,Je,St,kt,Bt,Vt;function Ar(Ae){var Le=Ae[0],We=Ae[Ae.length-1];if(rt=Le.pmin-Le.pos-Le.dp+Le.size,Je=We.pos+We.dp+We.size-Le.pmax,rt>.01){for(kt=Ae.length-1;kt>=0;kt--)Ae[kt].dp+=rt;Ze=!1}if(!(Je<.01)){if(rt<-.01){for(kt=Ae.length-1;kt>=0;kt--)Ae[kt].dp-=Je;Ze=!1}if(Ze){var Ke=0;for(St=0;StLe.pmax&&Ke++;for(St=Ae.length-1;St>=0&&!(Ke<=0);St--)Bt=Ae[St],Bt.pos>Le.pmax-1&&(Bt.del=!0,Ke--);for(St=0;St=0;kt--)Ae[kt].dp-=Je;for(St=Ae.length-1;St>=0&&!(Ke<=0);St--)Bt=Ae[St],Bt.pos+Bt.dp+Bt.size>Le.pmax&&(Bt.del=!0,Ke--)}}}for(;!Ze&&Re<=je;){for(Re++,Ze=!0,St=0;St.01){for(kt=qr.length-1;kt>=0;kt--)qr[kt].dp+=rt;for(vr.push.apply(vr,qr),at.splice(St+1,1),Vt=0,kt=vr.length-1;kt>=0;kt--)Vt+=vr[kt].dp;for(Je=Vt/vr.length,kt=vr.length-1;kt>=0;kt--)vr[kt].dp-=Je;Ze=!1}else St++}at.forEach(Ar)}for(St=at.length-1;St>=0;St--){var _t=at[St];for(kt=_t.length-1;kt>=0;kt--){var Fe=_t[kt],Ye=Fe.datum;Ye.offset=Fe.dp,Ye.del=Fe.del}}}function U(j,ee){var te=0,pe=j.offset;return ee&&(pe*=-b,te=j.offset*p),{x:te,y:pe}}function B(j){var ee={start:1,end:-1,middle:0}[j.anchor],te=ee*(d+u),pe=te+ee*(j.txwidth+u),we=j.anchor==="middle";return we&&(te-=j.tx2width/2,pe+=j.txwidth/2+u),{alignShift:ee,textShiftX:te,text2ShiftX:pe}}function W(j,ee,te,pe){var we=function(Re){return Re*te},Se=function(Re){return Re*pe};j.each(function(Re){var Pe=q.select(this);if(Re.del)return Pe.remove();var je=Pe.select("text.nums"),at=Re.anchor,nt=at==="end"?-1:1,tt=B(Re),Ve=U(Re,ee),he=Ve.x,se=Ve.y,ne=at==="middle",Ce="hoverlabel"in Re.trace?Re.trace.hoverlabel.showarrow:!0,Ze;ne?Ze="M-"+we(Re.bx/2+Re.tx2width/2)+","+Se(se-Re.by/2)+"h"+we(Re.bx)+"v"+Se(Re.by)+"h-"+we(Re.bx)+"Z":Ce?Ze="M0,0L"+we(nt*d+he)+","+Se(d+se)+"v"+Se(Re.by/2-d)+"h"+we(nt*Re.bx)+"v-"+Se(Re.by)+"H"+we(nt*d+he)+"V"+Se(se-d)+"Z":Ze="M"+we(nt*d+he)+","+Se(se-Re.by/2)+"h"+we(nt*Re.bx)+"v"+Se(Re.by)+"h"+we(-nt*Re.bx)+"Z",Pe.select("path").attr("d",Ze);var rt=he+tt.textShiftX,Je=se+Re.ty0-Re.by/2+u,St=Re.textAlign||"auto";St!=="auto"&&(St==="left"&&at!=="start"?(je.attr("text-anchor","start"),rt=ne?-Re.bx/2-Re.tx2width/2+u:-Re.bx-u):St==="right"&&at!=="end"&&(je.attr("text-anchor","end"),rt=ne?Re.bx/2-Re.tx2width/2-u:Re.bx+u)),je.call(o.positionText,we(rt),Se(Je)),Re.tx2width&&(Pe.select("text.name").call(o.positionText,we(tt.text2ShiftX+tt.alignShift*u+he),Se(se+Re.ty0-Re.by/2+u)),Pe.select("rect").call(i.setRect,we(tt.text2ShiftX+(tt.alignShift-1)*Re.tx2width/2+he),Se(se-Re.by/2-1),we(Re.tx2width),Se(Re.by+2)))})}function $(j,ee){var te=j.index,pe=j.trace||{},we=j.cd[0],Se=j.cd[te]||{};function Re(Ve){return Ve||v(Ve)&&Ve===0}var Pe=Array.isArray(te)?function(Ve,he){var se=S.castOption(we,te,Ve);return Re(se)?se:S.extractOption({},pe,"",he)}:function(Ve,he){return S.extractOption(Se,pe,Ve,he)};function je(Ve,he,se){var ne=Pe(he,se);Re(ne)&&(j[Ve]=ne)}if(je("hoverinfo","hi","hoverinfo"),je("bgcolor","hbg","hoverlabel.bgcolor"),je("borderColor","hbc","hoverlabel.bordercolor"),je("fontFamily","htf","hoverlabel.font.family"),je("fontSize","hts","hoverlabel.font.size"),je("fontColor","htc","hoverlabel.font.color"),je("fontWeight","htw","hoverlabel.font.weight"),je("fontStyle","hty","hoverlabel.font.style"),je("fontVariant","htv","hoverlabel.font.variant"),je("nameLength","hnl","hoverlabel.namelength"),je("textAlign","hta","hoverlabel.align"),j.posref=ee==="y"||ee==="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,ee==="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,ee==="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 ue(j,ee,te){var pe=te.container,we=te.fullLayout,Se=we._size,Re=te.event,Pe=!!ee.hLinePoint,je=!!ee.vLinePoint,at,nt;if(pe.selectAll(".spikeline").remove(),!!(je||Pe)){var tt=n.combine(we.plot_bgcolor,we.paper_bgcolor);if(Pe){var Ve=ee.hLinePoint,he,se;at=Ve&&Ve.xa,nt=Ve&&Ve.ya;var ne=nt.spikesnap;ne==="cursor"?(he=Re.pointerX,se=Re.pointerY):(he=at._offset+Ve.x,se=nt._offset+Ve.y);var Ce=_.readability(Ve.color,tt)<1.5?n.contrast(tt):Ve.color,Ze=nt.spikemode,rt=nt.spikethickness,Je=nt.spikecolor||Ce,St=h.getPxPosition(j,nt),kt,Bt;if(Ze.indexOf("toaxis")!==-1||Ze.indexOf("across")!==-1){if(Ze.indexOf("toaxis")!==-1&&(kt=St,Bt=he),Ze.indexOf("across")!==-1){var Vt=nt._counterDomainMin,Ar=nt._counterDomainMax;nt.anchor==="free"&&(Vt=Math.min(Vt,nt.position),Ar=Math.max(Ar,nt.position)),kt=Se.l+Vt*Se.w,Bt=Se.l+Ar*Se.w}pe.insert("line",":first-child").attr({x1:kt,x2:Bt,y1:se,y2:se,"stroke-width":rt,stroke:Je,"stroke-dasharray":i.dashStyle(nt.spikedash,rt)}).classed("spikeline",!0).classed("crisp",!0),pe.insert("line",":first-child").attr({x1:kt,x2:Bt,y1:se,y2:se,"stroke-width":rt+2,stroke:tt}).classed("spikeline",!0).classed("crisp",!0)}Ze.indexOf("marker")!==-1&&pe.insert("circle",":first-child").attr({cx:St+(nt.side!=="right"?rt:-rt),cy:se,r:rt,fill:Je}).classed("spikeline",!0)}if(je){var vr=ee.vLinePoint,qr,kr;at=vr&&vr.xa,nt=vr&&vr.ya;var Ur=at.spikesnap;Ur==="cursor"?(qr=Re.pointerX,kr=Re.pointerY):(qr=at._offset+vr.x,kr=nt._offset+vr.y);var _t=_.readability(vr.color,tt)<1.5?n.contrast(tt):vr.color,Fe=at.spikemode,Ye=at.spikethickness,Ae=at.spikecolor||_t,Le=h.getPxPosition(j,at),We,Ke;if(Fe.indexOf("toaxis")!==-1||Fe.indexOf("across")!==-1){if(Fe.indexOf("toaxis")!==-1&&(We=Le,Ke=kr),Fe.indexOf("across")!==-1){var st=at._counterDomainMin,ot=at._counterDomainMax;at.anchor==="free"&&(st=Math.min(st,at.position),ot=Math.max(ot,at.position)),We=Se.t+(1-ot)*Se.h,Ke=Se.t+(1-st)*Se.h}pe.insert("line",":first-child").attr({x1:qr,x2:qr,y1:We,y2:Ke,"stroke-width":Ye,stroke:Ae,"stroke-dasharray":i.dashStyle(at.spikedash,Ye)}).classed("spikeline",!0).classed("crisp",!0),pe.insert("line",":first-child").attr({x1:qr,x2:qr,y1:We,y2:Ke,"stroke-width":Ye+2,stroke:tt}).classed("spikeline",!0).classed("crisp",!0)}Fe.indexOf("marker")!==-1&&pe.insert("circle",":first-child").attr({cx:qr,cy:Le-(at.side!=="top"?Ye:-Ye),r:Ye,fill:Ae}).classed("spikeline",!0)}}}function ce(j,ee,te){if(!te||te.length!==j._hoverdata.length)return!0;for(var pe=te.length-1;pe>=0;pe--){var we=te[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,ee){return!ee||ee.vLinePoint!==j._spikepoints.vLinePoint||ee.hLinePoint!==j._spikepoints.hLinePoint}function Y(j,ee){return o.plainText(j||"",{len:ee,allowedTags:["br","sub","sup","b","i","em","s","u"]})}function X(j,ee){for(var te=ee.charAt(0),pe=[],we=[],Se=[],Re=0;Rej.offsetTop+j.clientTop,le=j=>j.offsetLeft+j.clientLeft;function ae(j,ee){var te=j._fullLayout,pe=ee.getBoundingClientRect(),we=pe.left,Se=pe.top,Re=we+pe.width,Pe=Se+pe.height,je=S.apply3DTransform(te._invTransform)(we,Se),at=S.apply3DTransform(te._invTransform)(Re,Pe),nt=je[0],tt=je[1],Ve=at[0],he=at[1];return{x:nt,y:tt,width:Ve-nt,height:he-tt,top:Math.min(tt,he),left:Math.min(nt,Ve),right:Math.max(nt,Ve),bottom:Math.max(tt,he)}}}}),k_=He({"src/components/fx/hoverlabel_defaults.js"(Z,q){"use strict";var v=sa(),_=$n(),S=$p().isUnifiedHover;q.exports=function(e,t,r,o){o=o||{};var a=t.legend;function i(n){o.font[n]||(o.font[n]=a?t.legend.font[n]:t.font[n])}t&&S(t.hovermode)&&(o.font||(o.font={}),i("size"),i("family"),i("color"),i("weight"),i("style"),i("variant"),a?(o.bgcolor||(o.bgcolor=_.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),v.coerceFont(r,"hoverlabel.font",o.font),r("hoverlabel.align",o.align)}}}),mz=He({"src/components/fx/layout_global_defaults.js"(Z,q){"use strict";var v=sa(),_=k_(),S=Ym();q.exports=function(e,t){function r(o,a){return v.coerce(e,t,S,o,a)}_(e,t,r)}}}),gz=He({"src/components/fx/defaults.js"(Z,q){"use strict";var v=sa(),_=Ky(),S=k_();q.exports=function(e,t,r,o){function a(n,s){return v.coerce(e,t,_,n,s)}var i=v.extendFlat({},o.hoverlabel);t.hovertemplate&&(i.namelength=-1),S(e,t,a,i)}}}),x5=He({"src/components/fx/hovermode_defaults.js"(Z,q){"use strict";var v=sa(),_=Ym();q.exports=function(M,e){function t(r,o){return e[r]!==void 0?e[r]:v.coerce(M,e,_,r,o)}return t("clickmode"),t("hoversubplots"),t("hoveranywhere"),t("clickanywhere"),t("hovermode")}}}),yz=He({"src/components/fx/layout_defaults.js"(Z,q){"use strict";var v=sa(),_=Ym(),S=x5(),M=k_();q.exports=function(t,r){function o(m,c){return v.coerce(t,r,_,m,c)}var a=S(t,r);a&&(o("hoverdistance"),o("spikedistance"),a.indexOf("unified")!==-1&&o("hoversort"));var i=o("dragmode");i==="select"&&o("selectdirection");var n=r._has("mapbox"),s=r._has("map"),h=r._has("geo"),f=r._basePlotModules.length;r.dragmode==="zoom"&&((n||s||h)&&f===1||(n||s)&&h&&f===2)&&(r.dragmode="pan"),M(t,r,o),v.coerceFont(o,"hoverlabel.grouptitlefont",r.hoverlabel.font)}}}),_z=He({"src/components/fx/calc.js"(Z,q){"use strict";var v=sa(),_=so();q.exports=function(e){var t=e.calcdata,r=e._fullLayout;function o(h){return function(f){return v.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,q){"use strict";var v=32;q.exports={CIRCLE_SIDES:v,i000:0,i090:v/4,i180:v/2,i270:v/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,q){"use strict";var v=sa().strTranslate;function _(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 M(t){var r=t._id.charAt(0)==="y"?1:0;return function(o){return _(t,o[r])}}function e(t){return v(t.xaxis._offset,t.yaxis._offset)}q.exports={p2r:_,r2p:S,axValue:M,getTransform:e}}}),a0=He({"src/components/shapes/draw_newshape/helpers.js"(Z){"use strict";var q=M_(),v=T2(),_=v.CIRCLE_SIDES,S=v.SQRT2,M=A2(),e=M.p2r,t=M.r2p,r=[0,3,4,5,6,1,2],o=[0,3,4,1,2];Z.writePaths=function(n){var s=n.length;if(!s)return"M0,0Z";for(var h="",f=0;f0&&x{let s=n.charAt(0),h=a[s].drawn!==void 0;return i+(h?1:0)},0)},Z.getDataToPixel=function(e,t,r,o,a){var i=e._fullLayout._size,n;if(t)if(a==="domain")n=function(h){return t._length*(o?1-h:h)+t._offset};else{var s=Z.shapePositionToRange(t);n=function(h){var f=M(t,r);return t._offset+t.r2p(s(h,!0))+f},t.type==="date"&&(n=Z.decodeDate(n))}else o?n=function(h){return i.t+i.h*(1-h)}:n=function(h){return i.l+i.w*h};return n},Z.getPixelToData=function(e,t,r,o){var a=e._fullLayout._size,i;if(t)if(o==="domain")i=function(s){var h=(s-t._offset)/t._length;return r?1-h:h};else{var n=Z.rangeToShapePosition(t);i=function(s){return n(t.p2r(s-t._offset))}}else r?i=function(s){return 1-(s-a.t)/a.h}:i=function(s){return(s-a.l)/a.w};return i},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=_.getRefType(t.xref),a=_.getRefType(t.yref),i=e._fullLayout._size;var n,s,h,f,m,c,T,l,x,w,A,E;function p(z,F,N,O){var L;if(z)if(F==="domain")O?L=function(U){return z._offset+z._length*(1-U)}:L=function(U){return z._offset+z._length*U};else{let U=Z.shapePositionToRange(z);L=function(B){return z._offset+z.r2p(U(B,!0))},N==="path"&&z.type==="date"&&(L=Z.decodeDate(L))}else O?L=function(U){return i.t+i.h*(1-U)}:L=function(U){return i.l+i.w*U};return L}if(o==="array"?(T=[],n=t.xref.map(function(z){return _.getFromId(e,z)}),T=t.xref.map(function(z,F){return p(n[F],_.getRefType(z),r,!1)})):(n=_.getFromId(e,t.xref),T=p(n,o,r,!1)),a==="array"?(l=[],s=t.yref.map(function(z){return _.getFromId(e,z)}),l=t.yref.map(function(z,F){return p(s[F],_.getRefType(z),r,!0)})):(s=_.getFromId(e,t.yref),l=p(s,a,r,!0)),r==="path")return S(t,T,l);if(o==="array")h=M(n[0],t.x0shift),f=M(n[1],t.x1shift),x=T[0](t.x0)+h,w=T[1](t.x1)+f;else if(h=M(n,t.x0shift),f=M(n,t.x1shift),t.xsizemode==="pixel"){let z=T(t.xanchor);x=z+t.x0+h,w=z+t.x1+f}else x=T(t.x0)+h,w=T(t.x1)+f;if(a==="array")m=M(s[0],t.y0shift),c=M(s[1],t.y1shift),A=l[0](t.y0)+m,E=l[1](t.y1)+c;else if(m=M(s,t.y0shift),c=M(s,t.y1shift),t.ysizemode==="pixel"){let z=l(t.yanchor);A=z-t.y0+m,E=z-t.y1+c}else A=l(t.y0)+m,E=l(t.y1)+c;if(r==="line")return"M"+x+","+A+"L"+w+","+E;if(r==="rect")return"M"+x+","+A+"H"+w+"V"+E+"H"+x+"Z";var b=(x+w)/2,d=(A+E)/2,u=Math.abs(b-x),g=Math.abs(d-A),y="A"+u+","+g,D=b+u+","+d,P=b+","+(d-g);return"M"+D+y+" 0 1,1 "+P+y+" 0 0,1 "+D+"Z"};function S(e,t,r){let o=e.path,a=e.xsizemode,i=e.ysizemode,n=e.xanchor,s=e.yanchor,h=Array.isArray(e.xref),f=Array.isArray(e.yref);var m=0,c=0;return o.replace(q.segmentRE,function(T){var l=0,x=T.charAt(0),w=q.paramIsX[x],A=q.paramIsY[x],E=q.numParams[x];let p=w.drawn!==void 0,b=A.drawn!==void 0,d=h?t[m]:t,u=f?r[c]:r;var g=T.slice(1).replace(q.paramRE,function(y){return w[l]?a==="pixel"?y=d(n)+Number(y):y=d(y):A[l]&&(i==="pixel"?y=u(s)-Number(y):y=u(y)),l++,l>E&&(y="X"),y});return l>E&&(g=g.replace(/[\s,]*X.*/,""),v.log("Ignoring extra params in segment "+T)),p&&m++,b&&c++,x+g})}Z.getPixelShift=M;function M(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,q){"use strict";var v=sa(),_=Wo(),S=su(),M=as(),e=a0().readPaths,t=i0(),r=t.getPathString,o=v2(),a=uh().FROM_TL;q.exports=function(h,f,m,c){if(c.selectAll(".shape-label").remove(),!!(m.label.text||m.label.texttemplate)){var T;if(m.label.texttemplate){var l={};if(m.type!=="path"){var x=_.getFromId(h,m.xref),w=_.getFromId(h,m.yref);let j=Array.isArray(m.xref),ee=Array.isArray(m.yref);for(var A in o){var E=typeof o[A]=="function",p=!j||o.simpleXVariables.includes(A),b=!ee||o.simpleYVariables.includes(A);if(E&&p&&b){var d=o[A](m,x,w);d!==void 0&&(l[A]=d)}}}T=v.texttemplateStringForShapes({data:[l],fallback:m.label.texttemplatefallback,locale:h._fullLayout._d3locale,template:m.label.texttemplate})}else T=m.label.text;var u={"data-index":f},g=m.label.font,y={"data-notex":1},D=c.append("g").attr(u).classed("shape-label",!0),P=D.append("text").attr(y).classed("shape-label-text",!0).text(T),z,F,N,O;if(m.path){var L=r(h,m),U=e(L,h);z=1/0,N=1/0,F=-1/0,O=-1/0;for(var B=0;Bt.getDataToPixel(h,se,he,!1,ne)(Ve),tt=(Ve,he,se,ne)=>t.getDataToPixel(h,se,he,!0,ne)(Ve);if(m.xsizemode==="pixel"){let Ve=nt(m.xanchor,void 0,te,Re),he=t.getPixelShift(te,m.x0shift),se=t.getPixelShift(te,m.x1shift);z=Ve+m.x0+he,F=Ve+m.x1+se}else z=nt(m.x0,m.x0shift,te,Re),F=nt(m.x1,m.x1shift,pe,Pe);if(m.ysizemode==="pixel"){let Ve=tt(m.yanchor,void 0,we,je),he=t.getPixelShift(we,m.y0shift),se=t.getPixelShift(we,m.y1shift);N=Ve-m.y0+he,O=Ve-m.y1+se}else N=tt(m.y0,m.y0shift,we,je),O=tt(m.y1,m.y1shift,Se,at)}var Y=m.label.textangle;Y==="auto"&&(m.type==="line"?Y=i(z,N,F,O):Y=0),P.call(function(j){return j.call(M.font,g).attr({}),S.convertToTspans(j,h),j});var X=M.bBox(P.node()),Q=n(z,N,F,O,m,Y,X),V=Q.textx,le=Q.texty,ae=Q.xanchor;P.attr({"text-anchor":{left:"start",center:"middle",right:"end"}[ae],y:le,x:V,transform:"rotate("+Y+","+V+","+le+")"}).call(S.positionText,V,le)}};function i(s,h,f,m){var c,T;return T=Math.abs(f-s),f>=s?c=h-m:c=m-h,-180/Math.PI*Math.atan2(c,T)}function n(s,h,f,m,c,T,l){var x=c.label.textposition,w=c.label.textangle,A=c.label.padding,E=c.type,p=Math.PI/180*T,b=Math.sin(p),d=Math.cos(p),u=c.label.xanchor,g=c.label.yanchor,y,D,P,z;if(E==="line"){x==="start"?(y=s,D=h):x==="end"?(y=f,D=m):(y=(s+f)/2,D=(h+m)/2),u==="auto"&&(x==="start"?w==="auto"?f>s?u="left":fs?u="right":fs?u="right":fs?u="left":f1&&!(tt.length===2&&tt[1][0]==="Z")&&(Y===0&&(tt[0][0]="M"),y[de]=tt,N(),O())}}function pe(tt,Ve){if(tt===2){de=+Ve.srcElement.getAttribute("data-i"),Y=+Ve.srcElement.getAttribute("data-j");var he=y[de];!T(he)&&!l(he)&&te()}}function we(tt){ue=[];for(var Ve=0;Ve{if(!P._dragging&&P._fullLayout.hoveranywhere){let U=O(L);U&&h.hover(P,U,F.id)}}),N.addEventListener("click",L=>{if(!P._dragged&&P._fullLayout.clickanywhere){let U=O(L);U&&h.click(P,U,F.id)}})}function p(P,z,F){let N=F.xref,O=F.yref;if(Array.isArray(N)||Array.isArray(O)){let L="clip"+z._fullLayout._uid+"shape"+F._index,U=b(z,N,O);S.ensureSingleById(z._fullLayout._clips,"clipPath",L,function(B){B.append("rect")}).select("rect").attr(U),i.setClipUrl(P,L,z)}else{let L=(N+O).replace(/paper/g,"").replace(/[xyz][0-9]* *domain/g,"");i.setClipUrl(P,L?"clip"+z._fullLayout._uid+L:null,z)}}function b(P,z,F){let N=P._fullLayout._size;function O(B,W){let $=(Array.isArray(B)?B:[B]).map(de=>M.getFromId(P,de)).filter(Boolean);if(!$.length)return W?[N.t,N.t+N.h]:[N.l,N.l+N.w];let ue=$.map(function(de){return de._offset}),ce=$.map(function(de){return de._offset+de._length});return[Math.min(...ue),Math.max(...ce)]}let L=O(z,!1),U=O(F,!0);return{x:L[0],y:U[0],width:L[1]-L[0],height:U[1]-U[0]}}function d(P,z,F,N,O,L){var U=10,B=10,W=F.xsizemode==="pixel",$=F.ysizemode==="pixel",ue=F.type==="line",ce=F.type==="path",de=L.modifyItem,Y,X,Q,V,le,ae,j,ee,te,pe,we,Se,Re,Pe,je,at=v.select(z.node().parentNode),nt=M.getFromId(P,F.xref),tt=M.getRefType(F.xref),Ve=M.getFromId(P,F.yref),he=M.getRefType(F.yref),se=F.x0shift,ne=F.x1shift,Ce=F.y0shift,Ze=F.y1shift,rt=function(st,ot){var Ut=c.getDataToPixel(P,nt,ot,!1,tt);return Ut(st)},Je=function(st,ot){var Ut=c.getDataToPixel(P,Ve,ot,!0,he);return Ut(st)},St=c.getPixelToData(P,nt,!1,tt),kt=c.getPixelToData(P,Ve,!0,he),Bt=vr(),Vt={element:Bt.node(),gd:P,prepFn:Ur,doneFn:_t,clickFn:Fe},Ar;s.init(Vt),Bt.node().onmousemove=kr;function vr(){return ue?qr():z}function qr(){var st=10,ot=Math.max(F.line.width,st),Ut=O.append("g").attr("data-index",N).attr("drag-helper",!0);Ut.append("path").attr("d",z.attr("d")).style({cursor:"move","stroke-width":ot,"stroke-opacity":"0"});var Ct={"fill-opacity":"0"},Pt=Math.max(ot/2,st);return Ut.append("circle").attr({"data-line-point":"start-point",cx:W?rt(F.xanchor)+F.x0:rt(F.x0,se),cy:$?Je(F.yanchor)-F.y0:Je(F.y0,Ce),r:Pt}).style(Ct).classed("cursor-grab",!0),Ut.append("circle").attr({"data-line-point":"end-point",cx:W?rt(F.xanchor)+F.x1:rt(F.x1,ne),cy:$?Je(F.yanchor)-F.y1:Je(F.y1,Ze),r:Pt}).style(Ct).classed("cursor-grab",!0),Ut}function kr(st){if(x(P)){Ar=null;return}if(ue)st.target.tagName==="path"?Ar="move":Ar=st.target.attributes["data-line-point"].value==="start-point"?"resize-over-start-point":"resize-over-end-point";else{var ot=Vt.element.getBoundingClientRect(),Ut=ot.right-ot.left,Ct=ot.bottom-ot.top,Pt=st.clientX-ot.left,jt=st.clientY-ot.top,cr=!ce&&Ut>U&&Ct>B&&!st.shiftKey?s.getCursor(Pt/Ut,1-jt/Ct):"move";f(z,cr),Ar=cr.split("-")[0]}}function Ur(st){x(P)||(W&&(le=rt(F.xanchor)),$&&(ae=Je(F.yanchor)),F.type==="path"?je=F.path:(Y=W?F.x0:rt(F.x0),X=$?F.y0:Je(F.y0),Q=W?F.x1:rt(F.x1),V=$?F.y1:Je(F.y1)),YV?(j=X,we="y0",ee=V,Se="y1"):(j=V,we="y1",ee=X,Se="y0"),kr(st),Le(O,F),Ke(z,F,P),Vt.moveFn=Ar==="move"?Ye:Ae,Vt.altKey=st.altKey)}function _t(){x(P)||(f(z),We(O),p(z,P,F),_.call("_guiRelayout",P,L.getUpdateObj()))}function Fe(){x(P)||We(O)}function Ye(st,ot){if(F.type==="path"){var Ut=function(jt){return jt},Ct=Ut,Pt=Ut;W?de("xanchor",F.xanchor=St(le+st)):(Ct=function(cr){return St(rt(cr)+st)},nt&&nt.type==="date"&&(Ct=c.encodeDate(Ct))),$?de("yanchor",F.yanchor=kt(ae+ot)):(Pt=function(cr){return kt(Je(cr)+ot)},Ve&&Ve.type==="date"&&(Pt=c.encodeDate(Pt))),de("path",F.path=u(je,Ct,Pt))}else W?de("xanchor",F.xanchor=St(le+st)):(de("x0",F.x0=St(Y+st)),de("x1",F.x1=St(Q+st))),$?de("yanchor",F.yanchor=kt(ae+ot)):(de("y0",F.y0=kt(X+ot)),de("y1",F.y1=kt(V+ot)));z.attr("d",T(P,F)),Le(O,F),r(P,N,F,at)}function Ae(st,ot){if(ce){var Ut=function(Yt){return Yt},Ct=Ut,Pt=Ut;W?de("xanchor",F.xanchor=St(le+st)):(Ct=function(Rt){return St(rt(Rt)+st)},nt&&nt.type==="date"&&(Ct=c.encodeDate(Ct))),$?de("yanchor",F.yanchor=kt(ae+ot)):(Pt=function(Rt){return kt(Je(Rt)+ot)},Ve&&Ve.type==="date"&&(Pt=c.encodeDate(Pt))),de("path",F.path=u(je,Ct,Pt))}else if(ue){if(Ar==="resize-over-start-point"){var jt=Y+st,cr=$?X-ot:X+ot;de("x0",F.x0=W?jt:St(jt)),de("y0",F.y0=$?cr:kt(cr))}else if(Ar==="resize-over-end-point"){var or=Q+st,nr=$?V-ot:V+ot;de("x1",F.x1=W?or:St(or)),de("y1",F.y1=$?nr:kt(nr))}}else{var Pr=function(Yt){return Ar.indexOf(Yt)!==-1},_a=Pr("n"),Fa=Pr("s"),Ra=Pr("w"),qa=Pr("e"),Wa=_a?j+ot:j,Ca=Fa?ee+ot:ee,hi=Ra?te+st:te,wi=qa?pe+st:pe;$&&(_a&&(Wa=j-ot),Fa&&(Ca=ee-ot)),(!$&&Ca-Wa>B||$&&Wa-Ca>B)&&(de(we,F[we]=$?Wa:kt(Wa)),de(Se,F[Se]=$?Ca:kt(Ca))),wi-hi>U&&(de(Re,F[Re]=W?hi:St(hi)),de(Pe,F[Pe]=W?wi:St(wi)))}z.attr("d",T(P,F)),Le(O,F),r(P,N,F,at)}function Le(st,ot){(W||$)&&Ut();function Ut(){var Ct=ot.type!=="path",Pt=st.selectAll(".visual-cue").data([0]),jt=1;Pt.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":jt}).classed("visual-cue",!0);var cr=rt(W?ot.xanchor:S.midRange(Ct?[ot.x0,ot.x1]:c.extractPathCoords(ot.path,m.paramIsX))),or=Je($?ot.yanchor:S.midRange(Ct?[ot.y0,ot.y1]:c.extractPathCoords(ot.path,m.paramIsY)));if(cr=c.roundPositionForSharpStrokeRendering(cr,jt),or=c.roundPositionForSharpStrokeRendering(or,jt),W&&$){var nr="M"+(cr-1-jt)+","+(or-1-jt)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";Pt.attr("d",nr)}else if(W){var Pr="M"+(cr-1-jt)+","+(or-9-jt)+"v18 h2 v-18 Z";Pt.attr("d",Pr)}else{var _a="M"+(cr-9-jt)+","+(or-1-jt)+"h18 v2 h-18 Z";Pt.attr("d",_a)}}}function We(st){st.selectAll(".visual-cue").remove()}function Ke(st,ot,Ut){var Ct=ot.xref,Pt=ot.yref,jt=M.getFromId(Ut,Ct),cr=M.getFromId(Ut,Pt),or="";Ct!=="paper"&&!jt.autorange&&(or+=Ct),Pt!=="paper"&&!cr.autorange&&(or+=Pt),i.setClipUrl(st,or?"clip"+Ut._fullLayout._uid+or:null,Ut)}}function u(P,z,F){return P.replace(m.segmentRE,function(N){var O=0,L=N.charAt(0),U=m.paramIsX[L],B=m.paramIsY[L],W=m.numParams[L],$=N.slice(1).replace(m.paramRE,function(ue){return O>=W||(U[O]?ue=z(ue):B[O]&&(ue=F(ue)),O++),ue});return L+$})}function g(P,z){if(w(P)){var F=z.node(),N=+F.getAttribute("data-index");if(N>=0){if(N===P._fullLayout._activeShapeIndex){y(P);return}P._fullLayout._activeShapeIndex=N,P._fullLayout._deactivateShape=y,l(P)}}}function y(P){if(w(P)){var z=P._fullLayout._activeShapeIndex;z>=0&&(o(P),delete P._fullLayout._activeShapeIndex,l(P))}}function D(P){if(w(P)){o(P);var z=P._fullLayout._activeShapeIndex,F=(P.layout||{}).shapes||[];if(z1?(ce=["toggleHover"],de=["resetViews"]):u?(ue=["zoomInGeo","zoomOutGeo"],ce=["hoverClosestGeo"],de=["resetGeo"]):d?(ce=["hoverClosest3d"],de=["resetCameraDefault3d","resetCameraLastSave3d"]):P?(ue=["zoomInMapbox","zoomOutMapbox"],ce=["toggleHover"],de=["resetViewMapbox"]):z?(ue=["zoomInMap","zoomOutMap"],ce=["toggleHover"],de=["resetViewMap"]):g?ce=["hoverClosestPie"]:O?(ce=["hoverClosestCartesian","hoverCompareCartesian"],de=["resetViewSankey"]):ce=["toggleHover"],b&&ce.push("toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"),(s(T)||U)&&(ce=[]),b&&!L&&(ue=["zoomIn2d","zoomOut2d","autoScale2d"],de[0]!=="resetViews"&&(de=["resetScale2d"])),d?Y=["zoom3d","pan3d","orbitRotation","tableRotation"]:b&&!L||D?Y=["zoom2d","pan2d"]:P||z||u?Y=["pan2d"]:F&&(Y=["zoom2d"]),n(T)&&Y.push("select2d","lasso2d");var X=[],Q=function(j){X.indexOf(j)===-1&&ce.indexOf(j)!==-1&&X.push(j)};if(Array.isArray(E)){for(var V=[],le=0;lew?T.slice(w):l.slice(x))+A}function h(m,c){for(var T=c._size,l=T.h/T.w,x={},w=Object.keys(m),A=0;At*D&&!N)){for(w=0;wY&&tece&&(ce=te);var we=(ce-ue)/(2*de);u/=we,ue=p.l2r(ue),ce=p.l2r(ce),p.range=p._input.range=B=O[1]||W[1]<=O[0])&&$[0]L[0])return!0}return!1}function A(O){var L=O._fullLayout,U=L._size,B=U.p,W=i.list(O,"",!0),$,ue,ce,de,Y,X;if(L._paperdiv.style({width:O._context.responsive&&L.autosize&&!O._context._hasZeroWidth&&!O.layout.width?"100%":L.width+"px",height:O._context.responsive&&L.autosize&&!O._context._hasZeroHeight&&!O.layout.height?"100%":L.height+"px"}).selectAll(".main-svg").call(r.setSize,L.width,L.height),O._context.setBackground(O,L.paper_bgcolor),Z.drawMainTitle(O),a.manage(O),!L._has("cartesian"))return _.previousPromises(O);function Q(Ae,Le,We){var Ke=Ae._lw/2;if(Ae._id.charAt(0)==="x"){if(Le){if(We==="top")return Le._offset-B-Ke}else return U.t+U.h*(1-(Ae.position||0))+Ke%1;return Le._offset+Le._length+B+Ke}if(Le){if(We==="right")return Le._offset+Le._length+B+Ke}else return U.l+U.w*(Ae.position||0)+Ke%1;return Le._offset-B-Ke}for($=0;$0){y(O,$,Y,de),ce.attr({x:ue,y:$,"text-anchor":B,dy:z(L.yanchor)}).call(M.positionText,ue,$);var X=(L.text.match(M.BR_TAG_ALL)||[]).length;if(X){var Q=n.LINE_SPACING*X+n.MID_SHIFT;L.y===0&&(Q=-Q),ce.selectAll(".line").each(function(){var ee=+this.getAttribute("dy").slice(0,-2)-Q+"em";this.setAttribute("dy",ee)})}var V=q.select(O).selectAll(".gtitle-subtitle");if(V.node()){var le=ce.node().getBBox(),ae=le.y+le.height,j=ae+o.SUBTITLE_PADDING_EM*L.subtitle.font.size;V.attr({x:ue,y:j,"text-anchor":B,dy:z(L.yanchor)}).call(M.positionText,ue,j)}}}};function d(O,L,U,B,W){var $=L.yref==="paper"?O._fullLayout._size.h:O._fullLayout.height,ue=S.isTopAnchor(L)?B:B-W,ce=U==="b"?$-ue:ue;return S.isTopAnchor(L)&&U==="t"||S.isBottomAnchor(L)&&U==="b"?!1:ce.5?"t":"b",ue=O._fullLayout.margin[$],ce=0;return L.yref==="paper"?ce=U+L.pad.t+L.pad.b:L.yref==="container"&&(ce=u($,B,W,O._fullLayout.height,U)+L.pad.t+L.pad.b),ce>ue?ce:0}function y(O,L,U,B){var W="title.automargin",$=O._fullLayout.title,ue=$.y>.5?"t":"b",ce={x:$.x,y:$.y,t:0,b:0},de={};$.yref==="paper"&&d(O,$,ue,L,B)?ce[ue]=U:$.yref==="container"&&(de[ue]=U,O._fullLayout._reservedMargin[W]=de),_.allowAutoMargin(O,W),_.autoMargin(O,W,ce)}function D(O,L){var U=O.title,B=O._size,W=0;switch(L===c?W=U.pad.l:L===l&&(W=-U.pad.r),U.xref){case"paper":return B.l+B.w*U.x+W;case"container":default:return O.width*U.x+W}}function P(O,L){var U=O.title,B=O._size,W=0;if(L==="0em"||!L?W=-U.pad.b:L===n.CAP_SHIFT+"em"&&(W=U.pad.t),U.y==="auto")return B.t/2;switch(U.yref){case"paper":return B.t+B.h-B.h*U.y+W;case"container":default:return O.height-O.height*U.y+W}}function z(O){return O==="top"?n.CAP_SHIFT+.3+"em":O==="bottom"?"-0.3em":n.MID_SHIFT+"em"}function F(O){var L=O.title,U=T;return S.isRightAnchor(L)?U=l:S.isLeftAnchor(L)&&(U=c),U}function N(O){var L=O.title,U="0em";return S.isTopAnchor(L)?U=n.CAP_SHIFT+"em":S.isMiddleAnchor(L)&&(U=n.MID_SHIFT+"em"),U}Z.doTraceStyle=function(O){var L=O.calcdata,U=[],B;for(B=0;B=0;F--){var N=E.append("path").attr(b).style("opacity",F?.1:d).call(M.stroke,g).call(M.fill,u).call(e.dashLine,F?"solid":D,F?4+y:y);if(s(N,c,x),P){var O=t(c.layout,"selections",x);N.style({cursor:"move"});var L={element:N.node(),plotinfo:w,gd:c,editHelpers:O,isActiveSelection:!0},U=v(p,c);_(U,N,L)}else N.style("pointer-events",F?"all":"none");z[F]=N}var B=z[0],W=z[1];W.node().addEventListener("click",function(){return h(c,B)})}}function s(c,T,l){var x=l.xref+l.yref;e.setClipUrl(c,"clip"+T._fullLayout._uid+x,T)}function h(c,T){if(i(c)){var l=T.node(),x=+l.getAttribute("data-index");if(x>=0){if(x===c._fullLayout._activeSelectionIndex){m(c);return}c._fullLayout._activeSelectionIndex=x,c._fullLayout._deactivateSelection=m,a(c)}}}function f(c){if(i(c)){var T=c._fullLayout.selections.length-1;c._fullLayout._activeSelectionIndex=T,c._fullLayout._deactivateSelection=m,a(c)}}function m(c){if(i(c)){var T=c._fullLayout._activeSelectionIndex;T>=0&&(S(c),delete c._fullLayout._activeSelectionIndex,a(c))}}}}),Sz=He({"node_modules/polybooljs/lib/build-log.js"(Z,q){function v(){var _,S=0,M=!1;function e(t,r){return _.list.push({type:t,data:r?JSON.parse(JSON.stringify(r)):void 0}),_}return _={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===M?_:(M=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")}},_}q.exports=v}}),Mz=He({"node_modules/polybooljs/lib/epsilon.js"(Z,q){function v(_){typeof _!="number"&&(_=1e-10);var S={epsilon:function(M){return typeof M=="number"&&(_=M),_},pointAboveOrOnLine:function(M,e,t){var r=e[0],o=e[1],a=t[0],i=t[1],n=M[0],s=M[1];return(a-r)*(s-o)-(i-o)*(n-r)>=-_},pointBetween:function(M,e,t){var r=M[1]-e[1],o=t[0]-e[0],a=M[0]-e[0],i=t[1]-e[1],n=a*o+r*i;if(n<_)return!1;var s=o*o+i*i;return!(n-s>-_)},pointsSameX:function(M,e){return Math.abs(M[0]-e[0])<_},pointsSameY:function(M,e){return Math.abs(M[1]-e[1])<_},pointsSame:function(M,e){return S.pointsSameX(M,e)&&S.pointsSameY(M,e)},pointsCompare:function(M,e){return S.pointsSameX(M,e)?S.pointsSameY(M,e)?0:M[1]_!=a-r>_&&(o-s)*(r-h)/(a-h)+s-t>_&&(i=!i),o=s,a=h}return i}};return S}q.exports=v}}),Ez=He({"node_modules/polybooljs/lib/linked-list.js"(Z,q){var v={create:function(){var _={root:{root:!0,next:null},exists:function(S){return!(S===null||S===_.root)},isEmpty:function(){return _.root.next===null},getHead:function(){return _.root.next},insertBefore:function(S,M){for(var e=_.root,t=_.root.next;t!==null;){if(M(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 M=_.root,e=_.root.next;e!==null&&!S(e);)M=e,e=e.next;return{before:M===_.root?null:M,after:e,insert:function(t){return t.prev=M,t.next=e,M.next=t,e!==null&&(e.prev=t),t}}}};return _},node:function(_){return _.prev=null,_.next=null,_.remove=function(){_.prev.next=_.next,_.next&&(_.next.prev=_.prev),_.prev=null,_.next=null},_}};q.exports=v}}),kz=He({"node_modules/polybooljs/lib/intersecter.js"(Z,q){var v=Ez();function _(S,M,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,x){return{id:e?e.segmentId():-1,start:T,end:l,myFill:{above:x.myFill.above,below:x.myFill.below},otherFill:null}}var o=v.create();function a(T,l,x,w,A,E){var p=M.pointsCompare(l,A);return p!==0?p:M.pointsSame(x,E)?0:T!==w?T?1:-1:M.pointAboveOrOnLine(x,w?A:E,w?E:A)?1:-1}function i(T,l){o.insertBefore(T,function(x){var w=a(T.isStart,T.pt,l,x.isStart,x.pt,x.other.pt);return w<0})}function n(T,l){var x=v.node({isStart:!0,pt:T.start,seg:T,primary:l,other:null,status:null});return i(x,T.end),x}function s(T,l,x){var w=v.node({isStart:!1,pt:l.end,seg:l,primary:x,other:T,status:null});T.other=w,i(w,T.pt)}function h(T,l){var x=n(T,l);return s(x,T,l),x}function f(T,l){e&&e.segmentChop(T.seg,l),T.other.remove(),T.seg.end=l,T.other.pt=l,i(T.other,T.pt)}function m(T,l){var x=r(l,T.seg.end,T.seg);return f(T,l),h(x,T.primary)}function c(T,l){var x=v.create();function w(O,L){var U=O.seg.start,B=O.seg.end,W=L.seg.start,$=L.seg.end;return M.pointsCollinear(U,W,$)?M.pointsCollinear(B,W,$)||M.pointAboveOrOnLine(B,W,$)?1:-1:M.pointAboveOrOnLine(U,W,$)?1:-1}function A(O){return x.findTransition(function(L){var U=w(O,L.ev);return U>0})}function E(O,L){var U=O.seg,B=L.seg,W=U.start,$=U.end,ue=B.start,ce=B.end;e&&e.checkIntersection(U,B);var de=M.linesIntersect(W,$,ue,ce);if(de===!1){if(!M.pointsCollinear(W,$,ue)||M.pointsSame(W,ce)||M.pointsSame($,ue))return!1;var Y=M.pointsSame(W,ue),X=M.pointsSame($,ce);if(Y&&X)return L;var Q=!Y&&M.pointBetween(W,ue,ce),V=!X&&M.pointBetween($,ue,ce);if(Y)return V?m(L,$):m(O,ce),L;Q&&(X||(V?m(L,$):m(O,ce)),m(L,W))}else de.alongA===0&&(de.alongB===-1?m(O,ue):de.alongB===0?m(O,de.pt):de.alongB===1&&m(O,ce)),de.alongB===0&&(de.alongA===-1?m(L,W):de.alongA===0?m(L,de.pt):de.alongA===1&&m(L,$));return!1}for(var p=[];!o.isEmpty();){var b=o.getHead();if(e&&e.vert(b.pt[0]),b.isStart){let O=function(){if(g){var L=E(b,g);if(L)return L}return y?E(b,y):!1};var d=O;e&&e.segmentNew(b.seg,b.primary);var u=A(b),g=u.before?u.before.ev:null,y=u.after?u.after.ev:null;e&&e.tempStatus(b.seg,g?g.seg:!1,y?y.seg:!1);var D=O();if(D){if(S){var P;b.seg.myFill.below===null?P=!0:P=b.seg.myFill.above!==b.seg.myFill.below,P&&(D.seg.myFill.above=!D.seg.myFill.above)}else D.seg.otherFill=b.seg.myFill;e&&e.segmentUpdate(D.seg),b.other.remove(),b.remove()}if(o.getHead()!==b){e&&e.rewind(b.seg);continue}if(S){var P;b.seg.myFill.below===null?P=!0:P=b.seg.myFill.above!==b.seg.myFill.below,y?b.seg.myFill.below=y.seg.myFill.above:b.seg.myFill.below=T,P?b.seg.myFill.above=!b.seg.myFill.below:b.seg.myFill.above=b.seg.myFill.below}else if(b.seg.otherFill===null){var z;y?b.primary===y.primary?z=y.seg.otherFill.above:z=y.seg.myFill.above:z=b.primary?l:T,b.seg.otherFill={above:z,below:z}}e&&e.status(b.seg,g?g.seg:!1,y?y.seg:!1),b.other.status=u.insert(v.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(x.exists(F.prev)&&x.exists(F.next)&&E(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}p.push(b.seg)}o.getHead().remove()}return e&&e.done(),p}return S?{addRegion:function(T){for(var l,x=T[T.length-1],w=0;wr!=m>r&&t<(f-s)*(r-h)/(m-h)+s;c&&(o=!o)}return o}}}),I_=He({"src/lib/polygon.js"(Z,q){"use strict";var v=d2().dot,_=Gs().BADNUM,S=q.exports={};S.tester=function(e){var t=e.slice(),r=t[0][0],o=r,a=t[0][1],i=a,n;for((t[t.length-1][0]!==t[0][0]||t[t.length-1][1]!==t[0][1])&&t.push(t[0]),n=1;no||A===_||Ai||x&&h(l))}function m(l,x){var w=l[0],A=l[1];if(w===_||wo||A===_||Ai)return!1;var E=t.length,p=t[0][0],b=t[0][1],d=0,u,g,y,D,P;for(u=1;uMath.max(g,p)||A>Math.max(y,b)))if(An||Math.abs(v(m,h))>o)return!0;return!1},S.filter=function(e,t){var r=[e[0]],o=0,a=0;function i(s){e.push(s);var h=r.length,f=o;r.splice(a+1);for(var m=f+1;m1){var n=e.pop();i(n)}return{addPt:i,raw:e,filtered:r}}}}),Dz=He({"src/components/selections/constants.js"(Z,q){"use strict";q.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}}}),zz=He({"src/components/selections/select.js"(Z,q){"use strict";var v=Iz(),_=Rz(),S=so(),M=as().dashStyle,e=$n(),t=Hc(),r=$p().makeEventData,o=Jd(),a=o.freeMode,i=o.rectMode,n=o.drawMode,s=o.openMode,h=o.selectMode,f=i0(),m=L_(),c=M2(),T=Qm().clearOutline,l=a0(),x=l.handleEllipse,w=l.readPaths,A=S2().newShapes,E=b5(),p=k5().activateLastSelection,b=sa(),d=b.sorterAsc,u=I_(),g=y2(),y=tf().getFromId,D=C_(),P=P_().redrawReglTraces,z=Dz(),F=z.MINSELECT,N=u.filter,O=u.tester,L=A2(),U=L.p2r,B=L.axValue,W=L.getTransform;function $(Fe){return Fe.subplot!==void 0}function ue(Fe,Ye,Ae,Le,We){var Ke=!$(Le),st=a(We),ot=i(We),Ut=s(We),Ct=n(We),Pt=h(We),jt=We==="drawline",cr=We==="drawcircle",or=jt||cr,nr=Le.gd,Pr=nr._fullLayout,_a=Pt&&Pr.newselection.mode==="immediate"&&Ke,Fa=Pr._zoomlayer,Ra=Le.element.getBoundingClientRect(),qa=Le.plotinfo,Wa=W(qa),Ca=Ye-Ra.left,hi=Ae-Ra.top;Pr._calcInverseTransform(nr);var wi=b.apply3DTransform(Pr._invTransform)(Ca,hi);Ca=wi[0],hi=wi[1];var Yt=Pr._invScaleX,Rt=Pr._invScaleY,Zt=Ca,Jt=hi,Fr="M"+Ca+","+hi,ta=Le.xaxes[0],ra=Le.yaxes[0],ca=ta._length,Ba=ra._length,$a=Fe.altKey&&!(n(We)&&Ut),Za,ri,pi,Ia,rn,tn,cn;V(Fe,nr,Le),st&&(Za=N([[Ca,hi]],z.BENDPX));var xt=Fa.selectAll("path.select-outline-"+qa.id).data([1]),ut=Ct?Pr.newshape:Pr.newselection;Ct&&(Le.hasText=ut.label.text||ut.label.texttemplate);var Or=Ct&&!Ut?ut.fillcolor:"rgba(0,0,0,0)",Cr=ut.line.color||(Ke?e.contrast(nr._fullLayout.plot_bgcolor):"#7f7f7f");xt.enter().append("path").attr("class","select-outline select-outline-"+qa.id).style({opacity:Ct?ut.opacity/2:1,"stroke-dasharray":M(ut.line.dash,ut.line.width),"stroke-width":ut.line.width+"px","shape-rendering":"crispEdges"}).call(e.stroke,Cr).call(e.fill,Or).attr("fill-rule","evenodd").classed("cursor-move",!!Ct).attr("transform",Wa).attr("d",Fr+"Z");var wr=Fa.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=Fa.select(".label-temp");Rr.empty()&&(Rr=Fa.append("g").classed("label-temp",!0).classed("select-outline",!0).style({opacity:.8}))}var Nr=Pr._uid+z.SELECTID,Hr=[],gt=te(nr,Le.xaxes,Le.yaxes,Le.subplot);_a&&!Fe.shiftKey&&(Le._clearSubplotSelections=function(){if(Ke){var mr=ta._id,Ir=ra._id;rt(nr,mr,Ir,gt);for(var va=(nr.layout||{}).selections||[],Pa=[],ga=!1,la=0;la=0){nr._fullLayout._deactivateShape(nr);return}if(!Ct){var va=Pr.clickmode;g.done(Nr).then(function(){if(g.clear(Nr),mr===2){for(xt.remove(),rn=0;rn-1&&ce(Ir,nr,Le.xaxes,Le.yaxes,Le.subplot,Le,xt),va==="event"&&Ur(nr,void 0);t.click(nr,Ir,qa.id)}).catch(b.error)}},Le.doneFn=function(){wr.remove(),g.done(Nr).then(function(){g.clear(Nr),!_a&&Ia&&Le.selectionDefs&&(Ia.subtract=$a,Le.selectionDefs.push(Ia),Le.mergedPolygons.length=0,[].push.apply(Le.mergedPolygons,pi)),(_a||Ct)&&j(Le,_a),Le.doneFnCompleted&&Le.doneFnCompleted(Hr),Pt&&Ur(nr,cn)}).catch(b.error)}}function ce(Fe,Ye,Ae,Le,We,Ke,st){var ot=Ye._hoverdata,Ut=Ye._fullLayout,Ct=Ut.clickmode,Pt=Ct.indexOf("event")>-1,jt=[],cr,or,nr,Pr,_a,Fa,Ra,qa,Wa,Ca;if(we(ot)){V(Fe,Ye,Ke),cr=te(Ye,Ae,Le,We);var hi=Se(ot,cr),wi=hi.pointNumbers.length>0;if(wi?Pe(cr,hi):je(cr)&&(Ra=Re(hi))){for(st&&st.remove(),Ca=0;Ca=0}function ae(Fe){return Fe._fullLayout._activeSelectionIndex>=0}function j(Fe,Ye){var Ae=Fe.dragmode,Le=Fe.plotinfo,We=Fe.gd;le(We)&&We._fullLayout._deactivateShape(We),ae(We)&&We._fullLayout._deactivateSelection(We);var Ke=We._fullLayout,st=Ke._zoomlayer,ot=n(Ae),Ut=h(Ae);if(ot||Ut){var Ct=st.selectAll(".select-outline-"+Le.id);if(Ct&&We._fullLayout._outlining){var Pt;ot&&(Pt=A(Ct,Fe)),Pt&&S.call("_guiRelayout",We,{shapes:Pt});var jt;Ut&&!$(Fe)&&(jt=E(Ct,Fe)),jt&&(We._fullLayout._noEmitSelectedAtStart=!0,S.call("_guiRelayout",We,{selections:jt}).then(function(){Ye&&p(We)})),We._fullLayout._outlining=!1}}Le.selection={},Le.selection.selectionDefs=Fe.selectionDefs=[],Le.selection.mergedPolygons=Fe.mergedPolygons=[]}function ee(Fe){return Fe._id}function te(Fe,Ye,Ae,Le){if(!Fe.calcdata)return[];var We=[],Ke=Ye.map(ee),st=Ae.map(ee),ot,Ut,Ct;for(Ct=0;Ct0,Ke=We?Le[0]:Ae;return Ye.selectedpoints?Ye.selectedpoints.indexOf(Ke)>-1:!1}function Pe(Fe,Ye){var Ae=[],Le,We,Ke,st;for(st=0;st0&&Ae.push(Le);if(Ae.length===1&&(Ke=Ae[0]===Ye.searchInfo,Ke&&(We=Ye.searchInfo.cd[0].trace,We.selectedpoints.length===Ye.pointNumbers.length))){for(st=0;st1||(Ye+=Le.selectedpoints.length,Ye>1)))return!1;return Ye===1}function at(Fe,Ye,Ae){var Le;for(Le=0;Le-1&&Ye;if(!st&&Ye){var mr=St(Fe,!0);if(mr.length){var Ir=mr[0].xref,va=mr[0].yref;if(Ir&&va){var Pa=Vt(mr),ga=vr([y(Fe,Ir,"x"),y(Fe,va,"y")]);ga(Hr,Pa)}}Fe._fullLayout._noEmitSelectedAtStart?Fe._fullLayout._noEmitSelectedAtStart=!1:Kt&&Ur(Fe,Hr),cr._reselect=!1}if(!st&&cr._deselect){var la=cr._deselect;ot=la.xref,Ut=la.yref,Ze(ot,Ut,Pt)||rt(Fe,ot,Ut,Le),Kt&&(Hr.points.length?Ur(Fe,Hr):_t(Fe)),cr._deselect=!1}return{eventData:Hr,selectionTesters:Ae}}function Ce(Fe){var Ye=Fe.calcdata;if(Ye)for(var Ae=0;Ae=0){Or._fullLayout._deactivateShape(Or);return}var Cr=Or._fullLayout.clickmode;if(X(Or),xt===2&&!he&&ri(),Ve)Cr.indexOf("select")>-1&&d(ut,Or,rt,Je,we.id,Pt),Cr.indexOf("event")>-1&&n.click(Or,ut,we.id);else if(xt===1&&he){var wr=at?ne:se,Rr=at==="s"||nt==="w"?0:1,Nr=wr._name+".range["+Rr+"]",Hr=L(wr,Rr),gt="left",Kt="middle";if(wr.fixedrange)return;at?(Kt=at==="n"?"top":"bottom",wr.side==="right"&&(gt="right")):nt==="e"&&(gt="right"),Or._context.showAxisRangeEntryBoxes&&v.select(Ct).call(o.makeEditable,{gd:Or,immediate:!0,background:Or._fullLayout.paper_bgcolor,text:String(Hr),fill:wr.tickfont?wr.tickfont.color:"#444",horizontalAlign:gt,verticalAlign:Kt}).on("edit",function(mr){var Ir=wr.d2r(mr);Ir!==void 0&&t.call("_guiRelayout",Or,Nr,Ir)})}}f.init(Pt);var or,nr,Pr,_a,Fa,Ra,qa,Wa,Ca,hi;function wi(xt,ut,Or){var Cr=Ct.getBoundingClientRect();or=ut-Cr.left,nr=Or-Cr.top,pe._fullLayout._calcInverseTransform(pe);var wr=_.apply3DTransform(pe._fullLayout._invTransform)(or,nr);or=wr[0],nr=wr[1],Pr={l:or,r:or,w:0,t:nr,b:nr,h:0},_a=pe._hmpixcount?pe._hmlumcount/pe._hmpixcount:M(pe._fullLayout.plot_bgcolor).getLuminance(),Fa="M0,0H"+Bt+"V"+Vt+"H0V0",Ra=!1,qa="xy",hi=!1,Wa=ue(tt,_a,St,kt,Fa),Ca=ce(tt,St,kt)}function Yt(xt,ut){if(pe._transitioningWithDuration)return!1;var Or=Math.max(0,Math.min(Bt,Ke*xt+or)),Cr=Math.max(0,Math.min(Vt,st*ut+nr)),wr=Math.abs(Or-or),Rr=Math.abs(Cr-nr);Pr.l=Math.min(or,Or),Pr.r=Math.max(or,Or),Pr.t=Math.min(nr,Cr),Pr.b=Math.max(nr,Cr);function Nr(){qa="",Pr.r=Pr.l,Pr.t=Pr.b,Ca.attr("d","M0,0Z")}if(Ar.isSubplotConstrained)wr>D||Rr>D?(qa="xy",wr/Bt>Rr/Vt?(Rr=wr*Vt/Bt,nr>Cr?Pr.t=nr-Rr:Pr.b=nr+Rr):(wr=Rr*Bt/Vt,or>Or?Pr.l=or-wr:Pr.r=or+wr),Ca.attr("d",ae(Pr))):Nr();else if(vr.isSubplotConstrained)if(wr>D||Rr>D){qa="xy";var Hr=Math.min(Pr.l/Bt,(Vt-Pr.b)/Vt),gt=Math.max(Pr.r/Bt,(Vt-Pr.t)/Vt);Pr.l=Hr*Bt,Pr.r=gt*Bt,Pr.b=(1-Hr)*Vt,Pr.t=(1-gt)*Vt,Ca.attr("d",ae(Pr))}else Nr();else!kr||Rr0){var mr;if(vr.isSubplotConstrained||!qr&&kr.length===1){for(mr=0;mr1&&(Nr.maxallowed!==void 0&&_t===(Nr.range[0]1&&(Hr.maxallowed!==void 0&&Fe===(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 ue(pe,we,Se,Re,Pe){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,Re)).attr("d",Pe+"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,Re,Pe,je){pe.attr("d",Re+"M"+Se.l+","+Se.t+"v"+Se.h+"h"+Se.w+"v-"+Se.h+"h-"+Se.w+"Z"),Y(pe,we,Pe,je)}function Y(pe,we,Se,Re){Se||(pe.transition().style("fill",Re>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),we.transition().style("opacity",1).duration(200))}function X(pe){v.select(pe).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function Q(pe){P&&pe.data&&pe._context.showTips&&(_.notifier(_._(pe,"Double-click to zoom back out"),"long",pe),P=!1)}function V(pe,we){return"M"+(pe.l-.5)+","+(we-D-.5)+"h-3v"+(2*D+1)+"h3ZM"+(pe.r+.5)+","+(we-D-.5)+"h3v"+(2*D+1)+"h-3Z"}function le(pe,we){return"M"+(we-D-.5)+","+(pe.t-.5)+"v-3h"+(2*D+1)+"v3ZM"+(we-D-.5)+","+(pe.b+.5)+"v3h"+(2*D+1)+"v-3Z"}function ae(pe){var we=Math.floor(Math.min(pe.b-pe.t,pe.r-pe.l,D)/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,Re,Pe){for(var je=!1,at={},nt={},tt,Ve,he,se,ne=(Pe||{}).xaHash,Ce=(Pe||{}).yaHash,Ze=0;Ze1&&_.warn("Full array edits are incompatible with other edits",h);var w=i[""][""];if(t(w))a.set(null);else if(Array.isArray(w))a.set(w);else return _.warn("Unrecognized full array edit value",h,w),!0;return T?!1:(f(l,x),m(o),!0)}var A=Object.keys(i).map(Number).sort(S),E=a.get(),p=E||[],b=s(x,h).get(),d=[],u=-1,g=p.length,y,D,P,z,F,N,O,L;for(y=0;yp.length-(O?0:1)){_.warn("index out of range",h,P);continue}if(N!==void 0)F.length>1&&_.warn("Insertion & removal are incompatible with edits to the same index.",h,P),t(N)?d.push(P):O?(N==="add"&&(N={}),p.splice(P,0,N),b&&b.splice(P,0,{})):_.warn("Unrecognized full object edit value",h,P,N),u===-1&&(u=P);else for(D=0;D=0;y--)p.splice(d[y],1),b&&b.splice(d[y],1);if(p.length?E||a.set(p):a.set(null),T)return!1;if(f(l,x),c!==v){var U;if(u===-1)U=A;else{for(g=Math.max(p.length,g),U=[],y=0;y=u));y++)U.push(P);for(y=u;y0&&_.log("Clearing previous rejected promises from queue."),l._promises=[]},Z.cleanLayout=function(l){var x,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,E=(S.subplotsRegistry.polar||{}).attrRegex,p=(S.subplotsRegistry.ternary||{}).attrRegex,b=(S.subplotsRegistry.gl3d||{}).attrRegex,d=Object.keys(l);for(x=0;x3?(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 i(l,x,w=!1){var A=l[x],E=x.charAt(0);w&&Array.isArray(A)||A&&A!=="paper"&&(l[x]=t(A,E,!0))}Z.cleanData=function(l){for(var x=0;x0)return l.slice(0,x)}Z.hasParent=function(l,x){for(var w=c(x);w;){if(w in l)return!0;w=c(w)}return!1},Z.clearAxisTypes=function(l,x,w){for(var A=0;A{let w=(...A)=>A.every(E=>_.isPlainObject(E))||A.every(E=>Array.isArray(E));if([l,x].every(A=>Array.isArray(A))){if(l.length!==x.length)return!1;for(let A=0;A_.isPlainObject(A))){if(Object.keys(l).length!==Object.keys(x).length)return!1;for(let A in l){if(A.startsWith("_"))continue;let E=l[A],p=x[A];if(E!==p&&!(w(E,p)?T(E,p):!1))return!1}return!0}return!1};Z.collectionsAreEqual=T}}),k2=He({"src/plot_api/plot_api.js"(Z){"use strict";var q=Vn(),v=ns(),_=i5(),S=sa(),M=S.nestedProperty,e=Qy(),t=iz(),r=so(),o=e1(),a=bc(),i=Wo(),n=h5(),s=Xh(),h=as(),f=$n(),m=I5().initInteractions,c=vd(),T=Af().clearOutline,l=X0().dfltConfig,x=Nz(),w=Uz(),A=P_(),E=pc(),p=lh().AX_NAME_PATTERN,b=0,d=5;function u(Ae,Le,We,Ke){var st;if(Ae=S.getGraphDiv(Ae),e.init(Ae),S.isPlainObject(Le)){var ot=Le;Le=ot.data,We=ot.layout,Ke=ot.config,st=ot.frames}var Ut=e.triggerHandler(Ae,"plotly_beforeplot",[Le,We,Ke]);if(Ut===!1)return Promise.reject();!Le&&!We&&!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,Ke),We||(We={}),q.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(We)),a.supplyDefaults(Ae);var jt=Ae._fullLayout,cr=jt._has("cartesian");jt._replotting=!0,(Pt||jt._shouldCreateBgLayer)&&(Ye(Ae),jt._shouldCreateBgLayer&&delete jt._shouldCreateBgLayer),h.initGradients(Ae),h.initPatterns(Ae),Pt&&i.saveShowSpikeInitial(Ae);var or=!Ae.calcdata||Ae.calcdata.length!==(Ae._fullData||[]).length;or&&a.doCalcdata(Ae);for(var nr=0;nr=Ae.data.length||st<-Ae.data.length)throw new Error(We+" must be valid indices for gd.data.");if(Le.indexOf(st,Ke+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 "+We+" must be unique.")}}function U(Ae,Le,We){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]),L(Ae,Le,"currentIndices"),typeof We<"u"&&!Array.isArray(We)&&(We=[We]),typeof We<"u"&&L(Ae,We,"newIndices"),typeof We<"u"&&Le.length!==We.length)throw new Error("current and new indices must be of equal length.")}function B(Ae,Le,We){var Ke,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]),Ke=0;Ke"u")throw new Error("indices must be an integer or array of integers");L(Ae,We,"indices");for(var ot in Le){if(!Array.isArray(Le[ot])||Le[ot].length!==We.length)throw new Error("attribute "+ot+" must be an array of length equal to indices array length");if(st&&(!(ot in Ke)||!Array.isArray(Ke[ot])||Ke[ot].length!==Le[ot].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,We,Ke){var st=S.isPlainObject(Ke),ot=[],Ut,Ct,Pt,jt,cr;Array.isArray(We)||(We=[We]),We=O(We,Ae.data.length-1);for(var or in Le)for(var nr=0;nr=0&&cr=0&&cr"u")return jt=Z.redraw(Ae),t.add(Ae,st,Ut,ot,Ct),jt;Array.isArray(We)||(We=[We]);try{U(Ae,Ke,We)}catch(cr){throw Ae.data.splice(Ae.data.length-Le.length,Le.length),cr}return t.startSequence(Ae),t.add(Ae,st,Ut,ot,Ct),jt=Z.moveTraces(Ae,Ke,We),t.stopSequence(Ae),jt}function Q(Ae,Le){Ae=S.getGraphDiv(Ae);var We=[],Ke=Z.addTraces,st=Q,ot=[Ae,We,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]),L(Ae,Le,"indices"),Le=O(Le,Ae.data.length-1),Le.sort(S.sorterDes),Ct=0;Ct"u")for(We=[],jt=0;jt0&&typeof Zt.parts[ta]!="string";)ta--;var ra=Zt.parts[ta],ca=Zt.parts[ta-1]+"."+ra,Ba=Zt.parts.slice(0,ta).join("."),$a=M(Ae.layout,Ba).get(),Za=M(Ke,Ba).get(),ri=Zt.get();if(Jt!==void 0){qa[Rt]=Jt,Wa[Rt]=ra==="reverse"?Jt:ae(ri);var pi=o.getLayoutValObject(Ke,Zt.parts);if(pi&&pi.impliedEdits&&Jt!==null)for(var Ia in pi.impliedEdits)Ca(S.relativeAttr(Rt,Ia),pi.impliedEdits[Ia]);if(["width","height"].indexOf(Rt)!==-1)if(Jt){Ca("autosize",null);var rn=Rt==="height"?"width":"height";Ca(rn,Ke[rn])}else Ke[Rt]=Ae._initialAutoSize[Rt];else if(Rt==="autosize")Ca("width",Jt?null:Ke.width),Ca("height",Jt?null:Ke.height);else if(ca.match(Pe))Yt(ca),M(Ke,Ba+"._inputRange").set(null);else if(ca.match(je)){Yt(ca),M(Ke,Ba+"._inputRange").set(null);var tn=M(Ke,Ba).get();tn._inputDomain&&(tn._input.domain=tn._inputDomain.slice())}else ca.match(at)&&M(Ke,Ba+"._inputDomain").set(null);if(ra==="type"){wi=$a;var cn=Za.type==="linear"&&Jt==="log",xt=Za.type==="log"&&Jt==="linear";if(cn||xt){if(!wi||!wi.range)Ca(Ba+".autorange",!0);else if(Za.autorange)cn&&(wi.range=wi.range[1]>wi.range[0]?[1,2]:[2,1]);else{var ut=wi.range[0],Or=wi.range[1];cn?(ut<=0&&Or<=0&&Ca(Ba+".autorange",!0),ut<=0?ut=Or/1e6:Or<=0&&(Or=ut/1e6),Ca(Ba+".range[0]",Math.log(ut)/Math.LN10),Ca(Ba+".range[1]",Math.log(Or)/Math.LN10)):(Ca(Ba+".range[0]",Math.pow(10,ut)),Ca(Ba+".range[1]",Math.pow(10,Or)))}Array.isArray(Ke._subplots.polar)&&Ke._subplots.polar.length&&Ke[Zt.parts[0]]&&Zt.parts[1]==="radialaxis"&&delete Ke[Zt.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);M(Ke,Ba+"._inputRange").set(null)}else if(ra.match(p)){var Cr=M(Ke,Rt).get(),wr=(Jt||{}).type;(!wr||wr==="-")&&(wr="linear"),r.getComponentMethod("annotations","convertCoords")(Ae,Cr,wr,Ca),r.getComponentMethod("images","convertCoords")(Ae,Cr,wr,Ca)}var Rr=x.containerArrayMatch(Rt);if(Rr){cr=Rr.array,or=Rr.index;var Nr=Rr.property,Hr=pi||{editType:"calc"};or!==""&&Nr===""&&(x.isAddVal(Jt)?Wa[Rt]=null:x.isRemoveVal(Jt)?Wa[Rt]=(M(We,cr).get()||[])[or]:S.warn("unrecognized full object value",Le)),E.update(Ra,Hr),jt[cr]||(jt[cr]={});var gt=jt[cr][or];gt||(gt=jt[cr][or]={}),gt[Nr]=Jt,delete Le[Rt]}else ra==="reverse"?($a.range?$a.range.reverse():(Ca(Ba+".autorange",!0),$a.range=[1,0]),Za.autorange?Ra.calc=!0:Ra.plot=!0):(Rt==="dragmode"&&(Jt===!1&&ri!==!1||Jt!==!1&&ri===!1)||Ke._has("scatter-like")&&Ke._has("regl")&&Rt==="dragmode"&&(Jt==="lasso"||Jt==="select")&&!(ri==="lasso"||ri==="select")?Ra.plot=!0:pi?E.update(Ra,pi):Ra.calc=!0,Zt.set(Jt))}}for(cr in jt){var Kt=x.applyContainerArrayChanges(Ae,ot(We,cr),jt[cr],Ra,ot);Kt||(Ra.plot=!0)}for(var mr in hi){wi=i.getFromId(Ae,mr);var Ir=wi&&wi._constraintGroup;if(Ir){Ra.calc=!0;for(var va in Ir)hi[va]||(i.getFromId(Ae,va)._constraintShrinkable=!0)}}(tt(Ae)||Le.height||Le.width)&&(Ra.plot=!0);var Pa=Ke.shapes;for(or=0;or1;)if(Ke.pop(),We=M(Le,Ke.join(".")+".uirevision").get(),We!==void 0)return We;return Le.uirevision}function rt(Ae,Le){for(var We=0;We[Ba,Ae._ev.listeners(Ba)]);ot=Z.newPlot(Ae,Le,We,Ke).then(()=>{for(let[Ba,$a]of ca)$a.forEach(Za=>Ae.on(Ba,Za));return Z.react(Ae,Le,We,Ke)})}else{Ae.data=Le||[],w.cleanData(Ae.data),Ae.layout=We||{},w.cleanLayout(Ae.layout),kt(Ae.data,Ae.layout,Ct,Pt),a.supplyDefaults(Ae,{skipUpdateCalc:!0});var or=Ae._fullData,nr=Ae._fullLayout,Pr=nr.datarevision===void 0,_a=nr.transition,Fa=Ar(Ae,Pt,nr,Pr,_a),Ra=Fa.newDataRevision,qa=Vt(Ae,Ct,or,Pr,_a,Ra);if(tt(Ae)&&(Fa.layoutReplot=!0),qa.calc||Fa.calc){Ae.calcdata=void 0;for(var Wa=Object.getOwnPropertyNames(nr),Ca=0;Ca(cr||Ae.emit("plotly_react",{config:Ke,data:Le,layout:We}),Ae))}function Vt(Ae,Le,We,Ke,st,ot){var Ut=Le.length===We.length;if(!st&&!Ut)return{fullReplot:!0,calc:!0};var Ct=E.traceFlags();Ct.arrays={},Ct.nChanges=0,Ct.nChangesAnim=0;var Pt,jt;function cr(Pr){var _a=o.getTraceValObject(jt,Pr);return!jt._module.animatable&&_a.anim&&(_a.anim=!1),_a}var or={getValObject:cr,flags:Ct,immutable:Ke,transition:st,newDataRevision:ot,gd:Ae},nr={};for(Pt=0;Pt=st.length?st[0]:st[jt]:st}function Ct(jt){return Array.isArray(ot)?jt>=ot.length?ot[0]:ot[jt]:ot}function Pt(jt,cr){var or=0;return function(){if(jt&&++or===cr)return jt()}}return new Promise(function(jt,cr){function or(){if(Ke._frameQueue.length!==0){for(;Ke._frameQueue.length;){var ra=Ke._frameQueue.pop();ra.onInterrupt&&ra.onInterrupt()}Ae.emit("plotly_animationinterrupted",[])}}function nr(ra){if(ra.length!==0){for(var ca=0;caKe._timeToNext&&_a()};ra()}var Ra=0;function qa(ra){return Array.isArray(st)?Ra>=st.length?ra.transitionOpts=st[Ra]:ra.transitionOpts=st[0]:ra.transitionOpts=st,Ra++,ra}var Wa,Ca,hi=[],wi=Le==null,Yt=Array.isArray(Le),Rt=!wi&&!Yt&&S.isPlainObject(Le);if(Rt)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?nr(hi):(Ae.emit("plotly_animated"),jt())})}function kr(Ae,Le,We){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 Ke,st,ot,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,cr=[],or={};for(Ke=Le.length-1;Ke>=0;Ke--)if(S.isPlainObject(Le[Ke])){var nr=Le[Ke].name,Pr=(Pt[nr]||or[nr]||{}).name,_a=Le[Ke].name,Fa=Pt[Pr]||or[Pr];Pr&&_a&&typeof _a=="number"&&Fa&&bZt.index?-1:Rt.index=0;Ke--){if(st=cr[Ke].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(ot=0;ot=0;We--)Ke=Le[We],ot.push({type:"delete",index:Ke}),Ut.unshift({type:"insert",index:Ke,value:st[Ke]});var Ct=a.modifyFrames,Pt=a.modifyFrames,jt=[Ae,Ut],cr=[Ae,ot];return t&&t.add(Ae,Ct,jt,Pt,cr),a.modifyFrames(Ae,ot)}function _t(Ae){Ae=S.getGraphDiv(Ae);var Le=Ae._fullLayout||{},We=Ae._fullData||[];return a.cleanPlot([],{},We,Le),a.purge(Ae),e.purge(Ae),Le._container&&Le._container.remove(),delete Ae._context,Ae}function Fe(Ae){var Le=Ae._fullLayout,We=Ae.getBoundingClientRect();if(!S.equalDomRects(We,Le._lastBBox)){var Ke=Le._invTransform=S.inverseTransformMatrix(S.getFullTransformMatrix(Ae));Le._invScaleX=Math.sqrt(Ke[0][0]*Ke[0][0]+Ke[0][1]*Ke[0][1]+Ke[0][2]*Ke[0][2]),Le._invScaleY=Math.sqrt(Ke[1][0]*Ke[1][0]+Ke[1][1]*Ke[1][1]+Ke[1][2]*Ke[1][2]),Le._lastBBox=We}}function Ye(Ae){var Le=q.select(Ae),We=Ae._fullLayout;if(We._calcInverseTransform=Fe,We._calcInverseTransform(Ae),We._container=Le.selectAll(".plot-container").data([0]),We._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0).style({width:"100%",height:"100%"}),We._paperdiv=We._container.selectAll(".svg-container").data([0]),We._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),We._glcontainer=We._paperdiv.selectAll(".gl-container").data([{}]),We._glcontainer.enter().append("div").classed("gl-container",!0),We._paperdiv.selectAll(".main-svg").remove(),We._paperdiv.select(".modebar-container").remove(),We._paper=We._paperdiv.insert("svg",":first-child").classed("main-svg",!0),We._toppaper=We._paperdiv.append("svg").classed("main-svg",!0),We._modebardiv=We._paperdiv.append("div"),delete We._modeBar,We._hoverpaper=We._paperdiv.append("svg").classed("main-svg",!0),!We._uid){var Ke={};q.selectAll("defs").each(function(){this.id&&(Ke[this.id.split("-")[1]]=1)}),We._uid=S.randstr(Ke)}We._paperdiv.selectAll(".main-svg").attr(c.svgAttrs),We._defs=We._paper.append("defs").attr("id","defs-"+We._uid),We._clips=We._defs.append("g").classed("clips",!0),We._topdefs=We._toppaper.append("defs").attr("id","topdefs-"+We._uid),We._topclips=We._topdefs.append("g").classed("clips",!0),We._bgLayer=We._paper.append("g").classed("bglayer",!0),We._draggers=We._paper.append("g").classed("draglayer",!0);var st=We._paper.append("g").classed("layer-below",!0);We._imageLowerLayer=st.append("g").classed("imagelayer",!0),We._shapeLowerLayer=st.append("g").classed("shapelayer",!0),We._cartesianlayer=We._paper.append("g").classed("cartesianlayer",!0),We._polarlayer=We._paper.append("g").classed("polarlayer",!0),We._smithlayer=We._paper.append("g").classed("smithlayer",!0),We._ternarylayer=We._paper.append("g").classed("ternarylayer",!0),We._geolayer=We._paper.append("g").classed("geolayer",!0),We._funnelarealayer=We._paper.append("g").classed("funnelarealayer",!0),We._pielayer=We._paper.append("g").classed("pielayer",!0),We._iciclelayer=We._paper.append("g").classed("iciclelayer",!0),We._treemaplayer=We._paper.append("g").classed("treemaplayer",!0),We._sunburstlayer=We._paper.append("g").classed("sunburstlayer",!0),We._indicatorlayer=We._toppaper.append("g").classed("indicatorlayer",!0),We._glimages=We._paper.append("g").classed("glimages",!0);var ot=We._toppaper.append("g").classed("layer-above",!0);We._imageUpperLayer=ot.append("g").classed("imagelayer",!0),We._shapeUpperLayer=ot.append("g").classed("shapelayer",!0),We._selectionLayer=We._toppaper.append("g").classed("selectionlayer",!0),We._infolayer=We._toppaper.append("g").classed("infolayer",!0),We._menulayer=We._toppaper.append("g").classed("menulayer",!0),We._zoomlayer=We._toppaper.append("g").classed("zoomlayer",!0),We._hoverlayer=We._hoverpaper.append("g").classed("hoverlayer",!0),We._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),Ae.emit("plotly_framework")}Z.animate=qr,Z.addFrames=kr,Z.deleteFrames=Ur,Z.addTraces=X,Z.deleteTraces=Q,Z.extendTraces=de,Z.moveTraces=V,Z.prependTraces=Y,Z.newPlot=N,Z._doPlot=u,Z.purge=_t,Z.react=Bt,Z.redraw=F,Z.relayout=we,Z.restyle=le,Z.setPlotConfig=y,Z.update=Ve,Z._guiRelayout=he(we),Z._guiRestyle=he(le),Z._guiUpdate=he(Ve),Z._storeDirectGUIEdit=te}}),Kv=He({"src/snapshot/helpers.js"(Z){"use strict";var q=so();Z.getDelay=function(S){return S._has&&(S._has("gl3d")||S._has("mapbox")||S._has("map"))?500:0},Z.getRedrawFunc=function(S){return function(){q.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 v=window.URL||window.webkitURL;Z.createObjectURL=function(S){return v.createObjectURL(S)},Z.revokeObjectURL=function(S){return v.revokeObjectURL(S)},Z.createBlob=function(S,M){if(M==="svg")return new window.Blob([S],{type:"image/svg+xml;charset=utf-8"});if(M==="full-json")return new window.Blob([S],{type:"application/json;charset=utf-8"});var e=_(window.atob(S));return new window.Blob([e],{type:"image/"+M})},Z.octetStream=function(S){document.location.href="data:application/octet-stream"+S};function _(S){for(var M=S.length,e=new ArrayBuffer(M),t=new Uint8Array(e),r=0;r{let l=T.toLowerCase();return a.includes(l)?T:i.includes(l)?"<":n.includes(l)?">":T.includes("<")||T.includes(">")?"":m.html(T).text()});return m.remove(),c}function h(f){return f.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")}q.exports=function(m,c,T){var l=m._fullLayout,x=l._paper,w=l._toppaper,A=l.width,E=l.height,p;x.insert("rect",":first-child").call(S.setRect,0,0,A,E).call(M.fill,l.paper_bgcolor);var b=l._basePlotModules||[];for(p=0;p1&&E.push(s("object","layout"))),_.supplyDefaults(p);for(var u=p._fullData,g=b.length,y=0;yD.length&&A.push(s("unused",E,g.concat(D.length)));var L=D.length,U=Array.isArray(O);U&&(L=Math.min(L,O.length));var B,W,$,ue,ce;if(P.dimensions===2)for(W=0;WD[W].length&&A.push(s("unused",E,g.concat(W,D[W].length)));var de=D[W].length;for(B=0;B<(U?Math.min(de,O[W].length):de);B++)$=U?O[W][B]:O,ue=y[W][B],ce=D[W][B],v.validate(ue,$)?ce!==ue&&ce!==+ue&&A.push(s("dynamic",E,g.concat(W,B),ue,ce)):A.push(s("value",E,g.concat(W,B),ue))}else A.push(s("array",E,g.concat(W),y[W]));else for(W=0;WF?A.push({code:"unused",traceType:y,templateCount:z,dataCount:F}):F>z&&A.push({code:"reused",traceType:y,templateCount:z,dataCount:F})}}function N(O,L){for(var U in O)if(U.charAt(0)!=="_"){var B=O[U],W=s(O,U,L);v(B)?(Array.isArray(O)&&B._template===!1&&B.templateitemname&&A.push({code:"missing",path:W,templateitemname:B.templateitemname}),N(B,W)):Array.isArray(B)&&h(B)&&N(B,W)}}if(N({data:p,layout:E},""),A.length)return A.map(f)};function h(m){for(var c=0;c=0;f--){var m=e[f];if(m.type==="scatter"&&m.xaxis===s.xaxis&&m.yaxis===s.yaxis){m.opacity=void 0;break}}}}}}}),Xz=He({"src/traces/scatter/layout_defaults.js"(Z,q){"use strict";var v=sa(),_=_2();q.exports=function(S,M){function e(r,o){return v.coerce(S,M,_,r,o)}var t=M.barmode==="group";M.scattermode==="group"&&e("scattergap",t?M.bargap:.2)}}}),tv=He({"src/plots/cartesian/align_period.js"(Z,q){"use strict";var v=ns(),_=sa(),S=_.dateTime2ms,M=_.incrementMonth,e=Gs(),t=e.ONEAVGMONTH;q.exports=function(o,a,i,n){if(a.type!=="date")return{vals:n};var s=o[i+"periodalignment"];if(!s)return{vals:n};var h=o[i+"period"],f;if(v(h)){if(h=+h,h<=0)return{vals:n}}else if(typeof h=="string"&&h.charAt(0)==="M"){var m=+h.substring(1);if(m>0&&Math.round(m)===m)f=m;else return{vals:n}}for(var c=a.calendar,T=s==="start",l=s==="end",x=o[i+"period0"],w=S(x,c)||0,A=[],E=[],p=[],b=n.length,d=0;du;)D=M(D,-f,c);for(;D<=u;)D=M(D,f,c);y=M(D,-f,c)}else{for(g=Math.round((u-w)/h),D=w+g*h;D>u;)D-=h;for(;D<=u;)D+=h;y=D-h}A[d]=T?y:l?D:(y+D)/2,E[d]=y,p[d]=D}return{vals:A,starts:E,ends:p}}}}),Fd=He({"src/traces/scatter/colorscale_calc.js"(Z,q){"use strict";var v=wp().hasColorscale,_=Tp(),S=Fu();q.exports=function(e,t){S.hasLines(t)&&v(t,"line")&&_(e,t,{vals:t.line.color,containerStr:"line",cLetter:"c"}),S.hasMarkers(t)&&(v(t,"marker")&&_(e,t,{vals:t.marker.color,containerStr:"marker",cLetter:"c"}),v(t,"marker.line")&&_(e,t,{vals:t.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}}}),Av=He({"src/traces/scatter/arrays_to_calcdata.js"(Z,q){"use strict";var v=sa();q.exports=function(S,M){for(var e=0;eN&&y[L].gap;)L--;for(B=y[L].s,O=y.length-1;O>L;O--)y[O].s=B;for(;Nue+W||!v($))}for(var de=0;deL(B))):L(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 D(F,N,O,L){for(var U=z(L),B=0;Bz[c]&&c0?e:t)/(c._m*x*(c._m>0?e:t)))),jt*=1e3}if(cr===S){if(l&&(cr=c.c2p(Pt.y,!0)),cr===S)return!1;cr*=1e3}return[jt,cr]}function ee(Ct,Pt,jt,cr){var or=jt-Ct,nr=cr-Pt,Pr=.5-Ct,_a=.5-Pt,Fa=or*or+nr*nr,Ra=or*Pr+nr*_a;if(Ra>0&&Ra1||Math.abs(Pr.y-jt[0][1])>1)&&(Pr=[Pr.x,Pr.y],cr&&Se(Pr,Ct)je||Ct[1]nt)return[a(Ct[0],Pe,je),a(Ct[1],at,nt)]}function St(Ct,Pt){if(Ct[0]===Pt[0]&&(Ct[0]===Pe||Ct[0]===je)||Ct[1]===Pt[1]&&(Ct[1]===at||Ct[1]===nt))return!0}function kt(Ct,Pt){var jt=[],cr=Je(Ct),or=Je(Pt);return cr&&or&&St(cr,or)||(cr&&jt.push(cr),or&&jt.push(or)),jt}function Bt(Ct,Pt,jt){return function(cr,or){var nr=Je(cr),Pr=Je(or),_a=[];if(nr&&Pr&&St(nr,Pr))return _a;nr&&_a.push(nr),Pr&&_a.push(Pr);var Fa=2*r.constrain((cr[Ct]+or[Ct])/2,Pt,jt)-((nr||cr)[Ct]+(Pr||or)[Ct]);if(Fa){var Ra;nr&&Pr?Ra=Fa>0==nr[Ct]>Pr[Ct]?nr:Pr:Ra=nr||Pr,Ra[Ct]+=Fa}return _a}}var Vt;d==="linear"||d==="spline"?Vt=rt:d==="hv"||d==="vh"?Vt=kt:d==="hvh"?Vt=Bt(0,Pe,je):d==="vhv"&&(Vt=Bt(1,at,nt));function Ar(Ct,Pt){var jt=Pt[0]-Ct[0],cr=(Pt[1]-Ct[1])/jt,or=(Ct[1]*Pt[0]-Pt[1]*Ct[0])/jt;return or>0?[cr>0?Pe:je,nt]:[cr>0?je:Pe,at]}function vr(Ct){var Pt=Ct[0],jt=Ct[1],cr=Pt===z[F-1][0],or=jt===z[F-1][1];if(!(cr&&or))if(F>1){var nr=Pt===z[F-2][0],Pr=jt===z[F-2][1];cr&&(Pt===Pe||Pt===je)&&nr?Pr?F--:z[F-1]=Ct:or&&(jt===at||jt===nt)&&Pr?nr?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]&&vr([se,ne]),vr(Ct),Ce=null,se=ne=0}var kr=r.isArrayOrTypedArray(E);function Ur(Ct){if(Ct&&A&&(Ct.i=N,Ct.d=s,Ct.trace=f,Ct.marker=kr?E[Ct.i]:E,Ct.backoff=A),te=Ct[0]/x,pe=Ct[1]/w,Ve=Ct[0]je?je:0,he=Ct[1]nt?nt:0,Ve||he){if(!F)z[F++]=[Ve||Ct[0],he||Ct[1]];else if(Ce){var Pt=Vt(Ce,Ct);Pt.length>1&&(qr(Pt[0]),z[F++]=Pt[1])}else Ze=Vt(z[F-1],Ct)[0],z[F++]=Ze;var jt=z[F-1];Ve&&he&&(jt[0]!==Ve||jt[1]!==he)?(Ce&&(se!==Ve&&ne!==he?vr(se&&ne?Ar(Ce,Ct):[se||Ve,ne||he]):se&&ne&&vr([se,ne])),vr([Ve,he])):se-Ve&&ne-he&&vr([Ve||se,he||ne]),Ce=Ct,se=Ve,ne=he}else Ce&&qr(Vt(Ce,Ct)[0]),z[F++]=Ct}for(N=0;Nwe(W,_t))break;L=W,Q=ce[0]*ue[0]+ce[1]*ue[1],Q>Y?(Y=Q,U=W,$=!1):Q=s.length||!W)break;Ur(W),O=W}}Ce&&vr([se||Ce[0],ne||Ce[1]]),y.push(z.slice(0,F))}var Fe=d.slice(d.length-1);if(A&&Fe!=="h"&&Fe!=="v"){for(var Ye=!1,Ae=-1,Le=[],We=0;We=0?i=m:(i=m=f,f++),i0,d=a(m,c,T);if(A=l.selectAll("g.trace").data(d,function(g){return g[0].trace.uid}),A.enter().append("g").attr("class",function(g){return"trace scatter trace"+g[0].trace.uid}).style("stroke-miterlimit",2),A.order(),n(m,A,c),b){w&&(E=w());var u=v.transition().duration(x.duration).ease(x.easing).each("end",function(){E&&E()}).each("interrupt",function(){E&&E()});u.each(function(){l.selectAll("g.trace").each(function(g,y){s(m,y,c,g,d,this,x)})})}else A.each(function(g,y){s(m,y,c,g,d,this,x)});p&&A.exit().remove(),l.selectAll("path:not([d])").remove()};function n(f,m,c){m.each(function(T){var l=M(v.select(this),"g","fills");t.setClipUrl(l,c.layerClipId,f);var x=T[0].trace;x._ownFill=null,x._nextFill=null;var w=[];x._ownfill&&w.push("_ownFill"),x._nexttrace&&w.push("_nextFill");var A=l.selectAll("g").data(w,e);A.enter().append("g"),A.exit().remove(),A.order().each(function(E){x[E]=M(v.select(this),"path","js-fill")})})}function s(f,m,c,T,l,x,w){var A=f._context.staticPlot,E;h(f,m,c,T,l);var p=!!w&&w.duration>0;function b(vr){return p?vr.transition():vr}var d=c.xaxis,u=c.yaxis,g=T[0].trace,y=g.line,D=v.select(x),P=M(D,"g","errorbars"),z=M(D,"g","lines"),F=M(D,"g","points"),N=M(D,"g","text");if(_.getComponentMethod("errorbars","plot")(f,P,c,w),g.visible!==!0)return;b(D).style("opacity",g.opacity);var O,L,U=g.fill.charAt(g.fill.length-1);U!=="x"&&U!=="y"&&(U="");var B,W;U==="y"?(B=1,W=u.c2p(0,!0)):U==="x"&&(B=0,W=d.c2p(0,!0)),T[0][c.isRangePlot?"nodeRangePlot3":"node3"]=D;var $="",ue=[],ce=g._prevtrace,de=null,Y=null;ce&&($=ce._prevRevpath||"",L=ce._nextFill,ue=ce._ownPolygons,de=ce._fillsegments,Y=ce._fillElement);var X,Q,V="",le="",ae,j,ee,te,pe,we,Se=[];g._polygons=[];var Re=[],Pe=[],je=S.noop;if(O=g._ownFill,r.hasLines(g)||g.fill!=="none"){L&&L.datum(T),["hv","vh","hvh","vhv"].indexOf(y.shape)!==-1?(ae=t.steps(y.shape),j=t.steps(y.shape.split("").reverse().join(""))):y.shape==="spline"?ae=j=function(vr){var qr=vr[vr.length-1];return vr.length>1&&vr[0][0]===qr[0]&&vr[0][1]===qr[1]?t.smoothclosed(vr.slice(1),y.smoothing):t.smoothopen(vr,y.smoothing)}:ae=j=function(vr){return"M"+vr.join("L")},ee=function(vr){return j(vr.reverse())},Pe=o(T,{xaxis:d,yaxis:u,trace:g,connectGaps:g.connectgaps,baseTolerance:Math.max(y.width||1,3)/4,shape:y.shape,backoff:y.backoff,simplify:y.simplify,fill:g.fill}),Re=new Array(Pe.length);var at=0;for(E=0;E=A[0]&&D.x<=A[1]&&D.y>=E[0]&&D.y<=E[1]}),u=Math.ceil(d.length/b),g=0;l.forEach(function(D,P){var z=D[0].trace;r.hasMarkers(z)&&z.marker.maxdisplayed>0&&P=Math.min(ce,de)&&c<=Math.max(ce,de)?0:1/0}var Y=Math.max(3,ue.mrc||0),X=1-1/Y,Q=Math.abs(f.c2p(ue.x)-c);return Q=Math.min(ce,de)&&T<=Math.max(ce,de)?0:1/0}var Y=Math.max(3,ue.mrc||0),X=1-1/Y,Q=Math.abs(m.c2p(ue.y)-T);return Qle!=Re>=le&&(pe=ee[j-1][0],we=ee[j][0],Re-Se&&(te=pe+(we-pe)*(le-Se)/(Re-Se),Y=Math.min(Y,te),X=Math.max(X,te)));return Y=Math.max(Y,0),X=Math.min(X,f._length),{x0:Y,x1:X,y0:le,y1:le}}if(x.indexOf("fills")!==-1&&h._fillElement){var B=L(h._fillElement)&&!L(h._fillExclusionElement);if(B){var W=U(h._polygons);W===null&&(W={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),v.extendFlat(o,{distance:o.maxHoverDistance,x0:W.x0,x1:W.x1,y0:W.y0,y1:W.y1,color:$,hovertemplate:!1}),delete o.index,h.text&&!v.isArrayOrTypedArray(h.text)?o.text=String(h.text):o.text=h.name,[o]}}}}}),c1=He({"src/traces/scatter/select.js"(Z,q){"use strict";var v=Fu();q.exports=function(S,M){var e=S.cd,t=S.xaxis,r=S.yaxis,o=[],a=e[0].trace,i,n,s,h,f=!v.hasMarkers(a)&&!v.hasText(a);if(f)return[];if(M===!1)for(i=0;i0&&(n["_"+a+"axes"]||{})[o])return n;if((n[a+"axis"]||a)===o){if(t(n,a))return n;if((n[a]||[]).length||n[a+"0"])return n}}}function e(r){return{v:"x",h:"y"}[r.orientation||"v"]}function t(r,o){var a=e(r),i=v(r,"box-violin"),n=v(r._fullInput||{},"candlestick");return i&&!n&&o===a&&r[a]===void 0&&r[a+"0"]===void 0}}}),I2=He({"src/plots/cartesian/category_order_defaults.js"(Z,q){"use strict";var v=hp().isTypedArraySpec;function _(S,M){var e=M.dataAttr||S._id.charAt(0),t={},r,o,a;if(M.axData)r=M.axData;else for(r=[],o=0;o0||v(o),i;a&&(i="array");var n=t("categoryorder",i),s;n==="array"&&(s=t("categoryarray")),!a&&n==="array"&&(n=e.categoryorder="trace"),n==="trace"?e._initialCategories=[]:n==="array"?e._initialCategories=s.slice():(s=_(e,r).sort(),n==="category ascending"?e._initialCategories=s:n==="category descending"&&(e._initialCategories=s.reverse()))}}}}),z_=He({"src/plots/cartesian/line_grid_defaults.js"(Z,q){"use strict";var v=Ch().mix,_=sh(),S=sa();q.exports=function(e,t,r,o){o=o||{};var a=o.dfltColor;function i(y,D){return S.coerce2(e,t,o.attributes,y,D)}var n=i("linecolor",a),s=i("linewidth"),h=r("showline",o.showLine||!!n||!!s);h||(delete t.linecolor,delete t.linewidth);var f=v(a,o.bgColor,o.blend||_.lightFraction).toRgbString(),m=i("gridcolor",f),c=i("gridwidth"),T=i("griddash"),l=r("showgrid",o.showGrid||!!m||!!c||!!T);if(l||(delete t.gridcolor,delete t.gridwidth,delete t.griddash),o.hasMinor){var x=v(t.gridcolor,o.bgColor,67).toRgbString(),w=i("minor.gridcolor",x),A=i("minor.gridwidth",t.gridwidth||1),E=i("minor.griddash",t.griddash||"solid"),p=r("minor.showgrid",!!w||!!A||!!E);p||(delete t.minor.gridcolor,delete t.minor.gridwidth,delete t.minor.griddash)}if(!o.noZeroLine){var b=i("zerolinelayer"),d=i("zerolinecolor",a),u=i("zerolinewidth"),g=r("zeroline",o.showGrid||!!d||!!u);g||(delete t.zerolinelayer,delete t.zerolinecolor,delete t.zerolinewidth)}}}}),F_=He({"src/plots/cartesian/axis_defaults.js"(Z,q){"use strict";var v=ns(),_=so(),S=sa(),M=zl(),e=pp(),t=Xh(),r=Y0(),o=t1(),a=e0(),i=t0(),n=I2(),s=z_(),h=h5(),f=wv(),m=lh().WEEKDAY_PATTERN,c=lh().HOUR_PATTERN;q.exports=function(A,E,p,b,d){var u=b.letter,g=b.font||{},y=b.splomStash||{},D=p("visible",!b.visibleDflt),P=E._template||{},z=E.type||P.type||"-",F;if(z==="date"){var N=_.getComponentMethod("calendars","handleDefaults");N(A,E,"calendar",b.calendar),b.noTicklabelmode||(F=p("ticklabelmode"))}!b.noTicklabelindex&&(z==="date"||z==="linear")&&p("ticklabelindex");var O="";(!b.noTicklabelposition||z==="multicategory")&&(O=S.coerce(A,E,{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||p("ticklabeloverflow",O.indexOf("inside")!==-1?"hide past domain":z==="category"||z==="multicategory"?"allow":"hide past div"),f(E,d),h(A,E,p,b),n(A,E,p,b),b.noHover||(z!=="category"&&p("hoverformat"),b.noUnifiedhovertitle||p("unifiedhovertitle.text"));var L=p("color"),U=L!==t.color.dflt?L:g.color,B=y.label||d._dfltTitle[u];if(i(A,E,p,z,b),!D)return E;p("title.text",B),S.coerceFont(p,"title.font",g,{overrideDflt:{size:S.bigFont(g.size),color:U}}),r(A,E,p,z);var W=b.hasMinor;if(W&&(M.newContainer(E,"minor"),r(A,E,p,z,{isMinor:!0})),a(A,E,p,z,b),o(A,E,p,b),W){var $=b.isMinor;b.isMinor=!0,o(A,E,p,b),b.isMinor=$}s(A,E,p,{dfltColor:L,bgColor:b.bgColor,showGrid:b.showGrid,hasMinor:W,attributes:t}),W&&E.ticklabelindex==null&&!E.minor.ticks&&!E.minor.showgrid&&delete E.minor,(E.showline||E.ticks)&&p("mirror");var ue=z==="multicategory";if(!b.noTickson&&(z==="category"||ue)&&(E.ticks||E.showgrid)&&(ue?(p("tickson","boundaries"),delete E.ticklabelposition):p("tickson")),ue){var ce=p("showdividers");ce&&(p("dividercolor"),p("dividerwidth"))}if(z==="date")if(e(A,E,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:T}),!E.rangebreaks.length)delete E.rangebreaks;else{for(var de=0;de=2){var u="",g,y;if(d.length===2){for(g=0;g<2;g++)if(y=x(d[g]),y){u=m;break}}var D=p("pattern",u);if(D===m)for(g=0;g<2;g++)y=x(d[g]),y&&(A.bounds[g]=d[g]=y-1);if(D)for(g=0;g<2;g++)switch(y=d[g],D){case m:if(!v(y)){A.enabled=!1;return}if(y=+y,y!==Math.floor(y)||y<0||y>=7){A.enabled=!1;return}A.bounds[g]=d[g]=y;break;case c:if(!v(y)){A.enabled=!1;return}if(y=+y,y<0||y>24){A.enabled=!1;return}A.bounds[g]=d[g]=y;break}if(E.autorange===!1){var P=E.range;if(P[0]P[1]){A.enabled=!1;return}}else if(d[0]>P[0]&&d[1]p[1]-1/4096&&(e.domain=f),_.noneOrAll(M.domain,e.domain,f),e.tickmode==="sync"&&(e.tickmode="auto")}return t("layer"),e}}}),Jz=He({"src/plots/cartesian/layout_defaults.js"(Z,q){"use strict";var v=sa(),_=$n(),S=$p().isUnifiedHover,M=x5(),e=zl(),t=$y(),r=Xh(),o=B5(),a=F_(),i=J0(),n=R2(),s=tf(),h=s.id2name,f=s.name2id,m=lh().AX_ID_PATTERN,c=so(),T=c.traceIs,l=c.getComponentMethod;function x(w,A,E){Array.isArray(w[A])?w[A].push(E):w[A]=[E]}q.exports=function(A,E,p){var b=E.autotypenumbers,d={},u={},g={},y={},D={},P={},z={},F={},N={},O={},L,U;for(L=0;L rect").call(M.setTranslate,0,0).call(M.setScale,1,1),E.plot.call(M.setTranslate,p._offset,b._offset).call(M.setScale,1,1);var d=E.plot.selectAll(".scatterlayer .trace");d.selectAll(".point").call(M.setPointGroupScale,1,1),d.selectAll(".textpoint").call(M.setTextPointsScale,1,1),d.call(M.hideOutsideRangePoints,E)}function h(E,p){var b=E.plotinfo,d=b.xaxis,u=b.yaxis,g=d._length,y=u._length,D=!!E.xr1,P=!!E.yr1,z=[];if(D){var F=S.simpleMap(E.xr0,d.r2l),N=S.simpleMap(E.xr1,d.r2l),O=F[1]-F[0],L=N[1]-N[0];z[0]=(F[0]*(1-p)+p*N[0]-F[0])/(F[1]-F[0])*g,z[2]=g*(1-p+p*L/O),d.range[0]=d.l2r(F[0]*(1-p)+p*N[0]),d.range[1]=d.l2r(F[1]*(1-p)+p*N[1])}else z[0]=0,z[2]=g;if(P){var U=S.simpleMap(E.yr0,u.r2l),B=S.simpleMap(E.yr1,u.r2l),W=U[1]-U[0],$=B[1]-B[0];z[1]=(U[1]*(1-p)+p*B[1]-U[1])/(U[0]-U[1])*y,z[3]=y*(1-p+p*$/W),u.range[0]=d.l2r(U[0]*(1-p)+p*B[0]),u.range[1]=u.l2r(U[1]*(1-p)+p*B[1])}else z[1]=0,z[3]=y;e.drawOne(r,d,{skipTitle:!0}),e.drawOne(r,u,{skipTitle:!0}),e.redrawComponents(r,[d._id,u._id]);var ue=D?g/z[2]:1,ce=P?y/z[3]:1,de=D?z[0]:0,Y=P?z[1]:0,X=D?z[0]/z[2]*g:0,Q=P?z[1]/z[3]*y:0,V=d._offset-X,le=u._offset-Q;b.clipRect.call(M.setTranslate,de,Y).call(M.setScale,1/ue,1/ce),b.plot.call(M.setTranslate,V,le).call(M.setScale,ue,ce),M.setPointGroupScale(b.zoomScalePts,1/ue,1/ce),M.setTextPointsScale(b.zoomScaleTxt,1/ue,1/ce)}var f;i&&(f=i());function m(){for(var E={},p=0;pa.duration?(m(),x=window.cancelAnimationFrame(A)):x=window.requestAnimationFrame(A)}return T=Date.now(),x=window.requestAnimationFrame(A),Promise.resolve()}}}),Kf=He({"src/plots/cartesian/index.js"(Z){"use strict";var q=Vn(),v=so(),_=sa(),S=bc(),M=as(),e=Wh().getModuleCalcData,t=tf(),r=lh(),o=vd(),a=_.ensureSingle;function i(T,l,x){return _.ensureSingle(T,l,x,function(w){w.datum(x)})}var n=r.zindexSeparator;Z.name="cartesian",Z.attr=["xaxis","yaxis"],Z.idRoot=["x","y"],Z.idRegex=r.idRegex,Z.attrRegex=r.attrRegex,Z.attributes=Kz(),Z.layoutAttributes=Xh(),Z.supplyLayoutDefaults=Jz(),Z.transitionAxes=$z(),Z.finalizeSubplots=function(T,l){var x=l._subplots,w=x.xaxis,A=x.yaxis,E=x.cartesian,p=E,b={},d={},u,g,y;for(u=0;u0){var P=D.id;if(P.indexOf(n)!==-1)continue;P+=n+(u+1),D=_.extendFlat({},D,{id:P,plot:A._cartesianlayer.selectAll(".subplot").select("."+P)})}for(var z=[],F,N=0;N1&&(W+=n+B),U.push(b+W),p=0;p1,y=l.mainplotinfo;if(!l.mainplot||g)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(!p){var D=a(w,"g","layer-subplot");l.shapelayer=a(D,"g","shapelayer"),l.imagelayer=a(D,"g","imagelayer"),y&&g?(l.minorGridlayer=y.minorGridlayer,l.gridlayer=y.gridlayer,l.zerolinelayer=y.zerolinelayer):(l.minorGridlayer=a(w,"g","minor-gridlayer"),l.gridlayer=a(w,"g","gridlayer"),l.zerolinelayer=a(w,"g","zerolinelayer"));var P=a(w,"g","layer-between");l.shapelayerBetween=a(P,"g","shapelayer"),l.imagelayerBetween=a(P,"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),y&&g?l.zerolinelayerAbove=y.zerolinelayerAbove:l.zerolinelayerAbove=a(w,"g","zerolinelayer-above"),p||(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-"+d),l.xaxislayer=w.select(".xaxislayer-"+b),l.yaxislayer=w.select(".yaxislayer-"+d))}else{var z=y.plotgroup,F=A+"-x",N=A+"-y";l.minorGridlayer=y.minorGridlayer,l.gridlayer=y.gridlayer,l.zerolinelayer=y.zerolinelayer,l.zerolinelayerAbove=y.zerolinelayerAbove,a(y.overlinesBelow,"path",F),a(y.overlinesBelow,"path",N),a(y.overaxesBelow,"g",F),a(y.overaxesBelow,"g",N),l.plot=a(y.overplot,"g",A),a(y.overlinesAbove,"path",F),a(y.overlinesAbove,"path",N),a(y.overaxesAbove,"g",F),a(y.overaxesAbove,"g",N),l.xlines=z.select(".overlines-"+b).select("."+F),l.ylines=z.select(".overlines-"+d).select("."+N),l.xaxislayer=z.select(".overaxes-"+b).select("."+F),l.yaxislayer=z.select(".overaxes-"+d).select("."+N)}p||(u||(i(l.minorGridlayer,"g",l.xaxis._id),i(l.minorGridlayer,"g",l.yaxis._id),l.minorGridlayer.selectAll("g").map(function(O){return O[0]}).sort(t.idSort),i(l.gridlayer,"g",l.xaxis._id),i(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 m(T,l){if(T){var x={};T.each(function(d){var u=d[0],g=q.select(this);g.remove(),c(u,l),x[u]=!0});for(var w in l._plots)for(var A=l._plots[w],E=A.overlays||[],p=0;p=0,l=i.indexOf("end")>=0,x=h.backoff*m+n.standoff,w=f.backoff*c+n.startstandoff,A,E,p,b;if(s.nodeName==="line"){A={x:+a.attr("x1"),y:+a.attr("y1")},E={x:+a.attr("x2"),y:+a.attr("y2")};var d=A.x-E.x,u=A.y-E.y;if(p=Math.atan2(u,d),b=p+Math.PI,x&&w&&x+w>Math.sqrt(d*d+u*u)){W();return}if(x){if(x*x>d*d+u*u){W();return}var g=x*Math.cos(p),y=x*Math.sin(p);E.x+=g,E.y+=y,a.attr({x2:E.x,y2:E.y})}if(w){if(w*w>d*d+u*u){W();return}var D=w*Math.cos(p),P=w*Math.sin(p);A.x-=D,A.y-=P,a.attr({x1:A.x,y1:A.y})}}else if(s.nodeName==="path"){var z=s.getTotalLength(),F="";if(z2/3?Ca="right":Ca="center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[Ca]}for(var Ze=!1,rt=["x","y"],Je=0;Je1)&&(Bt===kt?(ot=Vt.r2fraction(w["a"+St]),(ot<0||ot>1)&&(Ze=!0)):Ze=!0),Ye=Vt._offset+Vt.r2p(w[St]),We=.5}else{var Ut=st==="domain";St==="x"?(Le=w[St],Ye=Ut?Vt._offset+Vt._length*Le:Ye=u.l+u.w*Le):(Le=1-w[St],Ye=Ut?Vt._offset+Vt._length*Le:Ye=u.t+u.h*Le),We=w.showarrow?.5:Le}if(w.showarrow){Fe.head=Ye;var Ct=w["a"+St];if(Ke=vr*Ce(.5,w.xanchor)-qr*Ce(.5,w.yanchor),Bt===kt){var Pt=t.getRefType(Bt);Pt==="domain"?(St==="y"&&(Ct=1-Ct),Fe.tail=Vt._offset+Vt._length*Ct):Pt==="paper"?St==="y"?(Ct=1-Ct,Fe.tail=u.t+u.h*Ct):Fe.tail=u.l+u.w*Ct:Fe.tail=Vt._offset+Vt.r2p(Ct),Ae=Ke}else Fe.tail=Ye+Ct,Ae=Ke+Ct;Fe.text=Fe.tail+Ke;var jt=d[St==="x"?"width":"height"];if(kt==="paper"&&(Fe.head=M.constrain(Fe.head,1,jt-1)),Bt==="pixel"){var cr=-Math.max(Fe.tail-3,Fe.text),or=Math.min(Fe.tail+3,Fe.text)-jt;cr>0?(Fe.tail+=cr,Fe.text+=cr):or>0&&(Fe.tail-=or,Fe.text-=or)}Fe.tail+=_t,Fe.head+=_t}else Ke=kr*Ce(We,Ur),Ae=Ke,Fe.text=Ye+Ke;Fe.text+=_t,Ke+=_t,Ae+=_t,w["_"+St+"padplus"]=kr/2+Ae,w["_"+St+"padminus"]=kr/2-Ae,w["_"+St+"size"]=kr,w["_"+St+"shift"]=Ke}if(Ze){de.remove();return}var nr=0,Pr=0;if(w.align!=="left"&&(nr=(Ve-nt)*(w.align==="center"?.5:1)),w.valign!=="top"&&(Pr=(he-tt)*(w.valign==="middle"?.5:1)),je)Pe.select("svg").attr({x:Q+nr-1,y:Q+Pr}).call(o.setClipUrl,le?O:null,x);else{var _a=Q+Pr-at.top,Fa=Q+nr-at.left;te.call(i.positionText,Fa,_a).call(o.setClipUrl,le?O:null,x)}ae.select("rect").call(o.setRect,Q,Q,Ve,he),V.call(o.setRect,Y/2,Y/2,se-Y,ne-Y),de.call(o.setTranslate,Math.round(L.x.text-se/2),Math.round(L.y.text-ne/2)),W.attr({transform:"rotate("+U+","+L.x.text+","+L.y.text+")"});var Ra=function(Wa,Ca){B.selectAll(".annotation-arrow-g").remove();var hi=L.x.head,wi=L.y.head,Yt=L.x.tail+Wa,Rt=L.y.tail+Ca,Zt=L.x.text+Wa,Jt=L.y.text+Ca,Fr=M.rotationXYMatrix(U,Zt,Jt),ta=M.apply2DTransform(Fr),ra=M.apply2DTransform2(Fr),ca=+V.attr("width"),Ba=+V.attr("height"),$a=Zt-.5*ca,Za=$a+ca,ri=Jt-.5*Ba,pi=ri+Ba,Ia=[[$a,ri,$a,pi],[$a,pi,Za,pi],[Za,pi,Za,ri],[Za,ri,$a,ri]].map(ra);if(!Ia.reduce(function(gt,Kt){return gt^!!M.segmentsIntersect(hi,wi,hi+1e6,wi+1e6,Kt[0],Kt[1],Kt[2],Kt[3])},!1)){Ia.forEach(function(gt){var Kt=M.segmentsIntersect(Yt,Rt,hi,wi,gt[0],gt[1],gt[2],gt[3]);Kt&&(Yt=Kt.x,Rt=Kt.y)});var rn=w.arrowwidth,tn=w.arrowcolor,cn=w.arrowside,xt=B.append("g").style({opacity:r.opacity(tn)}).classed("annotation-arrow-g",!0),ut=xt.append("path").attr("d","M"+Yt+","+Rt+"L"+hi+","+wi).style("stroke-width",rn+"px").call(r.stroke,r.rgb(tn));if(f(ut,cn,w),g.annotationPosition&&ut.node().parentNode&&!E){var Or=hi,Cr=wi;if(w.standoff){var wr=Math.sqrt(Math.pow(hi-Yt,2)+Math.pow(wi-Rt,2));Or+=w.standoff*(Yt-hi)/wr,Cr+=w.standoff*(Rt-wi)/wr}var Rr=xt.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(Yt-Or)+","+(Rt-Cr),transform:e(Or,Cr)}).style("stroke-width",rn+6+"px").call(r.stroke,"rgba(0,0,0,0)").call(r.fill,"rgba(0,0,0,0)"),Nr,Hr;s.init({element:Rr.node(),gd:x,prepFn:function(){var gt=o.getTranslate(de);Nr=gt.x,Hr=gt.y,p&&p.autorange&&z(p._name+".autorange",!0),b&&b.autorange&&z(b._name+".autorange",!0)},moveFn:function(gt,Kt){var mr=ta(Nr,Hr),Ir=mr[0]+gt,va=mr[1]+Kt;de.call(o.setTranslate,Ir,va),F("x",T(p,gt,"x",u,w)),F("y",T(b,Kt,"y",u,w)),w.axref===w.xref&&F("ax",T(p,gt,"ax",u,w)),w.ayref===w.yref&&F("ay",T(b,Kt,"ay",u,w)),xt.attr("transform",e(gt,Kt)),W.attr({transform:"rotate("+U+","+Ir+","+va+")"})},doneFn:function(){_.call("_guiRelayout",x,N());var gt=document.querySelector(".js-notes-box-panel");gt&>.redraw(gt.selectedObj)}})}}};if(w.showarrow&&Ra(0,0),$){var qa;s.init({element:de.node(),gd:x,prepFn:function(){qa=W.attr("transform")},moveFn:function(Wa,Ca){var hi="pointer";if(w.showarrow)w.axref===w.xref?F("ax",T(p,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),Ra(Wa,Ca);else{if(E)return;var wi,Yt;if(p)wi=T(p,Wa,"x",u,w);else{var Rt=w._xsize/u.w,Zt=w.x+(w._xshift-w.xshift)/u.w-Rt/2;wi=s.align(Zt+Wa/u.w,Rt,0,1,w.xanchor)}if(b)Yt=T(b,Ca,"y",u,w);else{var Jt=w._ysize/u.h,Fr=w.y-(w._yshift+w.yshift)/u.h-Jt/2;Yt=s.align(Fr-Ca/u.h,Jt,0,1,w.yanchor)}F("x",wi),F("y",Yt),(!p||!b)&&(hi=s.getCursor(p?.5:wi,b?.5:Yt,w.xanchor,w.yanchor))}W.attr({transform:e(Wa,Ca)+qa}),n(de,hi)},clickFn:function(Wa,Ca){w.captureevents&&x.emit("plotly_clickannotation",ce(Ca))},doneFn:function(){n(de),_.call("_guiRelayout",x,N());var Wa=document.querySelector(".js-notes-box-panel");Wa&&Wa.redraw(Wa.selectedObj)}})}}g.annotationText?te.call(i.makeEditable,{delegate:de,gd:x}).call(pe).on("edit",function(Se){w.text=Se,this.call(pe),F("text",Se),p&&p.autorange&&z(p._name+".autorange",!0),b&&b.autorange&&z(b._name+".autorange",!0),_.call("_guiRelayout",x,N())}):te.call(pe)}}}),t9=He({"src/components/annotations/click.js"(Z,q){"use strict";var v=sa(),_=so(),S=zl().arrayEditor;q.exports={hasClickToShow:M,onClick:e};function M(o,a){var i=t(o,a);return i.on.length>0||i.explicitOff.length>0}function e(o,a){var i=t(o,a),n=i.on,s=i.off.concat(i.explicitOff),h={},f=o._fullLayout.annotations,m,c;if(n.length||s.length){for(m=0;m1){n=!0;break}}n?e.fullLayout._infolayer.select(".annotation-"+e.id+'[data-index="'+a+'"]').remove():(i._pdata=_(e.glplot.cameraParams,[t.xaxis.r2l(i.x)*r[0],t.yaxis.r2l(i.y)*r[1],t.zaxis.r2l(i.z)*r[2]]),v(e.graphDiv,i,a,e.id,i._xa,i._ya))}}}}),u9=He({"src/components/annotations3d/index.js"(Z,q){"use strict";var v=so(),_=sa();q.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:z2()}}},layoutAttributes:z2(),handleDefaults:o9(),includeBasePlot:S,convert:s9(),draw:l9()};function S(M,e){var t=v.subplotsRegistry.gl3d;if(t)for(var r=t.attrRegex,o=Object.keys(M),a=0;a{var y=g+"anchor",D=g==="x"?x:w,P={_fullLayout:i},z,F,N,O;let L=g+"ref",U=o[L];if(Array.isArray(U)&&U.length>0){let B=e.countDefiningCoords(c,f,g);O=_.coerceRefArray(o,a,P,g,void 0,"paper",B),a["_"+g+"refArray"]=!0}else O=_.coerceRef(o,a,P,g,void 0,"paper");if(Array.isArray(O))O.forEach(function(B){_.getRefType(B)==="range"&&(z=_.getFromId(P,B),z&&z._shapeIndices.indexOf(a._index)===-1&&z._shapeIndices.push(a._index))}),T&&[0,1].forEach(function(B){let W=O[B];_.getRefType(W)==="range"?(z=_.getFromId(P,W),F=e.shapePositionToRange(z),N=e.rangeToShapePosition(z),(z.type==="category"||z.type==="multicategory")&&n(g+B+"shift")):F=N=v.identity;let ue=g+B,ce=o[ue];if(o[ue]=F(o[ue],!0),D==="pixel"?n(ue,E[B]):_.coercePosition(a,P,n,W,ue,A[B]),a[ue]=N(a[ue]),o[ue]=ce,B===0&&D==="pixel"){let de=o[y];o[y]=F(o[y],!0),_.coercePosition(a,P,n,W,y,.25),a[y]=N(a[y]),o[y]=de}});else{if(_.getRefType(O)==="range"?(z=_.getFromId(P,O),z._shapeIndices.push(a._index),N=e.rangeToShapePosition(z),F=e.shapePositionToRange(z),T&&(z.type==="category"||z.type==="multicategory")&&(n(g+"0shift"),n(g+"1shift"))):F=N=v.identity,T){let W=g+"0",$=g+"1",ue=o[W],ce=o[$];o[W]=F(o[W],!0),o[$]=F(o[$],!0),D==="pixel"?(n(W,E[0]),n($,E[1])):(_.coercePosition(a,P,n,O,W,A[0]),_.coercePosition(a,P,n,O,$,A[1])),a[W]=N(a[W]),a[$]=N(a[$]),o[W]=ue,o[$]=ce}if(D==="pixel"){let W=o[y];o[y]=F(o[y],!0),_.coercePosition(a,P,n,O,y,.25),a[y]=N(a[y]),o[y]=W}}}),T&&v.noneOrAll(o,a,["x0","x1","y0","y1"]);var p=c==="line",b,d;if(T&&(b=n("label.texttemplate"),n("label.texttemplatefallback")),b||(d=n("label.text")),d||b){n("label.textangle");var u=n("label.textposition",p?"middle":"middle center");n("label.xanchor"),n("label.yanchor",t(p,u)),n("label.padding"),v.coerceFont(n,"label.font",i.font)}}}}),f9=He({"src/components/shapes/draw_newshape/defaults.js"(Z,q){"use strict";var v=$n(),_=sa();function S(M,e){return M?"bottom":e.indexOf("top")!==-1?"top":e.indexOf("bottom")!==-1?"bottom":"middle"}q.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"),_.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",v.contrast(a)),r("newshape.line.dash")}var i=e.dragmode==="drawline",n=r("newshape.label.text"),s=r("newshape.label.texttemplate");if(r("newshape.label.texttemplatefallback"),n||s){r("newshape.label.textangle");var h=r("newshape.label.textposition",i?"middle":"middle center");r("newshape.label.xanchor"),r("newshape.label.yanchor",S(i,h)),r("newshape.label.padding"),_.coerceFont(r,"newshape.label.font",t.font)}r("activeshape.fillcolor"),r("activeshape.opacity")}}}),h9=He({"src/components/shapes/calc_autorange.js"(Z,q){"use strict";var v=sa(),_=Wo(),S=L_(),M=i0();q.exports=function(n){var s=n._fullLayout,h=v.filterVisible(s.shapes);if(!(!h.length||!n._fullData.length))for(var f=0;f{c=_.getFromId(n,A),m._extremes[c._id]=_.findExtremes(c,E,t(m))})}else m.xref!=="paper"&&l!=="domain"&&(c=_.getFromId(n,m.xref),T=a(c,m,S.paramIsX),T&&(m._extremes[c._id]=_.findExtremes(c,T,t(m))));if(x==="array"){let w=e(n,m,"y");Object.entries(w).forEach(([A,E])=>{c=_.getFromId(n,A),m._extremes[c._id]=_.findExtremes(c,E,r(m))})}else m.yref!=="paper"&&x!=="domain"&&(c=_.getFromId(n,m.yref),T=a(c,m,S.paramIsY),T&&(m._extremes[c._id]=_.findExtremes(c,T,r(m))))}};function e(i,n,s){let h=n[s+"ref"],f=s==="x"?S.paramIsX:S.paramIsY;function m(A,E){A==="paper"||_.getRefType(A)==="domain"||(c[A]||(c[A]=[]),c[A].push(E))}let c={};if(n.type==="path"&&n.path){let A=n.path.match(S.segmentRE)||[];for(var T=0,l=0;lb&&(m(h[T],d[b]),T++)}}else m(h[0],n[s+"0"]),m(h[1],n[s+"1"]);let x={};for(let A in c){let E=_.getFromId(i,A);if(E){var w=E.type==="category"||E.type==="multicategory"?E.r2c:E.d2c;E.type==="date"&&(w=M.decodeDate(w)),x[E._id]=c[A].map(w)}}return x}function t(i){return o(i.line.width,i.xsizemode,i.x0,i.x1,i.path,!1)}function r(i){return o(i.line.width,i.ysizemode,i.y0,i.y1,i.path,!0)}function o(i,n,s,h,f,m){var c=i/2,T=m;if(n==="pixel"){var l=f?M.extractPathCoords(f,m?S.paramIsY:S.paramIsX):[s,h],x=v.aggNums(Math.max,null,l),w=v.aggNums(Math.min,null,l),A=w<0?Math.abs(w)+c:c,E=x>0?x+c:c;return{ppad:c,ppadplus:T?A:E,ppadminus:T?E:A}}else return{ppad:c}}function a(i,n,s){var h=i._id.charAt(0)==="x"?"x":"y",f=i.type==="category"||i.type==="multicategory",m,c,T=0,l=0,x=f?i.r2c:i.d2c,w=n[h+"sizemode"]==="scaled";if(w?(m=n[h+"0"],c=n[h+"1"],f&&(T=n[h+"0shift"],l=n[h+"1shift"])):(m=n[h+"anchor"],c=n[h+"anchor"]),m!==void 0)return[x(m)+T,x(c)+l];if(n.path){var A=1/0,E=-1/0,p=n.path.match(S.segmentRE),b,d,u,g,y;for(i.type==="date"&&(x=M.decodeDate(x)),b=0;bE&&(E=y)));if(E>=A)return[A,E]}}}}),p9=He({"src/components/shapes/index.js"(Z,q){"use strict";var v=E2();q.exports={moduleType:"component",name:"shapes",layoutAttributes:j5(),supplyLayoutDefaults:c9(),supplyDrawNewShapeDefaults:f9(),includeBasePlot:D_()("shapes"),calcAutorange:h9(),draw:v.draw,drawOne:v.drawOne}}}),q5=He({"src/components/images/attributes.js"(Z,q){"use strict";var v=lh(),_=zl().templatedArray,S=R_();q.exports=_("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",v.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",v.idRegex.y.toString()],dflt:"paper",editType:"arraydraw"},editType:"arraydraw"})}}),d9=He({"src/components/images/defaults.js"(Z,q){"use strict";var v=sa(),_=Wo(),S=pp(),M=q5(),e="images";q.exports=function(o,a){var i={name:e,handleItemDefaults:t};S(o,a,i)};function t(r,o,a){function i(x,w){return v.coerce(r,o,M,x,w)}var n=i("source"),s=i("visible",!!n);if(!s)return o;i("layer"),i("xanchor"),i("yanchor"),i("sizex"),i("sizey"),i("sizing"),i("opacity");for(var h={_fullLayout:a},f=["x","y"],m=0;m<2;m++){var c=f[m],T=_.coerceRef(r,o,h,c,"paper",void 0);if(T!=="paper"){var l=_.getFromId(h,T);l._imgIndices.push(o._index)}_.coercePosition(o,h,i,T,c,0)}return o}}}),v9=He({"src/components/images/draw.js"(Z,q){"use strict";var v=Vn(),_=as(),S=Wo(),M=tf(),e=vd();q.exports=function(r){var o=r._fullLayout,a=[],i={},n=[],s,h;for(h=0;h0);f&&(s("active"),s("direction"),s("type"),s("showactive"),s("x"),s("y"),v.noneOrAll(a,i,["x","y"]),s("xanchor"),s("yanchor"),s("pad.t"),s("pad.r"),s("pad.b"),s("pad.l"),v.coerceFont(s,"font",n.font),s("bgcolor",n.paper_bgcolor),s("bordercolor"),s("borderwidth"))}function o(a,i){function n(h,f){return v.coerce(a,i,t,h,f)}var s=n("visible",a.method==="skip"||Array.isArray(a.args));s&&(n("method"),n("args"),n("args2"),n("label"),n("execute"))}}}),_9=He({"src/components/updatemenus/scrollbox.js"(Z,q){"use strict";q.exports=e;var v=Vn(),_=$n(),S=as(),M=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 i=this.gd._fullLayout,n=i.width,s=i.height;this.position=r;var h=this.position.l,f=this.position.w,m=this.position.t,c=this.position.h,T=this.position.direction,l=T==="down",x=T==="left",w=T==="right",A=T==="up",E=f,p=c,b,d,u,g;!l&&!x&&!w&&!A&&(this.position.direction="down",l=!0);var y=l||A;y?(b=h,d=b+E,l?(u=m,g=Math.min(u+p,s),p=g-u):(g=m+p,u=Math.max(g-p,0),p=g-u)):(u=m,g=u+p,x?(d=h+E,b=Math.max(d-E,0),E=d-b):(b=h,d=Math.min(b+E,n),E=d-b)),this._box={l:b,t:u,w:E,h:p};var D=f>E,P=e.barLength+2*e.barPad,z=e.barWidth+2*e.barPad,F=h,N=m+c;N+z>s&&(N=s-z);var O=this.container.selectAll("rect.scrollbar-horizontal").data(D?[0]:[]);O.exit().on(".drag",null).remove(),O.enter().append("rect").classed("scrollbar-horizontal",!0).call(_.fill,e.barColor),D?(this.hbar=O.attr({rx:e.barRadius,ry:e.barRadius,x:F,y:N,width:P,height:z}),this._hbarXMin=F+P/2,this._hbarTranslateMax=E-P):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var L=c>p,U=e.barWidth+2*e.barPad,B=e.barLength+2*e.barPad,W=h+f,$=m;W+U>n&&(W=n-U);var ue=this.container.selectAll("rect.scrollbar-vertical").data(L?[0]:[]);ue.exit().on(".drag",null).remove(),ue.enter().append("rect").classed("scrollbar-vertical",!0).call(_.fill,e.barColor),L?(this.vbar=ue.attr({rx:e.barRadius,ry:e.barRadius,x:W,y:$,width:U,height:B}),this._vbarYMin=$+B/2,this._vbarTranslateMax=p-B):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var ce=this.id,de=b-.5,Y=L?d+U+.5:d+.5,X=u-.5,Q=D?g+z+.5:g+.5,V=i._topdefs.selectAll("#"+ce).data(D||L?[0]:[]);if(V.exit().remove(),V.enter().append("clipPath").attr("id",ce).append("rect"),D||L?(this._clipRect=V.select("rect").attr({x:Math.floor(de),y:Math.floor(X),width:Math.ceil(Y)-Math.floor(de),height:Math.ceil(Q)-Math.floor(X)}),this.container.call(S.setClipUrl,ce,this.gd),this.bg.attr({x:h,y:m,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),D||L){var le=v.behavior.drag().on("dragstart",function(){v.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(le);var ae=v.behavior.drag().on("dragstart",function(){v.event.sourceEvent.preventDefault(),v.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));D&&this.hbar.on(".drag",null).call(ae),L&&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-=v.event.dx),this.vbar&&(o-=v.event.dy),this.setTranslate(r,o)},e.prototype._onBoxWheel=function(){var r=this.translateX,o=this.translateY;this.hbar&&(r+=v.event.deltaY),this.vbar&&(o+=v.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,i=a+this._hbarTranslateMax,n=M.constrain(v.event.x,a,i),s=(n-a)/(i-a),h=this.position.w-this._box.w;r=s*h}if(this.vbar){var f=o+this._vbarYMin,m=f+this._vbarTranslateMax,c=M.constrain(v.event.y,f,m),T=(c-f)/(m-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,i=this.position.h-this._box.h;if(r=M.constrain(r||0,0,a),o=M.constrain(o||0,0,i),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 n=r/a;this.hbar.call(S.setTranslate,r+n*this._hbarTranslateMax,o)}if(this.vbar){var s=o/i;this.vbar.call(S.setTranslate,r,o+s*this._vbarTranslateMax)}}}}),x9=He({"src/components/updatemenus/draw.js"(Z,q){"use strict";var v=Vn(),_=bc(),S=$n(),M=as(),e=sa(),t=su(),r=zl().arrayEditor,o=uh().LINE_SPACING,a=F2(),i=_9();q.exports=function(P){var z=P._fullLayout,F=e.filterVisible(z[a.name]);function N(ce){_.autoMargin(P,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(){v.select(this).selectAll("g."+a.headerGroupClassName).each(N)}).remove(),F.length!==0){var L=O.selectAll("g."+a.headerGroupClassName).data(F,n);L.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]:[]);W.enter().append("g").classed(a.containerClassName,!0).style("cursor",L?null:"ew-resize");function $(Y){Y._commandObserver&&(Y._commandObserver.remove(),delete Y._commandObserver),_.autoMargin(O,f(Y))}if(W.exit().each(function(){v.select(this).selectAll("g."+a.groupClassName).each($)}).remove(),B.length!==0){var ue=W.selectAll("g."+a.groupClassName).data(B,c);ue.enter().append("g").classed(a.groupClassName,!0),ue.exit().each($).remove();for(var ce=0;ce0&&(ue=ue.transition().duration(O.transition.duration).ease(O.transition.easing)),ue.attr("transform",t($-a.gripWidth*.5,O._dims.currentValueTotalHeight))}}function D(N,O){var L=N._dims;return L.inputAreaStart+a.stepInset+(L.inputAreaLength-2*a.stepInset)*Math.min(1,Math.max(0,O))}function P(N,O){var L=N._dims;return Math.min(1,Math.max(0,(O-a.stepInset-L.inputAreaStart)/(L.inputAreaLength-2*a.stepInset-2*L.inputAreaStart)))}function z(N,O,L){var U=L._dims,B=e.ensureSingle(N,"rect",a.railTouchRectClass,function(W){W.call(d,O,N,L).style("pointer-events","all")});B.attr({width:U.inputAreaLength,height:Math.max(U.inputAreaWidth,a.tickOffset+L.ticklen+U.labelHeight)}).call(S.fill,L.bgcolor).attr("opacity",0),M.setTranslate(B,0,U.currentValueTotalHeight)}function F(N,O){var L=O._dims,U=L.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"),M.setTranslate(B,a.railInset,(L.inputAreaWidth-a.railWidth)*.5+L.currentValueTotalHeight)}}}),A9=He({"src/components/sliders/index.js"(Z,q){"use strict";var v=O_();q.exports={moduleType:"component",name:v.name,layoutAttributes:G5(),supplyLayoutDefaults:w9(),draw:T9()}}}),O2=He({"src/components/rangeslider/attributes.js"(Z,q){"use strict";var v=sh();q.exports={bgcolor:{valType:"color",dflt:v.background,editType:"plot"},bordercolor:{valType:"color",dflt:v.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,q){"use strict";q.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,q){"use strict";q.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}}}),S9=He({"src/components/rangeslider/helpers.js"(Z){"use strict";var q=tf(),v=su(),_=B2(),S=uh().LINE_SPACING,M=_.name;function e(t){var r=t&&t[M];return r&&r.visible}Z.isVisible=e,Z.makeData=function(t){for(var r=q.list({_fullLayout:t},"x",!0),o=t.margin,a=[],i=0;i=nt.max)je=pe[at+1];else if(Pe=nt.pmax)je=pe[at+1];else if(Pe0?d.touches[0].clientX:0}function m(d,u,g,y){if(u._context.staticPlot)return;var D=d.select("rect."+h.slideBoxClassName).node(),P=d.select("rect."+h.grabAreaMinClassName).node(),z=d.select("rect."+h.grabAreaMaxClassName).node();function F(){var N=v.event,O=N.target,L=f(N),U=L-d.node().getBoundingClientRect().left,B=y.d2p(g._rl[0]),W=y.d2p(g._rl[1]),$=n.coverSlip();this.addEventListener("touchmove",ue),this.addEventListener("touchend",ce),$.addEventListener("mousemove",ue),$.addEventListener("mouseup",ce);function ue(de){var Y=f(de),X=+Y-L,Q,V,le;switch(O){case D:if(le="ew-resize",B+X>g._length||W+X<0)return;Q=B+X,V=W+X;break;case P:if(le="col-resize",B+X>g._length)return;Q=B+X,V=W;break;case z:if(le="col-resize",W+X<0)return;Q=B,V=W+X;break;default:le="ew-resize",Q=U,V=U+X;break}if(V0);if(x){var w=o(n,s,h);T("x",w[0]),T("y",w[1]),v.noneOrAll(i,n,["x","y"]),T("xanchor"),T("yanchor"),v.coerceFont(T,"font",s.font);var A=T("bgcolor");T("activecolor",_.contrast(A,t.lightAmount,t.darkAmount)),T("bordercolor"),T("borderwidth")}};function r(a,i,n,s){var h=s.calendar;function f(T,l){return v.coerce(a,i,e.buttons,T,l)}var m=f("visible");if(m){var c=f("step");c!=="all"&&(h&&h!=="gregorian"&&(c==="month"||c==="year")?i.stepmode="backward":f("stepmode"),f("count")),f("label")}}function o(a,i,n){for(var s=n.filter(function(c){return i[c].anchor===a._id}),h=0,f=0;f1)){delete h.grid;return}if(!T&&!l&&!x){var g=b("pattern")==="independent";g&&(T=!0)}p._hasSubplotGrid=T;var y=b("roworder"),D=y==="top to bottom",P=T?.2:.1,z=T?.3:.1,F,N;w&&h._splomGridDflt&&(F=h._splomGridDflt.xside,N=h._splomGridDflt.yside),p._domains={x:a("x",b,P,F,u),y:a("y",b,z,N,d,D)}}function a(s,h,f,m,c,T){var l=h(s+"gap",f),x=h("domain."+s);h(s+"side",m);for(var w=new Array(c),A=x[0],E=(x[1]-A)/(c-l),p=E*(1-l),b=0;b0,m=r._context.staticPlot;o.each(function(c){var T=c[0].trace,l=T.error_x||{},x=T.error_y||{},w;T.ids&&(w=function(b){return b.id});var A=M.hasMarkers(T)&&T.marker.maxdisplayed>0;!x.visible&&!l.visible&&(c=[]);var E=v.select(this).selectAll("g.errorbar").data(c,w);if(E.exit().remove(),!!c.length){l.visible||E.selectAll("path.xerror").remove(),x.visible||E.selectAll("path.yerror").remove(),E.style("opacity",1);var p=E.enter().append("g").classed("errorbar",!0);f&&p.style("opacity",0).transition().duration(i.duration).style("opacity",1),S.setClipUrl(E,a.layerClipId,r),E.each(function(b){var d=v.select(this),u=e(b,s,h);if(!(A&&!b.vis)){var g,y=d.select("path.yerror");if(x.visible&&_(u.x)&&_(u.yh)&&_(u.ys)){var D=x.width;g="M"+(u.x-D)+","+u.yh+"h"+2*D+"m-"+D+",0V"+u.ys,u.noYS||(g+="m-"+D+",0h"+2*D),n=!y.size(),n?y=d.append("path").style("vector-effect",m?"none":"non-scaling-stroke").classed("yerror",!0):f&&(y=y.transition().duration(i.duration).ease(i.easing)),y.attr("d",g)}else y.remove();var P=d.select("path.xerror");if(l.visible&&_(u.y)&&_(u.xh)&&_(u.xs)){var z=(l.copy_ystyle?x:l).width;g="M"+u.xh+","+(u.y-z)+"v"+2*z+"m0,-"+z+"H"+u.xs,u.noXS||(g+="m0,-"+z+"v"+2*z),n=!P.size(),n?P=d.append("path").style("vector-effect",m?"none":"non-scaling-stroke").classed("xerror",!0):f&&(P=P.transition().duration(i.duration).ease(i.easing)),P.attr("d",g)}else P.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),_(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),_(a.xs)||(a.noXS=!0,a.xs=r.c2p(t.xs,!0))),a}}}),O9=He({"src/components/errorbars/style.js"(Z,q){"use strict";var v=Vn(),_=$n();q.exports=function(M){M.each(function(e){var t=e[0].trace,r=t.error_y||{},o=t.error_x||{},a=v.select(this);a.selectAll("path.yerror").style("stroke-width",r.thickness+"px").call(_.stroke,r.color),o.copy_ystyle&&(o=r),a.selectAll("path.xerror").style("stroke-width",o.thickness+"px").call(_.stroke,o.color)})}}}),B9=He({"src/components/errorbars/index.js"(Z,q){"use strict";var v=sa(),_=pc().overrideAll,S=Z5(),M={error_x:v.extendFlat({},S),error_y:v.extendFlat({},S)};delete M.error_x.copy_zstyle,delete M.error_y.copy_zstyle,delete M.error_y.copy_ystyle;var e={error_x:v.extendFlat({},S),error_y:v.extendFlat({},S),error_z:v.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,q.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:M,bar:M,histogram:M,scatter3d:_(e,"calc","nested"),scattergl:_(M,"calc","nested")}},supplyDefaults:D9(),calc:z9(),makeComputeError:Y5(),plot:F9(),style:O9(),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))}}}),N9=He({"src/components/colorbar/constants.js"(Z,q){"use strict";q.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"}}}}),U9=He({"src/components/colorbar/draw.js"(Z,q){"use strict";var v=Vn(),_=Ch(),S=bc(),M=so(),e=Wo(),t=Ap(),r=sa(),o=r.strTranslate,a=rs().extendFlat,i=Kd(),n=as(),s=$n(),h=K0(),f=su(),m=wp().flipScale,c=F_(),T=R2(),l=Xh(),x=uh(),w=x.LINE_SPACING,A=x.FROM_TL,E=x.FROM_BR,p=N9().cn;function b(P){var z=P._fullLayout,F=z._infolayer.selectAll("g."+p.colorbar).data(d(P),function(N){return N._id});F.enter().append("g").attr("class",function(N){return N._id}).classed(p.colorbar,!0),F.each(function(N){var O=v.select(this);r.ensureSingle(O,"rect",p.cbbg),r.ensureSingle(O,"g",p.cbfills),r.ensureSingle(O,"g",p.cblines),r.ensureSingle(O,"g",p.cbaxis,function(U){U.classed(p.crisp,!0)}),r.ensureSingle(O,"g",p.cbtitleunshift,function(U){U.append("g").classed(p.cbtitle,!0)}),r.ensureSingle(O,"rect",p.cboutline);var L=u(O,N,P);L&&L.then&&(P._promises||[]).push(L),P._context.edits.colorbarPosition&&g(O,N,P)}),F.exit().each(function(N){S.autoMargin(P,N._id)}).remove(),F.order()}function d(P){var z=P._fullLayout,F=P.calcdata,N=[],O,L,U,B;function W(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(P,U,O):(O._fillgradient=L.reversescale?m(L.colorscale):L.colorscale,O._zrange=[L[B.min],L[B.max]])}for(var ue=0;ue1){var Fe=Math.pow(10,Math.floor(Math.log(_t)/Math.LN10));kr*=Fe*r.roundUp(_t/Fe,[2,5,10]),(Math.abs(at.start)/at.size+1e-6)%1<2e-6&&(vr.tick0=0)}vr.dtick=kr}vr.domain=N?[Vt+X/ee.h,Vt+Ce-X/ee.h]:[Vt+Y/ee.w,Vt+Ce-Y/ee.w],vr.setScale(),P.attr("transform",o(Math.round(ee.l),Math.round(ee.t)));var Ye=P.select("."+p.cbtitleunshift).attr("transform",o(-Math.round(ee.l),-Math.round(ee.t))),Ae=vr.ticklabelposition,Le=vr.title.font.size,We=P.select("."+p.cbaxis),Ke,st=0,ot=0;function Ut(or,nr){var Pr={propContainer:vr,propName:z._propPrefix+"title.text",traceIndex:z._traceIndex,_meta:z._meta,placeholder:j._dfltTitle.colorbar,containerGroup:P.select("."+p.cbtitle)},_a=or.charAt(0)==="h"?or.slice(1):"h"+or;P.selectAll("."+_a+",."+_a+"-math-group").remove(),h.draw(F,or,a(Pr,nr||{}))}function Ct(){if(N&&qr||!N&&!qr){var or,nr;Se==="top"&&(or=Y+ee.l+Ze*Q,nr=X+ee.t+rt*(1-Vt-Ce)+3+Le*.75),Se==="bottom"&&(or=Y+ee.l+Ze*Q,nr=X+ee.t+rt*(1-Vt)-3-Le*.25),Se==="right"&&(nr=X+ee.t+rt*V+3+Le*.75,or=Y+ee.l+Ze*Vt),Ut(vr._id+"title",{attributes:{x:or,y:nr,"text-anchor":N?"start":"middle"}})}}function Pt(){if(N&&!qr||!N&&qr){var or=vr.position||0,nr=vr._offset+vr._length/2,Pr,_a;if(Se==="right")_a=nr,Pr=ee.l+Ze*or+10+Le*(vr.showticklabels?1:.5);else if(Pr=nr,Se==="bottom"&&(_a=ee.t+rt*or+10+(Ae.indexOf("inside")===-1?vr.tickfont.size:0)+(vr.ticks!=="inside"&&z.ticklen||0)),Se==="top"){var Fa=we.text.split("
").length;_a=ee.t+rt*or+10-he-w*Le*Fa}Ut((N?"h":"v")+vr._id+"title",{avoid:{selection:v.select(F).selectAll("g."+vr._id+"tick"),side:Se,offsetTop:N?0:ee.t,offsetLeft:N?ee.l:0,maxShift:N?j.width:j.height},attributes:{x:Pr,y:_a,"text-anchor":"middle"},transform:{rotate:N?-90:0,offset:0}})}}function jt(){if(!N&&!qr||N&&qr){var or=P.select("."+p.cbtitle),nr=or.select("text"),Pr=[-W/2,W/2],_a=or.select(".h"+vr._id+"title-math-group").node(),Fa=15.6;nr.node()&&(Fa=parseInt(nr.node().style.fontSize,10)*w);var Ra;if(_a?(Ra=n.bBox(_a),ot=Ra.width,st=Ra.height,st>Fa&&(Pr[1]-=(st-Fa)/2)):nr.node()&&!nr.classed(p.jsPlaceholder)&&(Ra=n.bBox(nr.node()),ot=Ra.width,st=Ra.height),N){if(st){if(st+=5,Se==="top")vr.domain[1]-=st/ee.h,Pr[1]*=-1;else{vr.domain[0]+=st/ee.h;var qa=f.lineCount(nr);Pr[1]+=(1-qa)*Fa}or.attr("transform",o(Pr[0],Pr[1])),vr.setScale()}}else ot&&(Se==="right"&&(vr.domain[0]+=(ot+Le/2)/ee.w),or.attr("transform",o(Pr[0],Pr[1])),vr.setScale())}P.selectAll("."+p.cbfills+",."+p.cblines).attr("transform",N?o(0,Math.round(ee.h*(1-vr.domain[1]))):o(Math.round(ee.w*vr.domain[0]),0)),We.attr("transform",N?o(0,Math.round(-ee.t)):o(Math.round(-ee.l),0));var Wa=P.select("."+p.cbfills).selectAll("rect."+p.cbfill).attr("style","").data(tt);Wa.enter().append("rect").classed(p.cbfill,!0).attr("style",""),Wa.exit().remove();var Ca=Re.map(vr.c2p).map(Math.round).sort(function(Zt,Jt){return Zt-Jt});Wa.each(function(Zt,Jt){var Fr=[Jt===0?Re[0]:(tt[Jt]+tt[Jt-1])/2,Jt===tt.length-1?Re[1]:(tt[Jt]+tt[Jt+1])/2].map(vr.c2p).map(Math.round);N&&(Fr[1]=r.constrain(Fr[1]+(Fr[1]>Fr[0])?1:-1,Ca[0],Ca[1]));var ta=v.select(this).attr(N?"x":"y",Je).attr(N?"y":"x",v.min(Fr)).attr(N?"width":"height",Math.max(he,2)).attr(N?"height":"width",Math.max(v.max(Fr)-v.min(Fr),2));if(z._fillgradient)n.gradient(ta,F,z._id,N?"vertical":"horizontalreversed",z._fillgradient,"fill");else{var ra=je(Zt).replace("e-","");ta.attr("fill",_(ra).toHexString())}});var hi=P.select("."+p.cblines).selectAll("path."+p.cbline).data(pe.color&&pe.width?Ve:[]);hi.enter().append("path").classed(p.cbline,!0),hi.exit().remove(),hi.each(function(Zt){var Jt=Je,Fr=Math.round(vr.c2p(Zt))+pe.width/2%1;v.select(this).attr("d","M"+(N?Jt+","+Fr:Fr+","+Jt)+(N?"h":"v")+he).call(n.lineGroupStyle,pe.width,Pe(Zt),pe.dash)}),We.selectAll("g."+vr._id+"tick,path").remove();var wi=Je+he+(W||0)/2-(z.ticks==="outside"?1:0),Yt=e.calcTicks(vr),Rt=e.getTickSigns(vr)[2];return e.drawTicks(F,vr,{vals:vr.ticks==="inside"?e.clipEnds(vr,Yt):Yt,layer:We,path:e.makeTickPath(vr,wi,Rt),transFn:e.makeTransTickFn(vr)}),e.drawLabels(F,vr,{vals:Yt,layer:We,transFn:e.makeTransTickLabelFn(vr),labelFns:e.makeLabelFns(vr,wi)})}function cr(){var or,nr=he+W/2;Ae.indexOf("inside")===-1&&(or=n.bBox(We.node()),nr+=N?or.width:or.height),Ke=Ye.select("text");var Pr=0,_a=N&&Se==="top",Fa=!N&&Se==="right",Ra=0;if(Ke.node()&&!Ke.classed(p.jsPlaceholder)){var qa,Wa=Ye.select(".h"+vr._id+"title-math-group").node();Wa&&(N&&qr||!N&&!qr)?(or=n.bBox(Wa),Pr=or.width,qa=or.height):(or=n.bBox(Ye.node()),Pr=or.right-ee.l-(N?Je:Ar),qa=or.bottom-ee.t-(N?Ar:Je),!N&&Se==="top"&&(nr+=or.height,Ra=or.height)),Fa&&(Ke.attr("transform",o(Pr/2+Le/2,0)),Pr*=2),nr=Math.max(nr,N?Pr:qa)}var Ca=(N?Y:X)*2+nr+$+W/2,hi=0;!N&&we.text&&de==="bottom"&&V<=0&&(hi=Ca/2,Ca+=hi,Ra+=hi),j._hColorbarMoveTitle=hi,j._hColorbarMoveCBTitle=Ra;var wi=$+W,Yt=(N?Je:Ar)-wi/2-(N?Y:0),Rt=(N?Ar:Je)-(N?ne:X+Ra-hi);P.select("."+p.cbbg).attr("x",Yt).attr("y",Rt).attr(N?"width":"height",Math.max(Ca-hi,2)).attr(N?"height":"width",Math.max(ne+wi,2)).call(s.fill,ue).call(s.stroke,z.bordercolor).style("stroke-width",$);var Zt=Fa?Math.max(Pr-10,0):0;P.selectAll("."+p.cboutline).attr("x",(N?Je:Ar+Y)+Zt).attr("y",(N?Ar+X-ne:Je)+(_a?st:0)).attr(N?"width":"height",Math.max(he,2)).attr(N?"height":"width",Math.max(ne-(N?2*X+st:2*Y+Zt),2)).call(s.stroke,z.outlinecolor).style({fill:"none","stroke-width":W});var Jt=N?St*Ca:0,Fr=N?0:(1-kt)*Ca-Ra;if(Jt=ae?ee.l-Jt:-Jt,Fr=le?ee.t-Fr:-Fr,P.attr("transform",o(Jt,Fr)),!N&&($||_(ue).getAlpha()&&!_.equals(j.paper_bgcolor,ue))){var ta=We.selectAll("text"),ra=ta[0].length,ca=P.select("."+p.cbbg).node(),Ba=n.bBox(ca),$a=n.getTranslate(P),Za=2;ta.each(function(Cr,wr){var Rr=0,Nr=ra-1;if(wr===Rr||wr===Nr){var Hr=n.bBox(this),gt=n.getTranslate(this),Kt;if(wr===Nr){var mr=Hr.right+gt.x,Ir=Ba.right+$a.x+Ar-$-Za+Q;Kt=Ir-mr,Kt>0&&(Kt=0)}else if(wr===Rr){var va=Hr.left+gt.x,Pa=Ba.left+$a.x+Ar+$+Za;Kt=Pa-va,Kt<0&&(Kt=0)}Kt&&(ra<3?this.setAttribute("transform","translate("+Kt+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var ri={},pi=A[ce],Ia=E[ce],rn=A[de],tn=E[de],cn=Ca-he;N?(L==="pixels"?(ri.y=V,ri.t=ne*rn,ri.b=ne*tn):(ri.t=ri.b=0,ri.yt=V+O*rn,ri.yb=V-O*tn),B==="pixels"?(ri.x=Q,ri.l=Ca*pi,ri.r=Ca*Ia):(ri.l=cn*pi,ri.r=cn*Ia,ri.xl=Q-U*pi,ri.xr=Q+U*Ia)):(L==="pixels"?(ri.x=Q,ri.l=ne*pi,ri.r=ne*Ia):(ri.l=ri.r=0,ri.xl=Q+O*pi,ri.xr=Q-O*Ia),B==="pixels"?(ri.y=1-V,ri.t=Ca*rn,ri.b=Ca*tn):(ri.t=cn*rn,ri.b=cn*tn,ri.yt=V-U*rn,ri.yb=V+U*tn));var xt=z.y<.5?"b":"t",ut=z.x<.5?"l":"r";F._fullLayout._reservedMargin[z._id]={};var Or={r:j.width-Yt-Jt,l:Yt+ri.r,b:j.height-Rt-Fr,t:Rt+ri.b};ae&&le?S.autoMargin(F,z._id,ri):ae?F._fullLayout._reservedMargin[z._id][xt]=Or[xt]:le||N?F._fullLayout._reservedMargin[z._id][ut]=Or[ut]:F._fullLayout._reservedMargin[z._id][xt]=Or[xt]}return r.syncOrAsync([S.previousPromises,Ct,jt,Pt,S.previousPromises,cr],F)}function g(P,z,F){var N=z.orientation==="v",O=F._fullLayout,L=O._size,U,B,W;t.init({element:P.node(),gd:F,prepFn:function(){U=P.attr("transform"),i(P)},moveFn:function($,ue){P.attr("transform",U+o($,ue)),B=t.align((N?z._uFrac:z._vFrac)+$/L.w,N?z._thickFrac:z._lenFrac,0,1,z.xanchor),W=t.align((N?z._vFrac:1-z._uFrac)-ue/L.h,N?z._lenFrac:z._thickFrac,0,1,z.yanchor);var ce=t.getCursor(B,W,z.xanchor,z.yanchor);i(P,ce)},doneFn:function(){if(i(P),B!==void 0&&W!==void 0){var $={};$[z._propPrefix+"x"]=B,$[z._propPrefix+"y"]=W,z._traceIndex!==void 0?M.call("_guiRestyle",F,$,z._traceIndex):M.call("_guiRelayout",F,$)}}})}function y(P,z,F){var N=z._levels,O=[],L=[],U,B,W=N.end+N.size/100,$=N.size,ue=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>=W:U<=W));B++)U>ue&&U0?U>=W:U<=W));B++)U>F[0]&&U-1}q.exports=function(o,a){var i,n=o.data,s=o.layout,h=M([],n),f=M({},s,e(a.tileClass)),m=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(i=0;i=0)return m}else if(typeof m=="string"&&(m=m.trim(),m.slice(-1)==="%"&&v(m.slice(0,-1))&&(m=+m.slice(0,-1),m>=0)))return m+"%"}function f(m,c,T,l,x,w){w=w||{};var A=w.moduleHasSelected!==!1,E=w.moduleHasUnselected!==!1,p=w.moduleHasConstrain!==!1,b=w.moduleHasCliponaxis!==!1,d=w.moduleHasTextangle!==!1,u=w.moduleHasInsideanchor!==!1,g=!!w.hasPathbar,y=Array.isArray(x)||x==="auto",D=y||x==="inside",P=y||x==="outside";if(D||P){var z=i(l,"textfont",T.font),F=_.extendFlat({},z),N=m.textfont&&m.textfont.color,O=!N;if(O&&delete F.color,i(l,"insidetextfont",F),g){var L=_.extendFlat({},z);O&&delete L.color,i(l,"pathbar.textfont",L)}P&&i(l,"outsidetextfont",z),A&&l("selected.textfont.color"),E&&l("unselected.textfont.color"),p&&l("constraintext"),b&&l("cliponaxis"),d&&l("textangle"),l("texttemplate"),l("texttemplatefallback")}D&&u&&l("insidetextanchor")}q.exports={supplyDefaults:n,crossTraceDefaults:s,handleText:f,validateCornerradius:h}}}),J5=He({"src/traces/bar/layout_defaults.js"(Z,q){"use strict";var v=so(),_=Wo(),S=sa(),M=U2(),e=gd().validateCornerradius;q.exports=function(t,r,o){function a(A,E){return S.coerce(t,r,M,A,E)}for(var i=!1,n=!1,s=!1,h={},f=a("barmode"),m=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"]);x.type!=="category"&&(n=!0)}}if(!i){delete r.barmode;return}f!=="overlay"&&a("barnorm"),a("bargap",n&&!s?0:.2),a("bargroupgap");var w=a("barcornerradius");r.barcornerradius=e(w)}}}),B_=He({"src/traces/bar/arrays_to_calcdata.js"(Z,q){"use strict";var v=sa();q.exports=function(S,M){for(var e=0;er;if(!o)return M}return e!==void 0?e:S.dflt},Z.coerceColor=function(S,M,e){return v(M).isValid()?M:e!==void 0?e:S.dflt},Z.coerceEnumerated=function(S,M,e){return S.coerceNumber&&(M=+M),S.values.indexOf(M)!==-1?M:e!==void 0?e:S.dflt},Z.getValue=function(S,M){var e;return _(S)?M1||g.bargap===0&&g.bargroupgap===0&&!y[0].trace.marker.line.width)&&v.select(this).attr("shape-rendering","crispEdges")}),d.selectAll("g.points").each(function(y){var D=v.select(this),P=y[0].trace;h(D,P,b)}),e.getComponentMethod("errorbars","style")(d)}function h(b,d,u){S.pointStyle(b.selectAll("path"),d,u),f(b,d,u)}function f(b,d,u){b.selectAll("text").each(function(g){var y=v.select(this),D=M.ensureUniformFontSize(u,l(y,g,d,u));S.font(y,D)})}function m(b,d,u){var g=d[0].trace;g.selectedpoints?c(u,g,b):(h(u,g,b),e.getComponentMethod("errorbars","style")(u))}function c(b,d,u){S.selectedPointStyle(b.selectAll("path"),d),T(b.selectAll("text"),d,u)}function T(b,d,u){b.each(function(g){var y=v.select(this),D;if(g.selected){D=M.ensureUniformFontSize(u,l(y,g,d,u));var P=d.selected.textfont&&d.selected.textfont.color;P&&(D.color=P),S.font(y,D)}else S.selectedTextStyle(y,d)})}function l(b,d,u,g){var y=g._fullLayout.font,D=u.textfont;if(b.classed("bartext-inside")){var P=p(d,u);D=w(u,d.i,y,P)}else b.classed("bartext-outside")&&(D=A(u,d.i,y));return D}function x(b,d,u){return E(o,b.textfont,d,u)}function w(b,d,u,g){var y=x(b,d,u),D=b._input.textfont===void 0||b._input.textfont.color===void 0||Array.isArray(b.textfont.color)&&b.textfont.color[d]===void 0;return D&&(y={color:_.contrast(g),family:y.family,size:y.size,weight:y.weight,style:y.style,variant:y.variant,textcase:y.textcase,lineposition:y.lineposition,shadow:y.shadow}),E(a,b.insidetextfont,d,y)}function A(b,d,u){var g=x(b,d,u);return E(i,b.outsidetextfont,d,g)}function E(b,d,u,g){d=d||{};var y=n.getValue(d.family,u),D=n.getValue(d.size,u),P=n.getValue(d.color,u),z=n.getValue(d.weight,u),F=n.getValue(d.style,u),N=n.getValue(d.variant,u),O=n.getValue(d.textcase,u),L=n.getValue(d.lineposition,u),U=n.getValue(d.shadow,u);return{family:n.coerceString(b.family,y,g.family),size:n.coerceNumber(b.size,D,g.size),color:n.coerceColor(b.color,P,g.color),weight:n.coerceString(b.weight,z,g.weight),style:n.coerceString(b.style,F,g.style),variant:n.coerceString(b.variant,N,g.variant),textcase:n.coerceString(b.variant,O,g.textcase),lineposition:n.coerceString(b.variant,L,g.lineposition),shadow:n.coerceString(b.variant,U,g.shadow)}}function p(b,d){return d.type==="waterfall"?d[b.dir].marker.color:b.mcc||b.mc||d.marker.color}q.exports={style:s,styleTextPoints:f,styleOnSelect:m,getInsideTextFont:w,getOutsideTextFont:A,getBarColor:p,resizeText:t}}}),tg=He({"src/traces/bar/plot.js"(Z,q){"use strict";var v=Vn(),_=ns(),S=sa(),M=su(),e=$n(),t=as(),r=so(),o=Wo().tickText,a=Sp(),i=a.recordMinTextSize,n=a.clearMinTextSize,s=Nd(),h=q2(),f=n0(),m=Sv(),c=m.text,T=m.textposition,l=$p().appendArrayPointValue,x=f.TEXTPAD;function w($){return $.id}function A($){if($.ids)return w}function E($){return($>0)-($<0)}function p($,ue){return $0}function g($,ue,ce,de,Y,X){var Q=ue.xaxis,V=ue.yaxis,le=$._fullLayout,ae=$._context.staticPlot;Y||(Y={mode:le.barmode,norm:le.barmode,gap:le.bargap,groupgap:le.bargroupgap},n("bar",le));var j=S.makeTraceGroups(de,ce,"trace bars").each(function(ee){var te=v.select(this),pe=ee[0].trace,we=ee[0].t,Se=pe.type==="waterfall",Re=pe.type==="funnel",Pe=pe.type==="histogram",je=pe.type==="bar",at=je||Re,nt=0;Se&&pe.connector.visible&&pe.connector.mode==="between"&&(nt=pe.connector.line.width/2);var tt=pe.orientation==="h",Ve=u(Y),he=S.ensureSingle(te,"g","points"),se=A(pe),ne=he.selectAll("g.point").data(S.identity,se);ne.enter().append("g").classed("point",!0),ne.exit().remove(),ne.each(function(Ze,rt){var Je=v.select(this),St=b(Ze,Q,V,tt),kt=St[0][0],Bt=St[0][1],Vt=St[1][0],Ar=St[1][1],vr=(tt?Bt-kt:Ar-Vt)===0;vr&&at&&h.getLineWidth(pe,Ze)&&(vr=!1),vr||(vr=!_(kt)||!_(Bt)||!_(Vt)||!_(Ar)),Ze.isBlank=vr,vr&&(tt?Bt=kt:Ar=Vt),nt&&!vr&&(tt?(kt-=p(kt,Bt)*nt,Bt+=p(kt,Bt)*nt):(Vt-=p(Vt,Ar)*nt,Ar+=p(Vt,Ar)*nt));var qr,kr;if(pe.type==="waterfall"){if(!vr){var Ur=pe[Ze.dir].marker;qr=Ur.line.width,kr=Ur.color}}else qr=h.getLineWidth(pe,Ze),kr=Ze.mc||pe.marker.color;function _t(wi){var Yt=v.round(qr/2%1,2);return Y.gap===0&&Y.groupgap===0?v.round(Math.round(wi)-Yt,2):wi}function Fe(wi,Yt,Rt){return Rt&&wi===Yt?wi:Math.abs(wi-Yt)>=2?_t(wi):wi>Yt?Math.ceil(wi):Math.floor(wi)}var Ye=e.opacity(kr),Ae=Ye<1||qr>.01?_t:Fe;$._context.staticPlot||(kt=Ae(kt,Bt,tt),Bt=Ae(Bt,kt,tt),Vt=Ae(Vt,Ar,!tt),Ar=Ae(Ar,Vt,!tt));var Le=tt?Q.c2p:V.c2p,We;Ze.s0>0?We=Ze._sMax:Ze.s0<0?We=Ze._sMin:We=Ze.s1>0?Ze._sMax:Ze._sMin;function Ke(wi,Yt){if(!wi)return 0;var Rt=Math.abs(tt?Ar-Vt:Bt-kt),Zt=Math.abs(tt?Bt-kt:Ar-Vt),Jt=Ae(Math.abs(Le(We,!0)-Le(0,!0))),Fr=Ze.hasB?Math.min(Rt/2,Zt/2):Math.min(Rt/2,Jt),ta;if(Yt==="%"){var ra=Math.min(50,wi);ta=Rt*(ra/100)}else ta=wi;return Ae(Math.max(Math.min(ta,Fr),0))}var st=je||Pe?Ke(we.cornerradiusvalue,we.cornerradiusform):0,ot,Ut,Ct="M"+kt+","+Vt+"V"+Ar+"H"+Bt+"V"+Vt+"Z",Pt=0;if(st&&Ze.s){var jt=E(Ze.s0)===0||E(Ze.s)===E(Ze.s0)?Ze.s1:Ze.s0;if(Pt=Ae(Ze.hasB?0:Math.abs(Le(We,!0)-Le(jt,!0))),Pt0?Math.sqrt(Pt*(2*st-Pt)):0,Fa=cr>0?Math.max:Math.min;ot="M"+kt+","+Vt+"V"+(Ar-Pr*or)+"H"+Fa(Bt-(st-Pt)*cr,kt)+"A "+st+","+st+" 0 0 "+nr+" "+Bt+","+(Ar-st*or-_a)+"V"+(Vt+st*or+_a)+"A "+st+","+st+" 0 0 "+nr+" "+Fa(Bt-(st-Pt)*cr,kt)+","+(Vt+Pr*or)+"Z"}else if(Ze.hasB)ot="M"+(kt+st*cr)+","+Vt+"A "+st+","+st+" 0 0 "+nr+" "+kt+","+(Vt+st*or)+"V"+(Ar-st*or)+"A "+st+","+st+" 0 0 "+nr+" "+(kt+st*cr)+","+Ar+"H"+(Bt-st*cr)+"A "+st+","+st+" 0 0 "+nr+" "+Bt+","+(Ar-st*or)+"V"+(Vt+st*or)+"A "+st+","+st+" 0 0 "+nr+" "+(Bt-st*cr)+","+Vt+"Z";else{Ut=Math.abs(Ar-Vt)+Pt;var Ra=Ut0?Math.sqrt(Pt*(2*st-Pt)):0,Wa=or>0?Math.max:Math.min;ot="M"+(kt+Ra*cr)+","+Vt+"V"+Wa(Ar-(st-Pt)*or,Vt)+"A "+st+","+st+" 0 0 "+nr+" "+(kt+st*cr-qa)+","+Ar+"H"+(Bt-st*cr+qa)+"A "+st+","+st+" 0 0 "+nr+" "+(Bt-Ra*cr)+","+Wa(Ar-(st-Pt)*or,Vt)+"V"+Vt+"Z"}}else ot=Ct}else ot=Ct;var Ca=d(S.ensureSingle(Je,"path"),le,Y,X);if(Ca.style("vector-effect",ae?"none":"non-scaling-stroke").attr("d",isNaN((Bt-kt)*(Ar-Vt))||vr&&$._context.staticPlot?"M0,0Z":ot).call(t.setClipUrl,ue.layerClipId,$),!le.uniformtext.mode&&Ve){var hi=t.makePointStyleFns(pe);t.singlePointStyle(Ze,Ca,pe,hi,$)}y($,ue,Je,ee,rt,kt,Bt,Vt,Ar,st,Pt,Y,X),ue.layerClipId&&t.hideOutsideRangePoint(Ze,Je.select("text"),Q,V,pe.xcalendar,pe.ycalendar)});var Ce=pe.cliponaxis===!1;t.setClipUrl(te,Ce?null:ue.layerClipId,$)});r.getComponentMethod("errorbars","plot")($,j,ue,Y)}function y($,ue,ce,de,Y,X,Q,V,le,ae,j,ee,te){var pe=ue.xaxis,we=ue.yaxis,Se=$._fullLayout,Re;function Pe(Ut,Ct,Pt){var jt=S.ensureSingle(Ut,"text").text(Ct).attr({class:"bartext bartext-"+Re,"text-anchor":"middle","data-notex":1}).call(t.font,Pt).call(M.convertToTspans,$);return jt}var je=de[0].trace,at=je.orientation==="h",nt=L(Se,de,Y,pe,we);Re=U(je,Y);var tt=ee.mode==="stack"||ee.mode==="relative",Ve=de[Y],he=!tt||Ve._outmost,se=Ve.hasB,ne=ae&&ae-j>x;if(!nt||Re==="none"||(Ve.isBlank||X===Q||V===le)&&(Re==="auto"||Re==="inside")){ce.select("text").remove();return}var Ce=Se.font,Ze=s.getBarColor(de[Y],je),rt=s.getInsideTextFont(je,Y,Ce,Ze),Je=s.getOutsideTextFont(je,Y,Ce),St=je.insidetextanchor||"end",kt=ce.datum();at?pe.type==="log"&&kt.s0<=0&&(pe.range[0]0&&_t>0,Ae;ne?se?Ae=D(Ar-2*ae,vr,Ur,_t,at)||D(Ar,vr-2*ae,Ur,_t,at):at?Ae=D(Ar-(ae-j),vr,Ur,_t,at)||D(Ar,vr-2*(ae-j),Ur,_t,at):Ae=D(Ar,vr-(ae-j),Ur,_t,at)||D(Ar-2*(ae-j),vr,Ur,_t,at):Ae=D(Ar,vr,Ur,_t,at),Ye&&Ae?Re="inside":(Re="outside",qr.remove(),qr=null)}else Re="inside";if(!qr){Fe=S.ensureUniformFontSize($,Re==="outside"?Je:rt),qr=Pe(ce,nt,Fe);var Le=qr.attr("transform");if(qr.attr("transform",""),kr=t.bBox(qr.node()),Ur=kr.width,_t=kr.height,qr.attr("transform",Le),Ur<=0||_t<=0){qr.remove();return}}var We=je.textangle,Ke,st;Re==="outside"?(st=je.constraintext==="both"||je.constraintext==="outside",Ke=O(X,Q,V,le,kr,{isHorizontal:at,constrained:st,angle:We})):(st=je.constraintext==="both"||je.constraintext==="inside",Ke=F(X,Q,V,le,kr,{isHorizontal:at,constrained:st,angle:We,anchor:St,hasB:se,r:ae,overhead:j})),Ke.fontSize=Fe.size,i(je.type==="histogram"?"bar":je.type,Ke,Se),Ve.transform=Ke;var ot=d(qr,Se,ee,te);S.setTransormAndDisplay(ot,Ke)}function D($,ue,ce,de,Y){if($<0||ue<0)return!1;var X=ce<=$&&de<=ue,Q=ce<=ue&&de<=$,V=Y?$>=ce*(ue/de):ue>=de*($/ce);return X||Q||V}function P($){return $==="auto"?0:$}function z($,ue){var ce=Math.PI/180*ue,de=Math.abs(Math.sin(ce)),Y=Math.abs(Math.cos(ce));return{x:$.width*Y+$.height*de,y:$.width*de+$.height*Y}}function F($,ue,ce,de,Y,X){var Q=!!X.isHorizontal,V=!!X.constrained,le=X.angle||0,ae=X.anchor,j=ae==="end",ee=ae==="start",te=X.leftToRight||0,pe=(te+1)/2,we=1-pe,Se=X.hasB,Re=X.r,Pe=X.overhead,je=Y.width,at=Y.height,nt=Math.abs(ue-$),tt=Math.abs(de-ce),Ve=nt>2*x&&tt>2*x?x:0;nt-=2*Ve,tt-=2*Ve;var he=P(le);le==="auto"&&!(je<=nt&&at<=tt)&&(je>nt||at>tt)&&(!(je>tt||at>nt)||jex){var Ze=N($,ue,ce,de,se,Re,Pe,Q,Se);ne=Ze.scale,Ce=Ze.pad}else ne=1,V&&(ne=Math.min(1,nt/se.x,tt/se.y)),Ce=0;var rt=Y.left*we+Y.right*pe,Je=(Y.top+Y.bottom)/2,St=($+x)*we+(ue-x)*pe,kt=(ce+de)/2,Bt=0,Vt=0;if(ee||j){var Ar=(Q?se.x:se.y)/2;Re&&(j||Se)&&(Ve+=Ce);var vr=Q?p($,ue):p(ce,de);Q?ee?(St=$+vr*Ve,Bt=-vr*Ar):(St=ue-vr*Ve,Bt=vr*Ar):ee?(kt=ce+vr*Ve,Vt=-vr*Ar):(kt=de-vr*Ve,Vt=vr*Ar)}return{textX:rt,textY:Je,targetX:St,targetY:kt,anchorX:Bt,anchorY:Vt,scale:ne,rotate:he}}function N($,ue,ce,de,Y,X,Q,V,le){var ae=Math.max(0,Math.abs(ue-$)-2*x),j=Math.max(0,Math.abs(de-ce)-2*x),ee=X-x,te=Q?ee-Math.sqrt(ee*ee-(ee-Q)*(ee-Q)):ee,pe=le?ee*2:V?ee-Q:2*te,we=le?ee*2:V?2*te:ee-Q,Se,Re,Pe,je,at;return Y.y/Y.x>=j/(ae-pe)?je=j/Y.y:Y.y/Y.x<=(j-we)/ae?je=ae/Y.x:!le&&V?(Se=Y.x*Y.x+Y.y*Y.y/4,Re=-2*Y.x*(ae-ee)-Y.y*(j/2-ee),Pe=(ae-ee)*(ae-ee)+(j/2-ee)*(j/2-ee)-ee*ee,je=(-Re+Math.sqrt(Re*Re-4*Se*Pe))/(2*Se)):le?(Se=(Y.x*Y.x+Y.y*Y.y)/4,Re=-Y.x*(ae/2-ee)-Y.y*(j/2-ee),Pe=(ae/2-ee)*(ae/2-ee)+(j/2-ee)*(j/2-ee)-ee*ee,je=(-Re+Math.sqrt(Re*Re-4*Se*Pe))/(2*Se)):(Se=Y.x*Y.x/4+Y.y*Y.y,Re=-Y.x*(ae/2-ee)-2*Y.y*(j-ee),Pe=(ae/2-ee)*(ae/2-ee)+(j-ee)*(j-ee)-ee*ee,je=(-Re+Math.sqrt(Re*Re-4*Se*Pe))/(2*Se)),je=Math.min(1,je),V?at=Math.max(0,ee-Math.sqrt(Math.max(0,ee*ee-(ee-(j-Y.y*je)/2)*(ee-(j-Y.y*je)/2)))-Q):at=Math.max(0,ee-Math.sqrt(Math.max(0,ee*ee-(ee-(ae-Y.x*je)/2)*(ee-(ae-Y.x*je)/2)))-Q),{scale:je,pad:at}}function O($,ue,ce,de,Y,X){var Q=!!X.isHorizontal,V=!!X.constrained,le=X.angle||0,ae=Y.width,j=Y.height,ee=Math.abs(ue-$),te=Math.abs(de-ce),pe;Q?pe=te>2*x?x:0:pe=ee>2*x?x:0;var we=1;V&&(we=Q?Math.min(1,te/j):Math.min(1,ee/ae));var Se=P(le),Re=z(Y,Se),Pe=(Q?Re.x:Re.y)/2,je=(Y.left+Y.right)/2,at=(Y.top+Y.bottom)/2,nt=($+ue)/2,tt=(ce+de)/2,Ve=0,he=0,se=Q?p(ue,$):p(ce,de);return Q?(nt=ue-se*pe,Ve=se*Pe):(tt=de+se*pe,he=-se*Pe),{textX:je,textY:at,targetX:nt,targetY:tt,anchorX:Ve,anchorY:he,scale:we,rotate:Se}}function L($,ue,ce,de,Y){var X=ue[0].trace,Q=X.texttemplate,V;return Q?V=B($,ue,ce,de,Y):X.textinfo?V=W(ue,ce,de,Y):V=h.getValue(X.text,ce),h.coerceString(c,V)}function U($,ue){var ce=h.getValue($.textposition,ue);return h.coerceEnumerated(T,ce)}function B($,ue,ce,de,Y){var X=ue[0].trace,Q=S.castOption(X,ce,"texttemplate");if(!Q)return"";var V=X.type==="histogram",le=X.type==="waterfall",ae=X.type==="funnel",j=X.orientation==="h",ee,te,pe,we;j?(ee="y",te=Y,pe="x",we=de):(ee="x",te=de,pe="y",we=Y);function Se(Ve){return o(te,te.c2l(Ve),!0).text}function Re(Ve){return o(we,we.c2l(Ve),!0).text}var Pe=ue[ce],je={};je.label=Pe.p,je.labelLabel=je[ee+"Label"]=Se(Pe.p);var at=S.castOption(X,Pe.i,"text");(at===0||at)&&(je.text=at),je.value=Pe.s,je.valueLabel=je[pe+"Label"]=Re(Pe.s);var nt={};l(nt,X,Pe.i),(V||nt.x===void 0)&&(nt.x=j?je.value:je.label),(V||nt.y===void 0)&&(nt.y=j?je.label:je.value),(V||nt.xLabel===void 0)&&(nt.xLabel=j?je.valueLabel:je.labelLabel),(V||nt.yLabel===void 0)&&(nt.yLabel=j?je.labelLabel:je.valueLabel),le&&(je.delta=+Pe.rawS||Pe.s,je.deltaLabel=Re(je.delta),je.final=Pe.v,je.finalLabel=Re(je.final),je.initial=je.final-je.delta,je.initialLabel=Re(je.initial)),ae&&(je.value=Pe.s,je.valueLabel=Re(je.value),je.percentInitial=Pe.begR,je.percentInitialLabel=S.formatPercent(Pe.begR),je.percentPrevious=Pe.difR,je.percentPreviousLabel=S.formatPercent(Pe.difR),je.percentTotal=Pe.sumR,je.percenTotalLabel=S.formatPercent(Pe.sumR));var tt=S.castOption(X,Pe.i,"customdata");return tt&&(je.customdata=tt),S.texttemplateString({data:[nt,je,X._meta],fallback:X.texttemplatefallback,labels:je,locale:$._d3locale,template:Q})}function W($,ue,ce,de){var Y=$[0].trace,X=Y.orientation==="h",Q=Y.type==="waterfall",V=Y.type==="funnel";function le(tt){var Ve=X?de:ce;return o(Ve,tt,!0).text}function ae(tt){var Ve=X?ce:de;return o(Ve,+tt,!0).text}var j=Y.textinfo,ee=$[ue],te=j.split("+"),pe=[],we,Se=function(tt){return te.indexOf(tt)!==-1};if(Se("label")&&pe.push(le($[ue].p)),Se("text")&&(we=S.castOption(Y,ee.i,"text"),(we===0||we)&&pe.push(we)),Q){var Re=+ee.rawS||ee.s,Pe=ee.v,je=Pe-Re;Se("initial")&&pe.push(ae(je)),Se("delta")&&pe.push(ae(Re)),Se("final")&&pe.push(ae(Pe))}if(V){Se("value")&&pe.push(ae(ee.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(ee.begR),nt&&(we+=" of initial"),pe.push(we)),Se("percent previous")&&(we=S.formatPercent(ee.difR),nt&&(we+=" of previous"),pe.push(we)),Se("percent total")&&(we=S.formatPercent(ee.sumR),nt&&(we+=" of total"),pe.push(we))}return pe.join("
")}q.exports={plot:g,toMoveInsideBar:F}}}),f1=He({"src/traces/bar/hover.js"(Z,q){"use strict";var v=Hc(),_=so(),S=$n(),M=sa().fillText,e=q2().getLineWidth,t=Wo().hoverLabelText,r=Gs().BADNUM;function o(n,s,h,f,m){var c=a(n,s,h,f,m);if(c){var T=c.cd,l=T[0].trace,x=T[c.index];return c.color=i(l,x),_.getComponentMethod("errorbars","hoverInfo")(x,l,c),[c]}}function a(n,s,h,f,m){var c=n.cd,T=c[0].trace,l=c[0].t,x=f==="closest",w=T.type==="waterfall",A=n.maxHoverDistance,E=n.maxSpikeDistance,p,b,d,u,g,y,D;T.orientation==="h"?(p=h,b=s,d="y",u="x",g=de,y=$):(p=s,b=h,d="x",u="y",y=de,g=$);var P=T[d+"period"],z=x||P;function F(we){return O(we,-1)}function N(we){return O(we,1)}function O(we,Se){var Re=we.w;return we[d]+Se*Re/2}function L(we){return we[d+"End"]-we[d+"Start"]}var U=x?F:P?function(we){return we.p-L(we)/2}:function(we){return Math.min(F(we),we.p-l.bardelta/2)},B=x?N:P?function(we){return we.p+L(we)/2}:function(we){return Math.max(N(we),we.p+l.bardelta/2)};function W(we,Se,Re){return m.finiteRange&&(Re=0),v.inbox(we-p,Se-p,Re+Math.min(1,Math.abs(Se-we)/D)-1)}function $(we){return W(U(we),B(we),A)}function ue(we){return W(F(we),N(we),E)}function ce(we){var Se=we[u];if(w){var Re=Math.abs(we.rawS)||0;b>0?Se+=Re:b<0&&(Se-=Re)}return Se}function de(we){var Se=b,Re=we.b,Pe=ce(we);return v.inbox(Re-Se,Pe-Se,A+(Pe-Se)/(Pe-Re)-1)}function Y(we){var Se=b,Re=we.b,Pe=ce(we);return v.inbox(Re-Se,Pe-Se,E+(Pe-Se)/(Pe-Re)-1)}var X=n[d+"a"],Q=n[u+"a"];D=Math.abs(X.r2c(X.range[1])-X.r2c(X.range[0]));function V(we){return(g(we)+y(we))/2}var le=v.getDistanceFunction(f,g,y,V);if(v.getClosest(c,le,n),n.index!==!1&&c[n.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=n.index,j=c[ae],ee=T.base?j.b+j.s:j.s;n[u+"0"]=n[u+"1"]=Q.c2p(j[u],!0),n[u+"LabelVal"]=ee;var te=l.extents[l.extents.round(j.p)];n[d+"0"]=X.c2p(x?U(j):te[0],!0),n[d+"1"]=X.c2p(x?B(j):te[1],!0);var pe=j.orig_p!==void 0;return n[d+"LabelVal"]=pe?j.orig_p:j.p,n.labelLabel=t(X,n[d+"LabelVal"],T[d+"hoverformat"]),n.valueLabel=t(Q,n[u+"LabelVal"],T[u+"hoverformat"]),n.baseLabel=t(Q,j.b,T[u+"hoverformat"]),n.spikeDistance=(Y(j)+ue(j))/2,n[d+"Spike"]=X.c2p(j.p,!0),M(j,T,n),n.hovertemplate=T.hovertemplate,n}}function i(n,s){var h=s.mcc||n.marker.color,f=s.mlcc||n.marker.line.color,m=e(n,s);if(S.opacity(h))return h;if(S.opacity(f)&&m)return f}q.exports={hoverPoints:o,hoverOnBars:a,getTraceColor:i}}}),K9=He({"src/traces/bar/event_data.js"(Z,q){"use strict";q.exports=function(_,S,M){return _.x="xVal"in S?S.xVal:S.x,_.y="yVal"in S?S.yVal:S.y,S.xa&&(_.xaxis=S.xa),S.ya&&(_.yaxis=S.ya),M.orientation==="h"?(_.label=_.y,_.value=_.x):(_.label=_.x,_.value=_.y),_}}}),h1=He({"src/traces/bar/select.js"(Z,q){"use strict";q.exports=function(S,M){var e=S.cd,t=S.xaxis,r=S.yaxis,o=e[0].trace,a=o.type==="funnel",i=o.orientation==="h",n=[],s;if(M===!1)for(s=0;s0?(P="v",d>0?z=Math.min(g,u):z=Math.min(u)):d>0?(P="h",z=Math.min(g)):z=0;if(!z){h.visible=!1;return}h._length=z;var U=f("orientation",P);h._hasPreCompStats?U==="v"&&d===0?(f("x0",0),f("dx",1)):U==="h"&&b===0&&(f("y0",0),f("dy",1)):U==="v"&&d===0?f("x0"):U==="h"&&b===0&&f("y0");var B=_.getComponentMethod("calendars","handleTraceDefaults");B(s,h,["x","y"],m)}function i(s,h,f,m){var c=m.prefix,T=v.coerce2(s,h,r,"marker.outliercolor"),l=f("marker.line.outliercolor"),x="outliers";h._hasPreCompStats?x="all":(T||l)&&(x="suspectedoutliers");var w=f(c+"points",x);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")),v.coerceSelectionMarkerOpacity(h,f)}function n(s,h){var f,m;function c(w){return v.coerce(m._input,m,r,w)}for(var T=0;Tce.uf};if(E._hasPreCompStats){var ae=E[z],j=function(vr){return P.d2c((E[vr]||[])[y])},ee=1/0,te=-1/0;for(y=0;y=ce.q1&&ce.q3>=ce.med){var we=j("lowerfence");ce.lf=we!==e&&we<=ce.q1?we:m(ce,Y,X);var Se=j("upperfence");ce.uf=Se!==e&&Se>=ce.q3?Se:c(ce,Y,X);var Re=j("mean");ce.mean=Re!==e?Re:X?M.mean(Y,X):(ce.q1+ce.q3)/2;var Pe=j("sd");ce.sd=Re!==e&&Pe>=0?Pe:X?M.stdev(Y,X,ce.mean):ce.q3-ce.q1,ce.lo=T(ce),ce.uo=l(ce);var je=j("notchspan");je=je!==e&&je>0?je:x(ce,X),ce.ln=ce.med-je,ce.un=ce.med+je;var at=ce.lf,nt=ce.uf;E.boxpoints&&Y.length&&(at=Math.min(at,Y[0]),nt=Math.max(nt,Y[X-1])),E.notched&&(at=Math.min(at,ce.ln),nt=Math.max(nt,ce.un)),ce.min=at,ce.max=nt}else{M.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}ee=Math.min(ee,ce.min),te=Math.max(te,ce.max),ce.pts2=de.filter(le),u.push(ce)}}E._extremes[P._id]=_.findExtremes(P,[ee,te],{padded:!0})}else{var Ve=P.makeCalcdata(E,z),he=o($,ue),se=$.length,ne=a(se);for(y=0;y=0&&Ce0){if(ce={},ce.pos=ce[N]=$[y],de=ce.pts=ne[y].sort(h),Y=ce[z]=de.map(f),X=Y.length,ce.min=Y[0],ce.max=Y[X-1],ce.mean=M.mean(Y,X),ce.sd=M.stdev(Y,X,ce.mean)*E.sdmultiple,ce.med=M.interp(Y,.5),X%2&&(St||kt)){var Bt,Vt;St?(Bt=Y.slice(0,X/2),Vt=Y.slice(X/2+1)):kt&&(Bt=Y.slice(0,X/2+1),Vt=Y.slice(X/2)),ce.q1=M.interp(Bt,.5),ce.q3=M.interp(Vt,.5)}else ce.q1=M.interp(Y,.25),ce.q3=M.interp(Y,.75);ce.lf=m(ce,Y,X),ce.uf=c(ce,Y,X),ce.lo=T(ce),ce.uo=l(ce);var Ar=x(ce,X);ce.ln=ce.med-Ar,ce.un=ce.med+Ar,Ze=Math.min(Ze,ce.ln),rt=Math.max(rt,ce.un),ce.pts2=de.filter(le),u.push(ce)}E.notched&&M.isTypedArray(Ve)&&(Ve=Array.from(Ve)),E._extremes[P._id]=_.findExtremes(P,E.notched?Ve.concat([Ze,rt]):Ve,{padded:!0})}return s(u,E),u.length>0?(u[0].t={num:p[g],dPos:ue,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:E.boxmean==="sd"||E.sizemode==="sd"?t(A,"mean \xB1 \u03C3:").replace("\u03C3",E.sdmultiple===1?"\u03C3":E.sdmultiple+"\u03C3"):t(A,"mean:"),lf:t(A,"lower fence:"),uf:t(A,"upper fence:")}},p[g]++,u):[{t:{empty:!0}}]};function r(w,A,E,p){var b=A in w,d=A+"0"in w,u="d"+A in w;if(b||d&&u){var g=E.makeCalcdata(w,A),y=S(w,E,A,g).vals;return[y,g]}var D;d?D=w[A+"0"]:"name"in w&&(E.type==="category"||v(w.name)&&["linear","log"].indexOf(E.type)!==-1||M.isDateTime(w.name)&&E.type==="date")?D=w.name:D=p;for(var P=E.type==="multicategory"?E.r2c_just_indices(D):E.d2c(D,0,w[A+"calendar"]),z=w._length,F=new Array(z),N=0;N1,d=1-s[r+"gap"],u=1-s[r+"groupgap"];for(m=0;m0;if(P==="positive"?(ce=z*(D?1:.5),X=Y,de=X=N):P==="negative"?(ce=X=N,de=z*(D?1:.5),Q=Y):(ce=de=z,X=Q=Y),te){var pe=g.pointpos,we=g.jitter,Se=g.marker.size/2,Re=0;pe+we>=0&&(Re=Y*(pe+we),Re>ce?(ee=!0,ae=Se,V=Re):Re>X&&(ae=Se,V=ce)),Re<=ce&&(V=ce);var Pe=0;pe-we<=0&&(Pe=-Y*(pe-we),Pe>de?(ee=!0,j=Se,le=Pe):Pe>Q&&(j=Se,le=de)),Pe<=de&&(le=de)}else V=ce,le=de;var je=new Array(T.length);for(c=0;cE.lo&&(U.so=!0)}return b});A.enter().append("path").classed("point",!0),A.exit().remove(),A.call(S.translatePoints,f,m)}function a(i,n,s,h){var f=n.val,m=n.pos,c=!!m.rangebreaks,T=h.bPos,l=h.bPosPxOffset||0,x=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 E=i.selectAll("path.mean").data(s.type==="box"&&s.boxmean||s.type==="violin"&&s.box.visible&&s.meanline.visible?_.identity:[]);E.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),E.exit().remove(),E.each(function(p){var b=m.c2l(p.pos+T,!0),d=m.l2p(b-w)+l,u=m.l2p(b+A)+l,g=c?(d+u)/2:m.l2p(b)+l,y=f.c2p(p.mean,!0),D=f.c2p(p.mean-p.sd,!0),P=f.c2p(p.mean+p.sd,!0);s.orientation==="h"?v.select(this).attr("d","M"+y+","+d+"V"+u+(x==="sd"?"m0,0L"+D+","+g+"L"+y+","+d+"L"+P+","+g+"Z":"")):v.select(this).attr("d","M"+d+","+y+"H"+u+(x==="sd"?"m0,0L"+g+","+D+"L"+d+","+y+"L"+g+","+P+"Z":""))})}q.exports={plot:t,plotBoxAndWhiskers:r,plotPoints:o,plotBoxMean:a}}}),W2=He({"src/traces/box/style.js"(Z,q){"use strict";var v=Vn(),_=$n(),S=as();function M(t,r,o){var a=o||v.select(t).selectAll("g.trace.boxes");a.style("opacity",function(i){return i[0].trace.opacity}),a.each(function(i){var n=v.select(this),s=i[0].trace,h=s.line.width;function f(T,l,x,w){T.style("stroke-width",l+"px").call(_.stroke,x).call(_.fill,w)}var m=n.selectAll("path.box");if(s.type==="candlestick")m.each(function(T){if(!T.empty){var l=v.select(this),x=s[T.dir];f(l,x.line.width,x.line.color,x.fillcolor),l.style("opacity",s.selectedpoints&&!T.selected?.3:1)}});else{f(m,h,s.line.color,s.fillcolor),n.selectAll("path.mean").style({"stroke-width":h,"stroke-dasharray":2*h+"px,"+h+"px"}).call(_.stroke,s.line.color);var c=n.selectAll("path.point");S.pointStyle(c,s,t)}})}function e(t,r,o){var a=r[0].trace,i=o.selectAll("path.point");a.selectedpoints?S.selectedPointStyle(i,a):S.pointStyle(i,a,t)}q.exports={style:M,styleOnSelect:e}}}),Q5=He({"src/traces/box/hover.js"(Z,q){"use strict";var v=Wo(),_=sa(),S=Hc(),M=$n(),e=_.fillText;function t(a,i,n,s){var h=a.cd,f=h[0].trace,m=f.hoveron,c=[],T;return m.indexOf("boxes")!==-1&&(c=c.concat(r(a,i,n,s))),m.indexOf("points")!==-1&&(T=o(a,i,n)),s==="closest"?T?[T]:c:(T&&c.push(T),c)}function r(a,i,n,s){var h=a.cd,f=a.xa,m=a.ya,c=h[0].trace,T=h[0].t,l=c.type==="violin",x,w,A,E,p,b,d,u,g,y,D,P=T.bdPos,z,F,N=T.wHover,O=function(Pe){return A.c2l(Pe.pos)+T.bPos-A.c2l(b)};l&&c.side!=="both"?(c.side==="positive"&&(g=function(Pe){var je=O(Pe);return S.inbox(je,je+N,y)},z=P,F=0),c.side==="negative"&&(g=function(Pe){var je=O(Pe);return S.inbox(je-N,je,y)},z=0,F=P)):(g=function(Pe){var je=O(Pe);return S.inbox(je-N,je+N,y)},z=F=P);var L;l?L=function(Pe){return S.inbox(Pe.span[0]-p,Pe.span[1]-p,y)}:L=function(Pe){return S.inbox(Pe.min-p,Pe.max-p,y)},c.orientation==="h"?(p=i,b=n,d=L,u=g,x="y",A=m,w="x",E=f):(p=n,b=i,d=g,u=L,x="x",A=f,w="y",E=m);var U=Math.min(1,P/Math.abs(A.r2c(A.range[1])-A.r2c(A.range[0])));y=a.maxHoverDistance-U,D=a.maxSpikeDistance-U;function B(Pe){return(d(Pe)+u(Pe))/2}var W=S.getDistanceFunction(s,d,u,B);if(S.getClosest(h,W,a),a.index===!1)return[];var $=h[a.index],ue=c.line.color,ce=(c.marker||{}).color;M.opacity(ue)&&c.line.width?a.color=ue:M.opacity(ce)&&c.boxpoints?a.color=ce:a.color=c.fillcolor,a[x+"0"]=A.c2p($.pos+T.bPos-F,!0),a[x+"1"]=A.c2p($.pos+T.bPos+z,!0),a[x+"LabelVal"]=$.orig_p!==void 0?$.orig_p:$.pos;var de=x+"Spike";a.spikeDistance=B($)*D/y,a[de]=A.c2p($.pos,!0);var Y=c.boxmean||c.sizemode==="sd"||(c.meanline||{}).visible,X=c.boxpoints||c.points,Q=X&&Y?["max","uf","q3","med","mean","q1","lf","min"]:X&&!Y?["max","uf","q3","med","q1","lf","min"]:!X&&Y?["max","q3","med","mean","q1","min"]:["max","q3","med","q1","min"],V=E.range[1]0&&(o=!0);for(var s=0;st){var r=t-M[_];return M[_]=t,r}}else return M[_]=t,t;return 0},max:function(_,S,M,e){var t=e[S];if(v(t))if(t=Number(t),v(M[_])){if(M[_]d&&dM){var y=u===_?1:6,D=u===_?"M12":"M1";return function(P,z){var F=T.c2d(P,_,l),N=F.indexOf("-",y);N>0&&(F=F.slice(0,N));var O=T.d2c(F,0,l);if(Or?h>M?h>_*1.1?_:h>S*1.1?S:M:h>e?e:h>t?t:r:Math.pow(10,Math.floor(Math.log(h)/Math.LN10))}function n(h,f,m,c,T,l){if(c&&h>M){var x=s(f,T,l),w=s(m,T,l),A=h===_?0:1;return x[A]!==w[A]}return Math.floor(m/h)-Math.floor(f/h)>.1}function s(h,f,m){var c=f.c2d(h,_,m).split("-");return c[0]===""&&(c.unshift(),c[0]="-"+c[0]),c}}}),oS=He({"src/traces/histogram/calc.js"(Z,q){"use strict";var v=ns(),_=sa(),S=so(),M=Wo(),{hasColorscale:e}=wp(),t=Tp(),r=B_(),o=rS(),a=aS(),i=iS(),n=nS();function s(T,l){var x=[],w=[],A=l.orientation==="h",E=M.getFromId(T,A?l.yaxis:l.xaxis),p=A?"y":"x",b={x:"y",y:"x"}[p],d=l[p+"calendar"],u=l.cumulative,g,y=h(T,l,E,p),D=y[0],P=y[1],z=typeof D.size=="string",F=[],N=z?F:D,O=[],L=[],U=[],B=0,W=l.histnorm,$=l.histfunc,ue=W.indexOf("density")!==-1,ce,de,Y;u.enabled&&ue&&(W=W.replace(/ ?density$/,""),ue=!1);var X=$==="max"||$==="min",Q=X?null:0,V=o.count,le=a[W],ae=!1,j=function(Ce){return E.r2c(Ce,0,d)},ee;for(_.isArrayOrTypedArray(l[b])&&$!=="count"&&(ee=l[b],ae=$==="avg",V=o[$]),g=j(D.start),de=j(D.end)+(g-M.tickIncrement(g,D.size,!1,d))/1e6;g=0&&Y=he;g--)if(w[g]){se=g;break}for(g=he;g<=se;g++)if(v(x[g])&&v(w[g])){var ne={p:x[g],s:w[g],b:0};u.enabled||(ne.pts=U[g],Se?ne.ph0=ne.ph1=U[g].length?P[U[g][0]]:x[g]:(l._computePh=!0,ne.ph0=nt(F[g]),ne.ph1=nt(F[g+1],!0))),Ve.push(ne)}return Ve.length===1&&(Ve[0].width1=M.tickIncrement(Ve[0].p,D.size,!1,d)-Ve[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(Ve,l),_.isArrayOrTypedArray(l.selectedpoints)&&_.tagSelected(Ve,l,je),Ve}function h(T,l,x,w,A){var E=w+"bins",p=T._fullLayout,b=l["_"+w+"bingroup"],d=p._histogramBinOpts[b],u=p.barmode==="overlay",g,y,D,P,z,F,N,O=function(at){return x.r2c(at,0,P)},L=function(at){return x.c2r(at,0,P)},U=x.type==="date"?function(at){return at||at===0?_.cleanDate(at,null,P):null}:function(at){return v(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],_.nestedProperty(y[0],E+"."+at).set(tt[at]))}if(l["_"+w+"autoBinFinished"])delete l["_"+w+"autoBinFinished"];else{y=d.traces;var W=[],$=!0,ue=!1,ce=!1;for(g=0;g"u"){if(A)return[Y,z,!0];Y=f(T,l,x,w,E)}N=D.cumulative||{},N.enabled&&N.currentbin!=="include"&&(N.direction==="decreasing"?Y.start=L(M.tickIncrement(O(Y.start),Y.size,!0,P)):Y.end=L(M.tickIncrement(O(Y.end),Y.size,!1,P))),d.size=Y.size,d.sizeFound||(F.size=Y.size,_.nestedProperty(y[0],E+".size").set(Y.size)),B("start",d,Y),B("end",d,Y)}z=l["_"+w+"pos0"],delete l["_"+w+"pos0"];var Q=l._input[E]||{},V=_.extendFlat({},d),le=d.start,ae=x.r2l(Q.start),j=ae!==void 0;if((d.startFound||j)&&ae!==x.r2l(le)){var ee=j?ae:_.aggNums(Math.min,null,z),te={type:x.type==="category"||x.type==="multicategory"?"linear":x.type,r2l:x.r2l,dtick:d.size,tick0:le,calendar:P,range:[ee,M.tickIncrement(ee,d.size,!1,P)].map(x.l2r)},pe=M.tickFirst(te);pe>x.r2l(ee)&&(pe=M.tickIncrement(pe,d.size,!0,P)),V.start=x.l2r(pe),j||_.nestedProperty(l,E+".start").set(V.start)}var we=d.end,Se=x.r2l(Q.end),Re=Se!==void 0;if((d.endFound||Re)&&Se!==x.r2l(we)){var Pe=Re?Se:_.aggNums(Math.max,null,z);V.end=x.l2r(Pe),Re||_.nestedProperty(l,E+".start").set(V.end)}var je="autobin"+w;return l._input[je]===!1&&(l._input[E]=_.extendFlat({},l[E]||{}),delete l._input[je],delete l[je]),[V,z]}function f(T,l,x,w,A){var E=T._fullLayout,p=m(T,l),b=!1,d=1/0,u=[l],g,y,D;for(g=0;g=0;w--)b(w);else if(l==="increasing"){for(w=1;w=0;w--)T[w]+=T[w+1];x==="exclude"&&(T.push(0),T.shift())}}q.exports={calc:s,calcAllAutoBins:h}}}),aF=He({"src/traces/histogram2d/calc.js"(Z,q){"use strict";var v=sa(),_=Wo(),S=rS(),M=aS(),e=iS(),t=nS(),r=oS().calcAllAutoBins;q.exports=function(s,h){var f=_.getFromId(s,h.xaxis),m=_.getFromId(s,h.yaxis),c=h.xcalendar,T=h.ycalendar,l=function(Fe){return f.r2c(Fe,0,c)},x=function(Fe){return m.r2c(Fe,0,T)},w=function(Fe){return f.c2r(Fe,0,c)},A=function(Fe){return m.c2r(Fe,0,T)},E,p,b,d,u=r(s,h,f,"x"),g=u[0],y=u[1],D=r(s,h,m,"y"),P=D[0],z=D[1],F=h._length;y.length>F&&y.splice(F,y.length-F),z.length>F&&z.splice(F,z.length-F);var N=[],O=[],L=[],U=typeof g.size=="string",B=typeof P.size=="string",W=[],$=[],ue=U?W:g,ce=B?$:P,de=0,Y=[],X=[],Q=h.histnorm,V=h.histfunc,le=Q.indexOf("density")!==-1,ae=V==="max"||V==="min",j=ae?null:0,ee=S.count,te=M[Q],pe=!1,we=[],Se=[],Re="z"in h?h.z:"marker"in h&&Array.isArray(h.marker.color)?h.marker.color:"";Re&&V!=="count"&&(pe=V==="avg",ee=S[V]);var Pe=g.size,je=l(g.start),at=l(g.end)+(je-_.tickIncrement(je,Pe,!1,c))/1e6;for(E=je;E=0&&b=0&&d_;i++)a=e(r,o,M(a));return a>_&&v.log("interp2d didn't converge quickly",a),r};function e(t,r,o){var a=0,i,n,s,h,f,m,c,T,l,x,w,A,E;for(h=0;hA&&(a=Math.max(a,Math.abs(t[n][s]-w)/(E-A))))}return a}}}),J2=He({"src/traces/heatmap/find_empties.js"(Z,q){"use strict";var v=sa().maxRowLength;q.exports=function(S){var M=[],e={},t=[],r=S[0],o=[],a=[0,0,0],i=v(S),n,s,h,f,m,c,T,l;for(s=0;s=0;m--)f=t[m],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(m,1),l=!0);if(!l)throw"findEmpties iterated with no new neighbors";for(f in T)e[f]=T[f],M.push(T[f])}return M.sort(function(x,w){return w[2]-x[2]})}}}),sS=He({"src/traces/heatmap/make_bound_array.js"(Z,q){"use strict";var v=so(),_=sa().isArrayOrTypedArray;q.exports=function(M,e,t,r,o,a){var i=[],n=v.traceIs(M,"contour"),s=v.traceIs(M,"histogram"),h,f,m,c=_(e)&&e.length>1;if(c&&!s&&a.type!=="category"){var T=e.length;if(T<=o){if(n)i=Array.from(e).slice(0,o);else if(o===1)a.type==="log"?i=[.5*e[0],2*e[0]]:i=[e[0]-.5,e[0]+.5];else if(a.type==="log"){for(i=[Math.pow(e[0],1.5)/Math.pow(e[1],.5)],m=1;m1){var Q=(X[X.length-1]-X[0])/(X.length-1),V=Math.abs(Q/100);for(F=0;FV)return!1}return!0}T._islinear=!1,l.type==="log"||x.type==="log"?E==="fast"&&L("log axis found"):U(p)?U(g)?T._islinear=!0:E==="fast"&&L("y scale is not linear"):E==="fast"&&L("x scale is not linear");var B=_.maxRowLength(z),W=T.xtype==="scaled"?"":p,$=n(T,W,b,d,B,l),ue=T.ytype==="scaled"?"":g,ce=n(T,ue,y,D,z.length,x);T._extremes[l._id]=S.findExtremes(l,$),T._extremes[x._id]=S.findExtremes(x,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&&P&&(de.orig_y=P),W&&W.length===$.length-1&&(de.xCenter=W),ue&&ue.length===ce.length-1&&(de.yCenter=ue),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 Y={type:T.type==="contour"?"heatmap":"histogram2d",xcalendar:T.xcalendar,ycalendar:T.ycalendar};de.xfill=n(Y,W,b,d,B,l),de.yfill=n(Y,ue,y,D,z.length,x)}return[de]};function h(m){for(var c=[],T=m.length,l=0;l0;)le=g.c2p(U[te]),te--;for(le0;)ee=y.c2p(B[te]),te--;ee=g._length||le<=0||j>=y._length||ee<=0;if(at){var nt=P.selectAll("image").data([]);nt.exit().remove(),x(P);return}var tt,Ve;Se==="fast"?(tt=Y,Ve=de):(tt=Pe,Ve=je);var he=document.createElement("canvas");he.width=tt,he.height=Ve;var se=he.getContext("2d",{willReadFrequently:!0}),ne=n(F,{noNumericCheck:!0,returnArray:!0}),Ce,Ze;Se==="fast"?(Ce=X?function(ba){return Y-1-ba}:t.identity,Ze=Q?function(ba){return de-1-ba}:t.identity):(Ce=function(ba){return t.constrain(Math.round(g.c2p(U[ba])-V),0,Pe)},Ze=function(ba){return t.constrain(Math.round(y.c2p(B[ba])-j),0,je)});var rt=Ze(0),Je=[rt,rt],St=X?0:1,kt=Q?0:1,Bt=0,Vt=0,Ar=0,vr=0,qr,kr,Ur,_t,Fe;function Ye(ba,Ai){if(ba!==void 0){var ki=ne(ba);return ki[0]=Math.round(ki[0]),ki[1]=Math.round(ki[1]),ki[2]=Math.round(ki[2]),Bt+=Ai,Vt+=ki[0]*Ai,Ar+=ki[1]*Ai,vr+=ki[2]*Ai,ki}return[0,0,0,0]}function Ae(ba,Ai,ki,Ki){var En=ba[ki.bin0];if(En===void 0)return Ye(void 0,1);var Tn=ba[ki.bin1],On=Ai[ki.bin0],kn=Ai[ki.bin1],ao=Tn-En||0,Co=On-En||0,bo;return Tn===void 0?kn===void 0?bo=0:On===void 0?bo=2*(kn-En):bo=(2*kn-On-En)*2/3:kn===void 0?On===void 0?bo=0:bo=(2*En-Tn-On)*2/3:On===void 0?bo=(2*kn-Tn-En)*2/3:bo=kn+En-Tn-On,Ye(En+ki.frac*ao+Ki.frac*(Co+ki.frac*bo))}if(Se!=="default"){var Le=0,We;try{We=new Uint8Array(tt*Ve*4)}catch{We=new Array(tt*Ve*4)}if(Se==="smooth"){var Ke=W||U,st=$||B,ot=new Array(Ke.length),Ut=new Array(st.length),Ct=new Array(Pe),Pt=W?A:w,jt=$?A:w,cr,or,nr;for(te=0;te$a||$a>y._length))for(pe=ta;peri||ri>g._length)){var pi=o({x:Za,y:Ba},F,p._fullLayout);pi.x=Za,pi.y=Ba;var Ia=z.z[te][pe];Ia===void 0?(pi.z="",pi.zLabel=""):(pi.z=Ia,pi.zLabel=e.tickText(Yt,Ia,"hover").text);var rn=z.text&&z.text[te]&&z.text[te][pe];(rn===void 0||rn===!1)&&(rn=""),pi.text=rn;var tn=t.texttemplateString({data:[pi,F._meta],fallback:F.texttemplatefallback,labels:pi,locale:p._fullLayout._d3locale,template:hi});if(tn){var cn=tn.split("
"),xt=cn.length,ut=0;for(we=0;we=x[0].length||D<0||D>x.length)return}else{if(v.inbox(o-T[0],o-T[T.length-1],0)>0||v.inbox(a-l[0],a-l[l.length-1],0)>0)return;if(s){var P;for(b=[2*T[0]-T[1]],P=1;P=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}}}),V_=He({"src/traces/contour/attributes.js"(Z,q){"use strict";var v=p1(),_=af(),S=rf(),M=S.axisHoverFormat,e=S.descriptionOnlyNumbers,t=ku(),r=Hh().dash,o=tc(),a=rs().extendFlat,i=o3(),n=i.COMPARISON_OPS2,s=i.INTERVAL_OPS,h=_.line;q.exports=a({z:v.z,x:v.x,x0:v.x0,dx:v.dx,y:v.y,y0:v.y0,dy:v.dy,xperiod:v.xperiod,yperiod:v.yperiod,xperiod0:_.xperiod0,yperiod0:_.yperiod0,xperiodalignment:v.xperiodalignment,yperiodalignment:v.yperiodalignment,text:v.text,hovertext:v.hovertext,transpose:v.transpose,xtype:v.xtype,ytype:v.ytype,xhoverformat:M("x"),yhoverformat:M("y"),zhoverformat:M("z",1),hovertemplate:v.hovertemplate,hovertemplatefallback:v.hovertemplatefallback,texttemplate:a({},v.texttemplate,{}),texttemplatefallback:v.texttemplatefallback,textfont:a({},v.textfont,{}),hoverongaps:v.hoverongaps,connectgaps:a({},v.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(n).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:_.zorder},t("",{cLetter:"z",autoColorDflt:!1,editTypeOverride:"calc"}))}}),hS=He({"src/traces/histogram2dcontour/attributes.js"(Z,q){"use strict";var v=n3(),_=V_(),S=ku(),M=rf().axisHoverFormat,e=rs().extendFlat;q.exports=e({x:v.x,y:v.y,z:v.z,marker:v.marker,histnorm:v.histnorm,histfunc:v.histfunc,nbinsx:v.nbinsx,xbins:v.xbins,nbinsy:v.nbinsy,ybins:v.ybins,autobinx:v.autobinx,autobiny:v.autobiny,bingroup:v.bingroup,xbingroup:v.xbingroup,ybingroup:v.ybingroup,autocontour:_.autocontour,ncontours:_.ncontours,contours:_.contours,line:{color:_.line.color,width:e({},_.line.width,{dflt:.5}),dash:_.line.dash,smoothing:_.line.smoothing,editType:"plot"},xhoverformat:M("x"),yhoverformat:M("y"),zhoverformat:M("z",1),hovertemplate:v.hovertemplate,hovertemplatefallback:v.hovertemplatefallback,texttemplate:_.texttemplate,texttemplatefallback:_.texttemplatefallback,textfont:_.textfont},S("",{cLetter:"z",editTypeOverride:"calc"}))}}),s3=He({"src/traces/contour/contours_defaults.js"(Z,q){"use strict";q.exports=function(_,S,M,e){var t=e("contours.start"),r=e("contours.end"),o=t===!1||r===!1,a=M("contours.size"),i;o?i=S.autocontour=!0:i=M("autocontour",!1),(i||!a)&&M("ncontours")}}}),pS=He({"src/traces/contour/label_defaults.js"(Z,q){"use strict";var v=sa();q.exports=function(S,M,e,t){t||(t={});var r=S("contours.showlabels");if(r){var o=M.font;v.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,q){"use strict";var v=_h(),_=pS();q.exports=function(M,e,t,r,o){var a=t("contours.coloring"),i,n="";a==="fill"&&(i=t("contours.showlines")),i!==!1&&(a!=="lines"&&(n=t("line.color","#000")),t("line.width",.5),t("line.dash")),a!=="none"&&(M.showlegend!==!0&&(e.showlegend=!1),e._dfltShowLegend=!1,v(M,e,r,t,{prefix:"",cLetter:"z"})),t("line.smoothing"),_(t,r,n,o)}}}),vF=He({"src/traces/histogram2dcontour/defaults.js"(Z,q){"use strict";var v=sa(),_=fS(),S=s3(),M=l3(),e=q_(),t=hS();q.exports=function(o,a,i,n){function s(f,m){return v.coerce(o,a,t,f,m)}function h(f){return v.coerce2(o,a,t,f)}_(o,a,s,n),a.visible!==!1&&(S(o,a,s,h),M(o,a,s,n),s("xhoverformat"),s("yhoverformat"),s("hovertemplate"),s("hovertemplatefallback"),a.contours&&a.contours.coloring==="heatmap"&&e(s,n))}}}),dS=He({"src/traces/contour/set_contours.js"(Z,q){"use strict";var v=Wo(),_=sa();q.exports=function(e,t){var r=e.contours;if(e.autocontour){var o=e.zmin,a=e.zmax;(e.zauto||o===void 0)&&(o=_.aggNums(Math.min,null,t)),(e.zauto||a===void 0)&&(a=_.aggNums(Math.max,null,t));var i=S(o,a,e.ncontours);r.size=i.dtick,r.start=v.tickFirst(i),i.range.reverse(),r.end=v.tickFirst(i),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={}),_.extendFlat(e._input.contours,{start:r.start,end:r.end,size:r.size}),e._input.autocontour=!0}else if(r.type!=="constraint"){var n=r.start,s=r.end,h=e._input.contours;if(n>s&&(r.start=h.start=s,s=r.end=h.end=n,n=r.start),!(r.size>0)){var f;n===s?f=1:f=S(n,s,e.ncontours).dtick,h.size=r.size=f}}};function S(M,e,t){var r={type:"linear",range:[M,e]};return v.autoTicks(r,(e-M)/(t||15)),r}}}),G_=He({"src/traces/contour/end_plus.js"(Z,q){"use strict";q.exports=function(_){return _.end+_.size/1e6}}}),vS=He({"src/traces/contour/calc.js"(Z,q){"use strict";var v=rc(),_=$2(),S=dS(),M=G_();q.exports=function(t,r){var o=_(t,r),a=o[0].z;S(r,a);var i=r.contours,n=v.extractOpts(r),s;if(i.coloring==="heatmap"&&n.auto&&r.autocontour===!1){var h=i.start,f=M(i),m=i.size||1,c=Math.floor((f-h)/m)+1;isFinite(m)||(m=1,c=1);var T=h-m/2,l=T+c*m;s=[T,l]}else s=a;return v.calc(t,r,{vals:s,cLetter:"z"}),o}}}),H_=He({"src/traces/contour/constants.js"(Z,q){"use strict";q.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,q){"use strict";var v=H_();q.exports=function(M){var e=M[0].z,t=e.length,r=e[0].length,o=t===2||r===2,a,i,n,s,h,f,m,c,T;for(i=0;iS?0:1)+(M[0][1]>S?0:2)+(M[1][1]>S?0:4)+(M[1][0]>S?0:8);if(e===5||e===10){var t=(M[0][0]+M[0][1]+M[1][0]+M[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,q){"use strict";var v=sa(),_=H_();q.exports=function(a,i,n){var s,h,f,m,c;for(i=i||.01,n=n||.01,f=0;f20?(f=_.CHOOSESADDLE[f][(m[0]||m[1])<0?0:1],o.crossings[h]=_.SADDLEREMAINDER[f]):delete o.crossings[h],m=_.NEWDELTA[f],!m){v.log("Found bad marching index:",f,a,o.level);break}c.push(r(o,a,m)),a[0]+=m[0],a[1]+=m[1],h=a.join(","),S(c[c.length-1],c[c.length-2],n,s)&&c.pop();var E=m[0]&&(a[0]<0||a[0]>l-2)||m[1]&&(a[1]<0||a[1]>T-2),p=a[0]===x[0]&&a[1]===x[1]&&m[0]===w[0]&&m[1]===w[1];if(p||i&&E)break;f=o.crossings[h]}A===1e4&&v.log("Infinite loop in contour?");var b=S(c[0],c[c.length-1],n,s),d=0,u=.2*o.smoothing,g=[],y=0,D,P,z,F,N,O,L,U,B,W,$;for(A=1;A=y;A--)if(D=g[A],D=y&&D+g[P]U&&B--,o.edgepaths[B]=$.concat(c,W));break}Y||(o.edgepaths[U]=c.concat(W))}for(U=0;U20&&a?o===208||o===1114?n=i[0]===0?1:-1:s=i[1]===0?1:-1:_.BOTTOMSTART.indexOf(o)!==-1?s=1:_.LEFTSTART.indexOf(o)!==-1?n=1:_.TOPSTART.indexOf(o)!==-1?s=-1:n=-1,[n,s]}function r(o,a,i){var n=a[0]+Math.max(i[0],0),s=a[1]+Math.max(i[1],0),h=o.z[s][n],f=o.xaxis,m=o.yaxis;if(i[1]){var c=(o.level-h)/(o.z[s][n+1]-h),T=(c!==1?(1-c)*f.c2l(o.x[n]):0)+(c!==0?c*f.c2l(o.x[n+1]):0);return[f.c2p(f.l2c(T),!0),m.c2p(o.y[s],!0),n+c,s]}else{var l=(o.level-h)/(o.z[s+1][n]-h),x=(l!==1?(1-l)*m.c2l(o.y[s]):0)+(l!==0?l*m.c2l(o.y[s+1]):0);return[f.c2p(o.x[n],!0),m.c2p(m.l2c(x),!0),n,s+l]}}}}),mF=He({"src/traces/contour/constraint_mapping.js"(Z,q){"use strict";var v=o3(),_=ns();q.exports={"[]":M("[]"),"][":M("]["),">":e(">"),"<":e("<"),"=":e("=")};function S(t,r){var o=Array.isArray(r),a;function i(n){return _(n)?+n:null}return v.COMPARISON_OPS2.indexOf(t)!==-1?a=i(o?r[0]:r):v.INTERVAL_OPS.indexOf(t)!==-1?a=o?[i(r[0]),i(r[1])]:[i(r),i(r)]:v.SET_OPS.indexOf(t)!==-1&&(a=o?r.map(i):[i(r)]),a}function M(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,q){"use strict";var v=sa(),_=mF(),S=G_();q.exports=function(e,t,r){for(var o=e.type==="constraint"?_[e._operation](e.value):e,a=o.size,i=[],n=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){v.warn("Too many contours, clipping at 1000",e);break}return i}}}),_S=He({"src/traces/contour/convert_to_constraints.js"(Z,q){"use strict";var v=sa();q.exports=function(S,M){var e,t,r,o=function(n){return n.reverse()},a=function(n){return n};switch(M){case"=":case"<":return S;case">":for(S.length!==1&&v.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,i=-1/0,n=1/0;for(e=0;e":s>i&&(S.prefixBoundary=!0);break;case"<":(si||S.starts.length&&f===n)&&(S.prefixBoundary=!0);break;case"][":h=Math.min(s[0],s[1]),f=Math.max(s[0],s[1]),hi&&(S.prefixBoundary=!0);break}break}}}}),u3=He({"src/traces/contour/plot.js"(Z){"use strict";var q=Vn(),v=sa(),_=as(),S=rc(),M=su(),e=Wo(),t=wv(),r=e3(),o=mS(),a=gS(),i=yS(),n=_S(),s=xS(),h=H_(),f=h.LABELOPTIMIZER;Z.plot=function(p,b,d,u){var g=b.xaxis,y=b.yaxis;v.makeTraceGroups(u,d,"contour").each(function(D){var P=q.select(this),z=D[0],F=z.trace,N=z.x,O=z.y,L=F.contours,U=i(L,b,z),B=v.ensureSingle(P,"g","heatmapcoloring"),W=[];L.coloring==="heatmap"&&(W=[D]),r(p,b,W,B),o(U),a(U);var $=g.c2p(N[0],!0),ue=g.c2p(N[N.length-1],!0),ce=y.c2p(O[0],!0),de=y.c2p(O[O.length-1],!0),Y=[[$,de],[ue,de],[ue,ce],[$,ce]],X=U;L.type==="constraint"&&(X=n(U,L._operation)),m(P,Y,L),c(P,X,Y,L),l(P,U,p,z,L),w(P,b,p,z,Y)})};function m(E,p,b){var d=v.ensureSingle(E,"g","contourbg"),u=d.selectAll("path").data(b.coloring==="fill"?[0]:[]);u.enter().append("path"),u.exit().remove(),u.attr("d","M"+p.join("L")+"Z").style("stroke","none")}function c(E,p,b,d){var u=d.coloring==="fill"||d.type==="constraint"&&d._operation!=="=",g="M"+b.join("L")+"Z";u&&s(p,d);var y=v.ensureSingle(E,"g","contourfill"),D=y.selectAll("path").data(u?p:[]);D.enter().append("path"),D.exit().remove(),D.each(function(P){var z=(P.prefixBoundary?g:"")+T(P,b);z?q.select(this).attr("d",z).style("stroke","none"):q.select(this).remove()})}function T(E,p){var b="",d=0,u=E.edgepaths.map(function($,ue){return ue}),g=!0,y,D,P,z,F,N;function O($){return Math.abs($[1]-p[0][1])<.01}function L($){return Math.abs($[1]-p[2][1])<.01}function U($){return Math.abs($[0]-p[0][0])<.01}function B($){return Math.abs($[0]-p[2][0])<.01}for(;u.length;){for(N=_.smoothopen(E.edgepaths[d],E.smoothing),b+=g?N:N.replace(/^M/,"L"),u.splice(u.indexOf(d),1),y=E.edgepaths[d][E.edgepaths[d].length-1],z=-1,P=0;P<4;P++){if(!y){v.log("Missing end?",d,E);break}for(O(y)&&!B(y)?D=p[1]:U(y)?D=p[0]:L(y)?D=p[3]:B(y)&&(D=p[2]),F=0;F=0&&(D=W,z=F):Math.abs(y[1]-D[1])<.01?Math.abs(y[1]-W[1])<.01&&(W[0]-y[0])*(D[0]-W[0])>=0&&(D=W,z=F):v.log("endpt to newendpt is not vert. or horz.",y,D,W)}if(y=D,z>=0)break;b+="L"+D}if(z===E.edgepaths.length){v.log("unclosed perimeter path");break}d=z,g=u.indexOf(d)===-1,g&&(d=u[0],b+="Z")}for(d=0;df.MAXCOST*2)break;O&&(D/=2),y=z-D/2,P=y+D*1.5}if(N<=f.MAXCOST)return F};function x(E,p,b,d){var u=p.width/2,g=p.height/2,y=E.x,D=E.y,P=E.theta,z=Math.cos(P)*u,F=Math.sin(P)*u,N=(y>d.center?d.right-y:y-d.left)/(z+Math.abs(Math.sin(P)*g)),O=(D>d.middle?d.bottom-D:D-d.top)/(Math.abs(F)+Math.cos(P)*g);if(N<1||O<1)return 1/0;var L=f.EDGECOST*(1/(N-1)+1/(O-1));L+=f.ANGLECOST*P*P;for(var U=y-z,B=D-F,W=y+z,$=D+F,ue=0;ue=w)&&(r<=x&&(r=x),o>=w&&(o=w),i=Math.floor((o-r)/a)+1,n=0),l=0;lx&&(m.unshift(x),c.unshift(c[0])),m[m.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])]:v(s.value)&&(h=parseFloat(s.value),s.value=[h,h+1])):(n("contours.value",0),v(s.value)||(r(s.value)?s.value=parseFloat(s.value[0]):s.value=0))}}}),_F=He({"src/traces/contour/defaults.js"(Z,q){"use strict";var v=sa(),_=X2(),S=Qd(),M=TS(),e=s3(),t=l3(),r=q_(),o=V_();q.exports=function(i,n,s,h){function f(l,x){return v.coerce(i,n,o,l,x)}function m(l){return v.coerce2(i,n,o,l)}var c=_(i,n,f,h);if(!c){n.visible=!1;return}S(i,n,h,f),f("xhoverformat"),f("yhoverformat"),f("text"),f("hovertext"),f("hoverongaps"),f("hovertemplate"),f("hovertemplatefallback");var T=f("contours.type")==="constraint";f("connectgaps",v.isArray1D(n.z)),T?M(i,n,f,h,s):(e(i,n,f,m),t(i,n,f,h)),n.contours&&n.contours.coloring==="heatmap"&&r(f,h),f("zorder")}}}),xF=He({"src/traces/contour/index.js"(Z,q){"use strict";q.exports={attributes:V_(),supplyDefaults:_F(),calc:vS(),plot:u3().plot,style:c3(),colorbar:f3(),hoverPoints:wS(),moduleType:"trace",name:"contour",basePlotModule:Kf(),categories:["cartesian","svg","2dMap","contour","showLegend"],meta:{}}}}),bF=He({"lib/contour.js"(Z,q){"use strict";q.exports=xF()}}),AS=He({"src/traces/scatterternary/attributes.js"(Z,q){"use strict";var{hovertemplateAttrs:v,texttemplateAttrs:_,templatefallbackAttrs:S}=$l(),M=$d(),e=af(),t=au(),r=ku(),o=Hh().dash,a=rs().extendFlat,i=e.marker,n=e.line,s=i.line;q.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:_({editType:"plot"},{keys:["a","b","c","text"]}),texttemplatefallback:S({editType:"plot"}),hovertext:a({},e.hovertext,{}),line:{color:n.color,width:n.width,dash:o,backoff:n.backoff,shape:a({},n.shape,{values:["linear","spline"]}),smoothing:n.smoothing,editType:"calc"},connectgaps:e.connectgaps,cliponaxis:e.cliponaxis,fill:a({},e.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:M(),marker:a({symbol:i.symbol,opacity:i.opacity,angle:i.angle,angleref:i.angleref,standoff:i.standoff,maxdisplayed:i.maxdisplayed,size:i.size,sizeref:i.sizeref,sizemin:i.sizemin,sizemode:i.sizemode,line:a({width:s.width,dash:s.dash,editType:"calc"},r("marker.line")),gradient:i.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:v(),hovertemplatefallback:S()}}}),wF=He({"src/traces/scatterternary/defaults.js"(Z,q){"use strict";var v=sa(),_=Tv(),S=Fu(),M=md(),e=Dd(),t=o1(),r=zd(),o=ev(),a=AS();q.exports=function(n,s,h,f){function m(E,p){return v.coerce(n,s,a,E,p)}var c=m("a"),T=m("b"),l=m("c"),x;if(c?(x=c.length,T?(x=Math.min(x,T.length),l&&(x=Math.min(x,l.length))):l?x=Math.min(x,l.length):x=0):T&&l&&(x=Math.min(T.length,l.length)),!x){s.visible=!1;return}s._length=x,m("sum"),m("text"),m("hovertext"),s.hoveron!=="fills"&&(m("hovertemplate"),m("hovertemplatefallback"));var w=x<_.PTS_LINESONLY?"lines+markers":"lines";m("mode",w),S.hasMarkers(s)&&M(n,s,h,f,m,{gradient:!0}),S.hasLines(s)&&(e(n,s,h,f,m,{backoff:!0}),t(n,s,m),m("connectgaps")),S.hasText(s)&&(m("texttemplate"),m("texttemplatefallback"),r(n,s,f,m));var A=[];(S.hasMarkers(s)||S.hasText(s))&&(m("cliponaxis"),m("marker.maxdisplayed"),A.push("points")),m("fill"),s.fill!=="none"&&(o(n,s,h,m),S.hasLines(s)||t(n,s,m)),(s.fill==="tonext"||s.fill==="toself")&&A.push("fills"),m("hoveron",A.join("+")||"points"),v.coerceSelectionMarkerOpacity(s,m)}}}),TF=He({"src/traces/scatterternary/format_labels.js"(Z,q){"use strict";var v=Wo();q.exports=function(S,M,e){var t={},r=e[M.subplot]._subplot;return t.aLabel=v.tickText(r.aaxis,S.a,!0).text,t.bLabel=v.tickText(r.baxis,S.b,!0).text,t.cLabel=v.tickText(r.caxis,S.c,!0).text,t}}}),AF=He({"src/traces/scatterternary/calc.js"(Z,q){"use strict";var v=ns(),_=Fd(),S=Av(),M=Od(),e=Bd().calcMarkerSize,t=["a","b","c"],r={a:["b","c"],b:["a","c"],c:["a","b"]};q.exports=function(a,i){var n=a._fullLayout[i.subplot],s=n.sum,h=i.sum||s,f={a:i.a,b:i.b,c:i.c},m=i.ids,c,T,l,x,w,A;for(c=0;c"),o.hovertemplate=f.hovertemplate,r}}}),EF=He({"src/traces/scatterternary/event_data.js"(Z,q){"use strict";q.exports=function(_,S,M,e,t){if(S.xa&&(_.xaxis=S.xa),S.ya&&(_.yaxis=S.ya),e[t]){var r=e[t];_.a=r.a,_.b=r.b,_.c=r.c}else _.a=S.a,_.b=S.b,_.c=S.c;return _}}}),kF=He({"src/plots/ternary/ternary.js"(Z,q){"use strict";var v=Vn(),_=Ch(),S=so(),M=sa(),e=M.strTranslate,t=M._,r=$n(),o=as(),a=wv(),i=rs().extendFlat,n=bc(),s=Wo(),h=Ap(),f=Hc(),m=Jd(),c=m.freeMode,T=m.rectMode,l=K0(),x=Af().prepSelect,w=Af().selectOnClick,A=Af().clearOutline,E=Af().clearSelectionsCache,p=lh();function b(L,U){this.id=L.id,this.graphDiv=L.graphDiv,this.init(U),this.makeFramework(U),this.updateFx(U),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}q.exports=b;var d=b.prototype;d.init=function(L){this.container=L._ternarylayer,this.defs=L._defs,this.layoutId=L._uid,this.traceHash={},this.layers={}},d.plot=function(L,U){var B=this,W=U[B.id],$=U._size;B._hasClipOnAxisFalse=!1;for(var ue=0;ueu*X?(pe=X,te=pe*u):(te=Y,pe=te/u),we=ce*te/Y,Se=de*pe/X,j=U.l+U.w*$-te/2,ee=U.t+U.h*(1-ue)-pe/2,B.x0=j,B.y0=ee,B.w=te,B.h=pe,B.sum=Q,B.xaxis={type:"linear",range:[V+2*ae-Q,Q-V-2*le],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:[V,Q-le-ae],domain:[ue-Se/2,ue+Se/2],_id:"y"},a(B.yaxis,B.graphDiv._fullLayout),B.yaxis.setScale(),B.yaxis.isPtWithinRange=function(){return!0};var Re=B.yaxis.domain[0],Pe=B.aaxis=i({},L.aaxis,{range:[V,Q-le-ae],side:"left",tickangle:(+L.aaxis.tickangle||0)-30,domain:[Re,Re+Se*u],anchor:"free",position:0,_id:"y",_length:te});a(Pe,B.graphDiv._fullLayout),Pe.setScale();var je=B.baxis=i({},L.baxis,{range:[Q-V-ae,le],side:"bottom",domain:B.xaxis.domain,anchor:"free",position:0,_id:"x",_length:te});a(je,B.graphDiv._fullLayout),je.setScale();var at=B.caxis=i({},L.caxis,{range:[Q-V-le,ae],side:"right",tickangle:(+L.caxis.tickangle||0)+30,domain:[Re,Re+Se*u],anchor:"free",position:0,_id:"y",_length:te});a(at,B.graphDiv._fullLayout),at.setScale();var nt="M"+j+","+(ee+pe)+"h"+te+"l-"+te/2+",-"+pe+"Z";B.clipDef.select("path").attr("d",nt),B.layers.plotbg.select("path").attr("d",nt);var tt="M0,"+pe+"h"+te+"l-"+te/2+",-"+pe+"Z";B.clipDefRelative.select("path").attr("d",tt);var Ve=e(j,ee);B.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",Ve),B.clipDefRelative.select("path").attr("transform",null);var he=e(j-je._offset,ee+pe);B.layers.baxis.attr("transform",he),B.layers.bgrid.attr("transform",he);var se=e(j+te/2,ee)+"rotate(30)"+e(0,-Pe._offset);B.layers.aaxis.attr("transform",se),B.layers.agrid.attr("transform",se);var ne=e(j+te/2,ee)+"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",Pe.showline?"M"+j+","+(ee+pe)+"l"+te/2+",-"+pe:"M0,0").call(r.stroke,Pe.linecolor||"#000").style("stroke-width",(Pe.linewidth||0)+"px"),B.layers.bline.select("path").attr("d",je.showline?"M"+j+","+(ee+pe)+"h"+te:"M0,0").call(r.stroke,je.linecolor||"#000").style("stroke-width",(je.linewidth||0)+"px"),B.layers.cline.select("path").attr("d",at.showline?"M"+(j+te/2)+","+ee+"l"+te/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)},d.drawAxes=function(L){var U=this,B=U.graphDiv,W=U.id.slice(7)+"title",$=U.layers,ue=U.aaxis,ce=U.baxis,de=U.caxis;if(U.drawAx(ue),U.drawAx(ce),U.drawAx(de),L){var Y=Math.max(ue.showticklabels?ue.tickfont.size/2:0,(de.showticklabels?de.tickfont.size*.75:0)+(de.ticks==="outside"?de.ticklen*.87:0)),X=(ce.showticklabels?ce.tickfont.size:0)+(ce.ticks==="outside"?ce.ticklen:0)+3;$["a-title"]=l.draw(B,"a"+W,{propContainer:ue,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-ue.title.font.size/3-Y,"text-anchor":"middle"}}),$["b-title"]=l.draw(B,"b"+W,{propContainer:ce,propName:U.id+".baxis.title.text",placeholder:t(B,"Click to enter Component B title"),attributes:{x:U.x0-X,y:U.y0+U.h+ce.title.font.size*.83+X,"text-anchor":"middle"}}),$["c-title"]=l.draw(B,"c"+W,{propContainer:de,propName:U.id+".caxis.title.text",placeholder:t(B,"Click to enter Component C title"),attributes:{x:U.x0+U.w+X,y:U.y0+U.h+de.title.font.size*.83+X,"text-anchor":"middle"}})}},d.drawAx=function(L){var U=this,B=U.graphDiv,W=L._name,$=W.charAt(0),ue=L._id,ce=U.layers[W],de=30,Y=$+"tickLayout",X=g(L);U[Y]!==X&&(ce.selectAll("."+ue+"tick").remove(),U[Y]=X),L.setScale();var Q=s.calcTicks(L),V=s.clipEnds(L,Q),le=s.makeTransTickFn(L),ae=s.getTickSigns(L)[2],j=M.deg2rad(de),ee=ae*(L.linewidth||1)/2,te=ae*L.ticklen,pe=U.w,we=U.h,Se=$==="b"?"M0,"+ee+"l"+Math.sin(j)*te+","+Math.cos(j)*te:"M"+ee+",0l"+Math.cos(j)*te+","+-Math.sin(j)*te,Re={a:"M0,0l"+we+",-"+pe/2,b:"M0,0l-"+pe/2+",-"+we,c:"M0,0l-"+we+","+pe/2}[$];s.drawTicks(B,L,{vals:L.ticks==="inside"?V:Q,layer:ce,path:Se,transFn:le,crisp:!1}),s.drawGrid(B,L,{vals:V,layer:U.layers[$+"grid"],path:Re,transFn:le,crisp:!1}),s.drawLabels(B,L,{vals:Q,layer:ce,transFn:le,labelFns:s.makeLabelFns(L,0,de)})};function g(L){return L.ticks+String(L.ticklen)+String(L.showticklabels)}var y=p.MINZOOM/2+.87,D="m-0.87,.5h"+y+"v3h-"+(y+5.2)+"l"+(y/2+2.6)+",-"+(y*.87+4.5)+"l2.6,1.5l-"+y/2+","+y*.87+"Z",P="m0.87,.5h-"+y+"v3h"+(y+5.2)+"l-"+(y/2+2.6)+",-"+(y*.87+4.5)+"l-2.6,1.5l"+y/2+","+y*.87+"Z",z="m0,1l"+y/2+","+y*.87+"l2.6,-1.5l-"+(y/2+2.6)+",-"+(y*.87+4.5)+"l-"+(y/2+2.6)+","+(y*.87+4.5)+"l2.6,1.5l"+y/2+",-"+y*.87+"Z",F="m0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2Z",N=!0;d.clearOutline=function(){E(this.dragOptions),A(this.dragOptions.gd)},d.initInteractions=function(){var L=this,U=L.layers.plotbg.select("path").node(),B=L.graphDiv,W=B._fullLayout._zoomlayer,$,ue;this.dragOptions={element:U,gd:B,plotinfo:{id:L.id,domain:B._fullLayout[L.id].domain,xaxis:L.xaxis,yaxis:L.yaxis},subplot:L.id,prepFn:function(he,se,ne){L.dragOptions.xaxes=[L.xaxis],L.dragOptions.yaxes=[L.yaxis],$=B._fullLayout._invScaleX,ue=B._fullLayout._invScaleY;var Ce=L.dragOptions.dragmode=B._fullLayout.dragmode;c(Ce)?L.dragOptions.minDrag=1:L.dragOptions.minDrag=void 0,Ce==="zoom"?(L.dragOptions.moveFn=je,L.dragOptions.clickFn=pe,L.dragOptions.doneFn=at,we(he,se,ne)):Ce==="pan"?(L.dragOptions.moveFn=tt,L.dragOptions.clickFn=pe,L.dragOptions.doneFn=Ve,nt(),L.clearOutline(B)):(T(Ce)||c(Ce))&&x(he,se,ne,L.dragOptions,Ce)}};var ce,de,Y,X,Q,V,le,ae,j,ee;function te(he){var se={};return se[L.id+".aaxis.min"]=he.a,se[L.id+".baxis.min"]=he.b,se[L.id+".caxis.min"]=he.c,se}function pe(he,se){var ne=B._fullLayout.clickmode;O(B),he===2&&(B.emit("plotly_doubleclick",null),S.call("_guiRelayout",B,te({a:0,b:0,c:0}))),ne.indexOf("select")>-1&&he===1&&w(se,B,[L.xaxis],[L.yaxis],L.id,L.dragOptions),ne.indexOf("event")>-1&&f.click(B,se,L.id)}function we(he,se,ne){var Ce=U.getBoundingClientRect();ce=se-Ce.left,de=ne-Ce.top,B._fullLayout._calcInverseTransform(B);var Ze=B._fullLayout._invTransform,rt=M.apply3DTransform(Ze)(ce,de);ce=rt[0],de=rt[1],Y={a:L.aaxis.range[0],b:L.baxis.range[1],c:L.caxis.range[1]},Q=Y,X=L.aaxis.range[1]-Y.a,V=_(L.graphDiv._fullLayout[L.id].bgcolor).getLuminance(),le="M0,"+L.h+"L"+L.w/2+", 0L"+L.w+","+L.h+"Z",ae=!1,j=W.append("path").attr("class","zoombox").attr("transform",e(L.x0,L.y0)).style({fill:V>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",le),ee=W.append("path").attr("class","zoombox-corners").attr("transform",e(L.x0,L.y0)).style({fill:r.background,stroke:r.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),L.clearOutline(B)}function Se(he,se){return 1-se/L.h}function Re(he,se){return 1-(he+(L.h-se)/Math.sqrt(3))/L.w}function Pe(he,se){return(he-(L.h-se)/Math.sqrt(3))/L.w}function je(he,se){var ne=ce+he*$,Ce=de+se*ue,Ze=Math.max(0,Math.min(1,Se(ce,de),Se(ne,Ce))),rt=Math.max(0,Math.min(1,Re(ce,de),Re(ne,Ce))),Je=Math.max(0,Math.min(1,Pe(ce,de),Pe(ne,Ce))),St=(Ze/2+Je)*L.w,kt=(1-Ze/2-rt)*L.w,Bt=(St+kt)/2,Vt=kt-St,Ar=(1-Ze)*L.h,vr=Ar-Vt/u;Vt.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),ee.transition().style("opacity",1).duration(200),ae=!0),B.emit("plotly_relayouting",te(Q))}function at(){O(B),Q!==Y&&(S.call("_guiRelayout",B,te(Q)),N&&B.data&&B._context.showTips&&(M.notifier(t(B,"Double-click to zoom back out"),"long",B),N=!1))}function nt(){Y={a:L.aaxis.range[0],b:L.baxis.range[1],c:L.caxis.range[1]},Q=Y}function tt(he,se){var ne=he/L.xaxis._m,Ce=se/L.yaxis._m;Q={a:Y.a-Ce,b:Y.b+(ne+Ce)/2,c:Y.c-(ne-Ce)/2};var Ze=[Q.a,Q.b,Q.c].sort(M.sorterAsc),rt={a:Ze.indexOf(Q.a),b:Ze.indexOf(Q.b),c:Ze.indexOf(Q.c)};Ze[0]<0&&(Ze[1]+Ze[0]/2<0?(Ze[2]+=Ze[0]+Ze[1],Ze[0]=Ze[1]=0):(Ze[2]+=Ze[0]/2,Ze[1]+=Ze[0]/2,Ze[0]=0),Q={a:Ze[rt.a],b:Ze[rt.b],c:Ze[rt.c]},se=(Y.a-Q.a)*L.yaxis._m,he=(Y.c-Q.c-Y.b+Q.b)*L.xaxis._m);var Je=e(L.x0+he,L.y0+se);L.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",Je);var St=e(-he,-se);L.clipDefRelative.select("path").attr("transform",St),L.aaxis.range=[Q.a,L.sum-Q.b-Q.c],L.baxis.range=[L.sum-Q.a-Q.c,Q.b],L.caxis.range=[L.sum-Q.a-Q.b,Q.c],L.drawAxes(!1),L._hasClipOnAxisFalse&&L.plotContainer.select(".scatterlayer").selectAll(".trace").call(o.hideOutsideRangePoints,L),B.emit("plotly_relayouting",te(Q))}function Ve(){S.call("_guiRelayout",B,te(Q))}U.onmousemove=function(he){f.hover(B,he,L.id),B._fullLayout._lasthover=U,B._fullLayout._hoversubplot=L.id},U.onmouseout=function(he){B._dragging||h.unhover(B,he)},h.init(this.dragOptions)};function O(L){v.select(L).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}}}),SS=He({"src/plots/ternary/layout_attributes.js"(Z,q){"use strict";var v=sh(),_=wc().attributes,S=Xh(),M=pc().overrideAll,e=rs().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=q.exports=M({domain:_({name:"ternary"}),bgcolor:{valType:"color",dflt:v.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"}}}),s0=He({"src/plots/subplot_defaults.js"(Z,q){"use strict";var v=sa(),_=zl(),S=wc().defaults;q.exports=function(e,t,r,o){var a=o.type,i=o.attributes,n=o.handleDefaults,s=o.partition||"x",h=t._subplots[a],f=h.length,m=f&&h[0].replace(/\d+$/,""),c,T;function l(E,p){return v.coerce(c,T,i,E,p)}for(var x=0;x=x&&(b.min=0,d.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,m,c,T){var l=i[m._name];function x(g,y){return S.coerce(f,m,l,g,y)}x("uirevision",T.uirevision),m.type="linear";var w=x("color"),A=w!==l.color.dflt?w:c.font.color,E=m._name,p=E.charAt(0).toUpperCase(),b="Component "+p,d=x("title.text",b);m._hovertitle=d===b?d:p,S.coerceFont(x,"title.font",c.font,{overrideDflt:{size:S.bigFont(c.font.size),color:A}}),x("min"),o(f,m,x,"linear"),t(f,m,x,"linear"),e(f,m,x,"linear",{noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0}),r(f,m,x,{outerTicks:!0});var u=x("showticklabels");u&&(S.coerceFont(x,"tickfont",c.font,{overrideDflt:{color:A}}),x("tickangle"),x("tickformat")),a(f,m,x,{dfltColor:w,bgColor:c.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:l}),x("hoverformat"),x("layer")}}}),LF=He({"src/plots/ternary/index.js"(Z){"use strict";var q=kF(),v=Wh().getSubplotCalcData,_=sa().counterRegex,S="ternary";Z.name=S;var M=Z.attr="subplot";Z.idRoot=S,Z.idRegex=Z.attrRegex=_(S);var e=Z.attributes={};e[M]={valType:"subplotid",dflt:"ternary",editType:"calc"},Z.layoutAttributes=SS(),Z.supplyLayoutDefaults=CF(),Z.plot=function(r){for(var o=r._fullLayout,a=r.calcdata,i=o._subplots[S],n=0;n0){var E=r.xa,p=r.ya,b,d,u,g,y;f.orientation==="h"?(y=o,b="y",u=p,d="x",g=E):(y=a,b="x",u=E,d="y",g=p);var D=h[r.index];if(y>=D.span[0]&&y<=D.span[1]){var P=_.extendFlat({},r),z=g.c2p(y,!0),F=e.getKdeValue(D,f,y),N=e.getPositionOnKdePath(D,f,z),O=u._offset,L=u._length;P[b+"0"]=N[0],P[b+"1"]=N[1],P[d+"0"]=P[d+"1"]=z,P[d+"Label"]=d+": "+S.hoverLabelText(g,y,f[d+"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=m.marker;v.select(this).call(S.fill,c.mc||T.color).call(S.stroke,c.mlc||T.line.color).call(_.dashLine,T.line.dash,c.mlw||T.line.width).style("opacity",m.selectedpoints&&!c.selected?M:1)}}),r(f,m,a),f.selectAll(".regions").each(function(){v.select(this).selectAll("path").style("stroke-width",0).call(S.fill,m.connector.fillcolor)}),f.selectAll(".lines").each(function(){var c=m.connector.line;_.lineGroupStyle(v.select(this).selectAll("path"),c.width,c.color,c.dash)})})}q.exports={style:o}}}),YF=He({"src/traces/funnel/hover.js"(Z,q){"use strict";var v=$n().opacity,_=f1().hoverOnBars,S=sa().formatPercent;q.exports=function(t,r,o,a,i){var n=_(t,r,o,a,i);if(n){var s=n.cd,h=s[0].trace,f=h.orientation==="h",m=n.index,c=s[m],T=f?"x":"y";n[T+"LabelVal"]=c.s,n.percentInitial=c.begR,n.percentInitialLabel=S(c.begR,1),n.percentPrevious=c.difR,n.percentPreviousLabel=S(c.difR,1),n.percentTotal=c.sumR,n.percentTotalLabel=S(c.sumR,1);var l=c.hi||h.hoverinfo,x=[];if(l&&l!=="none"&&l!=="skip"){var w=l==="all",A=l.split("+"),E=function(p){return w||A.indexOf(p)!==-1};E("percent initial")&&x.push(n.percentInitialLabel+" of initial"),E("percent previous")&&x.push(n.percentPreviousLabel+" of previous"),E("percent total")&&x.push(n.percentTotalLabel+" of total")}return n.extraText=x.join("
"),n.color=M(h,c),[n]}};function M(e,t){var r=e.marker,o=t.mc||r.color,a=t.mlc||r.line.color,i=t.mlw||r.line.width;if(v(o))return o;if(v(a)&&i)return a}}}),KF=He({"src/traces/funnel/event_data.js"(Z,q){"use strict";q.exports=function(_,S){return _.x="xVal"in S?S.xVal:S.x,_.y="yVal"in S?S.yVal:S.y,"percentInitial"in S&&(_.percentInitial=S.percentInitial),"percentPrevious"in S&&(_.percentPrevious=S.percentPrevious),"percentTotal"in S&&(_.percentTotal=S.percentTotal),S.xa&&(_.xaxis=S.xa),S.ya&&(_.yaxis=S.ya),_}}}),JF=He({"src/traces/funnel/index.js"(Z,q){"use strict";q.exports={attributes:kS(),layoutAttributes:CS(),supplyDefaults:LS().supplyDefaults,crossTraceDefaults:LS().crossTraceDefaults,supplyLayoutDefaults:VF(),calc:HF(),crossTraceCalc:WF(),plot:XF(),style:ZF().style,hoverPoints:YF(),eventData:KF(),selectPoints:h1(),moduleType:"trace",name:"funnel",basePlotModule:Kf(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}}}),$F=He({"lib/funnel.js"(Z,q){"use strict";q.exports=JF()}}),QF=He({"src/traces/waterfall/constants.js"(Z,q){"use strict";q.exports={eventDataKeys:["initial","delta","final"]}}}),PS=He({"src/traces/waterfall/attributes.js"(Z,q){"use strict";var v=Sv(),_=af().line,S=au(),M=rf().axisHoverFormat,{hovertemplateAttrs:e,texttemplateAttrs:t,templatefallbackAttrs:r}=$l(),o=QF(),a=rs().extendFlat,i=$n();function n(s){return{marker:{color:a({},v.marker.color,{arrayOk:!1,editType:"style"}),line:{color:a({},v.marker.line.color,{arrayOk:!1,editType:"style"}),width:a({},v.marker.line.width,{arrayOk:!1,editType:"style"}),editType:"style"},editType:"style"},editType:"style"}}q.exports={measure:{valType:"data_array",dflt:[],editType:"calc"},base:{valType:"number",dflt:null,arrayOk:!1,editType:"calc"},x:v.x,x0:v.x0,dx:v.dx,y:v.y,y0:v.y0,dy:v.dy,xperiod:v.xperiod,yperiod:v.yperiod,xperiod0:v.xperiod0,yperiod0:v.yperiod0,xperiodalignment:v.xperiodalignment,yperiodalignment:v.yperiodalignment,xhoverformat:M("x"),yhoverformat:M("y"),hovertext:v.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:v.text,textposition:v.textposition,insidetextanchor:v.insidetextanchor,textangle:v.textangle,textfont:v.textfont,insidetextfont:v.insidetextfont,outsidetextfont:v.outsidetextfont,constraintext:v.constraintext,cliponaxis:v.cliponaxis,orientation:v.orientation,offset:v.offset,width:v.width,increasing:n("increasing"),decreasing:n("decreasing"),totals:n("intermediate sums and total"),connector:{line:{color:a({},_.color,{dflt:i.defaultLine}),width:a({},_.width,{editType:"plot"}),dash:_.dash,editType:"plot"},mode:{valType:"enumerated",values:["spanning","between"],dflt:"between",editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:v.offsetgroup,alignmentgroup:v.alignmentgroup,zorder:v.zorder}}}),IS=He({"src/traces/waterfall/layout_attributes.js"(Z,q){"use strict";q.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,q){"use strict";q.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"\u25B2"},DECREASING:{COLOR:"#FF4136",SYMBOL:"\u25BC"}}}}),RS=He({"src/traces/waterfall/defaults.js"(Z,q){"use strict";var v=sa(),_=Q0(),S=gd().handleText,M=n1(),e=Qd(),t=PS(),r=$n(),o=d1(),a=o.INCREASING.COLOR,i=o.DECREASING.COLOR,n="#4499FF";function s(m,c,T){m(c+".marker.color",T),m(c+".marker.line.color",r.defaultLine),m(c+".marker.line.width")}function h(m,c,T,l){function x(b,d){return v.coerce(m,c,t,b,d)}var w=M(m,c,l,x);if(!w){c.visible=!1;return}e(m,c,l,x),x("xhoverformat"),x("yhoverformat"),x("measure"),x("orientation",c.x&&!c.y?"h":"v"),x("base"),x("offset"),x("width"),x("text"),x("hovertext"),x("hovertemplate"),x("hovertemplatefallback");var A=x("textposition");S(m,c,l,x,A,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),c.textposition!=="none"&&(x("texttemplate"),x("texttemplatefallback"),c.texttemplate||x("textinfo")),s(x,"increasing",a),s(x,"decreasing",i),s(x,"totals",n);var E=x("connector.visible");if(E){x("connector.mode");var p=x("connector.line.width");p&&(x("connector.line.color"),x("connector.line.dash"))}x("zorder")}function f(m,c){var T,l;function x(A){return v.coerce(l._input,l,t,A)}if(c.waterfallmode==="group")for(var w=0;w0&&(x?y+="M"+u[0]+","+g[1]+"V"+g[0]:y+="M"+u[1]+","+g[0]+"H"+u[0]),w!=="between"&&(p.isSum||b path").each(function(c){if(!c.isBlank){var T=m[c.dir].marker;v.select(this).call(S.fill,T.color).call(S.stroke,T.line.color).call(_.dashLine,T.line.dash,T.line.width).style("opacity",m.selectedpoints&&!c.selected?M:1)}}),r(f,m,a),f.selectAll(".lines").each(function(){var c=m.connector.line;_.lineGroupStyle(v.select(this).selectAll("path"),c.width,c.color,c.dash)})})}q.exports={style:o}}}),nO=He({"src/traces/waterfall/hover.js"(Z,q){"use strict";var v=Wo().hoverLabelText,_=$n().opacity,S=f1().hoverOnBars,M=d1(),e={increasing:M.INCREASING.SYMBOL,decreasing:M.DECREASING.SYMBOL};q.exports=function(o,a,i,n,s){var h=S(o,a,i,n,s);if(!h)return;var f=h.cd,m=f[0].trace,c=m.orientation==="h",T=c?"x":"y",l=c?o.xa:o.ya;function x(D){return v(l,D,m[T+"hoverformat"])}var w=h.index,A=f[w],E=A.isSum?A.b+A.s:A.rawS;h.initial=A.b+A.s-E,h.delta=E,h.final=h.initial+h.delta;var p=x(Math.abs(h.delta));h.deltaLabel=E<0?"("+p+")":p,h.finalLabel=x(h.final),h.initialLabel=x(h.initial);var b=A.hi||m.hoverinfo,d=[];if(b&&b!=="none"&&b!=="skip"){var u=b==="all",g=b.split("+"),y=function(D){return u||g.indexOf(D)!==-1};A.isSum||(y("final")&&(c?!y("x"):!y("y"))&&d.push(h.finalLabel),y("delta")&&(E<0?d.push(h.deltaLabel+" "+e.decreasing):d.push(h.deltaLabel+" "+e.increasing)),y("initial")&&d.push("Initial: "+h.initialLabel))}return d.length&&(h.extraText=d.join("
")),h.color=t(m,A),[h]};function t(r,o){var a=r[o.dir].marker,i=a.color,n=a.line.color,s=a.line.width;if(_(i))return i;if(_(n)&&s)return n}}}),oO=He({"src/traces/waterfall/event_data.js"(Z,q){"use strict";q.exports=function(_,S){return _.x="xVal"in S?S.xVal:S.x,_.y="yVal"in S?S.yVal:S.y,"initial"in S&&(_.initial=S.initial),"delta"in S&&(_.delta=S.delta),"final"in S&&(_.final=S.final),S.xa&&(_.xaxis=S.xa),S.ya&&(_.yaxis=S.ya),_}}}),sO=He({"src/traces/waterfall/index.js"(Z,q){"use strict";q.exports={attributes:PS(),layoutAttributes:IS(),supplyDefaults:RS().supplyDefaults,crossTraceDefaults:RS().crossTraceDefaults,supplyLayoutDefaults:eO(),calc:tO(),crossTraceCalc:rO(),plot:aO(),style:iO().style,hoverPoints:nO(),eventData:oO(),selectPoints:h1(),moduleType:"trace",name:"waterfall",basePlotModule:Kf(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}}}),lO=He({"lib/waterfall.js"(Z,q){"use strict";q.exports=sO()}}),v1=He({"src/traces/image/constants.js"(Z,q){"use strict";q.exports={colormodel:{rgb:{min:[0,0,0],max:[255,255,255],fmt:function(v){return v.slice(0,3)},suffix:["","",""]},rgba:{min:[0,0,0,0],max:[255,255,255,1],fmt:function(v){return v.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(v){return v.slice(0,4)},suffix:["","","",""]},hsl:{min:[0,0,0],max:[360,100,100],fmt:function(v){var _=v.slice(0,3);return _[1]=_[1]+"%",_[2]=_[2]+"%",_},suffix:["\xB0","%","%"]},hsla:{min:[0,0,0,0],max:[360,100,100,1],fmt:function(v){var _=v.slice(0,4);return _[1]=_[1]+"%",_[2]=_[2]+"%",_},suffix:["\xB0","%","%",""]}}}}}),DS=He({"src/traces/image/attributes.js"(Z,q){"use strict";var v=au(),_=af().zorder,{hovertemplateAttrs:S,templatefallbackAttrs:M}=$l(),e=rs().extendFlat,t=v1().colormodel,r=["rgb","rgba","rgba256","hsl","hsla"],o=[],a=[];for(n=0;n0)throw new Error("Invalid string. Length must be a multiple of 4");var m=h.indexOf("=");m===-1&&(m=f);var c=m===f?0:4-m%4;return[m,c]}function r(h){var f=t(h),m=f[0],c=f[1];return(m+c)*3/4-c}function o(h,f,m){return(f+m)*3/4-m}function a(h){var f,m=t(h),c=m[0],T=m[1],l=new _(o(h,c,T)),x=0,w=T>0?c-4:c,A;for(A=0;A>16&255,l[x++]=f>>8&255,l[x++]=f&255;return T===2&&(f=v[h.charCodeAt(A)]<<2|v[h.charCodeAt(A+1)]>>4,l[x++]=f&255),T===1&&(f=v[h.charCodeAt(A)]<<10|v[h.charCodeAt(A+1)]<<4|v[h.charCodeAt(A+2)]>>2,l[x++]=f>>8&255,l[x++]=f&255),l}function i(h){return q[h>>18&63]+q[h>>12&63]+q[h>>6&63]+q[h&63]}function n(h,f,m){for(var c,T=[],l=f;lw?w:x+l));return c===1?(f=h[m-1],T.push(q[f>>2]+q[f<<4&63]+"==")):c===2&&(f=(h[m-2]<<8)+h[m-1],T.push(q[f>>10]+q[f>>4&63]+q[f<<2&63]+"=")),T.join("")}}}),fO=He({"node_modules/ieee754/index.js"(Z){Z.read=function(q,v,_,S,M){var e,t,r=M*8-S-1,o=(1<>1,i=-7,n=_?M-1:0,s=_?-1:1,h=q[v+n];for(n+=s,e=h&(1<<-i)-1,h>>=-i,i+=r;i>0;e=e*256+q[v+n],n+=s,i-=8);for(t=e&(1<<-i)-1,e>>=-i,i+=S;i>0;t=t*256+q[v+n],n+=s,i-=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(q,v,_,S,M,e){var t,r,o,a=e*8-M-1,i=(1<>1,s=M===23?Math.pow(2,-24)-Math.pow(2,-77):0,h=S?0:e-1,f=S?1:-1,m=v<0||v===0&&1/v<0?1:0;for(v=Math.abs(v),isNaN(v)||v===1/0?(r=isNaN(v)?1:0,t=i):(t=Math.floor(Math.log(v)/Math.LN2),v*(o=Math.pow(2,-t))<1&&(t--,o*=2),t+n>=1?v+=s/o:v+=s*Math.pow(2,1-n),v*o>=2&&(t++,o/=2),t+n>=i?(r=0,t=i):t+n>=1?(r=(v*o-1)*Math.pow(2,M),t=t+n):(r=v*Math.pow(2,n-1)*Math.pow(2,M),t=0));M>=8;q[_+h]=r&255,h+=f,r/=256,M-=8);for(t=t<0;q[_+h]=t&255,h+=f,t/=256,a-=8);q[_+h-f]|=m*128}}}),rg=He({"node_modules/buffer/index.js"(Z){"use strict";var q=cO(),v=fO(),_=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=M(),!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 M(){try{let he=new Uint8Array(1),se={foo:function(){return 42}};return Object.setPrototypeOf(se,Uint8Array.prototype),Object.setPrototypeOf(he,se),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 se=new Uint8Array(he);return Object.setPrototypeOf(se,t.prototype),se}function t(he,se,ne){if(typeof he=="number"){if(typeof se=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return i(he)}return r(he,se,ne)}t.poolSize=8192;function r(he,se,ne){if(typeof he=="string")return n(he,se);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(je(he,ArrayBuffer)||he&&je(he.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(je(he,SharedArrayBuffer)||he&&je(he.buffer,SharedArrayBuffer)))return f(he,se,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,se,ne);let Ze=m(he);if(Ze)return Ze;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof he[Symbol.toPrimitive]=="function")return t.from(he[Symbol.toPrimitive]("string"),se,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,se,ne){return r(he,se,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,se,ne){return o(he),he<=0?e(he):se!==void 0?typeof ne=="string"?e(he).fill(se,ne):e(he).fill(se):e(he)}t.alloc=function(he,se,ne){return a(he,se,ne)};function i(he){return o(he),e(he<0?0:c(he)|0)}t.allocUnsafe=function(he){return i(he)},t.allocUnsafeSlow=function(he){return i(he)};function n(he,se){if((typeof se!="string"||se==="")&&(se="utf8"),!t.isEncoding(se))throw new TypeError("Unknown encoding: "+se);let ne=l(he,se)|0,Ce=e(ne),Ze=Ce.write(he,se);return Ze!==ne&&(Ce=Ce.slice(0,Ze)),Ce}function s(he){let se=he.length<0?0:c(he.length)|0,ne=e(se);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(se){return se!=null&&se._isBuffer===!0&&se!==t.prototype},t.compare=function(se,ne){if(je(se,Uint8Array)&&(se=t.from(se,se.offset,se.byteLength)),je(ne,Uint8Array)&&(ne=t.from(ne,ne.offset,ne.byteLength)),!t.isBuffer(se)||!t.isBuffer(ne))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(se===ne)return 0;let Ce=se.length,Ze=ne.length;for(let rt=0,Je=Math.min(Ce,Ze);rtZe.length?(t.isBuffer(Je)||(Je=t.from(Je)),Je.copy(Ze,rt)):Uint8Array.prototype.set.call(Ze,Je,rt);else if(t.isBuffer(Je))Je.copy(Ze,rt);else throw new TypeError('"list" argument must be an Array of Buffers');rt+=Je.length}return Ze};function l(he,se){if(t.isBuffer(he))return he.length;if(ArrayBuffer.isView(he)||je(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 Ze=!1;for(;;)switch(se){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 Re(he).length;default:if(Ze)return Ce?-1:pe(he).length;se=(""+se).toLowerCase(),Ze=!0}}t.byteLength=l;function x(he,se,ne){let Ce=!1;if((se===void 0||se<0)&&(se=0),se>this.length||((ne===void 0||ne>this.length)&&(ne=this.length),ne<=0)||(ne>>>=0,se>>>=0,ne<=se))return"";for(he||(he="utf8");;)switch(he){case"hex":return O(this,se,ne);case"utf8":case"utf-8":return D(this,se,ne);case"ascii":return F(this,se,ne);case"latin1":case"binary":return N(this,se,ne);case"base64":return y(this,se,ne);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,se,ne);default:if(Ce)throw new TypeError("Unknown encoding: "+he);he=(he+"").toLowerCase(),Ce=!0}}t.prototype._isBuffer=!0;function w(he,se,ne){let Ce=he[se];he[se]=he[ne],he[ne]=Ce}t.prototype.swap16=function(){let se=this.length;if(se%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let ne=0;nene&&(se+=" ... "),""},_&&(t.prototype[_]=t.prototype.inspect),t.prototype.compare=function(se,ne,Ce,Ze,rt){if(je(se,Uint8Array)&&(se=t.from(se,se.offset,se.byteLength)),!t.isBuffer(se))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof se);if(ne===void 0&&(ne=0),Ce===void 0&&(Ce=se?se.length:0),Ze===void 0&&(Ze=0),rt===void 0&&(rt=this.length),ne<0||Ce>se.length||Ze<0||rt>this.length)throw new RangeError("out of range index");if(Ze>=rt&&ne>=Ce)return 0;if(Ze>=rt)return-1;if(ne>=Ce)return 1;if(ne>>>=0,Ce>>>=0,Ze>>>=0,rt>>>=0,this===se)return 0;let Je=rt-Ze,St=Ce-ne,kt=Math.min(Je,St),Bt=this.slice(Ze,rt),Vt=se.slice(ne,Ce);for(let Ar=0;Ar2147483647?ne=2147483647:ne<-2147483648&&(ne=-2147483648),ne=+ne,at(ne)&&(ne=Ze?0:he.length-1),ne<0&&(ne=he.length+ne),ne>=he.length){if(Ze)return-1;ne=he.length-1}else if(ne<0)if(Ze)ne=0;else return-1;if(typeof se=="string"&&(se=t.from(se,Ce)),t.isBuffer(se))return se.length===0?-1:E(he,se,ne,Ce,Ze);if(typeof se=="number")return se=se&255,typeof Uint8Array.prototype.indexOf=="function"?Ze?Uint8Array.prototype.indexOf.call(he,se,ne):Uint8Array.prototype.lastIndexOf.call(he,se,ne):E(he,[se],ne,Ce,Ze);throw new TypeError("val must be string, number or Buffer")}function E(he,se,ne,Ce,Ze){let rt=1,Je=he.length,St=se.length;if(Ce!==void 0&&(Ce=String(Ce).toLowerCase(),Ce==="ucs2"||Ce==="ucs-2"||Ce==="utf16le"||Ce==="utf-16le")){if(he.length<2||se.length<2)return-1;rt=2,Je/=2,St/=2,ne/=2}function kt(Vt,Ar){return rt===1?Vt[Ar]:Vt.readUInt16BE(Ar*rt)}let Bt;if(Ze){let Vt=-1;for(Bt=ne;BtJe&&(ne=Je-St),Bt=ne;Bt>=0;Bt--){let Vt=!0;for(let Ar=0;ArZe&&(Ce=Ze)):Ce=Ze;let rt=se.length;Ce>rt/2&&(Ce=rt/2);let Je;for(Je=0;Je>>0,isFinite(Ce)?(Ce=Ce>>>0,Ze===void 0&&(Ze="utf8")):(Ze=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),se.length>0&&(Ce<0||ne<0)||ne>this.length)throw new RangeError("Attempt to write outside buffer bounds");Ze||(Ze="utf8");let Je=!1;for(;;)switch(Ze){case"hex":return p(this,se,ne,Ce);case"utf8":case"utf-8":return b(this,se,ne,Ce);case"ascii":case"latin1":case"binary":return d(this,se,ne,Ce);case"base64":return u(this,se,ne,Ce);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return g(this,se,ne,Ce);default:if(Je)throw new TypeError("Unknown encoding: "+Ze);Ze=(""+Ze).toLowerCase(),Je=!0}},t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function y(he,se,ne){return se===0&&ne===he.length?q.fromByteArray(he):q.fromByteArray(he.slice(se,ne))}function D(he,se,ne){ne=Math.min(he.length,ne);let Ce=[],Ze=se;for(;Ze239?4:rt>223?3:rt>191?2:1;if(Ze+St<=ne){let kt,Bt,Vt,Ar;switch(St){case 1:rt<128&&(Je=rt);break;case 2:kt=he[Ze+1],(kt&192)===128&&(Ar=(rt&31)<<6|kt&63,Ar>127&&(Je=Ar));break;case 3:kt=he[Ze+1],Bt=he[Ze+2],(kt&192)===128&&(Bt&192)===128&&(Ar=(rt&15)<<12|(kt&63)<<6|Bt&63,Ar>2047&&(Ar<55296||Ar>57343)&&(Je=Ar));break;case 4:kt=he[Ze+1],Bt=he[Ze+2],Vt=he[Ze+3],(kt&192)===128&&(Bt&192)===128&&(Vt&192)===128&&(Ar=(rt&15)<<18|(kt&63)<<12|(Bt&63)<<6|Vt&63,Ar>65535&&Ar<1114112&&(Je=Ar))}}Je===null?(Je=65533,St=1):Je>65535&&(Je-=65536,Ce.push(Je>>>10&1023|55296),Je=56320|Je&1023),Ce.push(Je),Ze+=St}return z(Ce)}var P=4096;function z(he){let se=he.length;if(se<=P)return String.fromCharCode.apply(String,he);let ne="",Ce=0;for(;CeCe)&&(ne=Ce);let Ze="";for(let rt=se;rtCe&&(se=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(se,ne,Ce){se=se>>>0,ne=ne>>>0,Ce||U(se,ne,this.length);let Ze=this[se],rt=1,Je=0;for(;++Je>>0,ne=ne>>>0,Ce||U(se,ne,this.length);let Ze=this[se+--ne],rt=1;for(;ne>0&&(rt*=256);)Ze+=this[se+--ne]*rt;return Ze},t.prototype.readUint8=t.prototype.readUInt8=function(se,ne){return se=se>>>0,ne||U(se,1,this.length),this[se]},t.prototype.readUint16LE=t.prototype.readUInt16LE=function(se,ne){return se=se>>>0,ne||U(se,2,this.length),this[se]|this[se+1]<<8},t.prototype.readUint16BE=t.prototype.readUInt16BE=function(se,ne){return se=se>>>0,ne||U(se,2,this.length),this[se]<<8|this[se+1]},t.prototype.readUint32LE=t.prototype.readUInt32LE=function(se,ne){return se=se>>>0,ne||U(se,4,this.length),(this[se]|this[se+1]<<8|this[se+2]<<16)+this[se+3]*16777216},t.prototype.readUint32BE=t.prototype.readUInt32BE=function(se,ne){return se=se>>>0,ne||U(se,4,this.length),this[se]*16777216+(this[se+1]<<16|this[se+2]<<8|this[se+3])},t.prototype.readBigUInt64LE=tt(function(se){se=se>>>0,ae(se,"offset");let ne=this[se],Ce=this[se+7];(ne===void 0||Ce===void 0)&&j(se,this.length-8);let Ze=ne+this[++se]*2**8+this[++se]*2**16+this[++se]*2**24,rt=this[++se]+this[++se]*2**8+this[++se]*2**16+Ce*2**24;return BigInt(Ze)+(BigInt(rt)<>>0,ae(se,"offset");let ne=this[se],Ce=this[se+7];(ne===void 0||Ce===void 0)&&j(se,this.length-8);let Ze=ne*2**24+this[++se]*2**16+this[++se]*2**8+this[++se],rt=this[++se]*2**24+this[++se]*2**16+this[++se]*2**8+Ce;return(BigInt(Ze)<>>0,ne=ne>>>0,Ce||U(se,ne,this.length);let Ze=this[se],rt=1,Je=0;for(;++Je=rt&&(Ze-=Math.pow(2,8*ne)),Ze},t.prototype.readIntBE=function(se,ne,Ce){se=se>>>0,ne=ne>>>0,Ce||U(se,ne,this.length);let Ze=ne,rt=1,Je=this[se+--Ze];for(;Ze>0&&(rt*=256);)Je+=this[se+--Ze]*rt;return rt*=128,Je>=rt&&(Je-=Math.pow(2,8*ne)),Je},t.prototype.readInt8=function(se,ne){return se=se>>>0,ne||U(se,1,this.length),this[se]&128?(255-this[se]+1)*-1:this[se]},t.prototype.readInt16LE=function(se,ne){se=se>>>0,ne||U(se,2,this.length);let Ce=this[se]|this[se+1]<<8;return Ce&32768?Ce|4294901760:Ce},t.prototype.readInt16BE=function(se,ne){se=se>>>0,ne||U(se,2,this.length);let Ce=this[se+1]|this[se]<<8;return Ce&32768?Ce|4294901760:Ce},t.prototype.readInt32LE=function(se,ne){return se=se>>>0,ne||U(se,4,this.length),this[se]|this[se+1]<<8|this[se+2]<<16|this[se+3]<<24},t.prototype.readInt32BE=function(se,ne){return se=se>>>0,ne||U(se,4,this.length),this[se]<<24|this[se+1]<<16|this[se+2]<<8|this[se+3]},t.prototype.readBigInt64LE=tt(function(se){se=se>>>0,ae(se,"offset");let ne=this[se],Ce=this[se+7];(ne===void 0||Ce===void 0)&&j(se,this.length-8);let Ze=this[se+4]+this[se+5]*2**8+this[se+6]*2**16+(Ce<<24);return(BigInt(Ze)<>>0,ae(se,"offset");let ne=this[se],Ce=this[se+7];(ne===void 0||Ce===void 0)&&j(se,this.length-8);let Ze=(ne<<24)+this[++se]*2**16+this[++se]*2**8+this[++se];return(BigInt(Ze)<>>0,ne||U(se,4,this.length),v.read(this,se,!0,23,4)},t.prototype.readFloatBE=function(se,ne){return se=se>>>0,ne||U(se,4,this.length),v.read(this,se,!1,23,4)},t.prototype.readDoubleLE=function(se,ne){return se=se>>>0,ne||U(se,8,this.length),v.read(this,se,!0,52,8)},t.prototype.readDoubleBE=function(se,ne){return se=se>>>0,ne||U(se,8,this.length),v.read(this,se,!1,52,8)};function B(he,se,ne,Ce,Ze,rt){if(!t.isBuffer(he))throw new TypeError('"buffer" argument must be a Buffer instance');if(se>Ze||sehe.length)throw new RangeError("Index out of range")}t.prototype.writeUintLE=t.prototype.writeUIntLE=function(se,ne,Ce,Ze){if(se=+se,ne=ne>>>0,Ce=Ce>>>0,!Ze){let St=Math.pow(2,8*Ce)-1;B(this,se,ne,Ce,St,0)}let rt=1,Je=0;for(this[ne]=se&255;++Je>>0,Ce=Ce>>>0,!Ze){let St=Math.pow(2,8*Ce)-1;B(this,se,ne,Ce,St,0)}let rt=Ce-1,Je=1;for(this[ne+rt]=se&255;--rt>=0&&(Je*=256);)this[ne+rt]=se/Je&255;return ne+Ce},t.prototype.writeUint8=t.prototype.writeUInt8=function(se,ne,Ce){return se=+se,ne=ne>>>0,Ce||B(this,se,ne,1,255,0),this[ne]=se&255,ne+1},t.prototype.writeUint16LE=t.prototype.writeUInt16LE=function(se,ne,Ce){return se=+se,ne=ne>>>0,Ce||B(this,se,ne,2,65535,0),this[ne]=se&255,this[ne+1]=se>>>8,ne+2},t.prototype.writeUint16BE=t.prototype.writeUInt16BE=function(se,ne,Ce){return se=+se,ne=ne>>>0,Ce||B(this,se,ne,2,65535,0),this[ne]=se>>>8,this[ne+1]=se&255,ne+2},t.prototype.writeUint32LE=t.prototype.writeUInt32LE=function(se,ne,Ce){return se=+se,ne=ne>>>0,Ce||B(this,se,ne,4,4294967295,0),this[ne+3]=se>>>24,this[ne+2]=se>>>16,this[ne+1]=se>>>8,this[ne]=se&255,ne+4},t.prototype.writeUint32BE=t.prototype.writeUInt32BE=function(se,ne,Ce){return se=+se,ne=ne>>>0,Ce||B(this,se,ne,4,4294967295,0),this[ne]=se>>>24,this[ne+1]=se>>>16,this[ne+2]=se>>>8,this[ne+3]=se&255,ne+4};function W(he,se,ne,Ce,Ze){le(se,Ce,Ze,he,ne,7);let rt=Number(se&BigInt(4294967295));he[ne++]=rt,rt=rt>>8,he[ne++]=rt,rt=rt>>8,he[ne++]=rt,rt=rt>>8,he[ne++]=rt;let Je=Number(se>>BigInt(32)&BigInt(4294967295));return he[ne++]=Je,Je=Je>>8,he[ne++]=Je,Je=Je>>8,he[ne++]=Je,Je=Je>>8,he[ne++]=Je,ne}function $(he,se,ne,Ce,Ze){le(se,Ce,Ze,he,ne,7);let rt=Number(se&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 Je=Number(se>>BigInt(32)&BigInt(4294967295));return he[ne+3]=Je,Je=Je>>8,he[ne+2]=Je,Je=Je>>8,he[ne+1]=Je,Je=Je>>8,he[ne]=Je,ne+8}t.prototype.writeBigUInt64LE=tt(function(se,ne=0){return W(this,se,ne,BigInt(0),BigInt("0xffffffffffffffff"))}),t.prototype.writeBigUInt64BE=tt(function(se,ne=0){return $(this,se,ne,BigInt(0),BigInt("0xffffffffffffffff"))}),t.prototype.writeIntLE=function(se,ne,Ce,Ze){if(se=+se,ne=ne>>>0,!Ze){let kt=Math.pow(2,8*Ce-1);B(this,se,ne,Ce,kt-1,-kt)}let rt=0,Je=1,St=0;for(this[ne]=se&255;++rt>0)-St&255;return ne+Ce},t.prototype.writeIntBE=function(se,ne,Ce,Ze){if(se=+se,ne=ne>>>0,!Ze){let kt=Math.pow(2,8*Ce-1);B(this,se,ne,Ce,kt-1,-kt)}let rt=Ce-1,Je=1,St=0;for(this[ne+rt]=se&255;--rt>=0&&(Je*=256);)se<0&&St===0&&this[ne+rt+1]!==0&&(St=1),this[ne+rt]=(se/Je>>0)-St&255;return ne+Ce},t.prototype.writeInt8=function(se,ne,Ce){return se=+se,ne=ne>>>0,Ce||B(this,se,ne,1,127,-128),se<0&&(se=255+se+1),this[ne]=se&255,ne+1},t.prototype.writeInt16LE=function(se,ne,Ce){return se=+se,ne=ne>>>0,Ce||B(this,se,ne,2,32767,-32768),this[ne]=se&255,this[ne+1]=se>>>8,ne+2},t.prototype.writeInt16BE=function(se,ne,Ce){return se=+se,ne=ne>>>0,Ce||B(this,se,ne,2,32767,-32768),this[ne]=se>>>8,this[ne+1]=se&255,ne+2},t.prototype.writeInt32LE=function(se,ne,Ce){return se=+se,ne=ne>>>0,Ce||B(this,se,ne,4,2147483647,-2147483648),this[ne]=se&255,this[ne+1]=se>>>8,this[ne+2]=se>>>16,this[ne+3]=se>>>24,ne+4},t.prototype.writeInt32BE=function(se,ne,Ce){return se=+se,ne=ne>>>0,Ce||B(this,se,ne,4,2147483647,-2147483648),se<0&&(se=4294967295+se+1),this[ne]=se>>>24,this[ne+1]=se>>>16,this[ne+2]=se>>>8,this[ne+3]=se&255,ne+4},t.prototype.writeBigInt64LE=tt(function(se,ne=0){return W(this,se,ne,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),t.prototype.writeBigInt64BE=tt(function(se,ne=0){return $(this,se,ne,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function ue(he,se,ne,Ce,Ze,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,se,ne,Ce,Ze){return se=+se,ne=ne>>>0,Ze||ue(he,se,ne,4,34028234663852886e22,-34028234663852886e22),v.write(he,se,ne,Ce,23,4),ne+4}t.prototype.writeFloatLE=function(se,ne,Ce){return ce(this,se,ne,!0,Ce)},t.prototype.writeFloatBE=function(se,ne,Ce){return ce(this,se,ne,!1,Ce)};function de(he,se,ne,Ce,Ze){return se=+se,ne=ne>>>0,Ze||ue(he,se,ne,8,17976931348623157e292,-17976931348623157e292),v.write(he,se,ne,Ce,52,8),ne+8}t.prototype.writeDoubleLE=function(se,ne,Ce){return de(this,se,ne,!0,Ce)},t.prototype.writeDoubleBE=function(se,ne,Ce){return de(this,se,ne,!1,Ce)},t.prototype.copy=function(se,ne,Ce,Ze){if(!t.isBuffer(se))throw new TypeError("argument should be a Buffer");if(Ce||(Ce=0),!Ze&&Ze!==0&&(Ze=this.length),ne>=se.length&&(ne=se.length),ne||(ne=0),Ze>0&&Ze=this.length)throw new RangeError("Index out of range");if(Ze<0)throw new RangeError("sourceEnd out of bounds");Ze>this.length&&(Ze=this.length),se.length-ne>>0,Ce=Ce===void 0?this.length:Ce>>>0,se||(se=0);let rt;if(typeof se=="number")for(rt=ne;rt2**32?Ze=Q(String(ne)):typeof ne=="bigint"&&(Ze=String(ne),(ne>BigInt(2)**BigInt(32)||ne<-(BigInt(2)**BigInt(32)))&&(Ze=Q(Ze)),Ze+="n"),Ce+=` It must be ${se}. Received ${Ze}`,Ce},RangeError);function Q(he){let se="",ne=he.length,Ce=he[0]==="-"?1:0;for(;ne>=Ce+4;ne-=3)se=`_${he.slice(ne-3,ne)}${se}`;return`${he.slice(0,ne)}${se}`}function V(he,se,ne){ae(se,"offset"),(he[se]===void 0||he[se+ne]===void 0)&&j(se,he.length-(ne+1))}function le(he,se,ne,Ce,Ze,rt){if(he>ne||he3?se===0||se===BigInt(0)?St=`>= 0${Je} and < 2${Je} ** ${(rt+1)*8}${Je}`:St=`>= -(2${Je} ** ${(rt+1)*8-1}${Je}) and < 2 ** ${(rt+1)*8-1}${Je}`:St=`>= ${se}${Je} and <= ${ne}${Je}`,new Y.ERR_OUT_OF_RANGE("value",St,he)}V(Ce,Ze,rt)}function ae(he,se){if(typeof he!="number")throw new Y.ERR_INVALID_ARG_TYPE(se,"number",he)}function j(he,se,ne){throw Math.floor(he)!==he?(ae(he,ne),new Y.ERR_OUT_OF_RANGE(ne||"offset","an integer",he)):se<0?new Y.ERR_BUFFER_OUT_OF_BOUNDS:new Y.ERR_OUT_OF_RANGE(ne||"offset",`>= ${ne?1:0} and <= ${se}`,he)}var ee=/[^+/0-9A-Za-z-_]/g;function te(he){if(he=he.split("=")[0],he=he.trim().replace(ee,""),he.length<2)return"";for(;he.length%4!==0;)he=he+"=";return he}function pe(he,se){se=se||1/0;let ne,Ce=he.length,Ze=null,rt=[];for(let Je=0;Je55295&&ne<57344){if(!Ze){if(ne>56319){(se-=3)>-1&&rt.push(239,191,189);continue}else if(Je+1===Ce){(se-=3)>-1&&rt.push(239,191,189);continue}Ze=ne;continue}if(ne<56320){(se-=3)>-1&&rt.push(239,191,189),Ze=ne;continue}ne=(Ze-55296<<10|ne-56320)+65536}else Ze&&(se-=3)>-1&&rt.push(239,191,189);if(Ze=null,ne<128){if((se-=1)<0)break;rt.push(ne)}else if(ne<2048){if((se-=2)<0)break;rt.push(ne>>6|192,ne&63|128)}else if(ne<65536){if((se-=3)<0)break;rt.push(ne>>12|224,ne>>6&63|128,ne&63|128)}else if(ne<1114112){if((se-=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 se=[];for(let ne=0;ne>8,Ze=ne%256,rt.push(Ze),rt.push(Ce);return rt}function Re(he){return q.toByteArray(te(he))}function Pe(he,se,ne,Ce){let Ze;for(Ze=0;Ze=se.length||Ze>=he.length);++Ze)se[Ze+ne]=he[Ze];return Ze}function je(he,se){return he instanceof se||he!=null&&he.constructor!=null&&he.constructor.name!=null&&he.constructor.name===se.name}function at(he){return he!==he}var nt=function(){let he="0123456789abcdef",se=new Array(256);for(let ne=0;ne<16;++ne){let Ce=ne*16;for(let Ze=0;Ze<16;++Ze)se[Ce+Ze]=he[ne]+he[Ze]}return se}();function tt(he){return typeof BigInt>"u"?Ve:he}function Ve(){throw new Error("BigInt not supported")}}}),p3=He({"node_modules/has-symbols/shams.js"(Z,q){"use strict";q.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var _={},S=Symbol("test"),M=Object(S);if(typeof S=="string"||Object.prototype.toString.call(S)!=="[object Symbol]"||Object.prototype.toString.call(M)!=="[object Symbol]")return!1;var e=42;_[S]=e;for(var t in _)return!1;if(typeof Object.keys=="function"&&Object.keys(_).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(_).length!==0)return!1;var r=Object.getOwnPropertySymbols(_);if(r.length!==1||r[0]!==S||!Object.prototype.propertyIsEnumerable.call(_,S))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(_,S);if(o.value!==e||o.enumerable!==!0)return!1}return!0}}}),W_=He({"node_modules/has-tostringtag/shams.js"(Z,q){"use strict";var v=p3();q.exports=function(){return v()&&!!Symbol.toStringTag}}}),FS=He({"node_modules/es-object-atoms/index.js"(Z,q){"use strict";q.exports=Object}}),hO=He({"node_modules/es-errors/index.js"(Z,q){"use strict";q.exports=Error}}),pO=He({"node_modules/es-errors/eval.js"(Z,q){"use strict";q.exports=EvalError}}),dO=He({"node_modules/es-errors/range.js"(Z,q){"use strict";q.exports=RangeError}}),vO=He({"node_modules/es-errors/ref.js"(Z,q){"use strict";q.exports=ReferenceError}}),OS=He({"node_modules/es-errors/syntax.js"(Z,q){"use strict";q.exports=SyntaxError}}),m1=He({"node_modules/es-errors/type.js"(Z,q){"use strict";q.exports=TypeError}}),mO=He({"node_modules/es-errors/uri.js"(Z,q){"use strict";q.exports=URIError}}),gO=He({"node_modules/math-intrinsics/abs.js"(Z,q){"use strict";q.exports=Math.abs}}),yO=He({"node_modules/math-intrinsics/floor.js"(Z,q){"use strict";q.exports=Math.floor}}),_O=He({"node_modules/math-intrinsics/max.js"(Z,q){"use strict";q.exports=Math.max}}),xO=He({"node_modules/math-intrinsics/min.js"(Z,q){"use strict";q.exports=Math.min}}),bO=He({"node_modules/math-intrinsics/pow.js"(Z,q){"use strict";q.exports=Math.pow}}),wO=He({"node_modules/math-intrinsics/round.js"(Z,q){"use strict";q.exports=Math.round}}),TO=He({"node_modules/math-intrinsics/isNaN.js"(Z,q){"use strict";q.exports=Number.isNaN||function(_){return _!==_}}}),AO=He({"node_modules/math-intrinsics/sign.js"(Z,q){"use strict";var v=TO();q.exports=function(S){return v(S)||S===0?S:S<0?-1:1}}}),SO=He({"node_modules/gopd/gOPD.js"(Z,q){"use strict";q.exports=Object.getOwnPropertyDescriptor}}),ag=He({"node_modules/gopd/index.js"(Z,q){"use strict";var v=SO();if(v)try{v([],"length")}catch{v=null}q.exports=v}}),X_=He({"node_modules/es-define-property/index.js"(Z,q){"use strict";var v=Object.defineProperty||!1;if(v)try{v({},"a",{value:1})}catch{v=!1}q.exports=v}}),MO=He({"node_modules/has-symbols/index.js"(Z,q){"use strict";var v=typeof Symbol<"u"&&Symbol,_=p3();q.exports=function(){return typeof v!="function"||typeof Symbol!="function"||typeof v("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:_()}}}),BS=He({"node_modules/get-proto/Reflect.getPrototypeOf.js"(Z,q){"use strict";q.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null}}),NS=He({"node_modules/get-proto/Object.getPrototypeOf.js"(Z,q){"use strict";var v=FS();q.exports=v.getPrototypeOf||null}}),EO=He({"node_modules/function-bind/implementation.js"(Z,q){"use strict";var v="Function.prototype.bind called on incompatible ",_=Object.prototype.toString,S=Math.max,M="[object Function]",e=function(a,i){for(var n=[],s=0;s"u"||!b?v:b(Uint8Array),z={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?v:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?v:ArrayBuffer,"%ArrayIteratorPrototype%":p&&b?b([][Symbol.iterator]()):v,"%AsyncFromSyncIteratorPrototype%":v,"%AsyncFunction%":D,"%AsyncGenerator%":D,"%AsyncGeneratorFunction%":D,"%AsyncIteratorPrototype%":D,"%Atomics%":typeof Atomics>"u"?v:Atomics,"%BigInt%":typeof BigInt>"u"?v:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?v:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?v:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?v:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":S,"%eval%":eval,"%EvalError%":M,"%Float16Array%":typeof Float16Array>"u"?v:Float16Array,"%Float32Array%":typeof Float32Array>"u"?v:Float32Array,"%Float64Array%":typeof Float64Array>"u"?v:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?v:FinalizationRegistry,"%Function%":T,"%GeneratorFunction%":D,"%Int8Array%":typeof Int8Array>"u"?v:Int8Array,"%Int16Array%":typeof Int16Array>"u"?v:Int16Array,"%Int32Array%":typeof Int32Array>"u"?v:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":p&&b?b(b([][Symbol.iterator]())):v,"%JSON%":typeof JSON=="object"?JSON:v,"%Map%":typeof Map>"u"?v:Map,"%MapIteratorPrototype%":typeof Map>"u"||!p||!b?v:b(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":_,"%Object.getOwnPropertyDescriptor%":x,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?v:Promise,"%Proxy%":typeof Proxy>"u"?v:Proxy,"%RangeError%":e,"%ReferenceError%":t,"%Reflect%":typeof Reflect>"u"?v:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?v:Set,"%SetIteratorPrototype%":typeof Set>"u"||!p||!b?v:b(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?v:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":p&&b?b(""[Symbol.iterator]()):v,"%Symbol%":p?Symbol:v,"%SyntaxError%":r,"%ThrowTypeError%":E,"%TypedArray%":P,"%TypeError%":o,"%Uint8Array%":typeof Uint8Array>"u"?v:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?v:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?v:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?v:Uint32Array,"%URIError%":a,"%WeakMap%":typeof WeakMap>"u"?v:WeakMap,"%WeakRef%":typeof WeakRef>"u"?v:WeakRef,"%WeakSet%":typeof WeakSet>"u"?v:WeakSet,"%Function.prototype.call%":y,"%Function.prototype.apply%":g,"%Object.defineProperty%":w,"%Object.getPrototypeOf%":d,"%Math.abs%":i,"%Math.floor%":n,"%Math.max%":s,"%Math.min%":h,"%Math.pow%":f,"%Math.round%":m,"%Math.sign%":c,"%Reflect.getPrototypeOf%":u};if(b)try{null.error}catch(V){F=b(b(V)),z["%Error.prototype%"]=F}var F,N=function V(le){var ae;if(le==="%AsyncFunction%")ae=l("async function () {}");else if(le==="%GeneratorFunction%")ae=l("function* () {}");else if(le==="%AsyncGeneratorFunction%")ae=l("async function* () {}");else if(le==="%AsyncGenerator%"){var j=V("%AsyncGeneratorFunction%");j&&(ae=j.prototype)}else if(le==="%AsyncIteratorPrototype%"){var ee=V("%AsyncGenerator%");ee&&b&&(ae=b(ee.prototype))}return z[le]=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"]},L=g1(),U=RO(),B=L.call(y,Array.prototype.concat),W=L.call(g,Array.prototype.splice),$=L.call(y,String.prototype.replace),ue=L.call(y,String.prototype.slice),ce=L.call(y,RegExp.prototype.exec),de=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Y=/\\(\\)?/g,X=function(le){var ae=ue(le,0,1),j=ue(le,-1);if(ae==="%"&&j!=="%")throw new r("invalid intrinsic syntax, expected closing `%`");if(j==="%"&&ae!=="%")throw new r("invalid intrinsic syntax, expected opening `%`");var ee=[];return $(le,de,function(te,pe,we,Se){ee[ee.length]=we?$(Se,Y,"$1"):pe||te}),ee},Q=function(le,ae){var j=le,ee;if(U(O,j)&&(ee=O[j],j="%"+ee[0]+"%"),U(z,j)){var te=z[j];if(te===D&&(te=N(j)),typeof te>"u"&&!ae)throw new o("intrinsic "+le+" exists, but is not available. Please file an issue!");return{alias:ee,name:j,value:te}}throw new r("intrinsic "+le+" does not exist!")};q.exports=function(le,ae){if(typeof le!="string"||le.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(/^%?[^%]*%?$/,le)===null)throw new r("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var j=X(le),ee=j.length>0?j[0]:"",te=Q("%"+ee+"%",ae),pe=te.name,we=te.value,Se=!1,Re=te.alias;Re&&(ee=Re[0],W(j,B([0,1],Re)));for(var Pe=1,je=!0;Pe=j.length){var Ve=x(we,at);je=!!Ve,je&&"get"in Ve&&!("originalValue"in Ve.get)?we=Ve.get:we=we[at]}else je=U(we,at),we=we[at];je&&!Se&&(z[pe]=we)}}return we}}}),DO=He({"node_modules/define-data-property/index.js"(Z,q){"use strict";var v=X_(),_=OS(),S=m1(),M=ag();q.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,i=arguments.length>4?arguments[4]:null,n=arguments.length>5?arguments[5]:null,s=arguments.length>6?arguments[6]:!1,h=!!M&&M(t,r);if(v)v(t,r,{configurable:n===null&&h?h.configurable:!n,enumerable:a===null&&h?h.enumerable:!a,value:o,writable:i===null&&h?h.writable:!i});else if(s||!a&&!i&&!n)t[r]=o;else throw new _("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,q){"use strict";var v=X_(),_=function(){return!!v};_.hasArrayLengthDefineBug=function(){if(!v)return null;try{return v([],"length",{value:1}).length!==1}catch{return!0}},q.exports=_}}),zO=He({"node_modules/set-function-length/index.js"(Z,q){"use strict";var v=v3(),_=DO(),S=jS()(),M=ag(),e=m1(),t=v("%Math.floor%");q.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 i=arguments.length>2&&!!arguments[2],n=!0,s=!0;if("length"in o&&M){var h=M(o,"length");h&&!h.configurable&&(n=!1),h&&!h.writable&&(s=!1)}return(n||s||!i)&&(S?_(o,"length",a,!0,!0):_(o,"length",a)),o}}}),Z_=He({"node_modules/call-bind/index.js"(Z,q){"use strict";var v=g1(),_=v3(),S=zO(),M=m1(),e=_("%Function.prototype.apply%"),t=_("%Function.prototype.call%"),r=_("%Reflect.apply%",!0)||v.call(t,e),o=X_(),a=_("%Math.max%");q.exports=function(s){if(typeof s!="function")throw new M("a function is required");var h=r(v,t,arguments);return S(h,1+a(0,s.length-(arguments.length-1)),!0)};var i=function(){return r(v,e,arguments)};o?o(q.exports,"apply",{value:i}):q.exports.apply=i}}),y1=He({"node_modules/call-bind/callBound.js"(Z,q){"use strict";var v=v3(),_=Z_(),S=_(v("String.prototype.indexOf"));q.exports=function(e,t){var r=v(e,!!t);return typeof r=="function"&&S(e,".prototype.")>-1?_(r):r}}}),FO=He({"node_modules/is-arguments/index.js"(Z,q){"use strict";var v=W_()(),_=y1(),S=_("Object.prototype.toString"),M=function(o){return v&&o&&typeof o=="object"&&Symbol.toStringTag in o?!1:S(o)==="[object Arguments]"},e=function(o){return M(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 M(arguments)}();M.isLegacyArguments=e,q.exports=t?M:e}}),OO=He({"node_modules/is-generator-function/index.js"(Z,q){"use strict";var v=Object.prototype.toString,_=Function.prototype.toString,S=/^\s*(?:function)?\*/,M=W_()(),e=Object.getPrototypeOf,t=function(){if(!M)return!1;try{return Function("return function*() {}")()}catch{}},r;q.exports=function(a){if(typeof a!="function")return!1;if(S.test(_.call(a)))return!0;if(!M){var i=v.call(a);return i==="[object GeneratorFunction]"}if(!e)return!1;if(typeof r>"u"){var n=t();r=n?e(n):!1}return e(a)===r}}}),BO=He({"node_modules/is-callable/index.js"(Z,q){"use strict";var v=Function.prototype.toString,_=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,S,M;if(typeof _=="function"&&typeof Object.defineProperty=="function")try{S=Object.defineProperty({},"length",{get:function(){throw M}}),M={},_(function(){throw 42},null,S)}catch(x){x!==M&&(_=null)}else _=null;var e=/^\s*class\b/,t=function(w){try{var A=v.call(w);return e.test(A)}catch{return!1}},r=function(w){try{return t(w)?!1:(v.call(w),!0)}catch{return!1}},o=Object.prototype.toString,a="[object Object]",i="[object Function]",n="[object GeneratorFunction]",s="[object HTMLAllCollection]",h="[object HTML document.all class]",f="[object HTMLCollection]",m=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;q.exports=_?function(w){if(T(w))return!0;if(!w||typeof w!="function"&&typeof w!="object")return!1;try{_(w,null,S)}catch(A){if(A!==M)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(m)return r(w);if(t(w))return!1;var A=o.call(w);return A!==i&&A!==n&&!/^\[object HTML/.test(A)?!1:r(w)}}}),qS=He({"node_modules/for-each/index.js"(Z,q){"use strict";var v=BO(),_=Object.prototype.toString,S=Object.prototype.hasOwnProperty,M=function(a,i,n){for(var s=0,h=a.length;s=3&&(s=n),_.call(a)==="[object Array]"?M(a,i,s):typeof a=="string"?e(a,i,s):t(a,i,s)};q.exports=r}}),VS=He({"node_modules/available-typed-arrays/index.js"(Z,q){"use strict";var v=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],_=typeof globalThis>"u"?window:globalThis;q.exports=function(){for(var M=[],e=0;e"u"?window:globalThis,a=_(),i=M("String.prototype.slice"),n=Object.getPrototypeOf,s=M("Array.prototype.indexOf",!0)||function(T,l){for(var x=0;x-1?l:l!=="Object"?!1:m(T)}return e?f(T):null}}}),UO=He({"node_modules/is-typed-array/index.js"(Z,q){"use strict";var v=qS(),_=VS(),S=y1(),M=S("Object.prototype.toString"),e=W_()(),t=ag(),r=typeof globalThis>"u"?window:globalThis,o=_(),a=S("Array.prototype.indexOf",!0)||function(m,c){for(var T=0;T-1}return t?h(m):!1}}}),GS=He({"node_modules/util/support/types.js"(Z){"use strict";var q=FO(),v=OO(),_=NO(),S=UO();function M(Se){return Se.call.bind(Se)}var e=typeof BigInt<"u",t=typeof Symbol<"u",r=M(Object.prototype.toString),o=M(Number.prototype.valueOf),a=M(String.prototype.valueOf),i=M(Boolean.prototype.valueOf);e&&(n=M(BigInt.prototype.valueOf));var n;t&&(s=M(Symbol.prototype.valueOf));var s;function h(Se,Re){if(typeof Se!="object")return!1;try{return Re(Se),!0}catch{return!1}}Z.isArgumentsObject=q,Z.isGeneratorFunction=v,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 m(Se){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(Se):S(Se)||W(Se)}Z.isArrayBufferView=m;function c(Se){return _(Se)==="Uint8Array"}Z.isUint8Array=c;function T(Se){return _(Se)==="Uint8ClampedArray"}Z.isUint8ClampedArray=T;function l(Se){return _(Se)==="Uint16Array"}Z.isUint16Array=l;function x(Se){return _(Se)==="Uint32Array"}Z.isUint32Array=x;function w(Se){return _(Se)==="Int8Array"}Z.isInt8Array=w;function A(Se){return _(Se)==="Int16Array"}Z.isInt16Array=A;function E(Se){return _(Se)==="Int32Array"}Z.isInt32Array=E;function p(Se){return _(Se)==="Float32Array"}Z.isFloat32Array=p;function b(Se){return _(Se)==="Float64Array"}Z.isFloat64Array=b;function d(Se){return _(Se)==="BigInt64Array"}Z.isBigInt64Array=d;function u(Se){return _(Se)==="BigUint64Array"}Z.isBigUint64Array=u;function g(Se){return r(Se)==="[object Map]"}g.working=typeof Map<"u"&&g(new Map);function y(Se){return typeof Map>"u"?!1:g.working?g(Se):Se instanceof Map}Z.isMap=y;function D(Se){return r(Se)==="[object Set]"}D.working=typeof Set<"u"&&D(new Set);function P(Se){return typeof Set>"u"?!1:D.working?D(Se):Se instanceof Set}Z.isSet=P;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 L(Se){return r(Se)==="[object ArrayBuffer]"}L.working=typeof ArrayBuffer<"u"&&L(new ArrayBuffer);function U(Se){return typeof ArrayBuffer>"u"?!1:L.working?L(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 W(Se){return typeof DataView>"u"?!1:B.working?B(Se):Se instanceof DataView}Z.isDataView=W;var $=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function ue(Se){return r(Se)==="[object SharedArrayBuffer]"}function ce(Se){return typeof $>"u"?!1:(typeof ue.working>"u"&&(ue.working=ue(new $)),ue.working?ue(Se):Se instanceof $)}Z.isSharedArrayBuffer=ce;function de(Se){return r(Se)==="[object AsyncFunction]"}Z.isAsyncFunction=de;function Y(Se){return r(Se)==="[object Map Iterator]"}Z.isMapIterator=Y;function X(Se){return r(Se)==="[object Set Iterator]"}Z.isSetIterator=X;function Q(Se){return r(Se)==="[object Generator]"}Z.isGeneratorObject=Q;function V(Se){return r(Se)==="[object WebAssembly.Module]"}Z.isWebAssemblyCompiledModule=V;function le(Se){return h(Se,o)}Z.isNumberObject=le;function ae(Se){return h(Se,a)}Z.isStringObject=ae;function j(Se){return h(Se,i)}Z.isBooleanObject=j;function ee(Se){return e&&h(Se,n)}Z.isBigIntObject=ee;function te(Se){return t&&h(Se,s)}Z.isSymbolObject=te;function pe(Se){return le(Se)||ae(Se)||j(Se)||ee(Se)||te(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,q){q.exports=function(_){return _&&typeof _=="object"&&typeof _.copy=="function"&&typeof _.fill=="function"&&typeof _.readUInt8=="function"}}}),WS=He({"(disabled):node_modules/util/util.js"(Z){var q=Object.getOwnPropertyDescriptors||function(W){for(var $=Object.keys(W),ue={},ce=0;ce<$.length;ce++)ue[$[ce]]=Object.getOwnPropertyDescriptor(W,$[ce]);return ue},v=/%[sdj%]/g;Z.format=function(B){if(!w(B)){for(var W=[],$=0;$=ce)return X;switch(X){case"%s":return String(ue[$++]);case"%d":return Number(ue[$++]);case"%j":try{return JSON.stringify(ue[$++])}catch{return"[Circular]"}default:return X}}),Y=ue[$];$"u")return function(){return Z.deprecate(B,W).apply(this,arguments)};var $=!1;function ue(){if(!$){if(process.throwDeprecation)throw new Error(W);process.traceDeprecation?console.trace(W):console.error(W),$=!0}return B.apply(this,arguments)}return ue};var _={},S=/^$/;M="false",M=M.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),S=new RegExp("^"+M+"$","i");var M;Z.debuglog=function(B){if(B=B.toUpperCase(),!_[B])if(S.test(B)){var W=process.pid;_[B]=function(){var $=Z.format.apply(Z,arguments);console.error("%s %d: %s",B,W,$)}}else _[B]=function(){};return _[B]};function e(B,W){var $={seen:[],stylize:r};return arguments.length>=3&&($.depth=arguments[2]),arguments.length>=4&&($.colors=arguments[3]),c(W)?$.showHidden=W:W&&Z._extend($,W),E($.showHidden)&&($.showHidden=!1),E($.depth)&&($.depth=2),E($.colors)&&($.colors=!1),E($.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,W){var $=e.styles[W];return $?"\x1B["+e.colors[$][0]+"m"+B+"\x1B["+e.colors[$][1]+"m":B}function r(B,W){return B}function o(B){var W={};return B.forEach(function($,ue){W[$]=!0}),W}function a(B,W,$){if(B.customInspect&&W&&g(W.inspect)&&W.inspect!==Z.inspect&&!(W.constructor&&W.constructor.prototype===W)){var ue=W.inspect($,B);return w(ue)||(ue=a(B,ue,$)),ue}var ce=i(B,W);if(ce)return ce;var de=Object.keys(W),Y=o(de);if(B.showHidden&&(de=Object.getOwnPropertyNames(W)),u(W)&&(de.indexOf("message")>=0||de.indexOf("description")>=0))return n(W);if(de.length===0){if(g(W)){var X=W.name?": "+W.name:"";return B.stylize("[Function"+X+"]","special")}if(p(W))return B.stylize(RegExp.prototype.toString.call(W),"regexp");if(d(W))return B.stylize(Date.prototype.toString.call(W),"date");if(u(W))return n(W)}var Q="",V=!1,le=["{","}"];if(m(W)&&(V=!0,le=["[","]"]),g(W)){var ae=W.name?": "+W.name:"";Q=" [Function"+ae+"]"}if(p(W)&&(Q=" "+RegExp.prototype.toString.call(W)),d(W)&&(Q=" "+Date.prototype.toUTCString.call(W)),u(W)&&(Q=" "+n(W)),de.length===0&&(!V||W.length==0))return le[0]+Q+le[1];if($<0)return p(W)?B.stylize(RegExp.prototype.toString.call(W),"regexp"):B.stylize("[Object]","special");B.seen.push(W);var j;return V?j=s(B,W,$,Y,de):j=de.map(function(ee){return h(B,W,$,Y,ee,V)}),B.seen.pop(),f(j,Q,le)}function i(B,W){if(E(W))return B.stylize("undefined","undefined");if(w(W)){var $="'"+JSON.stringify(W).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return B.stylize($,"string")}if(x(W))return B.stylize(""+W,"number");if(c(W))return B.stylize(""+W,"boolean");if(T(W))return B.stylize("null","null")}function n(B){return"["+Error.prototype.toString.call(B)+"]"}function s(B,W,$,ue,ce){for(var de=[],Y=0,X=W.length;Y-1&&(de?X=X.split(` `).map(function(V){return" "+V}).join(` `).slice(2):X=` @@ -1991,7 +1991,7 @@ void main() { `)&&O!=="\\"?(ee(L.join("")),F=h,P):(L.push(N),O=N,P+1)}function Pe(){return Re()}function je(){return N==="/"&&O==="*"?(L.push(N),ee(L.join("")),F=h,P+1):(L.push(N),O=N,P+1)}function at(){if(O==="."&&/\d/.test(N))return F=w,P;if(O==="/"&&N==="*")return F=m,P;if(O==="/"&&N==="/")return F=c,P;if(N==="."&&L.length){for(;nt(L););return F=w,P}if(N===";"||N===")"||N==="("){if(L.length)for(;nt(L););return ee(N),F=h,P+1}var ne=L.length===2&&N!=="=";if(/[\w_\d\s]/.test(N)||ne){for(;nt(L););return F=h,P}return L.push(N),O=N,P+1}function nt(ne){var Ce=0,Ze,rt;do{if(Ze=a.indexOf(ne.slice(0,ne.length+Ce).join("")),rt=a[Ze],Ze===-1){if(Ce--+ne.length>0)continue;rt=ne.slice(0,1).join("")}return ee(rt),ce+=rt.length,L=L.slice(rt.length),L.length}while(!0)}function tt(){return/[^a-fA-F0-9]/.test(N)?(ee(L.join("")),F=h,P):(L.push(N),O=N,P+1)}function Ve(){return N==="."||/[eE]/.test(N)?(L.push(N),F=w,O=N,P+1):N==="x"&&L.length===1&&L[0]==="0"?(F=u,L.push(N),O=N,P+1):/[^\d]/.test(N)?(ee(L.join("")),F=h,P):(L.push(N),O=N,P+1)}function he(){return N==="f"&&(L.push(N),O=N,P+=1),/[eE]/.test(N)||(N==="-"||N==="+")&&/[eE]/.test(O)?(L.push(N),O=N,P+1):/[^\d]/.test(N)?(ee(L.join("")),F=h,P):(L.push(N),O=N,P+1)}function se(){if(/[^\d\w_]/.test(N)){var ne=L.join("");return j[ne]?F=p:ae[ne]?F=E:F=A,ee(L.join("")),F=h,P}return L.push(N),O=N,P+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(i,n){var s=o(n),h=[];return h=h.concat(s(i)),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?n-1:0,x=a?-1:1,w=r[o+l];for(l+=x,s=w&(1<<-T)-1,w>>=-T,T+=f;T>0;s=s*256+r[o+l],l+=x,T-=8);for(h=s&(1<<-T)-1,s>>=-T,T+=i;T>0;h=h*256+r[o+l],l+=x,T-=8);if(s===0)s=1-c;else{if(s===m)return h?NaN:(w?-1:1)*(1/0);h=h+Math.pow(2,i),s=s-c}return(w?-1:1)*h*Math.pow(2,s-i)},t.write=function(r,o,a,i,n,s){var h,f,m,c=s*8-n-1,T=(1<>1,x=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,w=i?0:s-1,A=i?1:-1,E=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*(m=Math.pow(2,-h))<1&&(h--,m*=2),h+l>=1?o+=x/m:o+=x*Math.pow(2,1-l),o*m>=2&&(h++,m/=2),h+l>=T?(f=0,h=T):h+l>=1?(f=(o*m-1)*Math.pow(2,n),h=h+l):(f=o*Math.pow(2,l-1)*Math.pow(2,n),h=0));n>=8;r[a+w]=f&255,w+=A,f/=256,n-=8);for(h=h<0;r[a+w]=h&255,w+=A,h/=256,c-=8);r[a+w-A]|=E*128}},8954:function(e,t,r){"use strict";e.exports=l;var o=r(3250),a=r(6803).Fw;function i(x,w,A){this.vertices=x,this.adjacent=w,this.boundary=A,this.lastVisited=-1}i.prototype.flip=function(){var x=this.vertices[0];this.vertices[0]=this.vertices[1],this.vertices[1]=x;var w=this.adjacent[0];this.adjacent[0]=this.adjacent[1],this.adjacent[1]=w};function n(x,w,A){this.vertices=x,this.cell=w,this.index=A}function s(x,w){return a(x.vertices,w.vertices)}function h(x){return function(){var w=this.tuple;return x.apply(this,w)}}function f(x){var w=o[x+1];return w||(w=o),h(w)}var m=[];function c(x,w,A){this.dimension=x,this.vertices=w,this.simplices=A,this.interior=A.filter(function(b){return!b.boundary}),this.tuple=new Array(x+1);for(var E=0;E<=x;++E)this.tuple[E]=this.vertices[E];var p=m[x];p||(p=m[x]=f(x)),this.orient=p}var T=c.prototype;T.handleBoundaryDegeneracy=function(x,w){var A=this.dimension,E=this.vertices.length-1,p=this.tuple,b=this.vertices,d=[x];for(x.lastVisited=-E;d.length>0;){x=d.pop();for(var u=x.adjacent,g=0;g<=A;++g){var y=u[g];if(!(!y.boundary||y.lastVisited<=-E)){for(var D=y.vertices,P=0;P<=A;++P){var z=D[P];z<0?p[P]=w:p[P]=b[z]}var F=this.orient();if(F>0)return y;y.lastVisited=-E,F===0&&d.push(y)}}}return null},T.walk=function(x,w){var A=this.vertices.length-1,E=this.dimension,p=this.vertices,b=this.tuple,d=w?this.interior.length*Math.random()|0:this.interior.length-1,u=this.interior[d];e:for(;!u.boundary;){for(var g=u.vertices,y=u.adjacent,D=0;D<=E;++D)b[D]=p[g[D]];u.lastVisited=A;for(var D=0;D<=E;++D){var P=y[D];if(!(P.lastVisited>=A)){var z=b[D];b[D]=x;var F=this.orient();if(b[D]=z,F<0){u=P;continue e}else P.boundary?P.lastVisited=-A:P.lastVisited=A}}return}return u},T.addPeaks=function(x,w){var A=this.vertices.length-1,E=this.dimension,p=this.vertices,b=this.tuple,d=this.interior,u=this.simplices,g=[w];w.lastVisited=A,w.vertices[w.vertices.indexOf(-1)]=A,w.boundary=!1,d.push(w);for(var y=[];g.length>0;){var w=g.pop(),D=w.vertices,P=w.adjacent,z=D.indexOf(A);if(!(z<0)){for(var F=0;F<=E;++F)if(F!==z){var N=P[F];if(!(!N.boundary||N.lastVisited>=A)){var O=N.vertices;if(N.lastVisited!==-A){for(var L=0,U=0;U<=E;++U)O[U]<0?(L=U,b[U]=x):b[U]=p[O[U]];var B=this.orient();if(B>0){O[L]=A,N.boundary=!1,d.push(N),g.push(N),N.lastVisited=A;continue}else N.lastVisited=-A}var W=N.adjacent,$=D.slice(),ue=P.slice(),ce=new i($,ue,!0);u.push(ce);var de=W.indexOf(w);if(!(de<0)){W[de]=ce,ue[z]=N,$[F]=-1,ue[F]=w,P[F]=ce,ce.flip();for(var U=0;U<=E;++U){var Y=$[U];if(!(Y<0||Y===A)){for(var X=new Array(E-1),Q=0,V=0;V<=E;++V){var le=$[V];le<0||V===U||(X[Q++]=le)}y.push(new n(X,ce,U))}}}}}}}y.sort(s);for(var F=0;F+1=0?d[g++]=u[D]:y=D&1;if(y===(x&1)){var P=d[0];d[0]=d[1],d[1]=P}w.push(d)}}return w};function l(x,w){var A=x.length;if(A===0)throw new Error("Must have at least d+1 points");var E=x[0].length;if(A<=E)throw new Error("Must input at least d+1 points");var p=x.slice(0,E+1),b=o.apply(void 0,p);if(b===0)throw new Error("Input not in general position");for(var d=new Array(E+1),u=0;u<=E;++u)d[u]=u;b<0&&(d[0]=1,d[1]=0);for(var g=new i(d,new Array(E+1),!1),y=g.adjacent,D=new Array(E+2),u=0;u<=E;++u){for(var P=d.slice(),z=0;z<=E;++z)z===u&&(P[z]=-1);var F=P[0];P[0]=P[1],P[1]=F;var N=new i(P,new Array(E+1),!0);y[u]=N,D[u]=N}D[E+1]=g;for(var u=0;u<=E;++u)for(var P=y[u].vertices,O=y[u].adjacent,z=0;z<=E;++z){var L=P[z];if(L<0){O[z]=g;continue}for(var U=0;U<=E;++U)y[U].vertices.indexOf(L)<0&&(O[z]=y[U])}for(var B=new c(E,p,D),W=!!w,u=E+1;u3*(D+1)?c(this,y):this.left.insert(y):this.left=b([y]);else if(y[0]>this.mid)this.right?4*(this.right.count+1)>3*(D+1)?c(this,y):this.right.insert(y):this.right=b([y]);else{var P=o.ge(this.leftPoints,y,E),z=o.ge(this.rightPoints,y,p);this.leftPoints.splice(P,0,y),this.rightPoints.splice(z,0,y)}},h.remove=function(y){var D=this.count-this.leftPoints;if(y[1]3*(D-1))return T(this,y);var z=this.left.remove(y);return z===n?(this.left=null,this.count-=1,i):(z===i&&(this.count-=1),z)}else if(y[0]>this.mid){if(!this.right)return a;var F=this.left?this.left.count:0;if(4*F>3*(D-1))return T(this,y);var z=this.right.remove(y);return z===n?(this.right=null,this.count-=1,i):(z===i&&(this.count-=1),z)}else{if(this.count===1)return this.leftPoints[0]===y?n:a;if(this.leftPoints.length===1&&this.leftPoints[0]===y){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 L=this.left,z=this.right;N.count-=O.count,N.right=O.left,O.left=L,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 i}for(var L=o.ge(this.leftPoints,y,E);L=0&&y[z][1]>=D;--z){var F=P(y[z]);if(F)return F}}function w(y,D){for(var P=0;Pthis.mid){if(this.right){var P=this.right.queryPoint(y,D);if(P)return P}return x(this.rightPoints,y,D)}else return w(this.leftPoints,D)},h.queryInterval=function(y,D,P){if(ythis.mid&&this.right){var z=this.right.queryInterval(y,D,P);if(z)return z}return Dthis.mid?x(this.rightPoints,y,P):w(this.leftPoints,P)};function A(y,D){return y-D}function E(y,D){var P=y[0]-D[0];return P||y[1]-D[1]}function p(y,D){var P=y[1]-D[1];return P||y[0]-D[0]}function b(y){if(y.length===0)return null;for(var D=[],P=0;P>1],F=[],N=[],O=[],P=0;P13)&&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),i=r(1903),n=r(9921),s=r(7608),h=r(5665),f={length:r(1387),normalize:r(3536),dot:r(244),cross:r(5911)},m=a(),c=a(),T=[0,0,0,0],l=[[0,0,0],[0,0,0],[0,0,0]],x=[0,0,0];e.exports=function(b,d,u,g,y,D){if(d||(d=[0,0,0]),u||(u=[0,0,0]),g||(g=[0,0,0]),y||(y=[0,0,0,1]),D||(D=[0,0,0,1]),!o(m,b)||(i(c,m),c[3]=0,c[7]=0,c[11]=0,c[15]=1,Math.abs(n(c)<1e-8)))return!1;var P=m[3],z=m[7],F=m[11],N=m[12],O=m[13],L=m[14],U=m[15];if(P!==0||z!==0||F!==0){T[0]=P,T[1]=z,T[2]=F,T[3]=U;var B=s(c,c);if(!B)return!1;h(c,c),w(y,T,c)}else y[0]=y[1]=y[2]=0,y[3]=1;if(d[0]=N,d[1]=O,d[2]=L,A(l,m),u[0]=f.length(l[0]),f.normalize(l[0],l[0]),g[0]=f.dot(l[0],l[1]),E(l[1],l[1],l[0],1,-g[0]),u[1]=f.length(l[1]),f.normalize(l[1],l[1]),g[0]/=u[1],g[1]=f.dot(l[0],l[2]),E(l[2],l[2],l[0],1,-g[1]),g[2]=f.dot(l[1],l[2]),E(l[2],l[2],l[1],1,-g[2]),u[2]=f.length(l[2]),f.normalize(l[2],l[2]),g[1]/=u[2],g[2]/=u[2],f.cross(x,l[1],l[2]),f.dot(l[0],x)<0)for(var W=0;W<3;W++)u[W]*=-1,l[W][0]*=-1,l[W][1]*=-1,l[W][2]*=-1;return D[0]=.5*Math.sqrt(Math.max(1+l[0][0]-l[1][1]-l[2][2],0)),D[1]=.5*Math.sqrt(Math.max(1-l[0][0]+l[1][1]-l[2][2],0)),D[2]=.5*Math.sqrt(Math.max(1-l[0][0]-l[1][1]+l[2][2],0)),D[3]=.5*Math.sqrt(Math.max(1+l[0][0]+l[1][1]+l[2][2],0)),l[2][1]>l[1][2]&&(D[0]=-D[0]),l[0][2]>l[2][0]&&(D[1]=-D[1]),l[1][0]>l[0][1]&&(D[2]=-D[2]),!0};function w(p,b,d){var u=b[0],g=b[1],y=b[2],D=b[3];return p[0]=d[0]*u+d[4]*g+d[8]*y+d[12]*D,p[1]=d[1]*u+d[5]*g+d[9]*y+d[13]*D,p[2]=d[2]*u+d[6]*g+d[10]*y+d[14]*D,p[3]=d[3]*u+d[7]*g+d[11]*y+d[15]*D,p}function A(p,b){p[0][0]=b[0],p[0][1]=b[1],p[0][2]=b[2],p[1][0]=b[4],p[1][1]=b[5],p[1][2]=b[6],p[2][0]=b[8],p[2][1]=b[9],p[2][2]=b[10]}function E(p,b,d,u,g){p[0]=b[0]*u+d[0]*g,p[1]=b[1]*u+d[1]*g,p[2]=b[2]*u+d[2]*g}},4335:function(e){e.exports=function(r,o){var a=o[15];if(a===0)return!1;for(var i=1/a,n=0;n<16;n++)r[n]=o[n]*i;return!0}},7442:function(e,t,r){var o=r(6658),a=r(7182),i=r(2652),n=r(9921),s=r(8648),h=T(),f=T(),m=T();e.exports=c;function c(w,A,E,p){if(n(A)===0||n(E)===0)return!1;var b=i(A,h.translate,h.scale,h.skew,h.perspective,h.quaternion),d=i(E,f.translate,f.scale,f.skew,f.perspective,f.quaternion);return!b||!d?!1:(o(m.translate,h.translate,f.translate,p),o(m.skew,h.skew,f.skew,p),o(m.scale,h.scale,f.scale,p),o(m.perspective,h.perspective,f.perspective,p),s(m.quaternion,h.quaternion,f.quaternion,p),a(w,m.translate,m.scale,m.skew,m.perspective,m.quaternion),!0)}function T(){return{translate:l(),scale:l(1),skew:l(),perspective:x(),quaternion:x()}}function l(w){return[w||0,w||0,w||0]}function x(){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(),i=o.create();e.exports=function(s,h,f,m,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(i),m[2]!==0&&(i[9]=m[2],o.multiply(s,s,i)),m[1]!==0&&(i[9]=0,i[8]=m[1],o.multiply(s,s,i)),m[0]!==0&&(i[8]=0,i[4]=m[0],o.multiply(s,s,i)),o.scale(s,s,f),s}},1811:function(e,t,r){"use strict";var o=r(2478),a=r(7442),i=r(7608),n=r(5567),s=r(2408),h=r(7089),f=r(6582),m=r(7656),c=r(2504),T=r(3536),l=[0,0,0];e.exports=E;function x(p){this._components=p.slice(),this._time=[0],this.prevMatrix=p.slice(),this.nextMatrix=p.slice(),this.computedMatrix=p.slice(),this.computedInverse=p.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=x.prototype;w.recalcMatrix=function(p){var b=this._time,d=o.le(b,p),u=this.computedMatrix;if(!(d<0)){var g=this._components;if(d===b.length-1)for(var y=16*d,D=0;D<16;++D)u[D]=g[y++];else{for(var P=b[d+1]-b[d],y=16*d,z=this.prevMatrix,F=!0,D=0;D<16;++D)z[D]=g[y++];for(var N=this.nextMatrix,D=0;D<16;++D)N[D]=g[y++],F=F&&z[D]===N[D];if(P<1e-6||F)for(var D=0;D<16;++D)u[D]=z[D];else a(u,z,N,(p-b[d])/P)}var O=this.computedUp;O[0]=u[1],O[1]=u[5],O[2]=u[9],T(O,O);var L=this.computedInverse;i(L,u);var U=this.computedEye,B=L[15];U[0]=L[12]/B,U[1]=L[13]/B,U[2]=L[14]/B;for(var W=this.computedCenter,$=Math.exp(this.computedRadius[0]),D=0;D<3;++D)W[D]=U[D]-u[2+4*D]*$}},w.idle=function(p){if(!(p1&&o(i[f[l-2]],i[f[l-1]],T)<=0;)l-=1,f.pop();for(f.push(c),l=m.length;l>1&&o(i[m[l-2]],i[m[l-1]],T)>=0;)l-=1,m.pop();m.push(c)}for(var x=new Array(m.length+f.length-2),w=0,s=0,A=f.length;s0;--E)x[w++]=m[E];return x}},351:function(e,t,r){"use strict";e.exports=a;var o=r(4687);function a(i,n){n||(n=i,i=window);var s=0,h=0,f=0,m={shift:!1,alt:!1,control:!1,meta:!1},c=!1;function T(y){var D=!1;return"altKey"in y&&(D=D||y.altKey!==m.alt,m.alt=!!y.altKey),"shiftKey"in y&&(D=D||y.shiftKey!==m.shift,m.shift=!!y.shiftKey),"ctrlKey"in y&&(D=D||y.ctrlKey!==m.control,m.control=!!y.ctrlKey),"metaKey"in y&&(D=D||y.metaKey!==m.meta,m.meta=!!y.metaKey),D}function l(y,D){var P=o.x(D),z=o.y(D);"buttons"in D&&(y=D.buttons|0),(y!==s||P!==h||z!==f||T(D))&&(s=y|0,h=P||0,f=z||0,n&&n(s,h,f,m))}function x(y){l(0,y)}function w(){(s||h||f||m.shift||m.alt||m.meta||m.control)&&(h=f=0,s=0,m.shift=m.alt=m.control=m.meta=!1,n&&n(0,0,0,m))}function A(y){T(y)&&n&&n(s,h,f,m)}function E(y){o.buttons(y)===0?l(0,y):l(s,y)}function p(y){l(s|o.buttons(y),y)}function b(y){l(s&~o.buttons(y),y)}function d(){c||(c=!0,i.addEventListener("mousemove",E),i.addEventListener("mousedown",p),i.addEventListener("mouseup",b),i.addEventListener("mouseleave",x),i.addEventListener("mouseenter",x),i.addEventListener("mouseout",x),i.addEventListener("mouseover",x),i.addEventListener("blur",w),i.addEventListener("keyup",A),i.addEventListener("keydown",A),i.addEventListener("keypress",A),i!==window&&(window.addEventListener("blur",w),window.addEventListener("keyup",A),window.addEventListener("keydown",A),window.addEventListener("keypress",A)))}function u(){c&&(c=!1,i.removeEventListener("mousemove",E),i.removeEventListener("mousedown",p),i.removeEventListener("mouseup",b),i.removeEventListener("mouseleave",x),i.removeEventListener("mouseenter",x),i.removeEventListener("mouseout",x),i.removeEventListener("mouseover",x),i.removeEventListener("blur",w),i.removeEventListener("keyup",A),i.removeEventListener("keydown",A),i.removeEventListener("keypress",A),i!==window&&(window.removeEventListener("blur",w),window.removeEventListener("keyup",A),window.removeEventListener("keydown",A),window.removeEventListener("keypress",A)))}d();var g={element:i};return Object.defineProperties(g,{enabled:{get:function(){return c},set:function(y){y?d():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 m},enumerable:!0}}),g}},24:function(e){var t={left:0,top:0};e.exports=r;function r(a,i,n){i=i||a.currentTarget||a.srcElement,Array.isArray(n)||(n=[0,0]);var s=a.clientX||0,h=a.clientY||0,f=o(i);return n[0]=s-f.left,n[1]=h-f.top,n}function o(a){return a===window||a===document||a===document.body?t:a.getBoundingClientRect()}},4687:function(e,t){"use strict";function r(n){if(typeof n=="object"){if("buttons"in n)return n.buttons;if("which"in n){var s=n.which;if(s===2)return 4;if(s===3)return 2;if(s>0)return 1<=0)return 1<0){if(ue=1,Y[Q++]=m(d[D],w,A,E),D+=B,p>0)for($=1,P=d[D],V=Y[Q]=m(P,w,A,E),j=Y[Q+le],pe=Y[Q+ee],Re=Y[Q+we],(V!==j||V!==pe||V!==Re)&&(F=d[D+z],O=d[D+N],U=d[D+L],h($,ue,P,F,O,U,V,j,pe,Re,w,A,E),Pe=X[Q]=ce++),Q+=1,D+=B,$=2;$0)for($=1,P=d[D],V=Y[Q]=m(P,w,A,E),j=Y[Q+le],pe=Y[Q+ee],Re=Y[Q+we],(V!==j||V!==pe||V!==Re)&&(F=d[D+z],O=d[D+N],U=d[D+L],h($,ue,P,F,O,U,V,j,pe,Re,w,A,E),Pe=X[Q]=ce++,Re!==pe&&f(X[Q+ee],Pe,O,U,pe,Re,w,A,E)),Q+=1,D+=B,$=2;$0){if($=1,Y[Q++]=m(d[D],w,A,E),D+=B,b>0)for(ue=1,P=d[D],V=Y[Q]=m(P,w,A,E),pe=Y[Q+ee],j=Y[Q+le],Re=Y[Q+we],(V!==pe||V!==j||V!==Re)&&(F=d[D+z],O=d[D+N],U=d[D+L],h($,ue,P,F,O,U,V,pe,j,Re,w,A,E),Pe=X[Q]=ce++),Q+=1,D+=B,ue=2;ue0)for(ue=1,P=d[D],V=Y[Q]=m(P,w,A,E),pe=Y[Q+ee],j=Y[Q+le],Re=Y[Q+we],(V!==pe||V!==j||V!==Re)&&(F=d[D+z],O=d[D+N],U=d[D+L],h($,ue,P,F,O,U,V,pe,j,Re,w,A,E),Pe=X[Q]=ce++,Re!==pe&&f(X[Q+ee],Pe,U,F,Re,pe,w,A,E)),Q+=1,D+=B,ue=2;ue 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(m),x=0;x=0?l[x]=!0:l[x]=!1;return i(s.vertex,s.cell,s.phase,c,f,l)}},6199:function(e,t,r){"use strict";var o=r(1338),a={zero:function(E,p,b,d){var u=E[0],g=b[0];d|=0;var y=0,D=g;for(y=0;y2&&y[1]>2&&d(g.pick(-1,-1).lo(1,1).hi(y[0]-2,y[1]-2),u.pick(-1,-1,0).lo(1,1).hi(y[0]-2,y[1]-2),u.pick(-1,-1,1).lo(1,1).hi(y[0]-2,y[1]-2)),y[1]>2&&(b(g.pick(0,-1).lo(1).hi(y[1]-2),u.pick(0,-1,1).lo(1).hi(y[1]-2)),p(u.pick(0,-1,0).lo(1).hi(y[1]-2))),y[1]>2&&(b(g.pick(y[0]-1,-1).lo(1).hi(y[1]-2),u.pick(y[0]-1,-1,1).lo(1).hi(y[1]-2)),p(u.pick(y[0]-1,-1,0).lo(1).hi(y[1]-2))),y[0]>2&&(b(g.pick(-1,0).lo(1).hi(y[0]-2),u.pick(-1,0,0).lo(1).hi(y[0]-2)),p(u.pick(-1,0,1).lo(1).hi(y[0]-2))),y[0]>2&&(b(g.pick(-1,y[1]-1).lo(1).hi(y[0]-2),u.pick(-1,y[1]-1,0).lo(1).hi(y[0]-2)),p(u.pick(-1,y[1]-1,1).lo(1).hi(y[0]-2))),u.set(0,0,0,0),u.set(0,0,1,0),u.set(y[0]-1,0,0,0),u.set(y[0]-1,0,1,0),u.set(0,y[1]-1,0,0),u.set(0,y[1]-1,1,0),u.set(y[0]-1,y[1]-1,0,0),u.set(y[0]-1,y[1]-1,1,0),u}}function A(E){var p=E.join(),y=m[p];if(y)return y;for(var b=E.length,d=[T,l],u=1;u<=b;++u)d.push(x(u));var g=w,y=g.apply(void 0,d);return m[p]=y,y}e.exports=function(p,b,d){if(Array.isArray(d)||(typeof d=="string"?d=o(b.dimension,d):d=o(b.dimension,"clamp")),b.size===0)return p;if(b.dimension===0)return p.set(0),p;var u=A(d);return u(p,b)}},4317:function(e){"use strict";function t(n,s){var h=Math.floor(s),f=s-h,m=0<=h&&h0;){O<64?(p=O,O=0):(p=64,O-=64);for(var L=m[1]|0;L>0;){L<64?(b=L,L=0):(b=64,L-=64),l=F+O*u+L*g,A=N+O*D+L*P;var U=0,B=0,W=0,$=y,ue=u-d*y,ce=g-p*u,de=z,Y=D-d*z,X=P-p*D;for(W=0;W0;){P<64?(p=P,P=0):(p=64,P-=64);for(var z=m[0]|0;z>0;){z<64?(E=z,z=0):(E=64,z-=64),l=y+P*d+z*b,A=D+P*g+z*u;var F=0,N=0,O=d,L=b-p*d,U=g,B=u-p*g;for(N=0;N0;){N<64?(b=N,N=0):(b=64,N-=64);for(var O=m[0]|0;O>0;){O<64?(E=O,O=0):(E=64,O-=64);for(var L=m[1]|0;L>0;){L<64?(p=L,L=0):(p=64,L-=64),l=z+N*g+O*d+L*u,A=F+N*P+O*y+L*D;var U=0,B=0,W=0,$=g,ue=d-b*g,ce=u-E*d,de=P,Y=y-b*P,X=D-E*y;for(W=0;Wx;){U=0,B=F-p;t:for(O=0;O$)break t;B+=y,U+=D}for(U=F,B=F-p,O=0;O>1,L=O-z,U=O+z,B=F,W=L,$=O,ue=U,ce=N,de=w+1,Y=A-1,X=!0,Q,V,le,ae,j,ee,te,pe,we,Se=0,Re=0,Pe=0,je,at,nt,tt,Ve,he,se,ne,Ce,Ze,rt,Je,St,kt,Bt,Vt,Ar=g,vr=T(Ar),qr=T(Ar);at=b*B,nt=b*W,Vt=p;e:for(je=0;je0){V=B,B=W,W=V;break e}if(Pe<0)break e;Vt+=D}at=b*ue,nt=b*ce,Vt=p;e:for(je=0;je0){V=ue,ue=ce,ce=V;break e}if(Pe<0)break e;Vt+=D}at=b*B,nt=b*$,Vt=p;e:for(je=0;je0){V=B,B=$,$=V;break e}if(Pe<0)break e;Vt+=D}at=b*W,nt=b*$,Vt=p;e:for(je=0;je0){V=W,W=$,$=V;break e}if(Pe<0)break e;Vt+=D}at=b*B,nt=b*ue,Vt=p;e:for(je=0;je0){V=B,B=ue,ue=V;break e}if(Pe<0)break e;Vt+=D}at=b*$,nt=b*ue,Vt=p;e:for(je=0;je0){V=$,$=ue,ue=V;break e}if(Pe<0)break e;Vt+=D}at=b*W,nt=b*ce,Vt=p;e:for(je=0;je0){V=W,W=ce,ce=V;break e}if(Pe<0)break e;Vt+=D}at=b*W,nt=b*$,Vt=p;e:for(je=0;je0){V=W,W=$,$=V;break e}if(Pe<0)break e;Vt+=D}at=b*ue,nt=b*ce,Vt=p;e:for(je=0;je0){V=ue,ue=ce,ce=V;break e}if(Pe<0)break e;Vt+=D}for(at=b*B,nt=b*W,tt=b*$,Ve=b*ue,he=b*ce,se=b*F,ne=b*O,Ce=b*N,Bt=0,Vt=p,je=0;je0)Y--;else if(Pe<0){for(at=b*ee,nt=b*de,tt=b*Y,Vt=p,je=0;je0)for(;;){te=p+Y*b,Bt=0;e:for(je=0;je0){if(--YN){e:for(;;){for(te=p+de*b,Bt=0,Vt=p,je=0;je1&&x?A(l,x[0],x[1]):A(l)}var f={"uint32,1,0":function(c,T){return function(l){var x=l.data,w=l.offset|0,A=l.shape,E=l.stride,p=E[0]|0,b=A[0]|0,d=E[1]|0,u=A[1]|0,g=d,y=d,D=1;b<=32?c(0,b-1,x,w,p,d,b,u,g,y,D):T(0,b-1,x,w,p,d,b,u,g,y,D)}}};function m(c,T){var l=[T,c].join(","),x=f[l],w=n(c,T),A=h(c,T,w);return x(w,A)}e.exports=m},446:function(e,t,r){"use strict";var o=r(7640),a={};function i(n){var s=n.order,h=n.dtype,f=[s,h],m=f.join(":"),c=a[m];return c||(a[m]=c=o(s,h)),c(n),n}e.exports=i},9618:function(e,t,r){var o=r(7163),a=typeof Float64Array<"u";function i(T,l){return T[0]-l[0]}function n(){var T=this.stride,l=new Array(T.length),x;for(x=0;x=0&&(d=p|0,b+=g*d,u-=d),new w(this.data,u,g,b)},A.step=function(p){var b=this.shape[0],d=this.stride[0],u=this.offset,g=0,y=Math.ceil;return typeof p=="number"&&(g=p|0,g<0?(u+=d*(b-1),b=y(-b/g)):b=y(b/g),d*=g),new w(this.data,b,d,u)},A.transpose=function(p){p=p===void 0?0:p|0;var b=this.shape,d=this.stride;return new w(this.data,b[p],d[p],this.offset)},A.pick=function(p){var b=[],d=[],u=this.offset;typeof p=="number"&&p>=0?u=u+this.stride[0]*p|0:(b.push(this.shape[0]),d.push(this.stride[0]));var g=l[b.length+1];return g(this.data,b,d,u)},function(p,b,d,u){return new w(p,b[0],d[0],u)}},2:function(T,l,x){function w(E,p,b,d,u,g){this.data=E,this.shape=[p,b],this.stride=[d,u],this.offset=g|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(p,b,d){return T==="generic"?this.data.set(this.offset+this.stride[0]*p+this.stride[1]*b,d):this.data[this.offset+this.stride[0]*p+this.stride[1]*b]=d},A.get=function(p,b){return T==="generic"?this.data.get(this.offset+this.stride[0]*p+this.stride[1]*b):this.data[this.offset+this.stride[0]*p+this.stride[1]*b]},A.index=function(p,b){return this.offset+this.stride[0]*p+this.stride[1]*b},A.hi=function(p,b){return new w(this.data,typeof p!="number"||p<0?this.shape[0]:p|0,typeof b!="number"||b<0?this.shape[1]:b|0,this.stride[0],this.stride[1],this.offset)},A.lo=function(p,b){var d=this.offset,u=0,g=this.shape[0],y=this.shape[1],D=this.stride[0],P=this.stride[1];return typeof p=="number"&&p>=0&&(u=p|0,d+=D*u,g-=u),typeof b=="number"&&b>=0&&(u=b|0,d+=P*u,y-=u),new w(this.data,g,y,D,P,d)},A.step=function(p,b){var d=this.shape[0],u=this.shape[1],g=this.stride[0],y=this.stride[1],D=this.offset,P=0,z=Math.ceil;return typeof p=="number"&&(P=p|0,P<0?(D+=g*(d-1),d=z(-d/P)):d=z(d/P),g*=P),typeof b=="number"&&(P=b|0,P<0?(D+=y*(u-1),u=z(-u/P)):u=z(u/P),y*=P),new w(this.data,d,u,g,y,D)},A.transpose=function(p,b){p=p===void 0?0:p|0,b=b===void 0?1:b|0;var d=this.shape,u=this.stride;return new w(this.data,d[p],d[b],u[p],u[b],this.offset)},A.pick=function(p,b){var d=[],u=[],g=this.offset;typeof p=="number"&&p>=0?g=g+this.stride[0]*p|0:(d.push(this.shape[0]),u.push(this.stride[0])),typeof b=="number"&&b>=0?g=g+this.stride[1]*b|0:(d.push(this.shape[1]),u.push(this.stride[1]));var y=l[d.length+1];return y(this.data,d,u,g)},function(p,b,d,u){return new w(p,b[0],b[1],d[0],d[1],u)}},3:function(T,l,x){function w(E,p,b,d,u,g,y,D){this.data=E,this.shape=[p,b,d],this.stride=[u,g,y],this.offset=D|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 p=Math.abs(this.stride[0]),b=Math.abs(this.stride[1]),d=Math.abs(this.stride[2]);return p>b?b>d?[2,1,0]:p>d?[1,2,0]:[1,0,2]:p>d?[2,0,1]:d>b?[0,1,2]:[0,2,1]}}),A.set=function(p,b,d,u){return T==="generic"?this.data.set(this.offset+this.stride[0]*p+this.stride[1]*b+this.stride[2]*d,u):this.data[this.offset+this.stride[0]*p+this.stride[1]*b+this.stride[2]*d]=u},A.get=function(p,b,d){return T==="generic"?this.data.get(this.offset+this.stride[0]*p+this.stride[1]*b+this.stride[2]*d):this.data[this.offset+this.stride[0]*p+this.stride[1]*b+this.stride[2]*d]},A.index=function(p,b,d){return this.offset+this.stride[0]*p+this.stride[1]*b+this.stride[2]*d},A.hi=function(p,b,d){return new w(this.data,typeof p!="number"||p<0?this.shape[0]:p|0,typeof b!="number"||b<0?this.shape[1]:b|0,typeof d!="number"||d<0?this.shape[2]:d|0,this.stride[0],this.stride[1],this.stride[2],this.offset)},A.lo=function(p,b,d){var u=this.offset,g=0,y=this.shape[0],D=this.shape[1],P=this.shape[2],z=this.stride[0],F=this.stride[1],N=this.stride[2];return typeof p=="number"&&p>=0&&(g=p|0,u+=z*g,y-=g),typeof b=="number"&&b>=0&&(g=b|0,u+=F*g,D-=g),typeof d=="number"&&d>=0&&(g=d|0,u+=N*g,P-=g),new w(this.data,y,D,P,z,F,N,u)},A.step=function(p,b,d){var u=this.shape[0],g=this.shape[1],y=this.shape[2],D=this.stride[0],P=this.stride[1],z=this.stride[2],F=this.offset,N=0,O=Math.ceil;return typeof p=="number"&&(N=p|0,N<0?(F+=D*(u-1),u=O(-u/N)):u=O(u/N),D*=N),typeof b=="number"&&(N=b|0,N<0?(F+=P*(g-1),g=O(-g/N)):g=O(g/N),P*=N),typeof d=="number"&&(N=d|0,N<0?(F+=z*(y-1),y=O(-y/N)):y=O(y/N),z*=N),new w(this.data,u,g,y,D,P,z,F)},A.transpose=function(p,b,d){p=p===void 0?0:p|0,b=b===void 0?1:b|0,d=d===void 0?2:d|0;var u=this.shape,g=this.stride;return new w(this.data,u[p],u[b],u[d],g[p],g[b],g[d],this.offset)},A.pick=function(p,b,d){var u=[],g=[],y=this.offset;typeof p=="number"&&p>=0?y=y+this.stride[0]*p|0:(u.push(this.shape[0]),g.push(this.stride[0])),typeof b=="number"&&b>=0?y=y+this.stride[1]*b|0:(u.push(this.shape[1]),g.push(this.stride[1])),typeof d=="number"&&d>=0?y=y+this.stride[2]*d|0:(u.push(this.shape[2]),g.push(this.stride[2]));var D=l[u.length+1];return D(this.data,u,g,y)},function(p,b,d,u){return new w(p,b[0],b[1],b[2],d[0],d[1],d[2],u)}},4:function(T,l,x){function w(E,p,b,d,u,g,y,D,P,z){this.data=E,this.shape=[p,b,d,u],this.stride=[g,y,D,P],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:x}),A.set=function(p,b,d,u,g){return T==="generic"?this.data.set(this.offset+this.stride[0]*p+this.stride[1]*b+this.stride[2]*d+this.stride[3]*u,g):this.data[this.offset+this.stride[0]*p+this.stride[1]*b+this.stride[2]*d+this.stride[3]*u]=g},A.get=function(p,b,d,u){return T==="generic"?this.data.get(this.offset+this.stride[0]*p+this.stride[1]*b+this.stride[2]*d+this.stride[3]*u):this.data[this.offset+this.stride[0]*p+this.stride[1]*b+this.stride[2]*d+this.stride[3]*u]},A.index=function(p,b,d,u){return this.offset+this.stride[0]*p+this.stride[1]*b+this.stride[2]*d+this.stride[3]*u},A.hi=function(p,b,d,u){return new w(this.data,typeof p!="number"||p<0?this.shape[0]:p|0,typeof b!="number"||b<0?this.shape[1]:b|0,typeof d!="number"||d<0?this.shape[2]:d|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(p,b,d,u){var g=this.offset,y=0,D=this.shape[0],P=this.shape[1],z=this.shape[2],F=this.shape[3],N=this.stride[0],O=this.stride[1],L=this.stride[2],U=this.stride[3];return typeof p=="number"&&p>=0&&(y=p|0,g+=N*y,D-=y),typeof b=="number"&&b>=0&&(y=b|0,g+=O*y,P-=y),typeof d=="number"&&d>=0&&(y=d|0,g+=L*y,z-=y),typeof u=="number"&&u>=0&&(y=u|0,g+=U*y,F-=y),new w(this.data,D,P,z,F,N,O,L,U,g)},A.step=function(p,b,d,u){var g=this.shape[0],y=this.shape[1],D=this.shape[2],P=this.shape[3],z=this.stride[0],F=this.stride[1],N=this.stride[2],O=this.stride[3],L=this.offset,U=0,B=Math.ceil;return typeof p=="number"&&(U=p|0,U<0?(L+=z*(g-1),g=B(-g/U)):g=B(g/U),z*=U),typeof b=="number"&&(U=b|0,U<0?(L+=F*(y-1),y=B(-y/U)):y=B(y/U),F*=U),typeof d=="number"&&(U=d|0,U<0?(L+=N*(D-1),D=B(-D/U)):D=B(D/U),N*=U),typeof u=="number"&&(U=u|0,U<0?(L+=O*(P-1),P=B(-P/U)):P=B(P/U),O*=U),new w(this.data,g,y,D,P,z,F,N,O,L)},A.transpose=function(p,b,d,u){p=p===void 0?0:p|0,b=b===void 0?1:b|0,d=d===void 0?2:d|0,u=u===void 0?3:u|0;var g=this.shape,y=this.stride;return new w(this.data,g[p],g[b],g[d],g[u],y[p],y[b],y[d],y[u],this.offset)},A.pick=function(p,b,d,u){var g=[],y=[],D=this.offset;typeof p=="number"&&p>=0?D=D+this.stride[0]*p|0:(g.push(this.shape[0]),y.push(this.stride[0])),typeof b=="number"&&b>=0?D=D+this.stride[1]*b|0:(g.push(this.shape[1]),y.push(this.stride[1])),typeof d=="number"&&d>=0?D=D+this.stride[2]*d|0:(g.push(this.shape[2]),y.push(this.stride[2])),typeof u=="number"&&u>=0?D=D+this.stride[3]*u|0:(g.push(this.shape[3]),y.push(this.stride[3]));var P=l[g.length+1];return P(this.data,g,y,D)},function(p,b,d,u){return new w(p,b[0],b[1],b[2],b[3],d[0],d[1],d[2],d[3],u)}},5:function(l,x,w){function A(p,b,d,u,g,y,D,P,z,F,N,O){this.data=p,this.shape=[b,d,u,g,y],this.stride=[D,P,z,F,N],this.offset=O|0}var E=A.prototype;return E.dtype=l,E.dimension=5,Object.defineProperty(E,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]*this.shape[4]}}),Object.defineProperty(E,"order",{get:w}),E.set=function(b,d,u,g,y,D){return l==="generic"?this.data.set(this.offset+this.stride[0]*b+this.stride[1]*d+this.stride[2]*u+this.stride[3]*g+this.stride[4]*y,D):this.data[this.offset+this.stride[0]*b+this.stride[1]*d+this.stride[2]*u+this.stride[3]*g+this.stride[4]*y]=D},E.get=function(b,d,u,g,y){return l==="generic"?this.data.get(this.offset+this.stride[0]*b+this.stride[1]*d+this.stride[2]*u+this.stride[3]*g+this.stride[4]*y):this.data[this.offset+this.stride[0]*b+this.stride[1]*d+this.stride[2]*u+this.stride[3]*g+this.stride[4]*y]},E.index=function(b,d,u,g,y){return this.offset+this.stride[0]*b+this.stride[1]*d+this.stride[2]*u+this.stride[3]*g+this.stride[4]*y},E.hi=function(b,d,u,g,y){return new A(this.data,typeof b!="number"||b<0?this.shape[0]:b|0,typeof d!="number"||d<0?this.shape[1]:d|0,typeof u!="number"||u<0?this.shape[2]:u|0,typeof g!="number"||g<0?this.shape[3]:g|0,typeof y!="number"||y<0?this.shape[4]:y|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},E.lo=function(b,d,u,g,y){var D=this.offset,P=0,z=this.shape[0],F=this.shape[1],N=this.shape[2],O=this.shape[3],L=this.shape[4],U=this.stride[0],B=this.stride[1],W=this.stride[2],$=this.stride[3],ue=this.stride[4];return typeof b=="number"&&b>=0&&(P=b|0,D+=U*P,z-=P),typeof d=="number"&&d>=0&&(P=d|0,D+=B*P,F-=P),typeof u=="number"&&u>=0&&(P=u|0,D+=W*P,N-=P),typeof g=="number"&&g>=0&&(P=g|0,D+=$*P,O-=P),typeof y=="number"&&y>=0&&(P=y|0,D+=ue*P,L-=P),new A(this.data,z,F,N,O,L,U,B,W,$,ue,D)},E.step=function(b,d,u,g,y){var D=this.shape[0],P=this.shape[1],z=this.shape[2],F=this.shape[3],N=this.shape[4],O=this.stride[0],L=this.stride[1],U=this.stride[2],B=this.stride[3],W=this.stride[4],$=this.offset,ue=0,ce=Math.ceil;return typeof b=="number"&&(ue=b|0,ue<0?($+=O*(D-1),D=ce(-D/ue)):D=ce(D/ue),O*=ue),typeof d=="number"&&(ue=d|0,ue<0?($+=L*(P-1),P=ce(-P/ue)):P=ce(P/ue),L*=ue),typeof u=="number"&&(ue=u|0,ue<0?($+=U*(z-1),z=ce(-z/ue)):z=ce(z/ue),U*=ue),typeof g=="number"&&(ue=g|0,ue<0?($+=B*(F-1),F=ce(-F/ue)):F=ce(F/ue),B*=ue),typeof y=="number"&&(ue=y|0,ue<0?($+=W*(N-1),N=ce(-N/ue)):N=ce(N/ue),W*=ue),new A(this.data,D,P,z,F,N,O,L,U,B,W,$)},E.transpose=function(b,d,u,g,y){b=b===void 0?0:b|0,d=d===void 0?1:d|0,u=u===void 0?2:u|0,g=g===void 0?3:g|0,y=y===void 0?4:y|0;var D=this.shape,P=this.stride;return new A(this.data,D[b],D[d],D[u],D[g],D[y],P[b],P[d],P[u],P[g],P[y],this.offset)},E.pick=function(b,d,u,g,y){var D=[],P=[],z=this.offset;typeof b=="number"&&b>=0?z=z+this.stride[0]*b|0:(D.push(this.shape[0]),P.push(this.stride[0])),typeof d=="number"&&d>=0?z=z+this.stride[1]*d|0:(D.push(this.shape[1]),P.push(this.stride[1])),typeof u=="number"&&u>=0?z=z+this.stride[2]*u|0:(D.push(this.shape[2]),P.push(this.stride[2])),typeof g=="number"&&g>=0?z=z+this.stride[3]*g|0:(D.push(this.shape[3]),P.push(this.stride[3])),typeof y=="number"&&y>=0?z=z+this.stride[4]*y|0:(D.push(this.shape[4]),P.push(this.stride[4]));var F=x[D.length+1];return F(this.data,D,P,z)},function(b,d,u,g){return new A(b,d[0],d[1],d[2],d[3],d[4],u[0],u[1],u[2],u[3],u[4],g)}}};function h(T,l){var x=l===-1?"T":String(l),w=s[x];return l===-1?w(T):l===0?w(T,m[T][0]):w(T,m[T],n)}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 m={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};function c(T,l,x,w){if(T===void 0){var u=m.array[0];return u([])}else typeof T=="number"&&(T=[T]);l===void 0&&(l=[T.length]);var A=l.length;if(x===void 0){x=new Array(A);for(var E=A-1,p=1;E>=0;--E)x[E]=p,p*=l[E]}if(w===void 0){w=0;for(var E=0;E>>0;e.exports=n;function n(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),m=o.lo(s);return h>s==s>0?m===i?(f+=1,m=0):m+=1:m===0?(m=i,f-=1):m-=1,o.pack(m,f)}},8406:function(e,t){var r=1e-6,o=1e-6;t.vertexNormals=function(a,i,n){for(var s=i.length,h=new Array(s),f=n===void 0?r:n,m=0;mf)for(var D=h[l],P=1/Math.sqrt(d*g),y=0;y<3;++y){var z=(y+1)%3,F=(y+2)%3;D[y]+=P*(u[z]*b[F]-u[F]*b[z])}}for(var m=0;mf)for(var P=1/Math.sqrt(N),y=0;y<3;++y)D[y]*=P;else for(var y=0;y<3;++y)D[y]=0}return h},t.faceNormals=function(a,i,n){for(var s=a.length,h=new Array(s),f=n===void 0?o:n,m=0;mf?E=1/Math.sqrt(E):E=0;for(var l=0;l<3;++l)A[l]*=E;h[m]=A}return h}},4081:function(e){"use strict";e.exports=t;function t(r,o,a,i,n,s,h,f,m,c){var T=o+s+c;if(l>0){var l=Math.sqrt(T+1);r[0]=.5*(h-m)/l,r[1]=.5*(f-i)/l,r[2]=.5*(a-s)/l,r[3]=.5*l}else{var x=Math.max(o,s,c),l=Math.sqrt(2*x-T+1);o>=x?(r[0]=.5*l,r[1]=.5*(n+a)/l,r[2]=.5*(f+i)/l,r[3]=.5*(h-m)/l):s>=x?(r[0]=.5*(a+n)/l,r[1]=.5*l,r[2]=.5*(m+h)/l,r[3]=.5*(f-i)/l):(r[0]=.5*(i+f)/l,r[1]=.5*(h+m)/l,r[2]=.5*l,r[3]=.5*(a-n)/l)}return r}},9977:function(e,t,r){"use strict";e.exports=l;var o=r(9215),a=r(6582),i=r(7399),n=r(7608),s=r(4081);function h(x,w,A){return Math.sqrt(Math.pow(x,2)+Math.pow(w,2)+Math.pow(A,2))}function f(x,w,A,E){return Math.sqrt(Math.pow(x,2)+Math.pow(w,2)+Math.pow(A,2)+Math.pow(E,2))}function m(x,w){var A=w[0],E=w[1],p=w[2],b=w[3],d=f(A,E,p,b);d>1e-6?(x[0]=A/d,x[1]=E/d,x[2]=p/d,x[3]=b/d):(x[0]=x[1]=x[2]=0,x[3]=1)}function c(x,w,A){this.radius=o([A]),this.center=o(w),this.rotation=o(x),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(x){this.radius.curve(x),this.center.curve(x),this.rotation.curve(x);var w=this.computedRotation;m(w,w);var A=this.computedMatrix;i(A,w);var E=this.computedCenter,p=this.computedEye,b=this.computedUp,d=Math.exp(this.computedRadius[0]);p[0]=E[0]+d*A[2],p[1]=E[1]+d*A[6],p[2]=E[2]+d*A[10],b[0]=A[1],b[1]=A[5],b[2]=A[9];for(var u=0;u<3;++u){for(var g=0,y=0;y<3;++y)g+=A[u+4*y]*p[y];A[12+u]=-g}},T.getMatrix=function(x,w){this.recalcMatrix(x);var A=this.computedMatrix;if(w){for(var E=0;E<16;++E)w[E]=A[E];return w}return A},T.idle=function(x){this.center.idle(x),this.radius.idle(x),this.rotation.idle(x)},T.flush=function(x){this.center.flush(x),this.radius.flush(x),this.rotation.flush(x)},T.pan=function(x,w,A,E){w=w||0,A=A||0,E=E||0,this.recalcMatrix(x);var p=this.computedMatrix,b=p[1],d=p[5],u=p[9],g=h(b,d,u);b/=g,d/=g,u/=g;var y=p[0],D=p[4],P=p[8],z=y*b+D*d+P*u;y-=b*z,D-=d*z,P-=u*z;var F=h(y,D,P);y/=F,D/=F,P/=F;var N=p[2],O=p[6],L=p[10],U=N*b+O*d+L*u,B=N*y+O*D+L*P;N-=U*b+B*y,O-=U*d+B*D,L-=U*u+B*P;var W=h(N,O,L);N/=W,O/=W,L/=W;var $=y*w+b*A,ue=D*w+d*A,ce=P*w+u*A;this.center.move(x,$,ue,ce);var de=Math.exp(this.computedRadius[0]);de=Math.max(1e-4,de+E),this.radius.set(x,Math.log(de))},T.rotate=function(x,w,A,E){this.recalcMatrix(x),w=w||0,A=A||0;var p=this.computedMatrix,b=p[0],d=p[4],u=p[8],g=p[1],y=p[5],D=p[9],P=p[2],z=p[6],F=p[10],N=w*b+A*g,O=w*d+A*y,L=w*u+A*D,U=-(z*L-F*O),B=-(F*N-P*L),W=-(P*O-z*N),$=Math.sqrt(Math.max(0,1-Math.pow(U,2)-Math.pow(B,2)-Math.pow(W,2))),ue=f(U,B,W,$);ue>1e-6?(U/=ue,B/=ue,W/=ue,$/=ue):(U=B=W=0,$=1);var ce=this.computedRotation,de=ce[0],Y=ce[1],X=ce[2],Q=ce[3],V=de*$+Q*U+Y*W-X*B,le=Y*$+Q*B+X*U-de*W,ae=X*$+Q*W+de*B-Y*U,j=Q*$-de*U-Y*B-X*W;if(E){U=P,B=z,W=F;var ee=Math.sin(E)/h(U,B,W);U*=ee,B*=ee,W*=ee,$=Math.cos(w),V=V*$+j*U+le*W-ae*B,le=le*$+j*B+ae*U-V*W,ae=ae*$+j*W+V*B-le*U,j=j*$-V*U-le*B-ae*W}var te=f(V,le,ae,j);te>1e-6?(V/=te,le/=te,ae/=te,j/=te):(V=le=ae=0,j=1),this.rotation.set(x,V,le,ae,j)},T.lookAt=function(x,w,A,E){this.recalcMatrix(x),A=A||this.computedCenter,w=w||this.computedEye,E=E||this.computedUp;var p=this.computedMatrix;a(p,w,A,E);var b=this.computedRotation;s(b,p[0],p[1],p[2],p[4],p[5],p[6],p[8],p[9],p[10]),m(b,b),this.rotation.set(x,b[0],b[1],b[2],b[3]);for(var d=0,u=0;u<3;++u)d+=Math.pow(A[u]-w[u],2);this.radius.set(x,.5*Math.log(Math.max(d,1e-6))),this.center.set(x,A[0],A[1],A[2])},T.translate=function(x,w,A,E){this.center.move(x,w||0,A||0,E||0)},T.setMatrix=function(x,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]),m(A,A),this.rotation.set(x,A[0],A[1],A[2],A[3]);var E=this.computedMatrix;n(E,w);var p=E[15];if(Math.abs(p)>1e-6){var b=E[12]/p,d=E[13]/p,u=E[14]/p;this.recalcMatrix(x);var g=Math.exp(this.computedRadius[0]);this.center.set(x,b-E[2]*g,d-E[6]*g,u-E[10]*g),this.radius.idle(x)}else this.center.idle(x),this.radius.idle(x)},T.setDistance=function(x,w){w>0&&this.radius.set(x,Math.log(w))},T.setDistanceLimits=function(x,w){x>0?x=Math.log(x):x=-1/0,w>0?w=Math.log(w):w=1/0,w=Math.max(w,x),this.radius.bounds[0][0]=x,this.radius.bounds[1][0]=w},T.getDistanceLimits=function(x){var w=this.radius.bounds;return x?(x[0]=Math.exp(w[0][0]),x[1]=Math.exp(w[1][0]),x):[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(x){var w=this.lastT(),A=x.center;A&&this.center.set(w,A[0],A[1],A[2]);var E=x.rotation;E&&this.rotation.set(w,E[0],E[1],E[2],E[3]);var p=x.distance;p&&p>0&&this.radius.set(w,Math.log(p)),this.setDistanceLimits(x.zoomMin,x.zoomMax)};function l(x){x=x||{};var w=x.center||[0,0,0],A=x.rotation||[0,0,0,1],E=x.radius||1;w=[].slice.call(w,0,3),A=[].slice.call(A,0,4),m(A,A);var p=new c(A,w,Math.log(E));return p.setDistanceLimits(x.zoomMin,x.zoomMax),("eye"in x||"up"in x)&&p.lookAt(0,x.eye,x.center,x.up),p}},1371:function(e,t,r){"use strict";var o=r(3233);e.exports=function(i,n,s){return s=typeof s<"u"?s+"":" ",o(s,n)+i}},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(i,n){for(var s=n.length|0,h=i.length,f=[new Array(s),new Array(s)],m=0;m0){D=f[F][g][0],z=F;break}P=D[z^1];for(var N=0;N<2;++N)for(var O=f[N][g],L=0;L0&&(D=U,P=B,z=N)}return y||D&&l(D,z),P}function w(u,g){var y=f[g][u][0],D=[u];l(y,g);for(var P=y[g^1],z=g;;){for(;P!==u;)D.push(P),P=x(D[D.length-2],P,!1);if(f[0][u].length+f[1][u].length===0)break;var F=D[D.length-1],N=u,O=D[1],L=x(F,N,!0);if(o(n[F],n[N],n[O],n[L])<0)break;D.push(u),P=x(F,N)}return D}function A(u,g){return g[1]===g[g.length-1]}for(var m=0;m0;){var b=f[0][m].length,d=w(m,E);A(p,d)?p.push.apply(p,d):(p.length>0&&T.push(p),p=d)}p.length>0&&T.push(p)}return T}},5609:function(e,t,r){"use strict";e.exports=a;var o=r(3134);function a(i,n){for(var s=o(i,n.length),h=new Array(n.length),f=new Array(n.length),m=[],c=0;c0;){var l=m.pop();h[l]=!1;for(var x=s[l],c=0;c0}b=b.filter(d);for(var u=b.length,g=new Array(u),y=new Array(u),p=0;p0;){var te=ae.pop(),pe=ue[te];h(pe,function(je,at){return je-at});var we=pe.length,Se=j[te],Re;if(Se===0){var O=b[te];Re=[O]}for(var p=0;p=0)&&(j[Pe]=Se^1,ae.push(Pe),Se===0)){var O=b[Pe];le(O)||(O.reverse(),Re.push(O))}}Se===0&&ee.push(Re)}return ee}},5085:function(e,t,r){e.exports=x;var o=r(3250)[3],a=r(4209),i=r(3352),n=r(2478);function s(){return!0}function h(w){return function(A,E){var p=w[A];return p?!!p.queryPoint(E,s):!1}}function f(w){for(var A={},E=0;E0&&A[p]===E[0])b=w[p-1];else return 1;for(var d=1;b;){var u=b.key,g=o(E,u[0],u[1]);if(u[0][0]0)d=-1,b=b.right;else return 0;else if(g>0)b=b.left;else if(g<0)d=1,b=b.right;else return 0}return d}}function c(w){return 1}function T(w){return function(E){return w(E[0],E[1])?0:1}}function l(w,A){return function(p){return w(p[0],p[1])?0:A(p)}}function x(w){for(var A=w.length,E=[],p=[],b=0,d=0;d=c?(u=1,y=c+2*x+A):(u=-x/c,y=x*u+A)):(u=0,w>=0?(g=0,y=A):-w>=l?(g=1,y=l+2*w+A):(g=-w/l,y=w*g+A));else if(g<0)g=0,x>=0?(u=0,y=A):-x>=c?(u=1,y=c+2*x+A):(u=-x/c,y=x*u+A);else{var D=1/d;u*=D,g*=D,y=u*(c*u+T*g+2*x)+g*(T*u+l*g+2*w)+A}else{var P,z,F,N;u<0?(P=T+x,z=l+w,z>P?(F=z-P,N=c-2*T+l,F>=N?(u=1,g=0,y=c+2*x+A):(u=F/N,g=1-u,y=u*(c*u+T*g+2*x)+g*(T*u+l*g+2*w)+A)):(u=0,z<=0?(g=1,y=l+2*w+A):w>=0?(g=0,y=A):(g=-w/l,y=w*g+A))):g<0?(P=T+w,z=c+x,z>P?(F=z-P,N=c-2*T+l,F>=N?(g=1,u=0,y=l+2*w+A):(g=F/N,u=1-g,y=u*(c*u+T*g+2*x)+g*(T*u+l*g+2*w)+A)):(g=0,z<=0?(u=1,y=c+2*x+A):x>=0?(u=0,y=A):(u=-x/c,y=x*u+A))):(F=l+w-T-x,F<=0?(u=0,g=1,y=l+2*w+A):(N=c-2*T+l,F>=N?(u=1,g=0,y=c+2*x+A):(u=F/N,g=1-u,y=u*(c*u+T*g+2*x)+g*(T*u+l*g+2*w)+A)))}for(var O=1-u-g,m=0;m0){var l=s[f-1];if(o(c,l)===0&&i(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,i){if(typeof a!="string")throw new TypeError("expected a string");if(i===1)return a;if(i===2)return a+a;var n=a.length*i;if(r!==a||typeof r>"u")r=a,t="";else if(t.length>=n)return t.substr(0,n);for(;n>t.length&&i>1;)i&1&&(t+=a),i>>=1,a+=a;return t+=a,t=t.substr(0,n),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],i=o,n=o-2;n>=0;--n){var s=a,h=r[n];a=s+h;var f=a-s,m=h-f;m&&(r[--i]=a,a=m)}for(var c=0,n=i;n0){if(z<=0)return F;N=P+z}else if(P<0){if(z>=0)return F;N=-(P+z)}else return F;var O=f*N;return F>=O||F<=-O?F:w(g,y,D)},function(g,y,D,P){var z=g[0]-P[0],F=y[0]-P[0],N=D[0]-P[0],O=g[1]-P[1],L=y[1]-P[1],U=D[1]-P[1],B=g[2]-P[2],W=y[2]-P[2],$=D[2]-P[2],ue=F*U,ce=N*L,de=N*O,Y=z*U,X=z*L,Q=F*O,V=B*(ue-ce)+W*(de-Y)+$*(X-Q),le=(Math.abs(ue)+Math.abs(ce))*Math.abs(B)+(Math.abs(de)+Math.abs(Y))*Math.abs(W)+(Math.abs(X)+Math.abs(Q))*Math.abs($),ae=m*le;return V>ae||-V>ae?V:A(g,y,D,P)}];function p(u){var g=E[u.length];return g||(g=E[u.length]=x(u.length)),g.apply(void 0,u)}function b(u,g,y,D,P,z,F){return function(O,L,U,B,W){switch(arguments.length){case 0:case 1:return 0;case 2:return D(O,L);case 3:return P(O,L,U);case 4:return z(O,L,U,B);case 5:return F(O,L,U,B,W)}for(var $=new Array(arguments.length),ue=0;ue0&&c>0||m<0&&c<0)return!1;var T=o(h,n,s),l=o(f,n,s);return T>0&&l>0||T<0&&l<0?!1:m===0&&c===0&&T===0&&l===0?a(n,s,h,f):!0}},8545:function(e){"use strict";e.exports=r;function t(o,a){var i=o+a,n=i-o,s=i-n,h=a-n,f=o-s,m=f+h;return m?[m,i]:[i]}function r(o,a){var i=o.length|0,n=a.length|0;if(i===1&&n===1)return t(o[0],-a[0]);var s=i+n,h=new Array(s),f=0,m=0,c=0,T=Math.abs,l=o[m],x=T(l),w=-a[c],A=T(w),E,p;x=n?(E=l,m+=1,m=n?(E=l,m+=1,m"u"&&(E=s(x));var p=x.length;if(p===0||E<1)return{cells:[],vertexIds:[],vertexWeights:[]};var b=h(w,+A),d=f(x,E),u=m(d,w,b,+A),g=c(d,w.length|0),y=n(E)(x,d.data,g,b),D=T(d),P=[].slice.call(u.data,0,u.shape[0]);return a.free(b),a.free(d.data),a.free(u.data),a.free(g),{cells:y,vertexIds:D,vertexWeights:P}}},1570:function(e){"use strict";e.exports=r;var t=[function(){function a(n,s,h,f){for(var m=Math.min(h,f)|0,c=Math.max(h,f)|0,T=n[2*m],l=n[2*m+1];T>1,w=s[2*x+1];if(w===c)return x;c>1,w=s[2*x+1];if(w===c)return x;c>1,w=s[2*x+1];if(w===c)return x;c>1,w=s[2*x+1];if(w===c)return x;c>1,N=f(g[F],y);N<=0?(N===0&&(z=F),D=F+1):N>0&&(P=F-1)}return z}o=l;function x(g,y){for(var D=new Array(g.length),P=0,z=D.length;P=g.length||f(g[ue],F)!==0););}return D}o=x;function w(g,y){if(!y)return x(T(E(g,0)),g,0);for(var D=new Array(y),P=0;P>>U&1&&L.push(z[U]);y.push(L)}return c(y)}o=A;function E(g,y){if(y<0)return[];for(var D=[],P=(1<0)-(i<0)},t.abs=function(i){var n=i>>r-1;return(i^n)-n},t.min=function(i,n){return n^(i^n)&-(i65535)<<4,i>>>=n,s=(i>255)<<3,i>>>=s,n|=s,s=(i>15)<<2,i>>>=s,n|=s,s=(i>3)<<1,i>>>=s,n|=s,n|i>>1},t.log10=function(i){return i>=1e9?9:i>=1e8?8:i>=1e7?7:i>=1e6?6:i>=1e5?5:i>=1e4?4:i>=1e3?3:i>=100?2:i>=10?1:0},t.popCount=function(i){return i=i-(i>>>1&1431655765),i=(i&858993459)+(i>>>2&858993459),(i+(i>>>4)&252645135)*16843009>>>24};function o(i){var n=32;return i&=-i,i&&n--,i&65535&&(n-=16),i&16711935&&(n-=8),i&252645135&&(n-=4),i&858993459&&(n-=2),i&1431655765&&(n-=1),n}t.countTrailingZeros=o,t.nextPow2=function(i){return i+=i===0,--i,i|=i>>>1,i|=i>>>2,i|=i>>>4,i|=i>>>8,i|=i>>>16,i+1},t.prevPow2=function(i){return i|=i>>>1,i|=i>>>2,i|=i>>>4,i|=i>>>8,i|=i>>>16,i-(i>>>1)},t.parity=function(i){return i^=i>>>16,i^=i>>>8,i^=i>>>4,i&=15,27030>>>i&1};var a=new Array(256);(function(i){for(var n=0;n<256;++n){var s=n,h=n,f=7;for(s>>>=1;s;s>>>=1)h<<=1,h|=s&1,--f;i[n]=h<>>8&255]<<16|a[i>>>16&255]<<8|a[i>>>24&255]},t.interleave2=function(i,n){return i&=65535,i=(i|i<<8)&16711935,i=(i|i<<4)&252645135,i=(i|i<<2)&858993459,i=(i|i<<1)&1431655765,n&=65535,n=(n|n<<8)&16711935,n=(n|n<<4)&252645135,n=(n|n<<2)&858993459,n=(n|n<<1)&1431655765,i|n<<1},t.deinterleave2=function(i,n){return i=i>>>n&1431655765,i=(i|i>>>1)&858993459,i=(i|i>>>2)&252645135,i=(i|i>>>4)&16711935,i=(i|i>>>16)&65535,i<<16>>16},t.interleave3=function(i,n,s){return i&=1023,i=(i|i<<16)&4278190335,i=(i|i<<8)&251719695,i=(i|i<<4)&3272356035,i=(i|i<<2)&1227133513,n&=1023,n=(n|n<<16)&4278190335,n=(n|n<<8)&251719695,n=(n|n<<4)&3272356035,n=(n|n<<2)&1227133513,i|=n<<1,s&=1023,s=(s|s<<16)&4278190335,s=(s|s<<8)&251719695,s=(s|s<<4)&3272356035,s=(s|s<<2)&1227133513,i|s<<2},t.deinterleave3=function(i,n){return i=i>>>n&1227133513,i=(i|i>>>2)&3272356035,i=(i|i>>>4)&251719695,i=(i|i>>>8)&4278190335,i=(i|i>>>16)&1023,i<<22>>22},t.nextCombination=function(i){var n=i|i-1;return n+1|(~n&-~n)-1>>>o(i)+1}},2014:function(e,t,r){"use strict";"use restrict";var o=r(3105),a=r(4623);function i(u){for(var g=0,y=Math.max,D=0,P=u.length;D>1,F=h(u[z],g);F<=0?(F===0&&(P=z),y=z+1):F>0&&(D=z-1)}return P}t.findCell=T;function l(u,g){for(var y=new Array(u.length),D=0,P=y.length;D=u.length||h(u[$],z)!==0););}return y}t.incidence=l;function x(u,g){if(!g)return l(c(A(u,0)),u,0);for(var y=new Array(g),D=0;D>>L&1&&O.push(P[L]);g.push(O)}return m(g)}t.explode=w;function A(u,g){if(g<0)return[];for(var y=[],D=(1<>1:(Y>>1)-1}function D(Y){for(var X=g(Y);;){var Q=X,V=2*Y+1,le=2*(Y+1),ae=Y;if(V0;){var Q=y(Y);if(Q>=0){var V=g(Q);if(X0){var Y=O[0];return u(0,B-1),B-=1,D(0),Y}return-1}function F(Y,X){var Q=O[Y];return x[Q]===X?Y:(x[Q]=-1/0,P(Y),z(),x[Q]=X,B+=1,P(B-1))}function N(Y){if(!w[Y]){w[Y]=!0;var X=T[Y],Q=l[Y];T[Q]>=0&&(T[Q]=X),l[X]>=0&&(l[X]=Q),L[X]>=0&&F(L[X],d(X)),L[Q]>=0&&F(L[Q],d(Q))}}for(var O=[],L=new Array(m),A=0;A>1;A>=0;--A)D(A);for(;;){var W=z();if(W<0||x[W]>f)break;N(W)}for(var $=[],A=0;A=0&&Q>=0&&X!==Q){var V=L[X],le=L[Q];V!==le&&de.push([V,le])}}),a.unique(a.normalize(de)),{positions:$,edges:de}}},1303:function(e,t,r){"use strict";e.exports=i;var o=r(3250);function a(n,s){var h,f;if(s[0][0]s[1][0])h=s[1],f=s[0];else{var m=Math.min(n[0][1],n[1][1]),c=Math.max(n[0][1],n[1][1]),T=Math.min(s[0][1],s[1][1]),l=Math.max(s[0][1],s[1][1]);return cl?m-l:c-l}var x,w;n[0][1]s[1][0])h=s[1],f=s[0];else return a(s,n);var m,c;if(n[0][0]n[1][0])m=n[1],c=n[0];else return-a(n,s);var T=o(h,f,c),l=o(h,f,m);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,m,f),l=o(c,m,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),i=r(3250),n=r(1303);function s(x,w,A){this.slabs=x,this.coordinates=w,this.horizontal=A}var h=s.prototype;function f(x,w){return x.y-w}function m(x,w){for(var A=null;x;){var E=x.key,p,b;E[0][0]0)if(w[0]!==E[1][0])A=x,x=x.right;else{var u=m(x.right,w);if(u)return u;x=x.left}else{if(w[0]!==E[1][0])return x;var u=m(x.right,w);if(u)return u;x=x.left}}return A}h.castUp=function(x){var w=o.le(this.coordinates,x[0]);if(w<0)return-1;var A=this.slabs[w],E=m(this.slabs[w],x),p=-1;if(E&&(p=E.value),this.coordinates[w]===x[0]){var b=null;if(E&&(b=E.key),w>0){var d=m(this.slabs[w-1],x);d&&(b?n(d.key,b)>0&&(b=d.key,p=d.value):(p=d.value,b=d.key))}var u=this.horizontal[w];if(u.length>0){var g=o.ge(u,x[1],f);if(g=u.length)return p;y=u[g]}}if(y.start)if(b){var D=i(b[0],b[1],[x[0],y.y]);b[0][0]>b[1][0]&&(D=-D),D>0&&(p=y.index)}else p=y.index;else y.y!==x[1]&&(p=y.index)}}}return p};function c(x,w,A,E){this.y=x,this.index=w,this.start=A,this.closed=E}function T(x,w,A,E){this.x=x,this.segment=w,this.create=A,this.index=E}function l(x){for(var w=x.length,A=2*w,E=new Array(A),p=0;p1&&(w=1);for(var A=1-w,E=m.length,p=new Array(E),b=0;b0||x>0&&p<0){var b=n(w,p,A,x);T.push(b),l.push(b.slice())}p<0?l.push(A.slice()):p>0?T.push(A.slice()):(T.push(A.slice()),l.push(A.slice())),x=p}return{positive:T,negative:l}}function h(m,c){for(var T=[],l=i(m[m.length-1],c),x=m[m.length-1],w=m[0],A=0;A0||l>0&&E<0)&&T.push(n(x,E,w,l)),E>=0&&T.push(w.slice()),l=E}return T}function f(m,c){for(var T=[],l=i(m[m.length-1],c),x=m[m.length-1],w=m[0],A=0;A0||l>0&&E<0)&&T.push(n(x,E,w,l)),E<=0&&T.push(w.slice()),l=E}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 i(m){return s(f(m),arguments)}function n(m,c){return i.apply(null,[m].concat(c||[]))}function s(m,c){var T=1,l=m.length,x,w="",A,E,p,b,d,u,g,y;for(A=0;A=0),p.type){case"b":x=parseInt(x,10).toString(2);break;case"c":x=String.fromCharCode(parseInt(x,10));break;case"d":case"i":x=parseInt(x,10);break;case"j":x=JSON.stringify(x,null,p.width?parseInt(p.width):0);break;case"e":x=p.precision?parseFloat(x).toExponential(p.precision):parseFloat(x).toExponential();break;case"f":x=p.precision?parseFloat(x).toFixed(p.precision):parseFloat(x);break;case"g":x=p.precision?String(Number(x.toPrecision(p.precision))):parseFloat(x);break;case"o":x=(parseInt(x,10)>>>0).toString(8);break;case"s":x=String(x),x=p.precision?x.substring(0,p.precision):x;break;case"t":x=String(!!x),x=p.precision?x.substring(0,p.precision):x;break;case"T":x=Object.prototype.toString.call(x).slice(8,-1).toLowerCase(),x=p.precision?x.substring(0,p.precision):x;break;case"u":x=parseInt(x,10)>>>0;break;case"v":x=x.valueOf(),x=p.precision?x.substring(0,p.precision):x;break;case"x":x=(parseInt(x,10)>>>0).toString(16);break;case"X":x=(parseInt(x,10)>>>0).toString(16).toUpperCase();break}a.json.test(p.type)?w+=x:(a.number.test(p.type)&&(!g||p.sign)?(y=g?"+":"-",x=x.toString().replace(a.sign,"")):y="",d=p.pad_char?p.pad_char==="0"?"0":p.pad_char.charAt(1):" ",u=p.width-(y+x).length,b=p.width&&u>0?d.repeat(u):"",w+=p.align?y+x+b:d==="0"?y+b+x:b+y+x)}return w}var h=Object.create(null);function f(m){if(h[m])return h[m];for(var c=m,T,l=[],x=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]){x|=1;var w=[],A=T[2],E=[];if((E=a.key.exec(A))!==null)for(w.push(E[1]);(A=A.substring(E[0].length))!=="";)if((E=a.key_access.exec(A))!==null)w.push(E[1]);else if((E=a.index_access.exec(A))!==null)w.push(E[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 x|=2;if(x===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[m]=l}t.sprintf=i,t.vsprintf=n,typeof window<"u"&&(window.sprintf=i,window.vsprintf=n,o=function(){return{sprintf:i,vsprintf:n}}.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),i={"2d":function(m,c,T){var l=m({order:c,scalarArguments:3,getters:T==="generic"?[0]:void 0,phase:function(w,A,E,p){return w>p|0},vertex:function(w,A,E,p,b,d,u,g,y,D,P,z,F){var N=(u<<0)+(g<<1)+(y<<2)+(D<<3)|0;if(!(N===0||N===15))switch(N){case 0:P.push([w-.5,A-.5]);break;case 1:P.push([w-.25-.25*(p+E-2*F)/(E-p),A-.25-.25*(b+E-2*F)/(E-b)]);break;case 2:P.push([w-.75-.25*(-p-E+2*F)/(p-E),A-.25-.25*(d+p-2*F)/(p-d)]);break;case 3:P.push([w-.5,A-.5-.5*(b+E+d+p-4*F)/(E-b+p-d)]);break;case 4:P.push([w-.25-.25*(d+b-2*F)/(b-d),A-.75-.25*(-b-E+2*F)/(b-E)]);break;case 5:P.push([w-.5-.5*(p+E+d+b-4*F)/(E-p+b-d),A-.5]);break;case 6:P.push([w-.5-.25*(-p-E+d+b)/(p-E+b-d),A-.5-.25*(-b-E+d+p)/(b-E+p-d)]);break;case 7:P.push([w-.75-.25*(d+b-2*F)/(b-d),A-.75-.25*(d+p-2*F)/(p-d)]);break;case 8:P.push([w-.75-.25*(-d-b+2*F)/(d-b),A-.75-.25*(-d-p+2*F)/(d-p)]);break;case 9:P.push([w-.5-.25*(p+E+-d-b)/(E-p+d-b),A-.5-.25*(b+E+-d-p)/(E-b+d-p)]);break;case 10:P.push([w-.5-.5*(-p-E+-d-b+4*F)/(p-E+d-b),A-.5]);break;case 11:P.push([w-.25-.25*(-d-b+2*F)/(d-b),A-.75-.25*(b+E-2*F)/(E-b)]);break;case 12:P.push([w-.5,A-.5-.5*(-b-E+-d-p+4*F)/(b-E+d-p)]);break;case 13:P.push([w-.75-.25*(p+E-2*F)/(E-p),A-.25-.25*(-d-p+2*F)/(d-p)]);break;case 14:P.push([w-.25-.25*(-p-E+2*F)/(p-E),A-.25-.25*(-b-E+2*F)/(b-E)]);break;case 15:P.push([w-.5,A-.5]);break}},cell:function(w,A,E,p,b,d,u,g,y){b?g.push([w,A]):g.push([A,w])}});return function(x,w){var A=[],E=[];return l(x,A,E,w),{positions:A,cells:E}}}};function n(m,c){var T=m.length+"d",l=i[T];if(l)return l(o,m,c)}function s(m,c){for(var T=a(m,c),l=T.length,x=new Array(l),w=new Array(l),A=0;AMath.max(p,b)?d[2]=1:p>Math.max(E,b)?d[0]=1:d[1]=1;for(var u=0,g=0,y=0;y<3;++y)u+=A[y]*A[y],g+=d[y]*A[y];for(var y=0;y<3;++y)d[y]-=g/u*A[y];return s(d,d),d}function T(A,E,p,b,d,u,g,y){this.center=o(p),this.up=o(b),this.right=o(d),this.radius=o([u]),this.angle=o([g,y]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(A,E),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 D=0;D<16;++D)this.computedMatrix[D]=.5;this.recalcMatrix(0)}var l=T.prototype;l.setDistanceLimits=function(A,E){A>0?A=Math.log(A):A=-1/0,E>0?E=Math.log(E):E=1/0,E=Math.max(E,A),this.radius.bounds[0][0]=A,this.radius.bounds[1][0]=E},l.getDistanceLimits=function(A){var E=this.radius.bounds[0];return A?(A[0]=Math.exp(E[0][0]),A[1]=Math.exp(E[1][0]),A):[Math.exp(E[0][0]),Math.exp(E[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 E=this.computedUp,p=this.computedRight,b=0,d=0,u=0;u<3;++u)d+=E[u]*p[u],b+=E[u]*E[u];for(var g=Math.sqrt(b),y=0,u=0;u<3;++u)p[u]-=E[u]*d/b,y+=p[u]*p[u],E[u]/=g;for(var D=Math.sqrt(y),u=0;u<3;++u)p[u]/=D;var P=this.computedToward;n(P,E,p),s(P,P);for(var z=Math.exp(this.computedRadius[0]),F=this.computedAngle[0],N=this.computedAngle[1],O=Math.cos(F),L=Math.sin(F),U=Math.cos(N),B=Math.sin(N),W=this.computedCenter,$=O*U,ue=L*U,ce=B,de=-O*B,Y=-L*B,X=U,Q=this.computedEye,V=this.computedMatrix,u=0;u<3;++u){var le=$*p[u]+ue*P[u]+ce*E[u];V[4*u+1]=de*p[u]+Y*P[u]+X*E[u],V[4*u+2]=le,V[4*u+3]=0}var ae=V[1],j=V[5],ee=V[9],te=V[2],pe=V[6],we=V[10],Se=j*we-ee*pe,Re=ee*te-ae*we,Pe=ae*pe-j*te,je=f(Se,Re,Pe);Se/=je,Re/=je,Pe/=je,V[0]=Se,V[4]=Re,V[8]=Pe;for(var u=0;u<3;++u)Q[u]=W[u]+V[2+4*u]*z;for(var u=0;u<3;++u){for(var y=0,at=0;at<3;++at)y+=V[u+4*at]*Q[at];V[12+u]=-y}V[15]=1},l.getMatrix=function(A,E){this.recalcMatrix(A);var p=this.computedMatrix;if(E){for(var b=0;b<16;++b)E[b]=p[b];return E}return p};var x=[0,0,0];l.rotate=function(A,E,p,b){if(this.angle.move(A,E,p),b){this.recalcMatrix(A);var d=this.computedMatrix;x[0]=d[2],x[1]=d[6],x[2]=d[10];for(var u=this.computedUp,g=this.computedRight,y=this.computedToward,D=0;D<3;++D)d[4*D]=u[D],d[4*D+1]=g[D],d[4*D+2]=y[D];i(d,d,b,x);for(var D=0;D<3;++D)u[D]=d[4*D],g[D]=d[4*D+1];this.up.set(A,u[0],u[1],u[2]),this.right.set(A,g[0],g[1],g[2])}},l.pan=function(A,E,p,b){E=E||0,p=p||0,b=b||0,this.recalcMatrix(A);var d=this.computedMatrix,u=Math.exp(this.computedRadius[0]),g=d[1],y=d[5],D=d[9],P=f(g,y,D);g/=P,y/=P,D/=P;var z=d[0],F=d[4],N=d[8],O=z*g+F*y+N*D;z-=g*O,F-=y*O,N-=D*O;var L=f(z,F,N);z/=L,F/=L,N/=L;var U=z*E+g*p,B=F*E+y*p,W=N*E+D*p;this.center.move(A,U,B,W);var $=Math.exp(this.computedRadius[0]);$=Math.max(1e-4,$+b),this.radius.set(A,Math.log($))},l.translate=function(A,E,p,b){this.center.move(A,E||0,p||0,b||0)},l.setMatrix=function(A,E,p,b){var d=1;typeof p=="number"&&(d=p|0),(d<0||d>3)&&(d=1);var u=(d+2)%3,g=(d+1)%3;E||(this.recalcMatrix(A),E=this.computedMatrix);var y=E[d],D=E[d+4],P=E[d+8];if(b){var F=Math.abs(y),N=Math.abs(D),O=Math.abs(P),L=Math.max(F,N,O);F===L?(y=y<0?-1:1,D=P=0):O===L?(P=P<0?-1:1,y=D=0):(D=D<0?-1:1,y=P=0)}else{var z=f(y,D,P);y/=z,D/=z,P/=z}var U=E[u],B=E[u+4],W=E[u+8],$=U*y+B*D+W*P;U-=y*$,B-=D*$,W-=P*$;var ue=f(U,B,W);U/=ue,B/=ue,W/=ue;var ce=D*W-P*B,de=P*U-y*W,Y=y*B-D*U,X=f(ce,de,Y);ce/=X,de/=X,Y/=X,this.center.jump(A,se,ne,Ce),this.radius.idle(A),this.up.jump(A,y,D,P),this.right.jump(A,U,B,W);var Q,V;if(d===2){var le=E[1],ae=E[5],j=E[9],ee=le*U+ae*B+j*W,te=le*ce+ae*de+j*Y;Re<0?Q=-Math.PI/2:Q=Math.PI/2,V=Math.atan2(te,ee)}else{var pe=E[2],we=E[6],Se=E[10],Re=pe*y+we*D+Se*P,Pe=pe*U+we*B+Se*W,je=pe*ce+we*de+Se*Y;Q=Math.asin(m(Re)),V=Math.atan2(je,Pe)}this.angle.jump(A,V,Q),this.recalcMatrix(A);var at=E[2],nt=E[6],tt=E[10],Ve=this.computedMatrix;a(Ve,E);var he=Ve[15],se=Ve[12]/he,ne=Ve[13]/he,Ce=Ve[14]/he,Ze=Math.exp(this.computedRadius[0]);this.center.jump(A,se-at*Ze,ne-nt*Ze,Ce-tt*Ze)},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,E){E>0&&this.radius.set(A,Math.log(E))},l.lookAt=function(A,E,p,b){this.recalcMatrix(A),E=E||this.computedEye,p=p||this.computedCenter,b=b||this.computedUp;var d=b[0],u=b[1],g=b[2],y=f(d,u,g);if(!(y<1e-6)){d/=y,u/=y,g/=y;var D=E[0]-p[0],P=E[1]-p[1],z=E[2]-p[2],F=f(D,P,z);if(!(F<1e-6)){D/=F,P/=F,z/=F;var N=this.computedRight,O=N[0],L=N[1],U=N[2],B=d*O+u*L+g*U;O-=B*d,L-=B*u,U-=B*g;var W=f(O,L,U);if(!(W<.01&&(O=u*z-g*P,L=g*D-d*z,U=d*P-u*D,W=f(O,L,U),W<1e-6))){O/=W,L/=W,U/=W,this.up.set(A,d,u,g),this.right.set(A,O,L,U),this.center.set(A,p[0],p[1],p[2]),this.radius.set(A,Math.log(F));var $=u*U-g*L,ue=g*O-d*U,ce=d*L-u*O,de=f($,ue,ce);$/=de,ue/=de,ce/=de;var Y=d*D+u*P+g*z,X=O*D+L*P+U*z,Q=$*D+ue*P+ce*z,V=Math.asin(m(Y)),le=Math.atan2(Q,X),ae=this.angle._state,j=ae[ae.length-1],ee=ae[ae.length-2];j=j%(2*Math.PI);var te=Math.abs(j+2*Math.PI-le),pe=Math.abs(j-le),we=Math.abs(j-2*Math.PI-le);te0?U.pop():new ArrayBuffer(O)}t.mallocArrayBuffer=x;function w(N){return new Uint8Array(x(N),0,N)}t.mallocUint8=w;function A(N){return new Uint16Array(x(2*N),0,N)}t.mallocUint16=A;function E(N){return new Uint32Array(x(4*N),0,N)}t.mallocUint32=E;function p(N){return new Int8Array(x(N),0,N)}t.mallocInt8=p;function b(N){return new Int16Array(x(2*N),0,N)}t.mallocInt16=b;function d(N){return new Int32Array(x(4*N),0,N)}t.mallocInt32=d;function u(N){return new Float32Array(x(4*N),0,N)}t.mallocFloat32=t.mallocFloat=u;function g(N){return new Float64Array(x(8*N),0,N)}t.mallocFloat64=t.mallocDouble=g;function y(N){return n?new Uint8ClampedArray(x(N),0,N):w(N)}t.mallocUint8Clamped=y;function D(N){return s?new BigUint64Array(x(8*N),0,N):null}t.mallocBigUint64=D;function P(N){return h?new BigInt64Array(x(8*N),0,N):null}t.mallocBigInt64=P;function z(N){return new DataView(x(N),0,N)}t.mallocDataView=z;function F(N){N=o.nextPow2(N);var O=o.log2(N),L=c[O];return L.length>0?L.pop():new i(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,m[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=L.length,W=U.length,$=F[0]===x||F[0]===E,ue=0,ce=-W;ue>-1&&(ue=N.indexOf(L,ue),!(ue===-1||(ce=N.indexOf(U,ue+B),ce===-1)||ce<=ue));){for(var de=ue;de=ce)O[de]=null,N=N.substr(0,de)+" "+N.substr(de+1);else if(O[de]!==null){var Y=O[de].indexOf(F[0]);Y===-1?O[de]+=F:$&&(O[de]=O[de].substr(0,Y+1)+(1+parseInt(O[de][Y+1]))+O[de].substr(Y+2))}var X=ue+B,Q=N.substr(X,ce-X),V=Q.indexOf(L);V!==-1?ue=V:ue=ce+W}return O}function d(z,F,N){for(var O=F.textAlign||"start",L=F.textBaseline||"alphabetic",U=[1<<30,1<<30],B=[0,0],W=z.length,$=0;$/g,` `):N=N.replace(/\/g," ");var B="",W=[];for(j=0;j-1?parseInt(ne[1+rt]):0,kt=Je>-1?parseInt(Ce[1+Je]):0;St!==kt&&(Ze=Ze.replace(Pe(),"?px "),pe*=Math.pow(.75,kt-St),Ze=Ze.replace("?px ",Pe())),te+=.25*Y*(kt-St)}if(U.superscripts===!0){var Bt=ne.indexOf(x),Vt=Ce.indexOf(x),Ar=Bt>-1?parseInt(ne[1+Bt]):0,vr=Vt>-1?parseInt(Ce[1+Vt]):0;Ar!==vr&&(Ze=Ze.replace(Pe(),"?px "),pe*=Math.pow(.75,vr-Ar),Ze=Ze.replace("?px ",Pe())),te-=.25*Y*(vr-Ar)}if(U.bolds===!0){var qr=ne.indexOf(m)>-1,kr=Ce.indexOf(m)>-1;!qr&&kr&&(Ur?Ze=Ze.replace("italic ","italic bold "):Ze="bold "+Ze),qr&&!kr&&(Ze=Ze.replace("bold ",""))}if(U.italics===!0){var Ur=ne.indexOf(T)>-1,_t=Ce.indexOf(T)>-1;!Ur&&_t&&(Ze="italic "+Ze),Ur&&!_t&&(Ze=Ze.replace("italic ",""))}F.font=Ze}for(ae=0;ae0&&(L=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,L+"px",O.font].filter(function($){return $}).join(" "),N.textAlign="start",N.textBaseline="alphabetic",N.direction="ltr";var W=u(F,N,z,L,U,B);return D(W,O,L)}},1538:function(e){(function(){"use strict";if(typeof ses<"u"&&ses.ok&&!ses.ok())return;function r(y){y.permitHostObjects___&&y.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 i=new a,n=Object.freeze({});if(i.set(n,1),i.get(n)!==1)o=!0;else{e.exports=WeakMap;return}}}var s=Object.prototype.hasOwnProperty,h=Object.getOwnPropertyNames,f=Object.defineProperty,m=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),x=new Uint8Array(l);crypto.getRandomValues(x),T=c+"rand:"+Array.prototype.map.call(x,function(y){return(y%36).toString(36)}).join("")+"___"}function w(y){return!(y.substr(0,c.length)==c&&y.substr(y.length-3)==="___")}if(f(Object,"getOwnPropertyNames",{value:function(D){return h(D).filter(w)}}),"getPropertyNames"in Object){var A=Object.getPropertyNames;f(Object,"getPropertyNames",{value:function(D){return A(D).filter(w)}})}function E(y){if(y!==Object(y))throw new TypeError("Not an object: "+y);var D=y[T];if(D&&D.key===y)return D;if(m(y)){D={key:y};try{return f(y,T,{value:D,writable:!1,enumerable:!1,configurable:!1}),D}catch{return}}}(function(){var y=Object.freeze;f(Object,"freeze",{value:function(F){return E(F),y(F)}});var D=Object.seal;f(Object,"seal",{value:function(F){return E(F),D(F)}});var P=Object.preventExtensions;f(Object,"preventExtensions",{value:function(F){return E(F),P(F)}})})();function p(y){return y.prototype=null,Object.freeze(y)}var b=!1;function d(){!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,g=function(){this instanceof g||d();var y=[],D=[],P=u++;function z(L,U){var B,W=E(L);return W?P in W?W[P]:U:(B=y.indexOf(L),B>=0?D[B]:U)}function F(L){var U=E(L);return U?P in U:y.indexOf(L)>=0}function N(L,U){var B,W=E(L);return W?W[P]=U:(B=y.indexOf(L),B>=0?D[B]=U:(B=y.length,D[B]=U,y[B]=L)),this}function O(L){var U=E(L),B,W;return U?P in U&&delete U[P]:(B=y.indexOf(L),B<0?!1:(W=y.length-1,y[B]=void 0,D[B]=D[W],y[B]=y[W],y.length=W,D.length=W,!0))}return Object.create(g.prototype,{get___:{value:p(z)},has___:{value:p(F)},set___:{value:p(N)},delete___:{value:p(O)}})};g.prototype=Object.create(Object.prototype,{get:{value:function(D,P){return this.get___(D,P)},writable:!0,configurable:!0},has:{value:function(D){return this.has___(D)},writable:!0,configurable:!0},set:{value:function(D,P){return this.set___(D,P)},writable:!0,configurable:!0},delete:{value:function(D){return this.delete___(D)},writable:!0,configurable:!0}}),typeof a=="function"?function(){o&&typeof Proxy<"u"&&(Proxy=void 0);function y(){this instanceof g||d();var D=new a,P=void 0,z=!1;function F(U,B){return P?D.has(U)?D.get(U):P.get___(U,B):D.get(U,B)}function N(U){return D.has(U)||(P?P.has___(U):!1)}var O;o?O=function(U,B){return D.set(U,B),D.has(U)||(P||(P=new g),P.set(U,B)),this}:O=function(U,B){if(z)try{D.set(U,B)}catch{P||(P=new g),P.set___(U,B)}else D.set(U,B);return this};function L(U){var B=!!D.delete(U);return P&&P.delete___(U)||B}return Object.create(g.prototype,{get___:{value:p(F)},has___:{value:p(N)},set___:{value:p(O)},delete___:{value:p(L)},permitHostObjects___:{value:p(function(U){if(U===r)z=!0;else throw new Error("bogus call to permitHostObjects___")})}})}y.prototype=g.prototype,e.exports=y,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():(typeof Proxy<"u"&&(Proxy=void 0),e.exports=g)})()},236:function(e,t,r){var o=r(8284);e.exports=a;function a(){var i={};return function(n){if((typeof n!="object"||n===null)&&typeof n!="function")throw new Error("Weakmap-shim: Key must be object");var s=n.valueOf(i);return s&&s.identity===i?s:o(n,i)}}},8284:function(e){e.exports=t;function t(r,o){var a={identity:o},i=r.valueOf;return Object.defineProperty(r,"valueOf",{value:function(n){return n!==o?i.apply(this,arguments):a},writable:!0}),a}},606:function(e,t,r){var o=r(236);e.exports=a;function a(){var i=o();return{get:function(n,s){var h=i(n);return h.hasOwnProperty("value")?h.value:s},set:function(n,s){return i(n).value=s,this},has:function(n){return"value"in i(n)},delete:function(n){return delete i(n).value}}}},3349:function(e){"use strict";function t(){return function(s,h,f,m,c,T){var l=s[0],x=f[0],w=[0],A=x;m|=0;var E=0,p=x;for(E=0;E=0!=d>=0&&c.push(w[0]+.5+.5*(b+d)/(b-d))}m+=p,++w[0]}}}function r(){return t()}var o=r;function a(s){var h={};return function(m,c,T){var l=m.dtype,x=m.order,w=[l,x.join()].join(),A=h[w];return A||(h[w]=A=s([l,x])),A(m.shape.slice(0),m.data,m.stride,m.offset|0,c,T)}}function i(s){return a(o.bind(void 0,s))}function n(s){return i({funcName:s.funcName})}e.exports=n({funcName:"zeroCrossings"})},781:function(e,t,r){"use strict";e.exports=a;var o=r(3349);function a(i,n){var s=[];return n=+n||0,o(i.hi(i.shape[0]-1),s,n),s}},7790:function(){}},_={};function S(e){var t=_[e];if(t!==void 0)return t.exports;var r=_[e]={id:e,loaded:!1,exports:{}};return v[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 M=S(1964);q.exports=M})()}}),xE=He({"node_modules/color-name/index.js"(Z,q){"use strict";q.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]}}}),HN=He({"node_modules/color-normalize/node_modules/color-parse/index.js"(Z,q){"use strict";var v=xE();q.exports=S;var _={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function S(M){var e,t=[],r=1,o;if(typeof M=="string")if(M=M.toLowerCase(),v[M])t=v[M].slice(),o="rgb";else if(M==="transparent")r=0,o="rgb",t=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(M)){var a=M.slice(1),i=a.length,n=i<=4;r=1,n?(t=[parseInt(a[0]+a[0],16),parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16)],i===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)],i===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(M)){var s=e[1],h=s==="rgb",a=s.replace(/a$/,"");o=a;var i=a==="cmyk"?4:a==="gray"?1:3;t=e[2].trim().split(/\s*[,\/]\s*|\s+/).map(function(c,T){if(/%$/.test(c))return T===i?parseFloat(c)/100:a==="rgb"?parseFloat(c)*255/100:parseFloat(c);if(a[T]==="h"){if(/deg$/.test(c))return parseFloat(c);if(_[c]!==void 0)return _[c]}return parseFloat(c)}),s===a&&t.push(1),r=h||t[i]===void 0?1:t[i],t=t.slice(0,i)}else M.length>10&&/[0-9](?:\s|\/)/.test(M)&&(t=M.match(/([0-9]+)/g).map(function(f){return parseFloat(f)}),o=M.match(/([a-z])/ig).join("").toLowerCase());else isNaN(M)?Array.isArray(M)||M.length?(t=[M[0],M[1],M[2]],o="rgb",r=M.length===4?M[3]:1):M instanceof Object&&(M.r!=null||M.red!=null||M.R!=null?(o="rgb",t=[M.r||M.red||M.R||0,M.g||M.green||M.G||0,M.b||M.blue||M.B||0]):(o="hsl",t=[M.h||M.hue||M.H||0,M.s||M.saturation||M.S||0,M.l||M.lightness||M.L||M.b||M.brightness]),r=M.a||M.alpha||M.opacity||1,M.opacity!=null&&(r/=100)):(o="rgb",t=[M>>>16,(M&65280)>>>8,M&255]);return{space:o,values:t,alpha:r}}}}),WN=He({"node_modules/color-normalize/node_modules/color-rgba/index.js"(Z,q){"use strict";var v=HN();q.exports=function(M){Array.isArray(M)&&M.raw&&(M=String.raw.apply(null,arguments));var e,t,r,o=v(M);if(!o.space)return[];var a=[0,0,0],i=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]),i[0]),e[1]=Math.min(Math.max(o.values[1],a[1]),i[1]),e[2]=Math.min(Math.max(o.values[2],a[2]),i[2]),o.space[0]==="h"&&(e=_(e)),e.push(Math.min(Math.max(o.alpha,0),1)),e};function _(S){var M=S[0]/360,e=S[1]/100,t=S[2]/100,r,o,a,i,n,s=0;if(e===0)return n=t*255,[n,n,n];for(o=t<.5?t*(1+e):t+e-t*e,r=2*t-o,i=[0,0,0];s<3;)a=M+1/3*-(s-1),a<0?a++:a>1&&a--,n=6*a<1?r+(o-r)*6*a:2*a<1?o:3*a<2?r+(o-r)*(2/3-a)*6:r,i[s++]=n*255;return i}}}),mx=He({"node_modules/clamp/index.js"(Z,q){q.exports=v;function v(_,S,M){return SM?M:_:_S?S:_}}}),Q3=He({"node_modules/dtype/index.js"(Z,q){q.exports=function(v){switch(v){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}}}}),v0=He({"node_modules/color-normalize/index.js"(Z,q){"use strict";var v=WN(),_=mx(),S=Q3();q.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),i=r!=="uint8"&&r!=="uint8_clamped";return(!t.length||typeof t=="string")&&(t=v(t),t[0]/=255,t[1]/=255,t[2]/=255),M(t)?(a[0]=t[0],a[1]=t[1],a[2]=t[2],a[3]=t[3]!=null?t[3]:255,i&&(a[0]/=255,a[1]/=255,a[2]/=255,a[3]/=255),a):(i?(a[0]=t[0],a[1]=t[1],a[2]=t[2],a[3]=t[3]!=null?t[3]:1):(a[0]=_(Math.floor(t[0]*255),0,255),a[1]=_(Math.floor(t[1]*255),0,255),a[2]=_(Math.floor(t[2]*255),0,255),a[3]=t[3]==null?255:_(Math.floor(t[3]*255),0,255)),a)};function M(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))}}}),tm=He({"src/lib/str2rgbarray.js"(Z,q){"use strict";var v=v0();function _(S){return S?v(S):[0,0,0,1]}q.exports=_}}),rm=He({"src/lib/gl_format_color.js"(Z,q){"use strict";var v=ns(),_=Ch(),S=v0(),M=rc(),e=sh().defaultLine,t=hp().isArrayOrTypedArray,r=S(e),o=1;function a(f,m){var c=f;return c[3]*=m,c}function i(f){if(v(f))return r;var m=S(f);return m.length?m:r}function n(f){return v(f)?f:o}function s(f,m,c){var T=f.color;T&&T._inputArray&&(T=T._inputArray);var l=t(T),x=t(m),w=M.extractOpts(f),A=[],E,p,b,d,u;if(w.colorscale!==void 0?E=M.makeColorScaleFuncFromTrace(f):E=i,l?p=function(y,D){return y[D]===void 0?r:S(E(y[D]))}:p=i,x?b=function(y,D){return y[D]===void 0?o:n(y[D])}:b=n,l||x)for(var g=0;g0){var c=o.c2l(f);o._lowerLogErrorBound||(o._lowerLogErrorBound=c),o._lowerErrorBound=Math.min(o._lowerLogErrorBound,c)}}else i[n]=[-s[0]*r,s[1]*r]}return i}function S(e){for(var t=0;t-1?-1:D.indexOf("right")>-1?1:0}function w(D){return D==null?0:D.indexOf("top")>-1?-1:D.indexOf("bottom")>-1?1:0}function A(D){var P=0,z=0,F=[P,z];if(Array.isArray(D))for(var N=0;N=0){var W=T(U.position,U.delaunayColor,U.delaunayAxis);W.opacity=D.opacity,this.delaunayMesh?this.delaunayMesh.update(W):(W.gl=P,this.delaunayMesh=M(W),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 y(D,P){var z=new m(D,P.uid);return z.update(P),z}q.exports=y}}),wE=He({"src/traces/scatter3d/attributes.js"(Z,q){"use strict";var v=af(),_=tc(),S=ku(),M=rf().axisHoverFormat,{hovertemplateAttrs:e,texttemplateAttrs:t,templatefallbackAttrs:r}=$l(),o=au(),a=bE(),i=eT(),n=rs().extendFlat,s=pc().overrideAll,h=$m(),f=v.line,m=v.marker,c=m.line,T=n({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 x=q.exports=s({x:v.x,y:v.y,z:{valType:"data_array"},text:n({},v.text,{}),texttemplate:t(),texttemplatefallback:r({editType:"calc"}),hovertext:n({},v.hovertext,{}),hovertemplate:e(),hovertemplatefallback:r(),xhoverformat:M("x"),yhoverformat:M("y"),zhoverformat:M("z"),mode:n({},v.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:v.connectgaps,line:T,marker:n({symbol:{valType:"enumerated",values:h(i),dflt:"circle",arrayOk:!0},size:n({},m.size,{dflt:8}),sizeref:m.sizeref,sizemin:m.sizemin,sizemode:m.sizemode,opacity:n({},m.opacity,{arrayOk:!1}),colorbar:m.colorbar,line:n({width:n({},c.width,{arrayOk:!1})},S("marker.line"))},S("marker")),textposition:n({},v.textposition,{dflt:"top center"}),textfont:_({noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,editType:"calc",colorEditType:"style",arrayOk:!0,variantValues:["normal","small-caps"]}),opacity:o.opacity,hoverinfo:n({},o.hoverinfo)},"calc","nested");x.x.editType=x.y.editType=x.z.editType="calc+clearAxisTypes"}}),YN=He({"src/traces/scatter3d/defaults.js"(Z,q){"use strict";var v=so(),_=sa(),S=Fu(),M=md(),e=Dd(),t=zd(),r=wE();q.exports=function(i,n,s,h){function f(E,p){return _.coerce(i,n,r,E,p)}var m=o(i,n,f,h);if(!m){n.visible=!1;return}f("text"),f("hovertext"),f("hovertemplate"),f("hovertemplatefallback"),f("xhoverformat"),f("yhoverformat"),f("zhoverformat"),f("mode"),S.hasMarkers(n)&&M(i,n,s,h,f,{noAngle:!0,noLineDash:!0,noSelect:!0}),S.hasLines(n)&&(f("connectgaps"),e(i,n,s,h,f)),S.hasText(n)&&(f("texttemplate"),f("texttemplatefallback"),t(i,n,h,f,{noSelect:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}));var c=(n.line||{}).color,T=(n.marker||{}).color;f("surfaceaxis")>=0&&f("surfacecolor",c||T);for(var l=["x","y","z"],x=0;x<3;++x){var w="projection."+l[x];f(w+".show")&&(f(w+".opacity"),f(w+".scale"))}var A=v.getComponentMethod("errorbars","supplyDefaults");A(i,n,c||T||s,{axis:"z"}),A(i,n,c||T||s,{axis:"y",inherit:"z"}),A(i,n,c||T||s,{axis:"x",inherit:"z"})};function o(a,i,n,s){var h=0,f=n("x"),m=n("y"),c=n("z"),T=v.getComponentMethod("calendars","handleTraceDefaults");return T(a,i,["x","y","z"],s),f&&m&&c&&(h=Math.min(f.length,m.length,c.length),i._length=i._xlength=i._ylength=i._zlength=h),h}}}),KN=He({"src/traces/scatter3d/calc.js"(Z,q){"use strict";var v=Av(),_=Fd();q.exports=function(M,e){var t=[{x:!1,y:!1,trace:e,t:{}}];return v(t,e),_(M,e),t}}}),JN=He({"node_modules/get-canvas-context/index.js"(Z,q){q.exports=v;function v(_,S){if(typeof _!="string")throw new TypeError("must specify type string");if(S=S||{},typeof document>"u"&&!S.canvas)return null;var M=S.canvas||document.createElement("canvas");typeof S.width=="number"&&(M.width=S.width),typeof S.height=="number"&&(M.height=S.height);var e=S,t;try{var r=[_];_.indexOf("webgl")===0&&r.push("experimental-"+_);for(var o=0;o/g," "));n[s]=c,h.tickmode=f}}o.ticks=n;for(var s=0;s<3;++s){M[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(n)}}}),rU=He({"src/plots/gl3d/scene.js"(Z,q){"use strict";var v=Kh().gl_plot3d,_=v.createCamera,S=v.createScene,M=$N(),e=b2(),t=so(),r=sa(),o=r.preserveDrawingBuffer(),a=Wo(),i=Hc(),n=tm(),s=TE(),h=U5(),f=QN(),m=eU(),c=tU(),T=Yd().applyAutorangeOptions,l,x,w=!1;function A(z,F){var N=document.createElement("div"),O=z.container;this.graphDiv=z.graphDiv;var L=document.createElementNS("http://www.w3.org/2000/svg","svg");L.style.position="absolute",L.style.top=L.style.left="0px",L.style.width=L.style.height="100%",L.style["z-index"]=20,L.style["pointer-events"]="none",N.appendChild(L),this.svgContainer=L,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=m(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 E=A.prototype;E.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(!x&&(l=document.createElement("canvas"),x=M({canvas:l,preserveDrawingBuffer:!0,premultipliedAlpha:!0,antialias:!0}),!x))throw new Error("error creating static canvas/context for image server");F.gl=x,F.canvas=l}return F};var p=!0;E.tryCreatePlot=function(){var z=this,F=z.prepareOptions(),N=!0;try{z.glplot=S(F)}catch{if(z.staticMode||!p||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 p=!1,N},E.initializeGLCamera=function(){var z=this,F=z.fullSceneLayout.camera,N=F.projection.type==="orthographic";z.camera=_(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"})},E.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,L=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 W=L();B.saveLayout(O),B.graphDiv.emit("plotly_relayout",W)}};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 W=B.deltaX>B.deltaY?1.1:.9090909090909091,$=z.glplot.getAspectratio();z.glplot.setAspectratio({x:W*$.x,y:W*$.y,z:W*$.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=L();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},E.render=function(){var z=this,F=z.graphDiv,N,O=z.svgContainer,L=z.container.getBoundingClientRect();F._fullLayout._calcInverseTransform(F);var U=F._fullLayout._invScaleX,B=F._fullLayout._invScaleY,W=L.width*U,$=L.height*B;O.setAttributeNS(null,"viewBox","0 0 "+W+" "+$),O.setAttributeNS(null,"width",W),O.setAttributeNS(null,"height",$),c(z),z.glplot.axes.update(z.axesOptions);for(var ue=Object.keys(z.traces),ce=null,de=z.glplot.selection,Y=0;Y")):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:V._input,fullData:V,curveNumber:V.index,pointNumber:le};i.appendArrayPointValue(Se,V,le),N._module.eventData&&(Se=V._module.eventData(Se,de,V,{},le));var Re={points:[Se]};if(z.fullSceneLayout.hovermode){var Pe=[];i.loneHover({trace:V,x:(.5+.5*Q[0]/Q[3])*W,y:(.5-.5*Q[1]/Q[3])*$,xLabel:ae.xLabel,yLabel:ae.yLabel,zLabel:ae.zLabel,text:pe,name:ce.name,color:i.castHoverOption(V,le,"bgcolor")||ce.color,borderColor:i.castHoverOption(V,le,"bordercolor"),fontFamily:i.castHoverOption(V,le,"font.family"),fontSize:i.castHoverOption(V,le,"font.size"),fontColor:i.castHoverOption(V,le,"font.color"),nameLength:i.castHoverOption(V,le,"namelength"),textAlign:i.castHoverOption(V,le,"align"),hovertemplate:r.castOption(V,le,"hovertemplate"),hovertemplateLabels:r.extendFlat({},Se,ae),eventData:[Se]},{container:O,gd:F,inOut_bbox:Pe}),Se.bbox=Pe[0]}de.distance<5&&(de.buttons||w)?F.emit("plotly_click",Re):F.emit("plotly_hover",Re),this.oldEventData=Re}else i.loneUnhover(O),this.oldEventData&&F.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;z.drawAnnotations(z)},E.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 d(z,F,N){for(var O=z.fullSceneLayout,L=0;L<3;L++){var U=b[L],B=U.charAt(0),W=O[U],$=F[B],ue=F[B+"calendar"],ce=F["_"+B+"length"];if(!r.isArrayOrTypedArray($))N[0][L]=Math.min(N[0][L],0),N[1][L]=Math.max(N[1][L],ce-1);else for(var de,Y=0;Y<(ce||$.length);Y++)if(r.isArrayOrTypedArray($[Y]))for(var X=0;X<$[Y].length;++X)de=W.d2l($[Y][X],0,ue),!isNaN(de)&&isFinite(de)&&(N[0][L]=Math.min(N[0][L],de),N[1][L]=Math.max(N[1][L],de));else de=W.d2l($[Y],0,ue),!isNaN(de)&&isFinite(de)&&(N[0][L]=Math.min(N[0][L],de),N[1][L]=Math.max(N[1][L],de))}}function u(z,F){for(var N=z.fullSceneLayout,O=N.annotations||[],L=0;L<3;L++)for(var U=b[L],B=U.charAt(0),W=N[U],$=0;$V[1][B])V[0][B]=-1,V[1][B]=1;else{var at=V[1][B]-V[0][B];V[0][B]-=at/32,V[1][B]+=at/32}if(j=[V[0][B],V[1][B]],j=T(j,$),V[0][B]=j[0],V[1][B]=j[1],$.isReversed()){var nt=V[0][B];V[0][B]=V[1][B],V[1][B]=nt}}else j=$.range,V[0][B]=$.r2l(j[0]),V[1][B]=$.r2l(j[1]);V[0][B]===V[1][B]&&(V[0][B]-=1,V[1][B]+=1),le[B]=V[1][B]-V[0][B],$.range=[V[0][B],V[1][B]],$.limitRange(),O.glplot.setBounds(B,{min:$.range[0]*X[B],max:$.range[1]*X[B]})}var tt,Ve=ce.aspectmode;if(Ve==="cube")tt=[1,1,1];else if(Ve==="manual"){var he=ce.aspectratio;tt=[he.x,he.y,he.z]}else if(Ve==="auto"||Ve==="data"){var se=[1,1,1];for(B=0;B<3;++B){$=ce[b[B]],ue=$.type;var ne=ae[ue];se[B]=Math.pow(ne.acc,1/ne.count)/X[B]}Ve==="data"||Math.max.apply(null,se)/Math.min.apply(null,se)<=4?tt=se: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,Ze=F._size||null;if(Ce&&Ze){var rt=O.container.style;rt.position="absolute",rt.left=Ze.l+Ce.x[0]*Ze.w+"px",rt.top=Ze.t+(1-Ce.y[1])*Ze.h+"px",rt.width=Ze.w*(Ce.x[1]-Ce.x[0])+"px",rt.height=Ze.h*(Ce.y[1]-Ce.y[0])+"px"}O.glplot.redraw()}},E.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 g(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 y(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"}}}E.getCamera=function(){var z=this;return z.camera.view.recalcMatrix(z.camera.view.lastT()),y(z.camera)},E.setViewport=function(z){var F=this,N=z.camera;F.camera.lookAt.apply(this,g(N)),F.glplot.setAspectratio(z.aspectratio);var O=N.projection.type==="orthographic",L=F.camera._ortho;O!==L&&(F.glplot.redraw(),F.glplot.clearRGBA(),F.glplot.dispose(),F.initializeGLPlot())},E.isCameraChanged=function(z){var F=this,N=F.getCamera(),O=r.nestedProperty(z,F.id+".camera"),L=O.get();function U(ue,ce,de,Y){var X=["up","center","eye"],Q=["x","y","z"];return ce[X[de]]&&ue[X[de]][Q[Y]]===ce[X[de]][Q[Y]]}var B=!1;if(L===void 0)B=!0;else{for(var W=0;W<3;W++)for(var $=0;$<3;$++)if(!U(N,L,W,$)){B=!0;break}(!L.projection||N.projection&&N.projection.type!==L.projection.type)&&(B=!0)}return B},E.isAspectChanged=function(z){var F=this,N=F.glplot.getAspectratio(),O=r.nestedProperty(z,F.id+".aspectratio"),L=O.get();return L===void 0||L.x!==N.x||L.y!==N.y||L.z!==N.z},E.saveLayout=function(z){var F=this,N=F.fullLayout,O,L,U,B,W,$,ue=F.isCameraChanged(z),ce=F.isAspectChanged(z),de=ue||ce;if(de){var Y={};if(ue&&(O=F.getCamera(),L=r.nestedProperty(z,F.id+".camera"),U=L.get(),Y[F.id+".camera"]=U),ce&&(B=F.glplot.getAspectratio(),W=r.nestedProperty(z,F.id+".aspectratio"),$=W.get(),Y[F.id+".aspectratio"]=$),t.call("_storeDirectGUIEdit",z,N._preGUI,Y),ue){L.set(O);var X=r.nestedProperty(N,F.id+".camera");X.set(O)}if(ce){W.set(B);var Q=r.nestedProperty(N,F.id+".aspectratio");Q.set(B),F.glplot.redraw()}}return de},E.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 L=N.graphDiv,U=L._fullLayout,B=N.fullSceneLayout.camera,W=B.up.x,$=B.up.y,ue=B.up.z;if(ue/Math.sqrt(W*W+$*$+ue*ue)<.999){var ce=N.id+".camera.up",de={x:0,y:0,z:1},Y={};Y[ce]=de;var X=L.layout;t.call("_storeDirectGUIEdit",X,U._preGUI,Y),B.up=de,r.nestedProperty(X,ce).set(de)}}else O.keyBindingMode=z;N.fullSceneLayout.hovermode=F};function D(z,F,N){for(var O=0,L=N-1;O0)for(var W=255/B,$=0;$<3;++$)z[U+$]=Math.min(W*z[U+$],255)}}E.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,L=N.drawingBufferHeight;N.bindFramebuffer(N.FRAMEBUFFER,null);var U=new Uint8Array(O*L*4);N.readPixels(0,0,O,L,N.RGBA,N.UNSIGNED_BYTE,U),D(U,O,L),P(U,O,L);var B=document.createElement("canvas");B.width=O,B.height=L;var W=B.getContext("2d",{willReadFrequently:!0}),$=W.createImageData(O,L);$.data.set(U),W.putImageData($,0,0);var ue;switch(z){case"jpeg":ue=B.toDataURL("image/jpeg");break;case"webp":ue=B.toDataURL("image/webp");break;default:ue=B.toDataURL("image/png")}return F.staticMode&&F.container.removeChild(l),ue},E.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}},E.make4thDimension=function(){var z=this,F=z.graphDiv,N=F._fullLayout;z._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},a.setConvert(z._mockAxis,N)},q.exports=A}}),aU=He({"src/plots/gl3d/layout/attributes.js"(Z,q){"use strict";q.exports={scene:{valType:"subplotid",dflt:"scene",editType:"calc+clearAxisTypes"}}}}),AE=He({"src/plots/gl3d/layout/axis_attributes.js"(Z,q){"use strict";var v=$n(),_=Xh(),S=rs().extendFlat,M=pc().overrideAll;q.exports=M({visible:_.visible,showspikes:{valType:"boolean",dflt:!0},spikesides:{valType:"boolean",dflt:!0},spikethickness:{valType:"number",min:0,dflt:2},spikecolor:{valType:"color",dflt:v.defaultLine},showbackground:{valType:"boolean",dflt:!1},backgroundcolor:{valType:"color",dflt:"rgba(204, 204, 204, 0.5)"},showaxeslabels:{valType:"boolean",dflt:!0},color:_.color,categoryorder:_.categoryorder,categoryarray:_.categoryarray,title:{text:_.title.text,font:_.title.font},type:S({},_.type,{values:["-","linear","log","date","category"]}),autotypenumbers:_.autotypenumbers,autorange:_.autorange,autorangeoptions:{minallowed:_.autorangeoptions.minallowed,maxallowed:_.autorangeoptions.maxallowed,clipmin:_.autorangeoptions.clipmin,clipmax:_.autorangeoptions.clipmax,include:_.autorangeoptions.include,editType:"plot"},rangemode:_.rangemode,minallowed:_.minallowed,maxallowed:_.maxallowed,range:S({},_.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],anim:!1}),tickmode:_.minor.tickmode,nticks:_.nticks,tick0:_.tick0,dtick:_.dtick,tickvals:_.tickvals,ticktext:_.ticktext,ticks:_.ticks,mirror:_.mirror,ticklen:_.ticklen,tickwidth:_.tickwidth,tickcolor:_.tickcolor,showticklabels:_.showticklabels,labelalias:_.labelalias,tickfont:_.tickfont,tickangle:_.tickangle,tickprefix:_.tickprefix,showtickprefix:_.showtickprefix,ticksuffix:_.ticksuffix,showticksuffix:_.showticksuffix,showexponent:_.showexponent,exponentformat:_.exponentformat,minexponent:_.minexponent,separatethousands:_.separatethousands,tickformat:_.tickformat,tickformatstops:_.tickformatstops,hoverformat:_.hoverformat,showline:_.showline,linecolor:_.linecolor,linewidth:_.linewidth,showgrid:_.showgrid,gridcolor:S({},_.gridcolor,{dflt:"rgb(204, 204, 204)"}),gridwidth:_.gridwidth,zeroline:_.zeroline,zerolinecolor:_.zerolinecolor,zerolinewidth:_.zerolinewidth},"plot","from-root")}}),SE=He({"src/plots/gl3d/layout/layout_attributes.js"(Z,q){"use strict";var v=AE(),_=wc().attributes,S=rs().extendFlat,M=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"}}q.exports={_arrayAttrRegexps:[M("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:_({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:v,yaxis:v,zaxis:v,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"}}}),iU=He({"src/plots/gl3d/layout/axis_defaults.js"(Z,q){"use strict";var v=Ch().mix,_=sa(),S=zl(),M=AE(),e=B5(),t=F_(),r=["xaxis","yaxis","zaxis"],o=100*136/187;q.exports=function(i,n,s){var h,f;function m(l,x){return _.coerce(h,f,M,l,x)}for(var c=0;c1;function m(c){if(!f){var T=v.validate(n[c],t[c]);if(T)return n[c]}}M(n,s,h,{type:o,attributes:t,handleDefaults:a,fullLayout:s,font:s.font,fullData:h,getDfltFromLayout:m,autotypenumbersDflt:s.autotypenumbers,paper_bgcolor:s.paper_bgcolor,calendar:s.calendar})};function a(i,n,s,h){for(var f=s("bgcolor"),m=_.combine(f,h.paper_bgcolor),c=["up","center","eye"],T=0;T.999)&&(E="turntable")}else E="turntable";s("dragmode",E),s("hovermode",h.getDfltFromLayout("hovermode"))}}}),m0=He({"src/plots/gl3d/index.js"(Z){"use strict";var q=pc().overrideAll,v=Ym(),_=rU(),S=Wh().getSubplotData,M=sa(),e=vd(),t="gl3d",r="scene";Z.name=t,Z.attr=r,Z.idRoot=r,Z.idRegex=Z.attrRegex=M.counterRegex("scene"),Z.attributes=aU(),Z.layoutAttributes=SE(),Z.baseLayoutAttrOverrides=q({hoverlabel:v.hoverlabel},"plot","nested"),Z.supplyLayoutDefaults=nU(),Z.plot=function(a){for(var i=a._fullLayout,n=a._fullData,s=i._subplots[t],h=0;h0){D=h[P];break}return D}function T(g,y){if(!(g<1||y<1)){for(var D=m(g),P=m(y),z=1,F=0;FA;)P--,P/=c(P),P++,P1?z:1};function E(g,y,D){var P=D[8]+D[2]*y[0]+D[5]*y[1];return g[0]=(D[6]+D[0]*y[0]+D[3]*y[1])/P,g[1]=(D[7]+D[1]*y[0]+D[4]*y[1])/P,g}function p(g,y,D){return b(g,y,E,D),g}function b(g,y,D,P){for(var z=[0,0],F=g.shape[0],N=g.shape[1],O=0;O0&&this.contourStart[P]!==null&&this.contourEnd[P]!==null&&this.contourEnd[P]>this.contourStart[P]))for(y[P]=!0,z=this.contourStart[P];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=n("x"),m=n("y"),c=n("z"),T=n("value");if(!f||!f.length||!m||!m.length||!c||!c.length||!T||!T.length){o.visible=!1;return}var l=_.getComponentMethod("calendars","handleTraceDefaults");l(r,o,["x","y","z"],i),n("valuehoverformat"),["x","y","z"].forEach(function(E){n(E+"hoverformat");var p="caps."+E,b=n(p+".show");b&&n(p+".fill");var d="slices."+E,u=n(d+".show");u&&(n(d+".fill"),n(d+".locations"))});var x=n("spaceframe.show");x&&n("spaceframe.fill");var w=n("surface.show");w&&(n("surface.count"),n("surface.fill"),n("surface.pattern"));var A=n("contour.show");A&&(n("contour.color"),n("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(E){n(E)}),M(r,o,i,n,{prefix:"",cLetter:"c"}),o._length=null}q.exports={supplyDefaults:e,supplyIsoDefaults:t}}}),rT=He({"src/traces/streamtube/calc.js"(Z,q){"use strict";var v=sa(),_=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=M(o);o._gridFill=a.fill,o._Xs=a.Xs,o._Ys=a.Ys,o._Zs=a.Zs,o._len=a.len;var i=0,n,s,h;o.starts&&(n=t(o.starts.x||[]),s=t(o.starts.y||[]),h=t(o.starts.z||[]),i=Math.min(n.length,s.length,h.length)),o._startsX=n||[],o._startsY=s||[],o._startsZ=h||[];var f=0,m=1/0,c;for(c=0;c1&&(u=o[n-1],y=a[n-1],P=i[n-1]),s=0;su?"-":"+")+"x"),A=A.replace("y",(g>y?"-":"+")+"y"),A=A.replace("z",(D>P?"-":"+")+"z");var O=function(){n=0,z=[],F=[],N=[]};(!n||n0;m--){var c=Math.min(f[m],f[m-1]),T=Math.max(f[m],f[m-1]);if(T>c&&c-1}function ee(_t,Fe){return _t===null?Fe:_t}function te(_t,Fe,Ye){ue();var Ae=[Fe],Le=[Ye];if(V>=1)Ae=[Fe],Le=[Ye];else if(V>0){var We=ae(Fe,Ye);Ae=We.xyzv,Le=We.abc}for(var Ke=0;Ke-1?Ye[ot]:$(Ut,Ct,Pt);cr>-1?st[ot]=cr:st[ot]=de(Ut,Ct,Pt,ee(_t,jt))}Y(st[0],st[1],st[2])}}function pe(_t,Fe,Ye){var Ae=function(Le,We,Ke){te(_t,[Fe[Le],Fe[We],Fe[Ke]],[Ye[Le],Ye[We],Ye[Ke]])};Ae(0,1,2),Ae(2,3,0)}function we(_t,Fe,Ye){var Ae=function(Le,We,Ke){te(_t,[Fe[Le],Fe[We],Fe[Ke]],[Ye[Le],Ye[We],Ye[Ke]])};Ae(0,1,2),Ae(3,0,1),Ae(2,3,0),Ae(1,2,3)}function Se(_t,Fe,Ye,Ae){var Le=_t[3];LeAe&&(Le=Ae);for(var We=(_t[3]-Le)/(_t[3]-Fe[3]+1e-9),Ke=[],st=0;st<4;st++)Ke[st]=(1-We)*_t[st]+We*Fe[st];return Ke}function Re(_t,Fe,Ye){return _t>=Fe&&_t<=Ye}function Pe(_t){var Fe=.001*(O-N);return _t>=N-Fe&&_t<=O+Fe}function je(_t){for(var Fe=[],Ye=0;Ye<4;Ye++){var Ae=_t[Ye];Fe.push([h._x[Ae],h._y[Ae],h._z[Ae],h._value[Ae]])}return Fe}var at=3;function nt(_t,Fe,Ye,Ae,Le,We){We||(We=1),Ye=[-1,-1,-1];var Ke=!1,st=[Re(Fe[0][3],Ae,Le),Re(Fe[1][3],Ae,Le),Re(Fe[2][3],Ae,Le)];if(!st[0]&&!st[1]&&!st[2])return!1;var ot=function(Ct,Pt,jt){return Pe(Pt[0][3])&&Pe(Pt[1][3])&&Pe(Pt[2][3])?(te(Ct,Pt,jt),!0):West?[z,We]:[We,F];Bt(Fe,ot[0],ot[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&&(Fa.push(Wa.id),Ct==="x"?Ra.push([Wa.distRatio,0,0]):Ct==="y"?Ra.push([0,Wa.distRatio,0]):Ra.push([0,0,Wa.distRatio]))}else Ct==="x"?_a=qr(1,u-1):Ct==="y"?_a=qr(1,g-1):_a=qr(1,y-1);Fa.length>0&&(Ct==="x"?Pt[cr]=Vt(_t,Fa,or,nr,Ra,Pt[cr]):Ct==="y"?Pt[cr]=Ar(_t,Fa,or,nr,Ra,Pt[cr]):Pt[cr]=vr(_t,Fa,or,nr,Ra,Pt[cr]),cr++),_a.length>0&&(Ct==="x"?Pt[cr]=Ze(_t,_a,or,nr,Pt[cr]):Ct==="y"?Pt[cr]=rt(_t,_a,or,nr,Pt[cr]):Pt[cr]=Je(_t,_a,or,nr,Pt[cr]),cr++)}var Ca=h.caps[Ct];Ca.show&&Ca.fill&&(le(Ca.fill),Ct==="x"?Pt[cr]=Ze(_t,[0,u-1],or,nr,Pt[cr]):Ct==="y"?Pt[cr]=rt(_t,[0,g-1],or,nr,Pt[cr]):Pt[cr]=Je(_t,[0,y-1],or,nr,Pt[cr]),cr++)}}),w===0&&ce(),h._meshX=L,h._meshY=U,h._meshZ=B,h._meshIntensity=W,h._Xs=p,h._Ys=b,h._Zs=d}return Ur(),h}function s(h,f){var m=h.glplot.gl,c=v({gl:m}),T=new o(h,c,f.uid);return c._trace=T,T.update(f),h.glplot.add(c),T}q.exports={findNearestOnAxis:r,generateIsoMeshes:n,createIsosurfaceTrace:s}}}),hU=He({"src/traces/isosurface/index.js"(Z,q){"use strict";q.exports={attributes:tT(),supplyDefaults:EE().supplyDefaults,calc:kE(),colorbar:{min:"cmin",max:"cmax"},plot:aT().createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:m0(),categories:["gl3d","showLegend"],meta:{}}}}),pU=He({"lib/isosurface.js"(Z,q){"use strict";q.exports=hU()}}),CE=He({"src/traces/volume/attributes.js"(Z,q){"use strict";var v=ku(),_=tT(),S=gx(),M=au(),e=rs().extendFlat,t=pc().overrideAll,r=q.exports=t(e({x:_.x,y:_.y,z:_.z,value:_.value,isomin:_.isomin,isomax:_.isomax,surface:_.surface,spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:1}},slices:_.slices,caps:_.caps,text:_.text,hovertext:_.hovertext,xhoverformat:_.xhoverformat,yhoverformat:_.yhoverformat,zhoverformat:_.zhoverformat,valuehoverformat:_.valuehoverformat,hovertemplate:_.hovertemplate,hovertemplatefallback:_.hovertemplatefallback},v("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{colorbar:_.colorbar,opacity:_.opacity,opacityscale:S.opacityscale,lightposition:_.lightposition,lighting:_.lighting,flatshading:_.flatshading,contour:_.contour,hoverinfo:e({},M.hoverinfo),showlegend:e({},M.showlegend,{dflt:!1})}),"calc","nested");r.x.editType=r.y.editType=r.z.editType=r.value.editType="calc+clearAxisTypes"}}),dU=He({"src/traces/volume/defaults.js"(Z,q){"use strict";var v=sa(),_=CE(),S=EE().supplyIsoDefaults,M=ME().opacityscaleDefaults;q.exports=function(t,r,o,a){function i(n,s){return v.coerce(t,r,_,n,s)}S(t,r,o,a,i),M(t,r,a,i)}}}),vU=He({"src/traces/volume/convert.js"(Z,q){"use strict";var v=Kh().gl_mesh3d,_=rm().parseColorScale,S=sa().isArrayOrTypedArray,M=tm(),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 i=a.prototype;i.handlePick=function(s){if(s.object===this.mesh){var h=s.data.index,f=this.data._meshX[h],m=this.data._meshY[h],c=this.data._meshZ[h],T=this.data._Ys.length,l=this.data._Zs.length,x=r(f,this.data._Xs).id,w=r(m,this.data._Ys).id,A=r(c,this.data._Zs).id,E=s.index=A+l*w+l*T*x;s.traceCoordinate=[this.data._meshX[E],this.data._meshY[E],this.data._meshZ[E],this.data._value[E]];var p=this.data.hovertext||this.data.text;return S(p)&&p[E]!==void 0?s.textLabel=p[E]:p&&(s.textLabel=p),!0}},i.update=function(s){var h=this.scene,f=h.fullSceneLayout;this.data=o(s);function m(w,A,E,p){return A.map(function(b){return w.d2l(b,0,p)*E})}var c=t(m(f.xaxis,s._meshX,h.dataScale[0],s.xcalendar),m(f.yaxis,s._meshY,h.dataScale[1],s.ycalendar),m(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:M(s.contour.color).slice(0,3),contourWidth:s.contour.width,useFacetNormals:s.flatshading},x=e(s);l.vertexIntensity=s._meshIntensity,l.vertexIntensityBounds=[x.min,x.max],l.colormap=_(s),this.mesh.update(l)},i.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function n(s,h){var f=s.glplot.gl,m=v({gl:f}),c=new a(s,m,h.uid);return m._trace=c,c.update(h),s.glplot.add(m),c}q.exports=n}}),mU=He({"src/traces/volume/index.js"(Z,q){"use strict";q.exports={attributes:CE(),supplyDefaults:dU(),calc:kE(),colorbar:{min:"cmin",max:"cmax"},plot:vU(),moduleType:"trace",name:"volume",basePlotModule:m0(),categories:["gl3d","showLegend"],meta:{}}}}),gU=He({"lib/volume.js"(Z,q){"use strict";q.exports=mU()}}),yU=He({"src/traces/mesh3d/defaults.js"(Z,q){"use strict";var v=so(),_=sa(),S=_h(),M=M1();q.exports=function(t,r,o,a){function i(m,c){return _.coerce(t,r,M,m,c)}function n(m){var c=m.map(function(T){var l=i(T);return l&&_.isArrayOrTypedArray(l)?l:null});return c.every(function(T){return T&&T.length===c[0].length})&&c}var s=n(["x","y","z"]);if(!s){r.visible=!1;return}if(n(["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=v.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(m){i(m)});var f=i("contour.show");f&&(i("contour.color"),i("contour.width")),"intensity"in t?(i("intensity"),i("intensitymode"),S(t,r,a,i,{prefix:"",cLetter:"c"})):(r.showscale=!1,"facecolor"in t?i("facecolor"):"vertexcolor"in t?i("vertexcolor"):i("color",o)),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),i("xhoverformat"),i("yhoverformat"),i("zhoverformat"),r._length=null}}}),_U=He({"src/traces/mesh3d/calc.js"(Z,q){"use strict";var v=Tp();q.exports=function(S,M){M.intensity&&v(S,M,{vals:M.intensity,containerStr:"",cLetter:"c"})}}}),xU=He({"src/traces/mesh3d/convert.js"(Z,q){"use strict";var v=Kh().gl_mesh3d,_=Kh().delaunay_triangulate,S=Kh().alpha_shape,M=Kh().convex_hull,e=rm().parseColorScale,t=sa().isArrayOrTypedArray,r=tm(),o=rc().extractOpts,a=E1();function i(l,x,w){this.scene=l,this.uid=w,this.mesh=x,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var n=i.prototype;n.handlePick=function(l){if(l.object===this.mesh){var x=l.index=l.data.index;l.data._cellCenter?l.traceCoordinate=l.data.dataCoordinate:l.traceCoordinate=[this.data.x[x],this.data.y[x],this.data.z[x]];var w=this.data.hovertext||this.data.text;return t(w)&&w[x]!==void 0?l.textLabel=w[x]:w&&(l.textLabel=w),!0}};function s(l){for(var x=[],w=l.length,A=0;A=x-.5)return!1;return!0}n.update=function(l){var x=this.scene,w=x.fullSceneLayout;this.data=l;var A=l.x.length,E=a(h(w.xaxis,l.x,x.dataScale[0],l.xcalendar),h(w.yaxis,l.y,x.dataScale[1],l.ycalendar),h(w.zaxis,l.z,x.dataScale[2],l.zcalendar)),p;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;p=a(f(l.i),f(l.j),f(l.k))}else l.alphahull===0?p=M(E):l.alphahull>0?p=S(l.alphahull,E):p=m(l.delaunayaxis,E);var b={positions:E,cells:p,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 d=o(l);this.color="#fff";var u=l.intensitymode;b[u+"Intensity"]=l.intensity,b[u+"IntensityBounds"]=[d.min,d.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)},n.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function T(l,x){var w=l.glplot.gl,A=v({gl:w}),E=new i(l,A,x.uid);return A._trace=E,E.update(x),l.glplot.add(A),E}q.exports=T}}),bU=He({"src/traces/mesh3d/index.js"(Z,q){"use strict";q.exports={attributes:M1(),supplyDefaults:yU(),calc:_U(),colorbar:{min:"cmin",max:"cmax"},plot:xU(),moduleType:"trace",name:"mesh3d",basePlotModule:m0(),categories:["gl3d","showLegend"],meta:{}}}}),wU=He({"lib/mesh3d.js"(Z,q){"use strict";q.exports=bU()}}),LE=He({"src/traces/cone/attributes.js"(Z,q){"use strict";var v=ku(),_=rf().axisHoverFormat,{hovertemplateAttrs:S,templatefallbackAttrs:M}=$l(),e=M1(),t=au(),r=rs().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:M({editType:"calc"}),uhoverformat:_("u",1),vhoverformat:_("v",1),whoverformat:_("w",1),xhoverformat:_("x"),yhoverformat:_("y"),zhoverformat:_("z"),showlegend:r({},t.showlegend,{dflt:!1})};r(o,v("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var a=["opacity","lightposition","lighting"];a.forEach(function(i){o[i]=e[i]}),o.hoverinfo=r({},t.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"}),q.exports=o}}),TU=He({"src/traces/cone/defaults.js"(Z,q){"use strict";var v=sa(),_=_h(),S=LE();q.exports=function(e,t,r,o){function a(T,l){return v.coerce(e,t,S,T,l)}var i=a("u"),n=a("v"),s=a("w"),h=a("x"),f=a("y"),m=a("z");if(!i||!i.length||!n||!n.length||!s||!s.length||!h||!h.length||!f||!f.length||!m||!m.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"),_(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}}}),AU=He({"src/traces/cone/calc.js"(Z,q){"use strict";var v=Tp();q.exports=function(S,M){for(var e=M.u,t=M.v,r=M.w,o=Math.min(M.x.length,M.y.length,M.z.length,e.length,t.length,r.length),a=-1/0,i=1/0,n=0;n2?c=f.slice(1,m-1):m===2?c=[(f[0]+f[1])/2]:c=f,c}function n(f){var m=f.length;return m===1?[.5,.5]:[f[1]-f[0],f[m-1]-f[m-2]]}function s(f,m){var c=f.fullSceneLayout,T=f.dataScale,l=m._len,x={};function w(de,Y){var X=c[Y],Q=T[r[Y]];return S.simpleMap(de,function(V){return X.d2l(V)*Q})}if(x.vectors=t(w(m._u,"xaxis"),w(m._v,"yaxis"),w(m._w,"zaxis"),l),!l)return{positions:[],cells:[]};var A=w(m._Xs,"xaxis"),E=w(m._Ys,"yaxis"),p=w(m._Zs,"zaxis");x.meshgrid=[A,E,p],x.gridFill=m._gridFill;var b=m._slen;if(b)x.startingPositions=t(w(m._startsX,"xaxis"),w(m._startsY,"yaxis"),w(m._startsZ,"zaxis"));else{for(var d=E[0],u=i(A),g=i(p),y=new Array(u.length*g.length),D=0,P=0;Pd&&(d=D[0]),D[1]u&&(u=D[1])}function y(D){switch(D.type){case"GeometryCollection":D.geometries.forEach(y);break;case"Point":g(D.coordinates);break;case"MultiPoint":D.coordinates.forEach(g);break}}w.arcs.forEach(function(D){for(var P=-1,z=D.length,F;++Pd&&(d=F[0]),F[1]u&&(u=F[1])});for(E in w.objects)y(w.objects[E]);return[p,b,d,u]}function e(w,A){for(var E,p=w.length,b=p-A;b<--p;)E=w[b],w[b++]=w[p],w[p]=E}function t(w,A){return typeof A=="string"&&(A=w.objects[A]),A.type==="GeometryCollection"?{type:"FeatureCollection",features:A.geometries.map(function(E){return r(w,E)})}:r(w,A)}function r(w,A){var E=A.id,p=A.bbox,b=A.properties==null?{}:A.properties,d=o(w,A);return E==null&&p==null?{type:"Feature",properties:b,geometry:d}:p==null?{type:"Feature",id:E,properties:b,geometry:d}:{type:"Feature",id:E,bbox:p,properties:b,geometry:d}}function o(w,A){var E=S(w.transform),p=w.arcs;function b(P,z){z.length&&z.pop();for(var F=p[P<0?~P:P],N=0,O=F.length;N1)p=s(w,A,E);else for(b=0,p=new Array(d=w.arcs.length);b1)for(var z=1,F=g(D[0]),N,O;zF&&(O=D[0],D[0]=D[z],D[z]=O,F=N);return D}).filter(function(y){return y.length>0})}}function c(w,A){for(var E=0,p=w.length;E>>1;w[b]=2))throw new Error("n must be \u22652");y=w.bbox||M(w);var E=y[0],p=y[1],b=y[2],d=y[3],u;A={scale:[b-E?(b-E)/(u-1):1,d-p?(d-p)/(u-1):1],translate:[E,p]}}else y=w.bbox;var g=l(A),y,D,P=w.objects,z={};function F(L){return g(L)}function N(L){var U;switch(L.type){case"GeometryCollection":U={type:"GeometryCollection",geometries:L.geometries.map(N)};break;case"Point":U={type:"Point",coordinates:F(L.coordinates)};break;case"MultiPoint":U={type:"MultiPoint",coordinates:L.coordinates.map(F)};break;default:return L}return L.id!=null&&(U.id=L.id),L.bbox!=null&&(U.bbox=L.bbox),L.properties!=null&&(U.properties=L.properties),U}function O(L){var U=0,B=1,W=L.length,$,ue=new Array(W);for(ue[0]=g(L[0],0);++U0&&(M.push(e),e=[])}return e.length>0&&M.push(e),M},Z.makeLine=function(v){return v.length===1?{type:"LineString",coordinates:v[0]}:{type:"MultiLineString",coordinates:v}},Z.makePolygon=function(v){if(v.length===1)return{type:"Polygon",coordinates:v};for(var _=new Array(v.length),S=0;Se(N,z)),F)}function r(P,z,F={}){for(let O of P){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 L=0;Lr(N,z)),F)}function a(P,z,F={}){if(P.length<2)throw new Error("coordinates must be an array of two or more positions");return S({type:"LineString",coordinates:P},z,F)}function i(P,z,F={}){return n(P.map(N=>a(N,z)),F)}function n(P,z={}){let F={type:"FeatureCollection"};return z.id&&(F.id=z.id),z.bbox&&(F.bbox=z.bbox),F.features=P,F}function s(P,z,F={}){return S({type:"MultiLineString",coordinates:P},z,F)}function h(P,z,F={}){return S({type:"MultiPoint",coordinates:P},z,F)}function f(P,z,F={}){return S({type:"MultiPolygon",coordinates:P},z,F)}function m(P,z,F={}){return S({type:"GeometryCollection",geometries:P},z,F)}function c(P,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(P*F)/F}function T(P,z="kilometers"){let F=v[z];if(!F)throw new Error(z+" units is invalid");return P*F}function l(P,z="kilometers"){let F=v[z];if(!F)throw new Error(z+" units is invalid");return P/F}function x(P,z){return E(l(P,z))}function w(P){let z=P%360;return z<0&&(z+=360),z}function A(P){return P=P%360,P>180?P-360:P<-180?P+360:P}function E(P){return P%(2*Math.PI)*180/Math.PI}function p(P){return P%360*Math.PI/180}function b(P,z="kilometers",F="kilometers"){if(!(P>=0))throw new Error("length must be a positive number");return T(l(P,z),F)}function d(P,z="meters",F="kilometers"){if(!(P>=0))throw new Error("area must be a positive number");let N=_[z];if(!N)throw new Error("invalid original units");let O=_[F];if(!O)throw new Error("invalid final units");return P/N*O}function u(P){return!isNaN(P)&&P!==null&&!Array.isArray(P)}function g(P){return P!==null&&typeof P=="object"&&!Array.isArray(P)}function y(P){if(!P)throw new Error("bbox is required");if(!Array.isArray(P))throw new Error("bbox must be an Array");if(P.length!==4&&P.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");P.forEach(z=>{if(!u(z))throw new Error("bbox must only contain numbers")})}function D(P){if(!P)throw new Error("id is required");if(["string","number"].indexOf(typeof P)===-1)throw new Error("id must be a number or a string")}Z.areaFactors=_,Z.azimuthToBearing=A,Z.bearingToAzimuth=w,Z.convertArea=d,Z.convertLength=b,Z.degreesToRadians=p,Z.earthRadius=q,Z.factors=v,Z.feature=S,Z.featureCollection=n,Z.geometry=M,Z.geometryCollection=m,Z.isNumber=u,Z.isObject=g,Z.lengthToDegrees=x,Z.lengthToRadians=l,Z.lineString=a,Z.lineStrings=i,Z.multiLineString=s,Z.multiPoint=h,Z.multiPolygon=f,Z.point=e,Z.points=t,Z.polygon=r,Z.polygons=o,Z.radiansToDegrees=E,Z.radiansToLength=T,Z.round=c,Z.validateBBox=y,Z.validateId=D}}),sT=He({"node_modules/@turf/meta/dist/cjs/index.cjs"(Z){"use strict";Object.defineProperty(Z,"__esModule",{value:!0});var q=oT();function v(l,x,w){if(l!==null)for(var A,E,p,b,d,u,g,y=0,D=0,P,z=l.type,F=z==="FeatureCollection",N=z==="Feature",O=F?l.features.length:1,L=0;Lu||F>g||N>y){d=D,u=A,g=F,y=N,p=0;return}var O=q.lineString.call(void 0,[d,D],w.properties);if(x(O,A,E,N,p)===!1)return!1;p++,d=D})===!1)return!1}}})}function h(l,x,w){var A=w,E=!1;return s(l,function(p,b,d,u,g){E===!1&&w===void 0?A=p:A=x(A,p,b,d,u,g),E=!0}),A}function f(l,x){if(!l)throw new Error("geojson is required");i(l,function(w,A,E){if(w.geometry!==null){var p=w.geometry.type,b=w.geometry.coordinates;switch(p){case"LineString":if(x(w,A,E,0,0)===!1)return!1;break;case"Polygon":for(var d=0;di+S(n),0)}function S(a){let i=0,n;switch(a.type){case"Polygon":return M(a.coordinates);case"MultiPolygon":for(n=0;n0){i+=Math.abs(r(a[0]));for(let n=1;n=i?(s+2)%i:s+2],c=h[0]*t,T=f[1]*t,l=m[0]*t;n+=(l-c)*Math.sin(T),s++}return n*e}var o=_;Z.area=_,Z.default=o}}),FU=He({"node_modules/@turf/centroid/dist/cjs/index.cjs"(Z){"use strict";Object.defineProperty(Z,"__esModule",{value:!0});var q=oT(),v=sT();function _(M,e={}){let t=0,r=0,o=0;return v.coordEach.call(void 0,M,function(a){t+=a[0],r+=a[1],o++},!0),q.point.call(void 0,[t/o,r/o],e.properties)}var S=_;Z.centroid=_,Z.default=S}}),OU=He({"node_modules/@turf/bbox/dist/cjs/index.cjs"(Z){"use strict";Object.defineProperty(Z,"__esModule",{value:!0});var q=sT();function v(S,M={}){if(S.bbox!=null&&M.recompute!==!0)return S.bbox;let e=[1/0,1/0,-1/0,-1/0];return q.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&&y[D+1][0]<0)return D;return null}function w(y){var D=y.geometry,P=D.coordinates,z=y.id,F=[],N,O,L,U;switch(z==="RUS"||z==="FJI"?N=function(B){var W;if(x(B)===null)W=B;else for(W=new Array(B.length),U=0;UW?$[ue++]=[B[U][0]+l,B[U][1]]:U===W?($[ue++]=B[U],$[ue++]=[B[U][0],-90]):$[ue++]=B[U];var ce=i.tester($);ce.pts.pop(),F.push(ce)}:N=function(B){F.push(i.tester(B))},D.type){case"MultiPolygon":for(O=0;O0?de.properties.ct=p(de):de.properties.ct=[NaN,NaN],ue.fIn=W,ue.fOut=de,F.push(de)}else r.log(["Location",ue.loc,"does not have a valid GeoJSON geometry.","Traces with locationmode *geojson-id* only support","*Polygon* and *MultiPolygon* geometries."].join(" "))}delete z[$]}switch(P.type){case"FeatureCollection":var U=P.features;for(N=0;NF&&(F=L,P=O)}else P=D;return M(P).geometry.coordinates}function b(y){var D=window.PlotlyGeoAssets||{},P=[];function z(U){return new Promise(function(B,W){v.json(U,function($,ue){if($){delete D[U];var ce=$.status===404?'GeoJSON at URL "'+U+'" does not exist.':"Unexpected error while fetching from "+U;return W(new Error(ce))}return D[U]=ue,B(ue)})})}function F(U){return new Promise(function(B,W){var $=0,ue=setInterval(function(){if(D[U]&&D[U]!=="pending")return clearInterval(ue),B(D[U]);if($>100)return clearInterval(ue),W("Unexpected error while fetching from "+U);$++},50)})}for(var N=0;NL-U);if(D.length<2)return null;let P=D.length,z=D[P-1]-D[0];if(z>=360)return null;let F=-1/0,N=-1;for(let L=0;LF&&(F=U,N=L)}let O=360-z;return F<=O?null:[D[N+1],D[N]+l]}function g([y,D]){return[y,y>0&&D<0?D+l:D]}q.exports={locationToFeature:T,feature2polygons:w,getTraceGeojson:A,extractTraceFeature:E,fetchTraceGeoData:b,computeBbox:d,doesCrossAntiMeridian:x,getFitboundsLonRange:u,unwrapLonRange:g,ANTIMERIDIAN_LON_SHIFT:l}}}),RE=He({"src/traces/scattergeo/style.js"(Z,q){"use strict";var v=Vn(),_=as(),S=$n(),M=Qp(),e=M.stylePoints,t=M.styleText;q.exports=function(a,i){i&&r(a,i)};function r(o,a){var i=a[0].trace,n=a[0].node3;n.style("opacity",a[0].trace.opacity),e(n,i,o),t(n,i,o),n.selectAll("path.js-line").style("fill","none").each(function(s){var h=v.select(this),f=s.trace,m=f.line||{};h.call(S.stroke,m.color).call(_.dashLine,m.dash||"",m.width||0),f.fill!=="none"&&h.call(S.fill,f.fillcolor)})}}}),DE=He({"src/traces/scattergeo/plot.js"(Z,q){"use strict";var v=Vn(),_=sa(),S=nT().getTopojsonFeatures,M=g0(),e=Ev(),t=Yd().findExtremes,r=Gs().BADNUM,o=Bd().calcMarkerSize,a=Fu(),i=RE();function n(h,f,m){var c=f.layers.frontplot.select(".scatterlayer"),T=_.makeTraceGroups(c,m,"trace scattergeo");function l(x,w){x.lonlat[0]===r&&v.select(w).remove()}T.selectAll("*").remove(),T.each(function(x){var w=v.select(this),A=x[0].trace;if(a.hasLines(A)||A.fill!=="none"){var E=M.calcTraceToLineCoords(x),p=A.fill!=="none"?M.makePolygon(E):M.makeLine(E);w.selectAll("path.js-line").data([{geojson:p,trace:A}]).enter().append("path").classed("js-line",!0).style("stroke-miterlimit",2)}a.hasMarkers(A)&&w.selectAll("path.point").data(_.identity).enter().append("path").classed("point",!0).each(function(b){l(b,this)}),a.hasText(A)&&w.selectAll("g").data(_.identity).enter().append("g").append("text").each(function(b){l(b,this)}),i(h,x)})}function s(h,f){var m=h[0].trace,c=f[m.geo],T=c._subplot,l=m._length,x,w;if(_.isArrayOrTypedArray(m.locations)){var A=m.locationmode,E=A==="geojson-id"?e.extractTraceFeature(h):S(m,T.topojson);for(x=0;x")}}}),UU=He({"src/traces/scattergeo/event_data.js"(Z,q){"use strict";q.exports=function(_,S,M,e,t){_.lon=S.lon,_.lat=S.lat,_.location=S.loc?S.loc:null;var r=e[t];return r.fIn&&r.fIn.properties&&(_.properties=r.fIn.properties),_}}}),jU=He({"src/traces/scattergeo/select.js"(Z,q){"use strict";var v=Fu(),_=Gs().BADNUM;q.exports=function(M,e){var t=M.cd,r=M.xaxis,o=M.yaxis,a=[],i=t[0].trace,n,s,h,f,m,c=!v.hasMarkers(i)&&!v.hasText(i);if(c)return[];if(e===!1)for(m=0;mV?1:Q>=V?0:NaN}function S(Q){return Q.length===1&&(Q=M(Q)),{left:function(V,le,ae,j){for(ae==null&&(ae=0),j==null&&(j=V.length);ae>>1;Q(V[ee],le)<0?ae=ee+1:j=ee}return ae},right:function(V,le,ae,j){for(ae==null&&(ae=0),j==null&&(j=V.length);ae>>1;Q(V[ee],le)>0?j=ee:ae=ee+1}return ae}}}function M(Q){return function(V,le){return _(Q(V),le)}}var e=S(_),t=e.right,r=e.left;function o(Q,V){V==null&&(V=a);for(var le=0,ae=Q.length-1,j=Q[0],ee=new Array(ae<0?0:ae);leQ?1:V>=Q?0:NaN}function s(Q){return Q===null?NaN:+Q}function h(Q,V){var le=Q.length,ae=0,j=-1,ee=0,te,pe,we=0;if(V==null)for(;++j1)return we/(ae-1)}function f(Q,V){var le=h(Q,V);return le&&Math.sqrt(le)}function m(Q,V){var le=Q.length,ae=-1,j,ee,te;if(V==null){for(;++ae=j)for(ee=te=j;++aej&&(ee=j),te=j)for(ee=te=j;++aej&&(ee=j),te0)return[Q];if((ae=V0)for(Q=Math.ceil(Q/pe),V=Math.floor(V/pe),te=new Array(ee=Math.ceil(V-Q+1));++j=0?(ee>=E?10:ee>=p?5:ee>=b?2:1)*Math.pow(10,j):-Math.pow(10,-j)/(ee>=E?10:ee>=p?5:ee>=b?2:1)}function g(Q,V,le){var ae=Math.abs(V-Q)/Math.max(0,le),j=Math.pow(10,Math.floor(Math.log(ae)/Math.LN10)),ee=ae/j;return ee>=E?j*=10:ee>=p?j*=5:ee>=b&&(j*=2),VPe;)je.pop(),--at;var nt=new Array(at+1),tt;for(ee=0;ee<=at;++ee)tt=nt[ee]=[],tt.x0=ee>0?je[ee-1]:Re,tt.x1=ee=1)return+le(Q[ae-1],ae-1,Q);var ae,j=(ae-1)*V,ee=Math.floor(j),te=+le(Q[ee],ee,Q),pe=+le(Q[ee+1],ee+1,Q);return te+(pe-te)*(j-ee)}}function z(Q,V,le){return Q=l.call(Q,s).sort(_),Math.ceil((le-V)/(2*(P(Q,.75)-P(Q,.25))*Math.pow(Q.length,-1/3)))}function F(Q,V,le){return Math.ceil((le-V)/(3.5*f(Q)*Math.pow(Q.length,-1/3)))}function N(Q,V){var le=Q.length,ae=-1,j,ee;if(V==null){for(;++ae=j)for(ee=j;++aeee&&(ee=j)}else for(;++ae=j)for(ee=j;++aeee&&(ee=j);return ee}function O(Q,V){var le=Q.length,ae=le,j=-1,ee,te=0;if(V==null)for(;++j=0;)for(te=Q[V],le=te.length;--le>=0;)ee[--j]=te[le];return ee}function B(Q,V){var le=Q.length,ae=-1,j,ee;if(V==null){for(;++ae=j)for(ee=j;++aej&&(ee=j)}else for(;++ae=j)for(ee=j;++aej&&(ee=j);return ee}function W(Q,V){for(var le=V.length,ae=new Array(le);le--;)ae[le]=Q[V[le]];return ae}function $(Q,V){if(le=Q.length){var le,ae=0,j=0,ee,te=Q[j];for(V==null&&(V=_);++ae0?1:Qt<0?-1:0},d=Math.sqrt,u=Math.tan;function g(Qt){return Qt>1?0:Qt<-1?a:Math.acos(Qt)}function y(Qt){return Qt>1?i:Qt<-1?-i:Math.asin(Qt)}function D(Qt){return(Qt=p(Qt/2))*Qt}function P(){}function z(Qt,xr){Qt&&N.hasOwnProperty(Qt.type)&&N[Qt.type](Qt,xr)}var F={Feature:function(Qt,xr){z(Qt.geometry,xr)},FeatureCollection:function(Qt,xr){for(var aa=Qt.features,$r=-1,ka=aa.length;++$r=0?1:-1,ka=$r*aa,li=l(xr),Ci=p(xr),Hi=Y*Ci,Qi=de*li+Hi*l(ka),pn=Hi*$r*p(ka);B.add(T(pn,Qi)),ce=Qt,de=li,Y=Ci}function j(Qt){return W.reset(),U(Qt,X),W*2}function ee(Qt){return[T(Qt[1],Qt[0]),y(Qt[2])]}function te(Qt){var xr=Qt[0],aa=Qt[1],$r=l(aa);return[$r*l(xr),$r*p(xr),p(aa)]}function pe(Qt,xr){return Qt[0]*xr[0]+Qt[1]*xr[1]+Qt[2]*xr[2]}function we(Qt,xr){return[Qt[1]*xr[2]-Qt[2]*xr[1],Qt[2]*xr[0]-Qt[0]*xr[2],Qt[0]*xr[1]-Qt[1]*xr[0]]}function Se(Qt,xr){Qt[0]+=xr[0],Qt[1]+=xr[1],Qt[2]+=xr[2]}function Re(Qt,xr){return[Qt[0]*xr,Qt[1]*xr,Qt[2]*xr]}function Pe(Qt){var xr=d(Qt[0]*Qt[0]+Qt[1]*Qt[1]+Qt[2]*Qt[2]);Qt[0]/=xr,Qt[1]/=xr,Qt[2]/=xr}var je,at,nt,tt,Ve,he,se,ne,Ce=S(),Ze,rt,Je={point:St,lineStart:Bt,lineEnd:Vt,polygonStart:function(){Je.point=Ar,Je.lineStart=vr,Je.lineEnd=qr,Ce.reset(),X.polygonStart()},polygonEnd:function(){X.polygonEnd(),Je.point=St,Je.lineStart=Bt,Je.lineEnd=Vt,B<0?(je=-(nt=180),at=-(tt=90)):Ce>r?tt=90:Ce<-r&&(at=-90),rt[0]=je,rt[1]=nt},sphere:function(){je=-(nt=180),at=-(tt=90)}};function St(Qt,xr){Ze.push(rt=[je=Qt,nt=Qt]),xrtt&&(tt=xr)}function kt(Qt,xr){var aa=te([Qt*f,xr*f]);if(ne){var $r=we(ne,aa),ka=[$r[1],-$r[0],0],li=we(ka,$r);Pe(li),li=ee(li);var Ci=Qt-Ve,Hi=Ci>0?1:-1,Qi=li[0]*h*Hi,pn,Pi=m(Ci)>180;Pi^(Hi*Vett&&(tt=pn)):(Qi=(Qi+360)%360-180,Pi^(Hi*Vett&&(tt=xr))),Pi?Qtkr(je,nt)&&(nt=Qt):kr(Qt,nt)>kr(je,nt)&&(je=Qt):nt>=je?(Qtnt&&(nt=Qt)):Qt>Ve?kr(je,Qt)>kr(je,nt)&&(nt=Qt):kr(Qt,nt)>kr(je,nt)&&(je=Qt)}else Ze.push(rt=[je=Qt,nt=Qt]);xrtt&&(tt=xr),ne=aa,Ve=Qt}function Bt(){Je.point=kt}function Vt(){rt[0]=je,rt[1]=nt,Je.point=St,ne=null}function Ar(Qt,xr){if(ne){var aa=Qt-Ve;Ce.add(m(aa)>180?aa+(aa>0?360:-360):aa)}else he=Qt,se=xr;X.point(Qt,xr),kt(Qt,xr)}function vr(){X.lineStart()}function qr(){Ar(he,se),X.lineEnd(),m(Ce)>r&&(je=-(nt=180)),rt[0]=je,rt[1]=nt,ne=null}function kr(Qt,xr){return(xr-=Qt)<0?xr+360:xr}function Ur(Qt,xr){return Qt[0]-xr[0]}function _t(Qt,xr){return Qt[0]<=Qt[1]?Qt[0]<=xr&&xr<=Qt[1]:xrkr($r[0],$r[1])&&($r[1]=ka[1]),kr(ka[0],$r[1])>kr($r[0],$r[1])&&($r[0]=ka[0])):li.push($r=ka);for(Ci=-1/0,aa=li.length-1,xr=0,$r=li[aa];xr<=aa;$r=ka,++xr)ka=li[xr],(Hi=kr($r[1],ka[0]))>Ci&&(Ci=Hi,je=ka[0],nt=$r[1])}return Ze=rt=null,je===1/0||at===1/0?[[NaN,NaN],[NaN,NaN]]:[[je,at],[nt,tt]]}var Ye,Ae,Le,We,Ke,st,ot,Ut,Ct,Pt,jt,cr,or,nr,Pr,_a,Fa={sphere:P,point:Ra,lineStart:Wa,lineEnd:wi,polygonStart:function(){Fa.lineStart=Yt,Fa.lineEnd=Rt},polygonEnd:function(){Fa.lineStart=Wa,Fa.lineEnd=wi}};function Ra(Qt,xr){Qt*=f,xr*=f;var aa=l(xr);qa(aa*l(Qt),aa*p(Qt),p(xr))}function qa(Qt,xr,aa){++Ye,Le+=(Qt-Le)/Ye,We+=(xr-We)/Ye,Ke+=(aa-Ke)/Ye}function Wa(){Fa.point=Ca}function Ca(Qt,xr){Qt*=f,xr*=f;var aa=l(xr);nr=aa*l(Qt),Pr=aa*p(Qt),_a=p(xr),Fa.point=hi,qa(nr,Pr,_a)}function hi(Qt,xr){Qt*=f,xr*=f;var aa=l(xr),$r=aa*l(Qt),ka=aa*p(Qt),li=p(xr),Ci=T(d((Ci=Pr*li-_a*ka)*Ci+(Ci=_a*$r-nr*li)*Ci+(Ci=nr*ka-Pr*$r)*Ci),nr*$r+Pr*ka+_a*li);Ae+=Ci,st+=Ci*(nr+(nr=$r)),ot+=Ci*(Pr+(Pr=ka)),Ut+=Ci*(_a+(_a=li)),qa(nr,Pr,_a)}function wi(){Fa.point=Ra}function Yt(){Fa.point=Zt}function Rt(){Jt(cr,or),Fa.point=Ra}function Zt(Qt,xr){cr=Qt,or=xr,Qt*=f,xr*=f,Fa.point=Jt;var aa=l(xr);nr=aa*l(Qt),Pr=aa*p(Qt),_a=p(xr),qa(nr,Pr,_a)}function Jt(Qt,xr){Qt*=f,xr*=f;var aa=l(xr),$r=aa*l(Qt),ka=aa*p(Qt),li=p(xr),Ci=Pr*li-_a*ka,Hi=_a*$r-nr*li,Qi=nr*ka-Pr*$r,pn=d(Ci*Ci+Hi*Hi+Qi*Qi),Pi=y(pn),Di=pn&&-Pi/pn;Ct+=Di*Ci,Pt+=Di*Hi,jt+=Di*Qi,Ae+=Pi,st+=Pi*(nr+(nr=$r)),ot+=Pi*(Pr+(Pr=ka)),Ut+=Pi*(_a+(_a=li)),qa(nr,Pr,_a)}function Fr(Qt){Ye=Ae=Le=We=Ke=st=ot=Ut=Ct=Pt=jt=0,U(Qt,Fa);var xr=Ct,aa=Pt,$r=jt,ka=xr*xr+aa*aa+$r*$r;return kaa?Qt+Math.round(-Qt/s)*s:Qt,xr]}ca.invert=ca;function Ba(Qt,xr,aa){return(Qt%=s)?xr||aa?ra(Za(Qt),ri(xr,aa)):Za(Qt):xr||aa?ri(xr,aa):ca}function $a(Qt){return function(xr,aa){return xr+=Qt,[xr>a?xr-s:xr<-a?xr+s:xr,aa]}}function Za(Qt){var xr=$a(Qt);return xr.invert=$a(-Qt),xr}function ri(Qt,xr){var aa=l(Qt),$r=p(Qt),ka=l(xr),li=p(xr);function Ci(Hi,Qi){var pn=l(Qi),Pi=l(Hi)*pn,Di=p(Hi)*pn,Ni=p(Qi),mi=Ni*aa+Pi*$r;return[T(Di*ka-mi*li,Pi*aa-Ni*$r),y(mi*ka+Di*li)]}return Ci.invert=function(Hi,Qi){var pn=l(Qi),Pi=l(Hi)*pn,Di=p(Hi)*pn,Ni=p(Qi),mi=Ni*ka-Di*li;return[T(Di*ka+Ni*li,Pi*aa+mi*$r),y(mi*aa-Pi*$r)]},Ci}function pi(Qt){Qt=Ba(Qt[0]*f,Qt[1]*f,Qt.length>2?Qt[2]*f:0);function xr(aa){return aa=Qt(aa[0]*f,aa[1]*f),aa[0]*=h,aa[1]*=h,aa}return xr.invert=function(aa){return aa=Qt.invert(aa[0]*f,aa[1]*f),aa[0]*=h,aa[1]*=h,aa},xr}function Ia(Qt,xr,aa,$r,ka,li){if(aa){var Ci=l(xr),Hi=p(xr),Qi=$r*aa;ka==null?(ka=xr+$r*s,li=xr-Qi/2):(ka=rn(Ci,ka),li=rn(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=[],xr=null,aa}}}function xt(Qt,xr){return m(Qt[0]-xr[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(xr=Qt.length){for(var xr,aa=0,$r=Qt[0],ka;++aa=0?1:-1,Ns=rl*ks,el=Ns>a,Ss=Qn*yo;if(wr.add(T(Ss*rl*p(Ns),io*Qo+Ss*l(Ns))),Ci+=el?ks+rl*s:ks,el^mi>=aa^Tn>=aa){var Fl=we(te(Ni),te(co));Pe(Fl);var yl=we(li,Fl);Pe(yl);var ll=(el^ks>=0?-1:1)*y(yl[2]);($r>ll||$r===ll&&(Fl[0]||Fl[1]))&&(Hi+=el^ks>=0?1:-1)}}return(Ci<-r||Ci0){for(Qi||(ka.polygonStart(),Qi=!0),ka.lineStart(),Qo=0;Qo1&&un&2&&yo.push(yo.pop().concat(yo.shift())),Pi.push(yo.filter(gt))}}return Ni}}function gt(Qt){return Qt.length>1}function Kt(Qt,xr){return((Qt=Qt.x)[0]<0?Qt[1]-i-r:i-Qt[1])-((xr=xr.x)[0]<0?xr[1]-i-r:i-xr[1])}var mr=Hr(function(){return!0},Ir,Pa,[-a,-i]);function Ir(Qt){var xr=NaN,aa=NaN,$r=NaN,ka;return{lineStart:function(){Qt.lineStart(),ka=1},point:function(li,Ci){var Hi=li>0?a:-a,Qi=m(li-xr);m(Qi-a)0?i:-i),Qt.point($r,aa),Qt.lineEnd(),Qt.lineStart(),Qt.point(Hi,aa),Qt.point(li,aa),ka=0):$r!==Hi&&Qi>=a&&(m(xr-$r)r?c((p(xr)*(li=l($r))*p(aa)-p($r)*(ka=l(xr))*p(Qt))/(ka*li*Ci)):(xr+$r)/2}function Pa(Qt,xr,aa,$r){var ka;if(Qt==null)ka=aa*i,$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(m(Qt[0]-xr[0])>r){var li=Qt[0]0,ka=m(xr)>r;function li(Pi,Di,Ni,mi){Ia(mi,Qt,aa,Ni,Pi,Di)}function Ci(Pi,Di){return l(Pi)*l(Di)>xr}function Hi(Pi){var Di,Ni,mi,Sn,Qn;return{lineStart:function(){Sn=mi=!1,Qn=1},point:function(io,eo){var co=[io,eo],Tn,un=Ci(io,eo),yo=$r?un?0:pn(io,eo):un?pn(io+(io<0?a:-a),eo):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)Qn=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 Qo;!(yo&Ni)&&(Qo=Qi(co,Di,!0))&&(Qn=0,$r?(Pi.lineStart(),Pi.point(Qo[0][0],Qo[0][1]),Pi.point(Qo[1][0],Qo[1][1]),Pi.lineEnd()):(Pi.point(Qo[1][0],Qo[1][1]),Pi.lineEnd(),Pi.lineStart(),Pi.point(Qo[0][0],Qo[0][1],3)))}un&&(!Di||!xt(Di,co))&&Pi.point(co[0],co[1]),Di=co,mi=un,Ni=yo},lineEnd:function(){mi&&Pi.lineEnd(),Di=null},clean:function(){return Qn|(Sn&&mi)<<1}}}function Qi(Pi,Di,Ni){var mi=te(Pi),Sn=te(Di),Qn=[1,0,0],io=we(mi,Sn),eo=pe(io,io),co=io[0],Tn=eo-co*co;if(!Tn)return!Ni&Πvar un=xr*eo/Tn,yo=-xr*co/Tn,Qo=we(Qn,io),ks=Re(Qn,un),rl=Re(io,yo);Se(ks,rl);var Ns=Qo,el=pe(ks,Ns),Ss=pe(Ns,Ns),Fl=el*el-Ss*(pe(ks,ks)-1);if(!(Fl<0)){var yl=d(Fl),ll=Re(Ns,(-el-yl)/Ss);if(Se(ll,ks),ll=ee(ll),!Ni)return ll;var Un=Pi[0],Ro=Di[0],Js=Pi[1],Fs=Di[1],cu;Ro0^ll[1]<(m(ll[0]-Un)a^(Un<=ll[0]&&ll[0]<=Ro)){var bu=Re(Ns,(-el+yl)/Ss);return Se(bu,ks),[ll,ee(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,xr,aa,$r,ka,li){var Ci=Qt[0],Hi=Qt[1],Qi=xr[0],pn=xr[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&&(xr[0]=Ci+Di*Ni,xr[1]=Hi+Di*mi),!0}}}}}var ba=1e9,Ai=-ba;function ki(Qt,xr,aa,$r){function ka(pn,Pi){return Qt<=pn&&pn<=aa&&xr<=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:xr);while((mi=(mi+Di+4)%4)!==Sn);else Ni.point(Pi[0],Pi[1])}function Ci(pn,Pi){return m(pn[0]-Qt)0?0:3:m(pn[0]-aa)0?2:1:m(pn[1]-xr)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=cn(),Ni,mi,Sn,Qn,io,eo,co,Tn,un,yo,Qo,ks={point:rl,lineStart:Fl,lineEnd:yl,polygonStart:el,polygonEnd:Ss};function rl(Un,Ro){ka(Un,Ro)&&Pi.point(Un,Ro)}function Ns(){for(var Un=0,Ro=0,Js=mi.length;Ro$r&&(Rc-Ic)*($r-bu)>(Au-bu)*(Qt-Ic)&&++Un:Au<=$r&&(Rc-Ic)*($r-bu)<(Au-bu)*(Qt-Ic)&&--Un;return Un}function el(){Pi=Di,Ni=[],mi=[],Qo=!0}function Ss(){var Un=Ns(),Ro=Qo&&Un,Js=(Ni=_.merge(Ni)).length;(Ro||Js)&&(pn.polygonStart(),Ro&&(pn.lineStart(),li(null,null,1,pn),pn.lineEnd()),Js&&Or(Ni,Hi,Un,li,pn),pn.polygonEnd()),Pi=pn,Ni=mi=Sn=null}function Fl(){ks.point=ll,mi&&mi.push(Sn=[]),yo=!0,un=!1,co=Tn=NaN}function yl(){Ni&&(ll(Qn,io),eo&&un&&Di.rejoin(),Ni.push(Di.result())),ks.point=rl,un&&Pi.lineEnd()}function ll(Un,Ro){var Js=ka(Un,Ro);if(mi&&Sn.push([Un,Ro]),yo)Qn=Un,io=Ro,eo=Js,yo=!1,Js&&(Pi.lineStart(),Pi.point(Un,Ro));else if(Js&&un)Pi.point(Un,Ro);else{var Fs=[co=Math.max(Ai,Math.min(ba,co)),Tn=Math.max(Ai,Math.min(ba,Tn))],cu=[Un=Math.max(Ai,Math.min(ba,Un)),Ro=Math.max(Ai,Math.min(ba,Ro))];la(Fs,cu,Qt,xr,aa,$r)?(un||(Pi.lineStart(),Pi.point(Fs[0],Fs[1])),Pi.point(cu[0],cu[1]),Js||Pi.lineEnd(),Qo=!1):Js&&(Pi.lineStart(),Pi.point(Un,Ro),Qo=!1)}co=Un,Tn=Ro,un=Js}return ks}}function Ki(){var Qt=0,xr=0,aa=960,$r=500,ka,li,Ci;return Ci={stream:function(Hi){return ka&&li===Hi?ka:ka=ki(Qt,xr,aa,$r)(li=Hi)},extent:function(Hi){return arguments.length?(Qt=+Hi[0][0],xr=+Hi[0][1],aa=+Hi[1][0],$r=+Hi[1][1],ka=li=null,Ci):[[Qt,xr],[aa,$r]]}}}var Mn=S(),wn,On,En,ao={sphere:P,point:P,lineStart:Co,lineEnd:P,polygonStart:P,polygonEnd:P};function Co(){ao.point=zs,ao.lineEnd=bo}function bo(){ao.point=ao.lineEnd=P}function zs(Qt,xr){Qt*=f,xr*=f,wn=Qt,On=p(xr),En=l(xr),ao.point=kn}function kn(Qt,xr){Qt*=f,xr*=f;var aa=p(xr),$r=l(xr),ka=m(Qt-wn),li=l(ka),Ci=p(ka),Hi=$r*Ci,Qi=En*aa-On*$r*li,pn=On*aa+En*$r*li;Mn.add(T(d(Hi*Hi+Qi*Qi),pn)),wn=Qt,On=aa,En=$r}function wo(Qt){return Mn.reset(),U(Qt,ao),+Mn}var Zn=[null,null],go={type:"LineString",coordinates:Zn};function os(Qt,xr){return Zn[0]=Qt,Zn[1]=xr,wo(go)}var ys={Feature:function(Qt,xr){return Yn(Qt.geometry,xr)},FeatureCollection:function(Qt,xr){for(var aa=Qt.features,$r=-1,ka=aa.length;++$r0&&(ka=os(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(_.range(x(li/pn)*pn,ka,pn).filter(function(Tn){return m(Tn%Di)>r}).map(mi))}return eo.lines=function(){return co().map(function(Tn){return{type:"LineString",coordinates:Tn}})},eo.outline=function(){return{type:"Polygon",coordinates:[Sn($r).concat(Qn(Ci).slice(1),Sn(aa).reverse().slice(1),Qn(Hi).reverse().slice(1))]}},eo.extent=function(Tn){return arguments.length?eo.extentMajor(Tn).extentMinor(Tn):eo.extentMinor()},eo.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),eo.precision(io)):[[$r,Hi],[aa,Ci]]},eo.extentMinor=function(Tn){return arguments.length?(xr=+Tn[0][0],Qt=+Tn[1][0],li=+Tn[0][1],ka=+Tn[1][1],xr>Qt&&(Tn=xr,xr=Qt,Qt=Tn),li>ka&&(Tn=li,li=ka,ka=Tn),eo.precision(io)):[[xr,li],[Qt,ka]]},eo.step=function(Tn){return arguments.length?eo.stepMajor(Tn).stepMinor(Tn):eo.stepMinor()},eo.stepMajor=function(Tn){return arguments.length?(Pi=+Tn[0],Di=+Tn[1],eo):[Pi,Di]},eo.stepMinor=function(Tn){return arguments.length?(Qi=+Tn[0],pn=+Tn[1],eo):[Qi,pn]},eo.precision=function(Tn){return arguments.length?(io=+Tn,Ni=Gi(li,ka,90),mi=Pn(xr,Qt,io),Sn=Gi(Hi,Ci,90),Qn=Pn($r,aa,io),eo):io},eo.extentMajor([[-180,-90+r],[180,90-r]]).extentMinor([[-180,-80-r],[180,80+r]])}function bs(){return qs()()}function lo(Qt,xr){var aa=Qt[0]*f,$r=Qt[1]*f,ka=xr[0]*f,li=xr[1]*f,Ci=l($r),Hi=p($r),Qi=l(li),pn=p(li),Pi=Ci*l(aa),Di=Ci*p(aa),Ni=Qi*l(ka),mi=Qi*p(ka),Sn=2*y(d(D(li-$r)+Ci*Qi*D(ka-aa))),Qn=p(Sn),io=Sn?function(eo){var co=p(eo*=Sn)/Qn,Tn=p(Sn-eo)/Qn,un=Tn*Pi+co*Ni,yo=Tn*Di+co*mi,Qo=Tn*Hi+co*pn;return[T(yo,un)*h,T(Qo,d(un*un+yo*yo))*h]}:function(){return[aa*h,$r*h]};return io.distance=Sn,io}function Zo(Qt){return Qt}var ws=S(),Hs=S(),il,yn,Po,To,Ws={point:P,lineStart:P,lineEnd:P,polygonStart:function(){Ws.lineStart=Ll,Ws.lineEnd=Ks},polygonEnd:function(){Ws.lineStart=Ws.lineEnd=Ws.point=P,ws.add(m(Hs)),Hs.reset()},result:function(){var Qt=ws/2;return ws.reset(),Qt}};function Ll(){Ws.point=uo}function uo(Qt,xr){Ws.point=Nl,il=Po=Qt,yn=To=xr}function Nl(Qt,xr){Hs.add(To*Qt-Po*xr),Po=Qt,To=xr}function Ks(){Nl(il,yn)}var Ts=1/0,Ls=Ts,Jo=-Ts,Es=Jo,Ul={point:lu,lineStart:P,lineEnd:P,polygonStart:P,polygonEnd:P,result:function(){var Qt=[[Ts,Ls],[Jo,Es]];return Jo=Es=-(Ls=Ts=1/0),Qt}};function lu(Qt,xr){QtJo&&(Jo=Qt),xrEs&&(Es=xr)}var Tc=0,du=0,Sf=0,Uc=0,Bs=0,dc=0,Wc=0,uu=0,Pl=0,ic,Ou,nl,vl,As={point:Xs,lineStart:nc,lineEnd:fl,polygonStart:function(){As.lineStart=xh,As.lineEnd=us},polygonEnd:function(){As.point=Xs,As.lineStart=nc,As.lineEnd=fl},result:function(){var Qt=Pl?[Wc/Pl,uu/Pl]:dc?[Uc/dc,Bs/dc]:Sf?[Tc/Sf,du/Sf]:[NaN,NaN];return Tc=du=Sf=Uc=Bs=dc=Wc=uu=Pl=0,Qt}};function Xs(Qt,xr){Tc+=Qt,du+=xr,++Sf}function nc(){As.point=jl}function jl(Qt,xr){As.point=qu,Xs(nl=Qt,vl=xr)}function qu(Qt,xr){var aa=Qt-nl,$r=xr-vl,ka=d(aa*aa+$r*$r);Uc+=ka*(nl+Qt)/2,Bs+=ka*(vl+xr)/2,dc+=ka,Xs(nl=Qt,vl=xr)}function fl(){As.point=Xs}function xh(){As.point=bh}function us(){Ps(ic,Ou)}function bh(Qt,xr){As.point=Ps,Xs(ic=nl=Qt,Ou=vl=xr)}function Ps(Qt,xr){var aa=Qt-nl,$r=xr-vl,ka=d(aa*aa+$r*$r);Uc+=ka*(nl+Qt)/2,Bs+=ka*(vl+xr)/2,dc+=ka,ka=vl*Qt-nl*xr,Wc+=ka*(nl+Qt),uu+=ka*(vl+xr),Pl+=ka*3,Xs(nl=Qt,vl=xr)}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,xr){switch(this._point){case 0:{this._context.moveTo(Qt,xr),this._point=1;break}case 1:{this._context.lineTo(Qt,xr);break}default:{this._context.moveTo(Qt+this._radius,xr),this._context.arc(Qt,xr,this._radius,0,s);break}}},result:P};var Xc=S(),Vu,ql,Mf,Ac,nf,Ql={point:P,lineStart:function(){Ql.point=Jf},lineEnd:function(){Vu&&Of(ql,Mf),Ql.point=P},polygonStart:function(){Vu=!0},polygonEnd:function(){Vu=null},result:function(){var Qt=+Xc;return Xc.reset(),Qt}};function Jf(Qt,xr){Ql.point=Of,ql=Ac=Qt,Mf=nf=xr}function Of(Qt,xr){Ac-=Qt,nf-=xr,Xc.add(d(Ac*Ac+nf*nf)),Ac=Qt,nf=xr}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,xr){switch(this._point){case 0:{this._string.push("M",Qt,",",xr),this._point=1;break}case 1:{this._string.push("L",Qt,",",xr);break}default:{this._circle==null&&(this._circle=jc(this._radius)),this._string.push("M",Qt,",",xr,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,xr){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(Ws)),Ws.result()},li.measure=function(Ci){return U(Ci,$r(Ql)),Ql.result()},li.bounds=function(Ci){return U(Ci,$r(Ul)),Ul.result()},li.centroid=function(Ci){return U(Ci,$r(As)),As.result()},li.projection=function(Ci){return arguments.length?($r=Ci==null?(Qt=null,Zo):(Qt=Ci).stream,li):Qt},li.context=function(Ci){return arguments.length?(ka=Ci==null?(xr=null,new of):new to(xr=Ci),typeof aa!="function"&&ka.pointRadius(aa),li):xr},li.pointRadius=function(Ci){return arguments.length?(aa=typeof Ci=="function"?Ci:(ka.pointRadius(+Ci),+Ci),li):aa},li.projection(Qt).context(xr)}function Nf(Qt){return{stream:Gu(Qt)}}function Gu(Qt){return function(xr){var aa=new Ef;for(var $r in Qt)aa[$r]=Qt[$r];return aa.stream=xr,aa}}function Ef(){}Ef.prototype={constructor:Ef,point:function(Qt,xr){this.stream.point(Qt,xr)},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,xr,aa){var $r=Qt.clipExtent&&Qt.clipExtent();return Qt.scale(150).translate([0,0]),$r!=null&&Qt.clipExtent(null),U(aa,Qt.stream(Ul)),xr(Ul.result()),$r!=null&&Qt.clipExtent($r),Qt}function Zc(Qt,xr,aa){return oc(Qt,function($r){var ka=xr[1][0]-xr[0][0],li=xr[1][1]-xr[0][1],Ci=Math.min(ka/($r[1][0]-$r[0][0]),li/($r[1][1]-$r[0][1])),Hi=+xr[0][0]+(ka-Ci*($r[1][0]+$r[0][0]))/2,Qi=+xr[0][1]+(li-Ci*($r[1][1]+$r[0][1]))/2;Qt.scale(150*Ci).translate([Hi,Qi])},aa)}function eu(Qt,xr,aa){return Zc(Qt,[[0,0],xr],aa)}function qc(Qt,xr,aa){return oc(Qt,function($r){var ka=+xr,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,xr,aa){return oc(Qt,function($r){var ka=+xr,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 Zs=16,kf=l(30*f);function fh(Qt,xr){return+xr?Yc(Qt,xr):Uf(Qt)}function Uf(Qt){return Gu({point:function(xr,aa){xr=Qt(xr,aa),this.stream.point(xr[0],xr[1])}})}function Yc(Qt,xr){function aa($r,ka,li,Ci,Hi,Qi,pn,Pi,Di,Ni,mi,Sn,Qn,io){var eo=pn-$r,co=Pi-ka,Tn=eo*eo+co*co;if(Tn>4*xr&&Qn--){var un=Ci+Ni,yo=Hi+mi,Qo=Qi+Sn,ks=d(un*un+yo*yo+Qo*Qo),rl=y(Qo/=ks),Ns=m(m(Qo)-1)xr||m((eo*yl+co*ll)/Tn-.5)>.3||Ci*Ni+Hi*mi+Qi*Sn2?Un[2]%360*f:0,yl()):[Hi*h,Qi*h,pn*h]},Ss.angle=function(Un){return arguments.length?(Di=Un%360*f,yl()):Di*h},Ss.reflectX=function(Un){return arguments.length?(Ni=Un?-1:1,yl()):Ni<0},Ss.reflectY=function(Un){return arguments.length?(mi=Un?-1:1,yl()):mi<0},Ss.precision=function(Un){return arguments.length?(Qo=fh(ks,yo=Un*Un),ll()):d(yo)},Ss.fitExtent=function(Un,Ro){return Zc(Ss,Un,Ro)},Ss.fitSize=function(Un,Ro){return eu(Ss,Un,Ro)},Ss.fitWidth=function(Un,Ro){return qc(Ss,Un,Ro)},Ss.fitHeight=function(Un,Ro){return Sc(Ss,Un,Ro)};function yl(){var Un=ml(aa,0,0,Ni,mi,Di).apply(null,xr(li,Ci)),Ro=(Di?ml:jf)(aa,$r-Un[0],ka-Un[1],Ni,mi,Di);return Pi=Ba(Hi,Qi,pn),ks=ra(xr,Ro),rl=ra(Pi,ks),Qo=fh(ks,yo),ll()}function ll(){return Ns=el=null,Ss}return function(){return xr=Qt.apply(this,arguments),Ss.invert=xr.invert&&Fl,yl()}}function ol(Qt){var xr=0,aa=a/3,$r=Mc(Qt),ka=$r(xr,aa);return ka.parallels=function(li){return arguments.length?$r(xr=li[0]*f,aa=li[1]*f):[xr*h,aa*h]},ka}function vc(Qt){var xr=l(Qt);function aa($r,ka){return[$r*xr,p(ka)/xr]}return aa.invert=function($r,ka){return[$r/xr,y(ka*xr)]},aa}function yu(Qt,xr){var aa=p(Qt),$r=(aa+p(xr))/2;if(m($r)=.12&&io<.234&&Qn>=-.425&&Qn<-.214?ka:io>=.166&&io<.234&&Qn>=-.214&&Qn<-.115?Ci:aa).invert(Ni)},Pi.stream=function(Ni){return Qt&&xr===Ni?Qt:Qt=qf([aa.stream(xr=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],Qn=+Ni[1];return $r=aa.translate(Ni).clipExtent([[Sn-.455*mi,Qn-.238*mi],[Sn+.455*mi,Qn+.238*mi]]).stream(pn),li=ka.translate([Sn-.307*mi,Qn+.201*mi]).clipExtent([[Sn-.425*mi+r,Qn+.12*mi+r],[Sn-.214*mi-r,Qn+.234*mi-r]]).stream(pn),Hi=Ci.translate([Sn-.205*mi,Qn+.212*mi]).clipExtent([[Sn-.214*mi+r,Qn+.166*mi+r],[Sn-.115*mi-r,Qn+.234*mi-r]]).stream(pn),Di()},Pi.fitExtent=function(Ni,mi){return Zc(Pi,Ni,mi)},Pi.fitSize=function(Ni,mi){return eu(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=xr=null,Pi}return Pi.scale(1070)}function Bu(Qt){return function(xr,aa){var $r=l(xr),ka=l(aa),li=Qt($r*ka);return[li*ka*p(xr),li*p(aa)]}}function Ec(Qt){return function(xr,aa){var $r=d(xr*xr+aa*aa),ka=Qt($r),li=p(ka),Ci=l(ka);return[T(xr*li,$r*Ci),y($r&&aa*li/$r)]}}var mc=Bu(function(Qt){return d(2/(1+Qt))});mc.invert=Ec(function(Qt){return 2*y(Qt/2)});function Lh(){return Lu(mc).scale(124.75).clipAngle(180-.001)}var sf=Bu(function(Qt){return(Qt=g(Qt))&&Qt/p(Qt)});sf.invert=Ec(function(Qt){return Qt});function vf(){return Lu(sf).scale(79.4188).clipAngle(180-.001)}function Nu(Qt,xr){return[Qt,A(u((i+xr)/2))]}Nu.invert=function(Qt,xr){return[Qt,2*c(w(xr))-i]};function lf(){return iu(Nu).scale(961/s)}function iu(Qt){var xr=Lu(Qt),aa=xr.center,$r=xr.scale,ka=xr.translate,li=xr.clipExtent,Ci=null,Hi,Qi,pn;xr.scale=function(Di){return arguments.length?($r(Di),Pi()):$r()},xr.translate=function(Di){return arguments.length?(ka(Di),Pi()):ka()},xr.center=function(Di){return arguments.length?(aa(Di),Pi()):aa()},xr.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=xr(pi(xr.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 Kc(Qt){return u((i+Qt)/2)}function hh(Qt,xr){var aa=l(Qt),$r=Qt===xr?p(Qt):A(aa/l(xr))/A(Kc(xr)/Kc(Qt)),ka=aa*E(Kc(Qt),$r)/$r;if(!$r)return Nu;function li(Ci,Hi){ka>0?Hi<-i+r&&(Hi=-i+r):Hi>i-r&&(Hi=i-r);var Qi=ka/E(Kc(Hi),$r);return[Qi*p($r*Ci),ka-Qi*l($r*Ci)]}return li.invert=function(Ci,Hi){var Qi=ka-Hi,pn=b($r)*d(Ci*Ci+Qi*Qi),Pi=T(Ci,m(Qi))*b(Qi);return Qi*$r<0&&(Pi-=a*b(Ci)*b(Qi)),[Pi/$r,2*c(E(ka/pn,1/$r))-i]},li}function mf(){return ol(hh).scale(109.5).parallels([30,30])}function sl(Qt,xr){return[Qt,xr]}sl.invert=sl;function _u(){return Lu(sl).scale(152.63)}function Pu(Qt,xr){var aa=l(Qt),$r=Qt===xr?p(Qt):(aa-l(xr))/(xr-Qt),ka=aa/$r+Qt;if(m($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 Vl(Qt,xr){return[l(xr)*p(Qt),p(xr)]}Vl.invert=Ec(y);function xu(){return Lu(Vl).scale(249.5).clipAngle(90+r)}function Lc(Qt,xr){var aa=l(xr),$r=1+l(Qt)*aa;return[aa*p(Qt)/$r,p(xr)/$r]}Lc.invert=Ec(function(Qt){return 2*c(Qt)});function $c(){return Lu(Lc).scale(250).clipAngle(142)}function sc(Qt,xr){return[A(u((i+xr)/2)),-Qt]}sc.invert=function(Qt,xr){return[-xr,2*c(w(Qt))-i]};function Pc(){var Qt=iu(sc),xr=Qt.center,aa=Qt.rotate;return Qt.center=function($r){return arguments.length?xr([-$r[1],$r[0]]):($r=xr(),[$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)}v.geoAlbers=Ml,v.geoAlbersUsa=Qf,v.geoArea=j,v.geoAzimuthalEqualArea=Lh,v.geoAzimuthalEqualAreaRaw=mc,v.geoAzimuthalEquidistant=vf,v.geoAzimuthalEquidistantRaw=sf,v.geoBounds=Fe,v.geoCentroid=Fr,v.geoCircle=tn,v.geoClipAntimeridian=mr,v.geoClipCircle=ga,v.geoClipExtent=Ki,v.geoClipRectangle=ki,v.geoConicConformal=mf,v.geoConicConformalRaw=hh,v.geoConicEqualArea=Tu,v.geoConicEqualAreaRaw=yu,v.geoConicEquidistant=Cf,v.geoConicEquidistantRaw=Pu,v.geoContains=Ko,v.geoDistance=os,v.geoEqualEarth=Lf,v.geoEqualEarthRaw=Jc,v.geoEquirectangular=_u,v.geoEquirectangularRaw=sl,v.geoGnomonic=Vf,v.geoGnomonicRaw=nu,v.geoGraticule=qs,v.geoGraticule10=bs,v.geoIdentity=Xu,v.geoInterpolate=lo,v.geoLength=wo,v.geoMercator=lf,v.geoMercatorRaw=Nu,v.geoNaturalEarth1=gc,v.geoNaturalEarth1Raw=Cc,v.geoOrthographic=xu,v.geoOrthographicRaw=Vl,v.geoPath=Bf,v.geoProjection=Lu,v.geoProjectionMutator=Mc,v.geoRotation=pi,v.geoStereographic=$c,v.geoStereographicRaw=Lc,v.geoStream=U,v.geoTransform=Nf,v.geoTransverseMercator=Pc,v.geoTransverseMercatorRaw=sc,Object.defineProperty(v,"__esModule",{value:!0})})}}),qU=He({"node_modules/d3-geo-projection/dist/d3-geo-projection.js"(Z,q){(function(v,_){typeof Z=="object"&&typeof q<"u"?_(Z,zE(),_x()):_(v.d3=v.d3||{},v.d3,v.d3)})(Z,function(v,_,S){"use strict";var M=Math.abs,e=Math.atan,t=Math.atan2,r=Math.cos,o=Math.exp,a=Math.floor,i=Math.log,n=Math.max,s=Math.min,h=Math.pow,f=Math.round,m=Math.sign||function(qe){return qe>0?1:qe<0?-1:0},c=Math.sin,T=Math.tan,l=1e-6,x=1e-12,w=Math.PI,A=w/2,E=w/4,p=Math.SQRT1_2,b=F(2),d=F(w),u=w*2,g=180/w,y=w/180;function D(qe){return qe?qe/Math.sin(qe):1}function P(qe){return qe>1?A:qe<-1?-A:Math.asin(qe)}function z(qe){return qe>1?0:qe<-1?w:Math.acos(qe)}function F(qe){return qe>0?Math.sqrt(qe):0}function N(qe){return qe=o(2*qe),(qe-1)/(qe+1)}function O(qe){return(o(qe)-o(-qe))/2}function L(qe){return(o(qe)+o(-qe))/2}function U(qe){return i(qe+F(qe*qe+1))}function B(qe){return i(qe+F(qe*qe-1))}function W(qe){var $e=T(qe/2),lt=2*i(r(qe/2))/($e*$e);function pt(Et,bt){var Dt=r(Et),ur=r(bt),yr=c(bt),Er=ur*Dt,jr=-((1-Er?i((1+Er)/2)/(1-Er):-.5)+lt/(1+Er));return[jr*ur*c(Et),jr*yr]}return pt.invert=function(Et,bt){var Dt=F(Et*Et+bt*bt),ur=-qe/2,yr=50,Er;if(!Dt)return[0,0];do{var jr=ur/2,Qr=r(jr),ha=c(jr),Aa=ha/Qr,Da=-i(M(Qr));ur-=Er=(2/Aa*Da-lt*Aa-Dt)/(-Da/(ha*ha)+1-lt/(2*Qr*Qr))*(Qr<0?.7:1)}while(M(Er)>l&&--yr>0);var ci=c(ur);return[t(Et*ci,Dt*r(ur)),P(bt*ci/Dt)]},pt}function $(){var qe=A,$e=_.geoProjectionMutator(W),lt=$e(qe);return lt.radius=function(pt){return arguments.length?$e(qe=pt*y):qe*g},lt.scale(179.976).clipAngle(147)}function ue(qe,$e){var lt=r($e),pt=D(z(lt*r(qe/=2)));return[2*lt*c(qe)*pt,c($e)*pt]}ue.invert=function(qe,$e){if(!(qe*qe+4*$e*$e>w*w+l)){var lt=qe,pt=$e,Et=25;do{var bt=c(lt),Dt=c(lt/2),ur=r(lt/2),yr=c(pt),Er=r(pt),jr=c(2*pt),Qr=yr*yr,ha=Er*Er,Aa=Dt*Dt,Da=1-ha*ur*ur,ci=Da?z(Er*ur)*F(Vi=1/Da):Vi=0,Vi,ji=2*ci*Er*Dt-qe,on=ci*yr-$e,An=Vi*(ha*Aa+ci*Er*ur*Qr),Kn=Vi*(.5*bt*jr-ci*2*yr*Dt),Bn=Vi*.25*(jr*Dt-ci*yr*ha*bt),Ao=Vi*(Qr*ur+ci*Aa*Er),ls=Kn*Bn-Ao*An;if(!ls)break;var Mo=(on*Kn-ji*Ao)/ls,Yo=(ji*Bn-on*An)/ls;lt-=Mo,pt-=Yo}while((M(Mo)>l||M(Yo)>l)&&--Et>0);return[lt,pt]}};function ce(){return _.geoProjection(ue).scale(152.63)}function de(qe){var $e=c(qe),lt=r(qe),pt=qe>=0?1:-1,Et=T(pt*qe),bt=(1+$e-lt)/2;function Dt(ur,yr){var Er=r(yr),jr=r(ur/=2);return[(1+Er)*c(ur),(pt*yr>-t(jr,Et)-.001?0:-pt*10)+bt+c(yr)*lt-(1+Er)*$e*jr]}return Dt.invert=function(ur,yr){var Er=0,jr=0,Qr=50;do{var ha=r(Er),Aa=c(Er),Da=r(jr),ci=c(jr),Vi=1+Da,ji=Vi*Aa-ur,on=bt+ci*lt-Vi*$e*ha-yr,An=Vi*ha/2,Kn=-Aa*ci,Bn=$e*Vi*Aa/2,Ao=lt*Da+$e*ha*ci,ls=Kn*Bn-Ao*An,Mo=(on*Kn-ji*Ao)/ls/2,Yo=(ji*Bn-on*An)/ls;M(Yo)>2&&(Yo/=2),Er-=Mo,jr-=Yo}while((M(Mo)>l||M(Yo)>l)&&--Qr>0);return pt*jr>-t(r(Er),Et)-.001?[Er*2,jr]:null},Dt}function Y(){var qe=20*y,$e=qe>=0?1:-1,lt=T($e*qe),pt=_.geoProjectionMutator(de),Et=pt(qe),bt=Et.stream;return Et.parallel=function(Dt){return arguments.length?(lt=T(($e=(qe=Dt*y)>=0?1:-1)*qe),pt(qe)):qe*g},Et.stream=function(Dt){var ur=Et.rotate(),yr=bt(Dt),Er=(Et.rotate([0,0]),bt(Dt)),jr=Et.precision();return Et.rotate(ur),yr.sphere=function(){Er.polygonStart(),Er.lineStart();for(var Qr=$e*-180;$e*Qr<180;Qr+=$e*90)Er.point(Qr,$e*90);if(qe)for(;$e*(Qr-=3*$e*jr)>=-180;)Er.point(Qr,$e*-t(r(Qr*y/2),lt)*g);Er.lineEnd(),Er.polygonEnd()},yr},Et.scale(218.695).center([0,28.0974])}function X(qe,$e){var lt=T($e/2),pt=F(1-lt*lt),Et=1+pt*r(qe/=2),bt=c(qe)*pt/Et,Dt=lt/Et,ur=bt*bt,yr=Dt*Dt;return[4/3*bt*(3+ur-3*yr),4/3*Dt*(3+3*ur-yr)]}X.invert=function(qe,$e){if(qe*=3/8,$e*=3/8,!qe&&M($e)>1)return null;var lt=qe*qe,pt=$e*$e,Et=1+lt+pt,bt=F((Et-F(Et*Et-4*$e*$e))/2),Dt=P(bt)/3,ur=bt?B(M($e/bt))/3:U(M(qe))/3,yr=r(Dt),Er=L(ur),jr=Er*Er-yr*yr;return[m(qe)*2*t(O(ur)*yr,.25-jr),m($e)*2*t(Er*c(Dt),.25+jr)]};function Q(){return _.geoProjection(X).scale(66.1603)}var V=F(8),le=i(1+b);function ae(qe,$e){var lt=M($e);return ltx&&--pt>0);return[qe/(r(lt)*(V-1/c(lt))),m($e)*lt]};function j(){return _.geoProjection(ae).scale(112.314)}function ee(qe){var $e=2*w/qe;function lt(pt,Et){var bt=_.geoAzimuthalEquidistantRaw(pt,Et);if(M(pt)>A){var Dt=t(bt[1],bt[0]),ur=F(bt[0]*bt[0]+bt[1]*bt[1]),yr=$e*f((Dt-A)/$e)+A,Er=t(c(Dt-=yr),2-r(Dt));Dt=yr+P(w/ur*c(Er))-Er,bt[0]=ur*r(Dt),bt[1]=ur*c(Dt)}return bt}return lt.invert=function(pt,Et){var bt=F(pt*pt+Et*Et);if(bt>A){var Dt=t(Et,pt),ur=$e*f((Dt-A)/$e)+A,yr=Dt>ur?-1:1,Er=bt*r(ur-Dt),jr=1/T(yr*z((Er-w)/F(w*(w-2*Er)+bt*bt)));Dt=ur+2*e((jr+yr*F(jr*jr-3))/3),pt=bt*r(Dt),Et=bt*c(Dt)}return _.geoAzimuthalEquidistantRaw.invert(pt,Et)},lt}function te(){var qe=5,$e=_.geoProjectionMutator(ee),lt=$e(qe),pt=lt.stream,Et=.01,bt=-r(Et*y),Dt=c(Et*y);return lt.lobes=function(ur){return arguments.length?$e(qe=+ur):qe},lt.stream=function(ur){var yr=lt.rotate(),Er=pt(ur),jr=(lt.rotate([0,0]),pt(ur));return lt.rotate(yr),Er.sphere=function(){jr.polygonStart(),jr.lineStart();for(var Qr=0,ha=360/qe,Aa=2*w/qe,Da=90-180/qe,ci=A;Qr0&&M(Et)>l);return pt<0?NaN:lt}function Pe(qe,$e,lt){return $e===void 0&&($e=40),lt===void 0&&(lt=x),function(pt,Et,bt,Dt){var ur,yr,Er;bt=bt===void 0?0:+bt,Dt=Dt===void 0?0:+Dt;for(var jr=0;jr<$e;jr++){var Qr=qe(bt,Dt),ha=Qr[0]-pt,Aa=Qr[1]-Et;if(M(ha)ur){bt-=yr/=2,Dt-=Er/=2;continue}ur=Da;var ci=(bt>0?-1:1)*lt,Vi=(Dt>0?-1:1)*lt,ji=qe(bt+ci,Dt),on=qe(bt,Dt+Vi),An=(ji[0]-Qr[0])/ci,Kn=(ji[1]-Qr[1])/ci,Bn=(on[0]-Qr[0])/Vi,Ao=(on[1]-Qr[1])/Vi,ls=Ao*An-Kn*Bn,Mo=(M(ls)<.5?.5:1)/ls;if(yr=(Aa*Bn-ha*Ao)*Mo,Er=(ha*Kn-Aa*An)*Mo,bt+=yr,Dt+=Er,M(yr)0&&(ur[1]*=1+yr/1.5*ur[0]*ur[0]),ur}return pt.invert=Pe(pt),pt}function at(){return _.geoProjection(je()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])}function nt(qe,$e){var lt=qe*c($e),pt=30,Et;do $e-=Et=($e+c($e)-lt)/(1+r($e));while(M(Et)>l&&--pt>0);return $e/2}function tt(qe,$e,lt){function pt(Et,bt){return[qe*Et*r(bt=nt(lt,bt)),$e*c(bt)]}return pt.invert=function(Et,bt){return bt=P(bt/$e),[Et/(qe*r(bt)),P((2*bt+c(2*bt))/lt)]},pt}var Ve=tt(b/A,b,w);function he(){return _.geoProjection(Ve).scale(169.529)}var se=2.00276,ne=1.11072;function Ce(qe,$e){var lt=nt(w,$e);return[se*qe/(1/r($e)+ne/r(lt)),($e+b*c(lt))/se]}Ce.invert=function(qe,$e){var lt=se*$e,pt=$e<0?-E:E,Et=25,bt,Dt;do Dt=lt-b*c(pt),pt-=bt=(c(2*pt)+2*pt-w*c(Dt))/(2*r(2*pt)+2+w*r(Dt)*b*r(pt));while(M(bt)>l&&--Et>0);return Dt=lt-b*c(pt),[qe*(1/r(Dt)+ne/r(pt))/se,Dt]};function Ze(){return _.geoProjection(Ce).scale(160.857)}function rt(qe){var $e=0,lt=_.geoProjectionMutator(qe),pt=lt($e);return pt.parallel=function(Et){return arguments.length?lt($e=Et*y):$e*g},pt}function Je(qe,$e){return[qe*r($e),$e]}Je.invert=function(qe,$e){return[qe/r($e),$e]};function St(){return _.geoProjection(Je).scale(152.63)}function kt(qe){if(!qe)return Je;var $e=1/T(qe);function lt(pt,Et){var bt=$e+qe-Et,Dt=bt&&pt*r(Et)/bt;return[bt*c(Dt),$e-bt*r(Dt)]}return lt.invert=function(pt,Et){var bt=F(pt*pt+(Et=$e-Et)*Et),Dt=$e+qe-bt;return[bt/r(Dt)*t(pt,Et),Dt]},lt}function Bt(){return rt(kt).scale(123.082).center([0,26.1441]).parallel(45)}function Vt(qe){function $e(lt,pt){var Et=A-pt,bt=Et&<*qe*c(Et)/Et;return[Et*c(bt)/qe,A-Et*r(bt)]}return $e.invert=function(lt,pt){var Et=lt*qe,bt=A-pt,Dt=F(Et*Et+bt*bt),ur=t(Et,bt);return[(Dt?Dt/c(Dt):1)*ur/qe,A-Dt]},$e}function Ar(){var qe=.5,$e=_.geoProjectionMutator(Vt),lt=$e(qe);return lt.fraction=function(pt){return arguments.length?$e(qe=+pt):qe},lt.scale(158.837)}var vr=tt(1,4/w,w);function qr(){return _.geoProjection(vr).scale(152.63)}function kr(qe,$e,lt,pt,Et,bt){var Dt=r(bt),ur;if(M(qe)>1||M(bt)>1)ur=z(lt*Et+$e*pt*Dt);else{var yr=c(qe/2),Er=c(bt/2);ur=2*P(F(yr*yr+$e*pt*Er*Er))}return M(ur)>l?[ur,t(pt*c(bt),$e*Et-lt*pt*Dt)]:[0,0]}function Ur(qe,$e,lt){return z((qe*qe+$e*$e-lt*lt)/(2*qe*$e))}function _t(qe){return qe-2*w*a((qe+w)/(2*w))}function Fe(qe,$e,lt){for(var pt=[[qe[0],qe[1],c(qe[1]),r(qe[1])],[$e[0],$e[1],c($e[1]),r($e[1])],[lt[0],lt[1],c(lt[1]),r(lt[1])]],Et=pt[2],bt,Dt=0;Dt<3;++Dt,Et=bt)bt=pt[Dt],Et.v=kr(bt[1]-Et[1],Et[3],Et[2],bt[3],bt[2],bt[0]-Et[0]),Et.point=[0,0];var ur=Ur(pt[0].v[0],pt[2].v[0],pt[1].v[0]),yr=Ur(pt[0].v[0],pt[1].v[0],pt[2].v[0]),Er=w-ur;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(ur),2*(pt[0].point[1]=pt[1].point[1]=pt[2].v[0]*c(ur))];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]=kr(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 Kn=ji==2?0:ji+1,Bn=Ur(pt[ji].v[0],Vi[ji][0],Vi[Kn][0]);Vi[ji][1]<0&&(Bn=-Bn),ji?ji==1?(Bn=yr-Bn,An[0]-=Vi[ji][0]*r(Bn),An[1]-=Vi[ji][0]*c(Bn)):(Bn=Er-Bn,An[0]+=Vi[ji][0]*r(Bn),An[1]+=Vi[ji][0]*c(Bn)):(An[0]+=Vi[ji][0]*r(Bn),An[1]-=Vi[ji][0]*c(Bn))}return An[0]/=3,An[1]/=3,An}return Qr}function Ye(qe){return qe[0]*=y,qe[1]*=y,qe}function Ae(){return Le([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])}function Le(qe,$e,lt){var pt=_.geoCentroid({type:"MultiPoint",coordinates:[qe,$e,lt]}),Et=[-pt[0],-pt[1]],bt=_.geoRotation(Et),Dt=Fe(Ye(bt(qe)),Ye(bt($e)),Ye(bt(lt)));Dt.invert=Pe(Dt);var ur=_.geoProjection(Dt).rotate(Et),yr=ur.center;return delete ur.rotate,ur.center=function(Er){return arguments.length?yr(bt(Er)):bt.invert(yr())},ur.clipAngle(90)}function We(qe,$e){var lt=F(1-c($e));return[2/d*qe*lt,d*(1-lt)]}We.invert=function(qe,$e){var lt=(lt=$e/d-1)*lt;return[lt>0?qe*F(w/lt)/2:0,P(1-lt)]};function Ke(){return _.geoProjection(We).scale(95.6464).center([0,30])}function st(qe){var $e=T(qe);function lt(pt,Et){return[pt,(pt?pt/c(pt):1)*(c(Et)*r(pt)-$e*r(Et))]}return lt.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,P(pt?Et*T(pt)/pt:Et)]},lt}function ot(){return rt(st).scale(249.828).clipAngle(90)}var Ut=F(3);function Ct(qe,$e){return[Ut*qe*(2*r(2*$e/3)-1)/d,Ut*d*c($e/3)]}Ct.invert=function(qe,$e){var lt=3*P($e/(Ut*d));return[d*qe/(Ut*(2*r(2*lt/3)-1)),lt]};function Pt(){return _.geoProjection(Ct).scale(156.19)}function jt(qe){var $e=r(qe);function lt(pt,Et){return[pt*$e,c(Et)/$e]}return lt.invert=function(pt,Et){return[pt/$e,P(Et*$e)]},lt}function cr(){return rt(jt).parallel(38.58).scale(195.044)}function or(qe){var $e=r(qe);function lt(pt,Et){return[pt*$e,(1+$e)*T(Et/2)]}return lt.invert=function(pt,Et){return[pt/$e,e(Et/(1+$e))*2]},lt}function nr(){return rt(or).scale(124.75)}function Pr(qe,$e){var lt=F(8/(3*w));return[lt*qe*(1-M($e)/w),lt*$e]}Pr.invert=function(qe,$e){var lt=F(8/(3*w)),pt=$e/lt;return[qe/(lt*(1-M(pt)/w)),pt]};function _a(){return _.geoProjection(Pr).scale(165.664)}function Fa(qe,$e){var lt=F(4-3*c(M($e)));return[2/F(6*w)*qe*lt,m($e)*F(2*w/3)*(2-lt)]}Fa.invert=function(qe,$e){var lt=2-M($e)/F(2*w/3);return[qe*F(6*w)/(2*lt),m($e)*P((4-lt*lt)/3)]};function Ra(){return _.geoProjection(Fa).scale(165.664)}function qa(qe,$e){var lt=F(w*(4+w));return[2/lt*qe*(1+F(1-4*$e*$e/(w*w))),4/lt*$e]}qa.invert=function(qe,$e){var lt=F(w*(4+w))/2;return[qe*lt/(1+F(1-$e*$e*(4+w)/(4*w))),$e*lt/2]};function Wa(){return _.geoProjection(qa).scale(180.739)}function Ca(qe,$e){var lt=(2+A)*c($e);$e/=2;for(var pt=0,Et=1/0;pt<10&&M(Et)>l;pt++){var bt=r($e);$e-=Et=($e+c($e)*(bt+2)-lt)/(2*bt*(1+bt))}return[2/F(w*(4+w))*qe*(1+r($e)),2*F(w/(4+w))*c($e)]}Ca.invert=function(qe,$e){var lt=$e*F((4+w)/w)/2,pt=P(lt),Et=r(pt);return[qe/(2/F(w*(4+w))*(1+Et)),P((pt+lt*(Et+2))/(2+A))]};function hi(){return _.geoProjection(Ca).scale(180.739)}function wi(qe,$e){return[qe*(1+r($e))/F(2+w),2*$e/F(2+w)]}wi.invert=function(qe,$e){var lt=F(2+w),pt=$e*lt/2;return[lt*qe/(1+r(pt)),pt]};function Yt(){return _.geoProjection(wi).scale(173.044)}function Rt(qe,$e){for(var lt=(1+A)*c($e),pt=0,Et=1/0;pt<10&&M(Et)>l;pt++)$e-=Et=($e+c($e)-lt)/(1+r($e));return lt=F(2+w),[qe*(1+r($e))/lt,2*$e/lt]}Rt.invert=function(qe,$e){var lt=1+A,pt=F(lt/2);return[qe*2*pt/(1+r($e*=pt)),P(($e+c($e))/lt)]};function Zt(){return _.geoProjection(Rt).scale(173.044)}var Jt=3+2*b;function Fr(qe,$e){var lt=c(qe/=2),pt=r(qe),Et=F(r($e)),bt=r($e/=2),Dt=c($e)/(bt+b*pt*Et),ur=F(2/(1+Dt*Dt)),yr=F((b*bt+(pt+lt)*Et)/(b*bt+(pt-lt)*Et));return[Jt*(ur*(yr-1/yr)-2*i(yr)),Jt*(ur*Dt*(yr+1/yr)-2*e(Dt))]}Fr.invert=function(qe,$e){if(!(bt=X.invert(qe/1.2,$e*1.065)))return null;var lt=bt[0],pt=bt[1],Et=20,bt;qe/=Jt,$e/=Jt;do{var Dt=lt/2,ur=pt/2,yr=c(Dt),Er=r(Dt),jr=c(ur),Qr=r(ur),ha=r(pt),Aa=F(ha),Da=jr/(Qr+b*Er*Aa),ci=Da*Da,Vi=F(2/(1+ci)),ji=b*Qr+(Er+yr)*Aa,on=b*Qr+(Er-yr)*Aa,An=ji/on,Kn=F(An),Bn=Kn-1/Kn,Ao=Kn+1/Kn,ls=Vi*Bn-2*i(Kn)-qe,Mo=Vi*Da*Ao-2*e(Da)-$e,Yo=jr&&p*Aa*yr*ci/jr,ds=(b*Er*Qr+Aa)/(2*(Qr+b*Er*Aa)*(Qr+b*Er*Aa)*Aa),ul=-.5*Da*Vi*Vi*Vi,tl=ul*Yo,es=ul*ds,ts=(ts=2*Qr+b*Aa*(Er-yr))*ts*Kn,Il=(b*Er*Qr*Aa+ha)/ts,tu=-(b*yr*jr)/(Aa*ts),Ru=Bn*tl-2*Il/Kn+Vi*(Il+Il/An),vu=Bn*es-2*tu/Kn+Vi*(tu+tu/An),wl=Da*Ao*tl-2*Yo/(1+ci)+Vi*Ao*Yo+Vi*Da*(Il-Il/An),fu=Da*Ao*es-2*ds/(1+ci)+Vi*Ao*ds+Vi*Da*(tu-tu/An),uc=vu*wl-fu*Ru;if(!uc)break;var Gl=(Mo*vu-ls*fu)/uc,Hl=(ls*wl-Mo*Ru)/uc;lt-=Gl,pt=n(-A,s(A,pt-Hl))}while((M(Gl)>l||M(Hl)>l)&&--Et>0);return M(M(pt)-A)pt){var Qr=F(jr),ha=t(Er,yr),Aa=lt*f(ha/lt),Da=ha-Aa,ci=qe*r(Da),Vi=(qe*c(Da)-Da*c(ci))/(A-ci),ji=xt(Da,Vi),on=(w-qe)/ut(ji,ci,w);yr=Qr;var An=50,Kn;do yr-=Kn=(qe+ut(ji,ci,yr)*on-Qr)/(ji(yr)*on);while(M(Kn)>l&&--An>0);Er=Da*c(yr),yrpt){var yr=F(ur),Er=t(Dt,bt),jr=lt*f(Er/lt),Qr=Er-jr;bt=yr*r(Qr),Dt=yr*c(Qr);for(var ha=bt-A,Aa=c(bt),Da=Dt/Aa,ci=btl||M(Da)>l)&&--ci>0);return[Qr,ha]},yr}var wr=Cr(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);function Rr(){return _.geoProjection(wr).scale(149.995)}var Nr=Cr(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);function Hr(){return _.geoProjection(Nr).scale(153.93)}var gt=Cr(5/6*w,-.62636,-.0344,0,1.3493,-.05524,0,.045);function Kt(){return _.geoProjection(gt).scale(130.945)}function mr(qe,$e){var lt=qe*qe,pt=$e*$e;return[qe*(1-.162388*pt)*(.87-952426e-9*lt*lt),$e*(1+pt/12)]}mr.invert=function(qe,$e){var lt=qe,pt=$e,Et=50,bt;do{var Dt=pt*pt;pt-=bt=(pt*(1+Dt/12)-$e)/(1+Dt/4)}while(M(bt)>l&&--Et>0);Et=50,qe/=1-.162388*Dt;do{var ur=(ur=lt*lt)*ur;lt-=bt=(lt*(.87-952426e-9*ur)-qe)/(.87-.00476213*ur)}while(M(bt)>l&&--Et>0);return[lt,pt]};function Ir(){return _.geoProjection(mr).scale(131.747)}var va=Cr(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function Pa(){return _.geoProjection(va).scale(131.087)}function ga(qe){var $e=qe(A,0)[0]-qe(-A,0)[0];function lt(pt,Et){var bt=pt>0?-.5:.5,Dt=qe(pt+bt*w,Et);return Dt[0]-=bt*$e,Dt}return qe.invert&&(lt.invert=function(pt,Et){var bt=pt>0?-.5:.5,Dt=qe.invert(pt+bt*$e,Et),ur=Dt[0]-bt*w;return ur<-w?ur+=2*w:ur>w&&(ur-=2*w),Dt[0]=ur,Dt}),lt}function la(qe,$e){var lt=m(qe),pt=m($e),Et=r($e),bt=r(qe)*Et,Dt=c(qe)*Et,ur=c(pt*$e);qe=M(t(Dt,ur)),$e=P(bt),M(qe-A)>l&&(qe%=A);var yr=ba(qe>w/4?A-qe:qe,$e);return qe>w/4&&(ur=yr[0],yr[0]=-yr[1],yr[1]=-ur),yr[0]*=lt,yr[1]*=-pt,yr}la.invert=function(qe,$e){M(qe)>1&&(qe=m(qe)*2-qe),M($e)>1&&($e=m($e)*2-$e);var lt=m(qe),pt=m($e),Et=-lt*qe,bt=-pt*$e,Dt=bt/Et<1,ur=Ai(Dt?bt:Et,Dt?Et:bt),yr=ur[0],Er=ur[1],jr=r(Er);return Dt&&(yr=-A-yr),[lt*(t(c(yr)*jr,-c(Er))+w),pt*P(r(yr)*jr)]};function ba(qe,$e){if($e===A)return[0,0];var lt=c($e),pt=lt*lt,Et=pt*pt,bt=1+Et,Dt=1+3*Et,ur=1-Et,yr=P(1/F(bt)),Er=ur+pt*bt*yr,jr=(1-lt)/Er,Qr=F(jr),ha=jr*bt,Aa=F(ha),Da=Qr*ur,ci,Vi;if(qe===0)return[0,-(Da+pt*Aa)];var ji=r($e),on=1/ji,An=2*lt*ji,Kn=(-3*pt+yr*Dt)*An,Bn=(-Er*ji-(1-lt)*Kn)/(Er*Er),Ao=.5*Bn/Qr,ls=ur*Ao-2*pt*Qr*An,Mo=pt*bt*Bn+jr*Dt*An,Yo=-on*An,ds=-on*Mo,ul=-2*on*ls,tl=4*qe/w,es;if(qe>.222*w||$e.175*w){if(ci=(Da+pt*F(ha*(1+Et)-Da*Da))/(1+Et),qe>w/4)return[ci,ci];var ts=ci,Il=.5*ci;ci=.5*(Il+ts),Vi=50;do{var tu=F(ha-ci*ci),Ru=ci*(ul+Yo*tu)+ds*P(ci/Aa)-tl;if(!Ru)break;Ru<0?Il=ci:ts=ci,ci=.5*(Il+ts)}while(M(ts-Il)>l&&--Vi>0)}else{ci=l,Vi=25;do{var vu=ci*ci,wl=F(ha-vu),fu=ul+Yo*wl,uc=ci*fu+ds*P(ci/Aa)-tl,Gl=fu+(ds-Yo*vu)/wl;ci-=es=wl?uc/Gl:0}while(M(es)>l&&--Vi>0)}return[ci,-Da-pt*F(ha-ci*ci)]}function Ai(qe,$e){for(var lt=0,pt=1,Et=.5,bt=50;;){var Dt=Et*Et,ur=F(Et),yr=P(1/F(1+Dt)),Er=1-Dt+Et*(1+Dt)*yr,jr=(1-ur)/Er,Qr=F(jr),ha=jr*(1+Dt),Aa=Qr*(1-Dt),Da=ha-qe*qe,ci=F(Da),Vi=$e+Aa+Et*ci;if(M(pt-lt)0?lt=Et:pt=Et,Et=.5*(lt+pt)}if(!bt)return null;var ji=P(ur),on=r(ji),An=1/on,Kn=2*ur*on,Bn=(-3*Et+yr*(1+3*Dt))*Kn,Ao=(-Er*on-(1-ur)*Bn)/(Er*Er),ls=.5*Ao/Qr,Mo=(1-Dt)*ls-2*Et*Qr*Kn,Yo=-2*An*Mo,ds=-An*Kn,ul=-An*(Et*(1+Dt)*Ao+jr*(1+3*Dt)*Kn);return[w/4*(qe*(Yo+ds*ci)+ul*P(qe/F(ha))),ji]}function ki(){return _.geoProjection(ga(la)).scale(239.75)}function Ki(qe,$e,lt){var pt,Et,bt;return qe?(pt=Mn(qe,lt),$e?(Et=Mn($e,1-lt),bt=Et[1]*Et[1]+lt*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,-lt*pt[0]*pt[1]*Et[0]/bt]]):[[pt[0],0],[pt[1],0],[pt[2],0]]):(Et=Mn($e,1-lt),[[0,Et[0]/Et[1]],[1/Et[1],0],[Et[2]/Et[1],0]])}function Mn(qe,$e){var lt,pt,Et,bt,Dt;if($e=1-l)return lt=(1-$e)/4,pt=L(qe),bt=N(qe),Et=1/pt,Dt=pt*O(qe),[bt+lt*(Dt-qe)/(pt*pt),Et-lt*bt*Et*(Dt-qe),Et+lt*bt*Et*(Dt+qe),2*e(o(qe))-A+lt*(Dt-qe)/pt];var ur=[1,0,0,0,0,0,0,0,0],yr=[F($e),0,0,0,0,0,0,0,0],Er=0;for(pt=F(1-$e),Dt=1;M(yr[Er]/ur[Er])>l&&Er<8;)lt=ur[Er++],yr[Er]=(lt-pt)/2,ur[Er]=(lt+pt)/2,pt=F(lt*pt),Dt*=2;Et=Dt*ur[Er]*qe;do bt=yr[Er]*c(pt=Et)/ur[Er],Et=(P(bt)+Et)/2;while(--Er);return[c(Et),bt=r(Et),bt/r(Et-pt),Et]}function wn(qe,$e,lt){var pt=M(qe),Et=M($e),bt=O(Et);if(pt){var Dt=1/c(pt),ur=1/(T(pt)*T(pt)),yr=-(ur+lt*(bt*bt*Dt*Dt)-1+lt),Er=(lt-1)*ur,jr=(-yr+F(yr*yr-4*Er))/2;return[On(e(1/F(jr)),lt)*m(qe),On(e(F((jr/ur-1)/lt)),1-lt)*m($e)]}return[0,On(e(bt),1-lt)*m($e)]}function On(qe,$e){if(!$e)return qe;if($e===1)return i(T(qe/2+E));for(var lt=1,pt=F(1-$e),Et=F($e),bt=0;M(Et)>l;bt++){if(qe%w){var Dt=e(pt*T(qe)/lt);Dt<0&&(Dt+=w),qe+=Dt+~~(qe/w)*w}else qe+=qe;Et=(lt+pt)/2,pt=F(lt*pt),Et=((lt=Et)-pt)/2}return qe/(h(2,bt)*lt)}function En(qe,$e){var lt=(b-1)/(b+1),pt=F(1-lt*lt),Et=On(A,pt*pt),bt=-1,Dt=i(T(w/4+M($e)/2)),ur=o(bt*Dt)/F(lt),yr=ao(ur*r(bt*qe),ur*c(bt*qe)),Er=wn(yr[0],yr[1],pt*pt);return[-Er[1],($e>=0?1:-1)*(.5*Et-Er[0])]}function ao(qe,$e){var lt=qe*qe,pt=$e+1,Et=1-lt-$e*$e;return[.5*((qe>=0?A:-A)-t(Et,2*qe)),-.25*i(Et*Et+4*lt)+.5*i(pt*pt+lt)]}function Co(qe,$e){var lt=$e[0]*$e[0]+$e[1]*$e[1];return[(qe[0]*$e[0]+qe[1]*$e[1])/lt,(qe[1]*$e[0]-qe[0]*$e[1])/lt]}En.invert=function(qe,$e){var lt=(b-1)/(b+1),pt=F(1-lt*lt),Et=On(A,pt*pt),bt=-1,Dt=Ki(.5*Et-$e,-qe,pt*pt),ur=Co(Dt[0],Dt[1]),yr=t(ur[1],ur[0])/bt;return[yr,2*e(o(.5/bt*i(lt*ur[0]*ur[0]+lt*ur[1]*ur[1])))-A]};function bo(){return _.geoProjection(ga(En)).scale(151.496)}function zs(qe){var $e=c(qe),lt=r(qe),pt=kn(qe);pt.invert=kn(-qe);function Et(bt,Dt){var ur=pt(bt,Dt);bt=ur[0],Dt=ur[1];var yr=c(Dt),Er=r(Dt),jr=r(bt),Qr=z($e*yr+lt*Er*jr),ha=c(Qr),Aa=M(ha)>l?Qr/ha:1;return[Aa*lt*c(bt),(M(bt)>A?Aa:-Aa)*($e*Er-lt*yr*jr)]}return Et.invert=function(bt,Dt){var ur=F(bt*bt+Dt*Dt),yr=-c(ur),Er=r(ur),jr=ur*Er,Qr=-Dt*yr,ha=ur*$e,Aa=F(jr*jr+Qr*Qr-ha*ha),Da=t(jr*ha+Qr*Aa,Qr*ha-jr*Aa),ci=(ur>A?-1:1)*t(bt*yr,ur*r(Da)*Er+Dt*c(Da)*yr);return pt.invert(ci,Da)},Et}function kn(qe){var $e=c(qe),lt=r(qe);return function(pt,Et){var bt=r(Et),Dt=r(pt)*bt,ur=c(pt)*bt,yr=c(Et);return[t(ur,Dt*lt-yr*$e),P(yr*lt+Dt*$e)]}}function wo(){var qe=0,$e=_.geoProjectionMutator(zs),lt=$e(qe),pt=lt.rotate,Et=lt.stream,bt=_.geoCircle();return lt.parallel=function(Dt){if(!arguments.length)return qe*g;var ur=lt.rotate();return $e(qe=Dt*y).rotate(ur)},lt.rotate=function(Dt){return arguments.length?(pt.call(lt,[Dt[0],Dt[1]-qe*g]),bt.center([-Dt[0],-Dt[1]]),lt):(Dt=pt.call(lt),Dt[1]+=qe*g,Dt)},lt.stream=function(Dt){return Dt=Et(Dt),Dt.sphere=function(){Dt.polygonStart();var ur=.01,yr=bt.radius(90-ur)().coordinates[0],Er=yr.length-1,jr=-1,Qr;for(Dt.lineStart();++jr=0;)Dt.point((Qr=yr[jr])[0],Qr[1]);Dt.lineEnd(),Dt.polygonEnd()},Dt},lt.scale(79.4187).parallel(45).clipAngle(180-.001)}var Zn=3,go=P(1-1/Zn)*g,os=jt(0);function ys(qe){var $e=go*y,lt=We(w,$e)[0]-We(-w,$e)[0],pt=os(0,$e)[1],Et=We(0,$e)[1],bt=d-Et,Dt=u/qe,ur=4/u,yr=pt+bt*bt*4/u;function Er(jr,Qr){var ha,Aa=M(Qr);if(Aa>$e){var Da=s(qe-1,n(0,a((jr+w)/Dt)));jr+=w*(qe-1)/qe-Da*Dt,ha=We(jr,Aa),ha[0]=ha[0]*u/lt-u*(qe-1)/(2*qe)+Da*u/qe,ha[1]=pt+(ha[1]-Et)*4*bt/u,Qr<0&&(ha[1]=-ha[1])}else ha=os(jr,Qr);return ha[0]*=ur,ha[1]/=yr,ha}return Er.invert=function(jr,Qr){jr/=ur,Qr*=yr;var ha=M(Qr);if(ha>pt){var Aa=s(qe-1,n(0,a((jr+w)/Dt)));jr=(jr+w*(qe-1)/qe-Aa*Dt)*lt/u;var Da=We.invert(jr,.25*(ha-pt)*u/bt+Et);return Da[0]-=w*(qe-1)/qe-Aa*Dt,Qr<0&&(Da[1]=-Da[1]),Da}return os.invert(jr,Qr)},Er}function jo(qe,$e){return[qe,$e&1?90-l:go]}function Yn(qe,$e){return[qe,$e&1?-90+l:-go]}function Gn(qe){return[qe[0]*(1-l),qe[1]]}function Hn(qe){var $e=[].concat(S.range(-180,180+qe/2,qe).map(jo),S.range(180,-180-qe/2,-qe).map(Yn));return{type:"Polygon",coordinates:[qe===180?$e.map(Gn):$e]}}function ss(){var qe=4,$e=_.geoProjectionMutator(ys),lt=$e(qe),pt=lt.stream;return lt.lobes=function(Et){return arguments.length?$e(qe=+Et):qe},lt.stream=function(Et){var bt=lt.rotate(),Dt=pt(Et),ur=(lt.rotate([0,0]),pt(Et));return lt.rotate(bt),Dt.sphere=function(){_.geoStream(Hn(180/qe),ur)},Dt},lt.scale(239.75)}function _s(qe){var $e=1+qe,lt=c(1/$e),pt=P(lt),Et=2*F(w/(bt=w+4*pt*$e)),bt,Dt=.5*Et*($e+F(qe*(2+qe))),ur=qe*qe,yr=$e*$e;function Er(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),Kn=pt+t(on,$e-An),Bn=1+yr-2*$e*An;ci-=ji=(ci-ur*pt-$e*on+Bn*Kn-.5*ha*bt)/(2*$e*on*Kn)}while(M(ji)>x&&--Vi>0);Aa=Et*F(Bn),Da=jr*Kn/w}else Aa=Et*(qe+ha),Da=jr*pt/w;return[Aa*c(Da),Dt-Aa*r(Da)]}return Er.invert=function(jr,Qr){var ha=jr*jr+(Qr-=Dt)*Qr,Aa=(1+yr-ha/(Et*Et))/(2*$e),Da=z(Aa),ci=c(Da),Vi=pt+t(ci,$e-Aa);return[P(jr/F(ha))*w/Vi,P(1-2*(Da-ur*pt-$e*ci+(1+yr-2*$e*Aa)*Vi)/bt)]},Er}function ps(){var qe=1,$e=_.geoProjectionMutator(_s),lt=$e(qe);return lt.ratio=function(pt){return arguments.length?$e(qe=+pt):qe},lt.scale(167.774).center([0,18.67])}var Ko=.7109889596207567,Gi=.0528035274542;function Pn(qe,$e){return $e>-Ko?(qe=Ve(qe,$e),qe[1]+=Gi,qe):Je(qe,$e)}Pn.invert=function(qe,$e){return $e>-Ko?Ve.invert(qe,$e-Gi):Je.invert(qe,$e)};function qs(){return _.geoProjection(Pn).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}function bs(qe,$e){return M($e)>Ko?(qe=Ve(qe,$e),qe[1]-=$e>0?Gi:-Gi,qe):Je(qe,$e)}bs.invert=function(qe,$e){return M($e)>Ko?Ve.invert(qe,$e+($e>0?Gi:-Gi)):Je.invert(qe,$e)};function lo(){return _.geoProjection(bs).scale(152.63)}function Zo(qe,$e,lt,pt){var Et=F(4*w/(2*lt+(1+qe-$e/2)*c(2*lt)+(qe+$e)/2*c(4*lt)+$e/2*c(6*lt))),bt=F(pt*c(lt)*F((1+qe*r(2*lt)+$e*r(4*lt))/(1+qe+$e))),Dt=lt*yr(1);function ur(Qr){return F(1+qe*r(2*Qr)+$e*r(4*Qr))}function yr(Qr){var ha=Qr*lt;return(2*ha+(1+qe-$e/2)*c(2*ha)+(qe+$e)/2*c(4*ha)+$e/2*c(6*ha))/lt}function Er(Qr){return ur(Qr)*c(Qr)}var jr=function(Qr,ha){var Aa=lt*Re(yr,Dt*c(ha)/lt,ha/w);isNaN(Aa)&&(Aa=lt*m(ha));var Da=Et*ur(Aa);return[Da*bt*Qr/w*r(Aa),Da/bt*c(Aa)]};return jr.invert=function(Qr,ha){var Aa=Re(Er,ha*bt/Et);return[Qr*w/(r(Aa)*Et*bt*ur(Aa)),P(lt*yr(Aa/lt)/Dt)]},lt===0&&(Et=F(pt/w),jr=function(Qr,ha){return[Qr*Et,c(ha)/Et]},jr.invert=function(Qr,ha){return[Qr/Et,P(ha*Et)]}),jr}function ws(){var qe=1,$e=0,lt=45*y,pt=2,Et=_.geoProjectionMutator(Zo),bt=Et(qe,$e,lt,pt);return bt.a=function(Dt){return arguments.length?Et(qe=+Dt,$e,lt,pt):qe},bt.b=function(Dt){return arguments.length?Et(qe,$e=+Dt,lt,pt):$e},bt.psiMax=function(Dt){return arguments.length?Et(qe,$e,lt=+Dt*y,pt):lt*g},bt.ratio=function(Dt){return arguments.length?Et(qe,$e,lt,pt=+Dt):pt},bt.scale(180.739)}function Hs(qe,$e,lt,pt,Et,bt,Dt,ur,yr,Er,jr){if(jr.nanEncountered)return NaN;var Qr,ha,Aa,Da,ci,Vi,ji,on,An,Kn;if(Qr=lt-$e,ha=qe($e+Qr*.25),Aa=qe(lt-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,Kn=(Vi-Dt)/15,Er>yr?(jr.maxDepthCount++,Vi+Kn):Math.abs(Kn)>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)/Dt}var Qr=2*jr(1)/w*bt/lt,ha=function(Aa,Da){var ci=jr(M(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,M(Da)<1&&(ci=m(Da)*P(Et(M(Da))*bt)),[Aa/pt(M(Da)),ci]},ha}function Po(){var qe=0,$e=2.5,lt=1.183136,pt=_.geoProjectionMutator(yn),Et=pt(qe,$e,lt);return Et.alpha=function(bt){return arguments.length?pt(qe=+bt,$e,lt):qe},Et.k=function(bt){return arguments.length?pt(qe,$e=+bt,lt):$e},Et.gamma=function(bt){return arguments.length?pt(qe,$e,lt=+bt):lt},Et.scale(152.63)}function To(qe,$e){return M(qe[0]-$e[0])=0;--yr)lt=qe[1][yr],pt=lt[0][0],Et=lt[0][1],bt=lt[1][1],Dt=lt[2][0],ur=lt[2][1],$e.push(Ws([[Dt-l,ur-l],[Dt-l,bt+l],[pt+l,bt+l],[pt+l,Et-l]],30));return{type:"Polygon",coordinates:[S.merge($e)]}}function uo(qe,$e,lt){var pt,Et;function bt(yr,Er){for(var jr=Er<0?-1:1,Qr=$e[+(Er<0)],ha=0,Aa=Qr.length-1;haQr[ha][2][0];++ha);var Da=qe(yr-Qr[ha][1][0],Er);return Da[0]+=qe(Qr[ha][1][0],jr*Er>jr*Qr[ha][0][1]?Qr[ha][0][1]:Er)[0],Da}lt?bt.invert=lt(bt):qe.invert&&(bt.invert=function(yr,Er){for(var jr=Et[+(Er<0)],Qr=$e[+(Er<0)],ha=0,Aa=jr.length;haDa&&(ci=Aa,Aa=Da,Da=ci),[[Qr,Aa],[ha,Da]]})}),Dt):$e.map(function(Er){return Er.map(function(jr){return[[jr[0][0]*g,jr[0][1]*g],[jr[1][0]*g,jr[1][1]*g],[jr[2][0]*g,jr[2][1]*g]]})})},$e!=null&&Dt.lobes($e),Dt}var Nl=[[[[-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 Ks(){return uo(Ce,Nl).scale(160.857)}var Ts=[[[[-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 Ls(){return uo(bs,Ts).scale(152.63)}var Jo=[[[[-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 Es(){return uo(Ve,Jo).scale(169.529)}var Ul=[[[[-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 lu(){return uo(Ve,Ul).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,Pe).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(Je,Sf).scale(152.63).rotate([-20,0])}function Bs(qe,$e){return[3/u*qe*F(w*w/3-$e*$e),$e]}Bs.invert=function(qe,$e){return[u/3*qe/F(w*w/3-$e*$e),$e]};function dc(){return _.geoProjection(Bs).scale(158.837)}function Wc(qe){function $e(lt,pt){if(M(M(pt)-A)2)return null;lt/=2,pt/=2;var bt=lt*lt,Dt=pt*pt,ur=2*pt/(1+bt+Dt);return ur=h((1+ur)/(1-ur),1/qe),[t(2*lt,1-bt-Dt)/qe,P((ur-1)/(ur+1))]},$e}function uu(){var qe=.5,$e=_.geoProjectionMutator(Wc),lt=$e(qe);return lt.spacing=function(pt){return arguments.length?$e(qe=+pt):qe},lt.scale(124.75)}var Pl=w/b;function ic(qe,$e){return[qe*(1+F(r($e)))/2,$e/(r($e/2)*r(qe/6))]}ic.invert=function(qe,$e){var lt=M(qe),pt=M($e),Et=l,bt=A;ptl||M(Vi)>l)&&--Et>0);return Et&&[lt,pt]};function vl(){return _.geoProjection(nl).scale(139.98)}function As(qe,$e){return[c(qe)/r($e),T($e)*r(qe)]}As.invert=function(qe,$e){var lt=qe*qe,pt=$e*$e,Et=pt+1,bt=lt+Et,Dt=qe?p*F((bt-F(bt*bt-4*lt))/lt):1/F(Et);return[P(qe*Dt),m($e)*z(Dt)]};function Xs(){return _.geoProjection(As).scale(144.049).clipAngle(90-.001)}function nc(qe){var $e=r(qe),lt=T(E+qe/2);function pt(Et,bt){var Dt=bt-qe,ur=M(Dt)=0;)jr=qe[Er],Qr=jr[0]+ur*(Aa=Qr)-yr*ha,ha=jr[1]+ur*ha+yr*Aa;return Qr=ur*(Aa=Qr)-yr*ha,ha=ur*ha+yr*Aa,[Qr,ha]}return lt.invert=function(pt,Et){var bt=20,Dt=pt,ur=Et;do{for(var yr=$e,Er=qe[yr],jr=Er[0],Qr=Er[1],ha=0,Aa=0,Da;--yr>=0;)Er=qe[yr],ha=jr+Dt*(Da=ha)-ur*Aa,Aa=Qr+Dt*Aa+ur*Da,jr=Er[0]+Dt*(Da=jr)-ur*Qr,Qr=Er[1]+Dt*Qr+ur*Da;ha=jr+Dt*(Da=ha)-ur*Aa,Aa=Qr+Dt*Aa+ur*Da,jr=Dt*(Da=jr)-ur*Qr-pt,Qr=Dt*Qr+ur*Da-Et;var ci=ha*ha+Aa*Aa,Vi,ji;Dt-=Vi=(jr*ha+Qr*Aa)/ci,ur-=ji=(Qr*ha-jr*Aa)/ci}while(M(Vi)+M(ji)>l*l&&--bt>0);if(bt){var on=F(Dt*Dt+ur*ur),An=2*e(on*.5),Kn=c(An);return[t(Dt*Kn,on*r(An)),on?P(ur*Kn/on):0]}},lt}var us=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],bh=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],Ps=[[.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]],Xc=[[.721316,0],[0,0],[-.00881625,-.00617325]];function Vu(){return Ql(us,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)}function ql(){return Ql(bh,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])}function Mf(){return Ql(Ps,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])}function Ac(){return Ql(to,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)}function nf(){return Ql(Xc,[165,10]).scale(250).clipAngle(130).center([-165,-10])}function Ql(qe,$e){var lt=_.geoProjection(xh(qe)).rotate($e).clipAngle(90),pt=_.geoRotation($e),Et=lt.center;return delete lt.rotate,lt.center=function(bt){return arguments.length?Et(pt(bt)):pt.invert(Et())},lt}var Jf=F(6),Of=F(7);function of(qe,$e){var lt=P(7*c($e)/(3*Jf));return[Jf*qe*(2*r(2*lt/3)-1)/Of,9*c(lt/3)/Of]}of.invert=function(qe,$e){var lt=3*P($e*Of/9);return[qe*Of/(Jf*(2*r(2*lt/3)-1)),P(c(lt)*3*Jf/7)]};function jc(){return _.geoProjection(of).scale(164.859)}function Bf(qe,$e){for(var lt=(1+p)*c($e),pt=$e,Et=0,bt;Et<25&&(pt-=bt=(c(pt/2)+c(pt)-lt)/(.5*r(pt/2)+r(pt)),!(M(bt)x&&--pt>0);return bt=lt*lt,Dt=bt*bt,ur=bt*Dt,[qe/(.84719-.13063*bt+ur*ur*(-.04515+.05494*bt-.02326*Dt+.00331*ur)),lt]};function Zc(){return _.geoProjection(oc).scale(175.295)}function eu(qe,$e){return[qe*(1+r($e))/2,2*($e-T($e/2))]}eu.invert=function(qe,$e){for(var lt=$e/2,pt=0,Et=1/0;pt<10&&M(Et)>l;++pt){var bt=r($e/2);$e-=Et=($e-T($e/2)-lt)/(1-.5/(bt*bt))}return[2*qe/(1+r($e)),$e]};function qc(){return _.geoProjection(eu).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 Zs(){return uo(pe(1/0),Sc).rotate([20,0]).scale(152.63)}function kf(qe,$e){var lt=c($e),pt=r($e),Et=m(qe);if(qe===0||M($e)===A)return[0,$e];if($e===0)return[qe,0];if(M(qe)===A)return[qe*pt,A*lt];var bt=w/(2*qe)-2*qe/w,Dt=2*$e/w,ur=(1-Dt*Dt)/(lt-Dt),yr=bt*bt,Er=ur*ur,jr=1+yr/Er,Qr=1+Er/yr,ha=(bt*lt/ur-bt/2)/jr,Aa=(Er*lt/yr+ur/2)/Qr,Da=ha*ha+pt*pt/jr,ci=Aa*Aa-(Er*lt*lt/yr+ur*lt-1)/Qr;return[A*(ha+F(Da)*Et),A*(Aa+F(ci<0?0:ci)*m(-$e*bt)*Et)]}kf.invert=function(qe,$e){qe/=A,$e/=A;var lt=qe*qe,pt=$e*$e,Et=lt+pt,bt=w*w;return[qe?(Et-1+F((1-Et)*(1-Et)+4*lt))/(2*qe)*A:0,Re(function(Dt){return Et*(w*c(Dt)-2*Dt)*w+4*Dt*Dt*($e-c(Dt))+2*w*Dt-bt*$e},0)]};function fh(){return _.geoProjection(kf).scale(127.267)}var Uf=1.0148,Yc=.23185,$f=-.14499,Cu=.02406,jf=Uf,ml=5*Yc,Lu=7*$f,Mc=9*Cu,ol=1.790857183;function vc(qe,$e){var lt=$e*$e;return[qe,$e*(Uf+lt*lt*(Yc+lt*($f+Cu*lt)))]}vc.invert=function(qe,$e){$e>ol?$e=ol:$e<-ol&&($e=-ol);var lt=$e,pt;do{var Et=lt*lt;lt-=pt=(lt*(Uf+Et*Et*(Yc+Et*($f+Cu*Et)))-$e)/(jf+Et*Et*(ml+Et*(Lu+Mc*Et)))}while(M(pt)>l);return[qe,lt]};function yu(){return _.geoProjection(vc).scale(139.319)}function Tu(qe,$e){if(M($e)l&&--Et>0);return Dt=T(pt),[(M($e)=0;)if(pt=$e[ur],lt[0]===pt[0]&<[1]===pt[1]){if(bt)return[bt,lt];bt=lt}}}function iu(qe){for(var $e=qe.length,lt=[],pt=qe[$e-1],Et=0;Et<$e;++Et)lt.push([pt,pt=qe[Et]]);return lt}function Kc(qe){return qe.project.invert||qe.children&&qe.children.some(Kc)}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(qe){return qe.map(function($e){return hh[$e]})});function sl(qe){qe=qe||function(lt){var pt=_.geoCentroid({type:"MultiPoint",coordinates:lt});return _.geoGnomonic().scale(1).translate([0,0]).rotate([-pt[0],-pt[1]])};var $e=mf.map(function(lt){return{face:lt,project:qe(lt)}});return[-1,0,0,1,0,1,4,5].forEach(function(lt,pt){var Et=$e[lt];Et&&(Et.children||(Et.children=[])).push($e[pt])}),sf($e[0],function(lt,pt){return $e[lt<-w/2?pt<0?6:4:lt<0?pt<0?2:0:lt0?[-pt[0],0]:[180-pt[0],180])};var $e=mf.map(function(lt){return{face:lt,project:qe(lt)}});return[-1,0,0,1,0,1,4,5].forEach(function(lt,pt){var Et=$e[lt];Et&&(Et.children||(Et.children=[])).push($e[pt])}),sf($e[0],function(lt,pt){return $e[lt<-w/2?pt<0?6:4:lt<0?pt<0?2:0:ltpt^Aa>pt&<<(ha-Er)*(pt-jr)/(Aa-jr)+Er&&(Et=!Et)}return Et}function nu(qe,$e){var lt=$e.stream,pt;if(!lt)throw new Error("invalid projection");switch(qe&&qe.type){case"Feature":pt=Xu;break;case"FeatureCollection":pt=Vf;break;default:pt=gc;break}return pt(qe,lt)}function Vf(qe,$e){return{type:"FeatureCollection",features:qe.features.map(function(lt){return Xu(lt,$e)})}}function Xu(qe,$e){return{type:"Feature",id:qe.id,properties:qe.properties,geometry:gc(qe.geometry,$e)}}function Cc(qe,$e){return{type:"GeometryCollection",geometries:qe.geometries.map(function(lt){return gc(lt,$e)})}}function gc(qe,$e){if(!qe)return null;if(qe.type==="GeometryCollection")return Cc(qe,$e);var lt;switch(qe.type){case"Point":lt=Lc;break;case"MultiPoint":lt=Lc;break;case"LineString":lt=$c;break;case"MultiLineString":lt=$c;break;case"Polygon":lt=sc;break;case"MultiPolygon":lt=sc;break;case"Sphere":lt=sc;break;default:return null}return _.geoStream(qe,$e(lt)),lt.result()}var Vl=[],xu=[],Lc={point:function(qe,$e){Vl.push([qe,$e])},result:function(){var qe=Vl.length?Vl.length<2?{type:"Point",coordinates:Vl[0]}:{type:"MultiPoint",coordinates:Vl}:null;return Vl=[],qe}},$c={lineStart:Wu,point:function(qe,$e){Vl.push([qe,$e])},lineEnd:function(){Vl.length&&(xu.push(Vl),Vl=[])},result:function(){var qe=xu.length?xu.length<2?{type:"LineString",coordinates:xu[0]}:{type:"MultiLineString",coordinates:xu}:null;return xu=[],qe}},sc={polygonStart:Wu,lineStart:Wu,point:function(qe,$e){Vl.push([qe,$e])},lineEnd:function(){var qe=Vl.length;if(qe){do Vl.push(Vl[0].slice());while(++qe<4);xu.push(Vl),Vl=[]}},polygonEnd:Wu,result:function(){if(!xu.length)return null;var qe=[],$e=[];return xu.forEach(function(lt){Jc(lt)?qe.push([lt]):$e.push(lt)}),$e.forEach(function(lt){var pt=lt[0];qe.some(function(Et){if(Lf(Et[0],pt))return Et.push(lt),!0})||qe.push([lt])}),xu=[],qe.length?qe.length>1?{type:"MultiPolygon",coordinates:qe}:{type:"Polygon",coordinates:qe[0]}:null}};function Pc(qe){var $e=qe(A,0)[0]-qe(-A,0)[0];function lt(pt,Et){var bt=M(pt)0?pt-w:pt+w,Et),ur=(Dt[0]-Dt[1])*p,yr=(Dt[0]+Dt[1])*p;if(bt)return[ur,yr];var Er=$e*p,jr=ur>0^yr>0?-1:1;return[jr*ur-m(yr)*Er,jr*yr-m(ur)*Er]}return qe.invert&&(lt.invert=function(pt,Et){var bt=(pt+Et)*p,Dt=(Et-pt)*p,ur=M(bt)<.5*$e&&M(Dt)<.5*$e;if(!ur){var yr=$e*p,Er=bt>0^Dt>0?-1:1,jr=-Er*pt+(Dt>0?1:-1)*yr,Qr=-Er*Et+(bt>0?1:-1)*yr;bt=(-jr-Qr)*p,Dt=(jr-Qr)*p}var ha=qe.invert(bt,Dt);return ur||(ha[0]+=bt>0?w:-w),ha}),_.geoProjection(lt).rotate([-90,-90,45]).clipAngle(180-.001)}function Qt(){return Pc(la).scale(176.423)}function xr(){return Pc(En).scale(111.48)}function aa(qe,$e){if(!(0<=($e=+$e)&&$e<=20))throw new Error("invalid digits");function lt(Er){var jr=Er.length,Qr=2,ha=new Array(jr);for(ha[0]=+Er[0].toFixed($e),ha[1]=+Er[1].toFixed($e);Qr2||Aa[0]!=jr[0]||Aa[1]!=jr[1])&&(Qr.push(Aa),jr=Aa)}return Qr.length===1&&Er.length>1&&Qr.push(lt(Er[Er.length-1])),Qr}function bt(Er){return Er.map(Et)}function Dt(Er){if(Er==null)return Er;var jr;switch(Er.type){case"GeometryCollection":jr={type:"GeometryCollection",geometries:Er.geometries.map(Dt)};break;case"Point":jr={type:"Point",coordinates:lt(Er.coordinates)};break;case"MultiPoint":jr={type:Er.type,coordinates:pt(Er.coordinates)};break;case"LineString":jr={type:Er.type,coordinates:Et(Er.coordinates)};break;case"MultiLineString":case"Polygon":jr={type:Er.type,coordinates:bt(Er.coordinates)};break;case"MultiPolygon":jr={type:"MultiPolygon",coordinates:Er.coordinates.map(bt)};break;default:return Er}return Er.bbox!=null&&(jr.bbox=Er.bbox),jr}function ur(Er){var jr={type:"Feature",properties:Er.properties,geometry:Dt(Er.geometry)};return Er.id!=null&&(jr.id=Er.id),Er.bbox!=null&&(jr.bbox=Er.bbox),jr}if(qe!=null)switch(qe.type){case"Feature":return ur(qe);case"FeatureCollection":{var yr={type:"FeatureCollection",features:qe.features.map(ur)};return qe.bbox!=null&&(yr.bbox=qe.bbox),yr}default:return Dt(qe)}return qe}function $r(qe){var $e=c(qe);function lt(pt,Et){var bt=$e?T(pt*$e/2)/$e:pt/2;if(!Et)return[2*bt,-qe];var Dt=2*e(bt*c(Et)),ur=1/T(Et);return[c(Dt)*ur,Et+(1-r(Dt))*ur-qe]}return lt.invert=function(pt,Et){if(M(Et+=qe)l&&--ur>0);var ha=pt*(Er=T(Dt)),Aa=T(M(Et)0?A:-A)*(yr+Et*(jr-Dt)/2+Et*Et*(jr-2*yr+Dt)/2)]}Ci.invert=function(qe,$e){var lt=$e/A,pt=lt*90,Et=s(18,M(pt/5)),bt=n(0,a(Et));do{var Dt=li[bt][1],ur=li[bt+1][1],yr=li[s(19,bt+2)][1],Er=yr-Dt,jr=yr-2*ur+Dt,Qr=2*(M(lt)-ur)/Er,ha=jr/Er,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,M(pt)/5),bt=a(Et),Aa=Et-bt,Dt=li[bt][1],ur=li[bt+1][1],yr=li[s(19,bt+2)][1],pt-=(ci=($e>=0?A:-A)*(ur+Aa*(yr-Dt)/2+Aa*Aa*(yr-2*ur+Dt)/2)-$e)*g;while(M(ci)>x&&--Da>0);break}}while(--bt>=0);var Vi=li[bt][0],ji=li[bt+1][0],on=li[s(19,bt+2)][0];return[qe/(ji+Aa*(on-Vi)/2+Aa*Aa*(on-2*ji+Vi)/2),pt*y]};function Hi(){return _.geoProjection(Ci).scale(152.63)}function Qi(qe){function $e(lt,pt){var Et=r(pt),bt=(qe-1)/(qe-Et*r(lt));return[bt*Et*c(lt),bt*c(pt)]}return $e.invert=function(lt,pt){var Et=lt*lt+pt*pt,bt=F(Et),Dt=(qe-F(1-Et*(qe+1)/(qe-1)))/((qe-1)/bt+bt/(qe-1));return[t(lt*Dt,bt*F(1-Dt*Dt)),bt?P(pt*Dt/bt):0]},$e}function pn(qe,$e){var lt=Qi(qe);if(!$e)return lt;var pt=r($e),Et=c($e);function bt(Dt,ur){var yr=lt(Dt,ur),Er=yr[1],jr=Er*Et/(qe-1)+pt;return[yr[0]*pt/jr,Er/jr]}return bt.invert=function(Dt,ur){var yr=(qe-1)/(qe-1-ur*Et);return lt.invert(yr*Dt,yr*ur*pt)},bt}function Pi(){var qe=2,$e=0,lt=_.geoProjectionMutator(pn),pt=lt(qe,$e);return pt.distance=function(Et){return arguments.length?lt(qe=+Et,$e):qe},pt.tilt=function(Et){return arguments.length?lt(qe,$e=Et*y):$e*g},pt.scale(432.147).clipAngle(z(1/qe)*g-1e-6)}var Di=1e-4,Ni=1e4,mi=-180,Sn=mi+Di,Qn=180,io=Qn-Di,eo=-90,co=eo+Di,Tn=90,un=Tn-Di;function yo(qe){return qe.length>0}function Qo(qe){return Math.floor(qe*Ni)/Ni}function ks(qe){return qe===eo||qe===Tn?[0,qe]:[mi,Qo(qe)]}function rl(qe){var $e=qe[0],lt=qe[1],pt=!1;return $e<=Sn?($e=mi,pt=!0):$e>=io&&($e=Qn,pt=!0),lt<=co?(lt=eo,pt=!0):lt>=un&&(lt=Tn,pt=!0),pt?[$e,lt]:qe}function Ns(qe){return qe.map(rl)}function el(qe,$e,lt){for(var pt=0,Et=qe.length;pt=io||jr<=co||jr>=un){bt[Dt]=rl(yr);for(var Qr=Dt+1;QrSn&&Aaco&&Da=ur)break;lt.push({index:-1,polygon:$e,ring:bt=bt.slice(Qr-1)}),bt[0]=ks(bt[0][1]),Dt=-1,ur=bt.length}}}}function Ss(qe){var $e,lt=qe.length,pt={},Et={},bt,Dt,ur,yr,Er;for($e=0;$e0?w-ur:ur)*g],Er=_.geoProjection(qe(Dt)).rotate(yr),jr=_.geoRotation(yr),Qr=Er.center;return delete Er.rotate,Er.center=function(ha){return arguments.length?Qr(jr(ha)):jr.invert(Qr())},Er.clipAngle(90)}function Fs(qe){var $e=r(qe);function lt(pt,Et){var bt=_.geoGnomonicRaw(pt,Et);return bt[0]*=$e,bt}return lt.invert=function(pt,Et){return _.geoGnomonicRaw.invert(pt/$e,Et)},lt}function cu(){return Iu([-158,21.5],[-77,39]).clipAngle(60).scale(400)}function Iu(qe,$e){return Js(Fs,qe,$e)}function Zu(qe){if(!(qe*=2))return _.geoAzimuthalEquidistantRaw;var $e=-qe/2,lt=-$e,pt=qe*qe,Et=T(lt),bt=.5/c(lt);function Dt(ur,yr){var Er=z(r(yr)*r(ur-$e)),jr=z(r(yr)*r(ur-lt)),Qr=yr<0?-1:1;return Er*=Er,jr*=jr,[(Er-jr)/(2*qe),Qr*F(4*pt*jr-(pt-Er+jr)*(pt-Er+jr))/(2*qe)]}return Dt.invert=function(ur,yr){var Er=yr*yr,jr=r(F(Er+(ha=ur+$e)*ha)),Qr=r(F(Er+(ha=ur+lt)*ha)),ha,Aa;return[t(Aa=jr-Qr,ha=(jr+Qr)*Et),(yr<0?-1:1)*z(F(ha*ha+Aa*Aa)*bt)]},Dt}function Ic(){return bu([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)}function bu(qe,$e){return Js(Zu,qe,$e)}function Rc(qe,$e){if(M($e)l&&--ur>0);return[m(qe)*(F(Et*Et+4)+Et)*w/4,A*Dt]};function Yu(){return _.geoProjection(lc).scale(127.16)}function Oe(qe,$e,lt,pt,Et){function bt(Dt,ur){var yr=lt*c(pt*ur),Er=F(1-yr*yr),jr=F(2/(1+Er*r(Dt*=Et)));return[qe*Er*jr*c(Dt),$e*yr*jr]}return bt.invert=function(Dt,ur){var yr=Dt/qe,Er=ur/$e,jr=F(yr*yr+Er*Er),Qr=2*P(jr/2);return[t(Dt*T(Qr),qe*jr)/Et,jr&&P(ur*c(Qr)/($e*lt*jr))/pt]},bt}function I(qe,$e,lt,pt){var Et=w/3;qe=n(qe,l),$e=n($e,l),qe=s(qe,A),$e=s($e,w-l),lt=n(lt,0),lt=s(lt,100-l),pt=n(pt,l);var bt=lt/100+1,Dt=pt/100,ur=z(bt*r(Et))/Et,yr=c(qe)/c(ur*A),Er=$e/w,jr=F(Dt*c(qe/2)/c($e/2)),Qr=jr/F(Er*yr*ur),ha=1/(jr*F(Er*yr*ur));return Oe(Qr,ha,yr,ur,Er)}function ie(){var qe=65*y,$e=60*y,lt=20,pt=200,Et=_.geoProjectionMutator(I),bt=Et(qe,$e,lt,pt);return bt.poleline=function(Dt){return arguments.length?Et(qe=+Dt*y,$e,lt,pt):qe*g},bt.parallels=function(Dt){return arguments.length?Et(qe,$e=+Dt*y,lt,pt):$e*g},bt.inflation=function(Dt){return arguments.length?Et(qe,$e,lt=+Dt,pt):lt},bt.ratio=function(Dt){return arguments.length?Et(qe,$e,lt,pt=+Dt):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 _.geoProjection(ht).scale(176.84)}function Ot(qe,$e){return[qe*F(1-3*$e*$e/(w*w)),$e]}Ot.invert=function(qe,$e){return[qe/F(1-3*$e*$e/(w*w)),$e]};function $t(){return _.geoProjection(Ot).scale(152.63)}function Tr(qe,$e){var lt=r($e),pt=r(qe)*lt,Et=1-pt,bt=r(qe=t(c(qe)*lt,-c($e))),Dt=c(qe);return lt=F(1-pt*pt),[Dt*lt-bt*Et,-bt*lt-Dt*Et]}Tr.invert=function(qe,$e){var lt=(qe*qe+$e*$e)/-2,pt=F(-lt*(2+lt)),Et=$e*lt+qe*pt,bt=qe*lt-$e*pt,Dt=F(bt*bt+Et*Et);return[t(pt*Et,Dt*(1+lt)),Dt?-P(pt*bt/Dt):0]};function Sr(){return _.geoProjection(Tr).rotate([0,-90,45]).scale(124.75).clipAngle(180-.001)}function Kr(qe,$e){var lt=ue(qe,$e);return[(lt[0]+qe/A)/2,(lt[1]+$e)/2]}Kr.invert=function(qe,$e){var lt=qe,pt=$e,Et=25;do{var bt=r(pt),Dt=c(pt),ur=c(2*pt),yr=Dt*Dt,Er=bt*bt,jr=c(lt),Qr=r(lt/2),ha=c(lt/2),Aa=ha*ha,Da=1-Er*Qr*Qr,ci=Da?z(bt*Qr)*F(Vi=1/Da):Vi=0,Vi,ji=.5*(2*ci*bt*ha+lt/A)-qe,on=.5*(ci*Dt+pt)-$e,An=.5*Vi*(Er*Aa+ci*bt*Qr*yr)+.5/A,Kn=Vi*(jr*ur/4-ci*Dt*ha),Bn=.125*Vi*(ur*ha-ci*Dt*Er*jr),Ao=.5*Vi*(yr*Qr+ci*Aa*bt)+.5,ls=Kn*Bn-Ao*An,Mo=(on*Kn-ji*Ao)/ls,Yo=(ji*Bn-on*An)/ls;lt-=Mo,pt-=Yo}while((M(Mo)>l||M(Yo)>l)&&--Et>0);return[lt,pt]};function na(){return _.geoProjection(Kr).scale(158.837)}v.geoNaturalEarth=_.geoNaturalEarth1,v.geoNaturalEarthRaw=_.geoNaturalEarth1Raw,v.geoAiry=$,v.geoAiryRaw=W,v.geoAitoff=ce,v.geoAitoffRaw=ue,v.geoArmadillo=Y,v.geoArmadilloRaw=de,v.geoAugust=Q,v.geoAugustRaw=X,v.geoBaker=j,v.geoBakerRaw=ae,v.geoBerghaus=te,v.geoBerghausRaw=ee,v.geoBertin1953=at,v.geoBertin1953Raw=je,v.geoBoggs=Ze,v.geoBoggsRaw=Ce,v.geoBonne=Bt,v.geoBonneRaw=kt,v.geoBottomley=Ar,v.geoBottomleyRaw=Vt,v.geoBromley=qr,v.geoBromleyRaw=vr,v.geoChamberlin=Le,v.geoChamberlinRaw=Fe,v.geoChamberlinAfrica=Ae,v.geoCollignon=Ke,v.geoCollignonRaw=We,v.geoCraig=ot,v.geoCraigRaw=st,v.geoCraster=Pt,v.geoCrasterRaw=Ct,v.geoCylindricalEqualArea=cr,v.geoCylindricalEqualAreaRaw=jt,v.geoCylindricalStereographic=nr,v.geoCylindricalStereographicRaw=or,v.geoEckert1=_a,v.geoEckert1Raw=Pr,v.geoEckert2=Ra,v.geoEckert2Raw=Fa,v.geoEckert3=Wa,v.geoEckert3Raw=qa,v.geoEckert4=hi,v.geoEckert4Raw=Ca,v.geoEckert5=Yt,v.geoEckert5Raw=wi,v.geoEckert6=Zt,v.geoEckert6Raw=Rt,v.geoEisenlohr=ta,v.geoEisenlohrRaw=Fr,v.geoFahey=Ba,v.geoFaheyRaw=ca,v.geoFoucaut=Za,v.geoFoucautRaw=$a,v.geoFoucautSinusoidal=pi,v.geoFoucautSinusoidalRaw=ri,v.geoGilbert=tn,v.geoGingery=Or,v.geoGingeryRaw=cn,v.geoGinzburg4=Rr,v.geoGinzburg4Raw=wr,v.geoGinzburg5=Hr,v.geoGinzburg5Raw=Nr,v.geoGinzburg6=Kt,v.geoGinzburg6Raw=gt,v.geoGinzburg8=Ir,v.geoGinzburg8Raw=mr,v.geoGinzburg9=Pa,v.geoGinzburg9Raw=va,v.geoGringorten=ki,v.geoGringortenRaw=la,v.geoGuyou=bo,v.geoGuyouRaw=En,v.geoHammer=Se,v.geoHammerRaw=pe,v.geoHammerRetroazimuthal=wo,v.geoHammerRetroazimuthalRaw=zs,v.geoHealpix=ss,v.geoHealpixRaw=ys,v.geoHill=ps,v.geoHillRaw=_s,v.geoHomolosine=lo,v.geoHomolosineRaw=bs,v.geoHufnagel=ws,v.geoHufnagelRaw=Zo,v.geoHyperelliptical=Po,v.geoHyperellipticalRaw=yn,v.geoInterrupt=uo,v.geoInterruptedBoggs=Ks,v.geoInterruptedHomolosine=Ls,v.geoInterruptedMollweide=Es,v.geoInterruptedMollweideHemispheres=lu,v.geoInterruptedSinuMollweide=du,v.geoInterruptedSinusoidal=Uc,v.geoKavrayskiy7=dc,v.geoKavrayskiy7Raw=Bs,v.geoLagrange=uu,v.geoLagrangeRaw=Wc,v.geoLarrivee=Ou,v.geoLarriveeRaw=ic,v.geoLaskowski=vl,v.geoLaskowskiRaw=nl,v.geoLittrow=Xs,v.geoLittrowRaw=As,v.geoLoximuthal=jl,v.geoLoximuthalRaw=nc,v.geoMiller=fl,v.geoMillerRaw=qu,v.geoModifiedStereographic=Ql,v.geoModifiedStereographicRaw=xh,v.geoModifiedStereographicAlaska=Vu,v.geoModifiedStereographicGs48=ql,v.geoModifiedStereographicGs50=Mf,v.geoModifiedStereographicMiller=Ac,v.geoModifiedStereographicLee=nf,v.geoMollweide=he,v.geoMollweideRaw=Ve,v.geoMtFlatPolarParabolic=jc,v.geoMtFlatPolarParabolicRaw=of,v.geoMtFlatPolarQuartic=Nf,v.geoMtFlatPolarQuarticRaw=Bf,v.geoMtFlatPolarSinusoidal=Ef,v.geoMtFlatPolarSinusoidalRaw=Gu,v.geoNaturalEarth2=Zc,v.geoNaturalEarth2Raw=oc,v.geoNellHammer=qc,v.geoNellHammerRaw=eu,v.geoInterruptedQuarticAuthalic=Zs,v.geoNicolosi=fh,v.geoNicolosiRaw=kf,v.geoPatterson=yu,v.geoPattersonRaw=vc,v.geoPolyconic=Ml,v.geoPolyconicRaw=Tu,v.geoPolyhedral=sf,v.geoPolyhedralButterfly=sl,v.geoPolyhedralCollignon=Cf,v.geoPolyhedralWaterman=hl,v.geoProject=nu,v.geoGringortenQuincuncial=Qt,v.geoPeirceQuincuncial=xr,v.geoPierceQuincuncial=xr,v.geoQuantize=aa,v.geoQuincuncial=Pc,v.geoRectangularPolyconic=ka,v.geoRectangularPolyconicRaw=$r,v.geoRobinson=Hi,v.geoRobinsonRaw=Ci,v.geoSatellite=Pi,v.geoSatelliteRaw=pn,v.geoSinuMollweide=qs,v.geoSinuMollweideRaw=Pn,v.geoSinusoidal=St,v.geoSinusoidalRaw=Je,v.geoStitch=ll,v.geoTimes=Ro,v.geoTimesRaw=Un,v.geoTwoPointAzimuthal=Iu,v.geoTwoPointAzimuthalRaw=Fs,v.geoTwoPointAzimuthalUsa=cu,v.geoTwoPointEquidistant=bu,v.geoTwoPointEquidistantRaw=Zu,v.geoTwoPointEquidistantUsa=Ic,v.geoVanDerGrinten=Au,v.geoVanDerGrintenRaw=Rc,v.geoVanDerGrinten2=fo,v.geoVanDerGrinten2Raw=yc,v.geoVanDerGrinten3=Dc,v.geoVanDerGrinten3Raw=Fo,v.geoVanDerGrinten4=Yu,v.geoVanDerGrinten4Raw=lc,v.geoWagner=ie,v.geoWagner7=Te,v.geoWagnerRaw=I,v.geoWagner4=wt,v.geoWagner4Raw=ht,v.geoWagner6=$t,v.geoWagner6Raw=Ot,v.geoWiechel=Sr,v.geoWiechelRaw=Tr,v.geoWinkel3=na,v.geoWinkel3Raw=Kr,Object.defineProperty(v,"__esModule",{value:!0})})}}),VU=He({"src/plots/geo/zoom.js"(Z,q){"use strict";var v=Vn(),_=sa(),S=so(),M=Math.PI/180,e=180/Math.PI,t={cursor:"pointer"},r={cursor:"auto"};function o(g,y){var D=g.projection,P;return y._isScoped?P=n:y._isClipped?P=h:P=s,P(g,D)}q.exports=o;function a(g,y){return v.behavior.zoom().translate(y.translate()).scale(y.scale())}function i(g,y,D){var P=g.id,z=g.graphDiv,F=z.layout,N=F[P],O=z._fullLayout,L=O[P],U={},B={};function W($,ue){U[P+"."+$]=_.nestedProperty(N,$).get(),S.call("_storeDirectGUIEdit",F,O._preGUI,U);var ce=_.nestedProperty(L,$);ce.get()!==ue&&(ce.set(ue),_.nestedProperty(N,$).set(ue),B[P+"."+$]=ue)}D(W),W("projection.scale",y.scale()/g.fitScale),W("fitbounds",!1),z.emit("plotly_relayout",B)}function n(g,y){var D=a(g,y);function P(){v.select(this).style(t)}function z(){y.scale(v.event.scale).translate(v.event.translate),g.render(!0);var O=y.invert(g.midPt);g.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":y.scale()/g.fitScale,"geo.center.lon":O[0],"geo.center.lat":O[1]})}function F(O){var L=y.invert(g.midPt);O("center.lon",L[0]),O("center.lat",L[1])}function N(){v.select(this).style(r),i(g,y,F)}return D.on("zoomstart",P).on("zoom",z).on("zoomend",N),D}function s(g,y){var D=a(g,y),P=2,z,F,N,O,L,U,B,W,$;function ue(V){return y.invert(V)}function ce(V){var le=ue(V);if(!le)return!0;var ae=y(le);return Math.abs(ae[0]-V[0])>P||Math.abs(ae[1]-V[1])>P}function de(){v.select(this).style(t),z=v.mouse(this),F=y.rotate(),N=y.translate(),O=F,L=ue(z)}function Y(){if(U=v.mouse(this),ce(z)){D.scale(y.scale()),D.translate(y.translate());return}y.scale(v.event.scale),y.translate([N[0],v.event.translate[1]]),L?ue(U)&&(W=ue(U),B=[O[0]+(W[0]-L[0]),F[1],F[2]],y.rotate(B),O=B):(z=U,L=ue(z)),$=!0,g.render(!0);var V=y.rotate(),le=y.invert(g.midPt);g.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":y.scale()/g.fitScale,"geo.center.lon":le[0],"geo.center.lat":le[1],"geo.projection.rotation.lon":-V[0]})}function X(){v.select(this).style(r),$&&i(g,y,Q)}function Q(V){var le=y.rotate(),ae=y.invert(g.midPt);V("projection.rotation.lon",-le[0]),V("center.lon",ae[0]),V("center.lat",ae[1])}return D.on("zoomstart",de).on("zoom",Y).on("zoomend",X),D}function h(g,y){var D={r:y.rotate(),k:y.scale()},P=a(g,y),z=u(P,"zoomstart","zoom","zoomend"),F=0,N=P.on,O;P.on("zoomstart",function(){v.select(this).style(t);var $=v.mouse(this),ue=y.rotate(),ce=ue,de=y.translate(),Y=m(ue);O=f(y,$),N.call(P,"zoom",function(){var X=v.mouse(this);if(y.scale(D.k=v.event.scale),!O)$=X,O=f(y,$);else if(f(y,X)){y.rotate(ue).translate(de);var Q=f(y,X),V=T(O,Q),le=E(c(Y,V)),ae=D.r=l(le,O,ce);(!isFinite(ae[0])||!isFinite(ae[1])||!isFinite(ae[2]))&&(ae=ce),y.rotate(ae),ce=ae}U(z.of(this,arguments))}),L(z.of(this,arguments))}).on("zoomend",function(){v.select(this).style(r),N.call(P,"zoom",null),B(z.of(this,arguments)),i(g,y,W)}).on("zoom.redraw",function(){g.render(!0);var $=y.rotate();g.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":y.scale()/g.fitScale,"geo.projection.rotation.lon":-$[0],"geo.projection.rotation.lat":-$[1]})});function L($){F++||$({type:"zoomstart"})}function U($){$({type:"zoom"})}function B($){--F||$({type:"zoomend"})}function W($){var ue=y.rotate();$("projection.rotation.lon",-ue[0]),$("projection.rotation.lat",-ue[1])}return v.rebind(P,z,"on")}function f(g,y){var D=g.invert(y);return D&&isFinite(D[0])&&isFinite(D[1])&&p(D)}function m(g){var y=.5*g[0]*M,D=.5*g[1]*M,P=.5*g[2]*M,z=Math.sin(y),F=Math.cos(y),N=Math.sin(D),O=Math.cos(D),L=Math.sin(P),U=Math.cos(P);return[F*O*U+z*N*L,z*O*U-F*N*L,F*N*U+z*O*L,F*O*L-z*N*U]}function c(g,y){var D=g[0],P=g[1],z=g[2],F=g[3],N=y[0],O=y[1],L=y[2],U=y[3];return[D*N-P*O-z*L-F*U,D*O+P*N+z*U-F*L,D*L-P*U+z*N+F*O,D*U+P*L-z*O+F*N]}function T(g,y){if(!(!g||!y)){var D=d(g,y),P=Math.sqrt(b(D,D)),z=.5*Math.acos(Math.max(-1,Math.min(1,b(g,y)))),F=Math.sin(z)/P;return P&&[Math.cos(z),D[2]*F,-D[1]*F,D[0]*F]}}function l(g,y,D){var P=A(y,2,g[0]);P=A(P,1,g[1]),P=A(P,0,g[2]-D[2]);var z=y[0],F=y[1],N=y[2],O=P[0],L=P[1],U=P[2],B=Math.atan2(F,z)*e,W=Math.sqrt(z*z+F*F),$,ue;Math.abs(L)>W?(ue=(L>0?90:-90)-B,$=0):(ue=Math.asin(L/W)*e-B,$=Math.sqrt(W*W-L*L));var ce=180-ue-2*B,de=(Math.atan2(U,O)-Math.atan2(N,$))*e,Y=(Math.atan2(U,O)-Math.atan2(N,-$))*e,X=x(D[0],D[1],ue,de),Q=x(D[0],D[1],ce,Y);return X<=Q?[ue,de,D[2]]:[ce,Y,D[2]]}function x(g,y,D,P){var z=w(D-g),F=w(P-y);return Math.sqrt(z*z+F*F)}function w(g){return(g%360+540)%360-180}function A(g,y,D){var P=D*M,z=g.slice(),F=y===0?1:0,N=y===2?1:2,O=Math.cos(P),L=Math.sin(P);return z[F]=g[F]*O-g[N]*L,z[N]=g[N]*O+g[F]*L,z}function E(g){return[Math.atan2(2*(g[0]*g[1]+g[2]*g[3]),1-2*(g[1]*g[1]+g[2]*g[2]))*e,Math.asin(Math.max(-1,Math.min(1,2*(g[0]*g[2]-g[3]*g[1]))))*e,Math.atan2(2*(g[0]*g[3]+g[1]*g[2]),1-2*(g[2]*g[2]+g[3]*g[3]))*e]}function p(g){var y=g[0]*M,D=g[1]*M,P=Math.cos(D);return[P*Math.cos(y),P*Math.sin(y),Math.sin(D)]}function b(g,y){for(var D=0,P=0,z=g.length;P0&&B._module.calcGeoJSON(U,F)}if(!N){var W=this.updateProjection(z,F);if(W)return;(!this.viewInitial||this.scope!==O.scope)&&this.saveViewInitial(O)}this.scope=O.scope,this.updateBaseLayers(F,O),this.updateDims(F,O),this.updateFx(F,O),s.generalUpdatePerTraceModule(this.graphDiv,this,z,O);var $=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=$.selectAll(".point"),this.dataPoints.text=$.selectAll("text"),this.dataPaths.line=$.selectAll(".js-line");var ue=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=ue.selectAll("path"),this._render()},g.updateProjection=function(z,F){var N,O=this.graphDiv,L=F[this.id],U=F._size,B=L.domain,W=L.projection,$=L.lonaxis,ue=L.lataxis,ce=$._ax,de=ue._ax,Y=this.projection=y(L),X=[[U.l+U.w*B.x[0],U.t+U.h*(1-B.y[1])],[U.l+U.w*B.x[1],U.t+U.h*(1-B.y[0])]],Q=L.center||{},V=W.rotation||{},le=$.range||[],ae=ue.range||[];if(L.fitbounds){if(ce._length=X[1][0]-X[0][0],de._length=X[1][1]-X[0][1],ce.range=f(O,ce),de.range=f(O,de),!this.hasChoropleth&&L.fitbounds==="locations"){for(var j=[],ee=!1,te=0;te0?(ce.range[1]-ce.range[0]-je)/2*(Pe[1]-Pe[0])/je:0;ce.range=[Pe[0]-at,Pe[1]+at]}}}var nt=(ce.range[0]+ce.range[1])/2,tt=(de.range[0]+de.range[1])/2;if(L._isScoped)Q={lon:nt,lat:tt};else if(L._isClipped){Q={lon:nt,lat:tt},V={lon:nt,lat:tt,roll:V.roll};var Ve=W.type,he=w.lonaxisSpan[Ve]/2||180,se=w.lataxisSpan[Ve]/2||90;le=[nt-he,nt+he],ae=[tt-se,tt+se]}else Q={lon:nt,lat:tt},V={lon:nt,lat:V.lat,roll:V.roll}}Y.center([Q.lon-V.lon,Q.lat-V.lat]).rotate([-V.lon,-V.lat,V.roll]).parallels(W.parallels);var ne=P(le,ae);Y.fitExtent(X,ne);var Ce=this.bounds=Y.getBounds(ne),Ze=this.fitScale=Y.scale(),rt=Y.translate();if(L.fitbounds){var Je=Y.getBounds(P(ce.range,de.range)),St=Math.min((Ce[1][0]-Ce[0][0])/(Je[1][0]-Je[0][0]),(Ce[1][1]-Ce[0][1])/(Je[1][1]-Je[0][1]));isFinite(St)?Y.scale(St*Ze):r.warn("Something went wrong during"+this.id+"fitbounds computations.")}else Y.scale(W.scale*Ze);var kt=this.midPt=[(Ce[0][0]+Ce[1][0])/2,(Ce[0][1]+Ce[1][1])/2];if(Y.translate([rt[0]+(kt[0]-rt[0]),rt[1]+(kt[1]-rt[1])]).clipExtent(Ce),L._isAlbersUsa){var Bt=Y([Q.lon,Q.lat]),Vt=Y.translate();Y.translate([Vt[0]-(Bt[0]-Vt[0]),Vt[1]-(Bt[1]-Vt[1])])}},g.updateBaseLayers=function(z,F){var N=this,O=N.topojson,L=N.layers,U=N.basePaths;function B(Y){return Y==="lonaxis"||Y==="lataxis"}function W(Y){return!!w.lineLayers[Y]}function $(Y){return!!w.fillLayers[Y]}var ue=this.hasChoropleth?w.layersForChoropleth:w.layers,ce=ue.filter(function(Y){return W(Y)||$(Y)?F["show"+Y]:B(Y)?F[Y].showgrid:!0}),de=N.framework.selectAll(".layer").data(ce,String);de.exit().each(function(Y){delete L[Y],delete U[Y],v.select(this).remove()}),de.enter().append("g").attr("class",function(Y){return"layer "+Y}).each(function(Y){var X=L[Y]=v.select(this);Y==="bg"?N.bgRect=X.append("rect").style("pointer-events","all"):B(Y)?U[Y]=X.append("path").style("fill","none"):Y==="backplot"?X.append("g").classed("choroplethlayer",!0):Y==="frontplot"?X.append("g").classed("scatterlayer",!0):W(Y)?U[Y]=X.append("path").style("fill","none").style("stroke-miterlimit",2):$(Y)&&(U[Y]=X.append("path").style("stroke","none"))}),de.order(),de.each(function(Y){var X=U[Y],Q=w.layerNameToAdjective[Y];Y==="frame"?X.datum(w.sphereSVG):W(Y)||$(Y)?X.datum(d(O,O.objects[Y])):B(Y)&&X.datum(D(Y,F,z)).call(a.stroke,F[Y].gridcolor).call(i.dashLine,F[Y].griddash,F[Y].gridwidth),W(Y)?X.call(a.stroke,F[Q+"color"]).call(i.dashLine,"",F[Q+"width"]):$(Y)&&X.call(a.fill,F[Q+"color"])})},g.updateDims=function(z,F){var N=this.bounds,O=(F.framewidth||0)/2,L=N[0][0]-O,U=N[0][1]-O,B=N[1][0]-L+O,W=N[1][1]-U+O;i.setRect(this.clipRect,L,U,B,W),this.bgRect.call(i.setRect,L,U,B,W).call(a.fill,F.bgcolor),this.xaxis._offset=L,this.xaxis._length=B,this.yaxis._offset=U,this.yaxis._length=W},g.updateFx=function(z,F){var N=this,O=N.graphDiv,L=N.bgRect,U=z.dragmode,B=z.clickmode;if(N.isStatic)return;function W(){var de=N.viewInitial,Y={};for(var X in de)Y[N.id+"."+X]=de[X];t.call("_guiRelayout",O,Y),O.emit("plotly_doubleclick",null)}function $(de){return N.projection.invert([de[0]+N.xaxis._offset,de[1]+N.yaxis._offset])}var ue=function(de,Y){if(Y.isRect){var X=de.range={};X[N.id]=[$([Y.xmin,Y.ymin]),$([Y.xmax,Y.ymax])]}else{var Q=de.lassoPoints={};Q[N.id]=Y.map($)}},ce={element:N.bgRect.node(),gd:O,plotinfo:{id:N.id,xaxis:N.xaxis,yaxis:N.yaxis,fillRangeItems:ue},xaxes:[N.xaxis],yaxes:[N.yaxis],subplot:N.id,clickFn:function(de){de===2&&T(O)}};U==="pan"?(L.node().onmousedown=null,L.call(x(N,F)),L.on("dblclick.zoom",W),O._context._scrollZoom.geo||L.on("wheel.zoom",null)):(U==="select"||U==="lasso")&&(L.on(".zoom",null),ce.prepFn=function(de,Y,X){c(de,Y,X,ce,U)},m.init(ce)),L.on("mousemove",function(){var de=N.projection.invert(r.getPositionFromD3Event());if(!de)return m.unhover(O,v.event);N.xaxis.p2c=function(){return de[0]},N.yaxis.p2c=function(){return de[1]},n.hover(O,v.event,N.id)}),L.on("mouseout",function(){O._dragging||m.unhover(O,v.event)}),L.on("click",function(){U!=="select"&&U!=="lasso"&&(B.indexOf("select")>-1&&l(v.event,O,[N.xaxis],[N.yaxis],N.id,ce),B.indexOf("event")>-1&&n.click(O,v.event))})},g.makeFramework=function(){var z=this,F=z.graphDiv,N=F._fullLayout,O="clip"+N._uid+z.id;z.clipDef=N._clips.append("clipPath").attr("id",O),z.clipRect=z.clipDef.append("rect"),z.framework=v.select(z.container).append("g").attr("class","geo "+z.id).call(i.setClipUrl,O,F),z.project=function(L){var U=z.projection(L);return U?[U[0]-z.xaxis._offset,U[1]-z.yaxis._offset]:[null,null]},z.xaxis={_id:"x",c2p:function(L){return z.project(L)[0]}},z.yaxis={_id:"y",c2p:function(L){return z.project(L)[1]}},z.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},h.setConvert(z.mockAxis,N)},g.saveViewInitial=function(z){var F=z.center||{},N=z.projection,O=N.rotation||{};this.viewInitial={fitbounds:z.fitbounds,"projection.scale":N.scale};var L;z._isScoped?L={"center.lon":F.lon,"center.lat":F.lat}:z._isClipped?L={"projection.rotation.lon":O.lon,"projection.rotation.lat":O.lat}:L={"center.lon":F.lon,"center.lat":F.lat,"projection.rotation.lon":O.lon},r.extendFlat(this.viewInitial,L)},g.render=function(z){this._hasMarkerAngles&&z?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()},g._render=function(){var z=this.projection,F=z.getPath(),N;function O(U){var B=z(U.lonlat);return B?o(B[0],B[1]):null}function L(U){return z.isLonLatOverEdges(U.lonlat)?"none":null}for(N in this.basePaths)this.basePaths[N].attr("d",F);for(N in this.dataPaths)this.dataPaths[N].attr("d",function(U){return F(U.geojson)});for(N in this.dataPoints)this.dataPoints[N].attr("display",L).attr("transform",O)};function y(z){var F=z.projection,N=F.type,O=w.projNames[N];O="geo"+r.titleCase(O);for(var L=_[O]||e[O],U=L(),B=z._isSatellite?Math.acos(1/F.distance)*180/Math.PI:z._isClipped?w.lonaxisSpan[N]/2:null,W=["center","rotate","parallels","clipExtent"],$=function(de){return de?U:[]},ue=0;ueQ}else return!1},U.getPath=function(){return S().projection(U)},U.getBounds=function(de){return U.getPath().bounds(de)},U.precision(w.precision),z._isSatellite&&U.tilt(F.tilt).distance(F.distance),B&&U.clipAngle(B-w.clipPad),U}function D(z,F,N){var O=1e-6,L=2.5,U=F[z],B=w.scopeDefaults[F.scope],W,$,ue;z==="lonaxis"?(W=B.lonaxisRange,$=B.lataxisRange,ue=function(j,ee){return[j,ee]}):z==="lataxis"&&(W=B.lataxisRange,$=B.lonaxisRange,ue=function(j,ee){return[ee,j]});var ce={type:"linear",range:[W[0],W[1]-O],tick0:U.tick0,dtick:U.dtick};h.setConvert(ce,N);var de=h.calcTicks(ce);!F.isScoped&&z==="lonaxis"&&de.pop();for(var Y=de.length,X=new Array(Y),Q=0;Q")}}}}),fT=He({"src/traces/choropleth/event_data.js"(Z,q){"use strict";q.exports=function(_,S,M,e,t){_.location=S.location,_.z=S.z;var r=e[t];return r.fIn&&r.fIn.properties&&(_.properties=r.fIn.properties),_.ct=r.ct,_}}}),hT=He({"src/traces/choropleth/select.js"(Z,q){"use strict";q.exports=function(_,S){var M=_.cd,e=_.xaxis,t=_.yaxis,r=[],o,a,i,n,s;if(S===!1)for(o=0;o=Math.min(B,W)&&T<=Math.max(B,W)?0:1/0}if(P=Math.min($,ue)&&l<=Math.max($,ue)?0:1/0}N=Math.sqrt(P*P+z*z),u=w[D]}}}else for(D=w.length-1;D>-1;D--)d=w[D],g=m[d],y=c[d],P=h.c2p(g)-T,z=f.c2p(y)-l,F=Math.sqrt(P*P+z*z),F100},Z.isDotSymbol=function(v){return typeof v=="string"?q.DOT_RE.test(v):v>200}}}),JU=He({"src/traces/scattergl/defaults.js"(Z,q){"use strict";var v=sa(),_=so(),S=dT(),M=xx(),e=Tv(),t=Fu(),r=n1(),o=Qd(),a=md(),i=Dd(),n=ev(),s=zd();q.exports=function(f,m,c,T){function l(u,g){return v.coerce(f,m,M,u,g)}var x=f.marker?S.isOpenSymbol(f.marker.symbol):!1,w=t.isBubble(f),A=r(f,m,T,l);if(!A){m.visible=!1;return}o(f,m,T,l),l("xhoverformat"),l("yhoverformat");var E=A>>1,f=r[h],m=a!==void 0?a(f,o):f-o;m>=0?(s=h,n=h-1):i=h+1}return s}function _(r,o,a,i,n){for(var s=n+1;i<=n;){var h=i+n>>>1,f=r[h],m=a!==void 0?a(f,o):f-o;m>0?(s=h,n=h-1):i=h+1}return s}function S(r,o,a,i,n){for(var s=i-1;i<=n;){var h=i+n>>>1,f=r[h],m=a!==void 0?a(f,o):f-o;m<0?(s=h,i=h+1):n=h-1}return s}function M(r,o,a,i,n){for(var s=i-1;i<=n;){var h=i+n>>>1,f=r[h],m=a!==void 0?a(f,o):f-o;m<=0?(s=h,i=h+1):n=h-1}return s}function e(r,o,a,i,n){for(;i<=n;){var s=i+n>>>1,h=r[s],f=a!==void 0?a(h,o):h-o;if(f===0)return s;f<=0?i=s+1:n=s-1}return-1}function t(r,o,a,i,n,s){return typeof a=="function"?s(r,o,a,i===void 0?0:i|0,n===void 0?r.length-1:n|0):s(r,o,void 0,a===void 0?0:a|0,i===void 0?r.length-1:i|0)}q.exports={ge:function(r,o,a,i,n){return t(r,o,a,i,n,v)},gt:function(r,o,a,i,n){return t(r,o,a,i,n,_)},lt:function(r,o,a,i,n){return t(r,o,a,i,n,S)},le:function(r,o,a,i,n){return t(r,o,a,i,n,M)},eq:function(r,o,a,i,n){return t(r,o,a,i,n,e)}}}}),kv=He({"node_modules/pick-by-alias/index.js"(Z,q){"use strict";q.exports=function(M,e,t){var r={},o,a;if(typeof e=="string"&&(e=_(e)),Array.isArray(e)){var i={};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?M={width:S[0],height:S[0],x:0,y:0}:S.length===2?M={width:S[0],height:S[1],x:0,y:0}:M={x:S[0],y:S[1],width:S[2]-S[0]||0,height:S[3]-S[1]||0}:S&&(S=v(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"}),M={x:S.left||0,y:S.top||0},S.width==null?S.right?M.width=S.right-M.x:M.width=0:M.width=S.width,S.height==null?S.bottom?M.height=S.bottom-M.y:M.height=0:M.height=S.height),M}}}),mg=He({"node_modules/array-bounds/index.js"(Z,q){"use strict";q.exports=v;function v(_,S){if(!_||_.length==null)throw Error("Argument should be an array");S==null?S=1:S=Math.floor(S);for(var M=Array(S*2),e=0;et&&(t=_[o]),_[o]>>1,w;m.dtype||(m.dtype="array"),typeof m.dtype=="string"?w=new(a(m.dtype))(x):m.dtype&&(w=m.dtype,Array.isArray(w)&&(w.length=x));for(let P=0;Pc||L>n){for(let le=0;lete||W>pe||$=ce||j===ee)return;let we=A[ae];ee===void 0&&(ee=we.length);for(let he=j;he=N&&ne<=L&&Ce>=O&&Ce<=U&&de.push(se)}let Se=E[ae],Re=Se[j*4+0],Pe=Se[j*4+1],je=Se[j*4+2],at=Se[j*4+3],nt=X(Se,j+1),tt=le*.5,Ve=ae+1;Y(Q,V,tt,Ve,Re,Pe||je||at||nt),Y(Q,V+tt,tt,Ve,Pe,je||at||nt),Y(Q+tt,V,tt,Ve,je,at||nt),Y(Q+tt,V+tt,tt,Ve,at,nt)}function X(Q,V){let le=null,ae=0;for(;le===null;)if(le=Q[V*4+ae],ae++,ae>Q.length)return null;return le}return de}function y(P,z,F,N,O){let L=[];for(let U=0;U1&&(f=1),f<-1&&(f=-1),h*Math.acos(f)},t=function(a,i,n,s,h,f,m,c,T,l,x,w){var A=Math.pow(h,2),E=Math.pow(f,2),p=Math.pow(x,2),b=Math.pow(w,2),d=A*E-A*b-E*p;d<0&&(d=0),d/=A*b+E*p,d=Math.sqrt(d)*(m===c?-1:1);var u=d*h/f*w,g=d*-f/h*x,y=l*u-T*g+(a+n)/2,D=T*u+l*g+(i+s)/2,P=(x-u)/h,z=(w-g)/f,F=(-x-u)/h,N=(-w-g)/f,O=e(1,0,P,z),L=e(P,z,F,N);return c===0&&L>0&&(L-=_),c===1&&L<0&&(L+=_),[y,D,O,L]},r=function(a){var i=a.px,n=a.py,s=a.cx,h=a.cy,f=a.rx,m=a.ry,c=a.xAxisRotation,T=c===void 0?0:c,l=a.largeArcFlag,x=l===void 0?0:l,w=a.sweepFlag,A=w===void 0?0:w,E=[];if(f===0||m===0)return[];var p=Math.sin(T*_/360),b=Math.cos(T*_/360),d=b*(i-s)/2+p*(n-h)/2,u=-p*(i-s)/2+b*(n-h)/2;if(d===0&&u===0)return[];f=Math.abs(f),m=Math.abs(m);var g=Math.pow(d,2)/Math.pow(f,2)+Math.pow(u,2)/Math.pow(m,2);g>1&&(f*=Math.sqrt(g),m*=Math.sqrt(g));var y=t(i,n,s,h,f,m,x,A,p,b,d,u),D=v(y,4),P=D[0],z=D[1],F=D[2],N=D[3],O=Math.abs(N)/(_/4);Math.abs(1-O)<1e-7&&(O=1);var L=Math.max(Math.ceil(O),1);N/=L;for(var U=0;U4?(o=l[l.length-4],a=l[l.length-3]):(o=f,a=m),r.push(l)}return r}function S(e,t,r,o){return["C",e,t,r,o,r,o]}function M(e,t,r,o,a,i){return["C",e/3+2/3*r,t/3+2/3*o,a/3+2/3*r,i/3+2/3*o,a,i]}}}),UE=He({"node_modules/is-svg-path/index.js"(Z,q){"use strict";q.exports=function(_){return typeof _!="string"?!1:(_=_.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(_)&&/[\dz]$/i.test(_)&&_.length>4))}}}),oj=He({"node_modules/svg-path-bounds/index.js"(Z,q){"use strict";var v=M_(),_=NE(),S=nj(),M=UE(),e=K_();q.exports=t;function t(r){if(Array.isArray(r)&&r.length===1&&typeof r[0]=="string"&&(r=r[0]),typeof r=="string"&&(e(M(r),"String is not an SVG path."),r=v(r)),e(Array.isArray(r),"Argument should be a string or an array of path segments."),r=_(r),r=S(r),!r.length)return[0,0,0,0];for(var o=[1/0,1/0,-1/0,-1/0],a=0,i=r.length;ao[2]&&(o[2]=n[s+0]),n[s+1]>o[3]&&(o[3]=n[s+1]);return o}}}),sj=He({"node_modules/normalize-svg-path/index.js"(Z,q){var v=Math.PI,_=o(120);q.exports=S;function S(a){for(var i,n=[],s=0,h=0,f=0,m=0,c=null,T=null,l=0,x=0,w=0,A=a.length;w7&&(n.push(E.splice(0,7)),E.unshift("C"));break;case"S":var b=l,d=x;(i=="C"||i=="S")&&(b+=b-s,d+=d-h),E=["C",b,d,E[1],E[2],E[3],E[4]];break;case"T":i=="Q"||i=="T"?(c=l*2-c,T=x*2-T):(c=l,T=x),E=e(l,x,c,T,E[1],E[2]);break;case"Q":c=E[1],T=E[2],E=e(l,x,E[1],E[2],E[3],E[4]);break;case"L":E=M(l,x,E[1],E[2]);break;case"H":E=M(l,x,E[1],x);break;case"V":E=M(l,x,l,E[1]);break;case"Z":E=M(l,x,f,m);break}i=p,l=E[E.length-2],x=E[E.length-1],E.length>4?(s=E[E.length-4],h=E[E.length-3]):(s=l,h=x),n.push(E)}return n}function M(a,i,n,s){return["C",a,i,n,s,n,s]}function e(a,i,n,s,h,f){return["C",a/3+2/3*n,i/3+2/3*s,h/3+2/3*n,f/3+2/3*s,h,f]}function t(a,i,n,s,h,f,m,c,T,l){if(l)y=l[0],D=l[1],u=l[2],g=l[3];else{var x=r(a,i,-h);a=x.x,i=x.y,x=r(c,T,-h),c=x.x,T=x.y;var w=(a-c)/2,A=(i-T)/2,E=w*w/(n*n)+A*A/(s*s);E>1&&(E=Math.sqrt(E),n=E*n,s=E*s);var p=n*n,b=s*s,d=(f==m?-1:1)*Math.sqrt(Math.abs((p*b-p*A*A-b*w*w)/(p*A*A+b*w*w)));d==1/0&&(d=1);var u=d*n*A/s+(a+c)/2,g=d*-s*w/n+(i+T)/2,y=Math.asin(((i-g)/s).toFixed(9)),D=Math.asin(((T-g)/s).toFixed(9));y=aD&&(y=y-v*2),!m&&D>y&&(D=D-v*2)}if(Math.abs(D-y)>_){var P=D,z=c,F=T;D=y+_*(m&&D>y?1:-1),c=u+n*Math.cos(D),T=g+s*Math.sin(D);var N=t(c,T,n,s,h,0,m,z,F,[D,P,u,g])}var O=Math.tan((D-y)/4),L=4/3*n*O,U=4/3*s*O,B=[2*a-(a+L*Math.sin(y)),2*i-(i-U*Math.cos(y)),c+L*Math.sin(D),T-U*Math.cos(D),c,T];if(l)return B;N&&(B=B.concat(N));for(var W=0;W0?r.strokeStyle="white":r.strokeStyle="black",r.lineWidth=Math.abs(c)),r.translate(h*.5,f*.5),r.scale(x,x),i()){var w=new Path2D(n);r.fill(w),c&&r.stroke(w)}else{var A=_(n);S(r,A),r.fill(),c&&r.stroke()}r.setTransform(1,0,0,1,0,0);var E=e(r,{cutoff:s.cutoff!=null?s.cutoff:.5,radius:s.radius!=null?s.radius:m*.5});return E}var a;function i(){if(a!=null)return a;var n=document.createElement("canvas").getContext("2d");if(n.canvas.width=n.canvas.height=1,!window.Path2D)return a=!1;var s=new Path2D("M0,0h1v1h-1v-1Z");n.fillStyle="black",n.fill(s);var h=n.getImageData(0,0,1,1);return a=h&&h.data&&h.data[3]===255}}}),yg=He({"src/traces/scattergl/convert.js"(Z,q){"use strict";var v=ns(),_=cj(),S=v0(),M=so(),e=sa(),t=e.isArrayOrTypedArray,r=as(),o=tf(),a=rm().formatColor,i=Fu(),n=r1(),s=dT(),h=y0(),f=Km().DESELECTDIM,m={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},c=$p().appendArrayPointValue;function T(N,O){var L,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(i.hasText(O)&&(U.text=l(N,O),U.textSel=E(N,O,O.selected),U.textUnsel=E(N,O,O.unselected)),i.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 W=O.marker.opacity;for(U.markerUnsel.opacity=new Array(W.length),L=0;L500?"bold":"normal":N}function w(N,O){var L=O._length,U=O.marker,B={},W,$=t(U.symbol),ue=t(U.angle),ce=t(U.color),de=t(U.line.color),Y=t(U.opacity),X=t(U.size),Q=t(U.line.width),V;if($||(V=s.isOpenSymbol(U.symbol)),$||ce||de||Y||ue){B.symbols=new Array(L),B.angles=new Array(L),B.colors=new Array(L),B.borderColors=new Array(L);var le=U.symbol,ae=U.angle,j=a(U,U.opacity,L),ee=a(U.line,U.opacity,L);if(!t(ee[0])){var te=ee;for(ee=Array(L),W=0;Wh.TOO_MANY_POINTS||i.hasMarkers(O)?"rect":"round";if(de&&O.connectgaps){var X=W[0],Q=W[1];for($=0;$1?ce[$]:ce[0]:ce,V=t(de)?de.length>1?de[$]:de[0]:de,le=m[Q],ae=m[V],j=Y?Y/.8+1:0,ee=-ae*j-ae*.5;W.offset[$]=[le*j/X,ee/X]}}return W}q.exports={style:T,markerStyle:w,markerSelection:A,linePositions:P,errorBarPositions:z,textPosition:F}}}),jE=He({"src/traces/scattergl/scene_update.js"(Z,q){"use strict";var v=sa();q.exports=function(S,M){var e=M._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 M._scene||(e=M._scene={},e.init=function(){v.extendFlat(e,r,t)},e.init(),e.update=function(a){var i=v.repeat(a,e.count);if(e.fill2d&&e.fill2d.update(i),e.scatter2d&&e.scatter2d.update(i),e.line2d&&e.line2d.update(i),e.error2d&&e.error2d.update(i.concat(i)),e.select2d&&e.select2d.update(i),e.glText)for(var n=0;n=f,u=b*2,g={},y,D=A.makeCalcdata(x,"x"),P=E.makeCalcdata(x,"y"),z=e(x,A,"x",D),F=e(x,E,"y",P),N=z.vals,O=F.vals;x._x=N,x._y=O,x.xperiodalignment&&(x._origX=D,x._xStarts=z.starts,x._xEnds=z.ends),x.yperiodalignment&&(x._origY=P,x._yStarts=F.starts,x._yEnds=F.ends);var L=new Array(u),U=new Array(b);for(y=0;y1&&_.extendFlat(p.line,n.linePositions(T,x,w)),p.errorX||p.errorY){var b=n.errorBarPositions(T,x,w,A,E);p.errorX&&_.extendFlat(p.errorX,b.x),p.errorY&&_.extendFlat(p.errorY,b.y)}return p.text&&(_.extendFlat(p.text,{positions:w},n.textPosition(T,x,p.text,p.marker)),_.extendFlat(p.textSel,{positions:w},n.textPosition(T,x,p.text,p.markerSel)),_.extendFlat(p.textUnsel,{positions:w},n.textPosition(T,x,p.text,p.markerUnsel))),p}}}),qE=He({"src/traces/scattergl/edit_style.js"(Z,q){"use strict";var v=sa(),_=$n(),S=Km().DESELECTDIM;function M(e){var t=e[0],r=t.trace,o=t.t,a=o._scene,i=o.index,n=a.selectBatch[i],s=a.unselectBatch[i],h=a.textOptions[i],f=a.textSelectedOptions[i]||{},m=a.textUnselectedOptions[i]||{},c=v.extendFlat({},h),T,l;if(n.length||s.length){var x=f.color,w=m.color,A=h.color,E=v.isArrayOrTypedArray(A);for(c.color=new Array(r._length),T=0;T>>24,r=(M&16711680)>>>16,o=(M&65280)>>>8,a=M&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,q){"use strict";var v=Object.getOwnPropertySymbols,_=Object.prototype.hasOwnProperty,S=Object.prototype.propertyIsEnumerable;function M(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(n){return r[n]});if(a.join("")!=="0123456789")return!1;var i={};return"abcdefghijklmnopqrst".split("").forEach(function(n){i[n]=n}),Object.keys(Object.assign({},i)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}q.exports=e()?Object.assign:function(t,r){for(var o,a=M(t),i,n=1;ng.length)&&(y=g.length);for(var D=0,P=new Array(y);D0&&(L=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,L+"px",O.font].filter(function($){return $}).join(" "),N.textAlign="start",N.textBaseline="alphabetic",N.direction="ltr";var W=u(F,N,z,L,U,B);return D(W,O,L)}},1538:function(e){(function(){"use strict";if(typeof ses<"u"&&ses.ok&&!ses.ok())return;function r(y){y.permitHostObjects___&&y.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 i=new a,n=Object.freeze({});if(i.set(n,1),i.get(n)!==1)o=!0;else{e.exports=WeakMap;return}}}var s=Object.prototype.hasOwnProperty,h=Object.getOwnPropertyNames,f=Object.defineProperty,m=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),x=new Uint8Array(l);crypto.getRandomValues(x),T=c+"rand:"+Array.prototype.map.call(x,function(y){return(y%36).toString(36)}).join("")+"___"}function w(y){return!(y.substr(0,c.length)==c&&y.substr(y.length-3)==="___")}if(f(Object,"getOwnPropertyNames",{value:function(D){return h(D).filter(w)}}),"getPropertyNames"in Object){var A=Object.getPropertyNames;f(Object,"getPropertyNames",{value:function(D){return A(D).filter(w)}})}function E(y){if(y!==Object(y))throw new TypeError("Not an object: "+y);var D=y[T];if(D&&D.key===y)return D;if(m(y)){D={key:y};try{return f(y,T,{value:D,writable:!1,enumerable:!1,configurable:!1}),D}catch{return}}}(function(){var y=Object.freeze;f(Object,"freeze",{value:function(F){return E(F),y(F)}});var D=Object.seal;f(Object,"seal",{value:function(F){return E(F),D(F)}});var P=Object.preventExtensions;f(Object,"preventExtensions",{value:function(F){return E(F),P(F)}})})();function p(y){return y.prototype=null,Object.freeze(y)}var b=!1;function d(){!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,g=function(){this instanceof g||d();var y=[],D=[],P=u++;function z(L,U){var B,W=E(L);return W?P in W?W[P]:U:(B=y.indexOf(L),B>=0?D[B]:U)}function F(L){var U=E(L);return U?P in U:y.indexOf(L)>=0}function N(L,U){var B,W=E(L);return W?W[P]=U:(B=y.indexOf(L),B>=0?D[B]=U:(B=y.length,D[B]=U,y[B]=L)),this}function O(L){var U=E(L),B,W;return U?P in U&&delete U[P]:(B=y.indexOf(L),B<0?!1:(W=y.length-1,y[B]=void 0,D[B]=D[W],y[B]=y[W],y.length=W,D.length=W,!0))}return Object.create(g.prototype,{get___:{value:p(z)},has___:{value:p(F)},set___:{value:p(N)},delete___:{value:p(O)}})};g.prototype=Object.create(Object.prototype,{get:{value:function(D,P){return this.get___(D,P)},writable:!0,configurable:!0},has:{value:function(D){return this.has___(D)},writable:!0,configurable:!0},set:{value:function(D,P){return this.set___(D,P)},writable:!0,configurable:!0},delete:{value:function(D){return this.delete___(D)},writable:!0,configurable:!0}}),typeof a=="function"?function(){o&&typeof Proxy<"u"&&(Proxy=void 0);function y(){this instanceof g||d();var D=new a,P=void 0,z=!1;function F(U,B){return P?D.has(U)?D.get(U):P.get___(U,B):D.get(U,B)}function N(U){return D.has(U)||(P?P.has___(U):!1)}var O;o?O=function(U,B){return D.set(U,B),D.has(U)||(P||(P=new g),P.set(U,B)),this}:O=function(U,B){if(z)try{D.set(U,B)}catch{P||(P=new g),P.set___(U,B)}else D.set(U,B);return this};function L(U){var B=!!D.delete(U);return P&&P.delete___(U)||B}return Object.create(g.prototype,{get___:{value:p(F)},has___:{value:p(N)},set___:{value:p(O)},delete___:{value:p(L)},permitHostObjects___:{value:p(function(U){if(U===r)z=!0;else throw new Error("bogus call to permitHostObjects___")})}})}y.prototype=g.prototype,e.exports=y,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():(typeof Proxy<"u"&&(Proxy=void 0),e.exports=g)})()},236:function(e,t,r){var o=r(8284);e.exports=a;function a(){var i={};return function(n){if((typeof n!="object"||n===null)&&typeof n!="function")throw new Error("Weakmap-shim: Key must be object");var s=n.valueOf(i);return s&&s.identity===i?s:o(n,i)}}},8284:function(e){e.exports=t;function t(r,o){var a={identity:o},i=r.valueOf;return Object.defineProperty(r,"valueOf",{value:function(n){return n!==o?i.apply(this,arguments):a},writable:!0}),a}},606:function(e,t,r){var o=r(236);e.exports=a;function a(){var i=o();return{get:function(n,s){var h=i(n);return h.hasOwnProperty("value")?h.value:s},set:function(n,s){return i(n).value=s,this},has:function(n){return"value"in i(n)},delete:function(n){return delete i(n).value}}}},3349:function(e){"use strict";function t(){return function(s,h,f,m,c,T){var l=s[0],x=f[0],w=[0],A=x;m|=0;var E=0,p=x;for(E=0;E=0!=d>=0&&c.push(w[0]+.5+.5*(b+d)/(b-d))}m+=p,++w[0]}}}function r(){return t()}var o=r;function a(s){var h={};return function(m,c,T){var l=m.dtype,x=m.order,w=[l,x.join()].join(),A=h[w];return A||(h[w]=A=s([l,x])),A(m.shape.slice(0),m.data,m.stride,m.offset|0,c,T)}}function i(s){return a(o.bind(void 0,s))}function n(s){return i({funcName:s.funcName})}e.exports=n({funcName:"zeroCrossings"})},781:function(e,t,r){"use strict";e.exports=a;var o=r(3349);function a(i,n){var s=[];return n=+n||0,o(i.hi(i.shape[0]-1),s,n),s}},7790:function(){}},_={};function S(e){var t=_[e];if(t!==void 0)return t.exports;var r=_[e]={id:e,loaded:!1,exports:{}};return v[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 M=S(1964);q.exports=M})()}}),xE=He({"node_modules/color-name/index.js"(Z,q){"use strict";q.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]}}}),HN=He({"node_modules/color-normalize/node_modules/color-parse/index.js"(Z,q){"use strict";var v=xE();q.exports=S;var _={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function S(M){var e,t=[],r=1,o;if(typeof M=="string")if(M=M.toLowerCase(),v[M])t=v[M].slice(),o="rgb";else if(M==="transparent")r=0,o="rgb",t=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(M)){var a=M.slice(1),i=a.length,n=i<=4;r=1,n?(t=[parseInt(a[0]+a[0],16),parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16)],i===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)],i===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(M)){var s=e[1],h=s==="rgb",a=s.replace(/a$/,"");o=a;var i=a==="cmyk"?4:a==="gray"?1:3;t=e[2].trim().split(/\s*[,\/]\s*|\s+/).map(function(c,T){if(/%$/.test(c))return T===i?parseFloat(c)/100:a==="rgb"?parseFloat(c)*255/100:parseFloat(c);if(a[T]==="h"){if(/deg$/.test(c))return parseFloat(c);if(_[c]!==void 0)return _[c]}return parseFloat(c)}),s===a&&t.push(1),r=h||t[i]===void 0?1:t[i],t=t.slice(0,i)}else M.length>10&&/[0-9](?:\s|\/)/.test(M)&&(t=M.match(/([0-9]+)/g).map(function(f){return parseFloat(f)}),o=M.match(/([a-z])/ig).join("").toLowerCase());else isNaN(M)?Array.isArray(M)||M.length?(t=[M[0],M[1],M[2]],o="rgb",r=M.length===4?M[3]:1):M instanceof Object&&(M.r!=null||M.red!=null||M.R!=null?(o="rgb",t=[M.r||M.red||M.R||0,M.g||M.green||M.G||0,M.b||M.blue||M.B||0]):(o="hsl",t=[M.h||M.hue||M.H||0,M.s||M.saturation||M.S||0,M.l||M.lightness||M.L||M.b||M.brightness]),r=M.a||M.alpha||M.opacity||1,M.opacity!=null&&(r/=100)):(o="rgb",t=[M>>>16,(M&65280)>>>8,M&255]);return{space:o,values:t,alpha:r}}}}),WN=He({"node_modules/color-normalize/node_modules/color-rgba/index.js"(Z,q){"use strict";var v=HN();q.exports=function(M){Array.isArray(M)&&M.raw&&(M=String.raw.apply(null,arguments));var e,t,r,o=v(M);if(!o.space)return[];var a=[0,0,0],i=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]),i[0]),e[1]=Math.min(Math.max(o.values[1],a[1]),i[1]),e[2]=Math.min(Math.max(o.values[2],a[2]),i[2]),o.space[0]==="h"&&(e=_(e)),e.push(Math.min(Math.max(o.alpha,0),1)),e};function _(S){var M=S[0]/360,e=S[1]/100,t=S[2]/100,r,o,a,i,n,s=0;if(e===0)return n=t*255,[n,n,n];for(o=t<.5?t*(1+e):t+e-t*e,r=2*t-o,i=[0,0,0];s<3;)a=M+1/3*-(s-1),a<0?a++:a>1&&a--,n=6*a<1?r+(o-r)*6*a:2*a<1?o:3*a<2?r+(o-r)*(2/3-a)*6:r,i[s++]=n*255;return i}}}),mx=He({"node_modules/clamp/index.js"(Z,q){q.exports=v;function v(_,S,M){return SM?M:_:_S?S:_}}}),Q3=He({"node_modules/dtype/index.js"(Z,q){q.exports=function(v){switch(v){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}}}}),v0=He({"node_modules/color-normalize/index.js"(Z,q){"use strict";var v=WN(),_=mx(),S=Q3();q.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),i=r!=="uint8"&&r!=="uint8_clamped";return(!t.length||typeof t=="string")&&(t=v(t),t[0]/=255,t[1]/=255,t[2]/=255),M(t)?(a[0]=t[0],a[1]=t[1],a[2]=t[2],a[3]=t[3]!=null?t[3]:255,i&&(a[0]/=255,a[1]/=255,a[2]/=255,a[3]/=255),a):(i?(a[0]=t[0],a[1]=t[1],a[2]=t[2],a[3]=t[3]!=null?t[3]:1):(a[0]=_(Math.floor(t[0]*255),0,255),a[1]=_(Math.floor(t[1]*255),0,255),a[2]=_(Math.floor(t[2]*255),0,255),a[3]=t[3]==null?255:_(Math.floor(t[3]*255),0,255)),a)};function M(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))}}}),tm=He({"src/lib/str2rgbarray.js"(Z,q){"use strict";var v=v0();function _(S){return S?v(S):[0,0,0,1]}q.exports=_}}),rm=He({"src/lib/gl_format_color.js"(Z,q){"use strict";var v=ns(),_=Ch(),S=v0(),M=rc(),e=sh().defaultLine,t=hp().isArrayOrTypedArray,r=S(e),o=1;function a(f,m){var c=f;return c[3]*=m,c}function i(f){if(v(f))return r;var m=S(f);return m.length?m:r}function n(f){return v(f)?f:o}function s(f,m,c){var T=f.color;T&&T._inputArray&&(T=T._inputArray);var l=t(T),x=t(m),w=M.extractOpts(f),A=[],E,p,b,d,u;if(w.colorscale!==void 0?E=M.makeColorScaleFuncFromTrace(f):E=i,l?p=function(y,D){return y[D]===void 0?r:S(E(y[D]))}:p=i,x?b=function(y,D){return y[D]===void 0?o:n(y[D])}:b=n,l||x)for(var g=0;g0){var c=o.c2l(f);o._lowerLogErrorBound||(o._lowerLogErrorBound=c),o._lowerErrorBound=Math.min(o._lowerLogErrorBound,c)}}else i[n]=[-s[0]*r,s[1]*r]}return i}function S(e){for(var t=0;t-1?-1:D.indexOf("right")>-1?1:0}function w(D){return D==null?0:D.indexOf("top")>-1?-1:D.indexOf("bottom")>-1?1:0}function A(D){var P=0,z=0,F=[P,z];if(Array.isArray(D))for(var N=0;N=0){var W=T(U.position,U.delaunayColor,U.delaunayAxis);W.opacity=D.opacity,this.delaunayMesh?this.delaunayMesh.update(W):(W.gl=P,this.delaunayMesh=M(W),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 y(D,P){var z=new m(D,P.uid);return z.update(P),z}q.exports=y}}),wE=He({"src/traces/scatter3d/attributes.js"(Z,q){"use strict";var v=af(),_=tc(),S=ku(),M=rf().axisHoverFormat,{hovertemplateAttrs:e,texttemplateAttrs:t,templatefallbackAttrs:r}=$l(),o=au(),a=bE(),i=eT(),n=rs().extendFlat,s=pc().overrideAll,h=$m(),f=v.line,m=v.marker,c=m.line,T=n({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 x=q.exports=s({x:v.x,y:v.y,z:{valType:"data_array"},text:n({},v.text,{}),texttemplate:t(),texttemplatefallback:r({editType:"calc"}),hovertext:n({},v.hovertext,{}),hovertemplate:e(),hovertemplatefallback:r(),xhoverformat:M("x"),yhoverformat:M("y"),zhoverformat:M("z"),mode:n({},v.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:v.connectgaps,line:T,marker:n({symbol:{valType:"enumerated",values:h(i),dflt:"circle",arrayOk:!0},size:n({},m.size,{dflt:8}),sizeref:m.sizeref,sizemin:m.sizemin,sizemode:m.sizemode,opacity:n({},m.opacity,{arrayOk:!1}),colorbar:m.colorbar,line:n({width:n({},c.width,{arrayOk:!1})},S("marker.line"))},S("marker")),textposition:n({},v.textposition,{dflt:"top center"}),textfont:_({noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,editType:"calc",colorEditType:"style",arrayOk:!0,variantValues:["normal","small-caps"]}),opacity:o.opacity,hoverinfo:n({},o.hoverinfo)},"calc","nested");x.x.editType=x.y.editType=x.z.editType="calc+clearAxisTypes"}}),YN=He({"src/traces/scatter3d/defaults.js"(Z,q){"use strict";var v=so(),_=sa(),S=Fu(),M=md(),e=Dd(),t=zd(),r=wE();q.exports=function(i,n,s,h){function f(E,p){return _.coerce(i,n,r,E,p)}var m=o(i,n,f,h);if(!m){n.visible=!1;return}f("text"),f("hovertext"),f("hovertemplate"),f("hovertemplatefallback"),f("xhoverformat"),f("yhoverformat"),f("zhoverformat"),f("mode"),S.hasMarkers(n)&&M(i,n,s,h,f,{noAngle:!0,noLineDash:!0,noSelect:!0}),S.hasLines(n)&&(f("connectgaps"),e(i,n,s,h,f)),S.hasText(n)&&(f("texttemplate"),f("texttemplatefallback"),t(i,n,h,f,{noSelect:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}));var c=(n.line||{}).color,T=(n.marker||{}).color;f("surfaceaxis")>=0&&f("surfacecolor",c||T);for(var l=["x","y","z"],x=0;x<3;++x){var w="projection."+l[x];f(w+".show")&&(f(w+".opacity"),f(w+".scale"))}var A=v.getComponentMethod("errorbars","supplyDefaults");A(i,n,c||T||s,{axis:"z"}),A(i,n,c||T||s,{axis:"y",inherit:"z"}),A(i,n,c||T||s,{axis:"x",inherit:"z"})};function o(a,i,n,s){var h=0,f=n("x"),m=n("y"),c=n("z"),T=v.getComponentMethod("calendars","handleTraceDefaults");return T(a,i,["x","y","z"],s),f&&m&&c&&(h=Math.min(f.length,m.length,c.length),i._length=i._xlength=i._ylength=i._zlength=h),h}}}),KN=He({"src/traces/scatter3d/calc.js"(Z,q){"use strict";var v=Av(),_=Fd();q.exports=function(M,e){var t=[{x:!1,y:!1,trace:e,t:{}}];return v(t,e),_(M,e),t}}}),JN=He({"node_modules/get-canvas-context/index.js"(Z,q){q.exports=v;function v(_,S){if(typeof _!="string")throw new TypeError("must specify type string");if(S=S||{},typeof document>"u"&&!S.canvas)return null;var M=S.canvas||document.createElement("canvas");typeof S.width=="number"&&(M.width=S.width),typeof S.height=="number"&&(M.height=S.height);var e=S,t;try{var r=[_];_.indexOf("webgl")===0&&r.push("experimental-"+_);for(var o=0;o/g," "));n[s]=c,h.tickmode=f}}o.ticks=n;for(var s=0;s<3;++s){M[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(n)}}}),rU=He({"src/plots/gl3d/scene.js"(Z,q){"use strict";var v=Kh().gl_plot3d,_=v.createCamera,S=v.createScene,M=$N(),e=b2(),t=so(),r=sa(),o=r.preserveDrawingBuffer(),a=Wo(),i=Hc(),n=tm(),s=TE(),h=U5(),f=QN(),m=eU(),c=tU(),T=Yd().applyAutorangeOptions,l,x,w=!1;function A(z,F){var N=document.createElement("div"),O=z.container;this.graphDiv=z.graphDiv;var L=document.createElementNS("http://www.w3.org/2000/svg","svg");L.style.position="absolute",L.style.top=L.style.left="0px",L.style.width=L.style.height="100%",L.style["z-index"]=20,L.style["pointer-events"]="none",N.appendChild(L),this.svgContainer=L,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=m(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 E=A.prototype;E.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(!x&&(l=document.createElement("canvas"),x=M({canvas:l,preserveDrawingBuffer:!0,premultipliedAlpha:!0,antialias:!0}),!x))throw new Error("error creating static canvas/context for image server");F.gl=x,F.canvas=l}return F};var p=!0;E.tryCreatePlot=function(){var z=this,F=z.prepareOptions(),N=!0;try{z.glplot=S(F)}catch{if(z.staticMode||!p||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 p=!1,N},E.initializeGLCamera=function(){var z=this,F=z.fullSceneLayout.camera,N=F.projection.type==="orthographic";z.camera=_(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"})},E.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,L=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 W=L();B.saveLayout(O),B.graphDiv.emit("plotly_relayout",W)}};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 W=B.deltaX>B.deltaY?1.1:.9090909090909091,$=z.glplot.getAspectratio();z.glplot.setAspectratio({x:W*$.x,y:W*$.y,z:W*$.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=L();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},E.render=function(){var z=this,F=z.graphDiv,N,O=z.svgContainer,L=z.container.getBoundingClientRect();F._fullLayout._calcInverseTransform(F);var U=F._fullLayout._invScaleX,B=F._fullLayout._invScaleY,W=L.width*U,$=L.height*B;O.setAttributeNS(null,"viewBox","0 0 "+W+" "+$),O.setAttributeNS(null,"width",W),O.setAttributeNS(null,"height",$),c(z),z.glplot.axes.update(z.axesOptions);for(var ue=Object.keys(z.traces),ce=null,de=z.glplot.selection,Y=0;Y")):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:V._input,fullData:V,curveNumber:V.index,pointNumber:le};i.appendArrayPointValue(Se,V,le),N._module.eventData&&(Se=V._module.eventData(Se,de,V,{},le));var Re={points:[Se]};if(z.fullSceneLayout.hovermode){var Pe=[];i.loneHover({trace:V,x:(.5+.5*Q[0]/Q[3])*W,y:(.5-.5*Q[1]/Q[3])*$,xLabel:ae.xLabel,yLabel:ae.yLabel,zLabel:ae.zLabel,text:pe,name:ce.name,color:i.castHoverOption(V,le,"bgcolor")||ce.color,borderColor:i.castHoverOption(V,le,"bordercolor"),fontFamily:i.castHoverOption(V,le,"font.family"),fontSize:i.castHoverOption(V,le,"font.size"),fontColor:i.castHoverOption(V,le,"font.color"),nameLength:i.castHoverOption(V,le,"namelength"),textAlign:i.castHoverOption(V,le,"align"),hovertemplate:r.castOption(V,le,"hovertemplate"),hovertemplateLabels:r.extendFlat({},Se,ae),eventData:[Se]},{container:O,gd:F,inOut_bbox:Pe}),Se.bbox=Pe[0]}de.distance<5&&(de.buttons||w)?F.emit("plotly_click",Re):F.emit("plotly_hover",Re),this.oldEventData=Re}else i.loneUnhover(O),this.oldEventData&&F.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;z.drawAnnotations(z)},E.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 d(z,F,N){for(var O=z.fullSceneLayout,L=0;L<3;L++){var U=b[L],B=U.charAt(0),W=O[U],$=F[B],ue=F[B+"calendar"],ce=F["_"+B+"length"];if(!r.isArrayOrTypedArray($))N[0][L]=Math.min(N[0][L],0),N[1][L]=Math.max(N[1][L],ce-1);else for(var de,Y=0;Y<(ce||$.length);Y++)if(r.isArrayOrTypedArray($[Y]))for(var X=0;X<$[Y].length;++X)de=W.d2l($[Y][X],0,ue),!isNaN(de)&&isFinite(de)&&(N[0][L]=Math.min(N[0][L],de),N[1][L]=Math.max(N[1][L],de));else de=W.d2l($[Y],0,ue),!isNaN(de)&&isFinite(de)&&(N[0][L]=Math.min(N[0][L],de),N[1][L]=Math.max(N[1][L],de))}}function u(z,F){for(var N=z.fullSceneLayout,O=N.annotations||[],L=0;L<3;L++)for(var U=b[L],B=U.charAt(0),W=N[U],$=0;$V[1][B])V[0][B]=-1,V[1][B]=1;else{var at=V[1][B]-V[0][B];V[0][B]-=at/32,V[1][B]+=at/32}if(j=[V[0][B],V[1][B]],j=T(j,$),V[0][B]=j[0],V[1][B]=j[1],$.isReversed()){var nt=V[0][B];V[0][B]=V[1][B],V[1][B]=nt}}else j=$.range,V[0][B]=$.r2l(j[0]),V[1][B]=$.r2l(j[1]);V[0][B]===V[1][B]&&(V[0][B]-=1,V[1][B]+=1),le[B]=V[1][B]-V[0][B],$.range=[V[0][B],V[1][B]],$.limitRange(),O.glplot.setBounds(B,{min:$.range[0]*X[B],max:$.range[1]*X[B]})}var tt,Ve=ce.aspectmode;if(Ve==="cube")tt=[1,1,1];else if(Ve==="manual"){var he=ce.aspectratio;tt=[he.x,he.y,he.z]}else if(Ve==="auto"||Ve==="data"){var se=[1,1,1];for(B=0;B<3;++B){$=ce[b[B]],ue=$.type;var ne=ae[ue];se[B]=Math.pow(ne.acc,1/ne.count)/X[B]}Ve==="data"||Math.max.apply(null,se)/Math.min.apply(null,se)<=4?tt=se: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,Ze=F._size||null;if(Ce&&Ze){var rt=O.container.style;rt.position="absolute",rt.left=Ze.l+Ce.x[0]*Ze.w+"px",rt.top=Ze.t+(1-Ce.y[1])*Ze.h+"px",rt.width=Ze.w*(Ce.x[1]-Ce.x[0])+"px",rt.height=Ze.h*(Ce.y[1]-Ce.y[0])+"px"}O.glplot.redraw()}},E.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 g(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 y(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"}}}E.getCamera=function(){var z=this;return z.camera.view.recalcMatrix(z.camera.view.lastT()),y(z.camera)},E.setViewport=function(z){var F=this,N=z.camera;F.camera.lookAt.apply(this,g(N)),F.glplot.setAspectratio(z.aspectratio);var O=N.projection.type==="orthographic",L=F.camera._ortho;O!==L&&(F.glplot.redraw(),F.glplot.clearRGBA(),F.glplot.dispose(),F.initializeGLPlot())},E.isCameraChanged=function(z){var F=this,N=F.getCamera(),O=r.nestedProperty(z,F.id+".camera"),L=O.get();function U(ue,ce,de,Y){var X=["up","center","eye"],Q=["x","y","z"];return ce[X[de]]&&ue[X[de]][Q[Y]]===ce[X[de]][Q[Y]]}var B=!1;if(L===void 0)B=!0;else{for(var W=0;W<3;W++)for(var $=0;$<3;$++)if(!U(N,L,W,$)){B=!0;break}(!L.projection||N.projection&&N.projection.type!==L.projection.type)&&(B=!0)}return B},E.isAspectChanged=function(z){var F=this,N=F.glplot.getAspectratio(),O=r.nestedProperty(z,F.id+".aspectratio"),L=O.get();return L===void 0||L.x!==N.x||L.y!==N.y||L.z!==N.z},E.saveLayout=function(z){var F=this,N=F.fullLayout,O,L,U,B,W,$,ue=F.isCameraChanged(z),ce=F.isAspectChanged(z),de=ue||ce;if(de){var Y={};if(ue&&(O=F.getCamera(),L=r.nestedProperty(z,F.id+".camera"),U=L.get(),Y[F.id+".camera"]=U),ce&&(B=F.glplot.getAspectratio(),W=r.nestedProperty(z,F.id+".aspectratio"),$=W.get(),Y[F.id+".aspectratio"]=$),t.call("_storeDirectGUIEdit",z,N._preGUI,Y),ue){L.set(O);var X=r.nestedProperty(N,F.id+".camera");X.set(O)}if(ce){W.set(B);var Q=r.nestedProperty(N,F.id+".aspectratio");Q.set(B),F.glplot.redraw()}}return de},E.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 L=N.graphDiv,U=L._fullLayout,B=N.fullSceneLayout.camera,W=B.up.x,$=B.up.y,ue=B.up.z;if(ue/Math.sqrt(W*W+$*$+ue*ue)<.999){var ce=N.id+".camera.up",de={x:0,y:0,z:1},Y={};Y[ce]=de;var X=L.layout;t.call("_storeDirectGUIEdit",X,U._preGUI,Y),B.up=de,r.nestedProperty(X,ce).set(de)}}else O.keyBindingMode=z;N.fullSceneLayout.hovermode=F};function D(z,F,N){for(var O=0,L=N-1;O0)for(var W=255/B,$=0;$<3;++$)z[U+$]=Math.min(W*z[U+$],255)}}E.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,L=N.drawingBufferHeight;N.bindFramebuffer(N.FRAMEBUFFER,null);var U=new Uint8Array(O*L*4);N.readPixels(0,0,O,L,N.RGBA,N.UNSIGNED_BYTE,U),D(U,O,L),P(U,O,L);var B=document.createElement("canvas");B.width=O,B.height=L;var W=B.getContext("2d",{willReadFrequently:!0}),$=W.createImageData(O,L);$.data.set(U),W.putImageData($,0,0);var ue;switch(z){case"jpeg":ue=B.toDataURL("image/jpeg");break;case"webp":ue=B.toDataURL("image/webp");break;default:ue=B.toDataURL("image/png")}return F.staticMode&&F.container.removeChild(l),ue},E.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}},E.make4thDimension=function(){var z=this,F=z.graphDiv,N=F._fullLayout;z._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},a.setConvert(z._mockAxis,N)},q.exports=A}}),aU=He({"src/plots/gl3d/layout/attributes.js"(Z,q){"use strict";q.exports={scene:{valType:"subplotid",dflt:"scene",editType:"calc+clearAxisTypes"}}}}),AE=He({"src/plots/gl3d/layout/axis_attributes.js"(Z,q){"use strict";var v=$n(),_=Xh(),S=rs().extendFlat,M=pc().overrideAll;q.exports=M({visible:_.visible,showspikes:{valType:"boolean",dflt:!0},spikesides:{valType:"boolean",dflt:!0},spikethickness:{valType:"number",min:0,dflt:2},spikecolor:{valType:"color",dflt:v.defaultLine},showbackground:{valType:"boolean",dflt:!1},backgroundcolor:{valType:"color",dflt:"rgba(204, 204, 204, 0.5)"},showaxeslabels:{valType:"boolean",dflt:!0},color:_.color,categoryorder:_.categoryorder,categoryarray:_.categoryarray,title:{text:_.title.text,font:_.title.font},type:S({},_.type,{values:["-","linear","log","date","category"]}),autotypenumbers:_.autotypenumbers,autorange:_.autorange,autorangeoptions:{minallowed:_.autorangeoptions.minallowed,maxallowed:_.autorangeoptions.maxallowed,clipmin:_.autorangeoptions.clipmin,clipmax:_.autorangeoptions.clipmax,include:_.autorangeoptions.include,editType:"plot"},rangemode:_.rangemode,minallowed:_.minallowed,maxallowed:_.maxallowed,range:S({},_.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],anim:!1}),tickmode:_.minor.tickmode,nticks:_.nticks,tick0:_.tick0,dtick:_.dtick,tickvals:_.tickvals,ticktext:_.ticktext,ticks:_.ticks,mirror:_.mirror,ticklen:_.ticklen,tickwidth:_.tickwidth,tickcolor:_.tickcolor,showticklabels:_.showticklabels,labelalias:_.labelalias,tickfont:_.tickfont,tickangle:_.tickangle,tickprefix:_.tickprefix,showtickprefix:_.showtickprefix,ticksuffix:_.ticksuffix,showticksuffix:_.showticksuffix,showexponent:_.showexponent,exponentformat:_.exponentformat,minexponent:_.minexponent,separatethousands:_.separatethousands,tickformat:_.tickformat,tickformatstops:_.tickformatstops,hoverformat:_.hoverformat,showline:_.showline,linecolor:_.linecolor,linewidth:_.linewidth,showgrid:_.showgrid,gridcolor:S({},_.gridcolor,{dflt:"rgb(204, 204, 204)"}),gridwidth:_.gridwidth,zeroline:_.zeroline,zerolinecolor:_.zerolinecolor,zerolinewidth:_.zerolinewidth},"plot","from-root")}}),SE=He({"src/plots/gl3d/layout/layout_attributes.js"(Z,q){"use strict";var v=AE(),_=wc().attributes,S=rs().extendFlat,M=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"}}q.exports={_arrayAttrRegexps:[M("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:_({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:v,yaxis:v,zaxis:v,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"}}}),iU=He({"src/plots/gl3d/layout/axis_defaults.js"(Z,q){"use strict";var v=Ch().mix,_=sa(),S=zl(),M=AE(),e=B5(),t=F_(),r=["xaxis","yaxis","zaxis"],o=100*136/187;q.exports=function(i,n,s){var h,f;function m(l,x){return _.coerce(h,f,M,l,x)}for(var c=0;c1;function m(c){if(!f){var T=v.validate(n[c],t[c]);if(T)return n[c]}}M(n,s,h,{type:o,attributes:t,handleDefaults:a,fullLayout:s,font:s.font,fullData:h,getDfltFromLayout:m,autotypenumbersDflt:s.autotypenumbers,paper_bgcolor:s.paper_bgcolor,calendar:s.calendar})};function a(i,n,s,h){for(var f=s("bgcolor"),m=_.combine(f,h.paper_bgcolor),c=["up","center","eye"],T=0;T.999)&&(E="turntable")}else E="turntable";s("dragmode",E),s("hovermode",h.getDfltFromLayout("hovermode"))}}}),m0=He({"src/plots/gl3d/index.js"(Z){"use strict";var q=pc().overrideAll,v=Ym(),_=rU(),S=Wh().getSubplotData,M=sa(),e=vd(),t="gl3d",r="scene";Z.name=t,Z.attr=r,Z.idRoot=r,Z.idRegex=Z.attrRegex=M.counterRegex("scene"),Z.attributes=aU(),Z.layoutAttributes=SE(),Z.baseLayoutAttrOverrides=q({hoverlabel:v.hoverlabel},"plot","nested"),Z.supplyLayoutDefaults=nU(),Z.plot=function(a){for(var i=a._fullLayout,n=a._fullData,s=i._subplots[t],h=0;h0){D=h[P];break}return D}function T(g,y){if(!(g<1||y<1)){for(var D=m(g),P=m(y),z=1,F=0;FA;)P--,P/=c(P),P++,P1?z:1};function E(g,y,D){var P=D[8]+D[2]*y[0]+D[5]*y[1];return g[0]=(D[6]+D[0]*y[0]+D[3]*y[1])/P,g[1]=(D[7]+D[1]*y[0]+D[4]*y[1])/P,g}function p(g,y,D){return b(g,y,E,D),g}function b(g,y,D,P){for(var z=[0,0],F=g.shape[0],N=g.shape[1],O=0;O0&&this.contourStart[P]!==null&&this.contourEnd[P]!==null&&this.contourEnd[P]>this.contourStart[P]))for(y[P]=!0,z=this.contourStart[P];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=n("x"),m=n("y"),c=n("z"),T=n("value");if(!f||!f.length||!m||!m.length||!c||!c.length||!T||!T.length){o.visible=!1;return}var l=_.getComponentMethod("calendars","handleTraceDefaults");l(r,o,["x","y","z"],i),n("valuehoverformat"),["x","y","z"].forEach(function(E){n(E+"hoverformat");var p="caps."+E,b=n(p+".show");b&&n(p+".fill");var d="slices."+E,u=n(d+".show");u&&(n(d+".fill"),n(d+".locations"))});var x=n("spaceframe.show");x&&n("spaceframe.fill");var w=n("surface.show");w&&(n("surface.count"),n("surface.fill"),n("surface.pattern"));var A=n("contour.show");A&&(n("contour.color"),n("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(E){n(E)}),M(r,o,i,n,{prefix:"",cLetter:"c"}),o._length=null}q.exports={supplyDefaults:e,supplyIsoDefaults:t}}}),rT=He({"src/traces/streamtube/calc.js"(Z,q){"use strict";var v=sa(),_=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=M(o);o._gridFill=a.fill,o._Xs=a.Xs,o._Ys=a.Ys,o._Zs=a.Zs,o._len=a.len;var i=0,n,s,h;o.starts&&(n=t(o.starts.x||[]),s=t(o.starts.y||[]),h=t(o.starts.z||[]),i=Math.min(n.length,s.length,h.length)),o._startsX=n||[],o._startsY=s||[],o._startsZ=h||[];var f=0,m=1/0,c;for(c=0;c1&&(u=o[n-1],y=a[n-1],P=i[n-1]),s=0;su?"-":"+")+"x"),A=A.replace("y",(g>y?"-":"+")+"y"),A=A.replace("z",(D>P?"-":"+")+"z");var O=function(){n=0,z=[],F=[],N=[]};(!n||n0;m--){var c=Math.min(f[m],f[m-1]),T=Math.max(f[m],f[m-1]);if(T>c&&c-1}function ee(_t,Fe){return _t===null?Fe:_t}function te(_t,Fe,Ye){ue();var Ae=[Fe],Le=[Ye];if(V>=1)Ae=[Fe],Le=[Ye];else if(V>0){var We=ae(Fe,Ye);Ae=We.xyzv,Le=We.abc}for(var Ke=0;Ke-1?Ye[ot]:$(Ut,Ct,Pt);cr>-1?st[ot]=cr:st[ot]=de(Ut,Ct,Pt,ee(_t,jt))}Y(st[0],st[1],st[2])}}function pe(_t,Fe,Ye){var Ae=function(Le,We,Ke){te(_t,[Fe[Le],Fe[We],Fe[Ke]],[Ye[Le],Ye[We],Ye[Ke]])};Ae(0,1,2),Ae(2,3,0)}function we(_t,Fe,Ye){var Ae=function(Le,We,Ke){te(_t,[Fe[Le],Fe[We],Fe[Ke]],[Ye[Le],Ye[We],Ye[Ke]])};Ae(0,1,2),Ae(3,0,1),Ae(2,3,0),Ae(1,2,3)}function Se(_t,Fe,Ye,Ae){var Le=_t[3];LeAe&&(Le=Ae);for(var We=(_t[3]-Le)/(_t[3]-Fe[3]+1e-9),Ke=[],st=0;st<4;st++)Ke[st]=(1-We)*_t[st]+We*Fe[st];return Ke}function Re(_t,Fe,Ye){return _t>=Fe&&_t<=Ye}function Pe(_t){var Fe=.001*(O-N);return _t>=N-Fe&&_t<=O+Fe}function je(_t){for(var Fe=[],Ye=0;Ye<4;Ye++){var Ae=_t[Ye];Fe.push([h._x[Ae],h._y[Ae],h._z[Ae],h._value[Ae]])}return Fe}var at=3;function nt(_t,Fe,Ye,Ae,Le,We){We||(We=1),Ye=[-1,-1,-1];var Ke=!1,st=[Re(Fe[0][3],Ae,Le),Re(Fe[1][3],Ae,Le),Re(Fe[2][3],Ae,Le)];if(!st[0]&&!st[1]&&!st[2])return!1;var ot=function(Ct,Pt,jt){return Pe(Pt[0][3])&&Pe(Pt[1][3])&&Pe(Pt[2][3])?(te(Ct,Pt,jt),!0):West?[z,We]:[We,F];Bt(Fe,ot[0],ot[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&&(Fa.push(Wa.id),Ct==="x"?Ra.push([Wa.distRatio,0,0]):Ct==="y"?Ra.push([0,Wa.distRatio,0]):Ra.push([0,0,Wa.distRatio]))}else Ct==="x"?_a=qr(1,u-1):Ct==="y"?_a=qr(1,g-1):_a=qr(1,y-1);Fa.length>0&&(Ct==="x"?Pt[cr]=Vt(_t,Fa,or,nr,Ra,Pt[cr]):Ct==="y"?Pt[cr]=Ar(_t,Fa,or,nr,Ra,Pt[cr]):Pt[cr]=vr(_t,Fa,or,nr,Ra,Pt[cr]),cr++),_a.length>0&&(Ct==="x"?Pt[cr]=Ze(_t,_a,or,nr,Pt[cr]):Ct==="y"?Pt[cr]=rt(_t,_a,or,nr,Pt[cr]):Pt[cr]=Je(_t,_a,or,nr,Pt[cr]),cr++)}var Ca=h.caps[Ct];Ca.show&&Ca.fill&&(le(Ca.fill),Ct==="x"?Pt[cr]=Ze(_t,[0,u-1],or,nr,Pt[cr]):Ct==="y"?Pt[cr]=rt(_t,[0,g-1],or,nr,Pt[cr]):Pt[cr]=Je(_t,[0,y-1],or,nr,Pt[cr]),cr++)}}),w===0&&ce(),h._meshX=L,h._meshY=U,h._meshZ=B,h._meshIntensity=W,h._Xs=p,h._Ys=b,h._Zs=d}return Ur(),h}function s(h,f){var m=h.glplot.gl,c=v({gl:m}),T=new o(h,c,f.uid);return c._trace=T,T.update(f),h.glplot.add(c),T}q.exports={findNearestOnAxis:r,generateIsoMeshes:n,createIsosurfaceTrace:s}}}),hU=He({"src/traces/isosurface/index.js"(Z,q){"use strict";q.exports={attributes:tT(),supplyDefaults:EE().supplyDefaults,calc:kE(),colorbar:{min:"cmin",max:"cmax"},plot:aT().createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:m0(),categories:["gl3d","showLegend"],meta:{}}}}),pU=He({"lib/isosurface.js"(Z,q){"use strict";q.exports=hU()}}),CE=He({"src/traces/volume/attributes.js"(Z,q){"use strict";var v=ku(),_=tT(),S=gx(),M=au(),e=rs().extendFlat,t=pc().overrideAll,r=q.exports=t(e({x:_.x,y:_.y,z:_.z,value:_.value,isomin:_.isomin,isomax:_.isomax,surface:_.surface,spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:1}},slices:_.slices,caps:_.caps,text:_.text,hovertext:_.hovertext,xhoverformat:_.xhoverformat,yhoverformat:_.yhoverformat,zhoverformat:_.zhoverformat,valuehoverformat:_.valuehoverformat,hovertemplate:_.hovertemplate,hovertemplatefallback:_.hovertemplatefallback},v("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{colorbar:_.colorbar,opacity:_.opacity,opacityscale:S.opacityscale,lightposition:_.lightposition,lighting:_.lighting,flatshading:_.flatshading,contour:_.contour,hoverinfo:e({},M.hoverinfo),showlegend:e({},M.showlegend,{dflt:!1})}),"calc","nested");r.x.editType=r.y.editType=r.z.editType=r.value.editType="calc+clearAxisTypes"}}),dU=He({"src/traces/volume/defaults.js"(Z,q){"use strict";var v=sa(),_=CE(),S=EE().supplyIsoDefaults,M=ME().opacityscaleDefaults;q.exports=function(t,r,o,a){function i(n,s){return v.coerce(t,r,_,n,s)}S(t,r,o,a,i),M(t,r,a,i)}}}),vU=He({"src/traces/volume/convert.js"(Z,q){"use strict";var v=Kh().gl_mesh3d,_=rm().parseColorScale,S=sa().isArrayOrTypedArray,M=tm(),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 i=a.prototype;i.handlePick=function(s){if(s.object===this.mesh){var h=s.data.index,f=this.data._meshX[h],m=this.data._meshY[h],c=this.data._meshZ[h],T=this.data._Ys.length,l=this.data._Zs.length,x=r(f,this.data._Xs).id,w=r(m,this.data._Ys).id,A=r(c,this.data._Zs).id,E=s.index=A+l*w+l*T*x;s.traceCoordinate=[this.data._meshX[E],this.data._meshY[E],this.data._meshZ[E],this.data._value[E]];var p=this.data.hovertext||this.data.text;return S(p)&&p[E]!==void 0?s.textLabel=p[E]:p&&(s.textLabel=p),!0}},i.update=function(s){var h=this.scene,f=h.fullSceneLayout;this.data=o(s);function m(w,A,E,p){return A.map(function(b){return w.d2l(b,0,p)*E})}var c=t(m(f.xaxis,s._meshX,h.dataScale[0],s.xcalendar),m(f.yaxis,s._meshY,h.dataScale[1],s.ycalendar),m(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:M(s.contour.color).slice(0,3),contourWidth:s.contour.width,useFacetNormals:s.flatshading},x=e(s);l.vertexIntensity=s._meshIntensity,l.vertexIntensityBounds=[x.min,x.max],l.colormap=_(s),this.mesh.update(l)},i.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function n(s,h){var f=s.glplot.gl,m=v({gl:f}),c=new a(s,m,h.uid);return m._trace=c,c.update(h),s.glplot.add(m),c}q.exports=n}}),mU=He({"src/traces/volume/index.js"(Z,q){"use strict";q.exports={attributes:CE(),supplyDefaults:dU(),calc:kE(),colorbar:{min:"cmin",max:"cmax"},plot:vU(),moduleType:"trace",name:"volume",basePlotModule:m0(),categories:["gl3d","showLegend"],meta:{}}}}),gU=He({"lib/volume.js"(Z,q){"use strict";q.exports=mU()}}),yU=He({"src/traces/mesh3d/defaults.js"(Z,q){"use strict";var v=so(),_=sa(),S=_h(),M=M1();q.exports=function(t,r,o,a){function i(m,c){return _.coerce(t,r,M,m,c)}function n(m){var c=m.map(function(T){var l=i(T);return l&&_.isArrayOrTypedArray(l)?l:null});return c.every(function(T){return T&&T.length===c[0].length})&&c}var s=n(["x","y","z"]);if(!s){r.visible=!1;return}if(n(["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=v.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(m){i(m)});var f=i("contour.show");f&&(i("contour.color"),i("contour.width")),"intensity"in t?(i("intensity"),i("intensitymode"),S(t,r,a,i,{prefix:"",cLetter:"c"})):(r.showscale=!1,"facecolor"in t?i("facecolor"):"vertexcolor"in t?i("vertexcolor"):i("color",o)),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),i("xhoverformat"),i("yhoverformat"),i("zhoverformat"),r._length=null}}}),_U=He({"src/traces/mesh3d/calc.js"(Z,q){"use strict";var v=Tp();q.exports=function(S,M){M.intensity&&v(S,M,{vals:M.intensity,containerStr:"",cLetter:"c"})}}}),xU=He({"src/traces/mesh3d/convert.js"(Z,q){"use strict";var v=Kh().gl_mesh3d,_=Kh().delaunay_triangulate,S=Kh().alpha_shape,M=Kh().convex_hull,e=rm().parseColorScale,t=sa().isArrayOrTypedArray,r=tm(),o=rc().extractOpts,a=E1();function i(l,x,w){this.scene=l,this.uid=w,this.mesh=x,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var n=i.prototype;n.handlePick=function(l){if(l.object===this.mesh){var x=l.index=l.data.index;l.data._cellCenter?l.traceCoordinate=l.data.dataCoordinate:l.traceCoordinate=[this.data.x[x],this.data.y[x],this.data.z[x]];var w=this.data.hovertext||this.data.text;return t(w)&&w[x]!==void 0?l.textLabel=w[x]:w&&(l.textLabel=w),!0}};function s(l){for(var x=[],w=l.length,A=0;A=x-.5)return!1;return!0}n.update=function(l){var x=this.scene,w=x.fullSceneLayout;this.data=l;var A=l.x.length,E=a(h(w.xaxis,l.x,x.dataScale[0],l.xcalendar),h(w.yaxis,l.y,x.dataScale[1],l.ycalendar),h(w.zaxis,l.z,x.dataScale[2],l.zcalendar)),p;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;p=a(f(l.i),f(l.j),f(l.k))}else l.alphahull===0?p=M(E):l.alphahull>0?p=S(l.alphahull,E):p=m(l.delaunayaxis,E);var b={positions:E,cells:p,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 d=o(l);this.color="#fff";var u=l.intensitymode;b[u+"Intensity"]=l.intensity,b[u+"IntensityBounds"]=[d.min,d.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)},n.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function T(l,x){var w=l.glplot.gl,A=v({gl:w}),E=new i(l,A,x.uid);return A._trace=E,E.update(x),l.glplot.add(A),E}q.exports=T}}),bU=He({"src/traces/mesh3d/index.js"(Z,q){"use strict";q.exports={attributes:M1(),supplyDefaults:yU(),calc:_U(),colorbar:{min:"cmin",max:"cmax"},plot:xU(),moduleType:"trace",name:"mesh3d",basePlotModule:m0(),categories:["gl3d","showLegend"],meta:{}}}}),wU=He({"lib/mesh3d.js"(Z,q){"use strict";q.exports=bU()}}),LE=He({"src/traces/cone/attributes.js"(Z,q){"use strict";var v=ku(),_=rf().axisHoverFormat,{hovertemplateAttrs:S,templatefallbackAttrs:M}=$l(),e=M1(),t=au(),r=rs().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:M({editType:"calc"}),uhoverformat:_("u",1),vhoverformat:_("v",1),whoverformat:_("w",1),xhoverformat:_("x"),yhoverformat:_("y"),zhoverformat:_("z"),showlegend:r({},t.showlegend,{dflt:!1})};r(o,v("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var a=["opacity","lightposition","lighting"];a.forEach(function(i){o[i]=e[i]}),o.hoverinfo=r({},t.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"}),q.exports=o}}),TU=He({"src/traces/cone/defaults.js"(Z,q){"use strict";var v=sa(),_=_h(),S=LE();q.exports=function(e,t,r,o){function a(T,l){return v.coerce(e,t,S,T,l)}var i=a("u"),n=a("v"),s=a("w"),h=a("x"),f=a("y"),m=a("z");if(!i||!i.length||!n||!n.length||!s||!s.length||!h||!h.length||!f||!f.length||!m||!m.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"),_(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}}}),AU=He({"src/traces/cone/calc.js"(Z,q){"use strict";var v=Tp();q.exports=function(S,M){for(var e=M.u,t=M.v,r=M.w,o=Math.min(M.x.length,M.y.length,M.z.length,e.length,t.length,r.length),a=-1/0,i=1/0,n=0;n2?c=f.slice(1,m-1):m===2?c=[(f[0]+f[1])/2]:c=f,c}function n(f){var m=f.length;return m===1?[.5,.5]:[f[1]-f[0],f[m-1]-f[m-2]]}function s(f,m){var c=f.fullSceneLayout,T=f.dataScale,l=m._len,x={};function w(de,Y){var X=c[Y],Q=T[r[Y]];return S.simpleMap(de,function(V){return X.d2l(V)*Q})}if(x.vectors=t(w(m._u,"xaxis"),w(m._v,"yaxis"),w(m._w,"zaxis"),l),!l)return{positions:[],cells:[]};var A=w(m._Xs,"xaxis"),E=w(m._Ys,"yaxis"),p=w(m._Zs,"zaxis");x.meshgrid=[A,E,p],x.gridFill=m._gridFill;var b=m._slen;if(b)x.startingPositions=t(w(m._startsX,"xaxis"),w(m._startsY,"yaxis"),w(m._startsZ,"zaxis"));else{for(var d=E[0],u=i(A),g=i(p),y=new Array(u.length*g.length),D=0,P=0;Pd&&(d=D[0]),D[1]u&&(u=D[1])}function y(D){switch(D.type){case"GeometryCollection":D.geometries.forEach(y);break;case"Point":g(D.coordinates);break;case"MultiPoint":D.coordinates.forEach(g);break}}w.arcs.forEach(function(D){for(var P=-1,z=D.length,F;++Pd&&(d=F[0]),F[1]u&&(u=F[1])});for(E in w.objects)y(w.objects[E]);return[p,b,d,u]}function e(w,A){for(var E,p=w.length,b=p-A;b<--p;)E=w[b],w[b++]=w[p],w[p]=E}function t(w,A){return typeof A=="string"&&(A=w.objects[A]),A.type==="GeometryCollection"?{type:"FeatureCollection",features:A.geometries.map(function(E){return r(w,E)})}:r(w,A)}function r(w,A){var E=A.id,p=A.bbox,b=A.properties==null?{}:A.properties,d=o(w,A);return E==null&&p==null?{type:"Feature",properties:b,geometry:d}:p==null?{type:"Feature",id:E,properties:b,geometry:d}:{type:"Feature",id:E,bbox:p,properties:b,geometry:d}}function o(w,A){var E=S(w.transform),p=w.arcs;function b(P,z){z.length&&z.pop();for(var F=p[P<0?~P:P],N=0,O=F.length;N1)p=s(w,A,E);else for(b=0,p=new Array(d=w.arcs.length);b1)for(var z=1,F=g(D[0]),N,O;zF&&(O=D[0],D[0]=D[z],D[z]=O,F=N);return D}).filter(function(y){return y.length>0})}}function c(w,A){for(var E=0,p=w.length;E>>1;w[b]=2))throw new Error("n must be \u22652");y=w.bbox||M(w);var E=y[0],p=y[1],b=y[2],d=y[3],u;A={scale:[b-E?(b-E)/(u-1):1,d-p?(d-p)/(u-1):1],translate:[E,p]}}else y=w.bbox;var g=l(A),y,D,P=w.objects,z={};function F(L){return g(L)}function N(L){var U;switch(L.type){case"GeometryCollection":U={type:"GeometryCollection",geometries:L.geometries.map(N)};break;case"Point":U={type:"Point",coordinates:F(L.coordinates)};break;case"MultiPoint":U={type:"MultiPoint",coordinates:L.coordinates.map(F)};break;default:return L}return L.id!=null&&(U.id=L.id),L.bbox!=null&&(U.bbox=L.bbox),L.properties!=null&&(U.properties=L.properties),U}function O(L){var U=0,B=1,W=L.length,$,ue=new Array(W);for(ue[0]=g(L[0],0);++U0&&(M.push(e),e=[])}return e.length>0&&M.push(e),M},Z.makeLine=function(v){return v.length===1?{type:"LineString",coordinates:v[0]}:{type:"MultiLineString",coordinates:v}},Z.makePolygon=function(v){if(v.length===1)return{type:"Polygon",coordinates:v};for(var _=new Array(v.length),S=0;Se(N,z)),F)}function r(P,z,F={}){for(let O of P){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 L=0;Lr(N,z)),F)}function a(P,z,F={}){if(P.length<2)throw new Error("coordinates must be an array of two or more positions");return S({type:"LineString",coordinates:P},z,F)}function i(P,z,F={}){return n(P.map(N=>a(N,z)),F)}function n(P,z={}){let F={type:"FeatureCollection"};return z.id&&(F.id=z.id),z.bbox&&(F.bbox=z.bbox),F.features=P,F}function s(P,z,F={}){return S({type:"MultiLineString",coordinates:P},z,F)}function h(P,z,F={}){return S({type:"MultiPoint",coordinates:P},z,F)}function f(P,z,F={}){return S({type:"MultiPolygon",coordinates:P},z,F)}function m(P,z,F={}){return S({type:"GeometryCollection",geometries:P},z,F)}function c(P,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(P*F)/F}function T(P,z="kilometers"){let F=v[z];if(!F)throw new Error(z+" units is invalid");return P*F}function l(P,z="kilometers"){let F=v[z];if(!F)throw new Error(z+" units is invalid");return P/F}function x(P,z){return E(l(P,z))}function w(P){let z=P%360;return z<0&&(z+=360),z}function A(P){return P=P%360,P>180?P-360:P<-180?P+360:P}function E(P){return P%(2*Math.PI)*180/Math.PI}function p(P){return P%360*Math.PI/180}function b(P,z="kilometers",F="kilometers"){if(!(P>=0))throw new Error("length must be a positive number");return T(l(P,z),F)}function d(P,z="meters",F="kilometers"){if(!(P>=0))throw new Error("area must be a positive number");let N=_[z];if(!N)throw new Error("invalid original units");let O=_[F];if(!O)throw new Error("invalid final units");return P/N*O}function u(P){return!isNaN(P)&&P!==null&&!Array.isArray(P)}function g(P){return P!==null&&typeof P=="object"&&!Array.isArray(P)}function y(P){if(!P)throw new Error("bbox is required");if(!Array.isArray(P))throw new Error("bbox must be an Array");if(P.length!==4&&P.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");P.forEach(z=>{if(!u(z))throw new Error("bbox must only contain numbers")})}function D(P){if(!P)throw new Error("id is required");if(["string","number"].indexOf(typeof P)===-1)throw new Error("id must be a number or a string")}Z.areaFactors=_,Z.azimuthToBearing=A,Z.bearingToAzimuth=w,Z.convertArea=d,Z.convertLength=b,Z.degreesToRadians=p,Z.earthRadius=q,Z.factors=v,Z.feature=S,Z.featureCollection=n,Z.geometry=M,Z.geometryCollection=m,Z.isNumber=u,Z.isObject=g,Z.lengthToDegrees=x,Z.lengthToRadians=l,Z.lineString=a,Z.lineStrings=i,Z.multiLineString=s,Z.multiPoint=h,Z.multiPolygon=f,Z.point=e,Z.points=t,Z.polygon=r,Z.polygons=o,Z.radiansToDegrees=E,Z.radiansToLength=T,Z.round=c,Z.validateBBox=y,Z.validateId=D}}),sT=He({"node_modules/@turf/meta/dist/cjs/index.cjs"(Z){"use strict";Object.defineProperty(Z,"__esModule",{value:!0});var q=oT();function v(l,x,w){if(l!==null)for(var A,E,p,b,d,u,g,y=0,D=0,P,z=l.type,F=z==="FeatureCollection",N=z==="Feature",O=F?l.features.length:1,L=0;Lu||F>g||N>y){d=D,u=A,g=F,y=N,p=0;return}var O=q.lineString.call(void 0,[d,D],w.properties);if(x(O,A,E,N,p)===!1)return!1;p++,d=D})===!1)return!1}}})}function h(l,x,w){var A=w,E=!1;return s(l,function(p,b,d,u,g){E===!1&&w===void 0?A=p:A=x(A,p,b,d,u,g),E=!0}),A}function f(l,x){if(!l)throw new Error("geojson is required");i(l,function(w,A,E){if(w.geometry!==null){var p=w.geometry.type,b=w.geometry.coordinates;switch(p){case"LineString":if(x(w,A,E,0,0)===!1)return!1;break;case"Polygon":for(var d=0;di+S(n),0)}function S(a){let i=0,n;switch(a.type){case"Polygon":return M(a.coordinates);case"MultiPolygon":for(n=0;n0){i+=Math.abs(r(a[0]));for(let n=1;n=i?(s+2)%i:s+2],c=h[0]*t,T=f[1]*t,l=m[0]*t;n+=(l-c)*Math.sin(T),s++}return n*e}var o=_;Z.area=_,Z.default=o}}),FU=He({"node_modules/@turf/centroid/dist/cjs/index.cjs"(Z){"use strict";Object.defineProperty(Z,"__esModule",{value:!0});var q=oT(),v=sT();function _(M,e={}){let t=0,r=0,o=0;return v.coordEach.call(void 0,M,function(a){t+=a[0],r+=a[1],o++},!0),q.point.call(void 0,[t/o,r/o],e.properties)}var S=_;Z.centroid=_,Z.default=S}}),OU=He({"node_modules/@turf/bbox/dist/cjs/index.cjs"(Z){"use strict";Object.defineProperty(Z,"__esModule",{value:!0});var q=sT();function v(S,M={}){if(S.bbox!=null&&M.recompute!==!0)return S.bbox;let e=[1/0,1/0,-1/0,-1/0];return q.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&&y[D+1][0]<0)return D;return null}function w(y){var D=y.geometry,P=D.coordinates,z=y.id,F=[],N,O,L,U;switch(z==="RUS"||z==="FJI"?N=function(B){var W;if(x(B)===null)W=B;else for(W=new Array(B.length),U=0;UW?$[ue++]=[B[U][0]+l,B[U][1]]:U===W?($[ue++]=B[U],$[ue++]=[B[U][0],-90]):$[ue++]=B[U];var ce=i.tester($);ce.pts.pop(),F.push(ce)}:N=function(B){F.push(i.tester(B))},D.type){case"MultiPolygon":for(O=0;O0?de.properties.ct=p(de):de.properties.ct=[NaN,NaN],ue.fIn=W,ue.fOut=de,F.push(de)}else r.log(["Location",ue.loc,"does not have a valid GeoJSON geometry.","Traces with locationmode *geojson-id* only support","*Polygon* and *MultiPolygon* geometries."].join(" "))}delete z[$]}switch(P.type){case"FeatureCollection":var U=P.features;for(N=0;NF&&(F=L,P=O)}else P=D;return M(P).geometry.coordinates}function b(y){var D=window.PlotlyGeoAssets||{},P=[];function z(U){return new Promise(function(B,W){v.json(U,function($,ue){if($){delete D[U];var ce=$.status===404?'GeoJSON at URL "'+U+'" does not exist.':"Unexpected error while fetching from "+U;return W(new Error(ce))}return D[U]=ue,B(ue)})})}function F(U){return new Promise(function(B,W){var $=0,ue=setInterval(function(){if(D[U]&&D[U]!=="pending")return clearInterval(ue),B(D[U]);if($>100)return clearInterval(ue),W("Unexpected error while fetching from "+U);$++},50)})}for(var N=0;NL-U);if(D.length<2)return null;let P=D.length,z=D[P-1]-D[0];if(z>=360)return null;let F=-1/0,N=-1;for(let L=0;LF&&(F=U,N=L)}let O=360-z;return F<=O?null:[D[N+1],D[N]+l]}function g([y,D]){return[y,y>0&&D<0?D+l:D]}q.exports={locationToFeature:T,feature2polygons:w,getTraceGeojson:A,extractTraceFeature:E,fetchTraceGeoData:b,computeBbox:d,doesCrossAntiMeridian:x,getFitboundsLonRange:u,unwrapLonRange:g,ANTIMERIDIAN_LON_SHIFT:l}}}),RE=He({"src/traces/scattergeo/style.js"(Z,q){"use strict";var v=Vn(),_=as(),S=$n(),M=Qp(),e=M.stylePoints,t=M.styleText;q.exports=function(a,i){i&&r(a,i)};function r(o,a){var i=a[0].trace,n=a[0].node3;n.style("opacity",a[0].trace.opacity),e(n,i,o),t(n,i,o),n.selectAll("path.js-line").style("fill","none").each(function(s){var h=v.select(this),f=s.trace,m=f.line||{};h.call(S.stroke,m.color).call(_.dashLine,m.dash||"",m.width||0),f.fill!=="none"&&h.call(S.fill,f.fillcolor)})}}}),DE=He({"src/traces/scattergeo/plot.js"(Z,q){"use strict";var v=Vn(),_=sa(),S=nT().getTopojsonFeatures,M=g0(),e=Ev(),t=Yd().findExtremes,r=Gs().BADNUM,o=Bd().calcMarkerSize,a=Fu(),i=RE();function n(h,f,m){var c=f.layers.frontplot.select(".scatterlayer"),T=_.makeTraceGroups(c,m,"trace scattergeo");function l(x,w){x.lonlat[0]===r&&v.select(w).remove()}T.selectAll("*").remove(),T.each(function(x){var w=v.select(this),A=x[0].trace;if(a.hasLines(A)||A.fill!=="none"){var E=M.calcTraceToLineCoords(x),p=A.fill!=="none"?M.makePolygon(E):M.makeLine(E);w.selectAll("path.js-line").data([{geojson:p,trace:A}]).enter().append("path").classed("js-line",!0).style("stroke-miterlimit",2)}a.hasMarkers(A)&&w.selectAll("path.point").data(_.identity).enter().append("path").classed("point",!0).each(function(b){l(b,this)}),a.hasText(A)&&w.selectAll("g").data(_.identity).enter().append("g").append("text").each(function(b){l(b,this)}),i(h,x)})}function s(h,f){var m=h[0].trace,c=f[m.geo],T=c._subplot,l=m._length,x,w;if(_.isArrayOrTypedArray(m.locations)){var A=m.locationmode,E=A==="geojson-id"?e.extractTraceFeature(h):S(m,T.topojson);for(x=0;x")}}}),UU=He({"src/traces/scattergeo/event_data.js"(Z,q){"use strict";q.exports=function(_,S,M,e,t){_.lon=S.lon,_.lat=S.lat,_.location=S.loc?S.loc:null;var r=e[t];return r.fIn&&r.fIn.properties&&(_.properties=r.fIn.properties),_}}}),jU=He({"src/traces/scattergeo/select.js"(Z,q){"use strict";var v=Fu(),_=Gs().BADNUM;q.exports=function(M,e){var t=M.cd,r=M.xaxis,o=M.yaxis,a=[],i=t[0].trace,n,s,h,f,m,c=!v.hasMarkers(i)&&!v.hasText(i);if(c)return[];if(e===!1)for(m=0;mV?1:Q>=V?0:NaN}function S(Q){return Q.length===1&&(Q=M(Q)),{left:function(V,le,ae,j){for(ae==null&&(ae=0),j==null&&(j=V.length);ae>>1;Q(V[ee],le)<0?ae=ee+1:j=ee}return ae},right:function(V,le,ae,j){for(ae==null&&(ae=0),j==null&&(j=V.length);ae>>1;Q(V[ee],le)>0?j=ee:ae=ee+1}return ae}}}function M(Q){return function(V,le){return _(Q(V),le)}}var e=S(_),t=e.right,r=e.left;function o(Q,V){V==null&&(V=a);for(var le=0,ae=Q.length-1,j=Q[0],ee=new Array(ae<0?0:ae);leQ?1:V>=Q?0:NaN}function s(Q){return Q===null?NaN:+Q}function h(Q,V){var le=Q.length,ae=0,j=-1,ee=0,te,pe,we=0;if(V==null)for(;++j1)return we/(ae-1)}function f(Q,V){var le=h(Q,V);return le&&Math.sqrt(le)}function m(Q,V){var le=Q.length,ae=-1,j,ee,te;if(V==null){for(;++ae=j)for(ee=te=j;++aej&&(ee=j),te=j)for(ee=te=j;++aej&&(ee=j),te0)return[Q];if((ae=V0)for(Q=Math.ceil(Q/pe),V=Math.floor(V/pe),te=new Array(ee=Math.ceil(V-Q+1));++j=0?(ee>=E?10:ee>=p?5:ee>=b?2:1)*Math.pow(10,j):-Math.pow(10,-j)/(ee>=E?10:ee>=p?5:ee>=b?2:1)}function g(Q,V,le){var ae=Math.abs(V-Q)/Math.max(0,le),j=Math.pow(10,Math.floor(Math.log(ae)/Math.LN10)),ee=ae/j;return ee>=E?j*=10:ee>=p?j*=5:ee>=b&&(j*=2),VPe;)je.pop(),--at;var nt=new Array(at+1),tt;for(ee=0;ee<=at;++ee)tt=nt[ee]=[],tt.x0=ee>0?je[ee-1]:Re,tt.x1=ee=1)return+le(Q[ae-1],ae-1,Q);var ae,j=(ae-1)*V,ee=Math.floor(j),te=+le(Q[ee],ee,Q),pe=+le(Q[ee+1],ee+1,Q);return te+(pe-te)*(j-ee)}}function z(Q,V,le){return Q=l.call(Q,s).sort(_),Math.ceil((le-V)/(2*(P(Q,.75)-P(Q,.25))*Math.pow(Q.length,-1/3)))}function F(Q,V,le){return Math.ceil((le-V)/(3.5*f(Q)*Math.pow(Q.length,-1/3)))}function N(Q,V){var le=Q.length,ae=-1,j,ee;if(V==null){for(;++ae=j)for(ee=j;++aeee&&(ee=j)}else for(;++ae=j)for(ee=j;++aeee&&(ee=j);return ee}function O(Q,V){var le=Q.length,ae=le,j=-1,ee,te=0;if(V==null)for(;++j=0;)for(te=Q[V],le=te.length;--le>=0;)ee[--j]=te[le];return ee}function B(Q,V){var le=Q.length,ae=-1,j,ee;if(V==null){for(;++ae=j)for(ee=j;++aej&&(ee=j)}else for(;++ae=j)for(ee=j;++aej&&(ee=j);return ee}function W(Q,V){for(var le=V.length,ae=new Array(le);le--;)ae[le]=Q[V[le]];return ae}function $(Q,V){if(le=Q.length){var le,ae=0,j=0,ee,te=Q[j];for(V==null&&(V=_);++ae0?1:Qt<0?-1:0},d=Math.sqrt,u=Math.tan;function g(Qt){return Qt>1?0:Qt<-1?a:Math.acos(Qt)}function y(Qt){return Qt>1?i:Qt<-1?-i:Math.asin(Qt)}function D(Qt){return(Qt=p(Qt/2))*Qt}function P(){}function z(Qt,xr){Qt&&N.hasOwnProperty(Qt.type)&&N[Qt.type](Qt,xr)}var F={Feature:function(Qt,xr){z(Qt.geometry,xr)},FeatureCollection:function(Qt,xr){for(var aa=Qt.features,$r=-1,ka=aa.length;++$r=0?1:-1,ka=$r*aa,li=l(xr),Ci=p(xr),Hi=Y*Ci,Qi=de*li+Hi*l(ka),pn=Hi*$r*p(ka);B.add(T(pn,Qi)),ce=Qt,de=li,Y=Ci}function j(Qt){return W.reset(),U(Qt,X),W*2}function ee(Qt){return[T(Qt[1],Qt[0]),y(Qt[2])]}function te(Qt){var xr=Qt[0],aa=Qt[1],$r=l(aa);return[$r*l(xr),$r*p(xr),p(aa)]}function pe(Qt,xr){return Qt[0]*xr[0]+Qt[1]*xr[1]+Qt[2]*xr[2]}function we(Qt,xr){return[Qt[1]*xr[2]-Qt[2]*xr[1],Qt[2]*xr[0]-Qt[0]*xr[2],Qt[0]*xr[1]-Qt[1]*xr[0]]}function Se(Qt,xr){Qt[0]+=xr[0],Qt[1]+=xr[1],Qt[2]+=xr[2]}function Re(Qt,xr){return[Qt[0]*xr,Qt[1]*xr,Qt[2]*xr]}function Pe(Qt){var xr=d(Qt[0]*Qt[0]+Qt[1]*Qt[1]+Qt[2]*Qt[2]);Qt[0]/=xr,Qt[1]/=xr,Qt[2]/=xr}var je,at,nt,tt,Ve,he,se,ne,Ce=S(),Ze,rt,Je={point:St,lineStart:Bt,lineEnd:Vt,polygonStart:function(){Je.point=Ar,Je.lineStart=vr,Je.lineEnd=qr,Ce.reset(),X.polygonStart()},polygonEnd:function(){X.polygonEnd(),Je.point=St,Je.lineStart=Bt,Je.lineEnd=Vt,B<0?(je=-(nt=180),at=-(tt=90)):Ce>r?tt=90:Ce<-r&&(at=-90),rt[0]=je,rt[1]=nt},sphere:function(){je=-(nt=180),at=-(tt=90)}};function St(Qt,xr){Ze.push(rt=[je=Qt,nt=Qt]),xrtt&&(tt=xr)}function kt(Qt,xr){var aa=te([Qt*f,xr*f]);if(ne){var $r=we(ne,aa),ka=[$r[1],-$r[0],0],li=we(ka,$r);Pe(li),li=ee(li);var Ci=Qt-Ve,Hi=Ci>0?1:-1,Qi=li[0]*h*Hi,pn,Pi=m(Ci)>180;Pi^(Hi*Vett&&(tt=pn)):(Qi=(Qi+360)%360-180,Pi^(Hi*Vett&&(tt=xr))),Pi?Qtkr(je,nt)&&(nt=Qt):kr(Qt,nt)>kr(je,nt)&&(je=Qt):nt>=je?(Qtnt&&(nt=Qt)):Qt>Ve?kr(je,Qt)>kr(je,nt)&&(nt=Qt):kr(Qt,nt)>kr(je,nt)&&(je=Qt)}else Ze.push(rt=[je=Qt,nt=Qt]);xrtt&&(tt=xr),ne=aa,Ve=Qt}function Bt(){Je.point=kt}function Vt(){rt[0]=je,rt[1]=nt,Je.point=St,ne=null}function Ar(Qt,xr){if(ne){var aa=Qt-Ve;Ce.add(m(aa)>180?aa+(aa>0?360:-360):aa)}else he=Qt,se=xr;X.point(Qt,xr),kt(Qt,xr)}function vr(){X.lineStart()}function qr(){Ar(he,se),X.lineEnd(),m(Ce)>r&&(je=-(nt=180)),rt[0]=je,rt[1]=nt,ne=null}function kr(Qt,xr){return(xr-=Qt)<0?xr+360:xr}function Ur(Qt,xr){return Qt[0]-xr[0]}function _t(Qt,xr){return Qt[0]<=Qt[1]?Qt[0]<=xr&&xr<=Qt[1]:xrkr($r[0],$r[1])&&($r[1]=ka[1]),kr(ka[0],$r[1])>kr($r[0],$r[1])&&($r[0]=ka[0])):li.push($r=ka);for(Ci=-1/0,aa=li.length-1,xr=0,$r=li[aa];xr<=aa;$r=ka,++xr)ka=li[xr],(Hi=kr($r[1],ka[0]))>Ci&&(Ci=Hi,je=ka[0],nt=$r[1])}return Ze=rt=null,je===1/0||at===1/0?[[NaN,NaN],[NaN,NaN]]:[[je,at],[nt,tt]]}var Ye,Ae,Le,We,Ke,st,ot,Ut,Ct,Pt,jt,cr,or,nr,Pr,_a,Fa={sphere:P,point:Ra,lineStart:Wa,lineEnd:wi,polygonStart:function(){Fa.lineStart=Yt,Fa.lineEnd=Rt},polygonEnd:function(){Fa.lineStart=Wa,Fa.lineEnd=wi}};function Ra(Qt,xr){Qt*=f,xr*=f;var aa=l(xr);qa(aa*l(Qt),aa*p(Qt),p(xr))}function qa(Qt,xr,aa){++Ye,Le+=(Qt-Le)/Ye,We+=(xr-We)/Ye,Ke+=(aa-Ke)/Ye}function Wa(){Fa.point=Ca}function Ca(Qt,xr){Qt*=f,xr*=f;var aa=l(xr);nr=aa*l(Qt),Pr=aa*p(Qt),_a=p(xr),Fa.point=hi,qa(nr,Pr,_a)}function hi(Qt,xr){Qt*=f,xr*=f;var aa=l(xr),$r=aa*l(Qt),ka=aa*p(Qt),li=p(xr),Ci=T(d((Ci=Pr*li-_a*ka)*Ci+(Ci=_a*$r-nr*li)*Ci+(Ci=nr*ka-Pr*$r)*Ci),nr*$r+Pr*ka+_a*li);Ae+=Ci,st+=Ci*(nr+(nr=$r)),ot+=Ci*(Pr+(Pr=ka)),Ut+=Ci*(_a+(_a=li)),qa(nr,Pr,_a)}function wi(){Fa.point=Ra}function Yt(){Fa.point=Zt}function Rt(){Jt(cr,or),Fa.point=Ra}function Zt(Qt,xr){cr=Qt,or=xr,Qt*=f,xr*=f,Fa.point=Jt;var aa=l(xr);nr=aa*l(Qt),Pr=aa*p(Qt),_a=p(xr),qa(nr,Pr,_a)}function Jt(Qt,xr){Qt*=f,xr*=f;var aa=l(xr),$r=aa*l(Qt),ka=aa*p(Qt),li=p(xr),Ci=Pr*li-_a*ka,Hi=_a*$r-nr*li,Qi=nr*ka-Pr*$r,pn=d(Ci*Ci+Hi*Hi+Qi*Qi),Pi=y(pn),Di=pn&&-Pi/pn;Ct+=Di*Ci,Pt+=Di*Hi,jt+=Di*Qi,Ae+=Pi,st+=Pi*(nr+(nr=$r)),ot+=Pi*(Pr+(Pr=ka)),Ut+=Pi*(_a+(_a=li)),qa(nr,Pr,_a)}function Fr(Qt){Ye=Ae=Le=We=Ke=st=ot=Ut=Ct=Pt=jt=0,U(Qt,Fa);var xr=Ct,aa=Pt,$r=jt,ka=xr*xr+aa*aa+$r*$r;return kaa?Qt+Math.round(-Qt/s)*s:Qt,xr]}ca.invert=ca;function Ba(Qt,xr,aa){return(Qt%=s)?xr||aa?ra(Za(Qt),ri(xr,aa)):Za(Qt):xr||aa?ri(xr,aa):ca}function $a(Qt){return function(xr,aa){return xr+=Qt,[xr>a?xr-s:xr<-a?xr+s:xr,aa]}}function Za(Qt){var xr=$a(Qt);return xr.invert=$a(-Qt),xr}function ri(Qt,xr){var aa=l(Qt),$r=p(Qt),ka=l(xr),li=p(xr);function Ci(Hi,Qi){var pn=l(Qi),Pi=l(Hi)*pn,Di=p(Hi)*pn,Ni=p(Qi),mi=Ni*aa+Pi*$r;return[T(Di*ka-mi*li,Pi*aa-Ni*$r),y(mi*ka+Di*li)]}return Ci.invert=function(Hi,Qi){var pn=l(Qi),Pi=l(Hi)*pn,Di=p(Hi)*pn,Ni=p(Qi),mi=Ni*ka-Di*li;return[T(Di*ka+Ni*li,Pi*aa+mi*$r),y(mi*aa-Pi*$r)]},Ci}function pi(Qt){Qt=Ba(Qt[0]*f,Qt[1]*f,Qt.length>2?Qt[2]*f:0);function xr(aa){return aa=Qt(aa[0]*f,aa[1]*f),aa[0]*=h,aa[1]*=h,aa}return xr.invert=function(aa){return aa=Qt.invert(aa[0]*f,aa[1]*f),aa[0]*=h,aa[1]*=h,aa},xr}function Ia(Qt,xr,aa,$r,ka,li){if(aa){var Ci=l(xr),Hi=p(xr),Qi=$r*aa;ka==null?(ka=xr+$r*s,li=xr-Qi/2):(ka=rn(Ci,ka),li=rn(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=[],xr=null,aa}}}function xt(Qt,xr){return m(Qt[0]-xr[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(xr=Qt.length){for(var xr,aa=0,$r=Qt[0],ka;++aa=0?1:-1,Ns=rl*ks,el=Ns>a,Ss=Qn*yo;if(wr.add(T(Ss*rl*p(Ns),io*Qo+Ss*l(Ns))),Ci+=el?ks+rl*s:ks,el^mi>=aa^An>=aa){var Fl=we(te(Ni),te(co));Pe(Fl);var yl=we(li,Fl);Pe(yl);var ll=(el^ks>=0?-1:1)*y(yl[2]);($r>ll||$r===ll&&(Fl[0]||Fl[1]))&&(Hi+=el^ks>=0?1:-1)}}return(Ci<-r||Ci0){for(Qi||(ka.polygonStart(),Qi=!0),ka.lineStart(),Qo=0;Qo1&&un&2&&yo.push(yo.pop().concat(yo.shift())),Pi.push(yo.filter(gt))}}return Ni}}function gt(Qt){return Qt.length>1}function Kt(Qt,xr){return((Qt=Qt.x)[0]<0?Qt[1]-i-r:i-Qt[1])-((xr=xr.x)[0]<0?xr[1]-i-r:i-xr[1])}var mr=Hr(function(){return!0},Ir,Pa,[-a,-i]);function Ir(Qt){var xr=NaN,aa=NaN,$r=NaN,ka;return{lineStart:function(){Qt.lineStart(),ka=1},point:function(li,Ci){var Hi=li>0?a:-a,Qi=m(li-xr);m(Qi-a)0?i:-i),Qt.point($r,aa),Qt.lineEnd(),Qt.lineStart(),Qt.point(Hi,aa),Qt.point(li,aa),ka=0):$r!==Hi&&Qi>=a&&(m(xr-$r)r?c((p(xr)*(li=l($r))*p(aa)-p($r)*(ka=l(xr))*p(Qt))/(ka*li*Ci)):(xr+$r)/2}function Pa(Qt,xr,aa,$r){var ka;if(Qt==null)ka=aa*i,$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(m(Qt[0]-xr[0])>r){var li=Qt[0]0,ka=m(xr)>r;function li(Pi,Di,Ni,mi){Ia(mi,Qt,aa,Ni,Pi,Di)}function Ci(Pi,Di){return l(Pi)*l(Di)>xr}function Hi(Pi){var Di,Ni,mi,Mn,Qn;return{lineStart:function(){Mn=mi=!1,Qn=1},point:function(io,eo){var co=[io,eo],An,un=Ci(io,eo),yo=$r?un?0:pn(io,eo):un?pn(io+(io<0?a:-a),eo):0;if(!Di&&(Mn=mi=un)&&Pi.lineStart(),un!==mi&&(An=Qi(Di,co),(!An||xt(Di,An)||xt(co,An))&&(co[2]=1)),un!==mi)Qn=0,un?(Pi.lineStart(),An=Qi(co,Di),Pi.point(An[0],An[1])):(An=Qi(Di,co),Pi.point(An[0],An[1],2),Pi.lineEnd()),Di=An;else if(ka&&Di&&$r^un){var Qo;!(yo&Ni)&&(Qo=Qi(co,Di,!0))&&(Qn=0,$r?(Pi.lineStart(),Pi.point(Qo[0][0],Qo[0][1]),Pi.point(Qo[1][0],Qo[1][1]),Pi.lineEnd()):(Pi.point(Qo[1][0],Qo[1][1]),Pi.lineEnd(),Pi.lineStart(),Pi.point(Qo[0][0],Qo[0][1],3)))}un&&(!Di||!xt(Di,co))&&Pi.point(co[0],co[1]),Di=co,mi=un,Ni=yo},lineEnd:function(){mi&&Pi.lineEnd(),Di=null},clean:function(){return Qn|(Mn&&mi)<<1}}}function Qi(Pi,Di,Ni){var mi=te(Pi),Mn=te(Di),Qn=[1,0,0],io=we(mi,Mn),eo=pe(io,io),co=io[0],An=eo-co*co;if(!An)return!Ni&Πvar un=xr*eo/An,yo=-xr*co/An,Qo=we(Qn,io),ks=Re(Qn,un),rl=Re(io,yo);Se(ks,rl);var Ns=Qo,el=pe(ks,Ns),Ss=pe(Ns,Ns),Fl=el*el-Ss*(pe(ks,ks)-1);if(!(Fl<0)){var yl=d(Fl),ll=Re(Ns,(-el-yl)/Ss);if(Se(ll,ks),ll=ee(ll),!Ni)return ll;var Un=Pi[0],Ro=Di[0],Js=Pi[1],Fs=Di[1],cu;Ro0^ll[1]<(m(ll[0]-Un)a^(Un<=ll[0]&&ll[0]<=Ro)){var bu=Re(Ns,(-el+yl)/Ss);return Se(bu,ks),[ll,ee(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,xr,aa,$r,ka,li){var Ci=Qt[0],Hi=Qt[1],Qi=xr[0],pn=xr[1],Pi=0,Di=1,Ni=Qi-Ci,mi=pn-Hi,Mn;if(Mn=aa-Ci,!(!Ni&&Mn>0)){if(Mn/=Ni,Ni<0){if(Mn0){if(Mn>Di)return;Mn>Pi&&(Pi=Mn)}if(Mn=ka-Ci,!(!Ni&&Mn<0)){if(Mn/=Ni,Ni<0){if(Mn>Di)return;Mn>Pi&&(Pi=Mn)}else if(Ni>0){if(Mn0)){if(Mn/=mi,mi<0){if(Mn0){if(Mn>Di)return;Mn>Pi&&(Pi=Mn)}if(Mn=li-Hi,!(!mi&&Mn<0)){if(Mn/=mi,mi<0){if(Mn>Di)return;Mn>Pi&&(Pi=Mn)}else if(mi>0){if(Mn0&&(Qt[0]=Ci+Pi*Ni,Qt[1]=Hi+Pi*mi),Di<1&&(xr[0]=Ci+Di*Ni,xr[1]=Hi+Di*mi),!0}}}}}var ba=1e9,Ai=-ba;function ki(Qt,xr,aa,$r){function ka(pn,Pi){return Qt<=pn&&pn<=aa&&xr<=Pi&&Pi<=$r}function li(pn,Pi,Di,Ni){var mi=0,Mn=0;if(pn==null||(mi=Ci(pn,Di))!==(Mn=Ci(Pi,Di))||Qi(pn,Pi)<0^Di>0)do Ni.point(mi===0||mi===3?Qt:aa,mi>1?$r:xr);while((mi=(mi+Di+4)%4)!==Mn);else Ni.point(Pi[0],Pi[1])}function Ci(pn,Pi){return m(pn[0]-Qt)0?0:3:m(pn[0]-aa)0?2:1:m(pn[1]-xr)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=cn(),Ni,mi,Mn,Qn,io,eo,co,An,un,yo,Qo,ks={point:rl,lineStart:Fl,lineEnd:yl,polygonStart:el,polygonEnd:Ss};function rl(Un,Ro){ka(Un,Ro)&&Pi.point(Un,Ro)}function Ns(){for(var Un=0,Ro=0,Js=mi.length;Ro$r&&(Rc-Ic)*($r-bu)>(Au-bu)*(Qt-Ic)&&++Un:Au<=$r&&(Rc-Ic)*($r-bu)<(Au-bu)*(Qt-Ic)&&--Un;return Un}function el(){Pi=Di,Ni=[],mi=[],Qo=!0}function Ss(){var Un=Ns(),Ro=Qo&&Un,Js=(Ni=_.merge(Ni)).length;(Ro||Js)&&(pn.polygonStart(),Ro&&(pn.lineStart(),li(null,null,1,pn),pn.lineEnd()),Js&&Or(Ni,Hi,Un,li,pn),pn.polygonEnd()),Pi=pn,Ni=mi=Mn=null}function Fl(){ks.point=ll,mi&&mi.push(Mn=[]),yo=!0,un=!1,co=An=NaN}function yl(){Ni&&(ll(Qn,io),eo&&un&&Di.rejoin(),Ni.push(Di.result())),ks.point=rl,un&&Pi.lineEnd()}function ll(Un,Ro){var Js=ka(Un,Ro);if(mi&&Mn.push([Un,Ro]),yo)Qn=Un,io=Ro,eo=Js,yo=!1,Js&&(Pi.lineStart(),Pi.point(Un,Ro));else if(Js&&un)Pi.point(Un,Ro);else{var Fs=[co=Math.max(Ai,Math.min(ba,co)),An=Math.max(Ai,Math.min(ba,An))],cu=[Un=Math.max(Ai,Math.min(ba,Un)),Ro=Math.max(Ai,Math.min(ba,Ro))];la(Fs,cu,Qt,xr,aa,$r)?(un||(Pi.lineStart(),Pi.point(Fs[0],Fs[1])),Pi.point(cu[0],cu[1]),Js||Pi.lineEnd(),Qo=!1):Js&&(Pi.lineStart(),Pi.point(Un,Ro),Qo=!1)}co=Un,An=Ro,un=Js}return ks}}function Ki(){var Qt=0,xr=0,aa=960,$r=500,ka,li,Ci;return Ci={stream:function(Hi){return ka&&li===Hi?ka:ka=ki(Qt,xr,aa,$r)(li=Hi)},extent:function(Hi){return arguments.length?(Qt=+Hi[0][0],xr=+Hi[0][1],aa=+Hi[1][0],$r=+Hi[1][1],ka=li=null,Ci):[[Qt,xr],[aa,$r]]}}}var En=S(),Tn,On,kn,ao={sphere:P,point:P,lineStart:Co,lineEnd:P,polygonStart:P,polygonEnd:P};function Co(){ao.point=zs,ao.lineEnd=bo}function bo(){ao.point=ao.lineEnd=P}function zs(Qt,xr){Qt*=f,xr*=f,Tn=Qt,On=p(xr),kn=l(xr),ao.point=Cn}function Cn(Qt,xr){Qt*=f,xr*=f;var aa=p(xr),$r=l(xr),ka=m(Qt-Tn),li=l(ka),Ci=p(ka),Hi=$r*Ci,Qi=kn*aa-On*$r*li,pn=On*aa+kn*$r*li;En.add(T(d(Hi*Hi+Qi*Qi),pn)),Tn=Qt,On=aa,kn=$r}function wo(Qt){return En.reset(),U(Qt,ao),+En}var Zn=[null,null],go={type:"LineString",coordinates:Zn};function os(Qt,xr){return Zn[0]=Qt,Zn[1]=xr,wo(go)}var ys={Feature:function(Qt,xr){return Yn(Qt.geometry,xr)},FeatureCollection:function(Qt,xr){for(var aa=Qt.features,$r=-1,ka=aa.length;++$r0&&(ka=os(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(_.range(x(li/pn)*pn,ka,pn).filter(function(An){return m(An%Di)>r}).map(mi))}return eo.lines=function(){return co().map(function(An){return{type:"LineString",coordinates:An}})},eo.outline=function(){return{type:"Polygon",coordinates:[Mn($r).concat(Qn(Ci).slice(1),Mn(aa).reverse().slice(1),Qn(Hi).reverse().slice(1))]}},eo.extent=function(An){return arguments.length?eo.extentMajor(An).extentMinor(An):eo.extentMinor()},eo.extentMajor=function(An){return arguments.length?($r=+An[0][0],aa=+An[1][0],Hi=+An[0][1],Ci=+An[1][1],$r>aa&&(An=$r,$r=aa,aa=An),Hi>Ci&&(An=Hi,Hi=Ci,Ci=An),eo.precision(io)):[[$r,Hi],[aa,Ci]]},eo.extentMinor=function(An){return arguments.length?(xr=+An[0][0],Qt=+An[1][0],li=+An[0][1],ka=+An[1][1],xr>Qt&&(An=xr,xr=Qt,Qt=An),li>ka&&(An=li,li=ka,ka=An),eo.precision(io)):[[xr,li],[Qt,ka]]},eo.step=function(An){return arguments.length?eo.stepMajor(An).stepMinor(An):eo.stepMinor()},eo.stepMajor=function(An){return arguments.length?(Pi=+An[0],Di=+An[1],eo):[Pi,Di]},eo.stepMinor=function(An){return arguments.length?(Qi=+An[0],pn=+An[1],eo):[Qi,pn]},eo.precision=function(An){return arguments.length?(io=+An,Ni=Gi(li,ka,90),mi=Pn(xr,Qt,io),Mn=Gi(Hi,Ci,90),Qn=Pn($r,aa,io),eo):io},eo.extentMajor([[-180,-90+r],[180,90-r]]).extentMinor([[-180,-80-r],[180,80+r]])}function bs(){return qs()()}function lo(Qt,xr){var aa=Qt[0]*f,$r=Qt[1]*f,ka=xr[0]*f,li=xr[1]*f,Ci=l($r),Hi=p($r),Qi=l(li),pn=p(li),Pi=Ci*l(aa),Di=Ci*p(aa),Ni=Qi*l(ka),mi=Qi*p(ka),Mn=2*y(d(D(li-$r)+Ci*Qi*D(ka-aa))),Qn=p(Mn),io=Mn?function(eo){var co=p(eo*=Mn)/Qn,An=p(Mn-eo)/Qn,un=An*Pi+co*Ni,yo=An*Di+co*mi,Qo=An*Hi+co*pn;return[T(yo,un)*h,T(Qo,d(un*un+yo*yo))*h]}:function(){return[aa*h,$r*h]};return io.distance=Mn,io}function Zo(Qt){return Qt}var ws=S(),Hs=S(),il,yn,Po,To,Ws={point:P,lineStart:P,lineEnd:P,polygonStart:function(){Ws.lineStart=Ll,Ws.lineEnd=Ks},polygonEnd:function(){Ws.lineStart=Ws.lineEnd=Ws.point=P,ws.add(m(Hs)),Hs.reset()},result:function(){var Qt=ws/2;return ws.reset(),Qt}};function Ll(){Ws.point=uo}function uo(Qt,xr){Ws.point=Nl,il=Po=Qt,yn=To=xr}function Nl(Qt,xr){Hs.add(To*Qt-Po*xr),Po=Qt,To=xr}function Ks(){Nl(il,yn)}var Ts=1/0,Ls=Ts,Jo=-Ts,Es=Jo,Ul={point:lu,lineStart:P,lineEnd:P,polygonStart:P,polygonEnd:P,result:function(){var Qt=[[Ts,Ls],[Jo,Es]];return Jo=Es=-(Ls=Ts=1/0),Qt}};function lu(Qt,xr){QtJo&&(Jo=Qt),xrEs&&(Es=xr)}var Tc=0,du=0,Sf=0,Uc=0,Bs=0,dc=0,Wc=0,uu=0,Pl=0,ic,Ou,nl,vl,As={point:Xs,lineStart:nc,lineEnd:fl,polygonStart:function(){As.lineStart=xh,As.lineEnd=us},polygonEnd:function(){As.point=Xs,As.lineStart=nc,As.lineEnd=fl},result:function(){var Qt=Pl?[Wc/Pl,uu/Pl]:dc?[Uc/dc,Bs/dc]:Sf?[Tc/Sf,du/Sf]:[NaN,NaN];return Tc=du=Sf=Uc=Bs=dc=Wc=uu=Pl=0,Qt}};function Xs(Qt,xr){Tc+=Qt,du+=xr,++Sf}function nc(){As.point=jl}function jl(Qt,xr){As.point=qu,Xs(nl=Qt,vl=xr)}function qu(Qt,xr){var aa=Qt-nl,$r=xr-vl,ka=d(aa*aa+$r*$r);Uc+=ka*(nl+Qt)/2,Bs+=ka*(vl+xr)/2,dc+=ka,Xs(nl=Qt,vl=xr)}function fl(){As.point=Xs}function xh(){As.point=bh}function us(){Ps(ic,Ou)}function bh(Qt,xr){As.point=Ps,Xs(ic=nl=Qt,Ou=vl=xr)}function Ps(Qt,xr){var aa=Qt-nl,$r=xr-vl,ka=d(aa*aa+$r*$r);Uc+=ka*(nl+Qt)/2,Bs+=ka*(vl+xr)/2,dc+=ka,ka=vl*Qt-nl*xr,Wc+=ka*(nl+Qt),uu+=ka*(vl+xr),Pl+=ka*3,Xs(nl=Qt,vl=xr)}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,xr){switch(this._point){case 0:{this._context.moveTo(Qt,xr),this._point=1;break}case 1:{this._context.lineTo(Qt,xr);break}default:{this._context.moveTo(Qt+this._radius,xr),this._context.arc(Qt,xr,this._radius,0,s);break}}},result:P};var Xc=S(),Vu,ql,Mf,Ac,nf,Ql={point:P,lineStart:function(){Ql.point=Jf},lineEnd:function(){Vu&&Of(ql,Mf),Ql.point=P},polygonStart:function(){Vu=!0},polygonEnd:function(){Vu=null},result:function(){var Qt=+Xc;return Xc.reset(),Qt}};function Jf(Qt,xr){Ql.point=Of,ql=Ac=Qt,Mf=nf=xr}function Of(Qt,xr){Ac-=Qt,nf-=xr,Xc.add(d(Ac*Ac+nf*nf)),Ac=Qt,nf=xr}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,xr){switch(this._point){case 0:{this._string.push("M",Qt,",",xr),this._point=1;break}case 1:{this._string.push("L",Qt,",",xr);break}default:{this._circle==null&&(this._circle=jc(this._radius)),this._string.push("M",Qt,",",xr,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,xr){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(Ws)),Ws.result()},li.measure=function(Ci){return U(Ci,$r(Ql)),Ql.result()},li.bounds=function(Ci){return U(Ci,$r(Ul)),Ul.result()},li.centroid=function(Ci){return U(Ci,$r(As)),As.result()},li.projection=function(Ci){return arguments.length?($r=Ci==null?(Qt=null,Zo):(Qt=Ci).stream,li):Qt},li.context=function(Ci){return arguments.length?(ka=Ci==null?(xr=null,new of):new to(xr=Ci),typeof aa!="function"&&ka.pointRadius(aa),li):xr},li.pointRadius=function(Ci){return arguments.length?(aa=typeof Ci=="function"?Ci:(ka.pointRadius(+Ci),+Ci),li):aa},li.projection(Qt).context(xr)}function Nf(Qt){return{stream:Gu(Qt)}}function Gu(Qt){return function(xr){var aa=new Ef;for(var $r in Qt)aa[$r]=Qt[$r];return aa.stream=xr,aa}}function Ef(){}Ef.prototype={constructor:Ef,point:function(Qt,xr){this.stream.point(Qt,xr)},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,xr,aa){var $r=Qt.clipExtent&&Qt.clipExtent();return Qt.scale(150).translate([0,0]),$r!=null&&Qt.clipExtent(null),U(aa,Qt.stream(Ul)),xr(Ul.result()),$r!=null&&Qt.clipExtent($r),Qt}function Zc(Qt,xr,aa){return oc(Qt,function($r){var ka=xr[1][0]-xr[0][0],li=xr[1][1]-xr[0][1],Ci=Math.min(ka/($r[1][0]-$r[0][0]),li/($r[1][1]-$r[0][1])),Hi=+xr[0][0]+(ka-Ci*($r[1][0]+$r[0][0]))/2,Qi=+xr[0][1]+(li-Ci*($r[1][1]+$r[0][1]))/2;Qt.scale(150*Ci).translate([Hi,Qi])},aa)}function eu(Qt,xr,aa){return Zc(Qt,[[0,0],xr],aa)}function qc(Qt,xr,aa){return oc(Qt,function($r){var ka=+xr,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,xr,aa){return oc(Qt,function($r){var ka=+xr,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 Zs=16,kf=l(30*f);function fh(Qt,xr){return+xr?Yc(Qt,xr):Uf(Qt)}function Uf(Qt){return Gu({point:function(xr,aa){xr=Qt(xr,aa),this.stream.point(xr[0],xr[1])}})}function Yc(Qt,xr){function aa($r,ka,li,Ci,Hi,Qi,pn,Pi,Di,Ni,mi,Mn,Qn,io){var eo=pn-$r,co=Pi-ka,An=eo*eo+co*co;if(An>4*xr&&Qn--){var un=Ci+Ni,yo=Hi+mi,Qo=Qi+Mn,ks=d(un*un+yo*yo+Qo*Qo),rl=y(Qo/=ks),Ns=m(m(Qo)-1)xr||m((eo*yl+co*ll)/An-.5)>.3||Ci*Ni+Hi*mi+Qi*Mn2?Un[2]%360*f:0,yl()):[Hi*h,Qi*h,pn*h]},Ss.angle=function(Un){return arguments.length?(Di=Un%360*f,yl()):Di*h},Ss.reflectX=function(Un){return arguments.length?(Ni=Un?-1:1,yl()):Ni<0},Ss.reflectY=function(Un){return arguments.length?(mi=Un?-1:1,yl()):mi<0},Ss.precision=function(Un){return arguments.length?(Qo=fh(ks,yo=Un*Un),ll()):d(yo)},Ss.fitExtent=function(Un,Ro){return Zc(Ss,Un,Ro)},Ss.fitSize=function(Un,Ro){return eu(Ss,Un,Ro)},Ss.fitWidth=function(Un,Ro){return qc(Ss,Un,Ro)},Ss.fitHeight=function(Un,Ro){return Sc(Ss,Un,Ro)};function yl(){var Un=ml(aa,0,0,Ni,mi,Di).apply(null,xr(li,Ci)),Ro=(Di?ml:jf)(aa,$r-Un[0],ka-Un[1],Ni,mi,Di);return Pi=Ba(Hi,Qi,pn),ks=ra(xr,Ro),rl=ra(Pi,ks),Qo=fh(ks,yo),ll()}function ll(){return Ns=el=null,Ss}return function(){return xr=Qt.apply(this,arguments),Ss.invert=xr.invert&&Fl,yl()}}function ol(Qt){var xr=0,aa=a/3,$r=Mc(Qt),ka=$r(xr,aa);return ka.parallels=function(li){return arguments.length?$r(xr=li[0]*f,aa=li[1]*f):[xr*h,aa*h]},ka}function vc(Qt){var xr=l(Qt);function aa($r,ka){return[$r*xr,p(ka)/xr]}return aa.invert=function($r,ka){return[$r/xr,y(ka*xr)]},aa}function yu(Qt,xr){var aa=p(Qt),$r=(aa+p(xr))/2;if(m($r)=.12&&io<.234&&Qn>=-.425&&Qn<-.214?ka:io>=.166&&io<.234&&Qn>=-.214&&Qn<-.115?Ci:aa).invert(Ni)},Pi.stream=function(Ni){return Qt&&xr===Ni?Qt:Qt=qf([aa.stream(xr=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(),Mn=+Ni[0],Qn=+Ni[1];return $r=aa.translate(Ni).clipExtent([[Mn-.455*mi,Qn-.238*mi],[Mn+.455*mi,Qn+.238*mi]]).stream(pn),li=ka.translate([Mn-.307*mi,Qn+.201*mi]).clipExtent([[Mn-.425*mi+r,Qn+.12*mi+r],[Mn-.214*mi-r,Qn+.234*mi-r]]).stream(pn),Hi=Ci.translate([Mn-.205*mi,Qn+.212*mi]).clipExtent([[Mn-.214*mi+r,Qn+.166*mi+r],[Mn-.115*mi-r,Qn+.234*mi-r]]).stream(pn),Di()},Pi.fitExtent=function(Ni,mi){return Zc(Pi,Ni,mi)},Pi.fitSize=function(Ni,mi){return eu(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=xr=null,Pi}return Pi.scale(1070)}function Bu(Qt){return function(xr,aa){var $r=l(xr),ka=l(aa),li=Qt($r*ka);return[li*ka*p(xr),li*p(aa)]}}function Ec(Qt){return function(xr,aa){var $r=d(xr*xr+aa*aa),ka=Qt($r),li=p(ka),Ci=l(ka);return[T(xr*li,$r*Ci),y($r&&aa*li/$r)]}}var mc=Bu(function(Qt){return d(2/(1+Qt))});mc.invert=Ec(function(Qt){return 2*y(Qt/2)});function Lh(){return Lu(mc).scale(124.75).clipAngle(180-.001)}var sf=Bu(function(Qt){return(Qt=g(Qt))&&Qt/p(Qt)});sf.invert=Ec(function(Qt){return Qt});function vf(){return Lu(sf).scale(79.4188).clipAngle(180-.001)}function Nu(Qt,xr){return[Qt,A(u((i+xr)/2))]}Nu.invert=function(Qt,xr){return[Qt,2*c(w(xr))-i]};function lf(){return iu(Nu).scale(961/s)}function iu(Qt){var xr=Lu(Qt),aa=xr.center,$r=xr.scale,ka=xr.translate,li=xr.clipExtent,Ci=null,Hi,Qi,pn;xr.scale=function(Di){return arguments.length?($r(Di),Pi()):$r()},xr.translate=function(Di){return arguments.length?(ka(Di),Pi()):ka()},xr.center=function(Di){return arguments.length?(aa(Di),Pi()):aa()},xr.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=xr(pi(xr.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 Kc(Qt){return u((i+Qt)/2)}function hh(Qt,xr){var aa=l(Qt),$r=Qt===xr?p(Qt):A(aa/l(xr))/A(Kc(xr)/Kc(Qt)),ka=aa*E(Kc(Qt),$r)/$r;if(!$r)return Nu;function li(Ci,Hi){ka>0?Hi<-i+r&&(Hi=-i+r):Hi>i-r&&(Hi=i-r);var Qi=ka/E(Kc(Hi),$r);return[Qi*p($r*Ci),ka-Qi*l($r*Ci)]}return li.invert=function(Ci,Hi){var Qi=ka-Hi,pn=b($r)*d(Ci*Ci+Qi*Qi),Pi=T(Ci,m(Qi))*b(Qi);return Qi*$r<0&&(Pi-=a*b(Ci)*b(Qi)),[Pi/$r,2*c(E(ka/pn,1/$r))-i]},li}function mf(){return ol(hh).scale(109.5).parallels([30,30])}function sl(Qt,xr){return[Qt,xr]}sl.invert=sl;function _u(){return Lu(sl).scale(152.63)}function Pu(Qt,xr){var aa=l(Qt),$r=Qt===xr?p(Qt):(aa-l(xr))/(xr-Qt),ka=aa/$r+Qt;if(m($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 Vl(Qt,xr){return[l(xr)*p(Qt),p(xr)]}Vl.invert=Ec(y);function xu(){return Lu(Vl).scale(249.5).clipAngle(90+r)}function Lc(Qt,xr){var aa=l(xr),$r=1+l(Qt)*aa;return[aa*p(Qt)/$r,p(xr)/$r]}Lc.invert=Ec(function(Qt){return 2*c(Qt)});function $c(){return Lu(Lc).scale(250).clipAngle(142)}function sc(Qt,xr){return[A(u((i+xr)/2)),-Qt]}sc.invert=function(Qt,xr){return[-xr,2*c(w(Qt))-i]};function Pc(){var Qt=iu(sc),xr=Qt.center,aa=Qt.rotate;return Qt.center=function($r){return arguments.length?xr([-$r[1],$r[0]]):($r=xr(),[$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)}v.geoAlbers=Ml,v.geoAlbersUsa=Qf,v.geoArea=j,v.geoAzimuthalEqualArea=Lh,v.geoAzimuthalEqualAreaRaw=mc,v.geoAzimuthalEquidistant=vf,v.geoAzimuthalEquidistantRaw=sf,v.geoBounds=Fe,v.geoCentroid=Fr,v.geoCircle=tn,v.geoClipAntimeridian=mr,v.geoClipCircle=ga,v.geoClipExtent=Ki,v.geoClipRectangle=ki,v.geoConicConformal=mf,v.geoConicConformalRaw=hh,v.geoConicEqualArea=Tu,v.geoConicEqualAreaRaw=yu,v.geoConicEquidistant=Cf,v.geoConicEquidistantRaw=Pu,v.geoContains=Ko,v.geoDistance=os,v.geoEqualEarth=Lf,v.geoEqualEarthRaw=Jc,v.geoEquirectangular=_u,v.geoEquirectangularRaw=sl,v.geoGnomonic=Vf,v.geoGnomonicRaw=nu,v.geoGraticule=qs,v.geoGraticule10=bs,v.geoIdentity=Xu,v.geoInterpolate=lo,v.geoLength=wo,v.geoMercator=lf,v.geoMercatorRaw=Nu,v.geoNaturalEarth1=gc,v.geoNaturalEarth1Raw=Cc,v.geoOrthographic=xu,v.geoOrthographicRaw=Vl,v.geoPath=Bf,v.geoProjection=Lu,v.geoProjectionMutator=Mc,v.geoRotation=pi,v.geoStereographic=$c,v.geoStereographicRaw=Lc,v.geoStream=U,v.geoTransform=Nf,v.geoTransverseMercator=Pc,v.geoTransverseMercatorRaw=sc,Object.defineProperty(v,"__esModule",{value:!0})})}}),qU=He({"node_modules/d3-geo-projection/dist/d3-geo-projection.js"(Z,q){(function(v,_){typeof Z=="object"&&typeof q<"u"?_(Z,zE(),_x()):_(v.d3=v.d3||{},v.d3,v.d3)})(Z,function(v,_,S){"use strict";var M=Math.abs,e=Math.atan,t=Math.atan2,r=Math.cos,o=Math.exp,a=Math.floor,i=Math.log,n=Math.max,s=Math.min,h=Math.pow,f=Math.round,m=Math.sign||function(qe){return qe>0?1:qe<0?-1:0},c=Math.sin,T=Math.tan,l=1e-6,x=1e-12,w=Math.PI,A=w/2,E=w/4,p=Math.SQRT1_2,b=F(2),d=F(w),u=w*2,g=180/w,y=w/180;function D(qe){return qe?qe/Math.sin(qe):1}function P(qe){return qe>1?A:qe<-1?-A:Math.asin(qe)}function z(qe){return qe>1?0:qe<-1?w:Math.acos(qe)}function F(qe){return qe>0?Math.sqrt(qe):0}function N(qe){return qe=o(2*qe),(qe-1)/(qe+1)}function O(qe){return(o(qe)-o(-qe))/2}function L(qe){return(o(qe)+o(-qe))/2}function U(qe){return i(qe+F(qe*qe+1))}function B(qe){return i(qe+F(qe*qe-1))}function W(qe){var $e=T(qe/2),lt=2*i(r(qe/2))/($e*$e);function pt(Et,bt){var Dt=r(Et),ur=r(bt),yr=c(bt),Er=ur*Dt,jr=-((1-Er?i((1+Er)/2)/(1-Er):-.5)+lt/(1+Er));return[jr*ur*c(Et),jr*yr]}return pt.invert=function(Et,bt){var Dt=F(Et*Et+bt*bt),ur=-qe/2,yr=50,Er;if(!Dt)return[0,0];do{var jr=ur/2,Qr=r(jr),ha=c(jr),Aa=ha/Qr,Da=-i(M(Qr));ur-=Er=(2/Aa*Da-lt*Aa-Dt)/(-Da/(ha*ha)+1-lt/(2*Qr*Qr))*(Qr<0?.7:1)}while(M(Er)>l&&--yr>0);var ci=c(ur);return[t(Et*ci,Dt*r(ur)),P(bt*ci/Dt)]},pt}function $(){var qe=A,$e=_.geoProjectionMutator(W),lt=$e(qe);return lt.radius=function(pt){return arguments.length?$e(qe=pt*y):qe*g},lt.scale(179.976).clipAngle(147)}function ue(qe,$e){var lt=r($e),pt=D(z(lt*r(qe/=2)));return[2*lt*c(qe)*pt,c($e)*pt]}ue.invert=function(qe,$e){if(!(qe*qe+4*$e*$e>w*w+l)){var lt=qe,pt=$e,Et=25;do{var bt=c(lt),Dt=c(lt/2),ur=r(lt/2),yr=c(pt),Er=r(pt),jr=c(2*pt),Qr=yr*yr,ha=Er*Er,Aa=Dt*Dt,Da=1-ha*ur*ur,ci=Da?z(Er*ur)*F(Vi=1/Da):Vi=0,Vi,ji=2*ci*Er*Dt-qe,on=ci*yr-$e,Sn=Vi*(ha*Aa+ci*Er*ur*Qr),Kn=Vi*(.5*bt*jr-ci*2*yr*Dt),Bn=Vi*.25*(jr*Dt-ci*yr*ha*bt),Ao=Vi*(Qr*ur+ci*Aa*Er),ls=Kn*Bn-Ao*Sn;if(!ls)break;var Mo=(on*Kn-ji*Ao)/ls,Yo=(ji*Bn-on*Sn)/ls;lt-=Mo,pt-=Yo}while((M(Mo)>l||M(Yo)>l)&&--Et>0);return[lt,pt]}};function ce(){return _.geoProjection(ue).scale(152.63)}function de(qe){var $e=c(qe),lt=r(qe),pt=qe>=0?1:-1,Et=T(pt*qe),bt=(1+$e-lt)/2;function Dt(ur,yr){var Er=r(yr),jr=r(ur/=2);return[(1+Er)*c(ur),(pt*yr>-t(jr,Et)-.001?0:-pt*10)+bt+c(yr)*lt-(1+Er)*$e*jr]}return Dt.invert=function(ur,yr){var Er=0,jr=0,Qr=50;do{var ha=r(Er),Aa=c(Er),Da=r(jr),ci=c(jr),Vi=1+Da,ji=Vi*Aa-ur,on=bt+ci*lt-Vi*$e*ha-yr,Sn=Vi*ha/2,Kn=-Aa*ci,Bn=$e*Vi*Aa/2,Ao=lt*Da+$e*ha*ci,ls=Kn*Bn-Ao*Sn,Mo=(on*Kn-ji*Ao)/ls/2,Yo=(ji*Bn-on*Sn)/ls;M(Yo)>2&&(Yo/=2),Er-=Mo,jr-=Yo}while((M(Mo)>l||M(Yo)>l)&&--Qr>0);return pt*jr>-t(r(Er),Et)-.001?[Er*2,jr]:null},Dt}function Y(){var qe=20*y,$e=qe>=0?1:-1,lt=T($e*qe),pt=_.geoProjectionMutator(de),Et=pt(qe),bt=Et.stream;return Et.parallel=function(Dt){return arguments.length?(lt=T(($e=(qe=Dt*y)>=0?1:-1)*qe),pt(qe)):qe*g},Et.stream=function(Dt){var ur=Et.rotate(),yr=bt(Dt),Er=(Et.rotate([0,0]),bt(Dt)),jr=Et.precision();return Et.rotate(ur),yr.sphere=function(){Er.polygonStart(),Er.lineStart();for(var Qr=$e*-180;$e*Qr<180;Qr+=$e*90)Er.point(Qr,$e*90);if(qe)for(;$e*(Qr-=3*$e*jr)>=-180;)Er.point(Qr,$e*-t(r(Qr*y/2),lt)*g);Er.lineEnd(),Er.polygonEnd()},yr},Et.scale(218.695).center([0,28.0974])}function X(qe,$e){var lt=T($e/2),pt=F(1-lt*lt),Et=1+pt*r(qe/=2),bt=c(qe)*pt/Et,Dt=lt/Et,ur=bt*bt,yr=Dt*Dt;return[4/3*bt*(3+ur-3*yr),4/3*Dt*(3+3*ur-yr)]}X.invert=function(qe,$e){if(qe*=3/8,$e*=3/8,!qe&&M($e)>1)return null;var lt=qe*qe,pt=$e*$e,Et=1+lt+pt,bt=F((Et-F(Et*Et-4*$e*$e))/2),Dt=P(bt)/3,ur=bt?B(M($e/bt))/3:U(M(qe))/3,yr=r(Dt),Er=L(ur),jr=Er*Er-yr*yr;return[m(qe)*2*t(O(ur)*yr,.25-jr),m($e)*2*t(Er*c(Dt),.25+jr)]};function Q(){return _.geoProjection(X).scale(66.1603)}var V=F(8),le=i(1+b);function ae(qe,$e){var lt=M($e);return ltx&&--pt>0);return[qe/(r(lt)*(V-1/c(lt))),m($e)*lt]};function j(){return _.geoProjection(ae).scale(112.314)}function ee(qe){var $e=2*w/qe;function lt(pt,Et){var bt=_.geoAzimuthalEquidistantRaw(pt,Et);if(M(pt)>A){var Dt=t(bt[1],bt[0]),ur=F(bt[0]*bt[0]+bt[1]*bt[1]),yr=$e*f((Dt-A)/$e)+A,Er=t(c(Dt-=yr),2-r(Dt));Dt=yr+P(w/ur*c(Er))-Er,bt[0]=ur*r(Dt),bt[1]=ur*c(Dt)}return bt}return lt.invert=function(pt,Et){var bt=F(pt*pt+Et*Et);if(bt>A){var Dt=t(Et,pt),ur=$e*f((Dt-A)/$e)+A,yr=Dt>ur?-1:1,Er=bt*r(ur-Dt),jr=1/T(yr*z((Er-w)/F(w*(w-2*Er)+bt*bt)));Dt=ur+2*e((jr+yr*F(jr*jr-3))/3),pt=bt*r(Dt),Et=bt*c(Dt)}return _.geoAzimuthalEquidistantRaw.invert(pt,Et)},lt}function te(){var qe=5,$e=_.geoProjectionMutator(ee),lt=$e(qe),pt=lt.stream,Et=.01,bt=-r(Et*y),Dt=c(Et*y);return lt.lobes=function(ur){return arguments.length?$e(qe=+ur):qe},lt.stream=function(ur){var yr=lt.rotate(),Er=pt(ur),jr=(lt.rotate([0,0]),pt(ur));return lt.rotate(yr),Er.sphere=function(){jr.polygonStart(),jr.lineStart();for(var Qr=0,ha=360/qe,Aa=2*w/qe,Da=90-180/qe,ci=A;Qr0&&M(Et)>l);return pt<0?NaN:lt}function Pe(qe,$e,lt){return $e===void 0&&($e=40),lt===void 0&&(lt=x),function(pt,Et,bt,Dt){var ur,yr,Er;bt=bt===void 0?0:+bt,Dt=Dt===void 0?0:+Dt;for(var jr=0;jr<$e;jr++){var Qr=qe(bt,Dt),ha=Qr[0]-pt,Aa=Qr[1]-Et;if(M(ha)ur){bt-=yr/=2,Dt-=Er/=2;continue}ur=Da;var ci=(bt>0?-1:1)*lt,Vi=(Dt>0?-1:1)*lt,ji=qe(bt+ci,Dt),on=qe(bt,Dt+Vi),Sn=(ji[0]-Qr[0])/ci,Kn=(ji[1]-Qr[1])/ci,Bn=(on[0]-Qr[0])/Vi,Ao=(on[1]-Qr[1])/Vi,ls=Ao*Sn-Kn*Bn,Mo=(M(ls)<.5?.5:1)/ls;if(yr=(Aa*Bn-ha*Ao)*Mo,Er=(ha*Kn-Aa*Sn)*Mo,bt+=yr,Dt+=Er,M(yr)0&&(ur[1]*=1+yr/1.5*ur[0]*ur[0]),ur}return pt.invert=Pe(pt),pt}function at(){return _.geoProjection(je()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])}function nt(qe,$e){var lt=qe*c($e),pt=30,Et;do $e-=Et=($e+c($e)-lt)/(1+r($e));while(M(Et)>l&&--pt>0);return $e/2}function tt(qe,$e,lt){function pt(Et,bt){return[qe*Et*r(bt=nt(lt,bt)),$e*c(bt)]}return pt.invert=function(Et,bt){return bt=P(bt/$e),[Et/(qe*r(bt)),P((2*bt+c(2*bt))/lt)]},pt}var Ve=tt(b/A,b,w);function he(){return _.geoProjection(Ve).scale(169.529)}var se=2.00276,ne=1.11072;function Ce(qe,$e){var lt=nt(w,$e);return[se*qe/(1/r($e)+ne/r(lt)),($e+b*c(lt))/se]}Ce.invert=function(qe,$e){var lt=se*$e,pt=$e<0?-E:E,Et=25,bt,Dt;do Dt=lt-b*c(pt),pt-=bt=(c(2*pt)+2*pt-w*c(Dt))/(2*r(2*pt)+2+w*r(Dt)*b*r(pt));while(M(bt)>l&&--Et>0);return Dt=lt-b*c(pt),[qe*(1/r(Dt)+ne/r(pt))/se,Dt]};function Ze(){return _.geoProjection(Ce).scale(160.857)}function rt(qe){var $e=0,lt=_.geoProjectionMutator(qe),pt=lt($e);return pt.parallel=function(Et){return arguments.length?lt($e=Et*y):$e*g},pt}function Je(qe,$e){return[qe*r($e),$e]}Je.invert=function(qe,$e){return[qe/r($e),$e]};function St(){return _.geoProjection(Je).scale(152.63)}function kt(qe){if(!qe)return Je;var $e=1/T(qe);function lt(pt,Et){var bt=$e+qe-Et,Dt=bt&&pt*r(Et)/bt;return[bt*c(Dt),$e-bt*r(Dt)]}return lt.invert=function(pt,Et){var bt=F(pt*pt+(Et=$e-Et)*Et),Dt=$e+qe-bt;return[bt/r(Dt)*t(pt,Et),Dt]},lt}function Bt(){return rt(kt).scale(123.082).center([0,26.1441]).parallel(45)}function Vt(qe){function $e(lt,pt){var Et=A-pt,bt=Et&<*qe*c(Et)/Et;return[Et*c(bt)/qe,A-Et*r(bt)]}return $e.invert=function(lt,pt){var Et=lt*qe,bt=A-pt,Dt=F(Et*Et+bt*bt),ur=t(Et,bt);return[(Dt?Dt/c(Dt):1)*ur/qe,A-Dt]},$e}function Ar(){var qe=.5,$e=_.geoProjectionMutator(Vt),lt=$e(qe);return lt.fraction=function(pt){return arguments.length?$e(qe=+pt):qe},lt.scale(158.837)}var vr=tt(1,4/w,w);function qr(){return _.geoProjection(vr).scale(152.63)}function kr(qe,$e,lt,pt,Et,bt){var Dt=r(bt),ur;if(M(qe)>1||M(bt)>1)ur=z(lt*Et+$e*pt*Dt);else{var yr=c(qe/2),Er=c(bt/2);ur=2*P(F(yr*yr+$e*pt*Er*Er))}return M(ur)>l?[ur,t(pt*c(bt),$e*Et-lt*pt*Dt)]:[0,0]}function Ur(qe,$e,lt){return z((qe*qe+$e*$e-lt*lt)/(2*qe*$e))}function _t(qe){return qe-2*w*a((qe+w)/(2*w))}function Fe(qe,$e,lt){for(var pt=[[qe[0],qe[1],c(qe[1]),r(qe[1])],[$e[0],$e[1],c($e[1]),r($e[1])],[lt[0],lt[1],c(lt[1]),r(lt[1])]],Et=pt[2],bt,Dt=0;Dt<3;++Dt,Et=bt)bt=pt[Dt],Et.v=kr(bt[1]-Et[1],Et[3],Et[2],bt[3],bt[2],bt[0]-Et[0]),Et.point=[0,0];var ur=Ur(pt[0].v[0],pt[2].v[0],pt[1].v[0]),yr=Ur(pt[0].v[0],pt[1].v[0],pt[2].v[0]),Er=w-ur;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(ur),2*(pt[0].point[1]=pt[1].point[1]=pt[2].v[0]*c(ur))];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]=kr(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 Sn=jr.slice();for(ji=0;ji<3;++ji){var Kn=ji==2?0:ji+1,Bn=Ur(pt[ji].v[0],Vi[ji][0],Vi[Kn][0]);Vi[ji][1]<0&&(Bn=-Bn),ji?ji==1?(Bn=yr-Bn,Sn[0]-=Vi[ji][0]*r(Bn),Sn[1]-=Vi[ji][0]*c(Bn)):(Bn=Er-Bn,Sn[0]+=Vi[ji][0]*r(Bn),Sn[1]+=Vi[ji][0]*c(Bn)):(Sn[0]+=Vi[ji][0]*r(Bn),Sn[1]-=Vi[ji][0]*c(Bn))}return Sn[0]/=3,Sn[1]/=3,Sn}return Qr}function Ye(qe){return qe[0]*=y,qe[1]*=y,qe}function Ae(){return Le([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])}function Le(qe,$e,lt){var pt=_.geoCentroid({type:"MultiPoint",coordinates:[qe,$e,lt]}),Et=[-pt[0],-pt[1]],bt=_.geoRotation(Et),Dt=Fe(Ye(bt(qe)),Ye(bt($e)),Ye(bt(lt)));Dt.invert=Pe(Dt);var ur=_.geoProjection(Dt).rotate(Et),yr=ur.center;return delete ur.rotate,ur.center=function(Er){return arguments.length?yr(bt(Er)):bt.invert(yr())},ur.clipAngle(90)}function We(qe,$e){var lt=F(1-c($e));return[2/d*qe*lt,d*(1-lt)]}We.invert=function(qe,$e){var lt=(lt=$e/d-1)*lt;return[lt>0?qe*F(w/lt)/2:0,P(1-lt)]};function Ke(){return _.geoProjection(We).scale(95.6464).center([0,30])}function st(qe){var $e=T(qe);function lt(pt,Et){return[pt,(pt?pt/c(pt):1)*(c(Et)*r(pt)-$e*r(Et))]}return lt.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,P(pt?Et*T(pt)/pt:Et)]},lt}function ot(){return rt(st).scale(249.828).clipAngle(90)}var Ut=F(3);function Ct(qe,$e){return[Ut*qe*(2*r(2*$e/3)-1)/d,Ut*d*c($e/3)]}Ct.invert=function(qe,$e){var lt=3*P($e/(Ut*d));return[d*qe/(Ut*(2*r(2*lt/3)-1)),lt]};function Pt(){return _.geoProjection(Ct).scale(156.19)}function jt(qe){var $e=r(qe);function lt(pt,Et){return[pt*$e,c(Et)/$e]}return lt.invert=function(pt,Et){return[pt/$e,P(Et*$e)]},lt}function cr(){return rt(jt).parallel(38.58).scale(195.044)}function or(qe){var $e=r(qe);function lt(pt,Et){return[pt*$e,(1+$e)*T(Et/2)]}return lt.invert=function(pt,Et){return[pt/$e,e(Et/(1+$e))*2]},lt}function nr(){return rt(or).scale(124.75)}function Pr(qe,$e){var lt=F(8/(3*w));return[lt*qe*(1-M($e)/w),lt*$e]}Pr.invert=function(qe,$e){var lt=F(8/(3*w)),pt=$e/lt;return[qe/(lt*(1-M(pt)/w)),pt]};function _a(){return _.geoProjection(Pr).scale(165.664)}function Fa(qe,$e){var lt=F(4-3*c(M($e)));return[2/F(6*w)*qe*lt,m($e)*F(2*w/3)*(2-lt)]}Fa.invert=function(qe,$e){var lt=2-M($e)/F(2*w/3);return[qe*F(6*w)/(2*lt),m($e)*P((4-lt*lt)/3)]};function Ra(){return _.geoProjection(Fa).scale(165.664)}function qa(qe,$e){var lt=F(w*(4+w));return[2/lt*qe*(1+F(1-4*$e*$e/(w*w))),4/lt*$e]}qa.invert=function(qe,$e){var lt=F(w*(4+w))/2;return[qe*lt/(1+F(1-$e*$e*(4+w)/(4*w))),$e*lt/2]};function Wa(){return _.geoProjection(qa).scale(180.739)}function Ca(qe,$e){var lt=(2+A)*c($e);$e/=2;for(var pt=0,Et=1/0;pt<10&&M(Et)>l;pt++){var bt=r($e);$e-=Et=($e+c($e)*(bt+2)-lt)/(2*bt*(1+bt))}return[2/F(w*(4+w))*qe*(1+r($e)),2*F(w/(4+w))*c($e)]}Ca.invert=function(qe,$e){var lt=$e*F((4+w)/w)/2,pt=P(lt),Et=r(pt);return[qe/(2/F(w*(4+w))*(1+Et)),P((pt+lt*(Et+2))/(2+A))]};function hi(){return _.geoProjection(Ca).scale(180.739)}function wi(qe,$e){return[qe*(1+r($e))/F(2+w),2*$e/F(2+w)]}wi.invert=function(qe,$e){var lt=F(2+w),pt=$e*lt/2;return[lt*qe/(1+r(pt)),pt]};function Yt(){return _.geoProjection(wi).scale(173.044)}function Rt(qe,$e){for(var lt=(1+A)*c($e),pt=0,Et=1/0;pt<10&&M(Et)>l;pt++)$e-=Et=($e+c($e)-lt)/(1+r($e));return lt=F(2+w),[qe*(1+r($e))/lt,2*$e/lt]}Rt.invert=function(qe,$e){var lt=1+A,pt=F(lt/2);return[qe*2*pt/(1+r($e*=pt)),P(($e+c($e))/lt)]};function Zt(){return _.geoProjection(Rt).scale(173.044)}var Jt=3+2*b;function Fr(qe,$e){var lt=c(qe/=2),pt=r(qe),Et=F(r($e)),bt=r($e/=2),Dt=c($e)/(bt+b*pt*Et),ur=F(2/(1+Dt*Dt)),yr=F((b*bt+(pt+lt)*Et)/(b*bt+(pt-lt)*Et));return[Jt*(ur*(yr-1/yr)-2*i(yr)),Jt*(ur*Dt*(yr+1/yr)-2*e(Dt))]}Fr.invert=function(qe,$e){if(!(bt=X.invert(qe/1.2,$e*1.065)))return null;var lt=bt[0],pt=bt[1],Et=20,bt;qe/=Jt,$e/=Jt;do{var Dt=lt/2,ur=pt/2,yr=c(Dt),Er=r(Dt),jr=c(ur),Qr=r(ur),ha=r(pt),Aa=F(ha),Da=jr/(Qr+b*Er*Aa),ci=Da*Da,Vi=F(2/(1+ci)),ji=b*Qr+(Er+yr)*Aa,on=b*Qr+(Er-yr)*Aa,Sn=ji/on,Kn=F(Sn),Bn=Kn-1/Kn,Ao=Kn+1/Kn,ls=Vi*Bn-2*i(Kn)-qe,Mo=Vi*Da*Ao-2*e(Da)-$e,Yo=jr&&p*Aa*yr*ci/jr,ds=(b*Er*Qr+Aa)/(2*(Qr+b*Er*Aa)*(Qr+b*Er*Aa)*Aa),ul=-.5*Da*Vi*Vi*Vi,tl=ul*Yo,es=ul*ds,ts=(ts=2*Qr+b*Aa*(Er-yr))*ts*Kn,Il=(b*Er*Qr*Aa+ha)/ts,tu=-(b*yr*jr)/(Aa*ts),Ru=Bn*tl-2*Il/Kn+Vi*(Il+Il/Sn),vu=Bn*es-2*tu/Kn+Vi*(tu+tu/Sn),wl=Da*Ao*tl-2*Yo/(1+ci)+Vi*Ao*Yo+Vi*Da*(Il-Il/Sn),fu=Da*Ao*es-2*ds/(1+ci)+Vi*Ao*ds+Vi*Da*(tu-tu/Sn),uc=vu*wl-fu*Ru;if(!uc)break;var Gl=(Mo*vu-ls*fu)/uc,Hl=(ls*wl-Mo*Ru)/uc;lt-=Gl,pt=n(-A,s(A,pt-Hl))}while((M(Gl)>l||M(Hl)>l)&&--Et>0);return M(M(pt)-A)pt){var Qr=F(jr),ha=t(Er,yr),Aa=lt*f(ha/lt),Da=ha-Aa,ci=qe*r(Da),Vi=(qe*c(Da)-Da*c(ci))/(A-ci),ji=xt(Da,Vi),on=(w-qe)/ut(ji,ci,w);yr=Qr;var Sn=50,Kn;do yr-=Kn=(qe+ut(ji,ci,yr)*on-Qr)/(ji(yr)*on);while(M(Kn)>l&&--Sn>0);Er=Da*c(yr),yrpt){var yr=F(ur),Er=t(Dt,bt),jr=lt*f(Er/lt),Qr=Er-jr;bt=yr*r(Qr),Dt=yr*c(Qr);for(var ha=bt-A,Aa=c(bt),Da=Dt/Aa,ci=btl||M(Da)>l)&&--ci>0);return[Qr,ha]},yr}var wr=Cr(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);function Rr(){return _.geoProjection(wr).scale(149.995)}var Nr=Cr(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);function Hr(){return _.geoProjection(Nr).scale(153.93)}var gt=Cr(5/6*w,-.62636,-.0344,0,1.3493,-.05524,0,.045);function Kt(){return _.geoProjection(gt).scale(130.945)}function mr(qe,$e){var lt=qe*qe,pt=$e*$e;return[qe*(1-.162388*pt)*(.87-952426e-9*lt*lt),$e*(1+pt/12)]}mr.invert=function(qe,$e){var lt=qe,pt=$e,Et=50,bt;do{var Dt=pt*pt;pt-=bt=(pt*(1+Dt/12)-$e)/(1+Dt/4)}while(M(bt)>l&&--Et>0);Et=50,qe/=1-.162388*Dt;do{var ur=(ur=lt*lt)*ur;lt-=bt=(lt*(.87-952426e-9*ur)-qe)/(.87-.00476213*ur)}while(M(bt)>l&&--Et>0);return[lt,pt]};function Ir(){return _.geoProjection(mr).scale(131.747)}var va=Cr(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function Pa(){return _.geoProjection(va).scale(131.087)}function ga(qe){var $e=qe(A,0)[0]-qe(-A,0)[0];function lt(pt,Et){var bt=pt>0?-.5:.5,Dt=qe(pt+bt*w,Et);return Dt[0]-=bt*$e,Dt}return qe.invert&&(lt.invert=function(pt,Et){var bt=pt>0?-.5:.5,Dt=qe.invert(pt+bt*$e,Et),ur=Dt[0]-bt*w;return ur<-w?ur+=2*w:ur>w&&(ur-=2*w),Dt[0]=ur,Dt}),lt}function la(qe,$e){var lt=m(qe),pt=m($e),Et=r($e),bt=r(qe)*Et,Dt=c(qe)*Et,ur=c(pt*$e);qe=M(t(Dt,ur)),$e=P(bt),M(qe-A)>l&&(qe%=A);var yr=ba(qe>w/4?A-qe:qe,$e);return qe>w/4&&(ur=yr[0],yr[0]=-yr[1],yr[1]=-ur),yr[0]*=lt,yr[1]*=-pt,yr}la.invert=function(qe,$e){M(qe)>1&&(qe=m(qe)*2-qe),M($e)>1&&($e=m($e)*2-$e);var lt=m(qe),pt=m($e),Et=-lt*qe,bt=-pt*$e,Dt=bt/Et<1,ur=Ai(Dt?bt:Et,Dt?Et:bt),yr=ur[0],Er=ur[1],jr=r(Er);return Dt&&(yr=-A-yr),[lt*(t(c(yr)*jr,-c(Er))+w),pt*P(r(yr)*jr)]};function ba(qe,$e){if($e===A)return[0,0];var lt=c($e),pt=lt*lt,Et=pt*pt,bt=1+Et,Dt=1+3*Et,ur=1-Et,yr=P(1/F(bt)),Er=ur+pt*bt*yr,jr=(1-lt)/Er,Qr=F(jr),ha=jr*bt,Aa=F(ha),Da=Qr*ur,ci,Vi;if(qe===0)return[0,-(Da+pt*Aa)];var ji=r($e),on=1/ji,Sn=2*lt*ji,Kn=(-3*pt+yr*Dt)*Sn,Bn=(-Er*ji-(1-lt)*Kn)/(Er*Er),Ao=.5*Bn/Qr,ls=ur*Ao-2*pt*Qr*Sn,Mo=pt*bt*Bn+jr*Dt*Sn,Yo=-on*Sn,ds=-on*Mo,ul=-2*on*ls,tl=4*qe/w,es;if(qe>.222*w||$e.175*w){if(ci=(Da+pt*F(ha*(1+Et)-Da*Da))/(1+Et),qe>w/4)return[ci,ci];var ts=ci,Il=.5*ci;ci=.5*(Il+ts),Vi=50;do{var tu=F(ha-ci*ci),Ru=ci*(ul+Yo*tu)+ds*P(ci/Aa)-tl;if(!Ru)break;Ru<0?Il=ci:ts=ci,ci=.5*(Il+ts)}while(M(ts-Il)>l&&--Vi>0)}else{ci=l,Vi=25;do{var vu=ci*ci,wl=F(ha-vu),fu=ul+Yo*wl,uc=ci*fu+ds*P(ci/Aa)-tl,Gl=fu+(ds-Yo*vu)/wl;ci-=es=wl?uc/Gl:0}while(M(es)>l&&--Vi>0)}return[ci,-Da-pt*F(ha-ci*ci)]}function Ai(qe,$e){for(var lt=0,pt=1,Et=.5,bt=50;;){var Dt=Et*Et,ur=F(Et),yr=P(1/F(1+Dt)),Er=1-Dt+Et*(1+Dt)*yr,jr=(1-ur)/Er,Qr=F(jr),ha=jr*(1+Dt),Aa=Qr*(1-Dt),Da=ha-qe*qe,ci=F(Da),Vi=$e+Aa+Et*ci;if(M(pt-lt)0?lt=Et:pt=Et,Et=.5*(lt+pt)}if(!bt)return null;var ji=P(ur),on=r(ji),Sn=1/on,Kn=2*ur*on,Bn=(-3*Et+yr*(1+3*Dt))*Kn,Ao=(-Er*on-(1-ur)*Bn)/(Er*Er),ls=.5*Ao/Qr,Mo=(1-Dt)*ls-2*Et*Qr*Kn,Yo=-2*Sn*Mo,ds=-Sn*Kn,ul=-Sn*(Et*(1+Dt)*Ao+jr*(1+3*Dt)*Kn);return[w/4*(qe*(Yo+ds*ci)+ul*P(qe/F(ha))),ji]}function ki(){return _.geoProjection(ga(la)).scale(239.75)}function Ki(qe,$e,lt){var pt,Et,bt;return qe?(pt=En(qe,lt),$e?(Et=En($e,1-lt),bt=Et[1]*Et[1]+lt*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,-lt*pt[0]*pt[1]*Et[0]/bt]]):[[pt[0],0],[pt[1],0],[pt[2],0]]):(Et=En($e,1-lt),[[0,Et[0]/Et[1]],[1/Et[1],0],[Et[2]/Et[1],0]])}function En(qe,$e){var lt,pt,Et,bt,Dt;if($e=1-l)return lt=(1-$e)/4,pt=L(qe),bt=N(qe),Et=1/pt,Dt=pt*O(qe),[bt+lt*(Dt-qe)/(pt*pt),Et-lt*bt*Et*(Dt-qe),Et+lt*bt*Et*(Dt+qe),2*e(o(qe))-A+lt*(Dt-qe)/pt];var ur=[1,0,0,0,0,0,0,0,0],yr=[F($e),0,0,0,0,0,0,0,0],Er=0;for(pt=F(1-$e),Dt=1;M(yr[Er]/ur[Er])>l&&Er<8;)lt=ur[Er++],yr[Er]=(lt-pt)/2,ur[Er]=(lt+pt)/2,pt=F(lt*pt),Dt*=2;Et=Dt*ur[Er]*qe;do bt=yr[Er]*c(pt=Et)/ur[Er],Et=(P(bt)+Et)/2;while(--Er);return[c(Et),bt=r(Et),bt/r(Et-pt),Et]}function Tn(qe,$e,lt){var pt=M(qe),Et=M($e),bt=O(Et);if(pt){var Dt=1/c(pt),ur=1/(T(pt)*T(pt)),yr=-(ur+lt*(bt*bt*Dt*Dt)-1+lt),Er=(lt-1)*ur,jr=(-yr+F(yr*yr-4*Er))/2;return[On(e(1/F(jr)),lt)*m(qe),On(e(F((jr/ur-1)/lt)),1-lt)*m($e)]}return[0,On(e(bt),1-lt)*m($e)]}function On(qe,$e){if(!$e)return qe;if($e===1)return i(T(qe/2+E));for(var lt=1,pt=F(1-$e),Et=F($e),bt=0;M(Et)>l;bt++){if(qe%w){var Dt=e(pt*T(qe)/lt);Dt<0&&(Dt+=w),qe+=Dt+~~(qe/w)*w}else qe+=qe;Et=(lt+pt)/2,pt=F(lt*pt),Et=((lt=Et)-pt)/2}return qe/(h(2,bt)*lt)}function kn(qe,$e){var lt=(b-1)/(b+1),pt=F(1-lt*lt),Et=On(A,pt*pt),bt=-1,Dt=i(T(w/4+M($e)/2)),ur=o(bt*Dt)/F(lt),yr=ao(ur*r(bt*qe),ur*c(bt*qe)),Er=Tn(yr[0],yr[1],pt*pt);return[-Er[1],($e>=0?1:-1)*(.5*Et-Er[0])]}function ao(qe,$e){var lt=qe*qe,pt=$e+1,Et=1-lt-$e*$e;return[.5*((qe>=0?A:-A)-t(Et,2*qe)),-.25*i(Et*Et+4*lt)+.5*i(pt*pt+lt)]}function Co(qe,$e){var lt=$e[0]*$e[0]+$e[1]*$e[1];return[(qe[0]*$e[0]+qe[1]*$e[1])/lt,(qe[1]*$e[0]-qe[0]*$e[1])/lt]}kn.invert=function(qe,$e){var lt=(b-1)/(b+1),pt=F(1-lt*lt),Et=On(A,pt*pt),bt=-1,Dt=Ki(.5*Et-$e,-qe,pt*pt),ur=Co(Dt[0],Dt[1]),yr=t(ur[1],ur[0])/bt;return[yr,2*e(o(.5/bt*i(lt*ur[0]*ur[0]+lt*ur[1]*ur[1])))-A]};function bo(){return _.geoProjection(ga(kn)).scale(151.496)}function zs(qe){var $e=c(qe),lt=r(qe),pt=Cn(qe);pt.invert=Cn(-qe);function Et(bt,Dt){var ur=pt(bt,Dt);bt=ur[0],Dt=ur[1];var yr=c(Dt),Er=r(Dt),jr=r(bt),Qr=z($e*yr+lt*Er*jr),ha=c(Qr),Aa=M(ha)>l?Qr/ha:1;return[Aa*lt*c(bt),(M(bt)>A?Aa:-Aa)*($e*Er-lt*yr*jr)]}return Et.invert=function(bt,Dt){var ur=F(bt*bt+Dt*Dt),yr=-c(ur),Er=r(ur),jr=ur*Er,Qr=-Dt*yr,ha=ur*$e,Aa=F(jr*jr+Qr*Qr-ha*ha),Da=t(jr*ha+Qr*Aa,Qr*ha-jr*Aa),ci=(ur>A?-1:1)*t(bt*yr,ur*r(Da)*Er+Dt*c(Da)*yr);return pt.invert(ci,Da)},Et}function Cn(qe){var $e=c(qe),lt=r(qe);return function(pt,Et){var bt=r(Et),Dt=r(pt)*bt,ur=c(pt)*bt,yr=c(Et);return[t(ur,Dt*lt-yr*$e),P(yr*lt+Dt*$e)]}}function wo(){var qe=0,$e=_.geoProjectionMutator(zs),lt=$e(qe),pt=lt.rotate,Et=lt.stream,bt=_.geoCircle();return lt.parallel=function(Dt){if(!arguments.length)return qe*g;var ur=lt.rotate();return $e(qe=Dt*y).rotate(ur)},lt.rotate=function(Dt){return arguments.length?(pt.call(lt,[Dt[0],Dt[1]-qe*g]),bt.center([-Dt[0],-Dt[1]]),lt):(Dt=pt.call(lt),Dt[1]+=qe*g,Dt)},lt.stream=function(Dt){return Dt=Et(Dt),Dt.sphere=function(){Dt.polygonStart();var ur=.01,yr=bt.radius(90-ur)().coordinates[0],Er=yr.length-1,jr=-1,Qr;for(Dt.lineStart();++jr=0;)Dt.point((Qr=yr[jr])[0],Qr[1]);Dt.lineEnd(),Dt.polygonEnd()},Dt},lt.scale(79.4187).parallel(45).clipAngle(180-.001)}var Zn=3,go=P(1-1/Zn)*g,os=jt(0);function ys(qe){var $e=go*y,lt=We(w,$e)[0]-We(-w,$e)[0],pt=os(0,$e)[1],Et=We(0,$e)[1],bt=d-Et,Dt=u/qe,ur=4/u,yr=pt+bt*bt*4/u;function Er(jr,Qr){var ha,Aa=M(Qr);if(Aa>$e){var Da=s(qe-1,n(0,a((jr+w)/Dt)));jr+=w*(qe-1)/qe-Da*Dt,ha=We(jr,Aa),ha[0]=ha[0]*u/lt-u*(qe-1)/(2*qe)+Da*u/qe,ha[1]=pt+(ha[1]-Et)*4*bt/u,Qr<0&&(ha[1]=-ha[1])}else ha=os(jr,Qr);return ha[0]*=ur,ha[1]/=yr,ha}return Er.invert=function(jr,Qr){jr/=ur,Qr*=yr;var ha=M(Qr);if(ha>pt){var Aa=s(qe-1,n(0,a((jr+w)/Dt)));jr=(jr+w*(qe-1)/qe-Aa*Dt)*lt/u;var Da=We.invert(jr,.25*(ha-pt)*u/bt+Et);return Da[0]-=w*(qe-1)/qe-Aa*Dt,Qr<0&&(Da[1]=-Da[1]),Da}return os.invert(jr,Qr)},Er}function jo(qe,$e){return[qe,$e&1?90-l:go]}function Yn(qe,$e){return[qe,$e&1?-90+l:-go]}function Gn(qe){return[qe[0]*(1-l),qe[1]]}function Hn(qe){var $e=[].concat(S.range(-180,180+qe/2,qe).map(jo),S.range(180,-180-qe/2,-qe).map(Yn));return{type:"Polygon",coordinates:[qe===180?$e.map(Gn):$e]}}function ss(){var qe=4,$e=_.geoProjectionMutator(ys),lt=$e(qe),pt=lt.stream;return lt.lobes=function(Et){return arguments.length?$e(qe=+Et):qe},lt.stream=function(Et){var bt=lt.rotate(),Dt=pt(Et),ur=(lt.rotate([0,0]),pt(Et));return lt.rotate(bt),Dt.sphere=function(){_.geoStream(Hn(180/qe),ur)},Dt},lt.scale(239.75)}function _s(qe){var $e=1+qe,lt=c(1/$e),pt=P(lt),Et=2*F(w/(bt=w+4*pt*$e)),bt,Dt=.5*Et*($e+F(qe*(2+qe))),ur=qe*qe,yr=$e*$e;function Er(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),Sn=r(ci),Kn=pt+t(on,$e-Sn),Bn=1+yr-2*$e*Sn;ci-=ji=(ci-ur*pt-$e*on+Bn*Kn-.5*ha*bt)/(2*$e*on*Kn)}while(M(ji)>x&&--Vi>0);Aa=Et*F(Bn),Da=jr*Kn/w}else Aa=Et*(qe+ha),Da=jr*pt/w;return[Aa*c(Da),Dt-Aa*r(Da)]}return Er.invert=function(jr,Qr){var ha=jr*jr+(Qr-=Dt)*Qr,Aa=(1+yr-ha/(Et*Et))/(2*$e),Da=z(Aa),ci=c(Da),Vi=pt+t(ci,$e-Aa);return[P(jr/F(ha))*w/Vi,P(1-2*(Da-ur*pt-$e*ci+(1+yr-2*$e*Aa)*Vi)/bt)]},Er}function ps(){var qe=1,$e=_.geoProjectionMutator(_s),lt=$e(qe);return lt.ratio=function(pt){return arguments.length?$e(qe=+pt):qe},lt.scale(167.774).center([0,18.67])}var Ko=.7109889596207567,Gi=.0528035274542;function Pn(qe,$e){return $e>-Ko?(qe=Ve(qe,$e),qe[1]+=Gi,qe):Je(qe,$e)}Pn.invert=function(qe,$e){return $e>-Ko?Ve.invert(qe,$e-Gi):Je.invert(qe,$e)};function qs(){return _.geoProjection(Pn).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}function bs(qe,$e){return M($e)>Ko?(qe=Ve(qe,$e),qe[1]-=$e>0?Gi:-Gi,qe):Je(qe,$e)}bs.invert=function(qe,$e){return M($e)>Ko?Ve.invert(qe,$e+($e>0?Gi:-Gi)):Je.invert(qe,$e)};function lo(){return _.geoProjection(bs).scale(152.63)}function Zo(qe,$e,lt,pt){var Et=F(4*w/(2*lt+(1+qe-$e/2)*c(2*lt)+(qe+$e)/2*c(4*lt)+$e/2*c(6*lt))),bt=F(pt*c(lt)*F((1+qe*r(2*lt)+$e*r(4*lt))/(1+qe+$e))),Dt=lt*yr(1);function ur(Qr){return F(1+qe*r(2*Qr)+$e*r(4*Qr))}function yr(Qr){var ha=Qr*lt;return(2*ha+(1+qe-$e/2)*c(2*ha)+(qe+$e)/2*c(4*ha)+$e/2*c(6*ha))/lt}function Er(Qr){return ur(Qr)*c(Qr)}var jr=function(Qr,ha){var Aa=lt*Re(yr,Dt*c(ha)/lt,ha/w);isNaN(Aa)&&(Aa=lt*m(ha));var Da=Et*ur(Aa);return[Da*bt*Qr/w*r(Aa),Da/bt*c(Aa)]};return jr.invert=function(Qr,ha){var Aa=Re(Er,ha*bt/Et);return[Qr*w/(r(Aa)*Et*bt*ur(Aa)),P(lt*yr(Aa/lt)/Dt)]},lt===0&&(Et=F(pt/w),jr=function(Qr,ha){return[Qr*Et,c(ha)/Et]},jr.invert=function(Qr,ha){return[Qr/Et,P(ha*Et)]}),jr}function ws(){var qe=1,$e=0,lt=45*y,pt=2,Et=_.geoProjectionMutator(Zo),bt=Et(qe,$e,lt,pt);return bt.a=function(Dt){return arguments.length?Et(qe=+Dt,$e,lt,pt):qe},bt.b=function(Dt){return arguments.length?Et(qe,$e=+Dt,lt,pt):$e},bt.psiMax=function(Dt){return arguments.length?Et(qe,$e,lt=+Dt*y,pt):lt*g},bt.ratio=function(Dt){return arguments.length?Et(qe,$e,lt,pt=+Dt):pt},bt.scale(180.739)}function Hs(qe,$e,lt,pt,Et,bt,Dt,ur,yr,Er,jr){if(jr.nanEncountered)return NaN;var Qr,ha,Aa,Da,ci,Vi,ji,on,Sn,Kn;if(Qr=lt-$e,ha=qe($e+Qr*.25),Aa=qe(lt-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,Kn=(Vi-Dt)/15,Er>yr?(jr.maxDepthCount++,Vi+Kn):Math.abs(Kn)>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)/Dt}var Qr=2*jr(1)/w*bt/lt,ha=function(Aa,Da){var ci=jr(M(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,M(Da)<1&&(ci=m(Da)*P(Et(M(Da))*bt)),[Aa/pt(M(Da)),ci]},ha}function Po(){var qe=0,$e=2.5,lt=1.183136,pt=_.geoProjectionMutator(yn),Et=pt(qe,$e,lt);return Et.alpha=function(bt){return arguments.length?pt(qe=+bt,$e,lt):qe},Et.k=function(bt){return arguments.length?pt(qe,$e=+bt,lt):$e},Et.gamma=function(bt){return arguments.length?pt(qe,$e,lt=+bt):lt},Et.scale(152.63)}function To(qe,$e){return M(qe[0]-$e[0])=0;--yr)lt=qe[1][yr],pt=lt[0][0],Et=lt[0][1],bt=lt[1][1],Dt=lt[2][0],ur=lt[2][1],$e.push(Ws([[Dt-l,ur-l],[Dt-l,bt+l],[pt+l,bt+l],[pt+l,Et-l]],30));return{type:"Polygon",coordinates:[S.merge($e)]}}function uo(qe,$e,lt){var pt,Et;function bt(yr,Er){for(var jr=Er<0?-1:1,Qr=$e[+(Er<0)],ha=0,Aa=Qr.length-1;haQr[ha][2][0];++ha);var Da=qe(yr-Qr[ha][1][0],Er);return Da[0]+=qe(Qr[ha][1][0],jr*Er>jr*Qr[ha][0][1]?Qr[ha][0][1]:Er)[0],Da}lt?bt.invert=lt(bt):qe.invert&&(bt.invert=function(yr,Er){for(var jr=Et[+(Er<0)],Qr=$e[+(Er<0)],ha=0,Aa=jr.length;haDa&&(ci=Aa,Aa=Da,Da=ci),[[Qr,Aa],[ha,Da]]})}),Dt):$e.map(function(Er){return Er.map(function(jr){return[[jr[0][0]*g,jr[0][1]*g],[jr[1][0]*g,jr[1][1]*g],[jr[2][0]*g,jr[2][1]*g]]})})},$e!=null&&Dt.lobes($e),Dt}var Nl=[[[[-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 Ks(){return uo(Ce,Nl).scale(160.857)}var Ts=[[[[-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 Ls(){return uo(bs,Ts).scale(152.63)}var Jo=[[[[-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 Es(){return uo(Ve,Jo).scale(169.529)}var Ul=[[[[-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 lu(){return uo(Ve,Ul).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,Pe).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(Je,Sf).scale(152.63).rotate([-20,0])}function Bs(qe,$e){return[3/u*qe*F(w*w/3-$e*$e),$e]}Bs.invert=function(qe,$e){return[u/3*qe/F(w*w/3-$e*$e),$e]};function dc(){return _.geoProjection(Bs).scale(158.837)}function Wc(qe){function $e(lt,pt){if(M(M(pt)-A)2)return null;lt/=2,pt/=2;var bt=lt*lt,Dt=pt*pt,ur=2*pt/(1+bt+Dt);return ur=h((1+ur)/(1-ur),1/qe),[t(2*lt,1-bt-Dt)/qe,P((ur-1)/(ur+1))]},$e}function uu(){var qe=.5,$e=_.geoProjectionMutator(Wc),lt=$e(qe);return lt.spacing=function(pt){return arguments.length?$e(qe=+pt):qe},lt.scale(124.75)}var Pl=w/b;function ic(qe,$e){return[qe*(1+F(r($e)))/2,$e/(r($e/2)*r(qe/6))]}ic.invert=function(qe,$e){var lt=M(qe),pt=M($e),Et=l,bt=A;ptl||M(Vi)>l)&&--Et>0);return Et&&[lt,pt]};function vl(){return _.geoProjection(nl).scale(139.98)}function As(qe,$e){return[c(qe)/r($e),T($e)*r(qe)]}As.invert=function(qe,$e){var lt=qe*qe,pt=$e*$e,Et=pt+1,bt=lt+Et,Dt=qe?p*F((bt-F(bt*bt-4*lt))/lt):1/F(Et);return[P(qe*Dt),m($e)*z(Dt)]};function Xs(){return _.geoProjection(As).scale(144.049).clipAngle(90-.001)}function nc(qe){var $e=r(qe),lt=T(E+qe/2);function pt(Et,bt){var Dt=bt-qe,ur=M(Dt)=0;)jr=qe[Er],Qr=jr[0]+ur*(Aa=Qr)-yr*ha,ha=jr[1]+ur*ha+yr*Aa;return Qr=ur*(Aa=Qr)-yr*ha,ha=ur*ha+yr*Aa,[Qr,ha]}return lt.invert=function(pt,Et){var bt=20,Dt=pt,ur=Et;do{for(var yr=$e,Er=qe[yr],jr=Er[0],Qr=Er[1],ha=0,Aa=0,Da;--yr>=0;)Er=qe[yr],ha=jr+Dt*(Da=ha)-ur*Aa,Aa=Qr+Dt*Aa+ur*Da,jr=Er[0]+Dt*(Da=jr)-ur*Qr,Qr=Er[1]+Dt*Qr+ur*Da;ha=jr+Dt*(Da=ha)-ur*Aa,Aa=Qr+Dt*Aa+ur*Da,jr=Dt*(Da=jr)-ur*Qr-pt,Qr=Dt*Qr+ur*Da-Et;var ci=ha*ha+Aa*Aa,Vi,ji;Dt-=Vi=(jr*ha+Qr*Aa)/ci,ur-=ji=(Qr*ha-jr*Aa)/ci}while(M(Vi)+M(ji)>l*l&&--bt>0);if(bt){var on=F(Dt*Dt+ur*ur),Sn=2*e(on*.5),Kn=c(Sn);return[t(Dt*Kn,on*r(Sn)),on?P(ur*Kn/on):0]}},lt}var us=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],bh=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],Ps=[[.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]],Xc=[[.721316,0],[0,0],[-.00881625,-.00617325]];function Vu(){return Ql(us,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)}function ql(){return Ql(bh,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])}function Mf(){return Ql(Ps,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])}function Ac(){return Ql(to,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)}function nf(){return Ql(Xc,[165,10]).scale(250).clipAngle(130).center([-165,-10])}function Ql(qe,$e){var lt=_.geoProjection(xh(qe)).rotate($e).clipAngle(90),pt=_.geoRotation($e),Et=lt.center;return delete lt.rotate,lt.center=function(bt){return arguments.length?Et(pt(bt)):pt.invert(Et())},lt}var Jf=F(6),Of=F(7);function of(qe,$e){var lt=P(7*c($e)/(3*Jf));return[Jf*qe*(2*r(2*lt/3)-1)/Of,9*c(lt/3)/Of]}of.invert=function(qe,$e){var lt=3*P($e*Of/9);return[qe*Of/(Jf*(2*r(2*lt/3)-1)),P(c(lt)*3*Jf/7)]};function jc(){return _.geoProjection(of).scale(164.859)}function Bf(qe,$e){for(var lt=(1+p)*c($e),pt=$e,Et=0,bt;Et<25&&(pt-=bt=(c(pt/2)+c(pt)-lt)/(.5*r(pt/2)+r(pt)),!(M(bt)x&&--pt>0);return bt=lt*lt,Dt=bt*bt,ur=bt*Dt,[qe/(.84719-.13063*bt+ur*ur*(-.04515+.05494*bt-.02326*Dt+.00331*ur)),lt]};function Zc(){return _.geoProjection(oc).scale(175.295)}function eu(qe,$e){return[qe*(1+r($e))/2,2*($e-T($e/2))]}eu.invert=function(qe,$e){for(var lt=$e/2,pt=0,Et=1/0;pt<10&&M(Et)>l;++pt){var bt=r($e/2);$e-=Et=($e-T($e/2)-lt)/(1-.5/(bt*bt))}return[2*qe/(1+r($e)),$e]};function qc(){return _.geoProjection(eu).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 Zs(){return uo(pe(1/0),Sc).rotate([20,0]).scale(152.63)}function kf(qe,$e){var lt=c($e),pt=r($e),Et=m(qe);if(qe===0||M($e)===A)return[0,$e];if($e===0)return[qe,0];if(M(qe)===A)return[qe*pt,A*lt];var bt=w/(2*qe)-2*qe/w,Dt=2*$e/w,ur=(1-Dt*Dt)/(lt-Dt),yr=bt*bt,Er=ur*ur,jr=1+yr/Er,Qr=1+Er/yr,ha=(bt*lt/ur-bt/2)/jr,Aa=(Er*lt/yr+ur/2)/Qr,Da=ha*ha+pt*pt/jr,ci=Aa*Aa-(Er*lt*lt/yr+ur*lt-1)/Qr;return[A*(ha+F(Da)*Et),A*(Aa+F(ci<0?0:ci)*m(-$e*bt)*Et)]}kf.invert=function(qe,$e){qe/=A,$e/=A;var lt=qe*qe,pt=$e*$e,Et=lt+pt,bt=w*w;return[qe?(Et-1+F((1-Et)*(1-Et)+4*lt))/(2*qe)*A:0,Re(function(Dt){return Et*(w*c(Dt)-2*Dt)*w+4*Dt*Dt*($e-c(Dt))+2*w*Dt-bt*$e},0)]};function fh(){return _.geoProjection(kf).scale(127.267)}var Uf=1.0148,Yc=.23185,$f=-.14499,Cu=.02406,jf=Uf,ml=5*Yc,Lu=7*$f,Mc=9*Cu,ol=1.790857183;function vc(qe,$e){var lt=$e*$e;return[qe,$e*(Uf+lt*lt*(Yc+lt*($f+Cu*lt)))]}vc.invert=function(qe,$e){$e>ol?$e=ol:$e<-ol&&($e=-ol);var lt=$e,pt;do{var Et=lt*lt;lt-=pt=(lt*(Uf+Et*Et*(Yc+Et*($f+Cu*Et)))-$e)/(jf+Et*Et*(ml+Et*(Lu+Mc*Et)))}while(M(pt)>l);return[qe,lt]};function yu(){return _.geoProjection(vc).scale(139.319)}function Tu(qe,$e){if(M($e)l&&--Et>0);return Dt=T(pt),[(M($e)=0;)if(pt=$e[ur],lt[0]===pt[0]&<[1]===pt[1]){if(bt)return[bt,lt];bt=lt}}}function iu(qe){for(var $e=qe.length,lt=[],pt=qe[$e-1],Et=0;Et<$e;++Et)lt.push([pt,pt=qe[Et]]);return lt}function Kc(qe){return qe.project.invert||qe.children&&qe.children.some(Kc)}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(qe){return qe.map(function($e){return hh[$e]})});function sl(qe){qe=qe||function(lt){var pt=_.geoCentroid({type:"MultiPoint",coordinates:lt});return _.geoGnomonic().scale(1).translate([0,0]).rotate([-pt[0],-pt[1]])};var $e=mf.map(function(lt){return{face:lt,project:qe(lt)}});return[-1,0,0,1,0,1,4,5].forEach(function(lt,pt){var Et=$e[lt];Et&&(Et.children||(Et.children=[])).push($e[pt])}),sf($e[0],function(lt,pt){return $e[lt<-w/2?pt<0?6:4:lt<0?pt<0?2:0:lt0?[-pt[0],0]:[180-pt[0],180])};var $e=mf.map(function(lt){return{face:lt,project:qe(lt)}});return[-1,0,0,1,0,1,4,5].forEach(function(lt,pt){var Et=$e[lt];Et&&(Et.children||(Et.children=[])).push($e[pt])}),sf($e[0],function(lt,pt){return $e[lt<-w/2?pt<0?6:4:lt<0?pt<0?2:0:ltpt^Aa>pt&<<(ha-Er)*(pt-jr)/(Aa-jr)+Er&&(Et=!Et)}return Et}function nu(qe,$e){var lt=$e.stream,pt;if(!lt)throw new Error("invalid projection");switch(qe&&qe.type){case"Feature":pt=Xu;break;case"FeatureCollection":pt=Vf;break;default:pt=gc;break}return pt(qe,lt)}function Vf(qe,$e){return{type:"FeatureCollection",features:qe.features.map(function(lt){return Xu(lt,$e)})}}function Xu(qe,$e){return{type:"Feature",id:qe.id,properties:qe.properties,geometry:gc(qe.geometry,$e)}}function Cc(qe,$e){return{type:"GeometryCollection",geometries:qe.geometries.map(function(lt){return gc(lt,$e)})}}function gc(qe,$e){if(!qe)return null;if(qe.type==="GeometryCollection")return Cc(qe,$e);var lt;switch(qe.type){case"Point":lt=Lc;break;case"MultiPoint":lt=Lc;break;case"LineString":lt=$c;break;case"MultiLineString":lt=$c;break;case"Polygon":lt=sc;break;case"MultiPolygon":lt=sc;break;case"Sphere":lt=sc;break;default:return null}return _.geoStream(qe,$e(lt)),lt.result()}var Vl=[],xu=[],Lc={point:function(qe,$e){Vl.push([qe,$e])},result:function(){var qe=Vl.length?Vl.length<2?{type:"Point",coordinates:Vl[0]}:{type:"MultiPoint",coordinates:Vl}:null;return Vl=[],qe}},$c={lineStart:Wu,point:function(qe,$e){Vl.push([qe,$e])},lineEnd:function(){Vl.length&&(xu.push(Vl),Vl=[])},result:function(){var qe=xu.length?xu.length<2?{type:"LineString",coordinates:xu[0]}:{type:"MultiLineString",coordinates:xu}:null;return xu=[],qe}},sc={polygonStart:Wu,lineStart:Wu,point:function(qe,$e){Vl.push([qe,$e])},lineEnd:function(){var qe=Vl.length;if(qe){do Vl.push(Vl[0].slice());while(++qe<4);xu.push(Vl),Vl=[]}},polygonEnd:Wu,result:function(){if(!xu.length)return null;var qe=[],$e=[];return xu.forEach(function(lt){Jc(lt)?qe.push([lt]):$e.push(lt)}),$e.forEach(function(lt){var pt=lt[0];qe.some(function(Et){if(Lf(Et[0],pt))return Et.push(lt),!0})||qe.push([lt])}),xu=[],qe.length?qe.length>1?{type:"MultiPolygon",coordinates:qe}:{type:"Polygon",coordinates:qe[0]}:null}};function Pc(qe){var $e=qe(A,0)[0]-qe(-A,0)[0];function lt(pt,Et){var bt=M(pt)0?pt-w:pt+w,Et),ur=(Dt[0]-Dt[1])*p,yr=(Dt[0]+Dt[1])*p;if(bt)return[ur,yr];var Er=$e*p,jr=ur>0^yr>0?-1:1;return[jr*ur-m(yr)*Er,jr*yr-m(ur)*Er]}return qe.invert&&(lt.invert=function(pt,Et){var bt=(pt+Et)*p,Dt=(Et-pt)*p,ur=M(bt)<.5*$e&&M(Dt)<.5*$e;if(!ur){var yr=$e*p,Er=bt>0^Dt>0?-1:1,jr=-Er*pt+(Dt>0?1:-1)*yr,Qr=-Er*Et+(bt>0?1:-1)*yr;bt=(-jr-Qr)*p,Dt=(jr-Qr)*p}var ha=qe.invert(bt,Dt);return ur||(ha[0]+=bt>0?w:-w),ha}),_.geoProjection(lt).rotate([-90,-90,45]).clipAngle(180-.001)}function Qt(){return Pc(la).scale(176.423)}function xr(){return Pc(kn).scale(111.48)}function aa(qe,$e){if(!(0<=($e=+$e)&&$e<=20))throw new Error("invalid digits");function lt(Er){var jr=Er.length,Qr=2,ha=new Array(jr);for(ha[0]=+Er[0].toFixed($e),ha[1]=+Er[1].toFixed($e);Qr2||Aa[0]!=jr[0]||Aa[1]!=jr[1])&&(Qr.push(Aa),jr=Aa)}return Qr.length===1&&Er.length>1&&Qr.push(lt(Er[Er.length-1])),Qr}function bt(Er){return Er.map(Et)}function Dt(Er){if(Er==null)return Er;var jr;switch(Er.type){case"GeometryCollection":jr={type:"GeometryCollection",geometries:Er.geometries.map(Dt)};break;case"Point":jr={type:"Point",coordinates:lt(Er.coordinates)};break;case"MultiPoint":jr={type:Er.type,coordinates:pt(Er.coordinates)};break;case"LineString":jr={type:Er.type,coordinates:Et(Er.coordinates)};break;case"MultiLineString":case"Polygon":jr={type:Er.type,coordinates:bt(Er.coordinates)};break;case"MultiPolygon":jr={type:"MultiPolygon",coordinates:Er.coordinates.map(bt)};break;default:return Er}return Er.bbox!=null&&(jr.bbox=Er.bbox),jr}function ur(Er){var jr={type:"Feature",properties:Er.properties,geometry:Dt(Er.geometry)};return Er.id!=null&&(jr.id=Er.id),Er.bbox!=null&&(jr.bbox=Er.bbox),jr}if(qe!=null)switch(qe.type){case"Feature":return ur(qe);case"FeatureCollection":{var yr={type:"FeatureCollection",features:qe.features.map(ur)};return qe.bbox!=null&&(yr.bbox=qe.bbox),yr}default:return Dt(qe)}return qe}function $r(qe){var $e=c(qe);function lt(pt,Et){var bt=$e?T(pt*$e/2)/$e:pt/2;if(!Et)return[2*bt,-qe];var Dt=2*e(bt*c(Et)),ur=1/T(Et);return[c(Dt)*ur,Et+(1-r(Dt))*ur-qe]}return lt.invert=function(pt,Et){if(M(Et+=qe)l&&--ur>0);var ha=pt*(Er=T(Dt)),Aa=T(M(Et)0?A:-A)*(yr+Et*(jr-Dt)/2+Et*Et*(jr-2*yr+Dt)/2)]}Ci.invert=function(qe,$e){var lt=$e/A,pt=lt*90,Et=s(18,M(pt/5)),bt=n(0,a(Et));do{var Dt=li[bt][1],ur=li[bt+1][1],yr=li[s(19,bt+2)][1],Er=yr-Dt,jr=yr-2*ur+Dt,Qr=2*(M(lt)-ur)/Er,ha=jr/Er,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,M(pt)/5),bt=a(Et),Aa=Et-bt,Dt=li[bt][1],ur=li[bt+1][1],yr=li[s(19,bt+2)][1],pt-=(ci=($e>=0?A:-A)*(ur+Aa*(yr-Dt)/2+Aa*Aa*(yr-2*ur+Dt)/2)-$e)*g;while(M(ci)>x&&--Da>0);break}}while(--bt>=0);var Vi=li[bt][0],ji=li[bt+1][0],on=li[s(19,bt+2)][0];return[qe/(ji+Aa*(on-Vi)/2+Aa*Aa*(on-2*ji+Vi)/2),pt*y]};function Hi(){return _.geoProjection(Ci).scale(152.63)}function Qi(qe){function $e(lt,pt){var Et=r(pt),bt=(qe-1)/(qe-Et*r(lt));return[bt*Et*c(lt),bt*c(pt)]}return $e.invert=function(lt,pt){var Et=lt*lt+pt*pt,bt=F(Et),Dt=(qe-F(1-Et*(qe+1)/(qe-1)))/((qe-1)/bt+bt/(qe-1));return[t(lt*Dt,bt*F(1-Dt*Dt)),bt?P(pt*Dt/bt):0]},$e}function pn(qe,$e){var lt=Qi(qe);if(!$e)return lt;var pt=r($e),Et=c($e);function bt(Dt,ur){var yr=lt(Dt,ur),Er=yr[1],jr=Er*Et/(qe-1)+pt;return[yr[0]*pt/jr,Er/jr]}return bt.invert=function(Dt,ur){var yr=(qe-1)/(qe-1-ur*Et);return lt.invert(yr*Dt,yr*ur*pt)},bt}function Pi(){var qe=2,$e=0,lt=_.geoProjectionMutator(pn),pt=lt(qe,$e);return pt.distance=function(Et){return arguments.length?lt(qe=+Et,$e):qe},pt.tilt=function(Et){return arguments.length?lt(qe,$e=Et*y):$e*g},pt.scale(432.147).clipAngle(z(1/qe)*g-1e-6)}var Di=1e-4,Ni=1e4,mi=-180,Mn=mi+Di,Qn=180,io=Qn-Di,eo=-90,co=eo+Di,An=90,un=An-Di;function yo(qe){return qe.length>0}function Qo(qe){return Math.floor(qe*Ni)/Ni}function ks(qe){return qe===eo||qe===An?[0,qe]:[mi,Qo(qe)]}function rl(qe){var $e=qe[0],lt=qe[1],pt=!1;return $e<=Mn?($e=mi,pt=!0):$e>=io&&($e=Qn,pt=!0),lt<=co?(lt=eo,pt=!0):lt>=un&&(lt=An,pt=!0),pt?[$e,lt]:qe}function Ns(qe){return qe.map(rl)}function el(qe,$e,lt){for(var pt=0,Et=qe.length;pt=io||jr<=co||jr>=un){bt[Dt]=rl(yr);for(var Qr=Dt+1;QrMn&&Aaco&&Da=ur)break;lt.push({index:-1,polygon:$e,ring:bt=bt.slice(Qr-1)}),bt[0]=ks(bt[0][1]),Dt=-1,ur=bt.length}}}}function Ss(qe){var $e,lt=qe.length,pt={},Et={},bt,Dt,ur,yr,Er;for($e=0;$e0?w-ur:ur)*g],Er=_.geoProjection(qe(Dt)).rotate(yr),jr=_.geoRotation(yr),Qr=Er.center;return delete Er.rotate,Er.center=function(ha){return arguments.length?Qr(jr(ha)):jr.invert(Qr())},Er.clipAngle(90)}function Fs(qe){var $e=r(qe);function lt(pt,Et){var bt=_.geoGnomonicRaw(pt,Et);return bt[0]*=$e,bt}return lt.invert=function(pt,Et){return _.geoGnomonicRaw.invert(pt/$e,Et)},lt}function cu(){return Iu([-158,21.5],[-77,39]).clipAngle(60).scale(400)}function Iu(qe,$e){return Js(Fs,qe,$e)}function Zu(qe){if(!(qe*=2))return _.geoAzimuthalEquidistantRaw;var $e=-qe/2,lt=-$e,pt=qe*qe,Et=T(lt),bt=.5/c(lt);function Dt(ur,yr){var Er=z(r(yr)*r(ur-$e)),jr=z(r(yr)*r(ur-lt)),Qr=yr<0?-1:1;return Er*=Er,jr*=jr,[(Er-jr)/(2*qe),Qr*F(4*pt*jr-(pt-Er+jr)*(pt-Er+jr))/(2*qe)]}return Dt.invert=function(ur,yr){var Er=yr*yr,jr=r(F(Er+(ha=ur+$e)*ha)),Qr=r(F(Er+(ha=ur+lt)*ha)),ha,Aa;return[t(Aa=jr-Qr,ha=(jr+Qr)*Et),(yr<0?-1:1)*z(F(ha*ha+Aa*Aa)*bt)]},Dt}function Ic(){return bu([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)}function bu(qe,$e){return Js(Zu,qe,$e)}function Rc(qe,$e){if(M($e)l&&--ur>0);return[m(qe)*(F(Et*Et+4)+Et)*w/4,A*Dt]};function Yu(){return _.geoProjection(lc).scale(127.16)}function Oe(qe,$e,lt,pt,Et){function bt(Dt,ur){var yr=lt*c(pt*ur),Er=F(1-yr*yr),jr=F(2/(1+Er*r(Dt*=Et)));return[qe*Er*jr*c(Dt),$e*yr*jr]}return bt.invert=function(Dt,ur){var yr=Dt/qe,Er=ur/$e,jr=F(yr*yr+Er*Er),Qr=2*P(jr/2);return[t(Dt*T(Qr),qe*jr)/Et,jr&&P(ur*c(Qr)/($e*lt*jr))/pt]},bt}function I(qe,$e,lt,pt){var Et=w/3;qe=n(qe,l),$e=n($e,l),qe=s(qe,A),$e=s($e,w-l),lt=n(lt,0),lt=s(lt,100-l),pt=n(pt,l);var bt=lt/100+1,Dt=pt/100,ur=z(bt*r(Et))/Et,yr=c(qe)/c(ur*A),Er=$e/w,jr=F(Dt*c(qe/2)/c($e/2)),Qr=jr/F(Er*yr*ur),ha=1/(jr*F(Er*yr*ur));return Oe(Qr,ha,yr,ur,Er)}function ie(){var qe=65*y,$e=60*y,lt=20,pt=200,Et=_.geoProjectionMutator(I),bt=Et(qe,$e,lt,pt);return bt.poleline=function(Dt){return arguments.length?Et(qe=+Dt*y,$e,lt,pt):qe*g},bt.parallels=function(Dt){return arguments.length?Et(qe,$e=+Dt*y,lt,pt):$e*g},bt.inflation=function(Dt){return arguments.length?Et(qe,$e,lt=+Dt,pt):lt},bt.ratio=function(Dt){return arguments.length?Et(qe,$e,lt,pt=+Dt):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 _.geoProjection(ht).scale(176.84)}function Ot(qe,$e){return[qe*F(1-3*$e*$e/(w*w)),$e]}Ot.invert=function(qe,$e){return[qe/F(1-3*$e*$e/(w*w)),$e]};function $t(){return _.geoProjection(Ot).scale(152.63)}function Tr(qe,$e){var lt=r($e),pt=r(qe)*lt,Et=1-pt,bt=r(qe=t(c(qe)*lt,-c($e))),Dt=c(qe);return lt=F(1-pt*pt),[Dt*lt-bt*Et,-bt*lt-Dt*Et]}Tr.invert=function(qe,$e){var lt=(qe*qe+$e*$e)/-2,pt=F(-lt*(2+lt)),Et=$e*lt+qe*pt,bt=qe*lt-$e*pt,Dt=F(bt*bt+Et*Et);return[t(pt*Et,Dt*(1+lt)),Dt?-P(pt*bt/Dt):0]};function Sr(){return _.geoProjection(Tr).rotate([0,-90,45]).scale(124.75).clipAngle(180-.001)}function Kr(qe,$e){var lt=ue(qe,$e);return[(lt[0]+qe/A)/2,(lt[1]+$e)/2]}Kr.invert=function(qe,$e){var lt=qe,pt=$e,Et=25;do{var bt=r(pt),Dt=c(pt),ur=c(2*pt),yr=Dt*Dt,Er=bt*bt,jr=c(lt),Qr=r(lt/2),ha=c(lt/2),Aa=ha*ha,Da=1-Er*Qr*Qr,ci=Da?z(bt*Qr)*F(Vi=1/Da):Vi=0,Vi,ji=.5*(2*ci*bt*ha+lt/A)-qe,on=.5*(ci*Dt+pt)-$e,Sn=.5*Vi*(Er*Aa+ci*bt*Qr*yr)+.5/A,Kn=Vi*(jr*ur/4-ci*Dt*ha),Bn=.125*Vi*(ur*ha-ci*Dt*Er*jr),Ao=.5*Vi*(yr*Qr+ci*Aa*bt)+.5,ls=Kn*Bn-Ao*Sn,Mo=(on*Kn-ji*Ao)/ls,Yo=(ji*Bn-on*Sn)/ls;lt-=Mo,pt-=Yo}while((M(Mo)>l||M(Yo)>l)&&--Et>0);return[lt,pt]};function na(){return _.geoProjection(Kr).scale(158.837)}v.geoNaturalEarth=_.geoNaturalEarth1,v.geoNaturalEarthRaw=_.geoNaturalEarth1Raw,v.geoAiry=$,v.geoAiryRaw=W,v.geoAitoff=ce,v.geoAitoffRaw=ue,v.geoArmadillo=Y,v.geoArmadilloRaw=de,v.geoAugust=Q,v.geoAugustRaw=X,v.geoBaker=j,v.geoBakerRaw=ae,v.geoBerghaus=te,v.geoBerghausRaw=ee,v.geoBertin1953=at,v.geoBertin1953Raw=je,v.geoBoggs=Ze,v.geoBoggsRaw=Ce,v.geoBonne=Bt,v.geoBonneRaw=kt,v.geoBottomley=Ar,v.geoBottomleyRaw=Vt,v.geoBromley=qr,v.geoBromleyRaw=vr,v.geoChamberlin=Le,v.geoChamberlinRaw=Fe,v.geoChamberlinAfrica=Ae,v.geoCollignon=Ke,v.geoCollignonRaw=We,v.geoCraig=ot,v.geoCraigRaw=st,v.geoCraster=Pt,v.geoCrasterRaw=Ct,v.geoCylindricalEqualArea=cr,v.geoCylindricalEqualAreaRaw=jt,v.geoCylindricalStereographic=nr,v.geoCylindricalStereographicRaw=or,v.geoEckert1=_a,v.geoEckert1Raw=Pr,v.geoEckert2=Ra,v.geoEckert2Raw=Fa,v.geoEckert3=Wa,v.geoEckert3Raw=qa,v.geoEckert4=hi,v.geoEckert4Raw=Ca,v.geoEckert5=Yt,v.geoEckert5Raw=wi,v.geoEckert6=Zt,v.geoEckert6Raw=Rt,v.geoEisenlohr=ta,v.geoEisenlohrRaw=Fr,v.geoFahey=Ba,v.geoFaheyRaw=ca,v.geoFoucaut=Za,v.geoFoucautRaw=$a,v.geoFoucautSinusoidal=pi,v.geoFoucautSinusoidalRaw=ri,v.geoGilbert=tn,v.geoGingery=Or,v.geoGingeryRaw=cn,v.geoGinzburg4=Rr,v.geoGinzburg4Raw=wr,v.geoGinzburg5=Hr,v.geoGinzburg5Raw=Nr,v.geoGinzburg6=Kt,v.geoGinzburg6Raw=gt,v.geoGinzburg8=Ir,v.geoGinzburg8Raw=mr,v.geoGinzburg9=Pa,v.geoGinzburg9Raw=va,v.geoGringorten=ki,v.geoGringortenRaw=la,v.geoGuyou=bo,v.geoGuyouRaw=kn,v.geoHammer=Se,v.geoHammerRaw=pe,v.geoHammerRetroazimuthal=wo,v.geoHammerRetroazimuthalRaw=zs,v.geoHealpix=ss,v.geoHealpixRaw=ys,v.geoHill=ps,v.geoHillRaw=_s,v.geoHomolosine=lo,v.geoHomolosineRaw=bs,v.geoHufnagel=ws,v.geoHufnagelRaw=Zo,v.geoHyperelliptical=Po,v.geoHyperellipticalRaw=yn,v.geoInterrupt=uo,v.geoInterruptedBoggs=Ks,v.geoInterruptedHomolosine=Ls,v.geoInterruptedMollweide=Es,v.geoInterruptedMollweideHemispheres=lu,v.geoInterruptedSinuMollweide=du,v.geoInterruptedSinusoidal=Uc,v.geoKavrayskiy7=dc,v.geoKavrayskiy7Raw=Bs,v.geoLagrange=uu,v.geoLagrangeRaw=Wc,v.geoLarrivee=Ou,v.geoLarriveeRaw=ic,v.geoLaskowski=vl,v.geoLaskowskiRaw=nl,v.geoLittrow=Xs,v.geoLittrowRaw=As,v.geoLoximuthal=jl,v.geoLoximuthalRaw=nc,v.geoMiller=fl,v.geoMillerRaw=qu,v.geoModifiedStereographic=Ql,v.geoModifiedStereographicRaw=xh,v.geoModifiedStereographicAlaska=Vu,v.geoModifiedStereographicGs48=ql,v.geoModifiedStereographicGs50=Mf,v.geoModifiedStereographicMiller=Ac,v.geoModifiedStereographicLee=nf,v.geoMollweide=he,v.geoMollweideRaw=Ve,v.geoMtFlatPolarParabolic=jc,v.geoMtFlatPolarParabolicRaw=of,v.geoMtFlatPolarQuartic=Nf,v.geoMtFlatPolarQuarticRaw=Bf,v.geoMtFlatPolarSinusoidal=Ef,v.geoMtFlatPolarSinusoidalRaw=Gu,v.geoNaturalEarth2=Zc,v.geoNaturalEarth2Raw=oc,v.geoNellHammer=qc,v.geoNellHammerRaw=eu,v.geoInterruptedQuarticAuthalic=Zs,v.geoNicolosi=fh,v.geoNicolosiRaw=kf,v.geoPatterson=yu,v.geoPattersonRaw=vc,v.geoPolyconic=Ml,v.geoPolyconicRaw=Tu,v.geoPolyhedral=sf,v.geoPolyhedralButterfly=sl,v.geoPolyhedralCollignon=Cf,v.geoPolyhedralWaterman=hl,v.geoProject=nu,v.geoGringortenQuincuncial=Qt,v.geoPeirceQuincuncial=xr,v.geoPierceQuincuncial=xr,v.geoQuantize=aa,v.geoQuincuncial=Pc,v.geoRectangularPolyconic=ka,v.geoRectangularPolyconicRaw=$r,v.geoRobinson=Hi,v.geoRobinsonRaw=Ci,v.geoSatellite=Pi,v.geoSatelliteRaw=pn,v.geoSinuMollweide=qs,v.geoSinuMollweideRaw=Pn,v.geoSinusoidal=St,v.geoSinusoidalRaw=Je,v.geoStitch=ll,v.geoTimes=Ro,v.geoTimesRaw=Un,v.geoTwoPointAzimuthal=Iu,v.geoTwoPointAzimuthalRaw=Fs,v.geoTwoPointAzimuthalUsa=cu,v.geoTwoPointEquidistant=bu,v.geoTwoPointEquidistantRaw=Zu,v.geoTwoPointEquidistantUsa=Ic,v.geoVanDerGrinten=Au,v.geoVanDerGrintenRaw=Rc,v.geoVanDerGrinten2=fo,v.geoVanDerGrinten2Raw=yc,v.geoVanDerGrinten3=Dc,v.geoVanDerGrinten3Raw=Fo,v.geoVanDerGrinten4=Yu,v.geoVanDerGrinten4Raw=lc,v.geoWagner=ie,v.geoWagner7=Te,v.geoWagnerRaw=I,v.geoWagner4=wt,v.geoWagner4Raw=ht,v.geoWagner6=$t,v.geoWagner6Raw=Ot,v.geoWiechel=Sr,v.geoWiechelRaw=Tr,v.geoWinkel3=na,v.geoWinkel3Raw=Kr,Object.defineProperty(v,"__esModule",{value:!0})})}}),VU=He({"src/plots/geo/zoom.js"(Z,q){"use strict";var v=Vn(),_=sa(),S=so(),M=Math.PI/180,e=180/Math.PI,t={cursor:"pointer"},r={cursor:"auto"};function o(g,y){var D=g.projection,P;return y._isScoped?P=n:y._isClipped?P=h:P=s,P(g,D)}q.exports=o;function a(g,y){return v.behavior.zoom().translate(y.translate()).scale(y.scale())}function i(g,y,D){var P=g.id,z=g.graphDiv,F=z.layout,N=F[P],O=z._fullLayout,L=O[P],U={},B={};function W($,ue){U[P+"."+$]=_.nestedProperty(N,$).get(),S.call("_storeDirectGUIEdit",F,O._preGUI,U);var ce=_.nestedProperty(L,$);ce.get()!==ue&&(ce.set(ue),_.nestedProperty(N,$).set(ue),B[P+"."+$]=ue)}D(W),W("projection.scale",y.scale()/g.fitScale),W("fitbounds",!1),z.emit("plotly_relayout",B)}function n(g,y){var D=a(g,y);function P(){v.select(this).style(t)}function z(){y.scale(v.event.scale).translate(v.event.translate),g.render(!0);var O=y.invert(g.midPt);g.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":y.scale()/g.fitScale,"geo.center.lon":O[0],"geo.center.lat":O[1]})}function F(O){var L=y.invert(g.midPt);O("center.lon",L[0]),O("center.lat",L[1])}function N(){v.select(this).style(r),i(g,y,F)}return D.on("zoomstart",P).on("zoom",z).on("zoomend",N),D}function s(g,y){var D=a(g,y),P=2,z,F,N,O,L,U,B,W,$;function ue(V){return y.invert(V)}function ce(V){var le=ue(V);if(!le)return!0;var ae=y(le);return Math.abs(ae[0]-V[0])>P||Math.abs(ae[1]-V[1])>P}function de(){v.select(this).style(t),z=v.mouse(this),F=y.rotate(),N=y.translate(),O=F,L=ue(z)}function Y(){if(U=v.mouse(this),ce(z)){D.scale(y.scale()),D.translate(y.translate());return}y.scale(v.event.scale),y.translate([N[0],v.event.translate[1]]),L?ue(U)&&(W=ue(U),B=[O[0]+(W[0]-L[0]),F[1],F[2]],y.rotate(B),O=B):(z=U,L=ue(z)),$=!0,g.render(!0);var V=y.rotate(),le=y.invert(g.midPt);g.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":y.scale()/g.fitScale,"geo.center.lon":le[0],"geo.center.lat":le[1],"geo.projection.rotation.lon":-V[0]})}function X(){v.select(this).style(r),$&&i(g,y,Q)}function Q(V){var le=y.rotate(),ae=y.invert(g.midPt);V("projection.rotation.lon",-le[0]),V("center.lon",ae[0]),V("center.lat",ae[1])}return D.on("zoomstart",de).on("zoom",Y).on("zoomend",X),D}function h(g,y){var D={r:y.rotate(),k:y.scale()},P=a(g,y),z=u(P,"zoomstart","zoom","zoomend"),F=0,N=P.on,O;P.on("zoomstart",function(){v.select(this).style(t);var $=v.mouse(this),ue=y.rotate(),ce=ue,de=y.translate(),Y=m(ue);O=f(y,$),N.call(P,"zoom",function(){var X=v.mouse(this);if(y.scale(D.k=v.event.scale),!O)$=X,O=f(y,$);else if(f(y,X)){y.rotate(ue).translate(de);var Q=f(y,X),V=T(O,Q),le=E(c(Y,V)),ae=D.r=l(le,O,ce);(!isFinite(ae[0])||!isFinite(ae[1])||!isFinite(ae[2]))&&(ae=ce),y.rotate(ae),ce=ae}U(z.of(this,arguments))}),L(z.of(this,arguments))}).on("zoomend",function(){v.select(this).style(r),N.call(P,"zoom",null),B(z.of(this,arguments)),i(g,y,W)}).on("zoom.redraw",function(){g.render(!0);var $=y.rotate();g.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":y.scale()/g.fitScale,"geo.projection.rotation.lon":-$[0],"geo.projection.rotation.lat":-$[1]})});function L($){F++||$({type:"zoomstart"})}function U($){$({type:"zoom"})}function B($){--F||$({type:"zoomend"})}function W($){var ue=y.rotate();$("projection.rotation.lon",-ue[0]),$("projection.rotation.lat",-ue[1])}return v.rebind(P,z,"on")}function f(g,y){var D=g.invert(y);return D&&isFinite(D[0])&&isFinite(D[1])&&p(D)}function m(g){var y=.5*g[0]*M,D=.5*g[1]*M,P=.5*g[2]*M,z=Math.sin(y),F=Math.cos(y),N=Math.sin(D),O=Math.cos(D),L=Math.sin(P),U=Math.cos(P);return[F*O*U+z*N*L,z*O*U-F*N*L,F*N*U+z*O*L,F*O*L-z*N*U]}function c(g,y){var D=g[0],P=g[1],z=g[2],F=g[3],N=y[0],O=y[1],L=y[2],U=y[3];return[D*N-P*O-z*L-F*U,D*O+P*N+z*U-F*L,D*L-P*U+z*N+F*O,D*U+P*L-z*O+F*N]}function T(g,y){if(!(!g||!y)){var D=d(g,y),P=Math.sqrt(b(D,D)),z=.5*Math.acos(Math.max(-1,Math.min(1,b(g,y)))),F=Math.sin(z)/P;return P&&[Math.cos(z),D[2]*F,-D[1]*F,D[0]*F]}}function l(g,y,D){var P=A(y,2,g[0]);P=A(P,1,g[1]),P=A(P,0,g[2]-D[2]);var z=y[0],F=y[1],N=y[2],O=P[0],L=P[1],U=P[2],B=Math.atan2(F,z)*e,W=Math.sqrt(z*z+F*F),$,ue;Math.abs(L)>W?(ue=(L>0?90:-90)-B,$=0):(ue=Math.asin(L/W)*e-B,$=Math.sqrt(W*W-L*L));var ce=180-ue-2*B,de=(Math.atan2(U,O)-Math.atan2(N,$))*e,Y=(Math.atan2(U,O)-Math.atan2(N,-$))*e,X=x(D[0],D[1],ue,de),Q=x(D[0],D[1],ce,Y);return X<=Q?[ue,de,D[2]]:[ce,Y,D[2]]}function x(g,y,D,P){var z=w(D-g),F=w(P-y);return Math.sqrt(z*z+F*F)}function w(g){return(g%360+540)%360-180}function A(g,y,D){var P=D*M,z=g.slice(),F=y===0?1:0,N=y===2?1:2,O=Math.cos(P),L=Math.sin(P);return z[F]=g[F]*O-g[N]*L,z[N]=g[N]*O+g[F]*L,z}function E(g){return[Math.atan2(2*(g[0]*g[1]+g[2]*g[3]),1-2*(g[1]*g[1]+g[2]*g[2]))*e,Math.asin(Math.max(-1,Math.min(1,2*(g[0]*g[2]-g[3]*g[1]))))*e,Math.atan2(2*(g[0]*g[3]+g[1]*g[2]),1-2*(g[2]*g[2]+g[3]*g[3]))*e]}function p(g){var y=g[0]*M,D=g[1]*M,P=Math.cos(D);return[P*Math.cos(y),P*Math.sin(y),Math.sin(D)]}function b(g,y){for(var D=0,P=0,z=g.length;P0&&B._module.calcGeoJSON(U,F)}if(!N){var W=this.updateProjection(z,F);if(W)return;(!this.viewInitial||this.scope!==O.scope)&&this.saveViewInitial(O)}this.scope=O.scope,this.updateBaseLayers(F,O),this.updateDims(F,O),this.updateFx(F,O),s.generalUpdatePerTraceModule(this.graphDiv,this,z,O);var $=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=$.selectAll(".point"),this.dataPoints.text=$.selectAll("text"),this.dataPaths.line=$.selectAll(".js-line");var ue=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=ue.selectAll("path"),this._render()},g.updateProjection=function(z,F){var N,O=this.graphDiv,L=F[this.id],U=F._size,B=L.domain,W=L.projection,$=L.lonaxis,ue=L.lataxis,ce=$._ax,de=ue._ax,Y=this.projection=y(L),X=[[U.l+U.w*B.x[0],U.t+U.h*(1-B.y[1])],[U.l+U.w*B.x[1],U.t+U.h*(1-B.y[0])]],Q=L.center||{},V=W.rotation||{},le=$.range||[],ae=ue.range||[];if(L.fitbounds){if(ce._length=X[1][0]-X[0][0],de._length=X[1][1]-X[0][1],ce.range=f(O,ce),de.range=f(O,de),!this.hasChoropleth&&L.fitbounds==="locations"){for(var j=[],ee=!1,te=0;te0?(ce.range[1]-ce.range[0]-je)/2*(Pe[1]-Pe[0])/je:0;ce.range=[Pe[0]-at,Pe[1]+at]}}}var nt=(ce.range[0]+ce.range[1])/2,tt=(de.range[0]+de.range[1])/2;if(L._isScoped)Q={lon:nt,lat:tt};else if(L._isClipped){Q={lon:nt,lat:tt},V={lon:nt,lat:tt,roll:V.roll};var Ve=W.type,he=w.lonaxisSpan[Ve]/2||180,se=w.lataxisSpan[Ve]/2||90;le=[nt-he,nt+he],ae=[tt-se,tt+se]}else Q={lon:nt,lat:tt},V={lon:nt,lat:V.lat,roll:V.roll}}Y.center([Q.lon-V.lon,Q.lat-V.lat]).rotate([-V.lon,-V.lat,V.roll]).parallels(W.parallels);var ne=P(le,ae);Y.fitExtent(X,ne);var Ce=this.bounds=Y.getBounds(ne),Ze=this.fitScale=Y.scale(),rt=Y.translate();if(L.fitbounds){var Je=Y.getBounds(P(ce.range,de.range)),St=Math.min((Ce[1][0]-Ce[0][0])/(Je[1][0]-Je[0][0]),(Ce[1][1]-Ce[0][1])/(Je[1][1]-Je[0][1]));isFinite(St)?Y.scale(St*Ze):r.warn("Something went wrong during"+this.id+"fitbounds computations.")}else Y.scale(W.scale*Ze);var kt=this.midPt=[(Ce[0][0]+Ce[1][0])/2,(Ce[0][1]+Ce[1][1])/2];if(Y.translate([rt[0]+(kt[0]-rt[0]),rt[1]+(kt[1]-rt[1])]).clipExtent(Ce),L._isAlbersUsa){var Bt=Y([Q.lon,Q.lat]),Vt=Y.translate();Y.translate([Vt[0]-(Bt[0]-Vt[0]),Vt[1]-(Bt[1]-Vt[1])])}},g.updateBaseLayers=function(z,F){var N=this,O=N.topojson,L=N.layers,U=N.basePaths;function B(Y){return Y==="lonaxis"||Y==="lataxis"}function W(Y){return!!w.lineLayers[Y]}function $(Y){return!!w.fillLayers[Y]}var ue=this.hasChoropleth?w.layersForChoropleth:w.layers,ce=ue.filter(function(Y){return W(Y)||$(Y)?F["show"+Y]:B(Y)?F[Y].showgrid:!0}),de=N.framework.selectAll(".layer").data(ce,String);de.exit().each(function(Y){delete L[Y],delete U[Y],v.select(this).remove()}),de.enter().append("g").attr("class",function(Y){return"layer "+Y}).each(function(Y){var X=L[Y]=v.select(this);Y==="bg"?N.bgRect=X.append("rect").style("pointer-events","all"):B(Y)?U[Y]=X.append("path").style("fill","none"):Y==="backplot"?X.append("g").classed("choroplethlayer",!0):Y==="frontplot"?X.append("g").classed("scatterlayer",!0):W(Y)?U[Y]=X.append("path").style("fill","none").style("stroke-miterlimit",2):$(Y)&&(U[Y]=X.append("path").style("stroke","none"))}),de.order(),de.each(function(Y){var X=U[Y],Q=w.layerNameToAdjective[Y];Y==="frame"?X.datum(w.sphereSVG):W(Y)||$(Y)?X.datum(d(O,O.objects[Y])):B(Y)&&X.datum(D(Y,F,z)).call(a.stroke,F[Y].gridcolor).call(i.dashLine,F[Y].griddash,F[Y].gridwidth),W(Y)?X.call(a.stroke,F[Q+"color"]).call(i.dashLine,"",F[Q+"width"]):$(Y)&&X.call(a.fill,F[Q+"color"])})},g.updateDims=function(z,F){var N=this.bounds,O=(F.framewidth||0)/2,L=N[0][0]-O,U=N[0][1]-O,B=N[1][0]-L+O,W=N[1][1]-U+O;i.setRect(this.clipRect,L,U,B,W),this.bgRect.call(i.setRect,L,U,B,W).call(a.fill,F.bgcolor),this.xaxis._offset=L,this.xaxis._length=B,this.yaxis._offset=U,this.yaxis._length=W},g.updateFx=function(z,F){var N=this,O=N.graphDiv,L=N.bgRect,U=z.dragmode,B=z.clickmode;if(N.isStatic)return;function W(){var de=N.viewInitial,Y={};for(var X in de)Y[N.id+"."+X]=de[X];t.call("_guiRelayout",O,Y),O.emit("plotly_doubleclick",null)}function $(de){return N.projection.invert([de[0]+N.xaxis._offset,de[1]+N.yaxis._offset])}var ue=function(de,Y){if(Y.isRect){var X=de.range={};X[N.id]=[$([Y.xmin,Y.ymin]),$([Y.xmax,Y.ymax])]}else{var Q=de.lassoPoints={};Q[N.id]=Y.map($)}},ce={element:N.bgRect.node(),gd:O,plotinfo:{id:N.id,xaxis:N.xaxis,yaxis:N.yaxis,fillRangeItems:ue},xaxes:[N.xaxis],yaxes:[N.yaxis],subplot:N.id,clickFn:function(de){de===2&&T(O)}};U==="pan"?(L.node().onmousedown=null,L.call(x(N,F)),L.on("dblclick.zoom",W),O._context._scrollZoom.geo||L.on("wheel.zoom",null)):(U==="select"||U==="lasso")&&(L.on(".zoom",null),ce.prepFn=function(de,Y,X){c(de,Y,X,ce,U)},m.init(ce)),L.on("mousemove",function(){var de=N.projection.invert(r.getPositionFromD3Event());if(!de)return m.unhover(O,v.event);N.xaxis.p2c=function(){return de[0]},N.yaxis.p2c=function(){return de[1]},n.hover(O,v.event,N.id)}),L.on("mouseout",function(){O._dragging||m.unhover(O,v.event)}),L.on("click",function(){U!=="select"&&U!=="lasso"&&(B.indexOf("select")>-1&&l(v.event,O,[N.xaxis],[N.yaxis],N.id,ce),B.indexOf("event")>-1&&n.click(O,v.event))})},g.makeFramework=function(){var z=this,F=z.graphDiv,N=F._fullLayout,O="clip"+N._uid+z.id;z.clipDef=N._clips.append("clipPath").attr("id",O),z.clipRect=z.clipDef.append("rect"),z.framework=v.select(z.container).append("g").attr("class","geo "+z.id).call(i.setClipUrl,O,F),z.project=function(L){var U=z.projection(L);return U?[U[0]-z.xaxis._offset,U[1]-z.yaxis._offset]:[null,null]},z.xaxis={_id:"x",c2p:function(L){return z.project(L)[0]}},z.yaxis={_id:"y",c2p:function(L){return z.project(L)[1]}},z.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},h.setConvert(z.mockAxis,N)},g.saveViewInitial=function(z){var F=z.center||{},N=z.projection,O=N.rotation||{};this.viewInitial={fitbounds:z.fitbounds,"projection.scale":N.scale};var L;z._isScoped?L={"center.lon":F.lon,"center.lat":F.lat}:z._isClipped?L={"projection.rotation.lon":O.lon,"projection.rotation.lat":O.lat}:L={"center.lon":F.lon,"center.lat":F.lat,"projection.rotation.lon":O.lon},r.extendFlat(this.viewInitial,L)},g.render=function(z){this._hasMarkerAngles&&z?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()},g._render=function(){var z=this.projection,F=z.getPath(),N;function O(U){var B=z(U.lonlat);return B?o(B[0],B[1]):null}function L(U){return z.isLonLatOverEdges(U.lonlat)?"none":null}for(N in this.basePaths)this.basePaths[N].attr("d",F);for(N in this.dataPaths)this.dataPaths[N].attr("d",function(U){return F(U.geojson)});for(N in this.dataPoints)this.dataPoints[N].attr("display",L).attr("transform",O)};function y(z){var F=z.projection,N=F.type,O=w.projNames[N];O="geo"+r.titleCase(O);for(var L=_[O]||e[O],U=L(),B=z._isSatellite?Math.acos(1/F.distance)*180/Math.PI:z._isClipped?w.lonaxisSpan[N]/2:null,W=["center","rotate","parallels","clipExtent"],$=function(de){return de?U:[]},ue=0;ueQ}else return!1},U.getPath=function(){return S().projection(U)},U.getBounds=function(de){return U.getPath().bounds(de)},U.precision(w.precision),z._isSatellite&&U.tilt(F.tilt).distance(F.distance),B&&U.clipAngle(B-w.clipPad),U}function D(z,F,N){var O=1e-6,L=2.5,U=F[z],B=w.scopeDefaults[F.scope],W,$,ue;z==="lonaxis"?(W=B.lonaxisRange,$=B.lataxisRange,ue=function(j,ee){return[j,ee]}):z==="lataxis"&&(W=B.lataxisRange,$=B.lonaxisRange,ue=function(j,ee){return[ee,j]});var ce={type:"linear",range:[W[0],W[1]-O],tick0:U.tick0,dtick:U.dtick};h.setConvert(ce,N);var de=h.calcTicks(ce);!F.isScoped&&z==="lonaxis"&&de.pop();for(var Y=de.length,X=new Array(Y),Q=0;Q")}}}}),fT=He({"src/traces/choropleth/event_data.js"(Z,q){"use strict";q.exports=function(_,S,M,e,t){_.location=S.location,_.z=S.z;var r=e[t];return r.fIn&&r.fIn.properties&&(_.properties=r.fIn.properties),_.ct=r.ct,_}}}),hT=He({"src/traces/choropleth/select.js"(Z,q){"use strict";q.exports=function(_,S){var M=_.cd,e=_.xaxis,t=_.yaxis,r=[],o,a,i,n,s;if(S===!1)for(o=0;o=Math.min(B,W)&&T<=Math.max(B,W)?0:1/0}if(P=Math.min($,ue)&&l<=Math.max($,ue)?0:1/0}N=Math.sqrt(P*P+z*z),u=w[D]}}}else for(D=w.length-1;D>-1;D--)d=w[D],g=m[d],y=c[d],P=h.c2p(g)-T,z=f.c2p(y)-l,F=Math.sqrt(P*P+z*z),F100},Z.isDotSymbol=function(v){return typeof v=="string"?q.DOT_RE.test(v):v>200}}}),JU=He({"src/traces/scattergl/defaults.js"(Z,q){"use strict";var v=sa(),_=so(),S=dT(),M=xx(),e=Tv(),t=Fu(),r=n1(),o=Qd(),a=md(),i=Dd(),n=ev(),s=zd();q.exports=function(f,m,c,T){function l(u,g){return v.coerce(f,m,M,u,g)}var x=f.marker?S.isOpenSymbol(f.marker.symbol):!1,w=t.isBubble(f),A=r(f,m,T,l);if(!A){m.visible=!1;return}o(f,m,T,l),l("xhoverformat"),l("yhoverformat");var E=A>>1,f=r[h],m=a!==void 0?a(f,o):f-o;m>=0?(s=h,n=h-1):i=h+1}return s}function _(r,o,a,i,n){for(var s=n+1;i<=n;){var h=i+n>>>1,f=r[h],m=a!==void 0?a(f,o):f-o;m>0?(s=h,n=h-1):i=h+1}return s}function S(r,o,a,i,n){for(var s=i-1;i<=n;){var h=i+n>>>1,f=r[h],m=a!==void 0?a(f,o):f-o;m<0?(s=h,i=h+1):n=h-1}return s}function M(r,o,a,i,n){for(var s=i-1;i<=n;){var h=i+n>>>1,f=r[h],m=a!==void 0?a(f,o):f-o;m<=0?(s=h,i=h+1):n=h-1}return s}function e(r,o,a,i,n){for(;i<=n;){var s=i+n>>>1,h=r[s],f=a!==void 0?a(h,o):h-o;if(f===0)return s;f<=0?i=s+1:n=s-1}return-1}function t(r,o,a,i,n,s){return typeof a=="function"?s(r,o,a,i===void 0?0:i|0,n===void 0?r.length-1:n|0):s(r,o,void 0,a===void 0?0:a|0,i===void 0?r.length-1:i|0)}q.exports={ge:function(r,o,a,i,n){return t(r,o,a,i,n,v)},gt:function(r,o,a,i,n){return t(r,o,a,i,n,_)},lt:function(r,o,a,i,n){return t(r,o,a,i,n,S)},le:function(r,o,a,i,n){return t(r,o,a,i,n,M)},eq:function(r,o,a,i,n){return t(r,o,a,i,n,e)}}}}),kv=He({"node_modules/pick-by-alias/index.js"(Z,q){"use strict";q.exports=function(M,e,t){var r={},o,a;if(typeof e=="string"&&(e=_(e)),Array.isArray(e)){var i={};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?M={width:S[0],height:S[0],x:0,y:0}:S.length===2?M={width:S[0],height:S[1],x:0,y:0}:M={x:S[0],y:S[1],width:S[2]-S[0]||0,height:S[3]-S[1]||0}:S&&(S=v(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"}),M={x:S.left||0,y:S.top||0},S.width==null?S.right?M.width=S.right-M.x:M.width=0:M.width=S.width,S.height==null?S.bottom?M.height=S.bottom-M.y:M.height=0:M.height=S.height),M}}}),mg=He({"node_modules/array-bounds/index.js"(Z,q){"use strict";q.exports=v;function v(_,S){if(!_||_.length==null)throw Error("Argument should be an array");S==null?S=1:S=Math.floor(S);for(var M=Array(S*2),e=0;et&&(t=_[o]),_[o]>>1,w;m.dtype||(m.dtype="array"),typeof m.dtype=="string"?w=new(a(m.dtype))(x):m.dtype&&(w=m.dtype,Array.isArray(w)&&(w.length=x));for(let P=0;Pc||L>n){for(let le=0;lete||W>pe||$=ce||j===ee)return;let we=A[ae];ee===void 0&&(ee=we.length);for(let he=j;he=N&&ne<=L&&Ce>=O&&Ce<=U&&de.push(se)}let Se=E[ae],Re=Se[j*4+0],Pe=Se[j*4+1],je=Se[j*4+2],at=Se[j*4+3],nt=X(Se,j+1),tt=le*.5,Ve=ae+1;Y(Q,V,tt,Ve,Re,Pe||je||at||nt),Y(Q,V+tt,tt,Ve,Pe,je||at||nt),Y(Q+tt,V,tt,Ve,je,at||nt),Y(Q+tt,V+tt,tt,Ve,at,nt)}function X(Q,V){let le=null,ae=0;for(;le===null;)if(le=Q[V*4+ae],ae++,ae>Q.length)return null;return le}return de}function y(P,z,F,N,O){let L=[];for(let U=0;U1&&(f=1),f<-1&&(f=-1),h*Math.acos(f)},t=function(a,i,n,s,h,f,m,c,T,l,x,w){var A=Math.pow(h,2),E=Math.pow(f,2),p=Math.pow(x,2),b=Math.pow(w,2),d=A*E-A*b-E*p;d<0&&(d=0),d/=A*b+E*p,d=Math.sqrt(d)*(m===c?-1:1);var u=d*h/f*w,g=d*-f/h*x,y=l*u-T*g+(a+n)/2,D=T*u+l*g+(i+s)/2,P=(x-u)/h,z=(w-g)/f,F=(-x-u)/h,N=(-w-g)/f,O=e(1,0,P,z),L=e(P,z,F,N);return c===0&&L>0&&(L-=_),c===1&&L<0&&(L+=_),[y,D,O,L]},r=function(a){var i=a.px,n=a.py,s=a.cx,h=a.cy,f=a.rx,m=a.ry,c=a.xAxisRotation,T=c===void 0?0:c,l=a.largeArcFlag,x=l===void 0?0:l,w=a.sweepFlag,A=w===void 0?0:w,E=[];if(f===0||m===0)return[];var p=Math.sin(T*_/360),b=Math.cos(T*_/360),d=b*(i-s)/2+p*(n-h)/2,u=-p*(i-s)/2+b*(n-h)/2;if(d===0&&u===0)return[];f=Math.abs(f),m=Math.abs(m);var g=Math.pow(d,2)/Math.pow(f,2)+Math.pow(u,2)/Math.pow(m,2);g>1&&(f*=Math.sqrt(g),m*=Math.sqrt(g));var y=t(i,n,s,h,f,m,x,A,p,b,d,u),D=v(y,4),P=D[0],z=D[1],F=D[2],N=D[3],O=Math.abs(N)/(_/4);Math.abs(1-O)<1e-7&&(O=1);var L=Math.max(Math.ceil(O),1);N/=L;for(var U=0;U4?(o=l[l.length-4],a=l[l.length-3]):(o=f,a=m),r.push(l)}return r}function S(e,t,r,o){return["C",e,t,r,o,r,o]}function M(e,t,r,o,a,i){return["C",e/3+2/3*r,t/3+2/3*o,a/3+2/3*r,i/3+2/3*o,a,i]}}}),UE=He({"node_modules/is-svg-path/index.js"(Z,q){"use strict";q.exports=function(_){return typeof _!="string"?!1:(_=_.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(_)&&/[\dz]$/i.test(_)&&_.length>4))}}}),oj=He({"node_modules/svg-path-bounds/index.js"(Z,q){"use strict";var v=M_(),_=NE(),S=nj(),M=UE(),e=K_();q.exports=t;function t(r){if(Array.isArray(r)&&r.length===1&&typeof r[0]=="string"&&(r=r[0]),typeof r=="string"&&(e(M(r),"String is not an SVG path."),r=v(r)),e(Array.isArray(r),"Argument should be a string or an array of path segments."),r=_(r),r=S(r),!r.length)return[0,0,0,0];for(var o=[1/0,1/0,-1/0,-1/0],a=0,i=r.length;ao[2]&&(o[2]=n[s+0]),n[s+1]>o[3]&&(o[3]=n[s+1]);return o}}}),sj=He({"node_modules/normalize-svg-path/index.js"(Z,q){var v=Math.PI,_=o(120);q.exports=S;function S(a){for(var i,n=[],s=0,h=0,f=0,m=0,c=null,T=null,l=0,x=0,w=0,A=a.length;w7&&(n.push(E.splice(0,7)),E.unshift("C"));break;case"S":var b=l,d=x;(i=="C"||i=="S")&&(b+=b-s,d+=d-h),E=["C",b,d,E[1],E[2],E[3],E[4]];break;case"T":i=="Q"||i=="T"?(c=l*2-c,T=x*2-T):(c=l,T=x),E=e(l,x,c,T,E[1],E[2]);break;case"Q":c=E[1],T=E[2],E=e(l,x,E[1],E[2],E[3],E[4]);break;case"L":E=M(l,x,E[1],E[2]);break;case"H":E=M(l,x,E[1],x);break;case"V":E=M(l,x,l,E[1]);break;case"Z":E=M(l,x,f,m);break}i=p,l=E[E.length-2],x=E[E.length-1],E.length>4?(s=E[E.length-4],h=E[E.length-3]):(s=l,h=x),n.push(E)}return n}function M(a,i,n,s){return["C",a,i,n,s,n,s]}function e(a,i,n,s,h,f){return["C",a/3+2/3*n,i/3+2/3*s,h/3+2/3*n,f/3+2/3*s,h,f]}function t(a,i,n,s,h,f,m,c,T,l){if(l)y=l[0],D=l[1],u=l[2],g=l[3];else{var x=r(a,i,-h);a=x.x,i=x.y,x=r(c,T,-h),c=x.x,T=x.y;var w=(a-c)/2,A=(i-T)/2,E=w*w/(n*n)+A*A/(s*s);E>1&&(E=Math.sqrt(E),n=E*n,s=E*s);var p=n*n,b=s*s,d=(f==m?-1:1)*Math.sqrt(Math.abs((p*b-p*A*A-b*w*w)/(p*A*A+b*w*w)));d==1/0&&(d=1);var u=d*n*A/s+(a+c)/2,g=d*-s*w/n+(i+T)/2,y=Math.asin(((i-g)/s).toFixed(9)),D=Math.asin(((T-g)/s).toFixed(9));y=aD&&(y=y-v*2),!m&&D>y&&(D=D-v*2)}if(Math.abs(D-y)>_){var P=D,z=c,F=T;D=y+_*(m&&D>y?1:-1),c=u+n*Math.cos(D),T=g+s*Math.sin(D);var N=t(c,T,n,s,h,0,m,z,F,[D,P,u,g])}var O=Math.tan((D-y)/4),L=4/3*n*O,U=4/3*s*O,B=[2*a-(a+L*Math.sin(y)),2*i-(i-U*Math.cos(y)),c+L*Math.sin(D),T-U*Math.cos(D),c,T];if(l)return B;N&&(B=B.concat(N));for(var W=0;W0?r.strokeStyle="white":r.strokeStyle="black",r.lineWidth=Math.abs(c)),r.translate(h*.5,f*.5),r.scale(x,x),i()){var w=new Path2D(n);r.fill(w),c&&r.stroke(w)}else{var A=_(n);S(r,A),r.fill(),c&&r.stroke()}r.setTransform(1,0,0,1,0,0);var E=e(r,{cutoff:s.cutoff!=null?s.cutoff:.5,radius:s.radius!=null?s.radius:m*.5});return E}var a;function i(){if(a!=null)return a;var n=document.createElement("canvas").getContext("2d");if(n.canvas.width=n.canvas.height=1,!window.Path2D)return a=!1;var s=new Path2D("M0,0h1v1h-1v-1Z");n.fillStyle="black",n.fill(s);var h=n.getImageData(0,0,1,1);return a=h&&h.data&&h.data[3]===255}}}),yg=He({"src/traces/scattergl/convert.js"(Z,q){"use strict";var v=ns(),_=cj(),S=v0(),M=so(),e=sa(),t=e.isArrayOrTypedArray,r=as(),o=tf(),a=rm().formatColor,i=Fu(),n=r1(),s=dT(),h=y0(),f=Km().DESELECTDIM,m={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},c=$p().appendArrayPointValue;function T(N,O){var L,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(i.hasText(O)&&(U.text=l(N,O),U.textSel=E(N,O,O.selected),U.textUnsel=E(N,O,O.unselected)),i.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 W=O.marker.opacity;for(U.markerUnsel.opacity=new Array(W.length),L=0;L500?"bold":"normal":N}function w(N,O){var L=O._length,U=O.marker,B={},W,$=t(U.symbol),ue=t(U.angle),ce=t(U.color),de=t(U.line.color),Y=t(U.opacity),X=t(U.size),Q=t(U.line.width),V;if($||(V=s.isOpenSymbol(U.symbol)),$||ce||de||Y||ue){B.symbols=new Array(L),B.angles=new Array(L),B.colors=new Array(L),B.borderColors=new Array(L);var le=U.symbol,ae=U.angle,j=a(U,U.opacity,L),ee=a(U.line,U.opacity,L);if(!t(ee[0])){var te=ee;for(ee=Array(L),W=0;Wh.TOO_MANY_POINTS||i.hasMarkers(O)?"rect":"round";if(de&&O.connectgaps){var X=W[0],Q=W[1];for($=0;$1?ce[$]:ce[0]:ce,V=t(de)?de.length>1?de[$]:de[0]:de,le=m[Q],ae=m[V],j=Y?Y/.8+1:0,ee=-ae*j-ae*.5;W.offset[$]=[le*j/X,ee/X]}}return W}q.exports={style:T,markerStyle:w,markerSelection:A,linePositions:P,errorBarPositions:z,textPosition:F}}}),jE=He({"src/traces/scattergl/scene_update.js"(Z,q){"use strict";var v=sa();q.exports=function(S,M){var e=M._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 M._scene||(e=M._scene={},e.init=function(){v.extendFlat(e,r,t)},e.init(),e.update=function(a){var i=v.repeat(a,e.count);if(e.fill2d&&e.fill2d.update(i),e.scatter2d&&e.scatter2d.update(i),e.line2d&&e.line2d.update(i),e.error2d&&e.error2d.update(i.concat(i)),e.select2d&&e.select2d.update(i),e.glText)for(var n=0;n=f,u=b*2,g={},y,D=A.makeCalcdata(x,"x"),P=E.makeCalcdata(x,"y"),z=e(x,A,"x",D),F=e(x,E,"y",P),N=z.vals,O=F.vals;x._x=N,x._y=O,x.xperiodalignment&&(x._origX=D,x._xStarts=z.starts,x._xEnds=z.ends),x.yperiodalignment&&(x._origY=P,x._yStarts=F.starts,x._yEnds=F.ends);var L=new Array(u),U=new Array(b);for(y=0;y1&&_.extendFlat(p.line,n.linePositions(T,x,w)),p.errorX||p.errorY){var b=n.errorBarPositions(T,x,w,A,E);p.errorX&&_.extendFlat(p.errorX,b.x),p.errorY&&_.extendFlat(p.errorY,b.y)}return p.text&&(_.extendFlat(p.text,{positions:w},n.textPosition(T,x,p.text,p.marker)),_.extendFlat(p.textSel,{positions:w},n.textPosition(T,x,p.text,p.markerSel)),_.extendFlat(p.textUnsel,{positions:w},n.textPosition(T,x,p.text,p.markerUnsel))),p}}}),qE=He({"src/traces/scattergl/edit_style.js"(Z,q){"use strict";var v=sa(),_=$n(),S=Km().DESELECTDIM;function M(e){var t=e[0],r=t.trace,o=t.t,a=o._scene,i=o.index,n=a.selectBatch[i],s=a.unselectBatch[i],h=a.textOptions[i],f=a.textSelectedOptions[i]||{},m=a.textUnselectedOptions[i]||{},c=v.extendFlat({},h),T,l;if(n.length||s.length){var x=f.color,w=m.color,A=h.color,E=v.isArrayOrTypedArray(A);for(c.color=new Array(r._length),T=0;T>>24,r=(M&16711680)>>>16,o=(M&65280)>>>8,a=M&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,q){"use strict";var v=Object.getOwnPropertySymbols,_=Object.prototype.hasOwnProperty,S=Object.prototype.propertyIsEnumerable;function M(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(n){return r[n]});if(a.join("")!=="0123456789")return!1;var i={};return"abcdefghijklmnopqrst".split("").forEach(function(n){i[n]=n}),Object.keys(Object.assign({},i)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}q.exports=e()?Object.assign:function(t,r){for(var o,a=M(t),i,n=1;ng.length)&&(y=g.length);for(var D=0,P=new Array(y);D[y.viewport.x,y.viewport.y,g.viewportWidth,g.viewportHeight]},attributes:{color:{buffer:T,offset:(g,y)=>y.offset*4,divisor:1},position:{buffer:m,offset:(g,y)=>y.offset*8,divisor:1},positionFract:{buffer:c,offset:(g,y)=>y.offset*8,divisor:1},error:{buffer:l,offset:(g,y)=>y.offset*16,divisor:1},direction:{buffer:x,stride:24,offset:0},lineOffset:{buffer:x,stride:24,offset:8},capOffset:{buffer:x,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:n.prop("viewport")},viewport:n.prop("viewport"),stencil:!1,instances:n.prop("count"),count:a.length}),e(E,{update:d,draw:p,destroy:u,regl:n,gl:h,canvas:h.canvas,groups:A}),E;function E(g){g?d(g):g===null&&u(),p()}function p(g){if(typeof g=="number")return b(g);g&&!Array.isArray(g)&&(g=[g]),n._refresh(),A.forEach((y,D)=>{if(y){if(g&&(g[D]?y.draw=!0:y.draw=!1),!y.draw){y.draw=!0;return}b(D)}})}function b(g){typeof g=="number"&&(g=A[g]),g!=null&&g&&g.count&&g.color&&g.opacity&&g.positions&&g.positions.length>1&&(g.scaleRatio=[g.scale[0]*g.viewport.width,g.scale[1]*g.viewport.height],f(g),g.after&&g.after(g))}function d(g){if(!g)return;g.length!=null?typeof g[0]=="number"&&(g=[{positions:g}]):Array.isArray(g)||(g=[g]);let y=0,D=0;if(E.groups=A=g.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=M(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:L=>+L*.5,capSize:L=>+L*.5,opacity:parseFloat,errors:L=>(L=t(L),D+=L.length,L),positions:(L,U)=>(L=t(L,"float64"),U.count=Math.floor(L.length/2),U.bounds=v(L,2),U.offset=y,y+=U.count,L)},{color:(L,U)=>{let B=U.count;if(L||(L="transparent"),!Array.isArray(L)||typeof L[0]=="number"){let $=L;L=Array(B);for(let ue=0;ue{let W=U.bounds;return L||(L=W),U.scale=[1/(L[2]-L[0]),1/(L[3]-L[1])],U.translate=[-L[0],-L[1]],U.scaleFract=o(U.scale),U.translateFract=o(U.translate),L},viewport:L=>{let U;return Array.isArray(L)?U={x:L[0],y:L[1],width:L[2]-L[0],height:L[3]-L[1]}:L?(U={x:L.x||L.left||0,y:L.y||L.top||0},L.right?U.width=L.right-U.x:U.width=L.w||L.width||0,L.bottom?U.height=L.bottom-U.y:U.height=L.h||L.height||0):U={x:0,y:0,width:h.drawingBufferWidth,height:h.drawingBufferHeight},U}}]),O}),y||D){let F=A.reduce((U,B,W)=>U+(B?B.count:0),0),N=new Float64Array(F*2),O=new Uint8Array(F*4),L=new Float32Array(F*4);A.forEach((U,B)=>{if(!U)return;let{positions:W,count:$,offset:ue,color:ce,errors:de}=U;$&&(O.set(ce,ue*4),L.set(de,ue*4),N.set(W,ue*2))});var P=r(N);m(P);var z=o(N,P);c(z),T(O),l(L)}}function u(){m.destroy(),c.destroy(),T.destroy(),l.destroy(),x.destroy()}}}}),vq=He({"node_modules/unquote/index.js"(Z,q){var v=/[\'\"]/;q.exports=function(S){return S?(v.test(S.charAt(0))&&(S=S.substr(1)),v.test(S.charAt(S.length-1))&&(S=S.substr(0,S.length-1)),S):""}}}),i6=He({"node_modules/css-global-keywords/index.json"(Z,q){q.exports=["inherit","initial","unset"]}}),n6=He({"node_modules/css-system-font-keywords/index.json"(Z,q){q.exports=["caption","icon","menu","message-box","small-caption","status-bar"]}}),o6=He({"node_modules/css-font-weight-keywords/index.json"(Z,q){q.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,q){q.exports=["normal","italic","oblique"]}}),l6=He({"node_modules/css-font-stretch-keywords/index.json"(Z,q){q.exports=["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]}}),mq=He({"node_modules/parenthesis/index.js"(Z,q){"use strict";function v(M,e){if(typeof M!="string")return[M];var t=[M];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 m(c,T,l){var x=t.push(c.slice(s[0].length,-s[1].length))-1;return f.push(x),o+x+o}t.forEach(function(c,T){for(var l,x=0;c!=l;)if(l=c,c=c.replace(h,m),x++>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 i=new RegExp("\\"+o+"([0-9]+)\\"+o);function n(s,h,f){for(var m=[],c,T=0;c=i.exec(s);){if(T++>1e4)throw Error("Circular references in parenthesis");m.push(s.slice(0,c.index)),m.push(n(h[c[1]],h)),s=s.slice(c.index+c[0].length)}return m.push(s),m}return a?t:n(t[0],t)}function _(M,e){if(e&&e.flat){var t=e&&e.escape||"___",r=M[0],o;if(!r)return"";for(var a=new RegExp("\\"+t+"([0-9]+)\\"+t),i=0;r!=o;){if(i++>1e4)throw Error("Circular references in "+M);o=r,r=r.replace(a,n)}return r}return M.reduce(function s(h,f){return Array.isArray(f)&&(f=f.reduce(s,"")),h+f},"");function n(s,h){if(M[h]==null)throw Error("Reference "+h+"is undefined");return M[h]}}function S(M,e){return Array.isArray(M)?_(M,e):v(M,e)}S.parse=v,S.stringify=_,q.exports=S}}),gq=He({"node_modules/string-split-by/index.js"(Z,q){"use strict";var v=mq();q.exports=function(S,M,e){if(S==null)throw Error("First argument should be a string");if(M==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=v.parse(S,{flat:!0,brackets:e.ignore}),r=t[0],o=r.split(M);if(e.escape){for(var a=[],i=0;i1&&Xt===fr&&(Xt==='"'||Xt==="'"))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 Ta=it.split(".");if(Ta.length===1)return['"'+r(it)+'"'];for(var ma=[],xa=0;xa"u"?1:window.devicePixelRatio,si=!1,gn={},zi=function(ea){},Ei=function(){};if(typeof Xt=="string"?fr=document.querySelector(Xt):typeof Xt=="object"&&(x(Xt)?fr=Xt:w(Xt)?(ma=Xt,Ta=ma.canvas):("gl"in Xt?ma=Xt.gl:"canvas"in Xt?Ta=E(Xt.canvas):"container"in Xt&&(oa=E(Xt.container)),"attributes"in Xt&&(xa=Xt.attributes),"extensions"in Xt&&(Ya=A(Xt.extensions)),"optionalExtensions"in Xt&&(bi=A(Xt.optionalExtensions)),"onDone"in Xt&&(zi=Xt.onDone),"profile"in Xt&&(si=!!Xt.profile),"pixelRatio"in Xt&&(yi=+Xt.pixelRatio),"cachedCode"in Xt&&(gn=Xt.cachedCode))),fr&&(fr.nodeName.toLowerCase()==="canvas"?Ta=fr:oa=fr),!ma){if(!Ta){var Na=T(oa||document.body,zi,yi);if(!Na)return null;Ta=Na.canvas,Ei=Na.onDestroy}xa.premultipliedAlpha===void 0&&(xa.premultipliedAlpha=!0),ma=l(Ta,xa)}return ma?{gl:ma,canvas:Ta,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,Xt){var fr={};function oa(xa){var Ya=xa.toLowerCase(),bi;try{bi=fr[Ya]=it.getExtension(Ya)}catch{}return!!bi}for(var Ta=0;Ta65535)<<4,it>>>=Xt,fr=(it>255)<<3,it>>>=fr,Xt|=fr,fr=(it>15)<<2,it>>>=fr,Xt|=fr,fr=(it>3)<<1,it>>>=fr,Xt|=fr,Xt|it>>1}function L(){var it=d(8,function(){return[]});function Xt(ma){var xa=N(ma),Ya=it[O(xa)>>2];return Ya.length>0?Ya.pop():new ArrayBuffer(xa)}function fr(ma){it[O(ma.byteLength)>>2].push(ma)}function oa(ma,xa){var Ya=null;switch(ma){case u:Ya=new Int8Array(Xt(xa),0,xa);break;case g:Ya=new Uint8Array(Xt(xa),0,xa);break;case y:Ya=new Int16Array(Xt(2*xa),0,xa);break;case D:Ya=new Uint16Array(Xt(2*xa),0,xa);break;case P:Ya=new Int32Array(Xt(4*xa),0,xa);break;case z:Ya=new Uint32Array(Xt(4*xa),0,xa);break;case F:Ya=new Float32Array(Xt(4*xa),0,xa);break;default:return null}return Ya.length!==xa?Ya.subarray(0,xa):Ya}function Ta(ma){fr(ma.buffer)}return{alloc:Xt,free:fr,allocType:oa,freeType:Ta}}var U=L();U.zero=L();var B=3408,W=3410,$=3411,ue=3412,ce=3413,de=3414,Y=3415,X=33901,Q=33902,V=3379,le=3386,ae=34921,j=36347,ee=36348,te=35661,pe=35660,we=34930,Se=36349,Re=34076,Pe=34024,je=7936,at=7937,nt=7938,tt=35724,Ve=34047,he=36063,se=34852,ne=3553,Ce=34067,Ze=34069,rt=33984,Je=6408,St=5126,kt=5121,Bt=36160,Vt=36053,Ar=36064,vr=16384,qr=function(it,Xt){var fr=1;Xt.ext_texture_filter_anisotropic&&(fr=it.getParameter(Ve));var oa=1,Ta=1;Xt.webgl_draw_buffers&&(oa=it.getParameter(se),Ta=it.getParameter(he));var ma=!!Xt.oes_texture_float;if(ma){var xa=it.createTexture();it.bindTexture(ne,xa),it.texImage2D(ne,0,Je,1,1,0,Je,St,null);var Ya=it.createFramebuffer();if(it.bindFramebuffer(Bt,Ya),it.framebufferTexture2D(Bt,Ar,ne,xa,0),it.bindTexture(ne,null),it.checkFramebufferStatus(Bt)!==Vt)ma=!1;else{it.viewport(0,0,1,1),it.clearColor(1,0,0,1),it.clear(vr);var bi=U.allocType(St,4);it.readPixels(0,0,1,1,Je,St,bi),it.getError()?ma=!1:(it.deleteFramebuffer(Ya),it.deleteTexture(xa),ma=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(Ze,0,Je,3,3,0,Je,kt,zi),U.freeType(zi),it.bindTexture(Ce,null),it.deleteTexture(gn),si=!it.getError()}return{colorBits:[it.getParameter(W),it.getParameter($),it.getParameter(ue),it.getParameter(ce)],depthBits:it.getParameter(de),stencilBits:it.getParameter(Y),subpixelBits:it.getParameter(B),extensions:Object.keys(Xt).filter(function(Ei){return!!Xt[Ei]}),maxAnisotropic:fr,maxDrawbuffers:oa,maxColorAttachments:Ta,pointSizeDims:it.getParameter(X),lineWidthDims:it.getParameter(Q),maxViewportDims:it.getParameter(le),maxCombinedTextureUnits:it.getParameter(te),maxCubeMapSize:it.getParameter(Re),maxRenderbufferSize:it.getParameter(Pe),maxTextureUnits:it.getParameter(we),maxTextureSize:it.getParameter(V),maxAttributes:it.getParameter(ae),maxVertexUniforms:it.getParameter(j),maxVertexTextureUnits:it.getParameter(pe),maxVaryingVectors:it.getParameter(ee),maxFragmentUniforms:it.getParameter(Se),glsl:it.getParameter(tt),renderer:it.getParameter(at),vendor:it.getParameter(je),version:it.getParameter(nt),readFloat:ma,npotTextureCube:si}},kr=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 Ur(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)||kr(it.data))}var _t=function(it){return Object.keys(it).map(function(Xt){return it[Xt]})},Fe={shape:st,flatten:Ke};function Ye(it,Xt,fr){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])||kr(Ha[0])){Ri=Ca(Ha);var xi=Wa(Ha,Ri,Va.dtype);Li(xi,Yi),U.freeType(xi)}}}else if(Ur(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 Cn=Array.isArray(Ha.data)?Va.dtype:Jt(Ha.data),Dn=U.allocType(Cn,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,fr.profile&&(Bi.stats=Va.stats),Bi.destroy=function(){zi(Va)},Bi}function Na(){_t(ma).forEach(function(ea){ea.buffer=it.createBuffer(),it.bindBuffer(ea.type,ea.buffer),it.bufferData(ea.type,ea.persistentData||ea.byteLength,ea.usage)})}return fr.profile&&(Xt.getTotalBufferSize=function(){var ea=0;return Object.keys(ma).forEach(function(Ma){ea+=ma[Ma].stats.size}),ea}),{create:Ei,createStream:bi,destroyStream:yi,clear:function(){_t(ma).forEach(zi),Ya.forEach(zi)},getBuffer:function(ea){return ea&&ea._buffer instanceof xa?ea._buffer:null},restore:Na,_initBuffer:gn}}var ca=0,Ba=0,$a=1,Za=1,ri=4,pi=4,Ia={points:ca,point:Ba,lines:$a,line:Za,triangles:ri,triangle:pi,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},rn=0,tn=1,cn=4,xt=5120,ut=5121,Or=5122,Cr=5123,wr=5124,Rr=5125,Nr=34963,Hr=35040,gt=35044;function Kt(it,Xt,fr,oa){var Ta={},ma=0,xa={uint8:ut,uint16:Cr};Xt.oes_element_index_uint&&(xa.uint32=Rr);function Ya(Na){this.id=ma++,Ta[this.id]=this,this.buffer=Na,this.primType=cn,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(fr.create(null,Nr,!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&&(!kr(ea)||Ur(ea)&&!kr(ea.data))&&(hn=Xt.oes_element_index_uint?Rr:Cr),fr._initBuffer(Na.buffer,ea,Ma,hn,3)}else it.bufferData(Nr,Va,Ma),Na.buffer.dtype=Li||ut,Na.buffer.usage=Ma,Na.buffer.dimension=3,Na.buffer.byteLength=Va;if(Li=Bi,!Bi){switch(Na.buffer.dtype){case ut:case xt:Li=ut;break;case Cr:case Or:Li=Cr;break;case Rr:case wr: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=cn;var Yi=Na.buffer.dimension;Yi===1&&(Ua=rn),Yi===2&&(Ua=tn),Yi===3&&(Ua=cn)}Na.primType=Ua}function zi(Na){oa.elementsCount--,delete Ta[Na.id],Na.buffer.destroy(),Na.buffer=null}function Ei(Na,ea){var Ma=fr.create(null,Nr,!0),Qa=new Ya(Ma._buffer);oa.elementsCount++;function di(Va){if(!Va)Ma(),Qa.primType=cn,Qa.vertCount=0,Qa.type=ut;else if(typeof Va=="number")Ma(Va),Qa.primType=cn,Qa.vertCount=Va|0,Qa.type=ut;else{var Bi=null,Li=gt,hn=-1,Ha=-1,Ua=0,Yi=0;Array.isArray(Va)||kr(Va)||Ur(Va)?Bi=Va:("data"in Va&&(Bi=Va.data),"usage"in Va&&(Li=qa[Va.usage]),"primitive"in Va&&(hn=Ia[Va.primitive]),"count"in Va&&(Ha=Va.count|0),"type"in Va&&(Yi=xa[Va.type]),"length"in Va?Ua=Va.length|0:(Ua=Ha,Yi===Cr||Yi===Or?Ua*=2:(Yi===Rr||Yi===wr)&&(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(Ta).forEach(zi)}}}var mr=new Float32Array(1),Ir=new Uint32Array(mr.buffer),va=5123;function Pa(it){for(var Xt=U.allocType(va,it.length),fr=0;fr>>31<<15,ma=(oa<<1>>>24)-127,xa=oa>>13&1023;if(ma<-24)Xt[fr]=Ta;else if(ma<-14){var Ya=-14-ma;Xt[fr]=Ta+(xa+1024>>Ya)}else ma>15?Xt[fr]=Ta+31744:Xt[fr]=Ta+(ma+15<<10)+xa}return Xt}function ga(it){return Array.isArray(it)||kr(it)}var la=34467,ba=3553,Ai=34067,ki=34069,Ki=6408,Mn=6406,wn=6407,On=6409,En=6410,ao=32854,Co=32855,bo=36194,zs=32819,kn=32820,wo=33635,Zn=34042,go=6402,os=34041,ys=35904,jo=35906,Yn=36193,Gn=33776,Hn=33777,ss=33778,_s=33779,ps=35986,Ko=35987,Gi=34798,Pn=35840,qs=35841,bs=35842,lo=35843,Zo=36196,ws=5121,Hs=5123,il=5125,yn=5126,Po=10242,To=10243,Ws=10497,Ll=33071,uo=33648,Nl=10240,Ks=10241,Ts=9728,Ls=9729,Jo=9984,Es=9985,Ul=9986,lu=9987,Tc=33170,du=4352,Sf=4353,Uc=4354,Bs=34046,dc=3317,Wc=37440,uu=37441,Pl=37443,ic=37444,Ou=33984,nl=[Jo,Ul,Es,lu],vl=[0,On,En,wn,Ki],As={};As[On]=As[Mn]=As[go]=1,As[os]=As[En]=2,As[wn]=As[ys]=3,As[Ki]=As[jo]=4;function Xs(it){return"[object "+it+"]"}var nc=Xs("HTMLCanvasElement"),jl=Xs("OffscreenCanvas"),qu=Xs("CanvasRenderingContext2D"),fl=Xs("ImageBitmap"),xh=Xs("HTMLImageElement"),us=Xs("HTMLVideoElement"),bh=Object.keys(ot).concat([nc,jl,qu,fl,xh,us]),Ps=[];Ps[ws]=1,Ps[yn]=4,Ps[Yn]=2,Ps[Hs]=2,Ps[il]=4;var to=[];to[ao]=2,to[Co]=2,to[bo]=2,to[os]=4,to[Gn]=.5,to[Hn]=.5,to[ss]=1,to[_s]=1,to[ps]=.5,to[Ko]=1,to[Gi]=1,to[Pn]=.5,to[qs]=.25,to[bs]=.5,to[lo]=.25,to[Zo]=.5;function Xc(it){return Array.isArray(it)&&(it.length===0||typeof it[0]=="number")}function Vu(it){if(!Array.isArray(it))return!1;var Xt=it.length;return!(Xt===0||!ga(it[0]))}function ql(it){return Object.prototype.toString.call(it)}function Mf(it){return ql(it)===nc}function Ac(it){return ql(it)===jl}function nf(it){return ql(it)===qu}function Ql(it){return ql(it)===fl}function Jf(it){return ql(it)===xh}function Of(it){return ql(it)===us}function of(it){if(!it)return!1;var Xt=ql(it);return bh.indexOf(Xt)>=0?!0:Xc(it)||Vu(it)||Ur(it)}function jc(it){return ot[Object.prototype.toString.call(it)]|0}function Bf(it,Xt){var fr=Xt.length;switch(it.type){case ws:case Hs:case il:case yn:var oa=U.allocType(it.type,fr);oa.set(Xt),it.data=oa;break;case Yn:it.data=Pa(Xt);break;default:}}function Nf(it,Xt){return U.allocType(it.type===Yn?yn:it.type,Xt)}function Gu(it,Xt){it.type===Yn?(it.data=Pa(Xt),U.freeType(Xt)):it.data=Xt}function Ef(it,Xt,fr,oa,Ta,ma){for(var xa=it.width,Ya=it.height,bi=it.channels,yi=xa*Ya*bi,si=Nf(it,yi),gn=0,zi=0;zi=1;)Ya+=xa*bi*bi,bi/=2;return Ya}else return xa*fr*oa}function Zc(it,Xt,fr,oa,Ta,ma,xa){var Ya={"don't care":du,"dont care":du,nice:Uc,fast:Sf},bi={repeat:Ws,clamp:Ll,mirror:uo},yi={nearest:Ts,linear:Ls},si=v({mipmap:lu,"nearest mipmap nearest":Jo,"linear mipmap nearest":Es,"nearest mipmap linear":Ul,"linear mipmap linear":lu},yi),gn={none:0,browser:ic},zi={uint8:ws,rgba4:zs,rgb565:wo,"rgb5 a1":kn},Ei={alpha:Mn,luminance:On,"luminance alpha":En,rgb:wn,rgba:Ki,rgba4:ao,"rgb5 a1":Co,rgb565:bo},Na={};Xt.ext_srgb&&(Ei.srgb=ys,Ei.srgba=jo),Xt.oes_texture_float&&(zi.float32=zi.float=yn),Xt.oes_texture_half_float&&(zi.float16=zi["half float"]=Yn),Xt.webgl_depth_texture&&(v(Ei,{depth:go,"depth stencil":os}),v(zi,{uint16:Hs,uint32:il,"depth stencil":Zn})),Xt.webgl_compressed_texture_s3tc&&v(Na,{"rgb s3tc dxt1":Gn,"rgba s3tc dxt1":Hn,"rgba s3tc dxt3":ss,"rgba s3tc dxt5":_s}),Xt.webgl_compressed_texture_atc&&v(Na,{"rgb atc":ps,"rgba atc explicit alpha":Ko,"rgba atc interpolated alpha":Gi}),Xt.webgl_compressed_texture_pvrtc&&v(Na,{"rgb pvrtc 4bppv1":Pn,"rgb pvrtc 2bppv1":qs,"rgba pvrtc 4bppv1":bs,"rgba pvrtc 2bppv1":lo}),Xt.webgl_compressed_texture_etc1&&(Na["rgb etc1"]=Zo);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);fr.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===On||vt===Mn||vt===On||vt===En||vt===go||vt===os||Xt.ext_srgb&&(vt===ys||vt===jo)?ke[vt]=vt:vt===Co||Qe.indexOf("rgba")>=0?ke[vt]=Ki:ke[vt]=wn,ke},{});function Ha(){this.internalformat=Ki,this.format=Ki,this.type=ws,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,br=ke.height,Br=ke.channels,pr=!1;"shape"in Qe?(qt=Qe.shape[0],br=Qe.shape[1],Qe.shape.length===3&&(Br=Qe.shape[2],pr=!0)):("radius"in Qe&&(qt=br=Qe.radius),"width"in Qe&&(qt=Qe.width),"height"in Qe&&(br=Qe.height),"channels"in Qe&&(Br=Qe.channels,pr=!0)),ke.width=qt|0,ke.height=br|0,ke.channels=Br|0;var mt=!1;if("format"in Qe){var Mt=Qe.format,Ft=ke.internalformat=Ei[Mt];ke.format=hn[Ft],Mt in zi&&("type"in Qe||(ke.type=zi[Mt])),Mt in Na&&(ke.compressed=!0),mt=!0}!pr&&mt?ke.channels=As[ke.format]:pr&&!mt&&ke.channels!==vl[ke.format]&&(ke.format=ke.internalformat=vl[ke.channels])}}function Ri(ke){it.pixelStorei(Wc,ke.flipY),it.pixelStorei(uu,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=Ta.viewportWidth,br=Ta.viewportHeight;ke.width=ke.width||qt-ke.xOffset,ke.height=ke.height||br-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(kr(vt))ke.channels=ke.channels||4,ke.data=vt,!("type"in Qe)&&ke.type===ws&&(ke.type=jc(vt));else if(Xc(vt))ke.channels=ke.channels||4,Bf(ke,vt),ke.alignment=1,ke.needsFree=!0;else if(Ur(vt)){var Br=vt.data;!Array.isArray(Br)&&ke.type===ws&&(ke.type=jc(Br));var pr=vt.shape,mt=vt.stride,Mt,Ft,rr,hr,sr,dr;pr.length===3?(rr=pr[2],dr=mt[2]):(rr=1,dr=1),Mt=pr[0],Ft=pr[1],hr=mt[0],sr=mt[1],ke.alignment=1,ke.width=Mt,ke.height=Ft,ke.channels=rr,ke.format=ke.internalformat=vl[rr],ke.needsFree=!0,Ef(ke,Br,hr,sr,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(Ql(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 lr=ke.width||vt[0].length,Wt=ke.height||vt.length,ir=ke.channels;ga(vt[0][0])?ir=ir||vt[0][0].length:ir=ir||1;for(var Gt=Fe.shape(vt),Dr=1,Jr=0;Jr>=br,vt.height>>=br,xi(vt,qt[br]),ke.mipmask|=1<=0&&!("faces"in Qe)&&(ke.genMipmaps=!0)}if("mag"in Qe){var qt=Qe.mag;ke.magFilter=yi[qt]}var br=ke.wrapS,Br=ke.wrapT;if("wrap"in Qe){var pr=Qe.wrap;typeof pr=="string"?br=Br=bi[pr]:Array.isArray(pr)&&(br=bi[pr[0]],Br=bi[pr[1]])}else{if("wrapS"in Qe){var mt=Qe.wrapS;br=bi[mt]}if("wrapT"in Qe){var Mt=Qe.wrapT;Br=bi[Mt]}}if(ke.wrapS=br,ke.wrapT=Br,"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=Jo)}}function El(ke,Qe){it.texParameteri(Qe,Ks,ke.minFilter),it.texParameteri(Qe,Nl,ke.magFilter),it.texParameteri(Qe,Po,ke.wrapS),it.texParameteri(Qe,To,ke.wrapT),Xt.ext_texture_filter_anisotropic&&it.texParameteri(Qe,Bs,ke.anisotropic),ke.genMipmaps&&(it.hint(Tc,ke.mipmapHint),it.generateMipmap(Qe))}var ru=0,js={},pl=fr.maxTextureUnits,bl=Array(pl).map(function(){return null});function Xn(ke){Ha.call(this),this.mipmask=0,this.internalformat=Ki,this.id=ru++,this.refCount=1,this.target=ke,this.texture=it.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new hs,xa.profile&&(this.stats={size:0})}function kl(ke){it.activeTexture(Ou),it.bindTexture(ke.target,ke.texture)}function Io(){var ke=bl[0];ke?it.bindTexture(ke.target,ke.texture):it.bindTexture(ba,null)}function ge(ke){var Qe=ke.texture,vt=ke.unit,qt=ke.target;vt>=0&&(it.activeTexture(Ou+vt),it.bindTexture(qt,null),bl[vt]=null),it.deleteTexture(Qe),ke.texture=null,ke.params=null,ke.pixels=null,ke.refCount=0,delete js[ke.id],ma.textureCount--}v(Xn.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}bl[vt]=ke,Qe=vt;break}Qe>=pl,xa.profile&&ma.maxTextureUnits>sr)-rr,dr.height=dr.height||(vt.height>>sr)-hr,kl(vt),vn(dr,ba,rr,hr,sr),Io(),nn(dr),qt}function Br(pr,mt){var Mt=pr|0,Ft=mt|0||Mt;if(Mt===vt.width&&Ft===vt.height)return qt;qt.width=vt.width=Mt,qt.height=vt.height=Ft,kl(vt);for(var rr=0;vt.mipmask>>rr;++rr){var hr=Mt>>rr,sr=Ft>>rr;if(!hr||!sr)break;it.texImage2D(ba,rr,vt.format,hr,sr,0,vt.format,vt.type,null)}return Io(),xa.profile&&(vt.stats.size=oc(vt.internalformat,vt.type,Mt,Ft,!1,!1)),qt}return qt(ke,Qe),qt.subimage=br,qt.resize=Br,qt._reglType="texture2d",qt._texture=vt,xa.profile&&(qt.stats=vt.stats),qt.destroy=function(){vt.decRef()},qt}function xe(ke,Qe,vt,qt,br,Br){var pr=new Xn(Ai);js[pr.id]=pr,ma.cubeCount++;var mt=new Array(6);function Mt(hr,sr,dr,lr,Wt,ir){var Gt,Dr=pr.texInfo;for(hs.call(Dr),Gt=0;Gt<6;++Gt)mt[Gt]=ho();if(typeof hr=="number"||!hr){var Jr=hr|0||1;for(Gt=0;Gt<6;++Gt)Dn(mt[Gt],Jr,Jr)}else if(typeof hr=="object")if(sr)Wn(mt[0],hr),Wn(mt[1],sr),Wn(mt[2],dr),Wn(mt[3],lr),Wn(mt[4],Wt),Wn(mt[5],ir);else if(Al(Dr,hr),Yi(pr,hr),"faces"in hr){var ya=hr.faces;for(Gt=0;Gt<6;++Gt)Ua(mt[Gt],pr),Wn(mt[Gt],ya[Gt])}else for(Gt=0;Gt<6;++Gt)Wn(mt[Gt],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,Mt.width=mt[0].width,Mt.height=mt[0].height,kl(pr),Gt=0;Gt<6;++Gt)Os(mt[Gt],ki+Gt);for(El(Dr,Ai),Io(),xa.profile&&(pr.stats.size=oc(pr.internalformat,pr.type,Mt.width,Mt.height,Dr.genMipmaps,!0)),Mt.format=Qa[pr.internalformat],Mt.type=di[pr.type],Mt.mag=Va[Dr.magFilter],Mt.min=Bi[Dr.minFilter],Mt.wrapS=Li[Dr.wrapS],Mt.wrapT=Li[Dr.wrapT],Gt=0;Gt<6;++Gt)Xl(mt[Gt]);return Mt}function Ft(hr,sr,dr,lr,Wt){var ir=dr|0,Gt=lr|0,Dr=Wt|0,Jr=Ii();return Ua(Jr,pr),Jr.width=0,Jr.height=0,xi(Jr,sr),Jr.width=Jr.width||(pr.width>>Dr)-ir,Jr.height=Jr.height||(pr.height>>Dr)-Gt,kl(pr),vn(Jr,ki+hr,ir,Gt,Dr),Io(),nn(Jr),Mt}function rr(hr){var sr=hr|0;if(sr!==pr.width){Mt.width=pr.width=sr,Mt.height=pr.height=sr,kl(pr);for(var dr=0;dr<6;++dr)for(var lr=0;pr.mipmask>>lr;++lr)it.texImage2D(ki+dr,lr,pr.format,sr>>lr,sr>>lr,0,pr.format,pr.type,null);return Io(),xa.profile&&(pr.stats.size=oc(pr.internalformat,pr.type,Mt.width,Mt.height,!1,!0)),Mt}}return Mt(ke,Qe,vt,qt,br,Br),Mt.subimage=Ft,Mt.resize=rr,Mt._reglType="textureCube",Mt._texture=pr,xa.profile&&(Mt.stats=pr.stats),Mt.destroy=function(){pr.decRef()},Mt}function re(){for(var ke=0;ke>qt,vt.height>>qt,0,vt.internalformat,vt.type,null);else for(var br=0;br<6;++br)it.texImage2D(ki+br,qt,vt.internalformat,vt.width>>qt,vt.height>>qt,0,vt.internalformat,vt.type,null);El(vt.texInfo,vt.target)})}function Ue(){for(var ke=0;ke=0?Xl=!0:bi.indexOf(hs)>=0&&(Xl=!1))),("depthTexture"in Xn||"depthStencilTexture"in Xn)&&(bl=!!(Xn.depthTexture||Xn.depthStencilTexture)),"depth"in Xn&&(typeof Xn.depth=="boolean"?Os=Xn.depth:(ru=Xn.depth,xl=!1)),"stencil"in Xn&&(typeof Xn.stencil=="boolean"?xl=Xn.stencil:(js=Xn.stencil,Os=!1)),"depthStencil"in Xn&&(typeof Xn.depthStencil=="boolean"?Os=xl=Xn.depthStencil:(pl=Xn.depthStencil,Os=!1,xl=!1))}var Io=null,ge=null,K=null,xe=null;if(Array.isArray(ho))Io=ho.map(Na);else if(ho)Io=[Na(ho)];else for(Io=new Array(El),Cn=0;Cn0&&(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 v(Xi,{width:Cn,height:Cn,color:hs})}function vn(Rn){var Ii,nn=Rn|0;if(nn===Xi.width)return Xi;var Cn=Xi.color;for(Ii=0;Ii=Cn.byteLength?Dn.subdata(Cn):(Dn.destroy(),Ua.buffers[Rn]=null)),Ua.buffers[Rn]||(Dn=Ua.buffers[Rn]=Ta.create(Ii,mf,!1,!0)),nn.buffer=Ta.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 Ta.getBuffer(Ii)?(nn.buffer=Ta.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):Ta.getBuffer(Ii.buffer)?(nn.buffer=Ta.getBuffer(Ii.buffer),nn.size=(+Ii.size||nn.buffer.dimension)|0,nn.normalized=!!Ii.normalized||!1,"type"in Ii?nn.type=_a[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 Wn=0;Wn1)for(var Ri=0;Riea&&(ea=Ma.stats.uniformsCount)}),ea},fr.getMaxAttributesCount=function(){var ea=0;return si.forEach(function(Ma){Ma.stats.attributesCount>ea&&(ea=Ma.stats.attributesCount)}),ea});function Na(){Ta={},ma={};for(var ea=0;ea16&&(fr=Pi(fr,it.length*8));for(var oa=Array(16),Ta=Array(16),ma=0;ma<16;ma++)oa[ma]=fr[ma]^909522486,Ta[ma]=fr[ma]^1549556828;var xa=Pi(oa.concat(Pc(Xt)),512+Xt.length*8);return Qt(Pi(Ta.concat(xa),768))}function xu(it){for(var Xt=Vf?"0123456789ABCDEF":"0123456789abcdef",fr="",oa,Ta=0;Ta>>4&15)+Xt.charAt(oa&15);return fr}function Lc(it){for(var Xt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",fr="",oa=it.length,Ta=0;Tait.length*8?fr+=Xu:fr+=Xt.charAt(ma>>>6*(3-xa)&63);return fr}function $c(it,Xt){var fr=Xt.length,oa=Array(),Ta,ma,xa,Ya,bi=Array(Math.ceil(it.length/2));for(Ta=0;Ta0;){for(Ya=Array(),xa=0,Ta=0;Ta0||ma>0)&&(Ya[Ya.length]=ma);oa[oa.length]=xa,bi=Ya}var yi="";for(Ta=oa.length-1;Ta>=0;Ta--)yi+=Xt.charAt(oa[Ta]);var si=Math.ceil(it.length*8/(Math.log(Xt.length)/Math.log(2)));for(Ta=yi.length;Ta>>6&31,128|oa&63):oa<=65535?Xt+=String.fromCharCode(224|oa>>>12&15,128|oa>>>6&63,128|oa&63):oa<=2097151&&(Xt+=String.fromCharCode(240|oa>>>18&7,128|oa>>>12&63,128|oa>>>6&63,128|oa&63));return Xt}function Pc(it){for(var Xt=Array(it.length>>2),fr=0;fr>5]|=(it.charCodeAt(fr/8)&255)<<24-fr%32;return Xt}function Qt(it){for(var Xt="",fr=0;fr>5]>>>24-fr%32&255);return Xt}function xr(it,Xt){return it>>>Xt|it<<32-Xt}function aa(it,Xt){return it>>>Xt}function $r(it,Xt,fr){return it&Xt^~it&fr}function ka(it,Xt,fr){return it&Xt^it&fr^Xt&fr}function li(it){return xr(it,2)^xr(it,13)^xr(it,22)}function Ci(it){return xr(it,6)^xr(it,11)^xr(it,25)}function Hi(it){return xr(it,7)^xr(it,18)^aa(it,3)}function Qi(it){return xr(it,17)^xr(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,Xt){var fr=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),oa=new Array(64),Ta,ma,xa,Ya,bi,yi,si,gn,zi,Ei,Na,ea;for(it[Xt>>5]|=128<<24-Xt%32,it[(Xt+64>>9<<4)+15]=Xt,zi=0;zi>16)+(Xt>>16)+(fr>>16);return oa<<16|fr&65535}function Ni(it){return Array.prototype.slice.call(it)}function mi(it){return Ni(it).join("")}function Sn(it){var Xt=it&&it.cache,fr=0,oa=[],Ta=[],ma=[];function xa(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 v(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 v(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 v(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[y.viewport.x,y.viewport.y,g.viewportWidth,g.viewportHeight]},attributes:{color:{buffer:T,offset:(g,y)=>y.offset*4,divisor:1},position:{buffer:m,offset:(g,y)=>y.offset*8,divisor:1},positionFract:{buffer:c,offset:(g,y)=>y.offset*8,divisor:1},error:{buffer:l,offset:(g,y)=>y.offset*16,divisor:1},direction:{buffer:x,stride:24,offset:0},lineOffset:{buffer:x,stride:24,offset:8},capOffset:{buffer:x,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:n.prop("viewport")},viewport:n.prop("viewport"),stencil:!1,instances:n.prop("count"),count:a.length}),e(E,{update:d,draw:p,destroy:u,regl:n,gl:h,canvas:h.canvas,groups:A}),E;function E(g){g?d(g):g===null&&u(),p()}function p(g){if(typeof g=="number")return b(g);g&&!Array.isArray(g)&&(g=[g]),n._refresh(),A.forEach((y,D)=>{if(y){if(g&&(g[D]?y.draw=!0:y.draw=!1),!y.draw){y.draw=!0;return}b(D)}})}function b(g){typeof g=="number"&&(g=A[g]),g!=null&&g&&g.count&&g.color&&g.opacity&&g.positions&&g.positions.length>1&&(g.scaleRatio=[g.scale[0]*g.viewport.width,g.scale[1]*g.viewport.height],f(g),g.after&&g.after(g))}function d(g){if(!g)return;g.length!=null?typeof g[0]=="number"&&(g=[{positions:g}]):Array.isArray(g)||(g=[g]);let y=0,D=0;if(E.groups=A=g.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=M(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:L=>+L*.5,capSize:L=>+L*.5,opacity:parseFloat,errors:L=>(L=t(L),D+=L.length,L),positions:(L,U)=>(L=t(L,"float64"),U.count=Math.floor(L.length/2),U.bounds=v(L,2),U.offset=y,y+=U.count,L)},{color:(L,U)=>{let B=U.count;if(L||(L="transparent"),!Array.isArray(L)||typeof L[0]=="number"){let $=L;L=Array(B);for(let ue=0;ue{let W=U.bounds;return L||(L=W),U.scale=[1/(L[2]-L[0]),1/(L[3]-L[1])],U.translate=[-L[0],-L[1]],U.scaleFract=o(U.scale),U.translateFract=o(U.translate),L},viewport:L=>{let U;return Array.isArray(L)?U={x:L[0],y:L[1],width:L[2]-L[0],height:L[3]-L[1]}:L?(U={x:L.x||L.left||0,y:L.y||L.top||0},L.right?U.width=L.right-U.x:U.width=L.w||L.width||0,L.bottom?U.height=L.bottom-U.y:U.height=L.h||L.height||0):U={x:0,y:0,width:h.drawingBufferWidth,height:h.drawingBufferHeight},U}}]),O}),y||D){let F=A.reduce((U,B,W)=>U+(B?B.count:0),0),N=new Float64Array(F*2),O=new Uint8Array(F*4),L=new Float32Array(F*4);A.forEach((U,B)=>{if(!U)return;let{positions:W,count:$,offset:ue,color:ce,errors:de}=U;$&&(O.set(ce,ue*4),L.set(de,ue*4),N.set(W,ue*2))});var P=r(N);m(P);var z=o(N,P);c(z),T(O),l(L)}}function u(){m.destroy(),c.destroy(),T.destroy(),l.destroy(),x.destroy()}}}}),vq=He({"node_modules/unquote/index.js"(Z,q){var v=/[\'\"]/;q.exports=function(S){return S?(v.test(S.charAt(0))&&(S=S.substr(1)),v.test(S.charAt(S.length-1))&&(S=S.substr(0,S.length-1)),S):""}}}),i6=He({"node_modules/css-global-keywords/index.json"(Z,q){q.exports=["inherit","initial","unset"]}}),n6=He({"node_modules/css-system-font-keywords/index.json"(Z,q){q.exports=["caption","icon","menu","message-box","small-caption","status-bar"]}}),o6=He({"node_modules/css-font-weight-keywords/index.json"(Z,q){q.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,q){q.exports=["normal","italic","oblique"]}}),l6=He({"node_modules/css-font-stretch-keywords/index.json"(Z,q){q.exports=["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]}}),mq=He({"node_modules/parenthesis/index.js"(Z,q){"use strict";function v(M,e){if(typeof M!="string")return[M];var t=[M];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 m(c,T,l){var x=t.push(c.slice(s[0].length,-s[1].length))-1;return f.push(x),o+x+o}t.forEach(function(c,T){for(var l,x=0;c!=l;)if(l=c,c=c.replace(h,m),x++>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 i=new RegExp("\\"+o+"([0-9]+)\\"+o);function n(s,h,f){for(var m=[],c,T=0;c=i.exec(s);){if(T++>1e4)throw Error("Circular references in parenthesis");m.push(s.slice(0,c.index)),m.push(n(h[c[1]],h)),s=s.slice(c.index+c[0].length)}return m.push(s),m}return a?t:n(t[0],t)}function _(M,e){if(e&&e.flat){var t=e&&e.escape||"___",r=M[0],o;if(!r)return"";for(var a=new RegExp("\\"+t+"([0-9]+)\\"+t),i=0;r!=o;){if(i++>1e4)throw Error("Circular references in "+M);o=r,r=r.replace(a,n)}return r}return M.reduce(function s(h,f){return Array.isArray(f)&&(f=f.reduce(s,"")),h+f},"");function n(s,h){if(M[h]==null)throw Error("Reference "+h+"is undefined");return M[h]}}function S(M,e){return Array.isArray(M)?_(M,e):v(M,e)}S.parse=v,S.stringify=_,q.exports=S}}),gq=He({"node_modules/string-split-by/index.js"(Z,q){"use strict";var v=mq();q.exports=function(S,M,e){if(S==null)throw Error("First argument should be a string");if(M==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=v.parse(S,{flat:!0,brackets:e.ignore}),r=t[0],o=r.split(M);if(e.escape){for(var a=[],i=0;i1&&Xt===fr&&(Xt==='"'||Xt==="'"))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 Ta=it.split(".");if(Ta.length===1)return['"'+r(it)+'"'];for(var ma=[],xa=0;xa"u"?1:window.devicePixelRatio,si=!1,gn={},zi=function(ea){},Ei=function(){};if(typeof Xt=="string"?fr=document.querySelector(Xt):typeof Xt=="object"&&(x(Xt)?fr=Xt:w(Xt)?(ma=Xt,Ta=ma.canvas):("gl"in Xt?ma=Xt.gl:"canvas"in Xt?Ta=E(Xt.canvas):"container"in Xt&&(oa=E(Xt.container)),"attributes"in Xt&&(xa=Xt.attributes),"extensions"in Xt&&(Ya=A(Xt.extensions)),"optionalExtensions"in Xt&&(bi=A(Xt.optionalExtensions)),"onDone"in Xt&&(zi=Xt.onDone),"profile"in Xt&&(si=!!Xt.profile),"pixelRatio"in Xt&&(yi=+Xt.pixelRatio),"cachedCode"in Xt&&(gn=Xt.cachedCode))),fr&&(fr.nodeName.toLowerCase()==="canvas"?Ta=fr:oa=fr),!ma){if(!Ta){var Na=T(oa||document.body,zi,yi);if(!Na)return null;Ta=Na.canvas,Ei=Na.onDestroy}xa.premultipliedAlpha===void 0&&(xa.premultipliedAlpha=!0),ma=l(Ta,xa)}return ma?{gl:ma,canvas:Ta,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,Xt){var fr={};function oa(xa){var Ya=xa.toLowerCase(),bi;try{bi=fr[Ya]=it.getExtension(Ya)}catch{}return!!bi}for(var Ta=0;Ta65535)<<4,it>>>=Xt,fr=(it>255)<<3,it>>>=fr,Xt|=fr,fr=(it>15)<<2,it>>>=fr,Xt|=fr,fr=(it>3)<<1,it>>>=fr,Xt|=fr,Xt|it>>1}function L(){var it=d(8,function(){return[]});function Xt(ma){var xa=N(ma),Ya=it[O(xa)>>2];return Ya.length>0?Ya.pop():new ArrayBuffer(xa)}function fr(ma){it[O(ma.byteLength)>>2].push(ma)}function oa(ma,xa){var Ya=null;switch(ma){case u:Ya=new Int8Array(Xt(xa),0,xa);break;case g:Ya=new Uint8Array(Xt(xa),0,xa);break;case y:Ya=new Int16Array(Xt(2*xa),0,xa);break;case D:Ya=new Uint16Array(Xt(2*xa),0,xa);break;case P:Ya=new Int32Array(Xt(4*xa),0,xa);break;case z:Ya=new Uint32Array(Xt(4*xa),0,xa);break;case F:Ya=new Float32Array(Xt(4*xa),0,xa);break;default:return null}return Ya.length!==xa?Ya.subarray(0,xa):Ya}function Ta(ma){fr(ma.buffer)}return{alloc:Xt,free:fr,allocType:oa,freeType:Ta}}var U=L();U.zero=L();var B=3408,W=3410,$=3411,ue=3412,ce=3413,de=3414,Y=3415,X=33901,Q=33902,V=3379,le=3386,ae=34921,j=36347,ee=36348,te=35661,pe=35660,we=34930,Se=36349,Re=34076,Pe=34024,je=7936,at=7937,nt=7938,tt=35724,Ve=34047,he=36063,se=34852,ne=3553,Ce=34067,Ze=34069,rt=33984,Je=6408,St=5126,kt=5121,Bt=36160,Vt=36053,Ar=36064,vr=16384,qr=function(it,Xt){var fr=1;Xt.ext_texture_filter_anisotropic&&(fr=it.getParameter(Ve));var oa=1,Ta=1;Xt.webgl_draw_buffers&&(oa=it.getParameter(se),Ta=it.getParameter(he));var ma=!!Xt.oes_texture_float;if(ma){var xa=it.createTexture();it.bindTexture(ne,xa),it.texImage2D(ne,0,Je,1,1,0,Je,St,null);var Ya=it.createFramebuffer();if(it.bindFramebuffer(Bt,Ya),it.framebufferTexture2D(Bt,Ar,ne,xa,0),it.bindTexture(ne,null),it.checkFramebufferStatus(Bt)!==Vt)ma=!1;else{it.viewport(0,0,1,1),it.clearColor(1,0,0,1),it.clear(vr);var bi=U.allocType(St,4);it.readPixels(0,0,1,1,Je,St,bi),it.getError()?ma=!1:(it.deleteFramebuffer(Ya),it.deleteTexture(xa),ma=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(Ze,0,Je,3,3,0,Je,kt,zi),U.freeType(zi),it.bindTexture(Ce,null),it.deleteTexture(gn),si=!it.getError()}return{colorBits:[it.getParameter(W),it.getParameter($),it.getParameter(ue),it.getParameter(ce)],depthBits:it.getParameter(de),stencilBits:it.getParameter(Y),subpixelBits:it.getParameter(B),extensions:Object.keys(Xt).filter(function(Ei){return!!Xt[Ei]}),maxAnisotropic:fr,maxDrawbuffers:oa,maxColorAttachments:Ta,pointSizeDims:it.getParameter(X),lineWidthDims:it.getParameter(Q),maxViewportDims:it.getParameter(le),maxCombinedTextureUnits:it.getParameter(te),maxCubeMapSize:it.getParameter(Re),maxRenderbufferSize:it.getParameter(Pe),maxTextureUnits:it.getParameter(we),maxTextureSize:it.getParameter(V),maxAttributes:it.getParameter(ae),maxVertexUniforms:it.getParameter(j),maxVertexTextureUnits:it.getParameter(pe),maxVaryingVectors:it.getParameter(ee),maxFragmentUniforms:it.getParameter(Se),glsl:it.getParameter(tt),renderer:it.getParameter(at),vendor:it.getParameter(je),version:it.getParameter(nt),readFloat:ma,npotTextureCube:si}},kr=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 Ur(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)||kr(it.data))}var _t=function(it){return Object.keys(it).map(function(Xt){return it[Xt]})},Fe={shape:st,flatten:Ke};function Ye(it,Xt,fr){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])||kr(Ha[0])){Ri=Ca(Ha);var xi=Wa(Ha,Ri,Va.dtype);Li(xi,Yi),U.freeType(xi)}}}else if(Ur(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 Ln=Array.isArray(Ha.data)?Va.dtype:Jt(Ha.data),Dn=U.allocType(Ln,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,fr.profile&&(Bi.stats=Va.stats),Bi.destroy=function(){zi(Va)},Bi}function Na(){_t(ma).forEach(function(ea){ea.buffer=it.createBuffer(),it.bindBuffer(ea.type,ea.buffer),it.bufferData(ea.type,ea.persistentData||ea.byteLength,ea.usage)})}return fr.profile&&(Xt.getTotalBufferSize=function(){var ea=0;return Object.keys(ma).forEach(function(Ma){ea+=ma[Ma].stats.size}),ea}),{create:Ei,createStream:bi,destroyStream:yi,clear:function(){_t(ma).forEach(zi),Ya.forEach(zi)},getBuffer:function(ea){return ea&&ea._buffer instanceof xa?ea._buffer:null},restore:Na,_initBuffer:gn}}var ca=0,Ba=0,$a=1,Za=1,ri=4,pi=4,Ia={points:ca,point:Ba,lines:$a,line:Za,triangles:ri,triangle:pi,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},rn=0,tn=1,cn=4,xt=5120,ut=5121,Or=5122,Cr=5123,wr=5124,Rr=5125,Nr=34963,Hr=35040,gt=35044;function Kt(it,Xt,fr,oa){var Ta={},ma=0,xa={uint8:ut,uint16:Cr};Xt.oes_element_index_uint&&(xa.uint32=Rr);function Ya(Na){this.id=ma++,Ta[this.id]=this,this.buffer=Na,this.primType=cn,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(fr.create(null,Nr,!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&&(!kr(ea)||Ur(ea)&&!kr(ea.data))&&(hn=Xt.oes_element_index_uint?Rr:Cr),fr._initBuffer(Na.buffer,ea,Ma,hn,3)}else it.bufferData(Nr,Va,Ma),Na.buffer.dtype=Li||ut,Na.buffer.usage=Ma,Na.buffer.dimension=3,Na.buffer.byteLength=Va;if(Li=Bi,!Bi){switch(Na.buffer.dtype){case ut:case xt:Li=ut;break;case Cr:case Or:Li=Cr;break;case Rr:case wr: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=cn;var Yi=Na.buffer.dimension;Yi===1&&(Ua=rn),Yi===2&&(Ua=tn),Yi===3&&(Ua=cn)}Na.primType=Ua}function zi(Na){oa.elementsCount--,delete Ta[Na.id],Na.buffer.destroy(),Na.buffer=null}function Ei(Na,ea){var Ma=fr.create(null,Nr,!0),Qa=new Ya(Ma._buffer);oa.elementsCount++;function di(Va){if(!Va)Ma(),Qa.primType=cn,Qa.vertCount=0,Qa.type=ut;else if(typeof Va=="number")Ma(Va),Qa.primType=cn,Qa.vertCount=Va|0,Qa.type=ut;else{var Bi=null,Li=gt,hn=-1,Ha=-1,Ua=0,Yi=0;Array.isArray(Va)||kr(Va)||Ur(Va)?Bi=Va:("data"in Va&&(Bi=Va.data),"usage"in Va&&(Li=qa[Va.usage]),"primitive"in Va&&(hn=Ia[Va.primitive]),"count"in Va&&(Ha=Va.count|0),"type"in Va&&(Yi=xa[Va.type]),"length"in Va?Ua=Va.length|0:(Ua=Ha,Yi===Cr||Yi===Or?Ua*=2:(Yi===Rr||Yi===wr)&&(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(Ta).forEach(zi)}}}var mr=new Float32Array(1),Ir=new Uint32Array(mr.buffer),va=5123;function Pa(it){for(var Xt=U.allocType(va,it.length),fr=0;fr>>31<<15,ma=(oa<<1>>>24)-127,xa=oa>>13&1023;if(ma<-24)Xt[fr]=Ta;else if(ma<-14){var Ya=-14-ma;Xt[fr]=Ta+(xa+1024>>Ya)}else ma>15?Xt[fr]=Ta+31744:Xt[fr]=Ta+(ma+15<<10)+xa}return Xt}function ga(it){return Array.isArray(it)||kr(it)}var la=34467,ba=3553,Ai=34067,ki=34069,Ki=6408,En=6406,Tn=6407,On=6409,kn=6410,ao=32854,Co=32855,bo=36194,zs=32819,Cn=32820,wo=33635,Zn=34042,go=6402,os=34041,ys=35904,jo=35906,Yn=36193,Gn=33776,Hn=33777,ss=33778,_s=33779,ps=35986,Ko=35987,Gi=34798,Pn=35840,qs=35841,bs=35842,lo=35843,Zo=36196,ws=5121,Hs=5123,il=5125,yn=5126,Po=10242,To=10243,Ws=10497,Ll=33071,uo=33648,Nl=10240,Ks=10241,Ts=9728,Ls=9729,Jo=9984,Es=9985,Ul=9986,lu=9987,Tc=33170,du=4352,Sf=4353,Uc=4354,Bs=34046,dc=3317,Wc=37440,uu=37441,Pl=37443,ic=37444,Ou=33984,nl=[Jo,Ul,Es,lu],vl=[0,On,kn,Tn,Ki],As={};As[On]=As[En]=As[go]=1,As[os]=As[kn]=2,As[Tn]=As[ys]=3,As[Ki]=As[jo]=4;function Xs(it){return"[object "+it+"]"}var nc=Xs("HTMLCanvasElement"),jl=Xs("OffscreenCanvas"),qu=Xs("CanvasRenderingContext2D"),fl=Xs("ImageBitmap"),xh=Xs("HTMLImageElement"),us=Xs("HTMLVideoElement"),bh=Object.keys(ot).concat([nc,jl,qu,fl,xh,us]),Ps=[];Ps[ws]=1,Ps[yn]=4,Ps[Yn]=2,Ps[Hs]=2,Ps[il]=4;var to=[];to[ao]=2,to[Co]=2,to[bo]=2,to[os]=4,to[Gn]=.5,to[Hn]=.5,to[ss]=1,to[_s]=1,to[ps]=.5,to[Ko]=1,to[Gi]=1,to[Pn]=.5,to[qs]=.25,to[bs]=.5,to[lo]=.25,to[Zo]=.5;function Xc(it){return Array.isArray(it)&&(it.length===0||typeof it[0]=="number")}function Vu(it){if(!Array.isArray(it))return!1;var Xt=it.length;return!(Xt===0||!ga(it[0]))}function ql(it){return Object.prototype.toString.call(it)}function Mf(it){return ql(it)===nc}function Ac(it){return ql(it)===jl}function nf(it){return ql(it)===qu}function Ql(it){return ql(it)===fl}function Jf(it){return ql(it)===xh}function Of(it){return ql(it)===us}function of(it){if(!it)return!1;var Xt=ql(it);return bh.indexOf(Xt)>=0?!0:Xc(it)||Vu(it)||Ur(it)}function jc(it){return ot[Object.prototype.toString.call(it)]|0}function Bf(it,Xt){var fr=Xt.length;switch(it.type){case ws:case Hs:case il:case yn:var oa=U.allocType(it.type,fr);oa.set(Xt),it.data=oa;break;case Yn:it.data=Pa(Xt);break;default:}}function Nf(it,Xt){return U.allocType(it.type===Yn?yn:it.type,Xt)}function Gu(it,Xt){it.type===Yn?(it.data=Pa(Xt),U.freeType(Xt)):it.data=Xt}function Ef(it,Xt,fr,oa,Ta,ma){for(var xa=it.width,Ya=it.height,bi=it.channels,yi=xa*Ya*bi,si=Nf(it,yi),gn=0,zi=0;zi=1;)Ya+=xa*bi*bi,bi/=2;return Ya}else return xa*fr*oa}function Zc(it,Xt,fr,oa,Ta,ma,xa){var Ya={"don't care":du,"dont care":du,nice:Uc,fast:Sf},bi={repeat:Ws,clamp:Ll,mirror:uo},yi={nearest:Ts,linear:Ls},si=v({mipmap:lu,"nearest mipmap nearest":Jo,"linear mipmap nearest":Es,"nearest mipmap linear":Ul,"linear mipmap linear":lu},yi),gn={none:0,browser:ic},zi={uint8:ws,rgba4:zs,rgb565:wo,"rgb5 a1":Cn},Ei={alpha:En,luminance:On,"luminance alpha":kn,rgb:Tn,rgba:Ki,rgba4:ao,"rgb5 a1":Co,rgb565:bo},Na={};Xt.ext_srgb&&(Ei.srgb=ys,Ei.srgba=jo),Xt.oes_texture_float&&(zi.float32=zi.float=yn),Xt.oes_texture_half_float&&(zi.float16=zi["half float"]=Yn),Xt.webgl_depth_texture&&(v(Ei,{depth:go,"depth stencil":os}),v(zi,{uint16:Hs,uint32:il,"depth stencil":Zn})),Xt.webgl_compressed_texture_s3tc&&v(Na,{"rgb s3tc dxt1":Gn,"rgba s3tc dxt1":Hn,"rgba s3tc dxt3":ss,"rgba s3tc dxt5":_s}),Xt.webgl_compressed_texture_atc&&v(Na,{"rgb atc":ps,"rgba atc explicit alpha":Ko,"rgba atc interpolated alpha":Gi}),Xt.webgl_compressed_texture_pvrtc&&v(Na,{"rgb pvrtc 4bppv1":Pn,"rgb pvrtc 2bppv1":qs,"rgba pvrtc 4bppv1":bs,"rgba pvrtc 2bppv1":lo}),Xt.webgl_compressed_texture_etc1&&(Na["rgb etc1"]=Zo);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);fr.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===On||vt===En||vt===On||vt===kn||vt===go||vt===os||Xt.ext_srgb&&(vt===ys||vt===jo)?ke[vt]=vt:vt===Co||Qe.indexOf("rgba")>=0?ke[vt]=Ki:ke[vt]=Tn,ke},{});function Ha(){this.internalformat=Ki,this.format=Ki,this.type=ws,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,br=ke.height,Br=ke.channels,pr=!1;"shape"in Qe?(qt=Qe.shape[0],br=Qe.shape[1],Qe.shape.length===3&&(Br=Qe.shape[2],pr=!0)):("radius"in Qe&&(qt=br=Qe.radius),"width"in Qe&&(qt=Qe.width),"height"in Qe&&(br=Qe.height),"channels"in Qe&&(Br=Qe.channels,pr=!0)),ke.width=qt|0,ke.height=br|0,ke.channels=Br|0;var mt=!1;if("format"in Qe){var Mt=Qe.format,Ft=ke.internalformat=Ei[Mt];ke.format=hn[Ft],Mt in zi&&("type"in Qe||(ke.type=zi[Mt])),Mt in Na&&(ke.compressed=!0),mt=!0}!pr&&mt?ke.channels=As[ke.format]:pr&&!mt&&ke.channels!==vl[ke.format]&&(ke.format=ke.internalformat=vl[ke.channels])}}function Ri(ke){it.pixelStorei(Wc,ke.flipY),it.pixelStorei(uu,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=Ta.viewportWidth,br=Ta.viewportHeight;ke.width=ke.width||qt-ke.xOffset,ke.height=ke.height||br-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(kr(vt))ke.channels=ke.channels||4,ke.data=vt,!("type"in Qe)&&ke.type===ws&&(ke.type=jc(vt));else if(Xc(vt))ke.channels=ke.channels||4,Bf(ke,vt),ke.alignment=1,ke.needsFree=!0;else if(Ur(vt)){var Br=vt.data;!Array.isArray(Br)&&ke.type===ws&&(ke.type=jc(Br));var pr=vt.shape,mt=vt.stride,Mt,Ft,rr,hr,sr,dr;pr.length===3?(rr=pr[2],dr=mt[2]):(rr=1,dr=1),Mt=pr[0],Ft=pr[1],hr=mt[0],sr=mt[1],ke.alignment=1,ke.width=Mt,ke.height=Ft,ke.channels=rr,ke.format=ke.internalformat=vl[rr],ke.needsFree=!0,Ef(ke,Br,hr,sr,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(Ql(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 lr=ke.width||vt[0].length,Wt=ke.height||vt.length,ir=ke.channels;ga(vt[0][0])?ir=ir||vt[0][0].length:ir=ir||1;for(var Gt=Fe.shape(vt),Dr=1,Jr=0;Jr>=br,vt.height>>=br,xi(vt,qt[br]),ke.mipmask|=1<=0&&!("faces"in Qe)&&(ke.genMipmaps=!0)}if("mag"in Qe){var qt=Qe.mag;ke.magFilter=yi[qt]}var br=ke.wrapS,Br=ke.wrapT;if("wrap"in Qe){var pr=Qe.wrap;typeof pr=="string"?br=Br=bi[pr]:Array.isArray(pr)&&(br=bi[pr[0]],Br=bi[pr[1]])}else{if("wrapS"in Qe){var mt=Qe.wrapS;br=bi[mt]}if("wrapT"in Qe){var Mt=Qe.wrapT;Br=bi[Mt]}}if(ke.wrapS=br,ke.wrapT=Br,"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=Jo)}}function El(ke,Qe){it.texParameteri(Qe,Ks,ke.minFilter),it.texParameteri(Qe,Nl,ke.magFilter),it.texParameteri(Qe,Po,ke.wrapS),it.texParameteri(Qe,To,ke.wrapT),Xt.ext_texture_filter_anisotropic&&it.texParameteri(Qe,Bs,ke.anisotropic),ke.genMipmaps&&(it.hint(Tc,ke.mipmapHint),it.generateMipmap(Qe))}var ru=0,js={},pl=fr.maxTextureUnits,bl=Array(pl).map(function(){return null});function Xn(ke){Ha.call(this),this.mipmask=0,this.internalformat=Ki,this.id=ru++,this.refCount=1,this.target=ke,this.texture=it.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new hs,xa.profile&&(this.stats={size:0})}function kl(ke){it.activeTexture(Ou),it.bindTexture(ke.target,ke.texture)}function Io(){var ke=bl[0];ke?it.bindTexture(ke.target,ke.texture):it.bindTexture(ba,null)}function ge(ke){var Qe=ke.texture,vt=ke.unit,qt=ke.target;vt>=0&&(it.activeTexture(Ou+vt),it.bindTexture(qt,null),bl[vt]=null),it.deleteTexture(Qe),ke.texture=null,ke.params=null,ke.pixels=null,ke.refCount=0,delete js[ke.id],ma.textureCount--}v(Xn.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}bl[vt]=ke,Qe=vt;break}Qe>=pl,xa.profile&&ma.maxTextureUnits>sr)-rr,dr.height=dr.height||(vt.height>>sr)-hr,kl(vt),vn(dr,ba,rr,hr,sr),Io(),nn(dr),qt}function Br(pr,mt){var Mt=pr|0,Ft=mt|0||Mt;if(Mt===vt.width&&Ft===vt.height)return qt;qt.width=vt.width=Mt,qt.height=vt.height=Ft,kl(vt);for(var rr=0;vt.mipmask>>rr;++rr){var hr=Mt>>rr,sr=Ft>>rr;if(!hr||!sr)break;it.texImage2D(ba,rr,vt.format,hr,sr,0,vt.format,vt.type,null)}return Io(),xa.profile&&(vt.stats.size=oc(vt.internalformat,vt.type,Mt,Ft,!1,!1)),qt}return qt(ke,Qe),qt.subimage=br,qt.resize=Br,qt._reglType="texture2d",qt._texture=vt,xa.profile&&(qt.stats=vt.stats),qt.destroy=function(){vt.decRef()},qt}function xe(ke,Qe,vt,qt,br,Br){var pr=new Xn(Ai);js[pr.id]=pr,ma.cubeCount++;var mt=new Array(6);function Mt(hr,sr,dr,lr,Wt,ir){var Gt,Dr=pr.texInfo;for(hs.call(Dr),Gt=0;Gt<6;++Gt)mt[Gt]=ho();if(typeof hr=="number"||!hr){var Jr=hr|0||1;for(Gt=0;Gt<6;++Gt)Dn(mt[Gt],Jr,Jr)}else if(typeof hr=="object")if(sr)Wn(mt[0],hr),Wn(mt[1],sr),Wn(mt[2],dr),Wn(mt[3],lr),Wn(mt[4],Wt),Wn(mt[5],ir);else if(Al(Dr,hr),Yi(pr,hr),"faces"in hr){var ya=hr.faces;for(Gt=0;Gt<6;++Gt)Ua(mt[Gt],pr),Wn(mt[Gt],ya[Gt])}else for(Gt=0;Gt<6;++Gt)Wn(mt[Gt],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,Mt.width=mt[0].width,Mt.height=mt[0].height,kl(pr),Gt=0;Gt<6;++Gt)Os(mt[Gt],ki+Gt);for(El(Dr,Ai),Io(),xa.profile&&(pr.stats.size=oc(pr.internalformat,pr.type,Mt.width,Mt.height,Dr.genMipmaps,!0)),Mt.format=Qa[pr.internalformat],Mt.type=di[pr.type],Mt.mag=Va[Dr.magFilter],Mt.min=Bi[Dr.minFilter],Mt.wrapS=Li[Dr.wrapS],Mt.wrapT=Li[Dr.wrapT],Gt=0;Gt<6;++Gt)Xl(mt[Gt]);return Mt}function Ft(hr,sr,dr,lr,Wt){var ir=dr|0,Gt=lr|0,Dr=Wt|0,Jr=Ii();return Ua(Jr,pr),Jr.width=0,Jr.height=0,xi(Jr,sr),Jr.width=Jr.width||(pr.width>>Dr)-ir,Jr.height=Jr.height||(pr.height>>Dr)-Gt,kl(pr),vn(Jr,ki+hr,ir,Gt,Dr),Io(),nn(Jr),Mt}function rr(hr){var sr=hr|0;if(sr!==pr.width){Mt.width=pr.width=sr,Mt.height=pr.height=sr,kl(pr);for(var dr=0;dr<6;++dr)for(var lr=0;pr.mipmask>>lr;++lr)it.texImage2D(ki+dr,lr,pr.format,sr>>lr,sr>>lr,0,pr.format,pr.type,null);return Io(),xa.profile&&(pr.stats.size=oc(pr.internalformat,pr.type,Mt.width,Mt.height,!1,!0)),Mt}}return Mt(ke,Qe,vt,qt,br,Br),Mt.subimage=Ft,Mt.resize=rr,Mt._reglType="textureCube",Mt._texture=pr,xa.profile&&(Mt.stats=pr.stats),Mt.destroy=function(){pr.decRef()},Mt}function re(){for(var ke=0;ke>qt,vt.height>>qt,0,vt.internalformat,vt.type,null);else for(var br=0;br<6;++br)it.texImage2D(ki+br,qt,vt.internalformat,vt.width>>qt,vt.height>>qt,0,vt.internalformat,vt.type,null);El(vt.texInfo,vt.target)})}function Ue(){for(var ke=0;ke=0?Xl=!0:bi.indexOf(hs)>=0&&(Xl=!1))),("depthTexture"in Xn||"depthStencilTexture"in Xn)&&(bl=!!(Xn.depthTexture||Xn.depthStencilTexture)),"depth"in Xn&&(typeof Xn.depth=="boolean"?Os=Xn.depth:(ru=Xn.depth,xl=!1)),"stencil"in Xn&&(typeof Xn.stencil=="boolean"?xl=Xn.stencil:(js=Xn.stencil,Os=!1)),"depthStencil"in Xn&&(typeof Xn.depthStencil=="boolean"?Os=xl=Xn.depthStencil:(pl=Xn.depthStencil,Os=!1,xl=!1))}var Io=null,ge=null,K=null,xe=null;if(Array.isArray(ho))Io=ho.map(Na);else if(ho)Io=[Na(ho)];else for(Io=new Array(El),Ln=0;Ln0&&(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 v(Xi,{width:Ln,height:Ln,color:hs})}function vn(Rn){var Ii,nn=Rn|0;if(nn===Xi.width)return Xi;var Ln=Xi.color;for(Ii=0;Ii=Ln.byteLength?Dn.subdata(Ln):(Dn.destroy(),Ua.buffers[Rn]=null)),Ua.buffers[Rn]||(Dn=Ua.buffers[Rn]=Ta.create(Ii,mf,!1,!0)),nn.buffer=Ta.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 Ta.getBuffer(Ii)?(nn.buffer=Ta.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):Ta.getBuffer(Ii.buffer)?(nn.buffer=Ta.getBuffer(Ii.buffer),nn.size=(+Ii.size||nn.buffer.dimension)|0,nn.normalized=!!Ii.normalized||!1,"type"in Ii?nn.type=_a[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 Wn=0;Wn1)for(var Ri=0;Riea&&(ea=Ma.stats.uniformsCount)}),ea},fr.getMaxAttributesCount=function(){var ea=0;return si.forEach(function(Ma){Ma.stats.attributesCount>ea&&(ea=Ma.stats.attributesCount)}),ea});function Na(){Ta={},ma={};for(var ea=0;ea16&&(fr=Pi(fr,it.length*8));for(var oa=Array(16),Ta=Array(16),ma=0;ma<16;ma++)oa[ma]=fr[ma]^909522486,Ta[ma]=fr[ma]^1549556828;var xa=Pi(oa.concat(Pc(Xt)),512+Xt.length*8);return Qt(Pi(Ta.concat(xa),768))}function xu(it){for(var Xt=Vf?"0123456789ABCDEF":"0123456789abcdef",fr="",oa,Ta=0;Ta>>4&15)+Xt.charAt(oa&15);return fr}function Lc(it){for(var Xt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",fr="",oa=it.length,Ta=0;Tait.length*8?fr+=Xu:fr+=Xt.charAt(ma>>>6*(3-xa)&63);return fr}function $c(it,Xt){var fr=Xt.length,oa=Array(),Ta,ma,xa,Ya,bi=Array(Math.ceil(it.length/2));for(Ta=0;Ta0;){for(Ya=Array(),xa=0,Ta=0;Ta0||ma>0)&&(Ya[Ya.length]=ma);oa[oa.length]=xa,bi=Ya}var yi="";for(Ta=oa.length-1;Ta>=0;Ta--)yi+=Xt.charAt(oa[Ta]);var si=Math.ceil(it.length*8/(Math.log(Xt.length)/Math.log(2)));for(Ta=yi.length;Ta>>6&31,128|oa&63):oa<=65535?Xt+=String.fromCharCode(224|oa>>>12&15,128|oa>>>6&63,128|oa&63):oa<=2097151&&(Xt+=String.fromCharCode(240|oa>>>18&7,128|oa>>>12&63,128|oa>>>6&63,128|oa&63));return Xt}function Pc(it){for(var Xt=Array(it.length>>2),fr=0;fr>5]|=(it.charCodeAt(fr/8)&255)<<24-fr%32;return Xt}function Qt(it){for(var Xt="",fr=0;fr>5]>>>24-fr%32&255);return Xt}function xr(it,Xt){return it>>>Xt|it<<32-Xt}function aa(it,Xt){return it>>>Xt}function $r(it,Xt,fr){return it&Xt^~it&fr}function ka(it,Xt,fr){return it&Xt^it&fr^Xt&fr}function li(it){return xr(it,2)^xr(it,13)^xr(it,22)}function Ci(it){return xr(it,6)^xr(it,11)^xr(it,25)}function Hi(it){return xr(it,7)^xr(it,18)^aa(it,3)}function Qi(it){return xr(it,17)^xr(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,Xt){var fr=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),oa=new Array(64),Ta,ma,xa,Ya,bi,yi,si,gn,zi,Ei,Na,ea;for(it[Xt>>5]|=128<<24-Xt%32,it[(Xt+64>>9<<4)+15]=Xt,zi=0;zi>16)+(Xt>>16)+(fr>>16);return oa<<16|fr&65535}function Ni(it){return Array.prototype.slice.call(it)}function mi(it){return Ni(it).join("")}function Mn(it){var Xt=it&&it.cache,fr=0,oa=[],Ta=[],ma=[];function xa(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 v(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 v(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 v(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)||kr(it)||Ur(it)}function ni(it){return it.sort(function(Xt,fr){return Xt===Me?-1:fr===Me?1:Xt=1,oa>=2,Xt)}else if(fr===ks){var Ta=it.data;return new La(Ta.thisDep,Ta.contextDep,Ta.propDep,Xt)}else{if(fr===rl)return new La(!1,!1,!1,Xt);if(fr===Ns){for(var ma=!1,xa=!1,Ya=!1,bi=0;bi=1&&(xa=!0),si>=2&&(Ya=!0)}else yi.type===ks&&(ma=ma||yi.data.thisDep,xa=xa||yi.data.contextDep,Ya=Ya||yi.data.propDep)}return new La(ma,xa,Ya,Xt)}else return new La(fr===Qo,fr===yo,fr===un,Xt)}}var In=new La(!1,!1,!1,function(){});function Jn(it,Xt,fr,oa,Ta,ma,xa,Ya,bi,yi,si,gn,zi,Ei,Na,ea){var Ma=yi.Record,Qa={add:32774,subtract:32778,"reverse subtract":32779};fr.ext_blend_minmax&&(Qa.min=yt,Qa.max=Tt);var di=fr.angle_instanced_arrays,Va=fr.webgl_draw_buffers,Bi=fr.oes_vertex_array_object,Li={dirty:!0,profile:ea.profile},hn={},Ha=[],Ua={},Yi={};function Ri(mt){return mt.replace(".","_")}function Ti(mt,Mt,Ft){var rr=Ri(mt);Ha.push(mt),hn[rr]=Li[rr]=!!Ft,Ua[rr]=Mt}function xi(mt,Mt,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]=Mt}function Xi(mt){return!!isNaN(mt)}Ti(el,ci),Ti(Ss,Da),xi(Fl,"blendColor",[0,0,0,0]),xi(yl,"blendEquationSeparate",[Xr,Xr]),xi(ll,"blendFuncSeparate",[Gr,_r,Gr,_r]),Ti(Un,ji,!0),xi(Ro,"depthFunc",wa),xi(Js,"depthRange",[0,1]),xi(Fs,"depthMask",!0),xi(cu,cu,[!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,Kn),Ti(fo,Bn),xi(Fo,"sampleCoverage",[1,!1]),Ti(Dc,Vi),xi(lc,"stencilMask",-1),xi(Yu,"stencilFunc",[tr,0,-1]),xi(Oe,"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:Xt,next:hn,current:Li,draw:gn,elements:ma,buffer:Ta,shader:si,attributes:yi.state,vao:yi,uniforms:bi,framebuffer:Ya,extensions:fr,timer:Ei,isBufferArgs:fi},Rn={primTypes:Ia,compareFuncs:Sa,blendFuncs:ti,blendEquations:Qa,stencilOps:za,glTypes:_a,orientationType:Xa};Va&&(Rn.backBuffer=[De],Rn.drawBuffer=d(oa.maxDrawbuffers,function(mt){return mt===0?[0]:d(mt,function(Mt){return Ja+Mt})}));var Ii=0;function nn(){var mt=Sn({cache:Na}),Mt=mt.link,Ft=mt.global;mt.id=Ii++,mt.batchId="0";var rr=Mt(vn),hr=mt.shared={props:"a0"};Object.keys(vn).forEach(function(ir){hr[ir]=Ft.def(rr,".",ir)});var sr=mt.next={},dr=mt.current={};Object.keys(Yi).forEach(function(ir){Array.isArray(Li[ir])&&(sr[ir]=Ft.def(hr.next,".",ir),dr[ir]=Ft.def(hr.current,".",ir))});var lr=mt.constants={};Object.keys(Rn).forEach(function(ir){lr[ir]=Ft.def(JSON.stringify(Rn[ir]))}),mt.invoke=function(ir,Gt){switch(Gt.type){case Tn:var Dr=["this",hr.context,hr.props,mt.batchId];return ir.def(Mt(Gt.data),".call(",Dr.slice(0,Math.max(Gt.data.length+1,4)),")");case un:return ir.def(hr.props,Gt.data);case yo:return ir.def(hr.context,Gt.data);case Qo:return ir.def("this",Gt.data);case ks:return Gt.data.append(mt,ir),Gt.data.ref;case rl:return Gt.data.toString();case Ns:return Gt.data.map(function(Jr){return mt.invoke(ir,Jr)})}},mt.attribCache={};var Wt={};return mt.scopeAttrib=function(ir){var Gt=Xt.id(ir);if(Gt in Wt)return Wt[Gt];var Dr=yi.scope[Gt];Dr||(Dr=yi.scope[Gt]=new Ma);var Jr=Wt[Gt]=Mt(Dr);return Jr},mt}function Cn(mt){var Mt=mt.static,Ft=mt.dynamic,rr;if(ze in Mt){var hr=!!Mt[ze];rr=an(function(dr,lr){return hr}),rr.enable=hr}else if(ze in Ft){var sr=Ft[ze];rr=dn(sr,function(dr,lr){return dr.invoke(lr,sr)})}return rr}function Dn(mt,Mt){var Ft=mt.static,rr=mt.dynamic;if(ht in Ft){var hr=Ft[ht];return hr?(hr=Ya.getFramebuffer(hr),an(function(dr,lr){var Wt=dr.link(hr),ir=dr.shared;lr.set(ir.framebuffer,".next",Wt);var Gt=ir.context;return lr.set(Gt,"."+pt,Wt+".width"),lr.set(Gt,"."+Et,Wt+".height"),Wt})):an(function(dr,lr){var Wt=dr.shared;lr.set(Wt.framebuffer,".next","null");var ir=Wt.context;return lr.set(ir,"."+pt,ir+"."+yr),lr.set(ir,"."+Et,ir+"."+Er),"null"})}else if(ht in rr){var sr=rr[ht];return dn(sr,function(dr,lr){var Wt=dr.invoke(lr,sr),ir=dr.shared,Gt=ir.framebuffer,Dr=lr.def(Gt,".getFramebuffer(",Wt,")");lr.set(Gt,".next",Dr);var Jr=ir.context;return lr.set(Jr,"."+pt,Dr+"?"+Dr+".width:"+Jr+"."+yr),lr.set(Jr,"."+Et,Dr+"?"+Dr+".height:"+Jr+"."+Er),Dr})}else return null}function Wn(mt,Mt,Ft){var rr=mt.static,hr=mt.dynamic;function sr(Wt){if(Wt in rr){var ir=rr[Wt],Gt=!0,Dr=ir.x|0,Jr=ir.y|0,ya,vi;return"width"in ir?ya=ir.width|0:Gt=!1,"height"in ir?vi=ir.height|0:Gt=!1,new La(!Gt&&Mt&&Mt.thisDep,!Gt&&Mt&&Mt.contextDep,!Gt&&Mt&&Mt.propDep,function(Zi,Fi){var ui=Zi.shared.context,_i=ya;"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"),fn=Fi.def('"width" in ',ui,"?",ui,".width|0:","(",_i,".",pt,"-",Si,")"),_o=Fi.def('"height" in ',ui,"?",ui,".height|0:","(",_i,".",Et,"-",Ui,")");return[Si,Ui,fn,_o]});return Mt&&(ai.thisDep=ai.thisDep||Mt.thisDep,ai.contextDep=ai.contextDep||Mt.contextDep,ai.propDep=ai.propDep||Mt.propDep),ai}else return Mt?new La(Mt.thisDep,Mt.contextDep,Mt.propDep,function(Zi,Fi){var ui=Zi.shared.context;return[0,0,Fi.def(ui,".",pt),Fi.def(ui,".",Et)]}):null}var dr=sr(Me);if(dr){var lr=dr;dr=new La(dr.thisDep,dr.contextDep,dr.propDep,function(Wt,ir){var Gt=lr.append(Wt,ir),Dr=Wt.shared.context;return ir.set(Dr,"."+bt,Gt[2]),ir.set(Dr,"."+Dt,Gt[3]),Gt})}return{viewport:dr,scissor_box:sr(Te)}}function Os(mt,Mt){var Ft=mt.static,rr=typeof Ft[Ot]=="string"&&typeof Ft[wt]=="string";if(rr){if(Object.keys(Mt.dynamic).length>0)return null;var hr=Mt.static,sr=Object.keys(hr);if(sr.length>0&&typeof hr[sr[0]]=="number"){for(var dr=[],lr=0;lr"+Si+"?"+Gt+".constant["+Si+"]:0;"}).join(""),"}}else{","if(",ya,"(",Gt,".buffer)){",Zi,"=",vi,".createStream(",Qr,",",Gt,".buffer);","}else{",Zi,"=",vi,".getBuffer(",Gt,".buffer);","}",Fi,'="type" in ',Gt,"?",Jr.glTypes,"[",Gt,".type]:",Zi,".dtype;",Ga.normalized,"=!!",Gt,".normalized;");function ui(_i){ir(Ga[_i],"=",Gt,".",_i,"|0;")}return ui("size"),ui("offset"),ui("stride"),ui("divisor"),ir("}}"),ir.exit("if(",Ga.isStream,"){",vi,".destroyStream(",Zi,");","}"),Ga}hr[sr]=dn(dr,lr)}),hr}function El(mt){var Mt=mt.static,Ft=mt.dynamic,rr={};return Object.keys(Mt).forEach(function(hr){var sr=Mt[hr];rr[hr]=an(function(dr,lr){return typeof sr=="number"||typeof sr=="boolean"?""+sr:dr.link(sr)})}),Object.keys(Ft).forEach(function(hr){var sr=Ft[hr];rr[hr]=dn(sr,function(dr,lr){return dr.invoke(lr,sr)})}),rr}function ru(mt,Mt,Ft,rr,hr){var sr=mt.static,dr=mt.dynamic,lr=Os(mt,Mt),Wt=Dn(mt,hr),ir=Wn(mt,Wt,hr),Gt=ho(mt,hr),Dr=Xl(mt,hr),Jr=xl(mt,hr,lr);function ya(ui){var _i=ir[ui];_i&&(Dr[ui]=_i)}ya(Me),ya(Ri(Te));var vi=Object.keys(Dr).length>0,Ga={framebuffer:Wt,draw:Gt,shader:Jr,state:Dr,dirty:vi,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(Ga.profile=Cn(mt,hr),Ga.uniforms=hs(Ft,hr),Ga.drawVAO=Ga.scopeVAO=Gt.vao,!Ga.drawVAO&&Jr.program&&!lr&&fr.angle_instanced_arrays&&Gt.static.elements){var ai=!0,Zi=Jr.program.attributes.map(function(ui){var _i=Mt.static[ui];return ai=ai&&!!_i,_i});if(ai&&Zi.length>0){var Fi=yi.getVAO(yi.createVAO({attributes:Zi,elements:Gt.static.elements}));Ga.drawVAO=new La(null,null,null,function(ui,_i){return ui.link(Fi)}),Ga.useVAO=!0}}return lr?Ga.useVAO=!0:Ga.attributes=Al(Mt,hr),Ga.context=El(rr,hr),Ga}function js(mt,Mt,Ft){var rr=mt.shared,hr=rr.context,sr=mt.scope();Object.keys(Ft).forEach(function(dr){Mt.save(hr,"."+dr);var lr=Ft[dr],Wt=lr.append(mt,Mt);Array.isArray(Wt)?sr(hr,".",dr,"=[",Wt.join(),"];"):sr(hr,".",dr,"=",Wt,";")}),Mt(sr)}function pl(mt,Mt,Ft,rr){var hr=mt.shared,sr=hr.gl,dr=hr.framebuffer,lr;Va&&(lr=Mt.def(hr.extensions,".webgl_draw_buffers"));var Wt=mt.constants,ir=Wt.drawBuffer,Gt=Wt.backBuffer,Dr;Ft?Dr=Ft.append(mt,Mt):Dr=Mt.def(dr,".next"),rr||Mt("if(",Dr,"!==",dr,".cur){"),Mt("if(",Dr,"){",sr,".bindFramebuffer(",pa,",",Dr,".framebuffer);"),Va&&Mt(lr,".drawBuffersWEBGL(",ir,"[",Dr,".colorAttachments.length]);"),Mt("}else{",sr,".bindFramebuffer(",pa,",null);"),Va&&Mt(lr,".drawBuffersWEBGL(",Gt,");"),Mt("}",dr,".cur=",Dr,";"),rr||Mt("}")}function bl(mt,Mt,Ft){var rr=mt.shared,hr=rr.gl,sr=mt.current,dr=mt.next,lr=rr.current,Wt=rr.next,ir=mt.cond(lr,".dirty");Ha.forEach(function(Gt){var Dr=Ri(Gt);if(!(Dr in Ft.state)){var Jr,ya;if(Dr in dr){Jr=dr[Dr],ya=sr[Dr];var vi=d(Li[Dr].length,function(ai){return ir.def(Jr,"[",ai,"]")});ir(mt.cond(vi.map(function(ai,Zi){return ai+"!=="+ya+"["+Zi+"]"}).join("||")).then(hr,".",Yi[Dr],"(",vi,");",vi.map(function(ai,Zi){return ya+"["+Zi+"]="+ai}).join(";"),";"))}else{Jr=ir.def(Wt,".",Dr);var Ga=mt.cond(Jr,"!==",lr,".",Dr);ir(Ga),Dr in Ua?Ga(mt.cond(Jr).then(hr,".enable(",Ua[Dr],");").else(hr,".disable(",Ua[Dr],");"),lr,".",Dr,"=",Jr,";"):Ga(hr,".",Yi[Dr],"(",Jr,");",lr,".",Dr,"=",Jr,";")}}}),Object.keys(Ft.state).length===0&&ir(lr,".dirty=false;"),Mt(ir)}function Xn(mt,Mt,Ft,rr){var hr=mt.shared,sr=mt.current,dr=hr.current,lr=hr.gl,Wt;ni(Object.keys(Ft)).forEach(function(ir){var Gt=Ft[ir];if(!(rr&&!rr(Gt))){var Dr=Gt.append(mt,Mt);if(Ua[ir]){var Jr=Ua[ir];sn(Gt)?(Wt=mt.link(Dr,{stable:!0}),Mt(mt.cond(Wt).then(lr,".enable(",Jr,");").else(lr,".disable(",Jr,");")),Mt(dr,".",ir,"=",Wt,";")):(Mt(mt.cond(Dr).then(lr,".enable(",Jr,");").else(lr,".disable(",Jr,");")),Mt(dr,".",ir,"=",Dr,";"))}else if(ga(Dr)){var ya=sr[ir];Mt(lr,".",Yi[ir],"(",Dr,");",Dr.map(function(vi,Ga){return ya+"["+Ga+"]="+vi}).join(";"),";")}else sn(Gt)?(Wt=mt.link(Dr,{stable:!0}),Mt(lr,".",Yi[ir],"(",Wt,");",dr,".",ir,"=",Wt,";")):Mt(lr,".",Yi[ir],"(",Dr,");",dr,".",ir,"=",Dr,";")}})}function kl(mt,Mt){di&&(mt.instancing=Mt.def(mt.shared.extensions,".angle_instanced_arrays"))}function Io(mt,Mt,Ft,rr,hr){var sr=mt.shared,dr=mt.stats,lr=sr.current,Wt=sr.timer,ir=Ft.profile;function Gt(){return typeof performance>"u"?"Date.now()":"performance.now()"}var Dr,Jr;function ya(ui){Dr=Mt.def(),ui(Dr,"=",Gt(),";"),typeof hr=="string"?ui(dr,".count+=",hr,";"):ui(dr,".count++;"),Ei&&(rr?(Jr=Mt.def(),ui(Jr,"=",Wt,".getNumPendingQueries();")):ui(Wt,".beginQuery(",dr,");"))}function vi(ui){ui(dr,".cpuTime+=",Gt(),"-",Dr,";"),Ei&&(rr?ui(Wt,".pushScopeStats(",Jr,",",Wt,".getNumPendingQueries(),",dr,");"):ui(Wt,".endQuery();"))}function Ga(ui){var _i=Mt.def(lr,".profile");Mt(lr,".profile=",ui,";"),Mt.exit(lr,".profile=",_i,";")}var ai;if(ir){if(sn(ir)){ir.enable?(ya(Mt),vi(Mt.exit),Ga("true")):Ga("false");return}ai=ir.append(mt,Mt),Ga(ai)}else ai=Mt.def(lr,".profile");var Zi=mt.block();ya(Zi),Mt("if(",ai,"){",Zi,"}");var Fi=mt.block();vi(Fi),Mt.exit("if(",ai,"){",Fi,"}")}function ge(mt,Mt,Ft,rr,hr){var sr=mt.shared;function dr(Wt){switch(Wt){case ls:case ul:case Il:return 2;case Mo:case tl:case tu:return 3;case Yo:case es:case Ru:return 4;default:return 1}}function lr(Wt,ir,Gt){var Dr=sr.gl,Jr=Mt.def(Wt,".location"),ya=Mt.def(sr.attributes,"[",Jr,"]"),vi=Gt.state,Ga=Gt.buffer,ai=[Gt.x,Gt.y,Gt.z,Gt.w],Zi=["buffer","normalized","offset","stride"];function Fi(){Mt("if(!",ya,".buffer){",Dr,".enableVertexAttribArray(",Jr,");}");var _i=Gt.type,Si;if(Gt.size?Si=Mt.def(Gt.size,"||",ir):Si=ir,Mt("if(",ya,".type!==",_i,"||",ya,".size!==",Si,"||",Zi.map(function(fn){return ya+"."+fn+"!=="+Gt[fn]}).join("||"),"){",Dr,".bindBuffer(",Qr,",",Ga,".buffer);",Dr,".vertexAttribPointer(",[Jr,Si,_i,Gt.normalized,Gt.stride,Gt.offset],");",ya,".type=",_i,";",ya,".size=",Si,";",Zi.map(function(fn){return ya+"."+fn+"="+Gt[fn]+";"}).join(""),"}"),di){var Ui=Gt.divisor;Mt("if(",ya,".divisor!==",Ui,"){",mt.instancing,".vertexAttribDivisorANGLE(",[Jr,Ui],");",ya,".divisor=",Ui,";}")}}function ui(){Mt("if(",ya,".buffer){",Dr,".disableVertexAttribArray(",Jr,");",ya,".buffer=null;","}if(",Qn.map(function(_i,Si){return ya+"."+_i+"!=="+ai[Si]}).join("||"),"){",Dr,".vertexAttrib4f(",Jr,",",ai,");",Qn.map(function(_i,Si){return ya+"."+_i+"="+ai[Si]+";"}).join(""),"}")}vi===eo?Fi():vi===co?ui():(Mt("if(",vi,"===",eo,"){"),Fi(),Mt("}else{"),ui(),Mt("}"))}rr.forEach(function(Wt){var ir=Wt.name,Gt=Ft.attributes[ir],Dr;if(Gt){if(!hr(Gt))return;Dr=Gt.append(mt,Mt)}else{if(!hr(In))return;var Jr=mt.scopeAttrib(ir);Dr={},Object.keys(new Ma).forEach(function(ya){Dr[ya]=Mt.def(Jr,".",ya)})}lr(mt.link(Wt),dr(Wt.info.type),Dr)})}function K(mt,Mt,Ft,rr,hr,sr){for(var dr=mt.shared,lr=dr.gl,Wt,ir=0;ir1){for(var Uo=[],Ds=[],Oo=0;Oo>1)",Ga],");")}function Ui(){Ft(ai,".drawArraysInstancedANGLE(",[Jr,ya,vi,Ga],");")}Gt&&Gt!=="null"?Fi?Si():(Ft("if(",Gt,"){"),Si(),Ft("}else{"),Ui(),Ft("}")):Ui()}function _i(){function Si(){Ft(sr+".drawElements("+[Jr,vi,Zi,ya+"<<(("+Zi+"-"+io+")>>1)"]+");")}function Ui(){Ft(sr+".drawArrays("+[Jr,ya,vi]+");")}Gt&&Gt!=="null"?Fi?Si():(Ft("if(",Gt,"){"),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 re(mt,Mt,Ft,rr,hr){var sr=nn(),dr=sr.proc("body",hr);return di&&(sr.instancing=dr.def(sr.shared.extensions,".angle_instanced_arrays")),mt(sr,dr,Ft,rr),sr.compile().body}function ye(mt,Mt,Ft,rr){kl(mt,Mt),Ft.useVAO?Ft.drawVAO?Mt(mt.shared.vao,".setVAO(",Ft.drawVAO.append(mt,Mt),");"):Mt(mt.shared.vao,".setVAO(",mt.shared.vao,".targetVAO);"):(Mt(mt.shared.vao,".setVAO(null);"),ge(mt,Mt,Ft,rr.attributes,function(){return!0})),K(mt,Mt,Ft,rr.uniforms,function(){return!0},!1),xe(mt,Mt,Mt,Ft)}function Ue(mt,Mt){var Ft=mt.proc("draw",1);kl(mt,Ft),js(mt,Ft,Mt.context),pl(mt,Ft,Mt.framebuffer),bl(mt,Ft,Mt),Xn(mt,Ft,Mt.state),Io(mt,Ft,Mt,!1,!0);var rr=Mt.shader.progVar.append(mt,Ft);if(Ft(mt.shared.gl,".useProgram(",rr,".program);"),Mt.shader.program)ye(mt,Ft,Mt,Mt.shader.program);else{Ft(mt.shared.vao,".setVAO(null);");var hr=mt.global.def("{}"),sr=Ft.def(rr,".id"),dr=Ft.def(hr,"[",sr,"]");Ft(mt.cond(dr).then(dr,".call(this,a0);").else(dr,"=",hr,"[",sr,"]=",mt.link(function(lr){return re(ye,mt,Mt,lr,1)}),"(",rr,");",dr,".call(this,a0);"))}Object.keys(Mt.state).length>0&&Ft(mt.shared.current,".dirty=true;"),mt.shared.vao&&Ft(mt.shared.vao,".setVAO(null);")}function ke(mt,Mt,Ft,rr){mt.batchId="a1",kl(mt,Mt);function hr(){return!0}ge(mt,Mt,Ft,rr.attributes,hr),K(mt,Mt,Ft,rr.uniforms,hr,!1),xe(mt,Mt,Mt,Ft)}function Qe(mt,Mt,Ft,rr){kl(mt,Mt);var hr=Ft.contextDep,sr=Mt.def(),dr="a0",lr="a1",Wt=Mt.def();mt.shared.props=Wt,mt.batchId=sr;var ir=mt.scope(),Gt=mt.scope();Mt(ir.entry,"for(",sr,"=0;",sr,"<",lr,";++",sr,"){",Wt,"=",dr,"[",sr,"];",Gt,"}",ir.exit);function Dr(Zi){return Zi.contextDep&&hr||Zi.propDep}function Jr(Zi){return!Dr(Zi)}if(Ft.needsContext&&js(mt,Gt,Ft.context),Ft.needsFramebuffer&&pl(mt,Gt,Ft.framebuffer),Xn(mt,Gt,Ft.state,Dr),Ft.profile&&Dr(Ft.profile)&&Io(mt,Gt,Ft,!1,!0),rr)Ft.useVAO?Ft.drawVAO?Dr(Ft.drawVAO)?Gt(mt.shared.vao,".setVAO(",Ft.drawVAO.append(mt,Gt),");"):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,Gt,Ft,rr.attributes,Dr)),K(mt,ir,Ft,rr.uniforms,Jr,!1),K(mt,Gt,Ft,rr.uniforms,Dr,!0),xe(mt,ir,Gt,Ft);else{var ya=mt.global.def("{}"),vi=Ft.shader.progVar.append(mt,Gt),Ga=Gt.def(vi,".id"),ai=Gt.def(ya,"[",Ga,"]");Gt(mt.shared.gl,".useProgram(",vi,".program);","if(!",ai,"){",ai,"=",ya,"[",Ga,"]=",mt.link(function(Zi){return re(ke,mt,Ft,Zi,2)}),"(",vi,");}",ai,".call(this,a0[",sr,"],",sr,");")}}function vt(mt,Mt){var Ft=mt.proc("batch",2);mt.batchId="0",kl(mt,Ft);var rr=!1,hr=!0;Object.keys(Mt.context).forEach(function(ya){rr=rr||Mt.context[ya].propDep}),rr||(js(mt,Ft,Mt.context),hr=!1);var sr=Mt.framebuffer,dr=!1;sr?(sr.propDep?rr=dr=!0:sr.contextDep&&rr&&(dr=!0),dr||pl(mt,Ft,sr)):pl(mt,Ft,null),Mt.state.viewport&&Mt.state.viewport.propDep&&(rr=!0);function lr(ya){return ya.contextDep&&rr||ya.propDep}bl(mt,Ft,Mt),Xn(mt,Ft,Mt.state,function(ya){return!lr(ya)}),(!Mt.profile||!lr(Mt.profile))&&Io(mt,Ft,Mt,!1,"a1"),Mt.contextDep=rr,Mt.needsContext=hr,Mt.needsFramebuffer=dr;var Wt=Mt.shader.progVar;if(Wt.contextDep&&rr||Wt.propDep)Qe(mt,Ft,Mt,null);else{var ir=Wt.append(mt,Ft);if(Ft(mt.shared.gl,".useProgram(",ir,".program);"),Mt.shader.program)Qe(mt,Ft,Mt,Mt.shader.program);else{Ft(mt.shared.vao,".setVAO(null);");var Gt=mt.global.def("{}"),Dr=Ft.def(ir,".id"),Jr=Ft.def(Gt,"[",Dr,"]");Ft(mt.cond(Jr).then(Jr,".call(this,a0,a1);").else(Jr,"=",Gt,"[",Dr,"]=",mt.link(function(ya){return re(Qe,mt,Mt,ya,2)}),"(",ir,");",Jr,".call(this,a0,a1);"))}}Object.keys(Mt.state).length>0&&Ft(mt.shared.current,".dirty=true;"),mt.shared.vao&&Ft(mt.shared.vao,".setVAO(null);")}function qt(mt,Mt){var Ft=mt.proc("scope",3);mt.batchId="a2";var rr=mt.shared,hr=rr.current;if(js(mt,Ft,Mt.context),Mt.framebuffer&&Mt.framebuffer.append(mt,Ft),ni(Object.keys(Mt.state)).forEach(function(lr){var Wt=Mt.state[lr],ir=Wt.append(mt,Ft);ga(ir)?ir.forEach(function(Gt,Dr){Xi(Gt)?Ft.set(mt.next[lr],"["+Dr+"]",Gt):Ft.set(mt.next[lr],"["+Dr+"]",mt.link(Gt,{stable:!0}))}):sn(Wt)?Ft.set(rr.next,"."+lr,mt.link(ir,{stable:!0})):Ft.set(rr.next,"."+lr,ir)}),Io(mt,Ft,Mt,!0,!0),[$t,Kr,Sr,na,Tr].forEach(function(lr){var Wt=Mt.draw[lr];if(Wt){var ir=Wt.append(mt,Ft);Xi(ir)?Ft.set(rr.draw,"."+lr,ir):Ft.set(rr.draw,"."+lr,mt.link(ir),{stable:!0})}}),Object.keys(Mt.uniforms).forEach(function(lr){var Wt=Mt.uniforms[lr].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(Xt.id(lr),{stable:!0})+"]",Wt)}),Object.keys(Mt.attributes).forEach(function(lr){var Wt=Mt.attributes[lr].append(mt,Ft),ir=mt.scopeAttrib(lr);Object.keys(new Ma).forEach(function(Gt){Ft.set(ir,"."+Gt,Wt[Gt])})}),Mt.scopeVAO){var sr=Mt.scopeVAO.append(mt,Ft);Xi(sr)?Ft.set(rr.vao,".targetVAO",sr):Ft.set(rr.vao,".targetVAO",mt.link(sr,{stable:!0}))}function dr(lr){var Wt=Mt.shader[lr];if(Wt){var ir=Wt.append(mt,Ft);Xi(ir)?Ft.set(rr.shader,"."+lr,ir):Ft.set(rr.shader,"."+lr,mt.link(ir,{stable:!0}))}}dr(wt),dr(Ot),Object.keys(Mt.state).length>0&&(Ft(hr,".dirty=true;"),Ft.exit(hr,".dirty=true;")),Ft("a1(",mt.shared.context,",a0,",mt.batchId,");")}function br(mt){if(!(typeof mt!="object"||ga(mt))){for(var Mt=Object.keys(mt),Ft=0;Ft=0;--re){var ye=vn[re];ye&&ye(Na,null,0)}fr.flush(),si&&si.update()}function Wn(){!Cn&&vn.length>0&&(Cn=f.next(Dn))}function Os(){Cn&&(f.cancel(Dn),Cn=null)}function xl(re){re.preventDefault(),Ta=!0,Os(),Rn.forEach(function(ye){ye()})}function ho(re){fr.getError(),Ta=!1,ma.restore(),hn.restore(),di.restore(),Ha.restore(),Ua.restore(),Yi.restore(),Bi.restore(),si&&si.restore(),Ri.procs.refresh(),Wn(),Ii.forEach(function(ye){ye()})}Xi&&(Xi.addEventListener(fs,xl,!1),Xi.addEventListener(ms,ho,!1));function Xl(){vn.length=0,Os(),Xi&&(Xi.removeEventListener(fs,xl),Xi.removeEventListener(ms,ho)),hn.clear(),Yi.clear(),Ua.clear(),Bi.clear(),Ha.clear(),Va.clear(),di.clear(),si&&si.clear(),nn.forEach(function(re){re()})}function hs(re){function ye(sr){var dr=v({},sr);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 lr(Wt){if(Wt in dr){var ir=dr[Wt];delete dr[Wt],Object.keys(ir).forEach(function(Gt){dr[Wt+"."+Gt]=ir[Gt]})}}return lr("blend"),lr("depth"),lr("cull"),lr("stencil"),lr("polygonOffset"),lr("scissor"),lr("sample"),"vao"in sr&&(dr.vao=sr.vao),dr}function Ue(sr,dr){var lr={},Wt={};return Object.keys(sr).forEach(function(ir){var Gt=sr[ir];if(h.isDynamic(Gt)){Wt[ir]=h.unbox(Gt,ir);return}else if(dr&&Array.isArray(Gt)){for(var Dr=0;Dr0)return mt.call(this,rr(sr|0),sr|0)}else if(Array.isArray(sr)){if(sr.length)return mt.call(this,sr,sr.length)}else return pr.call(this,sr)}return v(hr,{stats:br,destroy:function(){Br.destroy()}})}var Al=Yi.setFBO=hs({framebuffer:h.define.call(null,Tl,"framebuffer")});function El(re,ye){var Ue=0;Ri.procs.poll();var ke=ye.color;ke&&(fr.clearColor(+ke[0]||0,+ke[1]||0,+ke[2]||0,+ke[3]||0),Ue|=al),"depth"in ye&&(fr.clearDepth(+ye.depth),Ue|=_l),"stencil"in ye&&(fr.clearStencil(ye.stencil|0),Ue|=mn),fr.clear(Ue)}function ru(re){if("framebuffer"in re)if(re.framebuffer&&re.framebuffer_reglType==="framebufferCube")for(var ye=0;ye<6;++ye)Al(v({framebuffer:re.framebuffer.faces[ye]},re),El);else Al(re,El);else El(null,re)}function js(re){vn.push(re);function ye(){var Ue=Rl(vn,re);function ke(){var Qe=Rl(vn,ke);vn[Qe]=vn[vn.length-1],vn.length-=1,vn.length<=0&&Os()}vn[Ue]=ke}return Wn(),{cancel:ye}}function pl(){var re=xi.viewport,ye=xi.scissor_box;re[0]=re[1]=ye[0]=ye[1]=0,Na.viewportWidth=Na.framebufferWidth=Na.drawingBufferWidth=re[2]=ye[2]=fr.drawingBufferWidth,Na.viewportHeight=Na.framebufferHeight=Na.drawingBufferHeight=re[3]=ye[3]=fr.drawingBufferHeight}function bl(){Na.tick+=1,Na.time=kl(),pl(),Ri.procs.poll()}function Xn(){Ha.refresh(),pl(),Ri.procs.refresh(),si&&si.update()}function kl(){return(m()-gn)/1e3}Xn();function Io(re,ye){var Ue;switch(re){case"frame":return js(ye);case"lost":Ue=Rn;break;case"restore":Ue=Ii;break;case"destroy":Ue=nn;break;default:}return Ue.push(ye),{cancel:function(){for(var ke=0;ke=0},read:Ti,destroy:Xl,_gl:fr,_refresh:Xn,poll:function(){bl(),si&&si.update()},now:kl,stats:Ya,getCachedCode:ge,preloadCachedCode:K});return Xt.onDone(null,xe),xe}return _c})}}),wq=He({"node_modules/gl-util/context.js"(Z,q){"use strict";var v=kv();q.exports=function(o){if(o?typeof o=="string"&&(o={container:o}):o={},S(o)?o={container:o}:M(o)?o={container:o}:e(o)?o={gl:o}:o=v(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),_(o))}else if(!o.canvas)if(typeof document<"u")o.container=document.body||document.documentElement,o.canvas=t(),o.container.appendChild(o.canvas),_(o);else throw Error("Not DOM environment. Use headless-gl.");return o.gl||["webgl","experimental-webgl","webgl-experimental"].some(function(i){try{o.gl=o.canvas.getContext(i,o.attrs)}catch{}return o.gl}),o.gl};function _(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 M(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}}}),Tq=He({"node_modules/font-atlas/index.js"(Z,q){"use strict";var v=c6(),_=[32,126];q.exports=S;function S(M){M=M||{};var e=M.shape?M.shape:M.canvas?[M.canvas.width,M.canvas.height]:[512,512],t=M.canvas||document.createElement("canvas"),r=M.font,o=typeof M.step=="number"?[M.step,M.step]:M.step||[32,32],a=M.chars||_;if(r&&typeof r!="string"&&(r=v(r)),!Array.isArray(a))a=String(a).split("");else if(a.length===2&&typeof a[0]=="number"&&typeof a[1]=="number"){for(var i=[],n=a[0],s=0;n<=a[1];n++)i[s++]=String.fromCharCode(n);a=i}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,m=o[1]/2,n=0;ne[0]-o[0]/2&&(f=o[0]/2,m+=o[1]);return t}}}),f6=He({"node_modules/bit-twiddle/twiddle.js"(Z){"use strict";"use restrict";var q=32;Z.INT_BITS=q,Z.INT_MAX=2147483647,Z.INT_MIN=-1<0)-(S<0)},Z.abs=function(S){var M=S>>q-1;return(S^M)-M},Z.min=function(S,M){return M^(S^M)&-(S65535)<<4,S>>>=M,e=(S>255)<<3,S>>>=e,M|=e,e=(S>15)<<2,S>>>=e,M|=e,e=(S>3)<<1,S>>>=e,M|=e,M|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 v(S){var M=32;return S&=-S,S&&M--,S&65535&&(M-=16),S&16711935&&(M-=8),S&252645135&&(M-=4),S&858993459&&(M-=2),S&1431655765&&(M-=1),M}Z.countTrailingZeros=v,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 _=new Array(256);(function(S){for(var M=0;M<256;++M){var e=M,t=M,r=7;for(e>>>=1;e;e>>>=1)t<<=1,t|=e&1,--r;S[M]=t<>>8&255]<<16|_[S>>>16&255]<<8|_[S>>>24&255]},Z.interleave2=function(S,M){return S&=65535,S=(S|S<<8)&16711935,S=(S|S<<4)&252645135,S=(S|S<<2)&858993459,S=(S|S<<1)&1431655765,M&=65535,M=(M|M<<8)&16711935,M=(M|M<<4)&252645135,M=(M|M<<2)&858993459,M=(M|M<<1)&1431655765,S|M<<1},Z.deinterleave2=function(S,M){return S=S>>>M&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,M,e){return S&=1023,S=(S|S<<16)&4278190335,S=(S|S<<8)&251719695,S=(S|S<<4)&3272356035,S=(S|S<<2)&1227133513,M&=1023,M=(M|M<<16)&4278190335,M=(M|M<<8)&251719695,M=(M|M<<4)&3272356035,M=(M|M<<2)&1227133513,S|=M<<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,M){return S=S>>>M&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 M=S|S-1;return M+1|(~M&-~M)-1>>>v(S)+1}}}),Aq=He({"node_modules/dup/dup.js"(Z,q){"use strict";function v(M,e,t){var r=M[t]|0;if(r<=0)return[];var o=new Array(r),a;if(t===M.length-1)for(a=0;a"u"&&(e=0),typeof M){case"number":if(M>0)return _(M|0,e);break;case"object":if(typeof M.length=="number")return v(M,e,0);break}return[]}q.exports=S}}),Sq=He({"node_modules/typedarray-pool/pool.js"(Z){"use strict";var q=f6(),v=Aq(),_=rg().Buffer;window.__TYPEDARRAY_POOL||(window.__TYPEDARRAY_POOL={UINT8:v([32,0]),UINT16:v([32,0]),UINT32:v([32,0]),BIGUINT64:v([32,0]),INT8:v([32,0]),INT16:v([32,0]),INT32:v([32,0]),BIGINT64:v([32,0]),FLOAT:v([32,0]),DOUBLE:v([32,0]),DATA:v([32,0]),UINT8C:v([32,0]),BUFFER:v([32,0])});var S=typeof Uint8ClampedArray<"u",M=typeof BigUint64Array<"u",e=typeof BigInt64Array<"u",t=window.__TYPEDARRAY_POOL;t.UINT8C||(t.UINT8C=v([32,0])),t.BIGUINT64||(t.BIGUINT64=v([32,0])),t.BIGINT64||(t.BIGINT64=v([32,0])),t.BUFFER||(t.BUFFER=v([32,0]));var r=t.DATA,o=t.BUFFER;Z.free=function(u){if(_.isBuffer(u))o[q.log2(u.length)].push(u);else{if(Object.prototype.toString.call(u)!=="[object ArrayBuffer]"&&(u=u.buffer),!u)return;var g=u.length||u.byteLength,y=q.log2(g)|0;r[y].push(u)}};function a(d){if(d){var u=d.length||d.byteLength,g=q.log2(u);r[g].push(d)}}function i(d){a(d.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=i,Z.freeArrayBuffer=a,Z.freeBuffer=function(u){o[q.log2(u.length)].push(u)},Z.malloc=function(u,g){if(g===void 0||g==="arraybuffer")return n(u);switch(g){case"uint8":return s(u);case"uint16":return h(u);case"uint32":return f(u);case"int8":return m(u);case"int16":return c(u);case"int32":return T(u);case"float":case"float32":return l(u);case"double":case"float64":return x(u);case"uint8_clamped":return w(u);case"bigint64":return E(u);case"biguint64":return A(u);case"buffer":return b(u);case"data":case"dataview":return p(u);default:return null}return null};function n(u){var u=q.nextPow2(u),g=q.log2(u),y=r[g];return y.length>0?y.pop():new ArrayBuffer(u)}Z.mallocArrayBuffer=n;function s(d){return new Uint8Array(n(d),0,d)}Z.mallocUint8=s;function h(d){return new Uint16Array(n(2*d),0,d)}Z.mallocUint16=h;function f(d){return new Uint32Array(n(4*d),0,d)}Z.mallocUint32=f;function m(d){return new Int8Array(n(d),0,d)}Z.mallocInt8=m;function c(d){return new Int16Array(n(2*d),0,d)}Z.mallocInt16=c;function T(d){return new Int32Array(n(4*d),0,d)}Z.mallocInt32=T;function l(d){return new Float32Array(n(4*d),0,d)}Z.mallocFloat32=Z.mallocFloat=l;function x(d){return new Float64Array(n(8*d),0,d)}Z.mallocFloat64=Z.mallocDouble=x;function w(d){return S?new Uint8ClampedArray(n(d),0,d):s(d)}Z.mallocUint8Clamped=w;function A(d){return M?new BigUint64Array(n(8*d),0,d):null}Z.mallocBigUint64=A;function E(d){return e?new BigInt64Array(n(8*d),0,d):null}Z.mallocBigInt64=E;function p(d){return new DataView(n(d),0,d)}Z.mallocDataView=p;function b(d){d=q.nextPow2(d);var u=q.log2(d),g=o[u];return g.length>0?g.pop():new _(d)}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}}}),Mq=He({"node_modules/is-plain-obj/index.js"(Z,q){"use strict";var v=Object.prototype.toString;q.exports=function(_){var S;return v.call(_)==="[object Object]"&&(S=Object.getPrototypeOf(_),S===null||S===Object.getPrototypeOf({}))}}}),h6=He({"node_modules/parse-unit/index.js"(Z,q){q.exports=function(_,S){S||(S=[0,""]),_=String(_);var M=parseFloat(_,10);return S[0]=M,S[1]=_.match(/[\d.\-\+]*\s*(.*)/)[1]||"",S}}}),Eq=He({"node_modules/to-px/topx.js"(Z,q){"use strict";var v=h6();q.exports=e;var _=96;function S(t,r){var o=v(getComputedStyle(t).getPropertyValue(r));return o[0]*e(o[1],t)}function M(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 M(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 _;case"cm":return _/2.54;case"mm":return _/25.4;case"pt":return _/72;case"pc":return _/6}return 1}}}),kq=He({"node_modules/detect-kerning/index.js"(Z,q){"use strict";q.exports=M;var v=M.canvas=document.createElement("canvas"),_=v.getContext("2d"),S=e([32,126]);M.createPairs=e,M.ascii=S;function M(t,r){Array.isArray(t)&&(t=t.join(", "));var o={},a,i=16,n=.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&&(i=r.fontSize),r.threshold!=null&&(n=r.threshold))),a||(a=S),_.font=i+"px "+t;for(var s=0;si*n){var c=(m-f)/i;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),i=t[0];i0;o-=4)if(r[o]!==0)return Math.floor((o-3)*.25/t)}}}),Lq=He({"node_modules/gl-text/dist.js"(Z,q){"use strict";var v=xq(),_=kv(),S=bq(),M=wq(),e=r6(),t=v0(),r=Tq(),o=Sq(),a=C1(),i=Mq(),n=h6(),s=Eq(),h=kq(),f=ch(),m=Cq(),c=gg(),T=f6(),l=T.nextPow2,x=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,E=function(d){p(d)?(d={regl:d},this.gl=d.regl._gl):this.gl=M(d),this.shader=x.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=d.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(),x.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(i(d)?d:{})};E.prototype.createShader=function(){var d=this.regl,u=d({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:d.prop("count"),offset:d.prop("offset"),attributes:{charOffset:{offset:4,stride:8,buffer:d.this("sizeBuffer")},width:{offset:0,stride:8,buffer:d.this("sizeBuffer")},char:d.this("charBuffer"),position:d.this("position")},uniforms:{atlasSize:function(y,D){return[D.atlas.width,D.atlas.height]},atlasDim:function(y,D){return[D.atlas.cols,D.atlas.rows]},atlas:function(y,D){return D.atlas.texture},charStep:function(y,D){return D.atlas.step},em:function(y,D){return D.atlas.em},color:d.prop("color"),opacity:d.prop("opacity"),viewport:d.this("viewportArray"),scale:d.this("scale"),align:d.prop("align"),baseline:d.prop("baseline"),translate:d.this("translate"),positionOffset:d.prop("positionOffset")},primitive:"points",viewport:d.this("viewport"),vert:` +`),Ma;if(Xt&&(Ma=Cc(ea),Xt[Ma]))return Xt[Ma].apply(null,Ta);var Qa=Function.apply(null,oa.concat(ea));return Xt&&(Xt[Ma]=Qa),Qa.apply(null,Ta)}return{global:si,link:xa,block:Ya,proc:zi,scope:bi,cond:yi,compile:Ei}}var Qn="xyzw".split(""),io=5121,eo=1,co=2,An=0,un=1,yo=2,Qo=3,ks=4,rl=5,Ns=6,el="dither",Ss="blend.enable",Fl="blend.color",yl="blend.equation",ll="blend.func",Un="depth.enable",Ro="depth.func",Js="depth.range",Fs="depth.mask",cu="colorMask",Iu="cull.enable",Zu="cull.face",Ic="frontFace",bu="lineWidth",Rc="polygonOffset.enable",Au="polygonOffset.offset",yc="sample.alpha",fo="sample.enable",Fo="sample.coverage",Dc="stencil.enable",lc="stencil.mask",Yu="stencil.func",Oe="stencil.opFront",I="stencil.opBack",ie="scissor.enable",Te="scissor.box",Me="viewport",ze="profile",ht="framebuffer",wt="vert",Ot="frag",$t="elements",Tr="primitive",Sr="count",Kr="offset",na="instances",qe="vao",$e="Width",lt="Height",pt=ht+$e,Et=ht+lt,bt=Me+$e,Dt=Me+lt,ur="drawingBuffer",yr=ur+$e,Er=ur+lt,jr=[ll,yl,Yu,Oe,I,Fo,Me,Te,Au],Qr=34962,ha=34963,Aa=2884,Da=3042,ci=3024,Vi=2960,ji=2929,on=3089,Sn=32823,Kn=32926,Bn=32928,Ao=5126,ls=35664,Mo=35665,Yo=35666,ds=5124,ul=35667,tl=35668,es=35669,ts=35670,Il=35671,tu=35672,Ru=35673,vu=35674,wl=35675,fu=35676,uc=35678,Gl=35680,Hl=4,me=1028,De=1029,et=2304,dt=2305,yt=32775,Tt=32776,tr=519,zt=7680,_r=0,Gr=1,Xr=32774,wa=513,pa=36160,Ja=36064,ti={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},Sa={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":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)||kr(it)||Ur(it)}function oi(it){return it.sort(function(Xt,fr){return Xt===Me?-1:fr===Me?1:Xt=1,oa>=2,Xt)}else if(fr===ks){var Ta=it.data;return new La(Ta.thisDep,Ta.contextDep,Ta.propDep,Xt)}else{if(fr===rl)return new La(!1,!1,!1,Xt);if(fr===Ns){for(var ma=!1,xa=!1,Ya=!1,bi=0;bi=1&&(xa=!0),si>=2&&(Ya=!0)}else yi.type===ks&&(ma=ma||yi.data.thisDep,xa=xa||yi.data.contextDep,Ya=Ya||yi.data.propDep)}return new La(ma,xa,Ya,Xt)}else return new La(fr===Qo,fr===yo,fr===un,Xt)}}var In=new La(!1,!1,!1,function(){});function Jn(it,Xt,fr,oa,Ta,ma,xa,Ya,bi,yi,si,gn,zi,Ei,Na,ea){var Ma=yi.Record,Qa={add:32774,subtract:32778,"reverse subtract":32779};fr.ext_blend_minmax&&(Qa.min=yt,Qa.max=Tt);var di=fr.angle_instanced_arrays,Va=fr.webgl_draw_buffers,Bi=fr.oes_vertex_array_object,Li={dirty:!0,profile:ea.profile},hn={},Ha=[],Ua={},Yi={};function Ri(mt){return mt.replace(".","_")}function Ti(mt,Mt,Ft){var rr=Ri(mt);Ha.push(mt),hn[rr]=Li[rr]=!!Ft,Ua[rr]=Mt}function xi(mt,Mt,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]=Mt}function Xi(mt){return!!isNaN(mt)}Ti(el,ci),Ti(Ss,Da),xi(Fl,"blendColor",[0,0,0,0]),xi(yl,"blendEquationSeparate",[Xr,Xr]),xi(ll,"blendFuncSeparate",[Gr,_r,Gr,_r]),Ti(Un,ji,!0),xi(Ro,"depthFunc",wa),xi(Js,"depthRange",[0,1]),xi(Fs,"depthMask",!0),xi(cu,cu,[!0,!0,!0,!0]),Ti(Iu,Aa),xi(Zu,"cullFace",De),xi(Ic,Ic,dt),xi(bu,bu,1),Ti(Rc,Sn),xi(Au,"polygonOffset",[0,0]),Ti(yc,Kn),Ti(fo,Bn),xi(Fo,"sampleCoverage",[1,!1]),Ti(Dc,Vi),xi(lc,"stencilMask",-1),xi(Yu,"stencilFunc",[tr,0,-1]),xi(Oe,"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:Xt,next:hn,current:Li,draw:gn,elements:ma,buffer:Ta,shader:si,attributes:yi.state,vao:yi,uniforms:bi,framebuffer:Ya,extensions:fr,timer:Ei,isBufferArgs:fi},Rn={primTypes:Ia,compareFuncs:Sa,blendFuncs:ti,blendEquations:Qa,stencilOps:za,glTypes:_a,orientationType:Xa};Va&&(Rn.backBuffer=[De],Rn.drawBuffer=d(oa.maxDrawbuffers,function(mt){return mt===0?[0]:d(mt,function(Mt){return Ja+Mt})}));var Ii=0;function nn(){var mt=Mn({cache:Na}),Mt=mt.link,Ft=mt.global;mt.id=Ii++,mt.batchId="0";var rr=Mt(vn),hr=mt.shared={props:"a0"};Object.keys(vn).forEach(function(ir){hr[ir]=Ft.def(rr,".",ir)});var sr=mt.next={},dr=mt.current={};Object.keys(Yi).forEach(function(ir){Array.isArray(Li[ir])&&(sr[ir]=Ft.def(hr.next,".",ir),dr[ir]=Ft.def(hr.current,".",ir))});var lr=mt.constants={};Object.keys(Rn).forEach(function(ir){lr[ir]=Ft.def(JSON.stringify(Rn[ir]))}),mt.invoke=function(ir,Gt){switch(Gt.type){case An:var Dr=["this",hr.context,hr.props,mt.batchId];return ir.def(Mt(Gt.data),".call(",Dr.slice(0,Math.max(Gt.data.length+1,4)),")");case un:return ir.def(hr.props,Gt.data);case yo:return ir.def(hr.context,Gt.data);case Qo:return ir.def("this",Gt.data);case ks:return Gt.data.append(mt,ir),Gt.data.ref;case rl:return Gt.data.toString();case Ns:return Gt.data.map(function(Jr){return mt.invoke(ir,Jr)})}},mt.attribCache={};var Wt={};return mt.scopeAttrib=function(ir){var Gt=Xt.id(ir);if(Gt in Wt)return Wt[Gt];var Dr=yi.scope[Gt];Dr||(Dr=yi.scope[Gt]=new Ma);var Jr=Wt[Gt]=Mt(Dr);return Jr},mt}function Ln(mt){var Mt=mt.static,Ft=mt.dynamic,rr;if(ze in Mt){var hr=!!Mt[ze];rr=an(function(dr,lr){return hr}),rr.enable=hr}else if(ze in Ft){var sr=Ft[ze];rr=dn(sr,function(dr,lr){return dr.invoke(lr,sr)})}return rr}function Dn(mt,Mt){var Ft=mt.static,rr=mt.dynamic;if(ht in Ft){var hr=Ft[ht];return hr?(hr=Ya.getFramebuffer(hr),an(function(dr,lr){var Wt=dr.link(hr),ir=dr.shared;lr.set(ir.framebuffer,".next",Wt);var Gt=ir.context;return lr.set(Gt,"."+pt,Wt+".width"),lr.set(Gt,"."+Et,Wt+".height"),Wt})):an(function(dr,lr){var Wt=dr.shared;lr.set(Wt.framebuffer,".next","null");var ir=Wt.context;return lr.set(ir,"."+pt,ir+"."+yr),lr.set(ir,"."+Et,ir+"."+Er),"null"})}else if(ht in rr){var sr=rr[ht];return dn(sr,function(dr,lr){var Wt=dr.invoke(lr,sr),ir=dr.shared,Gt=ir.framebuffer,Dr=lr.def(Gt,".getFramebuffer(",Wt,")");lr.set(Gt,".next",Dr);var Jr=ir.context;return lr.set(Jr,"."+pt,Dr+"?"+Dr+".width:"+Jr+"."+yr),lr.set(Jr,"."+Et,Dr+"?"+Dr+".height:"+Jr+"."+Er),Dr})}else return null}function Wn(mt,Mt,Ft){var rr=mt.static,hr=mt.dynamic;function sr(Wt){if(Wt in rr){var ir=rr[Wt],Gt=!0,Dr=ir.x|0,Jr=ir.y|0,ya,vi;return"width"in ir?ya=ir.width|0:Gt=!1,"height"in ir?vi=ir.height|0:Gt=!1,new La(!Gt&&Mt&&Mt.thisDep,!Gt&&Mt&&Mt.contextDep,!Gt&&Mt&&Mt.propDep,function(Zi,Fi){var ui=Zi.shared.context,_i=ya;"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],ii=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"),fn=Fi.def('"width" in ',ui,"?",ui,".width|0:","(",_i,".",pt,"-",Si,")"),_o=Fi.def('"height" in ',ui,"?",ui,".height|0:","(",_i,".",Et,"-",Ui,")");return[Si,Ui,fn,_o]});return Mt&&(ii.thisDep=ii.thisDep||Mt.thisDep,ii.contextDep=ii.contextDep||Mt.contextDep,ii.propDep=ii.propDep||Mt.propDep),ii}else return Mt?new La(Mt.thisDep,Mt.contextDep,Mt.propDep,function(Zi,Fi){var ui=Zi.shared.context;return[0,0,Fi.def(ui,".",pt),Fi.def(ui,".",Et)]}):null}var dr=sr(Me);if(dr){var lr=dr;dr=new La(dr.thisDep,dr.contextDep,dr.propDep,function(Wt,ir){var Gt=lr.append(Wt,ir),Dr=Wt.shared.context;return ir.set(Dr,"."+bt,Gt[2]),ir.set(Dr,"."+Dt,Gt[3]),Gt})}return{viewport:dr,scissor_box:sr(Te)}}function Os(mt,Mt){var Ft=mt.static,rr=typeof Ft[Ot]=="string"&&typeof Ft[wt]=="string";if(rr){if(Object.keys(Mt.dynamic).length>0)return null;var hr=Mt.static,sr=Object.keys(hr);if(sr.length>0&&typeof hr[sr[0]]=="number"){for(var dr=[],lr=0;lr"+Si+"?"+Gt+".constant["+Si+"]:0;"}).join(""),"}}else{","if(",ya,"(",Gt,".buffer)){",Zi,"=",vi,".createStream(",Qr,",",Gt,".buffer);","}else{",Zi,"=",vi,".getBuffer(",Gt,".buffer);","}",Fi,'="type" in ',Gt,"?",Jr.glTypes,"[",Gt,".type]:",Zi,".dtype;",Ga.normalized,"=!!",Gt,".normalized;");function ui(_i){ir(Ga[_i],"=",Gt,".",_i,"|0;")}return ui("size"),ui("offset"),ui("stride"),ui("divisor"),ir("}}"),ir.exit("if(",Ga.isStream,"){",vi,".destroyStream(",Zi,");","}"),Ga}hr[sr]=dn(dr,lr)}),hr}function El(mt){var Mt=mt.static,Ft=mt.dynamic,rr={};return Object.keys(Mt).forEach(function(hr){var sr=Mt[hr];rr[hr]=an(function(dr,lr){return typeof sr=="number"||typeof sr=="boolean"?""+sr:dr.link(sr)})}),Object.keys(Ft).forEach(function(hr){var sr=Ft[hr];rr[hr]=dn(sr,function(dr,lr){return dr.invoke(lr,sr)})}),rr}function ru(mt,Mt,Ft,rr,hr){var sr=mt.static,dr=mt.dynamic,lr=Os(mt,Mt),Wt=Dn(mt,hr),ir=Wn(mt,Wt,hr),Gt=ho(mt,hr),Dr=Xl(mt,hr),Jr=xl(mt,hr,lr);function ya(ui){var _i=ir[ui];_i&&(Dr[ui]=_i)}ya(Me),ya(Ri(Te));var vi=Object.keys(Dr).length>0,Ga={framebuffer:Wt,draw:Gt,shader:Jr,state:Dr,dirty:vi,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(Ga.profile=Ln(mt,hr),Ga.uniforms=hs(Ft,hr),Ga.drawVAO=Ga.scopeVAO=Gt.vao,!Ga.drawVAO&&Jr.program&&!lr&&fr.angle_instanced_arrays&&Gt.static.elements){var ii=!0,Zi=Jr.program.attributes.map(function(ui){var _i=Mt.static[ui];return ii=ii&&!!_i,_i});if(ii&&Zi.length>0){var Fi=yi.getVAO(yi.createVAO({attributes:Zi,elements:Gt.static.elements}));Ga.drawVAO=new La(null,null,null,function(ui,_i){return ui.link(Fi)}),Ga.useVAO=!0}}return lr?Ga.useVAO=!0:Ga.attributes=Al(Mt,hr),Ga.context=El(rr,hr),Ga}function js(mt,Mt,Ft){var rr=mt.shared,hr=rr.context,sr=mt.scope();Object.keys(Ft).forEach(function(dr){Mt.save(hr,"."+dr);var lr=Ft[dr],Wt=lr.append(mt,Mt);Array.isArray(Wt)?sr(hr,".",dr,"=[",Wt.join(),"];"):sr(hr,".",dr,"=",Wt,";")}),Mt(sr)}function pl(mt,Mt,Ft,rr){var hr=mt.shared,sr=hr.gl,dr=hr.framebuffer,lr;Va&&(lr=Mt.def(hr.extensions,".webgl_draw_buffers"));var Wt=mt.constants,ir=Wt.drawBuffer,Gt=Wt.backBuffer,Dr;Ft?Dr=Ft.append(mt,Mt):Dr=Mt.def(dr,".next"),rr||Mt("if(",Dr,"!==",dr,".cur){"),Mt("if(",Dr,"){",sr,".bindFramebuffer(",pa,",",Dr,".framebuffer);"),Va&&Mt(lr,".drawBuffersWEBGL(",ir,"[",Dr,".colorAttachments.length]);"),Mt("}else{",sr,".bindFramebuffer(",pa,",null);"),Va&&Mt(lr,".drawBuffersWEBGL(",Gt,");"),Mt("}",dr,".cur=",Dr,";"),rr||Mt("}")}function bl(mt,Mt,Ft){var rr=mt.shared,hr=rr.gl,sr=mt.current,dr=mt.next,lr=rr.current,Wt=rr.next,ir=mt.cond(lr,".dirty");Ha.forEach(function(Gt){var Dr=Ri(Gt);if(!(Dr in Ft.state)){var Jr,ya;if(Dr in dr){Jr=dr[Dr],ya=sr[Dr];var vi=d(Li[Dr].length,function(ii){return ir.def(Jr,"[",ii,"]")});ir(mt.cond(vi.map(function(ii,Zi){return ii+"!=="+ya+"["+Zi+"]"}).join("||")).then(hr,".",Yi[Dr],"(",vi,");",vi.map(function(ii,Zi){return ya+"["+Zi+"]="+ii}).join(";"),";"))}else{Jr=ir.def(Wt,".",Dr);var Ga=mt.cond(Jr,"!==",lr,".",Dr);ir(Ga),Dr in Ua?Ga(mt.cond(Jr).then(hr,".enable(",Ua[Dr],");").else(hr,".disable(",Ua[Dr],");"),lr,".",Dr,"=",Jr,";"):Ga(hr,".",Yi[Dr],"(",Jr,");",lr,".",Dr,"=",Jr,";")}}}),Object.keys(Ft.state).length===0&&ir(lr,".dirty=false;"),Mt(ir)}function Xn(mt,Mt,Ft,rr){var hr=mt.shared,sr=mt.current,dr=hr.current,lr=hr.gl,Wt;oi(Object.keys(Ft)).forEach(function(ir){var Gt=Ft[ir];if(!(rr&&!rr(Gt))){var Dr=Gt.append(mt,Mt);if(Ua[ir]){var Jr=Ua[ir];sn(Gt)?(Wt=mt.link(Dr,{stable:!0}),Mt(mt.cond(Wt).then(lr,".enable(",Jr,");").else(lr,".disable(",Jr,");")),Mt(dr,".",ir,"=",Wt,";")):(Mt(mt.cond(Dr).then(lr,".enable(",Jr,");").else(lr,".disable(",Jr,");")),Mt(dr,".",ir,"=",Dr,";"))}else if(ga(Dr)){var ya=sr[ir];Mt(lr,".",Yi[ir],"(",Dr,");",Dr.map(function(vi,Ga){return ya+"["+Ga+"]="+vi}).join(";"),";")}else sn(Gt)?(Wt=mt.link(Dr,{stable:!0}),Mt(lr,".",Yi[ir],"(",Wt,");",dr,".",ir,"=",Wt,";")):Mt(lr,".",Yi[ir],"(",Dr,");",dr,".",ir,"=",Dr,";")}})}function kl(mt,Mt){di&&(mt.instancing=Mt.def(mt.shared.extensions,".angle_instanced_arrays"))}function Io(mt,Mt,Ft,rr,hr){var sr=mt.shared,dr=mt.stats,lr=sr.current,Wt=sr.timer,ir=Ft.profile;function Gt(){return typeof performance>"u"?"Date.now()":"performance.now()"}var Dr,Jr;function ya(ui){Dr=Mt.def(),ui(Dr,"=",Gt(),";"),typeof hr=="string"?ui(dr,".count+=",hr,";"):ui(dr,".count++;"),Ei&&(rr?(Jr=Mt.def(),ui(Jr,"=",Wt,".getNumPendingQueries();")):ui(Wt,".beginQuery(",dr,");"))}function vi(ui){ui(dr,".cpuTime+=",Gt(),"-",Dr,";"),Ei&&(rr?ui(Wt,".pushScopeStats(",Jr,",",Wt,".getNumPendingQueries(),",dr,");"):ui(Wt,".endQuery();"))}function Ga(ui){var _i=Mt.def(lr,".profile");Mt(lr,".profile=",ui,";"),Mt.exit(lr,".profile=",_i,";")}var ii;if(ir){if(sn(ir)){ir.enable?(ya(Mt),vi(Mt.exit),Ga("true")):Ga("false");return}ii=ir.append(mt,Mt),Ga(ii)}else ii=Mt.def(lr,".profile");var Zi=mt.block();ya(Zi),Mt("if(",ii,"){",Zi,"}");var Fi=mt.block();vi(Fi),Mt.exit("if(",ii,"){",Fi,"}")}function ge(mt,Mt,Ft,rr,hr){var sr=mt.shared;function dr(Wt){switch(Wt){case ls:case ul:case Il:return 2;case Mo:case tl:case tu:return 3;case Yo:case es:case Ru:return 4;default:return 1}}function lr(Wt,ir,Gt){var Dr=sr.gl,Jr=Mt.def(Wt,".location"),ya=Mt.def(sr.attributes,"[",Jr,"]"),vi=Gt.state,Ga=Gt.buffer,ii=[Gt.x,Gt.y,Gt.z,Gt.w],Zi=["buffer","normalized","offset","stride"];function Fi(){Mt("if(!",ya,".buffer){",Dr,".enableVertexAttribArray(",Jr,");}");var _i=Gt.type,Si;if(Gt.size?Si=Mt.def(Gt.size,"||",ir):Si=ir,Mt("if(",ya,".type!==",_i,"||",ya,".size!==",Si,"||",Zi.map(function(fn){return ya+"."+fn+"!=="+Gt[fn]}).join("||"),"){",Dr,".bindBuffer(",Qr,",",Ga,".buffer);",Dr,".vertexAttribPointer(",[Jr,Si,_i,Gt.normalized,Gt.stride,Gt.offset],");",ya,".type=",_i,";",ya,".size=",Si,";",Zi.map(function(fn){return ya+"."+fn+"="+Gt[fn]+";"}).join(""),"}"),di){var Ui=Gt.divisor;Mt("if(",ya,".divisor!==",Ui,"){",mt.instancing,".vertexAttribDivisorANGLE(",[Jr,Ui],");",ya,".divisor=",Ui,";}")}}function ui(){Mt("if(",ya,".buffer){",Dr,".disableVertexAttribArray(",Jr,");",ya,".buffer=null;","}if(",Qn.map(function(_i,Si){return ya+"."+_i+"!=="+ii[Si]}).join("||"),"){",Dr,".vertexAttrib4f(",Jr,",",ii,");",Qn.map(function(_i,Si){return ya+"."+_i+"="+ii[Si]+";"}).join(""),"}")}vi===eo?Fi():vi===co?ui():(Mt("if(",vi,"===",eo,"){"),Fi(),Mt("}else{"),ui(),Mt("}"))}rr.forEach(function(Wt){var ir=Wt.name,Gt=Ft.attributes[ir],Dr;if(Gt){if(!hr(Gt))return;Dr=Gt.append(mt,Mt)}else{if(!hr(In))return;var Jr=mt.scopeAttrib(ir);Dr={},Object.keys(new Ma).forEach(function(ya){Dr[ya]=Mt.def(Jr,".",ya)})}lr(mt.link(Wt),dr(Wt.info.type),Dr)})}function K(mt,Mt,Ft,rr,hr,sr){for(var dr=mt.shared,lr=dr.gl,Wt,ir=0;ir1){for(var Uo=[],Ds=[],Oo=0;Oo>1)",Ga],");")}function Ui(){Ft(ii,".drawArraysInstancedANGLE(",[Jr,ya,vi,Ga],");")}Gt&&Gt!=="null"?Fi?Si():(Ft("if(",Gt,"){"),Si(),Ft("}else{"),Ui(),Ft("}")):Ui()}function _i(){function Si(){Ft(sr+".drawElements("+[Jr,vi,Zi,ya+"<<(("+Zi+"-"+io+")>>1)"]+");")}function Ui(){Ft(sr+".drawArrays("+[Jr,ya,vi]+");")}Gt&&Gt!=="null"?Fi?Si():(Ft("if(",Gt,"){"),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 re(mt,Mt,Ft,rr,hr){var sr=nn(),dr=sr.proc("body",hr);return di&&(sr.instancing=dr.def(sr.shared.extensions,".angle_instanced_arrays")),mt(sr,dr,Ft,rr),sr.compile().body}function ye(mt,Mt,Ft,rr){kl(mt,Mt),Ft.useVAO?Ft.drawVAO?Mt(mt.shared.vao,".setVAO(",Ft.drawVAO.append(mt,Mt),");"):Mt(mt.shared.vao,".setVAO(",mt.shared.vao,".targetVAO);"):(Mt(mt.shared.vao,".setVAO(null);"),ge(mt,Mt,Ft,rr.attributes,function(){return!0})),K(mt,Mt,Ft,rr.uniforms,function(){return!0},!1),xe(mt,Mt,Mt,Ft)}function Ue(mt,Mt){var Ft=mt.proc("draw",1);kl(mt,Ft),js(mt,Ft,Mt.context),pl(mt,Ft,Mt.framebuffer),bl(mt,Ft,Mt),Xn(mt,Ft,Mt.state),Io(mt,Ft,Mt,!1,!0);var rr=Mt.shader.progVar.append(mt,Ft);if(Ft(mt.shared.gl,".useProgram(",rr,".program);"),Mt.shader.program)ye(mt,Ft,Mt,Mt.shader.program);else{Ft(mt.shared.vao,".setVAO(null);");var hr=mt.global.def("{}"),sr=Ft.def(rr,".id"),dr=Ft.def(hr,"[",sr,"]");Ft(mt.cond(dr).then(dr,".call(this,a0);").else(dr,"=",hr,"[",sr,"]=",mt.link(function(lr){return re(ye,mt,Mt,lr,1)}),"(",rr,");",dr,".call(this,a0);"))}Object.keys(Mt.state).length>0&&Ft(mt.shared.current,".dirty=true;"),mt.shared.vao&&Ft(mt.shared.vao,".setVAO(null);")}function ke(mt,Mt,Ft,rr){mt.batchId="a1",kl(mt,Mt);function hr(){return!0}ge(mt,Mt,Ft,rr.attributes,hr),K(mt,Mt,Ft,rr.uniforms,hr,!1),xe(mt,Mt,Mt,Ft)}function Qe(mt,Mt,Ft,rr){kl(mt,Mt);var hr=Ft.contextDep,sr=Mt.def(),dr="a0",lr="a1",Wt=Mt.def();mt.shared.props=Wt,mt.batchId=sr;var ir=mt.scope(),Gt=mt.scope();Mt(ir.entry,"for(",sr,"=0;",sr,"<",lr,";++",sr,"){",Wt,"=",dr,"[",sr,"];",Gt,"}",ir.exit);function Dr(Zi){return Zi.contextDep&&hr||Zi.propDep}function Jr(Zi){return!Dr(Zi)}if(Ft.needsContext&&js(mt,Gt,Ft.context),Ft.needsFramebuffer&&pl(mt,Gt,Ft.framebuffer),Xn(mt,Gt,Ft.state,Dr),Ft.profile&&Dr(Ft.profile)&&Io(mt,Gt,Ft,!1,!0),rr)Ft.useVAO?Ft.drawVAO?Dr(Ft.drawVAO)?Gt(mt.shared.vao,".setVAO(",Ft.drawVAO.append(mt,Gt),");"):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,Gt,Ft,rr.attributes,Dr)),K(mt,ir,Ft,rr.uniforms,Jr,!1),K(mt,Gt,Ft,rr.uniforms,Dr,!0),xe(mt,ir,Gt,Ft);else{var ya=mt.global.def("{}"),vi=Ft.shader.progVar.append(mt,Gt),Ga=Gt.def(vi,".id"),ii=Gt.def(ya,"[",Ga,"]");Gt(mt.shared.gl,".useProgram(",vi,".program);","if(!",ii,"){",ii,"=",ya,"[",Ga,"]=",mt.link(function(Zi){return re(ke,mt,Ft,Zi,2)}),"(",vi,");}",ii,".call(this,a0[",sr,"],",sr,");")}}function vt(mt,Mt){var Ft=mt.proc("batch",2);mt.batchId="0",kl(mt,Ft);var rr=!1,hr=!0;Object.keys(Mt.context).forEach(function(ya){rr=rr||Mt.context[ya].propDep}),rr||(js(mt,Ft,Mt.context),hr=!1);var sr=Mt.framebuffer,dr=!1;sr?(sr.propDep?rr=dr=!0:sr.contextDep&&rr&&(dr=!0),dr||pl(mt,Ft,sr)):pl(mt,Ft,null),Mt.state.viewport&&Mt.state.viewport.propDep&&(rr=!0);function lr(ya){return ya.contextDep&&rr||ya.propDep}bl(mt,Ft,Mt),Xn(mt,Ft,Mt.state,function(ya){return!lr(ya)}),(!Mt.profile||!lr(Mt.profile))&&Io(mt,Ft,Mt,!1,"a1"),Mt.contextDep=rr,Mt.needsContext=hr,Mt.needsFramebuffer=dr;var Wt=Mt.shader.progVar;if(Wt.contextDep&&rr||Wt.propDep)Qe(mt,Ft,Mt,null);else{var ir=Wt.append(mt,Ft);if(Ft(mt.shared.gl,".useProgram(",ir,".program);"),Mt.shader.program)Qe(mt,Ft,Mt,Mt.shader.program);else{Ft(mt.shared.vao,".setVAO(null);");var Gt=mt.global.def("{}"),Dr=Ft.def(ir,".id"),Jr=Ft.def(Gt,"[",Dr,"]");Ft(mt.cond(Jr).then(Jr,".call(this,a0,a1);").else(Jr,"=",Gt,"[",Dr,"]=",mt.link(function(ya){return re(Qe,mt,Mt,ya,2)}),"(",ir,");",Jr,".call(this,a0,a1);"))}}Object.keys(Mt.state).length>0&&Ft(mt.shared.current,".dirty=true;"),mt.shared.vao&&Ft(mt.shared.vao,".setVAO(null);")}function qt(mt,Mt){var Ft=mt.proc("scope",3);mt.batchId="a2";var rr=mt.shared,hr=rr.current;if(js(mt,Ft,Mt.context),Mt.framebuffer&&Mt.framebuffer.append(mt,Ft),oi(Object.keys(Mt.state)).forEach(function(lr){var Wt=Mt.state[lr],ir=Wt.append(mt,Ft);ga(ir)?ir.forEach(function(Gt,Dr){Xi(Gt)?Ft.set(mt.next[lr],"["+Dr+"]",Gt):Ft.set(mt.next[lr],"["+Dr+"]",mt.link(Gt,{stable:!0}))}):sn(Wt)?Ft.set(rr.next,"."+lr,mt.link(ir,{stable:!0})):Ft.set(rr.next,"."+lr,ir)}),Io(mt,Ft,Mt,!0,!0),[$t,Kr,Sr,na,Tr].forEach(function(lr){var Wt=Mt.draw[lr];if(Wt){var ir=Wt.append(mt,Ft);Xi(ir)?Ft.set(rr.draw,"."+lr,ir):Ft.set(rr.draw,"."+lr,mt.link(ir),{stable:!0})}}),Object.keys(Mt.uniforms).forEach(function(lr){var Wt=Mt.uniforms[lr].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(Xt.id(lr),{stable:!0})+"]",Wt)}),Object.keys(Mt.attributes).forEach(function(lr){var Wt=Mt.attributes[lr].append(mt,Ft),ir=mt.scopeAttrib(lr);Object.keys(new Ma).forEach(function(Gt){Ft.set(ir,"."+Gt,Wt[Gt])})}),Mt.scopeVAO){var sr=Mt.scopeVAO.append(mt,Ft);Xi(sr)?Ft.set(rr.vao,".targetVAO",sr):Ft.set(rr.vao,".targetVAO",mt.link(sr,{stable:!0}))}function dr(lr){var Wt=Mt.shader[lr];if(Wt){var ir=Wt.append(mt,Ft);Xi(ir)?Ft.set(rr.shader,"."+lr,ir):Ft.set(rr.shader,"."+lr,mt.link(ir,{stable:!0}))}}dr(wt),dr(Ot),Object.keys(Mt.state).length>0&&(Ft(hr,".dirty=true;"),Ft.exit(hr,".dirty=true;")),Ft("a1(",mt.shared.context,",a0,",mt.batchId,");")}function br(mt){if(!(typeof mt!="object"||ga(mt))){for(var Mt=Object.keys(mt),Ft=0;Ft=0;--re){var ye=vn[re];ye&&ye(Na,null,0)}fr.flush(),si&&si.update()}function Wn(){!Ln&&vn.length>0&&(Ln=f.next(Dn))}function Os(){Ln&&(f.cancel(Dn),Ln=null)}function xl(re){re.preventDefault(),Ta=!0,Os(),Rn.forEach(function(ye){ye()})}function ho(re){fr.getError(),Ta=!1,ma.restore(),hn.restore(),di.restore(),Ha.restore(),Ua.restore(),Yi.restore(),Bi.restore(),si&&si.restore(),Ri.procs.refresh(),Wn(),Ii.forEach(function(ye){ye()})}Xi&&(Xi.addEventListener(fs,xl,!1),Xi.addEventListener(ms,ho,!1));function Xl(){vn.length=0,Os(),Xi&&(Xi.removeEventListener(fs,xl),Xi.removeEventListener(ms,ho)),hn.clear(),Yi.clear(),Ua.clear(),Bi.clear(),Ha.clear(),Va.clear(),di.clear(),si&&si.clear(),nn.forEach(function(re){re()})}function hs(re){function ye(sr){var dr=v({},sr);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 lr(Wt){if(Wt in dr){var ir=dr[Wt];delete dr[Wt],Object.keys(ir).forEach(function(Gt){dr[Wt+"."+Gt]=ir[Gt]})}}return lr("blend"),lr("depth"),lr("cull"),lr("stencil"),lr("polygonOffset"),lr("scissor"),lr("sample"),"vao"in sr&&(dr.vao=sr.vao),dr}function Ue(sr,dr){var lr={},Wt={};return Object.keys(sr).forEach(function(ir){var Gt=sr[ir];if(h.isDynamic(Gt)){Wt[ir]=h.unbox(Gt,ir);return}else if(dr&&Array.isArray(Gt)){for(var Dr=0;Dr0)return mt.call(this,rr(sr|0),sr|0)}else if(Array.isArray(sr)){if(sr.length)return mt.call(this,sr,sr.length)}else return pr.call(this,sr)}return v(hr,{stats:br,destroy:function(){Br.destroy()}})}var Al=Yi.setFBO=hs({framebuffer:h.define.call(null,Tl,"framebuffer")});function El(re,ye){var Ue=0;Ri.procs.poll();var ke=ye.color;ke&&(fr.clearColor(+ke[0]||0,+ke[1]||0,+ke[2]||0,+ke[3]||0),Ue|=al),"depth"in ye&&(fr.clearDepth(+ye.depth),Ue|=_l),"stencil"in ye&&(fr.clearStencil(ye.stencil|0),Ue|=mn),fr.clear(Ue)}function ru(re){if("framebuffer"in re)if(re.framebuffer&&re.framebuffer_reglType==="framebufferCube")for(var ye=0;ye<6;++ye)Al(v({framebuffer:re.framebuffer.faces[ye]},re),El);else Al(re,El);else El(null,re)}function js(re){vn.push(re);function ye(){var Ue=Rl(vn,re);function ke(){var Qe=Rl(vn,ke);vn[Qe]=vn[vn.length-1],vn.length-=1,vn.length<=0&&Os()}vn[Ue]=ke}return Wn(),{cancel:ye}}function pl(){var re=xi.viewport,ye=xi.scissor_box;re[0]=re[1]=ye[0]=ye[1]=0,Na.viewportWidth=Na.framebufferWidth=Na.drawingBufferWidth=re[2]=ye[2]=fr.drawingBufferWidth,Na.viewportHeight=Na.framebufferHeight=Na.drawingBufferHeight=re[3]=ye[3]=fr.drawingBufferHeight}function bl(){Na.tick+=1,Na.time=kl(),pl(),Ri.procs.poll()}function Xn(){Ha.refresh(),pl(),Ri.procs.refresh(),si&&si.update()}function kl(){return(m()-gn)/1e3}Xn();function Io(re,ye){var Ue;switch(re){case"frame":return js(ye);case"lost":Ue=Rn;break;case"restore":Ue=Ii;break;case"destroy":Ue=nn;break;default:}return Ue.push(ye),{cancel:function(){for(var ke=0;ke=0},read:Ti,destroy:Xl,_gl:fr,_refresh:Xn,poll:function(){bl(),si&&si.update()},now:kl,stats:Ya,getCachedCode:ge,preloadCachedCode:K});return Xt.onDone(null,xe),xe}return _c})}}),wq=He({"node_modules/gl-util/context.js"(Z,q){"use strict";var v=kv();q.exports=function(o){if(o?typeof o=="string"&&(o={container:o}):o={},S(o)?o={container:o}:M(o)?o={container:o}:e(o)?o={gl:o}:o=v(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),_(o))}else if(!o.canvas)if(typeof document<"u")o.container=document.body||document.documentElement,o.canvas=t(),o.container.appendChild(o.canvas),_(o);else throw Error("Not DOM environment. Use headless-gl.");return o.gl||["webgl","experimental-webgl","webgl-experimental"].some(function(i){try{o.gl=o.canvas.getContext(i,o.attrs)}catch{}return o.gl}),o.gl};function _(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 M(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}}}),Tq=He({"node_modules/font-atlas/index.js"(Z,q){"use strict";var v=c6(),_=[32,126];q.exports=S;function S(M){M=M||{};var e=M.shape?M.shape:M.canvas?[M.canvas.width,M.canvas.height]:[512,512],t=M.canvas||document.createElement("canvas"),r=M.font,o=typeof M.step=="number"?[M.step,M.step]:M.step||[32,32],a=M.chars||_;if(r&&typeof r!="string"&&(r=v(r)),!Array.isArray(a))a=String(a).split("");else if(a.length===2&&typeof a[0]=="number"&&typeof a[1]=="number"){for(var i=[],n=a[0],s=0;n<=a[1];n++)i[s++]=String.fromCharCode(n);a=i}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,m=o[1]/2,n=0;ne[0]-o[0]/2&&(f=o[0]/2,m+=o[1]);return t}}}),f6=He({"node_modules/bit-twiddle/twiddle.js"(Z){"use strict";"use restrict";var q=32;Z.INT_BITS=q,Z.INT_MAX=2147483647,Z.INT_MIN=-1<0)-(S<0)},Z.abs=function(S){var M=S>>q-1;return(S^M)-M},Z.min=function(S,M){return M^(S^M)&-(S65535)<<4,S>>>=M,e=(S>255)<<3,S>>>=e,M|=e,e=(S>15)<<2,S>>>=e,M|=e,e=(S>3)<<1,S>>>=e,M|=e,M|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 v(S){var M=32;return S&=-S,S&&M--,S&65535&&(M-=16),S&16711935&&(M-=8),S&252645135&&(M-=4),S&858993459&&(M-=2),S&1431655765&&(M-=1),M}Z.countTrailingZeros=v,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 _=new Array(256);(function(S){for(var M=0;M<256;++M){var e=M,t=M,r=7;for(e>>>=1;e;e>>>=1)t<<=1,t|=e&1,--r;S[M]=t<>>8&255]<<16|_[S>>>16&255]<<8|_[S>>>24&255]},Z.interleave2=function(S,M){return S&=65535,S=(S|S<<8)&16711935,S=(S|S<<4)&252645135,S=(S|S<<2)&858993459,S=(S|S<<1)&1431655765,M&=65535,M=(M|M<<8)&16711935,M=(M|M<<4)&252645135,M=(M|M<<2)&858993459,M=(M|M<<1)&1431655765,S|M<<1},Z.deinterleave2=function(S,M){return S=S>>>M&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,M,e){return S&=1023,S=(S|S<<16)&4278190335,S=(S|S<<8)&251719695,S=(S|S<<4)&3272356035,S=(S|S<<2)&1227133513,M&=1023,M=(M|M<<16)&4278190335,M=(M|M<<8)&251719695,M=(M|M<<4)&3272356035,M=(M|M<<2)&1227133513,S|=M<<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,M){return S=S>>>M&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 M=S|S-1;return M+1|(~M&-~M)-1>>>v(S)+1}}}),Aq=He({"node_modules/dup/dup.js"(Z,q){"use strict";function v(M,e,t){var r=M[t]|0;if(r<=0)return[];var o=new Array(r),a;if(t===M.length-1)for(a=0;a"u"&&(e=0),typeof M){case"number":if(M>0)return _(M|0,e);break;case"object":if(typeof M.length=="number")return v(M,e,0);break}return[]}q.exports=S}}),Sq=He({"node_modules/typedarray-pool/pool.js"(Z){"use strict";var q=f6(),v=Aq(),_=rg().Buffer;window.__TYPEDARRAY_POOL||(window.__TYPEDARRAY_POOL={UINT8:v([32,0]),UINT16:v([32,0]),UINT32:v([32,0]),BIGUINT64:v([32,0]),INT8:v([32,0]),INT16:v([32,0]),INT32:v([32,0]),BIGINT64:v([32,0]),FLOAT:v([32,0]),DOUBLE:v([32,0]),DATA:v([32,0]),UINT8C:v([32,0]),BUFFER:v([32,0])});var S=typeof Uint8ClampedArray<"u",M=typeof BigUint64Array<"u",e=typeof BigInt64Array<"u",t=window.__TYPEDARRAY_POOL;t.UINT8C||(t.UINT8C=v([32,0])),t.BIGUINT64||(t.BIGUINT64=v([32,0])),t.BIGINT64||(t.BIGINT64=v([32,0])),t.BUFFER||(t.BUFFER=v([32,0]));var r=t.DATA,o=t.BUFFER;Z.free=function(u){if(_.isBuffer(u))o[q.log2(u.length)].push(u);else{if(Object.prototype.toString.call(u)!=="[object ArrayBuffer]"&&(u=u.buffer),!u)return;var g=u.length||u.byteLength,y=q.log2(g)|0;r[y].push(u)}};function a(d){if(d){var u=d.length||d.byteLength,g=q.log2(u);r[g].push(d)}}function i(d){a(d.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=i,Z.freeArrayBuffer=a,Z.freeBuffer=function(u){o[q.log2(u.length)].push(u)},Z.malloc=function(u,g){if(g===void 0||g==="arraybuffer")return n(u);switch(g){case"uint8":return s(u);case"uint16":return h(u);case"uint32":return f(u);case"int8":return m(u);case"int16":return c(u);case"int32":return T(u);case"float":case"float32":return l(u);case"double":case"float64":return x(u);case"uint8_clamped":return w(u);case"bigint64":return E(u);case"biguint64":return A(u);case"buffer":return b(u);case"data":case"dataview":return p(u);default:return null}return null};function n(u){var u=q.nextPow2(u),g=q.log2(u),y=r[g];return y.length>0?y.pop():new ArrayBuffer(u)}Z.mallocArrayBuffer=n;function s(d){return new Uint8Array(n(d),0,d)}Z.mallocUint8=s;function h(d){return new Uint16Array(n(2*d),0,d)}Z.mallocUint16=h;function f(d){return new Uint32Array(n(4*d),0,d)}Z.mallocUint32=f;function m(d){return new Int8Array(n(d),0,d)}Z.mallocInt8=m;function c(d){return new Int16Array(n(2*d),0,d)}Z.mallocInt16=c;function T(d){return new Int32Array(n(4*d),0,d)}Z.mallocInt32=T;function l(d){return new Float32Array(n(4*d),0,d)}Z.mallocFloat32=Z.mallocFloat=l;function x(d){return new Float64Array(n(8*d),0,d)}Z.mallocFloat64=Z.mallocDouble=x;function w(d){return S?new Uint8ClampedArray(n(d),0,d):s(d)}Z.mallocUint8Clamped=w;function A(d){return M?new BigUint64Array(n(8*d),0,d):null}Z.mallocBigUint64=A;function E(d){return e?new BigInt64Array(n(8*d),0,d):null}Z.mallocBigInt64=E;function p(d){return new DataView(n(d),0,d)}Z.mallocDataView=p;function b(d){d=q.nextPow2(d);var u=q.log2(d),g=o[u];return g.length>0?g.pop():new _(d)}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}}}),Mq=He({"node_modules/is-plain-obj/index.js"(Z,q){"use strict";var v=Object.prototype.toString;q.exports=function(_){var S;return v.call(_)==="[object Object]"&&(S=Object.getPrototypeOf(_),S===null||S===Object.getPrototypeOf({}))}}}),h6=He({"node_modules/parse-unit/index.js"(Z,q){q.exports=function(_,S){S||(S=[0,""]),_=String(_);var M=parseFloat(_,10);return S[0]=M,S[1]=_.match(/[\d.\-\+]*\s*(.*)/)[1]||"",S}}}),Eq=He({"node_modules/to-px/topx.js"(Z,q){"use strict";var v=h6();q.exports=e;var _=96;function S(t,r){var o=v(getComputedStyle(t).getPropertyValue(r));return o[0]*e(o[1],t)}function M(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 M(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 _;case"cm":return _/2.54;case"mm":return _/25.4;case"pt":return _/72;case"pc":return _/6}return 1}}}),kq=He({"node_modules/detect-kerning/index.js"(Z,q){"use strict";q.exports=M;var v=M.canvas=document.createElement("canvas"),_=v.getContext("2d"),S=e([32,126]);M.createPairs=e,M.ascii=S;function M(t,r){Array.isArray(t)&&(t=t.join(", "));var o={},a,i=16,n=.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&&(i=r.fontSize),r.threshold!=null&&(n=r.threshold))),a||(a=S),_.font=i+"px "+t;for(var s=0;si*n){var c=(m-f)/i;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),i=t[0];i0;o-=4)if(r[o]!==0)return Math.floor((o-3)*.25/t)}}}),Lq=He({"node_modules/gl-text/dist.js"(Z,q){"use strict";var v=xq(),_=kv(),S=bq(),M=wq(),e=r6(),t=v0(),r=Tq(),o=Sq(),a=C1(),i=Mq(),n=h6(),s=Eq(),h=kq(),f=ch(),m=Cq(),c=gg(),T=f6(),l=T.nextPow2,x=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,E=function(d){p(d)?(d={regl:d},this.gl=d.regl._gl):this.gl=M(d),this.shader=x.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=d.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(),x.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(i(d)?d:{})};E.prototype.createShader=function(){var d=this.regl,u=d({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:d.prop("count"),offset:d.prop("offset"),attributes:{charOffset:{offset:4,stride:8,buffer:d.this("sizeBuffer")},width:{offset:0,stride:8,buffer:d.this("sizeBuffer")},char:d.this("charBuffer"),position:d.this("position")},uniforms:{atlasSize:function(y,D){return[D.atlas.width,D.atlas.height]},atlasDim:function(y,D){return[D.atlas.cols,D.atlas.rows]},atlas:function(y,D){return D.atlas.texture},charStep:function(y,D){return D.atlas.step},em:function(y,D){return D.atlas.em},color:d.prop("color"),opacity:d.prop("opacity"),viewport:d.this("viewportArray"),scale:d.this("scale"),align:d.prop("align"),baseline:d.prop("baseline"),translate:d.this("translate"),positionOffset:d.prop("positionOffset")},primitive:"points",viewport:d.this("viewport"),vert:` precision highp float; attribute float width, charOffset, char; attribute vec2 position; @@ -2691,17 +2691,17 @@ void main() { // color.rgb += (1. - color.rgb) * (1. - mask.rgb); gl_FragColor = color; - }`}),g={};return{regl:d,draw:u,atlas:g}},E.prototype.update=function(d){var u=this;if(typeof d=="string")d={text:d};else if(!d)return;d=_(d,{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),d.opacity!=null&&(Array.isArray(d.opacity)?this.opacity=d.opacity.map(function(ne){return parseFloat(ne)}):this.opacity=parseFloat(d.opacity)),d.viewport!=null&&(this.viewport=a(d.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]),d.kerning!=null&&(this.kerning=d.kerning),d.offset!=null&&(typeof d.offset=="number"&&(d.offset=[d.offset,0]),this.positionOffset=c(d.offset)),d.direction&&(this.direction=d.direction),d.range&&(this.range=d.range,this.scale=[1/(d.range[2]-d.range[0]),1/(d.range[3]-d.range[1])],this.translate=[-d.range[0],-d.range[1]]),d.scale&&(this.scale=d.scale),d.translate&&(this.translate=d.translate),this.scale||(this.scale=[1/this.viewport.width,1/this.viewport.height]),this.translate||(this.translate=[0,0]),!this.font.length&&!d.font&&(d.font=E.baseFontSize+"px sans-serif");var g=!1,y=!1;if(d.font&&(Array.isArray(d.font)?d.font:[d.font]).forEach(function(ne,Ce){if(typeof ne=="string")try{ne=v.parse(ne)}catch{ne=v.parse(E.baseFontSize+"px "+ne)}else{var Ze=ne.style,rt=ne.weight,Je=ne.stretch,St=ne.variant;ne=v.parse(v.stringify(ne)),Ze&&(ne.style=Ze),rt&&(ne.weight=rt),Je&&(ne.stretch=Je),St&&(ne.variant=St)}var kt=v.stringify({size:E.baseFontSize,family:ne.family,stretch:w?ne.stretch:void 0,variant:ne.variant,weight:ne.weight,style:ne.style}),Bt=n(ne.size),Vt=Math.round(Bt[0]*s(Bt[1]));if(Vt!==u.fontSize[Ce]&&(y=!0,u.fontSize[Ce]=Vt),(!u.font[Ce]||kt!=u.font[Ce].baseString)&&(g=!0,u.font[Ce]=E.fonts[kt],!u.font[Ce])){var Ar=ne.family.join(", "),vr=[ne.style];ne.style!=ne.variant&&vr.push(ne.variant),ne.variant!=ne.weight&&vr.push(ne.weight),w&&ne.weight!=ne.stretch&&vr.push(ne.stretch),u.font[Ce]={baseString:kt,family:Ar,weight:ne.weight,stretch:ne.stretch,style:ne.style,variant:ne.variant,width:{},kerning:{},metrics:m(Ar,{origin:"top",fontSize:E.baseFontSize,fontStyle:vr.join(" ")})},E.fonts[kt]=u.font[Ce]}}),(g||y)&&this.font.forEach(function(ne,Ce){var Ze=v.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[Ze],!u.fontAtlas[Ce]){var rt=ne.metrics;u.shader.atlas[Ze]=u.fontAtlas[Ce]={fontString:Ze,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()}}d.text==null&&(d.text=u.text)}),typeof d.text=="string"&&d.position&&d.position.length>2){for(var D=Array(d.position.length*.5),P=0;P2){for(var N=!d.position[0].length,O=o.mallocFloat(this.count*2),L=0,U=0;L1?u.align[Ce]:u.align[0]:u.align;if(typeof Ze=="number")return Ze;switch(Ze){case"right":case"end":return-ne;case"center":case"centre":case"middle":return-ne*.5}return 0})),this.baseline==null&&d.baseline==null&&(d.baseline=0),d.baseline!=null&&(this.baseline=d.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map(function(ne,Ce){var Ze=(u.font[Ce]||u.font[0]).metrics,rt=0;return rt+=Ze.bottom*.5,typeof ne=="number"?rt+=ne-Ze.baseline:rt+=-Ze[ne],rt*=-1,rt})),d.color!=null)if(d.color||(d.color="transparent"),typeof d.color=="string"||!isNaN(d.color))this.color=t(d.color,"uint8");else{var Re;if(typeof d.color[0]=="number"&&d.color.length>this.counts.length){var Pe=d.color.length;Re=o.mallocUint8(Pe);for(var je=(d.color.subarray||d.color.slice).bind(d.color),at=0;at4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2;if(Ve){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 se=0;se1?this.counts[se]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[se]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(se*4,se*4+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[se]:this.opacity,baseline:this.baselineOffset[se]!=null?this.baselineOffset[se]:this.baselineOffset[0],align:this.align?this.alignOffset[se]!=null?this.alignOffset[se]:this.alignOffset[0]:0,atlas:this.fontAtlas[se]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(se*2,se*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=[]}},E.prototype.destroy=function(){},E.prototype.kerning=!0,E.prototype.position={constant:new Float32Array(2)},E.prototype.translate=null,E.prototype.scale=null,E.prototype.font=null,E.prototype.text="",E.prototype.positionOffset=[0,0],E.prototype.opacity=1,E.prototype.color=new Uint8Array([0,0,0,255]),E.prototype.alignOffset=[0,0],E.maxAtlasSize=1024,E.atlasCanvas=document.createElement("canvas"),E.atlasContext=E.atlasCanvas.getContext("2d",{alpha:!1}),E.baseFontSize=64,E.fonts={};function p(b){return typeof b=="function"&&b._gl&&b.prop&&b.texture&&b.buffer}q.exports=E}}),Pq=He({"node_modules/@plotly/regl/dist/regl.unchecked.js"(Z,q){(function(v,_){typeof Z=="object"&&typeof q<"u"?q.exports=_():v.createREGL=_()})(Z,function(){"use strict";var v=function(it,Xt){for(var fr=Object.keys(Xt),oa=0;oa1&&Xt===fr&&(Xt==='"'||Xt==="'"))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 Ta=it.split(".");if(Ta.length===1)return['"'+r(it)+'"'];for(var ma=[],xa=0;xa"u"?1:window.devicePixelRatio,si=!1,gn={},zi=function(ea){},Ei=function(){};if(typeof Xt=="string"?fr=document.querySelector(Xt):typeof Xt=="object"&&(x(Xt)?fr=Xt:w(Xt)?(ma=Xt,Ta=ma.canvas):("gl"in Xt?ma=Xt.gl:"canvas"in Xt?Ta=E(Xt.canvas):"container"in Xt&&(oa=E(Xt.container)),"attributes"in Xt&&(xa=Xt.attributes),"extensions"in Xt&&(Ya=A(Xt.extensions)),"optionalExtensions"in Xt&&(bi=A(Xt.optionalExtensions)),"onDone"in Xt&&(zi=Xt.onDone),"profile"in Xt&&(si=!!Xt.profile),"pixelRatio"in Xt&&(yi=+Xt.pixelRatio),"cachedCode"in Xt&&(gn=Xt.cachedCode))),fr&&(fr.nodeName.toLowerCase()==="canvas"?Ta=fr:oa=fr),!ma){if(!Ta){var Na=T(oa||document.body,zi,yi);if(!Na)return null;Ta=Na.canvas,Ei=Na.onDestroy}xa.premultipliedAlpha===void 0&&(xa.premultipliedAlpha=!0),ma=l(Ta,xa)}return ma?{gl:ma,canvas:Ta,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,Xt){var fr={};function oa(xa){var Ya=xa.toLowerCase(),bi;try{bi=fr[Ya]=it.getExtension(Ya)}catch{}return!!bi}for(var Ta=0;Ta65535)<<4,it>>>=Xt,fr=(it>255)<<3,it>>>=fr,Xt|=fr,fr=(it>15)<<2,it>>>=fr,Xt|=fr,fr=(it>3)<<1,it>>>=fr,Xt|=fr,Xt|it>>1}function L(){var it=d(8,function(){return[]});function Xt(ma){var xa=N(ma),Ya=it[O(xa)>>2];return Ya.length>0?Ya.pop():new ArrayBuffer(xa)}function fr(ma){it[O(ma.byteLength)>>2].push(ma)}function oa(ma,xa){var Ya=null;switch(ma){case u:Ya=new Int8Array(Xt(xa),0,xa);break;case g:Ya=new Uint8Array(Xt(xa),0,xa);break;case y:Ya=new Int16Array(Xt(2*xa),0,xa);break;case D:Ya=new Uint16Array(Xt(2*xa),0,xa);break;case P:Ya=new Int32Array(Xt(4*xa),0,xa);break;case z:Ya=new Uint32Array(Xt(4*xa),0,xa);break;case F:Ya=new Float32Array(Xt(4*xa),0,xa);break;default:return null}return Ya.length!==xa?Ya.subarray(0,xa):Ya}function Ta(ma){fr(ma.buffer)}return{alloc:Xt,free:fr,allocType:oa,freeType:Ta}}var U=L();U.zero=L();var B=3408,W=3410,$=3411,ue=3412,ce=3413,de=3414,Y=3415,X=33901,Q=33902,V=3379,le=3386,ae=34921,j=36347,ee=36348,te=35661,pe=35660,we=34930,Se=36349,Re=34076,Pe=34024,je=7936,at=7937,nt=7938,tt=35724,Ve=34047,he=36063,se=34852,ne=3553,Ce=34067,Ze=34069,rt=33984,Je=6408,St=5126,kt=5121,Bt=36160,Vt=36053,Ar=36064,vr=16384,qr=function(it,Xt){var fr=1;Xt.ext_texture_filter_anisotropic&&(fr=it.getParameter(Ve));var oa=1,Ta=1;Xt.webgl_draw_buffers&&(oa=it.getParameter(se),Ta=it.getParameter(he));var ma=!!Xt.oes_texture_float;if(ma){var xa=it.createTexture();it.bindTexture(ne,xa),it.texImage2D(ne,0,Je,1,1,0,Je,St,null);var Ya=it.createFramebuffer();if(it.bindFramebuffer(Bt,Ya),it.framebufferTexture2D(Bt,Ar,ne,xa,0),it.bindTexture(ne,null),it.checkFramebufferStatus(Bt)!==Vt)ma=!1;else{it.viewport(0,0,1,1),it.clearColor(1,0,0,1),it.clear(vr);var bi=U.allocType(St,4);it.readPixels(0,0,1,1,Je,St,bi),it.getError()?ma=!1:(it.deleteFramebuffer(Ya),it.deleteTexture(xa),ma=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(Ze,0,Je,3,3,0,Je,kt,zi),U.freeType(zi),it.bindTexture(Ce,null),it.deleteTexture(gn),si=!it.getError()}return{colorBits:[it.getParameter(W),it.getParameter($),it.getParameter(ue),it.getParameter(ce)],depthBits:it.getParameter(de),stencilBits:it.getParameter(Y),subpixelBits:it.getParameter(B),extensions:Object.keys(Xt).filter(function(Ei){return!!Xt[Ei]}),maxAnisotropic:fr,maxDrawbuffers:oa,maxColorAttachments:Ta,pointSizeDims:it.getParameter(X),lineWidthDims:it.getParameter(Q),maxViewportDims:it.getParameter(le),maxCombinedTextureUnits:it.getParameter(te),maxCubeMapSize:it.getParameter(Re),maxRenderbufferSize:it.getParameter(Pe),maxTextureUnits:it.getParameter(we),maxTextureSize:it.getParameter(V),maxAttributes:it.getParameter(ae),maxVertexUniforms:it.getParameter(j),maxVertexTextureUnits:it.getParameter(pe),maxVaryingVectors:it.getParameter(ee),maxFragmentUniforms:it.getParameter(Se),glsl:it.getParameter(tt),renderer:it.getParameter(at),vendor:it.getParameter(je),version:it.getParameter(nt),readFloat:ma,npotTextureCube:si}},kr=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 Ur(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)||kr(it.data))}var _t=function(it){return Object.keys(it).map(function(Xt){return it[Xt]})},Fe={shape:st,flatten:Ke};function Ye(it,Xt,fr){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])||kr(Ha[0])){Ri=Ca(Ha);var xi=Wa(Ha,Ri,Va.dtype);Li(xi,Yi),U.freeType(xi)}}}else if(Ur(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 Cn=Array.isArray(Ha.data)?Va.dtype:Jt(Ha.data),Dn=U.allocType(Cn,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,fr.profile&&(Bi.stats=Va.stats),Bi.destroy=function(){zi(Va)},Bi}function Na(){_t(ma).forEach(function(ea){ea.buffer=it.createBuffer(),it.bindBuffer(ea.type,ea.buffer),it.bufferData(ea.type,ea.persistentData||ea.byteLength,ea.usage)})}return fr.profile&&(Xt.getTotalBufferSize=function(){var ea=0;return Object.keys(ma).forEach(function(Ma){ea+=ma[Ma].stats.size}),ea}),{create:Ei,createStream:bi,destroyStream:yi,clear:function(){_t(ma).forEach(zi),Ya.forEach(zi)},getBuffer:function(ea){return ea&&ea._buffer instanceof xa?ea._buffer:null},restore:Na,_initBuffer:gn}}var ca=0,Ba=0,$a=1,Za=1,ri=4,pi=4,Ia={points:ca,point:Ba,lines:$a,line:Za,triangles:ri,triangle:pi,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},rn=0,tn=1,cn=4,xt=5120,ut=5121,Or=5122,Cr=5123,wr=5124,Rr=5125,Nr=34963,Hr=35040,gt=35044;function Kt(it,Xt,fr,oa){var Ta={},ma=0,xa={uint8:ut,uint16:Cr};Xt.oes_element_index_uint&&(xa.uint32=Rr);function Ya(Na){this.id=ma++,Ta[this.id]=this,this.buffer=Na,this.primType=cn,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(fr.create(null,Nr,!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&&(!kr(ea)||Ur(ea)&&!kr(ea.data))&&(hn=Xt.oes_element_index_uint?Rr:Cr),fr._initBuffer(Na.buffer,ea,Ma,hn,3)}else it.bufferData(Nr,Va,Ma),Na.buffer.dtype=Li||ut,Na.buffer.usage=Ma,Na.buffer.dimension=3,Na.buffer.byteLength=Va;if(Li=Bi,!Bi){switch(Na.buffer.dtype){case ut:case xt:Li=ut;break;case Cr:case Or:Li=Cr;break;case Rr:case wr: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=cn;var Yi=Na.buffer.dimension;Yi===1&&(Ua=rn),Yi===2&&(Ua=tn),Yi===3&&(Ua=cn)}Na.primType=Ua}function zi(Na){oa.elementsCount--,delete Ta[Na.id],Na.buffer.destroy(),Na.buffer=null}function Ei(Na,ea){var Ma=fr.create(null,Nr,!0),Qa=new Ya(Ma._buffer);oa.elementsCount++;function di(Va){if(!Va)Ma(),Qa.primType=cn,Qa.vertCount=0,Qa.type=ut;else if(typeof Va=="number")Ma(Va),Qa.primType=cn,Qa.vertCount=Va|0,Qa.type=ut;else{var Bi=null,Li=gt,hn=-1,Ha=-1,Ua=0,Yi=0;Array.isArray(Va)||kr(Va)||Ur(Va)?Bi=Va:("data"in Va&&(Bi=Va.data),"usage"in Va&&(Li=qa[Va.usage]),"primitive"in Va&&(hn=Ia[Va.primitive]),"count"in Va&&(Ha=Va.count|0),"type"in Va&&(Yi=xa[Va.type]),"length"in Va?Ua=Va.length|0:(Ua=Ha,Yi===Cr||Yi===Or?Ua*=2:(Yi===Rr||Yi===wr)&&(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(Ta).forEach(zi)}}}var mr=new Float32Array(1),Ir=new Uint32Array(mr.buffer),va=5123;function Pa(it){for(var Xt=U.allocType(va,it.length),fr=0;fr>>31<<15,ma=(oa<<1>>>24)-127,xa=oa>>13&1023;if(ma<-24)Xt[fr]=Ta;else if(ma<-14){var Ya=-14-ma;Xt[fr]=Ta+(xa+1024>>Ya)}else ma>15?Xt[fr]=Ta+31744:Xt[fr]=Ta+(ma+15<<10)+xa}return Xt}function ga(it){return Array.isArray(it)||kr(it)}var la=34467,ba=3553,Ai=34067,ki=34069,Ki=6408,Mn=6406,wn=6407,On=6409,En=6410,ao=32854,Co=32855,bo=36194,zs=32819,kn=32820,wo=33635,Zn=34042,go=6402,os=34041,ys=35904,jo=35906,Yn=36193,Gn=33776,Hn=33777,ss=33778,_s=33779,ps=35986,Ko=35987,Gi=34798,Pn=35840,qs=35841,bs=35842,lo=35843,Zo=36196,ws=5121,Hs=5123,il=5125,yn=5126,Po=10242,To=10243,Ws=10497,Ll=33071,uo=33648,Nl=10240,Ks=10241,Ts=9728,Ls=9729,Jo=9984,Es=9985,Ul=9986,lu=9987,Tc=33170,du=4352,Sf=4353,Uc=4354,Bs=34046,dc=3317,Wc=37440,uu=37441,Pl=37443,ic=37444,Ou=33984,nl=[Jo,Ul,Es,lu],vl=[0,On,En,wn,Ki],As={};As[On]=As[Mn]=As[go]=1,As[os]=As[En]=2,As[wn]=As[ys]=3,As[Ki]=As[jo]=4;function Xs(it){return"[object "+it+"]"}var nc=Xs("HTMLCanvasElement"),jl=Xs("OffscreenCanvas"),qu=Xs("CanvasRenderingContext2D"),fl=Xs("ImageBitmap"),xh=Xs("HTMLImageElement"),us=Xs("HTMLVideoElement"),bh=Object.keys(ot).concat([nc,jl,qu,fl,xh,us]),Ps=[];Ps[ws]=1,Ps[yn]=4,Ps[Yn]=2,Ps[Hs]=2,Ps[il]=4;var to=[];to[ao]=2,to[Co]=2,to[bo]=2,to[os]=4,to[Gn]=.5,to[Hn]=.5,to[ss]=1,to[_s]=1,to[ps]=.5,to[Ko]=1,to[Gi]=1,to[Pn]=.5,to[qs]=.25,to[bs]=.5,to[lo]=.25,to[Zo]=.5;function Xc(it){return Array.isArray(it)&&(it.length===0||typeof it[0]=="number")}function Vu(it){if(!Array.isArray(it))return!1;var Xt=it.length;return!(Xt===0||!ga(it[0]))}function ql(it){return Object.prototype.toString.call(it)}function Mf(it){return ql(it)===nc}function Ac(it){return ql(it)===jl}function nf(it){return ql(it)===qu}function Ql(it){return ql(it)===fl}function Jf(it){return ql(it)===xh}function Of(it){return ql(it)===us}function of(it){if(!it)return!1;var Xt=ql(it);return bh.indexOf(Xt)>=0?!0:Xc(it)||Vu(it)||Ur(it)}function jc(it){return ot[Object.prototype.toString.call(it)]|0}function Bf(it,Xt){var fr=Xt.length;switch(it.type){case ws:case Hs:case il:case yn:var oa=U.allocType(it.type,fr);oa.set(Xt),it.data=oa;break;case Yn:it.data=Pa(Xt);break;default:}}function Nf(it,Xt){return U.allocType(it.type===Yn?yn:it.type,Xt)}function Gu(it,Xt){it.type===Yn?(it.data=Pa(Xt),U.freeType(Xt)):it.data=Xt}function Ef(it,Xt,fr,oa,Ta,ma){for(var xa=it.width,Ya=it.height,bi=it.channels,yi=xa*Ya*bi,si=Nf(it,yi),gn=0,zi=0;zi=1;)Ya+=xa*bi*bi,bi/=2;return Ya}else return xa*fr*oa}function Zc(it,Xt,fr,oa,Ta,ma,xa){var Ya={"don't care":du,"dont care":du,nice:Uc,fast:Sf},bi={repeat:Ws,clamp:Ll,mirror:uo},yi={nearest:Ts,linear:Ls},si=v({mipmap:lu,"nearest mipmap nearest":Jo,"linear mipmap nearest":Es,"nearest mipmap linear":Ul,"linear mipmap linear":lu},yi),gn={none:0,browser:ic},zi={uint8:ws,rgba4:zs,rgb565:wo,"rgb5 a1":kn},Ei={alpha:Mn,luminance:On,"luminance alpha":En,rgb:wn,rgba:Ki,rgba4:ao,"rgb5 a1":Co,rgb565:bo},Na={};Xt.ext_srgb&&(Ei.srgb=ys,Ei.srgba=jo),Xt.oes_texture_float&&(zi.float32=zi.float=yn),Xt.oes_texture_half_float&&(zi.float16=zi["half float"]=Yn),Xt.webgl_depth_texture&&(v(Ei,{depth:go,"depth stencil":os}),v(zi,{uint16:Hs,uint32:il,"depth stencil":Zn})),Xt.webgl_compressed_texture_s3tc&&v(Na,{"rgb s3tc dxt1":Gn,"rgba s3tc dxt1":Hn,"rgba s3tc dxt3":ss,"rgba s3tc dxt5":_s}),Xt.webgl_compressed_texture_atc&&v(Na,{"rgb atc":ps,"rgba atc explicit alpha":Ko,"rgba atc interpolated alpha":Gi}),Xt.webgl_compressed_texture_pvrtc&&v(Na,{"rgb pvrtc 4bppv1":Pn,"rgb pvrtc 2bppv1":qs,"rgba pvrtc 4bppv1":bs,"rgba pvrtc 2bppv1":lo}),Xt.webgl_compressed_texture_etc1&&(Na["rgb etc1"]=Zo);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);fr.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===On||vt===Mn||vt===On||vt===En||vt===go||vt===os||Xt.ext_srgb&&(vt===ys||vt===jo)?ke[vt]=vt:vt===Co||Qe.indexOf("rgba")>=0?ke[vt]=Ki:ke[vt]=wn,ke},{});function Ha(){this.internalformat=Ki,this.format=Ki,this.type=ws,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,br=ke.height,Br=ke.channels,pr=!1;"shape"in Qe?(qt=Qe.shape[0],br=Qe.shape[1],Qe.shape.length===3&&(Br=Qe.shape[2],pr=!0)):("radius"in Qe&&(qt=br=Qe.radius),"width"in Qe&&(qt=Qe.width),"height"in Qe&&(br=Qe.height),"channels"in Qe&&(Br=Qe.channels,pr=!0)),ke.width=qt|0,ke.height=br|0,ke.channels=Br|0;var mt=!1;if("format"in Qe){var Mt=Qe.format,Ft=ke.internalformat=Ei[Mt];ke.format=hn[Ft],Mt in zi&&("type"in Qe||(ke.type=zi[Mt])),Mt in Na&&(ke.compressed=!0),mt=!0}!pr&&mt?ke.channels=As[ke.format]:pr&&!mt&&ke.channels!==vl[ke.format]&&(ke.format=ke.internalformat=vl[ke.channels])}}function Ri(ke){it.pixelStorei(Wc,ke.flipY),it.pixelStorei(uu,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=Ta.viewportWidth,br=Ta.viewportHeight;ke.width=ke.width||qt-ke.xOffset,ke.height=ke.height||br-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(kr(vt))ke.channels=ke.channels||4,ke.data=vt,!("type"in Qe)&&ke.type===ws&&(ke.type=jc(vt));else if(Xc(vt))ke.channels=ke.channels||4,Bf(ke,vt),ke.alignment=1,ke.needsFree=!0;else if(Ur(vt)){var Br=vt.data;!Array.isArray(Br)&&ke.type===ws&&(ke.type=jc(Br));var pr=vt.shape,mt=vt.stride,Mt,Ft,rr,hr,sr,dr;pr.length===3?(rr=pr[2],dr=mt[2]):(rr=1,dr=1),Mt=pr[0],Ft=pr[1],hr=mt[0],sr=mt[1],ke.alignment=1,ke.width=Mt,ke.height=Ft,ke.channels=rr,ke.format=ke.internalformat=vl[rr],ke.needsFree=!0,Ef(ke,Br,hr,sr,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(Ql(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 lr=ke.width||vt[0].length,Wt=ke.height||vt.length,ir=ke.channels;ga(vt[0][0])?ir=ir||vt[0][0].length:ir=ir||1;for(var Gt=Fe.shape(vt),Dr=1,Jr=0;Jr>=br,vt.height>>=br,xi(vt,qt[br]),ke.mipmask|=1<=0&&!("faces"in Qe)&&(ke.genMipmaps=!0)}if("mag"in Qe){var qt=Qe.mag;ke.magFilter=yi[qt]}var br=ke.wrapS,Br=ke.wrapT;if("wrap"in Qe){var pr=Qe.wrap;typeof pr=="string"?br=Br=bi[pr]:Array.isArray(pr)&&(br=bi[pr[0]],Br=bi[pr[1]])}else{if("wrapS"in Qe){var mt=Qe.wrapS;br=bi[mt]}if("wrapT"in Qe){var Mt=Qe.wrapT;Br=bi[Mt]}}if(ke.wrapS=br,ke.wrapT=Br,"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=Jo)}}function El(ke,Qe){it.texParameteri(Qe,Ks,ke.minFilter),it.texParameteri(Qe,Nl,ke.magFilter),it.texParameteri(Qe,Po,ke.wrapS),it.texParameteri(Qe,To,ke.wrapT),Xt.ext_texture_filter_anisotropic&&it.texParameteri(Qe,Bs,ke.anisotropic),ke.genMipmaps&&(it.hint(Tc,ke.mipmapHint),it.generateMipmap(Qe))}var ru=0,js={},pl=fr.maxTextureUnits,bl=Array(pl).map(function(){return null});function Xn(ke){Ha.call(this),this.mipmask=0,this.internalformat=Ki,this.id=ru++,this.refCount=1,this.target=ke,this.texture=it.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new hs,xa.profile&&(this.stats={size:0})}function kl(ke){it.activeTexture(Ou),it.bindTexture(ke.target,ke.texture)}function Io(){var ke=bl[0];ke?it.bindTexture(ke.target,ke.texture):it.bindTexture(ba,null)}function ge(ke){var Qe=ke.texture,vt=ke.unit,qt=ke.target;vt>=0&&(it.activeTexture(Ou+vt),it.bindTexture(qt,null),bl[vt]=null),it.deleteTexture(Qe),ke.texture=null,ke.params=null,ke.pixels=null,ke.refCount=0,delete js[ke.id],ma.textureCount--}v(Xn.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}bl[vt]=ke,Qe=vt;break}Qe>=pl,xa.profile&&ma.maxTextureUnits>sr)-rr,dr.height=dr.height||(vt.height>>sr)-hr,kl(vt),vn(dr,ba,rr,hr,sr),Io(),nn(dr),qt}function Br(pr,mt){var Mt=pr|0,Ft=mt|0||Mt;if(Mt===vt.width&&Ft===vt.height)return qt;qt.width=vt.width=Mt,qt.height=vt.height=Ft,kl(vt);for(var rr=0;vt.mipmask>>rr;++rr){var hr=Mt>>rr,sr=Ft>>rr;if(!hr||!sr)break;it.texImage2D(ba,rr,vt.format,hr,sr,0,vt.format,vt.type,null)}return Io(),xa.profile&&(vt.stats.size=oc(vt.internalformat,vt.type,Mt,Ft,!1,!1)),qt}return qt(ke,Qe),qt.subimage=br,qt.resize=Br,qt._reglType="texture2d",qt._texture=vt,xa.profile&&(qt.stats=vt.stats),qt.destroy=function(){vt.decRef()},qt}function xe(ke,Qe,vt,qt,br,Br){var pr=new Xn(Ai);js[pr.id]=pr,ma.cubeCount++;var mt=new Array(6);function Mt(hr,sr,dr,lr,Wt,ir){var Gt,Dr=pr.texInfo;for(hs.call(Dr),Gt=0;Gt<6;++Gt)mt[Gt]=ho();if(typeof hr=="number"||!hr){var Jr=hr|0||1;for(Gt=0;Gt<6;++Gt)Dn(mt[Gt],Jr,Jr)}else if(typeof hr=="object")if(sr)Wn(mt[0],hr),Wn(mt[1],sr),Wn(mt[2],dr),Wn(mt[3],lr),Wn(mt[4],Wt),Wn(mt[5],ir);else if(Al(Dr,hr),Yi(pr,hr),"faces"in hr){var ya=hr.faces;for(Gt=0;Gt<6;++Gt)Ua(mt[Gt],pr),Wn(mt[Gt],ya[Gt])}else for(Gt=0;Gt<6;++Gt)Wn(mt[Gt],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,Mt.width=mt[0].width,Mt.height=mt[0].height,kl(pr),Gt=0;Gt<6;++Gt)Os(mt[Gt],ki+Gt);for(El(Dr,Ai),Io(),xa.profile&&(pr.stats.size=oc(pr.internalformat,pr.type,Mt.width,Mt.height,Dr.genMipmaps,!0)),Mt.format=Qa[pr.internalformat],Mt.type=di[pr.type],Mt.mag=Va[Dr.magFilter],Mt.min=Bi[Dr.minFilter],Mt.wrapS=Li[Dr.wrapS],Mt.wrapT=Li[Dr.wrapT],Gt=0;Gt<6;++Gt)Xl(mt[Gt]);return Mt}function Ft(hr,sr,dr,lr,Wt){var ir=dr|0,Gt=lr|0,Dr=Wt|0,Jr=Ii();return Ua(Jr,pr),Jr.width=0,Jr.height=0,xi(Jr,sr),Jr.width=Jr.width||(pr.width>>Dr)-ir,Jr.height=Jr.height||(pr.height>>Dr)-Gt,kl(pr),vn(Jr,ki+hr,ir,Gt,Dr),Io(),nn(Jr),Mt}function rr(hr){var sr=hr|0;if(sr!==pr.width){Mt.width=pr.width=sr,Mt.height=pr.height=sr,kl(pr);for(var dr=0;dr<6;++dr)for(var lr=0;pr.mipmask>>lr;++lr)it.texImage2D(ki+dr,lr,pr.format,sr>>lr,sr>>lr,0,pr.format,pr.type,null);return Io(),xa.profile&&(pr.stats.size=oc(pr.internalformat,pr.type,Mt.width,Mt.height,!1,!0)),Mt}}return Mt(ke,Qe,vt,qt,br,Br),Mt.subimage=Ft,Mt.resize=rr,Mt._reglType="textureCube",Mt._texture=pr,xa.profile&&(Mt.stats=pr.stats),Mt.destroy=function(){pr.decRef()},Mt}function re(){for(var ke=0;ke>qt,vt.height>>qt,0,vt.internalformat,vt.type,null);else for(var br=0;br<6;++br)it.texImage2D(ki+br,qt,vt.internalformat,vt.width>>qt,vt.height>>qt,0,vt.internalformat,vt.type,null);El(vt.texInfo,vt.target)})}function Ue(){for(var ke=0;ke=0?Xl=!0:bi.indexOf(hs)>=0&&(Xl=!1))),("depthTexture"in Xn||"depthStencilTexture"in Xn)&&(bl=!!(Xn.depthTexture||Xn.depthStencilTexture)),"depth"in Xn&&(typeof Xn.depth=="boolean"?Os=Xn.depth:(ru=Xn.depth,xl=!1)),"stencil"in Xn&&(typeof Xn.stencil=="boolean"?xl=Xn.stencil:(js=Xn.stencil,Os=!1)),"depthStencil"in Xn&&(typeof Xn.depthStencil=="boolean"?Os=xl=Xn.depthStencil:(pl=Xn.depthStencil,Os=!1,xl=!1))}var Io=null,ge=null,K=null,xe=null;if(Array.isArray(ho))Io=ho.map(Na);else if(ho)Io=[Na(ho)];else for(Io=new Array(El),Cn=0;Cn0&&(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 v(Xi,{width:Cn,height:Cn,color:hs})}function vn(Rn){var Ii,nn=Rn|0;if(nn===Xi.width)return Xi;var Cn=Xi.color;for(Ii=0;Ii=Cn.byteLength?Dn.subdata(Cn):(Dn.destroy(),Ua.buffers[Rn]=null)),Ua.buffers[Rn]||(Dn=Ua.buffers[Rn]=Ta.create(Ii,mf,!1,!0)),nn.buffer=Ta.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 Ta.getBuffer(Ii)?(nn.buffer=Ta.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):Ta.getBuffer(Ii.buffer)?(nn.buffer=Ta.getBuffer(Ii.buffer),nn.size=(+Ii.size||nn.buffer.dimension)|0,nn.normalized=!!Ii.normalized||!1,"type"in Ii?nn.type=_a[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 Wn=0;Wn1)for(var Ri=0;Riea&&(ea=Ma.stats.uniformsCount)}),ea},fr.getMaxAttributesCount=function(){var ea=0;return si.forEach(function(Ma){Ma.stats.attributesCount>ea&&(ea=Ma.stats.attributesCount)}),ea});function Na(){Ta={},ma={};for(var ea=0;ea16&&(fr=Pi(fr,it.length*8));for(var oa=Array(16),Ta=Array(16),ma=0;ma<16;ma++)oa[ma]=fr[ma]^909522486,Ta[ma]=fr[ma]^1549556828;var xa=Pi(oa.concat(Pc(Xt)),512+Xt.length*8);return Qt(Pi(Ta.concat(xa),768))}function xu(it){for(var Xt=Vf?"0123456789ABCDEF":"0123456789abcdef",fr="",oa,Ta=0;Ta>>4&15)+Xt.charAt(oa&15);return fr}function Lc(it){for(var Xt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",fr="",oa=it.length,Ta=0;Tait.length*8?fr+=Xu:fr+=Xt.charAt(ma>>>6*(3-xa)&63);return fr}function $c(it,Xt){var fr=Xt.length,oa=Array(),Ta,ma,xa,Ya,bi=Array(Math.ceil(it.length/2));for(Ta=0;Ta0;){for(Ya=Array(),xa=0,Ta=0;Ta0||ma>0)&&(Ya[Ya.length]=ma);oa[oa.length]=xa,bi=Ya}var yi="";for(Ta=oa.length-1;Ta>=0;Ta--)yi+=Xt.charAt(oa[Ta]);var si=Math.ceil(it.length*8/(Math.log(Xt.length)/Math.log(2)));for(Ta=yi.length;Ta>>6&31,128|oa&63):oa<=65535?Xt+=String.fromCharCode(224|oa>>>12&15,128|oa>>>6&63,128|oa&63):oa<=2097151&&(Xt+=String.fromCharCode(240|oa>>>18&7,128|oa>>>12&63,128|oa>>>6&63,128|oa&63));return Xt}function Pc(it){for(var Xt=Array(it.length>>2),fr=0;fr>5]|=(it.charCodeAt(fr/8)&255)<<24-fr%32;return Xt}function Qt(it){for(var Xt="",fr=0;fr>5]>>>24-fr%32&255);return Xt}function xr(it,Xt){return it>>>Xt|it<<32-Xt}function aa(it,Xt){return it>>>Xt}function $r(it,Xt,fr){return it&Xt^~it&fr}function ka(it,Xt,fr){return it&Xt^it&fr^Xt&fr}function li(it){return xr(it,2)^xr(it,13)^xr(it,22)}function Ci(it){return xr(it,6)^xr(it,11)^xr(it,25)}function Hi(it){return xr(it,7)^xr(it,18)^aa(it,3)}function Qi(it){return xr(it,17)^xr(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,Xt){var fr=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),oa=new Array(64),Ta,ma,xa,Ya,bi,yi,si,gn,zi,Ei,Na,ea;for(it[Xt>>5]|=128<<24-Xt%32,it[(Xt+64>>9<<4)+15]=Xt,zi=0;zi>16)+(Xt>>16)+(fr>>16);return oa<<16|fr&65535}function Ni(it){return Array.prototype.slice.call(it)}function mi(it){return Ni(it).join("")}function Sn(it){var Xt=it&&it.cache,fr=0,oa=[],Ta=[],ma=[];function xa(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 v(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 v(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 v(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;di2){for(var D=Array(d.position.length*.5),P=0;P2){for(var N=!d.position[0].length,O=o.mallocFloat(this.count*2),L=0,U=0;L1?u.align[Ce]:u.align[0]:u.align;if(typeof Ze=="number")return Ze;switch(Ze){case"right":case"end":return-ne;case"center":case"centre":case"middle":return-ne*.5}return 0})),this.baseline==null&&d.baseline==null&&(d.baseline=0),d.baseline!=null&&(this.baseline=d.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map(function(ne,Ce){var Ze=(u.font[Ce]||u.font[0]).metrics,rt=0;return rt+=Ze.bottom*.5,typeof ne=="number"?rt+=ne-Ze.baseline:rt+=-Ze[ne],rt*=-1,rt})),d.color!=null)if(d.color||(d.color="transparent"),typeof d.color=="string"||!isNaN(d.color))this.color=t(d.color,"uint8");else{var Re;if(typeof d.color[0]=="number"&&d.color.length>this.counts.length){var Pe=d.color.length;Re=o.mallocUint8(Pe);for(var je=(d.color.subarray||d.color.slice).bind(d.color),at=0;at4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2;if(Ve){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 se=0;se1?this.counts[se]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[se]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(se*4,se*4+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[se]:this.opacity,baseline:this.baselineOffset[se]!=null?this.baselineOffset[se]:this.baselineOffset[0],align:this.align?this.alignOffset[se]!=null?this.alignOffset[se]:this.alignOffset[0]:0,atlas:this.fontAtlas[se]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(se*2,se*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=[]}},E.prototype.destroy=function(){},E.prototype.kerning=!0,E.prototype.position={constant:new Float32Array(2)},E.prototype.translate=null,E.prototype.scale=null,E.prototype.font=null,E.prototype.text="",E.prototype.positionOffset=[0,0],E.prototype.opacity=1,E.prototype.color=new Uint8Array([0,0,0,255]),E.prototype.alignOffset=[0,0],E.maxAtlasSize=1024,E.atlasCanvas=document.createElement("canvas"),E.atlasContext=E.atlasCanvas.getContext("2d",{alpha:!1}),E.baseFontSize=64,E.fonts={};function p(b){return typeof b=="function"&&b._gl&&b.prop&&b.texture&&b.buffer}q.exports=E}}),Pq=He({"node_modules/@plotly/regl/dist/regl.unchecked.js"(Z,q){(function(v,_){typeof Z=="object"&&typeof q<"u"?q.exports=_():v.createREGL=_()})(Z,function(){"use strict";var v=function(it,Xt){for(var fr=Object.keys(Xt),oa=0;oa1&&Xt===fr&&(Xt==='"'||Xt==="'"))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 Ta=it.split(".");if(Ta.length===1)return['"'+r(it)+'"'];for(var ma=[],xa=0;xa"u"?1:window.devicePixelRatio,si=!1,gn={},zi=function(ea){},Ei=function(){};if(typeof Xt=="string"?fr=document.querySelector(Xt):typeof Xt=="object"&&(x(Xt)?fr=Xt:w(Xt)?(ma=Xt,Ta=ma.canvas):("gl"in Xt?ma=Xt.gl:"canvas"in Xt?Ta=E(Xt.canvas):"container"in Xt&&(oa=E(Xt.container)),"attributes"in Xt&&(xa=Xt.attributes),"extensions"in Xt&&(Ya=A(Xt.extensions)),"optionalExtensions"in Xt&&(bi=A(Xt.optionalExtensions)),"onDone"in Xt&&(zi=Xt.onDone),"profile"in Xt&&(si=!!Xt.profile),"pixelRatio"in Xt&&(yi=+Xt.pixelRatio),"cachedCode"in Xt&&(gn=Xt.cachedCode))),fr&&(fr.nodeName.toLowerCase()==="canvas"?Ta=fr:oa=fr),!ma){if(!Ta){var Na=T(oa||document.body,zi,yi);if(!Na)return null;Ta=Na.canvas,Ei=Na.onDestroy}xa.premultipliedAlpha===void 0&&(xa.premultipliedAlpha=!0),ma=l(Ta,xa)}return ma?{gl:ma,canvas:Ta,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,Xt){var fr={};function oa(xa){var Ya=xa.toLowerCase(),bi;try{bi=fr[Ya]=it.getExtension(Ya)}catch{}return!!bi}for(var Ta=0;Ta65535)<<4,it>>>=Xt,fr=(it>255)<<3,it>>>=fr,Xt|=fr,fr=(it>15)<<2,it>>>=fr,Xt|=fr,fr=(it>3)<<1,it>>>=fr,Xt|=fr,Xt|it>>1}function L(){var it=d(8,function(){return[]});function Xt(ma){var xa=N(ma),Ya=it[O(xa)>>2];return Ya.length>0?Ya.pop():new ArrayBuffer(xa)}function fr(ma){it[O(ma.byteLength)>>2].push(ma)}function oa(ma,xa){var Ya=null;switch(ma){case u:Ya=new Int8Array(Xt(xa),0,xa);break;case g:Ya=new Uint8Array(Xt(xa),0,xa);break;case y:Ya=new Int16Array(Xt(2*xa),0,xa);break;case D:Ya=new Uint16Array(Xt(2*xa),0,xa);break;case P:Ya=new Int32Array(Xt(4*xa),0,xa);break;case z:Ya=new Uint32Array(Xt(4*xa),0,xa);break;case F:Ya=new Float32Array(Xt(4*xa),0,xa);break;default:return null}return Ya.length!==xa?Ya.subarray(0,xa):Ya}function Ta(ma){fr(ma.buffer)}return{alloc:Xt,free:fr,allocType:oa,freeType:Ta}}var U=L();U.zero=L();var B=3408,W=3410,$=3411,ue=3412,ce=3413,de=3414,Y=3415,X=33901,Q=33902,V=3379,le=3386,ae=34921,j=36347,ee=36348,te=35661,pe=35660,we=34930,Se=36349,Re=34076,Pe=34024,je=7936,at=7937,nt=7938,tt=35724,Ve=34047,he=36063,se=34852,ne=3553,Ce=34067,Ze=34069,rt=33984,Je=6408,St=5126,kt=5121,Bt=36160,Vt=36053,Ar=36064,vr=16384,qr=function(it,Xt){var fr=1;Xt.ext_texture_filter_anisotropic&&(fr=it.getParameter(Ve));var oa=1,Ta=1;Xt.webgl_draw_buffers&&(oa=it.getParameter(se),Ta=it.getParameter(he));var ma=!!Xt.oes_texture_float;if(ma){var xa=it.createTexture();it.bindTexture(ne,xa),it.texImage2D(ne,0,Je,1,1,0,Je,St,null);var Ya=it.createFramebuffer();if(it.bindFramebuffer(Bt,Ya),it.framebufferTexture2D(Bt,Ar,ne,xa,0),it.bindTexture(ne,null),it.checkFramebufferStatus(Bt)!==Vt)ma=!1;else{it.viewport(0,0,1,1),it.clearColor(1,0,0,1),it.clear(vr);var bi=U.allocType(St,4);it.readPixels(0,0,1,1,Je,St,bi),it.getError()?ma=!1:(it.deleteFramebuffer(Ya),it.deleteTexture(xa),ma=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(Ze,0,Je,3,3,0,Je,kt,zi),U.freeType(zi),it.bindTexture(Ce,null),it.deleteTexture(gn),si=!it.getError()}return{colorBits:[it.getParameter(W),it.getParameter($),it.getParameter(ue),it.getParameter(ce)],depthBits:it.getParameter(de),stencilBits:it.getParameter(Y),subpixelBits:it.getParameter(B),extensions:Object.keys(Xt).filter(function(Ei){return!!Xt[Ei]}),maxAnisotropic:fr,maxDrawbuffers:oa,maxColorAttachments:Ta,pointSizeDims:it.getParameter(X),lineWidthDims:it.getParameter(Q),maxViewportDims:it.getParameter(le),maxCombinedTextureUnits:it.getParameter(te),maxCubeMapSize:it.getParameter(Re),maxRenderbufferSize:it.getParameter(Pe),maxTextureUnits:it.getParameter(we),maxTextureSize:it.getParameter(V),maxAttributes:it.getParameter(ae),maxVertexUniforms:it.getParameter(j),maxVertexTextureUnits:it.getParameter(pe),maxVaryingVectors:it.getParameter(ee),maxFragmentUniforms:it.getParameter(Se),glsl:it.getParameter(tt),renderer:it.getParameter(at),vendor:it.getParameter(je),version:it.getParameter(nt),readFloat:ma,npotTextureCube:si}},kr=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 Ur(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)||kr(it.data))}var _t=function(it){return Object.keys(it).map(function(Xt){return it[Xt]})},Fe={shape:st,flatten:Ke};function Ye(it,Xt,fr){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])||kr(Ha[0])){Ri=Ca(Ha);var xi=Wa(Ha,Ri,Va.dtype);Li(xi,Yi),U.freeType(xi)}}}else if(Ur(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 Ln=Array.isArray(Ha.data)?Va.dtype:Jt(Ha.data),Dn=U.allocType(Ln,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,fr.profile&&(Bi.stats=Va.stats),Bi.destroy=function(){zi(Va)},Bi}function Na(){_t(ma).forEach(function(ea){ea.buffer=it.createBuffer(),it.bindBuffer(ea.type,ea.buffer),it.bufferData(ea.type,ea.persistentData||ea.byteLength,ea.usage)})}return fr.profile&&(Xt.getTotalBufferSize=function(){var ea=0;return Object.keys(ma).forEach(function(Ma){ea+=ma[Ma].stats.size}),ea}),{create:Ei,createStream:bi,destroyStream:yi,clear:function(){_t(ma).forEach(zi),Ya.forEach(zi)},getBuffer:function(ea){return ea&&ea._buffer instanceof xa?ea._buffer:null},restore:Na,_initBuffer:gn}}var ca=0,Ba=0,$a=1,Za=1,ri=4,pi=4,Ia={points:ca,point:Ba,lines:$a,line:Za,triangles:ri,triangle:pi,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},rn=0,tn=1,cn=4,xt=5120,ut=5121,Or=5122,Cr=5123,wr=5124,Rr=5125,Nr=34963,Hr=35040,gt=35044;function Kt(it,Xt,fr,oa){var Ta={},ma=0,xa={uint8:ut,uint16:Cr};Xt.oes_element_index_uint&&(xa.uint32=Rr);function Ya(Na){this.id=ma++,Ta[this.id]=this,this.buffer=Na,this.primType=cn,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(fr.create(null,Nr,!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&&(!kr(ea)||Ur(ea)&&!kr(ea.data))&&(hn=Xt.oes_element_index_uint?Rr:Cr),fr._initBuffer(Na.buffer,ea,Ma,hn,3)}else it.bufferData(Nr,Va,Ma),Na.buffer.dtype=Li||ut,Na.buffer.usage=Ma,Na.buffer.dimension=3,Na.buffer.byteLength=Va;if(Li=Bi,!Bi){switch(Na.buffer.dtype){case ut:case xt:Li=ut;break;case Cr:case Or:Li=Cr;break;case Rr:case wr: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=cn;var Yi=Na.buffer.dimension;Yi===1&&(Ua=rn),Yi===2&&(Ua=tn),Yi===3&&(Ua=cn)}Na.primType=Ua}function zi(Na){oa.elementsCount--,delete Ta[Na.id],Na.buffer.destroy(),Na.buffer=null}function Ei(Na,ea){var Ma=fr.create(null,Nr,!0),Qa=new Ya(Ma._buffer);oa.elementsCount++;function di(Va){if(!Va)Ma(),Qa.primType=cn,Qa.vertCount=0,Qa.type=ut;else if(typeof Va=="number")Ma(Va),Qa.primType=cn,Qa.vertCount=Va|0,Qa.type=ut;else{var Bi=null,Li=gt,hn=-1,Ha=-1,Ua=0,Yi=0;Array.isArray(Va)||kr(Va)||Ur(Va)?Bi=Va:("data"in Va&&(Bi=Va.data),"usage"in Va&&(Li=qa[Va.usage]),"primitive"in Va&&(hn=Ia[Va.primitive]),"count"in Va&&(Ha=Va.count|0),"type"in Va&&(Yi=xa[Va.type]),"length"in Va?Ua=Va.length|0:(Ua=Ha,Yi===Cr||Yi===Or?Ua*=2:(Yi===Rr||Yi===wr)&&(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(Ta).forEach(zi)}}}var mr=new Float32Array(1),Ir=new Uint32Array(mr.buffer),va=5123;function Pa(it){for(var Xt=U.allocType(va,it.length),fr=0;fr>>31<<15,ma=(oa<<1>>>24)-127,xa=oa>>13&1023;if(ma<-24)Xt[fr]=Ta;else if(ma<-14){var Ya=-14-ma;Xt[fr]=Ta+(xa+1024>>Ya)}else ma>15?Xt[fr]=Ta+31744:Xt[fr]=Ta+(ma+15<<10)+xa}return Xt}function ga(it){return Array.isArray(it)||kr(it)}var la=34467,ba=3553,Ai=34067,ki=34069,Ki=6408,En=6406,Tn=6407,On=6409,kn=6410,ao=32854,Co=32855,bo=36194,zs=32819,Cn=32820,wo=33635,Zn=34042,go=6402,os=34041,ys=35904,jo=35906,Yn=36193,Gn=33776,Hn=33777,ss=33778,_s=33779,ps=35986,Ko=35987,Gi=34798,Pn=35840,qs=35841,bs=35842,lo=35843,Zo=36196,ws=5121,Hs=5123,il=5125,yn=5126,Po=10242,To=10243,Ws=10497,Ll=33071,uo=33648,Nl=10240,Ks=10241,Ts=9728,Ls=9729,Jo=9984,Es=9985,Ul=9986,lu=9987,Tc=33170,du=4352,Sf=4353,Uc=4354,Bs=34046,dc=3317,Wc=37440,uu=37441,Pl=37443,ic=37444,Ou=33984,nl=[Jo,Ul,Es,lu],vl=[0,On,kn,Tn,Ki],As={};As[On]=As[En]=As[go]=1,As[os]=As[kn]=2,As[Tn]=As[ys]=3,As[Ki]=As[jo]=4;function Xs(it){return"[object "+it+"]"}var nc=Xs("HTMLCanvasElement"),jl=Xs("OffscreenCanvas"),qu=Xs("CanvasRenderingContext2D"),fl=Xs("ImageBitmap"),xh=Xs("HTMLImageElement"),us=Xs("HTMLVideoElement"),bh=Object.keys(ot).concat([nc,jl,qu,fl,xh,us]),Ps=[];Ps[ws]=1,Ps[yn]=4,Ps[Yn]=2,Ps[Hs]=2,Ps[il]=4;var to=[];to[ao]=2,to[Co]=2,to[bo]=2,to[os]=4,to[Gn]=.5,to[Hn]=.5,to[ss]=1,to[_s]=1,to[ps]=.5,to[Ko]=1,to[Gi]=1,to[Pn]=.5,to[qs]=.25,to[bs]=.5,to[lo]=.25,to[Zo]=.5;function Xc(it){return Array.isArray(it)&&(it.length===0||typeof it[0]=="number")}function Vu(it){if(!Array.isArray(it))return!1;var Xt=it.length;return!(Xt===0||!ga(it[0]))}function ql(it){return Object.prototype.toString.call(it)}function Mf(it){return ql(it)===nc}function Ac(it){return ql(it)===jl}function nf(it){return ql(it)===qu}function Ql(it){return ql(it)===fl}function Jf(it){return ql(it)===xh}function Of(it){return ql(it)===us}function of(it){if(!it)return!1;var Xt=ql(it);return bh.indexOf(Xt)>=0?!0:Xc(it)||Vu(it)||Ur(it)}function jc(it){return ot[Object.prototype.toString.call(it)]|0}function Bf(it,Xt){var fr=Xt.length;switch(it.type){case ws:case Hs:case il:case yn:var oa=U.allocType(it.type,fr);oa.set(Xt),it.data=oa;break;case Yn:it.data=Pa(Xt);break;default:}}function Nf(it,Xt){return U.allocType(it.type===Yn?yn:it.type,Xt)}function Gu(it,Xt){it.type===Yn?(it.data=Pa(Xt),U.freeType(Xt)):it.data=Xt}function Ef(it,Xt,fr,oa,Ta,ma){for(var xa=it.width,Ya=it.height,bi=it.channels,yi=xa*Ya*bi,si=Nf(it,yi),gn=0,zi=0;zi=1;)Ya+=xa*bi*bi,bi/=2;return Ya}else return xa*fr*oa}function Zc(it,Xt,fr,oa,Ta,ma,xa){var Ya={"don't care":du,"dont care":du,nice:Uc,fast:Sf},bi={repeat:Ws,clamp:Ll,mirror:uo},yi={nearest:Ts,linear:Ls},si=v({mipmap:lu,"nearest mipmap nearest":Jo,"linear mipmap nearest":Es,"nearest mipmap linear":Ul,"linear mipmap linear":lu},yi),gn={none:0,browser:ic},zi={uint8:ws,rgba4:zs,rgb565:wo,"rgb5 a1":Cn},Ei={alpha:En,luminance:On,"luminance alpha":kn,rgb:Tn,rgba:Ki,rgba4:ao,"rgb5 a1":Co,rgb565:bo},Na={};Xt.ext_srgb&&(Ei.srgb=ys,Ei.srgba=jo),Xt.oes_texture_float&&(zi.float32=zi.float=yn),Xt.oes_texture_half_float&&(zi.float16=zi["half float"]=Yn),Xt.webgl_depth_texture&&(v(Ei,{depth:go,"depth stencil":os}),v(zi,{uint16:Hs,uint32:il,"depth stencil":Zn})),Xt.webgl_compressed_texture_s3tc&&v(Na,{"rgb s3tc dxt1":Gn,"rgba s3tc dxt1":Hn,"rgba s3tc dxt3":ss,"rgba s3tc dxt5":_s}),Xt.webgl_compressed_texture_atc&&v(Na,{"rgb atc":ps,"rgba atc explicit alpha":Ko,"rgba atc interpolated alpha":Gi}),Xt.webgl_compressed_texture_pvrtc&&v(Na,{"rgb pvrtc 4bppv1":Pn,"rgb pvrtc 2bppv1":qs,"rgba pvrtc 4bppv1":bs,"rgba pvrtc 2bppv1":lo}),Xt.webgl_compressed_texture_etc1&&(Na["rgb etc1"]=Zo);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);fr.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===On||vt===En||vt===On||vt===kn||vt===go||vt===os||Xt.ext_srgb&&(vt===ys||vt===jo)?ke[vt]=vt:vt===Co||Qe.indexOf("rgba")>=0?ke[vt]=Ki:ke[vt]=Tn,ke},{});function Ha(){this.internalformat=Ki,this.format=Ki,this.type=ws,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,br=ke.height,Br=ke.channels,pr=!1;"shape"in Qe?(qt=Qe.shape[0],br=Qe.shape[1],Qe.shape.length===3&&(Br=Qe.shape[2],pr=!0)):("radius"in Qe&&(qt=br=Qe.radius),"width"in Qe&&(qt=Qe.width),"height"in Qe&&(br=Qe.height),"channels"in Qe&&(Br=Qe.channels,pr=!0)),ke.width=qt|0,ke.height=br|0,ke.channels=Br|0;var mt=!1;if("format"in Qe){var Mt=Qe.format,Ft=ke.internalformat=Ei[Mt];ke.format=hn[Ft],Mt in zi&&("type"in Qe||(ke.type=zi[Mt])),Mt in Na&&(ke.compressed=!0),mt=!0}!pr&&mt?ke.channels=As[ke.format]:pr&&!mt&&ke.channels!==vl[ke.format]&&(ke.format=ke.internalformat=vl[ke.channels])}}function Ri(ke){it.pixelStorei(Wc,ke.flipY),it.pixelStorei(uu,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=Ta.viewportWidth,br=Ta.viewportHeight;ke.width=ke.width||qt-ke.xOffset,ke.height=ke.height||br-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(kr(vt))ke.channels=ke.channels||4,ke.data=vt,!("type"in Qe)&&ke.type===ws&&(ke.type=jc(vt));else if(Xc(vt))ke.channels=ke.channels||4,Bf(ke,vt),ke.alignment=1,ke.needsFree=!0;else if(Ur(vt)){var Br=vt.data;!Array.isArray(Br)&&ke.type===ws&&(ke.type=jc(Br));var pr=vt.shape,mt=vt.stride,Mt,Ft,rr,hr,sr,dr;pr.length===3?(rr=pr[2],dr=mt[2]):(rr=1,dr=1),Mt=pr[0],Ft=pr[1],hr=mt[0],sr=mt[1],ke.alignment=1,ke.width=Mt,ke.height=Ft,ke.channels=rr,ke.format=ke.internalformat=vl[rr],ke.needsFree=!0,Ef(ke,Br,hr,sr,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(Ql(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 lr=ke.width||vt[0].length,Wt=ke.height||vt.length,ir=ke.channels;ga(vt[0][0])?ir=ir||vt[0][0].length:ir=ir||1;for(var Gt=Fe.shape(vt),Dr=1,Jr=0;Jr>=br,vt.height>>=br,xi(vt,qt[br]),ke.mipmask|=1<=0&&!("faces"in Qe)&&(ke.genMipmaps=!0)}if("mag"in Qe){var qt=Qe.mag;ke.magFilter=yi[qt]}var br=ke.wrapS,Br=ke.wrapT;if("wrap"in Qe){var pr=Qe.wrap;typeof pr=="string"?br=Br=bi[pr]:Array.isArray(pr)&&(br=bi[pr[0]],Br=bi[pr[1]])}else{if("wrapS"in Qe){var mt=Qe.wrapS;br=bi[mt]}if("wrapT"in Qe){var Mt=Qe.wrapT;Br=bi[Mt]}}if(ke.wrapS=br,ke.wrapT=Br,"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=Jo)}}function El(ke,Qe){it.texParameteri(Qe,Ks,ke.minFilter),it.texParameteri(Qe,Nl,ke.magFilter),it.texParameteri(Qe,Po,ke.wrapS),it.texParameteri(Qe,To,ke.wrapT),Xt.ext_texture_filter_anisotropic&&it.texParameteri(Qe,Bs,ke.anisotropic),ke.genMipmaps&&(it.hint(Tc,ke.mipmapHint),it.generateMipmap(Qe))}var ru=0,js={},pl=fr.maxTextureUnits,bl=Array(pl).map(function(){return null});function Xn(ke){Ha.call(this),this.mipmask=0,this.internalformat=Ki,this.id=ru++,this.refCount=1,this.target=ke,this.texture=it.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new hs,xa.profile&&(this.stats={size:0})}function kl(ke){it.activeTexture(Ou),it.bindTexture(ke.target,ke.texture)}function Io(){var ke=bl[0];ke?it.bindTexture(ke.target,ke.texture):it.bindTexture(ba,null)}function ge(ke){var Qe=ke.texture,vt=ke.unit,qt=ke.target;vt>=0&&(it.activeTexture(Ou+vt),it.bindTexture(qt,null),bl[vt]=null),it.deleteTexture(Qe),ke.texture=null,ke.params=null,ke.pixels=null,ke.refCount=0,delete js[ke.id],ma.textureCount--}v(Xn.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}bl[vt]=ke,Qe=vt;break}Qe>=pl,xa.profile&&ma.maxTextureUnits>sr)-rr,dr.height=dr.height||(vt.height>>sr)-hr,kl(vt),vn(dr,ba,rr,hr,sr),Io(),nn(dr),qt}function Br(pr,mt){var Mt=pr|0,Ft=mt|0||Mt;if(Mt===vt.width&&Ft===vt.height)return qt;qt.width=vt.width=Mt,qt.height=vt.height=Ft,kl(vt);for(var rr=0;vt.mipmask>>rr;++rr){var hr=Mt>>rr,sr=Ft>>rr;if(!hr||!sr)break;it.texImage2D(ba,rr,vt.format,hr,sr,0,vt.format,vt.type,null)}return Io(),xa.profile&&(vt.stats.size=oc(vt.internalformat,vt.type,Mt,Ft,!1,!1)),qt}return qt(ke,Qe),qt.subimage=br,qt.resize=Br,qt._reglType="texture2d",qt._texture=vt,xa.profile&&(qt.stats=vt.stats),qt.destroy=function(){vt.decRef()},qt}function xe(ke,Qe,vt,qt,br,Br){var pr=new Xn(Ai);js[pr.id]=pr,ma.cubeCount++;var mt=new Array(6);function Mt(hr,sr,dr,lr,Wt,ir){var Gt,Dr=pr.texInfo;for(hs.call(Dr),Gt=0;Gt<6;++Gt)mt[Gt]=ho();if(typeof hr=="number"||!hr){var Jr=hr|0||1;for(Gt=0;Gt<6;++Gt)Dn(mt[Gt],Jr,Jr)}else if(typeof hr=="object")if(sr)Wn(mt[0],hr),Wn(mt[1],sr),Wn(mt[2],dr),Wn(mt[3],lr),Wn(mt[4],Wt),Wn(mt[5],ir);else if(Al(Dr,hr),Yi(pr,hr),"faces"in hr){var ya=hr.faces;for(Gt=0;Gt<6;++Gt)Ua(mt[Gt],pr),Wn(mt[Gt],ya[Gt])}else for(Gt=0;Gt<6;++Gt)Wn(mt[Gt],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,Mt.width=mt[0].width,Mt.height=mt[0].height,kl(pr),Gt=0;Gt<6;++Gt)Os(mt[Gt],ki+Gt);for(El(Dr,Ai),Io(),xa.profile&&(pr.stats.size=oc(pr.internalformat,pr.type,Mt.width,Mt.height,Dr.genMipmaps,!0)),Mt.format=Qa[pr.internalformat],Mt.type=di[pr.type],Mt.mag=Va[Dr.magFilter],Mt.min=Bi[Dr.minFilter],Mt.wrapS=Li[Dr.wrapS],Mt.wrapT=Li[Dr.wrapT],Gt=0;Gt<6;++Gt)Xl(mt[Gt]);return Mt}function Ft(hr,sr,dr,lr,Wt){var ir=dr|0,Gt=lr|0,Dr=Wt|0,Jr=Ii();return Ua(Jr,pr),Jr.width=0,Jr.height=0,xi(Jr,sr),Jr.width=Jr.width||(pr.width>>Dr)-ir,Jr.height=Jr.height||(pr.height>>Dr)-Gt,kl(pr),vn(Jr,ki+hr,ir,Gt,Dr),Io(),nn(Jr),Mt}function rr(hr){var sr=hr|0;if(sr!==pr.width){Mt.width=pr.width=sr,Mt.height=pr.height=sr,kl(pr);for(var dr=0;dr<6;++dr)for(var lr=0;pr.mipmask>>lr;++lr)it.texImage2D(ki+dr,lr,pr.format,sr>>lr,sr>>lr,0,pr.format,pr.type,null);return Io(),xa.profile&&(pr.stats.size=oc(pr.internalformat,pr.type,Mt.width,Mt.height,!1,!0)),Mt}}return Mt(ke,Qe,vt,qt,br,Br),Mt.subimage=Ft,Mt.resize=rr,Mt._reglType="textureCube",Mt._texture=pr,xa.profile&&(Mt.stats=pr.stats),Mt.destroy=function(){pr.decRef()},Mt}function re(){for(var ke=0;ke>qt,vt.height>>qt,0,vt.internalformat,vt.type,null);else for(var br=0;br<6;++br)it.texImage2D(ki+br,qt,vt.internalformat,vt.width>>qt,vt.height>>qt,0,vt.internalformat,vt.type,null);El(vt.texInfo,vt.target)})}function Ue(){for(var ke=0;ke=0?Xl=!0:bi.indexOf(hs)>=0&&(Xl=!1))),("depthTexture"in Xn||"depthStencilTexture"in Xn)&&(bl=!!(Xn.depthTexture||Xn.depthStencilTexture)),"depth"in Xn&&(typeof Xn.depth=="boolean"?Os=Xn.depth:(ru=Xn.depth,xl=!1)),"stencil"in Xn&&(typeof Xn.stencil=="boolean"?xl=Xn.stencil:(js=Xn.stencil,Os=!1)),"depthStencil"in Xn&&(typeof Xn.depthStencil=="boolean"?Os=xl=Xn.depthStencil:(pl=Xn.depthStencil,Os=!1,xl=!1))}var Io=null,ge=null,K=null,xe=null;if(Array.isArray(ho))Io=ho.map(Na);else if(ho)Io=[Na(ho)];else for(Io=new Array(El),Ln=0;Ln0&&(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 v(Xi,{width:Ln,height:Ln,color:hs})}function vn(Rn){var Ii,nn=Rn|0;if(nn===Xi.width)return Xi;var Ln=Xi.color;for(Ii=0;Ii=Ln.byteLength?Dn.subdata(Ln):(Dn.destroy(),Ua.buffers[Rn]=null)),Ua.buffers[Rn]||(Dn=Ua.buffers[Rn]=Ta.create(Ii,mf,!1,!0)),nn.buffer=Ta.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 Ta.getBuffer(Ii)?(nn.buffer=Ta.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):Ta.getBuffer(Ii.buffer)?(nn.buffer=Ta.getBuffer(Ii.buffer),nn.size=(+Ii.size||nn.buffer.dimension)|0,nn.normalized=!!Ii.normalized||!1,"type"in Ii?nn.type=_a[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 Wn=0;Wn1)for(var Ri=0;Riea&&(ea=Ma.stats.uniformsCount)}),ea},fr.getMaxAttributesCount=function(){var ea=0;return si.forEach(function(Ma){Ma.stats.attributesCount>ea&&(ea=Ma.stats.attributesCount)}),ea});function Na(){Ta={},ma={};for(var ea=0;ea16&&(fr=Pi(fr,it.length*8));for(var oa=Array(16),Ta=Array(16),ma=0;ma<16;ma++)oa[ma]=fr[ma]^909522486,Ta[ma]=fr[ma]^1549556828;var xa=Pi(oa.concat(Pc(Xt)),512+Xt.length*8);return Qt(Pi(Ta.concat(xa),768))}function xu(it){for(var Xt=Vf?"0123456789ABCDEF":"0123456789abcdef",fr="",oa,Ta=0;Ta>>4&15)+Xt.charAt(oa&15);return fr}function Lc(it){for(var Xt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",fr="",oa=it.length,Ta=0;Tait.length*8?fr+=Xu:fr+=Xt.charAt(ma>>>6*(3-xa)&63);return fr}function $c(it,Xt){var fr=Xt.length,oa=Array(),Ta,ma,xa,Ya,bi=Array(Math.ceil(it.length/2));for(Ta=0;Ta0;){for(Ya=Array(),xa=0,Ta=0;Ta0||ma>0)&&(Ya[Ya.length]=ma);oa[oa.length]=xa,bi=Ya}var yi="";for(Ta=oa.length-1;Ta>=0;Ta--)yi+=Xt.charAt(oa[Ta]);var si=Math.ceil(it.length*8/(Math.log(Xt.length)/Math.log(2)));for(Ta=yi.length;Ta>>6&31,128|oa&63):oa<=65535?Xt+=String.fromCharCode(224|oa>>>12&15,128|oa>>>6&63,128|oa&63):oa<=2097151&&(Xt+=String.fromCharCode(240|oa>>>18&7,128|oa>>>12&63,128|oa>>>6&63,128|oa&63));return Xt}function Pc(it){for(var Xt=Array(it.length>>2),fr=0;fr>5]|=(it.charCodeAt(fr/8)&255)<<24-fr%32;return Xt}function Qt(it){for(var Xt="",fr=0;fr>5]>>>24-fr%32&255);return Xt}function xr(it,Xt){return it>>>Xt|it<<32-Xt}function aa(it,Xt){return it>>>Xt}function $r(it,Xt,fr){return it&Xt^~it&fr}function ka(it,Xt,fr){return it&Xt^it&fr^Xt&fr}function li(it){return xr(it,2)^xr(it,13)^xr(it,22)}function Ci(it){return xr(it,6)^xr(it,11)^xr(it,25)}function Hi(it){return xr(it,7)^xr(it,18)^aa(it,3)}function Qi(it){return xr(it,17)^xr(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,Xt){var fr=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),oa=new Array(64),Ta,ma,xa,Ya,bi,yi,si,gn,zi,Ei,Na,ea;for(it[Xt>>5]|=128<<24-Xt%32,it[(Xt+64>>9<<4)+15]=Xt,zi=0;zi>16)+(Xt>>16)+(fr>>16);return oa<<16|fr&65535}function Ni(it){return Array.prototype.slice.call(it)}function mi(it){return Ni(it).join("")}function Mn(it){var Xt=it&&it.cache,fr=0,oa=[],Ta=[],ma=[];function xa(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 v(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 v(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 v(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)||kr(it)||Ur(it)}function ni(it){return it.sort(function(Xt,fr){return Xt===Me?-1:fr===Me?1:Xt=1,oa>=2,Xt)}else if(fr===ks){var Ta=it.data;return new La(Ta.thisDep,Ta.contextDep,Ta.propDep,Xt)}else{if(fr===rl)return new La(!1,!1,!1,Xt);if(fr===Ns){for(var ma=!1,xa=!1,Ya=!1,bi=0;bi=1&&(xa=!0),si>=2&&(Ya=!0)}else yi.type===ks&&(ma=ma||yi.data.thisDep,xa=xa||yi.data.contextDep,Ya=Ya||yi.data.propDep)}return new La(ma,xa,Ya,Xt)}else return new La(fr===Qo,fr===yo,fr===un,Xt)}}var In=new La(!1,!1,!1,function(){});function Jn(it,Xt,fr,oa,Ta,ma,xa,Ya,bi,yi,si,gn,zi,Ei,Na,ea){var Ma=yi.Record,Qa={add:32774,subtract:32778,"reverse subtract":32779};fr.ext_blend_minmax&&(Qa.min=yt,Qa.max=Tt);var di=fr.angle_instanced_arrays,Va=fr.webgl_draw_buffers,Bi=fr.oes_vertex_array_object,Li={dirty:!0,profile:ea.profile},hn={},Ha=[],Ua={},Yi={};function Ri(mt){return mt.replace(".","_")}function Ti(mt,Mt,Ft){var rr=Ri(mt);Ha.push(mt),hn[rr]=Li[rr]=!!Ft,Ua[rr]=Mt}function xi(mt,Mt,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]=Mt}function Xi(mt){return!!isNaN(mt)}Ti(el,ci),Ti(Ss,Da),xi(Fl,"blendColor",[0,0,0,0]),xi(yl,"blendEquationSeparate",[Xr,Xr]),xi(ll,"blendFuncSeparate",[Gr,_r,Gr,_r]),Ti(Un,ji,!0),xi(Ro,"depthFunc",wa),xi(Js,"depthRange",[0,1]),xi(Fs,"depthMask",!0),xi(cu,cu,[!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,Kn),Ti(fo,Bn),xi(Fo,"sampleCoverage",[1,!1]),Ti(Dc,Vi),xi(lc,"stencilMask",-1),xi(Yu,"stencilFunc",[tr,0,-1]),xi(Oe,"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:Xt,next:hn,current:Li,draw:gn,elements:ma,buffer:Ta,shader:si,attributes:yi.state,vao:yi,uniforms:bi,framebuffer:Ya,extensions:fr,timer:Ei,isBufferArgs:fi},Rn={primTypes:Ia,compareFuncs:Sa,blendFuncs:ti,blendEquations:Qa,stencilOps:za,glTypes:_a,orientationType:Xa};Va&&(Rn.backBuffer=[De],Rn.drawBuffer=d(oa.maxDrawbuffers,function(mt){return mt===0?[0]:d(mt,function(Mt){return Ja+Mt})}));var Ii=0;function nn(){var mt=Sn({cache:Na}),Mt=mt.link,Ft=mt.global;mt.id=Ii++,mt.batchId="0";var rr=Mt(vn),hr=mt.shared={props:"a0"};Object.keys(vn).forEach(function(ir){hr[ir]=Ft.def(rr,".",ir)});var sr=mt.next={},dr=mt.current={};Object.keys(Yi).forEach(function(ir){Array.isArray(Li[ir])&&(sr[ir]=Ft.def(hr.next,".",ir),dr[ir]=Ft.def(hr.current,".",ir))});var lr=mt.constants={};Object.keys(Rn).forEach(function(ir){lr[ir]=Ft.def(JSON.stringify(Rn[ir]))}),mt.invoke=function(ir,Gt){switch(Gt.type){case Tn:var Dr=["this",hr.context,hr.props,mt.batchId];return ir.def(Mt(Gt.data),".call(",Dr.slice(0,Math.max(Gt.data.length+1,4)),")");case un:return ir.def(hr.props,Gt.data);case yo:return ir.def(hr.context,Gt.data);case Qo:return ir.def("this",Gt.data);case ks:return Gt.data.append(mt,ir),Gt.data.ref;case rl:return Gt.data.toString();case Ns:return Gt.data.map(function(Jr){return mt.invoke(ir,Jr)})}},mt.attribCache={};var Wt={};return mt.scopeAttrib=function(ir){var Gt=Xt.id(ir);if(Gt in Wt)return Wt[Gt];var Dr=yi.scope[Gt];Dr||(Dr=yi.scope[Gt]=new Ma);var Jr=Wt[Gt]=Mt(Dr);return Jr},mt}function Cn(mt){var Mt=mt.static,Ft=mt.dynamic,rr;if(ze in Mt){var hr=!!Mt[ze];rr=an(function(dr,lr){return hr}),rr.enable=hr}else if(ze in Ft){var sr=Ft[ze];rr=dn(sr,function(dr,lr){return dr.invoke(lr,sr)})}return rr}function Dn(mt,Mt){var Ft=mt.static,rr=mt.dynamic;if(ht in Ft){var hr=Ft[ht];return hr?(hr=Ya.getFramebuffer(hr),an(function(dr,lr){var Wt=dr.link(hr),ir=dr.shared;lr.set(ir.framebuffer,".next",Wt);var Gt=ir.context;return lr.set(Gt,"."+pt,Wt+".width"),lr.set(Gt,"."+Et,Wt+".height"),Wt})):an(function(dr,lr){var Wt=dr.shared;lr.set(Wt.framebuffer,".next","null");var ir=Wt.context;return lr.set(ir,"."+pt,ir+"."+yr),lr.set(ir,"."+Et,ir+"."+Er),"null"})}else if(ht in rr){var sr=rr[ht];return dn(sr,function(dr,lr){var Wt=dr.invoke(lr,sr),ir=dr.shared,Gt=ir.framebuffer,Dr=lr.def(Gt,".getFramebuffer(",Wt,")");lr.set(Gt,".next",Dr);var Jr=ir.context;return lr.set(Jr,"."+pt,Dr+"?"+Dr+".width:"+Jr+"."+yr),lr.set(Jr,"."+Et,Dr+"?"+Dr+".height:"+Jr+"."+Er),Dr})}else return null}function Wn(mt,Mt,Ft){var rr=mt.static,hr=mt.dynamic;function sr(Wt){if(Wt in rr){var ir=rr[Wt],Gt=!0,Dr=ir.x|0,Jr=ir.y|0,ya,vi;return"width"in ir?ya=ir.width|0:Gt=!1,"height"in ir?vi=ir.height|0:Gt=!1,new La(!Gt&&Mt&&Mt.thisDep,!Gt&&Mt&&Mt.contextDep,!Gt&&Mt&&Mt.propDep,function(Zi,Fi){var ui=Zi.shared.context,_i=ya;"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"),fn=Fi.def('"width" in ',ui,"?",ui,".width|0:","(",_i,".",pt,"-",Si,")"),_o=Fi.def('"height" in ',ui,"?",ui,".height|0:","(",_i,".",Et,"-",Ui,")");return[Si,Ui,fn,_o]});return Mt&&(ai.thisDep=ai.thisDep||Mt.thisDep,ai.contextDep=ai.contextDep||Mt.contextDep,ai.propDep=ai.propDep||Mt.propDep),ai}else return Mt?new La(Mt.thisDep,Mt.contextDep,Mt.propDep,function(Zi,Fi){var ui=Zi.shared.context;return[0,0,Fi.def(ui,".",pt),Fi.def(ui,".",Et)]}):null}var dr=sr(Me);if(dr){var lr=dr;dr=new La(dr.thisDep,dr.contextDep,dr.propDep,function(Wt,ir){var Gt=lr.append(Wt,ir),Dr=Wt.shared.context;return ir.set(Dr,"."+bt,Gt[2]),ir.set(Dr,"."+Dt,Gt[3]),Gt})}return{viewport:dr,scissor_box:sr(Te)}}function Os(mt,Mt){var Ft=mt.static,rr=typeof Ft[Ot]=="string"&&typeof Ft[wt]=="string";if(rr){if(Object.keys(Mt.dynamic).length>0)return null;var hr=Mt.static,sr=Object.keys(hr);if(sr.length>0&&typeof hr[sr[0]]=="number"){for(var dr=[],lr=0;lr"+Si+"?"+Gt+".constant["+Si+"]:0;"}).join(""),"}}else{","if(",ya,"(",Gt,".buffer)){",Zi,"=",vi,".createStream(",Qr,",",Gt,".buffer);","}else{",Zi,"=",vi,".getBuffer(",Gt,".buffer);","}",Fi,'="type" in ',Gt,"?",Jr.glTypes,"[",Gt,".type]:",Zi,".dtype;",Ga.normalized,"=!!",Gt,".normalized;");function ui(_i){ir(Ga[_i],"=",Gt,".",_i,"|0;")}return ui("size"),ui("offset"),ui("stride"),ui("divisor"),ir("}}"),ir.exit("if(",Ga.isStream,"){",vi,".destroyStream(",Zi,");","}"),Ga}hr[sr]=dn(dr,lr)}),hr}function El(mt){var Mt=mt.static,Ft=mt.dynamic,rr={};return Object.keys(Mt).forEach(function(hr){var sr=Mt[hr];rr[hr]=an(function(dr,lr){return typeof sr=="number"||typeof sr=="boolean"?""+sr:dr.link(sr)})}),Object.keys(Ft).forEach(function(hr){var sr=Ft[hr];rr[hr]=dn(sr,function(dr,lr){return dr.invoke(lr,sr)})}),rr}function ru(mt,Mt,Ft,rr,hr){var sr=mt.static,dr=mt.dynamic,lr=Os(mt,Mt),Wt=Dn(mt,hr),ir=Wn(mt,Wt,hr),Gt=ho(mt,hr),Dr=Xl(mt,hr),Jr=xl(mt,hr,lr);function ya(ui){var _i=ir[ui];_i&&(Dr[ui]=_i)}ya(Me),ya(Ri(Te));var vi=Object.keys(Dr).length>0,Ga={framebuffer:Wt,draw:Gt,shader:Jr,state:Dr,dirty:vi,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(Ga.profile=Cn(mt,hr),Ga.uniforms=hs(Ft,hr),Ga.drawVAO=Ga.scopeVAO=Gt.vao,!Ga.drawVAO&&Jr.program&&!lr&&fr.angle_instanced_arrays&&Gt.static.elements){var ai=!0,Zi=Jr.program.attributes.map(function(ui){var _i=Mt.static[ui];return ai=ai&&!!_i,_i});if(ai&&Zi.length>0){var Fi=yi.getVAO(yi.createVAO({attributes:Zi,elements:Gt.static.elements}));Ga.drawVAO=new La(null,null,null,function(ui,_i){return ui.link(Fi)}),Ga.useVAO=!0}}return lr?Ga.useVAO=!0:Ga.attributes=Al(Mt,hr),Ga.context=El(rr,hr),Ga}function js(mt,Mt,Ft){var rr=mt.shared,hr=rr.context,sr=mt.scope();Object.keys(Ft).forEach(function(dr){Mt.save(hr,"."+dr);var lr=Ft[dr],Wt=lr.append(mt,Mt);Array.isArray(Wt)?sr(hr,".",dr,"=[",Wt.join(),"];"):sr(hr,".",dr,"=",Wt,";")}),Mt(sr)}function pl(mt,Mt,Ft,rr){var hr=mt.shared,sr=hr.gl,dr=hr.framebuffer,lr;Va&&(lr=Mt.def(hr.extensions,".webgl_draw_buffers"));var Wt=mt.constants,ir=Wt.drawBuffer,Gt=Wt.backBuffer,Dr;Ft?Dr=Ft.append(mt,Mt):Dr=Mt.def(dr,".next"),rr||Mt("if(",Dr,"!==",dr,".cur){"),Mt("if(",Dr,"){",sr,".bindFramebuffer(",pa,",",Dr,".framebuffer);"),Va&&Mt(lr,".drawBuffersWEBGL(",ir,"[",Dr,".colorAttachments.length]);"),Mt("}else{",sr,".bindFramebuffer(",pa,",null);"),Va&&Mt(lr,".drawBuffersWEBGL(",Gt,");"),Mt("}",dr,".cur=",Dr,";"),rr||Mt("}")}function bl(mt,Mt,Ft){var rr=mt.shared,hr=rr.gl,sr=mt.current,dr=mt.next,lr=rr.current,Wt=rr.next,ir=mt.cond(lr,".dirty");Ha.forEach(function(Gt){var Dr=Ri(Gt);if(!(Dr in Ft.state)){var Jr,ya;if(Dr in dr){Jr=dr[Dr],ya=sr[Dr];var vi=d(Li[Dr].length,function(ai){return ir.def(Jr,"[",ai,"]")});ir(mt.cond(vi.map(function(ai,Zi){return ai+"!=="+ya+"["+Zi+"]"}).join("||")).then(hr,".",Yi[Dr],"(",vi,");",vi.map(function(ai,Zi){return ya+"["+Zi+"]="+ai}).join(";"),";"))}else{Jr=ir.def(Wt,".",Dr);var Ga=mt.cond(Jr,"!==",lr,".",Dr);ir(Ga),Dr in Ua?Ga(mt.cond(Jr).then(hr,".enable(",Ua[Dr],");").else(hr,".disable(",Ua[Dr],");"),lr,".",Dr,"=",Jr,";"):Ga(hr,".",Yi[Dr],"(",Jr,");",lr,".",Dr,"=",Jr,";")}}}),Object.keys(Ft.state).length===0&&ir(lr,".dirty=false;"),Mt(ir)}function Xn(mt,Mt,Ft,rr){var hr=mt.shared,sr=mt.current,dr=hr.current,lr=hr.gl,Wt;ni(Object.keys(Ft)).forEach(function(ir){var Gt=Ft[ir];if(!(rr&&!rr(Gt))){var Dr=Gt.append(mt,Mt);if(Ua[ir]){var Jr=Ua[ir];sn(Gt)?(Wt=mt.link(Dr,{stable:!0}),Mt(mt.cond(Wt).then(lr,".enable(",Jr,");").else(lr,".disable(",Jr,");")),Mt(dr,".",ir,"=",Wt,";")):(Mt(mt.cond(Dr).then(lr,".enable(",Jr,");").else(lr,".disable(",Jr,");")),Mt(dr,".",ir,"=",Dr,";"))}else if(ga(Dr)){var ya=sr[ir];Mt(lr,".",Yi[ir],"(",Dr,");",Dr.map(function(vi,Ga){return ya+"["+Ga+"]="+vi}).join(";"),";")}else sn(Gt)?(Wt=mt.link(Dr,{stable:!0}),Mt(lr,".",Yi[ir],"(",Wt,");",dr,".",ir,"=",Wt,";")):Mt(lr,".",Yi[ir],"(",Dr,");",dr,".",ir,"=",Dr,";")}})}function kl(mt,Mt){di&&(mt.instancing=Mt.def(mt.shared.extensions,".angle_instanced_arrays"))}function Io(mt,Mt,Ft,rr,hr){var sr=mt.shared,dr=mt.stats,lr=sr.current,Wt=sr.timer,ir=Ft.profile;function Gt(){return typeof performance>"u"?"Date.now()":"performance.now()"}var Dr,Jr;function ya(ui){Dr=Mt.def(),ui(Dr,"=",Gt(),";"),typeof hr=="string"?ui(dr,".count+=",hr,";"):ui(dr,".count++;"),Ei&&(rr?(Jr=Mt.def(),ui(Jr,"=",Wt,".getNumPendingQueries();")):ui(Wt,".beginQuery(",dr,");"))}function vi(ui){ui(dr,".cpuTime+=",Gt(),"-",Dr,";"),Ei&&(rr?ui(Wt,".pushScopeStats(",Jr,",",Wt,".getNumPendingQueries(),",dr,");"):ui(Wt,".endQuery();"))}function Ga(ui){var _i=Mt.def(lr,".profile");Mt(lr,".profile=",ui,";"),Mt.exit(lr,".profile=",_i,";")}var ai;if(ir){if(sn(ir)){ir.enable?(ya(Mt),vi(Mt.exit),Ga("true")):Ga("false");return}ai=ir.append(mt,Mt),Ga(ai)}else ai=Mt.def(lr,".profile");var Zi=mt.block();ya(Zi),Mt("if(",ai,"){",Zi,"}");var Fi=mt.block();vi(Fi),Mt.exit("if(",ai,"){",Fi,"}")}function ge(mt,Mt,Ft,rr,hr){var sr=mt.shared;function dr(Wt){switch(Wt){case ls:case ul:case Il:return 2;case Mo:case tl:case tu:return 3;case Yo:case es:case Ru:return 4;default:return 1}}function lr(Wt,ir,Gt){var Dr=sr.gl,Jr=Mt.def(Wt,".location"),ya=Mt.def(sr.attributes,"[",Jr,"]"),vi=Gt.state,Ga=Gt.buffer,ai=[Gt.x,Gt.y,Gt.z,Gt.w],Zi=["buffer","normalized","offset","stride"];function Fi(){Mt("if(!",ya,".buffer){",Dr,".enableVertexAttribArray(",Jr,");}");var _i=Gt.type,Si;if(Gt.size?Si=Mt.def(Gt.size,"||",ir):Si=ir,Mt("if(",ya,".type!==",_i,"||",ya,".size!==",Si,"||",Zi.map(function(fn){return ya+"."+fn+"!=="+Gt[fn]}).join("||"),"){",Dr,".bindBuffer(",Qr,",",Ga,".buffer);",Dr,".vertexAttribPointer(",[Jr,Si,_i,Gt.normalized,Gt.stride,Gt.offset],");",ya,".type=",_i,";",ya,".size=",Si,";",Zi.map(function(fn){return ya+"."+fn+"="+Gt[fn]+";"}).join(""),"}"),di){var Ui=Gt.divisor;Mt("if(",ya,".divisor!==",Ui,"){",mt.instancing,".vertexAttribDivisorANGLE(",[Jr,Ui],");",ya,".divisor=",Ui,";}")}}function ui(){Mt("if(",ya,".buffer){",Dr,".disableVertexAttribArray(",Jr,");",ya,".buffer=null;","}if(",Qn.map(function(_i,Si){return ya+"."+_i+"!=="+ai[Si]}).join("||"),"){",Dr,".vertexAttrib4f(",Jr,",",ai,");",Qn.map(function(_i,Si){return ya+"."+_i+"="+ai[Si]+";"}).join(""),"}")}vi===eo?Fi():vi===co?ui():(Mt("if(",vi,"===",eo,"){"),Fi(),Mt("}else{"),ui(),Mt("}"))}rr.forEach(function(Wt){var ir=Wt.name,Gt=Ft.attributes[ir],Dr;if(Gt){if(!hr(Gt))return;Dr=Gt.append(mt,Mt)}else{if(!hr(In))return;var Jr=mt.scopeAttrib(ir);Dr={},Object.keys(new Ma).forEach(function(ya){Dr[ya]=Mt.def(Jr,".",ya)})}lr(mt.link(Wt),dr(Wt.info.type),Dr)})}function K(mt,Mt,Ft,rr,hr,sr){for(var dr=mt.shared,lr=dr.gl,Wt,ir=0;ir1){for(var Uo=[],Ds=[],Oo=0;Oo>1)",Ga],");")}function Ui(){Ft(ai,".drawArraysInstancedANGLE(",[Jr,ya,vi,Ga],");")}Gt&&Gt!=="null"?Fi?Si():(Ft("if(",Gt,"){"),Si(),Ft("}else{"),Ui(),Ft("}")):Ui()}function _i(){function Si(){Ft(sr+".drawElements("+[Jr,vi,Zi,ya+"<<(("+Zi+"-"+io+")>>1)"]+");")}function Ui(){Ft(sr+".drawArrays("+[Jr,ya,vi]+");")}Gt&&Gt!=="null"?Fi?Si():(Ft("if(",Gt,"){"),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 re(mt,Mt,Ft,rr,hr){var sr=nn(),dr=sr.proc("body",hr);return di&&(sr.instancing=dr.def(sr.shared.extensions,".angle_instanced_arrays")),mt(sr,dr,Ft,rr),sr.compile().body}function ye(mt,Mt,Ft,rr){kl(mt,Mt),Ft.useVAO?Ft.drawVAO?Mt(mt.shared.vao,".setVAO(",Ft.drawVAO.append(mt,Mt),");"):Mt(mt.shared.vao,".setVAO(",mt.shared.vao,".targetVAO);"):(Mt(mt.shared.vao,".setVAO(null);"),ge(mt,Mt,Ft,rr.attributes,function(){return!0})),K(mt,Mt,Ft,rr.uniforms,function(){return!0},!1),xe(mt,Mt,Mt,Ft)}function Ue(mt,Mt){var Ft=mt.proc("draw",1);kl(mt,Ft),js(mt,Ft,Mt.context),pl(mt,Ft,Mt.framebuffer),bl(mt,Ft,Mt),Xn(mt,Ft,Mt.state),Io(mt,Ft,Mt,!1,!0);var rr=Mt.shader.progVar.append(mt,Ft);if(Ft(mt.shared.gl,".useProgram(",rr,".program);"),Mt.shader.program)ye(mt,Ft,Mt,Mt.shader.program);else{Ft(mt.shared.vao,".setVAO(null);");var hr=mt.global.def("{}"),sr=Ft.def(rr,".id"),dr=Ft.def(hr,"[",sr,"]");Ft(mt.cond(dr).then(dr,".call(this,a0);").else(dr,"=",hr,"[",sr,"]=",mt.link(function(lr){return re(ye,mt,Mt,lr,1)}),"(",rr,");",dr,".call(this,a0);"))}Object.keys(Mt.state).length>0&&Ft(mt.shared.current,".dirty=true;"),mt.shared.vao&&Ft(mt.shared.vao,".setVAO(null);")}function ke(mt,Mt,Ft,rr){mt.batchId="a1",kl(mt,Mt);function hr(){return!0}ge(mt,Mt,Ft,rr.attributes,hr),K(mt,Mt,Ft,rr.uniforms,hr,!1),xe(mt,Mt,Mt,Ft)}function Qe(mt,Mt,Ft,rr){kl(mt,Mt);var hr=Ft.contextDep,sr=Mt.def(),dr="a0",lr="a1",Wt=Mt.def();mt.shared.props=Wt,mt.batchId=sr;var ir=mt.scope(),Gt=mt.scope();Mt(ir.entry,"for(",sr,"=0;",sr,"<",lr,";++",sr,"){",Wt,"=",dr,"[",sr,"];",Gt,"}",ir.exit);function Dr(Zi){return Zi.contextDep&&hr||Zi.propDep}function Jr(Zi){return!Dr(Zi)}if(Ft.needsContext&&js(mt,Gt,Ft.context),Ft.needsFramebuffer&&pl(mt,Gt,Ft.framebuffer),Xn(mt,Gt,Ft.state,Dr),Ft.profile&&Dr(Ft.profile)&&Io(mt,Gt,Ft,!1,!0),rr)Ft.useVAO?Ft.drawVAO?Dr(Ft.drawVAO)?Gt(mt.shared.vao,".setVAO(",Ft.drawVAO.append(mt,Gt),");"):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,Gt,Ft,rr.attributes,Dr)),K(mt,ir,Ft,rr.uniforms,Jr,!1),K(mt,Gt,Ft,rr.uniforms,Dr,!0),xe(mt,ir,Gt,Ft);else{var ya=mt.global.def("{}"),vi=Ft.shader.progVar.append(mt,Gt),Ga=Gt.def(vi,".id"),ai=Gt.def(ya,"[",Ga,"]");Gt(mt.shared.gl,".useProgram(",vi,".program);","if(!",ai,"){",ai,"=",ya,"[",Ga,"]=",mt.link(function(Zi){return re(ke,mt,Ft,Zi,2)}),"(",vi,");}",ai,".call(this,a0[",sr,"],",sr,");")}}function vt(mt,Mt){var Ft=mt.proc("batch",2);mt.batchId="0",kl(mt,Ft);var rr=!1,hr=!0;Object.keys(Mt.context).forEach(function(ya){rr=rr||Mt.context[ya].propDep}),rr||(js(mt,Ft,Mt.context),hr=!1);var sr=Mt.framebuffer,dr=!1;sr?(sr.propDep?rr=dr=!0:sr.contextDep&&rr&&(dr=!0),dr||pl(mt,Ft,sr)):pl(mt,Ft,null),Mt.state.viewport&&Mt.state.viewport.propDep&&(rr=!0);function lr(ya){return ya.contextDep&&rr||ya.propDep}bl(mt,Ft,Mt),Xn(mt,Ft,Mt.state,function(ya){return!lr(ya)}),(!Mt.profile||!lr(Mt.profile))&&Io(mt,Ft,Mt,!1,"a1"),Mt.contextDep=rr,Mt.needsContext=hr,Mt.needsFramebuffer=dr;var Wt=Mt.shader.progVar;if(Wt.contextDep&&rr||Wt.propDep)Qe(mt,Ft,Mt,null);else{var ir=Wt.append(mt,Ft);if(Ft(mt.shared.gl,".useProgram(",ir,".program);"),Mt.shader.program)Qe(mt,Ft,Mt,Mt.shader.program);else{Ft(mt.shared.vao,".setVAO(null);");var Gt=mt.global.def("{}"),Dr=Ft.def(ir,".id"),Jr=Ft.def(Gt,"[",Dr,"]");Ft(mt.cond(Jr).then(Jr,".call(this,a0,a1);").else(Jr,"=",Gt,"[",Dr,"]=",mt.link(function(ya){return re(Qe,mt,Mt,ya,2)}),"(",ir,");",Jr,".call(this,a0,a1);"))}}Object.keys(Mt.state).length>0&&Ft(mt.shared.current,".dirty=true;"),mt.shared.vao&&Ft(mt.shared.vao,".setVAO(null);")}function qt(mt,Mt){var Ft=mt.proc("scope",3);mt.batchId="a2";var rr=mt.shared,hr=rr.current;if(js(mt,Ft,Mt.context),Mt.framebuffer&&Mt.framebuffer.append(mt,Ft),ni(Object.keys(Mt.state)).forEach(function(lr){var Wt=Mt.state[lr],ir=Wt.append(mt,Ft);ga(ir)?ir.forEach(function(Gt,Dr){Xi(Gt)?Ft.set(mt.next[lr],"["+Dr+"]",Gt):Ft.set(mt.next[lr],"["+Dr+"]",mt.link(Gt,{stable:!0}))}):sn(Wt)?Ft.set(rr.next,"."+lr,mt.link(ir,{stable:!0})):Ft.set(rr.next,"."+lr,ir)}),Io(mt,Ft,Mt,!0,!0),[$t,Kr,Sr,na,Tr].forEach(function(lr){var Wt=Mt.draw[lr];if(Wt){var ir=Wt.append(mt,Ft);Xi(ir)?Ft.set(rr.draw,"."+lr,ir):Ft.set(rr.draw,"."+lr,mt.link(ir),{stable:!0})}}),Object.keys(Mt.uniforms).forEach(function(lr){var Wt=Mt.uniforms[lr].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(Xt.id(lr),{stable:!0})+"]",Wt)}),Object.keys(Mt.attributes).forEach(function(lr){var Wt=Mt.attributes[lr].append(mt,Ft),ir=mt.scopeAttrib(lr);Object.keys(new Ma).forEach(function(Gt){Ft.set(ir,"."+Gt,Wt[Gt])})}),Mt.scopeVAO){var sr=Mt.scopeVAO.append(mt,Ft);Xi(sr)?Ft.set(rr.vao,".targetVAO",sr):Ft.set(rr.vao,".targetVAO",mt.link(sr,{stable:!0}))}function dr(lr){var Wt=Mt.shader[lr];if(Wt){var ir=Wt.append(mt,Ft);Xi(ir)?Ft.set(rr.shader,"."+lr,ir):Ft.set(rr.shader,"."+lr,mt.link(ir,{stable:!0}))}}dr(wt),dr(Ot),Object.keys(Mt.state).length>0&&(Ft(hr,".dirty=true;"),Ft.exit(hr,".dirty=true;")),Ft("a1(",mt.shared.context,",a0,",mt.batchId,");")}function br(mt){if(!(typeof mt!="object"||ga(mt))){for(var Mt=Object.keys(mt),Ft=0;Ft=0;--re){var ye=vn[re];ye&&ye(Na,null,0)}fr.flush(),si&&si.update()}function Wn(){!Cn&&vn.length>0&&(Cn=f.next(Dn))}function Os(){Cn&&(f.cancel(Dn),Cn=null)}function xl(re){re.preventDefault(),Ta=!0,Os(),Rn.forEach(function(ye){ye()})}function ho(re){fr.getError(),Ta=!1,ma.restore(),hn.restore(),di.restore(),Ha.restore(),Ua.restore(),Yi.restore(),Bi.restore(),si&&si.restore(),Ri.procs.refresh(),Wn(),Ii.forEach(function(ye){ye()})}Xi&&(Xi.addEventListener(fs,xl,!1),Xi.addEventListener(ms,ho,!1));function Xl(){vn.length=0,Os(),Xi&&(Xi.removeEventListener(fs,xl),Xi.removeEventListener(ms,ho)),hn.clear(),Yi.clear(),Ua.clear(),Bi.clear(),Ha.clear(),Va.clear(),di.clear(),si&&si.clear(),nn.forEach(function(re){re()})}function hs(re){function ye(sr){var dr=v({},sr);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 lr(Wt){if(Wt in dr){var ir=dr[Wt];delete dr[Wt],Object.keys(ir).forEach(function(Gt){dr[Wt+"."+Gt]=ir[Gt]})}}return lr("blend"),lr("depth"),lr("cull"),lr("stencil"),lr("polygonOffset"),lr("scissor"),lr("sample"),"vao"in sr&&(dr.vao=sr.vao),dr}function Ue(sr,dr){var lr={},Wt={};return Object.keys(sr).forEach(function(ir){var Gt=sr[ir];if(h.isDynamic(Gt)){Wt[ir]=h.unbox(Gt,ir);return}else if(dr&&Array.isArray(Gt)){for(var Dr=0;Dr0)return mt.call(this,rr(sr|0),sr|0)}else if(Array.isArray(sr)){if(sr.length)return mt.call(this,sr,sr.length)}else return pr.call(this,sr)}return v(hr,{stats:br,destroy:function(){Br.destroy()}})}var Al=Yi.setFBO=hs({framebuffer:h.define.call(null,Tl,"framebuffer")});function El(re,ye){var Ue=0;Ri.procs.poll();var ke=ye.color;ke&&(fr.clearColor(+ke[0]||0,+ke[1]||0,+ke[2]||0,+ke[3]||0),Ue|=al),"depth"in ye&&(fr.clearDepth(+ye.depth),Ue|=_l),"stencil"in ye&&(fr.clearStencil(ye.stencil|0),Ue|=mn),fr.clear(Ue)}function ru(re){if("framebuffer"in re)if(re.framebuffer&&re.framebuffer_reglType==="framebufferCube")for(var ye=0;ye<6;++ye)Al(v({framebuffer:re.framebuffer.faces[ye]},re),El);else Al(re,El);else El(null,re)}function js(re){vn.push(re);function ye(){var Ue=Rl(vn,re);function ke(){var Qe=Rl(vn,ke);vn[Qe]=vn[vn.length-1],vn.length-=1,vn.length<=0&&Os()}vn[Ue]=ke}return Wn(),{cancel:ye}}function pl(){var re=xi.viewport,ye=xi.scissor_box;re[0]=re[1]=ye[0]=ye[1]=0,Na.viewportWidth=Na.framebufferWidth=Na.drawingBufferWidth=re[2]=ye[2]=fr.drawingBufferWidth,Na.viewportHeight=Na.framebufferHeight=Na.drawingBufferHeight=re[3]=ye[3]=fr.drawingBufferHeight}function bl(){Na.tick+=1,Na.time=kl(),pl(),Ri.procs.poll()}function Xn(){Ha.refresh(),pl(),Ri.procs.refresh(),si&&si.update()}function kl(){return(m()-gn)/1e3}Xn();function Io(re,ye){var Ue;switch(re){case"frame":return js(ye);case"lost":Ue=Rn;break;case"restore":Ue=Ii;break;case"destroy":Ue=nn;break;default:}return Ue.push(ye),{cancel:function(){for(var ke=0;ke=0},read:Ti,destroy:Xl,_gl:fr,_refresh:Xn,poll:function(){bl(),si&&si.update()},now:kl,stats:Ya,getCachedCode:ge,preloadCachedCode:K});return Xt.onDone(null,xe),xe}return _c})}}),xT=He({"src/lib/prepare_regl.js"(Z,q){"use strict";var v=TE(),_=Pq();q.exports=function(M,e,t){var r=M._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=_({canvas:this,attributes:{antialias:!a.pick,preserveDrawingBuffer:!0},pixelRatio:M._context.plotGlPixelRatio||window.devicePixelRatio,extensions:e||[],cachedCode:t||{}})}catch{o=!1}a.regl||(o=!1),o&&this.addEventListener("webglcontextlost",function(i){M&&M.emit&&M.emit("plotly_webglcontextlost",{event:i,layer:a.key})},!1)}}),o||v({container:r._glcontainer.node()}),o}}}),p6=He({"src/traces/scattergl/plot.js"(h,q){"use strict";var v=HE(),_=a6(),S=dq(),M=Lq(),e=sa(),t=Jd().selectMode,r=xT(),o=Fu(),a=O5(),i=qE().styleTextSelection,n={};function s(f,m,c,T){var l=f._size,x=f.width*T,w=f.height*T,A=l.l*T,E=l.b*T,p=l.r*T,b=l.t*T,d=l.w*T,u=l.h*T;return[A+m.domain[0]*d,E+c.domain[0]*u,x-p-(1-m.domain[1])*d,w-b-(1-c.domain[1])*u]}var h=q.exports=function(m,c,T){if(T.length){var l=m._fullLayout,x=c._scene,w=c.xaxis,A=c.yaxis,E,p;if(x){var b=r(m,["ANGLE_instanced_arrays","OES_element_index_uint"],n);if(!b){x.init();return}var d=x.count,u=l._glcanvas.data()[0].regl;if(a(m,c,T),x.dirty){if((x.line2d||x.error2d)&&!(x.scatter2d||x.fill2d||x.glText)&&u.clear({color:!0,depth:!0}),x.error2d===!0&&(x.error2d=S(u)),x.line2d===!0&&(x.line2d=_(u)),x.scatter2d===!0&&(x.scatter2d=v(u)),x.fill2d===!0&&(x.fill2d=_(u)),x.glText===!0)for(x.glText=new Array(d),E=0;Ex.glText.length){var g=d-x.glText.length;for(E=0;Eee&&(isNaN(j[te])||isNaN(j[te+1]));)te-=2;ae.positions=j.slice(ee,te+2)}return ae}),x.line2d.update(x.lineOptions)),x.error2d){var P=(x.errorXOptions||[]).concat(x.errorYOptions||[]).map(function(ae){return ae||{positions:[],errors:[]}});x.error2d.update(P)}x.scatter2d&&x.scatter2d.update(x.markerOptions),x.fillOrder=e.repeat(null,d),x.fill2d&&(x.fillOptions=x.fillOptions.map(function(ae,j){var ee=T[j];if(!(!ae||!ee||!ee[0]||!ee[0].trace)){var te=ee[0],pe=te.trace,we=te.t,Se=x.lineOptions[j],Re,Pe,je=[];pe._ownfill&&je.push(j),pe._nexttrace&&je.push(j+1),je.length&&(x.fillOrder[j]=je);var at=[],nt=Se&&Se.positions||we.positions,tt,Ve;if(pe.fill==="tozeroy"){for(tt=0;tttt&&isNaN(nt[Ve+1]);)Ve-=2;nt[tt+1]!==0&&(at=[nt[tt],0]),at=at.concat(nt.slice(tt,Ve+2)),nt[Ve+1]!==0&&(at=at.concat([nt[Ve],0]))}else if(pe.fill==="tozerox"){for(tt=0;tttt&&isNaN(nt[Ve]);)Ve-=2;nt[tt]!==0&&(at=[0,nt[tt+1]]),at=at.concat(nt.slice(tt,Ve+2)),nt[Ve]!==0&&(at=at.concat([0,nt[Ve+1]]))}else if(pe.fill==="toself"||pe.fill==="tonext"){for(at=[],Re=0,ae.splitNull=!0,Pe=0;Pe-1;for(let[ae]of T)if(ae){var O=ae.trace,L=ae.t,U=L.index,B=O._length,W=L.x,$=L.y;if(O.selectedpoints||F||N){if(F||(F=!0),O.selectedpoints){var ue=x.selectBatch[U]=e.selIndices2selPoints(O),ce={};for(p=0;pw&&c||xi,y;for(g?y=c.sizeAvg||Math.max(c.size,3):y=S(h,m),A=0;A{this.draw(),this.dirty=!0,this.planned=null})):(this.draw(),this.dirty=!0,M(()=>{this.dirty=!1})),this)},o.prototype.update=function(...s){if(!s.length)return;for(let m=0;my||!c.lower&&g{h[T+x]=m})}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 m=s.id!=null?s.id:s,c=h,T=f;return m<<16|(c&255)<<8|T&255}function i(s,h,f){let m,c,T,l,x,w,A,E,p=s[h],b=s[f];return p.length>2?(m=p[0],T=p[2],c=p[1],l=p[3]):p.length?(m=c=p[0],T=l=p[1]):(m=p.x,c=p.y,T=p.x+p.width,l=p.y+p.height),b.length>2?(x=b[0],A=b[2],w=b[1],E=b[3]):b.length?(x=w=b[0],A=E=b[1]):(x=b.x,w=b.y,A=b.x+b.width,E=b.y+b.height),[x,c,A,l]}function n(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]}}}}),jq=He({"src/traces/splom/plot.js"(Z,q){"use strict";var v=Uq(),_=sa(),S=tf(),M=Jd().selectMode;q.exports=function(r,o,a){if(a.length)for(var i=0;i-1,N=M(c)||!!i.selectedpoints||F,O=!0;if(N){var L=i._length;if(i.selectedpoints){s.selectBatch=i.selectedpoints;var U=i.selectedpoints,B={};for(x=0;x=W[$][0]&&B<=W[$][1])return!0;return!1}function h(B){B.attr("x",-v.bar.captureWidth/2).attr("width",v.bar.captureWidth)}function f(B){B.attr("visibility","visible").style("visibility","visible").attr("fill","yellow").attr("opacity",0)}function m(B){if(!B.brush.filterSpecified)return"0,"+B.height;for(var W=c(B.brush.filter.getConsolidated(),B.height),$=[0],ue,ce,de,Y=W.length?W[0][0]:null,X=0;XB[1]+$||W=.9*B[1]+.1*B[0]?"n":W<=.9*B[0]+.1*B[1]?"s":"ns"}function l(){_.select(document.body).style("cursor",null)}function x(B){B.attr("stroke-dasharray",m)}function w(B,W){var $=_.select(B).selectAll(".highlight, .highlight-shadow"),ue=W?$.transition().duration(v.bar.snapDuration).each("end",W):$;x(ue)}function A(B,W){var $=B.brush,ue=$.filterSpecified,ce=NaN,de={},Y;if(ue){var X=B.height,Q=$.filter.getConsolidated(),V=c(Q,X),le=NaN,ae=NaN,j=NaN;for(Y=0;Y<=V.length;Y++){var ee=V[Y];if(ee&&ee[0]<=W&&W<=ee[1]){le=Y;break}else if(ae=Y?Y-1:NaN,ee&&ee[0]>W){j=Y;break}}if(ce=le,isNaN(ce)&&(isNaN(ae)||isNaN(j)?ce=isNaN(ae)?j:ae:ce=W-V[ae][1]=Re[0]&&Se<=Re[1]){de.clickableOrdinalRange=Re;break}}}return de}function E(B,W){_.event.sourceEvent.stopPropagation();var $=W.height-_.mouse(B)[1]-2*v.verticalPadding,ue=W.unitToPaddedPx.invert($),ce=W.brush,de=A(W,$),Y=de.interval,X=ce.svgBrush;if(X.wasDragged=!1,X.grabbingBar=de.region==="ns",X.grabbingBar){var Q=Y.map(W.unitToPaddedPx);X.grabPoint=$-Q[0]-v.verticalPadding,X.barLength=Q[1]-Q[0]}X.clickableOrdinalRange=de.clickableOrdinalRange,X.stayingIntervals=W.multiselect&&ce.filterSpecified?ce.filter.getConsolidated():[],Y&&(X.stayingIntervals=X.stayingIntervals.filter(function(V){return V[0]!==Y[0]&&V[1]!==Y[1]})),X.startExtent=de.region?Y[de.region==="s"?1:0]:ue,W.parent.inBrushDrag=!0,X.brushStartCallback()}function p(B,W){_.event.sourceEvent.stopPropagation();var $=W.height-_.mouse(B)[1]-2*v.verticalPadding,ue=W.brush.svgBrush;ue.wasDragged=!0,ue._dragging=!0,ue.grabbingBar?ue.newExtent=[$-ue.grabPoint,$+ue.barLength-ue.grabPoint].map(W.unitToPaddedPx.invert):ue.newExtent=[ue.startExtent,W.unitToPaddedPx.invert($)].sort(e),W.brush.filterSpecified=!0,ue.extent=ue.stayingIntervals.concat([ue.newExtent]),ue.brushCallback(W),w(B.parentNode)}function b(B,W){var $=W.brush,ue=$.filter,ce=$.svgBrush;ce._dragging||(d(B,W),p(B,W),W.brush.svgBrush.wasDragged=!1),ce._dragging=!1;var de=_.event;de.sourceEvent.stopPropagation();var Y=ce.grabbingBar;if(ce.grabbingBar=!1,ce.grabLocation=void 0,W.parent.inBrushDrag=!1,l(),!ce.wasDragged){ce.wasDragged=void 0,ce.clickableOrdinalRange?$.filterSpecified&&W.multiselect?ce.extent.push(ce.clickableOrdinalRange):(ce.extent=[ce.clickableOrdinalRange],$.filterSpecified=!0):Y?(ce.extent=ce.stayingIntervals,ce.extent.length===0&&z($)):z($),ce.brushCallback(W),w(B.parentNode),ce.brushEndCallback($.filterSpecified?ue.getConsolidated():[]);return}var X=function(){ue.set(ue.getConsolidated())};if(W.ordinal){var Q=W.unitTickvals;Q[Q.length-1]ce.newExtent[0];ce.extent=ce.stayingIntervals.concat(V?[ce.newExtent]:[]),ce.extent.length||z($),ce.brushCallback(W),V?w(B.parentNode,X):(X(),w(B.parentNode))}else X();ce.brushEndCallback($.filterSpecified?ue.getConsolidated():[])}function d(B,W){var $=W.height-_.mouse(B)[1]-2*v.verticalPadding,ue=A(W,$),ce="crosshair";ue.clickableOrdinalRange?ce="pointer":ue.region&&(ce=ue.region+"-resize"),_.select(document.body).style("cursor",ce)}function u(B){B.on("mousemove",function(W){_.event.preventDefault(),W.parent.inBrushDrag||d(this,W)}).on("mouseleave",function(W){W.parent.inBrushDrag||l()}).call(_.behavior.drag().on("dragstart",function(W){E(this,W)}).on("drag",function(W){p(this,W)}).on("dragend",function(W){b(this,W)}))}function g(B,W){return B[0]-W[0]}function y(B,W,$){var ue=$._context.staticPlot,ce=B.selectAll(".background").data(M);ce.enter().append("rect").classed("background",!0).call(h).call(f).style("pointer-events",ue?"none":"auto").attr("transform",t(0,v.verticalPadding)),ce.call(u).attr("height",function(X){return X.height-v.verticalPadding});var de=B.selectAll(".highlight-shadow").data(M);de.enter().append("line").classed("highlight-shadow",!0).attr("x",-v.bar.width/2).attr("stroke-width",v.bar.width+v.bar.strokeWidth).attr("stroke",W).attr("opacity",v.bar.strokeOpacity).attr("stroke-linecap","butt"),de.attr("y1",function(X){return X.height}).call(x);var Y=B.selectAll(".highlight").data(M);Y.enter().append("line").classed("highlight",!0).attr("x",-v.bar.width/2).attr("stroke-width",v.bar.width-v.bar.strokeWidth).attr("stroke",v.bar.fillColor).attr("opacity",v.bar.fillOpacity).attr("stroke-linecap","butt"),Y.attr("y1",function(X){return X.height}).call(x)}function D(B,W,$){var ue=B.selectAll("."+v.cn.axisBrush).data(M,S);ue.enter().append("g").classed(v.cn.axisBrush,!0),y(ue,W,$)}function P(B){return B.svgBrush.extent.map(function(W){return W.slice()})}function z(B){B.filterSpecified=!1,B.svgBrush.extent=[[-1/0,1/0]]}function F(B){return function($){var ue=$.brush,ce=P(ue),de=ce.slice();ue.filter.set(de),B()}}function N(B){for(var W=B.slice(),$=[],ue,ce=W.shift();ce;){for(ue=ce.slice();(ce=W.shift())&&ce[0]<=ue[1];)ue[1]=Math.max(ue[1],ce[1]);$.push(ue)}return $.length===1&&$[0][0]>$[0][1]&&($=[]),$}function O(){var B=[],W,$;return{set:function(ue){B=ue.map(function(ce){return ce.slice().sort(e)}).sort(g),B.length===1&&B[0][0]===-1/0&&B[0][1]===1/0&&(B=[[0,-1]]),W=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 W},getBounds:function(){return $}}}function L(B,W,$,ue,ce,de){var Y=O();return Y.set($),{filter:Y,filterSpecified:W,svgBrush:{extent:[],brushStartCallback:ue,brushCallback:F(ce),brushEndCallback:de}}}function U(B,W){if(Array.isArray(B[0])?(B=B.map(function(ue){return ue.sort(e)}),W.multiselect?B=N(B.sort(g)):B=[B[0]]):B=[B.sort(e)],W.tickvals){var $=W.tickvals.slice().sort(e);if(B=B.map(function(ue){var ce=[n(0,$,ue[0],[]),n(1,$,ue[1],[])];if(ce[1]>ce[0])return ce}).filter(function(ue){return ue}),!B.length)return}return B.length>1?B:B[0]}q.exports={makeBrush:L,ensureAxisBrush:D,cleanRanges:U}}}),Yq=He({"src/traces/parcoords/defaults.js"(Z,q){"use strict";var v=sa(),_=wp().hasColorscale,S=_h(),M=wc().defaults,e=pp(),t=Wo(),r=m6(),o=g6(),a=Ax().maxDimensionCount,i=bT();function n(h,f,m,c,T){var l=T("line.color",m);if(_(h,"line")&&v.isArrayOrTypedArray(l)){if(l.length)return T("line.colorscale"),S(h,f,c,T,{prefix:"line.",cLetter:"c"}),l.length;f.line.color=m}return 1/0}function s(h,f,m,c){function T(E,p){return v.coerce(h,f,r.dimensions,E,p)}var l=T("values"),x=T("visible");if(l&&l.length||(x=f.visible=!1),x){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))}}q.exports=function(f,m,c,T){function l(p,b){return v.coerce(f,m,r,p,b)}var x=f.dimensions;Array.isArray(x)&&x.length>a&&(v.log("parcoords traces support up to "+a+" dimensions at the moment"),x.splice(a));var w=e(f,m,{name:"dimensions",layout:T,handleItemDefaults:s}),A=n(f,m,c,T,l);M(m,T,l),(!Array.isArray(w)||!w.length)&&(m.visible=!1),i(m,w,"values",A);var E=v.extendFlat({},T.font,{size:Math.round(T.font.size/1.2)});v.coerceFont(l,"labelfont",E),v.coerceFont(l,"tickfont",E,{autoShadowDflt:!0}),v.coerceFont(l,"rangefont",E),l("labelangle"),l("labelside"),l("unselected.line.color"),l("unselected.line.opacity")}}}),Kq=He({"src/traces/parcoords/calc.js"(Z,q){"use strict";var v=sa().isArrayOrTypedArray,_=rc(),S=Cv().wrap;q.exports=function(t,r){var o,a;return _.hasColorscale(r,"line")&&v(r.line.color)?(o=r.line.color,a=_.extractOpts(r.line).colorscale,_.calc(t,r,{vals:o,containerStr:"line",cLetter:"c"})):(o=M(r._length),a=[[0,r.line.color],[1,r.line.color]]),S({lineColor:o,cscale:a})};function M(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")M=0,e="rgb",S=[0,0,0];else if(Z[0]==="#"){var t=Z.slice(1),r=t.length,o=r<=4;M=1,o?(S=[parseInt(t[0]+t[0],16),parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16)],r===4&&(M=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&&(M=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(_=/^((?:rgba?|hs[lvb]a?|hwba?|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms|oklch|oklab|color))\s*\(([^\)]*)\)/.exec(Z)){var a=_[1];e=a.replace(/a$/,"");var i=e==="cmyk"?4:e==="gray"?1:3;S=_[2].trim().split(/\s*[,\/]\s*|\s+/),e==="color"&&(e=S.shift()),S=S.map(function(n,s){if(n[n.length-1]==="%")return n=parseFloat(n)/100,s===3?n:e==="rgb"?n*255:e[0]==="h"||e[0]==="l"&&!s?n*100:e==="lab"?n*125:e==="lch"?s<2?n*150:n*360:e[0]==="o"&&!s?n:e==="oklab"?n*.4:e==="oklch"?s<2?n*.4:n*360:n;if(e[s]==="h"||s===2&&e[e.length-1]==="h"){if(TT[n]!==void 0)return TT[n];if(n.endsWith("deg"))return parseFloat(n);if(n.endsWith("turn"))return parseFloat(n)*360;if(n.endsWith("grad"))return parseFloat(n)*360/400;if(n.endsWith("rad"))return parseFloat(n)*180/Math.PI}return n==="none"?0:parseFloat(n)}),M=S.length>i?S.pop():1}else/[0-9](?:\s|\/|,)/.test(Z)&&(S=Z.match(/([0-9]+)/g).map(function(n){return parseFloat(n)}),e=((v=(q=Z.match(/([a-z])/ig))==null?void 0:q.join(""))==null?void 0:v.toLowerCase())||"rgb");return{space:e,values:S,alpha:M}}var wT,y6,TT,$q=Ho({"node_modules/color-parse/index.js"(){wT=jp(xE(),1),y6=Jq,TT={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}}}),Sx,_6=Ho({"node_modules/color-space/rgb.js"(){Sx={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}}}),Mx,Qq=Ho({"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 q=Z[0]/360,v=Z[1]/100,_=Z[2]/100,S,M,e,t,r,o=0;if(v===0)return r=_*255,[r,r,r];for(M=_<.5?_*(1+v):_+v-_*v,S=2*_-M,t=[0,0,0];o<3;)e=q+1/3*-(o-1),e<0?e++:e>1&&e--,r=6*e<1?S+(M-S)*6*e:2*e<1?M:3*e<2?S+(M-S)*(2/3-e)*6:S,t[o++]=r*255;return t}},Sx.hsl=function(Z){var q=Z[0]/255,v=Z[1]/255,_=Z[2]/255,S=Math.min(q,v,_),M=Math.max(q,v,_),e=M-S,t,r,o;return M===S?t=0:q===M?t=(v-_)/e:v===M?t=2+(_-q)/e:_===M&&(t=4+(q-v)/e),t=Math.min(t*60,360),t<0&&(t+=360),o=(S+M)/2,M===S?r=0:o<=.5?r=e/(M+S):r=e/(2-M-S),[t,r*100,o*100]}}}),x6={};Jl(x6,{default:()=>eV});function eV(Z){Array.isArray(Z)&&Z.raw&&(Z=String.raw(...arguments)),Z instanceof Number&&(Z=+Z);var q,v,_,S=y6(Z);if(!S.space)return[];let M=S.space[0]==="h"?Mx.min:Sx.min,e=S.space[0]==="h"?Mx.max:Sx.max;return q=Array(3),q[0]=Math.min(Math.max(S.values[0],M[0]),e[0]),q[1]=Math.min(Math.max(S.values[1],M[1]),e[1]),q[2]=Math.min(Math.max(S.values[2],M[2]),e[2]),S.space[0]==="h"&&(q=Mx.rgb(q)),q.push(Math.min(Math.max(S.alpha,0),1)),q}var tV=Ho({"node_modules/color-rgba/index.js"(){$q(),_6(),Qq()}}),b6=He({"src/traces/parcoords/helpers.js"(Z){"use strict";var q=sa().isTypedArray;Z.convertTypedArray=function(v){return q(v)?Array.prototype.slice.call(v):v},Z.isOrdinal=function(v){return!!v.tickvals},Z.isVisible=function(v){return v.visible||!("visible"in v)}}}),rV=He({"src/traces/parcoords/lines.js"(Z,q){"use strict";var v=["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(` +`),Ma;if(Xt&&(Ma=Cc(ea),Xt[Ma]))return Xt[Ma].apply(null,Ta);var Qa=Function.apply(null,oa.concat(ea));return Xt&&(Xt[Ma]=Qa),Qa.apply(null,Ta)}return{global:si,link:xa,block:Ya,proc:zi,scope:bi,cond:yi,compile:Ei}}var Qn="xyzw".split(""),io=5121,eo=1,co=2,An=0,un=1,yo=2,Qo=3,ks=4,rl=5,Ns=6,el="dither",Ss="blend.enable",Fl="blend.color",yl="blend.equation",ll="blend.func",Un="depth.enable",Ro="depth.func",Js="depth.range",Fs="depth.mask",cu="colorMask",Iu="cull.enable",Zu="cull.face",Ic="frontFace",bu="lineWidth",Rc="polygonOffset.enable",Au="polygonOffset.offset",yc="sample.alpha",fo="sample.enable",Fo="sample.coverage",Dc="stencil.enable",lc="stencil.mask",Yu="stencil.func",Oe="stencil.opFront",I="stencil.opBack",ie="scissor.enable",Te="scissor.box",Me="viewport",ze="profile",ht="framebuffer",wt="vert",Ot="frag",$t="elements",Tr="primitive",Sr="count",Kr="offset",na="instances",qe="vao",$e="Width",lt="Height",pt=ht+$e,Et=ht+lt,bt=Me+$e,Dt=Me+lt,ur="drawingBuffer",yr=ur+$e,Er=ur+lt,jr=[ll,yl,Yu,Oe,I,Fo,Me,Te,Au],Qr=34962,ha=34963,Aa=2884,Da=3042,ci=3024,Vi=2960,ji=2929,on=3089,Sn=32823,Kn=32926,Bn=32928,Ao=5126,ls=35664,Mo=35665,Yo=35666,ds=5124,ul=35667,tl=35668,es=35669,ts=35670,Il=35671,tu=35672,Ru=35673,vu=35674,wl=35675,fu=35676,uc=35678,Gl=35680,Hl=4,me=1028,De=1029,et=2304,dt=2305,yt=32775,Tt=32776,tr=519,zt=7680,_r=0,Gr=1,Xr=32774,wa=513,pa=36160,Ja=36064,ti={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},Sa={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":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)||kr(it)||Ur(it)}function oi(it){return it.sort(function(Xt,fr){return Xt===Me?-1:fr===Me?1:Xt=1,oa>=2,Xt)}else if(fr===ks){var Ta=it.data;return new La(Ta.thisDep,Ta.contextDep,Ta.propDep,Xt)}else{if(fr===rl)return new La(!1,!1,!1,Xt);if(fr===Ns){for(var ma=!1,xa=!1,Ya=!1,bi=0;bi=1&&(xa=!0),si>=2&&(Ya=!0)}else yi.type===ks&&(ma=ma||yi.data.thisDep,xa=xa||yi.data.contextDep,Ya=Ya||yi.data.propDep)}return new La(ma,xa,Ya,Xt)}else return new La(fr===Qo,fr===yo,fr===un,Xt)}}var In=new La(!1,!1,!1,function(){});function Jn(it,Xt,fr,oa,Ta,ma,xa,Ya,bi,yi,si,gn,zi,Ei,Na,ea){var Ma=yi.Record,Qa={add:32774,subtract:32778,"reverse subtract":32779};fr.ext_blend_minmax&&(Qa.min=yt,Qa.max=Tt);var di=fr.angle_instanced_arrays,Va=fr.webgl_draw_buffers,Bi=fr.oes_vertex_array_object,Li={dirty:!0,profile:ea.profile},hn={},Ha=[],Ua={},Yi={};function Ri(mt){return mt.replace(".","_")}function Ti(mt,Mt,Ft){var rr=Ri(mt);Ha.push(mt),hn[rr]=Li[rr]=!!Ft,Ua[rr]=Mt}function xi(mt,Mt,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]=Mt}function Xi(mt){return!!isNaN(mt)}Ti(el,ci),Ti(Ss,Da),xi(Fl,"blendColor",[0,0,0,0]),xi(yl,"blendEquationSeparate",[Xr,Xr]),xi(ll,"blendFuncSeparate",[Gr,_r,Gr,_r]),Ti(Un,ji,!0),xi(Ro,"depthFunc",wa),xi(Js,"depthRange",[0,1]),xi(Fs,"depthMask",!0),xi(cu,cu,[!0,!0,!0,!0]),Ti(Iu,Aa),xi(Zu,"cullFace",De),xi(Ic,Ic,dt),xi(bu,bu,1),Ti(Rc,Sn),xi(Au,"polygonOffset",[0,0]),Ti(yc,Kn),Ti(fo,Bn),xi(Fo,"sampleCoverage",[1,!1]),Ti(Dc,Vi),xi(lc,"stencilMask",-1),xi(Yu,"stencilFunc",[tr,0,-1]),xi(Oe,"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:Xt,next:hn,current:Li,draw:gn,elements:ma,buffer:Ta,shader:si,attributes:yi.state,vao:yi,uniforms:bi,framebuffer:Ya,extensions:fr,timer:Ei,isBufferArgs:fi},Rn={primTypes:Ia,compareFuncs:Sa,blendFuncs:ti,blendEquations:Qa,stencilOps:za,glTypes:_a,orientationType:Xa};Va&&(Rn.backBuffer=[De],Rn.drawBuffer=d(oa.maxDrawbuffers,function(mt){return mt===0?[0]:d(mt,function(Mt){return Ja+Mt})}));var Ii=0;function nn(){var mt=Mn({cache:Na}),Mt=mt.link,Ft=mt.global;mt.id=Ii++,mt.batchId="0";var rr=Mt(vn),hr=mt.shared={props:"a0"};Object.keys(vn).forEach(function(ir){hr[ir]=Ft.def(rr,".",ir)});var sr=mt.next={},dr=mt.current={};Object.keys(Yi).forEach(function(ir){Array.isArray(Li[ir])&&(sr[ir]=Ft.def(hr.next,".",ir),dr[ir]=Ft.def(hr.current,".",ir))});var lr=mt.constants={};Object.keys(Rn).forEach(function(ir){lr[ir]=Ft.def(JSON.stringify(Rn[ir]))}),mt.invoke=function(ir,Gt){switch(Gt.type){case An:var Dr=["this",hr.context,hr.props,mt.batchId];return ir.def(Mt(Gt.data),".call(",Dr.slice(0,Math.max(Gt.data.length+1,4)),")");case un:return ir.def(hr.props,Gt.data);case yo:return ir.def(hr.context,Gt.data);case Qo:return ir.def("this",Gt.data);case ks:return Gt.data.append(mt,ir),Gt.data.ref;case rl:return Gt.data.toString();case Ns:return Gt.data.map(function(Jr){return mt.invoke(ir,Jr)})}},mt.attribCache={};var Wt={};return mt.scopeAttrib=function(ir){var Gt=Xt.id(ir);if(Gt in Wt)return Wt[Gt];var Dr=yi.scope[Gt];Dr||(Dr=yi.scope[Gt]=new Ma);var Jr=Wt[Gt]=Mt(Dr);return Jr},mt}function Ln(mt){var Mt=mt.static,Ft=mt.dynamic,rr;if(ze in Mt){var hr=!!Mt[ze];rr=an(function(dr,lr){return hr}),rr.enable=hr}else if(ze in Ft){var sr=Ft[ze];rr=dn(sr,function(dr,lr){return dr.invoke(lr,sr)})}return rr}function Dn(mt,Mt){var Ft=mt.static,rr=mt.dynamic;if(ht in Ft){var hr=Ft[ht];return hr?(hr=Ya.getFramebuffer(hr),an(function(dr,lr){var Wt=dr.link(hr),ir=dr.shared;lr.set(ir.framebuffer,".next",Wt);var Gt=ir.context;return lr.set(Gt,"."+pt,Wt+".width"),lr.set(Gt,"."+Et,Wt+".height"),Wt})):an(function(dr,lr){var Wt=dr.shared;lr.set(Wt.framebuffer,".next","null");var ir=Wt.context;return lr.set(ir,"."+pt,ir+"."+yr),lr.set(ir,"."+Et,ir+"."+Er),"null"})}else if(ht in rr){var sr=rr[ht];return dn(sr,function(dr,lr){var Wt=dr.invoke(lr,sr),ir=dr.shared,Gt=ir.framebuffer,Dr=lr.def(Gt,".getFramebuffer(",Wt,")");lr.set(Gt,".next",Dr);var Jr=ir.context;return lr.set(Jr,"."+pt,Dr+"?"+Dr+".width:"+Jr+"."+yr),lr.set(Jr,"."+Et,Dr+"?"+Dr+".height:"+Jr+"."+Er),Dr})}else return null}function Wn(mt,Mt,Ft){var rr=mt.static,hr=mt.dynamic;function sr(Wt){if(Wt in rr){var ir=rr[Wt],Gt=!0,Dr=ir.x|0,Jr=ir.y|0,ya,vi;return"width"in ir?ya=ir.width|0:Gt=!1,"height"in ir?vi=ir.height|0:Gt=!1,new La(!Gt&&Mt&&Mt.thisDep,!Gt&&Mt&&Mt.contextDep,!Gt&&Mt&&Mt.propDep,function(Zi,Fi){var ui=Zi.shared.context,_i=ya;"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],ii=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"),fn=Fi.def('"width" in ',ui,"?",ui,".width|0:","(",_i,".",pt,"-",Si,")"),_o=Fi.def('"height" in ',ui,"?",ui,".height|0:","(",_i,".",Et,"-",Ui,")");return[Si,Ui,fn,_o]});return Mt&&(ii.thisDep=ii.thisDep||Mt.thisDep,ii.contextDep=ii.contextDep||Mt.contextDep,ii.propDep=ii.propDep||Mt.propDep),ii}else return Mt?new La(Mt.thisDep,Mt.contextDep,Mt.propDep,function(Zi,Fi){var ui=Zi.shared.context;return[0,0,Fi.def(ui,".",pt),Fi.def(ui,".",Et)]}):null}var dr=sr(Me);if(dr){var lr=dr;dr=new La(dr.thisDep,dr.contextDep,dr.propDep,function(Wt,ir){var Gt=lr.append(Wt,ir),Dr=Wt.shared.context;return ir.set(Dr,"."+bt,Gt[2]),ir.set(Dr,"."+Dt,Gt[3]),Gt})}return{viewport:dr,scissor_box:sr(Te)}}function Os(mt,Mt){var Ft=mt.static,rr=typeof Ft[Ot]=="string"&&typeof Ft[wt]=="string";if(rr){if(Object.keys(Mt.dynamic).length>0)return null;var hr=Mt.static,sr=Object.keys(hr);if(sr.length>0&&typeof hr[sr[0]]=="number"){for(var dr=[],lr=0;lr"+Si+"?"+Gt+".constant["+Si+"]:0;"}).join(""),"}}else{","if(",ya,"(",Gt,".buffer)){",Zi,"=",vi,".createStream(",Qr,",",Gt,".buffer);","}else{",Zi,"=",vi,".getBuffer(",Gt,".buffer);","}",Fi,'="type" in ',Gt,"?",Jr.glTypes,"[",Gt,".type]:",Zi,".dtype;",Ga.normalized,"=!!",Gt,".normalized;");function ui(_i){ir(Ga[_i],"=",Gt,".",_i,"|0;")}return ui("size"),ui("offset"),ui("stride"),ui("divisor"),ir("}}"),ir.exit("if(",Ga.isStream,"){",vi,".destroyStream(",Zi,");","}"),Ga}hr[sr]=dn(dr,lr)}),hr}function El(mt){var Mt=mt.static,Ft=mt.dynamic,rr={};return Object.keys(Mt).forEach(function(hr){var sr=Mt[hr];rr[hr]=an(function(dr,lr){return typeof sr=="number"||typeof sr=="boolean"?""+sr:dr.link(sr)})}),Object.keys(Ft).forEach(function(hr){var sr=Ft[hr];rr[hr]=dn(sr,function(dr,lr){return dr.invoke(lr,sr)})}),rr}function ru(mt,Mt,Ft,rr,hr){var sr=mt.static,dr=mt.dynamic,lr=Os(mt,Mt),Wt=Dn(mt,hr),ir=Wn(mt,Wt,hr),Gt=ho(mt,hr),Dr=Xl(mt,hr),Jr=xl(mt,hr,lr);function ya(ui){var _i=ir[ui];_i&&(Dr[ui]=_i)}ya(Me),ya(Ri(Te));var vi=Object.keys(Dr).length>0,Ga={framebuffer:Wt,draw:Gt,shader:Jr,state:Dr,dirty:vi,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(Ga.profile=Ln(mt,hr),Ga.uniforms=hs(Ft,hr),Ga.drawVAO=Ga.scopeVAO=Gt.vao,!Ga.drawVAO&&Jr.program&&!lr&&fr.angle_instanced_arrays&&Gt.static.elements){var ii=!0,Zi=Jr.program.attributes.map(function(ui){var _i=Mt.static[ui];return ii=ii&&!!_i,_i});if(ii&&Zi.length>0){var Fi=yi.getVAO(yi.createVAO({attributes:Zi,elements:Gt.static.elements}));Ga.drawVAO=new La(null,null,null,function(ui,_i){return ui.link(Fi)}),Ga.useVAO=!0}}return lr?Ga.useVAO=!0:Ga.attributes=Al(Mt,hr),Ga.context=El(rr,hr),Ga}function js(mt,Mt,Ft){var rr=mt.shared,hr=rr.context,sr=mt.scope();Object.keys(Ft).forEach(function(dr){Mt.save(hr,"."+dr);var lr=Ft[dr],Wt=lr.append(mt,Mt);Array.isArray(Wt)?sr(hr,".",dr,"=[",Wt.join(),"];"):sr(hr,".",dr,"=",Wt,";")}),Mt(sr)}function pl(mt,Mt,Ft,rr){var hr=mt.shared,sr=hr.gl,dr=hr.framebuffer,lr;Va&&(lr=Mt.def(hr.extensions,".webgl_draw_buffers"));var Wt=mt.constants,ir=Wt.drawBuffer,Gt=Wt.backBuffer,Dr;Ft?Dr=Ft.append(mt,Mt):Dr=Mt.def(dr,".next"),rr||Mt("if(",Dr,"!==",dr,".cur){"),Mt("if(",Dr,"){",sr,".bindFramebuffer(",pa,",",Dr,".framebuffer);"),Va&&Mt(lr,".drawBuffersWEBGL(",ir,"[",Dr,".colorAttachments.length]);"),Mt("}else{",sr,".bindFramebuffer(",pa,",null);"),Va&&Mt(lr,".drawBuffersWEBGL(",Gt,");"),Mt("}",dr,".cur=",Dr,";"),rr||Mt("}")}function bl(mt,Mt,Ft){var rr=mt.shared,hr=rr.gl,sr=mt.current,dr=mt.next,lr=rr.current,Wt=rr.next,ir=mt.cond(lr,".dirty");Ha.forEach(function(Gt){var Dr=Ri(Gt);if(!(Dr in Ft.state)){var Jr,ya;if(Dr in dr){Jr=dr[Dr],ya=sr[Dr];var vi=d(Li[Dr].length,function(ii){return ir.def(Jr,"[",ii,"]")});ir(mt.cond(vi.map(function(ii,Zi){return ii+"!=="+ya+"["+Zi+"]"}).join("||")).then(hr,".",Yi[Dr],"(",vi,");",vi.map(function(ii,Zi){return ya+"["+Zi+"]="+ii}).join(";"),";"))}else{Jr=ir.def(Wt,".",Dr);var Ga=mt.cond(Jr,"!==",lr,".",Dr);ir(Ga),Dr in Ua?Ga(mt.cond(Jr).then(hr,".enable(",Ua[Dr],");").else(hr,".disable(",Ua[Dr],");"),lr,".",Dr,"=",Jr,";"):Ga(hr,".",Yi[Dr],"(",Jr,");",lr,".",Dr,"=",Jr,";")}}}),Object.keys(Ft.state).length===0&&ir(lr,".dirty=false;"),Mt(ir)}function Xn(mt,Mt,Ft,rr){var hr=mt.shared,sr=mt.current,dr=hr.current,lr=hr.gl,Wt;oi(Object.keys(Ft)).forEach(function(ir){var Gt=Ft[ir];if(!(rr&&!rr(Gt))){var Dr=Gt.append(mt,Mt);if(Ua[ir]){var Jr=Ua[ir];sn(Gt)?(Wt=mt.link(Dr,{stable:!0}),Mt(mt.cond(Wt).then(lr,".enable(",Jr,");").else(lr,".disable(",Jr,");")),Mt(dr,".",ir,"=",Wt,";")):(Mt(mt.cond(Dr).then(lr,".enable(",Jr,");").else(lr,".disable(",Jr,");")),Mt(dr,".",ir,"=",Dr,";"))}else if(ga(Dr)){var ya=sr[ir];Mt(lr,".",Yi[ir],"(",Dr,");",Dr.map(function(vi,Ga){return ya+"["+Ga+"]="+vi}).join(";"),";")}else sn(Gt)?(Wt=mt.link(Dr,{stable:!0}),Mt(lr,".",Yi[ir],"(",Wt,");",dr,".",ir,"=",Wt,";")):Mt(lr,".",Yi[ir],"(",Dr,");",dr,".",ir,"=",Dr,";")}})}function kl(mt,Mt){di&&(mt.instancing=Mt.def(mt.shared.extensions,".angle_instanced_arrays"))}function Io(mt,Mt,Ft,rr,hr){var sr=mt.shared,dr=mt.stats,lr=sr.current,Wt=sr.timer,ir=Ft.profile;function Gt(){return typeof performance>"u"?"Date.now()":"performance.now()"}var Dr,Jr;function ya(ui){Dr=Mt.def(),ui(Dr,"=",Gt(),";"),typeof hr=="string"?ui(dr,".count+=",hr,";"):ui(dr,".count++;"),Ei&&(rr?(Jr=Mt.def(),ui(Jr,"=",Wt,".getNumPendingQueries();")):ui(Wt,".beginQuery(",dr,");"))}function vi(ui){ui(dr,".cpuTime+=",Gt(),"-",Dr,";"),Ei&&(rr?ui(Wt,".pushScopeStats(",Jr,",",Wt,".getNumPendingQueries(),",dr,");"):ui(Wt,".endQuery();"))}function Ga(ui){var _i=Mt.def(lr,".profile");Mt(lr,".profile=",ui,";"),Mt.exit(lr,".profile=",_i,";")}var ii;if(ir){if(sn(ir)){ir.enable?(ya(Mt),vi(Mt.exit),Ga("true")):Ga("false");return}ii=ir.append(mt,Mt),Ga(ii)}else ii=Mt.def(lr,".profile");var Zi=mt.block();ya(Zi),Mt("if(",ii,"){",Zi,"}");var Fi=mt.block();vi(Fi),Mt.exit("if(",ii,"){",Fi,"}")}function ge(mt,Mt,Ft,rr,hr){var sr=mt.shared;function dr(Wt){switch(Wt){case ls:case ul:case Il:return 2;case Mo:case tl:case tu:return 3;case Yo:case es:case Ru:return 4;default:return 1}}function lr(Wt,ir,Gt){var Dr=sr.gl,Jr=Mt.def(Wt,".location"),ya=Mt.def(sr.attributes,"[",Jr,"]"),vi=Gt.state,Ga=Gt.buffer,ii=[Gt.x,Gt.y,Gt.z,Gt.w],Zi=["buffer","normalized","offset","stride"];function Fi(){Mt("if(!",ya,".buffer){",Dr,".enableVertexAttribArray(",Jr,");}");var _i=Gt.type,Si;if(Gt.size?Si=Mt.def(Gt.size,"||",ir):Si=ir,Mt("if(",ya,".type!==",_i,"||",ya,".size!==",Si,"||",Zi.map(function(fn){return ya+"."+fn+"!=="+Gt[fn]}).join("||"),"){",Dr,".bindBuffer(",Qr,",",Ga,".buffer);",Dr,".vertexAttribPointer(",[Jr,Si,_i,Gt.normalized,Gt.stride,Gt.offset],");",ya,".type=",_i,";",ya,".size=",Si,";",Zi.map(function(fn){return ya+"."+fn+"="+Gt[fn]+";"}).join(""),"}"),di){var Ui=Gt.divisor;Mt("if(",ya,".divisor!==",Ui,"){",mt.instancing,".vertexAttribDivisorANGLE(",[Jr,Ui],");",ya,".divisor=",Ui,";}")}}function ui(){Mt("if(",ya,".buffer){",Dr,".disableVertexAttribArray(",Jr,");",ya,".buffer=null;","}if(",Qn.map(function(_i,Si){return ya+"."+_i+"!=="+ii[Si]}).join("||"),"){",Dr,".vertexAttrib4f(",Jr,",",ii,");",Qn.map(function(_i,Si){return ya+"."+_i+"="+ii[Si]+";"}).join(""),"}")}vi===eo?Fi():vi===co?ui():(Mt("if(",vi,"===",eo,"){"),Fi(),Mt("}else{"),ui(),Mt("}"))}rr.forEach(function(Wt){var ir=Wt.name,Gt=Ft.attributes[ir],Dr;if(Gt){if(!hr(Gt))return;Dr=Gt.append(mt,Mt)}else{if(!hr(In))return;var Jr=mt.scopeAttrib(ir);Dr={},Object.keys(new Ma).forEach(function(ya){Dr[ya]=Mt.def(Jr,".",ya)})}lr(mt.link(Wt),dr(Wt.info.type),Dr)})}function K(mt,Mt,Ft,rr,hr,sr){for(var dr=mt.shared,lr=dr.gl,Wt,ir=0;ir1){for(var Uo=[],Ds=[],Oo=0;Oo>1)",Ga],");")}function Ui(){Ft(ii,".drawArraysInstancedANGLE(",[Jr,ya,vi,Ga],");")}Gt&&Gt!=="null"?Fi?Si():(Ft("if(",Gt,"){"),Si(),Ft("}else{"),Ui(),Ft("}")):Ui()}function _i(){function Si(){Ft(sr+".drawElements("+[Jr,vi,Zi,ya+"<<(("+Zi+"-"+io+")>>1)"]+");")}function Ui(){Ft(sr+".drawArrays("+[Jr,ya,vi]+");")}Gt&&Gt!=="null"?Fi?Si():(Ft("if(",Gt,"){"),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 re(mt,Mt,Ft,rr,hr){var sr=nn(),dr=sr.proc("body",hr);return di&&(sr.instancing=dr.def(sr.shared.extensions,".angle_instanced_arrays")),mt(sr,dr,Ft,rr),sr.compile().body}function ye(mt,Mt,Ft,rr){kl(mt,Mt),Ft.useVAO?Ft.drawVAO?Mt(mt.shared.vao,".setVAO(",Ft.drawVAO.append(mt,Mt),");"):Mt(mt.shared.vao,".setVAO(",mt.shared.vao,".targetVAO);"):(Mt(mt.shared.vao,".setVAO(null);"),ge(mt,Mt,Ft,rr.attributes,function(){return!0})),K(mt,Mt,Ft,rr.uniforms,function(){return!0},!1),xe(mt,Mt,Mt,Ft)}function Ue(mt,Mt){var Ft=mt.proc("draw",1);kl(mt,Ft),js(mt,Ft,Mt.context),pl(mt,Ft,Mt.framebuffer),bl(mt,Ft,Mt),Xn(mt,Ft,Mt.state),Io(mt,Ft,Mt,!1,!0);var rr=Mt.shader.progVar.append(mt,Ft);if(Ft(mt.shared.gl,".useProgram(",rr,".program);"),Mt.shader.program)ye(mt,Ft,Mt,Mt.shader.program);else{Ft(mt.shared.vao,".setVAO(null);");var hr=mt.global.def("{}"),sr=Ft.def(rr,".id"),dr=Ft.def(hr,"[",sr,"]");Ft(mt.cond(dr).then(dr,".call(this,a0);").else(dr,"=",hr,"[",sr,"]=",mt.link(function(lr){return re(ye,mt,Mt,lr,1)}),"(",rr,");",dr,".call(this,a0);"))}Object.keys(Mt.state).length>0&&Ft(mt.shared.current,".dirty=true;"),mt.shared.vao&&Ft(mt.shared.vao,".setVAO(null);")}function ke(mt,Mt,Ft,rr){mt.batchId="a1",kl(mt,Mt);function hr(){return!0}ge(mt,Mt,Ft,rr.attributes,hr),K(mt,Mt,Ft,rr.uniforms,hr,!1),xe(mt,Mt,Mt,Ft)}function Qe(mt,Mt,Ft,rr){kl(mt,Mt);var hr=Ft.contextDep,sr=Mt.def(),dr="a0",lr="a1",Wt=Mt.def();mt.shared.props=Wt,mt.batchId=sr;var ir=mt.scope(),Gt=mt.scope();Mt(ir.entry,"for(",sr,"=0;",sr,"<",lr,";++",sr,"){",Wt,"=",dr,"[",sr,"];",Gt,"}",ir.exit);function Dr(Zi){return Zi.contextDep&&hr||Zi.propDep}function Jr(Zi){return!Dr(Zi)}if(Ft.needsContext&&js(mt,Gt,Ft.context),Ft.needsFramebuffer&&pl(mt,Gt,Ft.framebuffer),Xn(mt,Gt,Ft.state,Dr),Ft.profile&&Dr(Ft.profile)&&Io(mt,Gt,Ft,!1,!0),rr)Ft.useVAO?Ft.drawVAO?Dr(Ft.drawVAO)?Gt(mt.shared.vao,".setVAO(",Ft.drawVAO.append(mt,Gt),");"):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,Gt,Ft,rr.attributes,Dr)),K(mt,ir,Ft,rr.uniforms,Jr,!1),K(mt,Gt,Ft,rr.uniforms,Dr,!0),xe(mt,ir,Gt,Ft);else{var ya=mt.global.def("{}"),vi=Ft.shader.progVar.append(mt,Gt),Ga=Gt.def(vi,".id"),ii=Gt.def(ya,"[",Ga,"]");Gt(mt.shared.gl,".useProgram(",vi,".program);","if(!",ii,"){",ii,"=",ya,"[",Ga,"]=",mt.link(function(Zi){return re(ke,mt,Ft,Zi,2)}),"(",vi,");}",ii,".call(this,a0[",sr,"],",sr,");")}}function vt(mt,Mt){var Ft=mt.proc("batch",2);mt.batchId="0",kl(mt,Ft);var rr=!1,hr=!0;Object.keys(Mt.context).forEach(function(ya){rr=rr||Mt.context[ya].propDep}),rr||(js(mt,Ft,Mt.context),hr=!1);var sr=Mt.framebuffer,dr=!1;sr?(sr.propDep?rr=dr=!0:sr.contextDep&&rr&&(dr=!0),dr||pl(mt,Ft,sr)):pl(mt,Ft,null),Mt.state.viewport&&Mt.state.viewport.propDep&&(rr=!0);function lr(ya){return ya.contextDep&&rr||ya.propDep}bl(mt,Ft,Mt),Xn(mt,Ft,Mt.state,function(ya){return!lr(ya)}),(!Mt.profile||!lr(Mt.profile))&&Io(mt,Ft,Mt,!1,"a1"),Mt.contextDep=rr,Mt.needsContext=hr,Mt.needsFramebuffer=dr;var Wt=Mt.shader.progVar;if(Wt.contextDep&&rr||Wt.propDep)Qe(mt,Ft,Mt,null);else{var ir=Wt.append(mt,Ft);if(Ft(mt.shared.gl,".useProgram(",ir,".program);"),Mt.shader.program)Qe(mt,Ft,Mt,Mt.shader.program);else{Ft(mt.shared.vao,".setVAO(null);");var Gt=mt.global.def("{}"),Dr=Ft.def(ir,".id"),Jr=Ft.def(Gt,"[",Dr,"]");Ft(mt.cond(Jr).then(Jr,".call(this,a0,a1);").else(Jr,"=",Gt,"[",Dr,"]=",mt.link(function(ya){return re(Qe,mt,Mt,ya,2)}),"(",ir,");",Jr,".call(this,a0,a1);"))}}Object.keys(Mt.state).length>0&&Ft(mt.shared.current,".dirty=true;"),mt.shared.vao&&Ft(mt.shared.vao,".setVAO(null);")}function qt(mt,Mt){var Ft=mt.proc("scope",3);mt.batchId="a2";var rr=mt.shared,hr=rr.current;if(js(mt,Ft,Mt.context),Mt.framebuffer&&Mt.framebuffer.append(mt,Ft),oi(Object.keys(Mt.state)).forEach(function(lr){var Wt=Mt.state[lr],ir=Wt.append(mt,Ft);ga(ir)?ir.forEach(function(Gt,Dr){Xi(Gt)?Ft.set(mt.next[lr],"["+Dr+"]",Gt):Ft.set(mt.next[lr],"["+Dr+"]",mt.link(Gt,{stable:!0}))}):sn(Wt)?Ft.set(rr.next,"."+lr,mt.link(ir,{stable:!0})):Ft.set(rr.next,"."+lr,ir)}),Io(mt,Ft,Mt,!0,!0),[$t,Kr,Sr,na,Tr].forEach(function(lr){var Wt=Mt.draw[lr];if(Wt){var ir=Wt.append(mt,Ft);Xi(ir)?Ft.set(rr.draw,"."+lr,ir):Ft.set(rr.draw,"."+lr,mt.link(ir),{stable:!0})}}),Object.keys(Mt.uniforms).forEach(function(lr){var Wt=Mt.uniforms[lr].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(Xt.id(lr),{stable:!0})+"]",Wt)}),Object.keys(Mt.attributes).forEach(function(lr){var Wt=Mt.attributes[lr].append(mt,Ft),ir=mt.scopeAttrib(lr);Object.keys(new Ma).forEach(function(Gt){Ft.set(ir,"."+Gt,Wt[Gt])})}),Mt.scopeVAO){var sr=Mt.scopeVAO.append(mt,Ft);Xi(sr)?Ft.set(rr.vao,".targetVAO",sr):Ft.set(rr.vao,".targetVAO",mt.link(sr,{stable:!0}))}function dr(lr){var Wt=Mt.shader[lr];if(Wt){var ir=Wt.append(mt,Ft);Xi(ir)?Ft.set(rr.shader,"."+lr,ir):Ft.set(rr.shader,"."+lr,mt.link(ir,{stable:!0}))}}dr(wt),dr(Ot),Object.keys(Mt.state).length>0&&(Ft(hr,".dirty=true;"),Ft.exit(hr,".dirty=true;")),Ft("a1(",mt.shared.context,",a0,",mt.batchId,");")}function br(mt){if(!(typeof mt!="object"||ga(mt))){for(var Mt=Object.keys(mt),Ft=0;Ft=0;--re){var ye=vn[re];ye&&ye(Na,null,0)}fr.flush(),si&&si.update()}function Wn(){!Ln&&vn.length>0&&(Ln=f.next(Dn))}function Os(){Ln&&(f.cancel(Dn),Ln=null)}function xl(re){re.preventDefault(),Ta=!0,Os(),Rn.forEach(function(ye){ye()})}function ho(re){fr.getError(),Ta=!1,ma.restore(),hn.restore(),di.restore(),Ha.restore(),Ua.restore(),Yi.restore(),Bi.restore(),si&&si.restore(),Ri.procs.refresh(),Wn(),Ii.forEach(function(ye){ye()})}Xi&&(Xi.addEventListener(fs,xl,!1),Xi.addEventListener(ms,ho,!1));function Xl(){vn.length=0,Os(),Xi&&(Xi.removeEventListener(fs,xl),Xi.removeEventListener(ms,ho)),hn.clear(),Yi.clear(),Ua.clear(),Bi.clear(),Ha.clear(),Va.clear(),di.clear(),si&&si.clear(),nn.forEach(function(re){re()})}function hs(re){function ye(sr){var dr=v({},sr);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 lr(Wt){if(Wt in dr){var ir=dr[Wt];delete dr[Wt],Object.keys(ir).forEach(function(Gt){dr[Wt+"."+Gt]=ir[Gt]})}}return lr("blend"),lr("depth"),lr("cull"),lr("stencil"),lr("polygonOffset"),lr("scissor"),lr("sample"),"vao"in sr&&(dr.vao=sr.vao),dr}function Ue(sr,dr){var lr={},Wt={};return Object.keys(sr).forEach(function(ir){var Gt=sr[ir];if(h.isDynamic(Gt)){Wt[ir]=h.unbox(Gt,ir);return}else if(dr&&Array.isArray(Gt)){for(var Dr=0;Dr0)return mt.call(this,rr(sr|0),sr|0)}else if(Array.isArray(sr)){if(sr.length)return mt.call(this,sr,sr.length)}else return pr.call(this,sr)}return v(hr,{stats:br,destroy:function(){Br.destroy()}})}var Al=Yi.setFBO=hs({framebuffer:h.define.call(null,Tl,"framebuffer")});function El(re,ye){var Ue=0;Ri.procs.poll();var ke=ye.color;ke&&(fr.clearColor(+ke[0]||0,+ke[1]||0,+ke[2]||0,+ke[3]||0),Ue|=al),"depth"in ye&&(fr.clearDepth(+ye.depth),Ue|=_l),"stencil"in ye&&(fr.clearStencil(ye.stencil|0),Ue|=mn),fr.clear(Ue)}function ru(re){if("framebuffer"in re)if(re.framebuffer&&re.framebuffer_reglType==="framebufferCube")for(var ye=0;ye<6;++ye)Al(v({framebuffer:re.framebuffer.faces[ye]},re),El);else Al(re,El);else El(null,re)}function js(re){vn.push(re);function ye(){var Ue=Rl(vn,re);function ke(){var Qe=Rl(vn,ke);vn[Qe]=vn[vn.length-1],vn.length-=1,vn.length<=0&&Os()}vn[Ue]=ke}return Wn(),{cancel:ye}}function pl(){var re=xi.viewport,ye=xi.scissor_box;re[0]=re[1]=ye[0]=ye[1]=0,Na.viewportWidth=Na.framebufferWidth=Na.drawingBufferWidth=re[2]=ye[2]=fr.drawingBufferWidth,Na.viewportHeight=Na.framebufferHeight=Na.drawingBufferHeight=re[3]=ye[3]=fr.drawingBufferHeight}function bl(){Na.tick+=1,Na.time=kl(),pl(),Ri.procs.poll()}function Xn(){Ha.refresh(),pl(),Ri.procs.refresh(),si&&si.update()}function kl(){return(m()-gn)/1e3}Xn();function Io(re,ye){var Ue;switch(re){case"frame":return js(ye);case"lost":Ue=Rn;break;case"restore":Ue=Ii;break;case"destroy":Ue=nn;break;default:}return Ue.push(ye),{cancel:function(){for(var ke=0;ke=0},read:Ti,destroy:Xl,_gl:fr,_refresh:Xn,poll:function(){bl(),si&&si.update()},now:kl,stats:Ya,getCachedCode:ge,preloadCachedCode:K});return Xt.onDone(null,xe),xe}return _c})}}),xT=He({"src/lib/prepare_regl.js"(Z,q){"use strict";var v=TE(),_=Pq();q.exports=function(M,e,t){var r=M._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=_({canvas:this,attributes:{antialias:!a.pick,preserveDrawingBuffer:!0},pixelRatio:M._context.plotGlPixelRatio||window.devicePixelRatio,extensions:e||[],cachedCode:t||{}})}catch{o=!1}a.regl||(o=!1),o&&this.addEventListener("webglcontextlost",function(i){M&&M.emit&&M.emit("plotly_webglcontextlost",{event:i,layer:a.key})},!1)}}),o||v({container:r._glcontainer.node()}),o}}}),p6=He({"src/traces/scattergl/plot.js"(h,q){"use strict";var v=HE(),_=a6(),S=dq(),M=Lq(),e=sa(),t=Jd().selectMode,r=xT(),o=Fu(),a=O5(),i=qE().styleTextSelection,n={};function s(f,m,c,T){var l=f._size,x=f.width*T,w=f.height*T,A=l.l*T,E=l.b*T,p=l.r*T,b=l.t*T,d=l.w*T,u=l.h*T;return[A+m.domain[0]*d,E+c.domain[0]*u,x-p-(1-m.domain[1])*d,w-b-(1-c.domain[1])*u]}var h=q.exports=function(m,c,T){if(T.length){var l=m._fullLayout,x=c._scene,w=c.xaxis,A=c.yaxis,E,p;if(x){var b=r(m,["ANGLE_instanced_arrays","OES_element_index_uint"],n);if(!b){x.init();return}var d=x.count,u=l._glcanvas.data()[0].regl;if(a(m,c,T),x.dirty){if((x.line2d||x.error2d)&&!(x.scatter2d||x.fill2d||x.glText)&&u.clear({color:!0,depth:!0}),x.error2d===!0&&(x.error2d=S(u)),x.line2d===!0&&(x.line2d=_(u)),x.scatter2d===!0&&(x.scatter2d=v(u)),x.fill2d===!0&&(x.fill2d=_(u)),x.glText===!0)for(x.glText=new Array(d),E=0;Ex.glText.length){var g=d-x.glText.length;for(E=0;Eee&&(isNaN(j[te])||isNaN(j[te+1]));)te-=2;ae.positions=j.slice(ee,te+2)}return ae}),x.line2d.update(x.lineOptions)),x.error2d){var P=(x.errorXOptions||[]).concat(x.errorYOptions||[]).map(function(ae){return ae||{positions:[],errors:[]}});x.error2d.update(P)}x.scatter2d&&x.scatter2d.update(x.markerOptions),x.fillOrder=e.repeat(null,d),x.fill2d&&(x.fillOptions=x.fillOptions.map(function(ae,j){var ee=T[j];if(!(!ae||!ee||!ee[0]||!ee[0].trace)){var te=ee[0],pe=te.trace,we=te.t,Se=x.lineOptions[j],Re,Pe,je=[];pe._ownfill&&je.push(j),pe._nexttrace&&je.push(j+1),je.length&&(x.fillOrder[j]=je);var at=[],nt=Se&&Se.positions||we.positions,tt,Ve;if(pe.fill==="tozeroy"){for(tt=0;tttt&&isNaN(nt[Ve+1]);)Ve-=2;nt[tt+1]!==0&&(at=[nt[tt],0]),at=at.concat(nt.slice(tt,Ve+2)),nt[Ve+1]!==0&&(at=at.concat([nt[Ve],0]))}else if(pe.fill==="tozerox"){for(tt=0;tttt&&isNaN(nt[Ve]);)Ve-=2;nt[tt]!==0&&(at=[0,nt[tt+1]]),at=at.concat(nt.slice(tt,Ve+2)),nt[Ve]!==0&&(at=at.concat([0,nt[Ve+1]]))}else if(pe.fill==="toself"||pe.fill==="tonext"){for(at=[],Re=0,ae.splitNull=!0,Pe=0;Pe-1;for(let[ae]of T)if(ae){var O=ae.trace,L=ae.t,U=L.index,B=O._length,W=L.x,$=L.y;if(O.selectedpoints||F||N){if(F||(F=!0),O.selectedpoints){var ue=x.selectBatch[U]=e.selIndices2selPoints(O),ce={};for(p=0;pw&&c||xi,y;for(g?y=c.sizeAvg||Math.max(c.size,3):y=S(h,m),A=0;A{this.draw(),this.dirty=!0,this.planned=null})):(this.draw(),this.dirty=!0,M(()=>{this.dirty=!1})),this)},o.prototype.update=function(...s){if(!s.length)return;for(let m=0;my||!c.lower&&g{h[T+x]=m})}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 m=s.id!=null?s.id:s,c=h,T=f;return m<<16|(c&255)<<8|T&255}function i(s,h,f){let m,c,T,l,x,w,A,E,p=s[h],b=s[f];return p.length>2?(m=p[0],T=p[2],c=p[1],l=p[3]):p.length?(m=c=p[0],T=l=p[1]):(m=p.x,c=p.y,T=p.x+p.width,l=p.y+p.height),b.length>2?(x=b[0],A=b[2],w=b[1],E=b[3]):b.length?(x=w=b[0],A=E=b[1]):(x=b.x,w=b.y,A=b.x+b.width,E=b.y+b.height),[x,c,A,l]}function n(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]}}}}),jq=He({"src/traces/splom/plot.js"(Z,q){"use strict";var v=Uq(),_=sa(),S=tf(),M=Jd().selectMode;q.exports=function(r,o,a){if(a.length)for(var i=0;i-1,N=M(c)||!!i.selectedpoints||F,O=!0;if(N){var L=i._length;if(i.selectedpoints){s.selectBatch=i.selectedpoints;var U=i.selectedpoints,B={};for(x=0;x=W[$][0]&&B<=W[$][1])return!0;return!1}function h(B){B.attr("x",-v.bar.captureWidth/2).attr("width",v.bar.captureWidth)}function f(B){B.attr("visibility","visible").style("visibility","visible").attr("fill","yellow").attr("opacity",0)}function m(B){if(!B.brush.filterSpecified)return"0,"+B.height;for(var W=c(B.brush.filter.getConsolidated(),B.height),$=[0],ue,ce,de,Y=W.length?W[0][0]:null,X=0;XB[1]+$||W=.9*B[1]+.1*B[0]?"n":W<=.9*B[0]+.1*B[1]?"s":"ns"}function l(){_.select(document.body).style("cursor",null)}function x(B){B.attr("stroke-dasharray",m)}function w(B,W){var $=_.select(B).selectAll(".highlight, .highlight-shadow"),ue=W?$.transition().duration(v.bar.snapDuration).each("end",W):$;x(ue)}function A(B,W){var $=B.brush,ue=$.filterSpecified,ce=NaN,de={},Y;if(ue){var X=B.height,Q=$.filter.getConsolidated(),V=c(Q,X),le=NaN,ae=NaN,j=NaN;for(Y=0;Y<=V.length;Y++){var ee=V[Y];if(ee&&ee[0]<=W&&W<=ee[1]){le=Y;break}else if(ae=Y?Y-1:NaN,ee&&ee[0]>W){j=Y;break}}if(ce=le,isNaN(ce)&&(isNaN(ae)||isNaN(j)?ce=isNaN(ae)?j:ae:ce=W-V[ae][1]=Re[0]&&Se<=Re[1]){de.clickableOrdinalRange=Re;break}}}return de}function E(B,W){_.event.sourceEvent.stopPropagation();var $=W.height-_.mouse(B)[1]-2*v.verticalPadding,ue=W.unitToPaddedPx.invert($),ce=W.brush,de=A(W,$),Y=de.interval,X=ce.svgBrush;if(X.wasDragged=!1,X.grabbingBar=de.region==="ns",X.grabbingBar){var Q=Y.map(W.unitToPaddedPx);X.grabPoint=$-Q[0]-v.verticalPadding,X.barLength=Q[1]-Q[0]}X.clickableOrdinalRange=de.clickableOrdinalRange,X.stayingIntervals=W.multiselect&&ce.filterSpecified?ce.filter.getConsolidated():[],Y&&(X.stayingIntervals=X.stayingIntervals.filter(function(V){return V[0]!==Y[0]&&V[1]!==Y[1]})),X.startExtent=de.region?Y[de.region==="s"?1:0]:ue,W.parent.inBrushDrag=!0,X.brushStartCallback()}function p(B,W){_.event.sourceEvent.stopPropagation();var $=W.height-_.mouse(B)[1]-2*v.verticalPadding,ue=W.brush.svgBrush;ue.wasDragged=!0,ue._dragging=!0,ue.grabbingBar?ue.newExtent=[$-ue.grabPoint,$+ue.barLength-ue.grabPoint].map(W.unitToPaddedPx.invert):ue.newExtent=[ue.startExtent,W.unitToPaddedPx.invert($)].sort(e),W.brush.filterSpecified=!0,ue.extent=ue.stayingIntervals.concat([ue.newExtent]),ue.brushCallback(W),w(B.parentNode)}function b(B,W){var $=W.brush,ue=$.filter,ce=$.svgBrush;ce._dragging||(d(B,W),p(B,W),W.brush.svgBrush.wasDragged=!1),ce._dragging=!1;var de=_.event;de.sourceEvent.stopPropagation();var Y=ce.grabbingBar;if(ce.grabbingBar=!1,ce.grabLocation=void 0,W.parent.inBrushDrag=!1,l(),!ce.wasDragged){ce.wasDragged=void 0,ce.clickableOrdinalRange?$.filterSpecified&&W.multiselect?ce.extent.push(ce.clickableOrdinalRange):(ce.extent=[ce.clickableOrdinalRange],$.filterSpecified=!0):Y?(ce.extent=ce.stayingIntervals,ce.extent.length===0&&z($)):z($),ce.brushCallback(W),w(B.parentNode),ce.brushEndCallback($.filterSpecified?ue.getConsolidated():[]);return}var X=function(){ue.set(ue.getConsolidated())};if(W.ordinal){var Q=W.unitTickvals;Q[Q.length-1]ce.newExtent[0];ce.extent=ce.stayingIntervals.concat(V?[ce.newExtent]:[]),ce.extent.length||z($),ce.brushCallback(W),V?w(B.parentNode,X):(X(),w(B.parentNode))}else X();ce.brushEndCallback($.filterSpecified?ue.getConsolidated():[])}function d(B,W){var $=W.height-_.mouse(B)[1]-2*v.verticalPadding,ue=A(W,$),ce="crosshair";ue.clickableOrdinalRange?ce="pointer":ue.region&&(ce=ue.region+"-resize"),_.select(document.body).style("cursor",ce)}function u(B){B.on("mousemove",function(W){_.event.preventDefault(),W.parent.inBrushDrag||d(this,W)}).on("mouseleave",function(W){W.parent.inBrushDrag||l()}).call(_.behavior.drag().on("dragstart",function(W){E(this,W)}).on("drag",function(W){p(this,W)}).on("dragend",function(W){b(this,W)}))}function g(B,W){return B[0]-W[0]}function y(B,W,$){var ue=$._context.staticPlot,ce=B.selectAll(".background").data(M);ce.enter().append("rect").classed("background",!0).call(h).call(f).style("pointer-events",ue?"none":"auto").attr("transform",t(0,v.verticalPadding)),ce.call(u).attr("height",function(X){return X.height-v.verticalPadding});var de=B.selectAll(".highlight-shadow").data(M);de.enter().append("line").classed("highlight-shadow",!0).attr("x",-v.bar.width/2).attr("stroke-width",v.bar.width+v.bar.strokeWidth).attr("stroke",W).attr("opacity",v.bar.strokeOpacity).attr("stroke-linecap","butt"),de.attr("y1",function(X){return X.height}).call(x);var Y=B.selectAll(".highlight").data(M);Y.enter().append("line").classed("highlight",!0).attr("x",-v.bar.width/2).attr("stroke-width",v.bar.width-v.bar.strokeWidth).attr("stroke",v.bar.fillColor).attr("opacity",v.bar.fillOpacity).attr("stroke-linecap","butt"),Y.attr("y1",function(X){return X.height}).call(x)}function D(B,W,$){var ue=B.selectAll("."+v.cn.axisBrush).data(M,S);ue.enter().append("g").classed(v.cn.axisBrush,!0),y(ue,W,$)}function P(B){return B.svgBrush.extent.map(function(W){return W.slice()})}function z(B){B.filterSpecified=!1,B.svgBrush.extent=[[-1/0,1/0]]}function F(B){return function($){var ue=$.brush,ce=P(ue),de=ce.slice();ue.filter.set(de),B()}}function N(B){for(var W=B.slice(),$=[],ue,ce=W.shift();ce;){for(ue=ce.slice();(ce=W.shift())&&ce[0]<=ue[1];)ue[1]=Math.max(ue[1],ce[1]);$.push(ue)}return $.length===1&&$[0][0]>$[0][1]&&($=[]),$}function O(){var B=[],W,$;return{set:function(ue){B=ue.map(function(ce){return ce.slice().sort(e)}).sort(g),B.length===1&&B[0][0]===-1/0&&B[0][1]===1/0&&(B=[[0,-1]]),W=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 W},getBounds:function(){return $}}}function L(B,W,$,ue,ce,de){var Y=O();return Y.set($),{filter:Y,filterSpecified:W,svgBrush:{extent:[],brushStartCallback:ue,brushCallback:F(ce),brushEndCallback:de}}}function U(B,W){if(Array.isArray(B[0])?(B=B.map(function(ue){return ue.sort(e)}),W.multiselect?B=N(B.sort(g)):B=[B[0]]):B=[B.sort(e)],W.tickvals){var $=W.tickvals.slice().sort(e);if(B=B.map(function(ue){var ce=[n(0,$,ue[0],[]),n(1,$,ue[1],[])];if(ce[1]>ce[0])return ce}).filter(function(ue){return ue}),!B.length)return}return B.length>1?B:B[0]}q.exports={makeBrush:L,ensureAxisBrush:D,cleanRanges:U}}}),Yq=He({"src/traces/parcoords/defaults.js"(Z,q){"use strict";var v=sa(),_=wp().hasColorscale,S=_h(),M=wc().defaults,e=pp(),t=Wo(),r=m6(),o=g6(),a=Ax().maxDimensionCount,i=bT();function n(h,f,m,c,T){var l=T("line.color",m);if(_(h,"line")&&v.isArrayOrTypedArray(l)){if(l.length)return T("line.colorscale"),S(h,f,c,T,{prefix:"line.",cLetter:"c"}),l.length;f.line.color=m}return 1/0}function s(h,f,m,c){function T(E,p){return v.coerce(h,f,r.dimensions,E,p)}var l=T("values"),x=T("visible");if(l&&l.length||(x=f.visible=!1),x){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))}}q.exports=function(f,m,c,T){function l(p,b){return v.coerce(f,m,r,p,b)}var x=f.dimensions;Array.isArray(x)&&x.length>a&&(v.log("parcoords traces support up to "+a+" dimensions at the moment"),x.splice(a));var w=e(f,m,{name:"dimensions",layout:T,handleItemDefaults:s}),A=n(f,m,c,T,l);M(m,T,l),(!Array.isArray(w)||!w.length)&&(m.visible=!1),i(m,w,"values",A);var E=v.extendFlat({},T.font,{size:Math.round(T.font.size/1.2)});v.coerceFont(l,"labelfont",E),v.coerceFont(l,"tickfont",E,{autoShadowDflt:!0}),v.coerceFont(l,"rangefont",E),l("labelangle"),l("labelside"),l("unselected.line.color"),l("unselected.line.opacity")}}}),Kq=He({"src/traces/parcoords/calc.js"(Z,q){"use strict";var v=sa().isArrayOrTypedArray,_=rc(),S=Cv().wrap;q.exports=function(t,r){var o,a;return _.hasColorscale(r,"line")&&v(r.line.color)?(o=r.line.color,a=_.extractOpts(r.line).colorscale,_.calc(t,r,{vals:o,containerStr:"line",cLetter:"c"})):(o=M(r._length),a=[[0,r.line.color],[1,r.line.color]]),S({lineColor:o,cscale:a})};function M(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")M=0,e="rgb",S=[0,0,0];else if(Z[0]==="#"){var t=Z.slice(1),r=t.length,o=r<=4;M=1,o?(S=[parseInt(t[0]+t[0],16),parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16)],r===4&&(M=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&&(M=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(_=/^((?:rgba?|hs[lvb]a?|hwba?|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms|oklch|oklab|color))\s*\(([^\)]*)\)/.exec(Z)){var a=_[1];e=a.replace(/a$/,"");var i=e==="cmyk"?4:e==="gray"?1:3;S=_[2].trim().split(/\s*[,\/]\s*|\s+/),e==="color"&&(e=S.shift()),S=S.map(function(n,s){if(n[n.length-1]==="%")return n=parseFloat(n)/100,s===3?n:e==="rgb"?n*255:e[0]==="h"||e[0]==="l"&&!s?n*100:e==="lab"?n*125:e==="lch"?s<2?n*150:n*360:e[0]==="o"&&!s?n:e==="oklab"?n*.4:e==="oklch"?s<2?n*.4:n*360:n;if(e[s]==="h"||s===2&&e[e.length-1]==="h"){if(TT[n]!==void 0)return TT[n];if(n.endsWith("deg"))return parseFloat(n);if(n.endsWith("turn"))return parseFloat(n)*360;if(n.endsWith("grad"))return parseFloat(n)*360/400;if(n.endsWith("rad"))return parseFloat(n)*180/Math.PI}return n==="none"?0:parseFloat(n)}),M=S.length>i?S.pop():1}else/[0-9](?:\s|\/|,)/.test(Z)&&(S=Z.match(/([0-9]+)/g).map(function(n){return parseFloat(n)}),e=((v=(q=Z.match(/([a-z])/ig))==null?void 0:q.join(""))==null?void 0:v.toLowerCase())||"rgb");return{space:e,values:S,alpha:M}}var wT,y6,TT,$q=Ho({"node_modules/color-parse/index.js"(){wT=jp(xE(),1),y6=Jq,TT={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}}}),Sx,_6=Ho({"node_modules/color-space/rgb.js"(){Sx={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}}}),Mx,Qq=Ho({"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 q=Z[0]/360,v=Z[1]/100,_=Z[2]/100,S,M,e,t,r,o=0;if(v===0)return r=_*255,[r,r,r];for(M=_<.5?_*(1+v):_+v-_*v,S=2*_-M,t=[0,0,0];o<3;)e=q+1/3*-(o-1),e<0?e++:e>1&&e--,r=6*e<1?S+(M-S)*6*e:2*e<1?M:3*e<2?S+(M-S)*(2/3-e)*6:S,t[o++]=r*255;return t}},Sx.hsl=function(Z){var q=Z[0]/255,v=Z[1]/255,_=Z[2]/255,S=Math.min(q,v,_),M=Math.max(q,v,_),e=M-S,t,r,o;return M===S?t=0:q===M?t=(v-_)/e:v===M?t=2+(_-q)/e:_===M&&(t=4+(q-v)/e),t=Math.min(t*60,360),t<0&&(t+=360),o=(S+M)/2,M===S?r=0:o<=.5?r=e/(M+S):r=e/(2-M-S),[t,r*100,o*100]}}}),x6={};Jl(x6,{default:()=>eV});function eV(Z){Array.isArray(Z)&&Z.raw&&(Z=String.raw(...arguments)),Z instanceof Number&&(Z=+Z);var q,v,_,S=y6(Z);if(!S.space)return[];let M=S.space[0]==="h"?Mx.min:Sx.min,e=S.space[0]==="h"?Mx.max:Sx.max;return q=Array(3),q[0]=Math.min(Math.max(S.values[0],M[0]),e[0]),q[1]=Math.min(Math.max(S.values[1],M[1]),e[1]),q[2]=Math.min(Math.max(S.values[2],M[2]),e[2]),S.space[0]==="h"&&(q=Mx.rgb(q)),q.push(Math.min(Math.max(S.alpha,0),1)),q}var tV=Ho({"node_modules/color-rgba/index.js"(){$q(),_6(),Qq()}}),b6=He({"src/traces/parcoords/helpers.js"(Z){"use strict";var q=sa().isTypedArray;Z.convertTypedArray=function(v){return q(v)?Array.prototype.slice.call(v):v},Z.isOrdinal=function(v){return!!v.tickvals},Z.isVisible=function(v){return v.visible||!("visible"in v)}}}),rV=He({"src/traces/parcoords/lines.js"(Z,q){"use strict";var v=["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(` `),_=["precision highp float;","","varying vec4 fragColor;","","void main() {"," gl_FragColor = fragColor;","}"].join(` `),S=Ax().maxDimensionCount,M=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 i(b){b.read({x:0,y:0,width:1,height:1,data:r})}function n(b,d,u,g,y){var D=b._gl;D.enable(D.SCISSOR_TEST),D.scissor(d,u,g,y),b.clear({color:[0,0,0,0],depth:1})}function s(b,d,u,g,y,D){var P=D.key;function z(F){var N=Math.min(g,y-F*g);F===0&&(window.cancelAnimationFrame(u.currentRafs[P]),delete u.currentRafs[P],n(b,D.scissorX,D.scissorY,D.scissorWidth,D.viewBoxSize[1])),!u.clearOnly&&(D.count=2*N,D.offset=2*F*g,d(D),F*g+N>>8*d)%256/255}function c(b,d,u){for(var g=new Array(b*(S+4)),y=0,D=0;DPe&&(Pe=ae[pe].dim1.canvasX,Se=pe);te===0&&n(y,0,0,N.canvasWidth,N.canvasHeight);var je=Y(u);for(pe=0;pepe._length&&(Ve=Ve.slice(0,pe._length));var he=pe.tickvals,se;function ne(St,kt){return{val:St,text:se[kt]}}function Ce(St,kt){return St.val-kt.val}if(S(he)&&he.length){_.isTypedArray(he)&&(he=Array.from(he)),se=pe.ticktext,!S(se)||!se.length?se=he.map(M(pe.tickformat)):se.length>he.length?se=se.slice(0,he.length):he.length>se.length&&(he=he.slice(0,se.length));for(var Ze=1;Ze=kt||vr>=Bt)return;var qr=Je.lineLayer.readPixel(Ar,Bt-1-vr),kr=qr[3]!==0,Ur=kr?qr[2]+256*(qr[1]+256*qr[0]):null,_t={x:Ar,y:vr,clientX:St.clientX,clientY:St.clientY,dataIndex:Je.model.key,curveNumber:Ur};Ur!==Se&&(kr?X.hover(_t):X.unhover&&X.unhover(_t),Se=Ur)}}),we.style("opacity",function(Je){return Je.pick?0:1}),le.style("background","rgba(255, 255, 255, 0)");var Pe=le.selectAll("."+T.cn.parcoords).data(pe,h);Pe.exit().remove(),Pe.enter().append("g").classed(T.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),Pe.attr("transform",function(Je){return o(Je.model.translateX,Je.model.translateY)});var je=Pe.selectAll("."+T.cn.parcoordsControlView).data(f,h);je.enter().append("g").classed(T.cn.parcoordsControlView,!0),je.attr("transform",function(Je){return o(Je.model.pad.l,Je.model.pad.t)});var at=je.selectAll("."+T.cn.yAxis).data(function(Je){return Je.dimensions},h);at.enter().append("g").classed(T.cn.yAxis,!0),je.each(function(Je){U(at,Je,j)}),we.each(function(Je){if(Je.viewModel){!Je.lineLayer||X?Je.lineLayer=x(this,Je):Je.lineLayer.update(Je),(Je.key||Je.key===0)&&(Je.viewModel[Je.key]=Je.lineLayer);var St=!Je.context||X;Je.lineLayer.render(Je.viewModel.panels,St)}}),at.attr("transform",function(Je){return o(Je.xScale(Je.xIndex),0)}),at.call(v.behavior.drag().origin(function(Je){return Je}).on("drag",function(Je){var St=Je.parent;te.linePickActive(!1),Je.x=Math.max(-T.overdrag,Math.min(Je.model.width+T.overdrag,v.event.x)),Je.canvasX=Je.x*Je.model.canvasPixelRatio,at.sort(function(kt,Bt){return kt.x-Bt.x}).each(function(kt,Bt){kt.xIndex=Bt,kt.x=Je===kt?kt.x:kt.xScale(kt.xIndex),kt.canvasX=kt.x*kt.model.canvasPixelRatio}),U(at,St,j),at.filter(function(kt){return Math.abs(Je.xIndex-kt.xIndex)!==0}).attr("transform",function(kt){return o(kt.xScale(kt.xIndex),0)}),v.select(this).attr("transform",o(Je.x,0)),at.each(function(kt,Bt,Vt){Vt===Je.parent.key&&(St.dimensions[Bt]=kt)}),St.contextLayer&&St.contextLayer.render(St.panels,!1,!P(St)),St.focusLayer.render&&St.focusLayer.render(St.panels)}).on("dragend",function(Je){var St=Je.parent;Je.x=Je.xScale(Je.xIndex),Je.canvasX=Je.x*Je.model.canvasPixelRatio,U(at,St,j),v.select(this).attr("transform",function(kt){return o(kt.x,0)}),St.contextLayer&&St.contextLayer.render(St.panels,!1,!P(St)),St.focusLayer&&St.focusLayer.render(St.panels),St.pickLayer&&St.pickLayer.render(St.panels,!0),te.linePickActive(!0),X&&X.axesMoved&&X.axesMoved(St.key,St.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(Je){var St=Je.model.height/Je.model.tickDistance,kt=Je.domainScale,Bt=kt.domain();v.select(this).call(v.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(St,Je.tickFormat).tickValues(Je.ordinal?Bt:null).tickFormat(function(Vt){return c.isOrdinal(Je)?Vt:W(Je.model.dimensions[Je.visibleIndex],Vt)}).scale(kt)),i.font(tt.selectAll("text"),Je.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 Ve=nt.selectAll("."+T.cn.axisHeading).data(f,h);Ve.enter().append("g").classed(T.cn.axisHeading,!0);var he=Ve.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",Q?"none":"auto"),he.text(function(Je){return Je.label}).each(function(Je){var St=v.select(this);i.font(St,Je.model.labelFont),a.convertToTspans(St,ce)}).attr("transform",function(Je){var St=L(Je.model.labelAngle,Je.model.labelSide),kt=T.axisTitleOffset;return(St.dir>0?"":o(0,2*kt+Je.model.height))+r(St.degrees)+o(-kt*St.dx,-kt*St.dy)}).attr("text-anchor",function(Je){var St=L(Je.model.labelAngle,Je.model.labelSide),kt=Math.abs(St.dx),Bt=Math.abs(St.dy);return 2*kt>Bt?St.dir*St.dx<0?"start":"end":"middle"});var se=nt.selectAll("."+T.cn.axisExtent).data(f,h);se.enter().append("g").classed(T.cn.axisExtent,!0);var ne=se.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(Je){return $(Je,!0)}).each(function(Je){i.font(v.select(this),Je.model.rangeFont)});var Ze=se.selectAll("."+T.cn.axisExtentBottom).data(f,h);Ze.enter().append("g").classed(T.cn.axisExtentBottom,!0),Ze.attr("transform",function(Je){return o(0,Je.model.height+T.axisExtentOffset)});var rt=Ze.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(Je){return $(Je,!1)}).each(function(Je){i.font(v.select(this),Je.model.rangeFont)}),l.ensureAxisBrush(nt,ee,ce)}}}),w6=He({"src/traces/parcoords/plot.js"(r,q){"use strict";var v=aV(),_=xT(),S=b6().isVisible,M={};function e(o,a,i){var n=a.indexOf(i),s=o.indexOf(n);return s===-1&&(s+=a.length),s}function t(o,a){return function(n,s){return e(o,a,n)-e(o,a,s)}}var r=q.exports=function(a,i){var n=a._fullLayout,s=_(a,[],M);if(s){var h={},f={},m={},c={},T=n._size;i.forEach(function(E,p){var b=E[0].trace;m[p]=b.index;var d=c[p]=b.index;h[p]=a.data[d].dimensions,f[p]=a.data[d].dimensions.slice()});var l=function(E,p,b){var d=f[E][p],u=b.map(function(F){return F.slice()}),g="dimensions["+p+"].constraintrange",y=n._tracePreGUI[a._fullData[m[E]]._fullInput.uid];if(y[g]===void 0){var D=d.constraintrange;y[g]=D||null}var P=a._fullData[m[E]].dimensions[p];u.length?(u.length===1&&(u=u[0]),d.constraintrange=u,P.constraintrange=u.slice(),u=[u]):(delete d.constraintrange,delete P.constraintrange,u=null);var z={};z[g]=u,a.emit("plotly_restyle",[z,[c[E]]])},x=function(E){a.emit("plotly_hover",E)},w=function(E){a.emit("plotly_unhover",E)},A=function(E,p){var b=t(p,f[E].filter(S));h[E].sort(b),f[E].filter(function(d){return!S(d)}).sort(function(d){return f[E].indexOf(d)}).forEach(function(d){h[E].splice(h[E].indexOf(d),1),h[E].splice(f[E].indexOf(d),0,d)}),a.emit("plotly_restyle",[{dimensions:[h[E]]},[c[E]]])};v(a,i,{width:T.w,height:T.h,margin:{t:T.t,r:T.r,b:T.b,l:T.l}},{filterChanged:l,hover:x,unhover:w,axesMoved:A})}};r.reglPrecompiled=M}}),iV=He({"src/traces/parcoords/base_plot.js"(Z){"use strict";var q=Vn(),v=Wh().getModuleCalcData,_=w6(),S=vd();Z.name="parcoords",Z.plot=function(M){var e=v(M.calcdata,"parcoords")[0];e.length&&_(M,e)},Z.clean=function(M,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(M){var e=M._fullLayout._glimages,t=q.select(M).selectAll(".svg-container"),r=t.filter(function(a,i){return i===t.size()-1}).selectAll(".gl-canvas-context, .gl-canvas-focus");function o(){var a=this,i=a.toDataURL("image/png"),n=e.append("svg:image");n.attr({xmlns:S.svg,"xlink:href":i,preserveAspectRatio:"none",x:0,y:0,width:a.style.width,height:a.style.height})}r.each(o),window.setTimeout(function(){q.selectAll("#filterBarPattern").attr("id","filterBarPattern")},60)}}}),nV=He({"src/traces/parcoords/base_index.js"(Z,q){"use strict";q.exports={attributes:m6(),supplyDefaults:Yq(),calc:Kq(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:iV(),categories:["gl","regl","noOpacity","noHover"],meta:{}}}}),oV=He({"src/traces/parcoords/index.js"(Z,q){"use strict";var v=nV();v.plot=w6(),q.exports=v}}),sV=He({"lib/parcoords.js"(Z,q){"use strict";q.exports=oV()}}),T6=He({"src/traces/parcats/attributes.js"(Z,q){"use strict";var v=rs().extendFlat,_=au(),S=tc(),M=ku(),{hovertemplateAttrs:e,templatefallbackAttrs:t}=$l(),r=wc().attributes,o=v({editType:"calc"},M("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"})});q.exports={domain:r({name:"parcats",trace:!0,editType:"calc"}),hoverinfo:v({},_.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}}}),lV=He({"src/traces/parcats/defaults.js"(Z,q){"use strict";var v=sa(),_=wp().hasColorscale,S=_h(),M=wc().defaults,e=pp(),t=T6(),r=bT(),o=hp().isTypedArraySpec;function a(n,s,h,f,m){m("line.shape"),m("line.hovertemplate"),m("line.hovertemplatefallback");var c=m("line.color",f.colorway[0]);if(_(n,"line")&&v.isArrayOrTypedArray(c)){if(c.length)return m("line.colorscale"),S(n,s,f,m,{prefix:"line.",cLetter:"c"}),c.length;s.line.color=h}return 1/0}function i(n,s){function h(w,A){return v.coerce(n,s,t.dimensions,w,A)}var f=h("values"),m=h("visible");if(f&&f.length||(m=s.visible=!1),m){h("label"),h("displayindex",s._index);var c=n.categoryarray,T=v.isArrayOrTypedArray(c)&&c.length>0||o(c),l;T&&(l="array");var x=h("categoryorder",l);x==="array"?(h("categoryarray"),h("ticktext")):(delete n.categoryarray,delete n.ticktext),!T&&x==="array"&&(s.categoryorder="trace")}}q.exports=function(s,h,f,m){function c(w,A){return v.coerce(s,h,t,w,A)}var T=e(s,h,{name:"dimensions",handleItemDefaults:i}),l=a(s,h,f,m,c);M(h,m,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 x=m.font;v.coerceFont(c,"labelfont",x,{overrideDflt:{size:Math.round(x.size)}}),v.coerceFont(c,"tickfont",x,{autoShadowDflt:!0,overrideDflt:{size:Math.round(x.size/1.2)}})}}}),uV=He({"src/traces/parcats/calc.js"(Z,q){"use strict";var v=Cv().wrap,_=wp().hasColorscale,S=Tp(),M=r5(),e=as(),t=sa(),r=ns();q.exports=function(x,w){var A=t.filterVisible(w.dimensions);if(A.length===0)return[];var E=A.map(function(Y){var X;if(Y.categoryorder==="trace")X=null;else if(Y.categoryorder==="array")X=Y.categoryarray;else{X=M(Y.values);for(var Q=!0,V=0;V=l.length||x[l[w]]!==void 0)return!1;x[l[w]]=!0}return!0}}}),cV=He({"src/traces/parcats/parcats.js"(Z,q){"use strict";var v=Vn(),_=(pg(),zf(d0)).interpolateNumber,S=k2(),M=Hc(),e=sa(),t=e.strTranslate,r=as(),o=Ch(),a=su();function i(V,le,ae,j){var ee=le._context.staticPlot,te=V.map(ce.bind(0,le,ae)),pe=j.selectAll("g.parcatslayer").data([null]);pe.enter().append("g").attr("class","parcatslayer").style("pointer-events",ee?"none":"all");var we=pe.selectAll("g.trace.parcats").data(te,n),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 Re=we.select("g.paths"),Pe=Re.selectAll("path.path").data(function(ne){return ne.paths},n);Pe.attr("fill",function(ne){return ne.model.color});var je=Pe.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",function(ne){return ne.model.color}).attr("fill-opacity",0);x(je),Pe.attr("d",function(ne){return ne.svgD}),je.empty()||Pe.sort(h),Pe.exit().remove(),Pe.on("mouseover",f).on("mouseout",m).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},n);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},n),Ve=tt.enter().append("g").attr("class","category");tt.attr("transform",function(ne){return t(0,ne.y)}),Ve.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}),E(Ve);var he=tt.selectAll("rect.bandrect").data(function(ne){return ne.bands},n);he.each(function(){e.raiseToTop(this)}),he.attr("fill",function(ne){return ne.color});var se=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(se),he.exit().remove(),Ve.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(v.select(this),ne.parcatsViewModel.categorylabelfont),a.convertToTspans(v.select(this),le)}),Ve.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(v.select(this),ne.parcatsViewModel.labelfont)}),tt.selectAll("rect.bandrect").on("mouseover",N).on("mouseout",O),tt.exit().remove(),nt.call(v.behavior.drag().origin(function(ne){return{x:ne.x,y:0}}).on("dragstart",L).on("drag",U).on("dragend",B)),we.each(function(ne){ne.traceSelection=v.select(this),ne.pathSelection=v.select(this).selectAll("g.paths").selectAll("path.path"),ne.dimensionSelection=v.select(this).selectAll("g.dimensions").selectAll("g.dimension")}),we.exit().remove()}q.exports=function(V,le,ae,j){i(ae,V,j,le)};function n(V){return V.key}function s(V){var le=V.parcatsViewModel.dimensions.length,ae=V.parcatsViewModel.dimensions[le-1].model.dimensionInd;return V.model.dimensionInd===ae}function h(V,le){return V.model.rawColor>le.model.rawColor?1:V.model.rawColor"),Je=v.mouse(ee)[0];M.loneHover({trace:te,x:tt-we.left+Se.left,y:Ve-we.top+Se.top,text:rt,color:V.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:he,idealAlign:Je1&&Re.displayInd===Se.dimensions.length-1?(at=pe.left,nt="left"):(at=pe.left+pe.width,nt="right");var tt=we.model.count,Ve=we.model.categoryLabel,he=tt/we.parcatsViewModel.model.count,se={countLabel:tt,categoryLabel:Ve,probabilityLabel:he.toFixed(3)},ne=[];we.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&ne.push(["Count:",se.countLabel].join(" ")),we.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&ne.push(["P("+se.categoryLabel+"):",se.probabilityLabel].join(" "));var Ce=ne.join("
");return{trace:Pe,x:j*(at-le.left),y:ee*(je-le.top),text:Ce,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:nt,hovertemplate:Pe.hovertemplate,hovertemplateLabels:se,eventData:[{data:Pe._input,fullData:Pe,count:tt,category:Ve,probability:he}]}}function z(V,le,ae){var j=[];return v.select(ae.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each(function(){var ee=this;j.push(P(V,le,ee))}),j}function F(V,le,ae){V._fullLayout._calcInverseTransform(V);var j=V._fullLayout._invScaleX,ee=V._fullLayout._invScaleY,te=ae.getBoundingClientRect(),pe=v.select(ae).datum(),we=pe.categoryViewModel,Se=we.parcatsViewModel,Re=Se.model.dimensions[we.model.dimensionInd],Pe=Se.trace,je=te.y+te.height/2,at,nt;Se.dimensions.length>1&&Re.displayInd===Se.dimensions.length-1?(at=te.left,nt="left"):(at=te.left+te.width,nt="right");var tt=we.model.categoryLabel,Ve=pe.parcatsViewModel.model.count,he=0;pe.categoryViewModel.bands.forEach(function(Vt){Vt.color===pe.color&&(he+=Vt.count)});var se=we.model.count,ne=0;Se.pathSelection.each(function(Vt){Vt.model.color===pe.color&&(ne+=Vt.model.count)});var Ce=he/Ve,Ze=he/ne,rt=he/se,Je={countLabel:he,categoryLabel:tt,probabilityLabel:Ce.toFixed(3)},St=[];we.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&St.push(["Count:",Je.countLabel].join(" ")),we.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&(St.push("P(color \u2229 "+tt+"): "+Je.probabilityLabel),St.push("P("+tt+" | color): "+Ze.toFixed(3)),St.push("P(color | "+tt+"): "+rt.toFixed(3)));var kt=St.join("
"),Bt=o.mostReadable(pe.color,["black","white"]);return{trace:Pe,x:j*(at-le.left),y:ee*(je-le.top),text:kt,color:pe.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:Bt,fontSize:10,idealAlign:nt,hovertemplate:Pe.hovertemplate,hovertemplateLabels:Je,eventData:[{data:Pe._input,fullData:Pe,category:tt,count:Ve,probability:Ce,categorycount:se,colorcount:ne,bandcolorcount:he}]}}function N(V){if(!V.parcatsViewModel.dragDimension&&V.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){var le=v.mouse(this)[1];if(le<-1)return;var ae=V.parcatsViewModel.graphDiv,j=ae._fullLayout,ee=j._paperdiv.node().getBoundingClientRect(),te=V.parcatsViewModel.hoveron,pe=this;if(te==="color"?(g(pe),D(pe,"plotly_hover",v.event)):(u(pe),y(pe,"plotly_hover",v.event)),V.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var we;te==="category"?we=P(ae,ee,pe):te==="color"?we=F(ae,ee,pe):te==="dimension"&&(we=z(ae,ee,pe)),we&&M.loneHover(we,{container:j._hoverlayer.node(),outerContainer:j._paper.node(),gd:ae})}}}function O(V){var le=V.parcatsViewModel;if(!le.dragDimension&&(x(le.pathSelection),E(le.dimensionSelection.selectAll("g.category")),b(le.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),M.loneUnhover(le.graphDiv._fullLayout._hoverlayer.node()),le.pathSelection.sort(h),le.hoverinfoItems.indexOf("skip")===-1)){var ae=V.parcatsViewModel.hoveron,j=this;ae==="color"?D(j,"plotly_unhover",v.event):y(j,"plotly_unhover",v.event)}}function L(V){V.parcatsViewModel.arrangement!=="fixed"&&(V.dragDimensionDisplayInd=V.model.displayInd,V.initialDragDimensionDisplayInds=V.parcatsViewModel.model.dimensions.map(function(le){return le.displayInd}),V.dragHasMoved=!1,V.dragCategoryDisplayInd=null,v.select(this).selectAll("g.category").select("rect.catrect").each(function(le){var ae=v.mouse(this)[0],j=v.mouse(this)[1];-2<=ae&&ae<=le.width+2&&-2<=j&&j<=le.height+2&&(V.dragCategoryDisplayInd=le.model.displayInd,V.initialDragCategoryDisplayInds=V.model.categories.map(function(ee){return ee.displayInd}),le.model.dragY=le.y,e.raiseToTop(this.parentNode),v.select(this.parentNode).selectAll("rect.bandrect").each(function(ee){ee.yPe.y+Pe.height/2&&(te.model.displayInd=Pe.model.displayInd,Pe.model.displayInd=we),V.dragCategoryDisplayInd=te.model.displayInd}if(V.dragCategoryDisplayInd===null||V.parcatsViewModel.arrangement==="freeform"){ee.model.dragX=v.event.x;var je=V.parcatsViewModel.dimensions[ae],at=V.parcatsViewModel.dimensions[j];je!==void 0&&ee.model.dragXat.x&&(ee.model.displayInd=at.model.displayInd,at.model.displayInd=V.dragDimensionDisplayInd),V.dragDimensionDisplayInd=ee.model.displayInd}X(V.parcatsViewModel),Y(V.parcatsViewModel),ue(V.parcatsViewModel),$(V.parcatsViewModel)}}function B(V){if(V.parcatsViewModel.arrangement!=="fixed"&&V.dragDimensionDisplayInd!==null){v.select(this).selectAll("text").attr("font-weight","normal");var le={},ae=W(V.parcatsViewModel),j=V.parcatsViewModel.model.dimensions.map(function(at){return at.displayInd}),ee=V.initialDragDimensionDisplayInds.some(function(at,nt){return at!==j[nt]});ee&&j.forEach(function(at,nt){var tt=V.parcatsViewModel.model.dimensions[nt].containerInd;le["dimensions["+tt+"].displayindex"]=at});var te=!1;if(V.dragCategoryDisplayInd!==null){var pe=V.model.categories.map(function(at){return at.displayInd});if(te=V.initialDragCategoryDisplayInds.some(function(at,nt){return at!==pe[nt]}),te){var we=V.model.categories.slice().sort(function(at,nt){return at.displayInd-nt.displayInd}),Se=we.map(function(at){return at.categoryValue}),Re=we.map(function(at){return at.categoryLabel});le["dimensions["+V.model.containerInd+"].categoryarray"]=[Se],le["dimensions["+V.model.containerInd+"].ticktext"]=[Re],le["dimensions["+V.model.containerInd+"].categoryorder"]="array"}}if(V.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1&&!V.dragHasMoved&&V.potentialClickBand&&(V.parcatsViewModel.hoveron==="color"?D(V.potentialClickBand,"plotly_click",v.event.sourceEvent):y(V.potentialClickBand,"plotly_click",v.event.sourceEvent)),V.model.dragX=null,V.dragCategoryDisplayInd!==null){var Pe=V.parcatsViewModel.dimensions[V.dragDimensionDisplayInd].categories[V.dragCategoryDisplayInd];Pe.model.dragY=null,V.dragCategoryDisplayInd=null}V.dragDimensionDisplayInd=null,V.parcatsViewModel.dragDimension=null,V.dragHasMoved=null,V.potentialClickBand=null,X(V.parcatsViewModel),Y(V.parcatsViewModel);var je=v.transition().duration(300).ease("cubic-in-out");je.each(function(){ue(V.parcatsViewModel,!0),$(V.parcatsViewModel,!0)}).each("end",function(){(ee||te)&&S.restyle(V.parcatsViewModel.graphDiv,le,[ae])})}}function W(V){for(var le,ae=V.graphDiv._fullData,j=0;j=0;Se--)Re+="C"+pe[Se]+","+(le[Se+1]+j)+" "+te[Se]+","+(le[Se]+j)+" "+(V[Se]+ae[Se])+","+(le[Se]+j),Re+="l-"+ae[Se]+",0 ";return Re+="Z",Re}function Y(V){var le=V.dimensions,ae=V.model,j=le.map(function(qr){return qr.categories.map(function(kr){return kr.y})}),ee=V.model.dimensions.map(function(qr){return qr.categories.map(function(kr){return kr.displayInd})}),te=V.model.dimensions.map(function(qr){return qr.displayInd}),pe=V.dimensions.map(function(qr){return qr.model.dimensionInd}),we=le.map(function(qr){return qr.x}),Se=le.map(function(qr){return qr.width}),Re=[];for(var Pe in ae.paths)ae.paths.hasOwnProperty(Pe)&&Re.push(ae.paths[Pe]);function je(qr){var kr=qr.categoryInds.map(function(_t,Fe){return ee[Fe][_t]}),Ur=pe.map(function(_t){return kr[_t]});return Ur}Re.sort(function(qr,kr){var Ur=je(qr),_t=je(kr);return V.sortpaths==="backward"&&(Ur.reverse(),_t.reverse()),Ur.push(qr.valueInds[0]),_t.push(kr.valueInds[0]),V.bundlecolors&&(Ur.unshift(qr.rawColor),_t.unshift(kr.rawColor)),Ur<_t?-1:Ur>_t?1:0});for(var at=new Array(Re.length),nt=le[0].model.count,tt=le[0].categories.map(function(qr){return qr.height}).reduce(function(qr,kr){return qr+kr}),Ve=0;Ve0?se=tt*(he.count/nt):se=0;for(var ne=new Array(j.length),Ce=0;Ce1?pe=(V.width-2*ae-j)/(ee-1):pe=0,we=ae,Se=we+pe*te;var Re=[],Pe=V.model.maxCats,je=le.categories.length,at=8,nt=le.count,tt=V.height-at*(Pe-1),Ve,he,se,ne,Ce,Ze=(Pe-je)*at/2,rt=le.categories.map(function(Je){return{displayInd:Je.displayInd,categoryInd:Je.categoryInd}});for(rt.sort(function(Je,St){return Je.displayInd-St.displayInd}),Ce=0;Ce0?Ve=he.count/nt*tt:Ve=0,se={key:he.valueInds[0],model:he,width:j,height:Ve,y:he.dragY!==null?he.dragY:Ze,bands:[],parcatsViewModel:V},Ze=Ze+Ve+at,Re.push(se);return{key:le.dimensionInd,x:le.dragX!==null?le.dragX:Se,y:0,width:j,model:le,categories:Re,parcatsViewModel:V,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}}}),A6=He({"src/traces/parcats/plot.js"(Z,q){"use strict";var v=cV();q.exports=function(S,M,e,t){var r=S._fullLayout,o=r._paper,a=r._size;v(S,o,M,{width:a.w,height:a.h,margin:{t:a.t,r:a.r,b:a.b,l:a.l}},e,t)}}}),fV=He({"src/traces/parcats/base_plot.js"(Z){"use strict";var q=Wh().getModuleCalcData,v=A6(),_="parcats";Z.name=_,Z.plot=function(S,M,e,t){var r=q(S.calcdata,_);if(r.length){var o=r[0];v(S,o,e,t)}},Z.clean=function(S,M,e,t){var r=t._has&&t._has("parcats"),o=M._has&&M._has("parcats");r&&!o&&t._paperdiv.selectAll(".parcats").remove()}}}),hV=He({"src/traces/parcats/index.js"(Z,q){"use strict";q.exports={attributes:T6(),supplyDefaults:lV(),calc:uV(),plot:A6(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcats",basePlotModule:fV(),categories:["noOpacity"],meta:{}}}}),pV=He({"lib/parcats.js"(Z,q){"use strict";q.exports=hV()}}),nm=He({"src/plots/mapbox/constants.js"(Z,q){"use strict";var v=$m(),_="1.13.4",S='\xA9 OpenStreetMap contributors',M=['\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:M,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:M,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=v(r);q.exports={requiredVersion:_,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@"+_+"."].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,q){"use strict";var v=sa(),_=$n().defaultLine,S=wc().attributes,M=tc(),e=af().textposition,t=pc().overrideAll,r=zl().templatedArray,o=nm(),a=M({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});a.family.dflt="Open Sans Regular, Arial Unicode MS Regular";var i=q.exports=t({_arrayAttrRegexps:[v.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:_},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:_}},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:v.extendFlat({},e,{arrayOk:!1})}})},"plot","from-root");i.uirevision={valType:"any",editType:"none"}}}),AT=He({"src/traces/scattermapbox/attributes.js"(Z,q){"use strict";var{hovertemplateAttrs:v,texttemplateAttrs:_,templatefallbackAttrs:S}=$l(),M=$d(),e=vg(),t=af(),r=Ex(),o=au(),a=ku(),i=rs().extendFlat,n=pc().overrideAll,s=Ex(),h=e.line,f=e.marker;q.exports=n({lon:e.lon,lat:e.lat,cluster:{enabled:{valType:"boolean"},maxzoom:i({},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:i({},f.opacity,{dflt:1})},mode:i({},t.mode,{dflt:"markers"}),text:i({},t.text,{}),texttemplate:_({editType:"plot"},{keys:["lat","lon","text"]}),texttemplatefallback:S({editType:"plot"}),hovertext:i({},t.hovertext,{}),line:{color:h.color,width:h.width},connectgaps:t.connectgaps,marker:i({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:M(),textfont:r.layers.symbol.textfont,textposition:r.layers.symbol.textposition,below:{valType:"string"},selected:{marker:t.selected.marker},unselected:{marker:t.unselected.marker},hoverinfo:i({},o.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:v(),hovertemplatefallback:S()},"calc","nested")}}),S6=He({"src/traces/scattermapbox/constants.js"(Z,q){"use strict";var v=["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"];q.exports={isSupportedFont:function(_){return v.indexOf(_)!==-1}}}}),dV=He({"src/traces/scattermapbox/defaults.js"(Z,q){"use strict";var v=sa(),_=Fu(),S=md(),M=Dd(),e=zd(),t=ev(),r=AT(),o=S6().isSupportedFont;q.exports=function(n,s,h,f){function m(g,y){return v.coerce(n,s,r,g,y)}function c(g,y){return v.coerce2(n,s,r,g,y)}var T=a(n,s,m);if(!T){s.visible=!1;return}if(m("text"),m("texttemplate"),m("texttemplatefallback"),m("hovertext"),m("hovertemplate"),m("hovertemplatefallback"),m("mode"),m("below"),_.hasMarkers(s)){S(n,s,h,f,m,{noLine:!0,noAngle:!0}),m("marker.allowoverlap"),m("marker.angle");var l=s.marker;l.symbol!=="circle"&&(v.isArrayOrTypedArray(l.size)&&(l.size=l.size[0]),v.isArrayOrTypedArray(l.color)&&(l.color=l.color[0]))}_.hasLines(s)&&(M(n,s,h,f,m,{noDash:!0}),m("connectgaps"));var x=c("cluster.maxzoom"),w=c("cluster.step"),A=c("cluster.color",s.marker&&s.marker.color||h),E=c("cluster.size"),p=c("cluster.opacity"),b=x!==!1||w!==!1||A!==!1||E!==!1||p!==!1,d=m("cluster.enabled",b);if(d||_.hasText(s)){var u=f.font.family;e(n,s,f,m,{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}})}m("fill"),s.fill!=="none"&&t(n,s,h,m),v.coerceSelectionMarkerOpacity(s,m)};function a(i,n,s){var h=s("lon")||[],f=s("lat")||[],m=Math.min(h.length,f.length);return n._length=m,m}}}),M6=He({"src/traces/scattermapbox/format_labels.js"(Z,q){"use strict";var v=Wo();q.exports=function(S,M,e){var t={},r=e[M.subplot]._subplot,o=r.mockAxis,a=S.lonlat;return t.lonLabel=v.tickText(o,o.c2l(a[0]),!0).text,t.latLabel=v.tickText(o,o.c2l(a[1]),!0).text,t}}}),E6=He({"src/plots/mapbox/convert_text_opts.js"(Z,q){"use strict";var v=sa();q.exports=function(S,M){var e=S.split(" "),t=e[0],r=e[1],o=v.isArrayOrTypedArray(M)?v.mean(M):M,a=.5+o/100,i=1.5+o/100,n=["",""],s=[0,0];switch(t){case"top":n[0]="top",s[1]=-i;break;case"bottom":n[0]="bottom",s[1]=i;break}switch(r){case"left":n[1]="right",s[0]=-a;break;case"right":n[1]="left",s[0]=a;break}var h;return n[0]&&n[1]?h=n.join("-"):n[0]?h=n[0]:n[1]?h=n[1]:h="center",{anchor:h,offset:s}}}}),vV=He({"src/traces/scattermapbox/convert.js"(Z,q){"use strict";var v=ns(),_=sa(),S=Gs().BADNUM,M=g0(),e=rc(),t=as(),r=r1(),o=Fu(),a=S6().isSupportedFont,i=E6(),n=$p().appendArrayPointValue,s=su().NEWLINES,h=su().BR_TAG_ALL;q.exports=function(p,b){var d=b[0].trace,u=d.visible===!0&&d._length!==0,g=d.fill!=="none",y=o.hasLines(d),D=o.hasMarkers(d),P=o.hasText(d),z=D&&d.marker.symbol==="circle",F=D&&d.marker.symbol!=="circle",N=d.cluster&&d.cluster.enabled,O=f("fill"),L=f("line"),U=f("circle"),B=f("symbol"),W={fill:O,line:L,circle:U,symbol:B};if(!u)return W;var $;if((g||y)&&($=M.calcTraceToLineCoords(b)),g&&(O.geojson=M.makePolygon($),O.layout.visibility="visible",_.extendFlat(O.paint,{"fill-color":d.fillcolor})),y&&(L.geojson=M.makeLine($),L.layout.visibility="visible",_.extendFlat(L.paint,{"line-width":d.line.width,"line-color":d.line.color,"line-opacity":d.opacity})),z){var ue=m(b);U.geojson=ue.geojson,U.layout.visibility="visible",N&&(U.filter=["!",["has","point_count"]],W.cluster={type:"circle",filter:["has","point_count"],layout:{visibility:"visible"},paint:{"circle-color":w(d.cluster.color,d.cluster.step),"circle-radius":w(d.cluster.size,d.cluster.step),"circle-opacity":w(d.cluster.opacity,d.cluster.step)}},W.clusterCount={type:"symbol",filter:["has","point_count"],paint:{},layout:{"text-field":"{point_count_abbreviated}","text-font":A(d),"text-size":12}}),_.extendFlat(U.paint,{"circle-color":ue.mcc,"circle-radius":ue.mrc,"circle-opacity":ue.mo})}if(z&&N&&(U.filter=["!",["has","point_count"]]),(F||P)&&(B.geojson=c(b,p),_.extendFlat(B.layout,{visibility:"visible","icon-image":"{symbol}-15","text-field":"{text}"}),F&&(_.extendFlat(B.layout,{"icon-size":d.marker.size/10}),"angle"in d.marker&&d.marker.angle!=="auto"&&_.extendFlat(B.layout,{"icon-rotate":{type:"identity",property:"angle"},"icon-rotation-alignment":"map"}),B.layout["icon-allow-overlap"]=d.marker.allowoverlap,_.extendFlat(B.paint,{"icon-opacity":d.opacity*d.marker.opacity,"icon-color":d.marker.color})),P)){var ce=(d.marker||{}).size,de=i(d.textposition,ce);_.extendFlat(B.layout,{"text-size":d.textfont.size,"text-anchor":de.anchor,"text-offset":de.offset,"text-font":A(d)}),_.extendFlat(B.paint,{"text-color":d.textfont.color,"text-opacity":d.opacity})}return W};function f(E){return{type:E,geojson:M.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function m(E){var p=E[0].trace,b=p.marker,d=p.selectedpoints,u=_.isArrayOrTypedArray(b.color),g=_.isArrayOrTypedArray(b.size),y=_.isArrayOrTypedArray(b.opacity),D;function P(ce){return p.opacity*ce}function z(ce){return ce/2}var F;u&&(e.hasColorscale(p,"marker")?F=e.makeColorScaleFuncFromTrace(b):F=_.identity);var N;g&&(N=r(p));var O;y&&(O=function(ce){var de=v(ce)?+_.constrain(ce,0,1):0;return P(de)});var L=[];for(D=0;D850?D+=" Black":u>750?D+=" Extra Bold":u>650?D+=" Bold":u>550?D+=" Semi Bold":u>450?D+=" Medium":u>350?D+=" Regular":u>250?D+=" Light":u>150?D+=" Extra Light":D+=" Thin"):g.slice(0,2).join(" ")==="Open Sans"?(D="Open Sans",u>750?D+=" Extrabold":u>650?D+=" Bold":u>550?D+=" Semibold":u>350?D+=" Regular":D+=" Light"):g.slice(0,3).join(" ")==="Klokantech Noto Sans"&&(D="Klokantech Noto Sans",g[3]==="CJK"&&(D+=" CJK"),D+=u>500?" Bold":" Regular")),y&&(D+=" Italic"),D==="Open Sans Regular Italic"?D="Open Sans Italic":D==="Open Sans Regular Bold"?D="Open Sans Bold":D==="Open Sans Regular Bold Italic"?D="Open Sans Bold Italic":D==="Klokantech Noto Sans Regular Italic"&&(D="Klokantech Noto Sans Italic"),a(D)||(D=b);var P=D.split(", ");return P}}}),mV=He({"src/traces/scattermapbox/plot.js"(Z,q){"use strict";var v=sa(),_=vV(),S=nm().traceLayerPrefix,M={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function e(r,o,a,i){this.type="scattermapbox",this.subplot=r,this.uid=o,this.clusterEnabled=a,this.isHidden=i,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 i={type:"geojson",data:o.geojson};a&&a.enabled&&v.extendFlat(i,{cluster:!0,clusterMaxZoom:a.maxzoom});var n=this.subplot.map.getSource(this.sourceIds[r]);n?n.setData(o.geojson):this.subplot.map.addSource(this.sourceIds[r],i)},t.setSourceData=function(r,o){this.subplot.map.getSource(this.sourceIds[r]).setData(o.geojson)},t.addLayer=function(r,o,a){var i={type:o.type,id:this.layerIds[r],source:this.sourceIds[r],layout:o.layout,paint:o.paint};o.filter&&(i.filter=o.filter);for(var n=this.layerIds[r],s,h=this.subplot.getMapLayers(),f=0;f=0;y--){var D=g[y];n.removeLayer(c.layerIds[D])}u||n.removeSource(c.sourceIds.circle)}function x(u){for(var g=M.nonCluster,y=0;y=0;y--){var D=g[y];n.removeLayer(c.layerIds[D]),u||n.removeSource(c.sourceIds[D])}}function A(u){m?l(u):w(u)}function E(u){f?T(u):x(u)}function p(){for(var u=f?M.cluster:M.nonCluster,g=0;g=0;i--){var n=a[i];o.removeLayer(this.layerIds[n]),o.removeSource(this.sourceIds[n])}},q.exports=function(o,a){var i=a[0].trace,n=i.cluster&&i.cluster.enabled,s=i.visible!==!0,h=new e(o,i.uid,n,s),f=_(o.gd,a),m=h.below=o.belowLookup["trace-"+i.uid],c,T,l;if(n)for(h.addSource("circle",f.circle,i.cluster),c=0;c=0?Math.floor((i+180)/360):Math.ceil((i-180)/360),E=A*360,p=i-E;function b(N){var O=N.lonlat;if(O[0]===e||x&&T.indexOf(N.i+1)===-1)return 1/0;var L=_.modHalf(O[0],360),U=O[1],B=c.project([L,U]),W=B.x-f.c2p([p,U]),$=B.y-m.c2p([L,n]),ue=Math.max(3,N.mrc||0);return Math.max(Math.sqrt(W*W+$*$)-ue,1-3/ue)}if(v.getClosest(s,b,a),a.index!==!1){var d=s[a.index],u=d.lonlat,g=[_.modHalf(u[0],360)+E,u[1]],y=f.c2p(g),D=m.c2p(g),P=d.mrc||1;a.x0=y-P,a.x1=y+P,a.y0=D-P,a.y1=D+P;var z={};z[h.subplot]={_subplot:c};var F=h._module.formatLabels(d,h,z);return a.lonLabel=F.lonLabel,a.latLabel=F.latLabel,a.color=S(h,d),a.extraText=o(h,d,s[0].t.labels),a.hovertemplate=h.hovertemplate,[a]}}function o(a,i,n){if(a.hovertemplate)return;var s=i.hi||a.hoverinfo,h=s.split("+"),f=h.indexOf("all")!==-1,m=h.indexOf("lon")!==-1,c=h.indexOf("lat")!==-1,T=i.lonlat,l=[];function x(w){return w+"\xB0"}return f||m&&c?l.push("("+x(T[1])+", "+x(T[0])+")"):m?l.push(n.lon+x(T[0])):c&&l.push(n.lat+x(T[1])),(f||h.indexOf("text")!==-1)&&M(i,a,l),l.join("
")}q.exports={hoverPoints:r,getExtraText:o}}}),gV=He({"src/traces/scattermapbox/event_data.js"(Z,q){"use strict";q.exports=function(_,S){return _.lon=S.lon,_.lat=S.lat,_}}}),yV=He({"src/traces/scattermapbox/select.js"(Z,q){"use strict";var v=sa(),_=Fu(),S=Gs().BADNUM;q.exports=function(e,t){var r=e.cd,o=e.xaxis,a=e.yaxis,i=[],n=r[0].trace,s;if(!_.hasMarkers(n))return[];if(t===!1)for(s=0;s"u"&&(C=1e-6);var G,oe,be,Ie,Ne;for(be=k,Ne=0;Ne<8;Ne++){if(Ie=this.sampleCurveX(be)-k,Math.abs(Ie)oe)return oe;for(;GIe?G=be:oe=be,be=(oe-G)*.5+G}return be},a.prototype.solve=function(k,C){return this.sampleCurveY(this.solveCurveX(k,C))};var i=n;function n(k,C){this.x=k,this.y=C}n.prototype={clone:function(){return new n(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,G=k.y-this.y;return C*C+G*G},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,G=k[2]*this.x+k[3]*this.y;return this.x=C,this.y=G,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),G=Math.sin(k),oe=C*this.x-G*this.y,be=G*this.x+C*this.y;return this.x=oe,this.y=be,this},_rotateAround:function(k,C){var G=Math.cos(k),oe=Math.sin(k),be=C.x+G*(this.x-C.x)-oe*(this.y-C.y),Ie=C.y+oe*(this.x-C.x)+G*(this.y-C.y);return this.x=be,this.y=Ie,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},n.convert=function(k){return k instanceof n?k:Array.isArray(k)?new n(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 G=0;G=1)return 1;var C=k*k,G=C*k;return 4*(k<.5?G:3*(k-C)+G-.75)}function c(k,C,G,oe){var be=new o(k,C,G,oe);return function(Ie){return be.solve(Ie)}}var T=c(.25,.1,.25,1);function l(k,C,G){return Math.min(G,Math.max(C,k))}function x(k,C,G){var oe=G-C,be=((k-C)%oe+oe)%oe+C;return be===C?G:be}function w(k,C,G){if(!k.length)return G(null,[]);var oe=k.length,be=new Array(k.length),Ie=null;k.forEach(function(Ne,ft){C(Ne,function(It,Ht){It&&(Ie=It),be[ft]=Ht,--oe===0&&G(Ie,be)})})}function A(k){var C=[];for(var G in k)C.push(k[G]);return C}function E(k,C){var G=[];for(var oe in k)oe in C||G.push(oe);return G}function p(k){for(var C=[],G=arguments.length-1;G-- >0;)C[G]=arguments[G+1];for(var oe=0,be=C;oe>C/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,k)}return k()}function y(k){return k<=1?1:Math.pow(2,Math.ceil(Math.log(k)/Math.LN2))}function D(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 P(k,C){k.forEach(function(G){C[G]&&(C[G]=C[G].bind(C))})}function z(k,C){return k.indexOf(C,k.length-C.length)!==-1}function F(k,C,G){var oe={};for(var be in k)oe[be]=C.call(G||this,k[be],be,k);return oe}function N(k,C,G){var oe={};for(var be in k)C.call(G||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 L(k,C){for(var G=0;G=0)return!0;return!1}var U={};function B(k){U[k]||(typeof console<"u"&&console.warn(k),U[k]=!0)}function W(k,C,G){return(G.y-k.y)*(C.x-k.x)>(C.y-k.y)*(G.x-k.x)}function $(k){for(var C=0,G=0,oe=k.length,be=oe-1,Ie=void 0,Ne=void 0;G@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,G={};if(k.replace(C,function(be,Ie,Ne,ft){var It=Ne||ft;return G[Ie]=It?It.toLowerCase():!0,""}),G["max-age"]){var oe=parseInt(G["max-age"],10);isNaN(oe)?delete G["max-age"]:G["max-age"]=oe}return G}var Y=null;function X(k){if(Y==null){var C=k.navigator?k.navigator.userAgent:null;Y=!!k.safari||!!(C&&(/\b(iPad|iPhone|iPod)\b/.test(C)||C.match("Safari")&&!C.match("Chrome")))}return Y}function Q(k){try{var C=s[k];return C.setItem("_mapbox_test_",1),C.removeItem("_mapbox_test_"),!0}catch{return!1}}function V(k){return s.btoa(encodeURIComponent(k).replace(/%([0-9A-F]{2})/g,function(C,G){return String.fromCharCode(+("0x"+G))}))}function le(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,ee=s.cancelAnimationFrame||s.mozCancelAnimationFrame||s.webkitCancelAnimationFrame||s.msCancelAnimationFrame,te,pe,we={now:ae,frame:function(C){var G=j(C);return{cancel:function(){return ee(G)}}},getImageData:function(C,G){G===void 0&&(G=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(-G,-G,C.width+2*G,C.height+2*G)},resolveURL:function(C){return te||(te=s.document.createElement("a")),te.href=C,te.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},Re={supported:!1,testSupport:tt},Pe,je=!1,at,nt=!1;s.document&&(at=s.document.createElement("img"),at.onload=function(){Pe&&Ve(Pe),Pe=null,nt=!0},at.onerror=function(){je=!0,Pe=null},at.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");function tt(k){je||!at||(nt?Ve(k):Pe=k)}function Ve(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;Re.supported=!0}catch{}k.deleteTexture(C),je=!0}var he="01";function se(){for(var k="1",C="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",G="",oe=0;oe<10;oe++)G+=C[Math.floor(Math.random()*62)];var be=12*60*60*1e3,Ie=[k,he,G].join(""),Ne=Date.now()+be;return{token:Ie,tokenExpiresAt:Ne}}var ne=function(C,G){this._transformRequestFn=C,this._customAccessToken=G,this._createSkuToken()};ne.prototype._createSkuToken=function(){var C=se();this._skuToken=C.token,this._skuTokenExpiresAt=C.tokenExpiresAt},ne.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},ne.prototype.transformRequest=function(C,G){return this._transformRequestFn?this._transformRequestFn(C,G)||{url:C}:{url:C}},ne.prototype.normalizeStyleURL=function(C,G){if(!Ce(C))return C;var oe=Bt(C);return oe.path="/styles/v1"+oe.path,this._makeAPIURL(oe,this._customAccessToken||G)},ne.prototype.normalizeGlyphsURL=function(C,G){if(!Ce(C))return C;var oe=Bt(C);return oe.path="/fonts/v1"+oe.path,this._makeAPIURL(oe,this._customAccessToken||G)},ne.prototype.normalizeSourceURL=function(C,G){if(!Ce(C))return C;var oe=Bt(C);return oe.path="/v4/"+oe.authority+".json",oe.params.push("secure"),this._makeAPIURL(oe,this._customAccessToken||G)},ne.prototype.normalizeSpriteURL=function(C,G,oe,be){var Ie=Bt(C);return Ce(C)?(Ie.path="/styles/v1"+Ie.path+"/sprite"+G+oe,this._makeAPIURL(Ie,this._customAccessToken||be)):(Ie.path+=""+G+oe,Vt(Ie))},ne.prototype.normalizeTileURL=function(C,G){if(this._isSkuTokenExpired()&&this._createSkuToken(),C&&!Ce(C))return C;var oe=Bt(C),be=/(\.(png|jpg)\d*)(?=$)/,Ie=/^.+\/v4\//,Ne=we.devicePixelRatio>=2||G===512?"@2x":"",ft=Re.supported?".webp":"$1";oe.path=oe.path.replace(be,""+Ne+ft),oe.path=oe.path.replace(Ie,"/"),oe.path="/v4"+oe.path;var It=this._customAccessToken||St(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,G){var oe="/v4/",be=/\.[\w]+$/,Ie=Bt(C);if(!Ie.path.match(/(^\/v4\/)/)||!Ie.path.match(be))return C;var Ne="mapbox://tiles/";Ne+=Ie.path.replace(oe,"");var ft=Ie.params;return G&&(ft=ft.filter(function(It){return!It.match(/^access_token=/)})),ft.length&&(Ne+="?"+ft.join("&")),Ne},ne.prototype.canonicalizeTileset=function(C,G){for(var oe=G?Ce(G):!1,be=[],Ie=0,Ne=C.tiles||[];Ie=0&&C.params.splice(Ie,1)}if(be.path!=="/"&&(C.path=""+be.path+C.path),!Se.REQUIRE_ACCESS_TOKEN)return Vt(C);if(G=G||Se.ACCESS_TOKEN,!G)throw new Error("An API access token is required to use Mapbox GL. "+oe);if(G[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="+G),Vt(C)};function Ce(k){return k.indexOf("mapbox:")===0}var Ze=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function rt(k){return Ze.test(k)}function Je(k){return k.indexOf("sku=")>0&&rt(k)}function St(k){for(var C=0,G=k;C=1&&s.localStorage.setItem(G,JSON.stringify(this.eventData))}catch{B("Unable to write to LocalStorage")}},qr.prototype.processRequests=function(C){},qr.prototype.postEvent=function(C,G,oe,be){var Ie=this;if(Se.EVENTS_URL){var Ne=Bt(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=G?p(ft,G):ft,Ht={url:Vt(Ne),headers:{"Content-Type":"text/plain"},body:JSON.stringify([It])};this.pendingRequest=ca(Ht,function(er){Ie.pendingRequest=null,oe(er),Ie.saveEventData(),Ie.processRequests(be)})}},qr.prototype.queueRequest=function(C,G){this.queue.push(C),this.processRequests(G)};var kr=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,Ie,Ne){this.skuToken=Ie,(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 Ie=this.queue.shift(),Ne=Ie.id,ft=Ie.timestamp;Ne&&this.success[Ne]||(this.anonId||this.fetchEventData(),D(this.anonId)||(this.anonId=g()),this.postEvent(ft,{skuToken:this.skuToken},function(It){It||Ne&&(be.success[Ne]=!0)},oe))}},C}(qr),Ur=function(k){function C(G){k.call(this,"appUserTurnstile"),this._customAccessToken=G}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(Ie){return Ce(Ie)||rt(Ie)})&&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 Ie=vr(Se.ACCESS_TOKEN),Ne=Ie?Ie.u:Se.ACCESS_TOKEN,ft=Ne!==this.eventData.tokenU;D(this.anonId)||(this.anonId=g(),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 Ur,Fe=_t.postTurnstileEvent.bind(_t),Ye=new kr,Ae=Ye.postMapLoadEvent.bind(Ye),Le="mapbox-tiles",We=500,Ke=50,st=1e3*60*7,ot;function Ut(){s.caches&&!ot&&(ot=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,G){if(Ut(),!!ot){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(G+be["max-age"]*1e3).toUTCString());var Ie=new Date(oe.headers.get("Expires")).getTime()-G;IeDate.now()&&!G["no-cache"]}var Pr=1/0;function _a(k){Pr++,Pr>Ke&&(k.getActor().send("enforceCacheSizeLimit",We),Pr=0)}function Fa(k){Ut(),ot&&ot.then(function(C){C.keys().then(function(G){for(var oe=0;oe=200&&G.status<300||G.status===0)&&G.response!==null){var be=G.response;if(k.type==="json")try{be=JSON.parse(G.response)}catch(Ie){return C(Ie)}C(null,be,G.getResponseHeader("Cache-Control"),G.getResponseHeader("Expires"))}else C(new wi(G.statusText,G.status,k.url))},G.send(k.body),{cancel:function(){return G.abort()}}}var Fr=function(k,C){if(!Rt(k.url)){if(s.fetch&&s.Request&&s.AbortController&&s.Request.prototype.hasOwnProperty("signal"))return Zt(k,C);if(ce()&&self.worker&&self.worker.actor){var G=!0;return self.worker.actor.send("getResource",k,C,void 0,G)}}return Jt(k,C)},ta=function(k,C){return Fr(p(k,{type:"json"}),C)},ra=function(k,C){return Fr(p(k,{type:"arrayBuffer"}),C)},ca=function(k,C){return Fr(p(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,G,oe){var be=new s.Image,Ie=s.URL;be.onload=function(){C(null,be),Ie.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=G,be.expires=oe,be.src=k.byteLength?Ie.createObjectURL(Ne):$a}function ri(k,C){var G=new s.Blob([new Uint8Array(k)],{type:"image/png"});s.createImageBitmap(G).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,Ia,rn=function(){pi=[],Ia=0};rn();var tn=function(k,C){if(Re.supported&&(k.headers||(k.headers={}),k.headers.accept="image/webp,*/*"),Ia>=Se.MAX_PARALLEL_IMAGE_REQUESTS){var G={requestParameters:k,callback:C,cancelled:!1,cancel:function(){this.cancelled=!0}};return pi.push(G),G}Ia++;var oe=!1,be=function(){if(!oe)for(oe=!0,Ia--;pi.length&&Ia0||this._oneTimeListeners&&this._oneTimeListeners[C]&&this._oneTimeListeners[C].length>0||this._eventedParent&&this._eventedParent.listens(C)},wr.prototype.setEventedParent=function(C,G){return this._eventedParent=C,this._eventedParentData=G,this};var Rr=8,Nr={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"],Kt={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:"*"}},mr={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:"*"}},Ir={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:"*"}},va={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"}}},ga={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"}},ba=["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"}},Mn={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},wn={"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"}},On={"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"}},En={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},ao={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Co={type:"array",value:"*"},bo={type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},zs={type:"enum",values:{Point:{},LineString:{},Polygon:{}}},kn={type:"array",minimum:0,maximum:24,value:["number","color"],length:2},wo={type:"array",value:"*",minimum:1},Zn={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}},go=["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],os={"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"}},ys={"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"}},jo={"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"}},Yn={"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"}},Hn={"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"}},ss={"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"}},_s={"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"}},ps={duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},Ko={"*":{type:"string"}},Gi={$version:Rr,$root:Nr,sources:Hr,source:gt,source_vector:Kt,source_raster:mr,source_raster_dem:Ir,source_geojson:va,source_video:Pa,source_image:ga,layer:la,layout:ba,layout_background:Ai,layout_fill:ki,layout_circle:Ki,layout_heatmap:Mn,"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:wn,layout_symbol:On,layout_raster:En,layout_hillshade:ao,filter:Co,filter_operator:bo,geometry_type:zs,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:kn,expression:wo,light:Zn,paint:go,paint_fill:os,"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:ys,paint_circle:jo,paint_heatmap:Yn,paint_symbol:Gn,paint_raster:Hn,paint_hillshade:ss,paint_background:_s,transition:ps,"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:Ko},Pn=function(C,G,oe,be){this.message=(C?C+": ":"")+oe,be&&(this.identifier=be),G!=null&&G.__line__&&(this.line=G.__line__)};function qs(k){var C=k.key,G=k.value;return G?[new Pn(C,G,"constants have been deprecated as of v8")]:[]}function bs(k){for(var C=[],G=arguments.length-1;G-- >0;)C[G]=arguments[G+1];for(var oe=0,be=C;oe":k.itemType.kind==="value"?"array":"array<"+C+">"}else return k.kind}var Ul=[il,yn,Po,To,Ws,Ts,Ll,Jo(uo),Ls];function lu(k,C){if(C.kind==="error")return null;if(k.kind==="array"){if(C.kind==="array"&&(C.N===0&&C.itemType.kind==="value"||!lu(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 G=0,oe=Ul;G255?255:Ht}function be(Ht){return Ht<0?0:Ht>1?1:Ht}function Ie(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 G)return G[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),Oa=er.substr(Zr+1,Vr-(Zr+1)).split(","),Mi=1;switch(ua){case"rgba":if(Oa.length!==4)return null;Mi=Ne(Oa.pop());case"rgb":return Oa.length!==3?null:[Ie(Oa[0]),Ie(Oa[1]),Ie(Oa[2]),Mi];case"hsla":if(Oa.length!==4)return null;Mi=Ne(Oa.pop());case"hsl":if(Oa.length!==3)return null;var ii=(parseFloat(Oa[0])%360+360)%360/360,$i=Ne(Oa[1]),Oi=Ne(Oa[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,G,oe,be){be===void 0&&(be=1),this.r=C,this.g=G,this.b=oe,this.a=be};Bs.parse=function(C){if(C){if(C instanceof Bs)return C;if(typeof C=="string"){var G=Uc(C);if(G)return new Bs(G[0]/255*G[3],G[1]/255*G[3],G[2]/255*G[3],G[3])}}},Bs.prototype.toString=function(){var C=this.toArray(),G=C[0],oe=C[1],be=C[2],Ie=C[3];return"rgba("+Math.round(G)+","+Math.round(oe)+","+Math.round(be)+","+Ie+")"},Bs.prototype.toArray=function(){var C=this,G=C.r,oe=C.g,be=C.b,Ie=C.a;return Ie===0?[0,0,0,0]:[G*255/Ie,oe*255/Ie,be*255/Ie,Ie]},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,G,oe){C?this.sensitivity=G?"variant":"case":this.sensitivity=G?"accent":"base",this.locale=oe,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};dc.prototype.compare=function(C,G){return this.collator.compare(C,G)},dc.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var Wc=function(C,G,oe,be,Ie){this.text=C,this.image=G,this.scale=oe,this.fontStack=be,this.textColor=Ie},uu=function(C){this.sections=C};uu.fromString=function(C){return new uu([new Wc(C,null,null,null,null)])},uu.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})},uu.factory=function(C){return C instanceof uu?C:uu.fromString(C)},uu.prototype.toString=function(){return this.sections.length===0?"":this.sections.map(function(C){return C.text}).join("")},uu.prototype.serialize=function(){for(var C=["format"],G=0,oe=this.sections;G=0&&k<=255&&typeof C=="number"&&C>=0&&C<=255&&typeof G=="number"&&G>=0&&G<=255)){var be=typeof oe=="number"?[k,C,G,oe]:[k,C,G];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,G,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 uu)return!0;if(k instanceof Pl)return!0;if(Array.isArray(k)){for(var C=0,G=k;C2){var ft=C[1];if(typeof ft!="string"||!(ft in nc)||ft==="object")return G.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 G.error('The length argument to "array" must be a positive integer literal',2);It=C[2],oe++}be=Jo(Ne,It)}else be=nc[Ie];for(var Ht=[];oe1)&&G.push(be)}}return G.concat(this.args.map(function(Ie){return Ie.serialize()}))};var qu=function(C){this.type=Ts,this.sections=C};qu.parse=function(C,G){if(C.length<2)return G.error("Expected at least one argument.");var oe=C[1];if(!Array.isArray(oe)&&typeof oe=="object")return G.error("First argument must be an image or text section.");for(var be=[],Ie=!1,Ne=1;Ne<=C.length-1;++Ne){var ft=C[Ne];if(Ie&&typeof ft=="object"&&!Array.isArray(ft)){Ie=!1;var It=null;if(ft["font-scale"]&&(It=G.parse(ft["font-scale"],1,yn),!It))return null;var Ht=null;if(ft["text-font"]&&(Ht=G.parse(ft["text-font"],1,Jo(Po)),!Ht))return null;var er=null;if(ft["text-color"]&&(er=G.parse(ft["text-color"],1,Ws),!er))return null;var Lr=be[be.length-1];Lr.scale=It,Lr.font=Ht,Lr.textColor=er}else{var Zr=G.parse(C[Ne],1,uo);if(!Zr)return null;var Vr=Zr.type.kind;if(Vr!=="string"&&Vr!=="value"&&Vr!=="null"&&Vr!=="resolvedImage")return G.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");Ie=!0,be.push({content:Zr,scale:null,font:null,textColor:null})}}return new qu(be)},qu.prototype.evaluate=function(C){var G=function(oe){var be=oe.content.evaluate(C);return nl(be)===Ls?new Wc("",be,null,null,null):new Wc(vl(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 uu(this.sections.map(G))},qu.prototype.eachChild=function(C){for(var G=0,oe=this.sections;G-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":To,"to-color":Ws,"to-number":yn,"to-string":Po},us=function(C,G){this.type=C,this.args=G};us.parse=function(C,G){if(C.length<2)return G.error("Expected at least one argument.");var oe=C[0];if((oe==="to-boolean"||oe==="to-string")&&C.length!==2)return G.error("Expected one argument.");for(var be=xh[oe],Ie=[],Ne=1;Ne4?oe="Invalid rbga value "+JSON.stringify(G)+": expected an array containing either three or four numeric values.":oe=ic(G[0],G[1],G[2],G[3]),!oe))return new Bs(G[0]/255,G[1]/255,G[2]/255,G[3])}throw new Xs(oe||"Could not parse color from value '"+(typeof G=="string"?G:String(JSON.stringify(G)))+"'")}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 G=Ac(k[0]),oe=nf(k[1]),be=Math.pow(2,C.z);return[Math.round(G*be*ql),Math.round(oe*be*ql)]}function Of(k,C,G){var oe=k[0]-C[0],be=k[1]-C[1],Ie=k[0]-G[0],Ne=k[1]-G[1];return oe*Ne-Ie*be===0&&oe*Ie<=0&&be*Ne<=0}function of(k,C,G){return C[1]>k[1]!=G[1]>k[1]&&k[0]<(G[0]-C[0])*(k[1]-C[1])/(G[1]-C[1])+C[0]}function jc(k,C){for(var G=!1,oe=0,be=C.length;oe0&&Lr<0||er<0&&Lr>0}function Ef(k,C,G,oe){var be=[C[0]-k[0],C[1]-k[1]],Ie=[oe[0]-G[0],oe[1]-G[1]];return Nf(Ie,be)===0?!1:!!(Gu(k,C,G,oe)&&Gu(G,oe,k,C))}function oc(k,C,G){for(var oe=0,be=G;oeG[2]){var be=oe*.5,Ie=k[0]-G[0]>be?-oe:G[0]-k[0]>be?oe:0;Ie===0&&(Ie=k[0]-G[2]>be?-oe:G[2]-k[0]>be?oe:0),k[0]+=Ie}Mf(C,k)}function kf(k){k[0]=k[1]=1/0,k[2]=k[3]=-1/0}function fh(k,C,G,oe){for(var be=Math.pow(2,oe.z)*ql,Ie=[oe.x*ql,oe.y*ql],Ne=[],ft=0,It=k;ft=0)return!1;var G=!0;return k.eachChild(function(oe){G&&!Lu(oe,C)&&(G=!1)}),G}var Mc=function(C,G){this.type=G.type,this.name=C,this.boundExpression=G};Mc.parse=function(C,G){if(C.length!==2||typeof C[1]!="string")return G.error("'var' expression requires exactly one string literal argument.");var oe=C[1];return G.scope.has(oe)?new Mc(oe,G.scope.get(oe)):G.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,G,oe,be,Ie){G===void 0&&(G=[]),be===void 0&&(be=new Hs),Ie===void 0&&(Ie=[]),this.registry=C,this.path=G,this.key=G.map(function(Ne){return"["+Ne+"]"}).join(""),this.scope=be,this.errors=Ie,this.expectedType=oe};ol.prototype.parse=function(C,G,oe,be,Ie){return Ie===void 0&&(Ie={}),G?this.concat(G,oe,be)._parse(C,Ie):this._parse(C,Ie)},ol.prototype._parse=function(C,G){(C===null||typeof C=="string"||typeof C=="boolean"||typeof C=="number")&&(C=["literal",C]);function oe(er,Lr,Zr){return Zr==="assert"?new jl(Lr,[er]):Zr==="coerce"?new us(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 Ie=this.registry[be];if(Ie){var Ne=Ie.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,G.typeAnnotation||"assert");else if((ft.kind==="color"||ft.kind==="formatted"||ft.kind==="resolvedImage")&&(It.kind==="value"||It.kind==="string"))Ne=oe(Ne,ft,G.typeAnnotation||"coerce");else if(this.checkSubtype(ft,It))return null}if(!(Ne instanceof As)&&Ne.type.kind!=="resolvedImage"&&vc(Ne)){var Ht=new Ps;try{Ne=new As(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,G,oe){var be=typeof C=="number"?this.path.concat(C):this.path,Ie=oe?this.scope.concat(oe):this.scope;return new ol(this.registry,be,G||null,Ie,this.errors)},ol.prototype.error=function(C){for(var G=[],oe=arguments.length-1;oe-- >0;)G[oe]=arguments[oe+1];var be=""+this.key+G.map(function(Ie){return"["+Ie+"]"}).join("");this.errors.push(new ws(be,C))},ol.prototype.checkSubtype=function(C,G){var oe=lu(C,G);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 us||k instanceof jl,G=!0;return k.eachChild(function(oe){C?G=G&&vc(oe):G=G&&oe instanceof As}),G?jf(k)&&Lu(k,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"]):!1}function yu(k,C){for(var G=k.length-1,oe=0,be=G,Ie=0,Ne,ft;oe<=be;)if(Ie=Math.floor((oe+be)/2),Ne=k[Ie],ft=k[Ie+1],Ne<=C){if(Ie===G||CC)be=Ie-1;else throw new Xs("Input is not a number.");return 0}var Tu=function(C,G,oe){this.type=C,this.input=G,this.labels=[],this.outputs=[];for(var be=0,Ie=oe;be=ft)return G.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',Ht);var Lr=G.parse(It,er,Ie);if(!Lr)return null;Ie=Ie||Lr.type,be.push([ft,Lr])}return new Tu(Ie,oe,be)},Tu.prototype.evaluate=function(C){var G=this.labels,oe=this.outputs;if(G.length===1)return oe[0].evaluate(C);var be=this.input.evaluate(C);if(be<=G[0])return oe[0].evaluate(C);var Ie=G.length;if(be>=G[Ie-1])return oe[Ie-1].evaluate(C);var Ne=yu(G,be);return oe[Ne].evaluate(C)},Tu.prototype.eachChild=function(C){C(this.input);for(var G=0,oe=this.outputs;G0&&C.push(this.labels[G]),C.push(this.outputs[G].serialize());return C};function Ml(k,C,G){return k*(1-G)+C*G}function qf(k,C,G){return new Bs(Ml(k.r,C.r,G),Ml(k.g,C.g,G),Ml(k.b,C.b,G),Ml(k.a,C.a,G))}function Qf(k,C,G){return k.map(function(oe,be){return Ml(oe,C[be],G)})}var Bu=Object.freeze({__proto__:null,number:Ml,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,iu=Math.PI/180,Kc=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),G=_u(k.g),oe=_u(k.b),be=hh((.4124564*C+.3575761*G+.1804375*oe)/Ec),Ie=hh((.2126729*C+.7151522*G+.072175*oe)/mc),Ne=hh((.0193339*C+.119192*G+.9503041*oe)/Lh);return{l:116*Ie-16,a:500*(be-Ie),b:200*(Ie-Ne),alpha:k.a}}function Cf(k){var C=(k.l+16)/116,G=isNaN(k.a)?C:C+k.a/500,oe=isNaN(k.b)?C:C-k.b/200;return C=mc*mf(C),G=Ec*mf(G),oe=Lh*mf(oe),new Bs(sl(3.2404542*G-1.5371385*C-.4985314*oe),sl(-.969266*G+1.8760108*C+.041556*oe),sl(.0556434*G-.2040259*C+1.0572252*oe),k.alpha)}function hl(k,C,G){return{l:Ml(k.l,C.l,G),a:Ml(k.a,C.a,G),b:Ml(k.b,C.b,G),alpha:Ml(k.alpha,C.alpha,G)}}function uf(k){var C=Pu(k),G=C.l,oe=C.a,be=C.b,Ie=Math.atan2(be,oe)*Kc;return{h:Ie<0?Ie+360:Ie,c:Math.sqrt(oe*oe+be*be),l:G,alpha:k.a}}function kc(k){var C=k.h*iu,G=k.c,oe=k.l;return Cf({l:oe,a:Math.cos(C)*G,b:Math.sin(C)*G,alpha:k.alpha})}function Hu(k,C,G){var oe=C-k;return k+G*(oe>180||oe<-180?oe-360*Math.round(oe/360):oe)}function gf(k,C,G){return{h:Hu(k.h,C.h,G),c:Ml(k.c,C.c,G),l:Ml(k.l,C.l,G),alpha:Ml(k.alpha,C.alpha,G)}}var Wu={forward:Pu,reverse:Cf,interpolate:hl},Jc={forward:uf,reverse:kc,interpolate:gf},Lf=Object.freeze({__proto__:null,lab:Wu,hcl:Jc}),nu=function(C,G,oe,be,Ie){this.type=C,this.operator=G,this.interpolation=oe,this.input=be,this.labels=[],this.outputs=[];for(var Ne=0,ft=Ie;Ne1}))return G.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);be={name:"cubic-bezier",controlPoints:It}}else return G.error("Unknown interpolation type "+String(be[0]),1,0);if(C.length-1<4)return G.error("Expected at least 4 arguments, but found only "+(C.length-1)+".");if((C.length-1)%2!==0)return G.error("Expected an even number of arguments.");if(Ie=G.parse(Ie,2,yn),!Ie)return null;var Ht=[],er=null;oe==="interpolate-hcl"||oe==="interpolate-lab"?er=Ws:G.expectedType&&G.expectedType.kind!=="value"&&(er=G.expectedType);for(var Lr=0;Lr=Zr)return G.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',ua);var Mi=G.parse(Vr,Oa,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")?G.error("Type "+Es(er)+" is not interpolatable."):new nu(er,oe,be,Ie,Ht)},nu.prototype.evaluate=function(C){var G=this.labels,oe=this.outputs;if(G.length===1)return oe[0].evaluate(C);var be=this.input.evaluate(C);if(be<=G[0])return oe[0].evaluate(C);var Ie=G.length;if(be>=G[Ie-1])return oe[Ie-1].evaluate(C);var Ne=yu(G,be),ft=G[Ne],It=G[Ne+1],Ht=nu.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"?Jc.reverse(Jc.interpolate(Jc.forward(er),Jc.forward(Lr),Ht)):Wu.reverse(Wu.interpolate(Wu.forward(er),Wu.forward(Lr),Ht))},nu.prototype.eachChild=function(C){C(this.input);for(var G=0,oe=this.outputs;G=oe.length)throw new Xs("Array index out of bounds: "+G+" > "+(oe.length-1)+".");if(G!==Math.floor(G))throw new Xs("Array index must be an integer, but found "+G+" instead.");return oe[G]},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 Vl=function(C,G){this.type=To,this.needle=C,this.haystack=G};Vl.parse=function(C,G){if(C.length!==3)return G.error("Expected 2 arguments, but found "+(C.length-1)+" instead.");var oe=G.parse(C[1],1,uo),be=G.parse(C[2],2,uo);return!oe||!be?null:Tc(oe.type,[To,Po,yn,il,uo])?new Vl(oe,be):G.error("Expected first argument to be of type boolean, string, number or null, but found "+Es(oe.type)+" instead")},Vl.prototype.evaluate=function(C){var G=this.needle.evaluate(C),oe=this.haystack.evaluate(C);if(!oe)return!1;if(!du(G,["boolean","string","number","null"]))throw new Xs("Expected first argument to be of type boolean, string, number or null, but found "+Es(nl(G))+" instead.");if(!du(oe,["string","array"]))throw new Xs("Expected second argument to be of type array or string, but found "+Es(nl(oe))+" instead.");return oe.indexOf(G)>=0},Vl.prototype.eachChild=function(C){C(this.needle),C(this.haystack)},Vl.prototype.outputDefined=function(){return!0},Vl.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var xu=function(C,G,oe){this.type=yn,this.needle=C,this.haystack=G,this.fromIndex=oe};xu.parse=function(C,G){if(C.length<=2||C.length>=5)return G.error("Expected 3 or 4 arguments, but found "+(C.length-1)+" instead.");var oe=G.parse(C[1],1,uo),be=G.parse(C[2],2,uo);if(!oe||!be)return null;if(!Tc(oe.type,[To,Po,yn,il,uo]))return G.error("Expected first argument to be of type boolean, string, number or null, but found "+Es(oe.type)+" instead");if(C.length===4){var Ie=G.parse(C[3],3,yn);return Ie?new xu(oe,be,Ie):null}else return new xu(oe,be)},xu.prototype.evaluate=function(C){var G=this.needle.evaluate(C),oe=this.haystack.evaluate(C);if(!du(G,["boolean","string","number","null"]))throw new Xs("Expected first argument to be of type boolean, string, number or null, but found "+Es(nl(G))+" instead.");if(!du(oe,["string","array"]))throw new Xs("Expected second argument to be of type array or string, but found "+Es(nl(oe))+" instead.");if(this.fromIndex){var be=this.fromIndex.evaluate(C);return oe.indexOf(G,be)}return oe.indexOf(G)},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,G,oe,be,Ie,Ne){this.inputType=C,this.type=G,this.input=oe,this.cases=be,this.outputs=Ie,this.otherwise=Ne};Lc.parse=function(C,G){if(C.length<5)return G.error("Expected at least 4 arguments, but found only "+(C.length-1)+".");if(C.length%2!==1)return G.error("Expected an even number of arguments.");var oe,be;G.expectedType&&G.expectedType.kind!=="value"&&(be=G.expectedType);for(var Ie={},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 Ie[String(Vr)]<"u")return er.error("Branch labels must be unique.");Ie[String(Vr)]=Ne.length}var ua=G.parse(Ht,ft,be);if(!ua)return null;be=be||ua.type,Ne.push(ua)}var Oa=G.parse(C[1],1,uo);if(!Oa)return null;var Mi=G.parse(C[C.length-1],C.length-1,be);return!Mi||Oa.type.kind!=="value"&&G.concat(1).checkSubtype(oe,Oa.type)?null:new Lc(oe,be,Oa,Ie,Ne,Mi)},Lc.prototype.evaluate=function(C){var G=this.input.evaluate(C),oe=nl(G)===this.inputType&&this.outputs[this.cases[G]]||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,G=["match",this.input.serialize()],oe=Object.keys(this.cases).sort(),be=[],Ie={},Ne=0,ft=oe;Ne=5)return G.error("Expected 3 or 4 arguments, but found "+(C.length-1)+" instead.");var oe=G.parse(C[1],1,uo),be=G.parse(C[2],2,yn);if(!oe||!be)return null;if(!Tc(oe.type,[Jo(uo),Po,uo]))return G.error("Expected first argument to be of type array or string, but found "+Es(oe.type)+" instead");if(C.length===4){var Ie=G.parse(C[3],3,yn);return Ie?new sc(oe.type,oe,be,Ie):null}else return new sc(oe.type,oe,be)},sc.prototype.evaluate=function(C){var G=this.input.evaluate(C),oe=this.beginIndex.evaluate(C);if(!du(G,["string","array"]))throw new Xs("Expected first argument to be of type array or string, but found "+Es(nl(G))+" instead.");if(this.endIndex){var be=this.endIndex.evaluate(C);return G.slice(oe,be)}return G.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,G){return C===G}function xr(k,C,G){return C!==G}function aa(k,C,G){return CG}function ka(k,C,G){return C<=G}function li(k,C,G){return C>=G}function Ci(k,C,G,oe){return oe.compare(C,G)===0}function Hi(k,C,G,oe){return!Ci(k,C,G,oe)}function Qi(k,C,G,oe){return oe.compare(C,G)<0}function pn(k,C,G,oe){return oe.compare(C,G)>0}function Pi(k,C,G,oe){return oe.compare(C,G)<=0}function Di(k,C,G,oe){return oe.compare(C,G)>=0}function Ni(k,C,G){var oe=k!=="=="&&k!=="!=";return function(){function be(Ie,Ne,ft){this.type=To,this.lhs=Ie,this.rhs=Ne,this.collator=ft,this.hasUntypedArgument=Ie.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 '`+Es(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 '`+Es(er.type)+"'.");if(Ht.type.kind!==er.type.kind&&Ht.type.kind!=="value"&&er.type.kind!=="value")return ft.error("Cannot compare types '"+Es(Ht.type)+"' and '"+Es(er.type)+"'.");oe&&(Ht.type.kind==="value"&&er.type.kind!=="value"?Ht=new jl(er.type,[Ht]):Ht.type.kind!=="value"&&er.type.kind==="value"&&(er=new jl(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,Ks),!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 Xs('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?G(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("!=",xr,Hi),Qn=Ni("<",aa,Qi),io=Ni(">",$r,pn),eo=Ni("<=",ka,Pi),co=Ni(">=",li,Di),Tn=function(C,G,oe,be,Ie){this.type=Po,this.number=C,this.locale=G,this.currency=oe,this.minFractionDigits=be,this.maxFractionDigits=Ie};Tn.parse=function(C,G){if(C.length!==3)return G.error("Expected two arguments.");var oe=G.parse(C[1],1,yn);if(!oe)return null;var be=C[2];if(typeof be!="object"||Array.isArray(be))return G.error("NumberFormat options argument must be an object.");var Ie=null;if(be.locale&&(Ie=G.parse(be.locale,1,Po),!Ie))return null;var Ne=null;if(be.currency&&(Ne=G.parse(be.currency,1,Po),!Ne))return null;var ft=null;if(be["min-fraction-digits"]&&(ft=G.parse(be["min-fraction-digits"],1,yn),!ft))return null;var It=null;return be["max-fraction-digits"]&&(It=G.parse(be["max-fraction-digits"],1,yn),!It)?null:new Tn(oe,Ie,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=yn,this.input=C};un.parse=function(C,G){if(C.length!==2)return G.error("Expected 1 argument, but found "+(C.length-1)+" instead.");var oe=G.parse(C[1],1);return oe?oe.type.kind!=="array"&&oe.type.kind!=="string"&&oe.type.kind!=="value"?G.error("Expected argument of type string or array, but found "+Es(oe.type)+" instead."):new un(oe):null},un.prototype.evaluate=function(C){var G=this.input.evaluate(C);if(typeof G=="string")return G.length;if(Array.isArray(G))return G.length;throw new Xs("Expected value to be of type string or array, but found "+Es(nl(G))+" 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(G){C.push(G.serialize())}),C};var yo={"==":mi,"!=":Sn,">":io,"<":Qn,">=":co,"<=":eo,array:jl,at:gc,boolean:jl,case:$c,coalesce:Xu,collator:Vu,format:qu,image:fl,in:Vl,"index-of":xu,interpolate:nu,"interpolate-hcl":nu,"interpolate-lab":nu,length:un,let:Cc,literal:As,match:Lc,number:jl,"number-format":Tn,object:jl,slice:sc,step:Tu,string:jl,"to-boolean":us,"to-color":us,"to-number":us,"to-string":us,var:Mc,within:Cu};function Qo(k,C){var G=C[0],oe=C[1],be=C[2],Ie=C[3];G=G.evaluate(k),oe=oe.evaluate(k),be=be.evaluate(k);var Ne=Ie?Ie.evaluate(k):1,ft=ic(G,oe,be,Ne);if(ft)throw new Xs(ft);return new Bs(G/255*Ne,oe/255*Ne,be/255*Ne,Ne)}function ks(k,C){return k in C}function rl(k,C){var G=C[k];return typeof G>"u"?null:G}function Ns(k,C,G,oe){for(;G<=oe;){var be=G+oe>>1;if(C[be]===k)return!0;C[be]>k?oe=be-1:G=be+1}return!1}function el(k){return{type:k}}to.register(yo,{error:[Nl,[Po],function(k,C){var G=C[0];throw new Xs(G.evaluate(k))}],typeof:[Po,[uo],function(k,C){var G=C[0];return Es(nl(G.evaluate(k)))}],"to-rgba":[Jo(yn,4),[Ws],function(k,C){var G=C[0];return G.evaluate(k).toArray()}],rgb:[Ws,[yn,yn,yn],Qo],rgba:[Ws,[yn,yn,yn,yn],Qo],has:{type:To,overloads:[[[Po],function(k,C){var G=C[0];return ks(G.evaluate(k),k.properties())}],[[Po,Ll],function(k,C){var G=C[0],oe=C[1];return ks(G.evaluate(k),oe.evaluate(k))}]]},get:{type:uo,overloads:[[[Po],function(k,C){var G=C[0];return rl(G.evaluate(k),k.properties())}],[[Po,Ll],function(k,C){var G=C[0],oe=C[1];return rl(G.evaluate(k),oe.evaluate(k))}]]},"feature-state":[uo,[Po],function(k,C){var G=C[0];return rl(G.evaluate(k),k.featureState||{})}],properties:[Ll,[],function(k){return k.properties()}],"geometry-type":[Po,[],function(k){return k.geometryType()}],id:[uo,[],function(k){return k.id()}],zoom:[yn,[],function(k){return k.globals.zoom}],"heatmap-density":[yn,[],function(k){return k.globals.heatmapDensity||0}],"line-progress":[yn,[],function(k){return k.globals.lineProgress||0}],accumulated:[uo,[],function(k){return k.globals.accumulated===void 0?null:k.globals.accumulated}],"+":[yn,el(yn),function(k,C){for(var G=0,oe=0,be=C;oe":[To,[Po,uo],function(k,C){var G=C[0],oe=C[1],be=k.properties()[G.value],Ie=oe.value;return typeof be==typeof Ie&&be>Ie}],"filter-id->":[To,[uo],function(k,C){var G=C[0],oe=k.id(),be=G.value;return typeof oe==typeof be&&oe>be}],"filter-<=":[To,[Po,uo],function(k,C){var G=C[0],oe=C[1],be=k.properties()[G.value],Ie=oe.value;return typeof be==typeof Ie&&be<=Ie}],"filter-id-<=":[To,[uo],function(k,C){var G=C[0],oe=k.id(),be=G.value;return typeof oe==typeof be&&oe<=be}],"filter->=":[To,[Po,uo],function(k,C){var G=C[0],oe=C[1],be=k.properties()[G.value],Ie=oe.value;return typeof be==typeof Ie&&be>=Ie}],"filter-id->=":[To,[uo],function(k,C){var G=C[0],oe=k.id(),be=G.value;return typeof oe==typeof be&&oe>=be}],"filter-has":[To,[uo],function(k,C){var G=C[0];return G.value in k.properties()}],"filter-has-id":[To,[],function(k){return k.id()!==null&&k.id()!==void 0}],"filter-type-in":[To,[Jo(Po)],function(k,C){var G=C[0];return G.value.indexOf(k.geometryType())>=0}],"filter-id-in":[To,[Jo(uo)],function(k,C){var G=C[0];return G.value.indexOf(k.id())>=0}],"filter-in-small":[To,[Po,Jo(uo)],function(k,C){var G=C[0],oe=C[1];return oe.value.indexOf(k.properties()[G.value])>=0}],"filter-in-large":[To,[Po,Jo(uo)],function(k,C){var G=C[0],oe=C[1];return Ns(k.properties()[G.value],oe.value,0,oe.value.length-1)}],all:{type:To,overloads:[[[To,To],function(k,C){var G=C[0],oe=C[1];return G.evaluate(k)&&oe.evaluate(k)}],[el(To),function(k,C){for(var G=0,oe=C;G-1}function Un(k){return!!k.expression&&k.expression.interpolated}function Ro(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 Fs(k){return k}function cu(k,C){var G=C.type==="color",oe=k.stops&&typeof k.stops[0][0]=="object",be=oe||k.property!==void 0,Ie=oe||!be,Ne=k.type||(Un(C)?"exponential":"interval");if(G&&(k=bs({},k),k.stops&&(k.stops=k.stops.map(function(Nn){return[Nn[0],Bs.parse(Nn[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(Ie){return Ie[0]}),G);return k.stops[be][1]}function bu(k,C,G){var oe=k.base!==void 0?k.base:1;if(Ro(G)!=="number")return Iu(k.default,C.default);var be=k.stops.length;if(be===1||G<=k.stops[0][0])return k.stops[0][1];if(G>=k.stops[be-1][0])return k.stops[be-1][1];var Ie=yu(k.stops.map(function(Lr){return Lr[0]}),G),Ne=Au(G,oe,k.stops[Ie][0],k.stops[Ie+1][0]),ft=k.stops[Ie][1],It=k.stops[Ie+1][1],Ht=Bu[C.type]||Fs;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),Oa=It.evaluate.apply(void 0,Zr);if(!(ua===void 0||Oa===void 0))return Ht(ua,Oa,Ne)}}:Ht(ft,It,Ne)}function Rc(k,C,G){return C.type==="color"?G=Bs.parse(G):C.type==="formatted"?G=uu.fromString(G.toString()):C.type==="resolvedImage"?G=Pl.fromString(G.toString()):Ro(G)!==C.type&&(C.type!=="enum"||!C.values[G])&&(G=void 0),Iu(G,k.default,C.default)}function Au(k,C,G,oe){var be=oe-G,Ie=k-G;return be===0?0:C===1?Ie/be:(Math.pow(C,Ie)-1)/(Math.pow(C,be)-1)}var yc=function(C,G){this.expression=C,this._warningHistory={},this._evaluator=new Ps,this._defaultValue=G?Me(G):null,this._enumValues=G&&G.type==="enum"?G.values:null};yc.prototype.evaluateWithoutErrorHandling=function(C,G,oe,be,Ie,Ne){return this._evaluator.globals=C,this._evaluator.feature=G,this._evaluator.featureState=oe,this._evaluator.canonical=be,this._evaluator.availableImages=Ie||null,this._evaluator.formattedSection=Ne,this.expression.evaluate(this._evaluator)},yc.prototype.evaluate=function(C,G,oe,be,Ie,Ne){this._evaluator.globals=C,this._evaluator.feature=G||null,this._evaluator.featureState=oe||null,this._evaluator.canonical=be,this._evaluator.availableImages=Ie||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 Xs("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 yo}function Fo(k,C){var G=new ol(yo,[],C?Te(C):void 0),oe=G.parse(k,void 0,void 0,void 0,C&&C.type==="string"?{typeAnnotation:"coerce"}:void 0);return oe?Ss(new yc(oe,C)):Fl(G.errors)}var Dc=function(C,G){this.kind=C,this._styleExpression=G,this.isStateDependent=C!=="constant"&&!ml(G.expression)};Dc.prototype.evaluateWithoutErrorHandling=function(C,G,oe,be,Ie,Ne){return this._styleExpression.evaluateWithoutErrorHandling(C,G,oe,be,Ie,Ne)},Dc.prototype.evaluate=function(C,G,oe,be,Ie,Ne){return this._styleExpression.evaluate(C,G,oe,be,Ie,Ne)};var lc=function(C,G,oe,be){this.kind=C,this.zoomStops=oe,this._styleExpression=G,this.isStateDependent=C!=="camera"&&!ml(G.expression),this.interpolationType=be};lc.prototype.evaluateWithoutErrorHandling=function(C,G,oe,be,Ie,Ne){return this._styleExpression.evaluateWithoutErrorHandling(C,G,oe,be,Ie,Ne)},lc.prototype.evaluate=function(C,G,oe,be,Ie,Ne){return this._styleExpression.evaluate(C,G,oe,be,Ie,Ne)},lc.prototype.interpolationFactor=function(C,G,oe){return this.interpolationType?nu.interpolationFactor(this.interpolationType,C,G,oe):0};function Yu(k,C){if(k=Fo(k,C),k.result==="error")return k;var G=k.value.expression,oe=jf(G);if(!oe&&!yl(C))return Fl([new ws("","data expressions not supported")]);var be=Lu(G,["zoom"]);if(!be&&!ll(C))return Fl([new ws("","zoom expressions not supported")]);var Ie=ie(G);if(!Ie&&!be)return Fl([new ws("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(Ie instanceof ws)return Fl([Ie]);if(Ie instanceof nu&&!Un(C))return Fl([new ws("",'"interpolate" expressions cannot be used with this property')]);if(!Ie)return Ss(oe?new Dc("constant",k.value):new Dc("source",k.value));var Ne=Ie instanceof nu?Ie.interpolation:void 0;return Ss(oe?new lc("camera",k.value,Ie.labels,Ne):new lc("composite",k.value,Ie.labels,Ne))}var Oe=function(C,G){this._parameters=C,this._specification=G,bs(this,cu(this._parameters,this._specification))};Oe.deserialize=function(C){return new Oe(C._parameters,C._specification)},Oe.serialize=function(C){return{_parameters:C._parameters,_specification:C._specification}};function I(k,C){if(Js(k))return new Oe(k,C);if(fo(k)){var G=Yu(k,C);if(G.result==="error")throw new Error(G.value.map(function(be){return be.key+": "+be.message}).join(", "));return G.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 G=0,oe=k.args;Goe.maximum?[new Pn(C,G,G+" is greater than the maximum value "+oe.maximum)]:[]}function Ot(k){var C=k.valueSpec,G=lo(k.value.type),oe,be={},Ie,Ne,ft=G!=="categorical"&&k.value.property===void 0,It=!ft,Ht=Ro(k.value.stops)==="array"&&Ro(k.value.stops[0])==="array"&&Ro(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 G==="identity"&&ft&&er.push(new Pn(k.key,k.value,'missing required property "property"')),G!=="identity"&&!k.value.stops&&er.push(new Pn(k.key,k.value,'missing required property "stops"')),G==="exponential"&&k.valueSpec.expression&&!Un(k.valueSpec)&&er.push(new Pn(k.key,k.value,"exponential functions not supported")),k.styleSpec.$version>=8&&(It&&!yl(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"))),(G==="categorical"||Ht)&&k.value.property===void 0&&er.push(new Pn(k.key,k.value,'"property" property is required')),er;function Lr(Oa){if(G==="identity")return[new Pn(Oa.key,Oa.value,'identity function may not have a "stops" property')];var Mi=[],ii=Oa.value;return Mi=Mi.concat(ht({key:Oa.key,value:ii,valueSpec:Oa.valueSpec,style:Oa.style,styleSpec:Oa.styleSpec,arrayElementValidator:Zr})),Ro(ii)==="array"&&ii.length===0&&Mi.push(new Pn(Oa.key,ii,"array must have at least one stop")),Mi}function Zr(Oa){var Mi=[],ii=Oa.value,$i=Oa.key;if(Ro(ii)!=="array")return[new Pn($i,ii,"array expected, "+Ro(ii)+" found")];if(ii.length!==2)return[new Pn($i,ii,"array length 2 expected, length "+ii.length+" found")];if(Ht){if(Ro(ii[0])!=="object")return[new Pn($i,ii,"object expected, "+Ro(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>lo(ii[0].zoom))return[new Pn($i,ii[0].zoom,"stop zoom values must appear in ascending order")];lo(ii[0].zoom)!==Ne&&(Ne=lo(ii[0].zoom),Ie=void 0,be={}),Mi=Mi.concat(ze({key:$i+"[0]",value:ii[0],valueSpec:{zoom:{}},style:Oa.style,styleSpec:Oa.styleSpec,objectElementValidators:{zoom:wt,value:Vr}}))}else Mi=Mi.concat(Vr({key:$i+"[0]",value:ii[0],valueSpec:{},style:Oa.style,styleSpec:Oa.styleSpec},ii));return fo(Zo(ii[1]))?Mi.concat([new Pn($i+"[1]",ii[1],"expressions are not allowed in function stops.")]):Mi.concat(Mo({key:$i+"[1]",value:ii[1],valueSpec:C,style:Oa.style,styleSpec:Oa.styleSpec}))}function Vr(Oa,Mi){var ii=Ro(Oa.value),$i=lo(Oa.value),Oi=Oa.value!==null?Oa.value:Mi;if(!oe)oe=ii;else if(ii!==oe)return[new Pn(Oa.key,Oi,ii+" stop domain type must match previous stop domain type "+oe)];if(ii!=="number"&&ii!=="string"&&ii!=="boolean")return[new Pn(Oa.key,Oi,"stop domain value must be a number, string, or boolean")];if(ii!=="number"&&G!=="categorical"){var Ji="number expected, "+ii+" found";return yl(C)&&G===void 0&&(Ji+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Pn(Oa.key,Oi,Ji)]}return G==="categorical"&&ii==="number"&&(!isFinite($i)||Math.floor($i)!==$i)?[new Pn(Oa.key,Oi,"integer expected, found "+$i)]:G!=="categorical"&&ii==="number"&&Ie!==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,G=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"?Dt(k.slice(1)):C==="all"?["all"].concat(k.slice(1).map(Et)):C==="none"?["all"].concat(k.slice(1).map(Et).map(Er)):C==="in"?ur(k[1],k.slice(2)):C==="!in"?Er(ur(k[1],k.slice(2))):C==="has"?yr(k[1]):C==="!has"?Er(yr(k[1])):C==="within"?k:!0;return G}function bt(k,C,G){switch(k){case"$type":return["filter-type-"+G,C];case"$id":return["filter-id-"+G,C];default:return["filter-"+G,k,C]}}function Dt(k){return["any"].concat(k.map(Et))}function ur(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(G){return typeof G!=typeof C[0]})?["filter-in-large",k,["literal",C.sort(lt)]]:["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 Er(k){return["!",k]}function jr(k){return na(Zo(k.value))?$t(bs({},k,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Qr(k)}function Qr(k){var C=k.value,G=k.key;if(Ro(C)!=="array")return[new Pn(G,C,"array expected, "+Ro(C)+" found")];var oe=k.styleSpec,be,Ie=[];if(C.length<1)return[new Pn(G,C,"filter array must have at least 1 element")];switch(Ie=Ie.concat(Kr({key:G+"[0]",value:C[0],valueSpec:oe.filter_operator,style:k.style,styleSpec:k.styleSpec})),lo(C[0])){case"<":case"<=":case">":case">=":C.length>=2&&lo(C[1])==="$type"&&Ie.push(new Pn(G,C,'"$type" cannot be use with operator "'+C[0]+'"'));case"==":case"!=":C.length!==3&&Ie.push(new Pn(G,C,'filter array for operator "'+C[0]+'" must have 3 elements'));case"in":case"!in":C.length>=2&&(be=Ro(C[1]),be!=="string"&&Ie.push(new Pn(G+"[1]",C[1],"string expected, "+be+" found")));for(var Ne=2;Ne=er[Vr+0]&&oe>=er[Vr+1])?(Ne[Zr]=!0,Ie.push(Ht[Zr])):Ne[Zr]=!1}}},fu.prototype._forEachCell=function(k,C,G,oe,be,Ie,Ne,ft){for(var It=this._convertToCellCoord(k),Ht=this._convertToCellCoord(C),er=this._convertToCellCoord(G),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,G,oe,ua,Ie,Ne,ft))return}},fu.prototype._convertFromCellCoord=function(k){return(k-this.padding)/this.scale},fu.prototype._convertToCellCoord=function(k){return Math.max(0,Math.min(this.d-1,Math.floor(k*this.scale)+this.padding))},fu.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var k=this.cells,C=wl+this.cells.length+1+1,G=0,oe=0;oe=0)){var Lr=k[er];Ht[er]=Hl[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",G=Hl[C],oe=G.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),Ie=0,Ne=Object.keys(k);Ie=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,G){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=G):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,G=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,G=k;C-1&&(an=La.error),sn&&sn(k)};function Jn(){ro.fire(new Or("pluginStateChange",{pluginStatus:an,pluginURL:dn}))}var ro=new wr,$o=function(){return an},no=function(k){return k({pluginStatus:an,pluginURL:dn}),ro.on("pluginStateChange",k),k},Xo=function(k,C,G){if(G===void 0&&(G=!1),an===La.deferred||an===La.loading||an===La.loaded)throw new Error("setRTLTextPlugin cannot be called multiple times.");dn=we.resolveURL(k),an=La.deferred,sn=C,Jn(),G||cl()},cl=function(){if(an!==La.deferred||!dn)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");an=La.loading,Jn(),dn&&ra({url:dn},function(k){k?In(k):(an=La.loaded,Jn())})},al={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return an===La.loaded||al.applyArabicShaping!=null},isLoading:function(){return an===La.loading},setState:function(C){an=C.pluginStatus,dn=C.pluginURL},isParsed:function(){return al.applyArabicShaping!=null&&al.processBidirectionalText!=null&&al.processStyledBidirectionalText!=null},getPluginURL:function(){return dn}},_l=function(){!al.isLoading()&&!al.isLoaded()&&$o()==="deferred"&&cl()},mn=function(C,G){this.zoom=C,G?(this.now=G.now,this.fadeDuration=G.fadeDuration,this.zoomHistory=G.zoomHistory,this.transition=G.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,G=C-Math.floor(C),oe=this.crossFadingFactor();return C>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:G+(1-G)*oe}:{fromScale:.5,toScale:1,t:1-(1-oe)*G}};var po=function(C,G){this.property=C,this.value=G,this.expression=I(G===void 0?C.specification.default:G,C.specification)};po.prototype.isDataDriven=function(){return this.expression.kind==="source"||this.expression.kind==="composite"},po.prototype.possiblyEvaluate=function(C,G,oe){return this.property.possiblyEvaluate(this,C,G,oe)};var fs=function(C){this.property=C,this.value=new po(C,void 0)};fs.prototype.transitioned=function(C,G){return new Tl(this.property,this.value,G,p({},C.transition,this.transition),C.now)},fs.prototype.untransitioned=function(){return new Tl(this.property,this.value,null,{},0)};var ms=function(C){this._properties=C,this._values=Object.create(C.defaultTransitionablePropertyValues)};ms.prototype.getValue=function(C){return O(this._values[C].value.value)},ms.prototype.setValue=function(C,G){this._values.hasOwnProperty(C)||(this._values[C]=new fs(this._values[C].property)),this._values[C].value=new po(this._values[C].property,G===null?void 0:O(G))},ms.prototype.getTransition=function(C){return O(this._values[C].transition)},ms.prototype.setTransition=function(C,G){this._values.hasOwnProperty(C)||(this._values[C]=new fs(this._values[C].property)),this._values[C].transition=O(G)||void 0},ms.prototype.serialize=function(){for(var C={},G=0,oe=Object.keys(this._values);Gthis.end)return this.prior=null,Ie;if(this.value.isDataDriven())return this.prior=null,Ie;if(beNe.zoomHistory.lastIntegerZoom?{from:oe,to:be}:{from:Ie,to:be}},C.prototype.interpolate=function(oe){return oe},C}(Xt),oa=function(C){this.specification=C};oa.prototype.possiblyEvaluate=function(C,G,oe,be){if(C.value!==void 0)if(C.expression.kind==="constant"){var Ie=C.expression.evaluate(G,null,{},oe,be);return this._calculate(Ie,Ie,Ie,G)}else return this._calculate(C.expression.evaluate(new mn(Math.floor(G.zoom-1),G)),C.expression.evaluate(new mn(Math.floor(G.zoom),G)),C.expression.evaluate(new mn(Math.floor(G.zoom+1),G)),G)},oa.prototype._calculate=function(C,G,oe,be){var Ie=be.zoom;return Ie>be.zoomHistory.lastIntegerZoom?{from:C,to:G}:{from:oe,to:G}},oa.prototype.interpolate=function(C){return C};var Ta=function(C){this.specification=C};Ta.prototype.possiblyEvaluate=function(C,G,oe,be){return!!C.expression.evaluate(G,null,{},oe,be)},Ta.prototype.interpolate=function(){return!1};var ma=function(C){this.properties=C,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(var G in C){var oe=C[G];oe.specification.overridable&&this.overridableProperties.push(G);var be=this.defaultPropertyValues[G]=new po(oe,void 0),Ie=this.defaultTransitionablePropertyValues[G]=new fs(oe);this.defaultTransitioningPropertyValues[G]=Ie.untransitioned(),this.defaultPossiblyEvaluatedValues[G]=be.possiblyEvaluate({})}};me("DataDrivenProperty",Xt),me("DataConstantProperty",it),me("CrossFadedDataDrivenProperty",fr),me("CrossFadedProperty",oa),me("ColorRampProperty",Ta);var xa="-transition",Ya=function(k){function C(G,oe){if(k.call(this),this.id=G.id,this.type=G.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},G.type!=="custom"&&(G=G,this.metadata=G.metadata,this.minzoom=G.minzoom,this.maxzoom=G.maxzoom,G.type!=="background"&&(this.source=G.source,this.sourceLayer=G["source-layer"],this.filter=G.filter),oe.layout&&(this._unevaluatedLayout=new Su(oe.layout)),oe.paint)){this._transitionablePaint=new ms(oe.paint);for(var be in G.paint)this.setPaintProperty(be,G.paint[be],{validate:!1});for(var Ie in G.layout)this.setLayoutProperty(Ie,G.layout[Ie],{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,Ie){if(Ie===void 0&&(Ie={}),be!=null){var Ne="layers."+this.id+".layout."+oe;if(this._validate(tu,Ne,oe,be,Ie))return}if(oe==="visibility"){this.visibility=be;return}this._unevaluatedLayout.setValue(oe,be)},C.prototype.getPaintProperty=function(oe){return z(oe,xa)?this._transitionablePaint.getTransition(oe.slice(0,-xa.length)):this._transitionablePaint.getValue(oe)},C.prototype.setPaintProperty=function(oe,be,Ie){if(Ie===void 0&&(Ie={}),be!=null){var Ne="layers."+this.id+".paint."+oe;if(this._validate(Il,Ne,oe,be,Ie))return!1}if(z(oe,xa))return this._transitionablePaint.setTransition(oe.slice(0,-xa.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,Ie){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,Ie){return be!==void 0&&!(Ie==="layout"&&!Object.keys(be).length)&&!(Ie==="paint"&&!Object.keys(be).length)})},C.prototype._validate=function(oe,be,Ie,Ne,ft){return ft===void 0&&(ft={}),ft&&ft.validate===!1?!1:Ru(this,oe.call(es,{key:be,layerType:this.type,objectKey:Ie,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)||!yl(be.property.specification))&&(be.value.kind==="source"||be.value.kind==="composite")&&be.value.isStateDependent)return!0}return!1},C}(wr),bi={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},yi=function(C,G){this._structArray=C,this._pos1=G*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,G){return C._trim(),G&&(C.isTransferred=!0,G.push(C.arrayBuffer)),{length:C.length,arrayBuffer:C.arrayBuffer}},zi.deserialize=function(C){var G=Object.create(this.prototype);return G.arrayBuffer=C.arrayBuffer,G.length=C.length,G.capacity=C.arrayBuffer.byteLength/G.bytesPerElement,G._refreshViews(),G},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 G=this.uint8;this._refreshViews(),G&&this.uint8.set(G)}},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 G=0,oe=0,be=k.map(function(Ne){var ft=Na(Ne.type),It=G=ea(G,Math.max(C,ft)),Ht=Ne.components||1;return oe=Math.max(oe,ft),G+=ft*Ht,{name:Ne.name,type:Ne.type,components:Ht,offset:It}}),Ie=ea(G,Math.max(oe,C));return{members:be,size:Ie,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 Ie=this.length;return this.resize(Ie+1),this.emplace(Ie,oe,be)},C.prototype.emplace=function(oe,be,Ie){var Ne=oe*2;return this.int16[Ne+0]=be,this.int16[Ne+1]=Ie,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,Ie,Ne){var ft=this.length;return this.resize(ft+1),this.emplace(ft,oe,be,Ie,Ne)},C.prototype.emplace=function(oe,be,Ie,Ne,ft){var It=oe*4;return this.int16[It+0]=be,this.int16[It+1]=Ie,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,Ie,Ne,ft,It){var Ht=this.length;return this.resize(Ht+1),this.emplace(Ht,oe,be,Ie,Ne,ft,It)},C.prototype.emplace=function(oe,be,Ie,Ne,ft,It,Ht){var er=oe*6;return this.int16[er+0]=be,this.int16[er+1]=Ie,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,Ie,Ne,ft,It){var Ht=this.length;return this.resize(Ht+1),this.emplace(Ht,oe,be,Ie,Ne,ft,It)},C.prototype.emplace=function(oe,be,Ie,Ne,ft,It,Ht){var er=oe*4,Lr=oe*8;return this.int16[er+0]=be,this.int16[er+1]=Ie,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 Ie=this.length;return this.resize(Ie+1),this.emplace(Ie,oe,be)},C.prototype.emplace=function(oe,be,Ie){var Ne=oe*2;return this.float32[Ne+0]=be,this.float32[Ne+1]=Ie,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,Ie,Ne,ft,It,Ht,er,Lr,Zr){var Vr=this.length;return this.resize(Vr+1),this.emplace(Vr,oe,be,Ie,Ne,ft,It,Ht,er,Lr,Zr)},C.prototype.emplace=function(oe,be,Ie,Ne,ft,It,Ht,er,Lr,Zr,Vr){var ua=oe*10;return this.uint16[ua+0]=be,this.uint16[ua+1]=Ie,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,Ie,Ne,ft,It,Ht,er,Lr,Zr,Vr,ua){var Oa=this.length;return this.resize(Oa+1),this.emplace(Oa,oe,be,Ie,Ne,ft,It,Ht,er,Lr,Zr,Vr,ua)},C.prototype.emplace=function(oe,be,Ie,Ne,ft,It,Ht,er,Lr,Zr,Vr,ua,Oa){var Mi=oe*12;return this.int16[Mi+0]=be,this.int16[Mi+1]=Ie,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]=Oa,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,Ie){var Ne=this.length;return this.resize(Ne+1),this.emplace(Ne,oe,be,Ie)},C.prototype.emplace=function(oe,be,Ie,Ne){var ft=oe*3;return this.float32[ft+0]=be,this.float32[ft+1]=Ie,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 Ie=oe*1;return this.uint32[Ie+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,Ie,Ne,ft,It,Ht,er,Lr){var Zr=this.length;return this.resize(Zr+1),this.emplace(Zr,oe,be,Ie,Ne,ft,It,Ht,er,Lr)},C.prototype.emplace=function(oe,be,Ie,Ne,ft,It,Ht,er,Lr,Zr){var Vr=oe*10,ua=oe*5;return this.int16[Vr+0]=be,this.int16[Vr+1]=Ie,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,Ie,Ne,ft,It){var Ht=this.length;return this.resize(Ht+1),this.emplace(Ht,oe,be,Ie,Ne,ft,It)},C.prototype.emplace=function(oe,be,Ie,Ne,ft,It,Ht){var er=oe*6;return this.int16[er+0]=be,this.int16[er+1]=Ie,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,Ie,Ne,ft){var It=this.length;return this.resize(It+1),this.emplace(It,oe,be,Ie,Ne,ft)},C.prototype.emplace=function(oe,be,Ie,Ne,ft,It){var Ht=oe*4,er=oe*8;return this.float32[Ht+0]=be,this.float32[Ht+1]=Ie,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,Ie,Ne){var ft=this.length;return this.resize(ft+1),this.emplace(ft,oe,be,Ie,Ne)},C.prototype.emplace=function(oe,be,Ie,Ne,ft){var It=oe*12,Ht=oe*3;return this.uint8[It+0]=be,this.uint8[It+1]=Ie,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,Ie){var Ne=this.length;return this.resize(Ne+1),this.emplace(Ne,oe,be,Ie)},C.prototype.emplace=function(oe,be,Ie,Ne){var ft=oe*3;return this.uint16[ft+0]=be,this.uint16[ft+1]=Ie,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,Ie,Ne,ft,It,Ht,er,Lr,Zr,Vr,ua,Oa,Mi,ii,$i,Oi){var Ji=this.length;return this.resize(Ji+1),this.emplace(Ji,oe,be,Ie,Ne,ft,It,Ht,er,Lr,Zr,Vr,ua,Oa,Mi,ii,$i,Oi)},C.prototype.emplace=function(oe,be,Ie,Ne,ft,It,Ht,er,Lr,Zr,Vr,ua,Oa,Mi,ii,$i,Oi,Ji){var ln=oe*24,bn=oe*12,qn=oe*48;return this.int16[ln+0]=be,this.int16[ln+1]=Ie,this.uint16[ln+2]=Ne,this.uint16[ln+3]=ft,this.uint32[bn+2]=It,this.uint32[bn+3]=Ht,this.uint32[bn+4]=er,this.uint16[ln+10]=Lr,this.uint16[ln+11]=Zr,this.uint16[ln+12]=Vr,this.float32[bn+7]=ua,this.float32[bn+8]=Oa,this.uint8[qn+36]=Mi,this.uint8[qn+37]=ii,this.uint8[qn+38]=$i,this.uint32[bn+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,Ie,Ne,ft,It,Ht,er,Lr,Zr,Vr,ua,Oa,Mi,ii,$i,Oi,Ji,ln,bn,qn,Nn,Eo,oo,mo,Is,ko,Do){var $s=this.length;return this.resize($s+1),this.emplace($s,oe,be,Ie,Ne,ft,It,Ht,er,Lr,Zr,Vr,ua,Oa,Mi,ii,$i,Oi,Ji,ln,bn,qn,Nn,Eo,oo,mo,Is,ko,Do)},C.prototype.emplace=function(oe,be,Ie,Ne,ft,It,Ht,er,Lr,Zr,Vr,ua,Oa,Mi,ii,$i,Oi,Ji,ln,bn,qn,Nn,Eo,oo,mo,Is,ko,Do,$s){var Ms=oe*34,Zl=oe*17;return this.int16[Ms+0]=be,this.int16[Ms+1]=Ie,this.int16[Ms+2]=Ne,this.int16[Ms+3]=ft,this.int16[Ms+4]=It,this.int16[Ms+5]=Ht,this.int16[Ms+6]=er,this.int16[Ms+7]=Lr,this.uint16[Ms+8]=Zr,this.uint16[Ms+9]=Vr,this.uint16[Ms+10]=ua,this.uint16[Ms+11]=Oa,this.uint16[Ms+12]=Mi,this.uint16[Ms+13]=ii,this.uint16[Ms+14]=$i,this.uint16[Ms+15]=Oi,this.uint16[Ms+16]=Ji,this.uint16[Ms+17]=ln,this.uint16[Ms+18]=bn,this.uint16[Ms+19]=qn,this.uint16[Ms+20]=Nn,this.uint16[Ms+21]=Eo,this.uint16[Ms+22]=oo,this.uint32[Zl+12]=mo,this.float32[Zl+13]=Is,this.float32[Zl+14]=ko,this.float32[Zl+15]=Do,this.float32[Zl+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 Ie=oe*1;return this.float32[Ie+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,Ie){var Ne=this.length;return this.resize(Ne+1),this.emplace(Ne,oe,be,Ie)},C.prototype.emplace=function(oe,be,Ie,Ne){var ft=oe*3;return this.int16[ft+0]=be,this.int16[ft+1]=Ie,this.int16[ft+2]=Ne,oe},C}(zi);nn.prototype.bytesPerElement=6,me("StructArrayLayout3i6",nn);var Cn=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,Ie){var Ne=this.length;return this.resize(Ne+1),this.emplace(Ne,oe,be,Ie)},C.prototype.emplace=function(oe,be,Ie,Ne){var ft=oe*2,It=oe*4;return this.uint32[ft+0]=be,this.uint16[It+2]=Ie,this.uint16[It+3]=Ne,oe},C}(zi);Cn.prototype.bytesPerElement=8,me("StructArrayLayout1ul2ui8",Cn);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 Ie=this.length;return this.resize(Ie+1),this.emplace(Ie,oe,be)},C.prototype.emplace=function(oe,be,Ie){var Ne=oe*2;return this.uint16[Ne+0]=be,this.uint16[Ne+1]=Ie,oe},C}(zi);Dn.prototype.bytesPerElement=4,me("StructArrayLayout2ui4",Dn);var Wn=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 Ie=oe*1;return this.uint16[Ie+0]=be,oe},C}(zi);Wn.prototype.bytesPerElement=2,me("StructArrayLayout1ui2",Wn);var Os=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,Ie,Ne){var ft=this.length;return this.resize(ft+1),this.emplace(ft,oe,be,Ie,Ne)},C.prototype.emplace=function(oe,be,Ie,Ne,ft){var It=oe*4;return this.float32[It+0]=be,this.float32[It+1]=Ie,this.float32[It+2]=Ne,this.float32[It+3]=ft,oe},C}(zi);Os.prototype.bytesPerElement=16,me("StructArrayLayout4f16",Os);var xl=function(k){function C(){k.apply(this,arguments)}k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C;var G={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 G.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},G.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},G.x1.get=function(){return this._structArray.int16[this._pos2+2]},G.y1.get=function(){return this._structArray.int16[this._pos2+3]},G.x2.get=function(){return this._structArray.int16[this._pos2+4]},G.y2.get=function(){return this._structArray.int16[this._pos2+5]},G.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},G.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},G.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},G.anchorPoint.get=function(){return new i(this.anchorPointX,this.anchorPointY)},Object.defineProperties(C.prototype,G),C}(yi);xl.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 xl(this,oe)},C}(Yi);me("CollisionBoxArray",ho);var Xl=function(k){function C(){k.apply(this,arguments)}k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C;var G={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 G.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},G.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},G.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},G.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},G.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},G.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},G.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},G.segment.get=function(){return this._structArray.uint16[this._pos2+10]},G.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},G.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},G.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},G.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},G.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},G.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},G.placedOrientation.set=function(oe){this._structArray.uint8[this._pos1+37]=oe},G.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},G.hidden.set=function(oe){this._structArray.uint8[this._pos1+38]=oe},G.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},G.crossTileID.set=function(oe){this._structArray.uint32[this._pos4+10]=oe},G.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(C.prototype,G),C}(yi);Xl.prototype.size=48;var hs=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 Xl(this,oe)},C}(vn);me("PlacedSymbolArray",hs);var Al=function(k){function C(){k.apply(this,arguments)}k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C;var G={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 G.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},G.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},G.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},G.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},G.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},G.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},G.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},G.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},G.key.get=function(){return this._structArray.uint16[this._pos2+8]},G.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},G.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},G.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},G.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},G.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},G.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},G.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},G.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},G.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},G.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},G.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},G.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},G.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},G.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},G.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},G.crossTileID.set=function(oe){this._structArray.uint32[this._pos4+12]=oe},G.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},G.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},G.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},G.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(C.prototype,G),C}(yi);Al.prototype.size=68;var El=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 Al(this,oe)},C}(Rn);me("SymbolInstanceArray",El);var ru=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",ru);var js=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",js);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 G={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return G.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},G.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},G.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(C.prototype,G),C}(yi);pl.prototype.size=8;var bl=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}(Cn);me("FeatureIndexArray",bl);var Xn=Ei([{name:"a_pos",components:2,type:"Int16"}],4),kl=Xn.members,Io=function(C){C===void 0&&(C=[]),this.segments=C};Io.prototype.prepareSegment=function(C,G,oe,be){var Ie=this.segments[this.segments.length-1];return C>Io.MAX_VERTEX_ARRAY_LENGTH&&B("Max vertices per segment is "+Io.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+C),(!Ie||Ie.vertexLength+C>Io.MAX_VERTEX_ARRAY_LENGTH||Ie.sortKey!==be)&&(Ie={vertexOffset:G.length,primitiveOffset:oe.length,vertexLength:0,primitiveLength:0},be!==void 0&&(Ie.sortKey=be),this.segments.push(Ie)),Ie},Io.prototype.get=function(){return this.segments},Io.prototype.destroy=function(){for(var C=0,G=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^=(G.charCodeAt(Lr+2)&255)<<16;case 2:er^=(G.charCodeAt(Lr+1)&255)<<8;case 1:er^=G.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^=G.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}),re=t(function(k){function C(G,oe){for(var be=G.length,Ie=oe^be,Ne=0,ft;be>=4;)ft=G.charCodeAt(Ne)&255|(G.charCodeAt(++Ne)&255)<<8|(G.charCodeAt(++Ne)&255)<<16|(G.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),Ie=(Ie&65535)*1540483477+(((Ie>>>16)*1540483477&65535)<<16)^ft,be-=4,++Ne;switch(be){case 3:Ie^=(G.charCodeAt(Ne+2)&255)<<16;case 2:Ie^=(G.charCodeAt(Ne+1)&255)<<8;case 1:Ie^=G.charCodeAt(Ne)&255,Ie=(Ie&65535)*1540483477+(((Ie>>>16)*1540483477&65535)<<16)}return Ie^=Ie>>>13,Ie=(Ie&65535)*1540483477+(((Ie>>>16)*1540483477&65535)<<16),Ie^=Ie>>>15,Ie>>>0}k.exports=C}),ye=xe,Ue=xe,ke=re;ye.murmur3=Ue,ye.murmur2=ke;var Qe=function(){this.ids=[],this.positions=[],this.indexed=!1};Qe.prototype.add=function(C,G,oe,be){this.ids.push(qt(C)),this.positions.push(G,oe,be)},Qe.prototype.getPositions=function(C){for(var G=qt(C),oe=0,be=this.ids.length-1;oe>1;this.ids[Ie]>=G?be=Ie:oe=Ie+1}for(var Ne=[];this.ids[oe]===G;){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,G){var oe=new Float64Array(C.ids),be=new Uint32Array(C.positions);return br(oe,be,0,oe.length-1),G&&G.push(oe.buffer,be.buffer),{ids:oe,positions:be}},Qe.deserialize=function(C){var G=new Qe;return G.ids=C.ids,G.positions=C.positions,G.indexed=!0,G};var vt=Math.pow(2,53)-1;function qt(k){var C=+k;return!isNaN(C)&&C<=vt?C:ye(String(k))}function br(k,C,G,oe){for(;G>1],Ie=G-1,Ne=oe+1;;){do Ie++;while(k[Ie]be);if(Ie>=Ne)break;Br(k,Ie,Ne),Br(C,3*Ie,3*Ne),Br(C,3*Ie+1,3*Ne+1),Br(C,3*Ie+2,3*Ne+2)}Ne-GNe.x+1||ItNe.y+1)&&B("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return G}function _o(k,C){return{type:k.type,id:k.id,properties:k.properties,geometry:C?fn(k):[]}}function Uo(k,C,G,oe,be){k.emplaceBack(C*2+(oe+1)/2,G*2+(be+1)/2)}var Ds=function(C){this.zoom=C.zoom,this.overscaling=C.overscaling,this.layers=C.layers,this.layerIds=this.layers.map(function(G){return G.id}),this.index=C.index,this.hasPattern=!1,this.layoutVertexArray=new Ma,this.indexArray=new Xi,this.segments=new Io,this.programConfigurations=new Ga(C.layers,C.zoom),this.stateDependentLayerIds=this.layers.filter(function(G){return G.isStateDependent()}).map(function(G){return G.id})};Ds.prototype.populate=function(C,G,oe){var be=this.layers[0],Ie=[],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",Ds,{omit:["layers"]});function Oo(k,C){for(var G=0;G=3){for(var Ie=0;Ie1){if(kp(k,C))return!0;for(var oe=0;oe1?k.distSqr(G):k.distSqr(G.sub(C)._mult(be)._add(C))}function ed(k,C){for(var G=!1,oe,be,Ie,Ne=0;NeC.y!=Ie.y>C.y&&C.x<(Ie.x-be.x)*(C.y-be.y)/(Ie.y-be.y)+be.x&&(G=!G)}return G}function Ih(k,C){for(var G=!1,oe=0,be=k.length-1;oeC.y!=Ne.y>C.y&&C.x<(Ne.x-Ie.x)*(C.y-Ie.y)/(Ne.y-Ie.y)+Ie.x&&(G=!G)}return G}function td(k,C,G,oe,be){for(var Ie=0,Ne=k;Ie=ft.x&&be>=ft.y)return!0}var It=[new i(C,G),new i(C,be),new i(oe,be),new i(oe,G)];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 Ie=W(k,C,G[0]);return Ie!==W(k,C,G[1])||Ie!==W(k,C,G[2])||Ie!==W(k,C,G[3])}function Rh(k,C,G){var oe=C.paint.get(k).value;return oe.kind==="constant"?oe.value:G.programConfigurations.get(C.id).getMaxValue(k)}function Cp(k){return Math.sqrt(k[0]*k[0]+k[1]*k[1])}function Vp(k,C,G,oe,be){if(!C[0]&&!C[1])return k;var Ie=i.convert(C)._mult(be);G==="viewport"&&Ie._rotate(-oe);for(var Ne=[],ft=0;ft0&&(Ie=1/Math.sqrt(Ie)),k[0]=C[0]*Ie,k[1]=C[1]*Ie,k[2]=C[2]*Ie,k}function UT(k,C){return k[0]*C[0]+k[1]*C[1]+k[2]*C[2]}function jT(k,C,G){var oe=C[0],be=C[1],Ie=C[2],Ne=G[0],ft=G[1],It=G[2];return k[0]=be*It-Ie*ft,k[1]=Ie*Ne-oe*It,k[2]=oe*ft-be*Ne,k}function qT(k,C,G){var oe=C[0],be=C[1],Ie=C[2];return k[0]=oe*G[0]+be*G[3]+Ie*G[6],k[1]=oe*G[1]+be*G[4]+Ie*G[7],k[2]=oe*G[2]+be*G[5]+Ie*G[8],k}var VT=lv,vk=function(){var k=sv();return function(C,G,oe,be,Ie,Ne){var ft,It;for(G||(G=3),oe||(oe=0),be?It=Math.min(be*G+oe,C.length):It=C.length,ft=oe;ftk.width||be.height>k.height||G.x>k.width-be.width||G.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*G){ft=Ht=k[0],It=er=k[1];for(var ua=G;uaHt&&(Ht=Lr),Zr>er&&(er=Zr);Vr=Math.max(Ht-ft,er-It),Vr=Vr!==0?1/Vr:0}return E0(Ie,Ne,G,ft,It,Vr),Ne}function Mg(k,C,G,oe,be){var Ie,Ne;if(be===U1(k,C,G,oe)>0)for(Ie=C;Ie=C;Ie-=oe)Ne=Ux(Ie,k[Ie],k[Ie+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 G=k,oe;do if(oe=!1,!G.steiner&&(C0(G,G.next)||cf(G.prev,G,G.next)===0)){if(I0(G),G=C=G.prev,G===G.next)break;oe=!0}else G=G.next;while(oe||G!==C);return C}function E0(k,C,G,oe,be,Ie,Ne){if(k){!Ne&&Ie&&Eg(k,oe,be,Ie);for(var ft=k,It,Ht;k.prev!==k.next;){if(It=k.prev,Ht=k.next,Ie?Ox(k,oe,be,Ie):Fx(k)){C.push(It.i/G),C.push(k.i/G),C.push(Ht.i/G),I0(k),k=Ht.next,ft=Ht.next;continue}if(k=Ht,k===ft){Ne?Ne===1?(k=k0(uv(k),C,G),E0(k,C,G,oe,be,Ie,2)):Ne===2&&yd(k,C,G,oe,be,Ie):E0(uv(k),C,G,oe,be,Ie,1);break}}}}function Fx(k){var C=k.prev,G=k,oe=k.next;if(cf(C,G,oe)>=0)return!1;for(var be=k.next.next;be!==k.prev;){if(fv(C.x,C.y,G.x,G.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,G,oe){var be=k.prev,Ie=k,Ne=k.next;if(cf(be,Ie,Ne)>=0)return!1;for(var ft=be.xIe.x?be.x>Ne.x?be.x:Ne.x:Ie.x>Ne.x?Ie.x:Ne.x,er=be.y>Ie.y?be.y>Ne.y?be.y:Ne.y:Ie.y>Ne.y?Ie.y:Ne.y,Lr=F1(ft,It,C,G,oe),Zr=F1(Ht,er,C,G,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,Ie.x,Ie.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,Ie.x,Ie.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,Ie.x,Ie.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,Ie.x,Ie.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,G){var oe=k;do{var be=oe.prev,Ie=oe.next.next;!C0(be,Ie)&&kg(be,oe,oe.next,Ie)&&P0(be,Ie)&&P0(Ie,be)&&(C.push(be.i/G),C.push(oe.i/G),C.push(Ie.i/G),I0(oe),I0(oe.next),oe=k=Ie),oe=oe.next}while(oe!==k);return uv(oe)}function yd(k,C,G,oe,be,Ie){var Ne=k;do{for(var ft=Ne.next.next;ft!==Ne.prev;){if(Ne.i!==ft.i&&fm(Ne,ft)){var It=B1(Ne,ft);Ne=uv(Ne,Ne.next),It=uv(It,It.next),E0(Ne,C,G,oe,be,Ie),E0(It,C,G,oe,be,Ie);return}ft=ft.next}Ne=Ne.next}while(Ne!==k)}function cv(k,C,G,oe){var be=[],Ie,Ne,ft,It,Ht;for(Ie=0,Ne=C.length;Ie=G.next.y&&G.next.y!==G.y){var ft=G.x+(be-G.y)*(G.next.x-G.x)/(G.next.y-G.y);if(ft<=oe&&ft>Ie){if(Ie=ft,ft===oe){if(be===G.y)return G;if(be===G.next.y)return G.next}Ne=G.x=G.x&&G.x>=Ht&&oe!==G.x&&fv(beNe.x||G.x===Ne.x&&$T(Ne,G)))&&(Ne=G,Lr=Zr)),G=G.next;while(G!==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,G,oe){var be=k;do be.z===null&&(be.z=F1(be.x,be.y,C,G,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,G,oe,be,Ie,Ne,ft,It,Ht=1;do{for(G=k,k=null,Ie=null,Ne=0;G;){for(Ne++,oe=G,ft=0,C=0;C0||It>0&&oe;)ft!==0&&(It===0||!oe||G.z<=oe.z)?(be=G,G=G.nextZ,ft--):(be=oe,oe=oe.nextZ,It--),Ie?Ie.nextZ=be:k=be,be.prevZ=Ie,Ie=be;G=oe}Ie.nextZ=null,Ht*=2}while(Ne>1);return k}function F1(k,C,G,oe,be){return k=32767*(k-G)*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,G=k;do(C.x=0&&(k-Ne)*(oe-ft)-(G-Ne)*(C-ft)>=0&&(G-Ne)*(Ie-ft)-(be-Ne)*(oe-ft)>=0}function fm(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,G){return(C.y-k.y)*(G.x-C.x)-(C.x-k.x)*(G.y-C.y)}function C0(k,C){return k.x===C.x&&k.y===C.y}function kg(k,C,G,oe){var be=zv(cf(k,C,G)),Ie=zv(cf(k,C,oe)),Ne=zv(cf(G,oe,k)),ft=zv(cf(G,oe,C));return!!(be!==Ie&&Ne!==ft||be===0&&L0(k,G,C)||Ie===0&&L0(k,oe,C)||Ne===0&&L0(G,k,oe)||ft===0&&L0(G,C,oe))}function L0(k,C,G){return C.x<=Math.max(k.x,G.x)&&C.x>=Math.min(k.x,G.x)&&C.y<=Math.max(k.y,G.y)&&C.y>=Math.min(k.y,G.y)}function zv(k){return k>0?1:k<0?-1:0}function Nx(k,C){var G=k;do{if(G.i!==k.i&&G.next.i!==k.i&&G.i!==C.i&&G.next.i!==C.i&&kg(G,G.next,k,C))return!0;G=G.next}while(G!==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 G=k,oe=!1,be=(k.x+C.x)/2,Ie=(k.y+C.y)/2;do G.y>Ie!=G.next.y>Ie&&G.next.y!==G.y&&be<(G.next.x-G.x)*(Ie-G.y)/(G.next.y-G.y)+G.x&&(oe=!oe),G=G.next;while(G!==k);return oe}function B1(k,C){var G=new N1(k.i,k.x,k.y),oe=new N1(C.i,C.x,C.y),be=k.next,Ie=C.prev;return k.next=C,C.prev=k,G.next=be,be.prev=G,oe.next=G,G.prev=oe,Ie.next=oe,oe.prev=Ie,oe}function Ux(k,C,G,oe){var be=new N1(k,C,G);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,G){this.i=k,this.x=C,this.y=G,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}cm.deviation=function(k,C,G,oe){var be=C&&C.length,Ie=be?C[0]*G:k.length,Ne=Math.abs(U1(k,0,Ie,G));if(be)for(var ft=0,It=C.length;ft0&&(oe+=k[be-1].length,G.holes.push(oe))}return G},Sg.default=zx;function j1(k,C,G,oe,be){Hd(k,C,G||0,oe||k.length-1,be||jx)}function Hd(k,C,G,oe,be){for(;oe>G;){if(oe-G>600){var Ie=oe-G+1,Ne=C-G+1,ft=Math.log(Ie),It=.5*Math.exp(2*ft/3),Ht=.5*Math.sqrt(ft*It*(Ie-It)/Ie)*(Ne-Ie/2<0?-1:1),er=Math.max(G,Math.floor(C-Ne*It/Ie+Ht)),Lr=Math.min(oe,Math.floor(C+(Ie-Ne)*It/Ie+Ht));Hd(k,C,er,Lr,be)}var Zr=k[C],Vr=G,ua=oe;for(hm(k,G,C),be(k[oe],Zr)>0&&hm(k,G,oe);Vr0;)ua--}be(k[G],Zr)===0?hm(k,G,ua):(ua++,hm(k,ua,oe)),ua<=C&&(G=ua+1),C<=ua&&(oe=ua-1)}}function hm(k,C,G){var oe=k[C];k[C]=k[G],k[G]=oe}function jx(k,C){return kC?1:0}function Cg(k,C){var G=k.length;if(G<=1)return[k];for(var oe=[],be,Ie,Ne=0;Ne1)for(var It=0;It>3}if(oe--,G===1||G===2)be+=k.readSVarint(),Ie+=k.readSVarint(),G===1&&(ft&&Ne.push(ft),ft=[]),ft.push(new i(be,Ie));else if(G===7)ft&&ft.push(ft[0].clone());else throw new Error("unknown command "+G)}return ft&&Ne.push(ft),Ne},Fv.prototype.bbox=function(){var k=this._pbf;k.pos=this._geometry;for(var C=k.readVarint()+k.pos,G=1,oe=0,be=0,Ie=0,Ne=1/0,ft=-1/0,It=1/0,Ht=-1/0;k.pos>3}if(oe--,G===1||G===2)be+=k.readSVarint(),Ie+=k.readSVarint(),beft&&(ft=be),IeHt&&(Ht=Ie);else if(G!==7)throw new Error("unknown command "+G)}return[Ne,It,ft,Ht]},Fv.prototype.toGeoJSON=function(k,C,G){var oe=this.extent*Math.pow(2,G),be=this.extent*k,Ie=this.extent*C,Ne=this.loadGeometry(),ft=Fv.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,G){if(k===3){var oe=new Wd(G,G.readVarint()+G.pos);oe.length&&(C[oe.name]=oe)}}var $x=Jx,pm=V1,Qx=Wd,Xd={VectorTile:$x,VectorTileFeature:pm,VectorTileLayer:Qx},eb=Xd.VectorTileFeature.types,Pg=500,dm=Math.pow(2,13);function hv(k,C,G,oe,be,Ie,Ne,ft){k.emplaceBack(C,G,Math.floor(oe*dm)*2+Ne,be*dm*2,Ie*dm*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(G){return G.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 Io,this.stateDependentLayerIds=this.layers.filter(function(G){return G.isStateDependent()}).map(function(G){return G.id})};cd.prototype.populate=function(C,G,oe){this.features=[],this.hasPattern=Lg("fill-extrusion",this.layers,G);for(var be=0,Ie=C;be=1){var Ji=Mi[$i-1];if(!aA(Oi,Ji)){Vr.vertexLength+4>Io.MAX_VERTEX_ARRAY_LENGTH&&(Vr=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var ln=Oi.sub(Ji)._perp()._unit(),bn=Ji.dist(Oi);ii+bn>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+=bn,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 qn=Vr.vertexLength;this.indexArray.emplaceBack(qn,qn+2,qn+1),this.indexArray.emplaceBack(qn+1,qn+2,qn+3),Vr.vertexLength+=4,Vr.primitiveLength+=2}}}}if(Vr.vertexLength+Ht>Io.MAX_VERTEX_ARRAY_LENGTH&&(Vr=this.segments.prepareSegment(Ht,this.layoutVertexArray,this.indexArray)),eb[C.type]==="Polygon"){for(var Nn=[],Eo=[],oo=Vr.vertexLength,mo=0,Is=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 vm=new ma({"fill-extrusion-opacity":new it(Gi["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Xt(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 fr(Gi["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Xt(Gi["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Xt(Gi["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new it(Gi["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])}),wh={paint:vm},pv=function(k){function C(G){k.call(this,G,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,Ie,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,Ie),Vr=this.paint.get("fill-extrusion-base").evaluate(be,Ie),ua=nA(Lr,er,It,0),Oa=W1(Ne,Vr,Zr,er),Mi=Oa[0],ii=Oa[1];return tb(Mi,ii,ua)},C}(Ya);function Ov(k,C){return k.x*C.x+k.y*C.y}function H1(k,C){if(k.length===1){for(var G=0,oe=C[G++],be;!be||oe.equals(be);)if(be=C[G++],!be)return 1/0;for(;G=2&&C[Ht-1].equals(C[Ht-2]);)Ht--;for(var er=0;er0;if(Nn&&$i>er){var oo=Vr.dist(ua);if(oo>2*Lr){var mo=Vr.sub(Vr.sub(ua)._mult(Lr/oo)._round());this.updateDistance(ua,mo),this.addCurrentVertex(mo,Mi,0,0,Zr),ua=mo}}var Is=ua&&Oa,ko=Is?oe:It?"butt":be;if(Is&&ko==="round"&&(bnIe&&(ko="bevel"),ko==="bevel"&&(bn>2&&(ko="flipbevel"),bn100)Oi=ii.mult(-1);else{var Do=bn*Mi.add(ii).mag()/Mi.sub(ii).mag();Oi._perp()._mult(Do*(Eo?-1:1))}this.addCurrentVertex(Vr,Oi,0,0,Zr),this.addCurrentVertex(Vr,Oi.mult(-1),0,0,Zr)}else if(ko==="bevel"||ko==="fakeround"){var $s=-Math.sqrt(bn*bn-1),Ms=Eo?$s:0,Zl=Eo?0:$s;if(ua&&this.addCurrentVertex(Vr,Mi,Ms,Zl,Zr),ko==="fakeround")for(var zu=Math.round(qn*180/Math.PI/Z1),Yl=1;Yl2*Lr){var Zf=Vr.add(Oa.sub(Vr)._mult(Lr/gh)._round());this.updateDistance(Vr,Zf),this.addCurrentVertex(Zf,ii,0,0,Zr),Vr=Zf}}}}},Hf.prototype.addCurrentVertex=function(C,G,oe,be,Ie,Ne){Ne===void 0&&(Ne=!1);var ft=G.x+G.y*oe,It=G.y-G.x*oe,Ht=-G.x+G.y*be,er=-G.y-G.x*be;this.addHalfVertex(C,ft,It,Ne,!1,oe,Ie),this.addHalfVertex(C,Ht,er,Ne,!0,-be,Ie),this.distance>O0/2&&this.totalDistance===0&&(this.distance=0,this.addCurrentVertex(C,G,oe,be,Ie,Ne))},Hf.prototype.addHalfVertex=function(C,G,oe,be,Ie,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)+(Ie?1:0),Math.round(Ig*G)+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 Oa=ft.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,Oa),ft.primitiveLength++),Ie?this.e2=Oa:this.e1=Oa},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,G){this.distance+=C.dist(G),this.updateScaledDistance()},me("LineBucket",Hf,{omit:["layers","patternFeatures"]});var Y1=new ma({"line-cap":new it(Gi.layout_line["line-cap"]),"line-join":new Xt(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 Xt(Gi.layout_line["line-sort-key"])}),K1=new ma({"line-opacity":new Xt(Gi.paint_line["line-opacity"]),"line-color":new Xt(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 Xt(Gi.paint_line["line-width"]),"line-gap-width":new Xt(Gi.paint_line["line-gap-width"]),"line-offset":new Xt(Gi.paint_line["line-offset"]),"line-blur":new Xt(Gi.paint_line["line-blur"]),"line-dasharray":new oa(Gi.paint_line["line-dasharray"]),"line-pattern":new fr(Gi.paint_line["line-pattern"]),"line-gradient":new Ta(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,Ie,Ne){return be=p({},be,{zoom:Math.floor(be.zoom)}),k.prototype.evaluate.call(this,oe,be,Ie,Ne)},C}(Xt),H=new sA(Dg.paint.properties["line-width"].specification);H.useIntegerZoom=!0;var R=function(k){function C(G){k.call(this,G,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"]=H.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,Ie=J(Rh("line-width",this,be),Rh("line-gap-width",this,be)),Ne=Rh("line-offset",this,be);return Ie/2+Math.abs(Ne)+Cp(this.paint.get("line-translate"))},C.prototype.queryIntersectsFeature=function(oe,be,Ie,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,Ie),this.paint.get("line-gap-width").evaluate(be,Ie)),Zr=this.paint.get("line-offset").evaluate(be,Ie);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 G=[],oe=new i(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="",G=0;G>1,er=-7,Lr=G?be-1:0,Zr=G?-1:1,Vr=k[C+Lr];for(Lr+=Zr,Ie=Vr&(1<<-er)-1,Vr>>=-er,er+=ft;er>0;Ie=Ie*256+k[C+Lr],Lr+=Zr,er-=8);for(Ne=Ie&(1<<-er)-1,Ie>>=-er,er+=oe;er>0;Ne=Ne*256+k[C+Lr],Lr+=Zr,er-=8);if(Ie===0)Ie=1-Ht;else{if(Ie===It)return Ne?NaN:(Vr?-1:1)*(1/0);Ne=Ne+Math.pow(2,oe),Ie=Ie-Ht}return(Vr?-1:1)*Ne*Math.pow(2,Ie-oe)},Lo=function(k,C,G,oe,be,Ie){var Ne,ft,It,Ht=Ie*8-be-1,er=(1<>1,Zr=be===23?Math.pow(2,-24)-Math.pow(2,-77):0,Vr=oe?0:Ie-1,ua=oe?1:-1,Oa=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[G+Vr]=ft&255,Vr+=ua,ft/=256,be-=8);for(Ne=Ne<0;k[G+Vr]=Ne&255,Vr+=ua,Ne/=256,Ht-=8);k[G+Vr-ua]|=Oa*128},xs={read:jn,write:Lo},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 is=65536*65536,qo=1/is,Bo=12,xn=typeof TextDecoder>"u"?null:new TextDecoder("utf8");zn.prototype={destroy:function(){this.buf=null},readFields:function(k,C,G){for(G=G||this.length;this.pos>3,Ie=this.pos;this.type=oe&7,k(be,C,this),this.pos===Ie&&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)*is;return this.pos+=8,k},readSFixed64:function(){var k=dh(this.buf,this.pos)+Rp(this.buf,this.pos+4)*is;return this.pos+=8,k},readFloat:function(){var k=xs.read(this.buf,this.pos,!0,23,4);return this.pos+=4,k},readDouble:function(){var k=xs.read(this.buf,this.pos,!0,52,8);return this.pos+=8,k},readVarint:function(k){var C=this.buf,G,oe;return oe=C[this.pos++],G=oe&127,oe<128||(oe=C[this.pos++],G|=(oe&127)<<7,oe<128)||(oe=C[this.pos++],G|=(oe&127)<<14,oe<128)||(oe=C[this.pos++],G|=(oe&127)<<21,oe<128)?G:(oe=C[this.pos],G|=(oe&15)<<28,cs(G,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&&xn?pu(this.buf,C,k):vp(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 G=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 G=this.pos-C;G>=128&&Hp(C,G,this),this.pos=C-1,this.writeVarint(G),this.pos+=G},writeFloat:function(k){this.realloc(4),xs.write(this.buf,k,this.pos,!0,23,4),this.pos+=4},writeDouble:function(k){this.realloc(8),xs.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 G=0;G=128&&Hp(G,oe,this),this.pos=G-1,this.writeVarint(oe),this.pos+=oe},writeMessage:function(k,C,G){this.writeTag(k,zn.Bytes),this.writeRawMessage(C,G)},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,ep,C)},writePackedFloat:function(k,C){C.length&&this.writeMessage(k,$h,C)},writePackedDouble:function(k,C){C.length&&this.writeMessage(k,Qh,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 cs(k,C,G){var oe=G.buf,be,Ie;if(Ie=oe[G.pos++],be=(Ie&112)>>4,Ie<128||(Ie=oe[G.pos++],be|=(Ie&127)<<3,Ie<128)||(Ie=oe[G.pos++],be|=(Ie&127)<<10,Ie<128)||(Ie=oe[G.pos++],be|=(Ie&127)<<17,Ie<128)||(Ie=oe[G.pos++],be|=(Ie&127)<<24,Ie<128)||(Ie=oe[G.pos++],be|=(Ie&1)<<31,Ie<128))return Rs(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 Rs(k,C,G){return G?C*4294967296+(k>>>0):(C>>>0)*4294967296+(k>>>0)}function Ku(k,C){var G,oe;if(k>=0?(G=k%4294967296|0,oe=k/4294967296|0):(G=~(-k%4294967296),oe=~(-k/4294967296),G^4294967295?G=G+1|0:(G=0,oe=oe+1|0)),k>=18446744073709552e3||k<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");C.realloc(10),Uu(G,oe,C),th(oe,C)}function Uu(k,C,G){G.buf[G.pos++]=k&127|128,k>>>=7,G.buf[G.pos++]=k&127|128,k>>>=7,G.buf[G.pos++]=k&127|128,k>>>=7,G.buf[G.pos++]=k&127|128,k>>>=7,G.buf[G.pos]=k&127}function th(k,C){var G=(k&7)<<4;C.buf[C.pos++]|=G|((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,G){var oe=C<=16383?1:C<=2097151?2:C<=268435455?3:Math.floor(Math.log(C)/(Math.LN2*7));G.realloc(oe);for(var be=G.pos-1;be>=k;be--)G.buf[be+oe]=G.buf[be]}function Th(k,C){for(var G=0;G>>8,k[G+2]=C>>>16,k[G+3]=C>>>24}function Rp(k,C){return(k[C]|k[C+1]<<8|k[C+2]<<16)+(k[C+3]<<24)}function vp(k,C,G){for(var oe="",be=C;be239?4:Ie>223?3:Ie>191?2:1;if(be+ft>G)break;var It,Ht,er;ft===1?Ie<128&&(Ne=Ie):ft===2?(It=k[be+1],(It&192)===128&&(Ne=(Ie&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=(Ie&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=(Ie&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 pu(k,C,G){return xn.decode(k.subarray(C,G))}function fc(k,C,G){for(var oe=0,be,Ie;oe55295&&be<57344)if(Ie)if(be<56320){k[G++]=239,k[G++]=191,k[G++]=189,Ie=be;continue}else be=Ie-55296<<10|be-56320|65536,Ie=null;else{be>56319||oe+1===C.length?(k[G++]=239,k[G++]=191,k[G++]=189):Ie=be;continue}else Ie&&(k[G++]=239,k[G++]=191,k[G++]=189,Ie=null);be<128?k[G++]=be:(be<2048?k[G++]=be>>6|192:(be<65536?k[G++]=be>>12|224:(k[G++]=be>>18|240,k[G++]=be>>12&63|128),k[G++]=be>>6&63|128),k[G++]=be&63|128)}return G}var Ju=3;function Dp(k,C,G){k===1&&G.readMessage(Qc,C)}function Qc(k,C,G){if(k===3){var oe=G.readMessage(mm,{}),be=oe.id,Ie=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},Ie),metrics:{width:Ne,height:ft,left:It,top:Ht,advance:er}})}}function mm(k,C,G){k===1?C.id=G.readVarint():k===2?C.bitmap=G.readBytes():k===3?C.width=G.readVarint():k===4?C.height=G.readVarint():k===5?C.left=G.readSVarint():k===6?C.top=G.readSVarint():k===7&&(C.advance=G.readVarint())}function _d(k){return new vo(k).readFields(Dp,[])}var fd=Ju;function Wp(k){for(var C=0,G=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 Oa=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,G){var oe=new vh;return oe.text=this.text.substring(C,G),oe.sectionIndex=this.sectionIndex.slice(C,G),oe.sections=this.sections,oe},vh.prototype.toString=function(){return this.text},vh.prototype.getMaxScale=function(){var C=this;return this.sectionIndex.reduce(function(G,oe){return Math.max(G,C.sections[oe].scale)},0)},vh.prototype.addTextSection=function(C,G){this.text+=C.text,this.sections.push(Bv.forText(C.scale,C.fontStack||G));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 G=[],oe=k.text,be=0,Ie=0,Ne=C;Ie=0,er=0,Lr=0;Lr0&&Zf>Eo&&(Eo=Zf)}else{var Kl=G[mo.fontStack],Ol=Kl&&Kl[ko];if(Ol&&Ol.rect)Ms=Ol.rect,$s=Ol.metrics;else{var $u=C[mo.fontStack],hc=$u&&$u[ko];if(!hc)continue;$s=hc.metrics}Do=(ln-mo.scale)*en}Yl?(k.verticalizable=!0,Nn.push({glyph:ko,imageName:Zl,x:Zr,y:Vr+Do,vertical:Yl,scale:mo.scale,fontStack:mo.fontStack,sectionIndex:Is,metrics:$s,rect:Ms}),Zr+=zu*mo.scale+Ht):(Nn.push({glyph:ko,imageName:Zl,x:Zr,y:Vr+Do,vertical:Yl,scale:mo.scale,fontStack:mo.fontStack,sectionIndex:Is,metrics:$s,rect:Ms}),Zr+=$s.advance*mo.scale+Ht)}if(Nn.length!==0){var rp=Zr-Ht;ua=Math.max(rp,ua),hA(Nn,0,Nn.length-1,Mi,Eo)}Zr=0;var ap=Ie*ln+Eo;qn.lineOffset=Math.max(Eo,bn),Vr+=ap,Oa=Math.max(ap,Oa),++ii}var yh=Vr-gm,yp=$1(Ne),_p=yp.horizontalAlign,ih=yp.verticalAlign;Oh(k.positionedLines,Mi,_p,ih,ua,Oa,Ie,yh,be.length),k.top+=-ih*yh,k.bottom=k.top+yh,k.left+=-_p*ua,k.right=k.left+ua}function hA(k,C,G,oe,be){if(!(!oe&&!be))for(var Ie=k[G],Ne=Ie.metrics.advance*Ie.scale,ft=(k[G].x+Ne)*oe,It=C;It<=G;It++)k[It].x-=ft,k[It].y+=be}function Oh(k,C,G,oe,be,Ie,Ne,ft,It){var Ht=(C-G)*be,er=0;Ie!==Ne?er=-ft*oe-gm:er=(-oe*It+.5)*Ne;for(var Lr=0,Zr=k;Lr-G/2;){if(Ne--,Ne<0)return!1;ft-=k[Ne].dist(Ie),Ie=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,G=0;GHt){var ua=(Ht-It)/Vr,Oa=Ml(Lr.x,Zr.x,ua),Mi=Ml(Lr.y,Zr.y,ua),ii=new tp(Oa,Mi,Zr.angleTo(Lr),er);return ii._round(),!Ne||_k(k,ii,ft,Ne,C)?ii:void 0}It+=Vr}}function bW(k,C,G,oe,be,Ie,Ne,ft,It){var Ht=bk(oe,Ie,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 bn=new tp(Ji,ln,$i,ua);bn._round(),(!oe||_k(k,bn,Ie,oe,be))&&Vr.push(bn)}}Lr+=ii}return!ft&&!Vr.length&&!Ne&&(Vr=Tk(k,Lr/2,G,oe,be,Ie,Ne,!0,It)),Vr}function Ak(k,C,G,oe,be){for(var Ie=[],Ne=0;Ne=oe&&Lr.x>=oe)&&(er.x>=oe?er=new i(oe,er.y+(Lr.y-er.y)*((oe-er.x)/(Lr.x-er.x)))._round():Lr.x>=oe&&(Lr=new i(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 i(er.x+(Lr.x-er.x)*((be-er.y)/(Lr.y-er.y)),be)._round():Lr.y>=be&&(Lr=new i(er.x+(Lr.x-er.x)*((be-er.y)/(Lr.y-er.y)),be)._round()),(!It||!er.equals(It[It.length-1]))&&(It=[er],Ie.push(It)),It.push(Lr)))))}return Ie}var Bg=zc;function Sk(k,C,G,oe){var be=[],Ie=k.image,Ne=Ie.pixelRatio,ft=Ie.paddedRect.w-2*Bg,It=Ie.paddedRect.h-2*Bg,Ht=k.right-k.left,er=k.bottom-k.top,Lr=Ie.stretchX||[[0,ft]],Zr=Ie.stretchY||[[0,It]],Vr=function(Kl,Ol){return Kl+Ol[1]-Ol[0]},ua=Lr.reduce(Vr,0),Oa=Zr.reduce(Vr,0),Mi=ft-ua,ii=It-Oa,$i=0,Oi=ua,Ji=0,ln=Oa,bn=0,qn=Mi,Nn=0,Eo=ii;if(Ie.content&&oe){var oo=Ie.content;$i=ub(Lr,0,oo[0]),Ji=ub(Zr,0,oo[1]),Oi=ub(Lr,oo[0],oo[2]),ln=ub(Zr,oo[1],oo[3]),bn=oo[0]-$i,Nn=oo[1]-Ji,qn=oo[2]-oo[0]-Oi,Eo=oo[3]-oo[1]-ln}var mo=function(Kl,Ol,$u,hc){var hf=cb(Kl.stretch-$i,Oi,Ht,k.left),_f=fb(Kl.fixed-bn,qn,Kl.stretch,ua),gh=cb(Ol.stretch-Ji,ln,er,k.top),Zf=fb(Ol.fixed-Nn,Eo,Ol.stretch,Oa),rp=cb($u.stretch-$i,Oi,Ht,k.left),ap=fb($u.fixed-bn,qn,$u.stretch,ua),yh=cb(hc.stretch-Ji,ln,er,k.top),yp=fb(hc.fixed-Nn,Eo,hc.stretch,Oa),_p=new i(hf,gh),ih=new i(rp,gh),xp=new i(rp,yh),nd=new i(hf,yh),jv=new i(_f/Ne,Zf/Ne),xm=new i(ap/Ne,yp/Ne),bm=C*Math.PI/180;if(bm){var wm=Math.sin(bm),Wg=Math.cos(bm),wd=[Wg,-wm,wm,Wg];_p._matMult(wd),ih._matMult(wd),nd._matMult(wd),xp._matMult(wd)}var gb=Kl.stretch+Kl.fixed,xA=$u.stretch+$u.fixed,yb=Ol.stretch+Ol.fixed,bA=hc.stretch+hc.fixed,hd={x:Ie.paddedRect.x+Bg+gb,y:Ie.paddedRect.y+Bg+yb,w:xA-gb,h:bA-yb},Xg=qn/Ne/Ht,_b=Eo/Ne/er;return{tl:_p,tr:ih,bl:nd,br:xp,tex:hd,writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:jv,pixelOffsetBR:xm,minFontScaleX:Xg,minFontScaleY:_b,isSDF:G}};if(!oe||!Ie.stretchX&&!Ie.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 Is=Mk(Lr,Mi,ua),ko=Mk(Zr,ii,Oa),Do=0;Do0&&(ua=Math.max(10,ua),this.circleDiameter=ua)}else{var Oa=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,Oa-=Oi[1]*ft,$i+=Oi[2]*ft,Mi+=Oi[3]*ft),er){var Ji=new i(ii,Oa),ln=new i($i,Oa),bn=new i(ii,Mi),qn=new i($i,Mi),Nn=er*Math.PI/180;Ji._rotate(Nn),ln._rotate(Nn),bn._rotate(Nn),qn._rotate(Nn),ii=Math.min(Ji.x,ln.x,bn.x,qn.x),$i=Math.max(Ji.x,ln.x,bn.x,qn.x),Oa=Math.min(Ji.y,ln.y,bn.y,qn.y),Mi=Math.max(Ji.y,ln.y,bn.y,qn.y)}C.emplaceBack(G.x,G.y,ii,Oa,$i,Mi,oe,be,Ie)}this.boxEndIndex=C.length},Ng=function(C,G){if(C===void 0&&(C=[]),G===void 0&&(G=TW),this.data=C,this.length=this.data.length,this.compare=G,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],G=this.data.pop();return this.length--,this.length>0&&(this.data[0]=G,this._down(0)),C}},Ng.prototype.peek=function(){return this.data[0]},Ng.prototype._up=function(C){for(var G=this,oe=G.data,be=G.compare,Ie=oe[C];C>0;){var Ne=C-1>>1,ft=oe[Ne];if(be(Ie,ft)>=0)break;oe[C]=ft,C=Ne}oe[C]=Ie},Ng.prototype._down=function(C){for(var G=this,oe=G.data,be=G.compare,Ie=this.length>>1,Ne=oe[C];C=0)break;oe[C]=It,C=ft}oe[C]=Ne};function TW(k,C){return kC?1:0}function AW(k,C,G){C===void 0&&(C=1),G===void 0&&(G=!1);for(var oe=1/0,be=1/0,Ie=-1/0,Ne=-1/0,ft=k[0],It=0;ItIe)&&(Ie=Ht.x),(!It||Ht.y>Ne)&&(Ne=Ht.y)}var er=Ie-oe,Lr=Ne-be,Zr=Math.min(er,Lr),Vr=Zr/2,ua=new Ng([],SW);if(Zr===0)return new i(oe,be);for(var Oa=oe;Oaii.d||!ii.d)&&(ii=Oi,G&&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 G&&(console.log("num probes: "+$i),console.log("best distance: "+ii.d)),ii.p}function SW(k,C){return C.max-k.max}function Ug(k,C,G,oe){this.p=new i(k,C),this.h=G,this.d=MW(this.p,oe),this.max=this.d+this.h*Math.SQRT2}function MW(k,C){for(var G=!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&&(G=!G),oe=Math.min(oe,qd(k,Ht,er))}return(G?1:-1)*Math.sqrt(oe)}function EW(k){for(var C=0,G=0,oe=0,be=k[0],Ie=0,Ne=be.length,ft=Ne-1;Ie=ui||wd.y<0||wd.y>=ui||LW(k,wd,Wg,G,oe,be,ko,k.layers[0],k.collisionBoxArray,C.index,C.sourceLayerIndex,k.index,ii,ln,Nn,It,Oi,bn,Eo,Vr,C,Ie,Ht,er,Ne)};if(oo==="line")for(var $s=0,Ms=Ak(C.geometry,0,0,ui,ui);$s1){var gh=xW(_f,qn,G.vertical||ua,oe,Oa,$i);gh&&Do(_f,gh)}}else if(C.type==="Polygon")for(var Zf=0,rp=Cg(C.geometry,0);Zfym&&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]>ym||ii[1]>ym)&&B(k.layerIds[0]+': Value for "text-size" is >= '+Q1+'. Reduce your "text-size".')),k.addSymbols(k.text,Oa,ii,ft,Ie,Ne,Ht,C,It.lineStartIndex,It.lineLength,Zr,ua);for(var $i=0,Oi=er;$iym&&B(k.layerIds[0]+': Value for "icon-size" is >= '+Q1+'. Reduce your "icon-size".')):_p.kind==="composite"&&(ih=[Bh*ln.compositeIconSizes[0].evaluate(Ji,{},qn),Bh*ln.compositeIconSizes[1].evaluate(Ji,{},qn)],(ih[0]>ym||ih[1]>ym)&&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,oo.lineStartIndex,oo.lineLength,-1,qn),Yl=k.icon.placedSymbolArray.length-1,yp&&(Ms=yp.length*4,k.addSymbols(k.icon,yp,ih,Oi,$i,Ji,mp.vertical,C,oo.lineStartIndex,oo.lineLength,-1,qn),Kl=k.icon.placedSymbolArray.length-1)}for(var xp in oe.horizontal){var nd=oe.horizontal[xp];if(!mo){$u=ye(nd.text);var jv=ft.layout.get("text-rotate").evaluate(Ji,{},qn);mo=new hb(It,C,Ht,er,Lr,nd,Zr,Vr,ua,jv)}var xm=nd.positionedLines.length===1;if(Zl+=kk(k,C,nd,Ie,ft,ua,Ji,Oa,oo,oe.vertical?mp.horizontal:mp.horizontalOnly,xm?Object.keys(oe.horizontal):[xp],Ol,Yl,ln,qn),xm)break}oe.vertical&&(zu+=kk(k,C,oe.vertical,Ie,ft,ua,Ji,Oa,oo,mp.vertical,["vertical"],Ol,Kl,ln,qn));var bm=mo?mo.boxStartIndex:k.collisionBoxArray.length,wm=mo?mo.boxEndIndex:k.collisionBoxArray.length,Wg=ko?ko.boxStartIndex:k.collisionBoxArray.length,wd=ko?ko.boxEndIndex:k.collisionBoxArray.length,gb=Is?Is.boxStartIndex:k.collisionBoxArray.length,xA=Is?Is.boxEndIndex:k.collisionBoxArray.length,yb=Do?Do.boxStartIndex:k.collisionBoxArray.length,bA=Do?Do.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(ko,hd),hd=Xg(Is,hd),hd=Xg(Do,hd);var _b=hd>-1?1:0;_b&&(hd*=Nn/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,Yl,Kl,$u,bm,wm,Wg,wd,gb,xA,yb,bA,Ht,Zl,zu,$s,Ms,_b,0,Zr,hc,hf,hd)}function PW(k,C,G,oe){var be=k.compareText;if(!(C in be))be[C]=[];else for(var Ie=be[C],Ne=Ie.length-1;Ne>=0;Ne--)if(oe.dist(Ie[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=Ie.get("symbol-sort-key");if(this.features=[],!(!Ht&&!er)){for(var Zr=G.iconDependencies,Vr=G.glyphDependencies,ua=G.availableImages,Oa=new mn(this.zoom),Mi=0,ii=C;Mi=0;for(var zu=0,Yl=Eo.sections;zu=0;It--)Ne[It]={x:G[It].x,y:G[It].y,tileUnitDistanceFromAnchor:Ie},It>0&&(Ie+=G[It-1].dist(G[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,G){for(var oe=C.placedSymbolArray.get(G),be=oe.vertexStartIndex+oe.numGlyphs*4,Ie=oe.vertexStartIndex;Ie1||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&&G.addIndicesForPlacedSymbol(G.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 zW(k,C){return C.replace(/{([^{}]+)}/g,function(G,oe){return oe in k?String(k[oe]):""})}var FW=new ma({"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 Xt(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 Xt(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 Xt(Gi.layout_symbol["icon-image"]),"icon-rotate":new Xt(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 Xt(Gi.layout_symbol["icon-offset"]),"icon-anchor":new Xt(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 Xt(Gi.layout_symbol["text-field"]),"text-font":new Xt(Gi.layout_symbol["text-font"]),"text-size":new Xt(Gi.layout_symbol["text-size"]),"text-max-width":new Xt(Gi.layout_symbol["text-max-width"]),"text-line-height":new it(Gi.layout_symbol["text-line-height"]),"text-letter-spacing":new Xt(Gi.layout_symbol["text-letter-spacing"]),"text-justify":new Xt(Gi.layout_symbol["text-justify"]),"text-radial-offset":new Xt(Gi.layout_symbol["text-radial-offset"]),"text-variable-anchor":new it(Gi.layout_symbol["text-variable-anchor"]),"text-anchor":new Xt(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 Xt(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 Xt(Gi.layout_symbol["text-transform"]),"text-offset":new Xt(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"])}),OW=new ma({"icon-opacity":new Xt(Gi.paint_symbol["icon-opacity"]),"icon-color":new Xt(Gi.paint_symbol["icon-color"]),"icon-halo-color":new Xt(Gi.paint_symbol["icon-halo-color"]),"icon-halo-width":new Xt(Gi.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Xt(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 Xt(Gi.paint_symbol["text-opacity"]),"text-color":new Xt(Gi.paint_symbol["text-color"],{runtimeType:Ws,getOverride:function(k){return k.textColor},hasOverride:function(k){return!!k.textColor}}),"text-halo-color":new Xt(Gi.paint_symbol["text-halo-color"]),"text-halo-width":new Xt(Gi.paint_symbol["text-halo-width"]),"text-halo-blur":new Xt(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:OW,layout:FW},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 G=this.defaultValue.property.overrides;if(G&&G.hasOverride(C.formattedSection))return G.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 G=this.defaultValue.value;C(G._styleExpression.expression)}},Vg.prototype.outputDefined=function(){return!1},Vg.prototype.serialize=function(){return null},me("FormatSectionOverride",Vg,{omit:["defaultValue"]});var BW=function(k){function C(G){k.call(this,G,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 Ie=this.layout.get("text-writing-mode");if(Ie){for(var Ne=[],ft=0,It=Ie;ft",targetMapId:be,sourceMapId:Ne.mapId})}}},Gg.prototype.receive=function(C){var G=C.data,oe=G.id;if(oe&&!(G.targetMapId&&this.mapId!==G.targetMapId))if(G.type===""){delete this.tasks[oe];var be=this.cancelCallbacks[oe];delete this.cancelCallbacks[oe],be&&be()}else ce()||G.mustQueue?(this.tasks[oe]=G,this.taskQueue.push(oe),this.invoker.trigger()):this.processTask(oe,G)},Gg.prototype.process=function(){if(this.taskQueue.length){var C=this.taskQueue.shift(),G=this.tasks[C];delete this.tasks[C],this.taskQueue.length&&this.invoker.trigger(),G&&this.processTask(C,G)}},Gg.prototype.processTask=function(C,G){var oe=this;if(G.type===""){var be=this.callbacks[C];delete this.callbacks[C],be&&(G.error?be(Tt(G.error)):be(null,Tt(G.data)))}else{var Ie=!1,Ne=X(this.globalScope)?void 0:[],ft=G.hasCallback?function(Zr,Vr){Ie=!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){Ie=!0},It=null,Ht=Tt(G.data);if(this.parent[G.type])It=this.parent[G.type](G.sourceMapId,Ht,ft);else if(this.parent.getWorkerSource){var er=G.type.split("."),Lr=this.parent.getWorkerSource(G.sourceMapId,er[0],Ht.source);It=Lr[er[1]](Ht,ft)}else ft(new Error("Could not find function "+G.type));!Ie&&It&&It.cancel&&(this.cancelCallbacks[C]=It.cancel)}},Gg.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};function YW(k,C,G){C=Math.pow(2,G)-C-1;var oe=Dk(k*256,C*256,G),be=Dk((k+1)*256,(C+1)*256,G);return oe[0]+","+oe[1]+","+be[0]+","+be[1]}function Dk(k,C,G){var oe=2*Math.PI*6378137/256/Math.pow(2,G),be=k*oe-2*Math.PI*6378137/2,Ie=C*oe-2*Math.PI*6378137/2;return[be,Ie]}var Wf=function(C,G){C&&(G?this.setSouthWest(C).setNorthEast(G):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 G=this._sw,oe=this._ne,be,Ie;if(C instanceof Fc)be=C,Ie=C;else if(C instanceof Wf){if(be=C._sw,Ie=C._ne,!be||!Ie)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!G&&!oe?(this._sw=new Fc(be.lng,be.lat),this._ne=new Fc(Ie.lng,Ie.lat)):(G.lng=Math.min(be.lng,G.lng),G.lat=Math.min(be.lat,G.lat),oe.lng=Math.max(Ie.lng,oe.lng),oe.lat=Math.max(Ie.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 G=Fc.convert(C),oe=G.lng,be=G.lat,Ie=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),Ie&&Ne},Wf.convert=function(C){return!C||C instanceof Wf?C:new Wf(C)};var zk=63710088e-1,Fc=function(C,G){if(isNaN(C)||isNaN(G))throw new Error("Invalid LngLat object: ("+C+", "+G+")");if(this.lng=+C,this.lat=+G,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(x(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 G=Math.PI/180,oe=this.lat*G,be=C.lat*G,Ie=Math.sin(oe)*Math.sin(be)+Math.cos(oe)*Math.cos(be)*Math.cos((C.lng-this.lng)*G),Ne=zk*Math.acos(Math.min(Ie,1));return Ne},Fc.prototype.toBounds=function(C){C===void 0&&(C=0);var G=40075017,oe=360*C/G,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 KW(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 JW(k,C){return k*Ok(yA(C))}function $W(k){return 1/Math.cos(k*Math.PI/180)}var U0=function(C,G,oe){oe===void 0&&(oe=0),this.x=+C,this.y=+G,this.z=+oe};U0.fromLngLat=function(C,G){G===void 0&&(G=0);var oe=Fc.convert(C);return new U0(Bk(oe.lng),Nk(oe.lat),Uk(G,oe.lat))},U0.prototype.toLngLat=function(){return new Fc(KW(this.x),yA(this.y))},U0.prototype.toAltitude=function(){return JW(this.z,this.y)},U0.prototype.meterInMercatorCoordinateUnits=function(){return 1/Fk*$W(yA(this.y))};var j0=function(C,G,oe){this.z=C,this.x=G,this.y=oe,this.key=t_(0,C,C,G,oe)};j0.prototype.equals=function(C){return this.z===C.z&&this.x===C.x&&this.y===C.y},j0.prototype.url=function(C,G){var oe=YW(this.x,this.y,this.z),be=QW(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(G==="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 G=Math.pow(2,this.z);return new i((C.x*G-this.x)*ui,(C.y*G-this.y)*ui)},j0.prototype.toString=function(){return this.z+"/"+this.x+"/"+this.y};var jk=function(C,G){this.wrap=C,this.canonical=G,this.key=t_(C,G.z,G.z,G.x,G.y)},Xf=function(C,G,oe,be,Ie){this.overscaledZ=C,this.wrap=G,this.canonical=new j0(oe,+be,+Ie),this.key=t_(G,C,oe,be,Ie)};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 G=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>>G,this.canonical.y>>G)},Xf.prototype.calculateScaledKey=function(C,G){var oe=this.canonical.z-C;return C>this.canonical.z?t_(this.wrap*+G,C,this.canonical.z,this.canonical.x,this.canonical.y):t_(this.wrap*+G,C,C,this.canonical.x>>oe,this.canonical.y>>oe)},Xf.prototype.isChildOf=function(C){if(C.wrap!==this.wrap)return!1;var G=this.canonical.z-C.canonical.z;return C.overscaledZ===0||C.overscaledZ>G&&C.canonical.y===this.canonical.y>>G},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 G=this.canonical.z+1,oe=this.canonical.x*2,be=this.canonical.y*2;return[new Xf(G,this.wrap,G,oe,be),new Xf(G,this.wrap,G,oe+1,be),new Xf(G,this.wrap,G,oe,be+1),new Xf(G,this.wrap,G,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;Ie--)be=1<=this.dim+1||G<-1||G>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(G+1)*this.stride+(C+1)},Nv.prototype._unpackMapbox=function(C,G,oe){return(C*256*256+G*256+oe)/10-1e4},Nv.prototype._unpackTerrarium=function(C,G,oe){return C*256+G+oe/256-32768},Nv.prototype.getPixels=function(){return new eh({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},Nv.prototype.backfillBorder=function(C,G,oe){if(this.dim!==C.dim)throw new Error("dem dimension mismatch");var be=G*this.dim,Ie=G*this.dim+this.dim,Ne=oe*this.dim,ft=oe*this.dim+this.dim;switch(G){case-1:be=Ie-1;break;case 1:Ie=be+1;break}switch(oe){case-1:Ne=ft-1;break;case 1:ft=Ne+1;break}for(var It=-G*this.dim,Ht=-oe*this.dim,er=Ne;er=0&&Lr[3]>=0&&It.insert(ft,Lr[0],Lr[1],Lr[2],Lr[3])}},Uv.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},Uv.prototype.query=function(C,G,oe,be){var Ie=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(bn,qn,Nn,Eo){return td(C.cameraQueryGeometry,bn-er,qn-er,Nn+er,Eo+er)}),Oa=0,Mi=ua;Oabe)Ie=!1;else if(!G)Ie=!0;else if(this.expirationTime=Rr.maxzoom)&&Rr.visibility!=="none"){h(wr,this.zoom,Jt);var Nr=$a[Rr.id]=Rr.createBucket({index:Ba.bucketLayerIDs.length,layers:wr,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:rn,sourceID:this.source});Nr.populate(tn,Za,this.tileID.canonical),Ba.bucketLayerIDs.push(wr.map(function(la){return la.id}))}}}}var Hr,gt,Kt,mr,Ir=e.mapObject(Za.glyphDependencies,function(la){return Object.keys(la).map(Number)});Object.keys(Ir).length?Fr.send("getGlyphs",{uid:this.uid,stacks:Ir},function(la,ba){Hr||(Hr=la,gt=ba,ga.call(ra))}):gt={};var va=Object.keys(Za.iconDependencies);va.length?Fr.send("getImages",{icons:va,source:this.source,tileID:this.tileID,type:"icons"},function(la,ba){Hr||(Hr=la,Kt=ba,ga.call(ra))}):Kt={};var Pa=Object.keys(Za.patternDependencies);Pa.length?Fr.send("getImages",{icons:Pa,source:this.source,tileID:this.tileID,type:"patterns"},function(la,ba){Hr||(Hr=la,mr=ba,ga.call(ra))}):mr={},ga.call(this);function ga(){if(Hr)return ta(Hr);if(gt&&Kt&&mr){var la=new n(gt),ba=new e.ImageAtlas(Kt,mr);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,Kt,ba.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,ba.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:ba,glyphMap:this.returnDependencies?gt:null,iconMap:this.returnDependencies?Kt:null,glyphPositions:this.returnDependencies?la.positions:null})}}};function h(Yt,Rt,Zt){for(var Jt=new e.EvaluationParameters(Rt),Fr=0,ta=Yt;Fr=0!=!!Rt&&Yt.reverse()}var E=e.vectorTile.VectorTileFeature.prototype.toGeoJSON,p=function(Rt){this._feature=Rt,this.extent=e.EXTENT,this.type=Rt.type,this.properties=Rt.tags,"id"in Rt&&!isNaN(Rt.id)&&(this.id=parseInt(Rt.id,10))};p.prototype.loadGeometry=function(){if(this._feature.type===1){for(var Rt=[],Zt=0,Jt=this._feature.geometry;Zt"u"&&(Jt.push(ca),Ba=Jt.length-1,ta[ca]=Ba),Rt.writeVarint(Ba);var $a=Zt.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),Rt.writeVarint(pi)}}function $(Yt,Rt){return(Rt<<3)+(Yt&7)}function ue(Yt){return Yt<<1^Yt>>31}function ce(Yt,Rt){for(var Zt=Yt.loadGeometry(),Jt=Yt.type,Fr=0,ta=0,ra=Zt.length,ca=0;ca>1;X(Yt,Rt,ra,Jt,Fr,ta%2),Y(Yt,Rt,Zt,Jt,ra-1,ta+1),Y(Yt,Rt,Zt,ra+1,Fr,ta+1)}}function X(Yt,Rt,Zt,Jt,Fr,ta){for(;Fr>Jt;){if(Fr-Jt>600){var ra=Fr-Jt+1,ca=Zt-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(Zt-ca*$a/ra+Za)),pi=Math.min(Fr,Math.floor(Zt+(ra-ca)*$a/ra+Za));X(Yt,Rt,Zt,ri,pi,ta)}var Ia=Rt[2*Zt+ta],rn=Jt,tn=Fr;for(Q(Yt,Rt,Jt,Zt),Rt[2*Fr+ta]>Ia&&Q(Yt,Rt,Jt,Fr);rnIa;)tn--}Rt[2*Jt+ta]===Ia?Q(Yt,Rt,Jt,tn):(tn++,Q(Yt,Rt,tn,Fr)),tn<=Zt&&(Jt=tn+1),Zt<=tn&&(Fr=tn-1)}}function Q(Yt,Rt,Zt,Jt){V(Yt,Zt,Jt),V(Rt,2*Zt,2*Jt),V(Rt,2*Zt+1,2*Jt+1)}function V(Yt,Rt,Zt){var Jt=Yt[Rt];Yt[Rt]=Yt[Zt],Yt[Zt]=Jt}function le(Yt,Rt,Zt,Jt,Fr,ta,ra){for(var ca=[0,Yt.length-1,0],Ba=[],$a,Za;ca.length;){var ri=ca.pop(),pi=ca.pop(),Ia=ca.pop();if(pi-Ia<=ra){for(var rn=Ia;rn<=pi;rn++)$a=Rt[2*rn],Za=Rt[2*rn+1],$a>=Zt&&$a<=Fr&&Za>=Jt&&Za<=ta&&Ba.push(Yt[rn]);continue}var tn=Math.floor((Ia+pi)/2);$a=Rt[2*tn],Za=Rt[2*tn+1],$a>=Zt&&$a<=Fr&&Za>=Jt&&Za<=ta&&Ba.push(Yt[tn]);var cn=(ri+1)%2;(ri===0?Zt<=$a:Jt<=Za)&&(ca.push(Ia),ca.push(tn-1),ca.push(cn)),(ri===0?Fr>=$a:ta>=Za)&&(ca.push(tn+1),ca.push(pi),ca.push(cn))}return Ba}function ae(Yt,Rt,Zt,Jt,Fr,ta){for(var ra=[0,Yt.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(Rt[2*pi],Rt[2*pi+1],Zt,Jt)<=Ba&&ca.push(Yt[pi]);continue}var Ia=Math.floor((ri+Za)/2),rn=Rt[2*Ia],tn=Rt[2*Ia+1];j(rn,tn,Zt,Jt)<=Ba&&ca.push(Yt[Ia]);var cn=($a+1)%2;($a===0?Zt-Fr<=rn:Jt-Fr<=tn)&&(ra.push(ri),ra.push(Ia-1),ra.push(cn)),($a===0?Zt+Fr>=rn:Jt+Fr>=tn)&&(ra.push(Ia+1),ra.push(Za),ra.push(cn))}return ca}function j(Yt,Rt,Zt,Jt){var Fr=Yt-Zt,ta=Rt-Jt;return Fr*Fr+ta*ta}var ee=function(Yt){return Yt[0]},te=function(Yt){return Yt[1]},pe=function(Rt,Zt,Jt,Fr,ta){Zt===void 0&&(Zt=ee),Jt===void 0&&(Jt=te),Fr===void 0&&(Fr=64),ta===void 0&&(ta=Float64Array),this.nodeSize=Fr,this.points=Rt;for(var ra=Rt.length<65536?Uint16Array:Uint32Array,ca=this.ids=new ra(Rt.length),Ba=this.coords=new ta(Rt.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(Rt,Zt){var Jt=((Rt[0]+180)%360+360)%360-180,Fr=Math.max(-90,Math.min(90,Rt[1])),ta=Rt[2]===180?180:((Rt[2]+180)%360+360)%360-180,ra=Math.max(-90,Math.min(90,Rt[3]));if(Rt[2]-Rt[0]>=360)Jt=-180,ta=180;else if(Jt>ta){var ca=this.getClusters([Jt,Fr,180,ra],Zt),Ba=this.getClusters([-180,Fr,ta,ra],Zt);return ca.concat(Ba)}for(var $a=this.trees[this._limitZoom(Zt)],Za=$a.range(nt(Jt),tt(ra),nt(ta),tt(Fr)),ri=[],pi=0,Ia=Za;piZt&&(tn+=Or.numPoints||1)}if(tn>=Ba){for(var Cr=ri.x*rn,wr=ri.y*rn,Rr=ca&&rn>1?this._map(ri,!0):null,Nr=(Za<<5)+(Zt+1)+this.points.length,Hr=0,gt=Ia;Hr1)for(var va=0,Pa=Ia;va>5},Se.prototype._getOriginZoom=function(Rt){return(Rt-this.points.length)%32},Se.prototype._map=function(Rt,Zt){if(Rt.numPoints)return Zt?se({},Rt.properties):Rt.properties;var Jt=this.points[Rt.index].properties,Fr=this.options.map(Jt);return Zt&&Fr===Jt?se({},Fr):Fr};function Re(Yt,Rt,Zt,Jt,Fr){return{x:Yt,y:Rt,zoom:1/0,id:Zt,parentId:-1,numPoints:Jt,properties:Fr}}function Pe(Yt,Rt){var Zt=Yt.geometry.coordinates,Jt=Zt[0],Fr=Zt[1];return{x:nt(Jt),y:tt(Fr),zoom:1/0,index:Rt,parentId:-1}}function je(Yt){return{type:"Feature",id:Yt.id,properties:at(Yt),geometry:{type:"Point",coordinates:[Ve(Yt.x),he(Yt.y)]}}}function at(Yt){var Rt=Yt.numPoints,Zt=Rt>=1e4?Math.round(Rt/1e3)+"k":Rt>=1e3?Math.round(Rt/100)/10+"k":Rt;return se(se({},Yt.properties),{cluster:!0,cluster_id:Yt.id,point_count:Rt,point_count_abbreviated:Zt})}function nt(Yt){return Yt/360+.5}function tt(Yt){var Rt=Math.sin(Yt*Math.PI/180),Zt=.5-.25*Math.log((1+Rt)/(1-Rt))/Math.PI;return Zt<0?0:Zt>1?1:Zt}function Ve(Yt){return(Yt-.5)*360}function he(Yt){var Rt=(180-Yt*360)*Math.PI/180;return 360*Math.atan(Math.exp(Rt))/Math.PI-90}function se(Yt,Rt){for(var Zt in Rt)Yt[Zt]=Rt[Zt];return Yt}function ne(Yt){return Yt.x}function Ce(Yt){return Yt.y}function Ze(Yt,Rt,Zt,Jt){for(var Fr=Jt,ta=Zt-Rt>>1,ra=Zt-Rt,ca,Ba=Yt[Rt],$a=Yt[Rt+1],Za=Yt[Zt],ri=Yt[Zt+1],pi=Rt+3;piFr)ca=pi,Fr=Ia;else if(Ia===Fr){var rn=Math.abs(pi-ta);rnJt&&(ca-Rt>3&&Ze(Yt,Rt,ca,Jt),Yt[ca+2]=Fr,Zt-ca>3&&Ze(Yt,ca,Zt,Jt))}function rt(Yt,Rt,Zt,Jt,Fr,ta){var ra=Fr-Zt,ca=ta-Jt;if(ra!==0||ca!==0){var Ba=((Yt-Zt)*ra+(Rt-Jt)*ca)/(ra*ra+ca*ca);Ba>1?(Zt=Fr,Jt=ta):Ba>0&&(Zt+=ra*Ba,Jt+=ca*Ba)}return ra=Yt-Zt,ca=Rt-Jt,ra*ra+ca*ca}function Je(Yt,Rt,Zt,Jt){var Fr={id:typeof Yt>"u"?null:Yt,type:Rt,geometry:Zt,tags:Jt,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return St(Fr),Fr}function St(Yt){var Rt=Yt.geometry,Zt=Yt.type;if(Zt==="Point"||Zt==="MultiPoint"||Zt==="LineString")kt(Yt,Rt);else if(Zt==="Polygon"||Zt==="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=Rt.length-3;Rt[2]=1,Ze(Rt,0,Za,Zt),Rt[Za+2]=1,Rt.size=Math.abs(ra),Rt.start=0,Rt.end=Rt.size}function qr(Yt,Rt,Zt,Jt){for(var Fr=0;Fr1?1:Zt}function _t(Yt,Rt,Zt,Jt,Fr,ta,ra,ca){if(Zt/=Rt,Jt/=Rt,ta>=Zt&&ra=Jt)return null;for(var Ba=[],$a=0;$a=Zt&&rn=Jt)continue;var tn=[];if(pi==="Point"||pi==="MultiPoint")Fe(ri,tn,Zt,Jt,Fr);else if(pi==="LineString")Ye(ri,tn,Zt,Jt,Fr,!1,ca.lineMetrics);else if(pi==="MultiLineString")Le(ri,tn,Zt,Jt,Fr,!1);else if(pi==="Polygon")Le(ri,tn,Zt,Jt,Fr,!0);else if(pi==="MultiPolygon")for(var cn=0;cn=Zt&&ra<=Jt&&(Rt.push(Yt[ta]),Rt.push(Yt[ta+1]),Rt.push(Yt[ta+2]))}}function Ye(Yt,Rt,Zt,Jt,Fr,ta,ra){for(var ca=Ae(Yt),Ba=Fr===0?Ke:st,$a=Yt.start,Za,ri,pi=0;piZt&&(ri=Ba(ca,Ia,rn,cn,xt,Zt),ra&&(ca.start=$a+Za*ri)):ut>Jt?Or=Zt&&(ri=Ba(ca,Ia,rn,cn,xt,Zt),Cr=!0),Or>Jt&&ut<=Jt&&(ri=Ba(ca,Ia,rn,cn,xt,Jt),Cr=!0),!ta&&Cr&&(ra&&(ca.end=$a+Za*ri),Rt.push(ca),ca=Ae(Yt)),ra&&($a+=Za)}var wr=Yt.length-3;Ia=Yt[wr],rn=Yt[wr+1],tn=Yt[wr+2],ut=Fr===0?Ia:rn,ut>=Zt&&ut<=Jt&&We(ca,Ia,rn,tn),wr=ca.length-3,ta&&wr>=3&&(ca[wr]!==ca[0]||ca[wr+1]!==ca[1])&&We(ca,ca[0],ca[1],ca[2]),ca.length&&Rt.push(ca)}function Ae(Yt){var Rt=[];return Rt.size=Yt.size,Rt.start=Yt.start,Rt.end=Yt.end,Rt}function Le(Yt,Rt,Zt,Jt,Fr,ta){for(var ra=0;rara.maxX&&(ra.maxX=Za),ri>ra.maxY&&(ra.maxY=ri)}return ra}function or(Yt,Rt,Zt,Jt){var Fr=Rt.geometry,ta=Rt.type,ra=[];if(ta==="Point"||ta==="MultiPoint")for(var ca=0;ca0&&Rt.size<(Fr?ra:Jt)){Zt.numPoints+=Rt.length/3;return}for(var ca=[],Ba=0;Bara)&&(Zt.numSimplified++,ca.push(Rt[Ba]),ca.push(Rt[Ba+1])),Zt.numPoints++;Fr&&Pr(ca,ta),Yt.push(ca)}function Pr(Yt,Rt){for(var Zt=0,Jt=0,Fr=Yt.length,ta=Fr-2;Jt0===Rt)for(Jt=0,Fr=Yt.length;Jt24)throw new Error("maxZoom should be in the 0-24 range");if(Rt.promoteId&&Rt.generateId)throw new Error("promoteId and generateId cannot be used together.");var Jt=Bt(Yt,Rt);this.tiles={},this.tileCoords=[],Zt&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",Rt.indexMaxZoom,Rt.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),Jt=ot(Jt,Rt),Jt.length&&this.splitTile(Jt,0,0,0),Zt&&(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)))}Fa.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},Fa.prototype.splitTile=function(Yt,Rt,Zt,Jt,Fr,ta,ra){for(var ca=[Yt,Rt,Zt,Jt],Ba=this.options,$a=Ba.debug;ca.length;){Jt=ca.pop(),Zt=ca.pop(),Rt=ca.pop(),Yt=ca.pop();var Za=1<1&&console.time("creation"),pi=this.tiles[ri]=cr(Yt,Rt,Zt,Jt,Ba),this.tileCoords.push({z:Rt,x:Zt,y:Jt}),$a)){$a>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",Rt,Zt,Jt,pi.numFeatures,pi.numPoints,pi.numSimplified),console.timeEnd("creation"));var Ia="z"+Rt;this.stats[Ia]=(this.stats[Ia]||0)+1,this.total++}if(pi.source=Yt,Fr){if(Rt===Ba.maxZoom||Rt===Fr)continue;var rn=1<1&&console.time("clipping");var tn=.5*Ba.buffer/Ba.extent,cn=.5-tn,xt=.5+tn,ut=1+tn,Or,Cr,wr,Rr,Nr,Hr;Or=Cr=wr=Rr=null,Nr=_t(Yt,Za,Zt-tn,Zt+xt,0,pi.minX,pi.maxX,Ba),Hr=_t(Yt,Za,Zt+cn,Zt+ut,0,pi.minX,pi.maxX,Ba),Yt=null,Nr&&(Or=_t(Nr,Za,Jt-tn,Jt+xt,1,pi.minY,pi.maxY,Ba),Cr=_t(Nr,Za,Jt+cn,Jt+ut,1,pi.minY,pi.maxY,Ba),Nr=null),Hr&&(wr=_t(Hr,Za,Jt-tn,Jt+xt,1,pi.minY,pi.maxY,Ba),Rr=_t(Hr,Za,Jt+cn,Jt+ut,1,pi.minY,pi.maxY,Ba),Hr=null),$a>1&&console.timeEnd("clipping"),ca.push(Or||[],Rt+1,Zt*2,Jt*2),ca.push(Cr||[],Rt+1,Zt*2,Jt*2+1),ca.push(wr||[],Rt+1,Zt*2+1,Jt*2),ca.push(Rr||[],Rt+1,Zt*2+1,Jt*2+1)}}},Fa.prototype.getTile=function(Yt,Rt,Zt){var Jt=this.options,Fr=Jt.extent,ta=Jt.debug;if(Yt<0||Yt>24)return null;var ra=1<1&&console.log("drilling down to z%d-%d-%d",Yt,Rt,Zt);for(var Ba=Yt,$a=Rt,Za=Zt,ri;!ri&&Ba>0;)Ba--,$a=Math.floor($a/2),Za=Math.floor(Za/2),ri=this.tiles[Ra(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,Yt,Rt,Zt),ta>1&&console.timeEnd("drilling down"),this.tiles[ca]?Pt(this.tiles[ca],Fr):null)};function Ra(Yt,Rt,Zt){return((1<=0?0:ge.button},r.remove=function(ge){ge.parentNode&&ge.parentNode.removeChild(ge)};function c(ge,K,xe){var re,ye,Ue,ke=e.browser.devicePixelRatio>1?"@2x":"",Qe=e.getJSON(K.transformRequest(K.normalizeSpriteURL(ge,ke,".json"),e.ResourceType.SpriteJSON),function(br,Br){Qe=null,Ue||(Ue=br,re=Br,qt())}),vt=e.getImage(K.transformRequest(K.normalizeSpriteURL(ge,ke,".png"),e.ResourceType.SpriteImage),function(br,Br){vt=null,Ue||(Ue=br,ye=Br,qt())});function qt(){if(Ue)xe(Ue);else if(re&&ye){var br=e.browser.getImageData(ye),Br={};for(var pr in re){var mt=re[pr],Mt=mt.width,Ft=mt.height,rr=mt.x,hr=mt.y,sr=mt.sdf,dr=mt.pixelRatio,lr=mt.stretchX,Wt=mt.stretchY,ir=mt.content,Gt=new e.RGBAImage({width:Mt,height:Ft});e.RGBAImage.copy(br,Gt,{x:rr,y:hr},{x:0,y:0},{width:Mt,height:Ft}),Br[pr]={data:Gt,pixelRatio:dr,sdf:sr,stretchX:lr,stretchY:Wt,content:ir}}xe(null,Br)}}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,x=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(re){if(this.loaded!==re&&(this.loaded=re,re)){for(var ye=0,Ue=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),re=0;re65535){br(new Error("glyphs > 65535 not supported"));return}if(mt.ranges[Ft]){br(null,{stack:Br,id:pr,glyph:Mt});return}var rr=mt.requests[Ft];rr||(rr=mt.requests[Ft]=[],g.loadGlyphRange(Br,Ft,re.url,re.requestManager,function(hr,sr){if(sr){for(var dr in sr)re._doesCharSupportLocalGlyph(+dr)||(mt.glyphs[+dr]=sr[+dr]);mt.ranges[Ft]=!0}for(var lr=0,Wt=rr;lr1&&(qt=K[++vt]);var Br=Math.abs(br-qt.left),pr=Math.abs(br-qt.right),mt=Math.min(Br,pr),Mt=void 0,Ft=Ue/re*(ye+1);if(qt.isDash){var rr=ye-Math.abs(Ft);Mt=Math.sqrt(mt*mt+rr*rr)}else Mt=ye-Math.sqrt(mt*mt+Ft*Ft);this.data[Qe+br]=Math.max(0,Math.min(255,Mt+128))}},F.prototype.addRegularDash=function(K){for(var xe=K.length-1;xe>=0;--xe){var re=K[xe],ye=K[xe+1];re.zeroLength?K.splice(xe,1):ye&&ye.isDash===re.isDash&&(ye.left=re.left,K.splice(xe,1))}var Ue=K[0],ke=K[K.length-1];Ue.isDash===ke.isDash&&(Ue.left=ke.left-this.width,ke.right=Ue.right+this.width);for(var Qe=this.width*this.nextRow,vt=0,qt=K[vt],br=0;br1&&(qt=K[++vt]);var Br=Math.abs(br-qt.left),pr=Math.abs(br-qt.right),mt=Math.min(Br,pr),Mt=qt.isDash?mt:-mt;this.data[Qe+br]=Math.max(0,Math.min(255,Mt+128))}},F.prototype.addDash=function(K,xe){var re=xe?7:0,ye=2*re+1;if(this.nextRow+ye>this.height)return e.warnOnce("LineAtlas out of space"),null;for(var Ue=0,ke=0;ke=re.minX&&K.x=re.minY&&K.y0&&(br[new e.OverscaledTileID(re.overscaledZ,Qe,ye.z,ke,ye.y-1).key]={backfilled:!1},br[new e.OverscaledTileID(re.overscaledZ,re.wrap,ye.z,ye.x,ye.y-1).key]={backfilled:!1},br[new e.OverscaledTileID(re.overscaledZ,qt,ye.z,vt,ye.y-1).key]={backfilled:!1}),ye.y+10&&(Ue.resourceTiming=re._resourceTiming,re._resourceTiming=[]),re.fire(new e.Event("data",Ue))})},K.prototype.onAdd=function(re){this.map=re,this.load()},K.prototype.setData=function(re){var ye=this;return this._data=re,this.fire(new e.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(Ue){if(Ue){ye.fire(new e.ErrorEvent(Ue));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(re,ye){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:re,source:this.id},ye),this},K.prototype.getClusterChildren=function(re,ye){return this.actor.send("geojson.getClusterChildren",{clusterId:re,source:this.id},ye),this},K.prototype.getClusterLeaves=function(re,ye,Ue,ke){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:re,limit:ye,offset:Ue},ke),this},K.prototype._updateWorkerData=function(re){var ye=this;this._loaded=!1;var Ue=e.extend({},this.workerOptions),ke=this._data;typeof ke=="string"?(Ue.request=this.map._requestManager.transformRequest(e.browser.resolveURL(ke),e.ResourceType.Source),Ue.request.collectResourceTiming=this._collectResourceTiming):Ue.data=JSON.stringify(ke),this.actor.send(this.type+".loadData",Ue,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:Ue.source},null),re(Qe))})},K.prototype.loaded=function(){return this._loaded},K.prototype.loadTile=function(re,ye){var Ue=this,ke=re.actor?"reloadTile":"loadTile";re.actor=this.actor;var Qe={type:this.type,uid:re.uid,tileID:re.tileID,zoom:re.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:e.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};re.request=this.actor.send(ke,Qe,function(vt,qt){return delete re.request,re.unloadVectorData(),re.aborted?ye(null):vt?ye(vt):(re.loadVectorData(qt,Ue.map.painter,ke==="reloadTile"),ye(null))})},K.prototype.abortTile=function(re){re.request&&(re.request.cancel(),delete re.request),re.aborted=!0},K.prototype.unloadTile=function(re){re.unloadVectorData(),this.actor.send("removeTile",{uid:re.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),ue=e.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),ce=function(ge){function K(xe,re,ye,Ue){ge.call(this),this.id=xe,this.dispatcher=ye,this.coordinates=re.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(Ue),this.options=re}return ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K,K.prototype.load=function(re,ye){var Ue=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){Ue._loaded=!0,ke?Ue.fire(new e.ErrorEvent(ke)):Qe&&(Ue.image=Qe,re&&(Ue.coordinates=re),ye&&ye(),Ue._finishLoading())})},K.prototype.loaded=function(){return this._loaded},K.prototype.updateImage=function(re){var ye=this;return!this.image||!re.url?this:(this.options.url=re.url,this.load(re.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(re){this.map=re,this.load()},K.prototype.setCoordinates=function(re){var ye=this;this.coordinates=re;var Ue=re.map(e.MercatorCoordinate.fromLngLat);this.tileID=de(Ue),this.minzoom=this.maxzoom=this.tileID.z;var ke=Ue.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 re=this.map.painter.context,ye=re.gl;this.boundsBuffer||(this.boundsBuffer=re.createVertexBuffer(this._boundsArray,ue.members)),this.boundsSegments||(this.boundsSegments=e.SegmentVector.simpleSegment(0,0,4,2)),this.texture||(this.texture=new e.Texture(re,this.image,ye.RGBA),this.texture.bind(ye.LINEAR,ye.CLAMP_TO_EDGE));for(var Ue in this.tiles){var ke=this.tiles[Ue];ke.state!=="loaded"&&(ke.state="loaded",ke.texture=this.texture)}}},K.prototype.loadTile=function(re,ye){this.tileID&&this.tileID.equals(re.tileID.canonical)?(this.tiles[String(re.tileID.wrap)]=re,re.buckets={},ye(null)):(re.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,re=-1/0,ye=-1/0,Ue=0,ke=ge;Ueye.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=re}},K.prototype.getVideo=function(){return this.video},K.prototype.onAdd=function(re){this.map||(this.map=re,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 re=this.map.painter.context,ye=re.gl;this.boundsBuffer||(this.boundsBuffer=re.createVertexBuffer(this._boundsArray,ue.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(re,this.video,ye.RGBA),this.texture.bind(ye.LINEAR,ye.CLAMP_TO_EDGE));for(var Ue in this.tiles){var ke=this.tiles[Ue];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),X=function(ge){function K(xe,re,ye,Ue){ge.call(this,xe,re,ye,Ue),re.coordinates?(!Array.isArray(re.coordinates)||re.coordinates.length!==4||re.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"'))),re.animate&&typeof re.animate!="boolean"&&this.fire(new e.ErrorEvent(new e.ValidationError("sources."+xe,null,'optional "animate" property must be a boolean value'))),re.canvas?typeof re.canvas!="string"&&!(re.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=re,this.animate=re.animate!==void 0?re.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(re){this.map=re,this.load(),this.canvas&&this.animate&&this.play()},K.prototype.onRemove=function(){this.pause()},K.prototype.prepare=function(){var re=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,re=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,re=!0),!this._hasInvalidDimensions()&&Object.keys(this.tiles).length!==0){var ye=this.map.painter.context,Ue=ye.gl;this.boundsBuffer||(this.boundsBuffer=ye.createVertexBuffer(this._boundsArray,ue.members)),this.boundsSegments||(this.boundsSegments=e.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(re||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new e.Texture(ye,this.canvas,Ue.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 re=0,ye=[this.canvas.width,this.canvas.height];rethis.max){var Qe=this._getAndRemoveByKey(this.order[0]);Qe&&this.onRemove(Qe)}return this},Pe.prototype.has=function(K){return K.wrapped().key in this.data},Pe.prototype.getAndRemove=function(K){return this.has(K)?this._getAndRemoveByKey(K.wrapped().key):null},Pe.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},Pe.prototype.getByKey=function(K){var xe=this.data[K];return xe?xe[0].value:null},Pe.prototype.get=function(K){if(!this.has(K))return null;var xe=this.data[K.wrapped().key][0];return xe.value},Pe.prototype.remove=function(K,xe){if(!this.has(K))return this;var re=K.wrapped().key,ye=xe===void 0?0:this.data[re].indexOf(xe),Ue=this.data[re][ye];return this.data[re].splice(ye,1),Ue.timeout&&clearTimeout(Ue.timeout),this.data[re].length===0&&delete this.data[re],this.onRemove(Ue.value),this.order.splice(this.order.indexOf(re),1),this},Pe.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},Pe.prototype.filter=function(K){var xe=[];for(var re in this.data)for(var ye=0,Ue=this.data[re];ye1||(Math.abs(Br)>1&&(Math.abs(Br+mt)===1?Br+=mt:Math.abs(Br-mt)===1&&(Br-=mt)),!(!br.dem||!qt.dem)&&(qt.dem.backfillBorder(br.dem,Br,pr),qt.neighboringTiles&&qt.neighboringTiles[Mt]&&(qt.neighboringTiles[Mt].backfilled=!0)))}},K.prototype.getTile=function(re){return this.getTileByID(re.key)},K.prototype.getTileByID=function(re){return this._tiles[re]},K.prototype._retainLoadedChildren=function(re,ye,Ue,ke){for(var Qe in this._tiles){var vt=this._tiles[Qe];if(!(ke[Qe]||!vt.hasData()||vt.tileID.overscaledZ<=ye||vt.tileID.overscaledZ>Ue)){for(var qt=vt.tileID;vt&&vt.tileID.overscaledZ>ye+1;){var br=vt.tileID.scaledTo(vt.tileID.overscaledZ-1);vt=this._tiles[br.key],vt&&vt.hasData()&&(qt=br)}for(var Br=qt;Br.overscaledZ>ye;)if(Br=Br.scaledTo(Br.overscaledZ-1),re[Br.key]){ke[qt.key]=qt;break}}}},K.prototype.findLoadedParent=function(re,ye){if(re.key in this._loadedParentTiles){var Ue=this._loadedParentTiles[re.key];return Ue&&Ue.tileID.overscaledZ>=ye?Ue:null}for(var ke=re.overscaledZ-1;ke>=ye;ke--){var Qe=re.scaledTo(ke),vt=this._getLoadedTile(Qe);if(vt)return vt}},K.prototype._getLoadedTile=function(re){var ye=this._tiles[re.key];if(ye&&ye.hasData())return ye;var Ue=this._cache.getByKey(re.wrapped().key);return Ue},K.prototype.updateCacheSize=function(re){var ye=Math.ceil(re.width/this._source.tileSize)+1,Ue=Math.ceil(re.height/this._source.tileSize)+1,ke=ye*Ue,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(re){var ye=this._prevLng===void 0?re:this._prevLng,Ue=re-ye,ke=Ue/360,Qe=Math.round(ke);if(this._prevLng=re,Qe){var vt={};for(var qt in this._tiles){var br=this._tiles[qt];br.tileID=br.tileID.unwrapTo(br.tileID.wrap+Qe),vt[br.tileID.key]=br}this._tiles=vt;for(var Br in this._timers)clearTimeout(this._timers[Br]),delete this._timers[Br];for(var pr in this._tiles){var mt=this._tiles[pr];this._setTileReloadTimer(pr,mt)}}},K.prototype.update=function(re){var ye=this;if(this.transform=re,!(!this._sourceLoaded||this._paused)){this.updateCacheSize(re),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={};var Ue;this.used?this._source.tileID?Ue=re.getVisibleUnwrappedCoordinates(this._source.tileID).map(function(ya){return new e.OverscaledTileID(ya.canonical.z,ya.wrap,ya.canonical.z,ya.canonical.x,ya.canonical.y)}):(Ue=re.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(Ue=Ue.filter(function(ya){return ye._source.hasTile(ya)}))):Ue=[];var ke=re.coveringZoomLevel(this._source),Qe=Math.max(ke-K.maxOverzooming,this._source.minzoom),vt=Math.max(ke+K.maxUnderzooming,this._source.minzoom),qt=this._updateRetainedTiles(Ue,ke);if(Ba(this._source.type)){for(var br={},Br={},pr=Object.keys(qt),mt=0,Mt=pr;mtthis._source.maxzoom){var sr=rr.children(this._source.maxzoom)[0],dr=this.getTile(sr);if(dr&&dr.hasData()){Ue[sr.key]=sr;continue}}else{var lr=rr.children(this._source.maxzoom);if(Ue[lr[0].key]&&Ue[lr[1].key]&&Ue[lr[2].key]&&Ue[lr[3].key])continue}for(var Wt=hr.wasRequested(),ir=rr.overscaledZ-1;ir>=Qe;--ir){var Gt=rr.scaledTo(ir);if(ke[Gt.key]||(ke[Gt.key]=!0,hr=this.getTile(Gt),!hr&&Wt&&(hr=this._addTile(Gt)),hr&&(Ue[Gt.key]=Gt,Wt=hr.wasRequested(),hr.hasData())))break}}}return Ue},K.prototype._updateLoadedParentTileCache=function(){this._loadedParentTiles={};for(var re in this._tiles){for(var ye=[],Ue=void 0,ke=this._tiles[re].tileID;ke.overscaledZ>0;){if(ke.key in this._loadedParentTiles){Ue=this._loadedParentTiles[ke.key];break}ye.push(ke.key);var Qe=ke.scaledTo(ke.overscaledZ-1);if(Ue=this._getLoadedTile(Qe),Ue)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 re in this._tiles)this._removeTile(re);this._cache.reset()},K.prototype.tilesIn=function(re,ye,Ue){var ke=this,Qe=[],vt=this.transform;if(!vt)return Qe;for(var qt=Ue?vt.getCameraQueryGeometry(re):re,br=re.map(function(ir){return vt.pointCoordinate(ir)}),Br=qt.map(function(ir){return vt.pointCoordinate(ir)}),pr=this.getIds(),mt=1/0,Mt=1/0,Ft=-1/0,rr=-1/0,hr=0,sr=Br;hr=0&&vi[1].y+ya>=0){var Ga=br.map(function(Zi){return Dr.getTilePoint(Zi)}),ai=Br.map(function(Zi){return Dr.getTilePoint(Zi)});Qe.push({tile:Gt,tileID:Dr,queryGeometry:Ga,cameraQueryGeometry:ai,scale:Jr})}}},Wt=0;Wt=e.browser.now())return!0}return!1},K.prototype.setFeatureState=function(re,ye,Ue){re=re||"_geojsonTileLayer",this._state.updateState(re,ye,Ue)},K.prototype.removeFeatureState=function(re,ye,Ue){re=re||"_geojsonTileLayer",this._state.removeFeatureState(re,ye,Ue)},K.prototype.getFeatureState=function(re,ye){return re=re||"_geojsonTileLayer",this._state.getState(re,ye)},K.prototype.setDependencies=function(re,ye,Ue){var ke=this._tiles[re];ke&&ke.setDependencies(ye,Ue)},K.prototype.reloadTilesForDependencies=function(re,ye){for(var Ue in this._tiles){var ke=this._tiles[Ue];ke.hasDependency(re,ye)&&this._reloadTile(Ue,"reloading")}this._cache.filter(function(Qe){return!Qe.hasDependency(re,ye)})},K}(e.Evented);ra.maxOverzooming=10,ra.maxUnderzooming=3;function ca(ge,K){var xe=Math.abs(ge.wrap*2)-+(ge.wrap<0),re=Math.abs(K.wrap*2)-+(K.wrap<0);return ge.overscaledZ-K.overscaledZ||re-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(Io.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[Ue].mult(1-vt).add(this.points[xe].mult(vt))};var la=function(K,xe,re){var ye=this.boxCells=[],Ue=this.circleCells=[];this.xCellCount=Math.ceil(K/re),this.yCellCount=Math.ceil(xe/re);for(var ke=0;kethis.width||ye<0||xe>this.height)return Ue?!1:[];var Qe=[];if(K<=0&&xe<=0&&this.width<=re&&this.height<=ye){if(Ue)return!0;for(var vt=0;vt0:Qe}},la.prototype._queryCircle=function(K,xe,re,ye,Ue){var ke=K-re,Qe=K+re,vt=xe-re,qt=xe+re;if(Qe<0||ke>this.width||qt<0||vt>this.height)return ye?!1:[];var br=[],Br={hitTest:ye,circle:{x:K,y:xe,radius:re},seenUids:{box:{},circle:{}}};return this._forEachCell(ke,vt,Qe,qt,this._queryCellCircle,br,Br,Ue),ye?br.length>0:br},la.prototype.query=function(K,xe,re,ye,Ue){return this._query(K,xe,re,ye,!1,Ue)},la.prototype.hitTest=function(K,xe,re,ye,Ue){return this._query(K,xe,re,ye,!0,Ue)},la.prototype.hitTestCircle=function(K,xe,re,ye){return this._queryCircle(K,xe,re,!0,ye)},la.prototype._queryCell=function(K,xe,re,ye,Ue,ke,Qe,vt){var qt=Qe.seenUids,br=this.boxCells[Ue];if(br!==null)for(var Br=this.bboxes,pr=0,mt=br;pr=Br[Ft+0]&&ye>=Br[Ft+1]&&(!vt||vt(this.boxKeys[Mt]))){if(Qe.hitTest)return ke.push(!0),!0;ke.push({key:this.boxKeys[Mt],x1:Br[Ft],y1:Br[Ft+1],x2:Br[Ft+2],y2:Br[Ft+3]})}}}var rr=this.circleCells[Ue];if(rr!==null)for(var hr=this.circles,sr=0,dr=rr;srQe*Qe+vt*vt},la.prototype._circleAndRectCollide=function(K,xe,re,ye,Ue,ke,Qe){var vt=(ke-ye)/2,qt=Math.abs(K-(ye+vt));if(qt>vt+re)return!1;var br=(Qe-Ue)/2,Br=Math.abs(xe-(Ue+br));if(Br>br+re)return!1;if(qt<=vt||Br<=br)return!0;var pr=qt-vt,mt=Br-br;return pr*pr+mt*mt<=re*re};function ba(ge,K,xe,re,ye){var Ue=e.create();return K?(e.scale(Ue,Ue,[1/ye,1/ye,1]),xe||e.rotateZ(Ue,Ue,re.angle)):e.multiply(Ue,re.labelPlaneMatrix,ge),Ue}function Ai(ge,K,xe,re,ye){if(K){var Ue=e.clone(ge);return e.scale(Ue,Ue,[ye,ye,1]),xe||e.rotateZ(Ue,Ue,-re.angle),Ue}else return re.glCoordMatrix}function ki(ge,K){var xe=[ge.x,ge.y,0,1];wo(xe,xe,K);var re=xe[3];return{point:new e.Point(xe[0]/re,xe[1]/re),signedDistanceFromCamera:re}}function Ki(ge,K){return .5+.5*(ge/K)}function Mn(ge,K){var xe=ge[0]/ge[3],re=ge[1]/ge[3],ye=xe>=-K[0]&&xe<=K[0]&&re>=-K[1]&&re<=K[1];return ye}function wn(ge,K,xe,re,ye,Ue,ke,Qe){var vt=re?ge.textSizeData:ge.iconSizeData,qt=e.evaluateSizeForZoom(vt,xe.transform.zoom),br=[256/xe.width*2+1,256/xe.height*2+1],Br=re?ge.text.dynamicLayoutVertexArray:ge.icon.dynamicLayoutVertexArray;Br.clear();for(var pr=ge.lineVertexArray,mt=re?ge.text.placedSymbolArray:ge.icon.placedSymbolArray,Mt=xe.transform.width/xe.transform.height,Ft=!1,rr=0;rrUe)return{useVertical:!0}}return(ge===e.WritingMode.vertical?K.yxe.x)?{needsFlipping:!0}:null}function ao(ge,K,xe,re,ye,Ue,ke,Qe,vt,qt,br,Br,pr,mt){var Mt=K/24,Ft=ge.lineOffsetX*Mt,rr=ge.lineOffsetY*Mt,hr;if(ge.numGlyphs>1){var sr=ge.glyphStartIndex+ge.numGlyphs,dr=ge.lineStartIndex,lr=ge.lineStartIndex+ge.lineLength,Wt=On(Mt,Qe,Ft,rr,xe,br,Br,ge,vt,Ue,pr);if(!Wt)return{notEnoughRoom:!0};var ir=ki(Wt.first.point,ke).point,Gt=ki(Wt.last.point,ke).point;if(re&&!xe){var Dr=En(ge.writingMode,ir,Gt,mt);if(Dr)return Dr}hr=[Wt.first];for(var Jr=ge.glyphStartIndex+1;Jr0?ai.point:Co(Br,Ga,ya,1,ye),Fi=En(ge.writingMode,ya,Zi,mt);if(Fi)return Fi}var ui=bo(Mt*Qe.getoffsetX(ge.glyphStartIndex),Ft,rr,xe,br,Br,ge.segment,ge.lineStartIndex,ge.lineStartIndex+ge.lineLength,vt,Ue,pr);if(!ui)return{notEnoughRoom:!0};hr=[ui]}for(var _i=0,Si=hr;_i0?1:-1,Mt=0;re&&(mt*=-1,Mt=Math.PI),mt<0&&(Mt+=Math.PI);for(var Ft=mt>0?Qe+ke:Qe+ke+1,rr=ye,hr=ye,sr=0,dr=0,lr=Math.abs(pr),Wt=[];sr+dr<=lr;){if(Ft+=mt,Ft=vt)return null;if(hr=rr,Wt.push(rr),rr=Br[Ft],rr===void 0){var ir=new e.Point(qt.getx(Ft),qt.gety(Ft)),Gt=ki(ir,br);if(Gt.signedDistanceFromCamera>0)rr=Br[Ft]=Gt.point;else{var Dr=Ft-mt,Jr=sr===0?Ue:new e.Point(qt.getx(Dr),qt.gety(Dr));rr=Co(Jr,ir,hr,lr-sr+1,br)}}sr+=dr,dr=hr.dist(rr)}var ya=(lr-sr)/dr,vi=rr.sub(hr),Ga=vi.mult(ya)._add(hr);Ga._add(vi._unit()._perp()._mult(xe*mt));var ai=Mt+Math.atan2(rr.y-hr.y,rr.x-hr.x);return Wt.push(Ga),{point:Ga,angle:ai,path:Wt}}var zs=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function kn(ge,K){for(var xe=0;xe=1;Ui--)Si.push(ui.path[Ui]);for(var fn=1;fn<_i.path.length;fn++)Si.push(_i.path[fn]);var _o=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 Ds=[];if(Si.length>0){for(var Oo=Si[0].clone(),Cs=Si[0].clone(),Ys=1;Ys=ai.x&&Cs.x<=Zi.x&&Oo.y>=ai.y&&Cs.y<=Zi.y?Ds=[Si]:Cs.xZi.x||Cs.yZi.y?Ds=[]:Ds=e.clipLine([Si],ai.x,ai.y,Zi.x,Zi.y)}for(var mu=0,Ep=Ds;mu=this.screenRightBoundary||yethis.screenBottomBoundary},go.prototype.isInsideGrid=function(K,xe,re,ye){return re>=0&&K=0&&xe0){var lr;return this.prevPlacement&&this.prevPlacement.variableOffsets[pr.crossTileID]&&this.prevPlacement.placements[pr.crossTileID]&&this.prevPlacement.placements[pr.crossTileID].text&&(lr=this.prevPlacement.variableOffsets[pr.crossTileID].anchor),this.variableOffsets[pr.crossTileID]={textOffset:rr,width:re,height:ye,anchor:K,textBoxScale:Ue,prevAnchor:lr},this.markUsedJustification(mt,K,pr,Mt),mt.allowVerticalPlacement&&(this.markUsedOrientation(mt,Mt,pr),this.placedOrientations[pr.crossTileID]=Mt),{shift:hr,placedGlyphBoxes:sr}}},Ko.prototype.placeLayerBucketPart=function(K,xe,re){var ye=this,Ue=K.parameters,ke=Ue.bucket,Qe=Ue.layout,vt=Ue.posMatrix,qt=Ue.textLabelPlaneMatrix,br=Ue.labelToScreenMatrix,Br=Ue.textPixelRatio,pr=Ue.holdingForFade,mt=Ue.collisionBoxArray,Mt=Ue.partiallyEvaluatedTextSize,Ft=Ue.collisionGroup,rr=Qe.get("text-optional"),hr=Qe.get("icon-optional"),sr=Qe.get("text-allow-overlap"),dr=Qe.get("icon-allow-overlap"),lr=Qe.get("text-rotation-alignment")==="map",Wt=Qe.get("text-pitch-alignment")==="map",ir=Qe.get("icon-text-fit")!=="none",Gt=Qe.get("symbol-z-order")==="viewport-y",Dr=sr&&(dr||!ke.hasIconData()||hr),Jr=dr&&(sr||!ke.hasTextData()||rr);!ke.collisionArrays&&mt&&ke.deserializeCollisionBoxes(mt);var ya=function(ui,_i){if(!xe[ui.crossTileID]){if(pr){ye.placements[ui.crossTileID]=new Yn(!1,!1,!1);return}var Si=!1,Ui=!1,fn=!0,_o=null,Uo={box:null,offscreen:null},Ds={box:null,offscreen:null},Oo=null,Cs=null,Ys=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 hu=e.WritingMode.horizontal;if(ke.allowVerticalPlacement&&!cc&&ye.prevPlacement){var Dh=ye.prevPlacement.placedOrientations[ui.crossTileID];Dh&&(ye.placedOrientations[ui.crossTileID]=Dh,hu=Dh,ye.markUsedOrientation(ke,hu,ui))}return hu},qd=function(cc,hu){if(ke.allowVerticalPlacement&&ui.numVerticalGlyphVertices>0&&_i.verticalTextBox)for(var Dh=0,Rv=ke.writingModes;Dh0&&(Jh=Jh.filter(function(cc){return cc!==Rh.anchor}),Jh.unshift(Rh.anchor))}var Cp=function(cc,hu,Dh){for(var Rv=cc.x2-cc.x1,lm=cc.y2-cc.y1,Mu=ui.textBoxScale,w0=ir&&!dr?hu:null,sv={box:[],offscreen:!1},xg=sr?Jh.length*2:Jh.length,Pp=0;Pp=Jh.length,T0=ye.attemptAnchorPlacement(lv,cc,Rv,lm,Mu,lr,Wt,Br,vt,Ft,bg,ui,ke,Dh,w0);if(T0&&(sv=T0.placedGlyphBoxes,sv&&sv.box&&sv.box.length)){Si=!0,_o=T0.shift;break}}return sv},Vp=function(){return Cp(Ph,_i.iconBox,e.WritingMode.horizontal)},Lp=function(){var cc=_i.verticalTextBox,hu=Uo&&Uo.box&&Uo.box.length;return ke.allowVerticalPlacement&&!hu&&ui.numVerticalGlyphVertices>0&&cc?Cp(cc,_i.verticalIconBox,e.WritingMode.vertical):{box:null,offscreen:null}};qd(Vp,Lp),Uo&&(Si=Uo.box,fn=Uo.offscreen);var Lv=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,Lv))}}else{var ed=function(cc,hu){var Dh=ye.collisionIndex.placeCollisionBox(cc,sr,Br,vt,Ft.predicate);return Dh&&Dh.box&&Dh.box.length&&(ye.markUsedOrientation(ke,hu,ui),ye.placedOrientations[ui.crossTileID]=hu),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(Oo=Uo,Si=Oo&&Oo.box&&Oo.box.length>0,fn=Oo&&Oo.offscreen,ui.useRuntimeCollisionCircles){var Gf=ke.text.placedSymbolArray.get(ui.centerJustifiedTextSymbolIndex),Gd=e.evaluateSizeForFeature(ke.textSizeData,Mt,Gf),Pv=Qe.get("text-padding"),ph=ui.collisionCircleDiameter;Cs=ye.collisionIndex.placeCollisionCircles(sr,Gf,ke.lineVertexArray,ke.glyphOffsetArray,Gd,vt,qt,br,re,Wt,Ft.predicate,ph,Pv),Si=sr||Cs.circles.length>0&&!Cs.collisionDetected,fn=fn&&Cs.offscreen}if(_i.iconFeatureIndex&&(kp=_i.iconFeatureIndex),_i.iconBox){var iv=function(cc){var hu=ir&&_o?ps(cc,_o.x,_o.y,lr,Wt,ye.transform.angle):cc;return ye.collisionIndex.placeCollisionBox(hu,dr,Br,vt,Ft.predicate)};Ds&&Ds.box&&Ds.box.length&&_i.verticalIconBox?(Ys=iv(_i.verticalIconBox),Ui=Ys.box.length>0):(Ys=iv(_i.iconBox),Ui=Ys.box.length>0),fn=fn&&Ys.offscreen}var om=rr||ui.numHorizontalGlyphVertices===0&&ui.numVerticalGlyphVertices===0,sm=hr||ui.numIconVertices===0;if(!om&&!sm?Ui=Si=Ui&&Si:sm?om||(Ui=Ui&&Si):Si=Ui&&Si,Si&&Oo&&Oo.box&&(Ds&&Ds.box&&Ep?ye.collisionIndex.insertCollisionBox(Oo.box,Qe.get("text-ignore-placement"),ke.bucketInstanceId,Ep,Ft.ID):ye.collisionIndex.insertCollisionBox(Oo.box,Qe.get("text-ignore-placement"),ke.bucketInstanceId,mu,Ft.ID)),Ui&&Ys&&ye.collisionIndex.insertCollisionBox(Ys.box,Qe.get("icon-ignore-placement"),ke.bucketInstanceId,kp,Ft.ID),Cs&&(Si&&ye.collisionIndex.insertCollisionCircles(Cs.circles,Qe.get("text-ignore-placement"),ke.bucketInstanceId,mu,Ft.ID),re)){var Iv=ke.bucketInstanceId,nv=ye.collisionCircleArrays[Iv];nv===void 0&&(nv=ye.collisionCircleArrays[Iv]=new Gn);for(var ov=0;ov=0;--Ga){var ai=vi[Ga];ya(ke.symbolInstances.get(ai),ke.collisionArrays[ai])}else for(var Zi=K.symbolInstanceStart;Zi=0&&(ke>=0&&br!==ke?K.text.placedSymbolArray.get(br).crossTileID=0:K.text.placedSymbolArray.get(br).crossTileID=re.crossTileID)}},Ko.prototype.markUsedOrientation=function(K,xe,re){for(var ye=xe===e.WritingMode.horizontal||xe===e.WritingMode.horizontalOnly?xe:0,Ue=xe===e.WritingMode.vertical?xe:0,ke=[re.leftJustifiedTextSymbolIndex,re.centerJustifiedTextSymbolIndex,re.rightJustifiedTextSymbolIndex],Qe=0,vt=ke;Qe0||Wt>0,ya=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?yn:Zi;Mt(K.text,lr,Fi);var ui=ai?yn:Zi;Mt(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(ya){var fn=il(Dr.icon),_o=!(pr&&dr.verticalPlacedIconSymbolIndex&&Ga);if(dr.placedIconSymbolIndex>=0){var Uo=_o?fn:yn;Mt(K.icon,dr.numIconVertices,Uo),K.icon.placedSymbolArray.get(dr.placedIconSymbolIndex).hidden=Dr.icon.isHidden()}if(dr.verticalPlacedIconSymbolIndex>=0){var Ds=_o?yn:fn;Mt(K.icon,dr.numVerticalIconVertices,Ds),K.icon.placedSymbolArray.get(dr.verticalPlacedIconSymbolIndex).hidden=Dr.icon.isHidden()}}if(K.hasIconCollisionBoxData()||K.hasTextCollisionBoxData()){var Oo=K.collisionArrays[sr];if(Oo){var Cs=new e.Point(0,0);if(Oo.textBox||Oo.verticalTextBox){var Ys=!0;if(qt){var mu=ye.variableOffsets[ir];mu?(Cs=_s(mu.anchor,mu.width,mu.height,mu.textOffset,mu.textBoxScale),br&&Cs._rotate(Br?ye.transform.angle:-ye.transform.angle)):Ys=!1}Oo.textBox&&Gi(K.textCollisionBox.collisionVertexArray,Dr.text.placed,!Ys||Ga,Cs.x,Cs.y),Oo.verticalTextBox&&Gi(K.textCollisionBox.collisionVertexArray,Dr.text.placed,!Ys||ai,Cs.x,Cs.y)}var Ep=!!(!ai&&Oo.verticalIconBox);Oo.iconBox&&Gi(K.iconCollisionBox.collisionVertexArray,Dr.icon.placed,Ep,pr?Cs.x:0,pr?Cs.y:0),Oo.verticalIconBox&&Gi(K.iconCollisionBox.collisionVertexArray,Dr.icon.placed,!Ep,pr?Cs.x:0,pr?Cs.y:0)}}},rr=0;rrK},Ko.prototype.setStale=function(){this.stale=!0};function Gi(ge,K,xe,re,ye){ge.emplaceBack(K?1:0,xe?1:0,re||0,ye||0),ge.emplaceBack(K?1:0,xe?1:0,re||0,ye||0),ge.emplaceBack(K?1:0,xe?1:0,re||0,ye||0),ge.emplaceBack(K?1:0,xe?1:0,re||0,ye||0)}var Pn=Math.pow(2,25),qs=Math.pow(2,24),bs=Math.pow(2,17),lo=Math.pow(2,16),Zo=Math.pow(2,9),ws=Math.pow(2,8),Hs=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*qs+xe*bs+K*lo+xe*Zo+K*ws+xe*Hs+K}var yn=0,Po=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=[]};Po.prototype.continuePlacement=function(K,xe,re,ye,Ue){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 Po(vt));var br=this._inProgressLayer.continuePlacement(re[vt.source],this.placement,this._showCollisionBoxes,vt,ke);if(br)return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},To.prototype.commit=function(K){return this.placement.commit(K),this.placement};var Ws=512/e.EXTENT/2,Ll=function(K,xe,re){this.tileID=K,this.indexedSymbolInstances={},this.bucketInstanceId=re;for(var ye=0;yeK.overscaledZ)for(var qt in vt){var br=vt[qt];br.tileID.isChildOf(K)&&br.findMatches(xe.symbolInstances,K,ke)}else{var Br=K.scaledTo(Number(Qe)),pr=vt[Br.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 Ue.forEach(function(Qe){Qe.command!=="setTransition"&&ye[Qe.command].apply(ye,Qe.args)}),this.stylesheet=re,!0},K.prototype.addImage=function(re,ye){if(this.getImage(re))return this.fire(new e.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(re,ye),this._afterImageUpdated(re)},K.prototype.updateImage=function(re,ye){this.imageManager.updateImage(re,ye)},K.prototype.getImage=function(re){return this.imageManager.getImage(re)},K.prototype.removeImage=function(re){if(!this.getImage(re))return this.fire(new e.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(re),this._afterImageUpdated(re)},K.prototype._afterImageUpdated=function(re){this._availableImages=this.imageManager.listImages(),this._changedImages[re]=!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(re,ye,Ue){var ke=this;if(Ue===void 0&&(Ue={}),this._checkLoaded(),this.sourceCaches[re]!==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."+re,ye,null,Ue))){this.map&&this.map._collectResourceTiming&&(ye.collectResourceTiming=!0);var qt=this.sourceCaches[re]=new ra(re,ye,this.dispatcher);qt.style=this,qt.setEventedParent(this,function(){return{isSourceLoaded:ke.loaded(),source:qt.serialize(),sourceId:re}}),qt.onAdd(this.map),this._changed=!0}},K.prototype.removeSource=function(re){if(this._checkLoaded(),this.sourceCaches[re]===void 0)throw new Error("There is no source with this ID");for(var ye in this._layers)if(this._layers[ye].source===re)return this.fire(new e.ErrorEvent(new Error('Source "'+re+'" cannot be removed while layer "'+ye+'" is using it.')));var Ue=this.sourceCaches[re];delete this.sourceCaches[re],delete this._updatedSources[re],Ue.fire(new e.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:re})),Ue.setEventedParent(null),Ue.clearTiles(),Ue.onRemove&&Ue.onRemove(this.map),this._changed=!0},K.prototype.setGeoJSONSourceData=function(re,ye){this._checkLoaded();var Ue=this.sourceCaches[re].getSource();Ue.setData(ye),this._changed=!0},K.prototype.getSource=function(re){return this.sourceCaches[re]&&this.sourceCaches[re].getSource()},K.prototype.addLayer=function(re,ye,Ue){Ue===void 0&&(Ue={}),this._checkLoaded();var ke=re.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(re.type==="custom"){if(Ts(this,e.validateCustomStyleLayer(re)))return;Qe=e.createStyleLayer(re)}else{if(typeof re.source=="object"&&(this.addSource(ke,re.source),re=e.clone$1(re),re=e.extend(re,{source:ke})),this._validate(e.validateStyle.layer,"layers."+ke,re,{arrayIndex:-1},Ue))return;Qe=e.createStyleLayer(re),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(re,ye){this._checkLoaded(),this._changed=!0;var Ue=this._layers[re];if(!Ue){this.fire(new e.ErrorEvent(new Error("The layer '"+re+"' does not exist in the map's style and cannot be moved.")));return}if(re!==ye){var ke=this._order.indexOf(re);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,re),this._layerOrderChanged=!0}},K.prototype.removeLayer=function(re){this._checkLoaded();var ye=this._layers[re];if(!ye){this.fire(new e.ErrorEvent(new Error("The layer '"+re+"' does not exist in the map's style and cannot be removed.")));return}ye.setEventedParent(null);var Ue=this._order.indexOf(re);this._order.splice(Ue,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[re]=ye,delete this._layers[re],delete this._serializedLayers[re],delete this._updatedLayers[re],delete this._updatedPaintProps[re],ye.onRemove&&ye.onRemove(this.map)},K.prototype.getLayer=function(re){return this._layers[re]},K.prototype.hasLayer=function(re){return re in this._layers},K.prototype.setLayerZoomRange=function(re,ye,Ue){this._checkLoaded();var ke=this.getLayer(re);if(!ke){this.fire(new e.ErrorEvent(new Error("The layer '"+re+"' does not exist in the map's style and cannot have zoom extent.")));return}ke.minzoom===ye&&ke.maxzoom===Ue||(ye!=null&&(ke.minzoom=ye),Ue!=null&&(ke.maxzoom=Ue),this._updateLayer(ke))},K.prototype.setFilter=function(re,ye,Ue){Ue===void 0&&(Ue={}),this._checkLoaded();var ke=this.getLayer(re);if(!ke){this.fire(new e.ErrorEvent(new Error("The layer '"+re+"' 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,Ue)||(ke.filter=e.clone$1(ye),this._updateLayer(ke))}},K.prototype.getFilter=function(re){return e.clone$1(this.getLayer(re).filter)},K.prototype.setLayoutProperty=function(re,ye,Ue,ke){ke===void 0&&(ke={}),this._checkLoaded();var Qe=this.getLayer(re);if(!Qe){this.fire(new e.ErrorEvent(new Error("The layer '"+re+"' does not exist in the map's style and cannot be styled.")));return}e.deepEqual(Qe.getLayoutProperty(ye),Ue)||(Qe.setLayoutProperty(ye,Ue,ke),this._updateLayer(Qe))},K.prototype.getLayoutProperty=function(re,ye){var Ue=this.getLayer(re);if(!Ue){this.fire(new e.ErrorEvent(new Error("The layer '"+re+"' does not exist in the map's style.")));return}return Ue.getLayoutProperty(ye)},K.prototype.setPaintProperty=function(re,ye,Ue,ke){ke===void 0&&(ke={}),this._checkLoaded();var Qe=this.getLayer(re);if(!Qe){this.fire(new e.ErrorEvent(new Error("The layer '"+re+"' does not exist in the map's style and cannot be styled.")));return}if(!e.deepEqual(Qe.getPaintProperty(ye),Ue)){var vt=Qe.setPaintProperty(ye,Ue,ke);vt&&this._updateLayer(Qe),this._changed=!0,this._updatedPaintProps[re]=!0}},K.prototype.getPaintProperty=function(re,ye){return this.getLayer(re).getPaintProperty(ye)},K.prototype.setFeatureState=function(re,ye){this._checkLoaded();var Ue=re.source,ke=re.sourceLayer,Qe=this.sourceCaches[Ue];if(Qe===void 0){this.fire(new e.ErrorEvent(new Error("The source '"+Ue+"' 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}re.id===void 0&&this.fire(new e.ErrorEvent(new Error("The feature id parameter must be provided."))),Qe.setFeatureState(ke,re.id,ye)},K.prototype.removeFeatureState=function(re,ye){this._checkLoaded();var Ue=re.source,ke=this.sourceCaches[Ue];if(ke===void 0){this.fire(new e.ErrorEvent(new Error("The source '"+Ue+"' does not exist in the map's style.")));return}var Qe=ke.getSource().type,vt=Qe==="vector"?re.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 re.id!="string"&&typeof re.id!="number"){this.fire(new e.ErrorEvent(new Error("A feature id is required to remove its specific state property.")));return}ke.removeFeatureState(vt,re.id,ye)},K.prototype.getFeatureState=function(re){this._checkLoaded();var ye=re.source,Ue=re.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"&&!Ue){this.fire(new e.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}return re.id===void 0&&this.fire(new e.ErrorEvent(new Error("The feature id parameter must be provided."))),ke.getFeatureState(Ue,re.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(re){return re.serialize()}),layers:this._serializeLayers(this._order)},function(re){return re!==void 0})},K.prototype._updateLayer=function(re){this._updatedLayers[re.id]=!0,re.source&&!this._updatedSources[re.source]&&this.sourceCaches[re.source].getSource().type!=="raster"&&(this._updatedSources[re.source]="reload",this.sourceCaches[re.source].pause()),this._changed=!0},K.prototype._flattenAndSortRenderedFeatures=function(re){for(var ye=this,Ue=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(Ue(qt)){ke[qt]=vt;for(var br=0,Br=re;br=0;sr--){var dr=this._order[sr];if(Ue(dr))for(var lr=Qe.length-1;lr>=0;lr--){var Wt=Qe[lr].feature;if(ke[Wt.layer.id]850?D+=" Black":u>750?D+=" Extra Bold":u>650?D+=" Bold":u>550?D+=" Semi Bold":u>450?D+=" Medium":u>350?D+=" Regular":u>250?D+=" Light":u>150?D+=" Extra Light":D+=" Thin"):g.slice(0,2).join(" ")==="Open Sans"?(D="Open Sans",u>750?D+=" Extrabold":u>650?D+=" Bold":u>550?D+=" Semibold":u>350?D+=" Regular":D+=" Light"):g.slice(0,3).join(" ")==="Klokantech Noto Sans"&&(D="Klokantech Noto Sans",g[3]==="CJK"&&(D+=" CJK"),D+=u>500?" Bold":" Regular")),y&&(D+=" Italic"),D==="Open Sans Regular Italic"?D="Open Sans Italic":D==="Open Sans Regular Bold"?D="Open Sans Bold":D==="Open Sans Regular Bold Italic"?D="Open Sans Bold Italic":D==="Klokantech Noto Sans Regular Italic"&&(D="Klokantech Noto Sans Italic"),a(D)||(D=b);var P=D.split(", ");return P}}}),mV=He({"src/traces/scattermapbox/plot.js"(Z,q){"use strict";var v=sa(),_=vV(),S=nm().traceLayerPrefix,M={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function e(r,o,a,i){this.type="scattermapbox",this.subplot=r,this.uid=o,this.clusterEnabled=a,this.isHidden=i,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 i={type:"geojson",data:o.geojson};a&&a.enabled&&v.extendFlat(i,{cluster:!0,clusterMaxZoom:a.maxzoom});var n=this.subplot.map.getSource(this.sourceIds[r]);n?n.setData(o.geojson):this.subplot.map.addSource(this.sourceIds[r],i)},t.setSourceData=function(r,o){this.subplot.map.getSource(this.sourceIds[r]).setData(o.geojson)},t.addLayer=function(r,o,a){var i={type:o.type,id:this.layerIds[r],source:this.sourceIds[r],layout:o.layout,paint:o.paint};o.filter&&(i.filter=o.filter);for(var n=this.layerIds[r],s,h=this.subplot.getMapLayers(),f=0;f=0;y--){var D=g[y];n.removeLayer(c.layerIds[D])}u||n.removeSource(c.sourceIds.circle)}function x(u){for(var g=M.nonCluster,y=0;y=0;y--){var D=g[y];n.removeLayer(c.layerIds[D]),u||n.removeSource(c.sourceIds[D])}}function A(u){m?l(u):w(u)}function E(u){f?T(u):x(u)}function p(){for(var u=f?M.cluster:M.nonCluster,g=0;g=0;i--){var n=a[i];o.removeLayer(this.layerIds[n]),o.removeSource(this.sourceIds[n])}},q.exports=function(o,a){var i=a[0].trace,n=i.cluster&&i.cluster.enabled,s=i.visible!==!0,h=new e(o,i.uid,n,s),f=_(o.gd,a),m=h.below=o.belowLookup["trace-"+i.uid],c,T,l;if(n)for(h.addSource("circle",f.circle,i.cluster),c=0;c=0?Math.floor((i+180)/360):Math.ceil((i-180)/360),E=A*360,p=i-E;function b(N){var O=N.lonlat;if(O[0]===e||x&&T.indexOf(N.i+1)===-1)return 1/0;var L=_.modHalf(O[0],360),U=O[1],B=c.project([L,U]),W=B.x-f.c2p([p,U]),$=B.y-m.c2p([L,n]),ue=Math.max(3,N.mrc||0);return Math.max(Math.sqrt(W*W+$*$)-ue,1-3/ue)}if(v.getClosest(s,b,a),a.index!==!1){var d=s[a.index],u=d.lonlat,g=[_.modHalf(u[0],360)+E,u[1]],y=f.c2p(g),D=m.c2p(g),P=d.mrc||1;a.x0=y-P,a.x1=y+P,a.y0=D-P,a.y1=D+P;var z={};z[h.subplot]={_subplot:c};var F=h._module.formatLabels(d,h,z);return a.lonLabel=F.lonLabel,a.latLabel=F.latLabel,a.color=S(h,d),a.extraText=o(h,d,s[0].t.labels),a.hovertemplate=h.hovertemplate,[a]}}function o(a,i,n){if(a.hovertemplate)return;var s=i.hi||a.hoverinfo,h=s.split("+"),f=h.indexOf("all")!==-1,m=h.indexOf("lon")!==-1,c=h.indexOf("lat")!==-1,T=i.lonlat,l=[];function x(w){return w+"\xB0"}return f||m&&c?l.push("("+x(T[1])+", "+x(T[0])+")"):m?l.push(n.lon+x(T[0])):c&&l.push(n.lat+x(T[1])),(f||h.indexOf("text")!==-1)&&M(i,a,l),l.join("
")}q.exports={hoverPoints:r,getExtraText:o}}}),gV=He({"src/traces/scattermapbox/event_data.js"(Z,q){"use strict";q.exports=function(_,S){return _.lon=S.lon,_.lat=S.lat,_}}}),yV=He({"src/traces/scattermapbox/select.js"(Z,q){"use strict";var v=sa(),_=Fu(),S=Gs().BADNUM;q.exports=function(e,t){var r=e.cd,o=e.xaxis,a=e.yaxis,i=[],n=r[0].trace,s;if(!_.hasMarkers(n))return[];if(t===!1)for(s=0;s"u"&&(C=1e-6);var G,oe,be,Ie,Ne;for(be=k,Ne=0;Ne<8;Ne++){if(Ie=this.sampleCurveX(be)-k,Math.abs(Ie)oe)return oe;for(;GIe?G=be:oe=be,be=(oe-G)*.5+G}return be},a.prototype.solve=function(k,C){return this.sampleCurveY(this.solveCurveX(k,C))};var i=n;function n(k,C){this.x=k,this.y=C}n.prototype={clone:function(){return new n(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,G=k.y-this.y;return C*C+G*G},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,G=k[2]*this.x+k[3]*this.y;return this.x=C,this.y=G,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),G=Math.sin(k),oe=C*this.x-G*this.y,be=G*this.x+C*this.y;return this.x=oe,this.y=be,this},_rotateAround:function(k,C){var G=Math.cos(k),oe=Math.sin(k),be=C.x+G*(this.x-C.x)-oe*(this.y-C.y),Ie=C.y+oe*(this.x-C.x)+G*(this.y-C.y);return this.x=be,this.y=Ie,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},n.convert=function(k){return k instanceof n?k:Array.isArray(k)?new n(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 G=0;G=1)return 1;var C=k*k,G=C*k;return 4*(k<.5?G:3*(k-C)+G-.75)}function c(k,C,G,oe){var be=new o(k,C,G,oe);return function(Ie){return be.solve(Ie)}}var T=c(.25,.1,.25,1);function l(k,C,G){return Math.min(G,Math.max(C,k))}function x(k,C,G){var oe=G-C,be=((k-C)%oe+oe)%oe+C;return be===C?G:be}function w(k,C,G){if(!k.length)return G(null,[]);var oe=k.length,be=new Array(k.length),Ie=null;k.forEach(function(Ne,ft){C(Ne,function(It,Ht){It&&(Ie=It),be[ft]=Ht,--oe===0&&G(Ie,be)})})}function A(k){var C=[];for(var G in k)C.push(k[G]);return C}function E(k,C){var G=[];for(var oe in k)oe in C||G.push(oe);return G}function p(k){for(var C=[],G=arguments.length-1;G-- >0;)C[G]=arguments[G+1];for(var oe=0,be=C;oe>C/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,k)}return k()}function y(k){return k<=1?1:Math.pow(2,Math.ceil(Math.log(k)/Math.LN2))}function D(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 P(k,C){k.forEach(function(G){C[G]&&(C[G]=C[G].bind(C))})}function z(k,C){return k.indexOf(C,k.length-C.length)!==-1}function F(k,C,G){var oe={};for(var be in k)oe[be]=C.call(G||this,k[be],be,k);return oe}function N(k,C,G){var oe={};for(var be in k)C.call(G||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 L(k,C){for(var G=0;G=0)return!0;return!1}var U={};function B(k){U[k]||(typeof console<"u"&&console.warn(k),U[k]=!0)}function W(k,C,G){return(G.y-k.y)*(C.x-k.x)>(C.y-k.y)*(G.x-k.x)}function $(k){for(var C=0,G=0,oe=k.length,be=oe-1,Ie=void 0,Ne=void 0;G@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,G={};if(k.replace(C,function(be,Ie,Ne,ft){var It=Ne||ft;return G[Ie]=It?It.toLowerCase():!0,""}),G["max-age"]){var oe=parseInt(G["max-age"],10);isNaN(oe)?delete G["max-age"]:G["max-age"]=oe}return G}var Y=null;function X(k){if(Y==null){var C=k.navigator?k.navigator.userAgent:null;Y=!!k.safari||!!(C&&(/\b(iPad|iPhone|iPod)\b/.test(C)||C.match("Safari")&&!C.match("Chrome")))}return Y}function Q(k){try{var C=s[k];return C.setItem("_mapbox_test_",1),C.removeItem("_mapbox_test_"),!0}catch{return!1}}function V(k){return s.btoa(encodeURIComponent(k).replace(/%([0-9A-F]{2})/g,function(C,G){return String.fromCharCode(+("0x"+G))}))}function le(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,ee=s.cancelAnimationFrame||s.mozCancelAnimationFrame||s.webkitCancelAnimationFrame||s.msCancelAnimationFrame,te,pe,we={now:ae,frame:function(C){var G=j(C);return{cancel:function(){return ee(G)}}},getImageData:function(C,G){G===void 0&&(G=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(-G,-G,C.width+2*G,C.height+2*G)},resolveURL:function(C){return te||(te=s.document.createElement("a")),te.href=C,te.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},Re={supported:!1,testSupport:tt},Pe,je=!1,at,nt=!1;s.document&&(at=s.document.createElement("img"),at.onload=function(){Pe&&Ve(Pe),Pe=null,nt=!0},at.onerror=function(){je=!0,Pe=null},at.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");function tt(k){je||!at||(nt?Ve(k):Pe=k)}function Ve(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;Re.supported=!0}catch{}k.deleteTexture(C),je=!0}var he="01";function se(){for(var k="1",C="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",G="",oe=0;oe<10;oe++)G+=C[Math.floor(Math.random()*62)];var be=12*60*60*1e3,Ie=[k,he,G].join(""),Ne=Date.now()+be;return{token:Ie,tokenExpiresAt:Ne}}var ne=function(C,G){this._transformRequestFn=C,this._customAccessToken=G,this._createSkuToken()};ne.prototype._createSkuToken=function(){var C=se();this._skuToken=C.token,this._skuTokenExpiresAt=C.tokenExpiresAt},ne.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},ne.prototype.transformRequest=function(C,G){return this._transformRequestFn?this._transformRequestFn(C,G)||{url:C}:{url:C}},ne.prototype.normalizeStyleURL=function(C,G){if(!Ce(C))return C;var oe=Bt(C);return oe.path="/styles/v1"+oe.path,this._makeAPIURL(oe,this._customAccessToken||G)},ne.prototype.normalizeGlyphsURL=function(C,G){if(!Ce(C))return C;var oe=Bt(C);return oe.path="/fonts/v1"+oe.path,this._makeAPIURL(oe,this._customAccessToken||G)},ne.prototype.normalizeSourceURL=function(C,G){if(!Ce(C))return C;var oe=Bt(C);return oe.path="/v4/"+oe.authority+".json",oe.params.push("secure"),this._makeAPIURL(oe,this._customAccessToken||G)},ne.prototype.normalizeSpriteURL=function(C,G,oe,be){var Ie=Bt(C);return Ce(C)?(Ie.path="/styles/v1"+Ie.path+"/sprite"+G+oe,this._makeAPIURL(Ie,this._customAccessToken||be)):(Ie.path+=""+G+oe,Vt(Ie))},ne.prototype.normalizeTileURL=function(C,G){if(this._isSkuTokenExpired()&&this._createSkuToken(),C&&!Ce(C))return C;var oe=Bt(C),be=/(\.(png|jpg)\d*)(?=$)/,Ie=/^.+\/v4\//,Ne=we.devicePixelRatio>=2||G===512?"@2x":"",ft=Re.supported?".webp":"$1";oe.path=oe.path.replace(be,""+Ne+ft),oe.path=oe.path.replace(Ie,"/"),oe.path="/v4"+oe.path;var It=this._customAccessToken||St(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,G){var oe="/v4/",be=/\.[\w]+$/,Ie=Bt(C);if(!Ie.path.match(/(^\/v4\/)/)||!Ie.path.match(be))return C;var Ne="mapbox://tiles/";Ne+=Ie.path.replace(oe,"");var ft=Ie.params;return G&&(ft=ft.filter(function(It){return!It.match(/^access_token=/)})),ft.length&&(Ne+="?"+ft.join("&")),Ne},ne.prototype.canonicalizeTileset=function(C,G){for(var oe=G?Ce(G):!1,be=[],Ie=0,Ne=C.tiles||[];Ie=0&&C.params.splice(Ie,1)}if(be.path!=="/"&&(C.path=""+be.path+C.path),!Se.REQUIRE_ACCESS_TOKEN)return Vt(C);if(G=G||Se.ACCESS_TOKEN,!G)throw new Error("An API access token is required to use Mapbox GL. "+oe);if(G[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="+G),Vt(C)};function Ce(k){return k.indexOf("mapbox:")===0}var Ze=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function rt(k){return Ze.test(k)}function Je(k){return k.indexOf("sku=")>0&&rt(k)}function St(k){for(var C=0,G=k;C=1&&s.localStorage.setItem(G,JSON.stringify(this.eventData))}catch{B("Unable to write to LocalStorage")}},qr.prototype.processRequests=function(C){},qr.prototype.postEvent=function(C,G,oe,be){var Ie=this;if(Se.EVENTS_URL){var Ne=Bt(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=G?p(ft,G):ft,Ht={url:Vt(Ne),headers:{"Content-Type":"text/plain"},body:JSON.stringify([It])};this.pendingRequest=ca(Ht,function(er){Ie.pendingRequest=null,oe(er),Ie.saveEventData(),Ie.processRequests(be)})}},qr.prototype.queueRequest=function(C,G){this.queue.push(C),this.processRequests(G)};var kr=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,Ie,Ne){this.skuToken=Ie,(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 Ie=this.queue.shift(),Ne=Ie.id,ft=Ie.timestamp;Ne&&this.success[Ne]||(this.anonId||this.fetchEventData(),D(this.anonId)||(this.anonId=g()),this.postEvent(ft,{skuToken:this.skuToken},function(It){It||Ne&&(be.success[Ne]=!0)},oe))}},C}(qr),Ur=function(k){function C(G){k.call(this,"appUserTurnstile"),this._customAccessToken=G}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(Ie){return Ce(Ie)||rt(Ie)})&&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 Ie=vr(Se.ACCESS_TOKEN),Ne=Ie?Ie.u:Se.ACCESS_TOKEN,ft=Ne!==this.eventData.tokenU;D(this.anonId)||(this.anonId=g(),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(Yr){Yr||(be.eventData.lastSuccess=It,be.eventData.tokenU=Ne)},oe)}},C}(qr),_t=new Ur,Fe=_t.postTurnstileEvent.bind(_t),Ye=new kr,Ae=Ye.postMapLoadEvent.bind(Ye),Le="mapbox-tiles",We=500,Ke=50,st=1e3*60*7,ot;function Ut(){s.caches&&!ot&&(ot=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,G){if(Ut(),!!ot){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(G+be["max-age"]*1e3).toUTCString());var Ie=new Date(oe.headers.get("Expires")).getTime()-G;IeDate.now()&&!G["no-cache"]}var Pr=1/0;function _a(k){Pr++,Pr>Ke&&(k.getActor().send("enforceCacheSizeLimit",We),Pr=0)}function Fa(k){Ut(),ot&&ot.then(function(C){C.keys().then(function(G){for(var oe=0;oe=200&&G.status<300||G.status===0)&&G.response!==null){var be=G.response;if(k.type==="json")try{be=JSON.parse(G.response)}catch(Ie){return C(Ie)}C(null,be,G.getResponseHeader("Cache-Control"),G.getResponseHeader("Expires"))}else C(new wi(G.statusText,G.status,k.url))},G.send(k.body),{cancel:function(){return G.abort()}}}var Fr=function(k,C){if(!Rt(k.url)){if(s.fetch&&s.Request&&s.AbortController&&s.Request.prototype.hasOwnProperty("signal"))return Zt(k,C);if(ce()&&self.worker&&self.worker.actor){var G=!0;return self.worker.actor.send("getResource",k,C,void 0,G)}}return Jt(k,C)},ta=function(k,C){return Fr(p(k,{type:"json"}),C)},ra=function(k,C){return Fr(p(k,{type:"arrayBuffer"}),C)},ca=function(k,C){return Fr(p(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,G,oe){var be=new s.Image,Ie=s.URL;be.onload=function(){C(null,be),Ie.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=G,be.expires=oe,be.src=k.byteLength?Ie.createObjectURL(Ne):$a}function ri(k,C){var G=new s.Blob([new Uint8Array(k)],{type:"image/png"});s.createImageBitmap(G).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,Ia,rn=function(){pi=[],Ia=0};rn();var tn=function(k,C){if(Re.supported&&(k.headers||(k.headers={}),k.headers.accept="image/webp,*/*"),Ia>=Se.MAX_PARALLEL_IMAGE_REQUESTS){var G={requestParameters:k,callback:C,cancelled:!1,cancel:function(){this.cancelled=!0}};return pi.push(G),G}Ia++;var oe=!1,be=function(){if(!oe)for(oe=!0,Ia--;pi.length&&Ia0||this._oneTimeListeners&&this._oneTimeListeners[C]&&this._oneTimeListeners[C].length>0||this._eventedParent&&this._eventedParent.listens(C)},wr.prototype.setEventedParent=function(C,G){return this._eventedParent=C,this._eventedParentData=G,this};var Rr=8,Nr={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"],Kt={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:"*"}},mr={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:"*"}},Ir={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:"*"}},va={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"}}},ga={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"}},ba=["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"}},En={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Tn={"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"}},On={"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"}},kn={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},ao={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Co={type:"array",value:"*"},bo={type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},zs={type:"enum",values:{Point:{},LineString:{},Polygon:{}}},Cn={type:"array",minimum:0,maximum:24,value:["number","color"],length:2},wo={type:"array",value:"*",minimum:1},Zn={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}},go=["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],os={"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"}},ys={"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"}},jo={"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"}},Yn={"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"}},Hn={"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"}},ss={"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"}},_s={"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"}},ps={duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},Ko={"*":{type:"string"}},Gi={$version:Rr,$root:Nr,sources:Hr,source:gt,source_vector:Kt,source_raster:mr,source_raster_dem:Ir,source_geojson:va,source_video:Pa,source_image:ga,layer:la,layout:ba,layout_background:Ai,layout_fill:ki,layout_circle:Ki,layout_heatmap:En,"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:Tn,layout_symbol:On,layout_raster:kn,layout_hillshade:ao,filter:Co,filter_operator:bo,geometry_type:zs,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:Cn,expression:wo,light:Zn,paint:go,paint_fill:os,"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:ys,paint_circle:jo,paint_heatmap:Yn,paint_symbol:Gn,paint_raster:Hn,paint_hillshade:ss,paint_background:_s,transition:ps,"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:Ko},Pn=function(C,G,oe,be){this.message=(C?C+": ":"")+oe,be&&(this.identifier=be),G!=null&&G.__line__&&(this.line=G.__line__)};function qs(k){var C=k.key,G=k.value;return G?[new Pn(C,G,"constants have been deprecated as of v8")]:[]}function bs(k){for(var C=[],G=arguments.length-1;G-- >0;)C[G]=arguments[G+1];for(var oe=0,be=C;oe":k.itemType.kind==="value"?"array":"array<"+C+">"}else return k.kind}var Ul=[il,yn,Po,To,Ws,Ts,Ll,Jo(uo),Ls];function lu(k,C){if(C.kind==="error")return null;if(k.kind==="array"){if(C.kind==="array"&&(C.N===0&&C.itemType.kind==="value"||!lu(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 G=0,oe=Ul;G255?255:Ht}function be(Ht){return Ht<0?0:Ht>1?1:Ht}function Ie(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 G)return G[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 Yr=er.indexOf("("),Vr=er.indexOf(")");if(Yr!==-1&&Vr+1===er.length){var ua=er.substr(0,Yr),Oa=er.substr(Yr+1,Vr-(Yr+1)).split(","),Mi=1;switch(ua){case"rgba":if(Oa.length!==4)return null;Mi=Ne(Oa.pop());case"rgb":return Oa.length!==3?null:[Ie(Oa[0]),Ie(Oa[1]),Ie(Oa[2]),Mi];case"hsla":if(Oa.length!==4)return null;Mi=Ne(Oa.pop());case"hsl":if(Oa.length!==3)return null;var ni=(parseFloat(Oa[0])%360+360)%360/360,$i=Ne(Oa[1]),Oi=Ne(Oa[2]),Ji=Oi<=.5?Oi*($i+1):Oi+$i-Oi*$i,ln=Oi*2-Ji;return[oe(ft(ln,Ji,ni+1/3)*255),oe(ft(ln,Ji,ni)*255),oe(ft(ln,Ji,ni-1/3)*255),Mi];default:return null}}return null}try{C.parseCSSColor=It}catch{}}),Uc=Sf.parseCSSColor,Bs=function(C,G,oe,be){be===void 0&&(be=1),this.r=C,this.g=G,this.b=oe,this.a=be};Bs.parse=function(C){if(C){if(C instanceof Bs)return C;if(typeof C=="string"){var G=Uc(C);if(G)return new Bs(G[0]/255*G[3],G[1]/255*G[3],G[2]/255*G[3],G[3])}}},Bs.prototype.toString=function(){var C=this.toArray(),G=C[0],oe=C[1],be=C[2],Ie=C[3];return"rgba("+Math.round(G)+","+Math.round(oe)+","+Math.round(be)+","+Ie+")"},Bs.prototype.toArray=function(){var C=this,G=C.r,oe=C.g,be=C.b,Ie=C.a;return Ie===0?[0,0,0,0]:[G*255/Ie,oe*255/Ie,be*255/Ie,Ie]},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,G,oe){C?this.sensitivity=G?"variant":"case":this.sensitivity=G?"accent":"base",this.locale=oe,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};dc.prototype.compare=function(C,G){return this.collator.compare(C,G)},dc.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var Wc=function(C,G,oe,be,Ie){this.text=C,this.image=G,this.scale=oe,this.fontStack=be,this.textColor=Ie},uu=function(C){this.sections=C};uu.fromString=function(C){return new uu([new Wc(C,null,null,null,null)])},uu.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})},uu.factory=function(C){return C instanceof uu?C:uu.fromString(C)},uu.prototype.toString=function(){return this.sections.length===0?"":this.sections.map(function(C){return C.text}).join("")},uu.prototype.serialize=function(){for(var C=["format"],G=0,oe=this.sections;G=0&&k<=255&&typeof C=="number"&&C>=0&&C<=255&&typeof G=="number"&&G>=0&&G<=255)){var be=typeof oe=="number"?[k,C,G,oe]:[k,C,G];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,G,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 uu)return!0;if(k instanceof Pl)return!0;if(Array.isArray(k)){for(var C=0,G=k;C2){var ft=C[1];if(typeof ft!="string"||!(ft in nc)||ft==="object")return G.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 G.error('The length argument to "array" must be a positive integer literal',2);It=C[2],oe++}be=Jo(Ne,It)}else be=nc[Ie];for(var Ht=[];oe1)&&G.push(be)}}return G.concat(this.args.map(function(Ie){return Ie.serialize()}))};var qu=function(C){this.type=Ts,this.sections=C};qu.parse=function(C,G){if(C.length<2)return G.error("Expected at least one argument.");var oe=C[1];if(!Array.isArray(oe)&&typeof oe=="object")return G.error("First argument must be an image or text section.");for(var be=[],Ie=!1,Ne=1;Ne<=C.length-1;++Ne){var ft=C[Ne];if(Ie&&typeof ft=="object"&&!Array.isArray(ft)){Ie=!1;var It=null;if(ft["font-scale"]&&(It=G.parse(ft["font-scale"],1,yn),!It))return null;var Ht=null;if(ft["text-font"]&&(Ht=G.parse(ft["text-font"],1,Jo(Po)),!Ht))return null;var er=null;if(ft["text-color"]&&(er=G.parse(ft["text-color"],1,Ws),!er))return null;var Lr=be[be.length-1];Lr.scale=It,Lr.font=Ht,Lr.textColor=er}else{var Yr=G.parse(C[Ne],1,uo);if(!Yr)return null;var Vr=Yr.type.kind;if(Vr!=="string"&&Vr!=="value"&&Vr!=="null"&&Vr!=="resolvedImage")return G.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");Ie=!0,be.push({content:Yr,scale:null,font:null,textColor:null})}}return new qu(be)},qu.prototype.evaluate=function(C){var G=function(oe){var be=oe.content.evaluate(C);return nl(be)===Ls?new Wc("",be,null,null,null):new Wc(vl(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 uu(this.sections.map(G))},qu.prototype.eachChild=function(C){for(var G=0,oe=this.sections;G-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":To,"to-color":Ws,"to-number":yn,"to-string":Po},us=function(C,G){this.type=C,this.args=G};us.parse=function(C,G){if(C.length<2)return G.error("Expected at least one argument.");var oe=C[0];if((oe==="to-boolean"||oe==="to-string")&&C.length!==2)return G.error("Expected one argument.");for(var be=xh[oe],Ie=[],Ne=1;Ne4?oe="Invalid rbga value "+JSON.stringify(G)+": expected an array containing either three or four numeric values.":oe=ic(G[0],G[1],G[2],G[3]),!oe))return new Bs(G[0]/255,G[1]/255,G[2]/255,G[3])}throw new Xs(oe||"Could not parse color from value '"+(typeof G=="string"?G:String(JSON.stringify(G)))+"'")}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 G=Ac(k[0]),oe=nf(k[1]),be=Math.pow(2,C.z);return[Math.round(G*be*ql),Math.round(oe*be*ql)]}function Of(k,C,G){var oe=k[0]-C[0],be=k[1]-C[1],Ie=k[0]-G[0],Ne=k[1]-G[1];return oe*Ne-Ie*be===0&&oe*Ie<=0&&be*Ne<=0}function of(k,C,G){return C[1]>k[1]!=G[1]>k[1]&&k[0]<(G[0]-C[0])*(k[1]-C[1])/(G[1]-C[1])+C[0]}function jc(k,C){for(var G=!1,oe=0,be=C.length;oe0&&Lr<0||er<0&&Lr>0}function Ef(k,C,G,oe){var be=[C[0]-k[0],C[1]-k[1]],Ie=[oe[0]-G[0],oe[1]-G[1]];return Nf(Ie,be)===0?!1:!!(Gu(k,C,G,oe)&&Gu(G,oe,k,C))}function oc(k,C,G){for(var oe=0,be=G;oeG[2]){var be=oe*.5,Ie=k[0]-G[0]>be?-oe:G[0]-k[0]>be?oe:0;Ie===0&&(Ie=k[0]-G[2]>be?-oe:G[2]-k[0]>be?oe:0),k[0]+=Ie}Mf(C,k)}function kf(k){k[0]=k[1]=1/0,k[2]=k[3]=-1/0}function fh(k,C,G,oe){for(var be=Math.pow(2,oe.z)*ql,Ie=[oe.x*ql,oe.y*ql],Ne=[],ft=0,It=k;ft=0)return!1;var G=!0;return k.eachChild(function(oe){G&&!Lu(oe,C)&&(G=!1)}),G}var Mc=function(C,G){this.type=G.type,this.name=C,this.boundExpression=G};Mc.parse=function(C,G){if(C.length!==2||typeof C[1]!="string")return G.error("'var' expression requires exactly one string literal argument.");var oe=C[1];return G.scope.has(oe)?new Mc(oe,G.scope.get(oe)):G.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,G,oe,be,Ie){G===void 0&&(G=[]),be===void 0&&(be=new Hs),Ie===void 0&&(Ie=[]),this.registry=C,this.path=G,this.key=G.map(function(Ne){return"["+Ne+"]"}).join(""),this.scope=be,this.errors=Ie,this.expectedType=oe};ol.prototype.parse=function(C,G,oe,be,Ie){return Ie===void 0&&(Ie={}),G?this.concat(G,oe,be)._parse(C,Ie):this._parse(C,Ie)},ol.prototype._parse=function(C,G){(C===null||typeof C=="string"||typeof C=="boolean"||typeof C=="number")&&(C=["literal",C]);function oe(er,Lr,Yr){return Yr==="assert"?new jl(Lr,[er]):Yr==="coerce"?new us(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 Ie=this.registry[be];if(Ie){var Ne=Ie.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,G.typeAnnotation||"assert");else if((ft.kind==="color"||ft.kind==="formatted"||ft.kind==="resolvedImage")&&(It.kind==="value"||It.kind==="string"))Ne=oe(Ne,ft,G.typeAnnotation||"coerce");else if(this.checkSubtype(ft,It))return null}if(!(Ne instanceof As)&&Ne.type.kind!=="resolvedImage"&&vc(Ne)){var Ht=new Ps;try{Ne=new As(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,G,oe){var be=typeof C=="number"?this.path.concat(C):this.path,Ie=oe?this.scope.concat(oe):this.scope;return new ol(this.registry,be,G||null,Ie,this.errors)},ol.prototype.error=function(C){for(var G=[],oe=arguments.length-1;oe-- >0;)G[oe]=arguments[oe+1];var be=""+this.key+G.map(function(Ie){return"["+Ie+"]"}).join("");this.errors.push(new ws(be,C))},ol.prototype.checkSubtype=function(C,G){var oe=lu(C,G);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 us||k instanceof jl,G=!0;return k.eachChild(function(oe){C?G=G&&vc(oe):G=G&&oe instanceof As}),G?jf(k)&&Lu(k,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"]):!1}function yu(k,C){for(var G=k.length-1,oe=0,be=G,Ie=0,Ne,ft;oe<=be;)if(Ie=Math.floor((oe+be)/2),Ne=k[Ie],ft=k[Ie+1],Ne<=C){if(Ie===G||CC)be=Ie-1;else throw new Xs("Input is not a number.");return 0}var Tu=function(C,G,oe){this.type=C,this.input=G,this.labels=[],this.outputs=[];for(var be=0,Ie=oe;be=ft)return G.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',Ht);var Lr=G.parse(It,er,Ie);if(!Lr)return null;Ie=Ie||Lr.type,be.push([ft,Lr])}return new Tu(Ie,oe,be)},Tu.prototype.evaluate=function(C){var G=this.labels,oe=this.outputs;if(G.length===1)return oe[0].evaluate(C);var be=this.input.evaluate(C);if(be<=G[0])return oe[0].evaluate(C);var Ie=G.length;if(be>=G[Ie-1])return oe[Ie-1].evaluate(C);var Ne=yu(G,be);return oe[Ne].evaluate(C)},Tu.prototype.eachChild=function(C){C(this.input);for(var G=0,oe=this.outputs;G0&&C.push(this.labels[G]),C.push(this.outputs[G].serialize());return C};function Ml(k,C,G){return k*(1-G)+C*G}function qf(k,C,G){return new Bs(Ml(k.r,C.r,G),Ml(k.g,C.g,G),Ml(k.b,C.b,G),Ml(k.a,C.a,G))}function Qf(k,C,G){return k.map(function(oe,be){return Ml(oe,C[be],G)})}var Bu=Object.freeze({__proto__:null,number:Ml,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,iu=Math.PI/180,Kc=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),G=_u(k.g),oe=_u(k.b),be=hh((.4124564*C+.3575761*G+.1804375*oe)/Ec),Ie=hh((.2126729*C+.7151522*G+.072175*oe)/mc),Ne=hh((.0193339*C+.119192*G+.9503041*oe)/Lh);return{l:116*Ie-16,a:500*(be-Ie),b:200*(Ie-Ne),alpha:k.a}}function Cf(k){var C=(k.l+16)/116,G=isNaN(k.a)?C:C+k.a/500,oe=isNaN(k.b)?C:C-k.b/200;return C=mc*mf(C),G=Ec*mf(G),oe=Lh*mf(oe),new Bs(sl(3.2404542*G-1.5371385*C-.4985314*oe),sl(-.969266*G+1.8760108*C+.041556*oe),sl(.0556434*G-.2040259*C+1.0572252*oe),k.alpha)}function hl(k,C,G){return{l:Ml(k.l,C.l,G),a:Ml(k.a,C.a,G),b:Ml(k.b,C.b,G),alpha:Ml(k.alpha,C.alpha,G)}}function uf(k){var C=Pu(k),G=C.l,oe=C.a,be=C.b,Ie=Math.atan2(be,oe)*Kc;return{h:Ie<0?Ie+360:Ie,c:Math.sqrt(oe*oe+be*be),l:G,alpha:k.a}}function kc(k){var C=k.h*iu,G=k.c,oe=k.l;return Cf({l:oe,a:Math.cos(C)*G,b:Math.sin(C)*G,alpha:k.alpha})}function Hu(k,C,G){var oe=C-k;return k+G*(oe>180||oe<-180?oe-360*Math.round(oe/360):oe)}function gf(k,C,G){return{h:Hu(k.h,C.h,G),c:Ml(k.c,C.c,G),l:Ml(k.l,C.l,G),alpha:Ml(k.alpha,C.alpha,G)}}var Wu={forward:Pu,reverse:Cf,interpolate:hl},Jc={forward:uf,reverse:kc,interpolate:gf},Lf=Object.freeze({__proto__:null,lab:Wu,hcl:Jc}),nu=function(C,G,oe,be,Ie){this.type=C,this.operator=G,this.interpolation=oe,this.input=be,this.labels=[],this.outputs=[];for(var Ne=0,ft=Ie;Ne1}))return G.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);be={name:"cubic-bezier",controlPoints:It}}else return G.error("Unknown interpolation type "+String(be[0]),1,0);if(C.length-1<4)return G.error("Expected at least 4 arguments, but found only "+(C.length-1)+".");if((C.length-1)%2!==0)return G.error("Expected an even number of arguments.");if(Ie=G.parse(Ie,2,yn),!Ie)return null;var Ht=[],er=null;oe==="interpolate-hcl"||oe==="interpolate-lab"?er=Ws:G.expectedType&&G.expectedType.kind!=="value"&&(er=G.expectedType);for(var Lr=0;Lr=Yr)return G.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',ua);var Mi=G.parse(Vr,Oa,er);if(!Mi)return null;er=er||Mi.type,Ht.push([Yr,Mi])}return er.kind!=="number"&&er.kind!=="color"&&!(er.kind==="array"&&er.itemType.kind==="number"&&typeof er.N=="number")?G.error("Type "+Es(er)+" is not interpolatable."):new nu(er,oe,be,Ie,Ht)},nu.prototype.evaluate=function(C){var G=this.labels,oe=this.outputs;if(G.length===1)return oe[0].evaluate(C);var be=this.input.evaluate(C);if(be<=G[0])return oe[0].evaluate(C);var Ie=G.length;if(be>=G[Ie-1])return oe[Ie-1].evaluate(C);var Ne=yu(G,be),ft=G[Ne],It=G[Ne+1],Ht=nu.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"?Jc.reverse(Jc.interpolate(Jc.forward(er),Jc.forward(Lr),Ht)):Wu.reverse(Wu.interpolate(Wu.forward(er),Wu.forward(Lr),Ht))},nu.prototype.eachChild=function(C){C(this.input);for(var G=0,oe=this.outputs;G=oe.length)throw new Xs("Array index out of bounds: "+G+" > "+(oe.length-1)+".");if(G!==Math.floor(G))throw new Xs("Array index must be an integer, but found "+G+" instead.");return oe[G]},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 Vl=function(C,G){this.type=To,this.needle=C,this.haystack=G};Vl.parse=function(C,G){if(C.length!==3)return G.error("Expected 2 arguments, but found "+(C.length-1)+" instead.");var oe=G.parse(C[1],1,uo),be=G.parse(C[2],2,uo);return!oe||!be?null:Tc(oe.type,[To,Po,yn,il,uo])?new Vl(oe,be):G.error("Expected first argument to be of type boolean, string, number or null, but found "+Es(oe.type)+" instead")},Vl.prototype.evaluate=function(C){var G=this.needle.evaluate(C),oe=this.haystack.evaluate(C);if(!oe)return!1;if(!du(G,["boolean","string","number","null"]))throw new Xs("Expected first argument to be of type boolean, string, number or null, but found "+Es(nl(G))+" instead.");if(!du(oe,["string","array"]))throw new Xs("Expected second argument to be of type array or string, but found "+Es(nl(oe))+" instead.");return oe.indexOf(G)>=0},Vl.prototype.eachChild=function(C){C(this.needle),C(this.haystack)},Vl.prototype.outputDefined=function(){return!0},Vl.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var xu=function(C,G,oe){this.type=yn,this.needle=C,this.haystack=G,this.fromIndex=oe};xu.parse=function(C,G){if(C.length<=2||C.length>=5)return G.error("Expected 3 or 4 arguments, but found "+(C.length-1)+" instead.");var oe=G.parse(C[1],1,uo),be=G.parse(C[2],2,uo);if(!oe||!be)return null;if(!Tc(oe.type,[To,Po,yn,il,uo]))return G.error("Expected first argument to be of type boolean, string, number or null, but found "+Es(oe.type)+" instead");if(C.length===4){var Ie=G.parse(C[3],3,yn);return Ie?new xu(oe,be,Ie):null}else return new xu(oe,be)},xu.prototype.evaluate=function(C){var G=this.needle.evaluate(C),oe=this.haystack.evaluate(C);if(!du(G,["boolean","string","number","null"]))throw new Xs("Expected first argument to be of type boolean, string, number or null, but found "+Es(nl(G))+" instead.");if(!du(oe,["string","array"]))throw new Xs("Expected second argument to be of type array or string, but found "+Es(nl(oe))+" instead.");if(this.fromIndex){var be=this.fromIndex.evaluate(C);return oe.indexOf(G,be)}return oe.indexOf(G)},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,G,oe,be,Ie,Ne){this.inputType=C,this.type=G,this.input=oe,this.cases=be,this.outputs=Ie,this.otherwise=Ne};Lc.parse=function(C,G){if(C.length<5)return G.error("Expected at least 4 arguments, but found only "+(C.length-1)+".");if(C.length%2!==1)return G.error("Expected an even number of arguments.");var oe,be;G.expectedType&&G.expectedType.kind!=="value"&&(be=G.expectedType);for(var Ie={},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 Ie[String(Vr)]<"u")return er.error("Branch labels must be unique.");Ie[String(Vr)]=Ne.length}var ua=G.parse(Ht,ft,be);if(!ua)return null;be=be||ua.type,Ne.push(ua)}var Oa=G.parse(C[1],1,uo);if(!Oa)return null;var Mi=G.parse(C[C.length-1],C.length-1,be);return!Mi||Oa.type.kind!=="value"&&G.concat(1).checkSubtype(oe,Oa.type)?null:new Lc(oe,be,Oa,Ie,Ne,Mi)},Lc.prototype.evaluate=function(C){var G=this.input.evaluate(C),oe=nl(G)===this.inputType&&this.outputs[this.cases[G]]||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,G=["match",this.input.serialize()],oe=Object.keys(this.cases).sort(),be=[],Ie={},Ne=0,ft=oe;Ne=5)return G.error("Expected 3 or 4 arguments, but found "+(C.length-1)+" instead.");var oe=G.parse(C[1],1,uo),be=G.parse(C[2],2,yn);if(!oe||!be)return null;if(!Tc(oe.type,[Jo(uo),Po,uo]))return G.error("Expected first argument to be of type array or string, but found "+Es(oe.type)+" instead");if(C.length===4){var Ie=G.parse(C[3],3,yn);return Ie?new sc(oe.type,oe,be,Ie):null}else return new sc(oe.type,oe,be)},sc.prototype.evaluate=function(C){var G=this.input.evaluate(C),oe=this.beginIndex.evaluate(C);if(!du(G,["string","array"]))throw new Xs("Expected first argument to be of type array or string, but found "+Es(nl(G))+" instead.");if(this.endIndex){var be=this.endIndex.evaluate(C);return G.slice(oe,be)}return G.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,G){return C===G}function xr(k,C,G){return C!==G}function aa(k,C,G){return CG}function ka(k,C,G){return C<=G}function li(k,C,G){return C>=G}function Ci(k,C,G,oe){return oe.compare(C,G)===0}function Hi(k,C,G,oe){return!Ci(k,C,G,oe)}function Qi(k,C,G,oe){return oe.compare(C,G)<0}function pn(k,C,G,oe){return oe.compare(C,G)>0}function Pi(k,C,G,oe){return oe.compare(C,G)<=0}function Di(k,C,G,oe){return oe.compare(C,G)>=0}function Ni(k,C,G){var oe=k!=="=="&&k!=="!=";return function(){function be(Ie,Ne,ft){this.type=To,this.lhs=Ie,this.rhs=Ne,this.collator=ft,this.hasUntypedArgument=Ie.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 '`+Es(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 '`+Es(er.type)+"'.");if(Ht.type.kind!==er.type.kind&&Ht.type.kind!=="value"&&er.type.kind!=="value")return ft.error("Cannot compare types '"+Es(Ht.type)+"' and '"+Es(er.type)+"'.");oe&&(Ht.type.kind==="value"&&er.type.kind!=="value"?Ht=new jl(er.type,[Ht]):Ht.type.kind!=="value"&&er.type.kind==="value"&&(er=new jl(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,Ks),!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 Xs('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),Yr=nl(It);if(Lr.kind!=="string"||Yr.kind!=="string")return C(Ne,ft,It)}return this.collator?G(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),Mn=Ni("!=",xr,Hi),Qn=Ni("<",aa,Qi),io=Ni(">",$r,pn),eo=Ni("<=",ka,Pi),co=Ni(">=",li,Di),An=function(C,G,oe,be,Ie){this.type=Po,this.number=C,this.locale=G,this.currency=oe,this.minFractionDigits=be,this.maxFractionDigits=Ie};An.parse=function(C,G){if(C.length!==3)return G.error("Expected two arguments.");var oe=G.parse(C[1],1,yn);if(!oe)return null;var be=C[2];if(typeof be!="object"||Array.isArray(be))return G.error("NumberFormat options argument must be an object.");var Ie=null;if(be.locale&&(Ie=G.parse(be.locale,1,Po),!Ie))return null;var Ne=null;if(be.currency&&(Ne=G.parse(be.currency,1,Po),!Ne))return null;var ft=null;if(be["min-fraction-digits"]&&(ft=G.parse(be["min-fraction-digits"],1,yn),!ft))return null;var It=null;return be["max-fraction-digits"]&&(It=G.parse(be["max-fraction-digits"],1,yn),!It)?null:new An(oe,Ie,Ne,ft,It)},An.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))},An.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)},An.prototype.outputDefined=function(){return!1},An.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=yn,this.input=C};un.parse=function(C,G){if(C.length!==2)return G.error("Expected 1 argument, but found "+(C.length-1)+" instead.");var oe=G.parse(C[1],1);return oe?oe.type.kind!=="array"&&oe.type.kind!=="string"&&oe.type.kind!=="value"?G.error("Expected argument of type string or array, but found "+Es(oe.type)+" instead."):new un(oe):null},un.prototype.evaluate=function(C){var G=this.input.evaluate(C);if(typeof G=="string")return G.length;if(Array.isArray(G))return G.length;throw new Xs("Expected value to be of type string or array, but found "+Es(nl(G))+" 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(G){C.push(G.serialize())}),C};var yo={"==":mi,"!=":Mn,">":io,"<":Qn,">=":co,"<=":eo,array:jl,at:gc,boolean:jl,case:$c,coalesce:Xu,collator:Vu,format:qu,image:fl,in:Vl,"index-of":xu,interpolate:nu,"interpolate-hcl":nu,"interpolate-lab":nu,length:un,let:Cc,literal:As,match:Lc,number:jl,"number-format":An,object:jl,slice:sc,step:Tu,string:jl,"to-boolean":us,"to-color":us,"to-number":us,"to-string":us,var:Mc,within:Cu};function Qo(k,C){var G=C[0],oe=C[1],be=C[2],Ie=C[3];G=G.evaluate(k),oe=oe.evaluate(k),be=be.evaluate(k);var Ne=Ie?Ie.evaluate(k):1,ft=ic(G,oe,be,Ne);if(ft)throw new Xs(ft);return new Bs(G/255*Ne,oe/255*Ne,be/255*Ne,Ne)}function ks(k,C){return k in C}function rl(k,C){var G=C[k];return typeof G>"u"?null:G}function Ns(k,C,G,oe){for(;G<=oe;){var be=G+oe>>1;if(C[be]===k)return!0;C[be]>k?oe=be-1:G=be+1}return!1}function el(k){return{type:k}}to.register(yo,{error:[Nl,[Po],function(k,C){var G=C[0];throw new Xs(G.evaluate(k))}],typeof:[Po,[uo],function(k,C){var G=C[0];return Es(nl(G.evaluate(k)))}],"to-rgba":[Jo(yn,4),[Ws],function(k,C){var G=C[0];return G.evaluate(k).toArray()}],rgb:[Ws,[yn,yn,yn],Qo],rgba:[Ws,[yn,yn,yn,yn],Qo],has:{type:To,overloads:[[[Po],function(k,C){var G=C[0];return ks(G.evaluate(k),k.properties())}],[[Po,Ll],function(k,C){var G=C[0],oe=C[1];return ks(G.evaluate(k),oe.evaluate(k))}]]},get:{type:uo,overloads:[[[Po],function(k,C){var G=C[0];return rl(G.evaluate(k),k.properties())}],[[Po,Ll],function(k,C){var G=C[0],oe=C[1];return rl(G.evaluate(k),oe.evaluate(k))}]]},"feature-state":[uo,[Po],function(k,C){var G=C[0];return rl(G.evaluate(k),k.featureState||{})}],properties:[Ll,[],function(k){return k.properties()}],"geometry-type":[Po,[],function(k){return k.geometryType()}],id:[uo,[],function(k){return k.id()}],zoom:[yn,[],function(k){return k.globals.zoom}],"heatmap-density":[yn,[],function(k){return k.globals.heatmapDensity||0}],"line-progress":[yn,[],function(k){return k.globals.lineProgress||0}],accumulated:[uo,[],function(k){return k.globals.accumulated===void 0?null:k.globals.accumulated}],"+":[yn,el(yn),function(k,C){for(var G=0,oe=0,be=C;oe":[To,[Po,uo],function(k,C){var G=C[0],oe=C[1],be=k.properties()[G.value],Ie=oe.value;return typeof be==typeof Ie&&be>Ie}],"filter-id->":[To,[uo],function(k,C){var G=C[0],oe=k.id(),be=G.value;return typeof oe==typeof be&&oe>be}],"filter-<=":[To,[Po,uo],function(k,C){var G=C[0],oe=C[1],be=k.properties()[G.value],Ie=oe.value;return typeof be==typeof Ie&&be<=Ie}],"filter-id-<=":[To,[uo],function(k,C){var G=C[0],oe=k.id(),be=G.value;return typeof oe==typeof be&&oe<=be}],"filter->=":[To,[Po,uo],function(k,C){var G=C[0],oe=C[1],be=k.properties()[G.value],Ie=oe.value;return typeof be==typeof Ie&&be>=Ie}],"filter-id->=":[To,[uo],function(k,C){var G=C[0],oe=k.id(),be=G.value;return typeof oe==typeof be&&oe>=be}],"filter-has":[To,[uo],function(k,C){var G=C[0];return G.value in k.properties()}],"filter-has-id":[To,[],function(k){return k.id()!==null&&k.id()!==void 0}],"filter-type-in":[To,[Jo(Po)],function(k,C){var G=C[0];return G.value.indexOf(k.geometryType())>=0}],"filter-id-in":[To,[Jo(uo)],function(k,C){var G=C[0];return G.value.indexOf(k.id())>=0}],"filter-in-small":[To,[Po,Jo(uo)],function(k,C){var G=C[0],oe=C[1];return oe.value.indexOf(k.properties()[G.value])>=0}],"filter-in-large":[To,[Po,Jo(uo)],function(k,C){var G=C[0],oe=C[1];return Ns(k.properties()[G.value],oe.value,0,oe.value.length-1)}],all:{type:To,overloads:[[[To,To],function(k,C){var G=C[0],oe=C[1];return G.evaluate(k)&&oe.evaluate(k)}],[el(To),function(k,C){for(var G=0,oe=C;G-1}function Un(k){return!!k.expression&&k.expression.interpolated}function Ro(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 Fs(k){return k}function cu(k,C){var G=C.type==="color",oe=k.stops&&typeof k.stops[0][0]=="object",be=oe||k.property!==void 0,Ie=oe||!be,Ne=k.type||(Un(C)?"exponential":"interval");if(G&&(k=bs({},k),k.stops&&(k.stops=k.stops.map(function(Nn){return[Nn[0],Bs.parse(Nn[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(Ie){return Ie[0]}),G);return k.stops[be][1]}function bu(k,C,G){var oe=k.base!==void 0?k.base:1;if(Ro(G)!=="number")return Iu(k.default,C.default);var be=k.stops.length;if(be===1||G<=k.stops[0][0])return k.stops[0][1];if(G>=k.stops[be-1][0])return k.stops[be-1][1];var Ie=yu(k.stops.map(function(Lr){return Lr[0]}),G),Ne=Au(G,oe,k.stops[Ie][0],k.stops[Ie+1][0]),ft=k.stops[Ie][1],It=k.stops[Ie+1][1],Ht=Bu[C.type]||Fs;if(k.colorSpace&&k.colorSpace!=="rgb"){var er=Lf[k.colorSpace];Ht=function(Lr,Yr){return er.reverse(er.interpolate(er.forward(Lr),er.forward(Yr),Ne))}}return typeof ft.evaluate=="function"?{evaluate:function(){for(var Yr=[],Vr=arguments.length;Vr--;)Yr[Vr]=arguments[Vr];var ua=ft.evaluate.apply(void 0,Yr),Oa=It.evaluate.apply(void 0,Yr);if(!(ua===void 0||Oa===void 0))return Ht(ua,Oa,Ne)}}:Ht(ft,It,Ne)}function Rc(k,C,G){return C.type==="color"?G=Bs.parse(G):C.type==="formatted"?G=uu.fromString(G.toString()):C.type==="resolvedImage"?G=Pl.fromString(G.toString()):Ro(G)!==C.type&&(C.type!=="enum"||!C.values[G])&&(G=void 0),Iu(G,k.default,C.default)}function Au(k,C,G,oe){var be=oe-G,Ie=k-G;return be===0?0:C===1?Ie/be:(Math.pow(C,Ie)-1)/(Math.pow(C,be)-1)}var yc=function(C,G){this.expression=C,this._warningHistory={},this._evaluator=new Ps,this._defaultValue=G?Me(G):null,this._enumValues=G&&G.type==="enum"?G.values:null};yc.prototype.evaluateWithoutErrorHandling=function(C,G,oe,be,Ie,Ne){return this._evaluator.globals=C,this._evaluator.feature=G,this._evaluator.featureState=oe,this._evaluator.canonical=be,this._evaluator.availableImages=Ie||null,this._evaluator.formattedSection=Ne,this.expression.evaluate(this._evaluator)},yc.prototype.evaluate=function(C,G,oe,be,Ie,Ne){this._evaluator.globals=C,this._evaluator.feature=G||null,this._evaluator.featureState=oe||null,this._evaluator.canonical=be,this._evaluator.availableImages=Ie||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 Xs("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 yo}function Fo(k,C){var G=new ol(yo,[],C?Te(C):void 0),oe=G.parse(k,void 0,void 0,void 0,C&&C.type==="string"?{typeAnnotation:"coerce"}:void 0);return oe?Ss(new yc(oe,C)):Fl(G.errors)}var Dc=function(C,G){this.kind=C,this._styleExpression=G,this.isStateDependent=C!=="constant"&&!ml(G.expression)};Dc.prototype.evaluateWithoutErrorHandling=function(C,G,oe,be,Ie,Ne){return this._styleExpression.evaluateWithoutErrorHandling(C,G,oe,be,Ie,Ne)},Dc.prototype.evaluate=function(C,G,oe,be,Ie,Ne){return this._styleExpression.evaluate(C,G,oe,be,Ie,Ne)};var lc=function(C,G,oe,be){this.kind=C,this.zoomStops=oe,this._styleExpression=G,this.isStateDependent=C!=="camera"&&!ml(G.expression),this.interpolationType=be};lc.prototype.evaluateWithoutErrorHandling=function(C,G,oe,be,Ie,Ne){return this._styleExpression.evaluateWithoutErrorHandling(C,G,oe,be,Ie,Ne)},lc.prototype.evaluate=function(C,G,oe,be,Ie,Ne){return this._styleExpression.evaluate(C,G,oe,be,Ie,Ne)},lc.prototype.interpolationFactor=function(C,G,oe){return this.interpolationType?nu.interpolationFactor(this.interpolationType,C,G,oe):0};function Yu(k,C){if(k=Fo(k,C),k.result==="error")return k;var G=k.value.expression,oe=jf(G);if(!oe&&!yl(C))return Fl([new ws("","data expressions not supported")]);var be=Lu(G,["zoom"]);if(!be&&!ll(C))return Fl([new ws("","zoom expressions not supported")]);var Ie=ie(G);if(!Ie&&!be)return Fl([new ws("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(Ie instanceof ws)return Fl([Ie]);if(Ie instanceof nu&&!Un(C))return Fl([new ws("",'"interpolate" expressions cannot be used with this property')]);if(!Ie)return Ss(oe?new Dc("constant",k.value):new Dc("source",k.value));var Ne=Ie instanceof nu?Ie.interpolation:void 0;return Ss(oe?new lc("camera",k.value,Ie.labels,Ne):new lc("composite",k.value,Ie.labels,Ne))}var Oe=function(C,G){this._parameters=C,this._specification=G,bs(this,cu(this._parameters,this._specification))};Oe.deserialize=function(C){return new Oe(C._parameters,C._specification)},Oe.serialize=function(C){return{_parameters:C._parameters,_specification:C._specification}};function I(k,C){if(Js(k))return new Oe(k,C);if(fo(k)){var G=Yu(k,C);if(G.result==="error")throw new Error(G.value.map(function(be){return be.key+": "+be.message}).join(", "));return G.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 G=0,oe=k.args;Goe.maximum?[new Pn(C,G,G+" is greater than the maximum value "+oe.maximum)]:[]}function Ot(k){var C=k.valueSpec,G=lo(k.value.type),oe,be={},Ie,Ne,ft=G!=="categorical"&&k.value.property===void 0,It=!ft,Ht=Ro(k.value.stops)==="array"&&Ro(k.value.stops[0])==="array"&&Ro(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 G==="identity"&&ft&&er.push(new Pn(k.key,k.value,'missing required property "property"')),G!=="identity"&&!k.value.stops&&er.push(new Pn(k.key,k.value,'missing required property "stops"')),G==="exponential"&&k.valueSpec.expression&&!Un(k.valueSpec)&&er.push(new Pn(k.key,k.value,"exponential functions not supported")),k.styleSpec.$version>=8&&(It&&!yl(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"))),(G==="categorical"||Ht)&&k.value.property===void 0&&er.push(new Pn(k.key,k.value,'"property" property is required')),er;function Lr(Oa){if(G==="identity")return[new Pn(Oa.key,Oa.value,'identity function may not have a "stops" property')];var Mi=[],ni=Oa.value;return Mi=Mi.concat(ht({key:Oa.key,value:ni,valueSpec:Oa.valueSpec,style:Oa.style,styleSpec:Oa.styleSpec,arrayElementValidator:Yr})),Ro(ni)==="array"&&ni.length===0&&Mi.push(new Pn(Oa.key,ni,"array must have at least one stop")),Mi}function Yr(Oa){var Mi=[],ni=Oa.value,$i=Oa.key;if(Ro(ni)!=="array")return[new Pn($i,ni,"array expected, "+Ro(ni)+" found")];if(ni.length!==2)return[new Pn($i,ni,"array length 2 expected, length "+ni.length+" found")];if(Ht){if(Ro(ni[0])!=="object")return[new Pn($i,ni,"object expected, "+Ro(ni[0])+" found")];if(ni[0].zoom===void 0)return[new Pn($i,ni,"object stop key must have zoom")];if(ni[0].value===void 0)return[new Pn($i,ni,"object stop key must have value")];if(Ne&&Ne>lo(ni[0].zoom))return[new Pn($i,ni[0].zoom,"stop zoom values must appear in ascending order")];lo(ni[0].zoom)!==Ne&&(Ne=lo(ni[0].zoom),Ie=void 0,be={}),Mi=Mi.concat(ze({key:$i+"[0]",value:ni[0],valueSpec:{zoom:{}},style:Oa.style,styleSpec:Oa.styleSpec,objectElementValidators:{zoom:wt,value:Vr}}))}else Mi=Mi.concat(Vr({key:$i+"[0]",value:ni[0],valueSpec:{},style:Oa.style,styleSpec:Oa.styleSpec},ni));return fo(Zo(ni[1]))?Mi.concat([new Pn($i+"[1]",ni[1],"expressions are not allowed in function stops.")]):Mi.concat(Mo({key:$i+"[1]",value:ni[1],valueSpec:C,style:Oa.style,styleSpec:Oa.styleSpec}))}function Vr(Oa,Mi){var ni=Ro(Oa.value),$i=lo(Oa.value),Oi=Oa.value!==null?Oa.value:Mi;if(!oe)oe=ni;else if(ni!==oe)return[new Pn(Oa.key,Oi,ni+" stop domain type must match previous stop domain type "+oe)];if(ni!=="number"&&ni!=="string"&&ni!=="boolean")return[new Pn(Oa.key,Oi,"stop domain value must be a number, string, or boolean")];if(ni!=="number"&&G!=="categorical"){var Ji="number expected, "+ni+" found";return yl(C)&&G===void 0&&(Ji+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Pn(Oa.key,Oi,Ji)]}return G==="categorical"&&ni==="number"&&(!isFinite($i)||Math.floor($i)!==$i)?[new Pn(Oa.key,Oi,"integer expected, found "+$i)]:G!=="categorical"&&ni==="number"&&Ie!==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,G=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"?Dt(k.slice(1)):C==="all"?["all"].concat(k.slice(1).map(Et)):C==="none"?["all"].concat(k.slice(1).map(Et).map(Er)):C==="in"?ur(k[1],k.slice(2)):C==="!in"?Er(ur(k[1],k.slice(2))):C==="has"?yr(k[1]):C==="!has"?Er(yr(k[1])):C==="within"?k:!0;return G}function bt(k,C,G){switch(k){case"$type":return["filter-type-"+G,C];case"$id":return["filter-id-"+G,C];default:return["filter-"+G,k,C]}}function Dt(k){return["any"].concat(k.map(Et))}function ur(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(G){return typeof G!=typeof C[0]})?["filter-in-large",k,["literal",C.sort(lt)]]:["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 Er(k){return["!",k]}function jr(k){return na(Zo(k.value))?$t(bs({},k,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Qr(k)}function Qr(k){var C=k.value,G=k.key;if(Ro(C)!=="array")return[new Pn(G,C,"array expected, "+Ro(C)+" found")];var oe=k.styleSpec,be,Ie=[];if(C.length<1)return[new Pn(G,C,"filter array must have at least 1 element")];switch(Ie=Ie.concat(Kr({key:G+"[0]",value:C[0],valueSpec:oe.filter_operator,style:k.style,styleSpec:k.styleSpec})),lo(C[0])){case"<":case"<=":case">":case">=":C.length>=2&&lo(C[1])==="$type"&&Ie.push(new Pn(G,C,'"$type" cannot be use with operator "'+C[0]+'"'));case"==":case"!=":C.length!==3&&Ie.push(new Pn(G,C,'filter array for operator "'+C[0]+'" must have 3 elements'));case"in":case"!in":C.length>=2&&(be=Ro(C[1]),be!=="string"&&Ie.push(new Pn(G+"[1]",C[1],"string expected, "+be+" found")));for(var Ne=2;Ne=er[Vr+0]&&oe>=er[Vr+1])?(Ne[Yr]=!0,Ie.push(Ht[Yr])):Ne[Yr]=!1}}},fu.prototype._forEachCell=function(k,C,G,oe,be,Ie,Ne,ft){for(var It=this._convertToCellCoord(k),Ht=this._convertToCellCoord(C),er=this._convertToCellCoord(G),Lr=this._convertToCellCoord(oe),Yr=It;Yr<=er;Yr++)for(var Vr=Ht;Vr<=Lr;Vr++){var ua=this.d*Vr+Yr;if(!(ft&&!ft(this._convertFromCellCoord(Yr),this._convertFromCellCoord(Vr),this._convertFromCellCoord(Yr+1),this._convertFromCellCoord(Vr+1)))&&be.call(this,k,C,G,oe,ua,Ie,Ne,ft))return}},fu.prototype._convertFromCellCoord=function(k){return(k-this.padding)/this.scale},fu.prototype._convertToCellCoord=function(k){return Math.max(0,Math.min(this.d-1,Math.floor(k*this.scale)+this.padding))},fu.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var k=this.cells,C=wl+this.cells.length+1+1,G=0,oe=0;oe=0)){var Lr=k[er];Ht[er]=Hl[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",G=Hl[C],oe=G.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),Ie=0,Ne=Object.keys(k);Ie=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,G){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=G):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,G=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,G=k;C-1&&(an=La.error),sn&&sn(k)};function Jn(){ro.fire(new Or("pluginStateChange",{pluginStatus:an,pluginURL:dn}))}var ro=new wr,$o=function(){return an},no=function(k){return k({pluginStatus:an,pluginURL:dn}),ro.on("pluginStateChange",k),k},Xo=function(k,C,G){if(G===void 0&&(G=!1),an===La.deferred||an===La.loading||an===La.loaded)throw new Error("setRTLTextPlugin cannot be called multiple times.");dn=we.resolveURL(k),an=La.deferred,sn=C,Jn(),G||cl()},cl=function(){if(an!==La.deferred||!dn)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");an=La.loading,Jn(),dn&&ra({url:dn},function(k){k?In(k):(an=La.loaded,Jn())})},al={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return an===La.loaded||al.applyArabicShaping!=null},isLoading:function(){return an===La.loading},setState:function(C){an=C.pluginStatus,dn=C.pluginURL},isParsed:function(){return al.applyArabicShaping!=null&&al.processBidirectionalText!=null&&al.processStyledBidirectionalText!=null},getPluginURL:function(){return dn}},_l=function(){!al.isLoading()&&!al.isLoaded()&&$o()==="deferred"&&cl()},mn=function(C,G){this.zoom=C,G?(this.now=G.now,this.fadeDuration=G.fadeDuration,this.zoomHistory=G.zoomHistory,this.transition=G.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new tr,this.transition={})};mn.prototype.isSupportedScript=function(C){return oi(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,G=C-Math.floor(C),oe=this.crossFadingFactor();return C>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:G+(1-G)*oe}:{fromScale:.5,toScale:1,t:1-(1-oe)*G}};var po=function(C,G){this.property=C,this.value=G,this.expression=I(G===void 0?C.specification.default:G,C.specification)};po.prototype.isDataDriven=function(){return this.expression.kind==="source"||this.expression.kind==="composite"},po.prototype.possiblyEvaluate=function(C,G,oe){return this.property.possiblyEvaluate(this,C,G,oe)};var fs=function(C){this.property=C,this.value=new po(C,void 0)};fs.prototype.transitioned=function(C,G){return new Tl(this.property,this.value,G,p({},C.transition,this.transition),C.now)},fs.prototype.untransitioned=function(){return new Tl(this.property,this.value,null,{},0)};var ms=function(C){this._properties=C,this._values=Object.create(C.defaultTransitionablePropertyValues)};ms.prototype.getValue=function(C){return O(this._values[C].value.value)},ms.prototype.setValue=function(C,G){this._values.hasOwnProperty(C)||(this._values[C]=new fs(this._values[C].property)),this._values[C].value=new po(this._values[C].property,G===null?void 0:O(G))},ms.prototype.getTransition=function(C){return O(this._values[C].transition)},ms.prototype.setTransition=function(C,G){this._values.hasOwnProperty(C)||(this._values[C]=new fs(this._values[C].property)),this._values[C].transition=O(G)||void 0},ms.prototype.serialize=function(){for(var C={},G=0,oe=Object.keys(this._values);Gthis.end)return this.prior=null,Ie;if(this.value.isDataDriven())return this.prior=null,Ie;if(beNe.zoomHistory.lastIntegerZoom?{from:oe,to:be}:{from:Ie,to:be}},C.prototype.interpolate=function(oe){return oe},C}(Xt),oa=function(C){this.specification=C};oa.prototype.possiblyEvaluate=function(C,G,oe,be){if(C.value!==void 0)if(C.expression.kind==="constant"){var Ie=C.expression.evaluate(G,null,{},oe,be);return this._calculate(Ie,Ie,Ie,G)}else return this._calculate(C.expression.evaluate(new mn(Math.floor(G.zoom-1),G)),C.expression.evaluate(new mn(Math.floor(G.zoom),G)),C.expression.evaluate(new mn(Math.floor(G.zoom+1),G)),G)},oa.prototype._calculate=function(C,G,oe,be){var Ie=be.zoom;return Ie>be.zoomHistory.lastIntegerZoom?{from:C,to:G}:{from:oe,to:G}},oa.prototype.interpolate=function(C){return C};var Ta=function(C){this.specification=C};Ta.prototype.possiblyEvaluate=function(C,G,oe,be){return!!C.expression.evaluate(G,null,{},oe,be)},Ta.prototype.interpolate=function(){return!1};var ma=function(C){this.properties=C,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(var G in C){var oe=C[G];oe.specification.overridable&&this.overridableProperties.push(G);var be=this.defaultPropertyValues[G]=new po(oe,void 0),Ie=this.defaultTransitionablePropertyValues[G]=new fs(oe);this.defaultTransitioningPropertyValues[G]=Ie.untransitioned(),this.defaultPossiblyEvaluatedValues[G]=be.possiblyEvaluate({})}};me("DataDrivenProperty",Xt),me("DataConstantProperty",it),me("CrossFadedDataDrivenProperty",fr),me("CrossFadedProperty",oa),me("ColorRampProperty",Ta);var xa="-transition",Ya=function(k){function C(G,oe){if(k.call(this),this.id=G.id,this.type=G.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},G.type!=="custom"&&(G=G,this.metadata=G.metadata,this.minzoom=G.minzoom,this.maxzoom=G.maxzoom,G.type!=="background"&&(this.source=G.source,this.sourceLayer=G["source-layer"],this.filter=G.filter),oe.layout&&(this._unevaluatedLayout=new Su(oe.layout)),oe.paint)){this._transitionablePaint=new ms(oe.paint);for(var be in G.paint)this.setPaintProperty(be,G.paint[be],{validate:!1});for(var Ie in G.layout)this.setLayoutProperty(Ie,G.layout[Ie],{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,Ie){if(Ie===void 0&&(Ie={}),be!=null){var Ne="layers."+this.id+".layout."+oe;if(this._validate(tu,Ne,oe,be,Ie))return}if(oe==="visibility"){this.visibility=be;return}this._unevaluatedLayout.setValue(oe,be)},C.prototype.getPaintProperty=function(oe){return z(oe,xa)?this._transitionablePaint.getTransition(oe.slice(0,-xa.length)):this._transitionablePaint.getValue(oe)},C.prototype.setPaintProperty=function(oe,be,Ie){if(Ie===void 0&&(Ie={}),be!=null){var Ne="layers."+this.id+".paint."+oe;if(this._validate(Il,Ne,oe,be,Ie))return!1}if(z(oe,xa))return this._transitionablePaint.setTransition(oe.slice(0,-xa.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,Yr=Lr.isDataDriven();return Yr||Ht||It||this._handleOverridablePaintPropertyUpdate(oe,er,Lr)},C.prototype._handleSpecialPaintPropertyUpdate=function(oe){},C.prototype._handleOverridablePaintPropertyUpdate=function(oe,be,Ie){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,Ie){return be!==void 0&&!(Ie==="layout"&&!Object.keys(be).length)&&!(Ie==="paint"&&!Object.keys(be).length)})},C.prototype._validate=function(oe,be,Ie,Ne,ft){return ft===void 0&&(ft={}),ft&&ft.validate===!1?!1:Ru(this,oe.call(es,{key:be,layerType:this.type,objectKey:Ie,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)||!yl(be.property.specification))&&(be.value.kind==="source"||be.value.kind==="composite")&&be.value.isStateDependent)return!0}return!1},C}(wr),bi={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},yi=function(C,G){this._structArray=C,this._pos1=G*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,G){return C._trim(),G&&(C.isTransferred=!0,G.push(C.arrayBuffer)),{length:C.length,arrayBuffer:C.arrayBuffer}},zi.deserialize=function(C){var G=Object.create(this.prototype);return G.arrayBuffer=C.arrayBuffer,G.length=C.length,G.capacity=C.arrayBuffer.byteLength/G.bytesPerElement,G._refreshViews(),G},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 G=this.uint8;this._refreshViews(),G&&this.uint8.set(G)}},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 G=0,oe=0,be=k.map(function(Ne){var ft=Na(Ne.type),It=G=ea(G,Math.max(C,ft)),Ht=Ne.components||1;return oe=Math.max(oe,ft),G+=ft*Ht,{name:Ne.name,type:Ne.type,components:Ht,offset:It}}),Ie=ea(G,Math.max(oe,C));return{members:be,size:Ie,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 Ie=this.length;return this.resize(Ie+1),this.emplace(Ie,oe,be)},C.prototype.emplace=function(oe,be,Ie){var Ne=oe*2;return this.int16[Ne+0]=be,this.int16[Ne+1]=Ie,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,Ie,Ne){var ft=this.length;return this.resize(ft+1),this.emplace(ft,oe,be,Ie,Ne)},C.prototype.emplace=function(oe,be,Ie,Ne,ft){var It=oe*4;return this.int16[It+0]=be,this.int16[It+1]=Ie,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,Ie,Ne,ft,It){var Ht=this.length;return this.resize(Ht+1),this.emplace(Ht,oe,be,Ie,Ne,ft,It)},C.prototype.emplace=function(oe,be,Ie,Ne,ft,It,Ht){var er=oe*6;return this.int16[er+0]=be,this.int16[er+1]=Ie,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,Ie,Ne,ft,It){var Ht=this.length;return this.resize(Ht+1),this.emplace(Ht,oe,be,Ie,Ne,ft,It)},C.prototype.emplace=function(oe,be,Ie,Ne,ft,It,Ht){var er=oe*4,Lr=oe*8;return this.int16[er+0]=be,this.int16[er+1]=Ie,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 Ie=this.length;return this.resize(Ie+1),this.emplace(Ie,oe,be)},C.prototype.emplace=function(oe,be,Ie){var Ne=oe*2;return this.float32[Ne+0]=be,this.float32[Ne+1]=Ie,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,Ie,Ne,ft,It,Ht,er,Lr,Yr){var Vr=this.length;return this.resize(Vr+1),this.emplace(Vr,oe,be,Ie,Ne,ft,It,Ht,er,Lr,Yr)},C.prototype.emplace=function(oe,be,Ie,Ne,ft,It,Ht,er,Lr,Yr,Vr){var ua=oe*10;return this.uint16[ua+0]=be,this.uint16[ua+1]=Ie,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]=Yr,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,Ie,Ne,ft,It,Ht,er,Lr,Yr,Vr,ua){var Oa=this.length;return this.resize(Oa+1),this.emplace(Oa,oe,be,Ie,Ne,ft,It,Ht,er,Lr,Yr,Vr,ua)},C.prototype.emplace=function(oe,be,Ie,Ne,ft,It,Ht,er,Lr,Yr,Vr,ua,Oa){var Mi=oe*12;return this.int16[Mi+0]=be,this.int16[Mi+1]=Ie,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]=Yr,this.int16[Mi+9]=Vr,this.int16[Mi+10]=ua,this.int16[Mi+11]=Oa,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,Ie){var Ne=this.length;return this.resize(Ne+1),this.emplace(Ne,oe,be,Ie)},C.prototype.emplace=function(oe,be,Ie,Ne){var ft=oe*3;return this.float32[ft+0]=be,this.float32[ft+1]=Ie,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 Ie=oe*1;return this.uint32[Ie+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,Ie,Ne,ft,It,Ht,er,Lr){var Yr=this.length;return this.resize(Yr+1),this.emplace(Yr,oe,be,Ie,Ne,ft,It,Ht,er,Lr)},C.prototype.emplace=function(oe,be,Ie,Ne,ft,It,Ht,er,Lr,Yr){var Vr=oe*10,ua=oe*5;return this.int16[Vr+0]=be,this.int16[Vr+1]=Ie,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]=Yr,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,Ie,Ne,ft,It){var Ht=this.length;return this.resize(Ht+1),this.emplace(Ht,oe,be,Ie,Ne,ft,It)},C.prototype.emplace=function(oe,be,Ie,Ne,ft,It,Ht){var er=oe*6;return this.int16[er+0]=be,this.int16[er+1]=Ie,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,Ie,Ne,ft){var It=this.length;return this.resize(It+1),this.emplace(It,oe,be,Ie,Ne,ft)},C.prototype.emplace=function(oe,be,Ie,Ne,ft,It){var Ht=oe*4,er=oe*8;return this.float32[Ht+0]=be,this.float32[Ht+1]=Ie,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,Ie,Ne){var ft=this.length;return this.resize(ft+1),this.emplace(ft,oe,be,Ie,Ne)},C.prototype.emplace=function(oe,be,Ie,Ne,ft){var It=oe*12,Ht=oe*3;return this.uint8[It+0]=be,this.uint8[It+1]=Ie,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,Ie){var Ne=this.length;return this.resize(Ne+1),this.emplace(Ne,oe,be,Ie)},C.prototype.emplace=function(oe,be,Ie,Ne){var ft=oe*3;return this.uint16[ft+0]=be,this.uint16[ft+1]=Ie,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,Ie,Ne,ft,It,Ht,er,Lr,Yr,Vr,ua,Oa,Mi,ni,$i,Oi){var Ji=this.length;return this.resize(Ji+1),this.emplace(Ji,oe,be,Ie,Ne,ft,It,Ht,er,Lr,Yr,Vr,ua,Oa,Mi,ni,$i,Oi)},C.prototype.emplace=function(oe,be,Ie,Ne,ft,It,Ht,er,Lr,Yr,Vr,ua,Oa,Mi,ni,$i,Oi,Ji){var ln=oe*24,bn=oe*12,qn=oe*48;return this.int16[ln+0]=be,this.int16[ln+1]=Ie,this.uint16[ln+2]=Ne,this.uint16[ln+3]=ft,this.uint32[bn+2]=It,this.uint32[bn+3]=Ht,this.uint32[bn+4]=er,this.uint16[ln+10]=Lr,this.uint16[ln+11]=Yr,this.uint16[ln+12]=Vr,this.float32[bn+7]=ua,this.float32[bn+8]=Oa,this.uint8[qn+36]=Mi,this.uint8[qn+37]=ni,this.uint8[qn+38]=$i,this.uint32[bn+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,Ie,Ne,ft,It,Ht,er,Lr,Yr,Vr,ua,Oa,Mi,ni,$i,Oi,Ji,ln,bn,qn,Nn,Eo,oo,mo,Is,ko,Do){var $s=this.length;return this.resize($s+1),this.emplace($s,oe,be,Ie,Ne,ft,It,Ht,er,Lr,Yr,Vr,ua,Oa,Mi,ni,$i,Oi,Ji,ln,bn,qn,Nn,Eo,oo,mo,Is,ko,Do)},C.prototype.emplace=function(oe,be,Ie,Ne,ft,It,Ht,er,Lr,Yr,Vr,ua,Oa,Mi,ni,$i,Oi,Ji,ln,bn,qn,Nn,Eo,oo,mo,Is,ko,Do,$s){var Ms=oe*34,Zl=oe*17;return this.int16[Ms+0]=be,this.int16[Ms+1]=Ie,this.int16[Ms+2]=Ne,this.int16[Ms+3]=ft,this.int16[Ms+4]=It,this.int16[Ms+5]=Ht,this.int16[Ms+6]=er,this.int16[Ms+7]=Lr,this.uint16[Ms+8]=Yr,this.uint16[Ms+9]=Vr,this.uint16[Ms+10]=ua,this.uint16[Ms+11]=Oa,this.uint16[Ms+12]=Mi,this.uint16[Ms+13]=ni,this.uint16[Ms+14]=$i,this.uint16[Ms+15]=Oi,this.uint16[Ms+16]=Ji,this.uint16[Ms+17]=ln,this.uint16[Ms+18]=bn,this.uint16[Ms+19]=qn,this.uint16[Ms+20]=Nn,this.uint16[Ms+21]=Eo,this.uint16[Ms+22]=oo,this.uint32[Zl+12]=mo,this.float32[Zl+13]=Is,this.float32[Zl+14]=ko,this.float32[Zl+15]=Do,this.float32[Zl+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 Ie=oe*1;return this.float32[Ie+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,Ie){var Ne=this.length;return this.resize(Ne+1),this.emplace(Ne,oe,be,Ie)},C.prototype.emplace=function(oe,be,Ie,Ne){var ft=oe*3;return this.int16[ft+0]=be,this.int16[ft+1]=Ie,this.int16[ft+2]=Ne,oe},C}(zi);nn.prototype.bytesPerElement=6,me("StructArrayLayout3i6",nn);var Ln=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,Ie){var Ne=this.length;return this.resize(Ne+1),this.emplace(Ne,oe,be,Ie)},C.prototype.emplace=function(oe,be,Ie,Ne){var ft=oe*2,It=oe*4;return this.uint32[ft+0]=be,this.uint16[It+2]=Ie,this.uint16[It+3]=Ne,oe},C}(zi);Ln.prototype.bytesPerElement=8,me("StructArrayLayout1ul2ui8",Ln);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 Ie=this.length;return this.resize(Ie+1),this.emplace(Ie,oe,be)},C.prototype.emplace=function(oe,be,Ie){var Ne=oe*2;return this.uint16[Ne+0]=be,this.uint16[Ne+1]=Ie,oe},C}(zi);Dn.prototype.bytesPerElement=4,me("StructArrayLayout2ui4",Dn);var Wn=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 Ie=oe*1;return this.uint16[Ie+0]=be,oe},C}(zi);Wn.prototype.bytesPerElement=2,me("StructArrayLayout1ui2",Wn);var Os=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,Ie,Ne){var ft=this.length;return this.resize(ft+1),this.emplace(ft,oe,be,Ie,Ne)},C.prototype.emplace=function(oe,be,Ie,Ne,ft){var It=oe*4;return this.float32[It+0]=be,this.float32[It+1]=Ie,this.float32[It+2]=Ne,this.float32[It+3]=ft,oe},C}(zi);Os.prototype.bytesPerElement=16,me("StructArrayLayout4f16",Os);var xl=function(k){function C(){k.apply(this,arguments)}k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C;var G={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 G.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},G.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},G.x1.get=function(){return this._structArray.int16[this._pos2+2]},G.y1.get=function(){return this._structArray.int16[this._pos2+3]},G.x2.get=function(){return this._structArray.int16[this._pos2+4]},G.y2.get=function(){return this._structArray.int16[this._pos2+5]},G.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},G.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},G.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},G.anchorPoint.get=function(){return new i(this.anchorPointX,this.anchorPointY)},Object.defineProperties(C.prototype,G),C}(yi);xl.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 xl(this,oe)},C}(Yi);me("CollisionBoxArray",ho);var Xl=function(k){function C(){k.apply(this,arguments)}k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C;var G={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 G.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},G.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},G.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},G.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},G.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},G.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},G.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},G.segment.get=function(){return this._structArray.uint16[this._pos2+10]},G.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},G.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},G.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},G.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},G.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},G.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},G.placedOrientation.set=function(oe){this._structArray.uint8[this._pos1+37]=oe},G.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},G.hidden.set=function(oe){this._structArray.uint8[this._pos1+38]=oe},G.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},G.crossTileID.set=function(oe){this._structArray.uint32[this._pos4+10]=oe},G.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(C.prototype,G),C}(yi);Xl.prototype.size=48;var hs=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 Xl(this,oe)},C}(vn);me("PlacedSymbolArray",hs);var Al=function(k){function C(){k.apply(this,arguments)}k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C;var G={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 G.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},G.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},G.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},G.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},G.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},G.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},G.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},G.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},G.key.get=function(){return this._structArray.uint16[this._pos2+8]},G.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},G.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},G.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},G.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},G.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},G.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},G.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},G.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},G.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},G.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},G.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},G.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},G.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},G.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},G.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},G.crossTileID.set=function(oe){this._structArray.uint32[this._pos4+12]=oe},G.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},G.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},G.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},G.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(C.prototype,G),C}(yi);Al.prototype.size=68;var El=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 Al(this,oe)},C}(Rn);me("SymbolInstanceArray",El);var ru=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",ru);var js=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",js);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 G={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return G.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},G.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},G.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(C.prototype,G),C}(yi);pl.prototype.size=8;var bl=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}(Ln);me("FeatureIndexArray",bl);var Xn=Ei([{name:"a_pos",components:2,type:"Int16"}],4),kl=Xn.members,Io=function(C){C===void 0&&(C=[]),this.segments=C};Io.prototype.prepareSegment=function(C,G,oe,be){var Ie=this.segments[this.segments.length-1];return C>Io.MAX_VERTEX_ARRAY_LENGTH&&B("Max vertices per segment is "+Io.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+C),(!Ie||Ie.vertexLength+C>Io.MAX_VERTEX_ARRAY_LENGTH||Ie.sortKey!==be)&&(Ie={vertexOffset:G.length,primitiveOffset:oe.length,vertexLength:0,primitiveLength:0},be!==void 0&&(Ie.sortKey=be),this.segments.push(Ie)),Ie},Io.prototype.get=function(){return this.segments},Io.prototype.destroy=function(){for(var C=0,G=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^=(G.charCodeAt(Lr+2)&255)<<16;case 2:er^=(G.charCodeAt(Lr+1)&255)<<8;case 1:er^=G.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^=G.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}),re=t(function(k){function C(G,oe){for(var be=G.length,Ie=oe^be,Ne=0,ft;be>=4;)ft=G.charCodeAt(Ne)&255|(G.charCodeAt(++Ne)&255)<<8|(G.charCodeAt(++Ne)&255)<<16|(G.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),Ie=(Ie&65535)*1540483477+(((Ie>>>16)*1540483477&65535)<<16)^ft,be-=4,++Ne;switch(be){case 3:Ie^=(G.charCodeAt(Ne+2)&255)<<16;case 2:Ie^=(G.charCodeAt(Ne+1)&255)<<8;case 1:Ie^=G.charCodeAt(Ne)&255,Ie=(Ie&65535)*1540483477+(((Ie>>>16)*1540483477&65535)<<16)}return Ie^=Ie>>>13,Ie=(Ie&65535)*1540483477+(((Ie>>>16)*1540483477&65535)<<16),Ie^=Ie>>>15,Ie>>>0}k.exports=C}),ye=xe,Ue=xe,ke=re;ye.murmur3=Ue,ye.murmur2=ke;var Qe=function(){this.ids=[],this.positions=[],this.indexed=!1};Qe.prototype.add=function(C,G,oe,be){this.ids.push(qt(C)),this.positions.push(G,oe,be)},Qe.prototype.getPositions=function(C){for(var G=qt(C),oe=0,be=this.ids.length-1;oe>1;this.ids[Ie]>=G?be=Ie:oe=Ie+1}for(var Ne=[];this.ids[oe]===G;){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,G){var oe=new Float64Array(C.ids),be=new Uint32Array(C.positions);return br(oe,be,0,oe.length-1),G&&G.push(oe.buffer,be.buffer),{ids:oe,positions:be}},Qe.deserialize=function(C){var G=new Qe;return G.ids=C.ids,G.positions=C.positions,G.indexed=!0,G};var vt=Math.pow(2,53)-1;function qt(k){var C=+k;return!isNaN(C)&&C<=vt?C:ye(String(k))}function br(k,C,G,oe){for(;G>1],Ie=G-1,Ne=oe+1;;){do Ie++;while(k[Ie]be);if(Ie>=Ne)break;Br(k,Ie,Ne),Br(C,3*Ie,3*Ne),Br(C,3*Ie+1,3*Ne+1),Br(C,3*Ie+2,3*Ne+2)}Ne-GNe.x+1||ItNe.y+1)&&B("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return G}function _o(k,C){return{type:k.type,id:k.id,properties:k.properties,geometry:C?fn(k):[]}}function Uo(k,C,G,oe,be){k.emplaceBack(C*2+(oe+1)/2,G*2+(be+1)/2)}var Ds=function(C){this.zoom=C.zoom,this.overscaling=C.overscaling,this.layers=C.layers,this.layerIds=this.layers.map(function(G){return G.id}),this.index=C.index,this.hasPattern=!1,this.layoutVertexArray=new Ma,this.indexArray=new Xi,this.segments=new Io,this.programConfigurations=new Ga(C.layers,C.zoom),this.stateDependentLayerIds=this.layers.filter(function(G){return G.isStateDependent()}).map(function(G){return G.id})};Ds.prototype.populate=function(C,G,oe){var be=this.layers[0],Ie=[],Ne=null;be.type==="circle"&&(Ne=be.layout.get("circle-sort-key"));for(var ft=0,It=C;ft=ui||Yr<0||Yr>=ui)){var Vr=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,C.sortKey),ua=Vr.vertexLength;Uo(this.layoutVertexArray,Lr,Yr,-1,-1),Uo(this.layoutVertexArray,Lr,Yr,1,-1),Uo(this.layoutVertexArray,Lr,Yr,1,1),Uo(this.layoutVertexArray,Lr,Yr,-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",Ds,{omit:["layers"]});function Oo(k,C){for(var G=0;G=3){for(var Ie=0;Ie1){if(kp(k,C))return!0;for(var oe=0;oe1?k.distSqr(G):k.distSqr(G.sub(C)._mult(be)._add(C))}function ed(k,C){for(var G=!1,oe,be,Ie,Ne=0;NeC.y!=Ie.y>C.y&&C.x<(Ie.x-be.x)*(C.y-be.y)/(Ie.y-be.y)+be.x&&(G=!G)}return G}function Ih(k,C){for(var G=!1,oe=0,be=k.length-1;oeC.y!=Ne.y>C.y&&C.x<(Ne.x-Ie.x)*(C.y-Ie.y)/(Ne.y-Ie.y)+Ie.x&&(G=!G)}return G}function td(k,C,G,oe,be){for(var Ie=0,Ne=k;Ie=ft.x&&be>=ft.y)return!0}var It=[new i(C,G),new i(C,be),new i(oe,be),new i(oe,G)];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 Ie=W(k,C,G[0]);return Ie!==W(k,C,G[1])||Ie!==W(k,C,G[2])||Ie!==W(k,C,G[3])}function Rh(k,C,G){var oe=C.paint.get(k).value;return oe.kind==="constant"?oe.value:G.programConfigurations.get(C.id).getMaxValue(k)}function Cp(k){return Math.sqrt(k[0]*k[0]+k[1]*k[1])}function Vp(k,C,G,oe,be){if(!C[0]&&!C[1])return k;var Ie=i.convert(C)._mult(be);G==="viewport"&&Ie._rotate(-oe);for(var Ne=[],ft=0;ft0&&(Ie=1/Math.sqrt(Ie)),k[0]=C[0]*Ie,k[1]=C[1]*Ie,k[2]=C[2]*Ie,k}function UT(k,C){return k[0]*C[0]+k[1]*C[1]+k[2]*C[2]}function jT(k,C,G){var oe=C[0],be=C[1],Ie=C[2],Ne=G[0],ft=G[1],It=G[2];return k[0]=be*It-Ie*ft,k[1]=Ie*Ne-oe*It,k[2]=oe*ft-be*Ne,k}function qT(k,C,G){var oe=C[0],be=C[1],Ie=C[2];return k[0]=oe*G[0]+be*G[3]+Ie*G[6],k[1]=oe*G[1]+be*G[4]+Ie*G[7],k[2]=oe*G[2]+be*G[5]+Ie*G[8],k}var VT=lv,vk=function(){var k=sv();return function(C,G,oe,be,Ie,Ne){var ft,It;for(G||(G=3),oe||(oe=0),be?It=Math.min(be*G+oe,C.length):It=C.length,ft=oe;ftk.width||be.height>k.height||G.x>k.width-be.width||G.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*G){ft=Ht=k[0],It=er=k[1];for(var ua=G;uaHt&&(Ht=Lr),Yr>er&&(er=Yr);Vr=Math.max(Ht-ft,er-It),Vr=Vr!==0?1/Vr:0}return E0(Ie,Ne,G,ft,It,Vr),Ne}function Mg(k,C,G,oe,be){var Ie,Ne;if(be===U1(k,C,G,oe)>0)for(Ie=C;Ie=C;Ie-=oe)Ne=Ux(Ie,k[Ie],k[Ie+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 G=k,oe;do if(oe=!1,!G.steiner&&(C0(G,G.next)||cf(G.prev,G,G.next)===0)){if(I0(G),G=C=G.prev,G===G.next)break;oe=!0}else G=G.next;while(oe||G!==C);return C}function E0(k,C,G,oe,be,Ie,Ne){if(k){!Ne&&Ie&&Eg(k,oe,be,Ie);for(var ft=k,It,Ht;k.prev!==k.next;){if(It=k.prev,Ht=k.next,Ie?Ox(k,oe,be,Ie):Fx(k)){C.push(It.i/G),C.push(k.i/G),C.push(Ht.i/G),I0(k),k=Ht.next,ft=Ht.next;continue}if(k=Ht,k===ft){Ne?Ne===1?(k=k0(uv(k),C,G),E0(k,C,G,oe,be,Ie,2)):Ne===2&&yd(k,C,G,oe,be,Ie):E0(uv(k),C,G,oe,be,Ie,1);break}}}}function Fx(k){var C=k.prev,G=k,oe=k.next;if(cf(C,G,oe)>=0)return!1;for(var be=k.next.next;be!==k.prev;){if(fv(C.x,C.y,G.x,G.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,G,oe){var be=k.prev,Ie=k,Ne=k.next;if(cf(be,Ie,Ne)>=0)return!1;for(var ft=be.xIe.x?be.x>Ne.x?be.x:Ne.x:Ie.x>Ne.x?Ie.x:Ne.x,er=be.y>Ie.y?be.y>Ne.y?be.y:Ne.y:Ie.y>Ne.y?Ie.y:Ne.y,Lr=F1(ft,It,C,G,oe),Yr=F1(Ht,er,C,G,oe),Vr=k.prevZ,ua=k.nextZ;Vr&&Vr.z>=Lr&&ua&&ua.z<=Yr;){if(Vr!==k.prev&&Vr!==k.next&&fv(be.x,be.y,Ie.x,Ie.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,Ie.x,Ie.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,Ie.x,Ie.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<=Yr;){if(ua!==k.prev&&ua!==k.next&&fv(be.x,be.y,Ie.x,Ie.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,G){var oe=k;do{var be=oe.prev,Ie=oe.next.next;!C0(be,Ie)&&kg(be,oe,oe.next,Ie)&&P0(be,Ie)&&P0(Ie,be)&&(C.push(be.i/G),C.push(oe.i/G),C.push(Ie.i/G),I0(oe),I0(oe.next),oe=k=Ie),oe=oe.next}while(oe!==k);return uv(oe)}function yd(k,C,G,oe,be,Ie){var Ne=k;do{for(var ft=Ne.next.next;ft!==Ne.prev;){if(Ne.i!==ft.i&&fm(Ne,ft)){var It=B1(Ne,ft);Ne=uv(Ne,Ne.next),It=uv(It,It.next),E0(Ne,C,G,oe,be,Ie),E0(It,C,G,oe,be,Ie);return}ft=ft.next}Ne=Ne.next}while(Ne!==k)}function cv(k,C,G,oe){var be=[],Ie,Ne,ft,It,Ht;for(Ie=0,Ne=C.length;Ie=G.next.y&&G.next.y!==G.y){var ft=G.x+(be-G.y)*(G.next.x-G.x)/(G.next.y-G.y);if(ft<=oe&&ft>Ie){if(Ie=ft,ft===oe){if(be===G.y)return G;if(be===G.next.y)return G.next}Ne=G.x=G.x&&G.x>=Ht&&oe!==G.x&&fv(beNe.x||G.x===Ne.x&&$T(Ne,G)))&&(Ne=G,Lr=Yr)),G=G.next;while(G!==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,G,oe){var be=k;do be.z===null&&(be.z=F1(be.x,be.y,C,G,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,G,oe,be,Ie,Ne,ft,It,Ht=1;do{for(G=k,k=null,Ie=null,Ne=0;G;){for(Ne++,oe=G,ft=0,C=0;C0||It>0&&oe;)ft!==0&&(It===0||!oe||G.z<=oe.z)?(be=G,G=G.nextZ,ft--):(be=oe,oe=oe.nextZ,It--),Ie?Ie.nextZ=be:k=be,be.prevZ=Ie,Ie=be;G=oe}Ie.nextZ=null,Ht*=2}while(Ne>1);return k}function F1(k,C,G,oe,be){return k=32767*(k-G)*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,G=k;do(C.x=0&&(k-Ne)*(oe-ft)-(G-Ne)*(C-ft)>=0&&(G-Ne)*(Ie-ft)-(be-Ne)*(oe-ft)>=0}function fm(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,G){return(C.y-k.y)*(G.x-C.x)-(C.x-k.x)*(G.y-C.y)}function C0(k,C){return k.x===C.x&&k.y===C.y}function kg(k,C,G,oe){var be=zv(cf(k,C,G)),Ie=zv(cf(k,C,oe)),Ne=zv(cf(G,oe,k)),ft=zv(cf(G,oe,C));return!!(be!==Ie&&Ne!==ft||be===0&&L0(k,G,C)||Ie===0&&L0(k,oe,C)||Ne===0&&L0(G,k,oe)||ft===0&&L0(G,C,oe))}function L0(k,C,G){return C.x<=Math.max(k.x,G.x)&&C.x>=Math.min(k.x,G.x)&&C.y<=Math.max(k.y,G.y)&&C.y>=Math.min(k.y,G.y)}function zv(k){return k>0?1:k<0?-1:0}function Nx(k,C){var G=k;do{if(G.i!==k.i&&G.next.i!==k.i&&G.i!==C.i&&G.next.i!==C.i&&kg(G,G.next,k,C))return!0;G=G.next}while(G!==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 G=k,oe=!1,be=(k.x+C.x)/2,Ie=(k.y+C.y)/2;do G.y>Ie!=G.next.y>Ie&&G.next.y!==G.y&&be<(G.next.x-G.x)*(Ie-G.y)/(G.next.y-G.y)+G.x&&(oe=!oe),G=G.next;while(G!==k);return oe}function B1(k,C){var G=new N1(k.i,k.x,k.y),oe=new N1(C.i,C.x,C.y),be=k.next,Ie=C.prev;return k.next=C,C.prev=k,G.next=be,be.prev=G,oe.next=G,G.prev=oe,Ie.next=oe,oe.prev=Ie,oe}function Ux(k,C,G,oe){var be=new N1(k,C,G);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,G){this.i=k,this.x=C,this.y=G,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}cm.deviation=function(k,C,G,oe){var be=C&&C.length,Ie=be?C[0]*G:k.length,Ne=Math.abs(U1(k,0,Ie,G));if(be)for(var ft=0,It=C.length;ft0&&(oe+=k[be-1].length,G.holes.push(oe))}return G},Sg.default=zx;function j1(k,C,G,oe,be){Hd(k,C,G||0,oe||k.length-1,be||jx)}function Hd(k,C,G,oe,be){for(;oe>G;){if(oe-G>600){var Ie=oe-G+1,Ne=C-G+1,ft=Math.log(Ie),It=.5*Math.exp(2*ft/3),Ht=.5*Math.sqrt(ft*It*(Ie-It)/Ie)*(Ne-Ie/2<0?-1:1),er=Math.max(G,Math.floor(C-Ne*It/Ie+Ht)),Lr=Math.min(oe,Math.floor(C+(Ie-Ne)*It/Ie+Ht));Hd(k,C,er,Lr,be)}var Yr=k[C],Vr=G,ua=oe;for(hm(k,G,C),be(k[oe],Yr)>0&&hm(k,G,oe);Vr0;)ua--}be(k[G],Yr)===0?hm(k,G,ua):(ua++,hm(k,ua,oe)),ua<=C&&(G=ua+1),C<=ua&&(oe=ua-1)}}function hm(k,C,G){var oe=k[C];k[C]=k[G],k[G]=oe}function jx(k,C){return kC?1:0}function Cg(k,C){var G=k.length;if(G<=1)return[k];for(var oe=[],be,Ie,Ne=0;Ne1)for(var It=0;It>3}if(oe--,G===1||G===2)be+=k.readSVarint(),Ie+=k.readSVarint(),G===1&&(ft&&Ne.push(ft),ft=[]),ft.push(new i(be,Ie));else if(G===7)ft&&ft.push(ft[0].clone());else throw new Error("unknown command "+G)}return ft&&Ne.push(ft),Ne},Fv.prototype.bbox=function(){var k=this._pbf;k.pos=this._geometry;for(var C=k.readVarint()+k.pos,G=1,oe=0,be=0,Ie=0,Ne=1/0,ft=-1/0,It=1/0,Ht=-1/0;k.pos>3}if(oe--,G===1||G===2)be+=k.readSVarint(),Ie+=k.readSVarint(),beft&&(ft=be),IeHt&&(Ht=Ie);else if(G!==7)throw new Error("unknown command "+G)}return[Ne,It,ft,Ht]},Fv.prototype.toGeoJSON=function(k,C,G){var oe=this.extent*Math.pow(2,G),be=this.extent*k,Ie=this.extent*C,Ne=this.loadGeometry(),ft=Fv.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,G){if(k===3){var oe=new Wd(G,G.readVarint()+G.pos);oe.length&&(C[oe.name]=oe)}}var $x=Jx,pm=V1,Qx=Wd,Xd={VectorTile:$x,VectorTileFeature:pm,VectorTileLayer:Qx},eb=Xd.VectorTileFeature.types,Pg=500,dm=Math.pow(2,13);function hv(k,C,G,oe,be,Ie,Ne,ft){k.emplaceBack(C,G,Math.floor(oe*dm)*2+Ne,be*dm*2,Ie*dm*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(G){return G.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 Io,this.stateDependentLayerIds=this.layers.filter(function(G){return G.isStateDependent()}).map(function(G){return G.id})};cd.prototype.populate=function(C,G,oe){this.features=[],this.hasPattern=Lg("fill-extrusion",this.layers,G);for(var be=0,Ie=C;be=1){var Ji=Mi[$i-1];if(!aA(Oi,Ji)){Vr.vertexLength+4>Io.MAX_VERTEX_ARRAY_LENGTH&&(Vr=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var ln=Oi.sub(Ji)._perp()._unit(),bn=Ji.dist(Oi);ni+bn>32768&&(ni=0),hv(this.layoutVertexArray,Oi.x,Oi.y,ln.x,ln.y,0,0,ni),hv(this.layoutVertexArray,Oi.x,Oi.y,ln.x,ln.y,0,1,ni),ni+=bn,hv(this.layoutVertexArray,Ji.x,Ji.y,ln.x,ln.y,0,0,ni),hv(this.layoutVertexArray,Ji.x,Ji.y,ln.x,ln.y,0,1,ni);var qn=Vr.vertexLength;this.indexArray.emplaceBack(qn,qn+2,qn+1),this.indexArray.emplaceBack(qn+1,qn+2,qn+3),Vr.vertexLength+=4,Vr.primitiveLength+=2}}}}if(Vr.vertexLength+Ht>Io.MAX_VERTEX_ARRAY_LENGTH&&(Vr=this.segments.prepareSegment(Ht,this.layoutVertexArray,this.indexArray)),eb[C.type]==="Polygon"){for(var Nn=[],Eo=[],oo=Vr.vertexLength,mo=0,Is=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 vm=new ma({"fill-extrusion-opacity":new it(Gi["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Xt(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 fr(Gi["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Xt(Gi["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Xt(Gi["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new it(Gi["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])}),wh={paint:vm},pv=function(k){function C(G){k.call(this,G,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,Ie,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),Yr=this.paint.get("fill-extrusion-height").evaluate(be,Ie),Vr=this.paint.get("fill-extrusion-base").evaluate(be,Ie),ua=nA(Lr,er,It,0),Oa=W1(Ne,Vr,Yr,er),Mi=Oa[0],ni=Oa[1];return tb(Mi,ni,ua)},C}(Ya);function Ov(k,C){return k.x*C.x+k.y*C.y}function H1(k,C){if(k.length===1){for(var G=0,oe=C[G++],be;!be||oe.equals(be);)if(be=C[G++],!be)return 1/0;for(;G=2&&C[Ht-1].equals(C[Ht-2]);)Ht--;for(var er=0;er0;if(Nn&&$i>er){var oo=Vr.dist(ua);if(oo>2*Lr){var mo=Vr.sub(Vr.sub(ua)._mult(Lr/oo)._round());this.updateDistance(ua,mo),this.addCurrentVertex(mo,Mi,0,0,Yr),ua=mo}}var Is=ua&&Oa,ko=Is?oe:It?"butt":be;if(Is&&ko==="round"&&(bnIe&&(ko="bevel"),ko==="bevel"&&(bn>2&&(ko="flipbevel"),bn100)Oi=ni.mult(-1);else{var Do=bn*Mi.add(ni).mag()/Mi.sub(ni).mag();Oi._perp()._mult(Do*(Eo?-1:1))}this.addCurrentVertex(Vr,Oi,0,0,Yr),this.addCurrentVertex(Vr,Oi.mult(-1),0,0,Yr)}else if(ko==="bevel"||ko==="fakeround"){var $s=-Math.sqrt(bn*bn-1),Ms=Eo?$s:0,Zl=Eo?0:$s;if(ua&&this.addCurrentVertex(Vr,Mi,Ms,Zl,Yr),ko==="fakeround")for(var zu=Math.round(qn*180/Math.PI/Z1),Yl=1;Yl2*Lr){var Zf=Vr.add(Oa.sub(Vr)._mult(Lr/gh)._round());this.updateDistance(Vr,Zf),this.addCurrentVertex(Zf,ni,0,0,Yr),Vr=Zf}}}}},Hf.prototype.addCurrentVertex=function(C,G,oe,be,Ie,Ne){Ne===void 0&&(Ne=!1);var ft=G.x+G.y*oe,It=G.y-G.x*oe,Ht=-G.x+G.y*be,er=-G.y-G.x*be;this.addHalfVertex(C,ft,It,Ne,!1,oe,Ie),this.addHalfVertex(C,Ht,er,Ne,!0,-be,Ie),this.distance>O0/2&&this.totalDistance===0&&(this.distance=0,this.addCurrentVertex(C,G,oe,be,Ie,Ne))},Hf.prototype.addHalfVertex=function(C,G,oe,be,Ie,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)+(Ie?1:0),Math.round(Ig*G)+128,Math.round(Ig*oe)+128,(Ne===0?0:Ne<0?-1:1)+1|(Lr&63)<<2,Lr>>6),this.lineClips){var Yr=this.scaledDistance-this.lineClips.start,Vr=this.lineClips.end-this.lineClips.start,ua=Yr/Vr;this.layoutVertexArray2.emplaceBack(ua,this.lineClipsArray.length)}var Oa=ft.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,Oa),ft.primitiveLength++),Ie?this.e2=Oa:this.e1=Oa},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,G){this.distance+=C.dist(G),this.updateScaledDistance()},me("LineBucket",Hf,{omit:["layers","patternFeatures"]});var Y1=new ma({"line-cap":new it(Gi.layout_line["line-cap"]),"line-join":new Xt(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 Xt(Gi.layout_line["line-sort-key"])}),K1=new ma({"line-opacity":new Xt(Gi.paint_line["line-opacity"]),"line-color":new Xt(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 Xt(Gi.paint_line["line-width"]),"line-gap-width":new Xt(Gi.paint_line["line-gap-width"]),"line-offset":new Xt(Gi.paint_line["line-offset"]),"line-blur":new Xt(Gi.paint_line["line-blur"]),"line-dasharray":new oa(Gi.paint_line["line-dasharray"]),"line-pattern":new fr(Gi.paint_line["line-pattern"]),"line-gradient":new Ta(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,Ie,Ne){return be=p({},be,{zoom:Math.floor(be.zoom)}),k.prototype.evaluate.call(this,oe,be,Ie,Ne)},C}(Xt),H=new sA(Dg.paint.properties["line-width"].specification);H.useIntegerZoom=!0;var R=function(k){function C(G){k.call(this,G,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"]=H.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,Ie=J(Rh("line-width",this,be),Rh("line-gap-width",this,be)),Ne=Rh("line-offset",this,be);return Ie/2+Math.abs(Ne)+Cp(this.paint.get("line-translate"))},C.prototype.queryIntersectsFeature=function(oe,be,Ie,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,Ie),this.paint.get("line-gap-width").evaluate(be,Ie)),Yr=this.paint.get("line-offset").evaluate(be,Ie);return Yr&&(Ne=ve(Ne,Yr*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 G=[],oe=new i(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="",G=0;G>1,er=-7,Lr=G?be-1:0,Yr=G?-1:1,Vr=k[C+Lr];for(Lr+=Yr,Ie=Vr&(1<<-er)-1,Vr>>=-er,er+=ft;er>0;Ie=Ie*256+k[C+Lr],Lr+=Yr,er-=8);for(Ne=Ie&(1<<-er)-1,Ie>>=-er,er+=oe;er>0;Ne=Ne*256+k[C+Lr],Lr+=Yr,er-=8);if(Ie===0)Ie=1-Ht;else{if(Ie===It)return Ne?NaN:(Vr?-1:1)*(1/0);Ne=Ne+Math.pow(2,oe),Ie=Ie-Ht}return(Vr?-1:1)*Ne*Math.pow(2,Ie-oe)},Lo=function(k,C,G,oe,be,Ie){var Ne,ft,It,Ht=Ie*8-be-1,er=(1<>1,Yr=be===23?Math.pow(2,-24)-Math.pow(2,-77):0,Vr=oe?0:Ie-1,ua=oe?1:-1,Oa=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+=Yr/It:C+=Yr*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[G+Vr]=ft&255,Vr+=ua,ft/=256,be-=8);for(Ne=Ne<0;k[G+Vr]=Ne&255,Vr+=ua,Ne/=256,Ht-=8);k[G+Vr-ua]|=Oa*128},xs={read:jn,write:Lo},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 is=65536*65536,qo=1/is,Bo=12,xn=typeof TextDecoder>"u"?null:new TextDecoder("utf8");zn.prototype={destroy:function(){this.buf=null},readFields:function(k,C,G){for(G=G||this.length;this.pos>3,Ie=this.pos;this.type=oe&7,k(be,C,this),this.pos===Ie&&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)*is;return this.pos+=8,k},readSFixed64:function(){var k=dh(this.buf,this.pos)+Rp(this.buf,this.pos+4)*is;return this.pos+=8,k},readFloat:function(){var k=xs.read(this.buf,this.pos,!0,23,4);return this.pos+=4,k},readDouble:function(){var k=xs.read(this.buf,this.pos,!0,52,8);return this.pos+=8,k},readVarint:function(k){var C=this.buf,G,oe;return oe=C[this.pos++],G=oe&127,oe<128||(oe=C[this.pos++],G|=(oe&127)<<7,oe<128)||(oe=C[this.pos++],G|=(oe&127)<<14,oe<128)||(oe=C[this.pos++],G|=(oe&127)<<21,oe<128)?G:(oe=C[this.pos],G|=(oe&15)<<28,cs(G,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&&xn?pu(this.buf,C,k):vp(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 G=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 G=this.pos-C;G>=128&&Hp(C,G,this),this.pos=C-1,this.writeVarint(G),this.pos+=G},writeFloat:function(k){this.realloc(4),xs.write(this.buf,k,this.pos,!0,23,4),this.pos+=4},writeDouble:function(k){this.realloc(8),xs.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 G=0;G=128&&Hp(G,oe,this),this.pos=G-1,this.writeVarint(oe),this.pos+=oe},writeMessage:function(k,C,G){this.writeTag(k,zn.Bytes),this.writeRawMessage(C,G)},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,ep,C)},writePackedFloat:function(k,C){C.length&&this.writeMessage(k,$h,C)},writePackedDouble:function(k,C){C.length&&this.writeMessage(k,Qh,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 cs(k,C,G){var oe=G.buf,be,Ie;if(Ie=oe[G.pos++],be=(Ie&112)>>4,Ie<128||(Ie=oe[G.pos++],be|=(Ie&127)<<3,Ie<128)||(Ie=oe[G.pos++],be|=(Ie&127)<<10,Ie<128)||(Ie=oe[G.pos++],be|=(Ie&127)<<17,Ie<128)||(Ie=oe[G.pos++],be|=(Ie&127)<<24,Ie<128)||(Ie=oe[G.pos++],be|=(Ie&1)<<31,Ie<128))return Rs(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 Rs(k,C,G){return G?C*4294967296+(k>>>0):(C>>>0)*4294967296+(k>>>0)}function Ku(k,C){var G,oe;if(k>=0?(G=k%4294967296|0,oe=k/4294967296|0):(G=~(-k%4294967296),oe=~(-k/4294967296),G^4294967295?G=G+1|0:(G=0,oe=oe+1|0)),k>=18446744073709552e3||k<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");C.realloc(10),Uu(G,oe,C),th(oe,C)}function Uu(k,C,G){G.buf[G.pos++]=k&127|128,k>>>=7,G.buf[G.pos++]=k&127|128,k>>>=7,G.buf[G.pos++]=k&127|128,k>>>=7,G.buf[G.pos++]=k&127|128,k>>>=7,G.buf[G.pos]=k&127}function th(k,C){var G=(k&7)<<4;C.buf[C.pos++]|=G|((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,G){var oe=C<=16383?1:C<=2097151?2:C<=268435455?3:Math.floor(Math.log(C)/(Math.LN2*7));G.realloc(oe);for(var be=G.pos-1;be>=k;be--)G.buf[be+oe]=G.buf[be]}function Th(k,C){for(var G=0;G>>8,k[G+2]=C>>>16,k[G+3]=C>>>24}function Rp(k,C){return(k[C]|k[C+1]<<8|k[C+2]<<16)+(k[C+3]<<24)}function vp(k,C,G){for(var oe="",be=C;be239?4:Ie>223?3:Ie>191?2:1;if(be+ft>G)break;var It,Ht,er;ft===1?Ie<128&&(Ne=Ie):ft===2?(It=k[be+1],(It&192)===128&&(Ne=(Ie&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=(Ie&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=(Ie&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 pu(k,C,G){return xn.decode(k.subarray(C,G))}function fc(k,C,G){for(var oe=0,be,Ie;oe55295&&be<57344)if(Ie)if(be<56320){k[G++]=239,k[G++]=191,k[G++]=189,Ie=be;continue}else be=Ie-55296<<10|be-56320|65536,Ie=null;else{be>56319||oe+1===C.length?(k[G++]=239,k[G++]=191,k[G++]=189):Ie=be;continue}else Ie&&(k[G++]=239,k[G++]=191,k[G++]=189,Ie=null);be<128?k[G++]=be:(be<2048?k[G++]=be>>6|192:(be<65536?k[G++]=be>>12|224:(k[G++]=be>>18|240,k[G++]=be>>12&63|128),k[G++]=be>>6&63|128),k[G++]=be&63|128)}return G}var Ju=3;function Dp(k,C,G){k===1&&G.readMessage(Qc,C)}function Qc(k,C,G){if(k===3){var oe=G.readMessage(mm,{}),be=oe.id,Ie=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},Ie),metrics:{width:Ne,height:ft,left:It,top:Ht,advance:er}})}}function mm(k,C,G){k===1?C.id=G.readVarint():k===2?C.bitmap=G.readBytes():k===3?C.width=G.readVarint():k===4?C.height=G.readVarint():k===5?C.left=G.readSVarint():k===6?C.top=G.readSVarint():k===7&&(C.advance=G.readVarint())}function _d(k){return new vo(k).readFields(Dp,[])}var fd=Ju;function Wp(k){for(var C=0,G=0,oe=0,be=k;oe=0;Vr--){var ua=ft[Vr];if(!(Yr.w>ua.w||Yr.h>ua.h)){if(Yr.x=ua.x,Yr.y=ua.y,Ht=Math.max(Ht,Yr.y+Yr.h),It=Math.max(It,Yr.x+Yr.w),Yr.w===ua.w&&Yr.h===ua.h){var Oa=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,G){var oe=new vh;return oe.text=this.text.substring(C,G),oe.sectionIndex=this.sectionIndex.slice(C,G),oe.sections=this.sections,oe},vh.prototype.toString=function(){return this.text},vh.prototype.getMaxScale=function(){var C=this;return this.sectionIndex.reduce(function(G,oe){return Math.max(G,C.sections[oe].scale)},0)},vh.prototype.addTextSection=function(C,G){this.text+=C.text,this.sections.push(Bv.forText(C.scale,C.fontStack||G));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 G=[],oe=k.text,be=0,Ie=0,Ne=C;Ie=0,er=0,Lr=0;Lr0&&Zf>Eo&&(Eo=Zf)}else{var Kl=G[mo.fontStack],Ol=Kl&&Kl[ko];if(Ol&&Ol.rect)Ms=Ol.rect,$s=Ol.metrics;else{var $u=C[mo.fontStack],hc=$u&&$u[ko];if(!hc)continue;$s=hc.metrics}Do=(ln-mo.scale)*en}Yl?(k.verticalizable=!0,Nn.push({glyph:ko,imageName:Zl,x:Yr,y:Vr+Do,vertical:Yl,scale:mo.scale,fontStack:mo.fontStack,sectionIndex:Is,metrics:$s,rect:Ms}),Yr+=zu*mo.scale+Ht):(Nn.push({glyph:ko,imageName:Zl,x:Yr,y:Vr+Do,vertical:Yl,scale:mo.scale,fontStack:mo.fontStack,sectionIndex:Is,metrics:$s,rect:Ms}),Yr+=$s.advance*mo.scale+Ht)}if(Nn.length!==0){var rp=Yr-Ht;ua=Math.max(rp,ua),hA(Nn,0,Nn.length-1,Mi,Eo)}Yr=0;var ap=Ie*ln+Eo;qn.lineOffset=Math.max(Eo,bn),Vr+=ap,Oa=Math.max(ap,Oa),++ni}var yh=Vr-gm,yp=$1(Ne),_p=yp.horizontalAlign,ih=yp.verticalAlign;Oh(k.positionedLines,Mi,_p,ih,ua,Oa,Ie,yh,be.length),k.top+=-ih*yh,k.bottom=k.top+yh,k.left+=-_p*ua,k.right=k.left+ua}function hA(k,C,G,oe,be){if(!(!oe&&!be))for(var Ie=k[G],Ne=Ie.metrics.advance*Ie.scale,ft=(k[G].x+Ne)*oe,It=C;It<=G;It++)k[It].x-=ft,k[It].y+=be}function Oh(k,C,G,oe,be,Ie,Ne,ft,It){var Ht=(C-G)*be,er=0;Ie!==Ne?er=-ft*oe-gm:er=(-oe*It+.5)*Ne;for(var Lr=0,Yr=k;Lr-G/2;){if(Ne--,Ne<0)return!1;ft-=k[Ne].dist(Ie),Ie=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(Yr)}return!0}function xk(k){for(var C=0,G=0;GHt){var ua=(Ht-It)/Vr,Oa=Ml(Lr.x,Yr.x,ua),Mi=Ml(Lr.y,Yr.y,ua),ni=new tp(Oa,Mi,Yr.angleTo(Lr),er);return ni._round(),!Ne||_k(k,ni,ft,Ne,C)?ni:void 0}It+=Vr}}function bW(k,C,G,oe,be,Ie,Ne,ft,It){var Ht=bk(oe,Ie,Ne),er=wk(oe,be),Lr=er*Ne,Yr=k[0].x===0||k[0].x===It||k[0].y===0||k[0].y===It;C-Lr=0&&Ji=0&&ln=0&&Yr+Ht<=er){var bn=new tp(Ji,ln,$i,ua);bn._round(),(!oe||_k(k,bn,Ie,oe,be))&&Vr.push(bn)}}Lr+=ni}return!ft&&!Vr.length&&!Ne&&(Vr=Tk(k,Lr/2,G,oe,be,Ie,Ne,!0,It)),Vr}function Ak(k,C,G,oe,be){for(var Ie=[],Ne=0;Ne=oe&&Lr.x>=oe)&&(er.x>=oe?er=new i(oe,er.y+(Lr.y-er.y)*((oe-er.x)/(Lr.x-er.x)))._round():Lr.x>=oe&&(Lr=new i(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 i(er.x+(Lr.x-er.x)*((be-er.y)/(Lr.y-er.y)),be)._round():Lr.y>=be&&(Lr=new i(er.x+(Lr.x-er.x)*((be-er.y)/(Lr.y-er.y)),be)._round()),(!It||!er.equals(It[It.length-1]))&&(It=[er],Ie.push(It)),It.push(Lr)))))}return Ie}var Bg=zc;function Sk(k,C,G,oe){var be=[],Ie=k.image,Ne=Ie.pixelRatio,ft=Ie.paddedRect.w-2*Bg,It=Ie.paddedRect.h-2*Bg,Ht=k.right-k.left,er=k.bottom-k.top,Lr=Ie.stretchX||[[0,ft]],Yr=Ie.stretchY||[[0,It]],Vr=function(Kl,Ol){return Kl+Ol[1]-Ol[0]},ua=Lr.reduce(Vr,0),Oa=Yr.reduce(Vr,0),Mi=ft-ua,ni=It-Oa,$i=0,Oi=ua,Ji=0,ln=Oa,bn=0,qn=Mi,Nn=0,Eo=ni;if(Ie.content&&oe){var oo=Ie.content;$i=ub(Lr,0,oo[0]),Ji=ub(Yr,0,oo[1]),Oi=ub(Lr,oo[0],oo[2]),ln=ub(Yr,oo[1],oo[3]),bn=oo[0]-$i,Nn=oo[1]-Ji,qn=oo[2]-oo[0]-Oi,Eo=oo[3]-oo[1]-ln}var mo=function(Kl,Ol,$u,hc){var hf=cb(Kl.stretch-$i,Oi,Ht,k.left),_f=fb(Kl.fixed-bn,qn,Kl.stretch,ua),gh=cb(Ol.stretch-Ji,ln,er,k.top),Zf=fb(Ol.fixed-Nn,Eo,Ol.stretch,Oa),rp=cb($u.stretch-$i,Oi,Ht,k.left),ap=fb($u.fixed-bn,qn,$u.stretch,ua),yh=cb(hc.stretch-Ji,ln,er,k.top),yp=fb(hc.fixed-Nn,Eo,hc.stretch,Oa),_p=new i(hf,gh),ih=new i(rp,gh),xp=new i(rp,yh),nd=new i(hf,yh),jv=new i(_f/Ne,Zf/Ne),xm=new i(ap/Ne,yp/Ne),bm=C*Math.PI/180;if(bm){var wm=Math.sin(bm),Wg=Math.cos(bm),wd=[Wg,-wm,wm,Wg];_p._matMult(wd),ih._matMult(wd),nd._matMult(wd),xp._matMult(wd)}var gb=Kl.stretch+Kl.fixed,xA=$u.stretch+$u.fixed,yb=Ol.stretch+Ol.fixed,bA=hc.stretch+hc.fixed,hd={x:Ie.paddedRect.x+Bg+gb,y:Ie.paddedRect.y+Bg+yb,w:xA-gb,h:bA-yb},Xg=qn/Ne/Ht,_b=Eo/Ne/er;return{tl:_p,tr:ih,bl:nd,br:xp,tex:hd,writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:jv,pixelOffsetBR:xm,minFontScaleX:Xg,minFontScaleY:_b,isSDF:G}};if(!oe||!Ie.stretchX&&!Ie.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 Is=Mk(Lr,Mi,ua),ko=Mk(Yr,ni,Oa),Do=0;Do0&&(ua=Math.max(10,ua),this.circleDiameter=ua)}else{var Oa=Ne.top*ft-It,Mi=Ne.bottom*ft+It,ni=Ne.left*ft-It,$i=Ne.right*ft+It,Oi=Ne.collisionPadding;if(Oi&&(ni-=Oi[0]*ft,Oa-=Oi[1]*ft,$i+=Oi[2]*ft,Mi+=Oi[3]*ft),er){var Ji=new i(ni,Oa),ln=new i($i,Oa),bn=new i(ni,Mi),qn=new i($i,Mi),Nn=er*Math.PI/180;Ji._rotate(Nn),ln._rotate(Nn),bn._rotate(Nn),qn._rotate(Nn),ni=Math.min(Ji.x,ln.x,bn.x,qn.x),$i=Math.max(Ji.x,ln.x,bn.x,qn.x),Oa=Math.min(Ji.y,ln.y,bn.y,qn.y),Mi=Math.max(Ji.y,ln.y,bn.y,qn.y)}C.emplaceBack(G.x,G.y,ni,Oa,$i,Mi,oe,be,Ie)}this.boxEndIndex=C.length},Ng=function(C,G){if(C===void 0&&(C=[]),G===void 0&&(G=TW),this.data=C,this.length=this.data.length,this.compare=G,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],G=this.data.pop();return this.length--,this.length>0&&(this.data[0]=G,this._down(0)),C}},Ng.prototype.peek=function(){return this.data[0]},Ng.prototype._up=function(C){for(var G=this,oe=G.data,be=G.compare,Ie=oe[C];C>0;){var Ne=C-1>>1,ft=oe[Ne];if(be(Ie,ft)>=0)break;oe[C]=ft,C=Ne}oe[C]=Ie},Ng.prototype._down=function(C){for(var G=this,oe=G.data,be=G.compare,Ie=this.length>>1,Ne=oe[C];C=0)break;oe[C]=It,C=ft}oe[C]=Ne};function TW(k,C){return kC?1:0}function AW(k,C,G){C===void 0&&(C=1),G===void 0&&(G=!1);for(var oe=1/0,be=1/0,Ie=-1/0,Ne=-1/0,ft=k[0],It=0;ItIe)&&(Ie=Ht.x),(!It||Ht.y>Ne)&&(Ne=Ht.y)}var er=Ie-oe,Lr=Ne-be,Yr=Math.min(er,Lr),Vr=Yr/2,ua=new Ng([],SW);if(Yr===0)return new i(oe,be);for(var Oa=oe;Oani.d||!ni.d)&&(ni=Oi,G&&console.log("found best %d after %d probes",Math.round(1e4*Oi.d)/1e4,$i)),!(Oi.max-ni.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 G&&(console.log("num probes: "+$i),console.log("best distance: "+ni.d)),ni.p}function SW(k,C){return C.max-k.max}function Ug(k,C,G,oe){this.p=new i(k,C),this.h=G,this.d=MW(this.p,oe),this.max=this.d+this.h*Math.SQRT2}function MW(k,C){for(var G=!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&&(G=!G),oe=Math.min(oe,qd(k,Ht,er))}return(G?1:-1)*Math.sqrt(oe)}function EW(k){for(var C=0,G=0,oe=0,be=k[0],Ie=0,Ne=be.length,ft=Ne-1;Ie=ui||wd.y<0||wd.y>=ui||LW(k,wd,Wg,G,oe,be,ko,k.layers[0],k.collisionBoxArray,C.index,C.sourceLayerIndex,k.index,ni,ln,Nn,It,Oi,bn,Eo,Vr,C,Ie,Ht,er,Ne)};if(oo==="line")for(var $s=0,Ms=Ak(C.geometry,0,0,ui,ui);$s1){var gh=xW(_f,qn,G.vertical||ua,oe,Oa,$i);gh&&Do(_f,gh)}}else if(C.type==="Polygon")for(var Zf=0,rp=Cg(C.geometry,0);Zfym&&B(k.layerIds[0]+': Value for "text-size" is >= '+Q1+'. Reduce your "text-size".')):Mi.kind==="composite"&&(ni=[Bh*Vr.compositeTextSizes[0].evaluate(Ne,{},ua),Bh*Vr.compositeTextSizes[1].evaluate(Ne,{},ua)],(ni[0]>ym||ni[1]>ym)&&B(k.layerIds[0]+': Value for "text-size" is >= '+Q1+'. Reduce your "text-size".')),k.addSymbols(k.text,Oa,ni,ft,Ie,Ne,Ht,C,It.lineStartIndex,It.lineLength,Yr,ua);for(var $i=0,Oi=er;$iym&&B(k.layerIds[0]+': Value for "icon-size" is >= '+Q1+'. Reduce your "icon-size".')):_p.kind==="composite"&&(ih=[Bh*ln.compositeIconSizes[0].evaluate(Ji,{},qn),Bh*ln.compositeIconSizes[1].evaluate(Ji,{},qn)],(ih[0]>ym||ih[1]>ym)&&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,oo.lineStartIndex,oo.lineLength,-1,qn),Yl=k.icon.placedSymbolArray.length-1,yp&&(Ms=yp.length*4,k.addSymbols(k.icon,yp,ih,Oi,$i,Ji,mp.vertical,C,oo.lineStartIndex,oo.lineLength,-1,qn),Kl=k.icon.placedSymbolArray.length-1)}for(var xp in oe.horizontal){var nd=oe.horizontal[xp];if(!mo){$u=ye(nd.text);var jv=ft.layout.get("text-rotate").evaluate(Ji,{},qn);mo=new hb(It,C,Ht,er,Lr,nd,Yr,Vr,ua,jv)}var xm=nd.positionedLines.length===1;if(Zl+=kk(k,C,nd,Ie,ft,ua,Ji,Oa,oo,oe.vertical?mp.horizontal:mp.horizontalOnly,xm?Object.keys(oe.horizontal):[xp],Ol,Yl,ln,qn),xm)break}oe.vertical&&(zu+=kk(k,C,oe.vertical,Ie,ft,ua,Ji,Oa,oo,mp.vertical,["vertical"],Ol,Kl,ln,qn));var bm=mo?mo.boxStartIndex:k.collisionBoxArray.length,wm=mo?mo.boxEndIndex:k.collisionBoxArray.length,Wg=ko?ko.boxStartIndex:k.collisionBoxArray.length,wd=ko?ko.boxEndIndex:k.collisionBoxArray.length,gb=Is?Is.boxStartIndex:k.collisionBoxArray.length,xA=Is?Is.boxEndIndex:k.collisionBoxArray.length,yb=Do?Do.boxStartIndex:k.collisionBoxArray.length,bA=Do?Do.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(ko,hd),hd=Xg(Is,hd),hd=Xg(Do,hd);var _b=hd>-1?1:0;_b&&(hd*=Nn/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,Yl,Kl,$u,bm,wm,Wg,wd,gb,xA,yb,bA,Ht,Zl,zu,$s,Ms,_b,0,Yr,hc,hf,hd)}function PW(k,C,G,oe){var be=k.compareText;if(!(C in be))be[C]=[];else for(var Ie=be[C],Ne=Ie.length-1;Ne>=0;Ne--)if(oe.dist(Ie[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=Ie.get("symbol-sort-key");if(this.features=[],!(!Ht&&!er)){for(var Yr=G.iconDependencies,Vr=G.glyphDependencies,ua=G.availableImages,Oa=new mn(this.zoom),Mi=0,ni=C;Mi=0;for(var zu=0,Yl=Eo.sections;zu=0;It--)Ne[It]={x:G[It].x,y:G[It].y,tileUnitDistanceFromAnchor:Ie},It>0&&(Ie+=G[It-1].dist(G[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,G){for(var oe=C.placedSymbolArray.get(G),be=oe.vertexStartIndex+oe.numGlyphs*4,Ie=oe.vertexStartIndex;Ie1||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&&G.addIndicesForPlacedSymbol(G.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 zW(k,C){return C.replace(/{([^{}]+)}/g,function(G,oe){return oe in k?String(k[oe]):""})}var FW=new ma({"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 Xt(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 Xt(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 Xt(Gi.layout_symbol["icon-image"]),"icon-rotate":new Xt(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 Xt(Gi.layout_symbol["icon-offset"]),"icon-anchor":new Xt(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 Xt(Gi.layout_symbol["text-field"]),"text-font":new Xt(Gi.layout_symbol["text-font"]),"text-size":new Xt(Gi.layout_symbol["text-size"]),"text-max-width":new Xt(Gi.layout_symbol["text-max-width"]),"text-line-height":new it(Gi.layout_symbol["text-line-height"]),"text-letter-spacing":new Xt(Gi.layout_symbol["text-letter-spacing"]),"text-justify":new Xt(Gi.layout_symbol["text-justify"]),"text-radial-offset":new Xt(Gi.layout_symbol["text-radial-offset"]),"text-variable-anchor":new it(Gi.layout_symbol["text-variable-anchor"]),"text-anchor":new Xt(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 Xt(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 Xt(Gi.layout_symbol["text-transform"]),"text-offset":new Xt(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"])}),OW=new ma({"icon-opacity":new Xt(Gi.paint_symbol["icon-opacity"]),"icon-color":new Xt(Gi.paint_symbol["icon-color"]),"icon-halo-color":new Xt(Gi.paint_symbol["icon-halo-color"]),"icon-halo-width":new Xt(Gi.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Xt(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 Xt(Gi.paint_symbol["text-opacity"]),"text-color":new Xt(Gi.paint_symbol["text-color"],{runtimeType:Ws,getOverride:function(k){return k.textColor},hasOverride:function(k){return!!k.textColor}}),"text-halo-color":new Xt(Gi.paint_symbol["text-halo-color"]),"text-halo-width":new Xt(Gi.paint_symbol["text-halo-width"]),"text-halo-blur":new Xt(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:OW,layout:FW},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 G=this.defaultValue.property.overrides;if(G&&G.hasOverride(C.formattedSection))return G.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 G=this.defaultValue.value;C(G._styleExpression.expression)}},Vg.prototype.outputDefined=function(){return!1},Vg.prototype.serialize=function(){return null},me("FormatSectionOverride",Vg,{omit:["defaultValue"]});var BW=function(k){function C(G){k.call(this,G,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 Ie=this.layout.get("text-writing-mode");if(Ie){for(var Ne=[],ft=0,It=Ie;ft",targetMapId:be,sourceMapId:Ne.mapId})}}},Gg.prototype.receive=function(C){var G=C.data,oe=G.id;if(oe&&!(G.targetMapId&&this.mapId!==G.targetMapId))if(G.type===""){delete this.tasks[oe];var be=this.cancelCallbacks[oe];delete this.cancelCallbacks[oe],be&&be()}else ce()||G.mustQueue?(this.tasks[oe]=G,this.taskQueue.push(oe),this.invoker.trigger()):this.processTask(oe,G)},Gg.prototype.process=function(){if(this.taskQueue.length){var C=this.taskQueue.shift(),G=this.tasks[C];delete this.tasks[C],this.taskQueue.length&&this.invoker.trigger(),G&&this.processTask(C,G)}},Gg.prototype.processTask=function(C,G){var oe=this;if(G.type===""){var be=this.callbacks[C];delete this.callbacks[C],be&&(G.error?be(Tt(G.error)):be(null,Tt(G.data)))}else{var Ie=!1,Ne=X(this.globalScope)?void 0:[],ft=G.hasCallback?function(Yr,Vr){Ie=!0,delete oe.cancelCallbacks[C],oe.target.postMessage({id:C,type:"",sourceMapId:oe.mapId,error:Yr?yt(Yr):null,data:yt(Vr,Ne)},Ne)}:function(Yr){Ie=!0},It=null,Ht=Tt(G.data);if(this.parent[G.type])It=this.parent[G.type](G.sourceMapId,Ht,ft);else if(this.parent.getWorkerSource){var er=G.type.split("."),Lr=this.parent.getWorkerSource(G.sourceMapId,er[0],Ht.source);It=Lr[er[1]](Ht,ft)}else ft(new Error("Could not find function "+G.type));!Ie&&It&&It.cancel&&(this.cancelCallbacks[C]=It.cancel)}},Gg.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};function YW(k,C,G){C=Math.pow(2,G)-C-1;var oe=Dk(k*256,C*256,G),be=Dk((k+1)*256,(C+1)*256,G);return oe[0]+","+oe[1]+","+be[0]+","+be[1]}function Dk(k,C,G){var oe=2*Math.PI*6378137/256/Math.pow(2,G),be=k*oe-2*Math.PI*6378137/2,Ie=C*oe-2*Math.PI*6378137/2;return[be,Ie]}var Wf=function(C,G){C&&(G?this.setSouthWest(C).setNorthEast(G):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 G=this._sw,oe=this._ne,be,Ie;if(C instanceof Fc)be=C,Ie=C;else if(C instanceof Wf){if(be=C._sw,Ie=C._ne,!be||!Ie)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!G&&!oe?(this._sw=new Fc(be.lng,be.lat),this._ne=new Fc(Ie.lng,Ie.lat)):(G.lng=Math.min(be.lng,G.lng),G.lat=Math.min(be.lat,G.lat),oe.lng=Math.max(Ie.lng,oe.lng),oe.lat=Math.max(Ie.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 G=Fc.convert(C),oe=G.lng,be=G.lat,Ie=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),Ie&&Ne},Wf.convert=function(C){return!C||C instanceof Wf?C:new Wf(C)};var zk=63710088e-1,Fc=function(C,G){if(isNaN(C)||isNaN(G))throw new Error("Invalid LngLat object: ("+C+", "+G+")");if(this.lng=+C,this.lat=+G,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(x(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 G=Math.PI/180,oe=this.lat*G,be=C.lat*G,Ie=Math.sin(oe)*Math.sin(be)+Math.cos(oe)*Math.cos(be)*Math.cos((C.lng-this.lng)*G),Ne=zk*Math.acos(Math.min(Ie,1));return Ne},Fc.prototype.toBounds=function(C){C===void 0&&(C=0);var G=40075017,oe=360*C/G,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 KW(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 JW(k,C){return k*Ok(yA(C))}function $W(k){return 1/Math.cos(k*Math.PI/180)}var U0=function(C,G,oe){oe===void 0&&(oe=0),this.x=+C,this.y=+G,this.z=+oe};U0.fromLngLat=function(C,G){G===void 0&&(G=0);var oe=Fc.convert(C);return new U0(Bk(oe.lng),Nk(oe.lat),Uk(G,oe.lat))},U0.prototype.toLngLat=function(){return new Fc(KW(this.x),yA(this.y))},U0.prototype.toAltitude=function(){return JW(this.z,this.y)},U0.prototype.meterInMercatorCoordinateUnits=function(){return 1/Fk*$W(yA(this.y))};var j0=function(C,G,oe){this.z=C,this.x=G,this.y=oe,this.key=t_(0,C,C,G,oe)};j0.prototype.equals=function(C){return this.z===C.z&&this.x===C.x&&this.y===C.y},j0.prototype.url=function(C,G){var oe=YW(this.x,this.y,this.z),be=QW(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(G==="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 G=Math.pow(2,this.z);return new i((C.x*G-this.x)*ui,(C.y*G-this.y)*ui)},j0.prototype.toString=function(){return this.z+"/"+this.x+"/"+this.y};var jk=function(C,G){this.wrap=C,this.canonical=G,this.key=t_(C,G.z,G.z,G.x,G.y)},Xf=function(C,G,oe,be,Ie){this.overscaledZ=C,this.wrap=G,this.canonical=new j0(oe,+be,+Ie),this.key=t_(G,C,oe,be,Ie)};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 G=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>>G,this.canonical.y>>G)},Xf.prototype.calculateScaledKey=function(C,G){var oe=this.canonical.z-C;return C>this.canonical.z?t_(this.wrap*+G,C,this.canonical.z,this.canonical.x,this.canonical.y):t_(this.wrap*+G,C,C,this.canonical.x>>oe,this.canonical.y>>oe)},Xf.prototype.isChildOf=function(C){if(C.wrap!==this.wrap)return!1;var G=this.canonical.z-C.canonical.z;return C.overscaledZ===0||C.overscaledZ>G&&C.canonical.y===this.canonical.y>>G},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 G=this.canonical.z+1,oe=this.canonical.x*2,be=this.canonical.y*2;return[new Xf(G,this.wrap,G,oe,be),new Xf(G,this.wrap,G,oe+1,be),new Xf(G,this.wrap,G,oe,be+1),new Xf(G,this.wrap,G,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;Ie--)be=1<=this.dim+1||G<-1||G>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(G+1)*this.stride+(C+1)},Nv.prototype._unpackMapbox=function(C,G,oe){return(C*256*256+G*256+oe)/10-1e4},Nv.prototype._unpackTerrarium=function(C,G,oe){return C*256+G+oe/256-32768},Nv.prototype.getPixels=function(){return new eh({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},Nv.prototype.backfillBorder=function(C,G,oe){if(this.dim!==C.dim)throw new Error("dem dimension mismatch");var be=G*this.dim,Ie=G*this.dim+this.dim,Ne=oe*this.dim,ft=oe*this.dim+this.dim;switch(G){case-1:be=Ie-1;break;case 1:Ie=be+1;break}switch(oe){case-1:Ne=ft-1;break;case 1:ft=Ne+1;break}for(var It=-G*this.dim,Ht=-oe*this.dim,er=Ne;er=0&&Lr[3]>=0&&It.insert(ft,Lr[0],Lr[1],Lr[2],Lr[3])}},Uv.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},Uv.prototype.query=function(C,G,oe,be){var Ie=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),Yr=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(bn,qn,Nn,Eo){return td(C.cameraQueryGeometry,bn-er,qn-er,Nn+er,Eo+er)}),Oa=0,Mi=ua;Oabe)Ie=!1;else if(!G)Ie=!0;else if(this.expirationTime=Rr.maxzoom)&&Rr.visibility!=="none"){h(wr,this.zoom,Jt);var Nr=$a[Rr.id]=Rr.createBucket({index:Ba.bucketLayerIDs.length,layers:wr,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:rn,sourceID:this.source});Nr.populate(tn,Za,this.tileID.canonical),Ba.bucketLayerIDs.push(wr.map(function(la){return la.id}))}}}}var Hr,gt,Kt,mr,Ir=e.mapObject(Za.glyphDependencies,function(la){return Object.keys(la).map(Number)});Object.keys(Ir).length?Fr.send("getGlyphs",{uid:this.uid,stacks:Ir},function(la,ba){Hr||(Hr=la,gt=ba,ga.call(ra))}):gt={};var va=Object.keys(Za.iconDependencies);va.length?Fr.send("getImages",{icons:va,source:this.source,tileID:this.tileID,type:"icons"},function(la,ba){Hr||(Hr=la,Kt=ba,ga.call(ra))}):Kt={};var Pa=Object.keys(Za.patternDependencies);Pa.length?Fr.send("getImages",{icons:Pa,source:this.source,tileID:this.tileID,type:"patterns"},function(la,ba){Hr||(Hr=la,mr=ba,ga.call(ra))}):mr={},ga.call(this);function ga(){if(Hr)return ta(Hr);if(gt&&Kt&&mr){var la=new n(gt),ba=new e.ImageAtlas(Kt,mr);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,Kt,ba.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,ba.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:ba,glyphMap:this.returnDependencies?gt:null,iconMap:this.returnDependencies?Kt:null,glyphPositions:this.returnDependencies?la.positions:null})}}};function h(Yt,Rt,Zt){for(var Jt=new e.EvaluationParameters(Rt),Fr=0,ta=Yt;Fr=0!=!!Rt&&Yt.reverse()}var E=e.vectorTile.VectorTileFeature.prototype.toGeoJSON,p=function(Rt){this._feature=Rt,this.extent=e.EXTENT,this.type=Rt.type,this.properties=Rt.tags,"id"in Rt&&!isNaN(Rt.id)&&(this.id=parseInt(Rt.id,10))};p.prototype.loadGeometry=function(){if(this._feature.type===1){for(var Rt=[],Zt=0,Jt=this._feature.geometry;Zt"u"&&(Jt.push(ca),Ba=Jt.length-1,ta[ca]=Ba),Rt.writeVarint(Ba);var $a=Zt.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),Rt.writeVarint(pi)}}function $(Yt,Rt){return(Rt<<3)+(Yt&7)}function ue(Yt){return Yt<<1^Yt>>31}function ce(Yt,Rt){for(var Zt=Yt.loadGeometry(),Jt=Yt.type,Fr=0,ta=0,ra=Zt.length,ca=0;ca>1;X(Yt,Rt,ra,Jt,Fr,ta%2),Y(Yt,Rt,Zt,Jt,ra-1,ta+1),Y(Yt,Rt,Zt,ra+1,Fr,ta+1)}}function X(Yt,Rt,Zt,Jt,Fr,ta){for(;Fr>Jt;){if(Fr-Jt>600){var ra=Fr-Jt+1,ca=Zt-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(Zt-ca*$a/ra+Za)),pi=Math.min(Fr,Math.floor(Zt+(ra-ca)*$a/ra+Za));X(Yt,Rt,Zt,ri,pi,ta)}var Ia=Rt[2*Zt+ta],rn=Jt,tn=Fr;for(Q(Yt,Rt,Jt,Zt),Rt[2*Fr+ta]>Ia&&Q(Yt,Rt,Jt,Fr);rnIa;)tn--}Rt[2*Jt+ta]===Ia?Q(Yt,Rt,Jt,tn):(tn++,Q(Yt,Rt,tn,Fr)),tn<=Zt&&(Jt=tn+1),Zt<=tn&&(Fr=tn-1)}}function Q(Yt,Rt,Zt,Jt){V(Yt,Zt,Jt),V(Rt,2*Zt,2*Jt),V(Rt,2*Zt+1,2*Jt+1)}function V(Yt,Rt,Zt){var Jt=Yt[Rt];Yt[Rt]=Yt[Zt],Yt[Zt]=Jt}function le(Yt,Rt,Zt,Jt,Fr,ta,ra){for(var ca=[0,Yt.length-1,0],Ba=[],$a,Za;ca.length;){var ri=ca.pop(),pi=ca.pop(),Ia=ca.pop();if(pi-Ia<=ra){for(var rn=Ia;rn<=pi;rn++)$a=Rt[2*rn],Za=Rt[2*rn+1],$a>=Zt&&$a<=Fr&&Za>=Jt&&Za<=ta&&Ba.push(Yt[rn]);continue}var tn=Math.floor((Ia+pi)/2);$a=Rt[2*tn],Za=Rt[2*tn+1],$a>=Zt&&$a<=Fr&&Za>=Jt&&Za<=ta&&Ba.push(Yt[tn]);var cn=(ri+1)%2;(ri===0?Zt<=$a:Jt<=Za)&&(ca.push(Ia),ca.push(tn-1),ca.push(cn)),(ri===0?Fr>=$a:ta>=Za)&&(ca.push(tn+1),ca.push(pi),ca.push(cn))}return Ba}function ae(Yt,Rt,Zt,Jt,Fr,ta){for(var ra=[0,Yt.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(Rt[2*pi],Rt[2*pi+1],Zt,Jt)<=Ba&&ca.push(Yt[pi]);continue}var Ia=Math.floor((ri+Za)/2),rn=Rt[2*Ia],tn=Rt[2*Ia+1];j(rn,tn,Zt,Jt)<=Ba&&ca.push(Yt[Ia]);var cn=($a+1)%2;($a===0?Zt-Fr<=rn:Jt-Fr<=tn)&&(ra.push(ri),ra.push(Ia-1),ra.push(cn)),($a===0?Zt+Fr>=rn:Jt+Fr>=tn)&&(ra.push(Ia+1),ra.push(Za),ra.push(cn))}return ca}function j(Yt,Rt,Zt,Jt){var Fr=Yt-Zt,ta=Rt-Jt;return Fr*Fr+ta*ta}var ee=function(Yt){return Yt[0]},te=function(Yt){return Yt[1]},pe=function(Rt,Zt,Jt,Fr,ta){Zt===void 0&&(Zt=ee),Jt===void 0&&(Jt=te),Fr===void 0&&(Fr=64),ta===void 0&&(ta=Float64Array),this.nodeSize=Fr,this.points=Rt;for(var ra=Rt.length<65536?Uint16Array:Uint32Array,ca=this.ids=new ra(Rt.length),Ba=this.coords=new ta(Rt.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(Rt,Zt){var Jt=((Rt[0]+180)%360+360)%360-180,Fr=Math.max(-90,Math.min(90,Rt[1])),ta=Rt[2]===180?180:((Rt[2]+180)%360+360)%360-180,ra=Math.max(-90,Math.min(90,Rt[3]));if(Rt[2]-Rt[0]>=360)Jt=-180,ta=180;else if(Jt>ta){var ca=this.getClusters([Jt,Fr,180,ra],Zt),Ba=this.getClusters([-180,Fr,ta,ra],Zt);return ca.concat(Ba)}for(var $a=this.trees[this._limitZoom(Zt)],Za=$a.range(nt(Jt),tt(ra),nt(ta),tt(Fr)),ri=[],pi=0,Ia=Za;piZt&&(tn+=Or.numPoints||1)}if(tn>=Ba){for(var Cr=ri.x*rn,wr=ri.y*rn,Rr=ca&&rn>1?this._map(ri,!0):null,Nr=(Za<<5)+(Zt+1)+this.points.length,Hr=0,gt=Ia;Hr1)for(var va=0,Pa=Ia;va>5},Se.prototype._getOriginZoom=function(Rt){return(Rt-this.points.length)%32},Se.prototype._map=function(Rt,Zt){if(Rt.numPoints)return Zt?se({},Rt.properties):Rt.properties;var Jt=this.points[Rt.index].properties,Fr=this.options.map(Jt);return Zt&&Fr===Jt?se({},Fr):Fr};function Re(Yt,Rt,Zt,Jt,Fr){return{x:Yt,y:Rt,zoom:1/0,id:Zt,parentId:-1,numPoints:Jt,properties:Fr}}function Pe(Yt,Rt){var Zt=Yt.geometry.coordinates,Jt=Zt[0],Fr=Zt[1];return{x:nt(Jt),y:tt(Fr),zoom:1/0,index:Rt,parentId:-1}}function je(Yt){return{type:"Feature",id:Yt.id,properties:at(Yt),geometry:{type:"Point",coordinates:[Ve(Yt.x),he(Yt.y)]}}}function at(Yt){var Rt=Yt.numPoints,Zt=Rt>=1e4?Math.round(Rt/1e3)+"k":Rt>=1e3?Math.round(Rt/100)/10+"k":Rt;return se(se({},Yt.properties),{cluster:!0,cluster_id:Yt.id,point_count:Rt,point_count_abbreviated:Zt})}function nt(Yt){return Yt/360+.5}function tt(Yt){var Rt=Math.sin(Yt*Math.PI/180),Zt=.5-.25*Math.log((1+Rt)/(1-Rt))/Math.PI;return Zt<0?0:Zt>1?1:Zt}function Ve(Yt){return(Yt-.5)*360}function he(Yt){var Rt=(180-Yt*360)*Math.PI/180;return 360*Math.atan(Math.exp(Rt))/Math.PI-90}function se(Yt,Rt){for(var Zt in Rt)Yt[Zt]=Rt[Zt];return Yt}function ne(Yt){return Yt.x}function Ce(Yt){return Yt.y}function Ze(Yt,Rt,Zt,Jt){for(var Fr=Jt,ta=Zt-Rt>>1,ra=Zt-Rt,ca,Ba=Yt[Rt],$a=Yt[Rt+1],Za=Yt[Zt],ri=Yt[Zt+1],pi=Rt+3;piFr)ca=pi,Fr=Ia;else if(Ia===Fr){var rn=Math.abs(pi-ta);rnJt&&(ca-Rt>3&&Ze(Yt,Rt,ca,Jt),Yt[ca+2]=Fr,Zt-ca>3&&Ze(Yt,ca,Zt,Jt))}function rt(Yt,Rt,Zt,Jt,Fr,ta){var ra=Fr-Zt,ca=ta-Jt;if(ra!==0||ca!==0){var Ba=((Yt-Zt)*ra+(Rt-Jt)*ca)/(ra*ra+ca*ca);Ba>1?(Zt=Fr,Jt=ta):Ba>0&&(Zt+=ra*Ba,Jt+=ca*Ba)}return ra=Yt-Zt,ca=Rt-Jt,ra*ra+ca*ca}function Je(Yt,Rt,Zt,Jt){var Fr={id:typeof Yt>"u"?null:Yt,type:Rt,geometry:Zt,tags:Jt,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return St(Fr),Fr}function St(Yt){var Rt=Yt.geometry,Zt=Yt.type;if(Zt==="Point"||Zt==="MultiPoint"||Zt==="LineString")kt(Yt,Rt);else if(Zt==="Polygon"||Zt==="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=Rt.length-3;Rt[2]=1,Ze(Rt,0,Za,Zt),Rt[Za+2]=1,Rt.size=Math.abs(ra),Rt.start=0,Rt.end=Rt.size}function qr(Yt,Rt,Zt,Jt){for(var Fr=0;Fr1?1:Zt}function _t(Yt,Rt,Zt,Jt,Fr,ta,ra,ca){if(Zt/=Rt,Jt/=Rt,ta>=Zt&&ra=Jt)return null;for(var Ba=[],$a=0;$a=Zt&&rn=Jt)continue;var tn=[];if(pi==="Point"||pi==="MultiPoint")Fe(ri,tn,Zt,Jt,Fr);else if(pi==="LineString")Ye(ri,tn,Zt,Jt,Fr,!1,ca.lineMetrics);else if(pi==="MultiLineString")Le(ri,tn,Zt,Jt,Fr,!1);else if(pi==="Polygon")Le(ri,tn,Zt,Jt,Fr,!0);else if(pi==="MultiPolygon")for(var cn=0;cn=Zt&&ra<=Jt&&(Rt.push(Yt[ta]),Rt.push(Yt[ta+1]),Rt.push(Yt[ta+2]))}}function Ye(Yt,Rt,Zt,Jt,Fr,ta,ra){for(var ca=Ae(Yt),Ba=Fr===0?Ke:st,$a=Yt.start,Za,ri,pi=0;piZt&&(ri=Ba(ca,Ia,rn,cn,xt,Zt),ra&&(ca.start=$a+Za*ri)):ut>Jt?Or=Zt&&(ri=Ba(ca,Ia,rn,cn,xt,Zt),Cr=!0),Or>Jt&&ut<=Jt&&(ri=Ba(ca,Ia,rn,cn,xt,Jt),Cr=!0),!ta&&Cr&&(ra&&(ca.end=$a+Za*ri),Rt.push(ca),ca=Ae(Yt)),ra&&($a+=Za)}var wr=Yt.length-3;Ia=Yt[wr],rn=Yt[wr+1],tn=Yt[wr+2],ut=Fr===0?Ia:rn,ut>=Zt&&ut<=Jt&&We(ca,Ia,rn,tn),wr=ca.length-3,ta&&wr>=3&&(ca[wr]!==ca[0]||ca[wr+1]!==ca[1])&&We(ca,ca[0],ca[1],ca[2]),ca.length&&Rt.push(ca)}function Ae(Yt){var Rt=[];return Rt.size=Yt.size,Rt.start=Yt.start,Rt.end=Yt.end,Rt}function Le(Yt,Rt,Zt,Jt,Fr,ta){for(var ra=0;rara.maxX&&(ra.maxX=Za),ri>ra.maxY&&(ra.maxY=ri)}return ra}function or(Yt,Rt,Zt,Jt){var Fr=Rt.geometry,ta=Rt.type,ra=[];if(ta==="Point"||ta==="MultiPoint")for(var ca=0;ca0&&Rt.size<(Fr?ra:Jt)){Zt.numPoints+=Rt.length/3;return}for(var ca=[],Ba=0;Bara)&&(Zt.numSimplified++,ca.push(Rt[Ba]),ca.push(Rt[Ba+1])),Zt.numPoints++;Fr&&Pr(ca,ta),Yt.push(ca)}function Pr(Yt,Rt){for(var Zt=0,Jt=0,Fr=Yt.length,ta=Fr-2;Jt0===Rt)for(Jt=0,Fr=Yt.length;Jt24)throw new Error("maxZoom should be in the 0-24 range");if(Rt.promoteId&&Rt.generateId)throw new Error("promoteId and generateId cannot be used together.");var Jt=Bt(Yt,Rt);this.tiles={},this.tileCoords=[],Zt&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",Rt.indexMaxZoom,Rt.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),Jt=ot(Jt,Rt),Jt.length&&this.splitTile(Jt,0,0,0),Zt&&(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)))}Fa.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},Fa.prototype.splitTile=function(Yt,Rt,Zt,Jt,Fr,ta,ra){for(var ca=[Yt,Rt,Zt,Jt],Ba=this.options,$a=Ba.debug;ca.length;){Jt=ca.pop(),Zt=ca.pop(),Rt=ca.pop(),Yt=ca.pop();var Za=1<1&&console.time("creation"),pi=this.tiles[ri]=cr(Yt,Rt,Zt,Jt,Ba),this.tileCoords.push({z:Rt,x:Zt,y:Jt}),$a)){$a>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",Rt,Zt,Jt,pi.numFeatures,pi.numPoints,pi.numSimplified),console.timeEnd("creation"));var Ia="z"+Rt;this.stats[Ia]=(this.stats[Ia]||0)+1,this.total++}if(pi.source=Yt,Fr){if(Rt===Ba.maxZoom||Rt===Fr)continue;var rn=1<1&&console.time("clipping");var tn=.5*Ba.buffer/Ba.extent,cn=.5-tn,xt=.5+tn,ut=1+tn,Or,Cr,wr,Rr,Nr,Hr;Or=Cr=wr=Rr=null,Nr=_t(Yt,Za,Zt-tn,Zt+xt,0,pi.minX,pi.maxX,Ba),Hr=_t(Yt,Za,Zt+cn,Zt+ut,0,pi.minX,pi.maxX,Ba),Yt=null,Nr&&(Or=_t(Nr,Za,Jt-tn,Jt+xt,1,pi.minY,pi.maxY,Ba),Cr=_t(Nr,Za,Jt+cn,Jt+ut,1,pi.minY,pi.maxY,Ba),Nr=null),Hr&&(wr=_t(Hr,Za,Jt-tn,Jt+xt,1,pi.minY,pi.maxY,Ba),Rr=_t(Hr,Za,Jt+cn,Jt+ut,1,pi.minY,pi.maxY,Ba),Hr=null),$a>1&&console.timeEnd("clipping"),ca.push(Or||[],Rt+1,Zt*2,Jt*2),ca.push(Cr||[],Rt+1,Zt*2,Jt*2+1),ca.push(wr||[],Rt+1,Zt*2+1,Jt*2),ca.push(Rr||[],Rt+1,Zt*2+1,Jt*2+1)}}},Fa.prototype.getTile=function(Yt,Rt,Zt){var Jt=this.options,Fr=Jt.extent,ta=Jt.debug;if(Yt<0||Yt>24)return null;var ra=1<1&&console.log("drilling down to z%d-%d-%d",Yt,Rt,Zt);for(var Ba=Yt,$a=Rt,Za=Zt,ri;!ri&&Ba>0;)Ba--,$a=Math.floor($a/2),Za=Math.floor(Za/2),ri=this.tiles[Ra(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,Yt,Rt,Zt),ta>1&&console.timeEnd("drilling down"),this.tiles[ca]?Pt(this.tiles[ca],Fr):null)};function Ra(Yt,Rt,Zt){return((1<=0?0:ge.button},r.remove=function(ge){ge.parentNode&&ge.parentNode.removeChild(ge)};function c(ge,K,xe){var re,ye,Ue,ke=e.browser.devicePixelRatio>1?"@2x":"",Qe=e.getJSON(K.transformRequest(K.normalizeSpriteURL(ge,ke,".json"),e.ResourceType.SpriteJSON),function(br,Br){Qe=null,Ue||(Ue=br,re=Br,qt())}),vt=e.getImage(K.transformRequest(K.normalizeSpriteURL(ge,ke,".png"),e.ResourceType.SpriteImage),function(br,Br){vt=null,Ue||(Ue=br,ye=Br,qt())});function qt(){if(Ue)xe(Ue);else if(re&&ye){var br=e.browser.getImageData(ye),Br={};for(var pr in re){var mt=re[pr],Mt=mt.width,Ft=mt.height,rr=mt.x,hr=mt.y,sr=mt.sdf,dr=mt.pixelRatio,lr=mt.stretchX,Wt=mt.stretchY,ir=mt.content,Gt=new e.RGBAImage({width:Mt,height:Ft});e.RGBAImage.copy(br,Gt,{x:rr,y:hr},{x:0,y:0},{width:Mt,height:Ft}),Br[pr]={data:Gt,pixelRatio:dr,sdf:sr,stretchX:lr,stretchY:Wt,content:ir}}xe(null,Br)}}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,x=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(re){if(this.loaded!==re&&(this.loaded=re,re)){for(var ye=0,Ue=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),re=0;re65535){br(new Error("glyphs > 65535 not supported"));return}if(mt.ranges[Ft]){br(null,{stack:Br,id:pr,glyph:Mt});return}var rr=mt.requests[Ft];rr||(rr=mt.requests[Ft]=[],g.loadGlyphRange(Br,Ft,re.url,re.requestManager,function(hr,sr){if(sr){for(var dr in sr)re._doesCharSupportLocalGlyph(+dr)||(mt.glyphs[+dr]=sr[+dr]);mt.ranges[Ft]=!0}for(var lr=0,Wt=rr;lr1&&(qt=K[++vt]);var Br=Math.abs(br-qt.left),pr=Math.abs(br-qt.right),mt=Math.min(Br,pr),Mt=void 0,Ft=Ue/re*(ye+1);if(qt.isDash){var rr=ye-Math.abs(Ft);Mt=Math.sqrt(mt*mt+rr*rr)}else Mt=ye-Math.sqrt(mt*mt+Ft*Ft);this.data[Qe+br]=Math.max(0,Math.min(255,Mt+128))}},F.prototype.addRegularDash=function(K){for(var xe=K.length-1;xe>=0;--xe){var re=K[xe],ye=K[xe+1];re.zeroLength?K.splice(xe,1):ye&&ye.isDash===re.isDash&&(ye.left=re.left,K.splice(xe,1))}var Ue=K[0],ke=K[K.length-1];Ue.isDash===ke.isDash&&(Ue.left=ke.left-this.width,ke.right=Ue.right+this.width);for(var Qe=this.width*this.nextRow,vt=0,qt=K[vt],br=0;br1&&(qt=K[++vt]);var Br=Math.abs(br-qt.left),pr=Math.abs(br-qt.right),mt=Math.min(Br,pr),Mt=qt.isDash?mt:-mt;this.data[Qe+br]=Math.max(0,Math.min(255,Mt+128))}},F.prototype.addDash=function(K,xe){var re=xe?7:0,ye=2*re+1;if(this.nextRow+ye>this.height)return e.warnOnce("LineAtlas out of space"),null;for(var Ue=0,ke=0;ke=re.minX&&K.x=re.minY&&K.y0&&(br[new e.OverscaledTileID(re.overscaledZ,Qe,ye.z,ke,ye.y-1).key]={backfilled:!1},br[new e.OverscaledTileID(re.overscaledZ,re.wrap,ye.z,ye.x,ye.y-1).key]={backfilled:!1},br[new e.OverscaledTileID(re.overscaledZ,qt,ye.z,vt,ye.y-1).key]={backfilled:!1}),ye.y+10&&(Ue.resourceTiming=re._resourceTiming,re._resourceTiming=[]),re.fire(new e.Event("data",Ue))})},K.prototype.onAdd=function(re){this.map=re,this.load()},K.prototype.setData=function(re){var ye=this;return this._data=re,this.fire(new e.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(Ue){if(Ue){ye.fire(new e.ErrorEvent(Ue));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(re,ye){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:re,source:this.id},ye),this},K.prototype.getClusterChildren=function(re,ye){return this.actor.send("geojson.getClusterChildren",{clusterId:re,source:this.id},ye),this},K.prototype.getClusterLeaves=function(re,ye,Ue,ke){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:re,limit:ye,offset:Ue},ke),this},K.prototype._updateWorkerData=function(re){var ye=this;this._loaded=!1;var Ue=e.extend({},this.workerOptions),ke=this._data;typeof ke=="string"?(Ue.request=this.map._requestManager.transformRequest(e.browser.resolveURL(ke),e.ResourceType.Source),Ue.request.collectResourceTiming=this._collectResourceTiming):Ue.data=JSON.stringify(ke),this.actor.send(this.type+".loadData",Ue,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:Ue.source},null),re(Qe))})},K.prototype.loaded=function(){return this._loaded},K.prototype.loadTile=function(re,ye){var Ue=this,ke=re.actor?"reloadTile":"loadTile";re.actor=this.actor;var Qe={type:this.type,uid:re.uid,tileID:re.tileID,zoom:re.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:e.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};re.request=this.actor.send(ke,Qe,function(vt,qt){return delete re.request,re.unloadVectorData(),re.aborted?ye(null):vt?ye(vt):(re.loadVectorData(qt,Ue.map.painter,ke==="reloadTile"),ye(null))})},K.prototype.abortTile=function(re){re.request&&(re.request.cancel(),delete re.request),re.aborted=!0},K.prototype.unloadTile=function(re){re.unloadVectorData(),this.actor.send("removeTile",{uid:re.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),ue=e.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),ce=function(ge){function K(xe,re,ye,Ue){ge.call(this),this.id=xe,this.dispatcher=ye,this.coordinates=re.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(Ue),this.options=re}return ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K,K.prototype.load=function(re,ye){var Ue=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){Ue._loaded=!0,ke?Ue.fire(new e.ErrorEvent(ke)):Qe&&(Ue.image=Qe,re&&(Ue.coordinates=re),ye&&ye(),Ue._finishLoading())})},K.prototype.loaded=function(){return this._loaded},K.prototype.updateImage=function(re){var ye=this;return!this.image||!re.url?this:(this.options.url=re.url,this.load(re.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(re){this.map=re,this.load()},K.prototype.setCoordinates=function(re){var ye=this;this.coordinates=re;var Ue=re.map(e.MercatorCoordinate.fromLngLat);this.tileID=de(Ue),this.minzoom=this.maxzoom=this.tileID.z;var ke=Ue.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 re=this.map.painter.context,ye=re.gl;this.boundsBuffer||(this.boundsBuffer=re.createVertexBuffer(this._boundsArray,ue.members)),this.boundsSegments||(this.boundsSegments=e.SegmentVector.simpleSegment(0,0,4,2)),this.texture||(this.texture=new e.Texture(re,this.image,ye.RGBA),this.texture.bind(ye.LINEAR,ye.CLAMP_TO_EDGE));for(var Ue in this.tiles){var ke=this.tiles[Ue];ke.state!=="loaded"&&(ke.state="loaded",ke.texture=this.texture)}}},K.prototype.loadTile=function(re,ye){this.tileID&&this.tileID.equals(re.tileID.canonical)?(this.tiles[String(re.tileID.wrap)]=re,re.buckets={},ye(null)):(re.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,re=-1/0,ye=-1/0,Ue=0,ke=ge;Ueye.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=re}},K.prototype.getVideo=function(){return this.video},K.prototype.onAdd=function(re){this.map||(this.map=re,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 re=this.map.painter.context,ye=re.gl;this.boundsBuffer||(this.boundsBuffer=re.createVertexBuffer(this._boundsArray,ue.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(re,this.video,ye.RGBA),this.texture.bind(ye.LINEAR,ye.CLAMP_TO_EDGE));for(var Ue in this.tiles){var ke=this.tiles[Ue];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),X=function(ge){function K(xe,re,ye,Ue){ge.call(this,xe,re,ye,Ue),re.coordinates?(!Array.isArray(re.coordinates)||re.coordinates.length!==4||re.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"'))),re.animate&&typeof re.animate!="boolean"&&this.fire(new e.ErrorEvent(new e.ValidationError("sources."+xe,null,'optional "animate" property must be a boolean value'))),re.canvas?typeof re.canvas!="string"&&!(re.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=re,this.animate=re.animate!==void 0?re.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(re){this.map=re,this.load(),this.canvas&&this.animate&&this.play()},K.prototype.onRemove=function(){this.pause()},K.prototype.prepare=function(){var re=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,re=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,re=!0),!this._hasInvalidDimensions()&&Object.keys(this.tiles).length!==0){var ye=this.map.painter.context,Ue=ye.gl;this.boundsBuffer||(this.boundsBuffer=ye.createVertexBuffer(this._boundsArray,ue.members)),this.boundsSegments||(this.boundsSegments=e.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(re||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new e.Texture(ye,this.canvas,Ue.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 re=0,ye=[this.canvas.width,this.canvas.height];rethis.max){var Qe=this._getAndRemoveByKey(this.order[0]);Qe&&this.onRemove(Qe)}return this},Pe.prototype.has=function(K){return K.wrapped().key in this.data},Pe.prototype.getAndRemove=function(K){return this.has(K)?this._getAndRemoveByKey(K.wrapped().key):null},Pe.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},Pe.prototype.getByKey=function(K){var xe=this.data[K];return xe?xe[0].value:null},Pe.prototype.get=function(K){if(!this.has(K))return null;var xe=this.data[K.wrapped().key][0];return xe.value},Pe.prototype.remove=function(K,xe){if(!this.has(K))return this;var re=K.wrapped().key,ye=xe===void 0?0:this.data[re].indexOf(xe),Ue=this.data[re][ye];return this.data[re].splice(ye,1),Ue.timeout&&clearTimeout(Ue.timeout),this.data[re].length===0&&delete this.data[re],this.onRemove(Ue.value),this.order.splice(this.order.indexOf(re),1),this},Pe.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},Pe.prototype.filter=function(K){var xe=[];for(var re in this.data)for(var ye=0,Ue=this.data[re];ye1||(Math.abs(Br)>1&&(Math.abs(Br+mt)===1?Br+=mt:Math.abs(Br-mt)===1&&(Br-=mt)),!(!br.dem||!qt.dem)&&(qt.dem.backfillBorder(br.dem,Br,pr),qt.neighboringTiles&&qt.neighboringTiles[Mt]&&(qt.neighboringTiles[Mt].backfilled=!0)))}},K.prototype.getTile=function(re){return this.getTileByID(re.key)},K.prototype.getTileByID=function(re){return this._tiles[re]},K.prototype._retainLoadedChildren=function(re,ye,Ue,ke){for(var Qe in this._tiles){var vt=this._tiles[Qe];if(!(ke[Qe]||!vt.hasData()||vt.tileID.overscaledZ<=ye||vt.tileID.overscaledZ>Ue)){for(var qt=vt.tileID;vt&&vt.tileID.overscaledZ>ye+1;){var br=vt.tileID.scaledTo(vt.tileID.overscaledZ-1);vt=this._tiles[br.key],vt&&vt.hasData()&&(qt=br)}for(var Br=qt;Br.overscaledZ>ye;)if(Br=Br.scaledTo(Br.overscaledZ-1),re[Br.key]){ke[qt.key]=qt;break}}}},K.prototype.findLoadedParent=function(re,ye){if(re.key in this._loadedParentTiles){var Ue=this._loadedParentTiles[re.key];return Ue&&Ue.tileID.overscaledZ>=ye?Ue:null}for(var ke=re.overscaledZ-1;ke>=ye;ke--){var Qe=re.scaledTo(ke),vt=this._getLoadedTile(Qe);if(vt)return vt}},K.prototype._getLoadedTile=function(re){var ye=this._tiles[re.key];if(ye&&ye.hasData())return ye;var Ue=this._cache.getByKey(re.wrapped().key);return Ue},K.prototype.updateCacheSize=function(re){var ye=Math.ceil(re.width/this._source.tileSize)+1,Ue=Math.ceil(re.height/this._source.tileSize)+1,ke=ye*Ue,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(re){var ye=this._prevLng===void 0?re:this._prevLng,Ue=re-ye,ke=Ue/360,Qe=Math.round(ke);if(this._prevLng=re,Qe){var vt={};for(var qt in this._tiles){var br=this._tiles[qt];br.tileID=br.tileID.unwrapTo(br.tileID.wrap+Qe),vt[br.tileID.key]=br}this._tiles=vt;for(var Br in this._timers)clearTimeout(this._timers[Br]),delete this._timers[Br];for(var pr in this._tiles){var mt=this._tiles[pr];this._setTileReloadTimer(pr,mt)}}},K.prototype.update=function(re){var ye=this;if(this.transform=re,!(!this._sourceLoaded||this._paused)){this.updateCacheSize(re),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={};var Ue;this.used?this._source.tileID?Ue=re.getVisibleUnwrappedCoordinates(this._source.tileID).map(function(ya){return new e.OverscaledTileID(ya.canonical.z,ya.wrap,ya.canonical.z,ya.canonical.x,ya.canonical.y)}):(Ue=re.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(Ue=Ue.filter(function(ya){return ye._source.hasTile(ya)}))):Ue=[];var ke=re.coveringZoomLevel(this._source),Qe=Math.max(ke-K.maxOverzooming,this._source.minzoom),vt=Math.max(ke+K.maxUnderzooming,this._source.minzoom),qt=this._updateRetainedTiles(Ue,ke);if(Ba(this._source.type)){for(var br={},Br={},pr=Object.keys(qt),mt=0,Mt=pr;mtthis._source.maxzoom){var sr=rr.children(this._source.maxzoom)[0],dr=this.getTile(sr);if(dr&&dr.hasData()){Ue[sr.key]=sr;continue}}else{var lr=rr.children(this._source.maxzoom);if(Ue[lr[0].key]&&Ue[lr[1].key]&&Ue[lr[2].key]&&Ue[lr[3].key])continue}for(var Wt=hr.wasRequested(),ir=rr.overscaledZ-1;ir>=Qe;--ir){var Gt=rr.scaledTo(ir);if(ke[Gt.key]||(ke[Gt.key]=!0,hr=this.getTile(Gt),!hr&&Wt&&(hr=this._addTile(Gt)),hr&&(Ue[Gt.key]=Gt,Wt=hr.wasRequested(),hr.hasData())))break}}}return Ue},K.prototype._updateLoadedParentTileCache=function(){this._loadedParentTiles={};for(var re in this._tiles){for(var ye=[],Ue=void 0,ke=this._tiles[re].tileID;ke.overscaledZ>0;){if(ke.key in this._loadedParentTiles){Ue=this._loadedParentTiles[ke.key];break}ye.push(ke.key);var Qe=ke.scaledTo(ke.overscaledZ-1);if(Ue=this._getLoadedTile(Qe),Ue)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 re in this._tiles)this._removeTile(re);this._cache.reset()},K.prototype.tilesIn=function(re,ye,Ue){var ke=this,Qe=[],vt=this.transform;if(!vt)return Qe;for(var qt=Ue?vt.getCameraQueryGeometry(re):re,br=re.map(function(ir){return vt.pointCoordinate(ir)}),Br=qt.map(function(ir){return vt.pointCoordinate(ir)}),pr=this.getIds(),mt=1/0,Mt=1/0,Ft=-1/0,rr=-1/0,hr=0,sr=Br;hr=0&&vi[1].y+ya>=0){var Ga=br.map(function(Zi){return Dr.getTilePoint(Zi)}),ii=Br.map(function(Zi){return Dr.getTilePoint(Zi)});Qe.push({tile:Gt,tileID:Dr,queryGeometry:Ga,cameraQueryGeometry:ii,scale:Jr})}}},Wt=0;Wt=e.browser.now())return!0}return!1},K.prototype.setFeatureState=function(re,ye,Ue){re=re||"_geojsonTileLayer",this._state.updateState(re,ye,Ue)},K.prototype.removeFeatureState=function(re,ye,Ue){re=re||"_geojsonTileLayer",this._state.removeFeatureState(re,ye,Ue)},K.prototype.getFeatureState=function(re,ye){return re=re||"_geojsonTileLayer",this._state.getState(re,ye)},K.prototype.setDependencies=function(re,ye,Ue){var ke=this._tiles[re];ke&&ke.setDependencies(ye,Ue)},K.prototype.reloadTilesForDependencies=function(re,ye){for(var Ue in this._tiles){var ke=this._tiles[Ue];ke.hasDependency(re,ye)&&this._reloadTile(Ue,"reloading")}this._cache.filter(function(Qe){return!Qe.hasDependency(re,ye)})},K}(e.Evented);ra.maxOverzooming=10,ra.maxUnderzooming=3;function ca(ge,K){var xe=Math.abs(ge.wrap*2)-+(ge.wrap<0),re=Math.abs(K.wrap*2)-+(K.wrap<0);return ge.overscaledZ-K.overscaledZ||re-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(Io.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[Ue].mult(1-vt).add(this.points[xe].mult(vt))};var la=function(K,xe,re){var ye=this.boxCells=[],Ue=this.circleCells=[];this.xCellCount=Math.ceil(K/re),this.yCellCount=Math.ceil(xe/re);for(var ke=0;kethis.width||ye<0||xe>this.height)return Ue?!1:[];var Qe=[];if(K<=0&&xe<=0&&this.width<=re&&this.height<=ye){if(Ue)return!0;for(var vt=0;vt0:Qe}},la.prototype._queryCircle=function(K,xe,re,ye,Ue){var ke=K-re,Qe=K+re,vt=xe-re,qt=xe+re;if(Qe<0||ke>this.width||qt<0||vt>this.height)return ye?!1:[];var br=[],Br={hitTest:ye,circle:{x:K,y:xe,radius:re},seenUids:{box:{},circle:{}}};return this._forEachCell(ke,vt,Qe,qt,this._queryCellCircle,br,Br,Ue),ye?br.length>0:br},la.prototype.query=function(K,xe,re,ye,Ue){return this._query(K,xe,re,ye,!1,Ue)},la.prototype.hitTest=function(K,xe,re,ye,Ue){return this._query(K,xe,re,ye,!0,Ue)},la.prototype.hitTestCircle=function(K,xe,re,ye){return this._queryCircle(K,xe,re,!0,ye)},la.prototype._queryCell=function(K,xe,re,ye,Ue,ke,Qe,vt){var qt=Qe.seenUids,br=this.boxCells[Ue];if(br!==null)for(var Br=this.bboxes,pr=0,mt=br;pr=Br[Ft+0]&&ye>=Br[Ft+1]&&(!vt||vt(this.boxKeys[Mt]))){if(Qe.hitTest)return ke.push(!0),!0;ke.push({key:this.boxKeys[Mt],x1:Br[Ft],y1:Br[Ft+1],x2:Br[Ft+2],y2:Br[Ft+3]})}}}var rr=this.circleCells[Ue];if(rr!==null)for(var hr=this.circles,sr=0,dr=rr;srQe*Qe+vt*vt},la.prototype._circleAndRectCollide=function(K,xe,re,ye,Ue,ke,Qe){var vt=(ke-ye)/2,qt=Math.abs(K-(ye+vt));if(qt>vt+re)return!1;var br=(Qe-Ue)/2,Br=Math.abs(xe-(Ue+br));if(Br>br+re)return!1;if(qt<=vt||Br<=br)return!0;var pr=qt-vt,mt=Br-br;return pr*pr+mt*mt<=re*re};function ba(ge,K,xe,re,ye){var Ue=e.create();return K?(e.scale(Ue,Ue,[1/ye,1/ye,1]),xe||e.rotateZ(Ue,Ue,re.angle)):e.multiply(Ue,re.labelPlaneMatrix,ge),Ue}function Ai(ge,K,xe,re,ye){if(K){var Ue=e.clone(ge);return e.scale(Ue,Ue,[ye,ye,1]),xe||e.rotateZ(Ue,Ue,-re.angle),Ue}else return re.glCoordMatrix}function ki(ge,K){var xe=[ge.x,ge.y,0,1];wo(xe,xe,K);var re=xe[3];return{point:new e.Point(xe[0]/re,xe[1]/re),signedDistanceFromCamera:re}}function Ki(ge,K){return .5+.5*(ge/K)}function En(ge,K){var xe=ge[0]/ge[3],re=ge[1]/ge[3],ye=xe>=-K[0]&&xe<=K[0]&&re>=-K[1]&&re<=K[1];return ye}function Tn(ge,K,xe,re,ye,Ue,ke,Qe){var vt=re?ge.textSizeData:ge.iconSizeData,qt=e.evaluateSizeForZoom(vt,xe.transform.zoom),br=[256/xe.width*2+1,256/xe.height*2+1],Br=re?ge.text.dynamicLayoutVertexArray:ge.icon.dynamicLayoutVertexArray;Br.clear();for(var pr=ge.lineVertexArray,mt=re?ge.text.placedSymbolArray:ge.icon.placedSymbolArray,Mt=xe.transform.width/xe.transform.height,Ft=!1,rr=0;rrUe)return{useVertical:!0}}return(ge===e.WritingMode.vertical?K.yxe.x)?{needsFlipping:!0}:null}function ao(ge,K,xe,re,ye,Ue,ke,Qe,vt,qt,br,Br,pr,mt){var Mt=K/24,Ft=ge.lineOffsetX*Mt,rr=ge.lineOffsetY*Mt,hr;if(ge.numGlyphs>1){var sr=ge.glyphStartIndex+ge.numGlyphs,dr=ge.lineStartIndex,lr=ge.lineStartIndex+ge.lineLength,Wt=On(Mt,Qe,Ft,rr,xe,br,Br,ge,vt,Ue,pr);if(!Wt)return{notEnoughRoom:!0};var ir=ki(Wt.first.point,ke).point,Gt=ki(Wt.last.point,ke).point;if(re&&!xe){var Dr=kn(ge.writingMode,ir,Gt,mt);if(Dr)return Dr}hr=[Wt.first];for(var Jr=ge.glyphStartIndex+1;Jr0?ii.point:Co(Br,Ga,ya,1,ye),Fi=kn(ge.writingMode,ya,Zi,mt);if(Fi)return Fi}var ui=bo(Mt*Qe.getoffsetX(ge.glyphStartIndex),Ft,rr,xe,br,Br,ge.segment,ge.lineStartIndex,ge.lineStartIndex+ge.lineLength,vt,Ue,pr);if(!ui)return{notEnoughRoom:!0};hr=[ui]}for(var _i=0,Si=hr;_i0?1:-1,Mt=0;re&&(mt*=-1,Mt=Math.PI),mt<0&&(Mt+=Math.PI);for(var Ft=mt>0?Qe+ke:Qe+ke+1,rr=ye,hr=ye,sr=0,dr=0,lr=Math.abs(pr),Wt=[];sr+dr<=lr;){if(Ft+=mt,Ft=vt)return null;if(hr=rr,Wt.push(rr),rr=Br[Ft],rr===void 0){var ir=new e.Point(qt.getx(Ft),qt.gety(Ft)),Gt=ki(ir,br);if(Gt.signedDistanceFromCamera>0)rr=Br[Ft]=Gt.point;else{var Dr=Ft-mt,Jr=sr===0?Ue:new e.Point(qt.getx(Dr),qt.gety(Dr));rr=Co(Jr,ir,hr,lr-sr+1,br)}}sr+=dr,dr=hr.dist(rr)}var ya=(lr-sr)/dr,vi=rr.sub(hr),Ga=vi.mult(ya)._add(hr);Ga._add(vi._unit()._perp()._mult(xe*mt));var ii=Mt+Math.atan2(rr.y-hr.y,rr.x-hr.x);return Wt.push(Ga),{point:Ga,angle:ii,path:Wt}}var zs=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function Cn(ge,K){for(var xe=0;xe=1;Ui--)Si.push(ui.path[Ui]);for(var fn=1;fn<_i.path.length;fn++)Si.push(_i.path[fn]);var _o=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 Ds=[];if(Si.length>0){for(var Oo=Si[0].clone(),Cs=Si[0].clone(),Ys=1;Ys=ii.x&&Cs.x<=Zi.x&&Oo.y>=ii.y&&Cs.y<=Zi.y?Ds=[Si]:Cs.xZi.x||Cs.yZi.y?Ds=[]:Ds=e.clipLine([Si],ii.x,ii.y,Zi.x,Zi.y)}for(var mu=0,Ep=Ds;mu=this.screenRightBoundary||yethis.screenBottomBoundary},go.prototype.isInsideGrid=function(K,xe,re,ye){return re>=0&&K=0&&xe0){var lr;return this.prevPlacement&&this.prevPlacement.variableOffsets[pr.crossTileID]&&this.prevPlacement.placements[pr.crossTileID]&&this.prevPlacement.placements[pr.crossTileID].text&&(lr=this.prevPlacement.variableOffsets[pr.crossTileID].anchor),this.variableOffsets[pr.crossTileID]={textOffset:rr,width:re,height:ye,anchor:K,textBoxScale:Ue,prevAnchor:lr},this.markUsedJustification(mt,K,pr,Mt),mt.allowVerticalPlacement&&(this.markUsedOrientation(mt,Mt,pr),this.placedOrientations[pr.crossTileID]=Mt),{shift:hr,placedGlyphBoxes:sr}}},Ko.prototype.placeLayerBucketPart=function(K,xe,re){var ye=this,Ue=K.parameters,ke=Ue.bucket,Qe=Ue.layout,vt=Ue.posMatrix,qt=Ue.textLabelPlaneMatrix,br=Ue.labelToScreenMatrix,Br=Ue.textPixelRatio,pr=Ue.holdingForFade,mt=Ue.collisionBoxArray,Mt=Ue.partiallyEvaluatedTextSize,Ft=Ue.collisionGroup,rr=Qe.get("text-optional"),hr=Qe.get("icon-optional"),sr=Qe.get("text-allow-overlap"),dr=Qe.get("icon-allow-overlap"),lr=Qe.get("text-rotation-alignment")==="map",Wt=Qe.get("text-pitch-alignment")==="map",ir=Qe.get("icon-text-fit")!=="none",Gt=Qe.get("symbol-z-order")==="viewport-y",Dr=sr&&(dr||!ke.hasIconData()||hr),Jr=dr&&(sr||!ke.hasTextData()||rr);!ke.collisionArrays&&mt&&ke.deserializeCollisionBoxes(mt);var ya=function(ui,_i){if(!xe[ui.crossTileID]){if(pr){ye.placements[ui.crossTileID]=new Yn(!1,!1,!1);return}var Si=!1,Ui=!1,fn=!0,_o=null,Uo={box:null,offscreen:null},Ds={box:null,offscreen:null},Oo=null,Cs=null,Ys=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 hu=e.WritingMode.horizontal;if(ke.allowVerticalPlacement&&!cc&&ye.prevPlacement){var Dh=ye.prevPlacement.placedOrientations[ui.crossTileID];Dh&&(ye.placedOrientations[ui.crossTileID]=Dh,hu=Dh,ye.markUsedOrientation(ke,hu,ui))}return hu},qd=function(cc,hu){if(ke.allowVerticalPlacement&&ui.numVerticalGlyphVertices>0&&_i.verticalTextBox)for(var Dh=0,Rv=ke.writingModes;Dh0&&(Jh=Jh.filter(function(cc){return cc!==Rh.anchor}),Jh.unshift(Rh.anchor))}var Cp=function(cc,hu,Dh){for(var Rv=cc.x2-cc.x1,lm=cc.y2-cc.y1,Mu=ui.textBoxScale,w0=ir&&!dr?hu:null,sv={box:[],offscreen:!1},xg=sr?Jh.length*2:Jh.length,Pp=0;Pp=Jh.length,T0=ye.attemptAnchorPlacement(lv,cc,Rv,lm,Mu,lr,Wt,Br,vt,Ft,bg,ui,ke,Dh,w0);if(T0&&(sv=T0.placedGlyphBoxes,sv&&sv.box&&sv.box.length)){Si=!0,_o=T0.shift;break}}return sv},Vp=function(){return Cp(Ph,_i.iconBox,e.WritingMode.horizontal)},Lp=function(){var cc=_i.verticalTextBox,hu=Uo&&Uo.box&&Uo.box.length;return ke.allowVerticalPlacement&&!hu&&ui.numVerticalGlyphVertices>0&&cc?Cp(cc,_i.verticalIconBox,e.WritingMode.vertical):{box:null,offscreen:null}};qd(Vp,Lp),Uo&&(Si=Uo.box,fn=Uo.offscreen);var Lv=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,Lv))}}else{var ed=function(cc,hu){var Dh=ye.collisionIndex.placeCollisionBox(cc,sr,Br,vt,Ft.predicate);return Dh&&Dh.box&&Dh.box.length&&(ye.markUsedOrientation(ke,hu,ui),ye.placedOrientations[ui.crossTileID]=hu),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(Oo=Uo,Si=Oo&&Oo.box&&Oo.box.length>0,fn=Oo&&Oo.offscreen,ui.useRuntimeCollisionCircles){var Gf=ke.text.placedSymbolArray.get(ui.centerJustifiedTextSymbolIndex),Gd=e.evaluateSizeForFeature(ke.textSizeData,Mt,Gf),Pv=Qe.get("text-padding"),ph=ui.collisionCircleDiameter;Cs=ye.collisionIndex.placeCollisionCircles(sr,Gf,ke.lineVertexArray,ke.glyphOffsetArray,Gd,vt,qt,br,re,Wt,Ft.predicate,ph,Pv),Si=sr||Cs.circles.length>0&&!Cs.collisionDetected,fn=fn&&Cs.offscreen}if(_i.iconFeatureIndex&&(kp=_i.iconFeatureIndex),_i.iconBox){var iv=function(cc){var hu=ir&&_o?ps(cc,_o.x,_o.y,lr,Wt,ye.transform.angle):cc;return ye.collisionIndex.placeCollisionBox(hu,dr,Br,vt,Ft.predicate)};Ds&&Ds.box&&Ds.box.length&&_i.verticalIconBox?(Ys=iv(_i.verticalIconBox),Ui=Ys.box.length>0):(Ys=iv(_i.iconBox),Ui=Ys.box.length>0),fn=fn&&Ys.offscreen}var om=rr||ui.numHorizontalGlyphVertices===0&&ui.numVerticalGlyphVertices===0,sm=hr||ui.numIconVertices===0;if(!om&&!sm?Ui=Si=Ui&&Si:sm?om||(Ui=Ui&&Si):Si=Ui&&Si,Si&&Oo&&Oo.box&&(Ds&&Ds.box&&Ep?ye.collisionIndex.insertCollisionBox(Oo.box,Qe.get("text-ignore-placement"),ke.bucketInstanceId,Ep,Ft.ID):ye.collisionIndex.insertCollisionBox(Oo.box,Qe.get("text-ignore-placement"),ke.bucketInstanceId,mu,Ft.ID)),Ui&&Ys&&ye.collisionIndex.insertCollisionBox(Ys.box,Qe.get("icon-ignore-placement"),ke.bucketInstanceId,kp,Ft.ID),Cs&&(Si&&ye.collisionIndex.insertCollisionCircles(Cs.circles,Qe.get("text-ignore-placement"),ke.bucketInstanceId,mu,Ft.ID),re)){var Iv=ke.bucketInstanceId,nv=ye.collisionCircleArrays[Iv];nv===void 0&&(nv=ye.collisionCircleArrays[Iv]=new Gn);for(var ov=0;ov=0;--Ga){var ii=vi[Ga];ya(ke.symbolInstances.get(ii),ke.collisionArrays[ii])}else for(var Zi=K.symbolInstanceStart;Zi=0&&(ke>=0&&br!==ke?K.text.placedSymbolArray.get(br).crossTileID=0:K.text.placedSymbolArray.get(br).crossTileID=re.crossTileID)}},Ko.prototype.markUsedOrientation=function(K,xe,re){for(var ye=xe===e.WritingMode.horizontal||xe===e.WritingMode.horizontalOnly?xe:0,Ue=xe===e.WritingMode.vertical?xe:0,ke=[re.leftJustifiedTextSymbolIndex,re.centerJustifiedTextSymbolIndex,re.rightJustifiedTextSymbolIndex],Qe=0,vt=ke;Qe0||Wt>0,ya=dr.numIconVertices>0,vi=ye.placedOrientations[dr.crossTileID],Ga=vi===e.WritingMode.vertical,ii=vi===e.WritingMode.horizontal||vi===e.WritingMode.horizontalOnly;if(Jr){var Zi=il(Dr.text),Fi=Ga?yn:Zi;Mt(K.text,lr,Fi);var ui=ii?yn:Zi;Mt(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||ii?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(ya){var fn=il(Dr.icon),_o=!(pr&&dr.verticalPlacedIconSymbolIndex&&Ga);if(dr.placedIconSymbolIndex>=0){var Uo=_o?fn:yn;Mt(K.icon,dr.numIconVertices,Uo),K.icon.placedSymbolArray.get(dr.placedIconSymbolIndex).hidden=Dr.icon.isHidden()}if(dr.verticalPlacedIconSymbolIndex>=0){var Ds=_o?yn:fn;Mt(K.icon,dr.numVerticalIconVertices,Ds),K.icon.placedSymbolArray.get(dr.verticalPlacedIconSymbolIndex).hidden=Dr.icon.isHidden()}}if(K.hasIconCollisionBoxData()||K.hasTextCollisionBoxData()){var Oo=K.collisionArrays[sr];if(Oo){var Cs=new e.Point(0,0);if(Oo.textBox||Oo.verticalTextBox){var Ys=!0;if(qt){var mu=ye.variableOffsets[ir];mu?(Cs=_s(mu.anchor,mu.width,mu.height,mu.textOffset,mu.textBoxScale),br&&Cs._rotate(Br?ye.transform.angle:-ye.transform.angle)):Ys=!1}Oo.textBox&&Gi(K.textCollisionBox.collisionVertexArray,Dr.text.placed,!Ys||Ga,Cs.x,Cs.y),Oo.verticalTextBox&&Gi(K.textCollisionBox.collisionVertexArray,Dr.text.placed,!Ys||ii,Cs.x,Cs.y)}var Ep=!!(!ii&&Oo.verticalIconBox);Oo.iconBox&&Gi(K.iconCollisionBox.collisionVertexArray,Dr.icon.placed,Ep,pr?Cs.x:0,pr?Cs.y:0),Oo.verticalIconBox&&Gi(K.iconCollisionBox.collisionVertexArray,Dr.icon.placed,!Ep,pr?Cs.x:0,pr?Cs.y:0)}}},rr=0;rrK},Ko.prototype.setStale=function(){this.stale=!0};function Gi(ge,K,xe,re,ye){ge.emplaceBack(K?1:0,xe?1:0,re||0,ye||0),ge.emplaceBack(K?1:0,xe?1:0,re||0,ye||0),ge.emplaceBack(K?1:0,xe?1:0,re||0,ye||0),ge.emplaceBack(K?1:0,xe?1:0,re||0,ye||0)}var Pn=Math.pow(2,25),qs=Math.pow(2,24),bs=Math.pow(2,17),lo=Math.pow(2,16),Zo=Math.pow(2,9),ws=Math.pow(2,8),Hs=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*qs+xe*bs+K*lo+xe*Zo+K*ws+xe*Hs+K}var yn=0,Po=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=[]};Po.prototype.continuePlacement=function(K,xe,re,ye,Ue){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 Po(vt));var br=this._inProgressLayer.continuePlacement(re[vt.source],this.placement,this._showCollisionBoxes,vt,ke);if(br)return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},To.prototype.commit=function(K){return this.placement.commit(K),this.placement};var Ws=512/e.EXTENT/2,Ll=function(K,xe,re){this.tileID=K,this.indexedSymbolInstances={},this.bucketInstanceId=re;for(var ye=0;yeK.overscaledZ)for(var qt in vt){var br=vt[qt];br.tileID.isChildOf(K)&&br.findMatches(xe.symbolInstances,K,ke)}else{var Br=K.scaledTo(Number(Qe)),pr=vt[Br.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 Ue.forEach(function(Qe){Qe.command!=="setTransition"&&ye[Qe.command].apply(ye,Qe.args)}),this.stylesheet=re,!0},K.prototype.addImage=function(re,ye){if(this.getImage(re))return this.fire(new e.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(re,ye),this._afterImageUpdated(re)},K.prototype.updateImage=function(re,ye){this.imageManager.updateImage(re,ye)},K.prototype.getImage=function(re){return this.imageManager.getImage(re)},K.prototype.removeImage=function(re){if(!this.getImage(re))return this.fire(new e.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(re),this._afterImageUpdated(re)},K.prototype._afterImageUpdated=function(re){this._availableImages=this.imageManager.listImages(),this._changedImages[re]=!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(re,ye,Ue){var ke=this;if(Ue===void 0&&(Ue={}),this._checkLoaded(),this.sourceCaches[re]!==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."+re,ye,null,Ue))){this.map&&this.map._collectResourceTiming&&(ye.collectResourceTiming=!0);var qt=this.sourceCaches[re]=new ra(re,ye,this.dispatcher);qt.style=this,qt.setEventedParent(this,function(){return{isSourceLoaded:ke.loaded(),source:qt.serialize(),sourceId:re}}),qt.onAdd(this.map),this._changed=!0}},K.prototype.removeSource=function(re){if(this._checkLoaded(),this.sourceCaches[re]===void 0)throw new Error("There is no source with this ID");for(var ye in this._layers)if(this._layers[ye].source===re)return this.fire(new e.ErrorEvent(new Error('Source "'+re+'" cannot be removed while layer "'+ye+'" is using it.')));var Ue=this.sourceCaches[re];delete this.sourceCaches[re],delete this._updatedSources[re],Ue.fire(new e.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:re})),Ue.setEventedParent(null),Ue.clearTiles(),Ue.onRemove&&Ue.onRemove(this.map),this._changed=!0},K.prototype.setGeoJSONSourceData=function(re,ye){this._checkLoaded();var Ue=this.sourceCaches[re].getSource();Ue.setData(ye),this._changed=!0},K.prototype.getSource=function(re){return this.sourceCaches[re]&&this.sourceCaches[re].getSource()},K.prototype.addLayer=function(re,ye,Ue){Ue===void 0&&(Ue={}),this._checkLoaded();var ke=re.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(re.type==="custom"){if(Ts(this,e.validateCustomStyleLayer(re)))return;Qe=e.createStyleLayer(re)}else{if(typeof re.source=="object"&&(this.addSource(ke,re.source),re=e.clone$1(re),re=e.extend(re,{source:ke})),this._validate(e.validateStyle.layer,"layers."+ke,re,{arrayIndex:-1},Ue))return;Qe=e.createStyleLayer(re),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(re,ye){this._checkLoaded(),this._changed=!0;var Ue=this._layers[re];if(!Ue){this.fire(new e.ErrorEvent(new Error("The layer '"+re+"' does not exist in the map's style and cannot be moved.")));return}if(re!==ye){var ke=this._order.indexOf(re);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,re),this._layerOrderChanged=!0}},K.prototype.removeLayer=function(re){this._checkLoaded();var ye=this._layers[re];if(!ye){this.fire(new e.ErrorEvent(new Error("The layer '"+re+"' does not exist in the map's style and cannot be removed.")));return}ye.setEventedParent(null);var Ue=this._order.indexOf(re);this._order.splice(Ue,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[re]=ye,delete this._layers[re],delete this._serializedLayers[re],delete this._updatedLayers[re],delete this._updatedPaintProps[re],ye.onRemove&&ye.onRemove(this.map)},K.prototype.getLayer=function(re){return this._layers[re]},K.prototype.hasLayer=function(re){return re in this._layers},K.prototype.setLayerZoomRange=function(re,ye,Ue){this._checkLoaded();var ke=this.getLayer(re);if(!ke){this.fire(new e.ErrorEvent(new Error("The layer '"+re+"' does not exist in the map's style and cannot have zoom extent.")));return}ke.minzoom===ye&&ke.maxzoom===Ue||(ye!=null&&(ke.minzoom=ye),Ue!=null&&(ke.maxzoom=Ue),this._updateLayer(ke))},K.prototype.setFilter=function(re,ye,Ue){Ue===void 0&&(Ue={}),this._checkLoaded();var ke=this.getLayer(re);if(!ke){this.fire(new e.ErrorEvent(new Error("The layer '"+re+"' 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,Ue)||(ke.filter=e.clone$1(ye),this._updateLayer(ke))}},K.prototype.getFilter=function(re){return e.clone$1(this.getLayer(re).filter)},K.prototype.setLayoutProperty=function(re,ye,Ue,ke){ke===void 0&&(ke={}),this._checkLoaded();var Qe=this.getLayer(re);if(!Qe){this.fire(new e.ErrorEvent(new Error("The layer '"+re+"' does not exist in the map's style and cannot be styled.")));return}e.deepEqual(Qe.getLayoutProperty(ye),Ue)||(Qe.setLayoutProperty(ye,Ue,ke),this._updateLayer(Qe))},K.prototype.getLayoutProperty=function(re,ye){var Ue=this.getLayer(re);if(!Ue){this.fire(new e.ErrorEvent(new Error("The layer '"+re+"' does not exist in the map's style.")));return}return Ue.getLayoutProperty(ye)},K.prototype.setPaintProperty=function(re,ye,Ue,ke){ke===void 0&&(ke={}),this._checkLoaded();var Qe=this.getLayer(re);if(!Qe){this.fire(new e.ErrorEvent(new Error("The layer '"+re+"' does not exist in the map's style and cannot be styled.")));return}if(!e.deepEqual(Qe.getPaintProperty(ye),Ue)){var vt=Qe.setPaintProperty(ye,Ue,ke);vt&&this._updateLayer(Qe),this._changed=!0,this._updatedPaintProps[re]=!0}},K.prototype.getPaintProperty=function(re,ye){return this.getLayer(re).getPaintProperty(ye)},K.prototype.setFeatureState=function(re,ye){this._checkLoaded();var Ue=re.source,ke=re.sourceLayer,Qe=this.sourceCaches[Ue];if(Qe===void 0){this.fire(new e.ErrorEvent(new Error("The source '"+Ue+"' 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}re.id===void 0&&this.fire(new e.ErrorEvent(new Error("The feature id parameter must be provided."))),Qe.setFeatureState(ke,re.id,ye)},K.prototype.removeFeatureState=function(re,ye){this._checkLoaded();var Ue=re.source,ke=this.sourceCaches[Ue];if(ke===void 0){this.fire(new e.ErrorEvent(new Error("The source '"+Ue+"' does not exist in the map's style.")));return}var Qe=ke.getSource().type,vt=Qe==="vector"?re.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 re.id!="string"&&typeof re.id!="number"){this.fire(new e.ErrorEvent(new Error("A feature id is required to remove its specific state property.")));return}ke.removeFeatureState(vt,re.id,ye)},K.prototype.getFeatureState=function(re){this._checkLoaded();var ye=re.source,Ue=re.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"&&!Ue){this.fire(new e.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}return re.id===void 0&&this.fire(new e.ErrorEvent(new Error("The feature id parameter must be provided."))),ke.getFeatureState(Ue,re.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(re){return re.serialize()}),layers:this._serializeLayers(this._order)},function(re){return re!==void 0})},K.prototype._updateLayer=function(re){this._updatedLayers[re.id]=!0,re.source&&!this._updatedSources[re.source]&&this.sourceCaches[re.source].getSource().type!=="raster"&&(this._updatedSources[re.source]="reload",this.sourceCaches[re.source].pause()),this._changed=!0},K.prototype._flattenAndSortRenderedFeatures=function(re){for(var ye=this,Ue=function(ii){return ye._layers[ii].type==="fill-extrusion"},ke={},Qe=[],vt=this._order.length-1;vt>=0;vt--){var qt=this._order[vt];if(Ue(qt)){ke[qt]=vt;for(var br=0,Br=re;br=0;sr--){var dr=this._order[sr];if(Ue(dr))for(var lr=Qe.length-1;lr>=0;lr--){var Wt=Qe[lr].feature;if(ke[Wt.layer.id]>16,Qe>>16],u_pixel_coord_lower:[ke&65535,Qe&65535]}}function Jc(ge,K,xe,re){var ye=xe.imageManager.getPattern(ge.from.toString()),Ue=xe.imageManager.getPattern(ge.to.toString()),ke=xe.imageManager.getPixelSize(),Qe=ke.width,vt=ke.height,qt=Math.pow(2,re.tileID.overscaledZ),br=re.tileSize*Math.pow(2,xe.transform.tileZoom)/qt,Br=br*(re.tileID.canonical.x+re.tileID.wrap*qt),pr=br*re.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:ye.tl,u_pattern_br_a:ye.br,u_pattern_tl_b:Ue.tl,u_pattern_br_b:Ue.br,u_texsize:[Qe,vt],u_mix:K.t,u_pattern_size_a:ye.displaySize,u_pattern_size_b:Ue.displaySize,u_scale_a:K.fromScale,u_scale_b:K.toScale,u_tile_units_to_pixels:1/os(re,1,xe.transform.tileZoom),u_pixel_coord_upper:[Br>>16,pr>>16],u_pixel_coord_lower:[Br&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)}},nu=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,re){var ye=K.style.light,Ue=ye.properties.get("position"),ke=[Ue.x,Ue.y,Ue.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:re}},Xu=function(ge,K,xe,re,ye,Ue,ke){return e.extend(Vf(ge,K,xe,re),Wu(Ue,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)}},Vl=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}},$c=function(ge,K,xe,re){return e.extend(Lc(ge),Wu(xe,K,re))},sc=function(ge,K){return{u_matrix:ge,u_world:K}},Pc=function(ge,K,xe,re,ye){return e.extend($c(ge,K,xe,re),{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)}},xr=function(ge,K,xe,re){var ye=ge.transform,Ue,ke;if(re.paint.get("circle-pitch-alignment")==="map"){var Qe=os(xe,1,ye.zoom);Ue=!0,ke=[Qe,Qe]}else Ue=!1,ke=ye.pixelsToGLUnits;return{u_camera_to_center_distance:ye.cameraToCenterDistance,u_scale_with_map:+(re.paint.get("circle-pitch-scale")==="map"),u_matrix:ge.translatePosMatrix(K.posMatrix,xe,re.paint.get("circle-translate"),re.paint.get("circle-translate-anchor")),u_pitch_with_map:+Ue,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 re=os(xe,1,K.zoom),ye=Math.pow(2,K.zoom-xe.tileID.overscaledZ),Ue=xe.tileID.overscaleFactor();return{u_matrix:ge,u_camera_to_center_distance:K.cameraToCenterDistance,u_pixels_to_tile_units:re,u_extrude_scale:[K.pixelsToGLUnits[0]/(re*ye),K.pixelsToGLUnits[1]/(re*ye)],u_overscale_factor:Ue}},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,re){return{u_matrix:ge,u_extrude_scale:os(K,1,xe),u_intensity:re}},mi=function(ge,K,xe,re){var ye=e.create();e.ortho(ye,0,ge.width,ge.height,0,0,1);var Ue=ge.context.gl;return{u_matrix:ye,u_world:[Ue.drawingBufferWidth,Ue.drawingBufferHeight],u_image:xe,u_color_ramp:re,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)}},Qn=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)}},io=function(ge,K,xe){var re=xe.paint.get("hillshade-shadow-color"),ye=xe.paint.get("hillshade-highlight-color"),Ue=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:re,u_highlight:ye,u_accent:Ue}},eo=function(ge,K){var xe=K.stride,re=e.create();return e.ortho(re,0,e.EXTENT,-e.EXTENT,0,0,1),e.translate(re,re,[0,-e.EXTENT,0]),{u_matrix:re,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),re=K.canonical.y;return[new e.MercatorCoordinate(0,re/xe).toLngLat().lat,new e.MercatorCoordinate(0,(re+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)}},yo=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)}},Qo=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)}},ks=function(ge,K,xe){var re=ge.transform;return{u_matrix:Fl(ge,K,xe),u_ratio:1/os(K,1,re.zoom),u_device_pixel_ratio:e.browser.devicePixelRatio,u_units_to_pixels:[1/re.pixelsToGLUnits[0],1/re.pixelsToGLUnits[1]]}},rl=function(ge,K,xe,re){return e.extend(ks(ge,K,xe),{u_image:0,u_image_height:re})},Ns=function(ge,K,xe,re){var ye=ge.transform,Ue=Ss(K,ye);return{u_matrix:Fl(ge,K,xe),u_texsize:K.imageAtlasTexture.size,u_ratio:1/os(K,1,ye.zoom),u_device_pixel_ratio:e.browser.devicePixelRatio,u_image:0,u_scale:[Ue,re.fromScale,re.toScale],u_fade:re.t,u_units_to_pixels:[1/ye.pixelsToGLUnits[0],1/ye.pixelsToGLUnits[1]]}},el=function(ge,K,xe,re,ye){var Ue=ge.transform,ke=ge.lineAtlas,Qe=Ss(K,Ue),vt=xe.layout.get("line-cap")==="round",qt=ke.getDash(re.from,vt),br=ke.getDash(re.to,vt),Br=qt.width*ye.fromScale,pr=br.width*ye.toScale;return e.extend(ks(ge,K,xe),{u_patternscale_a:[Qe/Br,-qt.height/2],u_patternscale_b:[Qe/pr,-br.height/2],u_sdfgamma:ke.width/(Math.min(Br,pr)*256*e.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:qt.y,u_tex_y_b:br.y,u_mix:ye.t})};function Ss(ge,K){return 1/os(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 yl=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,re,ye){return{u_matrix:ge,u_tl_parent:K,u_scale_parent:xe,u_buffer_scale:1,u_fade_t:re.mix,u_opacity:re.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:Ro(ye.paint.get("raster-contrast")),u_spin_weights:Un(ye.paint.get("raster-hue-rotate"))}};function Un(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 Ro(ge){return ge>0?1/(1-ge):1+ge}function Js(ge){return ge>0?1-1/(1.001-ge):-ge}var Fs=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)}},cu=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,re,ye,Ue,ke,Qe,vt,qt){var br=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:br.cameraToCenterDistance,u_pitch:br.pitch/360*2*Math.PI,u_rotate_symbol:+xe,u_aspect_ratio:br.width/br.height,u_fade_change:ye.options.fadeDuration?ye.symbolFadeChange:1,u_matrix:Ue,u_label_plane_matrix:ke,u_coord_matrix:Qe,u_is_text:+vt,u_pitch_with_map:+re,u_texsize:qt,u_texture:0}},Ic=function(ge,K,xe,re,ye,Ue,ke,Qe,vt,qt,br){var Br=ye.transform;return e.extend(Zu(ge,K,xe,re,ye,Ue,ke,Qe,vt,qt),{u_gamma_scale:re?Math.cos(Br._pitch)*Br.cameraToCenterDistance:1,u_device_pixel_ratio:e.browser.devicePixelRatio,u_is_halo:+br})},bu=function(ge,K,xe,re,ye,Ue,ke,Qe,vt,qt){return e.extend(Ic(ge,K,xe,re,ye,Ue,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,re,ye,Ue){return e.extend(Jc(re,Ue,xe,ye),{u_matrix:ge,u_opacity:K})},Fo={fillExtrusion:Lf,fillExtrusionPattern:nu,fill:Cc,fillPattern:gc,fillOutline:Vl,fillOutlinePattern:xu,circle:Qt,collisionBox:aa,collisionCircle:$r,debug:Ci,clippingMask:Qi,heatmap:Pi,heatmapTexture:Di,hillshade:Sn,hillshadePrepare:Qn,line:Tn,lineGradient:un,linePattern:yo,lineSDF:Qo,raster:yl,symbolIcon:Fs,symbolSDF:cu,symbolTextAndIcon:Iu,background:Rc,backgroundPattern:Au},Dc;function lc(ge,K,xe,re,ye,Ue,ke){for(var Qe=ge.context,vt=Qe.gl,qt=ge.useProgram("collisionBox"),br=[],Br=0,pr=0,mt=0;mt0){var lr=e.create(),Wt=hr;e.mul(lr,rr.placementInvProjMatrix,ge.transform.glCoordMatrix),e.mul(lr,lr,rr.placementViewportMatrix),br.push({circleArray:dr,circleOffset:pr,transform:Wt,invTransform:lr}),Br+=dr.length/4,pr=Br}sr&&qt.draw(Qe,vt.LINES,Ra.disabled,Ca.disabled,ge.colorModeForRenderPass(),Fr.disabled,ka(hr,ge.transform,Ft),xe.id,sr.layoutVertexBuffer,sr.indexBuffer,sr.segments,null,ge.transform.zoom,null,null,sr.collisionVertexBuffer)}}if(!(!ke||!br.length)){var ir=ge.useProgram("collisionCircle"),Gt=new e.StructArrayLayout2f1f2i16;Gt.resize(Br*4),Gt._trim();for(var Dr=0,Jr=0,ya=br;Jr=0&&(Mt[rr.associatedIconIndex]={shiftedAnchor:ai,angle:Zi})}}if(br){mt.clear();for(var ui=ge.icon.placedSymbolArray,_i=0;_i0){var ke=e.browser.now(),Qe=(ke-ge.timeAdded)/Ue,vt=K?(ke-K.timeAdded)/Ue:-1,qt=xe.getSource(),br=ye.coveringZoomLevel({tileSize:qt.tileSize,roundZoom:qt.roundZoom}),Br=!K||Math.abs(K.tileID.overscaledZ-br)>Math.abs(ge.tileID.overscaledZ-br),pr=Br&&ge.refreshedUponExpiration?1:e.clamp(Br?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 Er(ge,K,xe){var re=xe.paint.get("background-color"),ye=xe.paint.get("background-opacity");if(ye!==0){var Ue=ge.context,ke=Ue.gl,Qe=ge.transform,vt=Qe.tileSize,qt=xe.paint.get("background-pattern");if(!ge.isPatternMissing(qt)){var br=!qt&&re.a===1&&ye===1&&ge.opaquePassEnabledForLayer()?"opaque":"translucent";if(ge.renderPass===br){var Br=Ca.disabled,pr=ge.depthModeForSublayer(0,br==="opaque"?Ra.ReadWrite:Ra.ReadOnly),mt=ge.colorModeForRenderPass(),Mt=ge.useProgram(qt?"backgroundPattern":"background"),Ft=Qe.coveringTiles({tileSize:vt});qt&&(Ue.activeTexture.set(ke.TEXTURE0),ge.imageManager.bind(ge.context));for(var rr=xe.getCrossfadeParameters(),hr=0,sr=Ft;hr "+xe.overscaledZ);var hr=rr+" "+mt+"kb";Ao(ge,hr),ke.draw(re,ye.TRIANGLES,Qe,vt,Rt.alphaBlended,Fr.disabled,Hi(Ue,e.Color.transparent,Ft),br,ge.debugBuffer,ge.quadTriangleIndexBuffer,ge.debugSegments)}function Ao(ge,K){ge.initDebugOverlayCanvas();var xe=ge.debugOverlayCanvas,re=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(re.LINEAR,re.CLAMP_TO_EDGE)}function ls(ge,K,xe){var re=ge.context,ye=xe.implementation;if(ge.renderPass==="offscreen"){var Ue=ye.prerender;Ue&&(ge.setCustomLayerDefaults(),re.setColorMode(ge.colorModeForRenderPass()),Ue.call(ye,re.gl,ge.transform.customLayerMatrix()),re.setDirty(),ge.setBaseState())}else if(ge.renderPass==="translucent"){ge.setCustomLayerDefaults(),re.setColorMode(ge.colorModeForRenderPass()),re.setStencilMode(Ca.disabled);var ke=ye.renderingMode==="3d"?new Ra(ge.context.gl.LEQUAL,Ra.ReadWrite,ge.depthRangeFor3D):ge.depthModeForSublayer(0,Ra.ReadOnly);re.setDepthMode(ke),ye.render(re.gl,ge.transform.customLayerMatrix()),re.setDirty(),ge.setBaseState(),re.bindFramebuffer.set(null)}}var Mo={symbol:I,circle:Ot,heatmap:$t,line:na,fill:qe,"fill-extrusion":lt,hillshade:Et,raster:ur,background:Er,debug:Kn,custom:ls},Yo=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 Ks,this.gpuTimers={}};Yo.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 re=0,ye=this.style._order;re256&&this.clearStencil(),re.setColorMode(Rt.disabled),re.setDepthMode(Ra.disabled);var Ue=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)},Yo.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)},Yo.prototype.stencilConfigForOverlap=function(K){var xe,re=this.context.gl,ye=K.sort(function(qt,br){return br.overscaledZ-qt.overscaledZ}),Ue=ye[ye.length-1].overscaledZ,ke=ye[0].overscaledZ-Ue+1;if(ke>1){this.currentStencilSource=void 0,this.nextStencilID+ke>256&&this.clearStencil();for(var Qe={},vt=0;vt=0;this.currentLayer--){var lr=this.style._layers[ye[this.currentLayer]],Wt=Ue[lr.source],ir=vt[lr.source];this._renderTileClippingMasks(lr,ir),this.renderLayer(this,Wt,lr,ir)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer0?xe.pop():null},Yo.prototype.isPatternMissing=function(K){if(!K)return!1;if(!K.from||!K.to)return!0;var xe=this.imageManager.getPattern(K.from.toString()),re=this.imageManager.getPattern(K.to.toString());return!xe||!re},Yo.prototype.useProgram=function(K,xe){this.cache=this.cache||{};var re=""+K+(xe?xe.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[re]||(this.cache[re]=new gf(this.context,K,uf[K],xe,Fo[K],this._showOverdrawInspector)),this.cache[re]},Yo.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()},Yo.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)},Yo.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)}},Yo.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var ds=function(K,xe){this.points=K,this.planes=xe};ds.fromInvProjectionMatrix=function(K,xe,re){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]],Ue=Math.pow(2,re),ke=ye.map(function(qt){return e.transformMat4([],qt,K)}).map(function(qt){return e.scale$1([],qt,1/qt[3]/xe*Ue)}),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 br=e.sub([],ke[qt[0]],ke[qt[1]]),Br=e.sub([],ke[qt[2]],ke[qt[1]]),pr=e.normalize([],e.cross([],br,Br)),mt=-e.dot(pr,ke[qt[1]]);return pr.concat(mt)});return new ds(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],re=e.clone$2(this.min),ye=e.clone$2(this.max),Ue=0;Ue=0;if(ke===0)return 0;ke!==xe.length&&(re=!1)}if(re)return 2;for(var vt=0;vt<3;vt++){for(var qt=Number.MAX_VALUE,br=-Number.MAX_VALUE,Br=0;Brthis.max[vt]-this.min[vt])return 0}return 1};var tl=function(K,xe,re,ye){if(K===void 0&&(K=0),xe===void 0&&(xe=0),re===void 0&&(re=0),ye===void 0&&(ye=0),isNaN(K)||K<0||isNaN(xe)||xe<0||isNaN(re)||re<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=re,this.right=ye};tl.prototype.interpolate=function(K,xe,re){return xe.top!=null&&K.top!=null&&(this.top=e.number(K.top,xe.top,re)),xe.bottom!=null&&K.bottom!=null&&(this.bottom=e.number(K.bottom,xe.bottom,re)),xe.left!=null&&K.left!=null&&(this.left=e.number(K.left,xe.left,re)),xe.right!=null&&K.right!=null&&(this.right=e.number(K.right,xe.right,re)),this},tl.prototype.getCenter=function(K,xe){var re=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(re,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 es=function(K,xe,re,ye,Ue){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=Ue===void 0?!0:Ue,this._minZoom=K||0,this._maxZoom=xe||22,this._minPitch=re??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={}},ts={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}};es.prototype.clone=function(){var K=new es(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},ts.minZoom.get=function(){return this._minZoom},ts.minZoom.set=function(ge){this._minZoom!==ge&&(this._minZoom=ge,this.zoom=Math.max(this.zoom,ge))},ts.maxZoom.get=function(){return this._maxZoom},ts.maxZoom.set=function(ge){this._maxZoom!==ge&&(this._maxZoom=ge,this.zoom=Math.min(this.zoom,ge))},ts.minPitch.get=function(){return this._minPitch},ts.minPitch.set=function(ge){this._minPitch!==ge&&(this._minPitch=ge,this.pitch=Math.max(this.pitch,ge))},ts.maxPitch.get=function(){return this._maxPitch},ts.maxPitch.set=function(ge){this._maxPitch!==ge&&(this._maxPitch=ge,this.pitch=Math.min(this.pitch,ge))},ts.renderWorldCopies.get=function(){return this._renderWorldCopies},ts.renderWorldCopies.set=function(ge){ge===void 0?ge=!0:ge===null&&(ge=!1),this._renderWorldCopies=ge},ts.worldSize.get=function(){return this.tileSize*this.scale},ts.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},ts.size.get=function(){return new e.Point(this.width,this.height)},ts.bearing.get=function(){return-this.angle/Math.PI*180},ts.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))},ts.pitch.get=function(){return this._pitch/Math.PI*180},ts.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())},ts.fov.get=function(){return this._fov/Math.PI*180},ts.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())},ts.zoom.get=function(){return this._zoom},ts.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())},ts.center.get=function(){return this._center},ts.center.set=function(ge){ge.lat===this._center.lat&&ge.lng===this._center.lng||(this._unmodified=!1,this._center=ge,this._constrain(),this._calcMatrices())},ts.padding.get=function(){return this._edgeInsets.toJSON()},ts.padding.set=function(ge){this._edgeInsets.equals(ge)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,ge,1),this._calcMatrices())},ts.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},es.prototype.isPaddingEqual=function(K){return this._edgeInsets.equals(K)},es.prototype.interpolatePadding=function(K,xe,re){this._unmodified=!1,this._edgeInsets.interpolate(K,xe,re),this._constrain(),this._calcMatrices()},es.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)},es.prototype.getVisibleUnwrappedCoordinates=function(K){var xe=[new e.UnwrappedTileID(0,K)];if(this._renderWorldCopies)for(var re=this.pointCoordinate(new e.Point(0,0)),ye=this.pointCoordinate(new e.Point(this.width,0)),Ue=this.pointCoordinate(new e.Point(this.width,this.height)),ke=this.pointCoordinate(new e.Point(0,this.height)),Qe=Math.floor(Math.min(re.x,ye.x,Ue.x,ke.x)),vt=Math.floor(Math.max(re.x,ye.x,Ue.x,ke.x)),qt=1,br=Qe-qt;br<=vt+qt;br++)br!==0&&xe.push(new e.UnwrappedTileID(br,K));return xe},es.prototype.coveringTiles=function(K){var xe=this.coveringZoomLevel(K),re=xe;if(K.minzoom!==void 0&&xeK.maxzoom&&(xe=K.maxzoom);var ye=e.MercatorCoordinate.fromLngLat(this.center),Ue=Math.pow(2,xe),ke=[Ue*ye.x,Ue*ye.y,0],Qe=ds.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,xe),vt=K.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(vt=xe);var qt=3,br=function(Ga){return{aabb:new ul([Ga*Ue,0,0],[(Ga+1)*Ue,Ue,0]),zoom:0,x:0,y:0,wrap:Ga,fullyVisible:!1}},Br=[],pr=[],mt=xe,Mt=K.reparseOverscaled?re:xe;if(this._renderWorldCopies)for(var Ft=1;Ft<=3;Ft++)Br.push(br(-Ft)),Br.push(br(Ft));for(Br.push(br(0));Br.length>0;){var rr=Br.pop(),hr=rr.x,sr=rr.y,dr=rr.fullyVisible;if(!dr){var lr=rr.aabb.intersects(Qe);if(lr===0)continue;dr=lr===2}var Wt=rr.aabb.distanceX(ke),ir=rr.aabb.distanceY(ke),Gt=Math.max(Math.abs(Wt),Math.abs(ir)),Dr=qt+(1<Dr&&rr.zoom>=vt){pr.push({tileID:new e.OverscaledTileID(rr.zoom===mt?Mt:rr.zoom,rr.wrap,rr.zoom,hr,sr),distanceSq:e.sqrLen([ke[0]-.5-hr,ke[1]-.5-sr])});continue}for(var Jr=0;Jr<4;Jr++){var ya=(hr<<1)+Jr%2,vi=(sr<<1)+(Jr>>1);Br.push({aabb:rr.aabb.quadrant(Jr),zoom:rr.zoom+1,x:ya,y:vi,wrap:rr.wrap,fullyVisible:dr})}}return pr.sort(function(Ga,ai){return Ga.distanceSq-ai.distanceSq}).map(function(Ga){return Ga.tileID})},es.prototype.resize=function(K,xe){this.width=K,this.height=xe,this.pixelsToGLUnits=[2/K,-2/xe],this._constrain(),this._calcMatrices()},ts.unmodified.get=function(){return this._unmodified},es.prototype.zoomScale=function(K){return Math.pow(2,K)},es.prototype.scaleZoom=function(K){return Math.log(K)/Math.LN2},es.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)},es.prototype.unproject=function(K){return new e.MercatorCoordinate(K.x/this.worldSize,K.y/this.worldSize).toLngLat()},ts.point.get=function(){return this.project(this.center)},es.prototype.setLocationAtPoint=function(K,xe){var re=this.pointCoordinate(xe),ye=this.pointCoordinate(this.centerPoint),Ue=this.locationCoordinate(K),ke=new e.MercatorCoordinate(Ue.x-(re.x-ye.x),Ue.y-(re.y-ye.y));this.center=this.coordinateLocation(ke),this._renderWorldCopies&&(this.center=this.center.wrap())},es.prototype.locationPoint=function(K){return this.coordinatePoint(this.locationCoordinate(K))},es.prototype.pointLocation=function(K){return this.coordinateLocation(this.pointCoordinate(K))},es.prototype.locationCoordinate=function(K){return e.MercatorCoordinate.fromLngLat(K)},es.prototype.coordinateLocation=function(K){return K.toLngLat()},es.prototype.pointCoordinate=function(K){var xe=0,re=[K.x,K.y,0,1],ye=[K.x,K.y,1,1];e.transformMat4(re,re,this.pixelMatrixInverse),e.transformMat4(ye,ye,this.pixelMatrixInverse);var Ue=re[3],ke=ye[3],Qe=re[0]/Ue,vt=ye[0]/ke,qt=re[1]/Ue,br=ye[1]/ke,Br=re[2]/Ue,pr=ye[2]/ke,mt=Br===pr?0:(xe-Br)/(pr-Br);return new e.MercatorCoordinate(e.number(Qe,vt,mt)/this.worldSize,e.number(qt,br,mt)/this.worldSize)},es.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])},es.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)))},es.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]])},es.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])},es.prototype.calculatePosMatrix=function(K,xe){xe===void 0&&(xe=!1);var re=K.key,ye=xe?this._alignedPosMatrixCache:this._posMatrixCache;if(ye[re])return ye[re];var Ue=K.canonical,ke=this.worldSize/this.zoomScale(Ue.z),Qe=Ue.x+Math.pow(2,Ue.z)*K.wrap,vt=e.identity(new Float64Array(16));return e.translate(vt,vt,[Qe*ke,Ue.y*ke,0]),e.scale(vt,vt,[ke/e.EXTENT,ke/e.EXTENT,1]),e.multiply(vt,xe?this.alignedProjMatrix:this.projMatrix,vt),ye[re]=new Float32Array(vt),ye[re]},es.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},es.prototype._constrain=function(){if(!(!this.center||!this.width||!this.height||this._constraining)){this._constraining=!0;var K=-90,xe=90,re=-180,ye=180,Ue,ke,Qe,vt,qt=this.size,br=this._unmodified;if(this.latRange){var Br=this.latRange;K=e.mercatorYfromLat(Br[1])*this.worldSize,xe=e.mercatorYfromLat(Br[0])*this.worldSize,Ue=xe-Kxe&&(vt=xe-rr)}if(this.lngRange){var hr=mt.x,sr=qt.x/2;hr-srye&&(Qe=ye-sr)}(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=br,this._constraining=!1}},es.prototype._calcMatrices=function(){if(this.height){var K=this._fov/2,xe=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(K)*this.height;var re=Math.PI/2+this._pitch,ye=this._fov*(.5+xe.y/this.height),Ue=Math.sin(ye)*this.cameraToCenterDistance/Math.sin(e.clamp(Math.PI-re-ye,.01,Math.PI-.01)),ke=this.point,Qe=ke.x,vt=ke.y,qt=Math.cos(Math.PI/2-this._pitch)*Ue+this.cameraToCenterDistance,br=qt*1.01,Br=this.height/50,pr=new Float64Array(16);e.perspective(pr,this._fov,this.width/this.height,Br,br),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,Mt=this.height%2/2,Ft=Math.cos(this.angle),rr=Math.sin(this.angle),hr=Qe-Math.round(Qe)+Ft*mt+rr*Mt,sr=vt-Math.round(vt)+Ft*Mt+rr*mt,dr=new Float64Array(pr);if(e.translate(dr,dr,[hr>.5?hr-1:hr,sr>.5?sr-1:sr,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={}}},es.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],re=e.transformMat4(xe,xe,this.pixelMatrix);return re[3]/this.cameraToCenterDistance},es.prototype.getCameraPoint=function(){var K=this._pitch,xe=Math.tan(K)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new e.Point(0,xe))},es.prototype.getCameraQueryGeometry=function(K){var xe=this.getCameraPoint();if(K.length===1)return[K[0],xe];for(var re=xe.x,ye=xe.y,Ue=xe.x,ke=xe.y,Qe=0,vt=K;Qe=3&&!K.some(function(re){return isNaN(re)})){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},tu.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),wl=e.extend({deceleration:20,maxSpeed:1400},Ru),fu=e.extend({deceleration:1e3,maxSpeed:360},Ru),uc=e.extend({deceleration:1e3,maxSpeed:90},Ru),Gl=function(K){this._map=K,this.clear()};Gl.prototype.clear=function(){this._inertiaBuffer=[]},Gl.prototype.record=function(K){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:e.browser.now(),settings:K})},Gl.prototype._drainInertiaBuffer=function(){for(var K=this._inertiaBuffer,xe=e.browser.now(),re=160;K.length>0&&xe-K[0].time>re;)K.shift()},Gl.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},re=0,ye=this._inertiaBuffer;re=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 re=xe;if(!(this._lastPos.equals(re)||!this._box&&re.dist(this._startPos)this.numTouches)&&(this.aborted=!0),!this.aborted&&(this.startTime===void 0&&(this.startTime=K.timeStamp),re.length===this.numTouches&&(this.centroid=_r(xe),this.touches=zt(re,xe)))},pa.prototype.touchmove=function(K,xe,re){if(!(this.aborted||!this.centroid)){var ye=zt(re,xe);for(var Ue in this.touches){var ke=this.touches[Ue],Qe=ye[Ue];(!Qe||Qe.dist(ke)>wa)&&(this.aborted=!0)}}},pa.prototype.touchend=function(K,xe,re){if((!this.centroid||K.timeStamp-this.startTime>Xr)&&(this.aborted=!0),re.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,re){this.singleTap.touchstart(K,xe,re)},Ja.prototype.touchmove=function(K,xe,re){this.singleTap.touchmove(K,xe,re)},Ja.prototype.touchend=function(K,xe,re){var ye=this.singleTap.touchend(K,xe,re);if(ye){var Ue=K.timeStamp-this.lastTime0&&(this._active=!0);var ye=zt(re,xe),Ue=new e.Point(0,0),ke=new e.Point(0,0),Qe=0;for(var vt in ye){var qt=ye[vt],br=this._touches[vt];br&&(Ue._add(qt),ke._add(qt.sub(br)),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(re){this._lastPoints=re,_l(re[0].sub(re[1]))&&(this._valid=!1)},K.prototype._move=function(re,ye,Ue){var ke=re[0].sub(this._lastPoints[0]),Qe=re[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(ke,Qe,Ue.timeStamp),!!this._valid){this._lastPoints=re,this._active=!0;var vt=(ke.y+Qe.y)/2,qt=-.5;return{pitchDelta:vt*qt}}},K.prototype.gestureBeginsVertically=function(re,ye,Ue){if(this._valid!==void 0)return this._valid;var ke=2,Qe=re.mag()>=ke,vt=ye.mag()>=ke;if(!(!Qe&&!vt)){if(!Qe||!vt)return this._firstMove===void 0&&(this._firstMove=Ue),Ue-this._firstMove0==ye.y>0;return _l(re)&&_l(ye)&&qt}},K}(In),fs={panStep:100,bearingStep:15,pitchStep:10},ms=function(){var K=fs;this._panStep=K.panStep,this._bearingStep=K.bearingStep,this._pitchStep=K.pitchStep,this._rotationDisabled=!1};ms.prototype.reset=function(){this._active=!1},ms.prototype.keydown=function(K){var xe=this;if(!(K.altKey||K.ctrlKey||K.metaKey)){var re=0,ye=0,Ue=0,ke=0,Qe=0;switch(K.keyCode){case 61:case 107:case 171:case 187:re=1;break;case 189:case 109:case 173:re=-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?Ue=1:(K.preventDefault(),Qe=-1);break;case 40:K.shiftKey?Ue=-1:(K.preventDefault(),Qe=1);break;default:return}return this._rotationDisabled&&(ye=0,Ue=0),{cameraAnimation:function(vt){var qt=vt.getZoom();vt.easeTo({duration:300,easeId:"keyboardHandler",easing:Tl,zoom:re?Math.round(qt)+re*(K.shiftKey?2:1):qt,bearing:vt.getBearing()+ye*xe._bearingStep,pitch:vt.getPitch()+Ue*xe._pitchStep,offset:[-ke*xe._panStep,-Qe*xe._panStep],center:vt.getCenter()},{originalEvent:K})}}}},ms.prototype.enable=function(){this._enabled=!0},ms.prototype.disable=function(){this._enabled=!1,this.reset()},ms.prototype.isEnabled=function(){return this._enabled},ms.prototype.isActive=function(){return this._active},ms.prototype.disableRotation=function(){this._rotationDisabled=!0},ms.prototype.enableRotation=function(){this._rotationDisabled=!1};function Tl(ge){return ge*(2-ge)}var Wl=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,re=e.browser.now(),ye=re-(this._lastWheelEventTime||0);this._lastWheelEventTime=re,xe!==0&&xe%Wl===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 re=this._type==="wheel"&&Math.abs(this._delta)>Wl?this._wheelZoomRate:this._defaultZoomRate,ye=_c/(1+Math.exp(-Math.abs(this._delta*re)));this._delta<0&&ye!==0&&(ye=1/ye);var Ue=typeof this._targetZoom=="number"?xe.zoomScale(this._targetZoom):xe.scale;this._targetZoom=Math.min(xe.maxZoom,Math.max(xe.minZoom,xe.scaleZoom(Ue*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,br;if(this._type==="wheel"&&Qe&&vt){var Br=Math.min((e.browser.now()-this._lastWheelEventTime)/200,1),pr=vt(Br);br=e.number(Qe,ke,pr),Br<1?this._frameId||(this._frameId=!0):qt=!0}else br=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:br-xe.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},it.prototype._smoothOutEasing=function(K){var xe=e.ease;if(this._prevEase){var re=this._prevEase,ye=(e.browser.now()-re.start)/re.duration,Ue=re.easing(ye+.01)-re.easing(ye),ke=.27/Math.sqrt(Ue*Ue+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 Xt=function(K,xe){this._clickZoom=K,this._tapZoom=xe};Xt.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},Xt.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},Xt.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},Xt.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var fr=function(){this.reset()};fr.prototype.reset=function(){this._active=!1},fr.prototype.dblclick=function(K,xe){return K.preventDefault(),{cameraAnimation:function(re){re.easeTo({duration:300,zoom:re.getZoom()+(K.shiftKey?-1:1),around:re.unproject(xe)},{originalEvent:K})}}},fr.prototype.enable=function(){this._enabled=!0},fr.prototype.disable=function(){this._enabled=!1,this.reset()},fr.prototype.isEnabled=function(){return this._enabled},fr.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,re){this._swipePoint||(this._tapTime&&K.timeStamp-this._tapTime>Gr&&this.reset(),this._tapTime?re.length>0&&(this._swipePoint=xe[0],this._swipeTouch=re[0].identifier):this._tap.touchstart(K,xe,re))},oa.prototype.touchmove=function(K,xe,re){if(!this._tapTime)this._tap.touchmove(K,xe,re);else if(this._swipePoint){if(re[0].identifier!==this._swipeTouch)return;var ye=xe[0],Ue=ye.y-this._swipePoint.y;return this._swipePoint=ye,K.preventDefault(),this._active=!0,{zoomDelta:Ue/128}}},oa.prototype.touchend=function(K,xe,re){if(this._tapTime)this._swipePoint&&re.length===0&&this.reset();else{var ye=this._tap.touchend(K,xe,re);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 Ta=function(K,xe,re){this._el=K,this._mousePan=xe,this._touchPan=re};Ta.prototype.enable=function(K){this._inertiaOptions=K||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},Ta.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},Ta.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},Ta.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var ma=function(K,xe,re){this._pitchWithRotate=K.pitchWithRotate,this._mouseRotate=xe,this._mousePitch=re};ma.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},ma.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},ma.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},ma.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var xa=function(K,xe,re,ye){this._el=K,this._touchZoom=xe,this._touchRotate=re,this._tapDragZoom=ye,this._rotationDisabled=!1,this._enabled=!0};xa.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")},xa.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},xa.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},xa.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},xa.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},xa.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 Gl(K),this._bearingSnap=xe.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(xe),e.bindAll(["handleEvent","handleWindowEvent"],this);var re=this._el;this._listeners=[[re,"touchstart",{passive:!0}],[re,"touchmove",{passive:!1}],[re,"touchend",void 0],[re,"touchcancel",void 0],[re,"mousedown",void 0],[re,"mousemove",void 0],[re,"mouseup",void 0],[e.window.document,"mousemove",{capture:!0}],[e.window.document,"mouseup",void 0],[re,"mouseover",void 0],[re,"mouseout",void 0],[re,"dblclick",void 0],[re,"click",void 0],[re,"keydown",{capture:!1}],[re,"keyup",void 0],[re,"wheel",{passive:!1}],[re,"contextmenu",void 0],[e.window,"blur",void 0]];for(var ye=0,Ue=this._listeners;yeQe?Math.min(2,Wt):Math.max(.5,Wt),Ga=Math.pow(vi,1-Jr),ai=ke.unproject(dr.add(lr.mult(Jr*Ga)).mult(ya));ke.setLocationAtPoint(ke.renderWorldCopies?ai.wrap():ai,rr)}Ue._fireMoveEvents(ye)},function(Jr){Ue._afterEase(ye,Jr)},re),this},K.prototype._prepareEase=function(re,ye,Ue){Ue===void 0&&(Ue={}),this._moving=!0,!ye&&!Ue.moving&&this.fire(new e.Event("movestart",re)),this._zooming&&!Ue.zooming&&this.fire(new e.Event("zoomstart",re)),this._rotating&&!Ue.rotating&&this.fire(new e.Event("rotatestart",re)),this._pitching&&!Ue.pitching&&this.fire(new e.Event("pitchstart",re))},K.prototype._fireMoveEvents=function(re){this.fire(new e.Event("move",re)),this._zooming&&this.fire(new e.Event("zoom",re)),this._rotating&&this.fire(new e.Event("rotate",re)),this._pitching&&this.fire(new e.Event("pitch",re))},K.prototype._afterEase=function(re,ye){if(!(this._easeId&&ye&&this._easeId===ye)){delete this._easeId;var Ue=this._zooming,ke=this._rotating,Qe=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,Ue&&this.fire(new e.Event("zoomend",re)),ke&&this.fire(new e.Event("rotateend",re)),Qe&&this.fire(new e.Event("pitchend",re)),this.fire(new e.Event("moveend",re))}},K.prototype.flyTo=function(re,ye){var Ue=this;if(!re.essential&&e.browser.prefersReducedMotion){var ke=e.pick(re,["center","zoom","bearing","pitch","around"]);return this.jumpTo(ke,ye)}this.stop(),re=e.extend({offset:[0,0],speed:1.2,curve:1.42,easing:e.ease},re);var Qe=this.transform,vt=this.getZoom(),qt=this.getBearing(),br=this.getPitch(),Br=this.getPadding(),pr="zoom"in re?e.clamp(+re.zoom,Qe.minZoom,Qe.maxZoom):vt,mt="bearing"in re?this._normalizeBearing(re.bearing,qt):qt,Mt="pitch"in re?+re.pitch:br,Ft="padding"in re?re.padding:Qe.padding,rr=Qe.zoomScale(pr-vt),hr=e.Point.convert(re.offset),sr=Qe.centerPoint.add(hr),dr=Qe.pointLocation(sr),lr=e.LngLat.convert(re.center||dr);this._normalizeCenter(lr);var Wt=Qe.project(dr),ir=Qe.project(lr).sub(Wt),Gt=re.curve,Dr=Math.max(Qe.width,Qe.height),Jr=Dr/rr,ya=ir.mag();if("minZoom"in re){var vi=e.clamp(Math.min(re.minZoom,vt,pr),Qe.minZoom,Qe.maxZoom),Ga=Dr/Qe.zoomScale(vi-vt);Gt=Math.sqrt(Ga/ya*2)}var ai=Gt*Gt;function Zi(Oo){var Cs=(Jr*Jr-Dr*Dr+(Oo?-1:1)*ai*ai*ya*ya)/(2*(Oo?Jr:Dr)*ai*ya);return Math.log(Math.sqrt(Cs*Cs+1)-Cs)}function Fi(Oo){return(Math.exp(Oo)-Math.exp(-Oo))/2}function ui(Oo){return(Math.exp(Oo)+Math.exp(-Oo))/2}function _i(Oo){return Fi(Oo)/ui(Oo)}var Si=Zi(0),Ui=function(Oo){return ui(Si)/ui(Si+Gt*Oo)},fn=function(Oo){return Dr*((ui(Si)*_i(Si+Gt*Oo)-Fi(Si))/ai)/ya},_o=(Zi(1)-Si)/Gt;if(Math.abs(ya)<1e-6||!isFinite(_o)){if(Math.abs(Dr-Jr)<1e-6)return this.easeTo(re,ye);var Uo=Jrre.maxDuration&&(re.duration=0),this._zooming=!0,this._rotating=qt!==mt,this._pitching=Mt!==br,this._padding=!Qe.isPaddingEqual(Ft),this._prepareEase(ye,!1),this._ease(function(Oo){var Cs=Oo*_o,Ys=1/Ui(Cs);Qe.zoom=Oo===1?pr:vt+Qe.scaleZoom(Ys),Ue._rotating&&(Qe.bearing=e.number(qt,mt,Oo)),Ue._pitching&&(Qe.pitch=e.number(br,Mt,Oo)),Ue._padding&&(Qe.interpolatePadding(Br,Ft,Oo),sr=Qe.centerPoint.add(hr));var mu=Oo===1?lr:Qe.unproject(Wt.add(ir.mult(fn(Cs))).mult(Ys));Qe.setLocationAtPoint(Qe.renderWorldCopies?mu.wrap():mu,sr),Ue._fireMoveEvents(ye)},function(){return Ue._afterEase(ye)},re),this},K.prototype.isEasing=function(){return!!this._easeFrameId},K.prototype.stop=function(){return this._stop()},K.prototype._stop=function(re,ye){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var Ue=this._onEaseEnd;delete this._onEaseEnd,Ue.call(this,ye)}if(!re){var ke=this.handlers;ke&&ke.stop(!1)}return this},K.prototype._ease=function(re,ye,Ue){Ue.animate===!1||Ue.duration===0?(re(1),ye()):(this._easeStart=e.browser.now(),this._easeOptions=Ue,this._onEaseFrame=re,this._onEaseEnd=ye,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},K.prototype._renderFrameCallback=function(){var re=Math.min((e.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(re)),re<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},K.prototype._normalizeBearing=function(re,ye){re=e.wrap(re,-180,180);var Ue=Math.abs(re-ye);return Math.abs(re-360-ye)180?-360:Ue<-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 re=this._map._getUIString("AttributionControl."+xe);K.title=re,K.setAttribute("aria-label",re)},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 re=xe.reduce(function(ye,Ue,ke){return Ue.value&&(ye+=Ue.key+"="+Ue.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 re=K[xe].getSource();if(re.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,re=this._queue;return re.push({callback:K,id:xe,cancelled:!1}),xe},Na.prototype.remove=function(K){for(var xe=this._currentlyRunning,re=xe?this._queue.concat(xe):this._queue,ye=0,Ue=re;yere.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(re.minPitch!=null&&re.maxPitch!=null&&re.minPitch>re.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(re.minPitch!=null&&re.minPitchhn)throw new Error("maxPitch must be less than or equal to "+hn);var Ue=new es(re.minZoom,re.maxZoom,re.minPitch,re.maxPitch,re.renderWorldCopies);if(ge.call(this,Ue,re),this._interactive=re.interactive,this._maxTileCacheSize=re.maxTileCacheSize,this._failIfMajorPerformanceCaveat=re.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=re.preserveDrawingBuffer,this._antialias=re.antialias,this._trackResize=re.trackResize,this._bearingSnap=re.bearingSnap,this._refreshExpiredTiles=re.refreshExpiredTiles,this._fadeDuration=re.fadeDuration,this._crossSourceCollisions=re.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=re.collectResourceTiming,this._renderTaskQueue=new Na,this._controls=[],this._mapId=e.uniqueId(),this._locale=e.extend({},ea,re.locale),this._clickTolerance=re.clickTolerance,this._requestManager=new e.RequestManager(re.transformRequest,re.accessToken),typeof re.container=="string"){if(this._container=e.window.document.getElementById(re.container),!this._container)throw new Error("Container '"+re.container+"' not found.")}else if(re.container instanceof Qa)this._container=re.container;else throw new Error("Invalid type: 'container' must be a String or HTMLElement.");if(re.maxBounds&&this.setMaxBounds(re.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,re);var ke=typeof re.hash=="string"&&re.hash||void 0;this._hash=re.hash&&new tu(ke).addTo(this),(!this._hash||!this._hash._onHashChange())&&(this.jumpTo({center:re.center,zoom:re.zoom,bearing:re.bearing,pitch:re.pitch}),re.bounds&&(this.resize(),this.fitBounds(re.bounds,e.extend({},re.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=re.localIdeographFontFamily,re.style&&this.setStyle(re.style,{localIdeographFontFamily:re.localIdeographFontFamily}),re.attributionControl&&this.addControl(new zi({customAttribution:re.customAttribution})),this.addControl(new Ei,re.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,Ue){if(Ue===void 0&&(ye.getDefaultPosition?Ue=ye.getDefaultPosition():Ue="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[Ue];return Ue.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 Ue=this._controls.indexOf(ye);return Ue>-1&&this._controls.splice(Ue,1),ye.onRemove(this),this},K.prototype.hasControl=function(ye){return this._controls.indexOf(ye)>-1},K.prototype.resize=function(ye){var Ue=this._containerDimensions(),ke=Ue[0],Qe=Ue[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,Ue,ke){var Qe=this,vt;if(ye==="mouseenter"||ye==="mouseover"){var qt=!1,br=function(rr){var hr=Qe.getLayer(Ue)?Qe.queryRenderedFeatures(rr.point,{layers:[Ue]}):[];hr.length?qt||(qt=!0,ke.call(Qe,new De(ye,Qe,rr.originalEvent,{features:hr}))):qt=!1},Br=function(){qt=!1};return{layer:Ue,listener:ke,delegates:{mousemove:br,mouseout:Br}}}else if(ye==="mouseleave"||ye==="mouseout"){var pr=!1,mt=function(rr){var hr=Qe.getLayer(Ue)?Qe.queryRenderedFeatures(rr.point,{layers:[Ue]}):[];hr.length?pr=!0:pr&&(pr=!1,ke.call(Qe,new De(ye,Qe,rr.originalEvent)))},Mt=function(rr){pr&&(pr=!1,ke.call(Qe,new De(ye,Qe,rr.originalEvent)))};return{layer:Ue,listener:ke,delegates:{mousemove:mt,mouseout:Mt}}}else{var Ft=function(rr){var hr=Qe.getLayer(Ue)?Qe.queryRenderedFeatures(rr.point,{layers:[Ue]}):[];hr.length&&(rr.features=hr,ke.call(Qe,rr),delete rr.features)};return{layer:Ue,listener:ke,delegates:(vt={},vt[ye]=Ft,vt)}}},K.prototype.on=function(ye,Ue,ke){if(ke===void 0)return ge.prototype.on.call(this,ye,Ue);var Qe=this._createDelegatedListener(ye,Ue,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,Ue,ke){if(ke===void 0)return ge.prototype.once.call(this,ye,Ue);var Qe=this._createDelegatedListener(ye,Ue,ke);for(var vt in Qe.delegates)this.once(vt,Qe.delegates[vt]);return this},K.prototype.off=function(ye,Ue,ke){var Qe=this;if(ke===void 0)return ge.prototype.off.call(this,ye,Ue);var vt=function(qt){for(var br=qt[ye],Br=0;Br180;){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 re=ge.classList;for(var ye in vn)re.remove("mapboxgl-"+xe+"-anchor-"+ye);re.add("mapboxgl-"+xe+"-anchor-"+K)}var Ii=function(ge){function K(xe,re){if(ge.call(this),(xe instanceof e.window.HTMLElement||re)&&(xe=e.extend({element:xe},re)),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"),Ue=41,ke=27;ye.setAttributeNS(null,"display","block"),ye.setAttributeNS(null,"height",Ue+"px"),ye.setAttributeNS(null,"width",ke+"px"),ye.setAttributeNS(null,"viewBox","0 0 "+ke+" "+Ue);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 br=[{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"}],Br=0,pr=br;Br=ye}this._isDragging&&(this._pos=re.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(re){this._element.contains(re.originalEvent.target)&&(re.preventDefault(),this._positionDelta=re.point.sub(this._pos).add(this._offset),this._pointerdownPos=re.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(re){return this._draggable=!!re,this._map&&(re?(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(re){return this._rotation=re||0,this._update(),this},K.prototype.getRotation=function(){return this._rotation},K.prototype.setRotationAlignment=function(re){return this._rotationAlignment=re||"auto",this._update(),this},K.prototype.getRotationAlignment=function(){return this._rotationAlignment},K.prototype.setPitchAlignment=function(re){return this._pitchAlignment=re&&re!=="auto"?re: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},Cn;function Dn(ge){Cn!==void 0?ge(Cn):e.window.navigator.permissions!==void 0?e.window.navigator.permissions.query({name:"geolocation"}).then(function(K){Cn=K.state!=="denied",ge(Cn)}):(Cn=!!e.window.navigator.geolocation,ge(Cn))}var Wn=0,Os=!1,xl=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(re){return this._map=re,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,Wn=0,Os=!1},K.prototype._isOutOfMapMaxBounds=function(re){var ye=this._map.getMaxBounds(),Ue=re.coords;return ye&&(Ue.longitudeye.getEast()||Ue.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(re){if(this._map){if(this._isOutOfMapMaxBounds(re)){this._setErrorState(),this.fire(new e.Event("outofmaxbounds",re)),this._updateMarker(),this._finish();return}if(this.options.trackUserLocation)switch(this._lastKnownPosition=re,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(re),(!this.options.trackUserLocation||this._watchState==="ACTIVE_LOCK")&&this._updateCamera(re),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new e.Event("geolocate",re)),this._finish()}},K.prototype._updateCamera=function(re){var ye=new e.LngLat(re.coords.longitude,re.coords.latitude),Ue=re.coords.accuracy,ke=this._map.getBearing(),Qe=e.extend({bearing:ke},this.options.fitBoundsOptions);this._map.fitBounds(ye.toBounds(Ue),Qe,{geolocateSource:!0})},K.prototype._updateMarker=function(re){if(re){var ye=new e.LngLat(re.coords.longitude,re.coords.latitude);this._accuracyCircleMarker.setLngLat(ye).addTo(this._map),this._userLocationDotMarker.setLngLat(ye).addTo(this._map),this._accuracy=re.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},K.prototype._updateCircleRadius=function(){var re=this._map._container.clientHeight/2,ye=this._map.unproject([0,re]),Ue=this._map.unproject([1,re]),ke=ye.distanceTo(Ue),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(re){if(this._map){if(this.options.trackUserLocation)if(re.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(re.code===3&&Os)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new e.Event("error",re)),this._finish()}},K.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},K.prototype._setupUI=function(re){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",re===!1){e.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");var Ue=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=Ue,this._geolocateButton.setAttribute("aria-label",Ue)}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":Wn--,Os=!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"),Wn++;var re;Wn>1?(re={maximumAge:6e5,timeout:0},Os=!0):(re=this.options.positionOptions,Os=!1),this._geolocationWatchID=e.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,re)}}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"},Xl=function(K){this.options=e.extend({},ho,K),e.bindAll(["_onMove","setUnit"],this)};Xl.prototype.getDefaultPosition=function(){return"bottom-left"},Xl.prototype._onMove=function(){hs(this._map,this._container,this.options)},Xl.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},Xl.prototype.onRemove=function(){r.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},Xl.prototype.setUnit=function(K){this.options.unit=K,hs(this._map,this._container,this.options)};function hs(ge,K,xe){var re=xe&&xe.maxWidth||100,ye=ge._container.clientHeight/2,Ue=ge.unproject([0,ye]),ke=ge.unproject([re,ye]),Qe=Ue.distanceTo(ke);if(xe&&xe.unit==="imperial"){var vt=3.2808*Qe;if(vt>5280){var qt=vt/5280;Al(K,re,qt,ge._getUIString("ScaleControl.Miles"))}else Al(K,re,vt,ge._getUIString("ScaleControl.Feet"))}else if(xe&&xe.unit==="nautical"){var br=Qe/1852;Al(K,re,br,ge._getUIString("ScaleControl.NauticalMiles"))}else Qe>=1e3?Al(K,re,Qe/1e3,ge._getUIString("ScaleControl.Kilometers")):Al(K,re,Qe,ge._getUIString("ScaleControl.Meters"))}function Al(ge,K,xe,re){var ye=ru(xe),Ue=ye/xe;ge.style.width=K*Ue+"px",ge.innerHTML=ye+" "+re}function El(ge){var K=Math.pow(10,Math.ceil(-Math.log(ge)/Math.LN10));return Math.round(ge*K)/K}function ru(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:El(xe),K*xe}var js=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")};js.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},js.prototype.onRemove=function(){r.remove(this._controlContainer),this._map=null,e.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},js.prototype._checkFullscreenSupport=function(){return!!(e.window.document.fullscreenEnabled||e.window.document.mozFullScreenEnabled||e.window.document.msFullscreenEnabled||e.window.document.webkitFullscreenEnabled)},js.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)},js.prototype._updateTitle=function(){var K=this._getTitle();this._fullscreenButton.setAttribute("aria-label",K),this._fullscreenButton.title=K},js.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},js.prototype._isFullscreen=function(){return this._fullscreen},js.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())},js.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"},bl=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", "),Xn=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(re){return this._map&&this.remove(),this._map=re,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(re){return this._lngLat=e.LngLat.convert(re),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(re){return this.setDOMContent(e.window.document.createTextNode(re))},K.prototype.setHTML=function(re){var ye=e.window.document.createDocumentFragment(),Ue=e.window.document.createElement("body"),ke;for(Ue.innerHTML=re;ke=Ue.firstChild,!!ke;)ye.appendChild(ke);return this.setDOMContent(ye)},K.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},K.prototype.setMaxWidth=function(re){return this.options.maxWidth=re,this._update(),this},K.prototype.setDOMContent=function(re){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(re),this._createCloseButton(),this._update(),this._focusFirstElement(),this},K.prototype.addClassName=function(re){this._container&&this._container.classList.add(re)},K.prototype.removeClassName=function(re){this._container&&this._container.classList.remove(re)},K.prototype.setOffset=function(re){return this.options.offset=re,this._update(),this},K.prototype.toggleClassName=function(re){if(this._container)return this._container.classList.toggle(re)},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(re){this._update(re.point)},K.prototype._onMouseMove=function(re){this._update(re.point)},K.prototype._onDrag=function(re){this._update(re.point)},K.prototype._update=function(re){var ye=this,Ue=this._lngLat||this._trackPointer;if(!(!this._map||!Ue||!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&&!re))){var ke=this._pos=this._trackPointer&&re?re:this._map.project(this._lngLat),Qe=this.options.anchor,vt=kl(this.options.offset);if(!Qe){var qt=this._container.offsetWidth,br=this._container.offsetHeight,Br;ke.y+vt.bottom.ythis._map.transform.height-br?Br=["bottom"]:Br=[],ke.xthis._map.transform.width-qt/2&&Br.push("right"),Br.length===0?Qe="bottom":Qe=Br.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 re=this._container.querySelector(bl);re&&re.focus()}},K.prototype._onClose=function(){this.remove()},K}(e.Evented);function kl(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 kl(new e.Point(0,0))}var Io={version:e.version,supported:t,setRTLTextPlugin:e.setRTLTextPlugin,getRTLTextPluginStatus:e.getRTLTextPluginStatus,Map:Ua,NavigationControl:Ti,GeolocateControl:xl,AttributionControl:zi,ScaleControl:Xl,FullscreenControl:js,Popup:Xn,Marker:Ii,Style:Ul,LngLat:e.LngLat,LngLatBounds:e.LngLatBounds,Point:e.Point,MercatorCoordinate:e.MercatorCoordinate,Evented:e.Evented,config:e.config,prewarm:tn,clearPrewarmedResources:cn,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 Io}),S})}}),_V=He({"src/plots/mapbox/layers.js"(Z,q){"use strict";var v=sa(),_=su().sanitizeHTML,S=E6(),M=nm();function e(i,n){this.subplot=i,this.uid=i.uid+"-"+n,this.index=n,this.idSource="source-"+this.uid,this.idLayer=M.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(n){this.visible?this.needsNewImage(n)?this.updateImage(n):this.needsNewSource(n)?(this.removeLayer(),this.updateSource(n),this.updateLayer(n)):this.needsNewLayer(n)?this.updateLayer(n):this.updateStyle(n):(this.updateSource(n),this.updateLayer(n)),this.visible=r(n)},t.needsNewImage=function(i){var n=this.subplot.map;return n.getSource(this.idSource)&&this.sourceType==="image"&&i.sourcetype==="image"&&(this.source!==i.source||JSON.stringify(this.coordinates)!==JSON.stringify(i.coordinates))},t.needsNewSource=function(i){return this.sourceType!==i.sourcetype||JSON.stringify(this.source)!==JSON.stringify(i.source)||this.layerType!==i.type},t.needsNewLayer=function(i){return this.layerType!==i.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},t.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]},t.updateImage=function(i){var n=this.subplot.map;n.getSource(this.idSource).updateImage({url:i.source,coordinates:i.coordinates});var s=this.findFollowingMapboxLayerId(this.lookupBelow());s!==null&&this.subplot.map.moveLayer(this.idLayer,s)},t.updateSource=function(i){var n=this.subplot.map;if(n.getSource(this.idSource)&&n.removeSource(this.idSource),this.sourceType=i.sourcetype,this.source=i.source,!!r(i)){var s=a(i);n.addSource(this.idSource,s)}},t.findFollowingMapboxLayerId=function(i){if(i==="traces")for(var n=this.subplot.getMapLayers(),s=0;s0){for(var s=0;s0}function o(i){var n={},s={};switch(i.type){case"circle":v.extendFlat(s,{"circle-radius":i.circle.radius,"circle-color":i.color,"circle-opacity":i.opacity});break;case"line":v.extendFlat(s,{"line-width":i.line.width,"line-color":i.color,"line-opacity":i.opacity,"line-dasharray":i.line.dash});break;case"fill":v.extendFlat(s,{"fill-color":i.color,"fill-outline-color":i.fill.outlinecolor,"fill-opacity":i.opacity});break;case"symbol":var h=i.symbol,f=S(h.textposition,h.iconsize);v.extendFlat(n,{"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}),v.extendFlat(s,{"icon-color":i.color,"text-color":h.textfont.color,"text-opacity":i.opacity});break;case"raster":v.extendFlat(s,{"raster-fade-duration":0,"raster-opacity":i.opacity});break}return{layout:n,paint:s}}function a(i){var n=i.sourcetype,s=i.source,h={type:n},f;return n==="geojson"?f="data":n==="vector"?f=typeof s=="string"?"url":"tiles":n==="raster"?(f="tiles",h.tileSize=256):n==="image"&&(f="url",h.coordinates=i.coordinates),h[f]=s,i.sourceattribution&&(h.attribution=_(i.sourceattribution)),h}q.exports=function(n,s,h){var f=new e(n,s);return f.update(h),f}}}),xV=He({"src/plots/mapbox/mapbox.js"(Z,q){"use strict";var v=k6(),_=sa(),S=Ev(),M=so(),e=Wo(),t=Ap(),r=Hc(),o=Jd(),a=o.drawMode,i=o.selectMode,n=Af().prepSelect,s=Af().clearOutline,h=Af().clearSelectionsCache,f=Af().selectOnClick,m=nm(),c=_V();function T(p,b){this.id=b,this.gd=p;var d=p._fullLayout,u=p._context;this.container=d._glcontainer.node(),this.isStatic=u.staticPlot,this.uid=d._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(d),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(p,b,d){var u=this,g=b[u.id];u.map&&g.accesstoken!==u.accessToken&&(u.map.remove(),u.map=null,u.styleObj=null,u.traceHash={},u.layerList=[]);var y;u.map?y=new Promise(function(D,P){u.updateMap(p,b,D,P)}):y=new Promise(function(D,P){u.createMap(p,b,D,P)}),d.push(y)},l.createMap=function(p,b,d,u){var g=this,y=b[g.id],D=g.styleObj=w(y.style,b);g.accessToken=y.accesstoken;var P=y.bounds,z=P?[[P.west,P.south],[P.east,P.north]]:null,F=g.map=new v.Map({container:g.div,style:D.style,center:E(y.center),zoom:y.zoom,bearing:y.bearing,pitch:y.pitch,maxBounds:z,interactive:!g.isStatic,preserveDrawingBuffer:g.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1}).addControl(new v.AttributionControl({compact:!0}));F._canvas.style.left="0px",F._canvas.style.top="0px",g.rejectOnError(u),g.isStatic||g.initFx(p,b);var N=[];N.push(new Promise(function(O){F.once("load",O)})),N=N.concat(S.fetchTraceGeoData(p)),Promise.all(N).then(function(){g.fillBelowLookup(p,b),g.updateData(p),g.updateLayout(b),g.resolveOnRender(d)}).catch(u)},l.updateMap=function(p,b,d,u){var g=this,y=g.map,D=b[this.id];g.rejectOnError(u);var P=[],z=w(D.style,b);JSON.stringify(g.styleObj)!==JSON.stringify(z)&&(g.styleObj=z,y.setStyle(z.style),g.traceHash={},P.push(new Promise(function(F){y.once("styledata",F)}))),P=P.concat(S.fetchTraceGeoData(p)),Promise.all(P).then(function(){g.fillBelowLookup(p,b),g.updateData(p),g.updateLayout(b),g.resolveOnRender(d)}).catch(u)},l.fillBelowLookup=function(p,b){var d=b[this.id],u=d.layers,g,y,D=this.belowLookup={},P=!1;for(g=0;g1)for(g=0;g-1&&f(z.originalEvent,u,[d.xaxis],[d.yaxis],d.id,P),F.indexOf("event")>-1&&r.click(u,z.originalEvent)}}},l.updateFx=function(p){var b=this,d=b.map,u=b.gd;if(b.isStatic)return;function g(z){var F=b.map.unproject(z);return[F.lng,F.lat]}var y=p.dragmode,D;D=function(z,F){if(F.isRect){var N=z.range={};N[b.id]=[g([F.xmin,F.ymin]),g([F.xmax,F.ymax])]}else{var O=z.lassoPoints={};O[b.id]=F.map(g)}};var P=b.dragOptions;b.dragOptions=_.extendDeep(P||{},{dragmode:p.dragmode,element:b.div,gd:u,plotinfo:{id:b.id,domain:p[b.id].domain,xaxis:b.xaxis,yaxis:b.yaxis,fillRangeItems:D},xaxes:[b.xaxis],yaxes:[b.yaxis],subplot:b.id}),d.off("click",b.onClickInPanHandler),i(y)||a(y)?(d.dragPan.disable(),d.on("zoomstart",b.clearOutline),b.dragOptions.prepFn=function(z,F,N){n(z,F,N,b.dragOptions,y)},t.init(b.dragOptions)):(d.dragPan.enable(),d.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),d.on("click",b.onClickInPanHandler))},l.updateFramework=function(p){var b=p[this.id].domain,d=p._size,u=this.div.style;u.width=d.w*(b.x[1]-b.x[0])+"px",u.height=d.h*(b.y[1]-b.y[0])+"px",u.left=d.l+b.x[0]*d.w+"px",u.top=d.t+(1-b.y[1])*d.h+"px",this.xaxis._offset=d.l+b.x[0]*d.w,this.xaxis._length=d.w*(b.x[1]-b.x[0]),this.yaxis._offset=d.t+(1-b.y[1])*d.h,this.yaxis._length=d.h*(b.y[1]-b.y[0])},l.updateLayers=function(p){var b=p[this.id],d=b.layers,u=this.layerList,g;if(d.length!==u.length){for(g=0;gN/2){var O=D.split("|").join("
");z.text(O).attr("data-unformatted",O).call(o.convertToTspans,c),F=r.bBox(z.node())}z.attr("transform",_(-3,-F.height+8)),P.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 L=1;F.width+6>N&&(L=N/(F.width+6));var U=[x.l+x.w*E.x[1],x.t+x.h*(1-E.y[0])];P.attr("transform",_(U[0],U[1])+S(L))}};function f(c,T){var l=c._fullLayout,x=c._context;if(x.mapboxAccessToken==="")return"";for(var w=[],A=[],E=!1,p=!1,b=0;b1&&v.warn(n.multipleTokensErrorMsg),w[0]):(A.length&&v.log(["Listed mapbox access token(s)",A.join(","),"but did not use a Mapbox map style, ignoring token(s)."].join(" ")),"")}function m(c){return typeof c=="string"&&(n.styleValuesMapbox.indexOf(c)!==-1||c.indexOf("mapbox://")===0||c.indexOf("stamen")===0)}Z.updateFx=function(c){for(var T=c._fullLayout,l=T._subplots[i],x=0;x=0;o--)t.removeLayer(r[o][1])},e.dispose=function(){var t=this.subplot.map;this._removeLayers(),t.removeSource(this.sourceId)},q.exports=function(r,o){var a=o[0].trace,i=new M(r,a.uid),n=i.sourceId,s=v(o),h=i.below=r.belowLookup["trace-"+a.uid];return r.map.addSource(n,{type:"geojson",data:s.geojson}),i._addLayers(s,h),o[0].trace._glTrace=i,i}}}),MV=He({"src/traces/choroplethmapbox/index.js"(Z,q){"use strict";var v=["*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(" ");q.exports={attributes:C6(),supplyDefaults:AV(),colorbar:o0(),calc:lT(),plot:SV(),hoverPoints:cT(),eventData:fT(),selectPoints:hT(),styleOnSelect:function(_,S){if(S){var M=S[0].trace;M._glTrace.updateOnSelect(S)}},getBelow:function(_,S){for(var M=S.getMapLayers(),e=M.length-2;e>=0;e--){var t=M[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 p=M.extractOpts(a),b=p.reversescale?M.flipScale(p.colorscale):p.colorscale,d=b[0][1],u=S.opacity(d)<1?d:S.addOpacity(d,0),g=["interpolate",["linear"],["heatmap-density"],0,u];for(f=1;f=0;r--)e.removeLayer(t[r][1])},M.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)},q.exports=function(t,r){var o=r[0].trace,a=new S(t,o.uid),i=a.sourceId,n=v(r),s=a.below=t.belowLookup["trace-"+o.uid];return t.map.addSource(i,{type:"geojson",data:n.geojson}),a._addLayers(n,s),a}}}),IV=He({"src/traces/densitymapbox/hover.js"(Z,q){"use strict";var v=Wo(),_=ST().hoverPoints,S=ST().getExtraText;q.exports=function(e,t,r){var o=_(e,t,r);if(o){var a=o[0],i=a.cd,n=i[0].trace,s=i[a.index];if(delete a.color,"z"in s){var h=a.subplot.mockAxis;a.z=s.z,a.zLabel=v.tickText(h,h.c2l(s.z),"hover").text}return a.extraText=S(n,s,i[0].t.labels),[a]}}}}),RV=He({"src/traces/densitymapbox/event_data.js"(Z,q){"use strict";q.exports=function(_,S){return _.lon=S.lon,_.lat=S.lat,_.z=S.z,_}}}),DV=He({"src/traces/densitymapbox/index.js"(Z,q){"use strict";var v=["*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(" ");q.exports={attributes:P6(),supplyDefaults:kV(),colorbar:o0(),formatLabels:M6(),calc:CV(),plot:PV(),hoverPoints:IV(),eventData:RV(),getBelow:function(_,S){for(var M=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} +`),Wt=Qe.createShader(Qe.FRAGMENT_SHADER);if(Qe.isContextLost()){this.failedToCreate=!0;return}Qe.shaderSource(Wt,dr),Qe.compileShader(Wt),Qe.attachShader(this.program,Wt);var ir=Qe.createShader(Qe.VERTEX_SHADER);if(Qe.isContextLost()){this.failedToCreate=!0;return}Qe.shaderSource(ir,lr),Qe.compileShader(ir),Qe.attachShader(this.program,ir),this.attributes={};var Gt={};this.numAttributes=br.length;for(var Dr=0;Dr>16,Qe>>16],u_pixel_coord_lower:[ke&65535,Qe&65535]}}function Jc(ge,K,xe,re){var ye=xe.imageManager.getPattern(ge.from.toString()),Ue=xe.imageManager.getPattern(ge.to.toString()),ke=xe.imageManager.getPixelSize(),Qe=ke.width,vt=ke.height,qt=Math.pow(2,re.tileID.overscaledZ),br=re.tileSize*Math.pow(2,xe.transform.tileZoom)/qt,Br=br*(re.tileID.canonical.x+re.tileID.wrap*qt),pr=br*re.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:ye.tl,u_pattern_br_a:ye.br,u_pattern_tl_b:Ue.tl,u_pattern_br_b:Ue.br,u_texsize:[Qe,vt],u_mix:K.t,u_pattern_size_a:ye.displaySize,u_pattern_size_b:Ue.displaySize,u_scale_a:K.fromScale,u_scale_b:K.toScale,u_tile_units_to_pixels:1/os(re,1,xe.transform.tileZoom),u_pixel_coord_upper:[Br>>16,pr>>16],u_pixel_coord_lower:[Br&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)}},nu=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,re){var ye=K.style.light,Ue=ye.properties.get("position"),ke=[Ue.x,Ue.y,Ue.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:re}},Xu=function(ge,K,xe,re,ye,Ue,ke){return e.extend(Vf(ge,K,xe,re),Wu(Ue,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)}},Vl=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}},$c=function(ge,K,xe,re){return e.extend(Lc(ge),Wu(xe,K,re))},sc=function(ge,K){return{u_matrix:ge,u_world:K}},Pc=function(ge,K,xe,re,ye){return e.extend($c(ge,K,xe,re),{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)}},xr=function(ge,K,xe,re){var ye=ge.transform,Ue,ke;if(re.paint.get("circle-pitch-alignment")==="map"){var Qe=os(xe,1,ye.zoom);Ue=!0,ke=[Qe,Qe]}else Ue=!1,ke=ye.pixelsToGLUnits;return{u_camera_to_center_distance:ye.cameraToCenterDistance,u_scale_with_map:+(re.paint.get("circle-pitch-scale")==="map"),u_matrix:ge.translatePosMatrix(K.posMatrix,xe,re.paint.get("circle-translate"),re.paint.get("circle-translate-anchor")),u_pitch_with_map:+Ue,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 re=os(xe,1,K.zoom),ye=Math.pow(2,K.zoom-xe.tileID.overscaledZ),Ue=xe.tileID.overscaleFactor();return{u_matrix:ge,u_camera_to_center_distance:K.cameraToCenterDistance,u_pixels_to_tile_units:re,u_extrude_scale:[K.pixelsToGLUnits[0]/(re*ye),K.pixelsToGLUnits[1]/(re*ye)],u_overscale_factor:Ue}},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,re){return{u_matrix:ge,u_extrude_scale:os(K,1,xe),u_intensity:re}},mi=function(ge,K,xe,re){var ye=e.create();e.ortho(ye,0,ge.width,ge.height,0,0,1);var Ue=ge.context.gl;return{u_matrix:ye,u_world:[Ue.drawingBufferWidth,Ue.drawingBufferHeight],u_image:xe,u_color_ramp:re,u_opacity:K.paint.get("heatmap-opacity")}},Mn=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)}},Qn=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)}},io=function(ge,K,xe){var re=xe.paint.get("hillshade-shadow-color"),ye=xe.paint.get("hillshade-highlight-color"),Ue=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:re,u_highlight:ye,u_accent:Ue}},eo=function(ge,K){var xe=K.stride,re=e.create();return e.ortho(re,0,e.EXTENT,-e.EXTENT,0,0,1),e.translate(re,re,[0,-e.EXTENT,0]),{u_matrix:re,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),re=K.canonical.y;return[new e.MercatorCoordinate(0,re/xe).toLngLat().lat,new e.MercatorCoordinate(0,(re+1)/xe).toLngLat().lat]}var An=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)}},yo=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)}},Qo=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)}},ks=function(ge,K,xe){var re=ge.transform;return{u_matrix:Fl(ge,K,xe),u_ratio:1/os(K,1,re.zoom),u_device_pixel_ratio:e.browser.devicePixelRatio,u_units_to_pixels:[1/re.pixelsToGLUnits[0],1/re.pixelsToGLUnits[1]]}},rl=function(ge,K,xe,re){return e.extend(ks(ge,K,xe),{u_image:0,u_image_height:re})},Ns=function(ge,K,xe,re){var ye=ge.transform,Ue=Ss(K,ye);return{u_matrix:Fl(ge,K,xe),u_texsize:K.imageAtlasTexture.size,u_ratio:1/os(K,1,ye.zoom),u_device_pixel_ratio:e.browser.devicePixelRatio,u_image:0,u_scale:[Ue,re.fromScale,re.toScale],u_fade:re.t,u_units_to_pixels:[1/ye.pixelsToGLUnits[0],1/ye.pixelsToGLUnits[1]]}},el=function(ge,K,xe,re,ye){var Ue=ge.transform,ke=ge.lineAtlas,Qe=Ss(K,Ue),vt=xe.layout.get("line-cap")==="round",qt=ke.getDash(re.from,vt),br=ke.getDash(re.to,vt),Br=qt.width*ye.fromScale,pr=br.width*ye.toScale;return e.extend(ks(ge,K,xe),{u_patternscale_a:[Qe/Br,-qt.height/2],u_patternscale_b:[Qe/pr,-br.height/2],u_sdfgamma:ke.width/(Math.min(Br,pr)*256*e.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:qt.y,u_tex_y_b:br.y,u_mix:ye.t})};function Ss(ge,K){return 1/os(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 yl=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,re,ye){return{u_matrix:ge,u_tl_parent:K,u_scale_parent:xe,u_buffer_scale:1,u_fade_t:re.mix,u_opacity:re.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:Ro(ye.paint.get("raster-contrast")),u_spin_weights:Un(ye.paint.get("raster-hue-rotate"))}};function Un(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 Ro(ge){return ge>0?1/(1-ge):1+ge}function Js(ge){return ge>0?1-1/(1.001-ge):-ge}var Fs=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)}},cu=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,re,ye,Ue,ke,Qe,vt,qt){var br=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:br.cameraToCenterDistance,u_pitch:br.pitch/360*2*Math.PI,u_rotate_symbol:+xe,u_aspect_ratio:br.width/br.height,u_fade_change:ye.options.fadeDuration?ye.symbolFadeChange:1,u_matrix:Ue,u_label_plane_matrix:ke,u_coord_matrix:Qe,u_is_text:+vt,u_pitch_with_map:+re,u_texsize:qt,u_texture:0}},Ic=function(ge,K,xe,re,ye,Ue,ke,Qe,vt,qt,br){var Br=ye.transform;return e.extend(Zu(ge,K,xe,re,ye,Ue,ke,Qe,vt,qt),{u_gamma_scale:re?Math.cos(Br._pitch)*Br.cameraToCenterDistance:1,u_device_pixel_ratio:e.browser.devicePixelRatio,u_is_halo:+br})},bu=function(ge,K,xe,re,ye,Ue,ke,Qe,vt,qt){return e.extend(Ic(ge,K,xe,re,ye,Ue,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,re,ye,Ue){return e.extend(Jc(re,Ue,xe,ye),{u_matrix:ge,u_opacity:K})},Fo={fillExtrusion:Lf,fillExtrusionPattern:nu,fill:Cc,fillPattern:gc,fillOutline:Vl,fillOutlinePattern:xu,circle:Qt,collisionBox:aa,collisionCircle:$r,debug:Ci,clippingMask:Qi,heatmap:Pi,heatmapTexture:Di,hillshade:Mn,hillshadePrepare:Qn,line:An,lineGradient:un,linePattern:yo,lineSDF:Qo,raster:yl,symbolIcon:Fs,symbolSDF:cu,symbolTextAndIcon:Iu,background:Rc,backgroundPattern:Au},Dc;function lc(ge,K,xe,re,ye,Ue,ke){for(var Qe=ge.context,vt=Qe.gl,qt=ge.useProgram("collisionBox"),br=[],Br=0,pr=0,mt=0;mt0){var lr=e.create(),Wt=hr;e.mul(lr,rr.placementInvProjMatrix,ge.transform.glCoordMatrix),e.mul(lr,lr,rr.placementViewportMatrix),br.push({circleArray:dr,circleOffset:pr,transform:Wt,invTransform:lr}),Br+=dr.length/4,pr=Br}sr&&qt.draw(Qe,vt.LINES,Ra.disabled,Ca.disabled,ge.colorModeForRenderPass(),Fr.disabled,ka(hr,ge.transform,Ft),xe.id,sr.layoutVertexBuffer,sr.indexBuffer,sr.segments,null,ge.transform.zoom,null,null,sr.collisionVertexBuffer)}}if(!(!ke||!br.length)){var ir=ge.useProgram("collisionCircle"),Gt=new e.StructArrayLayout2f1f2i16;Gt.resize(Br*4),Gt._trim();for(var Dr=0,Jr=0,ya=br;Jr=0&&(Mt[rr.associatedIconIndex]={shiftedAnchor:ii,angle:Zi})}}if(br){mt.clear();for(var ui=ge.icon.placedSymbolArray,_i=0;_i0){var ke=e.browser.now(),Qe=(ke-ge.timeAdded)/Ue,vt=K?(ke-K.timeAdded)/Ue:-1,qt=xe.getSource(),br=ye.coveringZoomLevel({tileSize:qt.tileSize,roundZoom:qt.roundZoom}),Br=!K||Math.abs(K.tileID.overscaledZ-br)>Math.abs(ge.tileID.overscaledZ-br),pr=Br&&ge.refreshedUponExpiration?1:e.clamp(Br?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 Er(ge,K,xe){var re=xe.paint.get("background-color"),ye=xe.paint.get("background-opacity");if(ye!==0){var Ue=ge.context,ke=Ue.gl,Qe=ge.transform,vt=Qe.tileSize,qt=xe.paint.get("background-pattern");if(!ge.isPatternMissing(qt)){var br=!qt&&re.a===1&&ye===1&&ge.opaquePassEnabledForLayer()?"opaque":"translucent";if(ge.renderPass===br){var Br=Ca.disabled,pr=ge.depthModeForSublayer(0,br==="opaque"?Ra.ReadWrite:Ra.ReadOnly),mt=ge.colorModeForRenderPass(),Mt=ge.useProgram(qt?"backgroundPattern":"background"),Ft=Qe.coveringTiles({tileSize:vt});qt&&(Ue.activeTexture.set(ke.TEXTURE0),ge.imageManager.bind(ge.context));for(var rr=xe.getCrossfadeParameters(),hr=0,sr=Ft;hr "+xe.overscaledZ);var hr=rr+" "+mt+"kb";Ao(ge,hr),ke.draw(re,ye.TRIANGLES,Qe,vt,Rt.alphaBlended,Fr.disabled,Hi(Ue,e.Color.transparent,Ft),br,ge.debugBuffer,ge.quadTriangleIndexBuffer,ge.debugSegments)}function Ao(ge,K){ge.initDebugOverlayCanvas();var xe=ge.debugOverlayCanvas,re=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(re.LINEAR,re.CLAMP_TO_EDGE)}function ls(ge,K,xe){var re=ge.context,ye=xe.implementation;if(ge.renderPass==="offscreen"){var Ue=ye.prerender;Ue&&(ge.setCustomLayerDefaults(),re.setColorMode(ge.colorModeForRenderPass()),Ue.call(ye,re.gl,ge.transform.customLayerMatrix()),re.setDirty(),ge.setBaseState())}else if(ge.renderPass==="translucent"){ge.setCustomLayerDefaults(),re.setColorMode(ge.colorModeForRenderPass()),re.setStencilMode(Ca.disabled);var ke=ye.renderingMode==="3d"?new Ra(ge.context.gl.LEQUAL,Ra.ReadWrite,ge.depthRangeFor3D):ge.depthModeForSublayer(0,Ra.ReadOnly);re.setDepthMode(ke),ye.render(re.gl,ge.transform.customLayerMatrix()),re.setDirty(),ge.setBaseState(),re.bindFramebuffer.set(null)}}var Mo={symbol:I,circle:Ot,heatmap:$t,line:na,fill:qe,"fill-extrusion":lt,hillshade:Et,raster:ur,background:Er,debug:Kn,custom:ls},Yo=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 Ks,this.gpuTimers={}};Yo.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 re=0,ye=this.style._order;re256&&this.clearStencil(),re.setColorMode(Rt.disabled),re.setDepthMode(Ra.disabled);var Ue=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)},Yo.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)},Yo.prototype.stencilConfigForOverlap=function(K){var xe,re=this.context.gl,ye=K.sort(function(qt,br){return br.overscaledZ-qt.overscaledZ}),Ue=ye[ye.length-1].overscaledZ,ke=ye[0].overscaledZ-Ue+1;if(ke>1){this.currentStencilSource=void 0,this.nextStencilID+ke>256&&this.clearStencil();for(var Qe={},vt=0;vt=0;this.currentLayer--){var lr=this.style._layers[ye[this.currentLayer]],Wt=Ue[lr.source],ir=vt[lr.source];this._renderTileClippingMasks(lr,ir),this.renderLayer(this,Wt,lr,ir)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer0?xe.pop():null},Yo.prototype.isPatternMissing=function(K){if(!K)return!1;if(!K.from||!K.to)return!0;var xe=this.imageManager.getPattern(K.from.toString()),re=this.imageManager.getPattern(K.to.toString());return!xe||!re},Yo.prototype.useProgram=function(K,xe){this.cache=this.cache||{};var re=""+K+(xe?xe.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[re]||(this.cache[re]=new gf(this.context,K,uf[K],xe,Fo[K],this._showOverdrawInspector)),this.cache[re]},Yo.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()},Yo.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)},Yo.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)}},Yo.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var ds=function(K,xe){this.points=K,this.planes=xe};ds.fromInvProjectionMatrix=function(K,xe,re){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]],Ue=Math.pow(2,re),ke=ye.map(function(qt){return e.transformMat4([],qt,K)}).map(function(qt){return e.scale$1([],qt,1/qt[3]/xe*Ue)}),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 br=e.sub([],ke[qt[0]],ke[qt[1]]),Br=e.sub([],ke[qt[2]],ke[qt[1]]),pr=e.normalize([],e.cross([],br,Br)),mt=-e.dot(pr,ke[qt[1]]);return pr.concat(mt)});return new ds(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],re=e.clone$2(this.min),ye=e.clone$2(this.max),Ue=0;Ue=0;if(ke===0)return 0;ke!==xe.length&&(re=!1)}if(re)return 2;for(var vt=0;vt<3;vt++){for(var qt=Number.MAX_VALUE,br=-Number.MAX_VALUE,Br=0;Brthis.max[vt]-this.min[vt])return 0}return 1};var tl=function(K,xe,re,ye){if(K===void 0&&(K=0),xe===void 0&&(xe=0),re===void 0&&(re=0),ye===void 0&&(ye=0),isNaN(K)||K<0||isNaN(xe)||xe<0||isNaN(re)||re<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=re,this.right=ye};tl.prototype.interpolate=function(K,xe,re){return xe.top!=null&&K.top!=null&&(this.top=e.number(K.top,xe.top,re)),xe.bottom!=null&&K.bottom!=null&&(this.bottom=e.number(K.bottom,xe.bottom,re)),xe.left!=null&&K.left!=null&&(this.left=e.number(K.left,xe.left,re)),xe.right!=null&&K.right!=null&&(this.right=e.number(K.right,xe.right,re)),this},tl.prototype.getCenter=function(K,xe){var re=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(re,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 es=function(K,xe,re,ye,Ue){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=Ue===void 0?!0:Ue,this._minZoom=K||0,this._maxZoom=xe||22,this._minPitch=re??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={}},ts={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}};es.prototype.clone=function(){var K=new es(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},ts.minZoom.get=function(){return this._minZoom},ts.minZoom.set=function(ge){this._minZoom!==ge&&(this._minZoom=ge,this.zoom=Math.max(this.zoom,ge))},ts.maxZoom.get=function(){return this._maxZoom},ts.maxZoom.set=function(ge){this._maxZoom!==ge&&(this._maxZoom=ge,this.zoom=Math.min(this.zoom,ge))},ts.minPitch.get=function(){return this._minPitch},ts.minPitch.set=function(ge){this._minPitch!==ge&&(this._minPitch=ge,this.pitch=Math.max(this.pitch,ge))},ts.maxPitch.get=function(){return this._maxPitch},ts.maxPitch.set=function(ge){this._maxPitch!==ge&&(this._maxPitch=ge,this.pitch=Math.min(this.pitch,ge))},ts.renderWorldCopies.get=function(){return this._renderWorldCopies},ts.renderWorldCopies.set=function(ge){ge===void 0?ge=!0:ge===null&&(ge=!1),this._renderWorldCopies=ge},ts.worldSize.get=function(){return this.tileSize*this.scale},ts.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},ts.size.get=function(){return new e.Point(this.width,this.height)},ts.bearing.get=function(){return-this.angle/Math.PI*180},ts.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))},ts.pitch.get=function(){return this._pitch/Math.PI*180},ts.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())},ts.fov.get=function(){return this._fov/Math.PI*180},ts.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())},ts.zoom.get=function(){return this._zoom},ts.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())},ts.center.get=function(){return this._center},ts.center.set=function(ge){ge.lat===this._center.lat&&ge.lng===this._center.lng||(this._unmodified=!1,this._center=ge,this._constrain(),this._calcMatrices())},ts.padding.get=function(){return this._edgeInsets.toJSON()},ts.padding.set=function(ge){this._edgeInsets.equals(ge)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,ge,1),this._calcMatrices())},ts.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},es.prototype.isPaddingEqual=function(K){return this._edgeInsets.equals(K)},es.prototype.interpolatePadding=function(K,xe,re){this._unmodified=!1,this._edgeInsets.interpolate(K,xe,re),this._constrain(),this._calcMatrices()},es.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)},es.prototype.getVisibleUnwrappedCoordinates=function(K){var xe=[new e.UnwrappedTileID(0,K)];if(this._renderWorldCopies)for(var re=this.pointCoordinate(new e.Point(0,0)),ye=this.pointCoordinate(new e.Point(this.width,0)),Ue=this.pointCoordinate(new e.Point(this.width,this.height)),ke=this.pointCoordinate(new e.Point(0,this.height)),Qe=Math.floor(Math.min(re.x,ye.x,Ue.x,ke.x)),vt=Math.floor(Math.max(re.x,ye.x,Ue.x,ke.x)),qt=1,br=Qe-qt;br<=vt+qt;br++)br!==0&&xe.push(new e.UnwrappedTileID(br,K));return xe},es.prototype.coveringTiles=function(K){var xe=this.coveringZoomLevel(K),re=xe;if(K.minzoom!==void 0&&xeK.maxzoom&&(xe=K.maxzoom);var ye=e.MercatorCoordinate.fromLngLat(this.center),Ue=Math.pow(2,xe),ke=[Ue*ye.x,Ue*ye.y,0],Qe=ds.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,xe),vt=K.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(vt=xe);var qt=3,br=function(Ga){return{aabb:new ul([Ga*Ue,0,0],[(Ga+1)*Ue,Ue,0]),zoom:0,x:0,y:0,wrap:Ga,fullyVisible:!1}},Br=[],pr=[],mt=xe,Mt=K.reparseOverscaled?re:xe;if(this._renderWorldCopies)for(var Ft=1;Ft<=3;Ft++)Br.push(br(-Ft)),Br.push(br(Ft));for(Br.push(br(0));Br.length>0;){var rr=Br.pop(),hr=rr.x,sr=rr.y,dr=rr.fullyVisible;if(!dr){var lr=rr.aabb.intersects(Qe);if(lr===0)continue;dr=lr===2}var Wt=rr.aabb.distanceX(ke),ir=rr.aabb.distanceY(ke),Gt=Math.max(Math.abs(Wt),Math.abs(ir)),Dr=qt+(1<Dr&&rr.zoom>=vt){pr.push({tileID:new e.OverscaledTileID(rr.zoom===mt?Mt:rr.zoom,rr.wrap,rr.zoom,hr,sr),distanceSq:e.sqrLen([ke[0]-.5-hr,ke[1]-.5-sr])});continue}for(var Jr=0;Jr<4;Jr++){var ya=(hr<<1)+Jr%2,vi=(sr<<1)+(Jr>>1);Br.push({aabb:rr.aabb.quadrant(Jr),zoom:rr.zoom+1,x:ya,y:vi,wrap:rr.wrap,fullyVisible:dr})}}return pr.sort(function(Ga,ii){return Ga.distanceSq-ii.distanceSq}).map(function(Ga){return Ga.tileID})},es.prototype.resize=function(K,xe){this.width=K,this.height=xe,this.pixelsToGLUnits=[2/K,-2/xe],this._constrain(),this._calcMatrices()},ts.unmodified.get=function(){return this._unmodified},es.prototype.zoomScale=function(K){return Math.pow(2,K)},es.prototype.scaleZoom=function(K){return Math.log(K)/Math.LN2},es.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)},es.prototype.unproject=function(K){return new e.MercatorCoordinate(K.x/this.worldSize,K.y/this.worldSize).toLngLat()},ts.point.get=function(){return this.project(this.center)},es.prototype.setLocationAtPoint=function(K,xe){var re=this.pointCoordinate(xe),ye=this.pointCoordinate(this.centerPoint),Ue=this.locationCoordinate(K),ke=new e.MercatorCoordinate(Ue.x-(re.x-ye.x),Ue.y-(re.y-ye.y));this.center=this.coordinateLocation(ke),this._renderWorldCopies&&(this.center=this.center.wrap())},es.prototype.locationPoint=function(K){return this.coordinatePoint(this.locationCoordinate(K))},es.prototype.pointLocation=function(K){return this.coordinateLocation(this.pointCoordinate(K))},es.prototype.locationCoordinate=function(K){return e.MercatorCoordinate.fromLngLat(K)},es.prototype.coordinateLocation=function(K){return K.toLngLat()},es.prototype.pointCoordinate=function(K){var xe=0,re=[K.x,K.y,0,1],ye=[K.x,K.y,1,1];e.transformMat4(re,re,this.pixelMatrixInverse),e.transformMat4(ye,ye,this.pixelMatrixInverse);var Ue=re[3],ke=ye[3],Qe=re[0]/Ue,vt=ye[0]/ke,qt=re[1]/Ue,br=ye[1]/ke,Br=re[2]/Ue,pr=ye[2]/ke,mt=Br===pr?0:(xe-Br)/(pr-Br);return new e.MercatorCoordinate(e.number(Qe,vt,mt)/this.worldSize,e.number(qt,br,mt)/this.worldSize)},es.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])},es.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)))},es.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]])},es.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])},es.prototype.calculatePosMatrix=function(K,xe){xe===void 0&&(xe=!1);var re=K.key,ye=xe?this._alignedPosMatrixCache:this._posMatrixCache;if(ye[re])return ye[re];var Ue=K.canonical,ke=this.worldSize/this.zoomScale(Ue.z),Qe=Ue.x+Math.pow(2,Ue.z)*K.wrap,vt=e.identity(new Float64Array(16));return e.translate(vt,vt,[Qe*ke,Ue.y*ke,0]),e.scale(vt,vt,[ke/e.EXTENT,ke/e.EXTENT,1]),e.multiply(vt,xe?this.alignedProjMatrix:this.projMatrix,vt),ye[re]=new Float32Array(vt),ye[re]},es.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},es.prototype._constrain=function(){if(!(!this.center||!this.width||!this.height||this._constraining)){this._constraining=!0;var K=-90,xe=90,re=-180,ye=180,Ue,ke,Qe,vt,qt=this.size,br=this._unmodified;if(this.latRange){var Br=this.latRange;K=e.mercatorYfromLat(Br[1])*this.worldSize,xe=e.mercatorYfromLat(Br[0])*this.worldSize,Ue=xe-Kxe&&(vt=xe-rr)}if(this.lngRange){var hr=mt.x,sr=qt.x/2;hr-srye&&(Qe=ye-sr)}(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=br,this._constraining=!1}},es.prototype._calcMatrices=function(){if(this.height){var K=this._fov/2,xe=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(K)*this.height;var re=Math.PI/2+this._pitch,ye=this._fov*(.5+xe.y/this.height),Ue=Math.sin(ye)*this.cameraToCenterDistance/Math.sin(e.clamp(Math.PI-re-ye,.01,Math.PI-.01)),ke=this.point,Qe=ke.x,vt=ke.y,qt=Math.cos(Math.PI/2-this._pitch)*Ue+this.cameraToCenterDistance,br=qt*1.01,Br=this.height/50,pr=new Float64Array(16);e.perspective(pr,this._fov,this.width/this.height,Br,br),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,Mt=this.height%2/2,Ft=Math.cos(this.angle),rr=Math.sin(this.angle),hr=Qe-Math.round(Qe)+Ft*mt+rr*Mt,sr=vt-Math.round(vt)+Ft*Mt+rr*mt,dr=new Float64Array(pr);if(e.translate(dr,dr,[hr>.5?hr-1:hr,sr>.5?sr-1:sr,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={}}},es.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],re=e.transformMat4(xe,xe,this.pixelMatrix);return re[3]/this.cameraToCenterDistance},es.prototype.getCameraPoint=function(){var K=this._pitch,xe=Math.tan(K)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new e.Point(0,xe))},es.prototype.getCameraQueryGeometry=function(K){var xe=this.getCameraPoint();if(K.length===1)return[K[0],xe];for(var re=xe.x,ye=xe.y,Ue=xe.x,ke=xe.y,Qe=0,vt=K;Qe=3&&!K.some(function(re){return isNaN(re)})){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},tu.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),wl=e.extend({deceleration:20,maxSpeed:1400},Ru),fu=e.extend({deceleration:1e3,maxSpeed:360},Ru),uc=e.extend({deceleration:1e3,maxSpeed:90},Ru),Gl=function(K){this._map=K,this.clear()};Gl.prototype.clear=function(){this._inertiaBuffer=[]},Gl.prototype.record=function(K){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:e.browser.now(),settings:K})},Gl.prototype._drainInertiaBuffer=function(){for(var K=this._inertiaBuffer,xe=e.browser.now(),re=160;K.length>0&&xe-K[0].time>re;)K.shift()},Gl.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},re=0,ye=this._inertiaBuffer;re=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 re=xe;if(!(this._lastPos.equals(re)||!this._box&&re.dist(this._startPos)this.numTouches)&&(this.aborted=!0),!this.aborted&&(this.startTime===void 0&&(this.startTime=K.timeStamp),re.length===this.numTouches&&(this.centroid=_r(xe),this.touches=zt(re,xe)))},pa.prototype.touchmove=function(K,xe,re){if(!(this.aborted||!this.centroid)){var ye=zt(re,xe);for(var Ue in this.touches){var ke=this.touches[Ue],Qe=ye[Ue];(!Qe||Qe.dist(ke)>wa)&&(this.aborted=!0)}}},pa.prototype.touchend=function(K,xe,re){if((!this.centroid||K.timeStamp-this.startTime>Xr)&&(this.aborted=!0),re.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,re){this.singleTap.touchstart(K,xe,re)},Ja.prototype.touchmove=function(K,xe,re){this.singleTap.touchmove(K,xe,re)},Ja.prototype.touchend=function(K,xe,re){var ye=this.singleTap.touchend(K,xe,re);if(ye){var Ue=K.timeStamp-this.lastTime0&&(this._active=!0);var ye=zt(re,xe),Ue=new e.Point(0,0),ke=new e.Point(0,0),Qe=0;for(var vt in ye){var qt=ye[vt],br=this._touches[vt];br&&(Ue._add(qt),ke._add(qt.sub(br)),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(re){this._lastPoints=re,_l(re[0].sub(re[1]))&&(this._valid=!1)},K.prototype._move=function(re,ye,Ue){var ke=re[0].sub(this._lastPoints[0]),Qe=re[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(ke,Qe,Ue.timeStamp),!!this._valid){this._lastPoints=re,this._active=!0;var vt=(ke.y+Qe.y)/2,qt=-.5;return{pitchDelta:vt*qt}}},K.prototype.gestureBeginsVertically=function(re,ye,Ue){if(this._valid!==void 0)return this._valid;var ke=2,Qe=re.mag()>=ke,vt=ye.mag()>=ke;if(!(!Qe&&!vt)){if(!Qe||!vt)return this._firstMove===void 0&&(this._firstMove=Ue),Ue-this._firstMove0==ye.y>0;return _l(re)&&_l(ye)&&qt}},K}(In),fs={panStep:100,bearingStep:15,pitchStep:10},ms=function(){var K=fs;this._panStep=K.panStep,this._bearingStep=K.bearingStep,this._pitchStep=K.pitchStep,this._rotationDisabled=!1};ms.prototype.reset=function(){this._active=!1},ms.prototype.keydown=function(K){var xe=this;if(!(K.altKey||K.ctrlKey||K.metaKey)){var re=0,ye=0,Ue=0,ke=0,Qe=0;switch(K.keyCode){case 61:case 107:case 171:case 187:re=1;break;case 189:case 109:case 173:re=-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?Ue=1:(K.preventDefault(),Qe=-1);break;case 40:K.shiftKey?Ue=-1:(K.preventDefault(),Qe=1);break;default:return}return this._rotationDisabled&&(ye=0,Ue=0),{cameraAnimation:function(vt){var qt=vt.getZoom();vt.easeTo({duration:300,easeId:"keyboardHandler",easing:Tl,zoom:re?Math.round(qt)+re*(K.shiftKey?2:1):qt,bearing:vt.getBearing()+ye*xe._bearingStep,pitch:vt.getPitch()+Ue*xe._pitchStep,offset:[-ke*xe._panStep,-Qe*xe._panStep],center:vt.getCenter()},{originalEvent:K})}}}},ms.prototype.enable=function(){this._enabled=!0},ms.prototype.disable=function(){this._enabled=!1,this.reset()},ms.prototype.isEnabled=function(){return this._enabled},ms.prototype.isActive=function(){return this._active},ms.prototype.disableRotation=function(){this._rotationDisabled=!0},ms.prototype.enableRotation=function(){this._rotationDisabled=!1};function Tl(ge){return ge*(2-ge)}var Wl=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,re=e.browser.now(),ye=re-(this._lastWheelEventTime||0);this._lastWheelEventTime=re,xe!==0&&xe%Wl===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 re=this._type==="wheel"&&Math.abs(this._delta)>Wl?this._wheelZoomRate:this._defaultZoomRate,ye=_c/(1+Math.exp(-Math.abs(this._delta*re)));this._delta<0&&ye!==0&&(ye=1/ye);var Ue=typeof this._targetZoom=="number"?xe.zoomScale(this._targetZoom):xe.scale;this._targetZoom=Math.min(xe.maxZoom,Math.max(xe.minZoom,xe.scaleZoom(Ue*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,br;if(this._type==="wheel"&&Qe&&vt){var Br=Math.min((e.browser.now()-this._lastWheelEventTime)/200,1),pr=vt(Br);br=e.number(Qe,ke,pr),Br<1?this._frameId||(this._frameId=!0):qt=!0}else br=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:br-xe.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},it.prototype._smoothOutEasing=function(K){var xe=e.ease;if(this._prevEase){var re=this._prevEase,ye=(e.browser.now()-re.start)/re.duration,Ue=re.easing(ye+.01)-re.easing(ye),ke=.27/Math.sqrt(Ue*Ue+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 Xt=function(K,xe){this._clickZoom=K,this._tapZoom=xe};Xt.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},Xt.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},Xt.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},Xt.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var fr=function(){this.reset()};fr.prototype.reset=function(){this._active=!1},fr.prototype.dblclick=function(K,xe){return K.preventDefault(),{cameraAnimation:function(re){re.easeTo({duration:300,zoom:re.getZoom()+(K.shiftKey?-1:1),around:re.unproject(xe)},{originalEvent:K})}}},fr.prototype.enable=function(){this._enabled=!0},fr.prototype.disable=function(){this._enabled=!1,this.reset()},fr.prototype.isEnabled=function(){return this._enabled},fr.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,re){this._swipePoint||(this._tapTime&&K.timeStamp-this._tapTime>Gr&&this.reset(),this._tapTime?re.length>0&&(this._swipePoint=xe[0],this._swipeTouch=re[0].identifier):this._tap.touchstart(K,xe,re))},oa.prototype.touchmove=function(K,xe,re){if(!this._tapTime)this._tap.touchmove(K,xe,re);else if(this._swipePoint){if(re[0].identifier!==this._swipeTouch)return;var ye=xe[0],Ue=ye.y-this._swipePoint.y;return this._swipePoint=ye,K.preventDefault(),this._active=!0,{zoomDelta:Ue/128}}},oa.prototype.touchend=function(K,xe,re){if(this._tapTime)this._swipePoint&&re.length===0&&this.reset();else{var ye=this._tap.touchend(K,xe,re);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 Ta=function(K,xe,re){this._el=K,this._mousePan=xe,this._touchPan=re};Ta.prototype.enable=function(K){this._inertiaOptions=K||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},Ta.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},Ta.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},Ta.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var ma=function(K,xe,re){this._pitchWithRotate=K.pitchWithRotate,this._mouseRotate=xe,this._mousePitch=re};ma.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},ma.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},ma.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},ma.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var xa=function(K,xe,re,ye){this._el=K,this._touchZoom=xe,this._touchRotate=re,this._tapDragZoom=ye,this._rotationDisabled=!1,this._enabled=!0};xa.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")},xa.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},xa.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},xa.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},xa.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},xa.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 Gl(K),this._bearingSnap=xe.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(xe),e.bindAll(["handleEvent","handleWindowEvent"],this);var re=this._el;this._listeners=[[re,"touchstart",{passive:!0}],[re,"touchmove",{passive:!1}],[re,"touchend",void 0],[re,"touchcancel",void 0],[re,"mousedown",void 0],[re,"mousemove",void 0],[re,"mouseup",void 0],[e.window.document,"mousemove",{capture:!0}],[e.window.document,"mouseup",void 0],[re,"mouseover",void 0],[re,"mouseout",void 0],[re,"dblclick",void 0],[re,"click",void 0],[re,"keydown",{capture:!1}],[re,"keyup",void 0],[re,"wheel",{passive:!1}],[re,"contextmenu",void 0],[e.window,"blur",void 0]];for(var ye=0,Ue=this._listeners;yeQe?Math.min(2,Wt):Math.max(.5,Wt),Ga=Math.pow(vi,1-Jr),ii=ke.unproject(dr.add(lr.mult(Jr*Ga)).mult(ya));ke.setLocationAtPoint(ke.renderWorldCopies?ii.wrap():ii,rr)}Ue._fireMoveEvents(ye)},function(Jr){Ue._afterEase(ye,Jr)},re),this},K.prototype._prepareEase=function(re,ye,Ue){Ue===void 0&&(Ue={}),this._moving=!0,!ye&&!Ue.moving&&this.fire(new e.Event("movestart",re)),this._zooming&&!Ue.zooming&&this.fire(new e.Event("zoomstart",re)),this._rotating&&!Ue.rotating&&this.fire(new e.Event("rotatestart",re)),this._pitching&&!Ue.pitching&&this.fire(new e.Event("pitchstart",re))},K.prototype._fireMoveEvents=function(re){this.fire(new e.Event("move",re)),this._zooming&&this.fire(new e.Event("zoom",re)),this._rotating&&this.fire(new e.Event("rotate",re)),this._pitching&&this.fire(new e.Event("pitch",re))},K.prototype._afterEase=function(re,ye){if(!(this._easeId&&ye&&this._easeId===ye)){delete this._easeId;var Ue=this._zooming,ke=this._rotating,Qe=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,Ue&&this.fire(new e.Event("zoomend",re)),ke&&this.fire(new e.Event("rotateend",re)),Qe&&this.fire(new e.Event("pitchend",re)),this.fire(new e.Event("moveend",re))}},K.prototype.flyTo=function(re,ye){var Ue=this;if(!re.essential&&e.browser.prefersReducedMotion){var ke=e.pick(re,["center","zoom","bearing","pitch","around"]);return this.jumpTo(ke,ye)}this.stop(),re=e.extend({offset:[0,0],speed:1.2,curve:1.42,easing:e.ease},re);var Qe=this.transform,vt=this.getZoom(),qt=this.getBearing(),br=this.getPitch(),Br=this.getPadding(),pr="zoom"in re?e.clamp(+re.zoom,Qe.minZoom,Qe.maxZoom):vt,mt="bearing"in re?this._normalizeBearing(re.bearing,qt):qt,Mt="pitch"in re?+re.pitch:br,Ft="padding"in re?re.padding:Qe.padding,rr=Qe.zoomScale(pr-vt),hr=e.Point.convert(re.offset),sr=Qe.centerPoint.add(hr),dr=Qe.pointLocation(sr),lr=e.LngLat.convert(re.center||dr);this._normalizeCenter(lr);var Wt=Qe.project(dr),ir=Qe.project(lr).sub(Wt),Gt=re.curve,Dr=Math.max(Qe.width,Qe.height),Jr=Dr/rr,ya=ir.mag();if("minZoom"in re){var vi=e.clamp(Math.min(re.minZoom,vt,pr),Qe.minZoom,Qe.maxZoom),Ga=Dr/Qe.zoomScale(vi-vt);Gt=Math.sqrt(Ga/ya*2)}var ii=Gt*Gt;function Zi(Oo){var Cs=(Jr*Jr-Dr*Dr+(Oo?-1:1)*ii*ii*ya*ya)/(2*(Oo?Jr:Dr)*ii*ya);return Math.log(Math.sqrt(Cs*Cs+1)-Cs)}function Fi(Oo){return(Math.exp(Oo)-Math.exp(-Oo))/2}function ui(Oo){return(Math.exp(Oo)+Math.exp(-Oo))/2}function _i(Oo){return Fi(Oo)/ui(Oo)}var Si=Zi(0),Ui=function(Oo){return ui(Si)/ui(Si+Gt*Oo)},fn=function(Oo){return Dr*((ui(Si)*_i(Si+Gt*Oo)-Fi(Si))/ii)/ya},_o=(Zi(1)-Si)/Gt;if(Math.abs(ya)<1e-6||!isFinite(_o)){if(Math.abs(Dr-Jr)<1e-6)return this.easeTo(re,ye);var Uo=Jrre.maxDuration&&(re.duration=0),this._zooming=!0,this._rotating=qt!==mt,this._pitching=Mt!==br,this._padding=!Qe.isPaddingEqual(Ft),this._prepareEase(ye,!1),this._ease(function(Oo){var Cs=Oo*_o,Ys=1/Ui(Cs);Qe.zoom=Oo===1?pr:vt+Qe.scaleZoom(Ys),Ue._rotating&&(Qe.bearing=e.number(qt,mt,Oo)),Ue._pitching&&(Qe.pitch=e.number(br,Mt,Oo)),Ue._padding&&(Qe.interpolatePadding(Br,Ft,Oo),sr=Qe.centerPoint.add(hr));var mu=Oo===1?lr:Qe.unproject(Wt.add(ir.mult(fn(Cs))).mult(Ys));Qe.setLocationAtPoint(Qe.renderWorldCopies?mu.wrap():mu,sr),Ue._fireMoveEvents(ye)},function(){return Ue._afterEase(ye)},re),this},K.prototype.isEasing=function(){return!!this._easeFrameId},K.prototype.stop=function(){return this._stop()},K.prototype._stop=function(re,ye){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var Ue=this._onEaseEnd;delete this._onEaseEnd,Ue.call(this,ye)}if(!re){var ke=this.handlers;ke&&ke.stop(!1)}return this},K.prototype._ease=function(re,ye,Ue){Ue.animate===!1||Ue.duration===0?(re(1),ye()):(this._easeStart=e.browser.now(),this._easeOptions=Ue,this._onEaseFrame=re,this._onEaseEnd=ye,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},K.prototype._renderFrameCallback=function(){var re=Math.min((e.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(re)),re<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},K.prototype._normalizeBearing=function(re,ye){re=e.wrap(re,-180,180);var Ue=Math.abs(re-ye);return Math.abs(re-360-ye)180?-360:Ue<-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 re=this._map._getUIString("AttributionControl."+xe);K.title=re,K.setAttribute("aria-label",re)},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 re=xe.reduce(function(ye,Ue,ke){return Ue.value&&(ye+=Ue.key+"="+Ue.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 re=K[xe].getSource();if(re.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,re=this._queue;return re.push({callback:K,id:xe,cancelled:!1}),xe},Na.prototype.remove=function(K){for(var xe=this._currentlyRunning,re=xe?this._queue.concat(xe):this._queue,ye=0,Ue=re;yere.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(re.minPitch!=null&&re.maxPitch!=null&&re.minPitch>re.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(re.minPitch!=null&&re.minPitchhn)throw new Error("maxPitch must be less than or equal to "+hn);var Ue=new es(re.minZoom,re.maxZoom,re.minPitch,re.maxPitch,re.renderWorldCopies);if(ge.call(this,Ue,re),this._interactive=re.interactive,this._maxTileCacheSize=re.maxTileCacheSize,this._failIfMajorPerformanceCaveat=re.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=re.preserveDrawingBuffer,this._antialias=re.antialias,this._trackResize=re.trackResize,this._bearingSnap=re.bearingSnap,this._refreshExpiredTiles=re.refreshExpiredTiles,this._fadeDuration=re.fadeDuration,this._crossSourceCollisions=re.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=re.collectResourceTiming,this._renderTaskQueue=new Na,this._controls=[],this._mapId=e.uniqueId(),this._locale=e.extend({},ea,re.locale),this._clickTolerance=re.clickTolerance,this._requestManager=new e.RequestManager(re.transformRequest,re.accessToken),typeof re.container=="string"){if(this._container=e.window.document.getElementById(re.container),!this._container)throw new Error("Container '"+re.container+"' not found.")}else if(re.container instanceof Qa)this._container=re.container;else throw new Error("Invalid type: 'container' must be a String or HTMLElement.");if(re.maxBounds&&this.setMaxBounds(re.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,re);var ke=typeof re.hash=="string"&&re.hash||void 0;this._hash=re.hash&&new tu(ke).addTo(this),(!this._hash||!this._hash._onHashChange())&&(this.jumpTo({center:re.center,zoom:re.zoom,bearing:re.bearing,pitch:re.pitch}),re.bounds&&(this.resize(),this.fitBounds(re.bounds,e.extend({},re.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=re.localIdeographFontFamily,re.style&&this.setStyle(re.style,{localIdeographFontFamily:re.localIdeographFontFamily}),re.attributionControl&&this.addControl(new zi({customAttribution:re.customAttribution})),this.addControl(new Ei,re.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,Ue){if(Ue===void 0&&(ye.getDefaultPosition?Ue=ye.getDefaultPosition():Ue="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[Ue];return Ue.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 Ue=this._controls.indexOf(ye);return Ue>-1&&this._controls.splice(Ue,1),ye.onRemove(this),this},K.prototype.hasControl=function(ye){return this._controls.indexOf(ye)>-1},K.prototype.resize=function(ye){var Ue=this._containerDimensions(),ke=Ue[0],Qe=Ue[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,Ue,ke){var Qe=this,vt;if(ye==="mouseenter"||ye==="mouseover"){var qt=!1,br=function(rr){var hr=Qe.getLayer(Ue)?Qe.queryRenderedFeatures(rr.point,{layers:[Ue]}):[];hr.length?qt||(qt=!0,ke.call(Qe,new De(ye,Qe,rr.originalEvent,{features:hr}))):qt=!1},Br=function(){qt=!1};return{layer:Ue,listener:ke,delegates:{mousemove:br,mouseout:Br}}}else if(ye==="mouseleave"||ye==="mouseout"){var pr=!1,mt=function(rr){var hr=Qe.getLayer(Ue)?Qe.queryRenderedFeatures(rr.point,{layers:[Ue]}):[];hr.length?pr=!0:pr&&(pr=!1,ke.call(Qe,new De(ye,Qe,rr.originalEvent)))},Mt=function(rr){pr&&(pr=!1,ke.call(Qe,new De(ye,Qe,rr.originalEvent)))};return{layer:Ue,listener:ke,delegates:{mousemove:mt,mouseout:Mt}}}else{var Ft=function(rr){var hr=Qe.getLayer(Ue)?Qe.queryRenderedFeatures(rr.point,{layers:[Ue]}):[];hr.length&&(rr.features=hr,ke.call(Qe,rr),delete rr.features)};return{layer:Ue,listener:ke,delegates:(vt={},vt[ye]=Ft,vt)}}},K.prototype.on=function(ye,Ue,ke){if(ke===void 0)return ge.prototype.on.call(this,ye,Ue);var Qe=this._createDelegatedListener(ye,Ue,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,Ue,ke){if(ke===void 0)return ge.prototype.once.call(this,ye,Ue);var Qe=this._createDelegatedListener(ye,Ue,ke);for(var vt in Qe.delegates)this.once(vt,Qe.delegates[vt]);return this},K.prototype.off=function(ye,Ue,ke){var Qe=this;if(ke===void 0)return ge.prototype.off.call(this,ye,Ue);var vt=function(qt){for(var br=qt[ye],Br=0;Br180;){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 re=ge.classList;for(var ye in vn)re.remove("mapboxgl-"+xe+"-anchor-"+ye);re.add("mapboxgl-"+xe+"-anchor-"+K)}var Ii=function(ge){function K(xe,re){if(ge.call(this),(xe instanceof e.window.HTMLElement||re)&&(xe=e.extend({element:xe},re)),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"),Ue=41,ke=27;ye.setAttributeNS(null,"display","block"),ye.setAttributeNS(null,"height",Ue+"px"),ye.setAttributeNS(null,"width",ke+"px"),ye.setAttributeNS(null,"viewBox","0 0 "+ke+" "+Ue);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 br=[{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"}],Br=0,pr=br;Br=ye}this._isDragging&&(this._pos=re.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(re){this._element.contains(re.originalEvent.target)&&(re.preventDefault(),this._positionDelta=re.point.sub(this._pos).add(this._offset),this._pointerdownPos=re.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(re){return this._draggable=!!re,this._map&&(re?(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(re){return this._rotation=re||0,this._update(),this},K.prototype.getRotation=function(){return this._rotation},K.prototype.setRotationAlignment=function(re){return this._rotationAlignment=re||"auto",this._update(),this},K.prototype.getRotationAlignment=function(){return this._rotationAlignment},K.prototype.setPitchAlignment=function(re){return this._pitchAlignment=re&&re!=="auto"?re: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},Ln;function Dn(ge){Ln!==void 0?ge(Ln):e.window.navigator.permissions!==void 0?e.window.navigator.permissions.query({name:"geolocation"}).then(function(K){Ln=K.state!=="denied",ge(Ln)}):(Ln=!!e.window.navigator.geolocation,ge(Ln))}var Wn=0,Os=!1,xl=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(re){return this._map=re,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,Wn=0,Os=!1},K.prototype._isOutOfMapMaxBounds=function(re){var ye=this._map.getMaxBounds(),Ue=re.coords;return ye&&(Ue.longitudeye.getEast()||Ue.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(re){if(this._map){if(this._isOutOfMapMaxBounds(re)){this._setErrorState(),this.fire(new e.Event("outofmaxbounds",re)),this._updateMarker(),this._finish();return}if(this.options.trackUserLocation)switch(this._lastKnownPosition=re,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(re),(!this.options.trackUserLocation||this._watchState==="ACTIVE_LOCK")&&this._updateCamera(re),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new e.Event("geolocate",re)),this._finish()}},K.prototype._updateCamera=function(re){var ye=new e.LngLat(re.coords.longitude,re.coords.latitude),Ue=re.coords.accuracy,ke=this._map.getBearing(),Qe=e.extend({bearing:ke},this.options.fitBoundsOptions);this._map.fitBounds(ye.toBounds(Ue),Qe,{geolocateSource:!0})},K.prototype._updateMarker=function(re){if(re){var ye=new e.LngLat(re.coords.longitude,re.coords.latitude);this._accuracyCircleMarker.setLngLat(ye).addTo(this._map),this._userLocationDotMarker.setLngLat(ye).addTo(this._map),this._accuracy=re.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},K.prototype._updateCircleRadius=function(){var re=this._map._container.clientHeight/2,ye=this._map.unproject([0,re]),Ue=this._map.unproject([1,re]),ke=ye.distanceTo(Ue),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(re){if(this._map){if(this.options.trackUserLocation)if(re.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(re.code===3&&Os)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new e.Event("error",re)),this._finish()}},K.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},K.prototype._setupUI=function(re){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",re===!1){e.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");var Ue=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=Ue,this._geolocateButton.setAttribute("aria-label",Ue)}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":Wn--,Os=!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"),Wn++;var re;Wn>1?(re={maximumAge:6e5,timeout:0},Os=!0):(re=this.options.positionOptions,Os=!1),this._geolocationWatchID=e.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,re)}}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"},Xl=function(K){this.options=e.extend({},ho,K),e.bindAll(["_onMove","setUnit"],this)};Xl.prototype.getDefaultPosition=function(){return"bottom-left"},Xl.prototype._onMove=function(){hs(this._map,this._container,this.options)},Xl.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},Xl.prototype.onRemove=function(){r.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},Xl.prototype.setUnit=function(K){this.options.unit=K,hs(this._map,this._container,this.options)};function hs(ge,K,xe){var re=xe&&xe.maxWidth||100,ye=ge._container.clientHeight/2,Ue=ge.unproject([0,ye]),ke=ge.unproject([re,ye]),Qe=Ue.distanceTo(ke);if(xe&&xe.unit==="imperial"){var vt=3.2808*Qe;if(vt>5280){var qt=vt/5280;Al(K,re,qt,ge._getUIString("ScaleControl.Miles"))}else Al(K,re,vt,ge._getUIString("ScaleControl.Feet"))}else if(xe&&xe.unit==="nautical"){var br=Qe/1852;Al(K,re,br,ge._getUIString("ScaleControl.NauticalMiles"))}else Qe>=1e3?Al(K,re,Qe/1e3,ge._getUIString("ScaleControl.Kilometers")):Al(K,re,Qe,ge._getUIString("ScaleControl.Meters"))}function Al(ge,K,xe,re){var ye=ru(xe),Ue=ye/xe;ge.style.width=K*Ue+"px",ge.innerHTML=ye+" "+re}function El(ge){var K=Math.pow(10,Math.ceil(-Math.log(ge)/Math.LN10));return Math.round(ge*K)/K}function ru(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:El(xe),K*xe}var js=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")};js.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},js.prototype.onRemove=function(){r.remove(this._controlContainer),this._map=null,e.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},js.prototype._checkFullscreenSupport=function(){return!!(e.window.document.fullscreenEnabled||e.window.document.mozFullScreenEnabled||e.window.document.msFullscreenEnabled||e.window.document.webkitFullscreenEnabled)},js.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)},js.prototype._updateTitle=function(){var K=this._getTitle();this._fullscreenButton.setAttribute("aria-label",K),this._fullscreenButton.title=K},js.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},js.prototype._isFullscreen=function(){return this._fullscreen},js.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())},js.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"},bl=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", "),Xn=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(re){return this._map&&this.remove(),this._map=re,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(re){return this._lngLat=e.LngLat.convert(re),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(re){return this.setDOMContent(e.window.document.createTextNode(re))},K.prototype.setHTML=function(re){var ye=e.window.document.createDocumentFragment(),Ue=e.window.document.createElement("body"),ke;for(Ue.innerHTML=re;ke=Ue.firstChild,!!ke;)ye.appendChild(ke);return this.setDOMContent(ye)},K.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},K.prototype.setMaxWidth=function(re){return this.options.maxWidth=re,this._update(),this},K.prototype.setDOMContent=function(re){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(re),this._createCloseButton(),this._update(),this._focusFirstElement(),this},K.prototype.addClassName=function(re){this._container&&this._container.classList.add(re)},K.prototype.removeClassName=function(re){this._container&&this._container.classList.remove(re)},K.prototype.setOffset=function(re){return this.options.offset=re,this._update(),this},K.prototype.toggleClassName=function(re){if(this._container)return this._container.classList.toggle(re)},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(re){this._update(re.point)},K.prototype._onMouseMove=function(re){this._update(re.point)},K.prototype._onDrag=function(re){this._update(re.point)},K.prototype._update=function(re){var ye=this,Ue=this._lngLat||this._trackPointer;if(!(!this._map||!Ue||!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&&!re))){var ke=this._pos=this._trackPointer&&re?re:this._map.project(this._lngLat),Qe=this.options.anchor,vt=kl(this.options.offset);if(!Qe){var qt=this._container.offsetWidth,br=this._container.offsetHeight,Br;ke.y+vt.bottom.ythis._map.transform.height-br?Br=["bottom"]:Br=[],ke.xthis._map.transform.width-qt/2&&Br.push("right"),Br.length===0?Qe="bottom":Qe=Br.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 re=this._container.querySelector(bl);re&&re.focus()}},K.prototype._onClose=function(){this.remove()},K}(e.Evented);function kl(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 kl(new e.Point(0,0))}var Io={version:e.version,supported:t,setRTLTextPlugin:e.setRTLTextPlugin,getRTLTextPluginStatus:e.getRTLTextPluginStatus,Map:Ua,NavigationControl:Ti,GeolocateControl:xl,AttributionControl:zi,ScaleControl:Xl,FullscreenControl:js,Popup:Xn,Marker:Ii,Style:Ul,LngLat:e.LngLat,LngLatBounds:e.LngLatBounds,Point:e.Point,MercatorCoordinate:e.MercatorCoordinate,Evented:e.Evented,config:e.config,prewarm:tn,clearPrewarmedResources:cn,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 Io}),S})}}),_V=He({"src/plots/mapbox/layers.js"(Z,q){"use strict";var v=sa(),_=su().sanitizeHTML,S=E6(),M=nm();function e(i,n){this.subplot=i,this.uid=i.uid+"-"+n,this.index=n,this.idSource="source-"+this.uid,this.idLayer=M.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(n){this.visible?this.needsNewImage(n)?this.updateImage(n):this.needsNewSource(n)?(this.removeLayer(),this.updateSource(n),this.updateLayer(n)):this.needsNewLayer(n)?this.updateLayer(n):this.updateStyle(n):(this.updateSource(n),this.updateLayer(n)),this.visible=r(n)},t.needsNewImage=function(i){var n=this.subplot.map;return n.getSource(this.idSource)&&this.sourceType==="image"&&i.sourcetype==="image"&&(this.source!==i.source||JSON.stringify(this.coordinates)!==JSON.stringify(i.coordinates))},t.needsNewSource=function(i){return this.sourceType!==i.sourcetype||JSON.stringify(this.source)!==JSON.stringify(i.source)||this.layerType!==i.type},t.needsNewLayer=function(i){return this.layerType!==i.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},t.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]},t.updateImage=function(i){var n=this.subplot.map;n.getSource(this.idSource).updateImage({url:i.source,coordinates:i.coordinates});var s=this.findFollowingMapboxLayerId(this.lookupBelow());s!==null&&this.subplot.map.moveLayer(this.idLayer,s)},t.updateSource=function(i){var n=this.subplot.map;if(n.getSource(this.idSource)&&n.removeSource(this.idSource),this.sourceType=i.sourcetype,this.source=i.source,!!r(i)){var s=a(i);n.addSource(this.idSource,s)}},t.findFollowingMapboxLayerId=function(i){if(i==="traces")for(var n=this.subplot.getMapLayers(),s=0;s0){for(var s=0;s0}function o(i){var n={},s={};switch(i.type){case"circle":v.extendFlat(s,{"circle-radius":i.circle.radius,"circle-color":i.color,"circle-opacity":i.opacity});break;case"line":v.extendFlat(s,{"line-width":i.line.width,"line-color":i.color,"line-opacity":i.opacity,"line-dasharray":i.line.dash});break;case"fill":v.extendFlat(s,{"fill-color":i.color,"fill-outline-color":i.fill.outlinecolor,"fill-opacity":i.opacity});break;case"symbol":var h=i.symbol,f=S(h.textposition,h.iconsize);v.extendFlat(n,{"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}),v.extendFlat(s,{"icon-color":i.color,"text-color":h.textfont.color,"text-opacity":i.opacity});break;case"raster":v.extendFlat(s,{"raster-fade-duration":0,"raster-opacity":i.opacity});break}return{layout:n,paint:s}}function a(i){var n=i.sourcetype,s=i.source,h={type:n},f;return n==="geojson"?f="data":n==="vector"?f=typeof s=="string"?"url":"tiles":n==="raster"?(f="tiles",h.tileSize=256):n==="image"&&(f="url",h.coordinates=i.coordinates),h[f]=s,i.sourceattribution&&(h.attribution=_(i.sourceattribution)),h}q.exports=function(n,s,h){var f=new e(n,s);return f.update(h),f}}}),xV=He({"src/plots/mapbox/mapbox.js"(Z,q){"use strict";var v=k6(),_=sa(),S=Ev(),M=so(),e=Wo(),t=Ap(),r=Hc(),o=Jd(),a=o.drawMode,i=o.selectMode,n=Af().prepSelect,s=Af().clearOutline,h=Af().clearSelectionsCache,f=Af().selectOnClick,m=nm(),c=_V();function T(p,b){this.id=b,this.gd=p;var d=p._fullLayout,u=p._context;this.container=d._glcontainer.node(),this.isStatic=u.staticPlot,this.uid=d._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(d),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(p,b,d){var u=this,g=b[u.id];u.map&&g.accesstoken!==u.accessToken&&(u.map.remove(),u.map=null,u.styleObj=null,u.traceHash={},u.layerList=[]);var y;u.map?y=new Promise(function(D,P){u.updateMap(p,b,D,P)}):y=new Promise(function(D,P){u.createMap(p,b,D,P)}),d.push(y)},l.createMap=function(p,b,d,u){var g=this,y=b[g.id],D=g.styleObj=w(y.style,b);g.accessToken=y.accesstoken;var P=y.bounds,z=P?[[P.west,P.south],[P.east,P.north]]:null,F=g.map=new v.Map({container:g.div,style:D.style,center:E(y.center),zoom:y.zoom,bearing:y.bearing,pitch:y.pitch,maxBounds:z,interactive:!g.isStatic,preserveDrawingBuffer:g.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1}).addControl(new v.AttributionControl({compact:!0}));F._canvas.style.left="0px",F._canvas.style.top="0px",g.rejectOnError(u),g.isStatic||g.initFx(p,b);var N=[];N.push(new Promise(function(O){F.once("load",O)})),N=N.concat(S.fetchTraceGeoData(p)),Promise.all(N).then(function(){g.fillBelowLookup(p,b),g.updateData(p),g.updateLayout(b),g.resolveOnRender(d)}).catch(u)},l.updateMap=function(p,b,d,u){var g=this,y=g.map,D=b[this.id];g.rejectOnError(u);var P=[],z=w(D.style,b);JSON.stringify(g.styleObj)!==JSON.stringify(z)&&(g.styleObj=z,y.setStyle(z.style),g.traceHash={},P.push(new Promise(function(F){y.once("styledata",F)}))),P=P.concat(S.fetchTraceGeoData(p)),Promise.all(P).then(function(){g.fillBelowLookup(p,b),g.updateData(p),g.updateLayout(b),g.resolveOnRender(d)}).catch(u)},l.fillBelowLookup=function(p,b){var d=b[this.id],u=d.layers,g,y,D=this.belowLookup={},P=!1;for(g=0;g1)for(g=0;g-1&&f(z.originalEvent,u,[d.xaxis],[d.yaxis],d.id,P),F.indexOf("event")>-1&&r.click(u,z.originalEvent)}}},l.updateFx=function(p){var b=this,d=b.map,u=b.gd;if(b.isStatic)return;function g(z){var F=b.map.unproject(z);return[F.lng,F.lat]}var y=p.dragmode,D;D=function(z,F){if(F.isRect){var N=z.range={};N[b.id]=[g([F.xmin,F.ymin]),g([F.xmax,F.ymax])]}else{var O=z.lassoPoints={};O[b.id]=F.map(g)}};var P=b.dragOptions;b.dragOptions=_.extendDeep(P||{},{dragmode:p.dragmode,element:b.div,gd:u,plotinfo:{id:b.id,domain:p[b.id].domain,xaxis:b.xaxis,yaxis:b.yaxis,fillRangeItems:D},xaxes:[b.xaxis],yaxes:[b.yaxis],subplot:b.id}),d.off("click",b.onClickInPanHandler),i(y)||a(y)?(d.dragPan.disable(),d.on("zoomstart",b.clearOutline),b.dragOptions.prepFn=function(z,F,N){n(z,F,N,b.dragOptions,y)},t.init(b.dragOptions)):(d.dragPan.enable(),d.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),d.on("click",b.onClickInPanHandler))},l.updateFramework=function(p){var b=p[this.id].domain,d=p._size,u=this.div.style;u.width=d.w*(b.x[1]-b.x[0])+"px",u.height=d.h*(b.y[1]-b.y[0])+"px",u.left=d.l+b.x[0]*d.w+"px",u.top=d.t+(1-b.y[1])*d.h+"px",this.xaxis._offset=d.l+b.x[0]*d.w,this.xaxis._length=d.w*(b.x[1]-b.x[0]),this.yaxis._offset=d.t+(1-b.y[1])*d.h,this.yaxis._length=d.h*(b.y[1]-b.y[0])},l.updateLayers=function(p){var b=p[this.id],d=b.layers,u=this.layerList,g;if(d.length!==u.length){for(g=0;gN/2){var O=D.split("|").join("
");z.text(O).attr("data-unformatted",O).call(o.convertToTspans,c),F=r.bBox(z.node())}z.attr("transform",_(-3,-F.height+8)),P.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 L=1;F.width+6>N&&(L=N/(F.width+6));var U=[x.l+x.w*E.x[1],x.t+x.h*(1-E.y[0])];P.attr("transform",_(U[0],U[1])+S(L))}};function f(c,T){var l=c._fullLayout,x=c._context;if(x.mapboxAccessToken==="")return"";for(var w=[],A=[],E=!1,p=!1,b=0;b1&&v.warn(n.multipleTokensErrorMsg),w[0]):(A.length&&v.log(["Listed mapbox access token(s)",A.join(","),"but did not use a Mapbox map style, ignoring token(s)."].join(" ")),"")}function m(c){return typeof c=="string"&&(n.styleValuesMapbox.indexOf(c)!==-1||c.indexOf("mapbox://")===0||c.indexOf("stamen")===0)}Z.updateFx=function(c){for(var T=c._fullLayout,l=T._subplots[i],x=0;x=0;o--)t.removeLayer(r[o][1])},e.dispose=function(){var t=this.subplot.map;this._removeLayers(),t.removeSource(this.sourceId)},q.exports=function(r,o){var a=o[0].trace,i=new M(r,a.uid),n=i.sourceId,s=v(o),h=i.below=r.belowLookup["trace-"+a.uid];return r.map.addSource(n,{type:"geojson",data:s.geojson}),i._addLayers(s,h),o[0].trace._glTrace=i,i}}}),MV=He({"src/traces/choroplethmapbox/index.js"(Z,q){"use strict";var v=["*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(" ");q.exports={attributes:C6(),supplyDefaults:AV(),colorbar:o0(),calc:lT(),plot:SV(),hoverPoints:cT(),eventData:fT(),selectPoints:hT(),styleOnSelect:function(_,S){if(S){var M=S[0].trace;M._glTrace.updateOnSelect(S)}},getBelow:function(_,S){for(var M=S.getMapLayers(),e=M.length-2;e>=0;e--){var t=M[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 p=M.extractOpts(a),b=p.reversescale?M.flipScale(p.colorscale):p.colorscale,d=b[0][1],u=S.opacity(d)<1?d:S.addOpacity(d,0),g=["interpolate",["linear"],["heatmap-density"],0,u];for(f=1;f=0;r--)e.removeLayer(t[r][1])},M.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)},q.exports=function(t,r){var o=r[0].trace,a=new S(t,o.uid),i=a.sourceId,n=v(r),s=a.below=t.belowLookup["trace-"+o.uid];return t.map.addSource(i,{type:"geojson",data:n.geojson}),a._addLayers(n,s),a}}}),IV=He({"src/traces/densitymapbox/hover.js"(Z,q){"use strict";var v=Wo(),_=ST().hoverPoints,S=ST().getExtraText;q.exports=function(e,t,r){var o=_(e,t,r);if(o){var a=o[0],i=a.cd,n=i[0].trace,s=i[a.index];if(delete a.color,"z"in s){var h=a.subplot.mockAxis;a.z=s.z,a.zLabel=v.tickText(h,h.c2l(s.z),"hover").text}return a.extraText=S(n,s,i[0].t.labels),[a]}}}}),RV=He({"src/traces/densitymapbox/event_data.js"(Z,q){"use strict";q.exports=function(_,S){return _.lon=S.lon,_.lat=S.lat,_.z=S.z,_}}}),DV=He({"src/traces/densitymapbox/index.js"(Z,q){"use strict";var v=["*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(" ");q.exports={attributes:P6(),supplyDefaults:kV(),colorbar:o0(),formatLabels:M6(),calc:CV(),plot:PV(),hoverPoints:IV(),eventData:RV(),getBelow:function(_,S){for(var M=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} @@ -3210,8 +3210,8 @@ uniform `+br+" "+Br+" u_"+pr+`; {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"}}}),OV=He({"src/plots/map/styles/arcgis-sat.js"(Z,q){q.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,q){"use strict";var v=$m(),_=FV(),S=OV(),M='\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",i="https://basemaps.cartocdn.com/gl/voyager-nolabels-gl-style/style.json",n={basic:r,streets:r,outdoors:r,light:e,dark:t,satellite:S,"satellite-streets":_,"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:M,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":i},s=v(n);q.exports={styleValueDflt:"basic",stylesMap:n,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,q){"use strict";var v=sa(),_=$n().defaultLine,S=wc().attributes,M=tc(),e=af().textposition,t=pc().overrideAll,r=zl().templatedArray,o=b0(),a=M({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});a.family.dflt="Open Sans Regular, Arial Unicode MS Regular";var i=q.exports=t({_arrayAttrRegexps:[v.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:_},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:_}},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:v.extendFlat({},e,{arrayOk:!1})}})},"plot","from-root");i.uirevision={valType:"any",editType:"none"}}}),ET=He({"src/traces/scattermap/attributes.js"(Z,q){"use strict";var{hovertemplateAttrs:v,texttemplateAttrs:_,templatefallbackAttrs:S}=$l(),M=$d(),e=vg(),t=af(),r=kx(),o=au(),a=ku(),i=rs().extendFlat,n=pc().overrideAll,s=kx(),h=e.line,f=e.marker;q.exports=n({lon:e.lon,lat:e.lat,cluster:{enabled:{valType:"boolean"},maxzoom:i({},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:i({},f.opacity,{dflt:1})},mode:i({},t.mode,{dflt:"markers"}),text:i({},t.text,{}),texttemplate:_({editType:"plot"},{keys:["lat","lon","text"]}),texttemplatefallback:S({editType:"plot"}),hovertext:i({},t.hovertext,{}),line:{color:h.color,width:h.width},connectgaps:t.connectgaps,marker:i({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:M(),textfont:r.layers.symbol.textfont,textposition:r.layers.symbol.textposition,below:{valType:"string"},selected:{marker:t.selected.marker},unselected:{marker:t.unselected.marker},hoverinfo:i({},o.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:v(),hovertemplatefallback:S()},"calc","nested")}}),I6=He({"src/traces/scattermap/constants.js"(Z,q){"use strict";var v=["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"];q.exports={isSupportedFont:function(_){return v.indexOf(_)!==-1}}}}),BV=He({"src/traces/scattermap/defaults.js"(Z,q){"use strict";var v=sa(),_=Fu(),S=md(),M=Dd(),e=zd(),t=ev(),r=ET(),o=I6().isSupportedFont;q.exports=function(n,s,h,f){function m(g,y){return v.coerce(n,s,r,g,y)}function c(g,y){return v.coerce2(n,s,r,g,y)}var T=a(n,s,m);if(!T){s.visible=!1;return}if(m("text"),m("texttemplate"),m("texttemplatefallback"),m("hovertext"),m("hovertemplate"),m("hovertemplatefallback"),m("mode"),m("below"),_.hasMarkers(s)){S(n,s,h,f,m,{noLine:!0,noAngle:!0}),m("marker.allowoverlap"),m("marker.angle");var l=s.marker;l.symbol!=="circle"&&(v.isArrayOrTypedArray(l.size)&&(l.size=l.size[0]),v.isArrayOrTypedArray(l.color)&&(l.color=l.color[0]))}_.hasLines(s)&&(M(n,s,h,f,m,{noDash:!0}),m("connectgaps"));var x=c("cluster.maxzoom"),w=c("cluster.step"),A=c("cluster.color",s.marker&&s.marker.color||h),E=c("cluster.size"),p=c("cluster.opacity"),b=x!==!1||w!==!1||A!==!1||E!==!1||p!==!1,d=m("cluster.enabled",b);if(d||_.hasText(s)){var u=f.font.family;e(n,s,f,m,{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}})}m("fill"),s.fill!=="none"&&t(n,s,h,m),v.coerceSelectionMarkerOpacity(s,m)};function a(i,n,s){var h=s("lon")||[],f=s("lat")||[],m=Math.min(h.length,f.length);return n._length=m,m}}}),R6=He({"src/traces/scattermap/format_labels.js"(Z,q){"use strict";var v=Wo();q.exports=function(S,M,e){var t={},r=e[M.subplot]._subplot,o=r.mockAxis,a=S.lonlat;return t.lonLabel=v.tickText(o,o.c2l(a[0]),!0).text,t.latLabel=v.tickText(o,o.c2l(a[1]),!0).text,t}}}),D6=He({"src/plots/map/convert_text_opts.js"(Z,q){"use strict";var v=sa();q.exports=function(S,M){var e=S.split(" "),t=e[0],r=e[1],o=v.isArrayOrTypedArray(M)?v.mean(M):M,a=.5+o/100,i=1.5+o/100,n=["",""],s=[0,0];switch(t){case"top":n[0]="top",s[1]=-i;break;case"bottom":n[0]="bottom",s[1]=i;break}switch(r){case"left":n[1]="right",s[0]=-a;break;case"right":n[1]="left",s[0]=a;break}var h;return n[0]&&n[1]?h=n.join("-"):n[0]?h=n[0]:n[1]?h=n[1]:h="center",{anchor:h,offset:s}}}}),NV=He({"src/traces/scattermap/convert.js"(Z,q){"use strict";var v=ns(),_=sa(),S=Gs().BADNUM,M=g0(),e=rc(),t=as(),r=r1(),o=Fu(),a=I6().isSupportedFont,i=D6(),n=$p().appendArrayPointValue,s=su().NEWLINES,h=su().BR_TAG_ALL;q.exports=function(p,b){var d=b[0].trace,u=d.visible===!0&&d._length!==0,g=d.fill!=="none",y=o.hasLines(d),D=o.hasMarkers(d),P=o.hasText(d),z=D&&d.marker.symbol==="circle",F=D&&d.marker.symbol!=="circle",N=d.cluster&&d.cluster.enabled,O=f("fill"),L=f("line"),U=f("circle"),B=f("symbol"),W={fill:O,line:L,circle:U,symbol:B};if(!u)return W;var $;if((g||y)&&($=M.calcTraceToLineCoords(b)),g&&(O.geojson=M.makePolygon($),O.layout.visibility="visible",_.extendFlat(O.paint,{"fill-color":d.fillcolor})),y&&(L.geojson=M.makeLine($),L.layout.visibility="visible",_.extendFlat(L.paint,{"line-width":d.line.width,"line-color":d.line.color,"line-opacity":d.opacity})),z){var ue=m(b);U.geojson=ue.geojson,U.layout.visibility="visible",N&&(U.filter=["!",["has","point_count"]],W.cluster={type:"circle",filter:["has","point_count"],layout:{visibility:"visible"},paint:{"circle-color":w(d.cluster.color,d.cluster.step),"circle-radius":w(d.cluster.size,d.cluster.step),"circle-opacity":w(d.cluster.opacity,d.cluster.step)}},W.clusterCount={type:"symbol",filter:["has","point_count"],paint:{},layout:{"text-field":"{point_count_abbreviated}","text-font":A(d),"text-size":12}}),_.extendFlat(U.paint,{"circle-color":ue.mcc,"circle-radius":ue.mrc,"circle-opacity":ue.mo})}if(z&&N&&(U.filter=["!",["has","point_count"]]),(F||P)&&(B.geojson=c(b,p),_.extendFlat(B.layout,{visibility:"visible","icon-image":"{symbol}-15","text-field":"{text}"}),F&&(_.extendFlat(B.layout,{"icon-size":d.marker.size/10}),"angle"in d.marker&&d.marker.angle!=="auto"&&_.extendFlat(B.layout,{"icon-rotate":{type:"identity",property:"angle"},"icon-rotation-alignment":"map"}),B.layout["icon-allow-overlap"]=d.marker.allowoverlap,_.extendFlat(B.paint,{"icon-opacity":d.opacity*d.marker.opacity,"icon-color":d.marker.color})),P)){var ce=(d.marker||{}).size,de=i(d.textposition,ce);_.extendFlat(B.layout,{"text-size":d.textfont.size,"text-anchor":de.anchor,"text-offset":de.offset,"text-font":A(d)}),_.extendFlat(B.paint,{"text-color":d.textfont.color,"text-opacity":d.opacity})}return W};function f(E){return{type:E,geojson:M.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function m(E){var p=E[0].trace,b=p.marker,d=p.selectedpoints,u=_.isArrayOrTypedArray(b.color),g=_.isArrayOrTypedArray(b.size),y=_.isArrayOrTypedArray(b.opacity),D;function P(ce){return p.opacity*ce}function z(ce){return ce/2}var F;u&&(e.hasColorscale(p,"marker")?F=e.makeColorScaleFuncFromTrace(b):F=_.identity);var N;g&&(N=r(p));var O;y&&(O=function(ce){var de=v(ce)?+_.constrain(ce,0,1):0;return P(de)});var L=[];for(D=0;D850?D+=" Black":u>750?D+=" Extra Bold":u>650?D+=" Bold":u>550?D+=" Semi Bold":u>450?D+=" Medium":u>350?D+=" Regular":u>250?D+=" Light":u>150?D+=" Extra Light":D+=" Thin"):g.slice(0,2).join(" ")==="Open Sans"?(D="Open Sans",u>750?D+=" Extrabold":u>650?D+=" Bold":u>550?D+=" Semibold":u>350?D+=" Regular":D+=" Light"):g.slice(0,3).join(" ")==="Klokantech Noto Sans"&&(D="Klokantech Noto Sans",g[3]==="CJK"&&(D+=" CJK"),D+=u>500?" Bold":" Regular")),y&&(D+=" Italic"),D==="Open Sans Regular Italic"?D="Open Sans Italic":D==="Open Sans Regular Bold"?D="Open Sans Bold":D==="Open Sans Regular Bold Italic"?D="Open Sans Bold Italic":D==="Klokantech Noto Sans Regular Italic"&&(D="Klokantech Noto Sans Italic"),a(D)||(D=b);var P=D.split(", ");return P}}}),UV=He({"src/traces/scattermap/plot.js"(Z,q){"use strict";var v=sa(),_=NV(),S=b0().traceLayerPrefix,M={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function e(r,o,a,i){this.type="scattermap",this.subplot=r,this.uid=o,this.clusterEnabled=a,this.isHidden=i,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 i={type:"geojson",data:o.geojson};a&&a.enabled&&v.extendFlat(i,{cluster:!0,clusterMaxZoom:a.maxzoom});var n=this.subplot.map.getSource(this.sourceIds[r]);n?n.setData(o.geojson):this.subplot.map.addSource(this.sourceIds[r],i)},t.setSourceData=function(r,o){this.subplot.map.getSource(this.sourceIds[r]).setData(o.geojson)},t.addLayer=function(r,o,a){var i={type:o.type,id:this.layerIds[r],source:this.sourceIds[r],layout:o.layout,paint:o.paint};o.filter&&(i.filter=o.filter);for(var n=this.layerIds[r],s,h=this.subplot.getMapLayers(),f=0;f=0;y--){var D=g[y];n.removeLayer(c.layerIds[D])}u||n.removeSource(c.sourceIds.circle)}function x(u){for(var g=M.nonCluster,y=0;y=0;y--){var D=g[y];n.removeLayer(c.layerIds[D]),u||n.removeSource(c.sourceIds[D])}}function A(u){m?l(u):w(u)}function E(u){f?T(u):x(u)}function p(){for(var u=f?M.cluster:M.nonCluster,g=0;g=0;i--){var n=a[i];o.removeLayer(this.layerIds[n]),o.removeSource(this.sourceIds[n])}},q.exports=function(o,a){var i=a[0].trace,n=i.cluster&&i.cluster.enabled,s=i.visible!==!0,h=new e(o,i.uid,n,s),f=_(o.gd,a),m=h.below=o.belowLookup["trace-"+i.uid],c,T,l;if(n)for(h.addSource("circle",f.circle,i.cluster),c=0;c=0?Math.floor((i+180)/360):Math.ceil((i-180)/360),E=A*360,p=i-E;function b(N){var O=N.lonlat;if(O[0]===e||x&&T.indexOf(N.i+1)===-1)return 1/0;var L=_.modHalf(O[0],360),U=O[1],B=c.project([L,U]),W=B.x-f.c2p([p,U]),$=B.y-m.c2p([L,n]),ue=Math.max(3,N.mrc||0);return Math.max(Math.sqrt(W*W+$*$)-ue,1-3/ue)}if(v.getClosest(s,b,a),a.index!==!1){var d=s[a.index],u=d.lonlat,g=[_.modHalf(u[0],360)+E,u[1]],y=f.c2p(g),D=m.c2p(g),P=d.mrc||1;a.x0=y-P,a.x1=y+P,a.y0=D-P,a.y1=D+P;var z={};z[h.subplot]={_subplot:c};var F=h._module.formatLabels(d,h,z);return a.lonLabel=F.lonLabel,a.latLabel=F.latLabel,a.color=S(h,d),a.extraText=o(h,d,s[0].t.labels),a.hovertemplate=h.hovertemplate,[a]}}function o(a,i,n){if(a.hovertemplate)return;var s=i.hi||a.hoverinfo,h=s.split("+"),f=h.indexOf("all")!==-1,m=h.indexOf("lon")!==-1,c=h.indexOf("lat")!==-1,T=i.lonlat,l=[];function x(w){return w+"\xB0"}return f||m&&c?l.push("("+x(T[1])+", "+x(T[0])+")"):m?l.push(n.lon+x(T[0])):c&&l.push(n.lat+x(T[1])),(f||h.indexOf("text")!==-1)&&M(i,a,l),l.join("
")}q.exports={hoverPoints:r,getExtraText:o}}}),jV=He({"src/traces/scattermap/event_data.js"(Z,q){"use strict";q.exports=function(_,S){return _.lon=S.lon,_.lat=S.lat,_}}}),qV=He({"src/traces/scattermap/select.js"(Z,q){"use strict";var v=sa(),_=Fu(),S=Gs().BADNUM;q.exports=function(e,t){var r=e.cd,o=e.xaxis,a=e.yaxis,i=[],n=r[0].trace,s;if(!_.hasMarkers(n))return[];if(t===!1)for(s=0;s1)return 1;for(var J=H,ve=0;ve<8;ve++){var Ee=this.sampleCurveX(J)-H;if(Math.abs(Ee)Ee?Ge=J:ct=J,J=.5*(ct-Ge)+Ge;return J},solve:function(H,R){return this.sampleCurveY(this.solveCurveX(H,R))}};var h=r(n);let f,m;function c(){return f==null&&(f=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),f}function T(){if(m==null&&(m=!1,c())){let R=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(R){for(let ve=0;ve<5*5;ve++){let Ee=4*ve;R.fillStyle=`rgb(${Ee},${Ee+1},${Ee+2})`,R.fillRect(ve%5,Math.floor(ve/5),1,1)}let J=R.getImageData(0,0,5,5).data;for(let ve=0;ve<5*5*4;ve++)if(ve%4!=3&&J[ve]!==ve){m=!0;break}}}return m||!1}function l(H,R,J,ve){let Ee=new h(H,R,J,ve);return Be=>Ee.solve(Be)}let x=l(.25,.1,.25,1);function w(H,R,J){return Math.min(J,Math.max(R,H))}function A(H,R,J){let ve=J-R,Ee=((H-R)%ve+ve)%ve+R;return Ee===R?J:Ee}function E(H,...R){for(let J of R)for(let ve in J)H[ve]=J[ve];return H}let p=1;function b(H,R,J){let ve={};for(let Ee in H)ve[Ee]=R.call(this,H[Ee],Ee,H);return ve}function d(H,R,J){let ve={};for(let Ee in H)R.call(this,H[Ee],Ee,H)&&(ve[Ee]=H[Ee]);return ve}function u(H){return Array.isArray(H)?H.map(u):typeof H=="object"&&H?b(H,u):H}let g={};function y(H){g[H]||(typeof console<"u"&&console.warn(H),g[H]=!0)}function D(H,R,J){return(J.y-H.y)*(R.x-H.x)>(R.y-H.y)*(J.x-H.x)}function P(H){return typeof WorkerGlobalScope<"u"&&H!==void 0&&H instanceof WorkerGlobalScope}let z=null;function F(H){return typeof ImageBitmap<"u"&&H instanceof ImageBitmap}let N="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function O(H,R,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(H,{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(Nt,ar,Mr,zr,Wr){let ia=4*Math.max(-ar,0),fa=(Math.max(0,Mr)-Mr)*zr*4+ia,ja=4*zr,Ka=Math.max(0,ar),Wi=Math.max(0,Mr);return{rect:{x:Ka,y:Wi,width:Math.min(Nt.width,ar+zr)-Ka,height:Math.min(Nt.height,Mr+Wr)-Wi},layout:[{offset:fa,stride:ja}]}}(H,R,J,ve,Ee)),ct)for(let Nt=0;NtP(self)?self.worker&&self.worker.referrer:(window.location.protocol==="blob:"?window.parent:window).location.href,X=function(H,R){if(/:\/\//.test(H.url)&&!/^https?:|^file:/.test(H.url)){let ve=ue(H.url);if(ve)return ve(H,R);if(P(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:H,targetMapId:ce},R)}if(!(/^file:/.test(J=H.url)||/^file:/.test(Y())&&!/^\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:Y(),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 Nt=yield Ge.blob();throw new de(Ge.status,Ge.statusText,ve.url,Nt)}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 W();return{data:At,cacheControl:Ge.headers.get("Cache-Control"),expires:Ge.headers.get("Expires")}})}(H,R);if(P(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:H,mustQueue:!0,targetMapId:ce},R)}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 Nt in ve.headers)At.setRequestHeader(Nt,ve.headers[Nt]);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 Nt=At.response;if(ve.type==="json")try{Nt=JSON.parse(At.response)}catch(ar){return void Ge(ar)}Be({data:Nt,cacheControl:At.getResponseHeader("Cache-Control"),expires:At.getResponseHeader("Expires")})}else{let Nt=new Blob([At.response],{type:At.getResponseHeader("Content-Type")});Ge(new de(At.status,At.statusText,ve.url,Nt))}},Ee.signal.addEventListener("abort",()=>{At.abort(),Ge(W())}),At.send(ve.body)})}(H,R)};function Q(H){if(!H||H.indexOf("://")<=0||H.indexOf("data:image/")===0||H.indexOf("blob:")===0)return!0;let R=new URL(H),J=window.location;return R.protocol===J.protocol&&R.host===J.host}function V(H,R,J){J[H]&&J[H].indexOf(R)!==-1||(J[H]=J[H]||[],J[H].push(R))}function le(H,R,J){if(J&&J[H]){let ve=J[H].indexOf(R);ve!==-1&&J[H].splice(ve,1)}}class ae{constructor(R,J={}){E(this,J),this.type=R}}class j extends ae{constructor(R,J={}){super("error",E({error:R},J))}}class ee{on(R,J){return this._listeners=this._listeners||{},V(R,J,this._listeners),this}off(R,J){return le(R,J,this._listeners),le(R,J,this._oneTimeListeners),this}once(R,J){return J?(this._oneTimeListeners=this._oneTimeListeners||{},V(R,J,this._oneTimeListeners),this):new Promise(ve=>this.once(R,ve))}fire(R,J){typeof R=="string"&&(R=new ae(R,J||{}));let ve=R.type;if(this.listens(ve)){R.target=this;let Ee=this._listeners&&this._listeners[ve]?this._listeners[ve].slice():[];for(let ct of Ee)ct.call(this,R);let Be=this._oneTimeListeners&&this._oneTimeListeners[ve]?this._oneTimeListeners[ve].slice():[];for(let ct of Be)le(ve,ct,this._oneTimeListeners),ct.call(this,R);let Ge=this._eventedParent;Ge&&(E(R,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),Ge.fire(R))}else R instanceof j&&console.error(R.error);return this}listens(R){return this._listeners&&this._listeners[R]&&this._listeners[R].length>0||this._oneTimeListeners&&this._oneTimeListeners[R]&&this._oneTimeListeners[R].length>0||this._eventedParent&&this._eventedParent.listens(R)}setEventedParent(R,J){return this._eventedParent=R,this._eventedParentData=J,this}}var te={$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(H,R){let J={};for(let ve in H)ve!=="ref"&&(J[ve]=H[ve]);return pe.forEach(ve=>{ve in R&&(J[ve]=R[ve])}),J}function Se(H,R){if(Array.isArray(H)){if(!Array.isArray(R)||H.length!==R.length)return!1;for(let J=0;J`:H.itemType.kind==="value"?"array":`array<${R}>`}return H.kind}let Ae=[rt,Je,St,kt,Bt,qr,Vt,Fe(Ar),kr,Ur,_t];function Le(H,R){if(R.kind==="error")return null;if(H.kind==="array"){if(R.kind==="array"&&(R.N===0&&R.itemType.kind==="value"||!Le(H.itemType,R.itemType))&&(typeof H.N!="number"||H.N===R.N))return null}else{if(H.kind===R.kind)return null;if(H.kind==="value"){for(let J of Ae)if(!Le(J,R))return null}}return`Expected ${Ye(H)} but found ${Ye(R)} instead.`}function We(H,R){return R.some(J=>J.kind===H.kind)}function Ke(H,R){return R.some(J=>J==="null"?H===null:J==="array"?Array.isArray(H):J==="object"?H&&!Array.isArray(H)&&typeof H=="object":J===typeof H)}function st(H,R){return H.kind==="array"&&R.kind==="array"?H.itemType.kind===R.itemType.kind&&typeof H.N=="number":H.kind===R.kind}let ot=.96422,Ut=.82521,Ct=4/29,Pt=6/29,jt=3*Pt*Pt,cr=Pt*Pt*Pt,or=Math.PI/180,nr=180/Math.PI;function Pr(H){return(H%=360)<0&&(H+=360),H}function _a([H,R,J,ve]){let Ee,Be,Ge=Ra((.2225045*(H=Fa(H))+.7168786*(R=Fa(R))+.0606169*(J=Fa(J)))/1);H===R&&R===J?Ee=Be=Ge:(Ee=Ra((.4360747*H+.3850649*R+.1430804*J)/ot),Be=Ra((.0139322*H+.0971045*R+.7141733*J)/Ut));let ct=116*Ge-16;return[ct<0?0:ct,500*(Ee-Ge),200*(Ge-Be),ve]}function Fa(H){return H<=.04045?H/12.92:Math.pow((H+.055)/1.055,2.4)}function Ra(H){return H>cr?Math.pow(H,1/3):H/jt+Ct}function qa([H,R,J,ve]){let Ee=(H+16)/116,Be=isNaN(R)?Ee:Ee+R/500,Ge=isNaN(J)?Ee:Ee-J/200;return Ee=1*Ca(Ee),Be=ot*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(H){return(H=H<=.00304?12.92*H:1.055*Math.pow(H,1/2.4)-.055)<0?0:H>1?1:H}function Ca(H){return H>Pt?H*H*H:jt*(H-Ct)}function hi(H){return parseInt(H.padEnd(2,H),16)/255}function wi(H,R){return Yt(R?H/100:H,0,1)}function Yt(H,R,J){return Math.min(Math.max(R,H),J)}function Rt(H){return!H.some(Number.isNaN)}let Zt={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(R,J,ve,Ee=1,Be=!0){this.r=R,this.g=J,this.b=ve,this.a=Ee,Be||(this.r*=Ee,this.g*=Ee,this.b*=Ee,Ee||this.overwriteGetter("rgb",[R,J,ve,Ee]))}static parse(R){if(R instanceof Jt)return R;if(typeof R!="string")return;let J=function(ve){if((ve=ve.toLowerCase().trim())==="transparent")return[0,0,0,0];let Ee=Zt[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,Nt,ar,Mr,zr,Wr,ia,fa,ja,Ka,Wi]=Ge,gi=[ar||" ",Wr||" ",ja].join("");if(gi===" "||gi===" /"||gi===",,"||gi===",,,"){let qi=[Nt,zr,fa].join(""),en=qi==="%%%"?100:qi===""?255:0;if(en){let jn=[Yt(+At/en,0,1),Yt(+Mr/en,0,1),Yt(+ia/en,0,1),Ka?wi(+Ka,Wi):1];if(Rt(jn))return jn}}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,Nt,ar,Mr,zr,Wr,ia]=Be,fa=[At||" ",ar||" ",zr].join("");if(fa===" "||fa===" /"||fa===",,"||fa===",,,"){let ja=[+ct,Yt(+Nt,0,100),Yt(+Mr,0,100),Wr?wi(+Wr,ia):1];if(Rt(ja))return function([Ka,Wi,gi,qi]){function en(jn){let Lo=(jn+Ka/30)%12,xs=Wi*Math.min(gi,1-gi);return gi-xs*Math.max(-1,Math.min(Lo-3,9-Lo,1))}return Ka=Pr(Ka),Wi/=100,gi/=100,[en(0),en(8),en(4),qi]}(ja)}}}(R);return J?new Jt(...J,!1):void 0}get rgb(){let{r:R,g:J,b:ve,a:Ee}=this,Be=Ee||1/0;return this.overwriteGetter("rgb",[R/Be,J/Be,ve/Be,Ee])}get hcl(){return this.overwriteGetter("hcl",function(R){let[J,ve,Ee,Be]=_a(R),Ge=Math.sqrt(ve*ve+Ee*Ee);return[Math.round(1e4*Ge)?Pr(Math.atan2(Ee,ve)*nr):NaN,Ge,J,Be]}(this.rgb))}get lab(){return this.overwriteGetter("lab",_a(this.rgb))}overwriteGetter(R,J){return Object.defineProperty(this,R,{value:J}),J}toString(){let[R,J,ve,Ee]=this.rgb;return`rgba(${[R,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(R,J,ve){this.sensitivity=R?J?"variant":"case":J?"accent":"base",this.locale=ve,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(R,J){return this.collator.compare(R,J)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class ta{constructor(R,J,ve,Ee,Be){this.text=R,this.image=J,this.scale=ve,this.fontStack=Ee,this.textColor=Be}}class ra{constructor(R){this.sections=R}static fromString(R){return new ra([new ta(R,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(R=>R.text.length!==0||R.image&&R.image.name.length!==0)}static factory(R){return R instanceof ra?R:ra.fromString(R)}toString(){return this.sections.length===0?"":this.sections.map(R=>R.text).join("")}}class ca{constructor(R){this.values=R.slice()}static parse(R){if(R instanceof ca)return R;if(typeof R=="number")return new ca([R,R,R,R]);if(Array.isArray(R)&&!(R.length<1||R.length>4)){for(let J of R)if(typeof J!="number")return;switch(R.length){case 1:R=[R[0],R[0],R[0],R[0]];break;case 2:R=[R[0],R[1],R[0],R[1]];break;case 3:R=[R[0],R[1],R[2],R[1]]}return new ca(R)}}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(R){this.values=R.slice()}static parse(R){if(R instanceof $a)return R;if(Array.isArray(R)&&!(R.length<1)&&R.length%2==0){for(let J=0;J=0&&H<=255&&typeof R=="number"&&R>=0&&R<=255&&typeof J=="number"&&J>=0&&J<=255?ve===void 0||typeof ve=="number"&&ve>=0&&ve<=1?null:`Invalid rgba value [${[H,R,J,ve].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof ve=="number"?[H,R,J,ve]:[H,R,J]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function pi(H){if(H===null||typeof H=="string"||typeof H=="boolean"||typeof H=="number"||H instanceof Jt||H instanceof Fr||H instanceof ra||H instanceof ca||H instanceof $a||H instanceof Za)return!0;if(Array.isArray(H)){for(let R of H)if(!pi(R))return!1;return!0}if(typeof H=="object"){for(let R in H)if(!pi(H[R]))return!1;return!0}return!1}function Ia(H){if(H===null)return rt;if(typeof H=="string")return St;if(typeof H=="boolean")return kt;if(typeof H=="number")return Je;if(H instanceof Jt)return Bt;if(H instanceof Fr)return vr;if(H instanceof ra)return qr;if(H instanceof ca)return kr;if(H instanceof $a)return _t;if(H instanceof Za)return Ur;if(Array.isArray(H)){let R=H.length,J;for(let ve of H){let Ee=Ia(ve);if(J){if(J===Ee)continue;J=Ar;break}J=Ee}return Fe(J||Ar,R)}return Vt}function rn(H){let R=typeof H;return H===null?"":R==="string"||R==="number"||R==="boolean"?String(H):H instanceof Jt||H instanceof ra||H instanceof ca||H instanceof $a||H instanceof Za?H.toString():JSON.stringify(H)}class tn{constructor(R,J){this.type=R,this.value=J}static parse(R,J){if(R.length!==2)return J.error(`'literal' expression requires exactly one argument, but found ${R.length-1} instead.`);if(!pi(R[1]))return J.error("invalid value");let ve=R[1],Ee=Ia(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 cn{constructor(R){this.name="ExpressionEvaluationError",this.message=R}toJSON(){return this.message}}let xt={string:St,number:Je,boolean:kt,object:Vt};class ut{constructor(R,J){this.type=R,this.args=J}static parse(R,J){if(R.length<2)return J.error("Expected at least one argument.");let ve,Ee=1,Be=R[0];if(Be==="array"){let ct,At;if(R.length>2){let Nt=R[1];if(typeof Nt!="string"||!(Nt in xt)||Nt==="object")return J.error('The item type argument of "array" must be one of string, number, boolean',1);ct=xt[Nt],Ee++}else ct=Ar;if(R.length>3){if(R[2]!==null&&(typeof R[2]!="number"||R[2]<0||R[2]!==Math.floor(R[2])))return J.error('The length argument to "array" must be a positive integer literal',2);At=R[2],Ee++}ve=Fe(ct,At)}else{if(!xt[Be])throw new Error(`Types doesn't contain name = ${Be}`);ve=xt[Be]}let Ge=[];for(;EeR.outputDefined())}}let Or={"to-boolean":kt,"to-color":Bt,"to-number":Je,"to-string":St};class Cr{constructor(R,J){this.type=R,this.args=J}static parse(R,J){if(R.length<2)return J.error("Expected at least one argument.");let ve=R[0];if(!Or[ve])throw new Error(`Can't parse ${ve} as it is not part of the known types`);if((ve==="to-boolean"||ve==="to-string")&&R.length!==2)return J.error("Expected one argument.");let Ee=Or[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 cn(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(R);let Ee=ca.parse(J);if(Ee)return Ee}throw new cn(`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(R);let Ee=$a.parse(J);if(Ee)return Ee}throw new cn(`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(R),J===null)return 0;let Ee=Number(J);if(!isNaN(Ee))return Ee}throw new cn(`Could not convert ${JSON.stringify(J)} to number.`)}case"formatted":return ra.fromString(rn(this.args[0].evaluate(R)));case"resolvedImage":return Za.fromString(rn(this.args[0].evaluate(R)));default:return rn(this.args[0].evaluate(R))}}eachChild(R){this.args.forEach(R)}outputDefined(){return this.args.every(R=>R.outputDefined())}}let wr=["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"?wr[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(R){let J=this._parseColorCache[R];return J||(J=this._parseColorCache[R]=Jt.parse(R)),J}}class Nr{constructor(R,J,ve=[],Ee,Be=new Ze,Ge=[]){this.registry=R,this.path=ve,this.key=ve.map(ct=>`[${ct}]`).join(""),this.scope=Be,this.errors=Ge,this.expectedType=Ee,this._isConstant=J}parse(R,J,ve,Ee,Be={}){return J?this.concat(J,ve,Ee)._parse(R,Be):this._parse(R,Be)}_parse(R,J){function ve(Ee,Be,Ge){return Ge==="assert"?new ut(Be,[Ee]):Ge==="coerce"?new Cr(Be,[Ee]):Ee}if(R!==null&&typeof R!="string"&&typeof R!="boolean"&&typeof R!="number"||(R=["literal",R]),Array.isArray(R)){if(R.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');let Ee=R[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(R,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(R===void 0?"'undefined' value invalid. Use null instead.":typeof R=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof R} instead.`)}concat(R,J,ve){let Ee=typeof R=="number"?this.path.concat(R):this.path,Be=ve?this.scope.concat(ve):this.scope;return new Nr(this.registry,this._isConstant,Ee,J||null,Be,this.errors)}error(R,...J){let ve=`${this.key}${J.map(Ee=>`[${Ee}]`).join("")}`;this.errors.push(new Ce(ve,R))}checkSubtype(R,J){let ve=Le(R,J);return ve&&this.error(ve),ve}}class Hr{constructor(R,J){this.type=J.type,this.bindings=[].concat(R),this.result=J}evaluate(R){return this.result.evaluate(R)}eachChild(R){for(let J of this.bindings)R(J[1]);R(this.result)}static parse(R,J){if(R.length<4)return J.error(`Expected at least 3 arguments, but found ${R.length-1} instead.`);let ve=[];for(let Be=1;Be=ve.length)throw new cn(`Array index out of bounds: ${J} > ${ve.length-1}.`);if(J!==Math.floor(J))throw new cn(`Array index must be an integer, but found ${J} instead.`);return ve[J]}eachChild(R){R(this.index),R(this.input)}outputDefined(){return!1}}class mr{constructor(R,J){this.type=kt,this.needle=R,this.haystack=J}static parse(R,J){if(R.length!==3)return J.error(`Expected 2 arguments, but found ${R.length-1} instead.`);let ve=J.parse(R[1],1,Ar),Ee=J.parse(R[2],2,Ar);return ve&&Ee?We(ve.type,[kt,St,Je,rt,Ar])?new mr(ve,Ee):J.error(`Expected first argument to be of type boolean, string, number or null, but found ${Ye(ve.type)} instead`):null}evaluate(R){let J=this.needle.evaluate(R),ve=this.haystack.evaluate(R);if(!ve)return!1;if(!Ke(J,["boolean","string","number","null"]))throw new cn(`Expected first argument to be of type boolean, string, number or null, but found ${Ye(Ia(J))} instead.`);if(!Ke(ve,["string","array"]))throw new cn(`Expected second argument to be of type array or string, but found ${Ye(Ia(ve))} instead.`);return ve.indexOf(J)>=0}eachChild(R){R(this.needle),R(this.haystack)}outputDefined(){return!0}}class Ir{constructor(R,J,ve){this.type=Je,this.needle=R,this.haystack=J,this.fromIndex=ve}static parse(R,J){if(R.length<=2||R.length>=5)return J.error(`Expected 3 or 4 arguments, but found ${R.length-1} instead.`);let ve=J.parse(R[1],1,Ar),Ee=J.parse(R[2],2,Ar);if(!ve||!Ee)return null;if(!We(ve.type,[kt,St,Je,rt,Ar]))return J.error(`Expected first argument to be of type boolean, string, number or null, but found ${Ye(ve.type)} instead`);if(R.length===4){let Be=J.parse(R[3],3,Je);return Be?new Ir(ve,Ee,Be):null}return new Ir(ve,Ee)}evaluate(R){let J=this.needle.evaluate(R),ve=this.haystack.evaluate(R);if(!Ke(J,["boolean","string","number","null"]))throw new cn(`Expected first argument to be of type boolean, string, number or null, but found ${Ye(Ia(J))} instead.`);let Ee;if(this.fromIndex&&(Ee=this.fromIndex.evaluate(R)),Ke(ve,["string"])){let Be=ve.indexOf(J,Ee);return Be===-1?-1:[...ve.slice(0,Be)].length}if(Ke(ve,["array"]))return ve.indexOf(J,Ee);throw new cn(`Expected second argument to be of type array or string, but found ${Ye(Ia(ve))} instead.`)}eachChild(R){R(this.needle),R(this.haystack),this.fromIndex&&R(this.fromIndex)}outputDefined(){return!1}}class va{constructor(R,J,ve,Ee,Be,Ge){this.inputType=R,this.type=J,this.input=ve,this.cases=Ee,this.outputs=Be,this.otherwise=Ge}static parse(R,J){if(R.length<5)return J.error(`Expected at least 4 arguments, but found only ${R.length-1}.`);if(R.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 Nt=2;NtNumber.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,Ia(ia)))return null}else ve=Ia(ia);if(Be[String(ia)]!==void 0)return zr.error("Branch labels must be unique.");Be[String(ia)]=Ge.length}let Wr=J.parse(Mr,Nt,Ee);if(!Wr)return null;Ee=Ee||Wr.type,Ge.push(Wr)}let ct=J.parse(R[1],1,Ar);if(!ct)return null;let At=J.parse(R[R.length-1],R.length-1,Ee);return At?ct.type.kind!=="value"&&J.concat(1).checkSubtype(ve,ct.type)?null:new va(ve,Ee,ct,Be,Ge,At):null}evaluate(R){let J=this.input.evaluate(R);return(Ia(J)===this.inputType&&this.outputs[this.cases[J]]||this.otherwise).evaluate(R)}eachChild(R){R(this.input),this.outputs.forEach(R),R(this.otherwise)}outputDefined(){return this.outputs.every(R=>R.outputDefined())&&this.otherwise.outputDefined()}}class Pa{constructor(R,J,ve){this.type=R,this.branches=J,this.otherwise=ve}static parse(R,J){if(R.length<4)return J.error(`Expected at least 3 arguments, but found only ${R.length-1}.`);if(R.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 ga{constructor(R,J,ve,Ee){this.type=R,this.input=J,this.beginIndex=ve,this.endIndex=Ee}static parse(R,J){if(R.length<=2||R.length>=5)return J.error(`Expected 3 or 4 arguments, but found ${R.length-1} instead.`);let ve=J.parse(R[1],1,Ar),Ee=J.parse(R[2],2,Je);if(!ve||!Ee)return null;if(!We(ve.type,[Fe(Ar),St,Ar]))return J.error(`Expected first argument to be of type array or string, but found ${Ye(ve.type)} instead`);if(R.length===4){let Be=J.parse(R[3],3,Je);return Be?new ga(ve.type,ve,Ee,Be):null}return new ga(ve.type,ve,Ee)}evaluate(R){let J=this.input.evaluate(R),ve=this.beginIndex.evaluate(R),Ee;if(this.endIndex&&(Ee=this.endIndex.evaluate(R)),Ke(J,["string"]))return[...J].slice(ve,Ee).join("");if(Ke(J,["array"]))return J.slice(ve,Ee);throw new cn(`Expected first argument to be of type array or string, but found ${Ye(Ia(J))} instead.`)}eachChild(R){R(this.input),R(this.beginIndex),this.endIndex&&R(this.endIndex)}outputDefined(){return!1}}function la(H,R){let J=H.length-1,ve,Ee,Be=0,Ge=J,ct=0;for(;Be<=Ge;)if(ct=Math.floor((Be+Ge)/2),ve=H[ct],Ee=H[ct+1],ve<=R){if(ct===J||RR))throw new cn("Input is not a number.");Ge=ct-1}return 0}class ba{constructor(R,J,ve){this.type=R,this.input=J,this.labels=[],this.outputs=[];for(let[Ee,Be]of ve)this.labels.push(Ee),this.outputs.push(Be)}static parse(R,J){if(R.length-1<4)return J.error(`Expected at least 4 arguments, but found only ${R.length-1}.`);if((R.length-1)%2!=0)return J.error("Expected an even number of arguments.");let ve=J.parse(R[1],1,Je);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.',Nt);let Mr=J.parse(At,ar,Be);if(!Mr)return null;Be=Be||Mr.type,Ee.push([ct,Mr])}return new ba(Be,ve,Ee)}evaluate(R){let J=this.labels,ve=this.outputs;if(J.length===1)return ve[0].evaluate(R);let Ee=this.input.evaluate(R);if(Ee<=J[0])return ve[0].evaluate(R);let Be=J.length;return Ee>=J[Be-1]?ve[Be-1].evaluate(R):ve[la(J,Ee)].evaluate(R)}eachChild(R){R(this.input);for(let J of this.outputs)R(J)}outputDefined(){return this.outputs.every(R=>R.outputDefined())}}function Ai(H){return H&&H.__esModule&&Object.prototype.hasOwnProperty.call(H,"default")?H.default:H}var ki=Ki;function Ki(H,R,J,ve){this.cx=3*H,this.bx=3*(J-H)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*R,this.by=3*(ve-R)-this.cy,this.ay=1-this.cy-this.by,this.p1x=H,this.p1y=R,this.p2x=J,this.p2y=ve}Ki.prototype={sampleCurveX:function(H){return((this.ax*H+this.bx)*H+this.cx)*H},sampleCurveY:function(H){return((this.ay*H+this.by)*H+this.cy)*H},sampleCurveDerivativeX:function(H){return(3*this.ax*H+2*this.bx)*H+this.cx},solveCurveX:function(H,R){if(R===void 0&&(R=1e-6),H<0)return 0;if(H>1)return 1;for(var J=H,ve=0;ve<8;ve++){var Ee=this.sampleCurveX(J)-H;if(Math.abs(Ee)Ee?Ge=J:ct=J,J=.5*(ct-Ge)+Ge;return J},solve:function(H,R){return this.sampleCurveY(this.solveCurveX(H,R))}};var Mn=Ai(ki);function wn(H,R,J){return H+J*(R-H)}function On(H,R,J){return H.map((ve,Ee)=>wn(ve,R[Ee],J))}let En={number:wn,color:function(H,R,J,ve="rgb"){switch(ve){case"rgb":{let[Ee,Be,Ge,ct]=On(H.rgb,R.rgb,J);return new Jt(Ee,Be,Ge,ct,!1)}case"hcl":{let[Ee,Be,Ge,ct]=H.hcl,[At,Nt,ar,Mr]=R.hcl,zr,Wr;if(isNaN(Ee)||isNaN(At))isNaN(Ee)?isNaN(At)?zr=NaN:(zr=At,Ge!==1&&Ge!==0||(Wr=Nt)):(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*or,qa([qi,Math.cos(Wi)*gi,Math.sin(Wi)*gi,en])}([zr,Wr??wn(Be,Nt,J),wn(Ge,ar,J),wn(ct,Mr,J)]);return new Jt(ia,fa,ja,Ka,!1)}case"lab":{let[Ee,Be,Ge,ct]=qa(On(H.lab,R.lab,J));return new Jt(Ee,Be,Ge,ct,!1)}}},array:On,padding:function(H,R,J){return new ca(On(H.values,R.values,J))},variableAnchorOffsetCollection:function(H,R,J){let ve=H.values,Ee=R.values;if(ve.length!==Ee.length)throw new cn(`Cannot interpolate values of different length. from: ${H.toString()}, to: ${R.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:Nt}}}if(R.length-1<4)return J.error(`Expected at least 4 arguments, but found only ${R.length-1}.`);if((R.length-1)%2!=0)return J.error("Expected an even number of arguments.");if(Be=J.parse(Be,2,Je),!Be)return null;let ct=[],At=null;ve==="interpolate-hcl"||ve==="interpolate-lab"?At=Bt:J.expectedType&&J.expectedType.kind!=="value"&&(At=J.expectedType);for(let Nt=0;Nt=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(Mr,Wr,At);if(!ia)return null;At=At||ia.type,ct.push([ar,ia])}return st(At,Je)||st(At,Bt)||st(At,kr)||st(At,_t)||st(At,Fe(Je))?new ao(At,ve,Ee,Be,ct):J.error(`Type ${Ye(At)} is not interpolatable.`)}evaluate(R){let J=this.labels,ve=this.outputs;if(J.length===1)return ve[0].evaluate(R);let Ee=this.input.evaluate(R);if(Ee<=J[0])return ve[0].evaluate(R);let Be=J.length;if(Ee>=J[Be-1])return ve[Be-1].evaluate(R);let Ge=la(J,Ee),ct=ao.interpolationFactor(this.interpolation,Ee,J[Ge],J[Ge+1]),At=ve[Ge].evaluate(R),Nt=ve[Ge+1].evaluate(R);switch(this.operator){case"interpolate":return En[this.type.kind](At,Nt,ct);case"interpolate-hcl":return En.color(At,Nt,ct,"hcl");case"interpolate-lab":return En.color(At,Nt,ct,"lab")}}eachChild(R){R(this.input);for(let J of this.outputs)R(J)}outputDefined(){return this.outputs.every(R=>R.outputDefined())}}function Co(H,R,J,ve){let Ee=ve-J,Be=H-J;return Ee===0?0:R===1?Be/Ee:(Math.pow(R,Be)-1)/(Math.pow(R,Ee)-1)}class bo{constructor(R,J){this.type=R,this.args=J}static parse(R,J){if(R.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 R.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 bo(Ge?Ar:ve,Be)}evaluate(R){let J,ve=null,Ee=0;for(let Be of this.args)if(Ee++,ve=Be.evaluate(R),ve&&ve instanceof Za&&!ve.available&&(J||(J=ve.name),ve=null,Ee===this.args.length&&(ve=J)),ve!==null)break;return ve}eachChild(R){this.args.forEach(R)}outputDefined(){return this.args.every(R=>R.outputDefined())}}function zs(H,R){return H==="=="||H==="!="?R.kind==="boolean"||R.kind==="string"||R.kind==="number"||R.kind==="null"||R.kind==="value":R.kind==="string"||R.kind==="number"||R.kind==="value"}function kn(H,R,J,ve){return ve.compare(R,J)===0}function wo(H,R,J){let ve=H!=="=="&&H!=="!=";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,Ar);if(!At)return null;if(!zs(ct,At.type))return Ge.concat(1).error(`"${ct}" comparisons are not supported for type '${Ye(At.type)}'.`);let Nt=Ge.parse(Be[2],2,Ar);if(!Nt)return null;if(!zs(ct,Nt.type))return Ge.concat(2).error(`"${ct}" comparisons are not supported for type '${Ye(Nt.type)}'.`);if(At.type.kind!==Nt.type.kind&&At.type.kind!=="value"&&Nt.type.kind!=="value")return Ge.error(`Cannot compare types '${Ye(At.type)}' and '${Ye(Nt.type)}'.`);ve&&(At.type.kind==="value"&&Nt.type.kind!=="value"?At=new ut(Nt.type,[At]):At.type.kind!=="value"&&Nt.type.kind==="value"&&(Nt=new ut(At.type,[Nt])));let ar=null;if(Be.length===4){if(At.type.kind!=="string"&&Nt.type.kind!=="string"&&At.type.kind!=="value"&&Nt.type.kind!=="value")return Ge.error("Cannot use collator to compare non-string types.");if(ar=Ge.parse(Be[3],3,vr),!ar)return null}return new t7(At,Nt,ar)}evaluate(Be){let Ge=this.lhs.evaluate(Be),ct=this.rhs.evaluate(Be);if(ve&&this.hasUntypedArgument){let At=Ia(Ge),Nt=Ia(ct);if(At.kind!==Nt.kind||At.kind!=="string"&&At.kind!=="number")throw new cn(`Expected arguments for "${H}" to be (string, string) or (number, number), but found (${At.kind}, ${Nt.kind}) instead.`)}if(this.collator&&!ve&&this.hasUntypedArgument){let At=Ia(Ge),Nt=Ia(ct);if(At.kind!=="string"||Nt.kind!=="string")return R(Be,Ge,ct)}return this.collator?J(Be,Ge,ct,this.collator.evaluate(Be)):R(Be,Ge,ct)}eachChild(Be){Be(this.lhs),Be(this.rhs),this.collator&&Be(this.collator)}outputDefined(){return!0}}}let Zn=wo("==",function(H,R,J){return R===J},kn),go=wo("!=",function(H,R,J){return R!==J},function(H,R,J,ve){return!kn(0,R,J,ve)}),os=wo("<",function(H,R,J){return R",function(H,R,J){return R>J},function(H,R,J,ve){return ve.compare(R,J)>0}),jo=wo("<=",function(H,R,J){return R<=J},function(H,R,J,ve){return ve.compare(R,J)<=0}),Yn=wo(">=",function(H,R,J){return R>=J},function(H,R,J,ve){return ve.compare(R,J)>=0});class Gn{constructor(R,J,ve){this.type=vr,this.locale=ve,this.caseSensitive=R,this.diacriticSensitive=J}static parse(R,J){if(R.length!==2)return J.error("Expected one argument.");let ve=R[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,St),!Ge)?null:new Gn(Ee,Be,Ge)}evaluate(R){return new Fr(this.caseSensitive.evaluate(R),this.diacriticSensitive.evaluate(R),this.locale?this.locale.evaluate(R):null)}eachChild(R){R(this.caseSensitive),R(this.diacriticSensitive),this.locale&&R(this.locale)}outputDefined(){return!1}}class Hn{constructor(R,J,ve,Ee,Be){this.type=St,this.number=R,this.locale=J,this.currency=ve,this.minFractionDigits=Ee,this.maxFractionDigits=Be}static parse(R,J){if(R.length!==3)return J.error("Expected two arguments.");let ve=J.parse(R[1],1,Je);if(!ve)return null;let Ee=R[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,St),!Be))return null;let Ge=null;if(Ee.currency&&(Ge=J.parse(Ee.currency,1,St),!Ge))return null;let ct=null;if(Ee["min-fraction-digits"]&&(ct=J.parse(Ee["min-fraction-digits"],1,Je),!ct))return null;let At=null;return Ee["max-fraction-digits"]&&(At=J.parse(Ee["max-fraction-digits"],1,Je),!At)?null:new Hn(ve,Be,Ge,ct,At)}evaluate(R){return new Intl.NumberFormat(this.locale?this.locale.evaluate(R):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(R):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(R):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(R):void 0}).format(this.number.evaluate(R))}eachChild(R){R(this.number),this.locale&&R(this.locale),this.currency&&R(this.currency),this.minFractionDigits&&R(this.minFractionDigits),this.maxFractionDigits&&R(this.maxFractionDigits)}outputDefined(){return!1}}class ss{constructor(R){this.type=qr,this.sections=R}static parse(R,J){if(R.length<2)return J.error("Expected at least one argument.");let ve=R[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<=R.length-1;++Ge){let ct=R[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,Je),!At))return null;let Nt=null;if(ct["text-font"]&&(Nt=J.parse(ct["text-font"],1,Fe(St)),!Nt))return null;let ar=null;if(ct["text-color"]&&(ar=J.parse(ct["text-color"],1,Bt),!ar))return null;let Mr=Ee[Ee.length-1];Mr.scale=At,Mr.font=Nt,Mr.textColor=ar}else{let At=J.parse(R[Ge],1,Ar);if(!At)return null;let Nt=At.type.kind;if(Nt!=="string"&&Nt!=="value"&&Nt!=="null"&&Nt!=="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 ss(Ee)}evaluate(R){return new ra(this.sections.map(J=>{let ve=J.content.evaluate(R);return Ia(ve)===Ur?new ta("",ve,null,null,null):new ta(rn(ve),null,J.scale?J.scale.evaluate(R):null,J.font?J.font.evaluate(R).join(","):null,J.textColor?J.textColor.evaluate(R):null)}))}eachChild(R){for(let J of this.sections)R(J.content),J.scale&&R(J.scale),J.font&&R(J.font),J.textColor&&R(J.textColor)}outputDefined(){return!1}}class _s{constructor(R){this.type=Ur,this.input=R}static parse(R,J){if(R.length!==2)return J.error("Expected two arguments.");let ve=J.parse(R[1],1,St);return ve?new _s(ve):J.error("No image name provided.")}evaluate(R){let J=this.input.evaluate(R),ve=Za.fromString(J);return ve&&R.availableImages&&(ve.available=R.availableImages.indexOf(J)>-1),ve}eachChild(R){R(this.input)}outputDefined(){return!1}}class ps{constructor(R){this.type=Je,this.input=R}static parse(R,J){if(R.length!==2)return J.error(`Expected 1 argument, but found ${R.length-1} instead.`);let ve=J.parse(R[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 ${Ye(ve.type)} instead.`):new ps(ve):null}evaluate(R){let J=this.input.evaluate(R);if(typeof J=="string")return[...J].length;if(Array.isArray(J))return J.length;throw new cn(`Expected value to be of type string or array, but found ${Ye(Ia(J))} instead.`)}eachChild(R){R(this.input)}outputDefined(){return!1}}let Ko=8192;function Gi(H,R){let J=(180+H[0])/360,ve=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+H[1]*Math.PI/360)))/360,Ee=Math.pow(2,R.z);return[Math.round(J*Ee*Ko),Math.round(ve*Ee*Ko)]}function Pn(H,R){let J=Math.pow(2,R.z);return[(Ee=(H[0]/Ko+R.x)/J,360*Ee-180),(ve=(H[1]/Ko+R.y)/J,360/Math.PI*Math.atan(Math.exp((180-360*ve)*Math.PI/180))-90)];var ve,Ee}function qs(H,R){H[0]=Math.min(H[0],R[0]),H[1]=Math.min(H[1],R[1]),H[2]=Math.max(H[2],R[0]),H[3]=Math.max(H[3],R[1])}function bs(H,R){return!(H[0]<=R[0]||H[2]>=R[2]||H[1]<=R[1]||H[3]>=R[3])}function lo(H,R,J){let ve=H[0]-R[0],Ee=H[1]-R[1],Be=H[0]-J[0],Ge=H[1]-J[1];return ve*Ge-Be*Ee==0&&ve*Be<=0&&Ee*Ge<=0}function Zo(H,R,J,ve){return(Ee=[ve[0]-J[0],ve[1]-J[1]])[0]*(Be=[R[0]-H[0],R[1]-H[1]])[1]-Ee[1]*Be[0]!=0&&!(!To(H,R,J,ve)||!To(J,ve,H,R));var Ee,Be}function ws(H,R,J){for(let ve of J)for(let Ee=0;Ee(Ee=H)[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(H,R){for(let J of R)if(Hs(H,J))return!0;return!1}function yn(H,R){for(let J of H)if(!Hs(J,R))return!1;for(let J=0;J0&&ct<0||Ge<0&&ct>0}function Ws(H,R,J){let ve=[];for(let Ee=0;EeJ[2]){let Ee=.5*ve,Be=H[0]-J[0]>Ee?-ve:J[0]-H[0]>Ee?ve:0;Be===0&&(Be=H[0]-J[2]>Ee?-ve:J[2]-H[0]>Ee?ve:0),H[0]+=Be}qs(R,H)}function Nl(H,R,J,ve){let Ee=Math.pow(2,ve.z)*Ko,Be=[ve.x*Ko,ve.y*Ko],Ge=[];for(let ct of H)for(let At of ct){let Nt=[At.x+Be[0],At.y+Be[1]];uo(Nt,R,J,Ee),Ge.push(Nt)}return Ge}function Ks(H,R,J,ve){let Ee=Math.pow(2,ve.z)*Ko,Be=[ve.x*Ko,ve.y*Ko],Ge=[];for(let At of H){let Nt=[];for(let ar of At){let Mr=[ar.x+Be[0],ar.y+Be[1]];qs(R,Mr),Nt.push(Mr)}Ge.push(Nt)}if(R[2]-R[0]<=Ee/2){(ct=R)[0]=ct[1]=1/0,ct[2]=ct[3]=-1/0;for(let At of Ge)for(let Nt of At)uo(Nt,R,J,Ee)}var ct;return Ge}class Ts{constructor(R,J){this.type=kt,this.geojson=R,this.geometries=J}static parse(R,J){if(R.length!==2)return J.error(`'within' expression requires exactly one argument, but found ${R.length-1} instead.`);if(pi(R[1])){let ve=R[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 Ts(ve,{type:"MultiPolygon",coordinates:Ee})}else if(ve.type==="Feature"){let Ee=ve.geometry.type;if(Ee==="Polygon"||Ee==="MultiPolygon")return new Ts(ve,ve.geometry)}else if(ve.type==="Polygon"||ve.type==="MultiPolygon")return new Ts(ve,ve)}return J.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(R){if(R.geometry()!=null&&R.canonicalID()!=null){if(R.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=Ws(ve.coordinates,Be,Ge),At=Nl(J.geometry(),Ee,Be,Ge);if(!bs(Ee,Be))return!1;for(let Nt of At)if(!Hs(Nt,ct))return!1}if(ve.type==="MultiPolygon"){let ct=Ll(ve.coordinates,Be,Ge),At=Nl(J.geometry(),Ee,Be,Ge);if(!bs(Ee,Be))return!1;for(let Nt of At)if(!il(Nt,ct))return!1}return!0}(R,this.geometries);if(R.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=Ws(ve.coordinates,Be,Ge),At=Ks(J.geometry(),Ee,Be,Ge);if(!bs(Ee,Be))return!1;for(let Nt of At)if(!yn(Nt,ct))return!1}if(ve.type==="MultiPolygon"){let ct=Ll(ve.coordinates,Be,Ge),At=Ks(J.geometry(),Ee,Be,Ge);if(!bs(Ee,Be))return!1;for(let Nt of At)if(!Po(Nt,ct))return!1}return!0}(R,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let Ls=class{constructor(H=[],R=(J,ve)=>Jve?1:0){if(this.data=H,this.length=this.data.length,this.compare=R,this.length>0)for(let J=(this.length>>1)-1;J>=0;J--)this._down(J)}push(H){this.data.push(H),this._up(this.length++)}pop(){if(this.length===0)return;let H=this.data[0],R=this.data.pop();return--this.length>0&&(this.data[0]=R,this._down(0)),H}peek(){return this.data[0]}_up(H){let{data:R,compare:J}=this,ve=R[H];for(;H>0;){let Ee=H-1>>1,Be=R[Ee];if(J(ve,Be)>=0)break;R[H]=Be,H=Ee}R[H]=ve}_down(H){let{data:R,compare:J}=this,ve=this.length>>1,Ee=R[H];for(;H=0)break;R[H]=R[Be],H=Be}R[H]=Ee}};function Jo(H,R,J,ve,Ee){Es(H,R,J,ve||H.length-1,Ee||lu)}function Es(H,R,J,ve,Ee){for(;ve>J;){if(ve-J>600){var Be=ve-J+1,Ge=R-J+1,ct=Math.log(Be),At=.5*Math.exp(2*ct/3),Nt=.5*Math.sqrt(ct*At*(Be-At)/Be)*(Ge-Be/2<0?-1:1);Es(H,R,Math.max(J,Math.floor(R-Ge*At/Be+Nt)),Math.min(ve,Math.floor(R+(Be-Ge)*At/Be+Nt)),Ee)}var ar=H[R],Mr=J,zr=ve;for(Ul(H,J,R),Ee(H[ve],ar)>0&&Ul(H,J,ve);Mr0;)zr--}Ee(H[J],ar)===0?Ul(H,J,zr):Ul(H,++zr,ve),zr<=R&&(J=zr+1),R<=zr&&(ve=zr-1)}}function Ul(H,R,J){var ve=H[R];H[R]=H[J],H[J]=ve}function lu(H,R){return HR?1:0}function Tc(H,R){if(H.length<=1)return[H];let J=[],ve,Ee;for(let Be of H){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),R>1)for(let Be=0;Be1?(Nt=R[At+1][0],ar=R[At+1][1]):Wr>0&&(Nt+=Mr/this.kx*Wr,ar+=zr/this.ky*Wr)),Mr=this.wrap(J[0]-Nt)*this.kx,zr=(J[1]-ar)*this.ky;let ia=Mr*Mr+zr*zr;ia180;)R-=360;return R}}function uu(H,R){return R[0]-H[0]}function Pl(H){return H[1]-H[0]+1}function ic(H,R){return H[1]>=H[0]&&H[1]H[1])return[null,null];let J=Pl(H);if(R){if(J===2)return[H,null];let Ee=Math.floor(J/2);return[[H[0],H[0]+Ee],[H[0]+Ee,H[1]]]}if(J===1)return[H,null];let ve=Math.floor(J/2)-1;return[[H[0],H[0]+ve],[H[0]+ve+1,H[1]]]}function nl(H,R){if(!ic(R,H.length))return[1/0,1/0,-1/0,-1/0];let J=[1/0,1/0,-1/0,-1/0];for(let ve=R[0];ve<=R[1];++ve)qs(J,H[ve]);return J}function vl(H){let R=[1/0,1/0,-1/0,-1/0];for(let J of H)for(let ve of J)qs(R,ve);return R}function As(H){return H[0]!==-1/0&&H[1]!==-1/0&&H[2]!==1/0&&H[3]!==1/0}function Xs(H,R,J){if(!As(H)||!As(R))return NaN;let ve=0,Ee=0;return H[2]R[2]&&(ve=H[0]-R[2]),H[1]>R[3]&&(Ee=H[1]-R[3]),H[3]=ve)return ve;if(bs(Ee,Be)){if(bh(H,R))return 0}else if(bh(R,H))return 0;let Ge=1/0;for(let ct of H)for(let At=0,Nt=ct.length,ar=Nt-1;At0;){let At=Ge.pop();if(At[0]>=Be)continue;let Nt=At[1],ar=R?50:100;if(Pl(Nt)<=ar){if(!ic(Nt,H.length))return NaN;if(R){let Mr=us(H,Nt,J,ve);if(isNaN(Mr)||Mr===0)return Mr;Be=Math.min(Be,Mr)}else for(let Mr=Nt[0];Mr<=Nt[1];++Mr){let zr=xh(H[Mr],J,ve);if(Be=Math.min(Be,zr),Be===0)return 0}}else{let Mr=Ou(Nt,R);to(Ge,Be,ve,H,ct,Mr[0]),to(Ge,Be,ve,H,ct,Mr[1])}}return Be}function ql(H,R,J,ve,Ee,Be=1/0){let Ge=Math.min(Be,Ee.distance(H[0],J[0]));if(Ge===0)return Ge;let ct=new Ls([[0,[0,H.length-1],[0,J.length-1]]],uu);for(;ct.length>0;){let At=ct.pop();if(At[0]>=Ge)continue;let Nt=At[1],ar=At[2],Mr=R?50:100,zr=ve?50:100;if(Pl(Nt)<=Mr&&Pl(ar)<=zr){if(!ic(Nt,H.length)&&ic(ar,J.length))return NaN;let Wr;if(R&&ve)Wr=qu(H,Nt,J,ar,Ee),Ge=Math.min(Ge,Wr);else if(R&&!ve){let ia=H.slice(Nt[0],Nt[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(!R&&ve){let ia=J.slice(ar[0],ar[1]+1);for(let fa=Nt[0];fa<=Nt[1];++fa)if(Wr=nc(H[fa],ia,Ee),Ge=Math.min(Ge,Wr),Ge===0)return Ge}else Wr=fl(H,Nt,J,ar,Ee),Ge=Math.min(Ge,Wr)}else{let Wr=Ou(Nt,R),ia=Ou(ar,ve);Xc(ct,Ge,Ee,H,J,Wr[0],ia[0]),Xc(ct,Ge,Ee,H,J,Wr[0],ia[1]),Xc(ct,Ge,Ee,H,J,Wr[1],ia[0]),Xc(ct,Ge,Ee,H,J,Wr[1],ia[1])}}return Ge}function Mf(H){return H.type==="MultiPolygon"?H.coordinates.map(R=>({type:"Polygon",coordinates:R})):H.type==="MultiLineString"?H.coordinates.map(R=>({type:"LineString",coordinates:R})):H.type==="MultiPoint"?H.coordinates.map(R=>({type:"Point",coordinates:R})):[H]}class Ac{constructor(R,J){this.type=Je,this.geojson=R,this.geometries=J}static parse(R,J){if(R.length!==2)return J.error(`'distance' expression requires exactly one argument, but found ${R.length-1} instead.`);if(pi(R[1])){let ve=R[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(R){if(R.geometry()!=null&&R.canonicalID()!=null){if(R.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 Wc(Be[0][1]),ct=1/0;for(let At of ve){switch(At.type){case"Point":ct=Math.min(ct,ql(Be,!1,[At.coordinates],!1,Ge,ct));break;case"LineString":ct=Math.min(ct,ql(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}(R,this.geometries);if(R.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 Wc(Be[0][1]),ct=1/0;for(let At of ve){switch(At.type){case"Point":ct=Math.min(ct,ql(Be,!0,[At.coordinates],!1,Ge,ct));break;case"LineString":ct=Math.min(ct,ql(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}(R,this.geometries);if(R.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(Nt=>Nt.map(ar=>Pn([ar.x,ar.y],J.canonical)))),Ge=new Wc(Be[0][0][0][1]),ct=1/0;for(let At of ve)for(let Nt of Be){switch(At.type){case"Point":ct=Math.min(ct,Vu([At.coordinates],!1,Nt,Ge,ct));break;case"LineString":ct=Math.min(ct,Vu(At.coordinates,!0,Nt,Ge,ct));break;case"Polygon":ct=Math.min(ct,Ps(Nt,At.coordinates,Ge,ct))}if(ct===0)return ct}return ct}(R,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}let nf={"==":Zn,"!=":go,">":ys,"<":os,">=":Yn,"<=":jo,array:ut,at:Kt,boolean:ut,case:Pa,coalesce:bo,collator:Gn,format:ss,image:_s,in:mr,"index-of":Ir,interpolate:ao,"interpolate-hcl":ao,"interpolate-lab":ao,length:ps,let:Hr,literal:tn,match:va,number:ut,"number-format":Hn,object:ut,slice:ga,step:ba,string:ut,"to-boolean":Cr,"to-color":Cr,"to-number":Cr,"to-string":Cr,var:gt,within:Ts,distance:Ac};class Ql{constructor(R,J,ve,Ee){this.name=R,this.type=J,this._evaluate=ve,this.args=Ee}evaluate(R){return this._evaluate(R,this.args)}eachChild(R){this.args.forEach(R)}outputDefined(){return!1}static parse(R,J){let ve=R[0],Ee=Ql.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(([Nt])=>!Array.isArray(Nt)||Nt.length===R.length-1),At=null;for(let[Nt,ar]of ct){At=new Nr(J.registry,Bf,J.path,null,J.scope);let Mr=[],zr=!1;for(let Wr=1;Wr{return zr=Mr,Array.isArray(zr)?`(${zr.map(Ye).join(", ")})`:`(${Ye(zr.type)}...)`;var zr}).join(" | "),ar=[];for(let Mr=1;Mr{J=R?J&&Bf(ve):J&&ve instanceof tn}),!!J&&Nf(H)&&Ef(H,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}function Nf(H){if(H instanceof Ql&&(H.name==="get"&&H.args.length===1||H.name==="feature-state"||H.name==="has"&&H.args.length===1||H.name==="properties"||H.name==="geometry-type"||H.name==="id"||/^filter-/.test(H.name))||H instanceof Ts||H instanceof Ac)return!1;let R=!0;return H.eachChild(J=>{R&&!Nf(J)&&(R=!1)}),R}function Gu(H){if(H instanceof Ql&&H.name==="feature-state")return!1;let R=!0;return H.eachChild(J=>{R&&!Gu(J)&&(R=!1)}),R}function Ef(H,R){if(H instanceof Ql&&R.indexOf(H.name)>=0)return!1;let J=!0;return H.eachChild(ve=>{J&&!Ef(ve,R)&&(J=!1)}),J}function oc(H){return{result:"success",value:H}}function Zc(H){return{result:"error",value:H}}function eu(H){return H["property-type"]==="data-driven"||H["property-type"]==="cross-faded-data-driven"}function qc(H){return!!H.expression&&H.expression.parameters.indexOf("zoom")>-1}function Sc(H){return!!H.expression&&H.expression.interpolated}function Zs(H){return H instanceof Number?"number":H instanceof String?"string":H instanceof Boolean?"boolean":Array.isArray(H)?"array":H===null?"null":typeof H}function kf(H){return typeof H=="object"&&H!==null&&!Array.isArray(H)}function fh(H){return H}function Uf(H,R){let J=R.type==="color",ve=H.stops&&typeof H.stops[0][0]=="object",Ee=ve||!(ve||H.property!==void 0),Be=H.type||(Sc(R)?"exponential":"interval");if(J||R.type==="padding"){let ar=J?Jt.parse:ca.parse;(H=ne({},H)).stops&&(H.stops=H.stops.map(Mr=>[Mr[0],ar(Mr[1])])),H.default=ar(H.default?H.default:R.default)}if(H.colorSpace&&(Ge=H.colorSpace)!=="rgb"&&Ge!=="hcl"&&Ge!=="lab")throw new Error(`Unknown color space: "${H.colorSpace}"`);var Ge;let ct,At,Nt;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 H.stops)At[ar[0]]=ar[1];Nt=typeof H.stops[0][0]}else{if(Be!=="identity")throw new Error(`Unknown function type "${Be}"`);ct=ml}if(ve){let ar={},Mr=[];for(let ia=0;iaia[0]),evaluate:({zoom:ia},fa)=>jf({stops:zr,base:H.base},R,ia).evaluate(ia,fa)}}if(Ee){let ar=Be==="exponential"?{name:"exponential",base:H.base!==void 0?H.base:1}:null;return{kind:"camera",interpolationType:ar,interpolationFactor:ao.interpolationFactor.bind(void 0,ar),zoomStops:H.stops.map(Mr=>Mr[0]),evaluate:({zoom:Mr})=>ct(H,R,Mr,At,Nt)}}return{kind:"source",evaluate(ar,Mr){let zr=Mr&&Mr.properties?Mr.properties[H.property]:void 0;return zr===void 0?Yc(H.default,R.default):ct(H,R,zr,At,Nt)}}}function Yc(H,R,J){return H!==void 0?H:R!==void 0?R:J!==void 0?J:void 0}function $f(H,R,J,ve,Ee){return Yc(typeof J===Ee?ve[J]:void 0,H.default,R.default)}function Cu(H,R,J){if(Zs(J)!=="number")return Yc(H.default,R.default);let ve=H.stops.length;if(ve===1||J<=H.stops[0][0])return H.stops[0][1];if(J>=H.stops[ve-1][0])return H.stops[ve-1][1];let Ee=la(H.stops.map(Be=>Be[0]),J);return H.stops[Ee][1]}function jf(H,R,J){let ve=H.base!==void 0?H.base:1;if(Zs(J)!=="number")return Yc(H.default,R.default);let Ee=H.stops.length;if(Ee===1||J<=H.stops[0][0])return H.stops[0][1];if(J>=H.stops[Ee-1][0])return H.stops[Ee-1][1];let Be=la(H.stops.map(ar=>ar[0]),J),Ge=function(ar,Mr,zr,Wr){let ia=Wr-zr,fa=ar-zr;return ia===0?0:Mr===1?fa/ia:(Math.pow(Mr,fa)-1)/(Math.pow(Mr,ia)-1)}(J,ve,H.stops[Be][0],H.stops[Be+1][0]),ct=H.stops[Be][1],At=H.stops[Be+1][1],Nt=En[R.type]||fh;return typeof ct.evaluate=="function"?{evaluate(...ar){let Mr=ct.evaluate.apply(void 0,ar),zr=At.evaluate.apply(void 0,ar);if(Mr!==void 0&&zr!==void 0)return Nt(Mr,zr,Ge,H.colorSpace)}}:Nt(ct,At,Ge,H.colorSpace)}function ml(H,R,J){switch(R.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:Zs(J)===R.type||R.type==="enum"&&R.values[J]||(J=void 0)}return Yc(J,H.default,R.default)}Ql.register(nf,{error:[{kind:"error"},[St],(H,[R])=>{throw new cn(R.evaluate(H))}],typeof:[St,[Ar],(H,[R])=>Ye(Ia(R.evaluate(H)))],"to-rgba":[Fe(Je,4),[Bt],(H,[R])=>{let[J,ve,Ee,Be]=R.evaluate(H).rgb;return[255*J,255*ve,255*Ee,Be]}],rgb:[Bt,[Je,Je,Je],Jf],rgba:[Bt,[Je,Je,Je,Je],Jf],has:{type:kt,overloads:[[[St],(H,[R])=>Of(R.evaluate(H),H.properties())],[[St,Vt],(H,[R,J])=>Of(R.evaluate(H),J.evaluate(H))]]},get:{type:Ar,overloads:[[[St],(H,[R])=>of(R.evaluate(H),H.properties())],[[St,Vt],(H,[R,J])=>of(R.evaluate(H),J.evaluate(H))]]},"feature-state":[Ar,[St],(H,[R])=>of(R.evaluate(H),H.featureState||{})],properties:[Vt,[],H=>H.properties()],"geometry-type":[St,[],H=>H.geometryType()],id:[Ar,[],H=>H.id()],zoom:[Je,[],H=>H.globals.zoom],"heatmap-density":[Je,[],H=>H.globals.heatmapDensity||0],"line-progress":[Je,[],H=>H.globals.lineProgress||0],accumulated:[Ar,[],H=>H.globals.accumulated===void 0?null:H.globals.accumulated],"+":[Je,jc(Je),(H,R)=>{let J=0;for(let ve of R)J+=ve.evaluate(H);return J}],"*":[Je,jc(Je),(H,R)=>{let J=1;for(let ve of R)J*=ve.evaluate(H);return J}],"-":{type:Je,overloads:[[[Je,Je],(H,[R,J])=>R.evaluate(H)-J.evaluate(H)],[[Je],(H,[R])=>-R.evaluate(H)]]},"/":[Je,[Je,Je],(H,[R,J])=>R.evaluate(H)/J.evaluate(H)],"%":[Je,[Je,Je],(H,[R,J])=>R.evaluate(H)%J.evaluate(H)],ln2:[Je,[],()=>Math.LN2],pi:[Je,[],()=>Math.PI],e:[Je,[],()=>Math.E],"^":[Je,[Je,Je],(H,[R,J])=>Math.pow(R.evaluate(H),J.evaluate(H))],sqrt:[Je,[Je],(H,[R])=>Math.sqrt(R.evaluate(H))],log10:[Je,[Je],(H,[R])=>Math.log(R.evaluate(H))/Math.LN10],ln:[Je,[Je],(H,[R])=>Math.log(R.evaluate(H))],log2:[Je,[Je],(H,[R])=>Math.log(R.evaluate(H))/Math.LN2],sin:[Je,[Je],(H,[R])=>Math.sin(R.evaluate(H))],cos:[Je,[Je],(H,[R])=>Math.cos(R.evaluate(H))],tan:[Je,[Je],(H,[R])=>Math.tan(R.evaluate(H))],asin:[Je,[Je],(H,[R])=>Math.asin(R.evaluate(H))],acos:[Je,[Je],(H,[R])=>Math.acos(R.evaluate(H))],atan:[Je,[Je],(H,[R])=>Math.atan(R.evaluate(H))],min:[Je,jc(Je),(H,R)=>Math.min(...R.map(J=>J.evaluate(H)))],max:[Je,jc(Je),(H,R)=>Math.max(...R.map(J=>J.evaluate(H)))],abs:[Je,[Je],(H,[R])=>Math.abs(R.evaluate(H))],round:[Je,[Je],(H,[R])=>{let J=R.evaluate(H);return J<0?-Math.round(-J):Math.round(J)}],floor:[Je,[Je],(H,[R])=>Math.floor(R.evaluate(H))],ceil:[Je,[Je],(H,[R])=>Math.ceil(R.evaluate(H))],"filter-==":[kt,[St,Ar],(H,[R,J])=>H.properties()[R.value]===J.value],"filter-id-==":[kt,[Ar],(H,[R])=>H.id()===R.value],"filter-type-==":[kt,[St],(H,[R])=>H.geometryType()===R.value],"filter-<":[kt,[St,Ar],(H,[R,J])=>{let ve=H.properties()[R.value],Ee=J.value;return typeof ve==typeof Ee&&ve{let J=H.id(),ve=R.value;return typeof J==typeof ve&&J":[kt,[St,Ar],(H,[R,J])=>{let ve=H.properties()[R.value],Ee=J.value;return typeof ve==typeof Ee&&ve>Ee}],"filter-id->":[kt,[Ar],(H,[R])=>{let J=H.id(),ve=R.value;return typeof J==typeof ve&&J>ve}],"filter-<=":[kt,[St,Ar],(H,[R,J])=>{let ve=H.properties()[R.value],Ee=J.value;return typeof ve==typeof Ee&&ve<=Ee}],"filter-id-<=":[kt,[Ar],(H,[R])=>{let J=H.id(),ve=R.value;return typeof J==typeof ve&&J<=ve}],"filter->=":[kt,[St,Ar],(H,[R,J])=>{let ve=H.properties()[R.value],Ee=J.value;return typeof ve==typeof Ee&&ve>=Ee}],"filter-id->=":[kt,[Ar],(H,[R])=>{let J=H.id(),ve=R.value;return typeof J==typeof ve&&J>=ve}],"filter-has":[kt,[Ar],(H,[R])=>R.value in H.properties()],"filter-has-id":[kt,[],H=>H.id()!==null&&H.id()!==void 0],"filter-type-in":[kt,[Fe(St)],(H,[R])=>R.value.indexOf(H.geometryType())>=0],"filter-id-in":[kt,[Fe(Ar)],(H,[R])=>R.value.indexOf(H.id())>=0],"filter-in-small":[kt,[St,Fe(Ar)],(H,[R,J])=>J.value.indexOf(H.properties()[R.value])>=0],"filter-in-large":[kt,[St,Fe(Ar)],(H,[R,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}(H.properties()[R.value],J.value,0,J.value.length-1)],all:{type:kt,overloads:[[[kt,kt],(H,[R,J])=>R.evaluate(H)&&J.evaluate(H)],[jc(kt),(H,R)=>{for(let J of R)if(!J.evaluate(H))return!1;return!0}]]},any:{type:kt,overloads:[[[kt,kt],(H,[R,J])=>R.evaluate(H)||J.evaluate(H)],[jc(kt),(H,R)=>{for(let J of R)if(J.evaluate(H))return!0;return!1}]]},"!":[kt,[kt],(H,[R])=>!R.evaluate(H)],"is-supported-script":[kt,[St],(H,[R])=>{let J=H.globals&&H.globals.isSupportedScript;return!J||J(R.evaluate(H))}],upcase:[St,[St],(H,[R])=>R.evaluate(H).toUpperCase()],downcase:[St,[St],(H,[R])=>R.evaluate(H).toLowerCase()],concat:[St,jc(Ar),(H,R)=>R.map(J=>rn(J.evaluate(H))).join("")],"resolved-locale":[St,[vr],(H,[R])=>R.evaluate(H).resolvedLocale()]});class Lu{constructor(R,J){var ve;this.expression=R,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(R,J,ve,Ee,Be,Ge){return this._evaluator.globals=R,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(R,J,ve,Ee,Be,Ge){this._evaluator.globals=R,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 cn(`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(H){return Array.isArray(H)&&H.length>0&&typeof H[0]=="string"&&H[0]in nf}function ol(H,R){let J=new Nr(nf,Bf,[],R?function(Ee){let Be={color:Bt,string:St,number:Je,enum:St,boolean:kt,formatted:qr,padding:kr,resolvedImage:Ur,variableAnchorOffsetCollection:_t};return Ee.type==="array"?Fe(Be[Ee.value]||Ar,Ee.length):Be[Ee.type]}(R):void 0),ve=J.parse(H,void 0,void 0,void 0,R&&R.type==="string"?{typeAnnotation:"coerce"}:void 0);return ve?oc(new Lu(ve,R)):Zc(J.errors)}class vc{constructor(R,J){this.kind=R,this._styleExpression=J,this.isStateDependent=R!=="constant"&&!Gu(J.expression)}evaluateWithoutErrorHandling(R,J,ve,Ee,Be,Ge){return this._styleExpression.evaluateWithoutErrorHandling(R,J,ve,Ee,Be,Ge)}evaluate(R,J,ve,Ee,Be,Ge){return this._styleExpression.evaluate(R,J,ve,Ee,Be,Ge)}}class yu{constructor(R,J,ve,Ee){this.kind=R,this.zoomStops=ve,this._styleExpression=J,this.isStateDependent=R!=="camera"&&!Gu(J.expression),this.interpolationType=Ee}evaluateWithoutErrorHandling(R,J,ve,Ee,Be,Ge){return this._styleExpression.evaluateWithoutErrorHandling(R,J,ve,Ee,Be,Ge)}evaluate(R,J,ve,Ee,Be,Ge){return this._styleExpression.evaluate(R,J,ve,Ee,Be,Ge)}interpolationFactor(R,J,ve){return this.interpolationType?ao.interpolationFactor(this.interpolationType,R,J,ve):0}}function Tu(H,R){let J=ol(H,R);if(J.result==="error")return J;let ve=J.value.expression,Ee=Nf(ve);if(!Ee&&!eu(R))return Zc([new Ce("","data expressions not supported")]);let Be=Ef(ve,["zoom"]);if(!Be&&!qc(R))return Zc([new Ce("","zoom expressions not supported")]);let Ge=qf(ve);return Ge||Be?Ge instanceof Ce?Zc([Ge]):Ge instanceof ao&&!Sc(R)?Zc([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)):Zc([new Ce("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class Ml{constructor(R,J){this._parameters=R,this._specification=J,ne(this,Uf(this._parameters,this._specification))}static deserialize(R){return new Ml(R._parameters,R._specification)}static serialize(R){return{_parameters:R._parameters,_specification:R._specification}}}function qf(H){let R=null;if(H instanceof Hr)R=qf(H.result);else if(H instanceof bo){for(let J of H.args)if(R=qf(J),R)break}else(H instanceof ba||H instanceof ao)&&H.input instanceof Ql&&H.input.name==="zoom"&&(R=H);return R instanceof Ce||H.eachChild(J=>{let ve=qf(J);ve instanceof Ce?R=ve:!R&&ve?R=new Ce("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):R&&ve&&R!==ve&&(R=new Ce("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),R}function Qf(H){if(H===!0||H===!1)return!0;if(!Array.isArray(H)||H.length===0)return!1;switch(H[0]){case"has":return H.length>=2&&H[1]!=="$id"&&H[1]!=="$type";case"in":return H.length>=3&&(typeof H[1]!="string"||Array.isArray(H[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return H.length!==3||Array.isArray(H[1])||Array.isArray(H[2]);case"any":case"all":for(let R of H.slice(1))if(!Qf(R)&&typeof R!="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(H){if(H==null)return{filter:()=>!0,needGeometry:!1};Qf(H)||(H=sf(H));let R=ol(H,Bu);if(R.result==="error")throw new Error(R.value.map(J=>`${J.key}: ${J.message}`).join(", "));return{filter:(J,ve,Ee)=>R.value.evaluate(J,ve,{},Ee),needGeometry:Lh(H)}}function mc(H,R){return HR?1:0}function Lh(H){if(!Array.isArray(H))return!1;if(H[0]==="within"||H[0]==="distance")return!0;for(let R=1;R"||R==="<="||R===">="?vf(H[1],H[2],R):R==="any"?(J=H.slice(1),["any"].concat(J.map(sf))):R==="all"?["all"].concat(H.slice(1).map(sf)):R==="none"?["all"].concat(H.slice(1).map(sf).map(iu)):R==="in"?Nu(H[1],H.slice(2)):R==="!in"?iu(Nu(H[1],H.slice(2))):R==="has"?lf(H[1]):R!=="!has"||iu(lf(H[1]));var J}function vf(H,R,J){switch(H){case"$type":return[`filter-type-${J}`,R];case"$id":return[`filter-id-${J}`,R];default:return[`filter-${J}`,H,R]}}function Nu(H,R){if(R.length===0)return!1;switch(H){case"$type":return["filter-type-in",["literal",R]];case"$id":return["filter-id-in",["literal",R]];default:return R.length>200&&!R.some(J=>typeof J!=typeof R[0])?["filter-in-large",H,["literal",R.sort(mc)]]:["filter-in-small",H,["literal",R]]}}function lf(H){switch(H){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",H]}}function iu(H){return["!",H]}function Kc(H){let R=typeof H;if(R==="number"||R==="boolean"||R==="string"||H==null)return JSON.stringify(H);if(Array.isArray(H)){let Ee="[";for(let Be of H)Ee+=`${Kc(Be)},`;return`${Ee}]`}let J=Object.keys(H).sort(),ve="{";for(let Ee=0;Eeve.maximum?[new se(R,J,`${J} is greater than the maximum value ${ve.maximum}`)]:[]}function uf(H){let R=H.valueSpec,J=sl(H.value.type),ve,Ee,Be,Ge={},ct=J!=="categorical"&&H.value.property===void 0,At=!ct,Nt=Zs(H.value.stops)==="array"&&Zs(H.value.stops[0])==="array"&&Zs(H.value.stops[0][0])==="object",ar=Pu({key:H.key,value:H.value,valueSpec:H.styleSpec.function,validateSpec:H.validateSpec,style:H.style,styleSpec:H.styleSpec,objectElementValidators:{stops:function(Wr){if(J==="identity")return[new se(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:Mr})),Zs(fa)==="array"&&fa.length===0&&ia.push(new se(Wr.key,fa,"array must have at least one stop")),ia},default:function(Wr){return Wr.validateSpec({key:Wr.key,value:Wr.value,valueSpec:R,validateSpec:Wr.validateSpec,style:Wr.style,styleSpec:Wr.styleSpec})}}});return J==="identity"&&ct&&ar.push(new se(H.key,H.value,'missing required property "property"')),J==="identity"||H.value.stops||ar.push(new se(H.key,H.value,'missing required property "stops"')),J==="exponential"&&H.valueSpec.expression&&!Sc(H.valueSpec)&&ar.push(new se(H.key,H.value,"exponential functions not supported")),H.styleSpec.$version>=8&&(At&&!eu(H.valueSpec)?ar.push(new se(H.key,H.value,"property functions not supported")):ct&&!qc(H.valueSpec)&&ar.push(new se(H.key,H.value,"zoom functions not supported"))),J!=="categorical"&&!Nt||H.value.property!==void 0||ar.push(new se(H.key,H.value,'"property" property is required')),ar;function Mr(Wr){let ia=[],fa=Wr.value,ja=Wr.key;if(Zs(fa)!=="array")return[new se(ja,fa,`array expected, ${Zs(fa)} found`)];if(fa.length!==2)return[new se(ja,fa,`array length 2 expected, length ${fa.length} found`)];if(Nt){if(Zs(fa[0])!=="object")return[new se(ja,fa,`object expected, ${Zs(fa[0])} found`)];if(fa[0].zoom===void 0)return[new se(ja,fa,"object stop key must have zoom")];if(fa[0].value===void 0)return[new se(ja,fa,"object stop key must have value")];if(Be&&Be>sl(fa[0].zoom))return[new se(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 se(`${ja}[1]`,fa[1],"expressions are not allowed in function stops.")]):ia.concat(Wr.validateSpec({key:`${ja}[1]`,value:fa[1],valueSpec:R,validateSpec:Wr.validateSpec,style:Wr.style,styleSpec:Wr.styleSpec}))}function zr(Wr,ia){let fa=Zs(Wr.value),ja=sl(Wr.value),Ka=Wr.value!==null?Wr.value:ia;if(ve){if(fa!==ve)return[new se(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 se(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 eu(R)&&J===void 0&&(Wi+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new se(Wr.key,Ka,Wi)]}return J!=="categorical"||fa!=="number"||isFinite(ja)&&Math.floor(ja)===ja?J!=="categorical"&&fa==="number"&&Ee!==void 0&&janew se(`${H.key}${ve.key}`,H.value,ve.message));let J=R.value.expression||R.value._styleExpression.expression;if(H.expressionContext==="property"&&H.propertyKey==="text-font"&&!J.outputDefined())return[new se(H.key,H.value,`Invalid data expression for "${H.propertyKey}". Output values must be contained as literals within the expression.`)];if(H.expressionContext==="property"&&H.propertyType==="layout"&&!Gu(J))return[new se(H.key,H.value,'"feature-state" data expressions are not supported with layout properties.')];if(H.expressionContext==="filter"&&!Gu(J))return[new se(H.key,H.value,'"feature-state" data expressions are not supported with filters.')];if(H.expressionContext&&H.expressionContext.indexOf("cluster")===0){if(!Ef(J,["zoom","feature-state"]))return[new se(H.key,H.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(H.expressionContext==="cluster-initial"&&!Nf(J))return[new se(H.key,H.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Hu(H){let R=H.key,J=H.value,ve=H.valueSpec,Ee=[];return Array.isArray(ve.values)?ve.values.indexOf(sl(J))===-1&&Ee.push(new se(R,J,`expected one of [${ve.values.join(", ")}], ${JSON.stringify(J)} found`)):Object.keys(ve.values).indexOf(sl(J))===-1&&Ee.push(new se(R,J,`expected one of [${Object.keys(ve.values).join(", ")}], ${JSON.stringify(J)} found`)),Ee}function gf(H){return Qf(_u(H.value))?kc(ne({},H,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Wu(H)}function Wu(H){let R=H.value,J=H.key;if(Zs(R)!=="array")return[new se(J,R,`array expected, ${Zs(R)} found`)];let ve=H.styleSpec,Ee,Be=[];if(R.length<1)return[new se(J,R,"filter array must have at least 1 element")];switch(Be=Be.concat(Hu({key:`${J}[0]`,value:R[0],valueSpec:ve.filter_operator,style:H.style,styleSpec:H.styleSpec})),sl(R[0])){case"<":case"<=":case">":case">=":R.length>=2&&sl(R[1])==="$type"&&Be.push(new se(J,R,`"$type" cannot be use with operator "${R[0]}"`));case"==":case"!=":R.length!==3&&Be.push(new se(J,R,`filter array for operator "${R[0]}" must have 3 elements`));case"in":case"!in":R.length>=2&&(Ee=Zs(R[1]),Ee!=="string"&&Be.push(new se(`${J}[1]`,R[1],`string expected, ${Ee} found`)));for(let Ge=2;Ge{Nt in J&&R.push(new se(ve,J[Nt],`"${Nt}" is prohibited for ref layers`))}),Ee.layers.forEach(Nt=>{sl(Nt.id)===ct&&(At=Nt)}),At?At.ref?R.push(new se(ve,J.ref,"ref cannot reference another ref layer")):Ge=sl(At.type):R.push(new se(ve,J.ref,`ref layer "${ct}" not found`))}else if(Ge!=="background")if(J.source){let At=Ee.sources&&Ee.sources[J.source],Nt=At&&sl(At.type);At?Nt==="vector"&&Ge==="raster"?R.push(new se(ve,J.source,`layer "${J.id}" requires a raster source`)):Nt!=="raster-dem"&&Ge==="hillshade"?R.push(new se(ve,J.source,`layer "${J.id}" requires a raster-dem source`)):Nt==="raster"&&Ge!=="raster"?R.push(new se(ve,J.source,`layer "${J.id}" requires a vector source`)):Nt!=="vector"||J["source-layer"]?Nt==="raster-dem"&&Ge!=="hillshade"?R.push(new se(ve,J.source,"raster-dem source can only be used with layer type 'hillshade'.")):Ge!=="line"||!J.paint||!J.paint["line-gradient"]||Nt==="geojson"&&At.lineMetrics||R.push(new se(ve,J,`layer "${J.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):R.push(new se(ve,J,`layer "${J.id}" must specify a "source-layer"`)):R.push(new se(ve,J.source,`source "${J.source}" not found`))}else R.push(new se(ve,J,'missing required property "source"'));return R=R.concat(Pu({key:ve,value:J,valueSpec:Be.layer,style:H.style,styleSpec:H.styleSpec,validateSpec:H.validateSpec,objectElementValidators:{"*":()=>[],type:()=>H.validateSpec({key:`${ve}.type`,value:J.type,valueSpec:Be.layer.type,style:H.style,styleSpec:H.styleSpec,validateSpec:H.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:{"*":Nt=>nu(ne({layerType:Ge},Nt))}}),paint:At=>Pu({layer:J,key:At.key,value:At.value,style:At.style,styleSpec:At.styleSpec,validateSpec:At.validateSpec,objectElementValidators:{"*":Nt=>Lf(ne({layerType:Ge},Nt))}})}})),R}function Xu(H){let R=H.value,J=H.key,ve=Zs(R);return ve!=="string"?[new se(J,R,`string expected, ${ve} found`)]:[]}let Cc={promoteId:function({key:H,value:R}){if(Zs(R)==="string")return Xu({key:H,value:R});{let J=[];for(let ve in R)J.push(...Xu({key:`${H}.${ve}`,value:R[ve]}));return J}}};function gc(H){let R=H.value,J=H.key,ve=H.styleSpec,Ee=H.style,Be=H.validateSpec;if(!R.type)return[new se(J,R,'"type" is required')];let Ge=sl(R.type),ct;switch(Ge){case"vector":case"raster":return ct=Pu({key:J,value:R,valueSpec:ve[`source_${Ge.replace("-","_")}`],style:H.style,styleSpec:ve,objectElementValidators:Cc,validateSpec:Be}),ct;case"raster-dem":return ct=function(At){var Nt;let ar=(Nt=At.sourceName)!==null&&Nt!==void 0?Nt:"",Mr=At.value,zr=At.styleSpec,Wr=zr.source_raster_dem,ia=At.style,fa=[],ja=Zs(Mr);if(Mr===void 0)return fa;if(ja!=="object")return fa.push(new se("source_raster_dem",Mr,`object expected, ${ja} found`)),fa;let Ka=sl(Mr.encoding)==="custom",Wi=["redFactor","greenFactor","blueFactor","baseShift"],gi=At.value.encoding?`"${At.value.encoding}"`:"Default";for(let qi in Mr)!Ka&&Wi.includes(qi)?fa.push(new se(qi,Mr[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:Mr[qi],valueSpec:Wr[qi],validateSpec:At.validateSpec,style:ia,styleSpec:zr})):fa.push(new se(qi,Mr[qi],`unknown property "${qi}"`));return fa}({sourceName:J,value:R,style:H.style,styleSpec:ve,validateSpec:Be}),ct;case"geojson":if(ct=Pu({key:J,value:R,valueSpec:ve.source_geojson,style:Ee,styleSpec:ve,validateSpec:Be,objectElementValidators:Cc}),R.cluster)for(let At in R.clusterProperties){let[Nt,ar]=R.clusterProperties[At],Mr=typeof Nt=="string"?[Nt,["accumulated"],["get",At]]:Nt;ct.push(...kc({key:`${J}.${At}.map`,value:ar,validateSpec:Be,expressionContext:"cluster-map"})),ct.push(...kc({key:`${J}.${At}.reduce`,value:Mr,validateSpec:Be,expressionContext:"cluster-reduce"}))}return ct;case"video":return Pu({key:J,value:R,valueSpec:ve.source_video,style:Ee,validateSpec:Be,styleSpec:ve});case"image":return Pu({key:J,value:R,valueSpec:ve.source_image,style:Ee,validateSpec:Be,styleSpec:ve});case"canvas":return[new se(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:R.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:Ee,validateSpec:Be,styleSpec:ve})}}function Vl(H){let R=H.value,J=H.styleSpec,ve=J.light,Ee=H.style,Be=[],Ge=Zs(R);if(R===void 0)return Be;if(Ge!=="object")return Be=Be.concat([new se("light",R,`object expected, ${Ge} found`)]),Be;for(let ct in R){let At=ct.match(/^(.*)-transition$/);Be=Be.concat(At&&ve[At[1]]&&ve[At[1]].transition?H.validateSpec({key:ct,value:R[ct],valueSpec:J.transition,validateSpec:H.validateSpec,style:Ee,styleSpec:J}):ve[ct]?H.validateSpec({key:ct,value:R[ct],valueSpec:ve[ct],validateSpec:H.validateSpec,style:Ee,styleSpec:J}):[new se(ct,R[ct],`unknown property "${ct}"`)])}return Be}function xu(H){let R=H.value,J=H.styleSpec,ve=J.sky,Ee=H.style,Be=Zs(R);if(R===void 0)return[];if(Be!=="object")return[new se("sky",R,`object expected, ${Be} found`)];let Ge=[];for(let ct in R)Ge=Ge.concat(ve[ct]?H.validateSpec({key:ct,value:R[ct],valueSpec:ve[ct],style:Ee,styleSpec:J}):[new se(ct,R[ct],`unknown property "${ct}"`)]);return Ge}function Lc(H){let R=H.value,J=H.styleSpec,ve=J.terrain,Ee=H.style,Be=[],Ge=Zs(R);if(R===void 0)return Be;if(Ge!=="object")return Be=Be.concat([new se("terrain",R,`object expected, ${Ge} found`)]),Be;for(let ct in R)Be=Be.concat(ve[ct]?H.validateSpec({key:ct,value:R[ct],valueSpec:ve[ct],validateSpec:H.validateSpec,style:Ee,styleSpec:J}):[new se(ct,R[ct],`unknown property "${ct}"`)]);return Be}function $c(H){let R=[],J=H.value,ve=H.key;if(Array.isArray(J)){let Ee=[],Be=[];for(let Ge in J)J[Ge].id&&Ee.includes(J[Ge].id)&&R.push(new se(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)&&R.push(new se(ve,J,`all the sprites' URLs must be unique, but ${J[Ge].url} is duplicated`)),Be.push(J[Ge].url),R=R.concat(Pu({key:`${ve}[${Ge}]`,value:J[Ge],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:H.validateSpec}));return R}return Xu({key:ve,value:J})}let sc={"*":()=>[],array:Cf,boolean:function(H){let R=H.value,J=H.key,ve=Zs(R);return ve!=="boolean"?[new se(J,R,`boolean expected, ${ve} found`)]:[]},number:hl,color:function(H){let R=H.key,J=H.value,ve=Zs(J);return ve!=="string"?[new se(R,J,`color expected, ${ve} found`)]:Jt.parse(String(J))?[]:[new se(R,J,`color expected, "${J}" found`)]},constants:mf,enum:Hu,filter:gf,function:uf,layer:Vf,object:Pu,source:gc,light:Vl,sky:xu,terrain:Lc,projection:function(H){let R=H.value,J=H.styleSpec,ve=J.projection,Ee=H.style,Be=Zs(R);if(R===void 0)return[];if(Be!=="object")return[new se("projection",R,`object expected, ${Be} found`)];let Ge=[];for(let ct in R)Ge=Ge.concat(ve[ct]?H.validateSpec({key:ct,value:R[ct],valueSpec:ve[ct],style:Ee,styleSpec:J}):[new se(ct,R[ct],`unknown property "${ct}"`)]);return Ge},string:Xu,formatted:function(H){return Xu(H).length===0?[]:kc(H)},resolvedImage:function(H){return Xu(H).length===0?[]:kc(H)},padding:function(H){let R=H.key,J=H.value;if(Zs(J)==="array"){if(J.length<1||J.length>4)return[new se(R,J,`padding requires 1 to 4 values; ${J.length} values found`)];let ve={type:"number"},Ee=[];for(let Be=0;Be[]}})),H.constants&&(J=J.concat(mf({key:"constants",value:H.constants,style:H,styleSpec:R,validateSpec:Pc}))),$r(J)}function aa(H){return function(R){return H(vs(So({},R),{validateSpec:Pc}))}}function $r(H){return[].concat(H).sort((R,J)=>R.line-J.line)}function ka(H){return function(...R){return $r(H.apply(this,R))}}xr.source=ka(aa(gc)),xr.sprite=ka(aa($c)),xr.glyphs=ka(aa(Qt)),xr.light=ka(aa(Vl)),xr.sky=ka(aa(xu)),xr.terrain=ka(aa(Lc)),xr.layer=ka(aa(Vf)),xr.filter=ka(aa(gf)),xr.paintProperty=ka(aa(Lf)),xr.layoutProperty=ka(aa(nu));let li=xr,Ci=li.light,Hi=li.sky,Qi=li.paintProperty,pn=li.layoutProperty;function Pi(H,R){let J=!1;if(R&&R.length)for(let ve of R)H.fire(new j(new Error(ve.message))),J=!0;return J}class Di{constructor(R,J,ve){let Ee=this.cells=[];if(R instanceof ArrayBuffer){this.arrayBuffer=R;let Ge=new Int32Array(this.arrayBuffer);R=Ge[0],this.d=(J=Ge[1])+2*(ve=Ge[2]);for(let At=0;At=Mr[ia+0]&&Ee>=Mr[ia+1])?(ct[Wr]=!0,Ge.push(ar[Wr])):ct[Wr]=!1}}}}_forEachCell(R,J,ve,Ee,Be,Ge,ct,At){let Nt=this._convertToCellCoord(R),ar=this._convertToCellCoord(J),Mr=this._convertToCellCoord(ve),zr=this._convertToCellCoord(Ee);for(let Wr=Nt;Wr<=Mr;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,R,J,ve,Ee,fa,Ge,ct,At))return}}_convertFromCellCoord(R){return(R-this.padding)/this.scale}_convertToCellCoord(R){return Math.max(0,Math.min(this.d-1,Math.floor(R*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;let R=this.cells,J=3+this.cells.length+1+1,ve=0;for(let Ge=0;Ge=0)continue;let Ge=H[Be];Ee[Be]=Ni[J].shallow.indexOf(Be)>=0?Ge:eo(Ge,R)}H instanceof Error&&(Ee.message=H.message)}if(Ee.$name)throw new Error("$name property is reserved for worker serialization logic.");return J!=="Object"&&(Ee.$name=J),Ee}function co(H){if(io(H))return H;if(Array.isArray(H))return H.map(co);if(typeof H!="object")throw new Error("can't deserialize object of type "+typeof H);let R=Qn(H)||"Object";if(!Ni[R])throw new Error(`can't deserialize unregistered class ${R}`);let{klass:J}=Ni[R];if(!J)throw new Error(`can't deserialize unregistered class ${R}`);if(J.deserialize)return J.deserialize(H);let ve=Object.create(J.prototype);for(let Ee of Object.keys(H)){if(Ee==="$name")continue;let Be=H[Ee];ve[Ee]=Ni[R].shallow.indexOf(Ee)>=0?Be:co(Be)}return ve}class Tn{constructor(){this.first=!0}update(R,J){let ve=Math.floor(R);return this.first?(this.first=!1,this.lastIntegerZoom=ve,this.lastIntegerZoomTime=0,this.lastZoom=R,this.lastFloorZoom=ve,!0):(this.lastFloorZoom>ve?(this.lastIntegerZoom=ve+1,this.lastIntegerZoomTime=J):this.lastFloorZoomH>=128&&H<=255,"Hangul Jamo":H=>H>=4352&&H<=4607,Khmer:H=>H>=6016&&H<=6143,"General Punctuation":H=>H>=8192&&H<=8303,"Letterlike Symbols":H=>H>=8448&&H<=8527,"Number Forms":H=>H>=8528&&H<=8591,"Miscellaneous Technical":H=>H>=8960&&H<=9215,"Control Pictures":H=>H>=9216&&H<=9279,"Optical Character Recognition":H=>H>=9280&&H<=9311,"Enclosed Alphanumerics":H=>H>=9312&&H<=9471,"Geometric Shapes":H=>H>=9632&&H<=9727,"Miscellaneous Symbols":H=>H>=9728&&H<=9983,"Miscellaneous Symbols and Arrows":H=>H>=11008&&H<=11263,"Ideographic Description Characters":H=>H>=12272&&H<=12287,"CJK Symbols and Punctuation":H=>H>=12288&&H<=12351,Katakana:H=>H>=12448&&H<=12543,Kanbun:H=>H>=12688&&H<=12703,"CJK Strokes":H=>H>=12736&&H<=12783,"Enclosed CJK Letters and Months":H=>H>=12800&&H<=13055,"CJK Compatibility":H=>H>=13056&&H<=13311,"Yijing Hexagram Symbols":H=>H>=19904&&H<=19967,"Private Use Area":H=>H>=57344&&H<=63743,"Vertical Forms":H=>H>=65040&&H<=65055,"CJK Compatibility Forms":H=>H>=65072&&H<=65103,"Small Form Variants":H=>H>=65104&&H<=65135,"Halfwidth and Fullwidth Forms":H=>H>=65280&&H<=65519};function yo(H){for(let R of H)if(Ss(R.charCodeAt(0)))return!0;return!1}function Qo(H){for(let R of H)if(!Ns(R.charCodeAt(0)))return!1;return!0}function ks(H){let R=H.map(J=>{try{return new RegExp(`\\p{sc=${J}}`,"u").source}catch{return null}}).filter(J=>J);return new RegExp(R.join("|"),"u")}let rl=ks(["Arab","Dupl","Mong","Ougr","Syrc"]);function Ns(H){return!rl.test(String.fromCodePoint(H))}let el=ks(["Bopo","Hani","Hira","Kana","Kits","Nshu","Tang","Yiii"]);function Ss(H){return!(H!==746&&H!==747&&(H<4352||!(un["CJK Compatibility Forms"](H)&&!(H>=65097&&H<=65103)||un["CJK Compatibility"](H)||un["CJK Strokes"](H)||!(!un["CJK Symbols and Punctuation"](H)||H>=12296&&H<=12305||H>=12308&&H<=12319||H===12336)||un["Enclosed CJK Letters and Months"](H)||un["Ideographic Description Characters"](H)||un.Kanbun(H)||un.Katakana(H)&&H!==12540||!(!un["Halfwidth and Fullwidth Forms"](H)||H===65288||H===65289||H===65293||H>=65306&&H<=65310||H===65339||H===65341||H===65343||H>=65371&&H<=65503||H===65507||H>=65512&&H<=65519)||!(!un["Small Form Variants"](H)||H>=65112&&H<=65118||H>=65123&&H<=65126)||un["Vertical Forms"](H)||un["Yijing Hexagram Symbols"](H)||new RegExp("\\p{sc=Cans}","u").test(String.fromCodePoint(H))||new RegExp("\\p{sc=Hang}","u").test(String.fromCodePoint(H))||el.test(String.fromCodePoint(H)))))}function Fl(H){return!(Ss(H)||function(R){return!!(un["Latin-1 Supplement"](R)&&(R===167||R===169||R===174||R===177||R===188||R===189||R===190||R===215||R===247)||un["General Punctuation"](R)&&(R===8214||R===8224||R===8225||R===8240||R===8241||R===8251||R===8252||R===8258||R===8263||R===8264||R===8265||R===8273)||un["Letterlike Symbols"](R)||un["Number Forms"](R)||un["Miscellaneous Technical"](R)&&(R>=8960&&R<=8967||R>=8972&&R<=8991||R>=8996&&R<=9e3||R===9003||R>=9085&&R<=9114||R>=9150&&R<=9165||R===9167||R>=9169&&R<=9179||R>=9186&&R<=9215)||un["Control Pictures"](R)&&R!==9251||un["Optical Character Recognition"](R)||un["Enclosed Alphanumerics"](R)||un["Geometric Shapes"](R)||un["Miscellaneous Symbols"](R)&&!(R>=9754&&R<=9759)||un["Miscellaneous Symbols and Arrows"](R)&&(R>=11026&&R<=11055||R>=11088&&R<=11097||R>=11192&&R<=11243)||un["CJK Symbols and Punctuation"](R)||un.Katakana(R)||un["Private Use Area"](R)||un["CJK Compatibility Forms"](R)||un["Small Form Variants"](R)||un["Halfwidth and Fullwidth Forms"](R)||R===8734||R===8756||R===8757||R>=9984&&R<=10087||R>=10102&&R<=10131||R===65532||R===65533)}(H))}let yl=ks(["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(H){return yl.test(String.fromCodePoint(H))}function Un(H,R){return!(!R&&ll(H)||H>=2304&&H<=3583||H>=3840&&H<=4255||un.Khmer(H))}function Ro(H){for(let R of H)if(ll(R.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(H){this.pluginStatus=H.pluginStatus,this.pluginURL=H.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(H){this.applyArabicShaping=H.applyArabicShaping,this.processBidirectionalText=H.processBidirectionalText,this.processStyledBidirectionalText=H.processStyledBidirectionalText}isParsed(){return this.applyArabicShaping!=null&&this.processBidirectionalText!=null&&this.processStyledBidirectionalText!=null}getPluginURL(){return this.pluginURL}getRTLTextPluginStatus(){return this.pluginStatus}};class Fs{constructor(R,J){this.zoom=R,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(R){return function(J,ve){for(let Ee of J)if(!Un(Ee.charCodeAt(0),ve))return!1;return!0}(R,Js.getRTLTextPluginStatus()==="loaded")}crossFadingFactor(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){let R=this.zoom,J=R-Math.floor(R),ve=this.crossFadingFactor();return R>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:J+(1-J)*ve}:{fromScale:.5,toScale:1,t:1-(1-ve)*J}}}class cu{constructor(R,J){this.property=R,this.value=J,this.expression=function(ve,Ee){if(kf(ve))return new Ml(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?R.specification.default:J,R.specification)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}possiblyEvaluate(R,J,ve){return this.property.possiblyEvaluate(this,R,J,ve)}}class Iu{constructor(R){this.property=R,this.value=new cu(R,void 0)}transitioned(R,J){return new Ic(this.property,this.value,J,E({},R.transition,this.transition),R.now)}untransitioned(){return new Ic(this.property,this.value,null,{},0)}}class Zu{constructor(R){this._properties=R,this._values=Object.create(R.defaultTransitionablePropertyValues)}getValue(R){return u(this._values[R].value.value)}setValue(R,J){Object.prototype.hasOwnProperty.call(this._values,R)||(this._values[R]=new Iu(this._values[R].property)),this._values[R].value=new cu(this._values[R].property,J===null?void 0:u(J))}getTransition(R){return u(this._values[R].transition)}setTransition(R,J){Object.prototype.hasOwnProperty.call(this._values,R)||(this._values[R]=new Iu(this._values[R].property)),this._values[R].transition=u(J)||void 0}serialize(){let R={};for(let J of Object.keys(this._values)){let ve=this.getValue(J);ve!==void 0&&(R[J]=ve);let Ee=this.getTransition(J);Ee!==void 0&&(R[`${J}-transition`]=Ee)}return R}transitioned(R,J){let ve=new bu(this._properties);for(let Ee of Object.keys(this._values))ve._values[Ee]=this._values[Ee].transitioned(R,J._values[Ee]);return ve}untransitioned(){let R=new bu(this._properties);for(let J of Object.keys(this._values))R._values[J]=this._values[J].untransitioned();return R}}class Ic{constructor(R,J,ve,Ee,Be){this.property=R,this.value=J,this.begin=Be+Ee.delay||0,this.end=this.begin+Ee.duration||0,R.specification.transition&&(Ee.delay||Ee.duration)&&(this.prior=ve)}possiblyEvaluate(R,J,ve){let Ee=R.now||0,Be=this.value.possiblyEvaluate(R,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 Nt=At*At,ar=Nt*At;return 4*(At<.5?ar:3*(At-Nt)+ar-.75)}(ct))}}return Be}}class bu{constructor(R){this._properties=R,this._values=Object.create(R.defaultTransitioningPropertyValues)}possiblyEvaluate(R,J,ve){let Ee=new yc(this._properties);for(let Be of Object.keys(this._values))Ee._values[Be]=this._values[Be].possiblyEvaluate(R,J,ve);return Ee}hasTransition(){for(let R of Object.keys(this._values))if(this._values[R].prior)return!0;return!1}}class Rc{constructor(R){this._properties=R,this._values=Object.create(R.defaultPropertyValues)}hasValue(R){return this._values[R].value!==void 0}getValue(R){return u(this._values[R].value)}setValue(R,J){this._values[R]=new cu(this._values[R].property,J===null?void 0:u(J))}serialize(){let R={};for(let J of Object.keys(this._values)){let ve=this.getValue(J);ve!==void 0&&(R[J]=ve)}return R}possiblyEvaluate(R,J,ve){let Ee=new yc(this._properties);for(let Be of Object.keys(this._values))Ee._values[Be]=this._values[Be].possiblyEvaluate(R,J,ve);return Ee}}class Au{constructor(R,J,ve){this.property=R,this.value=J,this.parameters=ve}isConstant(){return this.value.kind==="constant"}constantOr(R){return this.value.kind==="constant"?this.value.value:R}evaluate(R,J,ve,Ee){return this.property.evaluate(this.value,this.parameters,R,J,ve,Ee)}}class yc{constructor(R){this._properties=R,this._values=Object.create(R.defaultPossiblyEvaluatedValues)}get(R){return this._values[R]}}class fo{constructor(R){this.specification=R}possiblyEvaluate(R,J){if(R.isDataDriven())throw new Error("Value should not be data driven");return R.expression.evaluate(J)}interpolate(R,J,ve){let Ee=En[this.specification.type];return Ee?Ee(R,J,ve):R}}class Fo{constructor(R,J){this.specification=R,this.overrides=J}possiblyEvaluate(R,J,ve,Ee){return new Au(this,R.expression.kind==="constant"||R.expression.kind==="camera"?{kind:"constant",value:R.expression.evaluate(J,null,{},ve,Ee)}:R.expression,J)}interpolate(R,J,ve){if(R.value.kind!=="constant"||J.value.kind!=="constant")return R;if(R.value.value===void 0||J.value.value===void 0)return new Au(this,{kind:"constant",value:void 0},R.parameters);let Ee=En[this.specification.type];if(Ee){let Be=Ee(R.value.value,J.value.value,ve);return new Au(this,{kind:"constant",value:Be},R.parameters)}return R}evaluate(R,J,ve,Ee,Be,Ge){return R.kind==="constant"?R.value:R.evaluate(J,ve,Ee,Be,Ge)}}class Dc extends Fo{possiblyEvaluate(R,J,ve,Ee){if(R.value===void 0)return new Au(this,{kind:"constant",value:void 0},J);if(R.expression.kind==="constant"){let Be=R.expression.evaluate(J,null,{},ve,Ee),Ge=R.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(R.expression.kind==="camera"){let Be=this._calculate(R.expression.evaluate({zoom:J.zoom-1}),R.expression.evaluate({zoom:J.zoom}),R.expression.evaluate({zoom:J.zoom+1}),J);return new Au(this,{kind:"constant",value:Be},J)}return new Au(this,R.expression,J)}evaluate(R,J,ve,Ee,Be,Ge){if(R.kind==="source"){let ct=R.evaluate(J,ve,Ee,Be,Ge);return this._calculate(ct,ct,ct,J)}return R.kind==="composite"?this._calculate(R.evaluate({zoom:Math.floor(J.zoom)-1},ve,Ee),R.evaluate({zoom:Math.floor(J.zoom)},ve,Ee),R.evaluate({zoom:Math.floor(J.zoom)+1},ve,Ee),J):R.value}_calculate(R,J,ve,Ee){return Ee.zoom>Ee.zoomHistory.lastIntegerZoom?{from:R,to:J}:{from:ve,to:J}}interpolate(R){return R}}class lc{constructor(R){this.specification=R}possiblyEvaluate(R,J,ve,Ee){if(R.value!==void 0){if(R.expression.kind==="constant"){let Be=R.expression.evaluate(J,null,{},ve,Ee);return this._calculate(Be,Be,Be,J)}return this._calculate(R.expression.evaluate(new Fs(Math.floor(J.zoom-1),J)),R.expression.evaluate(new Fs(Math.floor(J.zoom),J)),R.expression.evaluate(new Fs(Math.floor(J.zoom+1),J)),J)}}_calculate(R,J,ve,Ee){return Ee.zoom>Ee.zoomHistory.lastIntegerZoom?{from:R,to:J}:{from:ve,to:J}}interpolate(R){return R}}class Yu{constructor(R){this.specification=R}possiblyEvaluate(R,J,ve,Ee){return!!R.expression.evaluate(J,null,{},ve,Ee)}interpolate(){return!1}}class Oe{constructor(R){this.properties=R,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(let J in R){let ve=R[J];ve.specification.overridable&&this.overridableProperties.push(J);let Ee=this.defaultPropertyValues[J]=new cu(ve,void 0),Be=this.defaultTransitionablePropertyValues[J]=new Iu(ve);this.defaultTransitioningPropertyValues[J]=Be.untransitioned(),this.defaultPossiblyEvaluatedValues[J]=Ee.possiblyEvaluate({})}}}mi("DataDrivenProperty",Fo),mi("DataConstantProperty",fo),mi("CrossFadedDataDrivenProperty",Dc),mi("CrossFadedProperty",lc),mi("ColorRampProperty",Yu);let I="-transition";class ie extends ee{constructor(R,J){if(super(),this.id=R.id,this.type=R.type,this._featureFilter={filter:()=>!0,needGeometry:!1},R.type!=="custom"&&(this.metadata=R.metadata,this.minzoom=R.minzoom,this.maxzoom=R.maxzoom,R.type!=="background"&&(this.source=R.source,this.sourceLayer=R["source-layer"],this.filter=R.filter),J.layout&&(this._unevaluatedLayout=new Rc(J.layout)),J.paint)){this._transitionablePaint=new Zu(J.paint);for(let ve in R.paint)this.setPaintProperty(ve,R.paint[ve],{validate:!1});for(let ve in R.layout)this.setLayoutProperty(ve,R.layout[ve],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new yc(J.paint)}}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(R){return R==="visibility"?this.visibility:this._unevaluatedLayout.getValue(R)}setLayoutProperty(R,J,ve={}){J!=null&&this._validate(pn,`layers.${this.id}.layout.${R}`,R,J,ve)||(R!=="visibility"?this._unevaluatedLayout.setValue(R,J):this.visibility=J)}getPaintProperty(R){return R.endsWith(I)?this._transitionablePaint.getTransition(R.slice(0,-11)):this._transitionablePaint.getValue(R)}setPaintProperty(R,J,ve={}){if(J!=null&&this._validate(Qi,`layers.${this.id}.paint.${R}`,R,J,ve))return!1;if(R.endsWith(I))return this._transitionablePaint.setTransition(R.slice(0,-11),J||void 0),!1;{let Ee=this._transitionablePaint._values[R],Be=Ee.property.specification["property-type"]==="cross-faded-data-driven",Ge=Ee.value.isDataDriven(),ct=Ee.value;this._transitionablePaint.setValue(R,J),this._handleSpecialPaintPropertyUpdate(R);let At=this._transitionablePaint._values[R].value;return At.isDataDriven()||Ge||Be||this._handleOverridablePaintPropertyUpdate(R,ct,At)}}_handleSpecialPaintPropertyUpdate(R){}_handleOverridablePaintPropertyUpdate(R,J,ve){return!1}isHidden(R){return!!(this.minzoom&&R=this.maxzoom)||this.visibility==="none"}updateTransitions(R){this._transitioningPaint=this._transitionablePaint.transitioned(R,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(R,J){R.getCrossfadeParameters&&(this._crossfadeParameters=R.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(R,void 0,J)),this.paint=this._transitioningPaint.possiblyEvaluate(R,void 0,J)}serialize(){let R={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&&(R.layout=R.layout||{},R.layout.visibility=this.visibility),d(R,(J,ve)=>!(J===void 0||ve==="layout"&&!Object.keys(J).length||ve==="paint"&&!Object.keys(J).length))}_validate(R,J,ve,Ee,Be={}){return(!Be||Be.validate!==!1)&&Pi(this,R.call(li,{key:J,layerType:this.type,objectKey:ve,value:Ee,styleSpec:te,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(let R in this.paint._values){let J=this.paint.get(R);if(J instanceof Au&&eu(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(R,J){this._structArray=R,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(R,J){return R._trim(),J&&(R.isTransferred=!0,J.push(R.arrayBuffer)),{length:R.length,arrayBuffer:R.arrayBuffer}}static deserialize(R){let J=Object.create(this.prototype);return J.arrayBuffer=R.arrayBuffer,J.length=R.length,J.capacity=R.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(R){this.reserve(R),this.length=R}reserve(R){if(R>this.capacity){this.capacity=Math.max(R,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(H,R=1){let J=0,ve=0;return{members:H.map(Ee=>{let Be=Te[Ee.type].BYTES_PER_ELEMENT,Ge=J=wt(J,Math.max(R,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,R)),alignment:R}}function wt(H,R){return Math.ceil(H/R)*R}class Ot extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(R,J){let ve=this.length;return this.resize(ve+1),this.emplace(ve,R,J)}emplace(R,J,ve){let Ee=2*R;return this.int16[Ee+0]=J,this.int16[Ee+1]=ve,R}}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(R,J,ve){let Ee=this.length;return this.resize(Ee+1),this.emplace(Ee,R,J,ve)}emplace(R,J,ve,Ee){let Be=3*R;return this.int16[Be+0]=J,this.int16[Be+1]=ve,this.int16[Be+2]=Ee,R}}$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(R,J,ve,Ee){let Be=this.length;return this.resize(Be+1),this.emplace(Be,R,J,ve,Ee)}emplace(R,J,ve,Ee,Be){let Ge=4*R;return this.int16[Ge+0]=J,this.int16[Ge+1]=ve,this.int16[Ge+2]=Ee,this.int16[Ge+3]=Be,R}}Tr.prototype.bytesPerElement=8,mi("StructArrayLayout4i8",Tr);class Sr extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(R,J,ve,Ee,Be,Ge){let ct=this.length;return this.resize(ct+1),this.emplace(ct,R,J,ve,Ee,Be,Ge)}emplace(R,J,ve,Ee,Be,Ge,ct){let At=6*R;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,R}}Sr.prototype.bytesPerElement=12,mi("StructArrayLayout2i4i12",Sr);class Kr extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(R,J,ve,Ee,Be,Ge){let ct=this.length;return this.resize(ct+1),this.emplace(ct,R,J,ve,Ee,Be,Ge)}emplace(R,J,ve,Ee,Be,Ge,ct){let At=4*R,Nt=8*R;return this.int16[At+0]=J,this.int16[At+1]=ve,this.uint8[Nt+4]=Ee,this.uint8[Nt+5]=Be,this.uint8[Nt+6]=Ge,this.uint8[Nt+7]=ct,R}}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(R,J){let ve=this.length;return this.resize(ve+1),this.emplace(ve,R,J)}emplace(R,J,ve){let Ee=2*R;return this.float32[Ee+0]=J,this.float32[Ee+1]=ve,R}}na.prototype.bytesPerElement=8,mi("StructArrayLayout2f8",na);class qe extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(R,J,ve,Ee,Be,Ge,ct,At,Nt,ar){let Mr=this.length;return this.resize(Mr+1),this.emplace(Mr,R,J,ve,Ee,Be,Ge,ct,At,Nt,ar)}emplace(R,J,ve,Ee,Be,Ge,ct,At,Nt,ar,Mr){let zr=10*R;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]=Nt,this.uint16[zr+8]=ar,this.uint16[zr+9]=Mr,R}}qe.prototype.bytesPerElement=20,mi("StructArrayLayout10ui20",qe);class $e extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(R,J,ve,Ee,Be,Ge,ct,At,Nt,ar,Mr,zr){let Wr=this.length;return this.resize(Wr+1),this.emplace(Wr,R,J,ve,Ee,Be,Ge,ct,At,Nt,ar,Mr,zr)}emplace(R,J,ve,Ee,Be,Ge,ct,At,Nt,ar,Mr,zr,Wr){let ia=12*R;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]=Nt,this.int16[ia+8]=ar,this.int16[ia+9]=Mr,this.int16[ia+10]=zr,this.int16[ia+11]=Wr,R}}$e.prototype.bytesPerElement=24,mi("StructArrayLayout4i4ui4i24",$e);class lt extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(R,J,ve){let Ee=this.length;return this.resize(Ee+1),this.emplace(Ee,R,J,ve)}emplace(R,J,ve,Ee){let Be=3*R;return this.float32[Be+0]=J,this.float32[Be+1]=ve,this.float32[Be+2]=Ee,R}}lt.prototype.bytesPerElement=12,mi("StructArrayLayout3f12",lt);class pt extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(R){let J=this.length;return this.resize(J+1),this.emplace(J,R)}emplace(R,J){return this.uint32[1*R+0]=J,R}}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(R,J,ve,Ee,Be,Ge,ct,At,Nt){let ar=this.length;return this.resize(ar+1),this.emplace(ar,R,J,ve,Ee,Be,Ge,ct,At,Nt)}emplace(R,J,ve,Ee,Be,Ge,ct,At,Nt,ar){let Mr=10*R,zr=5*R;return this.int16[Mr+0]=J,this.int16[Mr+1]=ve,this.int16[Mr+2]=Ee,this.int16[Mr+3]=Be,this.int16[Mr+4]=Ge,this.int16[Mr+5]=ct,this.uint32[zr+3]=At,this.uint16[Mr+8]=Nt,this.uint16[Mr+9]=ar,R}}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(R,J,ve,Ee,Be,Ge){let ct=this.length;return this.resize(ct+1),this.emplace(ct,R,J,ve,Ee,Be,Ge)}emplace(R,J,ve,Ee,Be,Ge,ct){let At=6*R;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,R}}bt.prototype.bytesPerElement=12,mi("StructArrayLayout2i2i2i12",bt);class Dt extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(R,J,ve,Ee,Be){let Ge=this.length;return this.resize(Ge+1),this.emplace(Ge,R,J,ve,Ee,Be)}emplace(R,J,ve,Ee,Be,Ge){let ct=4*R,At=8*R;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,R}}Dt.prototype.bytesPerElement=16,mi("StructArrayLayout2f1f2i16",Dt);class ur extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(R,J,ve,Ee,Be,Ge){let ct=this.length;return this.resize(ct+1),this.emplace(ct,R,J,ve,Ee,Be,Ge)}emplace(R,J,ve,Ee,Be,Ge,ct){let At=16*R,Nt=4*R,ar=8*R;return this.uint8[At+0]=J,this.uint8[At+1]=ve,this.float32[Nt+1]=Ee,this.float32[Nt+2]=Be,this.int16[ar+6]=Ge,this.int16[ar+7]=ct,R}}ur.prototype.bytesPerElement=16,mi("StructArrayLayout2ub2f2i16",ur);class yr extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(R,J,ve){let Ee=this.length;return this.resize(Ee+1),this.emplace(Ee,R,J,ve)}emplace(R,J,ve,Ee){let Be=3*R;return this.uint16[Be+0]=J,this.uint16[Be+1]=ve,this.uint16[Be+2]=Ee,R}}yr.prototype.bytesPerElement=6,mi("StructArrayLayout3ui6",yr);class Er 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(R,J,ve,Ee,Be,Ge,ct,At,Nt,ar,Mr,zr,Wr,ia,fa,ja,Ka){let Wi=this.length;return this.resize(Wi+1),this.emplace(Wi,R,J,ve,Ee,Be,Ge,ct,At,Nt,ar,Mr,zr,Wr,ia,fa,ja,Ka)}emplace(R,J,ve,Ee,Be,Ge,ct,At,Nt,ar,Mr,zr,Wr,ia,fa,ja,Ka,Wi){let gi=24*R,qi=12*R,en=48*R;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]=Nt,this.uint16[gi+11]=ar,this.uint16[gi+12]=Mr,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,R}}Er.prototype.bytesPerElement=48,mi("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",Er);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(R,J,ve,Ee,Be,Ge,ct,At,Nt,ar,Mr,zr,Wr,ia,fa,ja,Ka,Wi,gi,qi,en,jn,Lo,xs,vo,zn,is,qo){let Bo=this.length;return this.resize(Bo+1),this.emplace(Bo,R,J,ve,Ee,Be,Ge,ct,At,Nt,ar,Mr,zr,Wr,ia,fa,ja,Ka,Wi,gi,qi,en,jn,Lo,xs,vo,zn,is,qo)}emplace(R,J,ve,Ee,Be,Ge,ct,At,Nt,ar,Mr,zr,Wr,ia,fa,ja,Ka,Wi,gi,qi,en,jn,Lo,xs,vo,zn,is,qo,Bo){let xn=32*R,cs=16*R;return this.int16[xn+0]=J,this.int16[xn+1]=ve,this.int16[xn+2]=Ee,this.int16[xn+3]=Be,this.int16[xn+4]=Ge,this.int16[xn+5]=ct,this.int16[xn+6]=At,this.int16[xn+7]=Nt,this.uint16[xn+8]=ar,this.uint16[xn+9]=Mr,this.uint16[xn+10]=zr,this.uint16[xn+11]=Wr,this.uint16[xn+12]=ia,this.uint16[xn+13]=fa,this.uint16[xn+14]=ja,this.uint16[xn+15]=Ka,this.uint16[xn+16]=Wi,this.uint16[xn+17]=gi,this.uint16[xn+18]=qi,this.uint16[xn+19]=en,this.uint16[xn+20]=jn,this.uint16[xn+21]=Lo,this.uint16[xn+22]=xs,this.uint32[cs+12]=vo,this.float32[cs+13]=zn,this.float32[cs+14]=is,this.uint16[xn+30]=qo,this.uint16[xn+31]=Bo,R}}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(R){let J=this.length;return this.resize(J+1),this.emplace(J,R)}emplace(R,J){return this.float32[1*R+0]=J,R}}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(R,J,ve){let Ee=this.length;return this.resize(Ee+1),this.emplace(Ee,R,J,ve)}emplace(R,J,ve,Ee){let Be=3*R;return this.uint16[6*R+0]=J,this.float32[Be+1]=ve,this.float32[Be+2]=Ee,R}}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(R,J,ve){let Ee=this.length;return this.resize(Ee+1),this.emplace(Ee,R,J,ve)}emplace(R,J,ve,Ee){let Be=4*R;return this.uint32[2*R+0]=J,this.uint16[Be+2]=ve,this.uint16[Be+3]=Ee,R}}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(R,J){let ve=this.length;return this.resize(ve+1),this.emplace(ve,R,J)}emplace(R,J,ve){let Ee=2*R;return this.uint16[Ee+0]=J,this.uint16[Ee+1]=ve,R}}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(R){let J=this.length;return this.resize(J+1),this.emplace(J,R)}emplace(R,J){return this.uint16[1*R+0]=J,R}}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(R,J,ve,Ee){let Be=this.length;return this.resize(Be+1),this.emplace(Be,R,J,ve,Ee)}emplace(R,J,ve,Ee,Be){let Ge=4*R;return this.float32[Ge+0]=J,this.float32[Ge+1]=ve,this.float32[Ge+2]=Ee,this.float32[Ge+3]=Be,R}}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 i(this.anchorPointX,this.anchorPointY)}}ji.prototype.size=20;class on extends Et{get(R){return new ji(this,R)}}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(R){this._structArray.uint8[this._pos1+37]=R}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(R){this._structArray.uint8[this._pos1+38]=R}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(R){this._structArray.uint32[this._pos4+10]=R}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}An.prototype.size=48;class Kn extends Er{get(R){return new An(this,R)}}mi("PlacedSymbolArray",Kn);class Bn 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(R){this._structArray.uint32[this._pos4+12]=R}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]}}Bn.prototype.size=64;class Ao extends jr{get(R){return new Bn(this,R)}}mi("SymbolInstanceArray",Ao);class ls extends Qr{getoffsetX(R){return this.float32[1*R+0]}}mi("GlyphOffsetArray",ls);class Mo extends $t{getx(R){return this.int16[3*R+0]}gety(R){return this.int16[3*R+1]}gettileUnitDistanceFromAnchor(R){return this.int16[3*R+2]}}mi("SymbolLineVertexArray",Mo);class Yo 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]}}Yo.prototype.size=12;class ds extends ha{get(R){return new Yo(this,R)}}mi("TextAnchorOffsetArray",ds);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(R){return new ul(this,R)}}mi("FeatureIndexArray",tl);class es extends Ot{}class ts extends Ot{}class Il extends Ot{}class tu extends Sr{}class Ru extends Kr{}class vu extends na{}class wl extends qe{}class fu extends $e{}class uc extends lt{}class Gl extends pt{}class Hl extends bt{}class me extends ur{}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(R=[]){this.segments=R}prepareSegment(R,J,ve,Ee){let Be=this.segments[this.segments.length-1];return R>Tt.MAX_VERTEX_ARRAY_LENGTH&&y(`Max vertices per segment is ${Tt.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${R}`),(!Be||Be.vertexLength+R>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 R of this.segments)for(let J in R.vaos)R.vaos[J].destroy()}static simpleSegment(R,J,ve,Ee){return new Tt([{vertexOffset:R,primitiveOffset:J,vertexLength:ve,primitiveLength:Ee,vaos:{},sortKey:0}])}}function tr(H,R){return 256*(H=w(Math.floor(H),0,255))+w(Math.floor(R),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(H,R){var J,ve,Ee,Be,Ge,ct,At,Nt;for(ve=H.length-(J=3&H.length),Ee=R,Ge=3432918353,ct=461845907,Nt=0;Nt>>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&H.charCodeAt(Nt+2))<<16;case 2:At^=(255&H.charCodeAt(Nt+1))<<8;case 1:Ee^=At=(65535&(At=(At=(65535&(At^=255&H.charCodeAt(Nt)))*Ge+(((At>>>16)*Ge&65535)<<16)&4294967295)<<15|At>>>17))*ct+(((At>>>16)*ct&65535)<<16)&4294967295}return Ee^=H.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,wa={exports:{}};wa.exports=function(H,R){for(var J,ve=H.length,Ee=R^ve,Be=0;ve>=4;)J=1540483477*(65535&(J=255&H.charCodeAt(Be)|(255&H.charCodeAt(++Be))<<8|(255&H.charCodeAt(++Be))<<16|(255&H.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&H.charCodeAt(Be+2))<<16;case 2:Ee^=(255&H.charCodeAt(Be+1))<<8;case 1:Ee=1540483477*(65535&(Ee^=255&H.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=wa.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(R,J,ve,Ee){this.ids.push(za(R)),this.positions.push(J,ve,Ee)}getPositions(R){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");let J=za(R),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(R,J){let ve=new Float64Array(R.ids),Ee=new Uint32Array(R.positions);return Xa(ve,Ee,0,ve.length-1),J&&J.push(ve.buffer,Ee.buffer),{ids:ve,positions:Ee}}static deserialize(R){let J=new Sa;return J.ids=R.ids,J.positions=R.positions,J.indexed=!0,J}}function za(H){let R=+H;return!isNaN(R)&&R<=Number.MAX_SAFE_INTEGER?R:ti(String(H))}function Xa(H,R,J,ve){for(;J>1],Be=J-1,Ge=ve+1;for(;;){do Be++;while(H[Be]Ee);if(Be>=Ge)break;fi(H,Be,Ge),fi(R,3*Be,3*Ge),fi(R,3*Be+1,3*Ge+1),fi(R,3*Be+2,3*Ge+2)}Ge-J`u_${Ee}`),this.type=ve}setUniform(R,J,ve){R.set(ve.constantOr(this.value))}getBinding(R,J,ve){return this.type==="color"?new an(R,J):new La(R,J)}}class ro{constructor(R,J){this.uniformNames=J.map(ve=>`u_${ve}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(R,J){this.pixelRatioFrom=J.pixelRatio,this.pixelRatioTo=R.pixelRatio,this.patternFrom=J.tlbr,this.patternTo=R.tlbr}setUniform(R,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&&R.set(Be)}getBinding(R,J,ve){return ve.substr(0,9)==="u_pattern"?new sn(R,J):new La(R,J)}}class $o{constructor(R,J,ve,Ee){this.expression=R,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(R,J,ve,Ee,Be){let Ge=this.paintVertexArray.length,ct=this.expression.evaluate(new Fs(0),J,{},Ee,[],Be);this.paintVertexArray.resize(R),this._setPaintValue(Ge,R,ct)}updatePaintArray(R,J,ve,Ee){let Be=this.expression.evaluate({zoom:0},ve,Ee);this._setPaintValue(R,J,Be)}_setPaintValue(R,J,ve){if(this.type==="color"){let Ee=In(ve);for(let Be=R;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(R,J,ve,Ee,Be){let Ge=this.expression.evaluate(new Fs(this.zoom),J,{},Ee,[],Be),ct=this.expression.evaluate(new Fs(this.zoom+1),J,{},Ee,[],Be),At=this.paintVertexArray.length;this.paintVertexArray.resize(R),this._setPaintValue(At,R,Ge,ct)}updatePaintArray(R,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(R,J,Be,Ge)}_setPaintValue(R,J,ve,Ee){if(this.type==="color"){let Be=In(ve),Ge=In(Ee);for(let ct=R;ct`#define HAS_UNIFORM_${Ee}`))}return R}getBinderAttributes(){let R=[];for(let J in this.binders){let ve=this.binders[J];if(ve instanceof $o||ve instanceof no)for(let Ee=0;Ee!0){this.programConfigurations={};for(let Ee of R)this.programConfigurations[Ee.id]=new cl(Ee,J,ve);this.needsUpload=!1,this._featureMap=new Sa,this._bufferOffset=0}populatePaintArrays(R,J,ve,Ee,Be,Ge){for(let ct in this.programConfigurations)this.programConfigurations[ct].populatePaintArrays(R,J,Ee,Be,Ge);J.id!==void 0&&this._featureMap.add(J.id,ve,this._bufferOffset,R),this._bufferOffset=R,this.needsUpload=!0}updatePaintArrays(R,J,ve,Ee){for(let Be of ve)this.needsUpload=this.programConfigurations[Be.id].updatePaintArrays(R,this._featureMap,J,Be,Ee)||this.needsUpload}get(R){return this.programConfigurations[R]}upload(R){if(this.needsUpload){for(let J in this.programConfigurations)this.programConfigurations[J].upload(R);this.needsUpload=!1}}destroy(){for(let R in this.programConfigurations)this.programConfigurations[R].destroy()}}function _l(H,R){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"]}[H]||[H.replace(`${R}-`,"").replace(/-/g,"_")]}function mn(H,R,J){let ve={color:{source:na,composite:Vi},number:{source:Qr,composite:na}},Ee=function(Be){return{"line-pattern":{source:wl,composite:wl},"fill-pattern":{source:wl,composite:wl},"fill-extrusion-pattern":{source:wl,composite:wl}}[Be]}(H);return Ee&&Ee[J]||ve[R][J]}mi("ConstantBinder",Jn),mi("CrossFadedConstantBinder",ro),mi("SourceExpressionBinder",$o),mi("CrossFadedCompositeBinder",Xo),mi("CompositeExpressionBinder",no),mi("ProgramConfiguration",cl,{omit:["_buffers"]}),mi("ProgramConfigurationSet",al);let po=8192,fs=Math.pow(2,14)-1,ms=-fs-1;function Tl(H){let R=po/H.extent,J=H.loadGeometry();for(let ve=0;veGe.x+1||AtGe.y+1)&&y("Geometry exceeds allowed extent, reduce your vector tile buffer size")}}return J}function Wl(H,R){return{type:H.type,id:H.id,properties:H.properties,geometry:R?Tl(H):[]}}function Su(H,R,J,ve,Ee){H.emplaceBack(2*R+(ve+1)/2,2*J+(Ee+1)/2)}class Rl{constructor(R){this.zoom=R.zoom,this.overscaling=R.overscaling,this.layers=R.layers,this.layerIds=this.layers.map(J=>J.id),this.index=R.index,this.hasPattern=!1,this.layoutVertexArray=new ts,this.indexArray=new De,this.segments=new Tt,this.programConfigurations=new al(R.layers,R.zoom),this.stateDependentLayerIds=this.layers.filter(J=>J.isStateDependent()).map(J=>J.id)}populate(R,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:Nt,index:ar,sourceLayerIndex:Mr}of R){let zr=this.layers[0]._featureFilter.needGeometry,Wr=Wl(At,zr);if(!this.layers[0]._featureFilter.filter(new Fs(this.zoom),Wr,ve))continue;let ia=ct?Ge.evaluate(Wr,{},ve):void 0,fa={id:Nt,properties:At.properties,type:At.type,sourceLayerIndex:Mr,index:ar,geometry:zr?Wr.geometry:Tl(At),patterns:{},sortKey:ia};Be.push(fa)}ct&&Be.sort((At,Nt)=>At.sortKey-Nt.sortKey);for(let At of Be){let{geometry:Nt,index:ar,sourceLayerIndex:Mr}=At,zr=R[ar].feature;this.addFeature(At,Nt,ar,ve),J.featureIndex.insert(zr,Nt,ar,Mr,this.index)}}update(R,J,ve){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(R,J,this.stateDependentLayers,ve)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(R){this.uploaded||(this.layoutVertexBuffer=R.createVertexBuffer(this.layoutVertexArray,yt),this.indexBuffer=R.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(R),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(R,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 Nt=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,R.sortKey),ar=Nt.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),Nt.vertexLength+=4,Nt.primitiveLength+=2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,R,ve,{},Ee)}}function _c(H,R){for(let J=0;J1){if(oa(H,R))return!0;for(let ve=0;ve1?J:J.sub(R)._mult(Ee)._add(R))}function Ya(H,R){let J,ve,Ee,Be=!1;for(let Ge=0;GeR.y!=Ee.y>R.y&&R.x<(Ee.x-ve.x)*(R.y-ve.y)/(Ee.y-ve.y)+ve.x&&(Be=!Be)}return Be}function bi(H,R){let J=!1;for(let ve=0,Ee=H.length-1;veR.y!=Ge.y>R.y&&R.x<(Ge.x-Be.x)*(R.y-Be.y)/(Ge.y-Be.y)+Be.x&&(J=!J)}return J}function yi(H,R,J){let ve=J[0],Ee=J[2];if(H.xEe.x&&R.x>Ee.x||H.yEe.y&&R.y>Ee.y)return!1;let Be=D(H,R,J[0]);return Be!==D(H,R,J[1])||Be!==D(H,R,J[2])||Be!==D(H,R,J[3])}function si(H,R,J){let ve=R.paint.get(H).value;return ve.kind==="constant"?ve.value:J.programConfigurations.get(R.id).getMaxValue(H)}function gn(H){return Math.sqrt(H[0]*H[0]+H[1]*H[1])}function zi(H,R,J,ve,Ee){if(!R[0]&&!R[1])return H;let Be=i.convert(R)._mult(Ee);J==="viewport"&&Be._rotate(-ve);let Ge=[];for(let ct=0;ctUa(ja,fa))}(Nt,At),Wr=Mr?ar*ct:ar;for(let ia of Ee)for(let fa of ia){let ja=Mr?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(H,R){let J=hn([],[H.x,H.y,0,1],R);return new i(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 Oe({"heatmap-radius":new Fo(te.paint_heatmap["heatmap-radius"]),"heatmap-weight":new Fo(te.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new fo(te.paint_heatmap["heatmap-intensity"]),"heatmap-color":new Yu(te.paint_heatmap["heatmap-color"]),"heatmap-opacity":new fo(te.paint_heatmap["heatmap-opacity"])})}};function xi(H,{width:R,height:J},ve,Ee){if(Ee){if(Ee instanceof Uint8ClampedArray)Ee=new Uint8Array(Ee.buffer);else if(Ee.length!==R*J*ve)throw new RangeError(`mismatched image size. expected: ${Ee.length} but got: ${R*J*ve}`)}else Ee=new Uint8Array(R*J*ve);return H.width=R,H.height=J,H.data=Ee,H}function Xi(H,{width:R,height:J},ve){if(R===H.width&&J===H.height)return;let Ee=xi({},{width:R,height:J},ve);vn(H,Ee,{x:0,y:0},{x:0,y:0},{width:Math.min(H.width,R),height:Math.min(H.height,J)},ve),H.width=R,H.height=J,H.data=Ee.data}function vn(H,R,J,ve,Ee,Be){if(Ee.width===0||Ee.height===0)return R;if(Ee.width>H.width||Ee.height>H.height||J.x>H.width-Ee.width||J.y>H.height-Ee.height)throw new RangeError("out of range source coordinates for image copy");if(Ee.width>R.width||Ee.height>R.height||ve.x>R.width-Ee.width||ve.y>R.height-Ee.height)throw new RangeError("out of range destination coordinates for image copy");let Ge=H.data,ct=R.data;if(Ge===ct)throw new Error("srcData equals dstData, so image is already copied");for(let At=0;At{R[H.evaluationKey]=At;let Nt=H.expression.evaluate(R);Ee.data[Ge+ct+0]=Math.floor(255*Nt.r/Nt.a),Ee.data[Ge+ct+1]=Math.floor(255*Nt.g/Nt.a),Ee.data[Ge+ct+2]=Math.floor(255*Nt.b/Nt.a),Ee.data[Ge+ct+3]=Math.floor(255*Nt.a)};if(H.clips)for(let Ge=0,ct=0;Ge80*J){ct=1/0,At=1/0;let ar=-1/0,Mr=-1/0;for(let zr=J;zrar&&(ar=Wr),ia>Mr&&(Mr=ia)}Nt=Math.max(ar-ct,Mr-At),Nt=Nt!==0?32767/Nt:0}return ru(Be,Ge,J,ct,At,Nt,0),Ge}function Al(H,R,J,ve,Ee){let Be;if(Ee===function(Ge,ct,At,Nt){let ar=0;for(let Mr=ct,zr=At-Nt;Mr0)for(let Ge=R;Ge=R;Ge-=ve)Be=pr(Ge/ve|0,H[Ge],H[Ge+1],Be);return Be&&ke(Be,Be.next)&&(mt(Be),Be=Be.next),Be}function El(H,R){if(!H)return H;R||(R=H);let J,ve=H;do if(J=!1,ve.steiner||!ke(ve,ve.next)&&Ue(ve.prev,ve,ve.next)!==0)ve=ve.next;else{if(mt(ve),ve=R=ve.prev,ve===ve.next)break;J=!0}while(J||ve!==R);return R}function ru(H,R,J,ve,Ee,Be,Ge){if(!H)return;!Ge&&Be&&function(At,Nt,ar,Mr){let zr=At;do zr.z===0&&(zr.z=K(zr.x,zr.y,Nt,ar,Mr)),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 jn=0;jn0||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)}(H,ve,Ee,Be);let ct=H;for(;H.prev!==H.next;){let At=H.prev,Nt=H.next;if(Be?pl(H,ve,Ee,Be):js(H))R.push(At.i,H.i,Nt.i),mt(H),H=Nt.next,ct=Nt.next;else if((H=Nt)===ct){Ge?Ge===1?ru(H=bl(El(H),R),R,J,ve,Ee,Be,2):Ge===2&&Xn(H,R,J,ve,Ee,Be):ru(El(H),R,J,ve,Ee,Be,1);break}}}function js(H){let R=H.prev,J=H,ve=H.next;if(Ue(R,J,ve)>=0)return!1;let Ee=R.x,Be=J.x,Ge=ve.x,ct=R.y,At=J.y,Nt=ve.y,ar=EeBe?Ee>Ge?Ee:Ge:Be>Ge?Be:Ge,Wr=ct>At?ct>Nt?ct:Nt:At>Nt?At:Nt,ia=ve.next;for(;ia!==R;){if(ia.x>=ar&&ia.x<=zr&&ia.y>=Mr&&ia.y<=Wr&&re(Ee,ct,Be,At,Ge,Nt,ia.x,ia.y)&&Ue(ia.prev,ia,ia.next)>=0)return!1;ia=ia.next}return!0}function pl(H,R,J,ve){let Ee=H.prev,Be=H,Ge=H.next;if(Ue(Ee,Be,Ge)>=0)return!1;let ct=Ee.x,At=Be.x,Nt=Ge.x,ar=Ee.y,Mr=Be.y,zr=Ge.y,Wr=ctAt?ct>Nt?ct:Nt:At>Nt?At:Nt,ja=ar>Mr?ar>zr?ar:zr:Mr>zr?Mr:zr,Ka=K(Wr,ia,R,J,ve),Wi=K(fa,ja,R,J,ve),gi=H.prevZ,qi=H.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&&re(ct,ar,At,Mr,Nt,zr,gi.x,gi.y)&&Ue(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&&re(ct,ar,At,Mr,Nt,zr,qi.x,qi.y)&&Ue(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&&re(ct,ar,At,Mr,Nt,zr,gi.x,gi.y)&&Ue(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&&re(ct,ar,At,Mr,Nt,zr,qi.x,qi.y)&&Ue(qi.prev,qi,qi.next)>=0)return!1;qi=qi.nextZ}return!0}function bl(H,R){let J=H;do{let ve=J.prev,Ee=J.next.next;!ke(ve,Ee)&&Qe(ve,J,J.next,Ee)&&br(ve,Ee)&&br(Ee,ve)&&(R.push(ve.i,J.i,Ee.i),mt(J),mt(J.next),J=H=Ee),J=J.next}while(J!==H);return El(J)}function Xn(H,R,J,ve,Ee,Be){let Ge=H;do{let ct=Ge.next.next;for(;ct!==Ge.prev;){if(Ge.i!==ct.i&&ye(Ge,ct)){let At=Br(Ge,ct);return Ge=El(Ge,Ge.next),At=El(At,At.next),ru(Ge,R,J,ve,Ee,Be,0),void ru(At,R,J,ve,Ee,Be,0)}ct=ct.next}Ge=Ge.next}while(Ge!==H)}function kl(H,R){return H.x-R.x}function Io(H,R){let J=function(Ee,Be){let Ge=Be,ct=Ee.x,At=Ee.y,Nt,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,Nt=Ge.x=Ge.x&&Ge.x>=zr&&ct!==Ge.x&&re(AtNt.x||Ge.x===Nt.x&&ge(Nt,Ge)))&&(Nt=Ge,ia=fa)}Ge=Ge.next}while(Ge!==Mr);return Nt}(H,R);if(!J)return R;let ve=Br(J,H);return El(ve,ve.next),El(J,J.next)}function ge(H,R){return Ue(H.prev,H,R.prev)<0&&Ue(R.next,H,H.next)<0}function K(H,R,J,ve,Ee){return(H=1431655765&((H=858993459&((H=252645135&((H=16711935&((H=(H-J)*Ee|0)|H<<8))|H<<4))|H<<2))|H<<1))|(R=1431655765&((R=858993459&((R=252645135&((R=16711935&((R=(R-ve)*Ee|0)|R<<8))|R<<4))|R<<2))|R<<1))<<1}function xe(H){let R=H,J=H;do(R.x=(H-Ge)*(Be-ct)&&(H-Ge)*(ve-ct)>=(J-Ge)*(R-ct)&&(J-Ge)*(Be-ct)>=(Ee-Ge)*(ve-ct)}function ye(H,R){return H.next.i!==R.i&&H.prev.i!==R.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}(H,R)&&(br(H,R)&&br(R,H)&&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}(H,R)&&(Ue(H.prev,H,R.prev)||Ue(H,R.prev,R))||ke(H,R)&&Ue(H.prev,H,H.next)>0&&Ue(R.prev,R,R.next)>0)}function Ue(H,R,J){return(R.y-H.y)*(J.x-R.x)-(R.x-H.x)*(J.y-R.y)}function ke(H,R){return H.x===R.x&&H.y===R.y}function Qe(H,R,J,ve){let Ee=qt(Ue(H,R,J)),Be=qt(Ue(H,R,ve)),Ge=qt(Ue(J,ve,H)),ct=qt(Ue(J,ve,R));return Ee!==Be&&Ge!==ct||!(Ee!==0||!vt(H,J,R))||!(Be!==0||!vt(H,ve,R))||!(Ge!==0||!vt(J,H,ve))||!(ct!==0||!vt(J,R,ve))}function vt(H,R,J){return R.x<=Math.max(H.x,J.x)&&R.x>=Math.min(H.x,J.x)&&R.y<=Math.max(H.y,J.y)&&R.y>=Math.min(H.y,J.y)}function qt(H){return H>0?1:H<0?-1:0}function br(H,R){return Ue(H.prev,H,H.next)<0?Ue(H,R,H.next)>=0&&Ue(H,H.prev,R)>=0:Ue(H,R,H.prev)<0||Ue(H,H.next,R)<0}function Br(H,R){let J=Mt(H.i,H.x,H.y),ve=Mt(R.i,R.x,R.y),Ee=H.next,Be=R.prev;return H.next=R,R.prev=H,J.next=Ee,Ee.prev=J,ve.next=J,J.prev=ve,Be.next=ve,ve.prev=Be,ve}function pr(H,R,J,ve){let Ee=Mt(H,R,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(H){H.next.prev=H.prev,H.prev.next=H.next,H.prevZ&&(H.prevZ.nextZ=H.nextZ),H.nextZ&&(H.nextZ.prevZ=H.prevZ)}function Mt(H,R,J){return{i:H,x:R,y:J,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function Ft(H,R,J){let ve=J.patternDependencies,Ee=!1;for(let Be of R){let Ge=Be.paint.get(`${H}-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(H,R,J,ve,Ee){let Be=Ee.patternDependencies;for(let Ge of R){let ct=Ge.paint.get(`${H}-pattern`).value;if(ct.kind!=="constant"){let At=ct.evaluate({zoom:ve-1},J,{},Ee.availableImages),Nt=ct.evaluate({zoom:ve},J,{},Ee.availableImages),ar=ct.evaluate({zoom:ve+1},J,{},Ee.availableImages);At=At&&At.name?At.name:At,Nt=Nt&&Nt.name?Nt.name:Nt,ar=ar&&ar.name?ar.name:ar,Be[At]=!0,Be[Nt]=!0,Be[ar]=!0,J.patterns[Ge.id]={min:At,mid:Nt,max:ar}}}return J}class hr{constructor(R){this.zoom=R.zoom,this.overscaling=R.overscaling,this.layers=R.layers,this.layerIds=this.layers.map(J=>J.id),this.index=R.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new Il,this.indexArray=new De,this.indexArray2=new et,this.programConfigurations=new al(R.layers,R.zoom),this.segments=new Tt,this.segments2=new Tt,this.stateDependentLayerIds=this.layers.filter(J=>J.isStateDependent()).map(J=>J.id)}populate(R,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:Nt,sourceLayerIndex:ar}of R){let Mr=this.layers[0]._featureFilter.needGeometry,zr=Wl(ct,Mr);if(!this.layers[0]._featureFilter.filter(new Fs(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:Nt,geometry:Mr?zr.geometry:Tl(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:Nt,sourceLayerIndex:ar}=ct;if(this.hasPattern){let Mr=rr("fill",this.layers,ct,this.zoom,J);this.patternFeatures.push(Mr)}else this.addFeature(ct,At,Nt,ve,{});J.featureIndex.insert(R[Nt].feature,At,Nt,ar,this.index)}}update(R,J,ve){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(R,J,this.stateDependentLayers,ve)}addFeatures(R,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(R){this.uploaded||(this.layoutVertexBuffer=R.createVertexBuffer(this.layoutVertexArray,Xl),this.indexBuffer=R.createIndexBuffer(this.indexArray),this.indexBuffer2=R.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(R),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(R,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),Nt=At.vertexLength,ar=[],Mr=[];for(let Wr of Ge){if(Wr.length===0)continue;Wr!==Ge[0]&&Mr.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+=H.readSVarint(),Ge+=H.readSVarint(),ve===1&&(R&&ct.push(R),R=[]),R.push(new ya(Be,Ge));else{if(ve!==7)throw new Error("unknown command "+ve);R&&R.push(R[0].clone())}}return R&&ct.push(R),ct},Ga.prototype.bbox=function(){var H=this._pbf;H.pos=this._geometry;for(var R=H.readVarint()+H.pos,J=1,ve=0,Ee=0,Be=0,Ge=1/0,ct=-1/0,At=1/0,Nt=-1/0;H.pos>3}if(ve--,J===1||J===2)(Ee+=H.readSVarint())ct&&(ct=Ee),(Be+=H.readSVarint())Nt&&(Nt=Be);else if(J!==7)throw new Error("unknown command "+J)}return[Ge,At,ct,Nt]},Ga.prototype.toGeoJSON=function(H,R,J){var ve,Ee,Be=this.extent*Math.pow(2,J),Ge=this.extent*H,ct=this.extent*R,At=this.loadGeometry(),Nt=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(H){if(H<0||H>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[H];var R=this._pbf.readVarint()+this._pbf.pos;return new Fi(this._pbf,R,this.extent,this._keys,this._values)};var Ui=ui;function fn(H,R,J){if(H===3){var ve=new Ui(J,J.readVarint()+J.pos);ve.length&&(R[ve.name]=ve)}}Jr.VectorTile=function(H,R){this.layers=H.readFields(fn,{},R)},Jr.VectorTileFeature=vi,Jr.VectorTileLayer=ui;let _o=Jr.VectorTileFeature.types,Uo=Math.pow(2,13);function Ds(H,R,J,ve,Ee,Be,Ge,ct){H.emplaceBack(R,J,2*Math.floor(ve*Uo)+Ge,Ee*Uo*2,Be*Uo*2,Math.round(ct))}class Oo{constructor(R){this.zoom=R.zoom,this.overscaling=R.overscaling,this.layers=R.layers,this.layerIds=this.layers.map(J=>J.id),this.index=R.index,this.hasPattern=!1,this.layoutVertexArray=new tu,this.centroidVertexArray=new es,this.indexArray=new De,this.programConfigurations=new al(R.layers,R.zoom),this.segments=new Tt,this.stateDependentLayerIds=this.layers.filter(J=>J.isStateDependent()).map(J=>J.id)}populate(R,J,ve){this.features=[],this.hasPattern=Ft("fill-extrusion",this.layers,J);for(let{feature:Ee,id:Be,index:Ge,sourceLayerIndex:ct}of R){let At=this.layers[0]._featureFilter.needGeometry,Nt=Wl(Ee,At);if(!this.layers[0]._featureFilter.filter(new Fs(this.zoom),Nt,ve))continue;let ar={id:Be,sourceLayerIndex:ct,index:Ge,geometry:At?Nt.geometry:Tl(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(R,J,ve){for(let Ee of this.features){let{geometry:Be}=Ee;this.addFeature(Ee,Be,Ee.index,J,ve)}}update(R,J,ve){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(R,J,this.stateDependentLayers,ve)}isEmpty(){return this.layoutVertexArray.length===0&&this.centroidVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(R){this.uploaded||(this.layoutVertexBuffer=R.createVertexBuffer(this.layoutVertexArray,Dr),this.centroidVertexBuffer=R.createVertexBuffer(this.centroidVertexArray,Gt.members,!0),this.indexBuffer=R.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(R),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(R,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 Nt=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray);for(let ia of Ge){if(ia.length===0||Ys(ia))continue;let fa=0;for(let ja=0;ja=1){let Wi=ia[ja-1];if(!Cs(Ka,Wi)){Nt.vertexLength+4>Tt.MAX_VERTEX_ARRAY_LENGTH&&(Nt=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));let gi=Ka.sub(Wi)._perp()._unit(),qi=Wi.dist(Ka);fa+qi>32768&&(fa=0),Ds(this.layoutVertexArray,Ka.x,Ka.y,gi.x,gi.y,0,0,fa),Ds(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,Ds(this.layoutVertexArray,Wi.x,Wi.y,gi.x,gi.y,0,0,fa),Ds(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=Nt.vertexLength;this.indexArray.emplaceBack(en,en+2,en+1),this.indexArray.emplaceBack(en+1,en+2,en+3),Nt.vertexLength+=4,Nt.primitiveLength+=2}}}}if(Nt.vertexLength+At>Tt.MAX_VERTEX_ARRAY_LENGTH&&(Nt=this.segments.prepareSegment(At,this.layoutVertexArray,this.indexArray)),_o[R.type]!=="Polygon")continue;let ar=[],Mr=[],zr=Nt.vertexLength;for(let ia of Ge)if(ia.length!==0){ia!==Ge[0]&&Mr.push(ar.length/2);for(let fa=0;fapo)||H.y===R.y&&(H.y<0||H.y>po)}function Ys(H){return H.every(R=>R.x<0)||H.every(R=>R.x>po)||H.every(R=>R.y<0)||H.every(R=>R.y>po)}let mu;mi("FillExtrusionBucket",Oo,{omit:["layers","features"]});var Ep={get paint(){return mu=mu||new Oe({"fill-extrusion-opacity":new fo(te["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Fo(te["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new fo(te["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new fo(te["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new Dc(te["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Fo(te["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Fo(te["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new fo(te["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class kp extends ie{constructor(R){super(R,Ep)}createBucket(R){return new Oo(R)}queryRadius(){return gn(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature(R,J,ve,Ee,Be,Ge,ct,At){let Nt=zi(R,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),Mr=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 i(qi[0]/qi[3],qi[1]/qi[3]))}return Wi}(Nt,At),Wr=function(ia,fa,ja,Ka){let Wi=[],gi=[],qi=Ka[8]*fa,en=Ka[9]*fa,jn=Ka[10]*fa,Lo=Ka[11]*fa,xs=Ka[8]*ja,vo=Ka[9]*ja,zn=Ka[10]*ja,is=Ka[11]*ja;for(let qo of ia){let Bo=[],xn=[];for(let cs of qo){let No=cs.x,Rs=cs.y,Ku=Ka[0]*No+Ka[4]*Rs+Ka[12],Uu=Ka[1]*No+Ka[5]*Rs+Ka[13],th=Ka[2]*No+Ka[6]*Rs+Ka[14],Hp=Ka[3]*No+Ka[7]*Rs+Ka[15],Th=th+jn,rh=Hp+Lo,$h=Ku+xs,Qh=Uu+vo,ep=th+zn,ff=Hp+is,ah=new i((Ku+qi)/rh,(Uu+en)/rh);ah.z=Th/rh,Bo.push(ah);let Fh=new i($h/ff,Qh/ff);Fh.z=ep/ff,xn.push(Fh)}Wi.push(Bo),gi.push(xn)}return[Wi,gi]}(Ee,Mr,ar,At);return function(ia,fa,ja){let Ka=1/0;Xt(ja,fa)&&(Ka=qp(ja,fa[0]));for(let Wi=0;WiJ.id),this.index=R.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(R.layers,R.zoom),this.segments=new Tt,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(J=>J.isStateDependent()).map(J=>J.id)}populate(R,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:Nt,sourceLayerIndex:ar}of R){let Mr=this.layers[0]._featureFilter.needGeometry,zr=Wl(ct,Mr);if(!this.layers[0]._featureFilter.filter(new Fs(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:Nt,geometry:Mr?zr.geometry:Tl(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:Nt,sourceLayerIndex:ar}=ct;if(this.hasPattern){let Mr=rr("line",this.layers,ct,this.zoom,J);this.patternFeatures.push(Mr)}else this.addFeature(ct,At,Nt,ve,{});J.featureIndex.insert(R[Nt].feature,At,Nt,ar,this.index)}}update(R,J,ve){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(R,J,this.stateDependentLayers,ve)}addFeatures(R,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(R){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=R.createVertexBuffer(this.layoutVertexArray2,td)),this.layoutVertexBuffer=R.createVertexBuffer(this.layoutVertexArray,ed),this.indexBuffer=R.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(R),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(R){if(R.properties&&Object.prototype.hasOwnProperty.call(R.properties,"mapbox_clip_start")&&Object.prototype.hasOwnProperty.call(R.properties,"mapbox_clip_end"))return{start:+R.properties.mapbox_clip_start,end:+R.properties.mapbox_clip_end}}addFeature(R,J,ve,Ee,Be){let Ge=this.layers[0].layout,ct=Ge.get("line-join").evaluate(R,{}),At=Ge.get("line-cap"),Nt=Ge.get("line-miter-limit"),ar=Ge.get("line-round-limit");this.lineClips=this.lineFeatureClips(R);for(let Mr of J)this.addLine(Mr,R,ct,At,Nt,ar);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,R,ve,Be,Ee)}addLine(R,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&&R[At-1].equals(R[At-2]);)At--;let Nt=0;for(;Nt0;if(Lo&&Ka>Nt){let is=zr.dist(Wr);if(is>2*ar){let qo=zr.sub(zr.sub(Wr)._mult(ar/is)._round());this.updateDistance(Wr,qo),this.addCurrentVertex(qo,fa,0,0,Mr),Wr=qo}}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 is=en*fa.add(ja).mag()/fa.sub(ja).mag();Wi._perp()._mult(is*(xs?-1:1))}this.addCurrentVertex(zr,Wi,0,0,Mr),this.addCurrentVertex(zr,Wi.mult(-1),0,0,Mr)}else if(zn==="bevel"||zn==="fakeround"){let is=-Math.sqrt(en*en-1),qo=xs?is:0,Bo=xs?0:is;if(Wr&&this.addCurrentVertex(zr,fa,qo,Bo,Mr),zn==="fakeround"){let xn=Math.round(180*jn/Math.PI/20);for(let cs=1;cs2*ar){let qo=zr.add(ia.sub(zr)._mult(ar/is)._round());this.updateDistance(zr,qo),this.addCurrentVertex(qo,ja,0,0,Mr),zr=qo}}}}addCurrentVertex(R,J,ve,Ee,Be,Ge=!1){let ct=J.y*Ee-J.x,At=-J.y-J.x*Ee;this.addHalfVertex(R,J.x+J.y*ve,J.y-J.x*ve,Ge,!1,ve,Be),this.addHalfVertex(R,ct,At,Ge,!0,-Ee,Be),this.distance>Cp/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(R,J,ve,Ee,Be,Ge))}addHalfVertex({x:R,y:J},ve,Ee,Be,Ge,ct,At){let Nt=.5*(this.lineClips?this.scaledDistance*(Cp-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((R<<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&Nt)<<2,Nt>>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(R,J){this.distance+=R.dist(J),this.updateScaledDistance()}}let Lp,Lv;mi("LineBucket",Vp,{omit:["layers","patternFeatures"]});var Vd={get paint(){return Lv=Lv||new Oe({"line-opacity":new Fo(te.paint_line["line-opacity"]),"line-color":new Fo(te.paint_line["line-color"]),"line-translate":new fo(te.paint_line["line-translate"]),"line-translate-anchor":new fo(te.paint_line["line-translate-anchor"]),"line-width":new Fo(te.paint_line["line-width"]),"line-gap-width":new Fo(te.paint_line["line-gap-width"]),"line-offset":new Fo(te.paint_line["line-offset"]),"line-blur":new Fo(te.paint_line["line-blur"]),"line-dasharray":new lc(te.paint_line["line-dasharray"]),"line-pattern":new Dc(te.paint_line["line-pattern"]),"line-gradient":new Yu(te.paint_line["line-gradient"])})},get layout(){return Lp=Lp||new Oe({"line-cap":new fo(te.layout_line["line-cap"]),"line-join":new Fo(te.layout_line["line-join"]),"line-miter-limit":new fo(te.layout_line["line-miter-limit"]),"line-round-limit":new fo(te.layout_line["line-round-limit"]),"line-sort-key":new Fo(te.layout_line["line-sort-key"])})}};class Gf extends Fo{possiblyEvaluate(R,J){return J=new Fs(Math.floor(J.zoom),{now:J.now,fadeDuration:J.fadeDuration,zoomHistory:J.zoomHistory,transition:J.transition}),super.possiblyEvaluate(R,J)}evaluate(R,J,ve,Ee){return J=E({},J,{zoom:Math.floor(J.zoom)}),super.evaluate(R,J,ve,Ee)}}let Gd;class Pv extends ie{constructor(R){super(R,Vd),this.gradientVersion=0,Gd||(Gd=new Gf(Vd.paint.properties["line-width"].specification),Gd.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(R){if(R==="line-gradient"){let J=this.gradientExpression();this.stepInterpolant=!!function(ve){return ve._styleExpression!==void 0}(J)&&J._styleExpression.expression instanceof ba,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(R,J){super.recalculate(R,J),this.paint._values["line-floorwidth"]=Gd.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,R)}createBucket(R){return new Vp(R)}queryRadius(R){let J=R,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(R,J,ve,Ee,Be,Ge,ct){let At=zi(R,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),Ge.angle,ct),Nt=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(Mr,zr){let Wr=[];for(let ia=0;ia=3){for(let ja=0;ja0?R+2*H:H}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),om=ht([{name:"a_projected_pos",components:3,type:"Float32"}],4);ht([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);let sm=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 Iv=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(H,R,J){return H.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,R,J)}),H}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 hu=24,Dh=Mu,Rv=function(H,R,J,ve,Ee){var Be,Ge,ct=8*Ee-ve-1,At=(1<>1,ar=-7,Mr=J?Ee-1:0,zr=J?-1:1,Wr=H[R+Mr];for(Mr+=zr,Be=Wr&(1<<-ar)-1,Wr>>=-ar,ar+=ct;ar>0;Be=256*Be+H[R+Mr],Mr+=zr,ar-=8);for(Ge=Be&(1<<-ar)-1,Be>>=-ar,ar+=ve;ar>0;Ge=256*Ge+H[R+Mr],Mr+=zr,ar-=8);if(Be===0)Be=1-Nt;else{if(Be===At)return Ge?NaN:1/0*(Wr?-1:1);Ge+=Math.pow(2,ve),Be-=Nt}return(Wr?-1:1)*Ge*Math.pow(2,Be-ve)},lm=function(H,R,J,ve,Ee,Be){var Ge,ct,At,Nt=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=R<0||R===0&&1/R<0?1:0;for(R=Math.abs(R),isNaN(R)||R===1/0?(ct=isNaN(R)?1:0,Ge=ar):(Ge=Math.floor(Math.log(R)/Math.LN2),R*(At=Math.pow(2,-Ge))<1&&(Ge--,At*=2),(R+=Ge+Mr>=1?zr/At:zr*Math.pow(2,1-Mr))*At>=2&&(Ge++,At/=2),Ge+Mr>=ar?(ct=0,Ge=ar):Ge+Mr>=1?(ct=(R*At-1)*Math.pow(2,Ee),Ge+=Mr):(ct=R*Math.pow(2,Mr-1)*Math.pow(2,Ee),Ge=0));Ee>=8;H[J+Wr]=255&ct,Wr+=ia,ct/=256,Ee-=8);for(Ge=Ge<0;H[J+Wr]=255&Ge,Wr+=ia,Ge/=256,Nt-=8);H[J+Wr-ia]|=128*fa};function Mu(H){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(H)?H:new Uint8Array(H||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(H){return H.type===Mu.Bytes?H.readVarint()+H.pos:H.pos+1}function lv(H,R,J){return J?4294967296*R+(H>>>0):4294967296*(R>>>0)+(H>>>0)}function bg(H,R,J){var ve=R<=16383?1:R<=2097151?2:R<=268435455?3:Math.floor(Math.log(R)/(7*Math.LN2));J.realloc(ve);for(var Ee=J.pos-1;Ee>=H;Ee--)J.buf[Ee+ve]=J.buf[Ee]}function T0(H,R){for(var J=0;J>>8,H[J+2]=R>>>16,H[J+3]=R>>>24}function Lx(H,R){return(H[R]|H[R+1]<<8|H[R+2]<<16)+(H[R+3]<<24)}Mu.prototype={destroy:function(){this.buf=null},readFields:function(H,R,J){for(J=J||this.length;this.pos>3,Be=this.pos;this.type=7&ve,H(Ee,R,this),this.pos===Be&&this.skip(ve)}return R},readMessage:function(H,R){return this.readFields(H,R,this.readVarint()+this.pos)},readFixed32:function(){var H=Dv(this.buf,this.pos);return this.pos+=4,H},readSFixed32:function(){var H=Lx(this.buf,this.pos);return this.pos+=4,H},readFixed64:function(){var H=Dv(this.buf,this.pos)+Dv(this.buf,this.pos+4)*w0;return this.pos+=8,H},readSFixed64:function(){var H=Dv(this.buf,this.pos)+Lx(this.buf,this.pos+4)*w0;return this.pos+=8,H},readFloat:function(){var H=Rv(this.buf,this.pos,!0,23,4);return this.pos+=4,H},readDouble:function(){var H=Rv(this.buf,this.pos,!0,52,8);return this.pos+=8,H},readVarint:function(H){var R,J,ve=this.buf;return R=127&(J=ve[this.pos++]),J<128?R:(R|=(127&(J=ve[this.pos++]))<<7,J<128?R:(R|=(127&(J=ve[this.pos++]))<<14,J<128?R:(R|=(127&(J=ve[this.pos++]))<<21,J<128?R:function(Ee,Be,Ge){var ct,At,Nt=Ge.buf;if(ct=(112&(At=Nt[Ge.pos++]))>>4,At<128||(ct|=(127&(At=Nt[Ge.pos++]))<<3,At<128)||(ct|=(127&(At=Nt[Ge.pos++]))<<10,At<128)||(ct|=(127&(At=Nt[Ge.pos++]))<<17,At<128)||(ct|=(127&(At=Nt[Ge.pos++]))<<24,At<128)||(ct|=(1&(At=Nt[Ge.pos++]))<<31,At<128))return lv(Ee,ct,Be);throw new Error("Expected varint not more than 10 bytes")}(R|=(15&(J=ve[this.pos]))<<28,H,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var H=this.readVarint();return H%2==1?(H+1)/-2:H/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var H=this.readVarint()+this.pos,R=this.pos;return this.pos=H,H-R>=12&&xg?function(J,ve,Ee){return xg.decode(J.subarray(ve,Ee))}(this.buf,R,H):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&&(Mr=ar):zr===2?(192&(ct=J[Ge+1]))==128&&(Mr=(31&ar)<<6|63&ct)<=127&&(Mr=null):zr===3?(At=J[Ge+2],(192&(ct=J[Ge+1]))==128&&(192&At)==128&&((Mr=(15&ar)<<12|(63&ct)<<6|63&At)<=2047||Mr>=55296&&Mr<=57343)&&(Mr=null)):zr===4&&(At=J[Ge+2],Nt=J[Ge+3],(192&(ct=J[Ge+1]))==128&&(192&At)==128&&(192&Nt)==128&&((Mr=(15&ar)<<18|(63&ct)<<12|(63&At)<<6|63&Nt)<=65535||Mr>=1114112)&&(Mr=null)),Mr===null?(Mr=65533,zr=1):Mr>65535&&(Mr-=65536,Be+=String.fromCharCode(Mr>>>10&1023|55296),Mr=56320|1023&Mr),Be+=String.fromCharCode(Mr),Ge+=zr}return Be}(this.buf,R,H)},readBytes:function(){var H=this.readVarint()+this.pos,R=this.buf.subarray(this.pos,H);return this.pos=H,R},readPackedVarint:function(H,R){if(this.type!==Mu.Bytes)return H.push(this.readVarint(R));var J=Pp(this);for(H=H||[];this.pos127;);else if(R===Mu.Bytes)this.pos=this.readVarint()+this.pos;else if(R===Mu.Fixed32)this.pos+=4;else{if(R!==Mu.Fixed64)throw new Error("Unimplemented type: "+R);this.pos+=8}},writeTag:function(H,R){this.writeVarint(H<<3|R)},realloc:function(H){for(var R=this.length||16;R268435455||H<0?function(R,J){var ve,Ee;if(R>=0?(ve=R%4294967296|0,Ee=R/4294967296|0):(Ee=~(-R/4294967296),4294967295^(ve=~(-R%4294967296))?ve=ve+1|0:(ve=0,Ee=Ee+1|0)),R>=18446744073709552e3||R<-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)}(H,this):(this.realloc(4),this.buf[this.pos++]=127&H|(H>127?128:0),H<=127||(this.buf[this.pos++]=127&(H>>>=7)|(H>127?128:0),H<=127||(this.buf[this.pos++]=127&(H>>>=7)|(H>127?128:0),H<=127||(this.buf[this.pos++]=H>>>7&127))))},writeSVarint:function(H){this.writeVarint(H<0?2*-H-1:2*H)},writeBoolean:function(H){this.writeVarint(!!H)},writeString:function(H){H=String(H),this.realloc(4*H.length),this.pos++;var R=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,H,this.pos);var J=this.pos-R;J>=128&&bg(R,J,this),this.pos=R-1,this.writeVarint(J),this.pos+=J},writeFloat:function(H){this.realloc(4),lm(this.buf,H,this.pos,!0,23,4),this.pos+=4},writeDouble:function(H){this.realloc(8),lm(this.buf,H,this.pos,!0,52,8),this.pos+=8},writeBytes:function(H){var R=H.length;this.writeVarint(R),this.realloc(R);for(var J=0;J=128&&bg(J,ve,this),this.pos=J-1,this.writeVarint(ve),this.pos+=ve},writeMessage:function(H,R,J){this.writeTag(H,Mu.Bytes),this.writeRawMessage(R,J)},writePackedVarint:function(H,R){R.length&&this.writeMessage(H,T0,R)},writePackedSVarint:function(H,R){R.length&&this.writeMessage(H,UT,R)},writePackedBoolean:function(H,R){R.length&&this.writeMessage(H,VT,R)},writePackedFloat:function(H,R){R.length&&this.writeMessage(H,jT,R)},writePackedDouble:function(H,R){R.length&&this.writeMessage(H,qT,R)},writePackedFixed32:function(H,R){R.length&&this.writeMessage(H,vk,R)},writePackedSFixed32:function(H,R){R.length&&this.writeMessage(H,GT,R)},writePackedFixed64:function(H,R){R.length&&this.writeMessage(H,HT,R)},writePackedSFixed64:function(H,R){R.length&&this.writeMessage(H,WT,R)},writeBytesField:function(H,R){this.writeTag(H,Mu.Bytes),this.writeBytes(R)},writeFixed32Field:function(H,R){this.writeTag(H,Mu.Fixed32),this.writeFixed32(R)},writeSFixed32Field:function(H,R){this.writeTag(H,Mu.Fixed32),this.writeSFixed32(R)},writeFixed64Field:function(H,R){this.writeTag(H,Mu.Fixed64),this.writeFixed64(R)},writeSFixed64Field:function(H,R){this.writeTag(H,Mu.Fixed64),this.writeSFixed64(R)},writeVarintField:function(H,R){this.writeTag(H,Mu.Varint),this.writeVarint(R)},writeSVarintField:function(H,R){this.writeTag(H,Mu.Varint),this.writeSVarint(R)},writeStringField:function(H,R){this.writeTag(H,Mu.Bytes),this.writeString(R)},writeFloatField:function(H,R){this.writeTag(H,Mu.Fixed32),this.writeFloat(R)},writeDoubleField:function(H,R){this.writeTag(H,Mu.Fixed64),this.writeDouble(R)},writeBooleanField:function(H,R){this.writeVarintField(H,!!R)}};var P1=r(Dh);let I1=3;function mk(H,R,J){H===1&&J.readMessage(XT,R)}function XT(H,R,J){if(H===3){let{id:ve,bitmap:Ee,width:Be,height:Ge,left:ct,top:At,advance:Nt}=J.readMessage(Px,{});R.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:Nt}})}}function Px(H,R,J){H===1?R.id=J.readVarint():H===2?R.bitmap=J.readBytes():H===3?R.width=J.readVarint():H===4?R.height=J.readVarint():H===5?R.left=J.readSVarint():H===6?R.top=J.readSVarint():H===7&&(R.advance=J.readVarint())}let Ix=I1;function R1(H){let R=0,J=0;for(let Ge of H)R+=Ge.w*Ge.h,J=Math.max(J,Ge.w);H.sort((Ge,ct)=>ct.h-Ge.h);let ve=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(R/.95)),J),h:1/0}],Ee=0,Be=0;for(let Ge of H)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 Nt=ve.pop();ct=0&&ve>=R&&Ag[this.text.charCodeAt(ve)];ve--)J--;this.text=this.text.substring(R,J),this.sectionIndex=this.sectionIndex.slice(R,J)}substring(R,J){let ve=new um;return ve.text=this.text.substring(R,J),ve.sectionIndex=this.sectionIndex.slice(R,J),ve.sections=this.sections,ve}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((R,J)=>Math.max(R,this.sections[J].scale),0)}addTextSection(R,J){this.text+=R.text,this.sections.push(S0.forText(R.scale,R.fontStack||J));let ve=this.sections.length-1;for(let Ee=0;Ee=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function M0(H,R,J,ve,Ee,Be,Ge,ct,At,Nt,ar,Mr,zr,Wr,ia){let fa=um.fromFeature(H,Ee),ja;Mr===e.ah.vertical&&fa.verticalizePunctuation();let{processBidirectionalText:Ka,processStyledBidirectionalText:Wi}=Js;if(Ka&&fa.sections.length===1){ja=[];let en=Ka(fa.toString(),cm(fa,Nt,Be,R,ve,Wr));for(let jn of en){let Lo=new um;Lo.text=jn,Lo.sections=fa.sections;for(let xs=0;xs0&&Xp>yf&&(yf=Xp)}else{let zc=Lo[pu.fontStack],Pf=zc&&zc[Ju];if(Pf&&Pf.rect)mm=Pf.rect,Qc=Pf.metrics;else{let Xp=jn[pu.fontStack],Zd=Xp&&Xp[Ju];if(!Zd)continue;Qc=Zd.metrics}Dp=(ah-pu.scale)*hu}Wp?(en.verticalizable=!0,dh.push({glyph:Ju,imageName:_d,x:Rs,y:Ku+Dp,vertical:Wp,scale:pu.scale,fontStack:pu.fontStack,sectionIndex:fc,metrics:Qc,rect:mm}),Rs+=fd*pu.scale+xn):(dh.push({glyph:Ju,imageName:_d,x:Rs,y:Ku+Dp,vertical:Wp,scale:pu.scale,fontStack:pu.fontStack,sectionIndex:fc,metrics:Qc,rect:mm}),Rs+=Qc.advance*pu.scale+xn)}dh.length!==0&&(Uu=Math.max(Rs-xn,Uu),uv(dh,0,dh.length-1,Hp,yf)),Rs=0;let Rp=zn*ah+yf;Ah.lineOffset=Math.max(yf,Fh),Ku+=Rp,th=Math.max(Rp,th),++Th}var rh;let $h=Ku-eh,{horizontalAlign:Qh,verticalAlign:ep}=Mg(is);(function(ff,ah,Fh,Ah,dh,yf,Rp,vp,pu){let fc=(ah-Fh)*dh,Ju=0;Ju=yf!==Rp?-vp*Ah-eh:(-Ah*pu+.5)*Rp;for(let Dp of ff)for(let Qc of Dp.positionedGlyphs)Qc.x+=fc,Qc.y+=Ju})(en.positionedLines,Hp,Qh,ep,Uu,th,zn,$h,vo.length),en.top+=-ep*$h,en.bottom=en.top+$h,en.left+=-Qh*Uu,en.right=en.left+Uu}(qi,R,J,ve,ja,Ge,ct,At,Mr,Nt,zr,ia),!function(en){for(let jn of en)if(jn.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(H,R,J,ve,Ee,Be){if(R.imageName){let Ge=ve[R.imageName];return Ge?Ge.displaySize[0]*R.scale*hu/Be+Ee:0}{let Ge=J[R.fontStack],ct=Ge&&Ge[H];return ct?ct.metrics.advance*R.scale+Ee:0}}function Dx(H,R,J,ve){let Ee=Math.pow(H-R,2);return ve?H=0,Nt=0;for(let Mr=0;MrNt){let ar=Math.ceil(Be/Nt);Ee*=ar/Ge,Ge=ar}return{x1:ve,y1:Ee,x2:ve+Be,y2:Ee+Ge}}function Ox(H,R,J,ve,Ee,Be){let Ge=H.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=R.left*Be,Nt=R.right*Be,ar,Mr,zr,Wr;J==="width"||J==="both"?(Wr=Ee[0]+At-ve[3],Mr=Ee[0]+Nt+ve[1]):(Wr=Ee[0]+(At+Nt-Ge.displaySize[0])/2,Mr=Wr+Ge.displaySize[0]);let ia=R.top*Be,fa=R.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:Mr,bottom:zr,left:Wr,collisionPadding:ct}}let k0=255,yd=128,cv=k0*yd;function Bx(H,R){let{expression:J}=R;if(J.kind==="constant")return{kind:"constant",layoutSize:J.evaluate(new Fs(H+1))};if(J.kind==="source")return{kind:"source"};{let{zoomStops:ve,interpolationType:Ee}=J,Be=0;for(;BeGe.id),this.index=R.index,this.pixelRatio=R.pixelRatio,this.sourceLayerIndex=R.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=R.sourceID}createArrays(){this.text=new O1(new al(this.layers,this.zoom,R=>/^text/.test(R))),this.icon=new O1(new al(this.layers,this.zoom,R=>/^icon/.test(R))),this.glyphOffsetArray=new ls,this.lineVertexArray=new Mo,this.symbolInstances=new Ao,this.textAnchorOffsets=new ds}calculateGlyphDependencies(R,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,Mr=Be.get("symbol-sort-key");if(this.features=[],!Nt&&!ar)return;let zr=J.iconDependencies,Wr=J.glyphDependencies,ia=J.availableImages,fa=new Fs(this.zoom);for(let{feature:ja,id:Ka,index:Wi,sourceLayerIndex:gi}of R){let qi=Ee._featureFilter.needGeometry,en=Wl(ja,qi);if(!Ee._featureFilter.filter(fa,en,ve))continue;let jn,Lo;if(qi||(en.geometry=Tl(ja)),Nt){let vo=Ee.getValueAndResolveTokens("text-field",en,ve,ia),zn=ra.factory(vo),is=this.hasRTLText=this.hasRTLText||F1(zn);(!is||Js.getRTLTextPluginStatus()==="unavailable"||is&&Js.isParsed())&&(jn=ov(zn,Ee,en))}if(ar){let vo=Ee.getValueAndResolveTokens("icon-image",en,ve,ia);Lo=vo instanceof Za?vo:Za.fromString(vo)}if(!jn&&!Lo)continue;let xs=this.sortFeaturesByKey?Mr.evaluate(en,{},ve):void 0;if(this.features.push({id:Ka,text:jn,icon:Lo,index:Wi,sourceLayerIndex:gi,geometry:en.geometry,properties:ja.properties,type:JT[ja.type],sortKey:xs}),Lo&&(zr[Lo.name]=!0),jn){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 is of jn.sections)if(is.image)zr[is.image.name]=!0;else{let qo=yo(jn.toString()),Bo=is.fontStack||vo,xn=Wr[Bo]=Wr[Bo]||{};this.calculateGlyphDependencies(is.text,xn,zn,this.allowVerticalPlacement,qo)}}}Be.get("symbol-placement")==="line"&&(this.features=function(ja){let Ka={},Wi={},gi=[],qi=0;function en(vo){gi.push(ja[vo]),qi++}function jn(vo,zn,is){let qo=Wi[vo];return delete Wi[vo],Wi[zn]=qo,gi[qo].geometry[0].pop(),gi[qo].geometry[0]=gi[qo].geometry[0].concat(is[0]),qo}function Lo(vo,zn,is){let qo=Ka[zn];return delete Ka[zn],Ka[vo]=qo,gi[qo].geometry[0].shift(),gi[qo].geometry[0]=is[0].concat(gi[qo].geometry[0]),qo}function xs(vo,zn,is){let qo=is?zn[0][zn[0].length-1]:zn[0][0];return`${vo}:${qo.x}:${qo.y}`}for(let vo=0;vovo.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort((ja,Ka)=>ja.sortKey-Ka.sortKey)}update(R,J,ve){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(R,J,this.layers,ve),this.icon.programConfigurations.updatePaintArrays(R,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(R){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(R),this.iconCollisionBox.upload(R)),this.text.upload(R,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(R,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(R,J){let ve=this.lineVertexArray.length;if(R.segment!==void 0){let Ee=R.dist(J[R.segment+1]),Be=R.dist(J[R.segment]),Ge={};for(let ct=R.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(R,J){let ve=R.placedSymbolArray.get(J),Ee=ve.vertexStartIndex+4*ve.numGlyphs;for(let Be=ve.vertexStartIndex;BeEe[ct]-Ee[At]||Be[At]-Be[ct]),Ge}addToSortKeyRanges(R,J){let ve=this.sortKeyRanges[this.sortKeyRanges.length-1];ve&&ve.sortKey===J?ve.symbolInstanceEnd=R+1:this.sortKeyRanges.push({sortKey:J,symbolInstanceStart:R,symbolInstanceEnd:R+1})}sortFeatures(R){if(this.sortFeaturesByY&&this.sortedAngle!==R&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(R),this.sortedAngle=R,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",fm,{omit:["layers","collisionBoxArray","features","compareText"]}),fm.MAX_GLYPHS=65535,fm.addDynamicAttributes=z1;var kg={get paint(){return C0=C0||new Oe({"icon-opacity":new Fo(te.paint_symbol["icon-opacity"]),"icon-color":new Fo(te.paint_symbol["icon-color"]),"icon-halo-color":new Fo(te.paint_symbol["icon-halo-color"]),"icon-halo-width":new Fo(te.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Fo(te.paint_symbol["icon-halo-blur"]),"icon-translate":new fo(te.paint_symbol["icon-translate"]),"icon-translate-anchor":new fo(te.paint_symbol["icon-translate-anchor"]),"text-opacity":new Fo(te.paint_symbol["text-opacity"]),"text-color":new Fo(te.paint_symbol["text-color"],{runtimeType:Bt,getOverride:H=>H.textColor,hasOverride:H=>!!H.textColor}),"text-halo-color":new Fo(te.paint_symbol["text-halo-color"]),"text-halo-width":new Fo(te.paint_symbol["text-halo-width"]),"text-halo-blur":new Fo(te.paint_symbol["text-halo-blur"]),"text-translate":new fo(te.paint_symbol["text-translate"]),"text-translate-anchor":new fo(te.paint_symbol["text-translate-anchor"])})},get layout(){return cf=cf||new Oe({"symbol-placement":new fo(te.layout_symbol["symbol-placement"]),"symbol-spacing":new fo(te.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new fo(te.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Fo(te.layout_symbol["symbol-sort-key"]),"symbol-z-order":new fo(te.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new fo(te.layout_symbol["icon-allow-overlap"]),"icon-overlap":new fo(te.layout_symbol["icon-overlap"]),"icon-ignore-placement":new fo(te.layout_symbol["icon-ignore-placement"]),"icon-optional":new fo(te.layout_symbol["icon-optional"]),"icon-rotation-alignment":new fo(te.layout_symbol["icon-rotation-alignment"]),"icon-size":new Fo(te.layout_symbol["icon-size"]),"icon-text-fit":new fo(te.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new fo(te.layout_symbol["icon-text-fit-padding"]),"icon-image":new Fo(te.layout_symbol["icon-image"]),"icon-rotate":new Fo(te.layout_symbol["icon-rotate"]),"icon-padding":new Fo(te.layout_symbol["icon-padding"]),"icon-keep-upright":new fo(te.layout_symbol["icon-keep-upright"]),"icon-offset":new Fo(te.layout_symbol["icon-offset"]),"icon-anchor":new Fo(te.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new fo(te.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new fo(te.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new fo(te.layout_symbol["text-rotation-alignment"]),"text-field":new Fo(te.layout_symbol["text-field"]),"text-font":new Fo(te.layout_symbol["text-font"]),"text-size":new Fo(te.layout_symbol["text-size"]),"text-max-width":new Fo(te.layout_symbol["text-max-width"]),"text-line-height":new fo(te.layout_symbol["text-line-height"]),"text-letter-spacing":new Fo(te.layout_symbol["text-letter-spacing"]),"text-justify":new Fo(te.layout_symbol["text-justify"]),"text-radial-offset":new Fo(te.layout_symbol["text-radial-offset"]),"text-variable-anchor":new fo(te.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new Fo(te.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new Fo(te.layout_symbol["text-anchor"]),"text-max-angle":new fo(te.layout_symbol["text-max-angle"]),"text-writing-mode":new fo(te.layout_symbol["text-writing-mode"]),"text-rotate":new Fo(te.layout_symbol["text-rotate"]),"text-padding":new fo(te.layout_symbol["text-padding"]),"text-keep-upright":new fo(te.layout_symbol["text-keep-upright"]),"text-transform":new Fo(te.layout_symbol["text-transform"]),"text-offset":new Fo(te.layout_symbol["text-offset"]),"text-allow-overlap":new fo(te.layout_symbol["text-allow-overlap"]),"text-overlap":new fo(te.layout_symbol["text-overlap"]),"text-ignore-placement":new fo(te.layout_symbol["text-ignore-placement"]),"text-optional":new fo(te.layout_symbol["text-optional"])})}};class L0{constructor(R){if(R.property.overrides===void 0)throw new Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=R.property.overrides?R.property.overrides.runtimeType:rt,this.defaultValue=R}evaluate(R){if(R.formattedSection){let J=this.defaultValue.property.overrides;if(J&&J.hasOverride(R.formattedSection))return J.getOverride(R.formattedSection)}return R.feature&&R.featureState?this.defaultValue.evaluate(R.feature,R.featureState):this.defaultValue.property.specification.default}eachChild(R){this.defaultValue.isConstant()||R(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}mi("FormatSectionOverride",L0,{omit:["defaultValue"]});class zv extends ie{constructor(R){super(R,kg)}recalculate(R,J){if(super.recalculate(R,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(R,J,ve,Ee){let Be=this.layout.get(R).evaluate(J,{},ve,Ee),Ge=this._unevaluatedLayout._values[R];return Ge.isDataDriven()||Mc(Ge.value)||!Be?Be:function(ct,At){return At.replace(/{([^{}]+)}/g,(Nt,ar)=>ct&&ar in ct?String(ct[ar]):"")}(J.properties,Be)}createBucket(R){return new fm(R)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(let R of kg.paint.overridableProperties){if(!zv.hasPaintOverride(this.layout,R))continue;let J=this.paint.get(R),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[R]=new Au(J.property,Be,J.parameters)}}_handleOverridablePaintPropertyUpdate(R,J,ve){return!(!this.layout||J.isDataDriven()||ve.isDataDriven())&&zv.hasPaintOverride(this.layout,R)}static hasPaintOverride(R,J){let ve=R.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=Nt=>{Be||(Nt instanceof tn&&Ia(Nt.value)===qr?Ge(Nt.value.sections):Nt instanceof ss?Ge(Nt.sections):Nt.eachChild(ct))},At=ve.value;At._styleExpression&&ct(At._styleExpression.expression)}return Be}}let Nx;var P0={get paint(){return Nx=Nx||new Oe({"background-color":new fo(te.paint_background["background-color"]),"background-pattern":new lc(te.paint_background["background-pattern"]),"background-opacity":new fo(te.paint_background["background-opacity"])})}};class QT extends ie{constructor(R){super(R,P0)}}let B1;var Ux={get paint(){return B1=B1||new Oe({"raster-opacity":new fo(te.paint_raster["raster-opacity"]),"raster-hue-rotate":new fo(te.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new fo(te.paint_raster["raster-brightness-min"]),"raster-brightness-max":new fo(te.paint_raster["raster-brightness-max"]),"raster-saturation":new fo(te.paint_raster["raster-saturation"]),"raster-contrast":new fo(te.paint_raster["raster-contrast"]),"raster-resampling":new fo(te.paint_raster["raster-resampling"]),"raster-fade-duration":new fo(te.paint_raster["raster-fade-duration"])})}};class I0 extends ie{constructor(R){super(R,Ux)}}class N1 extends ie{constructor(R){super(R,{}),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=R}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(R){this._methodToThrottle=R,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(R,J){if(isNaN(R)||isNaN(J))throw new Error(`Invalid LngLat object: (${R}, ${J})`);if(this.lng=+R,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(R){let J=Math.PI/180,ve=this.lat*J,Ee=R.lat*J,Be=Math.sin(ve)*Math.sin(Ee)+Math.cos(ve)*Math.cos(Ee)*Math.cos((R.lng-this.lng)*J);return j1*Math.acos(Math.min(Be,1))}static convert(R){if(R instanceof Hd)return R;if(Array.isArray(R)&&(R.length===2||R.length===3))return new Hd(Number(R[0]),Number(R[1]));if(!Array.isArray(R)&&typeof R=="object"&&R!==null)return new Hd(Number("lng"in R?R.lng:R.lon),Number(R.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 hm=2*Math.PI*j1;function jx(H){return hm*Math.cos(H*Math.PI/180)}function Cg(H){return(180+H)/360}function qx(H){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+H*Math.PI/360)))/360}function Lg(H,R){return H/jx(R)}function R0(H){return 360/Math.PI*Math.atan(Math.exp((180-360*H)*Math.PI/180))-90}class D0{constructor(R,J,ve=0){this.x=+R,this.y=+J,this.z=+ve}static fromLngLat(R,J=0){let ve=Hd.convert(R);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/hm*(R=R0(this.y),1/Math.cos(R*Math.PI/180));var R}}function rd(H,R,J){var ve=2*Math.PI*6378137/256/Math.pow(2,J);return[H*ve-2*Math.PI*6378137/2,R*ve-2*Math.PI*6378137/2]}class q1{constructor(R,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))}(R,J,ve))throw new Error(`x=${J}, y=${ve}, z=${R} outside of bounds. 0<=x<${Math.pow(2,R)}, 0<=y<${Math.pow(2,R)} 0<=z<=25 `);this.z=R,this.x=J,this.y=ve,this.key=z0(0,R,R,J,ve)}equals(R){return this.z===R.z&&this.x===R.x&&this.y===R.y}url(R,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),Nt=rd(256*(Be+1),256*(Ge+1),ct),At[0]+","+At[1]+","+Nt[0]+","+Nt[1]);var Be,Ge,ct,At,Nt;let ar=function(Mr,zr,Wr){let ia,fa="";for(let ja=Mr;ja>0;ja--)ia=1<1?"@2x":"").replace(/{quadkey}/g,ar).replace(/{bbox-epsg-3857}/g,Ee)}isChildOf(R){let J=this.z-R.z;return J>0&&R.x===this.x>>J&&R.y===this.y>>J}getTilePoint(R){let J=Math.pow(2,this.z);return new i((R.x*J-this.x)*po,(R.y*J-this.y)*po)}toString(){return`${this.z}/${this.x}/${this.y}`}}class Vx{constructor(R,J){this.wrap=R,this.canonical=J,this.key=z0(R,J.z,J.z,J.x,J.y)}}class Gp{constructor(R,J,ve,Ee,Be){if(R= z; overscaledZ = ${R}; z = ${ve}`);this.overscaledZ=R,this.wrap=J,this.canonical=new q1(ve,+Ee,+Be),this.key=z0(J,R,ve,Ee,Be)}clone(){return new Gp(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(R){return this.overscaledZ===R.overscaledZ&&this.wrap===R.wrap&&this.canonical.equals(R.canonical)}scaledTo(R){if(R>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${R}; overscaledZ = ${this.overscaledZ}`);let J=this.canonical.z-R;return R>this.canonical.z?new Gp(R,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Gp(R,this.wrap,R,this.canonical.x>>J,this.canonical.y>>J)}calculateScaledKey(R,J){if(R>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${R}; overscaledZ = ${this.overscaledZ}`);let ve=this.canonical.z-R;return R>this.canonical.z?z0(this.wrap*+J,R,this.canonical.z,this.canonical.x,this.canonical.y):z0(this.wrap*+J,R,R,this.canonical.x>>ve,this.canonical.y>>ve)}isChildOf(R){if(R.wrap!==this.wrap)return!1;let J=this.canonical.z-R.canonical.z;return R.overscaledZ===0||R.overscaledZ>J&&R.canonical.y===this.canonical.y>>J}children(R){if(this.overscaledZ>=R)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(R){return this.wrapR.wrap)&&(this.overscaledZR.overscaledZ)&&(this.canonical.xR.canonical.x)&&this.canonical.ythis.max&&(this.max=Mr),Mr=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+(R+1)}unpack(R,J,ve){return R*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(R,J,ve){if(this.dim!==R.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,Nt=-ve*this.dim;for(let ar=Ge;ar=this._numberToString.length)throw new Error(`Out of bounds. Index requested n=${R} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[R]}}class V1{constructor(R,J,ve,Ee,Be){this.type="Feature",this._vectorTileFeature=R,R._z=J,R._x=ve,R._y=Ee,this.properties=R.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(R){this._geometry=R}toJSON(){let R={geometry:this.geometry};for(let J in this)J!=="_geometry"&&J!=="_vectorTileFeature"&&(R[J]=this[J]);return R}}class Fv{constructor(R,J){this.tileID=R,this.x=R.canonical.x,this.y=R.canonical.y,this.z=R.canonical.z,this.grid=new Di(po,16,0),this.grid3D=new Di(po,16,0),this.featureIndexArray=new tl,this.promoteId=J}insert(R,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 Nt=0;Nt=0&&Mr[3]>=0&&At.insert(ct,Mr[0],Mr[1],Mr[2],Mr[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(R,J,ve,Ee){this.loadVTLayers();let Be=R.params||{},Ge=po/R.tileSize/R.scale,ct=Ec(Be.filter),At=R.queryGeometry,Nt=R.queryPadding*Ge,ar=Xx(At),Mr=this.grid.query(ar.minX-Nt,ar.minY-Nt,ar.maxX+Nt,ar.maxY+Nt),zr=Xx(R.cameraQueryGeometry),Wr=this.grid3D.query(zr.minX-Nt,zr.minY-Nt,zr.maxX+Nt,zr.maxY+Nt,(ja,Ka,Wi,gi)=>function(qi,en,jn,Lo,xs){for(let zn of qi)if(en<=zn.x&&jn<=zn.y&&Lo>=zn.x&&xs>=zn.y)return!0;let vo=[new i(en,jn),new i(en,xs),new i(Lo,xs),new i(Lo,jn)];if(qi.length>2){for(let zn of vo)if(bi(qi,zn))return!0}for(let zn=0;zn(gi||(gi=Tl(qi)),en.queryIntersectsFeature(At,qi,jn,gi,this.z,R.transform,Ge,R.pixelPosMatrix)))}return ia}loadMatchingFeature(R,J,ve,Ee,Be,Ge,ct,At,Nt,ar,Mr){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=Wl(ia,!0);if(!Be.filter(new Fs(this.tileID.overscaledZ),ja,this.tileID.canonical))return}else if(!Be.filter(new Fs(this.tileID.overscaledZ),ia))return;let fa=this.getId(ia,Wr);for(let ja=0;ja{let ct=R instanceof yc?R.get(Ge):null;return ct&&ct.evaluate?ct.evaluate(J,ve,Ee):ct})}function Xx(H){let R=1/0,J=1/0,ve=-1/0,Ee=-1/0;for(let Be of H)R=Math.min(R,Be.x),J=Math.min(J,Be.y),ve=Math.max(ve,Be.x),Ee=Math.max(Ee,Be.y);return{minX:R,minY:J,maxX:ve,maxY:Ee}}function eA(H,R){return R-H}function Zx(H,R,J,ve,Ee){let Be=[];for(let Ge=0;Ge=ve&&Mr.x>=ve||(ar.x>=ve?ar=new i(ve,ar.y+(ve-ar.x)/(Mr.x-ar.x)*(Mr.y-ar.y))._round():Mr.x>=ve&&(Mr=new i(ve,ar.y+(ve-ar.x)/(Mr.x-ar.x)*(Mr.y-ar.y))._round()),ar.y>=Ee&&Mr.y>=Ee||(ar.y>=Ee?ar=new i(ar.x+(Ee-ar.y)/(Mr.y-ar.y)*(Mr.x-ar.x),Ee)._round():Mr.y>=Ee&&(Mr=new i(ar.x+(Ee-ar.y)/(Mr.y-ar.y)*(Mr.x-ar.x),Ee)._round()),At&&ar.equals(At[At.length-1])||(At=[ar],Be.push(At)),At.push(Mr)))))}}return Be}mi("FeatureIndex",Fv,{omit:["rawTileData","sourceLayerCoder"]});class Wd extends i{constructor(R,J,ve,Ee){super(R,J),this.angle=ve,Ee!==void 0&&(this.segment=Ee)}clone(){return new Wd(this.x,this.y,this.angle,this.segment)}}function G1(H,R,J,ve,Ee){if(R.segment===void 0||J===0)return!0;let Be=R,Ge=R.segment+1,ct=0;for(;ct>-J/2;){if(Ge--,Ge<0)return!1;ct-=H[Ge].dist(Be),Be=H[Ge]}ct+=H[Ge].dist(H[Ge+1]),Ge++;let At=[],Nt=0;for(;ctve;)Nt-=At.shift().angleDelta;if(Nt>Ee)return!1;Ge++,ct+=ar.dist(Mr)}return!0}function Yx(H){let R=0;for(let J=0;JNt){let ia=(Nt-At)/Wr,fa=En.number(Mr.x,zr.x,ia),ja=En.number(Mr.y,zr.y,ia),Ka=new Wd(fa,ja,zr.angleTo(Mr),ar);return Ka._round(),!Ge||G1(H,Ka,ct,Ge,R)?Ka:void 0}At+=Wr}}function rA(H,R,J,ve,Ee,Be,Ge,ct,At){let Nt=Kx(ve,Be,Ge),ar=Jx(ve,Ee),Mr=ar*Ge,zr=H[0].x===0||H[0].x===At||H[0].y===0||H[0].y===At;return R-Mr=0&&qi=0&&en=0&&zr+Nt<=ar){let jn=new Wd(qi,en,Wi,ia);jn._round(),ve&&!G1(H,jn,Be,ve,Ee)||Wr.push(jn)}}Mr+=Ka}return ct||Wr.length||Ge||(Wr=$x(H,Mr/2,J,ve,Ee,Be,Ge,!0,At)),Wr}mi("Anchor",Wd);let pm=zh;function Qx(H,R,J,ve){let Ee=[],Be=H.image,Ge=Be.pixelRatio,ct=Be.paddedRect.w-2*pm,At=Be.paddedRect.h-2*pm,Nt={x1:H.left,y1:H.top,x2:H.right,y2:H.bottom},ar=Be.stretchX||[[0,ct]],Mr=Be.stretchY||[[0,At]],zr=(xn,cs)=>xn+cs[1]-cs[0],Wr=ar.reduce(zr,0),ia=Mr.reduce(zr,0),fa=ct-Wr,ja=At-ia,Ka=0,Wi=Wr,gi=0,qi=ia,en=0,jn=fa,Lo=0,xs=ja;if(Be.content&&ve){let xn=Be.content,cs=xn[2]-xn[0],No=xn[3]-xn[1];(Be.textFitWidth||Be.textFitHeight)&&(Nt=Fx(H)),Ka=Xd(ar,0,xn[0]),gi=Xd(Mr,0,xn[1]),Wi=Xd(ar,xn[0],xn[2]),qi=Xd(Mr,xn[1],xn[3]),en=xn[0]-Ka,Lo=xn[1]-gi,jn=cs-Wi,xs=No-qi}let vo=Nt.x1,zn=Nt.y1,is=Nt.x2-vo,qo=Nt.y2-zn,Bo=(xn,cs,No,Rs)=>{let Ku=Pg(xn.stretch-Ka,Wi,is,vo),Uu=dm(xn.fixed-en,jn,xn.stretch,Wr),th=Pg(cs.stretch-gi,qi,qo,zn),Hp=dm(cs.fixed-Lo,xs,cs.stretch,ia),Th=Pg(No.stretch-Ka,Wi,is,vo),rh=dm(No.fixed-en,jn,No.stretch,Wr),$h=Pg(Rs.stretch-gi,qi,qo,zn),Qh=dm(Rs.fixed-Lo,xs,Rs.stretch,ia),ep=new i(Ku,th),ff=new i(Th,th),ah=new i(Th,$h),Fh=new i(Ku,$h),Ah=new i(Uu/Ge,Hp/Ge),dh=new i(rh/Ge,Qh/Ge),yf=R*Math.PI/180;if(yf){let pu=Math.sin(yf),fc=Math.cos(yf),Ju=[fc,-pu,pu,fc];ep._matMult(Ju),ff._matMult(Ju),Fh._matMult(Ju),ah._matMult(Ju)}let Rp=xn.stretch+xn.fixed,vp=cs.stretch+cs.fixed;return{tl:ep,tr:ff,bl:Fh,br:ah,tex:{x:Be.paddedRect.x+pm+Rp,y:Be.paddedRect.y+pm+vp,w:No.stretch+No.fixed-Rp,h:Rs.stretch+Rs.fixed-vp},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:Ah,pixelOffsetBR:dh,minFontScaleX:jn/Ge/is,minFontScaleY:xs/Ge/qo,isSDF:J}};if(ve&&(Be.stretchX||Be.stretchY)){let xn=eb(ar,fa,Wr),cs=eb(Mr,ja,ia);for(let No=0;No0&&(fa=Math.max(10,fa),this.circleDiameter=fa)}else{let zr=!((Mr=Ge.image)===null||Mr===void 0)&&Mr.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 i(zr.x1,zr.y1),fa=new i(zr.x2,zr.y1),ja=new i(zr.x1,zr.y2),Ka=new i(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)}R.emplaceBack(J.x,J.y,zr.x1,zr.y1,zr.x2,zr.y2,ve,Ee,Be)}this.boxEndIndex=R.length}}class cd{constructor(R=[],J=(ve,Ee)=>veEe?1:0){if(this.data=R,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(R){this.data.push(R),this._up(this.length++)}pop(){if(this.length===0)return;let R=this.data[0],J=this.data.pop();return--this.length>0&&(this.data[0]=J,this._down(0)),R}peek(){return this.data[0]}_up(R){let{data:J,compare:ve}=this,Ee=J[R];for(;R>0;){let Be=R-1>>1,Ge=J[Be];if(ve(Ee,Ge)>=0)break;J[R]=Ge,R=Be}J[R]=Ee}_down(R){let{data:J,compare:ve}=this,Ee=this.length>>1,Be=J[R];for(;R=0)break;J[R]=J[Ge],R=Ge}J[R]=Be}}function aA(H,R=1,J=!1){let ve=1/0,Ee=1/0,Be=-1/0,Ge=-1/0,ct=H[0];for(let Wr=0;WrBe)&&(Be=ia.x),(!Wr||ia.y>Ge)&&(Ge=ia.y)}let At=Math.min(Be-ve,Ge-Ee),Nt=At/2,ar=new cd([],iA);if(At===0)return new i(ve,Ee);for(let Wr=ve;WrMr.d||!Mr.d)&&(Mr=Wr,J&&console.log("found best %d after %d probes",Math.round(1e4*Wr.d)/1e4,zr)),Wr.max-Mr.d<=R||(Nt=Wr.h/2,ar.push(new vm(Wr.p.x-Nt,Wr.p.y-Nt,Nt,H)),ar.push(new vm(Wr.p.x+Nt,Wr.p.y-Nt,Nt,H)),ar.push(new vm(Wr.p.x-Nt,Wr.p.y+Nt,Nt,H)),ar.push(new vm(Wr.p.x+Nt,Wr.p.y+Nt,Nt,H)),zr+=4)}return J&&(console.log(`num probes: ${zr}`),console.log(`best distance: ${Mr.d}`)),Mr.p}function iA(H,R){return R.max-H.max}function vm(H,R,J,ve){this.p=new i(H,R),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,xa(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,Ov=Number.POSITIVE_INFINITY;function H1(H,R){return R[1]!==Ov?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]}(H,R[0],R[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]}(H,R[0])}function tb(H,R,J){var ve;let Ee=H.layout,Be=(ve=Ee.get("text-variable-anchor-offset"))===null||ve===void 0?void 0:ve.evaluate(R,{},J);if(Be){let ct=Be.values,At=[];for(let Nt=0;Ntzr*hu);ar.startsWith("top")?Mr[1]-=pv:ar.startsWith("bottom")&&(Mr[1]+=pv),At[Nt+1]=Mr}return new $a(At)}let Ge=Ee.get("text-variable-anchor");if(Ge){let ct;ct=H._unevaluatedLayout.getValue("text-radial-offset")!==void 0?[Ee.get("text-radial-offset").evaluate(R,{},J)*hu,Ov]:Ee.get("text-offset").evaluate(R,{},J).map(Nt=>Nt*hu);let At=[];for(let Nt of Ge)At.push(Nt,H1(Nt,ct));return new $a(At)}return null}function W1(H){switch(H){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function nA(H,R,J,ve,Ee,Be,Ge,ct,At,Nt,ar){let Mr=Be.textMaxSize.evaluate(R,{});Mr===void 0&&(Mr=Ge);let zr=H.layers[0].layout,Wr=zr.get("icon-offset").evaluate(R,{},ar),ia=ab(J.horizontal),fa=Ge/24,ja=H.tilePixelRatio*fa,Ka=H.tilePixelRatio*Mr/24,Wi=H.tilePixelRatio*ct,gi=H.tilePixelRatio*zr.get("symbol-spacing"),qi=zr.get("text-padding")*H.tilePixelRatio,en=function(xn,cs,No,Rs=1){let Ku=xn.get("icon-padding").evaluate(cs,{},No),Uu=Ku&&Ku.values;return[Uu[0]*Rs,Uu[1]*Rs,Uu[2]*Rs,Uu[3]*Rs]}(zr,R,ar,H.tilePixelRatio),jn=zr.get("text-max-angle")/180*Math.PI,Lo=zr.get("text-rotation-alignment")!=="viewport"&&zr.get("symbol-placement")!=="point",xs=zr.get("icon-rotation-alignment")==="map"&&zr.get("symbol-placement")!=="point",vo=zr.get("symbol-placement"),zn=gi/2,is=zr.get("icon-text-fit"),qo;ve&&is!=="none"&&(H.allowVerticalPlacement&&J.vertical&&(qo=Ox(ve,J.vertical,is,zr.get("icon-text-fit-padding"),Wr,fa)),ia&&(ve=Ox(ve,ia,is,zr.get("icon-text-fit-padding"),Wr,fa)));let Bo=(xn,cs)=>{cs.x<0||cs.x>=po||cs.y<0||cs.y>=po||function(No,Rs,Ku,Uu,th,Hp,Th,rh,$h,Qh,ep,ff,ah,Fh,Ah,dh,yf,Rp,vp,pu,fc,Ju,Dp,Qc,mm){let _d=No.addToLineVertexArray(Rs,Ku),fd,Wp,zc,Pf,Xp=0,Zd=0,mp=0,gm=0,J1=-1,zg=-1,xd={},Bv=ti("");if(No.allowVerticalPlacement&&Uu.vertical){let Oh=rh.layout.get("text-rotate").evaluate(fc,{},Qc)+90;zc=new hv($h,Rs,Qh,ep,ff,Uu.vertical,ah,Fh,Ah,Oh),Th&&(Pf=new hv($h,Rs,Qh,ep,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),tp=Th?Qx(Th,Oh,Dp,Zp):void 0;Wp=new hv($h,Rs,Qh,ep,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&&y(`${No.layerIds[0]}: Value for "icon-size" is >= ${k0}. Reduce your "icon-size".`)):Bh.kind==="composite"&&(id=[yd*Ju.compositeIconSizes[0].evaluate(fc,{},Qc),yd*Ju.compositeIconSizes[1].evaluate(fc,{},Qc)],(id[0]>cv||id[1]>cv)&&y(`${No.layerIds[0]}: Value for "icon-size" is >= ${k0}. Reduce your "icon-size".`)),No.addSymbols(No.icon,dv,id,pu,vp,fc,e.ah.none,Rs,_d.lineStartIndex,_d.lineLength,-1,Qc),J1=No.icon.placedSymbolArray.length-1,tp&&(Zd=4*tp.length,No.addSymbols(No.icon,tp,id,pu,vp,fc,e.ah.vertical,Rs,_d.lineStartIndex,_d.lineLength,-1,Qc),zg=No.icon.placedSymbolArray.length-1)}let vh=Object.keys(Uu.horizontal);for(let Oh of vh){let Zp=Uu.horizontal[Oh];if(!fd){Bv=ti(Zp.text);let tp=rh.layout.get("text-rotate").evaluate(fc,{},Qc);fd=new hv($h,Rs,Qh,ep,ff,Zp,ah,Fh,Ah,tp)}let dv=Zp.positionedLines.length===1;if(mp+=rb(No,Rs,Zp,Hp,rh,Ah,fc,dh,_d,Uu.vertical?e.ah.horizontal:e.ah.horizontalOnly,dv?vh:[Oh],xd,J1,Ju,Qc),dv)break}Uu.vertical&&(gm+=rb(No,Rs,Uu.vertical,Hp,rh,Ah,fc,dh,_d,e.ah.vertical,["vertical"],xd,zg,Ju,Qc));let lA=fd?fd.boxStartIndex:No.collisionBoxArray.length,Fg=fd?fd.boxEndIndex:No.collisionBoxArray.length,bd=zc?zc.boxStartIndex:No.collisionBoxArray.length,gp=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*=mm/hu),No.glyphOffsetArray.length>=fm.MAX_GLYPHS&&y("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,Qc),[fA,hA]=function(Oh,Zp){let dv=Oh.length,tp=Zp?.values;if(tp?.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,Bv,lA,Fg,bd,gp,sb,uA,lb,cA,Qh,mp,gm,Xp,Zd,Og,0,ah,ad,fA,hA)}(H,cs,xn,J,ve,Ee,qo,H.layers[0],H.collisionBoxArray,R.index,R.sourceLayerIndex,H.index,ja,[qi,qi,qi,qi],Lo,At,Wi,en,xs,Wr,R,Be,Nt,ar,Ge)};if(vo==="line")for(let xn of Zx(R.geometry,0,0,po,po)){let cs=rA(xn,gi,jn,J.vertical||ia,ve,24,Ka,H.overscaling,po);for(let No of cs)ia&&oA(H,ia.text,zn,No)||Bo(xn,No)}else if(vo==="line-center"){for(let xn of R.geometry)if(xn.length>1){let cs=tA(xn,jn,J.vertical||ia,ve,24,Ka);cs&&Bo(xn,cs)}}else if(R.type==="Polygon")for(let xn of Tc(R.geometry,0)){let cs=aA(xn,16);Bo(xn[0],new Wd(cs.x,cs.y,0))}else if(R.type==="LineString")for(let xn of R.geometry)Bo(xn,new Wd(xn[0].x,xn[0].y,0));else if(R.type==="Point")for(let xn of R.geometry)for(let cs of xn)Bo([cs],new Wd(cs.x,cs.y,0))}function rb(H,R,J,ve,Ee,Be,Ge,ct,At,Nt,ar,Mr,zr,Wr,ia){let fa=function(Wi,gi,qi,en,jn,Lo,xs,vo){let zn=en.layout.get("text-rotate").evaluate(Lo,{})*Math.PI/180,is=[];for(let qo of gi.positionedLines)for(let Bo of qo.positionedGlyphs){if(!Bo.rect)continue;let xn=Bo.rect||{},cs=Ix+1,No=!0,Rs=1,Ku=0,Uu=(jn||vo)&&Bo.vertical,th=Bo.metrics.advance*Bo.scale/2;if(vo&&gi.verticalizable&&(Ku=qo.lineOffset/2-(Bo.imageName?-(hu-Bo.metrics.width*Bo.scale)/2:(Bo.scale-1)*hu)),Bo.imageName){let pu=xs[Bo.imageName];No=pu.sdf,Rs=pu.pixelRatio,cs=zh/Rs}let Hp=jn?[Bo.x+th,Bo.y]:[0,0],Th=jn?[0,0]:[Bo.x+th+qi[0],Bo.y+qi[1]-Ku],rh=[0,0];Uu&&(rh=Th,Th=[0,0]);let $h=Bo.metrics.isDoubleResolution?2:1,Qh=(Bo.metrics.left-cs)*Bo.scale-th+Th[0],ep=(-Bo.metrics.top-cs)*Bo.scale+Th[1],ff=Qh+xn.w/$h*Bo.scale/Rs,ah=ep+xn.h/$h*Bo.scale/Rs,Fh=new i(Qh,ep),Ah=new i(ff,ep),dh=new i(Qh,ah),yf=new i(ff,ah);if(Uu){let pu=new i(-th,th-eh),fc=-Math.PI/2,Ju=hu/2-th,Dp=new i(5-eh-Ju,-(Bo.imageName?Ju:0)),Qc=new i(...rh);Fh._rotateAround(fc,pu)._add(Dp)._add(Qc),Ah._rotateAround(fc,pu)._add(Dp)._add(Qc),dh._rotateAround(fc,pu)._add(Dp)._add(Qc),yf._rotateAround(fc,pu)._add(Dp)._add(Qc)}if(zn){let pu=Math.sin(zn),fc=Math.cos(zn),Ju=[fc,-pu,pu,fc];Fh._matMult(Ju),Ah._matMult(Ju),dh._matMult(Ju),yf._matMult(Ju)}let Rp=new i(0,0),vp=new i(0,0);is.push({tl:Fh,tr:Ah,bl:dh,br:yf,tex:xn,writingMode:gi.writingMode,glyphOffset:Hp,sectionIndex:Bo.sectionIndex,isSDF:No,pixelOffsetTL:Rp,pixelOffsetBR:vp,minFontScaleX:0,minFontScaleY:0})}return is}(0,J,ct,Ee,Be,Ge,ve,H.allowVerticalPlacement),ja=H.textSizeData,Ka=null;ja.kind==="source"?(Ka=[yd*Ee.layout.get("text-size").evaluate(Ge,{})],Ka[0]>cv&&y(`${H.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)&&y(`${H.layerIds[0]}: Value for "text-size" is >= ${k0}. Reduce your "text-size".`)),H.addSymbols(H.text,fa,Ka,ct,Be,Ge,Nt,R,At.lineStartIndex,At.lineLength,zr,ia);for(let Wi of ar)Mr[Wi]=H.text.placedSymbolArray.length-1;return 4*fa.length}function ab(H){for(let R in H)return H[R];return null}function oA(H,R,J,ve){let Ee=H.compareText;if(R in Ee){let Be=Ee[R];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(R,2,1),[ct]=new Uint32Array(R,4,1);return new X1(ct,Ge,Be,R)}constructor(R,J=64,ve=Float64Array,Ee){if(isNaN(R)||R<0)throw new Error(`Unpexpected numItems value: ${R}.`);this.numItems=+R,this.nodeSize=Math.min(Math.max(+J,2),65535),this.ArrayType=ve,this.IndexArrayType=R<65536?Uint16Array:Uint32Array;let Be=ib.indexOf(this.ArrayType),Ge=2*R*this.ArrayType.BYTES_PER_ELEMENT,ct=R*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,R),this.coords=new this.ArrayType(this.data,8+ct+At,2*R),this._pos=2*R,this._finished=!0):(this.data=new ArrayBuffer(8+Ge+ct+At),this.ids=new this.IndexArrayType(this.data,8,R),this.coords=new this.ArrayType(this.data,8+ct+At,2*R),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]=R)}add(R,J){let ve=this._pos>>1;return this.ids[ve]=ve,this.coords[this._pos++]=R,this.coords[this._pos++]=J,ve}finish(){let R=this._pos>>1;if(R!==this.numItems)throw new Error(`Added ${R} items when expected ${this.numItems}.`);return Ig(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(R,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],Nt=[];for(;At.length;){let ar=At.pop()||0,Mr=At.pop()||0,zr=At.pop()||0;if(Mr-zr<=ct){for(let ja=zr;ja<=Mr;ja++){let Ka=Ge[2*ja],Wi=Ge[2*ja+1];Ka>=R&&Ka<=ve&&Wi>=J&&Wi<=Ee&&Nt.push(Be[ja])}continue}let Wr=zr+Mr>>1,ia=Ge[2*Wr],fa=Ge[2*Wr+1];ia>=R&&ia<=ve&&fa>=J&&fa<=Ee&&Nt.push(Be[Wr]),(ar===0?R<=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(Mr),At.push(1-ar))}return Nt}within(R,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=[],Nt=ve*ve;for(;ct.length;){let ar=ct.pop()||0,Mr=ct.pop()||0,zr=ct.pop()||0;if(Mr-zr<=Ge){for(let ja=zr;ja<=Mr;ja++)ob(Be[2*ja],Be[2*ja+1],R,J)<=Nt&&At.push(Ee[ja]);continue}let Wr=zr+Mr>>1,ia=Be[2*Wr],fa=Be[2*Wr+1];ob(ia,fa,R,J)<=Nt&&At.push(Ee[Wr]),(ar===0?R-ve<=ia:J-ve<=fa)&&(ct.push(zr),ct.push(Wr-1),ct.push(1-ar)),(ar===0?R+ve>=ia:J+ve>=fa)&&(ct.push(Wr+1),ct.push(Mr),ct.push(1-ar))}return At}}function Ig(H,R,J,ve,Ee,Be){if(Ee-ve<=J)return;let Ge=ve+Ee>>1;nb(H,R,Ge,ve,Ee,Be),Ig(H,R,J,ve,Ge-1,1-Be),Ig(H,R,J,Ge+1,Ee,1-Be)}function nb(H,R,J,ve,Ee,Be){for(;Ee>ve;){if(Ee-ve>600){let Nt=Ee-ve+1,ar=J-ve+1,Mr=Math.log(Nt),zr=.5*Math.exp(2*Mr/3),Wr=.5*Math.sqrt(Mr*zr*(Nt-zr)/Nt)*(ar-Nt/2<0?-1:1);nb(H,R,J,Math.max(ve,Math.floor(J-ar*zr/Nt+Wr)),Math.min(Ee,Math.floor(J+(Nt-ar)*zr/Nt+Wr)),Be)}let Ge=R[2*J+Be],ct=ve,At=Ee;for(F0(H,R,ve,J),R[2*Ee+Be]>Ge&&F0(H,R,ve,Ee);ctGe;)At--}R[2*ve+Be]===Ge?F0(H,R,ve,At):(At++,F0(H,R,At,Ee)),At<=J&&(ve=At+1),J<=At&&(Ee=At-1)}}function F0(H,R,J,ve){Z1(H,J,ve),Z1(R,2*J,2*ve),Z1(R,2*J+1,2*ve+1)}function Z1(H,R,J){let ve=H[R];H[R]=H[J],H[J]=ve}function ob(H,R,J,ve){let Ee=H-J,Be=R-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(H){performance.mark(H)},frame(H){let R=H;O0!=null&&Hf.push(R-O0),O0=R},clearMetrics(){O0=null,Hf=[],performance.clearMeasures(K1),performance.clearMeasures(Dg);for(let H in e.bg)performance.clearMarks(e.bg[H])},getPerformanceMetrics(){performance.measure(K1,e.bg.create,e.bg.load),performance.measure(Dg,e.bg.create,e.bg.fullLoad);let H=performance.getEntriesByName(K1)[0].duration,R=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:H,fullLoadTime:R,fps:ve,percentDroppedFrames:Ee/(J+Ee)*100,totalFrames:J}}};e.$=class extends Tr{},e.A=Qa,e.B=Hi,e.C=function(H){if(z==null){let R=H.navigator?H.navigator.userAgent:null;z=!!H.safari||!(!R||!(/\b(iPad|iPhone|iPod)\b/.test(R)||R.match("Safari")&&!R.match("Chrome")))}return z},e.D=fo,e.E=ee,e.F=class{constructor(H,R){this.target=H,this.mapId=R,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=P(self)?H:window}registerMessageHandler(H,R){this.messageHandlers[H]=R}sendAsync(H,R){return new Promise((J,ve)=>{let Ee=Math.round(1e18*Math.random()).toString(36).substring(0,10);this.resolveRejects[Ee]={resolve:J,reject:ve},R&&R.signal.addEventListener("abort",()=>{delete this.resolveRejects[Ee];let ct={id:Ee,type:"",origin:location.origin,targetMapId:H.targetMapId,sourceMapId:this.mapId};this.target.postMessage(ct)},{once:!0});let Be=[],Ge=Object.assign(Object.assign({},H),{id:Ee,sourceMapId:this.mapId,origin:location.origin,data:eo(H.data,Be)});this.target.postMessage(Ge,{transfer:Be})})}receive(H){let R=H.data,J=R.id;if(!(R.origin!=="file://"&&location.origin!=="file://"&&R.origin!=="resource://android"&&location.origin!=="resource://android"&&R.origin!==location.origin||R.targetMapId&&this.mapId!==R.targetMapId)){if(R.type===""){delete this.tasks[J];let ve=this.abortControllers[J];return delete this.abortControllers[J],void(ve&&ve.abort())}if(P(self)||R.mustQueue)return this.tasks[J]=R,this.taskQueue.push(J),void this.invoker.trigger();this.processTask(J,R)}}process(){if(this.taskQueue.length===0)return;let H=this.taskQueue.shift(),R=this.tasks[H];delete this.tasks[H],this.taskQueue.length>0&&this.invoker.trigger(),R&&this.processTask(H,R)}processTask(H,R){return t(this,void 0,void 0,function*(){if(R.type===""){let Ee=this.resolveRejects[H];return delete this.resolveRejects[H],Ee?void(R.error?Ee.reject(co(R.error)):Ee.resolve(co(R.data))):void 0}if(!this.messageHandlers[R.type])return void this.completeTask(H,new Error(`Could not find a registered handler for ${R.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));let J=co(R.data),ve=new AbortController;this.abortControllers[H]=ve;try{let Ee=yield this.messageHandlers[R.type](R.sourceMapId,J,ve);this.completeTask(H,null,Ee)}catch(Ee){this.completeTask(H,Ee)}})}completeTask(H,R,J){let ve=[];delete this.abortControllers[H];let Ee={id:H,type:"",sourceMapId:this.mapId,origin:location.origin,error:R?eo(R):null,data:eo(J,ve)};this.target.postMessage(Ee,{transfer:ve})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},e.G=ce,e.H=function(){var H=new Qa(16);return Qa!=Float32Array&&(H[1]=0,H[2]=0,H[3]=0,H[4]=0,H[6]=0,H[7]=0,H[8]=0,H[9]=0,H[11]=0,H[12]=0,H[13]=0,H[14]=0),H[0]=1,H[5]=1,H[10]=1,H[15]=1,H},e.I=wg,e.J=function(H,R,J){var ve,Ee,Be,Ge,ct,At,Nt,ar,Mr,zr,Wr,ia,fa=J[0],ja=J[1],Ka=J[2];return R===H?(H[12]=R[0]*fa+R[4]*ja+R[8]*Ka+R[12],H[13]=R[1]*fa+R[5]*ja+R[9]*Ka+R[13],H[14]=R[2]*fa+R[6]*ja+R[10]*Ka+R[14],H[15]=R[3]*fa+R[7]*ja+R[11]*Ka+R[15]):(Ee=R[1],Be=R[2],Ge=R[3],ct=R[4],At=R[5],Nt=R[6],ar=R[7],Mr=R[8],zr=R[9],Wr=R[10],ia=R[11],H[0]=ve=R[0],H[1]=Ee,H[2]=Be,H[3]=Ge,H[4]=ct,H[5]=At,H[6]=Nt,H[7]=ar,H[8]=Mr,H[9]=zr,H[10]=Wr,H[11]=ia,H[12]=ve*fa+ct*ja+Mr*Ka+R[12],H[13]=Ee*fa+At*ja+zr*Ka+R[13],H[14]=Be*fa+Nt*ja+Wr*Ka+R[14],H[15]=Ge*fa+ar*ja+ia*Ka+R[15]),H},e.K=function(H,R,J){var ve=J[0],Ee=J[1],Be=J[2];return H[0]=R[0]*ve,H[1]=R[1]*ve,H[2]=R[2]*ve,H[3]=R[3]*ve,H[4]=R[4]*Ee,H[5]=R[5]*Ee,H[6]=R[6]*Ee,H[7]=R[7]*Ee,H[8]=R[8]*Be,H[9]=R[9]*Be,H[10]=R[10]*Be,H[11]=R[11]*Be,H[12]=R[12],H[13]=R[13],H[14]=R[14],H[15]=R[15],H},e.L=Va,e.M=function(H,R){let J={};for(let ve=0;ve{let R=window.document.createElement("video");return R.muted=!0,new Promise(J=>{R.onloadstart=()=>{J(R)};for(let ve of H){let Ee=window.document.createElement("source");Q(ve)||(R.crossOrigin="Anonymous"),Ee.src=ve,R.appendChild(Ee)}})},e.a4=function(){return p++},e.a5=on,e.a6=fm,e.a7=Ec,e.a8=Wl,e.a9=V1,e.aA=function(H){if(H.type==="custom")return new N1(H);switch(H.type){case"background":return new QT(H);case"circle":return new Ha(H);case"fill":return new Wt(H);case"fill-extrusion":return new kp(H);case"heatmap":return new Dn(H);case"hillshade":return new xl(H);case"line":return new Pv(H);case"raster":return new I0(H);case"symbol":return new zv(H)}},e.aB=u,e.aC=function(H,R){if(!H)return[{command:"setStyle",args:[R]}];let J=[];try{if(!Se(H.version,R.version))return[{command:"setStyle",args:[R]}];Se(H.center,R.center)||J.push({command:"setCenter",args:[R.center]}),Se(H.zoom,R.zoom)||J.push({command:"setZoom",args:[R.zoom]}),Se(H.bearing,R.bearing)||J.push({command:"setBearing",args:[R.bearing]}),Se(H.pitch,R.pitch)||J.push({command:"setPitch",args:[R.pitch]}),Se(H.sprite,R.sprite)||J.push({command:"setSprite",args:[R.sprite]}),Se(H.glyphs,R.glyphs)||J.push({command:"setGlyphs",args:[R.glyphs]}),Se(H.transition,R.transition)||J.push({command:"setTransition",args:[R.transition]}),Se(H.light,R.light)||J.push({command:"setLight",args:[R.light]}),Se(H.terrain,R.terrain)||J.push({command:"setTerrain",args:[R.terrain]}),Se(H.sky,R.sky)||J.push({command:"setSky",args:[R.sky]}),Se(H.projection,R.projection)||J.push({command:"setProjection",args:[R.projection]});let ve={},Ee=[];(function(Ge,ct,At,Nt){let ar;for(ar in ct=ct||{},Ge=Ge||{})Object.prototype.hasOwnProperty.call(Ge,ar)&&(Object.prototype.hasOwnProperty.call(ct,ar)||je(ar,At,Nt));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)?Re(At,{command:"setGeoJSONSourceData",args:[ar,ct[ar].data]}):at(ar,ct,At,Nt)):Pe(ar,ct,At))})(H.sources,R.sources,Ee,ve);let Be=[];H.layers&&H.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 Nt=(Ge=Ge||[]).map(Ve),ar=ct.map(Ve),Mr=Ge.reduce(he,{}),zr=ct.reduce(he,{}),Wr=Nt.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 R[ve]=!Ge||Ge.toLowerCase(),""}),R["max-age"]){let J=parseInt(R["max-age"],10);isNaN(J)?delete R["max-age"]:R["max-age"]=J}return R},e.ab=function(H,R){let J=[];for(let ve in H)ve in R||J.push(ve);return J},e.ac=w,e.ad=function(H,R,J){var ve=Math.sin(J),Ee=Math.cos(J),Be=R[0],Ge=R[1],ct=R[2],At=R[3],Nt=R[4],ar=R[5],Mr=R[6],zr=R[7];return R!==H&&(H[8]=R[8],H[9]=R[9],H[10]=R[10],H[11]=R[11],H[12]=R[12],H[13]=R[13],H[14]=R[14],H[15]=R[15]),H[0]=Be*Ee+Nt*ve,H[1]=Ge*Ee+ar*ve,H[2]=ct*Ee+Mr*ve,H[3]=At*Ee+zr*ve,H[4]=Nt*Ee-Be*ve,H[5]=ar*Ee-Ge*ve,H[6]=Mr*Ee-ct*ve,H[7]=zr*Ee-At*ve,H},e.ae=function(H){var R=new Qa(16);return R[0]=H[0],R[1]=H[1],R[2]=H[2],R[3]=H[3],R[4]=H[4],R[5]=H[5],R[6]=H[6],R[7]=H[7],R[8]=H[8],R[9]=H[9],R[10]=H[10],R[11]=H[11],R[12]=H[12],R[13]=H[13],R[14]=H[14],R[15]=H[15],R},e.af=hn,e.ag=function(H,R){let J=0,ve=0;if(H.kind==="constant")ve=H.layoutSize;else if(H.kind!=="source"){let{interpolationType:Ee,minZoom:Be,maxZoom:Ge}=H,ct=Ee?w(ao.interpolationFactor(Ee,R,Be,Ge),0,1):0;H.kind==="camera"?ve=En.number(H.minSize,H.maxSize,ct):J=ct}return{uSizeT:J,uSize:ve}},e.ai=function(H,{uSize:R,uSizeT:J},{lowerSize:ve,upperSize:Ee}){return H.kind==="source"?ve/yd:H.kind==="composite"?En.number(ve/yd,Ee/yd,J):R},e.aj=z1,e.ak=function(H,R,J,ve){let Ee=R.y-H.y,Be=R.x-H.x,Ge=ve.y-J.y,ct=ve.x-J.x,At=Ge*Be-ct*Ee;if(At===0)return null;let Nt=(ct*(H.y-J.y)-Ge*(H.x-J.x))/At;return new i(H.x+Nt*Be,H.y+Nt*Ee)},e.al=Zx,e.am=_c,e.an=di,e.ao=function(H){let R=1/0,J=1/0,ve=-1/0,Ee=-1/0;for(let Be of H)R=Math.min(R,Be.x),J=Math.min(J,Be.y),ve=Math.max(ve,Be.x),Ee=Math.max(Ee,Be.y);return[R,J,ve,Ee]},e.ap=hu,e.ar=D1,e.as=function(H,R){var J=R[0],ve=R[1],Ee=R[2],Be=R[3],Ge=R[4],ct=R[5],At=R[6],Nt=R[7],ar=R[8],Mr=R[9],zr=R[10],Wr=R[11],ia=R[12],fa=R[13],ja=R[14],Ka=R[15],Wi=J*ct-ve*Ge,gi=J*At-Ee*Ge,qi=J*Nt-Be*Ge,en=ve*At-Ee*ct,jn=ve*Nt-Be*ct,Lo=Ee*Nt-Be*At,xs=ar*fa-Mr*ia,vo=ar*ja-zr*ia,zn=ar*Ka-Wr*ia,is=Mr*ja-zr*fa,qo=Mr*Ka-Wr*fa,Bo=zr*Ka-Wr*ja,xn=Wi*Bo-gi*qo+qi*is+en*zn-jn*vo+Lo*xs;return xn?(H[0]=(ct*Bo-At*qo+Nt*is)*(xn=1/xn),H[1]=(Ee*qo-ve*Bo-Be*is)*xn,H[2]=(fa*Lo-ja*jn+Ka*en)*xn,H[3]=(zr*jn-Mr*Lo-Wr*en)*xn,H[4]=(At*zn-Ge*Bo-Nt*vo)*xn,H[5]=(J*Bo-Ee*zn+Be*vo)*xn,H[6]=(ja*qi-ia*Lo-Ka*gi)*xn,H[7]=(ar*Lo-zr*qi+Wr*gi)*xn,H[8]=(Ge*qo-ct*zn+Nt*xs)*xn,H[9]=(ve*zn-J*qo-Be*xs)*xn,H[10]=(ia*jn-fa*qi+Ka*Wi)*xn,H[11]=(Mr*qi-ar*jn-Wr*Wi)*xn,H[12]=(ct*vo-Ge*is-At*xs)*xn,H[13]=(J*is-ve*vo+Ee*xs)*xn,H[14]=(fa*gi-ia*en-ja*Wi)*xn,H[15]=(ar*en-Mr*gi+zr*Wi)*xn,H):null},e.at=W1,e.au=Mg,e.av=X1,e.aw=function(){let H={},R=te.$version;for(let J in te.$root){let ve=te.$root[J];if(ve.required){let Ee=null;Ee=J==="version"?R:ve.type==="array"?[]:{},Ee!=null&&(H[J]=Ee)}}return H},e.ax=Tn,e.ay=Y,e.az=function(H){H=H.slice();let R=Object.create(null);for(let J=0;J25||ve<0||ve>=1||J<0||J>=1)},e.bc=function(H,R){return H[0]=R[0],H[1]=0,H[2]=0,H[3]=0,H[4]=0,H[5]=R[1],H[6]=0,H[7]=0,H[8]=0,H[9]=0,H[10]=R[2],H[11]=0,H[12]=0,H[13]=0,H[14]=0,H[15]=1,H},e.bd=class extends $t{},e.be=j1,e.bf=sA,e.bh=de,e.bi=function(H,R){$.REGISTERED_PROTOCOLS[H]=R},e.bj=function(H){delete $.REGISTERED_PROTOCOLS[H]},e.bk=function(H,R){let J={};for(let Ee=0;EeBo*hu)}let vo=Ge?"center":J.get("text-justify").evaluate(Nt,{},H.canonical),zn=J.get("symbol-placement")==="point"?J.get("text-max-width").evaluate(Nt,{},H.canonical)*hu:1/0,is=()=>{H.bucket.allowVerticalPlacement&&yo(qi)&&(ia.vertical=M0(fa,H.glyphMap,H.glyphPositions,H.imagePositions,ar,zn,Be,Lo,"left",jn,Ka,e.ah.vertical,!0,zr,Mr))};if(!Ge&&xs){let qo=new Set;if(vo==="auto")for(let xn=0;xnt(void 0,void 0,void 0,function*(){if(H.byteLength===0)return createImageBitmap(new ImageData(1,1));let R=new Blob([new Uint8Array(H)],{type:"image/png"});try{return createImageBitmap(R)}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=E,e.f=H=>new Promise((R,J)=>{let ve=new Image;ve.onload=()=>{R(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(H)],{type:"image/png"});ve.src=H.byteLength?URL.createObjectURL(Ee):N}),e.g=ue,e.h=(H,R)=>X(E(H,{type:"json"}),R),e.i=P,e.j=j,e.k=ae,e.l=(H,R)=>X(E(H,{type:"arrayBuffer"}),R),e.m=X,e.n=function(H){return new P1(H).readFields(mk,[])},e.o=Rn,e.p=R1,e.q=Oe,e.r=Ci,e.s=Q,e.t=Pi,e.u=li,e.v=te,e.w=y,e.x=function([H,R,J]){return R+=90,R*=Math.PI/180,J*=Math.PI/180,{x:H*Math.cos(R)*Math.sin(J),y:H*Math.sin(R)*Math.sin(J),z:H*Math.cos(J)}},e.y=En,e.z=Fs}),S("worker",["./shared"],function(e){"use strict";class t{constructor(Fe){this.keyCache={},Fe&&this.replace(Fe)}replace(Fe){this._layerConfigs={},this._layers={},this.update(Fe,[])}update(Fe,Ye){for(let Le of Fe){this._layerConfigs[Le.id]=Le;let We=this._layers[Le.id]=e.aA(Le);We._featureFilter=e.a7(We.filter),this.keyCache[Le.id]&&delete this.keyCache[Le.id]}for(let Le of Ye)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 We=Le.map(Pt=>this._layers[Pt.id]),Ke=We[0];if(Ke.visibility==="none")continue;let st=Ke.source||"",ot=this.familiesBySource[st];ot||(ot=this.familiesBySource[st]={});let Ut=Ke.sourceLayer||"_geojsonTileLayer",Ct=ot[Ut];Ct||(Ct=ot[Ut]=[]),Ct.push(We)}}}class r{constructor(Fe){let Ye={},Ae=[];for(let st in Fe){let ot=Fe[st],Ut=Ye[st]={};for(let Ct in ot){let Pt=ot[+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:We}=e.p(Ae),Ke=new e.o({width:Le||1,height:We||1});for(let st in Fe){let ot=Fe[st];for(let Ut in ot){let Ct=ot[+Ut];if(!Ct||Ct.bitmap.width===0||Ct.bitmap.height===0)continue;let Pt=Ye[st][Ut].rect;e.o.copy(Ct.bitmap,Ke,{x:0,y:0},{x:Pt.x+1,y:Pt.y+1},Ct.bitmap)}}this.image=Ke,this.positions=Ye}}e.bl("GlyphAtlas",r);class o{constructor(Fe){this.tileID=new e.S(Fe.tileID.overscaledZ,Fe.tileID.wrap,Fe.tileID.canonical.z,Fe.tileID.canonical.x,Fe.tileID.canonical.y),this.uid=Fe.uid,this.zoom=Fe.zoom,this.pixelRatio=Fe.pixelRatio,this.tileSize=Fe.tileSize,this.source=Fe.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=Fe.showCollisionBoxes,this.collectResourceTiming=!!Fe.collectResourceTiming,this.returnDependencies=!!Fe.returnDependencies,this.promoteId=Fe.promoteId,this.inFlightDependencies=[]}parse(Fe,Ye,Ae,Le){return e._(this,void 0,void 0,function*(){this.status="parsing",this.data=Fe,this.collisionBoxArray=new e.a5;let We=new e.bm(Object.keys(Fe.layers).sort()),Ke=new e.bn(this.tileID,this.promoteId);Ke.bucketLayerIDs=[];let st={},ot={featureIndex:Ke,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:Ae},Ut=Ye.familiesBySource[this.source];for(let Wa in Ut){let Ca=Fe.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=We.encode(Wa),wi=[];for(let Yt=0;Yt=Rt.maxzoom||Rt.visibility!=="none"&&(a(Yt,this.zoom,Ae),(st[Rt.id]=Rt.createBucket({index:Ke.bucketLayerIDs.length,layers:Yt,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:hi,sourceID:this.source})).populate(wi,ot,this.tileID.canonical),Ke.bucketLayerIDs.push(Yt.map(Zt=>Zt.id)))}}let Ct=e.aF(ot.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(ot.iconDependencies),cr=Promise.resolve({});if(jt.length){let Wa=new AbortController;this.inFlightDependencies.push(Wa),cr=Le.sendAsync({type:"GI",data:{icons:jt,source:this.source,tileID:this.tileID,type:"icons"}},Wa)}let or=Object.keys(ot.patternDependencies),nr=Promise.resolve({});if(or.length){let Wa=new AbortController;this.inFlightDependencies.push(Wa),nr=Le.sendAsync({type:"GI",data:{icons:or,source:this.source,tileID:this.tileID,type:"patterns"}},Wa)}let[Pr,_a,Fa]=yield Promise.all([Pt,cr,nr]),Ra=new r(Pr),qa=new e.bo(_a,Fa);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:Ra.positions,imageMap:_a,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(ot,this.tileID.canonical,qa.patternPositions))}return this.status="done",{buckets:Object.values(st).filter(Wa=>!Wa.isEmpty()),featureIndex:Ke,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:Ra.image,imageAtlas:qa,glyphMap:this.returnDependencies?Pr:null,iconMap:this.returnDependencies?_a:null,glyphPositions:this.returnDependencies?Ra.positions:null}})}}function a(_t,Fe,Ye){let Ae=new e.z(Fe);for(let Le of _t)Le.recalculate(Ae,Ye)}class i{constructor(Fe,Ye,Ae){this.actor=Fe,this.layerIndex=Ye,this.availableImages=Ae,this.fetching={},this.loading={},this.loaded={}}loadVectorTile(Fe,Ye){return e._(this,void 0,void 0,function*(){let Ae=yield e.l(Fe.request,Ye);try{return{vectorTile:new e.bt.VectorTile(new e.bu(Ae.data)),rawData:Ae.data,cacheControl:Ae.cacheControl,expires:Ae.expires}}catch(Le){let We=new Uint8Array(Ae.data),Ke=`Unable to parse the tile at ${Fe.request.url}, `;throw Ke+=We[0]===31&&We[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(Ke)}})}loadTile(Fe){return e._(this,void 0,void 0,function*(){let Ye=Fe.uid,Ae=!!(Fe&&Fe.request&&Fe.request.collectResourceTiming)&&new e.bv(Fe.request),Le=new o(Fe);this.loading[Ye]=Le;let We=new AbortController;Le.abort=We;try{let Ke=yield this.loadVectorTile(Fe,We);if(delete this.loading[Ye],!Ke)return null;let st=Ke.rawData,ot={};Ke.expires&&(ot.expires=Ke.expires),Ke.cacheControl&&(ot.cacheControl=Ke.cacheControl);let Ut={};if(Ae){let Pt=Ae.finish();Pt&&(Ut.resourceTiming=JSON.parse(JSON.stringify(Pt)))}Le.vectorTile=Ke.vectorTile;let Ct=Le.parse(Ke.vectorTile,this.layerIndex,this.availableImages,this.actor);this.loaded[Ye]=Le,this.fetching[Ye]={rawTileData:st,cacheControl:ot,resourceTiming:Ut};try{let Pt=yield Ct;return e.e({rawTileData:st.slice(0)},Pt,ot,Ut)}finally{delete this.fetching[Ye]}}catch(Ke){throw delete this.loading[Ye],Le.status="done",this.loaded[Ye]=Le,Ke}})}reloadTile(Fe){return e._(this,void 0,void 0,function*(){let Ye=Fe.uid;if(!this.loaded||!this.loaded[Ye])throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");let Ae=this.loaded[Ye];if(Ae.showCollisionBoxes=Fe.showCollisionBoxes,Ae.status==="parsing"){let Le=yield Ae.parse(Ae.vectorTile,this.layerIndex,this.availableImages,this.actor),We;if(this.fetching[Ye]){let{rawTileData:Ke,cacheControl:st,resourceTiming:ot}=this.fetching[Ye];delete this.fetching[Ye],We=e.e({rawTileData:Ke.slice(0)},Le,st,ot)}else We=Le;return We}if(Ae.status==="done"&&Ae.vectorTile)return Ae.parse(Ae.vectorTile,this.layerIndex,this.availableImages,this.actor)})}abortTile(Fe){return e._(this,void 0,void 0,function*(){let Ye=this.loading,Ae=Fe.uid;Ye&&Ye[Ae]&&Ye[Ae].abort&&(Ye[Ae].abort.abort(),delete Ye[Ae])})}removeTile(Fe){return e._(this,void 0,void 0,function*(){this.loaded&&this.loaded[Fe.uid]&&delete this.loaded[Fe.uid]})}}class n{constructor(){this.loaded={}}loadTile(Fe){return e._(this,void 0,void 0,function*(){let{uid:Ye,encoding:Ae,rawImageData:Le,redFactor:We,greenFactor:Ke,blueFactor:st,baseShift:ot}=Fe,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(Ye,Pt,Ae,We,Ke,st,ot);return this.loaded=this.loaded||{},this.loaded[Ye]=jt,jt})}removeTile(Fe){let Ye=this.loaded,Ae=Fe.uid;Ye&&Ye[Ae]&&delete Ye[Ae]}}function s(_t,Fe){if(_t.length!==0){h(_t[0],Fe);for(var Ye=1;Ye<_t.length;Ye++)h(_t[Ye],!Fe)}}function h(_t,Fe){for(var Ye=0,Ae=0,Le=0,We=_t.length,Ke=We-1;Le=Math.abs(st)?Ye-ot+st:st-ot+Ye,Ye=ot}Ye+Ae>=0!=!!Fe&&_t.reverse()}var f=e.by(function _t(Fe,Ye){var Ae,Le=Fe&&Fe.type;if(Le==="FeatureCollection")for(Ae=0;Ae>31}function P(_t,Fe){for(var Ye=_t.loadGeometry(),Ae=_t.type,Le=0,We=0,Ke=Ye.length,st=0;st_t},O=Math.fround||(L=new Float32Array(1),_t=>(L[0]=+_t,L[0]));var L;let U=3,B=5,W=6;class ${constructor(Fe){this.options=Object.assign(Object.create(N),Fe),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(Fe){let{log:Ye,minZoom:Ae,maxZoom:Le}=this.options;Ye&&console.time("total time");let We=`prepare ${Fe.length} points`;Ye&&console.time(We),this.points=Fe;let Ke=[];for(let ot=0;ot=Ae;ot--){let Ut=+Date.now();st=this.trees[ot]=this._createTree(this._cluster(st,ot)),Ye&&console.log("z%d: %d clusters in %dms",ot,st.numItems,+Date.now()-Ut)}return Ye&&console.timeEnd("total time"),this}getClusters(Fe,Ye){let Ae=((Fe[0]+180)%360+360)%360-180,Le=Math.max(-90,Math.min(90,Fe[1])),We=Fe[2]===180?180:((Fe[2]+180)%360+360)%360-180,Ke=Math.max(-90,Math.min(90,Fe[3]));if(Fe[2]-Fe[0]>=360)Ae=-180,We=180;else if(Ae>We){let Pt=this.getClusters([Ae,Le,180,Ke],Ye),jt=this.getClusters([-180,Le,We,Ke],Ye);return Pt.concat(jt)}let st=this.trees[this._limitZoom(Ye)],ot=st.range(de(Ae),Y(Ke),de(We),Y(Le)),Ut=st.data,Ct=[];for(let Pt of ot){let jt=this.stride*Pt;Ct.push(Ut[jt+B]>1?ue(Ut,jt,this.clusterProps):this.points[Ut[jt+U]])}return Ct}getChildren(Fe){let Ye=this._getOriginId(Fe),Ae=this._getOriginZoom(Fe),Le="No cluster with the specified id.",We=this.trees[Ae];if(!We)throw new Error(Le);let Ke=We.data;if(Ye*this.stride>=Ke.length)throw new Error(Le);let st=this.options.radius/(this.options.extent*Math.pow(2,Ae-1)),ot=We.within(Ke[Ye*this.stride],Ke[Ye*this.stride+1],st),Ut=[];for(let Ct of ot){let Pt=Ct*this.stride;Ke[Pt+4]===Fe&&Ut.push(Ke[Pt+B]>1?ue(Ke,Pt,this.clusterProps):this.points[Ke[Pt+U]])}if(Ut.length===0)throw new Error(Le);return Ut}getLeaves(Fe,Ye,Ae){let Le=[];return this._appendLeaves(Le,Fe,Ye=Ye||10,Ae=Ae||0,0),Le}getTile(Fe,Ye,Ae){let Le=this.trees[this._limitZoom(Fe)],We=Math.pow(2,Fe),{extent:Ke,radius:st}=this.options,ot=st/Ke,Ut=(Ae-ot)/We,Ct=(Ae+1+ot)/We,Pt={features:[]};return this._addTileFeatures(Le.range((Ye-ot)/We,Ut,(Ye+1+ot)/We,Ct),Le.data,Ye,Ae,We,Pt),Ye===0&&this._addTileFeatures(Le.range(1-ot/We,Ut,1,Ct),Le.data,We,Ae,We,Pt),Ye===We-1&&this._addTileFeatures(Le.range(0,Ut,ot/We,Ct),Le.data,-1,Ae,We,Pt),Pt.features.length?Pt:null}getClusterExpansionZoom(Fe){let Ye=this._getOriginZoom(Fe)-1;for(;Ye<=this.options.maxZoom;){let Ae=this.getChildren(Fe);if(Ye++,Ae.length!==1)break;Fe=Ae[0].properties.cluster_id}return Ye}_appendLeaves(Fe,Ye,Ae,Le,We){let Ke=this.getChildren(Ye);for(let st of Ke){let ot=st.properties;if(ot&&ot.cluster?We+ot.point_count<=Le?We+=ot.point_count:We=this._appendLeaves(Fe,ot.cluster_id,Ae,Le,We):We1,Ct,Pt,jt;if(Ut)Ct=ce(Ye,ot,this.clusterProps),Pt=Ye[ot],jt=Ye[ot+1];else{let nr=this.points[Ye[ot+U]];Ct=nr.properties;let[Pr,_a]=nr.geometry.coordinates;Pt=de(Pr),jt=Y(_a)}let cr={type:1,geometry:[[Math.round(this.options.extent*(Pt*We-Ae)),Math.round(this.options.extent*(jt*We-Le))]],tags:Ct},or;or=Ut||this.options.generateId?Ye[ot+U]:this.points[Ye[ot+U]].id,or!==void 0&&(cr.id=or),Ke.features.push(cr)}}_limitZoom(Fe){return Math.max(this.options.minZoom,Math.min(Math.floor(+Fe),this.options.maxZoom+1))}_cluster(Fe,Ye){let{radius:Ae,extent:Le,reduce:We,minPoints:Ke}=this.options,st=Ae/(Le*Math.pow(2,Ye)),ot=Fe.data,Ut=[],Ct=this.stride;for(let Pt=0;PtYe&&(Pr+=ot[Fa+B])}if(Pr>nr&&Pr>=Ke){let _a,Fa=jt*nr,Ra=cr*nr,qa=-1,Wa=((Pt/Ct|0)<<5)+(Ye+1)+this.points.length;for(let Ca of or){let hi=Ca*Ct;if(ot[hi+2]<=Ye)continue;ot[hi+2]=Ye;let wi=ot[hi+B];Fa+=ot[hi]*wi,Ra+=ot[hi+1]*wi,ot[hi+4]=Wa,We&&(_a||(_a=this._map(ot,Pt,!0),qa=this.clusterProps.length,this.clusterProps.push(_a)),We(_a,this._map(ot,hi)))}ot[Pt+4]=Wa,Ut.push(Fa/Pr,Ra/Pr,1/0,Wa,-1,Pr),We&&Ut.push(qa)}else{for(let _a=0;_a1)for(let _a of or){let Fa=_a*Ct;if(!(ot[Fa+2]<=Ye)){ot[Fa+2]=Ye;for(let Ra=0;Ra>5}_getOriginZoom(Fe){return(Fe-this.points.length)%32}_map(Fe,Ye,Ae){if(Fe[Ye+B]>1){let Ke=this.clusterProps[Fe[Ye+W]];return Ae?Object.assign({},Ke):Ke}let Le=this.points[Fe[Ye+U]].properties,We=this.options.map(Le);return Ae&&We===Le?Object.assign({},We):We}}function ue(_t,Fe,Ye){return{type:"Feature",id:_t[Fe+U],properties:ce(_t,Fe,Ye),geometry:{type:"Point",coordinates:[(Ae=_t[Fe],360*(Ae-.5)),X(_t[Fe+1])]}};var Ae}function ce(_t,Fe,Ye){let Ae=_t[Fe+B],Le=Ae>=1e4?`${Math.round(Ae/1e3)}k`:Ae>=1e3?Math.round(Ae/100)/10+"k":Ae,We=_t[Fe+W],Ke=We===-1?{}:Object.assign({},Ye[We]);return Object.assign(Ke,{cluster:!0,cluster_id:_t[Fe+U],point_count:Ae,point_count_abbreviated:Le})}function de(_t){return _t/360+.5}function Y(_t){let Fe=Math.sin(_t*Math.PI/180),Ye=.5-.25*Math.log((1+Fe)/(1-Fe))/Math.PI;return Ye<0?0:Ye>1?1:Ye}function X(_t){let Fe=(180-360*_t)*Math.PI/180;return 360*Math.atan(Math.exp(Fe))/Math.PI-90}function Q(_t,Fe,Ye,Ae){let Le=Ae,We=Fe+(Ye-Fe>>1),Ke,st=Ye-Fe,ot=_t[Fe],Ut=_t[Fe+1],Ct=_t[Ye],Pt=_t[Ye+1];for(let jt=Fe+3;jtLe)Ke=jt,Le=cr;else if(cr===Le){let or=Math.abs(jt-We);orAe&&(Ke-Fe>3&&Q(_t,Fe,Ke,Ae),_t[Ke+2]=Le,Ye-Ke>3&&Q(_t,Ke,Ye,Ae))}function V(_t,Fe,Ye,Ae,Le,We){let Ke=Le-Ye,st=We-Ae;if(Ke!==0||st!==0){let ot=((_t-Ye)*Ke+(Fe-Ae)*st)/(Ke*Ke+st*st);ot>1?(Ye=Le,Ae=We):ot>0&&(Ye+=Ke*ot,Ae+=st*ot)}return Ke=_t-Ye,st=Fe-Ae,Ke*Ke+st*st}function le(_t,Fe,Ye,Ae){let Le={id:_t??null,type:Fe,geometry:Ye,tags:Ae,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};if(Fe==="Point"||Fe==="MultiPoint"||Fe==="LineString")ae(Le,Ye);else if(Fe==="Polygon")ae(Le,Ye[0]);else if(Fe==="MultiLineString")for(let We of Ye)ae(Le,We);else if(Fe==="MultiPolygon")for(let We of Ye)ae(Le,We[0]);return Le}function ae(_t,Fe){for(let Ye=0;Ye0&&(Ke+=Ae?(Le*Ct-Ut*We)/2:Math.sqrt(Math.pow(Ut-Le,2)+Math.pow(Ct-We,2))),Le=Ut,We=Ct}let st=Fe.length-3;Fe[2]=1,Q(Fe,0,st,Ye),Fe[st+2]=1,Fe.size=Math.abs(Ke),Fe.start=0,Fe.end=Fe.size}function pe(_t,Fe,Ye,Ae){for(let Le=0;Le<_t.length;Le++){let We=[];te(_t[Le],We,Ye,Ae),Fe.push(We)}}function we(_t){return _t/360+.5}function Se(_t){let Fe=Math.sin(_t*Math.PI/180),Ye=.5-.25*Math.log((1+Fe)/(1-Fe))/Math.PI;return Ye<0?0:Ye>1?1:Ye}function Re(_t,Fe,Ye,Ae,Le,We,Ke,st){if(Ae/=Fe,We>=(Ye/=Fe)&&Ke=Ae)return null;let ot=[];for(let Ut of _t){let Ct=Ut.geometry,Pt=Ut.type,jt=Le===0?Ut.minX:Ut.minY,cr=Le===0?Ut.maxX:Ut.maxY;if(jt>=Ye&&cr=Ae)continue;let or=[];if(Pt==="Point"||Pt==="MultiPoint")Pe(Ct,or,Ye,Ae,Le);else if(Pt==="LineString")je(Ct,or,Ye,Ae,Le,!1,st.lineMetrics);else if(Pt==="MultiLineString")nt(Ct,or,Ye,Ae,Le,!1);else if(Pt==="Polygon")nt(Ct,or,Ye,Ae,Le,!0);else if(Pt==="MultiPolygon")for(let nr of Ct){let Pr=[];nt(nr,Pr,Ye,Ae,Le,!0),Pr.length&&or.push(Pr)}if(or.length){if(st.lineMetrics&&Pt==="LineString"){for(let nr of or)ot.push(le(Ut.id,Pt,nr,Ut.tags));continue}Pt!=="LineString"&&Pt!=="MultiLineString"||(or.length===1?(Pt="LineString",or=or[0]):Pt="MultiLineString"),Pt!=="Point"&&Pt!=="MultiPoint"||(Pt=or.length===3?"Point":"MultiPoint"),ot.push(le(Ut.id,Pt,or,Ut.tags))}}return ot.length?ot:null}function Pe(_t,Fe,Ye,Ae,Le){for(let We=0;We<_t.length;We+=3){let Ke=_t[We+Le];Ke>=Ye&&Ke<=Ae&&tt(Fe,_t[We],_t[We+1],_t[We+2])}}function je(_t,Fe,Ye,Ae,Le,We,Ke){let st=at(_t),ot=Le===0?Ve:he,Ut,Ct,Pt=_t.start;for(let Pr=0;Pr<_t.length-3;Pr+=3){let _a=_t[Pr],Fa=_t[Pr+1],Ra=_t[Pr+2],qa=_t[Pr+3],Wa=_t[Pr+4],Ca=Le===0?_a:Fa,hi=Le===0?qa:Wa,wi=!1;Ke&&(Ut=Math.sqrt(Math.pow(_a-qa,2)+Math.pow(Fa-Wa,2))),CaYe&&(Ct=ot(st,_a,Fa,qa,Wa,Ye),Ke&&(st.start=Pt+Ut*Ct)):Ca>Ae?hi=Ye&&(Ct=ot(st,_a,Fa,qa,Wa,Ye),wi=!0),hi>Ae&&Ca<=Ae&&(Ct=ot(st,_a,Fa,qa,Wa,Ae),wi=!0),!We&&wi&&(Ke&&(st.end=Pt+Ut*Ct),Fe.push(st),st=at(_t)),Ke&&(Pt+=Ut)}let jt=_t.length-3,cr=_t[jt],or=_t[jt+1],nr=Le===0?cr:or;nr>=Ye&&nr<=Ae&&tt(st,cr,or,_t[jt+2]),jt=st.length-3,We&&jt>=3&&(st[jt]!==st[0]||st[jt+1]!==st[1])&&tt(st,st[0],st[1],st[2]),st.length&&Fe.push(st)}function at(_t){let Fe=[];return Fe.size=_t.size,Fe.start=_t.start,Fe.end=_t.end,Fe}function nt(_t,Fe,Ye,Ae,Le,We){for(let Ke of _t)je(Ke,Fe,Ye,Ae,Le,We,!1)}function tt(_t,Fe,Ye,Ae){_t.push(Fe,Ye,Ae)}function Ve(_t,Fe,Ye,Ae,Le,We){let Ke=(We-Fe)/(Ae-Fe);return tt(_t,We,Ye+(Le-Ye)*Ke,1),Ke}function he(_t,Fe,Ye,Ae,Le,We){let Ke=(We-Ye)/(Le-Ye);return tt(_t,Fe+(Ae-Fe)*Ke,We,1),Ke}function se(_t,Fe){let Ye=[];for(let Ae=0;Ae<_t.length;Ae++){let Le=_t[Ae],We=Le.type,Ke;if(We==="Point"||We==="MultiPoint"||We==="LineString")Ke=ne(Le.geometry,Fe);else if(We==="MultiLineString"||We==="Polygon"){Ke=[];for(let st of Le.geometry)Ke.push(ne(st,Fe))}else if(We==="MultiPolygon"){Ke=[];for(let st of Le.geometry){let ot=[];for(let Ut of st)ot.push(ne(Ut,Fe));Ke.push(ot)}}Ye.push(le(Le.id,We,Ke,Le.tags))}return Ye}function ne(_t,Fe){let Ye=[];Ye.size=_t.size,_t.start!==void 0&&(Ye.start=_t.start,Ye.end=_t.end);for(let Ae=0;Ae<_t.length;Ae+=3)Ye.push(_t[Ae]+Fe,_t[Ae+1],_t[Ae+2]);return Ye}function Ce(_t,Fe){if(_t.transformed)return _t;let Ye=1<<_t.z,Ae=_t.x,Le=_t.y;for(let We of _t.features){let Ke=We.geometry,st=We.type;if(We.geometry=[],st===1)for(let ot=0;ot0&&Fe.size<(Le?Ke:Ae))return void(Ye.numPoints+=Fe.length/3);let st=[];for(let ot=0;otKe)&&(Ye.numSimplified++,st.push(Fe[ot],Fe[ot+1])),Ye.numPoints++;Le&&function(ot,Ut){let Ct=0;for(let Pt=0,jt=ot.length,cr=jt-2;Pt0===Ut)for(let Pt=0,jt=ot.length;Pt24)throw new Error("maxZoom should be in the 0-24 range");if(Ye.promoteId&&Ye.generateId)throw new Error("promoteId and generateId cannot be used together.");let Le=function(We,Ke){let st=[];if(We.type==="FeatureCollection")for(let ot=0;ot1&&console.time("creation"),cr=this.tiles[jt]=rt(Fe,Ye,Ae,Le,Ut),this.tileCoords.push({z:Ye,x:Ae,y:Le}),Ct)){Ct>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",Ye,Ae,Le,cr.numFeatures,cr.numPoints,cr.numSimplified),console.timeEnd("creation"));let wi=`z${Ye}`;this.stats[wi]=(this.stats[wi]||0)+1,this.total++}if(cr.source=Fe,We==null){if(Ye===Ut.indexMaxZoom||cr.numPoints<=Ut.indexMaxPoints)continue}else{if(Ye===Ut.maxZoom||Ye===We)continue;if(We!=null){let wi=We-Ye;if(Ae!==Ke>>wi||Le!==st>>wi)continue}}if(cr.source=null,Fe.length===0)continue;Ct>1&&console.time("clipping");let or=.5*Ut.buffer/Ut.extent,nr=.5-or,Pr=.5+or,_a=1+or,Fa=null,Ra=null,qa=null,Wa=null,Ca=Re(Fe,Pt,Ae-or,Ae+Pr,0,cr.minX,cr.maxX,Ut),hi=Re(Fe,Pt,Ae+nr,Ae+_a,0,cr.minX,cr.maxX,Ut);Fe=null,Ca&&(Fa=Re(Ca,Pt,Le-or,Le+Pr,1,cr.minY,cr.maxY,Ut),Ra=Re(Ca,Pt,Le+nr,Le+_a,1,cr.minY,cr.maxY,Ut),Ca=null),hi&&(qa=Re(hi,Pt,Le-or,Le+Pr,1,cr.minY,cr.maxY,Ut),Wa=Re(hi,Pt,Le+nr,Le+_a,1,cr.minY,cr.maxY,Ut),hi=null),Ct>1&&console.timeEnd("clipping"),ot.push(Fa||[],Ye+1,2*Ae,2*Le),ot.push(Ra||[],Ye+1,2*Ae,2*Le+1),ot.push(qa||[],Ye+1,2*Ae+1,2*Le),ot.push(Wa||[],Ye+1,2*Ae+1,2*Le+1)}}getTile(Fe,Ye,Ae){Fe=+Fe,Ye=+Ye,Ae=+Ae;let Le=this.options,{extent:We,debug:Ke}=Le;if(Fe<0||Fe>24)return null;let st=1<1&&console.log("drilling down to z%d-%d-%d",Fe,Ye,Ae);let Ut,Ct=Fe,Pt=Ye,jt=Ae;for(;!Ut&&Ct>0;)Ct--,Pt>>=1,jt>>=1,Ut=this.tiles[Vt(Ct,Pt,jt)];return Ut&&Ut.source?(Ke>1&&(console.log("found parent tile z%d-%d-%d",Ct,Pt,jt),console.time("drilling down")),this.splitTile(Ut.source,Ct,Pt,jt,Fe,Ye,Ae),Ke>1&&console.timeEnd("drilling down"),this.tiles[ot]?Ce(this.tiles[ot],We):null):null}}function Vt(_t,Fe,Ye){return 32*((1<<_t)*Ye+Fe)+_t}function Ar(_t,Fe){return Fe?_t.properties[Fe]:_t.id}function vr(_t,Fe){if(_t==null)return!0;if(_t.type==="Feature")return Ar(_t,Fe)!=null;if(_t.type==="FeatureCollection"){let Ye=new Set;for(let Ae of _t.features){let Le=Ar(Ae,Fe);if(Le==null||Ye.has(Le))return!1;Ye.add(Le)}return!0}return!1}function qr(_t,Fe){let Ye=new Map;if(_t!=null)if(_t.type==="Feature")Ye.set(Ar(_t,Fe),_t);else for(let Ae of _t.features)Ye.set(Ar(Ae,Fe),Ae);return Ye}class kr extends i{constructor(){super(...arguments),this._dataUpdateable=new Map}loadVectorTile(Fe,Ye){return e._(this,void 0,void 0,function*(){let Ae=Fe.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 We=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(ot){this._feature=ot,this.extent=e.X,this.type=ot.type,this.properties=ot.tags,"id"in ot&&!isNaN(ot.id)&&(this.id=parseInt(ot.id,10))}loadGeometry(){if(this._feature.type===1){let ot=[];for(let Ut of this._feature.geometry)ot.push([new e.P(Ut[0],Ut[1])]);return ot}{let ot=[];for(let Ut of this._feature.geometry){let Ct=[];for(let Pt of Ut)Ct.push(new e.P(Pt[0],Pt[1]));ot.push(Ct)}return ot}}toGeoJSON(ot,Ut,Ct){return m.call(this,ot,Ut,Ct)}}(this._features[st])}}(Le.features),Ke=F(We);return Ke.byteOffset===0&&Ke.byteLength===Ke.buffer.byteLength||(Ke=new Uint8Array(Ke)),{vectorTile:We,rawData:Ke.buffer}})}loadData(Fe){return e._(this,void 0,void 0,function*(){var Ye;(Ye=this._pendingRequest)===null||Ye===void 0||Ye.abort();let Ae=!!(Fe&&Fe.request&&Fe.request.collectResourceTiming)&&new e.bv(Fe.request);this._pendingRequest=new AbortController;try{this._pendingData=this.loadAndProcessGeoJSON(Fe,this._pendingRequest),this._geoJSONIndex=Fe.cluster?new $(function({superclusterOptions:Ke,clusterProperties:st}){if(!st||!Ke)return Ke;let ot={},Ut={},Ct={accumulated:null,zoom:0},Pt={properties:null},jt=Object.keys(st);for(let cr of jt){let[or,nr]=st[cr],Pr=e.bC(nr),_a=e.bC(typeof or=="string"?[or,["accumulated"],["get",cr]]:or);ot[cr]=Pr.value,Ut[cr]=_a.value}return Ke.map=cr=>{Pt.properties=cr;let or={};for(let nr of jt)or[nr]=ot[nr].evaluate(Ct,Pt);return or},Ke.reduce=(cr,or)=>{Pt.properties=or;for(let nr of jt)Ct.accumulated=cr[nr],cr[nr]=Ut[nr].evaluate(Ct,Pt)},Ke}(Fe)).load((yield this._pendingData).features):(Le=yield this._pendingData,new Bt(Le,Fe.geojsonVtOptions)),this.loaded={};let We={};if(Ae){let Ke=Ae.finish();Ke&&(We.resourceTiming={},We.resourceTiming[Fe.source]=JSON.parse(JSON.stringify(Ke)))}return We}catch(We){if(delete this._pendingRequest,e.bB(We))return{abandoned:!0};throw We}var Le})}getData(){return e._(this,void 0,void 0,function*(){return this._pendingData})}reloadTile(Fe){let Ye=this.loaded;return Ye&&Ye[Fe.uid]?super.reloadTile(Fe):this.loadTile(Fe)}loadAndProcessGeoJSON(Fe,Ye){return e._(this,void 0,void 0,function*(){let Ae=yield this.loadGeoJSON(Fe,Ye);if(delete this._pendingRequest,typeof Ae!="object")throw new Error(`Input data given to '${Fe.source}' is not a valid GeoJSON object.`);if(f(Ae,!0),Fe.filter){let Le=e.bC(Fe.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(Le.result==="error")throw new Error(Le.value.map(Ke=>`${Ke.key}: ${Ke.message}`).join(", "));Ae={type:"FeatureCollection",features:Ae.features.filter(Ke=>Le.value.evaluate({zoom:0},Ke))}}return Ae})}loadGeoJSON(Fe,Ye){return e._(this,void 0,void 0,function*(){let{promoteId:Ae}=Fe;if(Fe.request){let Le=yield e.h(Fe.request,Ye);return this._dataUpdateable=vr(Le.data,Ae)?qr(Le.data,Ae):void 0,Le.data}if(typeof Fe.data=="string")try{let Le=JSON.parse(Fe.data);return this._dataUpdateable=vr(Le,Ae)?qr(Le,Ae):void 0,Le}catch{throw new Error(`Input data given to '${Fe.source}' is not a valid GeoJSON object.`)}if(!Fe.dataDiff)throw new Error(`Input data given to '${Fe.source}' is not a valid GeoJSON object.`);if(!this._dataUpdateable)throw new Error(`Cannot update existing geojson data in ${Fe.source}`);return function(Le,We,Ke){var st,ot,Ut,Ct;if(We.removeAll&&Le.clear(),We.remove)for(let Pt of We.remove)Le.delete(Pt);if(We.add)for(let Pt of We.add){let jt=Ar(Pt,Ke);jt!=null&&Le.set(jt,Pt)}if(We.update)for(let Pt of We.update){let jt=Le.get(Pt.id);if(jt==null)continue;let cr=!Pt.removeAllProperties&&(((st=Pt.removeProperties)===null||st===void 0?void 0:st.length)>0||((ot=Pt.addOrUpdateProperties)===null||ot===void 0?void 0:ot.length)>0);if((Pt.newGeometry||Pt.removeAllProperties||cr)&&(jt=Object.assign({},jt),Le.set(Pt.id,jt),cr&&(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 or of Pt.removeProperties)Object.prototype.hasOwnProperty.call(jt.properties,or)&&delete jt.properties[or];if(((Ct=Pt.addOrUpdateProperties)===null||Ct===void 0?void 0:Ct.length)>0)for(let{key:or,value:nr}of Pt.addOrUpdateProperties)jt.properties[or]=nr}}(this._dataUpdateable,Fe.dataDiff,Ae),{type:"FeatureCollection",features:Array.from(this._dataUpdateable.values())}})}removeSource(Fe){return e._(this,void 0,void 0,function*(){this._pendingRequest&&this._pendingRequest.abort()})}getClusterExpansionZoom(Fe){return this._geoJSONIndex.getClusterExpansionZoom(Fe.clusterId)}getClusterChildren(Fe){return this._geoJSONIndex.getChildren(Fe.clusterId)}getClusterLeaves(Fe){return this._geoJSONIndex.getLeaves(Fe.clusterId,Fe.limit,Fe.offset)}}class Ur{constructor(Fe){this.self=Fe,this.actor=new e.F(Fe),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.self.registerWorkerSource=(Ye,Ae)=>{if(this.externalWorkerSourceTypes[Ye])throw new Error(`Worker source with name "${Ye}" already registered.`);this.externalWorkerSourceTypes[Ye]=Ae},this.self.addProtocol=e.bi,this.self.removeProtocol=e.bj,this.self.registerRTLTextPlugin=Ye=>{if(e.bD.isParsed())throw new Error("RTL text plugin already registered.");e.bD.setMethods(Ye)},this.actor.registerMessageHandler("LDT",(Ye,Ae)=>this._getDEMWorkerSource(Ye,Ae.source).loadTile(Ae)),this.actor.registerMessageHandler("RDT",(Ye,Ae)=>e._(this,void 0,void 0,function*(){this._getDEMWorkerSource(Ye,Ae.source).removeTile(Ae)})),this.actor.registerMessageHandler("GCEZ",(Ye,Ae)=>e._(this,void 0,void 0,function*(){return this._getWorkerSource(Ye,Ae.type,Ae.source).getClusterExpansionZoom(Ae)})),this.actor.registerMessageHandler("GCC",(Ye,Ae)=>e._(this,void 0,void 0,function*(){return this._getWorkerSource(Ye,Ae.type,Ae.source).getClusterChildren(Ae)})),this.actor.registerMessageHandler("GCL",(Ye,Ae)=>e._(this,void 0,void 0,function*(){return this._getWorkerSource(Ye,Ae.type,Ae.source).getClusterLeaves(Ae)})),this.actor.registerMessageHandler("LD",(Ye,Ae)=>this._getWorkerSource(Ye,Ae.type,Ae.source).loadData(Ae)),this.actor.registerMessageHandler("GD",(Ye,Ae)=>this._getWorkerSource(Ye,Ae.type,Ae.source).getData()),this.actor.registerMessageHandler("LT",(Ye,Ae)=>this._getWorkerSource(Ye,Ae.type,Ae.source).loadTile(Ae)),this.actor.registerMessageHandler("RT",(Ye,Ae)=>this._getWorkerSource(Ye,Ae.type,Ae.source).reloadTile(Ae)),this.actor.registerMessageHandler("AT",(Ye,Ae)=>this._getWorkerSource(Ye,Ae.type,Ae.source).abortTile(Ae)),this.actor.registerMessageHandler("RMT",(Ye,Ae)=>this._getWorkerSource(Ye,Ae.type,Ae.source).removeTile(Ae)),this.actor.registerMessageHandler("RS",(Ye,Ae)=>e._(this,void 0,void 0,function*(){if(!this.workerSources[Ye]||!this.workerSources[Ye][Ae.type]||!this.workerSources[Ye][Ae.type][Ae.source])return;let Le=this.workerSources[Ye][Ae.type][Ae.source];delete this.workerSources[Ye][Ae.type][Ae.source],Le.removeSource!==void 0&&Le.removeSource(Ae)})),this.actor.registerMessageHandler("RM",Ye=>e._(this,void 0,void 0,function*(){delete this.layerIndexes[Ye],delete this.availableImages[Ye],delete this.workerSources[Ye],delete this.demWorkerSources[Ye]})),this.actor.registerMessageHandler("SR",(Ye,Ae)=>e._(this,void 0,void 0,function*(){this.referrer=Ae})),this.actor.registerMessageHandler("SRPS",(Ye,Ae)=>this._syncRTLPluginState(Ye,Ae)),this.actor.registerMessageHandler("IS",(Ye,Ae)=>e._(this,void 0,void 0,function*(){this.self.importScripts(Ae)})),this.actor.registerMessageHandler("SI",(Ye,Ae)=>this._setImages(Ye,Ae)),this.actor.registerMessageHandler("UL",(Ye,Ae)=>e._(this,void 0,void 0,function*(){this._getLayerIndex(Ye).update(Ae.layers,Ae.removedIds)})),this.actor.registerMessageHandler("SL",(Ye,Ae)=>e._(this,void 0,void 0,function*(){this._getLayerIndex(Ye).replace(Ae)}))}_setImages(Fe,Ye){return e._(this,void 0,void 0,function*(){this.availableImages[Fe]=Ye;for(let Ae in this.workerSources[Fe]){let Le=this.workerSources[Fe][Ae];for(let We in Le)Le[We].availableImages=Ye}})}_syncRTLPluginState(Fe,Ye){return e._(this,void 0,void 0,function*(){if(e.bD.isParsed())return e.bD.getState();if(Ye.pluginStatus!=="loading")return e.bD.setState(Ye),Ye;let Ae=Ye.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(Fe){let Ye=this.availableImages[Fe];return Ye||(Ye=[]),Ye}_getLayerIndex(Fe){let Ye=this.layerIndexes[Fe];return Ye||(Ye=this.layerIndexes[Fe]=new t),Ye}_getWorkerSource(Fe,Ye,Ae){if(this.workerSources[Fe]||(this.workerSources[Fe]={}),this.workerSources[Fe][Ye]||(this.workerSources[Fe][Ye]={}),!this.workerSources[Fe][Ye][Ae]){let Le={sendAsync:(We,Ke)=>(We.targetMapId=Fe,this.actor.sendAsync(We,Ke))};switch(Ye){case"vector":this.workerSources[Fe][Ye][Ae]=new i(Le,this._getLayerIndex(Fe),this._getAvailableImages(Fe));break;case"geojson":this.workerSources[Fe][Ye][Ae]=new kr(Le,this._getLayerIndex(Fe),this._getAvailableImages(Fe));break;default:this.workerSources[Fe][Ye][Ae]=new this.externalWorkerSourceTypes[Ye](Le,this._getLayerIndex(Fe),this._getAvailableImages(Fe))}}return this.workerSources[Fe][Ye][Ae]}_getDEMWorkerSource(Fe,Ye){return this.demWorkerSources[Fe]||(this.demWorkerSources[Fe]={}),this.demWorkerSources[Fe][Ye]||(this.demWorkerSources[Fe][Ye]=new n),this.demWorkerSources[Fe][Ye]}}return e.i(self)&&(self.worker=new Ur(self)),Ur}),S("index",["exports","./shared"],function(e,t){"use strict";var r="4.7.1";let o,a,i={now:typeof performance<"u"&&performance&&performance.now?performance.now.bind(performance):Date.now.bind(Date),frameAsync:Oe=>new Promise((I,ie)=>{let Te=requestAnimationFrame(I);Oe.signal.addEventListener("abort",()=>{cancelAnimationFrame(Te),ie(t.c())})}),getImageData(Oe,I=0){return this.getImageCanvasContext(Oe).getImageData(-I,-I,Oe.width+2*I,Oe.height+2*I)},getImageCanvasContext(Oe){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=Oe.width,I.height=Oe.height,ie.drawImage(Oe,0,0,Oe.width,Oe.height),ie},resolveURL:Oe=>(o||(o=document.createElement("a")),o.href=Oe,o.href),hardwareConcurrency:typeof navigator<"u"&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return!!matchMedia&&(a==null&&(a=matchMedia("(prefers-reduced-motion: reduce)")),a.matches)}};class n{static testProp(I){if(!n.docStyle)return I[0];for(let ie=0;ie{window.removeEventListener("click",n.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=n.getScale(I);return n.getPoint(I,Te,ie)}static touchPos(I,ie){let Te=[],Me=n.getScale(I);for(let ze=0;ze{h&&T(h),h=null,c=!0},f.onerror=()=>{m=!0,h=null},f.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA="),function(Oe){let I,ie,Te,Me;Oe.resetRequestQueue=()=>{I=[],ie=0,Te=0,Me={}},Oe.addThrottleControl=Ot=>{let $t=Te++;return Me[$t]=Ot,$t},Oe.removeThrottleControl=Ot=>{delete Me[Ot],ht()},Oe.getImage=(Ot,$t,Tr=!0)=>new Promise((Sr,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=>{Sr(na)}}),ht()});let ze=Ot=>t._(this,void 0,void 0,function*(){Ot.state="running";let{requestParameters:$t,supportImageRefresh:Tr,onError:Sr,onSuccess:Kr,abortController:na}=Ot,qe=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=qe?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(lt=pt.data,typeof createImageBitmap=="function"?t.d(lt):t.f(lt)),cacheControl:pt.cacheControl,expires:pt.expires})}catch(pt){delete Ot.abortController,Sr(pt)}finally{ie--,ht()}var lt}),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,Sr)=>{let Kr=new Image,na=Ot.url,qe=Ot.credentials;qe&&qe==="include"?Kr.crossOrigin="use-credentials":(qe&&qe==="same-origin"||!t.s(na))&&(Kr.crossOrigin="anonymous"),$t.signal.addEventListener("abort",()=>{Kr.src="",Sr(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||Sr(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 x{constructor(I){this._transformRequestFn=I}transformRequest(I,ie){return this._transformRequestFn&&this._transformRequestFn(I,ie)||{url:I}}setTransformRequest(I){this._transformRequestFn=I}}function w(Oe){var I=new t.A(3);return I[0]=Oe[0],I[1]=Oe[1],I[2]=Oe[2],I}var A,E=function(Oe,I,ie){return Oe[0]=I[0]-ie[0],Oe[1]=I[1]-ie[1],Oe[2]=I[2]-ie[2],Oe};A=new t.A(3),t.A!=Float32Array&&(A[0]=0,A[1]=0,A[2]=0);var p=function(Oe){var I=Oe[0],ie=Oe[1];return I*I+ie*ie};function b(Oe){let I=[];if(typeof Oe=="string")I.push({id:"default",url:Oe});else if(Oe&&Oe.length>0){let ie=[];for(let{id:Te,url:Me}of Oe){let ze=`${Te}${Me}`;ie.indexOf(ze)===-1&&(ie.push(ze),I.push({id:Te,url:Me}))}}return I}function d(Oe,I,ie){let Te=Oe.split("?");return Te[0]+=`${I}${ie}`,Te.join("?")}(function(){var Oe=new t.A(2);t.A!=Float32Array&&(Oe[0]=0,Oe[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 g(Oe){let{userImage:I}=Oe;return!!(I&&I.render&&I.render())&&(Oe.data.replace(new Uint8Array(I.data.buffer)),!0)}class y 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,Sr=$t.height;t.R.copy($t,Me,{x:0,y:0},{x:wt,y:Ot},{width:Tr,height:Sr}),t.R.copy($t,Me,{x:0,y:Sr-1},{x:wt,y:Ot-1},{width:Tr,height:1}),t.R.copy($t,Me,{x:0,y:0},{x:wt,y:Ot+Sr},{width:Tr,height:1}),t.R.copy($t,Me,{x:Tr-1,y:0},{x:wt-1,y:Ot},{width:1,height:Sr}),t.R.copy($t,Me,{x:0,y:0},{x:wt+Tr,y:Ot},{width:1,height:Sr})}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`),g(Te)&&this.updateImage(ie,Te)}}}let D=1e20;function P(Oe,I,ie,Te,Me,ze,ht,wt,Ot){for(let $t=I;$t-1);Ot++,ze[Ot]=wt,ht[Ot]=$t,ht[Ot+1]=D}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(Oe,I,ie,Te){return t._(this,void 0,void 0,function*(){let Me=256*I,ze=Me+255,ht=Te.transformRequest(ie.replace("{fontstack}",Oe).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:Oe=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=Oe+4*I,Ot=this._createCanvas(wt),$t=this.ctx=Ot.getContext("2d",{willReadFrequently:!0});$t.font=`${ht} ${ze} ${Oe}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(Oe){let I=document.createElement("canvas");return I.width=I.height=Oe,I}draw(Oe){let{width:I,actualBoundingBoxAscent:ie,actualBoundingBoxDescent:Te,actualBoundingBoxLeft:Me,actualBoundingBoxRight:ze}=this.ctx.measureText(Oe),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,Sr=Math.max($t*Tr,0),Kr=new Uint8ClampedArray(Sr),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:qe,buffer:$e,gridInner:lt,gridOuter:pt}=this;qe.clearRect($e,$e,wt,Ot),qe.fillText(Oe,$e,$e+ht);let Et=qe.getImageData($e,$e,wt,Ot);pt.fill(D,0,Sr),lt.fill(0,0,Sr);for(let bt=0;bt0?Er*Er:0,lt[yr]=Er<0?Er*Er:0}}P(pt,0,0,$t,Tr,$t,this.f,this.v,this.z),P(lt,$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),Sr=Math.abs($t-Ot.right),Kr=Math.min(Tr,Sr),na,qe=ze/Te*(Me+1);if(Ot.isDash){let $e=Me-Math.abs(qe);na=Math.sqrt(Kr*Kr+$e*$e)}else na=Me-Math.sqrt(Kr*Kr+qe*qe);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(i.hardwareConcurrency/2),de,Y;function X(){return de||(de=new ue),de}ue.workerCount=t.C(globalThis)?Math.max(Math.min(ce,3),1):1;class Q{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 V(){return Y||(Y=new Q(X(),t.G),Y.registerMessageHandler("GR",(Oe,I,ie)=>t.m(I,ie))),Y}function le(Oe,I){let ie=t.H();return t.J(ie,ie,[1,1,0]),t.K(ie,ie,[.5*Oe.width,.5*Oe.height,1]),t.L(ie,ie,Oe.calculatePosMatrix(I.toUnwrapped()))}function ae(Oe,I,ie,Te,Me,ze){let ht=function(Sr,Kr,na){if(Sr)for(let qe of Sr){let $e=Kr[qe];if($e&&$e.source===na&&$e.type==="fill-extrusion")return!0}else for(let qe in Kr){let $e=Kr[qe];if($e.source===na&&$e.type==="fill-extrusion")return!0}return!1}(Me&&Me.layers,I,Oe.id),wt=ze.maxPitchScaleFactor(),Ot=Oe.tilesIn(Te,wt,ht);Ot.sort(j);let $t=[];for(let Sr of Ot)$t.push({wrappedTileID:Sr.tileID.wrapped().key,queryResults:Sr.tile.queryRenderedFeatures(I,ie,Oe._state,Sr.queryGeometry,Sr.cameraQueryGeometry,Sr.scale,Me,ze,wt,le(Oe.transform,Sr.tileID))});let Tr=function(Sr){let Kr={},na={};for(let qe of Sr){let $e=qe.queryResults,lt=qe.wrappedTileID,pt=na[lt]=na[lt]||{};for(let Et in $e){let bt=$e[Et],Dt=pt[Et]=pt[Et]||{},ur=Kr[Et]=Kr[Et]||[];for(let yr of bt)Dt[yr.featureIndex]||(Dt[yr.featureIndex]=!0,ur.push(yr))}}return Kr}($t);for(let Sr in Tr)Tr[Sr].forEach(Kr=>{let na=Kr.feature,qe=Oe.getFeatureState(na.layer["source-layer"],na.id);na.source=na.layer.source,na.layer["source-layer"]&&(na.sourceLayer=na.layer["source-layer"]),na.state=qe});return Tr}function j(Oe,I){let ie=Oe.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 ee(Oe,I,ie){return t._(this,void 0,void 0,function*(){let Te=Oe;if(Oe.url?Te=(yield t.h(I.transformRequest(Oe.url,"Source"),ie)).data:yield i.frameAsync(ie),!Te)return null;let Me=t.M(t.e(Te,Oe),["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 te{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 te))return Array.isArray(I)?I.length===4||I.every(Array.isArray)?this.extend(te.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 te?I:I&&new te(I)}static fromLngLat(I,ie=0){let Te=360*ie/40075017,Me=Te/Math.cos(Math.PI/180*I.lat);return new te(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 te(I,I.lng>ie.lng?new t.N(ie.lng+360,ie.lat):ie)}}class pe{constructor(I,ie,Te){this.bounds=te.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 ee(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 Re 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 i.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 je=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)),Sr=Math.pow(2,Tr);return new t.a1(Tr,Math.floor((ze+wt)/2*Sr),Math.floor((ht+Ot)/2*Sr))}(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,je.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,je.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,je.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 Ve={},he=Oe=>{switch(Oe){case"geojson":return Pe;case"image":return at;case"raster":return Se;case"raster-dem":return Re;case"vector":return we;case"video":return nt;case"canvas":return tt}return Ve[Oe]},se="RTLPluginLoaded";class ne extends t.E{constructor(){super(...arguments),this.status="unavailable",this.url=null,this.dispatcher=V()}_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=i.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(se))})}lazyLoad(){this.status==="unavailable"?this.status="requested":this.status==="deferred"&&this._requestImport()}}let Ce=null;function Ze(){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,Ze().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,Sr={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 St{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 Je(0,Me=>this._unloadTile(Me)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new St,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(Bt).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(Bt).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=i.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=i.now();for(let Sr of $t){let Kr=I[Sr],na=this._tiles[Sr];if(!na||na.fadeEndTime!==0&&na.fadeEndTime<=Tr)continue;let qe=this.findLoadedParent(Kr,ie),$e=this.findLoadedSibling(Kr),lt=qe||$e||null;lt&&(this._addTile(lt.tileID),wt[lt.tileID.key]=lt.tileID),Ot[Sr]=Kr}this._retainLoadedChildren(Ot,Me,Te,I);for(let Sr in wt)I[Sr]||(this._coveredTiles[Sr]=!0,I[Sr]=wt[Sr]);if(ht){let Sr={},Kr={};for(let na of ze)this._tiles[na.key].hasData()?Sr[na.key]=na:Kr[na.key]=na;for(let na in Kr){let qe=Kr[na].children(this._source.maxzoom);this._tiles[qe[0].key]&&this._tiles[qe[1].key]&&this._tiles[qe[2].key]&&this._tiles[qe[3].key]&&(Sr[qe[0].key]=I[qe[0].key]=qe[0],Sr[qe[1].key]=I[qe[1].key]=qe[1],Sr[qe[2].key]=I[qe[2].key]=qe[2],Sr[qe[3].key]=I[qe[3].key]=qe[3],delete Kr[na])}for(let na in Kr){let qe=Kr[na],$e=this.findLoadedParent(qe,this._source.minzoom),lt=this.findLoadedSibling(qe),pt=$e||lt||null;if(pt){Sr[pt.tileID.key]=I[pt.tileID.key]=pt.tileID;for(let Et in Sr)Sr[Et].isChildOf(pt.tileID)&&delete Sr[Et]}}for(let na in this._tiles)Sr[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 Sr of Te)if(Sr.canonical.z>this._source.minzoom){let Kr=Sr.scaledTo(Sr.canonical.z-1);Tr[Kr.key]=Kr;let na=Sr.scaledTo(Math.max(this._source.minzoom,Math.min(Sr.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);Vt(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 Sr=this._tiles[Tr];Sr.hasSymbolBuckets&&!Sr.holdingForFade()?Sr.setHoldDuration(this.map._fadeDuration):Sr.hasSymbolBuckets&&!Sr.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 Sr=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&&Sr&&(Tr=this._addTile(na)),Tr){let qe=Tr.hasData();if((qe||!(!((Te=this.map)===null||Te===void 0)&&Te.cancelPendingTileRequestsWhileZooming)||Sr)&&(Me[na.key]=na),Sr=Tr.wasRequested(),qe)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(qe=>ze.pointCoordinate(qe,this.terrain)),Ot=ht.map(qe=>ze.pointCoordinate(qe,this.terrain)),$t=this.getIds(),Tr=1/0,Sr=1/0,Kr=-1/0,na=-1/0;for(let qe of Ot)Tr=Math.min(Tr,qe.x),Sr=Math.min(Sr,qe.y),Kr=Math.max(Kr,qe.x),na=Math.max(na,qe.y);for(let qe=0;qe<$t.length;qe++){let $e=this._tiles[$t[qe]];if($e.holdingForFade())continue;let lt=$e.tileID,pt=Math.pow(2,ze.zoom-$e.tileID.overscaledZ),Et=ie*$e.queryPadding*t.X/$e.tileSize/pt,bt=[lt.getTilePoint(new t.Z(Tr,Sr)),lt.getTilePoint(new t.Z(Kr,na))];if(bt[0].x-Et=0&&bt[1].y+Et>=0){let Dt=wt.map(yr=>lt.getTilePoint(yr)),ur=Ot.map(yr=>lt.getTilePoint(yr));Me.push({tile:$e,tileID:lt,queryGeometry:Dt,cameraQueryGeometry:ur,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(Vt(this._source.type)){let I=i.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 Bt(Oe,I){let ie=Math.abs(2*Oe.wrap)-+(Oe.wrap<0),Te=Math.abs(2*I.wrap)-+(I.wrap<0);return Oe.overscaledZ-I.overscaledZ||Te-ie||I.canonical.y-Oe.canonical.y||I.canonical.x-Oe.canonical.x}function Vt(Oe){return Oe==="raster"||Oe==="image"||Oe==="video"}kt.maxOverzooming=10,kt.maxUnderzooming=3;class Ar{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 vr(Oe,I){let ie=!0;return Oe==="always"||Oe!=="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:Sr}=wt,Kr=this.boxCells[ze];if(Kr!==null){let qe=this.bboxes;for(let $e of Kr)if(!$t.box[$e]){$t.box[$e]=!0;let lt=4*$e,pt=this.boxKeys[$e];if(I<=qe[lt+2]&&ie<=qe[lt+3]&&Te>=qe[lt+0]&&Me>=qe[lt+1]&&(!Ot||Ot(pt))&&(!Tr||!vr(Sr,pt.overlapMode))&&(ht.push({key:pt,x1:qe[lt],y1:qe[lt+1],x2:qe[lt+2],y2:qe[lt+3]}),Tr))return!0}}let na=this.circleCells[ze];if(na!==null){let qe=this.circles;for(let $e of na)if(!$t.circle[$e]){$t.circle[$e]=!0;let lt=3*$e,pt=this.circleKeys[$e];if(this._circleAndRectCollide(qe[lt],qe[lt+1],qe[lt+2],I,ie,Te,Me)&&(!Ot||Ot(pt))&&(!Tr||!vr(Sr,pt.overlapMode))){let Et=qe[lt],bt=qe[lt+1],Dt=qe[lt+2];if(ht.push({key:pt,x1:Et-Dt,y1:bt-Dt,x2:Et+Dt,y2:bt+Dt}),Tr)return!0}}}return!1}_queryCellCircle(I,ie,Te,Me,ze,ht,wt,Ot){let{circle:$t,seenUids:Tr,overlapMode:Sr}=wt,Kr=this.boxCells[ze];if(Kr!==null){let qe=this.bboxes;for(let $e of Kr)if(!Tr.box[$e]){Tr.box[$e]=!0;let lt=4*$e,pt=this.boxKeys[$e];if(this._circleAndRectCollide($t.x,$t.y,$t.radius,qe[lt+0],qe[lt+1],qe[lt+2],qe[lt+3])&&(!Ot||Ot(pt))&&!vr(Sr,pt.overlapMode))return ht.push(!0),!0}}let na=this.circleCells[ze];if(na!==null){let qe=this.circles;for(let $e of na)if(!Tr.circle[$e]){Tr.circle[$e]=!0;let lt=3*$e,pt=this.circleKeys[$e];if(this._circlesCollide(qe[lt],qe[lt+1],qe[lt+2],$t.x,$t.y,$t.radius)&&(!Ot||Ot(pt))&&!vr(Sr,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),Sr=this._convertToXCellCoord(Te),Kr=this._convertToYCellCoord(Me);for(let na=$t;na<=Sr;na++)for(let qe=Tr;qe<=Kr;qe++)if(ze.call(this,I,ie,Te,Me,this.xCellCount*qe+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,Sr=Math.abs(ie-(ze+Tr));if(Sr>Tr+Te)return!1;if($t<=Ot||Sr<=Tr)return!0;let Kr=$t-Ot,na=Sr-Tr;return Kr*Kr+na*na<=Te*Te}}function kr(Oe,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,Oe),ze}function Ur(Oe,I,ie,Te,Me){if(I){let ze=t.ae(Oe);return t.K(ze,ze,[Me,Me,1]),ie||t.ad(ze,ze,-Te.angle),ze}return Te.glCoordMatrix}function _t(Oe,I,ie,Te){let Me;Te?(Me=[Oe,I,Te(Oe,I),1],t.af(Me,Me,ie)):(Me=[Oe,I,0,1],nr(Me,Me,ie));let ze=Me[3];return{point:new t.P(Me[0]/ze,Me[1]/ze),signedDistanceFromCamera:ze,isOccluded:!1}}function Fe(Oe,I){return .5+Oe/I*.5}function Ye(Oe,I){return Oe.x>=-I[0]&&Oe.x<=I[0]&&Oe.y>=-I[1]&&Oe.y<=I[1]}function Ae(Oe,I,ie,Te,Me,ze,ht,wt,Ot,$t,Tr,Sr,Kr,na,qe){let $e=Te?Oe.textSizeData:Oe.iconSizeData,lt=t.ag($e,ie.transform.zoom),pt=[256/ie.width*2+1,256/ie.height*2+1],Et=Te?Oe.text.dynamicLayoutVertexArray:Oe.icon.dynamicLayoutVertexArray;Et.clear();let bt=Oe.lineVertexArray,Dt=Te?Oe.text.placedSymbolArray:Oe.icon.placedSymbolArray,ur=ie.transform.width/ie.transform.height,yr=!1;for(let Er=0;ErMath.abs(ie.x-I.x)*Te?{useVertical:!0}:(Oe===t.ah.vertical?I.yie.x)?{needsFlipping:!0}:null}function Ke(Oe,I,ie,Te,Me,ze,ht,wt,Ot,$t,Tr){let Sr=ie/24,Kr=I.lineOffsetX*Sr,na=I.lineOffsetY*Sr,qe;if(I.numGlyphs>1){let $e=I.glyphStartIndex+I.numGlyphs,lt=I.lineStartIndex,pt=I.lineStartIndex+I.lineLength,Et=Le(Sr,wt,Kr,na,Te,I,Tr,Oe);if(!Et)return{notEnoughRoom:!0};let bt=_t(Et.first.point.x,Et.first.point.y,ht,Oe.getElevation).point,Dt=_t(Et.last.point.x,Et.last.point.y,ht,Oe.getElevation).point;if(Me&&!Te){let ur=We(I.writingMode,bt,Dt,$t);if(ur)return ur}qe=[Et.first];for(let ur=I.glyphStartIndex+1;ur<$e-1;ur++)qe.push(jt(Sr*wt.getoffsetX(ur),Kr,na,Te,I.segment,lt,pt,Oe,Tr));qe.push(Et.last)}else{if(Me&&!Te){let lt=_t(Oe.tileAnchorPoint.x,Oe.tileAnchorPoint.y,ze,Oe.getElevation).point,pt=I.lineStartIndex+I.segment+1,Et=new t.P(Oe.lineVertexArray.getx(pt),Oe.lineVertexArray.gety(pt)),bt=_t(Et.x,Et.y,ze,Oe.getElevation),Dt=bt.signedDistanceFromCamera>0?bt.point:function(yr,Er,jr,Qr,ha,Aa){return st(yr,Er,jr,1,ha,Aa)}(Oe.tileAnchorPoint,Et,lt,0,ze,Oe),ur=We(I.writingMode,lt,Dt,$t);if(ur)return ur}let $e=jt(Sr*wt.getoffsetX(I.glyphStartIndex),Kr,na,Te,I.segment,I.lineStartIndex,I.lineStartIndex+I.lineLength,Oe,Tr);if(!$e||Oe.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};qe=[$e]}for(let $e of qe)t.aj(Ot,$e.point,$e.angle);return{}}function st(Oe,I,ie,Te,Me,ze){let ht=Oe.add(Oe.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 ot(Oe,I,ie){let Te=I.projectionCache;if(Te.projections[Oe])return Te.projections[Oe];let Me=new t.P(I.lineVertexArray.getx(Oe),I.lineVertexArray.gety(Oe)),ze=Ut(Me.x,Me.y,I);if(ze.signedDistanceFromCamera>0)return Te.projections[Oe]=ze.point,Te.anyProjectionOccluded=Te.anyProjectionOccluded||ze.isOccluded,ze.point;let ht=Oe-ie.direction;return function(wt,Ot,$t,Tr,Sr){return st(wt,Ot,$t,Tr,void 0,Sr)}(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(Oe,I,ie){let Te=Oe+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(Oe,I,ie){return Oe._unit()._perp()._mult(I*ie)}function Pt(Oe,I,ie,Te,Me,ze,ht,wt,Ot){if(wt.projectionCache.offsets[Oe])return wt.projectionCache.offsets[Oe];let $t=ie.add(I);if(Oe+Ot.direction=Me)return wt.projectionCache.offsets[Oe]=$t,$t;let Tr=ot(Oe+Ot.direction,wt,Ot),Sr=Ct(Tr.sub(ie),ht,Ot.direction),Kr=ie.add(Sr),na=Tr.add(Sr);return wt.projectionCache.offsets[Oe]=t.ak(ze,$t,Kr,na)||$t,wt.projectionCache.offsets[Oe]}function jt(Oe,I,ie,Te,Me,ze,ht,wt,Ot){let $t=Te?Oe-I:Oe+I,Tr=$t>0?1:-1,Sr=0;Te&&(Tr*=-1,Sr=Math.PI),Tr<0&&(Sr+=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 qe,$e,lt=Kr,pt=Kr,Et=0,bt=0,Dt=Math.abs($t),ur=[],yr;for(;Et+bt<=Dt;){if(na+=Tr,na=ht)return null;Et+=bt,pt=lt,$e=qe;let Qr={absOffsetX:Dt,direction:Tr,distanceFromAnchor:Et,previousVertex:pt};if(lt=ot(na,wt,Qr),ie===0)ur.push(pt),yr=lt.sub(pt);else{let ha,Aa=lt.sub(pt);ha=Aa.mag()===0?Ct(ot(na+Tr,wt,Qr).sub(lt),ie,Tr):Ct(Aa,ie,Tr),$e||($e=pt.add(ha)),qe=Pt(na,ha,lt,ze,ht,$e,ie,wt,Qr),ur.push($e),yr=qe.sub($e)}bt=yr.mag()}let Er=yr._mult((Dt-Et)/bt)._add($e||pt),jr=Sr+Math.atan2(lt.y-pt.y,lt.x-pt.x);return ur.push(Er),{point:Er,angle:Ot?jr:0,path:ur}}let cr=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function or(Oe,I){for(let ie=0;ie=1;Bn--)on.push(Vi.path[Bn]);for(let Bn=1;BnAo.signedDistanceFromCamera<=0)?[]:Bn.map(Ao=>Ao.point)}let Kn=[];if(on.length>0){let Bn=on[0].clone(),Ao=on[0].clone();for(let ls=1;ls=Aa.x&&Ao.x<=Da.x&&Bn.y>=Aa.y&&Ao.y<=Da.y?[on]:Ao.xDa.x||Ao.yDa.y?[]:t.al([on],Aa.x,Aa.y,Da.x,Da.y)}for(let Bn of Kn){ci.reset(Bn,.25*ha);let Ao=0;Ao=ci.length<=.5*ha?1:Math.ceil(ci.paddedLength/An)+1;for(let ls=0;ls_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 Sr=new t.P(Tr.x+Pr,Tr.y+Pr);Te=Math.min(Te,Sr.x),Me=Math.min(Me,Sr.y),ze=Math.max(ze,Sr.x),ht=Math.max(ht,Sr.y),ie.push(Sr)}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 Sr=Tr.key;if(Ot[Sr.bucketInstanceId]===void 0&&(Ot[Sr.bucketInstanceId]={}),Ot[Sr.bucketInstanceId][Sr.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[Sr.bucketInstanceId][Sr.featureIndex]=!0,$t[Sr.bucketInstanceId]===void 0&&($t[Sr.bucketInstanceId]=[]),$t[Sr.bucketInstanceId].push(Sr.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),Er=Qr.map(ha=>ha.point)}else jr=!0;return{box:t.ao(Er),allPointsOccluded:!jr}}}function Fa(Oe,I,ie){return I*(t.X/(Oe.tileSize*Math.pow(2,ie-Oe.tileID.overscaledZ)))}class Ra{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 Ra(I?I.text:null,ie,Te,ze),this.icon=new Ra(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 Yt(Oe,I,ie,Te,Me){let{horizontalAlign:ze,verticalAlign:ht}=t.au(Oe);return new t.P(-(ze-.5)*I+Te[0]*Me,-(ht-.5)*ie+Te[1]*Me)}class Rt{constructor(I,ie,Te,Me,ze,ht){this.transform=I.clone(),this.terrain=Te,this.collisionIndex=new _a(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),Sr=Te.tileSize/t.X,Kr=Te.tileID.toUnwrapped(),na=this.transform.calculatePosMatrix(Kr),qe=Ot.get("text-pitch-alignment")==="map",$e=Ot.get("text-rotation-alignment")==="map",lt=Fa(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=kr(na,qe,$e,this.transform,lt),Dt=null;if(qe){let yr=Ur(na,qe,$e,this.transform,lt);Dt=t.L([],this.transform.labelPlaneMatrix,yr)}this.retainedQueryData[ze.bucketInstanceId]=new hi(ze.bucketInstanceId,ht,ze.sourceLayerIndex,ze.index,Te.tileID);let ur={bucket:ze,layout:Ot,translationText:pt,translationIcon:Et,posMatrix:na,unwrappedTileID:Kr,textLabelPlaneMatrix:bt,labelToScreenMatrix:Dt,scale:Tr,textPixelRatio:Sr,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:Er,symbolInstanceStart:jr,symbolInstanceEnd:Qr}=yr;I.push({sortKey:Er,symbolInstanceStart:jr,symbolInstanceEnd:Qr,parameters:ur})}else I.push({symbolInstanceStart:0,symbolInstanceEnd:ze.symbolInstances.length,parameters:ur})}attemptAnchorPlacement(I,ie,Te,Me,ze,ht,wt,Ot,$t,Tr,Sr,Kr,na,qe,$e,lt,pt,Et,bt){let Dt=t.aq[I.textAnchor],ur=[I.textOffset0,I.textOffset1],yr=Yt(Dt,Te,Me,ur,ze),Er=this.collisionIndex.placeCollisionBox(ie,Kr,Ot,$t,Tr,wt,ht,lt,Sr.predicate,bt,yr);if((!Et||this.collisionIndex.placeCollisionBox(Et,Kr,Ot,$t,Tr,wt,ht,pt,Sr.predicate,bt,yr).placeable)&&Er.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:ur,width:Te,height:Me,anchor:Dt,textBoxScale:ze,prevAnchor:jr},this.markUsedJustification(qe,Dt,na,$e),qe.allowVerticalPlacement&&(this.markUsedOrientation(qe,$e,na),this.placedOrientations[na.crossTileID]=$e),{shift:yr,placedGlyphBoxes:Er}}}placeLayerBucketPart(I,ie,Te){let{bucket:Me,layout:ze,translationText:ht,translationIcon:wt,posMatrix:Ot,unwrappedTileID:$t,textLabelPlaneMatrix:Tr,labelToScreenMatrix:Sr,textPixelRatio:Kr,holdingForFade:na,collisionBoxArray:qe,partiallyEvaluatedTextSize:$e,collisionGroup:lt}=I.parameters,pt=ze.get("text-optional"),Et=ze.get("icon-optional"),bt=t.ar(ze,"text-overlap","text-allow-overlap"),Dt=bt==="always",ur=t.ar(ze,"icon-overlap","icon-allow-overlap"),yr=ur==="always",Er=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=Dt&&(yr||!Me.hasIconData()||Et),Da=yr&&(Dt||!Me.hasTextData()||pt);!Me.collisionArrays&&qe&&Me.deserializeCollisionBoxes(qe);let ci=this._getTerrainElevationFunc(this.retainedQueryData[Me.bucketInstanceId].tileID),Vi=(ji,on,An)=>{var Kn,Bn;if(ie[ji.crossTileID])return;if(na)return void(this.placements[ji.crossTileID]=new Wa(!1,!1,!1));let Ao=!1,ls=!1,Mo=!0,Yo=null,ds={box:null,placeable:!1,offscreen:null},ul={box:null,placeable:!1,offscreen:null},tl=null,es=null,ts=null,Il=0,tu=0,Ru=0;on.textFeatureIndex?Il=on.textFeatureIndex:ji.useRuntimeCollisionCircles&&(Il=ji.featureIndex),on.verticalTextFeatureIndex&&(tu=on.verticalTextFeatureIndex);let vu=on.textBox;if(vu){let Gl=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},Hl=(et,dt)=>{if(Me.allowVerticalPlacement&&ji.numVerticalGlyphVertices>0&&on.verticalTextBox){for(let yt of Me.writingModes)if(yt===t.ah.vertical?(ds=dt(),ul=ds):ds=et(),ds&&ds.placeable)break}else ds=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,Er,ht,lt.predicate,ci);return Tt&&Tt.placeable&&(this.markUsedOrientation(Me,yt,ji),this.placedOrientations[ji.crossTileID]=yt),Tt};Hl(()=>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}}),Gl(ds&&ds.placeable)}else{let et=t.aq[(Bn=(Kn=this.prevPlacement)===null||Kn===void 0?void 0:Kn.variableOffsets[ji.crossTileID])===null||Bn===void 0?void 0:Bn.anchor],dt=(Tt,tr,zt)=>{let _r=Tt.x2-Tt.x1,Gr=Tt.y2-Tt.y1,Xr=ji.textBoxScale,wa=Qr&&ur==="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&&(!ds||!ds.placeable)&&ji.numVerticalGlyphVertices>0&&Tt?dt(Tt,on.verticalIconBox,t.ah.vertical):{box:null,occluded:!0,offscreen:null}}),ds&&(Ao=ds.placeable,Mo=ds.offscreen);let yt=Gl(ds&&ds.placeable);if(!Ao&&this.prevPlacement){let Tt=this.prevPlacement.variableOffsets[ji.crossTileID];Tt&&(this.variableOffsets[ji.crossTileID]=Tt,this.markUsedJustification(Me,Tt.anchor,ji,yt))}}}if(tl=ds,Ao=tl&&tl.placeable,Mo=tl&&tl.offscreen,ji.useRuntimeCollisionCircles){let Gl=Me.text.placedSymbolArray.get(ji.centerJustifiedTextSymbolIndex),Hl=t.ai(Me.textSizeData,$e,Gl),me=ze.get("text-padding");es=this.collisionIndex.placeCollisionCircles(bt,Gl,Me.lineVertexArray,Me.glyphOffsetArray,Hl,Ot,$t,Tr,Sr,Te,jr,lt.predicate,ji.collisionCircleDiameter,me,ht,ci),es.circles.length&&es.collisionDetected&&!Te&&t.w("Collisions detected, but collision boxes are not shown"),Ao=Dt||es.circles.length>0&&!es.collisionDetected,Mo=Mo&&es.offscreen}if(on.iconFeatureIndex&&(Ru=on.iconFeatureIndex),on.iconBox){let Gl=Hl=>this.collisionIndex.placeCollisionBox(Hl,ur,Kr,Ot,$t,jr,Er,wt,lt.predicate,ci,Qr&&Yo?Yo:void 0);ul&&ul.placeable&&on.verticalIconBox?(ts=Gl(on.verticalIconBox),ls=ts.placeable):(ts=Gl(on.iconBox),ls=ts.placeable),Mo=Mo&&ts.offscreen}let wl=pt||ji.numHorizontalGlyphVertices===0&&ji.numVerticalGlyphVertices===0,fu=Et||ji.numIconVertices===0;wl||fu?fu?wl||(ls=ls&&Ao):Ao=ls&&Ao:ls=Ao=ls&&Ao;let uc=ls&&ts.placeable;if(Ao&&tl.placeable&&this.collisionIndex.insertCollisionBox(tl.box,bt,ze.get("text-ignore-placement"),Me.bucketInstanceId,ul&&ul.placeable&&tu?tu:Il,lt.ID),uc&&this.collisionIndex.insertCollisionBox(ts.box,ur,ze.get("icon-ignore-placement"),Me.bucketInstanceId,Ru,lt.ID),es&&Ao&&this.collisionIndex.insertCollisionCircles(es.circles,bt,ze.get("text-ignore-placement"),Me.bucketInstanceId,Il,lt.ID),Te&&this.storeCollisionData(Me.bucketInstanceId,An,on,tl,ts,es),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(Ao||Aa,ls||Da,Mo||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"),Sr=ht.get("text-rotation-alignment")==="map",Kr=ht.get("text-pitch-alignment")==="map",na=ht.get("icon-text-fit")!=="none",qe=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 Dt=0;Dt0,jr=this.placedOrientations[Et.crossTileID],Qr=jr===t.ah.vertical,ha=jr===t.ah.horizontal||jr===t.ah.horizontalOnly;if(bt>0||Dt>0){let Da=Za(yr.text);$e(I.text,bt,Qr?ri:Da),$e(I.text,Dt,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(Er){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=lt&<.has(pt)?lt.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[ur];ji?(ci=Yt(ji.anchor,ji.width,ji.height,ji.textOffset,ji.textBoxScale),Sr&&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),Zt(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),Zt(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 Zt(Oe,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;Oe.emplaceBack(I?1:0,ie?1:0,Me||0,ze||0,ht,wt),Oe.emplaceBack(I?1:0,ie?1:0,Me||0,ze||0,Ot,wt),Oe.emplaceBack(I?1:0,ie?1:0,Me||0,ze||0,Ot,$t),Oe.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(Oe){if(Oe.opacity===0&&!Oe.placed)return 0;if(Oe.opacity===1&&Oe.placed)return 4294967295;let I=Oe.placed?1:0,ie=Math.floor(127*Oe.opacity);return ie*Jt+I*Fr+ie*ta+I*ra+ie*ca+I*Ba+ie*$a+I}let ri=0;function pi(){return{isOccluded:(Oe,I,ie)=>!1,getPitchedTextCorrection:(Oe,I,ie)=>1,get useSpecialProjectionForSymbols(){return!1},projectTileCoordinates(Oe,I,ie,Te){throw new Error("Not implemented.")},translatePosition:(Oe,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),Sr=Math.cos($t);ht=[ht[0]*Sr-ht[1]*Tr,ht[0]*Tr+ht[1]*Sr]}return[Ot?ht[0]:Fa(ze,ht[0],Me.zoom),Ot?ht[1]:Fa(ze,ht[1],Me.zoom)]}(Oe,I,ie,Te),getCircleRadiusCorrection:Oe=>1}}class Ia{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&&i.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 Ia(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 cn{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,Sr=Me*t.X*tn;return{x:Math.floor((ht*t.X+I.anchorX)*$t-Te*t.X*tn),y:Math.floor(Tr-Sr)}}findMatches(I,ie,Te){let Me=this.tileID.canonical.zI)}}class xt{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class ut{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=(Oe,I)=>t.t(Oe,I&&I.filter(ie=>ie.identifier!=="source.canvas")),wr=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 Q(X(),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 y,this.imageManager.setEventedParent(this),this.glyphManager=new F(I._requestManager,ie.localIdeographFontFamily),this.lineAtlas=new W(256,512),this.crossTileSymbolIndex=new Or,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()),Ze().on(se,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,i.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(wr,{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 L(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":"",Sr={},Kr={};for(let{id:na,url:qe}of $t){let $e=ht.transformRequest(d(qe,Tr,".json"),"SpriteJSON");Sr[na]=t.h($e,Ot);let lt=ht.transformRequest(d(qe,Tr,".png"),"SpriteImage");Kr[na]=l.getImage(lt,Ot)}return yield Promise.all([...Object.values(Sr),...Object.values(Kr)]),function(na,qe){return t._(this,void 0,void 0,function*(){let $e={};for(let lt in na){$e[lt]={};let pt=i.getImageCanvasContext((yield qe[lt]).data),Et=(yield na[lt]).data;for(let bt in Et){let{width:Dt,height:ur,x:yr,y:Er,sdf:jr,pixelRatio:Qr,stretchX:ha,stretchY:Aa,content:Da,textFitWidth:ci,textFitHeight:Vi}=Et[bt];$e[lt][bt]={data:null,pixelRatio:Qr,sdf:jr,stretchX:ha,stretchY:Aa,content:Da,textFitWidth:ci,textFitHeight:Vi,spriteData:{width:Dt,height:ur,x:yr,y:Er,context:pt}}}}return $e})}(Sr,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(Er.featureIndex)-Qr}return Er.featureIndex-yr.featureIndex});for(let yr of ur)Dt.push(yr)}}for(let pt in qe)qe[pt].forEach(Et=>{let bt=Et.feature,Dt=$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=Dt});return qe}(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,qe)=>qe.tileID.overscaledZ-na.tileID.overscaledZ||(na.tileID.isLessThan(qe.tileID)?-1:1))}let Sr=this.crossTileSymbolIndex.addLayer(Tr,Ot[Tr.source],I.center.lng);ht=ht||Sr}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((ze=ze||this._layerOrderChanged||Te===0)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(i.now(),I.zoom))&&(this.pauseablePlacement=new rn(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(i.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(i.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 Nr=t.Y([{name:"a_pos",type:"Int16",components:2}]);let Hr={prelude:gt(`#ifdef GL_ES +`)),F.push({type:"Feature",geometry:{type:"Point",coordinates:O.lonlat},properties:{symbol:D(N),angle:P(N),text:U}})}}return{type:"FeatureCollection",features:F}}function T(E,p){return _.isArrayOrTypedArray(E)?p?function(b){return v(E[b])?+E[b]:0}:function(b){return E[b]}:E?function(){return E}:l}function l(){return""}function x(E){return E[0]===S}function w(E,p){var b;if(_.isArrayOrTypedArray(E)&&_.isArrayOrTypedArray(p)){b=["step",["get","point_count"],E[0]];for(var d=1;d850?D+=" Black":u>750?D+=" Extra Bold":u>650?D+=" Bold":u>550?D+=" Semi Bold":u>450?D+=" Medium":u>350?D+=" Regular":u>250?D+=" Light":u>150?D+=" Extra Light":D+=" Thin"):g.slice(0,2).join(" ")==="Open Sans"?(D="Open Sans",u>750?D+=" Extrabold":u>650?D+=" Bold":u>550?D+=" Semibold":u>350?D+=" Regular":D+=" Light"):g.slice(0,3).join(" ")==="Klokantech Noto Sans"&&(D="Klokantech Noto Sans",g[3]==="CJK"&&(D+=" CJK"),D+=u>500?" Bold":" Regular")),y&&(D+=" Italic"),D==="Open Sans Regular Italic"?D="Open Sans Italic":D==="Open Sans Regular Bold"?D="Open Sans Bold":D==="Open Sans Regular Bold Italic"?D="Open Sans Bold Italic":D==="Klokantech Noto Sans Regular Italic"&&(D="Klokantech Noto Sans Italic"),a(D)||(D=b);var P=D.split(", ");return P}}}),UV=He({"src/traces/scattermap/plot.js"(Z,q){"use strict";var v=sa(),_=NV(),S=b0().traceLayerPrefix,M={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function e(r,o,a,i){this.type="scattermap",this.subplot=r,this.uid=o,this.clusterEnabled=a,this.isHidden=i,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 i={type:"geojson",data:o.geojson};a&&a.enabled&&v.extendFlat(i,{cluster:!0,clusterMaxZoom:a.maxzoom});var n=this.subplot.map.getSource(this.sourceIds[r]);n?n.setData(o.geojson):this.subplot.map.addSource(this.sourceIds[r],i)},t.setSourceData=function(r,o){this.subplot.map.getSource(this.sourceIds[r]).setData(o.geojson)},t.addLayer=function(r,o,a){var i={type:o.type,id:this.layerIds[r],source:this.sourceIds[r],layout:o.layout,paint:o.paint};o.filter&&(i.filter=o.filter);for(var n=this.layerIds[r],s,h=this.subplot.getMapLayers(),f=0;f=0;y--){var D=g[y];n.removeLayer(c.layerIds[D])}u||n.removeSource(c.sourceIds.circle)}function x(u){for(var g=M.nonCluster,y=0;y=0;y--){var D=g[y];n.removeLayer(c.layerIds[D]),u||n.removeSource(c.sourceIds[D])}}function A(u){m?l(u):w(u)}function E(u){f?T(u):x(u)}function p(){for(var u=f?M.cluster:M.nonCluster,g=0;g=0;i--){var n=a[i];o.removeLayer(this.layerIds[n]),o.removeSource(this.sourceIds[n])}},q.exports=function(o,a){var i=a[0].trace,n=i.cluster&&i.cluster.enabled,s=i.visible!==!0,h=new e(o,i.uid,n,s),f=_(o.gd,a),m=h.below=o.belowLookup["trace-"+i.uid],c,T,l;if(n)for(h.addSource("circle",f.circle,i.cluster),c=0;c=0?Math.floor((i+180)/360):Math.ceil((i-180)/360),E=A*360,p=i-E;function b(N){var O=N.lonlat;if(O[0]===e||x&&T.indexOf(N.i+1)===-1)return 1/0;var L=_.modHalf(O[0],360),U=O[1],B=c.project([L,U]),W=B.x-f.c2p([p,U]),$=B.y-m.c2p([L,n]),ue=Math.max(3,N.mrc||0);return Math.max(Math.sqrt(W*W+$*$)-ue,1-3/ue)}if(v.getClosest(s,b,a),a.index!==!1){var d=s[a.index],u=d.lonlat,g=[_.modHalf(u[0],360)+E,u[1]],y=f.c2p(g),D=m.c2p(g),P=d.mrc||1;a.x0=y-P,a.x1=y+P,a.y0=D-P,a.y1=D+P;var z={};z[h.subplot]={_subplot:c};var F=h._module.formatLabels(d,h,z);return a.lonLabel=F.lonLabel,a.latLabel=F.latLabel,a.color=S(h,d),a.extraText=o(h,d,s[0].t.labels),a.hovertemplate=h.hovertemplate,[a]}}function o(a,i,n){if(a.hovertemplate)return;var s=i.hi||a.hoverinfo,h=s.split("+"),f=h.indexOf("all")!==-1,m=h.indexOf("lon")!==-1,c=h.indexOf("lat")!==-1,T=i.lonlat,l=[];function x(w){return w+"\xB0"}return f||m&&c?l.push("("+x(T[1])+", "+x(T[0])+")"):m?l.push(n.lon+x(T[0])):c&&l.push(n.lat+x(T[1])),(f||h.indexOf("text")!==-1)&&M(i,a,l),l.join("
")}q.exports={hoverPoints:r,getExtraText:o}}}),jV=He({"src/traces/scattermap/event_data.js"(Z,q){"use strict";q.exports=function(_,S){return _.lon=S.lon,_.lat=S.lat,_}}}),qV=He({"src/traces/scattermap/select.js"(Z,q){"use strict";var v=sa(),_=Fu(),S=Gs().BADNUM;q.exports=function(e,t){var r=e.cd,o=e.xaxis,a=e.yaxis,i=[],n=r[0].trace,s;if(!_.hasMarkers(n))return[];if(t===!1)for(s=0;s1)return 1;for(var J=H,ve=0;ve<8;ve++){var Ee=this.sampleCurveX(J)-H;if(Math.abs(Ee)Ee?Ge=J:ct=J,J=.5*(ct-Ge)+Ge;return J},solve:function(H,R){return this.sampleCurveY(this.solveCurveX(H,R))}};var h=r(n);let f,m;function c(){return f==null&&(f=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),f}function T(){if(m==null&&(m=!1,c())){let R=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(R){for(let ve=0;ve<5*5;ve++){let Ee=4*ve;R.fillStyle=`rgb(${Ee},${Ee+1},${Ee+2})`,R.fillRect(ve%5,Math.floor(ve/5),1,1)}let J=R.getImageData(0,0,5,5).data;for(let ve=0;ve<5*5*4;ve++)if(ve%4!=3&&J[ve]!==ve){m=!0;break}}}return m||!1}function l(H,R,J,ve){let Ee=new h(H,R,J,ve);return Be=>Ee.solve(Be)}let x=l(.25,.1,.25,1);function w(H,R,J){return Math.min(J,Math.max(R,H))}function A(H,R,J){let ve=J-R,Ee=((H-R)%ve+ve)%ve+R;return Ee===R?J:Ee}function E(H,...R){for(let J of R)for(let ve in J)H[ve]=J[ve];return H}let p=1;function b(H,R,J){let ve={};for(let Ee in H)ve[Ee]=R.call(this,H[Ee],Ee,H);return ve}function d(H,R,J){let ve={};for(let Ee in H)R.call(this,H[Ee],Ee,H)&&(ve[Ee]=H[Ee]);return ve}function u(H){return Array.isArray(H)?H.map(u):typeof H=="object"&&H?b(H,u):H}let g={};function y(H){g[H]||(typeof console<"u"&&console.warn(H),g[H]=!0)}function D(H,R,J){return(J.y-H.y)*(R.x-H.x)>(R.y-H.y)*(J.x-H.x)}function P(H){return typeof WorkerGlobalScope<"u"&&H!==void 0&&H instanceof WorkerGlobalScope}let z=null;function F(H){return typeof ImageBitmap<"u"&&H instanceof ImageBitmap}let N="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function O(H,R,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(H,{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(Nt,ar,Mr,zr,Wr){let ia=4*Math.max(-ar,0),fa=(Math.max(0,Mr)-Mr)*zr*4+ia,ja=4*zr,Ka=Math.max(0,ar),Wi=Math.max(0,Mr);return{rect:{x:Ka,y:Wi,width:Math.min(Nt.width,ar+zr)-Ka,height:Math.min(Nt.height,Mr+Wr)-Wi},layout:[{offset:fa,stride:ja}]}}(H,R,J,ve,Ee)),ct)for(let Nt=0;NtP(self)?self.worker&&self.worker.referrer:(window.location.protocol==="blob:"?window.parent:window).location.href,X=function(H,R){if(/:\/\//.test(H.url)&&!/^https?:|^file:/.test(H.url)){let ve=ue(H.url);if(ve)return ve(H,R);if(P(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:H,targetMapId:ce},R)}if(!(/^file:/.test(J=H.url)||/^file:/.test(Y())&&!/^\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:Y(),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 Nt=yield Ge.blob();throw new de(Ge.status,Ge.statusText,ve.url,Nt)}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 W();return{data:At,cacheControl:Ge.headers.get("Cache-Control"),expires:Ge.headers.get("Expires")}})}(H,R);if(P(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:H,mustQueue:!0,targetMapId:ce},R)}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 Nt in ve.headers)At.setRequestHeader(Nt,ve.headers[Nt]);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 Nt=At.response;if(ve.type==="json")try{Nt=JSON.parse(At.response)}catch(ar){return void Ge(ar)}Be({data:Nt,cacheControl:At.getResponseHeader("Cache-Control"),expires:At.getResponseHeader("Expires")})}else{let Nt=new Blob([At.response],{type:At.getResponseHeader("Content-Type")});Ge(new de(At.status,At.statusText,ve.url,Nt))}},Ee.signal.addEventListener("abort",()=>{At.abort(),Ge(W())}),At.send(ve.body)})}(H,R)};function Q(H){if(!H||H.indexOf("://")<=0||H.indexOf("data:image/")===0||H.indexOf("blob:")===0)return!0;let R=new URL(H),J=window.location;return R.protocol===J.protocol&&R.host===J.host}function V(H,R,J){J[H]&&J[H].indexOf(R)!==-1||(J[H]=J[H]||[],J[H].push(R))}function le(H,R,J){if(J&&J[H]){let ve=J[H].indexOf(R);ve!==-1&&J[H].splice(ve,1)}}class ae{constructor(R,J={}){E(this,J),this.type=R}}class j extends ae{constructor(R,J={}){super("error",E({error:R},J))}}class ee{on(R,J){return this._listeners=this._listeners||{},V(R,J,this._listeners),this}off(R,J){return le(R,J,this._listeners),le(R,J,this._oneTimeListeners),this}once(R,J){return J?(this._oneTimeListeners=this._oneTimeListeners||{},V(R,J,this._oneTimeListeners),this):new Promise(ve=>this.once(R,ve))}fire(R,J){typeof R=="string"&&(R=new ae(R,J||{}));let ve=R.type;if(this.listens(ve)){R.target=this;let Ee=this._listeners&&this._listeners[ve]?this._listeners[ve].slice():[];for(let ct of Ee)ct.call(this,R);let Be=this._oneTimeListeners&&this._oneTimeListeners[ve]?this._oneTimeListeners[ve].slice():[];for(let ct of Be)le(ve,ct,this._oneTimeListeners),ct.call(this,R);let Ge=this._eventedParent;Ge&&(E(R,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),Ge.fire(R))}else R instanceof j&&console.error(R.error);return this}listens(R){return this._listeners&&this._listeners[R]&&this._listeners[R].length>0||this._oneTimeListeners&&this._oneTimeListeners[R]&&this._oneTimeListeners[R].length>0||this._eventedParent&&this._eventedParent.listens(R)}setEventedParent(R,J){return this._eventedParent=R,this._eventedParentData=J,this}}var te={$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(H,R){let J={};for(let ve in H)ve!=="ref"&&(J[ve]=H[ve]);return pe.forEach(ve=>{ve in R&&(J[ve]=R[ve])}),J}function Se(H,R){if(Array.isArray(H)){if(!Array.isArray(R)||H.length!==R.length)return!1;for(let J=0;J`:H.itemType.kind==="value"?"array":`array<${R}>`}return H.kind}let Ae=[rt,Je,St,kt,Bt,qr,Vt,Fe(Ar),kr,Ur,_t];function Le(H,R){if(R.kind==="error")return null;if(H.kind==="array"){if(R.kind==="array"&&(R.N===0&&R.itemType.kind==="value"||!Le(H.itemType,R.itemType))&&(typeof H.N!="number"||H.N===R.N))return null}else{if(H.kind===R.kind)return null;if(H.kind==="value"){for(let J of Ae)if(!Le(J,R))return null}}return`Expected ${Ye(H)} but found ${Ye(R)} instead.`}function We(H,R){return R.some(J=>J.kind===H.kind)}function Ke(H,R){return R.some(J=>J==="null"?H===null:J==="array"?Array.isArray(H):J==="object"?H&&!Array.isArray(H)&&typeof H=="object":J===typeof H)}function st(H,R){return H.kind==="array"&&R.kind==="array"?H.itemType.kind===R.itemType.kind&&typeof H.N=="number":H.kind===R.kind}let ot=.96422,Ut=.82521,Ct=4/29,Pt=6/29,jt=3*Pt*Pt,cr=Pt*Pt*Pt,or=Math.PI/180,nr=180/Math.PI;function Pr(H){return(H%=360)<0&&(H+=360),H}function _a([H,R,J,ve]){let Ee,Be,Ge=Ra((.2225045*(H=Fa(H))+.7168786*(R=Fa(R))+.0606169*(J=Fa(J)))/1);H===R&&R===J?Ee=Be=Ge:(Ee=Ra((.4360747*H+.3850649*R+.1430804*J)/ot),Be=Ra((.0139322*H+.0971045*R+.7141733*J)/Ut));let ct=116*Ge-16;return[ct<0?0:ct,500*(Ee-Ge),200*(Ge-Be),ve]}function Fa(H){return H<=.04045?H/12.92:Math.pow((H+.055)/1.055,2.4)}function Ra(H){return H>cr?Math.pow(H,1/3):H/jt+Ct}function qa([H,R,J,ve]){let Ee=(H+16)/116,Be=isNaN(R)?Ee:Ee+R/500,Ge=isNaN(J)?Ee:Ee-J/200;return Ee=1*Ca(Ee),Be=ot*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(H){return(H=H<=.00304?12.92*H:1.055*Math.pow(H,1/2.4)-.055)<0?0:H>1?1:H}function Ca(H){return H>Pt?H*H*H:jt*(H-Ct)}function hi(H){return parseInt(H.padEnd(2,H),16)/255}function wi(H,R){return Yt(R?H/100:H,0,1)}function Yt(H,R,J){return Math.min(Math.max(R,H),J)}function Rt(H){return!H.some(Number.isNaN)}let Zt={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(R,J,ve,Ee=1,Be=!0){this.r=R,this.g=J,this.b=ve,this.a=Ee,Be||(this.r*=Ee,this.g*=Ee,this.b*=Ee,Ee||this.overwriteGetter("rgb",[R,J,ve,Ee]))}static parse(R){if(R instanceof Jt)return R;if(typeof R!="string")return;let J=function(ve){if((ve=ve.toLowerCase().trim())==="transparent")return[0,0,0,0];let Ee=Zt[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,Nt,ar,Mr,zr,Wr,ia,fa,ja,Ka,Wi]=Ge,gi=[ar||" ",Wr||" ",ja].join("");if(gi===" "||gi===" /"||gi===",,"||gi===",,,"){let qi=[Nt,zr,fa].join(""),en=qi==="%%%"?100:qi===""?255:0;if(en){let jn=[Yt(+At/en,0,1),Yt(+Mr/en,0,1),Yt(+ia/en,0,1),Ka?wi(+Ka,Wi):1];if(Rt(jn))return jn}}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,Nt,ar,Mr,zr,Wr,ia]=Be,fa=[At||" ",ar||" ",zr].join("");if(fa===" "||fa===" /"||fa===",,"||fa===",,,"){let ja=[+ct,Yt(+Nt,0,100),Yt(+Mr,0,100),Wr?wi(+Wr,ia):1];if(Rt(ja))return function([Ka,Wi,gi,qi]){function en(jn){let Lo=(jn+Ka/30)%12,xs=Wi*Math.min(gi,1-gi);return gi-xs*Math.max(-1,Math.min(Lo-3,9-Lo,1))}return Ka=Pr(Ka),Wi/=100,gi/=100,[en(0),en(8),en(4),qi]}(ja)}}}(R);return J?new Jt(...J,!1):void 0}get rgb(){let{r:R,g:J,b:ve,a:Ee}=this,Be=Ee||1/0;return this.overwriteGetter("rgb",[R/Be,J/Be,ve/Be,Ee])}get hcl(){return this.overwriteGetter("hcl",function(R){let[J,ve,Ee,Be]=_a(R),Ge=Math.sqrt(ve*ve+Ee*Ee);return[Math.round(1e4*Ge)?Pr(Math.atan2(Ee,ve)*nr):NaN,Ge,J,Be]}(this.rgb))}get lab(){return this.overwriteGetter("lab",_a(this.rgb))}overwriteGetter(R,J){return Object.defineProperty(this,R,{value:J}),J}toString(){let[R,J,ve,Ee]=this.rgb;return`rgba(${[R,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(R,J,ve){this.sensitivity=R?J?"variant":"case":J?"accent":"base",this.locale=ve,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(R,J){return this.collator.compare(R,J)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class ta{constructor(R,J,ve,Ee,Be){this.text=R,this.image=J,this.scale=ve,this.fontStack=Ee,this.textColor=Be}}class ra{constructor(R){this.sections=R}static fromString(R){return new ra([new ta(R,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(R=>R.text.length!==0||R.image&&R.image.name.length!==0)}static factory(R){return R instanceof ra?R:ra.fromString(R)}toString(){return this.sections.length===0?"":this.sections.map(R=>R.text).join("")}}class ca{constructor(R){this.values=R.slice()}static parse(R){if(R instanceof ca)return R;if(typeof R=="number")return new ca([R,R,R,R]);if(Array.isArray(R)&&!(R.length<1||R.length>4)){for(let J of R)if(typeof J!="number")return;switch(R.length){case 1:R=[R[0],R[0],R[0],R[0]];break;case 2:R=[R[0],R[1],R[0],R[1]];break;case 3:R=[R[0],R[1],R[2],R[1]]}return new ca(R)}}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(R){this.values=R.slice()}static parse(R){if(R instanceof $a)return R;if(Array.isArray(R)&&!(R.length<1)&&R.length%2==0){for(let J=0;J=0&&H<=255&&typeof R=="number"&&R>=0&&R<=255&&typeof J=="number"&&J>=0&&J<=255?ve===void 0||typeof ve=="number"&&ve>=0&&ve<=1?null:`Invalid rgba value [${[H,R,J,ve].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof ve=="number"?[H,R,J,ve]:[H,R,J]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function pi(H){if(H===null||typeof H=="string"||typeof H=="boolean"||typeof H=="number"||H instanceof Jt||H instanceof Fr||H instanceof ra||H instanceof ca||H instanceof $a||H instanceof Za)return!0;if(Array.isArray(H)){for(let R of H)if(!pi(R))return!1;return!0}if(typeof H=="object"){for(let R in H)if(!pi(H[R]))return!1;return!0}return!1}function Ia(H){if(H===null)return rt;if(typeof H=="string")return St;if(typeof H=="boolean")return kt;if(typeof H=="number")return Je;if(H instanceof Jt)return Bt;if(H instanceof Fr)return vr;if(H instanceof ra)return qr;if(H instanceof ca)return kr;if(H instanceof $a)return _t;if(H instanceof Za)return Ur;if(Array.isArray(H)){let R=H.length,J;for(let ve of H){let Ee=Ia(ve);if(J){if(J===Ee)continue;J=Ar;break}J=Ee}return Fe(J||Ar,R)}return Vt}function rn(H){let R=typeof H;return H===null?"":R==="string"||R==="number"||R==="boolean"?String(H):H instanceof Jt||H instanceof ra||H instanceof ca||H instanceof $a||H instanceof Za?H.toString():JSON.stringify(H)}class tn{constructor(R,J){this.type=R,this.value=J}static parse(R,J){if(R.length!==2)return J.error(`'literal' expression requires exactly one argument, but found ${R.length-1} instead.`);if(!pi(R[1]))return J.error("invalid value");let ve=R[1],Ee=Ia(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 cn{constructor(R){this.name="ExpressionEvaluationError",this.message=R}toJSON(){return this.message}}let xt={string:St,number:Je,boolean:kt,object:Vt};class ut{constructor(R,J){this.type=R,this.args=J}static parse(R,J){if(R.length<2)return J.error("Expected at least one argument.");let ve,Ee=1,Be=R[0];if(Be==="array"){let ct,At;if(R.length>2){let Nt=R[1];if(typeof Nt!="string"||!(Nt in xt)||Nt==="object")return J.error('The item type argument of "array" must be one of string, number, boolean',1);ct=xt[Nt],Ee++}else ct=Ar;if(R.length>3){if(R[2]!==null&&(typeof R[2]!="number"||R[2]<0||R[2]!==Math.floor(R[2])))return J.error('The length argument to "array" must be a positive integer literal',2);At=R[2],Ee++}ve=Fe(ct,At)}else{if(!xt[Be])throw new Error(`Types doesn't contain name = ${Be}`);ve=xt[Be]}let Ge=[];for(;EeR.outputDefined())}}let Or={"to-boolean":kt,"to-color":Bt,"to-number":Je,"to-string":St};class Cr{constructor(R,J){this.type=R,this.args=J}static parse(R,J){if(R.length<2)return J.error("Expected at least one argument.");let ve=R[0];if(!Or[ve])throw new Error(`Can't parse ${ve} as it is not part of the known types`);if((ve==="to-boolean"||ve==="to-string")&&R.length!==2)return J.error("Expected one argument.");let Ee=Or[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 cn(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(R);let Ee=ca.parse(J);if(Ee)return Ee}throw new cn(`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(R);let Ee=$a.parse(J);if(Ee)return Ee}throw new cn(`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(R),J===null)return 0;let Ee=Number(J);if(!isNaN(Ee))return Ee}throw new cn(`Could not convert ${JSON.stringify(J)} to number.`)}case"formatted":return ra.fromString(rn(this.args[0].evaluate(R)));case"resolvedImage":return Za.fromString(rn(this.args[0].evaluate(R)));default:return rn(this.args[0].evaluate(R))}}eachChild(R){this.args.forEach(R)}outputDefined(){return this.args.every(R=>R.outputDefined())}}let wr=["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"?wr[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(R){let J=this._parseColorCache[R];return J||(J=this._parseColorCache[R]=Jt.parse(R)),J}}class Nr{constructor(R,J,ve=[],Ee,Be=new Ze,Ge=[]){this.registry=R,this.path=ve,this.key=ve.map(ct=>`[${ct}]`).join(""),this.scope=Be,this.errors=Ge,this.expectedType=Ee,this._isConstant=J}parse(R,J,ve,Ee,Be={}){return J?this.concat(J,ve,Ee)._parse(R,Be):this._parse(R,Be)}_parse(R,J){function ve(Ee,Be,Ge){return Ge==="assert"?new ut(Be,[Ee]):Ge==="coerce"?new Cr(Be,[Ee]):Ee}if(R!==null&&typeof R!="string"&&typeof R!="boolean"&&typeof R!="number"||(R=["literal",R]),Array.isArray(R)){if(R.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');let Ee=R[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(R,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(R===void 0?"'undefined' value invalid. Use null instead.":typeof R=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof R} instead.`)}concat(R,J,ve){let Ee=typeof R=="number"?this.path.concat(R):this.path,Be=ve?this.scope.concat(ve):this.scope;return new Nr(this.registry,this._isConstant,Ee,J||null,Be,this.errors)}error(R,...J){let ve=`${this.key}${J.map(Ee=>`[${Ee}]`).join("")}`;this.errors.push(new Ce(ve,R))}checkSubtype(R,J){let ve=Le(R,J);return ve&&this.error(ve),ve}}class Hr{constructor(R,J){this.type=J.type,this.bindings=[].concat(R),this.result=J}evaluate(R){return this.result.evaluate(R)}eachChild(R){for(let J of this.bindings)R(J[1]);R(this.result)}static parse(R,J){if(R.length<4)return J.error(`Expected at least 3 arguments, but found ${R.length-1} instead.`);let ve=[];for(let Be=1;Be=ve.length)throw new cn(`Array index out of bounds: ${J} > ${ve.length-1}.`);if(J!==Math.floor(J))throw new cn(`Array index must be an integer, but found ${J} instead.`);return ve[J]}eachChild(R){R(this.index),R(this.input)}outputDefined(){return!1}}class mr{constructor(R,J){this.type=kt,this.needle=R,this.haystack=J}static parse(R,J){if(R.length!==3)return J.error(`Expected 2 arguments, but found ${R.length-1} instead.`);let ve=J.parse(R[1],1,Ar),Ee=J.parse(R[2],2,Ar);return ve&&Ee?We(ve.type,[kt,St,Je,rt,Ar])?new mr(ve,Ee):J.error(`Expected first argument to be of type boolean, string, number or null, but found ${Ye(ve.type)} instead`):null}evaluate(R){let J=this.needle.evaluate(R),ve=this.haystack.evaluate(R);if(!ve)return!1;if(!Ke(J,["boolean","string","number","null"]))throw new cn(`Expected first argument to be of type boolean, string, number or null, but found ${Ye(Ia(J))} instead.`);if(!Ke(ve,["string","array"]))throw new cn(`Expected second argument to be of type array or string, but found ${Ye(Ia(ve))} instead.`);return ve.indexOf(J)>=0}eachChild(R){R(this.needle),R(this.haystack)}outputDefined(){return!0}}class Ir{constructor(R,J,ve){this.type=Je,this.needle=R,this.haystack=J,this.fromIndex=ve}static parse(R,J){if(R.length<=2||R.length>=5)return J.error(`Expected 3 or 4 arguments, but found ${R.length-1} instead.`);let ve=J.parse(R[1],1,Ar),Ee=J.parse(R[2],2,Ar);if(!ve||!Ee)return null;if(!We(ve.type,[kt,St,Je,rt,Ar]))return J.error(`Expected first argument to be of type boolean, string, number or null, but found ${Ye(ve.type)} instead`);if(R.length===4){let Be=J.parse(R[3],3,Je);return Be?new Ir(ve,Ee,Be):null}return new Ir(ve,Ee)}evaluate(R){let J=this.needle.evaluate(R),ve=this.haystack.evaluate(R);if(!Ke(J,["boolean","string","number","null"]))throw new cn(`Expected first argument to be of type boolean, string, number or null, but found ${Ye(Ia(J))} instead.`);let Ee;if(this.fromIndex&&(Ee=this.fromIndex.evaluate(R)),Ke(ve,["string"])){let Be=ve.indexOf(J,Ee);return Be===-1?-1:[...ve.slice(0,Be)].length}if(Ke(ve,["array"]))return ve.indexOf(J,Ee);throw new cn(`Expected second argument to be of type array or string, but found ${Ye(Ia(ve))} instead.`)}eachChild(R){R(this.needle),R(this.haystack),this.fromIndex&&R(this.fromIndex)}outputDefined(){return!1}}class va{constructor(R,J,ve,Ee,Be,Ge){this.inputType=R,this.type=J,this.input=ve,this.cases=Ee,this.outputs=Be,this.otherwise=Ge}static parse(R,J){if(R.length<5)return J.error(`Expected at least 4 arguments, but found only ${R.length-1}.`);if(R.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 Nt=2;NtNumber.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,Ia(ia)))return null}else ve=Ia(ia);if(Be[String(ia)]!==void 0)return zr.error("Branch labels must be unique.");Be[String(ia)]=Ge.length}let Wr=J.parse(Mr,Nt,Ee);if(!Wr)return null;Ee=Ee||Wr.type,Ge.push(Wr)}let ct=J.parse(R[1],1,Ar);if(!ct)return null;let At=J.parse(R[R.length-1],R.length-1,Ee);return At?ct.type.kind!=="value"&&J.concat(1).checkSubtype(ve,ct.type)?null:new va(ve,Ee,ct,Be,Ge,At):null}evaluate(R){let J=this.input.evaluate(R);return(Ia(J)===this.inputType&&this.outputs[this.cases[J]]||this.otherwise).evaluate(R)}eachChild(R){R(this.input),this.outputs.forEach(R),R(this.otherwise)}outputDefined(){return this.outputs.every(R=>R.outputDefined())&&this.otherwise.outputDefined()}}class Pa{constructor(R,J,ve){this.type=R,this.branches=J,this.otherwise=ve}static parse(R,J){if(R.length<4)return J.error(`Expected at least 3 arguments, but found only ${R.length-1}.`);if(R.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 ga{constructor(R,J,ve,Ee){this.type=R,this.input=J,this.beginIndex=ve,this.endIndex=Ee}static parse(R,J){if(R.length<=2||R.length>=5)return J.error(`Expected 3 or 4 arguments, but found ${R.length-1} instead.`);let ve=J.parse(R[1],1,Ar),Ee=J.parse(R[2],2,Je);if(!ve||!Ee)return null;if(!We(ve.type,[Fe(Ar),St,Ar]))return J.error(`Expected first argument to be of type array or string, but found ${Ye(ve.type)} instead`);if(R.length===4){let Be=J.parse(R[3],3,Je);return Be?new ga(ve.type,ve,Ee,Be):null}return new ga(ve.type,ve,Ee)}evaluate(R){let J=this.input.evaluate(R),ve=this.beginIndex.evaluate(R),Ee;if(this.endIndex&&(Ee=this.endIndex.evaluate(R)),Ke(J,["string"]))return[...J].slice(ve,Ee).join("");if(Ke(J,["array"]))return J.slice(ve,Ee);throw new cn(`Expected first argument to be of type array or string, but found ${Ye(Ia(J))} instead.`)}eachChild(R){R(this.input),R(this.beginIndex),this.endIndex&&R(this.endIndex)}outputDefined(){return!1}}function la(H,R){let J=H.length-1,ve,Ee,Be=0,Ge=J,ct=0;for(;Be<=Ge;)if(ct=Math.floor((Be+Ge)/2),ve=H[ct],Ee=H[ct+1],ve<=R){if(ct===J||RR))throw new cn("Input is not a number.");Ge=ct-1}return 0}class ba{constructor(R,J,ve){this.type=R,this.input=J,this.labels=[],this.outputs=[];for(let[Ee,Be]of ve)this.labels.push(Ee),this.outputs.push(Be)}static parse(R,J){if(R.length-1<4)return J.error(`Expected at least 4 arguments, but found only ${R.length-1}.`);if((R.length-1)%2!=0)return J.error("Expected an even number of arguments.");let ve=J.parse(R[1],1,Je);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.',Nt);let Mr=J.parse(At,ar,Be);if(!Mr)return null;Be=Be||Mr.type,Ee.push([ct,Mr])}return new ba(Be,ve,Ee)}evaluate(R){let J=this.labels,ve=this.outputs;if(J.length===1)return ve[0].evaluate(R);let Ee=this.input.evaluate(R);if(Ee<=J[0])return ve[0].evaluate(R);let Be=J.length;return Ee>=J[Be-1]?ve[Be-1].evaluate(R):ve[la(J,Ee)].evaluate(R)}eachChild(R){R(this.input);for(let J of this.outputs)R(J)}outputDefined(){return this.outputs.every(R=>R.outputDefined())}}function Ai(H){return H&&H.__esModule&&Object.prototype.hasOwnProperty.call(H,"default")?H.default:H}var ki=Ki;function Ki(H,R,J,ve){this.cx=3*H,this.bx=3*(J-H)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*R,this.by=3*(ve-R)-this.cy,this.ay=1-this.cy-this.by,this.p1x=H,this.p1y=R,this.p2x=J,this.p2y=ve}Ki.prototype={sampleCurveX:function(H){return((this.ax*H+this.bx)*H+this.cx)*H},sampleCurveY:function(H){return((this.ay*H+this.by)*H+this.cy)*H},sampleCurveDerivativeX:function(H){return(3*this.ax*H+2*this.bx)*H+this.cx},solveCurveX:function(H,R){if(R===void 0&&(R=1e-6),H<0)return 0;if(H>1)return 1;for(var J=H,ve=0;ve<8;ve++){var Ee=this.sampleCurveX(J)-H;if(Math.abs(Ee)Ee?Ge=J:ct=J,J=.5*(ct-Ge)+Ge;return J},solve:function(H,R){return this.sampleCurveY(this.solveCurveX(H,R))}};var En=Ai(ki);function Tn(H,R,J){return H+J*(R-H)}function On(H,R,J){return H.map((ve,Ee)=>Tn(ve,R[Ee],J))}let kn={number:Tn,color:function(H,R,J,ve="rgb"){switch(ve){case"rgb":{let[Ee,Be,Ge,ct]=On(H.rgb,R.rgb,J);return new Jt(Ee,Be,Ge,ct,!1)}case"hcl":{let[Ee,Be,Ge,ct]=H.hcl,[At,Nt,ar,Mr]=R.hcl,zr,Wr;if(isNaN(Ee)||isNaN(At))isNaN(Ee)?isNaN(At)?zr=NaN:(zr=At,Ge!==1&&Ge!==0||(Wr=Nt)):(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*or,qa([qi,Math.cos(Wi)*gi,Math.sin(Wi)*gi,en])}([zr,Wr??Tn(Be,Nt,J),Tn(Ge,ar,J),Tn(ct,Mr,J)]);return new Jt(ia,fa,ja,Ka,!1)}case"lab":{let[Ee,Be,Ge,ct]=qa(On(H.lab,R.lab,J));return new Jt(Ee,Be,Ge,ct,!1)}}},array:On,padding:function(H,R,J){return new ca(On(H.values,R.values,J))},variableAnchorOffsetCollection:function(H,R,J){let ve=H.values,Ee=R.values;if(ve.length!==Ee.length)throw new cn(`Cannot interpolate values of different length. from: ${H.toString()}, to: ${R.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:Nt}}}if(R.length-1<4)return J.error(`Expected at least 4 arguments, but found only ${R.length-1}.`);if((R.length-1)%2!=0)return J.error("Expected an even number of arguments.");if(Be=J.parse(Be,2,Je),!Be)return null;let ct=[],At=null;ve==="interpolate-hcl"||ve==="interpolate-lab"?At=Bt:J.expectedType&&J.expectedType.kind!=="value"&&(At=J.expectedType);for(let Nt=0;Nt=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(Mr,Wr,At);if(!ia)return null;At=At||ia.type,ct.push([ar,ia])}return st(At,Je)||st(At,Bt)||st(At,kr)||st(At,_t)||st(At,Fe(Je))?new ao(At,ve,Ee,Be,ct):J.error(`Type ${Ye(At)} is not interpolatable.`)}evaluate(R){let J=this.labels,ve=this.outputs;if(J.length===1)return ve[0].evaluate(R);let Ee=this.input.evaluate(R);if(Ee<=J[0])return ve[0].evaluate(R);let Be=J.length;if(Ee>=J[Be-1])return ve[Be-1].evaluate(R);let Ge=la(J,Ee),ct=ao.interpolationFactor(this.interpolation,Ee,J[Ge],J[Ge+1]),At=ve[Ge].evaluate(R),Nt=ve[Ge+1].evaluate(R);switch(this.operator){case"interpolate":return kn[this.type.kind](At,Nt,ct);case"interpolate-hcl":return kn.color(At,Nt,ct,"hcl");case"interpolate-lab":return kn.color(At,Nt,ct,"lab")}}eachChild(R){R(this.input);for(let J of this.outputs)R(J)}outputDefined(){return this.outputs.every(R=>R.outputDefined())}}function Co(H,R,J,ve){let Ee=ve-J,Be=H-J;return Ee===0?0:R===1?Be/Ee:(Math.pow(R,Be)-1)/(Math.pow(R,Ee)-1)}class bo{constructor(R,J){this.type=R,this.args=J}static parse(R,J){if(R.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 R.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 bo(Ge?Ar:ve,Be)}evaluate(R){let J,ve=null,Ee=0;for(let Be of this.args)if(Ee++,ve=Be.evaluate(R),ve&&ve instanceof Za&&!ve.available&&(J||(J=ve.name),ve=null,Ee===this.args.length&&(ve=J)),ve!==null)break;return ve}eachChild(R){this.args.forEach(R)}outputDefined(){return this.args.every(R=>R.outputDefined())}}function zs(H,R){return H==="=="||H==="!="?R.kind==="boolean"||R.kind==="string"||R.kind==="number"||R.kind==="null"||R.kind==="value":R.kind==="string"||R.kind==="number"||R.kind==="value"}function Cn(H,R,J,ve){return ve.compare(R,J)===0}function wo(H,R,J){let ve=H!=="=="&&H!=="!=";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,Ar);if(!At)return null;if(!zs(ct,At.type))return Ge.concat(1).error(`"${ct}" comparisons are not supported for type '${Ye(At.type)}'.`);let Nt=Ge.parse(Be[2],2,Ar);if(!Nt)return null;if(!zs(ct,Nt.type))return Ge.concat(2).error(`"${ct}" comparisons are not supported for type '${Ye(Nt.type)}'.`);if(At.type.kind!==Nt.type.kind&&At.type.kind!=="value"&&Nt.type.kind!=="value")return Ge.error(`Cannot compare types '${Ye(At.type)}' and '${Ye(Nt.type)}'.`);ve&&(At.type.kind==="value"&&Nt.type.kind!=="value"?At=new ut(Nt.type,[At]):At.type.kind!=="value"&&Nt.type.kind==="value"&&(Nt=new ut(At.type,[Nt])));let ar=null;if(Be.length===4){if(At.type.kind!=="string"&&Nt.type.kind!=="string"&&At.type.kind!=="value"&&Nt.type.kind!=="value")return Ge.error("Cannot use collator to compare non-string types.");if(ar=Ge.parse(Be[3],3,vr),!ar)return null}return new t7(At,Nt,ar)}evaluate(Be){let Ge=this.lhs.evaluate(Be),ct=this.rhs.evaluate(Be);if(ve&&this.hasUntypedArgument){let At=Ia(Ge),Nt=Ia(ct);if(At.kind!==Nt.kind||At.kind!=="string"&&At.kind!=="number")throw new cn(`Expected arguments for "${H}" to be (string, string) or (number, number), but found (${At.kind}, ${Nt.kind}) instead.`)}if(this.collator&&!ve&&this.hasUntypedArgument){let At=Ia(Ge),Nt=Ia(ct);if(At.kind!=="string"||Nt.kind!=="string")return R(Be,Ge,ct)}return this.collator?J(Be,Ge,ct,this.collator.evaluate(Be)):R(Be,Ge,ct)}eachChild(Be){Be(this.lhs),Be(this.rhs),this.collator&&Be(this.collator)}outputDefined(){return!0}}}let Zn=wo("==",function(H,R,J){return R===J},Cn),go=wo("!=",function(H,R,J){return R!==J},function(H,R,J,ve){return!Cn(0,R,J,ve)}),os=wo("<",function(H,R,J){return R",function(H,R,J){return R>J},function(H,R,J,ve){return ve.compare(R,J)>0}),jo=wo("<=",function(H,R,J){return R<=J},function(H,R,J,ve){return ve.compare(R,J)<=0}),Yn=wo(">=",function(H,R,J){return R>=J},function(H,R,J,ve){return ve.compare(R,J)>=0});class Gn{constructor(R,J,ve){this.type=vr,this.locale=ve,this.caseSensitive=R,this.diacriticSensitive=J}static parse(R,J){if(R.length!==2)return J.error("Expected one argument.");let ve=R[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,St),!Ge)?null:new Gn(Ee,Be,Ge)}evaluate(R){return new Fr(this.caseSensitive.evaluate(R),this.diacriticSensitive.evaluate(R),this.locale?this.locale.evaluate(R):null)}eachChild(R){R(this.caseSensitive),R(this.diacriticSensitive),this.locale&&R(this.locale)}outputDefined(){return!1}}class Hn{constructor(R,J,ve,Ee,Be){this.type=St,this.number=R,this.locale=J,this.currency=ve,this.minFractionDigits=Ee,this.maxFractionDigits=Be}static parse(R,J){if(R.length!==3)return J.error("Expected two arguments.");let ve=J.parse(R[1],1,Je);if(!ve)return null;let Ee=R[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,St),!Be))return null;let Ge=null;if(Ee.currency&&(Ge=J.parse(Ee.currency,1,St),!Ge))return null;let ct=null;if(Ee["min-fraction-digits"]&&(ct=J.parse(Ee["min-fraction-digits"],1,Je),!ct))return null;let At=null;return Ee["max-fraction-digits"]&&(At=J.parse(Ee["max-fraction-digits"],1,Je),!At)?null:new Hn(ve,Be,Ge,ct,At)}evaluate(R){return new Intl.NumberFormat(this.locale?this.locale.evaluate(R):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(R):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(R):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(R):void 0}).format(this.number.evaluate(R))}eachChild(R){R(this.number),this.locale&&R(this.locale),this.currency&&R(this.currency),this.minFractionDigits&&R(this.minFractionDigits),this.maxFractionDigits&&R(this.maxFractionDigits)}outputDefined(){return!1}}class ss{constructor(R){this.type=qr,this.sections=R}static parse(R,J){if(R.length<2)return J.error("Expected at least one argument.");let ve=R[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<=R.length-1;++Ge){let ct=R[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,Je),!At))return null;let Nt=null;if(ct["text-font"]&&(Nt=J.parse(ct["text-font"],1,Fe(St)),!Nt))return null;let ar=null;if(ct["text-color"]&&(ar=J.parse(ct["text-color"],1,Bt),!ar))return null;let Mr=Ee[Ee.length-1];Mr.scale=At,Mr.font=Nt,Mr.textColor=ar}else{let At=J.parse(R[Ge],1,Ar);if(!At)return null;let Nt=At.type.kind;if(Nt!=="string"&&Nt!=="value"&&Nt!=="null"&&Nt!=="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 ss(Ee)}evaluate(R){return new ra(this.sections.map(J=>{let ve=J.content.evaluate(R);return Ia(ve)===Ur?new ta("",ve,null,null,null):new ta(rn(ve),null,J.scale?J.scale.evaluate(R):null,J.font?J.font.evaluate(R).join(","):null,J.textColor?J.textColor.evaluate(R):null)}))}eachChild(R){for(let J of this.sections)R(J.content),J.scale&&R(J.scale),J.font&&R(J.font),J.textColor&&R(J.textColor)}outputDefined(){return!1}}class _s{constructor(R){this.type=Ur,this.input=R}static parse(R,J){if(R.length!==2)return J.error("Expected two arguments.");let ve=J.parse(R[1],1,St);return ve?new _s(ve):J.error("No image name provided.")}evaluate(R){let J=this.input.evaluate(R),ve=Za.fromString(J);return ve&&R.availableImages&&(ve.available=R.availableImages.indexOf(J)>-1),ve}eachChild(R){R(this.input)}outputDefined(){return!1}}class ps{constructor(R){this.type=Je,this.input=R}static parse(R,J){if(R.length!==2)return J.error(`Expected 1 argument, but found ${R.length-1} instead.`);let ve=J.parse(R[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 ${Ye(ve.type)} instead.`):new ps(ve):null}evaluate(R){let J=this.input.evaluate(R);if(typeof J=="string")return[...J].length;if(Array.isArray(J))return J.length;throw new cn(`Expected value to be of type string or array, but found ${Ye(Ia(J))} instead.`)}eachChild(R){R(this.input)}outputDefined(){return!1}}let Ko=8192;function Gi(H,R){let J=(180+H[0])/360,ve=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+H[1]*Math.PI/360)))/360,Ee=Math.pow(2,R.z);return[Math.round(J*Ee*Ko),Math.round(ve*Ee*Ko)]}function Pn(H,R){let J=Math.pow(2,R.z);return[(Ee=(H[0]/Ko+R.x)/J,360*Ee-180),(ve=(H[1]/Ko+R.y)/J,360/Math.PI*Math.atan(Math.exp((180-360*ve)*Math.PI/180))-90)];var ve,Ee}function qs(H,R){H[0]=Math.min(H[0],R[0]),H[1]=Math.min(H[1],R[1]),H[2]=Math.max(H[2],R[0]),H[3]=Math.max(H[3],R[1])}function bs(H,R){return!(H[0]<=R[0]||H[2]>=R[2]||H[1]<=R[1]||H[3]>=R[3])}function lo(H,R,J){let ve=H[0]-R[0],Ee=H[1]-R[1],Be=H[0]-J[0],Ge=H[1]-J[1];return ve*Ge-Be*Ee==0&&ve*Be<=0&&Ee*Ge<=0}function Zo(H,R,J,ve){return(Ee=[ve[0]-J[0],ve[1]-J[1]])[0]*(Be=[R[0]-H[0],R[1]-H[1]])[1]-Ee[1]*Be[0]!=0&&!(!To(H,R,J,ve)||!To(J,ve,H,R));var Ee,Be}function ws(H,R,J){for(let ve of J)for(let Ee=0;Ee(Ee=H)[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(H,R){for(let J of R)if(Hs(H,J))return!0;return!1}function yn(H,R){for(let J of H)if(!Hs(J,R))return!1;for(let J=0;J0&&ct<0||Ge<0&&ct>0}function Ws(H,R,J){let ve=[];for(let Ee=0;EeJ[2]){let Ee=.5*ve,Be=H[0]-J[0]>Ee?-ve:J[0]-H[0]>Ee?ve:0;Be===0&&(Be=H[0]-J[2]>Ee?-ve:J[2]-H[0]>Ee?ve:0),H[0]+=Be}qs(R,H)}function Nl(H,R,J,ve){let Ee=Math.pow(2,ve.z)*Ko,Be=[ve.x*Ko,ve.y*Ko],Ge=[];for(let ct of H)for(let At of ct){let Nt=[At.x+Be[0],At.y+Be[1]];uo(Nt,R,J,Ee),Ge.push(Nt)}return Ge}function Ks(H,R,J,ve){let Ee=Math.pow(2,ve.z)*Ko,Be=[ve.x*Ko,ve.y*Ko],Ge=[];for(let At of H){let Nt=[];for(let ar of At){let Mr=[ar.x+Be[0],ar.y+Be[1]];qs(R,Mr),Nt.push(Mr)}Ge.push(Nt)}if(R[2]-R[0]<=Ee/2){(ct=R)[0]=ct[1]=1/0,ct[2]=ct[3]=-1/0;for(let At of Ge)for(let Nt of At)uo(Nt,R,J,Ee)}var ct;return Ge}class Ts{constructor(R,J){this.type=kt,this.geojson=R,this.geometries=J}static parse(R,J){if(R.length!==2)return J.error(`'within' expression requires exactly one argument, but found ${R.length-1} instead.`);if(pi(R[1])){let ve=R[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 Ts(ve,{type:"MultiPolygon",coordinates:Ee})}else if(ve.type==="Feature"){let Ee=ve.geometry.type;if(Ee==="Polygon"||Ee==="MultiPolygon")return new Ts(ve,ve.geometry)}else if(ve.type==="Polygon"||ve.type==="MultiPolygon")return new Ts(ve,ve)}return J.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(R){if(R.geometry()!=null&&R.canonicalID()!=null){if(R.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=Ws(ve.coordinates,Be,Ge),At=Nl(J.geometry(),Ee,Be,Ge);if(!bs(Ee,Be))return!1;for(let Nt of At)if(!Hs(Nt,ct))return!1}if(ve.type==="MultiPolygon"){let ct=Ll(ve.coordinates,Be,Ge),At=Nl(J.geometry(),Ee,Be,Ge);if(!bs(Ee,Be))return!1;for(let Nt of At)if(!il(Nt,ct))return!1}return!0}(R,this.geometries);if(R.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=Ws(ve.coordinates,Be,Ge),At=Ks(J.geometry(),Ee,Be,Ge);if(!bs(Ee,Be))return!1;for(let Nt of At)if(!yn(Nt,ct))return!1}if(ve.type==="MultiPolygon"){let ct=Ll(ve.coordinates,Be,Ge),At=Ks(J.geometry(),Ee,Be,Ge);if(!bs(Ee,Be))return!1;for(let Nt of At)if(!Po(Nt,ct))return!1}return!0}(R,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let Ls=class{constructor(H=[],R=(J,ve)=>Jve?1:0){if(this.data=H,this.length=this.data.length,this.compare=R,this.length>0)for(let J=(this.length>>1)-1;J>=0;J--)this._down(J)}push(H){this.data.push(H),this._up(this.length++)}pop(){if(this.length===0)return;let H=this.data[0],R=this.data.pop();return--this.length>0&&(this.data[0]=R,this._down(0)),H}peek(){return this.data[0]}_up(H){let{data:R,compare:J}=this,ve=R[H];for(;H>0;){let Ee=H-1>>1,Be=R[Ee];if(J(ve,Be)>=0)break;R[H]=Be,H=Ee}R[H]=ve}_down(H){let{data:R,compare:J}=this,ve=this.length>>1,Ee=R[H];for(;H=0)break;R[H]=R[Be],H=Be}R[H]=Ee}};function Jo(H,R,J,ve,Ee){Es(H,R,J,ve||H.length-1,Ee||lu)}function Es(H,R,J,ve,Ee){for(;ve>J;){if(ve-J>600){var Be=ve-J+1,Ge=R-J+1,ct=Math.log(Be),At=.5*Math.exp(2*ct/3),Nt=.5*Math.sqrt(ct*At*(Be-At)/Be)*(Ge-Be/2<0?-1:1);Es(H,R,Math.max(J,Math.floor(R-Ge*At/Be+Nt)),Math.min(ve,Math.floor(R+(Be-Ge)*At/Be+Nt)),Ee)}var ar=H[R],Mr=J,zr=ve;for(Ul(H,J,R),Ee(H[ve],ar)>0&&Ul(H,J,ve);Mr0;)zr--}Ee(H[J],ar)===0?Ul(H,J,zr):Ul(H,++zr,ve),zr<=R&&(J=zr+1),R<=zr&&(ve=zr-1)}}function Ul(H,R,J){var ve=H[R];H[R]=H[J],H[J]=ve}function lu(H,R){return HR?1:0}function Tc(H,R){if(H.length<=1)return[H];let J=[],ve,Ee;for(let Be of H){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),R>1)for(let Be=0;Be1?(Nt=R[At+1][0],ar=R[At+1][1]):Wr>0&&(Nt+=Mr/this.kx*Wr,ar+=zr/this.ky*Wr)),Mr=this.wrap(J[0]-Nt)*this.kx,zr=(J[1]-ar)*this.ky;let ia=Mr*Mr+zr*zr;ia180;)R-=360;return R}}function uu(H,R){return R[0]-H[0]}function Pl(H){return H[1]-H[0]+1}function ic(H,R){return H[1]>=H[0]&&H[1]H[1])return[null,null];let J=Pl(H);if(R){if(J===2)return[H,null];let Ee=Math.floor(J/2);return[[H[0],H[0]+Ee],[H[0]+Ee,H[1]]]}if(J===1)return[H,null];let ve=Math.floor(J/2)-1;return[[H[0],H[0]+ve],[H[0]+ve+1,H[1]]]}function nl(H,R){if(!ic(R,H.length))return[1/0,1/0,-1/0,-1/0];let J=[1/0,1/0,-1/0,-1/0];for(let ve=R[0];ve<=R[1];++ve)qs(J,H[ve]);return J}function vl(H){let R=[1/0,1/0,-1/0,-1/0];for(let J of H)for(let ve of J)qs(R,ve);return R}function As(H){return H[0]!==-1/0&&H[1]!==-1/0&&H[2]!==1/0&&H[3]!==1/0}function Xs(H,R,J){if(!As(H)||!As(R))return NaN;let ve=0,Ee=0;return H[2]R[2]&&(ve=H[0]-R[2]),H[1]>R[3]&&(Ee=H[1]-R[3]),H[3]=ve)return ve;if(bs(Ee,Be)){if(bh(H,R))return 0}else if(bh(R,H))return 0;let Ge=1/0;for(let ct of H)for(let At=0,Nt=ct.length,ar=Nt-1;At0;){let At=Ge.pop();if(At[0]>=Be)continue;let Nt=At[1],ar=R?50:100;if(Pl(Nt)<=ar){if(!ic(Nt,H.length))return NaN;if(R){let Mr=us(H,Nt,J,ve);if(isNaN(Mr)||Mr===0)return Mr;Be=Math.min(Be,Mr)}else for(let Mr=Nt[0];Mr<=Nt[1];++Mr){let zr=xh(H[Mr],J,ve);if(Be=Math.min(Be,zr),Be===0)return 0}}else{let Mr=Ou(Nt,R);to(Ge,Be,ve,H,ct,Mr[0]),to(Ge,Be,ve,H,ct,Mr[1])}}return Be}function ql(H,R,J,ve,Ee,Be=1/0){let Ge=Math.min(Be,Ee.distance(H[0],J[0]));if(Ge===0)return Ge;let ct=new Ls([[0,[0,H.length-1],[0,J.length-1]]],uu);for(;ct.length>0;){let At=ct.pop();if(At[0]>=Ge)continue;let Nt=At[1],ar=At[2],Mr=R?50:100,zr=ve?50:100;if(Pl(Nt)<=Mr&&Pl(ar)<=zr){if(!ic(Nt,H.length)&&ic(ar,J.length))return NaN;let Wr;if(R&&ve)Wr=qu(H,Nt,J,ar,Ee),Ge=Math.min(Ge,Wr);else if(R&&!ve){let ia=H.slice(Nt[0],Nt[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(!R&&ve){let ia=J.slice(ar[0],ar[1]+1);for(let fa=Nt[0];fa<=Nt[1];++fa)if(Wr=nc(H[fa],ia,Ee),Ge=Math.min(Ge,Wr),Ge===0)return Ge}else Wr=fl(H,Nt,J,ar,Ee),Ge=Math.min(Ge,Wr)}else{let Wr=Ou(Nt,R),ia=Ou(ar,ve);Xc(ct,Ge,Ee,H,J,Wr[0],ia[0]),Xc(ct,Ge,Ee,H,J,Wr[0],ia[1]),Xc(ct,Ge,Ee,H,J,Wr[1],ia[0]),Xc(ct,Ge,Ee,H,J,Wr[1],ia[1])}}return Ge}function Mf(H){return H.type==="MultiPolygon"?H.coordinates.map(R=>({type:"Polygon",coordinates:R})):H.type==="MultiLineString"?H.coordinates.map(R=>({type:"LineString",coordinates:R})):H.type==="MultiPoint"?H.coordinates.map(R=>({type:"Point",coordinates:R})):[H]}class Ac{constructor(R,J){this.type=Je,this.geojson=R,this.geometries=J}static parse(R,J){if(R.length!==2)return J.error(`'distance' expression requires exactly one argument, but found ${R.length-1} instead.`);if(pi(R[1])){let ve=R[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(R){if(R.geometry()!=null&&R.canonicalID()!=null){if(R.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 Wc(Be[0][1]),ct=1/0;for(let At of ve){switch(At.type){case"Point":ct=Math.min(ct,ql(Be,!1,[At.coordinates],!1,Ge,ct));break;case"LineString":ct=Math.min(ct,ql(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}(R,this.geometries);if(R.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 Wc(Be[0][1]),ct=1/0;for(let At of ve){switch(At.type){case"Point":ct=Math.min(ct,ql(Be,!0,[At.coordinates],!1,Ge,ct));break;case"LineString":ct=Math.min(ct,ql(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}(R,this.geometries);if(R.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(Nt=>Nt.map(ar=>Pn([ar.x,ar.y],J.canonical)))),Ge=new Wc(Be[0][0][0][1]),ct=1/0;for(let At of ve)for(let Nt of Be){switch(At.type){case"Point":ct=Math.min(ct,Vu([At.coordinates],!1,Nt,Ge,ct));break;case"LineString":ct=Math.min(ct,Vu(At.coordinates,!0,Nt,Ge,ct));break;case"Polygon":ct=Math.min(ct,Ps(Nt,At.coordinates,Ge,ct))}if(ct===0)return ct}return ct}(R,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}let nf={"==":Zn,"!=":go,">":ys,"<":os,">=":Yn,"<=":jo,array:ut,at:Kt,boolean:ut,case:Pa,coalesce:bo,collator:Gn,format:ss,image:_s,in:mr,"index-of":Ir,interpolate:ao,"interpolate-hcl":ao,"interpolate-lab":ao,length:ps,let:Hr,literal:tn,match:va,number:ut,"number-format":Hn,object:ut,slice:ga,step:ba,string:ut,"to-boolean":Cr,"to-color":Cr,"to-number":Cr,"to-string":Cr,var:gt,within:Ts,distance:Ac};class Ql{constructor(R,J,ve,Ee){this.name=R,this.type=J,this._evaluate=ve,this.args=Ee}evaluate(R){return this._evaluate(R,this.args)}eachChild(R){this.args.forEach(R)}outputDefined(){return!1}static parse(R,J){let ve=R[0],Ee=Ql.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(([Nt])=>!Array.isArray(Nt)||Nt.length===R.length-1),At=null;for(let[Nt,ar]of ct){At=new Nr(J.registry,Bf,J.path,null,J.scope);let Mr=[],zr=!1;for(let Wr=1;Wr{return zr=Mr,Array.isArray(zr)?`(${zr.map(Ye).join(", ")})`:`(${Ye(zr.type)}...)`;var zr}).join(" | "),ar=[];for(let Mr=1;Mr{J=R?J&&Bf(ve):J&&ve instanceof tn}),!!J&&Nf(H)&&Ef(H,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}function Nf(H){if(H instanceof Ql&&(H.name==="get"&&H.args.length===1||H.name==="feature-state"||H.name==="has"&&H.args.length===1||H.name==="properties"||H.name==="geometry-type"||H.name==="id"||/^filter-/.test(H.name))||H instanceof Ts||H instanceof Ac)return!1;let R=!0;return H.eachChild(J=>{R&&!Nf(J)&&(R=!1)}),R}function Gu(H){if(H instanceof Ql&&H.name==="feature-state")return!1;let R=!0;return H.eachChild(J=>{R&&!Gu(J)&&(R=!1)}),R}function Ef(H,R){if(H instanceof Ql&&R.indexOf(H.name)>=0)return!1;let J=!0;return H.eachChild(ve=>{J&&!Ef(ve,R)&&(J=!1)}),J}function oc(H){return{result:"success",value:H}}function Zc(H){return{result:"error",value:H}}function eu(H){return H["property-type"]==="data-driven"||H["property-type"]==="cross-faded-data-driven"}function qc(H){return!!H.expression&&H.expression.parameters.indexOf("zoom")>-1}function Sc(H){return!!H.expression&&H.expression.interpolated}function Zs(H){return H instanceof Number?"number":H instanceof String?"string":H instanceof Boolean?"boolean":Array.isArray(H)?"array":H===null?"null":typeof H}function kf(H){return typeof H=="object"&&H!==null&&!Array.isArray(H)}function fh(H){return H}function Uf(H,R){let J=R.type==="color",ve=H.stops&&typeof H.stops[0][0]=="object",Ee=ve||!(ve||H.property!==void 0),Be=H.type||(Sc(R)?"exponential":"interval");if(J||R.type==="padding"){let ar=J?Jt.parse:ca.parse;(H=ne({},H)).stops&&(H.stops=H.stops.map(Mr=>[Mr[0],ar(Mr[1])])),H.default=ar(H.default?H.default:R.default)}if(H.colorSpace&&(Ge=H.colorSpace)!=="rgb"&&Ge!=="hcl"&&Ge!=="lab")throw new Error(`Unknown color space: "${H.colorSpace}"`);var Ge;let ct,At,Nt;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 H.stops)At[ar[0]]=ar[1];Nt=typeof H.stops[0][0]}else{if(Be!=="identity")throw new Error(`Unknown function type "${Be}"`);ct=ml}if(ve){let ar={},Mr=[];for(let ia=0;iaia[0]),evaluate:({zoom:ia},fa)=>jf({stops:zr,base:H.base},R,ia).evaluate(ia,fa)}}if(Ee){let ar=Be==="exponential"?{name:"exponential",base:H.base!==void 0?H.base:1}:null;return{kind:"camera",interpolationType:ar,interpolationFactor:ao.interpolationFactor.bind(void 0,ar),zoomStops:H.stops.map(Mr=>Mr[0]),evaluate:({zoom:Mr})=>ct(H,R,Mr,At,Nt)}}return{kind:"source",evaluate(ar,Mr){let zr=Mr&&Mr.properties?Mr.properties[H.property]:void 0;return zr===void 0?Yc(H.default,R.default):ct(H,R,zr,At,Nt)}}}function Yc(H,R,J){return H!==void 0?H:R!==void 0?R:J!==void 0?J:void 0}function $f(H,R,J,ve,Ee){return Yc(typeof J===Ee?ve[J]:void 0,H.default,R.default)}function Cu(H,R,J){if(Zs(J)!=="number")return Yc(H.default,R.default);let ve=H.stops.length;if(ve===1||J<=H.stops[0][0])return H.stops[0][1];if(J>=H.stops[ve-1][0])return H.stops[ve-1][1];let Ee=la(H.stops.map(Be=>Be[0]),J);return H.stops[Ee][1]}function jf(H,R,J){let ve=H.base!==void 0?H.base:1;if(Zs(J)!=="number")return Yc(H.default,R.default);let Ee=H.stops.length;if(Ee===1||J<=H.stops[0][0])return H.stops[0][1];if(J>=H.stops[Ee-1][0])return H.stops[Ee-1][1];let Be=la(H.stops.map(ar=>ar[0]),J),Ge=function(ar,Mr,zr,Wr){let ia=Wr-zr,fa=ar-zr;return ia===0?0:Mr===1?fa/ia:(Math.pow(Mr,fa)-1)/(Math.pow(Mr,ia)-1)}(J,ve,H.stops[Be][0],H.stops[Be+1][0]),ct=H.stops[Be][1],At=H.stops[Be+1][1],Nt=kn[R.type]||fh;return typeof ct.evaluate=="function"?{evaluate(...ar){let Mr=ct.evaluate.apply(void 0,ar),zr=At.evaluate.apply(void 0,ar);if(Mr!==void 0&&zr!==void 0)return Nt(Mr,zr,Ge,H.colorSpace)}}:Nt(ct,At,Ge,H.colorSpace)}function ml(H,R,J){switch(R.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:Zs(J)===R.type||R.type==="enum"&&R.values[J]||(J=void 0)}return Yc(J,H.default,R.default)}Ql.register(nf,{error:[{kind:"error"},[St],(H,[R])=>{throw new cn(R.evaluate(H))}],typeof:[St,[Ar],(H,[R])=>Ye(Ia(R.evaluate(H)))],"to-rgba":[Fe(Je,4),[Bt],(H,[R])=>{let[J,ve,Ee,Be]=R.evaluate(H).rgb;return[255*J,255*ve,255*Ee,Be]}],rgb:[Bt,[Je,Je,Je],Jf],rgba:[Bt,[Je,Je,Je,Je],Jf],has:{type:kt,overloads:[[[St],(H,[R])=>Of(R.evaluate(H),H.properties())],[[St,Vt],(H,[R,J])=>Of(R.evaluate(H),J.evaluate(H))]]},get:{type:Ar,overloads:[[[St],(H,[R])=>of(R.evaluate(H),H.properties())],[[St,Vt],(H,[R,J])=>of(R.evaluate(H),J.evaluate(H))]]},"feature-state":[Ar,[St],(H,[R])=>of(R.evaluate(H),H.featureState||{})],properties:[Vt,[],H=>H.properties()],"geometry-type":[St,[],H=>H.geometryType()],id:[Ar,[],H=>H.id()],zoom:[Je,[],H=>H.globals.zoom],"heatmap-density":[Je,[],H=>H.globals.heatmapDensity||0],"line-progress":[Je,[],H=>H.globals.lineProgress||0],accumulated:[Ar,[],H=>H.globals.accumulated===void 0?null:H.globals.accumulated],"+":[Je,jc(Je),(H,R)=>{let J=0;for(let ve of R)J+=ve.evaluate(H);return J}],"*":[Je,jc(Je),(H,R)=>{let J=1;for(let ve of R)J*=ve.evaluate(H);return J}],"-":{type:Je,overloads:[[[Je,Je],(H,[R,J])=>R.evaluate(H)-J.evaluate(H)],[[Je],(H,[R])=>-R.evaluate(H)]]},"/":[Je,[Je,Je],(H,[R,J])=>R.evaluate(H)/J.evaluate(H)],"%":[Je,[Je,Je],(H,[R,J])=>R.evaluate(H)%J.evaluate(H)],ln2:[Je,[],()=>Math.LN2],pi:[Je,[],()=>Math.PI],e:[Je,[],()=>Math.E],"^":[Je,[Je,Je],(H,[R,J])=>Math.pow(R.evaluate(H),J.evaluate(H))],sqrt:[Je,[Je],(H,[R])=>Math.sqrt(R.evaluate(H))],log10:[Je,[Je],(H,[R])=>Math.log(R.evaluate(H))/Math.LN10],ln:[Je,[Je],(H,[R])=>Math.log(R.evaluate(H))],log2:[Je,[Je],(H,[R])=>Math.log(R.evaluate(H))/Math.LN2],sin:[Je,[Je],(H,[R])=>Math.sin(R.evaluate(H))],cos:[Je,[Je],(H,[R])=>Math.cos(R.evaluate(H))],tan:[Je,[Je],(H,[R])=>Math.tan(R.evaluate(H))],asin:[Je,[Je],(H,[R])=>Math.asin(R.evaluate(H))],acos:[Je,[Je],(H,[R])=>Math.acos(R.evaluate(H))],atan:[Je,[Je],(H,[R])=>Math.atan(R.evaluate(H))],min:[Je,jc(Je),(H,R)=>Math.min(...R.map(J=>J.evaluate(H)))],max:[Je,jc(Je),(H,R)=>Math.max(...R.map(J=>J.evaluate(H)))],abs:[Je,[Je],(H,[R])=>Math.abs(R.evaluate(H))],round:[Je,[Je],(H,[R])=>{let J=R.evaluate(H);return J<0?-Math.round(-J):Math.round(J)}],floor:[Je,[Je],(H,[R])=>Math.floor(R.evaluate(H))],ceil:[Je,[Je],(H,[R])=>Math.ceil(R.evaluate(H))],"filter-==":[kt,[St,Ar],(H,[R,J])=>H.properties()[R.value]===J.value],"filter-id-==":[kt,[Ar],(H,[R])=>H.id()===R.value],"filter-type-==":[kt,[St],(H,[R])=>H.geometryType()===R.value],"filter-<":[kt,[St,Ar],(H,[R,J])=>{let ve=H.properties()[R.value],Ee=J.value;return typeof ve==typeof Ee&&ve{let J=H.id(),ve=R.value;return typeof J==typeof ve&&J":[kt,[St,Ar],(H,[R,J])=>{let ve=H.properties()[R.value],Ee=J.value;return typeof ve==typeof Ee&&ve>Ee}],"filter-id->":[kt,[Ar],(H,[R])=>{let J=H.id(),ve=R.value;return typeof J==typeof ve&&J>ve}],"filter-<=":[kt,[St,Ar],(H,[R,J])=>{let ve=H.properties()[R.value],Ee=J.value;return typeof ve==typeof Ee&&ve<=Ee}],"filter-id-<=":[kt,[Ar],(H,[R])=>{let J=H.id(),ve=R.value;return typeof J==typeof ve&&J<=ve}],"filter->=":[kt,[St,Ar],(H,[R,J])=>{let ve=H.properties()[R.value],Ee=J.value;return typeof ve==typeof Ee&&ve>=Ee}],"filter-id->=":[kt,[Ar],(H,[R])=>{let J=H.id(),ve=R.value;return typeof J==typeof ve&&J>=ve}],"filter-has":[kt,[Ar],(H,[R])=>R.value in H.properties()],"filter-has-id":[kt,[],H=>H.id()!==null&&H.id()!==void 0],"filter-type-in":[kt,[Fe(St)],(H,[R])=>R.value.indexOf(H.geometryType())>=0],"filter-id-in":[kt,[Fe(Ar)],(H,[R])=>R.value.indexOf(H.id())>=0],"filter-in-small":[kt,[St,Fe(Ar)],(H,[R,J])=>J.value.indexOf(H.properties()[R.value])>=0],"filter-in-large":[kt,[St,Fe(Ar)],(H,[R,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}(H.properties()[R.value],J.value,0,J.value.length-1)],all:{type:kt,overloads:[[[kt,kt],(H,[R,J])=>R.evaluate(H)&&J.evaluate(H)],[jc(kt),(H,R)=>{for(let J of R)if(!J.evaluate(H))return!1;return!0}]]},any:{type:kt,overloads:[[[kt,kt],(H,[R,J])=>R.evaluate(H)||J.evaluate(H)],[jc(kt),(H,R)=>{for(let J of R)if(J.evaluate(H))return!0;return!1}]]},"!":[kt,[kt],(H,[R])=>!R.evaluate(H)],"is-supported-script":[kt,[St],(H,[R])=>{let J=H.globals&&H.globals.isSupportedScript;return!J||J(R.evaluate(H))}],upcase:[St,[St],(H,[R])=>R.evaluate(H).toUpperCase()],downcase:[St,[St],(H,[R])=>R.evaluate(H).toLowerCase()],concat:[St,jc(Ar),(H,R)=>R.map(J=>rn(J.evaluate(H))).join("")],"resolved-locale":[St,[vr],(H,[R])=>R.evaluate(H).resolvedLocale()]});class Lu{constructor(R,J){var ve;this.expression=R,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(R,J,ve,Ee,Be,Ge){return this._evaluator.globals=R,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(R,J,ve,Ee,Be,Ge){this._evaluator.globals=R,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 cn(`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(H){return Array.isArray(H)&&H.length>0&&typeof H[0]=="string"&&H[0]in nf}function ol(H,R){let J=new Nr(nf,Bf,[],R?function(Ee){let Be={color:Bt,string:St,number:Je,enum:St,boolean:kt,formatted:qr,padding:kr,resolvedImage:Ur,variableAnchorOffsetCollection:_t};return Ee.type==="array"?Fe(Be[Ee.value]||Ar,Ee.length):Be[Ee.type]}(R):void 0),ve=J.parse(H,void 0,void 0,void 0,R&&R.type==="string"?{typeAnnotation:"coerce"}:void 0);return ve?oc(new Lu(ve,R)):Zc(J.errors)}class vc{constructor(R,J){this.kind=R,this._styleExpression=J,this.isStateDependent=R!=="constant"&&!Gu(J.expression)}evaluateWithoutErrorHandling(R,J,ve,Ee,Be,Ge){return this._styleExpression.evaluateWithoutErrorHandling(R,J,ve,Ee,Be,Ge)}evaluate(R,J,ve,Ee,Be,Ge){return this._styleExpression.evaluate(R,J,ve,Ee,Be,Ge)}}class yu{constructor(R,J,ve,Ee){this.kind=R,this.zoomStops=ve,this._styleExpression=J,this.isStateDependent=R!=="camera"&&!Gu(J.expression),this.interpolationType=Ee}evaluateWithoutErrorHandling(R,J,ve,Ee,Be,Ge){return this._styleExpression.evaluateWithoutErrorHandling(R,J,ve,Ee,Be,Ge)}evaluate(R,J,ve,Ee,Be,Ge){return this._styleExpression.evaluate(R,J,ve,Ee,Be,Ge)}interpolationFactor(R,J,ve){return this.interpolationType?ao.interpolationFactor(this.interpolationType,R,J,ve):0}}function Tu(H,R){let J=ol(H,R);if(J.result==="error")return J;let ve=J.value.expression,Ee=Nf(ve);if(!Ee&&!eu(R))return Zc([new Ce("","data expressions not supported")]);let Be=Ef(ve,["zoom"]);if(!Be&&!qc(R))return Zc([new Ce("","zoom expressions not supported")]);let Ge=qf(ve);return Ge||Be?Ge instanceof Ce?Zc([Ge]):Ge instanceof ao&&!Sc(R)?Zc([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)):Zc([new Ce("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class Ml{constructor(R,J){this._parameters=R,this._specification=J,ne(this,Uf(this._parameters,this._specification))}static deserialize(R){return new Ml(R._parameters,R._specification)}static serialize(R){return{_parameters:R._parameters,_specification:R._specification}}}function qf(H){let R=null;if(H instanceof Hr)R=qf(H.result);else if(H instanceof bo){for(let J of H.args)if(R=qf(J),R)break}else(H instanceof ba||H instanceof ao)&&H.input instanceof Ql&&H.input.name==="zoom"&&(R=H);return R instanceof Ce||H.eachChild(J=>{let ve=qf(J);ve instanceof Ce?R=ve:!R&&ve?R=new Ce("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):R&&ve&&R!==ve&&(R=new Ce("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),R}function Qf(H){if(H===!0||H===!1)return!0;if(!Array.isArray(H)||H.length===0)return!1;switch(H[0]){case"has":return H.length>=2&&H[1]!=="$id"&&H[1]!=="$type";case"in":return H.length>=3&&(typeof H[1]!="string"||Array.isArray(H[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return H.length!==3||Array.isArray(H[1])||Array.isArray(H[2]);case"any":case"all":for(let R of H.slice(1))if(!Qf(R)&&typeof R!="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(H){if(H==null)return{filter:()=>!0,needGeometry:!1};Qf(H)||(H=sf(H));let R=ol(H,Bu);if(R.result==="error")throw new Error(R.value.map(J=>`${J.key}: ${J.message}`).join(", "));return{filter:(J,ve,Ee)=>R.value.evaluate(J,ve,{},Ee),needGeometry:Lh(H)}}function mc(H,R){return HR?1:0}function Lh(H){if(!Array.isArray(H))return!1;if(H[0]==="within"||H[0]==="distance")return!0;for(let R=1;R"||R==="<="||R===">="?vf(H[1],H[2],R):R==="any"?(J=H.slice(1),["any"].concat(J.map(sf))):R==="all"?["all"].concat(H.slice(1).map(sf)):R==="none"?["all"].concat(H.slice(1).map(sf).map(iu)):R==="in"?Nu(H[1],H.slice(2)):R==="!in"?iu(Nu(H[1],H.slice(2))):R==="has"?lf(H[1]):R!=="!has"||iu(lf(H[1]));var J}function vf(H,R,J){switch(H){case"$type":return[`filter-type-${J}`,R];case"$id":return[`filter-id-${J}`,R];default:return[`filter-${J}`,H,R]}}function Nu(H,R){if(R.length===0)return!1;switch(H){case"$type":return["filter-type-in",["literal",R]];case"$id":return["filter-id-in",["literal",R]];default:return R.length>200&&!R.some(J=>typeof J!=typeof R[0])?["filter-in-large",H,["literal",R.sort(mc)]]:["filter-in-small",H,["literal",R]]}}function lf(H){switch(H){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",H]}}function iu(H){return["!",H]}function Kc(H){let R=typeof H;if(R==="number"||R==="boolean"||R==="string"||H==null)return JSON.stringify(H);if(Array.isArray(H)){let Ee="[";for(let Be of H)Ee+=`${Kc(Be)},`;return`${Ee}]`}let J=Object.keys(H).sort(),ve="{";for(let Ee=0;Eeve.maximum?[new se(R,J,`${J} is greater than the maximum value ${ve.maximum}`)]:[]}function uf(H){let R=H.valueSpec,J=sl(H.value.type),ve,Ee,Be,Ge={},ct=J!=="categorical"&&H.value.property===void 0,At=!ct,Nt=Zs(H.value.stops)==="array"&&Zs(H.value.stops[0])==="array"&&Zs(H.value.stops[0][0])==="object",ar=Pu({key:H.key,value:H.value,valueSpec:H.styleSpec.function,validateSpec:H.validateSpec,style:H.style,styleSpec:H.styleSpec,objectElementValidators:{stops:function(Wr){if(J==="identity")return[new se(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:Mr})),Zs(fa)==="array"&&fa.length===0&&ia.push(new se(Wr.key,fa,"array must have at least one stop")),ia},default:function(Wr){return Wr.validateSpec({key:Wr.key,value:Wr.value,valueSpec:R,validateSpec:Wr.validateSpec,style:Wr.style,styleSpec:Wr.styleSpec})}}});return J==="identity"&&ct&&ar.push(new se(H.key,H.value,'missing required property "property"')),J==="identity"||H.value.stops||ar.push(new se(H.key,H.value,'missing required property "stops"')),J==="exponential"&&H.valueSpec.expression&&!Sc(H.valueSpec)&&ar.push(new se(H.key,H.value,"exponential functions not supported")),H.styleSpec.$version>=8&&(At&&!eu(H.valueSpec)?ar.push(new se(H.key,H.value,"property functions not supported")):ct&&!qc(H.valueSpec)&&ar.push(new se(H.key,H.value,"zoom functions not supported"))),J!=="categorical"&&!Nt||H.value.property!==void 0||ar.push(new se(H.key,H.value,'"property" property is required')),ar;function Mr(Wr){let ia=[],fa=Wr.value,ja=Wr.key;if(Zs(fa)!=="array")return[new se(ja,fa,`array expected, ${Zs(fa)} found`)];if(fa.length!==2)return[new se(ja,fa,`array length 2 expected, length ${fa.length} found`)];if(Nt){if(Zs(fa[0])!=="object")return[new se(ja,fa,`object expected, ${Zs(fa[0])} found`)];if(fa[0].zoom===void 0)return[new se(ja,fa,"object stop key must have zoom")];if(fa[0].value===void 0)return[new se(ja,fa,"object stop key must have value")];if(Be&&Be>sl(fa[0].zoom))return[new se(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 se(`${ja}[1]`,fa[1],"expressions are not allowed in function stops.")]):ia.concat(Wr.validateSpec({key:`${ja}[1]`,value:fa[1],valueSpec:R,validateSpec:Wr.validateSpec,style:Wr.style,styleSpec:Wr.styleSpec}))}function zr(Wr,ia){let fa=Zs(Wr.value),ja=sl(Wr.value),Ka=Wr.value!==null?Wr.value:ia;if(ve){if(fa!==ve)return[new se(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 se(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 eu(R)&&J===void 0&&(Wi+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new se(Wr.key,Ka,Wi)]}return J!=="categorical"||fa!=="number"||isFinite(ja)&&Math.floor(ja)===ja?J!=="categorical"&&fa==="number"&&Ee!==void 0&&janew se(`${H.key}${ve.key}`,H.value,ve.message));let J=R.value.expression||R.value._styleExpression.expression;if(H.expressionContext==="property"&&H.propertyKey==="text-font"&&!J.outputDefined())return[new se(H.key,H.value,`Invalid data expression for "${H.propertyKey}". Output values must be contained as literals within the expression.`)];if(H.expressionContext==="property"&&H.propertyType==="layout"&&!Gu(J))return[new se(H.key,H.value,'"feature-state" data expressions are not supported with layout properties.')];if(H.expressionContext==="filter"&&!Gu(J))return[new se(H.key,H.value,'"feature-state" data expressions are not supported with filters.')];if(H.expressionContext&&H.expressionContext.indexOf("cluster")===0){if(!Ef(J,["zoom","feature-state"]))return[new se(H.key,H.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(H.expressionContext==="cluster-initial"&&!Nf(J))return[new se(H.key,H.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Hu(H){let R=H.key,J=H.value,ve=H.valueSpec,Ee=[];return Array.isArray(ve.values)?ve.values.indexOf(sl(J))===-1&&Ee.push(new se(R,J,`expected one of [${ve.values.join(", ")}], ${JSON.stringify(J)} found`)):Object.keys(ve.values).indexOf(sl(J))===-1&&Ee.push(new se(R,J,`expected one of [${Object.keys(ve.values).join(", ")}], ${JSON.stringify(J)} found`)),Ee}function gf(H){return Qf(_u(H.value))?kc(ne({},H,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Wu(H)}function Wu(H){let R=H.value,J=H.key;if(Zs(R)!=="array")return[new se(J,R,`array expected, ${Zs(R)} found`)];let ve=H.styleSpec,Ee,Be=[];if(R.length<1)return[new se(J,R,"filter array must have at least 1 element")];switch(Be=Be.concat(Hu({key:`${J}[0]`,value:R[0],valueSpec:ve.filter_operator,style:H.style,styleSpec:H.styleSpec})),sl(R[0])){case"<":case"<=":case">":case">=":R.length>=2&&sl(R[1])==="$type"&&Be.push(new se(J,R,`"$type" cannot be use with operator "${R[0]}"`));case"==":case"!=":R.length!==3&&Be.push(new se(J,R,`filter array for operator "${R[0]}" must have 3 elements`));case"in":case"!in":R.length>=2&&(Ee=Zs(R[1]),Ee!=="string"&&Be.push(new se(`${J}[1]`,R[1],`string expected, ${Ee} found`)));for(let Ge=2;Ge{Nt in J&&R.push(new se(ve,J[Nt],`"${Nt}" is prohibited for ref layers`))}),Ee.layers.forEach(Nt=>{sl(Nt.id)===ct&&(At=Nt)}),At?At.ref?R.push(new se(ve,J.ref,"ref cannot reference another ref layer")):Ge=sl(At.type):R.push(new se(ve,J.ref,`ref layer "${ct}" not found`))}else if(Ge!=="background")if(J.source){let At=Ee.sources&&Ee.sources[J.source],Nt=At&&sl(At.type);At?Nt==="vector"&&Ge==="raster"?R.push(new se(ve,J.source,`layer "${J.id}" requires a raster source`)):Nt!=="raster-dem"&&Ge==="hillshade"?R.push(new se(ve,J.source,`layer "${J.id}" requires a raster-dem source`)):Nt==="raster"&&Ge!=="raster"?R.push(new se(ve,J.source,`layer "${J.id}" requires a vector source`)):Nt!=="vector"||J["source-layer"]?Nt==="raster-dem"&&Ge!=="hillshade"?R.push(new se(ve,J.source,"raster-dem source can only be used with layer type 'hillshade'.")):Ge!=="line"||!J.paint||!J.paint["line-gradient"]||Nt==="geojson"&&At.lineMetrics||R.push(new se(ve,J,`layer "${J.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):R.push(new se(ve,J,`layer "${J.id}" must specify a "source-layer"`)):R.push(new se(ve,J.source,`source "${J.source}" not found`))}else R.push(new se(ve,J,'missing required property "source"'));return R=R.concat(Pu({key:ve,value:J,valueSpec:Be.layer,style:H.style,styleSpec:H.styleSpec,validateSpec:H.validateSpec,objectElementValidators:{"*":()=>[],type:()=>H.validateSpec({key:`${ve}.type`,value:J.type,valueSpec:Be.layer.type,style:H.style,styleSpec:H.styleSpec,validateSpec:H.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:{"*":Nt=>nu(ne({layerType:Ge},Nt))}}),paint:At=>Pu({layer:J,key:At.key,value:At.value,style:At.style,styleSpec:At.styleSpec,validateSpec:At.validateSpec,objectElementValidators:{"*":Nt=>Lf(ne({layerType:Ge},Nt))}})}})),R}function Xu(H){let R=H.value,J=H.key,ve=Zs(R);return ve!=="string"?[new se(J,R,`string expected, ${ve} found`)]:[]}let Cc={promoteId:function({key:H,value:R}){if(Zs(R)==="string")return Xu({key:H,value:R});{let J=[];for(let ve in R)J.push(...Xu({key:`${H}.${ve}`,value:R[ve]}));return J}}};function gc(H){let R=H.value,J=H.key,ve=H.styleSpec,Ee=H.style,Be=H.validateSpec;if(!R.type)return[new se(J,R,'"type" is required')];let Ge=sl(R.type),ct;switch(Ge){case"vector":case"raster":return ct=Pu({key:J,value:R,valueSpec:ve[`source_${Ge.replace("-","_")}`],style:H.style,styleSpec:ve,objectElementValidators:Cc,validateSpec:Be}),ct;case"raster-dem":return ct=function(At){var Nt;let ar=(Nt=At.sourceName)!==null&&Nt!==void 0?Nt:"",Mr=At.value,zr=At.styleSpec,Wr=zr.source_raster_dem,ia=At.style,fa=[],ja=Zs(Mr);if(Mr===void 0)return fa;if(ja!=="object")return fa.push(new se("source_raster_dem",Mr,`object expected, ${ja} found`)),fa;let Ka=sl(Mr.encoding)==="custom",Wi=["redFactor","greenFactor","blueFactor","baseShift"],gi=At.value.encoding?`"${At.value.encoding}"`:"Default";for(let qi in Mr)!Ka&&Wi.includes(qi)?fa.push(new se(qi,Mr[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:Mr[qi],valueSpec:Wr[qi],validateSpec:At.validateSpec,style:ia,styleSpec:zr})):fa.push(new se(qi,Mr[qi],`unknown property "${qi}"`));return fa}({sourceName:J,value:R,style:H.style,styleSpec:ve,validateSpec:Be}),ct;case"geojson":if(ct=Pu({key:J,value:R,valueSpec:ve.source_geojson,style:Ee,styleSpec:ve,validateSpec:Be,objectElementValidators:Cc}),R.cluster)for(let At in R.clusterProperties){let[Nt,ar]=R.clusterProperties[At],Mr=typeof Nt=="string"?[Nt,["accumulated"],["get",At]]:Nt;ct.push(...kc({key:`${J}.${At}.map`,value:ar,validateSpec:Be,expressionContext:"cluster-map"})),ct.push(...kc({key:`${J}.${At}.reduce`,value:Mr,validateSpec:Be,expressionContext:"cluster-reduce"}))}return ct;case"video":return Pu({key:J,value:R,valueSpec:ve.source_video,style:Ee,validateSpec:Be,styleSpec:ve});case"image":return Pu({key:J,value:R,valueSpec:ve.source_image,style:Ee,validateSpec:Be,styleSpec:ve});case"canvas":return[new se(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:R.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:Ee,validateSpec:Be,styleSpec:ve})}}function Vl(H){let R=H.value,J=H.styleSpec,ve=J.light,Ee=H.style,Be=[],Ge=Zs(R);if(R===void 0)return Be;if(Ge!=="object")return Be=Be.concat([new se("light",R,`object expected, ${Ge} found`)]),Be;for(let ct in R){let At=ct.match(/^(.*)-transition$/);Be=Be.concat(At&&ve[At[1]]&&ve[At[1]].transition?H.validateSpec({key:ct,value:R[ct],valueSpec:J.transition,validateSpec:H.validateSpec,style:Ee,styleSpec:J}):ve[ct]?H.validateSpec({key:ct,value:R[ct],valueSpec:ve[ct],validateSpec:H.validateSpec,style:Ee,styleSpec:J}):[new se(ct,R[ct],`unknown property "${ct}"`)])}return Be}function xu(H){let R=H.value,J=H.styleSpec,ve=J.sky,Ee=H.style,Be=Zs(R);if(R===void 0)return[];if(Be!=="object")return[new se("sky",R,`object expected, ${Be} found`)];let Ge=[];for(let ct in R)Ge=Ge.concat(ve[ct]?H.validateSpec({key:ct,value:R[ct],valueSpec:ve[ct],style:Ee,styleSpec:J}):[new se(ct,R[ct],`unknown property "${ct}"`)]);return Ge}function Lc(H){let R=H.value,J=H.styleSpec,ve=J.terrain,Ee=H.style,Be=[],Ge=Zs(R);if(R===void 0)return Be;if(Ge!=="object")return Be=Be.concat([new se("terrain",R,`object expected, ${Ge} found`)]),Be;for(let ct in R)Be=Be.concat(ve[ct]?H.validateSpec({key:ct,value:R[ct],valueSpec:ve[ct],validateSpec:H.validateSpec,style:Ee,styleSpec:J}):[new se(ct,R[ct],`unknown property "${ct}"`)]);return Be}function $c(H){let R=[],J=H.value,ve=H.key;if(Array.isArray(J)){let Ee=[],Be=[];for(let Ge in J)J[Ge].id&&Ee.includes(J[Ge].id)&&R.push(new se(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)&&R.push(new se(ve,J,`all the sprites' URLs must be unique, but ${J[Ge].url} is duplicated`)),Be.push(J[Ge].url),R=R.concat(Pu({key:`${ve}[${Ge}]`,value:J[Ge],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:H.validateSpec}));return R}return Xu({key:ve,value:J})}let sc={"*":()=>[],array:Cf,boolean:function(H){let R=H.value,J=H.key,ve=Zs(R);return ve!=="boolean"?[new se(J,R,`boolean expected, ${ve} found`)]:[]},number:hl,color:function(H){let R=H.key,J=H.value,ve=Zs(J);return ve!=="string"?[new se(R,J,`color expected, ${ve} found`)]:Jt.parse(String(J))?[]:[new se(R,J,`color expected, "${J}" found`)]},constants:mf,enum:Hu,filter:gf,function:uf,layer:Vf,object:Pu,source:gc,light:Vl,sky:xu,terrain:Lc,projection:function(H){let R=H.value,J=H.styleSpec,ve=J.projection,Ee=H.style,Be=Zs(R);if(R===void 0)return[];if(Be!=="object")return[new se("projection",R,`object expected, ${Be} found`)];let Ge=[];for(let ct in R)Ge=Ge.concat(ve[ct]?H.validateSpec({key:ct,value:R[ct],valueSpec:ve[ct],style:Ee,styleSpec:J}):[new se(ct,R[ct],`unknown property "${ct}"`)]);return Ge},string:Xu,formatted:function(H){return Xu(H).length===0?[]:kc(H)},resolvedImage:function(H){return Xu(H).length===0?[]:kc(H)},padding:function(H){let R=H.key,J=H.value;if(Zs(J)==="array"){if(J.length<1||J.length>4)return[new se(R,J,`padding requires 1 to 4 values; ${J.length} values found`)];let ve={type:"number"},Ee=[];for(let Be=0;Be[]}})),H.constants&&(J=J.concat(mf({key:"constants",value:H.constants,style:H,styleSpec:R,validateSpec:Pc}))),$r(J)}function aa(H){return function(R){return H(vs(So({},R),{validateSpec:Pc}))}}function $r(H){return[].concat(H).sort((R,J)=>R.line-J.line)}function ka(H){return function(...R){return $r(H.apply(this,R))}}xr.source=ka(aa(gc)),xr.sprite=ka(aa($c)),xr.glyphs=ka(aa(Qt)),xr.light=ka(aa(Vl)),xr.sky=ka(aa(xu)),xr.terrain=ka(aa(Lc)),xr.layer=ka(aa(Vf)),xr.filter=ka(aa(gf)),xr.paintProperty=ka(aa(Lf)),xr.layoutProperty=ka(aa(nu));let li=xr,Ci=li.light,Hi=li.sky,Qi=li.paintProperty,pn=li.layoutProperty;function Pi(H,R){let J=!1;if(R&&R.length)for(let ve of R)H.fire(new j(new Error(ve.message))),J=!0;return J}class Di{constructor(R,J,ve){let Ee=this.cells=[];if(R instanceof ArrayBuffer){this.arrayBuffer=R;let Ge=new Int32Array(this.arrayBuffer);R=Ge[0],this.d=(J=Ge[1])+2*(ve=Ge[2]);for(let At=0;At=Mr[ia+0]&&Ee>=Mr[ia+1])?(ct[Wr]=!0,Ge.push(ar[Wr])):ct[Wr]=!1}}}}_forEachCell(R,J,ve,Ee,Be,Ge,ct,At){let Nt=this._convertToCellCoord(R),ar=this._convertToCellCoord(J),Mr=this._convertToCellCoord(ve),zr=this._convertToCellCoord(Ee);for(let Wr=Nt;Wr<=Mr;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,R,J,ve,Ee,fa,Ge,ct,At))return}}_convertFromCellCoord(R){return(R-this.padding)/this.scale}_convertToCellCoord(R){return Math.max(0,Math.min(this.d-1,Math.floor(R*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;let R=this.cells,J=3+this.cells.length+1+1,ve=0;for(let Ge=0;Ge=0)continue;let Ge=H[Be];Ee[Be]=Ni[J].shallow.indexOf(Be)>=0?Ge:eo(Ge,R)}H instanceof Error&&(Ee.message=H.message)}if(Ee.$name)throw new Error("$name property is reserved for worker serialization logic.");return J!=="Object"&&(Ee.$name=J),Ee}function co(H){if(io(H))return H;if(Array.isArray(H))return H.map(co);if(typeof H!="object")throw new Error("can't deserialize object of type "+typeof H);let R=Qn(H)||"Object";if(!Ni[R])throw new Error(`can't deserialize unregistered class ${R}`);let{klass:J}=Ni[R];if(!J)throw new Error(`can't deserialize unregistered class ${R}`);if(J.deserialize)return J.deserialize(H);let ve=Object.create(J.prototype);for(let Ee of Object.keys(H)){if(Ee==="$name")continue;let Be=H[Ee];ve[Ee]=Ni[R].shallow.indexOf(Ee)>=0?Be:co(Be)}return ve}class An{constructor(){this.first=!0}update(R,J){let ve=Math.floor(R);return this.first?(this.first=!1,this.lastIntegerZoom=ve,this.lastIntegerZoomTime=0,this.lastZoom=R,this.lastFloorZoom=ve,!0):(this.lastFloorZoom>ve?(this.lastIntegerZoom=ve+1,this.lastIntegerZoomTime=J):this.lastFloorZoomH>=128&&H<=255,"Hangul Jamo":H=>H>=4352&&H<=4607,Khmer:H=>H>=6016&&H<=6143,"General Punctuation":H=>H>=8192&&H<=8303,"Letterlike Symbols":H=>H>=8448&&H<=8527,"Number Forms":H=>H>=8528&&H<=8591,"Miscellaneous Technical":H=>H>=8960&&H<=9215,"Control Pictures":H=>H>=9216&&H<=9279,"Optical Character Recognition":H=>H>=9280&&H<=9311,"Enclosed Alphanumerics":H=>H>=9312&&H<=9471,"Geometric Shapes":H=>H>=9632&&H<=9727,"Miscellaneous Symbols":H=>H>=9728&&H<=9983,"Miscellaneous Symbols and Arrows":H=>H>=11008&&H<=11263,"Ideographic Description Characters":H=>H>=12272&&H<=12287,"CJK Symbols and Punctuation":H=>H>=12288&&H<=12351,Katakana:H=>H>=12448&&H<=12543,Kanbun:H=>H>=12688&&H<=12703,"CJK Strokes":H=>H>=12736&&H<=12783,"Enclosed CJK Letters and Months":H=>H>=12800&&H<=13055,"CJK Compatibility":H=>H>=13056&&H<=13311,"Yijing Hexagram Symbols":H=>H>=19904&&H<=19967,"Private Use Area":H=>H>=57344&&H<=63743,"Vertical Forms":H=>H>=65040&&H<=65055,"CJK Compatibility Forms":H=>H>=65072&&H<=65103,"Small Form Variants":H=>H>=65104&&H<=65135,"Halfwidth and Fullwidth Forms":H=>H>=65280&&H<=65519};function yo(H){for(let R of H)if(Ss(R.charCodeAt(0)))return!0;return!1}function Qo(H){for(let R of H)if(!Ns(R.charCodeAt(0)))return!1;return!0}function ks(H){let R=H.map(J=>{try{return new RegExp(`\\p{sc=${J}}`,"u").source}catch{return null}}).filter(J=>J);return new RegExp(R.join("|"),"u")}let rl=ks(["Arab","Dupl","Mong","Ougr","Syrc"]);function Ns(H){return!rl.test(String.fromCodePoint(H))}let el=ks(["Bopo","Hani","Hira","Kana","Kits","Nshu","Tang","Yiii"]);function Ss(H){return!(H!==746&&H!==747&&(H<4352||!(un["CJK Compatibility Forms"](H)&&!(H>=65097&&H<=65103)||un["CJK Compatibility"](H)||un["CJK Strokes"](H)||!(!un["CJK Symbols and Punctuation"](H)||H>=12296&&H<=12305||H>=12308&&H<=12319||H===12336)||un["Enclosed CJK Letters and Months"](H)||un["Ideographic Description Characters"](H)||un.Kanbun(H)||un.Katakana(H)&&H!==12540||!(!un["Halfwidth and Fullwidth Forms"](H)||H===65288||H===65289||H===65293||H>=65306&&H<=65310||H===65339||H===65341||H===65343||H>=65371&&H<=65503||H===65507||H>=65512&&H<=65519)||!(!un["Small Form Variants"](H)||H>=65112&&H<=65118||H>=65123&&H<=65126)||un["Vertical Forms"](H)||un["Yijing Hexagram Symbols"](H)||new RegExp("\\p{sc=Cans}","u").test(String.fromCodePoint(H))||new RegExp("\\p{sc=Hang}","u").test(String.fromCodePoint(H))||el.test(String.fromCodePoint(H)))))}function Fl(H){return!(Ss(H)||function(R){return!!(un["Latin-1 Supplement"](R)&&(R===167||R===169||R===174||R===177||R===188||R===189||R===190||R===215||R===247)||un["General Punctuation"](R)&&(R===8214||R===8224||R===8225||R===8240||R===8241||R===8251||R===8252||R===8258||R===8263||R===8264||R===8265||R===8273)||un["Letterlike Symbols"](R)||un["Number Forms"](R)||un["Miscellaneous Technical"](R)&&(R>=8960&&R<=8967||R>=8972&&R<=8991||R>=8996&&R<=9e3||R===9003||R>=9085&&R<=9114||R>=9150&&R<=9165||R===9167||R>=9169&&R<=9179||R>=9186&&R<=9215)||un["Control Pictures"](R)&&R!==9251||un["Optical Character Recognition"](R)||un["Enclosed Alphanumerics"](R)||un["Geometric Shapes"](R)||un["Miscellaneous Symbols"](R)&&!(R>=9754&&R<=9759)||un["Miscellaneous Symbols and Arrows"](R)&&(R>=11026&&R<=11055||R>=11088&&R<=11097||R>=11192&&R<=11243)||un["CJK Symbols and Punctuation"](R)||un.Katakana(R)||un["Private Use Area"](R)||un["CJK Compatibility Forms"](R)||un["Small Form Variants"](R)||un["Halfwidth and Fullwidth Forms"](R)||R===8734||R===8756||R===8757||R>=9984&&R<=10087||R>=10102&&R<=10131||R===65532||R===65533)}(H))}let yl=ks(["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(H){return yl.test(String.fromCodePoint(H))}function Un(H,R){return!(!R&&ll(H)||H>=2304&&H<=3583||H>=3840&&H<=4255||un.Khmer(H))}function Ro(H){for(let R of H)if(ll(R.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(H){this.pluginStatus=H.pluginStatus,this.pluginURL=H.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(H){this.applyArabicShaping=H.applyArabicShaping,this.processBidirectionalText=H.processBidirectionalText,this.processStyledBidirectionalText=H.processStyledBidirectionalText}isParsed(){return this.applyArabicShaping!=null&&this.processBidirectionalText!=null&&this.processStyledBidirectionalText!=null}getPluginURL(){return this.pluginURL}getRTLTextPluginStatus(){return this.pluginStatus}};class Fs{constructor(R,J){this.zoom=R,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 An,this.transition={})}isSupportedScript(R){return function(J,ve){for(let Ee of J)if(!Un(Ee.charCodeAt(0),ve))return!1;return!0}(R,Js.getRTLTextPluginStatus()==="loaded")}crossFadingFactor(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){let R=this.zoom,J=R-Math.floor(R),ve=this.crossFadingFactor();return R>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:J+(1-J)*ve}:{fromScale:.5,toScale:1,t:1-(1-ve)*J}}}class cu{constructor(R,J){this.property=R,this.value=J,this.expression=function(ve,Ee){if(kf(ve))return new Ml(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?R.specification.default:J,R.specification)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}possiblyEvaluate(R,J,ve){return this.property.possiblyEvaluate(this,R,J,ve)}}class Iu{constructor(R){this.property=R,this.value=new cu(R,void 0)}transitioned(R,J){return new Ic(this.property,this.value,J,E({},R.transition,this.transition),R.now)}untransitioned(){return new Ic(this.property,this.value,null,{},0)}}class Zu{constructor(R){this._properties=R,this._values=Object.create(R.defaultTransitionablePropertyValues)}getValue(R){return u(this._values[R].value.value)}setValue(R,J){Object.prototype.hasOwnProperty.call(this._values,R)||(this._values[R]=new Iu(this._values[R].property)),this._values[R].value=new cu(this._values[R].property,J===null?void 0:u(J))}getTransition(R){return u(this._values[R].transition)}setTransition(R,J){Object.prototype.hasOwnProperty.call(this._values,R)||(this._values[R]=new Iu(this._values[R].property)),this._values[R].transition=u(J)||void 0}serialize(){let R={};for(let J of Object.keys(this._values)){let ve=this.getValue(J);ve!==void 0&&(R[J]=ve);let Ee=this.getTransition(J);Ee!==void 0&&(R[`${J}-transition`]=Ee)}return R}transitioned(R,J){let ve=new bu(this._properties);for(let Ee of Object.keys(this._values))ve._values[Ee]=this._values[Ee].transitioned(R,J._values[Ee]);return ve}untransitioned(){let R=new bu(this._properties);for(let J of Object.keys(this._values))R._values[J]=this._values[J].untransitioned();return R}}class Ic{constructor(R,J,ve,Ee,Be){this.property=R,this.value=J,this.begin=Be+Ee.delay||0,this.end=this.begin+Ee.duration||0,R.specification.transition&&(Ee.delay||Ee.duration)&&(this.prior=ve)}possiblyEvaluate(R,J,ve){let Ee=R.now||0,Be=this.value.possiblyEvaluate(R,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 Nt=At*At,ar=Nt*At;return 4*(At<.5?ar:3*(At-Nt)+ar-.75)}(ct))}}return Be}}class bu{constructor(R){this._properties=R,this._values=Object.create(R.defaultTransitioningPropertyValues)}possiblyEvaluate(R,J,ve){let Ee=new yc(this._properties);for(let Be of Object.keys(this._values))Ee._values[Be]=this._values[Be].possiblyEvaluate(R,J,ve);return Ee}hasTransition(){for(let R of Object.keys(this._values))if(this._values[R].prior)return!0;return!1}}class Rc{constructor(R){this._properties=R,this._values=Object.create(R.defaultPropertyValues)}hasValue(R){return this._values[R].value!==void 0}getValue(R){return u(this._values[R].value)}setValue(R,J){this._values[R]=new cu(this._values[R].property,J===null?void 0:u(J))}serialize(){let R={};for(let J of Object.keys(this._values)){let ve=this.getValue(J);ve!==void 0&&(R[J]=ve)}return R}possiblyEvaluate(R,J,ve){let Ee=new yc(this._properties);for(let Be of Object.keys(this._values))Ee._values[Be]=this._values[Be].possiblyEvaluate(R,J,ve);return Ee}}class Au{constructor(R,J,ve){this.property=R,this.value=J,this.parameters=ve}isConstant(){return this.value.kind==="constant"}constantOr(R){return this.value.kind==="constant"?this.value.value:R}evaluate(R,J,ve,Ee){return this.property.evaluate(this.value,this.parameters,R,J,ve,Ee)}}class yc{constructor(R){this._properties=R,this._values=Object.create(R.defaultPossiblyEvaluatedValues)}get(R){return this._values[R]}}class fo{constructor(R){this.specification=R}possiblyEvaluate(R,J){if(R.isDataDriven())throw new Error("Value should not be data driven");return R.expression.evaluate(J)}interpolate(R,J,ve){let Ee=kn[this.specification.type];return Ee?Ee(R,J,ve):R}}class Fo{constructor(R,J){this.specification=R,this.overrides=J}possiblyEvaluate(R,J,ve,Ee){return new Au(this,R.expression.kind==="constant"||R.expression.kind==="camera"?{kind:"constant",value:R.expression.evaluate(J,null,{},ve,Ee)}:R.expression,J)}interpolate(R,J,ve){if(R.value.kind!=="constant"||J.value.kind!=="constant")return R;if(R.value.value===void 0||J.value.value===void 0)return new Au(this,{kind:"constant",value:void 0},R.parameters);let Ee=kn[this.specification.type];if(Ee){let Be=Ee(R.value.value,J.value.value,ve);return new Au(this,{kind:"constant",value:Be},R.parameters)}return R}evaluate(R,J,ve,Ee,Be,Ge){return R.kind==="constant"?R.value:R.evaluate(J,ve,Ee,Be,Ge)}}class Dc extends Fo{possiblyEvaluate(R,J,ve,Ee){if(R.value===void 0)return new Au(this,{kind:"constant",value:void 0},J);if(R.expression.kind==="constant"){let Be=R.expression.evaluate(J,null,{},ve,Ee),Ge=R.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(R.expression.kind==="camera"){let Be=this._calculate(R.expression.evaluate({zoom:J.zoom-1}),R.expression.evaluate({zoom:J.zoom}),R.expression.evaluate({zoom:J.zoom+1}),J);return new Au(this,{kind:"constant",value:Be},J)}return new Au(this,R.expression,J)}evaluate(R,J,ve,Ee,Be,Ge){if(R.kind==="source"){let ct=R.evaluate(J,ve,Ee,Be,Ge);return this._calculate(ct,ct,ct,J)}return R.kind==="composite"?this._calculate(R.evaluate({zoom:Math.floor(J.zoom)-1},ve,Ee),R.evaluate({zoom:Math.floor(J.zoom)},ve,Ee),R.evaluate({zoom:Math.floor(J.zoom)+1},ve,Ee),J):R.value}_calculate(R,J,ve,Ee){return Ee.zoom>Ee.zoomHistory.lastIntegerZoom?{from:R,to:J}:{from:ve,to:J}}interpolate(R){return R}}class lc{constructor(R){this.specification=R}possiblyEvaluate(R,J,ve,Ee){if(R.value!==void 0){if(R.expression.kind==="constant"){let Be=R.expression.evaluate(J,null,{},ve,Ee);return this._calculate(Be,Be,Be,J)}return this._calculate(R.expression.evaluate(new Fs(Math.floor(J.zoom-1),J)),R.expression.evaluate(new Fs(Math.floor(J.zoom),J)),R.expression.evaluate(new Fs(Math.floor(J.zoom+1),J)),J)}}_calculate(R,J,ve,Ee){return Ee.zoom>Ee.zoomHistory.lastIntegerZoom?{from:R,to:J}:{from:ve,to:J}}interpolate(R){return R}}class Yu{constructor(R){this.specification=R}possiblyEvaluate(R,J,ve,Ee){return!!R.expression.evaluate(J,null,{},ve,Ee)}interpolate(){return!1}}class Oe{constructor(R){this.properties=R,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(let J in R){let ve=R[J];ve.specification.overridable&&this.overridableProperties.push(J);let Ee=this.defaultPropertyValues[J]=new cu(ve,void 0),Be=this.defaultTransitionablePropertyValues[J]=new Iu(ve);this.defaultTransitioningPropertyValues[J]=Be.untransitioned(),this.defaultPossiblyEvaluatedValues[J]=Ee.possiblyEvaluate({})}}}mi("DataDrivenProperty",Fo),mi("DataConstantProperty",fo),mi("CrossFadedDataDrivenProperty",Dc),mi("CrossFadedProperty",lc),mi("ColorRampProperty",Yu);let I="-transition";class ie extends ee{constructor(R,J){if(super(),this.id=R.id,this.type=R.type,this._featureFilter={filter:()=>!0,needGeometry:!1},R.type!=="custom"&&(this.metadata=R.metadata,this.minzoom=R.minzoom,this.maxzoom=R.maxzoom,R.type!=="background"&&(this.source=R.source,this.sourceLayer=R["source-layer"],this.filter=R.filter),J.layout&&(this._unevaluatedLayout=new Rc(J.layout)),J.paint)){this._transitionablePaint=new Zu(J.paint);for(let ve in R.paint)this.setPaintProperty(ve,R.paint[ve],{validate:!1});for(let ve in R.layout)this.setLayoutProperty(ve,R.layout[ve],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new yc(J.paint)}}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(R){return R==="visibility"?this.visibility:this._unevaluatedLayout.getValue(R)}setLayoutProperty(R,J,ve={}){J!=null&&this._validate(pn,`layers.${this.id}.layout.${R}`,R,J,ve)||(R!=="visibility"?this._unevaluatedLayout.setValue(R,J):this.visibility=J)}getPaintProperty(R){return R.endsWith(I)?this._transitionablePaint.getTransition(R.slice(0,-11)):this._transitionablePaint.getValue(R)}setPaintProperty(R,J,ve={}){if(J!=null&&this._validate(Qi,`layers.${this.id}.paint.${R}`,R,J,ve))return!1;if(R.endsWith(I))return this._transitionablePaint.setTransition(R.slice(0,-11),J||void 0),!1;{let Ee=this._transitionablePaint._values[R],Be=Ee.property.specification["property-type"]==="cross-faded-data-driven",Ge=Ee.value.isDataDriven(),ct=Ee.value;this._transitionablePaint.setValue(R,J),this._handleSpecialPaintPropertyUpdate(R);let At=this._transitionablePaint._values[R].value;return At.isDataDriven()||Ge||Be||this._handleOverridablePaintPropertyUpdate(R,ct,At)}}_handleSpecialPaintPropertyUpdate(R){}_handleOverridablePaintPropertyUpdate(R,J,ve){return!1}isHidden(R){return!!(this.minzoom&&R=this.maxzoom)||this.visibility==="none"}updateTransitions(R){this._transitioningPaint=this._transitionablePaint.transitioned(R,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(R,J){R.getCrossfadeParameters&&(this._crossfadeParameters=R.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(R,void 0,J)),this.paint=this._transitioningPaint.possiblyEvaluate(R,void 0,J)}serialize(){let R={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&&(R.layout=R.layout||{},R.layout.visibility=this.visibility),d(R,(J,ve)=>!(J===void 0||ve==="layout"&&!Object.keys(J).length||ve==="paint"&&!Object.keys(J).length))}_validate(R,J,ve,Ee,Be={}){return(!Be||Be.validate!==!1)&&Pi(this,R.call(li,{key:J,layerType:this.type,objectKey:ve,value:Ee,styleSpec:te,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(let R in this.paint._values){let J=this.paint.get(R);if(J instanceof Au&&eu(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(R,J){this._structArray=R,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(R,J){return R._trim(),J&&(R.isTransferred=!0,J.push(R.arrayBuffer)),{length:R.length,arrayBuffer:R.arrayBuffer}}static deserialize(R){let J=Object.create(this.prototype);return J.arrayBuffer=R.arrayBuffer,J.length=R.length,J.capacity=R.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(R){this.reserve(R),this.length=R}reserve(R){if(R>this.capacity){this.capacity=Math.max(R,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(H,R=1){let J=0,ve=0;return{members:H.map(Ee=>{let Be=Te[Ee.type].BYTES_PER_ELEMENT,Ge=J=wt(J,Math.max(R,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,R)),alignment:R}}function wt(H,R){return Math.ceil(H/R)*R}class Ot extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(R,J){let ve=this.length;return this.resize(ve+1),this.emplace(ve,R,J)}emplace(R,J,ve){let Ee=2*R;return this.int16[Ee+0]=J,this.int16[Ee+1]=ve,R}}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(R,J,ve){let Ee=this.length;return this.resize(Ee+1),this.emplace(Ee,R,J,ve)}emplace(R,J,ve,Ee){let Be=3*R;return this.int16[Be+0]=J,this.int16[Be+1]=ve,this.int16[Be+2]=Ee,R}}$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(R,J,ve,Ee){let Be=this.length;return this.resize(Be+1),this.emplace(Be,R,J,ve,Ee)}emplace(R,J,ve,Ee,Be){let Ge=4*R;return this.int16[Ge+0]=J,this.int16[Ge+1]=ve,this.int16[Ge+2]=Ee,this.int16[Ge+3]=Be,R}}Tr.prototype.bytesPerElement=8,mi("StructArrayLayout4i8",Tr);class Sr extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(R,J,ve,Ee,Be,Ge){let ct=this.length;return this.resize(ct+1),this.emplace(ct,R,J,ve,Ee,Be,Ge)}emplace(R,J,ve,Ee,Be,Ge,ct){let At=6*R;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,R}}Sr.prototype.bytesPerElement=12,mi("StructArrayLayout2i4i12",Sr);class Kr extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(R,J,ve,Ee,Be,Ge){let ct=this.length;return this.resize(ct+1),this.emplace(ct,R,J,ve,Ee,Be,Ge)}emplace(R,J,ve,Ee,Be,Ge,ct){let At=4*R,Nt=8*R;return this.int16[At+0]=J,this.int16[At+1]=ve,this.uint8[Nt+4]=Ee,this.uint8[Nt+5]=Be,this.uint8[Nt+6]=Ge,this.uint8[Nt+7]=ct,R}}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(R,J){let ve=this.length;return this.resize(ve+1),this.emplace(ve,R,J)}emplace(R,J,ve){let Ee=2*R;return this.float32[Ee+0]=J,this.float32[Ee+1]=ve,R}}na.prototype.bytesPerElement=8,mi("StructArrayLayout2f8",na);class qe extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(R,J,ve,Ee,Be,Ge,ct,At,Nt,ar){let Mr=this.length;return this.resize(Mr+1),this.emplace(Mr,R,J,ve,Ee,Be,Ge,ct,At,Nt,ar)}emplace(R,J,ve,Ee,Be,Ge,ct,At,Nt,ar,Mr){let zr=10*R;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]=Nt,this.uint16[zr+8]=ar,this.uint16[zr+9]=Mr,R}}qe.prototype.bytesPerElement=20,mi("StructArrayLayout10ui20",qe);class $e extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(R,J,ve,Ee,Be,Ge,ct,At,Nt,ar,Mr,zr){let Wr=this.length;return this.resize(Wr+1),this.emplace(Wr,R,J,ve,Ee,Be,Ge,ct,At,Nt,ar,Mr,zr)}emplace(R,J,ve,Ee,Be,Ge,ct,At,Nt,ar,Mr,zr,Wr){let ia=12*R;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]=Nt,this.int16[ia+8]=ar,this.int16[ia+9]=Mr,this.int16[ia+10]=zr,this.int16[ia+11]=Wr,R}}$e.prototype.bytesPerElement=24,mi("StructArrayLayout4i4ui4i24",$e);class lt extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(R,J,ve){let Ee=this.length;return this.resize(Ee+1),this.emplace(Ee,R,J,ve)}emplace(R,J,ve,Ee){let Be=3*R;return this.float32[Be+0]=J,this.float32[Be+1]=ve,this.float32[Be+2]=Ee,R}}lt.prototype.bytesPerElement=12,mi("StructArrayLayout3f12",lt);class pt extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(R){let J=this.length;return this.resize(J+1),this.emplace(J,R)}emplace(R,J){return this.uint32[1*R+0]=J,R}}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(R,J,ve,Ee,Be,Ge,ct,At,Nt){let ar=this.length;return this.resize(ar+1),this.emplace(ar,R,J,ve,Ee,Be,Ge,ct,At,Nt)}emplace(R,J,ve,Ee,Be,Ge,ct,At,Nt,ar){let Mr=10*R,zr=5*R;return this.int16[Mr+0]=J,this.int16[Mr+1]=ve,this.int16[Mr+2]=Ee,this.int16[Mr+3]=Be,this.int16[Mr+4]=Ge,this.int16[Mr+5]=ct,this.uint32[zr+3]=At,this.uint16[Mr+8]=Nt,this.uint16[Mr+9]=ar,R}}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(R,J,ve,Ee,Be,Ge){let ct=this.length;return this.resize(ct+1),this.emplace(ct,R,J,ve,Ee,Be,Ge)}emplace(R,J,ve,Ee,Be,Ge,ct){let At=6*R;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,R}}bt.prototype.bytesPerElement=12,mi("StructArrayLayout2i2i2i12",bt);class Dt extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(R,J,ve,Ee,Be){let Ge=this.length;return this.resize(Ge+1),this.emplace(Ge,R,J,ve,Ee,Be)}emplace(R,J,ve,Ee,Be,Ge){let ct=4*R,At=8*R;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,R}}Dt.prototype.bytesPerElement=16,mi("StructArrayLayout2f1f2i16",Dt);class ur extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(R,J,ve,Ee,Be,Ge){let ct=this.length;return this.resize(ct+1),this.emplace(ct,R,J,ve,Ee,Be,Ge)}emplace(R,J,ve,Ee,Be,Ge,ct){let At=16*R,Nt=4*R,ar=8*R;return this.uint8[At+0]=J,this.uint8[At+1]=ve,this.float32[Nt+1]=Ee,this.float32[Nt+2]=Be,this.int16[ar+6]=Ge,this.int16[ar+7]=ct,R}}ur.prototype.bytesPerElement=16,mi("StructArrayLayout2ub2f2i16",ur);class yr extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(R,J,ve){let Ee=this.length;return this.resize(Ee+1),this.emplace(Ee,R,J,ve)}emplace(R,J,ve,Ee){let Be=3*R;return this.uint16[Be+0]=J,this.uint16[Be+1]=ve,this.uint16[Be+2]=Ee,R}}yr.prototype.bytesPerElement=6,mi("StructArrayLayout3ui6",yr);class Er 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(R,J,ve,Ee,Be,Ge,ct,At,Nt,ar,Mr,zr,Wr,ia,fa,ja,Ka){let Wi=this.length;return this.resize(Wi+1),this.emplace(Wi,R,J,ve,Ee,Be,Ge,ct,At,Nt,ar,Mr,zr,Wr,ia,fa,ja,Ka)}emplace(R,J,ve,Ee,Be,Ge,ct,At,Nt,ar,Mr,zr,Wr,ia,fa,ja,Ka,Wi){let gi=24*R,qi=12*R,en=48*R;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]=Nt,this.uint16[gi+11]=ar,this.uint16[gi+12]=Mr,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,R}}Er.prototype.bytesPerElement=48,mi("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",Er);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(R,J,ve,Ee,Be,Ge,ct,At,Nt,ar,Mr,zr,Wr,ia,fa,ja,Ka,Wi,gi,qi,en,jn,Lo,xs,vo,zn,is,qo){let Bo=this.length;return this.resize(Bo+1),this.emplace(Bo,R,J,ve,Ee,Be,Ge,ct,At,Nt,ar,Mr,zr,Wr,ia,fa,ja,Ka,Wi,gi,qi,en,jn,Lo,xs,vo,zn,is,qo)}emplace(R,J,ve,Ee,Be,Ge,ct,At,Nt,ar,Mr,zr,Wr,ia,fa,ja,Ka,Wi,gi,qi,en,jn,Lo,xs,vo,zn,is,qo,Bo){let xn=32*R,cs=16*R;return this.int16[xn+0]=J,this.int16[xn+1]=ve,this.int16[xn+2]=Ee,this.int16[xn+3]=Be,this.int16[xn+4]=Ge,this.int16[xn+5]=ct,this.int16[xn+6]=At,this.int16[xn+7]=Nt,this.uint16[xn+8]=ar,this.uint16[xn+9]=Mr,this.uint16[xn+10]=zr,this.uint16[xn+11]=Wr,this.uint16[xn+12]=ia,this.uint16[xn+13]=fa,this.uint16[xn+14]=ja,this.uint16[xn+15]=Ka,this.uint16[xn+16]=Wi,this.uint16[xn+17]=gi,this.uint16[xn+18]=qi,this.uint16[xn+19]=en,this.uint16[xn+20]=jn,this.uint16[xn+21]=Lo,this.uint16[xn+22]=xs,this.uint32[cs+12]=vo,this.float32[cs+13]=zn,this.float32[cs+14]=is,this.uint16[xn+30]=qo,this.uint16[xn+31]=Bo,R}}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(R){let J=this.length;return this.resize(J+1),this.emplace(J,R)}emplace(R,J){return this.float32[1*R+0]=J,R}}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(R,J,ve){let Ee=this.length;return this.resize(Ee+1),this.emplace(Ee,R,J,ve)}emplace(R,J,ve,Ee){let Be=3*R;return this.uint16[6*R+0]=J,this.float32[Be+1]=ve,this.float32[Be+2]=Ee,R}}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(R,J,ve){let Ee=this.length;return this.resize(Ee+1),this.emplace(Ee,R,J,ve)}emplace(R,J,ve,Ee){let Be=4*R;return this.uint32[2*R+0]=J,this.uint16[Be+2]=ve,this.uint16[Be+3]=Ee,R}}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(R,J){let ve=this.length;return this.resize(ve+1),this.emplace(ve,R,J)}emplace(R,J,ve){let Ee=2*R;return this.uint16[Ee+0]=J,this.uint16[Ee+1]=ve,R}}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(R){let J=this.length;return this.resize(J+1),this.emplace(J,R)}emplace(R,J){return this.uint16[1*R+0]=J,R}}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(R,J,ve,Ee){let Be=this.length;return this.resize(Be+1),this.emplace(Be,R,J,ve,Ee)}emplace(R,J,ve,Ee,Be){let Ge=4*R;return this.float32[Ge+0]=J,this.float32[Ge+1]=ve,this.float32[Ge+2]=Ee,this.float32[Ge+3]=Be,R}}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 i(this.anchorPointX,this.anchorPointY)}}ji.prototype.size=20;class on extends Et{get(R){return new ji(this,R)}}mi("CollisionBoxArray",on);class Sn 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(R){this._structArray.uint8[this._pos1+37]=R}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(R){this._structArray.uint8[this._pos1+38]=R}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(R){this._structArray.uint32[this._pos4+10]=R}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}Sn.prototype.size=48;class Kn extends Er{get(R){return new Sn(this,R)}}mi("PlacedSymbolArray",Kn);class Bn 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(R){this._structArray.uint32[this._pos4+12]=R}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]}}Bn.prototype.size=64;class Ao extends jr{get(R){return new Bn(this,R)}}mi("SymbolInstanceArray",Ao);class ls extends Qr{getoffsetX(R){return this.float32[1*R+0]}}mi("GlyphOffsetArray",ls);class Mo extends $t{getx(R){return this.int16[3*R+0]}gety(R){return this.int16[3*R+1]}gettileUnitDistanceFromAnchor(R){return this.int16[3*R+2]}}mi("SymbolLineVertexArray",Mo);class Yo 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]}}Yo.prototype.size=12;class ds extends ha{get(R){return new Yo(this,R)}}mi("TextAnchorOffsetArray",ds);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(R){return new ul(this,R)}}mi("FeatureIndexArray",tl);class es extends Ot{}class ts extends Ot{}class Il extends Ot{}class tu extends Sr{}class Ru extends Kr{}class vu extends na{}class wl extends qe{}class fu extends $e{}class uc extends lt{}class Gl extends pt{}class Hl extends bt{}class me extends ur{}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(R=[]){this.segments=R}prepareSegment(R,J,ve,Ee){let Be=this.segments[this.segments.length-1];return R>Tt.MAX_VERTEX_ARRAY_LENGTH&&y(`Max vertices per segment is ${Tt.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${R}`),(!Be||Be.vertexLength+R>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 R of this.segments)for(let J in R.vaos)R.vaos[J].destroy()}static simpleSegment(R,J,ve,Ee){return new Tt([{vertexOffset:R,primitiveOffset:J,vertexLength:ve,primitiveLength:Ee,vaos:{},sortKey:0}])}}function tr(H,R){return 256*(H=w(Math.floor(H),0,255))+w(Math.floor(R),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(H,R){var J,ve,Ee,Be,Ge,ct,At,Nt;for(ve=H.length-(J=3&H.length),Ee=R,Ge=3432918353,ct=461845907,Nt=0;Nt>>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&H.charCodeAt(Nt+2))<<16;case 2:At^=(255&H.charCodeAt(Nt+1))<<8;case 1:Ee^=At=(65535&(At=(At=(65535&(At^=255&H.charCodeAt(Nt)))*Ge+(((At>>>16)*Ge&65535)<<16)&4294967295)<<15|At>>>17))*ct+(((At>>>16)*ct&65535)<<16)&4294967295}return Ee^=H.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,wa={exports:{}};wa.exports=function(H,R){for(var J,ve=H.length,Ee=R^ve,Be=0;ve>=4;)J=1540483477*(65535&(J=255&H.charCodeAt(Be)|(255&H.charCodeAt(++Be))<<8|(255&H.charCodeAt(++Be))<<16|(255&H.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&H.charCodeAt(Be+2))<<16;case 2:Ee^=(255&H.charCodeAt(Be+1))<<8;case 1:Ee=1540483477*(65535&(Ee^=255&H.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=wa.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(R,J,ve,Ee){this.ids.push(za(R)),this.positions.push(J,ve,Ee)}getPositions(R){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");let J=za(R),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(R,J){let ve=new Float64Array(R.ids),Ee=new Uint32Array(R.positions);return Xa(ve,Ee,0,ve.length-1),J&&J.push(ve.buffer,Ee.buffer),{ids:ve,positions:Ee}}static deserialize(R){let J=new Sa;return J.ids=R.ids,J.positions=R.positions,J.indexed=!0,J}}function za(H){let R=+H;return!isNaN(R)&&R<=Number.MAX_SAFE_INTEGER?R:ti(String(H))}function Xa(H,R,J,ve){for(;J>1],Be=J-1,Ge=ve+1;for(;;){do Be++;while(H[Be]Ee);if(Be>=Ge)break;fi(H,Be,Ge),fi(R,3*Be,3*Ge),fi(R,3*Be+1,3*Ge+1),fi(R,3*Be+2,3*Ge+2)}Ge-J`u_${Ee}`),this.type=ve}setUniform(R,J,ve){R.set(ve.constantOr(this.value))}getBinding(R,J,ve){return this.type==="color"?new an(R,J):new La(R,J)}}class ro{constructor(R,J){this.uniformNames=J.map(ve=>`u_${ve}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(R,J){this.pixelRatioFrom=J.pixelRatio,this.pixelRatioTo=R.pixelRatio,this.patternFrom=J.tlbr,this.patternTo=R.tlbr}setUniform(R,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&&R.set(Be)}getBinding(R,J,ve){return ve.substr(0,9)==="u_pattern"?new sn(R,J):new La(R,J)}}class $o{constructor(R,J,ve,Ee){this.expression=R,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(R,J,ve,Ee,Be){let Ge=this.paintVertexArray.length,ct=this.expression.evaluate(new Fs(0),J,{},Ee,[],Be);this.paintVertexArray.resize(R),this._setPaintValue(Ge,R,ct)}updatePaintArray(R,J,ve,Ee){let Be=this.expression.evaluate({zoom:0},ve,Ee);this._setPaintValue(R,J,Be)}_setPaintValue(R,J,ve){if(this.type==="color"){let Ee=In(ve);for(let Be=R;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(R,J,ve,Ee,Be){let Ge=this.expression.evaluate(new Fs(this.zoom),J,{},Ee,[],Be),ct=this.expression.evaluate(new Fs(this.zoom+1),J,{},Ee,[],Be),At=this.paintVertexArray.length;this.paintVertexArray.resize(R),this._setPaintValue(At,R,Ge,ct)}updatePaintArray(R,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(R,J,Be,Ge)}_setPaintValue(R,J,ve,Ee){if(this.type==="color"){let Be=In(ve),Ge=In(Ee);for(let ct=R;ct`#define HAS_UNIFORM_${Ee}`))}return R}getBinderAttributes(){let R=[];for(let J in this.binders){let ve=this.binders[J];if(ve instanceof $o||ve instanceof no)for(let Ee=0;Ee!0){this.programConfigurations={};for(let Ee of R)this.programConfigurations[Ee.id]=new cl(Ee,J,ve);this.needsUpload=!1,this._featureMap=new Sa,this._bufferOffset=0}populatePaintArrays(R,J,ve,Ee,Be,Ge){for(let ct in this.programConfigurations)this.programConfigurations[ct].populatePaintArrays(R,J,Ee,Be,Ge);J.id!==void 0&&this._featureMap.add(J.id,ve,this._bufferOffset,R),this._bufferOffset=R,this.needsUpload=!0}updatePaintArrays(R,J,ve,Ee){for(let Be of ve)this.needsUpload=this.programConfigurations[Be.id].updatePaintArrays(R,this._featureMap,J,Be,Ee)||this.needsUpload}get(R){return this.programConfigurations[R]}upload(R){if(this.needsUpload){for(let J in this.programConfigurations)this.programConfigurations[J].upload(R);this.needsUpload=!1}}destroy(){for(let R in this.programConfigurations)this.programConfigurations[R].destroy()}}function _l(H,R){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"]}[H]||[H.replace(`${R}-`,"").replace(/-/g,"_")]}function mn(H,R,J){let ve={color:{source:na,composite:Vi},number:{source:Qr,composite:na}},Ee=function(Be){return{"line-pattern":{source:wl,composite:wl},"fill-pattern":{source:wl,composite:wl},"fill-extrusion-pattern":{source:wl,composite:wl}}[Be]}(H);return Ee&&Ee[J]||ve[R][J]}mi("ConstantBinder",Jn),mi("CrossFadedConstantBinder",ro),mi("SourceExpressionBinder",$o),mi("CrossFadedCompositeBinder",Xo),mi("CompositeExpressionBinder",no),mi("ProgramConfiguration",cl,{omit:["_buffers"]}),mi("ProgramConfigurationSet",al);let po=8192,fs=Math.pow(2,14)-1,ms=-fs-1;function Tl(H){let R=po/H.extent,J=H.loadGeometry();for(let ve=0;veGe.x+1||AtGe.y+1)&&y("Geometry exceeds allowed extent, reduce your vector tile buffer size")}}return J}function Wl(H,R){return{type:H.type,id:H.id,properties:H.properties,geometry:R?Tl(H):[]}}function Su(H,R,J,ve,Ee){H.emplaceBack(2*R+(ve+1)/2,2*J+(Ee+1)/2)}class Rl{constructor(R){this.zoom=R.zoom,this.overscaling=R.overscaling,this.layers=R.layers,this.layerIds=this.layers.map(J=>J.id),this.index=R.index,this.hasPattern=!1,this.layoutVertexArray=new ts,this.indexArray=new De,this.segments=new Tt,this.programConfigurations=new al(R.layers,R.zoom),this.stateDependentLayerIds=this.layers.filter(J=>J.isStateDependent()).map(J=>J.id)}populate(R,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:Nt,index:ar,sourceLayerIndex:Mr}of R){let zr=this.layers[0]._featureFilter.needGeometry,Wr=Wl(At,zr);if(!this.layers[0]._featureFilter.filter(new Fs(this.zoom),Wr,ve))continue;let ia=ct?Ge.evaluate(Wr,{},ve):void 0,fa={id:Nt,properties:At.properties,type:At.type,sourceLayerIndex:Mr,index:ar,geometry:zr?Wr.geometry:Tl(At),patterns:{},sortKey:ia};Be.push(fa)}ct&&Be.sort((At,Nt)=>At.sortKey-Nt.sortKey);for(let At of Be){let{geometry:Nt,index:ar,sourceLayerIndex:Mr}=At,zr=R[ar].feature;this.addFeature(At,Nt,ar,ve),J.featureIndex.insert(zr,Nt,ar,Mr,this.index)}}update(R,J,ve){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(R,J,this.stateDependentLayers,ve)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(R){this.uploaded||(this.layoutVertexBuffer=R.createVertexBuffer(this.layoutVertexArray,yt),this.indexBuffer=R.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(R),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(R,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 Nt=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,R.sortKey),ar=Nt.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),Nt.vertexLength+=4,Nt.primitiveLength+=2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,R,ve,{},Ee)}}function _c(H,R){for(let J=0;J1){if(oa(H,R))return!0;for(let ve=0;ve1?J:J.sub(R)._mult(Ee)._add(R))}function Ya(H,R){let J,ve,Ee,Be=!1;for(let Ge=0;GeR.y!=Ee.y>R.y&&R.x<(Ee.x-ve.x)*(R.y-ve.y)/(Ee.y-ve.y)+ve.x&&(Be=!Be)}return Be}function bi(H,R){let J=!1;for(let ve=0,Ee=H.length-1;veR.y!=Ge.y>R.y&&R.x<(Ge.x-Be.x)*(R.y-Be.y)/(Ge.y-Be.y)+Be.x&&(J=!J)}return J}function yi(H,R,J){let ve=J[0],Ee=J[2];if(H.xEe.x&&R.x>Ee.x||H.yEe.y&&R.y>Ee.y)return!1;let Be=D(H,R,J[0]);return Be!==D(H,R,J[1])||Be!==D(H,R,J[2])||Be!==D(H,R,J[3])}function si(H,R,J){let ve=R.paint.get(H).value;return ve.kind==="constant"?ve.value:J.programConfigurations.get(R.id).getMaxValue(H)}function gn(H){return Math.sqrt(H[0]*H[0]+H[1]*H[1])}function zi(H,R,J,ve,Ee){if(!R[0]&&!R[1])return H;let Be=i.convert(R)._mult(Ee);J==="viewport"&&Be._rotate(-ve);let Ge=[];for(let ct=0;ctUa(ja,fa))}(Nt,At),Wr=Mr?ar*ct:ar;for(let ia of Ee)for(let fa of ia){let ja=Mr?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(H,R){let J=hn([],[H.x,H.y,0,1],R);return new i(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 Oe({"heatmap-radius":new Fo(te.paint_heatmap["heatmap-radius"]),"heatmap-weight":new Fo(te.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new fo(te.paint_heatmap["heatmap-intensity"]),"heatmap-color":new Yu(te.paint_heatmap["heatmap-color"]),"heatmap-opacity":new fo(te.paint_heatmap["heatmap-opacity"])})}};function xi(H,{width:R,height:J},ve,Ee){if(Ee){if(Ee instanceof Uint8ClampedArray)Ee=new Uint8Array(Ee.buffer);else if(Ee.length!==R*J*ve)throw new RangeError(`mismatched image size. expected: ${Ee.length} but got: ${R*J*ve}`)}else Ee=new Uint8Array(R*J*ve);return H.width=R,H.height=J,H.data=Ee,H}function Xi(H,{width:R,height:J},ve){if(R===H.width&&J===H.height)return;let Ee=xi({},{width:R,height:J},ve);vn(H,Ee,{x:0,y:0},{x:0,y:0},{width:Math.min(H.width,R),height:Math.min(H.height,J)},ve),H.width=R,H.height=J,H.data=Ee.data}function vn(H,R,J,ve,Ee,Be){if(Ee.width===0||Ee.height===0)return R;if(Ee.width>H.width||Ee.height>H.height||J.x>H.width-Ee.width||J.y>H.height-Ee.height)throw new RangeError("out of range source coordinates for image copy");if(Ee.width>R.width||Ee.height>R.height||ve.x>R.width-Ee.width||ve.y>R.height-Ee.height)throw new RangeError("out of range destination coordinates for image copy");let Ge=H.data,ct=R.data;if(Ge===ct)throw new Error("srcData equals dstData, so image is already copied");for(let At=0;At{R[H.evaluationKey]=At;let Nt=H.expression.evaluate(R);Ee.data[Ge+ct+0]=Math.floor(255*Nt.r/Nt.a),Ee.data[Ge+ct+1]=Math.floor(255*Nt.g/Nt.a),Ee.data[Ge+ct+2]=Math.floor(255*Nt.b/Nt.a),Ee.data[Ge+ct+3]=Math.floor(255*Nt.a)};if(H.clips)for(let Ge=0,ct=0;Ge80*J){ct=1/0,At=1/0;let ar=-1/0,Mr=-1/0;for(let zr=J;zrar&&(ar=Wr),ia>Mr&&(Mr=ia)}Nt=Math.max(ar-ct,Mr-At),Nt=Nt!==0?32767/Nt:0}return ru(Be,Ge,J,ct,At,Nt,0),Ge}function Al(H,R,J,ve,Ee){let Be;if(Ee===function(Ge,ct,At,Nt){let ar=0;for(let Mr=ct,zr=At-Nt;Mr0)for(let Ge=R;Ge=R;Ge-=ve)Be=pr(Ge/ve|0,H[Ge],H[Ge+1],Be);return Be&&ke(Be,Be.next)&&(mt(Be),Be=Be.next),Be}function El(H,R){if(!H)return H;R||(R=H);let J,ve=H;do if(J=!1,ve.steiner||!ke(ve,ve.next)&&Ue(ve.prev,ve,ve.next)!==0)ve=ve.next;else{if(mt(ve),ve=R=ve.prev,ve===ve.next)break;J=!0}while(J||ve!==R);return R}function ru(H,R,J,ve,Ee,Be,Ge){if(!H)return;!Ge&&Be&&function(At,Nt,ar,Mr){let zr=At;do zr.z===0&&(zr.z=K(zr.x,zr.y,Nt,ar,Mr)),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 jn=0;jn0||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)}(H,ve,Ee,Be);let ct=H;for(;H.prev!==H.next;){let At=H.prev,Nt=H.next;if(Be?pl(H,ve,Ee,Be):js(H))R.push(At.i,H.i,Nt.i),mt(H),H=Nt.next,ct=Nt.next;else if((H=Nt)===ct){Ge?Ge===1?ru(H=bl(El(H),R),R,J,ve,Ee,Be,2):Ge===2&&Xn(H,R,J,ve,Ee,Be):ru(El(H),R,J,ve,Ee,Be,1);break}}}function js(H){let R=H.prev,J=H,ve=H.next;if(Ue(R,J,ve)>=0)return!1;let Ee=R.x,Be=J.x,Ge=ve.x,ct=R.y,At=J.y,Nt=ve.y,ar=EeBe?Ee>Ge?Ee:Ge:Be>Ge?Be:Ge,Wr=ct>At?ct>Nt?ct:Nt:At>Nt?At:Nt,ia=ve.next;for(;ia!==R;){if(ia.x>=ar&&ia.x<=zr&&ia.y>=Mr&&ia.y<=Wr&&re(Ee,ct,Be,At,Ge,Nt,ia.x,ia.y)&&Ue(ia.prev,ia,ia.next)>=0)return!1;ia=ia.next}return!0}function pl(H,R,J,ve){let Ee=H.prev,Be=H,Ge=H.next;if(Ue(Ee,Be,Ge)>=0)return!1;let ct=Ee.x,At=Be.x,Nt=Ge.x,ar=Ee.y,Mr=Be.y,zr=Ge.y,Wr=ctAt?ct>Nt?ct:Nt:At>Nt?At:Nt,ja=ar>Mr?ar>zr?ar:zr:Mr>zr?Mr:zr,Ka=K(Wr,ia,R,J,ve),Wi=K(fa,ja,R,J,ve),gi=H.prevZ,qi=H.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&&re(ct,ar,At,Mr,Nt,zr,gi.x,gi.y)&&Ue(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&&re(ct,ar,At,Mr,Nt,zr,qi.x,qi.y)&&Ue(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&&re(ct,ar,At,Mr,Nt,zr,gi.x,gi.y)&&Ue(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&&re(ct,ar,At,Mr,Nt,zr,qi.x,qi.y)&&Ue(qi.prev,qi,qi.next)>=0)return!1;qi=qi.nextZ}return!0}function bl(H,R){let J=H;do{let ve=J.prev,Ee=J.next.next;!ke(ve,Ee)&&Qe(ve,J,J.next,Ee)&&br(ve,Ee)&&br(Ee,ve)&&(R.push(ve.i,J.i,Ee.i),mt(J),mt(J.next),J=H=Ee),J=J.next}while(J!==H);return El(J)}function Xn(H,R,J,ve,Ee,Be){let Ge=H;do{let ct=Ge.next.next;for(;ct!==Ge.prev;){if(Ge.i!==ct.i&&ye(Ge,ct)){let At=Br(Ge,ct);return Ge=El(Ge,Ge.next),At=El(At,At.next),ru(Ge,R,J,ve,Ee,Be,0),void ru(At,R,J,ve,Ee,Be,0)}ct=ct.next}Ge=Ge.next}while(Ge!==H)}function kl(H,R){return H.x-R.x}function Io(H,R){let J=function(Ee,Be){let Ge=Be,ct=Ee.x,At=Ee.y,Nt,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,Nt=Ge.x=Ge.x&&Ge.x>=zr&&ct!==Ge.x&&re(AtNt.x||Ge.x===Nt.x&&ge(Nt,Ge)))&&(Nt=Ge,ia=fa)}Ge=Ge.next}while(Ge!==Mr);return Nt}(H,R);if(!J)return R;let ve=Br(J,H);return El(ve,ve.next),El(J,J.next)}function ge(H,R){return Ue(H.prev,H,R.prev)<0&&Ue(R.next,H,H.next)<0}function K(H,R,J,ve,Ee){return(H=1431655765&((H=858993459&((H=252645135&((H=16711935&((H=(H-J)*Ee|0)|H<<8))|H<<4))|H<<2))|H<<1))|(R=1431655765&((R=858993459&((R=252645135&((R=16711935&((R=(R-ve)*Ee|0)|R<<8))|R<<4))|R<<2))|R<<1))<<1}function xe(H){let R=H,J=H;do(R.x=(H-Ge)*(Be-ct)&&(H-Ge)*(ve-ct)>=(J-Ge)*(R-ct)&&(J-Ge)*(Be-ct)>=(Ee-Ge)*(ve-ct)}function ye(H,R){return H.next.i!==R.i&&H.prev.i!==R.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}(H,R)&&(br(H,R)&&br(R,H)&&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}(H,R)&&(Ue(H.prev,H,R.prev)||Ue(H,R.prev,R))||ke(H,R)&&Ue(H.prev,H,H.next)>0&&Ue(R.prev,R,R.next)>0)}function Ue(H,R,J){return(R.y-H.y)*(J.x-R.x)-(R.x-H.x)*(J.y-R.y)}function ke(H,R){return H.x===R.x&&H.y===R.y}function Qe(H,R,J,ve){let Ee=qt(Ue(H,R,J)),Be=qt(Ue(H,R,ve)),Ge=qt(Ue(J,ve,H)),ct=qt(Ue(J,ve,R));return Ee!==Be&&Ge!==ct||!(Ee!==0||!vt(H,J,R))||!(Be!==0||!vt(H,ve,R))||!(Ge!==0||!vt(J,H,ve))||!(ct!==0||!vt(J,R,ve))}function vt(H,R,J){return R.x<=Math.max(H.x,J.x)&&R.x>=Math.min(H.x,J.x)&&R.y<=Math.max(H.y,J.y)&&R.y>=Math.min(H.y,J.y)}function qt(H){return H>0?1:H<0?-1:0}function br(H,R){return Ue(H.prev,H,H.next)<0?Ue(H,R,H.next)>=0&&Ue(H,H.prev,R)>=0:Ue(H,R,H.prev)<0||Ue(H,H.next,R)<0}function Br(H,R){let J=Mt(H.i,H.x,H.y),ve=Mt(R.i,R.x,R.y),Ee=H.next,Be=R.prev;return H.next=R,R.prev=H,J.next=Ee,Ee.prev=J,ve.next=J,J.prev=ve,Be.next=ve,ve.prev=Be,ve}function pr(H,R,J,ve){let Ee=Mt(H,R,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(H){H.next.prev=H.prev,H.prev.next=H.next,H.prevZ&&(H.prevZ.nextZ=H.nextZ),H.nextZ&&(H.nextZ.prevZ=H.prevZ)}function Mt(H,R,J){return{i:H,x:R,y:J,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function Ft(H,R,J){let ve=J.patternDependencies,Ee=!1;for(let Be of R){let Ge=Be.paint.get(`${H}-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(H,R,J,ve,Ee){let Be=Ee.patternDependencies;for(let Ge of R){let ct=Ge.paint.get(`${H}-pattern`).value;if(ct.kind!=="constant"){let At=ct.evaluate({zoom:ve-1},J,{},Ee.availableImages),Nt=ct.evaluate({zoom:ve},J,{},Ee.availableImages),ar=ct.evaluate({zoom:ve+1},J,{},Ee.availableImages);At=At&&At.name?At.name:At,Nt=Nt&&Nt.name?Nt.name:Nt,ar=ar&&ar.name?ar.name:ar,Be[At]=!0,Be[Nt]=!0,Be[ar]=!0,J.patterns[Ge.id]={min:At,mid:Nt,max:ar}}}return J}class hr{constructor(R){this.zoom=R.zoom,this.overscaling=R.overscaling,this.layers=R.layers,this.layerIds=this.layers.map(J=>J.id),this.index=R.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new Il,this.indexArray=new De,this.indexArray2=new et,this.programConfigurations=new al(R.layers,R.zoom),this.segments=new Tt,this.segments2=new Tt,this.stateDependentLayerIds=this.layers.filter(J=>J.isStateDependent()).map(J=>J.id)}populate(R,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:Nt,sourceLayerIndex:ar}of R){let Mr=this.layers[0]._featureFilter.needGeometry,zr=Wl(ct,Mr);if(!this.layers[0]._featureFilter.filter(new Fs(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:Nt,geometry:Mr?zr.geometry:Tl(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:Nt,sourceLayerIndex:ar}=ct;if(this.hasPattern){let Mr=rr("fill",this.layers,ct,this.zoom,J);this.patternFeatures.push(Mr)}else this.addFeature(ct,At,Nt,ve,{});J.featureIndex.insert(R[Nt].feature,At,Nt,ar,this.index)}}update(R,J,ve){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(R,J,this.stateDependentLayers,ve)}addFeatures(R,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(R){this.uploaded||(this.layoutVertexBuffer=R.createVertexBuffer(this.layoutVertexArray,Xl),this.indexBuffer=R.createIndexBuffer(this.indexArray),this.indexBuffer2=R.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(R),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(R,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),Nt=At.vertexLength,ar=[],Mr=[];for(let Wr of Ge){if(Wr.length===0)continue;Wr!==Ge[0]&&Mr.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+=H.readSVarint(),Ge+=H.readSVarint(),ve===1&&(R&&ct.push(R),R=[]),R.push(new ya(Be,Ge));else{if(ve!==7)throw new Error("unknown command "+ve);R&&R.push(R[0].clone())}}return R&&ct.push(R),ct},Ga.prototype.bbox=function(){var H=this._pbf;H.pos=this._geometry;for(var R=H.readVarint()+H.pos,J=1,ve=0,Ee=0,Be=0,Ge=1/0,ct=-1/0,At=1/0,Nt=-1/0;H.pos>3}if(ve--,J===1||J===2)(Ee+=H.readSVarint())ct&&(ct=Ee),(Be+=H.readSVarint())Nt&&(Nt=Be);else if(J!==7)throw new Error("unknown command "+J)}return[Ge,At,ct,Nt]},Ga.prototype.toGeoJSON=function(H,R,J){var ve,Ee,Be=this.extent*Math.pow(2,J),Ge=this.extent*H,ct=this.extent*R,At=this.loadGeometry(),Nt=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(H){if(H<0||H>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[H];var R=this._pbf.readVarint()+this._pbf.pos;return new Fi(this._pbf,R,this.extent,this._keys,this._values)};var Ui=ui;function fn(H,R,J){if(H===3){var ve=new Ui(J,J.readVarint()+J.pos);ve.length&&(R[ve.name]=ve)}}Jr.VectorTile=function(H,R){this.layers=H.readFields(fn,{},R)},Jr.VectorTileFeature=vi,Jr.VectorTileLayer=ui;let _o=Jr.VectorTileFeature.types,Uo=Math.pow(2,13);function Ds(H,R,J,ve,Ee,Be,Ge,ct){H.emplaceBack(R,J,2*Math.floor(ve*Uo)+Ge,Ee*Uo*2,Be*Uo*2,Math.round(ct))}class Oo{constructor(R){this.zoom=R.zoom,this.overscaling=R.overscaling,this.layers=R.layers,this.layerIds=this.layers.map(J=>J.id),this.index=R.index,this.hasPattern=!1,this.layoutVertexArray=new tu,this.centroidVertexArray=new es,this.indexArray=new De,this.programConfigurations=new al(R.layers,R.zoom),this.segments=new Tt,this.stateDependentLayerIds=this.layers.filter(J=>J.isStateDependent()).map(J=>J.id)}populate(R,J,ve){this.features=[],this.hasPattern=Ft("fill-extrusion",this.layers,J);for(let{feature:Ee,id:Be,index:Ge,sourceLayerIndex:ct}of R){let At=this.layers[0]._featureFilter.needGeometry,Nt=Wl(Ee,At);if(!this.layers[0]._featureFilter.filter(new Fs(this.zoom),Nt,ve))continue;let ar={id:Be,sourceLayerIndex:ct,index:Ge,geometry:At?Nt.geometry:Tl(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(R,J,ve){for(let Ee of this.features){let{geometry:Be}=Ee;this.addFeature(Ee,Be,Ee.index,J,ve)}}update(R,J,ve){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(R,J,this.stateDependentLayers,ve)}isEmpty(){return this.layoutVertexArray.length===0&&this.centroidVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(R){this.uploaded||(this.layoutVertexBuffer=R.createVertexBuffer(this.layoutVertexArray,Dr),this.centroidVertexBuffer=R.createVertexBuffer(this.centroidVertexArray,Gt.members,!0),this.indexBuffer=R.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(R),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(R,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 Nt=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray);for(let ia of Ge){if(ia.length===0||Ys(ia))continue;let fa=0;for(let ja=0;ja=1){let Wi=ia[ja-1];if(!Cs(Ka,Wi)){Nt.vertexLength+4>Tt.MAX_VERTEX_ARRAY_LENGTH&&(Nt=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));let gi=Ka.sub(Wi)._perp()._unit(),qi=Wi.dist(Ka);fa+qi>32768&&(fa=0),Ds(this.layoutVertexArray,Ka.x,Ka.y,gi.x,gi.y,0,0,fa),Ds(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,Ds(this.layoutVertexArray,Wi.x,Wi.y,gi.x,gi.y,0,0,fa),Ds(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=Nt.vertexLength;this.indexArray.emplaceBack(en,en+2,en+1),this.indexArray.emplaceBack(en+1,en+2,en+3),Nt.vertexLength+=4,Nt.primitiveLength+=2}}}}if(Nt.vertexLength+At>Tt.MAX_VERTEX_ARRAY_LENGTH&&(Nt=this.segments.prepareSegment(At,this.layoutVertexArray,this.indexArray)),_o[R.type]!=="Polygon")continue;let ar=[],Mr=[],zr=Nt.vertexLength;for(let ia of Ge)if(ia.length!==0){ia!==Ge[0]&&Mr.push(ar.length/2);for(let fa=0;fapo)||H.y===R.y&&(H.y<0||H.y>po)}function Ys(H){return H.every(R=>R.x<0)||H.every(R=>R.x>po)||H.every(R=>R.y<0)||H.every(R=>R.y>po)}let mu;mi("FillExtrusionBucket",Oo,{omit:["layers","features"]});var Ep={get paint(){return mu=mu||new Oe({"fill-extrusion-opacity":new fo(te["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Fo(te["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new fo(te["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new fo(te["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new Dc(te["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Fo(te["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Fo(te["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new fo(te["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class kp extends ie{constructor(R){super(R,Ep)}createBucket(R){return new Oo(R)}queryRadius(){return gn(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature(R,J,ve,Ee,Be,Ge,ct,At){let Nt=zi(R,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),Mr=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 i(qi[0]/qi[3],qi[1]/qi[3]))}return Wi}(Nt,At),Wr=function(ia,fa,ja,Ka){let Wi=[],gi=[],qi=Ka[8]*fa,en=Ka[9]*fa,jn=Ka[10]*fa,Lo=Ka[11]*fa,xs=Ka[8]*ja,vo=Ka[9]*ja,zn=Ka[10]*ja,is=Ka[11]*ja;for(let qo of ia){let Bo=[],xn=[];for(let cs of qo){let No=cs.x,Rs=cs.y,Ku=Ka[0]*No+Ka[4]*Rs+Ka[12],Uu=Ka[1]*No+Ka[5]*Rs+Ka[13],th=Ka[2]*No+Ka[6]*Rs+Ka[14],Hp=Ka[3]*No+Ka[7]*Rs+Ka[15],Th=th+jn,rh=Hp+Lo,$h=Ku+xs,Qh=Uu+vo,ep=th+zn,ff=Hp+is,ah=new i((Ku+qi)/rh,(Uu+en)/rh);ah.z=Th/rh,Bo.push(ah);let Fh=new i($h/ff,Qh/ff);Fh.z=ep/ff,xn.push(Fh)}Wi.push(Bo),gi.push(xn)}return[Wi,gi]}(Ee,Mr,ar,At);return function(ia,fa,ja){let Ka=1/0;Xt(ja,fa)&&(Ka=qp(ja,fa[0]));for(let Wi=0;WiJ.id),this.index=R.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(R.layers,R.zoom),this.segments=new Tt,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(J=>J.isStateDependent()).map(J=>J.id)}populate(R,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:Nt,sourceLayerIndex:ar}of R){let Mr=this.layers[0]._featureFilter.needGeometry,zr=Wl(ct,Mr);if(!this.layers[0]._featureFilter.filter(new Fs(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:Nt,geometry:Mr?zr.geometry:Tl(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:Nt,sourceLayerIndex:ar}=ct;if(this.hasPattern){let Mr=rr("line",this.layers,ct,this.zoom,J);this.patternFeatures.push(Mr)}else this.addFeature(ct,At,Nt,ve,{});J.featureIndex.insert(R[Nt].feature,At,Nt,ar,this.index)}}update(R,J,ve){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(R,J,this.stateDependentLayers,ve)}addFeatures(R,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(R){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=R.createVertexBuffer(this.layoutVertexArray2,td)),this.layoutVertexBuffer=R.createVertexBuffer(this.layoutVertexArray,ed),this.indexBuffer=R.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(R),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(R){if(R.properties&&Object.prototype.hasOwnProperty.call(R.properties,"mapbox_clip_start")&&Object.prototype.hasOwnProperty.call(R.properties,"mapbox_clip_end"))return{start:+R.properties.mapbox_clip_start,end:+R.properties.mapbox_clip_end}}addFeature(R,J,ve,Ee,Be){let Ge=this.layers[0].layout,ct=Ge.get("line-join").evaluate(R,{}),At=Ge.get("line-cap"),Nt=Ge.get("line-miter-limit"),ar=Ge.get("line-round-limit");this.lineClips=this.lineFeatureClips(R);for(let Mr of J)this.addLine(Mr,R,ct,At,Nt,ar);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,R,ve,Be,Ee)}addLine(R,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&&R[At-1].equals(R[At-2]);)At--;let Nt=0;for(;Nt0;if(Lo&&Ka>Nt){let is=zr.dist(Wr);if(is>2*ar){let qo=zr.sub(zr.sub(Wr)._mult(ar/is)._round());this.updateDistance(Wr,qo),this.addCurrentVertex(qo,fa,0,0,Mr),Wr=qo}}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 is=en*fa.add(ja).mag()/fa.sub(ja).mag();Wi._perp()._mult(is*(xs?-1:1))}this.addCurrentVertex(zr,Wi,0,0,Mr),this.addCurrentVertex(zr,Wi.mult(-1),0,0,Mr)}else if(zn==="bevel"||zn==="fakeround"){let is=-Math.sqrt(en*en-1),qo=xs?is:0,Bo=xs?0:is;if(Wr&&this.addCurrentVertex(zr,fa,qo,Bo,Mr),zn==="fakeround"){let xn=Math.round(180*jn/Math.PI/20);for(let cs=1;cs2*ar){let qo=zr.add(ia.sub(zr)._mult(ar/is)._round());this.updateDistance(zr,qo),this.addCurrentVertex(qo,ja,0,0,Mr),zr=qo}}}}addCurrentVertex(R,J,ve,Ee,Be,Ge=!1){let ct=J.y*Ee-J.x,At=-J.y-J.x*Ee;this.addHalfVertex(R,J.x+J.y*ve,J.y-J.x*ve,Ge,!1,ve,Be),this.addHalfVertex(R,ct,At,Ge,!0,-Ee,Be),this.distance>Cp/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(R,J,ve,Ee,Be,Ge))}addHalfVertex({x:R,y:J},ve,Ee,Be,Ge,ct,At){let Nt=.5*(this.lineClips?this.scaledDistance*(Cp-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((R<<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&Nt)<<2,Nt>>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(R,J){this.distance+=R.dist(J),this.updateScaledDistance()}}let Lp,Lv;mi("LineBucket",Vp,{omit:["layers","patternFeatures"]});var Vd={get paint(){return Lv=Lv||new Oe({"line-opacity":new Fo(te.paint_line["line-opacity"]),"line-color":new Fo(te.paint_line["line-color"]),"line-translate":new fo(te.paint_line["line-translate"]),"line-translate-anchor":new fo(te.paint_line["line-translate-anchor"]),"line-width":new Fo(te.paint_line["line-width"]),"line-gap-width":new Fo(te.paint_line["line-gap-width"]),"line-offset":new Fo(te.paint_line["line-offset"]),"line-blur":new Fo(te.paint_line["line-blur"]),"line-dasharray":new lc(te.paint_line["line-dasharray"]),"line-pattern":new Dc(te.paint_line["line-pattern"]),"line-gradient":new Yu(te.paint_line["line-gradient"])})},get layout(){return Lp=Lp||new Oe({"line-cap":new fo(te.layout_line["line-cap"]),"line-join":new Fo(te.layout_line["line-join"]),"line-miter-limit":new fo(te.layout_line["line-miter-limit"]),"line-round-limit":new fo(te.layout_line["line-round-limit"]),"line-sort-key":new Fo(te.layout_line["line-sort-key"])})}};class Gf extends Fo{possiblyEvaluate(R,J){return J=new Fs(Math.floor(J.zoom),{now:J.now,fadeDuration:J.fadeDuration,zoomHistory:J.zoomHistory,transition:J.transition}),super.possiblyEvaluate(R,J)}evaluate(R,J,ve,Ee){return J=E({},J,{zoom:Math.floor(J.zoom)}),super.evaluate(R,J,ve,Ee)}}let Gd;class Pv extends ie{constructor(R){super(R,Vd),this.gradientVersion=0,Gd||(Gd=new Gf(Vd.paint.properties["line-width"].specification),Gd.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(R){if(R==="line-gradient"){let J=this.gradientExpression();this.stepInterpolant=!!function(ve){return ve._styleExpression!==void 0}(J)&&J._styleExpression.expression instanceof ba,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(R,J){super.recalculate(R,J),this.paint._values["line-floorwidth"]=Gd.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,R)}createBucket(R){return new Vp(R)}queryRadius(R){let J=R,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(R,J,ve,Ee,Be,Ge,ct){let At=zi(R,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),Ge.angle,ct),Nt=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(Mr,zr){let Wr=[];for(let ia=0;ia=3){for(let ja=0;ja0?R+2*H:H}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),om=ht([{name:"a_projected_pos",components:3,type:"Float32"}],4);ht([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);let sm=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 Iv=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(H,R,J){return H.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,R,J)}),H}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 hu=24,Dh=Mu,Rv=function(H,R,J,ve,Ee){var Be,Ge,ct=8*Ee-ve-1,At=(1<>1,ar=-7,Mr=J?Ee-1:0,zr=J?-1:1,Wr=H[R+Mr];for(Mr+=zr,Be=Wr&(1<<-ar)-1,Wr>>=-ar,ar+=ct;ar>0;Be=256*Be+H[R+Mr],Mr+=zr,ar-=8);for(Ge=Be&(1<<-ar)-1,Be>>=-ar,ar+=ve;ar>0;Ge=256*Ge+H[R+Mr],Mr+=zr,ar-=8);if(Be===0)Be=1-Nt;else{if(Be===At)return Ge?NaN:1/0*(Wr?-1:1);Ge+=Math.pow(2,ve),Be-=Nt}return(Wr?-1:1)*Ge*Math.pow(2,Be-ve)},lm=function(H,R,J,ve,Ee,Be){var Ge,ct,At,Nt=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=R<0||R===0&&1/R<0?1:0;for(R=Math.abs(R),isNaN(R)||R===1/0?(ct=isNaN(R)?1:0,Ge=ar):(Ge=Math.floor(Math.log(R)/Math.LN2),R*(At=Math.pow(2,-Ge))<1&&(Ge--,At*=2),(R+=Ge+Mr>=1?zr/At:zr*Math.pow(2,1-Mr))*At>=2&&(Ge++,At/=2),Ge+Mr>=ar?(ct=0,Ge=ar):Ge+Mr>=1?(ct=(R*At-1)*Math.pow(2,Ee),Ge+=Mr):(ct=R*Math.pow(2,Mr-1)*Math.pow(2,Ee),Ge=0));Ee>=8;H[J+Wr]=255&ct,Wr+=ia,ct/=256,Ee-=8);for(Ge=Ge<0;H[J+Wr]=255&Ge,Wr+=ia,Ge/=256,Nt-=8);H[J+Wr-ia]|=128*fa};function Mu(H){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(H)?H:new Uint8Array(H||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(H){return H.type===Mu.Bytes?H.readVarint()+H.pos:H.pos+1}function lv(H,R,J){return J?4294967296*R+(H>>>0):4294967296*(R>>>0)+(H>>>0)}function bg(H,R,J){var ve=R<=16383?1:R<=2097151?2:R<=268435455?3:Math.floor(Math.log(R)/(7*Math.LN2));J.realloc(ve);for(var Ee=J.pos-1;Ee>=H;Ee--)J.buf[Ee+ve]=J.buf[Ee]}function T0(H,R){for(var J=0;J>>8,H[J+2]=R>>>16,H[J+3]=R>>>24}function Lx(H,R){return(H[R]|H[R+1]<<8|H[R+2]<<16)+(H[R+3]<<24)}Mu.prototype={destroy:function(){this.buf=null},readFields:function(H,R,J){for(J=J||this.length;this.pos>3,Be=this.pos;this.type=7&ve,H(Ee,R,this),this.pos===Be&&this.skip(ve)}return R},readMessage:function(H,R){return this.readFields(H,R,this.readVarint()+this.pos)},readFixed32:function(){var H=Dv(this.buf,this.pos);return this.pos+=4,H},readSFixed32:function(){var H=Lx(this.buf,this.pos);return this.pos+=4,H},readFixed64:function(){var H=Dv(this.buf,this.pos)+Dv(this.buf,this.pos+4)*w0;return this.pos+=8,H},readSFixed64:function(){var H=Dv(this.buf,this.pos)+Lx(this.buf,this.pos+4)*w0;return this.pos+=8,H},readFloat:function(){var H=Rv(this.buf,this.pos,!0,23,4);return this.pos+=4,H},readDouble:function(){var H=Rv(this.buf,this.pos,!0,52,8);return this.pos+=8,H},readVarint:function(H){var R,J,ve=this.buf;return R=127&(J=ve[this.pos++]),J<128?R:(R|=(127&(J=ve[this.pos++]))<<7,J<128?R:(R|=(127&(J=ve[this.pos++]))<<14,J<128?R:(R|=(127&(J=ve[this.pos++]))<<21,J<128?R:function(Ee,Be,Ge){var ct,At,Nt=Ge.buf;if(ct=(112&(At=Nt[Ge.pos++]))>>4,At<128||(ct|=(127&(At=Nt[Ge.pos++]))<<3,At<128)||(ct|=(127&(At=Nt[Ge.pos++]))<<10,At<128)||(ct|=(127&(At=Nt[Ge.pos++]))<<17,At<128)||(ct|=(127&(At=Nt[Ge.pos++]))<<24,At<128)||(ct|=(1&(At=Nt[Ge.pos++]))<<31,At<128))return lv(Ee,ct,Be);throw new Error("Expected varint not more than 10 bytes")}(R|=(15&(J=ve[this.pos]))<<28,H,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var H=this.readVarint();return H%2==1?(H+1)/-2:H/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var H=this.readVarint()+this.pos,R=this.pos;return this.pos=H,H-R>=12&&xg?function(J,ve,Ee){return xg.decode(J.subarray(ve,Ee))}(this.buf,R,H):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&&(Mr=ar):zr===2?(192&(ct=J[Ge+1]))==128&&(Mr=(31&ar)<<6|63&ct)<=127&&(Mr=null):zr===3?(At=J[Ge+2],(192&(ct=J[Ge+1]))==128&&(192&At)==128&&((Mr=(15&ar)<<12|(63&ct)<<6|63&At)<=2047||Mr>=55296&&Mr<=57343)&&(Mr=null)):zr===4&&(At=J[Ge+2],Nt=J[Ge+3],(192&(ct=J[Ge+1]))==128&&(192&At)==128&&(192&Nt)==128&&((Mr=(15&ar)<<18|(63&ct)<<12|(63&At)<<6|63&Nt)<=65535||Mr>=1114112)&&(Mr=null)),Mr===null?(Mr=65533,zr=1):Mr>65535&&(Mr-=65536,Be+=String.fromCharCode(Mr>>>10&1023|55296),Mr=56320|1023&Mr),Be+=String.fromCharCode(Mr),Ge+=zr}return Be}(this.buf,R,H)},readBytes:function(){var H=this.readVarint()+this.pos,R=this.buf.subarray(this.pos,H);return this.pos=H,R},readPackedVarint:function(H,R){if(this.type!==Mu.Bytes)return H.push(this.readVarint(R));var J=Pp(this);for(H=H||[];this.pos127;);else if(R===Mu.Bytes)this.pos=this.readVarint()+this.pos;else if(R===Mu.Fixed32)this.pos+=4;else{if(R!==Mu.Fixed64)throw new Error("Unimplemented type: "+R);this.pos+=8}},writeTag:function(H,R){this.writeVarint(H<<3|R)},realloc:function(H){for(var R=this.length||16;R268435455||H<0?function(R,J){var ve,Ee;if(R>=0?(ve=R%4294967296|0,Ee=R/4294967296|0):(Ee=~(-R/4294967296),4294967295^(ve=~(-R%4294967296))?ve=ve+1|0:(ve=0,Ee=Ee+1|0)),R>=18446744073709552e3||R<-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)}(H,this):(this.realloc(4),this.buf[this.pos++]=127&H|(H>127?128:0),H<=127||(this.buf[this.pos++]=127&(H>>>=7)|(H>127?128:0),H<=127||(this.buf[this.pos++]=127&(H>>>=7)|(H>127?128:0),H<=127||(this.buf[this.pos++]=H>>>7&127))))},writeSVarint:function(H){this.writeVarint(H<0?2*-H-1:2*H)},writeBoolean:function(H){this.writeVarint(!!H)},writeString:function(H){H=String(H),this.realloc(4*H.length),this.pos++;var R=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,H,this.pos);var J=this.pos-R;J>=128&&bg(R,J,this),this.pos=R-1,this.writeVarint(J),this.pos+=J},writeFloat:function(H){this.realloc(4),lm(this.buf,H,this.pos,!0,23,4),this.pos+=4},writeDouble:function(H){this.realloc(8),lm(this.buf,H,this.pos,!0,52,8),this.pos+=8},writeBytes:function(H){var R=H.length;this.writeVarint(R),this.realloc(R);for(var J=0;J=128&&bg(J,ve,this),this.pos=J-1,this.writeVarint(ve),this.pos+=ve},writeMessage:function(H,R,J){this.writeTag(H,Mu.Bytes),this.writeRawMessage(R,J)},writePackedVarint:function(H,R){R.length&&this.writeMessage(H,T0,R)},writePackedSVarint:function(H,R){R.length&&this.writeMessage(H,UT,R)},writePackedBoolean:function(H,R){R.length&&this.writeMessage(H,VT,R)},writePackedFloat:function(H,R){R.length&&this.writeMessage(H,jT,R)},writePackedDouble:function(H,R){R.length&&this.writeMessage(H,qT,R)},writePackedFixed32:function(H,R){R.length&&this.writeMessage(H,vk,R)},writePackedSFixed32:function(H,R){R.length&&this.writeMessage(H,GT,R)},writePackedFixed64:function(H,R){R.length&&this.writeMessage(H,HT,R)},writePackedSFixed64:function(H,R){R.length&&this.writeMessage(H,WT,R)},writeBytesField:function(H,R){this.writeTag(H,Mu.Bytes),this.writeBytes(R)},writeFixed32Field:function(H,R){this.writeTag(H,Mu.Fixed32),this.writeFixed32(R)},writeSFixed32Field:function(H,R){this.writeTag(H,Mu.Fixed32),this.writeSFixed32(R)},writeFixed64Field:function(H,R){this.writeTag(H,Mu.Fixed64),this.writeFixed64(R)},writeSFixed64Field:function(H,R){this.writeTag(H,Mu.Fixed64),this.writeSFixed64(R)},writeVarintField:function(H,R){this.writeTag(H,Mu.Varint),this.writeVarint(R)},writeSVarintField:function(H,R){this.writeTag(H,Mu.Varint),this.writeSVarint(R)},writeStringField:function(H,R){this.writeTag(H,Mu.Bytes),this.writeString(R)},writeFloatField:function(H,R){this.writeTag(H,Mu.Fixed32),this.writeFloat(R)},writeDoubleField:function(H,R){this.writeTag(H,Mu.Fixed64),this.writeDouble(R)},writeBooleanField:function(H,R){this.writeVarintField(H,!!R)}};var P1=r(Dh);let I1=3;function mk(H,R,J){H===1&&J.readMessage(XT,R)}function XT(H,R,J){if(H===3){let{id:ve,bitmap:Ee,width:Be,height:Ge,left:ct,top:At,advance:Nt}=J.readMessage(Px,{});R.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:Nt}})}}function Px(H,R,J){H===1?R.id=J.readVarint():H===2?R.bitmap=J.readBytes():H===3?R.width=J.readVarint():H===4?R.height=J.readVarint():H===5?R.left=J.readSVarint():H===6?R.top=J.readSVarint():H===7&&(R.advance=J.readVarint())}let Ix=I1;function R1(H){let R=0,J=0;for(let Ge of H)R+=Ge.w*Ge.h,J=Math.max(J,Ge.w);H.sort((Ge,ct)=>ct.h-Ge.h);let ve=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(R/.95)),J),h:1/0}],Ee=0,Be=0;for(let Ge of H)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 Nt=ve.pop();ct=0&&ve>=R&&Ag[this.text.charCodeAt(ve)];ve--)J--;this.text=this.text.substring(R,J),this.sectionIndex=this.sectionIndex.slice(R,J)}substring(R,J){let ve=new um;return ve.text=this.text.substring(R,J),ve.sectionIndex=this.sectionIndex.slice(R,J),ve.sections=this.sections,ve}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((R,J)=>Math.max(R,this.sections[J].scale),0)}addTextSection(R,J){this.text+=R.text,this.sections.push(S0.forText(R.scale,R.fontStack||J));let ve=this.sections.length-1;for(let Ee=0;Ee=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function M0(H,R,J,ve,Ee,Be,Ge,ct,At,Nt,ar,Mr,zr,Wr,ia){let fa=um.fromFeature(H,Ee),ja;Mr===e.ah.vertical&&fa.verticalizePunctuation();let{processBidirectionalText:Ka,processStyledBidirectionalText:Wi}=Js;if(Ka&&fa.sections.length===1){ja=[];let en=Ka(fa.toString(),cm(fa,Nt,Be,R,ve,Wr));for(let jn of en){let Lo=new um;Lo.text=jn,Lo.sections=fa.sections;for(let xs=0;xs0&&Xp>yf&&(yf=Xp)}else{let zc=Lo[pu.fontStack],Pf=zc&&zc[Ju];if(Pf&&Pf.rect)mm=Pf.rect,Qc=Pf.metrics;else{let Xp=jn[pu.fontStack],Zd=Xp&&Xp[Ju];if(!Zd)continue;Qc=Zd.metrics}Dp=(ah-pu.scale)*hu}Wp?(en.verticalizable=!0,dh.push({glyph:Ju,imageName:_d,x:Rs,y:Ku+Dp,vertical:Wp,scale:pu.scale,fontStack:pu.fontStack,sectionIndex:fc,metrics:Qc,rect:mm}),Rs+=fd*pu.scale+xn):(dh.push({glyph:Ju,imageName:_d,x:Rs,y:Ku+Dp,vertical:Wp,scale:pu.scale,fontStack:pu.fontStack,sectionIndex:fc,metrics:Qc,rect:mm}),Rs+=Qc.advance*pu.scale+xn)}dh.length!==0&&(Uu=Math.max(Rs-xn,Uu),uv(dh,0,dh.length-1,Hp,yf)),Rs=0;let Rp=zn*ah+yf;Ah.lineOffset=Math.max(yf,Fh),Ku+=Rp,th=Math.max(Rp,th),++Th}var rh;let $h=Ku-eh,{horizontalAlign:Qh,verticalAlign:ep}=Mg(is);(function(ff,ah,Fh,Ah,dh,yf,Rp,vp,pu){let fc=(ah-Fh)*dh,Ju=0;Ju=yf!==Rp?-vp*Ah-eh:(-Ah*pu+.5)*Rp;for(let Dp of ff)for(let Qc of Dp.positionedGlyphs)Qc.x+=fc,Qc.y+=Ju})(en.positionedLines,Hp,Qh,ep,Uu,th,zn,$h,vo.length),en.top+=-ep*$h,en.bottom=en.top+$h,en.left+=-Qh*Uu,en.right=en.left+Uu}(qi,R,J,ve,ja,Ge,ct,At,Mr,Nt,zr,ia),!function(en){for(let jn of en)if(jn.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(H,R,J,ve,Ee,Be){if(R.imageName){let Ge=ve[R.imageName];return Ge?Ge.displaySize[0]*R.scale*hu/Be+Ee:0}{let Ge=J[R.fontStack],ct=Ge&&Ge[H];return ct?ct.metrics.advance*R.scale+Ee:0}}function Dx(H,R,J,ve){let Ee=Math.pow(H-R,2);return ve?H=0,Nt=0;for(let Mr=0;MrNt){let ar=Math.ceil(Be/Nt);Ee*=ar/Ge,Ge=ar}return{x1:ve,y1:Ee,x2:ve+Be,y2:Ee+Ge}}function Ox(H,R,J,ve,Ee,Be){let Ge=H.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=R.left*Be,Nt=R.right*Be,ar,Mr,zr,Wr;J==="width"||J==="both"?(Wr=Ee[0]+At-ve[3],Mr=Ee[0]+Nt+ve[1]):(Wr=Ee[0]+(At+Nt-Ge.displaySize[0])/2,Mr=Wr+Ge.displaySize[0]);let ia=R.top*Be,fa=R.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:Mr,bottom:zr,left:Wr,collisionPadding:ct}}let k0=255,yd=128,cv=k0*yd;function Bx(H,R){let{expression:J}=R;if(J.kind==="constant")return{kind:"constant",layoutSize:J.evaluate(new Fs(H+1))};if(J.kind==="source")return{kind:"source"};{let{zoomStops:ve,interpolationType:Ee}=J,Be=0;for(;BeGe.id),this.index=R.index,this.pixelRatio=R.pixelRatio,this.sourceLayerIndex=R.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=R.sourceID}createArrays(){this.text=new O1(new al(this.layers,this.zoom,R=>/^text/.test(R))),this.icon=new O1(new al(this.layers,this.zoom,R=>/^icon/.test(R))),this.glyphOffsetArray=new ls,this.lineVertexArray=new Mo,this.symbolInstances=new Ao,this.textAnchorOffsets=new ds}calculateGlyphDependencies(R,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,Mr=Be.get("symbol-sort-key");if(this.features=[],!Nt&&!ar)return;let zr=J.iconDependencies,Wr=J.glyphDependencies,ia=J.availableImages,fa=new Fs(this.zoom);for(let{feature:ja,id:Ka,index:Wi,sourceLayerIndex:gi}of R){let qi=Ee._featureFilter.needGeometry,en=Wl(ja,qi);if(!Ee._featureFilter.filter(fa,en,ve))continue;let jn,Lo;if(qi||(en.geometry=Tl(ja)),Nt){let vo=Ee.getValueAndResolveTokens("text-field",en,ve,ia),zn=ra.factory(vo),is=this.hasRTLText=this.hasRTLText||F1(zn);(!is||Js.getRTLTextPluginStatus()==="unavailable"||is&&Js.isParsed())&&(jn=ov(zn,Ee,en))}if(ar){let vo=Ee.getValueAndResolveTokens("icon-image",en,ve,ia);Lo=vo instanceof Za?vo:Za.fromString(vo)}if(!jn&&!Lo)continue;let xs=this.sortFeaturesByKey?Mr.evaluate(en,{},ve):void 0;if(this.features.push({id:Ka,text:jn,icon:Lo,index:Wi,sourceLayerIndex:gi,geometry:en.geometry,properties:ja.properties,type:JT[ja.type],sortKey:xs}),Lo&&(zr[Lo.name]=!0),jn){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 is of jn.sections)if(is.image)zr[is.image.name]=!0;else{let qo=yo(jn.toString()),Bo=is.fontStack||vo,xn=Wr[Bo]=Wr[Bo]||{};this.calculateGlyphDependencies(is.text,xn,zn,this.allowVerticalPlacement,qo)}}}Be.get("symbol-placement")==="line"&&(this.features=function(ja){let Ka={},Wi={},gi=[],qi=0;function en(vo){gi.push(ja[vo]),qi++}function jn(vo,zn,is){let qo=Wi[vo];return delete Wi[vo],Wi[zn]=qo,gi[qo].geometry[0].pop(),gi[qo].geometry[0]=gi[qo].geometry[0].concat(is[0]),qo}function Lo(vo,zn,is){let qo=Ka[zn];return delete Ka[zn],Ka[vo]=qo,gi[qo].geometry[0].shift(),gi[qo].geometry[0]=is[0].concat(gi[qo].geometry[0]),qo}function xs(vo,zn,is){let qo=is?zn[0][zn[0].length-1]:zn[0][0];return`${vo}:${qo.x}:${qo.y}`}for(let vo=0;vovo.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort((ja,Ka)=>ja.sortKey-Ka.sortKey)}update(R,J,ve){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(R,J,this.layers,ve),this.icon.programConfigurations.updatePaintArrays(R,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(R){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(R),this.iconCollisionBox.upload(R)),this.text.upload(R,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(R,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(R,J){let ve=this.lineVertexArray.length;if(R.segment!==void 0){let Ee=R.dist(J[R.segment+1]),Be=R.dist(J[R.segment]),Ge={};for(let ct=R.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(R,J){let ve=R.placedSymbolArray.get(J),Ee=ve.vertexStartIndex+4*ve.numGlyphs;for(let Be=ve.vertexStartIndex;BeEe[ct]-Ee[At]||Be[At]-Be[ct]),Ge}addToSortKeyRanges(R,J){let ve=this.sortKeyRanges[this.sortKeyRanges.length-1];ve&&ve.sortKey===J?ve.symbolInstanceEnd=R+1:this.sortKeyRanges.push({sortKey:J,symbolInstanceStart:R,symbolInstanceEnd:R+1})}sortFeatures(R){if(this.sortFeaturesByY&&this.sortedAngle!==R&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(R),this.sortedAngle=R,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",fm,{omit:["layers","collisionBoxArray","features","compareText"]}),fm.MAX_GLYPHS=65535,fm.addDynamicAttributes=z1;var kg={get paint(){return C0=C0||new Oe({"icon-opacity":new Fo(te.paint_symbol["icon-opacity"]),"icon-color":new Fo(te.paint_symbol["icon-color"]),"icon-halo-color":new Fo(te.paint_symbol["icon-halo-color"]),"icon-halo-width":new Fo(te.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Fo(te.paint_symbol["icon-halo-blur"]),"icon-translate":new fo(te.paint_symbol["icon-translate"]),"icon-translate-anchor":new fo(te.paint_symbol["icon-translate-anchor"]),"text-opacity":new Fo(te.paint_symbol["text-opacity"]),"text-color":new Fo(te.paint_symbol["text-color"],{runtimeType:Bt,getOverride:H=>H.textColor,hasOverride:H=>!!H.textColor}),"text-halo-color":new Fo(te.paint_symbol["text-halo-color"]),"text-halo-width":new Fo(te.paint_symbol["text-halo-width"]),"text-halo-blur":new Fo(te.paint_symbol["text-halo-blur"]),"text-translate":new fo(te.paint_symbol["text-translate"]),"text-translate-anchor":new fo(te.paint_symbol["text-translate-anchor"])})},get layout(){return cf=cf||new Oe({"symbol-placement":new fo(te.layout_symbol["symbol-placement"]),"symbol-spacing":new fo(te.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new fo(te.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Fo(te.layout_symbol["symbol-sort-key"]),"symbol-z-order":new fo(te.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new fo(te.layout_symbol["icon-allow-overlap"]),"icon-overlap":new fo(te.layout_symbol["icon-overlap"]),"icon-ignore-placement":new fo(te.layout_symbol["icon-ignore-placement"]),"icon-optional":new fo(te.layout_symbol["icon-optional"]),"icon-rotation-alignment":new fo(te.layout_symbol["icon-rotation-alignment"]),"icon-size":new Fo(te.layout_symbol["icon-size"]),"icon-text-fit":new fo(te.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new fo(te.layout_symbol["icon-text-fit-padding"]),"icon-image":new Fo(te.layout_symbol["icon-image"]),"icon-rotate":new Fo(te.layout_symbol["icon-rotate"]),"icon-padding":new Fo(te.layout_symbol["icon-padding"]),"icon-keep-upright":new fo(te.layout_symbol["icon-keep-upright"]),"icon-offset":new Fo(te.layout_symbol["icon-offset"]),"icon-anchor":new Fo(te.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new fo(te.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new fo(te.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new fo(te.layout_symbol["text-rotation-alignment"]),"text-field":new Fo(te.layout_symbol["text-field"]),"text-font":new Fo(te.layout_symbol["text-font"]),"text-size":new Fo(te.layout_symbol["text-size"]),"text-max-width":new Fo(te.layout_symbol["text-max-width"]),"text-line-height":new fo(te.layout_symbol["text-line-height"]),"text-letter-spacing":new Fo(te.layout_symbol["text-letter-spacing"]),"text-justify":new Fo(te.layout_symbol["text-justify"]),"text-radial-offset":new Fo(te.layout_symbol["text-radial-offset"]),"text-variable-anchor":new fo(te.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new Fo(te.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new Fo(te.layout_symbol["text-anchor"]),"text-max-angle":new fo(te.layout_symbol["text-max-angle"]),"text-writing-mode":new fo(te.layout_symbol["text-writing-mode"]),"text-rotate":new Fo(te.layout_symbol["text-rotate"]),"text-padding":new fo(te.layout_symbol["text-padding"]),"text-keep-upright":new fo(te.layout_symbol["text-keep-upright"]),"text-transform":new Fo(te.layout_symbol["text-transform"]),"text-offset":new Fo(te.layout_symbol["text-offset"]),"text-allow-overlap":new fo(te.layout_symbol["text-allow-overlap"]),"text-overlap":new fo(te.layout_symbol["text-overlap"]),"text-ignore-placement":new fo(te.layout_symbol["text-ignore-placement"]),"text-optional":new fo(te.layout_symbol["text-optional"])})}};class L0{constructor(R){if(R.property.overrides===void 0)throw new Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=R.property.overrides?R.property.overrides.runtimeType:rt,this.defaultValue=R}evaluate(R){if(R.formattedSection){let J=this.defaultValue.property.overrides;if(J&&J.hasOverride(R.formattedSection))return J.getOverride(R.formattedSection)}return R.feature&&R.featureState?this.defaultValue.evaluate(R.feature,R.featureState):this.defaultValue.property.specification.default}eachChild(R){this.defaultValue.isConstant()||R(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}mi("FormatSectionOverride",L0,{omit:["defaultValue"]});class zv extends ie{constructor(R){super(R,kg)}recalculate(R,J){if(super.recalculate(R,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(R,J,ve,Ee){let Be=this.layout.get(R).evaluate(J,{},ve,Ee),Ge=this._unevaluatedLayout._values[R];return Ge.isDataDriven()||Mc(Ge.value)||!Be?Be:function(ct,At){return At.replace(/{([^{}]+)}/g,(Nt,ar)=>ct&&ar in ct?String(ct[ar]):"")}(J.properties,Be)}createBucket(R){return new fm(R)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(let R of kg.paint.overridableProperties){if(!zv.hasPaintOverride(this.layout,R))continue;let J=this.paint.get(R),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[R]=new Au(J.property,Be,J.parameters)}}_handleOverridablePaintPropertyUpdate(R,J,ve){return!(!this.layout||J.isDataDriven()||ve.isDataDriven())&&zv.hasPaintOverride(this.layout,R)}static hasPaintOverride(R,J){let ve=R.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=Nt=>{Be||(Nt instanceof tn&&Ia(Nt.value)===qr?Ge(Nt.value.sections):Nt instanceof ss?Ge(Nt.sections):Nt.eachChild(ct))},At=ve.value;At._styleExpression&&ct(At._styleExpression.expression)}return Be}}let Nx;var P0={get paint(){return Nx=Nx||new Oe({"background-color":new fo(te.paint_background["background-color"]),"background-pattern":new lc(te.paint_background["background-pattern"]),"background-opacity":new fo(te.paint_background["background-opacity"])})}};class QT extends ie{constructor(R){super(R,P0)}}let B1;var Ux={get paint(){return B1=B1||new Oe({"raster-opacity":new fo(te.paint_raster["raster-opacity"]),"raster-hue-rotate":new fo(te.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new fo(te.paint_raster["raster-brightness-min"]),"raster-brightness-max":new fo(te.paint_raster["raster-brightness-max"]),"raster-saturation":new fo(te.paint_raster["raster-saturation"]),"raster-contrast":new fo(te.paint_raster["raster-contrast"]),"raster-resampling":new fo(te.paint_raster["raster-resampling"]),"raster-fade-duration":new fo(te.paint_raster["raster-fade-duration"])})}};class I0 extends ie{constructor(R){super(R,Ux)}}class N1 extends ie{constructor(R){super(R,{}),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=R}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(R){this._methodToThrottle=R,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(R,J){if(isNaN(R)||isNaN(J))throw new Error(`Invalid LngLat object: (${R}, ${J})`);if(this.lng=+R,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(R){let J=Math.PI/180,ve=this.lat*J,Ee=R.lat*J,Be=Math.sin(ve)*Math.sin(Ee)+Math.cos(ve)*Math.cos(Ee)*Math.cos((R.lng-this.lng)*J);return j1*Math.acos(Math.min(Be,1))}static convert(R){if(R instanceof Hd)return R;if(Array.isArray(R)&&(R.length===2||R.length===3))return new Hd(Number(R[0]),Number(R[1]));if(!Array.isArray(R)&&typeof R=="object"&&R!==null)return new Hd(Number("lng"in R?R.lng:R.lon),Number(R.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 hm=2*Math.PI*j1;function jx(H){return hm*Math.cos(H*Math.PI/180)}function Cg(H){return(180+H)/360}function qx(H){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+H*Math.PI/360)))/360}function Lg(H,R){return H/jx(R)}function R0(H){return 360/Math.PI*Math.atan(Math.exp((180-360*H)*Math.PI/180))-90}class D0{constructor(R,J,ve=0){this.x=+R,this.y=+J,this.z=+ve}static fromLngLat(R,J=0){let ve=Hd.convert(R);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/hm*(R=R0(this.y),1/Math.cos(R*Math.PI/180));var R}}function rd(H,R,J){var ve=2*Math.PI*6378137/256/Math.pow(2,J);return[H*ve-2*Math.PI*6378137/2,R*ve-2*Math.PI*6378137/2]}class q1{constructor(R,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))}(R,J,ve))throw new Error(`x=${J}, y=${ve}, z=${R} outside of bounds. 0<=x<${Math.pow(2,R)}, 0<=y<${Math.pow(2,R)} 0<=z<=25 `);this.z=R,this.x=J,this.y=ve,this.key=z0(0,R,R,J,ve)}equals(R){return this.z===R.z&&this.x===R.x&&this.y===R.y}url(R,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),Nt=rd(256*(Be+1),256*(Ge+1),ct),At[0]+","+At[1]+","+Nt[0]+","+Nt[1]);var Be,Ge,ct,At,Nt;let ar=function(Mr,zr,Wr){let ia,fa="";for(let ja=Mr;ja>0;ja--)ia=1<1?"@2x":"").replace(/{quadkey}/g,ar).replace(/{bbox-epsg-3857}/g,Ee)}isChildOf(R){let J=this.z-R.z;return J>0&&R.x===this.x>>J&&R.y===this.y>>J}getTilePoint(R){let J=Math.pow(2,this.z);return new i((R.x*J-this.x)*po,(R.y*J-this.y)*po)}toString(){return`${this.z}/${this.x}/${this.y}`}}class Vx{constructor(R,J){this.wrap=R,this.canonical=J,this.key=z0(R,J.z,J.z,J.x,J.y)}}class Gp{constructor(R,J,ve,Ee,Be){if(R= z; overscaledZ = ${R}; z = ${ve}`);this.overscaledZ=R,this.wrap=J,this.canonical=new q1(ve,+Ee,+Be),this.key=z0(J,R,ve,Ee,Be)}clone(){return new Gp(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(R){return this.overscaledZ===R.overscaledZ&&this.wrap===R.wrap&&this.canonical.equals(R.canonical)}scaledTo(R){if(R>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${R}; overscaledZ = ${this.overscaledZ}`);let J=this.canonical.z-R;return R>this.canonical.z?new Gp(R,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Gp(R,this.wrap,R,this.canonical.x>>J,this.canonical.y>>J)}calculateScaledKey(R,J){if(R>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${R}; overscaledZ = ${this.overscaledZ}`);let ve=this.canonical.z-R;return R>this.canonical.z?z0(this.wrap*+J,R,this.canonical.z,this.canonical.x,this.canonical.y):z0(this.wrap*+J,R,R,this.canonical.x>>ve,this.canonical.y>>ve)}isChildOf(R){if(R.wrap!==this.wrap)return!1;let J=this.canonical.z-R.canonical.z;return R.overscaledZ===0||R.overscaledZ>J&&R.canonical.y===this.canonical.y>>J}children(R){if(this.overscaledZ>=R)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(R){return this.wrapR.wrap)&&(this.overscaledZR.overscaledZ)&&(this.canonical.xR.canonical.x)&&this.canonical.ythis.max&&(this.max=Mr),Mr=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+(R+1)}unpack(R,J,ve){return R*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(R,J,ve){if(this.dim!==R.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,Nt=-ve*this.dim;for(let ar=Ge;ar=this._numberToString.length)throw new Error(`Out of bounds. Index requested n=${R} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[R]}}class V1{constructor(R,J,ve,Ee,Be){this.type="Feature",this._vectorTileFeature=R,R._z=J,R._x=ve,R._y=Ee,this.properties=R.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(R){this._geometry=R}toJSON(){let R={geometry:this.geometry};for(let J in this)J!=="_geometry"&&J!=="_vectorTileFeature"&&(R[J]=this[J]);return R}}class Fv{constructor(R,J){this.tileID=R,this.x=R.canonical.x,this.y=R.canonical.y,this.z=R.canonical.z,this.grid=new Di(po,16,0),this.grid3D=new Di(po,16,0),this.featureIndexArray=new tl,this.promoteId=J}insert(R,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 Nt=0;Nt=0&&Mr[3]>=0&&At.insert(ct,Mr[0],Mr[1],Mr[2],Mr[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(R,J,ve,Ee){this.loadVTLayers();let Be=R.params||{},Ge=po/R.tileSize/R.scale,ct=Ec(Be.filter),At=R.queryGeometry,Nt=R.queryPadding*Ge,ar=Xx(At),Mr=this.grid.query(ar.minX-Nt,ar.minY-Nt,ar.maxX+Nt,ar.maxY+Nt),zr=Xx(R.cameraQueryGeometry),Wr=this.grid3D.query(zr.minX-Nt,zr.minY-Nt,zr.maxX+Nt,zr.maxY+Nt,(ja,Ka,Wi,gi)=>function(qi,en,jn,Lo,xs){for(let zn of qi)if(en<=zn.x&&jn<=zn.y&&Lo>=zn.x&&xs>=zn.y)return!0;let vo=[new i(en,jn),new i(en,xs),new i(Lo,xs),new i(Lo,jn)];if(qi.length>2){for(let zn of vo)if(bi(qi,zn))return!0}for(let zn=0;zn(gi||(gi=Tl(qi)),en.queryIntersectsFeature(At,qi,jn,gi,this.z,R.transform,Ge,R.pixelPosMatrix)))}return ia}loadMatchingFeature(R,J,ve,Ee,Be,Ge,ct,At,Nt,ar,Mr){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=Wl(ia,!0);if(!Be.filter(new Fs(this.tileID.overscaledZ),ja,this.tileID.canonical))return}else if(!Be.filter(new Fs(this.tileID.overscaledZ),ia))return;let fa=this.getId(ia,Wr);for(let ja=0;ja{let ct=R instanceof yc?R.get(Ge):null;return ct&&ct.evaluate?ct.evaluate(J,ve,Ee):ct})}function Xx(H){let R=1/0,J=1/0,ve=-1/0,Ee=-1/0;for(let Be of H)R=Math.min(R,Be.x),J=Math.min(J,Be.y),ve=Math.max(ve,Be.x),Ee=Math.max(Ee,Be.y);return{minX:R,minY:J,maxX:ve,maxY:Ee}}function eA(H,R){return R-H}function Zx(H,R,J,ve,Ee){let Be=[];for(let Ge=0;Ge=ve&&Mr.x>=ve||(ar.x>=ve?ar=new i(ve,ar.y+(ve-ar.x)/(Mr.x-ar.x)*(Mr.y-ar.y))._round():Mr.x>=ve&&(Mr=new i(ve,ar.y+(ve-ar.x)/(Mr.x-ar.x)*(Mr.y-ar.y))._round()),ar.y>=Ee&&Mr.y>=Ee||(ar.y>=Ee?ar=new i(ar.x+(Ee-ar.y)/(Mr.y-ar.y)*(Mr.x-ar.x),Ee)._round():Mr.y>=Ee&&(Mr=new i(ar.x+(Ee-ar.y)/(Mr.y-ar.y)*(Mr.x-ar.x),Ee)._round()),At&&ar.equals(At[At.length-1])||(At=[ar],Be.push(At)),At.push(Mr)))))}}return Be}mi("FeatureIndex",Fv,{omit:["rawTileData","sourceLayerCoder"]});class Wd extends i{constructor(R,J,ve,Ee){super(R,J),this.angle=ve,Ee!==void 0&&(this.segment=Ee)}clone(){return new Wd(this.x,this.y,this.angle,this.segment)}}function G1(H,R,J,ve,Ee){if(R.segment===void 0||J===0)return!0;let Be=R,Ge=R.segment+1,ct=0;for(;ct>-J/2;){if(Ge--,Ge<0)return!1;ct-=H[Ge].dist(Be),Be=H[Ge]}ct+=H[Ge].dist(H[Ge+1]),Ge++;let At=[],Nt=0;for(;ctve;)Nt-=At.shift().angleDelta;if(Nt>Ee)return!1;Ge++,ct+=ar.dist(Mr)}return!0}function Yx(H){let R=0;for(let J=0;JNt){let ia=(Nt-At)/Wr,fa=kn.number(Mr.x,zr.x,ia),ja=kn.number(Mr.y,zr.y,ia),Ka=new Wd(fa,ja,zr.angleTo(Mr),ar);return Ka._round(),!Ge||G1(H,Ka,ct,Ge,R)?Ka:void 0}At+=Wr}}function rA(H,R,J,ve,Ee,Be,Ge,ct,At){let Nt=Kx(ve,Be,Ge),ar=Jx(ve,Ee),Mr=ar*Ge,zr=H[0].x===0||H[0].x===At||H[0].y===0||H[0].y===At;return R-Mr=0&&qi=0&&en=0&&zr+Nt<=ar){let jn=new Wd(qi,en,Wi,ia);jn._round(),ve&&!G1(H,jn,Be,ve,Ee)||Wr.push(jn)}}Mr+=Ka}return ct||Wr.length||Ge||(Wr=$x(H,Mr/2,J,ve,Ee,Be,Ge,!0,At)),Wr}mi("Anchor",Wd);let pm=zh;function Qx(H,R,J,ve){let Ee=[],Be=H.image,Ge=Be.pixelRatio,ct=Be.paddedRect.w-2*pm,At=Be.paddedRect.h-2*pm,Nt={x1:H.left,y1:H.top,x2:H.right,y2:H.bottom},ar=Be.stretchX||[[0,ct]],Mr=Be.stretchY||[[0,At]],zr=(xn,cs)=>xn+cs[1]-cs[0],Wr=ar.reduce(zr,0),ia=Mr.reduce(zr,0),fa=ct-Wr,ja=At-ia,Ka=0,Wi=Wr,gi=0,qi=ia,en=0,jn=fa,Lo=0,xs=ja;if(Be.content&&ve){let xn=Be.content,cs=xn[2]-xn[0],No=xn[3]-xn[1];(Be.textFitWidth||Be.textFitHeight)&&(Nt=Fx(H)),Ka=Xd(ar,0,xn[0]),gi=Xd(Mr,0,xn[1]),Wi=Xd(ar,xn[0],xn[2]),qi=Xd(Mr,xn[1],xn[3]),en=xn[0]-Ka,Lo=xn[1]-gi,jn=cs-Wi,xs=No-qi}let vo=Nt.x1,zn=Nt.y1,is=Nt.x2-vo,qo=Nt.y2-zn,Bo=(xn,cs,No,Rs)=>{let Ku=Pg(xn.stretch-Ka,Wi,is,vo),Uu=dm(xn.fixed-en,jn,xn.stretch,Wr),th=Pg(cs.stretch-gi,qi,qo,zn),Hp=dm(cs.fixed-Lo,xs,cs.stretch,ia),Th=Pg(No.stretch-Ka,Wi,is,vo),rh=dm(No.fixed-en,jn,No.stretch,Wr),$h=Pg(Rs.stretch-gi,qi,qo,zn),Qh=dm(Rs.fixed-Lo,xs,Rs.stretch,ia),ep=new i(Ku,th),ff=new i(Th,th),ah=new i(Th,$h),Fh=new i(Ku,$h),Ah=new i(Uu/Ge,Hp/Ge),dh=new i(rh/Ge,Qh/Ge),yf=R*Math.PI/180;if(yf){let pu=Math.sin(yf),fc=Math.cos(yf),Ju=[fc,-pu,pu,fc];ep._matMult(Ju),ff._matMult(Ju),Fh._matMult(Ju),ah._matMult(Ju)}let Rp=xn.stretch+xn.fixed,vp=cs.stretch+cs.fixed;return{tl:ep,tr:ff,bl:Fh,br:ah,tex:{x:Be.paddedRect.x+pm+Rp,y:Be.paddedRect.y+pm+vp,w:No.stretch+No.fixed-Rp,h:Rs.stretch+Rs.fixed-vp},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:Ah,pixelOffsetBR:dh,minFontScaleX:jn/Ge/is,minFontScaleY:xs/Ge/qo,isSDF:J}};if(ve&&(Be.stretchX||Be.stretchY)){let xn=eb(ar,fa,Wr),cs=eb(Mr,ja,ia);for(let No=0;No0&&(fa=Math.max(10,fa),this.circleDiameter=fa)}else{let zr=!((Mr=Ge.image)===null||Mr===void 0)&&Mr.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 i(zr.x1,zr.y1),fa=new i(zr.x2,zr.y1),ja=new i(zr.x1,zr.y2),Ka=new i(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)}R.emplaceBack(J.x,J.y,zr.x1,zr.y1,zr.x2,zr.y2,ve,Ee,Be)}this.boxEndIndex=R.length}}class cd{constructor(R=[],J=(ve,Ee)=>veEe?1:0){if(this.data=R,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(R){this.data.push(R),this._up(this.length++)}pop(){if(this.length===0)return;let R=this.data[0],J=this.data.pop();return--this.length>0&&(this.data[0]=J,this._down(0)),R}peek(){return this.data[0]}_up(R){let{data:J,compare:ve}=this,Ee=J[R];for(;R>0;){let Be=R-1>>1,Ge=J[Be];if(ve(Ee,Ge)>=0)break;J[R]=Ge,R=Be}J[R]=Ee}_down(R){let{data:J,compare:ve}=this,Ee=this.length>>1,Be=J[R];for(;R=0)break;J[R]=J[Ge],R=Ge}J[R]=Be}}function aA(H,R=1,J=!1){let ve=1/0,Ee=1/0,Be=-1/0,Ge=-1/0,ct=H[0];for(let Wr=0;WrBe)&&(Be=ia.x),(!Wr||ia.y>Ge)&&(Ge=ia.y)}let At=Math.min(Be-ve,Ge-Ee),Nt=At/2,ar=new cd([],iA);if(At===0)return new i(ve,Ee);for(let Wr=ve;WrMr.d||!Mr.d)&&(Mr=Wr,J&&console.log("found best %d after %d probes",Math.round(1e4*Wr.d)/1e4,zr)),Wr.max-Mr.d<=R||(Nt=Wr.h/2,ar.push(new vm(Wr.p.x-Nt,Wr.p.y-Nt,Nt,H)),ar.push(new vm(Wr.p.x+Nt,Wr.p.y-Nt,Nt,H)),ar.push(new vm(Wr.p.x-Nt,Wr.p.y+Nt,Nt,H)),ar.push(new vm(Wr.p.x+Nt,Wr.p.y+Nt,Nt,H)),zr+=4)}return J&&(console.log(`num probes: ${zr}`),console.log(`best distance: ${Mr.d}`)),Mr.p}function iA(H,R){return R.max-H.max}function vm(H,R,J,ve){this.p=new i(H,R),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,xa(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,Ov=Number.POSITIVE_INFINITY;function H1(H,R){return R[1]!==Ov?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]}(H,R[0],R[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]}(H,R[0])}function tb(H,R,J){var ve;let Ee=H.layout,Be=(ve=Ee.get("text-variable-anchor-offset"))===null||ve===void 0?void 0:ve.evaluate(R,{},J);if(Be){let ct=Be.values,At=[];for(let Nt=0;Ntzr*hu);ar.startsWith("top")?Mr[1]-=pv:ar.startsWith("bottom")&&(Mr[1]+=pv),At[Nt+1]=Mr}return new $a(At)}let Ge=Ee.get("text-variable-anchor");if(Ge){let ct;ct=H._unevaluatedLayout.getValue("text-radial-offset")!==void 0?[Ee.get("text-radial-offset").evaluate(R,{},J)*hu,Ov]:Ee.get("text-offset").evaluate(R,{},J).map(Nt=>Nt*hu);let At=[];for(let Nt of Ge)At.push(Nt,H1(Nt,ct));return new $a(At)}return null}function W1(H){switch(H){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function nA(H,R,J,ve,Ee,Be,Ge,ct,At,Nt,ar){let Mr=Be.textMaxSize.evaluate(R,{});Mr===void 0&&(Mr=Ge);let zr=H.layers[0].layout,Wr=zr.get("icon-offset").evaluate(R,{},ar),ia=ab(J.horizontal),fa=Ge/24,ja=H.tilePixelRatio*fa,Ka=H.tilePixelRatio*Mr/24,Wi=H.tilePixelRatio*ct,gi=H.tilePixelRatio*zr.get("symbol-spacing"),qi=zr.get("text-padding")*H.tilePixelRatio,en=function(xn,cs,No,Rs=1){let Ku=xn.get("icon-padding").evaluate(cs,{},No),Uu=Ku&&Ku.values;return[Uu[0]*Rs,Uu[1]*Rs,Uu[2]*Rs,Uu[3]*Rs]}(zr,R,ar,H.tilePixelRatio),jn=zr.get("text-max-angle")/180*Math.PI,Lo=zr.get("text-rotation-alignment")!=="viewport"&&zr.get("symbol-placement")!=="point",xs=zr.get("icon-rotation-alignment")==="map"&&zr.get("symbol-placement")!=="point",vo=zr.get("symbol-placement"),zn=gi/2,is=zr.get("icon-text-fit"),qo;ve&&is!=="none"&&(H.allowVerticalPlacement&&J.vertical&&(qo=Ox(ve,J.vertical,is,zr.get("icon-text-fit-padding"),Wr,fa)),ia&&(ve=Ox(ve,ia,is,zr.get("icon-text-fit-padding"),Wr,fa)));let Bo=(xn,cs)=>{cs.x<0||cs.x>=po||cs.y<0||cs.y>=po||function(No,Rs,Ku,Uu,th,Hp,Th,rh,$h,Qh,ep,ff,ah,Fh,Ah,dh,yf,Rp,vp,pu,fc,Ju,Dp,Qc,mm){let _d=No.addToLineVertexArray(Rs,Ku),fd,Wp,zc,Pf,Xp=0,Zd=0,mp=0,gm=0,J1=-1,zg=-1,xd={},Bv=ti("");if(No.allowVerticalPlacement&&Uu.vertical){let Oh=rh.layout.get("text-rotate").evaluate(fc,{},Qc)+90;zc=new hv($h,Rs,Qh,ep,ff,Uu.vertical,ah,Fh,Ah,Oh),Th&&(Pf=new hv($h,Rs,Qh,ep,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),tp=Th?Qx(Th,Oh,Dp,Zp):void 0;Wp=new hv($h,Rs,Qh,ep,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&&y(`${No.layerIds[0]}: Value for "icon-size" is >= ${k0}. Reduce your "icon-size".`)):Bh.kind==="composite"&&(id=[yd*Ju.compositeIconSizes[0].evaluate(fc,{},Qc),yd*Ju.compositeIconSizes[1].evaluate(fc,{},Qc)],(id[0]>cv||id[1]>cv)&&y(`${No.layerIds[0]}: Value for "icon-size" is >= ${k0}. Reduce your "icon-size".`)),No.addSymbols(No.icon,dv,id,pu,vp,fc,e.ah.none,Rs,_d.lineStartIndex,_d.lineLength,-1,Qc),J1=No.icon.placedSymbolArray.length-1,tp&&(Zd=4*tp.length,No.addSymbols(No.icon,tp,id,pu,vp,fc,e.ah.vertical,Rs,_d.lineStartIndex,_d.lineLength,-1,Qc),zg=No.icon.placedSymbolArray.length-1)}let vh=Object.keys(Uu.horizontal);for(let Oh of vh){let Zp=Uu.horizontal[Oh];if(!fd){Bv=ti(Zp.text);let tp=rh.layout.get("text-rotate").evaluate(fc,{},Qc);fd=new hv($h,Rs,Qh,ep,ff,Zp,ah,Fh,Ah,tp)}let dv=Zp.positionedLines.length===1;if(mp+=rb(No,Rs,Zp,Hp,rh,Ah,fc,dh,_d,Uu.vertical?e.ah.horizontal:e.ah.horizontalOnly,dv?vh:[Oh],xd,J1,Ju,Qc),dv)break}Uu.vertical&&(gm+=rb(No,Rs,Uu.vertical,Hp,rh,Ah,fc,dh,_d,e.ah.vertical,["vertical"],xd,zg,Ju,Qc));let lA=fd?fd.boxStartIndex:No.collisionBoxArray.length,Fg=fd?fd.boxEndIndex:No.collisionBoxArray.length,bd=zc?zc.boxStartIndex:No.collisionBoxArray.length,gp=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*=mm/hu),No.glyphOffsetArray.length>=fm.MAX_GLYPHS&&y("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,Qc),[fA,hA]=function(Oh,Zp){let dv=Oh.length,tp=Zp?.values;if(tp?.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,Bv,lA,Fg,bd,gp,sb,uA,lb,cA,Qh,mp,gm,Xp,Zd,Og,0,ah,ad,fA,hA)}(H,cs,xn,J,ve,Ee,qo,H.layers[0],H.collisionBoxArray,R.index,R.sourceLayerIndex,H.index,ja,[qi,qi,qi,qi],Lo,At,Wi,en,xs,Wr,R,Be,Nt,ar,Ge)};if(vo==="line")for(let xn of Zx(R.geometry,0,0,po,po)){let cs=rA(xn,gi,jn,J.vertical||ia,ve,24,Ka,H.overscaling,po);for(let No of cs)ia&&oA(H,ia.text,zn,No)||Bo(xn,No)}else if(vo==="line-center"){for(let xn of R.geometry)if(xn.length>1){let cs=tA(xn,jn,J.vertical||ia,ve,24,Ka);cs&&Bo(xn,cs)}}else if(R.type==="Polygon")for(let xn of Tc(R.geometry,0)){let cs=aA(xn,16);Bo(xn[0],new Wd(cs.x,cs.y,0))}else if(R.type==="LineString")for(let xn of R.geometry)Bo(xn,new Wd(xn[0].x,xn[0].y,0));else if(R.type==="Point")for(let xn of R.geometry)for(let cs of xn)Bo([cs],new Wd(cs.x,cs.y,0))}function rb(H,R,J,ve,Ee,Be,Ge,ct,At,Nt,ar,Mr,zr,Wr,ia){let fa=function(Wi,gi,qi,en,jn,Lo,xs,vo){let zn=en.layout.get("text-rotate").evaluate(Lo,{})*Math.PI/180,is=[];for(let qo of gi.positionedLines)for(let Bo of qo.positionedGlyphs){if(!Bo.rect)continue;let xn=Bo.rect||{},cs=Ix+1,No=!0,Rs=1,Ku=0,Uu=(jn||vo)&&Bo.vertical,th=Bo.metrics.advance*Bo.scale/2;if(vo&&gi.verticalizable&&(Ku=qo.lineOffset/2-(Bo.imageName?-(hu-Bo.metrics.width*Bo.scale)/2:(Bo.scale-1)*hu)),Bo.imageName){let pu=xs[Bo.imageName];No=pu.sdf,Rs=pu.pixelRatio,cs=zh/Rs}let Hp=jn?[Bo.x+th,Bo.y]:[0,0],Th=jn?[0,0]:[Bo.x+th+qi[0],Bo.y+qi[1]-Ku],rh=[0,0];Uu&&(rh=Th,Th=[0,0]);let $h=Bo.metrics.isDoubleResolution?2:1,Qh=(Bo.metrics.left-cs)*Bo.scale-th+Th[0],ep=(-Bo.metrics.top-cs)*Bo.scale+Th[1],ff=Qh+xn.w/$h*Bo.scale/Rs,ah=ep+xn.h/$h*Bo.scale/Rs,Fh=new i(Qh,ep),Ah=new i(ff,ep),dh=new i(Qh,ah),yf=new i(ff,ah);if(Uu){let pu=new i(-th,th-eh),fc=-Math.PI/2,Ju=hu/2-th,Dp=new i(5-eh-Ju,-(Bo.imageName?Ju:0)),Qc=new i(...rh);Fh._rotateAround(fc,pu)._add(Dp)._add(Qc),Ah._rotateAround(fc,pu)._add(Dp)._add(Qc),dh._rotateAround(fc,pu)._add(Dp)._add(Qc),yf._rotateAround(fc,pu)._add(Dp)._add(Qc)}if(zn){let pu=Math.sin(zn),fc=Math.cos(zn),Ju=[fc,-pu,pu,fc];Fh._matMult(Ju),Ah._matMult(Ju),dh._matMult(Ju),yf._matMult(Ju)}let Rp=new i(0,0),vp=new i(0,0);is.push({tl:Fh,tr:Ah,bl:dh,br:yf,tex:xn,writingMode:gi.writingMode,glyphOffset:Hp,sectionIndex:Bo.sectionIndex,isSDF:No,pixelOffsetTL:Rp,pixelOffsetBR:vp,minFontScaleX:0,minFontScaleY:0})}return is}(0,J,ct,Ee,Be,Ge,ve,H.allowVerticalPlacement),ja=H.textSizeData,Ka=null;ja.kind==="source"?(Ka=[yd*Ee.layout.get("text-size").evaluate(Ge,{})],Ka[0]>cv&&y(`${H.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)&&y(`${H.layerIds[0]}: Value for "text-size" is >= ${k0}. Reduce your "text-size".`)),H.addSymbols(H.text,fa,Ka,ct,Be,Ge,Nt,R,At.lineStartIndex,At.lineLength,zr,ia);for(let Wi of ar)Mr[Wi]=H.text.placedSymbolArray.length-1;return 4*fa.length}function ab(H){for(let R in H)return H[R];return null}function oA(H,R,J,ve){let Ee=H.compareText;if(R in Ee){let Be=Ee[R];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(R,2,1),[ct]=new Uint32Array(R,4,1);return new X1(ct,Ge,Be,R)}constructor(R,J=64,ve=Float64Array,Ee){if(isNaN(R)||R<0)throw new Error(`Unpexpected numItems value: ${R}.`);this.numItems=+R,this.nodeSize=Math.min(Math.max(+J,2),65535),this.ArrayType=ve,this.IndexArrayType=R<65536?Uint16Array:Uint32Array;let Be=ib.indexOf(this.ArrayType),Ge=2*R*this.ArrayType.BYTES_PER_ELEMENT,ct=R*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,R),this.coords=new this.ArrayType(this.data,8+ct+At,2*R),this._pos=2*R,this._finished=!0):(this.data=new ArrayBuffer(8+Ge+ct+At),this.ids=new this.IndexArrayType(this.data,8,R),this.coords=new this.ArrayType(this.data,8+ct+At,2*R),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]=R)}add(R,J){let ve=this._pos>>1;return this.ids[ve]=ve,this.coords[this._pos++]=R,this.coords[this._pos++]=J,ve}finish(){let R=this._pos>>1;if(R!==this.numItems)throw new Error(`Added ${R} items when expected ${this.numItems}.`);return Ig(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(R,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],Nt=[];for(;At.length;){let ar=At.pop()||0,Mr=At.pop()||0,zr=At.pop()||0;if(Mr-zr<=ct){for(let ja=zr;ja<=Mr;ja++){let Ka=Ge[2*ja],Wi=Ge[2*ja+1];Ka>=R&&Ka<=ve&&Wi>=J&&Wi<=Ee&&Nt.push(Be[ja])}continue}let Wr=zr+Mr>>1,ia=Ge[2*Wr],fa=Ge[2*Wr+1];ia>=R&&ia<=ve&&fa>=J&&fa<=Ee&&Nt.push(Be[Wr]),(ar===0?R<=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(Mr),At.push(1-ar))}return Nt}within(R,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=[],Nt=ve*ve;for(;ct.length;){let ar=ct.pop()||0,Mr=ct.pop()||0,zr=ct.pop()||0;if(Mr-zr<=Ge){for(let ja=zr;ja<=Mr;ja++)ob(Be[2*ja],Be[2*ja+1],R,J)<=Nt&&At.push(Ee[ja]);continue}let Wr=zr+Mr>>1,ia=Be[2*Wr],fa=Be[2*Wr+1];ob(ia,fa,R,J)<=Nt&&At.push(Ee[Wr]),(ar===0?R-ve<=ia:J-ve<=fa)&&(ct.push(zr),ct.push(Wr-1),ct.push(1-ar)),(ar===0?R+ve>=ia:J+ve>=fa)&&(ct.push(Wr+1),ct.push(Mr),ct.push(1-ar))}return At}}function Ig(H,R,J,ve,Ee,Be){if(Ee-ve<=J)return;let Ge=ve+Ee>>1;nb(H,R,Ge,ve,Ee,Be),Ig(H,R,J,ve,Ge-1,1-Be),Ig(H,R,J,Ge+1,Ee,1-Be)}function nb(H,R,J,ve,Ee,Be){for(;Ee>ve;){if(Ee-ve>600){let Nt=Ee-ve+1,ar=J-ve+1,Mr=Math.log(Nt),zr=.5*Math.exp(2*Mr/3),Wr=.5*Math.sqrt(Mr*zr*(Nt-zr)/Nt)*(ar-Nt/2<0?-1:1);nb(H,R,J,Math.max(ve,Math.floor(J-ar*zr/Nt+Wr)),Math.min(Ee,Math.floor(J+(Nt-ar)*zr/Nt+Wr)),Be)}let Ge=R[2*J+Be],ct=ve,At=Ee;for(F0(H,R,ve,J),R[2*Ee+Be]>Ge&&F0(H,R,ve,Ee);ctGe;)At--}R[2*ve+Be]===Ge?F0(H,R,ve,At):(At++,F0(H,R,At,Ee)),At<=J&&(ve=At+1),J<=At&&(Ee=At-1)}}function F0(H,R,J,ve){Z1(H,J,ve),Z1(R,2*J,2*ve),Z1(R,2*J+1,2*ve+1)}function Z1(H,R,J){let ve=H[R];H[R]=H[J],H[J]=ve}function ob(H,R,J,ve){let Ee=H-J,Be=R-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(H){performance.mark(H)},frame(H){let R=H;O0!=null&&Hf.push(R-O0),O0=R},clearMetrics(){O0=null,Hf=[],performance.clearMeasures(K1),performance.clearMeasures(Dg);for(let H in e.bg)performance.clearMarks(e.bg[H])},getPerformanceMetrics(){performance.measure(K1,e.bg.create,e.bg.load),performance.measure(Dg,e.bg.create,e.bg.fullLoad);let H=performance.getEntriesByName(K1)[0].duration,R=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:H,fullLoadTime:R,fps:ve,percentDroppedFrames:Ee/(J+Ee)*100,totalFrames:J}}};e.$=class extends Tr{},e.A=Qa,e.B=Hi,e.C=function(H){if(z==null){let R=H.navigator?H.navigator.userAgent:null;z=!!H.safari||!(!R||!(/\b(iPad|iPhone|iPod)\b/.test(R)||R.match("Safari")&&!R.match("Chrome")))}return z},e.D=fo,e.E=ee,e.F=class{constructor(H,R){this.target=H,this.mapId=R,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=P(self)?H:window}registerMessageHandler(H,R){this.messageHandlers[H]=R}sendAsync(H,R){return new Promise((J,ve)=>{let Ee=Math.round(1e18*Math.random()).toString(36).substring(0,10);this.resolveRejects[Ee]={resolve:J,reject:ve},R&&R.signal.addEventListener("abort",()=>{delete this.resolveRejects[Ee];let ct={id:Ee,type:"",origin:location.origin,targetMapId:H.targetMapId,sourceMapId:this.mapId};this.target.postMessage(ct)},{once:!0});let Be=[],Ge=Object.assign(Object.assign({},H),{id:Ee,sourceMapId:this.mapId,origin:location.origin,data:eo(H.data,Be)});this.target.postMessage(Ge,{transfer:Be})})}receive(H){let R=H.data,J=R.id;if(!(R.origin!=="file://"&&location.origin!=="file://"&&R.origin!=="resource://android"&&location.origin!=="resource://android"&&R.origin!==location.origin||R.targetMapId&&this.mapId!==R.targetMapId)){if(R.type===""){delete this.tasks[J];let ve=this.abortControllers[J];return delete this.abortControllers[J],void(ve&&ve.abort())}if(P(self)||R.mustQueue)return this.tasks[J]=R,this.taskQueue.push(J),void this.invoker.trigger();this.processTask(J,R)}}process(){if(this.taskQueue.length===0)return;let H=this.taskQueue.shift(),R=this.tasks[H];delete this.tasks[H],this.taskQueue.length>0&&this.invoker.trigger(),R&&this.processTask(H,R)}processTask(H,R){return t(this,void 0,void 0,function*(){if(R.type===""){let Ee=this.resolveRejects[H];return delete this.resolveRejects[H],Ee?void(R.error?Ee.reject(co(R.error)):Ee.resolve(co(R.data))):void 0}if(!this.messageHandlers[R.type])return void this.completeTask(H,new Error(`Could not find a registered handler for ${R.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));let J=co(R.data),ve=new AbortController;this.abortControllers[H]=ve;try{let Ee=yield this.messageHandlers[R.type](R.sourceMapId,J,ve);this.completeTask(H,null,Ee)}catch(Ee){this.completeTask(H,Ee)}})}completeTask(H,R,J){let ve=[];delete this.abortControllers[H];let Ee={id:H,type:"",sourceMapId:this.mapId,origin:location.origin,error:R?eo(R):null,data:eo(J,ve)};this.target.postMessage(Ee,{transfer:ve})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},e.G=ce,e.H=function(){var H=new Qa(16);return Qa!=Float32Array&&(H[1]=0,H[2]=0,H[3]=0,H[4]=0,H[6]=0,H[7]=0,H[8]=0,H[9]=0,H[11]=0,H[12]=0,H[13]=0,H[14]=0),H[0]=1,H[5]=1,H[10]=1,H[15]=1,H},e.I=wg,e.J=function(H,R,J){var ve,Ee,Be,Ge,ct,At,Nt,ar,Mr,zr,Wr,ia,fa=J[0],ja=J[1],Ka=J[2];return R===H?(H[12]=R[0]*fa+R[4]*ja+R[8]*Ka+R[12],H[13]=R[1]*fa+R[5]*ja+R[9]*Ka+R[13],H[14]=R[2]*fa+R[6]*ja+R[10]*Ka+R[14],H[15]=R[3]*fa+R[7]*ja+R[11]*Ka+R[15]):(Ee=R[1],Be=R[2],Ge=R[3],ct=R[4],At=R[5],Nt=R[6],ar=R[7],Mr=R[8],zr=R[9],Wr=R[10],ia=R[11],H[0]=ve=R[0],H[1]=Ee,H[2]=Be,H[3]=Ge,H[4]=ct,H[5]=At,H[6]=Nt,H[7]=ar,H[8]=Mr,H[9]=zr,H[10]=Wr,H[11]=ia,H[12]=ve*fa+ct*ja+Mr*Ka+R[12],H[13]=Ee*fa+At*ja+zr*Ka+R[13],H[14]=Be*fa+Nt*ja+Wr*Ka+R[14],H[15]=Ge*fa+ar*ja+ia*Ka+R[15]),H},e.K=function(H,R,J){var ve=J[0],Ee=J[1],Be=J[2];return H[0]=R[0]*ve,H[1]=R[1]*ve,H[2]=R[2]*ve,H[3]=R[3]*ve,H[4]=R[4]*Ee,H[5]=R[5]*Ee,H[6]=R[6]*Ee,H[7]=R[7]*Ee,H[8]=R[8]*Be,H[9]=R[9]*Be,H[10]=R[10]*Be,H[11]=R[11]*Be,H[12]=R[12],H[13]=R[13],H[14]=R[14],H[15]=R[15],H},e.L=Va,e.M=function(H,R){let J={};for(let ve=0;ve{let R=window.document.createElement("video");return R.muted=!0,new Promise(J=>{R.onloadstart=()=>{J(R)};for(let ve of H){let Ee=window.document.createElement("source");Q(ve)||(R.crossOrigin="Anonymous"),Ee.src=ve,R.appendChild(Ee)}})},e.a4=function(){return p++},e.a5=on,e.a6=fm,e.a7=Ec,e.a8=Wl,e.a9=V1,e.aA=function(H){if(H.type==="custom")return new N1(H);switch(H.type){case"background":return new QT(H);case"circle":return new Ha(H);case"fill":return new Wt(H);case"fill-extrusion":return new kp(H);case"heatmap":return new Dn(H);case"hillshade":return new xl(H);case"line":return new Pv(H);case"raster":return new I0(H);case"symbol":return new zv(H)}},e.aB=u,e.aC=function(H,R){if(!H)return[{command:"setStyle",args:[R]}];let J=[];try{if(!Se(H.version,R.version))return[{command:"setStyle",args:[R]}];Se(H.center,R.center)||J.push({command:"setCenter",args:[R.center]}),Se(H.zoom,R.zoom)||J.push({command:"setZoom",args:[R.zoom]}),Se(H.bearing,R.bearing)||J.push({command:"setBearing",args:[R.bearing]}),Se(H.pitch,R.pitch)||J.push({command:"setPitch",args:[R.pitch]}),Se(H.sprite,R.sprite)||J.push({command:"setSprite",args:[R.sprite]}),Se(H.glyphs,R.glyphs)||J.push({command:"setGlyphs",args:[R.glyphs]}),Se(H.transition,R.transition)||J.push({command:"setTransition",args:[R.transition]}),Se(H.light,R.light)||J.push({command:"setLight",args:[R.light]}),Se(H.terrain,R.terrain)||J.push({command:"setTerrain",args:[R.terrain]}),Se(H.sky,R.sky)||J.push({command:"setSky",args:[R.sky]}),Se(H.projection,R.projection)||J.push({command:"setProjection",args:[R.projection]});let ve={},Ee=[];(function(Ge,ct,At,Nt){let ar;for(ar in ct=ct||{},Ge=Ge||{})Object.prototype.hasOwnProperty.call(Ge,ar)&&(Object.prototype.hasOwnProperty.call(ct,ar)||je(ar,At,Nt));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)?Re(At,{command:"setGeoJSONSourceData",args:[ar,ct[ar].data]}):at(ar,ct,At,Nt)):Pe(ar,ct,At))})(H.sources,R.sources,Ee,ve);let Be=[];H.layers&&H.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 Nt=(Ge=Ge||[]).map(Ve),ar=ct.map(Ve),Mr=Ge.reduce(he,{}),zr=ct.reduce(he,{}),Wr=Nt.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 R[ve]=!Ge||Ge.toLowerCase(),""}),R["max-age"]){let J=parseInt(R["max-age"],10);isNaN(J)?delete R["max-age"]:R["max-age"]=J}return R},e.ab=function(H,R){let J=[];for(let ve in H)ve in R||J.push(ve);return J},e.ac=w,e.ad=function(H,R,J){var ve=Math.sin(J),Ee=Math.cos(J),Be=R[0],Ge=R[1],ct=R[2],At=R[3],Nt=R[4],ar=R[5],Mr=R[6],zr=R[7];return R!==H&&(H[8]=R[8],H[9]=R[9],H[10]=R[10],H[11]=R[11],H[12]=R[12],H[13]=R[13],H[14]=R[14],H[15]=R[15]),H[0]=Be*Ee+Nt*ve,H[1]=Ge*Ee+ar*ve,H[2]=ct*Ee+Mr*ve,H[3]=At*Ee+zr*ve,H[4]=Nt*Ee-Be*ve,H[5]=ar*Ee-Ge*ve,H[6]=Mr*Ee-ct*ve,H[7]=zr*Ee-At*ve,H},e.ae=function(H){var R=new Qa(16);return R[0]=H[0],R[1]=H[1],R[2]=H[2],R[3]=H[3],R[4]=H[4],R[5]=H[5],R[6]=H[6],R[7]=H[7],R[8]=H[8],R[9]=H[9],R[10]=H[10],R[11]=H[11],R[12]=H[12],R[13]=H[13],R[14]=H[14],R[15]=H[15],R},e.af=hn,e.ag=function(H,R){let J=0,ve=0;if(H.kind==="constant")ve=H.layoutSize;else if(H.kind!=="source"){let{interpolationType:Ee,minZoom:Be,maxZoom:Ge}=H,ct=Ee?w(ao.interpolationFactor(Ee,R,Be,Ge),0,1):0;H.kind==="camera"?ve=kn.number(H.minSize,H.maxSize,ct):J=ct}return{uSizeT:J,uSize:ve}},e.ai=function(H,{uSize:R,uSizeT:J},{lowerSize:ve,upperSize:Ee}){return H.kind==="source"?ve/yd:H.kind==="composite"?kn.number(ve/yd,Ee/yd,J):R},e.aj=z1,e.ak=function(H,R,J,ve){let Ee=R.y-H.y,Be=R.x-H.x,Ge=ve.y-J.y,ct=ve.x-J.x,At=Ge*Be-ct*Ee;if(At===0)return null;let Nt=(ct*(H.y-J.y)-Ge*(H.x-J.x))/At;return new i(H.x+Nt*Be,H.y+Nt*Ee)},e.al=Zx,e.am=_c,e.an=di,e.ao=function(H){let R=1/0,J=1/0,ve=-1/0,Ee=-1/0;for(let Be of H)R=Math.min(R,Be.x),J=Math.min(J,Be.y),ve=Math.max(ve,Be.x),Ee=Math.max(Ee,Be.y);return[R,J,ve,Ee]},e.ap=hu,e.ar=D1,e.as=function(H,R){var J=R[0],ve=R[1],Ee=R[2],Be=R[3],Ge=R[4],ct=R[5],At=R[6],Nt=R[7],ar=R[8],Mr=R[9],zr=R[10],Wr=R[11],ia=R[12],fa=R[13],ja=R[14],Ka=R[15],Wi=J*ct-ve*Ge,gi=J*At-Ee*Ge,qi=J*Nt-Be*Ge,en=ve*At-Ee*ct,jn=ve*Nt-Be*ct,Lo=Ee*Nt-Be*At,xs=ar*fa-Mr*ia,vo=ar*ja-zr*ia,zn=ar*Ka-Wr*ia,is=Mr*ja-zr*fa,qo=Mr*Ka-Wr*fa,Bo=zr*Ka-Wr*ja,xn=Wi*Bo-gi*qo+qi*is+en*zn-jn*vo+Lo*xs;return xn?(H[0]=(ct*Bo-At*qo+Nt*is)*(xn=1/xn),H[1]=(Ee*qo-ve*Bo-Be*is)*xn,H[2]=(fa*Lo-ja*jn+Ka*en)*xn,H[3]=(zr*jn-Mr*Lo-Wr*en)*xn,H[4]=(At*zn-Ge*Bo-Nt*vo)*xn,H[5]=(J*Bo-Ee*zn+Be*vo)*xn,H[6]=(ja*qi-ia*Lo-Ka*gi)*xn,H[7]=(ar*Lo-zr*qi+Wr*gi)*xn,H[8]=(Ge*qo-ct*zn+Nt*xs)*xn,H[9]=(ve*zn-J*qo-Be*xs)*xn,H[10]=(ia*jn-fa*qi+Ka*Wi)*xn,H[11]=(Mr*qi-ar*jn-Wr*Wi)*xn,H[12]=(ct*vo-Ge*is-At*xs)*xn,H[13]=(J*is-ve*vo+Ee*xs)*xn,H[14]=(fa*gi-ia*en-ja*Wi)*xn,H[15]=(ar*en-Mr*gi+zr*Wi)*xn,H):null},e.at=W1,e.au=Mg,e.av=X1,e.aw=function(){let H={},R=te.$version;for(let J in te.$root){let ve=te.$root[J];if(ve.required){let Ee=null;Ee=J==="version"?R:ve.type==="array"?[]:{},Ee!=null&&(H[J]=Ee)}}return H},e.ax=An,e.ay=Y,e.az=function(H){H=H.slice();let R=Object.create(null);for(let J=0;J25||ve<0||ve>=1||J<0||J>=1)},e.bc=function(H,R){return H[0]=R[0],H[1]=0,H[2]=0,H[3]=0,H[4]=0,H[5]=R[1],H[6]=0,H[7]=0,H[8]=0,H[9]=0,H[10]=R[2],H[11]=0,H[12]=0,H[13]=0,H[14]=0,H[15]=1,H},e.bd=class extends $t{},e.be=j1,e.bf=sA,e.bh=de,e.bi=function(H,R){$.REGISTERED_PROTOCOLS[H]=R},e.bj=function(H){delete $.REGISTERED_PROTOCOLS[H]},e.bk=function(H,R){let J={};for(let Ee=0;EeBo*hu)}let vo=Ge?"center":J.get("text-justify").evaluate(Nt,{},H.canonical),zn=J.get("symbol-placement")==="point"?J.get("text-max-width").evaluate(Nt,{},H.canonical)*hu:1/0,is=()=>{H.bucket.allowVerticalPlacement&&yo(qi)&&(ia.vertical=M0(fa,H.glyphMap,H.glyphPositions,H.imagePositions,ar,zn,Be,Lo,"left",jn,Ka,e.ah.vertical,!0,zr,Mr))};if(!Ge&&xs){let qo=new Set;if(vo==="auto")for(let xn=0;xnt(void 0,void 0,void 0,function*(){if(H.byteLength===0)return createImageBitmap(new ImageData(1,1));let R=new Blob([new Uint8Array(H)],{type:"image/png"});try{return createImageBitmap(R)}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=E,e.f=H=>new Promise((R,J)=>{let ve=new Image;ve.onload=()=>{R(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(H)],{type:"image/png"});ve.src=H.byteLength?URL.createObjectURL(Ee):N}),e.g=ue,e.h=(H,R)=>X(E(H,{type:"json"}),R),e.i=P,e.j=j,e.k=ae,e.l=(H,R)=>X(E(H,{type:"arrayBuffer"}),R),e.m=X,e.n=function(H){return new P1(H).readFields(mk,[])},e.o=Rn,e.p=R1,e.q=Oe,e.r=Ci,e.s=Q,e.t=Pi,e.u=li,e.v=te,e.w=y,e.x=function([H,R,J]){return R+=90,R*=Math.PI/180,J*=Math.PI/180,{x:H*Math.cos(R)*Math.sin(J),y:H*Math.sin(R)*Math.sin(J),z:H*Math.cos(J)}},e.y=kn,e.z=Fs}),S("worker",["./shared"],function(e){"use strict";class t{constructor(Fe){this.keyCache={},Fe&&this.replace(Fe)}replace(Fe){this._layerConfigs={},this._layers={},this.update(Fe,[])}update(Fe,Ye){for(let Le of Fe){this._layerConfigs[Le.id]=Le;let We=this._layers[Le.id]=e.aA(Le);We._featureFilter=e.a7(We.filter),this.keyCache[Le.id]&&delete this.keyCache[Le.id]}for(let Le of Ye)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 We=Le.map(Pt=>this._layers[Pt.id]),Ke=We[0];if(Ke.visibility==="none")continue;let st=Ke.source||"",ot=this.familiesBySource[st];ot||(ot=this.familiesBySource[st]={});let Ut=Ke.sourceLayer||"_geojsonTileLayer",Ct=ot[Ut];Ct||(Ct=ot[Ut]=[]),Ct.push(We)}}}class r{constructor(Fe){let Ye={},Ae=[];for(let st in Fe){let ot=Fe[st],Ut=Ye[st]={};for(let Ct in ot){let Pt=ot[+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:We}=e.p(Ae),Ke=new e.o({width:Le||1,height:We||1});for(let st in Fe){let ot=Fe[st];for(let Ut in ot){let Ct=ot[+Ut];if(!Ct||Ct.bitmap.width===0||Ct.bitmap.height===0)continue;let Pt=Ye[st][Ut].rect;e.o.copy(Ct.bitmap,Ke,{x:0,y:0},{x:Pt.x+1,y:Pt.y+1},Ct.bitmap)}}this.image=Ke,this.positions=Ye}}e.bl("GlyphAtlas",r);class o{constructor(Fe){this.tileID=new e.S(Fe.tileID.overscaledZ,Fe.tileID.wrap,Fe.tileID.canonical.z,Fe.tileID.canonical.x,Fe.tileID.canonical.y),this.uid=Fe.uid,this.zoom=Fe.zoom,this.pixelRatio=Fe.pixelRatio,this.tileSize=Fe.tileSize,this.source=Fe.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=Fe.showCollisionBoxes,this.collectResourceTiming=!!Fe.collectResourceTiming,this.returnDependencies=!!Fe.returnDependencies,this.promoteId=Fe.promoteId,this.inFlightDependencies=[]}parse(Fe,Ye,Ae,Le){return e._(this,void 0,void 0,function*(){this.status="parsing",this.data=Fe,this.collisionBoxArray=new e.a5;let We=new e.bm(Object.keys(Fe.layers).sort()),Ke=new e.bn(this.tileID,this.promoteId);Ke.bucketLayerIDs=[];let st={},ot={featureIndex:Ke,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:Ae},Ut=Ye.familiesBySource[this.source];for(let Wa in Ut){let Ca=Fe.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=We.encode(Wa),wi=[];for(let Yt=0;Yt=Rt.maxzoom||Rt.visibility!=="none"&&(a(Yt,this.zoom,Ae),(st[Rt.id]=Rt.createBucket({index:Ke.bucketLayerIDs.length,layers:Yt,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:hi,sourceID:this.source})).populate(wi,ot,this.tileID.canonical),Ke.bucketLayerIDs.push(Yt.map(Zt=>Zt.id)))}}let Ct=e.aF(ot.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(ot.iconDependencies),cr=Promise.resolve({});if(jt.length){let Wa=new AbortController;this.inFlightDependencies.push(Wa),cr=Le.sendAsync({type:"GI",data:{icons:jt,source:this.source,tileID:this.tileID,type:"icons"}},Wa)}let or=Object.keys(ot.patternDependencies),nr=Promise.resolve({});if(or.length){let Wa=new AbortController;this.inFlightDependencies.push(Wa),nr=Le.sendAsync({type:"GI",data:{icons:or,source:this.source,tileID:this.tileID,type:"patterns"}},Wa)}let[Pr,_a,Fa]=yield Promise.all([Pt,cr,nr]),Ra=new r(Pr),qa=new e.bo(_a,Fa);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:Ra.positions,imageMap:_a,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(ot,this.tileID.canonical,qa.patternPositions))}return this.status="done",{buckets:Object.values(st).filter(Wa=>!Wa.isEmpty()),featureIndex:Ke,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:Ra.image,imageAtlas:qa,glyphMap:this.returnDependencies?Pr:null,iconMap:this.returnDependencies?_a:null,glyphPositions:this.returnDependencies?Ra.positions:null}})}}function a(_t,Fe,Ye){let Ae=new e.z(Fe);for(let Le of _t)Le.recalculate(Ae,Ye)}class i{constructor(Fe,Ye,Ae){this.actor=Fe,this.layerIndex=Ye,this.availableImages=Ae,this.fetching={},this.loading={},this.loaded={}}loadVectorTile(Fe,Ye){return e._(this,void 0,void 0,function*(){let Ae=yield e.l(Fe.request,Ye);try{return{vectorTile:new e.bt.VectorTile(new e.bu(Ae.data)),rawData:Ae.data,cacheControl:Ae.cacheControl,expires:Ae.expires}}catch(Le){let We=new Uint8Array(Ae.data),Ke=`Unable to parse the tile at ${Fe.request.url}, `;throw Ke+=We[0]===31&&We[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(Ke)}})}loadTile(Fe){return e._(this,void 0,void 0,function*(){let Ye=Fe.uid,Ae=!!(Fe&&Fe.request&&Fe.request.collectResourceTiming)&&new e.bv(Fe.request),Le=new o(Fe);this.loading[Ye]=Le;let We=new AbortController;Le.abort=We;try{let Ke=yield this.loadVectorTile(Fe,We);if(delete this.loading[Ye],!Ke)return null;let st=Ke.rawData,ot={};Ke.expires&&(ot.expires=Ke.expires),Ke.cacheControl&&(ot.cacheControl=Ke.cacheControl);let Ut={};if(Ae){let Pt=Ae.finish();Pt&&(Ut.resourceTiming=JSON.parse(JSON.stringify(Pt)))}Le.vectorTile=Ke.vectorTile;let Ct=Le.parse(Ke.vectorTile,this.layerIndex,this.availableImages,this.actor);this.loaded[Ye]=Le,this.fetching[Ye]={rawTileData:st,cacheControl:ot,resourceTiming:Ut};try{let Pt=yield Ct;return e.e({rawTileData:st.slice(0)},Pt,ot,Ut)}finally{delete this.fetching[Ye]}}catch(Ke){throw delete this.loading[Ye],Le.status="done",this.loaded[Ye]=Le,Ke}})}reloadTile(Fe){return e._(this,void 0,void 0,function*(){let Ye=Fe.uid;if(!this.loaded||!this.loaded[Ye])throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");let Ae=this.loaded[Ye];if(Ae.showCollisionBoxes=Fe.showCollisionBoxes,Ae.status==="parsing"){let Le=yield Ae.parse(Ae.vectorTile,this.layerIndex,this.availableImages,this.actor),We;if(this.fetching[Ye]){let{rawTileData:Ke,cacheControl:st,resourceTiming:ot}=this.fetching[Ye];delete this.fetching[Ye],We=e.e({rawTileData:Ke.slice(0)},Le,st,ot)}else We=Le;return We}if(Ae.status==="done"&&Ae.vectorTile)return Ae.parse(Ae.vectorTile,this.layerIndex,this.availableImages,this.actor)})}abortTile(Fe){return e._(this,void 0,void 0,function*(){let Ye=this.loading,Ae=Fe.uid;Ye&&Ye[Ae]&&Ye[Ae].abort&&(Ye[Ae].abort.abort(),delete Ye[Ae])})}removeTile(Fe){return e._(this,void 0,void 0,function*(){this.loaded&&this.loaded[Fe.uid]&&delete this.loaded[Fe.uid]})}}class n{constructor(){this.loaded={}}loadTile(Fe){return e._(this,void 0,void 0,function*(){let{uid:Ye,encoding:Ae,rawImageData:Le,redFactor:We,greenFactor:Ke,blueFactor:st,baseShift:ot}=Fe,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(Ye,Pt,Ae,We,Ke,st,ot);return this.loaded=this.loaded||{},this.loaded[Ye]=jt,jt})}removeTile(Fe){let Ye=this.loaded,Ae=Fe.uid;Ye&&Ye[Ae]&&delete Ye[Ae]}}function s(_t,Fe){if(_t.length!==0){h(_t[0],Fe);for(var Ye=1;Ye<_t.length;Ye++)h(_t[Ye],!Fe)}}function h(_t,Fe){for(var Ye=0,Ae=0,Le=0,We=_t.length,Ke=We-1;Le=Math.abs(st)?Ye-ot+st:st-ot+Ye,Ye=ot}Ye+Ae>=0!=!!Fe&&_t.reverse()}var f=e.by(function _t(Fe,Ye){var Ae,Le=Fe&&Fe.type;if(Le==="FeatureCollection")for(Ae=0;Ae>31}function P(_t,Fe){for(var Ye=_t.loadGeometry(),Ae=_t.type,Le=0,We=0,Ke=Ye.length,st=0;st_t},O=Math.fround||(L=new Float32Array(1),_t=>(L[0]=+_t,L[0]));var L;let U=3,B=5,W=6;class ${constructor(Fe){this.options=Object.assign(Object.create(N),Fe),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(Fe){let{log:Ye,minZoom:Ae,maxZoom:Le}=this.options;Ye&&console.time("total time");let We=`prepare ${Fe.length} points`;Ye&&console.time(We),this.points=Fe;let Ke=[];for(let ot=0;ot=Ae;ot--){let Ut=+Date.now();st=this.trees[ot]=this._createTree(this._cluster(st,ot)),Ye&&console.log("z%d: %d clusters in %dms",ot,st.numItems,+Date.now()-Ut)}return Ye&&console.timeEnd("total time"),this}getClusters(Fe,Ye){let Ae=((Fe[0]+180)%360+360)%360-180,Le=Math.max(-90,Math.min(90,Fe[1])),We=Fe[2]===180?180:((Fe[2]+180)%360+360)%360-180,Ke=Math.max(-90,Math.min(90,Fe[3]));if(Fe[2]-Fe[0]>=360)Ae=-180,We=180;else if(Ae>We){let Pt=this.getClusters([Ae,Le,180,Ke],Ye),jt=this.getClusters([-180,Le,We,Ke],Ye);return Pt.concat(jt)}let st=this.trees[this._limitZoom(Ye)],ot=st.range(de(Ae),Y(Ke),de(We),Y(Le)),Ut=st.data,Ct=[];for(let Pt of ot){let jt=this.stride*Pt;Ct.push(Ut[jt+B]>1?ue(Ut,jt,this.clusterProps):this.points[Ut[jt+U]])}return Ct}getChildren(Fe){let Ye=this._getOriginId(Fe),Ae=this._getOriginZoom(Fe),Le="No cluster with the specified id.",We=this.trees[Ae];if(!We)throw new Error(Le);let Ke=We.data;if(Ye*this.stride>=Ke.length)throw new Error(Le);let st=this.options.radius/(this.options.extent*Math.pow(2,Ae-1)),ot=We.within(Ke[Ye*this.stride],Ke[Ye*this.stride+1],st),Ut=[];for(let Ct of ot){let Pt=Ct*this.stride;Ke[Pt+4]===Fe&&Ut.push(Ke[Pt+B]>1?ue(Ke,Pt,this.clusterProps):this.points[Ke[Pt+U]])}if(Ut.length===0)throw new Error(Le);return Ut}getLeaves(Fe,Ye,Ae){let Le=[];return this._appendLeaves(Le,Fe,Ye=Ye||10,Ae=Ae||0,0),Le}getTile(Fe,Ye,Ae){let Le=this.trees[this._limitZoom(Fe)],We=Math.pow(2,Fe),{extent:Ke,radius:st}=this.options,ot=st/Ke,Ut=(Ae-ot)/We,Ct=(Ae+1+ot)/We,Pt={features:[]};return this._addTileFeatures(Le.range((Ye-ot)/We,Ut,(Ye+1+ot)/We,Ct),Le.data,Ye,Ae,We,Pt),Ye===0&&this._addTileFeatures(Le.range(1-ot/We,Ut,1,Ct),Le.data,We,Ae,We,Pt),Ye===We-1&&this._addTileFeatures(Le.range(0,Ut,ot/We,Ct),Le.data,-1,Ae,We,Pt),Pt.features.length?Pt:null}getClusterExpansionZoom(Fe){let Ye=this._getOriginZoom(Fe)-1;for(;Ye<=this.options.maxZoom;){let Ae=this.getChildren(Fe);if(Ye++,Ae.length!==1)break;Fe=Ae[0].properties.cluster_id}return Ye}_appendLeaves(Fe,Ye,Ae,Le,We){let Ke=this.getChildren(Ye);for(let st of Ke){let ot=st.properties;if(ot&&ot.cluster?We+ot.point_count<=Le?We+=ot.point_count:We=this._appendLeaves(Fe,ot.cluster_id,Ae,Le,We):We1,Ct,Pt,jt;if(Ut)Ct=ce(Ye,ot,this.clusterProps),Pt=Ye[ot],jt=Ye[ot+1];else{let nr=this.points[Ye[ot+U]];Ct=nr.properties;let[Pr,_a]=nr.geometry.coordinates;Pt=de(Pr),jt=Y(_a)}let cr={type:1,geometry:[[Math.round(this.options.extent*(Pt*We-Ae)),Math.round(this.options.extent*(jt*We-Le))]],tags:Ct},or;or=Ut||this.options.generateId?Ye[ot+U]:this.points[Ye[ot+U]].id,or!==void 0&&(cr.id=or),Ke.features.push(cr)}}_limitZoom(Fe){return Math.max(this.options.minZoom,Math.min(Math.floor(+Fe),this.options.maxZoom+1))}_cluster(Fe,Ye){let{radius:Ae,extent:Le,reduce:We,minPoints:Ke}=this.options,st=Ae/(Le*Math.pow(2,Ye)),ot=Fe.data,Ut=[],Ct=this.stride;for(let Pt=0;PtYe&&(Pr+=ot[Fa+B])}if(Pr>nr&&Pr>=Ke){let _a,Fa=jt*nr,Ra=cr*nr,qa=-1,Wa=((Pt/Ct|0)<<5)+(Ye+1)+this.points.length;for(let Ca of or){let hi=Ca*Ct;if(ot[hi+2]<=Ye)continue;ot[hi+2]=Ye;let wi=ot[hi+B];Fa+=ot[hi]*wi,Ra+=ot[hi+1]*wi,ot[hi+4]=Wa,We&&(_a||(_a=this._map(ot,Pt,!0),qa=this.clusterProps.length,this.clusterProps.push(_a)),We(_a,this._map(ot,hi)))}ot[Pt+4]=Wa,Ut.push(Fa/Pr,Ra/Pr,1/0,Wa,-1,Pr),We&&Ut.push(qa)}else{for(let _a=0;_a1)for(let _a of or){let Fa=_a*Ct;if(!(ot[Fa+2]<=Ye)){ot[Fa+2]=Ye;for(let Ra=0;Ra>5}_getOriginZoom(Fe){return(Fe-this.points.length)%32}_map(Fe,Ye,Ae){if(Fe[Ye+B]>1){let Ke=this.clusterProps[Fe[Ye+W]];return Ae?Object.assign({},Ke):Ke}let Le=this.points[Fe[Ye+U]].properties,We=this.options.map(Le);return Ae&&We===Le?Object.assign({},We):We}}function ue(_t,Fe,Ye){return{type:"Feature",id:_t[Fe+U],properties:ce(_t,Fe,Ye),geometry:{type:"Point",coordinates:[(Ae=_t[Fe],360*(Ae-.5)),X(_t[Fe+1])]}};var Ae}function ce(_t,Fe,Ye){let Ae=_t[Fe+B],Le=Ae>=1e4?`${Math.round(Ae/1e3)}k`:Ae>=1e3?Math.round(Ae/100)/10+"k":Ae,We=_t[Fe+W],Ke=We===-1?{}:Object.assign({},Ye[We]);return Object.assign(Ke,{cluster:!0,cluster_id:_t[Fe+U],point_count:Ae,point_count_abbreviated:Le})}function de(_t){return _t/360+.5}function Y(_t){let Fe=Math.sin(_t*Math.PI/180),Ye=.5-.25*Math.log((1+Fe)/(1-Fe))/Math.PI;return Ye<0?0:Ye>1?1:Ye}function X(_t){let Fe=(180-360*_t)*Math.PI/180;return 360*Math.atan(Math.exp(Fe))/Math.PI-90}function Q(_t,Fe,Ye,Ae){let Le=Ae,We=Fe+(Ye-Fe>>1),Ke,st=Ye-Fe,ot=_t[Fe],Ut=_t[Fe+1],Ct=_t[Ye],Pt=_t[Ye+1];for(let jt=Fe+3;jtLe)Ke=jt,Le=cr;else if(cr===Le){let or=Math.abs(jt-We);orAe&&(Ke-Fe>3&&Q(_t,Fe,Ke,Ae),_t[Ke+2]=Le,Ye-Ke>3&&Q(_t,Ke,Ye,Ae))}function V(_t,Fe,Ye,Ae,Le,We){let Ke=Le-Ye,st=We-Ae;if(Ke!==0||st!==0){let ot=((_t-Ye)*Ke+(Fe-Ae)*st)/(Ke*Ke+st*st);ot>1?(Ye=Le,Ae=We):ot>0&&(Ye+=Ke*ot,Ae+=st*ot)}return Ke=_t-Ye,st=Fe-Ae,Ke*Ke+st*st}function le(_t,Fe,Ye,Ae){let Le={id:_t??null,type:Fe,geometry:Ye,tags:Ae,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};if(Fe==="Point"||Fe==="MultiPoint"||Fe==="LineString")ae(Le,Ye);else if(Fe==="Polygon")ae(Le,Ye[0]);else if(Fe==="MultiLineString")for(let We of Ye)ae(Le,We);else if(Fe==="MultiPolygon")for(let We of Ye)ae(Le,We[0]);return Le}function ae(_t,Fe){for(let Ye=0;Ye0&&(Ke+=Ae?(Le*Ct-Ut*We)/2:Math.sqrt(Math.pow(Ut-Le,2)+Math.pow(Ct-We,2))),Le=Ut,We=Ct}let st=Fe.length-3;Fe[2]=1,Q(Fe,0,st,Ye),Fe[st+2]=1,Fe.size=Math.abs(Ke),Fe.start=0,Fe.end=Fe.size}function pe(_t,Fe,Ye,Ae){for(let Le=0;Le<_t.length;Le++){let We=[];te(_t[Le],We,Ye,Ae),Fe.push(We)}}function we(_t){return _t/360+.5}function Se(_t){let Fe=Math.sin(_t*Math.PI/180),Ye=.5-.25*Math.log((1+Fe)/(1-Fe))/Math.PI;return Ye<0?0:Ye>1?1:Ye}function Re(_t,Fe,Ye,Ae,Le,We,Ke,st){if(Ae/=Fe,We>=(Ye/=Fe)&&Ke=Ae)return null;let ot=[];for(let Ut of _t){let Ct=Ut.geometry,Pt=Ut.type,jt=Le===0?Ut.minX:Ut.minY,cr=Le===0?Ut.maxX:Ut.maxY;if(jt>=Ye&&cr=Ae)continue;let or=[];if(Pt==="Point"||Pt==="MultiPoint")Pe(Ct,or,Ye,Ae,Le);else if(Pt==="LineString")je(Ct,or,Ye,Ae,Le,!1,st.lineMetrics);else if(Pt==="MultiLineString")nt(Ct,or,Ye,Ae,Le,!1);else if(Pt==="Polygon")nt(Ct,or,Ye,Ae,Le,!0);else if(Pt==="MultiPolygon")for(let nr of Ct){let Pr=[];nt(nr,Pr,Ye,Ae,Le,!0),Pr.length&&or.push(Pr)}if(or.length){if(st.lineMetrics&&Pt==="LineString"){for(let nr of or)ot.push(le(Ut.id,Pt,nr,Ut.tags));continue}Pt!=="LineString"&&Pt!=="MultiLineString"||(or.length===1?(Pt="LineString",or=or[0]):Pt="MultiLineString"),Pt!=="Point"&&Pt!=="MultiPoint"||(Pt=or.length===3?"Point":"MultiPoint"),ot.push(le(Ut.id,Pt,or,Ut.tags))}}return ot.length?ot:null}function Pe(_t,Fe,Ye,Ae,Le){for(let We=0;We<_t.length;We+=3){let Ke=_t[We+Le];Ke>=Ye&&Ke<=Ae&&tt(Fe,_t[We],_t[We+1],_t[We+2])}}function je(_t,Fe,Ye,Ae,Le,We,Ke){let st=at(_t),ot=Le===0?Ve:he,Ut,Ct,Pt=_t.start;for(let Pr=0;Pr<_t.length-3;Pr+=3){let _a=_t[Pr],Fa=_t[Pr+1],Ra=_t[Pr+2],qa=_t[Pr+3],Wa=_t[Pr+4],Ca=Le===0?_a:Fa,hi=Le===0?qa:Wa,wi=!1;Ke&&(Ut=Math.sqrt(Math.pow(_a-qa,2)+Math.pow(Fa-Wa,2))),CaYe&&(Ct=ot(st,_a,Fa,qa,Wa,Ye),Ke&&(st.start=Pt+Ut*Ct)):Ca>Ae?hi=Ye&&(Ct=ot(st,_a,Fa,qa,Wa,Ye),wi=!0),hi>Ae&&Ca<=Ae&&(Ct=ot(st,_a,Fa,qa,Wa,Ae),wi=!0),!We&&wi&&(Ke&&(st.end=Pt+Ut*Ct),Fe.push(st),st=at(_t)),Ke&&(Pt+=Ut)}let jt=_t.length-3,cr=_t[jt],or=_t[jt+1],nr=Le===0?cr:or;nr>=Ye&&nr<=Ae&&tt(st,cr,or,_t[jt+2]),jt=st.length-3,We&&jt>=3&&(st[jt]!==st[0]||st[jt+1]!==st[1])&&tt(st,st[0],st[1],st[2]),st.length&&Fe.push(st)}function at(_t){let Fe=[];return Fe.size=_t.size,Fe.start=_t.start,Fe.end=_t.end,Fe}function nt(_t,Fe,Ye,Ae,Le,We){for(let Ke of _t)je(Ke,Fe,Ye,Ae,Le,We,!1)}function tt(_t,Fe,Ye,Ae){_t.push(Fe,Ye,Ae)}function Ve(_t,Fe,Ye,Ae,Le,We){let Ke=(We-Fe)/(Ae-Fe);return tt(_t,We,Ye+(Le-Ye)*Ke,1),Ke}function he(_t,Fe,Ye,Ae,Le,We){let Ke=(We-Ye)/(Le-Ye);return tt(_t,Fe+(Ae-Fe)*Ke,We,1),Ke}function se(_t,Fe){let Ye=[];for(let Ae=0;Ae<_t.length;Ae++){let Le=_t[Ae],We=Le.type,Ke;if(We==="Point"||We==="MultiPoint"||We==="LineString")Ke=ne(Le.geometry,Fe);else if(We==="MultiLineString"||We==="Polygon"){Ke=[];for(let st of Le.geometry)Ke.push(ne(st,Fe))}else if(We==="MultiPolygon"){Ke=[];for(let st of Le.geometry){let ot=[];for(let Ut of st)ot.push(ne(Ut,Fe));Ke.push(ot)}}Ye.push(le(Le.id,We,Ke,Le.tags))}return Ye}function ne(_t,Fe){let Ye=[];Ye.size=_t.size,_t.start!==void 0&&(Ye.start=_t.start,Ye.end=_t.end);for(let Ae=0;Ae<_t.length;Ae+=3)Ye.push(_t[Ae]+Fe,_t[Ae+1],_t[Ae+2]);return Ye}function Ce(_t,Fe){if(_t.transformed)return _t;let Ye=1<<_t.z,Ae=_t.x,Le=_t.y;for(let We of _t.features){let Ke=We.geometry,st=We.type;if(We.geometry=[],st===1)for(let ot=0;ot0&&Fe.size<(Le?Ke:Ae))return void(Ye.numPoints+=Fe.length/3);let st=[];for(let ot=0;otKe)&&(Ye.numSimplified++,st.push(Fe[ot],Fe[ot+1])),Ye.numPoints++;Le&&function(ot,Ut){let Ct=0;for(let Pt=0,jt=ot.length,cr=jt-2;Pt0===Ut)for(let Pt=0,jt=ot.length;Pt24)throw new Error("maxZoom should be in the 0-24 range");if(Ye.promoteId&&Ye.generateId)throw new Error("promoteId and generateId cannot be used together.");let Le=function(We,Ke){let st=[];if(We.type==="FeatureCollection")for(let ot=0;ot1&&console.time("creation"),cr=this.tiles[jt]=rt(Fe,Ye,Ae,Le,Ut),this.tileCoords.push({z:Ye,x:Ae,y:Le}),Ct)){Ct>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",Ye,Ae,Le,cr.numFeatures,cr.numPoints,cr.numSimplified),console.timeEnd("creation"));let wi=`z${Ye}`;this.stats[wi]=(this.stats[wi]||0)+1,this.total++}if(cr.source=Fe,We==null){if(Ye===Ut.indexMaxZoom||cr.numPoints<=Ut.indexMaxPoints)continue}else{if(Ye===Ut.maxZoom||Ye===We)continue;if(We!=null){let wi=We-Ye;if(Ae!==Ke>>wi||Le!==st>>wi)continue}}if(cr.source=null,Fe.length===0)continue;Ct>1&&console.time("clipping");let or=.5*Ut.buffer/Ut.extent,nr=.5-or,Pr=.5+or,_a=1+or,Fa=null,Ra=null,qa=null,Wa=null,Ca=Re(Fe,Pt,Ae-or,Ae+Pr,0,cr.minX,cr.maxX,Ut),hi=Re(Fe,Pt,Ae+nr,Ae+_a,0,cr.minX,cr.maxX,Ut);Fe=null,Ca&&(Fa=Re(Ca,Pt,Le-or,Le+Pr,1,cr.minY,cr.maxY,Ut),Ra=Re(Ca,Pt,Le+nr,Le+_a,1,cr.minY,cr.maxY,Ut),Ca=null),hi&&(qa=Re(hi,Pt,Le-or,Le+Pr,1,cr.minY,cr.maxY,Ut),Wa=Re(hi,Pt,Le+nr,Le+_a,1,cr.minY,cr.maxY,Ut),hi=null),Ct>1&&console.timeEnd("clipping"),ot.push(Fa||[],Ye+1,2*Ae,2*Le),ot.push(Ra||[],Ye+1,2*Ae,2*Le+1),ot.push(qa||[],Ye+1,2*Ae+1,2*Le),ot.push(Wa||[],Ye+1,2*Ae+1,2*Le+1)}}getTile(Fe,Ye,Ae){Fe=+Fe,Ye=+Ye,Ae=+Ae;let Le=this.options,{extent:We,debug:Ke}=Le;if(Fe<0||Fe>24)return null;let st=1<1&&console.log("drilling down to z%d-%d-%d",Fe,Ye,Ae);let Ut,Ct=Fe,Pt=Ye,jt=Ae;for(;!Ut&&Ct>0;)Ct--,Pt>>=1,jt>>=1,Ut=this.tiles[Vt(Ct,Pt,jt)];return Ut&&Ut.source?(Ke>1&&(console.log("found parent tile z%d-%d-%d",Ct,Pt,jt),console.time("drilling down")),this.splitTile(Ut.source,Ct,Pt,jt,Fe,Ye,Ae),Ke>1&&console.timeEnd("drilling down"),this.tiles[ot]?Ce(this.tiles[ot],We):null):null}}function Vt(_t,Fe,Ye){return 32*((1<<_t)*Ye+Fe)+_t}function Ar(_t,Fe){return Fe?_t.properties[Fe]:_t.id}function vr(_t,Fe){if(_t==null)return!0;if(_t.type==="Feature")return Ar(_t,Fe)!=null;if(_t.type==="FeatureCollection"){let Ye=new Set;for(let Ae of _t.features){let Le=Ar(Ae,Fe);if(Le==null||Ye.has(Le))return!1;Ye.add(Le)}return!0}return!1}function qr(_t,Fe){let Ye=new Map;if(_t!=null)if(_t.type==="Feature")Ye.set(Ar(_t,Fe),_t);else for(let Ae of _t.features)Ye.set(Ar(Ae,Fe),Ae);return Ye}class kr extends i{constructor(){super(...arguments),this._dataUpdateable=new Map}loadVectorTile(Fe,Ye){return e._(this,void 0,void 0,function*(){let Ae=Fe.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 We=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(ot){this._feature=ot,this.extent=e.X,this.type=ot.type,this.properties=ot.tags,"id"in ot&&!isNaN(ot.id)&&(this.id=parseInt(ot.id,10))}loadGeometry(){if(this._feature.type===1){let ot=[];for(let Ut of this._feature.geometry)ot.push([new e.P(Ut[0],Ut[1])]);return ot}{let ot=[];for(let Ut of this._feature.geometry){let Ct=[];for(let Pt of Ut)Ct.push(new e.P(Pt[0],Pt[1]));ot.push(Ct)}return ot}}toGeoJSON(ot,Ut,Ct){return m.call(this,ot,Ut,Ct)}}(this._features[st])}}(Le.features),Ke=F(We);return Ke.byteOffset===0&&Ke.byteLength===Ke.buffer.byteLength||(Ke=new Uint8Array(Ke)),{vectorTile:We,rawData:Ke.buffer}})}loadData(Fe){return e._(this,void 0,void 0,function*(){var Ye;(Ye=this._pendingRequest)===null||Ye===void 0||Ye.abort();let Ae=!!(Fe&&Fe.request&&Fe.request.collectResourceTiming)&&new e.bv(Fe.request);this._pendingRequest=new AbortController;try{this._pendingData=this.loadAndProcessGeoJSON(Fe,this._pendingRequest),this._geoJSONIndex=Fe.cluster?new $(function({superclusterOptions:Ke,clusterProperties:st}){if(!st||!Ke)return Ke;let ot={},Ut={},Ct={accumulated:null,zoom:0},Pt={properties:null},jt=Object.keys(st);for(let cr of jt){let[or,nr]=st[cr],Pr=e.bC(nr),_a=e.bC(typeof or=="string"?[or,["accumulated"],["get",cr]]:or);ot[cr]=Pr.value,Ut[cr]=_a.value}return Ke.map=cr=>{Pt.properties=cr;let or={};for(let nr of jt)or[nr]=ot[nr].evaluate(Ct,Pt);return or},Ke.reduce=(cr,or)=>{Pt.properties=or;for(let nr of jt)Ct.accumulated=cr[nr],cr[nr]=Ut[nr].evaluate(Ct,Pt)},Ke}(Fe)).load((yield this._pendingData).features):(Le=yield this._pendingData,new Bt(Le,Fe.geojsonVtOptions)),this.loaded={};let We={};if(Ae){let Ke=Ae.finish();Ke&&(We.resourceTiming={},We.resourceTiming[Fe.source]=JSON.parse(JSON.stringify(Ke)))}return We}catch(We){if(delete this._pendingRequest,e.bB(We))return{abandoned:!0};throw We}var Le})}getData(){return e._(this,void 0,void 0,function*(){return this._pendingData})}reloadTile(Fe){let Ye=this.loaded;return Ye&&Ye[Fe.uid]?super.reloadTile(Fe):this.loadTile(Fe)}loadAndProcessGeoJSON(Fe,Ye){return e._(this,void 0,void 0,function*(){let Ae=yield this.loadGeoJSON(Fe,Ye);if(delete this._pendingRequest,typeof Ae!="object")throw new Error(`Input data given to '${Fe.source}' is not a valid GeoJSON object.`);if(f(Ae,!0),Fe.filter){let Le=e.bC(Fe.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(Le.result==="error")throw new Error(Le.value.map(Ke=>`${Ke.key}: ${Ke.message}`).join(", "));Ae={type:"FeatureCollection",features:Ae.features.filter(Ke=>Le.value.evaluate({zoom:0},Ke))}}return Ae})}loadGeoJSON(Fe,Ye){return e._(this,void 0,void 0,function*(){let{promoteId:Ae}=Fe;if(Fe.request){let Le=yield e.h(Fe.request,Ye);return this._dataUpdateable=vr(Le.data,Ae)?qr(Le.data,Ae):void 0,Le.data}if(typeof Fe.data=="string")try{let Le=JSON.parse(Fe.data);return this._dataUpdateable=vr(Le,Ae)?qr(Le,Ae):void 0,Le}catch{throw new Error(`Input data given to '${Fe.source}' is not a valid GeoJSON object.`)}if(!Fe.dataDiff)throw new Error(`Input data given to '${Fe.source}' is not a valid GeoJSON object.`);if(!this._dataUpdateable)throw new Error(`Cannot update existing geojson data in ${Fe.source}`);return function(Le,We,Ke){var st,ot,Ut,Ct;if(We.removeAll&&Le.clear(),We.remove)for(let Pt of We.remove)Le.delete(Pt);if(We.add)for(let Pt of We.add){let jt=Ar(Pt,Ke);jt!=null&&Le.set(jt,Pt)}if(We.update)for(let Pt of We.update){let jt=Le.get(Pt.id);if(jt==null)continue;let cr=!Pt.removeAllProperties&&(((st=Pt.removeProperties)===null||st===void 0?void 0:st.length)>0||((ot=Pt.addOrUpdateProperties)===null||ot===void 0?void 0:ot.length)>0);if((Pt.newGeometry||Pt.removeAllProperties||cr)&&(jt=Object.assign({},jt),Le.set(Pt.id,jt),cr&&(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 or of Pt.removeProperties)Object.prototype.hasOwnProperty.call(jt.properties,or)&&delete jt.properties[or];if(((Ct=Pt.addOrUpdateProperties)===null||Ct===void 0?void 0:Ct.length)>0)for(let{key:or,value:nr}of Pt.addOrUpdateProperties)jt.properties[or]=nr}}(this._dataUpdateable,Fe.dataDiff,Ae),{type:"FeatureCollection",features:Array.from(this._dataUpdateable.values())}})}removeSource(Fe){return e._(this,void 0,void 0,function*(){this._pendingRequest&&this._pendingRequest.abort()})}getClusterExpansionZoom(Fe){return this._geoJSONIndex.getClusterExpansionZoom(Fe.clusterId)}getClusterChildren(Fe){return this._geoJSONIndex.getChildren(Fe.clusterId)}getClusterLeaves(Fe){return this._geoJSONIndex.getLeaves(Fe.clusterId,Fe.limit,Fe.offset)}}class Ur{constructor(Fe){this.self=Fe,this.actor=new e.F(Fe),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.self.registerWorkerSource=(Ye,Ae)=>{if(this.externalWorkerSourceTypes[Ye])throw new Error(`Worker source with name "${Ye}" already registered.`);this.externalWorkerSourceTypes[Ye]=Ae},this.self.addProtocol=e.bi,this.self.removeProtocol=e.bj,this.self.registerRTLTextPlugin=Ye=>{if(e.bD.isParsed())throw new Error("RTL text plugin already registered.");e.bD.setMethods(Ye)},this.actor.registerMessageHandler("LDT",(Ye,Ae)=>this._getDEMWorkerSource(Ye,Ae.source).loadTile(Ae)),this.actor.registerMessageHandler("RDT",(Ye,Ae)=>e._(this,void 0,void 0,function*(){this._getDEMWorkerSource(Ye,Ae.source).removeTile(Ae)})),this.actor.registerMessageHandler("GCEZ",(Ye,Ae)=>e._(this,void 0,void 0,function*(){return this._getWorkerSource(Ye,Ae.type,Ae.source).getClusterExpansionZoom(Ae)})),this.actor.registerMessageHandler("GCC",(Ye,Ae)=>e._(this,void 0,void 0,function*(){return this._getWorkerSource(Ye,Ae.type,Ae.source).getClusterChildren(Ae)})),this.actor.registerMessageHandler("GCL",(Ye,Ae)=>e._(this,void 0,void 0,function*(){return this._getWorkerSource(Ye,Ae.type,Ae.source).getClusterLeaves(Ae)})),this.actor.registerMessageHandler("LD",(Ye,Ae)=>this._getWorkerSource(Ye,Ae.type,Ae.source).loadData(Ae)),this.actor.registerMessageHandler("GD",(Ye,Ae)=>this._getWorkerSource(Ye,Ae.type,Ae.source).getData()),this.actor.registerMessageHandler("LT",(Ye,Ae)=>this._getWorkerSource(Ye,Ae.type,Ae.source).loadTile(Ae)),this.actor.registerMessageHandler("RT",(Ye,Ae)=>this._getWorkerSource(Ye,Ae.type,Ae.source).reloadTile(Ae)),this.actor.registerMessageHandler("AT",(Ye,Ae)=>this._getWorkerSource(Ye,Ae.type,Ae.source).abortTile(Ae)),this.actor.registerMessageHandler("RMT",(Ye,Ae)=>this._getWorkerSource(Ye,Ae.type,Ae.source).removeTile(Ae)),this.actor.registerMessageHandler("RS",(Ye,Ae)=>e._(this,void 0,void 0,function*(){if(!this.workerSources[Ye]||!this.workerSources[Ye][Ae.type]||!this.workerSources[Ye][Ae.type][Ae.source])return;let Le=this.workerSources[Ye][Ae.type][Ae.source];delete this.workerSources[Ye][Ae.type][Ae.source],Le.removeSource!==void 0&&Le.removeSource(Ae)})),this.actor.registerMessageHandler("RM",Ye=>e._(this,void 0,void 0,function*(){delete this.layerIndexes[Ye],delete this.availableImages[Ye],delete this.workerSources[Ye],delete this.demWorkerSources[Ye]})),this.actor.registerMessageHandler("SR",(Ye,Ae)=>e._(this,void 0,void 0,function*(){this.referrer=Ae})),this.actor.registerMessageHandler("SRPS",(Ye,Ae)=>this._syncRTLPluginState(Ye,Ae)),this.actor.registerMessageHandler("IS",(Ye,Ae)=>e._(this,void 0,void 0,function*(){this.self.importScripts(Ae)})),this.actor.registerMessageHandler("SI",(Ye,Ae)=>this._setImages(Ye,Ae)),this.actor.registerMessageHandler("UL",(Ye,Ae)=>e._(this,void 0,void 0,function*(){this._getLayerIndex(Ye).update(Ae.layers,Ae.removedIds)})),this.actor.registerMessageHandler("SL",(Ye,Ae)=>e._(this,void 0,void 0,function*(){this._getLayerIndex(Ye).replace(Ae)}))}_setImages(Fe,Ye){return e._(this,void 0,void 0,function*(){this.availableImages[Fe]=Ye;for(let Ae in this.workerSources[Fe]){let Le=this.workerSources[Fe][Ae];for(let We in Le)Le[We].availableImages=Ye}})}_syncRTLPluginState(Fe,Ye){return e._(this,void 0,void 0,function*(){if(e.bD.isParsed())return e.bD.getState();if(Ye.pluginStatus!=="loading")return e.bD.setState(Ye),Ye;let Ae=Ye.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(Fe){let Ye=this.availableImages[Fe];return Ye||(Ye=[]),Ye}_getLayerIndex(Fe){let Ye=this.layerIndexes[Fe];return Ye||(Ye=this.layerIndexes[Fe]=new t),Ye}_getWorkerSource(Fe,Ye,Ae){if(this.workerSources[Fe]||(this.workerSources[Fe]={}),this.workerSources[Fe][Ye]||(this.workerSources[Fe][Ye]={}),!this.workerSources[Fe][Ye][Ae]){let Le={sendAsync:(We,Ke)=>(We.targetMapId=Fe,this.actor.sendAsync(We,Ke))};switch(Ye){case"vector":this.workerSources[Fe][Ye][Ae]=new i(Le,this._getLayerIndex(Fe),this._getAvailableImages(Fe));break;case"geojson":this.workerSources[Fe][Ye][Ae]=new kr(Le,this._getLayerIndex(Fe),this._getAvailableImages(Fe));break;default:this.workerSources[Fe][Ye][Ae]=new this.externalWorkerSourceTypes[Ye](Le,this._getLayerIndex(Fe),this._getAvailableImages(Fe))}}return this.workerSources[Fe][Ye][Ae]}_getDEMWorkerSource(Fe,Ye){return this.demWorkerSources[Fe]||(this.demWorkerSources[Fe]={}),this.demWorkerSources[Fe][Ye]||(this.demWorkerSources[Fe][Ye]=new n),this.demWorkerSources[Fe][Ye]}}return e.i(self)&&(self.worker=new Ur(self)),Ur}),S("index",["exports","./shared"],function(e,t){"use strict";var r="4.7.1";let o,a,i={now:typeof performance<"u"&&performance&&performance.now?performance.now.bind(performance):Date.now.bind(Date),frameAsync:Oe=>new Promise((I,ie)=>{let Te=requestAnimationFrame(I);Oe.signal.addEventListener("abort",()=>{cancelAnimationFrame(Te),ie(t.c())})}),getImageData(Oe,I=0){return this.getImageCanvasContext(Oe).getImageData(-I,-I,Oe.width+2*I,Oe.height+2*I)},getImageCanvasContext(Oe){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=Oe.width,I.height=Oe.height,ie.drawImage(Oe,0,0,Oe.width,Oe.height),ie},resolveURL:Oe=>(o||(o=document.createElement("a")),o.href=Oe,o.href),hardwareConcurrency:typeof navigator<"u"&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return!!matchMedia&&(a==null&&(a=matchMedia("(prefers-reduced-motion: reduce)")),a.matches)}};class n{static testProp(I){if(!n.docStyle)return I[0];for(let ie=0;ie{window.removeEventListener("click",n.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=n.getScale(I);return n.getPoint(I,Te,ie)}static touchPos(I,ie){let Te=[],Me=n.getScale(I);for(let ze=0;ze{h&&T(h),h=null,c=!0},f.onerror=()=>{m=!0,h=null},f.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA="),function(Oe){let I,ie,Te,Me;Oe.resetRequestQueue=()=>{I=[],ie=0,Te=0,Me={}},Oe.addThrottleControl=Ot=>{let $t=Te++;return Me[$t]=Ot,$t},Oe.removeThrottleControl=Ot=>{delete Me[Ot],ht()},Oe.getImage=(Ot,$t,Tr=!0)=>new Promise((Sr,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=>{Sr(na)}}),ht()});let ze=Ot=>t._(this,void 0,void 0,function*(){Ot.state="running";let{requestParameters:$t,supportImageRefresh:Tr,onError:Sr,onSuccess:Kr,abortController:na}=Ot,qe=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=qe?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(lt=pt.data,typeof createImageBitmap=="function"?t.d(lt):t.f(lt)),cacheControl:pt.cacheControl,expires:pt.expires})}catch(pt){delete Ot.abortController,Sr(pt)}finally{ie--,ht()}var lt}),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,Sr)=>{let Kr=new Image,na=Ot.url,qe=Ot.credentials;qe&&qe==="include"?Kr.crossOrigin="use-credentials":(qe&&qe==="same-origin"||!t.s(na))&&(Kr.crossOrigin="anonymous"),$t.signal.addEventListener("abort",()=>{Kr.src="",Sr(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||Sr(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 x{constructor(I){this._transformRequestFn=I}transformRequest(I,ie){return this._transformRequestFn&&this._transformRequestFn(I,ie)||{url:I}}setTransformRequest(I){this._transformRequestFn=I}}function w(Oe){var I=new t.A(3);return I[0]=Oe[0],I[1]=Oe[1],I[2]=Oe[2],I}var A,E=function(Oe,I,ie){return Oe[0]=I[0]-ie[0],Oe[1]=I[1]-ie[1],Oe[2]=I[2]-ie[2],Oe};A=new t.A(3),t.A!=Float32Array&&(A[0]=0,A[1]=0,A[2]=0);var p=function(Oe){var I=Oe[0],ie=Oe[1];return I*I+ie*ie};function b(Oe){let I=[];if(typeof Oe=="string")I.push({id:"default",url:Oe});else if(Oe&&Oe.length>0){let ie=[];for(let{id:Te,url:Me}of Oe){let ze=`${Te}${Me}`;ie.indexOf(ze)===-1&&(ie.push(ze),I.push({id:Te,url:Me}))}}return I}function d(Oe,I,ie){let Te=Oe.split("?");return Te[0]+=`${I}${ie}`,Te.join("?")}(function(){var Oe=new t.A(2);t.A!=Float32Array&&(Oe[0]=0,Oe[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 g(Oe){let{userImage:I}=Oe;return!!(I&&I.render&&I.render())&&(Oe.data.replace(new Uint8Array(I.data.buffer)),!0)}class y 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,Sr=$t.height;t.R.copy($t,Me,{x:0,y:0},{x:wt,y:Ot},{width:Tr,height:Sr}),t.R.copy($t,Me,{x:0,y:Sr-1},{x:wt,y:Ot-1},{width:Tr,height:1}),t.R.copy($t,Me,{x:0,y:0},{x:wt,y:Ot+Sr},{width:Tr,height:1}),t.R.copy($t,Me,{x:Tr-1,y:0},{x:wt-1,y:Ot},{width:1,height:Sr}),t.R.copy($t,Me,{x:0,y:0},{x:wt+Tr,y:Ot},{width:1,height:Sr})}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`),g(Te)&&this.updateImage(ie,Te)}}}let D=1e20;function P(Oe,I,ie,Te,Me,ze,ht,wt,Ot){for(let $t=I;$t-1);Ot++,ze[Ot]=wt,ht[Ot]=$t,ht[Ot+1]=D}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(Oe,I,ie,Te){return t._(this,void 0,void 0,function*(){let Me=256*I,ze=Me+255,ht=Te.transformRequest(ie.replace("{fontstack}",Oe).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:Oe=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=Oe+4*I,Ot=this._createCanvas(wt),$t=this.ctx=Ot.getContext("2d",{willReadFrequently:!0});$t.font=`${ht} ${ze} ${Oe}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(Oe){let I=document.createElement("canvas");return I.width=I.height=Oe,I}draw(Oe){let{width:I,actualBoundingBoxAscent:ie,actualBoundingBoxDescent:Te,actualBoundingBoxLeft:Me,actualBoundingBoxRight:ze}=this.ctx.measureText(Oe),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,Sr=Math.max($t*Tr,0),Kr=new Uint8ClampedArray(Sr),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:qe,buffer:$e,gridInner:lt,gridOuter:pt}=this;qe.clearRect($e,$e,wt,Ot),qe.fillText(Oe,$e,$e+ht);let Et=qe.getImageData($e,$e,wt,Ot);pt.fill(D,0,Sr),lt.fill(0,0,Sr);for(let bt=0;bt0?Er*Er:0,lt[yr]=Er<0?Er*Er:0}}P(pt,0,0,$t,Tr,$t,this.f,this.v,this.z),P(lt,$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),Sr=Math.abs($t-Ot.right),Kr=Math.min(Tr,Sr),na,qe=ze/Te*(Me+1);if(Ot.isDash){let $e=Me-Math.abs(qe);na=Math.sqrt(Kr*Kr+$e*$e)}else na=Me-Math.sqrt(Kr*Kr+qe*qe);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(i.hardwareConcurrency/2),de,Y;function X(){return de||(de=new ue),de}ue.workerCount=t.C(globalThis)?Math.max(Math.min(ce,3),1):1;class Q{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 V(){return Y||(Y=new Q(X(),t.G),Y.registerMessageHandler("GR",(Oe,I,ie)=>t.m(I,ie))),Y}function le(Oe,I){let ie=t.H();return t.J(ie,ie,[1,1,0]),t.K(ie,ie,[.5*Oe.width,.5*Oe.height,1]),t.L(ie,ie,Oe.calculatePosMatrix(I.toUnwrapped()))}function ae(Oe,I,ie,Te,Me,ze){let ht=function(Sr,Kr,na){if(Sr)for(let qe of Sr){let $e=Kr[qe];if($e&&$e.source===na&&$e.type==="fill-extrusion")return!0}else for(let qe in Kr){let $e=Kr[qe];if($e.source===na&&$e.type==="fill-extrusion")return!0}return!1}(Me&&Me.layers,I,Oe.id),wt=ze.maxPitchScaleFactor(),Ot=Oe.tilesIn(Te,wt,ht);Ot.sort(j);let $t=[];for(let Sr of Ot)$t.push({wrappedTileID:Sr.tileID.wrapped().key,queryResults:Sr.tile.queryRenderedFeatures(I,ie,Oe._state,Sr.queryGeometry,Sr.cameraQueryGeometry,Sr.scale,Me,ze,wt,le(Oe.transform,Sr.tileID))});let Tr=function(Sr){let Kr={},na={};for(let qe of Sr){let $e=qe.queryResults,lt=qe.wrappedTileID,pt=na[lt]=na[lt]||{};for(let Et in $e){let bt=$e[Et],Dt=pt[Et]=pt[Et]||{},ur=Kr[Et]=Kr[Et]||[];for(let yr of bt)Dt[yr.featureIndex]||(Dt[yr.featureIndex]=!0,ur.push(yr))}}return Kr}($t);for(let Sr in Tr)Tr[Sr].forEach(Kr=>{let na=Kr.feature,qe=Oe.getFeatureState(na.layer["source-layer"],na.id);na.source=na.layer.source,na.layer["source-layer"]&&(na.sourceLayer=na.layer["source-layer"]),na.state=qe});return Tr}function j(Oe,I){let ie=Oe.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 ee(Oe,I,ie){return t._(this,void 0,void 0,function*(){let Te=Oe;if(Oe.url?Te=(yield t.h(I.transformRequest(Oe.url,"Source"),ie)).data:yield i.frameAsync(ie),!Te)return null;let Me=t.M(t.e(Te,Oe),["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 te{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 te))return Array.isArray(I)?I.length===4||I.every(Array.isArray)?this.extend(te.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 te?I:I&&new te(I)}static fromLngLat(I,ie=0){let Te=360*ie/40075017,Me=Te/Math.cos(Math.PI/180*I.lat);return new te(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 te(I,I.lng>ie.lng?new t.N(ie.lng+360,ie.lat):ie)}}class pe{constructor(I,ie,Te){this.bounds=te.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 ee(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 Re 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 i.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 je=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)),Sr=Math.pow(2,Tr);return new t.a1(Tr,Math.floor((ze+wt)/2*Sr),Math.floor((ht+Ot)/2*Sr))}(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,je.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,je.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,je.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 Ve={},he=Oe=>{switch(Oe){case"geojson":return Pe;case"image":return at;case"raster":return Se;case"raster-dem":return Re;case"vector":return we;case"video":return nt;case"canvas":return tt}return Ve[Oe]},se="RTLPluginLoaded";class ne extends t.E{constructor(){super(...arguments),this.status="unavailable",this.url=null,this.dispatcher=V()}_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=i.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(se))})}lazyLoad(){this.status==="unavailable"?this.status="requested":this.status==="deferred"&&this._requestImport()}}let Ce=null;function Ze(){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,Ze().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,Sr={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 St{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 Je(0,Me=>this._unloadTile(Me)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new St,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(Bt).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(Bt).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=i.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=i.now();for(let Sr of $t){let Kr=I[Sr],na=this._tiles[Sr];if(!na||na.fadeEndTime!==0&&na.fadeEndTime<=Tr)continue;let qe=this.findLoadedParent(Kr,ie),$e=this.findLoadedSibling(Kr),lt=qe||$e||null;lt&&(this._addTile(lt.tileID),wt[lt.tileID.key]=lt.tileID),Ot[Sr]=Kr}this._retainLoadedChildren(Ot,Me,Te,I);for(let Sr in wt)I[Sr]||(this._coveredTiles[Sr]=!0,I[Sr]=wt[Sr]);if(ht){let Sr={},Kr={};for(let na of ze)this._tiles[na.key].hasData()?Sr[na.key]=na:Kr[na.key]=na;for(let na in Kr){let qe=Kr[na].children(this._source.maxzoom);this._tiles[qe[0].key]&&this._tiles[qe[1].key]&&this._tiles[qe[2].key]&&this._tiles[qe[3].key]&&(Sr[qe[0].key]=I[qe[0].key]=qe[0],Sr[qe[1].key]=I[qe[1].key]=qe[1],Sr[qe[2].key]=I[qe[2].key]=qe[2],Sr[qe[3].key]=I[qe[3].key]=qe[3],delete Kr[na])}for(let na in Kr){let qe=Kr[na],$e=this.findLoadedParent(qe,this._source.minzoom),lt=this.findLoadedSibling(qe),pt=$e||lt||null;if(pt){Sr[pt.tileID.key]=I[pt.tileID.key]=pt.tileID;for(let Et in Sr)Sr[Et].isChildOf(pt.tileID)&&delete Sr[Et]}}for(let na in this._tiles)Sr[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 Sr of Te)if(Sr.canonical.z>this._source.minzoom){let Kr=Sr.scaledTo(Sr.canonical.z-1);Tr[Kr.key]=Kr;let na=Sr.scaledTo(Math.max(this._source.minzoom,Math.min(Sr.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);Vt(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 Sr=this._tiles[Tr];Sr.hasSymbolBuckets&&!Sr.holdingForFade()?Sr.setHoldDuration(this.map._fadeDuration):Sr.hasSymbolBuckets&&!Sr.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 Sr=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&&Sr&&(Tr=this._addTile(na)),Tr){let qe=Tr.hasData();if((qe||!(!((Te=this.map)===null||Te===void 0)&&Te.cancelPendingTileRequestsWhileZooming)||Sr)&&(Me[na.key]=na),Sr=Tr.wasRequested(),qe)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(qe=>ze.pointCoordinate(qe,this.terrain)),Ot=ht.map(qe=>ze.pointCoordinate(qe,this.terrain)),$t=this.getIds(),Tr=1/0,Sr=1/0,Kr=-1/0,na=-1/0;for(let qe of Ot)Tr=Math.min(Tr,qe.x),Sr=Math.min(Sr,qe.y),Kr=Math.max(Kr,qe.x),na=Math.max(na,qe.y);for(let qe=0;qe<$t.length;qe++){let $e=this._tiles[$t[qe]];if($e.holdingForFade())continue;let lt=$e.tileID,pt=Math.pow(2,ze.zoom-$e.tileID.overscaledZ),Et=ie*$e.queryPadding*t.X/$e.tileSize/pt,bt=[lt.getTilePoint(new t.Z(Tr,Sr)),lt.getTilePoint(new t.Z(Kr,na))];if(bt[0].x-Et=0&&bt[1].y+Et>=0){let Dt=wt.map(yr=>lt.getTilePoint(yr)),ur=Ot.map(yr=>lt.getTilePoint(yr));Me.push({tile:$e,tileID:lt,queryGeometry:Dt,cameraQueryGeometry:ur,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(Vt(this._source.type)){let I=i.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 Bt(Oe,I){let ie=Math.abs(2*Oe.wrap)-+(Oe.wrap<0),Te=Math.abs(2*I.wrap)-+(I.wrap<0);return Oe.overscaledZ-I.overscaledZ||Te-ie||I.canonical.y-Oe.canonical.y||I.canonical.x-Oe.canonical.x}function Vt(Oe){return Oe==="raster"||Oe==="image"||Oe==="video"}kt.maxOverzooming=10,kt.maxUnderzooming=3;class Ar{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 vr(Oe,I){let ie=!0;return Oe==="always"||Oe!=="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:Sr}=wt,Kr=this.boxCells[ze];if(Kr!==null){let qe=this.bboxes;for(let $e of Kr)if(!$t.box[$e]){$t.box[$e]=!0;let lt=4*$e,pt=this.boxKeys[$e];if(I<=qe[lt+2]&&ie<=qe[lt+3]&&Te>=qe[lt+0]&&Me>=qe[lt+1]&&(!Ot||Ot(pt))&&(!Tr||!vr(Sr,pt.overlapMode))&&(ht.push({key:pt,x1:qe[lt],y1:qe[lt+1],x2:qe[lt+2],y2:qe[lt+3]}),Tr))return!0}}let na=this.circleCells[ze];if(na!==null){let qe=this.circles;for(let $e of na)if(!$t.circle[$e]){$t.circle[$e]=!0;let lt=3*$e,pt=this.circleKeys[$e];if(this._circleAndRectCollide(qe[lt],qe[lt+1],qe[lt+2],I,ie,Te,Me)&&(!Ot||Ot(pt))&&(!Tr||!vr(Sr,pt.overlapMode))){let Et=qe[lt],bt=qe[lt+1],Dt=qe[lt+2];if(ht.push({key:pt,x1:Et-Dt,y1:bt-Dt,x2:Et+Dt,y2:bt+Dt}),Tr)return!0}}}return!1}_queryCellCircle(I,ie,Te,Me,ze,ht,wt,Ot){let{circle:$t,seenUids:Tr,overlapMode:Sr}=wt,Kr=this.boxCells[ze];if(Kr!==null){let qe=this.bboxes;for(let $e of Kr)if(!Tr.box[$e]){Tr.box[$e]=!0;let lt=4*$e,pt=this.boxKeys[$e];if(this._circleAndRectCollide($t.x,$t.y,$t.radius,qe[lt+0],qe[lt+1],qe[lt+2],qe[lt+3])&&(!Ot||Ot(pt))&&!vr(Sr,pt.overlapMode))return ht.push(!0),!0}}let na=this.circleCells[ze];if(na!==null){let qe=this.circles;for(let $e of na)if(!Tr.circle[$e]){Tr.circle[$e]=!0;let lt=3*$e,pt=this.circleKeys[$e];if(this._circlesCollide(qe[lt],qe[lt+1],qe[lt+2],$t.x,$t.y,$t.radius)&&(!Ot||Ot(pt))&&!vr(Sr,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),Sr=this._convertToXCellCoord(Te),Kr=this._convertToYCellCoord(Me);for(let na=$t;na<=Sr;na++)for(let qe=Tr;qe<=Kr;qe++)if(ze.call(this,I,ie,Te,Me,this.xCellCount*qe+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,Sr=Math.abs(ie-(ze+Tr));if(Sr>Tr+Te)return!1;if($t<=Ot||Sr<=Tr)return!0;let Kr=$t-Ot,na=Sr-Tr;return Kr*Kr+na*na<=Te*Te}}function kr(Oe,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,Oe),ze}function Ur(Oe,I,ie,Te,Me){if(I){let ze=t.ae(Oe);return t.K(ze,ze,[Me,Me,1]),ie||t.ad(ze,ze,-Te.angle),ze}return Te.glCoordMatrix}function _t(Oe,I,ie,Te){let Me;Te?(Me=[Oe,I,Te(Oe,I),1],t.af(Me,Me,ie)):(Me=[Oe,I,0,1],nr(Me,Me,ie));let ze=Me[3];return{point:new t.P(Me[0]/ze,Me[1]/ze),signedDistanceFromCamera:ze,isOccluded:!1}}function Fe(Oe,I){return .5+Oe/I*.5}function Ye(Oe,I){return Oe.x>=-I[0]&&Oe.x<=I[0]&&Oe.y>=-I[1]&&Oe.y<=I[1]}function Ae(Oe,I,ie,Te,Me,ze,ht,wt,Ot,$t,Tr,Sr,Kr,na,qe){let $e=Te?Oe.textSizeData:Oe.iconSizeData,lt=t.ag($e,ie.transform.zoom),pt=[256/ie.width*2+1,256/ie.height*2+1],Et=Te?Oe.text.dynamicLayoutVertexArray:Oe.icon.dynamicLayoutVertexArray;Et.clear();let bt=Oe.lineVertexArray,Dt=Te?Oe.text.placedSymbolArray:Oe.icon.placedSymbolArray,ur=ie.transform.width/ie.transform.height,yr=!1;for(let Er=0;ErMath.abs(ie.x-I.x)*Te?{useVertical:!0}:(Oe===t.ah.vertical?I.yie.x)?{needsFlipping:!0}:null}function Ke(Oe,I,ie,Te,Me,ze,ht,wt,Ot,$t,Tr){let Sr=ie/24,Kr=I.lineOffsetX*Sr,na=I.lineOffsetY*Sr,qe;if(I.numGlyphs>1){let $e=I.glyphStartIndex+I.numGlyphs,lt=I.lineStartIndex,pt=I.lineStartIndex+I.lineLength,Et=Le(Sr,wt,Kr,na,Te,I,Tr,Oe);if(!Et)return{notEnoughRoom:!0};let bt=_t(Et.first.point.x,Et.first.point.y,ht,Oe.getElevation).point,Dt=_t(Et.last.point.x,Et.last.point.y,ht,Oe.getElevation).point;if(Me&&!Te){let ur=We(I.writingMode,bt,Dt,$t);if(ur)return ur}qe=[Et.first];for(let ur=I.glyphStartIndex+1;ur<$e-1;ur++)qe.push(jt(Sr*wt.getoffsetX(ur),Kr,na,Te,I.segment,lt,pt,Oe,Tr));qe.push(Et.last)}else{if(Me&&!Te){let lt=_t(Oe.tileAnchorPoint.x,Oe.tileAnchorPoint.y,ze,Oe.getElevation).point,pt=I.lineStartIndex+I.segment+1,Et=new t.P(Oe.lineVertexArray.getx(pt),Oe.lineVertexArray.gety(pt)),bt=_t(Et.x,Et.y,ze,Oe.getElevation),Dt=bt.signedDistanceFromCamera>0?bt.point:function(yr,Er,jr,Qr,ha,Aa){return st(yr,Er,jr,1,ha,Aa)}(Oe.tileAnchorPoint,Et,lt,0,ze,Oe),ur=We(I.writingMode,lt,Dt,$t);if(ur)return ur}let $e=jt(Sr*wt.getoffsetX(I.glyphStartIndex),Kr,na,Te,I.segment,I.lineStartIndex,I.lineStartIndex+I.lineLength,Oe,Tr);if(!$e||Oe.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};qe=[$e]}for(let $e of qe)t.aj(Ot,$e.point,$e.angle);return{}}function st(Oe,I,ie,Te,Me,ze){let ht=Oe.add(Oe.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 ot(Oe,I,ie){let Te=I.projectionCache;if(Te.projections[Oe])return Te.projections[Oe];let Me=new t.P(I.lineVertexArray.getx(Oe),I.lineVertexArray.gety(Oe)),ze=Ut(Me.x,Me.y,I);if(ze.signedDistanceFromCamera>0)return Te.projections[Oe]=ze.point,Te.anyProjectionOccluded=Te.anyProjectionOccluded||ze.isOccluded,ze.point;let ht=Oe-ie.direction;return function(wt,Ot,$t,Tr,Sr){return st(wt,Ot,$t,Tr,void 0,Sr)}(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(Oe,I,ie){let Te=Oe+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(Oe,I,ie){return Oe._unit()._perp()._mult(I*ie)}function Pt(Oe,I,ie,Te,Me,ze,ht,wt,Ot){if(wt.projectionCache.offsets[Oe])return wt.projectionCache.offsets[Oe];let $t=ie.add(I);if(Oe+Ot.direction=Me)return wt.projectionCache.offsets[Oe]=$t,$t;let Tr=ot(Oe+Ot.direction,wt,Ot),Sr=Ct(Tr.sub(ie),ht,Ot.direction),Kr=ie.add(Sr),na=Tr.add(Sr);return wt.projectionCache.offsets[Oe]=t.ak(ze,$t,Kr,na)||$t,wt.projectionCache.offsets[Oe]}function jt(Oe,I,ie,Te,Me,ze,ht,wt,Ot){let $t=Te?Oe-I:Oe+I,Tr=$t>0?1:-1,Sr=0;Te&&(Tr*=-1,Sr=Math.PI),Tr<0&&(Sr+=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 qe,$e,lt=Kr,pt=Kr,Et=0,bt=0,Dt=Math.abs($t),ur=[],yr;for(;Et+bt<=Dt;){if(na+=Tr,na=ht)return null;Et+=bt,pt=lt,$e=qe;let Qr={absOffsetX:Dt,direction:Tr,distanceFromAnchor:Et,previousVertex:pt};if(lt=ot(na,wt,Qr),ie===0)ur.push(pt),yr=lt.sub(pt);else{let ha,Aa=lt.sub(pt);ha=Aa.mag()===0?Ct(ot(na+Tr,wt,Qr).sub(lt),ie,Tr):Ct(Aa,ie,Tr),$e||($e=pt.add(ha)),qe=Pt(na,ha,lt,ze,ht,$e,ie,wt,Qr),ur.push($e),yr=qe.sub($e)}bt=yr.mag()}let Er=yr._mult((Dt-Et)/bt)._add($e||pt),jr=Sr+Math.atan2(lt.y-pt.y,lt.x-pt.x);return ur.push(Er),{point:Er,angle:Ot?jr:0,path:ur}}let cr=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function or(Oe,I){for(let ie=0;ie=1;Bn--)on.push(Vi.path[Bn]);for(let Bn=1;BnAo.signedDistanceFromCamera<=0)?[]:Bn.map(Ao=>Ao.point)}let Kn=[];if(on.length>0){let Bn=on[0].clone(),Ao=on[0].clone();for(let ls=1;ls=Aa.x&&Ao.x<=Da.x&&Bn.y>=Aa.y&&Ao.y<=Da.y?[on]:Ao.xDa.x||Ao.yDa.y?[]:t.al([on],Aa.x,Aa.y,Da.x,Da.y)}for(let Bn of Kn){ci.reset(Bn,.25*ha);let Ao=0;Ao=ci.length<=.5*ha?1:Math.ceil(ci.paddedLength/Sn)+1;for(let ls=0;ls_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 Sr=new t.P(Tr.x+Pr,Tr.y+Pr);Te=Math.min(Te,Sr.x),Me=Math.min(Me,Sr.y),ze=Math.max(ze,Sr.x),ht=Math.max(ht,Sr.y),ie.push(Sr)}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 Sr=Tr.key;if(Ot[Sr.bucketInstanceId]===void 0&&(Ot[Sr.bucketInstanceId]={}),Ot[Sr.bucketInstanceId][Sr.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[Sr.bucketInstanceId][Sr.featureIndex]=!0,$t[Sr.bucketInstanceId]===void 0&&($t[Sr.bucketInstanceId]=[]),$t[Sr.bucketInstanceId].push(Sr.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),Er=Qr.map(ha=>ha.point)}else jr=!0;return{box:t.ao(Er),allPointsOccluded:!jr}}}function Fa(Oe,I,ie){return I*(t.X/(Oe.tileSize*Math.pow(2,ie-Oe.tileID.overscaledZ)))}class Ra{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 Ra(I?I.text:null,ie,Te,ze),this.icon=new Ra(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 Yt(Oe,I,ie,Te,Me){let{horizontalAlign:ze,verticalAlign:ht}=t.au(Oe);return new t.P(-(ze-.5)*I+Te[0]*Me,-(ht-.5)*ie+Te[1]*Me)}class Rt{constructor(I,ie,Te,Me,ze,ht){this.transform=I.clone(),this.terrain=Te,this.collisionIndex=new _a(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),Sr=Te.tileSize/t.X,Kr=Te.tileID.toUnwrapped(),na=this.transform.calculatePosMatrix(Kr),qe=Ot.get("text-pitch-alignment")==="map",$e=Ot.get("text-rotation-alignment")==="map",lt=Fa(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=kr(na,qe,$e,this.transform,lt),Dt=null;if(qe){let yr=Ur(na,qe,$e,this.transform,lt);Dt=t.L([],this.transform.labelPlaneMatrix,yr)}this.retainedQueryData[ze.bucketInstanceId]=new hi(ze.bucketInstanceId,ht,ze.sourceLayerIndex,ze.index,Te.tileID);let ur={bucket:ze,layout:Ot,translationText:pt,translationIcon:Et,posMatrix:na,unwrappedTileID:Kr,textLabelPlaneMatrix:bt,labelToScreenMatrix:Dt,scale:Tr,textPixelRatio:Sr,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:Er,symbolInstanceStart:jr,symbolInstanceEnd:Qr}=yr;I.push({sortKey:Er,symbolInstanceStart:jr,symbolInstanceEnd:Qr,parameters:ur})}else I.push({symbolInstanceStart:0,symbolInstanceEnd:ze.symbolInstances.length,parameters:ur})}attemptAnchorPlacement(I,ie,Te,Me,ze,ht,wt,Ot,$t,Tr,Sr,Kr,na,qe,$e,lt,pt,Et,bt){let Dt=t.aq[I.textAnchor],ur=[I.textOffset0,I.textOffset1],yr=Yt(Dt,Te,Me,ur,ze),Er=this.collisionIndex.placeCollisionBox(ie,Kr,Ot,$t,Tr,wt,ht,lt,Sr.predicate,bt,yr);if((!Et||this.collisionIndex.placeCollisionBox(Et,Kr,Ot,$t,Tr,wt,ht,pt,Sr.predicate,bt,yr).placeable)&&Er.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:ur,width:Te,height:Me,anchor:Dt,textBoxScale:ze,prevAnchor:jr},this.markUsedJustification(qe,Dt,na,$e),qe.allowVerticalPlacement&&(this.markUsedOrientation(qe,$e,na),this.placedOrientations[na.crossTileID]=$e),{shift:yr,placedGlyphBoxes:Er}}}placeLayerBucketPart(I,ie,Te){let{bucket:Me,layout:ze,translationText:ht,translationIcon:wt,posMatrix:Ot,unwrappedTileID:$t,textLabelPlaneMatrix:Tr,labelToScreenMatrix:Sr,textPixelRatio:Kr,holdingForFade:na,collisionBoxArray:qe,partiallyEvaluatedTextSize:$e,collisionGroup:lt}=I.parameters,pt=ze.get("text-optional"),Et=ze.get("icon-optional"),bt=t.ar(ze,"text-overlap","text-allow-overlap"),Dt=bt==="always",ur=t.ar(ze,"icon-overlap","icon-allow-overlap"),yr=ur==="always",Er=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=Dt&&(yr||!Me.hasIconData()||Et),Da=yr&&(Dt||!Me.hasTextData()||pt);!Me.collisionArrays&&qe&&Me.deserializeCollisionBoxes(qe);let ci=this._getTerrainElevationFunc(this.retainedQueryData[Me.bucketInstanceId].tileID),Vi=(ji,on,Sn)=>{var Kn,Bn;if(ie[ji.crossTileID])return;if(na)return void(this.placements[ji.crossTileID]=new Wa(!1,!1,!1));let Ao=!1,ls=!1,Mo=!0,Yo=null,ds={box:null,placeable:!1,offscreen:null},ul={box:null,placeable:!1,offscreen:null},tl=null,es=null,ts=null,Il=0,tu=0,Ru=0;on.textFeatureIndex?Il=on.textFeatureIndex:ji.useRuntimeCollisionCircles&&(Il=ji.featureIndex),on.verticalTextFeatureIndex&&(tu=on.verticalTextFeatureIndex);let vu=on.textBox;if(vu){let Gl=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},Hl=(et,dt)=>{if(Me.allowVerticalPlacement&&ji.numVerticalGlyphVertices>0&&on.verticalTextBox){for(let yt of Me.writingModes)if(yt===t.ah.vertical?(ds=dt(),ul=ds):ds=et(),ds&&ds.placeable)break}else ds=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,Er,ht,lt.predicate,ci);return Tt&&Tt.placeable&&(this.markUsedOrientation(Me,yt,ji),this.placedOrientations[ji.crossTileID]=yt),Tt};Hl(()=>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}}),Gl(ds&&ds.placeable)}else{let et=t.aq[(Bn=(Kn=this.prevPlacement)===null||Kn===void 0?void 0:Kn.variableOffsets[ji.crossTileID])===null||Bn===void 0?void 0:Bn.anchor],dt=(Tt,tr,zt)=>{let _r=Tt.x2-Tt.x1,Gr=Tt.y2-Tt.y1,Xr=ji.textBoxScale,wa=Qr&&ur==="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&&(!ds||!ds.placeable)&&ji.numVerticalGlyphVertices>0&&Tt?dt(Tt,on.verticalIconBox,t.ah.vertical):{box:null,occluded:!0,offscreen:null}}),ds&&(Ao=ds.placeable,Mo=ds.offscreen);let yt=Gl(ds&&ds.placeable);if(!Ao&&this.prevPlacement){let Tt=this.prevPlacement.variableOffsets[ji.crossTileID];Tt&&(this.variableOffsets[ji.crossTileID]=Tt,this.markUsedJustification(Me,Tt.anchor,ji,yt))}}}if(tl=ds,Ao=tl&&tl.placeable,Mo=tl&&tl.offscreen,ji.useRuntimeCollisionCircles){let Gl=Me.text.placedSymbolArray.get(ji.centerJustifiedTextSymbolIndex),Hl=t.ai(Me.textSizeData,$e,Gl),me=ze.get("text-padding");es=this.collisionIndex.placeCollisionCircles(bt,Gl,Me.lineVertexArray,Me.glyphOffsetArray,Hl,Ot,$t,Tr,Sr,Te,jr,lt.predicate,ji.collisionCircleDiameter,me,ht,ci),es.circles.length&&es.collisionDetected&&!Te&&t.w("Collisions detected, but collision boxes are not shown"),Ao=Dt||es.circles.length>0&&!es.collisionDetected,Mo=Mo&&es.offscreen}if(on.iconFeatureIndex&&(Ru=on.iconFeatureIndex),on.iconBox){let Gl=Hl=>this.collisionIndex.placeCollisionBox(Hl,ur,Kr,Ot,$t,jr,Er,wt,lt.predicate,ci,Qr&&Yo?Yo:void 0);ul&&ul.placeable&&on.verticalIconBox?(ts=Gl(on.verticalIconBox),ls=ts.placeable):(ts=Gl(on.iconBox),ls=ts.placeable),Mo=Mo&&ts.offscreen}let wl=pt||ji.numHorizontalGlyphVertices===0&&ji.numVerticalGlyphVertices===0,fu=Et||ji.numIconVertices===0;wl||fu?fu?wl||(ls=ls&&Ao):Ao=ls&&Ao:ls=Ao=ls&&Ao;let uc=ls&&ts.placeable;if(Ao&&tl.placeable&&this.collisionIndex.insertCollisionBox(tl.box,bt,ze.get("text-ignore-placement"),Me.bucketInstanceId,ul&&ul.placeable&&tu?tu:Il,lt.ID),uc&&this.collisionIndex.insertCollisionBox(ts.box,ur,ze.get("icon-ignore-placement"),Me.bucketInstanceId,Ru,lt.ID),es&&Ao&&this.collisionIndex.insertCollisionCircles(es.circles,bt,ze.get("text-ignore-placement"),Me.bucketInstanceId,Il,lt.ID),Te&&this.storeCollisionData(Me.bucketInstanceId,Sn,on,tl,ts,es),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(Ao||Aa,ls||Da,Mo||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 Sn=ji[on];Vi(Me.symbolInstances.get(Sn),Me.collisionArrays[Sn],Sn)}}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"),Sr=ht.get("text-rotation-alignment")==="map",Kr=ht.get("text-pitch-alignment")==="map",na=ht.get("icon-text-fit")!=="none",qe=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 Dt=0;Dt0,jr=this.placedOrientations[Et.crossTileID],Qr=jr===t.ah.vertical,ha=jr===t.ah.horizontal||jr===t.ah.horizontalOnly;if(bt>0||Dt>0){let Da=Za(yr.text);$e(I.text,bt,Qr?ri:Da),$e(I.text,Dt,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(Er){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=lt&<.has(pt)?lt.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[ur];ji?(ci=Yt(ji.anchor,ji.width,ji.height,ji.textOffset,ji.textBoxScale),Sr&&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),Zt(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),Zt(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 Zt(Oe,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;Oe.emplaceBack(I?1:0,ie?1:0,Me||0,ze||0,ht,wt),Oe.emplaceBack(I?1:0,ie?1:0,Me||0,ze||0,Ot,wt),Oe.emplaceBack(I?1:0,ie?1:0,Me||0,ze||0,Ot,$t),Oe.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(Oe){if(Oe.opacity===0&&!Oe.placed)return 0;if(Oe.opacity===1&&Oe.placed)return 4294967295;let I=Oe.placed?1:0,ie=Math.floor(127*Oe.opacity);return ie*Jt+I*Fr+ie*ta+I*ra+ie*ca+I*Ba+ie*$a+I}let ri=0;function pi(){return{isOccluded:(Oe,I,ie)=>!1,getPitchedTextCorrection:(Oe,I,ie)=>1,get useSpecialProjectionForSymbols(){return!1},projectTileCoordinates(Oe,I,ie,Te){throw new Error("Not implemented.")},translatePosition:(Oe,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),Sr=Math.cos($t);ht=[ht[0]*Sr-ht[1]*Tr,ht[0]*Tr+ht[1]*Sr]}return[Ot?ht[0]:Fa(ze,ht[0],Me.zoom),Ot?ht[1]:Fa(ze,ht[1],Me.zoom)]}(Oe,I,ie,Te),getCircleRadiusCorrection:Oe=>1}}class Ia{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&&i.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 Ia(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 cn{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,Sr=Me*t.X*tn;return{x:Math.floor((ht*t.X+I.anchorX)*$t-Te*t.X*tn),y:Math.floor(Tr-Sr)}}findMatches(I,ie,Te){let Me=this.tileID.canonical.zI)}}class xt{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class ut{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=(Oe,I)=>t.t(Oe,I&&I.filter(ie=>ie.identifier!=="source.canvas")),wr=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 Q(X(),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 y,this.imageManager.setEventedParent(this),this.glyphManager=new F(I._requestManager,ie.localIdeographFontFamily),this.lineAtlas=new W(256,512),this.crossTileSymbolIndex=new Or,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()),Ze().on(se,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,i.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(wr,{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 L(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":"",Sr={},Kr={};for(let{id:na,url:qe}of $t){let $e=ht.transformRequest(d(qe,Tr,".json"),"SpriteJSON");Sr[na]=t.h($e,Ot);let lt=ht.transformRequest(d(qe,Tr,".png"),"SpriteImage");Kr[na]=l.getImage(lt,Ot)}return yield Promise.all([...Object.values(Sr),...Object.values(Kr)]),function(na,qe){return t._(this,void 0,void 0,function*(){let $e={};for(let lt in na){$e[lt]={};let pt=i.getImageCanvasContext((yield qe[lt]).data),Et=(yield na[lt]).data;for(let bt in Et){let{width:Dt,height:ur,x:yr,y:Er,sdf:jr,pixelRatio:Qr,stretchX:ha,stretchY:Aa,content:Da,textFitWidth:ci,textFitHeight:Vi}=Et[bt];$e[lt][bt]={data:null,pixelRatio:Qr,sdf:jr,stretchX:ha,stretchY:Aa,content:Da,textFitWidth:ci,textFitHeight:Vi,spriteData:{width:Dt,height:ur,x:yr,y:Er,context:pt}}}}return $e})}(Sr,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(Er.featureIndex)-Qr}return Er.featureIndex-yr.featureIndex});for(let yr of ur)Dt.push(yr)}}for(let pt in qe)qe[pt].forEach(Et=>{let bt=Et.feature,Dt=$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=Dt});return qe}(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,qe)=>qe.tileID.overscaledZ-na.tileID.overscaledZ||(na.tileID.isLessThan(qe.tileID)?-1:1))}let Sr=this.crossTileSymbolIndex.addLayer(Tr,Ot[Tr.source],I.center.lng);ht=ht||Sr}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((ze=ze||this._layerOrderChanged||Te===0)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(i.now(),I.zoom))&&(this.pauseablePlacement=new rn(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(i.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(i.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 Nr=t.Y([{name:"a_pos",type:"Int16",components:2}]);let Hr={prelude:gt(`#ifdef GL_ES precision mediump float; #else #if !defined(lowp) @@ -3786,26 +3786,26 @@ uniform ${Tr} ${Sr} u_${Kr}; #endif `}),staticAttributes:Te,staticUniforms:ht}}class Kt{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 Sr=0;!Tr&&Sr({u_matrix:Oe,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 Ir(Oe){let I=[];for(let ie=0;ie({u_depth:new t.aH(yr,Er.u_depth),u_terrain:new t.aH(yr,Er.u_terrain),u_terrain_dim:new t.aI(yr,Er.u_terrain_dim),u_terrain_matrix:new t.aJ(yr,Er.u_terrain_matrix),u_terrain_unpack:new t.aK(yr,Er.u_terrain_unpack),u_terrain_exaggeration:new t.aI(yr,Er.u_terrain_exaggeration)}))(I,ur),this.binderUniforms=Te?Te.getUniforms(I,ur):[]}draw(I,ie,Te,Me,ze,ht,wt,Ot,$t,Tr,Sr,Kr,na,qe,$e,lt,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 ur in this.terrainUniforms)this.terrainUniforms[ur].set(Ot[ur])}for(let ur in this.fixedUniforms)this.fixedUniforms[ur].set(wt[ur]);$e&&$e.setUniforms(I,this.binderUniforms,na,{zoom:qe});let Dt=0;switch(ie){case bt.LINES:Dt=2;break;case bt.TRIANGLES:Dt=3;break;case bt.LINE_STRIP:Dt=1}for(let ur of Kr.get()){let yr=ur.vaos||(ur.vaos={});(yr[$t]||(yr[$t]=new Kt)).bind(I,this,Tr,$e?$e.getPaintVertexBuffers():[],Sr,ur.vertexOffset,lt,pt,Et),bt.drawElements(ie,ur.primitiveLength*Dt,bt.UNSIGNED_SHORT,ur.primitiveOffset*Dt*2)}}}function Pa(Oe,I,ie){let Te=1/Fa(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,Oe.fromScale,Oe.toScale],u_fade:Oe.t,u_pixel_coord_upper:[ht>>16,wt>>16],u_pixel_coord_lower:[65535&ht,65535&wt]}}let ga=(Oe,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 Sr=Math.sin(Tr),Kr=Math.cos(Tr);$t[0]=Kr,$t[1]=Sr,$t[2]=0,$t[3]=-Sr,$t[4]=Kr,$t[5]=0,$t[6]=0,$t[7]=0,$t[8]=1}(wt,-I.transform.angle),function($t,Tr,Sr){var Kr=Tr[0],na=Tr[1],qe=Tr[2];$t[0]=Kr*Sr[0]+na*Sr[3]+qe*Sr[6],$t[1]=Kr*Sr[1]+na*Sr[4]+qe*Sr[7],$t[2]=Kr*Sr[2]+na*Sr[5]+qe*Sr[8]}(ht,ht,wt);let Ot=Me.properties.get("color");return{u_matrix:Oe,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=(Oe,I,ie,Te,Me,ze,ht)=>t.e(ga(Oe,I,ie,Te),Pa(ze,I,ht),{u_height_factor:-Math.pow(2,Me.overscaledZ)/ht.tileSize/8}),ba=Oe=>({u_matrix:Oe}),Ai=(Oe,I,ie,Te)=>t.e(ba(Oe),Pa(ie,I,Te)),ki=(Oe,I)=>({u_matrix:Oe,u_world:I}),Ki=(Oe,I,ie,Te,Me)=>t.e(Ai(Oe,I,ie,Te),{u_world:Me}),Mn=(Oe,I,ie,Te)=>{let Me=Oe.transform,ze,ht;if(Te.paint.get("circle-pitch-alignment")==="map"){let wt=Fa(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:Oe.translatePosMatrix(I.posMatrix,ie,Te.paint.get("circle-translate"),Te.paint.get("circle-translate-anchor")),u_pitch_with_map:+ze,u_device_pixel_ratio:Oe.pixelRatio,u_extrude_scale:ht}},wn=(Oe,I,ie)=>({u_matrix:Oe,u_inv_matrix:I,u_camera_to_center_distance:ie.cameraToCenterDistance,u_viewport_size:[ie.width,ie.height]}),On=(Oe,I,ie=1)=>({u_matrix:Oe,u_color:I,u_overlay:0,u_overlay_scale:ie}),En=Oe=>({u_matrix:Oe}),ao=(Oe,I,ie,Te)=>({u_matrix:Oe,u_extrude_scale:Fa(I,1,ie),u_intensity:Te}),Co=(Oe,I,ie,Te)=>{let Me=t.H();t.aP(Me,0,Oe.width,Oe.height,0,0,1);let ze=Oe.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 bo(Oe,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 zs=(Oe,I,ie,Te)=>{let Me=Oe.transform;return{u_matrix:os(Oe,I,ie,Te),u_ratio:1/Fa(I,1,Me.zoom),u_device_pixel_ratio:Oe.pixelRatio,u_units_to_pixels:[1/Me.pixelsToGLUnits[0],1/Me.pixelsToGLUnits[1]]}},kn=(Oe,I,ie,Te,Me)=>t.e(zs(Oe,I,ie,Me),{u_image:0,u_image_height:Te}),wo=(Oe,I,ie,Te,Me)=>{let ze=Oe.transform,ht=go(I,ze);return{u_matrix:os(Oe,I,ie,Me),u_texsize:I.imageAtlasTexture.size,u_ratio:1/Fa(I,1,ze.zoom),u_device_pixel_ratio:Oe.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]]}},Zn=(Oe,I,ie,Te,Me,ze)=>{let ht=Oe.lineAtlas,wt=go(I,Oe.transform),Ot=ie.layout.get("line-cap")==="round",$t=ht.getDash(Te.from,Ot),Tr=ht.getDash(Te.to,Ot),Sr=$t.width*Me.fromScale,Kr=Tr.width*Me.toScale;return t.e(zs(Oe,I,ie,ze),{u_patternscale_a:[wt/Sr,-$t.height/2],u_patternscale_b:[wt/Kr,-Tr.height/2],u_sdfgamma:ht.width/(256*Math.min(Sr,Kr)*Oe.pixelRatio)/2,u_image:0,u_tex_y_a:$t.y,u_tex_y_b:Tr.y,u_mix:Me.t})};function go(Oe,I){return 1/Fa(Oe,1,I.tileZoom)}function os(Oe,I,ie,Te){return Oe.translatePosMatrix(Te?Te.posMatrix:I.tileID.posMatrix,I,ie.paint.get("line-translate"),ie.paint.get("line-translate-anchor"))}let ys=(Oe,I,ie,Te,Me)=>{return{u_matrix:Oe,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:jo(Me.paint.get("raster-hue-rotate"))};var ze,ht};function jo(Oe){Oe*=Math.PI/180;let I=Math.sin(Oe),ie=Math.cos(Oe);return[(2*ie+1)/3,(-Math.sqrt(3)*I-ie+1)/3,(Math.sqrt(3)*I-ie+1)/3]}let Yn=(Oe,I,ie,Te,Me,ze,ht,wt,Ot,$t,Tr,Sr,Kr,na)=>{let qe=ht.transform;return{u_is_size_zoom_constant:+(Oe==="constant"||Oe==="source"),u_is_size_feature_constant:+(Oe==="constant"||Oe==="camera"),u_size_t:I?I.uSizeT:0,u_size:I?I.uSize:0,u_camera_to_center_distance:qe.cameraToCenterDistance,u_pitch:qe.pitch/360*2*Math.PI,u_rotate_symbol:+ie,u_aspect_ratio:qe.width/qe.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:+Sr,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=(Oe,I,ie,Te,Me,ze,ht,wt,Ot,$t,Tr,Sr,Kr,na,qe)=>{let $e=ht.transform;return t.e(Yn(Oe,I,ie,Te,Me,ze,ht,wt,Ot,$t,Tr,Sr,Kr,qe),{u_gamma_scale:Te?Math.cos($e._pitch)*$e.cameraToCenterDistance:1,u_device_pixel_ratio:ht.pixelRatio,u_is_halo:+na})},Hn=(Oe,I,ie,Te,Me,ze,ht,wt,Ot,$t,Tr,Sr,Kr,na)=>t.e(Gn(Oe,I,ie,Te,Me,ze,ht,wt,Ot,$t,Tr,!0,Sr,!0,na),{u_texsize_icon:Kr,u_texture_icon:1}),ss=(Oe,I,ie)=>({u_matrix:Oe,u_opacity:I,u_color:ie}),_s=(Oe,I,ie,Te,Me,ze)=>t.e(function(ht,wt,Ot,$t){let Tr=Ot.imageManager.getPattern(ht.from.toString()),Sr=Ot.imageManager.getPattern(ht.to.toString()),{width:Kr,height:na}=Ot.imageManager.getPixelSize(),qe=Math.pow(2,$t.tileID.overscaledZ),$e=$t.tileSize*Math.pow(2,Ot.transform.tileZoom)/qe,lt=$e*($t.tileID.canonical.x+$t.tileID.wrap*qe),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:Sr.tl,u_pattern_br_b:Sr.br,u_texsize:[Kr,na],u_mix:wt.t,u_pattern_size_a:Tr.displaySize,u_pattern_size_b:Sr.displaySize,u_scale_a:wt.fromScale,u_scale_b:wt.toScale,u_tile_units_to_pixels:1/Fa($t,1,Ot.transform.tileZoom),u_pixel_coord_upper:[lt>>16,pt>>16],u_pixel_coord_lower:[65535<,65535&pt]}}(Te,ze,ie,Me),{u_matrix:Oe,u_opacity:I}),ps={fillExtrusion:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix),u_lightpos:new t.aN(Oe,I.u_lightpos),u_lightintensity:new t.aI(Oe,I.u_lightintensity),u_lightcolor:new t.aN(Oe,I.u_lightcolor),u_vertical_gradient:new t.aI(Oe,I.u_vertical_gradient),u_opacity:new t.aI(Oe,I.u_opacity)}),fillExtrusionPattern:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix),u_lightpos:new t.aN(Oe,I.u_lightpos),u_lightintensity:new t.aI(Oe,I.u_lightintensity),u_lightcolor:new t.aN(Oe,I.u_lightcolor),u_vertical_gradient:new t.aI(Oe,I.u_vertical_gradient),u_height_factor:new t.aI(Oe,I.u_height_factor),u_image:new t.aH(Oe,I.u_image),u_texsize:new t.aO(Oe,I.u_texsize),u_pixel_coord_upper:new t.aO(Oe,I.u_pixel_coord_upper),u_pixel_coord_lower:new t.aO(Oe,I.u_pixel_coord_lower),u_scale:new t.aN(Oe,I.u_scale),u_fade:new t.aI(Oe,I.u_fade),u_opacity:new t.aI(Oe,I.u_opacity)}),fill:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix)}),fillPattern:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix),u_image:new t.aH(Oe,I.u_image),u_texsize:new t.aO(Oe,I.u_texsize),u_pixel_coord_upper:new t.aO(Oe,I.u_pixel_coord_upper),u_pixel_coord_lower:new t.aO(Oe,I.u_pixel_coord_lower),u_scale:new t.aN(Oe,I.u_scale),u_fade:new t.aI(Oe,I.u_fade)}),fillOutline:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix),u_world:new t.aO(Oe,I.u_world)}),fillOutlinePattern:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix),u_world:new t.aO(Oe,I.u_world),u_image:new t.aH(Oe,I.u_image),u_texsize:new t.aO(Oe,I.u_texsize),u_pixel_coord_upper:new t.aO(Oe,I.u_pixel_coord_upper),u_pixel_coord_lower:new t.aO(Oe,I.u_pixel_coord_lower),u_scale:new t.aN(Oe,I.u_scale),u_fade:new t.aI(Oe,I.u_fade)}),circle:(Oe,I)=>({u_camera_to_center_distance:new t.aI(Oe,I.u_camera_to_center_distance),u_scale_with_map:new t.aH(Oe,I.u_scale_with_map),u_pitch_with_map:new t.aH(Oe,I.u_pitch_with_map),u_extrude_scale:new t.aO(Oe,I.u_extrude_scale),u_device_pixel_ratio:new t.aI(Oe,I.u_device_pixel_ratio),u_matrix:new t.aJ(Oe,I.u_matrix)}),collisionBox:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix),u_pixel_extrude_scale:new t.aO(Oe,I.u_pixel_extrude_scale)}),collisionCircle:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix),u_inv_matrix:new t.aJ(Oe,I.u_inv_matrix),u_camera_to_center_distance:new t.aI(Oe,I.u_camera_to_center_distance),u_viewport_size:new t.aO(Oe,I.u_viewport_size)}),debug:(Oe,I)=>({u_color:new t.aL(Oe,I.u_color),u_matrix:new t.aJ(Oe,I.u_matrix),u_overlay:new t.aH(Oe,I.u_overlay),u_overlay_scale:new t.aI(Oe,I.u_overlay_scale)}),clippingMask:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix)}),heatmap:(Oe,I)=>({u_extrude_scale:new t.aI(Oe,I.u_extrude_scale),u_intensity:new t.aI(Oe,I.u_intensity),u_matrix:new t.aJ(Oe,I.u_matrix)}),heatmapTexture:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix),u_world:new t.aO(Oe,I.u_world),u_image:new t.aH(Oe,I.u_image),u_color_ramp:new t.aH(Oe,I.u_color_ramp),u_opacity:new t.aI(Oe,I.u_opacity)}),hillshade:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix),u_image:new t.aH(Oe,I.u_image),u_latrange:new t.aO(Oe,I.u_latrange),u_light:new t.aO(Oe,I.u_light),u_shadow:new t.aL(Oe,I.u_shadow),u_highlight:new t.aL(Oe,I.u_highlight),u_accent:new t.aL(Oe,I.u_accent)}),hillshadePrepare:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix),u_image:new t.aH(Oe,I.u_image),u_dimension:new t.aO(Oe,I.u_dimension),u_zoom:new t.aI(Oe,I.u_zoom),u_unpack:new t.aK(Oe,I.u_unpack)}),line:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix),u_ratio:new t.aI(Oe,I.u_ratio),u_device_pixel_ratio:new t.aI(Oe,I.u_device_pixel_ratio),u_units_to_pixels:new t.aO(Oe,I.u_units_to_pixels)}),lineGradient:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix),u_ratio:new t.aI(Oe,I.u_ratio),u_device_pixel_ratio:new t.aI(Oe,I.u_device_pixel_ratio),u_units_to_pixels:new t.aO(Oe,I.u_units_to_pixels),u_image:new t.aH(Oe,I.u_image),u_image_height:new t.aI(Oe,I.u_image_height)}),linePattern:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix),u_texsize:new t.aO(Oe,I.u_texsize),u_ratio:new t.aI(Oe,I.u_ratio),u_device_pixel_ratio:new t.aI(Oe,I.u_device_pixel_ratio),u_image:new t.aH(Oe,I.u_image),u_units_to_pixels:new t.aO(Oe,I.u_units_to_pixels),u_scale:new t.aN(Oe,I.u_scale),u_fade:new t.aI(Oe,I.u_fade)}),lineSDF:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix),u_ratio:new t.aI(Oe,I.u_ratio),u_device_pixel_ratio:new t.aI(Oe,I.u_device_pixel_ratio),u_units_to_pixels:new t.aO(Oe,I.u_units_to_pixels),u_patternscale_a:new t.aO(Oe,I.u_patternscale_a),u_patternscale_b:new t.aO(Oe,I.u_patternscale_b),u_sdfgamma:new t.aI(Oe,I.u_sdfgamma),u_image:new t.aH(Oe,I.u_image),u_tex_y_a:new t.aI(Oe,I.u_tex_y_a),u_tex_y_b:new t.aI(Oe,I.u_tex_y_b),u_mix:new t.aI(Oe,I.u_mix)}),raster:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix),u_tl_parent:new t.aO(Oe,I.u_tl_parent),u_scale_parent:new t.aI(Oe,I.u_scale_parent),u_buffer_scale:new t.aI(Oe,I.u_buffer_scale),u_fade_t:new t.aI(Oe,I.u_fade_t),u_opacity:new t.aI(Oe,I.u_opacity),u_image0:new t.aH(Oe,I.u_image0),u_image1:new t.aH(Oe,I.u_image1),u_brightness_low:new t.aI(Oe,I.u_brightness_low),u_brightness_high:new t.aI(Oe,I.u_brightness_high),u_saturation_factor:new t.aI(Oe,I.u_saturation_factor),u_contrast_factor:new t.aI(Oe,I.u_contrast_factor),u_spin_weights:new t.aN(Oe,I.u_spin_weights)}),symbolIcon:(Oe,I)=>({u_is_size_zoom_constant:new t.aH(Oe,I.u_is_size_zoom_constant),u_is_size_feature_constant:new t.aH(Oe,I.u_is_size_feature_constant),u_size_t:new t.aI(Oe,I.u_size_t),u_size:new t.aI(Oe,I.u_size),u_camera_to_center_distance:new t.aI(Oe,I.u_camera_to_center_distance),u_pitch:new t.aI(Oe,I.u_pitch),u_rotate_symbol:new t.aH(Oe,I.u_rotate_symbol),u_aspect_ratio:new t.aI(Oe,I.u_aspect_ratio),u_fade_change:new t.aI(Oe,I.u_fade_change),u_matrix:new t.aJ(Oe,I.u_matrix),u_label_plane_matrix:new t.aJ(Oe,I.u_label_plane_matrix),u_coord_matrix:new t.aJ(Oe,I.u_coord_matrix),u_is_text:new t.aH(Oe,I.u_is_text),u_pitch_with_map:new t.aH(Oe,I.u_pitch_with_map),u_is_along_line:new t.aH(Oe,I.u_is_along_line),u_is_variable_anchor:new t.aH(Oe,I.u_is_variable_anchor),u_texsize:new t.aO(Oe,I.u_texsize),u_texture:new t.aH(Oe,I.u_texture),u_translation:new t.aO(Oe,I.u_translation),u_pitched_scale:new t.aI(Oe,I.u_pitched_scale)}),symbolSDF:(Oe,I)=>({u_is_size_zoom_constant:new t.aH(Oe,I.u_is_size_zoom_constant),u_is_size_feature_constant:new t.aH(Oe,I.u_is_size_feature_constant),u_size_t:new t.aI(Oe,I.u_size_t),u_size:new t.aI(Oe,I.u_size),u_camera_to_center_distance:new t.aI(Oe,I.u_camera_to_center_distance),u_pitch:new t.aI(Oe,I.u_pitch),u_rotate_symbol:new t.aH(Oe,I.u_rotate_symbol),u_aspect_ratio:new t.aI(Oe,I.u_aspect_ratio),u_fade_change:new t.aI(Oe,I.u_fade_change),u_matrix:new t.aJ(Oe,I.u_matrix),u_label_plane_matrix:new t.aJ(Oe,I.u_label_plane_matrix),u_coord_matrix:new t.aJ(Oe,I.u_coord_matrix),u_is_text:new t.aH(Oe,I.u_is_text),u_pitch_with_map:new t.aH(Oe,I.u_pitch_with_map),u_is_along_line:new t.aH(Oe,I.u_is_along_line),u_is_variable_anchor:new t.aH(Oe,I.u_is_variable_anchor),u_texsize:new t.aO(Oe,I.u_texsize),u_texture:new t.aH(Oe,I.u_texture),u_gamma_scale:new t.aI(Oe,I.u_gamma_scale),u_device_pixel_ratio:new t.aI(Oe,I.u_device_pixel_ratio),u_is_halo:new t.aH(Oe,I.u_is_halo),u_translation:new t.aO(Oe,I.u_translation),u_pitched_scale:new t.aI(Oe,I.u_pitched_scale)}),symbolTextAndIcon:(Oe,I)=>({u_is_size_zoom_constant:new t.aH(Oe,I.u_is_size_zoom_constant),u_is_size_feature_constant:new t.aH(Oe,I.u_is_size_feature_constant),u_size_t:new t.aI(Oe,I.u_size_t),u_size:new t.aI(Oe,I.u_size),u_camera_to_center_distance:new t.aI(Oe,I.u_camera_to_center_distance),u_pitch:new t.aI(Oe,I.u_pitch),u_rotate_symbol:new t.aH(Oe,I.u_rotate_symbol),u_aspect_ratio:new t.aI(Oe,I.u_aspect_ratio),u_fade_change:new t.aI(Oe,I.u_fade_change),u_matrix:new t.aJ(Oe,I.u_matrix),u_label_plane_matrix:new t.aJ(Oe,I.u_label_plane_matrix),u_coord_matrix:new t.aJ(Oe,I.u_coord_matrix),u_is_text:new t.aH(Oe,I.u_is_text),u_pitch_with_map:new t.aH(Oe,I.u_pitch_with_map),u_is_along_line:new t.aH(Oe,I.u_is_along_line),u_is_variable_anchor:new t.aH(Oe,I.u_is_variable_anchor),u_texsize:new t.aO(Oe,I.u_texsize),u_texsize_icon:new t.aO(Oe,I.u_texsize_icon),u_texture:new t.aH(Oe,I.u_texture),u_texture_icon:new t.aH(Oe,I.u_texture_icon),u_gamma_scale:new t.aI(Oe,I.u_gamma_scale),u_device_pixel_ratio:new t.aI(Oe,I.u_device_pixel_ratio),u_is_halo:new t.aH(Oe,I.u_is_halo),u_translation:new t.aO(Oe,I.u_translation),u_pitched_scale:new t.aI(Oe,I.u_pitched_scale)}),background:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix),u_opacity:new t.aI(Oe,I.u_opacity),u_color:new t.aL(Oe,I.u_color)}),backgroundPattern:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix),u_opacity:new t.aI(Oe,I.u_opacity),u_image:new t.aH(Oe,I.u_image),u_pattern_tl_a:new t.aO(Oe,I.u_pattern_tl_a),u_pattern_br_a:new t.aO(Oe,I.u_pattern_br_a),u_pattern_tl_b:new t.aO(Oe,I.u_pattern_tl_b),u_pattern_br_b:new t.aO(Oe,I.u_pattern_br_b),u_texsize:new t.aO(Oe,I.u_texsize),u_mix:new t.aI(Oe,I.u_mix),u_pattern_size_a:new t.aO(Oe,I.u_pattern_size_a),u_pattern_size_b:new t.aO(Oe,I.u_pattern_size_b),u_scale_a:new t.aI(Oe,I.u_scale_a),u_scale_b:new t.aI(Oe,I.u_scale_b),u_pixel_coord_upper:new t.aO(Oe,I.u_pixel_coord_upper),u_pixel_coord_lower:new t.aO(Oe,I.u_pixel_coord_lower),u_tile_units_to_pixels:new t.aI(Oe,I.u_tile_units_to_pixels)}),terrain:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix),u_texture:new t.aH(Oe,I.u_texture),u_ele_delta:new t.aI(Oe,I.u_ele_delta),u_fog_matrix:new t.aJ(Oe,I.u_fog_matrix),u_fog_color:new t.aL(Oe,I.u_fog_color),u_fog_ground_blend:new t.aI(Oe,I.u_fog_ground_blend),u_fog_ground_blend_opacity:new t.aI(Oe,I.u_fog_ground_blend_opacity),u_horizon_color:new t.aL(Oe,I.u_horizon_color),u_horizon_fog_blend:new t.aI(Oe,I.u_horizon_fog_blend)}),terrainDepth:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix),u_ele_delta:new t.aI(Oe,I.u_ele_delta)}),terrainCoords:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix),u_texture:new t.aH(Oe,I.u_texture),u_terrain_coords_id:new t.aI(Oe,I.u_terrain_coords_id),u_ele_delta:new t.aI(Oe,I.u_ele_delta)}),sky:(Oe,I)=>({u_sky_color:new t.aL(Oe,I.u_sky_color),u_horizon_color:new t.aL(Oe,I.u_horizon_color),u_horizon:new t.aI(Oe,I.u_horizon),u_sky_horizon_blend:new t.aI(Oe,I.u_sky_horizon_blend)})};class Ko{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,Oe.transform.glCoordMatrix),t.aQ(yr,yr,bt.placementViewportMatrix),Ot.push({circleArray:ur,circleOffset:Tr,transform:Et.posMatrix,invTransform:yr,coord:Et}),$t+=ur.length/4,Tr=$t}Dt&&wt.draw(ze,ht.LINES,us.disabled,Ps.disabled,Oe.colorModeForRenderPass(),to.disabled,{u_matrix:Et.posMatrix,u_pixel_extrude_scale:[1/(Sr=Oe.transform).width,1/Sr.height]},Oe.style.map.terrain&&Oe.style.map.terrain.getTerrainData(Et),ie.id,Dt.layoutVertexBuffer,Dt.indexBuffer,Dt.segments,null,Oe.transform.zoom,null,null,Dt.collisionVertexBuffer)}var Sr;if(!Me||!Ot.length)return;let Kr=Oe.useProgram("collisionCircle"),na=new t.aR;na.resize(4*$t),na._trim();let qe=0;for(let pt of Ot)for(let Et=0;Et=0&&(pt[bt.associatedIconIndex]={shiftedAnchor:An,angle:Kn})}else or(bt.numGlyphs,$e)}if($t){lt.clear();let Et=Oe.icon.placedSymbolArray;for(let bt=0;btOe.style.map.terrain.getElevation(Aa,zt,_r):null,tr=ie.layout.get("text-rotation-alignment")==="map";Ae(ci,Aa.posMatrix,Oe,Me,tu,vu,pt,$t,tr,$e,Aa.toUnwrapped(),qe.width,qe.height,wl,Tt)}let Gl=Aa.posMatrix,Hl=Me&&jr||uc,me=Et||Hl?ql:tu,De=Ru,et=on&&ie.paint.get(Me?"text-halo-width":"icon-halo-width").constantOr(1)!==0,dt;dt=on?ci.iconsInText?Hn(An.kind,Ao,bt,pt,Et,Hl,Oe,Gl,me,De,wl,Mo,tl,ha):Gn(An.kind,Ao,bt,pt,Et,Hl,Oe,Gl,me,De,wl,Me,Mo,!0,ha):Yn(An.kind,Ao,bt,pt,Et,Hl,Oe,Gl,me,De,wl,Me,Mo,ha);let yt={program:Bn,buffers:Vi,uniformValues:dt,atlasTexture:Yo,atlasTextureIcon:es,atlasInterpolation:ds,atlasInterpolationIcon:ul,isSDF:on,hasHalo:et};if(ur&&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:ls})}else Qr.push({segments:Vi.segments,sortKey:0,state:yt,terrainData:ls})}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,Oe,Da.program,Er,Tr,Sr,ci,Aa.terrainData)),ci.u_is_halo=0}Of(Da.buffers,Aa.segments,ie,Oe,Da.program,Er,Tr,Sr,Da.uniformValues,Aa.terrainData)}}function Of(Oe,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,Oe.layoutVertexBuffer,Oe.indexBuffer,I,ie.paint,Te.transform.zoom,Oe.programConfigurations.get(ie.id),Oe.dynamicLayoutVertexBuffer,Oe.opacityVertexBuffer)}function of(Oe,I,ie,Te){let Me=Oe.context,ze=Me.gl,ht=Ps.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 Sr=Ot.programConfigurations.get(ie.id),Kr=Oe.useProgram("heatmap",Sr),na=Oe.style.map.terrain.getTerrainData(Te);Kr.draw(Me,ze.TRIANGLES,us.disabled,ht,wt,to.disabled,ao(Te.posMatrix,I,Oe.transform.zoom,ie.paint.get("heatmap-intensity")),na,ie.id,Ot.layoutVertexBuffer,Ot.indexBuffer,Ot.segments,ie.paint,Oe.transform.zoom,Sr)}function jc(Oe,I,ie){let Te=Oe.context,Me=Te.gl;Te.setColorMode(Oe.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),Oe.useProgram("heatmapTexture").draw(Te,Me.TRIANGLES,us.disabled,Ps.disabled,Oe.colorModeForRenderPass(),to.disabled,Co(Oe,I,0,1),null,I.id,Oe.rasterBoundsBuffer,Oe.quadTriangleIndexBuffer,Oe.rasterBoundsSegments,I.paint,Oe.transform.zoom),wt.destroy(),I.heatmapFbos.delete(ht))}function Bf(Oe,I,ie){var Te,Me;let ze=Oe.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=Oe.HALF_FLOAT)!==null&&Te!==void 0?Te:ze.UNSIGNED_BYTE,Ot=(Me=Oe.RGBA16F)!==null&&Me!==void 0?Me:ze.RGBA;ze.texImage2D(ze.TEXTURE_2D,0,Ot,I,ie,0,ze.RGBA,wt,null);let $t=Oe.createFramebuffer(I,ie,!1,!1);return $t.colorAttachment.set(ht),$t}function Nf(Oe,I){return I.colorRampTexture||(I.colorRampTexture=new u(Oe,I.colorRamp,Oe.gl.RGBA)),I.colorRampTexture}function Gu(Oe,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&&Oe.setConstantPatternPositions(ht,wt)}function Ef(Oe,I,ie,Te,Me,ze,ht){let wt=Oe.context.gl,Ot="fill-pattern",$t=ie.paint.get(Ot),Tr=$t&&$t.constantOr(1),Sr=ie.getCrossfadeParameters(),Kr,na,qe,$e,lt;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 Dt=bt.getBucket(ie);if(!Dt)continue;let ur=Dt.programConfigurations.get(ie.id),yr=Oe.useProgram(na,ur),Er=Oe.style.map.terrain&&Oe.style.map.terrain.getTerrainData(Et);Tr&&(Oe.context.activeTexture.set(wt.TEXTURE0),bt.imageAtlasTexture.bind(wt.LINEAR,wt.CLAMP_TO_EDGE),ur.updatePaintBuffers(Sr)),Gu(ur,Ot,pt,bt,ie);let jr=Er?Et:null,Qr=Oe.translatePosMatrix(jr?jr.posMatrix:Et.posMatrix,bt,ie.paint.get("fill-translate"),ie.paint.get("fill-translate-anchor"));if(ht){$e=Dt.indexBuffer2,lt=Dt.segments2;let ha=[wt.drawingBufferWidth,wt.drawingBufferHeight];qe=na==="fillOutlinePattern"&&Tr?Ki(Qr,Oe,Sr,bt,ha):ki(Qr,ha)}else $e=Dt.indexBuffer,lt=Dt.segments,qe=Tr?Ai(Qr,Oe,Sr,bt):ba(Qr);yr.draw(Oe.context,Kr,Me,Oe.stencilModeForClipping(Et),ze,to.disabled,qe,Er,ie.id,Dt.layoutVertexBuffer,$e,lt,ie.paint,Oe.transform.zoom,ur)}}function oc(Oe,I,ie,Te,Me,ze,ht){let wt=Oe.context,Ot=wt.gl,$t="fill-extrusion-pattern",Tr=ie.paint.get($t),Sr=Tr.constantOr(1),Kr=ie.getCrossfadeParameters(),na=ie.paint.get("fill-extrusion-opacity"),qe=Tr.constantOr(null);for(let $e of Te){let lt=I.getTile($e),pt=lt.getBucket(ie);if(!pt)continue;let Et=Oe.style.map.terrain&&Oe.style.map.terrain.getTerrainData($e),bt=pt.programConfigurations.get(ie.id),Dt=Oe.useProgram(Sr?"fillExtrusionPattern":"fillExtrusion",bt);Sr&&(Oe.context.activeTexture.set(Ot.TEXTURE0),lt.imageAtlasTexture.bind(Ot.LINEAR,Ot.CLAMP_TO_EDGE),bt.updatePaintBuffers(Kr)),Gu(bt,$t,qe,lt,ie);let ur=Oe.translatePosMatrix($e.posMatrix,lt,ie.paint.get("fill-extrusion-translate"),ie.paint.get("fill-extrusion-translate-anchor")),yr=ie.paint.get("fill-extrusion-vertical-gradient"),Er=Sr?la(ur,Oe,yr,na,$e,Kr,lt):ga(ur,Oe,yr,na);Dt.draw(wt,wt.gl.TRIANGLES,Me,ze,ht,to.backCCW,Er,Et,ie.id,pt.layoutVertexBuffer,pt.indexBuffer,pt.segments,ie.paint,Oe.transform.zoom,bt,Oe.style.map.terrain&&pt.centroidVertexBuffer)}}function Zc(Oe,I,ie,Te,Me,ze,ht){let wt=Oe.context,Ot=wt.gl,$t=ie.fbo;if(!$t)return;let Tr=Oe.useProgram("hillshade"),Sr=Oe.style.map.terrain&&Oe.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,qe,$e)=>{let lt=qe.paint.get("hillshade-shadow-color"),pt=qe.paint.get("hillshade-highlight-color"),Et=qe.paint.get("hillshade-accent-color"),bt=qe.paint.get("hillshade-illumination-direction")*(Math.PI/180);qe.paint.get("hillshade-illumination-anchor")==="viewport"&&(bt-=Kr.transform.angle);let Dt=!Kr.options.moving;return{u_matrix:$e?$e.posMatrix:Kr.transform.calculatePosMatrix(na.tileID.toUnwrapped(),Dt),u_image:0,u_latrange:bo(0,na.tileID),u_light:[qe.paint.get("hillshade-exaggeration"),bt],u_shadow:lt,u_highlight:pt,u_accent:Et}})(Oe,ie,Te,Sr?I:null),Sr,Te.id,Oe.rasterBoundsBuffer,Oe.quadTriangleIndexBuffer,Oe.rasterBoundsSegments)}function eu(Oe,I,ie,Te,Me,ze){let ht=Oe.context,wt=ht.gl,Ot=I.dem;if(Ot&&Ot.data){let $t=Ot.dim,Tr=Ot.stride,Sr=Ot.getPixels();if(ht.activeTexture.set(wt.TEXTURE1),ht.pixelStoreUnpackPremultiplyAlpha.set(!1),I.demTexture=I.demTexture||Oe.getTileTexture(Tr),I.demTexture){let na=I.demTexture;na.update(Sr,{premultiply:!1}),na.bind(wt.NEAREST,wt.CLAMP_TO_EDGE)}else I.demTexture=new u(ht,Sr,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]),Oe.useProgram("hillshadePrepare").draw(ht,wt.TRIANGLES,Te,Me,ze,to.disabled,((na,qe)=>{let $e=qe.stride,lt=t.H();return t.aP(lt,0,t.X,-t.X,0,0,1),t.J(lt,lt,[0,-t.X,0]),{u_matrix:lt,u_image:1,u_dimension:[$e,$e],u_zoom:na.overscaledZ,u_unpack:qe.getUnpackVector()}})(I.tileID,Ot),null,ie.id,Oe.rasterBoundsBuffer,Oe.quadTriangleIndexBuffer,Oe.rasterBoundsSegments),I.needsHillshadePrepare=!1}}function qc(Oe,I,ie,Te,Me,ze){let ht=Te.paint.get("raster-fade-duration");if(!ze&&ht>0){let wt=i.now(),Ot=(wt-Oe.timeAdded)/ht,$t=I?(wt-I.timeAdded)/ht:-1,Tr=ie.getSource(),Sr=Me.coveringZoomLevel({tileSize:Tr.tileSize,roundZoom:Tr.roundZoom}),Kr=!I||Math.abs(I.tileID.overscaledZ-Sr)>Math.abs(Oe.tileID.overscaledZ-Sr),na=Kr&&Oe.refreshedUponExpiration?1:t.ac(Kr?Ot:1-$t,0,1);return Oe.refreshedUponExpiration&&Ot>=1&&(Oe.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),Zs=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 Yc(Oe,I,ie,Te){Cu(Oe,0,I+ie/2,Oe.transform.width,ie,Te)}function $f(Oe,I,ie,Te){Cu(Oe,I-ie/2,0,ie,Oe.transform.height,Te)}function Cu(Oe,I,ie,Te,Me,ze){let ht=Oe.context,wt=ht.gl;wt.enable(wt.SCISSOR_TEST),wt.scissor(I*Oe.pixelRatio,ie*Oe.pixelRatio,Te*Oe.pixelRatio,Me*Oe.pixelRatio),ht.clear({color:ze}),wt.disable(wt.SCISSOR_TEST)}function jf(Oe,I,ie){let Te=Oe.context,Me=Te.gl,ze=ie.posMatrix,ht=Oe.useProgram("debug"),wt=us.disabled,Ot=Ps.disabled,$t=Oe.colorModeForRenderPass(),Tr="$debug",Sr=Oe.style.map.terrain&&Oe.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),qe=I.getTile(ie).tileSize,$e=512/Math.min(qe,512)*(ie.overscaledZ/Oe.transform.zoom)*.5,lt=ie.canonical.toString();ie.overscaledZ!==ie.canonical.z&&(lt+=` => ${ie.overscaledZ}`),function(pt,Et){pt.initDebugOverlayCanvas();let bt=pt.debugOverlayCanvas,Dt=pt.context.gl,ur=pt.debugOverlayCanvas.getContext("2d");ur.clearRect(0,0,bt.width,bt.height),ur.shadowColor="white",ur.shadowBlur=2,ur.lineWidth=1.5,ur.strokeStyle="white",ur.textBaseline="top",ur.font="bold 36px Open Sans, sans-serif",ur.fillText(Et,5,5),ur.strokeText(Et,5,5),pt.debugOverlayTexture.update(bt),pt.debugOverlayTexture.bind(Dt.LINEAR,Dt.CLAMP_TO_EDGE)}(Oe,`${lt} ${na}kB`),ht.draw(Te,Me.TRIANGLES,wt,Ot,fl.alphaBlended,to.disabled,On(ze,t.aM.transparent,$e),null,Tr,Oe.debugBuffer,Oe.quadTriangleIndexBuffer,Oe.debugSegments),ht.draw(Te,Me.LINE_STRIP,wt,Ot,$t,to.disabled,On(ze,t.aM.red),Sr,Tr,Oe.debugBuffer,Oe.tileBorderIndexBuffer,Oe.debugSegments)}function ml(Oe,I,ie){let Te=Oe.context,Me=Te.gl,ze=Oe.colorModeForRenderPass(),ht=new us(Me.LEQUAL,us.ReadWrite,Oe.depthRangeFor3D),wt=Oe.useProgram("terrain"),Ot=I.getTerrainMesh();Te.bindFramebuffer.set(null),Te.viewport.set([0,0,Oe.width,Oe.height]);for(let $t of ie){let Tr=Oe.renderToTexture.getTexture($t),Sr=I.getTerrainData($t.tileID);Te.activeTexture.set(Me.TEXTURE0),Me.bindTexture(Me.TEXTURE_2D,Tr.texture);let Kr=Oe.transform.calculatePosMatrix($t.tileID.toUnwrapped()),na=I.getMeshFrameDelta(Oe.transform.zoom),qe=Oe.transform.calculateFogMatrix($t.tileID.toUnwrapped()),$e=mr(Kr,na,qe,Oe.style.sky,Oe.transform.pitch);wt.draw(Te,Me.TRIANGLES,ht,Ps.disabled,ze,to.backCCW,$e,Sr,"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 Or}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,Nr.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,Nr.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,je.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,Nr.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 Ps({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,us.disabled,this.stencilClearMode,fl.disabled,to.disabled,En(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(us.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,us.disabled,new Ps({func:Me.ALWAYS,mask:0},wt,255,Me.KEEP,Me.KEEP,Me.REPLACE),fl.disabled,to.disabled,En(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 Ps({func:ie.NOTEQUAL,mask:255},I,255,ie.KEEP,ie.KEEP,ie.REPLACE)}stencilModeForClipping(I){let ie=this.context.gl;return new Ps({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 us(Sr.LEQUAL,us.ReadWrite,[0,1]),qe=Ps.disabled,$e=Ot.colorModeForRenderPass(),lt=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,Nr.members),Tr.createIndexBuffer(Et),t.a0.simpleSegment(0,0,pt.length,Et.length))}lt.draw(Tr,Sr.TRIANGLES,na,qe,$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.currentLayerlt.source&&!lt.isHidden(Tr)?[$t.sourceCaches[lt.source]]:[]),na=Kr.filter(lt=>lt.getSource().type==="vector"),qe=Kr.filter(lt=>lt.getSource().type!=="vector"),$e=lt=>{(!Sr||Sr.getSource().maxzoom$e(lt)),Sr||qe.forEach(lt=>$e(lt)),Sr}(this.style,this.transform.zoom);Ot&&function($t,Tr,Sr){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 us(Ot.LEQUAL,us.ReadWrite,[0,1]),Sr=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 qe of Kr){let $e=ht.getTerrainData(qe.tileID),lt={u_matrix:ze.transform.calculatePosMatrix(qe.tileID.toUnwrapped()),u_ele_delta:ht.getMeshFrameDelta(ze.transform.zoom)};na.draw(wt,Ot.TRIANGLES,Tr,Ps.disabled,$t,to.backCCW,lt,$e,"terrain",Sr.vertexBuffer,Sr.indexBuffer,Sr.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 us(Ot.LEQUAL,us.ReadWrite,[0,1]),Sr=ht.getTerrainMesh(),Kr=ht.getCoordsTexture(),na=ht.sourceCache.getRenderableTiles(),qe=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 lt=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)};qe.draw(wt,Ot.TRIANGLES,Tr,Ps.disabled,$t,to.backCCW,pt,lt,"terrain",Sr.vertexBuffer,Sr.indexBuffer,Sr.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=Ps.disabled,Sr=ze.colorModeForRenderPass();(wt._unevaluatedLayout.hasValue("text-variable-anchor")||wt._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function(Kr,na,qe,$e,lt,pt,Et,bt,Dt){let ur=na.transform,yr=pi(),Er=lt==="map",jr=pt==="map";for(let Qr of Kr){let ha=$e.getTile(Qr),Aa=ha.getBucket(qe);if(!Aa||!Aa.text||!Aa.text.segments.get().length)continue;let Da=t.ag(Aa.textSizeData,ur.zoom),ci=Fa(ha,1,na.transform.zoom),Vi=kr(Qr.posMatrix,jr,Er,na.transform,ci),ji=qe.layout.get("icon-text-fit")!=="none"&&Aa.hasIconData();if(Da){let on=Math.pow(2,ur.zoom-ha.tileID.overscaledZ),An=na.style.map.terrain?(Bn,Ao)=>na.style.map.terrain.getElevation(Qr,Bn,Ao):null,Kn=yr.translatePosition(ur,ha,Et,bt);nf(Aa,Er,jr,Dt,ur,Vi,Qr.posMatrix,on,Da,ji,yr,Kn,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,Sr),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,Sr),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"),Sr=wt.paint.get("circle-stroke-opacity"),Kr=!wt.layout.get("circle-sort-key").isConstant();if($t.constantOr(1)===0&&(Tr.constantOr(1)===0||Sr.constantOr(1)===0))return;let na=ze.context,qe=na.gl,$e=ze.depthModeForSublayer(0,us.ReadOnly),lt=Ps.disabled,pt=ze.colorModeForRenderPass(),Et=[];for(let bt=0;btbt.sortKey-Dt.sortKey);for(let bt of Et){let{programConfiguration:Dt,program:ur,layoutVertexBuffer:yr,indexBuffer:Er,uniformValues:jr,terrainData:Qr}=bt.state;ur.draw(na,qe.TRIANGLES,$e,lt,pt,to.disabled,jr,Qr,wt.id,yr,Er,bt.segments,wt.paint,ze.transform.zoom,Dt)}})(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 Sr=ht.getTile(Tr);ht.hasRenderableParent(Tr)||(ze.renderPass==="offscreen"?of(ze,Sr,wt,Tr):ze.renderPass==="translucent"&&jc(ze,wt,Tr))}$t.viewport.set([0,0,ze.width,ze.height])}else ze.renderPass==="offscreen"?function(Tr,Sr,Kr,na){let qe=Tr.context,$e=qe.gl,lt=Ps.disabled,pt=new fl([$e.ONE,$e.ONE],t.aM.transparent,[!0,!0,!0,!0]);(function(Et,bt,Dt){let ur=Et.gl;Et.activeTexture.set(ur.TEXTURE1),Et.viewport.set([0,0,bt.width/4,bt.height/4]);let yr=Dt.heatmapFbos.get(t.aU);yr?(ur.bindTexture(ur.TEXTURE_2D,yr.colorAttachment.get()),Et.bindFramebuffer.set(yr.framebuffer)):(yr=Bf(Et,bt.width/4,bt.height/4),Dt.heatmapFbos.set(t.aU,yr))})(qe,Tr,Kr),qe.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=ys(ci,Qr||[0,0],jr||1,Er,wt);Sr instanceof at?Kr.draw($t,Tr.TRIANGLES,bt,Ps.disabled,na,to.disabled,Vi,Aa,wt.id,Sr.boundsBuffer,ze.quadTriangleIndexBuffer,Sr.boundsSegments):Kr.draw($t,Tr.TRIANGLES,bt,qe[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 Sr=ze.context,Kr=Sr.gl,na=ze.transform,qe=na.tileSize,$e=wt.paint.get("background-pattern");if(ze.isPatternMissing($e))return;let lt=!$e&&$t.a===1&&Tr===1&&ze.opaquePassEnabledForLayer()?"opaque":"translucent";if(ze.renderPass!==lt)return;let pt=Ps.disabled,Et=ze.depthModeForSublayer(0,lt==="opaque"?us.ReadWrite:us.ReadOnly),bt=ze.colorModeForRenderPass(),Dt=ze.useProgram($e?"backgroundPattern":"background"),ur=Ot||na.coveringTiles({tileSize:qe,terrain:ze.style.map.terrain});$e&&(Sr.activeTexture.set(Kr.TEXTURE0),ze.imageManager.bind(ze.context));let yr=wt.getCrossfadeParameters();for(let Er of ur){let jr=Ot?Er.posMatrix:ze.transform.calculatePosMatrix(Er.toUnwrapped()),Qr=$e?_s(jr,Tr,ze,$e,{tileID:Er,tileSize:qe},yr):ss(jr,Tr,$t),ha=ze.style.map.terrain&&ze.style.map.terrain.getTerrainData(Er);Dt.draw(Sr,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(Ps.disabled);let Tr=$t.renderingMode==="3d"?new us(ze.context.gl.LEQUAL,us.ReadWrite,ze.depthRangeFor3D):ze.depthModeForSublayer(0,us.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]:Fa(ie,Te[0],this.transform.zoom),ze?Te[1]:Fa(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 va(this.context,Hr[I],ie,ps[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 qe=na[0],$e=na[1],lt=na[2],pt=qe*qe+$e*$e+lt*lt;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,qe){var $e=na[0],lt=na[1],pt=na[2],Et=qe[0],bt=qe[1],Dt=qe[2];return Kr[0]=lt*Dt-pt*bt,Kr[1]=pt*Et-$e*Dt,Kr[2]=$e*bt-lt*Et,Kr}([],E([],ze[wt[0]],ze[wt[1]]),E([],ze[wt[2]],ze[wt[1]]))),$t=-((Tr=Ot)[0]*(Sr=ze[wt[1]])[0]+Tr[1]*Sr[1]+Tr[2]*Sr[2]);var Tr,Sr;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 Ml{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 Ml(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),Sr=Math.cos(ze);Te[0]=ht*Sr+Ot*Tr,Te[1]=wt*Sr+$t*Tr,Te[2]=ht*-Tr+Ot*Sr,Te[3]=wt*-Tr+$t*Sr}(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],Sr=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,qe=bt=>({aabb:new vc([bt*Ot,0,0],[(bt+1)*Ot,Ot,0]),zoom:0,x:0,y:0,wrap:bt,fullyVisible:!1}),$e=[],lt=[],pt=Me,Et=I.reparseOverscaled?ze:Me;if(this._renderWorldCopies)for(let bt=1;bt<=3;bt++)$e.push(qe(-bt)),$e.push(qe(bt));for($e.push(qe(0));$e.length>0;){let bt=$e.pop(),Dt=bt.x,ur=bt.y,yr=bt.fullyVisible;if(!yr){let Aa=bt.aabb.intersects(Sr);if(Aa===0)continue;yr=Aa===2}let Er=I.terrain?$t:Tr,jr=bt.aabb.distanceX(Er),Qr=bt.aabb.distanceY(Er),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-(Dt<>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),Kn=(ie=An.minElevation)!==null&&ie!==void 0?ie:this.elevation,Bn=(Te=An.maxElevation)!==null&&Te!==void 0?Te:this.elevation;ji=new vc([ji.min[0],ji.min[1],Kn],[ji.max[0],ji.max[1],Bn])}$e.push({aabb:ji,zoom:Vi,x:Da,y:ci,wrap:bt.wrap,fullyVisible:yr})}}return lt.sort((bt,Dt)=>bt.distanceSq-Dt.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,Sr=$t===Tr?0:(0-$t)/(Tr-$t);return new t.Z(t.y.number(Te[0]/ze,Me[0]/ht,Sr)/this.worldSize,t.y.number(wt,Ot,Sr)/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 te().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 te([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,Sr=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,Dt=qe;this._renderWorldCopies&&(Dt=t.b3(qe,bt-ze/2,bt+ze/2));let ur=Kr/2;Dt-ur$t&&(lt=$t-ur)}if(lt!==void 0||pt!==void 0){let bt=new t.P(lt??qe,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),Sr=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)),qe=Math.sin(na)*Ot/Math.sin(t.ac(Math.PI-$t-na,.01,Math.PI-.01)),$e=Math.min(Sr,qe);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 lt=this.width%2/2,pt=this.height%2/2,Et=Math.cos(this.angle),bt=Math.sin(this.angle),Dt=ie-Math.round(ie)+Et*lt+bt*pt,ur=Te-Math.round(Te)+Et*pt+bt*lt,yr=new Float64Array(Me);if(t.J(yr,yr,[Dt>.5?Dt-1:Dt,ur>.5?ur-1:ur,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(Oe,I){let ie,Te=!1,Me=null,ze=null,ht=()=>{Me=null,Te&&(Oe.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 Sr=this._hashName,Kr=!1,na=window.location.hash.slice(1).split("&").map(qe=>{let $e=qe.split("=")[0];return $e===Sr?(Kr=!0,`${$e}=${Tr}`):qe}).filter(qe=>qe);return Kr||na.push(`${Sr}=${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:i.now(),settings:I})}_drainInertiaBuffer(){let I=this._inertiaBuffer,ie=i.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(Oe,I){(!Oe.duration||Oe.durationie.unproject(Ot)),wt=ze.reduce((Ot,$t,Tr,Sr)=>Ot.add($t.div(Sr.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 iu(I.type,this._map,I))}mouseup(I){this._map.fire(new iu(I.type,this._map,I))}click(I,ie){this._mousedownPos&&this._mousedownPos.dist(ie)>=this._clickTolerance||this._map.fire(new iu(I.type,this._map,I))}dblclick(I){return this._firePreventable(new iu(I.type,this._map,I))}mouseover(I){this._map.fire(new iu(I.type,this._map,I))}mouseout(I){this._map.fire(new iu(I.type,this._map,I))}touchstart(I){return this._firePreventable(new Kc(I.type,this._map,I))}touchmove(I){this._map.fire(new Kc(I.type,this._map,I))}touchend(I){this._map.fire(new Kc(I.type,this._map,I))}touchcancel(I){this._map.fire(new Kc(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 iu(I.type,this._map,I))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new iu("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(I){this._delayContextMenu?this._contextMenuEvent=I:this._ignoreContextMenu||this._map.fire(new iu(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&&(n.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&&(n.remove(this._box),this._box=null),n.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(I,ie){return this._map.fire(new t.k(I,{originalEvent:ie}))}}function Cf(Oe,I){if(Oe.length!==I.length)throw new Error(`The number of touches and points are not equal - touches ${Oe.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){Oe.mousedown=Oe.dragStart,Oe.mousemoveWindow=Oe.dragMove,Oe.mouseup=Oe.dragEnd,Oe.contextmenu=I=>{I.preventDefault()}},nu=({enable:Oe,clickTolerance:I,bearingDegreesPerPixelMoved:ie=.8})=>{let Te=new Wu({checkCorrectEvent:Me=>n.mouseButton(Me)===0&&Me.ctrlKey||n.mouseButton(Me)===2});return new Hu({clickTolerance:I,move:(Me,ze)=>({bearingDelta:(ze.x-Me.x)*ie}),moveStateManager:Te,enable:Oe,assignEvents:Lf})},Vf=({enable:Oe,clickTolerance:I,pitchDegreesPerPixelMoved:ie=-.5})=>{let Te=new Wu({checkCorrectEvent:Me=>n.mouseButton(Me)===0&&Me.ctrlKey||n.mouseButton(Me)===2});return new Hu({clickTolerance:I,move:(Me,ze)=>({pitchDelta:(ze.y-Me.y)*ie}),moveStateManager:Te,enable:Oe,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],Sr=this._touches[$t];Sr&&(ze._add(Tr),ht._add(Tr.sub(Sr)),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(Oe.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 xr{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(Oe){return Oe*(2-Oe)}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=i.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=n.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=i.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=(i.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:i.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=n.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&&(n.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=Oe=>Oe.zoom||Oe.drag||Oe.pitch||Oe.rotate;class mi extends t.k{}function Sn(Oe){return Oe.panDelta&&Oe.panDelta.mag()||Oe.zoomDelta||Oe.bearingDelta||Oe.pitchDelta}class Qn{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,Sr=Tr?this._getMapTouches(Tr):void 0,Kr=Sr?n.touchPos(this._map.getCanvas(),Sr):n.mousePos(this._map.getCanvas(),Me);for(let{handlerName:$e,handler:lt,allowed:pt}of this._handlers){if(!lt.isEnabled())continue;let Et;this._blockedByActive($t,pt,$e)?lt.reset():lt[ze||Me.type]&&(Et=lt[ze||Me.type](Me,Kr,Sr),this.mergeHandlerResult(wt,Ot,Et,$e,ht),Et&&Et.needsRenderFrame&&this._triggerRenderFrame()),(Et||lt.isActive())&&($t[$e]=lt)}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:qe}=wt;qe&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],qe(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)n.addEventListener(Me,ze,Me===document?this.handleWindowEvent:this.handleEvent,ht)}destroy(){for(let[I,ie,Te]of this._listeners)n.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=nu(I),Sr=Vf(I);ie.dragRotate=new pn(I,Tr,Sr),this._add("mouseRotate",Tr,["mousePitch"]),this._add("mousePitch",Sr,["mouseRotate"]),I.interactive&&I.dragRotate&&ie.dragRotate.enable();let Kr=(({enable:Et,clickTolerance:bt})=>{let Dt=new Wu({checkCorrectEvent:ur=>n.mouseButton(ur)===0&&!ur.ctrlKey});return new Hu({clickTolerance:bt,move:(ur,yr)=>({around:yr,panDelta:yr.sub(ur)}),activateOnStart:!0,moveStateManager:Dt,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 qe=new $c,$e=new xu;ie.touchZoomRotate=new Pi(Te,$e,qe,Ot),this._add("touchRotate",qe,["touchPan","touchZoom"]),this._add("touchZoom",$e,["touchPan","touchRotate"]),I.interactive&&I.touchZoomRotate&&ie.touchZoomRotate.enable(I.touchZoomRotate);let lt=ie.scrollZoom=new ka(ie,()=>this._triggerRenderFrame());this._add("scrollZoom",lt,["mousePan"]),I.interactive&&I.scrollZoom&&ie.scrollZoom.enable(I.scrollZoom);let pt=ie.keyboard=new xr(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:Sr,pinchAround:Kr}=I;Kr!==void 0&&(Sr=Kr),Me._stop(!0),Sr=Sr||Me.transform.centerPoint;let na=ze.pointLocation(wt?Sr.sub(wt):Sr);$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,Sr):(this._terrainMovement=!0,this._map._elevationFreeze=!0,ze.setLocationAtPoint(na,Sr)):ze.setLocationAtPoint(na,Sr),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 Sr in I){let{originalEvent:Kr}=I[Sr];this._eventsInProgress[Sr]||(ht[`${Sr}start`]=Kr),this._eventsInProgress[Sr]=I[Sr]}!Me&&ze&&this._fireEvent("movestart",ze.originalEvent);for(let Sr in ht)this._fireEvent(Sr,ht[Sr]);ze&&this._fireEvent("move",ze.originalEvent);for(let Sr in I){let{originalEvent:Kr}=I[Sr];this._fireEvent(Sr,Kr)}let wt={},Ot;for(let Sr in this._eventsInProgress){let{handlerName:Kr,originalEvent:na}=this._eventsInProgress[Sr];this._handlersById[Kr].isActive()||(delete this._eventsInProgress[Sr],Ot=ie[Kr]||na,wt[`${Sr}end`]=Ot)}for(let Sr in wt)this._fireEvent(Sr,wt[Sr]);let $t=Ni(this._eventsInProgress),Tr=(Me||ze)&&!$t;if(Tr&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;let Sr=this._map._getTransformForUpdate();Sr.recalculateZoom(this._map.terrain),this._map._applyUpdatedTransform(Sr)}if(Te&&Tr){this._updatingCamera=!0;let Sr=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 io extends t.E{constructor(I,ie){super(),this._renderFrameCallback=()=>{let Te=Math.min((i.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,lt,Er)),this._rotating&&(Me.bearing=t.y.number(ht,$t,Er)),this._pitching&&(Me.pitch=t.y.number(wt,Tr,Er)),this._padding&&(Me.interpolatePadding(Ot,Sr,Er),na=Me.centerPoint.add(Kr)),this.terrain&&!I.freezeElevation&&this._updateElevation(Er),Dt)Me.setLocationAtPoint(Dt,ur);else{let jr=Me.zoomScale(Me.zoom-ze),Qr=lt>ze?Math.min(2,bt):Math.max(.5,bt),ha=Math.pow(Qr,1-Er),Aa=Me.unproject(pt.add(Et.mult(Er*ha)).mult(jr));Me.setLocationAtPoint(Me.renderWorldCopies?Aa.wrap():Aa,na)}this._applyUpdatedTransform(Me),this._fireMoveEvents(ie)},Er=>{this.terrain&&I.freezeElevation&&this._finalizeElevation(),this._afterEase(ie,Er)},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&&i.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,Sr="padding"in I?I.padding:Me.padding,Kr=t.P.convert(I.offset),na=Me.centerPoint.add(Kr),qe=Me.pointLocation(na),{center:$e,zoom:lt}=Me.getConstrained(t.N.convert(I.center||qe),(Te=I.zoom)!==null&&Te!==void 0?Te:ze);this._normalizeCenter($e,Me);let pt=Me.zoomScale(lt-ze),Et=Me.project(qe),bt=Me.project($e).sub(Et),Dt=I.curve,ur=Math.max(Me.width,Me.height),yr=ur/pt,Er=bt.mag();if("minZoom"in I){let on=t.ac(Math.min(I.minZoom,ze,lt),Me.minZoom,Me.maxZoom),An=ur/Me.zoomScale(on-ze);Dt=Math.sqrt(An/Er*2)}let jr=Dt*Dt;function Qr(on){let An=(yr*yr-ur*ur+(on?-1:1)*jr*jr*Er*Er)/(2*(on?yr:ur)*jr*Er);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+Dt*on)},Vi=function(on){return ur*((Aa(Da)*(ha(An=Da+Dt*on)/Aa(An))-ha(Da))/jr)/Er;var An},ji=(Qr(!0)-Da)/Dt;if(Math.abs(Er)<1e-6||!isFinite(ji)){if(Math.abs(ur-yr)<1e-6)return this.easeTo(I,ie);let on=yr0,ci=An=>Math.exp(on*Dt*An)}return I.duration="duration"in I?+I.duration:1e3*ji/("screenSpeed"in I?+I.screenSpeed/Dt:+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(Sr),this._prepareEase(ie,!1),this.terrain&&this._prepareElevation($e),this._ease(on=>{let An=on*ji,Kn=1/ci(An);Me.zoom=on===1?lt:ze+Me.scaleZoom(Kn),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,Sr,on),na=Me.centerPoint.add(Kr)),this.terrain&&!I.freezeElevation&&this._updateElevation(on);let Bn=on===1?$e:Me.unproject(Et.add(bt.mult(Vi(An))).mult(Kn));Me.setLocationAtPoint(Me.renderWorldCopies?Bn.wrap():Bn,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=i.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 eo={compact:!0,customAttribution:'MapLibre'};class co{constructor(I=eo){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=n.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=n.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=n.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(){n.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=n.create("div","maplibregl-ctrl");let ie=n.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(){n.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 yo=t.Y([{name:"a_pos3d",type:"Int16",components:3}]);class Qo 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 ks{constructor(I,ie,Te){this.painter=I,this.sourceCache=new Qo(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]],Sr=Tr&&this.sourceCache.getTileByID(Tr);if(!Sr)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()&&(ml(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{Oe.touchstart=Oe.dragStart,Oe.touchmoveWindow=Oe.dragMove,Oe.touchend=Oe.dragEnd},Un={showCompass:!0,showZoom:!0,visualizePitch:!1};class Ro{constructor(I,ie,Te=!1){this.mousedown=ht=>{this.startMouse(t.e({},ht,{ctrlKey:!0,preventDefault:()=>ht.preventDefault()}),n.mousePos(this.element,ht)),n.addEventListener(window,"mousemove",this.mousemove),n.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=ht=>{this.moveMouse(ht,n.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=n.touchPos(this.element,ht.targetTouches)[0],this.startTouch(ht,this._startPos),n.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),n.addEventListener(window,"touchend",this.touchend))},this.touchmove=ht=>{ht.targetTouches.length!==1?this.reset():(this._lastPos=n.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=nu({clickTolerance:Me,enable:!0}),this.touchRotate=(({enable:ht,clickTolerance:wt,bearingDegreesPerPixelMoved:Ot=.8})=>{let $t=new Jc;return new Hu({clickTolerance:wt,move:(Tr,Sr)=>({bearingDelta:(Sr.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 Jc;return new Hu({clickTolerance:wt,move:(Tr,Sr)=>({pitchDelta:(Sr.y-Tr.y)*Ot}),moveStateManager:$t,enable:ht,assignEvents:ll})})({clickTolerance:ze,enable:!0})),n.addEventListener(ie,"mousedown",this.mousedown),n.addEventListener(ie,"touchstart",this.touchstart,{passive:!1}),n.addEventListener(ie,"touchcancel",this.reset)}startMouse(I,ie){this.mouseRotate.dragStart(I,ie),this.mousePitch&&this.mousePitch.dragStart(I,ie),n.disableDrag()}startTouch(I,ie){this.touchRotate.dragStart(I,ie),this.touchPitch&&this.touchPitch.dragStart(I,ie),n.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;n.removeEventListener(I,"mousedown",this.mousedown),n.removeEventListener(I,"touchstart",this.touchstart,{passive:!1}),n.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),n.removeEventListener(window,"touchend",this.touchend),n.removeEventListener(I,"touchcancel",this.reset),this.offTemp()}offTemp(){n.enableDrag(),n.removeEventListener(window,"mousemove",this.mousemove),n.removeEventListener(window,"mouseup",this.mouseup),n.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),n.removeEventListener(window,"touchend",this.touchend)}}let Js;function Fs(Oe,I,ie){let Te=new t.N(Oe.lng,Oe.lat);if(Oe=new t.N(Oe.lng,Oe.lat),I){let Me=new t.N(Oe.lng-360,Oe.lat),ze=new t.N(Oe.lng+360,Oe.lat),ht=ie.locationPoint(Oe).distSqr(I);ie.locationPoint(Me).distSqr(I)180;){let Me=ie.locationPoint(Oe);if(Me.x>=0&&Me.y>=0&&Me.x<=ie.width&&Me.y<=ie.height)break;Oe.lng>ie.center.lng?Oe.lng-=360:Oe.lng+=360}return Oe.lng!==Te.lng&&ie.locationPoint(Oe).y>ie.height/2-ie.getHorizon()?Oe:Te}let cu={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(Oe,I,ie){let Te=Oe.classList;for(let Me in cu)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?Fs(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()),n.setTransform(this._element,`${cu[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${ht} ${ze}`),i.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=n.create("div");let ie=n.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=n.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=n.createNS("http://www.w3.org/2000/svg","g");ht.setAttributeNS(null,"fill-rule","nonzero");let wt=n.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=n.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=n.createNS("http://www.w3.org/2000/svg","g");$t.setAttributeNS(null,"fill",this._color);let Tr=n.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 Sr=n.createNS("http://www.w3.org/2000/svg","g");Sr.setAttributeNS(null,"opacity","0.25"),Sr.setAttributeNS(null,"fill","#000000");let Kr=n.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"),Sr.appendChild(Kr);let na=n.createNS("http://www.w3.org/2000/svg","g");na.setAttributeNS(null,"transform","translate(6.0, 7.0)"),na.setAttributeNS(null,"fill","#FFFFFF");let qe=n.createNS("http://www.w3.org/2000/svg","g");qe.setAttributeNS(null,"transform","translate(8.0, 8.0)");let $e=n.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 lt=n.createNS("http://www.w3.org/2000/svg","circle");lt.setAttributeNS(null,"fill","#FFFFFF"),lt.setAttributeNS(null,"cx","5.5"),lt.setAttributeNS(null,"cy","5.5"),lt.setAttributeNS(null,"r","5.4999962"),qe.appendChild($e),qe.appendChild(lt),ht.appendChild(wt),ht.appendChild($t),ht.appendChild(Sr),ht.appendChild(na),ht.appendChild(qe),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),n.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(Oe,I,ie){let Te=ie&&ie.maxWidth||100,Me=Oe._container.clientHeight/2,ze=Oe.unproject([0,Me]),ht=Oe.unproject([Te,Me]),wt=ze.distanceTo(ht);if(ie&&ie.unit==="imperial"){let Ot=3.2808*wt;Ot>5280?fo(I,Te,Ot/5280,Oe._getUIString("ScaleControl.Miles")):fo(I,Te,Ot,Oe._getUIString("ScaleControl.Feet"))}else ie&&ie.unit==="nautical"?fo(I,Te,wt/1852,Oe._getUIString("ScaleControl.NauticalMiles")):wt>=1e3?fo(I,Te,wt/1e3,Oe._getUIString("ScaleControl.Kilometers")):fo(I,Te,wt,Oe._getUIString("ScaleControl.Meters"))}function fo(Oe,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);Oe.style.width=I*(Me/ie)+"px",Oe.innerHTML=`${Me} ${Te}`}let Fo={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(Oe){if(Oe){if(typeof Oe=="number"){let I=Math.round(Math.abs(Oe)/Math.SQRT2);return{center:new t.P(0,0),top:new t.P(0,Oe),"top-left":new t.P(I,I),"top-right":new t.P(-I,I),bottom:new t.P(0,-Oe),"bottom-left":new t.P(I,-I),"bottom-right":new t.P(-I,-I),left:new t.P(Oe,0),right:new t.P(-Oe,0)}}if(Oe instanceof t.P||Array.isArray(Oe)){let I=t.P.convert(Oe);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(Oe.center||[0,0]),top:t.P.convert(Oe.top||[0,0]),"top-left":t.P.convert(Oe["top-left"]||[0,0]),"top-right":t.P.convert(Oe["top-right"]||[0,0]),bottom:t.P.convert(Oe.bottom||[0,0]),"bottom-left":t.P.convert(Oe["bottom-left"]||[0,0]),"bottom-right":t.P.convert(Oe["bottom-right"]||[0,0]),left:t.P.convert(Oe.left||[0,0]),right:t.P.convert(Oe.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(Oe={}){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,Oe&&Oe.container&&(Oe.container instanceof HTMLElement?this._container=Oe.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(Oe){return this._map=Oe,this._container||(this._container=this._map.getContainer()),this._controlContainer=n.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){n.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){let Oe=this._fullscreenButton=n.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);n.create("span","maplibregl-ctrl-icon",Oe).setAttribute("aria-hidden","true"),Oe.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){let Oe=this._getTitle();this._fullscreenButton.setAttribute("aria-label",Oe),this._fullscreenButton.title=Oe}_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=Pe,e.GeolocateControl=class extends t.E{constructor(Oe){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=te.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=n.create("button","maplibregl-ctrl-geolocate",this._container),n.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=n.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new Zu({element:this._dotElement}),this._circleElement=n.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,Oe)}onAdd(Oe){return this._map=Oe,this._container=n.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(),n.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,bu=0,Rc=!1}_isOutOfMapMaxBounds(Oe){let I=this._map.getMaxBounds(),ie=Oe.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 Oe=this._map.getBounds(),I=Oe.getSouthEast(),ie=Oe.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 Oe;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),bu++,bu>1?(Oe={maximumAge:6e5,timeout:0},Rc=!0):(Oe=this.options.positionOptions,Rc=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,Oe)}}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=xr,e.LngLatBounds=te,e.LogoControl=Tn,e.Map=class extends io{constructor(Oe){t.bf.mark(t.bg.create);let I=Object.assign(Object.assign({},yl),Oe);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 Ml(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({},Ss),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 x(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 Qn(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(Oe,I){if(I===void 0&&(I=Oe.getDefaultPosition?Oe.getDefaultPosition():"top-right"),!Oe||!Oe.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=Oe.onAdd(this);this._controls.push(Oe);let Te=this._controlPositions[I];return I.indexOf("bottom")!==-1?Te.insertBefore(ie,Te.firstChild):Te.appendChild(ie),this}removeControl(Oe){if(!Oe||!Oe.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(Oe);return I>-1&&this._controls.splice(I,1),Oe.onRemove(this),this}hasControl(Oe){return this._controls.indexOf(Oe)>-1}calculateCameraOptionsFromTo(Oe,I,ie,Te){return Te==null&&this.terrain&&(Te=this.terrain.getElevationForLngLatZoom(ie,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(Oe,I,ie,Te)}resize(Oe){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",Oe)).fire(new t.k("move",Oe))),this.fire(new t.k("resize",Oe)),ht&&this.fire(new t.k("moveend",Oe)),this}_getClampedPixelRatio(Oe,I){let{0:ie,1:Te}=this._maxCanvasSize,Me=this.getPixelRatio(),ze=Oe*Me,ht=I*Me;return Math.min(ze>ie?ie/ze:1,ht>Te?Te/ht:1)*Me}getPixelRatio(){var Oe;return(Oe=this._overridePixelRatio)!==null&&Oe!==void 0?Oe:devicePixelRatio}setPixelRatio(Oe){this._overridePixelRatio=Oe,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(Oe){return this.transform.setMaxBounds(te.convert(Oe)),this._update()}setMinZoom(Oe){if((Oe=Oe??-2)>=-2&&Oe<=this.transform.maxZoom)return this.transform.minZoom=Oe,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=Oe,this._update(),this.getZoom()>Oe&&this.setZoom(Oe),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(Oe){if((Oe=Oe??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(Oe>=0&&Oe<=this.transform.maxPitch)return this.transform.minPitch=Oe,this._update(),this.getPitch()85)throw new Error("maxPitch must be less than or equal to 85");if(Oe>=this.transform.minPitch)return this.transform.maxPitch=Oe,this._update(),this.getPitch()>Oe&&this.setPitch(Oe),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(Oe){return this.transform.renderWorldCopies=Oe,this._update()}project(Oe){return this.transform.locationPoint(t.N.convert(Oe),this.style&&this.terrain)}unproject(Oe){return this.transform.pointLocation(t.P.convert(Oe),this.terrain)}isMoving(){var Oe;return this._moving||((Oe=this.handlers)===null||Oe===void 0?void 0:Oe.isMoving())}isZooming(){var Oe;return this._zooming||((Oe=this.handlers)===null||Oe===void 0?void 0:Oe.isZooming())}isRotating(){var Oe;return this._rotating||((Oe=this.handlers)===null||Oe===void 0?void 0:Oe.isRotating())}_createDelegatedListener(Oe,I,ie){if(Oe==="mouseenter"||Oe==="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 iu(Oe,this,ze.originalEvent,{features:wt}))):Te=!1},mouseout:()=>{Te=!1}}}}if(Oe==="mouseleave"||Oe==="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 iu(Oe,this,ht.originalEvent)))},mouseout:ht=>{Te&&(Te=!1,ie.call(this,new iu(Oe,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:{[Oe]:Te}}}}_saveDelegatedListener(Oe,I){this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[Oe]=this._delegatedListeners[Oe]||[],this._delegatedListeners[Oe].push(I)}_removeDelegatedListener(Oe,I,ie){if(!this._delegatedListeners||!this._delegatedListeners[Oe])return;let Te=this._delegatedListeners[Oe];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(Oe,I,ie){if(ie===void 0)return super.on(Oe,I);let Te=this._createDelegatedListener(Oe,typeof I=="string"?[I]:I,ie);this._saveDelegatedListener(Oe,Te);for(let Me in Te.delegates)this.on(Me,Te.delegates[Me]);return this}once(Oe,I,ie){if(ie===void 0)return super.once(Oe,I);let Te=typeof I=="string"?[I]:I,Me=this._createDelegatedListener(Oe,Te,ie);for(let ze in Me.delegates){let ht=Me.delegates[ze];Me.delegates[ze]=(...wt)=>{this._removeDelegatedListener(Oe,Te,ie),ht(...wt)}}this._saveDelegatedListener(Oe,Me);for(let ze in Me.delegates)this.once(ze,Me.delegates[ze]);return this}off(Oe,I,ie){return ie===void 0?super.off(Oe,I):(this._removeDelegatedListener(Oe,typeof I=="string"?[I]:I,ie),this)}queryRenderedFeatures(Oe,I){if(!this.style)return[];let ie,Te=Oe instanceof t.P||Array.isArray(Oe),Me=Te?Oe:[[0,0],[this.transform.width,this.transform.height]];if(I=I||(Te?{}:Oe)||{},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(Oe,I){return this.style.querySourceFeatures(Oe,I)}setStyle(Oe,I){return(I=t.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},I)).diff!==!1&&I.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&Oe?(this._diffStyle(Oe,I),this):(this._localIdeographFontFamily=I.localIdeographFontFamily,this._updateStyle(Oe,I))}setTransformRequest(Oe){return this._requestManager.setTransformRequest(Oe),this}_getUIString(Oe){let I=this._locale[Oe];if(I==null)throw new Error(`Missing UI string '${Oe}'`);return I}_updateStyle(Oe,I){if(I.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",()=>this._updateStyle(Oe,I));let ie=this.style&&I.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!Oe)),Oe?(this.style=new Rr(this,I||{}),this.style.setEventedParent(this,{style:this.style}),typeof Oe=="string"?this.style.loadURL(Oe,I,ie):this.style.loadJSON(Oe,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(Oe,I){if(typeof Oe=="string"){let ie=this._requestManager.transformRequest(Oe,"Style");t.h(ie,new AbortController).then(Te=>{this._updateDiff(Te.data,I)}).catch(Te=>{Te&&this.fire(new t.j(Te))})}else typeof Oe=="object"&&this._updateDiff(Oe,I)}_updateDiff(Oe,I){try{this.style.setState(Oe,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(Oe,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(Oe,I){return this._lazyInitEmptyStyle(),this.style.addSource(Oe,I),this._update(!0)}isSourceLoaded(Oe){let I=this.style&&this.style.sourceCaches[Oe];if(I!==void 0)return I.loaded();this.fire(new t.j(new Error(`There is no source with ID '${Oe}'`)))}setTerrain(Oe){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),Oe){let I=this.style.sourceCaches[Oe.source];if(!I)throw new Error(`cannot load terrain, because there exists no source with ID: ${Oe.source}`);this.terrain===null&&I.reload();for(let ie in this.style._layers){let Te=this.style._layers[ie];Te.type==="hillshade"&&Te.source===Oe.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 ks(this.painter,I,Oe),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!==Oe.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:Oe})),this}getTerrain(){var Oe,I;return(I=(Oe=this.terrain)===null||Oe===void 0?void 0:Oe.options)!==null&&I!==void 0?I:null}areTilesLoaded(){let Oe=this.style&&this.style.sourceCaches;for(let I in Oe){let ie=Oe[I]._tiles;for(let Te in ie){let Me=ie[Te];if(Me.state!=="loaded"&&Me.state!=="errored")return!1}}return!0}removeSource(Oe){return this.style.removeSource(Oe),this._update(!0)}getSource(Oe){return this.style.getSource(Oe)}addImage(Oe,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:Sr,data:Kr}=I,na=I;return this.style.addImage(Oe,{data:new t.R({width:Tr,height:Sr},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,Oe),this}}{let{width:Tr,height:Sr,data:Kr}=i.getImageData(I);this.style.addImage(Oe,{data:new t.R({width:Tr,height:Sr},Kr),pixelRatio:Te,stretchX:ze,stretchY:ht,content:wt,textFitWidth:Ot,textFitHeight:$t,sdf:Me,version:0})}}updateImage(Oe,I){let ie=this.style.getImage(Oe);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)?i.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(Oe,ie),this}getImage(Oe){return this.style.getImage(Oe)}hasImage(Oe){return Oe?!!this.style.getImage(Oe):(this.fire(new t.j(new Error("Missing required image id"))),!1)}removeImage(Oe){this.style.removeImage(Oe)}loadImage(Oe){return l.getImage(this._requestManager.transformRequest(Oe,"Image"),new AbortController)}listImages(){return this.style.listImages()}addLayer(Oe,I){return this._lazyInitEmptyStyle(),this.style.addLayer(Oe,I),this._update(!0)}moveLayer(Oe,I){return this.style.moveLayer(Oe,I),this._update(!0)}removeLayer(Oe){return this.style.removeLayer(Oe),this._update(!0)}getLayer(Oe){return this.style.getLayer(Oe)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(Oe,I,ie){return this.style.setLayerZoomRange(Oe,I,ie),this._update(!0)}setFilter(Oe,I,ie={}){return this.style.setFilter(Oe,I,ie),this._update(!0)}getFilter(Oe){return this.style.getFilter(Oe)}setPaintProperty(Oe,I,ie,Te={}){return this.style.setPaintProperty(Oe,I,ie,Te),this._update(!0)}getPaintProperty(Oe,I){return this.style.getPaintProperty(Oe,I)}setLayoutProperty(Oe,I,ie,Te={}){return this.style.setLayoutProperty(Oe,I,ie,Te),this._update(!0)}getLayoutProperty(Oe,I){return this.style.getLayoutProperty(Oe,I)}setGlyphs(Oe,I={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(Oe,I),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(Oe,I,ie={}){return this._lazyInitEmptyStyle(),this.style.addSprite(Oe,I,ie,Te=>{Te||this._update(!0)}),this}removeSprite(Oe){return this._lazyInitEmptyStyle(),this.style.removeSprite(Oe),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(Oe,I={}){return this._lazyInitEmptyStyle(),this.style.setSprite(Oe,I,ie=>{ie||this._update(!0)}),this}setLight(Oe,I={}){return this._lazyInitEmptyStyle(),this.style.setLight(Oe,I),this._update(!0)}getLight(){return this.style.getLight()}setSky(Oe){return this._lazyInitEmptyStyle(),this.style.setSky(Oe),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(Oe,I){return this.style.setFeatureState(Oe,I),this._update()}removeFeatureState(Oe,I){return this.style.removeFeatureState(Oe,I),this._update()}getFeatureState(Oe){return this.style.getFeatureState(Oe)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let Oe=0,I=0;return this._container&&(Oe=this._container.clientWidth||400,I=this._container.clientHeight||300),[Oe,I]}_setupContainer(){let Oe=this._container;Oe.classList.add("maplibregl-map");let I=this._canvasContainer=n.create("div","maplibregl-canvas-container",Oe);this._interactive&&I.classList.add("maplibregl-interactive"),this._canvas=n.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=n.create("div","maplibregl-control-container",Oe),ze=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(ht=>{ze[ht]=n.create("div",`maplibregl-ctrl-${ht} `,Me)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(Oe,I,ie){this._canvas.width=Math.floor(ie*Oe),this._canvas.height=Math.floor(ie*I),this._canvas.style.width=`${Oe}px`,this._canvas.style.height=`${I}px`}_setupPainter(){let Oe={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:Oe},Te&&(I.statusMessage=Te.statusMessage,I.type=Te.type)},{once:!0});let ie=this._canvas.getContext("webgl2",Oe)||this._canvas.getContext("webgl",Oe);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(Oe){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||Oe,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(Oe){return this._update(),this._renderTaskQueue.add(Oe)}_cancelRenderFrame(Oe){this._renderTaskQueue.remove(Oe)}_render(Oe){let I=this._idleTriggered?this._fadeDuration:0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(Oe),this._removed)return;let ie=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;let Me=this.transform.zoom,ze=i.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 Oe;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),(Oe=this._resizeObserver)===null||Oe===void 0||Oe.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),n.remove(this._canvasContainer),n.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,i.frameAsync(this._frameRequest).then(Oe=>{t.bf.frame(Oe),this._frameRequest=null,this._render(Oe)}).catch(()=>{}))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(Oe){this._showTileBoundaries!==Oe&&(this._showTileBoundaries=Oe,this._update())}get showPadding(){return!!this._showPadding}set showPadding(Oe){this._showPadding!==Oe&&(this._showPadding=Oe,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(Oe){this._showCollisionBoxes!==Oe&&(this._showCollisionBoxes=Oe,Oe?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(Oe){this._showOverdrawInspector!==Oe&&(this._showOverdrawInspector=Oe,this._update())}get repaint(){return!!this._repaint}set repaint(Oe){this._repaint!==Oe&&(this._repaint=Oe,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(Oe){this._vertices=Oe,this._update()}get version(){return Fl}getCameraTargetElevation(){return this.transform.elevation}},e.MapMouseEvent=iu,e.MapTouchEvent=Kc,e.MapWheelEvent=hh,e.Marker=Zu,e.NavigationControl=class{constructor(Oe){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({},Un,Oe),this._container=n.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})),n.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})),n.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=n.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(Oe){return this._map=Oe,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 Ro(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){n.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(Oe,I){let ie=n.create("button",Oe,this._container);return ie.type="button",ie.addEventListener("click",I),ie}},e.Popup=class extends t.E{constructor(Oe){super(),this.remove=()=>(this._content&&n.remove(this._content),this._container&&(n.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=n.create("div","maplibregl-popup",this._map.getContainer()),this._tip=n.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?Fs(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()),n.setTransform(this._container,`${cu[Me]} translate(${ht.x}px,${ht.y}px)`),Iu(this._container,Me,"popup")},this._onClose=()=>{this.remove()},this.options=t.e(Object.create(Fo),Oe)}addTo(Oe){return this._map&&this.remove(),this._map=Oe,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(Oe){return this._lngLat=t.N.convert(Oe),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(Oe){return this.setDOMContent(document.createTextNode(Oe))}setHTML(Oe){let I=document.createDocumentFragment(),ie=document.createElement("body"),Te;for(ie.innerHTML=Oe;Te=ie.firstChild,Te;)I.appendChild(Te);return this.setDOMContent(I)}getMaxWidth(){var Oe;return(Oe=this._container)===null||Oe===void 0?void 0:Oe.style.maxWidth}setMaxWidth(Oe){return this.options.maxWidth=Oe,this._update(),this}setDOMContent(Oe){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=n.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(Oe),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(Oe){return this._container&&this._container.classList.add(Oe),this}removeClassName(Oe){return this._container&&this._container.classList.remove(Oe),this}setOffset(Oe){return this.options.offset=Oe,this._update(),this}toggleClassName(Oe){if(this._container)return this._container.classList.toggle(Oe)}setSubpixelPositioning(Oe){this.options.subpixelPositioning=Oe}_createCloseButton(){this.options.closeButton&&(this._closeButton=n.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 Oe=this._container.querySelector(Dc);Oe&&Oe.focus()}},e.RasterDEMTileSource=Re,e.RasterTileSource=Se,e.ScaleControl=class{constructor(Oe){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),Oe)}getDefaultPosition(){return"bottom-left"}onAdd(Oe){return this._map=Oe,this._container=n.create("div","maplibregl-ctrl maplibregl-ctrl-scale",Oe.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){n.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}},e.ScrollZoomHandler=ka,e.Style=Rr,e.TerrainControl=class{constructor(Oe){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=Oe}onAdd(Oe){return this._map=Oe,this._container=n.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=n.create("button","maplibregl-ctrl-terrain",this._container),n.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(){n.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},e.TwoFingersTouchPitchHandler=Pc,e.TwoFingersTouchRotateHandler=$c,e.TwoFingersTouchZoomHandler=xu,e.TwoFingersTouchZoomRotateHandler=Pi,e.VectorTileSource=we,e.VideoSource=nt,e.addSourceType=(Oe,I)=>t._(void 0,void 0,void 0,function*(){if(he(Oe))throw new Error(`A source type called "${Oe}" already exists.`);((ie,Te)=>{Ve[ie]=Te})(Oe,I)}),e.clearPrewarmedResources=function(){let Oe=de;Oe&&(Oe.isPreloaded()&&Oe.numActive()===1?(Oe.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 Ze().getRTLTextPluginStatus()},e.getVersion=function(){return Yu},e.getWorkerCount=function(){return ue.workerCount},e.getWorkerUrl=function(){return t.a.WORKER_URL},e.importScriptInWorkers=function(Oe){return V().broadcast("IS",Oe)},e.prewarm=function(){X().acquire($)},e.setMaxParallelImageRequests=function(Oe){t.a.MAX_PARALLEL_IMAGE_REQUESTS=Oe},e.setRTLTextPlugin=function(Oe,I){return Ze().setRTLTextPlugin(Oe,I)},e.setWorkerCount=function(Oe){ue.workerCount=Oe},e.setWorkerUrl=function(Oe){t.a.WORKER_URL=Oe}});var M=v;return M})}}),GV=He({"src/plots/map/layers.js"(Z,q){"use strict";var v=sa(),_=su().sanitizeHTML,S=D6(),M=b0();function e(i,n){this.subplot=i,this.uid=i.uid+"-"+n,this.index=n,this.idSource="source-"+this.uid,this.idLayer=M.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(n){this.visible?this.needsNewImage(n)?this.updateImage(n):this.needsNewSource(n)?(this.removeLayer(),this.updateSource(n),this.updateLayer(n)):this.needsNewLayer(n)?this.updateLayer(n):this.updateStyle(n):(this.updateSource(n),this.updateLayer(n)),this.visible=r(n)},t.needsNewImage=function(i){var n=this.subplot.map;return n.getSource(this.idSource)&&this.sourceType==="image"&&i.sourcetype==="image"&&(this.source!==i.source||JSON.stringify(this.coordinates)!==JSON.stringify(i.coordinates))},t.needsNewSource=function(i){return this.sourceType!==i.sourcetype||JSON.stringify(this.source)!==JSON.stringify(i.source)||this.layerType!==i.type},t.needsNewLayer=function(i){return this.layerType!==i.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},t.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]},t.updateImage=function(i){var n=this.subplot.map;n.getSource(this.idSource).updateImage({url:i.source,coordinates:i.coordinates});var s=this.findFollowingMapLayerId(this.lookupBelow());s!==null&&this.subplot.map.moveLayer(this.idLayer,s)},t.updateSource=function(i){var n=this.subplot.map;if(n.getSource(this.idSource)&&n.removeSource(this.idSource),this.sourceType=i.sourcetype,this.source=i.source,!!r(i)){var s=a(i);n.addSource(this.idSource,s)}},t.findFollowingMapLayerId=function(i){if(i==="traces")for(var n=this.subplot.getMapLayers(),s=0;s0){for(var s=0;s0}function o(i){var n={},s={};switch(i.type){case"circle":v.extendFlat(s,{"circle-radius":i.circle.radius,"circle-color":i.color,"circle-opacity":i.opacity});break;case"line":v.extendFlat(s,{"line-width":i.line.width,"line-color":i.color,"line-opacity":i.opacity,"line-dasharray":i.line.dash});break;case"fill":v.extendFlat(s,{"fill-color":i.color,"fill-outline-color":i.fill.outlinecolor,"fill-opacity":i.opacity});break;case"symbol":var h=i.symbol,f=S(h.textposition,h.iconsize);v.extendFlat(n,{"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}),v.extendFlat(s,{"icon-color":i.color,"text-color":h.textfont.color,"text-opacity":i.opacity});break;case"raster":v.extendFlat(s,{"raster-fade-duration":0,"raster-opacity":i.opacity});break}return{layout:n,paint:s}}function a(i){var n=i.sourcetype,s=i.source,h={type:n},f;return n==="geojson"?f="data":n==="vector"?f=typeof s=="string"?"url":"tiles":n==="raster"?(f="tiles",h.tileSize=256):n==="image"&&(f="url",h.coordinates=i.coordinates),h[f]=s,i.sourceattribution&&(h.attribution=_(i.sourceattribution)),h}q.exports=function(n,s,h){var f=new e(n,s);return f.update(h),f}}}),HV=He({"src/plots/map/map.js"(Z,q){"use strict";var v=VV(),_=sa(),S=Ev(),M=so(),e=Wo(),t=Ap(),r=Hc(),o=Jd(),a=o.drawMode,i=o.selectMode,n=Af().prepSelect,s=Af().clearOutline,h=Af().clearSelectionsCache,f=Af().selectOnClick,m=b0(),c=GV();function T(p,b){this.id=b,this.gd=p;var d=p._fullLayout,u=p._context;this.container=d._glcontainer.node(),this.isStatic=u.staticPlot,this.uid=d._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(d),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(p,b,d){var u=this,g;u.map?g=new Promise(function(y,D){u.updateMap(p,b,y,D)}):g=new Promise(function(y,D){u.createMap(p,b,y,D)}),d.push(g)},l.createMap=function(p,b,d,u){var g=this,y=b[g.id],D=g.styleObj=w(y.style),P=y.bounds,z=P?[[P.west,P.south],[P.east,P.north]]:null,F=g.map=new v.Map({container:g.div,style:D.style,center:E(y.center),zoom:y.zoom,bearing:y.bearing,pitch:y.pitch,maxBounds:z,interactive:!g.isStatic,preserveDrawingBuffer:g.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1}).addControl(new v.AttributionControl({compact:!0})),N={};F.on("styleimagemissing",function(L){var U=L.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(L){return L=L.replace("https://fonts.openmaptiles.org/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold"),L=L.replace("https://tiles.basemaps.cartocdn.com/fonts/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold"),L=L.replace("https://fonts.openmaptiles.org/Open Sans Regular,Arial Unicode MS Regular","https://fonts.openmaptiles.org/Klokantech Noto Sans Regular"),{url:L}}),F._canvas.style.left="0px",F._canvas.style.top="0px",g.rejectOnError(u),g.isStatic||g.initFx(p,b);var O=[];O.push(new Promise(function(L){F.once("load",L)})),O=O.concat(S.fetchTraceGeoData(p)),Promise.all(O).then(function(){g.fillBelowLookup(p,b),g.updateData(p),g.updateLayout(b),g.resolveOnRender(d)}).catch(u)},l.updateMap=function(p,b,d,u){var g=this,y=g.map,D=b[this.id];g.rejectOnError(u);var P=[],z=w(D.style);JSON.stringify(g.styleObj)!==JSON.stringify(z)&&(g.styleObj=z,y.setStyle(z.style),g.traceHash={},P.push(new Promise(function(F){y.once("styledata",F)}))),P=P.concat(S.fetchTraceGeoData(p)),Promise.all(P).then(function(){g.fillBelowLookup(p,b),g.updateData(p),g.updateLayout(b),g.resolveOnRender(d)}).catch(u)},l.fillBelowLookup=function(p,b){var d=b[this.id],u=d.layers,g,y,D=this.belowLookup={},P=!1;for(g=0;g1)for(g=0;g-1&&f(z.originalEvent,u,[d.xaxis],[d.yaxis],d.id,P),F.indexOf("event")>-1&&r.click(u,z.originalEvent)}}},l.updateFx=function(p){var b=this,d=b.map,u=b.gd;if(b.isStatic)return;function g(z){var F=b.map.unproject(z);return[F.lng,F.lat]}var y=p.dragmode,D;D=function(z,F){if(F.isRect){var N=z.range={};N[b.id]=[g([F.xmin,F.ymin]),g([F.xmax,F.ymax])]}else{var O=z.lassoPoints={};O[b.id]=F.map(g)}};var P=b.dragOptions;b.dragOptions=_.extendDeep(P||{},{dragmode:p.dragmode,element:b.div,gd:u,plotinfo:{id:b.id,domain:p[b.id].domain,xaxis:b.xaxis,yaxis:b.yaxis,fillRangeItems:D},xaxes:[b.xaxis],yaxes:[b.yaxis],subplot:b.id}),d.off("click",b.onClickInPanHandler),i(y)||a(y)?(d.dragPan.disable(),d.on("zoomstart",b.clearOutline),b.dragOptions.prepFn=function(z,F,N){n(z,F,N,b.dragOptions,y)},t.init(b.dragOptions)):(d.dragPan.enable(),d.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),d.on("click",b.onClickInPanHandler))},l.updateFramework=function(p){var b=p[this.id].domain,d=p._size,u=this.div.style;u.width=d.w*(b.x[1]-b.x[0])+"px",u.height=d.h*(b.y[1]-b.y[0])+"px",u.left=d.l+b.x[0]*d.w+"px",u.top=d.t+(1-b.y[1])*d.h+"px",this.xaxis._offset=d.l+b.x[0]*d.w,this.xaxis._length=d.w*(b.x[1]-b.x[0]),this.yaxis._offset=d.t+(1-b.y[1])*d.h,this.yaxis._length=d.h*(b.y[1]-b.y[0])},l.updateLayers=function(p){var b=p[this.id],d=b.layers,u=this.layerList,g;if(d.length!==u.length){for(g=0;gd/2){var u=A.split("|").join("
");p.text(u).attr("data-unformatted",u).call(r.convertToTspans,i),b=t.bBox(p.node())}p.attr("transform",v(-3,-b.height+8)),E.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 g=1;b.width+6>d&&(g=d/(b.width+6));var y=[h.l+h.w*c.x[1],h.t+h.h*(1-c.y[0])];E.attr("transform",v(y[0],y[1])+_(g))}},Z.updateFx=function(i){for(var n=i._fullLayout,s=n._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)},q.exports=function(r,o){var a=o[0].trace,i=new M(r,a.uid),n=i.sourceId,s=v(o),h=i.below=r.belowLookup["trace-"+a.uid];return r.map.addSource(n,{type:"geojson",data:s.geojson}),i._addLayers(s,h),o[0].trace._glTrace=i,i}}}),JV=He({"src/traces/choroplethmap/index.js"(Z,q){"use strict";q.exports={attributes:z6(),supplyDefaults:YV(),colorbar:o0(),calc:lT(),plot:KV(),hoverPoints:cT(),eventData:fT(),selectPoints:hT(),styleOnSelect:function(v,_){if(_){var S=_[0].trace;S._glTrace.updateOnSelect(_)}},getBelow:function(v,_){for(var S=_.getMapLayers(),M=S.length-2;M>=0;M--){var e=S[M].id;if(typeof e=="string"&&e.indexOf("water")===0){for(var t=M+1;t0?+c[f]:0),h.push({type:"Feature",geometry:{type:"Point",coordinates:w},properties:A})}}var p=M.extractOpts(a),b=p.reversescale?M.flipScale(p.colorscale):p.colorscale,d=b[0][1],u=S.opacity(d)<1?d:S.addOpacity(d,0),g=["interpolate",["linear"],["heatmap-density"],0,u];for(f=1;f=0;r--)e.removeLayer(t[r][1])},M.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)},q.exports=function(t,r){var o=r[0].trace,a=new S(t,o.uid),i=a.sourceId,n=v(r),s=a.below=t.belowLookup["trace-"+o.uid];return t.map.addSource(i,{type:"geojson",data:n.geojson}),a._addLayers(n,s),a}}}),aG=He({"src/traces/densitymap/hover.js"(Z,q){"use strict";var v=Wo(),_=kT().hoverPoints,S=kT().getExtraText;q.exports=function(e,t,r){var o=_(e,t,r);if(o){var a=o[0],i=a.cd,n=i[0].trace,s=i[a.index];if(delete a.color,"z"in s){var h=a.subplot.mockAxis;a.z=s.z,a.zLabel=v.tickText(h,h.c2l(s.z),"hover").text}return a.extraText=S(n,s,i[0].t.labels),[a]}}}}),iG=He({"src/traces/densitymap/event_data.js"(Z,q){"use strict";q.exports=function(_,S){return _.lon=S.lon,_.lat=S.lat,_.z=S.z,_}}}),nG=He({"src/traces/densitymap/index.js"(Z,q){"use strict";q.exports={attributes:O6(),supplyDefaults:QV(),colorbar:o0(),formatLabels:R6(),calc:eG(),plot:rG(),hoverPoints:aG(),eventData:iG(),getBelow:function(v,_){for(var S=_.getMapLayers(),M=0;M0;){l=w[w.length-1];var A=_[l];if(r[l]=0&&a[l].push(o[p])}r[l]=E}else{if(e[l]===M[l]){for(var b=[],d=[],u=0,E=x.length-1;E>=0;--E){var g=x[E];if(t[g]=!1,b.push(g),d.push(a[g]),u+=a[g].length,o[g]=s.length,g===l){x.length=E;break}}s.push(b);for(var y=new Array(u),E=0;Ep&&(p=n.source[x]),n.target[x]>p&&(p=n.target[x]);var b=p+1;a.node._count=b;var d,u=a.node.groups,g={};for(x=0;x0&&e(N,b)&&e(O,b)&&!(g.hasOwnProperty(N)&&g.hasOwnProperty(O)&&g[N]===g[O])){g.hasOwnProperty(O)&&(O=g[O]),g.hasOwnProperty(N)&&(N=g[N]),N=+N,O=+O,c[N]=c[O]=!0;var L="";n.label&&n.label[x]&&(L=n.label[x]);var U=null;L&&T.hasOwnProperty(L)&&(U=T[L]),s.push({pointNumber:x,label:L,color:h?n.color[x]:n.color,hovercolor:f?n.hovercolor[x]:n.hovercolor,customdata:m?n.customdata[x]:n.customdata,concentrationscale:U,source:N,target:O,value:+F}),z.source.push(N),z.target.push(O)}}var B=b+u.length,W=M(i.color),$=M(i.customdata),ue=[];for(x=0;xb-1,childrenNodes:[],pointNumber:x,label:ce,color:W?i.color[x]:i.color,customdata:$?i.customdata[x]:i.customdata})}var de=!1;return o(B,z.source,z.target)&&(de=!0),{circular:de,links:s,nodes:ue,groups:u,groupLookup:g}}function o(a,i,n){for(var s=_.init2dArray(a,0),h=0;h1})}q.exports=function(i,n){var s=r(n);return S({circular:s.circular,_nodes:s.nodes,_links:s.links,_groups:s.groups,_groupLookup:s.groupLookup})}}}),uG=He({"node_modules/d3-quadtree/dist/d3-quadtree.js"(Z,q){(function(v,_){typeof Z=="object"&&typeof q<"u"?_(Z):(v=v||self,_(v.d3=v.d3||{}))})(Z,function(v){"use strict";function _(b){var d=+this._x.call(null,b),u=+this._y.call(null,b);return S(this.cover(d,u),d,u,b)}function S(b,d,u,g){if(isNaN(d)||isNaN(u))return b;var y,D=b._root,P={data:g},z=b._x0,F=b._y0,N=b._x1,O=b._y1,L,U,B,W,$,ue,ce,de;if(!D)return b._root=P,b;for(;D.length;)if(($=d>=(L=(z+N)/2))?z=L:N=L,(ue=u>=(U=(F+O)/2))?F=U:O=U,y=D,!(D=D[ce=ue<<1|$]))return y[ce]=P,b;if(B=+b._x.call(null,D.data),W=+b._y.call(null,D.data),d===B&&u===W)return P.next=D,y?y[ce]=P:b._root=P,b;do y=y?y[ce]=new Array(4):b._root=new Array(4),($=d>=(L=(z+N)/2))?z=L:N=L,(ue=u>=(U=(F+O)/2))?F=U:O=U;while((ce=ue<<1|$)===(de=(W>=U)<<1|B>=L));return y[de]=D,y[ce]=P,b}function M(b){var d,u,g=b.length,y,D,P=new Array(g),z=new Array(g),F=1/0,N=1/0,O=-1/0,L=-1/0;for(u=0;uO&&(O=y),DL&&(L=D));if(F>O||N>L)return this;for(this.cover(F,N).cover(O,L),u=0;ub||b>=y||g>d||d>=D;)switch(N=(dO||(z=W.y0)>L||(F=W.x1)=ce)<<1|b>=ue)&&(W=U[U.length-1],U[U.length-1]=U[U.length-1-$],U[U.length-1-$]=W)}else{var de=b-+this._x.call(null,B.data),Y=d-+this._y.call(null,B.data),X=de*de+Y*Y;if(X=(U=(P+F)/2))?P=U:F=U,($=L>=(B=(z+N)/2))?z=B:N=B,d=u,!(u=u[ue=$<<1|W]))return this;if(!u.length)break;(d[ue+1&3]||d[ue+2&3]||d[ue+3&3])&&(g=d,ce=ue)}for(;u.data!==b;)if(y=u,!(u=u.next))return this;return(D=u.next)&&delete u.next,y?(D?y.next=D:delete y.next,this):d?(D?d[ue]=D:delete d[ue],(u=d[0]||d[1]||d[2]||d[3])&&u===(d[3]||d[2]||d[1]||d[0])&&!u.length&&(g?g[ce]=u:this._root=u),this):(this._root=D,this)}function n(b){for(var d=0,u=b.length;d=c.length)return l!=null&&p.sort(l),x!=null?x(p):p;for(var g=-1,y=p.length,D=c[b++],P,z,F=M(),N,O=d();++gc.length)return p;var d,u=T[b-1];return x!=null&&b>=c.length?d=p.entries():(d=[],p.each(function(g,y){d.push({key:y,values:E(g,b)})})),u!=null?d.sort(function(g,y){return u(g.key,y.key)}):d}return w={object:function(p){return A(p,0,t,r)},map:function(p){return A(p,0,o,a)},entries:function(p){return E(A(p,0,o,a),0)},key:function(p){return c.push(p),w},sortKeys:function(p){return T[c.length-1]=p,w},sortValues:function(p){return l=p,w},rollup:function(p){return x=p,w}}}function t(){return{}}function r(c,T,l){c[T]=l}function o(){return M()}function a(c,T,l){c.set(T,l)}function i(){}var n=M.prototype;i.prototype=s.prototype={constructor:i,has:n.has,add:function(c){return c+="",this[_+c]=c,this},remove:n.remove,clear:n.clear,values:n.keys,size:n.size,empty:n.empty,each:n.each};function s(c,T){var l=new i;if(c instanceof i)c.each(function(A){l.add(A)});else if(c){var x=-1,w=c.length;if(T==null)for(;++x=0&&(n=i.slice(s+1),i=i.slice(0,s)),i&&!a.hasOwnProperty(i))throw new Error("unknown type: "+i);return{type:i,name:n}})}M.prototype=S.prototype={constructor:M,on:function(o,a){var i=this._,n=e(o+"",i),s,h=-1,f=n.length;if(arguments.length<2){for(;++h0)for(var i=new Array(s),n=0,s,h;n=0&&b._call.call(null,d),b=b._next;--_}function l(){a=(o=n.now())+i,_=S=0;try{T()}finally{_=0,w(),a=0}}function x(){var b=n.now(),d=b-o;d>e&&(i-=d,o=b)}function w(){for(var b,d=t,u,g=1/0;d;)d._call?(g>d._time&&(g=d._time),b=d,d=d._next):(u=d._next,d._next=null,d=b?b._next=u:t=u);r=b,A(g)}function A(b){if(!_){S&&(S=clearTimeout(S));var d=b-a;d>24?(b<1/0&&(S=setTimeout(l,b-n.now()-i)),M&&(M=clearInterval(M))):(M||(o=n.now(),M=setInterval(x,e)),_=1,s(l))}}function E(b,d,u){var g=new m;return d=d==null?0:+d,g.restart(function(y){g.stop(),b(y+d)},d,u),g}function p(b,d,u){var g=new m,y=d;return d==null?(g.restart(b,d,u),g):(d=+d,u=u==null?h():+u,g.restart(function D(P){P+=y,g.restart(D,y+=d,u),b(P)},d,u),g)}v.interval=p,v.now=h,v.timeout=E,v.timer=c,v.timerFlush=T,Object.defineProperty(v,"__esModule",{value:!0})})}}),hG=He({"node_modules/d3-force/dist/d3-force.js"(Z,q){(function(v,_){typeof Z=="object"&&typeof q<"u"?_(Z,uG(),LT(),cG(),fG()):_(v.d3=v.d3||{},v.d3,v.d3,v.d3,v.d3)})(Z,function(v,_,S,M,e){"use strict";function t(b,d){var u;b==null&&(b=0),d==null&&(d=0);function g(){var y,D=u.length,P,z=0,F=0;for(y=0;yL.index){var ee=U-le.x-le.vx,te=B-le.y-le.vy,pe=ee*ee+te*te;peU+j||QB+j||VF.r&&(F.r=F[N].r)}function z(){if(d){var F,N=d.length,O;for(u=new Array(N),F=0;F1?($==null?z.remove(W):z.set(W,B($)),d):z.get(W)},find:function(W,$,ue){var ce=0,de=b.length,Y,X,Q,V,le;for(ue==null?ue=1/0:ue*=ue,ce=0;ce1?(N.on(W,$),d):N.on(W)}}}function w(){var b,d,u,g=r(-30),y,D=1,P=1/0,z=.81;function F(U){var B,W=b.length,$=_.quadtree(b,m,c).visitAfter(O);for(u=U,B=0;B=P)return;(U.data!==d||U.next)&&(ue===0&&(ue=o(),Y+=ue*ue),ce===0&&(ce=o(),Y+=ce*ce),YM)if(!(Math.abs(l*m-c*T)>M)||!s)this._+="L"+(this._x1=o)+","+(this._y1=a);else{var w=i-h,A=n-f,E=m*m+c*c,p=w*w+A*A,b=Math.sqrt(E),d=Math.sqrt(x),u=s*Math.tan((_-Math.acos((E+x-p)/(2*b*d)))/2),g=u/d,y=u/b;Math.abs(g-1)>M&&(this._+="L"+(o+g*T)+","+(a+g*l)),this._+="A"+s+","+s+",0,0,"+ +(l*w>T*A)+","+(this._x1=o+y*m)+","+(this._y1=a+y*c)}},arc:function(o,a,i,n,s,h){o=+o,a=+a,i=+i,h=!!h;var f=i*Math.cos(n),m=i*Math.sin(n),c=o+f,T=a+m,l=1^h,x=h?n-s:s-n;if(i<0)throw new Error("negative radius: "+i);this._x1===null?this._+="M"+c+","+T:(Math.abs(this._x1-c)>M||Math.abs(this._y1-T)>M)&&(this._+="L"+c+","+T),i&&(x<0&&(x=x%S+S),x>e?this._+="A"+i+","+i+",0,1,"+l+","+(o-f)+","+(a-m)+"A"+i+","+i+",0,1,"+l+","+(this._x1=c)+","+(this._y1=T):x>M&&(this._+="A"+i+","+i+",0,"+ +(x>=_)+","+l+","+(this._x1=o+i*Math.cos(s))+","+(this._y1=a+i*Math.sin(s))))},rect:function(o,a,i,n){this._+="M"+(this._x0=this._x1=+o)+","+(this._y0=this._y1=+a)+"h"+ +i+"v"+ +n+"h"+-i+"Z"},toString:function(){return this._}},v.path=r,Object.defineProperty(v,"__esModule",{value:!0})})}}),U6=He({"node_modules/d3-shape/dist/d3-shape.js"(Z,q){(function(v,_){typeof Z=="object"&&typeof q<"u"?_(Z,pG()):(v=v||self,_(v.d3=v.d3||{},v.d3))})(Z,function(v,_){"use strict";function S(gt){return function(){return gt}}var M=Math.abs,e=Math.atan2,t=Math.cos,r=Math.max,o=Math.min,a=Math.sin,i=Math.sqrt,n=1e-12,s=Math.PI,h=s/2,f=2*s;function m(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 x(gt){return gt.startAngle}function w(gt){return gt.endAngle}function A(gt){return gt&>.padAngle}function E(gt,Kt,mr,Ir,va,Pa,ga,la){var ba=mr-gt,Ai=Ir-Kt,ki=ga-va,Ki=la-Pa,Mn=Ki*ba-ki*Ai;if(!(Mn*Mnss*ss+_s*_s&&(os=jo,ys=Yn),{cx:os,cy:ys,x01:-ki,y01:-Ki,x11:os*(va/wo-1),y11:ys*(va/wo-1)}}function b(){var gt=T,Kt=l,mr=S(0),Ir=null,va=x,Pa=w,ga=A,la=null;function ba(){var Ai,ki,Ki=+gt.apply(this,arguments),Mn=+Kt.apply(this,arguments),wn=va.apply(this,arguments)-h,On=Pa.apply(this,arguments)-h,En=M(On-wn),ao=On>wn;if(la||(la=Ai=_.path()),Mnn))la.moveTo(0,0);else if(En>f-n)la.moveTo(Mn*t(wn),Mn*a(wn)),la.arc(0,0,Mn,wn,On,!ao),Ki>n&&(la.moveTo(Ki*t(On),Ki*a(On)),la.arc(0,0,Ki,On,wn,ao));else{var Co=wn,bo=On,zs=wn,kn=On,wo=En,Zn=En,go=ga.apply(this,arguments)/2,os=go>n&&(Ir?+Ir.apply(this,arguments):i(Ki*Ki+Mn*Mn)),ys=o(M(Mn-Ki)/2,+mr.apply(this,arguments)),jo=ys,Yn=ys,Gn,Hn;if(os>n){var ss=c(os/Ki*a(go)),_s=c(os/Mn*a(go));(wo-=ss*2)>n?(ss*=ao?1:-1,zs+=ss,kn-=ss):(wo=0,zs=kn=(wn+On)/2),(Zn-=_s*2)>n?(_s*=ao?1:-1,Co+=_s,bo-=_s):(Zn=0,Co=bo=(wn+On)/2)}var ps=Mn*t(Co),Ko=Mn*a(Co),Gi=Ki*t(kn),Pn=Ki*a(kn);if(ys>n){var qs=Mn*t(bo),bs=Mn*a(bo),lo=Ki*t(zs),Zo=Ki*a(zs),ws;if(Enn?Yn>n?(Gn=p(lo,Zo,ps,Ko,Mn,Yn,ao),Hn=p(qs,bs,Gi,Pn,Mn,Yn,ao),la.moveTo(Gn.cx+Gn.x01,Gn.cy+Gn.y01),Ynn)||!(wo>n)?la.lineTo(Gi,Pn):jo>n?(Gn=p(Gi,Pn,qs,bs,Ki,-jo,ao),Hn=p(ps,Ko,lo,Zo,Ki,-jo,ao),la.lineTo(Gn.cx+Gn.x01,Gn.cy+Gn.y01),jo=Mn;--wn)la.point(bo[wn],zs[wn]);la.lineEnd(),la.areaEnd()}ao&&(bo[Ki]=+gt(En,Ki,ki),zs[Ki]=+mr(En,Ki,ki),la.point(Kt?+Kt(En,Ki,ki):bo[Ki],Ir?+Ir(En,Ki,ki):zs[Ki]))}if(Co)return la=null,Co+""||null}function Ai(){return D().defined(va).curve(ga).context(Pa)}return ba.x=function(ki){return arguments.length?(gt=typeof ki=="function"?ki:S(+ki),Kt=null,ba):gt},ba.x0=function(ki){return arguments.length?(gt=typeof ki=="function"?ki:S(+ki),ba):gt},ba.x1=function(ki){return arguments.length?(Kt=ki==null?null:typeof ki=="function"?ki:S(+ki),ba):Kt},ba.y=function(ki){return arguments.length?(mr=typeof ki=="function"?ki:S(+ki),Ir=null,ba):mr},ba.y0=function(ki){return arguments.length?(mr=typeof ki=="function"?ki:S(+ki),ba):mr},ba.y1=function(ki){return arguments.length?(Ir=ki==null?null:typeof ki=="function"?ki:S(+ki),ba):Ir},ba.lineX0=ba.lineY0=function(){return Ai().x(gt).y(mr)},ba.lineY1=function(){return Ai().x(gt).y(Ir)},ba.lineX1=function(){return Ai().x(Kt).y(mr)},ba.defined=function(ki){return arguments.length?(va=typeof ki=="function"?ki:S(!!ki),ba):va},ba.curve=function(ki){return arguments.length?(ga=ki,Pa!=null&&(la=ga(Pa)),ba):ga},ba.context=function(ki){return arguments.length?(ki==null?Pa=la=null:la=ga(Pa=ki),ba):Pa},ba}function z(gt,Kt){return Ktgt?1:Kt>=gt?0:NaN}function F(gt){return gt}function N(){var gt=F,Kt=z,mr=null,Ir=S(0),va=S(f),Pa=S(0);function ga(la){var ba,Ai=la.length,ki,Ki,Mn=0,wn=new Array(Ai),On=new Array(Ai),En=+Ir.apply(this,arguments),ao=Math.min(f,Math.max(-f,va.apply(this,arguments)-En)),Co,bo=Math.min(Math.abs(ao)/Ai,Pa.apply(this,arguments)),zs=bo*(ao<0?-1:1),kn;for(ba=0;ba0&&(Mn+=kn);for(Kt!=null?wn.sort(function(wo,Zn){return Kt(On[wo],On[Zn])}):mr!=null&&wn.sort(function(wo,Zn){return mr(la[wo],la[Zn])}),ba=0,Ki=Mn?(ao-Ai*zs)/Mn:0;ba0?kn*Ki:0)+zs,On[ki]={data:la[ki],index:ba,value:kn,startAngle:En,endAngle:Co,padAngle:bo};return On}return ga.value=function(la){return arguments.length?(gt=typeof la=="function"?la:S(+la),ga):gt},ga.sortValues=function(la){return arguments.length?(Kt=la,mr=null,ga):Kt},ga.sort=function(la){return arguments.length?(mr=la,Kt=null,ga):mr},ga.startAngle=function(la){return arguments.length?(Ir=typeof la=="function"?la:S(+la),ga):Ir},ga.endAngle=function(la){return arguments.length?(va=typeof la=="function"?la:S(+la),ga):va},ga.padAngle=function(la){return arguments.length?(Pa=typeof la=="function"?la:S(+la),ga):Pa},ga}var O=U(u);function L(gt){this._curve=gt}L.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(gt,Kt){this._curve.point(Kt*Math.sin(gt),Kt*-Math.cos(gt))}};function U(gt){function Kt(mr){return new L(gt(mr))}return Kt._curve=gt,Kt}function B(gt){var Kt=gt.curve;return gt.angle=gt.x,delete gt.x,gt.radius=gt.y,delete gt.y,gt.curve=function(mr){return arguments.length?Kt(U(mr)):Kt()._curve},gt}function W(){return B(D().curve(O))}function $(){var gt=P().curve(O),Kt=gt.curve,mr=gt.lineX0,Ir=gt.lineX1,va=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(mr())},delete gt.lineX0,gt.lineEndAngle=function(){return B(Ir())},delete gt.lineX1,gt.lineInnerRadius=function(){return B(va())},delete gt.lineY0,gt.lineOuterRadius=function(){return B(Pa())},delete gt.lineY1,gt.curve=function(ga){return arguments.length?Kt(U(ga)):Kt()._curve},gt}function ue(gt,Kt){return[(Kt=+Kt)*Math.cos(gt-=Math.PI/2),Kt*Math.sin(gt)]}var ce=Array.prototype.slice;function de(gt){return gt.source}function Y(gt){return gt.target}function X(gt){var Kt=de,mr=Y,Ir=g,va=y,Pa=null;function ga(){var la,ba=ce.call(arguments),Ai=Kt.apply(this,ba),ki=mr.apply(this,ba);if(Pa||(Pa=la=_.path()),gt(Pa,+Ir.apply(this,(ba[0]=Ai,ba)),+va.apply(this,ba),+Ir.apply(this,(ba[0]=ki,ba)),+va.apply(this,ba)),la)return Pa=null,la+""||null}return ga.source=function(la){return arguments.length?(Kt=la,ga):Kt},ga.target=function(la){return arguments.length?(mr=la,ga):mr},ga.x=function(la){return arguments.length?(Ir=typeof la=="function"?la:S(+la),ga):Ir},ga.y=function(la){return arguments.length?(va=typeof la=="function"?la:S(+la),ga):va},ga.context=function(la){return arguments.length?(Pa=la??null,ga):Pa},ga}function Q(gt,Kt,mr,Ir,va){gt.moveTo(Kt,mr),gt.bezierCurveTo(Kt=(Kt+Ir)/2,mr,Kt,va,Ir,va)}function V(gt,Kt,mr,Ir,va){gt.moveTo(Kt,mr),gt.bezierCurveTo(Kt,mr=(mr+va)/2,Ir,mr,Ir,va)}function le(gt,Kt,mr,Ir,va){var Pa=ue(Kt,mr),ga=ue(Kt,mr=(mr+va)/2),la=ue(Ir,mr),ba=ue(Ir,va);gt.moveTo(Pa[0],Pa[1]),gt.bezierCurveTo(ga[0],ga[1],la[0],la[1],ba[0],ba[1])}function ae(){return X(Q)}function j(){return X(V)}function ee(){var gt=X(le);return gt.angle=gt.x,delete gt.x,gt.radius=gt.y,delete gt.y,gt}var te={draw:function(gt,Kt){var mr=Math.sqrt(Kt/s);gt.moveTo(mr,0),gt.arc(0,0,mr,0,f)}},pe={draw:function(gt,Kt){var mr=Math.sqrt(Kt/5)/2;gt.moveTo(-3*mr,-mr),gt.lineTo(-mr,-mr),gt.lineTo(-mr,-3*mr),gt.lineTo(mr,-3*mr),gt.lineTo(mr,-mr),gt.lineTo(3*mr,-mr),gt.lineTo(3*mr,mr),gt.lineTo(mr,mr),gt.lineTo(mr,3*mr),gt.lineTo(-mr,3*mr),gt.lineTo(-mr,mr),gt.lineTo(-3*mr,mr),gt.closePath()}},we=Math.sqrt(1/3),Se=we*2,Re={draw:function(gt,Kt){var mr=Math.sqrt(Kt/Se),Ir=mr*we;gt.moveTo(0,-mr),gt.lineTo(Ir,0),gt.lineTo(0,mr),gt.lineTo(-Ir,0),gt.closePath()}},Pe=.8908130915292852,je=Math.sin(s/10)/Math.sin(7*s/10),at=Math.sin(f/10)*je,nt=-Math.cos(f/10)*je,tt={draw:function(gt,Kt){var mr=Math.sqrt(Kt*Pe),Ir=at*mr,va=nt*mr;gt.moveTo(0,-mr),gt.lineTo(Ir,va);for(var Pa=1;Pa<5;++Pa){var ga=f*Pa/5,la=Math.cos(ga),ba=Math.sin(ga);gt.lineTo(ba*mr,-la*mr),gt.lineTo(la*Ir-ba*va,ba*Ir+la*va)}gt.closePath()}},Ve={draw:function(gt,Kt){var mr=Math.sqrt(Kt),Ir=-mr/2;gt.rect(Ir,Ir,mr,mr)}},he=Math.sqrt(3),se={draw:function(gt,Kt){var mr=-Math.sqrt(Kt/(he*3));gt.moveTo(0,mr*2),gt.lineTo(-he*mr,-mr),gt.lineTo(he*mr,-mr),gt.closePath()}},ne=-.5,Ce=Math.sqrt(3)/2,Ze=1/Math.sqrt(12),rt=(Ze/2+1)*3,Je={draw:function(gt,Kt){var mr=Math.sqrt(Kt/rt),Ir=mr/2,va=mr*Ze,Pa=Ir,ga=mr*Ze+mr,la=-Pa,ba=ga;gt.moveTo(Ir,va),gt.lineTo(Pa,ga),gt.lineTo(la,ba),gt.lineTo(ne*Ir-Ce*va,Ce*Ir+ne*va),gt.lineTo(ne*Pa-Ce*ga,Ce*Pa+ne*ga),gt.lineTo(ne*la-Ce*ba,Ce*la+ne*ba),gt.lineTo(ne*Ir+Ce*va,ne*va-Ce*Ir),gt.lineTo(ne*Pa+Ce*ga,ne*ga-Ce*Pa),gt.lineTo(ne*la+Ce*ba,ne*ba-Ce*la),gt.closePath()}},St=[te,pe,Re,Ve,tt,se,Je];function kt(){var gt=S(te),Kt=S(64),mr=null;function Ir(){var va;if(mr||(mr=va=_.path()),gt.apply(this,arguments).draw(mr,+Kt.apply(this,arguments)),va)return mr=null,va+""||null}return Ir.type=function(va){return arguments.length?(gt=typeof va=="function"?va:S(va),Ir):gt},Ir.size=function(va){return arguments.length?(Kt=typeof va=="function"?va:S(+va),Ir):Kt},Ir.context=function(va){return arguments.length?(mr=va??null,Ir):mr},Ir}function Bt(){}function Vt(gt,Kt,mr){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+Kt)/6,(gt._y0+4*gt._y1+mr)/6)}function Ar(gt){this._context=gt}Ar.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:Vt(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,Kt){switch(gt=+gt,Kt=+Kt,this._point){case 0:this._point=1,this._line?this._context.lineTo(gt,Kt):this._context.moveTo(gt,Kt);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:Vt(this,gt,Kt);break}this._x0=this._x1,this._x1=gt,this._y0=this._y1,this._y1=Kt}};function vr(gt){return new Ar(gt)}function qr(gt){this._context=gt}qr.prototype={areaStart:Bt,areaEnd:Bt,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,Kt){switch(gt=+gt,Kt=+Kt,this._point){case 0:this._point=1,this._x2=gt,this._y2=Kt;break;case 1:this._point=2,this._x3=gt,this._y3=Kt;break;case 2:this._point=3,this._x4=gt,this._y4=Kt,this._context.moveTo((this._x0+4*this._x1+gt)/6,(this._y0+4*this._y1+Kt)/6);break;default:Vt(this,gt,Kt);break}this._x0=this._x1,this._x1=gt,this._y0=this._y1,this._y1=Kt}};function kr(gt){return new qr(gt)}function Ur(gt){this._context=gt}Ur.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,Kt){switch(gt=+gt,Kt=+Kt,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var mr=(this._x0+4*this._x1+gt)/6,Ir=(this._y0+4*this._y1+Kt)/6;this._line?this._context.lineTo(mr,Ir):this._context.moveTo(mr,Ir);break;case 3:this._point=4;default:Vt(this,gt,Kt);break}this._x0=this._x1,this._x1=gt,this._y0=this._y1,this._y1=Kt}};function _t(gt){return new Ur(gt)}function Fe(gt,Kt){this._basis=new Ar(gt),this._beta=Kt}Fe.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var gt=this._x,Kt=this._y,mr=gt.length-1;if(mr>0)for(var Ir=gt[0],va=Kt[0],Pa=gt[mr]-Ir,ga=Kt[mr]-va,la=-1,ba;++la<=mr;)ba=la/mr,this._basis.point(this._beta*gt[la]+(1-this._beta)*(Ir+ba*Pa),this._beta*Kt[la]+(1-this._beta)*(va+ba*ga));this._x=this._y=null,this._basis.lineEnd()},point:function(gt,Kt){this._x.push(+gt),this._y.push(+Kt)}};var Ye=function gt(Kt){function mr(Ir){return Kt===1?new Ar(Ir):new Fe(Ir,Kt)}return mr.beta=function(Ir){return gt(+Ir)},mr}(.85);function Ae(gt,Kt,mr){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-Kt),gt._y2+gt._k*(gt._y1-mr),gt._x2,gt._y2)}function Le(gt,Kt){this._context=gt,this._k=(1-Kt)/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,Kt){switch(gt=+gt,Kt=+Kt,this._point){case 0:this._point=1,this._line?this._context.lineTo(gt,Kt):this._context.moveTo(gt,Kt);break;case 1:this._point=2,this._x1=gt,this._y1=Kt;break;case 2:this._point=3;default:Ae(this,gt,Kt);break}this._x0=this._x1,this._x1=this._x2,this._x2=gt,this._y0=this._y1,this._y1=this._y2,this._y2=Kt}};var We=function gt(Kt){function mr(Ir){return new Le(Ir,Kt)}return mr.tension=function(Ir){return gt(+Ir)},mr}(0);function Ke(gt,Kt){this._context=gt,this._k=(1-Kt)/6}Ke.prototype={areaStart:Bt,areaEnd:Bt,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,Kt){switch(gt=+gt,Kt=+Kt,this._point){case 0:this._point=1,this._x3=gt,this._y3=Kt;break;case 1:this._point=2,this._context.moveTo(this._x4=gt,this._y4=Kt);break;case 2:this._point=3,this._x5=gt,this._y5=Kt;break;default:Ae(this,gt,Kt);break}this._x0=this._x1,this._x1=this._x2,this._x2=gt,this._y0=this._y1,this._y1=this._y2,this._y2=Kt}};var st=function gt(Kt){function mr(Ir){return new Ke(Ir,Kt)}return mr.tension=function(Ir){return gt(+Ir)},mr}(0);function ot(gt,Kt){this._context=gt,this._k=(1-Kt)/6}ot.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,Kt){switch(gt=+gt,Kt=+Kt,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,Kt);break}this._x0=this._x1,this._x1=this._x2,this._x2=gt,this._y0=this._y1,this._y1=this._y2,this._y2=Kt}};var Ut=function gt(Kt){function mr(Ir){return new ot(Ir,Kt)}return mr.tension=function(Ir){return gt(+Ir)},mr}(0);function Ct(gt,Kt,mr){var Ir=gt._x1,va=gt._y1,Pa=gt._x2,ga=gt._y2;if(gt._l01_a>n){var la=2*gt._l01_2a+3*gt._l01_a*gt._l12_a+gt._l12_2a,ba=3*gt._l01_a*(gt._l01_a+gt._l12_a);Ir=(Ir*la-gt._x0*gt._l12_2a+gt._x2*gt._l01_2a)/ba,va=(va*la-gt._y0*gt._l12_2a+gt._y2*gt._l01_2a)/ba}if(gt._l23_a>n){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-Kt*gt._l12_2a)/ki,ga=(ga*Ai+gt._y1*gt._l23_2a-mr*gt._l12_2a)/ki}gt._context.bezierCurveTo(Ir,va,Pa,ga,gt._x2,gt._y2)}function Pt(gt,Kt){this._context=gt,this._alpha=Kt}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,Kt){if(gt=+gt,Kt=+Kt,this._point){var mr=this._x2-gt,Ir=this._y2-Kt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(mr*mr+Ir*Ir,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(gt,Kt):this._context.moveTo(gt,Kt);break;case 1:this._point=2;break;case 2:this._point=3;default:Ct(this,gt,Kt);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=Kt}};var jt=function gt(Kt){function mr(Ir){return Kt?new Pt(Ir,Kt):new Le(Ir,0)}return mr.alpha=function(Ir){return gt(+Ir)},mr}(.5);function cr(gt,Kt){this._context=gt,this._alpha=Kt}cr.prototype={areaStart:Bt,areaEnd:Bt,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,Kt){if(gt=+gt,Kt=+Kt,this._point){var mr=this._x2-gt,Ir=this._y2-Kt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(mr*mr+Ir*Ir,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=gt,this._y3=Kt;break;case 1:this._point=2,this._context.moveTo(this._x4=gt,this._y4=Kt);break;case 2:this._point=3,this._x5=gt,this._y5=Kt;break;default:Ct(this,gt,Kt);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=Kt}};var or=function gt(Kt){function mr(Ir){return Kt?new cr(Ir,Kt):new Ke(Ir,0)}return mr.alpha=function(Ir){return gt(+Ir)},mr}(.5);function nr(gt,Kt){this._context=gt,this._alpha=Kt}nr.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,Kt){if(gt=+gt,Kt=+Kt,this._point){var mr=this._x2-gt,Ir=this._y2-Kt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(mr*mr+Ir*Ir,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,Kt);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=Kt}};var Pr=function gt(Kt){function mr(Ir){return Kt?new nr(Ir,Kt):new ot(Ir,0)}return mr.alpha=function(Ir){return gt(+Ir)},mr}(.5);function _a(gt){this._context=gt}_a.prototype={areaStart:Bt,areaEnd:Bt,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(gt,Kt){gt=+gt,Kt=+Kt,this._point?this._context.lineTo(gt,Kt):(this._point=1,this._context.moveTo(gt,Kt))}};function Fa(gt){return new _a(gt)}function Ra(gt){return gt<0?-1:1}function qa(gt,Kt,mr){var Ir=gt._x1-gt._x0,va=Kt-gt._x1,Pa=(gt._y1-gt._y0)/(Ir||va<0&&-0),ga=(mr-gt._y1)/(va||Ir<0&&-0),la=(Pa*va+ga*Ir)/(Ir+va);return(Ra(Pa)+Ra(ga))*Math.min(Math.abs(Pa),Math.abs(ga),.5*Math.abs(la))||0}function Wa(gt,Kt){var mr=gt._x1-gt._x0;return mr?(3*(gt._y1-gt._y0)/mr-Kt)/2:Kt}function Ca(gt,Kt,mr){var Ir=gt._x0,va=gt._y0,Pa=gt._x1,ga=gt._y1,la=(Pa-Ir)/3;gt._context.bezierCurveTo(Ir+la,va+la*Kt,Pa-la,ga-la*mr,Pa,ga)}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,Kt){var mr=NaN;if(gt=+gt,Kt=+Kt,!(gt===this._x1&&Kt===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(gt,Kt):this._context.moveTo(gt,Kt);break;case 1:this._point=2;break;case 2:this._point=3,Ca(this,Wa(this,mr=qa(this,gt,Kt)),mr);break;default:Ca(this,this._t0,mr=qa(this,gt,Kt));break}this._x0=this._x1,this._x1=gt,this._y0=this._y1,this._y1=Kt,this._t0=mr}}};function wi(gt){this._context=new Yt(gt)}(wi.prototype=Object.create(hi.prototype)).point=function(gt,Kt){hi.prototype.point.call(this,Kt,gt)};function Yt(gt){this._context=gt}Yt.prototype={moveTo:function(gt,Kt){this._context.moveTo(Kt,gt)},closePath:function(){this._context.closePath()},lineTo:function(gt,Kt){this._context.lineTo(Kt,gt)},bezierCurveTo:function(gt,Kt,mr,Ir,va,Pa){this._context.bezierCurveTo(Kt,gt,Ir,mr,Pa,va)}};function Rt(gt){return new hi(gt)}function Zt(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,Kt=this._y,mr=gt.length;if(mr)if(this._line?this._context.lineTo(gt[0],Kt[0]):this._context.moveTo(gt[0],Kt[0]),mr===2)this._context.lineTo(gt[1],Kt[1]);else for(var Ir=Fr(gt),va=Fr(Kt),Pa=0,ga=1;ga=0;--Kt)va[Kt]=(ga[Kt]-va[Kt+1])/Pa[Kt];for(Pa[mr-1]=(gt[mr]+va[mr-1])/2,Kt=0;Kt=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(gt,Kt){switch(gt=+gt,Kt=+Kt,this._point){case 0:this._point=1,this._line?this._context.lineTo(gt,Kt):this._context.moveTo(gt,Kt);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,Kt),this._context.lineTo(gt,Kt);else{var mr=this._x*(1-this._t)+gt*this._t;this._context.lineTo(mr,this._y),this._context.lineTo(mr,Kt)}break}}this._x=gt,this._y=Kt}};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,Kt){if((ga=gt.length)>1)for(var mr=1,Ir,va,Pa=gt[Kt[0]],ga,la=Pa.length;mr=0;)mr[Kt]=Kt;return mr}function pi(gt,Kt){return gt[Kt]}function Ia(){var gt=S([]),Kt=ri,mr=Za,Ir=pi;function va(Pa){var ga=gt.apply(this,arguments),la,ba=Pa.length,Ai=ga.length,ki=new Array(Ai),Ki;for(la=0;la0){for(var mr,Ir,va=0,Pa=gt[0].length,ga;va0)for(var mr,Ir=0,va,Pa,ga,la,ba,Ai=gt[Kt[0]].length;Ir0?(va[0]=ga,va[1]=ga+=Pa):Pa<0?(va[1]=la,va[0]=la+=Pa):(va[0]=0,va[1]=Pa)}function cn(gt,Kt){if((va=gt.length)>0){for(var mr=0,Ir=gt[Kt[0]],va,Pa=Ir.length;mr0)||!((Pa=(va=gt[Kt[0]]).length)>0))){for(var mr=0,Ir=1,va,Pa,ga;IrPa&&(Pa=va,mr=Kt);return mr}function Cr(gt){var Kt=gt.map(wr);return ri(gt).sort(function(mr,Ir){return Kt[mr]-Kt[Ir]})}function wr(gt){for(var Kt=0,mr=-1,Ir=gt.length,va;++mr0;--le)ee(V*=.99),te(),j(V),te();function ae(){var pe=_.max(Q,function(Re){return Re.length}),we=B*(D-g)/(pe-1);z>we&&(z=we);var Se=_.min(Q,function(Re){return(D-g-(Re.length-1)*z)/_.sum(Re,f)});Q.forEach(function(Re){Re.forEach(function(Pe,je){Pe.y1=(Pe.y0=je)+Pe.value*Se})}),X.links.forEach(function(Re){Re.width=Re.value*Se})}function j(pe){Q.forEach(function(we){we.forEach(function(Se){if(Se.targetLinks.length){var Re=(_.sum(Se.targetLinks,c)/_.sum(Se.targetLinks,f)-m(Se))*pe;Se.y0+=Re,Se.y1+=Re}})})}function ee(pe){Q.slice().reverse().forEach(function(we){we.forEach(function(Se){if(Se.sourceLinks.length){var Re=(_.sum(Se.sourceLinks,T)/_.sum(Se.sourceLinks,f)-m(Se))*pe;Se.y0+=Re,Se.y1+=Re}})})}function te(){Q.forEach(function(pe){var we,Se,Re=g,Pe=pe.length,je;for(pe.sort(h),je=0;je0&&(we.y0+=Se,we.y1+=Se),Re=we.y1+z;if(Se=Re-z-D,Se>0)for(Re=we.y0-=Se,we.y1-=Se,je=Pe-2;je>=0;--je)we=pe[je],Se=we.y1+z-Re,Se>0&&(we.y0-=Se,we.y1-=Se),Re=we.y0})}}function Y(X){X.nodes.forEach(function(Q){Q.sourceLinks.sort(s),Q.targetLinks.sort(n)}),X.nodes.forEach(function(Q){var V=Q.y0,le=V;Q.sourceLinks.forEach(function(ae){ae.y0=V+ae.width/2,V+=ae.width}),Q.targetLinks.forEach(function(ae){ae.y1=le+ae.width/2,le+=ae.width})})}return W};function p(u){return[u.source.x1,u.y0]}function b(u){return[u.target.x0,u.y1]}var d=function(){return M.linkHorizontal().source(p).target(b)};v.sankey=E,v.sankeyCenter=a,v.sankeyLeft=t,v.sankeyRight=r,v.sankeyJustify=o,v.sankeyLinkHorizontal=d,Object.defineProperty(v,"__esModule",{value:!0})})}}),vG=He({"node_modules/elementary-circuits-directed-graph/johnson.js"(Z,q){var v=N6();q.exports=function(S,M){var e=[],t=[],r=[],o={},a=[],i;function n(A){r[A]=!1,o.hasOwnProperty(A)&&Object.keys(o[A]).forEach(function(E){delete o[A][E],r[E]&&n(E)})}function s(A){var E=!1;t.push(A),r[A]=!0;var p,b;for(p=0;p=A})}function m(A){f(A);for(var E=S,p=v(E),b=p.components.filter(function(z){return z.length>1}),d=1/0,u,g=0;g"u"?"undefined":s(Le))!=="object"&&(Le=Ye.source=p(Fe,Le)),(typeof We>"u"?"undefined":s(We))!=="object"&&(We=Ye.target=p(Fe,We)),Le.sourceLinks.push(Ye),We.targetLinks.push(Ye)}),_t}function Vt(_t){_t.nodes.forEach(function(Fe){Fe.partOfCycle=!1,Fe.value=Math.max(_.sum(Fe.sourceLinks,c),_.sum(Fe.targetLinks,c)),Fe.sourceLinks.forEach(function(Ye){Ye.circular&&(Fe.partOfCycle=!0,Fe.circularLinkType=Ye.circularLinkType)}),Fe.targetLinks.forEach(function(Ye){Ye.circular&&(Fe.partOfCycle=!0,Fe.circularLinkType=Ye.circularLinkType)})})}function Ar(_t){var Fe=0,Ye=0,Ae=0,Le=0,We=_.max(_t.nodes,function(Ke){return Ke.column});return _t.links.forEach(function(Ke){Ke.circular&&(Ke.circularLinkType=="top"?Fe=Fe+Ke.width:Ye=Ye+Ke.width,Ke.target.column==0&&(Le=Le+Ke.width),Ke.source.column==We&&(Ae=Ae+Ke.width))}),Fe=Fe>0?Fe+d+u:Fe,Ye=Ye>0?Ye+d+u:Ye,Ae=Ae>0?Ae+d+u:Ae,Le=Le>0?Le+d+u:Le,{top:Fe,bottom:Ye,left:Le,right:Ae}}function vr(_t,Fe){var Ye=_.max(_t.nodes,function(Ut){return Ut.column}),Ae=at-Pe,Le=nt-je,We=Ae+Fe.right+Fe.left,Ke=Le+Fe.top+Fe.bottom,st=Ae/We,ot=Le/Ke;return Pe=Pe*st+Fe.left,at=Fe.right==0?at:at*st,je=je*ot+Fe.top,nt=nt*ot,_t.nodes.forEach(function(Ut){Ut.x0=Pe+Ut.column*((at-Pe-tt)/Ye),Ut.x1=Ut.x0+tt}),ot}function qr(_t){var Fe,Ye,Ae;for(Fe=_t.nodes,Ye=[],Ae=0;Fe.length;++Ae,Fe=Ye,Ye=[])Fe.forEach(function(Le){Le.depth=Ae,Le.sourceLinks.forEach(function(We){Ye.indexOf(We.target)<0&&!We.circular&&Ye.push(We.target)})});for(Fe=_t.nodes,Ye=[],Ae=0;Fe.length;++Ae,Fe=Ye,Ye=[])Fe.forEach(function(Le){Le.height=Ae,Le.targetLinks.forEach(function(We){Ye.indexOf(We.source)<0&&!We.circular&&Ye.push(We.source)})});_t.nodes.forEach(function(Le){Le.column=Math.floor(se.call(null,Le,Ae))})}function kr(_t,Fe,Ye){var Ae=S.nest().key(function(Ut){return Ut.column}).sortKeys(_.ascending).entries(_t.nodes).map(function(Ut){return Ut.values});Ke(Ye),ot();for(var Le=1,We=Fe;We>0;--We)st(Le*=.99,Ye),ot();function Ke(Ut){if(Je){var Ct=1/0;Ae.forEach(function(or){var nr=nt*Je/(or.length+1);Ct=nr0))if(or==0&&cr==1)Pr=nr.y1-nr.y0,nr.y0=nt/2-Pr/2,nr.y1=nt/2+Pr/2;else if(or==Pt-1&&cr==1)Pr=nr.y1-nr.y0,nr.y0=nt/2-Pr/2,nr.y1=nt/2+Pr/2;else{var _a=0,Fa=_.mean(nr.sourceLinks,x),Ra=_.mean(nr.targetLinks,l);Fa&&Ra?_a=(Fa+Ra)/2:_a=Fa||Ra;var qa=(_a-T(nr))*Ut;nr.y0+=qa,nr.y1+=qa}})})}function ot(){Ae.forEach(function(Ut){var Ct,Pt,jt=je,cr=Ut.length,or;for(Ut.sort(m),or=0;or0&&(Ct.y0+=Pt,Ct.y1+=Pt),jt=Ct.y1+Ve;if(Pt=jt-Ve-nt,Pt>0)for(jt=Ct.y0-=Pt,Ct.y1-=Pt,or=cr-2;or>=0;--or)Ct=Ut[or],Pt=Ct.y1+Ve-jt,Pt>0&&(Ct.y0-=Pt,Ct.y1-=Pt),jt=Ct.y0})}}function Ur(_t){_t.nodes.forEach(function(Fe){Fe.sourceLinks.sort(f),Fe.targetLinks.sort(h)}),_t.nodes.forEach(function(Fe){var Ye=Fe.y0,Ae=Ye,Le=Fe.y1,We=Le;Fe.sourceLinks.forEach(function(Ke){Ke.circular?(Ke.y0=Le-Ke.width/2,Le=Le-Ke.width):(Ke.y0=Ye+Ke.width/2,Ye+=Ke.width)}),Fe.targetLinks.forEach(function(Ke){Ke.circular?(Ke.y1=We-Ke.width/2,We=We-Ke.width):(Ke.y1=Ae+Ke.width/2,Ae+=Ke.width)})})}return kt}function D(Pe,je,at){var nt=0;if(at===null){for(var tt=[],Ve=0;Veje.source.column)}function N(Pe,je){var at=0;Pe.sourceLinks.forEach(function(tt){at=tt.circular&&!Se(tt,je)?at+1:at});var nt=0;return Pe.targetLinks.forEach(function(tt){nt=tt.circular&&!Se(tt,je)?nt+1:nt}),at+nt}function O(Pe){var je=Pe.source.sourceLinks,at=0;je.forEach(function(Ve){at=Ve.circular?at+1:at});var nt=Pe.target.targetLinks,tt=0;return nt.forEach(function(Ve){tt=Ve.circular?tt+1:tt}),!(at>1||tt>1)}function L(Pe,je,at){return Pe.sort(W),Pe.forEach(function(nt,tt){var Ve=0;if(Se(nt,at)&&O(nt))nt.circularPathData.verticalBuffer=Ve+nt.width/2;else{var he=0;for(he;heVe?se:Ve}nt.circularPathData.verticalBuffer=Ve+nt.width/2}}),Pe}function U(Pe,je,at,nt){var tt=5,Ve=_.min(Pe.links,function(ne){return ne.source.y0});Pe.links.forEach(function(ne){ne.circular&&(ne.circularPathData={})});var he=Pe.links.filter(function(ne){return ne.circularLinkType=="top"});L(he,je,nt);var se=Pe.links.filter(function(ne){return ne.circularLinkType=="bottom"});L(se,je,nt),Pe.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+d+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-d-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,Ze=ne.circularLinkType,rt=Pe.links.filter(function(kt){return kt.source.column==Ce&&kt.circularLinkType==Ze});ne.circularLinkType=="bottom"?rt.sort(ue):rt.sort($);var Je=0;rt.forEach(function(kt,Bt){kt.circularLinkID==ne.circularLinkID&&(ne.circularPathData.leftSmallArcRadius=u+ne.width/2+Je,ne.circularPathData.leftLargeArcRadius=u+ne.width/2+Bt*je+Je),Je=Je+kt.width}),Ce=ne.target.column,rt=Pe.links.filter(function(kt){return kt.target.column==Ce&&kt.circularLinkType==Ze}),ne.circularLinkType=="bottom"?rt.sort(de):rt.sort(ce),Je=0,rt.forEach(function(kt,Bt){kt.circularLinkID==ne.circularLinkID&&(ne.circularPathData.rightSmallArcRadius=u+ne.width/2+Je,ne.circularPathData.rightLargeArcRadius=u+ne.width/2+Bt*je+Je),Je=Je+kt.width}),ne.circularLinkType=="bottom"?(ne.circularPathData.verticalFullExtent=Math.max(at,ne.source.y1,ne.target.y1)+d+ne.circularPathData.verticalBuffer,ne.circularPathData.verticalLeftInnerExtent=ne.circularPathData.verticalFullExtent-ne.circularPathData.leftLargeArcRadius,ne.circularPathData.verticalRightInnerExtent=ne.circularPathData.verticalFullExtent-ne.circularPathData.rightLargeArcRadius):(ne.circularPathData.verticalFullExtent=Ve-d-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 St=M.linkHorizontal().source(function(kt){var Bt=kt.source.x0+(kt.source.x1-kt.source.x0),Vt=kt.y0;return[Bt,Vt]}).target(function(kt){var Bt=kt.target.x0,Vt=kt.y1;return[Bt,Vt]});ne.path=St(ne)}})}function B(Pe){var je="";return Pe.circularLinkType=="top"?je="M"+Pe.circularPathData.sourceX+" "+Pe.circularPathData.sourceY+" L"+Pe.circularPathData.leftInnerExtent+" "+Pe.circularPathData.sourceY+" A"+Pe.circularPathData.leftLargeArcRadius+" "+Pe.circularPathData.leftSmallArcRadius+" 0 0 0 "+Pe.circularPathData.leftFullExtent+" "+(Pe.circularPathData.sourceY-Pe.circularPathData.leftSmallArcRadius)+" L"+Pe.circularPathData.leftFullExtent+" "+Pe.circularPathData.verticalLeftInnerExtent+" A"+Pe.circularPathData.leftLargeArcRadius+" "+Pe.circularPathData.leftLargeArcRadius+" 0 0 0 "+Pe.circularPathData.leftInnerExtent+" "+Pe.circularPathData.verticalFullExtent+" L"+Pe.circularPathData.rightInnerExtent+" "+Pe.circularPathData.verticalFullExtent+" A"+Pe.circularPathData.rightLargeArcRadius+" "+Pe.circularPathData.rightLargeArcRadius+" 0 0 0 "+Pe.circularPathData.rightFullExtent+" "+Pe.circularPathData.verticalRightInnerExtent+" L"+Pe.circularPathData.rightFullExtent+" "+(Pe.circularPathData.targetY-Pe.circularPathData.rightSmallArcRadius)+" A"+Pe.circularPathData.rightLargeArcRadius+" "+Pe.circularPathData.rightSmallArcRadius+" 0 0 0 "+Pe.circularPathData.rightInnerExtent+" "+Pe.circularPathData.targetY+" L"+Pe.circularPathData.targetX+" "+Pe.circularPathData.targetY:je="M"+Pe.circularPathData.sourceX+" "+Pe.circularPathData.sourceY+" L"+Pe.circularPathData.leftInnerExtent+" "+Pe.circularPathData.sourceY+" A"+Pe.circularPathData.leftLargeArcRadius+" "+Pe.circularPathData.leftSmallArcRadius+" 0 0 1 "+Pe.circularPathData.leftFullExtent+" "+(Pe.circularPathData.sourceY+Pe.circularPathData.leftSmallArcRadius)+" L"+Pe.circularPathData.leftFullExtent+" "+Pe.circularPathData.verticalLeftInnerExtent+" A"+Pe.circularPathData.leftLargeArcRadius+" "+Pe.circularPathData.leftLargeArcRadius+" 0 0 1 "+Pe.circularPathData.leftInnerExtent+" "+Pe.circularPathData.verticalFullExtent+" L"+Pe.circularPathData.rightInnerExtent+" "+Pe.circularPathData.verticalFullExtent+" A"+Pe.circularPathData.rightLargeArcRadius+" "+Pe.circularPathData.rightLargeArcRadius+" 0 0 1 "+Pe.circularPathData.rightFullExtent+" "+Pe.circularPathData.verticalRightInnerExtent+" L"+Pe.circularPathData.rightFullExtent+" "+(Pe.circularPathData.targetY+Pe.circularPathData.rightSmallArcRadius)+" A"+Pe.circularPathData.rightLargeArcRadius+" "+Pe.circularPathData.rightSmallArcRadius+" 0 0 1 "+Pe.circularPathData.rightInnerExtent+" "+Pe.circularPathData.targetY+" L"+Pe.circularPathData.targetX+" "+Pe.circularPathData.targetY,je}function W(Pe,je){return Y(Pe)==Y(je)?Pe.circularLinkType=="bottom"?ue(Pe,je):$(Pe,je):Y(je)-Y(Pe)}function $(Pe,je){return Pe.y0-je.y0}function ue(Pe,je){return je.y0-Pe.y0}function ce(Pe,je){return Pe.y1-je.y1}function de(Pe,je){return je.y1-Pe.y1}function Y(Pe){return Pe.target.column-Pe.source.column}function X(Pe){return Pe.target.x0-Pe.source.x1}function Q(Pe,je){var at=z(Pe),nt=X(je)/Math.tan(at),tt=we(Pe)=="up"?Pe.y1+nt:Pe.y1-nt;return tt}function V(Pe,je){var at=z(Pe),nt=X(je)/Math.tan(at),tt=we(Pe)=="up"?Pe.y1-nt:Pe.y1+nt;return tt}function le(Pe,je,at,nt){Pe.links.forEach(function(tt){if(!tt.circular&&tt.target.column-tt.source.column>1){var Ve=tt.source.column+1,he=tt.target.column-1,se=1,ne=he-Ve+1;for(se=1;Ve<=he;Ve++,se++)Pe.nodes.forEach(function(Ce){if(Ce.column==Ve){var Ze=se/(ne+1),rt=Math.pow(1-Ze,3),Je=3*Ze*Math.pow(1-Ze,2),St=3*Math.pow(Ze,2)*(1-Ze),kt=Math.pow(Ze,3),Bt=rt*tt.y0+Je*tt.y0+St*tt.y1+kt*tt.y1,Vt=Bt-tt.width/2,Ar=Bt+tt.width/2,vr;Vt>Ce.y0&&VtCe.y0&&ArCe.y1&&j(qr,vr,je,at)})):VtCe.y1&&(vr=Ar-Ce.y0+10,Ce=j(Ce,vr,je,at),Pe.nodes.forEach(function(qr){b(qr,nt)==b(Ce,nt)||qr.column!=Ce.column||qr.y0Ce.y1&&j(qr,vr,je,at)}))}})}})}function ae(Pe,je){return Pe.y0>je.y0&&Pe.y0je.y0&&Pe.y1je.y1}function j(Pe,je,at,nt){return Pe.y0+je>=at&&Pe.y1+je<=nt&&(Pe.y0=Pe.y0+je,Pe.y1=Pe.y1+je,Pe.targetLinks.forEach(function(tt){tt.y1=tt.y1+je}),Pe.sourceLinks.forEach(function(tt){tt.y0=tt.y0+je})),Pe}function ee(Pe,je,at,nt){Pe.nodes.forEach(function(tt){nt&&tt.y+(tt.y1-tt.y0)>je&&(tt.y=tt.y-(tt.y+(tt.y1-tt.y0)-je));var Ve=Pe.links.filter(function(ne){return b(ne.source,at)==b(tt,at)}),he=Ve.length;he>1&&Ve.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 Ze=V(Ce,ne);return ne.y1-Ze}if(Ce.target.column>ne.target.column){var rt=V(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 se=tt.y0;Ve.forEach(function(ne){ne.y0=se+ne.width/2,se=se+ne.width}),Ve.forEach(function(ne,Ce){if(ne.circularLinkType=="bottom"){var Ze=Ce+1,rt=0;for(Ze;Ze1&&tt.sort(function(se,ne){if(!se.circular&&!ne.circular){if(se.source.column==ne.source.column)return se.y0-ne.y0;if(pe(se,ne)){if(ne.source.column0?"up":"down"}function Se(Pe,je){return b(Pe.source,je)==b(Pe.target,je)}function Re(Pe,je,at){var nt=Pe.nodes,tt=Pe.links,Ve=!1,he=!1;if(tt.forEach(function(Je){Je.circularLinkType=="top"?Ve=!0:Je.circularLinkType=="bottom"&&(he=!0)}),Ve==!1||he==!1){var se=_.min(nt,function(Je){return Je.y0}),ne=_.max(nt,function(Je){return Je.y1}),Ce=ne-se,Ze=at-je,rt=Ze/Ce;nt.forEach(function(Je){var St=(Je.y1-Je.y0)*rt;Je.y0=(Je.y0-se)*rt,Je.y1=Je.y0+St}),tt.forEach(function(Je){Je.y0=(Je.y0-se)*rt,Je.y1=(Je.y1-se)*rt,Je.width=Je.width*rt})}}v.sankeyCircular=y,v.sankeyCenter=i,v.sankeyLeft=r,v.sankeyRight=o,v.sankeyJustify=a,Object.defineProperty(v,"__esModule",{value:!0})})}}),j6=He({"src/traces/sankey/constants.js"(Z,q){"use strict";q.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"}}}}),gG=He({"src/traces/sankey/render.js"(Z,q){"use strict";var v=hG(),_=(pg(),zf(d0)).interpolateNumber,S=Vn(),M=dG(),e=mG(),t=j6(),r=Ch(),o=$n(),a=as(),i=sa(),n=i.strTranslate,s=i.strRotate,h=Cv(),f=h.keyFun,m=h.repeat,c=h.unwrap,T=su(),l=so(),x=uh(),w=x.CAP_SHIFT,A=x.LINE_SPACING,E=3;function p(Q,V,le){var ae=c(V),j=ae.trace,ee=j.domain,te=j.orientation==="h",pe=j.node.pad,we=j.node.thickness,Se={justify:M.sankeyJustify,left:M.sankeyLeft,right:M.sankeyRight,center:M.sankeyCenter}[j.node.align],Re=Q.width*(ee.x[1]-ee.x[0]),Pe=Q.height*(ee.y[1]-ee.y[0]),je=ae._nodes,at=ae._links,nt=ae.circular,tt;nt?tt=e.sankeyCircular().circularLinkGap(0):tt=M.sankey(),tt.iterations(t.sankeyIterations).size(te?[Re,Pe]:[Pe,Re]).nodeWidth(we).nodePadding(pe).nodeId(function(qr){return qr.pointNumber}).nodeAlign(Se).nodes(je).links(at);var Ve=tt();tt.nodePadding()=Fe||(_t=Fe-Ur.y0,_t>1e-6&&(Ur.y0+=_t,Ur.y1+=_t)),Fe=Ur.y1+pe})}function Bt(qr){var kr=qr.map(function(We,Ke){return{x0:We.x0,index:Ke}}).sort(function(We,Ke){return We.x0-Ke.x0}),Ur=[],_t=-1,Fe,Ye=-1/0,Ae;for(he=0;heYe+we&&(_t+=1,Fe=Le.x0),Ye=Le.x0,Ur[_t]||(Ur[_t]=[]),Ur[_t].push(Le),Ae=Fe-Le.x0,Le.x0+=Ae,Le.x1+=Ae}return Ur}if(j.node.x.length&&j.node.y.length){for(he=0;he0?" L "+j.targetX+" "+j.targetY:"")+"Z"):(le="M "+(j.targetX-V)+" "+(j.targetY-ae)+" L "+(j.rightInnerExtent-V)+" "+(j.targetY-ae)+" A "+(j.rightLargeArcRadius+ae)+" "+(j.rightSmallArcRadius+ae)+" 0 0 0 "+(j.rightFullExtent-ae-V)+" "+(j.targetY+j.rightSmallArcRadius)+" L "+(j.rightFullExtent-ae-V)+" "+j.verticalRightInnerExtent,ee&&te?le+=" A "+(j.rightLargeArcRadius+ae)+" "+(j.rightLargeArcRadius+ae)+" 0 0 0 "+(j.rightInnerExtent-ae-V)+" "+(j.verticalFullExtent+ae)+" L "+(j.rightFullExtent+ae-V-(j.rightLargeArcRadius-ae))+" "+(j.verticalFullExtent+ae)+" A "+(j.rightLargeArcRadius+ae)+" "+(j.rightLargeArcRadius+ae)+" 0 0 0 "+(j.leftFullExtent+ae)+" "+j.verticalLeftInnerExtent:ee?le+=" A "+(j.rightLargeArcRadius-ae)+" "+(j.rightSmallArcRadius-ae)+" 0 0 1 "+(j.rightFullExtent-V-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:le+=" A "+(j.rightLargeArcRadius+ae)+" "+(j.rightLargeArcRadius+ae)+" 0 0 0 "+(j.rightInnerExtent-V)+" "+(j.verticalFullExtent+ae)+" L "+j.leftInnerExtent+" "+(j.verticalFullExtent+ae)+" A "+(j.leftLargeArcRadius+ae)+" "+(j.leftLargeArcRadius+ae)+" 0 0 0 "+(j.leftFullExtent+ae)+" "+j.verticalLeftInnerExtent,le+=" 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,ee&&te?le+=" A "+(j.rightLargeArcRadius-ae)+" "+(j.rightSmallArcRadius-ae)+" 0 0 1 "+(j.leftFullExtent-ae-(j.rightLargeArcRadius-ae))+" "+(j.verticalFullExtent-ae)+" L "+(j.rightFullExtent+ae-V+(j.rightLargeArcRadius-ae))+" "+(j.verticalFullExtent-ae)+" A "+(j.rightLargeArcRadius-ae)+" "+(j.rightSmallArcRadius-ae)+" 0 0 1 "+(j.rightFullExtent+ae-V)+" "+j.verticalRightInnerExtent:ee?le+=" A "+(j.rightLargeArcRadius+ae)+" "+(j.rightLargeArcRadius+ae)+" 0 0 0 "+(j.leftFullExtent+ae)+" "+(j.verticalFullExtent+ae)+" L "+(j.rightFullExtent-V-ae)+" "+(j.verticalFullExtent+ae)+" A "+(j.rightLargeArcRadius+ae)+" "+(j.rightLargeArcRadius+ae)+" 0 0 0 "+(j.rightFullExtent+ae-V)+" "+j.verticalRightInnerExtent:le+=" A "+(j.leftLargeArcRadius-ae)+" "+(j.leftLargeArcRadius-ae)+" 0 0 1 "+j.leftInnerExtent+" "+(j.verticalFullExtent-ae)+" L "+(j.rightInnerExtent-V)+" "+(j.verticalFullExtent-ae)+" A "+(j.rightLargeArcRadius-ae)+" "+(j.rightLargeArcRadius-ae)+" 0 0 1 "+(j.rightFullExtent+ae-V)+" "+j.verticalRightInnerExtent,le+=" L "+(j.rightFullExtent+ae-V)+" "+(j.targetY+j.rightSmallArcRadius)+" A "+(j.rightLargeArcRadius-ae)+" "+(j.rightSmallArcRadius-ae)+" 0 0 1 "+(j.rightInnerExtent-V)+" "+(j.targetY+ae)+" L "+(j.targetX-V)+" "+(j.targetY+ae)+(V>0?" L "+j.targetX+" "+j.targetY:"")+"Z"),le}function u(){var Q=.5;function V(le){var ae=le.linkArrowLength;if(le.link.circular)return d(le.link,ae);var j=Math.abs((le.link.target.x0-le.link.source.x1)/2);ae>j&&(ae=j);var ee=le.link.source.x1,te=le.link.target.x0-ae,pe=_(ee,te),we=pe(Q),Se=pe(1-Q),Re=le.link.y0-le.link.width/2,Pe=le.link.y0+le.link.width/2,je=le.link.y1-le.link.width/2,at=le.link.y1+le.link.width/2,nt="M"+ee+","+Re,tt="C"+we+","+Re+" "+Se+","+je+" "+te+","+je,Ve="C"+Se+","+at+" "+we+","+Pe+" "+ee+","+Pe,he=ae>0?"L"+(te+ae)+","+(je+le.link.width/2):"";return he+="L"+te+","+at,nt+tt+he+Ve+"Z"}return V}function g(Q,V){var le=r(V.color),ae=t.nodePadAcross,j=Q.nodePad/2;V.dx=V.x1-V.x0,V.dy=V.y1-V.y0;var ee=V.dx,te=Math.max(.5,V.dy),pe="node_"+V.pointNumber;return V.group&&(pe=i.randstr()),V.trace=Q.trace,V.curveNumber=Q.trace.index,{index:V.pointNumber,key:pe,partOfGroup:V.partOfGroup||!1,group:V.group,traceId:Q.key,trace:Q.trace,node:V,nodePad:Q.nodePad,nodeLineColor:Q.nodeLineColor,nodeLineWidth:Q.nodeLineWidth,textFont:Q.textFont,size:Q.horizontal?Q.height:Q.width,visibleWidth:Math.ceil(ee),visibleHeight:te,zoneX:-ae,zoneY:-j,zoneWidth:ee+2*ae,zoneHeight:te+2*j,labelY:Q.horizontal?V.dy/2+1:V.dx/2+1,left:V.originalLayer===1,sizeAcross:Q.width,forceLayouts:Q.forceLayouts,horizontal:Q.horizontal,darkBackground:le.getBrightness()<=128,tinyColorHue:o.tinyRGB(le),tinyColorAlpha:le.getAlpha(),valueFormat:Q.valueFormat,valueSuffix:Q.valueSuffix,sankey:Q.sankey,graph:Q.graph,arrangement:Q.arrangement,uniqueNodeLabelPathId:[Q.guid,Q.key,pe].join("_"),interactionState:Q.interactionState,figure:Q}}function y(Q){Q.attr("transform",function(V){return n(V.node.x0.toFixed(3),V.node.y0.toFixed(3))})}function D(Q){Q.call(y)}function P(Q,V){Q.call(D),V.attr("d",u())}function z(Q){Q.attr("width",function(V){return V.node.x1-V.node.x0}).attr("height",function(V){return V.visibleHeight})}function F(Q){return Q.link.width>1||Q.linkLineWidth>0}function N(Q){var V=n(Q.translateX,Q.translateY);return V+(Q.horizontal?"matrix(1 0 0 1 0 0)":"matrix(0 1 1 0 0 0)")}function O(Q,V,le){Q.on(".basic",null).on("mouseover.basic",function(ae){!ae.interactionState.dragInProgress&&!ae.partOfGroup&&(le.hover(this,ae,V),ae.interactionState.hovered=[this,ae])}).on("mousemove.basic",function(ae){!ae.interactionState.dragInProgress&&!ae.partOfGroup&&(le.follow(this,ae),ae.interactionState.hovered=[this,ae])}).on("mouseout.basic",function(ae){!ae.interactionState.dragInProgress&&!ae.partOfGroup&&(le.unhover(this,ae,V),ae.interactionState.hovered=!1)}).on("click.basic",function(ae){ae.interactionState.hovered&&(le.unhover(this,ae,V),ae.interactionState.hovered=!1),!ae.interactionState.dragInProgress&&!ae.partOfGroup&&le.select(this,ae,V)})}function L(Q,V,le,ae){var j=S.behavior.drag().origin(function(ee){return{x:ee.node.x0+ee.visibleWidth/2,y:ee.node.y0+ee.visibleHeight/2}}).on("dragstart",function(ee){if(ee.arrangement!=="fixed"&&(i.ensureSingle(ae._fullLayout._infolayer,"g","dragcover",function(pe){ae._fullLayout._dragCover=pe}),i.raiseToTop(this),ee.interactionState.dragInProgress=ee.node,ce(ee.node),ee.interactionState.hovered&&(le.nodeEvents.unhover.apply(0,ee.interactionState.hovered),ee.interactionState.hovered=!1),ee.arrangement==="snap")){var te=ee.traceId+"|"+ee.key;ee.forceLayouts[te]?ee.forceLayouts[te].alpha(1):U(Q,te,ee,ae),B(Q,V,ee,te,ae)}}).on("drag",function(ee){if(ee.arrangement!=="fixed"){var te=S.event.x,pe=S.event.y;ee.arrangement==="snap"?(ee.node.x0=te-ee.visibleWidth/2,ee.node.x1=te+ee.visibleWidth/2,ee.node.y0=pe-ee.visibleHeight/2,ee.node.y1=pe+ee.visibleHeight/2):(ee.arrangement==="freeform"&&(ee.node.x0=te-ee.visibleWidth/2,ee.node.x1=te+ee.visibleWidth/2),pe=Math.max(0,Math.min(ee.size-ee.visibleHeight/2,pe)),ee.node.y0=pe-ee.visibleHeight/2,ee.node.y1=pe+ee.visibleHeight/2),ce(ee.node),ee.arrangement!=="snap"&&(ee.sankey.update(ee.graph),P(Q.filter(de(ee)),V))}}).on("dragend",function(ee){if(ee.arrangement!=="fixed"){ee.interactionState.dragInProgress=!1;for(var te=0;te0)window.requestAnimationFrame(ee);else{var we=le.node.originalX;le.node.x0=we-le.visibleWidth/2,le.node.x1=we+le.visibleWidth/2,$(le,j)}})}function W(Q,V,le,ae){return function(){for(var ee=0,te=0;te0&&ae.forceLayouts[V].alpha(0)}}function $(Q,V){for(var le=[],ae=[],j=0;j"),color:x(Y,"bgcolor")||t.addOpacity(ae.color,1),borderColor:x(Y,"bordercolor"),fontFamily:x(Y,"font.family"),fontSize:x(Y,"font.size"),fontColor:x(Y,"font.color"),fontWeight:x(Y,"font.weight"),fontStyle:x(Y,"font.style"),fontVariant:x(Y,"font.variant"),fontTextcase:x(Y,"font.textcase"),fontLineposition:x(Y,"font.lineposition"),fontShadow:x(Y,"font.shadow"),nameLength:x(Y,"namelength"),textAlign:x(Y,"align"),idealAlign:v.event.x"),color:x(Y,"bgcolor")||de.tinyColorHue,borderColor:x(Y,"bordercolor"),fontFamily:x(Y,"font.family"),fontSize:x(Y,"font.size"),fontColor:x(Y,"font.color"),fontWeight:x(Y,"font.weight"),fontStyle:x(Y,"font.style"),fontVariant:x(Y,"font.variant"),fontTextcase:x(Y,"font.textcase"),fontLineposition:x(Y,"font.lineposition"),fontShadow:x(Y,"font.shadow"),nameLength:x(Y,"namelength"),textAlign:x(Y,"align"),idealAlign:"left",hovertemplate:Y.hovertemplate,hovertemplateLabels:ee,eventData:[de.node]},{container:p._hoverlayer.node(),outerContainer:p._paper.node(),gd:A});n(we,.85),s(we)}}},ue=function(ce,de,Y){A._fullLayout.hovermode!==!1&&(v.select(ce).call(c,de,Y),de.node.trace.node.hoverinfo!=="skip"&&(de.node.fullData=de.node.trace,A.emit("plotly_unhover",{event:v.event,points:[de.node]})),e.loneUnhover(p._hoverlayer.node()))};M(A,b,E,{width:d.w,height:d.h,margin:{t:d.t,r:d.r,b:d.b,l:d.l}},{linkEvents:{hover:D,follow:L,unhover:U,select:y},nodeEvents:{hover:W,follow:$,unhover:ue,select:B}})}}}),yG=He({"src/traces/sankey/base_plot.js"(Z){"use strict";var q=pc().overrideAll,v=Wh().getModuleCalcData,_=q6(),S=Ym(),M=Kd(),e=Ap(),t=Af().prepSelect,r=sa(),o=so(),a="sankey";Z.name=a,Z.baseLayoutAttrOverrides=q({hoverlabel:S.hoverlabel},"plot","nested"),Z.plot=function(n){var s=v(n.calcdata,a)[0];_(n,s),Z.updateFx(n)},Z.clean=function(n,s,h,f){var m=f._has&&f._has(a),c=s._has&&s._has(a);m&&!c&&(f._paperdiv.selectAll(".sankey").remove(),f._paperdiv.selectAll(".bgsankey").remove())},Z.updateFx=function(n){for(var s=0;s0}q.exports=function(F,N,O,L){var U=F._fullLayout,B;w(O)&&L&&(B=L()),M.makeTraceGroups(U._indicatorlayer,N,"trace").each(function(W){var $=W[0],ue=$.trace,ce=v.select(this),de=ue._hasGauge,Y=ue._isAngular,X=ue._isBullet,Q=ue.domain,V={w:U._size.w*(Q.x[1]-Q.x[0]),h:U._size.h*(Q.y[1]-Q.y[0]),l:U._size.l+U._size.w*Q.x[0],r:U._size.r+U._size.w*(1-Q.x[1]),t:U._size.t+U._size.h*(1-Q.y[1]),b:U._size.b+U._size.h*Q.y[0]},le=V.l+V.w/2,ae=V.t+V.h/2,j=Math.min(V.w/2,V.h),ee=i.innerRadius*j,te,pe,we,Se=ue.align||"center";if(pe=ae,!de)te=V.l+l[Se]*V.w,we=function(ne){return g(ne,V.w,V.h)};else if(Y&&(te=le,pe=ae+j/2,we=function(ne){return y(ne,.9*ee)}),X){var Re=i.bulletPadding,Pe=1-i.bulletNumberDomainSize+Re;te=V.l+(Pe+(1-Pe)*l[Se])*V.w,we=function(ne){return g(ne,(i.bulletNumberDomainSize-Re)*V.w,V.h)}}p(F,ce,W,{numbersX:te,numbersY:pe,numbersScaler:we,transitionOpts:O,onComplete:B});var je,at;de&&(je={range:ue.gauge.axis.range,color:ue.gauge.bgcolor,line:{color:ue.gauge.bordercolor,width:0},thickness:1},at={range:ue.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:ue.gauge.bordercolor,width:ue.gauge.borderwidth},thickness:1});var nt=ce.selectAll("g.angular").data(Y?W:[]);nt.exit().remove();var tt=ce.selectAll("g.angularaxis").data(Y?W:[]);tt.exit().remove(),Y&&E(F,ce,W,{radius:j,innerRadius:ee,gauge:nt,layer:tt,size:V,gaugeBg:je,gaugeOutline:at,transitionOpts:O,onComplete:B});var Ve=ce.selectAll("g.bullet").data(X?W:[]);Ve.exit().remove();var he=ce.selectAll("g.bulletaxis").data(X?W:[]);he.exit().remove(),X&&A(F,ce,W,{gauge:Ve,layer:he,size:V,gaugeBg:je,gaugeOutline:at,transitionOpts:O,onComplete:B});var se=ce.selectAll("text.title").data(W);se.exit().remove(),se.enter().append("text").classed("title",!0),se.attr("text-anchor",function(){return X?T.right:T[ue.title.align]}).text(ue.title.text).call(a.font,ue.title.font).call(n.convertToTspans,F),se.attr("transform",function(){var ne=V.l+V.w*l[ue.title.align],Ce,Ze=i.titlePadding,rt=a.bBox(se.node());if(de){if(Y)if(ue.gauge.axis.visible){var Je=a.bBox(tt.node());Ce=Je.top-Ze-rt.bottom}else Ce=V.t+V.h/2-j/2-rt.bottom-Ze;X&&(Ce=pe-(rt.top+rt.bottom)/2,ne=V.l-i.bulletPadding*V.w)}else Ce=ue._numbersTop-Ze-rt.bottom;return t(ne,Ce)})})};function A(z,F,N,O){var L=N[0].trace,U=O.gauge,B=O.layer,W=O.gaugeBg,$=O.gaugeOutline,ue=O.size,ce=L.domain,de=O.transitionOpts,Y=O.onComplete,X,Q,V,le,ae;U.enter().append("g").classed("bullet",!0),U.attr("transform",t(ue.l,ue.t)),B.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),B.selectAll("g.xbulletaxistick,path,text").remove();var j=ue.h,ee=L.gauge.bar.thickness*j,te=ce.x[0],pe=ce.x[0]+(ce.x[1]-ce.x[0])*(L._hasNumber||L._hasDelta?1-i.bulletNumberDomainSize:1);X=u(z,L.gauge.axis),X._id="xbulletaxis",X.domain=[te,pe],X.setScale(),Q=s.calcTicks(X),V=s.makeTransTickFn(X),le=s.getTickSigns(X)[2],ae=ue.t+ue.h,X.visible&&(s.drawTicks(z,X,{vals:X.ticks==="inside"?s.clipEnds(X,Q):Q,layer:B,path:s.makeTickPath(X,ae,le),transFn:V}),s.drawLabels(z,X,{vals:Q,layer:B,transFn:V,labelFns:s.makeLabelFns(X,ae)}));function we(tt){tt.attr("width",function(Ve){return Math.max(0,X.c2p(Ve.range[1])-X.c2p(Ve.range[0]))}).attr("x",function(Ve){return X.c2p(Ve.range[0])}).attr("y",function(Ve){return .5*(1-Ve.thickness)*j}).attr("height",function(Ve){return Ve.thickness*j})}var Se=[W].concat(L.gauge.steps),Re=U.selectAll("g.bg-bullet").data(Se);Re.enter().append("g").classed("bg-bullet",!0).append("rect"),Re.select("rect").call(we).call(b),Re.exit().remove();var Pe=U.selectAll("g.value-bullet").data([L.gauge.bar]);Pe.enter().append("g").classed("value-bullet",!0).append("rect"),Pe.select("rect").attr("height",ee).attr("y",(j-ee)/2).call(b),w(de)?Pe.select("rect").transition().duration(de.duration).ease(de.easing).each("end",function(){Y&&Y()}).each("interrupt",function(){Y&&Y()}).attr("width",Math.max(0,X.c2p(Math.min(L.gauge.axis.range[1],N[0].y)))):Pe.select("rect").attr("width",typeof N[0].y=="number"?Math.max(0,X.c2p(Math.min(L.gauge.axis.range[1],N[0].y))):0),Pe.exit().remove();var je=N.filter(function(){return L.gauge.threshold.value||L.gauge.threshold.value===0}),at=U.selectAll("g.threshold-bullet").data(je);at.enter().append("g").classed("threshold-bullet",!0).append("line"),at.select("line").attr("x1",X.c2p(L.gauge.threshold.value)).attr("x2",X.c2p(L.gauge.threshold.value)).attr("y1",(1-L.gauge.threshold.thickness)/2*j).attr("y2",(1-(1-L.gauge.threshold.thickness)/2)*j).call(c.stroke,L.gauge.threshold.line.color).style("stroke-width",L.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 E(z,F,N,O){var L=N[0].trace,U=O.size,B=O.radius,W=O.innerRadius,$=O.gaugeBg,ue=O.gaugeOutline,ce=[U.l+U.w/2,U.t+U.h/2+B/2],de=O.gauge,Y=O.layer,X=O.transitionOpts,Q=O.onComplete,V=Math.PI/2;function le(St){var kt=L.gauge.axis.range[0],Bt=L.gauge.axis.range[1],Vt=(St-kt)/(Bt-kt)*Math.PI-V;return Vt<-V?-V:Vt>V?V:Vt}function ae(St){return v.svg.arc().innerRadius((W+B)/2-St/2*(B-W)).outerRadius((W+B)/2+St/2*(B-W)).startAngle(-V)}function j(St){St.attr("d",function(kt){return ae(kt.thickness).startAngle(le(kt.range[0])).endAngle(le(kt.range[1]))()})}var ee,te,pe,we;de.enter().append("g").classed("angular",!0),de.attr("transform",t(ce[0],ce[1])),Y.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),Y.selectAll("g.xangularaxistick,path,text").remove(),ee=u(z,L.gauge.axis),ee.type="linear",ee.range=L.gauge.axis.range,ee._id="xangularaxis",ee.ticklabeloverflow="allow",ee.setScale();var Se=function(St){return(ee.range[0]-St.x)/(ee.range[1]-ee.range[0])*Math.PI+Math.PI},Re={},Pe=s.makeLabelFns(ee,0),je=Pe.labelStandoff;Re.xFn=function(St){var kt=Se(St);return Math.cos(kt)*je},Re.yFn=function(St){var kt=Se(St),Bt=Math.sin(kt)>0?.2:1;return-Math.sin(kt)*(je+St.fontSize*Bt)+Math.abs(Math.cos(kt))*(St.fontSize*o)},Re.anchorFn=function(St){var kt=Se(St),Bt=Math.cos(kt);return Math.abs(Bt)<.1?"middle":Bt>0?"start":"end"},Re.heightFn=function(St,kt,Bt){var Vt=Se(St);return-.5*(1+Math.sin(Vt))*Bt};var at=function(St){return t(ce[0]+B*Math.cos(St),ce[1]-B*Math.sin(St))};pe=function(St){return at(Se(St))};var nt=function(St){var kt=Se(St);return at(kt)+"rotate("+-r(kt)+")"};if(te=s.calcTicks(ee),we=s.getTickSigns(ee)[2],ee.visible){we=ee.ticks==="inside"?-1:1;var tt=(ee.linewidth||1)/2;s.drawTicks(z,ee,{vals:te,layer:Y,path:"M"+we*tt+",0h"+we*ee.ticklen,transFn:nt}),s.drawLabels(z,ee,{vals:te,layer:Y,transFn:pe,labelFns:Re})}var Ve=[$].concat(L.gauge.steps),he=de.selectAll("g.bg-arc").data(Ve);he.enter().append("g").classed("bg-arc",!0).append("path"),he.select("path").call(j).call(b),he.exit().remove();var se=ae(L.gauge.bar.thickness),ne=de.selectAll("g.value-arc").data([L.gauge.bar]);ne.enter().append("g").classed("value-arc",!0).append("path");var Ce=ne.select("path");w(X)?(Ce.transition().duration(X.duration).ease(X.easing).each("end",function(){Q&&Q()}).each("interrupt",function(){Q&&Q()}).attrTween("d",d(se,le(N[0].lastY),le(N[0].y))),L._lastValue=N[0].y):Ce.attr("d",typeof N[0].y=="number"?se.endAngle(le(N[0].y)):"M0,0Z"),Ce.call(b),ne.exit().remove(),Ve=[];var Ze=L.gauge.threshold.value;(Ze||Ze===0)&&Ve.push({range:[Ze,Ze],color:L.gauge.threshold.color,line:{color:L.gauge.threshold.line.color,width:L.gauge.threshold.line.width},thickness:L.gauge.threshold.thickness});var rt=de.selectAll("g.threshold-arc").data(Ve);rt.enter().append("g").classed("threshold-arc",!0).append("path"),rt.select("path").call(j).call(b),rt.exit().remove();var Je=de.selectAll("g.gauge-outline").data([ue]);Je.enter().append("g").classed("gauge-outline",!0).append("path"),Je.select("path").call(j).call(b),Je.exit().remove()}function p(z,F,N,O){var L=N[0].trace,U=O.numbersX,B=O.numbersY,W=L.align||"center",$=T[W],ue=O.transitionOpts,ce=O.onComplete,de=M.ensureSingle(F,"g","numbers"),Y,X,Q,V=[];L._hasNumber&&V.push("number"),L._hasDelta&&(V.push("delta"),L.delta.position==="left"&&V.reverse());var le=de.selectAll("text").data(V);le.enter().append("text"),le.attr("text-anchor",function(){return $}).attr("class",function(at){return at}).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),le.exit().remove();function ae(at,nt,tt,Ve){if(at.match("s")&&tt>=0!=Ve>=0&&!nt(tt).slice(-1).match(x)&&!nt(Ve).slice(-1).match(x)){var he=at.slice().replace("s","f").replace(/\d+/,function(ne){return parseInt(ne)-1}),se=u(z,{tickformat:he});return function(ne){return Math.abs(ne)<1?s.tickText(se,ne).text:nt(ne)}}else return nt}function j(){var at=u(z,{tickformat:L.number.valueformat},L._range);at.setScale(),s.prepTicks(at);var nt=function(ne){return s.tickText(at,ne).text},tt=L.number.suffix,Ve=L.number.prefix,he=de.select("text.number");function se(){var ne=typeof N[0].y=="number"?Ve+nt(N[0].y)+tt:"-";he.text(ne).call(a.font,L.number.font).call(n.convertToTspans,z)}return w(ue)?he.transition().duration(ue.duration).ease(ue.easing).each("end",function(){se(),ce&&ce()}).each("interrupt",function(){se(),ce&&ce()}).attrTween("text",function(){var ne=v.select(this),Ce=S(N[0].lastY,N[0].y);L._lastValue=N[0].y;var Ze=ae(L.number.valueformat,nt,N[0].lastY,N[0].y);return function(rt){ne.text(Ve+Ze(Ce(rt))+tt)}}):se(),Y=D(Ve+nt(N[0].y)+tt,L.number.font,$,z),he}function ee(){var at=u(z,{tickformat:L.delta.valueformat},L._range);at.setScale(),s.prepTicks(at);var nt=function(rt){return s.tickText(at,rt).text},tt=L.delta.suffix,Ve=L.delta.prefix,he=function(rt){var Je=L.delta.relative?rt.relativeDelta:rt.delta;return Je},se=function(rt,Je){return rt===0||typeof rt!="number"||isNaN(rt)?"-":(rt>0?L.delta.increasing.symbol:L.delta.decreasing.symbol)+Ve+Je(rt)+tt},ne=function(rt){return rt.delta>=0?L.delta.increasing.color:L.delta.decreasing.color};L._deltaLastValue===void 0&&(L._deltaLastValue=he(N[0]));var Ce=de.select("text.delta");Ce.call(a.font,L.delta.font).call(c.fill,ne({delta:L._deltaLastValue}));function Ze(){Ce.text(se(he(N[0]),nt)).call(c.fill,ne(N[0])).call(n.convertToTspans,z)}return w(ue)?Ce.transition().duration(ue.duration).ease(ue.easing).tween("text",function(){var rt=v.select(this),Je=he(N[0]),St=L._deltaLastValue,kt=ae(L.delta.valueformat,nt,St,Je),Bt=S(St,Je);return L._deltaLastValue=Je,function(Vt){rt.text(se(Bt(Vt),kt)),rt.call(c.fill,ne({delta:Bt(Vt)}))}}).each("end",function(){Ze(),ce&&ce()}).each("interrupt",function(){Ze(),ce&&ce()}):Ze(),X=D(se(he(N[0]),nt),L.delta.font,$,z),Ce}var te=L.mode+L.align,pe;if(L._hasDelta&&(pe=ee(),te+=L.delta.position+L.delta.font.size+L.delta.font.family+L.delta.valueformat,te+=L.delta.increasing.symbol+L.delta.decreasing.symbol,Q=X),L._hasNumber&&(j(),te+=L.number.font.size+L.number.font.family+L.number.valueformat+L.number.suffix+L.number.prefix,Q=Y),L._hasDelta&&L._hasNumber){var we=[(Y.left+Y.right)/2,(Y.top+Y.bottom)/2],Se=[(X.left+X.right)/2,(X.top+X.bottom)/2],Re,Pe,je=.75*L.delta.font.size;L.delta.position==="left"&&(Re=P(L,"deltaPos",0,-1*(Y.width*l[L.align]+X.width*(1-l[L.align])+je),te,Math.min),Pe=we[1]-Se[1],Q={width:Y.width+X.width+je,height:Math.max(Y.height,X.height),left:X.left+Re,right:Y.right,top:Math.min(Y.top,X.top+Pe),bottom:Math.max(Y.bottom,X.bottom+Pe)}),L.delta.position==="right"&&(Re=P(L,"deltaPos",0,Y.width*(1-l[L.align])+X.width*l[L.align]+je,te,Math.max),Pe=we[1]-Se[1],Q={width:Y.width+X.width+je,height:Math.max(Y.height,X.height),left:Y.left,right:X.right+Re,top:Math.min(Y.top,X.top+Pe),bottom:Math.max(Y.bottom,X.bottom+Pe)}),L.delta.position==="bottom"&&(Re=null,Pe=X.height,Q={width:Math.max(Y.width,X.width),height:Y.height+X.height,left:Math.min(Y.left,X.left),right:Math.max(Y.right,X.right),top:Y.bottom-Y.height,bottom:Y.bottom+X.height}),L.delta.position==="top"&&(Re=null,Pe=Y.top,Q={width:Math.max(Y.width,X.width),height:Y.height+X.height,left:Math.min(Y.left,X.left),right:Math.max(Y.right,X.right),top:Y.bottom-Y.height-X.height,bottom:Y.bottom}),pe.attr({dx:Re,dy:Pe})}(L._hasNumber||L._hasDelta)&&de.attr("transform",function(){var at=O.numbersScaler(Q);te+=at[2];var nt=P(L,"numbersScale",1,at[0],te,Math.min),tt;L._scaleNumbers||(nt=1),L._isAngular?tt=B-nt*Q.bottom:tt=B-nt*(Q.top+Q.bottom)/2,L._numbersTop=nt*Q.top+tt;var Ve=Q[W];W==="center"&&(Ve=(Q.left+Q.right)/2);var he=U-nt*Ve;return he=P(L,"numbersTranslate",0,he,te,Math.max),t(he,tt)+e(nt)})}function b(z){z.each(function(F){c.stroke(v.select(this),F.line.color)}).each(function(F){c.fill(v.select(this),F.color)}).style("stroke-width",function(F){return F.line.width})}function d(z,F,N){return function(){var O=_(F,N);return function(L){return z.endAngle(O(L))()}}}function u(z,F,N){var O=z._fullLayout,L=M.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 W($,ue){return M.coerce(L,U,m,$,ue)}return h(L,U,W,B,O),f(L,U,W,B),U}function g(z,F,N){var O=Math.min(F/z.width,N/z.height);return[O,z,F+"x"+N]}function y(z,F){var N=Math.sqrt(z.width/2*(z.width/2)+z.height*z.height),O=F/N;return[O,z,F]}function D(z,F,N,O){var L=document.createElementNS("http://www.w3.org/2000/svg","text"),U=v.select(L);return U.text(z).attr("x",0).attr("y",0).attr("text-anchor",N).attr("data-unformatted",z).call(n.convertToTspans,O).call(a.font,F),a.bBox(U.node())}function P(z,F,N,O,L,U){var B="_cache"+F;z[B]&&z[B].key===L||(z[B]={key:L,value:N});var W=M.aggNums(U,null,[z[B].value,O],2);return z[B].value=W,W}}}),MG=He({"src/traces/indicator/index.js"(Z,q){"use strict";q.exports={moduleType:"trace",name:"indicator",basePlotModule:wG(),categories:["svg","noOpacity","noHover"],animatable:!0,attributes:V6(),supplyDefaults:TG().supplyDefaults,calc:AG().calc,plot:SG(),meta:{}}}}),EG=He({"lib/indicator.js"(Z,q){"use strict";q.exports=MG()}}),H6=He({"src/traces/table/attributes.js"(Z,q){"use strict";var v=$0(),_=rs().extendFlat,S=pc().overrideAll,M=tc(),e=wc().attributes,t=rf().descriptionOnlyNumbers,r=q.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:_({},v.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:_({},M({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:_({},v.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:_({},M({arrayOk:!0}))}},"calc","from-root")}}),kG=He({"src/traces/table/defaults.js"(Z,q){"use strict";var v=sa(),_=H6(),S=wc().defaults;function M(e,t){for(var r=e.columnorder||[],o=e.header.values.length,a=r.slice(0,o),i=a.slice().sort(function(h,f){return h-f}),n=a.map(function(h){return i.indexOf(h)}),s=n.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"}}}}),LG=He({"src/traces/table/data_preparation_helper.js"(Z,q){"use strict";var v=W6(),_=rs().extendFlat,S=ns(),M=hp().isTypedArray,e=hp().isArrayOrTypedArray;q.exports=function(m,c){var T=o(c.cells.values),l=function($){return $.slice(c.header.values.length,$.length)},x=o(c.header.values);x.length&&!x[0].length&&(x[0]=[""],x=o(x));var w=x.concat(l(T).map(function(){return a((x[0]||[""]).length)})),A=c.domain,E=Math.floor(m._fullLayout._size.w*(A.x[1]-A.x[0])),p=Math.floor(m._fullLayout._size.h*(A.y[1]-A.y[0])),b=c.header.values.length?w[0].map(function(){return c.header.height}):[v.emptyHeaderHeight],d=T.length?T[0].map(function(){return c.cells.height}):[],u=b.reduce(r,0),g=p-u,y=g+v.uplift,D=s(d,y),P=s(b,u),z=n(P,[]),F=n(D,z),N={},O=c._fullInput.columnorder;e(O)&&(O=Array.from(O)),O=O.concat(l(T.map(function($,ue){return ue})));var L=w.map(function($,ue){var ce=e(c.columnwidth)?c.columnwidth[Math.min(ue,c.columnwidth.length-1)]:c.columnwidth;return S(ce)?Number(ce):1}),U=L.reduce(r,0);L=L.map(function($){return $/U*E});var B=Math.max(t(c.header.line.width),t(c.cells.line.width)),W={key:c.uid+m._context.staticPlot,translateX:A.x[0]*m._fullLayout._size.w,translateY:m._fullLayout._size.h*(1-A.y[1]),size:m._fullLayout._size,width:E,maxLineWidth:B,height:p,columnOrder:O,groupHeight:p,rowBlocks:F,headerRowBlocks:z,scrollY:0,cells:_({},c.cells,{values:T}),headerCells:_({},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($,ue){var ce=N[$];N[$]=(ce||0)+1;var de=$+"__"+N[$];return{key:de,label:$,specIndex:ue,xIndex:O[ue],xScale:i,x:void 0,calcdata:void 0,columnWidth:L[ue]}})};return W.columns.forEach(function($){$.calcdata=W,$.x=i($)}),W};function t(f){if(e(f)){for(var m=0,c=0;c=m||p===f.length-1)&&(c[l]=w,w.key=E++,w.firstRowIndex=A,w.lastRowIndex=p,w=h(),l+=x,A=p+1,x=0);return c}function h(){return{firstRowIndex:null,lastRowIndex:null,rows:[]}}}}),PG=He({"src/traces/table/data_split_helpers.js"(Z){"use strict";var q=rs().extendFlat;Z.splitToPanels=function(_){var S=[0,0],M=q({},_,{key:"header",type:"header",page:0,prevPages:S,currentRepaint:[null,null],dragHandle:!0,values:_.calcdata.headerCells.values[_.specIndex],rowBlocks:_.calcdata.headerRowBlocks,calcdata:q({},_.calcdata,{cells:_.calcdata.headerCells})}),e=q({},_,{key:"cells1",type:"cells",page:0,prevPages:S,currentRepaint:[null,null],dragHandle:!1,values:_.calcdata.cells.values[_.specIndex],rowBlocks:_.calcdata.rowBlocks}),t=q({},_,{key:"cells2",type:"cells",page:1,prevPages:S,currentRepaint:[null,null],dragHandle:!1,values:_.calcdata.cells.values[_.specIndex],rowBlocks:_.calcdata.rowBlocks});return[e,t,M]},Z.splitToCells=function(_){var S=v(_);return(_.values||[]).slice(S[0],S[1]).map(function(M,e){var t=typeof M=="string"&&M.match(/[<$&> ]/)?"_keybuster_"+Math.random():"";return{keyWithinBlock:e+t,key:S[0]+e,column:_,calcdata:_.calcdata,page:_.page,rowBlocks:_.rowBlocks,value:M}})};function v(_){var S=_.rowBlocks[_.page],M=S?S.rows[0].rowIndex:0,e=S?M+S.rows.length:0;return[M,e]}}}),X6=He({"src/traces/table/plot.js"(Z,q){"use strict";var v=W6(),_=Vn(),S=sa(),M=S.numberFormat,e=Cv(),t=as(),r=su(),o=sa().raiseToTop,a=sa().strTranslate,i=sa().cancelTransition,n=LG(),s=PG(),h=$n();q.exports=function(te,pe){var we=!te._context.staticPlot,Se=te._fullLayout._paper.selectAll("."+v.cn.table).data(pe.map(function(Je){var St=e.unwrap(Je),kt=St.trace;return n(te,kt)}),e.keyFun);Se.exit().remove(),Se.enter().append("g").classed(v.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(Je){return Je.width+Je.size.l+Je.size.r}).attr("height",function(Je){return Je.height+Je.size.t+Je.size.b}).attr("transform",function(Je){return a(Je.translateX,Je.translateY)});var Re=Se.selectAll("."+v.cn.tableControlView).data(e.repeat,e.keyFun),Pe=Re.enter().append("g").classed(v.cn.tableControlView,!0).style("box-sizing","content-box");if(we){var je="onwheel"in document?"wheel":"mousewheel";Pe.on("mousemove",function(Je){Re.filter(function(St){return Je===St}).call(l,te)}).on(je,function(Je){if(!Je.scrollbarState.wheeling){Je.scrollbarState.wheeling=!0;var St=Je.scrollY+_.event.deltaY,kt=$(te,Re,null,St)(Je);kt||(_.event.stopPropagation(),_.event.preventDefault()),Je.scrollbarState.wheeling=!1}}).call(l,te,!0)}Re.attr("transform",function(Je){return a(Je.size.l,Je.size.t)});var at=Re.selectAll("."+v.cn.scrollBackground).data(e.repeat,e.keyFun);at.enter().append("rect").classed(v.cn.scrollBackground,!0).attr("fill","none"),at.attr("width",function(Je){return Je.width}).attr("height",function(Je){return Je.height}),Re.each(function(Je){t.setClipUrl(_.select(this),m(te,Je),te)});var nt=Re.selectAll("."+v.cn.yColumn).data(function(Je){return Je.columns},e.keyFun);nt.enter().append("g").classed(v.cn.yColumn,!0),nt.exit().remove(),nt.attr("transform",function(Je){return a(Je.x,0)}),we&&nt.call(_.behavior.drag().origin(function(Je){var St=_.select(this);return N(St,Je,-v.uplift),o(this),Je.calcdata.columnDragInProgress=!0,l(Re.filter(function(kt){return Je.calcdata.key===kt.key}),te),Je}).on("drag",function(Je){var St=_.select(this),kt=function(Ar){return(Je===Ar?_.event.x:Ar.x)+Ar.columnWidth/2};Je.x=Math.max(-v.overdrag,Math.min(Je.calcdata.width+v.overdrag-Je.columnWidth,_.event.x));var Bt=T(nt).filter(function(Ar){return Ar.calcdata.key===Je.calcdata.key}),Vt=Bt.sort(function(Ar,vr){return kt(Ar)-kt(vr)});Vt.forEach(function(Ar,vr){Ar.xIndex=vr,Ar.x=Je===Ar?Ar.x:Ar.xScale(Ar)}),nt.filter(function(Ar){return Je!==Ar}).transition().ease(v.transitionEase).duration(v.transitionDuration).attr("transform",function(Ar){return a(Ar.x,0)}),St.call(i).attr("transform",a(Je.x,-v.uplift))}).on("dragend",function(Je){var St=_.select(this),kt=Je.calcdata;Je.x=Je.xScale(Je),Je.calcdata.columnDragInProgress=!1,N(St,Je,0),z(te,kt,kt.columns.map(function(Bt){return Bt.xIndex}))})),nt.each(function(Je){t.setClipUrl(_.select(this),c(te,Je),te)});var tt=nt.selectAll("."+v.cn.columnBlock).data(s.splitToPanels,e.keyFun);tt.enter().append("g").classed(v.cn.columnBlock,!0).attr("id",function(Je){return Je.key}),tt.style("cursor",function(Je){return Je.dragHandle?"ew-resize":Je.calcdata.scrollbarState.barWiggleRoom?"ns-resize":"default"});var Ve=tt.filter(L),he=tt.filter(O);we&&he.call(_.behavior.drag().origin(function(Je){return _.event.stopPropagation(),Je}).on("drag",$(te,Re,-1)).on("dragend",function(){})),x(te,Re,Ve,tt),x(te,Re,he,tt);var se=Re.selectAll("."+v.cn.scrollAreaClip).data(e.repeat,e.keyFun);se.enter().append("clipPath").classed(v.cn.scrollAreaClip,!0).attr("id",function(Je){return m(te,Je)});var ne=se.selectAll("."+v.cn.scrollAreaClipRect).data(e.repeat,e.keyFun);ne.enter().append("rect").classed(v.cn.scrollAreaClipRect,!0).attr("x",-v.overdrag).attr("y",-v.uplift).attr("fill","none"),ne.attr("width",function(Je){return Je.width+2*v.overdrag}).attr("height",function(Je){return Je.height+v.uplift});var Ce=nt.selectAll("."+v.cn.columnBoundary).data(e.repeat,e.keyFun);Ce.enter().append("g").classed(v.cn.columnBoundary,!0);var Ze=nt.selectAll("."+v.cn.columnBoundaryClippath).data(e.repeat,e.keyFun);Ze.enter().append("clipPath").classed(v.cn.columnBoundaryClippath,!0),Ze.attr("id",function(Je){return c(te,Je)});var rt=Ze.selectAll("."+v.cn.columnBoundaryRect).data(e.repeat,e.keyFun);rt.enter().append("rect").classed(v.cn.columnBoundaryRect,!0).attr("fill","none"),rt.attr("width",function(Je){return Je.columnWidth+2*f(Je)}).attr("height",function(Je){return Je.calcdata.height+2*f(Je)+v.uplift}).attr("x",function(Je){return-f(Je)}).attr("y",function(Je){return-f(Je)}),W(null,he,Re)};function f(ee){return Math.ceil(ee.calcdata.maxLineWidth/2)}function m(ee,te){return"clip"+ee._fullLayout._uid+"_scrollAreaBottomClip_"+te.key}function c(ee,te){return"clip"+ee._fullLayout._uid+"_columnBoundaryClippath_"+te.calcdata.key+"_"+te.specIndex}function T(ee){return[].concat.apply([],ee.map(function(te){return te})).map(function(te){return te.__data__})}function l(ee,te,pe){function we(nt){var tt=nt.rowBlocks;return Q(tt,tt.length-1)+(tt.length?V(tt[tt.length-1],1/0):1)}var Se=ee.selectAll("."+v.cn.scrollbarKit).data(e.repeat,e.keyFun);Se.enter().append("g").classed(v.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,v.goldenRatio*v.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+v.scrollbarWidth/2+v.scrollbarOffset;return a(tt,U(nt))});var Re=Se.selectAll("."+v.cn.scrollbar).data(e.repeat,e.keyFun);Re.enter().append("g").classed(v.cn.scrollbar,!0);var Pe=Re.selectAll("."+v.cn.scrollbarSlider).data(e.repeat,e.keyFun);Pe.enter().append("g").classed(v.cn.scrollbarSlider,!0),Pe.attr("transform",function(nt){return a(0,nt.scrollbarState.topY||0)});var je=Pe.selectAll("."+v.cn.scrollbarGlyph).data(e.repeat,e.keyFun);je.enter().append("line").classed(v.cn.scrollbarGlyph,!0).attr("stroke","black").attr("stroke-width",v.scrollbarWidth).attr("stroke-linecap","round").attr("y1",v.scrollbarWidth/2),je.attr("y2",function(nt){return nt.scrollbarState.barLength-v.scrollbarWidth/2}).attr("stroke-opacity",function(nt){return nt.columnDragInProgress||!nt.scrollbarState.barWiggleRoom||pe?0:.4}),je.transition().delay(0).duration(0),je.transition().delay(v.scrollbarHideDelay).duration(v.scrollbarHideDuration).attr("stroke-opacity",0);var at=Re.selectAll("."+v.cn.scrollbarCaptureZone).data(e.repeat,e.keyFun);at.enter().append("line").classed(v.cn.scrollbarCaptureZone,!0).attr("stroke","white").attr("stroke-opacity",.01).attr("stroke-width",v.scrollbarCaptureWidth).attr("stroke-linecap","butt").attr("y1",0).on("mousedown",function(nt){var tt=_.event.y,Ve=this.getBoundingClientRect(),he=nt.scrollbarState,se=tt-Ve.top,ne=_.scale.linear().domain([0,he.scrollableAreaHeight]).range([0,he.totalHeight]).clamp(!0);he.topY<=se&&se<=he.bottomY||$(te,ee,null,ne(se-he.barLength/2))(nt)}).call(_.behavior.drag().origin(function(nt){return _.event.stopPropagation(),nt.scrollbarState.scrollbarScrollInProgress=!0,nt}).on("drag",$(te,ee)).on("dragend",function(){})),at.attr("y2",function(nt){return nt.scrollbarState.scrollableAreaHeight}),te._context.staticPlot&&(je.remove(),at.remove())}function x(ee,te,pe,we){var Se=w(pe),Re=A(Se);d(Re);var Pe=E(Re);g(Pe);var je=b(Re),at=p(je);u(at),y(at,te,we,ee),X(Re)}function w(ee){var te=ee.selectAll("."+v.cn.columnCells).data(e.repeat,e.keyFun);return te.enter().append("g").classed(v.cn.columnCells,!0),te.exit().remove(),te}function A(ee){var te=ee.selectAll("."+v.cn.columnCell).data(s.splitToCells,function(pe){return pe.keyWithinBlock});return te.enter().append("g").classed(v.cn.columnCell,!0),te.exit().remove(),te}function E(ee){var te=ee.selectAll("."+v.cn.cellRect).data(e.repeat,function(pe){return pe.keyWithinBlock});return te.enter().append("rect").classed(v.cn.cellRect,!0),te}function p(ee){var te=ee.selectAll("."+v.cn.cellText).data(e.repeat,function(pe){return pe.keyWithinBlock});return te.enter().append("text").classed(v.cn.cellText,!0).style("cursor",function(){return"auto"}).on("mousedown",function(){_.event.stopPropagation()}),te}function b(ee){var te=ee.selectAll("."+v.cn.cellTextHolder).data(e.repeat,function(pe){return pe.keyWithinBlock});return te.enter().append("g").classed(v.cn.cellTextHolder,!0).style("shape-rendering","geometricPrecision"),te}function d(ee){ee.each(function(te,pe){var we=te.calcdata.cells.font,Se=te.column.specIndex,Re={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)};te.rowNumber=te.key,te.align=F(te.calcdata.cells.align,Se,pe),te.cellBorderWidth=F(te.calcdata.cells.line.width,Se,pe),te.font=Re})}function u(ee){ee.each(function(te){t.font(_.select(this),te.font)})}function g(ee){ee.attr("width",function(te){return te.column.columnWidth}).attr("stroke-width",function(te){return te.cellBorderWidth}).each(function(te){var pe=_.select(this);h.stroke(pe,F(te.calcdata.cells.line.color,te.column.specIndex,te.rowNumber)),h.fill(pe,F(te.calcdata.cells.fill.color,te.column.specIndex,te.rowNumber))})}function y(ee,te,pe,we){ee.text(function(Se){var Re=Se.column.specIndex,Pe=Se.rowNumber,je=Se.value,at=typeof je=="string",nt=at&&je.match(/
/i),tt=!at||nt;Se.mayHaveMarkup=at&&je.match(/[<&>]/);var Ve=D(je);Se.latex=Ve;var he=Ve?"":F(Se.calcdata.cells.prefix,Re,Pe)||"",se=Ve?"":F(Se.calcdata.cells.suffix,Re,Pe)||"",ne=Ve?null:F(Se.calcdata.cells.format,Re,Pe)||null,Ce=he+(ne?M(ne)(Se.value):Se.value)+se,Ze;Se.wrappingNeeded=!Se.wrapped&&!tt&&!Ve&&(Ze=P(Ce)),Se.cellHeightMayIncrease=nt||Ve||Se.mayHaveMarkup||(Ze===void 0?P(Ce):Ze),Se.needsConvertToTspans=Se.mayHaveMarkup||Se.wrappingNeeded||Se.latex;var rt;if(Se.wrappingNeeded){var Je=v.wrapSplitCharacter===" "?Ce.replace(/Se&&we.push(Re),Se+=at}return we}function W(ee,te,pe){var we=T(te)[0];if(we!==void 0){var Se=we.rowBlocks,Re=we.calcdata,Pe=Q(Se,Se.length),je=we.calcdata.groupHeight-U(we),at=Re.scrollY=Math.max(0,Math.min(Pe-je,Re.scrollY)),nt=B(Se,at,je);nt.length===1&&(nt[0]===Se.length-1?nt.unshift(nt[0]-1):nt.push(nt[0]+1)),nt[0]%2&&nt.reverse(),te.each(function(tt,Ve){tt.page=nt[Ve],tt.scrollY=at}),te.attr("transform",function(tt){var Ve=Q(tt.rowBlocks,tt.page)-tt.scrollY;return a(0,Ve)}),ee&&(ue(ee,pe,te,nt,we.prevPages,we,0),ue(ee,pe,te,nt,we.prevPages,we,1),l(pe,ee))}}function $(ee,te,pe,we){return function(Re){var Pe=Re.calcdata?Re.calcdata:Re,je=te.filter(function(Ve){return Pe.key===Ve.key}),at=pe||Pe.scrollbarState.dragMultiplier,nt=Pe.scrollY;Pe.scrollY=we===void 0?Pe.scrollY+at*_.event.dy:we;var tt=je.selectAll("."+v.cn.yColumn).selectAll("."+v.cn.columnBlock).filter(O);return W(ee,tt,je),Pe.scrollY===nt}}function ue(ee,te,pe,we,Se,Re,Pe){var je=we[Pe]!==Se[Pe];je&&(clearTimeout(Re.currentRepaint[Pe]),Re.currentRepaint[Pe]=setTimeout(function(){var at=pe.filter(function(nt,tt){return tt===Pe&&we[tt]!==Se[tt]});x(ee,te,at,pe),Se[Pe]=we[Pe]}))}function ce(ee,te,pe,we){return function(){var Re=_.select(te.parentNode);Re.each(function(Pe){var je=Pe.fragments;Re.selectAll("tspan.line").each(function(Ce,Ze){je[Ze].width=this.getComputedTextLength()});var at=je[je.length-1].width,nt=je.slice(0,-1),tt=[],Ve,he,se=0,ne=Pe.column.columnWidth-2*v.cellPad;for(Pe.value="";nt.length;)Ve=nt.shift(),he=Ve.width+at,se+he>ne&&(Pe.value+=tt.join(v.wrapSpacer)+v.lineBreaker,tt=[],se=0),tt.push(Ve.text),se+=he;se&&(Pe.value+=tt.join(v.wrapSpacer)),Pe.wrapped=!0}),Re.selectAll("tspan.line").remove(),y(Re.select("."+v.cn.cellText),pe,ee,we),_.select(te.parentNode.parentNode).call(X)}}function de(ee,te,pe,we,Se){return function(){if(!Se.settledY){var Pe=_.select(te.parentNode),je=ae(Se),at=Se.key-je.firstRowIndex,nt=je.rows[at].rowHeight,tt=Se.cellHeightMayIncrease?te.parentNode.getBoundingClientRect().height+2*v.cellPad:nt,Ve=Math.max(tt,nt),he=Ve-je.rows[at].rowHeight;he&&(je.rows[at].rowHeight=Ve,ee.selectAll("."+v.cn.columnCell).call(X),W(null,ee.filter(O),0),l(pe,we,!0)),Pe.attr("transform",function(){var se=this,ne=se.parentNode,Ce=ne.getBoundingClientRect(),Ze=_.select(se.parentNode).select("."+v.cn.cellRect).node().getBoundingClientRect(),rt=se.transform.baseVal.consolidate(),Je=Ze.top-Ce.top+(rt?rt.matrix.f:v.cellPad);return a(Y(Se,_.select(se.parentNode).select("."+v.cn.cellTextHolder).node().getBoundingClientRect().width),Je)}),Se.settledY=!0}}}function Y(ee,te){switch(ee.align){case"left":return v.cellPad;case"right":return ee.column.columnWidth-(te||0)-v.cellPad;case"center":return(ee.column.columnWidth-(te||0))/2;default:return v.cellPad}}function X(ee){ee.attr("transform",function(te){var pe=te.rowBlocks[0].auxiliaryBlocks.reduce(function(Pe,je){return Pe+V(je,1/0)},0),we=ae(te),Se=V(we,te.key),Re=Se+pe;return a(0,Re)}).selectAll("."+v.cn.cellRect).attr("height",function(te){return j(ae(te),te.key).rowHeight})}function Q(ee,te){for(var pe=0,we=te-1;we>=0;we--)pe+=le(ee[we]);return pe}function V(ee,te){for(var pe=0,we=0;weM.length&&(S=S.slice(0,M.length)):S=[],t=0;t90&&(m-=180,i=-i),{angle:m,flip:i,p:_.c2p(e,S,M),offsetMultplier:n}}}}),jG=He({"src/traces/carpet/plot.js"(Z,q){"use strict";var v=Vn(),_=as(),S=Z6(),M=Y6(),e=UG(),t=su(),r=sa(),o=r.strRotate,a=r.strTranslate,i=uh();q.exports=function(x,w,A,E){var p=x._context.staticPlot,b=w.xaxis,d=w.yaxis,u=x._fullLayout,g=u._clips;r.makeTraceGroups(E,A,"trace").each(function(y){var D=v.select(this),P=y[0],z=P.trace,F=z.aaxis,N=z.baxis,O=r.ensureSingle(D,"g","minorlayer"),L=r.ensureSingle(D,"g","majorlayer"),U=r.ensureSingle(D,"g","boundarylayer"),B=r.ensureSingle(D,"g","labellayer");D.style("opacity",z.opacity),s(b,d,L,F,"a",F._gridlines,!0,p),s(b,d,L,N,"b",N._gridlines,!0,p),s(b,d,O,F,"a",F._minorgridlines,!0,p),s(b,d,O,N,"b",N._minorgridlines,!0,p),s(b,d,U,F,"a-boundary",F._boundarylines,p),s(b,d,U,N,"b-boundary",N._boundarylines,p);var W=h(x,b,d,z,P,B,F._labels,"a-label"),$=h(x,b,d,z,P,B,N._labels,"b-label");f(x,B,z,P,b,d,W,$),n(z,P,g,b,d)})};function n(l,x,w,A,E){var p,b,d,u,g=w.select("#"+l._clipPathId);g.size()||(g=w.append("clipPath").classed("carpetclip",!0));var y=r.ensureSingle(g,"path","carpetboundary"),D=x.clipsegments,P=[];for(u=0;u0?"start":"end","data-notex":1}).call(_.font,D.font).text(D.text).call(t.convertToTspans,l),L=_.bBox(this);O.attr("transform",a(z.p[0],z.p[1])+o(z.angle)+a(D.axis.labelpadding*N,L.height*.3)),g=Math.max(g,L.width+D.axis.labelpadding)}),u.exit().remove(),y.maxExtent=g,y}function f(l,x,w,A,E,p,b,d){var u,g,y,D,P=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*(P+z),g=F,y=w.ab2xy(u,g,!0),D=w.dxyda_rough(u,g),b.angle===void 0&&r.extendFlat(b,e(w,E,p,y,w.dxydb_rough(u,g))),T(l,x,w,A,y,D,w.aaxis,E,p,b,"a-title"),u=P,g=.5*(F+N),y=w.ab2xy(u,g,!0),D=w.dxydb_rough(u,g),d.angle===void 0&&r.extendFlat(d,e(w,E,p,y,w.dxyda_rough(u,g))),T(l,x,w,A,y,D,w.baxis,E,p,d,"b-title")}var m=i.LINE_SPACING,c=(1-i.MID_SHIFT)/m+1;function T(l,x,w,A,E,p,b,d,u,g,y){var D=[];b.title.text&&D.push(b.title.text);var P=x.selectAll("text."+y).data(D),z=g.maxExtent;P.enter().append("text").classed(y,!0),P.each(function(){var F=e(w,d,u,E,p);["start","both"].indexOf(b.showticklabels)===-1&&(z=0);var N=b.title.font.size;z+=N+b.title.offset;var O=g.angle+(g.flip<0?180:0),L=(O-F.angle+450)%360,U=L>90&&L<270,B=v.select(this);B.text(b.title.text).call(t.convertToTspans,l),U&&(z=(-t.lineCount(B)+c)*m*N-z),B.attr("transform",a(F.p[0],F.p[1])+o(F.angle)+a(0,z)).attr("text-anchor","middle").call(_.font,b.title.font)}),P.exit().remove()}}}),qG=He({"src/traces/carpet/cheater_basis.js"(Z,q){"use strict";var v=sa().isArrayOrTypedArray;q.exports=function(_,S,M){var e,t,r,o,a,i,n=[],s=v(_)?_.length:_,h=v(S)?S.length:S,f=v(_)?_:null,m=v(S)?S:null;f&&(r=(f.length-1)/(f[f.length-1]-f[0])/(s-1)),m&&(o=(m.length-1)/(m[m.length-1]-m[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&&(V=M.dxydi([],W-1,ue,0,ce),ee.push(de[0]+V[0]/3),te.push(de[1]+V[1]/3),le=M.dxydi([],W-1,ue,1,ce),ee.push(Q[0]-le[0]/3),te.push(Q[1]-le[1]/3)),ee.push(Q[0]),te.push(Q[1]),de=Q;else for(W=M.a2i(B),Y=Math.floor(Math.max(0,Math.min(F-2,W))),X=W-Y,pe.length=F,pe.crossLength=N,pe.xy=function(we){return M.evalxy([],W,we)},pe.dxy=function(we,Se){return M.dxydj([],Y,we,X,Se)},$=0;$0&&(ae=M.dxydj([],Y,$-1,X,0),ee.push(de[0]+ae[0]/3),te.push(de[1]+ae[1]/3),j=M.dxydj([],Y,$-1,X,1),ee.push(Q[0]-j[0]/3),te.push(Q[1]-j[1]/3)),ee.push(Q[0]),te.push(Q[1]),de=Q;return pe.axisLetter=e,pe.axis=E,pe.crossAxis=g,pe.value=B,pe.constvar=t,pe.index=f,pe.x=ee,pe.y=te,pe.smoothing=g.smoothing,pe}function U(B){var W,$,ue,ce,de,Y=[],X=[],Q={};if(Q.length=A.length,Q.crossLength=u.length,e==="b")for(ue=Math.max(0,Math.min(N-2,B)),de=Math.min(1,Math.max(0,B-ue)),Q.xy=function(V){return M.evalxy([],V,B)},Q.dxy=function(V,le){return M.dxydi([],V,ue,le,de)},W=0;WA.length-1)&&p.push(_(U(o),{color:E.gridcolor,width:E.gridwidth,dash:E.griddash}));for(f=s;fA.length-1)&&!(T<0||T>A.length-1))for(l=A[a],x=A[T],r=0;rA[A.length-1])&&b.push(_(L(c),{color:E.minorgridcolor,width:E.minorgridwidth,dash:E.minorgriddash})));E.startline&&d.push(_(U(0),{color:E.startlinecolor,width:E.startlinewidth})),E.endline&&d.push(_(U(A.length-1),{color:E.endlinecolor,width:E.endlinewidth}))}else{for(i=5e-15,n=[Math.floor((A[A.length-1]-E.tick0)/E.dtick*(1+i)),Math.ceil((A[0]-E.tick0)/E.dtick/(1+i))].sort(function(B,W){return B-W}),s=n[0],h=n[1],f=s;f<=h;f++)m=E.tick0+E.dtick*f,p.push(_(L(m),{color:E.gridcolor,width:E.gridwidth,dash:E.griddash}));for(f=s-1;fA[A.length-1])&&b.push(_(L(c),{color:E.minorgridcolor,width:E.minorgridwidth,dash:E.minorgriddash}));E.startline&&d.push(_(L(A[0]),{color:E.startlinecolor,width:E.startlinewidth})),E.endline&&d.push(_(L(A[A.length-1]),{color:E.endlinecolor,width:E.endlinewidth}))}}}}),HG=He({"src/traces/carpet/calc_labels.js"(Z,q){"use strict";var v=Wo(),_=rs().extendFlat;q.exports=function(M,e){var t,r,o,a,i,n=e._labels=[],s=e._gridlines;for(t=0;t=0;t--)r[s-t]=_[h][t],o[s-t]=S[h][t];for(a.push({x:r,y:o,bicubic:i}),t=h,r=[],o=[];t>=0;t--)r[h-t]=_[t][0],o[h-t]=S[t][0];return a.push({x:r,y:o,bicubic:n}),a}}}),XG=He({"src/traces/carpet/smooth_fill_2d_array.js"(Z,q){"use strict";var v=sa();q.exports=function(S,M,e){var t,r,o,a=[],i=[],n=S[0].length,s=S.length;function h($,ue){var ce=0,de,Y=0;return $>0&&(de=S[ue][$-1])!==void 0&&(Y++,ce+=de),$0&&(de=S[ue-1][$])!==void 0&&(Y++,ce+=de),ue0&&r0&&tu);return v.log("Smoother converged to",g,"after",D,"iterations"),S}}}),ZG=He({"src/traces/carpet/constants.js"(Z,q){"use strict";q.exports={RELATIVE_CULL_TOLERANCE:1e-6}}}),YG=He({"src/traces/carpet/catmull_rom.js"(Z,q){"use strict";var v=.5;q.exports=function(S,M,e,t){var r=S[0]-M[0],o=S[1]-M[1],a=e[0]-M[0],i=e[1]-M[1],n=Math.pow(r*r+o*o,v/2),s=Math.pow(a*a+i*i,v/2),h=(s*s*r-n*n*a)*t,f=(s*s*o-n*n*i)*t,m=s*(n+s)*3,c=n*(n+s)*3;return[[M[0]+(m&&h/m),M[1]+(m&&f/m)],[M[0]-(c&&h/c),M[1]-(c&&f/c)]]}}}),KG=He({"src/traces/carpet/compute_control_points.js"(Z,q){"use strict";var v=YG(),_=sa().ensureArray;function S(M,e,t){var r=-.5*t[0]+1.5*e[0],o=-.5*t[1]+1.5*e[1];return[(2*r+M[0])/3,(2*o+M[1])/3]}q.exports=function(e,t,r,o,a,i){var n,s,h,f,m,c,T,l,x,w,A=r[0].length,E=r.length,p=a?3*A-2:A,b=i?3*E-2:E;for(e=_(e,b),t=_(t,b),h=0;hm&&pT&&bc||bl},o.setScale=function(){var p=o._x,b=o._y,d=S(o._xctrl,o._yctrl,p,b,h.smoothing,f.smoothing);o._xctrl=d[0],o._yctrl=d[1],o.evalxy=M([o._xctrl,o._yctrl],n,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(p){var b=Math.max(0,Math.floor(p[0]),n-2),d=p[0]-b;return(1-d)*a[b]+d*a[b+1]},o.j2b=function(p){var b=Math.max(0,Math.floor(p[1]),n-2),d=p[1]-b;return(1-d)*i[b]+d*i[b+1]},o.ij2ab=function(p){return[o.i2a(p[0]),o.j2b(p[1])]},o.a2i=function(p){var b=Math.max(0,Math.min(_(p,a),n-2)),d=a[b],u=a[b+1];return Math.max(0,Math.min(n-1,b+(p-d)/(u-d)))},o.b2j=function(p){var b=Math.max(0,Math.min(_(p,i),s-2)),d=i[b],u=i[b+1];return Math.max(0,Math.min(s-1,b+(p-d)/(u-d)))},o.ab2ij=function(p){return[o.a2i(p[0]),o.b2j(p[1])]},o.i2c=function(p,b){return o.evalxy([],p,b)},o.ab2xy=function(p,b,d){if(!d&&(pa[n-1]|bi[s-1]))return[!1,!1];var u=o.a2i(p),g=o.b2j(b),y=o.evalxy([],u,g);if(d){var D=0,P=0,z=[],F,N,O,L;pa[n-1]?(F=n-2,N=1,D=(p-a[n-1])/(a[n-1]-a[n-2])):(F=Math.max(0,Math.min(n-2,Math.floor(u))),N=u-F),bi[s-1]?(O=s-2,L=1,P=(b-i[s-1])/(i[s-1]-i[s-2])):(O=Math.max(0,Math.min(s-2,Math.floor(g))),L=g-O),D&&(o.dxydi(z,F,O,N,L),y[0]+=z[0]*D,y[1]+=z[1]*D),P&&(o.dxydj(z,F,O,N,L),y[0]+=z[0]*P,y[1]+=z[1]*P)}return y},o.c2p=function(p,b,d){return[b.c2p(p[0]),d.c2p(p[1])]},o.p2x=function(p,b,d){return[b.p2c(p[0]),d.p2c(p[1])]},o.dadi=function(p){var b=Math.max(0,Math.min(a.length-2,p));return a[b+1]-a[b]},o.dbdj=function(p){var b=Math.max(0,Math.min(i.length-2,p));return i[b+1]-i[b]},o.dxyda=function(p,b,d,u){var g=o.dxydi(null,p,b,d,u),y=o.dadi(p,d);return[g[0]/y,g[1]/y]},o.dxydb=function(p,b,d,u){var g=o.dxydj(null,p,b,d,u),y=o.dbdj(b,u);return[g[0]/y,g[1]/y]},o.dxyda_rough=function(p,b,d){var u=x*(d||.1),g=o.ab2xy(p+u,b,!0),y=o.ab2xy(p-u,b,!0);return[(g[0]-y[0])*.5/u,(g[1]-y[1])*.5/u]},o.dxydb_rough=function(p,b,d){var u=w*(d||.1),g=o.ab2xy(p,b+u,!0),y=o.ab2xy(p,b-u,!0);return[(g[0]-y[0])*.5/u,(g[1]-y[1])*.5/u]},o.dpdx=function(p){return p._m},o.dpdy=function(p){return p._m}}}}),tH=He({"src/traces/carpet/calc.js"(Z,q){"use strict";var v=Wo(),_=sa().isArray1D,S=qG(),M=VG(),e=GG(),t=HG(),r=WG(),o=Y2(),a=XG(),i=Z2(),n=eH();q.exports=function(h,f){var m=v.getFromId(h,f.xaxis),c=v.getFromId(h,f.yaxis),T=f.aaxis,l=f.baxis,x=f.x,w=f.y,A=[];x&&_(x)&&A.push("x"),w&&_(w)&&A.push("y"),A.length&&i(f,T,l,"a","b",A);var E=f._a=f._a||f.a,p=f._b=f._b||f.b;x=f._x||f.x,w=f._y||f.y;var b={};if(f._cheater){var d=T.cheatertype==="index"?E.length:E,u=l.cheatertype==="index"?p.length:p;x=S(d,u,f.cheaterslope)}f._x=x=o(x),f._y=w=o(w),a(x,E,p),a(w,E,p),n(f),f.setScale();var g=M(x),y=M(w),D=.5*(g[1]-g[0]),P=.5*(g[1]+g[0]),z=.5*(y[1]-y[0]),F=.5*(y[1]+y[0]),N=1.3;return g=[P-D*N,P+D*N],y=[F-z*N,F+z*N],f._extremes[m._id]=v.findExtremes(m,g,{padded:!0}),f._extremes[c._id]=v.findExtremes(c,y,{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=x,b.y=w,b.a=E,b.b=p,[b]}}}),rH=He({"src/traces/carpet/index.js"(Z,q){"use strict";q.exports={attributes:PT(),supplyDefaults:NG(),plot:jG(),calc:tH(),animatable:!0,isContainer:!0,moduleType:"trace",name:"carpet",basePlotModule:Kf(),categories:["cartesian","svg","carpet","carpetAxis","notLegendIsolatable","noMultiCategory","noHover","noSortingByValue"],meta:{}}}}),aH=He({"lib/carpet.js"(Z,q){"use strict";q.exports=rH()}}),K6=He({"src/traces/scattercarpet/attributes.js"(Z,q){"use strict";var v=$d(),_=af(),S=au(),{hovertemplateAttrs:M,texttemplateAttrs:e,templatefallbackAttrs:t}=$l(),r=ku(),o=rs().extendFlat,a=_.marker,i=_.line,n=a.line;q.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:o({},_.mode,{dflt:"markers"}),text:o({},_.text,{}),texttemplate:e({editType:"plot"},{keys:["a","b","text"]}),texttemplatefallback:t({editType:"plot"}),hovertext:o({},_.hovertext,{}),line:{color:i.color,width:i.width,dash:i.dash,backoff:i.backoff,shape:o({},i.shape,{values:["linear","spline"]}),smoothing:i.smoothing,editType:"calc"},connectgaps:_.connectgaps,fill:o({},_.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:v(),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:n.width,dash:n.dash,editType:"calc"},r("marker.line")),gradient:a.gradient,editType:"calc"},r("marker")),textfont:_.textfont,textposition:_.textposition,selected:_.selected,unselected:_.unselected,hoverinfo:o({},S.hoverinfo,{flags:["a","b","text","name"]}),hoveron:_.hoveron,hovertemplate:M(),hovertemplatefallback:t(),zorder:_.zorder}}}),iH=He({"src/traces/scattercarpet/defaults.js"(Z,q){"use strict";var v=sa(),_=Tv(),S=Fu(),M=md(),e=Dd(),t=o1(),r=zd(),o=ev(),a=K6();q.exports=function(n,s,h,f){function m(E,p){return v.coerce(n,s,a,E,p)}m("carpet"),s.xaxis="x",s.yaxis="y";var c=m("a"),T=m("b"),l=Math.min(c.length,T.length);if(!l){s.visible=!1;return}s._length=l,m("text"),m("texttemplate"),m("texttemplatefallback"),m("hovertext");var x=l<_.PTS_LINESONLY?"lines+markers":"lines";m("mode",x),S.hasMarkers(s)&&M(n,s,h,f,m,{gradient:!0}),S.hasLines(s)&&(e(n,s,h,f,m,{backoff:!0}),t(n,s,m),m("connectgaps")),S.hasText(s)&&r(n,s,f,m);var w=[];(S.hasMarkers(s)||S.hasText(s))&&(m("marker.maxdisplayed"),w.push("points")),m("fill"),s.fill!=="none"&&(o(n,s,h,m),S.hasLines(s)||t(n,s,m)),(s.fill==="tonext"||s.fill==="toself")&&w.push("fills");var A=m("hoveron",w.join("+")||"points");A!=="fills"&&(m("hovertemplate"),m("hovertemplatefallback")),m("zorder"),v.coerceSelectionMarkerOpacity(s,m)}}}),nH=He({"src/traces/scattercarpet/format_labels.js"(Z,q){"use strict";q.exports=function(_,S){var M={},e=S._carpet,t=e.ab2ij([_.a,_.b]),r=Math.floor(t[0]),o=t[0]-r,a=Math.floor(t[1]),i=t[1]-a,n=e.evalxy([],r,a,o,i);return M.yLabel=n[1].toFixed(3),M}}}),IT=He({"src/traces/carpet/lookup_carpetid.js"(Z,q){"use strict";q.exports=function(v,_){for(var S=v._fullData.length,M,e=0;e0?b=E.labelprefix.replace(/ = $/,""):b=E._hovertitle,l.push(b+": "+p.toFixed(3)+E.labelsuffix)}if(!m.hovertemplate){var w=f.hi||m.hoverinfo,A=w.split("+");A.indexOf("all")!==-1&&(A=["a","b","text"]),A.indexOf("a")!==-1&&x(c.aaxis,f.a),A.indexOf("b")!==-1&&x(c.baxis,f.b),l.push("y: "+a.yLabel),A.indexOf("text")!==-1&&_(f,m,l),a.extraText=l.join("
")}return o}}}),uH=He({"src/traces/scattercarpet/event_data.js"(Z,q){"use strict";q.exports=function(_,S,M,e,t){var r=e[t];return _.a=r.a,_.b=r.b,_.y=r.y,_}}}),cH=He({"src/traces/scattercarpet/index.js"(Z,q){"use strict";q.exports={attributes:K6(),supplyDefaults:iH(),colorbar:dp(),formatLabels:nH(),calc:oH(),plot:sH(),style:Qp().style,styleOnSelect:Qp().styleOnSelect,hoverPoints:lH(),selectPoints:c1(),eventData:uH(),moduleType:"trace",name:"scattercarpet",basePlotModule:Kf(),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}}}),fH=He({"lib/scattercarpet.js"(Z,q){"use strict";q.exports=cH()}}),J6=He({"src/traces/contourcarpet/attributes.js"(Z,q){"use strict";var v=p1(),_=V_(),S=ku(),M=rs().extendFlat,e=_.contours;q.exports=M({carpet:{valType:"string",editType:"calc"},z:v.z,a:v.x,a0:v.x0,da:v.dx,b:v.y,b0:v.y0,db:v.dy,text:v.text,hovertext:v.hovertext,transpose:v.transpose,atype:v.xtype,btype:v.ytype,fillcolor:_.fillcolor,autocontour:_.autocontour,ncontours:_.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:_.line.color,width:_.line.width,dash:_.line.dash,smoothing:_.line.smoothing,editType:"plot"},zorder:_.zorder},S("",{cLetter:"z",autoColorDflt:!1}))}}),$6=He({"src/traces/contourcarpet/defaults.js"(Z,q){"use strict";var v=sa(),_=X2(),S=J6(),M=TS(),e=s3(),t=l3();q.exports=function(o,a,i,n){function s(c,T){return v.coerce(o,a,S,c,T)}function h(c){return v.coerce2(o,a,S,c)}if(s("carpet"),o.a&&o.b){var f=_(o,a,s,n,"a","b");if(!f){a.visible=!1;return}s("text");var m=s("contours.type")==="constraint";m?M(o,a,s,n,i,{hasHover:!1}):(e(o,a,s,h),t(o,a,s,n,{hasHover:!1}))}else a._defaultColor=i,a._length=null;s("zorder")}}}),hH=He({"src/traces/contourcarpet/calc.js"(Z,q){"use strict";var v=Tp(),_=sa(),S=Z2(),M=Y2(),e=K2(),t=J2(),r=sS(),o=$6(),a=IT(),i=dS();q.exports=function(h,f){var m=f._carpetTrace=a(h,f);if(!(!m||!m.visible||m.visible==="legendonly")){if(!f.a||!f.b){var c=h.data[m.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=n(h,f);return i(f,f._z),l}};function n(s,h){var f=h._carpetTrace,m=f.aaxis,c=f.baxis,T,l,x,w,A,E,p;m._minDtick=0,c._minDtick=0,_.isArray1D(h.z)&&S(h,m,c,"a","b",["z"]),T=h._a=h._a||h.a,w=h._b=h._b||h.b,T=T?m.makeCalcdata(h,"_a"):[],w=w?c.makeCalcdata(h,"_b"):[],l=h.a0||0,x=h.da||1,A=h.b0||0,E=h.db||1,p=h._z=M(h._z||h.z,h.transpose),h._emptypoints=t(p),e(p,h._emptypoints);var b=_.maxRowLength(p),d=h.xtype==="scaled"?"":T,u=r(h,d,l,x,b,m),g=h.ytype==="scaled"?"":w,y=r(h,g,A,E,p.length,c),D={a:u,b:y,z:p};return h.contours.type==="levels"&&h.contours.coloring!=="none"&&v(s,h,{vals:p,containerStr:"",cLetter:"z"}),[D]}}}),pH=He({"src/traces/carpet/axis_aligned_line.js"(Z,q){"use strict";var v=sa().isArrayOrTypedArray;q.exports=function(_,S,M,e){var t,r,o,a,i,n,s,h,f,m,c,T,l,x=v(M)?"a":"b",w=x==="a"?_.aaxis:_.baxis,A=w.smoothing,E=x==="a"?_.a2i:_.b2j,p=x==="a"?M:e,b=x==="a"?e:M,d=x==="a"?S.a.length:S.b.length,u=x==="a"?S.b.length:S.a.length,g=Math.floor(x==="a"?_.b2j(b):_.a2i(b)),y=x==="a"?function(ue){return _.evalxy([],ue,g)}:function(ue){return _.evalxy([],g,ue)};A&&(o=Math.max(0,Math.min(u-2,g)),a=g-o,r=x==="a"?function(ue,ce){return _.dxydi([],ue,o,ce,a)}:function(ue,ce){return _.dxydj([],o,ue,a,ce)});var D=E(p[0]),P=E(p[1]),z=D0?Math.floor:Math.ceil,O=z>0?Math.ceil:Math.floor,L=z>0?Math.min:Math.max,U=z>0?Math.max:Math.min,B=N(D+F),W=O(P-F);s=y(D);var $=[[s]];for(t=B;t*z=0;pe--)j=U.clipsegments[pe],ee=_([],j.x,D.c2p),te=_([],j.y,P.c2p),ee.reverse(),te.reverse(),we.push(S(ee,te,j.bicubic));var Se="M"+we.join("L")+"Z";A(F,U.clipsegments,D,P,ce,Y),E(O,F,D,P,ae,Q,X,L,U,Y,Se),c(F,ue,d,N,$,u,L),M.setClipUrl(F,L._clipPathId,d)})};function m(b,d){var u,g,y,D,P,z,F,N,O;for(u=0;uue&&(g.max=ue),g.len=g.max-g.min}function l(b,d,u){var g=b.getPointAtLength(d),y=b.getPointAtLength(u),D=y.x-g.x,P=y.y-g.y,z=Math.sqrt(D*D+P*P);return[D/z,P/z]}function x(b){var d=Math.sqrt(b[0]*b[0]+b[1]*b[1]);return[b[0]/d,b[1]/d]}function w(b,d){var u=Math.abs(b[0]*d[0]+b[1]*d[1]),g=Math.sqrt(1-u*u);return g/u}function A(b,d,u,g,y,D){var P,z,F,N,O=e.ensureSingle(b,"g","contourbg"),L=O.selectAll("path").data(D==="fill"&&!y?[0]:[]);L.enter().append("path"),L.exit().remove();var U=[];for(N=0;N=0&&(B=ee,$=ue):Math.abs(U[1]-B[1])=0&&(B=ee,$=ue):e.log("endpt to newendpt is not vert. or horz.",U,B,ee)}if($>=0)break;N+=ae(U,B),U=B}if($===d.edgepaths.length){e.log("unclosed perimeter path");break}F=$,L=O.indexOf(F)===-1,L&&(F=O[0],N+=ae(U,B)+"Z",U=null)}for(F=0;Fp):E=z>y,p=z;var F=m(y,D,P,z);F.pos=g,F.yc=(y+z)/2,F.i=u,F.dir=E?"increasing":"decreasing",F.x=F.pos,F.y=[P,D],b&&(F.orig_p=s[u]),w&&(F.tx=n.text[u]),A&&(F.htx=n.hovertext[u]),d.push(F)}else d.push({pos:g,empty:!0})}return n._extremes[f._id]=S.findExtremes(f,v.concat(l,T),{padded:!0}),d.length&&(d[0].t={labels:{open:_(i,"open:")+" ",high:_(i,"high:")+" ",low:_(i,"low:")+" ",close:_(i,"close:")+" "}}),d}function a(i,n,s){var h=s._minDiff;if(!h){var f=i._fullData,m=[];h=1/0;var c;for(c=0;c"+x.labels[g]+v.hoverLabelText(T,y,l.yhoverformat)):(P=_.extendFlat({},A),P.y0=P.y1=D,P.yLabelVal=y,P.yLabel=x.labels[g]+v.hoverLabelText(T,y,l.yhoverformat),P.name="",w.push(P),d[y]=P)}return w}function n(s,h,f,m){var c=s.cd,T=s.ya,l=c[0].trace,x=c[0].t,w=a(s,h,f,m);if(!w)return[];var A=w.index,E=c[A],p=w.index=E.i,b=E.dir;function d(F){return x.labels[F]+v.hoverLabelText(T,l[F][p],l.yhoverformat)}var u=E.hi||l.hoverinfo||"",g=u.split("+"),y=u==="all",D=y||g.indexOf("y")!==-1,P=y||g.indexOf("text")!==-1,z=D?[d("open"),d("high"),d("low"),d("close")+" "+r[b]]:[];return P&&e(E,l,z),w.extraText=z.join("
"),w.y0=w.y1=T.c2p(E.yc,!0),[w]}q.exports={hoverPoints:o,hoverSplit:i,hoverOnPoints:n}}}),rk=He({"src/traces/ohlc/select.js"(Z,q){"use strict";q.exports=function(_,S){var M=_.cd,e=_.xaxis,t=_.yaxis,r=[],o,a=M[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 x=a.c2l(l)-s;return(T(x)?x:0)+c},a.g2c=function(l){return a.l2c(l+s-c)},a.g2p=function(l){return l*m},a.c2p=function(l){return a.g2p(a.c2g(l))}}}function t(a,i){return i==="degrees"?S(a):a}function r(a,i){return i==="degrees"?M(a):a}function o(a,i){var n=a.type;if(n==="linear"){var s=a.d2c,h=a.c2d;a.d2c=function(f,m){return t(s(f),m)},a.c2d=function(f,m){return h(r(f,m))}}a.makeCalcdata=function(f,m){var c=f[m],T=f._length,l,x,w=function(d){return a.d2c(d,f.thetaunit)};if(c)for(l=new Array(T),x=0;x0?d:1/0},E=S(w,A),p=v.mod(E+1,w.length);return[w[E],w[p]]}function m(x){return Math.abs(x)>1e-10?x:0}function c(x,w,A){w=w||0,A=A||0;for(var E=x.length,p=new Array(E),b=0;b0?1:0}function _(r){var o=r[0],a=r[1];if(!isFinite(o)||!isFinite(a))return[1,0];var i=(o+1)*(o+1)+a*a;return[(o*o+a*a-1)/i,2*a/i]}function S(r,o){var a=o[0],i=o[1];return[a*r.radius+r.cx,-i*r.radius+r.cy]}function M(r,o){return o*r.radius}function e(r,o,a,i){var n=S(r,_([a,o])),s=n[0],h=n[1],f=S(r,_([i,o])),m=f[0],c=f[1];if(o===0)return["M"+s+","+h,"L"+m+","+c].join(" ");var T=M(r,1/Math.abs(o));return["M"+s+","+h,"A"+T+","+T+" 0 0,"+(o<0?1:0)+" "+m+","+c].join(" ")}function t(r,o,a,i){var n=M(r,1/(o+1)),s=S(r,_([o,a])),h=s[0],f=s[1],m=S(r,_([o,i])),c=m[0],T=m[1];if(v(a)!==v(i)){var l=S(r,_([o,0])),x=l[0],w=l[1];return["M"+h+","+f,"A"+n+","+n+" 0 0,"+(0at?(nt=te,tt=te*at,se=(pe-tt)/V.h/2,Ve=[j[0],j[1]],he=[ee[0]+se,ee[1]-se]):(nt=pe/at,tt=pe,se=(te-nt)/V.w/2,Ve=[j[0]+se,j[1]-se],he=[ee[0],ee[1]]),X.xLength2=nt,X.yLength2=tt,X.xDomain2=Ve,X.yDomain2=he;var ne=X.xOffset2=V.l+V.w*Ve[0],Ce=X.yOffset2=V.t+V.h*(1-he[1]),Ze=X.radius=nt/Re,rt=X.innerRadius=X.getHole(Y)*Ze,Je=X.cx=ne-Ze*Se[0],St=X.cy=Ce+Ze*Se[3],kt=X.cxx=Je-ne,Bt=X.cyy=St-Ce,Vt=le.side,Ar;Vt==="counterclockwise"?(Ar=Vt,Vt="top"):Vt==="clockwise"&&(Ar=Vt,Vt="bottom"),X.radialAxis=X.mockAxis(de,Y,le,{_id:"x",side:Vt,_trueSide:Ar,domain:[rt/V.w,Ze/V.w]}),X.angularAxis=X.mockAxis(de,Y,ae,{side:"right",domain:[0,Math.PI],autorange:!1}),X.doAutoRange(de,Y),X.updateAngularAxis(de,Y),X.updateRadialAxis(de,Y),X.updateRadialAxisTitle(de,Y),X.xaxis=X.mockCartesianAxis(de,Y,{_id:"x",domain:Ve}),X.yaxis=X.mockCartesianAxis(de,Y,{_id:"y",domain:he});var vr=X.pathSubplot();X.clipPaths.forTraces.select("path").attr("d",vr).attr("transform",t(kt,Bt)),Q.frontplot.attr("transform",t(ne,Ce)).call(o.setClipUrl,X._hasClipOnAxisFalse?null:X.clipIds.forTraces,X.gd),Q.bg.attr("d",vr).attr("transform",t(Je,St)).call(r.fill,Y.bgcolor)},B.mockAxis=function(de,Y,X,Q){var V=M.extendFlat({},X,Q);return s(V,Y,de),V},B.mockCartesianAxis=function(de,Y,X){var Q=this,V=Q.isSmith,le=X._id,ae=M.extendFlat({type:"linear"},X);n(ae,de);var j={x:[0,2],y:[1,3]};return ae.setRange=function(){var ee=Q.sectorBBox,te=j[le],pe=Q.radialAxis._rl,we=(pe[1]-pe[0])/(1-Q.getHole(Y));ae.range=[ee[te[0]]*we,ee[te[1]]*we]},ae.isPtWithinRange=le==="x"&&!V?function(ee){return Q.isPtInside(ee)}:function(){return!0},ae.setRange(),ae.setScale(),ae},B.doAutoRange=function(de,Y){var X=this,Q=X.gd,V=X.radialAxis,le=X.getRadial(Y);h(Q,V);var ae=V.range;if(le.range=ae.slice(),le._input.range=ae.slice(),V._rl=[V.r2l(ae[0],null,"gregorian"),V.r2l(ae[1],null,"gregorian")],V.minallowed!==void 0){var j=V.r2l(V.minallowed);V._rl[0]>V._rl[1]?V._rl[1]=Math.max(V._rl[1],j):V._rl[0]=Math.max(V._rl[0],j)}if(V.maxallowed!==void 0){var ee=V.r2l(V.maxallowed);V._rl[0]90&&pe<=270&&(we.tickangle=180);var Pe=Re?function(Ze){var rt=z(X,y([Ze.x,0]));return t(rt[0]-j,rt[1]-ee)}:function(Ze){return t(we.l2p(Ze.x)+ae,0)},je=Re?function(Ze){return P(X,Ze.x,-1/0,1/0)}:function(Ze){return X.pathArc(we.r2p(Ze.x)+ae)},at=W(te);if(X.radialTickLayout!==at&&(V["radial-axis"].selectAll(".xtick").remove(),X.radialTickLayout=at),Se){we.setScale();var nt=0,tt=Re?(we.tickvals||[]).filter(function(Ze){return Ze>=0}).map(function(Ze){return i.tickText(we,Ze,!0,!1)}):i.calcTicks(we),Ve=Re?tt:i.clipEnds(we,tt),he=i.getTickSigns(we)[2];Re&&((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)),i.drawTicks(Q,we,{vals:tt,layer:V["radial-axis"],path:i.makeTickPath(we,0,he),transFn:Pe,crisp:!1}),i.drawGrid(Q,we,{vals:Ve,layer:V["radial-grid"],path:je,transFn:M.noop,crisp:!1}),i.drawLabels(Q,we,{vals:tt,layer:V["radial-axis"],transFn:Pe,labelFns:i.makeLabelFns(we,nt)})}var se=X.radialAxisAngle=X.vangles?L(ue(O(te.angle),X.vangles)):te.angle,ne=t(j,ee),Ce=ne+e(-se);ce(V["radial-axis"],Se&&(te.showticklabels||te.ticks),{transform:Ce}),ce(V["radial-grid"],Se&&te.showgrid,{transform:Re?"":ne}),ce(V["radial-line"].select("line"),Se&&te.showline,{x1:Re?-le:ae,y1:0,x2:le,y2:0,transform:Ce}).attr("stroke-width",te.linewidth).call(r.stroke,te.linecolor)},B.updateRadialAxisTitle=function(de,Y,X){if(!this.isSmith){var Q=this,V=Q.gd,le=Q.radius,ae=Q.cx,j=Q.cy,ee=Q.getRadial(Y),te=Q.id+"title",pe=0;if(ee.title){var we=o.bBox(Q.layers["radial-axis"].node()).height,Se=ee.title.font.size,Re=ee.side;pe=Re==="top"?Se:Re==="counterclockwise"?-(we+Se*.4):we+Se*.8}var Pe=X!==void 0?X:Q.radialAxisAngle,je=O(Pe),at=Math.cos(je),nt=Math.sin(je),tt=ae+le/2*at+pe*nt,Ve=j-le/2*nt+pe*at;Q.layers["radial-axis-title"]=T.draw(V,te,{propContainer:ee,propName:Q.id+".radialaxis.title.text",placeholder:F(V,"Click to enter radial axis title"),attributes:{x:tt,y:Ve,"text-anchor":"middle"},transform:{rotate:-Pe}})}},B.updateAngularAxis=function(de,Y){var X=this,Q=X.gd,V=X.layers,le=X.radius,ae=X.innerRadius,j=X.cx,ee=X.cy,te=X.getAngular(Y),pe=X.angularAxis,we=X.isSmith;we||(X.fillViewInitialKey("angularaxis.rotation",te.rotation),pe.setGeometry(),pe.setScale());var Se=we?function(rt){var Je=z(X,y([0,rt.x]));return Math.atan2(Je[0]-j,Je[1]-ee)-Math.PI/2}:function(rt){return pe.t2g(rt.x)};pe.type==="linear"&&pe.thetaunit==="radians"&&(pe.tick0=L(pe.tick0),pe.dtick=L(pe.dtick));var Re=function(rt){return t(j+le*Math.cos(rt),ee-le*Math.sin(rt))},Pe=we?function(rt){var Je=z(X,y([0,rt.x]));return t(Je[0],Je[1])}:function(rt){return Re(Se(rt))},je=we?function(rt){var Je=z(X,y([0,rt.x])),St=Math.atan2(Je[0]-j,Je[1]-ee)-Math.PI/2;return t(Je[0],Je[1])+e(-L(St))}:function(rt){var Je=Se(rt);return Re(Je)+e(-L(Je))},at=we?function(rt){return D(X,rt.x,0,1/0)}:function(rt){var Je=Se(rt),St=Math.cos(Je),kt=Math.sin(Je);return"M"+[j+ae*St,ee-ae*kt]+"L"+[j+le*St,ee-le*kt]},nt=i.makeLabelFns(pe,0),tt=nt.labelStandoff,Ve={};Ve.xFn=function(rt){var Je=Se(rt);return Math.cos(Je)*tt},Ve.yFn=function(rt){var Je=Se(rt),St=Math.sin(Je)>0?.2:1;return-Math.sin(Je)*(tt+rt.fontSize*St)+Math.abs(Math.cos(Je))*(rt.fontSize*b)},Ve.anchorFn=function(rt){var Je=Se(rt),St=Math.cos(Je);return Math.abs(St)<.1?"middle":St>0?"start":"end"},Ve.heightFn=function(rt,Je,St){var kt=Se(rt);return-.5*(1+Math.sin(kt))*St};var he=W(te);X.angularTickLayout!==he&&(V["angular-axis"].selectAll("."+pe._id+"tick").remove(),X.angularTickLayout=he);var se=we?[1/0].concat(pe.tickvals||[]).map(function(rt){return i.tickText(pe,rt,!0,!1)}):i.calcTicks(pe);we&&(se[0].text="\u221E",se[0].fontSize*=1.75);var ne;if(Y.gridshape==="linear"?(ne=se.map(Se),M.angleDelta(ne[0],ne[1])<0&&(ne=ne.slice().reverse())):ne=null,X.vangles=ne,pe.type==="category"&&(se=se.filter(function(rt){return M.isAngleInsideSector(Se(rt),X.sectorInRad)})),pe.visible){var Ce=pe.ticks==="inside"?-1:1,Ze=(pe.linewidth||1)/2;i.drawTicks(Q,pe,{vals:se,layer:V["angular-axis"],path:"M"+Ce*Ze+",0h"+Ce*pe.ticklen,transFn:je,crisp:!1}),i.drawGrid(Q,pe,{vals:se,layer:V["angular-grid"],path:at,transFn:M.noop,crisp:!1}),i.drawLabels(Q,pe,{vals:se,layer:V["angular-axis"],repositionOnUpdate:!0,transFn:Pe,labelFns:Ve})}ce(V["angular-line"].select("path"),te.showline,{d:X.pathSubplot(),transform:t(j,ee)}).attr("stroke-width",te.linewidth).call(r.stroke,te.linecolor)},B.updateFx=function(de,Y){if(!this.gd._context.staticPlot){var X=!this.isSmith;X&&(this.updateAngularDrag(de),this.updateRadialDrag(de,Y,0),this.updateRadialDrag(de,Y,1)),this.updateHoverAndMainDrag(de)}},B.updateHoverAndMainDrag=function(de){var Y=this,X=Y.isSmith,Q=Y.gd,V=Y.layers,le=de._zoomlayer,ae=d.MINZOOM,j=d.OFFEDGE,ee=Y.radius,te=Y.innerRadius,pe=Y.cx,we=Y.cy,Se=Y.cxx,Re=Y.cyy,Pe=Y.sectorInRad,je=Y.vangles,at=Y.radialAxis,nt=u.clampTiny,tt=u.findXYatLength,Ve=u.findEnclosingVertexAngles,he=d.cornerHalfWidth,se=d.cornerLen/2,ne,Ce,Ze=f.makeDragger(V,"path","maindrag",de.dragmode===!1?"none":"crosshair");v.select(Ze).attr("d",Y.pathSubplot()).attr("transform",t(pe,we)),Ze.onmousemove=function(or){c.hover(Q,or,Y.id),Q._fullLayout._lasthover=Ze,Q._fullLayout._hoversubplot=Y.id},Ze.onmouseout=function(or){Q._dragging||m.unhover(Q,or)};var rt={element:Ze,gd:Q,subplot:Y.id,plotinfo:{id:Y.id,xaxis:Y.xaxis,yaxis:Y.yaxis},xaxes:[Y.xaxis],yaxes:[Y.yaxis]},Je,St,kt,Bt,Vt,Ar,vr,qr,kr;function Ur(or,nr){return Math.sqrt(or*or+nr*nr)}function _t(or,nr){return Ur(or-Se,nr-Re)}function Fe(or,nr){return Math.atan2(Re-nr,or-Se)}function Ye(or,nr){return[or*Math.cos(nr),or*Math.sin(-nr)]}function Ae(or,nr){if(or===0)return Y.pathSector(2*he);var Pr=se/or,_a=nr-Pr,Fa=nr+Pr,Ra=Math.max(0,Math.min(or,ee)),qa=Ra-he,Wa=Ra+he;return"M"+Ye(qa,_a)+"A"+[qa,qa]+" 0,0,0 "+Ye(qa,Fa)+"L"+Ye(Wa,Fa)+"A"+[Wa,Wa]+" 0,0,1 "+Ye(Wa,_a)+"Z"}function Le(or,nr,Pr){if(or===0)return Y.pathSector(2*he);var _a=Ye(or,nr),Fa=Ye(or,Pr),Ra=nt((_a[0]+Fa[0])/2),qa=nt((_a[1]+Fa[1])/2),Wa,Ca;if(Ra&&qa){var hi=qa/Ra,wi=-1/hi,Yt=tt(he,hi,Ra,qa);Wa=tt(se,wi,Yt[0][0],Yt[0][1]),Ca=tt(se,wi,Yt[1][0],Yt[1][1])}else{var Rt,Zt;qa?(Rt=se,Zt=he):(Rt=he,Zt=se),Wa=[[Ra-Rt,qa-Zt],[Ra+Rt,qa-Zt]],Ca=[[Ra-Rt,qa+Zt],[Ra+Rt,qa+Zt]]}return"M"+Wa.join("L")+"L"+Ca.reverse().join("L")+"Z"}function We(){kt=null,Bt=null,Vt=Y.pathSubplot(),Ar=!1;var or=Q._fullLayout[Y.id];vr=_(or.bgcolor).getLuminance(),qr=f.makeZoombox(le,vr,pe,we,Vt),qr.attr("fill-rule","evenodd"),kr=f.makeCorners(le,pe,we),w(Q)}function Ke(or,nr){return nr=Math.max(Math.min(nr,ee),te),orae?(or-1&&or===1&&x(nr,Q,[Y.xaxis],[Y.yaxis],Y.id,rt),Pr.indexOf("event")>-1&&c.click(Q,nr,Y.id)}rt.prepFn=function(or,nr,Pr){var _a=Q._fullLayout.dragmode,Fa=Ze.getBoundingClientRect();Q._fullLayout._calcInverseTransform(Q);var Ra=Q._fullLayout._invTransform;ne=Q._fullLayout._invScaleX,Ce=Q._fullLayout._invScaleY;var qa=M.apply3DTransform(Ra)(nr-Fa.left,Pr-Fa.top);if(Je=qa[0],St=qa[1],je){var Wa=u.findPolygonOffset(ee,Pe[0],Pe[1],je);Je+=Se+Wa[0],St+=Re+Wa[1]}switch(_a){case"zoom":rt.clickFn=cr,X||(je?rt.moveFn=Ct:rt.moveFn=ot,rt.doneFn=Pt,We(or,nr,Pr));break;case"select":case"lasso":l(or,nr,Pr,rt,_a);break}},m.init(rt)},B.updateRadialDrag=function(de,Y,X){var Q=this,V=Q.gd,le=Q.layers,ae=Q.radius,j=Q.innerRadius,ee=Q.cx,te=Q.cy,pe=Q.radialAxis,we=d.radialDragBoxSize,Se=we/2;if(!pe.visible)return;var Re=O(Q.radialAxisAngle),Pe=pe._rl,je=Pe[0],at=Pe[1],nt=Pe[X],tt=.75*(Pe[1]-Pe[0])/(1-Q.getHole(Y))/ae,Ve,he,se;X?(Ve=ee+(ae+Se)*Math.cos(Re),he=te-(ae+Se)*Math.sin(Re),se="radialdrag"):(Ve=ee+(j-Se)*Math.cos(Re),he=te-(j-Se)*Math.sin(Re),se="radialdrag-inner");var ne=f.makeRectDragger(le,se,"crosshair",-Se,-Se,we,we),Ce={element:ne,gd:V};de.dragmode===!1&&(Ce.dragmode=!1),ce(v.select(ne),pe.visible&&j0!=(X?Je>je:Je=90||V>90&&le>=450?Re=1:j<=0&&te<=0?Re=0:Re=Math.max(j,te),V<=180&&le>=180||V>180&&le>=540?pe=-1:ae>=0&&ee>=0?pe=0:pe=Math.min(ae,ee),V<=270&&le>=270||V>270&&le>=630?we=-1:j>=0&&te>=0?we=0:we=Math.min(j,te),le>=360?Se=1:ae<=0&&ee<=0?Se=0:Se=Math.max(ae,ee),[pe,we,Se,Re]}function ue(de,Y){var X=function(V){return M.angleDist(de,V)},Q=M.findIndexOfMin(Y,X);return Y[Q]}function ce(de,Y,X){return Y?(de.attr("display",null),de.attr(X)):de&&de.attr("display","none"),de}}}),sk=He({"src/plots/polar/layout_attributes.js"(Z,q){"use strict";var v=sh(),_=Xh(),S=wc().attributes,M=sa().extendFlat,e=pc().overrideAll,t=e({color:_.color,showline:M({},_.showline,{dflt:!0}),linecolor:_.linecolor,linewidth:_.linewidth,showgrid:M({},_.showgrid,{dflt:!0}),gridcolor:_.gridcolor,gridwidth:_.gridwidth,griddash:_.griddash},"plot","from-root"),r=e({tickmode:_.minor.tickmode,nticks:_.nticks,tick0:_.tick0,dtick:_.dtick,tickvals:_.tickvals,ticktext:_.ticktext,ticks:_.ticks,ticklen:_.ticklen,tickwidth:_.tickwidth,tickcolor:_.tickcolor,ticklabelstep:_.ticklabelstep,showticklabels:_.showticklabels,labelalias:_.labelalias,minorloglabels:_.minorloglabels,showtickprefix:_.showtickprefix,tickprefix:_.tickprefix,showticksuffix:_.showticksuffix,ticksuffix:_.ticksuffix,showexponent:_.showexponent,exponentformat:_.exponentformat,minexponent:_.minexponent,separatethousands:_.separatethousands,tickfont:_.tickfont,tickangle:_.tickangle,tickformat:_.tickformat,tickformatstops:_.tickformatstops,layer:_.layer},"plot","from-root"),o={visible:M({},_.visible,{dflt:!0}),type:M({},_.type,{values:["-","linear","log","date","category"]}),autotypenumbers:_.autotypenumbers,autorangeoptions:{minallowed:_.autorangeoptions.minallowed,maxallowed:_.autorangeoptions.maxallowed,clipmin:_.autorangeoptions.clipmin,clipmax:_.autorangeoptions.clipmax,include:_.autorangeoptions.include,editType:"plot"},autorange:M({},_.autorange,{editType:"plot"}),rangemode:{valType:"enumerated",values:["tozero","nonnegative","normal"],dflt:"tozero",editType:"calc"},minallowed:M({},_.minallowed,{editType:"plot"}),maxallowed:M({},_.maxallowed,{editType:"plot"}),range:M({},_.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],editType:"plot"}),categoryorder:_.categoryorder,categoryarray:_.categoryarray,angle:{valType:"angle",editType:"plot"},autotickangles:_.autotickangles,side:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"clockwise",editType:"plot"},title:{text:M({},_.title.text,{editType:"plot",dflt:""}),font:M({},_.title.font,{editType:"plot"}),editType:"plot"},hoverformat:_.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};M(o,t,r);var a={visible:M({},_.visible,{dflt:!0}),type:{valType:"enumerated",values:["-","linear","category"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:_.autotypenumbers,categoryorder:_.categoryorder,categoryarray:_.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:_.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};M(a,t,r),q.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:v.background},radialaxis:o,angularaxis:a,gridshape:{valType:"enumerated",values:["circular","linear"],dflt:"circular",editType:"plot"},uirevision:{valType:"any",editType:"none"},editType:"calc"}}}),MH=He({"src/plots/polar/layout_defaults.js"(Z,q){"use strict";var v=sa(),_=$n(),S=zl(),M=s0(),e=Wh().getSubplotData,t=Y0(),r=t1(),o=e0(),a=t0(),i=I2(),n=z_(),s=f5(),h=a1(),f=sk(),m=ik(),c=DT(),T=c.axisNames;function l(w,A,E,p){var b=E("bgcolor");p.bgColor=_.combine(b,p.paper_bgcolor);var d=E("sector");E("hole");var u=e(p.fullData,c.name,p.id),g=p.layoutOut,y;function D(we,Se){return E(y+"."+we,Se)}for(var P=0;P")}}q.exports={hoverPoints:_,makeHoverPointText:S}}}),CH=He({"src/traces/scatterpolar/index.js"(Z,q){"use strict";q.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:FT(),categories:["polar","symbols","showLegend","scatter-like"],attributes:Cx(),supplyDefaults:OT().supplyDefaults,colorbar:dp(),formatLabels:BT(),calc:EH(),plot:kH(),style:Qp().style,styleOnSelect:Qp().styleOnSelect,hoverPoints:NT().hoverPoints,selectPoints:c1(),meta:{}}}}),LH=He({"lib/scatterpolar.js"(Z,q){"use strict";q.exports=CH()}}),lk=He({"src/traces/scatterpolargl/attributes.js"(Z,q){"use strict";var v=Cx(),{cliponaxis:_,hoveron:S}=v,M=Qs(v,["cliponaxis","hoveron"]),{connectgaps:e,line:{color:t,dash:r,width:o},fill:a,fillcolor:i,marker:n,textfont:s,textposition:h}=xx();q.exports=vs(So({},M),{connectgaps:e,fill:a,fillcolor:i,line:{color:t,dash:r,editType:"calc",width:o},marker:n,textfont:s,textposition:h})}}),PH=He({"src/traces/scatterpolargl/defaults.js"(Z,q){"use strict";var v=sa(),_=Fu(),S=OT().handleRThetaDefaults,M=md(),e=Dd(),t=zd(),r=ev(),o=Tv().PTS_LINESONLY,a=lk();q.exports=function(n,s,h,f){function m(T,l){return v.coerce(n,s,a,T,l)}var c=S(n,s,f,m);if(!c){s.visible=!1;return}m("thetaunit"),m("mode",c=r&&(p.marker.cluster=x.tree),p.marker&&(p.markerSel.positions=p.markerUnsel.positions=p.marker.positions=g),p.line&&g.length>1&&t.extendFlat(p.line,e.linePositions(i,l,g)),p.text&&(t.extendFlat(p.text,{positions:g},e.textPosition(i,l,p.text,p.marker)),t.extendFlat(p.textSel,{positions:g},e.textPosition(i,l,p.text,p.markerSel)),t.extendFlat(p.textUnsel,{positions:g},e.textPosition(i,l,p.text,p.markerUnsel))),p.fill&&!m.fill2d&&(m.fill2d=!0),p.marker&&!m.scatter2d&&(m.scatter2d=!0),p.line&&!m.line2d&&(m.line2d=!0),p.text&&!m.glText&&(m.glText=!0),m.lineOptions.push(p.line),m.fillOptions.push(p.fill),m.markerOptions.push(p.marker),m.markerSelectedOptions.push(p.markerSel),m.markerUnselectedOptions.push(p.markerUnsel),m.textOptions.push(p.text),m.textSelectedOptions.push(p.textSel),m.textUnselectedOptions.push(p.textUnsel),m.selectBatch.push([]),m.unselectBatch.push([]),x.x=y,x.y=D,x.rawx=y,x.rawy=D,x.r=A,x.theta=E,x.positions=g,x._scene=m,x.index=m.count,m.count++}}),S(i,n,s)}},q.exports.reglPrecompiled=o}}),OH=He({"src/traces/scatterpolargl/index.js"(Z,q){"use strict";var v=zH();v.plot=FH(),q.exports=v}}),BH=He({"lib/scatterpolargl.js"(Z,q){"use strict";q.exports=OH()}}),uk=He({"src/traces/barpolar/attributes.js"(Z,q){"use strict";var{hovertemplateAttrs:v,templatefallbackAttrs:_}=$l(),S=rs().extendFlat,M=Cx(),e=Sv();q.exports={r:M.r,theta:M.theta,r0:M.r0,dr:M.dr,theta0:M.theta0,dtheta:M.dtheta,thetaunit:M.thetaunit,base:S({},e.base,{}),offset:S({},e.offset,{}),width:S({},e.width,{}),text:S({},e.text,{}),hovertext:S({},e.hovertext,{}),marker:t(),hoverinfo:M.hoverinfo,hovertemplate:v(),hovertemplatefallback:_(),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,q){"use strict";q.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}}}),NH=He({"src/traces/barpolar/defaults.js"(Z,q){"use strict";var v=sa(),_=OT().handleRThetaDefaults,S=j2(),M=uk();q.exports=function(t,r,o,a){function i(s,h){return v.coerce(t,r,M,s,h)}var n=_(t,r,a,i);if(!n){r.visible=!1;return}i("thetaunit"),i("base"),i("offset"),i("width"),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),S(t,r,i,o,a),v.coerceSelectionMarkerOpacity(r,i)}}}),UH=He({"src/traces/barpolar/layout_defaults.js"(Z,q){"use strict";var v=sa(),_=ck();q.exports=function(S,M,e){var t={},r;function o(n,s){return v.coerce(S[r]||{},M[r],_,n,s)}for(var a=0;a0?(f=s,m=h):(f=h,m=s);var c=e.findEnclosingVertexAngles(f,r.vangles)[0],T=e.findEnclosingVertexAngles(m,r.vangles)[1],l=[c,(f+m)/2,T];return e.pathPolygonAnnulus(i,n,f,m,l,o,a)}:function(i,n,s,h){return S.pathAnnulus(i,n,s,h,o,a)}}}}),qH=He({"src/traces/barpolar/hover.js"(Z,q){"use strict";var v=Hc(),_=sa(),S=f1().getTraceColor,M=_.fillText,e=NT().makeHoverPointText,t=zT().isPtInsidePolygon;q.exports=function(o,a,i){var n=o.cd,s=n[0].trace,h=o.subplot,f=h.radialAxis,m=h.angularAxis,c=h.vangles,T=c?t:_.isPtInsideSector,l=o.maxHoverDistance,x=m._period||2*Math.PI,w=Math.abs(f.g2p(Math.sqrt(a*a+i*i))),A=Math.atan2(i,a);f.range[0]>f.range[1]&&(A+=Math.PI);var E=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)/x)-1+(u.rp1-w)/(u.rp1-u.rp0)-1:1/0};if(v.getClosest(n,E,o),o.index!==!1){var p=o.index,b=n[p];o.x0=o.x1=b.ct[0],o.y0=o.y1=b.ct[1];var d=_.extendFlat({},b,{r:b.s,theta:b.p});return M(b,s,o),e(d,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]}}}}),VH=He({"src/traces/barpolar/index.js"(Z,q){"use strict";q.exports={moduleType:"trace",name:"barpolar",basePlotModule:FT(),categories:["polar","bar","showLegend"],attributes:uk(),layoutAttributes:ck(),supplyDefaults:NH(),supplyLayoutDefaults:UH(),calc:fk().calc,crossTraceCalc:fk().crossTraceCalc,plot:jH(),colorbar:dp(),formatLabels:BT(),style:Nd().style,styleOnSelect:Nd().styleOnSelect,hoverPoints:qH(),selectPoints:h1(),meta:{}}}}),GH=He({"lib/barpolar.js"(Z,q){"use strict";q.exports=VH()}}),hk=He({"src/plots/smith/constants.js"(Z,q){"use strict";q.exports={attr:"subplot",name:"smith",axisNames:["realaxis","imaginaryaxis"],axisName2dataArray:{imaginaryaxis:"imag",realaxis:"real"}}}}),pk=He({"src/plots/smith/layout_attributes.js"(Z,q){"use strict";var v=sh(),_=Xh(),S=wc().attributes,M=sa().extendFlat,e=pc().overrideAll,t=e({color:_.color,showline:M({},_.showline,{dflt:!0}),linecolor:_.linecolor,linewidth:_.linewidth,showgrid:M({},_.showgrid,{dflt:!0}),gridcolor:_.gridcolor,gridwidth:_.gridwidth,griddash:_.griddash},"plot","from-root"),r=e({ticklen:_.ticklen,tickwidth:M({},_.tickwidth,{dflt:2}),tickcolor:_.tickcolor,showticklabels:_.showticklabels,labelalias:_.labelalias,showtickprefix:_.showtickprefix,tickprefix:_.tickprefix,showticksuffix:_.showticksuffix,ticksuffix:_.ticksuffix,tickfont:_.tickfont,tickformat:_.tickformat,hoverformat:_.hoverformat,layer:_.layer},"plot","from-root"),o=M({visible:M({},_.visible,{dflt:!0}),tickvals:{dflt:[.2,.5,1,2,5],valType:"data_array",editType:"plot"},tickangle:M({},_.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=M({visible:M({},_.visible,{dflt:!0}),tickvals:{valType:"data_array",editType:"plot"},ticks:_.ticks,editType:"calc"},t,r);q.exports={domain:S({name:"smith",editType:"plot"}),bgcolor:{valType:"color",editType:"plot",dflt:v.background},realaxis:o,imaginaryaxis:a,editType:"calc"}}}),HH=He({"src/plots/smith/layout_defaults.js"(Z,q){"use strict";var v=sa(),_=$n(),S=zl(),M=s0(),e=Wh().getSubplotData,t=t0(),r=e0(),o=z_(),a=wv(),i=pk(),n=hk(),s=n.axisNames,h=m(function(c){return v.isTypedArray(c)&&(c=Array.from(c)),c.slice().reverse().map(function(T){return-T}).concat([0]).concat(c)},String);function f(c,T,l,x){var w=l("bgcolor");x.bgColor=_.combine(w,x.paper_bgcolor);var A=e(x.fullData,n.name,x.id),E=x.layoutOut,p;function b(B,W){return l(p+"."+B,W)}for(var d=0;d")}}q.exports={hoverPoints:_,makeHoverPointText:S}}}),$H=He({"src/traces/scattersmith/index.js"(Z,q){"use strict";q.exports={moduleType:"trace",name:"scattersmith",basePlotModule:WH(),categories:["smith","symbols","showLegend","scatter-like"],attributes:dk(),supplyDefaults:XH(),colorbar:dp(),formatLabels:ZH(),calc:YH(),plot:KH(),style:Qp().style,styleOnSelect:Qp().styleOnSelect,hoverPoints:JH().hoverPoints,selectPoints:c1(),meta:{}}}}),QH=He({"lib/scattersmith.js"(Z,q){"use strict";q.exports=$H()}}),Mp=He({"node_modules/world-calendars/dist/main.js"(Z,q){var v=ch();function _(){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={}}v(_.prototype,{instance:function(o,a){o=(o||"gregorian").toLowerCase(),a=a||"";var i=this._localCals[o+"-"+a];if(!i&&this.calendars[o]&&(i=new this.calendars[o](a),this._localCals[o+"-"+a]=i),!i)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,o);return i},newDate:function(o,a,i,n,s){return n=(o!=null&&o.year?o.calendar():typeof n=="string"?this.instance(n,s):n)||this.instance(),n.newDate(o,a,i)},substituteDigits:function(o){return function(a){return(a+"").replace(/[0-9]/g,function(i){return o[i]})}},substituteChineseDigits:function(o,a){return function(i){for(var n="",s=0;i>0;){var h=i%10;n=(h===0?"":o[h]+a[s])+n,s++,i=Math.floor(i/10)}return n.indexOf(o[1]+a[1])===0&&(n=n.substr(1)),n||o[0]}}});function S(o,a,i,n){if(this._calendar=o,this._year=a,this._month=i,this._day=n,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 M(o,a){return o=""+o,"000000".substring(0,a-o.length)+o}v(S.prototype,{newDate:function(o,a,i){return this._calendar.newDate(o??this,a,i)},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,i){if(!this._calendar.isValid(o,a,i))throw(r.local.invalidDate||r.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=o,this._month=a,this._day=i,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?"-":"")+M(Math.abs(this.year()),4)+"-"+M(this.month(),2)+"-"+M(this.day(),2)}});function e(){this.shortYearCutoff="+10"}v(e.prototype,{_validateLevel:0,newDate:function(o,a,i){return o==null?this.today():(o.year&&(this._validate(o,a,i,r.local.invalidDate||r.regionalOptions[""].invalidDate),i=o.day(),a=o.month(),o=o.year()),new S(this,o,a,i))},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?"-":"")+M(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 i=this._validate(o,a,this.minDay,r.local.invalidMonth||r.regionalOptions[""].invalidMonth);return(i.month()+this.monthsInYear(i)-this.firstMonth)%this.monthsInYear(i)+this.minMonth},fromMonthOfYear:function(o,a){var i=(a+this.firstMonth-2*this.minMonth)%this.monthsInYear(o)+this.minMonth;return this._validate(o,i,this.minDay,r.local.invalidMonth||r.regionalOptions[""].invalidMonth),i},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,i){var n=this._validate(o,a,i,r.local.invalidDate||r.regionalOptions[""].invalidDate);return n.toJD()-this.newDate(n.year(),this.fromMonthOfYear(n.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(o,a,i){var n=this._validate(o,a,i,r.local.invalidDate||r.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(n))+2)%this.daysInWeek()},extraInfo:function(o,a,i){return this._validate(o,a,i,r.local.invalidDate||r.regionalOptions[""].invalidDate),{}},add:function(o,a,i){return this._validate(o,this.minMonth,this.minDay,r.local.invalidDate||r.regionalOptions[""].invalidDate),this._correctAdd(o,this._add(o,a,i),a,i)},_add:function(o,a,i){if(this._validateLevel++,i==="d"||i==="w"){var n=o.toJD()+a*(i==="w"?this.daysInWeek():1),s=o.calendar().fromJD(n);return this._validateLevel--,[s.year(),s.month(),s.day()]}try{var h=o.year()+(i==="y"?a:0),f=o.monthOfYear()+(i==="m"?a:0),s=o.day(),m=function(l){for(;fx-1+l.minMonth;)h++,f-=x,x=l.monthsInYear(h)};i==="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)))):i==="m"&&(m(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,i,n){if(!this.hasYearZero&&(n==="y"||n==="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"]}[n],h=i<0?-1:1;a=this._add(o,i*s[0]+h*s[1],s[2])}return o.date(a[0],a[1],a[2])},set:function(o,a,i){this._validate(o,this.minMonth,this.minDay,r.local.invalidDate||r.regionalOptions[""].invalidDate);var n=i==="y"?a:o.year(),s=i==="m"?a:o.month(),h=i==="d"?a:o.day();return(i==="y"||i==="m")&&(h=Math.min(h,this.daysInMonth(n,s))),o.date(n,s,h)},isValid:function(o,a,i){this._validateLevel++;var n=this.hasYearZero||o!==0;if(n){var s=this.newDate(o,a,this.minDay);n=a>=this.minMonth&&a-this.minMonth=this.minDay&&i-this.minDay13.5?13:1),T=s-(c>2.5?4716:4715);return T<=0&&T--,this.newDate(T,c,m)},toJSDate:function(o,a,i){var n=this._validate(o,a,i,r.local.invalidDate||r.regionalOptions[""].invalidDate),s=new Date(n.year(),n.month()-1,n.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=q.exports=new _;r.cdate=S,r.baseCalendar=e,r.calendars.gregorian=t}}),eW=He({"node_modules/world-calendars/dist/plus.js"(){var Z=ch(),q=Mp();Z(q.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"}),q.local=q.regionalOptions[""],Z(q.cdate.prototype,{formatDate:function(v,_){return typeof v!="string"&&(_=v,v=""),this._calendar.formatDate(v||"",this,_)}}),Z(q.baseCalendar.prototype,{UNIX_EPOCH:q.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:24*60*60,TICKS_EPOCH:q.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(v,_,S){if(typeof v!="string"&&(S=_,_=v,v=""),!_)return"";if(_.calendar()!==this)throw q.local.invalidFormat||q.regionalOptions[""].invalidFormat;v=v||this.local.dateFormat,S=S||{};for(var M=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,i=function(A,E){for(var p=1;w+p1},n=function(A,E,p,b){var d=""+E;if(i(A,b))for(;d.length1},x=function(D,P){var z=l(D,P),F=[2,3,z?4:2,z?4:2,10,11,20]["oyYJ@!".indexOf(D)+1],N=new RegExp("^-?\\d{1,"+F+"}"),O=_.substring(d).match(N);if(!O)throw(q.local.missingNumberAt||q.regionalOptions[""].missingNumberAt).replace(/\{0\}/,d);return d+=O[0].length,parseInt(O[0],10)},w=this,A=function(){if(typeof o=="function"){l("m");var D=o.call(w,_.substring(d));return d+=D.length,D}return x("m")},E=function(D,P,z,F){for(var N=l(D,F)?z:P,O=0;O-1){h=1,f=m;for(var y=this.daysInMonth(s,h);f>y;y=this.daysInMonth(s,h))h++,f-=y}return n>-1?this.fromJD(n):this.newDate(s,h,f)},determineDate:function(v,_,S,M,e){S&&typeof S!="object"&&(e=M,M=S,S=null),typeof M!="string"&&(e=M,M="");var t=this,r=function(o){try{return t.parseDate(M,o,e)}catch{}o=o.toLowerCase();for(var a=(o.match(/^c/)&&S?S.newDate():null)||t.today(),i=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,n=i.exec(o);n;)a.add(parseInt(n[1],10),n[2]||"d"),n=i.exec(o);return a};return _=_?_.newDate():null,v=v==null?_:typeof v=="string"?r(v):typeof v=="number"?isNaN(v)||v===1/0||v===-1/0?_:t.today().add(v,"d"):t.newDate(v),v}})}}),tW=He({"node_modules/world-calendars/dist/calendars/chinese.js"(){var Z=Mp(),q=ch(),v=Z.instance();function _(n){this.local=this.regionalOptions[n||""]||this.regionalOptions[""]}_.prototype=new Z.baseCalendar,q(_.prototype,{name:"Chinese",jdEpoch:17214255e-1,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(n,s){if(typeof n=="string"){var h=n.match(M);return h?h[0]:""}var f=this._validateYear(n),m=n.month(),c=""+this.toChineseMonth(f,m);return s&&c.length<2&&(c="0"+c),this.isIntercalaryMonth(f,m)&&(c+="i"),c},monthNames:function(n){if(typeof n=="string"){var s=n.match(e);return s?s[0]:""}var h=this._validateYear(n),f=n.month(),m=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"][m-1];return this.isIntercalaryMonth(h,f)&&(c="\u95F0"+c),c},monthNamesShort:function(n){if(typeof n=="string"){var s=n.match(t);return s?s[0]:""}var h=this._validateYear(n),f=n.month(),m=this.toChineseMonth(h,f),c=["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"][m-1];return this.isIntercalaryMonth(h,f)&&(c="\u95F0"+c),c},parseMonth:function(n,s){n=this._validateYear(n);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 m=s[s.length-1];f=m==="i"||m==="I"}var c=this.toMonthIndex(n,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(n,s){if(n.year&&(n=n.year()),typeof n!="number"||n<1888||n>2111)throw s.replace(/\{0\}/,this.local.name);return n},toMonthIndex:function(n,s,h){var f=this.intercalaryMonth(n),m=h&&s!==f;if(m||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(n,s){n.year&&(n=n.year(),s=n.month());var h=this.intercalaryMonth(n),f=h?12:11;if(s<0||s>f)throw Z.local.invalidMonth.replace(/\{0\}/,this.local.name);var m;return h?s>13;return h},isIntercalaryMonth:function(n,s){n.year&&(n=n.year(),s=n.month());var h=this.intercalaryMonth(n);return!!h&&h===s},leapYear:function(n){return this.intercalaryMonth(n)!==0},weekOfYear:function(n,s,h){var f=this._validateYear(n,Z.local.invalidyear),m=o[f-o[0]],c=m>>9&4095,T=m>>5&15,l=m&31,x;x=v.newDate(c,T,l),x.add(4-(x.dayOfWeek()||7),"d");var w=this.toJD(n,s,h)-x.toJD();return 1+Math.floor(w/7)},monthsInYear:function(n){return this.leapYear(n)?13:12},daysInMonth:function(n,s){n.year&&(s=n.month(),n=n.year()),n=this._validateYear(n);var h=r[n-r[0]],f=h>>13,m=f?12:11;if(s>m)throw Z.local.invalidMonth.replace(/\{0\}/,this.local.name);var c=h&1<<12-s?30:29;return c},weekDay:function(n,s,h){return(this.dayOfWeek(n,s,h)||7)<6},toJD:function(n,s,h){var f=this._validate(n,c,h,Z.local.invalidDate);n=this._validateYear(f.year()),s=f.month(),h=f.day();var m=this.isIntercalaryMonth(n,s),c=this.toChineseMonth(n,s),T=i(n,c,h,m);return v.toJD(T.year,T.month,T.day)},fromJD:function(n){var s=v.fromJD(n),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(n){var s=n.match(S),h=this._validateYear(+s[1]),f=+s[2],m=!!s[3],c=this.toMonthIndex(h,f,m),T=+s[4];return this.newDate(h,c,T)},add:function(n,s,h){var f=n.year(),m=n.month(),c=this.isIntercalaryMonth(f,m),T=this.toChineseMonth(f,m),l=Object.getPrototypeOf(_.prototype).add.call(this,n,s,h);if(h==="y"){var x=l.year(),w=l.month(),A=this.isIntercalaryMonth(x,T),E=c&&A?this.toMonthIndex(x,T,!0):this.toMonthIndex(x,T,!1);E!==w&&l.month(E)}return l}});var S=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,M=/^\d?\d[iI]?/m,e=/^闰?十?[一二三四五六七八九]?月/m,t=/^闰?十?[一二三四五六七八九]?/m;Z.calendars.chinese=_;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(n,s,h,f){var m,c;if(typeof n=="object")m=n,c=s||{};else{var T=typeof n=="number"&&n>=1888&&n<=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 x=typeof h=="number"&&h>=1&&h<=31;if(!x)throw new Error("Solar day outside range 1 - 31");m={year:n,month:s,day:h},c=f||{}}var w=o[m.year-o[0]],A=m.year<<9|m.month<<5|m.day;c.year=A>=w?m.year:m.year-1,w=o[c.year-o[0]];var E=w>>9&4095,p=w>>5&15,b=w&31,d,u=new Date(E,p-1,b),g=new Date(m.year,m.month-1,m.day);d=Math.round((g-u)/(24*3600*1e3));var y=r[c.year-r[0]],D;for(D=0;D<13;D++){var P=y&1<<12-D?30:29;if(d>13;return!z||D=1888&&n<=2111;if(!l)throw new Error("Lunar year outside range 1888-2111");var x=typeof s=="number"&&s>=1&&s<=12;if(!x)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=m||{}),T={year:n,month:s,day:h,isIntercalary:A}}var E;E=T.day-1;var p=r[T.year-r[0]],b=p>>13,d;b&&(T.month>b||T.isIntercalary)?d=T.month:d=T.month-1;for(var u=0;u>9&4095,P=y>>5&15,z=y&31,F=new Date(D,P-1,z+E);return c.year=F.getFullYear(),c.month=1+F.getMonth(),c.day=F.getDate(),c}}}),rW=He({"node_modules/world-calendars/dist/calendars/coptic.js"(){var Z=Mp(),q=ch();function v(_){this.local=this.regionalOptions[_||""]||this.regionalOptions[""]}v.prototype=new Z.baseCalendar,q(v.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(M){var S=this._validate(M,this.minMonth,this.minDay,Z.local.invalidYear),M=S.year()+(S.year()<0?1:0);return M%4===3||M%4===-1},monthsInYear:function(_){return this._validate(_,this.minMonth,this.minDay,Z.local.invalidYear||Z.regionalOptions[""].invalidYear),13},weekOfYear:function(_,S,M){var e=this.newDate(_,S,M);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInMonth:function(_,S){var M=this._validate(_,S,this.minDay,Z.local.invalidMonth);return this.daysPerMonth[M.month()-1]+(M.month()===13&&this.leapYear(M.year())?1:0)},weekDay:function(_,S,M){return(this.dayOfWeek(_,S,M)||7)<6},toJD:function(_,S,M){var e=this._validate(_,S,M,Z.local.invalidDate);return _=e.year(),_<0&&_++,e.day()+(e.month()-1)*30+(_-1)*365+Math.floor(_/4)+this.jdEpoch-1},fromJD:function(_){var S=Math.floor(_)+.5-this.jdEpoch,M=Math.floor((S-Math.floor((S+366)/1461))/365)+1;M<=0&&M--,S=Math.floor(_)+.5-this.newDate(M,1,1).toJD();var e=Math.floor(S/30)+1,t=S-(e-1)*30+1;return this.newDate(M,e,t)}}),Z.calendars.coptic=v}}),aW=He({"node_modules/world-calendars/dist/calendars/discworld.js"(){var Z=Mp(),q=ch();function v(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}v.prototype=new Z.baseCalendar,q(v.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,M,e){var t=this.newDate(S,M,e);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/8)+1},daysInMonth:function(S,M){var e=this._validate(S,M,this.minDay,Z.local.invalidMonth);return this.daysPerMonth[e.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(S,M,e){var t=this._validate(S,M,e,Z.local.invalidDate);return(t.day()+1)%8},weekDay:function(S,M,e){var t=this.dayOfWeek(S,M,e);return t>=2&&t<=6},extraInfo:function(S,M,e){var t=this._validate(S,M,e,Z.local.invalidDate);return{century:_[Math.floor((t.year()-1)/100)+1]||""}},toJD:function(S,M,e){var t=this._validate(S,M,e,Z.local.invalidDate);return S=t.year()+(t.year()<0?1:0),M=t.month(),e=t.day(),e+(M>1?16:0)+(M>2?(M-2)*32:0)+(S-1)*400+this.jdEpoch-1},fromJD:function(S){S=Math.floor(S+.5)-Math.floor(this.jdEpoch)-1;var M=Math.floor(S/400)+1;S-=(M-1)*400,S+=S>15?16:0;var e=Math.floor(S/32)+1,t=S-(e-1)*32+1;return this.newDate(M<=0?M-1:M,e,t)}});var _={20:"Fruitbat",21:"Anchovy"};Z.calendars.discworld=v}}),iW=He({"node_modules/world-calendars/dist/calendars/ethiopian.js"(){var Z=Mp(),q=ch();function v(_){this.local=this.regionalOptions[_||""]||this.regionalOptions[""]}v.prototype=new Z.baseCalendar,q(v.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(M){var S=this._validate(M,this.minMonth,this.minDay,Z.local.invalidYear),M=S.year()+(S.year()<0?1:0);return M%4===3||M%4===-1},monthsInYear:function(_){return this._validate(_,this.minMonth,this.minDay,Z.local.invalidYear||Z.regionalOptions[""].invalidYear),13},weekOfYear:function(_,S,M){var e=this.newDate(_,S,M);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInMonth:function(_,S){var M=this._validate(_,S,this.minDay,Z.local.invalidMonth);return this.daysPerMonth[M.month()-1]+(M.month()===13&&this.leapYear(M.year())?1:0)},weekDay:function(_,S,M){return(this.dayOfWeek(_,S,M)||7)<6},toJD:function(_,S,M){var e=this._validate(_,S,M,Z.local.invalidDate);return _=e.year(),_<0&&_++,e.day()+(e.month()-1)*30+(_-1)*365+Math.floor(_/4)+this.jdEpoch-1},fromJD:function(_){var S=Math.floor(_)+.5-this.jdEpoch,M=Math.floor((S-Math.floor((S+366)/1461))/365)+1;M<=0&&M--,S=Math.floor(_)+.5-this.newDate(M,1,1).toJD();var e=Math.floor(S/30)+1,t=S-(e-1)*30+1;return this.newDate(M,e,t)}}),Z.calendars.ethiopian=v}}),nW=He({"node_modules/world-calendars/dist/calendars/hebrew.js"(){var Z=Mp(),q=ch();function v(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}v.prototype=new Z.baseCalendar,q(v.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 M=this._validate(S,this.minMonth,this.minDay,Z.local.invalidYear);return this._leapYear(M.year())},_leapYear:function(S){return S=S<0?S+1:S,_(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,M,e){var t=this.newDate(S,M,e);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInYear:function(S){var M=this._validate(S,this.minMonth,this.minDay,Z.local.invalidYear);return S=M.year(),this.toJD(S===-1?1:S+1,7,1)-this.toJD(S,7,1)},daysInMonth:function(S,M){return S.year&&(M=S.month(),S=S.year()),this._validate(S,M,this.minDay,Z.local.invalidMonth),M===12&&this.leapYear(S)||M===8&&_(this.daysInYear(S),10)===5?30:M===9&&_(this.daysInYear(S),10)===3?29:this.daysPerMonth[M-1]},weekDay:function(S,M,e){return this.dayOfWeek(S,M,e)!==6},extraInfo:function(S,M,e){var t=this._validate(S,M,e,Z.local.invalidDate);return{yearType:(this.leapYear(t)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(t)%10-3]}},toJD:function(S,M,e){var t=this._validate(S,M,e,Z.local.invalidDate);S=t.year(),M=t.month(),e=t.day();var r=S<=0?S+1:S,o=this.jdEpoch+this._delay1(r)+this._delay2(r)+e+1;if(M<7){for(var a=7;a<=this.monthsInYear(S);a++)o+=this.daysInMonth(S,a);for(var a=1;a=this.toJD(M===-1?1:M+1,7,1);)M++;for(var e=Sthis.toJD(M,e,this.daysInMonth(M,e));)e++;var t=S-this.toJD(M,e,1)+1;return this.newDate(M,e,t)}});function _(S,M){return S-M*Math.floor(S/M)}Z.calendars.hebrew=v}}),oW=He({"node_modules/world-calendars/dist/calendars/islamic.js"(){var Z=Mp(),q=ch();function v(_){this.local=this.regionalOptions[_||""]||this.regionalOptions[""]}v.prototype=new Z.baseCalendar,q(v.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(_){var S=this._validate(_,this.minMonth,this.minDay,Z.local.invalidYear);return(S.year()*11+14)%30<11},weekOfYear:function(_,S,M){var e=this.newDate(_,S,M);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInYear:function(_){return this.leapYear(_)?355:354},daysInMonth:function(_,S){var M=this._validate(_,S,this.minDay,Z.local.invalidMonth);return this.daysPerMonth[M.month()-1]+(M.month()===12&&this.leapYear(M.year())?1:0)},weekDay:function(_,S,M){return this.dayOfWeek(_,S,M)!==5},toJD:function(_,S,M){var e=this._validate(_,S,M,Z.local.invalidDate);return _=e.year(),S=e.month(),M=e.day(),_=_<=0?_+1:_,M+Math.ceil(29.5*(S-1))+(_-1)*354+Math.floor((3+11*_)/30)+this.jdEpoch-1},fromJD:function(_){_=Math.floor(_)+.5;var S=Math.floor((30*(_-this.jdEpoch)+10646)/10631);S=S<=0?S-1:S;var M=Math.min(12,Math.ceil((_-29-this.toJD(S,1,1))/29.5)+1),e=_-this.toJD(S,M,1)+1;return this.newDate(S,M,e)}}),Z.calendars.islamic=v}}),sW=He({"node_modules/world-calendars/dist/calendars/julian.js"(){var Z=Mp(),q=ch();function v(_){this.local=this.regionalOptions[_||""]||this.regionalOptions[""]}v.prototype=new Z.baseCalendar,q(v.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(M){var S=this._validate(M,this.minMonth,this.minDay,Z.local.invalidYear),M=S.year()<0?S.year()+1:S.year();return M%4===0},weekOfYear:function(_,S,M){var e=this.newDate(_,S,M);return e.add(4-(e.dayOfWeek()||7),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInMonth:function(_,S){var M=this._validate(_,S,this.minDay,Z.local.invalidMonth);return this.daysPerMonth[M.month()-1]+(M.month()===2&&this.leapYear(M.year())?1:0)},weekDay:function(_,S,M){return(this.dayOfWeek(_,S,M)||7)<6},toJD:function(_,S,M){var e=this._validate(_,S,M,Z.local.invalidDate);return _=e.year(),S=e.month(),M=e.day(),_<0&&_++,S<=2&&(_--,S+=12),Math.floor(365.25*(_+4716))+Math.floor(30.6001*(S+1))+M-1524.5},fromJD:function(_){var S=Math.floor(_+.5),M=S+1524,e=Math.floor((M-122.1)/365.25),t=Math.floor(365.25*e),r=Math.floor((M-t)/30.6001),o=r-Math.floor(r<14?1:13),a=e-Math.floor(o>2?4716:4715),i=M-t-Math.floor(30.6001*r);return a<=0&&a--,this.newDate(a,o,i)}}),Z.calendars.julian=v}}),lW=He({"node_modules/world-calendars/dist/calendars/mayan.js"(){var Z=Mp(),q=ch();function v(M){this.local=this.regionalOptions[M||""]||this.regionalOptions[""]}v.prototype=new Z.baseCalendar,q(v.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(M){return this._validate(M,this.minMonth,this.minDay,Z.local.invalidYear),!1},formatYear:function(M){var e=this._validate(M,this.minMonth,this.minDay,Z.local.invalidYear);M=e.year();var t=Math.floor(M/400);M=M%400,M+=M<0?400:0;var r=Math.floor(M/20);return t+"."+r+"."+M%20},forYear:function(M){if(M=M.split("."),M.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(M){return this._validate(M,this.minMonth,this.minDay,Z.local.invalidYear),18},weekOfYear:function(M,e,t){return this._validate(M,e,t,Z.local.invalidDate),0},daysInYear:function(M){return this._validate(M,this.minMonth,this.minDay,Z.local.invalidYear),360},daysInMonth:function(M,e){return this._validate(M,e,this.minDay,Z.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(M,e,t){var r=this._validate(M,e,t,Z.local.invalidDate);return r.day()},weekDay:function(M,e,t){return this._validate(M,e,t,Z.local.invalidDate),!0},extraInfo:function(M,e,t){var r=this._validate(M,e,t,Z.local.invalidDate),o=r.toJD(),a=this._toHaab(o),i=this._toTzolkin(o);return{haabMonthName:this.local.haabMonths[a[0]-1],haabMonth:a[0],haabDay:a[1],tzolkinDayName:this.local.tzolkinMonths[i[0]-1],tzolkinDay:i[0],tzolkinTrecena:i[1]}},_toHaab:function(M){M-=this.jdEpoch;var e=_(M+8+17*20,365);return[Math.floor(e/20)+1,_(e,20)]},_toTzolkin:function(M){return M-=this.jdEpoch,[S(M+20,20),S(M+4,13)]},toJD:function(M,e,t){var r=this._validate(M,e,t,Z.local.invalidDate);return r.day()+r.month()*20+r.year()*360+this.jdEpoch},fromJD:function(M){M=Math.floor(M)+.5-this.jdEpoch;var e=Math.floor(M/360);M=M%360,M+=M<0?360:0;var t=Math.floor(M/20),r=M%20;return this.newDate(e,t,r)}});function _(M,e){return M-e*Math.floor(M/e)}function S(M,e){return _(M-1,e)+1}Z.calendars.mayan=v}}),uW=He({"node_modules/world-calendars/dist/calendars/nanakshahi.js"(){var Z=Mp(),q=ch();function v(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}v.prototype=new Z.baseCalendar;var _=Z.instance("gregorian");q(v.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 M=this._validate(S,this.minMonth,this.minDay,Z.local.invalidYear||Z.regionalOptions[""].invalidYear);return _.leapYear(M.year()+(M.year()<1?1:0)+1469)},weekOfYear:function(S,M,e){var t=this.newDate(S,M,e);return t.add(1-(t.dayOfWeek()||7),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInMonth:function(S,M){var e=this._validate(S,M,this.minDay,Z.local.invalidMonth);return this.daysPerMonth[e.month()-1]+(e.month()===12&&this.leapYear(e.year())?1:0)},weekDay:function(S,M,e){return(this.dayOfWeek(S,M,e)||7)<6},toJD:function(r,M,e){var t=this._validate(r,M,e,Z.local.invalidMonth),r=t.year();r<0&&r++;for(var o=t.day(),a=1;a=this.toJD(M+1,1,1);)M++;for(var e=S-Math.floor(this.toJD(M,1,1)+.5)+1,t=1;e>this.daysInMonth(M,t);)e-=this.daysInMonth(M,t),t++;return this.newDate(M,t,e)}}),Z.calendars.nanakshahi=v}}),cW=He({"node_modules/world-calendars/dist/calendars/nepali.js"(){var Z=Mp(),q=ch();function v(_){this.local=this.regionalOptions[_||""]||this.regionalOptions[""]}v.prototype=new Z.baseCalendar,q(v.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(_){return this.daysInYear(_)!==this.daysPerYear},weekOfYear:function(_,S,M){var e=this.newDate(_,S,M);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInYear:function(_){var S=this._validate(_,this.minMonth,this.minDay,Z.local.invalidYear);if(_=S.year(),typeof this.NEPALI_CALENDAR_DATA[_]>"u")return this.daysPerYear;for(var M=0,e=this.minMonth;e<=12;e++)M+=this.NEPALI_CALENDAR_DATA[_][e];return M},daysInMonth:function(_,S){return _.year&&(S=_.month(),_=_.year()),this._validate(_,S,this.minDay,Z.local.invalidMonth),typeof this.NEPALI_CALENDAR_DATA[_]>"u"?this.daysPerMonth[S-1]:this.NEPALI_CALENDAR_DATA[_][S]},weekDay:function(_,S,M){return this.dayOfWeek(_,S,M)!==6},toJD:function(_,S,M){var e=this._validate(_,S,M,Z.local.invalidDate);_=e.year(),S=e.month(),M=e.day();var t=Z.instance(),r=0,o=S,a=_;this._createMissingCalendarData(_);var i=_-(o>9||o===9&&M>=this.NEPALI_CALENDAR_DATA[a][0]?56:57);for(S!==9&&(r=M,o--);o!==9;)o<=0&&(o=12,a--),r+=this.NEPALI_CALENDAR_DATA[a][o],o--;return S===9?(r+=M-this.NEPALI_CALENDAR_DATA[a][0],r<0&&(r+=t.daysInYear(i))):r+=this.NEPALI_CALENDAR_DATA[a][9]-this.NEPALI_CALENDAR_DATA[a][0],t.newDate(i,1,1).add(r,"d").toJD()},fromJD:function(_){var S=Z.instance(),M=S.fromJD(_),e=M.year(),t=M.dayOfYear(),r=e+56;this._createMissingCalendarData(r);for(var o=9,a=this.NEPALI_CALENDAR_DATA[r][0],i=this.NEPALI_CALENDAR_DATA[r][o]-a+1;t>i;)o++,o>12&&(o=1,r++),i+=this.NEPALI_CALENDAR_DATA[r][o];var n=this.NEPALI_CALENDAR_DATA[r][o]-(i-t);return this.newDate(r,o,n)},_createMissingCalendarData:function(_){var S=this.daysPerMonth.slice(0);S.unshift(17);for(var M=_-1;M<_+2;M++)typeof this.NEPALI_CALENDAR_DATA[M]>"u"&&(this.NEPALI_CALENDAR_DATA[M]=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=v}}),fW=He({"node_modules/world-calendars/dist/calendars/persian.js"(){var Z=Mp(),q=ch();function v(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}function _(S){var M=S-475;S<0&&M++;var e=.242197,t=e*M,r=e*(M+1),o=t-Math.floor(t),a=r-Math.floor(r);return o>a}v.prototype=new Z.baseCalendar,q(v.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 M=this._validate(S,this.minMonth,this.minDay,Z.local.invalidYear);return _(M.year())},weekOfYear:function(S,M,e){var t=this.newDate(S,M,e);return t.add(-((t.dayOfWeek()+1)%7),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInMonth:function(S,M){var e=this._validate(S,M,this.minDay,Z.local.invalidMonth);return this.daysPerMonth[e.month()-1]+(e.month()===12&&this.leapYear(e.year())?1:0)},weekDay:function(S,M,e){return this.dayOfWeek(S,M,e)!==5},toJD:function(S,M,e){var t=this._validate(S,M,e,Z.local.invalidDate);S=t.year(),M=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 M=475+(S-this.toJD(475,1,1))/365.242197,e=Math.floor(M);e<=0&&e--,S>this.toJD(e,12,_(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=v,Z.calendars.jalali=v}}),hW=He({"node_modules/world-calendars/dist/calendars/taiwan.js"(){var Z=Mp(),q=ch(),v=Z.instance();function _(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}_.prototype=new Z.baseCalendar,q(_.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 M=this._validate(e,this.minMonth,this.minDay,Z.local.invalidYear),e=this._t2gYear(M.year());return v.leapYear(e)},weekOfYear:function(r,M,e){var t=this._validate(r,this.minMonth,this.minDay,Z.local.invalidYear),r=this._t2gYear(t.year());return v.weekOfYear(r,t.month(),t.day())},daysInMonth:function(S,M){var e=this._validate(S,M,this.minDay,Z.local.invalidMonth);return this.daysPerMonth[e.month()-1]+(e.month()===2&&this.leapYear(e.year())?1:0)},weekDay:function(S,M,e){return(this.dayOfWeek(S,M,e)||7)<6},toJD:function(r,M,e){var t=this._validate(r,M,e,Z.local.invalidDate),r=this._t2gYear(t.year());return v.toJD(r,t.month(),t.day())},fromJD:function(S){var M=v.fromJD(S),e=this._g2tYear(M.year());return this.newDate(e,M.month(),M.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=_}}),pW=He({"node_modules/world-calendars/dist/calendars/thai.js"(){var Z=Mp(),q=ch(),v=Z.instance();function _(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}_.prototype=new Z.baseCalendar,q(_.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 M=this._validate(e,this.minMonth,this.minDay,Z.local.invalidYear),e=this._t2gYear(M.year());return v.leapYear(e)},weekOfYear:function(r,M,e){var t=this._validate(r,this.minMonth,this.minDay,Z.local.invalidYear),r=this._t2gYear(t.year());return v.weekOfYear(r,t.month(),t.day())},daysInMonth:function(S,M){var e=this._validate(S,M,this.minDay,Z.local.invalidMonth);return this.daysPerMonth[e.month()-1]+(e.month()===2&&this.leapYear(e.year())?1:0)},weekDay:function(S,M,e){return(this.dayOfWeek(S,M,e)||7)<6},toJD:function(r,M,e){var t=this._validate(r,M,e,Z.local.invalidDate),r=this._t2gYear(t.year());return v.toJD(r,t.month(),t.day())},fromJD:function(S){var M=v.fromJD(S),e=this._g2tYear(M.year());return this.newDate(e,M.month(),M.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=_}}),dW=He({"node_modules/world-calendars/dist/calendars/ummalqura.js"(){var Z=Mp(),q=ch();function v(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}v.prototype=new Z.baseCalendar,q(v.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 M=this._validate(S,this.minMonth,this.minDay,Z.local.invalidYear);return this.daysInYear(M.year())===355},weekOfYear:function(S,M,e){var t=this.newDate(S,M,e);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInYear:function(S){for(var M=0,e=1;e<=12;e++)M+=this.daysInMonth(S,e);return M},daysInMonth:function(S,M){for(var e=this._validate(S,M,this.minDay,Z.local.invalidMonth),t=e.toJD()-24e5+.5,r=0,o=0;o<_.length;o++){if(_[o]>t)return _[r]-_[r-1];r++}return 30},weekDay:function(S,M,e){return this.dayOfWeek(S,M,e)!==5},toJD:function(S,M,e){var t=this._validate(S,M,e,Z.local.invalidDate),r=12*(t.year()-1)+t.month()-15292,o=t.day()+_[r-1]-1;return o+24e5-.5},fromJD:function(S){for(var M=S-24e5+.5,e=0,t=0;t<_.length&&!(_[t]>M);t++)e++;var r=e+15292,o=Math.floor((r-1)/12),a=o+1,i=r-12*o,n=M-_[e-1]+1;return this.newDate(a,i,n)},isValid:function(S,M,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,M,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=v;var _=[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]}}),vW=He({"src/components/calendars/calendars.js"(Z,q){"use strict";q.exports=Mp(),eW(),tW(),rW(),aW(),iW(),nW(),oW(),sW(),lW(),uW(),cW(),fW(),hW(),pW(),dW()}}),mW=He({"src/components/calendars/index.js"(Z,q){"use strict";var v=vW(),_=sa(),S=Gs(),M=S.EPOCHJD,e=S.ONEDAY,t={valType:"enumerated",values:_.sortObjectKeys(v.calendars),editType:"calc",dflt:"gregorian"},r=function(p,b,d,u){var g={};return g[d]=t,_.coerce(p,b,g,d,u)},o=function(p,b,d,u){for(var g=0;g0){if(++_e>=VZ)return arguments[0]}else _e=0;return fe.apply(void 0,arguments)}}var Pb=WZ;var XZ=Pb(Ab),Ib=XZ;var ZZ=/\{\n\/\* \[wrapped with (.+)\] \*/,YZ=/,? & /;function KZ(fe){var _e=fe.match(ZZ);return _e?_e[1].split(YZ):[]}var cC=KZ;var JZ=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;function $Z(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(JZ,`{ +`),bt=wt.createShader(wt.FRAGMENT_SHADER);if(wt.isContextLost())return void(this.failedToCreate=!0);if(wt.shaderSource(bt,pt),wt.compileShader(bt),!wt.getShaderParameter(bt,wt.COMPILE_STATUS))throw new Error(`Could not compile fragment shader: ${wt.getShaderInfoLog(bt)}`);wt.attachShader(this.program,bt);let Dt=wt.createShader(wt.VERTEX_SHADER);if(wt.isContextLost())return void(this.failedToCreate=!0);if(wt.shaderSource(Dt,Et),wt.compileShader(Dt),!wt.getShaderParameter(Dt,wt.COMPILE_STATUS))throw new Error(`Could not compile vertex shader: ${wt.getShaderInfoLog(Dt)}`);wt.attachShader(this.program,Dt),this.attributes={};let ur={};this.numAttributes=Tr.length;for(let yr=0;yr({u_depth:new t.aH(yr,Er.u_depth),u_terrain:new t.aH(yr,Er.u_terrain),u_terrain_dim:new t.aI(yr,Er.u_terrain_dim),u_terrain_matrix:new t.aJ(yr,Er.u_terrain_matrix),u_terrain_unpack:new t.aK(yr,Er.u_terrain_unpack),u_terrain_exaggeration:new t.aI(yr,Er.u_terrain_exaggeration)}))(I,ur),this.binderUniforms=Te?Te.getUniforms(I,ur):[]}draw(I,ie,Te,Me,ze,ht,wt,Ot,$t,Tr,Sr,Kr,na,qe,$e,lt,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 ur in this.terrainUniforms)this.terrainUniforms[ur].set(Ot[ur])}for(let ur in this.fixedUniforms)this.fixedUniforms[ur].set(wt[ur]);$e&&$e.setUniforms(I,this.binderUniforms,na,{zoom:qe});let Dt=0;switch(ie){case bt.LINES:Dt=2;break;case bt.TRIANGLES:Dt=3;break;case bt.LINE_STRIP:Dt=1}for(let ur of Kr.get()){let yr=ur.vaos||(ur.vaos={});(yr[$t]||(yr[$t]=new Kt)).bind(I,this,Tr,$e?$e.getPaintVertexBuffers():[],Sr,ur.vertexOffset,lt,pt,Et),bt.drawElements(ie,ur.primitiveLength*Dt,bt.UNSIGNED_SHORT,ur.primitiveOffset*Dt*2)}}}function Pa(Oe,I,ie){let Te=1/Fa(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,Oe.fromScale,Oe.toScale],u_fade:Oe.t,u_pixel_coord_upper:[ht>>16,wt>>16],u_pixel_coord_lower:[65535&ht,65535&wt]}}let ga=(Oe,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 Sr=Math.sin(Tr),Kr=Math.cos(Tr);$t[0]=Kr,$t[1]=Sr,$t[2]=0,$t[3]=-Sr,$t[4]=Kr,$t[5]=0,$t[6]=0,$t[7]=0,$t[8]=1}(wt,-I.transform.angle),function($t,Tr,Sr){var Kr=Tr[0],na=Tr[1],qe=Tr[2];$t[0]=Kr*Sr[0]+na*Sr[3]+qe*Sr[6],$t[1]=Kr*Sr[1]+na*Sr[4]+qe*Sr[7],$t[2]=Kr*Sr[2]+na*Sr[5]+qe*Sr[8]}(ht,ht,wt);let Ot=Me.properties.get("color");return{u_matrix:Oe,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=(Oe,I,ie,Te,Me,ze,ht)=>t.e(ga(Oe,I,ie,Te),Pa(ze,I,ht),{u_height_factor:-Math.pow(2,Me.overscaledZ)/ht.tileSize/8}),ba=Oe=>({u_matrix:Oe}),Ai=(Oe,I,ie,Te)=>t.e(ba(Oe),Pa(ie,I,Te)),ki=(Oe,I)=>({u_matrix:Oe,u_world:I}),Ki=(Oe,I,ie,Te,Me)=>t.e(Ai(Oe,I,ie,Te),{u_world:Me}),En=(Oe,I,ie,Te)=>{let Me=Oe.transform,ze,ht;if(Te.paint.get("circle-pitch-alignment")==="map"){let wt=Fa(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:Oe.translatePosMatrix(I.posMatrix,ie,Te.paint.get("circle-translate"),Te.paint.get("circle-translate-anchor")),u_pitch_with_map:+ze,u_device_pixel_ratio:Oe.pixelRatio,u_extrude_scale:ht}},Tn=(Oe,I,ie)=>({u_matrix:Oe,u_inv_matrix:I,u_camera_to_center_distance:ie.cameraToCenterDistance,u_viewport_size:[ie.width,ie.height]}),On=(Oe,I,ie=1)=>({u_matrix:Oe,u_color:I,u_overlay:0,u_overlay_scale:ie}),kn=Oe=>({u_matrix:Oe}),ao=(Oe,I,ie,Te)=>({u_matrix:Oe,u_extrude_scale:Fa(I,1,ie),u_intensity:Te}),Co=(Oe,I,ie,Te)=>{let Me=t.H();t.aP(Me,0,Oe.width,Oe.height,0,0,1);let ze=Oe.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 bo(Oe,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 zs=(Oe,I,ie,Te)=>{let Me=Oe.transform;return{u_matrix:os(Oe,I,ie,Te),u_ratio:1/Fa(I,1,Me.zoom),u_device_pixel_ratio:Oe.pixelRatio,u_units_to_pixels:[1/Me.pixelsToGLUnits[0],1/Me.pixelsToGLUnits[1]]}},Cn=(Oe,I,ie,Te,Me)=>t.e(zs(Oe,I,ie,Me),{u_image:0,u_image_height:Te}),wo=(Oe,I,ie,Te,Me)=>{let ze=Oe.transform,ht=go(I,ze);return{u_matrix:os(Oe,I,ie,Me),u_texsize:I.imageAtlasTexture.size,u_ratio:1/Fa(I,1,ze.zoom),u_device_pixel_ratio:Oe.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]]}},Zn=(Oe,I,ie,Te,Me,ze)=>{let ht=Oe.lineAtlas,wt=go(I,Oe.transform),Ot=ie.layout.get("line-cap")==="round",$t=ht.getDash(Te.from,Ot),Tr=ht.getDash(Te.to,Ot),Sr=$t.width*Me.fromScale,Kr=Tr.width*Me.toScale;return t.e(zs(Oe,I,ie,ze),{u_patternscale_a:[wt/Sr,-$t.height/2],u_patternscale_b:[wt/Kr,-Tr.height/2],u_sdfgamma:ht.width/(256*Math.min(Sr,Kr)*Oe.pixelRatio)/2,u_image:0,u_tex_y_a:$t.y,u_tex_y_b:Tr.y,u_mix:Me.t})};function go(Oe,I){return 1/Fa(Oe,1,I.tileZoom)}function os(Oe,I,ie,Te){return Oe.translatePosMatrix(Te?Te.posMatrix:I.tileID.posMatrix,I,ie.paint.get("line-translate"),ie.paint.get("line-translate-anchor"))}let ys=(Oe,I,ie,Te,Me)=>{return{u_matrix:Oe,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:jo(Me.paint.get("raster-hue-rotate"))};var ze,ht};function jo(Oe){Oe*=Math.PI/180;let I=Math.sin(Oe),ie=Math.cos(Oe);return[(2*ie+1)/3,(-Math.sqrt(3)*I-ie+1)/3,(Math.sqrt(3)*I-ie+1)/3]}let Yn=(Oe,I,ie,Te,Me,ze,ht,wt,Ot,$t,Tr,Sr,Kr,na)=>{let qe=ht.transform;return{u_is_size_zoom_constant:+(Oe==="constant"||Oe==="source"),u_is_size_feature_constant:+(Oe==="constant"||Oe==="camera"),u_size_t:I?I.uSizeT:0,u_size:I?I.uSize:0,u_camera_to_center_distance:qe.cameraToCenterDistance,u_pitch:qe.pitch/360*2*Math.PI,u_rotate_symbol:+ie,u_aspect_ratio:qe.width/qe.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:+Sr,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=(Oe,I,ie,Te,Me,ze,ht,wt,Ot,$t,Tr,Sr,Kr,na,qe)=>{let $e=ht.transform;return t.e(Yn(Oe,I,ie,Te,Me,ze,ht,wt,Ot,$t,Tr,Sr,Kr,qe),{u_gamma_scale:Te?Math.cos($e._pitch)*$e.cameraToCenterDistance:1,u_device_pixel_ratio:ht.pixelRatio,u_is_halo:+na})},Hn=(Oe,I,ie,Te,Me,ze,ht,wt,Ot,$t,Tr,Sr,Kr,na)=>t.e(Gn(Oe,I,ie,Te,Me,ze,ht,wt,Ot,$t,Tr,!0,Sr,!0,na),{u_texsize_icon:Kr,u_texture_icon:1}),ss=(Oe,I,ie)=>({u_matrix:Oe,u_opacity:I,u_color:ie}),_s=(Oe,I,ie,Te,Me,ze)=>t.e(function(ht,wt,Ot,$t){let Tr=Ot.imageManager.getPattern(ht.from.toString()),Sr=Ot.imageManager.getPattern(ht.to.toString()),{width:Kr,height:na}=Ot.imageManager.getPixelSize(),qe=Math.pow(2,$t.tileID.overscaledZ),$e=$t.tileSize*Math.pow(2,Ot.transform.tileZoom)/qe,lt=$e*($t.tileID.canonical.x+$t.tileID.wrap*qe),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:Sr.tl,u_pattern_br_b:Sr.br,u_texsize:[Kr,na],u_mix:wt.t,u_pattern_size_a:Tr.displaySize,u_pattern_size_b:Sr.displaySize,u_scale_a:wt.fromScale,u_scale_b:wt.toScale,u_tile_units_to_pixels:1/Fa($t,1,Ot.transform.tileZoom),u_pixel_coord_upper:[lt>>16,pt>>16],u_pixel_coord_lower:[65535<,65535&pt]}}(Te,ze,ie,Me),{u_matrix:Oe,u_opacity:I}),ps={fillExtrusion:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix),u_lightpos:new t.aN(Oe,I.u_lightpos),u_lightintensity:new t.aI(Oe,I.u_lightintensity),u_lightcolor:new t.aN(Oe,I.u_lightcolor),u_vertical_gradient:new t.aI(Oe,I.u_vertical_gradient),u_opacity:new t.aI(Oe,I.u_opacity)}),fillExtrusionPattern:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix),u_lightpos:new t.aN(Oe,I.u_lightpos),u_lightintensity:new t.aI(Oe,I.u_lightintensity),u_lightcolor:new t.aN(Oe,I.u_lightcolor),u_vertical_gradient:new t.aI(Oe,I.u_vertical_gradient),u_height_factor:new t.aI(Oe,I.u_height_factor),u_image:new t.aH(Oe,I.u_image),u_texsize:new t.aO(Oe,I.u_texsize),u_pixel_coord_upper:new t.aO(Oe,I.u_pixel_coord_upper),u_pixel_coord_lower:new t.aO(Oe,I.u_pixel_coord_lower),u_scale:new t.aN(Oe,I.u_scale),u_fade:new t.aI(Oe,I.u_fade),u_opacity:new t.aI(Oe,I.u_opacity)}),fill:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix)}),fillPattern:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix),u_image:new t.aH(Oe,I.u_image),u_texsize:new t.aO(Oe,I.u_texsize),u_pixel_coord_upper:new t.aO(Oe,I.u_pixel_coord_upper),u_pixel_coord_lower:new t.aO(Oe,I.u_pixel_coord_lower),u_scale:new t.aN(Oe,I.u_scale),u_fade:new t.aI(Oe,I.u_fade)}),fillOutline:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix),u_world:new t.aO(Oe,I.u_world)}),fillOutlinePattern:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix),u_world:new t.aO(Oe,I.u_world),u_image:new t.aH(Oe,I.u_image),u_texsize:new t.aO(Oe,I.u_texsize),u_pixel_coord_upper:new t.aO(Oe,I.u_pixel_coord_upper),u_pixel_coord_lower:new t.aO(Oe,I.u_pixel_coord_lower),u_scale:new t.aN(Oe,I.u_scale),u_fade:new t.aI(Oe,I.u_fade)}),circle:(Oe,I)=>({u_camera_to_center_distance:new t.aI(Oe,I.u_camera_to_center_distance),u_scale_with_map:new t.aH(Oe,I.u_scale_with_map),u_pitch_with_map:new t.aH(Oe,I.u_pitch_with_map),u_extrude_scale:new t.aO(Oe,I.u_extrude_scale),u_device_pixel_ratio:new t.aI(Oe,I.u_device_pixel_ratio),u_matrix:new t.aJ(Oe,I.u_matrix)}),collisionBox:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix),u_pixel_extrude_scale:new t.aO(Oe,I.u_pixel_extrude_scale)}),collisionCircle:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix),u_inv_matrix:new t.aJ(Oe,I.u_inv_matrix),u_camera_to_center_distance:new t.aI(Oe,I.u_camera_to_center_distance),u_viewport_size:new t.aO(Oe,I.u_viewport_size)}),debug:(Oe,I)=>({u_color:new t.aL(Oe,I.u_color),u_matrix:new t.aJ(Oe,I.u_matrix),u_overlay:new t.aH(Oe,I.u_overlay),u_overlay_scale:new t.aI(Oe,I.u_overlay_scale)}),clippingMask:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix)}),heatmap:(Oe,I)=>({u_extrude_scale:new t.aI(Oe,I.u_extrude_scale),u_intensity:new t.aI(Oe,I.u_intensity),u_matrix:new t.aJ(Oe,I.u_matrix)}),heatmapTexture:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix),u_world:new t.aO(Oe,I.u_world),u_image:new t.aH(Oe,I.u_image),u_color_ramp:new t.aH(Oe,I.u_color_ramp),u_opacity:new t.aI(Oe,I.u_opacity)}),hillshade:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix),u_image:new t.aH(Oe,I.u_image),u_latrange:new t.aO(Oe,I.u_latrange),u_light:new t.aO(Oe,I.u_light),u_shadow:new t.aL(Oe,I.u_shadow),u_highlight:new t.aL(Oe,I.u_highlight),u_accent:new t.aL(Oe,I.u_accent)}),hillshadePrepare:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix),u_image:new t.aH(Oe,I.u_image),u_dimension:new t.aO(Oe,I.u_dimension),u_zoom:new t.aI(Oe,I.u_zoom),u_unpack:new t.aK(Oe,I.u_unpack)}),line:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix),u_ratio:new t.aI(Oe,I.u_ratio),u_device_pixel_ratio:new t.aI(Oe,I.u_device_pixel_ratio),u_units_to_pixels:new t.aO(Oe,I.u_units_to_pixels)}),lineGradient:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix),u_ratio:new t.aI(Oe,I.u_ratio),u_device_pixel_ratio:new t.aI(Oe,I.u_device_pixel_ratio),u_units_to_pixels:new t.aO(Oe,I.u_units_to_pixels),u_image:new t.aH(Oe,I.u_image),u_image_height:new t.aI(Oe,I.u_image_height)}),linePattern:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix),u_texsize:new t.aO(Oe,I.u_texsize),u_ratio:new t.aI(Oe,I.u_ratio),u_device_pixel_ratio:new t.aI(Oe,I.u_device_pixel_ratio),u_image:new t.aH(Oe,I.u_image),u_units_to_pixels:new t.aO(Oe,I.u_units_to_pixels),u_scale:new t.aN(Oe,I.u_scale),u_fade:new t.aI(Oe,I.u_fade)}),lineSDF:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix),u_ratio:new t.aI(Oe,I.u_ratio),u_device_pixel_ratio:new t.aI(Oe,I.u_device_pixel_ratio),u_units_to_pixels:new t.aO(Oe,I.u_units_to_pixels),u_patternscale_a:new t.aO(Oe,I.u_patternscale_a),u_patternscale_b:new t.aO(Oe,I.u_patternscale_b),u_sdfgamma:new t.aI(Oe,I.u_sdfgamma),u_image:new t.aH(Oe,I.u_image),u_tex_y_a:new t.aI(Oe,I.u_tex_y_a),u_tex_y_b:new t.aI(Oe,I.u_tex_y_b),u_mix:new t.aI(Oe,I.u_mix)}),raster:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix),u_tl_parent:new t.aO(Oe,I.u_tl_parent),u_scale_parent:new t.aI(Oe,I.u_scale_parent),u_buffer_scale:new t.aI(Oe,I.u_buffer_scale),u_fade_t:new t.aI(Oe,I.u_fade_t),u_opacity:new t.aI(Oe,I.u_opacity),u_image0:new t.aH(Oe,I.u_image0),u_image1:new t.aH(Oe,I.u_image1),u_brightness_low:new t.aI(Oe,I.u_brightness_low),u_brightness_high:new t.aI(Oe,I.u_brightness_high),u_saturation_factor:new t.aI(Oe,I.u_saturation_factor),u_contrast_factor:new t.aI(Oe,I.u_contrast_factor),u_spin_weights:new t.aN(Oe,I.u_spin_weights)}),symbolIcon:(Oe,I)=>({u_is_size_zoom_constant:new t.aH(Oe,I.u_is_size_zoom_constant),u_is_size_feature_constant:new t.aH(Oe,I.u_is_size_feature_constant),u_size_t:new t.aI(Oe,I.u_size_t),u_size:new t.aI(Oe,I.u_size),u_camera_to_center_distance:new t.aI(Oe,I.u_camera_to_center_distance),u_pitch:new t.aI(Oe,I.u_pitch),u_rotate_symbol:new t.aH(Oe,I.u_rotate_symbol),u_aspect_ratio:new t.aI(Oe,I.u_aspect_ratio),u_fade_change:new t.aI(Oe,I.u_fade_change),u_matrix:new t.aJ(Oe,I.u_matrix),u_label_plane_matrix:new t.aJ(Oe,I.u_label_plane_matrix),u_coord_matrix:new t.aJ(Oe,I.u_coord_matrix),u_is_text:new t.aH(Oe,I.u_is_text),u_pitch_with_map:new t.aH(Oe,I.u_pitch_with_map),u_is_along_line:new t.aH(Oe,I.u_is_along_line),u_is_variable_anchor:new t.aH(Oe,I.u_is_variable_anchor),u_texsize:new t.aO(Oe,I.u_texsize),u_texture:new t.aH(Oe,I.u_texture),u_translation:new t.aO(Oe,I.u_translation),u_pitched_scale:new t.aI(Oe,I.u_pitched_scale)}),symbolSDF:(Oe,I)=>({u_is_size_zoom_constant:new t.aH(Oe,I.u_is_size_zoom_constant),u_is_size_feature_constant:new t.aH(Oe,I.u_is_size_feature_constant),u_size_t:new t.aI(Oe,I.u_size_t),u_size:new t.aI(Oe,I.u_size),u_camera_to_center_distance:new t.aI(Oe,I.u_camera_to_center_distance),u_pitch:new t.aI(Oe,I.u_pitch),u_rotate_symbol:new t.aH(Oe,I.u_rotate_symbol),u_aspect_ratio:new t.aI(Oe,I.u_aspect_ratio),u_fade_change:new t.aI(Oe,I.u_fade_change),u_matrix:new t.aJ(Oe,I.u_matrix),u_label_plane_matrix:new t.aJ(Oe,I.u_label_plane_matrix),u_coord_matrix:new t.aJ(Oe,I.u_coord_matrix),u_is_text:new t.aH(Oe,I.u_is_text),u_pitch_with_map:new t.aH(Oe,I.u_pitch_with_map),u_is_along_line:new t.aH(Oe,I.u_is_along_line),u_is_variable_anchor:new t.aH(Oe,I.u_is_variable_anchor),u_texsize:new t.aO(Oe,I.u_texsize),u_texture:new t.aH(Oe,I.u_texture),u_gamma_scale:new t.aI(Oe,I.u_gamma_scale),u_device_pixel_ratio:new t.aI(Oe,I.u_device_pixel_ratio),u_is_halo:new t.aH(Oe,I.u_is_halo),u_translation:new t.aO(Oe,I.u_translation),u_pitched_scale:new t.aI(Oe,I.u_pitched_scale)}),symbolTextAndIcon:(Oe,I)=>({u_is_size_zoom_constant:new t.aH(Oe,I.u_is_size_zoom_constant),u_is_size_feature_constant:new t.aH(Oe,I.u_is_size_feature_constant),u_size_t:new t.aI(Oe,I.u_size_t),u_size:new t.aI(Oe,I.u_size),u_camera_to_center_distance:new t.aI(Oe,I.u_camera_to_center_distance),u_pitch:new t.aI(Oe,I.u_pitch),u_rotate_symbol:new t.aH(Oe,I.u_rotate_symbol),u_aspect_ratio:new t.aI(Oe,I.u_aspect_ratio),u_fade_change:new t.aI(Oe,I.u_fade_change),u_matrix:new t.aJ(Oe,I.u_matrix),u_label_plane_matrix:new t.aJ(Oe,I.u_label_plane_matrix),u_coord_matrix:new t.aJ(Oe,I.u_coord_matrix),u_is_text:new t.aH(Oe,I.u_is_text),u_pitch_with_map:new t.aH(Oe,I.u_pitch_with_map),u_is_along_line:new t.aH(Oe,I.u_is_along_line),u_is_variable_anchor:new t.aH(Oe,I.u_is_variable_anchor),u_texsize:new t.aO(Oe,I.u_texsize),u_texsize_icon:new t.aO(Oe,I.u_texsize_icon),u_texture:new t.aH(Oe,I.u_texture),u_texture_icon:new t.aH(Oe,I.u_texture_icon),u_gamma_scale:new t.aI(Oe,I.u_gamma_scale),u_device_pixel_ratio:new t.aI(Oe,I.u_device_pixel_ratio),u_is_halo:new t.aH(Oe,I.u_is_halo),u_translation:new t.aO(Oe,I.u_translation),u_pitched_scale:new t.aI(Oe,I.u_pitched_scale)}),background:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix),u_opacity:new t.aI(Oe,I.u_opacity),u_color:new t.aL(Oe,I.u_color)}),backgroundPattern:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix),u_opacity:new t.aI(Oe,I.u_opacity),u_image:new t.aH(Oe,I.u_image),u_pattern_tl_a:new t.aO(Oe,I.u_pattern_tl_a),u_pattern_br_a:new t.aO(Oe,I.u_pattern_br_a),u_pattern_tl_b:new t.aO(Oe,I.u_pattern_tl_b),u_pattern_br_b:new t.aO(Oe,I.u_pattern_br_b),u_texsize:new t.aO(Oe,I.u_texsize),u_mix:new t.aI(Oe,I.u_mix),u_pattern_size_a:new t.aO(Oe,I.u_pattern_size_a),u_pattern_size_b:new t.aO(Oe,I.u_pattern_size_b),u_scale_a:new t.aI(Oe,I.u_scale_a),u_scale_b:new t.aI(Oe,I.u_scale_b),u_pixel_coord_upper:new t.aO(Oe,I.u_pixel_coord_upper),u_pixel_coord_lower:new t.aO(Oe,I.u_pixel_coord_lower),u_tile_units_to_pixels:new t.aI(Oe,I.u_tile_units_to_pixels)}),terrain:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix),u_texture:new t.aH(Oe,I.u_texture),u_ele_delta:new t.aI(Oe,I.u_ele_delta),u_fog_matrix:new t.aJ(Oe,I.u_fog_matrix),u_fog_color:new t.aL(Oe,I.u_fog_color),u_fog_ground_blend:new t.aI(Oe,I.u_fog_ground_blend),u_fog_ground_blend_opacity:new t.aI(Oe,I.u_fog_ground_blend_opacity),u_horizon_color:new t.aL(Oe,I.u_horizon_color),u_horizon_fog_blend:new t.aI(Oe,I.u_horizon_fog_blend)}),terrainDepth:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix),u_ele_delta:new t.aI(Oe,I.u_ele_delta)}),terrainCoords:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix),u_texture:new t.aH(Oe,I.u_texture),u_terrain_coords_id:new t.aI(Oe,I.u_terrain_coords_id),u_ele_delta:new t.aI(Oe,I.u_ele_delta)}),sky:(Oe,I)=>({u_sky_color:new t.aL(Oe,I.u_sky_color),u_horizon_color:new t.aL(Oe,I.u_horizon_color),u_horizon:new t.aI(Oe,I.u_horizon),u_sky_horizon_blend:new t.aI(Oe,I.u_sky_horizon_blend)})};class Ko{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,Oe.transform.glCoordMatrix),t.aQ(yr,yr,bt.placementViewportMatrix),Ot.push({circleArray:ur,circleOffset:Tr,transform:Et.posMatrix,invTransform:yr,coord:Et}),$t+=ur.length/4,Tr=$t}Dt&&wt.draw(ze,ht.LINES,us.disabled,Ps.disabled,Oe.colorModeForRenderPass(),to.disabled,{u_matrix:Et.posMatrix,u_pixel_extrude_scale:[1/(Sr=Oe.transform).width,1/Sr.height]},Oe.style.map.terrain&&Oe.style.map.terrain.getTerrainData(Et),ie.id,Dt.layoutVertexBuffer,Dt.indexBuffer,Dt.segments,null,Oe.transform.zoom,null,null,Dt.collisionVertexBuffer)}var Sr;if(!Me||!Ot.length)return;let Kr=Oe.useProgram("collisionCircle"),na=new t.aR;na.resize(4*$t),na._trim();let qe=0;for(let pt of Ot)for(let Et=0;Et=0&&(pt[bt.associatedIconIndex]={shiftedAnchor:Sn,angle:Kn})}else or(bt.numGlyphs,$e)}if($t){lt.clear();let Et=Oe.icon.placedSymbolArray;for(let bt=0;btOe.style.map.terrain.getElevation(Aa,zt,_r):null,tr=ie.layout.get("text-rotation-alignment")==="map";Ae(ci,Aa.posMatrix,Oe,Me,tu,vu,pt,$t,tr,$e,Aa.toUnwrapped(),qe.width,qe.height,wl,Tt)}let Gl=Aa.posMatrix,Hl=Me&&jr||uc,me=Et||Hl?ql:tu,De=Ru,et=on&&ie.paint.get(Me?"text-halo-width":"icon-halo-width").constantOr(1)!==0,dt;dt=on?ci.iconsInText?Hn(Sn.kind,Ao,bt,pt,Et,Hl,Oe,Gl,me,De,wl,Mo,tl,ha):Gn(Sn.kind,Ao,bt,pt,Et,Hl,Oe,Gl,me,De,wl,Me,Mo,!0,ha):Yn(Sn.kind,Ao,bt,pt,Et,Hl,Oe,Gl,me,De,wl,Me,Mo,ha);let yt={program:Bn,buffers:Vi,uniformValues:dt,atlasTexture:Yo,atlasTextureIcon:es,atlasInterpolation:ds,atlasInterpolationIcon:ul,isSDF:on,hasHalo:et};if(ur&&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:ls})}else Qr.push({segments:Vi.segments,sortKey:0,state:yt,terrainData:ls})}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,Oe,Da.program,Er,Tr,Sr,ci,Aa.terrainData)),ci.u_is_halo=0}Of(Da.buffers,Aa.segments,ie,Oe,Da.program,Er,Tr,Sr,Da.uniformValues,Aa.terrainData)}}function Of(Oe,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,Oe.layoutVertexBuffer,Oe.indexBuffer,I,ie.paint,Te.transform.zoom,Oe.programConfigurations.get(ie.id),Oe.dynamicLayoutVertexBuffer,Oe.opacityVertexBuffer)}function of(Oe,I,ie,Te){let Me=Oe.context,ze=Me.gl,ht=Ps.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 Sr=Ot.programConfigurations.get(ie.id),Kr=Oe.useProgram("heatmap",Sr),na=Oe.style.map.terrain.getTerrainData(Te);Kr.draw(Me,ze.TRIANGLES,us.disabled,ht,wt,to.disabled,ao(Te.posMatrix,I,Oe.transform.zoom,ie.paint.get("heatmap-intensity")),na,ie.id,Ot.layoutVertexBuffer,Ot.indexBuffer,Ot.segments,ie.paint,Oe.transform.zoom,Sr)}function jc(Oe,I,ie){let Te=Oe.context,Me=Te.gl;Te.setColorMode(Oe.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),Oe.useProgram("heatmapTexture").draw(Te,Me.TRIANGLES,us.disabled,Ps.disabled,Oe.colorModeForRenderPass(),to.disabled,Co(Oe,I,0,1),null,I.id,Oe.rasterBoundsBuffer,Oe.quadTriangleIndexBuffer,Oe.rasterBoundsSegments,I.paint,Oe.transform.zoom),wt.destroy(),I.heatmapFbos.delete(ht))}function Bf(Oe,I,ie){var Te,Me;let ze=Oe.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=Oe.HALF_FLOAT)!==null&&Te!==void 0?Te:ze.UNSIGNED_BYTE,Ot=(Me=Oe.RGBA16F)!==null&&Me!==void 0?Me:ze.RGBA;ze.texImage2D(ze.TEXTURE_2D,0,Ot,I,ie,0,ze.RGBA,wt,null);let $t=Oe.createFramebuffer(I,ie,!1,!1);return $t.colorAttachment.set(ht),$t}function Nf(Oe,I){return I.colorRampTexture||(I.colorRampTexture=new u(Oe,I.colorRamp,Oe.gl.RGBA)),I.colorRampTexture}function Gu(Oe,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&&Oe.setConstantPatternPositions(ht,wt)}function Ef(Oe,I,ie,Te,Me,ze,ht){let wt=Oe.context.gl,Ot="fill-pattern",$t=ie.paint.get(Ot),Tr=$t&&$t.constantOr(1),Sr=ie.getCrossfadeParameters(),Kr,na,qe,$e,lt;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 Dt=bt.getBucket(ie);if(!Dt)continue;let ur=Dt.programConfigurations.get(ie.id),yr=Oe.useProgram(na,ur),Er=Oe.style.map.terrain&&Oe.style.map.terrain.getTerrainData(Et);Tr&&(Oe.context.activeTexture.set(wt.TEXTURE0),bt.imageAtlasTexture.bind(wt.LINEAR,wt.CLAMP_TO_EDGE),ur.updatePaintBuffers(Sr)),Gu(ur,Ot,pt,bt,ie);let jr=Er?Et:null,Qr=Oe.translatePosMatrix(jr?jr.posMatrix:Et.posMatrix,bt,ie.paint.get("fill-translate"),ie.paint.get("fill-translate-anchor"));if(ht){$e=Dt.indexBuffer2,lt=Dt.segments2;let ha=[wt.drawingBufferWidth,wt.drawingBufferHeight];qe=na==="fillOutlinePattern"&&Tr?Ki(Qr,Oe,Sr,bt,ha):ki(Qr,ha)}else $e=Dt.indexBuffer,lt=Dt.segments,qe=Tr?Ai(Qr,Oe,Sr,bt):ba(Qr);yr.draw(Oe.context,Kr,Me,Oe.stencilModeForClipping(Et),ze,to.disabled,qe,Er,ie.id,Dt.layoutVertexBuffer,$e,lt,ie.paint,Oe.transform.zoom,ur)}}function oc(Oe,I,ie,Te,Me,ze,ht){let wt=Oe.context,Ot=wt.gl,$t="fill-extrusion-pattern",Tr=ie.paint.get($t),Sr=Tr.constantOr(1),Kr=ie.getCrossfadeParameters(),na=ie.paint.get("fill-extrusion-opacity"),qe=Tr.constantOr(null);for(let $e of Te){let lt=I.getTile($e),pt=lt.getBucket(ie);if(!pt)continue;let Et=Oe.style.map.terrain&&Oe.style.map.terrain.getTerrainData($e),bt=pt.programConfigurations.get(ie.id),Dt=Oe.useProgram(Sr?"fillExtrusionPattern":"fillExtrusion",bt);Sr&&(Oe.context.activeTexture.set(Ot.TEXTURE0),lt.imageAtlasTexture.bind(Ot.LINEAR,Ot.CLAMP_TO_EDGE),bt.updatePaintBuffers(Kr)),Gu(bt,$t,qe,lt,ie);let ur=Oe.translatePosMatrix($e.posMatrix,lt,ie.paint.get("fill-extrusion-translate"),ie.paint.get("fill-extrusion-translate-anchor")),yr=ie.paint.get("fill-extrusion-vertical-gradient"),Er=Sr?la(ur,Oe,yr,na,$e,Kr,lt):ga(ur,Oe,yr,na);Dt.draw(wt,wt.gl.TRIANGLES,Me,ze,ht,to.backCCW,Er,Et,ie.id,pt.layoutVertexBuffer,pt.indexBuffer,pt.segments,ie.paint,Oe.transform.zoom,bt,Oe.style.map.terrain&&pt.centroidVertexBuffer)}}function Zc(Oe,I,ie,Te,Me,ze,ht){let wt=Oe.context,Ot=wt.gl,$t=ie.fbo;if(!$t)return;let Tr=Oe.useProgram("hillshade"),Sr=Oe.style.map.terrain&&Oe.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,qe,$e)=>{let lt=qe.paint.get("hillshade-shadow-color"),pt=qe.paint.get("hillshade-highlight-color"),Et=qe.paint.get("hillshade-accent-color"),bt=qe.paint.get("hillshade-illumination-direction")*(Math.PI/180);qe.paint.get("hillshade-illumination-anchor")==="viewport"&&(bt-=Kr.transform.angle);let Dt=!Kr.options.moving;return{u_matrix:$e?$e.posMatrix:Kr.transform.calculatePosMatrix(na.tileID.toUnwrapped(),Dt),u_image:0,u_latrange:bo(0,na.tileID),u_light:[qe.paint.get("hillshade-exaggeration"),bt],u_shadow:lt,u_highlight:pt,u_accent:Et}})(Oe,ie,Te,Sr?I:null),Sr,Te.id,Oe.rasterBoundsBuffer,Oe.quadTriangleIndexBuffer,Oe.rasterBoundsSegments)}function eu(Oe,I,ie,Te,Me,ze){let ht=Oe.context,wt=ht.gl,Ot=I.dem;if(Ot&&Ot.data){let $t=Ot.dim,Tr=Ot.stride,Sr=Ot.getPixels();if(ht.activeTexture.set(wt.TEXTURE1),ht.pixelStoreUnpackPremultiplyAlpha.set(!1),I.demTexture=I.demTexture||Oe.getTileTexture(Tr),I.demTexture){let na=I.demTexture;na.update(Sr,{premultiply:!1}),na.bind(wt.NEAREST,wt.CLAMP_TO_EDGE)}else I.demTexture=new u(ht,Sr,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]),Oe.useProgram("hillshadePrepare").draw(ht,wt.TRIANGLES,Te,Me,ze,to.disabled,((na,qe)=>{let $e=qe.stride,lt=t.H();return t.aP(lt,0,t.X,-t.X,0,0,1),t.J(lt,lt,[0,-t.X,0]),{u_matrix:lt,u_image:1,u_dimension:[$e,$e],u_zoom:na.overscaledZ,u_unpack:qe.getUnpackVector()}})(I.tileID,Ot),null,ie.id,Oe.rasterBoundsBuffer,Oe.quadTriangleIndexBuffer,Oe.rasterBoundsSegments),I.needsHillshadePrepare=!1}}function qc(Oe,I,ie,Te,Me,ze){let ht=Te.paint.get("raster-fade-duration");if(!ze&&ht>0){let wt=i.now(),Ot=(wt-Oe.timeAdded)/ht,$t=I?(wt-I.timeAdded)/ht:-1,Tr=ie.getSource(),Sr=Me.coveringZoomLevel({tileSize:Tr.tileSize,roundZoom:Tr.roundZoom}),Kr=!I||Math.abs(I.tileID.overscaledZ-Sr)>Math.abs(Oe.tileID.overscaledZ-Sr),na=Kr&&Oe.refreshedUponExpiration?1:t.ac(Kr?Ot:1-$t,0,1);return Oe.refreshedUponExpiration&&Ot>=1&&(Oe.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),Zs=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 Yc(Oe,I,ie,Te){Cu(Oe,0,I+ie/2,Oe.transform.width,ie,Te)}function $f(Oe,I,ie,Te){Cu(Oe,I-ie/2,0,ie,Oe.transform.height,Te)}function Cu(Oe,I,ie,Te,Me,ze){let ht=Oe.context,wt=ht.gl;wt.enable(wt.SCISSOR_TEST),wt.scissor(I*Oe.pixelRatio,ie*Oe.pixelRatio,Te*Oe.pixelRatio,Me*Oe.pixelRatio),ht.clear({color:ze}),wt.disable(wt.SCISSOR_TEST)}function jf(Oe,I,ie){let Te=Oe.context,Me=Te.gl,ze=ie.posMatrix,ht=Oe.useProgram("debug"),wt=us.disabled,Ot=Ps.disabled,$t=Oe.colorModeForRenderPass(),Tr="$debug",Sr=Oe.style.map.terrain&&Oe.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),qe=I.getTile(ie).tileSize,$e=512/Math.min(qe,512)*(ie.overscaledZ/Oe.transform.zoom)*.5,lt=ie.canonical.toString();ie.overscaledZ!==ie.canonical.z&&(lt+=` => ${ie.overscaledZ}`),function(pt,Et){pt.initDebugOverlayCanvas();let bt=pt.debugOverlayCanvas,Dt=pt.context.gl,ur=pt.debugOverlayCanvas.getContext("2d");ur.clearRect(0,0,bt.width,bt.height),ur.shadowColor="white",ur.shadowBlur=2,ur.lineWidth=1.5,ur.strokeStyle="white",ur.textBaseline="top",ur.font="bold 36px Open Sans, sans-serif",ur.fillText(Et,5,5),ur.strokeText(Et,5,5),pt.debugOverlayTexture.update(bt),pt.debugOverlayTexture.bind(Dt.LINEAR,Dt.CLAMP_TO_EDGE)}(Oe,`${lt} ${na}kB`),ht.draw(Te,Me.TRIANGLES,wt,Ot,fl.alphaBlended,to.disabled,On(ze,t.aM.transparent,$e),null,Tr,Oe.debugBuffer,Oe.quadTriangleIndexBuffer,Oe.debugSegments),ht.draw(Te,Me.LINE_STRIP,wt,Ot,$t,to.disabled,On(ze,t.aM.red),Sr,Tr,Oe.debugBuffer,Oe.tileBorderIndexBuffer,Oe.debugSegments)}function ml(Oe,I,ie){let Te=Oe.context,Me=Te.gl,ze=Oe.colorModeForRenderPass(),ht=new us(Me.LEQUAL,us.ReadWrite,Oe.depthRangeFor3D),wt=Oe.useProgram("terrain"),Ot=I.getTerrainMesh();Te.bindFramebuffer.set(null),Te.viewport.set([0,0,Oe.width,Oe.height]);for(let $t of ie){let Tr=Oe.renderToTexture.getTexture($t),Sr=I.getTerrainData($t.tileID);Te.activeTexture.set(Me.TEXTURE0),Me.bindTexture(Me.TEXTURE_2D,Tr.texture);let Kr=Oe.transform.calculatePosMatrix($t.tileID.toUnwrapped()),na=I.getMeshFrameDelta(Oe.transform.zoom),qe=Oe.transform.calculateFogMatrix($t.tileID.toUnwrapped()),$e=mr(Kr,na,qe,Oe.style.sky,Oe.transform.pitch);wt.draw(Te,Me.TRIANGLES,ht,Ps.disabled,ze,to.backCCW,$e,Sr,"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 Or}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,Nr.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,Nr.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,je.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,Nr.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 Ps({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,us.disabled,this.stencilClearMode,fl.disabled,to.disabled,kn(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(us.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,us.disabled,new Ps({func:Me.ALWAYS,mask:0},wt,255,Me.KEEP,Me.KEEP,Me.REPLACE),fl.disabled,to.disabled,kn(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 Ps({func:ie.NOTEQUAL,mask:255},I,255,ie.KEEP,ie.KEEP,ie.REPLACE)}stencilModeForClipping(I){let ie=this.context.gl;return new Ps({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 us(Sr.LEQUAL,us.ReadWrite,[0,1]),qe=Ps.disabled,$e=Ot.colorModeForRenderPass(),lt=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,Nr.members),Tr.createIndexBuffer(Et),t.a0.simpleSegment(0,0,pt.length,Et.length))}lt.draw(Tr,Sr.TRIANGLES,na,qe,$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.currentLayerlt.source&&!lt.isHidden(Tr)?[$t.sourceCaches[lt.source]]:[]),na=Kr.filter(lt=>lt.getSource().type==="vector"),qe=Kr.filter(lt=>lt.getSource().type!=="vector"),$e=lt=>{(!Sr||Sr.getSource().maxzoom$e(lt)),Sr||qe.forEach(lt=>$e(lt)),Sr}(this.style,this.transform.zoom);Ot&&function($t,Tr,Sr){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 us(Ot.LEQUAL,us.ReadWrite,[0,1]),Sr=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 qe of Kr){let $e=ht.getTerrainData(qe.tileID),lt={u_matrix:ze.transform.calculatePosMatrix(qe.tileID.toUnwrapped()),u_ele_delta:ht.getMeshFrameDelta(ze.transform.zoom)};na.draw(wt,Ot.TRIANGLES,Tr,Ps.disabled,$t,to.backCCW,lt,$e,"terrain",Sr.vertexBuffer,Sr.indexBuffer,Sr.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 us(Ot.LEQUAL,us.ReadWrite,[0,1]),Sr=ht.getTerrainMesh(),Kr=ht.getCoordsTexture(),na=ht.sourceCache.getRenderableTiles(),qe=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 lt=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)};qe.draw(wt,Ot.TRIANGLES,Tr,Ps.disabled,$t,to.backCCW,pt,lt,"terrain",Sr.vertexBuffer,Sr.indexBuffer,Sr.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=Ps.disabled,Sr=ze.colorModeForRenderPass();(wt._unevaluatedLayout.hasValue("text-variable-anchor")||wt._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function(Kr,na,qe,$e,lt,pt,Et,bt,Dt){let ur=na.transform,yr=pi(),Er=lt==="map",jr=pt==="map";for(let Qr of Kr){let ha=$e.getTile(Qr),Aa=ha.getBucket(qe);if(!Aa||!Aa.text||!Aa.text.segments.get().length)continue;let Da=t.ag(Aa.textSizeData,ur.zoom),ci=Fa(ha,1,na.transform.zoom),Vi=kr(Qr.posMatrix,jr,Er,na.transform,ci),ji=qe.layout.get("icon-text-fit")!=="none"&&Aa.hasIconData();if(Da){let on=Math.pow(2,ur.zoom-ha.tileID.overscaledZ),Sn=na.style.map.terrain?(Bn,Ao)=>na.style.map.terrain.getElevation(Qr,Bn,Ao):null,Kn=yr.translatePosition(ur,ha,Et,bt);nf(Aa,Er,jr,Dt,ur,Vi,Qr.posMatrix,on,Da,ji,yr,Kn,Qr.toUnwrapped(),Sn)}}}(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,Sr),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,Sr),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"),Sr=wt.paint.get("circle-stroke-opacity"),Kr=!wt.layout.get("circle-sort-key").isConstant();if($t.constantOr(1)===0&&(Tr.constantOr(1)===0||Sr.constantOr(1)===0))return;let na=ze.context,qe=na.gl,$e=ze.depthModeForSublayer(0,us.ReadOnly),lt=Ps.disabled,pt=ze.colorModeForRenderPass(),Et=[];for(let bt=0;btbt.sortKey-Dt.sortKey);for(let bt of Et){let{programConfiguration:Dt,program:ur,layoutVertexBuffer:yr,indexBuffer:Er,uniformValues:jr,terrainData:Qr}=bt.state;ur.draw(na,qe.TRIANGLES,$e,lt,pt,to.disabled,jr,Qr,wt.id,yr,Er,bt.segments,wt.paint,ze.transform.zoom,Dt)}})(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 Sr=ht.getTile(Tr);ht.hasRenderableParent(Tr)||(ze.renderPass==="offscreen"?of(ze,Sr,wt,Tr):ze.renderPass==="translucent"&&jc(ze,wt,Tr))}$t.viewport.set([0,0,ze.width,ze.height])}else ze.renderPass==="offscreen"?function(Tr,Sr,Kr,na){let qe=Tr.context,$e=qe.gl,lt=Ps.disabled,pt=new fl([$e.ONE,$e.ONE],t.aM.transparent,[!0,!0,!0,!0]);(function(Et,bt,Dt){let ur=Et.gl;Et.activeTexture.set(ur.TEXTURE1),Et.viewport.set([0,0,bt.width/4,bt.height/4]);let yr=Dt.heatmapFbos.get(t.aU);yr?(ur.bindTexture(ur.TEXTURE_2D,yr.colorAttachment.get()),Et.bindFramebuffer.set(yr.framebuffer)):(yr=Bf(Et,bt.width/4,bt.height/4),Dt.heatmapFbos.set(t.aU,yr))})(qe,Tr,Kr),qe.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=ys(ci,Qr||[0,0],jr||1,Er,wt);Sr instanceof at?Kr.draw($t,Tr.TRIANGLES,bt,Ps.disabled,na,to.disabled,Vi,Aa,wt.id,Sr.boundsBuffer,ze.quadTriangleIndexBuffer,Sr.boundsSegments):Kr.draw($t,Tr.TRIANGLES,bt,qe[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 Sr=ze.context,Kr=Sr.gl,na=ze.transform,qe=na.tileSize,$e=wt.paint.get("background-pattern");if(ze.isPatternMissing($e))return;let lt=!$e&&$t.a===1&&Tr===1&&ze.opaquePassEnabledForLayer()?"opaque":"translucent";if(ze.renderPass!==lt)return;let pt=Ps.disabled,Et=ze.depthModeForSublayer(0,lt==="opaque"?us.ReadWrite:us.ReadOnly),bt=ze.colorModeForRenderPass(),Dt=ze.useProgram($e?"backgroundPattern":"background"),ur=Ot||na.coveringTiles({tileSize:qe,terrain:ze.style.map.terrain});$e&&(Sr.activeTexture.set(Kr.TEXTURE0),ze.imageManager.bind(ze.context));let yr=wt.getCrossfadeParameters();for(let Er of ur){let jr=Ot?Er.posMatrix:ze.transform.calculatePosMatrix(Er.toUnwrapped()),Qr=$e?_s(jr,Tr,ze,$e,{tileID:Er,tileSize:qe},yr):ss(jr,Tr,$t),ha=ze.style.map.terrain&&ze.style.map.terrain.getTerrainData(Er);Dt.draw(Sr,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(Ps.disabled);let Tr=$t.renderingMode==="3d"?new us(ze.context.gl.LEQUAL,us.ReadWrite,ze.depthRangeFor3D):ze.depthModeForSublayer(0,us.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]:Fa(ie,Te[0],this.transform.zoom),ze?Te[1]:Fa(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 va(this.context,Hr[I],ie,ps[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 qe=na[0],$e=na[1],lt=na[2],pt=qe*qe+$e*$e+lt*lt;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,qe){var $e=na[0],lt=na[1],pt=na[2],Et=qe[0],bt=qe[1],Dt=qe[2];return Kr[0]=lt*Dt-pt*bt,Kr[1]=pt*Et-$e*Dt,Kr[2]=$e*bt-lt*Et,Kr}([],E([],ze[wt[0]],ze[wt[1]]),E([],ze[wt[2]],ze[wt[1]]))),$t=-((Tr=Ot)[0]*(Sr=ze[wt[1]])[0]+Tr[1]*Sr[1]+Tr[2]*Sr[2]);var Tr,Sr;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 Ml{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 Ml(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),Sr=Math.cos(ze);Te[0]=ht*Sr+Ot*Tr,Te[1]=wt*Sr+$t*Tr,Te[2]=ht*-Tr+Ot*Sr,Te[3]=wt*-Tr+$t*Sr}(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],Sr=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,qe=bt=>({aabb:new vc([bt*Ot,0,0],[(bt+1)*Ot,Ot,0]),zoom:0,x:0,y:0,wrap:bt,fullyVisible:!1}),$e=[],lt=[],pt=Me,Et=I.reparseOverscaled?ze:Me;if(this._renderWorldCopies)for(let bt=1;bt<=3;bt++)$e.push(qe(-bt)),$e.push(qe(bt));for($e.push(qe(0));$e.length>0;){let bt=$e.pop(),Dt=bt.x,ur=bt.y,yr=bt.fullyVisible;if(!yr){let Aa=bt.aabb.intersects(Sr);if(Aa===0)continue;yr=Aa===2}let Er=I.terrain?$t:Tr,jr=bt.aabb.distanceX(Er),Qr=bt.aabb.distanceY(Er),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-(Dt<>1),Vi=bt.zoom+1,ji=bt.aabb.quadrant(Aa);if(I.terrain){let on=new t.S(Vi,bt.wrap,Vi,Da,ci),Sn=I.terrain.getMinMaxElevation(on),Kn=(ie=Sn.minElevation)!==null&&ie!==void 0?ie:this.elevation,Bn=(Te=Sn.maxElevation)!==null&&Te!==void 0?Te:this.elevation;ji=new vc([ji.min[0],ji.min[1],Kn],[ji.max[0],ji.max[1],Bn])}$e.push({aabb:ji,zoom:Vi,x:Da,y:ci,wrap:bt.wrap,fullyVisible:yr})}}return lt.sort((bt,Dt)=>bt.distanceSq-Dt.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,Sr=$t===Tr?0:(0-$t)/(Tr-$t);return new t.Z(t.y.number(Te[0]/ze,Me[0]/ht,Sr)/this.worldSize,t.y.number(wt,Ot,Sr)/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 te().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 te([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,Sr=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,Dt=qe;this._renderWorldCopies&&(Dt=t.b3(qe,bt-ze/2,bt+ze/2));let ur=Kr/2;Dt-ur$t&&(lt=$t-ur)}if(lt!==void 0||pt!==void 0){let bt=new t.P(lt??qe,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),Sr=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)),qe=Math.sin(na)*Ot/Math.sin(t.ac(Math.PI-$t-na,.01,Math.PI-.01)),$e=Math.min(Sr,qe);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 lt=this.width%2/2,pt=this.height%2/2,Et=Math.cos(this.angle),bt=Math.sin(this.angle),Dt=ie-Math.round(ie)+Et*lt+bt*pt,ur=Te-Math.round(Te)+Et*pt+bt*lt,yr=new Float64Array(Me);if(t.J(yr,yr,[Dt>.5?Dt-1:Dt,ur>.5?ur-1:ur,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(Oe,I){let ie,Te=!1,Me=null,ze=null,ht=()=>{Me=null,Te&&(Oe.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 Sr=this._hashName,Kr=!1,na=window.location.hash.slice(1).split("&").map(qe=>{let $e=qe.split("=")[0];return $e===Sr?(Kr=!0,`${$e}=${Tr}`):qe}).filter(qe=>qe);return Kr||na.push(`${Sr}=${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:i.now(),settings:I})}_drainInertiaBuffer(){let I=this._inertiaBuffer,ie=i.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(Oe,I){(!Oe.duration||Oe.durationie.unproject(Ot)),wt=ze.reduce((Ot,$t,Tr,Sr)=>Ot.add($t.div(Sr.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 iu(I.type,this._map,I))}mouseup(I){this._map.fire(new iu(I.type,this._map,I))}click(I,ie){this._mousedownPos&&this._mousedownPos.dist(ie)>=this._clickTolerance||this._map.fire(new iu(I.type,this._map,I))}dblclick(I){return this._firePreventable(new iu(I.type,this._map,I))}mouseover(I){this._map.fire(new iu(I.type,this._map,I))}mouseout(I){this._map.fire(new iu(I.type,this._map,I))}touchstart(I){return this._firePreventable(new Kc(I.type,this._map,I))}touchmove(I){this._map.fire(new Kc(I.type,this._map,I))}touchend(I){this._map.fire(new Kc(I.type,this._map,I))}touchcancel(I){this._map.fire(new Kc(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 iu(I.type,this._map,I))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new iu("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(I){this._delayContextMenu?this._contextMenuEvent=I:this._ignoreContextMenu||this._map.fire(new iu(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&&(n.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&&(n.remove(this._box),this._box=null),n.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(I,ie){return this._map.fire(new t.k(I,{originalEvent:ie}))}}function Cf(Oe,I){if(Oe.length!==I.length)throw new Error(`The number of touches and points are not equal - touches ${Oe.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){Oe.mousedown=Oe.dragStart,Oe.mousemoveWindow=Oe.dragMove,Oe.mouseup=Oe.dragEnd,Oe.contextmenu=I=>{I.preventDefault()}},nu=({enable:Oe,clickTolerance:I,bearingDegreesPerPixelMoved:ie=.8})=>{let Te=new Wu({checkCorrectEvent:Me=>n.mouseButton(Me)===0&&Me.ctrlKey||n.mouseButton(Me)===2});return new Hu({clickTolerance:I,move:(Me,ze)=>({bearingDelta:(ze.x-Me.x)*ie}),moveStateManager:Te,enable:Oe,assignEvents:Lf})},Vf=({enable:Oe,clickTolerance:I,pitchDegreesPerPixelMoved:ie=-.5})=>{let Te=new Wu({checkCorrectEvent:Me=>n.mouseButton(Me)===0&&Me.ctrlKey||n.mouseButton(Me)===2});return new Hu({clickTolerance:I,move:(Me,ze)=>({pitchDelta:(ze.y-Me.y)*ie}),moveStateManager:Te,enable:Oe,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],Sr=this._touches[$t];Sr&&(ze._add(Tr),ht._add(Tr.sub(Sr)),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(Oe.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 xr{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(Oe){return Oe*(2-Oe)}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=i.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=n.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=i.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=(i.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:i.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=n.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&&(n.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=Oe=>Oe.zoom||Oe.drag||Oe.pitch||Oe.rotate;class mi extends t.k{}function Mn(Oe){return Oe.panDelta&&Oe.panDelta.mag()||Oe.zoomDelta||Oe.bearingDelta||Oe.pitchDelta}class Qn{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,Sr=Tr?this._getMapTouches(Tr):void 0,Kr=Sr?n.touchPos(this._map.getCanvas(),Sr):n.mousePos(this._map.getCanvas(),Me);for(let{handlerName:$e,handler:lt,allowed:pt}of this._handlers){if(!lt.isEnabled())continue;let Et;this._blockedByActive($t,pt,$e)?lt.reset():lt[ze||Me.type]&&(Et=lt[ze||Me.type](Me,Kr,Sr),this.mergeHandlerResult(wt,Ot,Et,$e,ht),Et&&Et.needsRenderFrame&&this._triggerRenderFrame()),(Et||lt.isActive())&&($t[$e]=lt)}let na={};for(let $e in this._previousActiveHandlers)$t[$e]||(na[$e]=ht);this._previousActiveHandlers=$t,(Object.keys(na).length||Mn(wt))&&(this._changes.push([wt,Ot,na]),this._triggerRenderFrame()),(Object.keys($t).length||Mn(wt))&&this._map._stop(!0),this._updatingCamera=!1;let{cameraAnimation:qe}=wt;qe&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],qe(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)n.addEventListener(Me,ze,Me===document?this.handleWindowEvent:this.handleEvent,ht)}destroy(){for(let[I,ie,Te]of this._listeners)n.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=nu(I),Sr=Vf(I);ie.dragRotate=new pn(I,Tr,Sr),this._add("mouseRotate",Tr,["mousePitch"]),this._add("mousePitch",Sr,["mouseRotate"]),I.interactive&&I.dragRotate&&ie.dragRotate.enable();let Kr=(({enable:Et,clickTolerance:bt})=>{let Dt=new Wu({checkCorrectEvent:ur=>n.mouseButton(ur)===0&&!ur.ctrlKey});return new Hu({clickTolerance:bt,move:(ur,yr)=>({around:yr,panDelta:yr.sub(ur)}),activateOnStart:!0,moveStateManager:Dt,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 qe=new $c,$e=new xu;ie.touchZoomRotate=new Pi(Te,$e,qe,Ot),this._add("touchRotate",qe,["touchPan","touchZoom"]),this._add("touchZoom",$e,["touchPan","touchRotate"]),I.interactive&&I.touchZoomRotate&&ie.touchZoomRotate.enable(I.touchZoomRotate);let lt=ie.scrollZoom=new ka(ie,()=>this._triggerRenderFrame());this._add("scrollZoom",lt,["mousePan"]),I.interactive&&I.scrollZoom&&ie.scrollZoom.enable(I.scrollZoom);let pt=ie.keyboard=new xr(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(!(Mn(I)||ht&&this._terrainMovement))return this._fireEvents(ie,Te,!0);let{panDelta:wt,zoomDelta:Ot,bearingDelta:$t,pitchDelta:Tr,around:Sr,pinchAround:Kr}=I;Kr!==void 0&&(Sr=Kr),Me._stop(!0),Sr=Sr||Me.transform.centerPoint;let na=ze.pointLocation(wt?Sr.sub(wt):Sr);$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,Sr):(this._terrainMovement=!0,this._map._elevationFreeze=!0,ze.setLocationAtPoint(na,Sr)):ze.setLocationAtPoint(na,Sr),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 Sr in I){let{originalEvent:Kr}=I[Sr];this._eventsInProgress[Sr]||(ht[`${Sr}start`]=Kr),this._eventsInProgress[Sr]=I[Sr]}!Me&&ze&&this._fireEvent("movestart",ze.originalEvent);for(let Sr in ht)this._fireEvent(Sr,ht[Sr]);ze&&this._fireEvent("move",ze.originalEvent);for(let Sr in I){let{originalEvent:Kr}=I[Sr];this._fireEvent(Sr,Kr)}let wt={},Ot;for(let Sr in this._eventsInProgress){let{handlerName:Kr,originalEvent:na}=this._eventsInProgress[Sr];this._handlersById[Kr].isActive()||(delete this._eventsInProgress[Sr],Ot=ie[Kr]||na,wt[`${Sr}end`]=Ot)}for(let Sr in wt)this._fireEvent(Sr,wt[Sr]);let $t=Ni(this._eventsInProgress),Tr=(Me||ze)&&!$t;if(Tr&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;let Sr=this._map._getTransformForUpdate();Sr.recalculateZoom(this._map.terrain),this._map._applyUpdatedTransform(Sr)}if(Te&&Tr){this._updatingCamera=!0;let Sr=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 io extends t.E{constructor(I,ie){super(),this._renderFrameCallback=()=>{let Te=Math.min((i.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,lt,Er)),this._rotating&&(Me.bearing=t.y.number(ht,$t,Er)),this._pitching&&(Me.pitch=t.y.number(wt,Tr,Er)),this._padding&&(Me.interpolatePadding(Ot,Sr,Er),na=Me.centerPoint.add(Kr)),this.terrain&&!I.freezeElevation&&this._updateElevation(Er),Dt)Me.setLocationAtPoint(Dt,ur);else{let jr=Me.zoomScale(Me.zoom-ze),Qr=lt>ze?Math.min(2,bt):Math.max(.5,bt),ha=Math.pow(Qr,1-Er),Aa=Me.unproject(pt.add(Et.mult(Er*ha)).mult(jr));Me.setLocationAtPoint(Me.renderWorldCopies?Aa.wrap():Aa,na)}this._applyUpdatedTransform(Me),this._fireMoveEvents(ie)},Er=>{this.terrain&&I.freezeElevation&&this._finalizeElevation(),this._afterEase(ie,Er)},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&&i.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,Sr="padding"in I?I.padding:Me.padding,Kr=t.P.convert(I.offset),na=Me.centerPoint.add(Kr),qe=Me.pointLocation(na),{center:$e,zoom:lt}=Me.getConstrained(t.N.convert(I.center||qe),(Te=I.zoom)!==null&&Te!==void 0?Te:ze);this._normalizeCenter($e,Me);let pt=Me.zoomScale(lt-ze),Et=Me.project(qe),bt=Me.project($e).sub(Et),Dt=I.curve,ur=Math.max(Me.width,Me.height),yr=ur/pt,Er=bt.mag();if("minZoom"in I){let on=t.ac(Math.min(I.minZoom,ze,lt),Me.minZoom,Me.maxZoom),Sn=ur/Me.zoomScale(on-ze);Dt=Math.sqrt(Sn/Er*2)}let jr=Dt*Dt;function Qr(on){let Sn=(yr*yr-ur*ur+(on?-1:1)*jr*jr*Er*Er)/(2*(on?yr:ur)*jr*Er);return Math.log(Math.sqrt(Sn*Sn+1)-Sn)}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+Dt*on)},Vi=function(on){return ur*((Aa(Da)*(ha(Sn=Da+Dt*on)/Aa(Sn))-ha(Da))/jr)/Er;var Sn},ji=(Qr(!0)-Da)/Dt;if(Math.abs(Er)<1e-6||!isFinite(ji)){if(Math.abs(ur-yr)<1e-6)return this.easeTo(I,ie);let on=yr0,ci=Sn=>Math.exp(on*Dt*Sn)}return I.duration="duration"in I?+I.duration:1e3*ji/("screenSpeed"in I?+I.screenSpeed/Dt:+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(Sr),this._prepareEase(ie,!1),this.terrain&&this._prepareElevation($e),this._ease(on=>{let Sn=on*ji,Kn=1/ci(Sn);Me.zoom=on===1?lt:ze+Me.scaleZoom(Kn),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,Sr,on),na=Me.centerPoint.add(Kr)),this.terrain&&!I.freezeElevation&&this._updateElevation(on);let Bn=on===1?$e:Me.unproject(Et.add(bt.mult(Vi(Sn))).mult(Kn));Me.setLocationAtPoint(Me.renderWorldCopies?Bn.wrap():Bn,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=i.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 eo={compact:!0,customAttribution:'
MapLibre'};class co{constructor(I=eo){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=n.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=n.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=n.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(){n.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 An{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=n.create("div","maplibregl-ctrl");let ie=n.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(){n.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 yo=t.Y([{name:"a_pos3d",type:"Int16",components:3}]);class Qo 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 ks{constructor(I,ie,Te){this.painter=I,this.sourceCache=new Qo(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]],Sr=Tr&&this.sourceCache.getTileByID(Tr);if(!Sr)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()&&(ml(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{Oe.touchstart=Oe.dragStart,Oe.touchmoveWindow=Oe.dragMove,Oe.touchend=Oe.dragEnd},Un={showCompass:!0,showZoom:!0,visualizePitch:!1};class Ro{constructor(I,ie,Te=!1){this.mousedown=ht=>{this.startMouse(t.e({},ht,{ctrlKey:!0,preventDefault:()=>ht.preventDefault()}),n.mousePos(this.element,ht)),n.addEventListener(window,"mousemove",this.mousemove),n.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=ht=>{this.moveMouse(ht,n.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=n.touchPos(this.element,ht.targetTouches)[0],this.startTouch(ht,this._startPos),n.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),n.addEventListener(window,"touchend",this.touchend))},this.touchmove=ht=>{ht.targetTouches.length!==1?this.reset():(this._lastPos=n.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=nu({clickTolerance:Me,enable:!0}),this.touchRotate=(({enable:ht,clickTolerance:wt,bearingDegreesPerPixelMoved:Ot=.8})=>{let $t=new Jc;return new Hu({clickTolerance:wt,move:(Tr,Sr)=>({bearingDelta:(Sr.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 Jc;return new Hu({clickTolerance:wt,move:(Tr,Sr)=>({pitchDelta:(Sr.y-Tr.y)*Ot}),moveStateManager:$t,enable:ht,assignEvents:ll})})({clickTolerance:ze,enable:!0})),n.addEventListener(ie,"mousedown",this.mousedown),n.addEventListener(ie,"touchstart",this.touchstart,{passive:!1}),n.addEventListener(ie,"touchcancel",this.reset)}startMouse(I,ie){this.mouseRotate.dragStart(I,ie),this.mousePitch&&this.mousePitch.dragStart(I,ie),n.disableDrag()}startTouch(I,ie){this.touchRotate.dragStart(I,ie),this.touchPitch&&this.touchPitch.dragStart(I,ie),n.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;n.removeEventListener(I,"mousedown",this.mousedown),n.removeEventListener(I,"touchstart",this.touchstart,{passive:!1}),n.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),n.removeEventListener(window,"touchend",this.touchend),n.removeEventListener(I,"touchcancel",this.reset),this.offTemp()}offTemp(){n.enableDrag(),n.removeEventListener(window,"mousemove",this.mousemove),n.removeEventListener(window,"mouseup",this.mouseup),n.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),n.removeEventListener(window,"touchend",this.touchend)}}let Js;function Fs(Oe,I,ie){let Te=new t.N(Oe.lng,Oe.lat);if(Oe=new t.N(Oe.lng,Oe.lat),I){let Me=new t.N(Oe.lng-360,Oe.lat),ze=new t.N(Oe.lng+360,Oe.lat),ht=ie.locationPoint(Oe).distSqr(I);ie.locationPoint(Me).distSqr(I)180;){let Me=ie.locationPoint(Oe);if(Me.x>=0&&Me.y>=0&&Me.x<=ie.width&&Me.y<=ie.height)break;Oe.lng>ie.center.lng?Oe.lng-=360:Oe.lng+=360}return Oe.lng!==Te.lng&&ie.locationPoint(Oe).y>ie.height/2-ie.getHorizon()?Oe:Te}let cu={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(Oe,I,ie){let Te=Oe.classList;for(let Me in cu)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?Fs(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()),n.setTransform(this._element,`${cu[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${ht} ${ze}`),i.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=n.create("div");let ie=n.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=n.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=n.createNS("http://www.w3.org/2000/svg","g");ht.setAttributeNS(null,"fill-rule","nonzero");let wt=n.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=n.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=n.createNS("http://www.w3.org/2000/svg","g");$t.setAttributeNS(null,"fill",this._color);let Tr=n.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 Sr=n.createNS("http://www.w3.org/2000/svg","g");Sr.setAttributeNS(null,"opacity","0.25"),Sr.setAttributeNS(null,"fill","#000000");let Kr=n.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"),Sr.appendChild(Kr);let na=n.createNS("http://www.w3.org/2000/svg","g");na.setAttributeNS(null,"transform","translate(6.0, 7.0)"),na.setAttributeNS(null,"fill","#FFFFFF");let qe=n.createNS("http://www.w3.org/2000/svg","g");qe.setAttributeNS(null,"transform","translate(8.0, 8.0)");let $e=n.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 lt=n.createNS("http://www.w3.org/2000/svg","circle");lt.setAttributeNS(null,"fill","#FFFFFF"),lt.setAttributeNS(null,"cx","5.5"),lt.setAttributeNS(null,"cy","5.5"),lt.setAttributeNS(null,"r","5.4999962"),qe.appendChild($e),qe.appendChild(lt),ht.appendChild(wt),ht.appendChild($t),ht.appendChild(Sr),ht.appendChild(na),ht.appendChild(qe),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),n.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(Oe,I,ie){let Te=ie&&ie.maxWidth||100,Me=Oe._container.clientHeight/2,ze=Oe.unproject([0,Me]),ht=Oe.unproject([Te,Me]),wt=ze.distanceTo(ht);if(ie&&ie.unit==="imperial"){let Ot=3.2808*wt;Ot>5280?fo(I,Te,Ot/5280,Oe._getUIString("ScaleControl.Miles")):fo(I,Te,Ot,Oe._getUIString("ScaleControl.Feet"))}else ie&&ie.unit==="nautical"?fo(I,Te,wt/1852,Oe._getUIString("ScaleControl.NauticalMiles")):wt>=1e3?fo(I,Te,wt/1e3,Oe._getUIString("ScaleControl.Kilometers")):fo(I,Te,wt,Oe._getUIString("ScaleControl.Meters"))}function fo(Oe,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);Oe.style.width=I*(Me/ie)+"px",Oe.innerHTML=`${Me} ${Te}`}let Fo={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(Oe){if(Oe){if(typeof Oe=="number"){let I=Math.round(Math.abs(Oe)/Math.SQRT2);return{center:new t.P(0,0),top:new t.P(0,Oe),"top-left":new t.P(I,I),"top-right":new t.P(-I,I),bottom:new t.P(0,-Oe),"bottom-left":new t.P(I,-I),"bottom-right":new t.P(-I,-I),left:new t.P(Oe,0),right:new t.P(-Oe,0)}}if(Oe instanceof t.P||Array.isArray(Oe)){let I=t.P.convert(Oe);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(Oe.center||[0,0]),top:t.P.convert(Oe.top||[0,0]),"top-left":t.P.convert(Oe["top-left"]||[0,0]),"top-right":t.P.convert(Oe["top-right"]||[0,0]),bottom:t.P.convert(Oe.bottom||[0,0]),"bottom-left":t.P.convert(Oe["bottom-left"]||[0,0]),"bottom-right":t.P.convert(Oe["bottom-right"]||[0,0]),left:t.P.convert(Oe.left||[0,0]),right:t.P.convert(Oe.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(Oe={}){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,Oe&&Oe.container&&(Oe.container instanceof HTMLElement?this._container=Oe.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(Oe){return this._map=Oe,this._container||(this._container=this._map.getContainer()),this._controlContainer=n.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){n.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){let Oe=this._fullscreenButton=n.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);n.create("span","maplibregl-ctrl-icon",Oe).setAttribute("aria-hidden","true"),Oe.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){let Oe=this._getTitle();this._fullscreenButton.setAttribute("aria-label",Oe),this._fullscreenButton.title=Oe}_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=Pe,e.GeolocateControl=class extends t.E{constructor(Oe){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=te.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=n.create("button","maplibregl-ctrl-geolocate",this._container),n.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=n.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new Zu({element:this._dotElement}),this._circleElement=n.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,Oe)}onAdd(Oe){return this._map=Oe,this._container=n.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(),n.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,bu=0,Rc=!1}_isOutOfMapMaxBounds(Oe){let I=this._map.getMaxBounds(),ie=Oe.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 Oe=this._map.getBounds(),I=Oe.getSouthEast(),ie=Oe.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 Oe;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),bu++,bu>1?(Oe={maximumAge:6e5,timeout:0},Rc=!0):(Oe=this.options.positionOptions,Rc=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,Oe)}}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=xr,e.LngLatBounds=te,e.LogoControl=An,e.Map=class extends io{constructor(Oe){t.bf.mark(t.bg.create);let I=Object.assign(Object.assign({},yl),Oe);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 Ml(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({},Ss),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 x(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 Qn(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 An,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(Oe,I){if(I===void 0&&(I=Oe.getDefaultPosition?Oe.getDefaultPosition():"top-right"),!Oe||!Oe.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=Oe.onAdd(this);this._controls.push(Oe);let Te=this._controlPositions[I];return I.indexOf("bottom")!==-1?Te.insertBefore(ie,Te.firstChild):Te.appendChild(ie),this}removeControl(Oe){if(!Oe||!Oe.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(Oe);return I>-1&&this._controls.splice(I,1),Oe.onRemove(this),this}hasControl(Oe){return this._controls.indexOf(Oe)>-1}calculateCameraOptionsFromTo(Oe,I,ie,Te){return Te==null&&this.terrain&&(Te=this.terrain.getElevationForLngLatZoom(ie,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(Oe,I,ie,Te)}resize(Oe){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",Oe)).fire(new t.k("move",Oe))),this.fire(new t.k("resize",Oe)),ht&&this.fire(new t.k("moveend",Oe)),this}_getClampedPixelRatio(Oe,I){let{0:ie,1:Te}=this._maxCanvasSize,Me=this.getPixelRatio(),ze=Oe*Me,ht=I*Me;return Math.min(ze>ie?ie/ze:1,ht>Te?Te/ht:1)*Me}getPixelRatio(){var Oe;return(Oe=this._overridePixelRatio)!==null&&Oe!==void 0?Oe:devicePixelRatio}setPixelRatio(Oe){this._overridePixelRatio=Oe,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(Oe){return this.transform.setMaxBounds(te.convert(Oe)),this._update()}setMinZoom(Oe){if((Oe=Oe??-2)>=-2&&Oe<=this.transform.maxZoom)return this.transform.minZoom=Oe,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=Oe,this._update(),this.getZoom()>Oe&&this.setZoom(Oe),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(Oe){if((Oe=Oe??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(Oe>=0&&Oe<=this.transform.maxPitch)return this.transform.minPitch=Oe,this._update(),this.getPitch()85)throw new Error("maxPitch must be less than or equal to 85");if(Oe>=this.transform.minPitch)return this.transform.maxPitch=Oe,this._update(),this.getPitch()>Oe&&this.setPitch(Oe),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(Oe){return this.transform.renderWorldCopies=Oe,this._update()}project(Oe){return this.transform.locationPoint(t.N.convert(Oe),this.style&&this.terrain)}unproject(Oe){return this.transform.pointLocation(t.P.convert(Oe),this.terrain)}isMoving(){var Oe;return this._moving||((Oe=this.handlers)===null||Oe===void 0?void 0:Oe.isMoving())}isZooming(){var Oe;return this._zooming||((Oe=this.handlers)===null||Oe===void 0?void 0:Oe.isZooming())}isRotating(){var Oe;return this._rotating||((Oe=this.handlers)===null||Oe===void 0?void 0:Oe.isRotating())}_createDelegatedListener(Oe,I,ie){if(Oe==="mouseenter"||Oe==="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 iu(Oe,this,ze.originalEvent,{features:wt}))):Te=!1},mouseout:()=>{Te=!1}}}}if(Oe==="mouseleave"||Oe==="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 iu(Oe,this,ht.originalEvent)))},mouseout:ht=>{Te&&(Te=!1,ie.call(this,new iu(Oe,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:{[Oe]:Te}}}}_saveDelegatedListener(Oe,I){this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[Oe]=this._delegatedListeners[Oe]||[],this._delegatedListeners[Oe].push(I)}_removeDelegatedListener(Oe,I,ie){if(!this._delegatedListeners||!this._delegatedListeners[Oe])return;let Te=this._delegatedListeners[Oe];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(Oe,I,ie){if(ie===void 0)return super.on(Oe,I);let Te=this._createDelegatedListener(Oe,typeof I=="string"?[I]:I,ie);this._saveDelegatedListener(Oe,Te);for(let Me in Te.delegates)this.on(Me,Te.delegates[Me]);return this}once(Oe,I,ie){if(ie===void 0)return super.once(Oe,I);let Te=typeof I=="string"?[I]:I,Me=this._createDelegatedListener(Oe,Te,ie);for(let ze in Me.delegates){let ht=Me.delegates[ze];Me.delegates[ze]=(...wt)=>{this._removeDelegatedListener(Oe,Te,ie),ht(...wt)}}this._saveDelegatedListener(Oe,Me);for(let ze in Me.delegates)this.once(ze,Me.delegates[ze]);return this}off(Oe,I,ie){return ie===void 0?super.off(Oe,I):(this._removeDelegatedListener(Oe,typeof I=="string"?[I]:I,ie),this)}queryRenderedFeatures(Oe,I){if(!this.style)return[];let ie,Te=Oe instanceof t.P||Array.isArray(Oe),Me=Te?Oe:[[0,0],[this.transform.width,this.transform.height]];if(I=I||(Te?{}:Oe)||{},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(Oe,I){return this.style.querySourceFeatures(Oe,I)}setStyle(Oe,I){return(I=t.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},I)).diff!==!1&&I.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&Oe?(this._diffStyle(Oe,I),this):(this._localIdeographFontFamily=I.localIdeographFontFamily,this._updateStyle(Oe,I))}setTransformRequest(Oe){return this._requestManager.setTransformRequest(Oe),this}_getUIString(Oe){let I=this._locale[Oe];if(I==null)throw new Error(`Missing UI string '${Oe}'`);return I}_updateStyle(Oe,I){if(I.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",()=>this._updateStyle(Oe,I));let ie=this.style&&I.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!Oe)),Oe?(this.style=new Rr(this,I||{}),this.style.setEventedParent(this,{style:this.style}),typeof Oe=="string"?this.style.loadURL(Oe,I,ie):this.style.loadJSON(Oe,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(Oe,I){if(typeof Oe=="string"){let ie=this._requestManager.transformRequest(Oe,"Style");t.h(ie,new AbortController).then(Te=>{this._updateDiff(Te.data,I)}).catch(Te=>{Te&&this.fire(new t.j(Te))})}else typeof Oe=="object"&&this._updateDiff(Oe,I)}_updateDiff(Oe,I){try{this.style.setState(Oe,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(Oe,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(Oe,I){return this._lazyInitEmptyStyle(),this.style.addSource(Oe,I),this._update(!0)}isSourceLoaded(Oe){let I=this.style&&this.style.sourceCaches[Oe];if(I!==void 0)return I.loaded();this.fire(new t.j(new Error(`There is no source with ID '${Oe}'`)))}setTerrain(Oe){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),Oe){let I=this.style.sourceCaches[Oe.source];if(!I)throw new Error(`cannot load terrain, because there exists no source with ID: ${Oe.source}`);this.terrain===null&&I.reload();for(let ie in this.style._layers){let Te=this.style._layers[ie];Te.type==="hillshade"&&Te.source===Oe.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 ks(this.painter,I,Oe),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!==Oe.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:Oe})),this}getTerrain(){var Oe,I;return(I=(Oe=this.terrain)===null||Oe===void 0?void 0:Oe.options)!==null&&I!==void 0?I:null}areTilesLoaded(){let Oe=this.style&&this.style.sourceCaches;for(let I in Oe){let ie=Oe[I]._tiles;for(let Te in ie){let Me=ie[Te];if(Me.state!=="loaded"&&Me.state!=="errored")return!1}}return!0}removeSource(Oe){return this.style.removeSource(Oe),this._update(!0)}getSource(Oe){return this.style.getSource(Oe)}addImage(Oe,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:Sr,data:Kr}=I,na=I;return this.style.addImage(Oe,{data:new t.R({width:Tr,height:Sr},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,Oe),this}}{let{width:Tr,height:Sr,data:Kr}=i.getImageData(I);this.style.addImage(Oe,{data:new t.R({width:Tr,height:Sr},Kr),pixelRatio:Te,stretchX:ze,stretchY:ht,content:wt,textFitWidth:Ot,textFitHeight:$t,sdf:Me,version:0})}}updateImage(Oe,I){let ie=this.style.getImage(Oe);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)?i.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(Oe,ie),this}getImage(Oe){return this.style.getImage(Oe)}hasImage(Oe){return Oe?!!this.style.getImage(Oe):(this.fire(new t.j(new Error("Missing required image id"))),!1)}removeImage(Oe){this.style.removeImage(Oe)}loadImage(Oe){return l.getImage(this._requestManager.transformRequest(Oe,"Image"),new AbortController)}listImages(){return this.style.listImages()}addLayer(Oe,I){return this._lazyInitEmptyStyle(),this.style.addLayer(Oe,I),this._update(!0)}moveLayer(Oe,I){return this.style.moveLayer(Oe,I),this._update(!0)}removeLayer(Oe){return this.style.removeLayer(Oe),this._update(!0)}getLayer(Oe){return this.style.getLayer(Oe)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(Oe,I,ie){return this.style.setLayerZoomRange(Oe,I,ie),this._update(!0)}setFilter(Oe,I,ie={}){return this.style.setFilter(Oe,I,ie),this._update(!0)}getFilter(Oe){return this.style.getFilter(Oe)}setPaintProperty(Oe,I,ie,Te={}){return this.style.setPaintProperty(Oe,I,ie,Te),this._update(!0)}getPaintProperty(Oe,I){return this.style.getPaintProperty(Oe,I)}setLayoutProperty(Oe,I,ie,Te={}){return this.style.setLayoutProperty(Oe,I,ie,Te),this._update(!0)}getLayoutProperty(Oe,I){return this.style.getLayoutProperty(Oe,I)}setGlyphs(Oe,I={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(Oe,I),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(Oe,I,ie={}){return this._lazyInitEmptyStyle(),this.style.addSprite(Oe,I,ie,Te=>{Te||this._update(!0)}),this}removeSprite(Oe){return this._lazyInitEmptyStyle(),this.style.removeSprite(Oe),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(Oe,I={}){return this._lazyInitEmptyStyle(),this.style.setSprite(Oe,I,ie=>{ie||this._update(!0)}),this}setLight(Oe,I={}){return this._lazyInitEmptyStyle(),this.style.setLight(Oe,I),this._update(!0)}getLight(){return this.style.getLight()}setSky(Oe){return this._lazyInitEmptyStyle(),this.style.setSky(Oe),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(Oe,I){return this.style.setFeatureState(Oe,I),this._update()}removeFeatureState(Oe,I){return this.style.removeFeatureState(Oe,I),this._update()}getFeatureState(Oe){return this.style.getFeatureState(Oe)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let Oe=0,I=0;return this._container&&(Oe=this._container.clientWidth||400,I=this._container.clientHeight||300),[Oe,I]}_setupContainer(){let Oe=this._container;Oe.classList.add("maplibregl-map");let I=this._canvasContainer=n.create("div","maplibregl-canvas-container",Oe);this._interactive&&I.classList.add("maplibregl-interactive"),this._canvas=n.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=n.create("div","maplibregl-control-container",Oe),ze=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(ht=>{ze[ht]=n.create("div",`maplibregl-ctrl-${ht} `,Me)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(Oe,I,ie){this._canvas.width=Math.floor(ie*Oe),this._canvas.height=Math.floor(ie*I),this._canvas.style.width=`${Oe}px`,this._canvas.style.height=`${I}px`}_setupPainter(){let Oe={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:Oe},Te&&(I.statusMessage=Te.statusMessage,I.type=Te.type)},{once:!0});let ie=this._canvas.getContext("webgl2",Oe)||this._canvas.getContext("webgl",Oe);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(Oe){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||Oe,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(Oe){return this._update(),this._renderTaskQueue.add(Oe)}_cancelRenderFrame(Oe){this._renderTaskQueue.remove(Oe)}_render(Oe){let I=this._idleTriggered?this._fadeDuration:0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(Oe),this._removed)return;let ie=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;let Me=this.transform.zoom,ze=i.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 Oe;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),(Oe=this._resizeObserver)===null||Oe===void 0||Oe.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),n.remove(this._canvasContainer),n.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,i.frameAsync(this._frameRequest).then(Oe=>{t.bf.frame(Oe),this._frameRequest=null,this._render(Oe)}).catch(()=>{}))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(Oe){this._showTileBoundaries!==Oe&&(this._showTileBoundaries=Oe,this._update())}get showPadding(){return!!this._showPadding}set showPadding(Oe){this._showPadding!==Oe&&(this._showPadding=Oe,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(Oe){this._showCollisionBoxes!==Oe&&(this._showCollisionBoxes=Oe,Oe?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(Oe){this._showOverdrawInspector!==Oe&&(this._showOverdrawInspector=Oe,this._update())}get repaint(){return!!this._repaint}set repaint(Oe){this._repaint!==Oe&&(this._repaint=Oe,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(Oe){this._vertices=Oe,this._update()}get version(){return Fl}getCameraTargetElevation(){return this.transform.elevation}},e.MapMouseEvent=iu,e.MapTouchEvent=Kc,e.MapWheelEvent=hh,e.Marker=Zu,e.NavigationControl=class{constructor(Oe){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({},Un,Oe),this._container=n.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})),n.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})),n.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=n.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(Oe){return this._map=Oe,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 Ro(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){n.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(Oe,I){let ie=n.create("button",Oe,this._container);return ie.type="button",ie.addEventListener("click",I),ie}},e.Popup=class extends t.E{constructor(Oe){super(),this.remove=()=>(this._content&&n.remove(this._content),this._container&&(n.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=n.create("div","maplibregl-popup",this._map.getContainer()),this._tip=n.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?Fs(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()),n.setTransform(this._container,`${cu[Me]} translate(${ht.x}px,${ht.y}px)`),Iu(this._container,Me,"popup")},this._onClose=()=>{this.remove()},this.options=t.e(Object.create(Fo),Oe)}addTo(Oe){return this._map&&this.remove(),this._map=Oe,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(Oe){return this._lngLat=t.N.convert(Oe),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(Oe){return this.setDOMContent(document.createTextNode(Oe))}setHTML(Oe){let I=document.createDocumentFragment(),ie=document.createElement("body"),Te;for(ie.innerHTML=Oe;Te=ie.firstChild,Te;)I.appendChild(Te);return this.setDOMContent(I)}getMaxWidth(){var Oe;return(Oe=this._container)===null||Oe===void 0?void 0:Oe.style.maxWidth}setMaxWidth(Oe){return this.options.maxWidth=Oe,this._update(),this}setDOMContent(Oe){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=n.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(Oe),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(Oe){return this._container&&this._container.classList.add(Oe),this}removeClassName(Oe){return this._container&&this._container.classList.remove(Oe),this}setOffset(Oe){return this.options.offset=Oe,this._update(),this}toggleClassName(Oe){if(this._container)return this._container.classList.toggle(Oe)}setSubpixelPositioning(Oe){this.options.subpixelPositioning=Oe}_createCloseButton(){this.options.closeButton&&(this._closeButton=n.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 Oe=this._container.querySelector(Dc);Oe&&Oe.focus()}},e.RasterDEMTileSource=Re,e.RasterTileSource=Se,e.ScaleControl=class{constructor(Oe){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),Oe)}getDefaultPosition(){return"bottom-left"}onAdd(Oe){return this._map=Oe,this._container=n.create("div","maplibregl-ctrl maplibregl-ctrl-scale",Oe.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){n.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}},e.ScrollZoomHandler=ka,e.Style=Rr,e.TerrainControl=class{constructor(Oe){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=Oe}onAdd(Oe){return this._map=Oe,this._container=n.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=n.create("button","maplibregl-ctrl-terrain",this._container),n.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(){n.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},e.TwoFingersTouchPitchHandler=Pc,e.TwoFingersTouchRotateHandler=$c,e.TwoFingersTouchZoomHandler=xu,e.TwoFingersTouchZoomRotateHandler=Pi,e.VectorTileSource=we,e.VideoSource=nt,e.addSourceType=(Oe,I)=>t._(void 0,void 0,void 0,function*(){if(he(Oe))throw new Error(`A source type called "${Oe}" already exists.`);((ie,Te)=>{Ve[ie]=Te})(Oe,I)}),e.clearPrewarmedResources=function(){let Oe=de;Oe&&(Oe.isPreloaded()&&Oe.numActive()===1?(Oe.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 Ze().getRTLTextPluginStatus()},e.getVersion=function(){return Yu},e.getWorkerCount=function(){return ue.workerCount},e.getWorkerUrl=function(){return t.a.WORKER_URL},e.importScriptInWorkers=function(Oe){return V().broadcast("IS",Oe)},e.prewarm=function(){X().acquire($)},e.setMaxParallelImageRequests=function(Oe){t.a.MAX_PARALLEL_IMAGE_REQUESTS=Oe},e.setRTLTextPlugin=function(Oe,I){return Ze().setRTLTextPlugin(Oe,I)},e.setWorkerCount=function(Oe){ue.workerCount=Oe},e.setWorkerUrl=function(Oe){t.a.WORKER_URL=Oe}});var M=v;return M})}}),GV=He({"src/plots/map/layers.js"(Z,q){"use strict";var v=sa(),_=su().sanitizeHTML,S=D6(),M=b0();function e(i,n){this.subplot=i,this.uid=i.uid+"-"+n,this.index=n,this.idSource="source-"+this.uid,this.idLayer=M.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(n){this.visible?this.needsNewImage(n)?this.updateImage(n):this.needsNewSource(n)?(this.removeLayer(),this.updateSource(n),this.updateLayer(n)):this.needsNewLayer(n)?this.updateLayer(n):this.updateStyle(n):(this.updateSource(n),this.updateLayer(n)),this.visible=r(n)},t.needsNewImage=function(i){var n=this.subplot.map;return n.getSource(this.idSource)&&this.sourceType==="image"&&i.sourcetype==="image"&&(this.source!==i.source||JSON.stringify(this.coordinates)!==JSON.stringify(i.coordinates))},t.needsNewSource=function(i){return this.sourceType!==i.sourcetype||JSON.stringify(this.source)!==JSON.stringify(i.source)||this.layerType!==i.type},t.needsNewLayer=function(i){return this.layerType!==i.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},t.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]},t.updateImage=function(i){var n=this.subplot.map;n.getSource(this.idSource).updateImage({url:i.source,coordinates:i.coordinates});var s=this.findFollowingMapLayerId(this.lookupBelow());s!==null&&this.subplot.map.moveLayer(this.idLayer,s)},t.updateSource=function(i){var n=this.subplot.map;if(n.getSource(this.idSource)&&n.removeSource(this.idSource),this.sourceType=i.sourcetype,this.source=i.source,!!r(i)){var s=a(i);n.addSource(this.idSource,s)}},t.findFollowingMapLayerId=function(i){if(i==="traces")for(var n=this.subplot.getMapLayers(),s=0;s0){for(var s=0;s0}function o(i){var n={},s={};switch(i.type){case"circle":v.extendFlat(s,{"circle-radius":i.circle.radius,"circle-color":i.color,"circle-opacity":i.opacity});break;case"line":v.extendFlat(s,{"line-width":i.line.width,"line-color":i.color,"line-opacity":i.opacity,"line-dasharray":i.line.dash});break;case"fill":v.extendFlat(s,{"fill-color":i.color,"fill-outline-color":i.fill.outlinecolor,"fill-opacity":i.opacity});break;case"symbol":var h=i.symbol,f=S(h.textposition,h.iconsize);v.extendFlat(n,{"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}),v.extendFlat(s,{"icon-color":i.color,"text-color":h.textfont.color,"text-opacity":i.opacity});break;case"raster":v.extendFlat(s,{"raster-fade-duration":0,"raster-opacity":i.opacity});break}return{layout:n,paint:s}}function a(i){var n=i.sourcetype,s=i.source,h={type:n},f;return n==="geojson"?f="data":n==="vector"?f=typeof s=="string"?"url":"tiles":n==="raster"?(f="tiles",h.tileSize=256):n==="image"&&(f="url",h.coordinates=i.coordinates),h[f]=s,i.sourceattribution&&(h.attribution=_(i.sourceattribution)),h}q.exports=function(n,s,h){var f=new e(n,s);return f.update(h),f}}}),HV=He({"src/plots/map/map.js"(Z,q){"use strict";var v=VV(),_=sa(),S=Ev(),M=so(),e=Wo(),t=Ap(),r=Hc(),o=Jd(),a=o.drawMode,i=o.selectMode,n=Af().prepSelect,s=Af().clearOutline,h=Af().clearSelectionsCache,f=Af().selectOnClick,m=b0(),c=GV();function T(p,b){this.id=b,this.gd=p;var d=p._fullLayout,u=p._context;this.container=d._glcontainer.node(),this.isStatic=u.staticPlot,this.uid=d._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(d),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(p,b,d){var u=this,g;u.map?g=new Promise(function(y,D){u.updateMap(p,b,y,D)}):g=new Promise(function(y,D){u.createMap(p,b,y,D)}),d.push(g)},l.createMap=function(p,b,d,u){var g=this,y=b[g.id],D=g.styleObj=w(y.style),P=y.bounds,z=P?[[P.west,P.south],[P.east,P.north]]:null,F=g.map=new v.Map({container:g.div,style:D.style,center:E(y.center),zoom:y.zoom,bearing:y.bearing,pitch:y.pitch,maxBounds:z,interactive:!g.isStatic,preserveDrawingBuffer:g.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1}).addControl(new v.AttributionControl({compact:!0})),N={};F.on("styleimagemissing",function(L){var U=L.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(L){return L=L.replace("https://fonts.openmaptiles.org/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold"),L=L.replace("https://tiles.basemaps.cartocdn.com/fonts/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold"),L=L.replace("https://fonts.openmaptiles.org/Open Sans Regular,Arial Unicode MS Regular","https://fonts.openmaptiles.org/Klokantech Noto Sans Regular"),{url:L}}),F._canvas.style.left="0px",F._canvas.style.top="0px",g.rejectOnError(u),g.isStatic||g.initFx(p,b);var O=[];O.push(new Promise(function(L){F.once("load",L)})),O=O.concat(S.fetchTraceGeoData(p)),Promise.all(O).then(function(){g.fillBelowLookup(p,b),g.updateData(p),g.updateLayout(b),g.resolveOnRender(d)}).catch(u)},l.updateMap=function(p,b,d,u){var g=this,y=g.map,D=b[this.id];g.rejectOnError(u);var P=[],z=w(D.style);JSON.stringify(g.styleObj)!==JSON.stringify(z)&&(g.styleObj=z,y.setStyle(z.style),g.traceHash={},P.push(new Promise(function(F){y.once("styledata",F)}))),P=P.concat(S.fetchTraceGeoData(p)),Promise.all(P).then(function(){g.fillBelowLookup(p,b),g.updateData(p),g.updateLayout(b),g.resolveOnRender(d)}).catch(u)},l.fillBelowLookup=function(p,b){var d=b[this.id],u=d.layers,g,y,D=this.belowLookup={},P=!1;for(g=0;g1)for(g=0;g-1&&f(z.originalEvent,u,[d.xaxis],[d.yaxis],d.id,P),F.indexOf("event")>-1&&r.click(u,z.originalEvent)}}},l.updateFx=function(p){var b=this,d=b.map,u=b.gd;if(b.isStatic)return;function g(z){var F=b.map.unproject(z);return[F.lng,F.lat]}var y=p.dragmode,D;D=function(z,F){if(F.isRect){var N=z.range={};N[b.id]=[g([F.xmin,F.ymin]),g([F.xmax,F.ymax])]}else{var O=z.lassoPoints={};O[b.id]=F.map(g)}};var P=b.dragOptions;b.dragOptions=_.extendDeep(P||{},{dragmode:p.dragmode,element:b.div,gd:u,plotinfo:{id:b.id,domain:p[b.id].domain,xaxis:b.xaxis,yaxis:b.yaxis,fillRangeItems:D},xaxes:[b.xaxis],yaxes:[b.yaxis],subplot:b.id}),d.off("click",b.onClickInPanHandler),i(y)||a(y)?(d.dragPan.disable(),d.on("zoomstart",b.clearOutline),b.dragOptions.prepFn=function(z,F,N){n(z,F,N,b.dragOptions,y)},t.init(b.dragOptions)):(d.dragPan.enable(),d.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),d.on("click",b.onClickInPanHandler))},l.updateFramework=function(p){var b=p[this.id].domain,d=p._size,u=this.div.style;u.width=d.w*(b.x[1]-b.x[0])+"px",u.height=d.h*(b.y[1]-b.y[0])+"px",u.left=d.l+b.x[0]*d.w+"px",u.top=d.t+(1-b.y[1])*d.h+"px",this.xaxis._offset=d.l+b.x[0]*d.w,this.xaxis._length=d.w*(b.x[1]-b.x[0]),this.yaxis._offset=d.t+(1-b.y[1])*d.h,this.yaxis._length=d.h*(b.y[1]-b.y[0])},l.updateLayers=function(p){var b=p[this.id],d=b.layers,u=this.layerList,g;if(d.length!==u.length){for(g=0;gd/2){var u=A.split("|").join("
");p.text(u).attr("data-unformatted",u).call(r.convertToTspans,i),b=t.bBox(p.node())}p.attr("transform",v(-3,-b.height+8)),E.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 g=1;b.width+6>d&&(g=d/(b.width+6));var y=[h.l+h.w*c.x[1],h.t+h.h*(1-c.y[0])];E.attr("transform",v(y[0],y[1])+_(g))}},Z.updateFx=function(i){for(var n=i._fullLayout,s=n._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)},q.exports=function(r,o){var a=o[0].trace,i=new M(r,a.uid),n=i.sourceId,s=v(o),h=i.below=r.belowLookup["trace-"+a.uid];return r.map.addSource(n,{type:"geojson",data:s.geojson}),i._addLayers(s,h),o[0].trace._glTrace=i,i}}}),JV=He({"src/traces/choroplethmap/index.js"(Z,q){"use strict";q.exports={attributes:z6(),supplyDefaults:YV(),colorbar:o0(),calc:lT(),plot:KV(),hoverPoints:cT(),eventData:fT(),selectPoints:hT(),styleOnSelect:function(v,_){if(_){var S=_[0].trace;S._glTrace.updateOnSelect(_)}},getBelow:function(v,_){for(var S=_.getMapLayers(),M=S.length-2;M>=0;M--){var e=S[M].id;if(typeof e=="string"&&e.indexOf("water")===0){for(var t=M+1;t0?+c[f]:0),h.push({type:"Feature",geometry:{type:"Point",coordinates:w},properties:A})}}var p=M.extractOpts(a),b=p.reversescale?M.flipScale(p.colorscale):p.colorscale,d=b[0][1],u=S.opacity(d)<1?d:S.addOpacity(d,0),g=["interpolate",["linear"],["heatmap-density"],0,u];for(f=1;f=0;r--)e.removeLayer(t[r][1])},M.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)},q.exports=function(t,r){var o=r[0].trace,a=new S(t,o.uid),i=a.sourceId,n=v(r),s=a.below=t.belowLookup["trace-"+o.uid];return t.map.addSource(i,{type:"geojson",data:n.geojson}),a._addLayers(n,s),a}}}),aG=He({"src/traces/densitymap/hover.js"(Z,q){"use strict";var v=Wo(),_=kT().hoverPoints,S=kT().getExtraText;q.exports=function(e,t,r){var o=_(e,t,r);if(o){var a=o[0],i=a.cd,n=i[0].trace,s=i[a.index];if(delete a.color,"z"in s){var h=a.subplot.mockAxis;a.z=s.z,a.zLabel=v.tickText(h,h.c2l(s.z),"hover").text}return a.extraText=S(n,s,i[0].t.labels),[a]}}}}),iG=He({"src/traces/densitymap/event_data.js"(Z,q){"use strict";q.exports=function(_,S){return _.lon=S.lon,_.lat=S.lat,_.z=S.z,_}}}),nG=He({"src/traces/densitymap/index.js"(Z,q){"use strict";q.exports={attributes:O6(),supplyDefaults:QV(),colorbar:o0(),formatLabels:R6(),calc:eG(),plot:rG(),hoverPoints:aG(),eventData:iG(),getBelow:function(v,_){for(var S=_.getMapLayers(),M=0;M0;){l=w[w.length-1];var A=_[l];if(r[l]=0&&a[l].push(o[p])}r[l]=E}else{if(e[l]===M[l]){for(var b=[],d=[],u=0,E=x.length-1;E>=0;--E){var g=x[E];if(t[g]=!1,b.push(g),d.push(a[g]),u+=a[g].length,o[g]=s.length,g===l){x.length=E;break}}s.push(b);for(var y=new Array(u),E=0;Ep&&(p=n.source[x]),n.target[x]>p&&(p=n.target[x]);var b=p+1;a.node._count=b;var d,u=a.node.groups,g={};for(x=0;x0&&e(N,b)&&e(O,b)&&!(g.hasOwnProperty(N)&&g.hasOwnProperty(O)&&g[N]===g[O])){g.hasOwnProperty(O)&&(O=g[O]),g.hasOwnProperty(N)&&(N=g[N]),N=+N,O=+O,c[N]=c[O]=!0;var L="";n.label&&n.label[x]&&(L=n.label[x]);var U=null;L&&T.hasOwnProperty(L)&&(U=T[L]),s.push({pointNumber:x,label:L,color:h?n.color[x]:n.color,hovercolor:f?n.hovercolor[x]:n.hovercolor,customdata:m?n.customdata[x]:n.customdata,concentrationscale:U,source:N,target:O,value:+F}),z.source.push(N),z.target.push(O)}}var B=b+u.length,W=M(i.color),$=M(i.customdata),ue=[];for(x=0;xb-1,childrenNodes:[],pointNumber:x,label:ce,color:W?i.color[x]:i.color,customdata:$?i.customdata[x]:i.customdata})}var de=!1;return o(B,z.source,z.target)&&(de=!0),{circular:de,links:s,nodes:ue,groups:u,groupLookup:g}}function o(a,i,n){for(var s=_.init2dArray(a,0),h=0;h1})}q.exports=function(i,n){var s=r(n);return S({circular:s.circular,_nodes:s.nodes,_links:s.links,_groups:s.groups,_groupLookup:s.groupLookup})}}}),uG=He({"node_modules/d3-quadtree/dist/d3-quadtree.js"(Z,q){(function(v,_){typeof Z=="object"&&typeof q<"u"?_(Z):(v=v||self,_(v.d3=v.d3||{}))})(Z,function(v){"use strict";function _(b){var d=+this._x.call(null,b),u=+this._y.call(null,b);return S(this.cover(d,u),d,u,b)}function S(b,d,u,g){if(isNaN(d)||isNaN(u))return b;var y,D=b._root,P={data:g},z=b._x0,F=b._y0,N=b._x1,O=b._y1,L,U,B,W,$,ue,ce,de;if(!D)return b._root=P,b;for(;D.length;)if(($=d>=(L=(z+N)/2))?z=L:N=L,(ue=u>=(U=(F+O)/2))?F=U:O=U,y=D,!(D=D[ce=ue<<1|$]))return y[ce]=P,b;if(B=+b._x.call(null,D.data),W=+b._y.call(null,D.data),d===B&&u===W)return P.next=D,y?y[ce]=P:b._root=P,b;do y=y?y[ce]=new Array(4):b._root=new Array(4),($=d>=(L=(z+N)/2))?z=L:N=L,(ue=u>=(U=(F+O)/2))?F=U:O=U;while((ce=ue<<1|$)===(de=(W>=U)<<1|B>=L));return y[de]=D,y[ce]=P,b}function M(b){var d,u,g=b.length,y,D,P=new Array(g),z=new Array(g),F=1/0,N=1/0,O=-1/0,L=-1/0;for(u=0;uO&&(O=y),DL&&(L=D));if(F>O||N>L)return this;for(this.cover(F,N).cover(O,L),u=0;ub||b>=y||g>d||d>=D;)switch(N=(dO||(z=W.y0)>L||(F=W.x1)=ce)<<1|b>=ue)&&(W=U[U.length-1],U[U.length-1]=U[U.length-1-$],U[U.length-1-$]=W)}else{var de=b-+this._x.call(null,B.data),Y=d-+this._y.call(null,B.data),X=de*de+Y*Y;if(X=(U=(P+F)/2))?P=U:F=U,($=L>=(B=(z+N)/2))?z=B:N=B,d=u,!(u=u[ue=$<<1|W]))return this;if(!u.length)break;(d[ue+1&3]||d[ue+2&3]||d[ue+3&3])&&(g=d,ce=ue)}for(;u.data!==b;)if(y=u,!(u=u.next))return this;return(D=u.next)&&delete u.next,y?(D?y.next=D:delete y.next,this):d?(D?d[ue]=D:delete d[ue],(u=d[0]||d[1]||d[2]||d[3])&&u===(d[3]||d[2]||d[1]||d[0])&&!u.length&&(g?g[ce]=u:this._root=u),this):(this._root=D,this)}function n(b){for(var d=0,u=b.length;d=c.length)return l!=null&&p.sort(l),x!=null?x(p):p;for(var g=-1,y=p.length,D=c[b++],P,z,F=M(),N,O=d();++gc.length)return p;var d,u=T[b-1];return x!=null&&b>=c.length?d=p.entries():(d=[],p.each(function(g,y){d.push({key:y,values:E(g,b)})})),u!=null?d.sort(function(g,y){return u(g.key,y.key)}):d}return w={object:function(p){return A(p,0,t,r)},map:function(p){return A(p,0,o,a)},entries:function(p){return E(A(p,0,o,a),0)},key:function(p){return c.push(p),w},sortKeys:function(p){return T[c.length-1]=p,w},sortValues:function(p){return l=p,w},rollup:function(p){return x=p,w}}}function t(){return{}}function r(c,T,l){c[T]=l}function o(){return M()}function a(c,T,l){c.set(T,l)}function i(){}var n=M.prototype;i.prototype=s.prototype={constructor:i,has:n.has,add:function(c){return c+="",this[_+c]=c,this},remove:n.remove,clear:n.clear,values:n.keys,size:n.size,empty:n.empty,each:n.each};function s(c,T){var l=new i;if(c instanceof i)c.each(function(A){l.add(A)});else if(c){var x=-1,w=c.length;if(T==null)for(;++x=0&&(n=i.slice(s+1),i=i.slice(0,s)),i&&!a.hasOwnProperty(i))throw new Error("unknown type: "+i);return{type:i,name:n}})}M.prototype=S.prototype={constructor:M,on:function(o,a){var i=this._,n=e(o+"",i),s,h=-1,f=n.length;if(arguments.length<2){for(;++h0)for(var i=new Array(s),n=0,s,h;n=0&&b._call.call(null,d),b=b._next;--_}function l(){a=(o=n.now())+i,_=S=0;try{T()}finally{_=0,w(),a=0}}function x(){var b=n.now(),d=b-o;d>e&&(i-=d,o=b)}function w(){for(var b,d=t,u,g=1/0;d;)d._call?(g>d._time&&(g=d._time),b=d,d=d._next):(u=d._next,d._next=null,d=b?b._next=u:t=u);r=b,A(g)}function A(b){if(!_){S&&(S=clearTimeout(S));var d=b-a;d>24?(b<1/0&&(S=setTimeout(l,b-n.now()-i)),M&&(M=clearInterval(M))):(M||(o=n.now(),M=setInterval(x,e)),_=1,s(l))}}function E(b,d,u){var g=new m;return d=d==null?0:+d,g.restart(function(y){g.stop(),b(y+d)},d,u),g}function p(b,d,u){var g=new m,y=d;return d==null?(g.restart(b,d,u),g):(d=+d,u=u==null?h():+u,g.restart(function D(P){P+=y,g.restart(D,y+=d,u),b(P)},d,u),g)}v.interval=p,v.now=h,v.timeout=E,v.timer=c,v.timerFlush=T,Object.defineProperty(v,"__esModule",{value:!0})})}}),hG=He({"node_modules/d3-force/dist/d3-force.js"(Z,q){(function(v,_){typeof Z=="object"&&typeof q<"u"?_(Z,uG(),LT(),cG(),fG()):_(v.d3=v.d3||{},v.d3,v.d3,v.d3,v.d3)})(Z,function(v,_,S,M,e){"use strict";function t(b,d){var u;b==null&&(b=0),d==null&&(d=0);function g(){var y,D=u.length,P,z=0,F=0;for(y=0;yL.index){var ee=U-le.x-le.vx,te=B-le.y-le.vy,pe=ee*ee+te*te;peU+j||QB+j||VF.r&&(F.r=F[N].r)}function z(){if(d){var F,N=d.length,O;for(u=new Array(N),F=0;F1?($==null?z.remove(W):z.set(W,B($)),d):z.get(W)},find:function(W,$,ue){var ce=0,de=b.length,Y,X,Q,V,le;for(ue==null?ue=1/0:ue*=ue,ce=0;ce1?(N.on(W,$),d):N.on(W)}}}function w(){var b,d,u,g=r(-30),y,D=1,P=1/0,z=.81;function F(U){var B,W=b.length,$=_.quadtree(b,m,c).visitAfter(O);for(u=U,B=0;B=P)return;(U.data!==d||U.next)&&(ue===0&&(ue=o(),Y+=ue*ue),ce===0&&(ce=o(),Y+=ce*ce),YM)if(!(Math.abs(l*m-c*T)>M)||!s)this._+="L"+(this._x1=o)+","+(this._y1=a);else{var w=i-h,A=n-f,E=m*m+c*c,p=w*w+A*A,b=Math.sqrt(E),d=Math.sqrt(x),u=s*Math.tan((_-Math.acos((E+x-p)/(2*b*d)))/2),g=u/d,y=u/b;Math.abs(g-1)>M&&(this._+="L"+(o+g*T)+","+(a+g*l)),this._+="A"+s+","+s+",0,0,"+ +(l*w>T*A)+","+(this._x1=o+y*m)+","+(this._y1=a+y*c)}},arc:function(o,a,i,n,s,h){o=+o,a=+a,i=+i,h=!!h;var f=i*Math.cos(n),m=i*Math.sin(n),c=o+f,T=a+m,l=1^h,x=h?n-s:s-n;if(i<0)throw new Error("negative radius: "+i);this._x1===null?this._+="M"+c+","+T:(Math.abs(this._x1-c)>M||Math.abs(this._y1-T)>M)&&(this._+="L"+c+","+T),i&&(x<0&&(x=x%S+S),x>e?this._+="A"+i+","+i+",0,1,"+l+","+(o-f)+","+(a-m)+"A"+i+","+i+",0,1,"+l+","+(this._x1=c)+","+(this._y1=T):x>M&&(this._+="A"+i+","+i+",0,"+ +(x>=_)+","+l+","+(this._x1=o+i*Math.cos(s))+","+(this._y1=a+i*Math.sin(s))))},rect:function(o,a,i,n){this._+="M"+(this._x0=this._x1=+o)+","+(this._y0=this._y1=+a)+"h"+ +i+"v"+ +n+"h"+-i+"Z"},toString:function(){return this._}},v.path=r,Object.defineProperty(v,"__esModule",{value:!0})})}}),U6=He({"node_modules/d3-shape/dist/d3-shape.js"(Z,q){(function(v,_){typeof Z=="object"&&typeof q<"u"?_(Z,pG()):(v=v||self,_(v.d3=v.d3||{},v.d3))})(Z,function(v,_){"use strict";function S(gt){return function(){return gt}}var M=Math.abs,e=Math.atan2,t=Math.cos,r=Math.max,o=Math.min,a=Math.sin,i=Math.sqrt,n=1e-12,s=Math.PI,h=s/2,f=2*s;function m(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 x(gt){return gt.startAngle}function w(gt){return gt.endAngle}function A(gt){return gt&>.padAngle}function E(gt,Kt,mr,Ir,va,Pa,ga,la){var ba=mr-gt,Ai=Ir-Kt,ki=ga-va,Ki=la-Pa,En=Ki*ba-ki*Ai;if(!(En*Enss*ss+_s*_s&&(os=jo,ys=Yn),{cx:os,cy:ys,x01:-ki,y01:-Ki,x11:os*(va/wo-1),y11:ys*(va/wo-1)}}function b(){var gt=T,Kt=l,mr=S(0),Ir=null,va=x,Pa=w,ga=A,la=null;function ba(){var Ai,ki,Ki=+gt.apply(this,arguments),En=+Kt.apply(this,arguments),Tn=va.apply(this,arguments)-h,On=Pa.apply(this,arguments)-h,kn=M(On-Tn),ao=On>Tn;if(la||(la=Ai=_.path()),Enn))la.moveTo(0,0);else if(kn>f-n)la.moveTo(En*t(Tn),En*a(Tn)),la.arc(0,0,En,Tn,On,!ao),Ki>n&&(la.moveTo(Ki*t(On),Ki*a(On)),la.arc(0,0,Ki,On,Tn,ao));else{var Co=Tn,bo=On,zs=Tn,Cn=On,wo=kn,Zn=kn,go=ga.apply(this,arguments)/2,os=go>n&&(Ir?+Ir.apply(this,arguments):i(Ki*Ki+En*En)),ys=o(M(En-Ki)/2,+mr.apply(this,arguments)),jo=ys,Yn=ys,Gn,Hn;if(os>n){var ss=c(os/Ki*a(go)),_s=c(os/En*a(go));(wo-=ss*2)>n?(ss*=ao?1:-1,zs+=ss,Cn-=ss):(wo=0,zs=Cn=(Tn+On)/2),(Zn-=_s*2)>n?(_s*=ao?1:-1,Co+=_s,bo-=_s):(Zn=0,Co=bo=(Tn+On)/2)}var ps=En*t(Co),Ko=En*a(Co),Gi=Ki*t(Cn),Pn=Ki*a(Cn);if(ys>n){var qs=En*t(bo),bs=En*a(bo),lo=Ki*t(zs),Zo=Ki*a(zs),ws;if(knn?Yn>n?(Gn=p(lo,Zo,ps,Ko,En,Yn,ao),Hn=p(qs,bs,Gi,Pn,En,Yn,ao),la.moveTo(Gn.cx+Gn.x01,Gn.cy+Gn.y01),Ynn)||!(wo>n)?la.lineTo(Gi,Pn):jo>n?(Gn=p(Gi,Pn,qs,bs,Ki,-jo,ao),Hn=p(ps,Ko,lo,Zo,Ki,-jo,ao),la.lineTo(Gn.cx+Gn.x01,Gn.cy+Gn.y01),jo=En;--Tn)la.point(bo[Tn],zs[Tn]);la.lineEnd(),la.areaEnd()}ao&&(bo[Ki]=+gt(kn,Ki,ki),zs[Ki]=+mr(kn,Ki,ki),la.point(Kt?+Kt(kn,Ki,ki):bo[Ki],Ir?+Ir(kn,Ki,ki):zs[Ki]))}if(Co)return la=null,Co+""||null}function Ai(){return D().defined(va).curve(ga).context(Pa)}return ba.x=function(ki){return arguments.length?(gt=typeof ki=="function"?ki:S(+ki),Kt=null,ba):gt},ba.x0=function(ki){return arguments.length?(gt=typeof ki=="function"?ki:S(+ki),ba):gt},ba.x1=function(ki){return arguments.length?(Kt=ki==null?null:typeof ki=="function"?ki:S(+ki),ba):Kt},ba.y=function(ki){return arguments.length?(mr=typeof ki=="function"?ki:S(+ki),Ir=null,ba):mr},ba.y0=function(ki){return arguments.length?(mr=typeof ki=="function"?ki:S(+ki),ba):mr},ba.y1=function(ki){return arguments.length?(Ir=ki==null?null:typeof ki=="function"?ki:S(+ki),ba):Ir},ba.lineX0=ba.lineY0=function(){return Ai().x(gt).y(mr)},ba.lineY1=function(){return Ai().x(gt).y(Ir)},ba.lineX1=function(){return Ai().x(Kt).y(mr)},ba.defined=function(ki){return arguments.length?(va=typeof ki=="function"?ki:S(!!ki),ba):va},ba.curve=function(ki){return arguments.length?(ga=ki,Pa!=null&&(la=ga(Pa)),ba):ga},ba.context=function(ki){return arguments.length?(ki==null?Pa=la=null:la=ga(Pa=ki),ba):Pa},ba}function z(gt,Kt){return Ktgt?1:Kt>=gt?0:NaN}function F(gt){return gt}function N(){var gt=F,Kt=z,mr=null,Ir=S(0),va=S(f),Pa=S(0);function ga(la){var ba,Ai=la.length,ki,Ki,En=0,Tn=new Array(Ai),On=new Array(Ai),kn=+Ir.apply(this,arguments),ao=Math.min(f,Math.max(-f,va.apply(this,arguments)-kn)),Co,bo=Math.min(Math.abs(ao)/Ai,Pa.apply(this,arguments)),zs=bo*(ao<0?-1:1),Cn;for(ba=0;ba0&&(En+=Cn);for(Kt!=null?Tn.sort(function(wo,Zn){return Kt(On[wo],On[Zn])}):mr!=null&&Tn.sort(function(wo,Zn){return mr(la[wo],la[Zn])}),ba=0,Ki=En?(ao-Ai*zs)/En:0;ba0?Cn*Ki:0)+zs,On[ki]={data:la[ki],index:ba,value:Cn,startAngle:kn,endAngle:Co,padAngle:bo};return On}return ga.value=function(la){return arguments.length?(gt=typeof la=="function"?la:S(+la),ga):gt},ga.sortValues=function(la){return arguments.length?(Kt=la,mr=null,ga):Kt},ga.sort=function(la){return arguments.length?(mr=la,Kt=null,ga):mr},ga.startAngle=function(la){return arguments.length?(Ir=typeof la=="function"?la:S(+la),ga):Ir},ga.endAngle=function(la){return arguments.length?(va=typeof la=="function"?la:S(+la),ga):va},ga.padAngle=function(la){return arguments.length?(Pa=typeof la=="function"?la:S(+la),ga):Pa},ga}var O=U(u);function L(gt){this._curve=gt}L.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(gt,Kt){this._curve.point(Kt*Math.sin(gt),Kt*-Math.cos(gt))}};function U(gt){function Kt(mr){return new L(gt(mr))}return Kt._curve=gt,Kt}function B(gt){var Kt=gt.curve;return gt.angle=gt.x,delete gt.x,gt.radius=gt.y,delete gt.y,gt.curve=function(mr){return arguments.length?Kt(U(mr)):Kt()._curve},gt}function W(){return B(D().curve(O))}function $(){var gt=P().curve(O),Kt=gt.curve,mr=gt.lineX0,Ir=gt.lineX1,va=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(mr())},delete gt.lineX0,gt.lineEndAngle=function(){return B(Ir())},delete gt.lineX1,gt.lineInnerRadius=function(){return B(va())},delete gt.lineY0,gt.lineOuterRadius=function(){return B(Pa())},delete gt.lineY1,gt.curve=function(ga){return arguments.length?Kt(U(ga)):Kt()._curve},gt}function ue(gt,Kt){return[(Kt=+Kt)*Math.cos(gt-=Math.PI/2),Kt*Math.sin(gt)]}var ce=Array.prototype.slice;function de(gt){return gt.source}function Y(gt){return gt.target}function X(gt){var Kt=de,mr=Y,Ir=g,va=y,Pa=null;function ga(){var la,ba=ce.call(arguments),Ai=Kt.apply(this,ba),ki=mr.apply(this,ba);if(Pa||(Pa=la=_.path()),gt(Pa,+Ir.apply(this,(ba[0]=Ai,ba)),+va.apply(this,ba),+Ir.apply(this,(ba[0]=ki,ba)),+va.apply(this,ba)),la)return Pa=null,la+""||null}return ga.source=function(la){return arguments.length?(Kt=la,ga):Kt},ga.target=function(la){return arguments.length?(mr=la,ga):mr},ga.x=function(la){return arguments.length?(Ir=typeof la=="function"?la:S(+la),ga):Ir},ga.y=function(la){return arguments.length?(va=typeof la=="function"?la:S(+la),ga):va},ga.context=function(la){return arguments.length?(Pa=la??null,ga):Pa},ga}function Q(gt,Kt,mr,Ir,va){gt.moveTo(Kt,mr),gt.bezierCurveTo(Kt=(Kt+Ir)/2,mr,Kt,va,Ir,va)}function V(gt,Kt,mr,Ir,va){gt.moveTo(Kt,mr),gt.bezierCurveTo(Kt,mr=(mr+va)/2,Ir,mr,Ir,va)}function le(gt,Kt,mr,Ir,va){var Pa=ue(Kt,mr),ga=ue(Kt,mr=(mr+va)/2),la=ue(Ir,mr),ba=ue(Ir,va);gt.moveTo(Pa[0],Pa[1]),gt.bezierCurveTo(ga[0],ga[1],la[0],la[1],ba[0],ba[1])}function ae(){return X(Q)}function j(){return X(V)}function ee(){var gt=X(le);return gt.angle=gt.x,delete gt.x,gt.radius=gt.y,delete gt.y,gt}var te={draw:function(gt,Kt){var mr=Math.sqrt(Kt/s);gt.moveTo(mr,0),gt.arc(0,0,mr,0,f)}},pe={draw:function(gt,Kt){var mr=Math.sqrt(Kt/5)/2;gt.moveTo(-3*mr,-mr),gt.lineTo(-mr,-mr),gt.lineTo(-mr,-3*mr),gt.lineTo(mr,-3*mr),gt.lineTo(mr,-mr),gt.lineTo(3*mr,-mr),gt.lineTo(3*mr,mr),gt.lineTo(mr,mr),gt.lineTo(mr,3*mr),gt.lineTo(-mr,3*mr),gt.lineTo(-mr,mr),gt.lineTo(-3*mr,mr),gt.closePath()}},we=Math.sqrt(1/3),Se=we*2,Re={draw:function(gt,Kt){var mr=Math.sqrt(Kt/Se),Ir=mr*we;gt.moveTo(0,-mr),gt.lineTo(Ir,0),gt.lineTo(0,mr),gt.lineTo(-Ir,0),gt.closePath()}},Pe=.8908130915292852,je=Math.sin(s/10)/Math.sin(7*s/10),at=Math.sin(f/10)*je,nt=-Math.cos(f/10)*je,tt={draw:function(gt,Kt){var mr=Math.sqrt(Kt*Pe),Ir=at*mr,va=nt*mr;gt.moveTo(0,-mr),gt.lineTo(Ir,va);for(var Pa=1;Pa<5;++Pa){var ga=f*Pa/5,la=Math.cos(ga),ba=Math.sin(ga);gt.lineTo(ba*mr,-la*mr),gt.lineTo(la*Ir-ba*va,ba*Ir+la*va)}gt.closePath()}},Ve={draw:function(gt,Kt){var mr=Math.sqrt(Kt),Ir=-mr/2;gt.rect(Ir,Ir,mr,mr)}},he=Math.sqrt(3),se={draw:function(gt,Kt){var mr=-Math.sqrt(Kt/(he*3));gt.moveTo(0,mr*2),gt.lineTo(-he*mr,-mr),gt.lineTo(he*mr,-mr),gt.closePath()}},ne=-.5,Ce=Math.sqrt(3)/2,Ze=1/Math.sqrt(12),rt=(Ze/2+1)*3,Je={draw:function(gt,Kt){var mr=Math.sqrt(Kt/rt),Ir=mr/2,va=mr*Ze,Pa=Ir,ga=mr*Ze+mr,la=-Pa,ba=ga;gt.moveTo(Ir,va),gt.lineTo(Pa,ga),gt.lineTo(la,ba),gt.lineTo(ne*Ir-Ce*va,Ce*Ir+ne*va),gt.lineTo(ne*Pa-Ce*ga,Ce*Pa+ne*ga),gt.lineTo(ne*la-Ce*ba,Ce*la+ne*ba),gt.lineTo(ne*Ir+Ce*va,ne*va-Ce*Ir),gt.lineTo(ne*Pa+Ce*ga,ne*ga-Ce*Pa),gt.lineTo(ne*la+Ce*ba,ne*ba-Ce*la),gt.closePath()}},St=[te,pe,Re,Ve,tt,se,Je];function kt(){var gt=S(te),Kt=S(64),mr=null;function Ir(){var va;if(mr||(mr=va=_.path()),gt.apply(this,arguments).draw(mr,+Kt.apply(this,arguments)),va)return mr=null,va+""||null}return Ir.type=function(va){return arguments.length?(gt=typeof va=="function"?va:S(va),Ir):gt},Ir.size=function(va){return arguments.length?(Kt=typeof va=="function"?va:S(+va),Ir):Kt},Ir.context=function(va){return arguments.length?(mr=va??null,Ir):mr},Ir}function Bt(){}function Vt(gt,Kt,mr){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+Kt)/6,(gt._y0+4*gt._y1+mr)/6)}function Ar(gt){this._context=gt}Ar.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:Vt(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,Kt){switch(gt=+gt,Kt=+Kt,this._point){case 0:this._point=1,this._line?this._context.lineTo(gt,Kt):this._context.moveTo(gt,Kt);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:Vt(this,gt,Kt);break}this._x0=this._x1,this._x1=gt,this._y0=this._y1,this._y1=Kt}};function vr(gt){return new Ar(gt)}function qr(gt){this._context=gt}qr.prototype={areaStart:Bt,areaEnd:Bt,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,Kt){switch(gt=+gt,Kt=+Kt,this._point){case 0:this._point=1,this._x2=gt,this._y2=Kt;break;case 1:this._point=2,this._x3=gt,this._y3=Kt;break;case 2:this._point=3,this._x4=gt,this._y4=Kt,this._context.moveTo((this._x0+4*this._x1+gt)/6,(this._y0+4*this._y1+Kt)/6);break;default:Vt(this,gt,Kt);break}this._x0=this._x1,this._x1=gt,this._y0=this._y1,this._y1=Kt}};function kr(gt){return new qr(gt)}function Ur(gt){this._context=gt}Ur.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,Kt){switch(gt=+gt,Kt=+Kt,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var mr=(this._x0+4*this._x1+gt)/6,Ir=(this._y0+4*this._y1+Kt)/6;this._line?this._context.lineTo(mr,Ir):this._context.moveTo(mr,Ir);break;case 3:this._point=4;default:Vt(this,gt,Kt);break}this._x0=this._x1,this._x1=gt,this._y0=this._y1,this._y1=Kt}};function _t(gt){return new Ur(gt)}function Fe(gt,Kt){this._basis=new Ar(gt),this._beta=Kt}Fe.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var gt=this._x,Kt=this._y,mr=gt.length-1;if(mr>0)for(var Ir=gt[0],va=Kt[0],Pa=gt[mr]-Ir,ga=Kt[mr]-va,la=-1,ba;++la<=mr;)ba=la/mr,this._basis.point(this._beta*gt[la]+(1-this._beta)*(Ir+ba*Pa),this._beta*Kt[la]+(1-this._beta)*(va+ba*ga));this._x=this._y=null,this._basis.lineEnd()},point:function(gt,Kt){this._x.push(+gt),this._y.push(+Kt)}};var Ye=function gt(Kt){function mr(Ir){return Kt===1?new Ar(Ir):new Fe(Ir,Kt)}return mr.beta=function(Ir){return gt(+Ir)},mr}(.85);function Ae(gt,Kt,mr){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-Kt),gt._y2+gt._k*(gt._y1-mr),gt._x2,gt._y2)}function Le(gt,Kt){this._context=gt,this._k=(1-Kt)/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,Kt){switch(gt=+gt,Kt=+Kt,this._point){case 0:this._point=1,this._line?this._context.lineTo(gt,Kt):this._context.moveTo(gt,Kt);break;case 1:this._point=2,this._x1=gt,this._y1=Kt;break;case 2:this._point=3;default:Ae(this,gt,Kt);break}this._x0=this._x1,this._x1=this._x2,this._x2=gt,this._y0=this._y1,this._y1=this._y2,this._y2=Kt}};var We=function gt(Kt){function mr(Ir){return new Le(Ir,Kt)}return mr.tension=function(Ir){return gt(+Ir)},mr}(0);function Ke(gt,Kt){this._context=gt,this._k=(1-Kt)/6}Ke.prototype={areaStart:Bt,areaEnd:Bt,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,Kt){switch(gt=+gt,Kt=+Kt,this._point){case 0:this._point=1,this._x3=gt,this._y3=Kt;break;case 1:this._point=2,this._context.moveTo(this._x4=gt,this._y4=Kt);break;case 2:this._point=3,this._x5=gt,this._y5=Kt;break;default:Ae(this,gt,Kt);break}this._x0=this._x1,this._x1=this._x2,this._x2=gt,this._y0=this._y1,this._y1=this._y2,this._y2=Kt}};var st=function gt(Kt){function mr(Ir){return new Ke(Ir,Kt)}return mr.tension=function(Ir){return gt(+Ir)},mr}(0);function ot(gt,Kt){this._context=gt,this._k=(1-Kt)/6}ot.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,Kt){switch(gt=+gt,Kt=+Kt,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,Kt);break}this._x0=this._x1,this._x1=this._x2,this._x2=gt,this._y0=this._y1,this._y1=this._y2,this._y2=Kt}};var Ut=function gt(Kt){function mr(Ir){return new ot(Ir,Kt)}return mr.tension=function(Ir){return gt(+Ir)},mr}(0);function Ct(gt,Kt,mr){var Ir=gt._x1,va=gt._y1,Pa=gt._x2,ga=gt._y2;if(gt._l01_a>n){var la=2*gt._l01_2a+3*gt._l01_a*gt._l12_a+gt._l12_2a,ba=3*gt._l01_a*(gt._l01_a+gt._l12_a);Ir=(Ir*la-gt._x0*gt._l12_2a+gt._x2*gt._l01_2a)/ba,va=(va*la-gt._y0*gt._l12_2a+gt._y2*gt._l01_2a)/ba}if(gt._l23_a>n){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-Kt*gt._l12_2a)/ki,ga=(ga*Ai+gt._y1*gt._l23_2a-mr*gt._l12_2a)/ki}gt._context.bezierCurveTo(Ir,va,Pa,ga,gt._x2,gt._y2)}function Pt(gt,Kt){this._context=gt,this._alpha=Kt}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,Kt){if(gt=+gt,Kt=+Kt,this._point){var mr=this._x2-gt,Ir=this._y2-Kt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(mr*mr+Ir*Ir,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(gt,Kt):this._context.moveTo(gt,Kt);break;case 1:this._point=2;break;case 2:this._point=3;default:Ct(this,gt,Kt);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=Kt}};var jt=function gt(Kt){function mr(Ir){return Kt?new Pt(Ir,Kt):new Le(Ir,0)}return mr.alpha=function(Ir){return gt(+Ir)},mr}(.5);function cr(gt,Kt){this._context=gt,this._alpha=Kt}cr.prototype={areaStart:Bt,areaEnd:Bt,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,Kt){if(gt=+gt,Kt=+Kt,this._point){var mr=this._x2-gt,Ir=this._y2-Kt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(mr*mr+Ir*Ir,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=gt,this._y3=Kt;break;case 1:this._point=2,this._context.moveTo(this._x4=gt,this._y4=Kt);break;case 2:this._point=3,this._x5=gt,this._y5=Kt;break;default:Ct(this,gt,Kt);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=Kt}};var or=function gt(Kt){function mr(Ir){return Kt?new cr(Ir,Kt):new Ke(Ir,0)}return mr.alpha=function(Ir){return gt(+Ir)},mr}(.5);function nr(gt,Kt){this._context=gt,this._alpha=Kt}nr.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,Kt){if(gt=+gt,Kt=+Kt,this._point){var mr=this._x2-gt,Ir=this._y2-Kt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(mr*mr+Ir*Ir,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,Kt);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=Kt}};var Pr=function gt(Kt){function mr(Ir){return Kt?new nr(Ir,Kt):new ot(Ir,0)}return mr.alpha=function(Ir){return gt(+Ir)},mr}(.5);function _a(gt){this._context=gt}_a.prototype={areaStart:Bt,areaEnd:Bt,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(gt,Kt){gt=+gt,Kt=+Kt,this._point?this._context.lineTo(gt,Kt):(this._point=1,this._context.moveTo(gt,Kt))}};function Fa(gt){return new _a(gt)}function Ra(gt){return gt<0?-1:1}function qa(gt,Kt,mr){var Ir=gt._x1-gt._x0,va=Kt-gt._x1,Pa=(gt._y1-gt._y0)/(Ir||va<0&&-0),ga=(mr-gt._y1)/(va||Ir<0&&-0),la=(Pa*va+ga*Ir)/(Ir+va);return(Ra(Pa)+Ra(ga))*Math.min(Math.abs(Pa),Math.abs(ga),.5*Math.abs(la))||0}function Wa(gt,Kt){var mr=gt._x1-gt._x0;return mr?(3*(gt._y1-gt._y0)/mr-Kt)/2:Kt}function Ca(gt,Kt,mr){var Ir=gt._x0,va=gt._y0,Pa=gt._x1,ga=gt._y1,la=(Pa-Ir)/3;gt._context.bezierCurveTo(Ir+la,va+la*Kt,Pa-la,ga-la*mr,Pa,ga)}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,Kt){var mr=NaN;if(gt=+gt,Kt=+Kt,!(gt===this._x1&&Kt===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(gt,Kt):this._context.moveTo(gt,Kt);break;case 1:this._point=2;break;case 2:this._point=3,Ca(this,Wa(this,mr=qa(this,gt,Kt)),mr);break;default:Ca(this,this._t0,mr=qa(this,gt,Kt));break}this._x0=this._x1,this._x1=gt,this._y0=this._y1,this._y1=Kt,this._t0=mr}}};function wi(gt){this._context=new Yt(gt)}(wi.prototype=Object.create(hi.prototype)).point=function(gt,Kt){hi.prototype.point.call(this,Kt,gt)};function Yt(gt){this._context=gt}Yt.prototype={moveTo:function(gt,Kt){this._context.moveTo(Kt,gt)},closePath:function(){this._context.closePath()},lineTo:function(gt,Kt){this._context.lineTo(Kt,gt)},bezierCurveTo:function(gt,Kt,mr,Ir,va,Pa){this._context.bezierCurveTo(Kt,gt,Ir,mr,Pa,va)}};function Rt(gt){return new hi(gt)}function Zt(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,Kt=this._y,mr=gt.length;if(mr)if(this._line?this._context.lineTo(gt[0],Kt[0]):this._context.moveTo(gt[0],Kt[0]),mr===2)this._context.lineTo(gt[1],Kt[1]);else for(var Ir=Fr(gt),va=Fr(Kt),Pa=0,ga=1;ga=0;--Kt)va[Kt]=(ga[Kt]-va[Kt+1])/Pa[Kt];for(Pa[mr-1]=(gt[mr]+va[mr-1])/2,Kt=0;Kt=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(gt,Kt){switch(gt=+gt,Kt=+Kt,this._point){case 0:this._point=1,this._line?this._context.lineTo(gt,Kt):this._context.moveTo(gt,Kt);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,Kt),this._context.lineTo(gt,Kt);else{var mr=this._x*(1-this._t)+gt*this._t;this._context.lineTo(mr,this._y),this._context.lineTo(mr,Kt)}break}}this._x=gt,this._y=Kt}};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,Kt){if((ga=gt.length)>1)for(var mr=1,Ir,va,Pa=gt[Kt[0]],ga,la=Pa.length;mr=0;)mr[Kt]=Kt;return mr}function pi(gt,Kt){return gt[Kt]}function Ia(){var gt=S([]),Kt=ri,mr=Za,Ir=pi;function va(Pa){var ga=gt.apply(this,arguments),la,ba=Pa.length,Ai=ga.length,ki=new Array(Ai),Ki;for(la=0;la0){for(var mr,Ir,va=0,Pa=gt[0].length,ga;va0)for(var mr,Ir=0,va,Pa,ga,la,ba,Ai=gt[Kt[0]].length;Ir0?(va[0]=ga,va[1]=ga+=Pa):Pa<0?(va[1]=la,va[0]=la+=Pa):(va[0]=0,va[1]=Pa)}function cn(gt,Kt){if((va=gt.length)>0){for(var mr=0,Ir=gt[Kt[0]],va,Pa=Ir.length;mr0)||!((Pa=(va=gt[Kt[0]]).length)>0))){for(var mr=0,Ir=1,va,Pa,ga;IrPa&&(Pa=va,mr=Kt);return mr}function Cr(gt){var Kt=gt.map(wr);return ri(gt).sort(function(mr,Ir){return Kt[mr]-Kt[Ir]})}function wr(gt){for(var Kt=0,mr=-1,Ir=gt.length,va;++mr0;--le)ee(V*=.99),te(),j(V),te();function ae(){var pe=_.max(Q,function(Re){return Re.length}),we=B*(D-g)/(pe-1);z>we&&(z=we);var Se=_.min(Q,function(Re){return(D-g-(Re.length-1)*z)/_.sum(Re,f)});Q.forEach(function(Re){Re.forEach(function(Pe,je){Pe.y1=(Pe.y0=je)+Pe.value*Se})}),X.links.forEach(function(Re){Re.width=Re.value*Se})}function j(pe){Q.forEach(function(we){we.forEach(function(Se){if(Se.targetLinks.length){var Re=(_.sum(Se.targetLinks,c)/_.sum(Se.targetLinks,f)-m(Se))*pe;Se.y0+=Re,Se.y1+=Re}})})}function ee(pe){Q.slice().reverse().forEach(function(we){we.forEach(function(Se){if(Se.sourceLinks.length){var Re=(_.sum(Se.sourceLinks,T)/_.sum(Se.sourceLinks,f)-m(Se))*pe;Se.y0+=Re,Se.y1+=Re}})})}function te(){Q.forEach(function(pe){var we,Se,Re=g,Pe=pe.length,je;for(pe.sort(h),je=0;je0&&(we.y0+=Se,we.y1+=Se),Re=we.y1+z;if(Se=Re-z-D,Se>0)for(Re=we.y0-=Se,we.y1-=Se,je=Pe-2;je>=0;--je)we=pe[je],Se=we.y1+z-Re,Se>0&&(we.y0-=Se,we.y1-=Se),Re=we.y0})}}function Y(X){X.nodes.forEach(function(Q){Q.sourceLinks.sort(s),Q.targetLinks.sort(n)}),X.nodes.forEach(function(Q){var V=Q.y0,le=V;Q.sourceLinks.forEach(function(ae){ae.y0=V+ae.width/2,V+=ae.width}),Q.targetLinks.forEach(function(ae){ae.y1=le+ae.width/2,le+=ae.width})})}return W};function p(u){return[u.source.x1,u.y0]}function b(u){return[u.target.x0,u.y1]}var d=function(){return M.linkHorizontal().source(p).target(b)};v.sankey=E,v.sankeyCenter=a,v.sankeyLeft=t,v.sankeyRight=r,v.sankeyJustify=o,v.sankeyLinkHorizontal=d,Object.defineProperty(v,"__esModule",{value:!0})})}}),vG=He({"node_modules/elementary-circuits-directed-graph/johnson.js"(Z,q){var v=N6();q.exports=function(S,M){var e=[],t=[],r=[],o={},a=[],i;function n(A){r[A]=!1,o.hasOwnProperty(A)&&Object.keys(o[A]).forEach(function(E){delete o[A][E],r[E]&&n(E)})}function s(A){var E=!1;t.push(A),r[A]=!0;var p,b;for(p=0;p=A})}function m(A){f(A);for(var E=S,p=v(E),b=p.components.filter(function(z){return z.length>1}),d=1/0,u,g=0;g"u"?"undefined":s(Le))!=="object"&&(Le=Ye.source=p(Fe,Le)),(typeof We>"u"?"undefined":s(We))!=="object"&&(We=Ye.target=p(Fe,We)),Le.sourceLinks.push(Ye),We.targetLinks.push(Ye)}),_t}function Vt(_t){_t.nodes.forEach(function(Fe){Fe.partOfCycle=!1,Fe.value=Math.max(_.sum(Fe.sourceLinks,c),_.sum(Fe.targetLinks,c)),Fe.sourceLinks.forEach(function(Ye){Ye.circular&&(Fe.partOfCycle=!0,Fe.circularLinkType=Ye.circularLinkType)}),Fe.targetLinks.forEach(function(Ye){Ye.circular&&(Fe.partOfCycle=!0,Fe.circularLinkType=Ye.circularLinkType)})})}function Ar(_t){var Fe=0,Ye=0,Ae=0,Le=0,We=_.max(_t.nodes,function(Ke){return Ke.column});return _t.links.forEach(function(Ke){Ke.circular&&(Ke.circularLinkType=="top"?Fe=Fe+Ke.width:Ye=Ye+Ke.width,Ke.target.column==0&&(Le=Le+Ke.width),Ke.source.column==We&&(Ae=Ae+Ke.width))}),Fe=Fe>0?Fe+d+u:Fe,Ye=Ye>0?Ye+d+u:Ye,Ae=Ae>0?Ae+d+u:Ae,Le=Le>0?Le+d+u:Le,{top:Fe,bottom:Ye,left:Le,right:Ae}}function vr(_t,Fe){var Ye=_.max(_t.nodes,function(Ut){return Ut.column}),Ae=at-Pe,Le=nt-je,We=Ae+Fe.right+Fe.left,Ke=Le+Fe.top+Fe.bottom,st=Ae/We,ot=Le/Ke;return Pe=Pe*st+Fe.left,at=Fe.right==0?at:at*st,je=je*ot+Fe.top,nt=nt*ot,_t.nodes.forEach(function(Ut){Ut.x0=Pe+Ut.column*((at-Pe-tt)/Ye),Ut.x1=Ut.x0+tt}),ot}function qr(_t){var Fe,Ye,Ae;for(Fe=_t.nodes,Ye=[],Ae=0;Fe.length;++Ae,Fe=Ye,Ye=[])Fe.forEach(function(Le){Le.depth=Ae,Le.sourceLinks.forEach(function(We){Ye.indexOf(We.target)<0&&!We.circular&&Ye.push(We.target)})});for(Fe=_t.nodes,Ye=[],Ae=0;Fe.length;++Ae,Fe=Ye,Ye=[])Fe.forEach(function(Le){Le.height=Ae,Le.targetLinks.forEach(function(We){Ye.indexOf(We.source)<0&&!We.circular&&Ye.push(We.source)})});_t.nodes.forEach(function(Le){Le.column=Math.floor(se.call(null,Le,Ae))})}function kr(_t,Fe,Ye){var Ae=S.nest().key(function(Ut){return Ut.column}).sortKeys(_.ascending).entries(_t.nodes).map(function(Ut){return Ut.values});Ke(Ye),ot();for(var Le=1,We=Fe;We>0;--We)st(Le*=.99,Ye),ot();function Ke(Ut){if(Je){var Ct=1/0;Ae.forEach(function(or){var nr=nt*Je/(or.length+1);Ct=nr0))if(or==0&&cr==1)Pr=nr.y1-nr.y0,nr.y0=nt/2-Pr/2,nr.y1=nt/2+Pr/2;else if(or==Pt-1&&cr==1)Pr=nr.y1-nr.y0,nr.y0=nt/2-Pr/2,nr.y1=nt/2+Pr/2;else{var _a=0,Fa=_.mean(nr.sourceLinks,x),Ra=_.mean(nr.targetLinks,l);Fa&&Ra?_a=(Fa+Ra)/2:_a=Fa||Ra;var qa=(_a-T(nr))*Ut;nr.y0+=qa,nr.y1+=qa}})})}function ot(){Ae.forEach(function(Ut){var Ct,Pt,jt=je,cr=Ut.length,or;for(Ut.sort(m),or=0;or0&&(Ct.y0+=Pt,Ct.y1+=Pt),jt=Ct.y1+Ve;if(Pt=jt-Ve-nt,Pt>0)for(jt=Ct.y0-=Pt,Ct.y1-=Pt,or=cr-2;or>=0;--or)Ct=Ut[or],Pt=Ct.y1+Ve-jt,Pt>0&&(Ct.y0-=Pt,Ct.y1-=Pt),jt=Ct.y0})}}function Ur(_t){_t.nodes.forEach(function(Fe){Fe.sourceLinks.sort(f),Fe.targetLinks.sort(h)}),_t.nodes.forEach(function(Fe){var Ye=Fe.y0,Ae=Ye,Le=Fe.y1,We=Le;Fe.sourceLinks.forEach(function(Ke){Ke.circular?(Ke.y0=Le-Ke.width/2,Le=Le-Ke.width):(Ke.y0=Ye+Ke.width/2,Ye+=Ke.width)}),Fe.targetLinks.forEach(function(Ke){Ke.circular?(Ke.y1=We-Ke.width/2,We=We-Ke.width):(Ke.y1=Ae+Ke.width/2,Ae+=Ke.width)})})}return kt}function D(Pe,je,at){var nt=0;if(at===null){for(var tt=[],Ve=0;Veje.source.column)}function N(Pe,je){var at=0;Pe.sourceLinks.forEach(function(tt){at=tt.circular&&!Se(tt,je)?at+1:at});var nt=0;return Pe.targetLinks.forEach(function(tt){nt=tt.circular&&!Se(tt,je)?nt+1:nt}),at+nt}function O(Pe){var je=Pe.source.sourceLinks,at=0;je.forEach(function(Ve){at=Ve.circular?at+1:at});var nt=Pe.target.targetLinks,tt=0;return nt.forEach(function(Ve){tt=Ve.circular?tt+1:tt}),!(at>1||tt>1)}function L(Pe,je,at){return Pe.sort(W),Pe.forEach(function(nt,tt){var Ve=0;if(Se(nt,at)&&O(nt))nt.circularPathData.verticalBuffer=Ve+nt.width/2;else{var he=0;for(he;heVe?se:Ve}nt.circularPathData.verticalBuffer=Ve+nt.width/2}}),Pe}function U(Pe,je,at,nt){var tt=5,Ve=_.min(Pe.links,function(ne){return ne.source.y0});Pe.links.forEach(function(ne){ne.circular&&(ne.circularPathData={})});var he=Pe.links.filter(function(ne){return ne.circularLinkType=="top"});L(he,je,nt);var se=Pe.links.filter(function(ne){return ne.circularLinkType=="bottom"});L(se,je,nt),Pe.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+d+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-d-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,Ze=ne.circularLinkType,rt=Pe.links.filter(function(kt){return kt.source.column==Ce&&kt.circularLinkType==Ze});ne.circularLinkType=="bottom"?rt.sort(ue):rt.sort($);var Je=0;rt.forEach(function(kt,Bt){kt.circularLinkID==ne.circularLinkID&&(ne.circularPathData.leftSmallArcRadius=u+ne.width/2+Je,ne.circularPathData.leftLargeArcRadius=u+ne.width/2+Bt*je+Je),Je=Je+kt.width}),Ce=ne.target.column,rt=Pe.links.filter(function(kt){return kt.target.column==Ce&&kt.circularLinkType==Ze}),ne.circularLinkType=="bottom"?rt.sort(de):rt.sort(ce),Je=0,rt.forEach(function(kt,Bt){kt.circularLinkID==ne.circularLinkID&&(ne.circularPathData.rightSmallArcRadius=u+ne.width/2+Je,ne.circularPathData.rightLargeArcRadius=u+ne.width/2+Bt*je+Je),Je=Je+kt.width}),ne.circularLinkType=="bottom"?(ne.circularPathData.verticalFullExtent=Math.max(at,ne.source.y1,ne.target.y1)+d+ne.circularPathData.verticalBuffer,ne.circularPathData.verticalLeftInnerExtent=ne.circularPathData.verticalFullExtent-ne.circularPathData.leftLargeArcRadius,ne.circularPathData.verticalRightInnerExtent=ne.circularPathData.verticalFullExtent-ne.circularPathData.rightLargeArcRadius):(ne.circularPathData.verticalFullExtent=Ve-d-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 St=M.linkHorizontal().source(function(kt){var Bt=kt.source.x0+(kt.source.x1-kt.source.x0),Vt=kt.y0;return[Bt,Vt]}).target(function(kt){var Bt=kt.target.x0,Vt=kt.y1;return[Bt,Vt]});ne.path=St(ne)}})}function B(Pe){var je="";return Pe.circularLinkType=="top"?je="M"+Pe.circularPathData.sourceX+" "+Pe.circularPathData.sourceY+" L"+Pe.circularPathData.leftInnerExtent+" "+Pe.circularPathData.sourceY+" A"+Pe.circularPathData.leftLargeArcRadius+" "+Pe.circularPathData.leftSmallArcRadius+" 0 0 0 "+Pe.circularPathData.leftFullExtent+" "+(Pe.circularPathData.sourceY-Pe.circularPathData.leftSmallArcRadius)+" L"+Pe.circularPathData.leftFullExtent+" "+Pe.circularPathData.verticalLeftInnerExtent+" A"+Pe.circularPathData.leftLargeArcRadius+" "+Pe.circularPathData.leftLargeArcRadius+" 0 0 0 "+Pe.circularPathData.leftInnerExtent+" "+Pe.circularPathData.verticalFullExtent+" L"+Pe.circularPathData.rightInnerExtent+" "+Pe.circularPathData.verticalFullExtent+" A"+Pe.circularPathData.rightLargeArcRadius+" "+Pe.circularPathData.rightLargeArcRadius+" 0 0 0 "+Pe.circularPathData.rightFullExtent+" "+Pe.circularPathData.verticalRightInnerExtent+" L"+Pe.circularPathData.rightFullExtent+" "+(Pe.circularPathData.targetY-Pe.circularPathData.rightSmallArcRadius)+" A"+Pe.circularPathData.rightLargeArcRadius+" "+Pe.circularPathData.rightSmallArcRadius+" 0 0 0 "+Pe.circularPathData.rightInnerExtent+" "+Pe.circularPathData.targetY+" L"+Pe.circularPathData.targetX+" "+Pe.circularPathData.targetY:je="M"+Pe.circularPathData.sourceX+" "+Pe.circularPathData.sourceY+" L"+Pe.circularPathData.leftInnerExtent+" "+Pe.circularPathData.sourceY+" A"+Pe.circularPathData.leftLargeArcRadius+" "+Pe.circularPathData.leftSmallArcRadius+" 0 0 1 "+Pe.circularPathData.leftFullExtent+" "+(Pe.circularPathData.sourceY+Pe.circularPathData.leftSmallArcRadius)+" L"+Pe.circularPathData.leftFullExtent+" "+Pe.circularPathData.verticalLeftInnerExtent+" A"+Pe.circularPathData.leftLargeArcRadius+" "+Pe.circularPathData.leftLargeArcRadius+" 0 0 1 "+Pe.circularPathData.leftInnerExtent+" "+Pe.circularPathData.verticalFullExtent+" L"+Pe.circularPathData.rightInnerExtent+" "+Pe.circularPathData.verticalFullExtent+" A"+Pe.circularPathData.rightLargeArcRadius+" "+Pe.circularPathData.rightLargeArcRadius+" 0 0 1 "+Pe.circularPathData.rightFullExtent+" "+Pe.circularPathData.verticalRightInnerExtent+" L"+Pe.circularPathData.rightFullExtent+" "+(Pe.circularPathData.targetY+Pe.circularPathData.rightSmallArcRadius)+" A"+Pe.circularPathData.rightLargeArcRadius+" "+Pe.circularPathData.rightSmallArcRadius+" 0 0 1 "+Pe.circularPathData.rightInnerExtent+" "+Pe.circularPathData.targetY+" L"+Pe.circularPathData.targetX+" "+Pe.circularPathData.targetY,je}function W(Pe,je){return Y(Pe)==Y(je)?Pe.circularLinkType=="bottom"?ue(Pe,je):$(Pe,je):Y(je)-Y(Pe)}function $(Pe,je){return Pe.y0-je.y0}function ue(Pe,je){return je.y0-Pe.y0}function ce(Pe,je){return Pe.y1-je.y1}function de(Pe,je){return je.y1-Pe.y1}function Y(Pe){return Pe.target.column-Pe.source.column}function X(Pe){return Pe.target.x0-Pe.source.x1}function Q(Pe,je){var at=z(Pe),nt=X(je)/Math.tan(at),tt=we(Pe)=="up"?Pe.y1+nt:Pe.y1-nt;return tt}function V(Pe,je){var at=z(Pe),nt=X(je)/Math.tan(at),tt=we(Pe)=="up"?Pe.y1-nt:Pe.y1+nt;return tt}function le(Pe,je,at,nt){Pe.links.forEach(function(tt){if(!tt.circular&&tt.target.column-tt.source.column>1){var Ve=tt.source.column+1,he=tt.target.column-1,se=1,ne=he-Ve+1;for(se=1;Ve<=he;Ve++,se++)Pe.nodes.forEach(function(Ce){if(Ce.column==Ve){var Ze=se/(ne+1),rt=Math.pow(1-Ze,3),Je=3*Ze*Math.pow(1-Ze,2),St=3*Math.pow(Ze,2)*(1-Ze),kt=Math.pow(Ze,3),Bt=rt*tt.y0+Je*tt.y0+St*tt.y1+kt*tt.y1,Vt=Bt-tt.width/2,Ar=Bt+tt.width/2,vr;Vt>Ce.y0&&VtCe.y0&&ArCe.y1&&j(qr,vr,je,at)})):VtCe.y1&&(vr=Ar-Ce.y0+10,Ce=j(Ce,vr,je,at),Pe.nodes.forEach(function(qr){b(qr,nt)==b(Ce,nt)||qr.column!=Ce.column||qr.y0Ce.y1&&j(qr,vr,je,at)}))}})}})}function ae(Pe,je){return Pe.y0>je.y0&&Pe.y0je.y0&&Pe.y1je.y1}function j(Pe,je,at,nt){return Pe.y0+je>=at&&Pe.y1+je<=nt&&(Pe.y0=Pe.y0+je,Pe.y1=Pe.y1+je,Pe.targetLinks.forEach(function(tt){tt.y1=tt.y1+je}),Pe.sourceLinks.forEach(function(tt){tt.y0=tt.y0+je})),Pe}function ee(Pe,je,at,nt){Pe.nodes.forEach(function(tt){nt&&tt.y+(tt.y1-tt.y0)>je&&(tt.y=tt.y-(tt.y+(tt.y1-tt.y0)-je));var Ve=Pe.links.filter(function(ne){return b(ne.source,at)==b(tt,at)}),he=Ve.length;he>1&&Ve.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 Ze=V(Ce,ne);return ne.y1-Ze}if(Ce.target.column>ne.target.column){var rt=V(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 se=tt.y0;Ve.forEach(function(ne){ne.y0=se+ne.width/2,se=se+ne.width}),Ve.forEach(function(ne,Ce){if(ne.circularLinkType=="bottom"){var Ze=Ce+1,rt=0;for(Ze;Ze1&&tt.sort(function(se,ne){if(!se.circular&&!ne.circular){if(se.source.column==ne.source.column)return se.y0-ne.y0;if(pe(se,ne)){if(ne.source.column0?"up":"down"}function Se(Pe,je){return b(Pe.source,je)==b(Pe.target,je)}function Re(Pe,je,at){var nt=Pe.nodes,tt=Pe.links,Ve=!1,he=!1;if(tt.forEach(function(Je){Je.circularLinkType=="top"?Ve=!0:Je.circularLinkType=="bottom"&&(he=!0)}),Ve==!1||he==!1){var se=_.min(nt,function(Je){return Je.y0}),ne=_.max(nt,function(Je){return Je.y1}),Ce=ne-se,Ze=at-je,rt=Ze/Ce;nt.forEach(function(Je){var St=(Je.y1-Je.y0)*rt;Je.y0=(Je.y0-se)*rt,Je.y1=Je.y0+St}),tt.forEach(function(Je){Je.y0=(Je.y0-se)*rt,Je.y1=(Je.y1-se)*rt,Je.width=Je.width*rt})}}v.sankeyCircular=y,v.sankeyCenter=i,v.sankeyLeft=r,v.sankeyRight=o,v.sankeyJustify=a,Object.defineProperty(v,"__esModule",{value:!0})})}}),j6=He({"src/traces/sankey/constants.js"(Z,q){"use strict";q.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"}}}}),gG=He({"src/traces/sankey/render.js"(Z,q){"use strict";var v=hG(),_=(pg(),zf(d0)).interpolateNumber,S=Vn(),M=dG(),e=mG(),t=j6(),r=Ch(),o=$n(),a=as(),i=sa(),n=i.strTranslate,s=i.strRotate,h=Cv(),f=h.keyFun,m=h.repeat,c=h.unwrap,T=su(),l=so(),x=uh(),w=x.CAP_SHIFT,A=x.LINE_SPACING,E=3;function p(Q,V,le){var ae=c(V),j=ae.trace,ee=j.domain,te=j.orientation==="h",pe=j.node.pad,we=j.node.thickness,Se={justify:M.sankeyJustify,left:M.sankeyLeft,right:M.sankeyRight,center:M.sankeyCenter}[j.node.align],Re=Q.width*(ee.x[1]-ee.x[0]),Pe=Q.height*(ee.y[1]-ee.y[0]),je=ae._nodes,at=ae._links,nt=ae.circular,tt;nt?tt=e.sankeyCircular().circularLinkGap(0):tt=M.sankey(),tt.iterations(t.sankeyIterations).size(te?[Re,Pe]:[Pe,Re]).nodeWidth(we).nodePadding(pe).nodeId(function(qr){return qr.pointNumber}).nodeAlign(Se).nodes(je).links(at);var Ve=tt();tt.nodePadding()=Fe||(_t=Fe-Ur.y0,_t>1e-6&&(Ur.y0+=_t,Ur.y1+=_t)),Fe=Ur.y1+pe})}function Bt(qr){var kr=qr.map(function(We,Ke){return{x0:We.x0,index:Ke}}).sort(function(We,Ke){return We.x0-Ke.x0}),Ur=[],_t=-1,Fe,Ye=-1/0,Ae;for(he=0;heYe+we&&(_t+=1,Fe=Le.x0),Ye=Le.x0,Ur[_t]||(Ur[_t]=[]),Ur[_t].push(Le),Ae=Fe-Le.x0,Le.x0+=Ae,Le.x1+=Ae}return Ur}if(j.node.x.length&&j.node.y.length){for(he=0;he0?" L "+j.targetX+" "+j.targetY:"")+"Z"):(le="M "+(j.targetX-V)+" "+(j.targetY-ae)+" L "+(j.rightInnerExtent-V)+" "+(j.targetY-ae)+" A "+(j.rightLargeArcRadius+ae)+" "+(j.rightSmallArcRadius+ae)+" 0 0 0 "+(j.rightFullExtent-ae-V)+" "+(j.targetY+j.rightSmallArcRadius)+" L "+(j.rightFullExtent-ae-V)+" "+j.verticalRightInnerExtent,ee&&te?le+=" A "+(j.rightLargeArcRadius+ae)+" "+(j.rightLargeArcRadius+ae)+" 0 0 0 "+(j.rightInnerExtent-ae-V)+" "+(j.verticalFullExtent+ae)+" L "+(j.rightFullExtent+ae-V-(j.rightLargeArcRadius-ae))+" "+(j.verticalFullExtent+ae)+" A "+(j.rightLargeArcRadius+ae)+" "+(j.rightLargeArcRadius+ae)+" 0 0 0 "+(j.leftFullExtent+ae)+" "+j.verticalLeftInnerExtent:ee?le+=" A "+(j.rightLargeArcRadius-ae)+" "+(j.rightSmallArcRadius-ae)+" 0 0 1 "+(j.rightFullExtent-V-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:le+=" A "+(j.rightLargeArcRadius+ae)+" "+(j.rightLargeArcRadius+ae)+" 0 0 0 "+(j.rightInnerExtent-V)+" "+(j.verticalFullExtent+ae)+" L "+j.leftInnerExtent+" "+(j.verticalFullExtent+ae)+" A "+(j.leftLargeArcRadius+ae)+" "+(j.leftLargeArcRadius+ae)+" 0 0 0 "+(j.leftFullExtent+ae)+" "+j.verticalLeftInnerExtent,le+=" 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,ee&&te?le+=" A "+(j.rightLargeArcRadius-ae)+" "+(j.rightSmallArcRadius-ae)+" 0 0 1 "+(j.leftFullExtent-ae-(j.rightLargeArcRadius-ae))+" "+(j.verticalFullExtent-ae)+" L "+(j.rightFullExtent+ae-V+(j.rightLargeArcRadius-ae))+" "+(j.verticalFullExtent-ae)+" A "+(j.rightLargeArcRadius-ae)+" "+(j.rightSmallArcRadius-ae)+" 0 0 1 "+(j.rightFullExtent+ae-V)+" "+j.verticalRightInnerExtent:ee?le+=" A "+(j.rightLargeArcRadius+ae)+" "+(j.rightLargeArcRadius+ae)+" 0 0 0 "+(j.leftFullExtent+ae)+" "+(j.verticalFullExtent+ae)+" L "+(j.rightFullExtent-V-ae)+" "+(j.verticalFullExtent+ae)+" A "+(j.rightLargeArcRadius+ae)+" "+(j.rightLargeArcRadius+ae)+" 0 0 0 "+(j.rightFullExtent+ae-V)+" "+j.verticalRightInnerExtent:le+=" A "+(j.leftLargeArcRadius-ae)+" "+(j.leftLargeArcRadius-ae)+" 0 0 1 "+j.leftInnerExtent+" "+(j.verticalFullExtent-ae)+" L "+(j.rightInnerExtent-V)+" "+(j.verticalFullExtent-ae)+" A "+(j.rightLargeArcRadius-ae)+" "+(j.rightLargeArcRadius-ae)+" 0 0 1 "+(j.rightFullExtent+ae-V)+" "+j.verticalRightInnerExtent,le+=" L "+(j.rightFullExtent+ae-V)+" "+(j.targetY+j.rightSmallArcRadius)+" A "+(j.rightLargeArcRadius-ae)+" "+(j.rightSmallArcRadius-ae)+" 0 0 1 "+(j.rightInnerExtent-V)+" "+(j.targetY+ae)+" L "+(j.targetX-V)+" "+(j.targetY+ae)+(V>0?" L "+j.targetX+" "+j.targetY:"")+"Z"),le}function u(){var Q=.5;function V(le){var ae=le.linkArrowLength;if(le.link.circular)return d(le.link,ae);var j=Math.abs((le.link.target.x0-le.link.source.x1)/2);ae>j&&(ae=j);var ee=le.link.source.x1,te=le.link.target.x0-ae,pe=_(ee,te),we=pe(Q),Se=pe(1-Q),Re=le.link.y0-le.link.width/2,Pe=le.link.y0+le.link.width/2,je=le.link.y1-le.link.width/2,at=le.link.y1+le.link.width/2,nt="M"+ee+","+Re,tt="C"+we+","+Re+" "+Se+","+je+" "+te+","+je,Ve="C"+Se+","+at+" "+we+","+Pe+" "+ee+","+Pe,he=ae>0?"L"+(te+ae)+","+(je+le.link.width/2):"";return he+="L"+te+","+at,nt+tt+he+Ve+"Z"}return V}function g(Q,V){var le=r(V.color),ae=t.nodePadAcross,j=Q.nodePad/2;V.dx=V.x1-V.x0,V.dy=V.y1-V.y0;var ee=V.dx,te=Math.max(.5,V.dy),pe="node_"+V.pointNumber;return V.group&&(pe=i.randstr()),V.trace=Q.trace,V.curveNumber=Q.trace.index,{index:V.pointNumber,key:pe,partOfGroup:V.partOfGroup||!1,group:V.group,traceId:Q.key,trace:Q.trace,node:V,nodePad:Q.nodePad,nodeLineColor:Q.nodeLineColor,nodeLineWidth:Q.nodeLineWidth,textFont:Q.textFont,size:Q.horizontal?Q.height:Q.width,visibleWidth:Math.ceil(ee),visibleHeight:te,zoneX:-ae,zoneY:-j,zoneWidth:ee+2*ae,zoneHeight:te+2*j,labelY:Q.horizontal?V.dy/2+1:V.dx/2+1,left:V.originalLayer===1,sizeAcross:Q.width,forceLayouts:Q.forceLayouts,horizontal:Q.horizontal,darkBackground:le.getBrightness()<=128,tinyColorHue:o.tinyRGB(le),tinyColorAlpha:le.getAlpha(),valueFormat:Q.valueFormat,valueSuffix:Q.valueSuffix,sankey:Q.sankey,graph:Q.graph,arrangement:Q.arrangement,uniqueNodeLabelPathId:[Q.guid,Q.key,pe].join("_"),interactionState:Q.interactionState,figure:Q}}function y(Q){Q.attr("transform",function(V){return n(V.node.x0.toFixed(3),V.node.y0.toFixed(3))})}function D(Q){Q.call(y)}function P(Q,V){Q.call(D),V.attr("d",u())}function z(Q){Q.attr("width",function(V){return V.node.x1-V.node.x0}).attr("height",function(V){return V.visibleHeight})}function F(Q){return Q.link.width>1||Q.linkLineWidth>0}function N(Q){var V=n(Q.translateX,Q.translateY);return V+(Q.horizontal?"matrix(1 0 0 1 0 0)":"matrix(0 1 1 0 0 0)")}function O(Q,V,le){Q.on(".basic",null).on("mouseover.basic",function(ae){!ae.interactionState.dragInProgress&&!ae.partOfGroup&&(le.hover(this,ae,V),ae.interactionState.hovered=[this,ae])}).on("mousemove.basic",function(ae){!ae.interactionState.dragInProgress&&!ae.partOfGroup&&(le.follow(this,ae),ae.interactionState.hovered=[this,ae])}).on("mouseout.basic",function(ae){!ae.interactionState.dragInProgress&&!ae.partOfGroup&&(le.unhover(this,ae,V),ae.interactionState.hovered=!1)}).on("click.basic",function(ae){ae.interactionState.hovered&&(le.unhover(this,ae,V),ae.interactionState.hovered=!1),!ae.interactionState.dragInProgress&&!ae.partOfGroup&&le.select(this,ae,V)})}function L(Q,V,le,ae){var j=S.behavior.drag().origin(function(ee){return{x:ee.node.x0+ee.visibleWidth/2,y:ee.node.y0+ee.visibleHeight/2}}).on("dragstart",function(ee){if(ee.arrangement!=="fixed"&&(i.ensureSingle(ae._fullLayout._infolayer,"g","dragcover",function(pe){ae._fullLayout._dragCover=pe}),i.raiseToTop(this),ee.interactionState.dragInProgress=ee.node,ce(ee.node),ee.interactionState.hovered&&(le.nodeEvents.unhover.apply(0,ee.interactionState.hovered),ee.interactionState.hovered=!1),ee.arrangement==="snap")){var te=ee.traceId+"|"+ee.key;ee.forceLayouts[te]?ee.forceLayouts[te].alpha(1):U(Q,te,ee,ae),B(Q,V,ee,te,ae)}}).on("drag",function(ee){if(ee.arrangement!=="fixed"){var te=S.event.x,pe=S.event.y;ee.arrangement==="snap"?(ee.node.x0=te-ee.visibleWidth/2,ee.node.x1=te+ee.visibleWidth/2,ee.node.y0=pe-ee.visibleHeight/2,ee.node.y1=pe+ee.visibleHeight/2):(ee.arrangement==="freeform"&&(ee.node.x0=te-ee.visibleWidth/2,ee.node.x1=te+ee.visibleWidth/2),pe=Math.max(0,Math.min(ee.size-ee.visibleHeight/2,pe)),ee.node.y0=pe-ee.visibleHeight/2,ee.node.y1=pe+ee.visibleHeight/2),ce(ee.node),ee.arrangement!=="snap"&&(ee.sankey.update(ee.graph),P(Q.filter(de(ee)),V))}}).on("dragend",function(ee){if(ee.arrangement!=="fixed"){ee.interactionState.dragInProgress=!1;for(var te=0;te0)window.requestAnimationFrame(ee);else{var we=le.node.originalX;le.node.x0=we-le.visibleWidth/2,le.node.x1=we+le.visibleWidth/2,$(le,j)}})}function W(Q,V,le,ae){return function(){for(var ee=0,te=0;te0&&ae.forceLayouts[V].alpha(0)}}function $(Q,V){for(var le=[],ae=[],j=0;j"),color:x(Y,"bgcolor")||t.addOpacity(ae.color,1),borderColor:x(Y,"bordercolor"),fontFamily:x(Y,"font.family"),fontSize:x(Y,"font.size"),fontColor:x(Y,"font.color"),fontWeight:x(Y,"font.weight"),fontStyle:x(Y,"font.style"),fontVariant:x(Y,"font.variant"),fontTextcase:x(Y,"font.textcase"),fontLineposition:x(Y,"font.lineposition"),fontShadow:x(Y,"font.shadow"),nameLength:x(Y,"namelength"),textAlign:x(Y,"align"),idealAlign:v.event.x"),color:x(Y,"bgcolor")||de.tinyColorHue,borderColor:x(Y,"bordercolor"),fontFamily:x(Y,"font.family"),fontSize:x(Y,"font.size"),fontColor:x(Y,"font.color"),fontWeight:x(Y,"font.weight"),fontStyle:x(Y,"font.style"),fontVariant:x(Y,"font.variant"),fontTextcase:x(Y,"font.textcase"),fontLineposition:x(Y,"font.lineposition"),fontShadow:x(Y,"font.shadow"),nameLength:x(Y,"namelength"),textAlign:x(Y,"align"),idealAlign:"left",hovertemplate:Y.hovertemplate,hovertemplateLabels:ee,eventData:[de.node]},{container:p._hoverlayer.node(),outerContainer:p._paper.node(),gd:A});n(we,.85),s(we)}}},ue=function(ce,de,Y){A._fullLayout.hovermode!==!1&&(v.select(ce).call(c,de,Y),de.node.trace.node.hoverinfo!=="skip"&&(de.node.fullData=de.node.trace,A.emit("plotly_unhover",{event:v.event,points:[de.node]})),e.loneUnhover(p._hoverlayer.node()))};M(A,b,E,{width:d.w,height:d.h,margin:{t:d.t,r:d.r,b:d.b,l:d.l}},{linkEvents:{hover:D,follow:L,unhover:U,select:y},nodeEvents:{hover:W,follow:$,unhover:ue,select:B}})}}}),yG=He({"src/traces/sankey/base_plot.js"(Z){"use strict";var q=pc().overrideAll,v=Wh().getModuleCalcData,_=q6(),S=Ym(),M=Kd(),e=Ap(),t=Af().prepSelect,r=sa(),o=so(),a="sankey";Z.name=a,Z.baseLayoutAttrOverrides=q({hoverlabel:S.hoverlabel},"plot","nested"),Z.plot=function(n){var s=v(n.calcdata,a)[0];_(n,s),Z.updateFx(n)},Z.clean=function(n,s,h,f){var m=f._has&&f._has(a),c=s._has&&s._has(a);m&&!c&&(f._paperdiv.selectAll(".sankey").remove(),f._paperdiv.selectAll(".bgsankey").remove())},Z.updateFx=function(n){for(var s=0;s0}q.exports=function(F,N,O,L){var U=F._fullLayout,B;w(O)&&L&&(B=L()),M.makeTraceGroups(U._indicatorlayer,N,"trace").each(function(W){var $=W[0],ue=$.trace,ce=v.select(this),de=ue._hasGauge,Y=ue._isAngular,X=ue._isBullet,Q=ue.domain,V={w:U._size.w*(Q.x[1]-Q.x[0]),h:U._size.h*(Q.y[1]-Q.y[0]),l:U._size.l+U._size.w*Q.x[0],r:U._size.r+U._size.w*(1-Q.x[1]),t:U._size.t+U._size.h*(1-Q.y[1]),b:U._size.b+U._size.h*Q.y[0]},le=V.l+V.w/2,ae=V.t+V.h/2,j=Math.min(V.w/2,V.h),ee=i.innerRadius*j,te,pe,we,Se=ue.align||"center";if(pe=ae,!de)te=V.l+l[Se]*V.w,we=function(ne){return g(ne,V.w,V.h)};else if(Y&&(te=le,pe=ae+j/2,we=function(ne){return y(ne,.9*ee)}),X){var Re=i.bulletPadding,Pe=1-i.bulletNumberDomainSize+Re;te=V.l+(Pe+(1-Pe)*l[Se])*V.w,we=function(ne){return g(ne,(i.bulletNumberDomainSize-Re)*V.w,V.h)}}p(F,ce,W,{numbersX:te,numbersY:pe,numbersScaler:we,transitionOpts:O,onComplete:B});var je,at;de&&(je={range:ue.gauge.axis.range,color:ue.gauge.bgcolor,line:{color:ue.gauge.bordercolor,width:0},thickness:1},at={range:ue.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:ue.gauge.bordercolor,width:ue.gauge.borderwidth},thickness:1});var nt=ce.selectAll("g.angular").data(Y?W:[]);nt.exit().remove();var tt=ce.selectAll("g.angularaxis").data(Y?W:[]);tt.exit().remove(),Y&&E(F,ce,W,{radius:j,innerRadius:ee,gauge:nt,layer:tt,size:V,gaugeBg:je,gaugeOutline:at,transitionOpts:O,onComplete:B});var Ve=ce.selectAll("g.bullet").data(X?W:[]);Ve.exit().remove();var he=ce.selectAll("g.bulletaxis").data(X?W:[]);he.exit().remove(),X&&A(F,ce,W,{gauge:Ve,layer:he,size:V,gaugeBg:je,gaugeOutline:at,transitionOpts:O,onComplete:B});var se=ce.selectAll("text.title").data(W);se.exit().remove(),se.enter().append("text").classed("title",!0),se.attr("text-anchor",function(){return X?T.right:T[ue.title.align]}).text(ue.title.text).call(a.font,ue.title.font).call(n.convertToTspans,F),se.attr("transform",function(){var ne=V.l+V.w*l[ue.title.align],Ce,Ze=i.titlePadding,rt=a.bBox(se.node());if(de){if(Y)if(ue.gauge.axis.visible){var Je=a.bBox(tt.node());Ce=Je.top-Ze-rt.bottom}else Ce=V.t+V.h/2-j/2-rt.bottom-Ze;X&&(Ce=pe-(rt.top+rt.bottom)/2,ne=V.l-i.bulletPadding*V.w)}else Ce=ue._numbersTop-Ze-rt.bottom;return t(ne,Ce)})})};function A(z,F,N,O){var L=N[0].trace,U=O.gauge,B=O.layer,W=O.gaugeBg,$=O.gaugeOutline,ue=O.size,ce=L.domain,de=O.transitionOpts,Y=O.onComplete,X,Q,V,le,ae;U.enter().append("g").classed("bullet",!0),U.attr("transform",t(ue.l,ue.t)),B.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),B.selectAll("g.xbulletaxistick,path,text").remove();var j=ue.h,ee=L.gauge.bar.thickness*j,te=ce.x[0],pe=ce.x[0]+(ce.x[1]-ce.x[0])*(L._hasNumber||L._hasDelta?1-i.bulletNumberDomainSize:1);X=u(z,L.gauge.axis),X._id="xbulletaxis",X.domain=[te,pe],X.setScale(),Q=s.calcTicks(X),V=s.makeTransTickFn(X),le=s.getTickSigns(X)[2],ae=ue.t+ue.h,X.visible&&(s.drawTicks(z,X,{vals:X.ticks==="inside"?s.clipEnds(X,Q):Q,layer:B,path:s.makeTickPath(X,ae,le),transFn:V}),s.drawLabels(z,X,{vals:Q,layer:B,transFn:V,labelFns:s.makeLabelFns(X,ae)}));function we(tt){tt.attr("width",function(Ve){return Math.max(0,X.c2p(Ve.range[1])-X.c2p(Ve.range[0]))}).attr("x",function(Ve){return X.c2p(Ve.range[0])}).attr("y",function(Ve){return .5*(1-Ve.thickness)*j}).attr("height",function(Ve){return Ve.thickness*j})}var Se=[W].concat(L.gauge.steps),Re=U.selectAll("g.bg-bullet").data(Se);Re.enter().append("g").classed("bg-bullet",!0).append("rect"),Re.select("rect").call(we).call(b),Re.exit().remove();var Pe=U.selectAll("g.value-bullet").data([L.gauge.bar]);Pe.enter().append("g").classed("value-bullet",!0).append("rect"),Pe.select("rect").attr("height",ee).attr("y",(j-ee)/2).call(b),w(de)?Pe.select("rect").transition().duration(de.duration).ease(de.easing).each("end",function(){Y&&Y()}).each("interrupt",function(){Y&&Y()}).attr("width",Math.max(0,X.c2p(Math.min(L.gauge.axis.range[1],N[0].y)))):Pe.select("rect").attr("width",typeof N[0].y=="number"?Math.max(0,X.c2p(Math.min(L.gauge.axis.range[1],N[0].y))):0),Pe.exit().remove();var je=N.filter(function(){return L.gauge.threshold.value||L.gauge.threshold.value===0}),at=U.selectAll("g.threshold-bullet").data(je);at.enter().append("g").classed("threshold-bullet",!0).append("line"),at.select("line").attr("x1",X.c2p(L.gauge.threshold.value)).attr("x2",X.c2p(L.gauge.threshold.value)).attr("y1",(1-L.gauge.threshold.thickness)/2*j).attr("y2",(1-(1-L.gauge.threshold.thickness)/2)*j).call(c.stroke,L.gauge.threshold.line.color).style("stroke-width",L.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 E(z,F,N,O){var L=N[0].trace,U=O.size,B=O.radius,W=O.innerRadius,$=O.gaugeBg,ue=O.gaugeOutline,ce=[U.l+U.w/2,U.t+U.h/2+B/2],de=O.gauge,Y=O.layer,X=O.transitionOpts,Q=O.onComplete,V=Math.PI/2;function le(St){var kt=L.gauge.axis.range[0],Bt=L.gauge.axis.range[1],Vt=(St-kt)/(Bt-kt)*Math.PI-V;return Vt<-V?-V:Vt>V?V:Vt}function ae(St){return v.svg.arc().innerRadius((W+B)/2-St/2*(B-W)).outerRadius((W+B)/2+St/2*(B-W)).startAngle(-V)}function j(St){St.attr("d",function(kt){return ae(kt.thickness).startAngle(le(kt.range[0])).endAngle(le(kt.range[1]))()})}var ee,te,pe,we;de.enter().append("g").classed("angular",!0),de.attr("transform",t(ce[0],ce[1])),Y.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),Y.selectAll("g.xangularaxistick,path,text").remove(),ee=u(z,L.gauge.axis),ee.type="linear",ee.range=L.gauge.axis.range,ee._id="xangularaxis",ee.ticklabeloverflow="allow",ee.setScale();var Se=function(St){return(ee.range[0]-St.x)/(ee.range[1]-ee.range[0])*Math.PI+Math.PI},Re={},Pe=s.makeLabelFns(ee,0),je=Pe.labelStandoff;Re.xFn=function(St){var kt=Se(St);return Math.cos(kt)*je},Re.yFn=function(St){var kt=Se(St),Bt=Math.sin(kt)>0?.2:1;return-Math.sin(kt)*(je+St.fontSize*Bt)+Math.abs(Math.cos(kt))*(St.fontSize*o)},Re.anchorFn=function(St){var kt=Se(St),Bt=Math.cos(kt);return Math.abs(Bt)<.1?"middle":Bt>0?"start":"end"},Re.heightFn=function(St,kt,Bt){var Vt=Se(St);return-.5*(1+Math.sin(Vt))*Bt};var at=function(St){return t(ce[0]+B*Math.cos(St),ce[1]-B*Math.sin(St))};pe=function(St){return at(Se(St))};var nt=function(St){var kt=Se(St);return at(kt)+"rotate("+-r(kt)+")"};if(te=s.calcTicks(ee),we=s.getTickSigns(ee)[2],ee.visible){we=ee.ticks==="inside"?-1:1;var tt=(ee.linewidth||1)/2;s.drawTicks(z,ee,{vals:te,layer:Y,path:"M"+we*tt+",0h"+we*ee.ticklen,transFn:nt}),s.drawLabels(z,ee,{vals:te,layer:Y,transFn:pe,labelFns:Re})}var Ve=[$].concat(L.gauge.steps),he=de.selectAll("g.bg-arc").data(Ve);he.enter().append("g").classed("bg-arc",!0).append("path"),he.select("path").call(j).call(b),he.exit().remove();var se=ae(L.gauge.bar.thickness),ne=de.selectAll("g.value-arc").data([L.gauge.bar]);ne.enter().append("g").classed("value-arc",!0).append("path");var Ce=ne.select("path");w(X)?(Ce.transition().duration(X.duration).ease(X.easing).each("end",function(){Q&&Q()}).each("interrupt",function(){Q&&Q()}).attrTween("d",d(se,le(N[0].lastY),le(N[0].y))),L._lastValue=N[0].y):Ce.attr("d",typeof N[0].y=="number"?se.endAngle(le(N[0].y)):"M0,0Z"),Ce.call(b),ne.exit().remove(),Ve=[];var Ze=L.gauge.threshold.value;(Ze||Ze===0)&&Ve.push({range:[Ze,Ze],color:L.gauge.threshold.color,line:{color:L.gauge.threshold.line.color,width:L.gauge.threshold.line.width},thickness:L.gauge.threshold.thickness});var rt=de.selectAll("g.threshold-arc").data(Ve);rt.enter().append("g").classed("threshold-arc",!0).append("path"),rt.select("path").call(j).call(b),rt.exit().remove();var Je=de.selectAll("g.gauge-outline").data([ue]);Je.enter().append("g").classed("gauge-outline",!0).append("path"),Je.select("path").call(j).call(b),Je.exit().remove()}function p(z,F,N,O){var L=N[0].trace,U=O.numbersX,B=O.numbersY,W=L.align||"center",$=T[W],ue=O.transitionOpts,ce=O.onComplete,de=M.ensureSingle(F,"g","numbers"),Y,X,Q,V=[];L._hasNumber&&V.push("number"),L._hasDelta&&(V.push("delta"),L.delta.position==="left"&&V.reverse());var le=de.selectAll("text").data(V);le.enter().append("text"),le.attr("text-anchor",function(){return $}).attr("class",function(at){return at}).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),le.exit().remove();function ae(at,nt,tt,Ve){if(at.match("s")&&tt>=0!=Ve>=0&&!nt(tt).slice(-1).match(x)&&!nt(Ve).slice(-1).match(x)){var he=at.slice().replace("s","f").replace(/\d+/,function(ne){return parseInt(ne)-1}),se=u(z,{tickformat:he});return function(ne){return Math.abs(ne)<1?s.tickText(se,ne).text:nt(ne)}}else return nt}function j(){var at=u(z,{tickformat:L.number.valueformat},L._range);at.setScale(),s.prepTicks(at);var nt=function(ne){return s.tickText(at,ne).text},tt=L.number.suffix,Ve=L.number.prefix,he=de.select("text.number");function se(){var ne=typeof N[0].y=="number"?Ve+nt(N[0].y)+tt:"-";he.text(ne).call(a.font,L.number.font).call(n.convertToTspans,z)}return w(ue)?he.transition().duration(ue.duration).ease(ue.easing).each("end",function(){se(),ce&&ce()}).each("interrupt",function(){se(),ce&&ce()}).attrTween("text",function(){var ne=v.select(this),Ce=S(N[0].lastY,N[0].y);L._lastValue=N[0].y;var Ze=ae(L.number.valueformat,nt,N[0].lastY,N[0].y);return function(rt){ne.text(Ve+Ze(Ce(rt))+tt)}}):se(),Y=D(Ve+nt(N[0].y)+tt,L.number.font,$,z),he}function ee(){var at=u(z,{tickformat:L.delta.valueformat},L._range);at.setScale(),s.prepTicks(at);var nt=function(rt){return s.tickText(at,rt).text},tt=L.delta.suffix,Ve=L.delta.prefix,he=function(rt){var Je=L.delta.relative?rt.relativeDelta:rt.delta;return Je},se=function(rt,Je){return rt===0||typeof rt!="number"||isNaN(rt)?"-":(rt>0?L.delta.increasing.symbol:L.delta.decreasing.symbol)+Ve+Je(rt)+tt},ne=function(rt){return rt.delta>=0?L.delta.increasing.color:L.delta.decreasing.color};L._deltaLastValue===void 0&&(L._deltaLastValue=he(N[0]));var Ce=de.select("text.delta");Ce.call(a.font,L.delta.font).call(c.fill,ne({delta:L._deltaLastValue}));function Ze(){Ce.text(se(he(N[0]),nt)).call(c.fill,ne(N[0])).call(n.convertToTspans,z)}return w(ue)?Ce.transition().duration(ue.duration).ease(ue.easing).tween("text",function(){var rt=v.select(this),Je=he(N[0]),St=L._deltaLastValue,kt=ae(L.delta.valueformat,nt,St,Je),Bt=S(St,Je);return L._deltaLastValue=Je,function(Vt){rt.text(se(Bt(Vt),kt)),rt.call(c.fill,ne({delta:Bt(Vt)}))}}).each("end",function(){Ze(),ce&&ce()}).each("interrupt",function(){Ze(),ce&&ce()}):Ze(),X=D(se(he(N[0]),nt),L.delta.font,$,z),Ce}var te=L.mode+L.align,pe;if(L._hasDelta&&(pe=ee(),te+=L.delta.position+L.delta.font.size+L.delta.font.family+L.delta.valueformat,te+=L.delta.increasing.symbol+L.delta.decreasing.symbol,Q=X),L._hasNumber&&(j(),te+=L.number.font.size+L.number.font.family+L.number.valueformat+L.number.suffix+L.number.prefix,Q=Y),L._hasDelta&&L._hasNumber){var we=[(Y.left+Y.right)/2,(Y.top+Y.bottom)/2],Se=[(X.left+X.right)/2,(X.top+X.bottom)/2],Re,Pe,je=.75*L.delta.font.size;L.delta.position==="left"&&(Re=P(L,"deltaPos",0,-1*(Y.width*l[L.align]+X.width*(1-l[L.align])+je),te,Math.min),Pe=we[1]-Se[1],Q={width:Y.width+X.width+je,height:Math.max(Y.height,X.height),left:X.left+Re,right:Y.right,top:Math.min(Y.top,X.top+Pe),bottom:Math.max(Y.bottom,X.bottom+Pe)}),L.delta.position==="right"&&(Re=P(L,"deltaPos",0,Y.width*(1-l[L.align])+X.width*l[L.align]+je,te,Math.max),Pe=we[1]-Se[1],Q={width:Y.width+X.width+je,height:Math.max(Y.height,X.height),left:Y.left,right:X.right+Re,top:Math.min(Y.top,X.top+Pe),bottom:Math.max(Y.bottom,X.bottom+Pe)}),L.delta.position==="bottom"&&(Re=null,Pe=X.height,Q={width:Math.max(Y.width,X.width),height:Y.height+X.height,left:Math.min(Y.left,X.left),right:Math.max(Y.right,X.right),top:Y.bottom-Y.height,bottom:Y.bottom+X.height}),L.delta.position==="top"&&(Re=null,Pe=Y.top,Q={width:Math.max(Y.width,X.width),height:Y.height+X.height,left:Math.min(Y.left,X.left),right:Math.max(Y.right,X.right),top:Y.bottom-Y.height-X.height,bottom:Y.bottom}),pe.attr({dx:Re,dy:Pe})}(L._hasNumber||L._hasDelta)&&de.attr("transform",function(){var at=O.numbersScaler(Q);te+=at[2];var nt=P(L,"numbersScale",1,at[0],te,Math.min),tt;L._scaleNumbers||(nt=1),L._isAngular?tt=B-nt*Q.bottom:tt=B-nt*(Q.top+Q.bottom)/2,L._numbersTop=nt*Q.top+tt;var Ve=Q[W];W==="center"&&(Ve=(Q.left+Q.right)/2);var he=U-nt*Ve;return he=P(L,"numbersTranslate",0,he,te,Math.max),t(he,tt)+e(nt)})}function b(z){z.each(function(F){c.stroke(v.select(this),F.line.color)}).each(function(F){c.fill(v.select(this),F.color)}).style("stroke-width",function(F){return F.line.width})}function d(z,F,N){return function(){var O=_(F,N);return function(L){return z.endAngle(O(L))()}}}function u(z,F,N){var O=z._fullLayout,L=M.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 W($,ue){return M.coerce(L,U,m,$,ue)}return h(L,U,W,B,O),f(L,U,W,B),U}function g(z,F,N){var O=Math.min(F/z.width,N/z.height);return[O,z,F+"x"+N]}function y(z,F){var N=Math.sqrt(z.width/2*(z.width/2)+z.height*z.height),O=F/N;return[O,z,F]}function D(z,F,N,O){var L=document.createElementNS("http://www.w3.org/2000/svg","text"),U=v.select(L);return U.text(z).attr("x",0).attr("y",0).attr("text-anchor",N).attr("data-unformatted",z).call(n.convertToTspans,O).call(a.font,F),a.bBox(U.node())}function P(z,F,N,O,L,U){var B="_cache"+F;z[B]&&z[B].key===L||(z[B]={key:L,value:N});var W=M.aggNums(U,null,[z[B].value,O],2);return z[B].value=W,W}}}),MG=He({"src/traces/indicator/index.js"(Z,q){"use strict";q.exports={moduleType:"trace",name:"indicator",basePlotModule:wG(),categories:["svg","noOpacity","noHover"],animatable:!0,attributes:V6(),supplyDefaults:TG().supplyDefaults,calc:AG().calc,plot:SG(),meta:{}}}}),EG=He({"lib/indicator.js"(Z,q){"use strict";q.exports=MG()}}),H6=He({"src/traces/table/attributes.js"(Z,q){"use strict";var v=$0(),_=rs().extendFlat,S=pc().overrideAll,M=tc(),e=wc().attributes,t=rf().descriptionOnlyNumbers,r=q.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:_({},v.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:_({},M({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:_({},v.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:_({},M({arrayOk:!0}))}},"calc","from-root")}}),kG=He({"src/traces/table/defaults.js"(Z,q){"use strict";var v=sa(),_=H6(),S=wc().defaults;function M(e,t){for(var r=e.columnorder||[],o=e.header.values.length,a=r.slice(0,o),i=a.slice().sort(function(h,f){return h-f}),n=a.map(function(h){return i.indexOf(h)}),s=n.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"}}}}),LG=He({"src/traces/table/data_preparation_helper.js"(Z,q){"use strict";var v=W6(),_=rs().extendFlat,S=ns(),M=hp().isTypedArray,e=hp().isArrayOrTypedArray;q.exports=function(m,c){var T=o(c.cells.values),l=function($){return $.slice(c.header.values.length,$.length)},x=o(c.header.values);x.length&&!x[0].length&&(x[0]=[""],x=o(x));var w=x.concat(l(T).map(function(){return a((x[0]||[""]).length)})),A=c.domain,E=Math.floor(m._fullLayout._size.w*(A.x[1]-A.x[0])),p=Math.floor(m._fullLayout._size.h*(A.y[1]-A.y[0])),b=c.header.values.length?w[0].map(function(){return c.header.height}):[v.emptyHeaderHeight],d=T.length?T[0].map(function(){return c.cells.height}):[],u=b.reduce(r,0),g=p-u,y=g+v.uplift,D=s(d,y),P=s(b,u),z=n(P,[]),F=n(D,z),N={},O=c._fullInput.columnorder;e(O)&&(O=Array.from(O)),O=O.concat(l(T.map(function($,ue){return ue})));var L=w.map(function($,ue){var ce=e(c.columnwidth)?c.columnwidth[Math.min(ue,c.columnwidth.length-1)]:c.columnwidth;return S(ce)?Number(ce):1}),U=L.reduce(r,0);L=L.map(function($){return $/U*E});var B=Math.max(t(c.header.line.width),t(c.cells.line.width)),W={key:c.uid+m._context.staticPlot,translateX:A.x[0]*m._fullLayout._size.w,translateY:m._fullLayout._size.h*(1-A.y[1]),size:m._fullLayout._size,width:E,maxLineWidth:B,height:p,columnOrder:O,groupHeight:p,rowBlocks:F,headerRowBlocks:z,scrollY:0,cells:_({},c.cells,{values:T}),headerCells:_({},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($,ue){var ce=N[$];N[$]=(ce||0)+1;var de=$+"__"+N[$];return{key:de,label:$,specIndex:ue,xIndex:O[ue],xScale:i,x:void 0,calcdata:void 0,columnWidth:L[ue]}})};return W.columns.forEach(function($){$.calcdata=W,$.x=i($)}),W};function t(f){if(e(f)){for(var m=0,c=0;c=m||p===f.length-1)&&(c[l]=w,w.key=E++,w.firstRowIndex=A,w.lastRowIndex=p,w=h(),l+=x,A=p+1,x=0);return c}function h(){return{firstRowIndex:null,lastRowIndex:null,rows:[]}}}}),PG=He({"src/traces/table/data_split_helpers.js"(Z){"use strict";var q=rs().extendFlat;Z.splitToPanels=function(_){var S=[0,0],M=q({},_,{key:"header",type:"header",page:0,prevPages:S,currentRepaint:[null,null],dragHandle:!0,values:_.calcdata.headerCells.values[_.specIndex],rowBlocks:_.calcdata.headerRowBlocks,calcdata:q({},_.calcdata,{cells:_.calcdata.headerCells})}),e=q({},_,{key:"cells1",type:"cells",page:0,prevPages:S,currentRepaint:[null,null],dragHandle:!1,values:_.calcdata.cells.values[_.specIndex],rowBlocks:_.calcdata.rowBlocks}),t=q({},_,{key:"cells2",type:"cells",page:1,prevPages:S,currentRepaint:[null,null],dragHandle:!1,values:_.calcdata.cells.values[_.specIndex],rowBlocks:_.calcdata.rowBlocks});return[e,t,M]},Z.splitToCells=function(_){var S=v(_);return(_.values||[]).slice(S[0],S[1]).map(function(M,e){var t=typeof M=="string"&&M.match(/[<$&> ]/)?"_keybuster_"+Math.random():"";return{keyWithinBlock:e+t,key:S[0]+e,column:_,calcdata:_.calcdata,page:_.page,rowBlocks:_.rowBlocks,value:M}})};function v(_){var S=_.rowBlocks[_.page],M=S?S.rows[0].rowIndex:0,e=S?M+S.rows.length:0;return[M,e]}}}),X6=He({"src/traces/table/plot.js"(Z,q){"use strict";var v=W6(),_=Vn(),S=sa(),M=S.numberFormat,e=Cv(),t=as(),r=su(),o=sa().raiseToTop,a=sa().strTranslate,i=sa().cancelTransition,n=LG(),s=PG(),h=$n();q.exports=function(te,pe){var we=!te._context.staticPlot,Se=te._fullLayout._paper.selectAll("."+v.cn.table).data(pe.map(function(Je){var St=e.unwrap(Je),kt=St.trace;return n(te,kt)}),e.keyFun);Se.exit().remove(),Se.enter().append("g").classed(v.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(Je){return Je.width+Je.size.l+Je.size.r}).attr("height",function(Je){return Je.height+Je.size.t+Je.size.b}).attr("transform",function(Je){return a(Je.translateX,Je.translateY)});var Re=Se.selectAll("."+v.cn.tableControlView).data(e.repeat,e.keyFun),Pe=Re.enter().append("g").classed(v.cn.tableControlView,!0).style("box-sizing","content-box");if(we){var je="onwheel"in document?"wheel":"mousewheel";Pe.on("mousemove",function(Je){Re.filter(function(St){return Je===St}).call(l,te)}).on(je,function(Je){if(!Je.scrollbarState.wheeling){Je.scrollbarState.wheeling=!0;var St=Je.scrollY+_.event.deltaY,kt=$(te,Re,null,St)(Je);kt||(_.event.stopPropagation(),_.event.preventDefault()),Je.scrollbarState.wheeling=!1}}).call(l,te,!0)}Re.attr("transform",function(Je){return a(Je.size.l,Je.size.t)});var at=Re.selectAll("."+v.cn.scrollBackground).data(e.repeat,e.keyFun);at.enter().append("rect").classed(v.cn.scrollBackground,!0).attr("fill","none"),at.attr("width",function(Je){return Je.width}).attr("height",function(Je){return Je.height}),Re.each(function(Je){t.setClipUrl(_.select(this),m(te,Je),te)});var nt=Re.selectAll("."+v.cn.yColumn).data(function(Je){return Je.columns},e.keyFun);nt.enter().append("g").classed(v.cn.yColumn,!0),nt.exit().remove(),nt.attr("transform",function(Je){return a(Je.x,0)}),we&&nt.call(_.behavior.drag().origin(function(Je){var St=_.select(this);return N(St,Je,-v.uplift),o(this),Je.calcdata.columnDragInProgress=!0,l(Re.filter(function(kt){return Je.calcdata.key===kt.key}),te),Je}).on("drag",function(Je){var St=_.select(this),kt=function(Ar){return(Je===Ar?_.event.x:Ar.x)+Ar.columnWidth/2};Je.x=Math.max(-v.overdrag,Math.min(Je.calcdata.width+v.overdrag-Je.columnWidth,_.event.x));var Bt=T(nt).filter(function(Ar){return Ar.calcdata.key===Je.calcdata.key}),Vt=Bt.sort(function(Ar,vr){return kt(Ar)-kt(vr)});Vt.forEach(function(Ar,vr){Ar.xIndex=vr,Ar.x=Je===Ar?Ar.x:Ar.xScale(Ar)}),nt.filter(function(Ar){return Je!==Ar}).transition().ease(v.transitionEase).duration(v.transitionDuration).attr("transform",function(Ar){return a(Ar.x,0)}),St.call(i).attr("transform",a(Je.x,-v.uplift))}).on("dragend",function(Je){var St=_.select(this),kt=Je.calcdata;Je.x=Je.xScale(Je),Je.calcdata.columnDragInProgress=!1,N(St,Je,0),z(te,kt,kt.columns.map(function(Bt){return Bt.xIndex}))})),nt.each(function(Je){t.setClipUrl(_.select(this),c(te,Je),te)});var tt=nt.selectAll("."+v.cn.columnBlock).data(s.splitToPanels,e.keyFun);tt.enter().append("g").classed(v.cn.columnBlock,!0).attr("id",function(Je){return Je.key}),tt.style("cursor",function(Je){return Je.dragHandle?"ew-resize":Je.calcdata.scrollbarState.barWiggleRoom?"ns-resize":"default"});var Ve=tt.filter(L),he=tt.filter(O);we&&he.call(_.behavior.drag().origin(function(Je){return _.event.stopPropagation(),Je}).on("drag",$(te,Re,-1)).on("dragend",function(){})),x(te,Re,Ve,tt),x(te,Re,he,tt);var se=Re.selectAll("."+v.cn.scrollAreaClip).data(e.repeat,e.keyFun);se.enter().append("clipPath").classed(v.cn.scrollAreaClip,!0).attr("id",function(Je){return m(te,Je)});var ne=se.selectAll("."+v.cn.scrollAreaClipRect).data(e.repeat,e.keyFun);ne.enter().append("rect").classed(v.cn.scrollAreaClipRect,!0).attr("x",-v.overdrag).attr("y",-v.uplift).attr("fill","none"),ne.attr("width",function(Je){return Je.width+2*v.overdrag}).attr("height",function(Je){return Je.height+v.uplift});var Ce=nt.selectAll("."+v.cn.columnBoundary).data(e.repeat,e.keyFun);Ce.enter().append("g").classed(v.cn.columnBoundary,!0);var Ze=nt.selectAll("."+v.cn.columnBoundaryClippath).data(e.repeat,e.keyFun);Ze.enter().append("clipPath").classed(v.cn.columnBoundaryClippath,!0),Ze.attr("id",function(Je){return c(te,Je)});var rt=Ze.selectAll("."+v.cn.columnBoundaryRect).data(e.repeat,e.keyFun);rt.enter().append("rect").classed(v.cn.columnBoundaryRect,!0).attr("fill","none"),rt.attr("width",function(Je){return Je.columnWidth+2*f(Je)}).attr("height",function(Je){return Je.calcdata.height+2*f(Je)+v.uplift}).attr("x",function(Je){return-f(Je)}).attr("y",function(Je){return-f(Je)}),W(null,he,Re)};function f(ee){return Math.ceil(ee.calcdata.maxLineWidth/2)}function m(ee,te){return"clip"+ee._fullLayout._uid+"_scrollAreaBottomClip_"+te.key}function c(ee,te){return"clip"+ee._fullLayout._uid+"_columnBoundaryClippath_"+te.calcdata.key+"_"+te.specIndex}function T(ee){return[].concat.apply([],ee.map(function(te){return te})).map(function(te){return te.__data__})}function l(ee,te,pe){function we(nt){var tt=nt.rowBlocks;return Q(tt,tt.length-1)+(tt.length?V(tt[tt.length-1],1/0):1)}var Se=ee.selectAll("."+v.cn.scrollbarKit).data(e.repeat,e.keyFun);Se.enter().append("g").classed(v.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,v.goldenRatio*v.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+v.scrollbarWidth/2+v.scrollbarOffset;return a(tt,U(nt))});var Re=Se.selectAll("."+v.cn.scrollbar).data(e.repeat,e.keyFun);Re.enter().append("g").classed(v.cn.scrollbar,!0);var Pe=Re.selectAll("."+v.cn.scrollbarSlider).data(e.repeat,e.keyFun);Pe.enter().append("g").classed(v.cn.scrollbarSlider,!0),Pe.attr("transform",function(nt){return a(0,nt.scrollbarState.topY||0)});var je=Pe.selectAll("."+v.cn.scrollbarGlyph).data(e.repeat,e.keyFun);je.enter().append("line").classed(v.cn.scrollbarGlyph,!0).attr("stroke","black").attr("stroke-width",v.scrollbarWidth).attr("stroke-linecap","round").attr("y1",v.scrollbarWidth/2),je.attr("y2",function(nt){return nt.scrollbarState.barLength-v.scrollbarWidth/2}).attr("stroke-opacity",function(nt){return nt.columnDragInProgress||!nt.scrollbarState.barWiggleRoom||pe?0:.4}),je.transition().delay(0).duration(0),je.transition().delay(v.scrollbarHideDelay).duration(v.scrollbarHideDuration).attr("stroke-opacity",0);var at=Re.selectAll("."+v.cn.scrollbarCaptureZone).data(e.repeat,e.keyFun);at.enter().append("line").classed(v.cn.scrollbarCaptureZone,!0).attr("stroke","white").attr("stroke-opacity",.01).attr("stroke-width",v.scrollbarCaptureWidth).attr("stroke-linecap","butt").attr("y1",0).on("mousedown",function(nt){var tt=_.event.y,Ve=this.getBoundingClientRect(),he=nt.scrollbarState,se=tt-Ve.top,ne=_.scale.linear().domain([0,he.scrollableAreaHeight]).range([0,he.totalHeight]).clamp(!0);he.topY<=se&&se<=he.bottomY||$(te,ee,null,ne(se-he.barLength/2))(nt)}).call(_.behavior.drag().origin(function(nt){return _.event.stopPropagation(),nt.scrollbarState.scrollbarScrollInProgress=!0,nt}).on("drag",$(te,ee)).on("dragend",function(){})),at.attr("y2",function(nt){return nt.scrollbarState.scrollableAreaHeight}),te._context.staticPlot&&(je.remove(),at.remove())}function x(ee,te,pe,we){var Se=w(pe),Re=A(Se);d(Re);var Pe=E(Re);g(Pe);var je=b(Re),at=p(je);u(at),y(at,te,we,ee),X(Re)}function w(ee){var te=ee.selectAll("."+v.cn.columnCells).data(e.repeat,e.keyFun);return te.enter().append("g").classed(v.cn.columnCells,!0),te.exit().remove(),te}function A(ee){var te=ee.selectAll("."+v.cn.columnCell).data(s.splitToCells,function(pe){return pe.keyWithinBlock});return te.enter().append("g").classed(v.cn.columnCell,!0),te.exit().remove(),te}function E(ee){var te=ee.selectAll("."+v.cn.cellRect).data(e.repeat,function(pe){return pe.keyWithinBlock});return te.enter().append("rect").classed(v.cn.cellRect,!0),te}function p(ee){var te=ee.selectAll("."+v.cn.cellText).data(e.repeat,function(pe){return pe.keyWithinBlock});return te.enter().append("text").classed(v.cn.cellText,!0).style("cursor",function(){return"auto"}).on("mousedown",function(){_.event.stopPropagation()}),te}function b(ee){var te=ee.selectAll("."+v.cn.cellTextHolder).data(e.repeat,function(pe){return pe.keyWithinBlock});return te.enter().append("g").classed(v.cn.cellTextHolder,!0).style("shape-rendering","geometricPrecision"),te}function d(ee){ee.each(function(te,pe){var we=te.calcdata.cells.font,Se=te.column.specIndex,Re={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)};te.rowNumber=te.key,te.align=F(te.calcdata.cells.align,Se,pe),te.cellBorderWidth=F(te.calcdata.cells.line.width,Se,pe),te.font=Re})}function u(ee){ee.each(function(te){t.font(_.select(this),te.font)})}function g(ee){ee.attr("width",function(te){return te.column.columnWidth}).attr("stroke-width",function(te){return te.cellBorderWidth}).each(function(te){var pe=_.select(this);h.stroke(pe,F(te.calcdata.cells.line.color,te.column.specIndex,te.rowNumber)),h.fill(pe,F(te.calcdata.cells.fill.color,te.column.specIndex,te.rowNumber))})}function y(ee,te,pe,we){ee.text(function(Se){var Re=Se.column.specIndex,Pe=Se.rowNumber,je=Se.value,at=typeof je=="string",nt=at&&je.match(/
/i),tt=!at||nt;Se.mayHaveMarkup=at&&je.match(/[<&>]/);var Ve=D(je);Se.latex=Ve;var he=Ve?"":F(Se.calcdata.cells.prefix,Re,Pe)||"",se=Ve?"":F(Se.calcdata.cells.suffix,Re,Pe)||"",ne=Ve?null:F(Se.calcdata.cells.format,Re,Pe)||null,Ce=he+(ne?M(ne)(Se.value):Se.value)+se,Ze;Se.wrappingNeeded=!Se.wrapped&&!tt&&!Ve&&(Ze=P(Ce)),Se.cellHeightMayIncrease=nt||Ve||Se.mayHaveMarkup||(Ze===void 0?P(Ce):Ze),Se.needsConvertToTspans=Se.mayHaveMarkup||Se.wrappingNeeded||Se.latex;var rt;if(Se.wrappingNeeded){var Je=v.wrapSplitCharacter===" "?Ce.replace(/Se&&we.push(Re),Se+=at}return we}function W(ee,te,pe){var we=T(te)[0];if(we!==void 0){var Se=we.rowBlocks,Re=we.calcdata,Pe=Q(Se,Se.length),je=we.calcdata.groupHeight-U(we),at=Re.scrollY=Math.max(0,Math.min(Pe-je,Re.scrollY)),nt=B(Se,at,je);nt.length===1&&(nt[0]===Se.length-1?nt.unshift(nt[0]-1):nt.push(nt[0]+1)),nt[0]%2&&nt.reverse(),te.each(function(tt,Ve){tt.page=nt[Ve],tt.scrollY=at}),te.attr("transform",function(tt){var Ve=Q(tt.rowBlocks,tt.page)-tt.scrollY;return a(0,Ve)}),ee&&(ue(ee,pe,te,nt,we.prevPages,we,0),ue(ee,pe,te,nt,we.prevPages,we,1),l(pe,ee))}}function $(ee,te,pe,we){return function(Re){var Pe=Re.calcdata?Re.calcdata:Re,je=te.filter(function(Ve){return Pe.key===Ve.key}),at=pe||Pe.scrollbarState.dragMultiplier,nt=Pe.scrollY;Pe.scrollY=we===void 0?Pe.scrollY+at*_.event.dy:we;var tt=je.selectAll("."+v.cn.yColumn).selectAll("."+v.cn.columnBlock).filter(O);return W(ee,tt,je),Pe.scrollY===nt}}function ue(ee,te,pe,we,Se,Re,Pe){var je=we[Pe]!==Se[Pe];je&&(clearTimeout(Re.currentRepaint[Pe]),Re.currentRepaint[Pe]=setTimeout(function(){var at=pe.filter(function(nt,tt){return tt===Pe&&we[tt]!==Se[tt]});x(ee,te,at,pe),Se[Pe]=we[Pe]}))}function ce(ee,te,pe,we){return function(){var Re=_.select(te.parentNode);Re.each(function(Pe){var je=Pe.fragments;Re.selectAll("tspan.line").each(function(Ce,Ze){je[Ze].width=this.getComputedTextLength()});var at=je[je.length-1].width,nt=je.slice(0,-1),tt=[],Ve,he,se=0,ne=Pe.column.columnWidth-2*v.cellPad;for(Pe.value="";nt.length;)Ve=nt.shift(),he=Ve.width+at,se+he>ne&&(Pe.value+=tt.join(v.wrapSpacer)+v.lineBreaker,tt=[],se=0),tt.push(Ve.text),se+=he;se&&(Pe.value+=tt.join(v.wrapSpacer)),Pe.wrapped=!0}),Re.selectAll("tspan.line").remove(),y(Re.select("."+v.cn.cellText),pe,ee,we),_.select(te.parentNode.parentNode).call(X)}}function de(ee,te,pe,we,Se){return function(){if(!Se.settledY){var Pe=_.select(te.parentNode),je=ae(Se),at=Se.key-je.firstRowIndex,nt=je.rows[at].rowHeight,tt=Se.cellHeightMayIncrease?te.parentNode.getBoundingClientRect().height+2*v.cellPad:nt,Ve=Math.max(tt,nt),he=Ve-je.rows[at].rowHeight;he&&(je.rows[at].rowHeight=Ve,ee.selectAll("."+v.cn.columnCell).call(X),W(null,ee.filter(O),0),l(pe,we,!0)),Pe.attr("transform",function(){var se=this,ne=se.parentNode,Ce=ne.getBoundingClientRect(),Ze=_.select(se.parentNode).select("."+v.cn.cellRect).node().getBoundingClientRect(),rt=se.transform.baseVal.consolidate(),Je=Ze.top-Ce.top+(rt?rt.matrix.f:v.cellPad);return a(Y(Se,_.select(se.parentNode).select("."+v.cn.cellTextHolder).node().getBoundingClientRect().width),Je)}),Se.settledY=!0}}}function Y(ee,te){switch(ee.align){case"left":return v.cellPad;case"right":return ee.column.columnWidth-(te||0)-v.cellPad;case"center":return(ee.column.columnWidth-(te||0))/2;default:return v.cellPad}}function X(ee){ee.attr("transform",function(te){var pe=te.rowBlocks[0].auxiliaryBlocks.reduce(function(Pe,je){return Pe+V(je,1/0)},0),we=ae(te),Se=V(we,te.key),Re=Se+pe;return a(0,Re)}).selectAll("."+v.cn.cellRect).attr("height",function(te){return j(ae(te),te.key).rowHeight})}function Q(ee,te){for(var pe=0,we=te-1;we>=0;we--)pe+=le(ee[we]);return pe}function V(ee,te){for(var pe=0,we=0;weM.length&&(S=S.slice(0,M.length)):S=[],t=0;t90&&(m-=180,i=-i),{angle:m,flip:i,p:_.c2p(e,S,M),offsetMultplier:n}}}}),jG=He({"src/traces/carpet/plot.js"(Z,q){"use strict";var v=Vn(),_=as(),S=Z6(),M=Y6(),e=UG(),t=su(),r=sa(),o=r.strRotate,a=r.strTranslate,i=uh();q.exports=function(x,w,A,E){var p=x._context.staticPlot,b=w.xaxis,d=w.yaxis,u=x._fullLayout,g=u._clips;r.makeTraceGroups(E,A,"trace").each(function(y){var D=v.select(this),P=y[0],z=P.trace,F=z.aaxis,N=z.baxis,O=r.ensureSingle(D,"g","minorlayer"),L=r.ensureSingle(D,"g","majorlayer"),U=r.ensureSingle(D,"g","boundarylayer"),B=r.ensureSingle(D,"g","labellayer");D.style("opacity",z.opacity),s(b,d,L,F,"a",F._gridlines,!0,p),s(b,d,L,N,"b",N._gridlines,!0,p),s(b,d,O,F,"a",F._minorgridlines,!0,p),s(b,d,O,N,"b",N._minorgridlines,!0,p),s(b,d,U,F,"a-boundary",F._boundarylines,p),s(b,d,U,N,"b-boundary",N._boundarylines,p);var W=h(x,b,d,z,P,B,F._labels,"a-label"),$=h(x,b,d,z,P,B,N._labels,"b-label");f(x,B,z,P,b,d,W,$),n(z,P,g,b,d)})};function n(l,x,w,A,E){var p,b,d,u,g=w.select("#"+l._clipPathId);g.size()||(g=w.append("clipPath").classed("carpetclip",!0));var y=r.ensureSingle(g,"path","carpetboundary"),D=x.clipsegments,P=[];for(u=0;u0?"start":"end","data-notex":1}).call(_.font,D.font).text(D.text).call(t.convertToTspans,l),L=_.bBox(this);O.attr("transform",a(z.p[0],z.p[1])+o(z.angle)+a(D.axis.labelpadding*N,L.height*.3)),g=Math.max(g,L.width+D.axis.labelpadding)}),u.exit().remove(),y.maxExtent=g,y}function f(l,x,w,A,E,p,b,d){var u,g,y,D,P=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*(P+z),g=F,y=w.ab2xy(u,g,!0),D=w.dxyda_rough(u,g),b.angle===void 0&&r.extendFlat(b,e(w,E,p,y,w.dxydb_rough(u,g))),T(l,x,w,A,y,D,w.aaxis,E,p,b,"a-title"),u=P,g=.5*(F+N),y=w.ab2xy(u,g,!0),D=w.dxydb_rough(u,g),d.angle===void 0&&r.extendFlat(d,e(w,E,p,y,w.dxyda_rough(u,g))),T(l,x,w,A,y,D,w.baxis,E,p,d,"b-title")}var m=i.LINE_SPACING,c=(1-i.MID_SHIFT)/m+1;function T(l,x,w,A,E,p,b,d,u,g,y){var D=[];b.title.text&&D.push(b.title.text);var P=x.selectAll("text."+y).data(D),z=g.maxExtent;P.enter().append("text").classed(y,!0),P.each(function(){var F=e(w,d,u,E,p);["start","both"].indexOf(b.showticklabels)===-1&&(z=0);var N=b.title.font.size;z+=N+b.title.offset;var O=g.angle+(g.flip<0?180:0),L=(O-F.angle+450)%360,U=L>90&&L<270,B=v.select(this);B.text(b.title.text).call(t.convertToTspans,l),U&&(z=(-t.lineCount(B)+c)*m*N-z),B.attr("transform",a(F.p[0],F.p[1])+o(F.angle)+a(0,z)).attr("text-anchor","middle").call(_.font,b.title.font)}),P.exit().remove()}}}),qG=He({"src/traces/carpet/cheater_basis.js"(Z,q){"use strict";var v=sa().isArrayOrTypedArray;q.exports=function(_,S,M){var e,t,r,o,a,i,n=[],s=v(_)?_.length:_,h=v(S)?S.length:S,f=v(_)?_:null,m=v(S)?S:null;f&&(r=(f.length-1)/(f[f.length-1]-f[0])/(s-1)),m&&(o=(m.length-1)/(m[m.length-1]-m[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&&(V=M.dxydi([],W-1,ue,0,ce),ee.push(de[0]+V[0]/3),te.push(de[1]+V[1]/3),le=M.dxydi([],W-1,ue,1,ce),ee.push(Q[0]-le[0]/3),te.push(Q[1]-le[1]/3)),ee.push(Q[0]),te.push(Q[1]),de=Q;else for(W=M.a2i(B),Y=Math.floor(Math.max(0,Math.min(F-2,W))),X=W-Y,pe.length=F,pe.crossLength=N,pe.xy=function(we){return M.evalxy([],W,we)},pe.dxy=function(we,Se){return M.dxydj([],Y,we,X,Se)},$=0;$0&&(ae=M.dxydj([],Y,$-1,X,0),ee.push(de[0]+ae[0]/3),te.push(de[1]+ae[1]/3),j=M.dxydj([],Y,$-1,X,1),ee.push(Q[0]-j[0]/3),te.push(Q[1]-j[1]/3)),ee.push(Q[0]),te.push(Q[1]),de=Q;return pe.axisLetter=e,pe.axis=E,pe.crossAxis=g,pe.value=B,pe.constvar=t,pe.index=f,pe.x=ee,pe.y=te,pe.smoothing=g.smoothing,pe}function U(B){var W,$,ue,ce,de,Y=[],X=[],Q={};if(Q.length=A.length,Q.crossLength=u.length,e==="b")for(ue=Math.max(0,Math.min(N-2,B)),de=Math.min(1,Math.max(0,B-ue)),Q.xy=function(V){return M.evalxy([],V,B)},Q.dxy=function(V,le){return M.dxydi([],V,ue,le,de)},W=0;WA.length-1)&&p.push(_(U(o),{color:E.gridcolor,width:E.gridwidth,dash:E.griddash}));for(f=s;fA.length-1)&&!(T<0||T>A.length-1))for(l=A[a],x=A[T],r=0;rA[A.length-1])&&b.push(_(L(c),{color:E.minorgridcolor,width:E.minorgridwidth,dash:E.minorgriddash})));E.startline&&d.push(_(U(0),{color:E.startlinecolor,width:E.startlinewidth})),E.endline&&d.push(_(U(A.length-1),{color:E.endlinecolor,width:E.endlinewidth}))}else{for(i=5e-15,n=[Math.floor((A[A.length-1]-E.tick0)/E.dtick*(1+i)),Math.ceil((A[0]-E.tick0)/E.dtick/(1+i))].sort(function(B,W){return B-W}),s=n[0],h=n[1],f=s;f<=h;f++)m=E.tick0+E.dtick*f,p.push(_(L(m),{color:E.gridcolor,width:E.gridwidth,dash:E.griddash}));for(f=s-1;fA[A.length-1])&&b.push(_(L(c),{color:E.minorgridcolor,width:E.minorgridwidth,dash:E.minorgriddash}));E.startline&&d.push(_(L(A[0]),{color:E.startlinecolor,width:E.startlinewidth})),E.endline&&d.push(_(L(A[A.length-1]),{color:E.endlinecolor,width:E.endlinewidth}))}}}}),HG=He({"src/traces/carpet/calc_labels.js"(Z,q){"use strict";var v=Wo(),_=rs().extendFlat;q.exports=function(M,e){var t,r,o,a,i,n=e._labels=[],s=e._gridlines;for(t=0;t=0;t--)r[s-t]=_[h][t],o[s-t]=S[h][t];for(a.push({x:r,y:o,bicubic:i}),t=h,r=[],o=[];t>=0;t--)r[h-t]=_[t][0],o[h-t]=S[t][0];return a.push({x:r,y:o,bicubic:n}),a}}}),XG=He({"src/traces/carpet/smooth_fill_2d_array.js"(Z,q){"use strict";var v=sa();q.exports=function(S,M,e){var t,r,o,a=[],i=[],n=S[0].length,s=S.length;function h($,ue){var ce=0,de,Y=0;return $>0&&(de=S[ue][$-1])!==void 0&&(Y++,ce+=de),$0&&(de=S[ue-1][$])!==void 0&&(Y++,ce+=de),ue0&&r0&&tu);return v.log("Smoother converged to",g,"after",D,"iterations"),S}}}),ZG=He({"src/traces/carpet/constants.js"(Z,q){"use strict";q.exports={RELATIVE_CULL_TOLERANCE:1e-6}}}),YG=He({"src/traces/carpet/catmull_rom.js"(Z,q){"use strict";var v=.5;q.exports=function(S,M,e,t){var r=S[0]-M[0],o=S[1]-M[1],a=e[0]-M[0],i=e[1]-M[1],n=Math.pow(r*r+o*o,v/2),s=Math.pow(a*a+i*i,v/2),h=(s*s*r-n*n*a)*t,f=(s*s*o-n*n*i)*t,m=s*(n+s)*3,c=n*(n+s)*3;return[[M[0]+(m&&h/m),M[1]+(m&&f/m)],[M[0]-(c&&h/c),M[1]-(c&&f/c)]]}}}),KG=He({"src/traces/carpet/compute_control_points.js"(Z,q){"use strict";var v=YG(),_=sa().ensureArray;function S(M,e,t){var r=-.5*t[0]+1.5*e[0],o=-.5*t[1]+1.5*e[1];return[(2*r+M[0])/3,(2*o+M[1])/3]}q.exports=function(e,t,r,o,a,i){var n,s,h,f,m,c,T,l,x,w,A=r[0].length,E=r.length,p=a?3*A-2:A,b=i?3*E-2:E;for(e=_(e,b),t=_(t,b),h=0;hm&&pT&&bc||bl},o.setScale=function(){var p=o._x,b=o._y,d=S(o._xctrl,o._yctrl,p,b,h.smoothing,f.smoothing);o._xctrl=d[0],o._yctrl=d[1],o.evalxy=M([o._xctrl,o._yctrl],n,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(p){var b=Math.max(0,Math.floor(p[0]),n-2),d=p[0]-b;return(1-d)*a[b]+d*a[b+1]},o.j2b=function(p){var b=Math.max(0,Math.floor(p[1]),n-2),d=p[1]-b;return(1-d)*i[b]+d*i[b+1]},o.ij2ab=function(p){return[o.i2a(p[0]),o.j2b(p[1])]},o.a2i=function(p){var b=Math.max(0,Math.min(_(p,a),n-2)),d=a[b],u=a[b+1];return Math.max(0,Math.min(n-1,b+(p-d)/(u-d)))},o.b2j=function(p){var b=Math.max(0,Math.min(_(p,i),s-2)),d=i[b],u=i[b+1];return Math.max(0,Math.min(s-1,b+(p-d)/(u-d)))},o.ab2ij=function(p){return[o.a2i(p[0]),o.b2j(p[1])]},o.i2c=function(p,b){return o.evalxy([],p,b)},o.ab2xy=function(p,b,d){if(!d&&(pa[n-1]|bi[s-1]))return[!1,!1];var u=o.a2i(p),g=o.b2j(b),y=o.evalxy([],u,g);if(d){var D=0,P=0,z=[],F,N,O,L;pa[n-1]?(F=n-2,N=1,D=(p-a[n-1])/(a[n-1]-a[n-2])):(F=Math.max(0,Math.min(n-2,Math.floor(u))),N=u-F),bi[s-1]?(O=s-2,L=1,P=(b-i[s-1])/(i[s-1]-i[s-2])):(O=Math.max(0,Math.min(s-2,Math.floor(g))),L=g-O),D&&(o.dxydi(z,F,O,N,L),y[0]+=z[0]*D,y[1]+=z[1]*D),P&&(o.dxydj(z,F,O,N,L),y[0]+=z[0]*P,y[1]+=z[1]*P)}return y},o.c2p=function(p,b,d){return[b.c2p(p[0]),d.c2p(p[1])]},o.p2x=function(p,b,d){return[b.p2c(p[0]),d.p2c(p[1])]},o.dadi=function(p){var b=Math.max(0,Math.min(a.length-2,p));return a[b+1]-a[b]},o.dbdj=function(p){var b=Math.max(0,Math.min(i.length-2,p));return i[b+1]-i[b]},o.dxyda=function(p,b,d,u){var g=o.dxydi(null,p,b,d,u),y=o.dadi(p,d);return[g[0]/y,g[1]/y]},o.dxydb=function(p,b,d,u){var g=o.dxydj(null,p,b,d,u),y=o.dbdj(b,u);return[g[0]/y,g[1]/y]},o.dxyda_rough=function(p,b,d){var u=x*(d||.1),g=o.ab2xy(p+u,b,!0),y=o.ab2xy(p-u,b,!0);return[(g[0]-y[0])*.5/u,(g[1]-y[1])*.5/u]},o.dxydb_rough=function(p,b,d){var u=w*(d||.1),g=o.ab2xy(p,b+u,!0),y=o.ab2xy(p,b-u,!0);return[(g[0]-y[0])*.5/u,(g[1]-y[1])*.5/u]},o.dpdx=function(p){return p._m},o.dpdy=function(p){return p._m}}}}),tH=He({"src/traces/carpet/calc.js"(Z,q){"use strict";var v=Wo(),_=sa().isArray1D,S=qG(),M=VG(),e=GG(),t=HG(),r=WG(),o=Y2(),a=XG(),i=Z2(),n=eH();q.exports=function(h,f){var m=v.getFromId(h,f.xaxis),c=v.getFromId(h,f.yaxis),T=f.aaxis,l=f.baxis,x=f.x,w=f.y,A=[];x&&_(x)&&A.push("x"),w&&_(w)&&A.push("y"),A.length&&i(f,T,l,"a","b",A);var E=f._a=f._a||f.a,p=f._b=f._b||f.b;x=f._x||f.x,w=f._y||f.y;var b={};if(f._cheater){var d=T.cheatertype==="index"?E.length:E,u=l.cheatertype==="index"?p.length:p;x=S(d,u,f.cheaterslope)}f._x=x=o(x),f._y=w=o(w),a(x,E,p),a(w,E,p),n(f),f.setScale();var g=M(x),y=M(w),D=.5*(g[1]-g[0]),P=.5*(g[1]+g[0]),z=.5*(y[1]-y[0]),F=.5*(y[1]+y[0]),N=1.3;return g=[P-D*N,P+D*N],y=[F-z*N,F+z*N],f._extremes[m._id]=v.findExtremes(m,g,{padded:!0}),f._extremes[c._id]=v.findExtremes(c,y,{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=x,b.y=w,b.a=E,b.b=p,[b]}}}),rH=He({"src/traces/carpet/index.js"(Z,q){"use strict";q.exports={attributes:PT(),supplyDefaults:NG(),plot:jG(),calc:tH(),animatable:!0,isContainer:!0,moduleType:"trace",name:"carpet",basePlotModule:Kf(),categories:["cartesian","svg","carpet","carpetAxis","notLegendIsolatable","noMultiCategory","noHover","noSortingByValue"],meta:{}}}}),aH=He({"lib/carpet.js"(Z,q){"use strict";q.exports=rH()}}),K6=He({"src/traces/scattercarpet/attributes.js"(Z,q){"use strict";var v=$d(),_=af(),S=au(),{hovertemplateAttrs:M,texttemplateAttrs:e,templatefallbackAttrs:t}=$l(),r=ku(),o=rs().extendFlat,a=_.marker,i=_.line,n=a.line;q.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:o({},_.mode,{dflt:"markers"}),text:o({},_.text,{}),texttemplate:e({editType:"plot"},{keys:["a","b","text"]}),texttemplatefallback:t({editType:"plot"}),hovertext:o({},_.hovertext,{}),line:{color:i.color,width:i.width,dash:i.dash,backoff:i.backoff,shape:o({},i.shape,{values:["linear","spline"]}),smoothing:i.smoothing,editType:"calc"},connectgaps:_.connectgaps,fill:o({},_.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:v(),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:n.width,dash:n.dash,editType:"calc"},r("marker.line")),gradient:a.gradient,editType:"calc"},r("marker")),textfont:_.textfont,textposition:_.textposition,selected:_.selected,unselected:_.unselected,hoverinfo:o({},S.hoverinfo,{flags:["a","b","text","name"]}),hoveron:_.hoveron,hovertemplate:M(),hovertemplatefallback:t(),zorder:_.zorder}}}),iH=He({"src/traces/scattercarpet/defaults.js"(Z,q){"use strict";var v=sa(),_=Tv(),S=Fu(),M=md(),e=Dd(),t=o1(),r=zd(),o=ev(),a=K6();q.exports=function(n,s,h,f){function m(E,p){return v.coerce(n,s,a,E,p)}m("carpet"),s.xaxis="x",s.yaxis="y";var c=m("a"),T=m("b"),l=Math.min(c.length,T.length);if(!l){s.visible=!1;return}s._length=l,m("text"),m("texttemplate"),m("texttemplatefallback"),m("hovertext");var x=l<_.PTS_LINESONLY?"lines+markers":"lines";m("mode",x),S.hasMarkers(s)&&M(n,s,h,f,m,{gradient:!0}),S.hasLines(s)&&(e(n,s,h,f,m,{backoff:!0}),t(n,s,m),m("connectgaps")),S.hasText(s)&&r(n,s,f,m);var w=[];(S.hasMarkers(s)||S.hasText(s))&&(m("marker.maxdisplayed"),w.push("points")),m("fill"),s.fill!=="none"&&(o(n,s,h,m),S.hasLines(s)||t(n,s,m)),(s.fill==="tonext"||s.fill==="toself")&&w.push("fills");var A=m("hoveron",w.join("+")||"points");A!=="fills"&&(m("hovertemplate"),m("hovertemplatefallback")),m("zorder"),v.coerceSelectionMarkerOpacity(s,m)}}}),nH=He({"src/traces/scattercarpet/format_labels.js"(Z,q){"use strict";q.exports=function(_,S){var M={},e=S._carpet,t=e.ab2ij([_.a,_.b]),r=Math.floor(t[0]),o=t[0]-r,a=Math.floor(t[1]),i=t[1]-a,n=e.evalxy([],r,a,o,i);return M.yLabel=n[1].toFixed(3),M}}}),IT=He({"src/traces/carpet/lookup_carpetid.js"(Z,q){"use strict";q.exports=function(v,_){for(var S=v._fullData.length,M,e=0;e0?b=E.labelprefix.replace(/ = $/,""):b=E._hovertitle,l.push(b+": "+p.toFixed(3)+E.labelsuffix)}if(!m.hovertemplate){var w=f.hi||m.hoverinfo,A=w.split("+");A.indexOf("all")!==-1&&(A=["a","b","text"]),A.indexOf("a")!==-1&&x(c.aaxis,f.a),A.indexOf("b")!==-1&&x(c.baxis,f.b),l.push("y: "+a.yLabel),A.indexOf("text")!==-1&&_(f,m,l),a.extraText=l.join("
")}return o}}}),uH=He({"src/traces/scattercarpet/event_data.js"(Z,q){"use strict";q.exports=function(_,S,M,e,t){var r=e[t];return _.a=r.a,_.b=r.b,_.y=r.y,_}}}),cH=He({"src/traces/scattercarpet/index.js"(Z,q){"use strict";q.exports={attributes:K6(),supplyDefaults:iH(),colorbar:dp(),formatLabels:nH(),calc:oH(),plot:sH(),style:Qp().style,styleOnSelect:Qp().styleOnSelect,hoverPoints:lH(),selectPoints:c1(),eventData:uH(),moduleType:"trace",name:"scattercarpet",basePlotModule:Kf(),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}}}),fH=He({"lib/scattercarpet.js"(Z,q){"use strict";q.exports=cH()}}),J6=He({"src/traces/contourcarpet/attributes.js"(Z,q){"use strict";var v=p1(),_=V_(),S=ku(),M=rs().extendFlat,e=_.contours;q.exports=M({carpet:{valType:"string",editType:"calc"},z:v.z,a:v.x,a0:v.x0,da:v.dx,b:v.y,b0:v.y0,db:v.dy,text:v.text,hovertext:v.hovertext,transpose:v.transpose,atype:v.xtype,btype:v.ytype,fillcolor:_.fillcolor,autocontour:_.autocontour,ncontours:_.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:_.line.color,width:_.line.width,dash:_.line.dash,smoothing:_.line.smoothing,editType:"plot"},zorder:_.zorder},S("",{cLetter:"z",autoColorDflt:!1}))}}),$6=He({"src/traces/contourcarpet/defaults.js"(Z,q){"use strict";var v=sa(),_=X2(),S=J6(),M=TS(),e=s3(),t=l3();q.exports=function(o,a,i,n){function s(c,T){return v.coerce(o,a,S,c,T)}function h(c){return v.coerce2(o,a,S,c)}if(s("carpet"),o.a&&o.b){var f=_(o,a,s,n,"a","b");if(!f){a.visible=!1;return}s("text");var m=s("contours.type")==="constraint";m?M(o,a,s,n,i,{hasHover:!1}):(e(o,a,s,h),t(o,a,s,n,{hasHover:!1}))}else a._defaultColor=i,a._length=null;s("zorder")}}}),hH=He({"src/traces/contourcarpet/calc.js"(Z,q){"use strict";var v=Tp(),_=sa(),S=Z2(),M=Y2(),e=K2(),t=J2(),r=sS(),o=$6(),a=IT(),i=dS();q.exports=function(h,f){var m=f._carpetTrace=a(h,f);if(!(!m||!m.visible||m.visible==="legendonly")){if(!f.a||!f.b){var c=h.data[m.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=n(h,f);return i(f,f._z),l}};function n(s,h){var f=h._carpetTrace,m=f.aaxis,c=f.baxis,T,l,x,w,A,E,p;m._minDtick=0,c._minDtick=0,_.isArray1D(h.z)&&S(h,m,c,"a","b",["z"]),T=h._a=h._a||h.a,w=h._b=h._b||h.b,T=T?m.makeCalcdata(h,"_a"):[],w=w?c.makeCalcdata(h,"_b"):[],l=h.a0||0,x=h.da||1,A=h.b0||0,E=h.db||1,p=h._z=M(h._z||h.z,h.transpose),h._emptypoints=t(p),e(p,h._emptypoints);var b=_.maxRowLength(p),d=h.xtype==="scaled"?"":T,u=r(h,d,l,x,b,m),g=h.ytype==="scaled"?"":w,y=r(h,g,A,E,p.length,c),D={a:u,b:y,z:p};return h.contours.type==="levels"&&h.contours.coloring!=="none"&&v(s,h,{vals:p,containerStr:"",cLetter:"z"}),[D]}}}),pH=He({"src/traces/carpet/axis_aligned_line.js"(Z,q){"use strict";var v=sa().isArrayOrTypedArray;q.exports=function(_,S,M,e){var t,r,o,a,i,n,s,h,f,m,c,T,l,x=v(M)?"a":"b",w=x==="a"?_.aaxis:_.baxis,A=w.smoothing,E=x==="a"?_.a2i:_.b2j,p=x==="a"?M:e,b=x==="a"?e:M,d=x==="a"?S.a.length:S.b.length,u=x==="a"?S.b.length:S.a.length,g=Math.floor(x==="a"?_.b2j(b):_.a2i(b)),y=x==="a"?function(ue){return _.evalxy([],ue,g)}:function(ue){return _.evalxy([],g,ue)};A&&(o=Math.max(0,Math.min(u-2,g)),a=g-o,r=x==="a"?function(ue,ce){return _.dxydi([],ue,o,ce,a)}:function(ue,ce){return _.dxydj([],o,ue,a,ce)});var D=E(p[0]),P=E(p[1]),z=D0?Math.floor:Math.ceil,O=z>0?Math.ceil:Math.floor,L=z>0?Math.min:Math.max,U=z>0?Math.max:Math.min,B=N(D+F),W=O(P-F);s=y(D);var $=[[s]];for(t=B;t*z=0;pe--)j=U.clipsegments[pe],ee=_([],j.x,D.c2p),te=_([],j.y,P.c2p),ee.reverse(),te.reverse(),we.push(S(ee,te,j.bicubic));var Se="M"+we.join("L")+"Z";A(F,U.clipsegments,D,P,ce,Y),E(O,F,D,P,ae,Q,X,L,U,Y,Se),c(F,ue,d,N,$,u,L),M.setClipUrl(F,L._clipPathId,d)})};function m(b,d){var u,g,y,D,P,z,F,N,O;for(u=0;uue&&(g.max=ue),g.len=g.max-g.min}function l(b,d,u){var g=b.getPointAtLength(d),y=b.getPointAtLength(u),D=y.x-g.x,P=y.y-g.y,z=Math.sqrt(D*D+P*P);return[D/z,P/z]}function x(b){var d=Math.sqrt(b[0]*b[0]+b[1]*b[1]);return[b[0]/d,b[1]/d]}function w(b,d){var u=Math.abs(b[0]*d[0]+b[1]*d[1]),g=Math.sqrt(1-u*u);return g/u}function A(b,d,u,g,y,D){var P,z,F,N,O=e.ensureSingle(b,"g","contourbg"),L=O.selectAll("path").data(D==="fill"&&!y?[0]:[]);L.enter().append("path"),L.exit().remove();var U=[];for(N=0;N=0&&(B=ee,$=ue):Math.abs(U[1]-B[1])=0&&(B=ee,$=ue):e.log("endpt to newendpt is not vert. or horz.",U,B,ee)}if($>=0)break;N+=ae(U,B),U=B}if($===d.edgepaths.length){e.log("unclosed perimeter path");break}F=$,L=O.indexOf(F)===-1,L&&(F=O[0],N+=ae(U,B)+"Z",U=null)}for(F=0;Fp):E=z>y,p=z;var F=m(y,D,P,z);F.pos=g,F.yc=(y+z)/2,F.i=u,F.dir=E?"increasing":"decreasing",F.x=F.pos,F.y=[P,D],b&&(F.orig_p=s[u]),w&&(F.tx=n.text[u]),A&&(F.htx=n.hovertext[u]),d.push(F)}else d.push({pos:g,empty:!0})}return n._extremes[f._id]=S.findExtremes(f,v.concat(l,T),{padded:!0}),d.length&&(d[0].t={labels:{open:_(i,"open:")+" ",high:_(i,"high:")+" ",low:_(i,"low:")+" ",close:_(i,"close:")+" "}}),d}function a(i,n,s){var h=s._minDiff;if(!h){var f=i._fullData,m=[];h=1/0;var c;for(c=0;c"+x.labels[g]+v.hoverLabelText(T,y,l.yhoverformat)):(P=_.extendFlat({},A),P.y0=P.y1=D,P.yLabelVal=y,P.yLabel=x.labels[g]+v.hoverLabelText(T,y,l.yhoverformat),P.name="",w.push(P),d[y]=P)}return w}function n(s,h,f,m){var c=s.cd,T=s.ya,l=c[0].trace,x=c[0].t,w=a(s,h,f,m);if(!w)return[];var A=w.index,E=c[A],p=w.index=E.i,b=E.dir;function d(F){return x.labels[F]+v.hoverLabelText(T,l[F][p],l.yhoverformat)}var u=E.hi||l.hoverinfo||"",g=u.split("+"),y=u==="all",D=y||g.indexOf("y")!==-1,P=y||g.indexOf("text")!==-1,z=D?[d("open"),d("high"),d("low"),d("close")+" "+r[b]]:[];return P&&e(E,l,z),w.extraText=z.join("
"),w.y0=w.y1=T.c2p(E.yc,!0),[w]}q.exports={hoverPoints:o,hoverSplit:i,hoverOnPoints:n}}}),rk=He({"src/traces/ohlc/select.js"(Z,q){"use strict";q.exports=function(_,S){var M=_.cd,e=_.xaxis,t=_.yaxis,r=[],o,a=M[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 x=a.c2l(l)-s;return(T(x)?x:0)+c},a.g2c=function(l){return a.l2c(l+s-c)},a.g2p=function(l){return l*m},a.c2p=function(l){return a.g2p(a.c2g(l))}}}function t(a,i){return i==="degrees"?S(a):a}function r(a,i){return i==="degrees"?M(a):a}function o(a,i){var n=a.type;if(n==="linear"){var s=a.d2c,h=a.c2d;a.d2c=function(f,m){return t(s(f),m)},a.c2d=function(f,m){return h(r(f,m))}}a.makeCalcdata=function(f,m){var c=f[m],T=f._length,l,x,w=function(d){return a.d2c(d,f.thetaunit)};if(c)for(l=new Array(T),x=0;x0?d:1/0},E=S(w,A),p=v.mod(E+1,w.length);return[w[E],w[p]]}function m(x){return Math.abs(x)>1e-10?x:0}function c(x,w,A){w=w||0,A=A||0;for(var E=x.length,p=new Array(E),b=0;b0?1:0}function _(r){var o=r[0],a=r[1];if(!isFinite(o)||!isFinite(a))return[1,0];var i=(o+1)*(o+1)+a*a;return[(o*o+a*a-1)/i,2*a/i]}function S(r,o){var a=o[0],i=o[1];return[a*r.radius+r.cx,-i*r.radius+r.cy]}function M(r,o){return o*r.radius}function e(r,o,a,i){var n=S(r,_([a,o])),s=n[0],h=n[1],f=S(r,_([i,o])),m=f[0],c=f[1];if(o===0)return["M"+s+","+h,"L"+m+","+c].join(" ");var T=M(r,1/Math.abs(o));return["M"+s+","+h,"A"+T+","+T+" 0 0,"+(o<0?1:0)+" "+m+","+c].join(" ")}function t(r,o,a,i){var n=M(r,1/(o+1)),s=S(r,_([o,a])),h=s[0],f=s[1],m=S(r,_([o,i])),c=m[0],T=m[1];if(v(a)!==v(i)){var l=S(r,_([o,0])),x=l[0],w=l[1];return["M"+h+","+f,"A"+n+","+n+" 0 0,"+(0at?(nt=te,tt=te*at,se=(pe-tt)/V.h/2,Ve=[j[0],j[1]],he=[ee[0]+se,ee[1]-se]):(nt=pe/at,tt=pe,se=(te-nt)/V.w/2,Ve=[j[0]+se,j[1]-se],he=[ee[0],ee[1]]),X.xLength2=nt,X.yLength2=tt,X.xDomain2=Ve,X.yDomain2=he;var ne=X.xOffset2=V.l+V.w*Ve[0],Ce=X.yOffset2=V.t+V.h*(1-he[1]),Ze=X.radius=nt/Re,rt=X.innerRadius=X.getHole(Y)*Ze,Je=X.cx=ne-Ze*Se[0],St=X.cy=Ce+Ze*Se[3],kt=X.cxx=Je-ne,Bt=X.cyy=St-Ce,Vt=le.side,Ar;Vt==="counterclockwise"?(Ar=Vt,Vt="top"):Vt==="clockwise"&&(Ar=Vt,Vt="bottom"),X.radialAxis=X.mockAxis(de,Y,le,{_id:"x",side:Vt,_trueSide:Ar,domain:[rt/V.w,Ze/V.w]}),X.angularAxis=X.mockAxis(de,Y,ae,{side:"right",domain:[0,Math.PI],autorange:!1}),X.doAutoRange(de,Y),X.updateAngularAxis(de,Y),X.updateRadialAxis(de,Y),X.updateRadialAxisTitle(de,Y),X.xaxis=X.mockCartesianAxis(de,Y,{_id:"x",domain:Ve}),X.yaxis=X.mockCartesianAxis(de,Y,{_id:"y",domain:he});var vr=X.pathSubplot();X.clipPaths.forTraces.select("path").attr("d",vr).attr("transform",t(kt,Bt)),Q.frontplot.attr("transform",t(ne,Ce)).call(o.setClipUrl,X._hasClipOnAxisFalse?null:X.clipIds.forTraces,X.gd),Q.bg.attr("d",vr).attr("transform",t(Je,St)).call(r.fill,Y.bgcolor)},B.mockAxis=function(de,Y,X,Q){var V=M.extendFlat({},X,Q);return s(V,Y,de),V},B.mockCartesianAxis=function(de,Y,X){var Q=this,V=Q.isSmith,le=X._id,ae=M.extendFlat({type:"linear"},X);n(ae,de);var j={x:[0,2],y:[1,3]};return ae.setRange=function(){var ee=Q.sectorBBox,te=j[le],pe=Q.radialAxis._rl,we=(pe[1]-pe[0])/(1-Q.getHole(Y));ae.range=[ee[te[0]]*we,ee[te[1]]*we]},ae.isPtWithinRange=le==="x"&&!V?function(ee){return Q.isPtInside(ee)}:function(){return!0},ae.setRange(),ae.setScale(),ae},B.doAutoRange=function(de,Y){var X=this,Q=X.gd,V=X.radialAxis,le=X.getRadial(Y);h(Q,V);var ae=V.range;if(le.range=ae.slice(),le._input.range=ae.slice(),V._rl=[V.r2l(ae[0],null,"gregorian"),V.r2l(ae[1],null,"gregorian")],V.minallowed!==void 0){var j=V.r2l(V.minallowed);V._rl[0]>V._rl[1]?V._rl[1]=Math.max(V._rl[1],j):V._rl[0]=Math.max(V._rl[0],j)}if(V.maxallowed!==void 0){var ee=V.r2l(V.maxallowed);V._rl[0]90&&pe<=270&&(we.tickangle=180);var Pe=Re?function(Ze){var rt=z(X,y([Ze.x,0]));return t(rt[0]-j,rt[1]-ee)}:function(Ze){return t(we.l2p(Ze.x)+ae,0)},je=Re?function(Ze){return P(X,Ze.x,-1/0,1/0)}:function(Ze){return X.pathArc(we.r2p(Ze.x)+ae)},at=W(te);if(X.radialTickLayout!==at&&(V["radial-axis"].selectAll(".xtick").remove(),X.radialTickLayout=at),Se){we.setScale();var nt=0,tt=Re?(we.tickvals||[]).filter(function(Ze){return Ze>=0}).map(function(Ze){return i.tickText(we,Ze,!0,!1)}):i.calcTicks(we),Ve=Re?tt:i.clipEnds(we,tt),he=i.getTickSigns(we)[2];Re&&((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)),i.drawTicks(Q,we,{vals:tt,layer:V["radial-axis"],path:i.makeTickPath(we,0,he),transFn:Pe,crisp:!1}),i.drawGrid(Q,we,{vals:Ve,layer:V["radial-grid"],path:je,transFn:M.noop,crisp:!1}),i.drawLabels(Q,we,{vals:tt,layer:V["radial-axis"],transFn:Pe,labelFns:i.makeLabelFns(we,nt)})}var se=X.radialAxisAngle=X.vangles?L(ue(O(te.angle),X.vangles)):te.angle,ne=t(j,ee),Ce=ne+e(-se);ce(V["radial-axis"],Se&&(te.showticklabels||te.ticks),{transform:Ce}),ce(V["radial-grid"],Se&&te.showgrid,{transform:Re?"":ne}),ce(V["radial-line"].select("line"),Se&&te.showline,{x1:Re?-le:ae,y1:0,x2:le,y2:0,transform:Ce}).attr("stroke-width",te.linewidth).call(r.stroke,te.linecolor)},B.updateRadialAxisTitle=function(de,Y,X){if(!this.isSmith){var Q=this,V=Q.gd,le=Q.radius,ae=Q.cx,j=Q.cy,ee=Q.getRadial(Y),te=Q.id+"title",pe=0;if(ee.title){var we=o.bBox(Q.layers["radial-axis"].node()).height,Se=ee.title.font.size,Re=ee.side;pe=Re==="top"?Se:Re==="counterclockwise"?-(we+Se*.4):we+Se*.8}var Pe=X!==void 0?X:Q.radialAxisAngle,je=O(Pe),at=Math.cos(je),nt=Math.sin(je),tt=ae+le/2*at+pe*nt,Ve=j-le/2*nt+pe*at;Q.layers["radial-axis-title"]=T.draw(V,te,{propContainer:ee,propName:Q.id+".radialaxis.title.text",placeholder:F(V,"Click to enter radial axis title"),attributes:{x:tt,y:Ve,"text-anchor":"middle"},transform:{rotate:-Pe}})}},B.updateAngularAxis=function(de,Y){var X=this,Q=X.gd,V=X.layers,le=X.radius,ae=X.innerRadius,j=X.cx,ee=X.cy,te=X.getAngular(Y),pe=X.angularAxis,we=X.isSmith;we||(X.fillViewInitialKey("angularaxis.rotation",te.rotation),pe.setGeometry(),pe.setScale());var Se=we?function(rt){var Je=z(X,y([0,rt.x]));return Math.atan2(Je[0]-j,Je[1]-ee)-Math.PI/2}:function(rt){return pe.t2g(rt.x)};pe.type==="linear"&&pe.thetaunit==="radians"&&(pe.tick0=L(pe.tick0),pe.dtick=L(pe.dtick));var Re=function(rt){return t(j+le*Math.cos(rt),ee-le*Math.sin(rt))},Pe=we?function(rt){var Je=z(X,y([0,rt.x]));return t(Je[0],Je[1])}:function(rt){return Re(Se(rt))},je=we?function(rt){var Je=z(X,y([0,rt.x])),St=Math.atan2(Je[0]-j,Je[1]-ee)-Math.PI/2;return t(Je[0],Je[1])+e(-L(St))}:function(rt){var Je=Se(rt);return Re(Je)+e(-L(Je))},at=we?function(rt){return D(X,rt.x,0,1/0)}:function(rt){var Je=Se(rt),St=Math.cos(Je),kt=Math.sin(Je);return"M"+[j+ae*St,ee-ae*kt]+"L"+[j+le*St,ee-le*kt]},nt=i.makeLabelFns(pe,0),tt=nt.labelStandoff,Ve={};Ve.xFn=function(rt){var Je=Se(rt);return Math.cos(Je)*tt},Ve.yFn=function(rt){var Je=Se(rt),St=Math.sin(Je)>0?.2:1;return-Math.sin(Je)*(tt+rt.fontSize*St)+Math.abs(Math.cos(Je))*(rt.fontSize*b)},Ve.anchorFn=function(rt){var Je=Se(rt),St=Math.cos(Je);return Math.abs(St)<.1?"middle":St>0?"start":"end"},Ve.heightFn=function(rt,Je,St){var kt=Se(rt);return-.5*(1+Math.sin(kt))*St};var he=W(te);X.angularTickLayout!==he&&(V["angular-axis"].selectAll("."+pe._id+"tick").remove(),X.angularTickLayout=he);var se=we?[1/0].concat(pe.tickvals||[]).map(function(rt){return i.tickText(pe,rt,!0,!1)}):i.calcTicks(pe);we&&(se[0].text="\u221E",se[0].fontSize*=1.75);var ne;if(Y.gridshape==="linear"?(ne=se.map(Se),M.angleDelta(ne[0],ne[1])<0&&(ne=ne.slice().reverse())):ne=null,X.vangles=ne,pe.type==="category"&&(se=se.filter(function(rt){return M.isAngleInsideSector(Se(rt),X.sectorInRad)})),pe.visible){var Ce=pe.ticks==="inside"?-1:1,Ze=(pe.linewidth||1)/2;i.drawTicks(Q,pe,{vals:se,layer:V["angular-axis"],path:"M"+Ce*Ze+",0h"+Ce*pe.ticklen,transFn:je,crisp:!1}),i.drawGrid(Q,pe,{vals:se,layer:V["angular-grid"],path:at,transFn:M.noop,crisp:!1}),i.drawLabels(Q,pe,{vals:se,layer:V["angular-axis"],repositionOnUpdate:!0,transFn:Pe,labelFns:Ve})}ce(V["angular-line"].select("path"),te.showline,{d:X.pathSubplot(),transform:t(j,ee)}).attr("stroke-width",te.linewidth).call(r.stroke,te.linecolor)},B.updateFx=function(de,Y){if(!this.gd._context.staticPlot){var X=!this.isSmith;X&&(this.updateAngularDrag(de),this.updateRadialDrag(de,Y,0),this.updateRadialDrag(de,Y,1)),this.updateHoverAndMainDrag(de)}},B.updateHoverAndMainDrag=function(de){var Y=this,X=Y.isSmith,Q=Y.gd,V=Y.layers,le=de._zoomlayer,ae=d.MINZOOM,j=d.OFFEDGE,ee=Y.radius,te=Y.innerRadius,pe=Y.cx,we=Y.cy,Se=Y.cxx,Re=Y.cyy,Pe=Y.sectorInRad,je=Y.vangles,at=Y.radialAxis,nt=u.clampTiny,tt=u.findXYatLength,Ve=u.findEnclosingVertexAngles,he=d.cornerHalfWidth,se=d.cornerLen/2,ne,Ce,Ze=f.makeDragger(V,"path","maindrag",de.dragmode===!1?"none":"crosshair");v.select(Ze).attr("d",Y.pathSubplot()).attr("transform",t(pe,we)),Ze.onmousemove=function(or){c.hover(Q,or,Y.id),Q._fullLayout._lasthover=Ze,Q._fullLayout._hoversubplot=Y.id},Ze.onmouseout=function(or){Q._dragging||m.unhover(Q,or)};var rt={element:Ze,gd:Q,subplot:Y.id,plotinfo:{id:Y.id,xaxis:Y.xaxis,yaxis:Y.yaxis},xaxes:[Y.xaxis],yaxes:[Y.yaxis]},Je,St,kt,Bt,Vt,Ar,vr,qr,kr;function Ur(or,nr){return Math.sqrt(or*or+nr*nr)}function _t(or,nr){return Ur(or-Se,nr-Re)}function Fe(or,nr){return Math.atan2(Re-nr,or-Se)}function Ye(or,nr){return[or*Math.cos(nr),or*Math.sin(-nr)]}function Ae(or,nr){if(or===0)return Y.pathSector(2*he);var Pr=se/or,_a=nr-Pr,Fa=nr+Pr,Ra=Math.max(0,Math.min(or,ee)),qa=Ra-he,Wa=Ra+he;return"M"+Ye(qa,_a)+"A"+[qa,qa]+" 0,0,0 "+Ye(qa,Fa)+"L"+Ye(Wa,Fa)+"A"+[Wa,Wa]+" 0,0,1 "+Ye(Wa,_a)+"Z"}function Le(or,nr,Pr){if(or===0)return Y.pathSector(2*he);var _a=Ye(or,nr),Fa=Ye(or,Pr),Ra=nt((_a[0]+Fa[0])/2),qa=nt((_a[1]+Fa[1])/2),Wa,Ca;if(Ra&&qa){var hi=qa/Ra,wi=-1/hi,Yt=tt(he,hi,Ra,qa);Wa=tt(se,wi,Yt[0][0],Yt[0][1]),Ca=tt(se,wi,Yt[1][0],Yt[1][1])}else{var Rt,Zt;qa?(Rt=se,Zt=he):(Rt=he,Zt=se),Wa=[[Ra-Rt,qa-Zt],[Ra+Rt,qa-Zt]],Ca=[[Ra-Rt,qa+Zt],[Ra+Rt,qa+Zt]]}return"M"+Wa.join("L")+"L"+Ca.reverse().join("L")+"Z"}function We(){kt=null,Bt=null,Vt=Y.pathSubplot(),Ar=!1;var or=Q._fullLayout[Y.id];vr=_(or.bgcolor).getLuminance(),qr=f.makeZoombox(le,vr,pe,we,Vt),qr.attr("fill-rule","evenodd"),kr=f.makeCorners(le,pe,we),w(Q)}function Ke(or,nr){return nr=Math.max(Math.min(nr,ee),te),orae?(or-1&&or===1&&x(nr,Q,[Y.xaxis],[Y.yaxis],Y.id,rt),Pr.indexOf("event")>-1&&c.click(Q,nr,Y.id)}rt.prepFn=function(or,nr,Pr){var _a=Q._fullLayout.dragmode,Fa=Ze.getBoundingClientRect();Q._fullLayout._calcInverseTransform(Q);var Ra=Q._fullLayout._invTransform;ne=Q._fullLayout._invScaleX,Ce=Q._fullLayout._invScaleY;var qa=M.apply3DTransform(Ra)(nr-Fa.left,Pr-Fa.top);if(Je=qa[0],St=qa[1],je){var Wa=u.findPolygonOffset(ee,Pe[0],Pe[1],je);Je+=Se+Wa[0],St+=Re+Wa[1]}switch(_a){case"zoom":rt.clickFn=cr,X||(je?rt.moveFn=Ct:rt.moveFn=ot,rt.doneFn=Pt,We(or,nr,Pr));break;case"select":case"lasso":l(or,nr,Pr,rt,_a);break}},m.init(rt)},B.updateRadialDrag=function(de,Y,X){var Q=this,V=Q.gd,le=Q.layers,ae=Q.radius,j=Q.innerRadius,ee=Q.cx,te=Q.cy,pe=Q.radialAxis,we=d.radialDragBoxSize,Se=we/2;if(!pe.visible)return;var Re=O(Q.radialAxisAngle),Pe=pe._rl,je=Pe[0],at=Pe[1],nt=Pe[X],tt=.75*(Pe[1]-Pe[0])/(1-Q.getHole(Y))/ae,Ve,he,se;X?(Ve=ee+(ae+Se)*Math.cos(Re),he=te-(ae+Se)*Math.sin(Re),se="radialdrag"):(Ve=ee+(j-Se)*Math.cos(Re),he=te-(j-Se)*Math.sin(Re),se="radialdrag-inner");var ne=f.makeRectDragger(le,se,"crosshair",-Se,-Se,we,we),Ce={element:ne,gd:V};de.dragmode===!1&&(Ce.dragmode=!1),ce(v.select(ne),pe.visible&&j0!=(X?Je>je:Je=90||V>90&&le>=450?Re=1:j<=0&&te<=0?Re=0:Re=Math.max(j,te),V<=180&&le>=180||V>180&&le>=540?pe=-1:ae>=0&&ee>=0?pe=0:pe=Math.min(ae,ee),V<=270&&le>=270||V>270&&le>=630?we=-1:j>=0&&te>=0?we=0:we=Math.min(j,te),le>=360?Se=1:ae<=0&&ee<=0?Se=0:Se=Math.max(ae,ee),[pe,we,Se,Re]}function ue(de,Y){var X=function(V){return M.angleDist(de,V)},Q=M.findIndexOfMin(Y,X);return Y[Q]}function ce(de,Y,X){return Y?(de.attr("display",null),de.attr(X)):de&&de.attr("display","none"),de}}}),sk=He({"src/plots/polar/layout_attributes.js"(Z,q){"use strict";var v=sh(),_=Xh(),S=wc().attributes,M=sa().extendFlat,e=pc().overrideAll,t=e({color:_.color,showline:M({},_.showline,{dflt:!0}),linecolor:_.linecolor,linewidth:_.linewidth,showgrid:M({},_.showgrid,{dflt:!0}),gridcolor:_.gridcolor,gridwidth:_.gridwidth,griddash:_.griddash},"plot","from-root"),r=e({tickmode:_.minor.tickmode,nticks:_.nticks,tick0:_.tick0,dtick:_.dtick,tickvals:_.tickvals,ticktext:_.ticktext,ticks:_.ticks,ticklen:_.ticklen,tickwidth:_.tickwidth,tickcolor:_.tickcolor,ticklabelstep:_.ticklabelstep,showticklabels:_.showticklabels,labelalias:_.labelalias,minorloglabels:_.minorloglabels,showtickprefix:_.showtickprefix,tickprefix:_.tickprefix,showticksuffix:_.showticksuffix,ticksuffix:_.ticksuffix,showexponent:_.showexponent,exponentformat:_.exponentformat,minexponent:_.minexponent,separatethousands:_.separatethousands,tickfont:_.tickfont,tickangle:_.tickangle,tickformat:_.tickformat,tickformatstops:_.tickformatstops,layer:_.layer},"plot","from-root"),o={visible:M({},_.visible,{dflt:!0}),type:M({},_.type,{values:["-","linear","log","date","category"]}),autotypenumbers:_.autotypenumbers,autorangeoptions:{minallowed:_.autorangeoptions.minallowed,maxallowed:_.autorangeoptions.maxallowed,clipmin:_.autorangeoptions.clipmin,clipmax:_.autorangeoptions.clipmax,include:_.autorangeoptions.include,editType:"plot"},autorange:M({},_.autorange,{editType:"plot"}),rangemode:{valType:"enumerated",values:["tozero","nonnegative","normal"],dflt:"tozero",editType:"calc"},minallowed:M({},_.minallowed,{editType:"plot"}),maxallowed:M({},_.maxallowed,{editType:"plot"}),range:M({},_.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],editType:"plot"}),categoryorder:_.categoryorder,categoryarray:_.categoryarray,angle:{valType:"angle",editType:"plot"},autotickangles:_.autotickangles,side:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"clockwise",editType:"plot"},title:{text:M({},_.title.text,{editType:"plot",dflt:""}),font:M({},_.title.font,{editType:"plot"}),editType:"plot"},hoverformat:_.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};M(o,t,r);var a={visible:M({},_.visible,{dflt:!0}),type:{valType:"enumerated",values:["-","linear","category"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:_.autotypenumbers,categoryorder:_.categoryorder,categoryarray:_.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:_.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};M(a,t,r),q.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:v.background},radialaxis:o,angularaxis:a,gridshape:{valType:"enumerated",values:["circular","linear"],dflt:"circular",editType:"plot"},uirevision:{valType:"any",editType:"none"},editType:"calc"}}}),MH=He({"src/plots/polar/layout_defaults.js"(Z,q){"use strict";var v=sa(),_=$n(),S=zl(),M=s0(),e=Wh().getSubplotData,t=Y0(),r=t1(),o=e0(),a=t0(),i=I2(),n=z_(),s=f5(),h=a1(),f=sk(),m=ik(),c=DT(),T=c.axisNames;function l(w,A,E,p){var b=E("bgcolor");p.bgColor=_.combine(b,p.paper_bgcolor);var d=E("sector");E("hole");var u=e(p.fullData,c.name,p.id),g=p.layoutOut,y;function D(we,Se){return E(y+"."+we,Se)}for(var P=0;P")}}q.exports={hoverPoints:_,makeHoverPointText:S}}}),CH=He({"src/traces/scatterpolar/index.js"(Z,q){"use strict";q.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:FT(),categories:["polar","symbols","showLegend","scatter-like"],attributes:Cx(),supplyDefaults:OT().supplyDefaults,colorbar:dp(),formatLabels:BT(),calc:EH(),plot:kH(),style:Qp().style,styleOnSelect:Qp().styleOnSelect,hoverPoints:NT().hoverPoints,selectPoints:c1(),meta:{}}}}),LH=He({"lib/scatterpolar.js"(Z,q){"use strict";q.exports=CH()}}),lk=He({"src/traces/scatterpolargl/attributes.js"(Z,q){"use strict";var v=Cx(),{cliponaxis:_,hoveron:S}=v,M=Qs(v,["cliponaxis","hoveron"]),{connectgaps:e,line:{color:t,dash:r,width:o},fill:a,fillcolor:i,marker:n,textfont:s,textposition:h}=xx();q.exports=vs(So({},M),{connectgaps:e,fill:a,fillcolor:i,line:{color:t,dash:r,editType:"calc",width:o},marker:n,textfont:s,textposition:h})}}),PH=He({"src/traces/scatterpolargl/defaults.js"(Z,q){"use strict";var v=sa(),_=Fu(),S=OT().handleRThetaDefaults,M=md(),e=Dd(),t=zd(),r=ev(),o=Tv().PTS_LINESONLY,a=lk();q.exports=function(n,s,h,f){function m(T,l){return v.coerce(n,s,a,T,l)}var c=S(n,s,f,m);if(!c){s.visible=!1;return}m("thetaunit"),m("mode",c=r&&(p.marker.cluster=x.tree),p.marker&&(p.markerSel.positions=p.markerUnsel.positions=p.marker.positions=g),p.line&&g.length>1&&t.extendFlat(p.line,e.linePositions(i,l,g)),p.text&&(t.extendFlat(p.text,{positions:g},e.textPosition(i,l,p.text,p.marker)),t.extendFlat(p.textSel,{positions:g},e.textPosition(i,l,p.text,p.markerSel)),t.extendFlat(p.textUnsel,{positions:g},e.textPosition(i,l,p.text,p.markerUnsel))),p.fill&&!m.fill2d&&(m.fill2d=!0),p.marker&&!m.scatter2d&&(m.scatter2d=!0),p.line&&!m.line2d&&(m.line2d=!0),p.text&&!m.glText&&(m.glText=!0),m.lineOptions.push(p.line),m.fillOptions.push(p.fill),m.markerOptions.push(p.marker),m.markerSelectedOptions.push(p.markerSel),m.markerUnselectedOptions.push(p.markerUnsel),m.textOptions.push(p.text),m.textSelectedOptions.push(p.textSel),m.textUnselectedOptions.push(p.textUnsel),m.selectBatch.push([]),m.unselectBatch.push([]),x.x=y,x.y=D,x.rawx=y,x.rawy=D,x.r=A,x.theta=E,x.positions=g,x._scene=m,x.index=m.count,m.count++}}),S(i,n,s)}},q.exports.reglPrecompiled=o}}),OH=He({"src/traces/scatterpolargl/index.js"(Z,q){"use strict";var v=zH();v.plot=FH(),q.exports=v}}),BH=He({"lib/scatterpolargl.js"(Z,q){"use strict";q.exports=OH()}}),uk=He({"src/traces/barpolar/attributes.js"(Z,q){"use strict";var{hovertemplateAttrs:v,templatefallbackAttrs:_}=$l(),S=rs().extendFlat,M=Cx(),e=Sv();q.exports={r:M.r,theta:M.theta,r0:M.r0,dr:M.dr,theta0:M.theta0,dtheta:M.dtheta,thetaunit:M.thetaunit,base:S({},e.base,{}),offset:S({},e.offset,{}),width:S({},e.width,{}),text:S({},e.text,{}),hovertext:S({},e.hovertext,{}),marker:t(),hoverinfo:M.hoverinfo,hovertemplate:v(),hovertemplatefallback:_(),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,q){"use strict";q.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}}}),NH=He({"src/traces/barpolar/defaults.js"(Z,q){"use strict";var v=sa(),_=OT().handleRThetaDefaults,S=j2(),M=uk();q.exports=function(t,r,o,a){function i(s,h){return v.coerce(t,r,M,s,h)}var n=_(t,r,a,i);if(!n){r.visible=!1;return}i("thetaunit"),i("base"),i("offset"),i("width"),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),S(t,r,i,o,a),v.coerceSelectionMarkerOpacity(r,i)}}}),UH=He({"src/traces/barpolar/layout_defaults.js"(Z,q){"use strict";var v=sa(),_=ck();q.exports=function(S,M,e){var t={},r;function o(n,s){return v.coerce(S[r]||{},M[r],_,n,s)}for(var a=0;a0?(f=s,m=h):(f=h,m=s);var c=e.findEnclosingVertexAngles(f,r.vangles)[0],T=e.findEnclosingVertexAngles(m,r.vangles)[1],l=[c,(f+m)/2,T];return e.pathPolygonAnnulus(i,n,f,m,l,o,a)}:function(i,n,s,h){return S.pathAnnulus(i,n,s,h,o,a)}}}}),qH=He({"src/traces/barpolar/hover.js"(Z,q){"use strict";var v=Hc(),_=sa(),S=f1().getTraceColor,M=_.fillText,e=NT().makeHoverPointText,t=zT().isPtInsidePolygon;q.exports=function(o,a,i){var n=o.cd,s=n[0].trace,h=o.subplot,f=h.radialAxis,m=h.angularAxis,c=h.vangles,T=c?t:_.isPtInsideSector,l=o.maxHoverDistance,x=m._period||2*Math.PI,w=Math.abs(f.g2p(Math.sqrt(a*a+i*i))),A=Math.atan2(i,a);f.range[0]>f.range[1]&&(A+=Math.PI);var E=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)/x)-1+(u.rp1-w)/(u.rp1-u.rp0)-1:1/0};if(v.getClosest(n,E,o),o.index!==!1){var p=o.index,b=n[p];o.x0=o.x1=b.ct[0],o.y0=o.y1=b.ct[1];var d=_.extendFlat({},b,{r:b.s,theta:b.p});return M(b,s,o),e(d,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]}}}}),VH=He({"src/traces/barpolar/index.js"(Z,q){"use strict";q.exports={moduleType:"trace",name:"barpolar",basePlotModule:FT(),categories:["polar","bar","showLegend"],attributes:uk(),layoutAttributes:ck(),supplyDefaults:NH(),supplyLayoutDefaults:UH(),calc:fk().calc,crossTraceCalc:fk().crossTraceCalc,plot:jH(),colorbar:dp(),formatLabels:BT(),style:Nd().style,styleOnSelect:Nd().styleOnSelect,hoverPoints:qH(),selectPoints:h1(),meta:{}}}}),GH=He({"lib/barpolar.js"(Z,q){"use strict";q.exports=VH()}}),hk=He({"src/plots/smith/constants.js"(Z,q){"use strict";q.exports={attr:"subplot",name:"smith",axisNames:["realaxis","imaginaryaxis"],axisName2dataArray:{imaginaryaxis:"imag",realaxis:"real"}}}}),pk=He({"src/plots/smith/layout_attributes.js"(Z,q){"use strict";var v=sh(),_=Xh(),S=wc().attributes,M=sa().extendFlat,e=pc().overrideAll,t=e({color:_.color,showline:M({},_.showline,{dflt:!0}),linecolor:_.linecolor,linewidth:_.linewidth,showgrid:M({},_.showgrid,{dflt:!0}),gridcolor:_.gridcolor,gridwidth:_.gridwidth,griddash:_.griddash},"plot","from-root"),r=e({ticklen:_.ticklen,tickwidth:M({},_.tickwidth,{dflt:2}),tickcolor:_.tickcolor,showticklabels:_.showticklabels,labelalias:_.labelalias,showtickprefix:_.showtickprefix,tickprefix:_.tickprefix,showticksuffix:_.showticksuffix,ticksuffix:_.ticksuffix,tickfont:_.tickfont,tickformat:_.tickformat,hoverformat:_.hoverformat,layer:_.layer},"plot","from-root"),o=M({visible:M({},_.visible,{dflt:!0}),tickvals:{dflt:[.2,.5,1,2,5],valType:"data_array",editType:"plot"},tickangle:M({},_.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=M({visible:M({},_.visible,{dflt:!0}),tickvals:{valType:"data_array",editType:"plot"},ticks:_.ticks,editType:"calc"},t,r);q.exports={domain:S({name:"smith",editType:"plot"}),bgcolor:{valType:"color",editType:"plot",dflt:v.background},realaxis:o,imaginaryaxis:a,editType:"calc"}}}),HH=He({"src/plots/smith/layout_defaults.js"(Z,q){"use strict";var v=sa(),_=$n(),S=zl(),M=s0(),e=Wh().getSubplotData,t=t0(),r=e0(),o=z_(),a=wv(),i=pk(),n=hk(),s=n.axisNames,h=m(function(c){return v.isTypedArray(c)&&(c=Array.from(c)),c.slice().reverse().map(function(T){return-T}).concat([0]).concat(c)},String);function f(c,T,l,x){var w=l("bgcolor");x.bgColor=_.combine(w,x.paper_bgcolor);var A=e(x.fullData,n.name,x.id),E=x.layoutOut,p;function b(B,W){return l(p+"."+B,W)}for(var d=0;d")}}q.exports={hoverPoints:_,makeHoverPointText:S}}}),$H=He({"src/traces/scattersmith/index.js"(Z,q){"use strict";q.exports={moduleType:"trace",name:"scattersmith",basePlotModule:WH(),categories:["smith","symbols","showLegend","scatter-like"],attributes:dk(),supplyDefaults:XH(),colorbar:dp(),formatLabels:ZH(),calc:YH(),plot:KH(),style:Qp().style,styleOnSelect:Qp().styleOnSelect,hoverPoints:JH().hoverPoints,selectPoints:c1(),meta:{}}}}),QH=He({"lib/scattersmith.js"(Z,q){"use strict";q.exports=$H()}}),Mp=He({"node_modules/world-calendars/dist/main.js"(Z,q){var v=ch();function _(){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={}}v(_.prototype,{instance:function(o,a){o=(o||"gregorian").toLowerCase(),a=a||"";var i=this._localCals[o+"-"+a];if(!i&&this.calendars[o]&&(i=new this.calendars[o](a),this._localCals[o+"-"+a]=i),!i)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,o);return i},newDate:function(o,a,i,n,s){return n=(o!=null&&o.year?o.calendar():typeof n=="string"?this.instance(n,s):n)||this.instance(),n.newDate(o,a,i)},substituteDigits:function(o){return function(a){return(a+"").replace(/[0-9]/g,function(i){return o[i]})}},substituteChineseDigits:function(o,a){return function(i){for(var n="",s=0;i>0;){var h=i%10;n=(h===0?"":o[h]+a[s])+n,s++,i=Math.floor(i/10)}return n.indexOf(o[1]+a[1])===0&&(n=n.substr(1)),n||o[0]}}});function S(o,a,i,n){if(this._calendar=o,this._year=a,this._month=i,this._day=n,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 M(o,a){return o=""+o,"000000".substring(0,a-o.length)+o}v(S.prototype,{newDate:function(o,a,i){return this._calendar.newDate(o??this,a,i)},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,i){if(!this._calendar.isValid(o,a,i))throw(r.local.invalidDate||r.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=o,this._month=a,this._day=i,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?"-":"")+M(Math.abs(this.year()),4)+"-"+M(this.month(),2)+"-"+M(this.day(),2)}});function e(){this.shortYearCutoff="+10"}v(e.prototype,{_validateLevel:0,newDate:function(o,a,i){return o==null?this.today():(o.year&&(this._validate(o,a,i,r.local.invalidDate||r.regionalOptions[""].invalidDate),i=o.day(),a=o.month(),o=o.year()),new S(this,o,a,i))},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?"-":"")+M(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 i=this._validate(o,a,this.minDay,r.local.invalidMonth||r.regionalOptions[""].invalidMonth);return(i.month()+this.monthsInYear(i)-this.firstMonth)%this.monthsInYear(i)+this.minMonth},fromMonthOfYear:function(o,a){var i=(a+this.firstMonth-2*this.minMonth)%this.monthsInYear(o)+this.minMonth;return this._validate(o,i,this.minDay,r.local.invalidMonth||r.regionalOptions[""].invalidMonth),i},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,i){var n=this._validate(o,a,i,r.local.invalidDate||r.regionalOptions[""].invalidDate);return n.toJD()-this.newDate(n.year(),this.fromMonthOfYear(n.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(o,a,i){var n=this._validate(o,a,i,r.local.invalidDate||r.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(n))+2)%this.daysInWeek()},extraInfo:function(o,a,i){return this._validate(o,a,i,r.local.invalidDate||r.regionalOptions[""].invalidDate),{}},add:function(o,a,i){return this._validate(o,this.minMonth,this.minDay,r.local.invalidDate||r.regionalOptions[""].invalidDate),this._correctAdd(o,this._add(o,a,i),a,i)},_add:function(o,a,i){if(this._validateLevel++,i==="d"||i==="w"){var n=o.toJD()+a*(i==="w"?this.daysInWeek():1),s=o.calendar().fromJD(n);return this._validateLevel--,[s.year(),s.month(),s.day()]}try{var h=o.year()+(i==="y"?a:0),f=o.monthOfYear()+(i==="m"?a:0),s=o.day(),m=function(l){for(;fx-1+l.minMonth;)h++,f-=x,x=l.monthsInYear(h)};i==="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)))):i==="m"&&(m(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,i,n){if(!this.hasYearZero&&(n==="y"||n==="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"]}[n],h=i<0?-1:1;a=this._add(o,i*s[0]+h*s[1],s[2])}return o.date(a[0],a[1],a[2])},set:function(o,a,i){this._validate(o,this.minMonth,this.minDay,r.local.invalidDate||r.regionalOptions[""].invalidDate);var n=i==="y"?a:o.year(),s=i==="m"?a:o.month(),h=i==="d"?a:o.day();return(i==="y"||i==="m")&&(h=Math.min(h,this.daysInMonth(n,s))),o.date(n,s,h)},isValid:function(o,a,i){this._validateLevel++;var n=this.hasYearZero||o!==0;if(n){var s=this.newDate(o,a,this.minDay);n=a>=this.minMonth&&a-this.minMonth=this.minDay&&i-this.minDay13.5?13:1),T=s-(c>2.5?4716:4715);return T<=0&&T--,this.newDate(T,c,m)},toJSDate:function(o,a,i){var n=this._validate(o,a,i,r.local.invalidDate||r.regionalOptions[""].invalidDate),s=new Date(n.year(),n.month()-1,n.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=q.exports=new _;r.cdate=S,r.baseCalendar=e,r.calendars.gregorian=t}}),eW=He({"node_modules/world-calendars/dist/plus.js"(){var Z=ch(),q=Mp();Z(q.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"}),q.local=q.regionalOptions[""],Z(q.cdate.prototype,{formatDate:function(v,_){return typeof v!="string"&&(_=v,v=""),this._calendar.formatDate(v||"",this,_)}}),Z(q.baseCalendar.prototype,{UNIX_EPOCH:q.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:24*60*60,TICKS_EPOCH:q.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(v,_,S){if(typeof v!="string"&&(S=_,_=v,v=""),!_)return"";if(_.calendar()!==this)throw q.local.invalidFormat||q.regionalOptions[""].invalidFormat;v=v||this.local.dateFormat,S=S||{};for(var M=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,i=function(A,E){for(var p=1;w+p1},n=function(A,E,p,b){var d=""+E;if(i(A,b))for(;d.length1},x=function(D,P){var z=l(D,P),F=[2,3,z?4:2,z?4:2,10,11,20]["oyYJ@!".indexOf(D)+1],N=new RegExp("^-?\\d{1,"+F+"}"),O=_.substring(d).match(N);if(!O)throw(q.local.missingNumberAt||q.regionalOptions[""].missingNumberAt).replace(/\{0\}/,d);return d+=O[0].length,parseInt(O[0],10)},w=this,A=function(){if(typeof o=="function"){l("m");var D=o.call(w,_.substring(d));return d+=D.length,D}return x("m")},E=function(D,P,z,F){for(var N=l(D,F)?z:P,O=0;O-1){h=1,f=m;for(var y=this.daysInMonth(s,h);f>y;y=this.daysInMonth(s,h))h++,f-=y}return n>-1?this.fromJD(n):this.newDate(s,h,f)},determineDate:function(v,_,S,M,e){S&&typeof S!="object"&&(e=M,M=S,S=null),typeof M!="string"&&(e=M,M="");var t=this,r=function(o){try{return t.parseDate(M,o,e)}catch{}o=o.toLowerCase();for(var a=(o.match(/^c/)&&S?S.newDate():null)||t.today(),i=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,n=i.exec(o);n;)a.add(parseInt(n[1],10),n[2]||"d"),n=i.exec(o);return a};return _=_?_.newDate():null,v=v==null?_:typeof v=="string"?r(v):typeof v=="number"?isNaN(v)||v===1/0||v===-1/0?_:t.today().add(v,"d"):t.newDate(v),v}})}}),tW=He({"node_modules/world-calendars/dist/calendars/chinese.js"(){var Z=Mp(),q=ch(),v=Z.instance();function _(n){this.local=this.regionalOptions[n||""]||this.regionalOptions[""]}_.prototype=new Z.baseCalendar,q(_.prototype,{name:"Chinese",jdEpoch:17214255e-1,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(n,s){if(typeof n=="string"){var h=n.match(M);return h?h[0]:""}var f=this._validateYear(n),m=n.month(),c=""+this.toChineseMonth(f,m);return s&&c.length<2&&(c="0"+c),this.isIntercalaryMonth(f,m)&&(c+="i"),c},monthNames:function(n){if(typeof n=="string"){var s=n.match(e);return s?s[0]:""}var h=this._validateYear(n),f=n.month(),m=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"][m-1];return this.isIntercalaryMonth(h,f)&&(c="\u95F0"+c),c},monthNamesShort:function(n){if(typeof n=="string"){var s=n.match(t);return s?s[0]:""}var h=this._validateYear(n),f=n.month(),m=this.toChineseMonth(h,f),c=["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"][m-1];return this.isIntercalaryMonth(h,f)&&(c="\u95F0"+c),c},parseMonth:function(n,s){n=this._validateYear(n);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 m=s[s.length-1];f=m==="i"||m==="I"}var c=this.toMonthIndex(n,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(n,s){if(n.year&&(n=n.year()),typeof n!="number"||n<1888||n>2111)throw s.replace(/\{0\}/,this.local.name);return n},toMonthIndex:function(n,s,h){var f=this.intercalaryMonth(n),m=h&&s!==f;if(m||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(n,s){n.year&&(n=n.year(),s=n.month());var h=this.intercalaryMonth(n),f=h?12:11;if(s<0||s>f)throw Z.local.invalidMonth.replace(/\{0\}/,this.local.name);var m;return h?s>13;return h},isIntercalaryMonth:function(n,s){n.year&&(n=n.year(),s=n.month());var h=this.intercalaryMonth(n);return!!h&&h===s},leapYear:function(n){return this.intercalaryMonth(n)!==0},weekOfYear:function(n,s,h){var f=this._validateYear(n,Z.local.invalidyear),m=o[f-o[0]],c=m>>9&4095,T=m>>5&15,l=m&31,x;x=v.newDate(c,T,l),x.add(4-(x.dayOfWeek()||7),"d");var w=this.toJD(n,s,h)-x.toJD();return 1+Math.floor(w/7)},monthsInYear:function(n){return this.leapYear(n)?13:12},daysInMonth:function(n,s){n.year&&(s=n.month(),n=n.year()),n=this._validateYear(n);var h=r[n-r[0]],f=h>>13,m=f?12:11;if(s>m)throw Z.local.invalidMonth.replace(/\{0\}/,this.local.name);var c=h&1<<12-s?30:29;return c},weekDay:function(n,s,h){return(this.dayOfWeek(n,s,h)||7)<6},toJD:function(n,s,h){var f=this._validate(n,c,h,Z.local.invalidDate);n=this._validateYear(f.year()),s=f.month(),h=f.day();var m=this.isIntercalaryMonth(n,s),c=this.toChineseMonth(n,s),T=i(n,c,h,m);return v.toJD(T.year,T.month,T.day)},fromJD:function(n){var s=v.fromJD(n),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(n){var s=n.match(S),h=this._validateYear(+s[1]),f=+s[2],m=!!s[3],c=this.toMonthIndex(h,f,m),T=+s[4];return this.newDate(h,c,T)},add:function(n,s,h){var f=n.year(),m=n.month(),c=this.isIntercalaryMonth(f,m),T=this.toChineseMonth(f,m),l=Object.getPrototypeOf(_.prototype).add.call(this,n,s,h);if(h==="y"){var x=l.year(),w=l.month(),A=this.isIntercalaryMonth(x,T),E=c&&A?this.toMonthIndex(x,T,!0):this.toMonthIndex(x,T,!1);E!==w&&l.month(E)}return l}});var S=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,M=/^\d?\d[iI]?/m,e=/^闰?十?[一二三四五六七八九]?月/m,t=/^闰?十?[一二三四五六七八九]?/m;Z.calendars.chinese=_;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(n,s,h,f){var m,c;if(typeof n=="object")m=n,c=s||{};else{var T=typeof n=="number"&&n>=1888&&n<=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 x=typeof h=="number"&&h>=1&&h<=31;if(!x)throw new Error("Solar day outside range 1 - 31");m={year:n,month:s,day:h},c=f||{}}var w=o[m.year-o[0]],A=m.year<<9|m.month<<5|m.day;c.year=A>=w?m.year:m.year-1,w=o[c.year-o[0]];var E=w>>9&4095,p=w>>5&15,b=w&31,d,u=new Date(E,p-1,b),g=new Date(m.year,m.month-1,m.day);d=Math.round((g-u)/(24*3600*1e3));var y=r[c.year-r[0]],D;for(D=0;D<13;D++){var P=y&1<<12-D?30:29;if(d>13;return!z||D=1888&&n<=2111;if(!l)throw new Error("Lunar year outside range 1888-2111");var x=typeof s=="number"&&s>=1&&s<=12;if(!x)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=m||{}),T={year:n,month:s,day:h,isIntercalary:A}}var E;E=T.day-1;var p=r[T.year-r[0]],b=p>>13,d;b&&(T.month>b||T.isIntercalary)?d=T.month:d=T.month-1;for(var u=0;u>9&4095,P=y>>5&15,z=y&31,F=new Date(D,P-1,z+E);return c.year=F.getFullYear(),c.month=1+F.getMonth(),c.day=F.getDate(),c}}}),rW=He({"node_modules/world-calendars/dist/calendars/coptic.js"(){var Z=Mp(),q=ch();function v(_){this.local=this.regionalOptions[_||""]||this.regionalOptions[""]}v.prototype=new Z.baseCalendar,q(v.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(M){var S=this._validate(M,this.minMonth,this.minDay,Z.local.invalidYear),M=S.year()+(S.year()<0?1:0);return M%4===3||M%4===-1},monthsInYear:function(_){return this._validate(_,this.minMonth,this.minDay,Z.local.invalidYear||Z.regionalOptions[""].invalidYear),13},weekOfYear:function(_,S,M){var e=this.newDate(_,S,M);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInMonth:function(_,S){var M=this._validate(_,S,this.minDay,Z.local.invalidMonth);return this.daysPerMonth[M.month()-1]+(M.month()===13&&this.leapYear(M.year())?1:0)},weekDay:function(_,S,M){return(this.dayOfWeek(_,S,M)||7)<6},toJD:function(_,S,M){var e=this._validate(_,S,M,Z.local.invalidDate);return _=e.year(),_<0&&_++,e.day()+(e.month()-1)*30+(_-1)*365+Math.floor(_/4)+this.jdEpoch-1},fromJD:function(_){var S=Math.floor(_)+.5-this.jdEpoch,M=Math.floor((S-Math.floor((S+366)/1461))/365)+1;M<=0&&M--,S=Math.floor(_)+.5-this.newDate(M,1,1).toJD();var e=Math.floor(S/30)+1,t=S-(e-1)*30+1;return this.newDate(M,e,t)}}),Z.calendars.coptic=v}}),aW=He({"node_modules/world-calendars/dist/calendars/discworld.js"(){var Z=Mp(),q=ch();function v(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}v.prototype=new Z.baseCalendar,q(v.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,M,e){var t=this.newDate(S,M,e);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/8)+1},daysInMonth:function(S,M){var e=this._validate(S,M,this.minDay,Z.local.invalidMonth);return this.daysPerMonth[e.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(S,M,e){var t=this._validate(S,M,e,Z.local.invalidDate);return(t.day()+1)%8},weekDay:function(S,M,e){var t=this.dayOfWeek(S,M,e);return t>=2&&t<=6},extraInfo:function(S,M,e){var t=this._validate(S,M,e,Z.local.invalidDate);return{century:_[Math.floor((t.year()-1)/100)+1]||""}},toJD:function(S,M,e){var t=this._validate(S,M,e,Z.local.invalidDate);return S=t.year()+(t.year()<0?1:0),M=t.month(),e=t.day(),e+(M>1?16:0)+(M>2?(M-2)*32:0)+(S-1)*400+this.jdEpoch-1},fromJD:function(S){S=Math.floor(S+.5)-Math.floor(this.jdEpoch)-1;var M=Math.floor(S/400)+1;S-=(M-1)*400,S+=S>15?16:0;var e=Math.floor(S/32)+1,t=S-(e-1)*32+1;return this.newDate(M<=0?M-1:M,e,t)}});var _={20:"Fruitbat",21:"Anchovy"};Z.calendars.discworld=v}}),iW=He({"node_modules/world-calendars/dist/calendars/ethiopian.js"(){var Z=Mp(),q=ch();function v(_){this.local=this.regionalOptions[_||""]||this.regionalOptions[""]}v.prototype=new Z.baseCalendar,q(v.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(M){var S=this._validate(M,this.minMonth,this.minDay,Z.local.invalidYear),M=S.year()+(S.year()<0?1:0);return M%4===3||M%4===-1},monthsInYear:function(_){return this._validate(_,this.minMonth,this.minDay,Z.local.invalidYear||Z.regionalOptions[""].invalidYear),13},weekOfYear:function(_,S,M){var e=this.newDate(_,S,M);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInMonth:function(_,S){var M=this._validate(_,S,this.minDay,Z.local.invalidMonth);return this.daysPerMonth[M.month()-1]+(M.month()===13&&this.leapYear(M.year())?1:0)},weekDay:function(_,S,M){return(this.dayOfWeek(_,S,M)||7)<6},toJD:function(_,S,M){var e=this._validate(_,S,M,Z.local.invalidDate);return _=e.year(),_<0&&_++,e.day()+(e.month()-1)*30+(_-1)*365+Math.floor(_/4)+this.jdEpoch-1},fromJD:function(_){var S=Math.floor(_)+.5-this.jdEpoch,M=Math.floor((S-Math.floor((S+366)/1461))/365)+1;M<=0&&M--,S=Math.floor(_)+.5-this.newDate(M,1,1).toJD();var e=Math.floor(S/30)+1,t=S-(e-1)*30+1;return this.newDate(M,e,t)}}),Z.calendars.ethiopian=v}}),nW=He({"node_modules/world-calendars/dist/calendars/hebrew.js"(){var Z=Mp(),q=ch();function v(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}v.prototype=new Z.baseCalendar,q(v.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 M=this._validate(S,this.minMonth,this.minDay,Z.local.invalidYear);return this._leapYear(M.year())},_leapYear:function(S){return S=S<0?S+1:S,_(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,M,e){var t=this.newDate(S,M,e);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInYear:function(S){var M=this._validate(S,this.minMonth,this.minDay,Z.local.invalidYear);return S=M.year(),this.toJD(S===-1?1:S+1,7,1)-this.toJD(S,7,1)},daysInMonth:function(S,M){return S.year&&(M=S.month(),S=S.year()),this._validate(S,M,this.minDay,Z.local.invalidMonth),M===12&&this.leapYear(S)||M===8&&_(this.daysInYear(S),10)===5?30:M===9&&_(this.daysInYear(S),10)===3?29:this.daysPerMonth[M-1]},weekDay:function(S,M,e){return this.dayOfWeek(S,M,e)!==6},extraInfo:function(S,M,e){var t=this._validate(S,M,e,Z.local.invalidDate);return{yearType:(this.leapYear(t)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(t)%10-3]}},toJD:function(S,M,e){var t=this._validate(S,M,e,Z.local.invalidDate);S=t.year(),M=t.month(),e=t.day();var r=S<=0?S+1:S,o=this.jdEpoch+this._delay1(r)+this._delay2(r)+e+1;if(M<7){for(var a=7;a<=this.monthsInYear(S);a++)o+=this.daysInMonth(S,a);for(var a=1;a=this.toJD(M===-1?1:M+1,7,1);)M++;for(var e=Sthis.toJD(M,e,this.daysInMonth(M,e));)e++;var t=S-this.toJD(M,e,1)+1;return this.newDate(M,e,t)}});function _(S,M){return S-M*Math.floor(S/M)}Z.calendars.hebrew=v}}),oW=He({"node_modules/world-calendars/dist/calendars/islamic.js"(){var Z=Mp(),q=ch();function v(_){this.local=this.regionalOptions[_||""]||this.regionalOptions[""]}v.prototype=new Z.baseCalendar,q(v.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(_){var S=this._validate(_,this.minMonth,this.minDay,Z.local.invalidYear);return(S.year()*11+14)%30<11},weekOfYear:function(_,S,M){var e=this.newDate(_,S,M);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInYear:function(_){return this.leapYear(_)?355:354},daysInMonth:function(_,S){var M=this._validate(_,S,this.minDay,Z.local.invalidMonth);return this.daysPerMonth[M.month()-1]+(M.month()===12&&this.leapYear(M.year())?1:0)},weekDay:function(_,S,M){return this.dayOfWeek(_,S,M)!==5},toJD:function(_,S,M){var e=this._validate(_,S,M,Z.local.invalidDate);return _=e.year(),S=e.month(),M=e.day(),_=_<=0?_+1:_,M+Math.ceil(29.5*(S-1))+(_-1)*354+Math.floor((3+11*_)/30)+this.jdEpoch-1},fromJD:function(_){_=Math.floor(_)+.5;var S=Math.floor((30*(_-this.jdEpoch)+10646)/10631);S=S<=0?S-1:S;var M=Math.min(12,Math.ceil((_-29-this.toJD(S,1,1))/29.5)+1),e=_-this.toJD(S,M,1)+1;return this.newDate(S,M,e)}}),Z.calendars.islamic=v}}),sW=He({"node_modules/world-calendars/dist/calendars/julian.js"(){var Z=Mp(),q=ch();function v(_){this.local=this.regionalOptions[_||""]||this.regionalOptions[""]}v.prototype=new Z.baseCalendar,q(v.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(M){var S=this._validate(M,this.minMonth,this.minDay,Z.local.invalidYear),M=S.year()<0?S.year()+1:S.year();return M%4===0},weekOfYear:function(_,S,M){var e=this.newDate(_,S,M);return e.add(4-(e.dayOfWeek()||7),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInMonth:function(_,S){var M=this._validate(_,S,this.minDay,Z.local.invalidMonth);return this.daysPerMonth[M.month()-1]+(M.month()===2&&this.leapYear(M.year())?1:0)},weekDay:function(_,S,M){return(this.dayOfWeek(_,S,M)||7)<6},toJD:function(_,S,M){var e=this._validate(_,S,M,Z.local.invalidDate);return _=e.year(),S=e.month(),M=e.day(),_<0&&_++,S<=2&&(_--,S+=12),Math.floor(365.25*(_+4716))+Math.floor(30.6001*(S+1))+M-1524.5},fromJD:function(_){var S=Math.floor(_+.5),M=S+1524,e=Math.floor((M-122.1)/365.25),t=Math.floor(365.25*e),r=Math.floor((M-t)/30.6001),o=r-Math.floor(r<14?1:13),a=e-Math.floor(o>2?4716:4715),i=M-t-Math.floor(30.6001*r);return a<=0&&a--,this.newDate(a,o,i)}}),Z.calendars.julian=v}}),lW=He({"node_modules/world-calendars/dist/calendars/mayan.js"(){var Z=Mp(),q=ch();function v(M){this.local=this.regionalOptions[M||""]||this.regionalOptions[""]}v.prototype=new Z.baseCalendar,q(v.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(M){return this._validate(M,this.minMonth,this.minDay,Z.local.invalidYear),!1},formatYear:function(M){var e=this._validate(M,this.minMonth,this.minDay,Z.local.invalidYear);M=e.year();var t=Math.floor(M/400);M=M%400,M+=M<0?400:0;var r=Math.floor(M/20);return t+"."+r+"."+M%20},forYear:function(M){if(M=M.split("."),M.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(M){return this._validate(M,this.minMonth,this.minDay,Z.local.invalidYear),18},weekOfYear:function(M,e,t){return this._validate(M,e,t,Z.local.invalidDate),0},daysInYear:function(M){return this._validate(M,this.minMonth,this.minDay,Z.local.invalidYear),360},daysInMonth:function(M,e){return this._validate(M,e,this.minDay,Z.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(M,e,t){var r=this._validate(M,e,t,Z.local.invalidDate);return r.day()},weekDay:function(M,e,t){return this._validate(M,e,t,Z.local.invalidDate),!0},extraInfo:function(M,e,t){var r=this._validate(M,e,t,Z.local.invalidDate),o=r.toJD(),a=this._toHaab(o),i=this._toTzolkin(o);return{haabMonthName:this.local.haabMonths[a[0]-1],haabMonth:a[0],haabDay:a[1],tzolkinDayName:this.local.tzolkinMonths[i[0]-1],tzolkinDay:i[0],tzolkinTrecena:i[1]}},_toHaab:function(M){M-=this.jdEpoch;var e=_(M+8+17*20,365);return[Math.floor(e/20)+1,_(e,20)]},_toTzolkin:function(M){return M-=this.jdEpoch,[S(M+20,20),S(M+4,13)]},toJD:function(M,e,t){var r=this._validate(M,e,t,Z.local.invalidDate);return r.day()+r.month()*20+r.year()*360+this.jdEpoch},fromJD:function(M){M=Math.floor(M)+.5-this.jdEpoch;var e=Math.floor(M/360);M=M%360,M+=M<0?360:0;var t=Math.floor(M/20),r=M%20;return this.newDate(e,t,r)}});function _(M,e){return M-e*Math.floor(M/e)}function S(M,e){return _(M-1,e)+1}Z.calendars.mayan=v}}),uW=He({"node_modules/world-calendars/dist/calendars/nanakshahi.js"(){var Z=Mp(),q=ch();function v(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}v.prototype=new Z.baseCalendar;var _=Z.instance("gregorian");q(v.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 M=this._validate(S,this.minMonth,this.minDay,Z.local.invalidYear||Z.regionalOptions[""].invalidYear);return _.leapYear(M.year()+(M.year()<1?1:0)+1469)},weekOfYear:function(S,M,e){var t=this.newDate(S,M,e);return t.add(1-(t.dayOfWeek()||7),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInMonth:function(S,M){var e=this._validate(S,M,this.minDay,Z.local.invalidMonth);return this.daysPerMonth[e.month()-1]+(e.month()===12&&this.leapYear(e.year())?1:0)},weekDay:function(S,M,e){return(this.dayOfWeek(S,M,e)||7)<6},toJD:function(r,M,e){var t=this._validate(r,M,e,Z.local.invalidMonth),r=t.year();r<0&&r++;for(var o=t.day(),a=1;a=this.toJD(M+1,1,1);)M++;for(var e=S-Math.floor(this.toJD(M,1,1)+.5)+1,t=1;e>this.daysInMonth(M,t);)e-=this.daysInMonth(M,t),t++;return this.newDate(M,t,e)}}),Z.calendars.nanakshahi=v}}),cW=He({"node_modules/world-calendars/dist/calendars/nepali.js"(){var Z=Mp(),q=ch();function v(_){this.local=this.regionalOptions[_||""]||this.regionalOptions[""]}v.prototype=new Z.baseCalendar,q(v.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(_){return this.daysInYear(_)!==this.daysPerYear},weekOfYear:function(_,S,M){var e=this.newDate(_,S,M);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInYear:function(_){var S=this._validate(_,this.minMonth,this.minDay,Z.local.invalidYear);if(_=S.year(),typeof this.NEPALI_CALENDAR_DATA[_]>"u")return this.daysPerYear;for(var M=0,e=this.minMonth;e<=12;e++)M+=this.NEPALI_CALENDAR_DATA[_][e];return M},daysInMonth:function(_,S){return _.year&&(S=_.month(),_=_.year()),this._validate(_,S,this.minDay,Z.local.invalidMonth),typeof this.NEPALI_CALENDAR_DATA[_]>"u"?this.daysPerMonth[S-1]:this.NEPALI_CALENDAR_DATA[_][S]},weekDay:function(_,S,M){return this.dayOfWeek(_,S,M)!==6},toJD:function(_,S,M){var e=this._validate(_,S,M,Z.local.invalidDate);_=e.year(),S=e.month(),M=e.day();var t=Z.instance(),r=0,o=S,a=_;this._createMissingCalendarData(_);var i=_-(o>9||o===9&&M>=this.NEPALI_CALENDAR_DATA[a][0]?56:57);for(S!==9&&(r=M,o--);o!==9;)o<=0&&(o=12,a--),r+=this.NEPALI_CALENDAR_DATA[a][o],o--;return S===9?(r+=M-this.NEPALI_CALENDAR_DATA[a][0],r<0&&(r+=t.daysInYear(i))):r+=this.NEPALI_CALENDAR_DATA[a][9]-this.NEPALI_CALENDAR_DATA[a][0],t.newDate(i,1,1).add(r,"d").toJD()},fromJD:function(_){var S=Z.instance(),M=S.fromJD(_),e=M.year(),t=M.dayOfYear(),r=e+56;this._createMissingCalendarData(r);for(var o=9,a=this.NEPALI_CALENDAR_DATA[r][0],i=this.NEPALI_CALENDAR_DATA[r][o]-a+1;t>i;)o++,o>12&&(o=1,r++),i+=this.NEPALI_CALENDAR_DATA[r][o];var n=this.NEPALI_CALENDAR_DATA[r][o]-(i-t);return this.newDate(r,o,n)},_createMissingCalendarData:function(_){var S=this.daysPerMonth.slice(0);S.unshift(17);for(var M=_-1;M<_+2;M++)typeof this.NEPALI_CALENDAR_DATA[M]>"u"&&(this.NEPALI_CALENDAR_DATA[M]=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=v}}),fW=He({"node_modules/world-calendars/dist/calendars/persian.js"(){var Z=Mp(),q=ch();function v(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}function _(S){var M=S-475;S<0&&M++;var e=.242197,t=e*M,r=e*(M+1),o=t-Math.floor(t),a=r-Math.floor(r);return o>a}v.prototype=new Z.baseCalendar,q(v.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 M=this._validate(S,this.minMonth,this.minDay,Z.local.invalidYear);return _(M.year())},weekOfYear:function(S,M,e){var t=this.newDate(S,M,e);return t.add(-((t.dayOfWeek()+1)%7),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInMonth:function(S,M){var e=this._validate(S,M,this.minDay,Z.local.invalidMonth);return this.daysPerMonth[e.month()-1]+(e.month()===12&&this.leapYear(e.year())?1:0)},weekDay:function(S,M,e){return this.dayOfWeek(S,M,e)!==5},toJD:function(S,M,e){var t=this._validate(S,M,e,Z.local.invalidDate);S=t.year(),M=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 M=475+(S-this.toJD(475,1,1))/365.242197,e=Math.floor(M);e<=0&&e--,S>this.toJD(e,12,_(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=v,Z.calendars.jalali=v}}),hW=He({"node_modules/world-calendars/dist/calendars/taiwan.js"(){var Z=Mp(),q=ch(),v=Z.instance();function _(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}_.prototype=new Z.baseCalendar,q(_.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 M=this._validate(e,this.minMonth,this.minDay,Z.local.invalidYear),e=this._t2gYear(M.year());return v.leapYear(e)},weekOfYear:function(r,M,e){var t=this._validate(r,this.minMonth,this.minDay,Z.local.invalidYear),r=this._t2gYear(t.year());return v.weekOfYear(r,t.month(),t.day())},daysInMonth:function(S,M){var e=this._validate(S,M,this.minDay,Z.local.invalidMonth);return this.daysPerMonth[e.month()-1]+(e.month()===2&&this.leapYear(e.year())?1:0)},weekDay:function(S,M,e){return(this.dayOfWeek(S,M,e)||7)<6},toJD:function(r,M,e){var t=this._validate(r,M,e,Z.local.invalidDate),r=this._t2gYear(t.year());return v.toJD(r,t.month(),t.day())},fromJD:function(S){var M=v.fromJD(S),e=this._g2tYear(M.year());return this.newDate(e,M.month(),M.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=_}}),pW=He({"node_modules/world-calendars/dist/calendars/thai.js"(){var Z=Mp(),q=ch(),v=Z.instance();function _(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}_.prototype=new Z.baseCalendar,q(_.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 M=this._validate(e,this.minMonth,this.minDay,Z.local.invalidYear),e=this._t2gYear(M.year());return v.leapYear(e)},weekOfYear:function(r,M,e){var t=this._validate(r,this.minMonth,this.minDay,Z.local.invalidYear),r=this._t2gYear(t.year());return v.weekOfYear(r,t.month(),t.day())},daysInMonth:function(S,M){var e=this._validate(S,M,this.minDay,Z.local.invalidMonth);return this.daysPerMonth[e.month()-1]+(e.month()===2&&this.leapYear(e.year())?1:0)},weekDay:function(S,M,e){return(this.dayOfWeek(S,M,e)||7)<6},toJD:function(r,M,e){var t=this._validate(r,M,e,Z.local.invalidDate),r=this._t2gYear(t.year());return v.toJD(r,t.month(),t.day())},fromJD:function(S){var M=v.fromJD(S),e=this._g2tYear(M.year());return this.newDate(e,M.month(),M.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=_}}),dW=He({"node_modules/world-calendars/dist/calendars/ummalqura.js"(){var Z=Mp(),q=ch();function v(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}v.prototype=new Z.baseCalendar,q(v.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 M=this._validate(S,this.minMonth,this.minDay,Z.local.invalidYear);return this.daysInYear(M.year())===355},weekOfYear:function(S,M,e){var t=this.newDate(S,M,e);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInYear:function(S){for(var M=0,e=1;e<=12;e++)M+=this.daysInMonth(S,e);return M},daysInMonth:function(S,M){for(var e=this._validate(S,M,this.minDay,Z.local.invalidMonth),t=e.toJD()-24e5+.5,r=0,o=0;o<_.length;o++){if(_[o]>t)return _[r]-_[r-1];r++}return 30},weekDay:function(S,M,e){return this.dayOfWeek(S,M,e)!==5},toJD:function(S,M,e){var t=this._validate(S,M,e,Z.local.invalidDate),r=12*(t.year()-1)+t.month()-15292,o=t.day()+_[r-1]-1;return o+24e5-.5},fromJD:function(S){for(var M=S-24e5+.5,e=0,t=0;t<_.length&&!(_[t]>M);t++)e++;var r=e+15292,o=Math.floor((r-1)/12),a=o+1,i=r-12*o,n=M-_[e-1]+1;return this.newDate(a,i,n)},isValid:function(S,M,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,M,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=v;var _=[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]}}),vW=He({"src/components/calendars/calendars.js"(Z,q){"use strict";q.exports=Mp(),eW(),tW(),rW(),aW(),iW(),nW(),oW(),sW(),lW(),uW(),cW(),fW(),hW(),pW(),dW()}}),mW=He({"src/components/calendars/index.js"(Z,q){"use strict";var v=vW(),_=sa(),S=Gs(),M=S.EPOCHJD,e=S.ONEDAY,t={valType:"enumerated",values:_.sortObjectKeys(v.calendars),editType:"calc",dflt:"gregorian"},r=function(p,b,d,u){var g={};return g[d]=t,_.coerce(p,b,g,d,u)},o=function(p,b,d,u){for(var g=0;g0){if(++_e>=VZ)return arguments[0]}else _e=0;return fe.apply(void 0,arguments)}}var Pb=WZ;var XZ=Pb(Ab),Ib=XZ;var ZZ=/\{\n\/\* \[wrapped with (.+)\] \*/,YZ=/,? & /;function KZ(fe){var _e=fe.match(ZZ);return _e?_e[1].split(YZ):[]}var cC=KZ;var JZ=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;function $Z(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(JZ,`{ /* [wrapped with `+_e+`] */ -`)}var fC=$Z;function QZ(fe){return function(){return fe}}var Qg=QZ;var eY=function(){try{var fe=sd(Object,"defineProperty");return fe({},"",{}),fe}catch{}}(),ey=eY;var tY=ey?function(fe,_e){return ey(fe,"toString",{configurable:!0,enumerable:!1,value:Qg(_e),writable:!0})}:Bc,hC=tY;var rY=Pb(hC),ty=rY;function aY(fe,_e){for(var Xe=-1,Lt=fe==null?0:fe.length;++Xe-1}var Em=lY;var uY=1,cY=2,fY=8,hY=16,pY=32,dY=64,vY=128,mY=256,gY=512,yY=[["ary",vY],["bind",uY],["bindKey",cY],["curry",fY],["curryRight",hY],["flip",gY],["partial",pY],["partialRight",dY],["rearg",mY]];function _Y(fe,_e){return Nh(yY,function(Xe){var Lt="_."+Xe[0];_e&Xe[1]&&!Em(fe,Lt)&&fe.push(Lt)}),fe.sort()}var dC=_Y;function xY(fe,_e,Xe){var Lt=_e+"";return ty(fe,fC(Lt,dC(cC(Lt),Xe)))}var Db=xY;var bY=1,wY=2,TY=4,AY=8,vC=32,mC=64;function SY(fe,_e,Xe,Lt,gr,Yr,Ea,ei,oi,Ln){var _n=_e&AY,Fn=_n?Ea:void 0,So=_n?void 0:Ea,vs=_n?Yr:void 0,Qs=_n?void 0:Yr;_e|=_n?vC:mC,_e&=~(_n?mC:vC),_e&TY||(_e&=~(bY|wY));var Ho=[fe,_e,gr,vs,Fn,Qs,So,ei,oi,Ln],He=Xe.apply(void 0,Ho);return i_(fe)&&Ib(He,Ho),He.placeholder=Lt,Db(He,fe,_e)}var zb=SY;function MY(fe){var _e=fe;return _e.placeholder}var Sd=MY;var EY=9007199254740991,kY=/^(?:0|[1-9]\d*)$/;function CY(fe,_e){var Xe=typeof fe;return _e=_e??EY,!!_e&&(Xe=="number"||Xe!="symbol"&&kY.test(fe))&&fe>-1&&fe%1==0&&fe<_e}var np=CY;var LY=Math.min;function PY(fe,_e){for(var Xe=fe.length,Lt=LY(_e.length,Xe),gr=pf(fe);Lt--;){var Yr=_e[Lt];fe[Lt]=np(Yr,Xe)?gr[Yr]:void 0}return fe}var gC=PY;var yC="__lodash_placeholder__";function IY(fe,_e){for(var Xe=-1,Lt=fe.length,gr=0,Yr=[];++Xe1&&ou.reverse(),_n&&oi-1&&fe%1==0&&fe<=nK}var km=oK;function sK(fe){return fe!=null&&km(fe.length)&&!ip(fe)}var Vc=sK;function lK(fe,_e,Xe){if(!Cl(Xe))return!1;var Lt=typeof _e;return(Lt=="number"?Vc(Xe)&&np(_e,Xe.length):Lt=="string"&&_e in Xe)?oh(Xe[_e],fe):!1}var Nc=lK;function uK(fe){return Go(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=BJ;function NJ(fe,_e){var Xe=this.__data__,Lt=Lm(Xe,fe);return Lt<0?(++this.size,Xe.push([fe,_e])):Xe[Lt][1]=_e,this}var JC=NJ;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 u$(fe){var _e=fe==null?0:fe.length;return _e?Qu(fe,1):[]}var qb=u$;function c$(fe){return ty(Ob(fe,void 0,qb),fe+"")}var up=c$;var f$=up(fy),lL=f$;var h$=Nb(Object.getPrototypeOf,Object),Dm=h$;var p$="[object Object]",d$=Function.prototype,v$=Object.prototype,uL=d$.toString,m$=v$.hasOwnProperty,g$=uL.call(Object);function y$(fe){if(!Dl(fe)||Oc(fe)!=p$)return!1;var _e=Dm(fe);if(_e===null)return!0;var Xe=m$.call(_e,"constructor")&&_e.constructor;return typeof Xe=="function"&&Xe instanceof Xe&&uL.call(Xe)==g$}var gv=y$;var _$="[object DOMException]",x$="[object Error]";function b$(fe){if(!Dl(fe))return!1;var _e=Oc(fe);return _e==x$||_e==_$||typeof fe.message=="string"&&typeof fe.name=="string"&&!gv(fe)}var hy=b$;var w$=Go(function(fe,_e){try{return xf(fe,void 0,_e)}catch(Xe){return hy(Xe)?Xe:new Error(Xe)}}),Vb=w$;var T$="Expected a function";function A$(fe,_e){var Xe;if(typeof _e!="function")throw new TypeError(T$);return fe=Vo(fe),function(){return--fe>0&&(Xe=_e.apply(this,arguments)),fe<=1&&(_e=void 0),Xe}}var Gb=A$;var S$=1,M$=32,PA=Go(function(fe,_e,Xe){var Lt=S$;if(Xe.length){var gr=Yp(Xe,Sd(PA));Lt|=M$}return op(fe,Lt,_e,Xe,gr)});PA.placeholder={};var Hb=PA;var E$=up(function(fe,_e){return Nh(_e,function(Xe){Xe=Eh(Xe),sp(fe,Xe,Hb(fe[Xe],fe))}),fe}),cL=E$;var k$=1,C$=2,L$=32,IA=Go(function(fe,_e,Xe){var Lt=k$|C$;if(Xe.length){var gr=Yp(Xe,Sd(IA));Lt|=L$}return op(_e,Lt,fe,Xe,gr)});IA.placeholder={};var fL=IA;function P$(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=I$;var R$="\\ud800-\\udfff",D$="\\u0300-\\u036f",z$="\\ufe20-\\ufe2f",F$="\\u20d0-\\u20ff",O$=D$+z$+F$,B$="\\ufe0e\\ufe0f",N$="\\u200d",U$=RegExp("["+N$+R$+O$+B$+"]");function j$(fe){return U$.test(fe)}var kd=j$;function q$(fe){return fe.split("")}var hL=q$;var pL="\\ud800-\\udfff",V$="\\u0300-\\u036f",G$="\\ufe20-\\ufe2f",H$="\\u20d0-\\u20ff",W$=V$+G$+H$,X$="\\ufe0e\\ufe0f",Z$="["+pL+"]",RA="["+W$+"]",DA="\\ud83c[\\udffb-\\udfff]",Y$="(?:"+RA+"|"+DA+")",dL="[^"+pL+"]",vL="(?:\\ud83c[\\udde6-\\uddff]){2}",mL="[\\ud800-\\udbff][\\udc00-\\udfff]",K$="\\u200d",gL=Y$+"?",yL="["+X$+"]?",J$="(?:"+K$+"(?:"+[dL,vL,mL].join("|")+")"+yL+gL+")*",$$=yL+gL+J$,Q$="(?:"+[dL+RA+"?",RA,vL,mL,Z$].join("|")+")",eQ=RegExp(DA+"(?="+DA+")|"+Q$+$$,"g");function tQ(fe){return fe.match(eQ)||[]}var _L=tQ;function rQ(fe){return kd(fe)?_L(fe):hL(fe)}var Uh=rQ;function aQ(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=aQ;var iQ=Wb("toUpperCase"),py=iQ;function nQ(fe){return py(Us(fe).toLowerCase())}var Xb=nQ;function oQ(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=nee;function oee(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=oee;function see(){this.__data__=new Pm,this.size=0}var WL=see;function lee(fe){var _e=this.__data__,Xe=_e.delete(fe);return this.size=_e.size,Xe}var XL=lee;function uee(fe){return this.__data__.get(fe)}var ZL=uee;function cee(fe){return this.__data__.has(fe)}var YL=cee;var fee=200;function hee(fe,_e){var Xe=this.__data__;if(Xe instanceof Pm){var Lt=Xe.__data__;if(!Im||Lt.lengthei))return!1;var Ln=Yr.get(fe),_n=Yr.get(_e);if(Ln&&_n)return Ln==_e&&_n==fe;var Fn=-1,So=!0,vs=Xe&hre?new Fm:void 0;for(Yr.set(fe,_e),Yr.set(_e,fe);++Fn=_e||Vn<0||Fn&&dd>=Yr}function Jl(){var Ff=Py();if(He(Ff))return ou(Ff);ei=setTimeout(Jl,Ho(Ff))}function ou(Ff){return ei=void 0,So&&Lt?vs(Ff):(Lt=gr=void 0,Ea)}function jp(){ei!==void 0&&clearTimeout(ei),Ln=0,Lt=oi=gr=ei=void 0}function zf(){return ei===void 0?Ea:ou(Py())}function Gh(){var Ff=Py(),Vn=He(Ff);if(Lt=arguments,gr=this,oi=Ff,Vn){if(ei===void 0)return Qs(oi);if(Fn)return clearTimeout(ei),ei=setTimeout(Jl,_e),vs(oi)}return ei===void 0&&(ei=setTimeout(Jl,_e)),Ea}return Gh.cancel=jp,Gh.flush=zf,Gh}var xw=Sae;function Mae(fe,_e){return fe==null||fe!==fe?_e:fe}var QP=Mae;var eI=Object.prototype,Eae=eI.hasOwnProperty,kae=Go(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=jae&&(Yr=Hv,Ea=!1,_e=new Fm(_e));e:for(;++gr=0&&fe.slice(Xe,gr)==_e}var yI=oie;function sie(fe,_e){return Sl(_e,function(Xe){return[Xe,fe[Xe]]})}var _I=sie;function lie(fe){var _e=-1,Xe=Array(fe.size);return fe.forEach(function(Lt){Xe[++_e]=[Lt,Lt]}),Xe}var xI=lie;var uie="[object Map]",cie="[object Set]";function fie(fe){return function(_e){var Xe=jh(_e);return Xe==uie?Sy(_e):Xe==cie?xI(_e):_I(_e,fe(_e))}}var Mw=fie;var hie=Mw(gu),p_=hie;var pie=Mw(Gc),d_=pie;var die={"&":"&","<":"<",">":">",'"':""","'":"'"},vie=vy(die),bI=vie;var wI=/[&<>"']/g,mie=RegExp(wI.source);function gie(fe){return fe=Us(fe),fe&&mie.test(fe)?fe.replace(wI,bI):fe}var Ew=gie;var TI=/[\\^$.*+?()[\]{}|]/g,yie=RegExp(TI.source);function _ie(fe){return fe=Us(fe),fe&&yie.test(fe)?fe.replace(TI,"\\$&"):fe}var AI=_ie;function xie(fe,_e){for(var Xe=-1,Lt=fe==null?0:fe.length;++Xegr?0:gr+Xe),Lt=Lt===void 0||Lt>gr?gr:Vo(Lt),Lt<0&&(Lt+=gr),Lt=Xe>Lt?0:Cw(Lt);Xe-1?gr[Yr?_e[Ea]:Ea]:void 0}}var Pw=Cie;var Lie=Math.max;function Pie(fe,_e,Xe){var Lt=fe==null?0:fe.length;if(!Lt)return-1;var gr=Xe==null?0:Vo(Xe);return gr<0&&(gr=Lie(Lt+gr,0)),Mm(fe,xo(_e,3),gr)}var Iw=Pie;var Iie=Pw(Iw),LI=Iie;function Rie(fe,_e,Xe){var Lt;return Xe(fe,function(gr,Yr,Ea){if(_e(gr,Yr,Ea))return Lt=Yr,!1}),Lt}var Rw=Rie;function Die(fe,_e){return Rw(fe,xo(_e,3),fp)}var PI=Die;var zie=Math.max,Fie=Math.min;function Oie(fe,_e,Xe){var Lt=fe==null?0:fe.length;if(!Lt)return-1;var gr=Lt-1;return Xe!==void 0&&(gr=Vo(Xe),gr=Xe<0?zie(Lt+gr,0):Fie(gr,Lt-1)),Mm(fe,xo(_e,3),gr,!0)}var Dw=Oie;var Bie=Pw(Dw),II=Bie;function Nie(fe,_e){return Rw(fe,xo(_e,3),Dy)}var RI=Nie;function Uie(fe){return fe&&fe.length?fe[0]:void 0}var v_=Uie;function jie(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=jie;function qie(fe,_e){var Xe=zo(fe)?Sl:zw;return Xe(fe,xo(_e,3))}var jm=qie;function Vie(fe,_e){return Qu(jm(fe,_e),1)}var DI=Vie;var Gie=1/0;function Hie(fe,_e){return Qu(jm(fe,_e),Gie)}var zI=Hie;function Wie(fe,_e,Xe){return Xe=Xe===void 0?1:Vo(Xe),Qu(jm(fe,_e),Xe)}var FI=Wie;var Xie=1/0;function Zie(fe){var _e=fe==null?0:fe.length;return _e?Qu(fe,Xie):[]}var OI=Zie;function Yie(fe,_e){var Xe=fe==null?0:fe.length;return Xe?(_e=_e===void 0?1:Vo(_e),Qu(fe,_e)):[]}var BI=Yie;var Kie=512;function Jie(fe){return op(fe,Kie)}var NI=Jie;var $ie=gy("floor"),UI=$ie;var Qie="Expected a function",ene=8,tne=32,rne=128,ane=256;function ine(fe){return up(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(Qie);if(gr&&!Ea&&$g(Yr)=="wrapper")var Ea=new zp([],!0)}for(Lt=Ea?Lt:Xe;++Lt_e}var zy=yne;function _ne(fe){return function(_e,Xe){return typeof _e=="string"&&typeof Xe=="string"||(_e=Sh(_e),Xe=Sh(Xe)),fe(_e,Xe)}}var Vm=_ne;var xne=Vm(zy),JI=xne;var bne=Vm(function(fe,_e){return fe>=_e}),$I=bne;var wne=Object.prototype,Tne=wne.hasOwnProperty;function Ane(fe,_e){return fe!=null&&Tne.call(fe,_e)}var QI=Ane;function Sne(fe,_e){return fe!=null&&dw(fe,_e,QI)}var e8=Sne;var Mne=Math.max,Ene=Math.min;function kne(fe,_e,Xe){return fe>=Ene(_e,Xe)&&fe-1:!!gr&&Ad(fe,_e,Xe)>-1}var a8=zne;var Fne=Math.max;function One(fe,_e,Xe){var Lt=fe==null?0:fe.length;if(!Lt)return-1;var gr=Xe==null?0:Vo(Xe);return gr<0&&(gr=Fne(Lt+gr,0)),Ad(fe,_e,gr)}var i8=One;function Bne(fe){var _e=fe==null?0:fe.length;return _e?Yf(fe,0,-1):[]}var n8=Bne;var Nne=Math.min;function Une(fe,_e,Xe){for(var Lt=Xe?Ry:Em,gr=fe[0].length,Yr=fe.length,Ea=Yr,ei=Array(Yr),oi=1/0,Ln=[];Ea--;){var _n=fe[Ea];Ea&&_e&&(_n=Sl(_n,wf(_e))),oi=Nne(_n.length,oi),ei[Ea]=!Xe&&(_e||gr>=120&&_n.length>=120)?new Fm(Ea&&_n):void 0}_n=fe[0];var Fn=-1,So=ei[0];e:for(;++Fn=-F8&&fe<=F8}var O8=zoe;function Foe(fe){return fe===void 0}var B8=Foe;var Ooe="[object WeakMap]";function Boe(fe){return Dl(fe)&&jh(fe)==Ooe}var N8=Boe;var Noe="[object WeakSet]";function Uoe(fe){return Dl(fe)&&Oc(fe)==Noe}var U8=Uoe;var joe=1;function qoe(fe){return xo(typeof fe=="function"?fe:cp(fe,joe))}var j8=qoe;var Voe=Array.prototype,Goe=Voe.join;function Hoe(fe,_e){return fe==null?"":Goe.call(fe,_e)}var q8=Hoe;var Woe=Cd(function(fe,_e,Xe){return fe+(Xe?"-":"")+_e.toLowerCase()}),V8=Woe;var Xoe=Nm(function(fe,_e,Xe){sp(fe,Xe,_e)}),G8=Xoe;function Zoe(fe,_e,Xe){for(var Lt=Xe+1;Lt--;)if(fe[Lt]===_e)return Lt;return Lt}var H8=Zoe;var Yoe=Math.max,Koe=Math.min;function Joe(fe,_e,Xe){var Lt=fe==null?0:fe.length;if(!Lt)return-1;var gr=Lt;return Xe!==void 0&&(gr=Vo(Xe),gr=gr<0?Yoe(Lt+gr,0):Koe(gr,Lt-1)),_e===_e?H8(fe,_e,gr):Mm(fe,Rb,gr,!0)}var W8=Joe;var $oe=Cd(function(fe,_e,Xe){return fe+(Xe?" ":"")+_e.toLowerCase()}),X8=$oe;var Qoe=Wb("toLowerCase"),Z8=Qoe;function ese(fe,_e){return fe<_e}var Uy=ese;var tse=Vm(Uy),Y8=tse;var rse=Vm(function(fe,_e){return fe<=_e}),K8=rse;function ase(fe,_e){var Xe={};return _e=xo(_e,3),fp(fe,function(Lt,gr,Yr){sp(Xe,_e(Lt,gr,Yr),Lt)}),Xe}var J8=ase;function ise(fe,_e){var Xe={};return _e=xo(_e,3),fp(fe,function(Lt,gr,Yr){sp(Xe,gr,_e(Lt,gr,Yr))}),Xe}var $8=ise;var nse=1;function ose(fe){return pw(cp(fe,nse))}var Q8=ose;var sse=1;function lse(fe,_e){return vw(fe,cp(_e,sse))}var eR=lse;function use(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=Lse;function Pse(fe,_e){var Xe=fe.length;if(Xe)return _e+=_e<0?Xe:0,np(_e,Xe)?fe[_e]:void 0}var Gw=Pse;function Ise(fe,_e){return fe&&fe.length?Gw(fe,Vo(_e)):void 0}var pR=Ise;function Rse(fe){return fe=Vo(fe),Go(function(_e){return Gw(_e,fe)})}var dR=Rse;function Dse(fe,_e){return _e=Fp(_e,fe),fe=Bw(fe,_e),fe==null||delete fe[Eh(Tf(_e))]}var qy=Dse;function zse(fe){return gv(fe)?void 0:fe}var vR=zse;var Fse=1,Ose=2,Bse=4,Nse=up(function(fe,_e){var Xe={};if(fe==null)return Xe;var Lt=!1;_e=Sl(_e,function(Yr){return Yr=Fp(Yr,fe),Lt||(Lt=Yr.length>1),Yr}),Mh(fe,by(fe),Xe),Lt&&(Xe=cp(Xe,Fse|Ose|Bse,vR));for(var gr=_e.length;gr--;)qy(Xe,_e[gr]);return Xe}),mR=Nse;function Use(fe,_e,Xe,Lt){if(!Cl(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&&!Ln||Lt&&Ea&&oi||!Xe&&oi||!gr)return 1;if(!Lt&&!Yr&&!Ln&&fe<_e||Ln&&Xe&&gr&&!Lt&&!Yr||ei&&Xe&&gr||!Ea&&gr||!oi)return-1}return 0}var Xw=Wse;function Xse(fe,_e,Xe){for(var Lt=-1,gr=fe.criteria,Yr=_e.criteria,Ea=gr.length,ei=Xe.length;++Lt=ei)return oi;var Ln=Xe[Lt];return oi*(Ln=="desc"?-1:1)}}return fe.index-_e.index}var xR=Xse;function Zse(fe,_e,Xe){_e.length?_e=Sl(_e,function(Yr){return zo(Yr)?function(Ea){return ld(Ea,Yr.length===1?Yr[0]:Yr)}:Yr}):_e=[Bc];var Lt=-1;_e=Sl(_e,wf(xo));var gr=zw(fe,function(Yr,Ea,ei){var oi=Sl(_e,function(Ln){return Ln(Yr)});return{criteria:oi,index:++Lt,value:Yr}});return _R(gr,function(Yr,Ea){return xR(Yr,Ea,Xe)})}var Zw=Zse;function Yse(fe,_e,Xe,Lt){return fe==null?[]:(zo(_e)||(_e=_e==null?[]:[_e]),Xe=Lt?void 0:Xe,zo(Xe)||(Xe=Xe==null?[]:[Xe]),Zw(fe,_e,Xe))}var bR=Yse;function Kse(fe){return up(function(_e){return _e=Sl(_e,wf(xo)),Go(function(Xe){var Lt=this;return fe(_e,function(gr){return xf(gr,Lt,Xe)})})})}var Vy=Kse;var Jse=Vy(Sl),wR=Jse;var $se=Go,TR=$se;var Qse=Math.min,ele=TR(function(fe,_e){_e=_e.length==1&&zo(_e[0])?Sl(_e[0],wf(xo)):Sl(Qu(_e,1),wf(xo));var Xe=_e.length;return Go(function(Lt){for(var gr=-1,Yr=Qse(Lt.length,Xe);++grale)return Xe;do _e%2&&(Xe+=fe),_e=ile(_e/2),_e&&(fe+=fe);while(_e);return Xe}var m_=nle;var ole=Cy("length"),ER=ole;var CR="\\ud800-\\udfff",sle="\\u0300-\\u036f",lle="\\ufe20-\\ufe2f",ule="\\u20d0-\\u20ff",cle=sle+lle+ule,fle="\\ufe0e\\ufe0f",hle="["+CR+"]",NA="["+cle+"]",UA="\\ud83c[\\udffb-\\udfff]",ple="(?:"+NA+"|"+UA+")",LR="[^"+CR+"]",PR="(?:\\ud83c[\\udde6-\\uddff]){2}",IR="[\\ud800-\\udbff][\\udc00-\\udfff]",dle="\\u200d",RR=ple+"?",DR="["+fle+"]?",vle="(?:"+dle+"(?:"+[LR,PR,IR].join("|")+")"+DR+RR+")*",mle=DR+RR+vle,gle="(?:"+[LR+NA+"?",NA,PR,IR,hle].join("|")+")",kR=RegExp(UA+"(?="+UA+")|"+gle+mle,"g");function yle(fe){for(var _e=kR.lastIndex=0;kR.test(fe);)++_e;return _e}var zR=yle;function _le(fe){return kd(fe)?zR(fe):ER(fe)}var Pd=_le;var xle=Math.ceil;function ble(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,xle(fe/Pd(_e)));return kd(_e)?Bp(Uh(Lt),0,fe).join(""):Lt.slice(0,fe)}var H0=ble;var wle=Math.ceil,Tle=Math.floor;function Ale(fe,_e,Xe){fe=Us(fe),_e=Vo(_e);var Lt=_e?Pd(fe):0;if(!_e||Lt>=_e)return fe;var gr=(_e-Lt)/2;return H0(Tle(gr),Xe)+fe+H0(wle(gr),Xe)}var FR=Ale;function Sle(fe,_e,Xe){fe=Us(fe),_e=Vo(_e);var Lt=_e?Pd(fe):0;return _e&&Lt<_e?fe+H0(_e-Lt,Xe):fe}var OR=Sle;function Mle(fe,_e,Xe){fe=Us(fe),_e=Vo(_e);var Lt=_e?Pd(fe):0;return _e&&Lt<_e?H0(_e-Lt,Xe)+fe:fe}var BR=Mle;var Ele=/^\s+/,kle=wu.parseInt;function Cle(fe,_e,Xe){return Xe||_e==null?_e=0:_e&&(_e=+_e),kle(Us(fe).replace(Ele,""),_e||0)}var NR=Cle;var Lle=32,jA=Go(function(fe,_e){var Xe=Yp(_e,Sd(jA));return op(fe,Lle,void 0,_e,Xe)});jA.placeholder={};var Yw=jA;var Ple=64,qA=Go(function(fe,_e){var Xe=Yp(_e,Sd(qA));return op(fe,Ple,void 0,_e,Xe)});qA.placeholder={};var UR=qA;var Ile=Nm(function(fe,_e,Xe){fe[Xe?0:1].push(_e)},function(){return[[],[]]}),jR=Ile;function Rle(fe,_e){return Hw(fe,_e,function(Xe,Lt){return ky(fe,Lt)})}var qR=Rle;var Dle=up(function(fe,_e){return fe==null?{}:qR(fe,_e)}),VR=Dle;function zle(fe){for(var _e,Xe=this;Xe instanceof Am;){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=zle;function Fle(fe){return function(_e){return fe==null?void 0:ld(fe,_e)}}var HR=Fle;function Ole(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=Nle;function Ule(fe,_e){return fe&&fe.length&&_e&&_e.length?Gy(fe,_e):fe}var Kw=Ule;var jle=Go(Kw),ZR=jle;function qle(fe,_e,Xe){return fe&&fe.length&&_e&&_e.length?Gy(fe,_e,xo(Xe,2)):fe}var YR=qle;function Vle(fe,_e,Xe){return fe&&fe.length&&_e&&_e.length?Gy(fe,_e,void 0,Xe):fe}var KR=Vle;var Gle=Array.prototype,Hle=Gle.splice;function Wle(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;np(gr)?Hle.call(fe,gr,1):qy(fe,gr)}}return fe}var Jw=Wle;var Xle=up(function(fe,_e){var Xe=fe==null?0:fe.length,Lt=fy(fe,_e);return Jw(fe,Sl(_e,function(gr){return np(gr,Xe)?+gr:gr}).sort(Xw)),Lt}),JR=Xle;var Zle=Math.floor,Yle=Math.random;function Kle(fe,_e){return fe+Zle(Yle()*(_e-fe+1))}var Hy=Kle;var Jle=parseFloat,$le=Math.min,Qle=Math.random;function eue(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=Qle();return $le(fe+gr*(_e-fe+Jle("1e-"+((gr+"").length-1))),_e)}return Hy(fe,_e)}var $R=eue;var tue=Math.ceil,rue=Math.max;function aue(fe,_e,Xe,Lt){for(var gr=-1,Yr=rue(tue((_e-fe)/(Xe||1)),0),Ea=Array(Yr);Yr--;)Ea[Lt?Yr:++gr]=fe,fe+=Xe;return Ea}var QR=aue;function iue(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=Vue;var Gue=4294967295,Hue=Gue-1,Wue=Math.floor,Xue=Math.min;function Zue(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),Ln=_e===void 0;gr>>1;function Jue(fe,_e,Xe){var Lt=0,gr=fe==null?Lt:fe.length;if(typeof _e=="number"&&_e===_e&&gr<=Kue){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 Xm=Jue;function $ue(fe,_e){return Xm(fe,_e)}var C4=$ue;function Que(fe,_e,Xe){return Wy(fe,_e,xo(Xe,2))}var L4=Que;function ece(fe,_e){var Xe=fe==null?0:fe.length;if(Xe){var Lt=Xm(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=lce;var uce="Expected a function",cce=Math.max;function fce(fe,_e){if(typeof fe!="function")throw new TypeError(uce);return _e=_e==null?0:cce(Vo(_e),0),Go(function(Xe){var Lt=Xe[_e],gr=Bp(Xe,0,_e);return Lt&&Op(gr,Lt),xf(fe,this,gr)})}var B4=fce;var hce=Cd(function(fe,_e,Xe){return fe+(Xe?" ":"")+py(_e)}),N4=hce;function pce(fe,_e,Xe){return fe=Us(fe),Xe=Xe==null?0:ud(Vo(Xe),0,fe.length),_e=nh(_e),fe.slice(Xe,Xe+_e.length)==_e}var U4=pce;function dce(){return{}}var j4=dce;function vce(){return""}var q4=vce;function mce(){return!0}var V4=mce;var gce=Tm(function(fe,_e){return fe-_e},0),G4=gce;function yce(fe){return fe&&fe.length?jy(fe,Bc):0}var H4=yce;function _ce(fe,_e){return fe&&fe.length?jy(fe,xo(_e,2)):0}var W4=_ce;function xce(fe){var _e=fe==null?0:fe.length;return _e?Yf(fe,1,_e):[]}var X4=xce;function bce(fe,_e,Xe){return fe&&fe.length?(_e=Xe||_e===void 0?1:Vo(_e),Yf(fe,0,_e<0?0:_e)):[]}var Z4=bce;function wce(fe,_e,Xe){var Lt=fe==null?0:fe.length;return Lt?(_e=Xe||_e===void 0?1:Vo(_e),_e=Lt-_e,Yf(fe,_e<0?0:_e,Lt)):[]}var Y4=wce;function Tce(fe,_e){return fe&&fe.length?Um(fe,xo(_e,3),!1,!0):[]}var K4=Tce;function Ace(fe,_e){return fe&&fe.length?Um(fe,xo(_e,3)):[]}var J4=Ace;function Sce(fe,_e){return _e(fe),fe}var $4=Sce;var Q4=Object.prototype,Mce=Q4.hasOwnProperty;function Ece(fe,_e,Xe,Lt){return fe===void 0||oh(fe,Q4[Xe])&&!Mce.call(Lt,Xe)?_e:fe}var VA=Ece;var kce={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};function Cce(fe){return"\\"+kce[fe]}var eD=Cce;var Lce=/<%=([\s\S]+?)%>/g,r2=Lce;var Pce=/<%-([\s\S]+?)%>/g,tD=Pce;var Ice=/<%([\s\S]+?)%>/g,rD=Ice;var Rce={escape:tD,evaluate:rD,interpolate:r2,variable:"",imports:{_:{escape:Ew}}},y_=Rce;var Dce="Invalid `variable` option passed into `_.template`",zce=/\b__p \+= '';/g,Fce=/\b(__p \+=) '' \+/g,Oce=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Bce=/[()=,{}\[\]\/\s]/,Nce=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,a2=/($^)/,Uce=/['\n\r\u2028\u2029\\]/g,jce=Object.prototype,aD=jce.hasOwnProperty;function qce(fe,_e,Xe){var Lt=y_.imports._.templateSettings||y_;Xe&&Nc(fe,_e,Xe)&&(_e=void 0),fe=Us(fe),_e=Cm({},_e,Lt,VA);var gr=Cm({},_e.imports,Lt.imports,VA),Yr=gu(gr),Ea=Fy(gr,Yr),ei,oi,Ln=0,_n=_e.interpolate||a2,Fn="__p += '",So=RegExp((_e.escape||a2).source+"|"+_n.source+"|"+(_n===r2?Nce:a2).source+"|"+(_e.evaluate||a2).source+"|$","g"),vs=aD.call(_e,"sourceURL")?"//# sourceURL="+(_e.sourceURL+"").replace(/\s/g," ")+` -`:"";fe.replace(So,function(He,Jl,ou,jp,zf,Gh){return ou||(ou=jp),Fn+=fe.slice(Ln,Gh).replace(Uce,eD),Jl&&(ei=!0,Fn+=`' + +`)}var fC=$Z;function QZ(fe){return function(){return fe}}var Qg=QZ;var eY=function(){try{var fe=sd(Object,"defineProperty");return fe({},"",{}),fe}catch{}}(),ey=eY;var tY=ey?function(fe,_e){return ey(fe,"toString",{configurable:!0,enumerable:!1,value:Qg(_e),writable:!0})}:Bc,hC=tY;var rY=Pb(hC),ty=rY;function aY(fe,_e){for(var Xe=-1,Lt=fe==null?0:fe.length;++Xe-1}var Em=lY;var uY=1,cY=2,fY=8,hY=16,pY=32,dY=64,vY=128,mY=256,gY=512,yY=[["ary",vY],["bind",uY],["bindKey",cY],["curry",fY],["curryRight",hY],["flip",gY],["partial",pY],["partialRight",dY],["rearg",mY]];function _Y(fe,_e){return Nh(yY,function(Xe){var Lt="_."+Xe[0];_e&Xe[1]&&!Em(fe,Lt)&&fe.push(Lt)}),fe.sort()}var dC=_Y;function xY(fe,_e,Xe){var Lt=_e+"";return ty(fe,fC(Lt,dC(cC(Lt),Xe)))}var Db=xY;var bY=1,wY=2,TY=4,AY=8,vC=32,mC=64;function SY(fe,_e,Xe,Lt,gr,Zr,Ea,ei,ai,wn){var _n=_e&AY,Fn=_n?Ea:void 0,So=_n?void 0:Ea,vs=_n?Zr:void 0,Qs=_n?void 0:Zr;_e|=_n?vC:mC,_e&=~(_n?mC:vC),_e&TY||(_e&=~(bY|wY));var Ho=[fe,_e,gr,vs,Fn,Qs,So,ei,ai,wn],He=Xe.apply(void 0,Ho);return i_(fe)&&Ib(He,Ho),He.placeholder=Lt,Db(He,fe,_e)}var zb=SY;function MY(fe){var _e=fe;return _e.placeholder}var Sd=MY;var EY=9007199254740991,kY=/^(?:0|[1-9]\d*)$/;function CY(fe,_e){var Xe=typeof fe;return _e=_e??EY,!!_e&&(Xe=="number"||Xe!="symbol"&&kY.test(fe))&&fe>-1&&fe%1==0&&fe<_e}var np=CY;var LY=Math.min;function PY(fe,_e){for(var Xe=fe.length,Lt=LY(_e.length,Xe),gr=pf(fe);Lt--;){var Zr=_e[Lt];fe[Lt]=np(Zr,Xe)?gr[Zr]:void 0}return fe}var gC=PY;var yC="__lodash_placeholder__";function IY(fe,_e){for(var Xe=-1,Lt=fe.length,gr=0,Zr=[];++Xe1&&ou.reverse(),_n&&ai-1&&fe%1==0&&fe<=nK}var km=oK;function sK(fe){return fe!=null&&km(fe.length)&&!ip(fe)}var Vc=sK;function lK(fe,_e,Xe){if(!Cl(Xe))return!1;var Lt=typeof _e;return(Lt=="number"?Vc(Xe)&&np(_e,Xe.length):Lt=="string"&&_e in Xe)?oh(Xe[_e],fe):!1}var Nc=lK;function uK(fe){return Go(function(_e,Xe){var Lt=-1,gr=Xe.length,Zr=gr>1?Xe[gr-1]:void 0,Ea=gr>2?Xe[2]:void 0;for(Zr=fe.length>3&&typeof Zr=="function"?(gr--,Zr):void 0,Ea&&Nc(Xe[0],Xe[1],Ea)&&(Zr=gr<3?void 0:Zr,gr=1),_e=Object(_e);++Lt-1}var KC=BJ;function NJ(fe,_e){var Xe=this.__data__,Lt=Lm(Xe,fe);return Lt<0?(++this.size,Xe.push([fe,_e])):Xe[Lt][1]=_e,this}var JC=NJ;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 u$(fe){var _e=fe==null?0:fe.length;return _e?Qu(fe,1):[]}var qb=u$;function c$(fe){return ty(Ob(fe,void 0,qb),fe+"")}var up=c$;var f$=up(fy),lL=f$;var h$=Nb(Object.getPrototypeOf,Object),Dm=h$;var p$="[object Object]",d$=Function.prototype,v$=Object.prototype,uL=d$.toString,m$=v$.hasOwnProperty,g$=uL.call(Object);function y$(fe){if(!Dl(fe)||Oc(fe)!=p$)return!1;var _e=Dm(fe);if(_e===null)return!0;var Xe=m$.call(_e,"constructor")&&_e.constructor;return typeof Xe=="function"&&Xe instanceof Xe&&uL.call(Xe)==g$}var gv=y$;var _$="[object DOMException]",x$="[object Error]";function b$(fe){if(!Dl(fe))return!1;var _e=Oc(fe);return _e==x$||_e==_$||typeof fe.message=="string"&&typeof fe.name=="string"&&!gv(fe)}var hy=b$;var w$=Go(function(fe,_e){try{return xf(fe,void 0,_e)}catch(Xe){return hy(Xe)?Xe:new Error(Xe)}}),Vb=w$;var T$="Expected a function";function A$(fe,_e){var Xe;if(typeof _e!="function")throw new TypeError(T$);return fe=Vo(fe),function(){return--fe>0&&(Xe=_e.apply(this,arguments)),fe<=1&&(_e=void 0),Xe}}var Gb=A$;var S$=1,M$=32,PA=Go(function(fe,_e,Xe){var Lt=S$;if(Xe.length){var gr=Yp(Xe,Sd(PA));Lt|=M$}return op(fe,Lt,_e,Xe,gr)});PA.placeholder={};var Hb=PA;var E$=up(function(fe,_e){return Nh(_e,function(Xe){Xe=Eh(Xe),sp(fe,Xe,Hb(fe[Xe],fe))}),fe}),cL=E$;var k$=1,C$=2,L$=32,IA=Go(function(fe,_e,Xe){var Lt=k$|C$;if(Xe.length){var gr=Yp(Xe,Sd(IA));Lt|=L$}return op(_e,Lt,fe,Xe,gr)});IA.placeholder={};var fL=IA;function P$(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 Zr=Array(gr);++Lt=Lt?fe:Yf(fe,_e,Xe)}var Bp=I$;var R$="\\ud800-\\udfff",D$="\\u0300-\\u036f",z$="\\ufe20-\\ufe2f",F$="\\u20d0-\\u20ff",O$=D$+z$+F$,B$="\\ufe0e\\ufe0f",N$="\\u200d",U$=RegExp("["+N$+R$+O$+B$+"]");function j$(fe){return U$.test(fe)}var kd=j$;function q$(fe){return fe.split("")}var hL=q$;var pL="\\ud800-\\udfff",V$="\\u0300-\\u036f",G$="\\ufe20-\\ufe2f",H$="\\u20d0-\\u20ff",W$=V$+G$+H$,X$="\\ufe0e\\ufe0f",Z$="["+pL+"]",RA="["+W$+"]",DA="\\ud83c[\\udffb-\\udfff]",Y$="(?:"+RA+"|"+DA+")",dL="[^"+pL+"]",vL="(?:\\ud83c[\\udde6-\\uddff]){2}",mL="[\\ud800-\\udbff][\\udc00-\\udfff]",K$="\\u200d",gL=Y$+"?",yL="["+X$+"]?",J$="(?:"+K$+"(?:"+[dL,vL,mL].join("|")+")"+yL+gL+")*",$$=yL+gL+J$,Q$="(?:"+[dL+RA+"?",RA,vL,mL,Z$].join("|")+")",eQ=RegExp(DA+"(?="+DA+")|"+Q$+$$,"g");function tQ(fe){return fe.match(eQ)||[]}var _L=tQ;function rQ(fe){return kd(fe)?_L(fe):hL(fe)}var Uh=rQ;function aQ(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=aQ;var iQ=Wb("toUpperCase"),py=iQ;function nQ(fe){return py(Us(fe).toLowerCase())}var Xb=nQ;function oQ(fe,_e,Xe,Lt){var gr=-1,Zr=fe==null?0:fe.length;for(Lt&&Zr&&(Xe=fe[++gr]);++gr=_e?fe:_e)),fe}var ud=nee;function oee(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=oee;function see(){this.__data__=new Pm,this.size=0}var WL=see;function lee(fe){var _e=this.__data__,Xe=_e.delete(fe);return this.size=_e.size,Xe}var XL=lee;function uee(fe){return this.__data__.get(fe)}var ZL=uee;function cee(fe){return this.__data__.has(fe)}var YL=cee;var fee=200;function hee(fe,_e){var Xe=this.__data__;if(Xe instanceof Pm){var Lt=Xe.__data__;if(!Im||Lt.lengthei))return!1;var wn=Zr.get(fe),_n=Zr.get(_e);if(wn&&_n)return wn==_e&&_n==fe;var Fn=-1,So=!0,vs=Xe&hre?new Fm:void 0;for(Zr.set(fe,_e),Zr.set(_e,fe);++Fn=_e||Vn<0||Fn&&dd>=Zr}function Jl(){var Ff=Py();if(He(Ff))return ou(Ff);ei=setTimeout(Jl,Ho(Ff))}function ou(Ff){return ei=void 0,So&&Lt?vs(Ff):(Lt=gr=void 0,Ea)}function jp(){ei!==void 0&&clearTimeout(ei),wn=0,Lt=ai=gr=ei=void 0}function zf(){return ei===void 0?Ea:ou(Py())}function Gh(){var Ff=Py(),Vn=He(Ff);if(Lt=arguments,gr=this,ai=Ff,Vn){if(ei===void 0)return Qs(ai);if(Fn)return clearTimeout(ei),ei=setTimeout(Jl,_e),vs(ai)}return ei===void 0&&(ei=setTimeout(Jl,_e)),Ea}return Gh.cancel=jp,Gh.flush=zf,Gh}var xw=Sae;function Mae(fe,_e){return fe==null||fe!==fe?_e:fe}var QP=Mae;var eI=Object.prototype,Eae=eI.hasOwnProperty,kae=Go(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=jae&&(Zr=Hv,Ea=!1,_e=new Fm(_e));e:for(;++gr=0&&fe.slice(Xe,gr)==_e}var yI=oie;function sie(fe,_e){return Sl(_e,function(Xe){return[Xe,fe[Xe]]})}var _I=sie;function lie(fe){var _e=-1,Xe=Array(fe.size);return fe.forEach(function(Lt){Xe[++_e]=[Lt,Lt]}),Xe}var xI=lie;var uie="[object Map]",cie="[object Set]";function fie(fe){return function(_e){var Xe=jh(_e);return Xe==uie?Sy(_e):Xe==cie?xI(_e):_I(_e,fe(_e))}}var Mw=fie;var hie=Mw(gu),p_=hie;var pie=Mw(Gc),d_=pie;var die={"&":"&","<":"<",">":">",'"':""","'":"'"},vie=vy(die),bI=vie;var wI=/[&<>"']/g,mie=RegExp(wI.source);function gie(fe){return fe=Us(fe),fe&&mie.test(fe)?fe.replace(wI,bI):fe}var Ew=gie;var TI=/[\\^$.*+?()[\]{}|]/g,yie=RegExp(TI.source);function _ie(fe){return fe=Us(fe),fe&&yie.test(fe)?fe.replace(TI,"\\$&"):fe}var AI=_ie;function xie(fe,_e){for(var Xe=-1,Lt=fe==null?0:fe.length;++Xegr?0:gr+Xe),Lt=Lt===void 0||Lt>gr?gr:Vo(Lt),Lt<0&&(Lt+=gr),Lt=Xe>Lt?0:Cw(Lt);Xe-1?gr[Zr?_e[Ea]:Ea]:void 0}}var Pw=Cie;var Lie=Math.max;function Pie(fe,_e,Xe){var Lt=fe==null?0:fe.length;if(!Lt)return-1;var gr=Xe==null?0:Vo(Xe);return gr<0&&(gr=Lie(Lt+gr,0)),Mm(fe,xo(_e,3),gr)}var Iw=Pie;var Iie=Pw(Iw),LI=Iie;function Rie(fe,_e,Xe){var Lt;return Xe(fe,function(gr,Zr,Ea){if(_e(gr,Zr,Ea))return Lt=Zr,!1}),Lt}var Rw=Rie;function Die(fe,_e){return Rw(fe,xo(_e,3),fp)}var PI=Die;var zie=Math.max,Fie=Math.min;function Oie(fe,_e,Xe){var Lt=fe==null?0:fe.length;if(!Lt)return-1;var gr=Lt-1;return Xe!==void 0&&(gr=Vo(Xe),gr=Xe<0?zie(Lt+gr,0):Fie(gr,Lt-1)),Mm(fe,xo(_e,3),gr,!0)}var Dw=Oie;var Bie=Pw(Dw),II=Bie;function Nie(fe,_e){return Rw(fe,xo(_e,3),Dy)}var RI=Nie;function Uie(fe){return fe&&fe.length?fe[0]:void 0}var v_=Uie;function jie(fe,_e){var Xe=-1,Lt=Vc(fe)?Array(fe.length):[];return Up(fe,function(gr,Zr,Ea){Lt[++Xe]=_e(gr,Zr,Ea)}),Lt}var zw=jie;function qie(fe,_e){var Xe=zo(fe)?Sl:zw;return Xe(fe,xo(_e,3))}var jm=qie;function Vie(fe,_e){return Qu(jm(fe,_e),1)}var DI=Vie;var Gie=1/0;function Hie(fe,_e){return Qu(jm(fe,_e),Gie)}var zI=Hie;function Wie(fe,_e,Xe){return Xe=Xe===void 0?1:Vo(Xe),Qu(jm(fe,_e),Xe)}var FI=Wie;var Xie=1/0;function Zie(fe){var _e=fe==null?0:fe.length;return _e?Qu(fe,Xie):[]}var OI=Zie;function Yie(fe,_e){var Xe=fe==null?0:fe.length;return Xe?(_e=_e===void 0?1:Vo(_e),Qu(fe,_e)):[]}var BI=Yie;var Kie=512;function Jie(fe){return op(fe,Kie)}var NI=Jie;var $ie=gy("floor"),UI=$ie;var Qie="Expected a function",ene=8,tne=32,rne=128,ane=256;function ine(fe){return up(function(_e){var Xe=_e.length,Lt=Xe,gr=zp.prototype.thru;for(fe&&_e.reverse();Lt--;){var Zr=_e[Lt];if(typeof Zr!="function")throw new TypeError(Qie);if(gr&&!Ea&&$g(Zr)=="wrapper")var Ea=new zp([],!0)}for(Lt=Ea?Lt:Xe;++Lt_e}var zy=yne;function _ne(fe){return function(_e,Xe){return typeof _e=="string"&&typeof Xe=="string"||(_e=Sh(_e),Xe=Sh(Xe)),fe(_e,Xe)}}var Vm=_ne;var xne=Vm(zy),JI=xne;var bne=Vm(function(fe,_e){return fe>=_e}),$I=bne;var wne=Object.prototype,Tne=wne.hasOwnProperty;function Ane(fe,_e){return fe!=null&&Tne.call(fe,_e)}var QI=Ane;function Sne(fe,_e){return fe!=null&&dw(fe,_e,QI)}var e8=Sne;var Mne=Math.max,Ene=Math.min;function kne(fe,_e,Xe){return fe>=Ene(_e,Xe)&&fe-1:!!gr&&Ad(fe,_e,Xe)>-1}var a8=zne;var Fne=Math.max;function One(fe,_e,Xe){var Lt=fe==null?0:fe.length;if(!Lt)return-1;var gr=Xe==null?0:Vo(Xe);return gr<0&&(gr=Fne(Lt+gr,0)),Ad(fe,_e,gr)}var i8=One;function Bne(fe){var _e=fe==null?0:fe.length;return _e?Yf(fe,0,-1):[]}var n8=Bne;var Nne=Math.min;function Une(fe,_e,Xe){for(var Lt=Xe?Ry:Em,gr=fe[0].length,Zr=fe.length,Ea=Zr,ei=Array(Zr),ai=1/0,wn=[];Ea--;){var _n=fe[Ea];Ea&&_e&&(_n=Sl(_n,wf(_e))),ai=Nne(_n.length,ai),ei[Ea]=!Xe&&(_e||gr>=120&&_n.length>=120)?new Fm(Ea&&_n):void 0}_n=fe[0];var Fn=-1,So=ei[0];e:for(;++Fn=-F8&&fe<=F8}var O8=zoe;function Foe(fe){return fe===void 0}var B8=Foe;var Ooe="[object WeakMap]";function Boe(fe){return Dl(fe)&&jh(fe)==Ooe}var N8=Boe;var Noe="[object WeakSet]";function Uoe(fe){return Dl(fe)&&Oc(fe)==Noe}var U8=Uoe;var joe=1;function qoe(fe){return xo(typeof fe=="function"?fe:cp(fe,joe))}var j8=qoe;var Voe=Array.prototype,Goe=Voe.join;function Hoe(fe,_e){return fe==null?"":Goe.call(fe,_e)}var q8=Hoe;var Woe=Cd(function(fe,_e,Xe){return fe+(Xe?"-":"")+_e.toLowerCase()}),V8=Woe;var Xoe=Nm(function(fe,_e,Xe){sp(fe,Xe,_e)}),G8=Xoe;function Zoe(fe,_e,Xe){for(var Lt=Xe+1;Lt--;)if(fe[Lt]===_e)return Lt;return Lt}var H8=Zoe;var Yoe=Math.max,Koe=Math.min;function Joe(fe,_e,Xe){var Lt=fe==null?0:fe.length;if(!Lt)return-1;var gr=Lt;return Xe!==void 0&&(gr=Vo(Xe),gr=gr<0?Yoe(Lt+gr,0):Koe(gr,Lt-1)),_e===_e?H8(fe,_e,gr):Mm(fe,Rb,gr,!0)}var W8=Joe;var $oe=Cd(function(fe,_e,Xe){return fe+(Xe?" ":"")+_e.toLowerCase()}),X8=$oe;var Qoe=Wb("toLowerCase"),Z8=Qoe;function ese(fe,_e){return fe<_e}var Uy=ese;var tse=Vm(Uy),Y8=tse;var rse=Vm(function(fe,_e){return fe<=_e}),K8=rse;function ase(fe,_e){var Xe={};return _e=xo(_e,3),fp(fe,function(Lt,gr,Zr){sp(Xe,_e(Lt,gr,Zr),Lt)}),Xe}var J8=ase;function ise(fe,_e){var Xe={};return _e=xo(_e,3),fp(fe,function(Lt,gr,Zr){sp(Xe,gr,_e(Lt,gr,Zr))}),Xe}var $8=ise;var nse=1;function ose(fe){return pw(cp(fe,nse))}var Q8=ose;var sse=1;function lse(fe,_e){return vw(fe,cp(_e,sse))}var eR=lse;function use(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=Lse;function Pse(fe,_e){var Xe=fe.length;if(Xe)return _e+=_e<0?Xe:0,np(_e,Xe)?fe[_e]:void 0}var Gw=Pse;function Ise(fe,_e){return fe&&fe.length?Gw(fe,Vo(_e)):void 0}var pR=Ise;function Rse(fe){return fe=Vo(fe),Go(function(_e){return Gw(_e,fe)})}var dR=Rse;function Dse(fe,_e){return _e=Fp(_e,fe),fe=Bw(fe,_e),fe==null||delete fe[Eh(Tf(_e))]}var qy=Dse;function zse(fe){return gv(fe)?void 0:fe}var vR=zse;var Fse=1,Ose=2,Bse=4,Nse=up(function(fe,_e){var Xe={};if(fe==null)return Xe;var Lt=!1;_e=Sl(_e,function(Zr){return Zr=Fp(Zr,fe),Lt||(Lt=Zr.length>1),Zr}),Mh(fe,by(fe),Xe),Lt&&(Xe=cp(Xe,Fse|Ose|Bse,vR));for(var gr=_e.length;gr--;)qy(Xe,_e[gr]);return Xe}),mR=Nse;function Use(fe,_e,Xe,Lt){if(!Cl(fe))return fe;_e=Fp(_e,fe);for(var gr=-1,Zr=_e.length,Ea=Zr-1,ei=fe;ei!=null&&++gr_e||Zr&&Ea&&ai&&!ei&&!wn||Lt&&Ea&&ai||!Xe&&ai||!gr)return 1;if(!Lt&&!Zr&&!wn&&fe<_e||wn&&Xe&&gr&&!Lt&&!Zr||ei&&Xe&&gr||!Ea&&gr||!ai)return-1}return 0}var Xw=Wse;function Xse(fe,_e,Xe){for(var Lt=-1,gr=fe.criteria,Zr=_e.criteria,Ea=gr.length,ei=Xe.length;++Lt=ei)return ai;var wn=Xe[Lt];return ai*(wn=="desc"?-1:1)}}return fe.index-_e.index}var xR=Xse;function Zse(fe,_e,Xe){_e.length?_e=Sl(_e,function(Zr){return zo(Zr)?function(Ea){return ld(Ea,Zr.length===1?Zr[0]:Zr)}:Zr}):_e=[Bc];var Lt=-1;_e=Sl(_e,wf(xo));var gr=zw(fe,function(Zr,Ea,ei){var ai=Sl(_e,function(wn){return wn(Zr)});return{criteria:ai,index:++Lt,value:Zr}});return _R(gr,function(Zr,Ea){return xR(Zr,Ea,Xe)})}var Zw=Zse;function Yse(fe,_e,Xe,Lt){return fe==null?[]:(zo(_e)||(_e=_e==null?[]:[_e]),Xe=Lt?void 0:Xe,zo(Xe)||(Xe=Xe==null?[]:[Xe]),Zw(fe,_e,Xe))}var bR=Yse;function Kse(fe){return up(function(_e){return _e=Sl(_e,wf(xo)),Go(function(Xe){var Lt=this;return fe(_e,function(gr){return xf(gr,Lt,Xe)})})})}var Vy=Kse;var Jse=Vy(Sl),wR=Jse;var $se=Go,TR=$se;var Qse=Math.min,ele=TR(function(fe,_e){_e=_e.length==1&&zo(_e[0])?Sl(_e[0],wf(xo)):Sl(Qu(_e,1),wf(xo));var Xe=_e.length;return Go(function(Lt){for(var gr=-1,Zr=Qse(Lt.length,Xe);++grale)return Xe;do _e%2&&(Xe+=fe),_e=ile(_e/2),_e&&(fe+=fe);while(_e);return Xe}var m_=nle;var ole=Cy("length"),ER=ole;var CR="\\ud800-\\udfff",sle="\\u0300-\\u036f",lle="\\ufe20-\\ufe2f",ule="\\u20d0-\\u20ff",cle=sle+lle+ule,fle="\\ufe0e\\ufe0f",hle="["+CR+"]",NA="["+cle+"]",UA="\\ud83c[\\udffb-\\udfff]",ple="(?:"+NA+"|"+UA+")",LR="[^"+CR+"]",PR="(?:\\ud83c[\\udde6-\\uddff]){2}",IR="[\\ud800-\\udbff][\\udc00-\\udfff]",dle="\\u200d",RR=ple+"?",DR="["+fle+"]?",vle="(?:"+dle+"(?:"+[LR,PR,IR].join("|")+")"+DR+RR+")*",mle=DR+RR+vle,gle="(?:"+[LR+NA+"?",NA,PR,IR,hle].join("|")+")",kR=RegExp(UA+"(?="+UA+")|"+gle+mle,"g");function yle(fe){for(var _e=kR.lastIndex=0;kR.test(fe);)++_e;return _e}var zR=yle;function _le(fe){return kd(fe)?zR(fe):ER(fe)}var Pd=_le;var xle=Math.ceil;function ble(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,xle(fe/Pd(_e)));return kd(_e)?Bp(Uh(Lt),0,fe).join(""):Lt.slice(0,fe)}var H0=ble;var wle=Math.ceil,Tle=Math.floor;function Ale(fe,_e,Xe){fe=Us(fe),_e=Vo(_e);var Lt=_e?Pd(fe):0;if(!_e||Lt>=_e)return fe;var gr=(_e-Lt)/2;return H0(Tle(gr),Xe)+fe+H0(wle(gr),Xe)}var FR=Ale;function Sle(fe,_e,Xe){fe=Us(fe),_e=Vo(_e);var Lt=_e?Pd(fe):0;return _e&&Lt<_e?fe+H0(_e-Lt,Xe):fe}var OR=Sle;function Mle(fe,_e,Xe){fe=Us(fe),_e=Vo(_e);var Lt=_e?Pd(fe):0;return _e&&Lt<_e?H0(_e-Lt,Xe)+fe:fe}var BR=Mle;var Ele=/^\s+/,kle=wu.parseInt;function Cle(fe,_e,Xe){return Xe||_e==null?_e=0:_e&&(_e=+_e),kle(Us(fe).replace(Ele,""),_e||0)}var NR=Cle;var Lle=32,jA=Go(function(fe,_e){var Xe=Yp(_e,Sd(jA));return op(fe,Lle,void 0,_e,Xe)});jA.placeholder={};var Yw=jA;var Ple=64,qA=Go(function(fe,_e){var Xe=Yp(_e,Sd(qA));return op(fe,Ple,void 0,_e,Xe)});qA.placeholder={};var UR=qA;var Ile=Nm(function(fe,_e,Xe){fe[Xe?0:1].push(_e)},function(){return[[],[]]}),jR=Ile;function Rle(fe,_e){return Hw(fe,_e,function(Xe,Lt){return ky(fe,Lt)})}var qR=Rle;var Dle=up(function(fe,_e){return fe==null?{}:qR(fe,_e)}),VR=Dle;function zle(fe){for(var _e,Xe=this;Xe instanceof Am;){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=zle;function Fle(fe){return function(_e){return fe==null?void 0:ld(fe,_e)}}var HR=Fle;function Ole(fe,_e,Xe,Lt){for(var gr=Xe-1,Zr=fe.length;++gr-1;)ei!==fe&&XR.call(ei,ai,1),XR.call(fe,ai,1);return fe}var Gy=Nle;function Ule(fe,_e){return fe&&fe.length&&_e&&_e.length?Gy(fe,_e):fe}var Kw=Ule;var jle=Go(Kw),ZR=jle;function qle(fe,_e,Xe){return fe&&fe.length&&_e&&_e.length?Gy(fe,_e,xo(Xe,2)):fe}var YR=qle;function Vle(fe,_e,Xe){return fe&&fe.length&&_e&&_e.length?Gy(fe,_e,void 0,Xe):fe}var KR=Vle;var Gle=Array.prototype,Hle=Gle.splice;function Wle(fe,_e){for(var Xe=fe?_e.length:0,Lt=Xe-1;Xe--;){var gr=_e[Xe];if(Xe==Lt||gr!==Zr){var Zr=gr;np(gr)?Hle.call(fe,gr,1):qy(fe,gr)}}return fe}var Jw=Wle;var Xle=up(function(fe,_e){var Xe=fe==null?0:fe.length,Lt=fy(fe,_e);return Jw(fe,Sl(_e,function(gr){return np(gr,Xe)?+gr:gr}).sort(Xw)),Lt}),JR=Xle;var Zle=Math.floor,Yle=Math.random;function Kle(fe,_e){return fe+Zle(Yle()*(_e-fe+1))}var Hy=Kle;var Jle=parseFloat,$le=Math.min,Qle=Math.random;function eue(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=Qle();return $le(fe+gr*(_e-fe+Jle("1e-"+((gr+"").length-1))),_e)}return Hy(fe,_e)}var $R=eue;var tue=Math.ceil,rue=Math.max;function aue(fe,_e,Xe,Lt){for(var gr=-1,Zr=rue(tue((_e-fe)/(Xe||1)),0),Ea=Array(Zr);Zr--;)Ea[Lt?Zr:++gr]=fe,fe+=Xe;return Ea}var QR=aue;function iue(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=Vue;var Gue=4294967295,Hue=Gue-1,Wue=Math.floor,Xue=Math.min;function Zue(fe,_e,Xe,Lt){var gr=0,Zr=fe==null?0:fe.length;if(Zr===0)return 0;_e=Xe(_e);for(var Ea=_e!==_e,ei=_e===null,ai=Rf(_e),wn=_e===void 0;gr>>1;function Jue(fe,_e,Xe){var Lt=0,gr=fe==null?Lt:fe.length;if(typeof _e=="number"&&_e===_e&&gr<=Kue){for(;Lt>>1,Ea=fe[Zr];Ea!==null&&!Rf(Ea)&&(Xe?Ea<=_e:Ea<_e)?Lt=Zr+1:gr=Zr}return gr}return Wy(fe,_e,Bc,Xe)}var Xm=Jue;function $ue(fe,_e){return Xm(fe,_e)}var C4=$ue;function Que(fe,_e,Xe){return Wy(fe,_e,xo(Xe,2))}var L4=Que;function ece(fe,_e){var Xe=fe==null?0:fe.length;if(Xe){var Lt=Xm(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=lce;var uce="Expected a function",cce=Math.max;function fce(fe,_e){if(typeof fe!="function")throw new TypeError(uce);return _e=_e==null?0:cce(Vo(_e),0),Go(function(Xe){var Lt=Xe[_e],gr=Bp(Xe,0,_e);return Lt&&Op(gr,Lt),xf(fe,this,gr)})}var B4=fce;var hce=Cd(function(fe,_e,Xe){return fe+(Xe?" ":"")+py(_e)}),N4=hce;function pce(fe,_e,Xe){return fe=Us(fe),Xe=Xe==null?0:ud(Vo(Xe),0,fe.length),_e=nh(_e),fe.slice(Xe,Xe+_e.length)==_e}var U4=pce;function dce(){return{}}var j4=dce;function vce(){return""}var q4=vce;function mce(){return!0}var V4=mce;var gce=Tm(function(fe,_e){return fe-_e},0),G4=gce;function yce(fe){return fe&&fe.length?jy(fe,Bc):0}var H4=yce;function _ce(fe,_e){return fe&&fe.length?jy(fe,xo(_e,2)):0}var W4=_ce;function xce(fe){var _e=fe==null?0:fe.length;return _e?Yf(fe,1,_e):[]}var X4=xce;function bce(fe,_e,Xe){return fe&&fe.length?(_e=Xe||_e===void 0?1:Vo(_e),Yf(fe,0,_e<0?0:_e)):[]}var Z4=bce;function wce(fe,_e,Xe){var Lt=fe==null?0:fe.length;return Lt?(_e=Xe||_e===void 0?1:Vo(_e),_e=Lt-_e,Yf(fe,_e<0?0:_e,Lt)):[]}var Y4=wce;function Tce(fe,_e){return fe&&fe.length?Um(fe,xo(_e,3),!1,!0):[]}var K4=Tce;function Ace(fe,_e){return fe&&fe.length?Um(fe,xo(_e,3)):[]}var J4=Ace;function Sce(fe,_e){return _e(fe),fe}var $4=Sce;var Q4=Object.prototype,Mce=Q4.hasOwnProperty;function Ece(fe,_e,Xe,Lt){return fe===void 0||oh(fe,Q4[Xe])&&!Mce.call(Lt,Xe)?_e:fe}var VA=Ece;var kce={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};function Cce(fe){return"\\"+kce[fe]}var eD=Cce;var Lce=/<%=([\s\S]+?)%>/g,r2=Lce;var Pce=/<%-([\s\S]+?)%>/g,tD=Pce;var Ice=/<%([\s\S]+?)%>/g,rD=Ice;var Rce={escape:tD,evaluate:rD,interpolate:r2,variable:"",imports:{_:{escape:Ew}}},y_=Rce;var Dce="Invalid `variable` option passed into `_.template`",zce=/\b__p \+= '';/g,Fce=/\b(__p \+=) '' \+/g,Oce=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Bce=/[()=,{}\[\]\/\s]/,Nce=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,a2=/($^)/,Uce=/['\n\r\u2028\u2029\\]/g,jce=Object.prototype,aD=jce.hasOwnProperty;function qce(fe,_e,Xe){var Lt=y_.imports._.templateSettings||y_;Xe&&Nc(fe,_e,Xe)&&(_e=void 0),fe=Us(fe),_e=Cm({},_e,Lt,VA);var gr=Cm({},_e.imports,Lt.imports,VA),Zr=gu(gr),Ea=Fy(gr,Zr),ei,ai,wn=0,_n=_e.interpolate||a2,Fn="__p += '",So=RegExp((_e.escape||a2).source+"|"+_n.source+"|"+(_n===r2?Nce:a2).source+"|"+(_e.evaluate||a2).source+"|$","g"),vs=aD.call(_e,"sourceURL")?"//# sourceURL="+(_e.sourceURL+"").replace(/\s/g," ")+` +`:"";fe.replace(So,function(He,Jl,ou,jp,zf,Gh){return ou||(ou=jp),Fn+=fe.slice(wn,Gh).replace(Uce,eD),Jl&&(ei=!0,Fn+=`' + __e(`+Jl+`) + -'`),zf&&(oi=!0,Fn+=`'; +'`),zf&&(ai=!0,Fn+=`'; `+zf+`; __p += '`),ou&&(Fn+=`' + ((__t = (`+ou+`)) == null ? '' : __t) + -'`),Ln=Gh+He.length,He}),Fn+=`'; +'`),wn=Gh+He.length,He}),Fn+=`'; `;var Qs=aD.call(_e,"variable")&&_e.variable;if(!Qs)Fn=`with (obj) { `+Fn+` } -`;else if(Bce.test(Qs))throw new Error(Dce);Fn=(oi?Fn.replace(zce,""):Fn).replace(Fce,"$1").replace(Oce,"$1;"),Fn="function("+(Qs||"obj")+`) { +`;else if(Bce.test(Qs))throw new Error(Dce);Fn=(ai?Fn.replace(zce,""):Fn).replace(Fce,"$1").replace(Oce,"$1;"),Fn="function("+(Qs||"obj")+`) { `+(Qs?"":`obj || (obj = {}); -`)+"var __t, __p = ''"+(ei?", __e = _.escape":"")+(oi?`, __j = Array.prototype.join; +`)+"var __t, __p = ''"+(ei?", __e = _.escape":"")+(ai?`, __j = Array.prototype.join; function print() { __p += __j.call(arguments, '') } `:`; `)+Fn+`return __p -}`;var Ho=Vb(function(){return Function(Yr,vs+"return "+Fn).apply(void 0,Ea)});if(Ho.source=Fn,hy(Ho))throw Ho;return Ho}var iD=qce;var Vce="Expected a function";function Gce(fe,_e,Xe){var Lt=!0,gr=!0;if(typeof fe!="function")throw new TypeError(Vce);return Cl(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=Gce;function Hce(fe,_e){return _e(fe)}var Xv=Hce;var Wce=9007199254740991,GA=4294967295,Xce=Math.min;function Zce(fe,_e){if(fe=Vo(fe),fe<1||fe>Wce)return[];var Xe=GA,Lt=Xce(fe,GA);_e=kh(_e),fe-=GA;for(var gr=ay(Lt,_e);++Xe-1;);return Xe}var n2=afe;function ife(fe,_e){for(var Xe=-1,Lt=fe.length;++Xe-1;);return Xe}var o2=ife;function nfe(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=nfe;function ofe(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=ofe;var sfe=/^\s+/;function lfe(fe,_e,Xe){if(fe=Us(fe),fe&&(Xe||_e===void 0))return fe.replace(sfe,"");if(!fe||!(_e=nh(_e)))return fe;var Lt=Uh(fe),gr=o2(Lt,Uh(_e));return Bp(Lt,gr).join("")}var mD=lfe;var ufe=30,cfe="...",ffe=/\w*$/;function hfe(fe,_e){var Xe=ufe,Lt=cfe;if(Cl(_e)){var gr="separator"in _e?_e.separator:gr;Xe="length"in _e?Vo(_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 Ln,_n=oi;for(gr.global||(gr=RegExp(gr.source,Us(ffe.exec(gr))+"g")),gr.lastIndex=0;Ln=gr.exec(_n);)var Fn=Ln.index;oi=oi.slice(0,Fn===void 0?ei:Fn)}}else if(fe.indexOf(nh(gr),ei)!=ei){var So=oi.lastIndexOf(gr);So>-1&&(oi=oi.slice(0,So))}return oi+Lt}var gD=hfe;function pfe(fe){return Fb(fe,1)}var yD=pfe;var dfe={"&":"&","<":"<",">":">",""":'"',"'":"'"},vfe=vy(dfe),_D=vfe;var xD=/&(?:amp|lt|gt|quot|#39);/g,mfe=RegExp(xD.source);function gfe(fe){return fe=Us(fe),fe&&mfe.test(fe)?fe.replace(xD,_D):fe}var bD=gfe;var yfe=1/0,_fe=zm&&1/Om(new zm([,-0]))[1]==yfe?function(fe){return new zm(fe)}:Kg,wD=_fe;var xfe=200;function bfe(fe,_e,Xe){var Lt=-1,gr=Em,Yr=fe.length,Ea=!0,ei=[],oi=ei;if(Xe)Ea=!1,gr=Ry;else if(Yr>=xfe){var Ln=_e?null:wD(fe);if(Ln)return Om(Ln);Ea=!1,gr=Hv,oi=new Fm}else oi=_e?[]:ei;e:for(;++Lt1||this.__actions__.length||!(Lt instanceof Bl)||!np(Xe)?this.thru(gr):(Lt=Lt.slice(Xe,+Xe+(_e?1:0)),Lt.__actions__.push({func:Xv,args:[gr],thisArg:void 0}),new zp(Lt,this.__chain__).thru(function(Yr){return _e&&!Yr.length&&Yr.push(void 0),Yr}))}),OD=jfe;function qfe(){return Kb(this)}var BD=qfe;function Vfe(){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:Xv,args:[g_],thisArg:void 0}),new zp(_e,this.__chain__)}return this.thru(g_)}var ND=Vfe;function Gfe(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=$fe;var gs={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:jm,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:Wv,once:yR,overArgs:AR,partial:Yw,partialRight:UR,rearg:r4,rest:c4,spread:B4,throttle:nD,unary:yD,wrap:FD};var Vs={castArray:qL,clone:AP,cloneDeep:SP,cloneDeepWith:MP,cloneWith:EP,conformsTo:WP,eq:oh,gt:JI,gte:$I,isArguments:pd,isArray:zo,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:ip,isInteger:Nw,isLength:km,isMap:nw,isMatch:E8,isMatchWith:k8,isNaN:C8,isNative:P8,isNil:I8,isNull:R8,isNumber:Uw,isObject:Cl,isObjectLike:Dl,isPlainObject:gv,isRegExp:Ny,isSafeInteger:O8,isSet:ow,isString:Gm,isSymbol:Rf,isTypedArray:Ed,isUndefined:B8,isWeakMap:N8,isWeakSet:U8,lt:Y8,lte:K8,toArray:Vw,toFinite:od,toInteger:Vo,toLength:Cw,toNumber:Sh,toPlainObject:bw,toSafeInteger:fD,toString:Us};var bp={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:Cm,assignWith:jC,at:lL,create:KP,defaults:tI,defaultsDeep:oI,entries:p_,entriesIn:d_,extend:s_,extendWith:Cm,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:Xv,toIterator:sD,toJSON:Zm,value:Zm,valueOf:Zm,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 Qfe(){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=Qfe;function ehe(){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=ehe;var the=Math.max,rhe=Math.min;function ahe(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=Vo(_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)};fp(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,Ln=ei[0],_n=oi||zo(Ea),Fn=function(Jl){var ou=gr.apply(da,Op([Jl],ei));return Lt&&So?ou[0]:ou};_n&&Xe&&typeof Ln=="function"&&Ln.length!=1&&(oi=_n=!1);var So=this.__chain__,vs=!!this.__actions__.length,Qs=Yr&&!So,Ho=oi&&!vs;if(!Yr&&_n){Ea=Ho?Ea:new Bl(this);var He=fe.apply(Ea,ei);return He.__actions__.push({func:Xv,args:[Fn],thisArg:void 0}),new zp(He,So)}return Qs&&Ho?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=hhe[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(zo(Yr)?Yr:[],gr)}return this[Xe](function(Ea){return _e.apply(zo(Ea)?Ea:[],gr)})}});fp(Bl.prototype,function(fe,_e){var Xe=da[_e];if(Xe){var Lt=Xe.name+"";e7.call(Sm,Lt)||(Sm[Lt]=[]),Sm[Lt].push({name:_e,func:Xe})}});Sm[ry(void 0,uhe).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 ef=da;var Rd=fX(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=ef.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;ef.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;_he(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=ef.cloneDeep(this.model.get("_widget_data")),Yr=ef.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");(ef.isNil(Xe)||ef.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 ef.mergeWith({},this.el._fullData,this.el.data,i7)}getFullLayout(){return ef.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 _n=0;_n=0;gr--)Lt.splice(0,0,fe[_e[gr]]),fe.splice(_e[gr],1);var Yr=ef(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 Ln=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 kHe=()=>{let fe;return{initialize(_e){fe=new XA(_e.model,vhe),fe.initialize()},render({el:_e}){let Xe=new ZA(fe,_e);return Xe.perform_render(),()=>Xe.remove()}}};export{XA as FigureModel,ZA as FigureView,kHe as default}; +}`;var Ho=Vb(function(){return Function(Zr,vs+"return "+Fn).apply(void 0,Ea)});if(Ho.source=Fn,hy(Ho))throw Ho;return Ho}var iD=qce;var Vce="Expected a function";function Gce(fe,_e,Xe){var Lt=!0,gr=!0;if(typeof fe!="function")throw new TypeError(Vce);return Cl(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=Gce;function Hce(fe,_e){return _e(fe)}var Xv=Hce;var Wce=9007199254740991,GA=4294967295,Xce=Math.min;function Zce(fe,_e){if(fe=Vo(fe),fe<1||fe>Wce)return[];var Xe=GA,Lt=Xce(fe,GA);_e=kh(_e),fe-=GA;for(var gr=ay(Lt,_e);++Xe-1;);return Xe}var n2=afe;function ife(fe,_e){for(var Xe=-1,Lt=fe.length;++Xe-1;);return Xe}var o2=ife;function nfe(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),Zr=o2(Lt,gr),Ea=n2(Lt,gr)+1;return Bp(Lt,Zr,Ea).join("")}var dD=nfe;function ofe(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=ofe;var sfe=/^\s+/;function lfe(fe,_e,Xe){if(fe=Us(fe),fe&&(Xe||_e===void 0))return fe.replace(sfe,"");if(!fe||!(_e=nh(_e)))return fe;var Lt=Uh(fe),gr=o2(Lt,Uh(_e));return Bp(Lt,gr).join("")}var mD=lfe;var ufe=30,cfe="...",ffe=/\w*$/;function hfe(fe,_e){var Xe=ufe,Lt=cfe;if(Cl(_e)){var gr="separator"in _e?_e.separator:gr;Xe="length"in _e?Vo(_e.length):Xe,Lt="omission"in _e?nh(_e.omission):Lt}fe=Us(fe);var Zr=fe.length;if(kd(fe)){var Ea=Uh(fe);Zr=Ea.length}if(Xe>=Zr)return fe;var ei=Xe-Pd(Lt);if(ei<1)return Lt;var ai=Ea?Bp(Ea,0,ei).join(""):fe.slice(0,ei);if(gr===void 0)return ai+Lt;if(Ea&&(ei+=ai.length-ei),Ny(gr)){if(fe.slice(ei).search(gr)){var wn,_n=ai;for(gr.global||(gr=RegExp(gr.source,Us(ffe.exec(gr))+"g")),gr.lastIndex=0;wn=gr.exec(_n);)var Fn=wn.index;ai=ai.slice(0,Fn===void 0?ei:Fn)}}else if(fe.indexOf(nh(gr),ei)!=ei){var So=ai.lastIndexOf(gr);So>-1&&(ai=ai.slice(0,So))}return ai+Lt}var gD=hfe;function pfe(fe){return Fb(fe,1)}var yD=pfe;var dfe={"&":"&","<":"<",">":">",""":'"',"'":"'"},vfe=vy(dfe),_D=vfe;var xD=/&(?:amp|lt|gt|quot|#39);/g,mfe=RegExp(xD.source);function gfe(fe){return fe=Us(fe),fe&&mfe.test(fe)?fe.replace(xD,_D):fe}var bD=gfe;var yfe=1/0,_fe=zm&&1/Om(new zm([,-0]))[1]==yfe?function(fe){return new zm(fe)}:Kg,wD=_fe;var xfe=200;function bfe(fe,_e,Xe){var Lt=-1,gr=Em,Zr=fe.length,Ea=!0,ei=[],ai=ei;if(Xe)Ea=!1,gr=Ry;else if(Zr>=xfe){var wn=_e?null:wD(fe);if(wn)return Om(wn);Ea=!1,gr=Hv,ai=new Fm}else ai=_e?[]:ei;e:for(;++Lt1||this.__actions__.length||!(Lt instanceof Bl)||!np(Xe)?this.thru(gr):(Lt=Lt.slice(Xe,+Xe+(_e?1:0)),Lt.__actions__.push({func:Xv,args:[gr],thisArg:void 0}),new zp(Lt,this.__chain__).thru(function(Zr){return _e&&!Zr.length&&Zr.push(void 0),Zr}))}),OD=jfe;function qfe(){return Kb(this)}var BD=qfe;function Vfe(){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:Xv,args:[g_],thisArg:void 0}),new zp(_e,this.__chain__)}return this.thru(g_)}var ND=Vfe;function Gfe(fe,_e,Xe){var Lt=fe.length;if(Lt<2)return Lt?Jp(fe[0]):[];for(var gr=-1,Zr=Array(Lt);++gr1?fe[_e-1]:void 0;return Xe=typeof Xe=="function"?(fe.pop(),Xe):void 0,s2(fe,Xe)}),WD=$fe;var gs={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:jm,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:Wv,once:yR,overArgs:AR,partial:Yw,partialRight:UR,rearg:r4,rest:c4,spread:B4,throttle:nD,unary:yD,wrap:FD};var Vs={castArray:qL,clone:AP,cloneDeep:SP,cloneDeepWith:MP,cloneWith:EP,conformsTo:WP,eq:oh,gt:JI,gte:$I,isArguments:pd,isArray:zo,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:ip,isInteger:Nw,isLength:km,isMap:nw,isMatch:E8,isMatchWith:k8,isNaN:C8,isNative:P8,isNil:I8,isNull:R8,isNumber:Uw,isObject:Cl,isObjectLike:Dl,isPlainObject:gv,isRegExp:Ny,isSafeInteger:O8,isSet:ow,isString:Gm,isSymbol:Rf,isTypedArray:Ed,isUndefined:B8,isWeakMap:N8,isWeakSet:U8,lt:Y8,lte:K8,toArray:Vw,toFinite:od,toInteger:Vo,toLength:Cw,toNumber:Sh,toPlainObject:bw,toSafeInteger:fD,toString:Us};var bp={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:Cm,assignWith:jC,at:lL,create:KP,defaults:tI,defaultsDeep:oI,entries:p_,entriesIn:d_,extend:s_,extendWith:Cm,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:Xv,toIterator:sD,toJSON:Zm,value:Zm,valueOf:Zm,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 Qfe(){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=Qfe;function ehe(){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=ehe;var the=Math.max,rhe=Math.min;function ahe(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=Vo(_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)};fp(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],Zr=Lt||/^find/.test(_e);gr&&(da.prototype[_e]=function(){var Ea=this.__wrapped__,ei=Lt?[1]:arguments,ai=Ea instanceof Bl,wn=ei[0],_n=ai||zo(Ea),Fn=function(Jl){var ou=gr.apply(da,Op([Jl],ei));return Lt&&So?ou[0]:ou};_n&&Xe&&typeof wn=="function"&&wn.length!=1&&(ai=_n=!1);var So=this.__chain__,vs=!!this.__actions__.length,Qs=Zr&&!So,Ho=ai&&!vs;if(!Zr&&_n){Ea=Ho?Ea:new Bl(this);var He=fe.apply(Ea,ei);return He.__actions__.push({func:Xv,args:[Fn],thisArg:void 0}),new zp(He,So)}return Qs&&Ho?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=hhe[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 Zr=this.value();return _e.apply(zo(Zr)?Zr:[],gr)}return this[Xe](function(Ea){return _e.apply(zo(Ea)?Ea:[],gr)})}});fp(Bl.prototype,function(fe,_e){var Xe=da[_e];if(Xe){var Lt=Xe.name+"";e7.call(Sm,Lt)||(Sm[Lt]=[]),Sm[Lt].push({name:_e,func:Xe})}});Sm[ry(void 0,uhe).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 ef=da;var Rd=fX(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=ef.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;ef.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;_he(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),Zr=0;Zrthis.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=ef.cloneDeep(this.model.get("_widget_data")),Zr=ef.cloneDeep(this.model.get("_widget_layout"));Zr.height||(Zr.height=360);var Ea=this.model.get("_config");Ea.editSelection=!1,Rd.default.newPlot(_e.el,gr,Zr,Ea).then(function(){_e._sendTraceDeltas(Lt),_e._sendLayoutDelta(Xe),_e.el.on("plotly_restyle",function(ai){_e.handle_plotly_restyle(ai)}),_e.el.on("plotly_relayout",function(ai){_e.handle_plotly_relayout(ai)}),_e.el.on("plotly_update",function(ai){_e.handle_plotly_update(ai)}),_e.el.on("plotly_click",function(ai){_e.handle_plotly_click(ai)}),_e.el.on("plotly_hover",function(ai){_e.handle_plotly_hover(ai)}),_e.el.on("plotly_unhover",function(ai){_e.handle_plotly_unhover(ai)}),_e.el.on("plotly_selected",function(ai){_e.handle_plotly_selected(ai)}),_e.el.on("plotly_deselect",function(ai){_e.handle_plotly_deselect(ai)}),_e.el.on("plotly_doubleclick",function(ai){_e.handle_plotly_doubleclick(ai)});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");(ef.isNil(Xe)||ef.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 ef.mergeWith({},this.el._fullData,this.el.data,i7)}getFullLayout(){return ef.mergeWith({},this.el._fullLayout,this.el.layout,i7)}buildPointsObject(_e){var Xe;if(_e.hasOwnProperty("points")){var Lt=_e.points,gr=Lt.length,Zr=!0;for(let _n=0;_n/^x\d*$/.test(wn)),Zr=Object.keys(Lt||{}).some(wn=>/^y\d*$/.test(wn));if(!gr||!Zr)return null;Xe={type:"box",selector_state:Lt}}else if(_e.hasOwnProperty("lassoPoints")){var Ea=_e.lassoPoints,ei=Object.keys(Ea||{}).some(wn=>/^x\d*$/.test(wn)),ai=Object.keys(Ea||{}).some(wn=>/^y\d*$/.test(wn));if(!ei||!ai)return null;Xe={type:"lasso",selector_state:Ea}}else Xe=null;return Xe}handle_plotly_restyle(_e){if(_e!=null&&!(_e[0]&&_e[0].hasOwnProperty("_doNotReportToPy"))){var Xe=_e[0],Lt=_e[1],gr={style_data:Xe,style_traces:Lt,source_view_id:this.viewID};this.model.set("_js2py_restyle",gr),this.touch()}}touch(){this.model.save_changes()}handle_plotly_relayout(_e){if(_e!=null&&!_e.hasOwnProperty("_doNotReportToPy")){var Xe={relayout_data:_e,source_view_id:this.viewID};this.model.set("_js2py_relayout",Xe),this.touch()}}handle_plotly_update(_e){if(_e!=null&&!(_e.data&&_e.data[0].hasOwnProperty("_doNotReportToPy"))){var Xe={style_data:_e.data[0],style_traces:_e.data[1],layout_data:_e.layout,source_view_id:this.viewID};this.model.set("_js2py_update",Xe),this.touch()}}handle_plotly_click(_e){this._send_points_callback_message(_e,"plotly_click")}handle_plotly_hover(_e){this._send_points_callback_message(_e,"plotly_hover")}handle_plotly_unhover(_e){this._send_points_callback_message(_e,"plotly_unhover")}handle_plotly_selected(_e){this._send_points_callback_message(_e,"plotly_selected")}handle_plotly_deselect(_e){_e={points:[]},this._send_points_callback_message(_e,"plotly_deselect")}_send_points_callback_message(_e,Xe){if(_e!=null){var Lt={event_type:Xe,points:this.buildPointsObject(_e),device_state:this.buildInputDeviceStateObject(_e),selector:this.buildSelectorObject(_e)};Lt.points!==null&&Lt.points!==void 0&&(this.model.set("_js2py_pointsCallback",Lt),this.touch())}}handle_plotly_doubleclick(_e){}do_addTraces(){var _e=this.model.get("_py2js_addTraces");if(_e!==null){var Xe=this;Rd.default.addTraces(this.el,_e.trace_data).then(function(){Xe._sendTraceDeltas(_e.trace_edit_id);var Lt=_e.layout_edit_id;Xe._sendLayoutDelta(Lt)})}}do_deleteTraces(){var _e=this.model.get("_py2js_deleteTraces");if(_e!==null){var Xe=_e.delete_inds,Lt=this;Rd.default.deleteTraces(this.el,Xe).then(function(){var gr=_e.trace_edit_id;Lt._sendTraceDeltas(gr);var Zr=_e.layout_edit_id;Lt._sendLayoutDelta(Zr)})}}do_moveTraces(){var _e=this.model.get("_py2js_moveTraces");if(_e!==null){var Xe=_e.current_trace_inds,Lt=_e.new_trace_inds,gr=ef.isEqual(Xe,Lt);gr||Rd.default.moveTraces(this.el,Xe,Lt)}}do_restyle(){var _e=this.model.get("_py2js_restyle");if(_e!==null){var Xe=_e.restyle_data,Lt=this.model._normalize_trace_indexes(_e.restyle_traces);Xe._doNotReportToPy=!0,Rd.default.restyle(this.el,Xe,Lt),this._sendTraceDeltas(_e.trace_edit_id);var gr=_e.layout_edit_id;this._sendLayoutDelta(gr)}}do_relayout(){var _e=this.model.get("_py2js_relayout");if(_e!==null){if(_e.source_view_id!==this.viewID){var Xe=_e.relayout_data;Xe._doNotReportToPy=!0,Rd.default.relayout(this.el,_e.relayout_data)}var Lt=_e.layout_edit_id;this._sendLayoutDelta(Lt)}}do_update(){var _e=this.model.get("_py2js_update");if(_e!==null){var Xe=_e.style_data||{},Lt=_e.layout_data||{},gr=this.model._normalize_trace_indexes(_e.style_traces);Xe._doNotReportToPy=!0,Rd.default.update(this.el,Xe,Lt,gr),this._sendTraceDeltas(_e.trace_edit_id);var Zr=_e.layout_edit_id;this._sendLayoutDelta(Zr)}}do_animate(){var _e=this.model.get("_py2js_animate");if(_e!==null){var Xe=_e.animation_opts,Lt=_e.style_data,gr=_e.layout_data,Zr=this.model._normalize_trace_indexes(_e.style_traces),Ea={data:Lt,layout:gr,traces:Zr};Ea._doNotReportToPy=!0;var ei=this;Rd.default.animate(this.el,Ea,Xe).then(function(){ei._sendTraceDeltas(_e.trace_edit_id);var ai=_e.layout_edit_id;ei._sendLayoutDelta(ai)})}}_sendLayoutDelta(_e){var Xe=x_(this.getFullLayout(),this.model.get("_widget_layout")),Lt={layout_delta:Xe,layout_edit_id:_e};this.model.set("_js2py_widget_layoutDelta",Lt),this.touch()}_sendTraceDeltas(_e){for(var Xe=this.model.get("_widget_data"),Lt=ef.range(Xe.length),gr=new Array(Lt.length),Zr=this.getFullData(),Ea=0;Ea=0;gr--)Lt.splice(0,0,fe[_e[gr]]),fe.splice(_e[gr],1);var Zr=ef(Xe).zip(Lt).sortBy(0).unzip().value();Xe=Zr[0],Lt=Zr[1];for(var Ea=0;Ea0&&typeof Zr[0]=="object"){Xe[Lt]=new Array(Zr.length);for(var Ea=0;Ea0&&(Xe[Lt]=ei)}else typeof Zr=="object"&&!Array.isArray(Zr)?Xe[Lt]=x_(Zr,{}):Zr!==void 0&&typeof Zr!="function"&&(Xe[Lt]=Zr)}}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),Zr="",Ea,ei,ai;for(Ea=2;gr===1/0;Ea*=2)gr=Math.log(Math.pow(2,_e/Ea))/Math.log(Xe)*Ea;var wn=gr-Math.floor(gr);for(Ea=0;Ea=Math.pow(2,_e)?Lt>10?(console.warn("randstr failed uniqueness"),Zr):s7(fe,_e,Xe,(Lt||0)+1):Zr}var kHe=()=>{let fe;return{initialize(_e){fe=new XA(_e.model,vhe),fe.initialize()},render({el:_e}){let Xe=new ZA(fe,_e);return Xe.perform_render(),()=>Xe.remove()}}};export{XA as FigureModel,ZA as FigureView,kHe as default}; /*! Bundled license information: plotly.js/dist/plotly.js: